aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Maxime Dénès <mail@maximedenes.fr>2018-06-25 10:26:22 +0200
committerGravatar Maxime Dénès <mail@maximedenes.fr>2018-06-25 10:26:22 +0200
commit915452f9a73d25e45131edb08531c29a79ab7020 (patch)
tree8f00cbb8fd94224589714d30952f89d00f51a5cb
parent05c18725cb0ae097bb56f74e88a89b13a5253f9e (diff)
parentfb825197d08554a208437ee31755a783ce48708b (diff)
Merge PR #7620: [ssr] rewrite: turn anomaly into regular error
-rw-r--r--plugins/ssr/ssrequality.ml2
-rw-r--r--test-suite/ssr/ssr_rew_illtyped.v9
2 files changed, 9 insertions, 2 deletions
diff --git a/plugins/ssr/ssrequality.ml b/plugins/ssr/ssrequality.ml
index f929e9430..23cbf49c0 100644
--- a/plugins/ssr/ssrequality.ml
+++ b/plugins/ssr/ssrequality.ml
@@ -417,8 +417,6 @@ let rwcltac cl rdx dir sr gl =
then errorstrm Pp.(str "Rewriting impacts evars")
else errorstrm Pp.(str "Dependent type error in rewrite of "
++ pr_constr_env (pf_env gl) (project gl) (Term.mkNamedLambda pattern_id (EConstr.Unsafe.to_constr rdxt) (EConstr.Unsafe.to_constr cl)))
- | CErrors.UserError _ as e -> raise e
- | e -> anomaly ("cvtac's exception: " ^ Printexc.to_string e);
in
tclTHEN cvtac' rwtac gl
diff --git a/test-suite/ssr/ssr_rew_illtyped.v b/test-suite/ssr/ssr_rew_illtyped.v
new file mode 100644
index 000000000..7358068c8
--- /dev/null
+++ b/test-suite/ssr/ssr_rew_illtyped.v
@@ -0,0 +1,9 @@
+From Coq Require Import ssreflect Setoid.
+
+Structure SEProp := {prop_of : Prop; _ : prop_of <-> True}.
+
+Fact anomaly: forall P : SEProp, prop_of P.
+Proof.
+move=> [P E].
+Fail rewrite E.
+Abort.