diff options
| author | Pierre-Marie Pédrot | 2019-05-16 21:59:18 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2019-05-25 14:52:16 +0200 |
| commit | d782dabc61251834e35a77c43e070ea8b4e0b04a (patch) | |
| tree | 9922adf428e92055ba4c9bed034c94b6e76d70b6 /kernel/cooking.ml | |
| parent | 5727443376480be4793757fd5507621ad4f09509 (diff) | |
Centralize the hashconsing of constant declarations.
Safe_typing is now responsible for hashconsing of all accessible structures,
except for opaque terms which are handled by Opaqueproof.
Diffstat (limited to 'kernel/cooking.ml')
| -rw-r--r-- | kernel/cooking.ml | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/kernel/cooking.ml b/kernel/cooking.ml index 9b6e37251f..13851319cd 100644 --- a/kernel/cooking.ml +++ b/kernel/cooking.ml @@ -212,7 +212,7 @@ let lift_univs cb subst auctx0 = let auctx' = Univ.subst_univs_level_abstract_universe_context substf auctx in subst, (Polymorphic (AUContext.union auctx0 auctx')) -let cook_constant ~hcons { from = cb; info } = +let cook_constant { from = cb; info } = let { Opaqueproof.modlist; abstract } = info in let cache = RefTable.create 13 in let abstract, usubst, abs_ctx = abstract in @@ -220,10 +220,7 @@ let cook_constant ~hcons { from = cb; info } = let expmod = expmod_constr_subst cache modlist usubst in let hyps0 = Context.Named.map expmod abstract in let hyps = abstract_context hyps0 in - let map c = - let c = abstract_constant_body (expmod c) hyps in - if hcons then Constr.hcons c else c - in + let map c = abstract_constant_body (expmod c) hyps in let body = on_body modlist (hyps0, usubst, abs_ctx) map cb.const_body |
