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

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Thu Dec 11 20:19:33 EST 2008


On Fri, 2008-12-12 at 01:01 +0000, Duncan Coutts wrote:
> On Fri, 2008-12-12 at 01:01 +0100, Sean Leather wrote:
> > 
> >         Call the original haddockHook with the updated flags rather
> >         than the
> >         haddock command.
> 
> > No change in output.
> 
> Ah, sorry I misread the code. This works:

Or simpler:

import Distribution.Simple
import Distribution.Simple.LocalBuildInfo (LocalBuildInfo(withPrograms))
import Distribution.Simple.Program (userSpecifyArgs)

main = defaultMainWithHooks simpleUserHooks {
  haddockHook = \pkg lbi h f ->
    let progs = userSpecifyArgs "haddock" ["--optghc=-D__HADDOCK__"]
                  (withPrograms lbi)
     in haddockHook simpleUserHooks pkg lbi { withPrograms = progs } h f
}




More information about the Haskell-Cafe mailing list