| Safe Haskell | Safe |
|---|---|
| Language | Haskell98 |
Generics.Generic.IsEnum
Description
Test if a data type is an enumeration (only zero-argument constructors) generically using GHC.Generics.
Documentation
isEnum :: forall a. (Generic a, GIsEnum (Rep a)) => Proxy a -> Bool #
Generically test if a data type is an enumeration.
Class for testing if the functors from GHC.Generics are
enumerations. You generally don't need to give any custom
instances. Just call isEnum.
Minimal complete definition
Instances
| GIsEnum Par1 # | |
| GIsEnum (V1 :: * -> *) # | |
| GIsEnum (U1 :: * -> *) # | |
| GIsEnum (Rec1 f) # | |
| GIsEnum (K1 i a :: * -> *) # | |
| (GIsEnum f, GIsEnum g) => GIsEnum (f :+: g) # | |
| (GIsEnum f, GIsEnum g) => GIsEnum (f :*: g) # | |
| GIsEnum f => GIsEnum (M1 D c f) # | |
| GIsEnum f => GIsEnum (M1 C c f) # | |
| GIsEnum (M1 S c a) # | |