diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-12-23 15:50:28 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-12-23 15:50:28 +0000 |
commit | 47be31308f5c90c4ae5e78252989c7da70b46e70 (patch) | |
tree | 46a2c53b699113671eab58bc95f9bd360ad5c828 /src/Haddock/GhcUtils.hs | |
parent | 45e5d834d473ab2f5930371e272a438590bc3f7e (diff) | |
parent | 8bdd26e3d2864151c4d0dccbc530c2deac362892 (diff) |
Merge branch 'master' of http://darcs.haskell.org//haddock
Diffstat (limited to 'src/Haddock/GhcUtils.hs')
-rw-r--r-- | src/Haddock/GhcUtils.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Haddock/GhcUtils.hs b/src/Haddock/GhcUtils.hs index a841e567..82ccb590 100644 --- a/src/Haddock/GhcUtils.hs +++ b/src/Haddock/GhcUtils.hs @@ -147,7 +147,7 @@ isValD _ = False declATs :: HsDecl a -> [a] -declATs (TyClD d) | isClassDecl d = map (tcdName . unL) $ tcdATs d +declATs (TyClD d) | isClassDecl d = map (unL . fdLName . unL) $ tcdATs d declATs _ = [] @@ -215,9 +215,9 @@ instance Parent (ConDecl Name) where instance Parent (TyClDecl Name) where children d - | isDataDecl d = map (unL . con_name . unL) . td_cons . tcdTyDefn $ d + | isDataDecl d = map (unL . con_name . unL) . dd_cons . tcdDataDefn $ d | isClassDecl d = - map (tcdName . unL) (tcdATs d) ++ + map (unL . fdLName . unL) (tcdATs d) ++ [ unL n | L _ (TypeSig ns _) <- tcdSigs d, n <- ns ] | otherwise = [] @@ -231,8 +231,8 @@ family = getName &&& children -- child to its grand-children, recursively. families :: TyClDecl Name -> [(Name, [Name])] families d - | isDataDecl d = family d : map (family . unL) (td_cons (tcdTyDefn d)) - | isClassDecl d = family d : concatMap (families . unL) (tcdATs d) + | isDataDecl d = family d : map (family . unL) (dd_cons (tcdDataDefn d)) + | isClassDecl d = [family d] | otherwise = [] |