From: simonpj@microsoft.com Date: Wed, 10 Oct 2007 09:30:58 +0000 (+0000) Subject: Improve pretty-printing for HsSyn X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=92e2b0900fd095957d18ac8a4020ce3342c7a69b;hp=27ebdb91ed6df61dbf680a87ccda40337bc811af;p=ghc-hetmet.git Improve pretty-printing for HsSyn --- 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