Proposal: Data.Bool.implies

evan@evan-borden.com evan at evanrutledgeborden.dreamhosters.com
Fri Jan 22 18:11:23 UTC 2016


Answering my own question, yes it is in the report.

>From the report:

> 6.1.1 Booleans
>
> data  Bool  =  False | True deriving
>                              (Read, Show, Eq, Ord, Enum, Bounded)
>
> *11.1 Derived instances of Eq and *
> *Ord*
> ...For example, for the Bool datatype, we have that (True > False) == True
> .
>


On Fri, Jan 22, 2016 at 12:59 PM, evan at evan-borden.com <
evan at evanrutledgeborden.dreamhosters.com> wrote:

> +1 For not changing the Ord instance for Bool. It would be disastrous. As
> an aside, is the Order instance for Bool in the report?
> On Jan 22, 2016 12:24 PM, "Iavor Diatchki" <iavor.diatchki at gmail.com>
> wrote:
>
>> Please don't change the ordering on Bool---it's been like that forever
>> and it might lead to extremely subtle bugs that won't be caught by the
>> compiler.
>>
>> I am ambivalent about adding an `implies` function as long as it is not
>> automatically in scope.  However, can anyone give some examples of using
>> this in your code?  All the ones I could think of would seem easier to
>> follow when written with `if-then-else` or a guard.
>>
>> -Iavor
>>
>>
>>
>>
>> On Thu, Jan 21, 2016 at 11:28 AM, Felipe Lessa <felipe.lessa at gmail.com>
>> wrote:
>>
>>> +1 for either Data.Bool.implies or Data.Bool.(==>).
>>>
>>> +1 for right-associativity.
>>>
>>> Cheers,
>>>
>>> --
>>> Felipe.
>>>
>>>
>>> _______________________________________________
>>> Libraries mailing list
>>> Libraries at haskell.org
>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>>>
>>>
>>
>> _______________________________________________
>> 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/20160122/466059d1/attachment.html>


More information about the Libraries mailing list