aboutsummaryrefslogtreecommitdiff
path: root/kernel/declareops.ml
diff options
context:
space:
mode:
authorMaxime Dénès2015-01-16 22:17:03 +0100
committerMatthieu Sozeau2015-01-18 00:16:43 +0530
commit6e0b660b1e58502b7da477b9725ae8ee4f5d00ed (patch)
tree36114b255b884e90b021876bebd49ff978c24710 /kernel/declareops.ml
parenta83721ac508aa96496ef95c8433bc282bca0db14 (diff)
Make native compiler handle universe polymorphic definitions.
One remaining issue: aliased constants raise an anomaly when some unsubstituted universe variables remain. VM may suffer from the same problem.
Diffstat (limited to 'kernel/declareops.ml')
-rw-r--r--kernel/declareops.ml10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/declareops.ml b/kernel/declareops.ml
index d5df24a1a1..48a6098eee 100644
--- a/kernel/declareops.ml
+++ b/kernel/declareops.ml
@@ -260,6 +260,16 @@ let subst_mind_body sub mib =
mind_universes = mib.mind_universes;
mind_private = mib.mind_private }
+let inductive_instance mib =
+ if mib.mind_polymorphic then
+ Univ.UContext.instance mib.mind_universes
+ else Univ.Instance.empty
+
+let inductive_context mib =
+ if mib.mind_polymorphic then
+ Univ.instantiate_univ_context mib.mind_universes
+ else Univ.UContext.empty
+
(** {6 Hash-consing of inductive declarations } *)
let hcons_regular_ind_arity a =