Loganathan Lingappan wrote:

> main = do
>         hSetBuffering stdin LineBuffering
>         numList <- processInputs
>         foldr (+) 0 numList

The type of main is understood to be IO (), so it can't return anything.
 You could work around this by rewriting the last line above as follows:

print (foldr (+) 0 numList)

This prints the number, which is presumably what you want, and print has
type IO (), so it works out nicely here.

        <b
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to