- (** functional part of the "exact" tactic *)
-let exact_tac ~term =
- let exact_tac ~term (proof, goal) =
- (* Assumption: the term bo must be closed in the current context *)
- let (_,metasenv,_subst,_,_, _) = proof in
- let metano,context,ty = CicUtil.lookup_meta goal metasenv in
- let module T = CicTypeChecker in
- let module R = CicReduction in
- let ty_term,u = T.type_of_aux' metasenv context term CicUniv.oblivion_ugraph in
- let b,_ = R.are_convertible context ty_term ty u in (* TASSI: FIXME *)
- if b then
- begin
- let (newproof, metasenv') =
- ProofEngineHelpers.subst_meta_in_proof proof metano term [] in
- (newproof, [])
- end
- else
- raise (PET.Fail (lazy "The type of the provided term is not the one expected."))
- in
- PET.mk_tactic (exact_tac ~term)