cabal beginner issues (other-modules, build-depends)

Isaac Jones ijones at syntaxpolice.org
Tue Oct 11 13:23:27 EDT 2005


Malcolm Wallace <Malcolm.Wallace at cs.york.ac.uk> writes:

> "Simon Marlow" <simonmar at microsoft.com> writes:
>
>> With GHC, we can generate the dependencies using 'ghc -M' and then parse
>> the generated Makefile.  ...  How would we do this with nhc98 or Hugs?
>
>     hmake -M Foo | tail +2 | cut -d' ' -f2
>
> works independently of any compiler.  If there are compiler-specific imports
> selected by cpp directives, then
>
>     hmake -hc=ghc-6.2.2 -M ...

We really should add depenency analysis to Cabal directly.  The only
reason to avoid this, afaik, is that parsing the imports might be a
little tricky. I don't think that hmake necessarily handles every
possible case here, semi-colons separating lines and multi-line
comments, for instance (though maybe it does handle these, I might be
wrong). It does a good job, and we can use that code in Cabal as well.

FWIW, I'm working on code to add --with-haddock-args to configure, so
no one else needs to worry about that right now.  It's almost done.

peace,

  isaac


More information about the Libraries mailing list