Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
type Difference a Source #
(-) :: a -> a -> Difference a infixl 6 Source #