mirror of
https://github.com/NixOS/nix
synced 2025-06-27 00:11:17 +02:00
Introduce Value type setters and make use of them
This commit is contained in:
parent
fa307875e9
commit
9f056f7afd
5 changed files with 43 additions and 24 deletions
|
@ -36,11 +36,11 @@ void EvalState::forceValue(Value & v, const Pos & pos)
|
|||
Env * env = v.thunk.env;
|
||||
Expr * expr = v.thunk.expr;
|
||||
try {
|
||||
v.type = tBlackhole;
|
||||
v.setBlackhole();
|
||||
//checkInterrupt();
|
||||
expr->eval(*this, *env, v);
|
||||
} catch (...) {
|
||||
v.type = tThunk;
|
||||
v.setThunk();
|
||||
v.thunk.env = env;
|
||||
v.thunk.expr = expr;
|
||||
throw;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue