Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Type level functions on generic representations.
Documentation
type family Map (s :: TyFun a b -> Type) (r :: k -> Type) :: k -> Type Source #
Apply a type function on every field of a type.
type family NConstructors (r :: k -> Type) :: Nat Source #
Number of constructors of a data type.
type NConstructors k ((:+:) k f g) Source # | |
type NConstructors k (M1 k C c f) Source # | |
type NConstructors k (M1 k D c f) Source # | |
nconstructors :: forall r. KnownNat (NConstructors r) => Integer Source #