diff options
author | David Waern <david.waern@gmail.com> | 2010-07-21 14:14:45 +0000 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2010-07-21 14:14:45 +0000 |
commit | 6c589874c9fd4772880f758373852db83601dac6 (patch) | |
tree | 290a269003f651d34b808ddf66f244393e8d8472 | |
parent | 41cbe970bba91d4483460c7a48fc6d553044377b (diff) |
Style police in H.B.X.DocMarkup
-rw-r--r-- | src/Haddock/Backends/Xhtml/DocMarkup.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Haddock/Backends/Xhtml/DocMarkup.hs b/src/Haddock/Backends/Xhtml/DocMarkup.hs index 28f8c782..3ed36ed9 100644 --- a/src/Haddock/Backends/Xhtml/DocMarkup.hs +++ b/src/Haddock/Backends/Xhtml/DocMarkup.hs @@ -18,6 +18,7 @@ module Haddock.Backends.Xhtml.DocMarkup ( docElement, docSection, maybeDocSection, ) where + import Haddock.Backends.Xhtml.Names import Haddock.Backends.Xhtml.Utils import Haddock.GhcUtils @@ -72,29 +73,31 @@ parHtmlMarkup ppId isTyCon = Markup { htmlExpression = (strong . thecode . toHtml $ expression ++ "\n") ! [theclass "userinput"] - -- If the doc is a single paragraph, don't surround it with <P> (this causes -- ugly extra whitespace with some browsers). FIXME: Does this still apply? docToHtml :: Doc DocName -> Html docToHtml = markup fmt . cleanup where fmt = parHtmlMarkup ppDocName (isTyConName . getName) + origDocToHtml :: Doc Name -> Html origDocToHtml = markup fmt . cleanup where fmt = parHtmlMarkup ppName isTyConName + rdrDocToHtml :: Doc RdrName -> Html rdrDocToHtml = markup fmt . cleanup where fmt = parHtmlMarkup ppRdrName isRdrTc - docElement :: (ADDATTRS a) => a -> a docElement = (! [theclass "doc"]) + docSection :: Doc DocName -> Html docSection = (docElement thediv <<) . docToHtml + maybeDocSection :: Maybe (Doc DocName) -> Html maybeDocSection = maybe noHtml docSection |