-
Notifications
You must be signed in to change notification settings - Fork 180
Prepare for 5.2 AST bump #1033
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
base: master
Are you sure you want to change the base?
Prepare for 5.2 AST bump #1033
Conversation
I've tested after
The only issue is that ppxlib.0.36.0 is incompatible with ppx_let (which is used in tests, to make sure that lwt exports the values that ppx_let needs). Ultimately, the ppx_let test could be run in a different, separate environment. It's a test of lwt only. But this is a bit difficult to do from a purely technical pov… Maybe we can wait until ppx_let releases a version compatible with ppxlib.36.0 |
PR for ppx_let janestreet/ppx_let#16 (which also needs the PR to ppxlib_jane janestreet/ppxlib_jane#5). Hopefully these get reviewed/merged promptly and we can get a release of the library. |
Now that the janestreet packages have been updated and merged into opam-repository, could this PR be looked at again? |
We have to send a patch to |
I'm taking a look at bisect_ppx today |
Is bisect_ppx really necessary to merge this? I really don't think such CI tool should block the release of such a key ecosystem package. |
Ref: #1063 |
Signed-off-by: Sora Morimoto <[email protected]>
This PR is a patch for an upcoming release of ppxlib where the internal AST is bumped from 4.14 to 5.2. Until that is merged and released, there is no reason to merge this PR.
To test these changes, you can use the following opam-based workflow. I've made releases of most of these patches to an opam-repository overlay.
The following describes the most notable changes to the AST.
Note: no update has been made of the
opam
file, butppxlib
will likely need a lower-bound before merging/releasing.Functions
Currently
In the parsetree currently, functions like:
Are represented roughly as
Functions like:
Are represented roughly as
Since 5.2
All of these functions now map to a single AST node
Pexp_function
(note, this is the same name as the old cases function). The first argument is a list of parameters meaning:Now looks like:
Pexp_function([x; y; z], _constraint, body)
And the
body
is where we can either have more expressions (Pfunction_body _
) or cases (Pfunction_cases _
). That means:Has an empty list of parameters:
Local Module Opens for Types
Another feature added in 5.2 was the ability to locally open modules in type definitions.
This has a
Ptyp_open (module_identifier, core_type)
AST node. Just like normal module opens this does create some syntactic ambiguity about where things come from inside the parentheses.