aboutsummaryrefslogtreecommitdiffhomepage
path: root/vernac/record.ml
diff options
context:
space:
mode:
authorGravatar Gaëtan Gilbert <gaetan.gilbert@skyskimmer.net>2017-09-15 21:01:57 +0200
committerGravatar Gaëtan Gilbert <gaetan.gilbert@skyskimmer.net>2017-11-24 19:18:56 +0100
commita5feb9687819c5e7ef0db6e7b74d0e236a296674 (patch)
treebfd809fd50c8db88f390e3d5cba22360a0c90724 /vernac/record.ml
parentd437078a4ca82f7ca6d19be5ee9452359724f9a0 (diff)
Separate checking univ_decls and obtaining universe binder names.
Diffstat (limited to 'vernac/record.ml')
-rw-r--r--vernac/record.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/vernac/record.ml b/vernac/record.ml
index 6ffbd1584..9fef8f682 100644
--- a/vernac/record.ml
+++ b/vernac/record.ml
@@ -168,9 +168,10 @@ let typecheck_params_and_fields finite def id pl t ps nots fs =
let typ = EConstr.to_constr evars typ in
let ce t = Pretyping.check_evars env0 Evd.empty evars (EConstr.of_constr t) in
let univs = Evd.check_univ_decl evars decl in
+ let ubinders = Evd.universe_binders evars in
List.iter (iter_constr ce) (List.rev newps);
List.iter (iter_constr ce) (List.rev newfs);
- univs, typ, template, imps, newps, impls, newfs
+ ubinders, univs, typ, template, imps, newps, impls, newfs
let degenerate_decl decl =
let id = match RelDecl.get_name decl with
@@ -605,7 +606,7 @@ let definition_structure (kind,cum,poly,finite,(is_coe,((loc,idstruc),pl)),ps,cf
if isnot_class && List.exists (fun opt -> not (Option.is_empty opt)) priorities then
user_err Pp.(str "Priorities only allowed for type class substructures");
(* Now, younger decl in params and fields is on top *)
- let (pl, ctx), arity, template, implpars, params, implfs, fields =
+ let pl, ctx, arity, template, implpars, params, implfs, fields =
States.with_state_protection (fun () ->
typecheck_params_and_fields finite (kind = Class true) idstruc pl s ps notations fs) () in
let sign = structure_signature (fields@params) in