k
else if Patterns.are_empty t then begin
(match t with
- | _::_::_ -> warning "Ambiguous patterns"
+ | _::_::_ ->
+ (* optimization possible here: throw away all except one of the rules
+ * which lead to ambiguity *)
+ warning "Ambiguous patterns"
| _ -> ());
return_closure success_k
end else
Helm_registry.set "getter.mode" "remote";
Helm_registry.set "getter.url" "http://helm.cs.unibo.it:58081/"
- (* ORRIBLE HACK! conversion:
- * (Cic.id, string) Hashtbl.t -> (Cic.id, CicNotationtPt.sort_kind) Hashtbl.t
- *)
-let patch_sort_tbl tbl =
- let sort_of_string = function
- | "Prop" -> `Prop
- | "Set" -> `Set
- | "Type" | "?" -> `Type
- | "CProp" -> `CProp
- | _ -> assert false
- in
- let tbl' = Hashtbl.create (Hashtbl.length tbl) in
- Hashtbl.iter
- (fun id sort_str -> Hashtbl.add tbl' id (sort_of_string sort_str))
- tbl;
- tbl'
-
let _ =
let module P = CicNotationPt in
let level = ref ~-1 in
| Cic.AVariable (_, _, _, ty, _, _) -> ty
| _ -> assert false
in
- let id_to_sort = patch_sort_tbl id_to_sort in
let time1 = Unix.gettimeofday () in
let t, id_to_uri =
CicNotationRew.ast_of_acic id_to_sort annterm