diff options
| author | Emilio Jesus Gallego Arias | 2018-10-04 23:21:57 +0200 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2018-10-07 19:41:45 +0200 |
| commit | dac8b249e95d376de587d7b527fd17f70e4942fc (patch) | |
| tree | 74be87f519c5fbd4c5f35355749f7050a2cb1da0 /pretyping | |
| parent | 9a13a86115823a24738489f0b11b692f4ed065ad (diff) | |
[api] Deprecate `evar_map` ref combinators.
All the `evar_map` APIs were deprecated in 8.9, thus we deprecate the
combinators to discourage this style of programming.
Still a few places do use imperative style, but they are pretty
localized and should be cleaned up separately.
As these are the last bits of `e_` API remaining this PR closes #6342.
Diffstat (limited to 'pretyping')
| -rw-r--r-- | pretyping/cases.ml | 3 | ||||
| -rw-r--r-- | pretyping/evarsolve.ml | 3 | ||||
| -rw-r--r-- | pretyping/indrec.ml | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/pretyping/cases.ml b/pretyping/cases.ml index 2c821c96ba..9fa8442f8a 100644 --- a/pretyping/cases.ml +++ b/pretyping/cases.ml @@ -1713,7 +1713,8 @@ let abstract_tycon ?loc env sigma subst tycon extenv t = let vl = List.map pi1 good in let ty = let ty = get_type_of !!env sigma t in - Evarutil.evd_comb1 (refresh_universes (Some false) !!env) evdref ty + let sigma, res = refresh_universes (Some false) !!env !evdref ty in + evdref := sigma; res in let dummy_subst = List.init k (fun _ -> mkProp) in let ty = substl dummy_subst (aux x ty) in diff --git a/pretyping/evarsolve.ml b/pretyping/evarsolve.ml index c0565f4f47..44bfe4b6cc 100644 --- a/pretyping/evarsolve.ml +++ b/pretyping/evarsolve.ml @@ -46,7 +46,8 @@ let refresh_universes ?(status=univ_rigid) ?(onlyalg=false) ?(refreshset=false) (* direction: true for fresh universes lower than the existing ones *) let refresh_sort status ~direction s = let s = ESorts.kind !evdref s in - let s' = evd_comb0 (new_sort_variable status) evdref in + let sigma, s' = new_sort_variable status !evdref in + evdref := sigma; let evd = if direction then set_leq_sort env !evdref s' s else set_leq_sort env !evdref s s' diff --git a/pretyping/indrec.ml b/pretyping/indrec.ml index 4ee7e667fe..e49ba75b3f 100644 --- a/pretyping/indrec.ml +++ b/pretyping/indrec.ml @@ -455,8 +455,8 @@ let mis_make_indrec env sigma ?(force_mutual=false) listdepkind mib u = | ((indi,u),_,_,dep,kinds)::rest -> let indf = make_ind_family ((indi,u), Context.Rel.to_extended_list mkRel i lnamesparrec) in let s = - Evarutil.evd_comb1 (Evd.fresh_sort_in_family ~rigid:Evd.univ_flexible_alg) - evdref kinds + let sigma, res = Evd.fresh_sort_in_family ~rigid:Evd.univ_flexible_alg !evdref kinds in + evdref := sigma; res in let typP = make_arity env !evdref dep indf s in let typP = EConstr.Unsafe.to_constr typP in |
