Opened 11 years ago

Closed 11 years ago

#901 closed bug (invalid)

I/O sequencing problem on OS X/x86

Reported by: guest Owned by:
Priority: normal Milestone:
Component: Compiler Version: 6.5
Keywords: Cc:
Operating System: MacOS X Architecture: x86
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


The following small program behaves strangely on Mac OS X on x86:

module Main where

main = do
  putStr "Tell me? "
  response <- getLine
  putStrLn ("You said: " ++ response)

It should print the prompt, wait for input, and then report what it read. When compiled to a binary with GHC, however, it first waits for input, then prints the prompt and the response together. Strangely, if run inside GHCi, it works correctly. It also works correctly under Hugs.

Change History (1)

comment:1 Changed 11 years ago by duncan

Resolution: invalid
Status: newclosed

It might be confusing at first, but it isn't a bug. See this FAQ entry.

Note: See TracTickets for help on using tickets.