@@ -81,36 +81,40 @@ let translate_constr ~config ~params_translation ~(path : Path.t) ~type_env =
8181 | ( ( [" FB" ; " string" ]
8282 | [" string" ]
8383 | [" String" ; " t" ]
84+ | [" Stdlib_String" ; " t" ]
8485 | [" Js" ; (" String" | " String2" ); " t" ] ),
8586 [] ) ->
8687 {dependencies = [] ; type_ = string_t}
87- | ([" Js" ; " Types" ; " bigint_val" ] | [" BigInt" ; " t" ]), [] ->
88+ | ( ([" Js" ; " Types" ; " bigint_val" ] | [" BigInt" ; " t" ] | [" Stdlib_BigInt" ; " t" ]),
89+ [] ) ->
8890 {dependencies = [] ; type_ = bigint_t}
89- | ([" Js" ; " Date" ; " t" ] | [" Date" ; " t" ]), [] ->
91+ | ([" Js" ; " Date" ; " t" ] | [" Date" ; " t" ] | [ " Stdlib_Date " ; " t " ] ), [] ->
9092 {dependencies = [] ; type_ = date_t}
91- | [" Map" ; " t" ], [param_translation1; param_translation2] ->
93+ | ( ([" Map" ; " t" ] | [" Stdlib_Map" ; " t" ]),
94+ [param_translation1; param_translation2] ) ->
9295 {
9396 dependencies =
9497 param_translation1.dependencies @ param_translation2.dependencies;
9598 type_ = map_t (param_translation1.type_, param_translation2.type_);
9699 }
97- | [" WeakMap" ; " t" ], [param_translation1; param_translation2] ->
100+ | ( ([" WeakMap" ; " t" ] | [" Stdlib_WeakMap" ; " t" ]),
101+ [param_translation1; param_translation2] ) ->
98102 {
99103 dependencies =
100104 param_translation1.dependencies @ param_translation2.dependencies;
101105 type_ = weakmap_t (param_translation1.type_, param_translation2.type_);
102106 }
103- | [" Set" ; " t" ], [param_translation] ->
107+ | ( [" Set" ; " t" ] | [ " Stdlib_Set " ; " t " ]) , [param_translation] ->
104108 {
105109 dependencies = param_translation.dependencies;
106110 type_ = set_t param_translation.type_;
107111 }
108- | [" WeakSet" ; " t" ], [param_translation] ->
112+ | ( [" WeakSet" ; " t" ] | [ " Stdlib_WeakSet " ; " t " ]) , [param_translation] ->
109113 {
110114 dependencies = param_translation.dependencies;
111115 type_ = weakset_t param_translation.type_;
112116 }
113- | ([" Js" ; " Re" ; " t" ] | [" RegExp" ; " t" ]), [] ->
117+ | ([" Js" ; " Re" ; " t" ] | [" RegExp" ; " t" ] | [ " Stdlib_RegExp " ; " t " ] ), [] ->
114118 {dependencies = [] ; type_ = regexp_t}
115119 | ([" FB" ; " unit" ] | [" unit" ]), [] -> {dependencies = [] ; type_ = unit_t}
116120 | ( ([" FB" ; " array" ] | [" array" ] | [" Js" ; (" Array" | " Array2" ); " t" ]),
@@ -134,7 +138,10 @@ let translate_constr ~config ~params_translation ~(path : Path.t) ~type_env =
134138 };
135139 ] );
136140 }
137- | ( ([" Pervasives" ; " result" ] | [" Belt" ; " Result" ; " t" ] | [" result" ]),
141+ | ( ( [" Pervasives" ; " result" ]
142+ | [" Belt" ; " Result" ; " t" ]
143+ | [" result" ]
144+ | [" Stdlib_Result" ; " t" ] ),
138145 [param_translation1; param_translation2] ) ->
139146 let case name type_ = {case = {label_js = StringLabel name}; t = type_} in
140147 let variant =
@@ -216,20 +223,28 @@ let translate_constr ~config ~params_translation ~(path : Path.t) ~type_env =
216223 | ( ([" Js" ; " Undefined" ; " t" ] | [" Undefined" ; " t" ] | [" Js" ; " undefined" ]),
217224 [param_translation] ) ->
218225 {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] ) ->
221231 {param_translation with type_ = Null param_translation.type_}
222232 | ( ( [" Js" ; " Nullable" ; " t" ]
223233 | [" Nullable" ; " t" ]
224234 | [" Js" ; " nullable" ]
225235 | [" Js" ; " Null_undefined" ; " t" ]
226- | [" Js" ; " null_undefined" ] ),
236+ | [" Js" ; " null_undefined" ]
237+ | [" Stdlib_Nullable" ; " t" ] ),
227238 [param_translation] ) ->
228239 {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" ] ),
230244 [param_translation] ) ->
231245 {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] ) ->
233248 {param_translation with type_ = Dict param_translation.type_}
234249 | _ -> default_case ()
235250
0 commit comments