MonadFail instance for Either
David Feuer
david.feuer at gmail.com
Thu Oct 25 03:52:49 UTC 2018
No, that's awful. You'd need to write things like
fail "\"my mistake\""
On Wed, Oct 24, 2018, 11:51 PM Dannyu NDos <ndospark320 at gmail.com> wrote:
> What about?:
>
> instance Read e => MonadFail (Either e) where
> fail = Left . read
>
> 2018년 10월 25일 (목) 오후 12:42, David Feuer <david.feuer at gmail.com>님이 작성:
>
>> FWIW, I think I'm weakly opposed. Either is Haskell 98. MonadFail is
>> solidly "standards-track" material, to the extent that designation is
>> meaningful
>> at the moment. IsString ... isn't.
>> On Wed, Oct 24, 2018 at 10:44 PM Daniel Bergey <bergey at alum.mit.edu>
>> wrote:
>> >
>> > Is there still consensus in favor of adding this instance?
>> >
>> > instance IsString str => MonadFail (Either str) where
>> > fail = Left . fromString
>> >
>> > In 2016 there was some discussion, and my reading is that there was
>> consensus in favor at the time:
>> > Trac: https://ghc.haskell.org/trac/ghc/ticket/12160
>> > libaries mailing list:
>> https://mail.haskell.org/pipermail/libraries/2016-August/027248.html
>> >
>> > Does anyone know of a later decision not to add it, or was it simply no
>> one's top priority?
>> >
>> > What is the next step to move this proposal forward? Is more
>> discussion in order? Should I just submit a patch?
>> >
>> > Thanks,
>> > bergey
>> > _______________________________________________
>> > 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/20181024/c06ef742/attachment.html>
More information about the Libraries
mailing list