<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">&lt;<a href="mailto:roma@ro-che.info" target="_blank">roma@ro-che.info</a>&gt;</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 &#39;either&#39; 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 &#39;fail&#39;.<br>
<br>
Note that &#39;either&#39; depends on the &#39;semigroupoids&#39; and &#39;semigroup&#39;<br>
packages to provide appropriate instances. The proposal is not to add<br>
those instances to &#39;transformers&#39; to avoid additional dependencies. The<br>
instances can then be left in the &#39;either&#39; package or moved to the<br>
&#39;semigroupoids&#39; and &#39;semigroup&#39; packages respectively. (&#39;semigroupoids&#39;<br>
already depends on &#39;transformers&#39;, while &#39;semigroups&#39; does not).<br>
<br>
Compared to the &#39;either&#39; 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>