logo       

Re: ghc 6.2 gets confused about Main.hi reuse: msg#00018

lang.haskell.glasgow.bugs

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

> >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.
>
> We use -hidir/-odir to build for different platforms, so the only
> problem comes from ghc using hidir/<platform>/Main.hi for
> both pfe.hs and pfe_client.hs. Executables and sources have
> different names, why not the interface files? Will try -ohi and
> see if that helps.

No, it doesn't (myghc--make is a slightly veiled call to ghc --make):

cd refactorer; ./myghc--make -o pfe -ohi pfe.hi pfe.hs 2>&1 | tee -a log.txt
c:\ghc\ghc-6.0.1\bin\ghc.exe: -ohi can only be used when compiling a single
source file

The simplest approach would be to take the presence of -o as a
strong hint that there might be confusion about executables/Main
modules and thus to rename the Main.hi-file as well when -o is
present.

Cheers,
Claus


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

News | FAQ | advertise