aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Backends/Hoogle.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Haddock/Backends/Hoogle.hs')
-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