Bug? Re: GHC version 5.02.2 is available - SuSE RPMs
Sat, 12 Jan 2002 16:38:43 +0000
> > > module Main where
> > > main :: IO()
> > > main = do
> > > putStr "n:"
> > > n <- readLn :: IO(Int)
> > > print n
> > Used to work fine with ghc 5.00.2, that is, it would print "n:", then
> > wait for the input, and finaly print n.
> > With Ghc 5.02.2 it only prints "n:" after reading the n.
> It's actually expected behaviour with the current IO implementation -
> you have to explicitly flush stdout before reading from stdin (if stdout
> is buffered, that is).
> FWIW, I don't think this is the Right behaviour either.
Well it seems at least quite annoying, not to mention that lots of programs
will 'break'. When was this behaviour changed? And why?