effekt-lang / effekt

A language with lexical effect handlers and lightweight effect polymorphism
https://effekt-lang.org
MIT License
334 stars 24 forks source link

Missing parentheses in a pretty-printed type #659

Open jiribenes opened 3 weeks ago

jiribenes commented 3 weeks ago

The suggested type (Int => Exception at {exc} at {io} / {}) cannot be annotated, one can only write the parenthesised version: (Int => Exception at {exc}) at {io}.

Screenshot 2024-10-31 at 15 28 32

Relevant code

Parser

https://github.com/effekt-lang/effekt/blob/6e71bcd59bf419f2ba5923d9eca519b87d3804b5/effekt/shared/src/main/scala/effekt/RecursiveDescent.scala#L1080

Pretty printer

https://github.com/effekt-lang/effekt/blob/6e71bcd59bf419f2ba5923d9eca519b87d3804b5/effekt/shared/src/main/scala/effekt/symbols/TypePrinter.scala#L53