X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FhsSyn%2FHsExpr.lhs;h=25ecbb11382e166ba5f6ab7dfa59b82a179df8f6;hb=44ba24dc84d271ca9bd5ab5060cb63ed87f585e3;hp=f7d7bda8137f3aa59bb885a673de0d4822f02971;hpb=edbfd324eec5773496119e12ef25e1ce3da1796d;p=ghc-hetmet.git diff --git a/compiler/hsSyn/HsExpr.lhs b/compiler/hsSyn/HsExpr.lhs index f7d7bda..25ecbb1 100644 --- a/compiler/hsSyn/HsExpr.lhs +++ b/compiler/hsSyn/HsExpr.lhs @@ -239,21 +239,6 @@ The renamer translates them into the Right Thing. Everything from here on appears only in typechecker output. \begin{code} - | TyLam -- TRANSLATION - [TyVar] - (LHsExpr id) - | TyApp -- TRANSLATION - (LHsExpr id) -- generated by Spec - [Type] - - -- DictLam and DictApp are "inverses" - | DictLam - [id] - (LHsExpr id) - | DictApp - (LHsExpr id) - [id] - | HsCoerce ExprCoFn -- TRANSLATION (HsExpr id) @@ -394,33 +379,8 @@ ppr_expr (EAsPat v e) = ppr v <> char '@' <> pprParendExpr e ppr_expr (HsSCC lbl expr) = sep [ ptext SLIT("_scc_") <+> doubleQuotes (ftext lbl), pprParendExpr expr ] -ppr_expr (TyLam tyvars expr) - = hang (hsep [ptext SLIT("/\\"), - hsep (map (pprBndr LambdaBind) tyvars), - ptext SLIT("->")]) - 4 (ppr_lexpr expr) - -ppr_expr (TyApp expr [ty]) - = hang (ppr_lexpr expr) 4 (pprParendType ty) - -ppr_expr (TyApp expr tys) - = hang (ppr_lexpr expr) - 4 (brackets (interpp'SP tys)) - -ppr_expr (DictLam dictvars expr) - = hang (hsep [ptext SLIT("\\{-dict-}"), - hsep (map (pprBndr LambdaBind) dictvars), - ptext SLIT("->")]) - 4 (ppr_lexpr expr) - -ppr_expr (DictApp expr [dname]) - = hang (ppr_lexpr expr) 4 (ppr dname) - -ppr_expr (DictApp expr dnames) - = hang (ppr_lexpr expr) - 4 (brackets (interpp'SP dnames)) - -ppr_expr (HsCoerce co_fn e) = ppr_expr e +ppr_expr (HsCoerce co_fn e) + = ppr_expr e <+> ptext SLIT("`cast`") <+> ppr co_fn ppr_expr (HsType id) = ppr id @@ -648,7 +608,7 @@ We know the list must have at least one @Match@ in it. \begin{code} pprMatches :: (OutputableBndr id) => HsMatchContext id -> MatchGroup id -> SDoc -pprMatches ctxt (MatchGroup matches _) = vcat (map (pprMatch ctxt) (map unLoc matches)) +pprMatches ctxt (MatchGroup matches ty) = (ppr ty) $$ vcat (map (pprMatch ctxt) (map unLoc matches)) -- Exported to HsBinds, which can't see the defn of HsMatchContext pprFunBind :: (OutputableBndr id) => id -> MatchGroup id -> SDoc