diff options
author | Hugo Herbelin <Hugo.Herbelin@inria.fr> | 2014-08-21 12:23:06 +0200 |
---|---|---|
committer | Hugo Herbelin <Hugo.Herbelin@inria.fr> | 2014-09-12 10:47:28 +0200 |
commit | d542746c848d4795d4af97874a30fa5e98c8a6b2 (patch) | |
tree | fb9c4e64abbe558f7b217c9f9b5c513ad78095ac | |
parent | b006f10e7d591417844ffa1f04eeb926d6092d7b (diff) |
Use evar name to print goal.
-rw-r--r-- | printing/printer.ml | 8 | ||||
-rw-r--r-- | proofs/goal.ml | 3 | ||||
-rw-r--r-- | proofs/goal.mli | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/printing/printer.ml b/printing/printer.ml index 781f89f1a..2aa9850a8 100644 --- a/printing/printer.ml +++ b/printing/printer.ml @@ -392,6 +392,10 @@ let pr_goal_tag g = let s = " (ID " ^ Goal.uid g ^ ")" in str (emacs_str s) +(* display a goal name *) +let pr_goal_name sigma g = + str " " ++ Pp.surround (pr_id (Goal.goal_ident sigma g)) + (* display the conclusion of a goal *) let pr_concl n sigma g = let (g,sigma) = Goal.V82.nf_evar sigma g in @@ -439,7 +443,7 @@ let default_pr_subgoal n sigma = | g::rest -> if Int.equal p 1 then let pg = default_pr_goal { sigma=sigma ; it=g; } in - v 0 (str "subgoal " ++ int n ++ pr_goal_tag g + v 0 (str "subgoal " ++ int n ++ pr_goal_tag g ++ pr_goal_name sigma g ++ str " is:" ++ cut () ++ pg) else prrec (p-1) rest @@ -543,7 +547,7 @@ let default_pr_subgoals ?(pr_first=true) close_cmd sigma seeds shelf stack goals let pg = default_pr_goal { it = g ; sigma = sigma; } in v 0 ( str "1" ++ focused_if_needed ++ str"subgoal" ++ print_extra - ++ pr_goal_tag g ++ cut () ++ pg + ++ pr_goal_tag g ++ pr_goal_name sigma g ++ cut () ++ pg ++ emacs_print_dependent_evars sigma seeds ) | g1::rest -> diff --git a/proofs/goal.ml b/proofs/goal.ml index dc55c8179..55de87261 100644 --- a/proofs/goal.ml +++ b/proofs/goal.ml @@ -31,9 +31,10 @@ type goal = { (* spiwack: I don't deal with the tags, yet. It is a worthy discussion whether we do want some tags displayed besides the goal or not. *) - let pr_goal {content = e} = str "GOAL:" ++ Pp.int (Evar.repr e) +let goal_ident sigma {content = e} = Evd.evar_ident e sigma + (* access primitive *) (* invariant : [e] must exist in [em] *) let content evars { content = e } = Evd.find evars e diff --git a/proofs/goal.mli b/proofs/goal.mli index 4d3361b0e..4b85ec20b 100644 --- a/proofs/goal.mli +++ b/proofs/goal.mli @@ -25,6 +25,8 @@ val get_by_uid : string -> goal (* Debugging help *) val pr_goal : goal -> Pp.std_ppcmds +val goal_ident : Evd.evar_map -> goal -> Names.Id.t + (* [advance sigma g] returns [Some g'] if [g'] is undefined and is the current avatar of [g] (for instance [g] was changed by [clear] into [g']). It returns [None] if [g] has been (partially) solved. *) |