Hmm, I never knew that. Is that a GHC thing? Is it strictly necessary? Seems like it could be done in the Num instance for Integers, Ints, etc.<br><br><div class="gmail_quote">On Fri, May 8, 2009 at 11:51 AM, Neil Mitchell <span dir="ltr"><<a href="mailto:ndmitchell@gmail.com">ndmitchell@gmail.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">> Err, I'm not seeing the danger of this<br>
> (+) :: forall a. (Num a) => a -> a -> a<br>
> Doesn't this require the two parameters to be the same instance of Num?<br>
<br>
</div>I didn't at first, then I remembered:<br>
<br>
1 + True<br>
=<br>
fromInteger 1 + True<br>
<br>
And if we have Num for Bool, it type checks.<br>
<br>
Thanks<br>
<font color="#888888"><br>
Neil<br>
</font></blockquote></div><br>