aboutsummaryrefslogtreecommitdiff
path: root/printing/printer.ml
diff options
context:
space:
mode:
authorJim Fehrle2018-11-07 00:23:07 -0800
committerJim Fehrle2018-11-14 12:19:14 -0800
commita7121ed7ba1a5a55845b5ffa4846b8aa0e293e5d (patch)
treef72c6aa5710526b0a8e8272e4376b6b00ba267c9 /printing/printer.ml
parent9896b66fabdb1dacafb71887b85facefa91845e7 (diff)
Get hyps and goal the same way Printer does; don't omit info
Allow for new goals that don't map to old goals Include background_goals in all_goals return value Fix incorrect change to raw diffs in shorten_diff_span Fixes #8922
Diffstat (limited to 'printing/printer.ml')
-rw-r--r--printing/printer.ml11
1 files changed, 6 insertions, 5 deletions
diff --git a/printing/printer.ml b/printing/printer.ml
index da364c8b9e..a91ad63ac1 100644
--- a/printing/printer.ml
+++ b/printing/printer.ml
@@ -674,10 +674,6 @@ let pr_subgoals ?(pr_first=true) ?(diffs=false) ?os_map
| None -> GoalMap.empty
in
- let map_goal_for_diff ng = (* todo: move to proof_diffs.ml *)
- try GoalMap.find ng diff_goal_map with Not_found -> ng
- in
-
(** Printing functions for the extra informations. *)
let rec print_stack a = function
| [] -> Pp.int a
@@ -713,7 +709,12 @@ let pr_subgoals ?(pr_first=true) ?(diffs=false) ?os_map
let get_ogs g =
match os_map with
- | Some (osigma, _) -> Some { it = map_goal_for_diff g; sigma = osigma }
+ | Some (osigma, _) ->
+ (* if Not_found, returning None treats the goal as new and it will be highlighted;
+ returning Some { it = g; sigma = sigma } will compare the new goal
+ to itself and it won't be highlighted *)
+ (try Some { it = GoalMap.find g diff_goal_map; sigma = osigma }
+ with Not_found -> raise (Pp_diff.Diff_Failure "Unable to match goals between old and new proof states (7)"))
| None -> None
in
let rec pr_rec n = function