basement-0.0.16: Foundation scrap box of array & string
Safe HaskellSafe-Inferred
LanguageHaskell2010

Basement.Compat.Natural

Synopsis

Documentation

data Natural #

Natural number

Invariant: numbers <= 0xffffffffffffffff use the NS constructor

Instances

Instances details
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 :: forall r r'. (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 #

Bits Natural

Since: base-4.8.0

Instance details

Defined in GHC.Bits

Enum Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Enum

Ix Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Ix

Num Natural

Note that Natural's Num instance isn't a ring: no element but 0 has an additive inverse. It is a semiring though.

Since: base-4.8.0.0

Instance details

Defined in GHC.Num

Read Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Read

Integral Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Real

Real Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Real

Show Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Show

Integral Natural Source # 
Instance details

Defined in Basement.Compat.NumLiteral

NormalForm Natural Source # 
Instance details

Defined in Basement.NormalForm

Methods

toNormalForm :: 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

IsIntegral Natural Source # 
Instance details

Defined in Basement.Numerical.Number

IsNatural 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 #

Eq Natural 
Instance details

Defined in GHC.Num.Natural

Methods

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

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

Ord Natural 
Instance details

Defined in GHC.Num.Natural

IsNatural n => From n Natural Source # 
Instance details

Defined in Basement.From

Methods

from :: n -> Natural Source #

IntegralDownsize Integer Natural 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

IntegralDownsize Natural Word8 Source # 
Instance details

Defined in Basement.IntegralConv

IsNatural a => IntegralUpsize a Natural Source # 
Instance details

Defined in Basement.IntegralConv

type Difference Natural Source # 
Instance details

Defined in Basement.Numerical.Subtractive

type Compare (a :: Natural) (b :: Natural) 
Instance details

Defined in Data.Type.Ord

type Compare (a :: Natural) (b :: Natural) = CmpNat a b