aboutsummaryrefslogtreecommitdiffhomepage
path: root/checker/mod_checking.ml
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-07-17 12:57:43 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-07-26 15:17:12 +0200
commitd9530632321c0b470ece6337cda2cf54d02d61eb (patch)
treedd8ef37eddb9a3244c85e7cf042c5168edc95e12 /checker/mod_checking.ml
parent906b48ff401f22be6059a6cdde8723b858102690 (diff)
Removing template polymorphism for definitions.
The use of template polymorphism in constants was quite limited, as it only applied to definitions that were exactly inductive types without any parameter whatsoever. Furthermore, it seems that following the introduction of polymorphic definitions, the code path enforced regular polymorphism as soon as the type of a definition was given, which was in practice almost always. Removing this feature had no observable effect neither on the test-suite, nor on any development that we monitor on Travis. I believe it is safe to assume it was nowadays useless.
Diffstat (limited to 'checker/mod_checking.ml')
-rw-r--r--checker/mod_checking.ml14
1 files changed, 5 insertions, 9 deletions
diff --git a/checker/mod_checking.ml b/checker/mod_checking.ml
index 4948f6008..b6816dd48 100644
--- a/checker/mod_checking.ml
+++ b/checker/mod_checking.ml
@@ -35,15 +35,11 @@ let check_constant_declaration env kn cb =
push_context ~strict:false ctx env
in
let envty, ty =
- match cb.const_type with
- RegularArity ty ->
- let ty', cu = refresh_arity ty in
- let envty = push_context_set cu env' in
- let _ = infer_type envty ty' in envty, ty
- | TemplateArity(ctxt,par) ->
- let _ = check_ctxt env' ctxt in
- check_polymorphic_arity env' ctxt par;
- env', it_mkProd_or_LetIn (Sort(Type par.template_level)) ctxt
+ let ty = cb.const_type in
+ let ty', cu = refresh_arity ty in
+ let envty = push_context_set cu env' in
+ let _ = infer_type envty ty' in
+ envty, ty
in
let () =
match body_of_constant cb with