aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/envars.ml6
-rw-r--r--lib/envars.mli3
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/envars.ml b/lib/envars.ml
index efb2d3fa46..a05029c95b 100644
--- a/lib/envars.ml
+++ b/lib/envars.ml
@@ -35,6 +35,12 @@ let path_to_list p =
let sep = if Sys.os_type = "Win32" then ';' else ':' in
Util.split_string_at sep p
+let coqpath () =
+ try
+ let path = Sys.getenv "COQPATH" in
+ List.rev (path_to_list path)
+ with _ -> []
+
let rec which l f =
match l with
| [] -> raise Not_found
diff --git a/lib/envars.mli b/lib/envars.mli
index e48f3ea000..6d053be6d5 100644
--- a/lib/envars.mli
+++ b/lib/envars.mli
@@ -11,6 +11,9 @@
val coqlib : unit -> string
val coqbin : unit -> string
+(* coqpath is stored in reverse order, since that is the order it
+ * gets added to the searc path *)
+val coqpath : unit -> string list
val camlbin : unit -> string
val camlp4bin : unit -> string