diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-07-23 18:31:17 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-07-23 18:31:54 +0200 |
commit | 4cc6c83477cd63fe220b08d8106d1aa7aa283dbf (patch) | |
tree | cf4773235077888d9a35c09a37a7e637ff6cbd0b /lib | |
parent | 0ae8b365b35fa1c3cac700ce34b37012f96d7deb (diff) |
concatLists (map ...) -> concatMap
Diffstat (limited to 'lib')
-rw-r--r-- | lib/modules.nix | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/modules.nix b/lib/modules.nix index 22e8b200f7613..80268e51e1193 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}; }) |