Safe Haskell | Trustworthy |
---|---|
Language | Haskell2010 |
Generics.Deriving.Enum
Contents
Synopsis
- class GEnum a where
- genum :: [a]
- genumDefault :: (Generic a, Enum' (Rep a)) => [a]
- toEnumDefault :: (Generic a, Enum' (Rep a)) => Int -> a
- fromEnumDefault :: (GEq a, Generic a, Enum' (Rep a)) => a -> Int
- class Enum' f where
- enum' :: [f a]
- class Ord a => GIx a where
- rangeDefault :: (GEq a, Generic a, Enum' (Rep a)) => (a, a) -> [a]
- indexDefault :: (GEq a, Generic a, Enum' (Rep a)) => (a, a) -> a -> Int
- inRangeDefault :: (GEq a, Generic a, Enum' (Rep a)) => (a, a) -> a -> Bool
Generic enum class
Minimal complete definition
Nothing
Instances
Default definitions for GEnum
genumDefault :: (Generic a, Enum' (Rep a)) => [a] Source #
toEnumDefault :: (Generic a, Enum' (Rep a)) => Int -> a Source #
fromEnumDefault :: (GEq a, Generic a, Enum' (Rep a)) => a -> Int Source #
Internal enum class
Instances
Enum' (U1 :: k -> Type) Source # | |
Defined in Generics.Deriving.Enum | |
(Enum' f, Enum' g) => Enum' (f :*: g :: k -> Type) Source # | |
Defined in Generics.Deriving.Enum | |
(Enum' f, Enum' g) => Enum' (f :+: g :: k -> Type) Source # | |
Defined in Generics.Deriving.Enum | |
GEnum c => Enum' (K1 i c :: k -> Type) Source # | |
Defined in Generics.Deriving.Enum | |
Enum' f => Enum' (M1 i c f :: k -> Type) Source # | |
Defined in Generics.Deriving.Enum |
Generic Ix class
class Ord a => GIx a where Source #
Minimal complete definition
Nothing
Methods
range :: (a, a) -> [a] Source #
The list of values in the subrange defined by a bounding pair.
index :: (a, a) -> a -> Int Source #
The position of a subscript in the subrange.
inRange :: (a, a) -> a -> Bool Source #
Returns True
the given subscript lies in the range defined
the bounding pair.
range :: (GEq a, Generic a, Enum' (Rep a)) => (a, a) -> [a] Source #
The list of values in the subrange defined by a bounding pair.
index :: (GEq a, Generic a, Enum' (Rep a)) => (a, a) -> a -> Int Source #
The position of a subscript in the subrange.
inRange :: (GEq a, Generic a, Enum' (Rep a)) => (a, a) -> a -> Bool Source #
Returns True
the given subscript lies in the range defined
the bounding pair.
Instances
GIx Bool Source # | |
GIx Int Source # | |
GIx Int8 Source # | |
GIx Int16 Source # | |
GIx Int32 Source # | |
GIx Int64 Source # | |
GIx Integer Source # | |
GIx Natural Source # | |
GIx Ordering Source # | |
GIx Word Source # | |
GIx Word8 Source # | |
GIx Word16 Source # | |
GIx Word32 Source # | |
GIx Word64 Source # | |
GIx () Source # | |
GIx Associativity Source # | |
GIx Fixity Source # | |
GIx All Source # | |
GIx Any Source # | |
GIx CInt Source # | |
GIx CBool Source # | |
GIx CChar Source # | |
GIx CIntMax Source # | |
GIx CIntPtr Source # | |
GIx CLLong Source # | |
GIx CLong Source # | |
GIx CPtrdiff Source # | |
GIx CSChar Source # | |
GIx CShort Source # | |
GIx CSigAtomic Source # | |
GIx CSize Source # | |
GIx CUChar Source # | |
GIx CUInt Source # | |
GIx CUIntMax Source # | |
GIx CUIntPtr Source # | |
GIx CULLong Source # | |
GIx CULong Source # | |
GIx CUShort Source # | |
GIx CWchar Source # | |
GIx IntPtr Source # | |
GIx WordPtr Source # | |
GIx ExitCode Source # | |
GIx CMode Source # | |
GIx CBlkCnt Source # | |
GIx CBlkSize Source # | |
GIx CClockId Source # | |
GIx CFsBlkCnt Source # | |
GIx CFsFilCnt Source # | |
GIx CGid Source # | |
GIx CId Source # | |
GIx CIno Source # | |
GIx CKey Source # | |
GIx CNlink Source # | |
GIx COff Source # | |
GIx CPid Source # | |
GIx CRLim Source # | |
GIx CSsize Source # | |
GIx CTcflag Source # | |
GIx CUid Source # | |
GIx Fd Source # | |
(GEq a, GEnum a, GIx a) => GIx [a] Source # | |
(GEq a, GEnum a, GIx a) => GIx (Maybe a) Source # | |
(GEq a, GEnum a, GIx a) => GIx (NonEmpty a) Source # | |
(GEq a, GEnum a, GIx a) => GIx (First a) Source # | |
(GEq a, GEnum a, GIx a) => GIx (Last a) Source # | |
(GEq a, GEnum a, GIx a) => GIx (Dual a) Source # | |
(GEq a, GEnum a, GIx a) => GIx (Product a) Source # | |
(GEq a, GEnum a, GIx a) => GIx (Sum a) Source # | |
(GEq a, GEnum a, GIx a) => GIx (Identity a) Source # | |
(GEq a, GEnum a, GIx a) => GIx (First a) Source # | |
(GEq a, GEnum a, GIx a) => GIx (Last a) Source # | |
(GEq a, GEnum a, GIx a) => GIx (Max a) Source # | |
(GEq a, GEnum a, GIx a) => GIx (Min a) Source # | |
(GEq a, GEnum a, GIx a) => GIx (Option a) Source # | |
(GEq m, GEnum m, GIx m) => GIx (WrappedMonoid m) Source # | |
(GEq a, GEnum a, GIx a, GEq b, GEnum b, GIx b) => GIx (Either a b) Source # | |
(GEq a, GEnum a, GIx a, GEq b, GEnum b, GIx b) => GIx (a, b) Source # | |
GIx (Proxy s) Source # | |
(GEq a, GEnum a, GIx a, GEnum b) => GIx (Arg a b) Source # | |
(GEq a, GEnum a, GIx a, GEq b, GEnum b, GIx b, GEq c, GEnum c, GIx c) => GIx (a, b, c) Source # | |
(GEq (f a), GEnum (f a), GIx (f a)) => GIx (Alt f a) Source # | |
(GEq a, GEnum a, GIx a, GEq b, GEnum b, GIx b, GEq c, GEnum c, GIx c, GEq d, GEnum d, GIx d) => GIx (a, b, c, d) Source # | |
(GEq a, GEnum a, GIx a, GEq b, GEnum b, GIx b, GEq c, GEnum c, GIx c, GEq d, GEnum d, GIx d, GEq e, GEnum e, GIx e) => GIx (a, b, c, d, e) Source # | |
(GEq a, GEnum a, GIx a, GEq b, GEnum b, GIx b, GEq c, GEnum c, GIx c, GEq d, GEnum d, GIx d, GEq e, GEnum e, GIx e, GEq f, GEnum f, GIx f) => GIx (a, b, c, d, e, f) Source # | |
Defined in Generics.Deriving.Enum | |
(GEq a, GEnum a, GIx a, GEq b, GEnum b, GIx b, GEq c, GEnum c, GIx c, GEq d, GEnum d, GIx d, GEq e, GEnum e, GIx e, GEq f, GEnum f, GIx f, GEq g, GEnum g, GIx g) => GIx (a, b, c, d, e, f, g) Source # | |
Defined in Generics.Deriving.Enum |
Default definitions for GIx
rangeDefault :: (GEq a, Generic a, Enum' (Rep a)) => (a, a) -> [a] Source #
indexDefault :: (GEq a, Generic a, Enum' (Rep a)) => (a, a) -> a -> Int Source #
inRangeDefault :: (GEq a, Generic a, Enum' (Rep a)) => (a, a) -> a -> Bool Source #