From 884328596acddb59b80c0a029f05265f26bc669c Mon Sep 17 00:00:00 2001 From: Peter Zotov Date: Thu, 11 Dec 2014 23:25:12 +0300 Subject: [PATCH] Re-export Config.load_path as UTop.load_path This change helps to implement toplevel extensions that want to find files in the load path, e.g. for improved error messages. --- src/lib/uTop.cppo.ml | 6 ++++++ src/lib/uTop.mli | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/src/lib/uTop.cppo.ml b/src/lib/uTop.cppo.ml index a159c01..aafa0ab 100644 --- a/src/lib/uTop.cppo.ml +++ b/src/lib/uTop.cppo.ml @@ -732,6 +732,12 @@ let () = (* Make UTop accessible. *) Topdirs.dir_directory (Findlib.package_directory "utop") +(* +-----------------------------------------------------------------+ + | Compiler-libs re-exports | + +-----------------------------------------------------------------+ *) + +let load_path = Config.load_path + (* +-----------------------------------------------------------------+ | Deprecated | +-----------------------------------------------------------------+ *) diff --git a/src/lib/uTop.mli b/src/lib/uTop.mli index 816aa3f..cdd6411 100644 --- a/src/lib/uTop.mli +++ b/src/lib/uTop.mli @@ -303,6 +303,13 @@ val discard_formatters : Format.formatter list -> (unit -> 'a) -> 'a val split_words : string -> string list +(** {6 compiler-libs reexports} *) + +val load_path : string list ref + (** [load_path] is an alias of [Config.load_path], normally hidden in toplevel. + It contains the list of directories added by findlib-required packages + and [#directory] directives. *) + (**/**) (* These variables are not used and deprecated: *)