In the latest ocamlformat, there is a “shortcut” formatting for for begin end:
begin match ... with
| ... -> ...
end
instead of
begin
match ... with
| ... -> ...
end
That was a clear improvement, but it overwritten when there is a nested match - beginend - match:
match ... with
| ... -> begin
match ... with
| ...
end
Do you think this should get changed to use the shortcut syntax when it can :
match ... with
| ... ->
begin match ... with
| ...
end
Its also going to after other “shortcut” nodes, like begin function and others.
I think this is better, and I have opened a PR for it, but this its going to create diffs in the projects of users, we wanted to get everyone’s opinion.
- Yes, its a good change
- No, current formatting is better
- I don’t care either way