aboutsummaryrefslogtreecommitdiff
path: root/proofs
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2015-10-02 16:27:58 +0200
committerPierre-Marie Pédrot2015-10-02 16:33:15 +0200
commit944c8de0bfe4048e0733a487e6388db4dfc9075a (patch)
treeaf037ad2d990da53529356fec44860ad9ca87577 /proofs
parent16c88c9be5c37ee2e4fe04f7342365964031e7dd (diff)
parent8860362de4a26286b0cb20cf4e02edc5209bdbd1 (diff)
Merge branch 'v8.5'
Diffstat (limited to 'proofs')
-rw-r--r--proofs/pfedit.ml4
-rw-r--r--proofs/proof_global.ml6
2 files changed, 4 insertions, 6 deletions
diff --git a/proofs/pfedit.ml b/proofs/pfedit.ml
index b88913dec6..2ab3dc67a5 100644
--- a/proofs/pfedit.ml
+++ b/proofs/pfedit.ml
@@ -153,9 +153,9 @@ let build_by_tactic ?(side_eff=true) env ctx ?(poly=false) typ tac =
let ce, status, univs = build_constant_by_tactic id ctx sign ~goal_kind:gk typ tac in
let ce = if side_eff then Term_typing.handle_entry_side_effects env ce else { ce with const_entry_body = Future.chain ~pure:true ce.const_entry_body (fun (pt, _) -> pt, Declareops.no_seff) } in
let (cb, ctx), se = Future.force ce.const_entry_body in
+ let univs' = Evd.merge_context_set Evd.univ_rigid (Evd.from_ctx univs) ctx in
assert(Declareops.side_effects_is_empty se);
- assert(Univ.ContextSet.is_empty ctx);
- cb, status, univs
+ cb, status, Evd.evar_universe_context univs'
let refine_by_tactic env sigma ty tac =
(** Save the initial side-effects to restore them afterwards. We set the
diff --git a/proofs/proof_global.ml b/proofs/proof_global.ml
index 21009d1204..b5e25cc7c6 100644
--- a/proofs/proof_global.ml
+++ b/proofs/proof_global.ml
@@ -293,16 +293,14 @@ let close_proof ~keep_body_ucst_separate ?feedback_id ~now fpl =
let body = c and typ = nf t in
let used_univs_body = Universes.universes_of_constr body in
let used_univs_typ = Universes.universes_of_constr typ in
- if keep_body_ucst_separate then
+ if keep_body_ucst_separate || not (Declareops.side_effects_is_empty eff) then
let initunivs = Evd.evar_context_universe_context initial_euctx in
let ctx = Evd.evar_universe_context_set initunivs universes in
(* For vi2vo compilation proofs are computed now but we need to
* complement the univ constraints of the typ with the ones of
* the body. So we keep the two sets distinct. *)
let ctx_body = restrict_universe_context ctx used_univs_body in
- let ctx_typ = restrict_universe_context ctx used_univs_typ in
- let univs_typ = Univ.ContextSet.to_context ctx_typ in
- (univs_typ, typ), ((body, ctx_body), eff)
+ (initunivs, typ), ((body, ctx_body), eff)
else
let initunivs = Univ.UContext.empty in
let ctx = Evd.evar_universe_context_set initunivs universes in