prep.1 — Type-scoped namespacing (<TypeName>.<member> resolution) #31
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First iteration of the
kernel-extension-mechanicsarc.Goal. Extend the resolver so
<TypeName>.<member>(e.g.Maybe.from_maybe,Series.at) resolves to the<member>definition in<TypeName>'s home module. Type-scoped access becomes the canonical form for type-associated operations; module-scoped form retired for that use case.Scope (from spec § Iteration prep.1):
ailang-check— try type-namespace branch first, then module-namespace fallback.TypeScopedMemberNotFound,TypeScopedReceiverNotAType.BareCrossModuleTypeRef/BadCrossModuleTypeRefto fire when a type name resolves through none of: type-scoped lookup, explicit import, kernel-tier auto-import.std_X.Y-form to type-scoped form. Hash pins refreshed in lockstep across bothcrates/ailang-core/tests/hash_pin.rsandcrates/ailang-surface/tests/prelude_module_hash_pin.rs(full blast-radius walk).Spec: docs/specs/2026-05-28-kernel-extension-mechanics.md § Iteration prep.1.
Whitepaper: design/models/kernel-extensions.md § 1. Type-scoped namespacing.