From a85dd0d5919ddb22e8073af0ef1a6971dbfb927f Mon Sep 17 00:00:00 2001 From: Isaac Dupree Date: Thu, 14 Jan 2010 18:53:18 +0000 Subject: fix html arg-doc off-by-one and silliness --- src/Haddock/Backends/Html.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/Haddock/Backends') diff --git a/src/Haddock/Backends/Html.hs b/src/Haddock/Backends/Html.hs index 37c9cca0..1a132c5b 100644 --- a/src/Haddock/Backends/Html.hs +++ b/src/Haddock/Backends/Html.hs @@ -858,9 +858,14 @@ ppTypeOrFunSig summary links loc docname typ (doc, argDocs) (pref1, pref2, sep) <-> rdocBox noHtml) do_largs n (darrow unicode) ltype do_args n leader (HsForAllTy Implicit _ lctxt ltype) + | not (null (unLoc lctxt)) = (argBox (leader <+> ppLContextNoArrow lctxt unicode) <-> rdocBox noHtml) - do_largs (n+1) (darrow unicode) ltype + do_largs n (darrow unicode) ltype + -- if we're not showing any 'forall' or class constraints or + -- anything, skip having an empty line for the context. + | otherwise + = do_largs n leader ltype do_args n leader (HsFunTy lt r) = (argBox (leader <+> ppLType unicode lt) <-> rdocBox (argDocHtml n)) do_largs (n+1) (arrow unicode) r -- cgit v1.2.3