lib/encoding/utf8+test: add strerror per Hare

This commit is contained in:
2026-05-19 16:50:02 +09:00
parent 8683202a4c
commit 2b46abe7d1
5 changed files with 44 additions and 0 deletions

View File

@@ -29,6 +29,12 @@ export type more = void;
// ref/hare/encoding/utf8/types.ha:9 — invalid UTF-8 sequence.
export type invalid = !void;
// ref/hare/encoding/utf8/types.ha:12 — fixed message; `invalid` carries
// no payload, so the rendering is constant.
export fn strerror(err: invalid) str = {
return "Invalid UTF-8";
};
// `done` is not a built-in singleton in ww (Hare ships it as part of
// the type system). Plain `void` (not `!void`): end-of-input is a
// continuation signal, not an error. lib/io spells its EOF the same