Err, I'm not seeing the danger of this<div><br></div><div>(+) :: forall a. (Num a) => a -> a -> a</div><div><br></div><div>Doesn'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"><<a href="mailto:ganesh.sittampalam@credit-suisse.com">ganesh.sittampalam@credit-suisse.com</a>></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>
> When looking for an xor function, I found one in Data.Bits but<br>
> couldn't use it for Bool, because Bool is no instance of Bits and of<br>
> Num (which would be necessary, because it's "class (Num b) => Bits<br>
> b"). My question is: Why not?<br>
><br>
</div>> [...]<br>
<div class="im">> quite trivial... Why is this not part of base? Or am I missing<br>
> something?<br>
<br>
</div>One reason would be that we don'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>