aboutsummaryrefslogtreecommitdiff
path: root/haddock-api
diff options
context:
space:
mode:
authorAlexander Biehl <abiehl@novomind.com>2017-04-25 13:39:49 +0200
committerAlex Biehl <alexbiehl@gmail.com>2017-04-25 17:02:20 +0200
commit968045e574783fe8bdde7afbb825d4dcd82ae0e7 (patch)
tree164b6fed31ff2767b70c1b37e5f5908dcb84de13 /haddock-api
parentc0b1d8b7dc6331efb62e05ad317af781069c13be (diff)
Hoogle: Correctly print classes with associated data types
Diffstat (limited to 'haddock-api')
-rw-r--r--haddock-api/src/Haddock/Backends/Hoogle.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/haddock-api/src/Haddock/Backends/Hoogle.hs b/haddock-api/src/Haddock/Backends/Hoogle.hs
index 86a73c33..183b669e 100644
--- a/haddock-api/src/Haddock/Backends/Hoogle.hs
+++ b/haddock-api/src/Haddock/Backends/Hoogle.hs
@@ -22,6 +22,7 @@ import Haddock.GhcUtils
import Haddock.Types hiding (Version)
import Haddock.Utils hiding (out)
+import HsBinds (emptyLHsBinds)
import GHC
import Outputable
import NameSet
@@ -157,7 +158,9 @@ pp_sig dflags names (L _ typ) =
-- note: does not yet output documentation for class methods
ppClass :: DynFlags -> TyClDecl Name -> [(Name, DocForDecl Name)] -> [String]
-ppClass dflags decl subdocs = (out dflags decl{tcdSigs=[]} ++ ppTyFams) : ppMethods
+ppClass dflags decl subdocs =
+ (out dflags decl{tcdSigs=[], tcdATs=[], tcdATDefs=[], tcdMeths=emptyLHsBinds}
+ ++ ppTyFams) : ppMethods
where
ppMethods = concat . map (ppSig' . unLoc . add_ctxt) $ tcdSigs decl