ghc fails "hello world" on ppc
frederik at ugcs.caltech.edu
frederik at ugcs.caltech.edu
Tue Dec 2 23:53:10 EST 2003
$ 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
More information about the Glasgow-haskell-bugs
mailing list