At 15:12 -0500 1999/04/28, Michael Hobbs wrote:
>> The main point though is that the total order exists, and is a sorting
>> order separate from the Ord derivation.
>
>Sounds very much like treaps, where a random number is assigned to each
>value when it is placed in the tree. I suspect that this particular
>scheme that you mention relies on not-so-random-but-rather-arbitrary
>values. True?

No this is not what I have in my mind -- see my other post.

There appears to be ways of defining such a global total order for sorting
purposes by analyzing the different construct in Haskell (data definitions
etc). This can then be used to produce a default total order.

Then a user that does not like this default total order produced by
Haskell, I think should be able to override it, writing their own version.
If you for some reason want to use a hash code or something, then you can
of course use it, as long as it is a total order.

Or strictly speaking, if "<" is the order used for the sets and maps, then
one defines an equivalence relation by  x == y  <=>  (x < y and y < x).
Then the sets and maps will handle equivalent elements as if they were
identical.

But whatever this total order is, it will not be formally related to the
Ord construction.

  Hans Aberg
                  * Email: Hans Aberg <mailto:[EMAIL PROTECTED]>
                  * Home Page: <http://www.matematik.su.se/~haberg/>
                  * AMS member listing: <http://www.ams.org/cml/>




Reply via email to