@@ -134,7 +134,10 @@ instance Pretty a => Pretty (Term1 a) where
134 pretty term =
134 pretty term =
135 case term of
135 case term of
136 App1 f x -> pretty f <+> pretty x
136 App1 f x -> pretty f <+> pretty x
137− Fun1 arg body -> pretty arg <+> P.text "->" <+> pretty body
137+ Fun1 arg body -> formattedArg <+> P.text "->" <+> pretty body
139+ prettyArg = pretty arg
140+ formattedArg = parensIf ("->" `List.isInfixOf` P.render prettyArg) prettyArg
138 Var1 x -> pretty x
141 Var1 x -> pretty x
139 EmptyRecord1 -> P.braces P.empty
142 EmptyRecord1 -> P.braces P.empty
140 Record1 fields ext ->
143 Record1 fields ext ->