From 2317d8f6712b2d4e249b8b1206f9e0a9c4269fc0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 25 Jul 2006 21:21:50 +0000 Subject: * `nix-instantiate --print-args' prints out the arguments of a top-level function. --- src/libexpr/get-drvs.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libexpr') 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)); } -- cgit 1.4.1