diff options
-rw-r--r-- | src/Haddock/Backends/Xhtml/Names.hs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Haddock/Backends/Xhtml/Names.hs b/src/Haddock/Backends/Xhtml/Names.hs index 32a9f64c..c5166d7f 100644 --- a/src/Haddock/Backends/Xhtml/Names.hs +++ b/src/Haddock/Backends/Xhtml/Names.hs @@ -43,6 +43,14 @@ ppLDocName :: Qualification -> Located DocName -> Html ppLDocName qual (L _ d) = ppDocName qual d +ppDocName :: Qualification -> DocName -> Html +ppDocName qual docName = + case docName of + Documented name mdl -> + linkIdOcc mdl (Just (nameOccName name)) << ppQualifyName qual name mdl + Undocumented name -> ppQualifyName qual name (nameModule name) + + -- | Render a name depending on the selected qualification mode ppQualifyName :: Qualification -> Name -> Module -> Html ppQualifyName qual name mdl = @@ -68,14 +76,6 @@ ppQualifyName qual name mdl = Nothing -> ppQualifyName FullQual name mdl -ppDocName :: Qualification -> DocName -> Html -ppDocName qual docName = - case docName of - Documented name mdl -> - linkIdOcc mdl (Just (nameOccName name)) << ppQualifyName qual name mdl - Undocumented name -> ppQualifyName qual name (nameModule name) - - ppFullQualName :: Module -> Name -> Html ppFullQualName mdl name = toHtml $ moduleString mdl ++ '.' : getOccString name |