aboutsummaryrefslogtreecommitdiff
path: root/kernel/term_typing.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2018-09-27 15:34:28 +0200
committerPierre-Marie Pédrot2018-11-09 14:10:27 +0100
commit168af2ba6ae1facf948c7c7bee725ac0f0cd3b41 (patch)
tree3953f4716691915cd393ee3640e3cf6770d62701 /kernel/term_typing.ml
parent601ce3738253e4bb197900ee6dad271c4e3666d6 (diff)
Force the user to provide names when generating abstract universe contexts.
For now this data is not stored, but the code checks that indeed the number of names provided coincide with the instance length. I had to reimplement the same kind of workaround hack in section handling as the one already performed in UnivNames because the name information is not present in the section data structure. This deserves a FIXME.
Diffstat (limited to 'kernel/term_typing.ml')
-rw-r--r--kernel/term_typing.ml6
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/term_typing.ml b/kernel/term_typing.ml
index 4759625e8a..35fa871b4e 100644
--- a/kernel/term_typing.ml
+++ b/kernel/term_typing.ml
@@ -69,8 +69,7 @@ let abstract_constant_universes = function
| Monomorphic_const_entry uctx ->
Univ.empty_level_subst, Monomorphic_const uctx
| Polymorphic_const_entry (nas, uctx) ->
- let () = assert (Int.equal (List.length nas) (Univ.UContext.size uctx)) in
- let sbst, auctx = Univ.abstract_universes uctx in
+ let sbst, auctx = Univ.abstract_universes nas uctx in
let sbst = Univ.make_instance_subst sbst in
sbst, Polymorphic_const auctx
@@ -160,9 +159,8 @@ let infer_declaration (type a) ~(trust : a trust) env (dcl : a constant_entry) =
unconditionally export side-effects from polymorphic definitions,
i.e. [trust] is always [Pure]. *)
let () = assert (Univ.ContextSet.is_empty ctx) in
- let () = assert (Int.equal (List.length nas) (Univ.UContext.size uctx)) in
let env = push_context ~strict:false uctx env in
- let sbst, auctx = Univ.abstract_universes uctx in
+ let sbst, auctx = Univ.abstract_universes nas uctx in
let sbst = Univ.make_instance_subst sbst in
env, sbst, Polymorphic_const auctx
in