tvl-depot/tvix/eval/src
sterni f3c27f1717 fix(tvix/eval): bring foldl' strictness in line with C++ Nix
Working on https://github.com/NixOS/nix/pull/7158, I discovered that C++
Nix actually is strict in the accumulator, just not in the first value.
This seems due to the fact that in the C++ evaluator, function calls
don't seem to be thunked unconditionally and foldl' just elects not to
wrap it in a thunk (don't quote me on this summary, even though it seems
to line up with the code for primop_foldlStrict and testable behavior).

It doesn't seem worth it to risk breaking the odd Nix expression just to
be strict in one more value per invocation of foldl' (i.e. the initial
accumulator value `nul`), so let's match the existing C++ Nix behavior
here.

Change-Id: If59e62271a90d97cb440f0ca72a58ec7840d1690
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7022
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2022-10-15 14:12:23 +00:00
..
builtins fix(tvix/eval): bring foldl' strictness in line with C++ Nix 2022-10-15 14:12:23 +00:00
compiler fix(tvix/eval): fix Compiler::new on wasm 2022-10-13 16:29:49 +00:00
tests fix(tvix/eval): bring foldl' strictness in line with C++ Nix 2022-10-15 14:12:23 +00:00
value feat(tvix/eval): implement builtins.dirOf 2022-10-15 12:02:05 +00:00
chunk.rs refactor(tvix/eval): introduce source::SourceCode type 2022-10-05 10:29:47 +00:00
errors.rs feat(tvix/eval): From<Utf8Error> for ErrorKind 2022-10-12 04:22:44 +00:00
eval.rs feat(tvix/eval): allow to disable warnings 2022-10-13 02:49:59 +00:00
lib.rs refactor(tvix/eval) s/NixPath/NixSearchPath/ 2022-10-12 08:09:49 +00:00
main.rs feat(tvix/eval): Allow directly evaluating an expr via main 2022-10-11 00:33:49 +00:00
nix_search_path.rs fix(tvix/eval): nix_search_path.rs: use /etc instead of /bin 2022-10-13 09:07:30 +00:00
observer.rs feat(tvix/eval): observe stack after exiting call frames/builtins 2022-10-11 00:07:39 +00:00
opcode.rs refactor(tvix/eval): remove OpResolveWithOrUpvalue 2022-10-14 09:18:38 +00:00
properties.rs refactor(tvix/eval): Don't (ab)use PartialEq for Nix equality 2022-09-18 22:03:41 +00:00
source.rs feat(tvix/eval): fancy-format parse errors returned by rnix 2022-10-08 17:27:57 +00:00
spans.rs refactor(tvix/eval): implement ToSpan directly for rnix::TextRange 2022-10-08 10:58:42 +00:00
test_utils.rs test(tvix/eval): Add proof-of-concept test for Chunk 2022-09-18 17:55:06 +00:00
upvalues.rs refactor(tvix/eval): Don't (ab)use PartialEq for Nix equality 2022-09-18 22:03:41 +00:00
vm.rs docs(tvix/eval) vm: explain VM::{frames,stack,with_stack} 2022-10-14 09:35:28 +00:00
warnings.rs refactor(tvix/eval): introduce source::SourceCode type 2022-10-05 10:29:47 +00:00