File tree Expand file tree Collapse file tree 8 files changed +59
-84
lines changed Expand file tree Collapse file tree 8 files changed +59
-84
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ open Ast_helper
26
26
type 'a cxt = Ast_helper .loc -> Bs_ast_mapper .mapper -> 'a
27
27
type loc = Location .t
28
28
29
-
29
+ type exp = Parsetree .expression
30
30
31
31
type label_exprs = (Longident .t Asttypes .loc * Parsetree .expression ) list
32
32
type uncurry_expression_gen =
@@ -58,26 +58,22 @@ let js_property loc obj (name : string) =
58
58
[#=],
59
59
*)
60
60
61
- (*
62
- if not (Ast_compatible.is_arg_label_simple label) then
63
- Bs_syntaxerr.err loc Label_in_uncurried_bs_attribute;
64
- *)
61
+
65
62
let generic_apply kind loc
66
63
(self : Bs_ast_mapper.mapper )
67
64
(obj : Parsetree.expression )
68
- (args : Parsetree.expression list ) cb =
65
+ (args : Parsetree.expression list ) ( cb : loc -> exp-> exp ) =
69
66
let obj = self.expr self obj in
70
67
let args =
71
68
Ext_list. map args (fun e -> self.expr self e) in
72
- let len = List. length args in
73
- let arity, fn, args =
69
+ let fn = cb loc obj in
70
+ let args =
74
71
match args with
75
72
| [ {pexp_desc =
76
73
Pexp_construct ({txt = Lident " ()" }, None )}]
77
- ->
78
- 0 , cb loc obj, []
79
- | _ ->
80
- len, cb loc obj, args in
74
+ -> []
75
+ | _ -> args in
76
+ let arity = List. length args in
81
77
if arity < 10 then
82
78
let txt =
83
79
match kind with
Original file line number Diff line number Diff line change @@ -45,6 +45,9 @@ let f (x : < bark : string -> unit [@bs.meth] ; fight : unit -> unit [@bs.meth]
45
45
x##bark " he" ;
46
46
x##fight ()
47
47
48
+ (* This type is generated on the fly -- in which case
49
+ it can not be nominal
50
+ *)
48
51
let ff
49
52
(fn :('a0 -> 'a1 -> 'a2 -> 'a3 -> 'a4 -> 'a5 -> 'a6 -> 'a7 -> 'a8 -> 'a9 -> 'a10 -> 'a11 -> 'a12 [@bs]) ) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 =
50
53
fn a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 [@ bs]
Original file line number Diff line number Diff line change @@ -44742,7 +44742,7 @@ open Ast_helper
44742
44742
type 'a cxt = Ast_helper.loc -> Bs_ast_mapper.mapper -> 'a
44743
44743
type loc = Location.t
44744
44744
44745
-
44745
+ type exp = Parsetree.expression
44746
44746
44747
44747
type label_exprs = (Longident.t Asttypes.loc * Parsetree.expression) list
44748
44748
type uncurry_expression_gen =
@@ -44774,26 +44774,22 @@ let js_property loc obj (name : string) =
44774
44774
[#=],
44775
44775
*)
44776
44776
44777
- (*
44778
- if not (Ast_compatible.is_arg_label_simple label) then
44779
- Bs_syntaxerr.err loc Label_in_uncurried_bs_attribute;
44780
- *)
44777
+
44781
44778
let generic_apply kind loc
44782
44779
(self : Bs_ast_mapper.mapper)
44783
44780
(obj : Parsetree.expression)
44784
- (args : Parsetree.expression list) cb =
44781
+ (args : Parsetree.expression list) (cb : loc -> exp-> exp) =
44785
44782
let obj = self.expr self obj in
44786
44783
let args =
44787
44784
Ext_list.map args (fun e -> self.expr self e) in
44788
- let len = List.length args in
44789
- let arity, fn, args =
44785
+ let fn = cb loc obj in
44786
+ let args =
44790
44787
match args with
44791
44788
| [ {pexp_desc =
44792
44789
Pexp_construct ({txt = Lident "()"}, None)}]
44793
- ->
44794
- 0, cb loc obj, []
44795
- | _ ->
44796
- len, cb loc obj, args in
44790
+ -> []
44791
+ | _ -> args in
44792
+ let arity = List.length args in
44797
44793
if arity < 10 then
44798
44794
let txt =
44799
44795
match kind with
Original file line number Diff line number Diff line change @@ -302480,7 +302480,7 @@ open Ast_helper
302480
302480
type 'a cxt = Ast_helper.loc -> Bs_ast_mapper.mapper -> 'a
302481
302481
type loc = Location.t
302482
302482
302483
-
302483
+ type exp = Parsetree.expression
302484
302484
302485
302485
type label_exprs = (Longident.t Asttypes.loc * Parsetree.expression) list
302486
302486
type uncurry_expression_gen =
@@ -302512,26 +302512,22 @@ let js_property loc obj (name : string) =
302512
302512
[#=],
302513
302513
*)
302514
302514
302515
- (*
302516
- if not (Ast_compatible.is_arg_label_simple label) then
302517
- Bs_syntaxerr.err loc Label_in_uncurried_bs_attribute;
302518
- *)
302515
+
302519
302516
let generic_apply kind loc
302520
302517
(self : Bs_ast_mapper.mapper)
302521
302518
(obj : Parsetree.expression)
302522
- (args : Parsetree.expression list) cb =
302519
+ (args : Parsetree.expression list) (cb : loc -> exp-> exp) =
302523
302520
let obj = self.expr self obj in
302524
302521
let args =
302525
302522
Ext_list.map args (fun e -> self.expr self e) in
302526
- let len = List.length args in
302527
- let arity, fn, args =
302523
+ let fn = cb loc obj in
302524
+ let args =
302528
302525
match args with
302529
302526
| [ {pexp_desc =
302530
302527
Pexp_construct ({txt = Lident "()"}, None)}]
302531
- ->
302532
- 0, cb loc obj, []
302533
- | _ ->
302534
- len, cb loc obj, args in
302528
+ -> []
302529
+ | _ -> args in
302530
+ let arity = List.length args in
302535
302531
if arity < 10 then
302536
302532
let txt =
302537
302533
match kind with
Original file line number Diff line number Diff line change @@ -23027,7 +23027,7 @@ open Ast_helper
23027
23027
type 'a cxt = Ast_helper.loc -> Bs_ast_mapper.mapper -> 'a
23028
23028
type loc = Location.t
23029
23029
23030
-
23030
+ type exp = Parsetree.expression
23031
23031
23032
23032
type label_exprs = (Longident.t Asttypes.loc * Parsetree.expression) list
23033
23033
type uncurry_expression_gen =
@@ -23059,26 +23059,22 @@ let js_property loc obj (name : string) =
23059
23059
[#=],
23060
23060
*)
23061
23061
23062
- (*
23063
- if not (Ast_compatible.is_arg_label_simple label) then
23064
- Bs_syntaxerr.err loc Label_in_uncurried_bs_attribute;
23065
- *)
23062
+
23066
23063
let generic_apply kind loc
23067
23064
(self : Bs_ast_mapper.mapper)
23068
23065
(obj : Parsetree.expression)
23069
- (args : Parsetree.expression list) cb =
23066
+ (args : Parsetree.expression list) (cb : loc -> exp-> exp) =
23070
23067
let obj = self.expr self obj in
23071
23068
let args =
23072
23069
Ext_list.map args (fun e -> self.expr self e) in
23073
- let len = List.length args in
23074
- let arity, fn, args =
23070
+ let fn = cb loc obj in
23071
+ let args =
23075
23072
match args with
23076
23073
| [ {pexp_desc =
23077
23074
Pexp_construct ({txt = Lident "()"}, None)}]
23078
- ->
23079
- 0, cb loc obj, []
23080
- | _ ->
23081
- len, cb loc obj, args in
23075
+ -> []
23076
+ | _ -> args in
23077
+ let arity = List.length args in
23082
23078
if arity < 10 then
23083
23079
let txt =
23084
23080
match kind with
Original file line number Diff line number Diff line change @@ -302133,7 +302133,7 @@ open Ast_helper
302133
302133
type 'a cxt = Ast_helper.loc -> Bs_ast_mapper.mapper -> 'a
302134
302134
type loc = Location.t
302135
302135
302136
-
302136
+ type exp = Parsetree.expression
302137
302137
302138
302138
type label_exprs = (Longident.t Asttypes.loc * Parsetree.expression) list
302139
302139
type uncurry_expression_gen =
@@ -302165,26 +302165,22 @@ let js_property loc obj (name : string) =
302165
302165
[#=],
302166
302166
*)
302167
302167
302168
- (*
302169
- if not (Ast_compatible.is_arg_label_simple label) then
302170
- Bs_syntaxerr.err loc Label_in_uncurried_bs_attribute;
302171
- *)
302168
+
302172
302169
let generic_apply kind loc
302173
302170
(self : Bs_ast_mapper.mapper)
302174
302171
(obj : Parsetree.expression)
302175
- (args : Parsetree.expression list) cb =
302172
+ (args : Parsetree.expression list) (cb : loc -> exp-> exp) =
302176
302173
let obj = self.expr self obj in
302177
302174
let args =
302178
302175
Ext_list.map args (fun e -> self.expr self e) in
302179
- let len = List.length args in
302180
- let arity, fn, args =
302176
+ let fn = cb loc obj in
302177
+ let args =
302181
302178
match args with
302182
302179
| [ {pexp_desc =
302183
302180
Pexp_construct ({txt = Lident "()"}, None)}]
302184
- ->
302185
- 0, cb loc obj, []
302186
- | _ ->
302187
- len, cb loc obj, args in
302181
+ -> []
302182
+ | _ -> args in
302183
+ let arity = List.length args in
302188
302184
if arity < 10 then
302189
302185
let txt =
302190
302186
match kind with
Original file line number Diff line number Diff line change @@ -21360,7 +21360,7 @@ open Ast_helper
21360
21360
type 'a cxt = Ast_helper.loc -> Bs_ast_mapper.mapper -> 'a
21361
21361
type loc = Location.t
21362
21362
21363
-
21363
+ type exp = Parsetree.expression
21364
21364
21365
21365
type label_exprs = (Longident.t Asttypes.loc * Parsetree.expression) list
21366
21366
type uncurry_expression_gen =
@@ -21392,26 +21392,22 @@ let js_property loc obj (name : string) =
21392
21392
[#=],
21393
21393
*)
21394
21394
21395
- (*
21396
- if not (Ast_compatible.is_arg_label_simple label) then
21397
- Bs_syntaxerr.err loc Label_in_uncurried_bs_attribute;
21398
- *)
21395
+
21399
21396
let generic_apply kind loc
21400
21397
(self : Bs_ast_mapper.mapper)
21401
21398
(obj : Parsetree.expression)
21402
- (args : Parsetree.expression list) cb =
21399
+ (args : Parsetree.expression list) (cb : loc -> exp-> exp) =
21403
21400
let obj = self.expr self obj in
21404
21401
let args =
21405
21402
Ext_list.map args (fun e -> self.expr self e) in
21406
- let len = List.length args in
21407
- let arity, fn, args =
21403
+ let fn = cb loc obj in
21404
+ let args =
21408
21405
match args with
21409
21406
| [ {pexp_desc =
21410
21407
Pexp_construct ({txt = Lident "()"}, None)}]
21411
- ->
21412
- 0, cb loc obj, []
21413
- | _ ->
21414
- len, cb loc obj, args in
21408
+ -> []
21409
+ | _ -> args in
21410
+ let arity = List.length args in
21415
21411
if arity < 10 then
21416
21412
let txt =
21417
21413
match kind with
Original file line number Diff line number Diff line change @@ -410128,7 +410128,7 @@ open Ast_helper
410128
410128
type 'a cxt = Ast_helper.loc -> Bs_ast_mapper.mapper -> 'a
410129
410129
type loc = Location.t
410130
410130
410131
-
410131
+ type exp = Parsetree.expression
410132
410132
410133
410133
type label_exprs = (Longident.t Asttypes.loc * Parsetree.expression) list
410134
410134
type uncurry_expression_gen =
@@ -410160,26 +410160,22 @@ let js_property loc obj (name : string) =
410160
410160
[#=],
410161
410161
*)
410162
410162
410163
- (*
410164
- if not (Ast_compatible.is_arg_label_simple label) then
410165
- Bs_syntaxerr.err loc Label_in_uncurried_bs_attribute;
410166
- *)
410163
+
410167
410164
let generic_apply kind loc
410168
410165
(self : Bs_ast_mapper.mapper)
410169
410166
(obj : Parsetree.expression)
410170
- (args : Parsetree.expression list) cb =
410167
+ (args : Parsetree.expression list) (cb : loc -> exp-> exp) =
410171
410168
let obj = self.expr self obj in
410172
410169
let args =
410173
410170
Ext_list.map args (fun e -> self.expr self e) in
410174
- let len = List.length args in
410175
- let arity, fn, args =
410171
+ let fn = cb loc obj in
410172
+ let args =
410176
410173
match args with
410177
410174
| [ {pexp_desc =
410178
410175
Pexp_construct ({txt = Lident "()"}, None)}]
410179
- ->
410180
- 0, cb loc obj, []
410181
- | _ ->
410182
- len, cb loc obj, args in
410176
+ -> []
410177
+ | _ -> args in
410178
+ let arity = List.length args in
410183
410179
if arity < 10 then
410184
410180
let txt =
410185
410181
match kind with
You can’t perform that action at this time.
0 commit comments