Integrating tools with Cabal
Roman Cheplyaka
roma at ro-che.info
Fri Nov 9 08:06:48 CET 2012
Hi,
Suppose I have some kind of analysis tool that I want to run on a Cabal
project.
The analysis tool only deals with Haskell files, so I need Cabal to
generate Haskell files from CPP-enabled Haskell files, .hsc files, alex
and happy files etc.
I see two possible ways to do that: use Cabal as a library, or my tool
to be run by Cabal as a compiler.
Cabal as a library doesn't seem friendly to this kind of usage: for
example, Distribution.Simple does not export things like
'configureAction'. Besides, this wouldn't work with packages that
use other build-types.
Extending Cabal with a new compiler is not a simple thing, either
(see https://github.com/haskell/cabal/issues/57).
So, any advice how to proceed? I can volunteer to improve things if
someone gives directions (I'm a Cabal noob).
Roman
More information about the cabal-devel
mailing list