aboutsummaryrefslogtreecommitdiffhomepage
path: root/checker/subtyping.ml
diff options
context:
space:
mode:
Diffstat (limited to 'checker/subtyping.ml')
-rw-r--r--checker/subtyping.ml6
1 files changed, 2 insertions, 4 deletions
diff --git a/checker/subtyping.ml b/checker/subtyping.ml
index 0603300ba..0c97254b5 100644
--- a/checker/subtyping.ml
+++ b/checker/subtyping.ml
@@ -348,7 +348,8 @@ and check_modtypes env mtb1 mtb2 subst1 subst2 equiv =
(module_body_of_type (MPbound arg_id2) arg_t2) env
in
let env = match body_t1 with
- SEBstruct str ->
+ SEBstruct str ->
+ let env = shallow_remove_module mtb1.typ_mp env in
add_module {mod_mp = mtb1.typ_mp;
mod_expr = None;
mod_type = body_t1;
@@ -367,8 +368,5 @@ and check_modtypes env mtb1 mtb2 subst1 subst2 equiv =
else check_structure env mtb1' mtb2' equiv subst1 subst2
let check_subtypes env sup super =
- (*if sup<>super then*)
- let env = add_module (module_body_of_type sup.typ_mp sup) env
- in
check_modtypes env (strengthen sup sup.typ_mp) super empty_subst
(map_mp super.typ_mp sup.typ_mp) false