File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -396,16 +396,16 @@ let transl_declaration env sdecl id =
396
396
let tcstrs, cstrs = List. split (List. map make_cstr scstrs) in
397
397
Ttype_variant tcstrs, Type_variant cstrs
398
398
| Ptype_record lbls ->
399
- let hasOptional attrs = Ext_list. exists attrs (fun ({txt } ,_ ) -> txt = " optional" ) in
400
- let optionalLabels =
401
- Ext_list. filter_map lbls
402
- (fun lbl -> if hasOptional lbl.pld_attributes then Some lbl.pld_name.txt else None ) in
399
+ let has_optional attrs = Ext_list. exists attrs (fun ({txt } ,_ ) -> txt = " optional" ) in
400
+ let optionalLabels =
401
+ Ext_list. filter_map lbls
402
+ (fun lbl -> if has_optional lbl.pld_attributes then Some lbl.pld_name.txt else None ) in
403
403
let lbls =
404
404
if optionalLabels = [] then lbls
405
405
else Ext_list. map lbls (fun lbl ->
406
406
let typ = lbl.pld_type in
407
407
let typ =
408
- if hasOptional lbl.pld_attributes then
408
+ if has_optional lbl.pld_attributes then
409
409
{typ with ptyp_desc = Ptyp_constr ({txt = Lident " option" ; loc= typ.ptyp_loc}, [typ])}
410
410
else typ in
411
411
{lbl with pld_type = typ }) in
You can’t perform that action at this time.
0 commit comments