Spec-Zone.ru › Haskell 9

Data.Enum

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

Description

The Enum class.

Since: base-4.20.0.0

class Enum a where Source

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 succ maxBound and pred minBound should result in a runtime error.
  • fromEnum and toEnum should give a runtime error if the result value is not representable in the result type. For example, toEnum 7 :: Bool is an error.
  • enumFrom and enumFromThen should 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                = minBound

Minimal complete definition

toEnum, fromEnum

Methods

succ :: a -> a Source

Successor of a value. For numeric types, succ adds 1.

pred :: a -> a Source

Predecessor of a value. For numeric types, pred subtracts 1.

toEnum :: Int -> a Source

Convert from an Int.

fromEnum :: a -> Int Source

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.

enumFrom :: a -> [a] Source

Used in Haskell's translation of [n..] with [n..] = enumFrom n, a possible implementation being enumFrom n = n : enumFrom (succ n).

Examples
Expand
  • 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
Expand
  • 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
Expand
  • 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
Expand
  • enumFromThenTo 4 2 -6 :: [Integer] = [4,2,0,-2,-4,-6]
  • enumFromThenTo 6 8 2 :: [Int] = []
Instances
Instances details
Enum IoManagerFlag Source
Instance details

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

Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

succ :: CInt -> CInt Source

pred :: CInt -> CInt Source

toEnum :: Int -> CInt Source

fromEnum :: CInt -> Int Source

enumFrom :: CInt -> [CInt] Source

enumFromThen :: CInt -> CInt -> [CInt] Source

enumFromTo :: CInt -> CInt -> [CInt] Source

enumFromThenTo :: CInt -> CInt -> CInt -> [CInt] Source

Enum CIntMax Source
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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

Instance details

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

Instance details

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

Instance details

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

Instance details

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
Instance details

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

Instance details

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

Instance details

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
Instance details

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

Instance details

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

Instance details

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

Instance details

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

Instance details

Defined in GHC.Internal.Int

Methods

succ :: Int8 -> Int8 Source

pred :: Int8 -> Int8 Source

toEnum :: Int -> Int8 Source

fromEnum :: Int8 -> Int Source

enumFrom :: Int8 -> [Int8] Source

enumFromThen :: Int8 -> Int8 -> [Int8] Source

enumFromTo :: Int8 -> Int8 -> [Int8] Source

enumFromThenTo :: Int8 -> Int8 -> Int8 -> [Int8] Source

Enum Extension Source
Instance details

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

Instance details

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

Instance details

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

Instance details

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

Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

succ :: CCc -> CCc Source

pred :: CCc -> CCc Source

toEnum :: Int -> CCc Source

fromEnum :: CCc -> Int Source

enumFrom :: CCc -> [CCc] Source

enumFromThen :: CCc -> CCc -> [CCc] Source

enumFromTo :: CCc -> CCc -> [CCc] Source

enumFromThenTo :: CCc -> CCc -> CCc -> [CCc] Source

Enum CClockId Source
Instance details

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
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

succ :: CDev -> CDev Source

pred :: CDev -> CDev Source

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
Instance details

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
Instance details

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
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

succ :: CGid -> CGid Source

pred :: CGid -> CGid Source

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
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

succ :: CId -> CId Source

pred :: CId -> CId Source

toEnum :: Int -> CId Source

fromEnum :: CId -> Int Source

enumFrom :: CId -> [CId] Source

enumFromThen :: CId -> CId -> [CId] Source

enumFromTo :: CId -> CId -> [CId] Source

enumFromThenTo :: CId -> CId -> CId -> [CId] Source

Enum CIno Source
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

succ :: CIno -> CIno Source

pred :: CIno -> CIno Source

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
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

succ :: CKey -> CKey Source

pred :: CKey -> CKey Source

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
Instance details

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
Instance details

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
Instance details

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
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

succ :: COff -> COff Source

pred :: COff -> COff Source

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
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

succ :: CPid -> CPid Source

pred :: CPid -> CPid Source

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

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
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

succ :: CUid -> CUid Source

