aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel/mltop.ml
diff options
context:
space:
mode:
authorGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2014-06-25 11:09:55 +0200
committerGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2014-06-25 13:50:24 +0200
commit0a829ad04841d0973b22b4407b95f518276b66e7 (patch)
treef91845fb7722a15f13f2337c32c6ca92f9408d7f /toplevel/mltop.ml
parentb354b232c3356159f6866fab00816cd5412cd036 (diff)
cut toploop(s) out of coqtop: now they are loaded dynamically
User interface writers can drop a footop.cmxs in $(COQLIB)/toploop/ and pass -toploop footop to customize the coq main loop. A toploop must set Coqtop.toploop_init and Coqtop.toploop_run to functions respectively initializing the toploop (and parsing toploop specific arguments) and running the main loop itself. For backward compatibility -ideslave and -async-proofs worker do set the toploop to coqidetop and stmworkertop respectively.
Diffstat (limited to 'toplevel/mltop.ml')
-rw-r--r--toplevel/mltop.ml5
1 files changed, 4 insertions, 1 deletions
diff --git a/toplevel/mltop.ml b/toplevel/mltop.ml
index 11f00d6e5..695fd3b82 100644
--- a/toplevel/mltop.ml
+++ b/toplevel/mltop.ml
@@ -211,7 +211,8 @@ let file_of_name name =
let suffix = get_ml_object_suffix name in
let fail s =
errorlabstrm "Mltop.load_object"
- (str"File not found on loadpath : " ++ str s) in
+ (str"File not found on loadpath : " ++ str s ++ str"\n" ++
+ str"Loadpath: " ++ str(String.concat ":" !coq_mlpath_copy)) in
if is_native then
let name = match suffix with
| Some ((".cmo"|".cma") as suffix) ->
@@ -290,6 +291,8 @@ let load_ml_object mname fname=
add_known_module mname;
init_ml_object mname
+let load_ml_object_raw fname = dir_ml_load (file_of_name fname)
+
(* Summary of declared ML Modules *)
(* List and not String.Set because order is important: most recent first. *)