aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-02-28 12:46:00 -0500
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-02-28 12:46:00 -0500
commit5abd643c6d10f2cfa6e26652a9688a0263310094 (patch)
tree2fdb8bf147cb93430ba3ba79a473568e2584e497 /src/libexpr/primops.cc
parente68e8e3cee53ce7debd7c54b0d122d94d1b102a2 (diff)
parentd381248ec0847cacd918480e83a99287f814456a (diff)
Merge branch 'path-info' into ca-drv-exotic
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r--src/libexpr/primops.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index db33749a1..f4ae3b537 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -2093,7 +2093,7 @@ static void addPath(
std::optional<StorePath> expectedStorePath;
if (expectedHash)
expectedStorePath = state.store->makeFixedOutputPath(name, FixedOutputInfo {
- {
+ .hash = {
.method = method,
.hash = *expectedHash,
},
@@ -3038,9 +3038,9 @@ static RegisterPrimOp primop_foldlStrict({
.doc = R"(
Reduce a list by applying a binary operator, from left to right,
e.g. `foldl' op nul [x0 x1 x2 ...] = op (op (op nul x0) x1) x2)
- ...`. The operator is applied strictly, i.e., its arguments are
- evaluated first. For example, `foldl' (x: y: x + y) 0 [1 2 3]`
- evaluates to 6.
+ ...`. For example, `foldl' (x: y: x + y) 0 [1 2 3]` evaluates to 6.
+ The return value of each application of `op` is evaluated immediately,
+ even for intermediate values.
)",
.fun = prim_foldlStrict,
});