Integer

Compatibility module for pre-ghc-bignum code.
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 Integer and IN constructors are used to store a BigNat representing respectively the positive or the negative value magnitude. Invariant: Integer and IN are used iff value doesn't fit in IS
Non-negative integer
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. Invariant: IP and IN are used iff value doesn't fit in IS
The Integer type. This module exposes the portable Integer API. See GHC.Integer.GMP.Internals for the integer-gmp-specific internal representation of Integer as well as optimized GMP-specific operations.
Arbitrary precision integers. In contrast with fixed-size integral types such as Int, the Integer type represents the entire infinite range of integers. For more information about this type's representation, see the comments in its implementation.
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 (i.e., fits into an Int), the IS constructor is used. Otherwise IP and IN constructors are used to store a BigNat representing the positive or the negative value magnitude, respectively. Invariant: IP and IN are used iff the value does not fit in IS.
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 Integer and IN constructors are used to store a BigNat representing respectively the positive or the negative value magnitude. Invariant: Integer and IN are used iff value doesn't fit in IS
Integer                                  ~  Integer
Deprecated: It is no faster than (^)
Invariant: Jn# and Jp# are used iff value doesn't fit in S# Useful properties resulting from the invariants:
  • abs (S# _) <= abs (Jp# _)
  • abs (S# _) < abs (Jn# _)
The Integer type.
Integer value:
int1 = +99
int2 = 42
int3 = 0
int4 = -17
int5 = 5_349_221
hex1 = 0xDEADBEEF  # hexadecimal
oct2 = 0o755  # octal, useful for Unix file permissions
bin1 = 0b11010110  # binary
The type of integers in Lua. By default this type is Int64, but that can be changed to different values in Lua. (See LUA_INT_TYPE in luaconf.h.) See lua_Integer.
Compatibility module for pre ghc-bignum code.
Integer type (for parameters only)