module SuperOrd where data SuperOrd a = NegativeInfinity | SuperOrd { superApprox :: !a , superCompareApprox :: !Ordering } | PositiveInfinity deriving (Eq, Ord, Show) instance Bounded (SuperOrd a) where minBound = NegativeInfinity maxBound = PositiveInfinity exactly :: a -> SuperOrd a exactly a = SuperOrd a EQ lessThan :: a -> SuperOrd a lessThan a = SuperOrd a LT greaterThan :: a -> SuperOrd a greaterThan a = SuperOrd a GT