aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
diff options
context:
space:
mode:
authorRyanGlScott <ryan.gl.scott@gmail.com>2016-02-11 15:42:42 -0500
committerBen Gamari <ben@smart-cactus.org>2016-04-16 17:57:54 +0200
commit035f2f18448d6f81a16d80e8b2ae8025616f8d41 (patch)
treeaca3aacabe4ab413cd5d1fe30c9ada96e56361fe /haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
parent7699b27c5766473709bc84bc69269a409dfad9a2 (diff)
Collapse type/data family instances by default
(cherry picked from commit 2da130a8db8f995c119b544fad807533236cf088)
Diffstat (limited to 'haddock-api/src/Haddock/Backends/Xhtml/Decl.hs')
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml/Decl.hs15
1 files changed, 10 insertions, 5 deletions
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
index b354658d..660a8475 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
@@ -607,20 +607,25 @@ ppInstHead links splice unicode qual mdoc origin orphan no ihd@(InstHead {..}) =
, [subInstDetails iid ats sigs]
)
where
- iid = instanceId origin no orphan ihd
sigs = ppInstanceSigs links splice unicode qual clsiSigs
ats = ppInstanceAssocTys links splice unicode qual clsiAssocTys
TypeInst rhs ->
- (ptype, mdoc, [])
+ ( subInstHead iid ptype
+ , mdoc
+ , [subFamInstDetails iid prhs]
+ )
where
- ptype = keyword "type" <+> typ <+> prhs
+ ptype = keyword "type" <+> typ
prhs = maybe noHtml (\t -> equals <+> ppType unicode qual t) rhs
DataInst dd ->
- (pdata, mdoc, [])
+ ( subInstHead iid pdata
+ , mdoc
+ , [subFamInstDetails iid pdecl])
where
- pdata = keyword "data" <+> typ <+> pdecl
+ pdata = keyword "data" <+> typ
pdecl = ppShortDataDecl False True dd unicode qual
where
+ iid = instanceId origin no orphan ihd
typ = ppAppNameTypes ihdClsName ihdKinds ihdTypes unicode qual