-
Notifications
You must be signed in to change notification settings - Fork 198
Ppx deriving #364
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
Ppx deriving #364
Conversation
|
Please add your tests directly in the repo. cc @whitequark it may interest you :) |
lib/ppx/ppx_deriving_json.ml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to differentiate between { x } and { x; _ }. The former has an exhaustiveness warning, turned off by default.
|
LGTM, but camlp4 is not writhing enough in fiery hell |
5883be1 to
eacbbf4
Compare
eacbbf4 to
060954a
Compare
50ae0e2 to
effcc44
Compare
|
Any update on this ? |
- Temporarily copy from ocaml-ppx/ppx_deriving@e2079fa - Apply consistently
- Remove broken function-from-attribute extraction - Do not produce empty value bindings
- Proper printing/parsing of 0-argument constructors - Define and use helper functions - Use Ast_convenience more
ffa1ea0 to
d323e5a
Compare
|
@hhugo, the latest commits fix omissions discovered while testing in conjunction with Eliom PPX. I guess nobody has felt the urge to merge this, but it should be merge-able. |
|
Can someone fix the code to remove the following warnings |
|
I will fix this ASAP. |
This is a PPX version of our JSON deriving plug-in.
The generated code is somewhat different from the Camlp4 version. We follow the conventions of
ppx_deriving, as opposed to the functorial style of (Camlp4)deriving.The serialization format is the same, i.e., in principle you can dump
xwith Camlp4, parse the result with PPX, and get backx. Any divergence is a bug to be fixed.I provide a few tests that demonstrate the syntax as a Gist.