aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Backends/Xhtml/Decl.hs
diff options
context:
space:
mode:
authorRichard Eisenberg <eir@cis.upenn.edu>2013-06-21 14:08:25 +0100
committerRichard Eisenberg <eir@cis.upenn.edu>2013-06-21 14:08:25 +0100
commitce3ff856c9412d5392fb7a5c37445f60f84cb2d2 (patch)
tree9a3ba795f0def258affe1a4c456edc3bfee6d0fe /src/Haddock/Backends/Xhtml/Decl.hs
parent336e635f0462daadaa280e8c3dbb4f23422e341f (diff)
Updates to reflect changes in HsDecls to support closed type families.
Diffstat (limited to 'src/Haddock/Backends/Xhtml/Decl.hs')
-rw-r--r--src/Haddock/Backends/Xhtml/Decl.hs20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/Haddock/Backends/Xhtml/Decl.hs b/src/Haddock/Backends/Xhtml/Decl.hs
index db39ccca..2ecc6464 100644
--- a/src/Haddock/Backends/Xhtml/Decl.hs
+++ b/src/Haddock/Backends/Xhtml/Decl.hs
@@ -145,23 +145,25 @@ ppTyName name
ppTyFamHeader :: Bool -> Bool -> FamilyDecl DocName -> Bool -> Qualification -> Html
-ppTyFamHeader summary associated d@(FamilyDecl { fdFlavour = flav
+ppTyFamHeader summary associated d@(FamilyDecl { fdInfo = info
, fdKindSig = mkind }) unicode qual =
- (case flav of
- TypeFamily
+ (case info of
+ OpenTypeFamily
| associated -> keyword "type"
| otherwise -> keyword "type family"
DataFamily
| associated -> keyword "data"
| otherwise -> keyword "data family"
+ ClosedTypeFamily _
+ -> keyword "type family"
) <+>
ppFamDeclBinderWithVars summary d <+>
- case mkind of
+ (case mkind of
Just kind -> dcolon unicode <+> ppLKind unicode qual kind
Nothing -> noHtml
-
+ )
ppTyFam :: Bool -> Bool -> LinksInfo -> SrcSpan -> Documentation DocName ->
FamilyDecl DocName -> Bool -> Qualification -> Html
@@ -175,7 +177,13 @@ ppTyFam summary associated links loc doc decl unicode qual
header_ = topDeclElem links loc [docname] (ppTyFamHeader summary associated decl unicode qual)
- instancesBit = ppInstances instances docname unicode qual
+ instancesBit
+ | FamilyDecl { fdInfo = ClosedTypeFamily _eqns } <- decl
+ , not summary
+ = noHtml -- TODO: print eqns
+
+ | otherwise
+ = ppInstances instances docname unicode qual
-- TODO: get the instances
instances = []