problem compiling
Simon Marlow
simonmar@microsoft.com
Thu, 1 Nov 2001 09:46:36 -0000
> hello, I installed ok the rpm-packages on linux (Mandrake=20
> 8.1), but when I=20
> try to compile something the following message appears:
>=20
> f2.hs:1:
> failed to load interface for `Prelude':
> Bad interface file: ./Prelude.hi
> does not exist
> Action: openFile
> Reason: No such file or directory
> File: ./Prelude.hi
>=20
> If I go to the directory /usr/bin (where the binary file ghc=20
> is) and I type
> > ghc -c /home/user/file.hs
> then the compilation is done without problems.
> Does anyone know what I have to do for compiling without=20
> problems in any=20
> folder?
> (The directory /usr/bin is my PATH).
You probably have a file Prelude.hs in the current directory. The next
release of GHC handles this case a little better, but to get going
straight away you can just move Prelude.hs out of the way (and any other
.hs files in the current directory which match the names of standard
libraries).
Cheers,
Simon