[Haskell-cafe] Windows, or GHC?

Magnus Therning magnus at therning.org
Tue Feb 12 11:41:07 EST 2008

The following code will on Linux print three strings each followed by a NULL

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?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080212/9f601b70/attachment.htm

More information about the Haskell-Cafe mailing list