summaryrefslogtreecommitdiffstats
path: root/typing/envaux.ml
diff options
context:
space:
mode:
authorAlain Frisch <alain@frisch.fr>2013-09-27 17:05:39 +0000
committerAlain Frisch <alain@frisch.fr>2013-09-27 17:05:39 +0000
commitcc31694f7ca1043080fc290e5a82520513cf7f94 (patch)
tree1123085352316cb8df8a26157ec4070882f899fe /typing/envaux.ml
parentc0778758c1bc167ac0f9d5725bb886bc26540bc9 (diff)
Keep attributes on module declarations.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14195 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'typing/envaux.ml')
-rw-r--r--typing/envaux.ml10
1 files changed, 6 insertions, 4 deletions
diff --git a/typing/envaux.ml b/typing/envaux.ml
index a1582c6b9..6e13502d6 100644
--- a/typing/envaux.ml
+++ b/typing/envaux.ml
@@ -52,8 +52,9 @@ let rec env_from_summary sum subst =
(Subst.exception_declaration subst desc)
(env_from_summary s subst)
| Env_module(s, id, desc) ->
- Env.add_module id (Subst.modtype subst desc)
- (env_from_summary s subst)
+ Env.add_module_declaration id
+ (Subst.module_declaration subst desc)
+ (env_from_summary s subst)
| Env_modtype(s, id, desc) ->
Env.add_modtype id (Subst.modtype_declaration subst desc)
(env_from_summary s subst)
@@ -66,13 +67,14 @@ let rec env_from_summary sum subst =
| Env_open(s, path) ->
let env = env_from_summary s subst in
let path' = Subst.module_path subst path in
- let mty =
+ let md =
try
Env.find_module path' env
with Not_found ->
raise (Error (Module_not_found path'))
in
- Env.open_signature Asttypes.Override path' (extract_sig env mty) env
+ Env.open_signature Asttypes.Override path'
+ (extract_sig env md.md_type) env
in
Hashtbl.add env_cache (sum, subst) env;
env