generic-data-0.1.0.0: Utilities for GHC.Generics
Generic.Data.Internal.Enum
Synopsis
gtoEnum :: forall a. (Generic a, GEnum (Rep a)) => Int -> a Source #
Generic toEnum.
toEnum
instance Enum MyType where toEnum = gtoEnum fromEnum = gfromEnum
Enum
gtoEnum
fromEnum
gfromEnum
gfromEnum :: (Generic a, GEnum (Rep a)) => a -> Int Source #
Generic fromEnum.
See also gtoEnum.
gminBound :: (Generic a, GBounded (Rep a)) => a Source #
Generic minBound.
minBound
instance Bounded MyType where minBound = gminBound maxBound = gmaxBound
Bounded
gminBound
maxBound
gmaxBound
gmaxBound :: (Generic a, GBounded (Rep a)) => a Source #
Generic maxBound.
See also gminBound.
class GEnum f where Source #
Generic representation of Enum types.
Minimal complete definition
gCardinality, gFromEnum, gToEnum
Methods
gCardinality :: proxy f -> Int Source #
gFromEnum :: f p -> Int Source #
gToEnum :: Int -> f p Source #
Instances
gCardinality :: proxy (U1 *) -> Int Source #
gFromEnum :: U1 * p -> Int Source #
gToEnum :: Int -> U1 * p Source #
gCardinality :: proxy ((* :+: f) g) -> Int Source #
gFromEnum :: (* :+: f) g p -> Int Source #
gToEnum :: Int -> (* :+: f) g p Source #
gCardinality :: proxy (M1 * i c f) -> Int Source #
gFromEnum :: M1 * i c f p -> Int Source #
gToEnum :: Int -> M1 * i c f p Source #
class GBounded f where Source #
Generic representation of Bounded types.
gMinBound, gMaxBound
gMinBound :: f p Source #
gMaxBound :: f p Source #
gMinBound :: U1 * p Source #
gMaxBound :: U1 * p Source #
gMinBound :: K1 * i c p Source #
gMaxBound :: K1 * i c p Source #
gMinBound :: (* :+: f) g p Source #
gMaxBound :: (* :+: f) g p Source #
gMinBound :: (* :*: f) g p Source #
gMaxBound :: (* :*: f) g p Source #
gMinBound :: M1 * i c f p Source #
gMaxBound :: M1 * i c f p Source #