diff options
author | Matthieu Sozeau <matthieu.sozeau@inria.fr> | 2014-11-21 00:41:53 +0100 |
---|---|---|
committer | Matthieu Sozeau <matthieu.sozeau@inria.fr> | 2014-11-21 00:42:18 +0100 |
commit | 00d32afd7c6b270bab55671d7a5aeff125a1ca29 (patch) | |
tree | 4617e592c99555176385a16ed7eef03d5069f375 /kernel/modops.ml | |
parent | 72324aced4c7f2bc400554a6918755c5b46ece24 (diff) |
Fix bug #3804.
Diffstat (limited to 'kernel/modops.ml')
-rw-r--r-- | kernel/modops.ml | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/kernel/modops.ml b/kernel/modops.ml index ccec3c170..05eac6221 100644 --- a/kernel/modops.ml +++ b/kernel/modops.ml @@ -353,9 +353,14 @@ let strengthen_const mp_from l cb resolver = |_ -> let kn = KerName.make2 mp_from l in let con = constant_of_delta_kn resolver kn in - { cb with - const_body = Def (Mod_subst.from_val (mkConst con)); - const_body_code = Cemitcodes.from_val (Cbytegen.compile_alias con) } + let u = + if cb.const_polymorphic then + Univ.UContext.instance cb.const_universes + else Univ.Instance.empty + in + { cb with + const_body = Def (Mod_subst.from_val (mkConstU (con,u))); + const_body_code = Cemitcodes.from_val (Cbytegen.compile_alias con) } let rec strengthen_mod mp_from mp_to mb = if mp_in_delta mb.mod_mp mb.mod_delta then mb |