on master help sign in
Fix parenthesization of if ... then ... else ... in pprint
a604143David Raymond Christiansen
src/Idris/AbsSyntaxTree.hs+1−1
@@ -1580,7 +1580,7 @@ pprintPTerm ppo bnd docArgs infixes = prettySe startPrec bnd
1580 noNS _ = True
1580 noNS _ = True
1581
1581
1582 prettySe p bnd (PIfThenElse _ c t f) =
1582 prettySe p bnd (PIfThenElse _ c t f) =
1583− group . align . hang 2 . vsep $
1583+ bracket p funcAppPrec . group . align . hang 2 . vsep $
1584 [ kwd "if" <+> prettySe startPrec bnd c
1584 [ kwd "if" <+> prettySe startPrec bnd c
1585 , kwd "then" <+> prettySe startPrec bnd t
1585 , kwd "then" <+> prettySe startPrec bnd t
1586 , kwd "else" <+> prettySe startPrec bnd f
1586 , kwd "else" <+> prettySe startPrec bnd f