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

Iain Nicol iain at thenicols.net
Sun Aug 26 21:40:56 CEST 2012

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?


More information about the Haskell-Cafe mailing list