basement-0.0.4: Foundation scrap box of array & string

Safe Haskell | None
Language | Haskell2010

Basement.Numerical.Additive

Synopsis

- class Additive a where

# 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 # |
Methods azero :: Double Source # (+) :: Double -> Double -> Double Source # scale :: IsNatural n => n -> Double -> Double Source #
Additive Float Source # |
Methods azero :: Float Source # (+) :: Float -> Float -> Float Source # scale :: IsNatural n => n -> Float -> 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 # |
Methods azero :: Int16 Source # (+) :: Int16 -> Int16 -> Int16 Source # scale :: IsNatural n => n -> Int16 -> Int16 Source #
Additive Int32 Source # |
Methods azero :: Int32 Source # (+) :: Int32 -> Int32 -> Int32 Source # scale :: IsNatural n => n -> Int32 -> Int32 Source #
Additive Int64 Source # |
Methods azero :: Int64 Source # (+) :: Int64 -> Int64 -> Int64 Source # scale :: IsNatural n => n -> Int64 -> Int64 Source #
Additive Integer Source # |
Methods azero :: Integer Source # (+) :: Integer -> Integer -> Integer Source # scale :: IsNatural n => n -> Integer -> Integer Source #
Additive Word Source # |
Methods azero :: Word Source # (+) :: Word -> Word -> Word Source # scale :: IsNatural n => n -> Word -> Word Source #
Additive Word8 Source # |
Methods azero :: Word8 Source # (+) :: Word8 -> Word8 -> Word8 Source # scale :: IsNatural n => n -> Word8 -> Word8 Source #
Additive Word16 Source # |
Methods azero :: Word16 Source # (+) :: Word16 -> Word16 -> Word16 Source # scale :: IsNatural n => n -> Word16 -> Word16 Source #
Additive Word32 Source # |
Methods azero :: Word32 Source # (+) :: Word32 -> Word32 -> Word32 Source # scale :: IsNatural n => n -> Word32 -> Word32 Source #
Additive Word64 Source # |
Methods azero :: Word64 Source # (+) :: Word64 -> Word64 -> Word64 Source # scale :: IsNatural n => n -> Word64 -> Word64 Source #
Additive Natural Source # |
Methods azero :: Natural Source # (+) :: Natural -> Natural -> Natural Source # scale :: IsNatural n => n -> Natural -> Natural Source #
Additive CSize Source # |
Methods azero :: CSize Source # (+) :: CSize -> CSize -> CSize Source # scale :: IsNatural n => n -> CSize -> CSize Source #
Additive Word128 Source # |
Methods azero :: Word128 Source # (+) :: Word128 -> Word128 -> Word128 Source # scale :: IsNatural n => n -> Word128 -> Word128 Source #
Additive Word256 Source # |
Methods azero :: Word256 Source # (+) :: Word256 -> Word256 -> Word256 Source # scale :: IsNatural n => n -> Word256 -> Word256 Source #
KnownNat n => Additive (Zn n) Source # |
Methods azero :: Zn n Source # (+) :: Zn n -> Zn n -> Zn n Source # scale :: IsNatural n => n -> Zn n -> Zn n Source #
(KnownNat n, NatWithinBound Word64 n) => Additive (Zn64 n) Source # |
Methods azero :: Zn64 n Source # (+) :: Zn64 n -> Zn64 n -> Zn64 n Source # scale :: IsNatural n => n -> Zn64 n -> Zn64 n 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 #