aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel
diff options
context:
space:
mode:
authorGravatar Maxime Dénès <mail@maximedenes.fr>2015-09-20 00:06:33 +0200
committerGravatar Maxime Dénès <mail@maximedenes.fr>2015-09-20 00:14:32 +0200
commitbfd0ee9503cf04b51b2dd40d4ad2a904b07ac323 (patch)
tree3cc2e5b414ab0b5a8aa00b2023982dc40ae00ca7 /toplevel
parent04e9be59051ca60bf61d5142ac14386920876926 (diff)
Fix #3948 Anomaly: unknown constant in Print Assumptions
Substitution on bound modules was incorrectly extended without sequential composition.
Diffstat (limited to 'toplevel')
-rw-r--r--toplevel/assumptions.ml12
1 files changed, 6 insertions, 6 deletions
diff --git a/toplevel/assumptions.ml b/toplevel/assumptions.ml
index 4d8ba0f78..a6bd968ef 100644
--- a/toplevel/assumptions.ml
+++ b/toplevel/assumptions.ml
@@ -55,7 +55,7 @@ let rec fields_of_functor f subs mp0 args = function
match args with
| [] -> assert false (* we should only encounter applied functors *)
| mpa :: args ->
- let subs = add_mbid mbid mpa empty_delta_resolver (*TODO*) subs in
+ let subs = join (map_mbid mbid mpa empty_delta_resolver (*TODO*)) subs in
fields_of_functor f subs mp0 args e
let rec lookup_module_in_impl mp =
@@ -64,11 +64,11 @@ let rec lookup_module_in_impl mp =
(* 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 _ | MPbound _ ->
- raise Not_found (* should have been found by [lookup_module] *)
- | MPdot (mp',lab') ->
- let fields = memoize_fields_of_mp mp' in
- search_mod_label lab' fields
+ | MPfile _ -> raise Not_found (* can happen if mp is an open module *)
+ | MPbound _ -> assert false
+ | MPdot (mp',lab') ->
+ let fields = memoize_fields_of_mp mp' in
+ search_mod_label lab' fields
and memoize_fields_of_mp mp =
try MPmap.find mp !modcache