@kernlang/core 3.5.9-canary.218.1.77aa9b0c → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/capability-matrix.js +8 -6
- package/dist/capability-matrix.js.map +1 -1
- package/dist/closure-eligibility.d.ts +104 -0
- package/dist/closure-eligibility.js +443 -0
- package/dist/closure-eligibility.js.map +1 -0
- package/dist/closure-python-lowering.d.ts +26 -0
- package/dist/closure-python-lowering.js +132 -22
- package/dist/closure-python-lowering.js.map +1 -1
- package/dist/codegen/body-ts.js +13 -0
- package/dist/codegen/body-ts.js.map +1 -1
- package/dist/codegen/type-system.js +50 -3
- package/dist/codegen/type-system.js.map +1 -1
- package/dist/codegen-core.js +29 -0
- package/dist/codegen-core.js.map +1 -1
- package/dist/codegen-expression.js +7 -0
- package/dist/codegen-expression.js.map +1 -1
- package/dist/constructor-super.d.ts +34 -0
- package/dist/constructor-super.js +122 -0
- package/dist/constructor-super.js.map +1 -0
- package/dist/core-contracts/boolean.d.ts +147 -0
- package/dist/core-contracts/boolean.js +110 -0
- package/dist/core-contracts/boolean.js.map +1 -0
- package/dist/core-contracts/function.d.ts +6 -0
- package/dist/core-contracts/function.js +7 -0
- package/dist/core-contracts/function.js.map +1 -0
- package/dist/core-contracts/index.d.ts +1032 -0
- package/dist/core-contracts/index.js +30 -0
- package/dist/core-contracts/index.js.map +1 -0
- package/dist/core-contracts/list.d.ts +87 -0
- package/dist/core-contracts/list.js +54 -0
- package/dist/core-contracts/list.js.map +1 -0
- package/dist/core-contracts/nullish.d.ts +12 -0
- package/dist/core-contracts/nullish.js +13 -0
- package/dist/core-contracts/nullish.js.map +1 -0
- package/dist/core-contracts/number.d.ts +291 -0
- package/dist/core-contracts/number.js +214 -0
- package/dist/core-contracts/number.js.map +1 -0
- package/dist/core-contracts/record.d.ts +60 -0
- package/dist/core-contracts/record.js +32 -0
- package/dist/core-contracts/record.js.map +1 -0
- package/dist/core-contracts/schema.d.ts +71 -0
- package/dist/core-contracts/schema.js +98 -0
- package/dist/core-contracts/schema.js.map +1 -0
- package/dist/core-contracts/semantics.d.ts +7 -0
- package/dist/core-contracts/semantics.js +221 -0
- package/dist/core-contracts/semantics.js.map +1 -0
- package/dist/core-contracts/string.d.ts +414 -0
- package/dist/core-contracts/string.js +335 -0
- package/dist/core-contracts/string.js.map +1 -0
- package/dist/core-runtime/contract-adapter.d.ts +8 -0
- package/dist/core-runtime/contract-adapter.js +73 -0
- package/dist/core-runtime/contract-adapter.js.map +1 -0
- package/dist/core-runtime/index.d.ts +109 -0
- package/dist/core-runtime/index.js +1946 -0
- package/dist/core-runtime/index.js.map +1 -0
- package/dist/core-runtime/shape-validator.d.ts +61 -0
- package/dist/core-runtime/shape-validator.js +564 -0
- package/dist/core-runtime/shape-validator.js.map +1 -0
- package/dist/core-runtime/value-brand.d.ts +2 -0
- package/dist/core-runtime/value-brand.js +6 -0
- package/dist/core-runtime/value-brand.js.map +1 -0
- package/dist/decompiler.js +46 -0
- package/dist/decompiler.js.map +1 -1
- package/dist/eligibility-taxonomy.d.ts +58 -0
- package/dist/eligibility-taxonomy.generated.d.ts +472 -0
- package/dist/eligibility-taxonomy.generated.js +566 -0
- package/dist/eligibility-taxonomy.generated.js.map +1 -0
- package/dist/eligibility-taxonomy.js +55 -0
- package/dist/eligibility-taxonomy.js.map +1 -0
- package/dist/index.d.ts +19 -2
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/dist/instanceof-rhs.d.ts +53 -0
- package/dist/instanceof-rhs.js +74 -0
- package/dist/instanceof-rhs.js.map +1 -0
- package/dist/ir/semantics/lambda.js +9 -1
- package/dist/ir/semantics/lambda.js.map +1 -1
- package/dist/native-eligibility-ast.d.ts +5 -0
- package/dist/native-eligibility-ast.js +242 -63
- package/dist/native-eligibility-ast.js.map +1 -1
- package/dist/parser-expression.d.ts +1 -1
- package/dist/parser-expression.js +90 -1
- package/dist/parser-expression.js.map +1 -1
- package/dist/rag-assertions.d.ts +3 -0
- package/dist/rag-assertions.js +15 -0
- package/dist/rag-assertions.js.map +1 -0
- package/dist/rag-runtime.d.ts +169 -0
- package/dist/rag-runtime.js +823 -0
- package/dist/rag-runtime.js.map +1 -0
- package/dist/schema.d.ts +1 -0
- package/dist/schema.js +197 -2
- package/dist/schema.js.map +1 -1
- package/dist/semantic-substrate.d.ts +108 -0
- package/dist/semantic-substrate.js +263 -0
- package/dist/semantic-substrate.js.map +1 -0
- package/dist/semantic-validator.d.ts +332 -0
- package/dist/semantic-validator.js +3387 -0
- package/dist/semantic-validator.js.map +1 -1
- package/dist/spec.d.ts +2 -2
- package/dist/spec.js +15 -1
- package/dist/spec.js.map +1 -1
- package/dist/value-ir.d.ts +11 -1
- package/dist/value-ir.js.map +1 -1
- package/package.json +5 -1
|
@@ -0,0 +1,1032 @@
|
|
|
1
|
+
export { BOOLEAN_CONTRACT } from './boolean.js';
|
|
2
|
+
export { FUNCTION_CONTRACT } from './function.js';
|
|
3
|
+
export { LIST_CONTRACT } from './list.js';
|
|
4
|
+
export { NULL_CONTRACT, UNDEFINED_CONTRACT } from './nullish.js';
|
|
5
|
+
export { NUMBER_CONTRACT } from './number.js';
|
|
6
|
+
export { RECORD_CONTRACT } from './record.js';
|
|
7
|
+
export type { CoreFixture, CoreFixtureError, CoreFixtureValue, CoreGraphEdge, CoreLowerings, CoreOperation, CoreOperationKind, CoreOperationReturns, CoreTypeContract, CoreTypeContractRegistry, CoreTypeKind, CoreTypeName, } from './schema.js';
|
|
8
|
+
export { CORE_FIXTURE_FUNCTION, CORE_FIXTURE_UNDEFINED, CORE_TYPE_NAMES, contractToGraphEdges, isCoreFixtureFunction, isCoreFixtureUndefined, } from './schema.js';
|
|
9
|
+
export { CoreContractEvaluationError, coreFixtureValueType, evaluateCoreContractOperation, } from './semantics.js';
|
|
10
|
+
export { STRING_CONTRACT } from './string.js';
|
|
11
|
+
export declare const CORE_TYPE_CONTRACTS: {
|
|
12
|
+
readonly schemaVersion: 1;
|
|
13
|
+
readonly types: {
|
|
14
|
+
readonly String: {
|
|
15
|
+
readonly name: "String";
|
|
16
|
+
readonly kind: "primitive";
|
|
17
|
+
readonly strict: true;
|
|
18
|
+
readonly operations: readonly [{
|
|
19
|
+
readonly id: "String.length";
|
|
20
|
+
readonly kind: "property";
|
|
21
|
+
readonly args: readonly ["String"];
|
|
22
|
+
readonly returns: "Number";
|
|
23
|
+
readonly lowers: {
|
|
24
|
+
readonly kern: "String.length($0)";
|
|
25
|
+
readonly ts: "__kernStringLength($0)";
|
|
26
|
+
readonly python: "__kern_string_length($0)";
|
|
27
|
+
};
|
|
28
|
+
readonly fixtures: readonly [{
|
|
29
|
+
readonly args: readonly [""];
|
|
30
|
+
readonly returns: 0;
|
|
31
|
+
}, {
|
|
32
|
+
readonly args: readonly ["kern"];
|
|
33
|
+
readonly returns: 4;
|
|
34
|
+
}, {
|
|
35
|
+
readonly args: readonly ["𐐷"];
|
|
36
|
+
readonly returns: 1;
|
|
37
|
+
}, {
|
|
38
|
+
readonly args: readonly ["é"];
|
|
39
|
+
readonly returns: 2;
|
|
40
|
+
}];
|
|
41
|
+
readonly review: {
|
|
42
|
+
readonly summary: "KERN string length counts Unicode code points with no normalization.";
|
|
43
|
+
readonly graph: readonly ["String", "Number", "portable", "unicode-code-point"];
|
|
44
|
+
};
|
|
45
|
+
}, {
|
|
46
|
+
readonly id: "String.index";
|
|
47
|
+
readonly kind: "method";
|
|
48
|
+
readonly args: readonly ["String", "Number"];
|
|
49
|
+
readonly returns: readonly ["String", "Undefined"];
|
|
50
|
+
readonly lowers: {
|
|
51
|
+
readonly kern: "String.index($0, $1)";
|
|
52
|
+
readonly ts: "__kernStringIndex($0, $1)";
|
|
53
|
+
readonly python: "__kern_string_index($0, $1)";
|
|
54
|
+
};
|
|
55
|
+
readonly fixtures: readonly [{
|
|
56
|
+
readonly args: readonly ["abc", 1];
|
|
57
|
+
readonly returns: "b";
|
|
58
|
+
}, {
|
|
59
|
+
readonly args: readonly ["a𐐷b", 1];
|
|
60
|
+
readonly returns: "𐐷";
|
|
61
|
+
}, {
|
|
62
|
+
readonly args: readonly ["abc", 4];
|
|
63
|
+
readonly returns: {
|
|
64
|
+
readonly __kernFixture: "Undefined";
|
|
65
|
+
};
|
|
66
|
+
}, {
|
|
67
|
+
readonly args: readonly ["abc", -1];
|
|
68
|
+
readonly returns: {
|
|
69
|
+
readonly __kernFixture: "Undefined";
|
|
70
|
+
};
|
|
71
|
+
}, {
|
|
72
|
+
readonly args: readonly ["abc", 1.2];
|
|
73
|
+
readonly returns: {
|
|
74
|
+
readonly __kernFixture: "Undefined";
|
|
75
|
+
};
|
|
76
|
+
}, {
|
|
77
|
+
readonly args: readonly ["abc", "1"];
|
|
78
|
+
readonly throws: {
|
|
79
|
+
readonly code: "strict-type";
|
|
80
|
+
readonly message: "String.index expects String, Number.";
|
|
81
|
+
};
|
|
82
|
+
}];
|
|
83
|
+
readonly review: {
|
|
84
|
+
readonly summary: "Strict string indexing over Unicode code-point offsets; negative, fractional, and out-of-range misses return Undefined.";
|
|
85
|
+
readonly graph: readonly ["String", "Undefined", "strict", "portable", "unicode-code-point"];
|
|
86
|
+
};
|
|
87
|
+
}, {
|
|
88
|
+
readonly id: "String.includes";
|
|
89
|
+
readonly kind: "method";
|
|
90
|
+
readonly args: readonly ["String", "String"];
|
|
91
|
+
readonly returns: "Boolean";
|
|
92
|
+
readonly lowers: {
|
|
93
|
+
readonly kern: "String.includes($0, $1)";
|
|
94
|
+
readonly ts: "__kernStringIncludes($0, $1)";
|
|
95
|
+
readonly python: "__kern_string_includes($0, $1)";
|
|
96
|
+
};
|
|
97
|
+
readonly fixtures: readonly [{
|
|
98
|
+
readonly args: readonly ["abc", "b"];
|
|
99
|
+
readonly returns: true;
|
|
100
|
+
}, {
|
|
101
|
+
readonly args: readonly ["abc", "x"];
|
|
102
|
+
readonly returns: false;
|
|
103
|
+
}];
|
|
104
|
+
readonly review: {
|
|
105
|
+
readonly summary: "Strict string containment.";
|
|
106
|
+
readonly graph: readonly ["String", "Boolean", "portable"];
|
|
107
|
+
};
|
|
108
|
+
}, {
|
|
109
|
+
readonly id: "String.startsWith";
|
|
110
|
+
readonly kind: "method";
|
|
111
|
+
readonly args: readonly ["String", "String"];
|
|
112
|
+
readonly returns: "Boolean";
|
|
113
|
+
readonly lowers: {
|
|
114
|
+
readonly kern: "String.startsWith($0, $1)";
|
|
115
|
+
readonly ts: "__kernStringStartsWith($0, $1)";
|
|
116
|
+
readonly python: "__kern_string_starts_with($0, $1)";
|
|
117
|
+
};
|
|
118
|
+
readonly fixtures: readonly [{
|
|
119
|
+
readonly args: readonly ["kern", "ke"];
|
|
120
|
+
readonly returns: true;
|
|
121
|
+
}, {
|
|
122
|
+
readonly args: readonly ["kern", "rn"];
|
|
123
|
+
readonly returns: false;
|
|
124
|
+
}];
|
|
125
|
+
readonly review: {
|
|
126
|
+
readonly summary: "Strict string prefix test.";
|
|
127
|
+
readonly graph: readonly ["String", "Boolean", "portable"];
|
|
128
|
+
};
|
|
129
|
+
}, {
|
|
130
|
+
readonly id: "String.endsWith";
|
|
131
|
+
readonly kind: "method";
|
|
132
|
+
readonly args: readonly ["String", "String"];
|
|
133
|
+
readonly returns: "Boolean";
|
|
134
|
+
readonly lowers: {
|
|
135
|
+
readonly kern: "String.endsWith($0, $1)";
|
|
136
|
+
readonly ts: "__kernStringEndsWith($0, $1)";
|
|
137
|
+
readonly python: "__kern_string_ends_with($0, $1)";
|
|
138
|
+
};
|
|
139
|
+
readonly fixtures: readonly [{
|
|
140
|
+
readonly args: readonly ["kern", "rn"];
|
|
141
|
+
readonly returns: true;
|
|
142
|
+
}, {
|
|
143
|
+
readonly args: readonly ["kern", "ke"];
|
|
144
|
+
readonly returns: false;
|
|
145
|
+
}];
|
|
146
|
+
readonly review: {
|
|
147
|
+
readonly summary: "Strict string suffix test.";
|
|
148
|
+
readonly graph: readonly ["String", "Boolean", "portable"];
|
|
149
|
+
};
|
|
150
|
+
}, {
|
|
151
|
+
readonly id: "String.slice";
|
|
152
|
+
readonly kind: "method";
|
|
153
|
+
readonly args: readonly ["String", "Number", "Number"];
|
|
154
|
+
readonly returns: "String";
|
|
155
|
+
readonly lowers: {
|
|
156
|
+
readonly kern: "String.slice($0, $1, $2)";
|
|
157
|
+
readonly ts: "__kernStringSlice($0, $1, $2)";
|
|
158
|
+
readonly python: "__kern_string_slice($0, $1, $2)";
|
|
159
|
+
};
|
|
160
|
+
readonly fixtures: readonly [{
|
|
161
|
+
readonly args: readonly ["abcdef", 1, 4];
|
|
162
|
+
readonly returns: "bcd";
|
|
163
|
+
}, {
|
|
164
|
+
readonly args: readonly ["abcdef", 1.9, 4.2];
|
|
165
|
+
readonly returns: "bcd";
|
|
166
|
+
}, {
|
|
167
|
+
readonly args: readonly ["abc", 0, 2];
|
|
168
|
+
readonly returns: "ab";
|
|
169
|
+
}, {
|
|
170
|
+
readonly args: readonly ["abcdef", -3, -1];
|
|
171
|
+
readonly returns: "de";
|
|
172
|
+
}, {
|
|
173
|
+
readonly args: readonly ["abcdef", -20, 2];
|
|
174
|
+
readonly returns: "ab";
|
|
175
|
+
}, {
|
|
176
|
+
readonly args: readonly ["abcdef", 4, 2];
|
|
177
|
+
readonly returns: "";
|
|
178
|
+
}, {
|
|
179
|
+
readonly args: readonly ["a𐐷b", 1, 2];
|
|
180
|
+
readonly returns: "𐐷";
|
|
181
|
+
}, {
|
|
182
|
+
readonly args: readonly ["éx", 0, 2];
|
|
183
|
+
readonly returns: "é";
|
|
184
|
+
}, {
|
|
185
|
+
readonly args: readonly ["abc", "0", 2];
|
|
186
|
+
readonly throws: {
|
|
187
|
+
readonly code: "strict-type";
|
|
188
|
+
readonly message: "String.slice expects String, Number, Number.";
|
|
189
|
+
};
|
|
190
|
+
}, {
|
|
191
|
+
readonly args: readonly ["abc", 1];
|
|
192
|
+
readonly throws: {
|
|
193
|
+
readonly code: "strict-type";
|
|
194
|
+
readonly message: "String.slice expects String, Number, Number.";
|
|
195
|
+
};
|
|
196
|
+
}];
|
|
197
|
+
readonly review: {
|
|
198
|
+
readonly summary: "Strict string slice over Unicode code-point offsets with explicit start and end offsets; negative offsets count from the end.";
|
|
199
|
+
readonly graph: readonly ["String", "Number", "strict", "portable", "unicode-code-point"];
|
|
200
|
+
};
|
|
201
|
+
}, {
|
|
202
|
+
readonly id: "String.trim";
|
|
203
|
+
readonly kind: "method";
|
|
204
|
+
readonly args: readonly ["String"];
|
|
205
|
+
readonly returns: "String";
|
|
206
|
+
readonly lowers: {
|
|
207
|
+
readonly kern: "String.trim($0)";
|
|
208
|
+
readonly ts: "__kernStringTrim($0)";
|
|
209
|
+
readonly python: "__kern_string_trim($0)";
|
|
210
|
+
};
|
|
211
|
+
readonly fixtures: readonly [{
|
|
212
|
+
readonly args: readonly [" kern "];
|
|
213
|
+
readonly returns: "kern";
|
|
214
|
+
}, {
|
|
215
|
+
readonly args: readonly ["\ncore\t"];
|
|
216
|
+
readonly returns: "core";
|
|
217
|
+
}];
|
|
218
|
+
readonly review: {
|
|
219
|
+
readonly summary: "Portable surrounding whitespace trim.";
|
|
220
|
+
readonly graph: readonly ["String", "portable"];
|
|
221
|
+
};
|
|
222
|
+
}, {
|
|
223
|
+
readonly id: "String.lower";
|
|
224
|
+
readonly kind: "method";
|
|
225
|
+
readonly args: readonly ["String"];
|
|
226
|
+
readonly returns: "String";
|
|
227
|
+
readonly lowers: {
|
|
228
|
+
readonly kern: "String.lower($0)";
|
|
229
|
+
readonly ts: "__kernStringLower($0)";
|
|
230
|
+
readonly python: "__kern_string_lower($0)";
|
|
231
|
+
};
|
|
232
|
+
readonly fixtures: readonly [{
|
|
233
|
+
readonly args: readonly ["KERN"];
|
|
234
|
+
readonly returns: "kern";
|
|
235
|
+
}, {
|
|
236
|
+
readonly args: readonly ["Core"];
|
|
237
|
+
readonly returns: "core";
|
|
238
|
+
}];
|
|
239
|
+
readonly review: {
|
|
240
|
+
readonly summary: "Portable lowercase conversion.";
|
|
241
|
+
readonly graph: readonly ["String", "portable"];
|
|
242
|
+
};
|
|
243
|
+
}, {
|
|
244
|
+
readonly id: "String.upper";
|
|
245
|
+
readonly kind: "method";
|
|
246
|
+
readonly args: readonly ["String"];
|
|
247
|
+
readonly returns: "String";
|
|
248
|
+
readonly lowers: {
|
|
249
|
+
readonly kern: "String.upper($0)";
|
|
250
|
+
readonly ts: "__kernStringUpper($0)";
|
|
251
|
+
readonly python: "__kern_string_upper($0)";
|
|
252
|
+
};
|
|
253
|
+
readonly fixtures: readonly [{
|
|
254
|
+
readonly args: readonly ["kern"];
|
|
255
|
+
readonly returns: "KERN";
|
|
256
|
+
}, {
|
|
257
|
+
readonly args: readonly ["Core"];
|
|
258
|
+
readonly returns: "CORE";
|
|
259
|
+
}];
|
|
260
|
+
readonly review: {
|
|
261
|
+
readonly summary: "Portable uppercase conversion.";
|
|
262
|
+
readonly graph: readonly ["String", "portable"];
|
|
263
|
+
};
|
|
264
|
+
}, {
|
|
265
|
+
readonly id: "String.concat";
|
|
266
|
+
readonly kind: "method";
|
|
267
|
+
readonly args: readonly ["String", "String"];
|
|
268
|
+
readonly returns: "String";
|
|
269
|
+
readonly lowers: {
|
|
270
|
+
readonly kern: "String.concat($0, $1)";
|
|
271
|
+
readonly ts: "__kernStringConcat($0, $1)";
|
|
272
|
+
readonly python: "__kern_string_concat($0, $1)";
|
|
273
|
+
};
|
|
274
|
+
readonly fixtures: readonly [{
|
|
275
|
+
readonly args: readonly ["kern", "lang"];
|
|
276
|
+
readonly returns: "kernlang";
|
|
277
|
+
}, {
|
|
278
|
+
readonly args: readonly ["count:", 2];
|
|
279
|
+
readonly throws: {
|
|
280
|
+
readonly code: "strict-type";
|
|
281
|
+
readonly message: "String.concat expects String, String.";
|
|
282
|
+
};
|
|
283
|
+
}];
|
|
284
|
+
readonly review: {
|
|
285
|
+
readonly summary: "Strict string concatenation; both operands must be String.";
|
|
286
|
+
readonly graph: readonly ["String", "strict", "portable"];
|
|
287
|
+
};
|
|
288
|
+
}, {
|
|
289
|
+
readonly id: "String.equals";
|
|
290
|
+
readonly kind: "method";
|
|
291
|
+
readonly args: readonly ["String", "String"];
|
|
292
|
+
readonly returns: "Boolean";
|
|
293
|
+
readonly lowers: {
|
|
294
|
+
readonly kern: "String.equals($0, $1)";
|
|
295
|
+
readonly ts: "__kernStringEquals($0, $1)";
|
|
296
|
+
readonly python: "__kern_string_equals($0, $1)";
|
|
297
|
+
};
|
|
298
|
+
readonly fixtures: readonly [{
|
|
299
|
+
readonly args: readonly ["kern", "kern"];
|
|
300
|
+
readonly returns: true;
|
|
301
|
+
}, {
|
|
302
|
+
readonly args: readonly ["kern", "core"];
|
|
303
|
+
readonly returns: false;
|
|
304
|
+
}, {
|
|
305
|
+
readonly args: readonly ["kern", true];
|
|
306
|
+
readonly throws: {
|
|
307
|
+
readonly code: "strict-type";
|
|
308
|
+
readonly message: "String.equals expects String, String.";
|
|
309
|
+
};
|
|
310
|
+
}];
|
|
311
|
+
readonly review: {
|
|
312
|
+
readonly summary: "Strict string equality; cross-type equality is a type error in schema v1.";
|
|
313
|
+
readonly graph: readonly ["String", "Boolean", "strict", "portable"];
|
|
314
|
+
};
|
|
315
|
+
}, {
|
|
316
|
+
readonly id: "String.lessThan";
|
|
317
|
+
readonly kind: "operator";
|
|
318
|
+
readonly args: readonly ["String", "String"];
|
|
319
|
+
readonly returns: "Boolean";
|
|
320
|
+
readonly lowers: {
|
|
321
|
+
readonly kern: "String.lessThan($0, $1)";
|
|
322
|
+
readonly ts: "__kernStringLessThan($0, $1)";
|
|
323
|
+
readonly python: "__kern_string_less_than($0, $1)";
|
|
324
|
+
};
|
|
325
|
+
readonly fixtures: readonly [{
|
|
326
|
+
readonly args: readonly ["abc", "abd"];
|
|
327
|
+
readonly returns: true;
|
|
328
|
+
}, {
|
|
329
|
+
readonly args: readonly ["abc", "abc"];
|
|
330
|
+
readonly returns: false;
|
|
331
|
+
}, {
|
|
332
|
+
readonly args: readonly ["abc", true];
|
|
333
|
+
readonly throws: {
|
|
334
|
+
readonly code: "strict-type";
|
|
335
|
+
readonly message: "String.lessThan expects String, String.";
|
|
336
|
+
};
|
|
337
|
+
}];
|
|
338
|
+
readonly review: {
|
|
339
|
+
readonly summary: "Strict string less-than comparison using KERN portable code-point ordering.";
|
|
340
|
+
readonly graph: readonly ["String", "Boolean", "strict", "portable", "unicode-code-point-order"];
|
|
341
|
+
};
|
|
342
|
+
}, {
|
|
343
|
+
readonly id: "String.lessThanOrEqual";
|
|
344
|
+
readonly kind: "operator";
|
|
345
|
+
readonly args: readonly ["String", "String"];
|
|
346
|
+
readonly returns: "Boolean";
|
|
347
|
+
readonly lowers: {
|
|
348
|
+
readonly kern: "String.lessThanOrEqual($0, $1)";
|
|
349
|
+
readonly ts: "__kernStringLessThanOrEqual($0, $1)";
|
|
350
|
+
readonly python: "__kern_string_less_than_or_equal($0, $1)";
|
|
351
|
+
};
|
|
352
|
+
readonly fixtures: readonly [{
|
|
353
|
+
readonly args: readonly ["abc", "abc"];
|
|
354
|
+
readonly returns: true;
|
|
355
|
+
}, {
|
|
356
|
+
readonly args: readonly ["abd", "abc"];
|
|
357
|
+
readonly returns: false;
|
|
358
|
+
}];
|
|
359
|
+
readonly review: {
|
|
360
|
+
readonly summary: "Strict string less-than-or-equal comparison using KERN portable code-point ordering.";
|
|
361
|
+
readonly graph: readonly ["String", "Boolean", "strict", "portable", "unicode-code-point-order"];
|
|
362
|
+
};
|
|
363
|
+
}, {
|
|
364
|
+
readonly id: "String.greaterThan";
|
|
365
|
+
readonly kind: "operator";
|
|
366
|
+
readonly args: readonly ["String", "String"];
|
|
367
|
+
readonly returns: "Boolean";
|
|
368
|
+
readonly lowers: {
|
|
369
|
+
readonly kern: "String.greaterThan($0, $1)";
|
|
370
|
+
readonly ts: "__kernStringGreaterThan($0, $1)";
|
|
371
|
+
readonly python: "__kern_string_greater_than($0, $1)";
|
|
372
|
+
};
|
|
373
|
+
readonly fixtures: readonly [{
|
|
374
|
+
readonly args: readonly ["abd", "abc"];
|
|
375
|
+
readonly returns: true;
|
|
376
|
+
}, {
|
|
377
|
+
readonly args: readonly ["abc", "abc"];
|
|
378
|
+
readonly returns: false;
|
|
379
|
+
}];
|
|
380
|
+
readonly review: {
|
|
381
|
+
readonly summary: "Strict string greater-than comparison using KERN portable code-point ordering.";
|
|
382
|
+
readonly graph: readonly ["String", "Boolean", "strict", "portable", "unicode-code-point-order"];
|
|
383
|
+
};
|
|
384
|
+
}, {
|
|
385
|
+
readonly id: "String.greaterThanOrEqual";
|
|
386
|
+
readonly kind: "operator";
|
|
387
|
+
readonly args: readonly ["String", "String"];
|
|
388
|
+
readonly returns: "Boolean";
|
|
389
|
+
readonly lowers: {
|
|
390
|
+
readonly kern: "String.greaterThanOrEqual($0, $1)";
|
|
391
|
+
readonly ts: "__kernStringGreaterThanOrEqual($0, $1)";
|
|
392
|
+
readonly python: "__kern_string_greater_than_or_equal($0, $1)";
|
|
393
|
+
};
|
|
394
|
+
readonly fixtures: readonly [{
|
|
395
|
+
readonly args: readonly ["abc", "abc"];
|
|
396
|
+
readonly returns: true;
|
|
397
|
+
}, {
|
|
398
|
+
readonly args: readonly ["abc", "abd"];
|
|
399
|
+
readonly returns: false;
|
|
400
|
+
}];
|
|
401
|
+
readonly review: {
|
|
402
|
+
readonly summary: "Strict string greater-than-or-equal comparison using KERN portable code-point ordering.";
|
|
403
|
+
readonly graph: readonly ["String", "Boolean", "strict", "portable", "unicode-code-point-order"];
|
|
404
|
+
};
|
|
405
|
+
}, {
|
|
406
|
+
readonly id: "String.toString";
|
|
407
|
+
readonly kind: "coercion";
|
|
408
|
+
readonly args: readonly ["String"];
|
|
409
|
+
readonly returns: "String";
|
|
410
|
+
readonly lowers: {
|
|
411
|
+
readonly kern: "String.toString($0)";
|
|
412
|
+
readonly ts: "__kernStringToString($0)";
|
|
413
|
+
readonly python: "__kern_string_to_string($0)";
|
|
414
|
+
};
|
|
415
|
+
readonly fixtures: readonly [{
|
|
416
|
+
readonly args: readonly ["kern"];
|
|
417
|
+
readonly returns: "kern";
|
|
418
|
+
}, {
|
|
419
|
+
readonly args: readonly [""];
|
|
420
|
+
readonly returns: "";
|
|
421
|
+
}];
|
|
422
|
+
readonly review: {
|
|
423
|
+
readonly summary: "String identity coercion.";
|
|
424
|
+
readonly graph: readonly ["String", "portable"];
|
|
425
|
+
};
|
|
426
|
+
}];
|
|
427
|
+
};
|
|
428
|
+
readonly Boolean: {
|
|
429
|
+
readonly name: "Boolean";
|
|
430
|
+
readonly kind: "primitive";
|
|
431
|
+
readonly strict: true;
|
|
432
|
+
readonly operations: readonly [{
|
|
433
|
+
readonly id: "Boolean.not";
|
|
434
|
+
readonly kind: "method";
|
|
435
|
+
readonly args: readonly ["Boolean"];
|
|
436
|
+
readonly returns: "Boolean";
|
|
437
|
+
readonly lowers: {
|
|
438
|
+
readonly kern: "Boolean.not($0)";
|
|
439
|
+
readonly ts: "__kernBooleanNot($0)";
|
|
440
|
+
readonly python: "__kern_boolean_not($0)";
|
|
441
|
+
};
|
|
442
|
+
readonly fixtures: readonly [{
|
|
443
|
+
readonly args: readonly [true];
|
|
444
|
+
readonly returns: false;
|
|
445
|
+
}, {
|
|
446
|
+
readonly args: readonly [false];
|
|
447
|
+
readonly returns: true;
|
|
448
|
+
}];
|
|
449
|
+
readonly review: {
|
|
450
|
+
readonly summary: "Strict boolean negation.";
|
|
451
|
+
readonly graph: readonly ["Boolean", "portable"];
|
|
452
|
+
};
|
|
453
|
+
}, {
|
|
454
|
+
readonly id: "Boolean.and";
|
|
455
|
+
readonly kind: "method";
|
|
456
|
+
readonly args: readonly ["Boolean", "Boolean"];
|
|
457
|
+
readonly returns: "Boolean";
|
|
458
|
+
readonly lowers: {
|
|
459
|
+
readonly kern: "Boolean.and($0, $1)";
|
|
460
|
+
readonly ts: "__kernBooleanAnd($0, $1)";
|
|
461
|
+
readonly python: "__kern_boolean_and($0, $1)";
|
|
462
|
+
};
|
|
463
|
+
readonly fixtures: readonly [{
|
|
464
|
+
readonly args: readonly [true, true];
|
|
465
|
+
readonly returns: true;
|
|
466
|
+
}, {
|
|
467
|
+
readonly args: readonly [true, false];
|
|
468
|
+
readonly returns: false;
|
|
469
|
+
}, {
|
|
470
|
+
readonly args: readonly [false, true];
|
|
471
|
+
readonly returns: false;
|
|
472
|
+
}, {
|
|
473
|
+
readonly args: readonly [true, "true"];
|
|
474
|
+
readonly throws: {
|
|
475
|
+
readonly code: "strict-type";
|
|
476
|
+
readonly message: "Boolean.and expects Boolean, Boolean.";
|
|
477
|
+
};
|
|
478
|
+
}, {
|
|
479
|
+
readonly args: readonly [true, 1];
|
|
480
|
+
readonly throws: {
|
|
481
|
+
readonly code: "strict-type";
|
|
482
|
+
readonly message: "Boolean.and expects Boolean, Boolean.";
|
|
483
|
+
};
|
|
484
|
+
}];
|
|
485
|
+
readonly review: {
|
|
486
|
+
readonly summary: "Strict boolean conjunction; both operands must be Boolean.";
|
|
487
|
+
readonly graph: readonly ["Boolean", "strict", "portable"];
|
|
488
|
+
};
|
|
489
|
+
}, {
|
|
490
|
+
readonly id: "Boolean.or";
|
|
491
|
+
readonly kind: "method";
|
|
492
|
+
readonly args: readonly ["Boolean", "Boolean"];
|
|
493
|
+
readonly returns: "Boolean";
|
|
494
|
+
readonly lowers: {
|
|
495
|
+
readonly kern: "Boolean.or($0, $1)";
|
|
496
|
+
readonly ts: "__kernBooleanOr($0, $1)";
|
|
497
|
+
readonly python: "__kern_boolean_or($0, $1)";
|
|
498
|
+
};
|
|
499
|
+
readonly fixtures: readonly [{
|
|
500
|
+
readonly args: readonly [false, false];
|
|
501
|
+
readonly returns: false;
|
|
502
|
+
}, {
|
|
503
|
+
readonly args: readonly [true, false];
|
|
504
|
+
readonly returns: true;
|
|
505
|
+
}, {
|
|
506
|
+
readonly args: readonly [false, true];
|
|
507
|
+
readonly returns: true;
|
|
508
|
+
}, {
|
|
509
|
+
readonly args: readonly [false, "false"];
|
|
510
|
+
readonly throws: {
|
|
511
|
+
readonly code: "strict-type";
|
|
512
|
+
readonly message: "Boolean.or expects Boolean, Boolean.";
|
|
513
|
+
};
|
|
514
|
+
}];
|
|
515
|
+
readonly review: {
|
|
516
|
+
readonly summary: "Strict boolean disjunction; both operands must be Boolean.";
|
|
517
|
+
readonly graph: readonly ["Boolean", "strict", "portable"];
|
|
518
|
+
};
|
|
519
|
+
}, {
|
|
520
|
+
readonly id: "Boolean.equals";
|
|
521
|
+
readonly kind: "method";
|
|
522
|
+
readonly args: readonly ["Boolean", "Boolean"];
|
|
523
|
+
readonly returns: "Boolean";
|
|
524
|
+
readonly lowers: {
|
|
525
|
+
readonly kern: "Boolean.equals($0, $1)";
|
|
526
|
+
readonly ts: "__kernBooleanEquals($0, $1)";
|
|
527
|
+
readonly python: "__kern_boolean_equals($0, $1)";
|
|
528
|
+
};
|
|
529
|
+
readonly fixtures: readonly [{
|
|
530
|
+
readonly args: readonly [true, true];
|
|
531
|
+
readonly returns: true;
|
|
532
|
+
}, {
|
|
533
|
+
readonly args: readonly [true, false];
|
|
534
|
+
readonly returns: false;
|
|
535
|
+
}, {
|
|
536
|
+
readonly args: readonly [true, "true"];
|
|
537
|
+
readonly throws: {
|
|
538
|
+
readonly code: "strict-type";
|
|
539
|
+
readonly message: "Boolean.equals expects Boolean, Boolean.";
|
|
540
|
+
};
|
|
541
|
+
}, {
|
|
542
|
+
readonly args: readonly [true, 1];
|
|
543
|
+
readonly throws: {
|
|
544
|
+
readonly code: "strict-type";
|
|
545
|
+
readonly message: "Boolean.equals expects Boolean, Boolean.";
|
|
546
|
+
};
|
|
547
|
+
}];
|
|
548
|
+
readonly review: {
|
|
549
|
+
readonly summary: "Strict boolean equality; cross-type equality is a type error in schema v1.";
|
|
550
|
+
readonly graph: readonly ["Boolean", "strict", "portable"];
|
|
551
|
+
};
|
|
552
|
+
}, {
|
|
553
|
+
readonly id: "Boolean.toString";
|
|
554
|
+
readonly kind: "coercion";
|
|
555
|
+
readonly args: readonly ["Boolean"];
|
|
556
|
+
readonly returns: "String";
|
|
557
|
+
readonly lowers: {
|
|
558
|
+
readonly kern: "Boolean.toString($0)";
|
|
559
|
+
readonly ts: "__kernBooleanToString($0)";
|
|
560
|
+
readonly python: "__kern_boolean_to_string($0)";
|
|
561
|
+
};
|
|
562
|
+
readonly fixtures: readonly [{
|
|
563
|
+
readonly args: readonly [true];
|
|
564
|
+
readonly returns: "true";
|
|
565
|
+
}, {
|
|
566
|
+
readonly args: readonly [false];
|
|
567
|
+
readonly returns: "false";
|
|
568
|
+
}];
|
|
569
|
+
readonly review: {
|
|
570
|
+
readonly summary: "Portable Boolean to String coercion using KERN lowercase boolean spelling.";
|
|
571
|
+
readonly graph: readonly ["Boolean", "String", "portable"];
|
|
572
|
+
};
|
|
573
|
+
}];
|
|
574
|
+
};
|
|
575
|
+
readonly Number: {
|
|
576
|
+
readonly name: "Number";
|
|
577
|
+
readonly kind: "primitive";
|
|
578
|
+
readonly strict: true;
|
|
579
|
+
readonly operations: readonly [{
|
|
580
|
+
readonly id: "Number.negate";
|
|
581
|
+
readonly kind: "method";
|
|
582
|
+
readonly args: readonly ["Number"];
|
|
583
|
+
readonly returns: "Number";
|
|
584
|
+
readonly lowers: {
|
|
585
|
+
readonly kern: "Number.negate($0)";
|
|
586
|
+
readonly ts: "__kernNumberNegate($0)";
|
|
587
|
+
readonly python: "__kern_number_negate($0)";
|
|
588
|
+
};
|
|
589
|
+
readonly fixtures: readonly [{
|
|
590
|
+
readonly args: readonly [3];
|
|
591
|
+
readonly returns: -3;
|
|
592
|
+
}, {
|
|
593
|
+
readonly args: readonly [-3];
|
|
594
|
+
readonly returns: 3;
|
|
595
|
+
}, {
|
|
596
|
+
readonly args: readonly ["3"];
|
|
597
|
+
readonly throws: {
|
|
598
|
+
readonly code: "strict-type";
|
|
599
|
+
readonly message: "Number.negate expects Number.";
|
|
600
|
+
};
|
|
601
|
+
}];
|
|
602
|
+
readonly review: {
|
|
603
|
+
readonly summary: "Strict numeric negation over finite KERN Numbers.";
|
|
604
|
+
readonly graph: readonly ["Number", "strict", "portable"];
|
|
605
|
+
};
|
|
606
|
+
}, {
|
|
607
|
+
readonly id: "Number.add";
|
|
608
|
+
readonly kind: "method";
|
|
609
|
+
readonly args: readonly ["Number", "Number"];
|
|
610
|
+
readonly returns: "Number";
|
|
611
|
+
readonly lowers: {
|
|
612
|
+
readonly kern: "Number.add($0, $1)";
|
|
613
|
+
readonly ts: "__kernNumberAdd($0, $1)";
|
|
614
|
+
readonly python: "__kern_number_add($0, $1)";
|
|
615
|
+
};
|
|
616
|
+
readonly fixtures: readonly [{
|
|
617
|
+
readonly args: readonly [2, 3];
|
|
618
|
+
readonly returns: 5;
|
|
619
|
+
}, {
|
|
620
|
+
readonly args: readonly [-2, 3];
|
|
621
|
+
readonly returns: 1;
|
|
622
|
+
}, {
|
|
623
|
+
readonly args: readonly [2, "3"];
|
|
624
|
+
readonly throws: {
|
|
625
|
+
readonly code: "strict-type";
|
|
626
|
+
readonly message: "Number.add expects Number, Number.";
|
|
627
|
+
};
|
|
628
|
+
}];
|
|
629
|
+
readonly review: {
|
|
630
|
+
readonly summary: "Strict numeric addition over finite KERN Numbers.";
|
|
631
|
+
readonly graph: readonly ["Number", "strict", "portable"];
|
|
632
|
+
};
|
|
633
|
+
}, {
|
|
634
|
+
readonly id: "Number.subtract";
|
|
635
|
+
readonly kind: "method";
|
|
636
|
+
readonly args: readonly ["Number", "Number"];
|
|
637
|
+
readonly returns: "Number";
|
|
638
|
+
readonly lowers: {
|
|
639
|
+
readonly kern: "Number.subtract($0, $1)";
|
|
640
|
+
readonly ts: "__kernNumberSubtract($0, $1)";
|
|
641
|
+
readonly python: "__kern_number_subtract($0, $1)";
|
|
642
|
+
};
|
|
643
|
+
readonly fixtures: readonly [{
|
|
644
|
+
readonly args: readonly [5, 3];
|
|
645
|
+
readonly returns: 2;
|
|
646
|
+
}, {
|
|
647
|
+
readonly args: readonly [3, 5];
|
|
648
|
+
readonly returns: -2;
|
|
649
|
+
}, {
|
|
650
|
+
readonly args: readonly [5, false];
|
|
651
|
+
readonly throws: {
|
|
652
|
+
readonly code: "strict-type";
|
|
653
|
+
readonly message: "Number.subtract expects Number, Number.";
|
|
654
|
+
};
|
|
655
|
+
}];
|
|
656
|
+
readonly review: {
|
|
657
|
+
readonly summary: "Strict numeric subtraction over finite KERN Numbers.";
|
|
658
|
+
readonly graph: readonly ["Number", "strict", "portable"];
|
|
659
|
+
};
|
|
660
|
+
}, {
|
|
661
|
+
readonly id: "Number.multiply";
|
|
662
|
+
readonly kind: "method";
|
|
663
|
+
readonly args: readonly ["Number", "Number"];
|
|
664
|
+
readonly returns: "Number";
|
|
665
|
+
readonly lowers: {
|
|
666
|
+
readonly kern: "Number.multiply($0, $1)";
|
|
667
|
+
readonly ts: "__kernNumberMultiply($0, $1)";
|
|
668
|
+
readonly python: "__kern_number_multiply($0, $1)";
|
|
669
|
+
};
|
|
670
|
+
readonly fixtures: readonly [{
|
|
671
|
+
readonly args: readonly [3, 4];
|
|
672
|
+
readonly returns: 12;
|
|
673
|
+
}, {
|
|
674
|
+
readonly args: readonly [-3, 4];
|
|
675
|
+
readonly returns: -12;
|
|
676
|
+
}, {
|
|
677
|
+
readonly args: readonly [3, null];
|
|
678
|
+
readonly throws: {
|
|
679
|
+
readonly code: "strict-type";
|
|
680
|
+
readonly message: "Number.multiply expects Number, Number.";
|
|
681
|
+
};
|
|
682
|
+
}];
|
|
683
|
+
readonly review: {
|
|
684
|
+
readonly summary: "Strict numeric multiplication over finite KERN Numbers.";
|
|
685
|
+
readonly graph: readonly ["Number", "strict", "portable"];
|
|
686
|
+
};
|
|
687
|
+
}, {
|
|
688
|
+
readonly id: "Number.divide";
|
|
689
|
+
readonly kind: "method";
|
|
690
|
+
readonly args: readonly ["Number", "Number"];
|
|
691
|
+
readonly returns: "Number";
|
|
692
|
+
readonly lowers: {
|
|
693
|
+
readonly kern: "Number.divide($0, $1)";
|
|
694
|
+
readonly ts: "__kernNumberDivide($0, $1)";
|
|
695
|
+
readonly python: "__kern_number_divide($0, $1)";
|
|
696
|
+
};
|
|
697
|
+
readonly fixtures: readonly [{
|
|
698
|
+
readonly args: readonly [6, 2];
|
|
699
|
+
readonly returns: 3;
|
|
700
|
+
}, {
|
|
701
|
+
readonly args: readonly [5, 2];
|
|
702
|
+
readonly returns: 2.5;
|
|
703
|
+
}, {
|
|
704
|
+
readonly args: readonly [1, 0];
|
|
705
|
+
readonly throws: {
|
|
706
|
+
readonly code: "division-by-zero";
|
|
707
|
+
readonly message: "Number.divide division by zero.";
|
|
708
|
+
};
|
|
709
|
+
}, {
|
|
710
|
+
readonly args: readonly [6, "2"];
|
|
711
|
+
readonly throws: {
|
|
712
|
+
readonly code: "strict-type";
|
|
713
|
+
readonly message: "Number.divide expects Number, Number.";
|
|
714
|
+
};
|
|
715
|
+
}];
|
|
716
|
+
readonly review: {
|
|
717
|
+
readonly summary: "Strict numeric division over finite KERN Numbers; zero divisor is a contract error.";
|
|
718
|
+
readonly graph: readonly ["Number", "strict", "portable"];
|
|
719
|
+
};
|
|
720
|
+
}, {
|
|
721
|
+
readonly id: "Number.remainder";
|
|
722
|
+
readonly kind: "method";
|
|
723
|
+
readonly args: readonly ["Number", "Number"];
|
|
724
|
+
readonly returns: "Number";
|
|
725
|
+
readonly lowers: {
|
|
726
|
+
readonly kern: "Number.remainder($0, $1)";
|
|
727
|
+
readonly ts: "__kernNumberRemainder($0, $1)";
|
|
728
|
+
readonly python: "__kern_number_remainder($0, $1)";
|
|
729
|
+
};
|
|
730
|
+
readonly fixtures: readonly [{
|
|
731
|
+
readonly args: readonly [5, 2];
|
|
732
|
+
readonly returns: 1;
|
|
733
|
+
}, {
|
|
734
|
+
readonly args: readonly [-5, 2];
|
|
735
|
+
readonly returns: -1;
|
|
736
|
+
}, {
|
|
737
|
+
readonly args: readonly [5, -2];
|
|
738
|
+
readonly returns: 1;
|
|
739
|
+
}, {
|
|
740
|
+
readonly args: readonly [1, 0];
|
|
741
|
+
readonly throws: {
|
|
742
|
+
readonly code: "division-by-zero";
|
|
743
|
+
readonly message: "Number.remainder division by zero.";
|
|
744
|
+
};
|
|
745
|
+
}, {
|
|
746
|
+
readonly args: readonly [5, "2"];
|
|
747
|
+
readonly throws: {
|
|
748
|
+
readonly code: "strict-type";
|
|
749
|
+
readonly message: "Number.remainder expects Number, Number.";
|
|
750
|
+
};
|
|
751
|
+
}];
|
|
752
|
+
readonly review: {
|
|
753
|
+
readonly summary: "Strict numeric remainder using KERN dividend-sign semantics; zero divisor is a contract error.";
|
|
754
|
+
readonly graph: readonly ["Number", "strict", "portable"];
|
|
755
|
+
};
|
|
756
|
+
}, {
|
|
757
|
+
readonly id: "Number.lessThan";
|
|
758
|
+
readonly kind: "method";
|
|
759
|
+
readonly args: readonly ["Number", "Number"];
|
|
760
|
+
readonly returns: "Boolean";
|
|
761
|
+
readonly lowers: {
|
|
762
|
+
readonly kern: "Number.lessThan($0, $1)";
|
|
763
|
+
readonly ts: "__kernNumberLessThan($0, $1)";
|
|
764
|
+
readonly python: "__kern_number_less_than($0, $1)";
|
|
765
|
+
};
|
|
766
|
+
readonly fixtures: readonly [{
|
|
767
|
+
readonly args: readonly [2, 3];
|
|
768
|
+
readonly returns: true;
|
|
769
|
+
}, {
|
|
770
|
+
readonly args: readonly [3, 2];
|
|
771
|
+
readonly returns: false;
|
|
772
|
+
}, {
|
|
773
|
+
readonly args: readonly [2, "3"];
|
|
774
|
+
readonly throws: {
|
|
775
|
+
readonly code: "strict-type";
|
|
776
|
+
readonly message: "Number.lessThan expects Number, Number.";
|
|
777
|
+
};
|
|
778
|
+
}];
|
|
779
|
+
readonly review: {
|
|
780
|
+
readonly summary: "Strict numeric less-than comparison.";
|
|
781
|
+
readonly graph: readonly ["Number", "Boolean", "strict", "portable"];
|
|
782
|
+
};
|
|
783
|
+
}, {
|
|
784
|
+
readonly id: "Number.lessThanOrEqual";
|
|
785
|
+
readonly kind: "method";
|
|
786
|
+
readonly args: readonly ["Number", "Number"];
|
|
787
|
+
readonly returns: "Boolean";
|
|
788
|
+
readonly lowers: {
|
|
789
|
+
readonly kern: "Number.lessThanOrEqual($0, $1)";
|
|
790
|
+
readonly ts: "__kernNumberLessThanOrEqual($0, $1)";
|
|
791
|
+
readonly python: "__kern_number_less_than_or_equal($0, $1)";
|
|
792
|
+
};
|
|
793
|
+
readonly fixtures: readonly [{
|
|
794
|
+
readonly args: readonly [2, 2];
|
|
795
|
+
readonly returns: true;
|
|
796
|
+
}, {
|
|
797
|
+
readonly args: readonly [3, 2];
|
|
798
|
+
readonly returns: false;
|
|
799
|
+
}, {
|
|
800
|
+
readonly args: readonly [2, null];
|
|
801
|
+
readonly throws: {
|
|
802
|
+
readonly code: "strict-type";
|
|
803
|
+
readonly message: "Number.lessThanOrEqual expects Number, Number.";
|
|
804
|
+
};
|
|
805
|
+
}];
|
|
806
|
+
readonly review: {
|
|
807
|
+
readonly summary: "Strict numeric less-than-or-equal comparison.";
|
|
808
|
+
readonly graph: readonly ["Number", "Boolean", "strict", "portable"];
|
|
809
|
+
};
|
|
810
|
+
}, {
|
|
811
|
+
readonly id: "Number.greaterThan";
|
|
812
|
+
readonly kind: "method";
|
|
813
|
+
readonly args: readonly ["Number", "Number"];
|
|
814
|
+
readonly returns: "Boolean";
|
|
815
|
+
readonly lowers: {
|
|
816
|
+
readonly kern: "Number.greaterThan($0, $1)";
|
|
817
|
+
readonly ts: "__kernNumberGreaterThan($0, $1)";
|
|
818
|
+
readonly python: "__kern_number_greater_than($0, $1)";
|
|
819
|
+
};
|
|
820
|
+
readonly fixtures: readonly [{
|
|
821
|
+
readonly args: readonly [3, 2];
|
|
822
|
+
readonly returns: true;
|
|
823
|
+
}, {
|
|
824
|
+
readonly args: readonly [2, 3];
|
|
825
|
+
readonly returns: false;
|
|
826
|
+
}, {
|
|
827
|
+
readonly args: readonly [3, true];
|
|
828
|
+
readonly throws: {
|
|
829
|
+
readonly code: "strict-type";
|
|
830
|
+
readonly message: "Number.greaterThan expects Number, Number.";
|
|
831
|
+
};
|
|
832
|
+
}];
|
|
833
|
+
readonly review: {
|
|
834
|
+
readonly summary: "Strict numeric greater-than comparison.";
|
|
835
|
+
readonly graph: readonly ["Number", "Boolean", "strict", "portable"];
|
|
836
|
+
};
|
|
837
|
+
}, {
|
|
838
|
+
readonly id: "Number.greaterThanOrEqual";
|
|
839
|
+
readonly kind: "method";
|
|
840
|
+
readonly args: readonly ["Number", "Number"];
|
|
841
|
+
readonly returns: "Boolean";
|
|
842
|
+
readonly lowers: {
|
|
843
|
+
readonly kern: "Number.greaterThanOrEqual($0, $1)";
|
|
844
|
+
readonly ts: "__kernNumberGreaterThanOrEqual($0, $1)";
|
|
845
|
+
readonly python: "__kern_number_greater_than_or_equal($0, $1)";
|
|
846
|
+
};
|
|
847
|
+
readonly fixtures: readonly [{
|
|
848
|
+
readonly args: readonly [3, 3];
|
|
849
|
+
readonly returns: true;
|
|
850
|
+
}, {
|
|
851
|
+
readonly args: readonly [2, 3];
|
|
852
|
+
readonly returns: false;
|
|
853
|
+
}, {
|
|
854
|
+
readonly args: readonly [3, "3"];
|
|
855
|
+
readonly throws: {
|
|
856
|
+
readonly code: "strict-type";
|
|
857
|
+
readonly message: "Number.greaterThanOrEqual expects Number, Number.";
|
|
858
|
+
};
|
|
859
|
+
}];
|
|
860
|
+
readonly review: {
|
|
861
|
+
readonly summary: "Strict numeric greater-than-or-equal comparison.";
|
|
862
|
+
readonly graph: readonly ["Number", "Boolean", "strict", "portable"];
|
|
863
|
+
};
|
|
864
|
+
}];
|
|
865
|
+
};
|
|
866
|
+
readonly List: {
|
|
867
|
+
readonly name: "List";
|
|
868
|
+
readonly kind: "collection";
|
|
869
|
+
readonly strict: true;
|
|
870
|
+
readonly operations: readonly [{
|
|
871
|
+
readonly id: "List.length";
|
|
872
|
+
readonly kind: "property";
|
|
873
|
+
readonly args: readonly ["List"];
|
|
874
|
+
readonly returns: "Number";
|
|
875
|
+
readonly lowers: {
|
|
876
|
+
readonly kern: "List.length($0)";
|
|
877
|
+
readonly ts: "__kernListLength($0)";
|
|
878
|
+
readonly python: "__kern_list_length($0)";
|
|
879
|
+
};
|
|
880
|
+
readonly fixtures: readonly [{
|
|
881
|
+
readonly args: readonly [readonly []];
|
|
882
|
+
readonly returns: 0;
|
|
883
|
+
}, {
|
|
884
|
+
readonly args: readonly [readonly [1, 2, 3]];
|
|
885
|
+
readonly returns: 3;
|
|
886
|
+
}, {
|
|
887
|
+
readonly args: readonly ["not-list"];
|
|
888
|
+
readonly throws: {
|
|
889
|
+
readonly code: "strict-type";
|
|
890
|
+
readonly message: "List.length expects List.";
|
|
891
|
+
};
|
|
892
|
+
}];
|
|
893
|
+
readonly review: {
|
|
894
|
+
readonly summary: "Strict list cardinality.";
|
|
895
|
+
readonly graph: readonly ["List", "Number", "strict", "portable"];
|
|
896
|
+
};
|
|
897
|
+
}, {
|
|
898
|
+
readonly id: "List.index";
|
|
899
|
+
readonly kind: "method";
|
|
900
|
+
readonly args: readonly ["List", "Number"];
|
|
901
|
+
readonly returns: readonly ["String", "Boolean", "Number", "List", "Record", "Function", "Null", "Undefined"];
|
|
902
|
+
readonly lowers: {
|
|
903
|
+
readonly kern: "List.index($0, $1)";
|
|
904
|
+
readonly ts: "__kernListIndex($0, $1)";
|
|
905
|
+
readonly python: "__kern_list_index($0, $1)";
|
|
906
|
+
};
|
|
907
|
+
readonly fixtures: readonly [{
|
|
908
|
+
readonly args: readonly [readonly [10, 20, 30], 0];
|
|
909
|
+
readonly returns: 10;
|
|
910
|
+
}, {
|
|
911
|
+
readonly args: readonly [readonly [10, 20, 30], 2];
|
|
912
|
+
readonly returns: 30;
|
|
913
|
+
}, {
|
|
914
|
+
readonly args: readonly [readonly [10, 20, 30], 3];
|
|
915
|
+
readonly returns: {
|
|
916
|
+
readonly __kernFixture: "Undefined";
|
|
917
|
+
};
|
|
918
|
+
}, {
|
|
919
|
+
readonly args: readonly [readonly [10, 20, 30], -1];
|
|
920
|
+
readonly returns: {
|
|
921
|
+
readonly __kernFixture: "Undefined";
|
|
922
|
+
};
|
|
923
|
+
}, {
|
|
924
|
+
readonly args: readonly [readonly [10, 20, 30], 1.5];
|
|
925
|
+
readonly returns: {
|
|
926
|
+
readonly __kernFixture: "Undefined";
|
|
927
|
+
};
|
|
928
|
+
}, {
|
|
929
|
+
readonly args: readonly [readonly [10, {
|
|
930
|
+
readonly __kernFixture: "Undefined";
|
|
931
|
+
}, 30], 1];
|
|
932
|
+
readonly returns: {
|
|
933
|
+
readonly __kernFixture: "Undefined";
|
|
934
|
+
};
|
|
935
|
+
}, {
|
|
936
|
+
readonly args: readonly [readonly [], 0];
|
|
937
|
+
readonly returns: {
|
|
938
|
+
readonly __kernFixture: "Undefined";
|
|
939
|
+
};
|
|
940
|
+
}, {
|
|
941
|
+
readonly args: readonly [readonly [10], "0"];
|
|
942
|
+
readonly throws: {
|
|
943
|
+
readonly code: "strict-type";
|
|
944
|
+
readonly message: "List.index expects List, Number.";
|
|
945
|
+
};
|
|
946
|
+
}];
|
|
947
|
+
readonly review: {
|
|
948
|
+
readonly summary: "Strict list index by numeric offset; misses return Undefined.";
|
|
949
|
+
readonly graph: readonly ["List", "Number", "Undefined", "strict", "portable"];
|
|
950
|
+
};
|
|
951
|
+
}];
|
|
952
|
+
};
|
|
953
|
+
readonly Record: {
|
|
954
|
+
readonly name: "Record";
|
|
955
|
+
readonly kind: "record";
|
|
956
|
+
readonly strict: true;
|
|
957
|
+
readonly operations: readonly [{
|
|
958
|
+
readonly id: "Record.get";
|
|
959
|
+
readonly kind: "method";
|
|
960
|
+
readonly args: readonly ["Record", "String"];
|
|
961
|
+
readonly returns: readonly ["String", "Boolean", "Number", "List", "Record", "Function", "Null", "Undefined"];
|
|
962
|
+
readonly lowers: {
|
|
963
|
+
readonly kern: "Record.get($0, $1)";
|
|
964
|
+
readonly ts: "__kernRecordGet($0, $1)";
|
|
965
|
+
readonly python: "__kern_record_get($0, $1)";
|
|
966
|
+
};
|
|
967
|
+
readonly fixtures: readonly [{
|
|
968
|
+
readonly args: readonly [{
|
|
969
|
+
readonly x: 1;
|
|
970
|
+
}, "x"];
|
|
971
|
+
readonly returns: 1;
|
|
972
|
+
}, {
|
|
973
|
+
readonly args: readonly [{
|
|
974
|
+
readonly x: 1;
|
|
975
|
+
}, "y"];
|
|
976
|
+
readonly returns: {
|
|
977
|
+
readonly __kernFixture: "Undefined";
|
|
978
|
+
};
|
|
979
|
+
}, {
|
|
980
|
+
readonly args: readonly [{
|
|
981
|
+
readonly x: {
|
|
982
|
+
readonly __kernFixture: "Undefined";
|
|
983
|
+
};
|
|
984
|
+
}, "x"];
|
|
985
|
+
readonly returns: {
|
|
986
|
+
readonly __kernFixture: "Undefined";
|
|
987
|
+
};
|
|
988
|
+
}, {
|
|
989
|
+
readonly args: readonly [{}, "toString"];
|
|
990
|
+
readonly returns: {
|
|
991
|
+
readonly __kernFixture: "Undefined";
|
|
992
|
+
};
|
|
993
|
+
}, {
|
|
994
|
+
readonly args: readonly [{}, ""];
|
|
995
|
+
readonly returns: {
|
|
996
|
+
readonly __kernFixture: "Undefined";
|
|
997
|
+
};
|
|
998
|
+
}, {
|
|
999
|
+
readonly args: readonly [{
|
|
1000
|
+
readonly x: 1;
|
|
1001
|
+
}, 0];
|
|
1002
|
+
readonly throws: {
|
|
1003
|
+
readonly code: "strict-type";
|
|
1004
|
+
readonly message: "Record.get expects Record, String.";
|
|
1005
|
+
};
|
|
1006
|
+
}];
|
|
1007
|
+
readonly review: {
|
|
1008
|
+
readonly summary: "Strict own-key record lookup; missing keys return Undefined.";
|
|
1009
|
+
readonly graph: readonly ["Record", "String", "Undefined", "strict", "portable"];
|
|
1010
|
+
};
|
|
1011
|
+
}];
|
|
1012
|
+
};
|
|
1013
|
+
readonly Function: {
|
|
1014
|
+
readonly name: "Function";
|
|
1015
|
+
readonly kind: "callable";
|
|
1016
|
+
readonly strict: true;
|
|
1017
|
+
readonly operations: readonly [];
|
|
1018
|
+
};
|
|
1019
|
+
readonly Null: {
|
|
1020
|
+
readonly name: "Null";
|
|
1021
|
+
readonly kind: "nullish";
|
|
1022
|
+
readonly strict: true;
|
|
1023
|
+
readonly operations: readonly [];
|
|
1024
|
+
};
|
|
1025
|
+
readonly Undefined: {
|
|
1026
|
+
readonly name: "Undefined";
|
|
1027
|
+
readonly kind: "nullish";
|
|
1028
|
+
readonly strict: true;
|
|
1029
|
+
readonly operations: readonly [];
|
|
1030
|
+
};
|
|
1031
|
+
};
|
|
1032
|
+
};
|