diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/coqmktop.ml | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/scripts/coqmktop.ml b/scripts/coqmktop.ml index 99fa8f6eba..6f05683ddd 100644 --- a/scripts/coqmktop.ml +++ b/scripts/coqmktop.ml @@ -221,7 +221,18 @@ let tmp_dynlink()= let declare_loading_string () = if not !top then "Mltop.remove ();;" - else "let ppf = Format.std_formatter;;\ + else + "begin try\ +\n (* Enable rectypes in the toplevel if it has the directive #rectypes *)\ +\n begin match Hashtbl.find Toploop.directive_table \"rectypes\" with\ +\n | Toploop.Directive_none f -> f ()\ +\n | _ -> ()\ +\n end\ +\n with\ +\n | Not_found -> ()\ +\n end;;\ +\n\ +\n let ppf = Format.std_formatter;;\ \n Mltop.set_top\ \n {Mltop.load_obj=\ \n (fun f -> if not (Topdirs.load_file ppf f) then Errors.error (\"Could not load plugin \"^f));\ @@ -288,7 +299,7 @@ let main () = (* add topstart.cmo explicitly because we shunted ocamlmktop wrapper *) let args = if !top then args @ [ "topstart.cmo" ] else args in (* Now, with the .cma, we MUST use the -linkall option *) - let command = String.concat " " (prog::args) in + let command = String.concat " " (prog::"-rectypes"::args) in if !echo then begin print_endline command; |
