Haskell-Cafe digest, Vol 1 #342 - 1 msg

Zhe Fu fuzhezheng@hotmail.com
Tue, 5 Mar 2002 14:44:02 -0800


I want to read a file's content into a string.

content :: FilePath -> String 
content f = readFile f

But when there is a type error:

Type error in explicitly typed binding
*** Term           : content
*** Type           : FilePath -> IO String
*** Does not match : FilePath -> String   

How can I solve it? 

Thanks.

Zhe