diff options
author | Isaac Dupree <id@isaac.cedarswampstudios.org> | 2010-01-14 18:53:18 +0000 |
---|---|---|
committer | Isaac Dupree <id@isaac.cedarswampstudios.org> | 2010-01-14 18:53:18 +0000 |
commit | a85dd0d5919ddb22e8073af0ef1a6971dbfb927f (patch) | |
tree | 7bac8d9357753a761264256ccd8a8dd0ce251db8 /src/Haddock | |
parent | c82f40a3726f89e451587c07cfaa91576123e671 (diff) |
fix html arg-doc off-by-one and silliness
Diffstat (limited to 'src/Haddock')
-rw-r--r-- | src/Haddock/Backends/Html.hs | 7 |
1 files changed, 6 insertions, 1 deletions
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 |