feat(lang): module NAME uses A, B - a module reaches only the modules it names

A reference from a module that declares uses into a module it does not
name is refused, exported or not, naming the use and the fix. A module
with no uses clause keeps the old rule; a package's module is always
usable; a friend is not held to it; a cycle in the declared graph is
refused; LUDIC_VIS_REPORT=1 lists the violations as uses: lines. Reseed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-25 04:06:45 +03:00
parent dd6a449921
commit f4533331e7
19 changed files with 53571 additions and 50826 deletions

8
changes/module-uses.md Normal file
View file

@ -0,0 +1,8 @@
bump: minor
type: feature
**`module fishing uses base, data` - a module declares what it may reach, and the compiler holds it
to that.** A reference from a module that says `uses` into a module it does not name is refused,
exported or not, with the use and the fix in the message ("fishing uses items.inv_add (...): add
'uses items' to fishing's module line, or take it through a port"). A module with no `uses` keeps
the old rule, a package's module is always usable, a friend is not held to it, a cycle in the
declared graph is refused, and `LUDIC_VIS_REPORT=1` lists the violations as `uses:` lines.