aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/indTyping.ml2
-rw-r--r--vernac/comInductive.ml3
-rw-r--r--vernac/record.ml2
3 files changed, 1 insertions, 6 deletions
diff --git a/kernel/indTyping.ml b/kernel/indTyping.ml
index 2b5409c1ab..c91cb39fe2 100644
--- a/kernel/indTyping.ml
+++ b/kernel/indTyping.ml
@@ -327,7 +327,7 @@ let abstract_packets ~template_check univs usubst params ((arity,lc),(indices,sp
in
if template_check && List.for_all (fun x -> Option.is_empty x) param_levels
&& Univ.LSet.is_empty concl_levels then
- CErrors.anomaly ~label:"polymorphic_template_ind"
+ CErrors.user_err
Pp.(strbrk "Ill-formed template inductive declaration: not polymorphic on any universe.")
else
TemplateArity {template_param_levels = param_levels; template_level = min_univ}
diff --git a/vernac/comInductive.ml b/vernac/comInductive.ml
index d9201e54af..2aee9bd47f 100644
--- a/vernac/comInductive.ml
+++ b/vernac/comInductive.ml
@@ -396,9 +396,6 @@ let interp_mutual_inductive_constr ~env0 ~sigma ~template ~udecl ~env_ar ~env_pa
| Some template ->
if poly && template then user_err
Pp.(strbrk "Template-polymorphism and universe polymorphism are not compatible.");
- if template && not (template_candidate ()) then
- user_err Pp.(strbrk "Inductive " ++ Id.print indname ++
- str" cannot be made template polymorphic.");
template
| None ->
should_auto_template indname (template_candidate ())
diff --git a/vernac/record.ml b/vernac/record.ml
index c4254d11fb..d85b71df44 100644
--- a/vernac/record.ml
+++ b/vernac/record.ml
@@ -454,8 +454,6 @@ let declare_structure ~cumulative finite ubinders univs paramimpls params templa
| Some template, _ ->
(* templateness explicitly requested *)
if poly && template then user_err Pp.(strbrk "template and polymorphism not compatible");
- if template && not (template_candidate ()) then
- user_err Pp.(strbrk "record cannot be made template polymorphic on any universe");
template
| None, template ->
(* auto detect template *)