basement-0.0.1: 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 #

Instances

Additive Double Source # 
Additive Float Source # 
Additive Int Source # 

Methods

azero :: Int Source #

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

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

Additive Int8 Source # 

Methods

azero :: Int8 Source #

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

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

Additive Int16 Source # 
Additive Int32 Source # 
Additive Int64 Source # 
Additive Integer Source # 
Additive Word Source # 

Methods

azero :: Word Source #

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

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

Additive Word8 Source # 
Additive Word16 Source # 
Additive Word32 Source # 
Additive Word64 Source # 
Additive Natural Source # 
Additive CSize Source # 
Additive Word128 Source # 
Additive Word256 Source # 
Additive (CountOf ty) Source # 

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 # 

Methods

azero :: Offset ty Source #

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

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