@@ -145,8 +145,14 @@ let define_by_eqs ~pm ~poly ~program_mode ~tactic ~open_proof opts eqs nt =
145
145
let env = Global. env () in
146
146
let flags = { polymorphic = poly; with_eqns; with_ind; allow_aliases = false ;
147
147
tactic; open_proof } in
148
- let evd = ref (Evd. from_env env) in
149
- let programs = List. map (fun (((loc ,i ),rec_annot ,l ,t ,by ),clauses as ieqs ) ->
148
+ let evm, udecl =
149
+ match eqs with
150
+ | (((loc , i ), udecl , _ , _ , _ , _ ), _ ) :: _ ->
151
+ Constrintern. interp_univ_decl_opt env udecl
152
+ | _ -> assert false
153
+ in
154
+ let evd = ref evm in
155
+ let programs = List. map (fun (((loc ,i ),udecl ,rec_annot ,l ,t ,by ),clauses as ieqs ) ->
150
156
let is_rec = is_recursive i (eqs, nt) in
151
157
interp_arity env evd ~poly ~is_rec ~with_evars: open_proof nt ieqs) eqs in
152
158
let rec_type = compute_rec_type [] programs in
@@ -186,7 +192,7 @@ let define_by_eqs ~pm ~poly ~program_mode ~tactic ~open_proof opts eqs nt =
186
192
else pm
187
193
in
188
194
let hook ~pm i p info = () , hook ~pm i p info in
189
- define_programs ~pm env evd rec_type fixdecls flags programs hook
195
+ define_programs ~pm env evd udecl rec_type fixdecls flags programs hook
190
196
191
197
let interp_tactic = function
192
198
| Some qid ->
@@ -201,7 +207,7 @@ let interp_tactic = function
201
207
| None -> ! Declare.Obls. default_tactic
202
208
203
209
let equations ~pm ~poly ~program_mode ?tactic opts eqs nt =
204
- List. iter (fun (((loc , i ), nested , l , t , by ),eqs ) -> Dumpglob. dump_definition CAst. (make ~loc i) false " def" ) eqs;
210
+ List. iter (fun (((loc , i ), _udecl , nested , l , t , by ),eqs ) -> Dumpglob. dump_definition CAst. (make ~loc i) false " def" ) eqs;
205
211
let tactic = interp_tactic tactic in
206
212
let pm, pstate =
207
213
define_by_eqs ~pm ~poly ~program_mode ~tactic ~open_proof: false opts eqs nt in
@@ -211,7 +217,7 @@ let equations ~pm ~poly ~program_mode ?tactic opts eqs nt =
211
217
CErrors. anomaly Pp. (str" Equation.equations leaving a proof open" )
212
218
213
219
let equations_interactive ~pm ~poly ~program_mode ?tactic opts eqs nt =
214
- List. iter (fun (((loc , i ), nested , l , t , by ),eqs ) -> Dumpglob. dump_definition CAst. (make ~loc i) false " def" ) eqs;
220
+ List. iter (fun (((loc , i ), _udecl , nested , l , t , by ),eqs ) -> Dumpglob. dump_definition CAst. (make ~loc i) false " def" ) eqs;
215
221
let tactic = interp_tactic tactic in
216
222
let pm, lemma = define_by_eqs ~pm ~poly ~program_mode ~tactic ~open_proof: true opts eqs nt in
217
223
match lemma with
0 commit comments