concatLists (map ...) -> concatMap

This commit is contained in:
Eelco Dolstra 2015-07-23 18:31:17 +02:00
parent 0ae8b365b3
commit 4cc6c83477

View File

@ -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}; })