Skip to content

Commit

Permalink
Remove calls to Global.env from Evarsolve
Browse files Browse the repository at this point in the history
  • Loading branch information
maximedenes committed Apr 10, 2019
1 parent ff07d0f commit f6dc8b1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pretyping/evarsolve.ml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ let normalize_evar evd ev =
| Evar (evk,args) -> (evk,args)
| _ -> assert false

let get_polymorphic_positions sigma f =
let get_polymorphic_positions env sigma f =
let open Declarations in
match EConstr.kind sigma f with
| Ind (ind, u) | Construct ((ind, _), u) ->
let mib,oib = Global.lookup_inductive ind in
| Ind (ind, u) | Construct ((ind, _), u) ->
let mib,oib = Inductive.lookup_mind_specif env ind in
(match oib.mind_arity with
| RegularArity _ -> assert false
| TemplateArity templ -> templ.template_param_levels)
Expand Down Expand Up @@ -128,7 +128,7 @@ let refresh_universes ?(status=univ_rigid) ?(onlyalg=false) ?(refreshset=false)
let rec refresh_term_evars ~onevars ~top t =
match EConstr.kind !evdref t with
| App (f, args) when Termops.is_template_polymorphic_ind env !evdref f ->
let pos = get_polymorphic_positions !evdref f in
let pos = get_polymorphic_positions env !evdref f in
refresh_polymorphic_positions args pos; t
| App (f, args) when top && isEvar !evdref f ->
let f' = refresh_term_evars ~onevars:true ~top:false f in
Expand Down

0 comments on commit f6dc8b1

Please sign in to comment.