Hello World does not compile (missing Prelude?)
Note: This is actually 6.10.2 (the Ticket Properties does not give this choice)
$ cat hello.hs
main = do
putStrLn "Hello, World"
$ which ghc
/home/t/local/bin/ghc
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.10.2
$ ghc --make hello
[1 of 1] Compiling Main ( hello.hs, hello.o )
hello.hs:1:0:
Failed to load interface for `Prelude':
Use -v to see a list of the files searched for.
Ubuntu 8.04 GHC 6.8.2 works though:
$ /usr/bin/ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.8.2
$ /usr/bin/ghc --make hello
[1 of 1] Compiling Main ( hello.hs, hello.o )
Linking hello ...
$ ./hello
Hello, World
$ ghc -v --make hello
Prints lots of stuff, including:
hello.hs:1:0:
Failed to load interface for `Prelude':
locations searched:
Prelude.hs
Prelude.lhs
Indeed, Prelude seems to be missing:
$ cd ~/local/lib/ghc-6.10.2/
$ find . -name \*elude\*
I can also confirm another bug report (the reason is likely the same):
$ ghci
GHCi, version 6.10.2: http://www.haskell.org/ghc/ :? for help
ghc: panic! (the 'impossible' happened)
(GHC version 6.10.2 for i386-unknown-linux):
interactiveUI:setBuffering2
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Trac metadata
Trac field | Value |
---|---|
Version | 6.10.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |