From 21d4c0d4605489b547feeaed8bfef3f953fd69be Mon Sep 17 00:00:00 2001 From: David Waern Date: Sun, 3 Aug 2008 16:50:52 +0000 Subject: Move some utility functions from H.I.Create to H.GHC.Utils --- src/Haddock/GHC/Utils.hs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/Haddock/GHC') 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) -- cgit v1.2.3