@@ -97,16 +97,16 @@ let ocaml_to_js_eff
9797 : arg_expression * E.t list =
9898 let arg =
9999 match arg_label with
100- | Optional ->
100+ | Arg_optional ->
101101 Js_of_lam_option. get_default_undefined_from_optional raw_arg
102- | Label | Empty -> raw_arg
102+ | Arg_label | Arg_empty -> raw_arg
103103 in
104104 match arg_type with
105105 | Arg_cst _ -> assert false
106106 | Fn_uncurry_arity _ -> assert false
107107 (* has to be preprocessed by {!Lam} module first *)
108108 | Extern_unit ->
109- (if arg_label = Empty then
109+ (if arg_label = Arg_empty then
110110 Splice0 else Splice1 E. unit ),
111111 (if Js_analyzer. no_side_effect_expression arg then
112112 []
@@ -132,7 +132,7 @@ let ocaml_to_js_eff
132132 | Unwrap ->
133133 let single_arg =
134134 match arg_label with
135- | Optional ->
135+ | Arg_optional ->
136136 (* *
137137 If this is an optional arg (like `?arg`), we have to potentially do
138138 2 levels of unwrapping:
@@ -174,8 +174,8 @@ let assemble_args_no_splice call_loc ffi
174174 match labels, args with
175175 | [] , _
176176 -> assert (args = [] ) ; empty_pair
177- | { arg_label = Empty | Label ; arg_type = Arg_cst cst } :: labels, args
178- ->
177+ | { arg_type = Arg_cst cst ; _ } :: labels, args
178+ -> (* can not be Optional *)
179179 let accs, eff = aux labels args in
180180 Lam_compile_const. translate_arg_cst cst :: accs, eff
181181 | {arg_label ; arg_type } ::labels,
@@ -201,7 +201,7 @@ let assemble_args_has_splice call_loc ffi (arg_types : specs) (args : exprs)
201201 let rec aux (labels : specs ) (args : exprs ) =
202202 match labels, args with
203203 | [] , _ -> assert (args = [] ); empty_pair
204- | { arg_label = Empty | Label ; arg_type = Arg_cst cst} :: labels , args
204+ | { arg_type = Arg_cst cst; _ } :: labels , args
205205 ->
206206 let accs, eff = aux labels args in
207207 Lam_compile_const. translate_arg_cst cst :: accs, eff
0 commit comments