Henning Thielemann lemming at
Sat Mar 1 15:57:56 UTC 2014

Am 28.02.2014 23:00, schrieb Roman Cheplyaka:

> * Henning Thielemann <lemming at> [2014-02-28 22:48:59+0100]

>> Nice! Is there a recommended way to transfer CPP options from the
>> Cabal file to the CpphsOptions record?
> Yes, haskell-packages[2] lets you easily create a cabal-integrated
> "compiler". See the compile method[3] in particular.
> For an example of how this all glues together, see [4].
> [2]:
> [3]:
> [4]:

Treating check-pvp as compiler driven by Cabal sounds reasonable, since 
this would do all the preprocessing stuff and would also work on 
tarballs etc. However the haskell-name framework seems to expect a 
binary executable as compiler. According to

I would have to design the checker as a tool that only reads modules, 
not the package description, called maybe 'check-modules-pvp' and then run

$ cabal install --haskell-suite -w check-modules-pvp mypkg

My problem is: The checker needs to read the package description in 
order to classify the dependency ranges. The compiler has no access to 
the package description. If it tries to load the package description 
manually, that will fail on tarballs.

I can also not see how I define my own command line options in the 
Compiler interface.

More information about the cabal-devel mailing list