> Now, I'm trying to use #ifndef __HADDOCK__ / #endif around those same
> modules, and I'm still running into the same internal Haddock error:
>
> > haddock: internal Haddock or GHC error: Maybe.fromJust: Nothing
>
> I've been using "cabal haddock" to run haddock on my package. I also
> get the same error using haddock directly:
>
> > $ haddock -odir=tmp --debug --verbose --html
> Generics/EMGM.hs
> > haddock: internal Haddock or GHC error: Maybe.fromJust: Nothing

The above is true, but then I ran it with --optghc=-D__HADDOCK__ and that fixed the problem. You see, I didn't know who was actually defining the __HADDOCK__ macro. Now, after looking at code for Haddock and Cabal, I realize it's Cabal.

Does Cabal 1.6.0.1 actually define this macro? I don't see it listed when I run cabal-install with --verbose=3, but I don't know if it's supposed to be printed.

Regards,
Sean