diff options
author | Neil Mitchell <unknown> | 2008-06-14 12:27:07 +0000 |
---|---|---|
committer | Neil Mitchell <unknown> | 2008-06-14 12:27:07 +0000 |
commit | a64dbd046c9b5d6dd3b62b65aee5e7616c0642ef (patch) | |
tree | c8529dfcf05fb02104b12e7c0df0014c77261804 | |
parent | 3cd971e8455368d8dfd377f68bca8ff663a922a9 (diff) |
Remove <document comment> from the Hoogle output
-rw-r--r-- | src/Haddock/Backends/Hoogle.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Haddock/Backends/Hoogle.hs b/src/Haddock/Backends/Hoogle.hs index 5f9a60a9..33d77bef 100644 --- a/src/Haddock/Backends/Hoogle.hs +++ b/src/Haddock/Backends/Hoogle.hs @@ -56,7 +56,11 @@ dropComment [] = [] out :: Outputable a => a -> String -out = unwords . map (dropWhile isSpace) . lines . showSDocUnqual . ppr +out = f . unwords . map (dropWhile isSpace) . lines . showSDocUnqual . ppr + where + f xs | " <document comment>" `isPrefixOf` xs = f $ drop 19 xs + f (x:xs) = x : f xs + f [] = [] typeSig :: String -> [String] -> String |