aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock
diff options
context:
space:
mode:
Diffstat (limited to 'src/Haddock')
-rw-r--r--src/Haddock/GHC/Utils.hs4
-rw-r--r--src/Haddock/Interface/Create.hs7
2 files changed, 9 insertions, 2 deletions
diff --git a/src/Haddock/GHC/Utils.hs b/src/Haddock/GHC/Utils.hs
index 9aa89a88..6de56f88 100644
--- a/src/Haddock/GHC/Utils.hs
+++ b/src/Haddock/GHC/Utils.hs
@@ -92,6 +92,10 @@ isInstD (TyClD d) = isFamInstDecl d
isInstD _ = False
+declATs (TyClD d) | isClassDecl d = map (tcdName . unL) $ tcdATs d
+declATs _ = []
+
+
pretty :: Outputable a => a -> String
pretty x = showSDoc (ppr x)
diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs
index 4380c0ee..1d41216e 100644
--- a/src/Haddock/Interface/Create.hs
+++ b/src/Haddock/Interface/Create.hs
@@ -408,8 +408,11 @@ mkExportItems modMap this_mod exported_names decls declMap famMap sub_map
declWith :: Name -> ErrMsgM [ ExportItem Name ]
declWith t
- | Just (decl, maybeDoc) <- findDecl t
- = return [ ExportDecl (restrictTo subs (extractDecl t mdl decl)) maybeDoc [] ]
+ -- temp hack: we filter out separately declared ATs, since we haven't decided how
+ -- to handle them yet. We should really give an warning message also, and filter the
+ -- name out in mkVisibleNames...
+ | Just (decl, maybeDoc) <- findDecl t, t `notElem` declATs (unL decl) =
+ return [ ExportDecl (restrictTo subs (extractDecl t mdl decl)) maybeDoc [] ]
| otherwise = return []
where
mdl = nameModule t