aboutsummaryrefslogtreecommitdiff
path: root/pretyping
diff options
context:
space:
mode:
authorcoqbot-app[bot]2020-12-15 18:07:31 +0000
committerGitHub2020-12-15 18:07:31 +0000
commit0e29b594a597529b1583a0ee1306a76e31482412 (patch)
tree26277874764c18f7979a17ea7eae5880045ca12b /pretyping
parent83d225fe5d2320429cb1d64118f1c87a19d84e57 (diff)
parent213f84e60eda94c90436f0102fed00fe579d0a48 (diff)
Merge PR #13625: Tweak constr_matching so as to make it tail-rec on projection expansion.
Reviewed-by: ejgallego
Diffstat (limited to 'pretyping')
-rw-r--r--pretyping/constr_matching.ml7
1 files changed, 3 insertions, 4 deletions
diff --git a/pretyping/constr_matching.ml b/pretyping/constr_matching.ml
index a3f1c0b004..0e69b814c7 100644
--- a/pretyping/constr_matching.ml
+++ b/pretyping/constr_matching.ml
@@ -528,10 +528,9 @@ let sub_match ?(closed=true) env sigma pat c =
let sub = subargs env types @ subargs env' bodies in
try_aux sub next_mk_ctx next
| Proj (p,c') ->
- begin try
- let term = Retyping.expand_projection env sigma p c' [] in
- aux env term mk_ctx next
- with Retyping.RetypeError _ -> next ()
+ begin match Retyping.expand_projection env sigma p c' [] with
+ | term -> aux env term mk_ctx next
+ | exception Retyping.RetypeError _ -> next ()
end
| Array(u, t, def, ty) ->
let next_mk_ctx = function