From 25ffe7f97a907d3508848c81c3e8dcc89559aadd Mon Sep 17 00:00:00 2001 From: Matthieu Sozeau Date: Fri, 27 May 2016 13:51:51 +0200 Subject: Univs: earlier errors for strict univ decls #4527 When declaring the universes of a lemma explicitely, throw an error if after minimization the type of a lemma still refers to unbound universes. This is a fix and an incompatibility, but scripts will be backwards compatible themselves. Fix another minor bug in treating universe binders for (Co)Fixpoint. --- stm/lemmas.ml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'stm') diff --git a/stm/lemmas.ml b/stm/lemmas.ml index 50dceb8e6b..6b78ce72cc 100644 --- a/stm/lemmas.ml +++ b/stm/lemmas.ml @@ -465,6 +465,11 @@ let start_proof_com kind thms hook = let recguard,thms,snl = look_for_possibly_mutual_statements thms in let evd, nf = Evarutil.nf_evars_and_universes !evdref in let thms = List.map (fun (n, (t, info)) -> (n, (nf t, info))) thms in + let () = + match levels with + | None -> () + | Some l -> ignore (Evd.universe_context evd ?names:l) + in let evd = if pi2 kind then evd else (* We fix the variables to ensure they won't be lowered to Set *) -- cgit v1.2.3