X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2FhsSyn%2FHsTypes.lhs;h=7d91a4233af1574fccd77335784dab183e2c1f23;hb=ed8c9b25a7e5e1e8fa54196f542b50812163759e;hp=04609c63d6a04d2877e513bc86b933d35624ad96;hpb=35b9d8e8a5d0e69cc756f21b7637a471e41a4fda;p=ghc-hetmet.git diff --git a/compiler/hsSyn/HsTypes.lhs b/compiler/hsSyn/HsTypes.lhs index 04609c6..7d91a42 100644 --- a/compiler/hsSyn/HsTypes.lhs +++ b/compiler/hsSyn/HsTypes.lhs @@ -376,8 +376,11 @@ ppr_mono_ty _ (HsParTy ty) -- But we still use the precedence stuff to add parens because -- toHsType doesn't put in any HsParTys, so we may still need them -ppr_mono_ty _ (HsDocTy ty doc) - = ppr ty <+> ppr (unLoc doc) +ppr_mono_ty ctxt_prec (HsDocTy ty doc) + = maybeParen ctxt_prec pREC_OP $ + ppr_mono_lty pREC_OP ty <+> ppr (unLoc doc) + -- we pretty print Haddock comments on types as if they were + -- postfix operators -------------------------- ppr_fun_ty :: (OutputableBndr name) => Int -> LHsType name -> LHsType name -> SDoc