aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Backends/Xhtml/DocMarkup.hs
diff options
context:
space:
mode:
authorSimon Hengel <sol@typeful.net>2012-05-16 17:14:21 +0200
committerSimon Hengel <sol@typeful.net>2012-05-17 19:08:20 +0200
commite090bbc5bdc8eb34d5340e467c7157341dfdd945 (patch)
tree5d0742e54dd4c85672cb903f0db0db56449e3f47 /src/Haddock/Backends/Xhtml/DocMarkup.hs
parent986ff3c5b2e4e519171816c3ad6caa81d4808919 (diff)
newtype-wrap Doc nodes for things that may have warnings attached
Diffstat (limited to 'src/Haddock/Backends/Xhtml/DocMarkup.hs')
-rw-r--r--src/Haddock/Backends/Xhtml/DocMarkup.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Haddock/Backends/Xhtml/DocMarkup.hs b/src/Haddock/Backends/Xhtml/DocMarkup.hs
index ee0a549f..cd1595f6 100644
--- a/src/Haddock/Backends/Xhtml/DocMarkup.hs
+++ b/src/Haddock/Backends/Xhtml/DocMarkup.hs
@@ -15,7 +15,7 @@ module Haddock.Backends.Xhtml.DocMarkup (
rdrDocToHtml,
origDocToHtml,
- docElement, docSection, maybeDocSection,
+ docElement, docSection, docSection_,
) where
@@ -85,12 +85,12 @@ docElement el content_ =
else el ! [theclass "doc"] << content_
-docSection :: Qualification -> Doc DocName -> Html
-docSection qual = (docElement thediv <<) . docToHtml qual
+docSection :: Qualification -> Documentation DocName -> Html
+docSection qual (Documentation doc) = maybe noHtml (docSection_ qual) doc
-maybeDocSection :: Qualification -> Maybe (Doc DocName) -> Html
-maybeDocSection qual = maybe noHtml (docSection qual)
+docSection_ :: Qualification -> Doc DocName -> Html
+docSection_ qual = (docElement thediv <<) . docToHtml qual
cleanup :: Doc a -> Doc a