From 526d604670a456e59a3d20b657d864f85bb52839 Mon Sep 17 00:00:00 2001 From: Symphorien Gibol Date: Tue, 14 Aug 2018 01:01:08 +0200 Subject: module system: rework module merging The asymptotic complexity is now much lower. --- lib/attrsets.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/attrsets.nix') diff --git a/lib/attrsets.nix b/lib/attrsets.nix index 0066fba362ae9..2c2319003d8b0 100644 --- a/lib/attrsets.nix +++ b/lib/attrsets.nix @@ -145,7 +145,7 @@ rec { foldAttrs = op: nul: list_of_attrs: fold (n: a: fold (name: o: - o // (listToAttrs [{inherit name; value = op n.${name} (a.${name} or nul); }]) + o // { ${name} = op n.${name} (a.${name} or nul); } ) a (attrNames n) ) {} list_of_attrs; -- cgit 1.4.1