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">&lt;<a href="mailto:ndmitchell@gmail.com">ndmitchell@gmail.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">&gt; Err, I&#39;m not seeing the danger of this<br>
&gt; (+) :: forall a. (Num a) =&gt; a -&gt; a -&gt; a<br>
&gt; Doesn&#39;t this require the two parameters to be the same instance of Num?<br>
<br>
</div>I didn&#39;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>