summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--typing/typemod.ml2
1 files changed, 2 insertions, 0 deletions
diff --git a/typing/typemod.ml b/typing/typemod.ml
index 7e3860703..2070ab7ec 100644
--- a/typing/typemod.ml
+++ b/typing/typemod.ml
@@ -1350,6 +1350,8 @@ let type_module_type_of env smod =
mod_loc = smod.pmod_loc }
| _ -> type_module env smod in
let mty = tmty.mod_type in
+ (* expand modtype identifiers and aliases (at root) *)
+ let mty = Env.scrape_alias env mty in
(* PR#5037: clean up inferred signature to remove duplicate specs *)
let mty = simplify_modtype mty in
(* PR#5036: must not contain non-generalized type variables *)