X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FPprTyThing.hs;h=51144ecda034c7b2c66e3f216924ac8eecef5ff2;hb=90dc9026b091be5cca5da4c6cbd3713ecc493361;hp=4d7fd8ec52fb97d6e789a348a4719688bb690070;hpb=e8a591c1a3dbdeccec2dd2aacccd7435004b0d51;p=ghc-hetmet.git diff --git a/compiler/main/PprTyThing.hs b/compiler/main/PprTyThing.hs index 4d7fd8e..51144ec 100644 --- a/compiler/main/PprTyThing.hs +++ b/compiler/main/PprTyThing.hs @@ -139,13 +139,12 @@ pprDataCon exts dataCon = pprAlgTyCon exts tyCon (== dataCon) (const True) where tyCon = GHC.dataConTyCon dataCon pprDataConDecl exts gadt_style show_label dataCon - = error "kevind stub" -{- | not gadt_style = ppr_fields tys_w_strs | otherwise = ppr_bndr dataCon <+> dcolon <+> sep [ ppr_tvs, GHC.pprThetaArrow theta, pp_tau ] where - (tyvars, theta, argTypes, tyCon) = GHC.dataConSig dataCon + (tyvars, theta, argTypes) = GHC.dataConSig dataCon + tyCon = GHC.dataConTyCon dataCon labels = GHC.dataConFieldLabels dataCon res_tys = dataConResTys dataCon qualVars = filter (flip notElem (GHC.tyConTyVars tyCon)) tyvars @@ -159,7 +158,7 @@ pprDataConDecl exts gadt_style show_label dataCon -- printing out the dataCon as a type signature, in GADT style pp_tau = foldr add pp_res_ty tys_w_strs - pp_res_ty = ppr_bndr tyCon <+> hsep (map GHC.pprParendType res_tys) + pp_res_ty = GHC.pprTypeApp (ppr_bndr tyCon) res_tys add (str,ty) pp_ty = pprBangTy str ty <+> arrow <+> pp_ty pprParendBangTy (strict,ty) @@ -184,7 +183,7 @@ pprDataConDecl exts gadt_style show_label dataCon = ppr_bndr dataCon <+> braces (sep (punctuate comma (ppr_trim maybe_show_label (zip labels fields)))) --} + pprClass exts cls | null methods = pprClassHdr exts cls