Permalink
Browse files

Set officially the minimal OCaml requirement to 3.12.1

 Anyway, a few syntactic features of 3.12 were already used here and
 there (e.g. local opening via Foo.(...), or the record shortcut
 { field; ... }). Hence compiling with 3.11 wasn't working anymore.

 Already take advantage of the following 3.12.1 features :
 - "module type of ..." in CArray, CList, CString ...
 - "ocamldep -ml-synonym" : no need anymore to hack the ocamldep output
   via our coqdep to localize the .ml4 modules :-)

 The -ml-synonym option (+ various bugfixes) is the reason for asking
 3.12.1 directly and not just 3.12.0. After all, if debian stable is
 providing 3.12.1, then everybody has it ;-)
  • Loading branch information...
letouzey committed Mar 1, 2014
1 parent f694544 commit 9130ea9cbc657cd7adf02830e40a89f6de3953f3
Showing with 18 additions and 278 deletions.
  1. +2 −2 INSTALL
  2. +1 −1 INSTALL.ide
  3. +4 −4 Makefile.build
  4. +2 −2 configure.ml
  5. +0 −8 dev/doc/debugging.txt
  6. +0 −31 dev/doc/patch.ocaml-3.10.drop.rectypes
  7. +2 −1 dev/include
  8. +1 −29 lib/cArray.ml
  9. +1 −31 lib/cArray.mli
  10. +1 −44 lib/cList.ml
  11. +1 −46 lib/cList.mli
  12. +1 −35 lib/cString.ml
  13. +1 −36 lib/cString.mli
  14. +1 −8 tools/coqdoc/cpretty.mll
