diff options
author | Max Bolingbroke <batterseapower@hotmail.com> | 2011-09-06 09:13:59 +0100 |
---|---|---|
committer | Max Bolingbroke <batterseapower@hotmail.com> | 2011-09-09 08:24:59 +0100 |
commit | 0f21c474382af69bb7dac214d6c225218240e033 (patch) | |
tree | 39974a647b9e1bce75140cbac16467c3849224ef /src/Haddock/Convert.hs | |
parent | d54959189f33105ed09a59efee5ba34f53369282 (diff) |
Ignore associated type defaults (just as we ignore default methods)
Diffstat (limited to 'src/Haddock/Convert.hs')
-rw-r--r-- | src/Haddock/Convert.hs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/Haddock/Convert.hs b/src/Haddock/Convert.hs index 34de6775..81435a6e 100644 --- a/src/Haddock/Convert.hs +++ b/src/Haddock/Convert.hs @@ -68,14 +68,21 @@ tyThingToLHsDecl t = noLoc $ case t of (map (noLoc . synifyIdSig DeleteTopLevelQuantification) (classMethods cl)) emptyBag --ignore default method definitions, they don't affect signature - (map synifyClassAT (classATs cl)) + ats + (concat at_defss) [] --we don't have any docs at this point + where (ats, at_defss) = unzip $ map synifyClassAT (classATItems cl) -- class associated-types are a subset of TyCon -- (mainly only type/data-families) -synifyClassAT :: TyCon -> LTyClDecl Name -synifyClassAT = noLoc . synifyTyCon +synifyClassAT :: ClassATItem -> (LTyClDecl Name, [LTyClDecl Name]) +synifyClassAT (tc, _mb_defs) = (noLoc (synifyTyCon tc), []) + -- ignore the mb_defs since we ignore default methods + +synifyATDefault :: TyCon -> LTyClDecl Name +synifyATDefault tc = noLoc (synifyAxiom ax) + where Just ax = tyConFamilyCoercion_maybe tc synifyAxiom :: CoAxiom -> TyClDecl Name synifyAxiom (CoAxiom { co_ax_tvs = tvs, co_ax_lhs = lhs, co_ax_rhs = rhs }) |