firefly-compiler 0.4.19 → 0.4.21

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 (68) hide show
  1. package/compiler/Builder.ff +23 -13
  2. package/compiler/JsEmitter.ff +120 -76
  3. package/compiler/LspHook.ff +17 -3
  4. package/compiler/Main.ff +13 -7
  5. package/compiler/Parser.ff +11 -13
  6. package/compiler/Resolver.ff +15 -15
  7. package/compiler/Syntax.ff +1 -0
  8. package/core/Array.ff +6 -4
  9. package/core/Int.ff +12 -12
  10. package/core/Json.ff +2 -2
  11. package/core/List.ff +6 -4
  12. package/experimental/benchmarks/ListGrab.ff +23 -0
  13. package/experimental/benchmarks/ListGrab.java +55 -0
  14. package/experimental/benchmarks/Pyrotek45.ff +30 -0
  15. package/experimental/benchmarks/Pyrotek45.java +64 -0
  16. package/experimental/tests/TestJson.ff +26 -0
  17. package/lsp/CompletionHandler.ff +14 -14
  18. package/lsp/Handler.ff +56 -60
  19. package/lsp/SignatureHelpHandler.ff +5 -4
  20. package/lsp/SymbolHandler.ff +18 -4
  21. package/lsp/TestReferences.ff +15 -0
  22. package/lsp/TestReferencesCase.ff +8 -0
  23. package/output/js/ff/compiler/Builder.mjs +50 -44
  24. package/output/js/ff/compiler/Dependencies.mjs +0 -2
  25. package/output/js/ff/compiler/Deriver.mjs +16 -140
  26. package/output/js/ff/compiler/Dictionaries.mjs +8 -222
  27. package/output/js/ff/compiler/Environment.mjs +12 -154
  28. package/output/js/ff/compiler/Inference.mjs +127 -1013
  29. package/output/js/ff/compiler/JsEmitter.mjs +434 -2344
  30. package/output/js/ff/compiler/JsImporter.mjs +0 -12
  31. package/output/js/ff/compiler/LspHook.mjs +548 -151
  32. package/output/js/ff/compiler/Main.mjs +96 -550
  33. package/output/js/ff/compiler/Parser.mjs +58 -390
  34. package/output/js/ff/compiler/Patterns.mjs +20 -200
  35. package/output/js/ff/compiler/Resolver.mjs +26 -340
  36. package/output/js/ff/compiler/Substitution.mjs +2 -160
  37. package/output/js/ff/compiler/Syntax.mjs +449 -3293
  38. package/output/js/ff/compiler/Token.mjs +9 -1095
  39. package/output/js/ff/compiler/Tokenizer.mjs +4 -2
  40. package/output/js/ff/compiler/Unification.mjs +26 -360
  41. package/output/js/ff/compiler/Wildcards.mjs +0 -86
  42. package/output/js/ff/compiler/Workspace.mjs +8 -96
  43. package/output/js/ff/core/Array.mjs +15 -8
  44. package/output/js/ff/core/AssetSystem.mjs +4 -14
  45. package/output/js/ff/core/Bool.mjs +0 -12
  46. package/output/js/ff/core/Core.mjs +0 -30
  47. package/output/js/ff/core/Int.mjs +24 -24
  48. package/output/js/ff/core/IntMap.mjs +0 -8
  49. package/output/js/ff/core/Json.mjs +2 -42
  50. package/output/js/ff/core/List.mjs +23 -32
  51. package/output/js/ff/core/Lock.mjs +0 -10
  52. package/output/js/ff/core/Map.mjs +0 -24
  53. package/output/js/ff/core/Option.mjs +10 -286
  54. package/output/js/ff/core/Ordering.mjs +16 -158
  55. package/output/js/ff/core/Pair.mjs +2 -34
  56. package/output/js/ff/core/Path.mjs +2 -28
  57. package/output/js/ff/core/Random.mjs +4 -4
  58. package/output/js/ff/core/RbMap.mjs +56 -644
  59. package/output/js/ff/core/Show.mjs +0 -16
  60. package/output/js/ff/core/Stream.mjs +14 -144
  61. package/output/js/ff/core/StringMap.mjs +0 -8
  62. package/output/js/ff/core/Try.mjs +4 -108
  63. package/output/js/ff/core/Unit.mjs +2 -16
  64. package/package.json +1 -1
  65. package/postgresql/Pg.ff +23 -23
  66. package/vscode/client/src/extension.ts +30 -2
  67. package/vscode/package.json +17 -1
  68. package/core/Stack.ff +0 -250
