lib+test: fmt rename fprint→fdprint; add io.stream fprint sink

This commit is contained in:
2026-05-15 11:34:47 +09:00
parent e6045f3ada
commit 0ef94eef04
7 changed files with 485 additions and 40 deletions

View File

@@ -29,7 +29,7 @@ Signatures mirror Hare too, modulo:
- Call-site variadic sugar matches Hare. `fn f(args: T...)` declares
a Hare-style variadic; call sites either gather N args into a
fresh `[]T` (`fmt.println(42, "hi", true)`) or forward an existing
slice with `xs...` (`fprintln(fd, args...)`). The bare `T...` form
slice with `xs...` (`fdprintln(fd, args...)`). The bare `T...` form
in tagged unions still means spread-flatten (`(...inner | E)`);
the two uses don't overlap because `T...` only attaches to a
*param* decl. `lib/fmt` is intentionally print-string-only — no