#4159: move Monad and MonadFix instances for Either from mtl to base

Cale Gibbard cgibbard at gmail.com
Wed Jun 30 21:31:01 EDT 2010


I can't decide if I like the fail s = error s or fail s = Left (error
s) behaviour better, and I'd prefer if we could put whatever we decide
upon in the Prelude, but +1 for the proposal overall. I'd also like
the function instances of Functor and Monad in the Prelude, for that
matter.

 - Cale

On 30 June 2010 19:25, Edward Kmett <ekmett at gmail.com> wrote:
> On Wed, Jun 30, 2010 at 6:57 PM, Ross Paterson <ross at soi.city.ac.uk> wrote:
>>
>> On Thu, Jul 01, 2010 at 12:29:57AM +0200, Claus Reinke wrote:
>> > As I said, even if you just want to drop 'Error', you could define
>> > 'fail s = Left (error s)'. That would still be less defined than the
>> > current instance, but more defined than the proposed instance.
>>
>> That didn't occur to me -- it seems harmless enough, but it wouldn't be
>> enough to support pattern binding with the Either monad, would it?
>
> I think it would be.
> -Edward Kmett
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
>


More information about the Libraries mailing list