basement-0.0.1: Foundation scrap box of array & string

Safe HaskellNone
LanguageHaskell2010

Basement.Numerical.Subtractive

Synopsis

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

Minimal complete definition

(-)

Associated Types

type Difference a Source #

Methods

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

Instances

Subtractive Char Source # 

Associated Types

type Difference Char :: * Source #

Methods

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

Subtractive Double Source # 

Associated Types

type Difference Double :: * Source #

Subtractive Float Source # 

Associated Types

type Difference Float :: * Source #

Subtractive Int Source # 

Associated Types

type Difference Int :: * Source #

Methods

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

Subtractive Int8 Source # 

Associated Types

type Difference Int8 :: * Source #

Methods

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

Subtractive Int16 Source # 

Associated Types

type Difference Int16 :: * Source #

Subtractive Int32 Source # 

Associated Types

type Difference Int32 :: * Source #

Subtractive Int64 Source # 

Associated Types

type Difference Int64 :: * Source #

Subtractive Integer Source # 

Associated Types

type Difference Integer :: * Source #

Subtractive Word Source # 

Associated Types

type Difference Word :: * Source #

Methods

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

Subtractive Word8 Source # 

Associated Types

type Difference Word8 :: * Source #

Subtractive Word16 Source # 

Associated Types

type Difference Word16 :: * Source #

Subtractive Word32 Source # 

Associated Types

type Difference Word32 :: * Source #

Subtractive Word64 Source # 

Associated Types

type Difference Word64 :: * Source #

Subtractive Natural Source # 

Associated Types

type Difference Natural :: * Source #

Subtractive Word128 Source # 

Associated Types

type Difference Word128 :: * Source #

Subtractive Word256 Source # 

Associated Types

type Difference Word256 :: * Source #

Subtractive (CountOf ty) Source # 

Associated Types

type Difference (CountOf ty) :: * Source #

Methods

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

Subtractive (Offset ty) Source # 

Associated Types

type Difference (Offset ty) :: * Source #

Methods

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