aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/GHC/Utils.hs
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2008-08-03 16:50:52 +0000
committerDavid Waern <david.waern@gmail.com>2008-08-03 16:50:52 +0000
commit21d4c0d4605489b547feeaed8bfef3f953fd69be (patch)
tree4667200240f32f58b34e01ba6f5ec96fbc636e90 /src/Haddock/GHC/Utils.hs
parent97b749431138f5e0ca728d81650587e3e506ed97 (diff)
Move some utility functions from H.I.Create to H.GHC.Utils
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)