I have already asked this question on OCaml mailing list, but so far there is no response and hence posting here.
My Coq project depends on a OCaml library [1] --the original library [2]-- which used to compile without any error in the past, but now it’s no more. If you run ‘make all’ in the ocaml-java directory, it throws an error ‘This expression has type Parsetree.pattern
but an expression was expected of type
Migrate_parsetree.Ast_406.Parsetree.pattern’
Could someone please tell me how to get rid of this error? (To me it seems like some code restructuring in ocaml-migrate-parsetree).
Best,
Mukesh
ocaml-java git:(master) ✗ make all
File “ppx/ast_tools.ml”, line 31, characters 36-55:
31 | let mk_let id expr = [%stri let [%p Pat.var (mk_loc id)] = [%e expr]]
^^^^^^^^^^^^^^^^^^^
Error: This expression has type Parsetree.pattern
but an expression was expected of type
Migrate_parsetree.Ast_406.Parsetree.pattern
make[1]: *** [bin/ppx/ast_tools.cmo] Error 2
make: *** [bin/ocaml-java-ppx] Error 2
It seems that the library isn’t compatible with ocaml >= 4.08. You need ocaml 4.07.1.
I’ll try to update the library during the week but it seems that you are using an older version. Maybe because you can’t use Dune in your build system ?
No, I don’t think I am using Dune build system. There is no problem for me to use Dune, except it may take quite some time that I don’t have at the moment. Also, at the moment, I am trying to take the path of least resistance but I should reorganise my code and use Dune build system.