type context = hypothesis list
-type conjecture = int * string option * context * term
+type conjecture = string option * context * term
-type metasenv = conjecture list
+type metasenv = (int * conjecture) list
type subst_entry = string option * context * term * term
try
let _,c,_,ty = U.lookup_subst n subst in c,ty
with U.Subst_not_found _ -> try
- let _,_,c,ty = U.lookup_meta n metasenv in c,ty
+ let _,c,ty = U.lookup_meta n metasenv in c,ty
with U.Meta_not_found _ ->
raise (AssertFailure (lazy (Printf.sprintf
"%s not found" (PP.ppterm ~subst ~metasenv ~context t))))
with Not_found -> raise (Subst_not_found n)
;;
-let lookup_meta index metasenv =
+let lookup_meta n metasenv =
try
- List.find (fun (index', _, _, _) -> index = index') metasenv
- with Not_found -> raise (Meta_not_found index)
+ List.assoc n metasenv
+ with Not_found -> raise (Meta_not_found n)
;;
let fold g k f acc = function