
I forgot to say that the version is 6.0.1. So... can anyone else reproduce this? Is there a stable version of the compiler which I should be using instead? Is there anything I can do to help fix this bug? frederik@ugcs.caltech.edu writes:
$ uname -a Linux fly 2.4.19-quiet #10 Tue Jan 12 17:02:50 PST 1904 ppc GNU/Linux $ cat > test.hs main = do putStr "hello\n" putStr "world\n" $ ghc --make test.hs && ./a.out Chasing modules from: test.hs Compiling Main ( test.hs, ./test.o ) Linking ... world world
On my i386 machine it works correctly:
$ ghc --make test.hs && ./a.out Chasing modules from: test.hs Compiling Main ( test.hs, ./test.o ) Linking ... hello world
Various permutations of the original program produce the same result on the ppc: ---------------------------------------------------------------- import System.IO main = do hSetBuffering stdout NoBuffering putStr "hello\n" putStr "world\n" ---------------------------------------------------------------- import System.IO main = do hSetBuffering stdout NoBuffering putStrLn "hello" putStrLn "world" ---------------------------------------------------------------- main = do putStrLn "hello" putStrLn "world" ---------------------------------------------------------------- etc., except that anything with putStrLn prints hello hello instead of world world
TIA.
Frederik Eaton