#1355: Interactive I/O with ghc doesn't prompt until after reading
----------------------------------------------+-----------------------------
    Reporter:  [EMAIL PROTECTED]              |        Owner:         
        Type:  bug                            |       Status:  closed 
    Priority:  normal                         |    Milestone:         
   Component:  Prelude                        |      Version:  6.2    
    Severity:  normal                         |   Resolution:  invalid
    Keywords:  interactive stdio late prompt  |   Difficulty:  Unknown
          Os:  Multiple                       |     Testcase:         
Architecture:  Multiple                       |  
----------------------------------------------+-----------------------------
Changes (by simonmar):

  * resolution:  => invalid
  * status:  new => closed

Comment:

 You're expecting unbuffered output, but GHC does line-buffering by default
 when outputting to a terminal.  If you want no buffering, you have to ask
 for it: `hSetBuffering stdout NoBuffering`, or else use explicit flushing:
 `hFlush stdout`.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1355>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to