tweag / topiary

https://topiary.tweag.io/
MIT License
575 stars 29 forks source link

missing space for pattern matching of constructor holding record #719

Closed jonsterling closed 2 months ago

jonsterling commented 3 months ago

Describe the bug Constructors with a single record arguments are formatted without a space. This seems to be related to https://github.com/tweag/topiary/issues/647.

To Reproduce Try to format the following code:

match foo with
| Object { self; methods } ->
  hello

Topiary returns:

match foo with
| Object{ self; methods } ->
  hello

Expected behavior

The example code should remain unchanged. A constructor should always have a space between it and its arguments.

Environment

jonsterling commented 3 months ago

I think I see how to fix this, will send a patch.