Skip to content

Commit

Permalink
Filter out separately exported ATs (take two)
Browse files Browse the repository at this point in the history
  • Loading branch information
waern committed Aug 3, 2008
1 parent ca4f377 commit 9b3fa59
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/Haddock/GHC/Utils.hs
Expand Up @@ -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)

Expand Down
7 changes: 5 additions & 2 deletions src/Haddock/Interface/Create.hs
Expand Up @@ -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
Expand Down

0 comments on commit 9b3fa59

Please sign in to comment.