Proposal: Data.Bool.implies

Joachim Breitner mail at
Mon Jan 18 15:43:53 UTC 2016


Am Montag, den 18.01.2016, 03:17 +0100 schrieb Niklas Hambüchen:
> I propose to add to Data.Bool:
>     -- | Boolean implication.
>     implies :: Bool -> Bool -> Bool
>     implies True  x = x
>     implies False _ = True
>     infix 4 `implies` -- same as (==)

I’m +1 on the grounds that although I know that one of <= or => cuts
it, it causes extra mental work to find out which (and annoyance to
find out that it is the “wrong” one). Using a name is explicit and gets
it right the first time.

-1 on changing the order for Bool, it would just break too much code
that relies on that in a fairly obscure way.

+1 for making it right-associative, as implications are usually

Undecided about ==>. It would be nice, but the conflict with quickcheck
would be annoying. Leaning towards -1.

Joachim “nomeata” Breitner
  mail at joachim-breitner.de
  Jabber: nomeata at  • GPG-Key: 0xF0FBF51F
  Debian Developer: nomeata at

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the Libraries mailing list