View
@@ -41,7 +41,7 @@ WHAT DO YOU NEED ?
Should you need or prefer to compile Coq V8.4 yourself, you need:
- - Objective Caml version 3.11.2 or later
+ - Objective Caml version 3.12.1 or later
(available at http://caml.inria.fr/)
- Camlp5 (version <= 4.08, or 5.* transitional)
@@ -88,7 +88,7 @@ QUICK INSTALLATION PROCEDURE.
INSTALLATION PROCEDURE IN DETAILS (NORMAL USERS).
=================================================
-1- Check that you have the Objective Caml compiler version 3.11.2 (or later)
+1- Check that you have the Objective Caml compiler version 3.12.1 (or later)
installed on your computer and that "ocamlc" (or its native code version
"ocamlc.opt") lie in a directory which is present in your $PATH environment
variable.
View
@@ -23,7 +23,7 @@ On Gentoo GNU/Linux, do:
Else, read the rest of this document to compile your own CoqIde.
REQUIREMENT:
- - OCaml >= 3.11.2 with native threads support.
+ - OCaml >= 3.12.1 with native threads support.
- make world must succeed.
- The graphical toolkit GTK+ 2.x. See http://www.gtk.org.
The official supported version is at least 2.24.x.
View
@@ -106,7 +106,7 @@ OCAMLOPT := $(OCAMLOPT) $(CAMLFLAGS)
BYTEFLAGS=$(CAMLDEBUG) $(USERFLAGS)
OPTFLAGS=$(CAMLDEBUGOPT) $(CAMLTIMEPROF) $(USERFLAGS)
-DEPFLAGS= $(LOCALINCLUDES)
+DEPFLAGS= $(LOCALINCLUDES) -I ide -I ide/utils
define bestocaml
$(if $(OPT),\
@@ -928,10 +928,10 @@ endif
$(SHOW)'CAMLP4DEPS $<'
$(HIDE)echo "$*.ml: $(if $(NO_RECOMPILE_ML4),$(ORDER_ONLY_SEP)) $(call CAMLP4DEPS,$<)" $(TOTARGET)
-# We now use coqdep_boot to wrap around ocamldep -modules, since it is aware
-# of .ml4 files
+# Since OCaml 3.12.1, we could use again ocamldep directly, thanks to
+# the option -ml-synonym
-OCAMLDEP_NG = $(COQDEPBOOT) -mldep $(OCAMLDEP)
+OCAMLDEP_NG = $(OCAMLDEP) -slash -ml-synonym .ml4
checker/%.ml.d: $(D_DEPEND_BEFORE_SRC) checker/%.ml $(D_DEPEND_AFTER_SRC) $(COQDEPBOOT) $(GENFILES)
$(SHOW)'OCAMLDEP $<'
View
@@ -493,14 +493,14 @@ let caml_version_nums =
"Is it installed properly?")
let check_caml_version () =
- if caml_version_nums >= [3;11;2] then
+ if caml_version_nums >= [3;12;1] then
printf "You have OCaml %s. Good!\n" caml_version
else
let () = printf "Your version of OCaml is %s.\n" caml_version in
if !Prefs.force_caml_version then
printf "*Warning* Your version of OCaml is outdated.\n"
else
- die "You need OCaml 3.11.2 or later."
+ die "You need OCaml 3.12.1 or later."
let _ = check_caml_version ()
View
@@ -21,14 +21,6 @@ Debugging from Coq toplevel using Caml trace mechanism
notations, ...), use "Set Printing All". It will affect the #trace
printers too.
-Note for Ocaml 3.10.x: Ocaml 3.10.x requires that modules compiled
-with -rectypes are loaded in an environment with -rectypes set but
-there is no way to tell the toplevel to support -rectypes. To make it
-works, use "patch -p0 < dev/doc/patch.ocaml-3.10.drop.rectypes" to
-hack script/coqmktop.ml, then recompile coqtop.byte. The procedure
-above then works as soon as coqtop.byte is called with at least one
-argument (add neutral option -byte to ensure at least one argument).
-
Debugging from Caml debugger
============================
@@ -1,31 +0,0 @@
-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 =
View
@@ -10,8 +10,9 @@
Alternatively, you can avoid typing #use "include" after each Drop
by adding the following lines in your $HOME/.ocamlinit :
+ #directory "+compiler-libs";;
if Filename.basename Sys.argv.(0) = "coqtop.byte"
- then ignore (Toploop.use_silently Format.std_formatter "include")
+ then ignore (Toploop.use_silently Format.std_formatter "dev/include")
*)
(* For OCaml 3.10.x:
View
@@ -6,35 +6,7 @@
(* * GNU Lesser General Public License Version 2.1 *)
(***********************************************************************)
-module type S =
-sig
- external length : 'a array -> int = "%array_length"
- external get : 'a array -> int -> 'a = "%array_safe_get"
- external set : 'a array -> int -> 'a -> unit = "%array_safe_set"
- external make : int -> 'a -> 'a array = "caml_make_vect"
- val init : int -> (int -> 'a) -> 'a array
- val make_matrix : int -> int -> 'a -> 'a array array
- val create_matrix : int -> int -> 'a -> 'a array array
- val append : 'a array -> 'a array -> 'a array
- val concat : 'a array list -> 'a array
- val sub : 'a array -> int -> int -> 'a array
- val copy : 'a array -> 'a array
- val fill : 'a array -> int -> int -> 'a -> unit
- val blit : 'a array -> int -> 'a array -> int -> int -> unit
- val to_list : 'a array -> 'a list
- val of_list : 'a list -> 'a array
- val iter : ('a -> unit) -> 'a array -> unit
- val map : ('a -> 'b) -> 'a array -> 'b array
- val iteri : (int -> 'a -> unit) -> 'a array -> unit
- val mapi : (int -> 'a -> 'b) -> 'a array -> 'b array
- val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b array -> 'a
- val fold_right : ('b -> 'a -> 'a) -> 'b array -> 'a -> 'a
- val sort : ('a -> 'a -> int) -> 'a array -> unit
- val stable_sort : ('a -> 'a -> int) -> 'a array -> unit
- val fast_sort : ('a -> 'a -> int) -> 'a array -> unit
- external unsafe_get : 'a array -> int -> 'a = "%array_unsafe_get"
- external unsafe_set : 'a array -> int -> 'a -> unit = "%array_unsafe_set"
-end
+module type S = module type of Array
module type ExtS =
sig
View
@@ -6,37 +6,7 @@
(* * GNU Lesser General Public License Version 2.1 *)
(***********************************************************************)
-(** FIXME: From OCaml 3.12 onwards, that would only be a [module type of] *)
-
-module type S =
-sig
- external length : 'a array -> int = "%array_length"
- external get : 'a array -> int -> 'a = "%array_safe_get"
- external set : 'a array -> int -> 'a -> unit = "%array_safe_set"
- external make : int -> 'a -> 'a array = "caml_make_vect"
- val init : int -> (int -> 'a) -> 'a array
- val make_matrix : int -> int -> 'a -> 'a array array
- val create_matrix : int -> int -> 'a -> 'a array array
- val append : 'a array -> 'a array -> 'a array
- val concat : 'a array list -> 'a array
- val sub : 'a array -> int -> int -> 'a array
- val copy : 'a array -> 'a array
- val fill : 'a array -> int -> int -> 'a -> unit
- val blit : 'a array -> int -> 'a array -> int -> int -> unit
- val to_list : 'a array -> 'a list
- val of_list : 'a list -> 'a array
- val iter : ('a -> unit) -> 'a array -> unit
- val map : ('a -> 'b) -> 'a array -> 'b array
- val iteri : (int -> 'a -> unit) -> 'a array -> unit
- val mapi : (int -> 'a -> 'b) -> 'a array -> 'b array
- val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b array -> 'a
- val fold_right : ('b -> 'a -> 'a) -> 'b array -> 'a -> 'a
- val sort : ('a -> 'a -> int) -> 'a array -> unit
- val stable_sort : ('a -> 'a -> int) -> 'a array -> unit
- val fast_sort : ('a -> 'a -> int) -> 'a array -> unit
- external unsafe_get : 'a array -> int -> 'a = "%array_unsafe_get"
- external unsafe_set : 'a array -> int -> 'a -> unit = "%array_unsafe_set"
-end
+module type S = module type of Array
module type ExtS =
sig
View
@@ -9,50 +9,7 @@
type 'a cmp = 'a -> 'a -> int
type 'a eq = 'a -> 'a -> bool
-module type S =
-sig
- val length : 'a list -> int
- val hd : 'a list -> 'a
- val tl : 'a list -> 'a list
- val nth : 'a list -> int -> 'a
- val rev : 'a list -> 'a list
- val append : 'a list -> 'a list -> 'a list
- val rev_append : 'a list -> 'a list -> 'a list
- val concat : 'a list list -> 'a list
- val flatten : 'a list list -> 'a list
- val iter : ('a -> unit) -> 'a list -> unit
- val map : ('a -> 'b) -> 'a list -> 'b list
- val rev_map : ('a -> 'b) -> 'a list -> 'b list
- val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b list -> 'a
- val fold_right : ('a -> 'b -> 'b) -> 'a list -> 'b -> 'b
- val iter2 : ('a -> 'b -> unit) -> 'a list -> 'b list -> unit
- val map2 : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list
- val rev_map2 : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list
- val fold_left2 : ('a -> 'b -> 'c -> 'a) -> 'a -> 'b list -> 'c list -> 'a
- val fold_right2 : ('a -> 'b -> 'c -> 'c) -> 'a list -> 'b list -> 'c -> 'c
- val for_all : ('a -> bool) -> 'a list -> bool
- val exists : ('a -> bool) -> 'a list -> bool
- val for_all2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool
- val exists2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool
- val mem : 'a -> 'a list -> bool
- val memq : 'a -> 'a list -> bool
- val find : ('a -> bool) -> 'a list -> 'a
- val filter : ('a -> bool) -> 'a list -> 'a list
- val find_all : ('a -> bool) -> 'a list -> 'a list
- val partition : ('a -> bool) -> 'a list -> 'a list * 'a list
- val assoc : 'a -> ('a * 'b) list -> 'b
- val assq : 'a -> ('a * 'b) list -> 'b
- val mem_assoc : 'a -> ('a * 'b) list -> bool
- val mem_assq : 'a -> ('a * 'b) list -> bool
- val remove_assoc : 'a -> ('a * 'b) list -> ('a * 'b) list
- val remove_assq : 'a -> ('a * 'b) list -> ('a * 'b) list
- val split : ('a * 'b) list -> 'a list * 'b list
- val combine : 'a list -> 'b list -> ('a * 'b) list
- val sort : ('a -> 'a -> int) -> 'a list -> 'a list
- val stable_sort : ('a -> 'a -> int) -> 'a list -> 'a list
- val fast_sort : ('a -> 'a -> int) -> 'a list -> 'a list
- val merge : ('a -> 'a -> int) -> 'a list -> 'a list -> 'a list
-end
+module type S = module type of List
module type ExtS =
sig
View
@@ -6,56 +6,11 @@
(* * GNU Lesser General Public License Version 2.1 *)
(***********************************************************************)
-(** FIXME: From OCaml 3.12 onwards, that would only be a [module type of] *)
-
type 'a cmp = 'a -> 'a -> int
type 'a eq = 'a -> 'a -> bool
(** Module type [S] is the one from OCaml Stdlib. *)
-module type S =
-sig
- val length : 'a list -> int
- val hd : 'a list -> 'a
- val tl : 'a list -> 'a list
- val nth : 'a list -> int -> 'a
- val rev : 'a list -> 'a list
- val append : 'a list -> 'a list -> 'a list
- val rev_append : 'a list -> 'a list -> 'a list
- val concat : 'a list list -> 'a list
- val flatten : 'a list list -> 'a list
- val iter : ('a -> unit) -> 'a list -> unit
- val map : ('a -> 'b) -> 'a list -> 'b list
- val rev_map : ('a -> 'b) -> 'a list -> 'b list
- val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b list -> 'a
- val fold_right : ('a -> 'b -> 'b) -> 'a list -> 'b -> 'b
- val iter2 : ('a -> 'b -> unit) -> 'a list -> 'b list -> unit
- val map2 : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list
- val rev_map2 : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list
- val fold_left2 : ('a -> 'b -> 'c -> 'a) -> 'a -> 'b list -> 'c list -> 'a
- val fold_right2 : ('a -> 'b -> 'c -> 'c) -> 'a list -> 'b list -> 'c -> 'c
- val for_all : ('a -> bool) -> 'a list -> bool
- val exists : ('a -> bool) -> 'a list -> bool
- val for_all2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool
- val exists2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool
- val mem : 'a -> 'a list -> bool
- val memq : 'a -> 'a list -> bool
- val find : ('a -> bool) -> 'a list -> 'a
- val filter : ('a -> bool) -> 'a list -> 'a list
- val find_all : ('a -> bool) -> 'a list -> 'a list
- val partition : ('a -> bool) -> 'a list -> 'a list * 'a list
- val assoc : 'a -> ('a * 'b) list -> 'b
- val assq : 'a -> ('a * 'b) list -> 'b
- val mem_assoc : 'a -> ('a * 'b) list -> bool
- val mem_assq : 'a -> ('a * 'b) list -> bool
- val remove_assoc : 'a -> ('a * 'b) list -> ('a * 'b) list
- val remove_assq : 'a -> ('a * 'b) list -> ('a * 'b) list
- val split : ('a * 'b) list -> 'a list * 'b list
- val combine : 'a list -> 'b list -> ('a * 'b) list
- val sort : ('a -> 'a -> int) -> 'a list -> 'a list
- val stable_sort : ('a -> 'a -> int) -> 'a list -> 'a list
- val fast_sort : ('a -> 'a -> int) -> 'a list -> 'a list
- val merge : ('a -> 'a -> int) -> 'a list -> 'a list -> 'a list
-end
+module type S = module type of List
module type ExtS =
sig
View
@@ -6,41 +6,7 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(** FIXME: use module type of *)
-module type S =
-sig
- external length : string -> int = "%string_length"
- external get : string -> int -> char = "%string_safe_get"
- external set : string -> int -> char -> unit = "%string_safe_set"
- external create : int -> string = "caml_create_string"
- val make : int -> char -> string
- val copy : string -> string
- val sub : string -> int -> int -> string
- val fill : string -> int -> int -> char -> unit
- val blit : string -> int -> string -> int -> int -> unit
- val concat : string -> string list -> string
- val iter : (char -> unit) -> string -> unit
- val escaped : string -> string
- val index : string -> char -> int
- val rindex : string -> char -> int
- val index_from : string -> int -> char -> int
- val rindex_from : string -> int -> char -> int
- val contains : string -> char -> bool
- val contains_from : string -> int -> char -> bool
- val rcontains_from : string -> int -> char -> bool
- val uppercase : string -> string
- val lowercase : string -> string
- val capitalize : string -> string
- val uncapitalize : string -> string
- type t = string
- val compare: t -> t -> int
- external unsafe_get : string -> int -> char = "%string_unsafe_get"
- external unsafe_set : string -> int -> char -> unit = "%string_unsafe_set"
- external unsafe_blit :
- string -> int -> string -> int -> int -> unit = "caml_blit_string" "noalloc"
- external unsafe_fill :
- string -> int -> int -> char -> unit = "caml_fill_string" "noalloc"
-end
+module type S = module type of String
module type ExtS =
sig
View
@@ -6,43 +6,8 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(** FIXME: From OCaml 3.12 onwards, that would only be a [module type of] *)
-
(** Module type [S] is the one from OCaml Stdlib. *)
-module type S =
-sig
- external length : string -> int = "%string_length"
- external get : string -> int -> char = "%string_safe_get"
- external set : string -> int -> char -> unit = "%string_safe_set"
- external create : int -> string = "caml_create_string"
- val make : int -> char -> string
- val copy : string -> string
- val sub : string -> int -> int -> string
- val fill : string -> int -> int -> char -> unit
- val blit : string -> int -> string -> int -> int -> unit
- val concat : string -> string list -> string
- val iter : (char -> unit) -> string -> unit
- val escaped : string -> string
- val index : string -> char -> int
- val rindex : string -> char -> int
- val index_from : string -> int -> char -> int
- val rindex_from : string -> int -> char -> int
- val contains : string -> char -> bool
- val contains_from : string -> int -> char -> bool
- val rcontains_from : string -> int -> char -> bool
- val uppercase : string -> string
- val lowercase : string -> string
- val capitalize : string -> string
- val uncapitalize : string -> string
- type t = string
- val compare: t -> t -> int
- external unsafe_get : string -> int -> char = "%string_unsafe_get"
- external unsafe_set : string -> int -> char -> unit = "%string_unsafe_set"
- external unsafe_blit :
- string -> int -> string -> int -> int -> unit = "caml_blit_string" "noalloc"
- external unsafe_fill :
- string -> int -> int -> char -> unit = "caml_fill_string" "noalloc"
-end
+module type S = module type of String
module type ExtS =
sig
Oops, something went wrong.

0 comments on commit 9130ea9

Please sign in to comment.