aboutsummaryrefslogtreecommitdiff
path: root/proofs/proofview.ml
diff options
context:
space:
mode:
authoraspiwack2011-05-13 17:57:49 +0000
committeraspiwack2011-05-13 17:57:49 +0000
commit74158af19fc897734454f97e109d08be7ff6fc59 (patch)
treebd5de7f565f9e2751ea4aada39c82aa6ef85a81f /proofs/proofview.ml
parentedcf0d8b8bff399443ddf4cd436185c33bf59829 (diff)
The modules in proofs now use the Errors module to explain their exceptions to the toplevel
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14120 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'proofs/proofview.ml')
-rw-r--r--proofs/proofview.ml5
1 files changed, 5 insertions, 0 deletions
diff --git a/proofs/proofview.ml b/proofs/proofview.ml
index 2802acfc1a..aa00cee829 100644
--- a/proofs/proofview.ml
+++ b/proofs/proofview.ml
@@ -70,6 +70,7 @@ let return { initial=init; solution=defs } =
(* [IndexOutOfRange] occurs in case of malformed indices
with respect to list lengths. *)
exception IndexOutOfRange
+(* no handler: should not be allowed to reach toplevel *)
(* [list_goto i l] returns a pair of lists [c,t] where
[c] has length [i] and is the reversed of the [i] first
@@ -278,6 +279,10 @@ let tclFOCUS i j t env = { go = fun sk fk step ->
sense in the goals immediatly built by it, and would cause an anomaly
is used otherwise. *)
exception SizeMismatch
+let _ = Errors.register_handler begin function
+ | SizeMismatch -> Util.error "Incorrect number of goals."
+ | _ -> raise Errors.Unhandled
+end
(* spiwack: we use an parametrised function to generate the dispatch tacticals.
[tclDISPATCHGEN] takes a [null] argument to generate the return value
if there are no goal under focus, and a [join] argument to explain how