ppxlib
ppxlib copied to clipboard
locations check fails for let+ operators
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.