generic-deriving-1.11.2: Generic programming library for generalised deriving.

Safe Haskell | Trustworthy
Language | Haskell2010

Generics.Deriving.Enum

Contents

- Generic enum class
- Default definitions for GEnum
- Internal enum class
- Generic Ix class
- Default definitions for GIx

Synopsis

- class GEnum a where
- 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
- 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

class GEnum a where Source #

Methods

genum :: [a] Source #

genum :: (Generic a, Enum' (Rep a)) => [a] Source #

Instances

GEnum Bool Source # |
Methods genum :: [Bool] Source #
GEnum Double Source # |
Methods genum :: [Double] Source #
GEnum Float Source # |
Methods genum :: [Float] Source #
GEnum Int Source # |
Methods genum :: [Int] Source #
GEnum Int8 Source # |
Methods genum :: [Int8] Source #
GEnum Int16 Source # |
Methods genum :: [Int16] Source #
GEnum Int32 Source # |
Methods genum :: [Int32] Source #
GEnum Int64 Source # |
Methods genum :: [Int64] Source #
GEnum Integer Source # |
Methods genum :: [Integer] Source #
GEnum Ordering Source # |
Methods genum :: [Ordering] Source #
GEnum Word Source # |
Methods genum :: [Word] Source #
GEnum Word8 Source # |
Methods genum :: [Word8] Source #
GEnum Word16 Source # |
Methods genum :: [Word16] Source #
GEnum Word32 Source # |
Methods genum :: [Word32] Source #
GEnum Word64 Source # |
Methods genum :: [Word64] Source #
GEnum () Source # |
Methods genum :: [()] Source #
GEnum Natural Source # |
Methods genum :: [Natural] Source #
GEnum CDev Source # |
Methods genum :: [CDev] Source #
GEnum CIno Source # |
Methods genum :: [CIno] Source #
GEnum CMode Source # |
Methods genum :: [CMode] Source #
GEnum COff Source # |
Methods genum :: [COff] Source #
GEnum CPid Source # |
Methods genum :: [CPid] Source #
GEnum CSsize Source # |
Methods genum :: [CSsize] Source #
GEnum CGid Source # |
Methods genum :: [CGid] Source #
GEnum CNlink Source # |
Methods genum :: [CNlink] Source #
GEnum CUid Source # |
Methods genum :: [CUid] Source #
GEnum CCc Source # |
Methods genum :: [CCc] Source #
GEnum CSpeed Source # |
Methods genum :: [CSpeed] Source #
GEnum CTcflag Source # |
Methods genum :: [CTcflag] Source #
GEnum CRLim Source # |
Methods genum :: [CRLim] Source #
GEnum Fd Source # |
Methods genum :: [Fd] Source #
GEnum ExitCode Source # |
Methods genum :: [ExitCode] Source #
GEnum WordPtr Source # |
Methods genum :: [WordPtr] Source #
GEnum IntPtr Source # |
Methods genum :: [IntPtr] Source #
GEnum CChar Source # |
Methods genum :: [CChar] Source #
GEnum CSChar Source # |
Methods genum :: [CSChar] Source #
GEnum CUChar Source # |
Methods genum :: [CUChar] Source #
GEnum CShort Source # |
Methods genum :: [CShort] Source #
GEnum CUShort Source # |
Methods genum :: [CUShort] Source #
GEnum CInt Source # |
Methods genum :: [CInt] Source #
GEnum CUInt Source # |
Methods genum :: [CUInt] Source #
GEnum CLong Source # |
Methods genum :: [CLong] Source #
GEnum CULong Source # |
Methods genum :: [CULong] Source #
GEnum CLLong Source # |
Methods genum :: [CLLong] Source #
GEnum CULLong Source # |
Methods genum :: [CULLong] Source #
GEnum CFloat Source # |
Methods genum :: [CFloat] Source #
GEnum CDouble Source # |
Methods genum :: [CDouble] Source #
GEnum CPtrdiff Source # |
Methods genum :: [CPtrdiff] Source #
GEnum CSize Source # |
Methods genum :: [CSize] Source #
GEnum CWchar Source # |
Methods genum :: [CWchar] Source #
GEnum CSigAtomic Source # |
Methods genum :: [CSigAtomic] Source #
GEnum CClock Source # |
Methods genum :: [CClock] Source #
GEnum CTime Source # |
Methods genum :: [CTime] Source #
GEnum CUSeconds Source # |
Methods genum :: [CUSeconds] Source #
GEnum CSUSeconds Source # |
Methods genum :: [CSUSeconds] Source #
GEnum CIntPtr Source # |
Methods genum :: [CIntPtr] Source #
GEnum CUIntPtr Source # |
Methods genum :: [CUIntPtr] Source #
GEnum CIntMax Source # |
Methods genum :: [CIntMax] Source #
GEnum CUIntMax Source # |
Methods genum :: [CUIntMax] Source #
GEnum All Source # |
Methods genum :: [All] Source #
GEnum Any Source # |
Methods genum :: [Any] Source #
GEnum Fixity Source # |
Methods genum :: [Fixity] Source #
GEnum Associativity Source # |
Methods genum :: [Associativity] Source #
GEnum a => GEnum [a] Source # |
Methods genum :: [[a]] Source #
GEnum a => GEnum (Maybe a) Source # |
Methods genum :: [Maybe a] Source #
GEnum (U1 p) Source # |
Methods genum :: [U1 p] Source #
GEnum p => GEnum (Par1 p) Source # |
Methods genum :: [Par1 p] Source #
GEnum a => GEnum (Identity a) Source # |
Methods genum :: [Identity a] Source #
GEnum a => GEnum (Min a) Source # |
Methods genum :: [Min a] Source #
GEnum a => GEnum (Max a) Source # |
Methods genum :: [Max a] Source #
GEnum a => GEnum (First a) Source # |
Methods genum :: [First a] Source #
GEnum a => GEnum (Last a) Source # |
Methods genum :: [Last a] Source #
GEnum m => GEnum (WrappedMonoid m) Source # |
Methods genum :: [WrappedMonoid m] Source #
GEnum a => GEnum (Option a) Source # |
Methods genum :: [Option a] Source #
GEnum a => GEnum (NonEmpty a) Source # |
Methods genum :: [NonEmpty a] Source #
GEnum a => GEnum (Complex a) Source # |
Methods genum :: [Complex a] Source #
GEnum a => GEnum (ZipList a) Source # |
Methods genum :: [ZipList a] Source #
GEnum a => GEnum (Dual a) Source # |
Methods genum :: [Dual a] Source #
GEnum a => GEnum (Sum a) Source # |
Methods genum :: [Sum a] Source #
GEnum a => GEnum (Product a) Source # |
Methods genum :: [Product a] Source #
GEnum a => GEnum (First a) Source # |
Methods genum :: [First a] Source #
GEnum a => GEnum (Last a) Source # |
Methods genum :: [Last a] Source #
(GEnum a, GEnum b) => GEnum (Either a b) Source # |
Methods genum :: [Either a b] Source #
GEnum (f p) => GEnum (Rec1 f p) Source # |
Methods genum :: [Rec1 f p] Source #
(GEnum a, GEnum b) => GEnum (a, b) Source # |
Methods genum :: [(a, b)] Source #
(GEnum a, GEnum b) => GEnum (Arg a b) Source # |
Methods genum :: [Arg a b] Source #
GEnum (Proxy k s) Source # |
Methods genum :: [Proxy k s] Source #
GEnum c => GEnum (K1 i c p) Source # |
Methods genum :: [K1 i c p] Source #
(GEnum (f p), GEnum (g p)) => GEnum ((:+:) f g p) Source # |
Methods genum :: [(f :+: g) p] Source #
(GEnum (f p), GEnum (g p)) => GEnum ((:*:) f g p) Source # |
Methods genum :: [(f :*: g) p] Source #
GEnum (f (g p)) => GEnum ((:.:) f g p) Source # |
Methods genum :: [(f :.: g) p] Source #
(GEnum a, GEnum b, GEnum c) => GEnum (a, b, c) Source # |
Methods genum :: [(a, b, c)] Source #
GEnum a => GEnum (Const k a b) Source # |
Methods genum :: [Const k a b] Source #
GEnum (f a) => GEnum (Alt k f a) Source # |
Methods genum :: [Alt k f a] Source #
GEnum (f p) => GEnum (M1 i c f p) Source # |
Methods genum :: [M1 i c f p] Source #
(GEnum a, GEnum b, GEnum c, GEnum d) => GEnum (a, b, c, d) Source # |
Methods genum :: [(a, b, c, d)] Source #
(GEnum a, GEnum b, GEnum c, GEnum d, GEnum e) => GEnum (a, b, c, d, e) Source # |
Methods genum :: [(a, b, c, d, e)] Source #
(GEnum a, GEnum b, GEnum c, GEnum d, GEnum e, GEnum f) => GEnum (a, b, c, d, e, f) Source # |
Methods genum :: [(a, b, c, d, e, f)] Source #
(GEnum a, GEnum b, GEnum c, GEnum d, GEnum e, GEnum f, GEnum g) => GEnum (a, b, c, d, e, f, g) Source # |
Methods genum :: [(a, b, c, d, e, f, g)] Source #

# 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

class Enum' f where Source #

Minimal complete definition

enum'

Methods

enum' :: [f a] Source #

Instances

Enum' * U1 Source # |
Methods enum' :: [f a] Source #
GEnum c => Enum' * (K1 i c) Source # |
Methods enum' :: [f a] Source #
(Enum' * f, Enum' * g) => Enum' * ((:+:) f g) Source # |
Methods enum' :: [f a] Source #
(Enum' * f, Enum' * g) => Enum' * ((:*:) f g) Source # |
Methods enum' :: [f a] Source #
Enum' * f => Enum' * (M1 i c f) Source # |
Methods enum' :: [f a] Source #

# Generic Ix class

class Ord a => GIx a where Source #

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 # |
Methods range :: (Bool, Bool) -> [Bool] Source # index :: (Bool, Bool) -> Bool -> Int Source # inRange :: (Bool, Bool) -> Bool -> Bool Source #
GIx Int Source # |
Methods range :: (Int, Int) -> [Int] Source # index :: (Int, Int) -> Int -> Int Source # inRange :: (Int, Int) -> Int -> Bool Source #
GIx Int8 Source # |
Methods range :: (Int8, Int8) -> [Int8] Source # index :: (Int8, Int8) -> Int8 -> Int Source # inRange :: (Int8, Int8) -> Int8 -> Bool Source #
GIx Int16 Source # |
Methods range :: (Int16, Int16) -> [Int16] Source # index :: (Int16, Int16) -> Int16 -> Int Source # inRange :: (Int16, Int16) -> Int16 -> Bool Source #
GIx Int32 Source # |
Methods range :: (Int32, Int32) -> [Int32] Source # index :: (Int32, Int32) -> Int32 -> Int Source # inRange :: (Int32, Int32) -> Int32 -> Bool Source #
GIx Int64 Source # |
Methods range :: (Int64, Int64) -> [Int64] Source # index :: (Int64, Int64) -> Int64 -> Int Source # inRange :: (Int64, Int64) -> Int64 -> Bool Source #
GIx Integer Source # |
Methods range :: (Integer, Integer) -> [Integer] Source # index :: (Integer, Integer) -> Integer -> Int Source # inRange :: (Integer, Integer) -> Integer -> Bool Source #
GIx Ordering Source # |
Methods range :: (Ordering, Ordering) -> [Ordering] Source # index :: (Ordering, Ordering) -> Ordering -> Int Source # inRange :: (Ordering, Ordering) -> Ordering -> Bool Source #
GIx Word Source # |
Methods range :: (Word, Word) -> [Word] Source # index :: (Word, Word) -> Word -> Int Source # inRange :: (Word, Word) -> Word -> Bool Source #
GIx Word8 Source # |
Methods range :: (Word8, Word8) -> [Word8] Source # index :: (Word8, Word8) -> Word8 -> Int Source # inRange :: (Word8, Word8) -> Word8 -> Bool Source #
GIx Word16 Source # |
Methods range :: (Word16, Word16) -> [Word16] Source # index :: (Word16, Word16) -> Word16 -> Int Source # inRange :: (Word16, Word16) -> Word16 -> Bool Source #
GIx Word32 Source # |
Methods range :: (Word32, Word32) -> [Word32] Source # index :: (Word32, Word32) -> Word32 -> Int Source # inRange :: (Word32, Word32) -> Word32 -> Bool Source #
GIx Word64 Source # |
Methods range :: (Word64, Word64) -> [Word64] Source # index :: (Word64, Word64) -> Word64 -> Int Source # inRange :: (Word64, Word64) -> Word64 -> Bool Source #
GIx () Source # |
Methods range :: ((), ()) -> [()] Source # index :: ((), ()) -> () -> Int Source # inRange :: ((), ()) -> () -> Bool Source #
GIx Natural Source # |
Methods range :: (Natural, Natural) -> [Natural] Source # index :: (Natural, Natural) -> Natural -> Int Source # inRange :: (Natural, Natural) -> Natural -> Bool Source #
GIx CIno Source # |
Methods range :: (CIno, CIno) -> [CIno] Source # index :: (CIno, CIno) -> CIno -> Int Source # inRange :: (CIno, CIno) -> CIno -> Bool Source #
GIx CMode Source # |
Methods range :: (CMode, CMode) -> [CMode] Source # index :: (CMode, CMode) -> CMode -> Int Source # inRange :: (CMode, CMode) -> CMode -> Bool Source #
GIx COff Source # |
Methods range :: (COff, COff) -> [COff] Source # index :: (COff, COff) -> COff -> Int Source # inRange :: (COff, COff) -> COff -> Bool Source #
GIx CPid Source # |
Methods range :: (CPid, CPid) -> [CPid] Source # index :: (CPid, CPid) -> CPid -> Int Source # inRange :: (CPid, CPid) -> CPid -> Bool Source #
GIx CSsize Source # |
Methods range :: (CSsize, CSsize) -> [CSsize] Source # index :: (CSsize, CSsize) -> CSsize -> Int Source # inRange :: (CSsize, CSsize) -> CSsize -> Bool Source #
GIx CGid Source # |
Methods range :: (CGid, CGid) -> [CGid] Source # index :: (CGid, CGid) -> CGid -> Int Source # inRange :: (CGid, CGid) -> CGid -> Bool Source #
GIx CNlink Source # |
Methods range :: (CNlink, CNlink) -> [CNlink] Source # index :: (CNlink, CNlink) -> CNlink -> Int Source # inRange :: (CNlink, CNlink) -> CNlink -> Bool Source #
GIx CUid Source # |
Methods range :: (CUid, CUid) -> [CUid] Source # index :: (CUid, CUid) -> CUid -> Int Source # inRange :: (CUid, CUid) -> CUid -> Bool Source #
GIx CTcflag Source # |
Methods range :: (CTcflag, CTcflag) -> [CTcflag] Source # index :: (CTcflag, CTcflag) -> CTcflag -> Int Source # inRange :: (CTcflag, CTcflag) -> CTcflag -> Bool Source #
GIx CRLim Source # |
Methods range :: (CRLim, CRLim) -> [CRLim] Source # index :: (CRLim, CRLim) -> CRLim -> Int Source # inRange :: (CRLim, CRLim) -> CRLim -> Bool Source #
GIx Fd Source # |
Methods range :: (Fd, Fd) -> [Fd] Source # index :: (Fd, Fd) -> Fd -> Int Source # inRange :: (Fd, Fd) -> Fd -> Bool Source #
GIx ExitCode Source # |
Methods range :: (ExitCode, ExitCode) -> [ExitCode] Source # index :: (ExitCode, ExitCode) -> ExitCode -> Int Source # inRange :: (ExitCode, ExitCode) -> ExitCode -> Bool Source #
GIx WordPtr Source # |
Methods range :: (WordPtr, WordPtr) -> [WordPtr] Source # index :: (WordPtr, WordPtr) -> WordPtr -> Int Source # inRange :: (WordPtr, WordPtr) -> WordPtr -> Bool Source #
GIx IntPtr Source # |
Methods range :: (IntPtr, IntPtr) -> [IntPtr] Source # index :: (IntPtr, IntPtr) -> IntPtr -> Int Source # inRange :: (IntPtr, IntPtr) -> IntPtr -> Bool Source #
GIx CChar Source # |
Methods range :: (CChar, CChar) -> [CChar] Source # index :: (CChar, CChar) -> CChar -> Int Source # inRange :: (CChar, CChar) -> CChar -> Bool Source #
GIx CSChar Source # |
Methods range :: (CSChar, CSChar) -> [CSChar] Source # index :: (CSChar, CSChar) -> CSChar -> Int Source # inRange :: (CSChar, CSChar) -> CSChar -> Bool Source #
GIx CUChar Source # |
Methods range :: (CUChar, CUChar) -> [CUChar] Source # index :: (CUChar, CUChar) -> CUChar -> Int Source # inRange :: (CUChar, CUChar) -> CUChar -> Bool Source #
GIx CShort Source # |
Methods range :: (CShort, CShort) -> [CShort] Source # index :: (CShort, CShort) -> CShort -> Int Source # inRange :: (CShort, CShort) -> CShort -> Bool Source #
GIx CUShort Source # |
Methods range :: (CUShort, CUShort) -> [CUShort] Source # index :: (CUShort, CUShort) -> CUShort -> Int Source # inRange :: (CUShort, CUShort) -> CUShort -> Bool Source #
GIx CInt Source # |
Methods range :: (CInt, CInt) -> [CInt] Source # index :: (CInt, CInt) -> CInt -> Int Source # inRange :: (CInt, CInt) -> CInt -> Bool Source #
GIx CUInt Source # |
Methods range :: (CUInt, CUInt) -> [CUInt] Source # index :: (CUInt, CUInt) -> CUInt -> Int Source # inRange :: (CUInt, CUInt) -> CUInt -> Bool Source #
GIx CLong Source # |
Methods range :: (CLong, CLong) -> [CLong] Source # index :: (CLong, CLong) -> CLong -> Int Source # inRange :: (CLong, CLong) -> CLong -> Bool Source #
GIx CULong Source # |
Methods range :: (CULong, CULong) -> [CULong] Source # index :: (CULong, CULong) -> CULong -> Int Source # inRange :: (CULong, CULong) -> CULong -> Bool Source #
GIx CLLong Source # |
Methods range :: (CLLong, CLLong) -> [CLLong] Source # index :: (CLLong, CLLong) -> CLLong -> Int Source # inRange :: (CLLong, CLLong) -> CLLong -> Bool Source #
GIx CULLong Source # |
Methods range :: (CULLong, CULLong) -> [CULLong] Source # index :: (CULLong, CULLong) -> CULLong -> Int Source # inRange :: (CULLong, CULLong) -> CULLong -> Bool Source #
GIx CPtrdiff Source # |
Methods range :: (CPtrdiff, CPtrdiff) -> [CPtrdiff] Source # index :: (CPtrdiff, CPtrdiff) -> CPtrdiff -> Int Source # inRange :: (CPtrdiff, CPtrdiff) -> CPtrdiff -> Bool Source #
GIx CSize Source # |
Methods range :: (CSize, CSize) -> [CSize] Source # index :: (CSize, CSize) -> CSize -> Int Source # inRange :: (CSize, CSize) -> CSize -> Bool Source #
GIx CWchar Source # |
Methods range :: (CWchar, CWchar) -> [CWchar] Source # index :: (CWchar, CWchar) -> CWchar -> Int Source # inRange :: (CWchar, CWchar) -> CWchar -> Bool Source #
GIx CSigAtomic Source # |
Methods range :: (CSigAtomic, CSigAtomic) -> [CSigAtomic] Source # index :: (CSigAtomic, CSigAtomic) -> CSigAtomic -> Int Source # inRange :: (CSigAtomic, CSigAtomic) -> CSigAtomic -> Bool Source #
GIx CIntPtr Source # |
Methods range :: (CIntPtr, CIntPtr) -> [CIntPtr] Source # index :: (CIntPtr, CIntPtr) -> CIntPtr -> Int Source # inRange :: (CIntPtr, CIntPtr) -> CIntPtr -> Bool Source #
GIx CUIntPtr Source # |
Methods range :: (CUIntPtr, CUIntPtr) -> [CUIntPtr] Source # index :: (CUIntPtr, CUIntPtr) -> CUIntPtr -> Int Source # inRange :: (CUIntPtr, CUIntPtr) -> CUIntPtr -> Bool Source #
GIx CIntMax Source # |
Methods range :: (CIntMax, CIntMax) -> [CIntMax] Source # index :: (CIntMax, CIntMax) -> CIntMax -> Int Source # inRange :: (CIntMax, CIntMax) -> CIntMax -> Bool Source #
GIx CUIntMax Source # |
Methods range :: (CUIntMax, CUIntMax) -> [CUIntMax] Source # index :: (CUIntMax, CUIntMax) -> CUIntMax -> Int Source # inRange :: (CUIntMax, CUIntMax) -> CUIntMax -> Bool Source #
GIx All Source # |
Methods range :: (All, All) -> [All] Source # index :: (All, All) -> All -> Int Source # inRange :: (All, All) -> All -> Bool Source #
GIx Any Source # |
Methods range :: (Any, Any) -> [Any] Source # index :: (Any, Any) -> Any -> Int Source # inRange :: (Any, Any) -> Any -> Bool Source #
GIx Fixity Source # |
Methods range :: (Fixity, Fixity) -> [Fixity] Source # index :: (Fixity, Fixity) -> Fixity -> Int Source # inRange :: (Fixity, Fixity) -> Fixity -> Bool Source #
GIx Associativity Source # |
Methods range :: (Associativity, Associativity) -> [Associativity] Source # index :: (Associativity, Associativity) -> Associativity -> Int Source # inRange :: (Associativity, Associativity) -> Associativity -> Bool Source #
(GEq a, GEnum a, GIx a) => GIx [a] Source # |
Methods range :: ([a], [a]) -> [[a]] Source # index :: ([a], [a]) -> [a] -> Int Source # inRange :: ([a], [a]) -> [a] -> Bool Source #
(GEq a, GEnum a, GIx a) => GIx (Maybe a) Source # |
Methods range :: (Maybe a, Maybe a) -> [Maybe a] Source # index :: (Maybe a, Maybe a) -> Maybe a -> Int Source # inRange :: (Maybe a, Maybe a) -> Maybe a -> Bool Source #
(GEq a, GEnum a, GIx a) => GIx (Identity a) Source # |
Methods range :: (Identity a, Identity a) -> [Identity a] Source # index :: (Identity a, Identity a) -> Identity a -> Int Source # inRange :: (Identity a, Identity a) -> Identity a -> Bool Source #
(GEq a, GEnum a, GIx a) => GIx (Min a) Source # |
Methods range :: (Min a, Min a) -> [Min a] Source # index :: (Min a, Min a) -> Min a -> Int Source # inRange :: (Min a, Min a) -> Min a -> Bool Source #
(GEq a, GEnum a, GIx a) => GIx (Max a) Source # |
Methods range :: (Max a, Max a) -> [Max a] Source # index :: (Max a, Max a) -> Max a -> Int Source # inRange :: (Max a, Max a) -> Max a -> Bool Source #
(GEq a, GEnum a, GIx a) => GIx (First a) Source # |
Methods range :: (First a, First a) -> [First a] Source # index :: (First a, First a) -> First a -> Int Source # inRange :: (First a, First a) -> First a -> Bool Source #
(GEq a, GEnum a, GIx a) => GIx (Last a) Source # |
Methods range :: (Last a, Last a) -> [Last a] Source # index :: (Last a, Last a) -> Last a -> Int Source # inRange :: (Last a, Last a) -> Last a -> Bool Source #
(GEq m, GEnum m, GIx m) => GIx (WrappedMonoid m) Source # |
Methods range :: (WrappedMonoid m, WrappedMonoid m) -> [WrappedMonoid m] Source # index :: (WrappedMonoid m, WrappedMonoid m) -> WrappedMonoid m -> Int Source # inRange :: (WrappedMonoid m, WrappedMonoid m) -> WrappedMonoid m -> Bool Source #
(GEq a, GEnum a, GIx a) => GIx (Option a) Source # |
Methods range :: (Option a, Option a) -> [Option a] Source # index :: (Option a, Option a) -> Option a -> Int Source # inRange :: (Option a, Option a) -> Option a -> Bool Source #
(GEq a, GEnum a, GIx a) => GIx (NonEmpty a) Source # |
Methods range :: (NonEmpty a, NonEmpty a) -> [NonEmpty a] Source # index :: (NonEmpty a, NonEmpty a) -> NonEmpty a -> Int Source # inRange :: (NonEmpty a, NonEmpty a) -> NonEmpty a -> Bool Source #
(GEq a, GEnum a, GIx a) => GIx (Dual a) Source # |
Methods range :: (Dual a, Dual a) -> [Dual a] Source # index :: (Dual a, Dual a) -> Dual a -> Int Source # inRange :: (Dual a, Dual a) -> Dual a -> Bool Source #
(GEq a, GEnum a, GIx a) => GIx (Sum a) Source # |
Methods range :: (Sum a, Sum a) -> [Sum a] Source # index :: (Sum a, Sum a) -> Sum a -> Int Source # inRange :: (Sum a, Sum a) -> Sum a -> Bool Source #
(GEq a, GEnum a, GIx a) => GIx (Product a) Source # |
Methods range :: (Product a, Product a) -> [Product a] Source # index :: (Product a, Product a) -> Product a -> Int Source # inRange :: (Product a, Product a) -> Product a -> Bool Source #
(GEq a, GEnum a, GIx a) => GIx (First a) Source # |
Methods range :: (First a, First a) -> [First a] Source # index :: (First a, First a) -> First a -> Int Source # inRange :: (First a, First a) -> First a -> Bool Source #
(GEq a, GEnum a, GIx a) => GIx (Last a) Source # |
Methods range :: (Last a, Last a) -> [Last a] Source # index :: (Last a, Last a) -> Last a -> Int Source # inRange :: (Last a, Last a) -> Last a -> Bool Source #
(GEq a, GEnum a, GIx a, GEq b, GEnum b, GIx b) => GIx (Either a b) Source # |
Methods range :: (Either a b, Either a b) -> [Either a b] Source # index :: (Either a b, Either a b) -> Either a b -> Int Source # inRange :: (Either a b, Either a b) -> Either a b -> Bool Source #
(GEq a, GEnum a, GIx a, GEq b, GEnum b, GIx b) => GIx (a, b) Source # |
Methods range :: ((a, b), (a, b)) -> [(a, b)] Source # index :: ((a, b), (a, b)) -> (a, b) -> Int Source # inRange :: ((a, b), (a, b)) -> (a, b) -> Bool Source #
(GEq a, GEnum a, GIx a, GEnum b) => GIx (Arg a b) Source # |
Methods range :: (Arg a b, Arg a b) -> [Arg a b] Source # index :: (Arg a b, Arg a b) -> Arg a b -> Int Source # inRange :: (Arg a b, Arg a b) -> Arg a b -> Bool Source #
GIx (Proxy k s) Source # |
Methods range :: (Proxy k s, Proxy k s) -> [Proxy k s] Source # index :: (Proxy k s, Proxy k s) -> Proxy k s -> Int Source # inRange :: (Proxy k s, Proxy k s) -> Proxy k s -> Bool Source #
(GEq a, GEnum a, GIx a, GEq b, GEnum b, GIx b, GEq c, GEnum c, GIx c) => GIx (a, b, c) Source # |
Methods range :: ((a, b, c), (a, b, c)) -> [(a, b, c)] Source # index :: ((a, b, c), (a, b, c)) -> (a, b, c) -> Int Source # inRange :: ((a, b, c), (a, b, c)) -> (a, b, c) -> Bool Source #
(GEq (f a), GEnum (f a), GIx (f a)) => GIx (Alt k f a) Source # |
Methods range :: (Alt k f a, Alt k f a) -> [Alt k f a] Source # index :: (Alt k f a, Alt k f a) -> Alt k f a -> Int Source # inRange :: (Alt k f a, Alt k f a) -> Alt k f a -> Bool 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 # |
Methods range :: ((a, b, c, d), (a, b, c, d)) -> [(a, b, c, d)] Source # index :: ((a, b, c, d), (a, b, c, d)) -> (a, b, c, d) -> Int Source # inRange :: ((a, b, c, d), (a, b, c, d)) -> (a, b, c, d) -> Bool 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 # |
Methods range :: ((a, b, c, d, e), (a, b, c, d, e)) -> [(a, b, c, d, e)] Source # index :: ((a, b, c, d, e), (a, b, c, d, e)) -> (a, b, c, d, e) -> Int Source # inRange :: ((a, b, c, d, e), (a, b, c, d, e)) -> (a, b, c, d, e) -> Bool 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 # |
Methods range :: ((a, b, c, d, e, f), (a, b, c, d, e, f)) -> [(a, b, c, d, e, f)] Source # index :: ((a, b, c, d, e, f), (a, b, c, d, e, f)) -> (a, b, c, d, e, f) -> Int Source # inRange :: ((a, b, c, d, e, f), (a, b, c, d, e, f)) -> (a, b, c, d, e, f) -> Bool 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, GEq g, GEnum g, GIx g) => GIx (a, b, c, d, e, f, g) Source # |
Methods range :: ((a, b, c, d, e, f, g), (a, b, c, d, e, f, g)) -> [(a, b, c, d, e, f, g)] Source # index :: ((a, b, c, d, e, f, g), (a, b, c, d, e, f, g)) -> (a, b, c, d, e, f, g) -> Int Source # inRange :: ((a, b, c, d, e, f, g), (a, b, c, d, e, f, g)) -> (a, b, c, d, e, f, g) -> Bool Source #

# 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 #