With LUDIC_DEPS=<file> the compiler records every reference the visibility pass resolves (from module, to module) and every assignment to another module's global. ludic deps prints the modules, dependencies, largest cycle, cross writes and globals written from outside, with --graph, --dot, --writes, --uses MOD, --check FILE and --baseline FILE. Reseed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
12 lines
334 B
Text
12 lines
334 B
Text
# tangle.ludic — the program `ludic deps` is tested on: a and b use each other (the largest cycle is
|
|
# 2), both use the leaf c (not counted), and a writes b's global b_count (one cross-module write).
|
|
#
|
|
# Running it prints: 4
|
|
import "tangle/c"
|
|
import "tangle/a"
|
|
import "tangle/b"
|
|
program Tangle {
|
|
entry {
|
|
print(a_run())
|
|
}
|
|
}
|