diff options
Diffstat (limited to 'src/Haddock')
-rw-r--r-- | src/Haddock/GHC/Utils.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Haddock/GHC/Utils.hs b/src/Haddock/GHC/Utils.hs index 549482ef..40e13004 100644 --- a/src/Haddock/GHC/Utils.hs +++ b/src/Haddock/GHC/Utils.hs @@ -81,23 +81,28 @@ getMainDeclBinder (ForD (ForeignExport _ _ _)) = Nothing getMainDeclBinder _ = Nothing +isTyClD :: HsDecl a -> Bool isTyClD (TyClD _) = True isTyClD _ = False +isClassD :: HsDecl a -> Bool isClassD (TyClD d) = isClassDecl d isClassD _ = False +isDocD :: HsDecl a -> Bool isDocD (DocD _) = True isDocD _ = False +isInstD :: HsDecl a -> Bool isInstD (InstD _) = True isInstD (TyClD d) = isFamInstDecl d isInstD _ = False +declATs :: HsDecl a -> [a] declATs (TyClD d) | isClassDecl d = map (tcdName . unL) $ tcdATs d declATs _ = [] |