Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix printing of (local_ x) |> f and some related forms #83

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

ccasin
Copy link

@ccasin ccasin commented Aug 6, 2024

This fixes an issue where:

let _ = (local_ x) |> f

was being printed as

let _ = local_ x |> f

which is a different thing, triggering the round trip check. I fixed this by adding a parenthesization rule for the lhs of infix operators - an alternative would be to add logic in the printing of infix operators, but since that is split out into several cases this felt cleaner.

This also fixes (and adds tests for) exclave_ in the same position. That is nonsense, but ocamlformat shouldn't blow up on it.

@ccasin ccasin requested a review from dvulakh August 6, 2024 15:40
@ccasin ccasin merged commit 80da082 into janestreet:jane Aug 6, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants