ghc-internal-9.1001.0: Basic libraries
Copyright(c) The University of Glasgow 1992-2002
Licensesee libraries/base/LICENSE
Maintainerghc-devs@haskell.org
Stabilityinternal
Portabilitynon-portable (GHC extensions)
Safe HaskellTrustworthy
LanguageHaskell2010

GHC.Internal.Enum

Description

The Enum and Bounded classes.

Synopsis

Documentation

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

Bounded All Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Data.Semigroup.Internal

Bounded Any Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Data.Semigroup.Internal

Bounded CBool Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded CChar Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded CInt Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded CIntMax Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded CIntPtr Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded CLLong Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded CLong Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded CPtrdiff Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded CSChar Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded CShort Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded CSigAtomic Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded CSize Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded CUChar Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded CUInt Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded CUIntMax Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded CUIntPtr Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded CULLong Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded CULong Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded CUShort Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded CWchar Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded IntPtr Source # 
Instance details

Defined in GHC.Internal.Foreign.Ptr

Bounded WordPtr Source # 
Instance details

Defined in GHC.Internal.Foreign.Ptr

Bounded Associativity Source #

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Generics

Bounded DecidedStrictness Source #

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Generics

Bounded SourceStrictness Source #

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Generics

Bounded SourceUnpackedness Source #

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Generics

Bounded Int16 Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Int

Bounded Int32 Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Int

Bounded Int64 Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Int

Bounded Int8 Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Int

Bounded CBlkCnt Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Bounded CBlkSize Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Bounded CClockId Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Bounded CDev Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Bounded CFsBlkCnt Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Bounded CFsFilCnt Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Bounded CGid Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Bounded CId Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Bounded CIno Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Bounded CKey Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Bounded CMode Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Bounded CNfds Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Bounded CNlink Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Bounded COff Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Bounded CPid Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Bounded CRLim Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Bounded CSocklen Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Bounded CSsize Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Bounded CTcflag Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Bounded CUid Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Bounded Fd Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Bounded GeneralCategory Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Unicode

Bounded Word16 Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Bounded Word32 Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Bounded Word64 Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Bounded Word8 Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Bounded Ordering Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Enum

Bounded () Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Enum

Methods

minBound :: () Source #

maxBound :: () Source #

Bounded Bool Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Enum

Bounded Char Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Enum

Bounded Int Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Enum

Bounded Levity Source #

@since base-4.16.0.0

Instance details

Defined in GHC.Internal.Enum

Bounded VecCount Source #

@since base-4.10.0.0

Instance details

Defined in GHC.Internal.Enum

Bounded VecElem Source #

@since base-4.10.0.0

Instance details

Defined in GHC.Internal.Enum

Bounded Word Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Enum

Bounded a => Bounded (And a) Source #

@since base-4.16

Instance details

Defined in GHC.Internal.Data.Bits

Bounded a => Bounded (Iff a) Source #

@since base-4.16

Instance details

Defined in GHC.Internal.Data.Bits

Bounded a => Bounded (Ior a) Source #

@since base-4.16

Instance details

Defined in GHC.Internal.Data.Bits

Bounded a => Bounded (Xor a) Source #

@since base-4.16

Instance details

Defined in GHC.Internal.Data.Bits

Bounded a => Bounded (Identity a) Source #

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Data.Functor.Identity

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

Bounded a => Bounded (Dual a) Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Data.Semigroup.Internal

Bounded a => Bounded (Product a) Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Data.Semigroup.Internal

Bounded a => Bounded (Sum a) Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Data.Semigroup.Internal

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

Defined in GHC.Internal.Enum

Bounded (Proxy t) Source #

@since base-4.7.0.0

Instance details

Defined in GHC.Internal.Data.Proxy

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

@since base-2.01

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

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.01

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.01

Instance details

Defined in GHC.Internal.Enum

Methods

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

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

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

@since base-2.01

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.01

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.01

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.01

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.01

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.01

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.01

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.01

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.01

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.01

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.01

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 #

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:

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

