<p dir="ltr">Instance Ord a where<br>
  _ <= _ = True</p>
<p dir="ltr">Is law abiding for any type. So there is no type that cannot support a law abiding Ord instance.</p>
<div class="gmail_quote">On Jan 1, 2015 3:04 PM, "Tom Ellis" <<a href="mailto:tom-lists-haskell-cafe-2013@jaguarpaw.co.uk">tom-lists-haskell-cafe-2013@jaguarpaw.co.uk</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Jan 01, 2015 at 08:58:35AM -0500, <a href="mailto:oleg@okmij.org">oleg@okmij.org</a> wrote:<br>
> Tom Ellis wrote:<br>
> > Is there a type with an Eq instance for which on Ord instance could not also<br>
> > be provided (i.e. I'm interested in Clark's "converse")?<br>
><br>
> Of course. One of the very many examples is Complex. One can say we<br>
> can compare complex numbers, by their absolute value.  That is true;<br>
> however we end up in a position where compare x y returns EQ but x==y<br>
> returns False.<br>
<br>
I don't understand your objection.  `Complex a` isomorphic to `(a, a)` which<br>
can be totally ordered.  (The complex field cannot be given a total order<br>
*compatible with the field structure*, but that's not relevant to my<br>
question.)<br>
<br>
> In general, Ord represents total order. There are many structures on<br>
> which total order cannot be established. Take nodes in the tree, the<br>
> Tree data type. One can compare nodes by taking a parent to be less<br>
> than any of its children. But then two brothers are not<br>
> comparable. Searching for "partial orders" and pre-orders gives many<br>
> more examples.<br>
<br>
I think you may be missing the intent of my question.  I am merely asking<br>
whether there is a type which supports a (law abiding) Eq instance that<br>
cannot support a (law abiding) Ord instance.  Whether that Ord instance is<br>
compatible with additional structures on that type is beside the point.<br>
<br>
Tom<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div>