aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Convert.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Haddock/Convert.hs')
-rw-r--r--src/Haddock/Convert.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Haddock/Convert.hs b/src/Haddock/Convert.hs
index b3549fdc..d4f75662 100644
--- a/src/Haddock/Convert.hs
+++ b/src/Haddock/Convert.hs
@@ -61,7 +61,9 @@ 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))
+ -- class associated-types are a subset of TyCon:
+ [noLoc (synifyTyCon at_tc) | (at_tc, _) <- classATItems cl]
+ [] --ignore associated type defaults
[] --we don't have any docs at this point
| otherwise
-> TyClD (synifyTyCon tc)
@@ -74,11 +76,9 @@ tyThingToLHsDecl t = noLoc $ case t of
ADataCon dc -> SigD (TypeSig [synifyName dc]
(synifyType ImplicitizeForAll (dataConUserType dc)))
-
--- class associated-types are a subset of TyCon
--- (mainly only type/data-families)
-synifyClassAT :: TyCon -> LTyClDecl Name
-synifyClassAT = noLoc . synifyTyCon
+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 })