pred :: CUid -> CUid Source

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
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

succ :: Fd -> Fd Source

pred :: Fd -> Fd Source

toEnum :: Int -> Fd Source

fromEnum :: Fd -> Int Source

enumFrom :: Fd -> [Fd] Source

enumFromThen :: Fd -> Fd -> [Fd] Source

enumFromTo :: Fd -> Fd -> [Fd] Source

enumFromThenTo :: Fd -> Fd -> Fd -> [Fd] Source

Enum Ordering Source

Since: base-2.1

Instance details

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

Instance details

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

Instance details

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

Instance details

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

Instance details

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

Instance details

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

Instance details

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

Instance details

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

Instance details

Defined in GHC.Internal.Enum

Methods

succ :: () -> () Source

pred :: () -> () Source

toEnum :: Int -> () Source

fromEnum :: () -> Int Source

enumFrom :: () -> [()] Source

enumFromThen :: () -> () -> [()] Source

enumFromTo :: () -> () -> [()] Source

enumFromThenTo :: () -> () -> () -> [()] Source

Enum Bool Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Enum

Methods

succ :: Bool -> Bool Source

pred :: Bool -> Bool Source

toEnum :: Int -> Bool Source

fromEnum :: Bool -> Int Source

enumFrom :: Bool -> [Bool] Source

enumFromThen :: Bool -> Bool -> [Bool] Source

enumFromTo :: Bool -> Bool -> [Bool] Source

enumFromThenTo :: Bool -> Bool -> Bool -> [Bool] Source

Enum Char Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Enum

Methods

succ :: Char -> Char Source

pred :: Char -> Char Source

toEnum :: Int -> Char Source

fromEnum :: Char -> Int Source

enumFrom :: Char -> [Char] Source

enumFromThen :: Char -> Char -> [Char] Source

enumFromTo :: Char -> Char -> [Char] Source

enumFromThenTo :: Char -> Char -> Char -> [Char] Source

Enum Double Source

fromEnum just truncates its argument, beware of all sorts of overflows.

List generators have extremely peculiar behavior, mandated by Haskell Report 2010:

>>> [0..1.5]
[0.0,1.0,2.0]

Since: base-2.1

Instance details

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

fromEnum just truncates its argument, beware of all sorts of overflows.

List generators have extremely peculiar behavior, mandated by Haskell Report 2010:

>>> [0..1.5 :: Float]
[0.0,1.0,2.0]

Since: base-2.1

Instance details

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

Instance details

Defined in GHC.Internal.Enum

Methods

succ :: Int -> Int Source

pred :: Int -> Int Source

toEnum :: Int -> Int Source

fromEnum :: Int -> Int Source

enumFrom :: Int -> [Int] Source

enumFromThen :: Int -> Int -> [Int] Source

enumFromTo :: Int -> Int -> [Int] Source

enumFromThenTo :: Int -> Int -> Int -> [Int] Source

Enum Levity Source

Since: base-4.16.0.0

Instance details

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

Instance details

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

Instance details

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

Instance details

Defined in GHC.Internal.Enum

Methods

succ :: Word -> Word Source

pred :: Word -> Word Source

toEnum :: Int -> Word Source

fromEnum :: Word -> Int Source

enumFrom :: Word -> [Word] Source

enumFromThen :: Word -> Word -> [Word] Source

enumFromTo :: Word -> Word -> [Word] Source

enumFromThenTo :: Word -> Word -> Word -> [Word] Source

Enum a => Enum (First a) Source

Since: base-4.9.0.0

Instance details

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

Instance details

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

Instance details

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

Instance details

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

Instance details

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

Instance details

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

Instance details

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

Instance details

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

Instance details

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

Instance details

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 succ and pred of the underlying type.

Since: base-4.18.0.0

Instance details

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

Instance details

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
Instance details

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, succ and pred typically add and subtract 1, respectively. This is not true in the case of Fixed, whose successor and predecessor functions intuitively return the "next" and "previous" values in the enumeration. The results of these functions thus depend on the resolution of the Fixed value. For example, when enumerating values of resolution 10^-3 of type Milli = Fixed E3,

