diff options
Diffstat (limited to 'src/nix')
-rw-r--r-- | src/nix/repl.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nix/repl.cc b/src/nix/repl.cc index 54daeb246..e9bebff17 100644 --- a/src/nix/repl.cc +++ b/src/nix/repl.cc @@ -673,7 +673,7 @@ void NixRepl::reloadFiles() void NixRepl::addAttrsToScope(Value & attrs) { - state->forceAttrs(attrs, attrs.determinePos(noPos)); + state->forceAttrs(attrs, [&]() { return attrs.determinePos(noPos); }); if (displ + attrs.attrs->size() >= envSize) throw Error("environment full; cannot add more variables"); @@ -712,7 +712,7 @@ void NixRepl::evalString(string s, Value & v) { Expr * e = parseString(s); e->eval(*state, *env, v); - state->forceValue(v, v.determinePos(noPos)); + state->forceValue(v, [&]() { return v.determinePos(noPos); }); } @@ -742,7 +742,7 @@ std::ostream & NixRepl::printValue(std::ostream & str, Value & v, unsigned int m str.flush(); checkInterrupt(); - state->forceValue(v, v.determinePos(noPos)); + state->forceValue(v, [&]() { return v.determinePos(noPos); }); switch (v.type()) { |