Copyright | (c) The University of Glasgow 2001 |
---|---|
License | BSD-style (see the file libraries/base/LICENSE) |
Maintainer | [email protected] |
Stability | experimental |
Portability | portable |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
Signed integer types
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.
Bounded Int | Since: 2.1 |
Enum Int | Since: 2.1 |
Eq Int | |
Integral Int | Since: 2.0.1 |
Data Int | Since: 4.0.0.0 |
Num Int | Since: 2.1 |
Ord Int | |
Read Int | Since: 2.1 |
Real Int | Since: 2.0.1 |
Show Int | Since: 2.1 |
Ix Int | Since: 2.1 |
FiniteBits Int | Since: 4.6.0.0 |
Bits Int | Since: 2.1 |
Storable Int | Since: 2.1 |
PrintfArg Int | Since: 2.1 |
Generic1 k (URec k Int) | |
Functor (URec * Int) | |
Foldable (URec * Int) | |
Traversable (URec * Int) | |
Eq (URec k Int p) | |
Ord (URec k Int p) | |
Show (URec k Int p) | |
Generic (URec k Int p) | |
data URec k Int |
Used for marking occurrences of Since: 4.9.0.0 |
type Rep1 k (URec k Int) | |
type Rep (URec k Int p) | |
8-bit signed integer type
Bounded Int8 | Since: 2.1 |
Enum Int8 | Since: 2.1 |
Eq Int8 | Since: 2.1 |
Integral Int8 | Since: 2.1 |
Data Int8 | Since: 4.0.0.0 |
Num Int8 | Since: 2.1 |
Ord Int8 | Since: 2.1 |
Read Int8 | Since: 2.1 |
Real Int8 | Since: 2.1 |
Show Int8 | Since: 2.1 |
Ix Int8 | Since: 2.1 |
FiniteBits Int8 | Since: 4.6.0.0 |
Bits Int8 | Since: 2.1 |
Storable Int8 | Since: 2.1 |
PrintfArg Int8 | Since: 2.1 |
16-bit signed integer type
Bounded Int16 | Since: 2.1 |
Enum Int16 | Since: 2.1 |
Eq Int16 | Since: 2.1 |
Integral Int16 | Since: 2.1 |
Data Int16 | Since: 4.0.0.0 |
Num Int16 | Since: 2.1 |
Ord Int16 | Since: 2.1 |
Read Int16 | Since: 2.1 |
Real Int16 | Since: 2.1 |
Show Int16 | Since: 2.1 |
Ix Int16 | Since: 2.1 |
FiniteBits Int16 | Since: 4.6.0.0 |
Bits Int16 | Since: 2.1 |
Storable Int16 | Since: 2.1 |
PrintfArg Int16 | Since: 2.1 |
32-bit signed integer type
Bounded Int32 | Since: 2.1 |
Enum Int32 | Since: 2.1 |
Eq Int32 | Since: 2.1 |
Integral Int32 | Since: 2.1 |
Data Int32 | Since: 4.0.0.0 |
Num Int32 | Since: 2.1 |
Ord Int32 | Since: 2.1 |
Read Int32 | Since: 2.1 |
Real Int32 | Since: 2.1 |
Show Int32 | Since: 2.1 |
Ix Int32 | Since: 2.1 |
FiniteBits Int32 | Since: 4.6.0.0 |
Bits Int32 | Since: 2.1 |
Storable Int32 | Since: 2.1 |
PrintfArg Int32 | Since: 2.1 |
64-bit signed integer type
Bounded Int64 | Since: 2.1 |
Enum Int64 | Since: 2.1 |
Eq Int64 | Since: 2.1 |
Integral Int64 | Since: 2.1 |
Data Int64 | Since: 4.0.0.0 |
Num Int64 | Since: 2.1 |
Ord Int64 | Since: 2.1 |
Read Int64 | Since: 2.1 |
Real Int64 | Since: 2.1 |
Show Int64 | Since: 2.1 |
Ix Int64 | Since: 2.1 |
FiniteBits Int64 | Since: 4.6.0.0 |
Bits Int64 | Since: 2.1 |
Storable Int64 | Since: 2.1 |
PrintfArg Int64 | Since: 2.1 |
n
is the number of bits in the type.fromIntegral
, which is specialized for all the common cases so should be fast enough. Coercing word types (see Data.Word) to and from integer types preserves representation, not sign.Enum
instances over a bounded type such as Int
(see the section of the Haskell report dealing with arithmetic sequences) also hold for the Enum
instances over the various Int
types defined here.1 << 32
== 1
in some C implementations.
© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/8.2.1/docs/html/libraries/base-4.10.0.0/Data-Int.html