Output and Diagnostics

pub fn assert(test: boolean, message: text, file: text, line: integer)

Panics with message if test is false. Use to verify invariants during development. In production mode (--production), logs an error instead of aborting. The file and line are injected by the compiler; do not pass them manually. Plan-06 phase 5a: #impure(host_io) — assertion failures write to log/stderr (host bridges serialise), so par workers may call assert.

pub fn panic(message: text, file: text, line: integer)

Immediately terminates execution with message. Use for unrecoverable error states. In production mode (--production), logs a fatal entry instead of aborting. The file and line are injected by the compiler; do not pass them manually.

pub fn log_info(message: text, file: text, line: integer)

Write a structured log record at the chosen severity. The file and line are injected by the compiler; do not pass them manually. Plan-06 phase 5a: log_* are #impure(host_io) — observable side effect (writes to log sink) but the host serialises calls across par workers, so they're par-safe.

pub fn log_warn(message: text, file: text, line: integer)
pub fn log_error(message: text, file: text, line: integer)
pub fn log_fatal(message: text, file: text, line: integer)
pub fn print(v1: text)

Writes v to standard output without a newline. Use for progress output and building up a line incrementally.

pub fn println(v1: text)
pub fn eprint(v1: text)

Writes v to standard ERROR without a newline. Companion to print() — use to separate human-readable status / progress / summary lines from machine-readable stdout (JSON, structured data piped to downstream consumers).

pub fn eprintln(v1: text)

Writes v followed by a newline to standard ERROR.