>>> succ (0.000 :: Milli)
0.001

and likewise

>>> pred (0.000 :: Milli)
-0.001

In other words, succ and pred increment and decrement a fixed-precision value by the least amount such that the value's resolution is unchanged. For example, 10^-12 is the smallest (positive) amount that can be added to a value of type Pico = Fixed E12 without changing its resolution, and so

>>> succ (0.000000000000 :: Pico)
0.000000000001

and similarly

>>> pred (0.000000000000 :: Pico)
-0.000000000001

This is worth bearing in mind when defining Fixed arithmetic sequences. In particular, you may be forgiven for thinking the sequence

  [1..10] :: [Pico]

evaluates to [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] :: [Pico].

However, this is not true. On the contrary, similarly to the above implementations of succ and pred, enumFromTo :: Pico -> Pico -> [Pico] has a "step size" of 10^-12. Hence, the list [1..10] :: [Pico] has the form

  [1.000000000000, 1.00000000001, 1.00000000002, ..., 10.000000000000]

and contains 9 * 10^12 + 1 values.

Since: base-2.1

Instance details

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

Instance details

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

Instance details

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

Instance details

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

Instance details

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

Instance details

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

Instance details

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

Instance details

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

Instance details

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.

Methods

minBound :: a Source

maxBound :: a Source

Instances
Instances details
Bounded ByteOrder Source

Since: base-4.11.0.0

Instance details

Defined in GHC.Internal.ByteOrder

Methods

minBound :: ByteOrder Source

maxBound :: ByteOrder Source

Bounded All Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Data.Semigroup.Internal

Methods

minBound :: All Source

maxBound :: All Source

Bounded Any Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Data.Semigroup.Internal

Methods

minBound :: Any Source

maxBound :: Any Source

Bounded CBool Source
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

minBound :: CBool Source

maxBound :: CBool Source

Bounded CChar Source
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

minBound :: CChar Source

maxBound :: CChar Source

Bounded CInt Source
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

minBound :: CInt Source

maxBound :: CInt Source

Bounded CIntMax Source
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

minBound :: CIntMax Source

maxBound :: CIntMax Source

Bounded CIntPtr Source
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

minBound :: CIntPtr Source

maxBound :: CIntPtr Source

Bounded CLLong Source
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

minBound :: CLLong Source

maxBound :: CLLong Source

Bounded CLong Source
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

minBound :: CLong Source

maxBound :: CLong Source

Bounded CPtrdiff Source
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

minBound :: CPtrdiff Source

maxBound :: CPtrdiff Source

Bounded CSChar Source
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

minBound :: CSChar Source

maxBound :: CSChar Source

Bounded CShort Source
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

minBound :: CShort Source

maxBound :: CShort Source

Bounded CSigAtomic Source
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

minBound :: CSigAtomic Source

maxBound :: CSigAtomic Source

Bounded CSize Source
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

minBound :: CSize Source

maxBound :: CSize Source

Bounded CUChar Source
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

minBound :: CUChar Source

maxBound :: CUChar Source

Bounded CUInt Source
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

minBound :: CUInt Source

maxBound :: CUInt Source

Bounded CUIntMax Source
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

minBound :: CUIntMax Source

maxBound :: CUIntMax Source

Bounded CUIntPtr Source
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

minBound :: CUIntPtr Source

maxBound :: CUIntPtr Source

Bounded CULLong Source
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

minBound :: CULLong Source

maxBound :: CULLong Source

Bounded CULong Source
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

minBound :: CULong Source

maxBound :: CULong Source

Bounded CUShort Source
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

minBound :: CUShort Source

maxBound :: CUShort Source

Bounded CWchar Source
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

minBound :: CWchar Source

maxBound :: CWchar Source

Bounded IntPtr Source
Instance details

Defined in GHC.Internal.Foreign.Ptr

Methods

minBound :: IntPtr Source

maxBound :: IntPtr Source

Bounded WordPtr Source
Instance details

