diff options
author | David Waern <david.waern@gmail.com> | 2008-08-03 16:50:52 +0000 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2008-08-03 16:50:52 +0000 |
commit | 21d4c0d4605489b547feeaed8bfef3f953fd69be (patch) | |
tree | 4667200240f32f58b34e01ba6f5ec96fbc636e90 /src/Haddock/GHC | |
parent | 97b749431138f5e0ca728d81650587e3e506ed97 (diff) |
Move some utility functions from H.I.Create to H.GHC.Utils
Diffstat (limited to 'src/Haddock/GHC')
-rw-r--r-- | src/Haddock/GHC/Utils.hs | 17 |
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) |