lemming at henning-thielemann.de
Sat Mar 1 15:57:56 UTC 2014
Am 28.02.2014 23:00, schrieb Roman Cheplyaka:
> * Henning Thielemann <lemming at henning-thielemann.de> [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 lets you easily create a cabal-integrated
> "compiler". See the compile method in particular.
> For an example of how this all glues together, see .
> : http://hackage.haskell.org/package/haskell-packages
> : http://hackage.haskell.org/package/haskell-packages-0.2.3.4/docs/Distribution-HaskellSuite-Compiler.html#v:compile
> : https://github.com/haskell-suite/haskell-names/blob/master/hs-gen-iface/src/hs-gen-iface.hs#L70
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
More information about the cabal-devel