Proposal to solve the `EitherT` problem.

Henning Thielemann lemming at
Sun Jun 16 23:59:37 CEST 2013

On Sun, 16 Jun 2013, Gabriel Gonzalez wrote:

> There are three approaches that I'd like to submit for consideration and 
> receive feedback on:
> * Approach 1: Remove the `Error` constraint from `transformers`
> Disadvantage: This silently breaks all existing uses of `fail`.  I don't know 
> any way to add a compiler warning to notify downstream libraries of this 
> change.
> * Approach 2: Add `EitherT` to `transformers` alongside `ErrorT` and have 
> them both implement `MonadError`.
> Disadvantage: Bloat from having two almost identical monad transformers. 
> However, there is precedent from duplicating `StateT`, `WriterT` and `RWST` 
> for both strict and lazy instances.

I prefer this one. Additionally one might deprecate ErrorT.

Btw. MaybeT also went into transformers although there was already a 
MaybeT package.

> * Approach 3: Convince Edward to reduce the dependencies of the `either` 
> package and submit the simplified version to the Haskell platform.
> Disadvantage: One extra import instead of just importing `transformers`.
> * Approach 4: None of the above.
> Disadvantage: Packages that depend on `either` have very low prospects of 
> making it into the Haskell platform.

More information about the Libraries mailing list