File tree Expand file tree Collapse file tree 1 file changed +1
-21
lines changed Expand file tree Collapse file tree 1 file changed +1
-21
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env runhaskell
2
- -- Cf. <http://www.mail-archive.com/[email protected] /msg59984.html>
3
- -- <http://www.haskell.org/pipermail/haskell-cafe/2008-December/051785.html>
4
2
5
- {-# OPTIONS_GHC -Wall -fwarn-tabs -fno-warn-missing-signatures #-}
6
3
module Main (main ) where
7
4
import Distribution.Simple
8
- import Distribution.Simple.LocalBuildInfo (withPrograms )
9
- import Distribution.Simple.Program (userSpecifyArgs )
10
- ----------------------------------------------------------------
11
5
12
- -- | Define __HADDOCK__ when building documentation.
13
6
main :: IO ()
14
- main = defaultMainWithHooks
15
- $ simpleUserHooks `modify_haddockHook` \ oldHH pkg lbi hooks flags -> do
16
-
17
- -- Call the old haddockHook with a modified LocalBuildInfo
18
- (\ lbi' -> oldHH pkg lbi' hooks flags)
19
- $ lbi `modify_withPrograms` \ oldWP ->
20
- userSpecifyArgs " haddock" [" --optghc=-D__HADDOCK__" ] oldWP
21
-
22
-
23
- modify_haddockHook hooks f = hooks { haddockHook = f (haddockHook hooks) }
24
- modify_withPrograms lbi f = lbi { withPrograms = f (withPrograms lbi) }
25
-
26
- ----------------------------------------------------------------
27
- ----------------------------------------------------------- fin.
7
+ main = defaultMain
You can’t perform that action at this time.
0 commit comments