iter ctt.2: Registry.type_def_module re-key to (owning_module, bare_name)
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"schema": "ailang/v0",
|
||||
"name": "ctt2_collision_cls",
|
||||
"imports": [],
|
||||
"defs": [
|
||||
{
|
||||
"kind": "class",
|
||||
"name": "MyC",
|
||||
"param": "a",
|
||||
"methods": [
|
||||
{
|
||||
"name": "op",
|
||||
"type": {
|
||||
"k": "fn",
|
||||
"params": [{ "k": "var", "name": "a" }],
|
||||
"ret": { "k": "con", "name": "Int" },
|
||||
"effects": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"schema": "ailang/v0",
|
||||
"name": "ctt2_collision_lib",
|
||||
"imports": [{ "module": "ctt2_collision_cls" }],
|
||||
"defs": [
|
||||
{
|
||||
"kind": "type",
|
||||
"name": "Foo",
|
||||
"ctors": [{ "name": "MkLib", "fields": [] }]
|
||||
},
|
||||
{
|
||||
"kind": "instance",
|
||||
"class": "MyC",
|
||||
"type": { "k": "con", "name": "Foo" },
|
||||
"methods": [
|
||||
{
|
||||
"name": "op",
|
||||
"body": {
|
||||
"t": "lam",
|
||||
"params": ["_x"],
|
||||
"paramTypes": [{ "k": "con", "name": "Foo" }],
|
||||
"retType": { "k": "con", "name": "Int" },
|
||||
"body": { "t": "lit", "lit": { "kind": "int", "value": 2 } }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"schema": "ailang/v0",
|
||||
"name": "ctt2_collision_main",
|
||||
"imports": [
|
||||
{ "module": "ctt2_collision_cls" },
|
||||
{ "module": "ctt2_collision_lib" }
|
||||
],
|
||||
"defs": [
|
||||
{
|
||||
"kind": "type",
|
||||
"name": "Foo",
|
||||
"ctors": [{ "name": "MkMain", "fields": [] }]
|
||||
},
|
||||
{
|
||||
"kind": "instance",
|
||||
"class": "MyC",
|
||||
"type": { "k": "con", "name": "Foo" },
|
||||
"methods": [
|
||||
{
|
||||
"name": "op",
|
||||
"body": {
|
||||
"t": "lam",
|
||||
"params": ["_x"],
|
||||
"paramTypes": [{ "k": "con", "name": "Foo" }],
|
||||
"retType": { "k": "con", "name": "Int" },
|
||||
"body": { "t": "lit", "lit": { "kind": "int", "value": 1 } }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user