@@ -109,8 +109,7 @@ return {fields_, guard_};
109
109
  export function check_(variants_, fields_, cases_, success_, guard_) {
110
110
  {
111
111
  const _1 = ff_core_Pair.Pair(fields_, cases_);
112
- {
113
- if(_1.first_.length > 0) {
112
+ if(_1.first_.length >= 1) {
114
113
  const f_ = _1.first_[0].first_;
115
114
  const p_ = _1.first_[0].second_;
116
115
  const fs_ = _1.first_.slice(1);
@@ -135,28 +134,18 @@ ff_compiler_Patterns.check_(variants_, [], cs_, false, guard_)
135
134
  }
136
135
  return
137
136
  }
138
- }
139
- {
140
- const _guard1 = (success_ && (!guard_));
141
- if(_guard1) {
137
+ if((success_ && (!guard_))) {
142
138
 
143
139
  return
144
140
  }
145
- }
146
- {
147
- if(_1.first_.length === 0) {
148
- if(_1.second_.length > 0) {
141
+ if(_1.first_.length === 0 && _1.second_.length >= 1) {
149
142
  const fs_ = _1.second_[0].fields_;
150
143
  const g_ = _1.second_[0].guard_;
151
144
  const cs_ = _1.second_.slice(1);
152
145
  ff_compiler_Patterns.check_(variants_, fs_, cs_, true, g_)
153
146
  return
154
147
  }
155
- }
156
- }
157
- {
158
- if(_1.first_.length === 0) {
159
- if(_1.second_.length === 0) {
148
+ if(_1.first_.length === 0 && _1.second_.length === 0) {
160
149
  const remaining_ = ff_core_List.List_map(ff_core_List.List_filter(ff_core_Map.Map_pairs(variants_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ((_w1) => {
161
150
  return (ff_core_Set.Set_size(_w1.second_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String) !== 0)
162
151
  })), ((_1) => {
@@ -164,7 +153,6 @@ return (ff_core_Set.Set_size(_w1.second_, ff_core_Ordering.ff_core_Ordering_Orde
164
153
  const f_ = _1.first_;
165
154
  const vs_ = _1.second_;
166
155
  return ((f_ + " could be ") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(ff_core_Set.Set_toList(vs_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)))
167
- return
168
156
  }
169
157
  }));
170
158
  if((ff_core_List.List_size(remaining_) !== 0)) {
@@ -174,8 +162,6 @@ return
174
162
  }
175
163
  }
176
164
  }
177
- }
178
- }
179
165
 
180
166
  export function convert_(modules_, cases_) {
181
167
  function unqualifiedName_(name_) {
@@ -208,70 +194,43 @@ return (_w1 !== variantName_)
208
194
  }
209
195
  }
210
196
  function convertPattern_(pattern_) {
211
- {
212
197
  const pattern_a = pattern_;
213
- {
214
198
  if(pattern_a.PString) {
215
199
  return ff_core_Option.Some(ff_compiler_Patterns.PatternInfo("String literal", ff_core_List.List_toSet(["Any other String literal"], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), []))
216
- return
217
200
  }
218
- }
219
- {
220
201
  if(pattern_a.PInt) {
221
202
  return ff_core_Option.Some(ff_compiler_Patterns.PatternInfo("Int literal", ff_core_List.List_toSet(["Any other Int literal"], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), []))
222
- return
223
203
  }
224
- }
225
- {
226
204
  if(pattern_a.PChar) {
227
205
  return ff_core_Option.Some(ff_compiler_Patterns.PatternInfo("Char literal", ff_core_List.List_toSet(["Any other Char literal"], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), []))
228
- return
229
206
  }
230
- }
231
- {
232
207
  if(pattern_a.PVariable) {
233
208
  const p_ = pattern_a;
234
209
  return ff_core_Option.None()
235
- return
236
- }
237
210
  }
238
- {
239
211
  if(pattern_a.PVariant) {
240
212
  const p_ = pattern_a;
241
213
  const fields_ = ff_core_List.List_collect(ff_core_List.List_pairs(ff_core_List.List_map(p_.patterns_, ((pattern_) => {
242
214
  return convertPattern_(pattern_)
243
215
  }))), ((_1) => {
244
- {
245
- const i_ = _1.first_;
246
216
  if(_1.second_.Some) {
217
+ const i_ = _1.first_;
247
218
  const p_ = _1.second_.value_;
248
219
  return ff_core_Option.Some(ff_core_Pair.Pair(("" + i_), p_))
249
- return
250
- }
251
220
  }
252
221
  {
253
222
  return ff_core_Option.None()
254
- return
255
223
  }
256
224
  }));
257
225
  return ff_core_Option.Some(ff_compiler_Patterns.PatternInfo(unqualifiedName_(p_.name_), otherVariants_(p_.name_), fields_))
258
- return
259
- }
260
226
  }
261
- {
262
227
  if(pattern_a.PVariantAs) {
263
228
  const p_ = pattern_a;
264
229
  return ff_core_Option.Some(ff_compiler_Patterns.PatternInfo(unqualifiedName_(p_.name_), otherVariants_(p_.name_), []))
265
- return
266
- }
267
230
  }
268
- {
269
231
  if(pattern_a.PAlias) {
270
232
  const p_ = pattern_a;
271
233
  return convertPattern_(p_.pattern_)
272
- return
273
- }
274
- }
275
234
  }
276
235
  }
277
236
  return ff_core_List.List_map(ff_core_List.List_pairs(cases_), ((_1) => {
@@ -281,17 +240,13 @@ const case_ = _1.second_;
281
240
  const fields_ = ff_core_List.List_collect(ff_core_List.List_pairs(ff_core_List.List_map(case_.patterns_, ((pattern_) => {
282
241
  return convertPattern_(pattern_)
283
242
  }))), ((_1) => {
284
- {
285
- const i_ = _1.first_;
286
243
  if(_1.second_.Some) {
244
+ const i_ = _1.first_;
287
245
  const p_ = _1.second_.value_;
288
246
  return ff_core_Option.Some(ff_core_Pair.Pair(("" + i_), p_))
289
- return
290
- }
291
247
  }
292
248
  {
293
249
  return ff_core_Option.None()
294
- return
295
250
  }
296
251
  }));
297
252
  const exhaustiveGuards_ = ff_core_List.List_all(case_.guards_, ((g_) => {
@@ -304,7 +259,6 @@ return false
304
259
  }))
305
260
  }));
306
261
  return ff_compiler_Patterns.PatternCaseInfo(fields_, (!exhaustiveGuards_))
307
- return
308
262
  }
309
263
  }))
310
264
  }
@@ -325,8 +279,7 @@ return ff_core_Core.panic_(((message_ + " ") + ff_compiler_Syntax.Location_show(
325
279
  export async function check_$(variants_, fields_, cases_, success_, guard_, $task) {
326
280
  {
327
281
  const _1 = ff_core_Pair.Pair(fields_, cases_);
328
- {
329
- if(_1.first_.length > 0) {
282
+ if(_1.first_.length >= 1) {
330
283
  const f_ = _1.first_[0].first_;
331
284
  const p_ = _1.first_[0].second_;
332
285
  const fs_ = _1.first_.slice(1);
@@ -351,28 +304,18 @@ ff_compiler_Patterns.check_(variants_, [], cs_, false, guard_)
351
304
  }
352
305
  return
353
306
  }
354
- }
355
- {
356
- const _guard1 = (success_ && (!guard_));
357
- if(_guard1) {
307
+ if((success_ && (!guard_))) {
358
308
 
359
309
  return
360
310
  }
361
- }
362
- {
363
- if(_1.first_.length === 0) {
364
- if(_1.second_.length > 0) {
311
+ if(_1.first_.length === 0 && _1.second_.length >= 1) {
365
312
  const fs_ = _1.second_[0].fields_;
366
313
  const g_ = _1.second_[0].guard_;
367
314
  const cs_ = _1.second_.slice(1);
368
315
  ff_compiler_Patterns.check_(variants_, fs_, cs_, true, g_)
369
316
  return
370
317
  }
371
- }
372
- }
373
- {
374
- if(_1.first_.length === 0) {
375
- if(_1.second_.length === 0) {
318
+ if(_1.first_.length === 0 && _1.second_.length === 0) {
376
319
  const remaining_ = ff_core_List.List_map(ff_core_List.List_filter(ff_core_Map.Map_pairs(variants_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ((_w1) => {
377
320
  return (ff_core_Set.Set_size(_w1.second_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String) !== 0)
378
321
  })), ((_1) => {
@@ -380,7 +323,6 @@ return (ff_core_Set.Set_size(_w1.second_, ff_core_Ordering.ff_core_Ordering_Orde
380
323
  const f_ = _1.first_;
381
324
  const vs_ = _1.second_;
382
325
  return ((f_ + " could be ") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(ff_core_Set.Set_toList(vs_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)))
383
- return
384
326
  }
385
327
  }));
386
328
  if((ff_core_List.List_size(remaining_) !== 0)) {
@@ -390,8 +332,6 @@ return
390
332
  }
391
333
  }
392
334
  }
393
- }
394
- }
395
335
 
396
336
  export async function convert_$(modules_, cases_, $task) {
397
337
  function unqualifiedName_(name_) {
@@ -424,70 +364,43 @@ return (_w1 !== variantName_)
424
364
  }
425
365
  }
426
366
  function convertPattern_(pattern_) {
427
- {
428
367
  const pattern_a = pattern_;
429
- {
430
368
  if(pattern_a.PString) {
431
369
  return ff_core_Option.Some(ff_compiler_Patterns.PatternInfo("String literal", ff_core_List.List_toSet(["Any other String literal"], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), []))
432
- return
433
370
  }
434
- }
435
- {
436
371
  if(pattern_a.PInt) {
437
372
  return ff_core_Option.Some(ff_compiler_Patterns.PatternInfo("Int literal", ff_core_List.List_toSet(["Any other Int literal"], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), []))
438
- return
439
373
  }
440
- }
441
- {
442
374
  if(pattern_a.PChar) {
443
375
  return ff_core_Option.Some(ff_compiler_Patterns.PatternInfo("Char literal", ff_core_List.List_toSet(["Any other Char literal"], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), []))
444
- return
445
- }
446
376
  }
447
- {
448
377
  if(pattern_a.PVariable) {
449
378
  const p_ = pattern_a;
450
379
  return ff_core_Option.None()
451
- return
452
- }
453
380
  }
454
- {
455
381
  if(pattern_a.PVariant) {
456
382
  const p_ = pattern_a;
457
383
  const fields_ = ff_core_List.List_collect(ff_core_List.List_pairs(ff_core_List.List_map(p_.patterns_, ((pattern_) => {
458
384
  return convertPattern_(pattern_)
459
385
  }))), ((_1) => {
460
- {
461
- const i_ = _1.first_;
462
386
  if(_1.second_.Some) {
387
+ const i_ = _1.first_;
463
388
  const p_ = _1.second_.value_;
464
389
  return ff_core_Option.Some(ff_core_Pair.Pair(("" + i_), p_))
465
- return
466
- }
467
390
  }
468
391
  {
469
392
  return ff_core_Option.None()
470
- return
471
393
  }
472
394
  }));
473
395
  return ff_core_Option.Some(ff_compiler_Patterns.PatternInfo(unqualifiedName_(p_.name_), otherVariants_(p_.name_), fields_))
474
- return
475
- }
476
396
  }
477
- {
478
397
  if(pattern_a.PVariantAs) {
479
398
  const p_ = pattern_a;
480
399
  return ff_core_Option.Some(ff_compiler_Patterns.PatternInfo(unqualifiedName_(p_.name_), otherVariants_(p_.name_), []))
481
- return
482
400
  }
483
- }
484
- {
485
401
  if(pattern_a.PAlias) {
486
402
  const p_ = pattern_a;
487
403
  return convertPattern_(p_.pattern_)
488
- return
489
- }
490
- }
491
404
  }
492
405
  }
493
406
  return ff_core_List.List_map(ff_core_List.List_pairs(cases_), ((_1) => {
@@ -497,17 +410,13 @@ const case_ = _1.second_;
497
410
  const fields_ = ff_core_List.List_collect(ff_core_List.List_pairs(ff_core_List.List_map(case_.patterns_, ((pattern_) => {
498
411
  return convertPattern_(pattern_)
499
412
  }))), ((_1) => {
500
- {
501
- const i_ = _1.first_;
502
413
  if(_1.second_.Some) {
414
+ const i_ = _1.first_;
503
415
  const p_ = _1.second_.value_;
504
416
  return ff_core_Option.Some(ff_core_Pair.Pair(("" + i_), p_))
505
- return
506
- }
507
417
  }
508
418
  {
509
419
  return ff_core_Option.None()
510
- return
511
420
  }
512
421
  }));
513
422
  const exhaustiveGuards_ = ff_core_List.List_all(case_.guards_, ((g_) => {
@@ -520,7 +429,6 @@ return false
520
429
  }))
521
430
  }));
522
431
  return ff_compiler_Patterns.PatternCaseInfo(fields_, (!exhaustiveGuards_))
523
- return
524
432
  }
525
433
  }))
526
434
  }
@@ -560,135 +468,90 @@ return ff_core_Any.internalAnyTag_((("ff:compiler/Patterns.PatternCaseInfo" + "[
560
468
 
561
469
  export const ff_core_Show_Show$ff_compiler_Patterns_PatternInfo = {
562
470
  show_(value_) {
563
- {
564
471
  const value_a = value_;
565
472
  {
566
473
  const z_ = value_a;
567
474
  return ((((((("PatternInfo" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.variant_)) + ", ") + ff_core_Set.ff_core_Show_Show$ff_core_Set_Set(ff_core_Show.ff_core_Show_Show$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).show_(z_.otherVariants_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_core_Show.ff_core_Show_Show$ff_core_Pair_Pair(ff_core_Show.ff_core_Show_Show$ff_core_String_String, ff_compiler_Patterns.ff_core_Show_Show$ff_compiler_Patterns_PatternInfo)).show_(z_.fields_)) + ")")
568
- return
569
- }
570
475
  }
571
476
  },
572
477
  async show_$(value_, $task) {
573
- {
574
478
  const value_a = value_;
575
479
  {
576
480
  const z_ = value_a;
577
481
  return ((((((("PatternInfo" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.variant_)) + ", ") + ff_core_Set.ff_core_Show_Show$ff_core_Set_Set(ff_core_Show.ff_core_Show_Show$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).show_(z_.otherVariants_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_core_Show.ff_core_Show_Show$ff_core_Pair_Pair(ff_core_Show.ff_core_Show_Show$ff_core_String_String, ff_compiler_Patterns.ff_core_Show_Show$ff_compiler_Patterns_PatternInfo)).show_(z_.fields_)) + ")")
578
- return
579
- }
580
482
  }
581
483
  }
582
484
  };
583
485
 
584
486
  export const ff_core_Show_Show$ff_compiler_Patterns_PatternCaseInfo = {
585
487
  show_(value_) {
586
- {
587
488
  const value_a = value_;
588
489
  {
589
490
  const z_ = value_a;
590
491
  return ((((("PatternCaseInfo" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_core_Show.ff_core_Show_Show$ff_core_Pair_Pair(ff_core_Show.ff_core_Show_Show$ff_core_String_String, ff_compiler_Patterns.ff_core_Show_Show$ff_compiler_Patterns_PatternInfo)).show_(z_.fields_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_Bool_Bool.show_(z_.guard_)) + ")")
591
- return
592
- }
593
492
  }
594
493
  },
595
494
  async show_$(value_, $task) {
596
- {
597
495
  const value_a = value_;
598
496
  {
599
497
  const z_ = value_a;
600
498
  return ((((("PatternCaseInfo" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_core_Show.ff_core_Show_Show$ff_core_Pair_Pair(ff_core_Show.ff_core_Show_Show$ff_core_String_String, ff_compiler_Patterns.ff_core_Show_Show$ff_compiler_Patterns_PatternInfo)).show_(z_.fields_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_Bool_Bool.show_(z_.guard_)) + ")")
601
- return
602
- }
603
499
  }
604
500
  }
605
501
  };
606
502
 
607
503
  export const ff_core_Equal_Equal$ff_compiler_Patterns_PatternInfo = {
608
504
  equals_(x_, y_) {
609
- {
610
505
  const x_a = x_;
611
506
  const y_a = y_;
612
- {
613
- const _guard1 = (x_ === y_);
614
- if(_guard1) {
507
+ if((x_ === y_)) {
615
508
  return true
616
- return
617
- }
618
509
  }
619
510
  {
620
511
  return ((x_.variant_ === y_.variant_) && (ff_core_Set.ff_core_Equal_Equal$ff_core_Set_Set(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).equals_(x_.otherVariants_, y_.otherVariants_) && ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_core_Pair.ff_core_Equal_Equal$ff_core_Pair_Pair(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String, ff_compiler_Patterns.ff_core_Equal_Equal$ff_compiler_Patterns_PatternInfo)).equals_(x_.fields_, y_.fields_)))
621
- return
622
- }
623
512
  }
624
513
  },
625
514
  async equals_$(x_, y_, $task) {
626
- {
627
515
  const x_a = x_;
628
516
  const y_a = y_;
629
- {
630
- const _guard1 = (x_ === y_);
631
- if(_guard1) {
517
+ if((x_ === y_)) {
632
518
  return true
633
- return
634
- }
635
519
  }
636
520
  {
637
521
  return ((x_.variant_ === y_.variant_) && (ff_core_Set.ff_core_Equal_Equal$ff_core_Set_Set(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).equals_(x_.otherVariants_, y_.otherVariants_) && ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_core_Pair.ff_core_Equal_Equal$ff_core_Pair_Pair(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String, ff_compiler_Patterns.ff_core_Equal_Equal$ff_compiler_Patterns_PatternInfo)).equals_(x_.fields_, y_.fields_)))
638
- return
639
- }
640
522
  }
641
523
  }
642
524
  };
643
525
 
644
526
  export const ff_core_Equal_Equal$ff_compiler_Patterns_PatternCaseInfo = {
645
527
  equals_(x_, y_) {
646
- {
647
528
  const x_a = x_;
648
529
  const y_a = y_;
649
- {
650
- const _guard1 = (x_ === y_);
651
- if(_guard1) {
530
+ if((x_ === y_)) {
652
531
  return true
653
- return
654
- }
655
532
  }
656
533
  {
657
534
  return (ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_core_Pair.ff_core_Equal_Equal$ff_core_Pair_Pair(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String, ff_compiler_Patterns.ff_core_Equal_Equal$ff_compiler_Patterns_PatternInfo)).equals_(x_.fields_, y_.fields_) && (x_.guard_ === y_.guard_))
658
- return
659
- }
660
535
  }
661
536
  },
662
537
  async equals_$(x_, y_, $task) {
663
- {
664
538
  const x_a = x_;
665
539
  const y_a = y_;
666
- {
667
- const _guard1 = (x_ === y_);
668
- if(_guard1) {
540
+ if((x_ === y_)) {
669
541
  return true
670
- return
671
- }
672
542
  }
673
543
  {
674
544
  return (ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_core_Pair.ff_core_Equal_Equal$ff_core_Pair_Pair(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String, ff_compiler_Patterns.ff_core_Equal_Equal$ff_compiler_Patterns_PatternInfo)).equals_(x_.fields_, y_.fields_) && (x_.guard_ === y_.guard_))
675
- return
676
- }
677
545
  }
678
546
  }
679
547
  };
680
548
 
681
549
  export const ff_core_Ordering_Order$ff_compiler_Patterns_PatternInfo = {
682
550
  compare_(x_, y_) {
683
- {
684
551
  const x_a = x_;
685
552
  const y_a = y_;
686
- {
687
- const _guard1 = (x_ === y_);
688
- if(_guard1) {
553
+ if((x_ === y_)) {
689
554
  return ff_core_Ordering.OrderingSame()
690
- return
691
- }
692
555
  }
693
556
  {
694
557
  const variantOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String.compare_(x_.variant_, y_.variant_);
@@ -709,18 +572,12 @@ return ff_core_Ordering.OrderingSame()
709
572
  }
710
573
  return
711
574
  }
712
- }
713
575
  },
714
576
  async compare_$(x_, y_, $task) {
715
- {
716
577
  const x_a = x_;
717
578
  const y_a = y_;
718
- {
719
- const _guard1 = (x_ === y_);
720
- if(_guard1) {
579
+ if((x_ === y_)) {
721
580
  return ff_core_Ordering.OrderingSame()
722
- return
723
- }
724
581
  }
725
582
  {
726
583
  const variantOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String.compare_(x_.variant_, y_.variant_);
@@ -742,20 +599,14 @@ return ff_core_Ordering.OrderingSame()
742
599
  return
743
600
  }
744
601
  }
745
- }
746
602
  };
747
603
 
748
604
  export const ff_core_Ordering_Order$ff_compiler_Patterns_PatternCaseInfo = {
749
605
  compare_(x_, y_) {
750
- {
751
606
  const x_a = x_;
752
607
  const y_a = y_;
753
- {
754
- const _guard1 = (x_ === y_);
755
- if(_guard1) {
608
+ if((x_ === y_)) {
756
609
  return ff_core_Ordering.OrderingSame()
757
- return
758
- }
759
610
  }
760
611
  {
761
612
  const fieldsOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_List_List(ff_core_Ordering.ff_core_Ordering_Order$ff_core_Pair_Pair(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Patterns.ff_core_Ordering_Order$ff_compiler_Patterns_PatternInfo)).compare_(x_.fields_, y_.fields_);
@@ -771,18 +622,12 @@ return ff_core_Ordering.OrderingSame()
771
622
  }
772
623
  return
773
624
  }
774
- }
775
625
  },
776
626
  async compare_$(x_, y_, $task) {
777
- {
778
627
  const x_a = x_;
779
628
  const y_a = y_;
780
- {
781
- const _guard1 = (x_ === y_);
782
- if(_guard1) {
629
+ if((x_ === y_)) {
783
630
  return ff_core_Ordering.OrderingSame()
784
- return
785
- }
786
631
  }
787
632
  {
788
633
  const fieldsOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_List_List(ff_core_Ordering.ff_core_Ordering_Order$ff_core_Pair_Pair(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Patterns.ff_core_Ordering_Order$ff_compiler_Patterns_PatternInfo)).compare_(x_.fields_, y_.fields_);
@@ -799,12 +644,10 @@ return ff_core_Ordering.OrderingSame()
799
644
  return
800
645
  }
801
646
  }
802
- }
803
647
  };
804
648
 
805
649
  export const ff_core_Serializable_Serializable$ff_compiler_Patterns_PatternInfo = {
806
650
  serializeUsing_(serialization_, value_) {
807
- {
808
651
  const serialization_a = serialization_;
809
652
  const value_a = value_;
810
653
  {
@@ -818,28 +661,22 @@ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Set_Set(ff_core_S
818
661
  ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Pair.ff_core_Serializable_Serializable$ff_core_Pair_Pair(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_compiler_Patterns.ff_core_Serializable_Serializable$ff_compiler_Patterns_PatternInfo)).serializeUsing_(serialization_, v_.fields_)
819
662
  return
820
663
  }
821
- }
822
664
  },
823
665
  deserializeUsing_(serialization_) {
824
666
  const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
825
667
  serialization_.offset_ += 1;
826
668
  {
827
669
  const _1 = variantIndex_;
828
- {
829
670
  if(_1 === 0) {
830
671
  serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 32), 0);
831
672
  return ff_compiler_Patterns.PatternInfo(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Set_Set(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Pair.ff_core_Serializable_Serializable$ff_core_Pair_Pair(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_compiler_Patterns.ff_core_Serializable_Serializable$ff_compiler_Patterns_PatternInfo)).deserializeUsing_(serialization_))
832
- return
833
- }
834
673
  }
835
674
  {
836
675
  throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException)})
837
- return
838
676
  }
839
677
  }
840
678
  },
841
679
  async serializeUsing_$(serialization_, value_, $task) {
842
- {
843
680
  const serialization_a = serialization_;
844
681
  const value_a = value_;
845
682
  {
@@ -853,23 +690,18 @@ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Set_Set(ff_core_S
853
690
  ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Pair.ff_core_Serializable_Serializable$ff_core_Pair_Pair(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_compiler_Patterns.ff_core_Serializable_Serializable$ff_compiler_Patterns_PatternInfo)).serializeUsing_(serialization_, v_.fields_)
854
691
  return
855
692
  }
856
- }
857
693
  },
858
694
  async deserializeUsing_$(serialization_, $task) {
859
695
  const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
860
696
  serialization_.offset_ += 1;
861
697
  {
862
698
  const _1 = variantIndex_;
863
- {
864
699
  if(_1 === 0) {
865
700
  serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 32), 0);
866
701
  return ff_compiler_Patterns.PatternInfo(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Set_Set(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Pair.ff_core_Serializable_Serializable$ff_core_Pair_Pair(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_compiler_Patterns.ff_core_Serializable_Serializable$ff_compiler_Patterns_PatternInfo)).deserializeUsing_(serialization_))
867
- return
868
- }
869
702
  }
870
703
  {
871
704
  throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException)})
872
- return
873
705
  }
874
706
  }
875
707
  }
@@ -877,7 +709,6 @@ return
877
709
 
878
710
  export const ff_core_Serializable_Serializable$ff_compiler_Patterns_PatternCaseInfo = {
879
711
  serializeUsing_(serialization_, value_) {
880
- {
881
712
  const serialization_a = serialization_;
882
713
  const value_a = value_;
883
714
  {
@@ -890,28 +721,22 @@ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core
890
721
  ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.serializeUsing_(serialization_, v_.guard_)
891
722
  return
892
723
  }
893
- }
894
724
  },
895
725
  deserializeUsing_(serialization_) {
896
726
  const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
897
727
  serialization_.offset_ += 1;
898
728
  {
899
729
  const _1 = variantIndex_;
900
- {
901
730
  if(_1 === 0) {
902
731
  serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 36), 0);
903
732
  return ff_compiler_Patterns.PatternCaseInfo(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Pair.ff_core_Serializable_Serializable$ff_core_Pair_Pair(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_compiler_Patterns.ff_core_Serializable_Serializable$ff_compiler_Patterns_PatternInfo)).deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_))
904
- return
905
- }
906
733
  }
907
734
  {
908
735
  throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException)})
909
- return
910
736
  }
911
737
  }
912
738
  },
913
739
  async serializeUsing_$(serialization_, value_, $task) {
914
- {
915
740
  const serialization_a = serialization_;
916
741
  const value_a = value_;
917
742
  {
@@ -924,23 +749,18 @@ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core
924
749
  ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.serializeUsing_(serialization_, v_.guard_)
925
750
  return
926
751
  }
927
- }
928
752
  },
929
753
  async deserializeUsing_$(serialization_, $task) {
930
754
  const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
931
755
  serialization_.offset_ += 1;
932
756
  {
933
757
  const _1 = variantIndex_;
934
- {
935
758
  if(_1 === 0) {
936
759
  serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 36), 0);
937
760
  return ff_compiler_Patterns.PatternCaseInfo(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Pair.ff_core_Serializable_Serializable$ff_core_Pair_Pair(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_compiler_Patterns.ff_core_Serializable_Serializable$ff_compiler_Patterns_PatternInfo)).deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_))
938
- return
939
- }
940
761
  }
941
762
  {
942
763
  throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException)})
943
- return
944
764
  }
945
765
  }
946
766
  }