Input (.ml file):
include [%js:
module M: sig
type t
end
]
Generates (simplified):
include (
struct
module M = struct
type t = Ojs.t
let rec (t_of_js : Ojs.t -> t) = fun x2 -> x2
and (t_to_js : t -> Ojs.t) = fun x1 -> x1
end
end :
sig
module M : sig
type t
end
end )
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?