Skip to content

Commit e049976

Browse files
committed
Directly set universes in the global wrapper.
We trust that the set of universes in the evarmap is synchronized with the global environment, which allows setting the constraints in O(1) instead of pushing them in superlinear time. This is seemingly critical for some clients of coq-elpi.
1 parent 62f6588 commit e049976

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/coq_elpi_HOAS.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3614,7 +3614,7 @@ let get_current_env_sigma ~depth hyps constraints state =
36143614
let get_global_env_current_sigma ~depth hyps constraints state =
36153615
let state, _, changed, gls = elpi_solution_to_coq_solution ~eta_contract_solution:true ~calldepth:depth constraints state in
36163616
let coq_ctx = mk_coq_context ~options:(get_options ~depth hyps state) state in
3617-
let coq_ctx = { coq_ctx with env = Environ.push_context_set (Evd.universe_context_set (get_sigma state)) coq_ctx.env } in
3617+
let coq_ctx = { coq_ctx with env = Environ.set_universes (Evd.universes (get_sigma state)) coq_ctx.env } in
36183618
state, coq_ctx, get_sigma state, gls
36193619
;;
36203620

0 commit comments

Comments
 (0)