lib/types: add description for functionTo

This commit is contained in:
Fritz Otlinghaus
2021-01-31 13:28:23 +01:00
parent 4015c5ca9c
commit e0215b3175

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;