basement-0.0.15: Foundation scrap box of array & string
Safe HaskellNone
LanguageHaskell2010

Basement.Numerical.Additive

Synopsis

Documentation

class Additive a where Source #

Represent class of things that can be added together, contains a neutral element and is commutative.

x + azero = x
azero + x = x
x + y = y + x

Minimal complete definition

azero, (+)

Methods

azero :: a Source #

(+) :: a -> a -> a infixl 6 Source #

scale :: IsNatural n => n -> a -> a Source #

default scale :: (Enum n, IsNatural n) => n -> a -> a Source #

Instances

Instances details
Additive Double Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive Float Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive Int Source # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: Int Source #

(+) :: Int -> Int -> Int Source #

scale :: IsNatural n => n -> Int -> Int Source #

Additive Int8 Source # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: Int8 Source #

(+) :: Int8 -> Int8 -> Int8 Source #

scale :: IsNatural n => n -> Int8 -> Int8 Source #

Additive Int16 Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive Int32 Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive Int64 Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive Integer Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive Natural Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive Rational Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive Word Source # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: Word Source #

(+) :: Word -> Word -> Word Source #

scale :: IsNatural n => n -> Word -> Word Source #

Additive Word8 Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive Word16 Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive Word32 Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive Word64 Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive COff Source # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: COff Source #

(+) :: COff -> COff -> COff Source #

scale :: IsNatural n => n -> COff -> COff Source #

Additive CChar Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive CSChar Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive CUChar Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive CShort Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive CUShort Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive CInt Source # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: CInt Source #

(+) :: CInt -> CInt -> CInt Source #

scale :: IsNatural n => n -> CInt -> CInt Source #

Additive CUInt Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive CLong Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive CULong Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive CLLong Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive CULLong Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive CFloat Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive CDouble Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive CPtrdiff Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive CSize Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive CWchar Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive CSigAtomic Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive CClock Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive CTime Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive CUSeconds Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive CSUSeconds Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive CIntPtr Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive CUIntPtr Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive CIntMax Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive CUIntMax Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive Word128 Source # 
Instance details

Defined in Basement.Numerical.Additive

Additive Word256 Source # 
Instance details

Defined in Basement.Numerical.Additive

KnownNat n => Additive (Zn n) Source # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: Zn n Source #

(+) :: Zn n -> Zn n -> Zn n Source #

scale :: IsNatural n0 => n0 -> Zn n -> Zn n Source #

(KnownNat n, NatWithinBound Word64 n) => Additive (Zn64 n) Source # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: Zn64 n Source #

(+) :: Zn64 n -> Zn64 n -> Zn64 n Source #

scale :: IsNatural n0 => n0 -> Zn64 n -> Zn64 n Source #

Additive (CountOf ty) Source # 
Instance details

Defined in Basement.Types.OffsetSize

Methods

azero :: CountOf ty Source #

(+) :: CountOf ty -> CountOf ty -> CountOf ty Source #

scale :: IsNatural n => n -> CountOf ty -> CountOf ty Source #

Additive (Offset ty) Source # 
Instance details

Defined in Basement.Types.OffsetSize

Methods

azero :: Offset ty Source #

(+) :: Offset ty -> Offset ty -> Offset ty Source #

scale :: IsNatural n => n -> Offset ty -> Offset ty Source #

SizeValid n => Additive (Bits n) Source # 
Instance details

Defined in Basement.Bits

Methods

azero :: Bits n Source #

(+) :: Bits n -> Bits n -> Bits n Source #

scale :: IsNatural n0 => n0 -> Bits n -> Bits n Source #