diff options
author | Matthieu Sozeau <mattam@mattam.org> | 2013-10-31 11:56:30 +0100 |
---|---|---|
committer | Matthieu Sozeau <mattam@mattam.org> | 2014-05-06 09:58:54 +0200 |
commit | 05c87ba330a9b4d02b150c196e390b9dd30be341 (patch) | |
tree | fc19f68a21198754134aee6fe68a5cb5516b41b7 /proofs/logic.ml | |
parent | 1c1accf7186438228be9c426db9071aa95a7e992 (diff) |
Fix interface for template polymorphism, cleaning up code in all typing algorithms.
Diffstat (limited to 'proofs/logic.ml')
-rw-r--r-- | proofs/logic.ml | 18 |
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 |