aboutsummaryrefslogtreecommitdiff
path: root/kernel/modops.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2019-02-18 13:09:14 +0100
committerPierre-Marie Pédrot2019-02-18 13:09:14 +0100
commita59574c8eb4bdda60e4bdd6197e8a32574985588 (patch)
treee15e1a0f78d23cd263726d725c93a5e6ce453465 /kernel/modops.ml
parentf8d6c322783577b31cf55f8b55568ac56104202b (diff)
parenta9f0fd89cf3bb4b728eb451572a96f8599211380 (diff)
Merge PR #9439: Separate variance and universe fields in inductives.
Ack-by: ppedrot
Diffstat (limited to 'kernel/modops.ml')
-rw-r--r--kernel/modops.ml7
1 files changed, 2 insertions, 5 deletions
diff --git a/kernel/modops.ml b/kernel/modops.ml
index 1dc8eec0da..4f992d3972 100644
--- a/kernel/modops.ml
+++ b/kernel/modops.ml
@@ -50,6 +50,7 @@ type signature_mismatch_error =
| IncompatibleUniverses of Univ.univ_inconsistency
| IncompatiblePolymorphism of env * types * types
| IncompatibleConstraints of { got : Univ.AUContext.t; expect : Univ.AUContext.t }
+ | IncompatibleVariance
type module_typing_error =
| SignatureMismatch of
@@ -325,11 +326,7 @@ let strengthen_const mp_from l cb resolver =
|_ ->
let kn = KerName.make mp_from l in
let con = constant_of_delta_kn resolver kn in
- let u =
- match cb.const_universes with
- | Monomorphic_const _ -> Univ.Instance.empty
- | Polymorphic_const ctx -> Univ.make_abstract_instance ctx
- in
+ let u = Univ.make_abstract_instance (Declareops.constant_polymorphic_context cb) in
{ cb with
const_body = Def (Mod_subst.from_val (mkConstU (con,u)));
const_private_poly_univs = None;