[Haskell-cafe] how to get a string from file
thomas.dubuisson at gmail.com
Wed Mar 3 13:30:17 EST 2010
On Wed, Mar 3, 2010 at 10:26 AM, Pradeep Wickramanayake <pradeep at talk.lk> wrote:
> getItemFile :: IO String
This says getItemFile is an action that returns a string. No arguments.
> getItemFile test = ...
And your implementation obviously requires a file path as an argument.
You wanted a type signature of:
getItemFile :: FilePath -> IO String
or perhaps more simply (FilePath is just an alias for String):
getItemFile :: String -> IO String
More information about the Haskell-Cafe