diff options
author | Hugo Herbelin <Hugo.Herbelin@inria.fr> | 2018-04-07 18:43:40 +0200 |
---|---|---|
committer | Hugo Herbelin <Hugo.Herbelin@inria.fr> | 2018-04-07 19:07:23 +0200 |
commit | 1522b9899b669f4fdd0fc9be1963c5e96d81a13f (patch) | |
tree | b54e4bfd78cccc0654889206500371d44292f543 /vernac/assumptions.ml | |
parent | e9c6d4cbc9973e0c46b8022fcc5a794f363d1e86 (diff) |
Fixes #7192 (Print Assumptions does not enter implementation of submodules).
We fix it by looking manually for the implementation at each level of
nesting rather than using the signature for the n first levels and
looking for the implementation only in the n+1-th level.
Diffstat (limited to 'vernac/assumptions.ml')
-rw-r--r-- | vernac/assumptions.ml | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/vernac/assumptions.ml b/vernac/assumptions.ml index 45ccf7276..765f962e9 100644 --- a/vernac/assumptions.ml +++ b/vernac/assumptions.ml @@ -69,16 +69,15 @@ let rec fields_of_functor f subs mp0 args = function fields_of_functor f subs mp0 args e let rec lookup_module_in_impl mp = - try Global.lookup_module mp - with Not_found -> - (* The module we search might not be exported by its englobing module(s). - We access the upper layer, and then do a manual search *) match mp with - | MPfile _ -> raise Not_found (* can happen if mp is an open module *) + | MPfile _ -> raise Not_found | MPbound _ -> assert false | MPdot (mp',lab') -> - let fields = memoize_fields_of_mp mp' in - search_mod_label lab' fields + if ModPath.equal mp' (Global.current_modpath ()) then + Global.lookup_module mp + else + let fields = memoize_fields_of_mp mp' in + search_mod_label lab' fields and memoize_fields_of_mp mp = try MPmap.find mp !modcache |