diff options
author | Matthieu Sozeau <matthieu.sozeau@inria.fr> | 2018-06-04 14:11:33 +0200 |
---|---|---|
committer | Matthieu Sozeau <matthieu.sozeau@inria.fr> | 2018-06-04 14:11:33 +0200 |
commit | 51555af3cccae1f73bfe97e4347a5c625c6d0ec6 (patch) | |
tree | 393ec356983e72158e52916cb06f8767f1a49587 /pretyping/unification.ml | |
parent | 1757f89b6c61024bbe3aebd6b43c56df0d92f5eb (diff) | |
parent | 7913b03ba5072efeb9f6ef009ce27cec8ff19cac (diff) |
Merge PR #7216: Replace uses of Termops.dependent by more specific functions.
Diffstat (limited to 'pretyping/unification.ml')
-rw-r--r-- | pretyping/unification.ml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pretyping/unification.ml b/pretyping/unification.ml index b9678fa10..b49291adb 100644 --- a/pretyping/unification.ml +++ b/pretyping/unification.ml @@ -698,7 +698,7 @@ let rec unify_0_with_initial_metas (sigma,ms,es as subst : subst0) conv_at_top e if k2 < k1 then sigma,(k1,cN,stN)::metasubst,evarsubst else sigma,(k2,cM,stM)::metasubst,evarsubst | Meta k, _ - when not (dependent sigma cM cN) (* helps early trying alternatives *) -> + when not (occur_metavariable sigma k cN) (* helps early trying alternatives *) -> let sigma = if opt.with_types && flags.check_applied_meta_types then (try @@ -718,7 +718,7 @@ let rec unify_0_with_initial_metas (sigma,ms,es as subst : subst0) conv_at_top e evarsubst) else error_cannot_unify_local curenv sigma (m,n,cN) | _, Meta k - when not (dependent sigma cN cM) (* helps early trying alternatives *) -> + when not (occur_metavariable sigma k cM) (* helps early trying alternatives *) -> let sigma = if opt.with_types && flags.check_applied_meta_types then (try @@ -1500,7 +1500,8 @@ let indirectly_dependent sigma c d decls = it is needed otherwise, as e.g. when abstracting over "2" in "forall H:0=2, H=H:>(0=1+1) -> 0=2." where there is now obvious way to see that the second hypothesis depends indirectly over 2 *) - List.exists (fun d' -> dependent_in_decl sigma (EConstr.mkVar (NamedDecl.get_id d')) d) decls + let open Context.Named.Declaration in + List.exists (fun d' -> exists (fun c -> Termops.local_occur_var sigma (NamedDecl.get_id d') c) d) decls let finish_evar_resolution ?(flags=Pretyping.all_and_fail_flags) env current_sigma (pending,c) = let sigma = Pretyping.solve_remaining_evars flags env current_sigma pending in |