aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNeil Mitchell <unknown>2008-06-14 12:27:07 +0000
committerNeil Mitchell <unknown>2008-06-14 12:27:07 +0000
commita64dbd046c9b5d6dd3b62b65aee5e7616c0642ef (patch)
treec8529dfcf05fb02104b12e7c0df0014c77261804 /src
parent3cd971e8455368d8dfd377f68bca8ff663a922a9 (diff)
Remove <document comment> from the Hoogle output
Diffstat (limited to 'src')
-rw-r--r--src/Haddock/Backends/Hoogle.hs6
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