<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;">Call the original haddockHook with the updated flags rather than the<br>
haddock command.</blockquote><div><br><span style="font-family: courier new,monospace;">-- Define CPP __HADDOCK__ macro when running haddock.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">haddockHook' p l h f =</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> do putStrLn ("f=\"" ++ show f ++ "\"")</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> putStrLn ("g=\"" ++ show g ++ "\"")</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> <b>haddockHook</b> simpleUserHooks p l h g</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> where</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> -- The Haddock flag to pass a flag to GHC to define the macro.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> define__HADDOCK__ = ("haddock",["--optghc=-D__HADDOCK__"])</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> -- Add the flag to the the other flags.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> g = f `mappend` emptyHaddockFlags { haddockProgramArgs = [define__HADDOCK__] }</span><br style="font-family: courier new,monospace;">
<br>No change in output.<br><br>Regards,<br>Sean<br></div></div>