diff options
author | Neil Mitchell <unknown> | 2008-08-13 14:03:46 +0000 |
---|---|---|
committer | Neil Mitchell <unknown> | 2008-08-13 14:03:46 +0000 |
commit | 46facf59de95110544eed3a62d18c1327a0c479f (patch) | |
tree | bbf912a212437c3fc1988dd36ece9f1fd0574c25 /src | |
parent | 40c102adbf18e1575e9181866c76da8b55403ac7 (diff) |
Make Hoogle add documentation to a package
Diffstat (limited to 'src')
-rw-r--r-- | src/Haddock/Backends/Hoogle.hs | 5 | ||||
-rw-r--r-- | src/Main.hs | 2 |
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 |