How can I parse the IO String in Haskell?
I' ve got a problem with Haskell. I have text file looking like this: 5. 7. [(1,2,3),(4,5,6),(7,8,9),(10,11,12)]. I haven't any idea how can I get the first 2 numbers (2 and 7 above) and the list from the last line. There are dots on the end of each line. I tried to build a parser, but function called 'readFile' return the Monad called IO String. I don't know how can I get information from that type of string. I prefer work on a array of chars. Maybe there is a function which can convert from 'IO String' to [Char]? I think you have a fundamental misunderstanding about IO in Haskell.