Commit 2ec5498e authored by simonpj's avatar simonpj
Browse files

[project @ 2005-01-27 15:53:08 by simonpj]

Remove redundant parens in pretty print
parent dd08967f
...@@ -21,9 +21,6 @@ import CostCentre ( pprCostCentreCore ) ...@@ -21,9 +21,6 @@ import CostCentre ( pprCostCentreCore )
import Var ( Var ) import Var ( Var )
import Id ( Id, idType, isDataConWorkId_maybe, idLBVarInfo, idArity, import Id ( Id, idType, isDataConWorkId_maybe, idLBVarInfo, idArity,
idInfo, idInlinePragma, idOccInfo, idInfo, idInlinePragma, idOccInfo,
#ifdef OLD_STRICTNESS
idDemandInfo,
#endif
globalIdDetails, isGlobalId, isExportedId, globalIdDetails, isGlobalId, isExportedId,
isSpecPragmaId, idNewDemandInfo isSpecPragmaId, idNewDemandInfo
) )
...@@ -33,11 +30,13 @@ import IdInfo ( IdInfo, megaSeqIdInfo, ...@@ -33,11 +30,13 @@ import IdInfo ( IdInfo, megaSeqIdInfo,
specInfo, pprNewStrictness, specInfo, pprNewStrictness,
workerInfo, ppWorkerInfo, workerInfo, ppWorkerInfo,
newStrictnessInfo, cafInfo, ppCafInfo, newStrictnessInfo, cafInfo, ppCafInfo,
)
#ifdef OLD_STRICTNESS #ifdef OLD_STRICTNESS
cprInfo, ppCprInfo, import Id ( idDemandInfo )
strictnessInfo, ppStrictnessInfo, import IdInfo ( cprInfo, ppCprInfo, strictnessInfo, ppStrictnessInfo )
#endif #endif
)
import DataCon ( dataConTyCon ) import DataCon ( dataConTyCon )
import TyCon ( tupleTyConBoxity, isTupleTyCon ) import TyCon ( tupleTyConBoxity, isTupleTyCon )
import Type ( pprParendType, pprType, pprParendKind ) import Type ( pprParendType, pprType, pprParendKind )
...@@ -155,7 +154,7 @@ ppr_expr add_par expr@(App fun arg) ...@@ -155,7 +154,7 @@ ppr_expr add_par expr@(App fun arg)
ppr_expr add_par (Case expr var ty [(con,args,rhs)]) ppr_expr add_par (Case expr var ty [(con,args,rhs)])
= add_par $ = add_par $
sep [sep [ptext SLIT("case") <+> parens (ppr ty) <+> pprCoreExpr expr, sep [sep [ptext SLIT("case") <+> pprParendType ty <+> pprCoreExpr expr,
hsep [ptext SLIT("of"), hsep [ptext SLIT("of"),
ppr_bndr var, ppr_bndr var,
char '{', char '{',
...@@ -169,7 +168,7 @@ ppr_expr add_par (Case expr var ty [(con,args,rhs)]) ...@@ -169,7 +168,7 @@ ppr_expr add_par (Case expr var ty [(con,args,rhs)])
ppr_expr add_par (Case expr var ty alts) ppr_expr add_par (Case expr var ty alts)
= add_par $ = add_par $
sep [sep [ptext SLIT("case") <+> parens (ppr ty) <+> pprCoreExpr expr, sep [sep [ptext SLIT("case") <+> pprParendType ty <+> pprCoreExpr expr,
ptext SLIT("of") <+> ppr_bndr var <+> char '{'], ptext SLIT("of") <+> ppr_bndr var <+> char '{'],
nest 2 (sep (punctuate semi (map pprCoreAlt alts))), nest 2 (sep (punctuate semi (map pprCoreAlt alts))),
char '}' char '}'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment