new target ./setup plain_source?

Duncan Coutts duncan.coutts at
Tue Jul 24 07:21:37 EDT 2007

On Tue, 2007-07-24 at 09:06 +0100, Simon Marlow wrote:

> > I'm also not sure why Cabal is is running haddock on modules that are
> > only used in an executable, or if it's meant to do that then why it
> > isn't taking into account the CPP extension of the executable.
> I ran into this recently while making 'setup haddock' work on XMonad for 
> Simon PJ.  The 'extensions: CPP' needs to be put in the library part of the 
> .cabal file, in addition to the executable part.  And then Cabal runs 
> Haddock twice: once for the (non-existent) library, and once for the 
> executable.  Probably something needs to be fixed here; I guess not many 
> people use 'setup haddock' on executables.

In the dev version of Cabal we have a flag:

setup haddock --executables

so in theory just "setup haddock" should not generate docs for
executables and with that flag it should. From a quick test on hscolour
that does indeed appear to work as expected.


More information about the cabal-devel mailing list