| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Generic.Data.Internal.Functions
Description
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.
Instances
| 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 #