| Copyright | (c) The University of Glasgow 1992-2002 |
|---|---|
| License | see libraries/base/LICENSE |
| Maintainer | ghc-devs@haskell.org |
| Stability | stable |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Data.Enum
Description
The Enum class.
Since: base-4.20.0.0
Documentation
Class Enum defines operations on sequentially ordered types.
The enumFrom... methods are used in Haskell's translation of
arithmetic sequences.
Instances of Enum may be derived for any enumeration type (types
whose constructors have no fields). The nullary constructors are
assumed to be numbered left-to-right by fromEnum from 0 through n-1.
See Chapter 10 of the Haskell Report for more details.
For any type that is an instance of class Bounded as well as Enum,
the following should hold:
- The calls
andsuccmaxBoundshould result in a runtime error.predminBound fromEnumandtoEnumshould give a runtime error if the result value is not representable in the result type. For example,is an error.toEnum7 ::BoolenumFromandenumFromThenshould be defined with an implicit bound, thus:
enumFrom x = enumFromTo x maxBound
enumFromThen x y = enumFromThenTo x y bound
where
bound | fromEnum y >= fromEnum x = maxBound
| otherwise = minBoundMethods
Successor of a value. For numeric types, succ adds 1.
Predecessor of a value. For numeric types, pred subtracts 1.
Convert from an Int.
Convert to an Int.
It is implementation-dependent what fromEnum returns when
applied to a value that is too large to fit in an Int.
Used in Haskell's translation of [n..] with [n..] = enumFrom n,
a possible implementation being enumFrom n = n : enumFrom (succ n).
Examples
enumFrom 4 :: [Integer] = [4,5,6,7,...]
enumFrom 6 :: [Int] = [6,7,8,9,...,maxBound :: Int]
enumFromThen :: a -> a -> [a] Source #
Used in Haskell's translation of [n,n'..]
with [n,n'..] = enumFromThen n n', a possible implementation being
enumFromThen n n' = n : n' : worker (f x) (f x n'),
worker s v = v : worker s (s v), x = fromEnum n' - fromEnum n and
f n y
| n > 0 = f (n - 1) (succ y)
| n < 0 = f (n + 1) (pred y)
| otherwise = y
Examples
enumFromThen 4 6 :: [Integer] = [4,6,8,10...]
enumFromThen 6 2 :: [Int] = [6,2,-2,-6,...,minBound :: Int]
enumFromTo :: a -> a -> [a] Source #
Used in Haskell's translation of [n..m] with
[n..m] = enumFromTo n m, a possible implementation being
enumFromTo n m
| n <= m = n : enumFromTo (succ n) m
| otherwise = []
Examples
enumFromTo 6 10 :: [Int] = [6,7,8,9,10]
enumFromTo 42 1 :: [Integer] = []
enumFromThenTo :: a -> a -> a -> [a] Source #
Used in Haskell's translation of [n,n'..m] with
[n,n'..m] = enumFromThenTo n n' m, a possible implementation
being enumFromThenTo n n' m = worker (f x) (c x) n m,
x = fromEnum n' - fromEnum n, c x = bool (>=) ((x 0)
f n y
| n > 0 = f (n - 1) (succ y)
| n < 0 = f (n + 1) (pred y)
| otherwise = y
and
worker s c v m
| c v m = v : worker s c (s v) m
| otherwise = []
Examples
enumFromThenTo 4 2 -6 :: [Integer] = [4,2,0,-2,-4,-6]
enumFromThenTo 6 8 2 :: [Int] = []
Instances
| Enum IoManagerFlag Source # | |
Defined in GHC.RTS.Flags Methods succ :: IoManagerFlag -> IoManagerFlag Source # pred :: IoManagerFlag -> IoManagerFlag Source # toEnum :: Int -> IoManagerFlag Source # fromEnum :: IoManagerFlag -> Int Source # enumFrom :: IoManagerFlag -> [IoManagerFlag] Source # enumFromThen :: IoManagerFlag -> IoManagerFlag -> [IoManagerFlag] Source # enumFromTo :: IoManagerFlag -> IoManagerFlag -> [IoManagerFlag] Source # enumFromThenTo :: IoManagerFlag -> IoManagerFlag -> IoManagerFlag -> [IoManagerFlag] Source # | |
| Enum ByteOrder Source # | Since: base-4.11.0.0 |
Defined in GHC.Internal.ByteOrder Methods succ :: ByteOrder -> ByteOrder Source # pred :: ByteOrder -> ByteOrder Source # toEnum :: Int -> ByteOrder Source # fromEnum :: ByteOrder -> Int Source # enumFrom :: ByteOrder -> [ByteOrder] Source # enumFromThen :: ByteOrder -> ByteOrder -> [ByteOrder] Source # enumFromTo :: ByteOrder -> ByteOrder -> [ByteOrder] Source # enumFromThenTo :: ByteOrder -> ByteOrder -> ByteOrder -> [ByteOrder] Source # | |
| Enum ClosureType Source # | |
Defined in GHC.Internal.ClosureTypes Methods succ :: ClosureType -> ClosureType Source # pred :: ClosureType -> ClosureType Source # toEnum :: Int -> ClosureType Source # fromEnum :: ClosureType -> Int Source # enumFrom :: ClosureType -> [ClosureType] Source # enumFromThen :: ClosureType -> ClosureType -> [ClosureType] Source # enumFromTo :: ClosureType -> ClosureType -> [ClosureType] Source # enumFromThenTo :: ClosureType -> ClosureType -> ClosureType -> [ClosureType] Source # | |
| Enum CBool Source # | |
Defined in GHC.Internal.Foreign.C.Types Methods succ :: CBool -> CBool Source # pred :: CBool -> CBool Source # toEnum :: Int -> CBool Source # fromEnum :: CBool -> Int Source # enumFrom :: CBool -> [CBool] Source # enumFromThen :: CBool -> CBool -> [CBool] Source # enumFromTo :: CBool -> CBool -> [CBool] Source # enumFromThenTo :: CBool -> CBool -> CBool -> [CBool] Source # | |
| Enum CChar Source # | |
Defined in GHC.Internal.Foreign.C.Types Methods succ :: CChar -> CChar Source # pred :: CChar -> CChar Source # toEnum :: Int -> CChar Source # fromEnum :: CChar -> Int Source # enumFrom :: CChar -> [CChar] Source # enumFromThen :: CChar -> CChar -> [CChar] Source # enumFromTo :: CChar -> CChar -> [CChar] Source # enumFromThenTo :: CChar -> CChar -> CChar -> [CChar] Source # | |
| Enum CClock Source # | |
Defined in GHC.Internal.Foreign.C.Types Methods succ :: CClock -> CClock Source # pred :: CClock -> CClock Source # toEnum :: Int -> CClock Source # fromEnum :: CClock -> Int Source # enumFrom :: CClock -> [CClock] Source # enumFromThen :: CClock -> CClock -> [CClock] Source # enumFromTo :: CClock -> CClock -> [CClock] Source # enumFromThenTo :: CClock -> CClock -> CClock -> [CClock] Source # | |
| Enum CDouble Source # | |
Defined in GHC.Internal.Foreign.C.Types Methods succ :: CDouble -> CDouble Source # pred :: CDouble -> CDouble Source # toEnum :: Int -> CDouble Source # fromEnum :: CDouble -> Int Source # enumFrom :: CDouble -> [CDouble] Source # enumFromThen :: CDouble -> CDouble -> [CDouble] Source # enumFromTo :: CDouble -> CDouble -> [CDouble] Source # enumFromThenTo :: CDouble -> CDouble -> CDouble -> [CDouble] Source # | |
| Enum CFloat Source # | |
Defined in GHC.Internal.Foreign.C.Types Methods succ :: CFloat -> CFloat Source # pred :: CFloat -> CFloat Source # toEnum :: Int -> CFloat Source # fromEnum :: CFloat -> Int Source # enumFrom :: CFloat -> [CFloat] Source # enumFromThen :: CFloat -> CFloat -> [CFloat] Source # enumFromTo :: CFloat -> CFloat -> [CFloat] Source # enumFromThenTo :: CFloat -> CFloat -> CFloat -> [CFloat] Source # | |
| Enum CInt Source # | |
| Enum CIntMax Source # | |
Defined in GHC.Internal.Foreign.C.Types Methods succ :: CIntMax -> CIntMax Source # pred :: CIntMax -> CIntMax Source # toEnum :: Int -> CIntMax Source # fromEnum :: CIntMax -> Int Source # enumFrom :: CIntMax -> [CIntMax] Source # enumFromThen :: CIntMax -> CIntMax -> [CIntMax] Source # enumFromTo :: CIntMax -> CIntMax -> [CIntMax] Source # enumFromThenTo :: CIntMax -> CIntMax -> CIntMax -> [CIntMax] Source # | |
| Enum CIntPtr Source # | |
Defined in GHC.Internal.Foreign.C.Types Methods succ :: CIntPtr -> CIntPtr Source # pred :: CIntPtr -> CIntPtr Source # toEnum :: Int -> CIntPtr Source # fromEnum :: CIntPtr -> Int Source # enumFrom :: CIntPtr -> [CIntPtr] Source # enumFromThen :: CIntPtr -> CIntPtr -> [CIntPtr] Source # enumFromTo :: CIntPtr -> CIntPtr -> [CIntPtr] Source # enumFromThenTo :: CIntPtr -> CIntPtr -> CIntPtr -> [CIntPtr] Source # | |
| Enum CLLong Source # | |
Defined in GHC.Internal.Foreign.C.Types Methods succ :: CLLong -> CLLong Source # pred :: CLLong -> CLLong Source # toEnum :: Int -> CLLong Source # fromEnum :: CLLong -> Int Source # enumFrom :: CLLong -> [CLLong] Source # enumFromThen :: CLLong -> CLLong -> [CLLong] Source # enumFromTo :: CLLong -> CLLong -> [CLLong] Source # enumFromThenTo :: CLLong -> CLLong -> CLLong -> [CLLong] Source # | |
| Enum CLong Source # | |
Defined in GHC.Internal.Foreign.C.Types Methods succ :: CLong -> CLong Source # pred :: CLong -> CLong Source # toEnum :: Int -> CLong Source # fromEnum :: CLong -> Int Source # enumFrom :: CLong -> [CLong] Source # enumFromThen :: CLong -> CLong -> [CLong] Source # enumFromTo :: CLong -> CLong -> [CLong] Source # enumFromThenTo :: CLong -> CLong -> CLong -> [CLong] Source # | |
| Enum CPtrdiff Source # | |
Defined in GHC.Internal.Foreign.C.Types Methods succ :: CPtrdiff -> CPtrdiff Source # pred :: CPtrdiff -> CPtrdiff Source # toEnum :: Int -> CPtrdiff Source # fromEnum :: CPtrdiff -> Int Source # enumFrom :: CPtrdiff -> [CPtrdiff] Source # enumFromThen :: CPtrdiff -> CPtrdiff -> [CPtrdiff] Source # enumFromTo :: CPtrdiff -> CPtrdiff -> [CPtrdiff] Source # enumFromThenTo :: CPtrdiff -> CPtrdiff -> CPtrdiff -> [CPtrdiff] Source # | |
| Enum CSChar Source # | |
Defined in GHC.Internal.Foreign.C.Types Methods succ :: CSChar -> CSChar Source # pred :: CSChar -> CSChar Source # toEnum :: Int -> CSChar Source # fromEnum :: CSChar -> Int Source # enumFrom :: CSChar -> [CSChar] Source # enumFromThen :: CSChar -> CSChar -> [CSChar] Source # enumFromTo :: CSChar -> CSChar -> [CSChar] Source # enumFromThenTo :: CSChar -> CSChar -> CSChar -> [CSChar] Source # | |
| Enum CSUSeconds Source # | |
Defined in GHC.Internal.Foreign.C.Types Methods succ :: CSUSeconds -> CSUSeconds Source # pred :: CSUSeconds -> CSUSeconds Source # toEnum :: Int -> CSUSeconds Source # fromEnum :: CSUSeconds -> Int Source # enumFrom :: CSUSeconds -> [CSUSeconds] Source # enumFromThen :: CSUSeconds -> CSUSeconds -> [CSUSeconds] Source # enumFromTo :: CSUSeconds -> CSUSeconds -> [CSUSeconds] Source # enumFromThenTo :: CSUSeconds -> CSUSeconds -> CSUSeconds -> [CSUSeconds] Source # | |
| Enum CShort Source # | |
Defined in GHC.Internal.Foreign.C.Types Methods succ :: CShort -> CShort Source # pred :: CShort -> CShort Source # toEnum :: Int -> CShort Source # fromEnum :: CShort -> Int Source # enumFrom :: CShort -> [CShort] Source # enumFromThen :: CShort -> CShort -> [CShort] Source # enumFromTo :: CShort -> CShort -> [CShort] Source # enumFromThenTo :: CShort -> CShort -> CShort -> [CShort] Source # | |
| Enum CSigAtomic Source # | |
Defined in GHC.Internal.Foreign.C.Types Methods succ :: CSigAtomic -> CSigAtomic Source # pred :: CSigAtomic -> CSigAtomic Source # toEnum :: Int -> CSigAtomic Source # fromEnum :: CSigAtomic -> Int Source # enumFrom :: CSigAtomic -> [CSigAtomic] Source # enumFromThen :: CSigAtomic -> CSigAtomic -> [CSigAtomic] Source # enumFromTo :: CSigAtomic -> CSigAtomic -> [CSigAtomic] Source # enumFromThenTo :: CSigAtomic -> CSigAtomic -> CSigAtomic -> [CSigAtomic] Source # | |
| Enum CSize Source # | |
Defined in GHC.Internal.Foreign.C.Types Methods succ :: CSize -> CSize Source # pred :: CSize -> CSize Source # toEnum :: Int -> CSize Source # fromEnum :: CSize -> Int Source # enumFrom :: CSize -> [CSize] Source # enumFromThen :: CSize -> CSize -> [CSize] Source # enumFromTo :: CSize -> CSize -> [CSize] Source # enumFromThenTo :: CSize -> CSize -> CSize -> [CSize] Source # | |
| Enum CTime Source # | |
Defined in GHC.Internal.Foreign.C.Types Methods succ :: CTime -> CTime Source # pred :: CTime -> CTime Source # toEnum :: Int -> CTime Source # fromEnum :: CTime -> Int Source # enumFrom :: CTime -> [CTime] Source # enumFromThen :: CTime -> CTime -> [CTime] Source # enumFromTo :: CTime -> CTime -> [CTime] Source # enumFromThenTo :: CTime -> CTime -> CTime -> [CTime] Source # | |
| Enum CUChar Source # | |
Defined in GHC.Internal.Foreign.C.Types Methods succ :: CUChar -> CUChar Source # pred :: CUChar -> CUChar Source # toEnum :: Int -> CUChar Source # fromEnum :: CUChar -> Int Source # enumFrom :: CUChar -> [CUChar] Source # enumFromThen :: CUChar -> CUChar -> [CUChar] Source # enumFromTo :: CUChar -> CUChar -> [CUChar] Source # enumFromThenTo :: CUChar -> CUChar -> CUChar -> [CUChar] Source # | |
| Enum CUInt Source # | |
Defined in GHC.Internal.Foreign.C.Types Methods succ :: CUInt -> CUInt Source # pred :: CUInt -> CUInt Source # toEnum :: Int -> CUInt Source # fromEnum :: CUInt -> Int Source # enumFrom :: CUInt -> [CUInt] Source # enumFromThen :: CUInt -> CUInt -> [CUInt] Source # enumFromTo :: CUInt -> CUInt -> [CUInt] Source # enumFromThenTo :: CUInt -> CUInt -> CUInt -> [CUInt] Source # | |
| Enum CUIntMax Source # | |
Defined in GHC.Internal.Foreign.C.Types Methods succ :: CUIntMax -> CUIntMax Source # pred :: CUIntMax -> CUIntMax Source # toEnum :: Int -> CUIntMax Source # fromEnum :: CUIntMax -> Int Source # enumFrom :: CUIntMax -> [CUIntMax] Source # enumFromThen :: CUIntMax -> CUIntMax -> [CUIntMax] Source # enumFromTo :: CUIntMax -> CUIntMax -> [CUIntMax] Source # enumFromThenTo :: CUIntMax -> CUIntMax -> CUIntMax -> [CUIntMax] Source # | |
| Enum CUIntPtr Source # | |
Defined in GHC.Internal.Foreign.C.Types Methods succ :: CUIntPtr -> CUIntPtr Source # pred :: CUIntPtr -> CUIntPtr Source # toEnum :: Int -> CUIntPtr Source # fromEnum :: CUIntPtr -> Int Source # enumFrom :: CUIntPtr -> [CUIntPtr] Source # enumFromThen :: CUIntPtr -> CUIntPtr -> [CUIntPtr] Source # enumFromTo :: CUIntPtr -> CUIntPtr -> [CUIntPtr] Source # enumFromThenTo :: CUIntPtr -> CUIntPtr -> CUIntPtr -> [CUIntPtr] Source # | |
| Enum CULLong Source # | |
Defined in GHC.Internal.Foreign.C.Types Methods succ :: CULLong -> CULLong Source # pred :: CULLong -> CULLong Source # toEnum :: Int -> CULLong Source # fromEnum :: CULLong -> Int Source # enumFrom :: CULLong -> [CULLong] Source # enumFromThen :: CULLong -> CULLong -> [CULLong] Source # enumFromTo :: CULLong -> CULLong -> [CULLong] Source # enumFromThenTo :: CULLong -> CULLong -> CULLong -> [CULLong] Source # | |
| Enum CULong Source # | |
Defined in GHC.Internal.Foreign.C.Types Methods succ :: CULong -> CULong Source # pred :: CULong -> CULong Source # toEnum :: Int -> CULong Source # fromEnum :: CULong -> Int Source # enumFrom :: CULong -> [CULong] Source # enumFromThen :: CULong -> CULong -> [CULong] Source # enumFromTo :: CULong -> CULong -> [CULong] Source # enumFromThenTo :: CULong -> CULong -> CULong -> [CULong] Source # | |
| Enum CUSeconds Source # | |
Defined in GHC.Internal.Foreign.C.Types Methods succ :: CUSeconds -> CUSeconds Source # pred :: CUSeconds -> CUSeconds Source # toEnum :: Int -> CUSeconds Source # fromEnum :: CUSeconds -> Int Source # enumFrom :: CUSeconds -> [CUSeconds] Source # enumFromThen :: CUSeconds -> CUSeconds -> [CUSeconds] Source # enumFromTo :: CUSeconds -> CUSeconds -> [CUSeconds] Source # enumFromThenTo :: CUSeconds -> CUSeconds -> CUSeconds -> [CUSeconds] Source # | |
| Enum CUShort Source # | |
Defined in GHC.Internal.Foreign.C.Types Methods succ :: CUShort -> CUShort Source # pred :: CUShort -> CUShort Source # toEnum :: Int -> CUShort Source # fromEnum :: CUShort -> Int Source # enumFrom :: CUShort -> [CUShort] Source # enumFromThen :: CUShort -> CUShort -> [CUShort] Source # enumFromTo :: CUShort -> CUShort -> [CUShort] Source # enumFromThenTo :: CUShort -> CUShort -> CUShort -> [CUShort] Source # | |
| Enum CWchar Source # | |
Defined in GHC.Internal.Foreign.C.Types Methods succ :: CWchar -> CWchar Source # pred :: CWchar -> CWchar Source # toEnum :: Int -> CWchar Source # fromEnum :: CWchar -> Int Source # enumFrom :: CWchar -> [CWchar] Source # enumFromThen :: CWchar -> CWchar -> [CWchar] Source # enumFromTo :: CWchar -> CWchar -> [CWchar] Source # enumFromThenTo :: CWchar -> CWchar -> CWchar -> [CWchar] Source # | |
| Enum IntPtr Source # | |
Defined in GHC.Internal.Foreign.Ptr Methods succ :: IntPtr -> IntPtr Source # pred :: IntPtr -> IntPtr Source # toEnum :: Int -> IntPtr Source # fromEnum :: IntPtr -> Int Source # enumFrom :: IntPtr -> [IntPtr] Source # enumFromThen :: IntPtr -> IntPtr -> [IntPtr] Source # enumFromTo :: IntPtr -> IntPtr -> [IntPtr] Source # enumFromThenTo :: IntPtr -> IntPtr -> IntPtr -> [IntPtr] Source # | |
| Enum WordPtr Source # | |
Defined in GHC.Internal.Foreign.Ptr Methods succ :: WordPtr -> WordPtr Source # pred :: WordPtr -> WordPtr Source # toEnum :: Int -> WordPtr Source # fromEnum :: WordPtr -> Int Source # enumFrom :: WordPtr -> [WordPtr] Source # enumFromThen :: WordPtr -> WordPtr -> [WordPtr] Source # enumFromTo :: WordPtr -> WordPtr -> [WordPtr] Source # enumFromThenTo :: WordPtr -> WordPtr -> WordPtr -> [WordPtr] Source # | |
| Enum Associativity Source # | Since: base-4.9.0.0 |
Defined in GHC.Internal.Generics Methods succ :: Associativity -> Associativity Source # pred :: Associativity -> Associativity Source # toEnum :: Int -> Associativity Source # fromEnum :: Associativity -> Int Source # enumFrom :: Associativity -> [Associativity] Source # enumFromThen :: Associativity -> Associativity -> [Associativity] Source # enumFromTo :: Associativity -> Associativity -> [Associativity] Source # enumFromThenTo :: Associativity -> Associativity -> Associativity -> [Associativity] Source # | |
| Enum DecidedStrictness Source # | Since: base-4.9.0.0 |
Defined in GHC.Internal.Generics Methods succ :: DecidedStrictness -> DecidedStrictness Source # pred :: DecidedStrictness -> DecidedStrictness Source # toEnum :: Int -> DecidedStrictness Source # fromEnum :: DecidedStrictness -> Int Source # enumFrom :: DecidedStrictness -> [DecidedStrictness] Source # enumFromThen :: DecidedStrictness -> DecidedStrictness -> [DecidedStrictness] Source # enumFromTo :: DecidedStrictness -> DecidedStrictness -> [DecidedStrictness] Source # enumFromThenTo :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness -> [DecidedStrictness] Source # | |
| Enum SourceStrictness Source # | Since: base-4.9.0.0 |
Defined in GHC.Internal.Generics Methods succ :: SourceStrictness -> SourceStrictness Source # pred :: SourceStrictness -> SourceStrictness Source # toEnum :: Int -> SourceStrictness Source # fromEnum :: SourceStrictness -> Int Source # enumFrom :: SourceStrictness -> [SourceStrictness] Source # enumFromThen :: SourceStrictness -> SourceStrictness -> [SourceStrictness] Source # enumFromTo :: SourceStrictness -> SourceStrictness -> [SourceStrictness] Source # enumFromThenTo :: SourceStrictness -> SourceStrictness -> SourceStrictness -> [SourceStrictness] Source # | |
| Enum SourceUnpackedness Source # | Since: base-4.9.0.0 |
Defined in GHC.Internal.Generics Methods succ :: SourceUnpackedness -> SourceUnpackedness Source # pred :: SourceUnpackedness -> SourceUnpackedness Source # toEnum :: Int -> SourceUnpackedness Source # fromEnum :: SourceUnpackedness -> Int Source # enumFrom :: SourceUnpackedness -> [SourceUnpackedness] Source # enumFromThen :: SourceUnpackedness -> SourceUnpackedness -> [SourceUnpackedness] Source # enumFromTo :: SourceUnpackedness -> SourceUnpackedness -> [SourceUnpackedness] Source # enumFromThenTo :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness -> [SourceUnpackedness] Source # | |
| Enum HalfWord Source # | |
Defined in GHC.Internal.Heap.InfoTable.Types Methods succ :: HalfWord -> HalfWord Source # pred :: HalfWord -> HalfWord Source # toEnum :: Int -> HalfWord Source # fromEnum :: HalfWord -> Int Source # enumFrom :: HalfWord -> [HalfWord] Source # enumFromThen :: HalfWord -> HalfWord -> [HalfWord] Source # enumFromTo :: HalfWord -> HalfWord -> [HalfWord] Source # enumFromThenTo :: HalfWord -> HalfWord -> HalfWord -> [HalfWord] Source # | |
| Enum SeekMode Source # | Since: base-4.2.0.0 |
Defined in GHC.Internal.IO.Device Methods succ :: SeekMode -> SeekMode Source # pred :: SeekMode -> SeekMode Source # toEnum :: Int -> SeekMode Source # fromEnum :: SeekMode -> Int Source # enumFrom :: SeekMode -> [SeekMode] Source # enumFromThen :: SeekMode -> SeekMode -> [SeekMode] Source # enumFromTo :: SeekMode -> SeekMode -> [SeekMode] Source # enumFromThenTo :: SeekMode -> SeekMode -> SeekMode -> [SeekMode] Source # | |
| Enum IOMode Source # | Since: base-4.2.0.0 |
Defined in GHC.Internal.IO.IOMode Methods succ :: IOMode -> IOMode Source # pred :: IOMode -> IOMode Source # toEnum :: Int -> IOMode Source # fromEnum :: IOMode -> Int Source # enumFrom :: IOMode -> [IOMode] Source # enumFromThen :: IOMode -> IOMode -> [IOMode] Source # enumFromTo :: IOMode -> IOMode -> [IOMode] Source # enumFromThenTo :: IOMode -> IOMode -> IOMode -> [IOMode] Source # | |
| Enum IoSubSystem Source # | |
Defined in GHC.Internal.IO.SubSystem Methods succ :: IoSubSystem -> IoSubSystem Source # pred :: IoSubSystem -> IoSubSystem Source # toEnum :: Int -> IoSubSystem Source # fromEnum :: IoSubSystem -> Int Source # enumFrom :: IoSubSystem -> [IoSubSystem] Source # enumFromThen :: IoSubSystem -> IoSubSystem -> [IoSubSystem] Source # enumFromTo :: IoSubSystem -> IoSubSystem -> [IoSubSystem] Source # enumFromThenTo :: IoSubSystem -> IoSubSystem -> IoSubSystem -> [IoSubSystem] Source # | |
| Enum Int16 Source # | Since: base-2.1 |
Defined in GHC.Internal.Int Methods succ :: Int16 -> Int16 Source # pred :: Int16 -> Int16 Source # toEnum :: Int -> Int16 Source # fromEnum :: Int16 -> Int Source # enumFrom :: Int16 -> [Int16] Source # enumFromThen :: Int16 -> Int16 -> [Int16] Source # enumFromTo :: Int16 -> Int16 -> [Int16] Source # enumFromThenTo :: Int16 -> Int16 -> Int16 -> [Int16] Source # | |
| Enum Int32 Source # | Since: base-2.1 |
Defined in GHC.Internal.Int Methods succ :: Int32 -> Int32 Source # pred :: Int32 -> Int32 Source # toEnum :: Int -> Int32 Source # fromEnum :: Int32 -> Int Source # enumFrom :: Int32 -> [Int32] Source # enumFromThen :: Int32 -> Int32 -> [Int32] Source # enumFromTo :: Int32 -> Int32 -> [Int32] Source # enumFromThenTo :: Int32 -> Int32 -> Int32 -> [Int32] Source # | |
| Enum Int64 Source # | Since: base-2.1 |
Defined in GHC.Internal.Int Methods succ :: Int64 -> Int64 Source # pred :: Int64 -> Int64 Source # toEnum :: Int -> Int64 Source # fromEnum :: Int64 -> Int Source # enumFrom :: Int64 -> [Int64] Source # enumFromThen :: Int64 -> Int64 -> [Int64] Source # enumFromTo :: Int64 -> Int64 -> [Int64] Source # enumFromThenTo :: Int64 -> Int64 -> Int64 -> [Int64] Source # | |
| Enum Int8 Source # | Since: base-2.1 |
| Enum Extension Source # | |
Defined in GHC.Internal.LanguageExtensions Methods succ :: Extension -> Extension Source # pred :: Extension -> Extension Source # toEnum :: Int -> Extension Source # fromEnum :: Extension -> Int Source # enumFrom :: Extension -> [Extension] Source # enumFromThen :: Extension -> Extension -> [Extension] Source # enumFromTo :: Extension -> Extension -> [Extension] Source # enumFromThenTo :: Extension -> Extension -> Extension -> [Extension] Source # | |
| Enum DoCostCentres Source # | Since: base-4.8.0.0 |
Defined in GHC.Internal.RTS.Flags Methods succ :: DoCostCentres -> DoCostCentres Source # pred :: DoCostCentres -> DoCostCentres Source # toEnum :: Int -> DoCostCentres Source # fromEnum :: DoCostCentres -> Int Source # enumFrom :: DoCostCentres -> [DoCostCentres] Source # enumFromThen :: DoCostCentres -> DoCostCentres -> [DoCostCentres] Source # enumFromTo :: DoCostCentres -> DoCostCentres -> [DoCostCentres] Source # enumFromThenTo :: DoCostCentres -> DoCostCentres -> DoCostCentres -> [DoCostCentres] Source # | |
| Enum DoHeapProfile Source # | Since: base-4.8.0.0 |
Defined in GHC.Internal.RTS.Flags Methods succ :: DoHeapProfile -> DoHeapProfile Source # pred :: DoHeapProfile -> DoHeapProfile Source # toEnum :: Int -> DoHeapProfile Source # fromEnum :: DoHeapProfile -> Int Source # enumFrom :: DoHeapProfile -> [DoHeapProfile] Source # enumFromThen :: DoHeapProfile -> DoHeapProfile -> [DoHeapProfile] Source # enumFromTo :: DoHeapProfile -> DoHeapProfile -> [DoHeapProfile] Source # enumFromThenTo :: DoHeapProfile -> DoHeapProfile -> DoHeapProfile -> [DoHeapProfile] Source # | |
| Enum DoTrace Source # | Since: base-4.8.0.0 |
Defined in GHC.Internal.RTS.Flags Methods succ :: DoTrace -> DoTrace Source # pred :: DoTrace -> DoTrace Source # toEnum :: Int -> DoTrace Source # fromEnum :: DoTrace -> Int Source # enumFrom :: DoTrace -> [DoTrace] Source # enumFromThen :: DoTrace -> DoTrace -> [DoTrace] Source # enumFromTo :: DoTrace -> DoTrace -> [DoTrace] Source # enumFromThenTo :: DoTrace -> DoTrace -> DoTrace -> [DoTrace] Source # | |
| Enum GiveGCStats Source # | Since: base-4.8.0.0 |
Defined in GHC.Internal.RTS.Flags Methods succ :: GiveGCStats -> GiveGCStats Source # pred :: GiveGCStats -> GiveGCStats Source # toEnum :: Int -> GiveGCStats Source # fromEnum :: GiveGCStats -> Int Source # enumFrom :: GiveGCStats -> [GiveGCStats] Source # enumFromThen :: GiveGCStats -> GiveGCStats -> [GiveGCStats] Source # enumFromTo :: GiveGCStats -> GiveGCStats -> [GiveGCStats] Source # enumFromThenTo :: GiveGCStats -> GiveGCStats -> GiveGCStats -> [GiveGCStats] Source # | |
| Enum IoManagerFlag Source # | |
Defined in GHC.Internal.RTS.Flags Methods succ :: IoManagerFlag -> IoManagerFlag Source # pred :: IoManagerFlag -> IoManagerFlag Source # toEnum :: Int -> IoManagerFlag Source # fromEnum :: IoManagerFlag -> Int Source # enumFrom :: IoManagerFlag -> [IoManagerFlag] Source # enumFromThen :: IoManagerFlag -> IoManagerFlag -> [IoManagerFlag] Source # enumFromTo :: IoManagerFlag -> IoManagerFlag -> [IoManagerFlag] Source # enumFromThenTo :: IoManagerFlag -> IoManagerFlag -> IoManagerFlag -> [IoManagerFlag] Source # | |
| Enum ByteOffset Source # | |
Defined in GHC.Internal.Stack.Constants Methods succ :: ByteOffset -> ByteOffset Source # pred :: ByteOffset -> ByteOffset Source # toEnum :: Int -> ByteOffset Source # fromEnum :: ByteOffset -> Int Source # enumFrom :: ByteOffset -> [ByteOffset] Source # enumFromThen :: ByteOffset -> ByteOffset -> [ByteOffset] Source # enumFromTo :: ByteOffset -> ByteOffset -> [ByteOffset] Source # enumFromThenTo :: ByteOffset -> ByteOffset -> ByteOffset -> [ByteOffset] Source # | |
| Enum WordOffset Source # | |
Defined in GHC.Internal.Stack.Constants Methods succ :: WordOffset -> WordOffset Source # pred :: WordOffset -> WordOffset Source # toEnum :: Int -> WordOffset Source # fromEnum :: WordOffset -> Int Source # enumFrom :: WordOffset -> [WordOffset] Source # enumFromThen :: WordOffset -> WordOffset -> [WordOffset] Source # enumFromTo :: WordOffset -> WordOffset -> [WordOffset] Source # enumFromThenTo :: WordOffset -> WordOffset -> WordOffset -> [WordOffset] Source # | |
| Enum ByteOffset Source # | |
Defined in GHC.Internal.Stack.ConstantsProf Methods succ :: ByteOffset -> ByteOffset Source # pred :: ByteOffset -> ByteOffset Source # toEnum :: Int -> ByteOffset Source # fromEnum :: ByteOffset -> Int Source # enumFrom :: ByteOffset -> [ByteOffset] Source # enumFromThen :: ByteOffset -> ByteOffset -> [ByteOffset] Source # enumFromTo :: ByteOffset -> ByteOffset -> [ByteOffset] Source # enumFromThenTo :: ByteOffset -> ByteOffset -> ByteOffset -> [ByteOffset] Source # | |
| Enum WordOffset Source # | |
Defined in GHC.Internal.Stack.ConstantsProf Methods succ :: WordOffset -> WordOffset Source # pred :: WordOffset -> WordOffset Source # toEnum :: Int -> WordOffset Source # fromEnum :: WordOffset -> Int Source # enumFrom :: WordOffset -> [WordOffset] Source # enumFromThen :: WordOffset -> WordOffset -> [WordOffset] Source # enumFromTo :: WordOffset -> WordOffset -> [WordOffset] Source # enumFromThenTo :: WordOffset -> WordOffset -> WordOffset -> [WordOffset] Source # | |
| Enum CBlkCnt Source # | |
Defined in GHC.Internal.System.Posix.Types Methods succ :: CBlkCnt -> CBlkCnt Source # pred :: CBlkCnt -> CBlkCnt Source # toEnum :: Int -> CBlkCnt Source # fromEnum :: CBlkCnt -> Int Source # enumFrom :: CBlkCnt -> [CBlkCnt] Source # enumFromThen :: CBlkCnt -> CBlkCnt -> [CBlkCnt] Source # enumFromTo :: CBlkCnt -> CBlkCnt -> [CBlkCnt] Source # enumFromThenTo :: CBlkCnt -> CBlkCnt -> CBlkCnt -> [CBlkCnt] Source # | |
| Enum CBlkSize Source # | |
Defined in GHC.Internal.System.Posix.Types Methods succ :: CBlkSize -> CBlkSize Source # pred :: CBlkSize -> CBlkSize Source # toEnum :: Int -> CBlkSize Source # fromEnum :: CBlkSize -> Int Source # enumFrom :: CBlkSize -> [CBlkSize] Source # enumFromThen :: CBlkSize -> CBlkSize -> [CBlkSize] Source # enumFromTo :: CBlkSize -> CBlkSize -> [CBlkSize] Source # enumFromThenTo :: CBlkSize -> CBlkSize -> CBlkSize -> [CBlkSize] Source # | |
| Enum CCc Source # | |
Defined in GHC.Internal.System.Posix.Types | |
| Enum CClockId Source # | |
Defined in GHC.Internal.System.Posix.Types Methods succ :: CClockId -> CClockId Source # pred :: CClockId -> CClockId Source # toEnum :: Int -> CClockId Source # fromEnum :: CClockId -> Int Source # enumFrom :: CClockId -> [CClockId] Source # enumFromThen :: CClockId -> CClockId -> [CClockId] Source # enumFromTo :: CClockId -> CClockId -> [CClockId] Source # enumFromThenTo :: CClockId -> CClockId -> CClockId -> [CClockId] Source # | |
| Enum CDev Source # | |
Defined in GHC.Internal.System.Posix.Types Methods toEnum :: Int -> CDev Source # fromEnum :: CDev -> Int Source # enumFrom :: CDev -> [CDev] Source # enumFromThen :: CDev -> CDev -> [CDev] Source # enumFromTo :: CDev -> CDev -> [CDev] Source # enumFromThenTo :: CDev -> CDev -> CDev -> [CDev] Source # | |
| Enum CFsBlkCnt Source # | |
Defined in GHC.Internal.System.Posix.Types Methods succ :: CFsBlkCnt -> CFsBlkCnt Source # pred :: CFsBlkCnt -> CFsBlkCnt Source # toEnum :: Int -> CFsBlkCnt Source # fromEnum :: CFsBlkCnt -> Int Source # enumFrom :: CFsBlkCnt -> [CFsBlkCnt] Source # enumFromThen :: CFsBlkCnt -> CFsBlkCnt -> [CFsBlkCnt] Source # enumFromTo :: CFsBlkCnt -> CFsBlkCnt -> [CFsBlkCnt] Source # enumFromThenTo :: CFsBlkCnt -> CFsBlkCnt -> CFsBlkCnt -> [CFsBlkCnt] Source # | |
| Enum CFsFilCnt Source # | |
Defined in GHC.Internal.System.Posix.Types Methods succ :: CFsFilCnt -> CFsFilCnt Source # pred :: CFsFilCnt -> CFsFilCnt Source # toEnum :: Int -> CFsFilCnt Source # fromEnum :: CFsFilCnt -> Int Source # enumFrom :: CFsFilCnt -> [CFsFilCnt] Source # enumFromThen :: CFsFilCnt -> CFsFilCnt -> [CFsFilCnt] Source # enumFromTo :: CFsFilCnt -> CFsFilCnt -> [CFsFilCnt] Source # enumFromThenTo :: CFsFilCnt -> CFsFilCnt -> CFsFilCnt -> [CFsFilCnt] Source # | |
| Enum CGid Source # | |
Defined in GHC.Internal.System.Posix.Types Methods toEnum :: Int -> CGid Source # fromEnum :: CGid -> Int Source # enumFrom :: CGid -> [CGid] Source # enumFromThen :: CGid -> CGid -> [CGid] Source # enumFromTo :: CGid -> CGid -> [CGid] Source # enumFromThenTo :: CGid -> CGid -> CGid -> [CGid] Source # | |
| Enum CId Source # | |
Defined in GHC.Internal.System.Posix.Types | |
| Enum CIno Source # | |
Defined in GHC.Internal.System.Posix.Types Methods toEnum :: Int -> CIno Source # fromEnum :: CIno -> Int Source # enumFrom :: CIno -> [CIno] Source # enumFromThen :: CIno -> CIno -> [CIno] Source # enumFromTo :: CIno -> CIno -> [CIno] Source # enumFromThenTo :: CIno -> CIno -> CIno -> [CIno] Source # | |
| Enum CKey Source # | |
Defined in GHC.Internal.System.Posix.Types Methods toEnum :: Int -> CKey Source # fromEnum :: CKey -> Int Source # enumFrom :: CKey -> [CKey] Source # enumFromThen :: CKey -> CKey -> [CKey] Source # enumFromTo :: CKey -> CKey -> [CKey] Source # enumFromThenTo :: CKey -> CKey -> CKey -> [CKey] Source # | |
| Enum CMode Source # | |
Defined in GHC.Internal.System.Posix.Types Methods succ :: CMode -> CMode Source # pred :: CMode -> CMode Source # toEnum :: Int -> CMode Source # fromEnum :: CMode -> Int Source # enumFrom :: CMode -> [CMode] Source # enumFromThen :: CMode -> CMode -> [CMode] Source # enumFromTo :: CMode -> CMode -> [CMode] Source # enumFromThenTo :: CMode -> CMode -> CMode -> [CMode] Source # | |
| Enum CNfds Source # | |
Defined in GHC.Internal.System.Posix.Types Methods succ :: CNfds -> CNfds Source # pred :: CNfds -> CNfds Source # toEnum :: Int -> CNfds Source # fromEnum :: CNfds -> Int Source # enumFrom :: CNfds -> [CNfds] Source # enumFromThen :: CNfds -> CNfds -> [CNfds] Source # enumFromTo :: CNfds -> CNfds -> [CNfds] Source # enumFromThenTo :: CNfds -> CNfds -> CNfds -> [CNfds] Source # | |
| Enum CNlink Source # | |
Defined in GHC.Internal.System.Posix.Types Methods succ :: CNlink -> CNlink Source # pred :: CNlink -> CNlink Source # toEnum :: Int -> CNlink Source # fromEnum :: CNlink -> Int Source # enumFrom :: CNlink -> [CNlink] Source # enumFromThen :: CNlink -> CNlink -> [CNlink] Source # enumFromTo :: CNlink -> CNlink -> [CNlink] Source # enumFromThenTo :: CNlink -> CNlink -> CNlink -> [CNlink] Source # | |
| Enum COff Source # | |
Defined in GHC.Internal.System.Posix.Types Methods toEnum :: Int -> COff Source # fromEnum :: COff -> Int Source # enumFrom :: COff -> [COff] Source # enumFromThen :: COff -> COff -> [COff] Source # enumFromTo :: COff -> COff -> [COff] Source # enumFromThenTo :: COff -> COff -> COff -> [COff] Source # | |
| Enum CPid Source # | |
Defined in GHC.Internal.System.Posix.Types Methods toEnum :: Int -> CPid Source # fromEnum :: CPid -> Int Source # enumFrom :: CPid -> [CPid] Source # enumFromThen :: CPid -> CPid -> [CPid] Source # enumFromTo :: CPid -> CPid -> [CPid] Source # enumFromThenTo :: CPid -> CPid -> CPid -> [CPid] Source # | |
| Enum CRLim Source # | |
Defined in GHC.Internal.System.Posix.Types Methods succ :: CRLim -> CRLim Source # pred :: CRLim -> CRLim Source # toEnum :: Int -> CRLim Source # fromEnum :: CRLim -> Int Source # enumFrom :: CRLim -> [CRLim] Source # enumFromThen :: CRLim -> CRLim -> [CRLim] Source # enumFromTo :: CRLim -> CRLim -> [CRLim] Source # enumFromThenTo :: CRLim -> CRLim -> CRLim -> [CRLim] Source # | |
| Enum CSocklen Source # | |
Defined in GHC.Internal.System.Posix.Types Methods succ :: CSocklen -> CSocklen Source # pred :: CSocklen -> CSocklen Source # toEnum :: Int -> CSocklen Source # fromEnum :: CSocklen -> Int Source # enumFrom :: CSocklen -> [CSocklen] Source # enumFromThen :: CSocklen -> CSocklen -> [CSocklen] Source # enumFromTo :: CSocklen -> CSocklen -> [CSocklen] Source # enumFromThenTo :: CSocklen -> CSocklen -> CSocklen -> [CSocklen] Source # | |
| Enum CSpeed Source # | |
Defined in GHC.Internal.System.Posix.Types Methods succ :: CSpeed -> CSpeed Source # pred :: CSpeed -> CSpeed Source # toEnum :: Int -> CSpeed Source # fromEnum :: CSpeed -> Int Source # enumFrom :: CSpeed -> [CSpeed] Source # enumFromThen :: CSpeed -> CSpeed -> [CSpeed] Source # enumFromTo :: CSpeed -> CSpeed -> [CSpeed] Source # enumFromThenTo :: CSpeed -> CSpeed -> CSpeed -> [CSpeed] Source # | |
| Enum CSsize Source # | |
Defined in GHC.Internal.System.Posix.Types Methods succ :: CSsize -> CSsize Source # pred :: CSsize -> CSsize Source # toEnum :: Int -> CSsize Source # fromEnum :: CSsize -> Int Source # enumFrom :: CSsize -> [CSsize] Source # enumFromThen :: CSsize -> CSsize -> [CSsize] Source # enumFromTo :: CSsize -> CSsize -> [CSsize] Source # enumFromThenTo :: CSsize -> CSsize -> CSsize -> [CSsize] Source # | |
| Enum CTcflag Source # | |
Defined in GHC.Internal.System.Posix.Types Methods succ :: CTcflag -> CTcflag Source # pred :: CTcflag -> CTcflag Source # toEnum :: Int -> CTcflag Source # fromEnum :: CTcflag -> Int Source # enumFrom :: CTcflag -> [CTcflag] Source # enumFromThen :: CTcflag -> CTcflag -> [CTcflag] Source # enumFromTo :: CTcflag -> CTcflag -> [CTcflag] Source # enumFromThenTo :: CTcflag -> CTcflag -> CTcflag -> [CTcflag] Source # | |
| Enum CUid Source # | |
Defined in GHC.Internal.System.Posix.Types Methods toEnum :: Int -> CUid Source # fromEnum :: CUid -> Int Source # enumFrom :: CUid -> [CUid] Source # enumFromThen :: CUid -> CUid -> [CUid] Source # enumFromTo :: CUid -> CUid -> [CUid] Source # enumFromThenTo :: CUid -> CUid -> CUid -> [CUid] Source # | |
| Enum Fd Source # | |
Defined in GHC.Internal.System.Posix.Types | |
| Enum Ordering Source # | Since: base-2.1 |
Defined in GHC.Internal.Enum Methods succ :: Ordering -> Ordering Source # pred :: Ordering -> Ordering Source # toEnum :: Int -> Ordering Source # fromEnum :: Ordering -> Int Source # enumFrom :: Ordering -> [Ordering] Source # enumFromThen :: Ordering -> Ordering -> [Ordering] Source # enumFromTo :: Ordering -> Ordering -> [Ordering] Source # enumFromThenTo :: Ordering -> Ordering -> Ordering -> [Ordering] Source # | |
| Enum GeneralCategory Source # | Since: base-2.1 |
Defined in GHC.Internal.Unicode Methods succ :: GeneralCategory -> GeneralCategory Source # pred :: GeneralCategory -> GeneralCategory Source # toEnum :: Int -> GeneralCategory Source # fromEnum :: GeneralCategory -> Int Source # enumFrom :: GeneralCategory -> [GeneralCategory] Source # enumFromThen :: GeneralCategory -> GeneralCategory -> [GeneralCategory] Source # enumFromTo :: GeneralCategory -> GeneralCategory -> [GeneralCategory] Source # enumFromThenTo :: GeneralCategory -> GeneralCategory -> GeneralCategory -> [GeneralCategory] Source # | |
| Enum Word16 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word Methods succ :: Word16 -> Word16 Source # pred :: Word16 -> Word16 Source # toEnum :: Int -> Word16 Source # fromEnum :: Word16 -> Int Source # enumFrom :: Word16 -> [Word16] Source # enumFromThen :: Word16 -> Word16 -> [Word16] Source # enumFromTo :: Word16 -> Word16 -> [Word16] Source # enumFromThenTo :: Word16 -> Word16 -> Word16 -> [Word16] Source # | |
| Enum Word32 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word Methods succ :: Word32 -> Word32 Source # pred :: Word32 -> Word32 Source # toEnum :: Int -> Word32 Source # fromEnum :: Word32 -> Int Source # enumFrom :: Word32 -> [Word32] Source # enumFromThen :: Word32 -> Word32 -> [Word32] Source # enumFromTo :: Word32 -> Word32 -> [Word32] Source # enumFromThenTo :: Word32 -> Word32 -> Word32 -> [Word32] Source # | |
| Enum Word64 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word Methods succ :: Word64 -> Word64 Source # pred :: Word64 -> Word64 Source # toEnum :: Int -> Word64 Source # fromEnum :: Word64 -> Int Source # enumFrom :: Word64 -> [Word64] Source # enumFromThen :: Word64 -> Word64 -> [Word64] Source # enumFromTo :: Word64 -> Word64 -> [Word64] Source # enumFromThenTo :: Word64 -> Word64 -> Word64 -> [Word64] Source # | |
| Enum Word8 Source # | Since: base-2.1 |
Defined in GHC.Internal.Word Methods succ :: Word8 -> Word8 Source # pred :: Word8 -> Word8 Source # toEnum :: Int -> Word8 Source # fromEnum :: Word8 -> Int Source # enumFrom :: Word8 -> [Word8] Source # enumFromThen :: Word8 -> Word8 -> [Word8] Source # enumFromTo :: Word8 -> Word8 -> [Word8] Source # enumFromThenTo :: Word8 -> Word8 -> Word8 -> [Word8] Source # | |
| Enum Integer Source # | Since: base-2.1 |
Defined in GHC.Internal.Enum Methods succ :: Integer -> Integer Source # pred :: Integer -> Integer Source # toEnum :: Int -> Integer Source # fromEnum :: Integer -> Int Source # enumFrom :: Integer -> [Integer] Source # enumFromThen :: Integer -> Integer -> [Integer] Source # enumFromTo :: Integer -> Integer -> [Integer] Source # enumFromThenTo :: Integer -> Integer -> Integer -> [Integer] Source # | |
| Enum Natural Source # | Since: base-4.8.0.0 |
Defined in GHC.Internal.Enum Methods succ :: Natural -> Natural Source # pred :: Natural -> Natural Source # toEnum :: Int -> Natural Source # fromEnum :: Natural -> Int Source # enumFrom :: Natural -> [Natural] Source # enumFromThen :: Natural -> Natural -> [Natural] Source # enumFromTo :: Natural -> Natural -> [Natural] Source # enumFromThenTo :: Natural -> Natural -> Natural -> [Natural] Source # | |
| Enum () Source # | Since: base-2.1 |
Defined in GHC.Internal.Enum | |
| Enum Bool Source # | Since: base-2.1 |
| Enum Char Source # | Since: base-2.1 |
| Enum Double Source # |
List generators have extremely peculiar behavior, mandated by Haskell Report 2010:
Since: base-2.1 |
Defined in GHC.Internal.Float Methods succ :: Double -> Double Source # pred :: Double -> Double Source # toEnum :: Int -> Double Source # fromEnum :: Double -> Int Source # enumFrom :: Double -> [Double] Source # enumFromThen :: Double -> Double -> [Double] Source # enumFromTo :: Double -> Double -> [Double] Source # enumFromThenTo :: Double -> Double -> Double -> [Double] Source # | |
| Enum Float Source # |
List generators have extremely peculiar behavior, mandated by Haskell Report 2010:
Since: base-2.1 |
Defined in GHC.Internal.Float Methods succ :: Float -> Float Source # pred :: Float -> Float Source # toEnum :: Int -> Float Source # fromEnum :: Float -> Int Source # enumFrom :: Float -> [Float] Source # enumFromThen :: Float -> Float -> [Float] Source # enumFromTo :: Float -> Float -> [Float] Source # enumFromThenTo :: Float -> Float -> Float -> [Float] Source # | |
| Enum Int Source # | Since: base-2.1 |
Defined in GHC.Internal.Enum | |
| Enum Levity Source # | Since: base-4.16.0.0 |
Defined in GHC.Internal.Enum Methods succ :: Levity -> Levity Source # pred :: Levity -> Levity Source # toEnum :: Int -> Levity Source # fromEnum :: Levity -> Int Source # enumFrom :: Levity -> [Levity] Source # enumFromThen :: Levity -> Levity -> [Levity] Source # enumFromTo :: Levity -> Levity -> [Levity] Source # enumFromThenTo :: Levity -> Levity -> Levity -> [Levity] Source # | |
| Enum VecCount Source # | Since: base-4.10.0.0 |
Defined in GHC.Internal.Enum Methods succ :: VecCount -> VecCount Source # pred :: VecCount -> VecCount Source # toEnum :: Int -> VecCount Source # fromEnum :: VecCount -> Int Source # enumFrom :: VecCount -> [VecCount] Source # enumFromThen :: VecCount -> VecCount -> [VecCount] Source # enumFromTo :: VecCount -> VecCount -> [VecCount] Source # enumFromThenTo :: VecCount -> VecCount -> VecCount -> [VecCount] Source # | |
| Enum VecElem Source # | Since: base-4.10.0.0 |
Defined in GHC.Internal.Enum Methods succ :: VecElem -> VecElem Source # pred :: VecElem -> VecElem Source # toEnum :: Int -> VecElem Source # fromEnum :: VecElem -> Int Source # enumFrom :: VecElem -> [VecElem] Source # enumFromThen :: VecElem -> VecElem -> [VecElem] Source # enumFromTo :: VecElem -> VecElem -> [VecElem] Source # enumFromThenTo :: VecElem -> VecElem -> VecElem -> [VecElem] Source # | |
| Enum Word Source # | Since: base-2.1 |
| Enum a => Enum (First a) Source # | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods succ :: First a -> First a Source # pred :: First a -> First a Source # toEnum :: Int -> First a Source # fromEnum :: First a -> Int Source # enumFrom :: First a -> [First a] Source # enumFromThen :: First a -> First a -> [First a] Source # enumFromTo :: First a -> First a -> [First a] Source # enumFromThenTo :: First a -> First a -> First a -> [First a] Source # | |
| Enum a => Enum (Last a) Source # | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods succ :: Last a -> Last a Source # pred :: Last a -> Last a Source # toEnum :: Int -> Last a Source # fromEnum :: Last a -> Int Source # enumFrom :: Last a -> [Last a] Source # enumFromThen :: Last a -> Last a -> [Last a] Source # enumFromTo :: Last a -> Last a -> [Last a] Source # enumFromThenTo :: Last a -> Last a -> Last a -> [Last a] Source # | |
| Enum a => Enum (Max a) Source # | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods succ :: Max a -> Max a Source # pred :: Max a -> Max a Source # toEnum :: Int -> Max a Source # fromEnum :: Max a -> Int Source # enumFrom :: Max a -> [Max a] Source # enumFromThen :: Max a -> Max a -> [Max a] Source # enumFromTo :: Max a -> Max a -> [Max a] Source # enumFromThenTo :: Max a -> Max a -> Max a -> [Max a] Source # | |
| Enum a => Enum (Min a) Source # | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods succ :: Min a -> Min a Source # pred :: Min a -> Min a Source # toEnum :: Int -> Min a Source # fromEnum :: Min a -> Int Source # enumFrom :: Min a -> [Min a] Source # enumFromThen :: Min a -> Min a -> [Min a] Source # enumFromTo :: Min a -> Min a -> [Min a] Source # enumFromThenTo :: Min a -> Min a -> Min a -> [Min a] Source # | |
| Enum a => Enum (WrappedMonoid a) Source # | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods succ :: WrappedMonoid a -> WrappedMonoid a Source # pred :: WrappedMonoid a -> WrappedMonoid a Source # toEnum :: Int -> WrappedMonoid a Source # fromEnum :: WrappedMonoid a -> Int Source # enumFrom :: WrappedMonoid a -> [WrappedMonoid a] Source # enumFromThen :: WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] Source # enumFromTo :: WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] Source # enumFromThenTo :: WrappedMonoid a -> WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] Source # | |
| Enum a => Enum (And a) Source # | Since: base-4.16 |
Defined in GHC.Internal.Data.Bits Methods succ :: And a -> And a Source # pred :: And a -> And a Source # toEnum :: Int -> And a Source # fromEnum :: And a -> Int Source # enumFrom :: And a -> [And a] Source # enumFromThen :: And a -> And a -> [And a] Source # enumFromTo :: And a -> And a -> [And a] Source # enumFromThenTo :: And a -> And a -> And a -> [And a] Source # | |
| Enum a => Enum (Iff a) Source # | Since: base-4.16 |
Defined in GHC.Internal.Data.Bits Methods succ :: Iff a -> Iff a Source # pred :: Iff a -> Iff a Source # toEnum :: Int -> Iff a Source # fromEnum :: Iff a -> Int Source # enumFrom :: Iff a -> [Iff a] Source # enumFromThen :: Iff a -> Iff a -> [Iff a] Source # enumFromTo :: Iff a -> Iff a -> [Iff a] Source # enumFromThenTo :: Iff a -> Iff a -> Iff a -> [Iff a] Source # | |
| Enum a => Enum (Ior a) Source # | Since: base-4.16 |
Defined in GHC.Internal.Data.Bits Methods succ :: Ior a -> Ior a Source # pred :: Ior a -> Ior a Source # toEnum :: Int -> Ior a Source # fromEnum :: Ior a -> Int Source # enumFrom :: Ior a -> [Ior a] Source # enumFromThen :: Ior a -> Ior a -> [Ior a] Source # enumFromTo :: Ior a -> Ior a -> [Ior a] Source # enumFromThenTo :: Ior a -> Ior a -> Ior a -> [Ior a] Source # | |
| Enum a => Enum (Xor a) Source # | Since: base-4.16 |
Defined in GHC.Internal.Data.Bits Methods succ :: Xor a -> Xor a Source # pred :: Xor a -> Xor a Source # toEnum :: Int -> Xor a Source # fromEnum :: Xor a -> Int Source # enumFrom :: Xor a -> [Xor a] Source # enumFromThen :: Xor a -> Xor a -> [Xor a] Source # enumFromTo :: Xor a -> Xor a -> [Xor a] Source # enumFromThenTo :: Xor a -> Xor a -> Xor a -> [Xor a] Source # | |
| Enum a => Enum (Identity a) Source # | Since: base-4.9.0.0 |
Defined in GHC.Internal.Data.Functor.Identity Methods succ :: Identity a -> Identity a Source # pred :: Identity a -> Identity a Source # toEnum :: Int -> Identity a Source # fromEnum :: Identity a -> Int Source # enumFrom :: Identity a -> [Identity a] Source # enumFromThen :: Identity a -> Identity a -> [Identity a] Source # enumFromTo :: Identity a -> Identity a -> [Identity a] Source # enumFromThenTo :: Identity a -> Identity a -> Identity a -> [Identity a] Source # | |
| (Enum a, Bounded a, Eq a) => Enum (Down a) Source # | Swaps Since: base-4.18.0.0 |
Defined in GHC.Internal.Data.Ord Methods succ :: Down a -> Down a Source # pred :: Down a -> Down a Source # toEnum :: Int -> Down a Source # fromEnum :: Down a -> Int Source # enumFrom :: Down a -> [Down a] Source # enumFromThen :: Down a -> Down a -> [Down a] Source # enumFromTo :: Down a -> Down a -> [Down a] Source # enumFromThenTo :: Down a -> Down a -> Down a -> [Down a] Source # | |
| Integral a => Enum (Ratio a) Source # | Since: base-2.0.1 |
Defined in GHC.Internal.Real Methods succ :: Ratio a -> Ratio a Source # pred :: Ratio a -> Ratio a Source # toEnum :: Int -> Ratio a Source # fromEnum :: Ratio a -> Int Source # enumFrom :: Ratio a -> [Ratio a] Source # enumFromThen :: Ratio a -> Ratio a -> [Ratio a] Source # enumFromTo :: Ratio a -> Ratio a -> [Ratio a] Source # enumFromThenTo :: Ratio a -> Ratio a -> Ratio a -> [Ratio a] Source # | |
| Enum a => Enum (Solo a) Source # | |
Defined in GHC.Internal.Enum Methods succ :: Solo a -> Solo a Source # pred :: Solo a -> Solo a Source # toEnum :: Int -> Solo a Source # fromEnum :: Solo a -> Int Source # enumFrom :: Solo a -> [Solo a] Source # enumFromThen :: Solo a -> Solo a -> [Solo a] Source # enumFromTo :: Solo a -> Solo a -> [Solo a] Source # enumFromThenTo :: Solo a -> Solo a -> Solo a -> [Solo a] Source # | |
| Enum (Fixed a) Source # | Recall that, for numeric types,
and likewise
In other words,
and similarly
This is worth bearing in mind when defining [1..10] :: [Pico] evaluates to However, this is not true. On the contrary, similarly to the above
implementations of [1.000000000000, 1.00000000001, 1.00000000002, ..., 10.000000000000] and contains Since: base-2.1 |
Defined in Data.Fixed Methods succ :: Fixed a -> Fixed a Source # pred :: Fixed a -> Fixed a Source # toEnum :: Int -> Fixed a Source # fromEnum :: Fixed a -> Int Source # enumFrom :: Fixed a -> [Fixed a] Source # enumFromThen :: Fixed a -> Fixed a -> [Fixed a] Source # enumFromTo :: Fixed a -> Fixed a -> [Fixed a] Source # enumFromThenTo :: Fixed a -> Fixed a -> Fixed a -> [Fixed a] Source # | |
| Enum (Proxy s) Source # | Since: base-4.7.0.0 |
Defined in GHC.Internal.Data.Proxy Methods succ :: Proxy s -> Proxy s Source # pred :: Proxy s -> Proxy s Source # toEnum :: Int -> Proxy s Source # fromEnum :: Proxy s -> Int Source # enumFrom :: Proxy s -> [Proxy s] Source # enumFromThen :: Proxy s -> Proxy s -> [Proxy s] Source # enumFromTo :: Proxy s -> Proxy s -> [Proxy s] Source # enumFromThenTo :: Proxy s -> Proxy s -> Proxy s -> [Proxy s] Source # | |
| Enum a => Enum (Const a b) Source # | Since: base-4.9.0.0 |
Defined in GHC.Internal.Data.Functor.Const Methods succ :: Const a b -> Const a b Source # pred :: Const a b -> Const a b Source # toEnum :: Int -> Const a b Source # fromEnum :: Const a b -> Int Source # enumFrom :: Const a b -> [Const a b] Source # enumFromThen :: Const a b -> Const a b -> [Const a b] Source # enumFromTo :: Const a b -> Const a b -> [Const a b] Source # enumFromThenTo :: Const a b -> Const a b -> Const a b -> [Const a b] Source # | |
| Enum (f a) => Enum (Ap f a) Source # | Since: base-4.12.0.0 |
Defined in GHC.Internal.Data.Monoid Methods succ :: Ap f a -> Ap f a Source # pred :: Ap f a -> Ap f a Source # toEnum :: Int -> Ap f a Source # fromEnum :: Ap f a -> Int Source # enumFrom :: Ap f a -> [Ap f a] Source # enumFromThen :: Ap f a -> Ap f a -> [Ap f a] Source # enumFromTo :: Ap f a -> Ap f a -> [Ap f a] Source # enumFromThenTo :: Ap f a -> Ap f a -> Ap f a -> [Ap f a] Source # | |
| Enum (f a) => Enum (Alt f a) Source # | Since: base-4.8.0.0 |
Defined in GHC.Internal.Data.Semigroup.Internal Methods succ :: Alt f a -> Alt f a Source # pred :: Alt f a -> Alt f a Source # toEnum :: Int -> Alt f a Source # fromEnum :: Alt f a -> Int Source # enumFrom :: Alt f a -> [Alt f a] Source # enumFromThen :: Alt f a -> Alt f a -> [Alt f a] Source # enumFromTo :: Alt f a -> Alt f a -> [Alt f a] Source # enumFromThenTo :: Alt f a -> Alt f a -> Alt f a -> [Alt f a] Source # | |
| Coercible a b => Enum (Coercion a b) Source # | Since: base-4.7.0.0 |
Defined in GHC.Internal.Data.Type.Coercion Methods succ :: Coercion a b -> Coercion a b Source # pred :: Coercion a b -> Coercion a b Source # toEnum :: Int -> Coercion a b Source # fromEnum :: Coercion a b -> Int Source # enumFrom :: Coercion a b -> [Coercion a b] Source # enumFromThen :: Coercion a b -> Coercion a b -> [Coercion a b] Source # enumFromTo :: Coercion a b -> Coercion a b -> [Coercion a b] Source # enumFromThenTo :: Coercion a b -> Coercion a b -> Coercion a b -> [Coercion a b] Source # | |
| a ~ b => Enum (a :~: b) Source # | Since: base-4.7.0.0 |
Defined in GHC.Internal.Data.Type.Equality Methods succ :: (a :~: b) -> a :~: b Source # pred :: (a :~: b) -> a :~: b Source # toEnum :: Int -> a :~: b Source # fromEnum :: (a :~: b) -> Int Source # enumFrom :: (a :~: b) -> [a :~: b] Source # enumFromThen :: (a :~: b) -> (a :~: b) -> [a :~: b] Source # enumFromTo :: (a :~: b) -> (a :~: b) -> [a :~: b] Source # enumFromThenTo :: (a :~: b) -> (a :~: b) -> (a :~: b) -> [a :~: b] Source # | |
| a ~~ b => Enum (a :~~: b) Source # | Since: base-4.10.0.0 |
Defined in GHC.Internal.Data.Type.Equality Methods succ :: (a :~~: b) -> a :~~: b Source # pred :: (a :~~: b) -> a :~~: b Source # toEnum :: Int -> a :~~: b Source # fromEnum :: (a :~~: b) -> Int Source # enumFrom :: (a :~~: b) -> [a :~~: b] Source # enumFromThen :: (a :~~: b) -> (a :~~: b) -> [a :~~: b] Source # enumFromTo :: (a :~~: b) -> (a :~~: b) -> [a :~~: b] Source # enumFromThenTo :: (a :~~: b) -> (a :~~: b) -> (a :~~: b) -> [a :~~: b] Source # | |
| Enum (f (g a)) => Enum (Compose f g a) Source # | Since: base-4.19.0.0 |
Defined in Data.Functor.Compose Methods succ :: Compose f g a -> Compose f g a Source # pred :: Compose f g a -> Compose f g a Source # toEnum :: Int -> Compose f g a Source # fromEnum :: Compose f g a -> Int Source # enumFrom :: Compose f g a -> [Compose f g a] Source # enumFromThen :: Compose f g a -> Compose f g a -> [Compose f g a] Source # enumFromTo :: Compose f g a -> Compose f g a -> [Compose f g a] Source # enumFromThenTo :: Compose f g a -> Compose f g a -> Compose f g a -> [Compose f g a] Source # | |
class Bounded a where Source #
The Bounded class is used to name the upper and lower limits of a
type. Ord is not a superclass of Bounded since types that are not
totally ordered may also have upper and lower bounds.
The Bounded class may be derived for any enumeration type;
minBound is the first constructor listed in the data declaration
and maxBound is the last.
Bounded may also be derived for single-constructor datatypes whose
constituent types are in Bounded.
Instances
| Bounded ByteOrder Source # | Since: base-4.11.0.0 |
| Bounded All Source # | Since: base-2.1 |
| Bounded Any Source # | Since: base-2.1 |
| Bounded CBool Source # | |
| Bounded CChar Source # | |
| Bounded CInt Source # | |
| Bounded CIntMax Source # | |
| Bounded CIntPtr Source # | |
| Bounded CLLong Source # | |
| Bounded CLong Source # | |
| Bounded CPtrdiff Source # | |
| Bounded CSChar Source # | |
| Bounded CShort Source # | |
| Bounded CSigAtomic Source # | |
Defined in GHC.Internal.Foreign.C.Types | |
| Bounded CSize Source # | |
| Bounded CUChar Source # | |
| Bounded CUInt Source # | |
| Bounded CUIntMax Source # | |
| Bounded CUIntPtr Source # | |
| Bounded CULLong Source # | |
| Bounded CULong Source # | |
| Bounded CUShort Source # | |
| Bounded CWchar Source # | |
| Bounded IntPtr Source # | |
| Bounded WordPtr Source # | |
| Bounded Associativity Source # | Since: base-4.9.0.0 |
Defined in GHC.Internal.Generics | |
| Bounded DecidedStrictness Source # | Since: base-4.9.0.0 |
Defined in GHC.Internal.Generics | |
| Bounded SourceStrictness Source # | Since: base-4.9.0.0 |
Defined in GHC.Internal.Generics | |
| Bounded SourceUnpackedness Source # | Since: base-4.9.0.0 |
Defined in GHC.Internal.Generics | |
| Bounded Int16 Source # | Since: base-2.1 |
| Bounded Int32 Source # | Since: base-2.1 |
| Bounded Int64 Source # | Since: base-2.1 |
| Bounded Int8 Source # | Since: base-2.1 |
| Bounded Extension Source # | |
| Bounded CBlkCnt Source # | |
| Bounded CBlkSize Source # | |
| Bounded CClockId Source # | |
| Bounded CDev Source # | |
| Bounded CFsBlkCnt Source # | |
| Bounded CFsFilCnt Source # | |
| Bounded CGid Source # | |
| Bounded CId Source # | |
| Bounded CIno Source # | |
| Bounded CKey Source # | |
| Bounded CMode Source # | |
| Bounded CNfds Source # | |
| Bounded CNlink Source # | |
| Bounded COff Source # | |
| Bounded CPid Source # | |
| Bounded CRLim Source # | |
| Bounded CSocklen Source # | |
| Bounded CSsize Source # | |
| Bounded CTcflag Source # | |
| Bounded CUid Source # | |
| Bounded Fd Source # | |
| Bounded Ordering Source # | Since: base-2.1 |
| Bounded GeneralCategory Source # | Since: base-2.1 |
Defined in GHC.Internal.Unicode | |
| Bounded Word16 Source # | Since: base-2.1 |
| Bounded Word32 Source # | Since: base-2.1 |
| Bounded Word64 Source # | Since: base-2.1 |
| Bounded Word8 Source # | Since: base-2.1 |
| Bounded () Source # | Since: base-2.1 |
| Bounded Bool Source # | Since: base-2.1 |
| Bounded Char Source # | Since: base-2.1 |
| Bounded Int Source # | Since: base-2.1 |
| Bounded Levity Source # | Since: base-4.16.0.0 |
| Bounded VecCount Source # | Since: base-4.10.0.0 |
| Bounded VecElem Source # | Since: base-4.10.0.0 |
| Bounded Word Source # | Since: base-2.1 |
| Bounded a => Bounded (First a) Source # | Since: base-4.9.0.0 |
| Bounded a => Bounded (Last a) Source # | Since: base-4.9.0.0 |
| Bounded a => Bounded (Max a) Source # | Since: base-4.9.0.0 |
| Bounded a => Bounded (Min a) Source # | Since: base-4.9.0.0 |
| Bounded m => Bounded (WrappedMonoid m) Source # | Since: base-4.9.0.0 |
Defined in Data.Semigroup | |
| Bounded a => Bounded (And a) Source # | Since: base-4.16 |
| Bounded a => Bounded (Iff a) Source # | Since: base-4.16 |
| Bounded a => Bounded (Ior a) Source # | Since: base-4.16 |
| Bounded a => Bounded (Xor a) Source # | Since: base-4.16 |
| Bounded a => Bounded (Identity a) Source # | Since: base-4.9.0.0 |
| Bounded a => Bounded (Down a) Source # | Swaps Since: base-4.14.0.0 |
| Bounded a => Bounded (Dual a) Source # | Since: base-2.1 |
| Bounded a => Bounded (Product a) Source # | Since: base-2.1 |
| Bounded a => Bounded (Sum a) Source # | Since: base-2.1 |
| Bounded a => Bounded (Solo a) Source # | |
| Bounded (Proxy t) Source # | Since: base-4.7.0.0 |
| (Bounded a, Bounded b) => Bounded (a, b) Source # | Since: base-2.1 |
| Bounded a => Bounded (Const a b) Source # | Since: base-4.9.0.0 |
| (Applicative f, Bounded a) => Bounded (Ap f a) Source # | Since: base-4.12.0.0 |
| Coercible a b => Bounded (Coercion a b) Source # | Since: base-4.7.0.0 |
| a ~ b => Bounded (a :~: b) Source # | Since: base-4.7.0.0 |
| (Bounded a, Bounded b, Bounded c) => Bounded (a, b, c) Source # | Since: base-2.1 |
| a ~~ b => Bounded (a :~~: b) Source # | Since: base-4.10.0.0 |
| (Bounded a, Bounded b, Bounded c, Bounded d) => Bounded (a, b, c, d) Source # | Since: base-2.1 |
| Bounded (f (g a)) => Bounded (Compose f g a) Source # | Since: base-4.19.0.0 |
| (Bounded a, Bounded b, Bounded c, Bounded d, Bounded e) => Bounded (a, b, c, d, e) Source # | Since: base-2.1 |
| (Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f) => Bounded (a, b, c, d, e, f) Source # | Since: base-2.1 |
| (Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g) => Bounded (a, b, c, d, e, f, g) Source # | Since: base-2.1 |
| (Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h) => Bounded (a, b, c, d, e, f, g, h) Source # | Since: base-2.1 |
| (Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i) => Bounded (a, b, c, d, e, f, g, h, i) Source # | Since: base-2.1 |
| (Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j) => Bounded (a, b, c, d, e, f, g, h, i, j) Source # | Since: base-2.1 |
| (Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k) => Bounded (a, b, c, d, e, f, g, h, i, j, k) Source # | Since: base-2.1 |
| (Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l) Source # | Since: base-2.1 |
| (Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l, Bounded m) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l, m) Source # | Since: base-2.1 |
| (Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l, Bounded m, Bounded n) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source # | Since: base-2.1 |
| (Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l, Bounded m, Bounded n, Bounded o) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source # | Since: base-2.1 |
enumerate :: (Enum a, Bounded a) => [a] Source #
Returns a list of all values of an enum type
enumerate is often used to list all values of a custom enum data structure, such as a custom Color enum below:
data Color = Yellow | Red | Blue
deriving (Enum, Bounded, Show)
allColors :: [Color]
allColors = enumerate
-- Result: [Yellow, Red, Blue]
Note that you need to derive the Bounded type class as well, only Enum is not enough.
Enum allows for sequential enumeration, while Bounded provides the minBound and maxBound values.
enumerate is commonly used together with the TypeApplications syntax. Here is an example of using enumerate to retrieve all values of the Ordering type:
> enumerate @Ordering
- LT, EQ, GT
The @ symbol here is provided by the TypeApplications language extension.
Since: base-4.22.0.0