aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Haddock/Backends/Hoogle.hs5
-rw-r--r--src/Main.hs2
2 files changed, 4 insertions, 3 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]
diff --git a/src/Main.hs b/src/Main.hs
index 6fc1a6cd..f9820243 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -258,7 +258,7 @@ render flags interfaces installedIfaces = do
copyHtmlBits odir libdir css_file
when (Flag_Hoogle `elem` flags) $ do
- ppHoogle pkgName pkgVer visibleIfaces odir
+ ppHoogle pkgName pkgVer title prologue visibleIfaces odir
-------------------------------------------------------------------------------
-- Reading and dumping interface files