Ppxlib 0.36.2
We're pleased to announce ppxlib
0.36.2, a maintenance release with two bug fixes related to OCaml 5.2 AST changes for type constraints in let bindings.
What's Fixed
Ast_builder compatibility: The value_binding
constructor now automatically handles the AST migration from OCaml 4.14 to 5.2, correctly generating pvb_constraint
fields when type constraints are present. This means PPX authors don't need to manually update their code for the new AST representation.
PPrintast output: Fixed pretty-printing of legacy Ppat_constraint
nodes with Ptyp_poly
to produce valid OCaml syntax, ensuring generated code remains compilable during the transition period.
Both fixes improve compatibility across OCaml compiler versions.
See full changelog
CHANGES:
- Make Ast_builder's default
value_binding
constructor generate the proper
pvb_constraint
from the pattern and expression arguments.
(#589, @NathanReb) - Fix pprintast to output correct syntax from
Ppat_constraint (pat, Ptyp_poly ...)
nodes until they are completely dropped. (#588, @NathanReb)