basement-0.0.16: Foundation scrap box of array & string

Safe Haskell | None
Language | Haskell2010

Basement.Numerical.Subtractive

Synopsis

- class Subtractive a where
  - type Difference a
  - (-) :: a -> a -> Difference a

# Documentation

class Subtractive a where Source #

Represent class of things that can be subtracted.

Note that the result is not necessary of the same type as the operand depending on the actual type.

For example:

    (-) :: Int -> Int -> Int
    (-) :: DateTime -> DateTime -> Seconds
    (-) :: Ptr a -> Ptr a -> PtrDiff
    (-) :: Natural -> Natural -> Maybe Natural

Associated Types

type Difference a Source #

Methods

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

#### Instances

Instances details

Subtractive Word128 Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Word128 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word128 = Word128

Methods

(-) :: Word128 -> Word128 -> Difference Word128 Source #

Subtractive Word256 Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Word256 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word256 = Word256

Methods

(-) :: Word256 -> Word256 -> Difference Word256 Source #

Subtractive CBool Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CBool |
Instance details Defined in Basement.Numerical.Subtractive type Difference CBool = CBool

Methods

(-) :: CBool -> CBool -> Difference CBool Source #

Subtractive CChar Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CChar |
Instance details Defined in Basement.Numerical.Subtractive type Difference CChar = CChar

Methods

(-) :: CChar -> CChar -> Difference CChar Source #

Subtractive CClock Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CClock |
Instance details Defined in Basement.Numerical.Subtractive type Difference CClock = CClock

Methods

(-) :: CClock -> CClock -> Difference CClock Source #

Subtractive CDouble Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CDouble |
Instance details Defined in Basement.Numerical.Subtractive type Difference CDouble = CDouble

Methods

(-) :: CDouble -> CDouble -> Difference CDouble Source #

Subtractive CFloat Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CFloat |
Instance details Defined in Basement.Numerical.Subtractive type Difference CFloat = CFloat

Methods

(-) :: CFloat -> CFloat -> Difference CFloat Source #

Subtractive CInt Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CInt |
Instance details Defined in Basement.Numerical.Subtractive type Difference CInt = CInt

Methods

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

Subtractive CIntMax Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CIntMax |
Instance details Defined in Basement.Numerical.Subtractive type Difference CIntMax = CIntMax

Methods

(-) :: CIntMax -> CIntMax -> Difference CIntMax Source #

Subtractive CIntPtr Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CIntPtr |
Instance details Defined in Basement.Numerical.Subtractive type Difference CIntPtr = CIntPtr

Methods

(-) :: CIntPtr -> CIntPtr -> Difference CIntPtr Source #

Subtractive CLLong Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CLLong |
Instance details Defined in Basement.Numerical.Subtractive type Difference CLLong = CLLong

Methods

(-) :: CLLong -> CLLong -> Difference CLLong Source #

Subtractive CLong Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CLong |
Instance details Defined in Basement.Numerical.Subtractive type Difference CLong = CLong

Methods

(-) :: CLong -> CLong -> Difference CLong Source #

Subtractive CPtrdiff Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CPtrdiff |
Instance details Defined in Basement.Numerical.Subtractive type Difference CPtrdiff = CPtrdiff

Methods

(-) :: CPtrdiff -> CPtrdiff -> Difference CPtrdiff Source #

Subtractive CSChar Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CSChar |
Instance details Defined in Basement.Numerical.Subtractive type Difference CSChar = CSChar

Methods

(-) :: CSChar -> CSChar -> Difference CSChar Source #

Subtractive CSUSeconds Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CSUSeconds |
Instance details Defined in Basement.Numerical.Subtractive type Difference CSUSeconds = CSUSeconds

Methods

(-) :: CSUSeconds -> CSUSeconds -> Difference CSUSeconds Source #

Subtractive CShort Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CShort |
Instance details Defined in Basement.Numerical.Subtractive type Difference CShort = CShort

Methods

(-) :: CShort -> CShort -> Difference CShort Source #

Subtractive CSigAtomic Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CSigAtomic |
Instance details Defined in Basement.Numerical.Subtractive type Difference CSigAtomic = CSigAtomic

Methods

(-) :: CSigAtomic -> CSigAtomic -> Difference CSigAtomic Source #

Subtractive CSize Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CSize |
Instance details Defined in Basement.Numerical.Subtractive type Difference CSize = CSize

Methods

(-) :: CSize -> CSize -> Difference CSize Source #

Subtractive CTime Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CTime |
Instance details Defined in Basement.Numerical.Subtractive type Difference CTime = CTime

Methods

(-) :: CTime -> CTime -> Difference CTime Source #

Subtractive CUChar Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CUChar |
Instance details Defined in Basement.Numerical.Subtractive type Difference CUChar = CUChar

Methods

(-) :: CUChar -> CUChar -> Difference CUChar Source #

Subtractive CUInt Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CUInt |
Instance details Defined in Basement.Numerical.Subtractive type Difference CUInt = CUInt

Methods

(-) :: CUInt -> CUInt -> Difference CUInt Source #

