From 92e2b0900fd095957d18ac8a4020ce3342c7a69b Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Wed, 10 Oct 2007 09:30:58 +0000 Subject: [PATCH] Improve pretty-printing for HsSyn --- compiler/hsSyn/HsBinds.lhs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/hsSyn/HsBinds.lhs b/compiler/hsSyn/HsBinds.lhs index a32014f..e40272e 100644 --- a/compiler/hsSyn/HsBinds.lhs +++ b/compiler/hsSyn/HsBinds.lhs @@ -341,11 +341,11 @@ instance Outputable HsWrapper where pprHsWrapper :: SDoc -> HsWrapper -> SDoc pprHsWrapper it WpHole = it pprHsWrapper it (WpCompose f1 f2) = pprHsWrapper (pprHsWrapper it f2) f1 -pprHsWrapper it (WpCo co) = it <+> ptext SLIT("`cast`") <+> pprParendType co -pprHsWrapper it (WpApp id) = it <+> ppr id -pprHsWrapper it (WpTyApp ty) = it <+> ptext SLIT("@") <+> pprParendType ty -pprHsWrapper it (WpLam id) = ptext SLIT("\\") <> pprBndr LambdaBind id <> dot <+> it -pprHsWrapper it (WpTyLam tv) = ptext SLIT("/\\") <> pprBndr LambdaBind tv <> dot <+> it +pprHsWrapper it (WpCo co) = sep [it, nest 2 (ptext SLIT("`cast`") <+> pprParendType co)] +pprHsWrapper it (WpApp id) = sep [it, nest 2 (ppr id)] +pprHsWrapper it (WpTyApp ty) = sep [it, ptext SLIT("@") <+> pprParendType ty] +pprHsWrapper it (WpLam id) = sep [ptext SLIT("\\") <> pprBndr LambdaBind id <> dot, it] +pprHsWrapper it (WpTyLam tv) = sep [ptext SLIT("/\\") <> pprBndr LambdaBind tv <> dot, it] pprHsWrapper it (WpLet binds) = sep [ptext SLIT("let") <+> braces (ppr binds), it] (<.>) :: HsWrapper -> HsWrapper -> HsWrapper -- 1.7.10.4