summaryrefslogtreecommitdiff
path: root/typing/typedtree.ml
diff options
context:
space:
mode:
Diffstat (limited to 'typing/typedtree.ml')
-rw-r--r--typing/typedtree.ml19
1 files changed, 12 insertions, 7 deletions
diff --git a/typing/typedtree.ml b/typing/typedtree.ml
index eb5e013a41..6edaff651b 100644
--- a/typing/typedtree.ml
+++ b/typing/typedtree.ml
@@ -106,7 +106,8 @@ and expression_desc =
| Texp_setinstvar of Path.t * Path.t * string loc * expression
| Texp_override of Path.t * (Path.t * string loc * expression) list
| Texp_letmodule of
- Ident.t * string loc * Types.module_presence * module_expr * expression
+ Ident.t option * string option loc * Types.module_presence * module_expr *
+ expression
| Texp_letexception of extension_constructor * expression
| Texp_assert of expression
| Texp_lazy of expression
@@ -217,10 +218,14 @@ and module_type_constraint =
Tmodtype_implicit
| Tmodtype_explicit of module_type
+and functor_parameter =
+ | Unit
+ | Named of Ident.t option * string option loc * module_type
+
and module_expr_desc =
Tmod_ident of Path.t * Longident.t loc
| Tmod_structure of structure
- | Tmod_functor of Ident.t * string loc * module_type option * module_expr
+ | Tmod_functor of functor_parameter * module_expr
| Tmod_apply of module_expr * module_expr * module_coercion
| Tmod_constraint of
module_expr * Types.module_type * module_type_constraint * module_coercion
@@ -256,8 +261,8 @@ and structure_item_desc =
and module_binding =
{
- mb_id: Ident.t;
- mb_name: string loc;
+ mb_id: Ident.t option;
+ mb_name: string option loc;
mb_presence: module_presence;
mb_expr: module_expr;
mb_attributes: attribute list;
@@ -291,7 +296,7 @@ and module_type =
and module_type_desc =
Tmty_ident of Path.t * Longident.t loc
| Tmty_signature of signature
- | Tmty_functor of Ident.t * string loc * module_type option * module_type
+ | Tmty_functor of functor_parameter * module_type
| Tmty_with of module_type * (Path.t * Longident.t loc * with_constraint) list
| Tmty_typeof of module_expr
| Tmty_alias of Path.t * Longident.t loc
@@ -334,8 +339,8 @@ and signature_item_desc =
and module_declaration =
{
- md_id: Ident.t;
- md_name: string loc;
+ md_id: Ident.t option;
+ md_name: string option loc;
md_presence: module_presence;
md_type: module_type;
md_attributes: attribute list;