ghci finding include files exported from other packages?
duncan.coutts at worc.ox.ac.uk
Tue Mar 17 05:57:28 EDT 2009
On Tue, 2009-03-17 at 08:53 +0000, Simon Marlow wrote:
> Duncan Coutts wrote:
> > On Mon, 2009-03-16 at 12:13 +0000, Simon Marlow wrote:
> > Yes, if we know we're using it. If we specify -package blah on the
> > command line then we do know we're using it and everything works
> > (because ghc uses the include-dirs when it calls cpp). If we don't
> > specify -package then ghc does not know we need the package until after
> > import chasing is done. Import chasing requires that we run cpp on
> > the .hs file first and that brings us full circle.
> I don't see a reason why we shouldn't pass *all* the include paths for the
> exposed packages to CPP. Indeed that's what I thought we did, but I've
> just checked and I see we don't. Wouldn't that fix Conal's problem?
Yes it probably would. On my system that'd only be between 25-50 include
directories, which I guess is not too bad. Lets hope not too many
packages decide they need a "config.h" file.
So, presumably by passing all include dirs for all exposed packages that
takes into account -package flags, so when Cabal does -hide-all-packages
then it gets its desired behaviour.
More information about the Glasgow-haskell-users