From d782dabc61251834e35a77c43e070ea8b4e0b04a Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Thu, 16 May 2019 21:59:18 +0200 Subject: 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. --- kernel/cooking.ml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'kernel/cooking.ml') 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 -- cgit v1.2.3