aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2019-02-04 15:03:07 +0100
committerPierre-Marie Pédrot2019-02-04 15:03:07 +0100
commit4fdbf900e11f318f772dd1d81b5fa0a00ccaaa42 (patch)
tree2b9218c9860f7e932ba3a08f7804362dea9cbc7d
parent79c87ab3ec6e41bbc5fe2cc43edcb4b934b81e46 (diff)
parent6ec771e10c5af489d8529feea8fdc00beb21a855 (diff)
Merge PR #9437: Comment universe operations in Classes.context
Reviewed-by: mattam82 Reviewed-by: ppedrot
-rw-r--r--vernac/classes.ml7
1 files changed, 6 insertions, 1 deletions
diff --git a/vernac/classes.ml b/vernac/classes.ml
index 5cac6af4b2..dd49f09d35 100644
--- a/vernac/classes.ml
+++ b/vernac/classes.ml
@@ -376,9 +376,11 @@ let context poly l =
| [] -> assert false
| [_] -> Evd.const_univ_entry ~poly sigma
| _::_::_ ->
- (* TODO: explain this little belly dance *)
if Lib.sections_are_opened ()
then
+ (* More than 1 variable in a section: we can't associate
+ universes to any specific variable so we declare them
+ separately. *)
begin
let uctx = Evd.universe_context_set sigma in
Declare.declare_universe_context poly uctx;
@@ -386,8 +388,11 @@ let context poly l =
else Monomorphic_const_entry Univ.ContextSet.empty
end
else if poly then
+ (* Multiple polymorphic axioms: they are all polymorphic the same way. *)
Evd.const_univ_entry ~poly sigma
else
+ (* Multiple monomorphic axioms: declare universes separately
+ to avoid redeclaring them. *)
begin
let uctx = Evd.universe_context_set sigma in
Declare.declare_universe_context poly uctx;