@@ -81,36 +81,40 @@ let translate_constr ~config ~params_translation ~(path : Path.t) ~type_env =
81
81
| ( ( [" FB" ; " string" ]
82
82
| [" string" ]
83
83
| [" String" ; " t" ]
84
+ | [" Stdlib_String" ; " t" ]
84
85
| [" Js" ; (" String" | " String2" ); " t" ] ),
85
86
[] ) ->
86
87
{dependencies = [] ; type_ = string_t}
87
- | ([" Js" ; " Types" ; " bigint_val" ] | [" BigInt" ; " t" ]), [] ->
88
+ | ( ([" Js" ; " Types" ; " bigint_val" ] | [" BigInt" ; " t" ] | [" Stdlib_BigInt" ; " t" ]),
89
+ [] ) ->
88
90
{dependencies = [] ; type_ = bigint_t}
89
- | ([" Js" ; " Date" ; " t" ] | [" Date" ; " t" ]), [] ->
91
+ | ([" Js" ; " Date" ; " t" ] | [" Date" ; " t" ] | [ " Stdlib_Date " ; " t " ] ), [] ->
90
92
{dependencies = [] ; type_ = date_t}
91
- | [" Map" ; " t" ], [param_translation1; param_translation2] ->
93
+ | ( ([" Map" ; " t" ] | [" Stdlib_Map" ; " t" ]),
94
+ [param_translation1; param_translation2] ) ->
92
95
{
93
96
dependencies =
94
97
param_translation1.dependencies @ param_translation2.dependencies;
95
98
type_ = map_t (param_translation1.type_, param_translation2.type_);
96
99
}
97
- | [" WeakMap" ; " t" ], [param_translation1; param_translation2] ->
100
+ | ( ([" WeakMap" ; " t" ] | [" Stdlib_WeakMap" ; " t" ]),
101
+ [param_translation1; param_translation2] ) ->
98
102
{
99
103
dependencies =
100
104
param_translation1.dependencies @ param_translation2.dependencies;
101
105
type_ = weakmap_t (param_translation1.type_, param_translation2.type_);
102
106
}
103
- | [" Set" ; " t" ], [param_translation] ->
107
+ | ( [" Set" ; " t" ] | [ " Stdlib_Set " ; " t " ]) , [param_translation] ->
104
108
{
105
109
dependencies = param_translation.dependencies;
106
110
type_ = set_t param_translation.type_;
107
111
}
108
- | [" WeakSet" ; " t" ], [param_translation] ->
112
+ | ( [" WeakSet" ; " t" ] | [ " Stdlib_WeakSet " ; " t " ]) , [param_translation] ->
109
113
{
110
114
dependencies = param_translation.dependencies;
111
115
type_ = weakset_t param_translation.type_;
112
116
}
113
- | ([" Js" ; " Re" ; " t" ] | [" RegExp" ; " t" ]), [] ->
117
+ | ([" Js" ; " Re" ; " t" ] | [" RegExp" ; " t" ] | [ " Stdlib_RegExp " ; " t " ] ), [] ->
114
118
{dependencies = [] ; type_ = regexp_t}
115
119
| ([" FB" ; " unit" ] | [" unit" ]), [] -> {dependencies = [] ; type_ = unit_t}
116
120
| ( ([" FB" ; " array" ] | [" array" ] | [" Js" ; (" Array" | " Array2" ); " t" ]),
@@ -134,7 +138,10 @@ let translate_constr ~config ~params_translation ~(path : Path.t) ~type_env =
134
138
};
135
139
] );
136
140
}
137
- | ( ([" Pervasives" ; " result" ] | [" Belt" ; " Result" ; " t" ] | [" result" ]),
141
+ | ( ( [" Pervasives" ; " result" ]
142
+ | [" Belt" ; " Result" ; " t" ]
143
+ | [" result" ]
144
+ | [" Stdlib_Result" ; " t" ] ),
138
145
[param_translation1; param_translation2] ) ->
139
146
let case name type_ = {case = {label_js = StringLabel name}; t = type_} in
140
147
let variant =
@@ -216,20 +223,28 @@ let translate_constr ~config ~params_translation ~(path : Path.t) ~type_env =
216
223
| ( ([" Js" ; " Undefined" ; " t" ] | [" Undefined" ; " t" ] | [" Js" ; " undefined" ]),
217
224
[param_translation] ) ->
218
225
{param_translation with type_ = Option param_translation.type_}
219
- | ([" Js" ; " Null" ; " t" ] | [" Null" ; " t" ] | [" Js" ; " null" ]), [param_translation]
220
- ->
226
+ | ( ( [" Js" ; " Null" ; " t" ]
227
+ | [" Null" ; " t" ]
228
+ | [" Js" ; " null" ]
229
+ | [" Stdlib_Null" ; " t" ] ),
230
+ [param_translation] ) ->
221
231
{param_translation with type_ = Null param_translation.type_}
222
232
| ( ( [" Js" ; " Nullable" ; " t" ]
223
233
| [" Nullable" ; " t" ]
224
234
| [" Js" ; " nullable" ]
225
235
| [" Js" ; " Null_undefined" ; " t" ]
226
- | [" Js" ; " null_undefined" ] ),
236
+ | [" Js" ; " null_undefined" ]
237
+ | [" Stdlib_Nullable" ; " t" ] ),
227
238
[param_translation] ) ->
228
239
{param_translation with type_ = Nullable param_translation.type_}
229
- | ( ([" Js" ; " Promise" ; " t" ] | [" Promise" ; " t" ] | [" promise" ]),
240
+ | ( ( [" Js" ; " Promise" ; " t" ]
241
+ | [" Promise" ; " t" ]
242
+ | [" promise" ]
243
+ | [" Stdlib_Promise" ; " t" ] ),
230
244
[param_translation] ) ->
231
245
{param_translation with type_ = Promise param_translation.type_}
232
- | ([" Js" ; " Dict" ; " t" ] | [" Dict" ; " t" ] | [" dict" ]), [param_translation] ->
246
+ | ( ([" Js" ; " Dict" ; " t" ] | [" Dict" ; " t" ] | [" dict" ] | [" Stdlib_Dict" ; " t" ]),
247
+ [param_translation] ) ->
233
248
{param_translation with type_ = Dict param_translation.type_}
234
249
| _ -> default_case ()
235
250
0 commit comments