<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Sep 18, 2018, at 8:45 AM, Dannyu NDos <<a href="mailto:ndospark320@gmail.com" class="">ndospark320@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="auto" class=""><div class="">Well, the motivation to make them associative was that (==) is logical XNOR, and (/=) is logical XOR. Perhaps we want an alias for Bool-instantization of them.<br class=""></div></div></div></blockquote></div><br class=""><div class=""><div class="">We already have such an binary operation in <font face="monospace" class="">base</font> that is associative: <font face="monospace" class="">xor</font><font face="Helvetica" class="">.</font></div><div class=""><br class=""></div><div class=""><font face="monospace" class="">>>> import Data.Bits</font></div><div class=""><font face="monospace" class="">>>> :i xor</font></div><div class=""><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 13px; line-height: normal;" class=""><font face="Menlo" class=""><span style="color: rgb(79, 108, 53); font-variant-ligatures: no-common-ligatures;" class="">class</span><span style="font-variant-ligatures: no-common-ligatures;" class=""> Eq a </span><span style="color: rgb(122, 66, 67); font-variant-ligatures: no-common-ligatures;" class="">=></span><span style="color: rgb(131, 148, 150); font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="font-variant-ligatures: no-common-ligatures;" class="">Bits a </span><span style="color: rgb(79, 108, 53); font-variant-ligatures: no-common-ligatures;" class="">where</span></font></div><div style="margin: 0px; font-stretch: normal; font-size: 13px; line-height: normal; color: rgb(122, 66, 67);" class=""><font face="Menlo" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #839496" class=""> </span><span style="font-variant-ligatures: no-common-ligatures" class="">...</span></font></div><div style="margin: 0px; font-stretch: normal; font-size: 13px; line-height: normal;" class=""><font face="Menlo" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><font color="#839496" class=""> </font>xor </span><span style="color: rgb(122, 66, 67); font-variant-ligatures: no-common-ligatures;" class="">::</span><span style="color: rgb(131, 148, 150); font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="font-variant-ligatures: no-common-ligatures;" class="">a</span><span style="color: rgb(131, 148, 150); font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="color: rgb(122, 66, 67); font-variant-ligatures: no-common-ligatures;" class="">-></span><span style="color: rgb(131, 148, 150); font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="font-variant-ligatures: no-common-ligatures;" class="">a</span><span style="color: rgb(131, 148, 150); font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="color: rgb(122, 66, 67); font-variant-ligatures: no-common-ligatures;" class="">-></span><span style="color: rgb(131, 148, 150); font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="font-variant-ligatures: no-common-ligatures;" class="">a</span></font></div><div style="margin: 0px; font-stretch: normal; font-size: 13px; line-height: normal; color: rgb(122, 66, 67);" class=""><font face="Menlo" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #839496" class=""> </span><span style="font-variant-ligatures: no-common-ligatures" class="">...</span></font></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><font face="Menlo" class=""><span style="color: rgb(131, 148, 150); font-size: 13px; font-variant-ligatures: no-common-ligatures;" class=""> <span class="Apple-tab-span" style="white-space:pre"> </span></span><span style="color: rgb(131, 148, 150); font-size: 13px; font-variant-ligatures: no-common-ligatures;" class="">-- Defined in ‘Data.Bits’</span></font></div></div></div><div class=""><font face="monospace" class="">>>> True `xor` False `xor` True<br class="">False</font></div><div class=""><br class=""></div><div class=""><font face="Helvetica" class="">The thing that would be missing is an </font><font face="monospace" class="">xnor</font><font face="Helvetica" class=""> operation in </font><font face="monospace" class="">Data.Bits</font>.</div></div><div class=""><br class=""></div><div class="">-- </div><div class="">Eric</div></body></html>