summary refs log tree commit diff
path: root/pkgs/lib/lists.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-08-14 13:42:43 -0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-08-14 13:42:43 -0400
commit9d516f16fc44e45ca48759dd02858dd5caa50918 (patch)
treea6363adf38ba18804bbaa6d0850e4c5aa9cc1cd4 /pkgs/lib/lists.nix
parentf136179002a9694baa2c6266cb9fd3fb04abaabb (diff)
downloadnixpkgs-9d516f16fc44e45ca48759dd02858dd5caa50918.tar
nixpkgs-9d516f16fc44e45ca48759dd02858dd5caa50918.tar.gz
nixpkgs-9d516f16fc44e45ca48759dd02858dd5caa50918.tar.bz2
nixpkgs-9d516f16fc44e45ca48759dd02858dd5caa50918.tar.lz
nixpkgs-9d516f16fc44e45ca48759dd02858dd5caa50918.tar.xz
nixpkgs-9d516f16fc44e45ca48759dd02858dd5caa50918.tar.zst
nixpkgs-9d516f16fc44e45ca48759dd02858dd5caa50918.zip
Fix evaluation problem
http://hydra.nixos.org/build/2940128
Diffstat (limited to 'pkgs/lib/lists.nix')
-rw-r--r--pkgs/lib/lists.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/lib/lists.nix b/pkgs/lib/lists.nix
index b50da022283..b9eba9ab478 100644
--- a/pkgs/lib/lists.nix
+++ b/pkgs/lib/lists.nix
@@ -1,14 +1,14 @@
 # General list operations.
 
 rec {
-  inherit (builtins) elemAt head tail length isList add sub lessThan;
+  inherit (builtins) head tail length isList add sub lessThan;
 
 
   # Create a list consisting of a single element.  `singleton x' is
   # sometimes more convenient with respect to indentation than `[x]'
   # when x spans multiple lines.
   singleton = x: [x];
-  
+
 
   # "Fold" a binary function `op' between successive elements of
   # `list' with `nul' as the starting value, i.e., `fold op nul [x_1
@@ -22,7 +22,7 @@ rec {
         fold' = n:
           if n == len
           then nul
-          else op (elemAt list n) (fold' (add n 1));
+          else op (builtins.elemAt list n) (fold' (add n 1));
       in fold' 0
     else op: nul:
       let fold' = list:
@@ -42,7 +42,7 @@ rec {
         foldl' = n:
           if n == minus1
           then nul
-          else op (foldl' (sub n 1)) (elemAt list n);
+          else op (foldl' (sub n 1)) (builtins.elemAt list n);
       in foldl' (sub (length list) 1)
     else op:
       let foldl' = nul: list: