Cabal Questions

Esa Ilari Vuokko eivuokko at
Fri Aug 18 08:57:50 EDT 2006

Hi Neil,

On 8/18/06, Neil Mitchell <ndmitchell at> wrote:
> 1) Doesn't work at all, absolutely no signs of life. In fact, the
> trhxs function never seems to be called.

If I build a minimal project and use your Setup.hs, I get:

Preprocessing library Foo-0.1...
setup: trhxs not found, cannot process: Foo.xhs

(But I am using freshly compiled Cabal-1.1.5 and ghc-6.5,
maybe that matters)

> 2) Even if it did work, now it just errors out when the user doesn't
> have the appropriate preprocessor half way through the build.
> Configure should really check for this (how?) and the build shouldn't
> just call error - it makes it impossible for tools to "figure out"
> what is missing and provide it.

Yes.  My suggestion was incomplete.  I think the right way to do this
is (when using Simple):
 * hook configure-step a bit:
   You should be able to simply append your program description into
   ConfigFlags.configPrograms and call the default hook.
 * that will append it into LocalBuildInfo.withPrograms
 * add the preprocessor to userhooks, but rather than finding executable
   at that point, take it from LocalBuildInfo.withPrograms

I have not done this myself, so I'm not 100% sure

--Esa Ilari Vuokko

More information about the Libraries mailing list