aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/ssr
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2018-03-21 14:18:09 +0100
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2018-03-21 14:22:40 +0100
commitef48bb4435d10b9c438cb1123bba902e1855d249 (patch)
treed15e5a052029fda498fc41239b250135d0ce5524 /plugins/ssr
parent17c94dca5fe2fc19137b9cac923d51e8eb818041 (diff)
Fix #7026: ssr: applying an overloaded lemma as a view takes too long.
Ssreflect was using a very complex function performing amongst other things refolding to check that a term was an applied inductive type. It now relies on a simple reduction followed by term matching.
Diffstat (limited to 'plugins/ssr')
-rw-r--r--plugins/ssr/ssrcommon.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/ssr/ssrcommon.ml b/plugins/ssr/ssrcommon.ml
index 19abf6780..d5118da4c 100644
--- a/plugins/ssr/ssrcommon.ml
+++ b/plugins/ssr/ssrcommon.ml
@@ -228,8 +228,9 @@ let splay_open_constr gl (sigma, c) =
Reductionops.splay_prod env sigma t
let isAppInd env sigma c =
- try ignore(Tacred.reduce_to_atomic_ind env sigma c); true
- with CErrors.UserError _ -> false
+ let c = Reductionops.clos_whd_flags CClosure.all env sigma c in
+ let c, _ = decompose_app_vect sigma c in
+ EConstr.isInd sigma c
(** Generic argument-based globbing/typing utilities *)