diff --git a/bin/melc.ml b/bin/melc.ml index d011f64f4..72029367d 100644 --- a/bin/melc.ml +++ b/bin/melc.ml @@ -279,8 +279,12 @@ let main: Melc_cli.t -> _ Cmdliner.Term.ret (* The OCaml compiler expects include_dirs in reverse CLI order, but cmdliner returns it in CLI order. *) List.rev_append include_dirs !Clflags.include_dirs; +#if OCAML_VERSION >= (5,2,0) Clflags.hidden_include_dirs := List.rev_append hidden_include_dirs !Clflags.hidden_include_dirs; +#else + let _hidden_include_dirs = hidden_include_dirs in +#endif List.iter ~f:Warnings.parse_alert_option alerts; diff --git a/jscomp/core/record_attributes_check.cppo.ml b/jscomp/core/record_attributes_check.cppo.ml index 88b5e1588..a38e5ca83 100644 --- a/jscomp/core/record_attributes_check.cppo.ml +++ b/jscomp/core/record_attributes_check.cppo.ml @@ -52,7 +52,13 @@ let process_tag_name attrs = }; ] -> ( namespace_error ~loc txt; - match const.pconst_desc with + match +#if OCAML_VERSION >= (5, 3, 0) + const.pconst_desc +#else + const +#endif + with | Pconst_string (s, _, _) -> st := Some s | _ -> ()) | _ -> ()); diff --git a/nix/shell.nix b/nix/shell.nix index e0c5341d6..1745d4983 100644 --- a/nix/shell.nix +++ b/nix/shell.nix @@ -10,7 +10,6 @@ , git , python3 , nodePackages -, pkgs , release-mode ? false }: @@ -21,7 +20,7 @@ in mkShell { inputsFrom = lib.attrValues derivations; nativeBuildInputs = with ocamlPackages; [ - pkgs.ocaml-ng.ocamlPackages_5_2.ocamlformat + ocamlformat utop ocaml-lsp merlin