<br><br>On Wednesday, August 7, 2013, Erik de Castro Lopo  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Henning Thielemann wrote:<br>
<br>
&gt; <a href="http://www.haskell.org/pipermail/libraries/2012-November/018709.html" target="_blank">http://www.haskell.org/pipermail/libraries/2012-November/018709.html</a><br>
&gt; <a href="http://www.haskell.org/pipermail/libraries/2012-December/018716.html" target="_blank">http://www.haskell.org/pipermail/libraries/2012-December/018716.html</a><br>
<br>
Henning,<br>
<br>
In the second link above you wrote:<br>
<br>
&gt; It would be a good opportunity to check how these packages use isLeft and<br>
&gt; isRight. E.g. if they use them in connection with fromLeft and fromRight<br>
&gt; then this would be an argument for me to exclude isLeft and isRight as<br>
&gt; well.<br>
<br>
My main usage of isLeft/isRight is in HSpec tests where I write:<br>
<br>
<br>
     value1 `shouldSatisfy&#39; isLeft<br>
     value2 `shouldSatisfy&#39; isRight<br>
<br>
I would also be opposed to a fromLeft defined anything like fromJust:<br>
<br>
     Data.Maybe.fromJust :: Maybe a -&gt; a<br>
<br>
but would not be opposed to a fromLeft defined as John Wiegley suggested:<br>
<br>
    fromLeft :: a -&gt; Either a b -&gt; a<br>
    fromLeft _ (Left x) = x<br>
    fromLeft x _ = x<br>
<br></blockquote><div><br></div><div>+1. Let&#39;s avoid adding any new partial functions.<span></span></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Erik<br>
--<br>
----------------------------------------------------------------------<br>
Erik de Castro Lopo<br>
<a href="http://www.mega-nerd.com/" target="_blank">http://www.mega-nerd.com/</a><br>
<br>
_______________________________________________<br>
Libraries mailing list<br>
<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;Libraries@haskell.org&#39;)">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>
</blockquote>