diff options
Diffstat (limited to 'parsing/pprintast.ml')
-rw-r--r-- | parsing/pprintast.ml | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/parsing/pprintast.ml b/parsing/pprintast.ml index 29351cc02a..d20ad646d4 100644 --- a/parsing/pprintast.ml +++ b/parsing/pprintast.ml @@ -1159,14 +1159,18 @@ and signature_item ctxt f x : unit = pp f "@[<hov2>include@ %a@]%a" (module_type ctxt) incl.pincl_mod (item_attributes ctxt) incl.pincl_attributes - | Psig_modtype {pmtd_name=s; pmtd_type=md; pmtd_attributes=attrs} -> + | Psig_modtype {pmtd_name=s; pmtd_type=md; pmtd_attributes=attrs} + | Psig_modtypesubst {pmtd_name=s; pmtd_type=md; pmtd_attributes=attrs} as p -> pp f "@[<hov2>module@ type@ %s%a@]%a" s.txt - (fun f md -> match md with - | None -> () - | Some mt -> + (fun f md -> match md, p with + | None, _ -> () + | Some mt, Psig_modtype _ -> pp_print_space f () ; pp f "@ =@ %a" (module_type ctxt) mt + | Some mt, _ -> + pp_print_space f () ; + pp f "@ :=@ %a" (module_type ctxt) mt ) md (item_attributes ctxt) attrs | Psig_class_type (l) -> class_type_declaration_list ctxt f l |