diff options
Diffstat (limited to 'src/Haddock/GhcUtils.hs')
-rw-r--r-- | src/Haddock/GhcUtils.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Haddock/GhcUtils.hs b/src/Haddock/GhcUtils.hs index fc04351b..c38bf9e5 100644 --- a/src/Haddock/GhcUtils.hs +++ b/src/Haddock/GhcUtils.hs @@ -78,7 +78,7 @@ isVarSym = isLexVarSym . occNameFS getMainDeclBinder :: HsDecl name -> [name] -getMainDeclBinder (TyClD d) | not (isFamInstDecl d) = [tcdName d] +getMainDeclBinder (TyClD d) = [tcdName d] getMainDeclBinder (ValD d) = case collectHsBindBinders d of [] -> [] @@ -138,7 +138,6 @@ isDocD _ = False isInstD :: HsDecl a -> Bool isInstD (InstD _) = True -isInstD (TyClD d) = isFamInstDecl d isInstD _ = False @@ -216,7 +215,7 @@ instance Parent (ConDecl Name) where instance Parent (TyClDecl Name) where children d - | isDataDecl d = map (unL . con_name . unL) . tcdCons $ d + | isDataDecl d = map (unL . con_name . unL) . td_cons . tcdTyDefn $ d | isClassDecl d = map (tcdName . unL) (tcdATs d) ++ [ unL n | L _ (TypeSig ns _) <- tcdSigs d, n <- ns ] @@ -232,7 +231,7 @@ family = getName &&& children -- child to its grand-children, recursively. families :: TyClDecl Name -> [(Name, [Name])] families d - | isDataDecl d = family d : map (family . unL) (tcdCons d) + | isDataDecl d = family d : map (family . unL) (td_cons (tcdTyDefn d)) | isClassDecl d = family d : concatMap (families . unL) (tcdATs d) | otherwise = [] |