diff options
| author | coqbot-app[bot] | 2020-10-19 10:45:06 +0000 |
|---|---|---|
| committer | GitHub | 2020-10-19 10:45:06 +0000 |
| commit | 33f6551fd030643d0accf50dd762bcede5dd4b8b (patch) | |
| tree | 690c39bf35bc3bf460035f2ec0e55df50b859593 /pretyping | |
| parent | 5be9faac2dcf44b383e57f95b4fbd558b8bd24b8 (diff) | |
| parent | 7320cd84f92793572550d1fe1a2181f40466fa81 (diff) | |
Merge PR #13151: Remove the compare_graph field from the conversion API.
Reviewed-by: SkySkimmer
Diffstat (limited to 'pretyping')
| -rw-r--r-- | pretyping/reductionops.ml | 10 | ||||
| -rw-r--r-- | pretyping/typing.ml | 3 |
2 files changed, 8 insertions, 5 deletions
diff --git a/pretyping/reductionops.ml b/pretyping/reductionops.ml index 08a6db5639..3352bfce38 100644 --- a/pretyping/reductionops.ml +++ b/pretyping/reductionops.ml @@ -1094,7 +1094,8 @@ let f_conv_leq ?l2r ?reds env ?evars x y = let test_trans_conversion (f: constr Reduction.extended_conversion_function) reds env sigma x y = try let evars ev = safe_evar_value sigma ev in - let _ = f ~reds env ~evars:(evars, Evd.universes sigma) x y in + let env = Environ.set_universes (Evd.universes sigma) env in + let _ = f ~reds env ~evars x y in true with Reduction.NotConvertible -> false | e -> @@ -1112,7 +1113,8 @@ let check_conv ?(pb=Reduction.CUMUL) ?(ts=TransparentState.full) env sigma x y = | Reduction.CONV -> f_conv | Reduction.CUMUL -> f_conv_leq in - try f ~reds:ts env ~evars:(safe_evar_value sigma, Evd.universes sigma) x y; true + let env = Environ.set_universes (Evd.universes sigma) env in + try f ~reds:ts env ~evars:(safe_evar_value sigma) x y; true with Reduction.NotConvertible -> false | Univ.UniverseInconsistency _ -> false | e -> @@ -1138,8 +1140,7 @@ let sigma_check_inductive_instances cv_pb variance u1 u2 sigma = let sigma_univ_state = let open Reduction in - { compare_graph = Evd.universes; - compare_sorts = sigma_compare_sorts; + { compare_sorts = sigma_compare_sorts; compare_instances = sigma_compare_instances; compare_cumul_instances = sigma_check_inductive_instances; } @@ -1164,6 +1165,7 @@ let infer_conv_gen conv_fun ?(catch_incon=true) ?(pb=Reduction.CUMUL) | None -> let x = EConstr.Unsafe.to_constr x in let y = EConstr.Unsafe.to_constr y in + let env = Environ.set_universes (Evd.universes sigma) env in let sigma' = conv_fun pb ~l2r:false sigma ts env (sigma, sigma_univ_state) x y in diff --git a/pretyping/typing.ml b/pretyping/typing.ml index 40d3faa98c..aeb3873de7 100644 --- a/pretyping/typing.ml +++ b/pretyping/typing.ml @@ -297,7 +297,8 @@ let judge_of_letin env name defj typj j = uj_type = subst1 defj.uj_val j.uj_type } let check_hyps_inclusion env sigma x hyps = - let evars = Evarutil.safe_evar_value sigma, Evd.universes sigma in + let env = Environ.set_universes (Evd.universes sigma) env in + let evars = Evarutil.safe_evar_value sigma in Typeops.check_hyps_inclusion env ~evars x hyps let type_of_constant env sigma (c,u) = |
