With this file:
main = do
putStr "Input: "
s <- getLine
putStr s
It does what I want in GHCi, which is to put the invitation and then allow input there on the same line as the invitation. If I compile it and run the executable in the terminal, I will not see the invitation until I have made my input. Something about new lines. I am using Mac OS 10.8.5, GHC 7.4.2.
Is there a terminal parameter or a GHC parameter that I need to switch to get the behavior I want from the executable?
source
share