Pretty cool! The only problem is that Integer is not Bounded.. I wonder if we can employ some more instance fuckery there, like returning Maybe Integer and making the class accept two different types, so that we can compare Maybe Integer with Integer
Comments
but otherwise v cool, thanks for sharing
(<) :: (LessThan result, Ord a, Bounded a) => a -> a -> result
without any further code changes