diff options
| author | Paolo Capriotti <p.capriotti@gmail.com> | 2012-07-19 16:28:45 +0100 | 
|---|---|---|
| committer | Paolo Capriotti <p.capriotti@gmail.com> | 2012-07-19 16:49:32 +0100 | 
| commit | 6e8bc1dca77bbbc5743f63a2e8ea5b1eab0ed80c (patch) | |
| tree | 5f4ad32677af3e2b95e468e5bcab94c38e5d88e1 /src/Haddock/Backends/Xhtml/DocMarkup.hs | |
| parent | 105f31e1b5b1428ae27590893740017327d322ff (diff) | |
| parent | 2a931d32cfdbd20d4da0cff6415a3aaf47823938 (diff) | |
Forward port changes from stable.
Diffstat (limited to 'src/Haddock/Backends/Xhtml/DocMarkup.hs')
| -rw-r--r-- | src/Haddock/Backends/Xhtml/DocMarkup.hs | 11 | 
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Haddock/Backends/Xhtml/DocMarkup.hs b/src/Haddock/Backends/Xhtml/DocMarkup.hs index f506d2b8..052116ee 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 @@ -39,6 +39,7 @@ parHtmlMarkup qual ppId = Markup {    markupIdentifierUnchecked  = thecode . ppUncheckedLink qual,    markupModule               = \m -> let (mdl,ref) = break (=='#') m                                       in ppModuleRef (mkModuleName mdl) ref, +  markupWarning              = thediv ! [theclass "warning"],    markupEmphasis             = emphasize,    markupMonospaced           = thecode,    markupUnorderedList        = unordList, @@ -84,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 = maybe noHtml (docSection_ qual) . combineDocumentation -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  | 
