
Makes sense. Thanks!
On Mon, Oct 27, 2014 at 10:54 PM, Brandon Allbery
On Mon, Oct 27, 2014 at 4:47 PM, Ovidiu Deac
wrote: Since the definition of expr looks like this: Prelude> let f x = x * 2
...and 2 is an Int, I would expect that the type inferred for (*) is (Int -> Int -> Int) and thus f should be (Int -> Int)
Prelude> :t 2 2 :: Num a => a
Numeric literals are polymorphic. http://www.haskell.org/onlinereport/haskell2010/haskellch6.html#x13-1360006.... is the official specification of this.
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners