úÎ%û"Œ#      !"DeriveDataTypeable experimentalekmett@gmail.com Safe-Inferred!HThe rule of thumb is you should only use this to construct using values H that you took out of the interval. Otherwise, use I, to force rounding The whole real number line An empty interval negation handles NaN properly A singleton point +The infinumum (lower bound) of an interval *The supremum (upper bound) of an interval #Is the interval a singleton point? < N.B. This is fairly fragile and likely will not hold after 4 even a few operations that only involve singletons $Calculate the width of an interval.  Magnitude " mignitude" $Bisect an interval at its midpoint. /Nearest point to the midpoint of the interval. #:lift a monotone increasing function over a given interval $:lift a monotone increasing function over a given interval -Calculate the intersection of two intervals. +Calculate the convex hull of two intervals For all x in X, y in Y. x % y For all x in X, y in Y. x & y For all x in X, y in Y. x ' y (For all x in X, y in Y. x ) y For all x in X, y in Y. x * y For all x in X, y in Y. x + y For all x in X, y in Y. x op y Does there exist an x in X, y in Y such that x % y? Does there exist an x in X, y in Y such that x & y? Does there exist an x in X, y in Y such that x ' y? ,Does there exist an x in X, y in Y such that x ) y? Does there exist an x in X, y in Y such that x * y? Does there exist an x in X, y in Y such that x + y? Does there exist an x in X, y in Y such that x op y? -FWe have to play some semantic games to make these methods make sense. 1 Most compute with the midpoint of the interval. .1This means that realToFrac will use the midpoint 4What moron put an Ord instance requirement on Real! =/012 3456#$(, !"-789:.;<=>?@AB#  !"#   !"</012 3456#$(, !"-789:.;<=>?@ABC      !"#$%&'()'(*'(+,'(-'(.'(/0123456789:;<=>?@ABCDEFG intervals-0.3Numeric.IntervalIntervalI...wholeemptynull singletoninfsupsingularwidth magnitude mignitude bisectionmidpointelemnotElem intersectionhull!>=! certainlycontains isSubsetOf?>=?possiblyidoubleifloat increasing decreasingghc-prim GHC.Classes<<===/=!/=>>=/=?$fRealFloatInterval$fRealInterval negInfinity posInfinitynanfmod divNonZero divPositive divNegativedivZero$fFloatingInterval$fRealFracInterval$fFractionalInterval $fOrdInterval $fNumInterval$fShowInterval $fEqInterval$fMonadInterval$fApplicativeInterval$fTraversableInterval$fFoldableInterval$fFunctorInterval