<div dir="ltr">Ah, thanks for the explanation. I hadn&#39;t heard of ExtendedDefaultRules before.<div><br></div><div style>Peter</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 8 June 2013 14:35, Brandon Allbery <span dir="ltr">&lt;<a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@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 dir="ltr"><div class="im">On Sat, Jun 8, 2013 at 9:02 AM, Peter Hall <span dir="ltr">&lt;<a href="mailto:peter.hall@memorphic.com" target="_blank">peter.hall@memorphic.com</a>&gt;</span> wrote:<br>

</div><div class="gmail_extra"><div class="gmail_quote"><div class="im">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">This is confusing me, and I&#39;m wondering if it&#39;s a compiler bug. I have this:<br>


<div><br></div><div>   foo = (++) `on` show</div><div><br></div><div>I&#39;m expecting the type to be:</div>

<div><br></div><div>    foo :: Show a =&gt; a -&gt; a -&gt; String</div><div><br></div><div>But GHCI is inferring:</div><div><br></div><div>    foo :: () -&gt; () -&gt; String</div></div></blockquote><div><br></div></div>

<div>
No bug; it&#39;s the monomorphism restriction combining with extended defaulting to infer a monomorphic type. If you want to keep the monomorphism restriction and throw a type error, disable ExtendedDefaultRules.</div><span class="HOEnZb"><font color="#888888"><div>


<br></div></font></span></div><span class="HOEnZb"><font color="#888888">-- <br><div dir="ltr"><div>brandon s allbery kf8nh                               sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>                                  <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div>


<div>unix, openafs, kerberos, infrastructure, xmonad        <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div>
</font></span></div></div>
</blockquote></div><br></div>