[Haskell-cafe] IO (Either a Error) question

Limestraël limestrael at gmail.com
Fri May 7 19:54:21 EDT 2010


> Personally I think fail is a terrible wart, and should be shunned.

So do I.
I can't understand its purpose since monads which can fail can be
implemented through MonadPlus.


2010/5/8 Ross Paterson <ross at soi.city.ac.uk>

> On Sat, May 08, 2010 at 07:49:57AM +1000, Ivan Lazar Miljenovic wrote:
> > Limestraėl <limestrael at gmail.com> writes:
> > > 2010/5/1 John Millikin <jmillikin at gmail.com>
> > >
> > >> You might want to make a local version of ErrorT in your library, to
> > >> avoid the silly 'Error' class restriction. This is pretty easy; just
> > >> copy it from the 'transformers' or 'mtl' package.
> > >>
> > > Yes, I wonder why mtl is not updated so as to remove this restriction.
> >
> > Presumably because its in "maintenance mode" (i.e. it only gets
> > changed/updated to reflect changes in GHC that might affect it and the
> > API is frozen).
>
> The API isn't frozen -- it can be changed with a library proposal,
> if you can get people to agree to it.
>
> As Ryan said, the Error constraint is there to support a definition of
> the fail method in the Monad instance for ErrorT.  (Personally I think
> fail is a terrible wart, and should be shunned.)
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100507/de892fb1/attachment.html


More information about the Haskell-Cafe mailing list