add get_load_path and set_load_path
This commit is contained in:
parent
97224e635f
commit
928bba9896
|
@ -811,6 +811,18 @@ let () =
|
||||||
(* Make UTop accessible. *)
|
(* Make UTop accessible. *)
|
||||||
Topdirs.dir_directory (Findlib.package_directory "utop")
|
Topdirs.dir_directory (Findlib.package_directory "utop")
|
||||||
|
|
||||||
|
(* +-----------------------------------------------------------------+
|
||||||
|
| Compiler-libs re-exports |
|
||||||
|
+-----------------------------------------------------------------+ *)
|
||||||
|
|
||||||
|
#if OCAML_VERSION >= (4, 08, 0)
|
||||||
|
let get_load_path ()= Load_path.get_paths ()
|
||||||
|
let set_load_path path= Load_path.init path
|
||||||
|
#else
|
||||||
|
let get_load_path ()= !Config.load_path
|
||||||
|
let set_load_path path= Config.load_path := path
|
||||||
|
#endif
|
||||||
|
|
||||||
(* +-----------------------------------------------------------------+
|
(* +-----------------------------------------------------------------+
|
||||||
| Deprecated |
|
| Deprecated |
|
||||||
+-----------------------------------------------------------------+ *)
|
+-----------------------------------------------------------------+ *)
|
||||||
|
|
|
@ -356,6 +356,15 @@ val discard_formatters : Format.formatter list -> (unit -> 'a) -> 'a
|
||||||
|
|
||||||
val split_words : string -> string list
|
val split_words : string -> string list
|
||||||
|
|
||||||
|
(** {6 compiler-libs reexports} *)
|
||||||
|
|
||||||
|
val get_load_path : unit -> string list
|
||||||
|
val set_load_path : string list -> unit
|
||||||
|
(** [get_load_path] is an alias of [Config.load_path], normally hidden in toplevel.
|
||||||
|
[get_load_path] and [set_load_path] manage the include directories.
|
||||||
|
|
||||||
|
The internal variable contains the list of directories added by findlib-required packages
|
||||||
|
and [#directory] directives. *)
|
||||||
(**/**)
|
(**/**)
|
||||||
|
|
||||||
(* These variables are not used and deprecated: *)
|
(* These variables are not used and deprecated: *)
|
||||||
|
|
Loading…
Reference in New Issue