我正在尝试使用 js_of_ocaml构建这个程序。根据这个答案,我的makefile中有以下行
OCAMLC = ocamlfind ocamlc -package js_of_ocaml -package js_of_ocaml.syntax -syntax camlp4o -linkpkg -g -dtypes
但是,当我尝试构建时,出现以下错误:
ocamlfind ocamlc -package js_of_ocaml -package js_of_ocaml.syntax -syntax camlp4o -linkpkg -g -dtypes -c types.ml
> File "types.ml", line 472, characters 11-12:
> Parse error: [type_longident] expected after ")" (in [type_ident_and_parameters])
> File "types.ml", line 1:
该文件的违规行是这样的:
type ('t,'v) parser = ('t list -> 'v -> unit) -> 't list -> unit
我对 OCaml 还是很陌生,所以我不完全确定发生了什么。做什么的-syntax camlp4o
?我可能需要更改源中的哪些内容以与 js_of_ocaml 兼容?