@elaraai/east 0.0.1-beta.3 → 0.0.1-beta.31

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.
Files changed (191) hide show
  1. package/LICENSE.md +15 -666
  2. package/README.md +30 -8
  3. package/dist/src/analyze.d.ts +3 -0
  4. package/dist/src/analyze.d.ts.map +1 -1
  5. package/dist/src/analyze.js +76 -15
  6. package/dist/src/analyze.js.map +1 -1
  7. package/dist/src/ast.d.ts +37 -33
  8. package/dist/src/ast.d.ts.map +1 -1
  9. package/dist/src/ast_to_ir.d.ts +6 -0
  10. package/dist/src/ast_to_ir.d.ts.map +1 -1
  11. package/dist/src/ast_to_ir.js +135 -101
  12. package/dist/src/ast_to_ir.js.map +1 -1
  13. package/dist/src/builtins.d.ts +1 -1
  14. package/dist/src/builtins.d.ts.map +1 -1
  15. package/dist/src/builtins.js +32 -0
  16. package/dist/src/builtins.js.map +1 -1
  17. package/dist/src/comparison.d.ts.map +1 -1
  18. package/dist/src/comparison.js +12 -4
  19. package/dist/src/comparison.js.map +1 -1
  20. package/dist/src/compile.d.ts +26 -1
  21. package/dist/src/compile.d.ts.map +1 -1
  22. package/dist/src/compile.js +388 -257
  23. package/dist/src/compile.js.map +1 -1
  24. package/dist/src/datetime_format/types.d.ts +23 -23
  25. package/dist/src/eastir.d.ts +4 -0
  26. package/dist/src/eastir.d.ts.map +1 -1
  27. package/dist/src/eastir.js +27 -7
  28. package/dist/src/eastir.js.map +1 -1
  29. package/dist/src/error.d.ts +12 -1
  30. package/dist/src/error.d.ts.map +1 -1
  31. package/dist/src/error.js +31 -1
  32. package/dist/src/error.js.map +1 -1
  33. package/dist/src/expr/array.d.ts +109 -1
  34. package/dist/src/expr/array.d.ts.map +1 -1
  35. package/dist/src/expr/array.js +204 -44
  36. package/dist/src/expr/array.js.map +1 -1
  37. package/dist/src/expr/ast.d.ts +1 -1
  38. package/dist/src/expr/ast.d.ts.map +1 -1
  39. package/dist/src/expr/ast.js +16 -28
  40. package/dist/src/expr/ast.js.map +1 -1
  41. package/dist/src/expr/asyncfunction.js +1 -1
  42. package/dist/src/expr/asyncfunction.js.map +1 -1
  43. package/dist/src/expr/blob.d.ts +73 -1
  44. package/dist/src/expr/blob.d.ts.map +1 -1
  45. package/dist/src/expr/blob.js +97 -7
  46. package/dist/src/expr/blob.js.map +1 -1
  47. package/dist/src/expr/block.d.ts +232 -12
  48. package/dist/src/expr/block.d.ts.map +1 -1
  49. package/dist/src/expr/block.js +646 -140
  50. package/dist/src/expr/block.js.map +1 -1
  51. package/dist/src/expr/boolean.d.ts +44 -0
  52. package/dist/src/expr/boolean.d.ts.map +1 -1
  53. package/dist/src/expr/boolean.js +57 -5
  54. package/dist/src/expr/boolean.js.map +1 -1
  55. package/dist/src/expr/datetime.d.ts +135 -0
  56. package/dist/src/expr/datetime.d.ts.map +1 -1
  57. package/dist/src/expr/datetime.js +183 -33
  58. package/dist/src/expr/datetime.js.map +1 -1
  59. package/dist/src/expr/dict.d.ts +42 -0
  60. package/dist/src/expr/dict.d.ts.map +1 -1
  61. package/dist/src/expr/dict.js +105 -55
  62. package/dist/src/expr/dict.js.map +1 -1
  63. package/dist/src/expr/expr.d.ts +1 -1
  64. package/dist/src/expr/expr.d.ts.map +1 -1
  65. package/dist/src/expr/expr.js.map +1 -1
  66. package/dist/src/expr/float.d.ts +153 -0
  67. package/dist/src/expr/float.d.ts.map +1 -1
  68. package/dist/src/expr/float.js +190 -16
  69. package/dist/src/expr/float.js.map +1 -1
  70. package/dist/src/expr/function.d.ts +7 -2
  71. package/dist/src/expr/function.d.ts.map +1 -1
  72. package/dist/src/expr/function.js +1 -1
  73. package/dist/src/expr/function.js.map +1 -1
  74. package/dist/src/expr/index.d.ts +202 -2
  75. package/dist/src/expr/index.d.ts.map +1 -1
  76. package/dist/src/expr/index.js +207 -2
  77. package/dist/src/expr/index.js.map +1 -1
  78. package/dist/src/expr/integer.d.ts +180 -0
  79. package/dist/src/expr/integer.d.ts.map +1 -1
  80. package/dist/src/expr/integer.js +188 -17
  81. package/dist/src/expr/integer.js.map +1 -1
  82. package/dist/src/expr/libs/blob.js +2 -2
  83. package/dist/src/expr/libs/blob.js.map +1 -1
  84. package/dist/src/expr/libs/integer.d.ts +19 -0
  85. package/dist/src/expr/libs/integer.d.ts.map +1 -1
  86. package/dist/src/expr/libs/integer.js +47 -0
  87. package/dist/src/expr/libs/integer.js.map +1 -1
  88. package/dist/src/expr/libs/string.js +1 -1
  89. package/dist/src/expr/libs/string.js.map +1 -1
  90. package/dist/src/expr/recursive.d.ts +83 -0
  91. package/dist/src/expr/recursive.d.ts.map +1 -0
  92. package/dist/src/expr/recursive.js +99 -0
  93. package/dist/src/expr/recursive.js.map +1 -0
  94. package/dist/src/expr/ref.js +3 -3
  95. package/dist/src/expr/ref.js.map +1 -1
  96. package/dist/src/expr/set.d.ts +44 -2
  97. package/dist/src/expr/set.d.ts.map +1 -1
  98. package/dist/src/expr/set.js +97 -47
  99. package/dist/src/expr/set.js.map +1 -1
  100. package/dist/src/expr/string.d.ts +134 -0
  101. package/dist/src/expr/string.d.ts.map +1 -1
  102. package/dist/src/expr/string.js +172 -22
  103. package/dist/src/expr/string.js.map +1 -1
  104. package/dist/src/expr/struct.d.ts +1 -1
  105. package/dist/src/expr/struct.d.ts.map +1 -1
  106. package/dist/src/expr/struct.js +1 -1
  107. package/dist/src/expr/struct.js.map +1 -1
  108. package/dist/src/expr/types.d.ts +7 -6
  109. package/dist/src/expr/types.d.ts.map +1 -1
  110. package/dist/src/expr/variant.d.ts +123 -1
  111. package/dist/src/expr/variant.d.ts.map +1 -1
  112. package/dist/src/expr/variant.js +66 -2
  113. package/dist/src/expr/variant.js.map +1 -1
  114. package/dist/src/fuzz.d.ts +36 -2
  115. package/dist/src/fuzz.d.ts.map +1 -1
  116. package/dist/src/fuzz.js +344 -77
  117. package/dist/src/fuzz.js.map +1 -1
  118. package/dist/src/index.d.ts +1 -0
  119. package/dist/src/index.d.ts.map +1 -1
  120. package/dist/src/index.js +1 -0
  121. package/dist/src/index.js.map +1 -1
  122. package/dist/src/internal.d.ts +12 -0
  123. package/dist/src/internal.d.ts.map +1 -1
  124. package/dist/src/internal.js +13 -0
  125. package/dist/src/internal.js.map +1 -1
  126. package/dist/src/ir.d.ts +1551 -1505
  127. package/dist/src/ir.d.ts.map +1 -1
  128. package/dist/src/ir.js +49 -34
  129. package/dist/src/ir.js.map +1 -1
  130. package/dist/src/location.d.ts +30 -10
  131. package/dist/src/location.d.ts.map +1 -1
  132. package/dist/src/location.js +70 -28
  133. package/dist/src/location.js.map +1 -1
  134. package/dist/src/patch/apply.d.ts +15 -0
  135. package/dist/src/patch/apply.d.ts.map +1 -0
  136. package/dist/src/patch/apply.js +380 -0
  137. package/dist/src/patch/apply.js.map +1 -0
  138. package/dist/src/patch/compose.d.ts +15 -0
  139. package/dist/src/patch/compose.d.ts.map +1 -0
  140. package/dist/src/patch/compose.js +480 -0
  141. package/dist/src/patch/compose.js.map +1 -0
  142. package/dist/src/patch/diff.d.ts +15 -0
  143. package/dist/src/patch/diff.d.ts.map +1 -0
  144. package/dist/src/patch/diff.js +328 -0
  145. package/dist/src/patch/diff.js.map +1 -0
  146. package/dist/src/patch/fuzz.d.ts +73 -0
  147. package/dist/src/patch/fuzz.d.ts.map +1 -0
  148. package/dist/src/patch/fuzz.js +159 -0
  149. package/dist/src/patch/fuzz.js.map +1 -0
  150. package/dist/src/patch/index.d.ts +18 -0
  151. package/dist/src/patch/index.d.ts.map +1 -0
  152. package/dist/src/patch/index.js +20 -0
  153. package/dist/src/patch/index.js.map +1 -0
  154. package/dist/src/patch/invert.d.ts +15 -0
  155. package/dist/src/patch/invert.d.ts.map +1 -0
  156. package/dist/src/patch/invert.js +302 -0
  157. package/dist/src/patch/invert.js.map +1 -0
  158. package/dist/src/patch/type_of_patch.d.ts +17 -0
  159. package/dist/src/patch/type_of_patch.d.ts.map +1 -0
  160. package/dist/src/patch/type_of_patch.js +143 -0
  161. package/dist/src/patch/type_of_patch.js.map +1 -0
  162. package/dist/src/patch/types.d.ts +166 -0
  163. package/dist/src/patch/types.d.ts.map +1 -0
  164. package/dist/src/patch/types.js +69 -0
  165. package/dist/src/patch/types.js.map +1 -0
  166. package/dist/src/platform.d.ts +6 -0
  167. package/dist/src/platform.d.ts.map +1 -1
  168. package/dist/src/serialization/beast.d.ts.map +1 -1
  169. package/dist/src/serialization/beast.js +53 -18
  170. package/dist/src/serialization/beast.js.map +1 -1
  171. package/dist/src/serialization/beast2.d.ts +39 -3
  172. package/dist/src/serialization/beast2.d.ts.map +1 -1
  173. package/dist/src/serialization/beast2.js +241 -18
  174. package/dist/src/serialization/beast2.js.map +1 -1
  175. package/dist/src/serialization/csv.d.ts +139 -0
  176. package/dist/src/serialization/csv.d.ts.map +1 -0
  177. package/dist/src/serialization/csv.js +615 -0
  178. package/dist/src/serialization/csv.js.map +1 -0
  179. package/dist/src/serialization/index.d.ts +2 -1
  180. package/dist/src/serialization/index.d.ts.map +1 -1
  181. package/dist/src/serialization/index.js +2 -1
  182. package/dist/src/serialization/index.js.map +1 -1
  183. package/dist/src/type_of_type.d.ts +45 -34
  184. package/dist/src/type_of_type.d.ts.map +1 -1
  185. package/dist/src/type_of_type.js +62 -1
  186. package/dist/src/type_of_type.js.map +1 -1
  187. package/dist/src/types.d.ts +8 -8
  188. package/dist/src/types.d.ts.map +1 -1
  189. package/dist/src/types.js +4 -4
  190. package/dist/src/types.js.map +1 -1
  191. package/package.json +4 -5
@@ -19,10 +19,11 @@ export { SetExpr } from './set.js';
19
19
  export { DictExpr } from './dict.js';
20
20
  export { StructExpr } from './struct.js';
21
21
  export { VariantExpr } from './variant.js';
22
+ export { RecursiveExpr } from './recursive.js';
22
23
  export { type CallableFunctionExpr, FunctionExpr } from './function.js';
23
24
  export { type CallableAsyncFunctionExpr, AsyncFunctionExpr } from './asyncfunction.js';
24
- import { from, equal, notEqual, less, lessEqual, print, is, greaterEqual, greater, func, str, platform, asyncFunction, asyncPlatform } from './block.js';
25
- export { BlockBuilder, type AsyncPlatformDefinition, type PlatformDefinition } from './block.js';
25
+ import { from, equal, notEqual, less, lessEqual, print, is, greaterEqual, greater, func, str, platform, asyncFunction, asyncPlatform, genericPlatform, asyncGenericPlatform, compile, compileAsync, diff, applyPatch, composePatch, invertPatch } from './block.js';
26
+ export { BlockBuilder, type AsyncPlatformDefinition, type PlatformDefinition, type GenericPlatformDefinition, type AsyncGenericPlatformDefinition, equals, eq, notEquals, ne, lessThan, lt, lessThanOrEqual, lte, le, greaterThan, gt, greaterThanOrEqual, gte, ge, diff, applyPatch, composePatch, invertPatch } from './block.js';
26
27
  export type { ToExpr as ExprFactory } from './expr.js';
