Cabal and c2hs

Manuel M T Chakravarty chak at
Fri May 6 00:43:20 EDT 2005

Isaac Jones wrote:
> Dominic Steinitz <dominic.steinitz at> writes:
> I don't use c2hs myself; is there any pattern to the .h files we might
> want to preprocess?  Any way to derive it from the sources or the
> module names?  I'm not sure how better to support the kind of thing
> you need.

Explicit specification of .h files on the command line is mainly
supported for backward compatibility with old versions of c2hs.  The
suggested way of handling this with the current c2hs is to have a
"#include" in the .chs file.  (This does *not* require to run cpp over
the .chs file.  c2hs understands and interprets cpp directives

It would be nice if future versions of Cabal could directly support c2hs
instead of requiring explicit setting of "hookedPreProcessors".  If I
can help with this, let me know.  In the long run, I want to change
c2hs' build system over to Cabal, too.


More information about the Libraries mailing list