diff -r -u frama-c-Nitrogen-20111001.orig/src/type/datatype.mli frama-c-Nitrogen-20111001/src/type/datatype.mli --- frama-c-Nitrogen-20111001.orig/src/type/datatype.mli 2011-10-10 10:38:09.000000000 +0200 +++ frama-c-Nitrogen-20111001/src/type/datatype.mli 2012-01-05 18:35:45.000000000 +0100 @@ -249,10 +249,27 @@ end +module type Hashtbl_S = sig + type key + type 'a t + val create : int -> 'a t + val clear : 'a t -> unit + val copy : 'a t -> 'a t + val add : 'a t -> key -> 'a -> unit + val remove : 'a t -> key -> unit + val find : 'a t -> key -> 'a + val find_all : 'a t -> key -> 'a list + val replace : 'a t -> key -> 'a -> unit + val mem : 'a t -> key -> bool + val iter : (key -> 'a -> unit) -> 'a t -> unit + val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b + val length : 'a t -> int +end + (** A standard OCaml hashtbl signature extended with datatype operations. *) module type Hashtbl = sig - include Hashtbl.S + include Hashtbl_S val memo: 'a t -> key -> (key -> 'a) -> 'a (** [memo tbl k f] returns the binding of [k] in [tbl]. If there is @@ -468,7 +485,7 @@ module Map(M: Map_common_interface.S)(Key: S with type t = M.key)(Info: Functor_info) : Map with type 'a t = 'a M.t and type key = M.key and module Key = Key -module Hashtbl(H: Hashtbl.S)(Key: S with type t = H.key)(Info : Functor_info): +module Hashtbl(H: Hashtbl_S)(Key: S with type t = H.key)(Info : Functor_info): Hashtbl with type 'a t = 'a H.t and type key = H.key and module Key = Key module type Sub_caml_weak_hashtbl = sig diff -r -u frama-c-Nitrogen-20111001.orig/src/wp/LogicId.mli frama-c-Nitrogen-20111001/src/wp/LogicId.mli --- frama-c-Nitrogen-20111001.orig/src/wp/LogicId.mli 2011-10-10 10:38:21.000000000 +0200 +++ frama-c-Nitrogen-20111001/src/wp/LogicId.mli 2012-01-05 18:38:36.000000000 +0100 @@ -40,7 +40,7 @@ module Iset : Set.S with type elt = t module Imap : Map.S with type key = t -module Ihmap : Hashtbl.S with type key = t +module Ihmap : Datatype.Hashtbl_S with type key = t (** {3 Name Spaces} *) diff -r -u frama-c-Nitrogen-20111001.orig/src/wp/fol_formula.ml frama-c-Nitrogen-20111001/src/wp/fol_formula.ml --- frama-c-Nitrogen-20111001.orig/src/wp/fol_formula.ml 2011-10-10 10:38:21.000000000 +0200 +++ frama-c-Nitrogen-20111001/src/wp/fol_formula.ml 2012-01-05 18:31:40.000000000 +0100 @@ -389,7 +389,7 @@ module type Identifiable = sig type t - module H : Hashtbl.S + module H : Datatype.Hashtbl_S val index : t -> H.key val prefix : string val basename : t -> string diff -r -u frama-c-Nitrogen-20111001.orig/src/wp/formula.mli frama-c-Nitrogen-20111001/src/wp/formula.mli --- frama-c-Nitrogen-20111001.orig/src/wp/formula.mli 2011-10-10 10:38:21.000000000 +0200 +++ frama-c-Nitrogen-20111001/src/wp/formula.mli 2012-01-05 18:38:28.000000000 +0100 @@ -147,7 +147,7 @@ module type Identifiable = sig type t - module H : Hashtbl.S + module H : Datatype.Hashtbl_S val index : t -> H.key val prefix : string val basename : t -> string --- frama-c-Nitrogen-20111001.orig/src/type/datatype.ml 2011-10-10 10:38:09.000000000 +0200 +++ frama-c-Nitrogen-20111001/src/type/datatype.ml 2012-01-05 18:46:38.000000000 +0100 @@ -306,8 +306,26 @@ module Make(Data: S) : S with type t = Data.t t end +module type Hashtbl_S = + sig + type key + type 'a t + val create : int -> 'a t + val clear : 'a t -> unit + val copy : 'a t -> 'a t + val add : 'a t -> key -> 'a -> unit + val remove : 'a t -> key -> unit + val find : 'a t -> key -> 'a + val find_all : 'a t -> key -> 'a list + val replace : 'a t -> key -> 'a -> unit + val mem : 'a t -> key -> bool + val iter : (key -> 'a -> unit) -> 'a t -> unit + val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b + val length : 'a t -> int + end + module type Hashtbl = sig - include Hashtbl.S + include Hashtbl_S val memo: 'a t -> key -> (key -> 'a) -> 'a module Key: S with type t = key module Make(Data: S) : S with type t = Data.t t @@ -970,7 +988,7 @@ module Initial_caml_hashtbl = Hashtbl (* ocaml functors are generative *) -module Hashtbl(H: Hashtbl.S)(Key: S with type t = H.key)(Info : Functor_info) = +module Hashtbl(H: Hashtbl_S)(Key: S with type t = H.key)(Info : Functor_info) = struct let () = check Key.equal "equal" Key.name Info.module_name --- frama-c-Nitrogen-20111001/configure.orig 2012-03-12 16:14:45.000000000 +0100 +++ frama-c-Nitrogen-20111001/configure 2012-03-12 16:15:06.000000000 +0100 @@ -2675,6 +2675,7 @@ ;; 3.10*) echo "${ECHO_T}good!";; 3.1*) echo "${ECHO_T}good!"; OCAML_ANNOT_OPTION="-annot";; + 4.0*) echo "${ECHO_T}good!"; OCAML_ANNOT_OPTION="-annot";; *) echo "${ECHO_T}Incompatible version!"; exit 2;; esac