@@ -453,7 +453,19 @@ and core_type_jane_syntax ctxt attrs f (x : Jane_syntax.Core_type.t) =
453
453
(core_type1 ctxt) aliased_type
454
454
tyvar_option name
455
455
jkind_annotation jkind
456
- | _ -> pp f " @[<2>%a@]" (core_type1_jane_syntax ctxt attrs) x
456
+ | Jtyp_layout (Ltyp_poly {bound_vars = [] ; inner_type} ) ->
457
+ core_type ctxt f inner_type
458
+ | Jtyp_layout (Ltyp_poly {bound_vars; inner_type} ) ->
459
+ let jkind_poly_var f (name , jkind_opt ) =
460
+ match jkind_opt with
461
+ | Some jkind -> pp f " (%a@;:@;%a)" tyvar_loc name jkind_annotation jkind
462
+ | None -> tyvar_loc f name
463
+ in
464
+ pp f " @[<2>%a@;.@;%a@]"
465
+ (list jkind_poly_var ~sep: " @;" ) bound_vars
466
+ (core_type ctxt) inner_type
467
+ | Jtyp_tuple _ | Jtyp_layout (Ltyp_var _ ) ->
468
+ pp f " @[<2>%a@]" (core_type1_jane_syntax ctxt attrs) x
457
469
458
470
459
471
and core_type1_jane_syntax ctxt attrs f (x : Jane_syntax.Core_type.t ) =
@@ -463,7 +475,8 @@ and core_type1_jane_syntax ctxt attrs f (x : Jane_syntax.Core_type.t) =
463
475
| Jtyp_layout (Ltyp_var { name; jkind } ) ->
464
476
pp f " (%a@;:@;%a)" tyvar_option name jkind_annotation jkind
465
477
| Jtyp_tuple x -> core_type1_labeled_tuple ctxt attrs f x
466
- | _ -> paren true (core_type_jane_syntax ctxt attrs) f x
478
+ | Jtyp_layout (Ltyp_alias _ | Ltyp_poly _ ) ->
479
+ paren true (core_type_jane_syntax ctxt attrs) f x
467
480
468
481
and tyvar_option f = function
469
482
| None -> pp f " _"
0 commit comments