From 371a8ef10f2fe1d30f203105750f04a9bdbb94b7 Mon Sep 17 00:00:00 2001 From: David Waern Date: Sat, 20 Nov 2010 20:07:55 +0000 Subject: Re-order functions --- src/Haddock/Backends/Xhtml/Names.hs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/Haddock/Backends/Xhtml') 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 -- cgit v1.2.3