Ticket #3151 (closed bug: fixed)
Hello World does not compile (missing Prelude?)
| Reported by: | fft1976 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.10 branch |
| Component: | Build System | Version: | 6.10.2 |
| Keywords: | Cc: | ||
| Operating System: | Linux | Architecture: | x86 |
| Type of failure: | Difficulty: | Unknown | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
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
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

