<div dir="ltr">Makes sense. Thanks!<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 27, 2014 at 10:54 PM, Brandon Allbery <span dir="ltr"><<a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@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 dir="ltr"><div class="gmail_extra"><span class=""><div class="gmail_quote">On Mon, Oct 27, 2014 at 4:47 PM, Ovidiu Deac <span dir="ltr"><<a href="mailto:ovidiudeac@gmail.com" target="_blank">ovidiudeac@gmail.com</a>></span> wrote:<br><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>Since the definition of expr looks like this:<br>Prelude> let f x = x * 2<br><br>...and 2 is an Int, I would expect that the type inferred for (*)  is (Int -> Int -> Int) and thus f should be (Int -> Int)<br></div></blockquote></div><br></span>    Prelude> :t 2</div><div class="gmail_extra">    2 :: Num a => a<br><br>Numeric literals are polymorphic. <a href="http://www.haskell.org/onlinereport/haskell2010/haskellch6.html#x13-1360006.4.1" target="_blank">http://www.haskell.org/onlinereport/haskell2010/haskellch6.html#x13-1360006.4.1</a> is the official specification of this.<span class="HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <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>
<br>_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
<br></blockquote></div><br></div>