It certainly makes perfect sense, because total order antisymmetry law states that<br><br>IF a &lt;= b AND b &lt;= a THEN a = b<br><br>However it should rather be written<br><br>IF a &lt;= b AND b &lt;= a THEN a ~= b,<br><br>
since = could be any equivalence class. However, we can also specify the Ord on type<br><br>type Foo = Foo Int (Int-&gt;Int)<br><br>in this way:<br><br>instance Ord Foo where<br>&nbsp;&nbsp; compare (Foo a _) (Foo b _) = compare a b<br>
<br>which yields equivalence relation that is not assuming equivalence of the functions.<br>So this restriction does not seem to work on Adrian Hey&#39;s side.<br><br><br><br>Christopher Skrzêtnicki<br><br><br><div class="gmail_quote">
On Mon, Mar 10, 2008 at 8:06 PM, Dan Weston &lt;<a href="mailto:westondan@imageworks.com">westondan@imageworks.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On the other hand, though the behavior of == is not defined by the<br>
Report, it does require in 6.3.1 that if compare is defined, then ==<br>
must be defined. That strongly implies a semantic causal link (in the<br>
Free Theorem kind of way), that the semantics of Ord completely specify<br>
the semantics of Eq, and the only free and continuous way to specify<br>
this is to make == and EQ always agree.<br>
<br>
I would (almost) take this conclusion as normative as well.<br>
<font color="#888888"><br>
Dan<br>
</font><div><br></div></blockquote></div><br>