clean up
This commit is contained in:
parent
5ca427f2d2
commit
0b37fd0de8
|
@ -428,8 +428,7 @@ let add_names_of_type decl acc =
|
||||||
let path_of_mty_alias = function
|
let path_of_mty_alias = function
|
||||||
| Mty_alias path -> path
|
| Mty_alias path -> path
|
||||||
| _ -> assert false
|
| _ -> assert false
|
||||||
#else
|
#elif OCAML_VERSION >= (4, 04, 0)
|
||||||
#if OCAML_VERSION >= (4, 04, 0)
|
|
||||||
let path_of_mty_alias = function
|
let path_of_mty_alias = function
|
||||||
| Mty_alias (_, path) -> path
|
| Mty_alias (_, path) -> path
|
||||||
| _ -> assert false
|
| _ -> assert false
|
||||||
|
@ -438,7 +437,6 @@ let path_of_mty_alias = function
|
||||||
| Mty_alias path -> path
|
| Mty_alias path -> path
|
||||||
| _ -> assert false
|
| _ -> assert false
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
let rec names_of_module_type = function
|
let rec names_of_module_type = function
|
||||||
| Mty_signature decls ->
|
| Mty_signature decls ->
|
||||||
|
@ -592,20 +590,16 @@ let list_global_names () =
|
||||||
#if OCAML_VERSION >= (4, 10, 0)
|
#if OCAML_VERSION >= (4, 10, 0)
|
||||||
| Env.Env_copy_types summary ->
|
| Env.Env_copy_types summary ->
|
||||||
loop acc summary
|
loop acc summary
|
||||||
#else
|
#elif OCAML_VERSION >= (4, 06, 0)
|
||||||
#if OCAML_VERSION >= (4, 06, 0)
|
|
||||||
| Env.Env_copy_types (summary, _) ->
|
| Env.Env_copy_types (summary, _) ->
|
||||||
loop acc summary
|
loop acc summary
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
#if OCAML_VERSION >= (4, 08, 0)
|
#if OCAML_VERSION >= (4, 08, 0)
|
||||||
| Env.Env_open(summary, path) ->
|
| Env.Env_open(summary, path) ->
|
||||||
|
#elif OCAML_VERSION >= (4, 07, 0)
|
||||||
|
| Env.Env_open(summary, _, path) ->
|
||||||
#else
|
#else
|
||||||
#if OCAML_VERSION >= (4, 07, 0)
|
| Env.Env_open(summary, path) ->
|
||||||
| Env.Env_open(summary, _, path) ->
|
|
||||||
#else
|
|
||||||
| Env.Env_open(summary, path) ->
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
match try Some (Path_map.find path !local_names_by_path) with Not_found -> None with
|
match try Some (Path_map.find path !local_names_by_path) with Not_found -> None with
|
||||||
| Some names ->
|
| Some names ->
|
||||||
|
@ -671,11 +665,9 @@ let list_global_fields () =
|
||||||
#if OCAML_VERSION >= (4, 10, 0)
|
#if OCAML_VERSION >= (4, 10, 0)
|
||||||
| Env.Env_copy_types summary ->
|
| Env.Env_copy_types summary ->
|
||||||
loop acc summary
|
loop acc summary
|
||||||
#else
|
#elif OCAML_VERSION >= (4, 06, 0)
|
||||||
#if OCAML_VERSION >= (4, 06, 0)
|
| Env.Env_copy_types (summary, _) ->
|
||||||
| Env.Env_copy_types (summary, _) ->
|
loop acc summary
|
||||||
loop acc summary
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
#if OCAML_VERSION >= (4, 07, 0)
|
#if OCAML_VERSION >= (4, 07, 0)
|
||||||
#if OCAML_VERSION >= (4, 08, 0)
|
#if OCAML_VERSION >= (4, 08, 0)
|
||||||
|
|
|
@ -485,15 +485,13 @@ let rewrite_rules = [
|
||||||
#if OCAML_VERSION >= (4, 10, 0)
|
#if OCAML_VERSION >= (4, 10, 0)
|
||||||
let lookup_type longident env =
|
let lookup_type longident env =
|
||||||
Env.find_type_by_name longident env
|
Env.find_type_by_name longident env
|
||||||
#else
|
#elif OCAML_VERSION >= (4, 04, 0)
|
||||||
#if OCAML_VERSION >= (4, 04, 0)
|
|
||||||
let lookup_type longident env =
|
let lookup_type longident env =
|
||||||
let path = Env.lookup_type longident env in
|
let path = Env.lookup_type longident env in
|
||||||
(path, Env.find_type path env)
|
(path, Env.find_type path env)
|
||||||
#else
|
#else
|
||||||
let lookup_type = Env.lookup_type
|
let lookup_type = Env.lookup_type
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
let rule_path rule =
|
let rule_path rule =
|
||||||
match rule.path_to_rewrite with
|
match rule.path_to_rewrite with
|
||||||
|
|
Loading…
Reference in New Issue