aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/GHC/Utils.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Haddock/GHC/Utils.hs')
-rw-r--r--src/Haddock/GHC/Utils.hs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Haddock/GHC/Utils.hs b/src/Haddock/GHC/Utils.hs
index 5332475d..9aa89a88 100644
--- a/src/Haddock/GHC/Utils.hs
+++ b/src/Haddock/GHC/Utils.hs
@@ -75,6 +75,23 @@ getMainDeclBinder (ForD (ForeignExport _ _ _)) = Nothing
getMainDeclBinder _ = Nothing
+isTyClD (TyClD _) = True
+isTyClD _ = False
+
+
+isClassD (TyClD d) = isClassDecl d
+isClassD _ = False
+
+
+isDocD (DocD _) = True
+isDocD _ = False
+
+
+isInstD (InstD _) = True
+isInstD (TyClD d) = isFamInstDecl d
+isInstD _ = False
+
+
pretty :: Outputable a => a -> String
pretty x = showSDoc (ppr x)