add missing parens in pretty printer

This commit is contained in:
rhiannon morris 2023-08-12 10:24:59 +02:00
parent c6006682ca
commit 00d92d3f25

View file

@ -426,13 +426,15 @@ prettyTerm dnames tnames (Enum cases _) =
prettyTerm dnames tnames (Tag tag _) = prettyTerm dnames tnames (Tag tag _) =
prettyTag tag prettyTag tag
prettyTerm dnames tnames (Eq (S _ (N ty)) l r _) = do prettyTerm dnames tnames (Eq (S _ (N ty)) l r _) =
parensIfM Eq =<< do
l <- withPrec InEq $ prettyTerm dnames tnames l l <- withPrec InEq $ prettyTerm dnames tnames l
r <- withPrec InEq $ prettyTerm dnames tnames r r <- withPrec InEq $ prettyTerm dnames tnames r
ty <- withPrec InEq $ prettyTerm dnames tnames ty ty <- withPrec InEq $ prettyTerm dnames tnames ty
pure $ sep [l <++> !eqndD, r <++> !colonD, ty] pure $ sep [l <++> !eqndD, r <++> !colonD, ty]
prettyTerm dnames tnames (Eq ty l r _) = do prettyTerm dnames tnames (Eq ty l r _) =
parensIfM Arg =<< do
ty <- prettyTypeLine dnames tnames ty ty <- prettyTypeLine dnames tnames ty
l <- withPrec Arg $ prettyTerm dnames tnames l l <- withPrec Arg $ prettyTerm dnames tnames l
r <- withPrec Arg $ prettyTerm dnames tnames r r <- withPrec Arg $ prettyTerm dnames tnames r