Skip to content

Pretty printer: ability requests in ability handler (and ability def'n) that are symboly are rendered incorrectlyΒ #5945

@kylegoetz

Description

@kylegoetz

Describe and demonstrate the bug

ability Test where
  (+) : Nat -> Nat -> Nat

Now add it

> update Test
> view Test

Screenshots
Screenshots of both viewing the ability definition and an ability handler. Observe <> is not wrapped in parens despite being in prefix position.

Image Image

Environment (please complete the following information):

  • ucm --version release/0.5.49'
  • OS/Architecture: macOS 15.5

I would suggest either rendering them in infix position or wrapping parens but keeping prefix.

The reason this is a problem is that when you edit the definition or the handler, the unaltered code is malformed when dropped into the scratch file because the symboly op is unwrapped but in prefix position.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions