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
@@ -127,7 +127,6 @@ const _1 = module_;
127
127
  {
128
128
  const _c = _1;
129
129
  return ff_compiler_Syntax.Module(_c.file_, _c.packagePair_, _c.imports_, _c.types_, _c.traits_, instances_, extends_, lets_, functions_)
130
- return
131
130
  }
132
131
  }
133
132
  }
@@ -138,7 +137,6 @@ const _1 = definition_;
138
137
  {
139
138
  const _c = _1;
140
139
  return ff_compiler_Syntax.DLet(_c.at_, _c.name_, ff_compiler_Substitution.Substitution_substituteType(self_, definition_.variableType_), ff_compiler_Substitution.Substitution_substituteTerm(self_, definition_.value_))
141
- return
142
140
  }
143
141
  }
144
142
  }
@@ -239,7 +237,6 @@ const _1 = g_;
239
237
  {
240
238
  const _c = _1;
241
239
  return ff_compiler_Syntax.MatchGuard(_c.at_, ff_compiler_Substitution.Substitution_substituteTerm(self_, g_.term_), _c.pattern_)
242
- return
243
240
  }
244
241
  }
245
242
  })), ff_compiler_Substitution.Substitution_substituteTerm(self_, case_.body_))
@@ -255,37 +252,21 @@ return
255
252
  export function Substitution_substituteTerm(self_, term_) {
256
253
  {
257
254
  const _1 = term_;
258
- {
259
255
  if(_1.EString) {
260
256
  return term_
261
- return
262
257
  }
263
- }
264
- {
265
258
  if(_1.EChar) {
266
259
  return term_
267
- return
268
260
  }
269
- }
270
- {
271
261
  if(_1.EInt) {
272
262
  return term_
273
- return
274
- }
275
263
  }
276
- {
277
264
  if(_1.EFloat) {
278
265
  return term_
279
- return
280
- }
281
266
  }
282
- {
283
267
  if(_1.EVariable) {
284
268
  return term_
285
- return
286
- }
287
269
  }
288
- {
289
270
  if(_1.EField) {
290
271
  const e_ = _1;
291
272
  {
@@ -293,20 +274,14 @@ const _1 = e_;
293
274
  {
294
275
  const _c = _1;
295
276
  return ff_compiler_Syntax.EField(_c.at_, _c.newtype_, ff_compiler_Substitution.Substitution_substituteTerm(self_, e_.record_), _c.field_)
296
- return
297
277
  }
298
278
  }
299
279
  return
300
280
  }
301
- }
302
- {
303
281
  if(_1.EWildcard) {
304
282
  const e_ = _1;
305
283
  return term_
306
- return
307
284
  }
308
- }
309
- {
310
285
  if(_1.EList) {
311
286
  const e_ = _1;
312
287
  {
@@ -318,7 +293,6 @@ return ff_compiler_Syntax.EList(_c.at_, ff_compiler_Substitution.Substitution_su
318
293
  const item_ = _1.first_;
319
294
  const b_ = _1.second_;
320
295
  return ff_core_Pair.Pair(ff_compiler_Substitution.Substitution_substituteTerm(self_, item_), b_)
321
- return
322
296
  }
323
297
  })))
324
298
  return
@@ -326,8 +300,6 @@ return
326
300
  }
327
301
  return
328
302
  }
329
- }
330
- {
331
303
  if(_1.ESequential) {
332
304
  const e_ = _1;
333
305
  {
@@ -335,13 +307,10 @@ const _1 = e_;
335
307
  {
336
308
  const _c = _1;
337
309
  return ff_compiler_Syntax.ESequential(_c.at_, ff_compiler_Substitution.Substitution_substituteTerm(self_, e_.before_), ff_compiler_Substitution.Substitution_substituteTerm(self_, e_.after_))
338
- return
339
310
  }
340
311
  }
341
312
  return
342
313
  }
343
- }
344
- {
345
314
  if(_1.ELet) {
346
315
  const e_ = _1;
347
316
  {
@@ -349,13 +318,10 @@ const _1 = e_;
349
318
  {
350
319
  const _c = _1;
351
320
  return ff_compiler_Syntax.ELet(_c.at_, _c.mutable_, _c.name_, ff_compiler_Substitution.Substitution_substituteType(self_, e_.valueType_), ff_compiler_Substitution.Substitution_substituteTerm(self_, e_.value_), ff_compiler_Substitution.Substitution_substituteTerm(self_, e_.body_))
352
- return
353
321
  }
354
322
  }
355
323
  return
356
324
  }
357
- }
358
- {
359
325
  if(_1.ELambda) {
360
326
  const e_ = _1;
361
327
  {
@@ -363,13 +329,10 @@ const _1 = e_;
363
329
  {
364
330
  const _c = _1;
365
331
  return ff_compiler_Syntax.ELambda(_c.at_, ff_compiler_Substitution.Substitution_substituteLambda(self_, e_.lambda_))
366
- return
367
332
  }
368
333
  }
369
334
  return
370
335
  }
371
- }
372
- {
373
336
  if(_1.EVariant) {
374
337
  const e_ = _1;
375
338
  {
@@ -388,8 +351,6 @@ return
388
351
  }
389
352
  return
390
353
  }
391
- }
392
- {
393
354
  if(_1.EVariantIs) {
394
355
  const e_ = _1;
395
356
  {
@@ -404,8 +365,6 @@ return
404
365
  }
405
366
  return
406
367
  }
407
- }
408
- {
409
368
  if(_1.ECopy) {
410
369
  const e_ = _1;
411
370
  {
@@ -420,8 +379,6 @@ return
420
379
  }
421
380
  return
422
381
  }
423
- }
424
- {
425
382
  if(_1.EPipe) {
426
383
  const e_ = _1;
427
384
  {
@@ -429,13 +386,10 @@ const _1 = e_;
429
386
  {
430
387
  const _c = _1;
431
388
  return ff_compiler_Syntax.EPipe(_c.at_, ff_compiler_Substitution.Substitution_substituteTerm(self_, e_.value_), ff_compiler_Substitution.Substitution_substituteType(self_, e_.effect_), ff_compiler_Substitution.Substitution_substituteTerm(self_, e_.function_))
432
- return
433
389
  }
434
390
  }
435
391
  return
436
392
  }
437
- }
438
- {
439
393
  if(_1.ECall) {
440
394
  const e_ = _1;
441
395
  {
@@ -443,7 +397,6 @@ const _1 = e_;
443
397
  {
444
398
  const _c = _1;
445
399
  return ff_compiler_Syntax.ECall(_c.at_, (((_1) => {
446
- {
447
400
  if(_1.DynamicCall) {
448
401
  const call_ = _1;
449
402
  {
@@ -451,17 +404,12 @@ const _1 = call_;
451
404
  {
452
405
  const _c = _1;
453
406
  return ff_compiler_Syntax.DynamicCall(ff_compiler_Substitution.Substitution_substituteTerm(self_, call_.function_), _c.tailCall_)
454
- return
455
407
  }
456
408
  }
457
409
  return
458
410
  }
459
- }
460
- {
461
411
  if(_1.StaticCall) {
462
412
  return e_.target_
463
- return
464
- }
465
413
  }
466
414
  }))(e_.target_), ff_compiler_Substitution.Substitution_substituteType(self_, e_.effect_), ff_core_List.List_map(e_.typeArguments_, ((_w1) => {
467
415
  return ff_compiler_Substitution.Substitution_substituteType(self_, _w1)
@@ -473,8 +421,6 @@ return
473
421
  }
474
422
  return
475
423
  }
476
- }
477
- {
478
424
  if(_1.ERecord) {
479
425
  const e_ = _1;
480
426
  {
@@ -489,8 +435,6 @@ return
489
435
  }
490
436
  return
491
437
  }
492
- }
493
- {
494
438
  if(_1.EFunctions) {
495
439
  const e_ = _1;
496
440
  {
@@ -505,8 +449,6 @@ return
505
449
  }
506
450
  return
507
451
  }
508
- }
509
- {
510
452
  if(_1.EAssign) {
511
453
  const e_ = _1;
512
454
  {
@@ -514,13 +456,10 @@ const _1 = e_;
514
456
  {
515
457
  const _c = _1;
516
458
  return ff_compiler_Syntax.EAssign(_c.at_, _c.operator_, _c.variable_, ff_compiler_Substitution.Substitution_substituteTerm(self_, e_.value_))
517
- return
518
459
  }
519
460
  }
520
461
  return
521
462
  }
522
- }
523
- {
524
463
  if(_1.EAssignField) {
525
464
  const e_ = _1;
526
465
  {
@@ -528,14 +467,12 @@ const _1 = e_;
528
467
  {
529
468
  const _c = _1;
530
469
  return ff_compiler_Syntax.EAssignField(_c.at_, _c.operator_, ff_compiler_Substitution.Substitution_substituteTerm(self_, e_.record_), _c.field_, ff_compiler_Substitution.Substitution_substituteTerm(self_, e_.value_))
531
- return
532
470
  }
533
471
  }
534
472
  return
535
473
  }
536
474
  }
537
475
  }
538
- }
539
476
 
540
477
  export function Substitution_substituteArgument(self_, argument_) {
541
478
  {
@@ -543,7 +480,6 @@ const _1 = argument_;
543
480
  {
544
481
  const _c = _1;
545
482
  return ff_compiler_Syntax.Argument(_c.at_, _c.name_, ff_compiler_Substitution.Substitution_substituteTerm(self_, argument_.value_))
546
- return
547
483
  }
548
484
  }
549
485
  }
@@ -554,16 +490,13 @@ const _1 = field_;
554
490
  {
555
491
  const _c = _1;
556
492
  return ff_compiler_Syntax.Field(_c.at_, _c.name_, ff_compiler_Substitution.Substitution_substituteTerm(self_, field_.value_))
557
- return
558
493
  }
559
494
  }
560
495
  }
561
496
 
562
497
  export function Substitution_substituteType(self_, type_) {
563
- {
564
498
  const self_a = self_;
565
499
  const type_a = type_;
566
- {
567
500
  if(type_a.TVariable) {
568
501
  const at_ = type_a.at_;
569
502
  const i_ = type_a.index_;
@@ -574,8 +507,6 @@ return ff_compiler_Syntax.TConstructor(at_, ff_compiler_Substitution.core_("Noth
574
507
  }
575
508
  return
576
509
  }
577
- }
578
- {
579
510
  if(type_a.TConstructor) {
580
511
  const t_ = type_a;
581
512
  {
@@ -591,35 +522,25 @@ return
591
522
  return
592
523
  }
593
524
  }
594
- }
595
- }
596
525
 
597
526
  export function Substitution_get(self_, index_) {
598
527
  {
599
528
  const _1 = ff_core_Map.Map_grab(self_.substitution_, index_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int);
600
- {
601
529
  if(_1.TVariable) {
602
530
  const i_ = _1.index_;
603
- const _guard1 = ff_compiler_Substitution.Substitution_has(self_, i_);
604
- if(_guard1) {
531
+ if(ff_compiler_Substitution.Substitution_has(self_, i_)) {
605
532
  const t_ = ff_compiler_Substitution.Substitution_get(self_, i_);
606
533
  self_.substitution_ = ff_core_Map.Map_add(self_.substitution_, index_, t_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int);
607
534
  return t_
608
- return
609
- }
610
535
  }
611
536
  }
612
- {
613
537
  if(_1.TVariable) {
614
538
  const at_ = _1.at_;
615
539
  return ff_compiler_Syntax.TConstructor(at_, ff_compiler_Substitution.core_("Nothing"), [])
616
- return
617
- }
618
540
  }
619
541
  {
620
542
  const t_ = _1;
621
543
  return t_
622
- return
623
544
  }
624
545
  }
625
546
  }
@@ -646,7 +567,6 @@ const _1 = module_;
646
567
  {
647
568
  const _c = _1;
648
569
  return ff_compiler_Syntax.Module(_c.file_, _c.packagePair_, _c.imports_, _c.types_, _c.traits_, instances_, extends_, lets_, functions_)
649
- return
650
570
  }
651
571
  }
652
572
  }
@@ -657,7 +577,6 @@ const _1 = definition_;
657
577
  {
658
578
  const _c = _1;
659
579
  return ff_compiler_Syntax.DLet(_c.at_, _c.name_, ff_compiler_Substitution.Substitution_substituteType(self_, definition_.variableType_), ff_compiler_Substitution.Substitution_substituteTerm(self_, definition_.value_))
660
- return
661
580
  }
662
581
  }
663
582
  }
@@ -758,7 +677,6 @@ const _1 = g_;
758
677
  {
759
678
  const _c = _1;
760
679
  return ff_compiler_Syntax.MatchGuard(_c.at_, ff_compiler_Substitution.Substitution_substituteTerm(self_, g_.term_), _c.pattern_)
761
- return
762
680
  }
763
681
  }
764
682
  })), ff_compiler_Substitution.Substitution_substituteTerm(self_, case_.body_))
@@ -774,37 +692,21 @@ return
774
692
  export async function Substitution_substituteTerm$(self_, term_, $task) {
775
693
  {
776
694
  const _1 = term_;
777
- {
778
695
  if(_1.EString) {
779
696
  return term_
780
- return
781
697
  }
782
- }
783
- {
784
698
  if(_1.EChar) {
785
699
  return term_
786
- return
787
700
  }
788
- }
789
- {
790
701
  if(_1.EInt) {
791
702
  return term_
792
- return
793
- }
794
703
  }
795
- {
796
704
  if(_1.EFloat) {
797
705
  return term_
798
- return
799
- }
800
706
  }
801
- {
802
707
  if(_1.EVariable) {
803
708
  return term_
804
- return
805
- }
806
709
  }
807
- {
808
710
  if(_1.EField) {
809
711
  const e_ = _1;
810
712
  {
@@ -812,20 +714,14 @@ const _1 = e_;
812
714
  {
813
715
  const _c = _1;
814
716
  return ff_compiler_Syntax.EField(_c.at_, _c.newtype_, ff_compiler_Substitution.Substitution_substituteTerm(self_, e_.record_), _c.field_)
815
- return
816
717
  }
817
718
  }
818
719
  return
819
720
  }
820
- }
821
- {
822
721
  if(_1.EWildcard) {
823
722
  const e_ = _1;
824
723
  return term_
825
- return
826
724
  }
827
- }
828
- {
829
725
  if(_1.EList) {
830
726
  const e_ = _1;
831
727
  {
@@ -837,7 +733,6 @@ return ff_compiler_Syntax.EList(_c.at_, ff_compiler_Substitution.Substitution_su
837
733
  const item_ = _1.first_;
838
734
  const b_ = _1.second_;
839
735
  return ff_core_Pair.Pair(ff_compiler_Substitution.Substitution_substituteTerm(self_, item_), b_)
840
- return
841
736
  }
842
737
  })))
843
738
  return
@@ -845,8 +740,6 @@ return
845
740
  }
846
741
  return
847
742
  }
848
- }
849
- {
850
743
  if(_1.ESequential) {
851
744
  const e_ = _1;
852
745
  {
@@ -854,13 +747,10 @@ const _1 = e_;
854
747
  {
855
748
  const _c = _1;
856
749
  return ff_compiler_Syntax.ESequential(_c.at_, ff_compiler_Substitution.Substitution_substituteTerm(self_, e_.before_), ff_compiler_Substitution.Substitution_substituteTerm(self_, e_.after_))
857
- return
858
750
  }
859
751
  }
860
752
  return
861
753
  }
862
- }
863
- {
864
754
  if(_1.ELet) {
865
755
  const e_ = _1;
866
756
  {
@@ -868,13 +758,10 @@ const _1 = e_;
868
758
  {
869
759
  const _c = _1;
870
760
  return ff_compiler_Syntax.ELet(_c.at_, _c.mutable_, _c.name_, ff_compiler_Substitution.Substitution_substituteType(self_, e_.valueType_), ff_compiler_Substitution.Substitution_substituteTerm(self_, e_.value_), ff_compiler_Substitution.Substitution_substituteTerm(self_, e_.body_))
871
- return
872
761
  }
873
762
  }
874
763
  return
875
764
  }
876
- }
877
- {
878
765
  if(_1.ELambda) {
879
766
  const e_ = _1;
880
767
  {
@@ -882,13 +769,10 @@ const _1 = e_;
882
769
  {
883
770
  const _c = _1;
884
771
  return ff_compiler_Syntax.ELambda(_c.at_, ff_compiler_Substitution.Substitution_substituteLambda(self_, e_.lambda_))
885
- return
886
772
  }
887
773
  }
888
774
  return
889
775
  }
890
- }
891
- {
892
776
  if(_1.EVariant) {
893
777
  const e_ = _1;
894
778
  {
@@ -907,8 +791,6 @@ return
907
791
  }
908
792
  return
909
793
  }
910
- }
911
- {
912
794
  if(_1.EVariantIs) {
913
795
  const e_ = _1;
914
796
  {
@@ -923,8 +805,6 @@ return
923
805
  }
924
806
  return
925
807
  }
926
- }
927
- {
928
808
  if(_1.ECopy) {
929
809
  const e_ = _1;
930
810
  {
@@ -939,8 +819,6 @@ return
939
819
  }
940
820
  return
941
821
  }
942
- }
943
- {
944
822
  if(_1.EPipe) {
945
823
  const e_ = _1;
946
824
  {
@@ -948,13 +826,10 @@ const _1 = e_;
948
826
  {
949
827
  const _c = _1;
950
828
  return ff_compiler_Syntax.EPipe(_c.at_, ff_compiler_Substitution.Substitution_substituteTerm(self_, e_.value_), ff_compiler_Substitution.Substitution_substituteType(self_, e_.effect_), ff_compiler_Substitution.Substitution_substituteTerm(self_, e_.function_))
951
- return
952
829
  }
953
830
  }
954
831
  return
955
832
  }
956
- }
957
- {
958
833
  if(_1.ECall) {
959
834
  const e_ = _1;
960
835
  {
@@ -962,7 +837,6 @@ const _1 = e_;
962
837
  {
963
838
  const _c = _1;
964
839
  return ff_compiler_Syntax.ECall(_c.at_, (((_1) => {
965
- {
966
840
  if(_1.DynamicCall) {
967
841
  const call_ = _1;
968
842
  {
@@ -970,17 +844,12 @@ const _1 = call_;
970
844
  {
971
845
  const _c = _1;
972
846
  return ff_compiler_Syntax.DynamicCall(ff_compiler_Substitution.Substitution_substituteTerm(self_, call_.function_), _c.tailCall_)
973
- return
974
847
  }
975
848
  }
976
849
  return
977
850
  }
978
- }
979
- {
980
851
  if(_1.StaticCall) {
981
852
  return e_.target_
982
- return
983
- }
984
853
  }
985
854
  }))(e_.target_), ff_compiler_Substitution.Substitution_substituteType(self_, e_.effect_), ff_core_List.List_map(e_.typeArguments_, ((_w1) => {
986
855
  return ff_compiler_Substitution.Substitution_substituteType(self_, _w1)
@@ -992,8 +861,6 @@ return
992
861
  }
993
862
  return
994
863
  }
995
- }
996
- {
997
864
  if(_1.ERecord) {
998
865
  const e_ = _1;
999
866
  {
@@ -1008,8 +875,6 @@ return
1008
875
  }
1009
876
  return
1010
877
  }
1011
- }
1012
- {
1013
878
  if(_1.EFunctions) {
1014
879
  const e_ = _1;
1015
880
  {
@@ -1024,8 +889,6 @@ return
1024
889
  }
1025
890
  return
1026
891
  }
1027
- }
1028
- {
1029
892
  if(_1.EAssign) {
1030
893
  const e_ = _1;
1031
894
  {
@@ -1033,13 +896,10 @@ const _1 = e_;
1033
896
  {
1034
897
  const _c = _1;
1035
898
  return ff_compiler_Syntax.EAssign(_c.at_, _c.operator_, _c.variable_, ff_compiler_Substitution.Substitution_substituteTerm(self_, e_.value_))
1036
- return
1037
899
  }
1038
900
  }
1039
901
  return
1040
902
  }
1041
- }
1042
- {
1043
903
  if(_1.EAssignField) {
1044
904
  const e_ = _1;
1045
905
  {
@@ -1047,14 +907,12 @@ const _1 = e_;
1047
907
  {
1048
908
  const _c = _1;
1049
909
  return ff_compiler_Syntax.EAssignField(_c.at_, _c.operator_, ff_compiler_Substitution.Substitution_substituteTerm(self_, e_.record_), _c.field_, ff_compiler_Substitution.Substitution_substituteTerm(self_, e_.value_))
1050
- return
1051
910
  }
1052
911
  }
1053
912
  return
1054
913
  }
1055
914
  }
1056
915
  }
1057
- }
1058
916
 
1059
917
  export async function Substitution_substituteArgument$(self_, argument_, $task) {
1060
918
  {
@@ -1062,7 +920,6 @@ const _1 = argument_;
1062
920
  {
1063
921
  const _c = _1;
1064
922
  return ff_compiler_Syntax.Argument(_c.at_, _c.name_, ff_compiler_Substitution.Substitution_substituteTerm(self_, argument_.value_))
1065
- return
1066
923
  }
1067
924
  }
1068
925
  }
@@ -1073,16 +930,13 @@ const _1 = field_;
1073
930
  {
1074
931
  const _c = _1;
1075
932
  return ff_compiler_Syntax.Field(_c.at_, _c.name_, ff_compiler_Substitution.Substitution_substituteTerm(self_, field_.value_))
1076
- return
1077
933
  }
1078
934
  }
1079
935
  }
1080
936
 
1081
937
  export async function Substitution_substituteType$(self_, type_, $task) {
1082
- {
1083
938
  const self_a = self_;
1084
939
  const type_a = type_;
1085
- {
1086
940
  if(type_a.TVariable) {
1087
941
  const at_ = type_a.at_;
1088
942
  const i_ = type_a.index_;
@@ -1093,8 +947,6 @@ return ff_compiler_Syntax.TConstructor(at_, ff_compiler_Substitution.core_("Noth
1093
947
  }
1094
948
  return
1095
949
  }
1096
- }
1097
- {
1098
950
  if(type_a.TConstructor) {
1099
951
  const t_ = type_a;
1100
952
  {
@@ -1110,35 +962,25 @@ return
1110
962
  return
1111
963
  }
1112
964
  }
1113
- }
1114
- }
1115
965
 
1116
966
  export async function Substitution_get$(self_, index_, $task) {
1117
967
  {
1118
968
  const _1 = ff_core_Map.Map_grab(self_.substitution_, index_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int);
1119
- {
1120
969
  if(_1.TVariable) {
1121
970
  const i_ = _1.index_;
1122
- const _guard1 = ff_compiler_Substitution.Substitution_has(self_, i_);
1123
- if(_guard1) {
971
+ if(ff_compiler_Substitution.Substitution_has(self_, i_)) {
1124
972
  const t_ = ff_compiler_Substitution.Substitution_get(self_, i_);
1125
973
  self_.substitution_ = ff_core_Map.Map_add(self_.substitution_, index_, t_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int);
1126
974
  return t_
1127
- return
1128
- }
1129
975
  }
1130
976
  }
1131
- {
1132
977
  if(_1.TVariable) {
1133
978
  const at_ = _1.at_;
1134
979
  return ff_compiler_Syntax.TConstructor(at_, ff_compiler_Substitution.core_("Nothing"), [])
1135
- return
1136
- }
1137
980
  }
1138
981
  {
1139
982
  const t_ = _1;
1140
983
  return t_
1141
- return
1142
984
  }
1143
985
  }
1144
986
  }