lib: banner purge + WHY-only comment sweep (rule 8)

Every // ---- section banner dies (132 -> 0): names carry the WHAT.
Narration deleted (filename restatements, run-with lines, what-the-
next-line-does); every ref/hare cite, task cite, divergence, ABI/
layout contract, and ownership qualifier kept (borrowed-view lines
restored where the sweep over-cut). Comment-only proven: all 442
walk-workdir .s and 32 import-probe .s byte-identical before/after;
libbyteid 56-roster all-ID.
This commit is contained in:
2026-08-08 21:10:18 +09:00
parent 659e859f34
commit aadc6618f0
90 changed files with 259 additions and 919 deletions

View File

@@ -5,19 +5,13 @@
// through it. The error channel is the return value — Hare-shaped
// tagged unions instead of errno-style integer sentinels.
//
// This file owns the eof / underread variant tags; lib/io/stream.ww
// owns the `vtable` + `stream` + read/write/close dispatchers,
// lib/io/empty.ww owns the [[empty]] singleton, and lib/io/types.ww
// owns the error union, mode/whence enums, and the reader/writer/
// closer fn-type aliases.
// #94 fold-eFinal collapsed the pre-vtable `stream` struct + `closed`
// tag into the single vtable surface; the dispatchers are read/write/
// close (over `stream`), final over `handle` at io fold-2 (#5).
package io;
// eof — read past the end of the stream. Hare uses the `done`
// singleton for EOF; ww doesn't have `done` yet so we ship a
// named-void variant tag. Lifts to `done` with #93.
// Hare uses the `done` singleton for EOF; ww doesn't have `done` yet
// so we ship a named-void variant tag. Lifts to `done` with #93.
export type eof = void;
// underread — an I/O handle hit eof partway through a fixed-size

View File

@@ -89,8 +89,7 @@ fn st_close(s: stream) (void | error) = {
};
};
// ref/hare/io/stream.ha:70-77. Clone of st_read's slot-dispatch shape
// over the new `seeker` vtable slot.
// ref/hare/io/stream.ha:70-77.
fn st_seek(s: stream, off: off, w: whence) (off | error) = {
match (s.seeker) {
case void => {
@@ -102,9 +101,8 @@ fn st_seek(s: stream, off: off, w: whence) (off | error) = {
};
};
// ref/hare/io/handle.ha:16-23. The handle-typed public read: the
// file-arm routes to os.read (Q2 layering), the stream-arm delegates to
// the unchanged st_read vtable dispatch above.
// ref/hare/io/handle.ha:16-23. The file arm routes to os.read
// directly (the Q2 layering ruling: os stays below io).
export fn read(h: handle, buf: []u8) (size | eof | error) = {
match (h) {
case let fd: file => {

View File

@@ -1,14 +1,8 @@
// types — error union, mode/whence enums, reader/writer/closer
// fn-type aliases. Project #94 fold-eFinal; the fn-aliases target
// `stream` (= `*vtable`, the single io surface).
//
// Hare splits the io module across stream.ha + types.ha and ww does
// the same: lib/io/io.ww owns the `eof` and `underread` tags;
// lib/io/stream.ww owns the vtable surface (`vtable`, `stream`,
// `read`/`write`/`close` dispatch); this file owns the surrounding
// port. The four files share `package io;` so cross-file refs
// resolve via the dir-enum concat order (io.ww < stream.ww < types.ww
// — `stream` lands before the reader/writer/closer aliases below).
// the same (#94 fold-eFinal). The four files share `package io;` so
// cross-file refs resolve via the dir-enum concat order (io.ww <
// stream.ww < types.ww — `stream` lands before the reader/writer/
// closer aliases below).
//
// Deferrals (drew-signed): `copier`, `strerror` (the #5 list's
// `handle` + `seeker` landed with the #5 arc and the memio-seeker