aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Backends/Xhtml/Layout.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Haddock/Backends/Xhtml/Layout.hs')
-rw-r--r--src/Haddock/Backends/Xhtml/Layout.hs34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/Haddock/Backends/Xhtml/Layout.hs b/src/Haddock/Backends/Xhtml/Layout.hs
index 295af305..7277a683 100644
--- a/src/Haddock/Backends/Xhtml/Layout.hs
+++ b/src/Haddock/Backends/Xhtml/Layout.hs
@@ -112,25 +112,25 @@ divSubDecls cssClass captionName = maybe noHtml wrap
subCaption = paragraph ! [theclass "caption"] << captionName
-subDlist :: [SubDecl] -> Maybe Html
-subDlist [] = Nothing
-subDlist decls = Just $ dlist << map subEntry decls +++ clearDiv
+subDlist :: Qualification -> [SubDecl] -> Maybe Html
+subDlist _ [] = Nothing
+subDlist quali decls = Just $ dlist << map subEntry decls +++ clearDiv
where
subEntry (decl, mdoc, subs) =
dterm ! [theclass "src"] << decl
+++
- docElement ddef << (fmap docToHtml mdoc +++ subs)
+ docElement ddef << (fmap docToHtml mdoc +++ subs)
clearDiv = thediv ! [ theclass "clear" ] << noHtml
-subTable :: [SubDecl] -> Maybe Html
-subTable [] = Nothing
-subTable decls = Just $ table << aboves (concatMap subRow decls)
+subTable :: Qualification -> [SubDecl] -> Maybe Html
+subTable _ [] = Nothing
+subTable quali decls = Just $ table << aboves (concatMap subRow decls)
where
subRow (decl, mdoc, subs) =
(td ! [theclass "src"] << decl
<->
- docElement td << fmap docToHtml mdoc)
+ docElement td << fmap (docToHtml quali) mdoc)
: map (cell . (td <<)) subs
@@ -139,27 +139,27 @@ subBlock [] = Nothing
subBlock hs = Just $ toHtml hs
-subArguments :: [SubDecl] -> Html
-subArguments = divSubDecls "arguments" "Arguments" . subTable
+subArguments :: Qualification -> [SubDecl] -> Html
+subArguments quali = divSubDecls "arguments" "Arguments" . (subTable quali)
subAssociatedTypes :: [Html] -> Html
subAssociatedTypes = divSubDecls "associated-types" "Associated Types" . subBlock
-subConstructors :: [SubDecl] -> Html
-subConstructors = divSubDecls "constructors" "Constructors" . subTable
+subConstructors :: Qualification -> [SubDecl] -> Html
+subConstructors quali = divSubDecls "constructors" "Constructors" . (subTable quali)
-subFields :: [SubDecl] -> Html
-subFields = divSubDecls "fields" "Fields" . subDlist
+subFields :: Qualification -> [SubDecl] -> Html
+subFields quali = divSubDecls "fields" "Fields" . (subDlist quali)
-subInstances :: String -> [SubDecl] -> Html
-subInstances nm = maybe noHtml wrap . instTable
+subInstances :: Qualification -> String -> [SubDecl] -> Html
+subInstances quali nm = maybe noHtml wrap . instTable
where
wrap = (subSection <<) . (subCaption +++)
- instTable = fmap (thediv ! collapseSection id_ True [] <<) . subTable
+ instTable = fmap (thediv ! collapseSection id_ True [] <<) . (subTable quali)
subSection = thediv ! [theclass $ "subs instances"]
subCaption = paragraph ! collapseControl id_ True "caption" << "Instances"
id_ = makeAnchorId $ "i:" ++ nm