From 48722e6823e46a17ca789949ecd1a2b8d359ed22 Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 27 May 2002 12:30:38 +0000 Subject: [haddock @ 2002-05-27 12:30:37 by simonmar] - Put function arguments *before* the doc for the function, as suggested by Sven Panne. This looks nicer when the function documentation is long. - Switch to using bold for binders at the definition site, and use underline for keywords. This makes the binder stand out more. --- src/HaddockHtml.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/HaddockHtml.hs') diff --git a/src/HaddockHtml.hs b/src/HaddockHtml.hs index 61113154..fc053e68 100644 --- a/src/HaddockHtml.hs +++ b/src/HaddockHtml.hs @@ -700,11 +700,11 @@ ppFunSig summary nm ty doc | otherwise = declBox (ppHsBinder False nm) (tda [theclass "body"] << vanillaTable << ( + do_args True ty (if (isJust doc) then ndocBox (docToHtml (fromJust doc)) - else Html.emptyTable) - do_args True ty - )) + else Html.emptyTable) + )) where no_arg_docs (HsForAllType _ _ ty) = no_arg_docs ty no_arg_docs (HsTyFun (HsTyDoc _ _) _) = False @@ -804,7 +804,7 @@ ppHsIdentifier (HsSpecial str) = str ppHsBinder :: Bool -> HsName -> Html ppHsBinder True nm = anchor ! [href ('#':hsNameStr nm)] << ppHsBinder' nm -ppHsBinder False nm = linkTarget nm +++ ppHsBinder' nm +ppHsBinder False nm = linkTarget nm +++ bold << ppHsBinder' nm ppHsBinder' (HsTyClsName id) = ppHsBindIdent id ppHsBinder' (HsVarName id) = ppHsBindIdent id @@ -853,7 +853,7 @@ hsep htmls = foldr1 (\a b -> a+++" "+++b) htmls infixr 8 <+> a <+> b = Html (getHtmlElements (toHtml a) ++ HtmlString " ": getHtmlElements (toHtml b)) -keyword s = bold << toHtml s +keyword s = thespan ! [theclass "keyword"] << toHtml s equals = char '=' comma = char ',' -- cgit v1.2.3