Defined in GHC.Internal.Foreign.Ptr

Methods

minBound :: WordPtr Source

maxBound :: WordPtr Source

Bounded Associativity Source

Since: base-4.9.0.0

Instance details

Defined in GHC.Internal.Generics

Methods

minBound :: Associativity Source

maxBound :: Associativity Source

Bounded DecidedStrictness Source

Since: base-4.9.0.0

Instance details

Defined in GHC.Internal.Generics

Methods

minBound :: DecidedStrictness Source

maxBound :: DecidedStrictness Source

Bounded SourceStrictness Source

Since: base-4.9.0.0

Instance details

Defined in GHC.Internal.Generics

Methods

minBound :: SourceStrictness Source

maxBound :: SourceStrictness Source

Bounded SourceUnpackedness Source

Since: base-4.9.0.0

Instance details

Defined in GHC.Internal.Generics

Methods

minBound :: SourceUnpackedness Source

maxBound :: SourceUnpackedness Source

Bounded Int16 Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Int

Methods

minBound :: Int16 Source

maxBound :: Int16 Source

Bounded Int32 Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Int

Methods

minBound :: Int32 Source

maxBound :: Int32 Source

Bounded Int64 Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Int

Methods

minBound :: Int64 Source

maxBound :: Int64 Source

Bounded Int8 Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Int

Methods

minBound :: Int8 Source

maxBound :: Int8 Source

Bounded Extension Source
Instance details

Defined in GHC.Internal.LanguageExtensions

Methods

minBound :: Extension Source

maxBound :: Extension Source

Bounded CBlkCnt Source
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

minBound :: CBlkCnt Source

maxBound :: CBlkCnt Source

Bounded CBlkSize Source
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

minBound :: CBlkSize Source

maxBound :: CBlkSize Source

Bounded CClockId Source
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

minBound :: CClockId Source

maxBound :: CClockId Source

Bounded CDev Source
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

minBound :: CDev Source

maxBound :: CDev Source

Bounded CFsBlkCnt Source
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

minBound :: CFsBlkCnt Source

maxBound :: CFsBlkCnt Source

Bounded CFsFilCnt Source
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

minBound :: CFsFilCnt Source

maxBound :: CFsFilCnt Source

Bounded CGid Source
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

minBound :: CGid Source

maxBound :: CGid Source

Bounded CId Source
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

minBound :: CId Source

maxBound :: CId Source

Bounded CIno Source
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

minBound :: CIno Source

maxBound :: CIno Source

Bounded CKey Source
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

minBound :: CKey Source

maxBound :: CKey Source

Bounded CMode Source
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

minBound :: CMode Source

maxBound :: CMode Source

Bounded CNfds Source
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

minBound :: CNfds Source

maxBound :: CNfds Source

Bounded CNlink Source
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

minBound :: CNlink Source

maxBound :: CNlink Source

Bounded COff Source
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

minBound :: COff Source

maxBound :: COff Source

Bounded CPid Source
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

minBound :: CPid Source

maxBound :: CPid Source

Bounded CRLim Source
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

minBound :: CRLim Source

maxBound :: CRLim Source

Bounded CSocklen Source
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

minBound :: CSocklen Source

maxBound :: CSocklen Source

Bounded CSsize Source
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

minBound :: CSsize Source

maxBound :: CSsize Source

Bounded CTcflag Source
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

minBound :: CTcflag Source

maxBound :: CTcflag Source

Bounded CUid Source
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

minBound :: CUid Source

maxBound :: CUid Source

Bounded Fd Source
Instance details

Defined in GHC.Internal.System.Posix.Types

Methods

minBound :: Fd Source

maxBound :: Fd Source

Bounded Ordering Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Enum

Methods

minBound :: Ordering Source

maxBound :: Ordering Source

Bounded GeneralCategory Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Unicode

Methods

minBound :: GeneralCategory Source

maxBound :: GeneralCategory Source

Bounded Word16 Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Word

Methods

minBound :: Word16 Source

maxBound :: Word16 Source

Bounded Word32 Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Word

