aboutsummaryrefslogtreecommitdiff
path: root/proofs
diff options
context:
space:
mode:
Diffstat (limited to 'proofs')
-rw-r--r--proofs/logic.ml13
1 files changed, 9 insertions, 4 deletions
diff --git a/proofs/logic.ml b/proofs/logic.ml
index 81b4a5e192..15f8b8a731 100644
--- a/proofs/logic.ml
+++ b/proofs/logic.ml
@@ -237,6 +237,12 @@ let check_conv_leq_goal env sigma arg ty conclty =
let goal_type_of env sigma c =
(if !check then type_of else Retyping.get_type_of) env sigma c
+let refresh_poly_universes c =
+ let (ctx,t) = decompose_prod_assum c in
+ let ctx' = List.map (fun (na,b,ty) -> (na,b,refresh_universes ty)) ctx in
+ let t' = refresh_universes t in
+ it_mkProd_or_LetIn t' ctx'
+
let rec mk_refgoals sigma goal goalacc conclty trm =
let env = evar_env goal in
let hyps = goal.evar_hyps in
@@ -263,12 +269,11 @@ let rec mk_refgoals sigma goal goalacc conclty trm =
let (acc',hdty) =
match kind_of_term f with
| Ind _ | Const _
- when not (array_exists occur_meta l) (* we could be finer *)
- & (isInd f or has_polymorphic_type (destConst f))
- ->
+ when (isInd f or has_polymorphic_type (destConst f)) ->
(* Sort-polymorphism of definition and inductive types *)
goalacc,
- type_of_global_reference_knowing_parameters env sigma f l
+ refresh_poly_universes
+ (type_of_global_reference_knowing_parameters env sigma f [||])
| _ ->
mk_hdgoals sigma goal goalacc f
in