aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock
diff options
context:
space:
mode:
authorNeil Mitchell <unknown>2008-08-13 14:03:46 +0000
committerNeil Mitchell <unknown>2008-08-13 14:03:46 +0000
commit46facf59de95110544eed3a62d18c1327a0c479f (patch)
treebbf912a212437c3fc1988dd36ece9f1fd0574c25 /src/Haddock
parent40c102adbf18e1575e9181866c76da8b55403ac7 (diff)
Make Hoogle add documentation to a package
Diffstat (limited to 'src/Haddock')
-rw-r--r--src/Haddock/Backends/Hoogle.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Haddock/Backends/Hoogle.hs b/src/Haddock/Backends/Hoogle.hs
index 7d81fbab..c8336352 100644
--- a/src/Haddock/Backends/Hoogle.hs
+++ b/src/Haddock/Backends/Hoogle.hs
@@ -37,10 +37,11 @@ prefix = ["-- Hoogle documentation, generated by Haddock"
,""]
-ppHoogle :: String -> String -> [Interface] -> FilePath -> IO ()
-ppHoogle package version ifaces odir = do
+ppHoogle :: String -> String -> String -> Maybe (HsDoc RdrName) -> [Interface] -> FilePath -> IO ()
+ppHoogle package version synopsis prologue ifaces odir = do
let filename = package <.> "txt"
contents = prefix ++
+ docWith (drop 2 $ dropWhile (/= ':') synopsis) prologue ++
["@package " ++ package] ++
["@version " ++ version | version /= ""] ++
concat [ppModule i | i <- ifaces, OptHide `notElem` ifaceOptions i]