aboutsummaryrefslogtreecommitdiff
path: root/pretyping
diff options
context:
space:
mode:
Diffstat (limited to 'pretyping')
-rw-r--r--pretyping/inductiveops.ml6
1 files changed, 4 insertions, 2 deletions
diff --git a/pretyping/inductiveops.ml b/pretyping/inductiveops.ml
index 21395af027..c64cd35e53 100644
--- a/pretyping/inductiveops.ml
+++ b/pretyping/inductiveops.ml
@@ -480,14 +480,16 @@ let rec instantiate_universes env evdref scl is = function
d :: instantiate_universes env evdref scl is (sign, exp)
| (na,None,ty)::sign, Some u::exp ->
let ctx,_ = Reduction.dest_arity env ty in
+ let u = Univ.Universe.make u in
let s =
(* Does the sort of parameter [u] appear in (or equal)
the sort of inductive [is] ? *)
- if univ_depends (Univ.Universe.make u) is then
+ if univ_depends u is then
scl (* constrained sort: replace by scl *)
else
- (* unconstriained sort: replace by fresh universe *)
+ (* unconstrained sort: replace by fresh universe *)
let evm, s = Evd.new_sort_variable Evd.univ_flexible !evdref in
+ let evm = Evd.set_leq_sort evm s (Sorts.sort_of_univ u) in
evdref := evm; s
in
(na,None,mkArity(ctx,s)):: instantiate_universes env evdref scl is (sign, exp)