[Haskell-cafe] Problem with haddock 2.3.0 (again)

Sean Leather leather at cs.uu.nl
Thu Dec 11 19:01:54 EST 2008

> Call the original haddockHook with the updated flags rather than the
> haddock command.

-- Define CPP __HADDOCK__ macro when running haddock.
haddockHook' p l h f =
  do putStrLn ("f=\"" ++ show f ++ "\"")
     putStrLn ("g=\"" ++ show g ++ "\"")
     *haddockHook* simpleUserHooks p l h g
    -- The Haddock flag to pass a flag to GHC to define the macro.
    define__HADDOCK__ = ("haddock",["--optghc=-D__HADDOCK__"])

    -- Add the flag to the the other flags.
    g = f `mappend` emptyHaddockFlags { haddockProgramArgs =
[define__HADDOCK__] }

No change in output.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20081212/fdc66a34/attachment.htm

More information about the Haskell-Cafe mailing list