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
Just a quick question - I'm trying to do bindings for Promise and I'm having trouble in setting up parametrisation - starting out with the notes in TYPES.md:
type 'a t
val t_to_js: ('a -> Ojs.t) -> 'a t -> Ojs.t
val t_of_js: (Ojs.t -> 'a) -> Ojs.t -> 'a t
I then compile with:
ocamlfind gen_js_api/gen_js_api js_promise.mli
and get:
File "js_promise.mli", line 3, characters 23-25:
Error: Cannot parse type
It seems that it doesn't like the 'a. Is there a work-around for this?
The text was updated successfully, but these errors were encountered:
Duh - of course it works - just noticed the $(OCAMLC) -c -I $(OJSDIR) -ppx "$(GENJSAPI) -ppx" main.ml in the makefile - I'm holding my head in shame - apologies for the unnecessary issue
I have the same question about parametrized types.
When I try to generate *.ml file from *.mli with
ocamlfind gen_js_api/gen_js_api test.mli`
I get
Error: Cannot parse type
As I am new to gen_js_api, I didn't understand how it can be solved. As I understood, @nickbetteridge 's solution describes compilation of .ml file, but I am interested in using parametrized types in an .mli file. Is it possible?
Just a quick question - I'm trying to do bindings for Promise and I'm having trouble in setting up parametrisation - starting out with the notes in TYPES.md:
I then compile with:
and get:
It seems that it doesn't like the
'a
. Is there a work-around for this?The text was updated successfully, but these errors were encountered: