On Sat, Apr 24, 2010 at 5:56 AM, Barak A. Pearlmutter <ba...@cs.nuim.ie> wrote: >> Even deriving(Ord) only produces compare and relies on standard >> definitions for other methods. > > I don't think that's actually a problem. Surely the IEEE Floating > Point types would give their own definitions of not just compare but > also <, <=, etc, overriding the problematic deriving(Ord) definitions > of comparison in terms of compare and vice-versa.
There is the issue of deriving Ord for algebraic types that include Float. data Foo = Foo Float deriving (Show, Eq, Ord) *Main> Foo (0/0) > Foo (0/0) True *Main> 0/0 > 0/0 False If compare (0/0) (0/0) = _|_, then Foo (0/0) == Foo (0/0) = _|_. -- Dave Menendez <d...@zednenem.com> <http://www.eyrie.org/~zednenem/> _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe