basement-0.0.10: Foundation scrap box of array & string

Safe HaskellNone
LanguageHaskell2010

Basement.Numerical.Subtractive

Synopsis

Documentation

class Subtractive a where #

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

Minimal complete definition

(-)

Associated Types

type Difference a #

Methods

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

Instances

Subtractive Char # 

Associated Types

type Difference Char :: * #

Methods

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

Subtractive Double # 

Associated Types

type Difference Double :: * #

Subtractive Float # 

Associated Types

type Difference Float :: * #

Methods

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

Subtractive Int # 

Associated Types

type Difference Int :: * #

Methods

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

Subtractive Int8 # 

Associated Types

type Difference Int8 :: * #

Methods

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

Subtractive Int16 # 

Associated Types

type Difference Int16 :: * #

Methods

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

Subtractive Int32 # 

Associated Types

type Difference Int32 :: * #

Methods

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

Subtractive Int64 # 

Associated Types

type Difference Int64 :: * #

Methods

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

Subtractive Integer # 

Associated Types

type Difference Integer :: * #

Subtractive Word # 

Associated Types

type Difference Word :: * #

Methods

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

Subtractive Word8 # 

Associated Types

type Difference Word8 :: * #

Methods

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

Subtractive Word16 # 

Associated Types

type Difference Word16 :: * #

Subtractive Word32 # 

Associated Types

type Difference Word32 :: * #

Subtractive Word64 # 

Associated Types

type Difference Word64 :: * #

Subtractive Natural # 

Associated Types

type Difference Natural :: * #

Subtractive COff # 

Associated Types

type Difference COff :: * #

Methods

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

Subtractive CChar # 

Associated Types

type Difference CChar :: * #

Methods

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

Subtractive CSChar # 

Associated Types

type Difference CSChar :: * #

Subtractive CUChar # 

Associated Types

type Difference CUChar :: * #

Subtractive CShort # 

Associated Types

type Difference CShort :: * #

Subtractive CUShort # 

Associated Types

type Difference CUShort :: * #

Subtractive CInt # 

Associated Types

type Difference CInt :: * #

Methods

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

Subtractive CUInt # 

Associated Types

type Difference CUInt :: * #

Methods

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

Subtractive CLong # 

Associated Types

type Difference CLong :: * #

Methods

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

Subtractive CULong # 

Associated Types

type Difference CULong :: * #

Subtractive CLLong # 

Associated Types

type Difference CLLong :: * #

Subtractive CULLong # 

Associated Types

type Difference CULLong :: * #

Subtractive CFloat # 

Associated Types

type Difference CFloat :: * #

Subtractive CDouble # 

Associated Types

type Difference CDouble :: * #

Subtractive CPtrdiff # 

Associated Types

type Difference CPtrdiff :: * #

Subtractive CSize # 

Associated Types

type Difference CSize :: * #

Methods

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

Subtractive CWchar # 

Associated Types

type Difference CWchar :: * #

Subtractive CSigAtomic # 

Associated Types

type Difference CSigAtomic :: * #

Subtractive CClock # 

Associated Types

type Difference CClock :: * #

Subtractive CTime # 

Associated Types

type Difference CTime :: * #

Methods

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

Subtractive CUSeconds # 

Associated Types

type Difference CUSeconds :: * #

Subtractive CSUSeconds # 

Associated Types

type Difference CSUSeconds :: * #

Subtractive CIntPtr # 

Associated Types

type Difference CIntPtr :: * #

Subtractive CUIntPtr # 

Associated Types

type Difference CUIntPtr :: * #

Subtractive CIntMax # 

Associated Types

type Difference CIntMax :: * #

Subtractive CUIntMax # 

Associated Types

type Difference CUIntMax :: * #

Subtractive Word128 # 

Associated Types

type Difference Word128 :: * #

Subtractive Word256 # 

Associated Types

type Difference Word256 :: * #

KnownNat n => Subtractive (Zn n) # 

Associated Types

type Difference (Zn n) :: * #

Methods

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

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

Associated Types

type Difference (Zn64 n) :: * #

Methods

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

Subtractive (CountOf ty) # 

Associated Types

type Difference (CountOf ty) :: * #

Methods

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

Subtractive (Offset ty) # 

Associated Types

type Difference (Offset ty) :: * #

Methods

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

SizeValid n => Subtractive (Bits n) # 

Associated Types

type Difference (Bits n) :: * #

Methods

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