Dear Mukesh, The solution of your problem is probably: "update the library and all its dependencies to the latest version of ppxlib/ocaml-migrate-parsetree." Unfortunately, churn in the ppx ecosystem has been a problem since the beginning (though I believe some steps have been taken recently to mitigate this issue). For more specific help I encourage you to ask your question on Discuss https://discuss.ocaml.org/ (which I saw you have already done!). Cheers, Nicolas ________________________________ De : caml-list-request@inria.fr de la part de mukesh tiwari Envoyé : vendredi 14 janvier 2022 19:56 À : caml users Objet : [Caml-list] Type Error in OCaml Code CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. Hi everyone, 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 [1] https://github.com/mukeshtiwari/EncryptionSchulze/tree/master/code/Workingcode/ocaml-java [2] https://github.com/Julow/ocaml-java/