diff options
Diffstat (limited to 'vernac')
| -rw-r--r-- | vernac/vernacentries.ml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vernac/vernacentries.ml b/vernac/vernacentries.ml index d206165e88..d52fe480ef 100644 --- a/vernac/vernacentries.ml +++ b/vernac/vernacentries.ml @@ -2755,7 +2755,10 @@ and vernac_load ~verbosely ~st fname = and interp_control ?proof ~st v = match v with | { v=VernacExpr (atts, cmd) } -> - interp_expr ?proof ~atts ~st cmd + let before_univs = Global.universes () in + let pstack = interp_expr ?proof ~atts ~st cmd in + if before_univs == Global.universes () then pstack + else Option.map (Lemmas.Stack.map_top_pstate ~f:Proof_global.update_global_env) pstack | { v=VernacFail v } -> with_fail ~st (fun () -> interp_control ?proof ~st v); st.Vernacstate.lemmas |
