diff options
author | simonpj@microsoft.com <unknown> | 2010-09-15 07:02:55 +0000 |
---|---|---|
committer | simonpj@microsoft.com <unknown> | 2010-09-15 07:02:55 +0000 |
commit | 7998a24404ffa577a3c303e37e4cfe0baf846454 (patch) | |
tree | 9e6d69492d06be8234e93430ccbd8b30b2903f5a /compiler/hsSyn/HsExpr.lhs | |
parent | e95ee1f718c6915c478005aad8af81705357d6ab (diff) | |
download | haskell-7998a24404ffa577a3c303e37e4cfe0baf846454.tar.gz |
Improve HsSyn pretty printing
Diffstat (limited to 'compiler/hsSyn/HsExpr.lhs')
-rw-r--r-- | compiler/hsSyn/HsExpr.lhs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/hsSyn/HsExpr.lhs b/compiler/hsSyn/HsExpr.lhs index 245631d789..0d7dd719e7 100644 --- a/compiler/hsSyn/HsExpr.lhs +++ b/compiler/hsSyn/HsExpr.lhs @@ -748,16 +748,16 @@ pprFunBind fun inf matches = pprMatches (FunRhs fun inf) matches pprPatBind :: (OutputableBndr bndr, OutputableBndr id) => LPat bndr -> GRHSs id -> SDoc pprPatBind pat ty@(grhss) - = sep [ppr pat, nest 4 (pprGRHSs (PatBindRhs `asTypeOf` idType ty) grhss)] + = sep [ppr pat, nest 2 (pprGRHSs (PatBindRhs `asTypeOf` idType ty) grhss)] --avoid using PatternSignatures for stage1 code portability where idType :: GRHSs id -> HsMatchContext id; idType = undefined pprMatch :: (OutputableBndr idL, OutputableBndr idR) => HsMatchContext idL -> Match idR -> SDoc pprMatch ctxt (Match pats maybe_ty grhss) - = herald <+> sep [sep (map pprParendLPat other_pats), - ppr_maybe_ty, - nest 2 (pprGRHSs ctxt grhss)] + = sep [ sep (herald : map (nest 2 . pprParendLPat) other_pats) + , nest 2 ppr_maybe_ty + , nest 2 (pprGRHSs ctxt grhss) ] where (herald, other_pats) = case ctxt of |