lib/types: types.functionTo deprecate functor.wrapped in favor of functor.payload.elemType

This commit is contained in:
Johannes Kirschbauer 2025-01-19 16:22:24 +01:00
parent 4fe25460e1
commit f6214eb786
No known key found for this signature in database
4 changed files with 21 additions and 1 deletions

View file

@ -887,7 +887,9 @@ rec {
getSubOptions = prefix: elemType.getSubOptions (prefix ++ [ "<function body>" ]);
getSubModules = elemType.getSubModules;
substSubModules = m: functionTo (elemType.substSubModules m);
functor = (defaultFunctor "functionTo") // { wrapped = elemType; };
functor = (elemTypeFunctor "functionTo" { inherit elemType; }) // {
type = payload: types.functionTo payload.elemType;
};
nestedTypes.elemType = elemType;
};