Add fixity for (==) and (/=)

Eric Mertens emertens at gmail.com
Tue Sep 18 15:58:18 UTC 2018



> On Sep 18, 2018, at 8:45 AM, Dannyu NDos <ndospark320 at gmail.com> wrote:
> 
> 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.

We already have such an binary operation in base that is associative: xor.

>>> import Data.Bits
>>> :i xor
class Eq a => Bits a where
  ...
  xor :: a -> a -> a
  ...
  	-- Defined in ‘Data.Bits’
>>> True `xor` False `xor` True
False

The thing that would be missing is an xnor operation in Data.Bits.

-- 
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20180918/291c0935/attachment.html>


More information about the Libraries mailing list