aboutsummaryrefslogtreecommitdiffhomepage
path: root/vernac
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2018-06-14 11:52:53 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2018-06-14 11:52:53 +0200
commit49c39250ac1114c8d92166521f965835b5526b34 (patch)
tree07c1d4ca7b8beaeddb09472690cbba1cc1ba4d5c /vernac
parentb5569f511338ebdc7d1053b25500acbffa3e3a40 (diff)
parent1522b9899b669f4fdd0fc9be1963c5e96d81a13f (diff)
Merge PR #7193: Fixes #7192: Print Assumptions does not enter implementation of submodules.
Diffstat (limited to 'vernac')
-rw-r--r--vernac/assumptions.ml13
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