You have declared (well, described, but by type inference that's the same thing) main to take a parameter of type "unit" (empty tuple). main doesn't take parameters.
Haskell parameters do not work the way most common languages do; using parentheses in function calls the way you would in C/Java/Python etc. will generally get you unexpected type errors, because you're telling it you're passing tuples around. So, the function callf() (f :: () -> a)is different fromf (f :: a)and the function callf(a, b) (f :: (a,b) -> c)is different fromf a b (f :: a -> b -> c)(The inferred type of `f` is shown after each call.)--brandon s allbery kf8nh sine nomine associatesunix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners