[Haskell-cafe] Windows, or GHC?

Neil Mitchell ndmitchell at gmail.com
Tue Feb 12 20:34:11 EST 2008


> 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!

You missed out an s in putStr0, which causes it not to compile. When I
add the s, and try on Windows XP with GHC 6.8.1 it works perfectly and
prints 3 strings with null bytes. Can you still replicate this? If so,
what specific details.



More information about the Haskell-Cafe mailing list