[Haskell-cafe] Cabal Test-suites + custom preprocessors

Johan Tibell johan.tibell at gmail.com
Sun Aug 26 21:49:24 CEST 2012

On Sun, Aug 26, 2012 at 12:40 PM, Iain Nicol <iain at thenicols.net> wrote:
> Hi café,
> I am successfully using a custom preprocessor to build my main
> executable.  In particular, I am using UUAGC to preprocess .ag files
> into .hs files.  My Setup.hs file uses 'uuagcLibUserHook' from the
> package uuagc-cabal to do this, which in particular overrides Cabal's
> 'buildHook' for me.
> Now I am trying to add a test-suite (of type exitcode-stdio-1.0).  I
> want the test suite to be able to import the modules which implement
> the main program.  Unfortunately, building the test suite fails,
> because the .ag files don't seem to be built into .hs files.
> Does anybody know if Cabal actually supports using custom
> preprocessors for building a test-suite?  If so, is 'buildHook' still
> the right hook to override?

Try overriding the test hook. If it doesn't work file a bug at

-- Johan

More information about the Haskell-Cafe mailing list