aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorGravatar glondu <glondu@85f007b7-540e-0410-9357-904b9bb8a0f7>2008-11-19 14:16:43 +0000
committerGravatar glondu <glondu@85f007b7-540e-0410-9357-904b9bb8a0f7>2008-11-19 14:16:43 +0000
commit25229d8d772576f867572d9c422b3a624b1636c7 (patch)
treecd2ba154a2679c116405b33925773704c8251f76 /scripts
parentfc5df964ec52be014bfd16ef6d8f56ec1f153834 (diff)
Execute #rectypes directive in embedded OCaml toplevel...
...to avoid the need to have cflags.cmi around. This directive will likely be available in the next version of OCaml. See OCaml bug #4460. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11605 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'scripts')
-rw-r--r--scripts/coqmktop.ml12
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/coqmktop.ml b/scripts/coqmktop.ml
index 320cbe182..1b9247616 100644
--- a/scripts/coqmktop.ml
+++ b/scripts/coqmktop.ml
@@ -210,7 +210,17 @@ let declare_loading_string () =
if not !top then
"Mltop.remove ();;"
else
- "let ppf = Format.std_formatter;;
+ "begin try
+ (* Enable rectypes in the toplevel if it has the directive #rectypes *)
+ begin match Hashtbl.find Toploop.directive_table \"rectypes\" with
+ | Toploop.Directive_none f -> f ()
+ | _ -> ()
+ end
+ with
+ | Not_found -> ()
+ end;;
+
+ let ppf = Format.std_formatter;;
Mltop.set_top
{Mltop.load_obj=Topdirs.dir_load ppf;
Mltop.use_file=Topdirs.dir_use ppf;