Ticket #6060: 6060.patch

File 6060.patch, 1.2 KB (added by pcapriotti, 2 years ago)
  • compiler/hsSyn/HsExpr.lhs

    From 99692965f2845cda99d56c62365d61b21a457d25 Mon Sep 17 00:00:00 2001
    From: Paolo Capriotti <p.capriotti@gmail.com>
    Date: Mon, 30 Apr 2012 16:50:18 +0100
    Subject: [PATCH] Fix parallel comprehension pretty-printer (#6061)
    
    ---
     compiler/hsSyn/HsExpr.lhs |    5 +++--
     1 files changed, 3 insertions(+), 2 deletions(-)
    
    diff --git a/compiler/hsSyn/HsExpr.lhs b/compiler/hsSyn/HsExpr.lhs
    index 08d1281..d2b0159 100644
    a b pprStmt (LastStmt expr _) = ifPprDebug (ptext (sLit "[last]")) <+> ppr e 
    10901090pprStmt (BindStmt pat expr _ _)   = hsep [ppr pat, ptext (sLit "<-"), ppr expr] 
    10911091pprStmt (LetStmt binds)           = hsep [ptext (sLit "let"), pprBinds binds] 
    10921092pprStmt (ExprStmt expr _ _ _)     = ppr expr 
    1093 pprStmt (ParStmt stmtss _ _ _)    = hsep (map doStmts stmtss) 
    1094   where doStmts stmts = ptext (sLit "| ") <> ppr stmts 
     1093pprStmt (ParStmt stmtss _ _ _)    = hsep (punctuate separator (map doStmts stmtss)) 
     1094  where doStmts stmts = interpp'SP (fst stmts) 
     1095        separator = ptext (sLit " | ") 
    10951096 
    10961097pprStmt (TransStmt { trS_stmts = stmts, trS_by = by, trS_using = using, trS_form = form }) 
    10971098  = sep (ppr_lc_stmts stmts ++ [pprTransStmt by using form])