diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-07-25T21·21+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-07-25T21·21+0000 |
commit | 2317d8f6712b2d4e249b8b1206f9e0a9c4269fc0 (patch) | |
tree | c1fb67e196e334bed09ee9c7a8d0b6a8be19da07 /src/libexpr/get-drvs.cc | |
parent | 0e6dc72a7a4d29b7f1a1458670581a29d573e479 (diff) |
* `nix-instantiate --print-args' prints out the arguments of a
top-level function.
Diffstat (limited to 'src/libexpr/get-drvs.cc')
-rw-r--r-- | src/libexpr/get-drvs.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libexpr/get-drvs.cc b/src/libexpr/get-drvs.cc index c7fc52db15e5..736c3e522fcd 100644 --- a/src/libexpr/get-drvs.cc +++ b/src/libexpr/get-drvs.cc @@ -124,15 +124,15 @@ static void getDerivations(EvalState & state, Expr e, DrvInfos & drvs, Exprs & doneExprs, const string & attrPath, const string & pathTaken) { - /* Automatically call functions that have defaults for all - arguments. */ + /* Automatically call functions for which each argument has a + default value. */ ATermList formals; ATerm body, pos; if (matchFunction(e, formals, body, pos)) { for (ATermIterator i(formals); i; ++i) { Expr name, def; ATerm values, def2; if (!matchFormal(*i, name, values, def2)) abort(); - if (!matchDefaultValue(def2, def)) + if (!matchDefaultValue(def2, def)) throw TypeError(format("cannot auto-call a function that has an argument without a default value (`%1%')") % aterm2String(name)); } |