What Cabal stuff is permanent?
ijones at syntaxpolice.org
Tue Jun 7 11:53:39 EDT 2005
John Goerzen <jgoerzen at complete.org> writes:
> On Tue, Jun 07, 2005 at 04:04:12PM +0100, Simon Marlow wrote:
>> However, if you attach includes to foreign import declarations, like
>> foreign import ccall "foo.h bar" bar :: ...
>> then GHC will currently not inline bar in another module. This is a
>> missing feature, and we might fix it at some point.
> Ah ha. That is the only style I've ever used, and is also what WASH
> uses. So I guess I get out of jail free.
>> I don't think Cabal currently has support for installing .h files, I
>> guess that's something we need to look into (Isaac?).
> Sounds like it.
How would this look? Let's say that include-dirs=./includes or
something relative to the top of the source tree while building. This
is so that ghc can find the "includes" while building.
include-dirs gets put into ghc's package.conf file, correct? But then
will the installed package need an absolute path for include-dirs? Or
can it be relative to ghc's library directory or the package root? If
the later, it sounds like no big deal, just create the directory and
put anything from the "includes" field into it while installing.
But then sometimes the include dirs might be an absolute path, maybe?
To indicate a .h file that this package is build-depending on? In
which case, we might assume that the include files in there are not a
part of the package, so we don't try to install them, but they are a
dependency and they should be installed on the target system already.
If ghc's package.conf file doesn't allow relative paths, then we have
to do something a little tricky when generating the package.conf file,
which is make up the location that the includes will go.
Sounds a little harry, but doable. Does anyone have better ideas?
p.s. Lemmih added the ability to build profiling libs to Cabal. Has
anyone played with this?
More information about the Libraries