Proposal: merge either into transformers

Edward Kmett ekmett at
Tue Jan 3 01:08:11 UTC 2017

On Mon, Jan 2, 2017 at 1:58 PM, Erik de Castro Lopo <mle+hs at>

> Edward Kmett wrote:
> > I sympathize. If you feel the need for those combinators, you can talk to
> > Ross to try to get him to add them to the library.
> Where/how is transformers even maintained. The github mirror at:
> offers no clue.

It is maintained on darcs:

> > (Well, secondEitherT is already fmap, of course.)
> Yes, still a little embarrased about that :).


> > When the ExceptT API was crafted, it pretty much
> > tried to follow the API of the rest of transformers, and didn't really
> take
> > any of the extra combinators we had in the either package into account.
> =/
> That was unfortunate.

I made some noises to that effect at the time.  *shrug*

> You might have a hard time getting the last one adopted, though, due to
> the
> > dependency on exceptions taking the API into "non-standard" territory.
> What is the problem here, the `Exception` constraint, the `MonadCatch`
> constraint or both?

Both. Control.Exception needs a bunch of extensions to make sense taking it
outside of Haskell 2010. transformers has as much as possible tried to
stick to a standard language.

> > Unfortunately, even if Ross adds them, I have no way to supply them in
> > transformers-compat when used with middle versions of transformers that
> > have ExceptT, but not those combinators, so the compatibility hack I
> offer
> > will suffer a bit.
> Can't be done even with CPP?

Unfortunately not. Once you get to a transformers version that exports that
module, then the module then is supplied by transformers, not

If you can get the extra combinators into transformers, I might be able to
offer a C.M.T.E.Compat module that you could import along with C.M.T.E to
get the new API across those intermediate versions, but I've yet to adopt
this practice for the other transformers modules. If someone wanted to toss
a patch at transformers-compat that added .Compat modules with the changes
to the transformers API over time, (like adding reader, state, writer
combinators), I'd probably take the patch, but I don't have a definitive
list of what they are and the design would involve some compromises.


> Erik
> --
> ----------------------------------------------------------------------
> Erik de Castro Lopo
> _______________________________________________
> Libraries mailing list
> Libraries at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list