OCaml 5.1 support
This commit is contained in:
parent
4eba6f132b
commit
846af28b3c
|
@ -130,3 +130,12 @@ let iter_structure expr =
|
||||||
end) in
|
end) in
|
||||||
Search.iter_structure
|
Search.iter_structure
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
(** Returns whether the given path is persistent. *)
|
||||||
|
let rec is_persistent_path = function
|
||||||
|
| Path.Pident id -> Ident.persistent id
|
||||||
|
| Path.Pdot (p, _) -> is_persistent_path p
|
||||||
|
| Path.Papply (_, p) -> is_persistent_path p
|
||||||
|
#if OCAML_VERSION >= (5, 1, 0)
|
||||||
|
| Path.Pextra_ty (p, _) -> is_persistent_path p
|
||||||
|
#endif
|
||||||
|
|
|
@ -634,12 +634,6 @@ let rule_path rule =
|
||||||
with _ ->
|
with _ ->
|
||||||
None
|
None
|
||||||
|
|
||||||
(* Returns whether the given path is persistent. *)
|
|
||||||
let rec is_persistent_path = function
|
|
||||||
| Path.Pident id -> Ident.persistent id
|
|
||||||
| Path.Pdot (p, _) -> is_persistent_path p
|
|
||||||
| Path.Papply (_, p) -> is_persistent_path p
|
|
||||||
|
|
||||||
(* Check that the given long identifier is present in the environment
|
(* Check that the given long identifier is present in the environment
|
||||||
and is persistent. *)
|
and is persistent. *)
|
||||||
let is_persistent_in_env longident =
|
let is_persistent_in_env longident =
|
||||||
|
@ -1512,7 +1506,7 @@ let protocol_version = 1
|
||||||
|
|
||||||
let main_aux ~initial_env =
|
let main_aux ~initial_env =
|
||||||
Arg.parse args file_argument usage;
|
Arg.parse args file_argument usage;
|
||||||
#if OCAML_VERSION >= (5, 0, 0)
|
#if OCAML_VERSION >= (5, 0, 0) && OCAML_VERSION < (5, 1, 0)
|
||||||
Topcommon.load_topdirs_signature ();
|
Topcommon.load_topdirs_signature ();
|
||||||
#endif
|
#endif
|
||||||
if not (prepare ()) then exit 2;
|
if not (prepare ()) then exit 2;
|
||||||
|
|
Loading…
Reference in New Issue