diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-11-01T19·10+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-11-01T19·10+0000 |
commit | 1b4184ccbb01634792897d3412c489b989674567 (patch) | |
tree | 5284cac6187211341c82fb440cc941f776ab46e9 /src/fix-ng/eval.cc | |
parent | a2a9bacd8296ed1ddb6105b649a062fe65c27759 (diff) |
* Let syntax.
Diffstat (limited to 'src/fix-ng/eval.cc')
-rw-r--r-- | src/fix-ng/eval.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fix-ng/eval.cc b/src/fix-ng/eval.cc index 785467741631..46bb1f94188d 100644 --- a/src/fix-ng/eval.cc +++ b/src/fix-ng/eval.cc @@ -160,6 +160,11 @@ Expr evalExpr2(EvalState & state, Expr e) if (ATmatch(e, "Rec([<list>])", &bnds)) return expandRec(e, (ATermList) bnds); + /* Let expressions `let {..., body = ...}' are just desugared + into `(rec {..., body = ...}).body'. */ + if (ATmatch(e, "LetRec(<term>)", &e1)) + return evalExpr(state, ATmake("Select(Rec(<term>), \"body\")", e1)); + /* Barf. */ throw badTerm("invalid expression", e); } |