diff options
author | vblot <24938579+vblot@users.noreply.github.com> | 2021-09-08 11:25:50 +0200 |
---|---|---|
committer | vblot <24938579+vblot@users.noreply.github.com> | 2021-09-08 11:33:19 +0200 |
commit | ad5ddae0406770990bc43bc10cc753470c7e27af (patch) | |
tree | 0265cdd6f71f235b1121c158ad7bad308c3cea0a /src | |
parent | 11f8d5d4d1fa54b7c14c8dd02934a32d1ff69ab6 (diff) | |
download | smtcoq-ad5ddae0406770990bc43bc10cc753470c7e27af.tar.gz smtcoq-ad5ddae0406770990bc43bc10cc753470c7e27af.zip |
generalize polymorphic arguments detection
Diffstat (limited to 'src')
-rw-r--r-- | src/trace/smtAtom.ml | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/trace/smtAtom.ml b/src/trace/smtAtom.ml index 2710eb2..1d608e6 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 = Structures.retyping_get_type_of env sigma x in - if Constr.iskind ty || - let c, _ = Structures.decompose_app ty in - Structures.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 = Structures.retyping_get_type_of env sigma x in + if Constr.iskind ty || + let c, _ = Structures.decompose_app ty in + Structures.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 = |