<div dir="ltr">Putting on my CLC hat to summarize the talk so far into a concrete plan:<div><br></div><div>It looks like there is sufficient consensus to add the</div><div><br></div><div>fromLeft :: a -> Either a b -> a</div><div>fromRight :: b -> Either a b -> b</div><div><br></div><div>variants to Data.Either, so let's do that. </div><div><br></div><div>This avoids partiality concerns, and seems to have broad support. I'll modify the `either` package to re-export them once they make it into base to avoid import conflicts.</div><div><br></div><div>Does someone want to bang out a patch?</div><div><br></div><div>-Edward</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jun 12, 2016 at 2:29 AM, Erik de Castro Lopo <span dir="ltr"><<a href="mailto:mle+hs@mega-nerd.com" target="_blank">mle+hs@mega-nerd.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Anton Felix Lorenzen wrote:<br>
<br>
> When working with Either,<br>
> I am often missing two simple functions:<br>
> fromRight :: Either a b -> b<br>
> fromLeft  :: Either a b -> a<br>
><br>
> It has been implemented a couple of times:<br>
> <a href="http://hayoo.fh-wedel.de/?query=fromRight" rel="noreferrer" target="_blank">http://hayoo.fh-wedel.de/?query=fromRight</a><br>
><br>
> But I don't want to depend on yet another library<br>
> for such a basic function.<br>
><br>
> Could it be added?<br>
<br>
</span>-1 on the addition of yet another partial function.<br>
<span class="HOEnZb"><font color="#888888"><br>
Erik<br>
--<br>
----------------------------------------------------------------------<br>
Erik de Castro Lopo<br>
<a href="http://www.mega-nerd.com/" rel="noreferrer" target="_blank">http://www.mega-nerd.com/</a><br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</div></div></blockquote></div><br></div>