
27 Oct
2006
27 Oct
'06
12:40 a.m.
Dan Weston wrote:
How about:
Hmm. I'm probably being dense today, but when I add the following definitions to your program... main = print $ (square . 4) () square (a,b) = (a*a,b) ...I still get the same error... No instance for (Num (() -> (t, t1))) arising from the literal `4' at weston.hs:5:25 Possible fix: add an instance declaration for (Num (() -> (t, t1))) In the second argument of `(.)', namely `4' In the second argument of `($)', namely `(square . 4) ()' In the expression: print $ ((square . 4) ()) ...maybe you could show me your implementation of "main" and "square" to help nudge me in the right direction. (I'm using ghc-6.6) Thanks, Greg Buchholz