[Haskell] cabal feature request

Benjamin Franksen benjamin.franksen at bessy.de
Fri Apr 22 05:49:12 EDT 2005


On Friday 22 April 2005 09:17, Isaac Jones wrote:
> Benjamin Franksen <benjamin.franksen at bessy.de> writes:
> > I finally succeeded using cabal for a project that uses hsc2hs. My
> > problem was/is I need to give special options to hsc2hs, for
> > instance a different template header file to use. Cabal doesn't
> > support this at the moment.
> >
> > I propose to give the user a bit more flexibility with regard to
> > preprocessors, i.e. add some more tags to the .cabal file, like
> >
> > hsc2hs-options, cpp-options, ...
> >
> > I made the necessary changes for hsc2hs-options in a few minutes
>
> Did you alter the Cabal library itself?  

Yes.

> If so, then that won't work 
> when you go to distribute it to others, since they won't have your
> altered cabal.

Yes, that's why I suggested to add such tags to the official version.

> You could do this in the UserHooks, by over-riding the hsc2hs
> preprocessor in your Setup.lhs file.  If you grab the cabal source, 
> there's an example in the tests directory called withHooks that might
> help.  That, and looking at the cabal source itself :)
>
> > Another question: Is there a proposal how to (better) support test
> > executables for a library package? (I remember that this topic has
> > been discussed but can't remember any conclusion).
>
> With the latest (darcs / cvs) version of Cabal, you can add a
> UserHook for running tests, then there's a target ./setup test
> that'll execute that hook.

Ok, I will try to find out how to use user hooks for what I need.

> We put the hook in Cabal 1.0, but forgot to add the command, so
> nothing calls it.  Feel free to add the test hook so that people
> using newer versions of cabal can run your tests :)

Yup. (Not that the stuff is ready for distribution.)

Thanx,
Ben


More information about the Haskell mailing list