Subtractive CUIntMax Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CUIntMax |
Instance details Defined in Basement.Numerical.Subtractive type Difference CUIntMax = CUIntMax

Methods

(-) :: CUIntMax -> CUIntMax -> Difference CUIntMax Source #

Subtractive CUIntPtr Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CUIntPtr |
Instance details Defined in Basement.Numerical.Subtractive type Difference CUIntPtr = CUIntPtr

Methods

(-) :: CUIntPtr -> CUIntPtr -> Difference CUIntPtr Source #

Subtractive CULLong Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CULLong |
Instance details Defined in Basement.Numerical.Subtractive type Difference CULLong = CULLong

Methods

(-) :: CULLong -> CULLong -> Difference CULLong Source #

Subtractive CULong Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CULong |
Instance details Defined in Basement.Numerical.Subtractive type Difference CULong = CULong

Methods

(-) :: CULong -> CULong -> Difference CULong Source #

Subtractive CUSeconds Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CUSeconds |
Instance details Defined in Basement.Numerical.Subtractive type Difference CUSeconds = CUSeconds

Methods

(-) :: CUSeconds -> CUSeconds -> Difference CUSeconds Source #

Subtractive CUShort Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CUShort |
Instance details Defined in Basement.Numerical.Subtractive type Difference CUShort = CUShort

Methods

(-) :: CUShort -> CUShort -> Difference CUShort Source #

Subtractive CWchar Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference CWchar |
Instance details Defined in Basement.Numerical.Subtractive type Difference CWchar = CWchar

Methods

(-) :: CWchar -> CWchar -> Difference CWchar Source #

Subtractive Int16 Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Int16 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Int16 = Int16

Methods

(-) :: Int16 -> Int16 -> Difference Int16 Source #

Subtractive Int32 Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Int32 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Int32 = Int32

Methods

(-) :: Int32 -> Int32 -> Difference Int32 Source #

Subtractive Int64 Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Int64 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Int64 = Int64

Methods

(-) :: Int64 -> Int64 -> Difference Int64 Source #

Subtractive Int8 Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Int8 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Int8 = Int8

Methods

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

Subtractive COff Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference COff |
Instance details Defined in Basement.Numerical.Subtractive type Difference COff = COff

Methods

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

Subtractive Word16 Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Word16 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word16 = Word16

Methods

(-) :: Word16 -> Word16 -> Difference Word16 Source #

Subtractive Word32 Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Word32 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word32 = Word32

Methods

(-) :: Word32 -> Word32 -> Difference Word32 Source #

Subtractive Word64 Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Word64 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word64 = Word64

Methods

(-) :: Word64 -> Word64 -> Difference Word64 Source #

Subtractive Word8 Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Word8 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word8 = Word8

Methods

(-) :: Word8 -> Word8 -> Difference Word8 Source #

Subtractive Integer Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Integer |
Instance details Defined in Basement.Numerical.Subtractive type Difference Integer = Integer

Methods

(-) :: Integer -> Integer -> Difference Integer Source #

Subtractive Natural Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Natural |
Instance details Defined in Basement.Numerical.Subtractive type Difference Natural = Maybe Natural

Methods

(-) :: Natural -> Natural -> Difference Natural Source #

Subtractive Char Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Char |
Instance details Defined in Basement.Numerical.Subtractive type Difference Char = Int

Methods

(-) :: Char -> Char -> Difference Char Source #

Subtractive Double Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Double |
Instance details Defined in Basement.Numerical.Subtractive type Difference Double = Double

Methods

(-) :: Double -> Double -> Difference Double Source #

Subtractive Float Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Float |
Instance details Defined in Basement.Numerical.Subtractive type Difference Float = Float

Methods

(-) :: Float -> Float -> Difference Float Source #

Subtractive Int Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Int |
Instance details Defined in Basement.Numerical.Subtractive type Difference Int = Int

Methods

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

Subtractive Word Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Word |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word = Word

Methods

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

SizeValid n => Subtractive (Bits n) Source # |

Instance details

Defined in Basement.Bits

Associated Types

type Difference (Bits n) |
Instance details Defined in Basement.Bits type Difference (Bits n) = Bits n

Methods

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

KnownNat n => Subtractive (Zn n) Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference (Zn n) |
Instance details Defined in Basement.Numerical.Subtractive type Difference (Zn n) = Zn n

Methods

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

(KnownNat n, NatWithinBound Word64 n) => Subtractive (Zn64 n) Source # |

Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference (Zn64 n) |
Instance details Defined in Basement.Numerical.Subtractive type Difference (Zn64 n) = Zn64 n

Methods

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

Subtractive (CountOf ty) Source # |

Instance details

Defined in Basement.Types.OffsetSize

Associated Types

type Difference (CountOf ty) |
Instance details Defined in Basement.Types.OffsetSize type Difference (CountOf ty) = Maybe (CountOf ty)

Methods

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

Subtractive (Offset ty) Source # |

Instance details

Defined in Basement.Types.OffsetSize

Associated Types

type Difference (Offset ty) |
Instance details Defined in Basement.Types.OffsetSize type Difference (Offset ty) = CountOf ty

Methods

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