Simplify lib.typeOf

This commit is contained in:
Shea Levy 2012-12-31 13:59:30 -05:00
parent b5a3ae7b22
commit c1598d167e

View File

@ -11,7 +11,7 @@ with import ./trivial.nix;
rec {
hasType = x: isAttrs x && x ? _type;
typeOf = x: if hasType x then x._type else "";
typeOf = x: x._type or "";
setType = typeName: value: value // {
_type = typeName;