generic-aeson-0.2.0.8: Derivation of Aeson instances using GHC generics.

Safe HaskellSafe
LanguageHaskell98

Generics.Generic.IsEnum

Description

Test if a data type is an enumeration (only zero-argument constructors) generically using GHC.Generics.

Synopsis

Documentation

isEnum :: forall a. (Generic a, GIsEnum (Rep a)) => Proxy a -> Bool Source

Generically test if a data type is an enumeration.

class GIsEnum f where Source

Class for testing if the functors from GHC.Generics are enumerations. You generally don't need to give any custom instances. Just call isEnum.

Methods

gIsEnum :: Proxy (f a) -> Bool Source