1

If I write a program like:

main = do
    putStrLn "Start"
    i <- getLine
    putStrLn $ "Exit " ++ i

When I run it, the output is not given until execution finishes, It just waits for input and then all the output is given at once instead of the first string being printed before the input prompt occurs.

I've tried compiling the program and running in cygwin, also tried using the runhaskell command. I'm on windows 7.

Does anyone know what the problem could be?

Aaron Allen
  • 165
  • 6

0 Answers0