basement-0.0.8: Foundation scrap box of array & string

Safe HaskellNone
LanguageHaskell2010

Basement.Compat.Natural

Synopsis

Documentation

data Natural #

Type representing arbitrary-precision non-negative integers.

>>> 2^20 :: Natural
1267650600228229401496703205376

Operations whose result would be negative throw (Underflow :: ArithException),

>>> -1 :: Natural
*** Exception: arithmetic underflow

Since: base-4.8.0.0

Instances
Enum Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Natural

Eq Natural 
Instance details

Defined in GHC.Natural

Methods

(==) :: Natural -> Natural -> Bool #

(/=) :: Natural -> Natural -> Bool #

Integral Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Natural

Data Natural

Since: base-4.8.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) -> Natural -> c Natural #

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

toConstr :: Natural -> Constr #

dataTypeOf :: Natural -> DataType #

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

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

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

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

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

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

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

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

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

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

Num Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Natural

Ord Natural 
Instance details

Defined in GHC.Natural

Read Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Natural

Real Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Natural

Show Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Natural

Ix Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Natural

Bits Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Natural

Integral Natural Source # 
Instance details

Defined in Basement.Compat.NumLiteral

IsNatural Natural Source # 
Instance details

Defined in Basement.Numerical.Number

IsIntegral Natural Source # 
Instance details

Defined in Basement.Numerical.Number

Subtractive Natural Source # 
Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Natural :: * Source #

Additive Natural Source # 
Instance details

Defined in Basement.Numerical.Additive

IDivisible Natural Source # 
Instance details

Defined in Basement.Numerical.Multiplicative

Multiplicative Natural Source # 
Instance details

Defined in Basement.Numerical.Multiplicative

NormalForm Natural Source # 
Instance details

Defined in Basement.NormalForm

Methods

toNormalForm :: Natural -> () Source #

IsNatural a => IntegralUpsize a Natural Source # 
Instance details

Defined in Basement.IntegralConv

IntegralDownsize Integer Natural Source # 
Instance details

Defined in Basement.IntegralConv

IntegralDownsize Natural Word8 Source # 
Instance details

Defined in Basement.IntegralConv

IntegralDownsize Natural Word16 Source # 
Instance details

Defined in Basement.IntegralConv

IntegralDownsize Natural Word32 Source # 
Instance details

Defined in Basement.IntegralConv

IntegralDownsize Natural Word64 Source # 
Instance details

Defined in Basement.IntegralConv

IsNatural n => From n Natural Source # 
Instance details

Defined in Basement.From

Methods

from :: n -> Natural Source #

type Difference Natural Source # 
Instance details

Defined in Basement.Numerical.Subtractive