summary refs log tree commit diff
path: root/pkgs/lib/lists.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/lib/lists.nix')
-rw-r--r--pkgs/lib/lists.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/lib/lists.nix b/pkgs/lib/lists.nix
index ede7018fb23..0916355568c 100644
--- a/pkgs/lib/lists.nix
+++ b/pkgs/lib/lists.nix
@@ -1,4 +1,7 @@
 # General list operations.
+with {
+  inherit (import ./trivial.nix) deepSeq;
+};
 
 rec {
   inherit (builtins) head tail length isList add sub lessThan;
@@ -220,4 +223,5 @@ rec {
       ++ zipTwoLists (tail xs) (tail ys)
     else [];
 
+  deepSeqList = xs: y: if any (x: deepSeq x false) xs then y else y;
 }