aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorletouzey2013-03-17 00:04:17 +0000
committerletouzey2013-03-17 00:04:17 +0000
commit60902645ba29f967883fdfe8aa46ef6f4a80ac7d (patch)
tree017ac51b44d98e703d9cd4fff76ff6859e2d3753
parentde861c582eb09324ef10f64c1b2107f16a41439a (diff)
Avoid a few overzealous "when Errors.noncritical"
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16309 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--pretyping/pretyping.ml8
-rw-r--r--toplevel/metasyntax.ml4
-rw-r--r--toplevel/vernacentries.ml11
3 files changed, 11 insertions, 12 deletions
diff --git a/pretyping/pretyping.ml b/pretyping/pretyping.ml
index 786e6f7028..d4afb3a5f6 100644
--- a/pretyping/pretyping.ml
+++ b/pretyping/pretyping.ml
@@ -69,8 +69,8 @@ let search_guard loc env possible_indexes fixdefs =
let indexes = Array.of_list (List.map List.hd possible_indexes) in
let fix = ((indexes, 0),fixdefs) in
(try check_fix env fix
- with e when Errors.noncritical e ->
- let e = Errors.push e in Loc.raise loc e);
+ with reraise ->
+ let e = Errors.push reraise in Loc.raise loc e);
indexes
else
(* we now search recursively amoungst all combinations *)
@@ -368,8 +368,8 @@ let rec pretype (tycon : type_constraint) env evdref lvar = function
| GCoFix i ->
let cofix = (i,(names,ftys,fdefs)) in
(try check_cofix env cofix
- with e when Errors.noncritical e ->
- let e = Errors.push e in Loc.raise loc e);
+ with reraise ->
+ let e = Errors.push reraise in Loc.raise loc e);
make_judge (mkCoFix cofix) ftys.(i)
in
inh_conv_coerce_to_tycon loc env evdref fixj tycon
diff --git a/toplevel/metasyntax.ml b/toplevel/metasyntax.ml
index bfb4814750..e58b5f8e49 100644
--- a/toplevel/metasyntax.ml
+++ b/toplevel/metasyntax.ml
@@ -266,8 +266,8 @@ let parse_format ((loc, str) : lstring) =
| _ -> error "Box closed without being opened in format."
else
error "Empty format."
- with e when Errors.noncritical e ->
- let e = Errors.push e in
+ with reraise ->
+ let e = Errors.push reraise in
Loc.raise loc e
(***********************)
diff --git a/toplevel/vernacentries.ml b/toplevel/vernacentries.ml
index d3fea99ac2..7877d9951b 100644
--- a/toplevel/vernacentries.ml
+++ b/toplevel/vernacentries.ml
@@ -1804,12 +1804,11 @@ let interp c =
if not (not mode && !Flags.program_mode && not isprogcmd) then
Flags.program_mode := mode;
true
- with e when Errors.noncritical e ->
- let e = Errors.push e in
- match e with
+ with
| UnsafeSuccess ->
- Flags.program_mode := mode;
- false
- | e ->
+ Flags.program_mode := mode;
+ false
+ | reraise ->
+ let e = Errors.push reraise in
Flags.program_mode := mode;
raise e