summaryrefslogtreecommitdiff
path: root/typing/subst.ml
diff options
context:
space:
mode:
Diffstat (limited to 'typing/subst.ml')
-rw-r--r--typing/subst.ml10
1 files changed, 7 insertions, 3 deletions
diff --git a/typing/subst.ml b/typing/subst.ml
index e91e1d26cc..5ae3d1b4b6 100644
--- a/typing/subst.ml
+++ b/typing/subst.ml
@@ -458,10 +458,14 @@ let rec modtype scoping s = function
end
| Mty_signature sg ->
Mty_signature(signature scoping s sg)
- | Mty_functor(id, arg, res) ->
+ | Mty_functor(Unit, res) ->
+ Mty_functor(Unit, modtype scoping s res)
+ | Mty_functor(Named (None, arg), res) ->
+ Mty_functor(Named (None, (modtype scoping s) arg), modtype scoping s res)
+ | Mty_functor(Named (Some id, arg), res) ->
let id' = Ident.rename id in
- Mty_functor(id', Option.map (modtype scoping s) arg,
- modtype scoping (add_module id (Pident id') s) res)
+ Mty_functor(Named (Some id', (modtype scoping s) arg),
+ modtype scoping (add_module id (Pident id') s) res)
| Mty_alias p ->
Mty_alias (module_path s p)