aboutsummaryrefslogtreecommitdiffhomepage
path: root/proofs/logic.ml
diff options
context:
space:
mode:
Diffstat (limited to 'proofs/logic.ml')
-rw-r--r--proofs/logic.ml18
1 files changed, 8 insertions, 10 deletions
diff --git a/proofs/logic.ml b/proofs/logic.ml
index fb88b8754..47645d295 100644
--- a/proofs/logic.ml
+++ b/proofs/logic.ml
@@ -379,16 +379,14 @@ let rec mk_refgoals sigma goal goalacc conclty trm =
| App (f,l) ->
let (acc',hdty,sigma,applicand) =
- match kind_of_term f with
- | Ind _ | Const _
- when (isInd f || has_polymorphic_type (fst (destConst f))) ->
- let sigma, ty =
- (* Sort-polymorphism of definition and inductive types *)
- type_of_global_reference_knowing_conclusion env sigma f conclty
- in
- goalacc, ty, sigma, f
- | _ ->
- mk_hdgoals sigma goal goalacc f
+ if is_template_polymorphic env f then
+ let sigma, ty =
+ (* Template sort-polymorphism of definition and inductive types *)
+ type_of_global_reference_knowing_conclusion env sigma f conclty
+ in
+ goalacc, ty, sigma, f
+ else
+ mk_hdgoals sigma goal goalacc f
in
let ((acc'',conclty',sigma), args) = mk_arggoals sigma goal acc' hdty l in
let sigma = check_conv_leq_goal env sigma trm conclty' conclty in