diff options
author | Hugo Herbelin <Hugo.Herbelin@inria.fr> | 2014-08-21 12:53:39 +0200 |
---|---|---|
committer | Hugo Herbelin <Hugo.Herbelin@inria.fr> | 2014-09-12 10:39:32 +0200 |
commit | b720cd3cbefa46da784b68a8e016a853f577800c (patch) | |
tree | 6e338ce2d2abedf75309d9ac0290836902590cef /proofs | |
parent | 32e2b1ba856f330dae03fbbf16365a08c2cc2f20 (diff) |
No plural for only one non existing focused goal.
Diffstat (limited to 'proofs')
-rw-r--r-- | proofs/proofview.ml | 6 | ||||
-rw-r--r-- | proofs/proofview.mli | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/proofs/proofview.ml b/proofs/proofview.ml index 661b32601..0acfda3d8 100644 --- a/proofs/proofview.ml +++ b/proofs/proofview.ml @@ -309,9 +309,9 @@ let tclEXACTLY_ONCE e t = (* Focuses a tactic at a range of subgoals, found by their indices. *) -exception NoSuchGoals +exception NoSuchGoals of int let _ = Errors.register_handler begin function - | NoSuchGoals -> Errors.error "No such goals." + | NoSuchGoals n -> Errors.error ("No such " ^ String.plural n "goal" ^".") | _ -> raise Errors.Unhandled end let tclFOCUS_gen nosuchgoal i j t = @@ -327,7 +327,7 @@ let tclFOCUS_gen nosuchgoal i j t = Proof.ret result with IndexOutOfRange -> nosuchgoal -let tclFOCUS i j t = tclFOCUS_gen (tclZERO NoSuchGoals) i j t +let tclFOCUS i j t = tclFOCUS_gen (tclZERO (NoSuchGoals (j+1-i))) i j t let tclTRYFOCUS i j t = tclFOCUS_gen (tclUNIT ()) i j t diff --git a/proofs/proofview.mli b/proofs/proofview.mli index 681690810..b1ff30ee9 100644 --- a/proofs/proofview.mli +++ b/proofs/proofview.mli @@ -194,7 +194,7 @@ val tclEXACTLY_ONCE : exn -> 'a tactic -> 'a tactic If the specified range doesn't correspond to existing goals, fails with [NoSuchGoals]. *) -exception NoSuchGoals +exception NoSuchGoals of int val tclFOCUS : int -> int -> 'a tactic -> 'a tactic (* Focuses a tactic at a range of subgoals, found by their indices. |