Methods

minBound :: Word32 Source

maxBound :: Word32 Source

Bounded Word64 Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Word

Methods

minBound :: Word64 Source

maxBound :: Word64 Source

Bounded Word8 Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Word

Methods

minBound :: Word8 Source

maxBound :: Word8 Source

Bounded () Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Enum

Methods

minBound :: () Source

maxBound :: () Source

Bounded Bool Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Enum

Methods

minBound :: Bool Source

maxBound :: Bool Source

Bounded Char Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Enum

Methods

minBound :: Char Source

maxBound :: Char Source

Bounded Int Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Enum

Methods

minBound :: Int Source

maxBound :: Int Source

Bounded Levity Source

Since: base-4.16.0.0

Instance details

Defined in GHC.Internal.Enum

Methods

minBound :: Levity Source

maxBound :: Levity Source

Bounded VecCount Source

Since: base-4.10.0.0

Instance details

Defined in GHC.Internal.Enum

Methods

minBound :: VecCount Source

maxBound :: VecCount Source

Bounded VecElem Source

Since: base-4.10.0.0

Instance details

Defined in GHC.Internal.Enum

Methods

minBound :: VecElem Source

maxBound :: VecElem Source

Bounded Word Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Enum

Methods

minBound :: Word Source

maxBound :: Word Source

Bounded a => Bounded (First a) Source

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

minBound :: First a Source

maxBound :: First a Source

Bounded a => Bounded (Last a) Source

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

minBound :: Last a Source

maxBound :: Last a Source

Bounded a => Bounded (Max a) Source

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

minBound :: Max a Source

maxBound :: Max a Source

Bounded a => Bounded (Min a) Source

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

minBound :: Min a Source

maxBound :: Min a Source

Bounded m => Bounded (WrappedMonoid m) Source

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

minBound :: WrappedMonoid m Source

maxBound :: WrappedMonoid m Source

Bounded a => Bounded (And a) Source

Since: base-4.16

Instance details

Defined in GHC.Internal.Data.Bits

Methods

minBound :: And a Source

maxBound :: And a Source

Bounded a => Bounded (Iff a) Source

Since: base-4.16

Instance details

Defined in GHC.Internal.Data.Bits

Methods

minBound :: Iff a Source

maxBound :: Iff a Source

Bounded a => Bounded (Ior a) Source

Since: base-4.16

Instance details

Defined in GHC.Internal.Data.Bits

Methods

minBound :: Ior a Source

maxBound :: Ior a Source

Bounded a => Bounded (Xor a) Source

Since: base-4.16

Instance details

Defined in GHC.Internal.Data.Bits

Methods

minBound :: Xor a Source

maxBound :: Xor a Source

Bounded a => Bounded (Identity a) Source

Since: base-4.9.0.0

Instance details

Defined in GHC.Internal.Data.Functor.Identity

Methods

minBound :: Identity a Source

maxBound :: Identity a Source

Bounded a => Bounded (Down a) Source

Swaps minBound and maxBound of the underlying type.

Since: base-4.14.0.0

Instance details

Defined in GHC.Internal.Data.Ord

Methods

minBound :: Down a Source

maxBound :: Down a Source

Bounded a => Bounded (Dual a) Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Data.Semigroup.Internal

Methods

minBound :: Dual a Source

maxBound :: Dual a Source

Bounded a => Bounded (Product a) Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Data.Semigroup.Internal

Methods

minBound :: Product a Source

maxBound :: Product a Source

Bounded a => Bounded (Sum a) Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Data.Semigroup.Internal

Methods

minBound :: Sum a Source

maxBound :: Sum a Source

Bounded a => Bounded (Solo a) Source
Instance details

Defined in GHC.Internal.Enum

Methods

minBound :: Solo a Source

maxBound :: Solo a Source

Bounded (Proxy t) Source

Since: base-4.7.0.0

Instance details

Defined in GHC.Internal.Data.Proxy

Methods

minBound :: Proxy t Source

maxBound :: Proxy t Source

(Bounded a, Bounded b) => Bounded (a, b) Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Enum

