-
Notifications
You must be signed in to change notification settings - Fork 103
Fix Ast_builder's value_binding to generate the correct pvb_constraint
#589
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 Ast_builder's value_binding to generate the correct pvb_constraint
#589
Conversation
Signed-off-by: Nathan Rebours <[email protected]>
Signed-off-by: Nathan Rebours <[email protected]>
|
I couldn't figure out a proper test for the coercion case and I suspect the logic to convert coercion expression is faulty or at the very least too restrictive. I'm marking this as ready for review as I don't have a lot of time to spend on ppxlib atm and would still like to be able to release 0.36.2 and 0.37 shortly. I'll open an issue regarding the conversion to the coercion constraint! |
e516f47 to
c5ec60f
Compare
|
Actually I just need to factor out the code between the migration and Ast_builder so that they share the |
Signed-off-by: Nathan Rebours <[email protected]>
c5ec60f to
300f724
Compare
|
Nevermind, it can't easily be shared as they're manipulating different types. It's probably not worth investing too much time on functorizing this just to share that bit of code. This is ready for review if anyone has spare cycles. I'll fix the coercion case later on as this would already be very valuable to release. |
Signed-off-by: Nathan Rebours <[email protected]>
5c44b95 to
8bb5ce1
Compare
Signed-off-by: Nathan Rebours <[email protected]>
Signed-off-by: Nathan Rebours <[email protected]>
8bb5ce1 to
6ac0849
Compare
CHANGES: - Make Ast_builder's default `value_binding` constructor generate the proper `pvb_constraint` from the pattern and expression arguments. (ocaml-ppx/ppxlib#589, @NathanReb) - Fix pprintast to output correct syntax from `Ppat_constraint (pat, Ptyp_poly ...)` nodes until they are completely dropped. (ocaml-ppx/ppxlib#588, @NathanReb)
CHANGES: - Make Ast_builder's default `value_binding` constructor generate the proper `pvb_constraint` from the pattern and expression arguments. (ocaml-ppx/ppxlib#589, @NathanReb) - Fix pprintast to output correct syntax from `Ppat_constraint (pat, Ptyp_poly ...)` nodes until they are completely dropped. (ocaml-ppx/ppxlib#588, @NathanReb)
CHANGES: - Make Ast_builder's default `value_binding` constructor generate the proper `pvb_constraint` from the pattern and expression arguments. (ocaml-ppx/ppxlib#589, @NathanReb) - Fix pprintast to output correct syntax from `Ppat_constraint (pat, Ptyp_poly ...)` nodes until they are completely dropped. (ocaml-ppx/ppxlib#588, @NathanReb)
I'd like to add some basic tests for this before we merge but it's basically a copy of the code that's handling the same conversion in the 5.0 -> 5.1 migration.