logo       

RE: ghc 6.2 gets confused about Main.hi reuse: msg#00008

lang.haskell.glasgow.bugs

Subject: RE: ghc 6.2 gets confused about Main.hi reuse


> It turns out that ghc 6.2 seems to get confused about the reuse of
> Main.hi: we build two different executables (client/server) in the
> same directory, from the same set of modules, and ghc traditionally
> ignores the -o directive and names the interface file Main.hi.

The -ohi flag lets you rename the interface file, or -hisuf is useful
for renaming a whole bunch of interface files if you want to build
modules in two different ways in the same directory.

I can't say exactly what caused the error you're seeing, but the root
cause is clearly that the compiler is finding Main.hi from the previous
build and attempting to use it to determine whether Main needs to be
rebuilt. The solution is "don't do that" :-) GHC can't tell that the
Main.hi was from a different build - presumably the source file was
Main.hs in both cases?.

Cheers,
Simon


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise