[email protected]
[Top] [All Lists]

Re: [Haskell-cafe] Re: (flawed?) benchmark : sort

Subject: Re: [Haskell-cafe] Re: (flawed?) benchmark : sort
From: "Denis Bueno"
Date: Mon, 10 Mar 2008 15:20:55 -0400
On Mon, Mar 10, 2008 at 3:12 PM, Neil Mitchell <[email protected]> wrote:
> Hi
>  >  "The Ord class is used for totally ordered datatypes."
>  >
>  >  This *requires* that it be absolutely impossible in valid code to
>  >  distinguish equivalent (in the EQ sense, not the == sense) things via
>  >  the functions of Ord. The intended interpretation of these functions is
>  >  clear and can be taken as normative:
>  >
>  >    forall f . (compare x y == EQ and (f x or f y is defined))
>  >                   ==> f x == f y)
>  Are you sure? I would have read this as the ordering must be
>  reflexive, antisymetric and transitive - the standard restrictions on
>  any ordering. See http://en.wikipedia.org/wiki/Total_ordering

This is my reading, too.  In addition, to make it total, the property
that any two elements are comparable (this is the property that a
partial order does not necessarily have).

Haskell-Cafe mailing list
[email protected]

<Prev in Thread] Current Thread [Next in Thread>