(un-)deprecation of Control.Monad.Error
Bertram Felgenhauer
bertram.felgenhauer at googlemail.com
Mon Oct 29 20:41:19 UTC 2018
Paterson, Ross wrote:
> The principal flaw of ErrorT is that the monad methods had constraints
> on the exception type, even though they don't need them. (A lesser
> issue was that the naming was inconsistent with the other transformers.)
>
> One possibility would be to change the MonadFail instance for ExceptT
> to give the functionality of the ErrorT instance:
>
> instance (Monad m, Message e) => MonadFail (ExceptT e m)
Indeed, with the MonadFail proposal coming to its conclusion that will
be possible, and personally I'd be happy with that. However, I suspect
that both possible MonadFail instances
instance (Monad m, Message e) => MonadFail (ExceptT e m)
instance (MonadFail m) => MonadFail (ExceptT e m)
are actually useful, and then we need two types, even though it looks
awkward.
Cheers,
Bertram
More information about the Libraries
mailing list