basement-0.0.11: 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 Char Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference Char Source # Methods (-) :: Char -> Char -> Difference Char Source #
Subtractive Double Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference Double Source # Methods (-) :: Double -> Double -> Difference Double Source #
Subtractive Float Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference Float Source # Methods (-) :: Float -> Float -> Difference Float Source #
Subtractive Int Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference Int Source # Methods (-) :: Int -> Int -> Difference Int Source #
Subtractive Int8 Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference Int8 Source # Methods (-) :: Int8 -> Int8 -> Difference Int8 Source #
Subtractive Int16 Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference Int16 Source # Methods (-) :: Int16 -> Int16 -> Difference Int16 Source #
Subtractive Int32 Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference Int32 Source # Methods (-) :: Int32 -> Int32 -> Difference Int32 Source #
Subtractive Int64 Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference Int64 Source # Methods (-) :: Int64 -> Int64 -> Difference Int64 Source #
Subtractive Integer Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference Integer Source # Methods (-) :: Integer -> Integer -> Difference Integer Source #
Subtractive Natural Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference Natural Source # Methods (-) :: Natural -> Natural -> Difference Natural Source #
Subtractive Word Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference Word Source # Methods (-) :: Word -> Word -> Difference Word Source #
Subtractive Word8 Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference Word8 Source # Methods (-) :: Word8 -> Word8 -> Difference Word8 Source #
Subtractive Word16 Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference Word16 Source # Methods (-) :: Word16 -> Word16 -> Difference Word16 Source #
Subtractive Word32 Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference Word32 Source # Methods (-) :: Word32 -> Word32 -> Difference Word32 Source #
Subtractive Word64 Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference Word64 Source # Methods (-) :: Word64 -> Word64 -> Difference Word64 Source #
Subtractive COff Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference COff Source # Methods (-) :: COff -> COff -> Difference COff Source #
Subtractive CChar Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CChar Source # Methods (-) :: CChar -> CChar -> Difference CChar Source #
Subtractive CSChar Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CSChar Source # Methods (-) :: CSChar -> CSChar -> Difference CSChar Source #
Subtractive CUChar Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CUChar Source # Methods (-) :: CUChar -> CUChar -> Difference CUChar Source #
Subtractive CShort Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CShort Source # Methods (-) :: CShort -> CShort -> Difference CShort Source #
Subtractive CUShort Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CUShort Source # Methods (-) :: CUShort -> CUShort -> Difference CUShort Source #
Subtractive CInt Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CInt Source # Methods (-) :: CInt -> CInt -> Difference CInt Source #
Subtractive CUInt Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CUInt Source # Methods (-) :: CUInt -> CUInt -> Difference CUInt Source #
Subtractive CLong Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CLong Source # Methods (-) :: CLong -> CLong -> Difference CLong Source #
Subtractive CULong Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CULong Source # Methods (-) :: CULong -> CULong -> Difference CULong Source #
Subtractive CLLong Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CLLong Source # Methods (-) :: CLLong -> CLLong -> Difference CLLong Source #
Subtractive CULLong Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CULLong Source # Methods (-) :: CULLong -> CULLong -> Difference CULLong Source #
Subtractive CBool Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CBool Source # Methods (-) :: CBool -> CBool -> Difference CBool Source #
Subtractive CFloat Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CFloat Source # Methods (-) :: CFloat -> CFloat -> Difference CFloat Source #
Subtractive CDouble Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CDouble Source # Methods (-) :: CDouble -> CDouble -> Difference CDouble Source #
Subtractive CPtrdiff Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CPtrdiff Source # Methods (-) :: CPtrdiff -> CPtrdiff -> Difference CPtrdiff Source #
Subtractive CSize Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CSize Source # Methods (-) :: CSize -> CSize -> Difference CSize Source #
Subtractive CWchar Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CWchar Source # Methods (-) :: CWchar -> CWchar -> Difference CWchar Source #
Subtractive CSigAtomic Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CSigAtomic Source # Methods (-) :: CSigAtomic -> CSigAtomic -> Difference CSigAtomic Source #
Subtractive CClock Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CClock Source # Methods (-) :: CClock -> CClock -> Difference CClock Source #
Subtractive CTime Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CTime Source # Methods (-) :: CTime -> CTime -> Difference CTime Source #
Subtractive CUSeconds Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CUSeconds Source # Methods (-) :: CUSeconds -> CUSeconds -> Difference CUSeconds Source #
Subtractive CSUSeconds Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CSUSeconds Source # Methods (-) :: CSUSeconds -> CSUSeconds -> Difference CSUSeconds Source #
Subtractive CIntPtr Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CIntPtr Source # Methods (-) :: CIntPtr -> CIntPtr -> Difference CIntPtr Source #
Subtractive CUIntPtr Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CUIntPtr Source # Methods (-) :: CUIntPtr -> CUIntPtr -> Difference CUIntPtr Source #
Subtractive CIntMax Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CIntMax Source # Methods (-) :: CIntMax -> CIntMax -> Difference CIntMax Source #
Subtractive CUIntMax Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference CUIntMax Source # Methods (-) :: CUIntMax -> CUIntMax -> Difference CUIntMax Source #
Subtractive Word128 Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference Word128 Source # Methods (-) :: Word128 -> Word128 -> Difference Word128 Source #
Subtractive Word256 Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference Word256 Source # Methods (-) :: Word256 -> Word256 -> Difference Word256 Source #
KnownNat n => Subtractive (Zn n) Source # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types type Difference (Zn n) Source # 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) Source # 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) Source # 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) Source # Methods (-) :: Offset ty -> Offset ty -> Difference (Offset ty) Source #
SizeValid n => Subtractive (Bits n) Source # |
Instance details Defined in Basement.Bits Associated Types type Difference (Bits n) Source # Methods (-) :: Bits n -> Bits n -> Difference (Bits n) Source #