Skip to content

Commit 5e06b4e

Browse files
committed
---
yaml --- r: 673 b: refs/heads/master c: e270ab6 h: refs/heads/master i: 671: 4ca4b99 v: v3
1 parent 271b1bb commit 5e06b4e

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: e6729a66ecd10a8606488e16a32812fa378bdafe
2+
refs/heads/master: e270ab6fbfcfcca44ac5ee028da2b4d91fe29419

trunk/src/boot/fe/ast.ml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -714,8 +714,12 @@ and fmt_ty_fn
714714
end;
715715
fmt_slots ff tsig.sig_input_slots None;
716716
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
719723

720724
and fmt_constrained ff (ty, constrs) : unit =
721725
fmt ff "@[";
@@ -1607,8 +1611,12 @@ and fmt_fn
16071611
fmt_ident_and_params ff id params;
16081612
fmt_header_slots ff f.fn_input_slots;
16091613
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;
16121620
fmt ff " ";
16131621
fmt_obr ff;
16141622
fmt_stmts ff f.fn_body.node;
@@ -1713,6 +1721,7 @@ and fmt_import (ff:Format.formatter) (ident:ident) (name:name) : unit =
17131721
fmt ff "import ";
17141722
fmt ff "%s = " ident;
17151723
fmt_name ff name;
1724+
fmt ff ";";
17161725

17171726
and fmt_export (ff:Format.formatter) (export:export) _ : unit =
17181727
fmt ff "@\n";
@@ -1722,7 +1731,9 @@ and fmt_export (ff:Format.formatter) (export:export) _ : unit =
17221731

17231732
and fmt_mod_view (ff:Format.formatter) (mv:mod_view) : unit =
17241733
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
17261737

17271738
and fmt_mod_items (ff:Format.formatter) (mi:mod_items) : unit =
17281739
Hashtbl.iter (fmt_mod_item ff) mi

0 commit comments

Comments
 (0)