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

locations check fails for let+ operators #347

Open
ceastlund opened this issue Jun 10, 2022 · 0 comments
Open

locations check fails for let+ operators #347

ceastlund opened this issue Jun 10, 2022 · 0 comments

Comments

@ceastlund
Copy link
Collaborator

Apparently the ocaml parser gives the body of a let+ the same location as the whole let+ expression. This makes the locations check in ppxlib fail for any ppx that returns a let+ expression that was part of the user's code in the first place.

Example using ppx_let:

let () = let%bind () = () in let+ () = () in ()

This complains about the final body () overlapping with the let+ because the expansion of %bind included that code, even though it was part of the source code to begin with. The set of exceptions for the locations check needs to be extended to include this.

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

No branches or pull requests

1 participant