
12 Feb
2008
12 Feb
'08
11:41 a.m.
The following code will on Linux print three strings each followed by a NULL byte: module Main where putStr0 = putStr $ s ++ "\0" main = do putStr0 "Hello" putStr0 "Hello" putStr0 "Hello" On Windows however it will print nothing! In order to trigger printing I have to change the definition of putStr0 to putStr0 = putStr (s ++ "\0") >> hFlush stdout Is this difference in behaviour due to a bug in GHC on Windows or just a quirkiness of the platform? /M