I did get working again by commenting out the "-optP-P" that gets passed to Haddock.  Now I want to eliminate my local mod.  I could easily add a another Cabal Haddock flag that says to omit the -optP-P, but I prefer the solution of checking the Haddock version number, since it would always do the right thing with no intervention.  Can anyone give me hints about how to do the version check?
<br><br>&nbsp;- Conal<br><br><div><span class="gmail_quote">On 1/9/07, <b class="gmail_sendername">Duncan Coutts</b> &lt;<a href="mailto:duncan.coutts@worc.ox.ac.uk" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
duncan.coutts@worc.ox.ac.uk</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Tue, 2007-01-09 at 09:32 -0800, Conal Elliott wrote:<br>&gt; The only pre-processing is what&#39;s caused by using the cabal directive<br>&gt; &quot;Extensions: CPP&quot;.<br><br>&gt; Fiddling with flags, I see that -optP-P is the culprit.&nbsp;&nbsp;Removing it:
<br>&gt;<br>&gt; bash-3.2$ ghc -E -cpp -o z src/Graphics/UI/TV/Input.hs<br>&gt; -Dmingw32_BUILD_OS -Dmingw32_HOST_OS -Di386_BUILD_ARCH<br>&gt; -Di386_HOST_ARCH -D__GLASGOW_HASKELL__=606 -D__HADDOCK__; head -3 z<br>&gt; # 1 &quot;src/Graphics/UI/TV/Input.hs&quot;
<br>&gt; # 1 &quot;&lt;built-in&gt;&quot;<br>&gt; # 1 &quot;&lt;command line&gt;&quot;<br>&gt; bash-3.2$<br><br>&gt; Any ideas?&nbsp;&nbsp;- Conal<br><br>So for a quick hack, modify Cabal to unconditionally omit -optP-P and<br>see if that makes all your links come out right.
<br><br>Probably the right thing to do however is to have Cabal use the -optP-P<br>option only when we&#39;re using haddock-0.7 or older (otherwise haddock-0.7<br>users will get a lexical error when haddock encounters the C line
<br>pragmas).<br><br>I think at the moment Cabal doesn&#39;t check haddock&#39;s version number at<br>all. So that&#39;s something to look at if you or anyone else want to come<br>up with a patch for this.<br><br><br>Duncan
<br><br></blockquote></div><br>