From 578f31889234edba078e14f4152421123c1bc466 Mon Sep 17 00:00:00 2001 From: soubiran Date: Tue, 28 Oct 2008 18:31:47 +0000 Subject: petite modif du commit 11513. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11517 85f007b7-540e-0410-9357-904b9bb8a0f7 --- kernel/modops.ml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'kernel') diff --git a/kernel/modops.ml b/kernel/modops.ml index 84c47c0032..f904bab548 100644 --- a/kernel/modops.ml +++ b/kernel/modops.ml @@ -235,15 +235,19 @@ let add_retroknowledge msid mp = let strengthen_const env mp l cb = - let const = mkConst (make_con mp empty_dirpath l) in - let const_subs = Some (Declarations.from_val const) in - {cb with - const_body = const_subs; - const_opaque = false; - const_body_code = Cemitcodes.from_val - (compile_constant_body env const_subs false false) - } - + match cb.const_opaque, cb.const_body with + | false, Some _ -> cb + | true, Some _ + | _, None -> + let const = mkConst (make_con mp empty_dirpath l) in + let const_subs = Some (Declarations.from_val const) in + {cb with + const_body = const_subs; + const_opaque = false; + const_body_code = Cemitcodes.from_val + (compile_constant_body env const_subs false false) + } + let strengthen_mind env mp l mib = match mib.mind_equiv with | Some _ -> mib | None -> {mib with mind_equiv = Some (make_kn mp empty_dirpath l)} -- cgit v1.2.3