cabal experiences

Ian Lynagh igloo at
Sun Dec 11 12:42:48 EST 2005

On Sun, Dec 11, 2005 at 04:37:54PM +0000, Ross Paterson wrote:
> On Sun, Dec 11, 2005 at 03:58:59PM +0000, Ian Lynagh wrote:
> > Here are the issues I ran into while cabalising some stuff recently.
> > It's possible that some of the problems are just me failing to find the
> > right option.
> > 
> > * No way to get extra files into the source tarball.
> > 
> > * No way to specify extra clean files.
> The CVS version (cf
> has extra-source-files and extra-tmp-files fields, but I don't know if
> they're in a release.

Oh, that reminds me of something else I meant to mention; personally I'd
rather see a ghc 6.6 release next rather than a 6.4.2 with a deficient
cabal again.

> > * No way to specify extra object files to be put into a library.
> How are those objects generated?

With a particularly ugly hack in my example, but a more reasonable case
would be stubs in a binding to a non-Haskell non-C library compiled in a
build hook (I think wxhaskell might be an example of this?).

> > * "runghc6 Setup.hs sdist" without configuring tells me to run
> >   "setup configure", but wouldn't that restrict me to a particular compiler?
> >   (the same applies to clean, although it's not as critical there).
> The results of configure aren't used by sdist, though they are passed
> (I don't know why).  Seems to be useless but harmless.

Even if configure doesn't affect sdist in any way, it would still be
much nicer not to require it is run IMO.

Come to think of it, this probably means you need to have the build-deps
etc satisfied to make a source distribution, which could be irritating.

> > * I'm not sure why all cc-options can't be passed to hsc2hs with -C-optc
> >   (and likewise ld-options and -L-optl).
> Some C compilers don't understand -optc and -optl.

Does hsc2hs ever use anything other than ghc (assuming you don't give it

It would be nice if hsc2hs knew to add the -optc when given -C-foo and
using a ghc as the C compiler, though.


More information about the Libraries mailing list