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