std: the prelude becomes a pure re-export facade — implementations move to std/core.sx, std/fmt.sx, std/list.sx
std.sx now contains only alias declarations (the re-export mechanism: own decls carry one flat-import level) over three part-files: core.sx (builtins, libc escape hatch, Source_Location/Allocator/Context/Into, the reserved `string` decl — which needs and permits no alias), fmt.sx (print/format/any_to_string/string ops/cstring/alloc_slice), list.sx (List). The namespace tail is unchanged; the part-file namespaces (core/fmt/list) carry alongside it. Consumer surface is byte-identical — every bare prelude name resolves through the aliases (0120/0121 machinery). 37 .ir snapshots re-pinned: pure string-constant renumbering from the changed import graph (digit-normalized diff is empty). Gates: zig build test 426/426, suite 588/588, m3te 23/23, game SxChess builds + bundles.
This commit is contained in:
@@ -465,8 +465,11 @@ site.)
|
||||
**Namespace aliases carry one level.** A namespaced import is an ordinary
|
||||
declaration, and flat-importing the module that declares it makes the alias
|
||||
usable in the importer — there is no `pub` keyword. The stdlib prelude uses
|
||||
exactly this: `#import "modules/std.sx"` gives every bare prelude name
|
||||
(`print`, `List`, `Context`, …) plus the carried namespaces of std's tail
|
||||
exactly this: std.sx is itself a pure re-export facade (every bare prelude
|
||||
name is an alias into the `std/core.sx` / `std/fmt.sx` / `std/list.sx`
|
||||
part-files), and `#import "modules/std.sx"` gives every bare prelude name
|
||||
(`print`, `List`, `Context`, …) plus the carried namespaces — the
|
||||
part-files (`core`, `fmt`, `list`) and std's tail
|
||||
(`mem`, `fs`, `process`, `socket`, `json`, `cli`, `hash`, `xml`, `log`, `test`):
|
||||
|
||||
```sx
|
||||
|
||||
Reference in New Issue
Block a user