[Debian-haskell] Re: [Haskell-cafe] Re: [Haskell] installing streams library

Ross Paterson ross at soi.city.ac.uk
Mon May 22 00:59:17 BST 2006


On Sun, May 21, 2006 at 01:20:54PM -0700, Jeremy Shaw wrote:
> Cabal Question:
> 
> The streams library uses cpphs to do some preprocessing. There is a
> hugs specific Makefile that invokes cpphs with the command-line:
> 
> cpphs --noline -D__HUGS__ -D__HUGS_VERSION__=2005 -DSIZEOF_HSINT=4 -DSIZEOF_HSWORD=4
> 
> I tried adding the -D stuff to the cc-includes section of the .cabal
> file, but that caused the ghc6 build to start failing. Is there an
> easy way to specify flags that should only be used with cpphs and only
> when building hugs? Or is this one of those cases when I need to use
> some of the fancy hook features of cabal?

Cabal already adds -D__HUGS__ when building for Hugs, __HUGS_VERSION__
isn't used, and the SIZEOF's aren't universally valid.  For GHC,
the package gets them from MachDeps.h (an undocumented interface).
Doing it portably probably requires autoconfery.

Apart from that, the main in Setup.lhs could just be defaultMain.




More information about the debian-haskell mailing list