@@ -714,8 +714,12 @@ and fmt_ty_fn
714
714
end ;
715
715
fmt_slots ff tsig.sig_input_slots None ;
716
716
fmt_decl_constrs ff tsig.sig_input_constrs;
717
- fmt ff " -> " ;
718
- fmt_slot ff tsig.sig_output_slot;
717
+ if tsig.sig_output_slot.slot_ty <> (Some TY_nil )
718
+ then
719
+ begin
720
+ fmt ff " -> " ;
721
+ fmt_slot ff tsig.sig_output_slot;
722
+ end
719
723
720
724
and fmt_constrained ff (ty , constrs ) : unit =
721
725
fmt ff " @[" ;
@@ -1607,8 +1611,12 @@ and fmt_fn
1607
1611
fmt_ident_and_params ff id params;
1608
1612
fmt_header_slots ff f.fn_input_slots;
1609
1613
fmt_decl_constrs ff f.fn_input_constrs;
1610
- fmt ff " -> " ;
1611
- fmt_slot ff f.fn_output_slot.node;
1614
+ if f.fn_output_slot.node.slot_ty <> (Some TY_nil )
1615
+ then
1616
+ begin
1617
+ fmt ff " -> " ;
1618
+ fmt_slot ff f.fn_output_slot.node;
1619
+ end ;
1612
1620
fmt ff " " ;
1613
1621
fmt_obr ff;
1614
1622
fmt_stmts ff f.fn_body.node;
@@ -1713,6 +1721,7 @@ and fmt_import (ff:Format.formatter) (ident:ident) (name:name) : unit =
1713
1721
fmt ff " import " ;
1714
1722
fmt ff " %s = " ident;
1715
1723
fmt_name ff name;
1724
+ fmt ff " ;" ;
1716
1725
1717
1726
and fmt_export (ff :Format.formatter ) (export :export ) _ : unit =
1718
1727
fmt ff " @\n " ;
@@ -1722,7 +1731,9 @@ and fmt_export (ff:Format.formatter) (export:export) _ : unit =
1722
1731
1723
1732
and fmt_mod_view (ff :Format.formatter ) (mv :mod_view ) : unit =
1724
1733
Hashtbl. iter (fmt_import ff) mv.view_imports;
1725
- Hashtbl. iter (fmt_export ff) mv.view_exports
1734
+ if not ((Hashtbl. length mv.view_exports = 1 ) &&
1735
+ (Hashtbl. mem mv.view_exports EXPORT_all_decls ))
1736
+ then Hashtbl. iter (fmt_export ff) mv.view_exports
1726
1737
1727
1738
and fmt_mod_items (ff :Format.formatter ) (mi :mod_items ) : unit =
1728
1739
Hashtbl. iter (fmt_mod_item ff) mi
0 commit comments