<html><head></head><body>For what it's worth, Haskell says that NaN is `GT` NaN. So maybe it would also claim than NULL is `GT` NULL.<br><br>(NaN is not `==` to NaN, and is not `<=` to NaN, so it must be GT.)<div style='white-space: pre-wrap'>—<br>Sent from my phone with K-9 Mail.</div><br><br><div class="gmail_quote">On 27 October 2021 15:32:40 UTC, Viktor Dukhovni <ietf-dane@dukhovni.org> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre dir="auto" class="k9mail">On Wed, Oct 27, 2021 at 11:14:45AM -0400, Carter Schonwald wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">not necessarily ... there could be contradictory sets of methods! :)<br><br>like the minimal sets for Field type class, the xor would be for defining<br>'/' in terms of reciprocal and times or vice versa (/ vs recip) and<br>likewise (negate vs minus) etc etc<br></blockquote><br>Logically redundant definitions aren't always redundant in practice if<br>one considers performance, floating point accuracy or even sometimes<br>divergence.<br><br> For example, foldl on infinite snoc lists is not definable in<br> terms of foldr which diverges, though admittedly I rather think<br> that infinite snoc lists violate all reasonable expectations of<br> a Foldable instance.<br><br>So in many cases redundancy warnings would not be viable. The Eq<br>situation is likely more the exception that the rule.<br><br>The SQL NULL instances that are False for both "==" and "/=" look<br>like they could be a mistake to me, but presumably they work out<br>OK in practice, and I would expect that e.g. the relevant `Ord`<br>instances do return `EQ` for `compare Null Null`... Less clear<br>is whether the non-lawful Eq defintion is in some predicably useful<br>way essential.<br><br><div class="k9mail-signature">-- <br> Viktor.<hr>Libraries mailing list<br>Libraries@haskell.org<br><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br></div></pre></blockquote></div></body></html>