diff options
author | David Waern <davve@dtek.chalmers.se> | 2007-12-08 16:24:27 +0000 |
---|---|---|
committer | David Waern <davve@dtek.chalmers.se> | 2007-12-08 16:24:27 +0000 |
commit | 51ff000cad60d81cc73c203e95b21d98fbf82628 (patch) | |
tree | ea262af6428eb1dff3a4abca10bb46828bfba64f /src | |
parent | de0c98c664b8269211659608bedec5ad69d42318 (diff) |
Add ppLParendTypes/ppLParendType
Diffstat (limited to 'src')
-rw-r--r-- | src/Haddock/Backends/Html.hs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/Haddock/Backends/Html.hs b/src/Haddock/Backends/Html.hs index 75ea831c..8c6a82db 100644 --- a/src/Haddock/Backends/Html.hs +++ b/src/Haddock/Backends/Html.hs @@ -736,7 +736,6 @@ ppTySyn summary links loc mbDoc (TySynonym (L _ name) ltyvars _ ltype) full = hdr <+> equals <+> ppLType ltype NoLink n = name -ppLType (L _ t) = ppType t ppTypeSig :: Bool -> Name -> HsType DocName -> Html ppTypeSig summary nm ty = ppBinder summary nm <+> dcolon <+> ppType ty @@ -750,9 +749,6 @@ ppTyName name ppTyNames = map ppTyName -ppLTypes = hsep . map ppLType - - -------------------------------------------------------------------------------- -- Contexts -------------------------------------------------------------------------------- @@ -1229,6 +1225,15 @@ maybeParen :: Int -- Precedence of context maybeParen ctxt_prec op_prec p | ctxt_prec >= op_prec = parens p | otherwise = p + +ppLTypes = hsep . map ppLType +ppLParendTypes = hsep . map ppLParendType + + +ppLType = ppType . unLoc +ppLParendType = ppParendType . unLoc + + ppType ty = ppr_mono_ty pREC_TOP (prepare ty) ppParendType ty = ppr_mono_ty pREC_CON ty |