aboutsummaryrefslogtreecommitdiffhomepage
path: root/proofs/proof_global.ml
diff options
context:
space:
mode:
authorGravatar Gaëtan Gilbert <gaetan.gilbert@skyskimmer.net>2017-09-07 16:56:34 +0200
committerGravatar Gaëtan Gilbert <gaetan.gilbert@skyskimmer.net>2017-11-25 14:18:35 +0100
commitc93d5094bff73498ec8fc02837e16cc5ce9103b6 (patch)
treebed26813cdb09b9c01042b984dbc494eb48e012e /proofs/proof_global.ml
parente6c87412d70b71daaf417bd4b8e4ae6f1f28515b (diff)
Make restrict_universe_context stronger.
This fixes BZ#5717. Also add a test and fix a changed test.
Diffstat (limited to 'proofs/proof_global.ml')
-rw-r--r--proofs/proof_global.ml7
1 files changed, 6 insertions, 1 deletions
diff --git a/proofs/proof_global.ml b/proofs/proof_global.ml
index cf5dc95fe..aa5621770 100644
--- a/proofs/proof_global.ml
+++ b/proofs/proof_global.ml
@@ -346,9 +346,14 @@ let close_proof ~keep_body_ucst_separate ?feedback_id ~now
if not (keep_body_ucst_separate || not (Safe_typing.empty_private_constants = eff)) then
nf t
else t
- in
+ in
let used_univs_body = Univops.universes_of_constr body in
let used_univs_typ = Univops.universes_of_constr typ in
+ (* Universes for private constants are relevant to the body *)
+ let used_univs_body =
+ List.fold_left (fun acc (us,_) -> Univ.LSet.union acc us)
+ used_univs_body (Safe_typing.universes_of_private eff)
+ in
if keep_body_ucst_separate ||
not (Safe_typing.empty_private_constants = eff) then
let initunivs = UState.const_univ_entry ~poly initial_euctx in