3451b5bd15
ailang_core::Workspace + load_workspace folgt imports-Feld rekursiv vom Eintrittsmodul. DFS mit Zyklus-Erkennung; Konvention: Modulname == Dateiname (.ail.json). WorkspaceLoadError sammelt strukturiert: Cycle, ModuleNotFound, ModuleNameMismatch, Schema, Io. Neues ail workspace <entry> [--json] listet erreichbare Module mit module_hash und Def-Count. Bestehende Subkommandos arbeiten weiter pro Einzelmodul (Iter 5d).
29 lines
614 B
JSON
29 lines
614 B
JSON
{
|
|
"schema": "ailang/v0",
|
|
"name": "ws_main",
|
|
"imports": [
|
|
{ "module": "ws_lib" }
|
|
],
|
|
"defs": [
|
|
{
|
|
"kind": "fn",
|
|
"name": "main",
|
|
"type": {
|
|
"k": "fn",
|
|
"params": [],
|
|
"ret": { "k": "con", "name": "Unit" },
|
|
"effects": ["IO"]
|
|
},
|
|
"params": [],
|
|
"doc": "Iter 5a fixture: Eintrittsmodul, importiert ws_lib (noch ungenutzt — Cross-Module-Aufruf folgt in 5b/5c).",
|
|
"body": {
|
|
"t": "do",
|
|
"op": "io/print_int",
|
|
"args": [
|
|
{ "t": "lit", "lit": { "kind": "int", "value": 0 } }
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|