aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Backends/Xhtml/Names.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Haddock/Backends/Xhtml/Names.hs')
-rw-r--r--src/Haddock/Backends/Xhtml/Names.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Haddock/Backends/Xhtml/Names.hs b/src/Haddock/Backends/Xhtml/Names.hs
index 48d0f7f1..2f2b82ed 100644
--- a/src/Haddock/Backends/Xhtml/Names.hs
+++ b/src/Haddock/Backends/Xhtml/Names.hs
@@ -14,6 +14,7 @@ module Haddock.Backends.Xhtml.Names (
ppName, ppDocName, ppLDocName, ppRdrName, ppUncheckedLink,
ppBinder, ppBinder',
ppModule, ppModuleRef,
+ ppIPName,
linkId
) where
@@ -30,6 +31,7 @@ import qualified Data.List as List
import GHC
import Name
import RdrName
+import FastString (unpackFS)
ppOccName :: OccName -> Html
@@ -39,6 +41,9 @@ ppOccName = toHtml . occNameString
ppRdrName :: RdrName -> Html
ppRdrName = ppOccName . rdrNameOcc
+ppIPName :: HsIPName -> Html
+ppIPName = toHtml . unpackFS . hsIPNameFS
+
ppUncheckedLink :: Qualification -> (ModuleName, OccName) -> Html
ppUncheckedLink _ (mdl, occ) = linkIdOcc' mdl (Just occ) << ppOccName occ -- TODO: apply ppQualifyName