aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Sozeau2015-12-02 17:52:07 +0100
committerMatthieu Sozeau2015-12-02 17:52:07 +0100
commit2374a23fb7ebfa547eb16ce2ab8dc9efb2a3f855 (patch)
tree41ff206208c9602040fbeeeaf0d5c08f5cca2c7b
parent42c68765690710b16f3e878bf1d914eaa75d8291 (diff)
Univs/Program: update the universe context with global universe
constraints at the time of Next Obligation/Solve Obligations so that interleaving definitions and obligation solving commands works properly.
-rw-r--r--toplevel/obligations.ml5
1 files changed, 4 insertions, 1 deletions
diff --git a/toplevel/obligations.ml b/toplevel/obligations.ml
index f2b0380786..314789ced6 100644
--- a/toplevel/obligations.ml
+++ b/toplevel/obligations.ml
@@ -857,6 +857,7 @@ let rec solve_obligation prg num tac =
let obl = subst_deps_obl obls obl in
let kind = kind_of_obligation (pi2 prg.prg_kind) obl.obl_status in
let evd = Evd.from_ctx prg.prg_ctx in
+ let evd = Evd.update_sigma_env evd (Global.env ()) in
let auto n tac oblset = auto_solve_obligations n ~oblset tac in
let hook ctx = Lemmas.mk_hook (obligation_hook prg obl num auto ctx) in
let () = Lemmas.start_proof_univs ~sign:prg.prg_sign obl.obl_name kind evd obl.obl_type hook in
@@ -893,9 +894,11 @@ and solve_obligation_by_tac prg obls i tac =
| Some t -> t
| None -> snd (get_default_tactic ())
in
+ let evd = Evd.from_ctx !prg.prg_ctx in
+ let evd = Evd.update_sigma_env evd (Global.env ()) in
let t, ty, ctx =
solve_by_tac obl.obl_name (evar_of_obligation obl) tac
- (pi2 !prg.prg_kind) !prg.prg_ctx
+ (pi2 !prg.prg_kind) (Evd.evar_universe_context evd)
in
let uctx = Evd.evar_context_universe_context ctx in
let () = prg := {!prg with prg_ctx = ctx} in