aboutsummaryrefslogtreecommitdiffhomepage
path: root/ide/wg_ProofView.ml
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2015-05-05 17:47:11 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2015-05-05 17:49:44 +0200
commitff58f3d68369e0e535a98326e53de782ff460096 (patch)
treed21549403c60c0973fe301aab7720810ad8253ed /ide/wg_ProofView.ml
parent8d3fd3aa8029fa7c5acb3118846cf18ffe752b9c (diff)
Granting wish #4221.
Diffstat (limited to 'ide/wg_ProofView.ml')
-rw-r--r--ide/wg_ProofView.ml15
1 files changed, 12 insertions, 3 deletions
diff --git a/ide/wg_ProofView.ml b/ide/wg_ProofView.ml
index b12d29d6c..a5faa60a8 100644
--- a/ide/wg_ProofView.ml
+++ b/ide/wg_ProofView.ml
@@ -162,12 +162,21 @@ let display mode (view : #GText.view_skel) goals hints evars =
List.iter iter shelved_goals
| _, _, _, _ ->
(* No foreground proofs, but still unfocused ones *)
- view#buffer#insert "This subproof is complete, but there are still unfocused goals:\n\n";
- let iter goal =
+ let total = List.length bg in
+ let goal_str index = Printf.sprintf
+ "______________________________________(%d/%d)\n" index total
+ in
+ let vb, pl = if total = 1 then "is", "" else "are", "s" in
+ let msg = Printf.sprintf "This subproof is complete, but there %s still %d \
+ unfocused goal%s:\n\n" vb total pl
+ in
+ let () = view#buffer#insert msg in
+ let iter i goal =
+ let () = view#buffer#insert (goal_str (succ i)) in
let msg = Printf.sprintf "%s\n" goal.Interface.goal_ccl in
view#buffer#insert msg
in
- List.iter iter bg
+ List.iteri iter bg
end
| Some { Interface.fg_goals = fg } ->
mode view fg hints