aboutsummaryrefslogtreecommitdiff
path: root/engine/proofview.ml
diff options
context:
space:
mode:
Diffstat (limited to 'engine/proofview.ml')
-rw-r--r--engine/proofview.ml38
1 files changed, 20 insertions, 18 deletions
diff --git a/engine/proofview.ml b/engine/proofview.ml
index 8b5bd4cd80..ed44372045 100644
--- a/engine/proofview.ml
+++ b/engine/proofview.ml
@@ -130,7 +130,7 @@ let focus_context (left,right) =
i]. *)
let focus_sublist i j l =
let (left,sub_right) = CList.goto (i-1) l in
- let (sub, right) =
+ let (sub, right) =
try CList.chop (j-i+1) sub_right
with Failure _ -> raise CList.IndexOutOfRange
in
@@ -479,7 +479,7 @@ let fold_left2_goal i s l =
let err =
return () >>= fun () -> (* Delay the computation of list lengths. *)
tclZERO (SizeMismatch (CList.length initial.comb,CList.length l))
- in
+ in
Proof.List.fold_left2 err begin fun ((r,subgoals) as cur) goal a ->
Solution.get >>= fun step ->
match cleared_alias step goal with
@@ -515,7 +515,7 @@ let fold_left2_goal i s l =
let tclDISPATCHGEN0 join tacs =
match tacs with
| [] ->
- begin
+ begin
let open Proof in
Comb.get >>= function
| [] -> tclUNIT (join [])
@@ -849,7 +849,8 @@ let give_up =
module Progress = struct
- let eq_constr = Evarutil.eq_constr_univs_test
+ let eq_constr evd extended_evd =
+ Evarutil.eq_constr_univs_test ~evd ~extended_evd
(** equality function on hypothesis contexts *)
let eq_named_context_val sigma1 sigma2 ctx1 ctx2 =
@@ -879,10 +880,10 @@ module Progress = struct
eq_evar_body sigma1 sigma2 ei1.evar_body ei2.evar_body
(** Equality function on goals *)
- let goal_equal evars1 gl1 evars2 gl2 =
- let evi1 = Evd.find evars1 gl1 in
- let evi2 = Evd.find evars2 gl2 in
- eq_evar_info evars1 evars2 evi1 evi2
+ let goal_equal ~evd ~extended_evd evar extended_evar =
+ let evi = Evd.find evd evar in
+ let extended_evi = Evd.find extended_evd extended_evar in
+ eq_evar_info evd extended_evd evi extended_evi
end
@@ -899,17 +900,17 @@ let tclPROGRESS t =
let test =
quick_test ||
Util.List.for_all2eq begin fun i f ->
- Progress.goal_equal initial.solution (drop_state i) final.solution (drop_state f)
+ Progress.goal_equal ~evd:initial.solution
+ ~extended_evd:final.solution (drop_state i) (drop_state f)
end initial.comb final.comb
in
if not test then
tclUNIT res
else
- tclZERO (CErrors.UserError (Some "Proofview.tclPROGRESS" , Pp.str"Failed to progress."))
+ tclZERO (CErrors.UserError (Some "Proofview.tclPROGRESS", Pp.str "Failed to progress."))
-exception Timeout
let _ = CErrors.register_handler begin function
- | Timeout -> CErrors.user_err ~hdr:"Proofview.tclTIMEOUT" (Pp.str"Tactic timeout!")
+ | Logic_monad.Tac_Timeout -> CErrors.user_err ~hdr:"Proofview.tclTIMEOUT" (Pp.str"Tactic timeout!")
| _ -> raise CErrors.Unhandled
end
@@ -934,7 +935,8 @@ let tclTIMEOUT n t =
end
begin let open Logic_monad.NonLogical in function (e, info) ->
match e with
- | Logic_monad.Timeout -> return (Util.Inr (Timeout, info))
+ | Logic_monad.Tac_Timeout ->
+ return (Util.Inr (Logic_monad.Tac_Timeout, info))
| Logic_monad.TacticFailure e ->
return (Util.Inr (e, info))
| e -> Logic_monad.NonLogical.raise ~info e
@@ -1010,7 +1012,7 @@ module Unsafe = struct
let tclEVARSADVANCE evd =
Pv.modify (fun ps -> { ps with solution = evd; comb = undefined evd ps.comb })
- let tclEVARUNIVCONTEXT ctx =
+ let tclEVARUNIVCONTEXT ctx =
Pv.modify (fun ps -> { ps with solution = Evd.set_universe_context ps.solution ctx })
let reset_future_goals p =
@@ -1227,7 +1229,7 @@ module V82 = struct
let (_goals,evd) = Evd.Monad.List.map map comb ps.solution in
{ ps with solution = evd; }
end
-
+
let has_unresolved_evar pv =
Evd.has_undefined pv.solution
@@ -1236,8 +1238,8 @@ module V82 = struct
let undef = Evd.undefined_map pv.solution in
let goals = CList.rev_map fst (Evar.Map.bindings undef) in
{ pv with comb = List.map with_empty_state goals }
-
-
+
+
let top_goals initial { solution=solution; } =
let goals = CList.map (fun (t,_) -> fst (Constr.destEvar (EConstr.Unsafe.to_constr t))) initial in
@@ -1245,7 +1247,7 @@ module V82 = struct
let top_evars initial { solution=sigma; } =
let evars_of_initial (c,_) =
- Evar.Set.elements (Evd.evars_of_term sigma c)
+ Evar.Set.elements (Evd.evar_nodes_of_term c)
in
CList.flatten (CList.map evars_of_initial initial)