diff options
author | Silvan Mosberger <contact@infinisil.com> | 2021-01-26 02:02:12 +0100 |
---|---|---|
committer | Silvan Mosberger <contact@infinisil.com> | 2021-01-27 00:16:23 +0100 |
commit | e9101d4a3bc90dfaaa076d8ec00e5ed68e518f60 (patch) | |
tree | 02be0990cb474e19ef52dfb9ad5ee15b99cb228b /lib/types.nix | |
parent | 8ac4b251c8a319909a29aa103101eeed82ca7d3e (diff) |
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>
Diffstat (limited to 'lib/types.nix')
-rw-r--r-- | lib/types.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/types.nix b/lib/types.nix index 0810a43ed0eb9..77245158d9f81 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -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); |