From 171a0af74fde8f05ac440491feb6acb76352b9e2 Mon Sep 17 00:00:00 2001 From: coq Date: Tue, 23 Sep 2003 10:47:14 +0000 Subject: Correction bug 328 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@4456 85f007b7-540e-0410-9357-904b9bb8a0f7 --- kernel/modops.ml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'kernel') diff --git a/kernel/modops.ml b/kernel/modops.ml index c194a6c712..7459dcad8d 100644 --- a/kernel/modops.ml +++ b/kernel/modops.ml @@ -184,12 +184,17 @@ and add_module mp mb env = | MTBfunsig _ -> env -let strengthen_const env mp l cb = match cb.const_body with - | Some _ -> cb - | None -> {cb with const_body = - let const = mkConst (make_kn mp empty_dirpath l) in - Some (Declarations.from_val const) - } +let strengthen_const env mp l cb = + match cb.const_opaque, cb.const_body with + | false, Some _ -> cb + | true, Some _ + | _, None -> + let const = mkConst (make_kn mp empty_dirpath l) in + let const_subs = Some (Declarations.from_val const) in + {cb with + const_body = const_subs; + const_opaque = false + } let strengthen_mind env mp l mib = match mib.mind_equiv with | Some _ -> mib -- cgit v1.2.3