lib.types.uniq: Check inner type
We now reuse the `unique` type, which implements this. Keeping the duplication around would be bad at this point.
This commit is contained in:
parent
2b4a1a1d4f
commit
bd285d2c11
1 changed files with 1 additions and 12 deletions
|
@ -613,18 +613,7 @@ rec {
|
||||||
nestedTypes.elemType = elemType;
|
nestedTypes.elemType = elemType;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Value of given type but with no merging (i.e. `uniq list`s are not concatenated).
|
uniq = unique { message = ""; };
|
||||||
uniq = elemType: mkOptionType rec {
|
|
||||||
name = "uniq";
|
|
||||||
inherit (elemType) description descriptionClass check;
|
|
||||||
merge = mergeOneOption;
|
|
||||||
emptyValue = elemType.emptyValue;
|
|
||||||
getSubOptions = elemType.getSubOptions;
|
|
||||||
getSubModules = elemType.getSubModules;
|
|
||||||
substSubModules = m: uniq (elemType.substSubModules m);
|
|
||||||
functor = (defaultFunctor name) // { wrapped = elemType; };
|
|
||||||
nestedTypes.elemType = elemType;
|
|
||||||
};
|
|
||||||
|
|
||||||
unique = { message }: type: mkOptionType rec {
|
unique = { message }: type: mkOptionType rec {
|
||||||
name = "unique";
|
name = "unique";
|
||||||
|
|
Loading…
Reference in a new issue