aboutsummaryrefslogtreecommitdiffhomepage
path: root/library
diff options
context:
space:
mode:
authorGravatar Matthieu Sozeau <matthieu.sozeau@inria.fr>2015-10-01 23:35:51 +0200
committerGravatar Matthieu Sozeau <mattam@mattam.org>2015-10-02 15:54:13 +0200
commit8860362de4a26286b0cb20cf4e02edc5209bdbd1 (patch)
treea9c80518d1894341c704f0cc81c8ccc8b43d970e /library
parent4585baa53e7fa4c25e304b8136944748a7622e10 (diff)
Univs: Change intf of push_named_def to return the computed universe
context Let-bound definitions can be opaque but the whole universe context was not gathered to be discharged at section closing time.
Diffstat (limited to 'library')
-rw-r--r--library/declare.ml6
-rw-r--r--library/global.ml2
-rw-r--r--library/global.mli2
3 files changed, 5 insertions, 5 deletions
diff --git a/library/declare.ml b/library/declare.ml
index ec0e1047e..16803b3bf 100644
--- a/library/declare.ml
+++ b/library/declare.ml
@@ -54,9 +54,9 @@ let cache_variable ((sp,_),o) =
let impl = if impl then Implicit else Explicit in
impl, true, poly, ctx
| SectionLocalDef (de) ->
- let () = Global.push_named_def (id,de) in
- Explicit, de.const_entry_opaque, de.const_entry_polymorphic,
- (Univ.ContextSet.of_context de.const_entry_universes) in
+ let univs = Global.push_named_def (id,de) in
+ Explicit, de.const_entry_opaque,
+ de.const_entry_polymorphic, univs in
Nametab.push (Nametab.Until 1) (restrict_path 0 sp) (VarRef id);
add_section_variable id impl poly ctx;
Dischargedhypsmap.set_discharged_hyps sp [];
diff --git a/library/global.ml b/library/global.ml
index 382abb846..6002382c1 100644
--- a/library/global.ml
+++ b/library/global.ml
@@ -78,7 +78,7 @@ let globalize_with_summary fs f =
let i2l = Label.of_id
let push_named_assum a = globalize0 (Safe_typing.push_named_assum a)
-let push_named_def d = globalize0 (Safe_typing.push_named_def d)
+let push_named_def d = globalize (Safe_typing.push_named_def d)
let add_constraints c = globalize0 (Safe_typing.add_constraints c)
let push_context_set b c = globalize0 (Safe_typing.push_context_set b c)
let push_context b c = globalize0 (Safe_typing.push_context b c)
diff --git a/library/global.mli b/library/global.mli
index e6b5c1cba..ac231f7fd 100644
--- a/library/global.mli
+++ b/library/global.mli
@@ -31,7 +31,7 @@ val set_engagement : Declarations.engagement -> unit
(** Variables, Local definitions, constants, inductive types *)
val push_named_assum : (Id.t * Constr.types * bool) Univ.in_universe_context_set -> unit
-val push_named_def : (Id.t * Entries.definition_entry) -> unit
+val push_named_def : (Id.t * Entries.definition_entry) -> Univ.universe_context_set
val add_constant :
DirPath.t -> Id.t -> Safe_typing.global_declaration -> constant