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

Ross Paterson ross at soi.city.ac.uk
Fri May 7 19:25:37 EDT 2010


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.)


More information about the Haskell-Cafe mailing list