aboutsummaryrefslogtreecommitdiff
path: root/kernel/indTyping.ml
diff options
context:
space:
mode:
authorGaëtan Gilbert2019-11-19 14:28:37 +0100
committerGaëtan Gilbert2019-11-26 11:28:55 +0100
commit1db8720bf624c202dcc4f1eecdcde803fed4efc2 (patch)
tree3c762f209ff0f00aa11120488f9e6cf5a65a1118 /kernel/indTyping.ml
parenta5d124dd7c3d43a5ead81cfac30c7d1448002d56 (diff)
indTyping: error instead of anomaly for ill-formed template
and do not run template_candidate in the upper layers when the template attribute is given. This means we can use an over-approximation in the upper layer implementation of template_candidate (returning false even in cases which the kernel may accept) if we ever want to.
Diffstat (limited to 'kernel/indTyping.ml')
-rw-r--r--kernel/indTyping.ml2
1 files changed, 1 insertions, 1 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}