// io — stream interface (Plan 9 Bio / Hare io::stream shape). // // No closures, no methods. A `stream` is a pointer to a `vtable` of // function pointers (lib/io/stream.ww); read/write/close dispatch // through it. The error channel is the return value — Hare-shaped // tagged unions instead of errno-style integer sentinels. // // #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; // 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 // read. Payload is the byte count actually delivered. Mirrors // Hare's `io::underread = !size`; ww uses i32 because the // underlying buffer-length type is i32 today. export type underread = !i32;