generated from tweag/project
-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
On pattern matching, OCaml is rather lenient on the parentheses because there are no grammar conflicts. So for instance if you have an x : int option option, you can write both:
match x with
| Some (Some y) -> y
| Some Some y -> yand they do the same thing and are perfectly valid. As a formatter, I think I would expect Topiary to choose and enforce one of those styles. I personally like the latter, but I think a formatter should choose the former as it will be much less surprising to a random developer. As of 5081cce (main as of writing this issue), Topiary does not choose and would format the given snippet as-is.
Metadata
Metadata
Assignees
Labels
No labels