<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Dec 7, 2012 at 11:44 AM, Roman Cheplyaka <span dir="ltr"><<a href="mailto:roma@ro-che.info" target="_blank">roma@ro-che.info</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I propose to add the sole module of the 'either' package[1],<br>
Control.Monad.Trans.Either, to the transformers package.<br>
<br>
It provides EitherT, a very basic and fundamental data type. The<br>
difference between EitherT and ErrorT is that the latter has an Error<br>
constraint, which is used to imlement 'fail'.<br>
<br>
Note that 'either' depends on the 'semigroupoids' and 'semigroup'<br>
packages to provide appropriate instances. The proposal is not to add<br>
those instances to 'transformers' to avoid additional dependencies. The<br>
instances can then be left in the 'either' package or moved to the<br>
'semigroupoids' and 'semigroup' packages respectively. ('semigroupoids'<br>
already depends on 'transformers', while 'semigroups' does not).<br>
<br>
Compared to the 'either' package, Show, Read, Eq and Ord instances will<br>
be dropped to keep the code Haskell2010 (those instances require<br>
FlexibleInstances, FlexibleContexts, and UndecidableInstances).<br>
<br>
The patch is attached. [*]<br>
<br>
[*] against transformers-0.3.0.0, because the darcs version is not<br>
buildable (Control/Monad/Signatures.hs is not in the repository).<br>
<span class="HOEnZb"><font color="#888888"><br>
Roman<br>
</font></span><br>_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/mailman/listinfo/libraries</a><br>
<br></blockquote></div><br></div><div class="gmail_extra">+1</div><div class="gmail_extra"><br></div><div class="gmail_extra">Michael</div></div>