{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
module Numeric.Rounded.Hardware.Interval.Class where
import Numeric.Rounded.Hardware.Internal
infix 4 `equalAsSet`, `subset`, `weaklyLess`, `precedes`, `interior`, `strictLess`, `strictPrecedes`, `disjoint`
class IsInterval i where
type EndPoint i
withEndPoints :: (Rounded 'TowardNegInf (EndPoint i) -> Rounded 'TowardInf (EndPoint i) -> i) -> i -> i
singleton :: EndPoint i -> i
makeInterval :: Rounded 'TowardNegInf (EndPoint i) -> Rounded 'TowardInf (EndPoint i) -> i
width :: i -> Rounded 'TowardInf (EndPoint i)
hull :: i -> i -> i
intersection :: i -> i -> i
maybeIntersection :: i -> i -> Maybe i
equalAsSet :: i -> i -> Bool
subset :: i
-> i
-> Bool
weaklyLess :: i -> i -> Bool
precedes :: i -> i -> Bool
interior :: i -> i -> Bool
strictLess :: i -> i -> Bool
strictPrecedes :: i -> i -> Bool
disjoint :: i -> i -> Bool
singleton x = makeInterval (Rounded x) (Rounded x)