about summary refs log tree commit diff
path: root/lib/attrsets.nix
diff options
context:
space:
mode:
authorSilvan Mosberger <silvan.mosberger@tweag.io>2023-09-22 12:22:04 +0200
committerSilvan Mosberger <silvan.mosberger@tweag.io>2023-09-27 02:43:59 +0200
commit3b6169f87be45c77ec4b56d118a5e2c718ff3f2b (patch)
tree6960091ea305fbcae0abcf3b0827aabedc2c81ec /lib/attrsets.nix
parent857a844ea8f1736e42f9c14c992d95be7b83a7c4 (diff)
lib.lists.foldl': Make strict in the initial accumulator
To maintain backwards compatibility, this can't be changed in the Nix language.
We can however ensure that the version Nixpkgs has the more intuitive behavior.
Diffstat (limited to 'lib/attrsets.nix')
-rw-r--r--lib/attrsets.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/attrsets.nix b/lib/attrsets.nix
index 77e36d3271f76..11932c05dd29b 100644
--- a/lib/attrsets.nix
+++ b/lib/attrsets.nix
@@ -392,7 +392,7 @@ rec {
       foldlAttrs :: ( a -> String -> b -> a ) -> a -> { ... :: b } -> a
   */
   foldlAttrs = f: init: set:
-    foldl'
+    builtins.foldl'
       (acc: name: f acc name set.${name})
       init
       (attrNames set);