fix: use type name for tagged type

This commit is contained in:
Jake Hamilton 2024-06-12 22:03:49 -07:00
parent f9ce7ff68b
commit 9c29945531
Signed by untrusted user: jakehamilton
GPG key ID: 9762169A1B35EA68

View file

@ -8,7 +8,7 @@
setTypes = type: let setTypes = type: let
assign = name: value: assign = name: value:
assert lib.errors.trace (type.check value) "${name} is not of type ${type.name}: ${lib.generators.pretty {} value}"; assert lib.errors.trace (type.check value) "${name} is not of type ${type.name}: ${lib.generators.pretty {} value}";
lib.types.set name ({inherit name;} // value); lib.types.set type.name ({inherit name;} // value);
in in
builtins.mapAttrs assign; builtins.mapAttrs assign;