cvs commit: fptools/libraries/Cabal/Distribution Simple.hs
fptools/libraries/Cabal/tests ModuleTest.hs Tests.mk
ijones at syntaxpolice.org
Wed Feb 16 13:01:34 EST 2005
ross at soi.city.ac.uk writes:
> Looking at the tests, I see I'm confused about the Main-Is field.
> I thought it was the name of the file containing the Main module,
> and that Other-Modules listed, um, other modules. (That's what
> the spec suggested, and what buildHugs does.) But then I see
> Executable: testB
> Other-Modules: B.A, B.MainB
> Main-is: B/MainB.hs
The test case is wrong. That is maybe left over from when cabal
didn't treat the main-is field correctly. I just fixed that.
> and I see that buildGHC ignores the Main-Is (modulePath) field.
Hmm. From within buildGHC, I see:
withExe pkg_descr $ \ (Executable exeName' modPath exeBi) -> do
let binArgs =
++ [hsSourceDir exeBi `joinFileName` modPath]
So I think we're OK. Seems to work right:
./setup build -v3
/usr/bin/ghc -package-conf /home/ijones/.ghc-packages -odir dist/build/./testB-tmp -hidir dist/build/./testB-tmp -o dist/build/./testB --make -i. -i. B/MainB.hs
(in this case, hsSourceDir is .)
More information about the Cvs-libraries