fix(tvix/eval): thunk all uses of with

With this all other "weird scope" logic starts working for `with` as
well.

Change-Id: I0ea1d8c5fbd9cec5084bd574224f77b71ff2b487
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6487
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
Vincent Ambo 2022-09-06 23:20:44 +03:00 committed by tazjin
parent 07ea30370e
commit 627dfabef1
5 changed files with 22 additions and 1 deletions

View file

@ -0,0 +1 @@
42

View file

@ -0,0 +1,8 @@
# Tests using `with` on a set that does not yet exist on the stack.
let
result = with set; value;
set = {
value = 42;
};
in result

View file

@ -0,0 +1 @@
42

View file

@ -0,0 +1,9 @@
# Manual desugaring of something similar to `rec`, to test lower level
# recursion primitives.
let
set = with set; {
a = 21;
b = a * 2;
};
in set.b