]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic_omdoc/doubleTypeInference.ml
ocaml 3.09 transition
[helm.git] / helm / ocaml / cic_omdoc / doubleTypeInference.ml
index 7f09da68918ed5b886cfc2532abf405371db55dc..69287243918419218848f810371f5c0c1843fa83 100644 (file)
@@ -324,12 +324,17 @@ let type_of_mutual_inductive_constr uri i j =
 ;;
 
 module CicHash =
- Hashtbl.Make
-  (struct
-    type t = Cic.term
-    let equal = (==)
-    let hash = Hashtbl.hash
-   end)
+  struct
+    module Tmp = 
+     Hashtbl.Make
+      (struct
+        type t = Cic.term
+        let equal = (==)
+        let hash = Hashtbl.hash
+       end)
+    include Tmp
+    let empty () = Tmp.create 1
+  end
 ;;
 
 (* type_of_aux' is just another name (with a different scope) for type_of_aux *)
@@ -635,6 +640,7 @@ let rec type_of_aux' subterms_to_types metasenv context t expectedty =
           {synthesized = synthesized' ; expected = Some expectedty'},
           expectedty'
      in
+      assert (not (CicHash.mem subterms_to_types t));
       CicHash.add subterms_to_types t types ;
       res