aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvblot <24938579+vblot@users.noreply.github.com>2021-09-08 11:46:57 +0200
committervblot <24938579+vblot@users.noreply.github.com>2021-09-08 11:50:29 +0200
commitf513d4d2e04c4bbce3c5a40219bb89dbc57eed26 (patch)
tree1bdae3437112ff36314f0b73404ec815232fdc5d
parenta438e1c168b36b1b24ce71ba091d549ba3917b3b (diff)
parentad5ddae0406770990bc43bc10cc753470c7e27af (diff)
downloadsmtcoq-f513d4d2e04c4bbce3c5a40219bb89dbc57eed26.tar.gz
smtcoq-f513d4d2e04c4bbce3c5a40219bb89dbc57eed26.zip
Merge remote-tracking branch 'smtcoq/master' into coq-8.10
-rw-r--r--src/trace/smtAtom.ml21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/trace/smtAtom.ml b/src/trace/smtAtom.ml
index 78f2eee..3e16f6c 100644
--- a/src/trace/smtAtom.ml
+++ b/src/trace/smtAtom.ml
@@ -1343,15 +1343,18 @@ module Atom =
let rec collect_types = function
| [] -> ([],[])
| x::xs as l ->
- let ty = CoqInterface.retyping_get_type_of env sigma x in
- if Constr.iskind ty ||
- let c, _ = CoqInterface.decompose_app ty in
- CoqInterface.eq_constr c (Lazy.force cCompDec)
- then
- let (l1, l2) = collect_types xs in
- (x::l1, l2)
- else
- ([], l)
+ let (l1, l2) = collect_types xs in
+ match l1 with
+ | [] ->
+ let ty = CoqInterface.retyping_get_type_of env sigma x in
+ if Constr.iskind ty ||
+ let c, _ = CoqInterface.decompose_app ty in
+ CoqInterface.eq_constr c (Lazy.force cCompDec)
+ then
+ (x::[], xs)
+ else
+ ([], l)
+ | _ -> (x::l1, l2)
in
let (args1, args2) = collect_types args in
let c, args =