Closed peblair closed 4 years ago
Yes, actually we have been thinking about doing this for a while but never took the time to implement it.
We've made this change, and the next opam release should support the @sexp.opaque
attribute: see the v0.13-preview.120.28+212 readme
🙏 Super! Thanks!
Looks like this can be closed?
Ah, yes, this is available in OPAM now, so I'm closing this issue. Thanks for the suggestion!
sexp_opaque
is useful for omitting certain fields from a serialized output, but leads to some unintended interactions with other ppx libraries. For example, consider the following:Leads to the following compilation error:
Unfortunately, there is no real way to write
sexp_opaque_to_json
. Consider the following (proposed) example instead:This would allow things to at least compile. Would you consider adding such a feature?