[Haskell-cafe] Printing the function result

Alexteslin alexteslin at yahoo.co.uk
Wed Jul 25 14:27:59 EDT 2007


Hi,

I am going through examples from the textbook and trying them out but some
don't work.
For example:

addNum :: Int -> (Int -> Int)
addNum n = addN
	where
	addN m = n+m

This error message i am getting:

ERROR - Cannot find "show" function for:
*** Expression : addNum 4
*** Of type    : Int -> Int 

Now, the type of show is a->String, but i need some kind of function to
print the function as a result.
I tried some input output functions but i don't think that is the right way
to follow.

Can anyone suggest me where to look?

Thank you
-- 
View this message in context: http://www.nabble.com/Printing-the-function-result-tf4145303.html#a11790986
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.



More information about the Haskell-Cafe mailing list