Help

David Sankel camio@yahoo.com
Mon, 25 Feb 2002 09:59:37 -0800 (PST)


--- "Juan M. Duran" <juan@inf.ufpr.br> 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.
> 

I'm kinda confused with all the spanish and such, but
isn't the solution something like this?

main =
  do
    a <- function1
    let b = function2 a
    let c = function3 a

David J. Sankel





__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com