iter 22b.3.5: workspace fixpoint loop — dedup + synth-append

This commit is contained in:
2026-05-09 20:52:07 +02:00
parent d2954010ea
commit dd87b36e00
5 changed files with 278 additions and 29 deletions
@@ -0,0 +1,55 @@
{
"schema": "ailang/v0",
"name": "test_22b3_dup_call_sites",
"imports": [],
"defs": [
{
"kind": "class", "name": "Show", "param": "a",
"methods": [{
"name": "show",
"type": {
"k": "fn", "params": [{ "k": "var", "name": "a" }],
"ret": { "k": "con", "name": "Str" }, "effects": []
}
}]
},
{
"kind": "instance",
"class": "Show",
"type": { "k": "con", "name": "Int" },
"methods": [{
"name": "show",
"body": {
"t": "lam",
"params": ["x"],
"paramTypes": [{ "k": "var", "name": "a" }],
"retType": { "k": "con", "name": "Str" },
"body": { "t": "lit", "lit": { "kind": "str", "value": "n" } }
}
}]
},
{
"kind": "fn",
"name": "main",
"type": {
"k": "fn", "params": [], "ret": { "k": "con", "name": "Str" },
"effects": []
},
"params": [],
"body": {
"t": "let",
"name": "_a",
"value": {
"t": "app",
"fn": { "t": "var", "name": "show" },
"args": [{ "t": "lit", "lit": { "kind": "int", "value": 5 } }]
},
"body": {
"t": "app",
"fn": { "t": "var", "name": "show" },
"args": [{ "t": "lit", "lit": { "kind": "int", "value": 7 } }]
}
}
}
]
}
+42
View File
@@ -0,0 +1,42 @@
{
"schema": "ailang/v0",
"name": "test_22b3_no_call_sites",
"imports": [],
"defs": [
{
"kind": "class", "name": "Show", "param": "a",
"methods": [{
"name": "show",
"type": {
"k": "fn", "params": [{ "k": "var", "name": "a" }],
"ret": { "k": "con", "name": "Str" }, "effects": []
}
}]
},
{
"kind": "instance",
"class": "Show",
"type": { "k": "con", "name": "Int" },
"methods": [{
"name": "show",
"body": {
"t": "lam",
"params": ["x"],
"paramTypes": [{ "k": "var", "name": "a" }],
"retType": { "k": "con", "name": "Str" },
"body": { "t": "lit", "lit": { "kind": "str", "value": "n" } }
}
}]
},
{
"kind": "fn",
"name": "main",
"type": {
"k": "fn", "params": [], "ret": { "k": "con", "name": "Str" },
"effects": []
},
"params": [],
"body": { "t": "lit", "lit": { "kind": "str", "value": "no-call" } }
}
]
}