generic-aeson-0.2.0.13: Derivation of Aeson instances using GHC generics.
Safe HaskellSafe-Inferred
LanguageHaskell2010

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 #

Instances

Instances details
GIsEnum Par1 Source # 
Instance details

Defined in Generics.Generic.IsEnum

Methods

gIsEnum :: Proxy (Par1 a) -> Bool Source #

GIsEnum (V1 :: Type -> Type) Source # 
Instance details

Defined in Generics.Generic.IsEnum

Methods

gIsEnum :: Proxy (V1 a) -> Bool Source #

GIsEnum (U1 :: Type -> Type) Source # 
Instance details

Defined in Generics.Generic.IsEnum

Methods

gIsEnum :: Proxy (U1 a) -> Bool Source #

GIsEnum (Rec1 f) Source # 
Instance details

Defined in Generics.Generic.IsEnum

Methods

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

GIsEnum (K1 i a :: Type -> Type) Source # 
Instance details

Defined in Generics.Generic.IsEnum

Methods

gIsEnum :: Proxy (K1 i a a0) -> Bool Source #

(GIsEnum f, GIsEnum g) => GIsEnum (f :+: g) Source # 
Instance details

Defined in Generics.Generic.IsEnum

Methods

gIsEnum :: Proxy ((f :+: g) a) -> Bool Source #

(GIsEnum f, GIsEnum g) => GIsEnum (f :*: g) Source # 
Instance details

Defined in Generics.Generic.IsEnum

Methods

gIsEnum :: Proxy ((f :*: g) a) -> Bool Source #

GIsEnum f => GIsEnum (M1 D c f) Source # 
Instance details

Defined in Generics.Generic.IsEnum

Methods

gIsEnum :: Proxy (M1 D c f a) -> Bool Source #

GIsEnum f => GIsEnum (M1 C c f) Source # 
Instance details

Defined in Generics.Generic.IsEnum

Methods

gIsEnum :: Proxy (M1 C c f a) -> Bool Source #

GIsEnum (M1 S c a) Source # 
Instance details

Defined in Generics.Generic.IsEnum

Methods

gIsEnum :: Proxy (M1 S c a a0) -> Bool Source #