Proposal: add fromRight and fromLeft to Data.Either

Edward Kmett ekmett at gmail.com
Mon May 30 01:40:08 UTC 2016


The main annoyance with the total versions is that the existing fromJust
has the wrong convention.

Oh well. Consistency is overrated.

-Edward

On Sun, May 29, 2016 at 9:00 PM, Michael Burge <michaelburge at pobox.com>
wrote:

> +1 on the total versions.
>
> On Sat, May 28, 2016 at 5:48 PM, wren romano <wren at community.haskell.org>
> wrote:
>
>> On Sat, May 21, 2016 at 2:06 PM, Andreas Abel <abela at chalmers.se> wrote:
>> > Ah, yes, we want fromLeft and fromRight, but with types
>> >
>> >   fromLeft  :: a -> Either a b -> a
>> >   fromRight :: b -> Either a b -> b
>> >
>> > where the first argument is the "default", like
>>
>> If anything is added, then +1 for these versions.
>>
>> Very strong -1 for adding partial functions.
>>
>> --
>> Live well,
>> ~wren
>> _______________________________________________
>> 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/20160529/9e067558/attachment-0001.html>


More information about the Libraries mailing list