Merge pull request #111459 from helsinki-systems/types

lib/types: add description for functionTo
This commit is contained in:
Silvan Mosberger 2021-01-31 21:19:19 +01:00 committed by GitHub
commit 919b1f5466
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -454,7 +454,8 @@ rec {
};
functionTo = elemType: mkOptionType {
name = "function that evaluates to a(n) ${elemType.name}";
name = "functionTo";
description = "function that evaluates to a(n) ${elemType.name}";
check = isFunction;
merge = loc: defs:
fnArgs: (mergeDefinitions (loc ++ [ "[function body]" ]) elemType (map (fn: { inherit (fn) file; value = fn.value fnArgs; }) defs)).mergedValue;