base-4.16.1.0: Basic libraries
Safe HaskellSafe-Inferred
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 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

Instances

Instances details
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 #

Bits Integer #

Since: base-2.1

Instance details

Defined in GHC.Bits

Enum Integer #

Since: base-2.1

Instance details

Defined in GHC.Enum

Ix Integer #

Since: base-2.1

Instance details

Defined in GHC.Ix

Num Integer #

Since: base-2.1

Instance details

Defined in GHC.Num

Read Integer #

Since: base-2.1

Instance details

Defined in GHC.Read

Integral Integer #

Since: base-2.0.1

Instance details

Defined in GHC.Real

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

PrintfArg Integer #

Since: base-2.1

Instance details

Defined in Text.Printf

Eq Integer 
Instance details

Defined in GHC.Num.Integer

Ord Integer 
Instance details

Defined in GHC.Num.Integer

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