lib/types: clear up coercedTo description

This commit is contained in:
Silvan Mosberger
2018-05-06 23:58:36 +02:00
committed by Profpatsch
parent b16a69289a
commit cd5736116c
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -256,7 +256,7 @@ rec {
functor = (defaultFunctor name) // { wrapped = elemType; };
};
nonEmptyListOf = elemType:
nonEmptyListOf = elemType:
let list = addCheck (types.listOf elemType) (l: l != []);
in list // { description = "non-empty " + list.description; };
@@ -419,7 +419,7 @@ rec {
assert coercedType.getSubModules == null;
mkOptionType rec {
name = "coercedTo";
description = "${finalType.description} or ${coercedType.description}";
description = "${finalType.description} or ${coercedType.description} convertible to it";
check = x: finalType.check x || (coercedType.check x && finalType.check (coerceFunc x));
merge = loc: defs:
let