how to read a file's content to a string?

Zhe Fu
Tue, 5 Mar 2002 14:43:47 -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?