firefly-compiler 0.5.12 → 0.5.14

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.
@@ -139,11 +139,11 @@ return (ff_core_String.String_size(_w1) !== 0)
139
139
  ff_core_Option.Option_each(defaultLocation_, ((_) => {
140
140
  ff_core_Core.panic_(("Unexpected rule after the * rule: " + line_))
141
141
  }));
142
- if((ff_core_List.List_size(columns_) !== 2)) {
142
+ if((columns_.length !== 2)) {
143
143
  ff_core_Core.panic_(("Could not parse workspace rule: " + line_))
144
144
  };
145
- const package_ = ff_core_List.List_grab(columns_, 0);
146
- const location_ = ff_core_List.List_grab(columns_, 1);
145
+ const package_ = (columns_[0] ?? ff_core_List.internalGrab_(columns_, 0));
146
+ const location_ = (columns_[1] ?? ff_core_List.internalGrab_(columns_, 1));
147
147
  const fixedLocation_ = (ff_core_String.String_endsWith(location_, "/")
148
148
  ? location_
149
149
  : (location_ + "/"));
@@ -152,14 +152,14 @@ defaultLocation_ = ff_core_Option.Some(fixedLocation_);
152
152
  return ff_core_Option.None()
153
153
  } else {
154
154
  const packageParts_ = ff_core_String.String_split(package_, 58);
155
- if((ff_core_List.List_size(packageParts_) !== 2)) {
155
+ if((packageParts_.length !== 2)) {
156
156
  ff_core_Core.panic_(("Could not parse workspace package: " + package_))
157
157
  };
158
- if((ff_core_List.List_grab(packageParts_, 0) === "*")) {
158
+ if(((packageParts_[0] ?? ff_core_List.internalGrab_(packageParts_, 0)) === "*")) {
159
159
  ff_core_Core.panic_(("Unexpected wildcard: " + package_))
160
160
  };
161
- return ff_core_Option.Some(ff_compiler_Workspace.WorkspaceRule(ff_core_List.List_grab(packageParts_, 0), ((ff_core_List.List_grab(packageParts_, 1) !== "*")
162
- ? ff_core_Option.Some(ff_core_List.List_grab(packageParts_, 1))
161
+ return ff_core_Option.Some(ff_compiler_Workspace.WorkspaceRule((packageParts_[0] ?? ff_core_List.internalGrab_(packageParts_, 0)), (((packageParts_[1] ?? ff_core_List.internalGrab_(packageParts_, 1)) !== "*")
162
+ ? ff_core_Option.Some((packageParts_[1] ?? ff_core_List.internalGrab_(packageParts_, 1)))
163
163
  : ff_core_Option.None()), fixedLocation_))
164
164
  }
165
165
  }));
@@ -203,11 +203,11 @@ return (ff_core_String.String_size(_w1) !== 0)
203
203
  ff_core_Option.Option_each(defaultLocation_, ((_) => {
204
204
  ff_core_Core.panic_(("Unexpected rule after the * rule: " + line_))
205
205
  }));
206
- if((ff_core_List.List_size(columns_) !== 2)) {
206
+ if((columns_.length !== 2)) {
207
207
  ff_core_Core.panic_(("Could not parse workspace rule: " + line_))
208
208
  };
209
- const package_ = ff_core_List.List_grab(columns_, 0);
210
- const location_ = ff_core_List.List_grab(columns_, 1);
209
+ const package_ = (columns_[0] ?? ff_core_List.internalGrab_(columns_, 0));
210
+ const location_ = (columns_[1] ?? ff_core_List.internalGrab_(columns_, 1));
211
211
  const fixedLocation_ = (ff_core_String.String_endsWith(location_, "/")
212
212
  ? location_
213
213
  : (location_ + "/"));
@@ -216,14 +216,14 @@ defaultLocation_ = ff_core_Option.Some(fixedLocation_);
216
216
  return ff_core_Option.None()
217
217
  } else {
218
218
  const packageParts_ = ff_core_String.String_split(package_, 58);
219
- if((ff_core_List.List_size(packageParts_) !== 2)) {
219
+ if((packageParts_.length !== 2)) {
220
220
  ff_core_Core.panic_(("Could not parse workspace package: " + package_))
221
221
  };
222
- if((ff_core_List.List_grab(packageParts_, 0) === "*")) {
222
+ if(((packageParts_[0] ?? ff_core_List.internalGrab_(packageParts_, 0)) === "*")) {
223
223
  ff_core_Core.panic_(("Unexpected wildcard: " + package_))
224
224
  };
225
- return ff_core_Option.Some(ff_compiler_Workspace.WorkspaceRule(ff_core_List.List_grab(packageParts_, 0), ((ff_core_List.List_grab(packageParts_, 1) !== "*")
226
- ? ff_core_Option.Some(ff_core_List.List_grab(packageParts_, 1))
225
+ return ff_core_Option.Some(ff_compiler_Workspace.WorkspaceRule((packageParts_[0] ?? ff_core_List.internalGrab_(packageParts_, 0)), (((packageParts_[1] ?? ff_core_List.internalGrab_(packageParts_, 1)) !== "*")
226
+ ? ff_core_Option.Some((packageParts_[1] ?? ff_core_List.internalGrab_(packageParts_, 1)))
227
227
  : ff_core_Option.None()), fixedLocation_))
228
228
  }
229
229
  }));
@@ -135,7 +135,7 @@ i_ += 1
135
135
  const value_ = (array_.array[j_] ?? ff_core_Array.internalGrab_(array_, j_));
136
136
  let k_ = j_;
137
137
  while((k_ > i_)) {
138
- ff_core_Array.Array_set(array_, k_, ff_core_Array.Array_grab(array_, (k_ - 1)));
138
+ ff_core_Array.Array_set(array_, k_, (array_.array[(k_ - 1)] ?? ff_core_Array.internalGrab_(array_, (k_ - 1))));
139
139
  k_ -= 1
140
140
  };
141
141
  ff_core_Array.Array_set(array_, i_, value_);
@@ -185,7 +185,7 @@ i_ += 1
185
185
  const value_ = (array_.array[j_] ?? ff_core_Array.internalGrab_(array_, j_));
186
186
  let k_ = j_;
187
187
  while((k_ > i_)) {
188
- ff_core_Array.Array_set(array_, k_, ff_core_Array.Array_grab(array_, (k_ - 1)));
188
+ ff_core_Array.Array_set(array_, k_, (array_.array[(k_ - 1)] ?? ff_core_Array.internalGrab_(array_, (k_ - 1))));
189
189
  k_ -= 1
190
190
  };
191
191
  ff_core_Array.Array_set(array_, i_, value_);
@@ -224,11 +224,11 @@ export function Array_grab(self_, index_) {
224
224
  }
225
225
 
226
226
  export function Array_grabFirst(self_) {
227
- return ff_core_Array.Array_grab(self_, 0)
227
+ return (self_.array[0] ?? ff_core_Array.internalGrab_(self_, 0))
228
228
  }
229
229
 
230
230
  export function Array_grabLast(self_) {
231
- return ff_core_Array.Array_grab(self_, (ff_core_Array.Array_size(self_) - 1))
231
+ return (self_.array[(self_.array.length - 1)] ?? ff_core_Array.internalGrab_(self_, (self_.array.length - 1)))
232
232
  }
233
233
 
234
234
  export function Array_first(self_) {
@@ -418,11 +418,11 @@ throw new Error('Function Array_grab is missing on this target in async context.
418
418
  }
419
419
 
420
420
  export async function Array_grabFirst$(self_, $task) {
421
- return ff_core_Array.Array_grab(self_, 0)
421
+ return (self_.array[0] ?? ff_core_Array.internalGrab_(self_, 0))
422
422
  }
423
423
 
424
424
  export async function Array_grabLast$(self_, $task) {
425
- return ff_core_Array.Array_grab(self_, (ff_core_Array.Array_size(self_) - 1))
425
+ return (self_.array[(self_.array.length - 1)] ?? ff_core_Array.internalGrab_(self_, (self_.array.length - 1)))
426
426
  }
427
427
 
428
428
  export async function Array_first$(self_, $task) {
@@ -593,7 +593,7 @@ show_(value_) {
593
593
  const array_ = ff_core_Array.new_();
594
594
  array_.array.push("[");
595
595
  ff_core_Array.Array_each(value_, ((x_) => {
596
- if((ff_core_Array.Array_size(array_) > 1)) {
596
+ if((array_.array.length > 1)) {
597
597
  array_.array.push(", ")
598
598
  };
599
599
  array_.array.push(ff_core_Show_Show$T.show_(x_))
@@ -605,7 +605,7 @@ async show_$(value_, $task) {
605
605
  const array_ = ff_core_Array.new_();
606
606
  array_.array.push("[");
607
607
  ff_core_Array.Array_each(value_, ((x_) => {
608
- if((ff_core_Array.Array_size(array_) > 1)) {
608
+ if((array_.array.length > 1)) {
609
609
  array_.array.push(", ")
610
610
  };
611
611
  array_.array.push(ff_core_Show_Show$T.show_(x_))
@@ -192,15 +192,15 @@ return ff_core_List.List_get(self_, 0)
192
192
  }
193
193
 
194
194
  export function List_last(self_) {
195
- return ff_core_List.List_get(self_, (ff_core_List.List_size(self_) - 1))
195
+ return ff_core_List.List_get(self_, (self_.length - 1))
196
196
  }
197
197
 
198
198
  export function List_grabFirst(self_) {
199
- return ff_core_List.List_grab(self_, 0)
199
+ return (self_[0] ?? ff_core_List.internalGrab_(self_, 0))
200
200
  }
201
201
 
202
202
  export function List_grabLast(self_) {
203
- return ff_core_List.List_grab(self_, (ff_core_List.List_size(self_) - 1))
203
+ return ff_core_List.List_grab(self_, (self_.length - 1))
204
204
  }
205
205
 
206
206
  export function List_takeFirst(self_, count_ = 1) {
@@ -222,7 +222,7 @@ return self_.slice(0, self_.length - count_)
222
222
  export function List_count(self_, body_) {
223
223
  let result_ = 0;
224
224
  let i_ = 0;
225
- while((i_ < ff_core_List.List_size(self_))) {
225
+ while((i_ < self_.length)) {
226
226
  if(body_((self_[i_] ?? ff_core_List.internalGrab_(self_, i_)))) {
227
227
  result_ += 1
228
228
  };
@@ -233,7 +233,7 @@ return result_
233
233
 
234
234
  export function List_countWhile(self_, body_) {
235
235
  let i_ = 0;
236
- while(((i_ < ff_core_List.List_size(self_)) && body_((self_[i_] ?? ff_core_List.internalGrab_(self_, i_))))) {
236
+ while(((i_ < self_.length) && body_((self_[i_] ?? ff_core_List.internalGrab_(self_, i_))))) {
237
237
  i_ += 1
238
238
  };
239
239
  return i_
@@ -242,7 +242,7 @@ return i_
242
242
  export function List_takeWhile(self_, body_) {
243
243
  const result_ = ff_core_Array.new_();
244
244
  let i_ = 0;
245
- while(((i_ < ff_core_List.List_size(self_)) && body_((self_[i_] ?? ff_core_List.internalGrab_(self_, i_))))) {
245
+ while(((i_ < self_.length) && body_((self_[i_] ?? ff_core_List.internalGrab_(self_, i_))))) {
246
246
  result_.array.push((self_[i_] ?? ff_core_List.internalGrab_(self_, i_)));
247
247
  i_ += 1
248
248
  };
@@ -252,10 +252,10 @@ return ff_core_Array.Array_drain(result_)
252
252
  export function List_dropWhile(self_, body_) {
253
253
  const result_ = ff_core_Array.new_();
254
254
  let i_ = 0;
255
- while(((i_ < ff_core_List.List_size(self_)) && body_((self_[i_] ?? ff_core_List.internalGrab_(self_, i_))))) {
255
+ while(((i_ < self_.length) && body_((self_[i_] ?? ff_core_List.internalGrab_(self_, i_))))) {
256
256
  i_ += 1
257
257
  };
258
- while((i_ < ff_core_List.List_size(self_))) {
258
+ while((i_ < self_.length)) {
259
259
  result_.array.push((self_[i_] ?? ff_core_List.internalGrab_(self_, i_)));
260
260
  i_ += 1
261
261
  };
@@ -266,11 +266,11 @@ export function List_partitionWhile(self_, body_) {
266
266
  const first_ = ff_core_Array.new_();
267
267
  const second_ = ff_core_Array.new_();
268
268
  let i_ = 0;
269
- while(((i_ < ff_core_List.List_size(self_)) && body_((self_[i_] ?? ff_core_List.internalGrab_(self_, i_))))) {
269
+ while(((i_ < self_.length) && body_((self_[i_] ?? ff_core_List.internalGrab_(self_, i_))))) {
270
270
  first_.array.push((self_[i_] ?? ff_core_List.internalGrab_(self_, i_)));
271
271
  i_ += 1
272
272
  };
273
- while((i_ < ff_core_List.List_size(self_))) {
273
+ while((i_ < self_.length)) {
274
274
  second_.array.push((self_[i_] ?? ff_core_List.internalGrab_(self_, i_)));
275
275
  i_ += 1
276
276
  };
@@ -317,7 +317,7 @@ export function List_modify(self_, index_, body_) {
317
317
  }
318
318
 
319
319
  export function List_zip(self_, that_) {
320
- if((ff_core_List.List_size(self_) <= ff_core_List.List_size(that_))) {
320
+ if((self_.length <= that_.length)) {
321
321
  let i_ = (-1);
322
322
  return ff_core_List.List_map(self_, ((x_) => {
323
323
  i_ += 1;
@@ -355,7 +355,7 @@ return ff_core_Array.Array_drain(results_)
355
355
  export function List_toStream(self_, cycle_ = false) {
356
356
  let index_ = 0;
357
357
  return ff_core_Stream.new_((() => {
358
- if((index_ < ff_core_List.List_size(self_))) {
358
+ if((index_ < self_.length)) {
359
359
  return ff_core_Option.Some((function() {
360
360
  const result_ = (self_[index_] ?? ff_core_List.internalGrab_(self_, index_));
361
361
  index_ += 1;
@@ -363,7 +363,7 @@ return result_
363
363
  })())
364
364
  } else if((cycle_ && (index_ !== 0))) {
365
365
  return ff_core_Option.Some((function() {
366
- const result_ = ff_core_List.List_grab(self_, 0);
366
+ const result_ = (self_[0] ?? ff_core_List.internalGrab_(self_, 0));
367
367
  index_ = 1;
368
368
  return result_
369
369
  })())
@@ -414,10 +414,7 @@ for(let for_i = 0, for_a = self_, for_l = for_a.length; for_i < for_l; for_i++)
414
414
  const x_ = for_a[for_i];
415
415
  if(!(body_(x_)
416
416
  ? (result_ = ff_core_Option.Some(i_), false)
417
- : (function() {
418
- i_ += 1;
419
- return true
420
- })())) break
417
+ : (i_ += 1, true))) break
421
418
  };
422
419
  return result_
423
420
  }
@@ -507,8 +504,8 @@ return ff_core_Array.Array_drain(array_)
507
504
  }
508
505
 
509
506
  export function List_reverse(self_) {
510
- return ff_core_List.List_map(ff_core_Int.Int_to(1, ff_core_List.List_size(self_)), ((i_) => {
511
- return ff_core_List.List_grab(self_, (ff_core_List.List_size(self_) - i_))
507
+ return ff_core_List.List_map(ff_core_Int.Int_to(1, self_.length), ((i_) => {
508
+ return ff_core_List.List_grab(self_, (self_.length - i_))
512
509
  }))
513
510
  }
514
511
 
@@ -553,15 +550,15 @@ return ff_core_List.List_get(self_, 0)
553
550
  }
554
551
 
555
552
  export async function List_last$(self_, $task) {
556
- return ff_core_List.List_get(self_, (ff_core_List.List_size(self_) - 1))
553
+ return ff_core_List.List_get(self_, (self_.length - 1))
557
554
  }
558
555
 
559
556
  export async function List_grabFirst$(self_, $task) {
560
- return ff_core_List.List_grab(self_, 0)
557
+ return (self_[0] ?? ff_core_List.internalGrab_(self_, 0))
561
558
  }
562
559
 
563
560
  export async function List_grabLast$(self_, $task) {
564
- return ff_core_List.List_grab(self_, (ff_core_List.List_size(self_) - 1))
561
+ return ff_core_List.List_grab(self_, (self_.length - 1))
565
562
  }
566
563
 
567
564
  export async function List_takeFirst$(self_, count_ = 1, $task) {
@@ -583,7 +580,7 @@ throw new Error('Function List_dropLast is missing on this target in async conte
583
580
  export async function List_count$(self_, body_, $task) {
584
581
  let result_ = 0;
585
582
  let i_ = 0;
586
- while((i_ < ff_core_List.List_size(self_))) {
583
+ while((i_ < self_.length)) {
587
584
  if((await body_((self_[i_] ?? ff_core_List.internalGrab_(self_, i_)), $task))) {
588
585
  result_ += 1
589
586
  };
@@ -594,7 +591,7 @@ return result_
594
591
 
595
592
  export async function List_countWhile$(self_, body_, $task) {
596
593
  let i_ = 0;
597
- while(((i_ < ff_core_List.List_size(self_)) && (await body_((self_[i_] ?? ff_core_List.internalGrab_(self_, i_)), $task)))) {
594
+ while(((i_ < self_.length) && (await body_((self_[i_] ?? ff_core_List.internalGrab_(self_, i_)), $task)))) {
598
595
  i_ += 1
599
596
  };
600
597
  return i_
@@ -603,7 +600,7 @@ return i_
603
600
  export async function List_takeWhile$(self_, body_, $task) {
604
601
  const result_ = ff_core_Array.new_();
605
602
  let i_ = 0;
606
- while(((i_ < ff_core_List.List_size(self_)) && (await body_((self_[i_] ?? ff_core_List.internalGrab_(self_, i_)), $task)))) {
603
+ while(((i_ < self_.length) && (await body_((self_[i_] ?? ff_core_List.internalGrab_(self_, i_)), $task)))) {
607
604
  result_.array.push((self_[i_] ?? ff_core_List.internalGrab_(self_, i_)));
608
605
  i_ += 1
609
606
  };
@@ -613,10 +610,10 @@ return ff_core_Array.Array_drain(result_)
613
610
  export async function List_dropWhile$(self_, body_, $task) {
614
611
  const result_ = ff_core_Array.new_();
615
612
  let i_ = 0;
616
- while(((i_ < ff_core_List.List_size(self_)) && (await body_((self_[i_] ?? ff_core_List.internalGrab_(self_, i_)), $task)))) {
613
+ while(((i_ < self_.length) && (await body_((self_[i_] ?? ff_core_List.internalGrab_(self_, i_)), $task)))) {
617
614
  i_ += 1
618
615
  };
619
- while((i_ < ff_core_List.List_size(self_))) {
616
+ while((i_ < self_.length)) {
620
617
  result_.array.push((self_[i_] ?? ff_core_List.internalGrab_(self_, i_)));
621
618
  i_ += 1
622
619
  };
@@ -627,11 +624,11 @@ export async function List_partitionWhile$(self_, body_, $task) {
627
624
  const first_ = ff_core_Array.new_();
628
625
  const second_ = ff_core_Array.new_();
629
626
  let i_ = 0;
630
- while(((i_ < ff_core_List.List_size(self_)) && (await body_((self_[i_] ?? ff_core_List.internalGrab_(self_, i_)), $task)))) {
627
+ while(((i_ < self_.length) && (await body_((self_[i_] ?? ff_core_List.internalGrab_(self_, i_)), $task)))) {
631
628
  first_.array.push((self_[i_] ?? ff_core_List.internalGrab_(self_, i_)));
632
629
  i_ += 1
633
630
  };
634
- while((i_ < ff_core_List.List_size(self_))) {
631
+ while((i_ < self_.length)) {
635
632
  second_.array.push((self_[i_] ?? ff_core_List.internalGrab_(self_, i_)));
636
633
  i_ += 1
637
634
  };
@@ -678,7 +675,7 @@ export async function List_modify$(self_, index_, body_, $task) {
678
675
  }
679
676
 
680
677
  export async function List_zip$(self_, that_, $task) {
681
- if((ff_core_List.List_size(self_) <= ff_core_List.List_size(that_))) {
678
+ if((self_.length <= that_.length)) {
682
679
  let i_ = (-1);
683
680
  return ff_core_List.List_map(self_, ((x_) => {
684
681
  i_ += 1;
@@ -716,7 +713,7 @@ return ff_core_Array.Array_drain(results_)
716
713
  export async function List_toStream$(self_, cycle_ = false, $task) {
717
714
  let index_ = 0;
718
715
  return (await ff_core_Stream.new_$((async ($task) => {
719
- if((index_ < ff_core_List.List_size(self_))) {
716
+ if((index_ < self_.length)) {
720
717
  return ff_core_Option.Some((await (async function() {
721
718
  const result_ = (self_[index_] ?? ff_core_List.internalGrab_(self_, index_));
722
719
  index_ += 1;
@@ -724,7 +721,7 @@ return result_
724
721
  })()))
725
722
  } else if((cycle_ && (index_ !== 0))) {
726
723
  return ff_core_Option.Some((await (async function() {
727
- const result_ = ff_core_List.List_grab(self_, 0);
724
+ const result_ = (self_[0] ?? ff_core_List.internalGrab_(self_, 0));
728
725
  index_ = 1;
729
726
  return result_
730
727
  })()))
@@ -777,10 +774,7 @@ for(let for_i = 0, for_a = self_, for_l = for_a.length; for_i < for_l; for_i++)
777
774
  const x_ = for_a[for_i];
778
775
  if(!((await body_(x_, $task))
779
776
  ? (result_ = ff_core_Option.Some(i_), false)
780
- : (await (async function() {
781
- i_ += 1;
782
- return true
783
- })()))) break
777
+ : (i_ += 1, true))) break
784
778
  };
785
779
  return result_
786
780
  }
@@ -874,8 +868,8 @@ return ff_core_Array.Array_drain(array_)
874
868
  }
875
869
 
876
870
  export async function List_reverse$(self_, $task) {
877
- return ff_core_List.List_map(ff_core_Int.Int_to(1, ff_core_List.List_size(self_)), ((i_) => {
878
- return ff_core_List.List_grab(self_, (ff_core_List.List_size(self_) - i_))
871
+ return ff_core_List.List_map(ff_core_Int.Int_to(1, self_.length), ((i_) => {
872
+ return ff_core_List.List_grab(self_, (self_.length - i_))
879
873
  }))
880
874
  }
881
875
 
@@ -1065,7 +1059,7 @@ const array_ = ff_core_Array.new_();
1065
1059
  array_.array.push("[");
1066
1060
  for(let for_i = 0, for_a = value_, for_l = for_a.length; for_i < for_l; for_i++) {
1067
1061
  const x_ = for_a[for_i];
1068
- if((ff_core_Array.Array_size(array_) > 1)) {
1062
+ if((array_.array.length > 1)) {
1069
1063
  array_.array.push(", ")
1070
1064
  };
1071
1065
  array_.array.push(ff_core_Show_Show$T.show_(x_))
@@ -1078,7 +1072,7 @@ const array_ = ff_core_Array.new_();
1078
1072
  array_.array.push("[");
1079
1073
  for(let for_i = 0, for_a = value_, for_l = for_a.length; for_i < for_l; for_i++) {
1080
1074
  const x_ = for_a[for_i];
1081
- if((ff_core_Array.Array_size(array_) > 1)) {
1075
+ if((array_.array.length > 1)) {
1082
1076
  array_.array.push(", ")
1083
1077
  };
1084
1078
  array_.array.push(ff_core_Show_Show$T.show_(x_))
@@ -1093,7 +1087,7 @@ equals_(x_, y_) {
1093
1087
  if(ff_core_List.internalSame_(x_, y_)) {
1094
1088
  return true
1095
1089
  } else {
1096
- if((ff_core_List.List_size(x_) !== ff_core_List.List_size(y_))) {
1090
+ if((x_.length !== y_.length)) {
1097
1091
  return false
1098
1092
  } else {
1099
1093
  let i_ = (-1);
@@ -1108,7 +1102,7 @@ async equals_$(x_, y_, $task) {
1108
1102
  if(ff_core_List.internalSame_(x_, y_)) {
1109
1103
  return true
1110
1104
  } else {
1111
- if((ff_core_List.List_size(x_) !== ff_core_List.List_size(y_))) {
1105
+ if((x_.length !== y_.length)) {
1112
1106
  return false
1113
1107
  } else {
1114
1108
  let i_ = (-1);
@@ -1126,7 +1120,7 @@ compare_(x_, y_) {
1126
1120
  if(ff_core_List.internalSame_(x_, y_)) {
1127
1121
  return ff_core_Ordering.OrderingSame()
1128
1122
  } else {
1129
- const size_ = ff_core_Int.Int_min(ff_core_List.List_size(x_), ff_core_List.List_size(y_));
1123
+ const size_ = ff_core_Int.Int_min(x_.length, y_.length);
1130
1124
  let i_ = 0;
1131
1125
  let ordering_ = ff_core_Ordering.OrderingSame();
1132
1126
  while(((ordering_ === ff_core_Ordering.OrderingSame()) && (i_ < size_))) {
@@ -1136,7 +1130,7 @@ i_ += 1
1136
1130
  if((ordering_ !== ff_core_Ordering.OrderingSame())) {
1137
1131
  return ordering_
1138
1132
  } else {
1139
- return ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int.compare_(ff_core_List.List_size(x_), ff_core_List.List_size(y_))
1133
+ return ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int.compare_(x_.length, y_.length)
1140
1134
  }
1141
1135
  }
1142
1136
  },
@@ -1144,7 +1138,7 @@ async compare_$(x_, y_, $task) {
1144
1138
  if(ff_core_List.internalSame_(x_, y_)) {
1145
1139
  return ff_core_Ordering.OrderingSame()
1146
1140
  } else {
1147
- const size_ = ff_core_Int.Int_min(ff_core_List.List_size(x_), ff_core_List.List_size(y_));
1141
+ const size_ = ff_core_Int.Int_min(x_.length, y_.length);
1148
1142
  let i_ = 0;
1149
1143
  let ordering_ = ff_core_Ordering.OrderingSame();
1150
1144
  while(((ordering_ === ff_core_Ordering.OrderingSame()) && (i_ < size_))) {
@@ -1154,7 +1148,7 @@ i_ += 1
1154
1148
  if((ordering_ !== ff_core_Ordering.OrderingSame())) {
1155
1149
  return ordering_
1156
1150
  } else {
1157
- return ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int.compare_(ff_core_List.List_size(x_), ff_core_List.List_size(y_))
1151
+ return ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int.compare_(x_.length, y_.length)
1158
1152
  }
1159
1153
  }
1160
1154
  }
@@ -461,12 +461,12 @@ export function ff_core_Ordering_Order$ff_core_List_List(ff_core_Ordering_Order$
461
461
  compare_(x_, y_) {
462
462
  let ordering_ = ff_core_Ordering.OrderingSame();
463
463
  let i_ = 0;
464
- while((((i_ < ff_core_List.List_size(x_)) && (i_ < ff_core_List.List_size(y_))) && (ordering_ === ff_core_Ordering.OrderingSame()))) {
464
+ while((((i_ < x_.length) && (i_ < y_.length)) && (ordering_ === ff_core_Ordering.OrderingSame()))) {
465
465
  ordering_ = ff_core_Ordering_Order$T.compare_((x_[i_] ?? ff_core_List.internalGrab_(x_, i_)), (y_[i_] ?? ff_core_List.internalGrab_(y_, i_)));
466
466
  i_ += 1
467
467
  };
468
468
  if((ordering_ !== ff_core_Ordering.OrderingSame())) {
469
- return ff_core_Ordering.fromInt_((ff_core_List.List_size(x_) - ff_core_List.List_size(y_)))
469
+ return ff_core_Ordering.fromInt_((x_.length - y_.length))
470
470
  } else {
471
471
  return ordering_
472
472
  }
@@ -474,12 +474,12 @@ return ordering_
474
474
  async compare_$(x_, y_, $task) {
475
475
  let ordering_ = ff_core_Ordering.OrderingSame();
476
476
  let i_ = 0;
477
- while((((i_ < ff_core_List.List_size(x_)) && (i_ < ff_core_List.List_size(y_))) && (ordering_ === ff_core_Ordering.OrderingSame()))) {
477
+ while((((i_ < x_.length) && (i_ < y_.length)) && (ordering_ === ff_core_Ordering.OrderingSame()))) {
478
478
  ordering_ = ff_core_Ordering_Order$T.compare_((x_[i_] ?? ff_core_List.internalGrab_(x_, i_)), (y_[i_] ?? ff_core_List.internalGrab_(y_, i_)));
479
479
  i_ += 1
480
480
  };
481
481
  if((ordering_ !== ff_core_Ordering.OrderingSame())) {
482
- return ff_core_Ordering.fromInt_((ff_core_List.List_size(x_) - ff_core_List.List_size(y_)))
482
+ return ff_core_Ordering.fromInt_((x_.length - y_.length))
483
483
  } else {
484
484
  return ordering_
485
485
  }
@@ -217,9 +217,9 @@ export function Random_nextGauss(self_, mean_, standardDeviation_) {
217
217
  }
218
218
 
219
219
  export function Random_shuffleArray(self_, array_) {
220
- for(let for_i = 0, for_e = (ff_core_Array.Array_size(array_) - 1); for_i < for_e; for_i++) {
220
+ for(let for_i = 0, for_e = (array_.array.length - 1); for_i < for_e; for_i++) {
221
221
  const i_ = for_i;
222
- const j_ = (ff_core_Random.Random_nextInt(self_, 0, (ff_core_Array.Array_size(array_) - i_)) + i_);
222
+ const j_ = (ff_core_Random.Random_nextInt(self_, 0, (array_.array.length - i_)) + i_);
223
223
  const value_ = (array_.array[i_] ?? ff_core_Array.internalGrab_(array_, i_));
224
224
  ff_core_Array.Array_set(array_, i_, (array_.array[j_] ?? ff_core_Array.internalGrab_(array_, j_)));
225
225
  ff_core_Array.Array_set(array_, j_, value_)
@@ -244,11 +244,11 @@ return ff_core_List.List_takeFirst(ff_core_Random.Random_shuffleList(self_, list
244
244
  }
245
245
 
246
246
  export function Random_grabArray(self_, array_) {
247
- return ff_core_Array.Array_grab(array_, ff_core_Random.Random_nextInt(self_, 0, ff_core_Array.Array_size(array_)))
247
+ return (array_.array[ff_core_Random.Random_nextInt(self_, 0, array_.array.length)] ?? ff_core_Array.internalGrab_(array_, ff_core_Random.Random_nextInt(self_, 0, array_.array.length)))
248
248
  }
249
249
 
250
250
  export function Random_grabList(self_, list_) {
251
- return ff_core_List.List_grab(list_, ff_core_Random.Random_nextInt(self_, 0, ff_core_List.List_size(list_)))
251
+ return ff_core_List.List_grab(list_, ff_core_Random.Random_nextInt(self_, 0, list_.length))
252
252
  }
253
253
 
254
254
  export async function Random_copy$(self_, $task) {
@@ -279,9 +279,9 @@ throw new Error('Function Random_nextGauss is missing on this target in async co
279
279
  }
280
280
 
281
281
  export async function Random_shuffleArray$(self_, array_, $task) {
282
- for(let for_i = 0, for_e = (ff_core_Array.Array_size(array_) - 1); for_i < for_e; for_i++) {
282
+ for(let for_i = 0, for_e = (array_.array.length - 1); for_i < for_e; for_i++) {
283
283
  const i_ = for_i;
284
- const j_ = (ff_core_Random.Random_nextInt(self_, 0, (ff_core_Array.Array_size(array_) - i_)) + i_);
284
+ const j_ = (ff_core_Random.Random_nextInt(self_, 0, (array_.array.length - i_)) + i_);
285
285
  const value_ = (array_.array[i_] ?? ff_core_Array.internalGrab_(array_, i_));
286
286
  ff_core_Array.Array_set(array_, i_, (array_.array[j_] ?? ff_core_Array.internalGrab_(array_, j_)));
287
287
  ff_core_Array.Array_set(array_, j_, value_)
@@ -306,11 +306,11 @@ return ff_core_List.List_takeFirst(ff_core_Random.Random_shuffleList(self_, list
306
306
  }
307
307
 
308
308
  export async function Random_grabArray$(self_, array_, $task) {
309
- return ff_core_Array.Array_grab(array_, ff_core_Random.Random_nextInt(self_, 0, ff_core_Array.Array_size(array_)))
309
+ return (array_.array[ff_core_Random.Random_nextInt(self_, 0, array_.array.length)] ?? ff_core_Array.internalGrab_(array_, ff_core_Random.Random_nextInt(self_, 0, array_.array.length)))
310
310
  }
311
311
 
312
312
  export async function Random_grabList$(self_, list_, $task) {
313
- return ff_core_List.List_grab(list_, ff_core_Random.Random_nextInt(self_, 0, ff_core_List.List_size(list_)))
313
+ return ff_core_List.List_grab(list_, ff_core_Random.Random_nextInt(self_, 0, list_.length))
314
314
  }
315
315
 
316
316
 
@@ -239,14 +239,14 @@ return (result_ === 1)
239
239
 
240
240
  export function ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Serializable_Serializable$T) { return {
241
241
  serializeUsing_(serialization_, value_) {
242
- if((ff_core_List.List_size(value_) < 255)) {
242
+ if((value_.length < 255)) {
243
243
  ff_core_Serializable.Serialization_autoResize(serialization_, 1);
244
- ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, ff_core_List.List_size(value_));
244
+ ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, value_.length);
245
245
  serialization_.offset_ += 1
246
- } else if((ff_core_List.List_size(value_) < 1073741824)) {
246
+ } else if((value_.length < 1073741824)) {
247
247
  ff_core_Serializable.Serialization_autoResize(serialization_, (1 + 4));
248
248
  ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 255);
249
- ff_core_Buffer.Buffer_setUint32(serialization_.buffer_, (1 + serialization_.offset_), ff_core_List.List_size(value_), true);
249
+ ff_core_Buffer.Buffer_setUint32(serialization_.buffer_, (1 + serialization_.offset_), value_.length, true);
250
250
  serialization_.offset_ += (1 + 4)
251
251
  } else {
252
252
  ff_core_Core.panic_("Can't serialize arrays where size() >= 1073741824")
@@ -282,14 +282,14 @@ return result;
282
282
  }
283
283
  },
284
284
  async serializeUsing_$(serialization_, value_, $task) {
285
- if((ff_core_List.List_size(value_) < 255)) {
285
+ if((value_.length < 255)) {
286
286
  ff_core_Serializable.Serialization_autoResize(serialization_, 1);
287
- ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, ff_core_List.List_size(value_));
287
+ ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, value_.length);
288
288
  serialization_.offset_ += 1
289
- } else if((ff_core_List.List_size(value_) < 1073741824)) {
289
+ } else if((value_.length < 1073741824)) {
290
290
  ff_core_Serializable.Serialization_autoResize(serialization_, (1 + 4));
291
291
  ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 255);
292
- ff_core_Buffer.Buffer_setUint32(serialization_.buffer_, (1 + serialization_.offset_), ff_core_List.List_size(value_), true);
292
+ ff_core_Buffer.Buffer_setUint32(serialization_.buffer_, (1 + serialization_.offset_), value_.length, true);
293
293
  serialization_.offset_ += (1 + 4)
294
294
  } else {
295
295
  ff_core_Core.panic_("Can't serialize arrays where size() >= 1073741824")
@@ -267,7 +267,7 @@ return ff_core_Error.Error_rethrow(_w1)
267
267
  export function Task_race(self_, tasks_) {
268
268
  const successChannel_ = ff_core_Task.Task_channel(self_, 0);
269
269
  const failureChannel_ = ff_core_Task.Task_channel(self_, 0);
270
- let live_ = ff_core_List.List_size(tasks_);
270
+ let live_ = tasks_.length;
271
271
  const started_ = ff_core_List.List_map(tasks_, ((task_) => {
272
272
  return ff_core_Task.Task_spawn(self_, ((_) => {
273
273
  ff_core_Try.Try_catchAny(ff_core_Core.try_((() => {
@@ -357,7 +357,7 @@ return ff_core_Error.Error_rethrow(_w1)
357
357
  export async function Task_race$(self_, tasks_, $task) {
358
358
  const successChannel_ = (await ff_core_Task.Task_channel$(self_, 0, $task));
359
359
  const failureChannel_ = (await ff_core_Task.Task_channel$(self_, 0, $task));
360
- let live_ = ff_core_List.List_size(tasks_);
360
+ let live_ = tasks_.length;
361
361
  const started_ = (await ff_core_List.List_map$(tasks_, (async (task_, $task) => {
362
362
  return (await ff_core_Task.Task_spawn$(self_, (async (_, $task) => {
363
363
  (await ff_core_Try.Try_catchAny$((await ff_core_Core.try_$((async ($task) => {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "description": "Firefly compiler",
5
5
  "author": "Firefly team",
6
6
  "license": "MIT",
7
- "version": "0.5.12",
7
+ "version": "0.5.14",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"
@@ -4,7 +4,7 @@
4
4
  "description": "Firefly language support",
5
5
  "author": "Firefly team",
6
6
  "license": "MIT",
7
- "version": "0.5.12",
7
+ "version": "0.5.14",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"