{ "schema": "ailang/v0", "name": "compare_primitives_smoke", "imports": [], "defs": [ { "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": "match", "scrutinee": { "t": "app", "fn": { "t": "var", "name": "compare" }, "args": [ { "t": "lit", "lit": { "kind": "int", "value": 1 } }, { "t": "lit", "lit": { "kind": "int", "value": 2 } } ] }, "arms": [ { "pat": { "p": "ctor", "ctor": "LT", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 1 } } }, { "pat": { "p": "ctor", "ctor": "EQ", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 2 } } }, { "pat": { "p": "ctor", "ctor": "GT", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 3 } } } ] }] }, "rhs": { "t": "seq", "lhs": { "t": "do", "op": "io/print_int", "args": [{ "t": "match", "scrutinee": { "t": "app", "fn": { "t": "var", "name": "compare" }, "args": [ { "t": "lit", "lit": { "kind": "int", "value": 1 } }, { "t": "lit", "lit": { "kind": "int", "value": 1 } } ] }, "arms": [ { "pat": { "p": "ctor", "ctor": "LT", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 1 } } }, { "pat": { "p": "ctor", "ctor": "EQ", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 2 } } }, { "pat": { "p": "ctor", "ctor": "GT", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 3 } } } ] }] }, "rhs": { "t": "seq", "lhs": { "t": "do", "op": "io/print_int", "args": [{ "t": "match", "scrutinee": { "t": "app", "fn": { "t": "var", "name": "compare" }, "args": [ { "t": "lit", "lit": { "kind": "int", "value": 2 } }, { "t": "lit", "lit": { "kind": "int", "value": 1 } } ] }, "arms": [ { "pat": { "p": "ctor", "ctor": "LT", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 1 } } }, { "pat": { "p": "ctor", "ctor": "EQ", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 2 } } }, { "pat": { "p": "ctor", "ctor": "GT", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 3 } } } ] }] }, "rhs": { "t": "seq", "lhs": { "t": "do", "op": "io/print_int", "args": [{ "t": "match", "scrutinee": { "t": "app", "fn": { "t": "var", "name": "compare" }, "args": [ { "t": "lit", "lit": { "kind": "bool", "value": false } }, { "t": "lit", "lit": { "kind": "bool", "value": true } } ] }, "arms": [ { "pat": { "p": "ctor", "ctor": "LT", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 1 } } }, { "pat": { "p": "ctor", "ctor": "EQ", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 2 } } }, { "pat": { "p": "ctor", "ctor": "GT", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 3 } } } ] }] }, "rhs": { "t": "seq", "lhs": { "t": "do", "op": "io/print_int", "args": [{ "t": "match", "scrutinee": { "t": "app", "fn": { "t": "var", "name": "compare" }, "args": [ { "t": "lit", "lit": { "kind": "bool", "value": false } }, { "t": "lit", "lit": { "kind": "bool", "value": false } } ] }, "arms": [ { "pat": { "p": "ctor", "ctor": "LT", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 1 } } }, { "pat": { "p": "ctor", "ctor": "EQ", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 2 } } }, { "pat": { "p": "ctor", "ctor": "GT", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 3 } } } ] }] }, "rhs": { "t": "seq", "lhs": { "t": "do", "op": "io/print_int", "args": [{ "t": "match", "scrutinee": { "t": "app", "fn": { "t": "var", "name": "compare" }, "args": [ { "t": "lit", "lit": { "kind": "bool", "value": true } }, { "t": "lit", "lit": { "kind": "bool", "value": false } } ] }, "arms": [ { "pat": { "p": "ctor", "ctor": "LT", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 1 } } }, { "pat": { "p": "ctor", "ctor": "EQ", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 2 } } }, { "pat": { "p": "ctor", "ctor": "GT", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 3 } } } ] }] }, "rhs": { "t": "seq", "lhs": { "t": "do", "op": "io/print_int", "args": [{ "t": "match", "scrutinee": { "t": "app", "fn": { "t": "var", "name": "compare" }, "args": [ { "t": "lit", "lit": { "kind": "str", "value": "a" } }, { "t": "lit", "lit": { "kind": "str", "value": "b" } } ] }, "arms": [ { "pat": { "p": "ctor", "ctor": "LT", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 1 } } }, { "pat": { "p": "ctor", "ctor": "EQ", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 2 } } }, { "pat": { "p": "ctor", "ctor": "GT", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 3 } } } ] }] }, "rhs": { "t": "seq", "lhs": { "t": "do", "op": "io/print_int", "args": [{ "t": "match", "scrutinee": { "t": "app", "fn": { "t": "var", "name": "compare" }, "args": [ { "t": "lit", "lit": { "kind": "str", "value": "a" } }, { "t": "lit", "lit": { "kind": "str", "value": "a" } } ] }, "arms": [ { "pat": { "p": "ctor", "ctor": "LT", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 1 } } }, { "pat": { "p": "ctor", "ctor": "EQ", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 2 } } }, { "pat": { "p": "ctor", "ctor": "GT", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 3 } } } ] }] }, "rhs": { "t": "do", "op": "io/print_int", "args": [{ "t": "match", "scrutinee": { "t": "app", "fn": { "t": "var", "name": "compare" }, "args": [ { "t": "lit", "lit": { "kind": "str", "value": "b" } }, { "t": "lit", "lit": { "kind": "str", "value": "a" } } ] }, "arms": [ { "pat": { "p": "ctor", "ctor": "LT", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 1 } } }, { "pat": { "p": "ctor", "ctor": "EQ", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 2 } } }, { "pat": { "p": "ctor", "ctor": "GT", "fields": [] }, "body": { "t": "lit", "lit": { "kind": "int", "value": 3 } } } ] }] } } } } } } } } } } ] }