@@ -909,10 +909,11 @@ and fmt_core_type c ?(box = true) ?pro ?(pro_space = true) ?constraint_ctx
909909 $ space_break $ fmt_longident_loc c lid )
910910 | Ptyp_extension ext ->
911911 hvbox c.conf.fmt_opts.extension_indent.v (fmt_extension c ctx ext)
912- | Ptyp_package (id , cnstrs ) ->
912+ | Ptyp_package (id , cnstrs , attrs ) ->
913913 hvbox 2
914914 ( hovbox 0 (str " module" $ space_break $ fmt_longident_loc c id)
915- $ fmt_package_type c ctx cnstrs )
915+ $ fmt_package_type c ctx cnstrs
916+ $ fmt_attributes c attrs )
916917 | Ptyp_open (lid , typ ) ->
917918 hvbox 2
918919 ( hvbox 0 (fmt_longident_loc c lid $ str " .(" )
@@ -1293,13 +1294,14 @@ and fmt_pattern ?ext c ?pro ?parens ?(box = false)
12931294 | Ppat_unpack (name , pt ) ->
12941295 let fmt_constraint_opt pt k =
12951296 match pt with
1296- | Some (id , cnstrs ) ->
1297+ | Some (id , cnstrs , attrs ) ->
12971298 hovbox 0
12981299 (Params. parens_if parens c.conf
12991300 (hvbox 1
13001301 ( hovbox 0
13011302 (k $ space_break $ str " : " $ fmt_longident_loc c id)
1302- $ fmt_package_type c ctx cnstrs ) ) )
1303+ $ fmt_package_type c ctx cnstrs
1304+ $ fmt_attributes c attrs ) ) )
13031305 | None -> wrap_fits_breaks_if ~space: false c.conf parens " (" " )" k
13041306 in
13051307 fmt_constraint_opt pt
@@ -2594,10 +2596,11 @@ and fmt_expression c ?(box = true) ?(pro = noop) ?eol ?parens
25942596 and epi = cls_paren in
25952597 let fmt_mod m =
25962598 match pt with
2597- | Some (id , cnstrs ) ->
2599+ | Some (id , cnstrs , attrs ) ->
25982600 hvbox 2
25992601 ( hovbox 0 (m $ space_break $ str " : " $ fmt_longident_loc c id)
2600- $ fmt_package_type c ctx cnstrs )
2602+ $ fmt_package_type c ctx cnstrs
2603+ $ fmt_attributes c attrs )
26012604 | None -> m
26022605 in
26032606 outer_pro
@@ -4330,11 +4333,12 @@ and fmt_module_expr ?(dock_struct = true) c ({ast= m; _} as xmod) =
43304333 (str " end" $ fmt_attributes_and_docstrings c pmod_attributes)
43314334 $ after ) }
43324335 | Pmod_unpack (e , ty1 , ty2 ) ->
4333- let package_type sep (lid , cstrs ) =
4336+ let package_type sep (lid , cstrs , attrs ) =
43344337 break 1 (Params.Indent. mod_unpack_annot c.conf)
43354338 $ hovbox 0
43364339 ( hovbox 0 (str sep $ fmt_longident_loc c lid)
4337- $ fmt_package_type c ctx cstrs )
4340+ $ fmt_package_type c ctx cstrs
4341+ $ fmt_attributes c attrs )
43384342 in
43394343 { empty with
43404344 opn= Some (open_hvbox 2 )
0 commit comments