aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Convert.hs
diff options
context:
space:
mode:
authorMax Bolingbroke <batterseapower@hotmail.com>2011-09-06 09:13:59 +0100
committerMax Bolingbroke <batterseapower@hotmail.com>2011-09-09 08:24:59 +0100
commit0f21c474382af69bb7dac214d6c225218240e033 (patch)
tree39974a647b9e1bce75140cbac16467c3849224ef /src/Haddock/Convert.hs
parentd54959189f33105ed09a59efee5ba34f53369282 (diff)
Ignore associated type defaults (just as we ignore default methods)
Diffstat (limited to 'src/Haddock/Convert.hs')
-rw-r--r--src/Haddock/Convert.hs13
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 })