[GHC] #1355: Interactive I/O with ghc doesn't prompt until after reading

GHC trac at galois.com
Mon Dec 22 23:32:34 EST 2008


#1355: Interactive I/O with ghc doesn't prompt until after reading
----------------------------------------------+-----------------------------
    Reporter:  ok at cs.otago.ac.nz              |        Owner:                  
        Type:  bug                            |       Status:  closed          
    Priority:  normal                         |    Milestone:                  
   Component:  Prelude                        |      Version:  6.2             
    Severity:  normal                         |   Resolution:  invalid         
    Keywords:  interactive stdio late prompt  |   Difficulty:  Unknown         
    Testcase:                                 |           Os:  Unknown/Multiple
Architecture:  Unknown/Multiple               |  
----------------------------------------------+-----------------------------
Comment (by guest):

 I agree with the bug report, it's bitten me a few times, and note that
 using hFlush requires importing System.IO which should not be required in
 these very simple programs.

 main = do { putStr "Enter your name: "; name <- getLine; print $ "hello ++
 name }

 is one the first programs anyone writes in any language and it shouldn't
 require a bunch of web searching to find out what is wrong and how to fix
 it.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1355#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list