diff options
Diffstat (limited to 'typing')
-rw-r--r-- | typing/typeclass.ml | 29 | ||||
-rw-r--r-- | typing/typecore.ml | 18 | ||||
-rw-r--r-- | typing/typedtree.ml | 3 | ||||
-rw-r--r-- | typing/typedtree.mli | 3 |
4 files changed, 36 insertions, 17 deletions
diff --git a/typing/typeclass.ml b/typing/typeclass.ml index 44dc776b50..0c7e5a8f79 100644 --- a/typing/typeclass.ml +++ b/typing/typeclass.ml @@ -323,7 +323,9 @@ let make_method cl_num expr = [mkpat (Ppat_alias (mkpat(Ppat_var "self-*"), "self-" ^ cl_num)), expr]); - pexp_loc = expr.pexp_loc } + pexp_loc = expr.pexp_loc; + pexp_metadata =[]; + } (*******************************) @@ -594,7 +596,9 @@ let rec class_field cl_num self_type meths vars let expr = Typecore.type_exp val_env {pexp_desc = Pexp_ident (Longident.Lident (Ident.name id)); - pexp_loc = Location.none} + pexp_loc = Location.none; + pexp_metadata = []; + } in let desc = {val_type = expr.exp_type; @@ -792,7 +796,9 @@ and class_expr cl_num val_env met_env scl = false); ppat_metadata = []; }, - {pexp_loc = loc; pexp_desc = Pexp_ident(Longident.Lident"*sth*")}; + {pexp_loc = loc; pexp_desc = Pexp_ident(Longident.Lident"*sth*"); + pexp_metadata = []; + }; {ppat_loc = loc; ppat_desc = Ppat_construct(Longident.Lident"None", None, false); ppat_metadata = []; @@ -800,9 +806,12 @@ and class_expr cl_num val_env met_env scl = default] in let smatch = {pexp_loc = loc; pexp_desc = - Pexp_match({pexp_loc = loc; pexp_desc = - Pexp_ident(Longident.Lident"*opt*")}, - scases)} in + Pexp_match({pexp_loc = loc; pexp_desc = Pexp_ident(Longident.Lident"*opt*"); + pexp_metadata = []; + }, + scases); + pexp_metadata = []; + } in let sfun = {pcl_loc = scl.pcl_loc; pcl_desc = Pcl_fun(l, None, {ppat_loc = loc; @@ -828,7 +837,9 @@ and class_expr cl_num val_env met_env scl = (id, Typecore.type_exp val_env' {pexp_desc = Pexp_ident (Longident.Lident (Ident.name id)); - pexp_loc = Location.none})) + pexp_loc = Location.none; + pexp_metadata = []; + })) pv in let rec not_function = function @@ -954,7 +965,9 @@ and class_expr cl_num val_env met_env scl = let expr = Typecore.type_exp val_env {pexp_desc = Pexp_ident (Longident.Lident (Ident.name id)); - pexp_loc = Location.none} + pexp_loc = Location.none; + pexp_metadata = []; + } in Ctype.end_def (); Ctype.generalize expr.exp_type; diff --git a/typing/typecore.ml b/typing/typecore.ml index ff297a1093..68ddcc5f36 100644 --- a/typing/typecore.ml +++ b/typing/typecore.ml @@ -2049,7 +2049,9 @@ and type_expect ?in_function env sexp ty_expected = ppat_metadata = []; }, {pexp_loc = default_loc; - pexp_desc = Pexp_ident(Longident.Lident "*sth*")}; + pexp_desc = Pexp_ident(Longident.Lident "*sth*"); + pexp_metadata = []; + }; {ppat_loc = default_loc; ppat_desc = Ppat_construct(Longident.Lident "None", None, false); ppat_metadata = []; @@ -2061,11 +2063,12 @@ and type_expect ?in_function env sexp ty_expected = pexp_desc = Pexp_match ({ pexp_loc = loc; - pexp_desc = - Pexp_ident(Longident.Lident "*opt*") + pexp_desc = Pexp_ident(Longident.Lident "*opt*"); + pexp_metadata = []; }, scases - ) + ); + pexp_metadata = []; } in let sfun = { pexp_loc = loc; @@ -2078,11 +2081,12 @@ and type_expect ?in_function env sexp ty_expected = ppat_metadata = []; }, {pexp_loc = loc; - pexp_desc = - Pexp_let(Default, [spat, smatch], sbody); + pexp_desc = Pexp_let(Default, [spat, smatch], sbody); + pexp_metadata = []; } ] - ) + ); + pexp_metadata = []; } in type_expect ?in_function env sfun ty_expected | Pexp_function (l, _, caselist) -> diff --git a/typing/typedtree.ml b/typing/typedtree.ml index e2b7e285e9..ca21119726 100644 --- a/typing/typedtree.ml +++ b/typing/typedtree.ml @@ -46,7 +46,8 @@ type expression = { exp_desc: expression_desc; exp_loc: Location.t; exp_type: type_expr; - exp_env: Env.t } + exp_env: Env.t; + } and expression_desc = Texp_ident of Path.t * value_description diff --git a/typing/typedtree.mli b/typing/typedtree.mli index eb64937cfe..44ffba69d7 100644 --- a/typing/typedtree.mli +++ b/typing/typedtree.mli @@ -45,7 +45,8 @@ type expression = { exp_desc: expression_desc; exp_loc: Location.t; exp_type: type_expr; - exp_env: Env.t } + exp_env: Env.t; + } and expression_desc = Texp_ident of Path.t * value_description |