tvl-depot/tvix/eval/docs
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.md docs(tvix/eval): pad pure column so it can fit "false" 2022-09-04 21:05:57 +00:00
known-optimisation-potential.md docs(tvix/eval): propose builtin "inlining" optimisation 2022-09-11 20:02:46 +00:00
language-issues.md fix(tvix/eval): bring foldl' strictness in line with C++ Nix 2022-10-15 14:12:23 +00:00
opcodes-attrsets.md docs(tvix/eval): add design documentation for attrset opcodes 2022-08-13 15:31:50 +00:00
recursive-attrs.md docs(tvix/eval): note C++ implementation details for C++ Nix 2022-09-18 15:01:34 +00:00