Methods

minBound :: (a, b) Source

maxBound :: (a, b) Source

Bounded a => Bounded (Const a b) Source

Since: base-4.9.0.0

Instance details

Defined in GHC.Internal.Data.Functor.Const

Methods

minBound :: Const a b Source

maxBound :: Const a b Source

(Applicative f, Bounded a) => Bounded (Ap f a) Source

Since: base-4.12.0.0

Instance details

Defined in GHC.Internal.Data.Monoid

Methods

minBound :: Ap f a Source

maxBound :: Ap f a Source

Coercible a b => Bounded (Coercion a b) Source

Since: base-4.7.0.0

Instance details

Defined in GHC.Internal.Data.Type.Coercion

Methods

minBound :: Coercion a b Source

maxBound :: Coercion a b Source

a ~ b => Bounded (a :~: b) Source

Since: base-4.7.0.0

Instance details

Defined in GHC.Internal.Data.Type.Equality

Methods

minBound :: a :~: b Source

maxBound :: a :~: b Source

(Bounded a, Bounded b, Bounded c) => Bounded (a, b, c) Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Enum

Methods

minBound :: (a, b, c) Source

maxBound :: (a, b, c) Source

a ~~ b => Bounded (a :~~: b) Source

Since: base-4.10.0.0

Instance details

Defined in GHC.Internal.Data.Type.Equality

Methods

minBound :: a :~~: b Source

maxBound :: a :~~: b Source

(Bounded a, Bounded b, Bounded c, Bounded d) => Bounded (a, b, c, d) Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Enum

Methods

minBound :: (a, b, c, d) Source

maxBound :: (a, b, c, d) Source

Bounded (f (g a)) => Bounded (Compose f g a) Source

Since: base-4.19.0.0

Instance details

Defined in Data.Functor.Compose

Methods

minBound :: Compose f g a Source

maxBound :: Compose f g a Source

(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e) => Bounded (a, b, c, d, e) Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Enum

Methods

minBound :: (a, b, c, d, e) Source

maxBound :: (a, b, c, d, e) Source

(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f) => Bounded (a, b, c, d, e, f) Source

Since: base-2.1

Instance details

Defined in GHC.Internal.Enum

Methods

minBound :: (a, b, c, d, e, f) Source

maxBound :: (a, b, c, d, e, f) Source

(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

Instance details

Defined in GHC.Internal.Enum

Methods

minBound :: (a, b, c, d, e, f, g) Source

maxBound :: (a, b, c, d, e, f, g) Source

(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

Instance details

Defined in GHC.Internal.Enum

Methods

minBound :: (a, b, c, d, e, f, g, h) Source

maxBound :: (a, b, c, d, e, f, g, h) Source

(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

Instance details

Defined in GHC.Internal.Enum

Methods

minBound :: (a, b, c, d, e, f, g, h, i) Source

maxBound :: (a, b, c, d, e, f, g, h, i) Source

(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

Instance details

Defined in GHC.Internal.Enum

Methods

minBound :: (a, b, c, d, e, f, g, h, i, j) Source

maxBound :: (a, b, c, d, e, f, g, h, i, j) Source

(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

Instance details

Defined in GHC.Internal.Enum

Methods

minBound :: (a, b, c, d, e, f, g, h, i, j, k) Source

maxBound :: (a, b, c, d, e, f, g, h, i, j, k) Source

(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

Instance details

Defined in GHC.Internal.Enum

Methods

minBound :: (a, b, c, d, e, f, g, h, i, j, k, l) Source

maxBound :: (a, b, c, d, e, f, g, h, i, j, k, l) Source

(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

Instance details

Defined in GHC.Internal.Enum

Methods

minBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m) Source

maxBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m) Source

(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

Instance details

Defined in GHC.Internal.Enum

Methods

minBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source

maxBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source

(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

Instance details

Defined in GHC.Internal.Enum

Methods

minBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source

maxBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source

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

© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/9.14.1/docs/libraries/base-4.22.0.0-66f8/Data-Enum.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API