aboutsummaryrefslogtreecommitdiff
path: root/dev/doc/patch.ocaml-3.10.drop.rectypes
diff options
context:
space:
mode:
Diffstat (limited to 'dev/doc/patch.ocaml-3.10.drop.rectypes')
-rw-r--r--dev/doc/patch.ocaml-3.10.drop.rectypes29
1 files changed, 29 insertions, 0 deletions
diff --git a/dev/doc/patch.ocaml-3.10.drop.rectypes b/dev/doc/patch.ocaml-3.10.drop.rectypes
new file mode 100644
index 0000000000..fd804b728c
--- /dev/null
+++ b/dev/doc/patch.ocaml-3.10.drop.rectypes
@@ -0,0 +1,29 @@
+Index: scripts/coqmktop.ml
+===================================================================
+--- scripts/coqmktop.ml (révision 11904)
++++ scripts/coqmktop.ml (copie de travail)
+@@ -235,11 +235,23 @@
+ 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.11\"
++ 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=Topdirs.dir_load ppf;
+ 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 (); Toploop.loop ppf) };;\n"
+
+ (* create a temporary main file to link *)
+ let create_tmp_main_file modules =