From 51ff000cad60d81cc73c203e95b21d98fbf82628 Mon Sep 17 00:00:00 2001 From: David Waern Date: Sat, 8 Dec 2007 16:24:27 +0000 Subject: Add ppLParendTypes/ppLParendType --- src/Haddock/Backends/Html.hs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/Haddock/Backends') 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 -- cgit v1.2.3