aboutsummaryrefslogtreecommitdiff
path: root/interp
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2019-05-16 00:02:54 +0200
committerPierre-Marie Pédrot2019-05-20 14:10:58 +0200
commit27468ae02bbbf018743d53a9db49efa34b6d6a3e (patch)
treee8fa5ad95ba323d76af06d24e9d804a0dae94844 /interp
parent801aed67a90ec49c15a4469e1905aa2835fabe19 (diff)
Ensure statically that declarations built by Term_typing are direct.
This removes a lot of cruft breaking the opaque proof abstraction in Safe_typing and similar.
Diffstat (limited to 'interp')
-rw-r--r--interp/declare.ml3
1 files changed, 1 insertions, 2 deletions
diff --git a/interp/declare.ml b/interp/declare.ml
index 29da49f29d..7ee7ecb5e8 100644
--- a/interp/declare.ml
+++ b/interp/declare.ml
@@ -78,8 +78,7 @@ let cache_constant ((sp,kn), obj) =
then Constant.make1 kn
else CErrors.anomaly Pp.(str"Missing constant " ++ Id.print(basename sp) ++ str".")
| Some r ->
- let kn, _ = Global.add_constant ~in_section:(Lib.sections_are_opened ()) id (GlobalRecipe r) in
- kn
+ Global.add_recipe ~in_section:(Lib.sections_are_opened ()) id r
in
assert (Constant.equal kn' (Constant.make1 kn));
Nametab.push (Nametab.Until 1) sp (ConstRef (Constant.make1 kn));