mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
lib/types: Improved functionTo merging
Now type checks the resulting function values and allows mkMerge and co. Also indicates that the type check is done in the function body Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
This commit is contained in:
parent
8ac4b251c8
commit
e9101d4a3b
@ -457,7 +457,7 @@ rec {
|
||||
name = "function that evaluates to a(n) ${elemType.name}";
|
||||
check = isFunction;
|
||||
merge = loc: defs:
|
||||
fnArgs: elemType.merge loc (map (fn: { inherit (fn) file; value = fn.value fnArgs; }) defs);
|
||||
fnArgs: (mergeDefinitions (loc ++ [ "[function body]" ]) elemType (map (fn: { inherit (fn) file; value = fn.value fnArgs; }) defs)).mergedValue;
|
||||
getSubOptions = elemType.getSubOptions;
|
||||
getSubModules = elemType.getSubModules;
|
||||
substSubModules = m: functionTo (elemType.substSubModules m);
|
||||
|
Loading…
Reference in New Issue
Block a user