[Haskell-cafe] How to add use custom preprocessor in cabal
bbr at informatik.uni-kiel.de
Thu Oct 8 11:28:42 EDT 2009
I am trying to integrate my own preprocessor into a cabal build
process. But there are several points that I get stuck with. Could
someone help me, please?
A simplification of my problem:
I have files "Abc.foo" and each of them should be transformed into
"Abc.hs" by calling function "transform". The resulting "Abc.hs" files
should then be exposed as Haskell library modules.
1. Question: How do I tell cabal that the file Abc.foo belongs to the
After reading the User's Guide I had the impression that I should
write something like
But this leads to a parse error.
to the heading, on the other hand, does not seem to do anything.
2. Question: How to add the preprocessor? I have tried
transformation :: BuildInfo -> LocalBuildInfo -> PreProcessor
But under which circumstances will this function be called? Up to now
I have not succeeded in making cabal call this function.
Thanks for your time!
More information about the Haskell-Cafe