@since base-4.11.0.0

Instance details

Defined in GHC.Internal.ByteOrder

Enum ClosureType Source # 
Instance details

Defined in GHC.Internal.ClosureTypes

Enum CBool Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CChar Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CClock Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CDouble Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CFloat Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CInt Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CIntMax Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CIntPtr Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CLLong Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CLong Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CPtrdiff Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CSChar Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CSUSeconds Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CShort Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CSigAtomic Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CSize Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CTime Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CUChar Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CUInt Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CUIntMax Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CUIntPtr Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CULLong Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CULong Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CUSeconds Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CUShort Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CWchar Source # 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum IntPtr Source # 
Instance details

Defined in GHC.Internal.Foreign.Ptr

Enum WordPtr Source # 
Instance details

Defined in GHC.Internal.Foreign.Ptr

Enum Associativity Source #

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Generics

Enum DecidedStrictness Source #

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Generics

Enum SourceStrictness Source #

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Generics

Enum SourceUnpackedness Source #

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Generics

Enum SeekMode Source #

@since base-4.2.0.0

Instance details

Defined in GHC.Internal.IO.Device

Enum IOMode Source #

@since base-4.2.0.0

Instance details

Defined in GHC.Internal.IO.IOMode

Enum Int16 Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Int

Enum Int32 Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Int

Enum Int64 Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Int

Enum Int8 Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Int

Enum DoCostCentres Source #

@since base-4.8.0.0

Instance details

Defined in GHC.Internal.RTS.Flags

Enum DoHeapProfile Source #

@since base-4.8.0.0

Instance details

Defined in GHC.Internal.RTS.Flags

Enum DoTrace Source #

@since base-4.8.0.0

Instance details

Defined in GHC.Internal.RTS.Flags

Enum GiveGCStats Source #

@since base-4.8.0.0

Instance details

Defined in GHC.Internal.RTS.Flags

Enum IoSubSystem Source #

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.RTS.Flags

Enum CBlkCnt Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Enum CBlkSize Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Enum CCc Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Enum CClockId Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Enum CDev Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Enum CFsBlkCnt Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Enum CFsFilCnt Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Enum CGid Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Enum CId Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Enum CIno Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Enum CKey Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Enum CMode Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Enum CNfds Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Enum CNlink Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Enum COff Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Enum CPid Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Enum CRLim Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Enum CSocklen Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Enum CSpeed Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Enum CSsize Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Enum CTcflag Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

Enum CUid Source # 
Instance details

Defined in GHC.Internal.System.Posix.Types

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

@since base-2.01

Instance details

Defined in GHC.Internal.Unicode

Enum Word16 Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Enum Word32 Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Enum Word64 Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Enum Word8 Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Enum Ordering Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Enum

Enum Integer Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Enum

Enum Natural Source #

@since base-4.8.0.0

Instance details

Defined in GHC.Internal.Enum

Enum () Source #

@since base-2.01

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.01

Instance details

Defined in GHC.Internal.Enum

Enum Char Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Enum

Enum Double Source #

@since base-2.01

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

Defined in GHC.Internal.Float

Enum Float Source #

@since base-2.01

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

Defined in GHC.Internal.Float

Enum Int Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Enum

Enum Levity Source #

@since base-4.16.0.0

Instance details

Defined in GHC.Internal.Enum

Enum VecCount Source #

@since base-4.10.0.0

Instance details

Defined in GHC.Internal.Enum

Enum VecElem Source #

@since base-4.10.0.0

Instance details

Defined in GHC.Internal.Enum

Enum Word Source #

@since base-2.01

Instance details

Defined in GHC.Internal.Enum

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

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

boundedEnumFrom :: (Enum a, Bounded a) => a -> [a] Source #

boundedEnumFromThen :: (Enum a, Bounded a) => a -> a -> [a] Source #

toEnumError :: Show a => String -> Int -> (a, a) -> b Source #

fromEnumError :: Show a => String -> a -> b Source #