blob: ba7a3e9504d8b14a0e1229ce5f6274bb339f0f99 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
Index: scripts/coqmktop.ml
===================================================================
--- scripts/coqmktop.ml (révision 12084)
+++ scripts/coqmktop.ml (copie de travail)
@@ -231,12 +231,25 @@
end;;
let ppf = Format.std_formatter;;
+ let set_rectypes_hack () =
+ if String.length (Sys.ocaml_version) >= 4 &
+ String.sub (Sys.ocaml_version) 0 4 = \"3.10\"
+ then
+ (* ocaml 3.10 does not have #rectypes but needs it *)
+ (* simulate a call with option -rectypes before *)
+ (* jumping to the ocaml toplevel *)
+ for i = 1 to Array.length Sys.argv - 1 do
+ Sys.argv.(i) <- \"-rectypes\"
+ done
+ else
+ () in
+
Mltop.set_top
{Mltop.load_obj=
(fun f -> if not (Topdirs.load_file ppf f) then failwith \"error\");
Mltop.use_file=Topdirs.dir_use ppf;
Mltop.add_dir=Topdirs.dir_directory;
- Mltop.ml_loop=(fun () -> Toploop.loop ppf) };;\n"
+ Mltop.ml_loop=(fun () -> set_rectypes_hack(); Topmain.main()) };;\n"
(* create a temporary main file to link *)
let create_tmp_main_file modules =
|