I'm very new to OCaml and I need to build some project from the following https://github.com/janestreet/core_kernel.git.
I try to compile the following source code, which named setup.ml
(* OASIS_START *)
open OASISDynRun;;
open OASISTypes;;
(* OASIS_STOP *)
let () =
InternalInstallPlugin.lib_hook :=
fun (cs, bs, lib) ->
match lib.OASISTypes.lib_findlib_name with
| Some "core_kernel" ->
(cs, bs, lib, [])
| _ ->
(cs, bs, lib, [])
;;
let () = setup ()
With following command
ocamlfind ocamlopt -o $@ -linkpkg -package ocamlbuild,oasis.dynrun setup_dev.ml || ocamlfind ocamlc -o $@ -linkpkg -package ocamlbuild,oasis.dynrun setup_dev.ml || true
Here is the error message.
File "setup_dev.ml", line 8, characters 8-21:
Error: This pattern matches values of type 'a * 'b * 'c
but a pattern was expected which matches values of type
OASISTypes.common_section * OASISTypes.build_section *
OASISTypes.library * OASISTypes.unix_dirname option
File "setup_dev.ml", line 8, characters 8-21:
Error: This pattern matches values of type 'a * 'b * 'c
but a pattern was expected which matches values of type
OASISTypes.common_section * OASISTypes.build_section *
OASISTypes.library * OASISTypes.unix_dirname option
If you need to take a look at _oasis
file, please let me know.
The reason why I use OASIS is that I need to use old version compiler (4.02.0), worrying that some deprecated syntax makes trouble.
Thanks.