getItemFile :: IO String

getItemFile test =

                                do

                                                test <- readFile "input.txt"

                                                return test

 

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

 

Thanks

 



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4913 (20100303) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com