Interactive IO anomaly with GHC 5.04, OS X

Simon Marlow simonmar at microsoft.com
Mon Aug 5 05:33:41 EDT 2002


> If I start GHCi  (OS X v10.1.5) and type in the following 
> interactive function,
> it works as expected:
> 
> 	Prelude> do {putStr "Prompt: "; l <- getLine; putStrLn l}
> Prompt: OK
> OK
> But if I load a module, even the empty module
> 
> >  module Empty where
> 
> the prompt is not written until after the getLine:

Good bug, thanks.  The standard handles (stdin, stdout & stderr) are all
supposed to be unbuffered when in GHCi, but they were getting reset to
the default buffering mode (line-buffered for stdout & stdin) on a load
or reload.

Will be fixed in 5.04.1.

Cheers,
	Simon



More information about the Glasgow-haskell-bugs mailing list