base-4.15.0.0: Basic libraries
Safe HaskellNone
LanguageHaskell2010

GHC.Integer

Description

Compatibility module for pre ghc-bignum code.

Synopsis

Documentation

data Integer Source #

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

Instances

Instances details
Enum Integer #

Since: base-2.1

Instance details

Defined in GHC.Enum

Eq Integer 
Instance details

Defined in GHC.Num.Integer

Integral Integer #

Since: base-2.0.1

Instance details

Defined in GHC.Real

Data Integer #

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Integer -> c Integer Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Integer Source #

toConstr :: Integer -> Constr Source #

dataTypeOf :: Integer -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Integer) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Integer) Source #

gmapT :: (forall b. Data b => b -> b) -> Integer -> Integer Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Integer -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Integer -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Integer -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Integer -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Integer -> m Integer Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Integer -> m Integer Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Integer -> m Integer Source #

Num Integer #

Since: base-2.1

Instance details

Defined in GHC.Num

Ord Integer 
Instance details

Defined in GHC.Num.Integer

Read Integer #

Since: base-2.1

Instance details

Defined in GHC.Read

Real Integer #

Since: base-2.0.1

Instance details

Defined in GHC.Real

Show Integer #

Since: base-2.1

Instance details

Defined in GHC.Show

Ix Integer #

Since: base-2.1

Instance details

Defined in GHC.Ix

Bits Integer #

Since: base-2.1

Instance details

Defined in Data.Bits

PrintfArg Integer #

Since: base-2.1

Instance details

Defined in Text.Printf

Construct Integers

Conversion to other integral types

Helpers for RealFloat type-class operations

Arithmetic operations

Comparison predicates

Int#-boolean valued versions of comparison predicates

These operations return 0# and 1# instead of False and True respectively. See PrimBool wiki-page for more details

Bit-operations

Hashing