27
28
  /**
28
29
  * Standard entry point for constructing East expressions.
@@ -48,6 +49,44 @@ export type { ToExpr as ExprFactory } from './expr.js';
48
49
  * ```
49
50
  */
50
51
  export declare const East: {
52
+ /**
53
+ * Compiles an East function into JavaScript function.
54
+ *
55
+ * @param f the function expression to compile
56
+ * @param platform the platform functions available during compilation
57
+ * @returns the compiled function
58
+ *
59
+ * @example
60
+ * ```ts
61
+ * const add = East.function(
62
+ * [IntegerType, IntegerType],
63
+ * IntegerType,
64
+ * ($, a, b) => $.return(a.add(b))
65
+ * );
66
+ * const compiledAdd = East.compile(add, []);
67
+ * console.log(compiledAdd(2n, 3n));
68
+ *
69
+ **/
70
+ compile: typeof compile;
71
+ /**
72
+ * Compiles an asyncronous East function into an asynchronous JavaScript function.
73
+ *
74
+ * @param f the async function expression to compile
75
+ * @param platform the platform functions available during compilation
76
+ * @returns the compiled async function
77
+ *
78
+ * @example
79
+ * ```ts
80
+ * const add = East.asyncFunction(
81
+ * [IntegerType, IntegerType],
82
+ * IntegerType,
83
+ * ($, a, b) => $.return(a.add(b))
84
+ * );
85
+ * const compiledAdd = East.compileAsync(add, []);
86
+ * console.log(await compiledAdd(2n, 3n));
87
+ *
88
+ **/
89
+ compileAsync: typeof compileAsync;
51
90
  /**
52
91
  * Creates an East expression from a JavaScript value.
53
92
  * Type is inferred from the value, or can be explicitly specified.
@@ -185,6 +224,77 @@ export declare const East: {
185
224
  * ```
186
225
  */
187
226
  asyncPlatform: typeof asyncPlatform;
227
+ /**
228
+ * Defines a generic (polymorphic) platform function with type parameters.
229
+ * Type parameters are passed at call time and flow through to the implementation.
230
+ *
231
+ * @param name - The name of the platform function
232
+ * @param typeParams - Array of type parameter names (e.g., `["T", "U"]`)
233
+ * @param inputsFn - Callback that receives placeholder types and returns input types
234
+ * @param outputFn - Callback that receives placeholder types and returns output type
235
+ * @returns A callable generic platform function helper
236
+ *
237
+ * @see {@link platform} for non-generic platform functions.
238
+ * @see {@link asyncGenericPlatform} for async generic platform functions.
239
+ *
240
+ * @example
241
+ * ```ts
242
+ * // Define a generic log function
243
+ * const log = East.genericPlatform(
244
+ * "log",
245
+ * ["T"],
246
+ * (T) => [T],
247
+ * (_T) => NullType
248
+ * );
249
+ *
250
+ * // Use it - type is passed first, then value
251
+ * const myFunction = East.function([StringType], NullType, ($, s) => {
252
+ * $(log(StringType, s));
253
+ * });
254
+ *
255
+ * // Implementation receives type params as a factory
256
+ * const platform = [
257
+ * log.implement((T) => (value) => {
258
+ * console.log(printFor(T)(value));
259
+ * return null;
260
+ * }),
261
+ * ];
262
+ * ```
263
+ */
264
+ genericPlatform: typeof genericPlatform;
265
+ /**
266
+ * Defines an asynchronous generic (polymorphic) platform function with type parameters.
267
+ * The async variant of `genericPlatform`.
268
+ *
269
+ * @param name - The name of the platform function
270
+ * @param typeParams - Array of type parameter names (e.g., `["T", "U"]`)
271
+ * @param inputsFn - Callback that receives placeholder types and returns input types
272
+ * @param outputFn - Callback that receives placeholder types and returns output type
273
+ * @returns A callable async generic platform function helper
274
+ *
275
+ * @see {@link genericPlatform} for sync generic platform functions.
276
+ * @see {@link asyncPlatform} for non-generic async platform functions.
277
+ *
278
+ * @example
279
+ * ```ts
280
+ * // Define an async generic fetch function
281
+ * const fetchAs = East.asyncGenericPlatform(
282
+ * "fetchAs",
283
+ * ["T"],
284
+ * (_T) => [StringType], // URL input
285
+ * (T) => T // Returns parsed value of type T
286
+ * );
287
+ *
288
+ * // Implementation receives type params and returns async function
289
+ * const platform = [
290
+ * fetchAs.implement((T) => async (url) => {
291
+ * const response = await fetch(url);
292
+ * return parseFor(T)(await response.text());
293
+ * }),
294
+ * ];
295
+ * ```
296
+ */
297
+ asyncGenericPlatform: typeof asyncGenericPlatform;
188
298
  /**
189
299
  * Converts any East expression to its string representation.
190
300
  * Uses the East serialization format (not JSON).
@@ -291,6 +401,34 @@ export declare const East: {
291
401
  * ```
292
402
  */
293
403
  greaterEqual: typeof greaterEqual;
404
+ /** Alias for {@link equal} */
405
+ equals: typeof equal;
406
+ /** Alias for {@link equal} */
407
+ eq: typeof equal;
408
+ /** Alias for {@link notEqual} */
409
+ notEquals: typeof notEqual;
410
+ /** Alias for {@link notEqual} */
411
+ ne: typeof notEqual;
412
+ /** Alias for {@link less} */
413
+ lessThan: typeof less;
414
+ /** Alias for {@link less} */
415
+ lt: typeof less;
416
+ /** Alias for {@link lessEqual} */
417
+ lessThanOrEqual: typeof lessEqual;
418
+ /** Alias for {@link lessEqual} */
419
+ lte: typeof lessEqual;
420
+ /** Alias for {@link lessEqual} */
421
+ le: typeof lessEqual;
422
+ /** Alias for {@link greater} */
423
+ greaterThan: typeof greater;
424
+ /** Alias for {@link greater} */
425
+ gt: typeof greater;
426
+ /** Alias for {@link greaterEqual} */
427
+ greaterThanOrEqual: typeof greaterEqual;
428
+ /** Alias for {@link greaterEqual} */
429
+ gte: typeof greaterEqual;
430
+ /** Alias for {@link greaterEqual} */
431
+ ge: typeof greaterEqual;
294
432
  /**
295
433
  * Reference equality comparison for mutable types (Array, Set, Dict).
296
434
  * Checks if two expressions reference the same object in memory.
@@ -307,6 +445,67 @@ export declare const East: {
307
445
  * ```
308
446
  */
309
447
  is: typeof is;
448
+ /**
449
+ * Compute the difference between two values of the same type.
450
+ * Returns a patch that, when applied to `before`, produces `after`.
451
+ *
452
+ * @param before - The original value
453
+ * @param after - The modified value
454
+ * @returns A patch describing the changes
455
+ *
456
+ * @example
457
+ * ```ts
458
+ * const before = East.value([1n, 2n, 3n]);
459
+ * const after = East.value([1n, 4n, 3n]);
460
+ * const patch = East.diff(before, after);
461
+ * ```
462
+ */
463
+ diff: typeof diff;
464
+ /**
465
+ * Apply a patch to a value, producing the modified value.
466
+ *
467
+ * @param value - The value to patch
468
+ * @param patch - The patch to apply
469
+ * @returns The patched value
470
+ * @throws East runtime error if the patch conflicts with the value
471
+ *
472
+ * @example
473
+ * ```ts
474
+ * const result = East.applyPatch(original, patch);
475
+ * ```
476
+ */
477
+ applyPatch: typeof applyPatch;
478
+ /**
479
+ * Compose two patches into a single patch.
480
+ * The result is a patch that has the same effect as applying `first` then `second`.
481
+ *
482
+ * @param first - The first patch to apply
483
+ * @param second - The second patch to apply
484
+ * @param type - The East type of the values being patched
485
+ * @returns A composed patch
486
+ * @throws East runtime error if the patches are incompatible
487
+ *
488
+ * @example
489
+ * ```ts
490
+ * const composed = East.composePatch(patch1, patch2, ArrayType(IntegerType));
491
+ * ```
492
+ */
493
+ composePatch: typeof composePatch;
494
+ /**
495
+ * Invert a patch, producing a patch that undoes the original.
496
+ * Applying the inverted patch to the "after" value produces the "before" value.
497
+ *
498
+ * @param patch - The patch to invert
499
+ * @param type - The East type of the values being patched
500
+ * @returns An inverted patch
501
+ *
502
+ * @example
503
+ * ```ts
504
+ * const inverted = East.invertPatch(patch, ArrayType(IntegerType));
505
+ * const original = East.applyPatch(modified, inverted);
506
+ * ```
507
+ */
508
+ invertPatch: typeof invertPatch;
310
509
  /**
311
510
  * Returns the minimum of two values using East's total ordering.
312
511
  *
@@ -365,6 +564,7 @@ export declare const East: {
365
564
  */
366
565
  Integer: {
367
566
  printCommaSeperated: import("./function.js").CallableFunctionExpr<[import("../types.js").IntegerType], import("../types.js").StringType>;
567
+ printCurrency: import("./function.js").CallableFunctionExpr<[import("../types.js").IntegerType], import("../types.js").StringType>;
368
568
  printCompact: import("./function.js").CallableFunctionExpr<[import("../types.js").IntegerType], import("../types.js").StringType>;
369
569
  printCompactSI: import("./function.js").CallableFunctionExpr<[import("../types.js").IntegerType], import("../types.js").StringType>;
370
570
  printCompactComputing: import("./function.js").CallableFunctionExpr<[import("../types.js").IntegerType], import("../types.js").StringType>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/expr/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,cAAc,YAAY,CAAC;AAG3B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,KAAK,oBAAoB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,KAAK,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB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;;IAGH;;;;;;;;;;;;OAYG;;IAOH,8BAA8B;;IAE9B,8BAA8B;;IAG9B,iCAAiC;;IAEjC,iCAAiC;;IAGjC,6BAA6B;;IAE7B,6BAA6B;;IAG7B,kCAAkC;;IAElC,kCAAkC;;IAElC,kCAAkC;;IAGlC,gCAAgC;;IAEhC,gCAAgC;;IAGhC,qCAAqC;;IAErC,qCAAqC;;IAErC,qCAAqC;;IAGrC;;;;;;;;;;;;;;OAcG;;IAOH;;;;;;;;;;;;;;OAcG;;IAGH;;;;;;;;;;;;OAYG;;IAGH;;;;;;;;;;;;;;OAcG;;IAGH;;;;;;;;;;;;;OAaG;;IAKH;;;;;;;;;;;;OAYG;;IAGH;;;;;;;;;;;;OAYG;;IAGH;;;;;;;;;;;;;;OAcG;;IAKH;;;;;;;;;;;OAWG;;;;;;;;;;;;;;;IAGH;;;;;;;;;;;OAWG;;;;;;;;;;;;;;;;;;IAGH;;;;;;;;;;;OAWG;;;;;;;;;;;;;;;;;;;;;;;;;;IAGH;;;;;;;;OAQG;;;;;;;;;IAGH;;;;;;;;OAQG;;;;IAGH;;;;;;;;;;OAUG;;;;;;IAGH;;;;;;;;OAQG;;;;IAGH;;;;;;;;;;;;;;OAcG;;;;CAEJ,CAAC"}
@@ -21,11 +21,12 @@ export { SetExpr } from './set.js';
21
21
  export { DictExpr } from './dict.js';
22
22
  export { StructExpr } from './struct.js';
23
23
  export { VariantExpr } from './variant.js';
24
+ export { RecursiveExpr } from './recursive.js';
24
25
  export { FunctionExpr } from './function.js';
25
26
  export { AsyncFunctionExpr } from './asyncfunction.js';
26
27
  // Import factory implementation
27
- import { from, equal, notEqual, less, lessEqual, print, is, greaterEqual, greater, func, str, platform, asyncFunction, asyncPlatform } from './block.js';
28
- export { BlockBuilder } from './block.js';
28
+ import { from, equal, notEqual, less, lessEqual, print, is, greaterEqual, greater, func, str, platform, asyncFunction, asyncPlatform, genericPlatform, asyncGenericPlatform, compile, compileAsync, equals, eq, notEquals, ne, lessThan, lt, lessThanOrEqual, lte, le, greaterThan, gt, greaterThanOrEqual, gte, ge, diff, applyPatch, composePatch, invertPatch } from './block.js';
29
+ export { BlockBuilder, equals, eq, notEquals, ne, lessThan, lt, lessThanOrEqual, lte, le, greaterThan, gt, greaterThanOrEqual, gte, ge, diff, applyPatch, composePatch, invertPatch } from './block.js';
29
30
  // Import standard libraries
30
31
  import IntegerLib from './libs/integer.js';
31
32
  import FloatLib from './libs/float.js';
@@ -81,6 +82,44 @@ import DictLib from './libs/dict.js';
81
82
  */
82
83
  export const East = {
83
84
  // Expr factories
85
+ /**
86
+ * Compiles an East function into JavaScript function.
87
+ *
88
+ * @param f the function expression to compile
89
+ * @param platform the platform functions available during compilation
90
+ * @returns the compiled function
91
+ *
92
+ * @example
93
+ * ```ts
94
+ * const add = East.function(
95
+ * [IntegerType, IntegerType],
96
+ * IntegerType,
97
+ * ($, a, b) => $.return(a.add(b))
98
+ * );
99
+ * const compiledAdd = East.compile(add, []);
100
+ * console.log(compiledAdd(2n, 3n));
101
+ *
102
+ **/
103
+ compile: compile,
104
+ /**
105
+ * Compiles an asyncronous East function into an asynchronous JavaScript function.
106
+ *
107
+ * @param f the async function expression to compile
108
+ * @param platform the platform functions available during compilation
109
+ * @returns the compiled async function
110
+ *
111
+ * @example
112
+ * ```ts
113
+ * const add = East.asyncFunction(
114
+ * [IntegerType, IntegerType],
115
+ * IntegerType,
116
+ * ($, a, b) => $.return(a.add(b))
117
+ * );
118
+ * const compiledAdd = East.compileAsync(add, []);
119
+ * console.log(await compiledAdd(2n, 3n));
120
+ *
121
+ **/
122
+ compileAsync: compileAsync,
84
123
  /**
85
124
  * Creates an East expression from a JavaScript value.
86
125
  * Type is inferred from the value, or can be explicitly specified.
@@ -218,6 +257,77 @@ export const East = {
218
257
  * ```
219
258
  */
220
259
  asyncPlatform,
260
+ /**
261
+ * Defines a generic (polymorphic) platform function with type parameters.
262
+ * Type parameters are passed at call time and flow through to the implementation.
263
+ *
264
+ * @param name - The name of the platform function
265
+ * @param typeParams - Array of type parameter names (e.g., `["T", "U"]`)
266
+ * @param inputsFn - Callback that receives placeholder types and returns input types
267
+ * @param outputFn - Callback that receives placeholder types and returns output type
268
+ * @returns A callable generic platform function helper
269
+ *
270
+ * @see {@link platform} for non-generic platform functions.
271
+ * @see {@link asyncGenericPlatform} for async generic platform functions.
272
+ *
273
+ * @example
274
+ * ```ts
275
+ * // Define a generic log function
276
+ * const log = East.genericPlatform(
277
+ * "log",
278
+ * ["T"],
279
+ * (T) => [T],
280
+ * (_T) => NullType
281
+ * );
282
+ *
283
+ * // Use it - type is passed first, then value
284
+ * const myFunction = East.function([StringType], NullType, ($, s) => {
285
+ * $(log(StringType, s));
286
+ * });
287
+ *
288
+ * // Implementation receives type params as a factory
289
+ * const platform = [
290
+ * log.implement((T) => (value) => {
291
+ * console.log(printFor(T)(value));
292
+ * return null;
293
+ * }),
294
+ * ];
295
+ * ```
296
+ */
297
+ genericPlatform,
298
+ /**
299
+ * Defines an asynchronous generic (polymorphic) platform function with type parameters.
300
+ * The async variant of `genericPlatform`.
301
+ *
302
+ * @param name - The name of the platform function
303
+ * @param typeParams - Array of type parameter names (e.g., `["T", "U"]`)
304
+ * @param inputsFn - Callback that receives placeholder types and returns input types
305
+ * @param outputFn - Callback that receives placeholder types and returns output type
306
+ * @returns A callable async generic platform function helper
307
+ *
308
+ * @see {@link genericPlatform} for sync generic platform functions.
309
+ * @see {@link asyncPlatform} for non-generic async platform functions.
310
+ *
311
+ * @example
312
+ * ```ts
313
+ * // Define an async generic fetch function
314
+ * const fetchAs = East.asyncGenericPlatform(
315
+ * "fetchAs",
316
+ * ["T"],
317
+ * (_T) => [StringType], // URL input
318
+ * (T) => T // Returns parsed value of type T
319
+ * );
320
+ *
321
+ * // Implementation receives type params and returns async function
322
+ * const platform = [
323
+ * fetchAs.implement((T) => async (url) => {
324
+ * const response = await fetch(url);
325
+ * return parseFor(T)(await response.text());
326
+ * }),
327
+ * ];
328
+ * ```
329
+ */
330
+ asyncGenericPlatform,
221
331
  /**
222
332
  * Converts any East expression to its string representation.
223
333
  * Uses the East serialization format (not JSON).
@@ -324,6 +434,37 @@ export const East = {
324
434
  * ```
325
435
  */
326
436
  greaterEqual,
437
+ // ============================================================================
438
+ // Comparison function aliases
439
+ // ============================================================================
440
+ /** Alias for {@link equal} */
441
+ equals,
442
+ /** Alias for {@link equal} */
443
+ eq,
444
+ /** Alias for {@link notEqual} */
445
+ notEquals,
446
+ /** Alias for {@link notEqual} */
447
+ ne,
448
+ /** Alias for {@link less} */
449
+ lessThan,
450
+ /** Alias for {@link less} */
451
+ lt,
452
+ /** Alias for {@link lessEqual} */
453
+ lessThanOrEqual,
454
+ /** Alias for {@link lessEqual} */
455
+ lte,
456
+ /** Alias for {@link lessEqual} */
457
+ le,
458
+ /** Alias for {@link greater} */
459
+ greaterThan,
460
+ /** Alias for {@link greater} */
461
+ gt,
462
+ /** Alias for {@link greaterEqual} */
463
+ greaterThanOrEqual,
464
+ /** Alias for {@link greaterEqual} */
465
+ gte,
466
+ /** Alias for {@link greaterEqual} */
467
+ ge,
327
468
  /**
328
469
  * Reference equality comparison for mutable types (Array, Set, Dict).
329
470
  * Checks if two expressions reference the same object in memory.
@@ -340,6 +481,70 @@ export const East = {
340
481
  * ```
341
482
  */
342
483
  is,
484
+ // ============================================================================
485
+ // Patch Operations
486
+ // ============================================================================
487
+ /**
488
+ * Compute the difference between two values of the same type.
489
+ * Returns a patch that, when applied to `before`, produces `after`.
490
+ *
491
+ * @param before - The original value
492
+ * @param after - The modified value
493
+ * @returns A patch describing the changes
494
+ *
495
+ * @example
496
+ * ```ts
497
+ * const before = East.value([1n, 2n, 3n]);
498
+ * const after = East.value([1n, 4n, 3n]);
499
+ * const patch = East.diff(before, after);
500
+ * ```
501
+ */
502
+ diff,
503
+ /**
504
+ * Apply a patch to a value, producing the modified value.
505
+ *
506
+ * @param value - The value to patch
507
+ * @param patch - The patch to apply
508
+ * @returns The patched value
509
+ * @throws East runtime error if the patch conflicts with the value
510
+ *
511
+ * @example
512
+ * ```ts
513
+ * const result = East.applyPatch(original, patch);
514
+ * ```
515
+ */
516
+ applyPatch,
517
+ /**
518
+ * Compose two patches into a single patch.
519
+ * The result is a patch that has the same effect as applying `first` then `second`.
520
+ *
521
+ * @param first - The first patch to apply
522
+ * @param second - The second patch to apply
523
+ * @param type - The East type of the values being patched
524
+ * @returns A composed patch
525
+ * @throws East runtime error if the patches are incompatible
526
+ *
527
+ * @example
528
+ * ```ts
529
+ * const composed = East.composePatch(patch1, patch2, ArrayType(IntegerType));
530
+ * ```
531
+ */
532
+ composePatch,
533
+ /**
534
+ * Invert a patch, producing a patch that undoes the original.
535
+ * Applying the inverted patch to the "after" value produces the "before" value.
536
+ *
537
+ * @param patch - The patch to invert
538
+ * @param type - The East type of the values being patched
539
+ * @returns An inverted patch
540
+ *
541
+ * @example
542
+ * ```ts
543
+ * const inverted = East.invertPatch(patch, ArrayType(IntegerType));
544
+ * const original = East.applyPatch(modified, inverted);
545
+ * ```
546
+ */
547
+ invertPatch,
343
548
  // Root stdlib
344
549
  /**
345
550
  * Returns the minimum of two values using East's total ordering.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/expr/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,sBAAsB;AACtB,cAAc,YAAY,CAAC;AAE3B,+CAA+C;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,eAA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