{ "schema": "ailang/v0", "name": "test_22b3_coherence_two_instances", "imports": [], "defs": [ { "kind": "class", "name": "R", "param": "a", "methods": [{ "name": "r", "type": { "k": "fn", "params": [{ "k": "var", "name": "a" }], "ret": { "k": "con", "name": "Int" }, "effects": [] } }] }, { "kind": "instance", "class": "R", "type": { "k": "con", "name": "Int" }, "methods": [{ "name": "r", "body": { "t": "lam", "params": ["x"], "paramTypes": [{ "k": "var", "name": "a" }], "retType": { "k": "con", "name": "Int" }, "body": { "t": "lit", "lit": { "kind": "int", "value": 11 } } } }] }, { "kind": "instance", "class": "R", "type": { "k": "con", "name": "Bool" }, "methods": [{ "name": "r", "body": { "t": "lam", "params": ["b"], "paramTypes": [{ "k": "var", "name": "a" }], "retType": { "k": "con", "name": "Int" }, "body": { "t": "lit", "lit": { "kind": "int", "value": 22 } } } }] }, { "kind": "fn", "name": "main", "type": { "k": "fn", "params": [], "ret": { "k": "con", "name": "Unit" }, "effects": ["IO"] }, "params": [], "body": { "t": "seq", "lhs": { "t": "do", "op": "io/print_int", "args": [{ "t": "app", "fn": { "t": "var", "name": "r" }, "args": [{ "t": "lit", "lit": { "kind": "int", "value": 0 } }] }] }, "rhs": { "t": "do", "op": "io/print_int", "args": [{ "t": "app", "fn": { "t": "var", "name": "r" }, "args": [{ "t": "lit", "lit": { "kind": "bool", "value": true } }] }] } } } ] }