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

Basement.Numerical.Additive

Synopsis

Documentation

class Additive a where #

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 #

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

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

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

Instances

Instances details
Additive Double # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: Double #

(+) :: Double -> Double -> Double #

scale :: IsNatural n => n -> Double -> Double #

Additive Float # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: Float #

(+) :: Float -> Float -> Float #

scale :: IsNatural n => n -> Float -> Float #

Additive Int # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: Int #

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

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

Additive Int8 # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: Int8 #

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

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

Additive Int16 # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: Int16 #

(+) :: Int16 -> Int16 -> Int16 #

scale :: IsNatural n => n -> Int16 -> Int16 #

Additive Int32 # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: Int32 #

(+) :: Int32 -> Int32 -> Int32 #

scale :: IsNatural n => n -> Int32 -> Int32 #

Additive Int64 # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: Int64 #

(+) :: Int64 -> Int64 -> Int64 #

scale :: IsNatural n => n -> Int64 -> Int64 #

Additive Integer # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: Integer #

(+) :: Integer -> Integer -> Integer #

scale :: IsNatural n => n -> Integer -> Integer #

Additive Natural # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: Natural #

(+) :: Natural -> Natural -> Natural #

scale :: IsNatural n => n -> Natural -> Natural #

Additive Rational # 
Instance details

Defined in Basement.Numerical.Additive

Additive Word # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: Word #

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

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

Additive Word8 # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: Word8 #

(+) :: Word8 -> Word8 -> Word8 #

scale :: IsNatural n => n -> Word8 -> Word8 #

Additive Word16 # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: Word16 #

(+) :: Word16 -> Word16 -> Word16 #

scale :: IsNatural n => n -> Word16 -> Word16 #

Additive Word32 # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: Word32 #

(+) :: Word32 -> Word32 -> Word32 #

scale :: IsNatural n => n -> Word32 -> Word32 #

Additive Word64 # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: Word64 #

(+) :: Word64 -> Word64 -> Word64 #

scale :: IsNatural n => n -> Word64 -> Word64 #

Additive COff # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: COff #

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

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

Additive CChar # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: CChar #

(+) :: CChar -> CChar -> CChar #

scale :: IsNatural n => n -> CChar -> CChar #

Additive CSChar # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: CSChar #

(+) :: CSChar -> CSChar -> CSChar #

scale :: IsNatural n => n -> CSChar -> CSChar #

Additive CUChar # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: CUChar #

(+) :: CUChar -> CUChar -> CUChar #

scale :: IsNatural n => n -> CUChar -> CUChar #

Additive CShort # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: CShort #

(+) :: CShort -> CShort -> CShort #

scale :: IsNatural n => n -> CShort -> CShort #

Additive CUShort # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: CUShort #

(+) :: CUShort -> CUShort -> CUShort #

scale :: IsNatural n => n -> CUShort -> CUShort #

Additive CInt # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: CInt #

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

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

Additive CUInt # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: CUInt #

(+) :: CUInt -> CUInt -> CUInt #

scale :: IsNatural n => n -> CUInt -> CUInt #

Additive CLong # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: CLong #

(+) :: CLong -> CLong -> CLong #

scale :: IsNatural n => n -> CLong -> CLong #

Additive CULong # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: CULong #

(+) :: CULong -> CULong -> CULong #

scale :: IsNatural n => n -> CULong -> CULong #

Additive CLLong # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: CLLong #

(+) :: CLLong -> CLLong -> CLLong #

scale :: IsNatural n => n -> CLLong -> CLLong #

Additive CULLong # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: CULLong #

(+) :: CULLong -> CULLong -> CULLong #

scale :: IsNatural n => n -> CULLong -> CULLong #

Additive CFloat # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: CFloat #

(+) :: CFloat -> CFloat -> CFloat #

scale :: IsNatural n => n -> CFloat -> CFloat #

Additive CDouble # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: CDouble #

(+) :: CDouble -> CDouble -> CDouble #

scale :: IsNatural n => n -> CDouble -> CDouble #

Additive CPtrdiff # 
Instance details

Defined in Basement.Numerical.Additive

Additive CSize # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: CSize #

(+) :: CSize -> CSize -> CSize #

scale :: IsNatural n => n -> CSize -> CSize #

Additive CWchar # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: CWchar #

(+) :: CWchar -> CWchar -> CWchar #

scale :: IsNatural n => n -> CWchar -> CWchar #

Additive CSigAtomic # 
Instance details

Defined in Basement.Numerical.Additive

Additive CClock # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: CClock #

(+) :: CClock -> CClock -> CClock #

scale :: IsNatural n => n -> CClock -> CClock #

Additive CTime # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: CTime #

(+) :: CTime -> CTime -> CTime #

scale :: IsNatural n => n -> CTime -> CTime #

Additive CUSeconds # 
Instance details

Defined in Basement.Numerical.Additive

Additive CSUSeconds # 
Instance details

Defined in Basement.Numerical.Additive

Additive CIntPtr # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: CIntPtr #

(+) :: CIntPtr -> CIntPtr -> CIntPtr #

scale :: IsNatural n => n -> CIntPtr -> CIntPtr #

Additive CUIntPtr # 
Instance details

Defined in Basement.Numerical.Additive

Additive CIntMax # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: CIntMax #

(+) :: CIntMax -> CIntMax -> CIntMax #

scale :: IsNatural n => n -> CIntMax -> CIntMax #

Additive CUIntMax # 
Instance details

Defined in Basement.Numerical.Additive

Additive Word128 # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: Word128 #

(+) :: Word128 -> Word128 -> Word128 #

scale :: IsNatural n => n -> Word128 -> Word128 #

Additive Word256 # 
Instance details

Defined in Basement.Numerical.Additive

Methods

azero :: Word256 #

(+) :: Word256 -> Word256 -> Word256 #

scale :: IsNatural n => n -> Word256 -> Word256 #

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

Defined in Basement.Numerical.Additive

Methods

azero :: Zn n #

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

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

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

Defined in Basement.Numerical.Additive

Methods

azero :: Zn64 n #

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

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

Additive (CountOf ty) # 
Instance details

Defined in Basement.Types.OffsetSize

Methods

azero :: CountOf ty #

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

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

Additive (Offset ty) # 
Instance details

Defined in Basement.Types.OffsetSize

Methods

azero :: Offset ty #

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

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

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

Defined in Basement.Bits

Methods

azero :: Bits n #

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

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