aboutsummaryrefslogtreecommitdiff
path: root/src/nix/repl.cc
diff options
context:
space:
mode:
authorSilvan Mosberger <contact@infinisil.com>2020-12-18 14:38:49 +0100
committerSilvan Mosberger <contact@infinisil.com>2020-12-18 21:48:22 +0100
commitb70d22baca3e8826392b61aa53955c6da74b8724 (patch)
tree9a427c59c0ee0d4a43d7df2793f67df2129e0348 /src/nix/repl.cc
parent12e65078ef5c511196c9e48f7fdf71f6c0e5c89f (diff)
Replace Value type setters with mk* functions
Move clearValue inside Value mkInt instead of setInt mkBool instead of setBool mkString instead of setString mkPath instead of setPath mkNull instead of setNull mkAttrs instead of setAttrs mkList instead of setList* mkThunk instead of setThunk mkApp instead of setApp mkLambda instead of setLambda mkBlackhole instead of setBlackhole mkPrimOp instead of setPrimOp mkPrimOpApp instead of setPrimOpApp mkExternal instead of setExternal mkFloat instead of setFloat Add note that the static mk* function should be removed eventually
Diffstat (limited to 'src/nix/repl.cc')
-rw-r--r--src/nix/repl.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/nix/repl.cc b/src/nix/repl.cc
index 673155078..a992d8732 100644
--- a/src/nix/repl.cc
+++ b/src/nix/repl.cc
@@ -551,9 +551,7 @@ bool NixRepl::processLine(string line)
{
Expr * e = parseString(string(line, p + 1));
Value & v(*state->allocValue());
- v.setThunk();
- v.thunk.env = env;
- v.thunk.expr = e;
+ v.mkThunk(env, e);
addVarToScope(state->symbols.create(name), v);
} else {
Value v;