Skip to content

Commit 1948630

Browse files
committed
Removing last vestiges of the __HADDOCK__ hack
1 parent b58165d commit 1948630

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

Setup.hs

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,7 @@
11
#!/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>
42

5-
{-# OPTIONS_GHC -Wall -fwarn-tabs -fno-warn-missing-signatures #-}
63
module Main (main) where
74
import Distribution.Simple
8-
import Distribution.Simple.LocalBuildInfo (withPrograms)
9-
import Distribution.Simple.Program (userSpecifyArgs)
10-
----------------------------------------------------------------
115

12-
-- | Define __HADDOCK__ when building documentation.
136
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

0 commit comments

Comments
 (0)