From cc78ccd940f113d70eff06d98b535db08501ffcb Mon Sep 17 00:00:00 2001 From: rhiannon morris Date: Mon, 6 Nov 2023 22:11:11 +0100 Subject: [PATCH] fix some parenthesisation --- lib/Quox/Syntax/Term/Pretty.idr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Quox/Syntax/Term/Pretty.idr b/lib/Quox/Syntax/Term/Pretty.idr index ae2b565..7b9f89e 100644 --- a/lib/Quox/Syntax/Term/Pretty.idr +++ b/lib/Quox/Syntax/Term/Pretty.idr @@ -431,7 +431,7 @@ prettyTerm dnames tnames (Eq (S _ (N ty)) l r _) = pure $ sep [l <++> !eqndD, r <++> !colonD, ty] prettyTerm dnames tnames (Eq ty l r _) = - parensIfM Arg =<< do + parensIfM App =<< do ty <- prettyTypeLine dnames tnames ty l <- withPrec Arg $ prettyTerm dnames tnames l r <- withPrec Arg $ prettyTerm dnames tnames r @@ -443,6 +443,7 @@ prettyTerm dnames tnames s@(DLam {}) = prettyTerm dnames tnames (NAT _) = natD prettyTerm dnames tnames (Nat n _) = hl Syntax $ pshow n prettyTerm dnames tnames (Succ p _) = + parensIfM App =<< prettyAppD !succD [!(withPrec Arg $ prettyTerm dnames tnames p)] prettyTerm dnames tnames (STRING _) = stringD