base-4.16.1.0: Basic libraries

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
 Source # Since: base-4.0.0.0 Instance detailsDefined in Data.Data Methodsgfoldl :: (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 #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 # Source # Since: base-2.1 Instance detailsDefined in GHC.Bits Methods Source # Since: base-2.1 Instance detailsDefined in GHC.Enum Methods Source # Since: base-2.1 Instance detailsDefined in GHC.Ix Methodsrange :: (Integer, Integer) -> [Integer] Source #index :: (Integer, Integer) -> Integer -> Int Source #unsafeIndex :: (Integer, Integer) -> Integer -> Int Source #inRange :: (Integer, Integer) -> Integer -> Bool Source #rangeSize :: (Integer, Integer) -> Int Source # Source # Since: base-2.1 Instance detailsDefined in GHC.Num Methods Source # Since: base-2.1 Instance detailsDefined in GHC.Read Methods Source # Since: base-2.0.1 Instance detailsDefined in GHC.Real Methods Source # Since: base-2.0.1 Instance detailsDefined in GHC.Real Methods Source # Since: base-2.1 Instance detailsDefined in GHC.Show MethodsshowList :: [Integer] -> ShowS Source # Source # Since: base-2.1 Instance detailsDefined in Text.Printf Methods Instance detailsDefined in GHC.Num.Integer Methods Instance detailsDefined in GHC.Num.Integer Methods

# 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