into Cic.
| Conjecture of annconjecture
| Hypothesis of annhypothesis
+module CicHash =
+ Hashtbl.Make
+ (struct
+ type t = term
+ let equal = (==)
+ let hash = Hashtbl.hash
+ end)
+;;
+
if global_computeinnertypes then
D.double_type_of metasenv context t expectedty
else
- D.CicHash.empty ()
+ Cic.CicHash.create 1 (* empty table *)
in
(*
let time2 = Sys.time () in
(* *)
let {D.synthesized = synthesized; D.expected = expected} =
if computeinnertypes then
- D.CicHash.find terms_to_types tt
+ Cic.CicHash.find terms_to_types tt
else
(* We are already in an inner-type and Coscoy's double *)
(* type inference algorithm has not been applied. *)
| _ -> raise (WrongUriToMutualInductiveDefinitions (U.string_of_uri uri))
;;
-module CicHash =
- 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 *)
let rec type_of_aux' subterms_to_types metasenv context t expectedty =
(* Coscoy's double type-inference algorithm *)
{synthesized = synthesized' ; expected = Some expectedty'},
expectedty'
in
- assert (not (CicHash.mem subterms_to_types t));
- CicHash.add subterms_to_types t types ;
+ assert (not (Cic.CicHash.mem subterms_to_types t));
+ Cic.CicHash.add subterms_to_types t types ;
res
and visit_exp_named_subst context uri exp_named_subst =
;;
let double_type_of metasenv context t expectedty =
- let subterms_to_types = CicHash.create 503 in
+ let subterms_to_types = Cic.CicHash.create 503 in
ignore (type_of_aux' subterms_to_types metasenv context t expectedty) ;
subterms_to_types
;;
type types = {synthesized : Cic.term ; expected : Cic.term option};;
-module CicHash :
- sig
- type 'a t
- val find : 'a t -> Cic.term -> 'a
- val empty: unit -> 'a t
- end
-;;
-
val double_type_of :
- Cic.metasenv -> Cic.context -> Cic.term -> Cic.term option -> types CicHash.t
+ Cic.metasenv -> Cic.context -> Cic.term -> Cic.term option ->
+ types Cic.CicHash.t
(** Auxiliary functions **)