aboutsummaryrefslogtreecommitdiffhomepage
path: root/pretyping
diff options
context:
space:
mode:
authorGravatar Maxime Dénès <mail@maximedenes.fr>2017-05-03 13:37:41 +0200
committerGravatar Maxime Dénès <mail@maximedenes.fr>2017-05-03 13:37:41 +0200
commit3c795ba6b5728e8a0a699ab15c773c52c48f33e4 (patch)
tree7a95c75037ddc1c729bc496c13084d350f9f29a1 /pretyping
parent4bff930da2c029a66eaf5378e5abd2cc35554f8f (diff)
parent15d415729962eddde2cd1d58e03449c8526ba626 (diff)
Merge PR#411: Mention template polymorphism in the documentation.
Diffstat (limited to 'pretyping')
-rw-r--r--pretyping/coercion.ml4
-rw-r--r--pretyping/typing.ml3
2 files changed, 3 insertions, 4 deletions
diff --git a/pretyping/coercion.ml b/pretyping/coercion.ml
index c26e7458e..e6c0075c5 100644
--- a/pretyping/coercion.ml
+++ b/pretyping/coercion.ml
@@ -478,8 +478,8 @@ let rec inh_conv_coerce_to_fail loc env evd rigidonly v t c1 =
(* We eta-expand (hence possibly modifying the original term!) *)
(* and look for a coercion c:u1->t1 s.t. fun x:u1 => v' (c x)) *)
(* has type forall (x:u1), u2 (with v' recursively obtained) *)
- (* Note: we retype the term because sort-polymorphism may have *)
- (* weaken its type *)
+ (* Note: we retype the term because template polymorphism may have *)
+ (* weakened its type *)
let name = match name with
| Anonymous -> Name Namegen.default_dependent_ident
| _ -> name in
diff --git a/pretyping/typing.ml b/pretyping/typing.ml
index c2a030bcd..00535adb7 100644
--- a/pretyping/typing.ml
+++ b/pretyping/typing.ml
@@ -313,14 +313,13 @@ let rec execute env evdref cstr =
let j =
match EConstr.kind !evdref f with
| Ind (ind, u) when EInstance.is_empty u && Environ.template_polymorphic_ind ind env ->
- (* Sort-polymorphism of inductive types *)
make_judge f
(inductive_type_knowing_parameters env !evdref (ind, u) jl)
| Const (cst, u) when EInstance.is_empty u && Environ.template_polymorphic_constant cst env ->
- (* Sort-polymorphism of inductive types *)
make_judge f
(constant_type_knowing_parameters env !evdref (cst, u) jl)
| _ ->
+ (* No template polymorphism *)
execute env evdref f
in
e_judge_of_apply env evdref j jl