#8367: putStrLn and related printing functions don't output to MinTTY properly under Windows ----------------------------+---------------------------------------------- Reporter: schyler | Owner: schyler Type: bug | Status: new Priority: high | Milestone: Component: Runtime | Version: 7.6.3 System | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: Windows | Difficulty: Moderate (less than a day) Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: | ----------------------------+---------------------------------------------- Comment (by schyler): Solved the problem - for some reason it doesn't flush properly on MinTTY. Consider; {{{ -- Small case for #8367 import Control.Monad import System.IO main = do -- Print something intelligent putStrLn $ "People assume that time is a strict progression of cause " ++ "to effect, but *actually* from a non-linear, non-subjective " ++ "viewpoint - it's more like a big ball of wibbly wobbly " ++ "time-y wimey... stuff." -- Uncomment this line to see terminal output -- hFlush stdout -- Do some pointless logic so the program doesn't terminate and -- hence we won't see a buffer flush. forever $ return () }}} {{{ #include <stdio.h> int main() { printf("hello"); //fflush(stdout); while (1); return 0; } }}} Neither of these work with fflush. Seems to probably be an issue with MinTTY/mingw sh, so I'm just going to set to wontfix. :( -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8367#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler