firefly-compiler 0.4.20 → 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 (62) hide show
  1. package/compiler/Builder.ff +23 -13
  2. package/compiler/JsEmitter.ff +120 -76
  3. package/compiler/LspHook.ff +4 -2
  4. package/compiler/Main.ff +13 -7
  5. package/compiler/Resolver.ff +15 -15
  6. package/compiler/Syntax.ff +1 -0
  7. package/core/Array.ff +6 -4
  8. package/core/Int.ff +12 -12
  9. package/core/List.ff +6 -4
  10. package/experimental/benchmarks/ListGrab.ff +23 -0
  11. package/experimental/benchmarks/ListGrab.java +55 -0
  12. package/experimental/benchmarks/Pyrotek45.ff +30 -0
  13. package/experimental/benchmarks/Pyrotek45.java +64 -0
  14. package/experimental/tests/TestJson.ff +26 -0
  15. package/lsp/Handler.ff +55 -59
  16. package/lsp/SignatureHelpHandler.ff +5 -4
  17. package/lsp/TestReferences.ff +15 -0
  18. package/lsp/TestReferencesCase.ff +8 -0
  19. package/output/js/ff/compiler/Builder.mjs +50 -44
  20. package/output/js/ff/compiler/Dependencies.mjs +0 -2
  21. package/output/js/ff/compiler/Deriver.mjs +16 -140
  22. package/output/js/ff/compiler/Dictionaries.mjs +8 -222
  23. package/output/js/ff/compiler/Environment.mjs +12 -154
  24. package/output/js/ff/compiler/Inference.mjs +127 -1013
  25. package/output/js/ff/compiler/JsEmitter.mjs +434 -2344
  26. package/output/js/ff/compiler/JsImporter.mjs +0 -12
  27. package/output/js/ff/compiler/LspHook.mjs +20 -446
  28. package/output/js/ff/compiler/Main.mjs +96 -550
  29. package/output/js/ff/compiler/Parser.mjs +36 -356
  30. package/output/js/ff/compiler/Patterns.mjs +20 -200
  31. package/output/js/ff/compiler/Resolver.mjs +26 -340
  32. package/output/js/ff/compiler/Substitution.mjs +2 -160
  33. package/output/js/ff/compiler/Syntax.mjs +449 -3293
  34. package/output/js/ff/compiler/Token.mjs +9 -1095
  35. package/output/js/ff/compiler/Tokenizer.mjs +4 -2
  36. package/output/js/ff/compiler/Unification.mjs +26 -360
  37. package/output/js/ff/compiler/Wildcards.mjs +0 -86
  38. package/output/js/ff/compiler/Workspace.mjs +8 -96
  39. package/output/js/ff/core/Array.mjs +15 -8
  40. package/output/js/ff/core/AssetSystem.mjs +4 -14
  41. package/output/js/ff/core/Bool.mjs +0 -12
  42. package/output/js/ff/core/Core.mjs +0 -30
  43. package/output/js/ff/core/Int.mjs +24 -24
  44. package/output/js/ff/core/IntMap.mjs +0 -8
  45. package/output/js/ff/core/Json.mjs +0 -40
  46. package/output/js/ff/core/List.mjs +23 -32
  47. package/output/js/ff/core/Lock.mjs +0 -10
  48. package/output/js/ff/core/Map.mjs +0 -24
  49. package/output/js/ff/core/Option.mjs +10 -286
  50. package/output/js/ff/core/Ordering.mjs +16 -158
  51. package/output/js/ff/core/Pair.mjs +2 -34
  52. package/output/js/ff/core/Path.mjs +2 -28
  53. package/output/js/ff/core/Random.mjs +4 -4
  54. package/output/js/ff/core/RbMap.mjs +56 -644
  55. package/output/js/ff/core/Show.mjs +0 -16
  56. package/output/js/ff/core/Stream.mjs +14 -144
  57. package/output/js/ff/core/StringMap.mjs +0 -8
  58. package/output/js/ff/core/Try.mjs +4 -108
  59. package/output/js/ff/core/Unit.mjs +2 -16
  60. package/package.json +1 -1
  61. package/postgresql/Pg.ff +23 -23
  62. package/vscode/package.json +1 -1
@@ -127,19 +127,13 @@ return ff_compiler_Unification.Unification(ff_core_Map.empty_(), ff_core_Map.emp
127
127
  const moduleName_ = ff_core_String.String_dropLast(module_.file_, ff_core_String.String_size(".ff"));
128
128
  return ff_core_List.List_map(module_.instances_, ((definition_) => {
129
129
  const typeName_ = (((_1) => {
130
- {
131
130
  if(_1.TConstructor) {
132
131
  const name_ = _1.name_;
133
132
  return name_
134
- return
135
- }
136
133
  }
137
- {
138
134
  if(_1.TVariable) {
139
135
  const i_ = _1.index_;
140
136
  return ff_compiler_Unification.fail_(definition_.at_, ("Unexpected unification variable: $" + i_))
141
- return
142
- }
143
137
  }
144
138
  }))(ff_core_List.List_grabFirst(definition_.typeArguments_));
145
139
  return ff_core_Pair.Pair(ff_compiler_Unification.InstanceKey(definition_.traitName_, typeName_), ff_compiler_Unification.InstanceValue(definition_.generics_, definition_.constraints_, module_.packagePair_, moduleName_, definition_.traitName_, definition_.typeArguments_))
@@ -156,19 +150,13 @@ return ff_compiler_Unification.Unification(ff_core_Map.empty_(), ff_core_Map.emp
156
150
  const moduleName_ = ff_core_String.String_dropLast(module_.file_, ff_core_String.String_size(".ff"));
157
151
  return ff_core_List.List_map(module_.instances_, ((definition_) => {
158
152
  const typeName_ = (((_1) => {
159
- {
160
153
  if(_1.TConstructor) {
161
154
  const name_ = _1.name_;
162
155
  return name_
163
- return
164
156
  }
165
- }
166
- {
167
157
  if(_1.TVariable) {
168
158
  const i_ = _1.index_;
169
159
  return ff_compiler_Unification.fail_(definition_.at_, ("Unexpected unification variable: $" + i_))
170
- return
171
- }
172
160
  }
173
161
  }))(ff_core_List.List_grabFirst(definition_.typeArguments_));
174
162
  return ff_core_Pair.Pair(ff_compiler_Unification.InstanceKey(definition_.traitName_, typeName_), ff_compiler_Unification.InstanceValue(definition_.generics_, definition_.constraints_, module_.packagePair_, moduleName_, definition_.traitName_, definition_.typeArguments_))
@@ -193,36 +181,24 @@ return result_
193
181
  }
194
182
 
195
183
  export function Unification_instantiate(self_, instantiation_, type_) {
196
- {
197
184
  const self_a = self_;
198
185
  const instantiation_a = instantiation_;
199
186
  const type_a = type_;
200
- {
201
- if(type_a.TConstructor) {
187
+ if(type_a.TConstructor && type_a.generics_.length === 0) {
202
188
  const at_ = type_a.at_;
203
189
  const name_ = type_a.name_;
204
- if(type_a.generics_.length === 0) {
205
190
  {
206
191
  const _1 = ff_core_Map.Map_get(instantiation_, name_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String);
207
- {
208
192
  if(_1.Some) {
209
193
  const t_ = _1.value_;
210
194
  return t_
211
- return
212
- }
213
195
  }
214
- {
215
196
  if(_1.None) {
216
197
  return type_
217
- return
218
- }
219
198
  }
220
199
  }
221
200
  return
222
201
  }
223
- }
224
- }
225
- {
226
202
  if(type_a.TConstructor) {
227
203
  const at_ = type_a.at_;
228
204
  const name_ = type_a.name_;
@@ -232,30 +208,21 @@ return ff_compiler_Unification.Unification_instantiate(self_, instantiation_, _w
232
208
  })))
233
209
  return
234
210
  }
235
- }
236
- {
237
211
  if(type_a.TVariable) {
238
212
  const i_ = type_a.index_;
239
213
  const _guard1 = ff_compiler_Unification.Unification_get(self_, i_);
240
214
  if(_guard1.Some) {
241
215
  const t_ = _guard1.value_;
242
216
  return ff_compiler_Unification.Unification_instantiate(self_, instantiation_, t_)
243
- return
244
- }
245
217
  }
246
218
  }
247
- {
248
219
  if(type_a.TVariable) {
249
220
  const i_ = type_a.index_;
250
221
  return type_
251
- return
252
- }
253
- }
254
222
  }
255
223
  }
256
224
 
257
225
  export function Unification_instantiateConstraint(self_, instantiation_, constraint_) {
258
- {
259
226
  const self_a = self_;
260
227
  const instantiation_a = instantiation_;
261
228
  const constraint_a = constraint_;
@@ -269,12 +236,10 @@ return ff_compiler_Unification.Unification_instantiate(self_, instantiation_, _w
269
236
  return
270
237
  }
271
238
  }
272
- }
273
239
 
274
240
  export function Unification_constrain(self_, at_, type_, constraintName_, generics_) {
275
241
  {
276
242
  const _1 = type_;
277
- {
278
243
  if(_1.TVariable) {
279
244
  const i_ = _1.index_;
280
245
  const _guard1 = ff_compiler_Unification.Unification_get(self_, i_);
@@ -284,31 +249,23 @@ ff_compiler_Unification.Unification_constrain(self_, at_, t_, constraintName_, g
284
249
  return
285
250
  }
286
251
  }
287
- }
288
- {
289
252
  if(_1.TVariable) {
290
253
  const i_ = _1.index_;
291
254
  {
292
255
  const _1 = ff_core_Map.Map_get(self_.constraints_, i_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int);
293
- {
294
256
  if(_1.None) {
295
257
  self_.constraints_ = ff_core_Map.Map_add(self_.constraints_, i_, ff_core_List.List_toMap([ff_core_Pair.Pair(constraintName_, ff_compiler_Unification.ConstraintGenerics(at_, generics_))], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int)
296
258
  return
297
259
  }
298
- }
299
- {
300
260
  if(_1.Some) {
301
261
  const map_ = _1.value_;
302
262
  {
303
263
  const _1 = ff_core_Map.Map_get(map_, constraintName_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String);
304
- {
305
264
  if(_1.None) {
306
265
  const newMap_ = ff_core_Map.Map_add(map_, constraintName_, ff_compiler_Unification.ConstraintGenerics(at_, generics_), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String);
307
266
  self_.constraints_ = ff_core_Map.Map_add(self_.constraints_, i_, newMap_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int)
308
267
  return
309
268
  }
310
- }
311
- {
312
269
  if(_1.Some) {
313
270
  const generics2_ = _1.value_.generics_;
314
271
  ff_core_List.List_each(ff_core_List.List_zip(generics_, generics2_), ((_1) => {
@@ -322,21 +279,16 @@ return
322
279
  return
323
280
  }
324
281
  }
325
- }
326
282
  return
327
283
  }
328
284
  }
329
- }
330
285
  return
331
286
  }
332
- }
333
- {
334
287
  if(_1.TConstructor) {
335
288
  const name_ = _1.name_;
336
289
  const generics2_ = _1.generics_;
337
290
  {
338
291
  const _1 = ff_core_Map.Map_get(self_.instances_, ff_compiler_Unification.InstanceKey(constraintName_, name_), ff_compiler_Unification.ff_core_Ordering_Order$ff_compiler_Unification_InstanceKey);
339
- {
340
292
  if(_1.None) {
341
293
  const g1_ = (ff_core_List.List_isEmpty(generics_)
342
294
  ? ""
@@ -349,8 +301,6 @@ throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Sy
349
301
  }
350
302
  return
351
303
  }
352
- }
353
- {
354
304
  if(_1.Some) {
355
305
  const definition_ = _1.value_;
356
306
  const unificationVariables_ = ff_core_List.List_map(definition_.generics_, ((_) => {
@@ -374,16 +324,13 @@ return
374
324
  return
375
325
  }
376
326
  }
377
- }
378
327
  return
379
328
  }
380
329
  }
381
330
  }
382
- }
383
331
 
384
332
  export function Unification_get(self_, index_) {
385
333
  return ff_core_Option.Option_map(ff_core_Map.Map_get(self_.substitution_, index_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int), ((_1) => {
386
- {
387
334
  if(_1.TVariable) {
388
335
  const i_ = _1.index_;
389
336
  const _guard1 = ff_core_Map.Map_get(self_.substitution_, i_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int);
@@ -391,40 +338,29 @@ if(_guard1.Some) {
391
338
  const t_ = _guard1.value_;
392
339
  self_.substitution_ = ff_core_Map.Map_add(self_.substitution_, index_, t_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int);
393
340
  return t_
394
- return
395
- }
396
341
  }
397
342
  }
398
343
  {
399
344
  const t_ = _1;
400
345
  return t_
401
- return
402
346
  }
403
347
  }))
404
348
  }
405
349
 
406
350
  export function Unification_substitute(self_, type_) {
407
- {
408
351
  const self_a = self_;
409
352
  const type_a = type_;
410
- {
411
353
  if(type_a.TVariable) {
412
354
  const i_ = type_a.index_;
413
355
  const _guard1 = ff_compiler_Unification.Unification_get(self_, i_);
414
356
  if(_guard1.Some) {
415
357
  const t_ = _guard1.value_;
416
358
  return ff_compiler_Unification.Unification_substitute(self_, t_)
417
- return
418
- }
419
359
  }
420
360
  }
421
- {
422
361
  if(type_a.TVariable) {
423
362
  return type_
424
- return
425
- }
426
363
  }
427
- {
428
364
  if(type_a.TConstructor) {
429
365
  const t_ = type_a;
430
366
  {
@@ -440,29 +376,20 @@ return
440
376
  return
441
377
  }
442
378
  }
443
- }
444
- }
445
379
 
446
380
  export function Unification_unify(self_, at_, t1_, t2_) {
447
- {
448
381
  const self_a = self_;
449
382
  const at_a = at_;
450
383
  const t1_a = t1_;
451
384
  const t2_a = t2_;
452
- {
453
- if(t1_a.TVariable) {
385
+ if(t1_a.TVariable && t2_a.TVariable) {
454
386
  const i1_ = t1_a.index_;
455
- if(t2_a.TVariable) {
456
387
  const i2_ = t2_a.index_;
457
- const _guard1 = (i1_ === i2_);
458
- if(_guard1) {
388
+ if((i1_ === i2_)) {
459
389
 
460
390
  return
461
391
  }
462
392
  }
463
- }
464
- }
465
- {
466
393
  if(t1_a.TVariable) {
467
394
  const i_ = t1_a.index_;
468
395
  const _guard1 = ff_compiler_Unification.Unification_get(self_, i_);
@@ -472,8 +399,6 @@ ff_compiler_Unification.Unification_unify(self_, at_, t_, t2_)
472
399
  return
473
400
  }
474
401
  }
475
- }
476
- {
477
402
  if(t2_a.TVariable) {
478
403
  const i_ = t2_a.index_;
479
404
  const _guard1 = ff_compiler_Unification.Unification_get(self_, i_);
@@ -483,26 +408,19 @@ ff_compiler_Unification.Unification_unify(self_, at_, t1_, t_)
483
408
  return
484
409
  }
485
410
  }
486
- }
487
- {
488
411
  if(t1_a.TVariable) {
489
412
  const i_ = t1_a.index_;
490
413
  ff_compiler_Unification.Unification_bind(self_, at_, i_, t2_)
491
414
  return
492
415
  }
493
- }
494
- {
495
416
  if(t2_a.TVariable) {
496
417
  const i_ = t2_a.index_;
497
418
  ff_compiler_Unification.Unification_bind(self_, at_, i_, t1_)
498
419
  return
499
420
  }
500
- }
501
- {
502
- if(t1_a.TConstructor) {
421
+ if(t1_a.TConstructor && t2_a.TConstructor) {
503
422
  const name1_ = t1_a.name_;
504
423
  const generics1_ = t1_a.generics_;
505
- if(t2_a.TConstructor) {
506
424
  const name2_ = t2_a.name_;
507
425
  const generics2_ = t2_a.generics_;
508
426
  if(((name1_ !== name2_) || (ff_core_List.List_size(generics1_) !== ff_core_List.List_size(generics2_)))) {
@@ -541,9 +459,6 @@ return
541
459
  return
542
460
  }
543
461
  }
544
- }
545
- }
546
- }
547
462
 
548
463
  export function Unification_bind(self_, at_, index_, type_) {
549
464
  if(ff_compiler_Unification.Unification_occursIn(self_, index_, type_)) {
@@ -574,10 +489,8 @@ ff_compiler_Unification.Unification_affect(self_, at_, type_, ff_compiler_Syntax
574
489
  export function Unification_affect(self_, at_, source_, target_) {
575
490
  {
576
491
  const _1 = ff_core_Pair.Pair(ff_compiler_Unification.Unification_substitute(self_, source_), ff_compiler_Unification.Unification_substitute(self_, target_));
577
- {
578
- if(_1.first_.TVariable) {
492
+ if(_1.first_.TVariable && _1.second_.TVariable) {
579
493
  const i1_ = _1.first_.index_;
580
- if(_1.second_.TVariable) {
581
494
  const i2_ = _1.second_.index_;
582
495
  const is_ = ff_core_Option.Option_else(ff_core_Map.Map_get(self_.affects_, i1_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int), (() => {
583
496
  return ff_core_List.List_toSet([], ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int)
@@ -585,24 +498,14 @@ return ff_core_List.List_toSet([], ff_core_Ordering.ff_core_Ordering_Order$ff_co
585
498
  self_.affects_ = ff_core_Map.Map_add(self_.affects_, i1_, ff_core_Set.Set_add(is_, i2_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int), ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int)
586
499
  return
587
500
  }
588
- }
589
- }
590
- {
591
- if(_1.second_.TConstructor) {
592
- if(_1.second_.name_ === "Q$") {
501
+ if(_1.second_.TConstructor && _1.second_.name_ === "Q$") {
593
502
 
594
503
  return
595
504
  }
596
- }
597
- }
598
- {
599
- if(_1.first_.TConstructor) {
600
- if(_1.first_.name_ === "ff:core/Nothing.Nothing") {
505
+ if(_1.first_.TConstructor && _1.first_.name_ === "ff:core/Nothing.Nothing") {
601
506
 
602
507
  return
603
508
  }
604
- }
605
- }
606
509
  {
607
510
  const t1_ = _1.first_;
608
511
  const t2_ = _1.second_;
@@ -613,29 +516,21 @@ return
613
516
  }
614
517
 
615
518
  export function Unification_occursIn(self_, index_, t_) {
616
- {
617
519
  const self_a = self_;
618
520
  const index_a = index_;
619
521
  const t_a = t_;
620
- {
621
522
  if(t_a.TVariable) {
622
523
  const i_ = t_a.index_;
623
524
  const _guard1 = ff_compiler_Unification.Unification_get(self_, i_);
624
525
  if(_guard1.Some) {
625
526
  const type_ = _guard1.value_;
626
527
  return ff_compiler_Unification.Unification_occursIn(self_, index_, type_)
627
- return
628
- }
629
528
  }
630
529
  }
631
- {
632
530
  if(t_a.TVariable) {
633
531
  const i_ = t_a.index_;
634
532
  return (i_ === index_)
635
- return
636
533
  }
637
- }
638
- {
639
534
  if(t_a.TConstructor) {
640
535
  const generics_ = t_a.generics_;
641
536
  return ff_core_List.List_any(generics_, ((t_) => {
@@ -644,8 +539,6 @@ return ff_compiler_Unification.Unification_occursIn(self_, index_, t_)
644
539
  return
645
540
  }
646
541
  }
647
- }
648
- }
649
542
 
650
543
  export async function Unification_withLocalInstances$(self_, instances_, body_, $task) {
651
544
  const oldInstances_ = self_.instances_;
@@ -664,36 +557,24 @@ return result_
664
557
  }
665
558
 
666
559
  export async function Unification_instantiate$(self_, instantiation_, type_, $task) {
667
- {
668
560
  const self_a = self_;
669
561
  const instantiation_a = instantiation_;
670
562
  const type_a = type_;
671
- {
672
- if(type_a.TConstructor) {
563
+ if(type_a.TConstructor && type_a.generics_.length === 0) {
673
564
  const at_ = type_a.at_;
674
565
  const name_ = type_a.name_;
675
- if(type_a.generics_.length === 0) {
676
566
  {
677
567
  const _1 = ff_core_Map.Map_get(instantiation_, name_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String);
678
- {
679
568
  if(_1.Some) {
680
569
  const t_ = _1.value_;
681
570
  return t_
682
- return
683
- }
684
571
  }
685
- {
686
572
  if(_1.None) {
687
573
  return type_
688
- return
689
- }
690
574
  }
691
575
  }
692
576
  return
693
577
  }
694
- }
695
- }
696
- {
697
578
  if(type_a.TConstructor) {
698
579
  const at_ = type_a.at_;
699
580
  const name_ = type_a.name_;
@@ -703,30 +584,21 @@ return ff_compiler_Unification.Unification_instantiate(self_, instantiation_, _w
703
584
  })))
704
585
  return
705
586
  }
706
- }
707
- {
708
587
  if(type_a.TVariable) {
709
588
  const i_ = type_a.index_;
710
589
  const _guard1 = ff_compiler_Unification.Unification_get(self_, i_);
711
590
  if(_guard1.Some) {
712
591
  const t_ = _guard1.value_;
713
592
  return ff_compiler_Unification.Unification_instantiate(self_, instantiation_, t_)
714
- return
715
593
  }
716
594
  }
717
- }
718
- {
719
595
  if(type_a.TVariable) {
720
596
  const i_ = type_a.index_;
721
597
  return type_
722
- return
723
- }
724
- }
725
598
  }
726
599
  }
727
600
 
728
601
  export async function Unification_instantiateConstraint$(self_, instantiation_, constraint_, $task) {
729
- {
730
602
  const self_a = self_;
731
603
  const instantiation_a = instantiation_;
732
604
  const constraint_a = constraint_;
@@ -740,12 +612,10 @@ return ff_compiler_Unification.Unification_instantiate(self_, instantiation_, _w
740
612
  return
741
613
  }
742
614
  }
743
- }
744
615
 
745
616
  export async function Unification_constrain$(self_, at_, type_, constraintName_, generics_, $task) {
746
617
  {
747
618
  const _1 = type_;
748
- {
749
619
  if(_1.TVariable) {
750
620
  const i_ = _1.index_;
751
621
  const _guard1 = ff_compiler_Unification.Unification_get(self_, i_);
@@ -755,31 +625,23 @@ ff_compiler_Unification.Unification_constrain(self_, at_, t_, constraintName_, g
755
625
  return
756
626
  }
757
627
  }
758
- }
759
- {
760
628
  if(_1.TVariable) {
761
629
  const i_ = _1.index_;
762
630
  {
763
631
  const _1 = ff_core_Map.Map_get(self_.constraints_, i_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int);
764
- {
765
632
  if(_1.None) {
766
633
  self_.constraints_ = ff_core_Map.Map_add(self_.constraints_, i_, ff_core_List.List_toMap([ff_core_Pair.Pair(constraintName_, ff_compiler_Unification.ConstraintGenerics(at_, generics_))], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int)
767
634
  return
768
635
  }
769
- }
770
- {
771
636
  if(_1.Some) {
772
637
  const map_ = _1.value_;
773
638
  {
774
639
  const _1 = ff_core_Map.Map_get(map_, constraintName_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String);
775
- {
776
640
  if(_1.None) {
777
641
  const newMap_ = ff_core_Map.Map_add(map_, constraintName_, ff_compiler_Unification.ConstraintGenerics(at_, generics_), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String);
778
642
  self_.constraints_ = ff_core_Map.Map_add(self_.constraints_, i_, newMap_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int)
779
643
  return
780
644
  }
781
- }
782
- {
783
645
  if(_1.Some) {
784
646
  const generics2_ = _1.value_.generics_;
785
647
  ff_core_List.List_each(ff_core_List.List_zip(generics_, generics2_), ((_1) => {
@@ -793,21 +655,16 @@ return
793
655
  return
794
656
  }
795
657
  }
796
- }
797
658
  return
798
659
  }
799
660
  }
800
- }
801
661
  return
802
662
  }
803
- }
804
- {
805
663
  if(_1.TConstructor) {
806
664
  const name_ = _1.name_;
807
665
  const generics2_ = _1.generics_;
808
666
  {
809
667
  const _1 = ff_core_Map.Map_get(self_.instances_, ff_compiler_Unification.InstanceKey(constraintName_, name_), ff_compiler_Unification.ff_core_Ordering_Order$ff_compiler_Unification_InstanceKey);
810
- {
811
668
  if(_1.None) {
812
669
  const g1_ = (ff_core_List.List_isEmpty(generics_)
813
670
  ? ""
@@ -820,8 +677,6 @@ throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Sy
820
677
  }
821
678
  return
822
679
  }
823
- }
824
- {
825
680
  if(_1.Some) {
826
681
  const definition_ = _1.value_;
827
682
  const unificationVariables_ = ff_core_List.List_map(definition_.generics_, ((_) => {
@@ -845,16 +700,13 @@ return
845
700
  return
846
701
  }
847
702
  }
848
- }
849
703
  return
850
704
  }
851
705
  }
852
706
  }
853
- }
854
707
 
855
708
  export async function Unification_get$(self_, index_, $task) {
856
709
  return ff_core_Option.Option_map(ff_core_Map.Map_get(self_.substitution_, index_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int), ((_1) => {
857
- {
858
710
  if(_1.TVariable) {
859
711
  const i_ = _1.index_;
860
712
  const _guard1 = ff_core_Map.Map_get(self_.substitution_, i_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int);
@@ -862,40 +714,29 @@ if(_guard1.Some) {
862
714
  const t_ = _guard1.value_;
863
715
  self_.substitution_ = ff_core_Map.Map_add(self_.substitution_, index_, t_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int);
864
716
  return t_
865
- return
866
- }
867
717
  }
868
718
  }
869
719
  {
870
720
  const t_ = _1;
871
721
  return t_
872
- return
873
722
  }
874
723
  }))
875
724
  }
876
725
 
877
726
  export async function Unification_substitute$(self_, type_, $task) {
878
- {
879
727
  const self_a = self_;
880
728
  const type_a = type_;
881
- {
882
729
  if(type_a.TVariable) {
883
730
  const i_ = type_a.index_;
884
731
  const _guard1 = ff_compiler_Unification.Unification_get(self_, i_);
885
732
  if(_guard1.Some) {
886
733
  const t_ = _guard1.value_;
887
734
  return ff_compiler_Unification.Unification_substitute(self_, t_)
888
- return
889
- }
890
735
  }
891
736
  }
892
- {
893
737
  if(type_a.TVariable) {
894
738
  return type_
895
- return
896
739
  }
897
- }
898
- {
899
740
  if(type_a.TConstructor) {
900
741
  const t_ = type_a;
901
742
  {
@@ -911,29 +752,20 @@ return
911
752
  return
912
753
  }
913
754
  }
914
- }
915
- }
916
755
 
917
756
  export async function Unification_unify$(self_, at_, t1_, t2_, $task) {
918
- {
919
757
  const self_a = self_;
920
758
  const at_a = at_;
921
759
  const t1_a = t1_;
922
760
  const t2_a = t2_;
923
- {
924
- if(t1_a.TVariable) {
761
+ if(t1_a.TVariable && t2_a.TVariable) {
925
762
  const i1_ = t1_a.index_;
926
- if(t2_a.TVariable) {
927
763
  const i2_ = t2_a.index_;
928
- const _guard1 = (i1_ === i2_);
929
- if(_guard1) {
764
+ if((i1_ === i2_)) {
930
765
 
931
766
  return
932
767
  }
933
768
  }
934
- }
935
- }
936
- {
937
769
  if(t1_a.TVariable) {
938
770
  const i_ = t1_a.index_;
939
771
  const _guard1 = ff_compiler_Unification.Unification_get(self_, i_);
@@ -943,8 +775,6 @@ ff_compiler_Unification.Unification_unify(self_, at_, t_, t2_)
943
775
  return
944
776
  }
945
777
  }
946
- }
947
- {
948
778
  if(t2_a.TVariable) {
949
779
  const i_ = t2_a.index_;
950
780
  const _guard1 = ff_compiler_Unification.Unification_get(self_, i_);
@@ -954,26 +784,19 @@ ff_compiler_Unification.Unification_unify(self_, at_, t1_, t_)
954
784
  return
955
785
  }
956
786
  }
957
- }
958
- {
959
787
  if(t1_a.TVariable) {
960
788
  const i_ = t1_a.index_;
961
789
  ff_compiler_Unification.Unification_bind(self_, at_, i_, t2_)
962
790
  return
963
791
  }
964
- }
965
- {
966
792
  if(t2_a.TVariable) {
967
793
  const i_ = t2_a.index_;
968
794
  ff_compiler_Unification.Unification_bind(self_, at_, i_, t1_)
969
795
  return
970
796
  }
971
- }
972
- {
973
- if(t1_a.TConstructor) {
797
+ if(t1_a.TConstructor && t2_a.TConstructor) {
974
798
  const name1_ = t1_a.name_;
975
799
  const generics1_ = t1_a.generics_;
976
- if(t2_a.TConstructor) {
977
800
  const name2_ = t2_a.name_;
978
801
  const generics2_ = t2_a.generics_;
979
802
  if(((name1_ !== name2_) || (ff_core_List.List_size(generics1_) !== ff_core_List.List_size(generics2_)))) {
@@ -1012,9 +835,6 @@ return
1012
835
  return
1013
836
  }
1014
837
  }
1015
- }
1016
- }
1017
- }
1018
838
 
1019
839
  export async function Unification_bind$(self_, at_, index_, type_, $task) {
1020
840
  if(ff_compiler_Unification.Unification_occursIn(self_, index_, type_)) {
@@ -1045,10 +865,8 @@ ff_compiler_Unification.Unification_affect(self_, at_, type_, ff_compiler_Syntax
1045
865
  export async function Unification_affect$(self_, at_, source_, target_, $task) {
1046
866
  {
1047
867
  const _1 = ff_core_Pair.Pair(ff_compiler_Unification.Unification_substitute(self_, source_), ff_compiler_Unification.Unification_substitute(self_, target_));
1048
- {
1049
- if(_1.first_.TVariable) {
868
+ if(_1.first_.TVariable && _1.second_.TVariable) {
1050
869
  const i1_ = _1.first_.index_;
1051
- if(_1.second_.TVariable) {
1052
870
  const i2_ = _1.second_.index_;
1053
871
  const is_ = ff_core_Option.Option_else(ff_core_Map.Map_get(self_.affects_, i1_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int), (() => {
1054
872
  return ff_core_List.List_toSet([], ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int)
@@ -1056,24 +874,14 @@ return ff_core_List.List_toSet([], ff_core_Ordering.ff_core_Ordering_Order$ff_co
1056
874
  self_.affects_ = ff_core_Map.Map_add(self_.affects_, i1_, ff_core_Set.Set_add(is_, i2_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int), ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int)
1057
875
  return
1058
876
  }
1059
- }
1060
- }
1061
- {
1062
- if(_1.second_.TConstructor) {
1063
- if(_1.second_.name_ === "Q$") {
877
+ if(_1.second_.TConstructor && _1.second_.name_ === "Q$") {
1064
878
 
1065
879
  return
1066
880
  }
1067
- }
1068
- }
1069
- {
1070
- if(_1.first_.TConstructor) {
1071
- if(_1.first_.name_ === "ff:core/Nothing.Nothing") {
881
+ if(_1.first_.TConstructor && _1.first_.name_ === "ff:core/Nothing.Nothing") {
1072
882
 
1073
883
  return
1074
884
  }
1075
- }
1076
- }
1077
885
  {
1078
886
  const t1_ = _1.first_;
1079
887
  const t2_ = _1.second_;
@@ -1084,29 +892,21 @@ return
1084
892
  }
1085
893
 
1086
894
  export async function Unification_occursIn$(self_, index_, t_, $task) {
1087
- {
1088
895
  const self_a = self_;
1089
896
  const index_a = index_;
1090
897
  const t_a = t_;
1091
- {
1092
898
  if(t_a.TVariable) {
1093
899
  const i_ = t_a.index_;
1094
900
  const _guard1 = ff_compiler_Unification.Unification_get(self_, i_);
1095
901
  if(_guard1.Some) {
1096
902
  const type_ = _guard1.value_;
1097
903
  return ff_compiler_Unification.Unification_occursIn(self_, index_, type_)
1098
- return
1099
904
  }
1100
905
  }
1101
- }
1102
- {
1103
906
  if(t_a.TVariable) {
1104
907
  const i_ = t_a.index_;
1105
908
  return (i_ === index_)
1106
- return
1107
909
  }
1108
- }
1109
- {
1110
910
  if(t_a.TConstructor) {
1111
911
  const generics_ = t_a.generics_;
1112
912
  return ff_core_List.List_any(generics_, ((t_) => {
@@ -1115,8 +915,6 @@ return ff_compiler_Unification.Unification_occursIn(self_, index_, t_)
1115
915
  return
1116
916
  }
1117
917
  }
1118
- }
1119
- }
1120
918
 
1121
919
  export const ff_core_Any_HasAnyTag$ff_compiler_Unification_ConstraintGenerics = {
1122
920
  anyTag_() {
@@ -1147,195 +945,130 @@ return ff_core_Any.internalAnyTag_((("ff:compiler/Unification.InstanceValue" + "
1147
945
 
1148
946
  export const ff_core_Show_Show$ff_compiler_Unification_ConstraintGenerics = {
1149
947
  show_(value_) {
1150
- {
1151
948
  const value_a = value_;
1152
949
  {
1153
950
  const z_ = value_a;
1154
951
  return ((((("ConstraintGenerics" + "(") + ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Location.show_(z_.at_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Type).show_(z_.generics_)) + ")")
1155
- return
1156
- }
1157
952
  }
1158
953
  },
1159
954
  async show_$(value_, $task) {
1160
- {
1161
955
  const value_a = value_;
1162
956
  {
1163
957
  const z_ = value_a;
1164
958
  return ((((("ConstraintGenerics" + "(") + ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Location.show_(z_.at_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Type).show_(z_.generics_)) + ")")
1165
- return
1166
- }
1167
959
  }
1168
960
  }
1169
961
  };
1170
962
 
1171
963
  export const ff_core_Show_Show$ff_compiler_Unification_InstanceKey = {
1172
964
  show_(value_) {
1173
- {
1174
965
  const value_a = value_;
1175
966
  {
1176
967
  const z_ = value_a;
1177
968
  return ((((("InstanceKey" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.traitName_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.typeName_)) + ")")
1178
- return
1179
- }
1180
969
  }
1181
970
  },
1182
971
  async show_$(value_, $task) {
1183
- {
1184
972
  const value_a = value_;
1185
973
  {
1186
974
  const z_ = value_a;
1187
975
  return ((((("InstanceKey" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.traitName_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.typeName_)) + ")")
1188
- return
1189
- }
1190
976
  }
1191
977
  }
1192
978
  };
1193
979
 
1194
980
  export const ff_core_Show_Show$ff_compiler_Unification_InstanceValue = {
1195
981
  show_(value_) {
1196
- {
1197
982
  const value_a = value_;
1198
983
  {
1199
984
  const z_ = value_a;
1200
985
  return ((((((((((((("InstanceValue" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(z_.generics_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Constraint).show_(z_.constraints_)) + ", ") + ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_PackagePair.show_(z_.packagePair_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.moduleName_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.traitName_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Type).show_(z_.typeArguments_)) + ")")
1201
- return
1202
- }
1203
986
  }
1204
987
  },
1205
988
  async show_$(value_, $task) {
1206
- {
1207
989
  const value_a = value_;
1208
990
  {
1209
991
  const z_ = value_a;
1210
992
  return ((((((((((((("InstanceValue" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(z_.generics_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Constraint).show_(z_.constraints_)) + ", ") + ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_PackagePair.show_(z_.packagePair_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.moduleName_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.traitName_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Type).show_(z_.typeArguments_)) + ")")
1211
- return
1212
- }
1213
993
  }
1214
994
  }
1215
995
  };
1216
996
 
1217
997
  export const ff_core_Equal_Equal$ff_compiler_Unification_ConstraintGenerics = {
1218
998
  equals_(x_, y_) {
1219
- {
1220
999
  const x_a = x_;
1221
1000
  const y_a = y_;
1222
- {
1223
- const _guard1 = (x_ === y_);
1224
- if(_guard1) {
1001
+ if((x_ === y_)) {
1225
1002
  return true
1226
- return
1227
- }
1228
1003
  }
1229
1004
  {
1230
1005
  return (ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Location.equals_(x_.at_, y_.at_) && ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Type).equals_(x_.generics_, y_.generics_))
1231
- return
1232
- }
1233
1006
  }
1234
1007
  },
1235
1008
  async equals_$(x_, y_, $task) {
1236
- {
1237
1009
  const x_a = x_;
1238
1010
  const y_a = y_;
1239
- {
1240
- const _guard1 = (x_ === y_);
1241
- if(_guard1) {
1011
+ if((x_ === y_)) {
1242
1012
  return true
1243
- return
1244
- }
1245
1013
  }
1246
1014
  {
1247
1015
  return (ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Location.equals_(x_.at_, y_.at_) && ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Type).equals_(x_.generics_, y_.generics_))
1248
- return
1249
- }
1250
1016
  }
1251
1017
  }
1252
1018
  };
1253
1019
 
1254
1020
  export const ff_core_Equal_Equal$ff_compiler_Unification_InstanceKey = {
1255
1021
  equals_(x_, y_) {
1256
- {
1257
1022
  const x_a = x_;
1258
1023
  const y_a = y_;
1259
- {
1260
- const _guard1 = (x_ === y_);
1261
- if(_guard1) {
1024
+ if((x_ === y_)) {
1262
1025
  return true
1263
- return
1264
- }
1265
1026
  }
1266
1027
  {
1267
1028
  return ((x_.traitName_ === y_.traitName_) && (x_.typeName_ === y_.typeName_))
1268
- return
1269
- }
1270
1029
  }
1271
1030
  },
1272
1031
  async equals_$(x_, y_, $task) {
1273
- {
1274
1032
  const x_a = x_;
1275
1033
  const y_a = y_;
1276
- {
1277
- const _guard1 = (x_ === y_);
1278
- if(_guard1) {
1034
+ if((x_ === y_)) {
1279
1035
  return true
1280
- return
1281
- }
1282
1036
  }
1283
1037
  {
1284
1038
  return ((x_.traitName_ === y_.traitName_) && (x_.typeName_ === y_.typeName_))
1285
- return
1286
- }
1287
1039
  }
1288
1040
  }
1289
1041
  };
1290
1042
 
1291
1043
  export const ff_core_Equal_Equal$ff_compiler_Unification_InstanceValue = {
1292
1044
  equals_(x_, y_) {
1293
- {
1294
1045
  const x_a = x_;
1295
1046
  const y_a = y_;
1296
- {
1297
- const _guard1 = (x_ === y_);
1298
- if(_guard1) {
1047
+ if((x_ === y_)) {
1299
1048
  return true
1300
- return
1301
- }
1302
1049
  }
1303
1050
  {
1304
1051
  return (ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String).equals_(x_.generics_, y_.generics_) && (ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Constraint).equals_(x_.constraints_, y_.constraints_) && (ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_PackagePair.equals_(x_.packagePair_, y_.packagePair_) && ((x_.moduleName_ === y_.moduleName_) && ((x_.traitName_ === y_.traitName_) && ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Type).equals_(x_.typeArguments_, y_.typeArguments_))))))
1305
- return
1306
- }
1307
1052
  }
1308
1053
  },
1309
1054
  async equals_$(x_, y_, $task) {
1310
- {
1311
1055
  const x_a = x_;
1312
1056
  const y_a = y_;
1313
- {
1314
- const _guard1 = (x_ === y_);
1315
- if(_guard1) {
1057
+ if((x_ === y_)) {
1316
1058
  return true
1317
- return
1318
- }
1319
1059
  }
1320
1060
  {
1321
1061
  return (ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String).equals_(x_.generics_, y_.generics_) && (ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Constraint).equals_(x_.constraints_, y_.constraints_) && (ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_PackagePair.equals_(x_.packagePair_, y_.packagePair_) && ((x_.moduleName_ === y_.moduleName_) && ((x_.traitName_ === y_.traitName_) && ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Type).equals_(x_.typeArguments_, y_.typeArguments_))))))
1322
- return
1323
- }
1324
1062
  }
1325
1063
  }
1326
1064
  };
1327
1065
 
1328
1066
  export const ff_core_Ordering_Order$ff_compiler_Unification_ConstraintGenerics = {
1329
1067
  compare_(x_, y_) {
1330
- {
1331
1068
  const x_a = x_;
1332
1069
  const y_a = y_;
1333
- {
1334
- const _guard1 = (x_ === y_);
1335
- if(_guard1) {
1070
+ if((x_ === y_)) {
1336
1071
  return ff_core_Ordering.OrderingSame()
1337
- return
1338
- }
1339
1072
  }
1340
1073
  {
1341
1074
  const atOrdering_ = ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_Location.compare_(x_.at_, y_.at_);
@@ -1351,18 +1084,12 @@ return ff_core_Ordering.OrderingSame()
1351
1084
  }
1352
1085
  return
1353
1086
  }
1354
- }
1355
1087
  },
1356
1088
  async compare_$(x_, y_, $task) {
1357
- {
1358
1089
  const x_a = x_;
1359
1090
  const y_a = y_;
1360
- {
1361
- const _guard1 = (x_ === y_);
1362
- if(_guard1) {
1091
+ if((x_ === y_)) {
1363
1092
  return ff_core_Ordering.OrderingSame()
1364
- return
1365
- }
1366
1093
  }
1367
1094
  {
1368
1095
  const atOrdering_ = ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_Location.compare_(x_.at_, y_.at_);
@@ -1379,20 +1106,14 @@ return ff_core_Ordering.OrderingSame()
1379
1106
  return
1380
1107
  }
1381
1108
  }
1382
- }
1383
1109
  };
1384
1110
 
1385
1111
  export const ff_core_Ordering_Order$ff_compiler_Unification_InstanceKey = {
1386
1112
  compare_(x_, y_) {
1387
- {
1388
1113
  const x_a = x_;
1389
1114
  const y_a = y_;
1390
- {
1391
- const _guard1 = (x_ === y_);
1392
- if(_guard1) {
1115
+ if((x_ === y_)) {
1393
1116
  return ff_core_Ordering.OrderingSame()
1394
- return
1395
- }
1396
1117
  }
1397
1118
  {
1398
1119
  const traitNameOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String.compare_(x_.traitName_, y_.traitName_);
@@ -1408,18 +1129,12 @@ return ff_core_Ordering.OrderingSame()
1408
1129
  }
1409
1130
  return
1410
1131
  }
1411
- }
1412
1132
  },
1413
1133
  async compare_$(x_, y_, $task) {
1414
- {
1415
1134
  const x_a = x_;
1416
1135
  const y_a = y_;
1417
- {
1418
- const _guard1 = (x_ === y_);
1419
- if(_guard1) {
1136
+ if((x_ === y_)) {
1420
1137
  return ff_core_Ordering.OrderingSame()
1421
- return
1422
- }
1423
1138
  }
1424
1139
  {
1425
1140
  const traitNameOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String.compare_(x_.traitName_, y_.traitName_);
@@ -1436,20 +1151,14 @@ return ff_core_Ordering.OrderingSame()
1436
1151
  return
1437
1152
  }
1438
1153
  }
1439
- }
1440
1154
  };
1441
1155
 
1442
1156
  export const ff_core_Ordering_Order$ff_compiler_Unification_InstanceValue = {
1443
1157
  compare_(x_, y_) {
1444
- {
1445
1158
  const x_a = x_;
1446
1159
  const y_a = y_;
1447
- {
1448
- const _guard1 = (x_ === y_);
1449
- if(_guard1) {
1160
+ if((x_ === y_)) {
1450
1161
  return ff_core_Ordering.OrderingSame()
1451
- return
1452
- }
1453
1162
  }
1454
1163
  {
1455
1164
  const genericsOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_List_List(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).compare_(x_.generics_, y_.generics_);
@@ -1485,18 +1194,12 @@ return ff_core_Ordering.OrderingSame()
1485
1194
  }
1486
1195
  return
1487
1196
  }
1488
- }
1489
1197
  },
1490
1198
  async compare_$(x_, y_, $task) {
1491
- {
1492
1199
  const x_a = x_;
1493
1200
  const y_a = y_;
1494
- {
1495
- const _guard1 = (x_ === y_);
1496
- if(_guard1) {
1201
+ if((x_ === y_)) {
1497
1202
  return ff_core_Ordering.OrderingSame()
1498
- return
1499
- }
1500
1203
  }
1501
1204
  {
1502
1205
  const genericsOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_List_List(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).compare_(x_.generics_, y_.generics_);
@@ -1533,12 +1236,10 @@ return ff_core_Ordering.OrderingSame()
1533
1236
  return
1534
1237
  }
1535
1238
  }
1536
- }
1537
1239
  };
1538
1240
 
1539
1241
  export const ff_core_Serializable_Serializable$ff_compiler_Unification_ConstraintGenerics = {
1540
1242
  serializeUsing_(serialization_, value_) {
1541
- {
1542
1243
  const serialization_a = serialization_;
1543
1244
  const value_a = value_;
1544
1245
  {
@@ -1551,28 +1252,22 @@ ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Location
1551
1252
  ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type).serializeUsing_(serialization_, v_.generics_)
1552
1253
  return
1553
1254
  }
1554
- }
1555
1255
  },
1556
1256
  deserializeUsing_(serialization_) {
1557
1257
  const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
1558
1258
  serialization_.offset_ += 1;
1559
1259
  {
1560
1260
  const _1 = variantIndex_;
1561
- {
1562
1261
  if(_1 === 0) {
1563
1262
  serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 42), 0);
1564
1263
  return ff_compiler_Unification.ConstraintGenerics(ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Location.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type).deserializeUsing_(serialization_))
1565
- return
1566
- }
1567
1264
  }
1568
1265
  {
1569
1266
  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)})
1570
- return
1571
1267
  }
1572
1268
  }
1573
1269
  },
1574
1270
  async serializeUsing_$(serialization_, value_, $task) {
1575
- {
1576
1271
  const serialization_a = serialization_;
1577
1272
  const value_a = value_;
1578
1273
  {
@@ -1585,23 +1280,18 @@ ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Location
1585
1280
  ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type).serializeUsing_(serialization_, v_.generics_)
1586
1281
  return
1587
1282
  }
1588
- }
1589
1283
  },
1590
1284
  async deserializeUsing_$(serialization_, $task) {
1591
1285
  const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
1592
1286
  serialization_.offset_ += 1;
1593
1287
  {
1594
1288
  const _1 = variantIndex_;
1595
- {
1596
1289
  if(_1 === 0) {
1597
1290
  serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 42), 0);
1598
1291
  return ff_compiler_Unification.ConstraintGenerics(ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Location.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type).deserializeUsing_(serialization_))
1599
- return
1600
- }
1601
1292
  }
1602
1293
  {
1603
1294
  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)})
1604
- return
1605
1295
  }
1606
1296
  }
1607
1297
  }
@@ -1609,7 +1299,6 @@ return
1609
1299
 
1610
1300
  export const ff_core_Serializable_Serializable$ff_compiler_Unification_InstanceKey = {
1611
1301
  serializeUsing_(serialization_, value_) {
1612
- {
1613
1302
  const serialization_a = serialization_;
1614
1303
  const value_a = value_;
1615
1304
  {
@@ -1622,28 +1311,22 @@ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.ser
1622
1311
  ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.serializeUsing_(serialization_, v_.typeName_)
1623
1312
  return
1624
1313
  }
1625
- }
1626
1314
  },
1627
1315
  deserializeUsing_(serialization_) {
1628
1316
  const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
1629
1317
  serialization_.offset_ += 1;
1630
1318
  {
1631
1319
  const _1 = variantIndex_;
1632
- {
1633
1320
  if(_1 === 0) {
1634
1321
  serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 35), 0);
1635
1322
  return ff_compiler_Unification.InstanceKey(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_))
1636
- return
1637
- }
1638
1323
  }
1639
1324
  {
1640
1325
  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)})
1641
- return
1642
1326
  }
1643
1327
  }
1644
1328
  },
1645
1329
  async serializeUsing_$(serialization_, value_, $task) {
1646
- {
1647
1330
  const serialization_a = serialization_;
1648
1331
  const value_a = value_;
1649
1332
  {
@@ -1656,23 +1339,18 @@ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.ser
1656
1339
  ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.serializeUsing_(serialization_, v_.typeName_)
1657
1340
  return
1658
1341
  }
1659
- }
1660
1342
  },
1661
1343
  async deserializeUsing_$(serialization_, $task) {
1662
1344
  const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
1663
1345
  serialization_.offset_ += 1;
1664
1346
  {
1665
1347
  const _1 = variantIndex_;
1666
- {
1667
1348
  if(_1 === 0) {
1668
1349
  serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 35), 0);
1669
1350
  return ff_compiler_Unification.InstanceKey(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_))
1670
- return
1671
- }
1672
1351
  }
1673
1352
  {
1674
1353
  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)})
1675
- return
1676
1354
  }
1677
1355
  }
1678
1356
  }
@@ -1680,7 +1358,6 @@ return
1680
1358
 
1681
1359
  export const ff_core_Serializable_Serializable$ff_compiler_Unification_InstanceValue = {
1682
1360
  serializeUsing_(serialization_, value_) {
1683
- {
1684
1361
  const serialization_a = serialization_;
1685
1362
  const value_a = value_;
1686
1363
  {
@@ -1697,28 +1374,22 @@ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.ser
1697
1374
  ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type).serializeUsing_(serialization_, v_.typeArguments_)
1698
1375
  return
1699
1376
  }
1700
- }
1701
1377
  },
1702
1378
  deserializeUsing_(serialization_) {
1703
1379
  const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
1704
1380
  serialization_.offset_ += 1;
1705
1381
  {
1706
1382
  const _1 = variantIndex_;
1707
- {
1708
1383
  if(_1 === 0) {
1709
1384
  serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 37), 0);
1710
1385
  return ff_compiler_Unification.InstanceValue(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Constraint).deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_PackagePair.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type).deserializeUsing_(serialization_))
1711
- return
1712
- }
1713
1386
  }
1714
1387
  {
1715
1388
  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)})
1716
- return
1717
1389
  }
1718
1390
  }
1719
1391
  },
1720
1392
  async serializeUsing_$(serialization_, value_, $task) {
1721
- {
1722
1393
  const serialization_a = serialization_;
1723
1394
  const value_a = value_;
1724
1395
  {
@@ -1735,23 +1406,18 @@ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.ser
1735
1406
  ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type).serializeUsing_(serialization_, v_.typeArguments_)
1736
1407
  return
1737
1408
  }
1738
- }
1739
1409
  },
1740
1410
  async deserializeUsing_$(serialization_, $task) {
1741
1411
  const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
1742
1412
  serialization_.offset_ += 1;
1743
1413
  {
1744
1414
  const _1 = variantIndex_;
1745
- {
1746
1415
  if(_1 === 0) {
1747
1416
  serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 37), 0);
1748
1417
  return ff_compiler_Unification.InstanceValue(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Constraint).deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_PackagePair.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type).deserializeUsing_(serialization_))
1749
- return
1750
- }
1751
1418
  }
1752
1419
  {
1753
1420
  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)})
1754
- return
1755
1421
  }
1756
1422
  }
1757
1423
  }