[Haskell-cafe] how to get a string from file
pradeep at talk.lk
Wed Mar 3 13:26:30 EST 2010
getItemFile :: IO String
getItemFile test =
test <- readFile "input.txt"
this is the program I did to take a file and get all the data from that file
to a string.
Can someone help me.
I get this error
Type error in explicitly typed binding
*** Term : getItemFile
*** Type : a -> IO [Char]
*** Does not match : IO String
What I need is to get the file to a string and then get it to a tuple by
checking each places where the file contain a blank space
Please help me
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe