diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2018-07-31 20:05:07 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2018-07-31 20:05:07 +0200 |
commit | 45bcf5416a0ce53361fd37c6b27ba4ef6a34ce96 (patch) | |
tree | f3c8d56bfc3b9c237a1d62a8082969b30cc70a08 /src/libexpr/primops.cc | |
parent | 94b2e4e1be4526f2f85efd29a52a63e1858ea414 (diff) | |
parent | c03d73c1cfbeb7c7d00a6b48111f152496e46c8f (diff) |
Merge branch 'prim_mapAttr-fix' of https://github.com/volth/nix
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r-- | src/libexpr/primops.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 311a32b0b..8ace6db4d 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -1359,7 +1359,6 @@ static void prim_functionArgs(EvalState & state, const Pos & pos, Value * * args /* Apply a function to every element of an attribute set. */ static void prim_mapAttrs(EvalState & state, const Pos & pos, Value * * args, Value & v) { - state.forceFunction(*args[0], pos); state.forceAttrs(*args[1], pos); state.mkAttrs(v, args[1]->attrs->size()); @@ -1368,7 +1367,7 @@ static void prim_mapAttrs(EvalState & state, const Pos & pos, Value * * args, Va Value * vName = state.allocValue(); Value * vFun2 = state.allocValue(); mkString(*vName, i.name); - state.callFunction(*args[0], *vName, *vFun2, pos); + mkApp(*vFun2, *args[0], *vName); mkApp(*state.allocAttr(v, i.name), *vFun2, *i.value); } } @@ -1429,7 +1428,6 @@ static void prim_tail(EvalState & state, const Pos & pos, Value * * args, Value /* Apply a function to every element of a list. */ static void prim_map(EvalState & state, const Pos & pos, Value * * args, Value & v) { - state.forceFunction(*args[0], pos); state.forceList(*args[1], pos); state.mkList(v, args[1]->listSize()); @@ -1558,7 +1556,6 @@ static void prim_all(EvalState & state, const Pos & pos, Value * * args, Value & static void prim_genList(EvalState & state, const Pos & pos, Value * * args, Value & v) { - state.forceFunction(*args[0], pos); auto len = state.forceInt(*args[1], pos); if (len < 0) |