@@ -240,11 +240,6 @@ let traslateDeclarationKind ~config ~loc ~outputFileRelative ~resolver
240
240
~record Representation:Types. Record_regular ;
241
241
]
242
242
in
243
- let inlineRecord =
244
- match constructorArgs with
245
- | Cstr_tuple _ -> false
246
- | Cstr_record _ -> true
247
- in
248
243
let argTypes =
249
244
argsTranslation
250
245
|> List. map (fun {TranslateTypeExprFromTypes. type_} -> type_)
@@ -266,36 +261,21 @@ let traslateDeclarationKind ~config ~loc ~outputFileRelative ~resolver
266
261
attributes,
267
262
argTypes,
268
263
importTypes,
269
- inlineRecord,
270
264
recordValue |> Runtime. recordValueToString ))
271
265
in
272
266
let variantsNoPayload, variantsWithPayload =
273
- variants
274
- |> List. partition (fun (_ , _ , argTypes , _ , _ , _ ) -> argTypes = [] )
267
+ variants |> List. partition (fun (_ , _ , argTypes , _ , _ ) -> argTypes = [] )
275
268
in
276
269
let noPayloads =
277
270
variantsNoPayload
278
271
|> List. map
279
- (fun
280
- ( name ,
281
- attributes ,
282
- _argTypes ,
283
- _importTypes ,
284
- _inlineRecord ,
285
- recordValue )
286
- -> {((name, attributes) |> createCase) with label = recordValue})
272
+ (fun (name , attributes , _argTypes , _importTypes , recordValue ) ->
273
+ {((name, attributes) |> createCase) with label = recordValue})
287
274
in
288
275
let payloads =
289
276
variantsWithPayload
290
277
|> List. map
291
- (fun
292
- ( name ,
293
- attributes ,
294
- argTypes ,
295
- _importTypes ,
296
- inlineRecord ,
297
- recordValue )
298
- ->
278
+ (fun (name , attributes , argTypes , _importTypes , recordValue ) ->
299
279
let type_ =
300
280
match argTypes with
301
281
| [type_] -> type_
@@ -305,7 +285,6 @@ let traslateDeclarationKind ~config ~loc ~outputFileRelative ~resolver
305
285
{
306
286
case =
307
287
{((name, attributes) |> createCase) with label = recordValue};
308
- inlineRecord;
309
288
numArgs;
310
289
t = type_;
311
290
})
@@ -324,7 +303,7 @@ let traslateDeclarationKind ~config ~loc ~outputFileRelative ~resolver
324
303
in
325
304
let importTypes =
326
305
variants
327
- |> List. map (fun (_ , _ , _ , importTypes , _ , _ ) -> importTypes)
306
+ |> List. map (fun (_ , _ , _ , importTypes , _ ) -> importTypes)
328
307
|> List. concat
329
308
in
330
309
{CodeItem. exportFromTypeDeclaration; importTypes} |> returnTypeDeclaration
0 commit comments