aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2019-06-24 19:17:38 +0200
committerPierre-Marie Pédrot2019-06-26 12:35:37 +0200
commit6fab6f1cbf21d6f4a3a77e1b73c31fbe18d05a11 (patch)
tree9da22e628c7e2e66f19589a6036a730d30055e1b /kernel
parent2c39a12f5a8d7178b991595324692c1596ea9199 (diff)
Remove dead code for typing of section definitions in kernel.
All section definitions are always defined as if they were transparent, all the additional checks were actually never triggered.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/term_typing.ml21
1 files changed, 1 insertions, 20 deletions
diff --git a/kernel/term_typing.ml b/kernel/term_typing.ml
index eca22869d2..10221e18e9 100644
--- a/kernel/term_typing.ml
+++ b/kernel/term_typing.ml
@@ -371,31 +371,12 @@ let translate_local_def env _id centry =
} in
let decl = infer_declaration ~trust:Pure env (DefinitionEntry centry) in
let typ = decl.cook_type in
- if Option.is_empty decl.cook_context && !Flags.record_aux_file then begin
- match decl.cook_body with
- | Undef _ -> ()
- | Primitive _ -> ()
- | Def _ -> ()
- | OpaqueDef lc ->
- let ids_typ = global_vars_set env typ in
- let ids_def = global_vars_set env (fst (Future.force lc)) in
- record_aux env ids_typ ids_def
- end;
let () = match decl.cook_universes with
| Monomorphic ctx -> assert (Univ.ContextSet.is_empty ctx)
| Polymorphic _ -> assert false
in
let c = match decl.cook_body with
| Def c -> Mod_subst.force_constr c
- | OpaqueDef o ->
- let (p, cst) = Future.force o in
- (** Let definitions are ensured to have no extra constraints coming from
- the body by virtue of the typing of [Entries.section_def_entry]. *)
- let () = match cst with
- | Opaqueproof.PrivateMonomorphic ctx -> assert (Univ.ContextSet.is_empty ctx)
- | Opaqueproof.PrivatePolymorphic (_, ctx) -> assert (Univ.ContextSet.is_empty ctx)
- in
- p
- | Undef _ | Primitive _ -> assert false
+ | Undef _ | Primitive _ | OpaqueDef _ -> assert false
in
c, decl.cook_relevance, typ