diff options
| author | Hugo Herbelin | 2018-11-22 10:56:06 +0100 |
|---|---|---|
| committer | Hugo Herbelin | 2018-11-22 10:56:06 +0100 |
| commit | 2d0be200ab9a2e3a0ff7b383078aabe70f24dd82 (patch) | |
| tree | bd9618861bd9d0ed11ee1e52c36340a2a7b9eed8 /ide | |
| parent | ba646509c8946dfa513c30e9b9659643af798cf3 (diff) | |
| parent | a7121ed7ba1a5a55845b5ffa4846b8aa0e293e5d (diff) | |
Merge PR #8967: Fix #8922 (uncaught pp_diff exception)
Diffstat (limited to 'ide')
| -rw-r--r-- | ide/idetop.ml | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/ide/idetop.ml b/ide/idetop.ml index 8a221a93e9..8cb02190e6 100644 --- a/ide/idetop.ml +++ b/ide/idetop.ml @@ -212,25 +212,20 @@ let goals () = if Proof_diffs.show_diffs () then begin let oldp = Stm.get_prev_proof ~doc (Stm.get_current_state ~doc) in let diff_goal_map = Proof_diffs.make_goal_map oldp newp in - let map_goal_for_diff ng = (* todo: move to proof_diffs.ml *) - try Evar.Map.find ng diff_goal_map with Not_found -> ng - in let process_goal_diffs nsigma ng = let open Evd in - let og = map_goal_for_diff ng in let og_s = match oldp with | Some oldp -> let (_,_,_,_,osigma) = Proof.proof oldp in - Some { it = og; sigma = osigma } + (try Some { it = Evar.Map.find ng diff_goal_map; sigma = osigma } + with Not_found -> raise (Pp_diff.Diff_Failure "Unable to match goals between old and new proof states (6)")) | None -> None in let (hyps_pp_list, concl_pp) = Proof_diffs.diff_goal_ide og_s ng nsigma in { Interface.goal_hyp = hyps_pp_list; Interface.goal_ccl = concl_pp; Interface.goal_id = Goal.uid ng } in - try - Some (export_pre_goals (Proof.map_structured_proof newp process_goal_diffs)) - with Pp_diff.Diff_Failure _ -> Some (export_pre_goals (Proof.map_structured_proof newp process_goal)) + Some (export_pre_goals (Proof.map_structured_proof newp process_goal_diffs)) end else Some (export_pre_goals (Proof.map_structured_proof newp process_goal)) with Proof_global.NoCurrentProof -> None;; |
