<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">&gt; Now, I&#39;m trying to use #ifndef __HADDOCK__ / #endif around those same<br>

&gt; modules, and I&#39;m still running into the same internal Haddock error:<br>
&gt;<br>
&gt; &gt; haddock: internal Haddock or GHC error: Maybe.fromJust: Nothing<br>
&gt;<br>
&gt; I&#39;ve been using &quot;cabal haddock&quot; to run haddock on my package. I also<br>
&gt; get the same error using haddock directly:<br>
&gt;<br>
&gt; &gt; $ haddock -odir=tmp --debug --verbose --html<br>
&gt; Generics/EMGM.hs<br>
&gt; &gt; haddock: internal Haddock or GHC error: Maybe.fromJust: Nothing<br>
</div></blockquote><div><br>The above is true, but then I ran it with --optghc=-D__HADDOCK__ and that fixed the problem. You see, I didn&#39;t know who was actually defining the __HADDOCK__ macro. Now, after looking at code for Haddock and Cabal, I realize it&#39;s Cabal.<br>
<br></div></div>Does Cabal <a href="http://1.6.0.1">1.6.0.1</a> actually define this macro? I don&#39;t see it listed when I run cabal-install with --verbose=3, but I don&#39;t know if it&#39;s supposed to be printed.<br>
<br>Regards,<br>Sean<br>