state of the cabal (preprocessors)

Malcolm Wallace Malcolm.Wallace at
Tue Oct 19 04:57:44 EDT 2004

Isaac Jones <ijones at> writes:

> The issue with cpp is that we can't go by extensions as we do with the
> rest of the preprocessors... There is a function in HMake which tests
> to see if a file needs to be cpp'd, so we can employ that.  I think
> we'll probably have to just treat cpp a little differently from the
> others, unfortunitely, and I haven't gotten around to it.

On the other hand, you could reject the convention that cpp sources
are not distinguished by file extension - e.g. create a new convention
that, say, a .cpphs extension is preprocessed by cpp(hs) to get a
plain .hs file.

Since Cabal is pretty new, this won't break any existing Cabal
packages, and when converting non-Cabal packages to Cabal, there is
some work to do anyway, so why not just adopt this as one extra rule
to follow?

This is just a suggestion - I'm in two minds whether it is a good
idea myself, but it is at least worth considering the possibility.


More information about the Libraries mailing list