Proposal: merge either into transformers

Roman Cheplyaka roma at
Fri Dec 7 10:44:27 CET 2012

I propose to add the sole module of the 'either' package[1],
Control.Monad.Trans.Either, to the transformers package.

It provides EitherT, a very basic and fundamental data type. The
difference between EitherT and ErrorT is that the latter has an Error
constraint, which is used to imlement 'fail'.

Note that 'either' depends on the 'semigroupoids' and 'semigroup'
packages to provide appropriate instances. The proposal is not to add
those instances to 'transformers' to avoid additional dependencies. The
instances can then be left in the 'either' package or moved to the
'semigroupoids' and 'semigroup' packages respectively. ('semigroupoids'
already depends on 'transformers', while 'semigroups' does not).

Compared to the 'either' package, Show, Read, Eq and Ord instances will
be dropped to keep the code Haskell2010 (those instances require
FlexibleInstances, FlexibleContexts, and UndecidableInstances).

The patch is attached. [*]

[*] against transformers-, because the darcs version is not
buildable (Control/Monad/Signatures.hs is not in the repository).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: either.diff
Type: text/x-diff
Size: 3980 bytes
Desc: not available
URL: <>

More information about the Libraries mailing list