You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
include (
structmoduleM=structtypet = Ojs.tletrec (t_of_js: Ojs.t -> t) =funx2 -> x2
and (t_to_js : t -> Ojs.t) =funx1 -> x1
end
end :
sigmoduleM : sigtypetendend )
One has to include the conversion functions t_of_js and t_to_js manually on the signature, which is quite tedious. Maybe gen_js_api could include them as well there?
The text was updated successfully, but these errors were encountered:
Yes I known it's tedious but currently [%js: ] behaves like the standalone tool; it does not rewrite the signature at all (ie. interfaces are not preprocessed: you could compile the .mli without preprocessing it and it should be a valid interface for the generated structure).
This design decision was taken a long time ago because it was convenient to integrate with ancient build systems.
With the advent of dune this maybe its time to change that (in particular, this may be needed to support ppxlib).
We could do a quick fix for the [%js: extension] but I prefer to wait at least for the ppxlib integration to take a decision.
Input (
.ml
file):Generates (simplified):
One has to include the conversion functions
t_of_js
andt_to_js
manually on the signature, which is quite tedious. Maybe gen_js_api could include them as well there?The text was updated successfully, but these errors were encountered: