<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; &gt; &nbsp; &nbsp; &nbsp; &nbsp; Call the original haddockHook with the updated flags rather<br>

&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; than the<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; haddock command.<br><br>
</div><div class="Ih2E3d">main = defaultMainWithHooks simpleUserHooks {<br>
 &nbsp;haddockHook = \pkg lbi h f -&gt;<br>
</div> &nbsp; &nbsp;let progs = userSpecifyArgs &quot;haddock&quot; [&quot;--optghc=-D__HADDOCK__&quot;]<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(withPrograms lbi)<br>
 &nbsp; &nbsp; in haddockHook simpleUserHooks pkg lbi { withPrograms = progs } h f<br>
}</blockquote></div><br>This worked. Thanks, Duncan.<br><br>Regards,<br>Sean<br>