From 4cc6c83477cd63fe220b08d8106d1aa7aa283dbf Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 23 Jul 2015 18:31:17 +0200 Subject: [PATCH] concatLists (map ...) -> concatMap --- lib/modules.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/modules.nix b/lib/modules.nix index 22e8b200f76..80268e51e11 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -182,18 +182,18 @@ rec { let loc = prefix ++ [name]; # Get all submodules that declare ‘name’. - decls = concatLists (map (m: + decls = concatMap (m: if m.options ? ${name} then [ { inherit (m) file; options = m.options.${name}; } ] else [] - ) options); + ) options; # Get all submodules that define ‘name’. - defns = concatLists (map (m: + defns = concatMap (m: if m.config ? ${name} then map (config: { inherit (m) file; inherit config; }) (pushDownProperties m.config.${name}) else [] - ) configs); + ) configs; nrOptions = count (m: isOption m.options) decls; # Extract the definitions for this loc defns' = map (m: { inherit (m) file; value = m.config.${name}; })