From ef48bb4435d10b9c438cb1123bba902e1855d249 Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Wed, 21 Mar 2018 14:18:09 +0100 Subject: 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. --- plugins/ssr/ssrcommon.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/ssr') 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 *) -- cgit v1.2.3