aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface
diff options
context:
space:
mode:
authorSimon Hengel <sol@typeful.net>2012-01-12 11:54:37 +0100
committerDavid Waern <david.waern@gmail.com>2012-02-04 00:50:04 +0100
commitd327e3dfea1dda473c065b0e6a7da2161c9e6668 (patch)
tree644c8ba2ba8829547971419004571c430b6da5a2 /src/Haddock/Interface
parent7829173d5c619f93edb5075d66e2ed15c4cc73c6 (diff)
Add DocWarning to Doc
The Xhtml backend has special markup for that, Hoogle and LaTeX reuse what we have for DocEmphasis.
Diffstat (limited to 'src/Haddock/Interface')
-rw-r--r--src/Haddock/Interface/LexParseRn.hs1
-rw-r--r--src/Haddock/Interface/Rename.hs3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/Haddock/Interface/LexParseRn.hs b/src/Haddock/Interface/LexParseRn.hs
index f70c5953..ebd2b8fc 100644
--- a/src/Haddock/Interface/LexParseRn.hs
+++ b/src/Haddock/Interface/LexParseRn.hs
@@ -108,6 +108,7 @@ rename gre = rn
a:b:_ | isTyConName a -> DocIdentifier a | otherwise -> DocIdentifier b
-- If an id can refer to multiple things, we give precedence to type
-- constructors.
+ DocWarning doc -> DocWarning (rn doc)
DocEmphasis doc -> DocEmphasis (rn doc)
DocMonospaced doc -> DocMonospaced (rn doc)
DocUnorderedList docs -> DocUnorderedList (map rn docs)
diff --git a/src/Haddock/Interface/Rename.hs b/src/Haddock/Interface/Rename.hs
index 691dafbc..582c2ccd 100644
--- a/src/Haddock/Interface/Rename.hs
+++ b/src/Haddock/Interface/Rename.hs
@@ -169,6 +169,9 @@ renameDoc d = case d of
return (DocIdentifier x')
DocIdentifierUnchecked x -> return (DocIdentifierUnchecked x)
DocModule str -> return (DocModule str)
+ DocWarning doc -> do
+ doc' <- renameDoc doc
+ return (DocWarning doc')
DocEmphasis doc -> do
doc' <- renameDoc doc
return (DocEmphasis doc')