Proposal: Data.Bool.implies

David Feuer david.feuer at gmail.com
Mon Jan 18 09:21:38 UTC 2016


I don't think flipping it is the way to go; I expect things to
short-circuit from left to right.
On Jan 18, 2016 4:14 AM, "Herbert Valerio Riedel" <hvriedel at gmail.com>
wrote:

> On 2016-01-18 at 03:17:44 +0100, Niklas Hambüchen wrote:
>
> [...]
>
> > The request for this is quite old (see e.g.
> >
> http://neilmitchell.blogspot.de/2007/02/logical-implication-in-haskell.html
> ).
> >
> > I believe that by not trying to use an operator for it, and keeping it
> > in Data.Bool, we can avoid doing anything wrong.
>
> Just wondering, what could/would go wrong if we did use an operator
> `==>` (still be hidden in Data.Bool[1]), i.e.
>
>  (==>) :: Bool -> Bool -> Bool
>  True  ==> x  = x
>  False ==> _  = True
>
>
> this would leave open the option to have an obvious flipped version
>
>   (<==) :: Bool -> Bool -> Bool
>   (<==) = flip (==>)
>
>
>
>  [1]: Consequently, if `==>` is available only via explicit Data.Bool
>       import, a conflict with QuickCheck's (==>) shouldn't be a big
>       issue IMHO
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20160118/79126c16/attachment-0001.html>


More information about the Libraries mailing list