Proposal: add fromRight and fromLeft to Data.Either

Dan Burton danburton.email at gmail.com
Fri May 20 21:25:25 UTC 2016


I wouldn't mind something like this being available... but only if prefixed
with the word "unsafe" or "partial" or other such scary words.

-- Dan Burton

On Fri, May 20, 2016 at 1:34 PM, David Feuer <david.feuer at gmail.com> wrote:

> -1. I don't want to encourage this sort of bad coding practice practice
> either. Keeping it inconvenient is fine by me.
> On May 20, 2016 4:08 PM, "Anton Felix Lorenzen" <anfelor at posteo.de> wrote:
>
>> When working with Either,
>> I am often missing two simple functions:
>> fromRight :: Either a b -> b
>> fromLeft  :: Either a b -> a
>>
>> It has been implemented a couple of times:
>> http://hayoo.fh-wedel.de/?query=fromRight
>>
>> But I don't want to depend on yet another library
>> for such a basic function.
>>
>> Could it be added?
>>
>> Anton
>> _______________________________________________
>> 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/20160520/89891ab7/attachment.html>


More information about the Libraries mailing list