<div dir="auto">NULL is not like NaN. It's perfectly sensible to stick `NULL` in a `Set` or something.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 27, 2021, 8:09 PM Keith <<a href="mailto:keith.wygant@gmail.com">keith.wygant@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>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 <<a href="mailto:ietf-dane@dukhovni.org" target="_blank" rel="noreferrer">ietf-dane@dukhovni.org</a>> 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">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>-- <br>    Viktor.<hr>Libraries mailing list<br><a href="mailto:Libraries@haskell.org" target="_blank" rel="noreferrer">Libraries@haskell.org</a><br><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" target="_blank" rel="noreferrer">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br></div></pre></blockquote></div></div>_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank" rel="noreferrer">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div>