
On Tue, 2011-09-20 at 16:05 -0600, Chris Smith wrote:
On Tue, 2011-09-20 at 17:28 -0400, Casey McCann wrote:
Since removing the instances entirely is probably not a popular idea, the least broken solution would be to define NaN as equal to itself and less than everything else, thus accepting the reality of Ord as the "meaningless arbitrary total order" type class I suggested above and leaving Haskell bereft of any generic semantic comparisons whatsoever. Ah, pragmatism.
There's nothing *wrong* with pragmatism, but in any case, we seem to agree on this. As I said earlier, we ought to impose a (rather arbitrary) total order on Float and Double, and then offer comparison with IEEE semantics as a separate set of functions when they are needed. (I wonder if Ocaml-style (<.) and (>.) and such are used anywhere.)
Doesn't seems so: http://www.haskell.org/hoogle/?hoogle=%3E. http://www.haskell.org/hoogle/?hoogle=%3C. +1 for: class Eq a => IEEEEq a where (<.) :: a -> a -> Bool (>.) :: a -> a -> Bool Regards