From 7d47498b5ea1ad4685bad954e5407f628f7f5595 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 13 Apr 2010 13:42:25 +0000 Subject: * Evaluate lets directly (i.e. without desugaring to `rec { attrs...; = e; }.). This prevents the unnecessary allocation of an attribute set. --- src/libexpr/nixexpr.hh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/libexpr/nixexpr.hh') diff --git a/src/libexpr/nixexpr.hh b/src/libexpr/nixexpr.hh index f0c05d4352ff..ccddb16298a4 100644 --- a/src/libexpr/nixexpr.hh +++ b/src/libexpr/nixexpr.hh @@ -139,6 +139,14 @@ struct ExprLambda : Expr COMMON_METHODS }; +struct ExprLet : Expr +{ + ExprAttrs * attrs; + Expr * body; + ExprLet(ExprAttrs * attrs, Expr * body) : attrs(attrs), body(body) { }; + COMMON_METHODS +}; + struct ExprWith : Expr { Pos pos; -- cgit 1.4.1