lib/types: types.{unique,uniq} deprecate functor.wrapped in favor of functor.payload.elemType

This commit is contained in:
Johannes Kirschbauer 2025-01-19 16:07:39 +01:00
parent b12e0d016e
commit 05958f27e2
No known key found for this signature in database
4 changed files with 23 additions and 3 deletions

View file

@ -844,7 +844,9 @@ rec {
getSubOptions = type.getSubOptions;
getSubModules = type.getSubModules;
substSubModules = m: uniq (type.substSubModules m);
functor = (defaultFunctor name) // { wrapped = type; };
functor = elemTypeFunctor name { elemType = type; } // {
type = payload: types.unique { inherit message; } payload.elemType;
};
nestedTypes.elemType = type;
};