
You probably want to do something like this: main = do { contents <- input "twoboxes.dat" return (control (parser contents)) } At 11:53 25-02-02 -0300, Juan M. Duran wrote:
Hi, I'm writting a small parser in Haskell and, when it is all done, I get the following problem: Type Binding. The thing is, I have 3 main functions: 1) Read the file, its type is: [Char] ->IO [Char] (see InputOutput.hs) 2) Parse a string (using words and readDec), its type is: Integral a => [Char] -> [a] (see Parse.hs) 3) Parse a list of integer, its type is: [Float] -> [[Float]] (Functions.hs)
Now the problem is that I cannot run the first function, then use its results as an input of the second function and, finally, its results as the input of the third function.
How can I fix this without modifing all my functions because they, independly, works fine.
Juan