
#7583: IO reordering ----------------------------------------+----------------------------------- Reporter: Heimdell | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.4.1 | Keywords: IO, invalid evaluation order Os: Linux | Architecture: x86_64 (amd64) Failure: Incorrect result at runtime | Blockedby: Blocking: | Related: ----------------------------------------+----------------------------------- I have a simple test program: {{{ main = do putStr "> " line <- getLine putStrLn line }}} In ghci, it writes "> " before receiving input: {{{ Prelude Main> main
WHAT WHAT }}}
But being compiled by ghc it writes "> " just after receiving input. {{{ maelstrom@ubuntu:~/vault$ ./test WHAT
WHAT }}}
That is not the behavior I expect. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7583 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler