From 37d7abd69402f0e7a78d4d2f2d78996409a8563a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 25 Oct 2004 16:54:56 +0000 Subject: * New language feature: with expressions. The expression `with E1; E2' evaluates to E2 with all bindings in the attribute set E1 substituted. E.g., with {x = 123;}; x evaluates to 123. That is, the attribute set E1 is in scope in E2. This is particularly useful when importing files containing lots definitions. E.g., instead of let { inherit (import ./foo.nix) a b c d e f; body = ... a ... f ...; } we can now say with import ./foo.nix; ... a ... f ... I.e., we don't have to say what variables should be brought into scope. --- src/libexpr/primops.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libexpr/primops.cc') diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 070ed1b54aa7..938d9bb8c13b 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -205,7 +205,7 @@ static Expr primDerivation(EvalState & state, const ATermVector & _args) try { processBinding(state, value, ne, ss); } catch (Error & e) { - throw Error(format("while processing derivation attribute `%1%' at %2%:\n%3%") + throw Error(format("while processing the derivation attribute `%1%' at %2%:\n%3%") % key % showPos(pos) % e.msg()); } -- cgit 1.4.1