diff options
| author | Gaëtan Gilbert | 2019-01-30 12:17:05 +0100 |
|---|---|---|
| committer | Gaëtan Gilbert | 2019-01-30 12:17:05 +0100 |
| commit | 6ec771e10c5af489d8529feea8fdc00beb21a855 (patch) | |
| tree | 584c30bbac31821ab08be85ee81e8d82659ebf27 | |
| parent | a9b141469fe3036355be95d8cf5f0bf5c240fe37 (diff) | |
Comment universe operations in Classes.context
| -rw-r--r-- | vernac/classes.ml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vernac/classes.ml b/vernac/classes.ml index 748a2628c5..ec01314e46 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; |
