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.
Instances11Enum, Eq, Integral, Data, Num, Ord, …
Enum IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.EnumEq IntegerDefined in ghc-bignum-1.3 · GHC.Num.IntegerIntegral IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.RealData IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.DataNum IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.NumOrd IntegerDefined in ghc-bignum-1.3 · GHC.Num.IntegerRead IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.ReadReal IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.RealShow IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.ShowIx IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.IxBits IntegerDefined in ghc-internal-9.1003.0 · GHC.Internal.Bits