Err, I&#39;m not seeing the danger of this<div><br></div><div>(+) :: forall a. (Num a) =&gt; a -&gt; a -&gt; a</div><div><br></div><div>Doesn&#39;t this require the two parameters to be the same instance of Num?<br><br><div class="gmail_quote">
On Fri, May 8, 2009 at 10:51 AM, Sittampalam, Ganesh <span dir="ltr">&lt;<a href="mailto:ganesh.sittampalam@credit-suisse.com">ganesh.sittampalam@credit-suisse.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">Stephan Friedrichs wrote:<br>
<br>
&gt; When looking for an xor function, I found one in Data.Bits but<br>
&gt; couldn&#39;t use it for Bool, because Bool is no instance of Bits and of<br>
&gt; Num (which would be necessary, because it&#39;s &quot;class (Num b) =&gt; Bits<br>
&gt; b&quot;). My question is: Why not?<br>
&gt;<br>
</div>&gt; [...]<br>
<div class="im">&gt; quite trivial... Why is this not part of base? Or am I missing<br>
&gt; something?<br>
<br>
</div>One reason would be that we don&#39;t want 1 + True to typecheck, even if it<br>
does have a sensible interpretation.<br>
<br>
Ganesh<br>
<br>
===============================================================================<br>
 Please access the attached hyperlink for an important electronic communications disclaimer:<br>
 <a href="http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html" target="_blank">http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html</a><br>
 ===============================================================================<br>
<div><div></div><div class="h5"><br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br></div>