X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FhsSyn%2FHsTypes.lhs;fp=compiler%2FhsSyn%2FHsTypes.lhs;h=797a8f28eaec8d315ec74c8f51d05c356ef149ca;hp=d3f5ce8578b9925247e7d1abb1a22f587c2e5fef;hb=1e436f2bb208a6c990743afaf17b7c2a93c31742;hpb=c281c07544cc58afe68fdda96afe53ba46985732 diff --git a/compiler/hsSyn/HsTypes.lhs b/compiler/hsSyn/HsTypes.lhs index d3f5ce8..797a8f2 100644 --- a/compiler/hsSyn/HsTypes.lhs +++ b/compiler/hsSyn/HsTypes.lhs @@ -159,6 +159,9 @@ data HsType name | HsDocTy (LHsType name) LHsDocString -- A documented type + | HsSpliceTyOut Kind -- Used just like KindedTyVar, just between + -- kcHsType and dsHsType + | HsBangTy HsBang (LHsType name) -- Bang-style type annotations | HsRecTy [ConDeclField name] -- Only in data type declarations @@ -369,17 +372,18 @@ ppr_mono_ty ctxt_prec (HsForAllTy exp tvs ctxt ty) = maybeParen ctxt_prec pREC_FUN $ sep [pprHsForAll exp tvs ctxt, ppr_mono_lty pREC_TOP ty] -ppr_mono_ty _ (HsBangTy b ty) = ppr b <> ppr ty -ppr_mono_ty _ (HsRecTy flds) = pprConDeclFields flds -ppr_mono_ty _ (HsTyVar name) = ppr name -ppr_mono_ty ctxt_prec (HsFunTy ty1 ty2) = ppr_fun_ty ctxt_prec ty1 ty2 -ppr_mono_ty _ (HsTupleTy con tys) = tupleParens con (interpp'SP tys) -ppr_mono_ty _ (HsKindSig ty kind) = parens (ppr_mono_lty pREC_TOP ty <+> dcolon <+> pprKind kind) -ppr_mono_ty _ (HsListTy ty) = brackets (ppr_mono_lty pREC_TOP ty) -ppr_mono_ty _ (HsPArrTy ty) = pabrackets (ppr_mono_lty pREC_TOP ty) -ppr_mono_ty _ (HsPredTy pred) = ppr pred -ppr_mono_ty _ (HsNumTy n) = integer n -- generics only -ppr_mono_ty _ (HsSpliceTy s) = pprSplice s +ppr_mono_ty _ (HsBangTy b ty) = ppr b <> ppr ty +ppr_mono_ty _ (HsRecTy flds) = pprConDeclFields flds +ppr_mono_ty _ (HsTyVar name) = ppr name +ppr_mono_ty prec (HsFunTy ty1 ty2) = ppr_fun_ty prec ty1 ty2 +ppr_mono_ty _ (HsTupleTy con tys) = tupleParens con (interpp'SP tys) +ppr_mono_ty _ (HsKindSig ty kind) = parens (ppr_mono_lty pREC_TOP ty <+> dcolon <+> pprKind kind) +ppr_mono_ty _ (HsListTy ty) = brackets (ppr_mono_lty pREC_TOP ty) +ppr_mono_ty _ (HsPArrTy ty) = pabrackets (ppr_mono_lty pREC_TOP ty) +ppr_mono_ty _ (HsPredTy pred) = ppr pred +ppr_mono_ty _ (HsNumTy n) = integer n -- generics only +ppr_mono_ty _ (HsSpliceTy s) = pprSplice s +ppr_mono_ty _ (HsSpliceTyOut k) = text "" <> dcolon <> ppr k ppr_mono_ty ctxt_prec (HsAppTy fun_ty arg_ty) = maybeParen ctxt_prec pREC_CON $