about summary refs log tree commit diff
path: root/src/libexpr/primops.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-04-04T15·53+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-04-04T16·59+0200
commitb72c8d2e5b5bbdc218f7c00694027cdd75b6a584 (patch)
tree7173dfa3232031d57e12348d16e5255006f1f03d /src/libexpr/primops.cc
parent3f8e1f56825f3ec2a9d99715609e362fe5e5a218 (diff)
Include position info in function application
This allows error messages like:

  error: the anonymous function at `/etc/nixos/configuration.nix:1:1'
    called without required argument `foo', at
    `/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:77:59'
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r--src/libexpr/primops.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index ca316f08af13..422d68f38039 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -711,7 +711,7 @@ struct FilterFromExpr : PathFilter
         mkString(arg1, path);
 
         Value fun2;
-        state.callFunction(filter, arg1, fun2);
+        state.callFunction(filter, arg1, fun2, noPos);
 
         Value arg2;
         mkString(arg2,
@@ -721,7 +721,7 @@ struct FilterFromExpr : PathFilter
             "unknown" /* not supported, will fail! */);
 
         Value res;
-        state.callFunction(fun2, arg2, res);
+        state.callFunction(fun2, arg2, res, noPos);
 
         return state.forceBool(res);
     }
@@ -1008,7 +1008,7 @@ static void prim_filter(EvalState & state, Value * * args, Value & v)
     bool same = true;
     for (unsigned int n = 0; n < args[1]->list.length; ++n) {
         Value res;
-        state.callFunction(*args[0], *args[1]->list.elems[n], res);
+        state.callFunction(*args[0], *args[1]->list.elems[n], res, noPos);
         if (state.forceBool(res))
             vs[k++] = args[1]->list.elems[n];
         else