From 732ec0cf87e799bd4b8d198ffac7bd9a1b2a1d73 Mon Sep 17 00:00:00 2001 From: David Waern Date: Sat, 12 Apr 2008 14:02:18 +0000 Subject: Fix printing of data binders --- src/Haddock/Backends/Html.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/Haddock/Backends') diff --git a/src/Haddock/Backends/Html.hs b/src/Haddock/Backends/Html.hs index 45bffdcd..2350839a 100644 --- a/src/Haddock/Backends/Html.hs +++ b/src/Haddock/Backends/Html.hs @@ -1292,7 +1292,7 @@ ppr_fun_ty ctxt_prec ty1 ty2 -- Names ppOccName :: OccName -> Html -ppOccName name = toHtml $ occNameString name +ppOccName = toHtml . occNameString ppRdrName :: RdrName -> Html ppRdrName = ppOccName . rdrNameOcc @@ -1311,16 +1311,18 @@ linkTarget n = namedAnchor (anchorNameStr n) << toHtml "" ppName :: Name -> Html ppName name = toHtml (getOccString name) + ppBinder :: Bool -> OccName -> Html -- The Bool indicates whether we are generating the summary, in which case -- the binder will be a link to the full definition. ppBinder True n = linkedAnchor (anchorNameStr n) << ppBinder' n ppBinder False n = linkTarget n +++ bold << ppBinder' n + ppBinder' :: OccName -> Html ppBinder' n - | isSymOcc n = parens $ toHtml (occNameString n) - | otherwise = toHtml (occNameString n) + | isVarSym n = parens $ ppOccName n + | otherwise = ppOccName n linkId mod mbName = linkIdOcc mod (fmap nameOccName mbName) -- cgit v1.2.3