[Haskell-beginners] question on types

Daniel Seidel ds at iai.uni-bonn.de
Fri Jul 29 16:02:33 CEST 2011


On Fri, 2011-07-29 at 09:49 -0400, Jake Penton wrote:
> For example, this does not compile: 
> 
> f :: Fractional a => a 
> f = 3.14 

I can load this to ghci and also compile

f :: Fractional a => a
f = 3.14

main = print f

with ghc and call the program to return 3.14.

(ghc version 7.01)

Cheers, Daniel.





More information about the Beginners mailing list