@@ -240,11 +240,6 @@ let traslateDeclarationKind ~config ~loc ~outputFileRelative ~resolver
240240 ~record Representation:Types. Record_regular ;
241241 ]
242242 in
243- let inlineRecord =
244- match constructorArgs with
245- | Cstr_tuple _ -> false
246- | Cstr_record _ -> true
247- in
248243 let argTypes =
249244 argsTranslation
250245 |> List. map (fun {TranslateTypeExprFromTypes. type_} -> type_)
@@ -266,36 +261,21 @@ let traslateDeclarationKind ~config ~loc ~outputFileRelative ~resolver
266261 attributes,
267262 argTypes,
268263 importTypes,
269- inlineRecord,
270264 recordValue |> Runtime. recordValueToString ))
271265 in
272266 let variantsNoPayload, variantsWithPayload =
273- variants
274- |> List. partition (fun (_ , _ , argTypes , _ , _ , _ ) -> argTypes = [] )
267+ variants |> List. partition (fun (_ , _ , argTypes , _ , _ ) -> argTypes = [] )
275268 in
276269 let noPayloads =
277270 variantsNoPayload
278271 |> 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})
287274 in
288275 let payloads =
289276 variantsWithPayload
290277 |> List. map
291- (fun
292- ( name ,
293- attributes ,
294- argTypes ,
295- _importTypes ,
296- inlineRecord ,
297- recordValue )
298- ->
278+ (fun (name , attributes , argTypes , _importTypes , recordValue ) ->
299279 let type_ =
300280 match argTypes with
301281 | [type_] -> type_
@@ -305,7 +285,6 @@ let traslateDeclarationKind ~config ~loc ~outputFileRelative ~resolver
305285 {
306286 case =
307287 {((name, attributes) |> createCase) with label = recordValue};
308- inlineRecord;
309288 numArgs;
310289 t = type_;
311290 })
@@ -324,7 +303,7 @@ let traslateDeclarationKind ~config ~loc ~outputFileRelative ~resolver
324303 in
325304 let importTypes =
326305 variants
327- |> List. map (fun (_ , _ , _ , importTypes , _ , _ ) -> importTypes)
306+ |> List. map (fun (_ , _ , _ , importTypes , _ ) -> importTypes)
328307 |> List. concat
329308 in
330309 {CodeItem. exportFromTypeDeclaration; importTypes} |> returnTypeDeclaration
0 commit comments