The modules of one layer use each other freely and may go round; anything outside the layer is held to the module's uses, and a layered module with no uses reaches nothing outside it. The cycle check walks the graph with each layer as one node, so a cycle leaving a layer is refused. ludic deps shows the layers and counts the largest cycle without their own edges. Reseed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
13 lines
441 B
Text
13 lines
441 B
Text
# layers.ludic — L3: `module menu in layer app uses items`. The modules of one layer use each other
|
|
# freely and may go round (menu and hud use each other); anything outside the layer is held to the
|
|
# module's `uses` - a layered module with no uses line may reach nothing outside its layer.
|
|
#
|
|
# Running it prints: 5
|
|
import "layered/items"
|
|
import "layered/menu"
|
|
import "layered/hud"
|
|
program Layers {
|
|
entry {
|
|
print(menu_rows())
|
|
}
|
|
}
|