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

GHC.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 Bool #

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded Char #

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded Int #

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded Int8 #

Since: base-2.1

Instance details

Defined in GHC.Int

Bounded Int16 #

Since: base-2.1

Instance details

Defined in GHC.Int

Bounded Int32 #

Since: base-2.1

Instance details

Defined in GHC.Int

Bounded Int64 #

Since: base-2.1

Instance details

Defined in GHC.Int

Bounded Ordering #

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded Word #

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded Word8 #

Since: base-2.1

Instance details

Defined in GHC.Word

Bounded Word16 #

Since: base-2.1

Instance details

Defined in GHC.Word

Bounded Word32 #

Since: base-2.1

Instance details

Defined in GHC.Word

Bounded Word64 #

Since: base-2.1

Instance details

Defined in GHC.Word

Bounded VecCount #

Since: base-4.10.0.0

Instance details

Defined in GHC.Enum

Bounded VecElem #

Since: base-4.10.0.0

Instance details

Defined in GHC.Enum

Bounded () #

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: () Source #

maxBound :: () Source #

Bounded GeneralCategory #

Since: base-2.1

Instance details

Defined in GHC.Unicode

Instance details

Defined in Foreign.Ptr

Instance details

Defined in Foreign.Ptr

Instance details

Defined in Foreign.C.Types

Instance details

Defined in Foreign.C.Types

Instance details

Defined in Foreign.C.Types

Instance details

Defined in Foreign.C.Types

Instance details

Defined in Foreign.C.Types

Instance details

Defined in Foreign.C.Types

Instance details

Defined in Foreign.C.Types

Instance details

Defined in Foreign.C.Types

Instance details

Defined in Foreign.C.Types

Instance details

Defined in Foreign.C.Types

Instance details

Defined in Foreign.C.Types

Instance details

Defined in Foreign.C.Types

Instance details

Defined in Foreign.C.Types

Instance details

Defined in Foreign.C.Types

Instance details

Defined in Foreign.C.Types

Instance details

Defined in Foreign.C.Types

Instance details

Defined in Foreign.C.Types

Instance details

Defined in Foreign.C.Types

Instance details

Defined in Foreign.C.Types

Instance details

Defined in Foreign.C.Types

Bounded DecidedStrictness #

Since: base-4.9.0.0

Bounded SourceStrictness #

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Bounded SourceUnpackedness #

Since: base-4.9.0.0

Bounded Associativity #

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Bounded Any #

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Bounded All #

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Bounded ByteOrder #

Since: base-4.11.0.0

Instance details

Defined in GHC.ByteOrder

Bounded a => Bounded (Down a) #

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Bounded a => Bounded (Product a) #

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Bounded a => Bounded (Sum a) #

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

minBound :: Sum a Source #

maxBound :: Sum a Source #

Bounded a => Bounded (Dual a) #

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Bounded a => Bounded (Identity a) #

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Bounded m => Bounded (WrappedMonoid m) #

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Bounded a => Bounded (Last a) #

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Bounded a => Bounded (First a) #

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Bounded a => Bounded (Max a) #

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

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

minBound :: Min a Source #

maxBound :: Min a Source #

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b) Source #

maxBound :: (a, b) Source #

Bounded (Proxy t) #

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

minBound :: a :~: b Source #

maxBound :: a :~: b Source #

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

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Coercion

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

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

minBound :: Ap f a Source #

maxBound :: Ap f a Source #

Bounded a => Bounded (Const a b) #

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

minBound :: Const a b Source #

maxBound :: Const a b Source #

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Equality

Methods

minBound :: a :~~: b Source #

maxBound :: a :~~: b Source #

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

Since: base-2.1

Instance details

Defined in GHC.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) #

Since: base-2.1

Instance details

Defined in GHC.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) #

Since: base-2.1

Instance details

Defined in GHC.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) #

Since: base-2.1

Instance details

Defined in GHC.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) #

Since: base-2.1

Instance details

Defined in GHC.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) #

Since: base-2.1

Instance details

Defined in GHC.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) #

Since: base-2.1

Instance details

Defined in GHC.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) #

Since: base-2.1

Instance details

Defined in GHC.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) #

Since: base-2.1

Instance details

Defined in GHC.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) #

Since: base-2.1

Instance details

Defined in GHC.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) #

Since: base-2.1

Instance details

Defined in GHC.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 #

the successor of a value. For numeric types, succ adds 1.

pred :: a -> a Source #

the 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). For example:

  • 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 For example:

  • 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 = []. For example:

  • 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 = [] For example:

  • enumFromThenTo 4 2 -6 :: [Integer] = [4,2,0,-2,-4,-6]
  • enumFromThenTo 6 8 2 :: [Int] = []

Instances

Instances details
Enum Bool #

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Char #

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Double #

Since: base-2.1

Enum Float #

Since: base-2.1

Enum Int #

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Int8 #

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int16 #

Since: base-2.1

Enum Int32 #

Since: base-2.1

Enum Int64 #

Since: base-2.1

Enum Integer #

Since: base-2.1

Enum Natural #

Since: base-4.8.0.0

Enum Ordering #

Since: base-2.1

Enum Word #

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Word8 #

Since: base-2.1

Enum Word16 #

Since: base-2.1

Enum Word32 #

Since: base-2.1

Enum Word64 #

Since: base-2.1

Enum VecCount #

Since: base-4.10.0.0

Enum VecElem #

Since: base-4.10.0.0

Enum () #

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: () -> () Source #

pred :: () -> () Source #

toEnum :: Int -> () Source #

fromEnum :: () -> Int Source #

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

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

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

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

Enum GeneralCategory #

Since: base-2.1

Enum IOMode #

Since: base-4.2.0.0

Instance details

Defined in Foreign.C.Types

Enum DecidedStrictness #

Since: base-4.9.0.0

Enum SourceStrictness #

Since: base-4.9.0.0

Enum SourceUnpackedness #

Since: base-4.9.0.0

Enum Associativity #

Since: base-4.9.0.0

Enum SeekMode #

Since: base-4.2.0.0

Instance details

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

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Instance details

Defined in System.Posix.Types

Enum ByteOrder #

Since: base-4.11.0.0

Enum DoTrace #

Since: base-4.8.0.0

Enum DoHeapProfile #

Since: base-4.8.0.0

Enum DoCostCentres #

Since: base-4.8.0.0

Enum GiveGCStats #

Since: base-4.8.0.0

Integral a => Enum (Ratio a) #

Since: base-2.0.1

Instance details

Defined in GHC.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 (Down a) #

Since: base-4.14.0.0

Instance details

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

Enum a => Enum (Identity a) #

Since: base-4.9.0.0

Enum a => Enum (WrappedMonoid a) #

Since: base-4.9.0.0

Enum a => Enum (Last a) #

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 (First a) #

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 (Max a) #

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

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 (Proxy s) #

Since: base-4.7.0.0

Instance details

Defined in 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 (Fixed a) #

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 #

a ~ b => Enum (a :~: b) #

Since: base-4.7.0.0

Instance details

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

Coercible a b => Enum (Coercion a b) #

Since: base-4.7.0.0

Instance details

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

Enum (f a) => Enum (Alt f a) #

Since: base-4.8.0.0

Instance details

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

Enum (f a) => Enum (Ap f a) #

Since: base-4.12.0.0

Instance details

Defined in 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 a => Enum (Const a b) #

Since: base-4.9.0.0

Instance details

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

a ~~ b => Enum (a :~~: b) #

Since: base-4.10.0.0

Instance details

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

succError :: String -> a Source #

predError :: String -> a Source #

AltStyle によって変換されたページ (->オリジナル) /