aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock
diff options
context:
space:
mode:
authorƁukasz Hanuszczak <lukasz.hanuszczak@gmail.com>2015-07-29 17:45:00 +0200
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2015-08-21 18:22:32 +0100
commit709ce61f4cf18b2d6a24411670713d7480b8218c (patch)
treef19ec64959808816e8d557c1c2106515cc14c70e /haddock-api/src/Haddock
parent5980cfb8eb5bf86e420c2d1b82d6d3b92c0c1fda (diff)
Implement HTML renderer for pseudo-family declarations.
Diffstat (limited to 'haddock-api/src/Haddock')
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml/Decl.hs14
1 files changed, 13 insertions, 1 deletions
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
index e248dc25..e6869916 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
@@ -265,6 +265,14 @@ ppTyFamHeader summary associated d@(FamilyDecl { fdInfo = info
ppFamilyKind unicode qual mkind
+ppPseudoFamilyHeader :: Unicode -> Qualification -> PseudoFamilyDecl DocName
+ -> Html
+ppPseudoFamilyHeader unicode qual (PseudoFamilyDecl { .. }) =
+ ppFamilyInfo True pfdInfo <+>
+ ppAppNameTypes (unLoc pfdLName) [] (map unLoc pfdTyVars) unicode qual <+>
+ ppFamilyKind unicode qual pfdKindSig
+
+
ppTyFam :: Bool -> Bool -> LinksInfo -> [DocInstance DocName] ->
[(DocName, Fixity)] -> SrcSpan -> Documentation DocName ->
FamilyDecl DocName -> Splice -> Unicode -> Qualification -> Html
@@ -299,7 +307,11 @@ ppTyFam summary associated links instances fixities loc doc decl splice unicode
ppPseudoFamilyDecl :: LinksInfo -> Splice -> Unicode -> Qualification
-> PseudoFamilyDecl DocName
-> Html
-ppPseudoFamilyDecl = undefined
+ppPseudoFamilyDecl links splice unicode qual
+ decl@(PseudoFamilyDecl { pfdLName = L loc name, .. }) =
+ wrapper $ ppPseudoFamilyHeader unicode qual decl
+ where
+ wrapper = topDeclElem links loc splice [name]
--------------------------------------------------------------------------------