Remove unneeded parenthesis from type printing #202
Labels
error reporting
For issues related to error message quality or the reporting of diagnostics in general
good first issue
An issue that doesn't require deep knowledge of the compiler to fix or implement
Currently while displaying types we show an unnecessary amount of parenthesis. This can be seen while printing error messages.
E.g.
examples/typechecking/completeness_checking.an
has the following as its last error message:Ideally we would display the following instead:
Or even the following since
,
is right-associative:The file to change for this issue would be
src/types/typeprinter.rs
. I imagine instead of always parenthesizing certain types we'll want to never do so on the type itself, and only parenthesize on certain argument positions. Either by checking the type variant or a check like!type_string.contains_spaces()
.The text was updated successfully, but these errors were encountered: