aboutsummaryrefslogtreecommitdiff
path: root/kernel/fast_typeops.ml
diff options
context:
space:
mode:
authorMatthieu Sozeau2013-10-31 11:56:30 +0100
committerMatthieu Sozeau2014-05-06 09:58:54 +0200
commit05c87ba330a9b4d02b150c196e390b9dd30be341 (patch)
treefc19f68a21198754134aee6fe68a5cb5516b41b7 /kernel/fast_typeops.ml
parent1c1accf7186438228be9c426db9071aa95a7e992 (diff)
Fix interface for template polymorphism, cleaning up code in all typing algorithms.
Diffstat (limited to 'kernel/fast_typeops.ml')
-rw-r--r--kernel/fast_typeops.ml20
1 files changed, 10 insertions, 10 deletions
diff --git a/kernel/fast_typeops.ml b/kernel/fast_typeops.ml
index a68888c8c9..e03720997c 100644
--- a/kernel/fast_typeops.ml
+++ b/kernel/fast_typeops.ml
@@ -384,17 +384,17 @@ let rec execute env cstr =
let argst = execute_array env args in
let ft =
match kind_of_term f with
- | Ind ind ->
- (* Sort-polymorphism of inductive types *)
- let args = Array.map (fun t -> lazy t) argst in
- judge_of_inductive_knowing_parameters env ind args
- | Const cst ->
- (* Sort-polymorphism of constant *)
- let args = Array.map (fun t -> lazy t) argst in
+ | Ind ind when Environ.template_polymorphic_ind ind env ->
+ (* Template sort-polymorphism of inductive types *)
+ let args = Array.map (fun t -> lazy t) argst in
+ judge_of_inductive_knowing_parameters env ind args
+ | Const cst when Environ.template_polymorphic_constant cst env ->
+ (* Template sort-polymorphism of constants *)
+ let args = Array.map (fun t -> lazy t) argst in
judge_of_constant_knowing_parameters env cst args
- | _ ->
- (* No sort-polymorphism *)
- execute env f
+ | _ ->
+ (* Full or no sort-polymorphism *)
+ execute env f
in
judge_of_apply env f ft args argst