| Safe Haskell | Safe | 
|---|---|
| Language | Haskell2010 | 
Generic.Data.Internal.Functions
Description
Type level functions on generic representations.
Synopsis
- type family NConstructors (r :: k -> Type) :: Nat
 - nconstructors :: forall r. KnownNat (NConstructors r) => Integer
 - type family NFields (r :: k -> Type) :: Nat
 - nfields :: forall r. KnownNat (NFields r) => Integer
 
Documentation
type family NConstructors (r :: k -> Type) :: Nat Source #
Number of constructors of a data type.
Instances
| type NConstructors (f :+: g :: k -> *) Source # | |
Defined in Generic.Data.Internal.Functions  | |
| type NConstructors (M1 C c f :: k -> *) Source # | |
Defined in Generic.Data.Internal.Functions  | |
| type NConstructors (M1 D c f :: k -> *) Source # | |
Defined in Generic.Data.Internal.Functions  | |
nconstructors :: forall r. KnownNat (NConstructors r) => Integer Source #