[Haskell-cafe] Portability of MonadError
lemming at henning-thielemann.de
Mon Jan 5 16:55:11 EST 2009
On Mon, 5 Jan 2009, Luke Palmer wrote:
> Oh bother! My new year's resolution: think before I speak.
> While I do think this is the right answer, it is not the right answer in the status quo. This is
> because ErrorT e m is only a monad when e is an Error, which Either (and most types) are not. It
> will be the right answer when fail is factored out of Monad into MonadFail (which will happen
> someday hopefully), because then the typechecker will verify that the above composition cannot
> But now I can't think of a good answer. Darn.
In the explicit-exception package I omit 'fail' and allow an exception
type without constraints.
More information about the Haskell-Cafe