Cabal 1.1.4 + Haddock 0.7 + GADT = Headache

Robert Dockins robdockins at
Mon May 29 09:51:17 EDT 2006

On May 29, 2006, at 9:32 AM, Lemmih wrote:

> On 5/29/06, Robert Dockins <robdockins at> wrote:
>> Hello all,
>> I've got a problem with a package I maintain.  I have a Cabal package
>> which contains one module which uses GADTs.  This module is hidden.
>> Now, Haddock barfs if you try to generate Haddock docs from a module
>> containing GADTs.  With Cabal 1.1.3, hidden modules (apparently...)
>> are not parsed by Haddock at all, so it has no opportunity to barf on
>> my GADTs, and I could get useable docs out.  However, with 1.1.4,
>> Cabal now tells Haddock to parse this file, but also gives it the --
>> hide option.  Haddock subsequently refuses to generate any
>> documentation.  I can remove the hidden modules from the "other
>> modules" section, but then the object code doesn't end up in the
>> libraries and programs won't build.  Aggh!
>> Is there any way to fix this problem?
> #ifndef __HADDOCK__
> [GADTs here]
> #endif

Ahh! A simple solution!  This is better than I dared hope.  Many thanks.

*crawls back into his cave, embarrassed by the simplicity of the  

> -- 
> Friendly,
>  Lemmih

Rob Dockins

Speak softly and drive a Sherman tank.
Laugh hard; it's a long way to the bank.
           -- TMBG

More information about the Libraries mailing list