diff options
author | simonmar <unknown> | 2002-05-27 12:30:38 +0000 |
---|---|---|
committer | simonmar <unknown> | 2002-05-27 12:30:38 +0000 |
commit | 48722e6823e46a17ca789949ecd1a2b8d359ed22 (patch) | |
tree | 4bcbccee4b2eb978a924bb74d91064891102bb3e /src/HaddockHtml.hs | |
parent | a4e4c5f822416dbe2b8abe34301e8d3e39051bc1 (diff) |
[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.
Diffstat (limited to 'src/HaddockHtml.hs')
-rw-r--r-- | src/HaddockHtml.hs | 10 |
1 files changed, 5 insertions, 5 deletions
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 ',' |