| Copyright | (c) Erich Gut |
|---|---|
| License | BSD3 |
| Maintainer | zerich.gut@gmail.com |
| Safe Haskell | None |
| Language | Haskell2010 |
OAlg.Data.Number
Description
basic number types.
Synopsis
- data N
- (>-) :: N -> N -> N
- class LengthN x where
- takeN :: N -> [a] -> [a]
- splitAtN :: N -> [x] -> ([x], [x])
- data Z
- data Integer
- data Int
- modInt :: Int -> Int -> Int
- divInt :: Int -> Int -> Int
- data Q
- (%) :: Z -> N -> Q
- numerator :: Q -> Z
- denominator :: Q -> N
- class Enum a where
- succ :: a -> a
- pred :: a -> a
- toEnum :: Int -> a
- fromEnum :: a -> Int
- enumFrom :: a -> [a]
- enumFromThen :: a -> a -> [a]
- enumFromTo :: a -> a -> [a]
- enumFromThenTo :: a -> a -> a -> [a]
- enum :: (Ord i, Enum i) => i -> i -> [i]
Natural Numbers
natural numbers 0, 1, 2...
Instances
(>-) :: N -> N -> N infixl 6 Source #
a >- b = a - b if b <= a, otherwise a exception will be
thrown.Undefined SubtrahendToBig
class LengthN x where Source #
types admitting a length.
Instances
| LengthN N' Source # | |
| LengthN W' Source # | |
| LengthN (W n) Source # | |
| LengthN (ProductSymbol x) Source # | |
Defined in OAlg.Entity.Product.ProductSymbol Methods lengthN :: ProductSymbol x -> N Source # | |
| LengthN (Permutation i) Source # | |
Defined in OAlg.Entity.Sequence.Permutation Methods lengthN :: Permutation i -> N Source # | |
| LengthN (PermutationForm i) Source # | |
Defined in OAlg.Entity.Sequence.Permutation Methods lengthN :: PermutationForm i -> N Source # | |
| LengthN (Set x) Source # | |
| LengthN (Path q) Source # | |
| LengthN [x] Source # | |
Defined in OAlg.Data.Number | |
| LengthN (Dim x p) Source # | |
| LengthN (Col i x) Source # | |
| LengthN (Row j x) Source # | |
| LengthN (Product N a) Source # | |
| LengthN (ProductForm N a) Source # | |
Defined in OAlg.Entity.Product.Definition | |
| LengthN (Graph i x) Source # | |
| LengthN (PSequence i x) Source # | |
| LengthN (SumForm N a) Source # | |
| LengthN (Entries i j x) Source # | |
splitAtN :: N -> [x] -> ([x], [x]) Source #
splits a list in left and right part according to the given number.
Integers
integers ..-1, 0, 1, 2.. .
Instances
Arbitrary precision integers. In contrast with fixed-size integral types
such as Int, the Integer type represents the entire infinite range of
integers.
Integers are stored in a kind of sign-magnitude form, hence do not expect two's complement form when using bit operations.
If the value is small (fit into an Int), IS constructor is used.
Otherwise IP and IN constructors are used to store a BigNat
representing respectively the positive or the negative value magnitude.
Instances
A fixed-precision integer type with at least the range [-2^29 .. 2^29-1].
The exact range for a given implementation can be determined by using
minBound and maxBound from the Bounded class.
Instances
Rationals
rational numbers q = z with %n and numerator q == z.denominator q == n
Instances
| Enum Q Source # | |
| Num Q Source # | |
| Fractional Q Source # | |
| Real Q Source # | |
Defined in OAlg.Data.Number Methods toRational :: Q -> Rational # | |
| RealFrac Q Source # | |
| Show Q Source # | |
| NFData Q Source # | |
Defined in OAlg.Data.Number | |
| Eq Q Source # | |
| Ord Q Source # | |
| Transposable Q Source # | |
| Validable Q Source # | |
| XStandard Q Source # | |
| Abelian Q Source # | |
| Additive Q Source # | |
| XStandardAdd Q Source # | |
Defined in OAlg.Structure.Additive.Proposition Methods xStandardAdd :: XAdd Q Source # | |
| Algebraic Q Source # | |
Defined in OAlg.Structure.Algebraic.Definition | |
| AlgebraicSemiring Q Source # | |
Defined in OAlg.Structure.Algebraic.Definition | |
| Distributive Q Source # | |
Defined in OAlg.Structure.Distributive.Definition | |
| TransposableDistributive Q Source # | |
Defined in OAlg.Structure.Distributive.Definition | |
| XStandardDst Q Source # | |
Defined in OAlg.Structure.Distributive.Proposition Methods xStandardDst :: XDst Q Source # | |
| Fibred Q Source # | |
| EqRoot Q Source # | |
Defined in OAlg.Structure.Fibred.Root | |
| ShowRoot Q Source # | |
Defined in OAlg.Structure.Fibred.Root | |
| SingletonRoot Q Source # | |
Defined in OAlg.Structure.Fibred.Root | |
| TypeableRoot Q Source # | |
Defined in OAlg.Structure.Fibred.Root | |
| ValidableRoot Q Source # | |
Defined in OAlg.Structure.Fibred.Root | |
| FibredOriented Q Source # | |
Defined in OAlg.Structure.FibredOriented | |
| Commutative Q Source # | |
Defined in OAlg.Structure.Multiplicative.Definition | |
| Invertible Q Source # | |
| Multiplicative Q Source # | |
| TransposableMultiplicative Q Source # | |
Defined in OAlg.Structure.Multiplicative.Definition | |
| XStandardMlt Q Source # | |
Defined in OAlg.Structure.Multiplicative.Proposition Methods xStandardMlt :: XMlt Q Source # | |
| Acyclic Q Source # | |
| Number Q Source # | |
| Oriented Q Source # | |
| TransposableOriented Q Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| EqPoint Q Source # | |
Defined in OAlg.Structure.Oriented.Point | |
| OrdPoint Q Source # | |
Defined in OAlg.Structure.Oriented.Point | |
| ShowPoint Q Source # | |
Defined in OAlg.Structure.Oriented.Point | |
| SingletonPoint Q Source # | |
Defined in OAlg.Structure.Oriented.Point | |
| TypeablePoint Q Source # | |
Defined in OAlg.Structure.Oriented.Point | |
| ValidablePoint Q Source # | |
Defined in OAlg.Structure.Oriented.Point | |
| XStandardPoint Q Source # | |
Defined in OAlg.Structure.Oriented.Point | |
| Field Q Source # | |
| Euclidean Q Source # | |
| Vectorial Q Source # | |
| Embeddable N Q Source # | |
| Embeddable Z Q Source # | |
| Projectible N Q Source # | |
| Projectible Z Q Source # | |
| type Root Q Source # | |
Defined in OAlg.Structure.Fibred.Root | |
| type Point Q Source # | |
Defined in OAlg.Structure.Oriented.Point | |
| type Scalar Q Source # | |
Defined in OAlg.Structure.Vectorial.Definition | |
denominator :: Q -> N Source #
denominator of a rational.
Example
>>>denominator (3/2)2
Enum
Class Enum defines operations on sequentially ordered types.
The enumFrom... methods are used in Haskell's translation of
arithmetic sequences.
Instances of Enum may be derived for any enumeration type (types
whose constructors have no fields). The nullary constructors are
assumed to be numbered left-to-right by fromEnum from 0 through n-1.
See Chapter 10 of the Haskell Report for more details.
For any type that is an instance of class Bounded as well as Enum,
the following should hold:
- The calls
andsuccmaxBoundshould result in a runtime error.predminBound fromEnumandtoEnumshould give a runtime error if the result value is not representable in the result type. For example,is an error.toEnum7 ::BoolenumFromandenumFromThenshould be defined with an implicit bound, thus:
enumFrom x = enumFromTo x maxBound
enumFromThen x y = enumFromThenTo x y bound
where
bound | fromEnum y >= fromEnum x = maxBound
| otherwise = minBoundMethods
the successor of a value. For numeric types, succ adds 1.
the predecessor of a value. For numeric types, pred subtracts 1.
Convert from an Int.
Convert to an Int.
It is implementation-dependent what fromEnum returns when
applied to a value that is too large to fit in an Int.
Used in Haskell's translation of [n..] with [n..] = enumFrom n,
a possible implementation being enumFrom n = n : enumFrom (succ n).
For example:
enumFrom 4 :: [Integer] = [4,5,6,7,...]
enumFrom 6 :: [Int] = [6,7,8,9,...,maxBound :: Int]
enumFromThen :: a -> a -> [a] #
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] #
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] #
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
| Enum CBool | |
Defined in Foreign.C.Types | |
| Enum CChar | |
Defined in Foreign.C.Types | |
| Enum CClock | |
Defined in Foreign.C.Types | |
| Enum CDouble | |
| Enum CFloat | |
Defined in Foreign.C.Types | |
| Enum CInt | |
| Enum CIntMax | |
| Enum CIntPtr | |
| Enum CLLong | |
Defined in Foreign.C.Types | |
| Enum CLong | |
Defined in Foreign.C.Types | |
| Enum CPtrdiff | |
| Enum CSChar | |
Defined in Foreign.C.Types | |
| Enum CSUSeconds | |
Defined in Foreign.C.Types Methods succ :: CSUSeconds -> CSUSeconds # pred :: CSUSeconds -> CSUSeconds # toEnum :: Int -> CSUSeconds # fromEnum :: CSUSeconds -> Int # enumFrom :: CSUSeconds -> [CSUSeconds] # enumFromThen :: CSUSeconds -> CSUSeconds -> [CSUSeconds] # enumFromTo :: CSUSeconds -> CSUSeconds -> [CSUSeconds] # enumFromThenTo :: CSUSeconds -> CSUSeconds -> CSUSeconds -> [CSUSeconds] # | |
| Enum CShort | |
Defined in Foreign.C.Types | |
| Enum CSigAtomic | |
Defined in Foreign.C.Types Methods succ :: CSigAtomic -> CSigAtomic # pred :: CSigAtomic -> CSigAtomic # toEnum :: Int -> CSigAtomic # fromEnum :: CSigAtomic -> Int # enumFrom :: CSigAtomic -> [CSigAtomic] # enumFromThen :: CSigAtomic -> CSigAtomic -> [CSigAtomic] # enumFromTo :: CSigAtomic -> CSigAtomic -> [CSigAtomic] # enumFromThenTo :: CSigAtomic -> CSigAtomic -> CSigAtomic -> [CSigAtomic] # | |
| Enum CSize | |
Defined in Foreign.C.Types | |
| Enum CTime | |
Defined in Foreign.C.Types | |
| Enum CUChar | |
Defined in Foreign.C.Types | |
| Enum CUInt | |
Defined in Foreign.C.Types | |
| Enum CUIntMax | |
| Enum CUIntPtr | |
| Enum CULLong | |
| Enum CULong | |
Defined in Foreign.C.Types | |
| Enum CUSeconds | |
Defined in Foreign.C.Types Methods succ :: CUSeconds -> CUSeconds # pred :: CUSeconds -> CUSeconds # fromEnum :: CUSeconds -> Int # enumFrom :: CUSeconds -> [CUSeconds] # enumFromThen :: CUSeconds -> CUSeconds -> [CUSeconds] # enumFromTo :: CUSeconds -> CUSeconds -> [CUSeconds] # enumFromThenTo :: CUSeconds -> CUSeconds -> CUSeconds -> [CUSeconds] # | |
| Enum CUShort | |
| Enum CWchar | |
Defined in Foreign.C.Types | |
| Enum IntPtr | |
Defined in Foreign.Ptr | |
| Enum WordPtr | |
| Enum ByteOrder | Since: base-4.11.0.0 |
Defined in GHC.ByteOrder Methods succ :: ByteOrder -> ByteOrder # pred :: ByteOrder -> ByteOrder # fromEnum :: ByteOrder -> Int # enumFrom :: ByteOrder -> [ByteOrder] # enumFromThen :: ByteOrder -> ByteOrder -> [ByteOrder] # enumFromTo :: ByteOrder -> ByteOrder -> [ByteOrder] # enumFromThenTo :: ByteOrder -> ByteOrder -> ByteOrder -> [ByteOrder] # | |
| Enum Associativity | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods succ :: Associativity -> Associativity # pred :: Associativity -> Associativity # toEnum :: Int -> Associativity # fromEnum :: Associativity -> Int # enumFrom :: Associativity -> [Associativity] # enumFromThen :: Associativity -> Associativity -> [Associativity] # enumFromTo :: Associativity -> Associativity -> [Associativity] # enumFromThenTo :: Associativity -> Associativity -> Associativity -> [Associativity] # | |
| Enum DecidedStrictness | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods succ :: DecidedStrictness -> DecidedStrictness # pred :: DecidedStrictness -> DecidedStrictness # toEnum :: Int -> DecidedStrictness # fromEnum :: DecidedStrictness -> Int # enumFrom :: DecidedStrictness -> [DecidedStrictness] # enumFromThen :: DecidedStrictness -> DecidedStrictness -> [DecidedStrictness] # enumFromTo :: DecidedStrictness -> DecidedStrictness -> [DecidedStrictness] # enumFromThenTo :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness -> [DecidedStrictness] # | |
| Enum SourceStrictness | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods succ :: SourceStrictness -> SourceStrictness # pred :: SourceStrictness -> SourceStrictness # toEnum :: Int -> SourceStrictness # fromEnum :: SourceStrictness -> Int # enumFrom :: SourceStrictness -> [SourceStrictness] # enumFromThen :: SourceStrictness -> SourceStrictness -> [SourceStrictness] # enumFromTo :: SourceStrictness -> SourceStrictness -> [SourceStrictness] # enumFromThenTo :: SourceStrictness -> SourceStrictness -> SourceStrictness -> [SourceStrictness] # | |
| Enum SourceUnpackedness | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods succ :: SourceUnpackedness -> SourceUnpackedness # pred :: SourceUnpackedness -> SourceUnpackedness # toEnum :: Int -> SourceUnpackedness # fromEnum :: SourceUnpackedness -> Int # enumFrom :: SourceUnpackedness -> [SourceUnpackedness] # enumFromThen :: SourceUnpackedness -> SourceUnpackedness -> [SourceUnpackedness] # enumFromTo :: SourceUnpackedness -> SourceUnpackedness -> [SourceUnpackedness] # enumFromThenTo :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness -> [SourceUnpackedness] # | |
| Enum SeekMode | Since: base-4.2.0.0 |
| Enum IOMode | Since: base-4.2.0.0 |
Defined in GHC.IO.IOMode | |
| Enum Int16 | Since: base-2.1 |
| Enum Int32 | Since: base-2.1 |
| Enum Int64 | Since: base-2.1 |
| Enum Int8 | Since: base-2.1 |
| Enum DoCostCentres | Since: base-4.8.0.0 |
Defined in GHC.RTS.Flags Methods succ :: DoCostCentres -> DoCostCentres # pred :: DoCostCentres -> DoCostCentres # toEnum :: Int -> DoCostCentres # fromEnum :: DoCostCentres -> Int # enumFrom :: DoCostCentres -> [DoCostCentres] # enumFromThen :: DoCostCentres -> DoCostCentres -> [DoCostCentres] # enumFromTo :: DoCostCentres -> DoCostCentres -> [DoCostCentres] # enumFromThenTo :: DoCostCentres -> DoCostCentres -> DoCostCentres -> [DoCostCentres] # | |
| Enum DoHeapProfile | Since: base-4.8.0.0 |
Defined in GHC.RTS.Flags Methods succ :: DoHeapProfile -> DoHeapProfile # pred :: DoHeapProfile -> DoHeapProfile # toEnum :: Int -> DoHeapProfile # fromEnum :: DoHeapProfile -> Int # enumFrom :: DoHeapProfile -> [DoHeapProfile] # enumFromThen :: DoHeapProfile -> DoHeapProfile -> [DoHeapProfile] # enumFromTo :: DoHeapProfile -> DoHeapProfile -> [DoHeapProfile] # enumFromThenTo :: DoHeapProfile -> DoHeapProfile -> DoHeapProfile -> [DoHeapProfile] # | |
| Enum DoTrace | Since: base-4.8.0.0 |
| Enum GiveGCStats | Since: base-4.8.0.0 |
Defined in GHC.RTS.Flags Methods succ :: GiveGCStats -> GiveGCStats # pred :: GiveGCStats -> GiveGCStats # toEnum :: Int -> GiveGCStats # fromEnum :: GiveGCStats -> Int # enumFrom :: GiveGCStats -> [GiveGCStats] # enumFromThen :: GiveGCStats -> GiveGCStats -> [GiveGCStats] # enumFromTo :: GiveGCStats -> GiveGCStats -> [GiveGCStats] # enumFromThenTo :: GiveGCStats -> GiveGCStats -> GiveGCStats -> [GiveGCStats] # | |
| Enum IoSubSystem | Since: base-4.9.0.0 |
Defined in GHC.RTS.Flags Methods succ :: IoSubSystem -> IoSubSystem # pred :: IoSubSystem -> IoSubSystem # toEnum :: Int -> IoSubSystem # fromEnum :: IoSubSystem -> Int # enumFrom :: IoSubSystem -> [IoSubSystem] # enumFromThen :: IoSubSystem -> IoSubSystem -> [IoSubSystem] # enumFromTo :: IoSubSystem -> IoSubSystem -> [IoSubSystem] # enumFromThenTo :: IoSubSystem -> IoSubSystem -> IoSubSystem -> [IoSubSystem] # | |
| Enum GeneralCategory | Since: base-2.1 |
Defined in GHC.Unicode Methods succ :: GeneralCategory -> GeneralCategory # pred :: GeneralCategory -> GeneralCategory # toEnum :: Int -> GeneralCategory # fromEnum :: GeneralCategory -> Int # enumFrom :: GeneralCategory -> [GeneralCategory] # enumFromThen :: GeneralCategory -> GeneralCategory -> [GeneralCategory] # enumFromTo :: GeneralCategory -> GeneralCategory -> [GeneralCategory] # enumFromThenTo :: GeneralCategory -> GeneralCategory -> GeneralCategory -> [GeneralCategory] # | |
| Enum Word16 | Since: base-2.1 |
Defined in GHC.Word | |
| Enum Word32 | Since: base-2.1 |
Defined in GHC.Word | |
| Enum Word64 | Since: base-2.1 |
Defined in GHC.Word | |
| Enum Word8 | Since: base-2.1 |
| Enum CBlkCnt | |
| Enum CBlkSize | |
Defined in System.Posix.Types | |
| Enum CCc | |
| Enum CClockId | |
Defined in System.Posix.Types | |
| Enum CDev | |
| Enum CFsBlkCnt | |
Defined in System.Posix.Types Methods succ :: CFsBlkCnt -> CFsBlkCnt # pred :: CFsBlkCnt -> CFsBlkCnt # fromEnum :: CFsBlkCnt -> Int # enumFrom :: CFsBlkCnt -> [CFsBlkCnt] # enumFromThen :: CFsBlkCnt -> CFsBlkCnt -> [CFsBlkCnt] # enumFromTo :: CFsBlkCnt -> CFsBlkCnt -> [CFsBlkCnt] # enumFromThenTo :: CFsBlkCnt -> CFsBlkCnt -> CFsBlkCnt -> [CFsBlkCnt] # | |
| Enum CFsFilCnt | |
Defined in System.Posix.Types Methods succ :: CFsFilCnt -> CFsFilCnt # pred :: CFsFilCnt -> CFsFilCnt # fromEnum :: CFsFilCnt -> Int # enumFrom :: CFsFilCnt -> [CFsFilCnt] # enumFromThen :: CFsFilCnt -> CFsFilCnt -> [CFsFilCnt] # enumFromTo :: CFsFilCnt -> CFsFilCnt -> [CFsFilCnt] # enumFromThenTo :: CFsFilCnt -> CFsFilCnt -> CFsFilCnt -> [CFsFilCnt] # | |
| Enum CGid | |
| Enum CId | |
| Enum CIno | |
| Enum CKey | |
| Enum CMode | |
Defined in System.Posix.Types | |
| Enum CNfds | |
Defined in System.Posix.Types | |
| Enum CNlink | |
Defined in System.Posix.Types | |
| Enum COff | |
| Enum CPid | |
| Enum CRLim | |
Defined in System.Posix.Types | |
| Enum CSocklen | |
Defined in System.Posix.Types | |
| Enum CSpeed | |
Defined in System.Posix.Types | |
| Enum CSsize | |
Defined in System.Posix.Types | |
| Enum CTcflag | |
| Enum CUid | |
| Enum Fd | |
| Enum Extension | |
Defined in GHC.LanguageExtensions.Type Methods succ :: Extension -> Extension # pred :: Extension -> Extension # fromEnum :: Extension -> Int # enumFrom :: Extension -> [Extension] # enumFromThen :: Extension -> Extension -> [Extension] # enumFromTo :: Extension -> Extension -> [Extension] # enumFromThenTo :: Extension -> Extension -> Extension -> [Extension] # | |
| Enum Ordering | Since: base-2.1 |
| Enum Stochastic Source # | |
Defined in OAlg.Control.Validate Methods succ :: Stochastic -> Stochastic # pred :: Stochastic -> Stochastic # toEnum :: Int -> Stochastic # fromEnum :: Stochastic -> Int # enumFrom :: Stochastic -> [Stochastic] # enumFromThen :: Stochastic -> Stochastic -> [Stochastic] # enumFromTo :: Stochastic -> Stochastic -> [Stochastic] # enumFromThenTo :: Stochastic -> Stochastic -> Stochastic -> [Stochastic] # | |
| Enum Verbosity Source # | |
Defined in OAlg.Control.Verbose Methods succ :: Verbosity -> Verbosity # pred :: Verbosity -> Verbosity # fromEnum :: Verbosity -> Int # enumFrom :: Verbosity -> [Verbosity] # enumFromThen :: Verbosity -> Verbosity -> [Verbosity] # enumFromTo :: Verbosity -> Verbosity -> [Verbosity] # enumFromThenTo :: Verbosity -> Verbosity -> Verbosity -> [Verbosity] # | |
| Enum Direction Source # | |
Defined in OAlg.Data.Dualisable Methods succ :: Direction -> Direction # pred :: Direction -> Direction # fromEnum :: Direction -> Int # enumFrom :: Direction -> [Direction] # enumFromThen :: Direction -> Direction -> [Direction] # enumFromTo :: Direction -> Direction -> [Direction] # enumFromThenTo :: Direction -> Direction -> Direction -> [Direction] # | |
| Enum Side Source # | |
| Enum Site Source # | |
| Enum N Source # | |
| Enum Q Source # | |
| Enum Z Source # | |
| Enum RdcState Source # | |
Defined in OAlg.Data.Reducible | |
| Enum Valid Source # | |
Defined in OAlg.Data.Statement.Definition | |
| Enum Symbol Source # | |
Defined in OAlg.Data.Symbol | |
| Enum Variant Source # | |
| Enum N' Source # | |
| Enum W' Source # | |
| Enum Behavior Source # | |
Defined in OAlg.Entity.Sequence.FSequence | |
| Enum Perspective Source # | |
Defined in OAlg.Limes.Perspective Methods succ :: Perspective -> Perspective # pred :: Perspective -> Perspective # toEnum :: Int -> Perspective # fromEnum :: Perspective -> Int # enumFrom :: Perspective -> [Perspective] # enumFromThen :: Perspective -> Perspective -> [Perspective] # enumFromTo :: Perspective -> Perspective -> [Perspective] # enumFromThenTo :: Perspective -> Perspective -> Perspective -> [Perspective] # | |
| Enum Month | |
Defined in Data.Time.Calendar.Month | |
| Enum Quarter | |
| Enum QuarterOfYear | maps Q1..Q4 to 1..4 |
Defined in Data.Time.Calendar.Quarter Methods succ :: QuarterOfYear -> QuarterOfYear # pred :: QuarterOfYear -> QuarterOfYear # toEnum :: Int -> QuarterOfYear # fromEnum :: QuarterOfYear -> Int # enumFrom :: QuarterOfYear -> [QuarterOfYear] # enumFromThen :: QuarterOfYear -> QuarterOfYear -> [QuarterOfYear] # enumFromTo :: QuarterOfYear -> QuarterOfYear -> [QuarterOfYear] # enumFromThenTo :: QuarterOfYear -> QuarterOfYear -> QuarterOfYear -> [QuarterOfYear] # | |
| Enum DiffTime | |
Defined in Data.Time.Clock.Internal.DiffTime | |
| Enum Integer | Since: base-2.1 |
| Enum Natural | Since: base-4.8.0.0 |
| Enum () | Since: base-2.1 |
| Enum Bool | Since: base-2.1 |
| Enum Char | Since: base-2.1 |
| Enum Int | Since: base-2.1 |
| Enum Levity | Since: base-4.16.0.0 |
Defined in GHC.Enum | |
| Enum VecCount | Since: base-4.10.0.0 |
| Enum VecElem | Since: base-4.10.0.0 |
| Enum Word | Since: base-2.1 |
| Enum a => Enum (And a) | Since: base-4.16 |
| Enum a => Enum (Iff a) | Since: base-4.16 |
| Enum a => Enum (Ior a) | Since: base-4.16 |
| Enum a => Enum (Xor a) | Since: base-4.16 |
| Enum a => Enum (Identity a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Identity Methods succ :: Identity a -> Identity a # pred :: Identity a -> Identity a # fromEnum :: Identity a -> Int # enumFrom :: Identity a -> [Identity a] # enumFromThen :: Identity a -> Identity a -> [Identity a] # enumFromTo :: Identity a -> Identity a -> [Identity a] # enumFromThenTo :: Identity a -> Identity a -> Identity a -> [Identity a] # | |
| (Enum a, Bounded a, Eq a) => Enum (Down a) | Swaps Since: base-4.18.0.0 |
Defined in Data.Ord | |
| Enum a => Enum (First a) | Since: base-4.9.0.0 |
| Enum a => Enum (Last a) | Since: base-4.9.0.0 |
Defined in Data.Semigroup | |
| Enum a => Enum (Max a) | Since: base-4.9.0.0 |
| Enum a => Enum (Min a) | Since: base-4.9.0.0 |
| Enum a => Enum (WrappedMonoid a) | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods succ :: WrappedMonoid a -> WrappedMonoid a # pred :: WrappedMonoid a -> WrappedMonoid a # toEnum :: Int -> WrappedMonoid a # fromEnum :: WrappedMonoid a -> Int # enumFrom :: WrappedMonoid a -> [WrappedMonoid a] # enumFromThen :: WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] # enumFromTo :: WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] # enumFromThenTo :: WrappedMonoid a -> WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] # | |
| Integral a => Enum (Ratio a) | Since: base-2.0.1 |
| Enum x => Enum (Id x) Source # | |
| Enum a => Enum (Solo a) | |
Defined in GHC.Enum | |
| Enum (Fixed a) | Recall that, for numeric types, succ (0.000 :: Milli) == 0.001 and likewise pred (0.000 :: Milli) == -0.001 In other words, succ (0.000000000000 :: Pico) == 0.000000000001 and similarly pred (0.000000000000 :: Pico) == -0.000000000001 This is worth bearing in mind when defining [1..10] :: [Pico] evaluates to However, this is not true. On the contrary, similarly to the above
implementations of [1.000000000000, 1.00000000001, 1.00000000002, ..., 10.000000000000] and contains Since: base-2.1 |
| Enum (Proxy s) | Since: base-4.7.0.0 |
| Enum a => Enum (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const Methods succ :: Const a b -> Const a b # pred :: Const a b -> Const a b # fromEnum :: Const a b -> Int # enumFrom :: Const a b -> [Const a b] # enumFromThen :: Const a b -> Const a b -> [Const a b] # enumFromTo :: Const a b -> Const a b -> [Const a b] # enumFromThenTo :: Const a b -> Const a b -> Const a b -> [Const a b] # | |
| Enum (f a) => Enum (Ap f a) | Since: base-4.12.0.0 |
Defined in Data.Monoid | |
| Coercible a b => Enum (Coercion a b) | Since: base-4.7.0.0 |
Defined in Data.Type.Coercion Methods succ :: Coercion a b -> Coercion a b # pred :: Coercion a b -> Coercion a b # toEnum :: Int -> Coercion a b # fromEnum :: Coercion a b -> Int # enumFrom :: Coercion a b -> [Coercion a b] # enumFromThen :: Coercion a b -> Coercion a b -> [Coercion a b] # enumFromTo :: Coercion a b -> Coercion a b -> [Coercion a b] # enumFromThenTo :: Coercion a b -> Coercion a b -> Coercion a b -> [Coercion a b] # | |
| a ~ b => Enum (a :~: b) | Since: base-4.7.0.0 |
Defined in Data.Type.Equality Methods succ :: (a :~: b) -> a :~: b # pred :: (a :~: b) -> a :~: b # fromEnum :: (a :~: b) -> Int # enumFrom :: (a :~: b) -> [a :~: b] # enumFromThen :: (a :~: b) -> (a :~: b) -> [a :~: b] # enumFromTo :: (a :~: b) -> (a :~: b) -> [a :~: b] # enumFromThenTo :: (a :~: b) -> (a :~: b) -> (a :~: b) -> [a :~: b] # | |
| a ~~ b => Enum (a :~~: b) | Since: base-4.10.0.0 |
Defined in Data.Type.Equality Methods succ :: (a :~~: b) -> a :~~: b # pred :: (a :~~: b) -> a :~~: b # fromEnum :: (a :~~: b) -> Int # enumFrom :: (a :~~: b) -> [a :~~: b] # enumFromThen :: (a :~~: b) -> (a :~~: b) -> [a :~~: b] # enumFromTo :: (a :~~: b) -> (a :~~: b) -> [a :~~: b] # enumFromThenTo :: (a :~~: b) -> (a :~~: b) -> (a :~~: b) -> [a :~~: b] # | |
| Enum (f (g a)) => Enum (Compose f g a) | Since: base-4.19.0.0 |
Defined in Data.Functor.Compose Methods succ :: Compose f g a -> Compose f g a # pred :: Compose f g a -> Compose f g a # toEnum :: Int -> Compose f g a # fromEnum :: Compose f g a -> Int # enumFrom :: Compose f g a -> [Compose f g a] # enumFromThen :: Compose f g a -> Compose f g a -> [Compose f g a] # enumFromTo :: Compose f g a -> Compose f g a -> [Compose f g a] # enumFromThenTo :: Compose f g a -> Compose f g a -> Compose f g a -> [Compose f g a] # | |