aboutsummaryrefslogtreecommitdiff
path: root/proofs
diff options
context:
space:
mode:
authorMaxime Dénès2018-01-12 14:37:15 -0800
committerMaxime Dénès2018-01-12 14:37:15 -0800
commit70afd399dbcec974aa6db8781bb213dcfb3e5e35 (patch)
treeb7bfc2670c6d2c40574d5a6106065557160022d8 /proofs
parent13dc988771fe3db8df1cc73900a897549cd10e17 (diff)
parent4a72f3bfe23edaa87307449b6033e7a296a93b04 (diff)
Merge PR #6483: Strong invariants in polymorphic definitions
Diffstat (limited to 'proofs')
-rw-r--r--proofs/proof_global.ml11
1 files changed, 5 insertions, 6 deletions
diff --git a/proofs/proof_global.ml b/proofs/proof_global.ml
index 167d6bda0d..d04bdb6521 100644
--- a/proofs/proof_global.ml
+++ b/proofs/proof_global.ml
@@ -343,16 +343,15 @@ let close_proof ~keep_body_ucst_separate ?feedback_id ~now
if poly || now then
let make_body t (c, eff) =
let body = c in
- let typ =
- if not (keep_body_ucst_separate || not (Safe_typing.empty_private_constants = eff)) then
- nf t
- else t
+ let allow_deferred =
+ not poly && (keep_body_ucst_separate ||
+ not (Safe_typing.empty_private_constants = eff))
in
+ let typ = if allow_deferred then t else nf t in
let env = Global.env () in
let used_univs_body = Univops.universes_of_constr env body in
let used_univs_typ = Univops.universes_of_constr env typ in
- if keep_body_ucst_separate ||
- not (Safe_typing.empty_private_constants = eff) then
+ if allow_deferred then
let initunivs = UState.const_univ_entry ~poly initial_euctx in
let ctx = constrain_variables universes in
(* For vi2vo compilation proofs are computed now but we need to