firefly-compiler 0.5.13 → 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.
@@ -239,7 +239,7 @@ export function Parser_behind(self_) {
239
239
  if((self_.offset_ === 0)) {
240
240
  return ff_compiler_Parser.Parser_current(self_)
241
241
  } else {
242
- if(((self_.offset_ - 1) < ff_core_List.List_size(self_.tokens_))) {
242
+ if(((self_.offset_ - 1) < self_.tokens_.length)) {
243
243
  return ff_core_List.List_grab(self_.tokens_, (self_.offset_ - 1))
244
244
  } else {
245
245
  return self_.end_
@@ -248,15 +248,15 @@ return self_.end_
248
248
  }
249
249
 
250
250
  export function Parser_current(self_) {
251
- if((self_.offset_ < ff_core_List.List_size(self_.tokens_))) {
252
- return ff_core_List.List_grab(self_.tokens_, self_.offset_)
251
+ if((self_.offset_ < self_.tokens_.length)) {
252
+ return (self_.tokens_[self_.offset_] ?? ff_core_List.internalGrab_(self_.tokens_, self_.offset_))
253
253
  } else {
254
254
  return self_.end_
255
255
  }
256
256
  }
257
257
 
258
258
  export function Parser_ahead(self_) {
259
- if(((self_.offset_ + 1) < ff_core_List.List_size(self_.tokens_))) {
259
+ if(((self_.offset_ + 1) < self_.tokens_.length)) {
260
260
  return ff_core_List.List_grab(self_.tokens_, (self_.offset_ + 1))
261
261
  } else {
262
262
  return self_.end_
@@ -264,7 +264,7 @@ return self_.end_
264
264
  }
265
265
 
266
266
  export function Parser_aheadAhead(self_) {
267
- if(((self_.offset_ + 2) < ff_core_List.List_size(self_.tokens_))) {
267
+ if(((self_.offset_ + 2) < self_.tokens_.length)) {
268
268
  return ff_core_List.List_grab(self_.tokens_, (self_.offset_ + 2))
269
269
  } else {
270
270
  return self_.end_
@@ -431,9 +431,9 @@ ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseSymbol
431
431
  };
432
432
  const signature_ = ff_compiler_Parser.Parser_parseSignature(self_, member_);
433
433
  const body_ = (ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_current(self_), "{")
434
- ? ff_core_Option.Some(ff_compiler_Parser.Parser_parseLambda(self_, ff_core_List.List_size(signature_.parameters_), false, false))
434
+ ? ff_core_Option.Some(ff_compiler_Parser.Parser_parseLambda(self_, signature_.parameters_.length, false, false))
435
435
  : ff_core_Option.None());
436
- const targets_ = ff_compiler_Parser.Parser_parseTargets(self_, ff_core_List.List_size(signature_.parameters_));
436
+ const targets_ = ff_compiler_Parser.Parser_parseTargets(self_, signature_.parameters_.length);
437
437
  const bestTarget_ = ff_compiler_Parser.findBestTarget_(self_.targetIsNode_, body_, targets_);
438
438
  const result_ = ff_compiler_Syntax.DFunction(signature_.at_, signature_, bestTarget_);
439
439
  if(self_.lspHook_.trackSymbols_) {
@@ -656,7 +656,7 @@ ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseSymbol
656
656
  signatures_.array.push(signature_);
657
657
  if(ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_current(self_), "{")) {
658
658
  const generator_ = (ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_ahead(self_), ff_compiler_Token.LKeyword()) && ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_ahead(self_), "generate"));
659
- const body_ = ff_compiler_Parser.Parser_parseLambda(self_, ff_core_List.List_size(signature_.parameters_), true, false);
659
+ const body_ = ff_compiler_Parser.Parser_parseLambda(self_, signature_.parameters_.length, true, false);
660
660
  if(generator_) {
661
661
  methodGenerators_.array.push(ff_core_Pair.Pair(signature_.name_, body_))
662
662
  } else {
@@ -780,7 +780,7 @@ ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseSymbol
780
780
  ff_compiler_Parser.Parser_rawSkip(self_, ff_compiler_Token.LBracketRight(), "}");
781
781
  return ff_core_Array.Array_toList(variantsBuilder_, 0, 9007199254740991)
782
782
  })());
783
- if((newtype_ && (ff_core_List.List_size(commonFields_) !== 1))) {
783
+ if((newtype_ && (commonFields_.length !== 1))) {
784
784
  ff_core_Log.show_(commonFields_, ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Parameter));
785
785
  throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(ff_compiler_Token.Token_at(nameToken_), "Newtypes must have exactly one field"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
786
786
  };
@@ -901,7 +901,7 @@ const parts_ = ff_core_String.String_split(ff_compiler_Token.Token_raw(majorMino
901
901
  const patch_ = (ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LDot())
902
902
  ? (ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LDot()), ff_core_String.String_grabInt(ff_compiler_Token.Token_raw(ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LInt()))))
903
903
  : 0);
904
- return ff_compiler_Syntax.Version(ff_compiler_Token.Token_at(majorMinor_), ff_core_String.String_grabInt(ff_core_List.List_grab(parts_, 0)), ff_core_String.String_grabInt(ff_core_List.List_grab(parts_, 1)), patch_)
904
+ return ff_compiler_Syntax.Version(ff_compiler_Token.Token_at(majorMinor_), ff_core_String.String_grabInt((parts_[0] ?? ff_core_List.internalGrab_(parts_, 0))), ff_core_String.String_grabInt((parts_[1] ?? ff_core_List.internalGrab_(parts_, 1))), patch_)
905
905
  } else {
906
906
  const major_ = ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LInt());
907
907
  return ff_compiler_Syntax.Version(ff_compiler_Token.Token_at(major_), ff_core_String.String_grabInt(ff_compiler_Token.Token_raw(major_)), 0, 0)
@@ -1040,7 +1040,7 @@ return ff_core_Option.Some(token_)
1040
1040
  const value_ = ff_compiler_Parser.Parser_parseTerm(self_);
1041
1041
  if((ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_) && (!self_.lspEmittedArgumentHook_))) {
1042
1042
  if(ff_compiler_LspHook.strictlyBetween_(callAt_, ff_compiler_Token.Token_at(ff_compiler_Parser.Parser_current(self_)), self_.lspHook_.at_, 1)) {
1043
- ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(callAt_, ff_core_Array.Array_size(arguments_), ff_core_Option.Option_map(nameToken_, ((_w1) => {
1043
+ ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(callAt_, arguments_.array.length, ff_core_Option.Option_map(nameToken_, ((_w1) => {
1044
1044
  return ff_compiler_Token.Token_raw(_w1)
1045
1045
  }))));
1046
1046
  self_.lspEmittedArgumentHook_ = true
@@ -1055,7 +1055,7 @@ ff_compiler_Parser.Parser_skipSeparator(self_, ff_compiler_Token.LComma())
1055
1055
  };
1056
1056
  if((ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_) && (!self_.lspEmittedArgumentHook_))) {
1057
1057
  if(ff_compiler_LspHook.strictlyBetween_(callAt_, ff_compiler_Token.Token_at(ff_compiler_Parser.Parser_current(self_)), self_.lspHook_.at_, 1)) {
1058
- ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(callAt_, ff_core_Array.Array_size(arguments_), ff_core_Option.None()));
1058
+ ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(callAt_, arguments_.array.length, ff_core_Option.None()));
1059
1059
  self_.lspEmittedArgumentHook_ = true
1060
1060
  }
1061
1061
  };
@@ -1070,7 +1070,7 @@ const temporaryEffect_ = ff_compiler_Syntax.TConstructor(term_.at_, "TemporaryEf
1070
1070
  const cases_ = [ff_compiler_Syntax.MatchCase(term_.at_, [], [], term_)];
1071
1071
  if((ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_) && (!self_.lspEmittedArgumentHook_))) {
1072
1072
  if(ff_compiler_LspHook.strictlyBetween_(callAt_, ff_compiler_Token.Token_at(ff_compiler_Parser.Parser_current(self_)), self_.lspHook_.at_, 1)) {
1073
- ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(callAt_, ff_core_Array.Array_size(arguments_), ff_core_Option.None()));
1073
+ ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(callAt_, arguments_.array.length, ff_core_Option.None()));
1074
1074
  self_.lspEmittedArgumentHook_ = true
1075
1075
  }
1076
1076
  };
@@ -1081,7 +1081,7 @@ lastWasCurly_ = ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_current(
1081
1081
  const lambda_ = ff_compiler_Parser.Parser_parseLambda(self_, 0, false, true);
1082
1082
  if((ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_) && (!self_.lspEmittedArgumentHook_))) {
1083
1083
  if(ff_compiler_LspHook.strictlyBetween_(callAt_, ff_compiler_Token.Token_at(ff_compiler_Parser.Parser_current(self_)), self_.lspHook_.at_, 1)) {
1084
- ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(callAt_, ff_core_Array.Array_size(arguments_), ff_core_Option.None()));
1084
+ ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(callAt_, arguments_.array.length, ff_core_Option.None()));
1085
1085
  self_.lspEmittedArgumentHook_ = true
1086
1086
  }
1087
1087
  };
@@ -1220,7 +1220,7 @@ while((!ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_
1220
1220
  const pattern_ = ff_compiler_Parser.Parser_parsePattern(self_);
1221
1221
  if((ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_) && (!self_.lspEmittedArgumentHook_))) {
1222
1222
  if(ff_compiler_LspHook.strictlyBetween_(ff_compiler_Token.Token_at(token_), ff_compiler_Token.Token_at(ff_compiler_Parser.Parser_current(self_)), self_.lspHook_.at_, 1)) {
1223
- ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(ff_compiler_Token.Token_at(token_), ff_core_Array.Array_size(patterns_), ff_core_Option.None()));
1223
+ ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(ff_compiler_Token.Token_at(token_), patterns_.array.length, ff_core_Option.None()));
1224
1224
  self_.lspEmittedArgumentHook_ = true
1225
1225
  }
1226
1226
  };
@@ -1231,7 +1231,7 @@ ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LComma())
1231
1231
  };
1232
1232
  if((ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_) && (!self_.lspEmittedArgumentHook_))) {
1233
1233
  if(ff_compiler_LspHook.strictlyBetween_(ff_compiler_Token.Token_at(token_), ff_compiler_Token.Token_at(ff_compiler_Parser.Parser_current(self_)), self_.lspHook_.at_, 1)) {
1234
- ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(ff_compiler_Token.Token_at(token_), ff_core_Array.Array_size(patterns_), ff_core_Option.None()));
1234
+ ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(ff_compiler_Token.Token_at(token_), patterns_.array.length, ff_core_Option.None()));
1235
1235
  self_.lspEmittedArgumentHook_ = true
1236
1236
  }
1237
1237
  };
@@ -1277,12 +1277,12 @@ const arguments_ = ((!ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_cu
1277
1277
  : ff_compiler_Parser.Parser_parseTypeArguments(self_, false));
1278
1278
  return [ff_compiler_Syntax.TConstructor(ff_compiler_Token.Token_at(token_), (namespace_ + ff_compiler_Token.Token_raw(token_)), arguments_)]
1279
1279
  })());
1280
- if(((!ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LArrowThick())) && (ff_core_List.List_size(leftTypes_) === 1))) {
1280
+ if(((!ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LArrowThick())) && (leftTypes_.length === 1))) {
1281
1281
  return ff_core_List.List_grabFirst(leftTypes_)
1282
1282
  } else {
1283
1283
  const arrowToken_ = ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LArrowThick());
1284
1284
  const rightType_ = ff_compiler_Parser.Parser_parseType(self_);
1285
- return ff_compiler_Syntax.TConstructor(ff_compiler_Token.Token_at(arrowToken_), ("Function$" + ff_core_List.List_size(leftTypes_)), [...leftTypes_, rightType_])
1285
+ return ff_compiler_Syntax.TConstructor(ff_compiler_Token.Token_at(arrowToken_), ("Function$" + leftTypes_.length), [...leftTypes_, rightType_])
1286
1286
  }
1287
1287
  }
1288
1288
 
@@ -1397,7 +1397,7 @@ const body_ = ((ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_) && (!ff_co
1397
1397
  const temporaryEffect_ = ff_compiler_Syntax.TConstructor(functionAt_, "TemporaryEffect$", []);
1398
1398
  return ff_compiler_Syntax.Lambda(functionAt_, temporaryEffect_, [])
1399
1399
  })()
1400
- : ff_compiler_Parser.Parser_parseLambda(self_, ff_core_List.List_size(signature_.parameters_), false, false));
1400
+ : ff_compiler_Parser.Parser_parseLambda(self_, signature_.parameters_.length, false, false));
1401
1401
  functions_.array.push(ff_compiler_Syntax.DFunction(signature_.at_, signature_, ff_compiler_Syntax.FireflyTarget(body_)));
1402
1402
  if(self_.lspHook_.trackSymbols_) {
1403
1403
  ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseSymbolEnd(signature_.name_, ff_compiler_LspHook.SFunction(false), signature_.at_, (((_c) => {
@@ -1419,7 +1419,7 @@ return ff_compiler_Parser.Parser_parseBinary(self_, 0)
1419
1419
  }
1420
1420
 
1421
1421
  export function Parser_parseBinary(self_, level_) {
1422
- if((level_ >= ff_core_List.List_size(ff_compiler_Parser.binaryOperators_))) {
1422
+ if((level_ >= ff_compiler_Parser.binaryOperators_.length)) {
1423
1423
  return ff_compiler_Parser.Parser_parseUnary(self_)
1424
1424
  } else {
1425
1425
  const operators_ = (ff_compiler_Parser.binaryOperators_[level_] ?? ff_core_List.internalGrab_(ff_compiler_Parser.binaryOperators_, level_));
@@ -1533,7 +1533,7 @@ const _1 = ff_core_List.List_indexWhere(arguments_.first_, ((_w1) => {
1533
1533
  return (!ff_core_Option.Option_isEmpty(_w1.name_))
1534
1534
  }));
1535
1535
  if(_1.None) {
1536
- const target_ = ff_compiler_Syntax.DynamicCall(ff_compiler_Syntax.EField(ff_compiler_Token.Token_at(token_), false, record_, ("new" + ff_core_List.List_size(arguments_.first_))), false);
1536
+ const target_ = ff_compiler_Syntax.DynamicCall(ff_compiler_Syntax.EField(ff_compiler_Token.Token_at(token_), false, record_, ("new" + arguments_.first_.length)), false);
1537
1537
  return ff_compiler_Syntax.ECall(record_.at_, target_, effect_, [], arguments_.first_, [])
1538
1538
  }
1539
1539
  if(_1.Some && _1.value_ === 0) {
@@ -1551,13 +1551,13 @@ return result_
1551
1551
  }
1552
1552
  if(_1.Some) {
1553
1553
  const i_ = _1.value_;
1554
- throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(ff_core_List.List_grab(arguments_.first_, i_).at_, "Unexpected named argument"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
1554
+ throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError((arguments_.first_[i_] ?? ff_core_List.internalGrab_(arguments_.first_, i_)).at_, "Unexpected named argument"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
1555
1555
  }
1556
1556
  }
1557
1557
  } else if(ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_current(self_), "{")) {
1558
1558
  const lambda_ = ff_compiler_Parser.Parser_parseLambda(self_, 0, false, false);
1559
1559
  const effect_ = ff_compiler_Parser.Parser_freshUnificationVariable(self_, record_.at_);
1560
- const arguments_ = ff_core_List.List_size(ff_core_List.List_grabFirst(lambda_.cases_).patterns_);
1560
+ const arguments_ = ff_core_List.List_grabFirst(lambda_.cases_).patterns_.length;
1561
1561
  const target_ = ff_compiler_Syntax.DynamicCall(ff_compiler_Syntax.EField(ff_compiler_Token.Token_at(token_), false, record_, ("function" + arguments_)), false);
1562
1562
  return ff_compiler_Syntax.ECall(record_.at_, target_, effect_, [], [ff_compiler_Syntax.Argument(lambda_.at_, ff_core_Option.None(), ff_compiler_Syntax.ELambda(lambda_.at_, lambda_))], [])
1563
1563
  } else {
@@ -1577,7 +1577,7 @@ return (!ff_core_Option.Option_isEmpty(_w1.name_))
1577
1577
  throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(argument_.at_, "Unexpected named argument"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
1578
1578
  }));
1579
1579
  const effect_ = ff_compiler_Parser.Parser_freshUnificationVariable(self_, record_.at_);
1580
- const target_ = ff_compiler_Syntax.DynamicCall(ff_compiler_Syntax.EField(ff_compiler_Token.Token_at(token_), false, record_, ("call" + ff_core_List.List_size(arguments_.first_))), false);
1580
+ const target_ = ff_compiler_Syntax.DynamicCall(ff_compiler_Syntax.EField(ff_compiler_Token.Token_at(token_), false, record_, ("call" + arguments_.first_.length)), false);
1581
1581
  return ff_compiler_Syntax.ECall(record_.at_, target_, effect_, [], [ff_compiler_Syntax.Argument(member_.at_, ff_core_Option.None(), member_), ...arguments_.first_], [])
1582
1582
  } else if(ff_compiler_Token.Token_is3(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LAssign(), ff_compiler_Token.LAssignPlus(), ff_compiler_Token.LAssignMinus())) {
1583
1583
  const method_ = (ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LAssign())
@@ -1701,7 +1701,7 @@ const field_ = (((!ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_)) || ff_
1701
1701
  : ff_compiler_Syntax.Field(ff_compiler_Token.Token_at(fieldToken_), ff_compiler_Token.Token_raw(fieldToken_), ff_compiler_Syntax.EVariable(ff_compiler_Token.Token_at(fieldToken_), ff_compiler_Token.Token_raw(fieldToken_))));
1702
1702
  if((ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_) && (!self_.lspEmittedArgumentHook_))) {
1703
1703
  if(ff_compiler_LspHook.strictlyBetween_(startAt_, ff_compiler_Token.Token_at(ff_compiler_Parser.Parser_current(self_)), self_.lspHook_.at_, 1)) {
1704
- ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(startAt_, ff_core_Array.Array_size(fields_), ff_core_Option.Option_filter(ff_core_Option.Some(field_.name_), ((_w1) => {
1704
+ ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(startAt_, fields_.array.length, ff_core_Option.Option_filter(ff_core_Option.Some(field_.name_), ((_w1) => {
1705
1705
  return (_w1 !== "")
1706
1706
  }))));
1707
1707
  self_.lspEmittedArgumentHook_ = true
@@ -1714,7 +1714,7 @@ ff_compiler_Parser.Parser_skipSeparator(self_, ff_compiler_Token.LComma())
1714
1714
  };
1715
1715
  if((ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_) && (!self_.lspEmittedArgumentHook_))) {
1716
1716
  if(ff_compiler_LspHook.strictlyBetween_(startAt_, ff_compiler_Token.Token_at(ff_compiler_Parser.Parser_current(self_)), self_.lspHook_.at_, 1)) {
1717
- ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(startAt_, ff_core_Array.Array_size(fields_), ff_core_Option.None()));
1717
+ ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(startAt_, fields_.array.length, ff_core_Option.None()));
1718
1718
  self_.lspEmittedArgumentHook_ = true
1719
1719
  }
1720
1720
  };
@@ -1821,7 +1821,7 @@ export async function Parser_behind$(self_, $task) {
1821
1821
  if((self_.offset_ === 0)) {
1822
1822
  return ff_compiler_Parser.Parser_current(self_)
1823
1823
  } else {
1824
- if(((self_.offset_ - 1) < ff_core_List.List_size(self_.tokens_))) {
1824
+ if(((self_.offset_ - 1) < self_.tokens_.length)) {
1825
1825
  return ff_core_List.List_grab(self_.tokens_, (self_.offset_ - 1))
1826
1826
  } else {
1827
1827
  return self_.end_
@@ -1830,15 +1830,15 @@ return self_.end_
1830
1830
  }
1831
1831
 
1832
1832
  export async function Parser_current$(self_, $task) {
1833
- if((self_.offset_ < ff_core_List.List_size(self_.tokens_))) {
1834
- return ff_core_List.List_grab(self_.tokens_, self_.offset_)
1833
+ if((self_.offset_ < self_.tokens_.length)) {
1834
+ return (self_.tokens_[self_.offset_] ?? ff_core_List.internalGrab_(self_.tokens_, self_.offset_))
1835
1835
  } else {
1836
1836
  return self_.end_
1837
1837
  }
1838
1838
  }
1839
1839
 
1840
1840
  export async function Parser_ahead$(self_, $task) {
1841
- if(((self_.offset_ + 1) < ff_core_List.List_size(self_.tokens_))) {
1841
+ if(((self_.offset_ + 1) < self_.tokens_.length)) {
1842
1842
  return ff_core_List.List_grab(self_.tokens_, (self_.offset_ + 1))
1843
1843
  } else {
1844
1844
  return self_.end_
@@ -1846,7 +1846,7 @@ return self_.end_
1846
1846
  }
1847
1847
 
1848
1848
  export async function Parser_aheadAhead$(self_, $task) {
1849
- if(((self_.offset_ + 2) < ff_core_List.List_size(self_.tokens_))) {
1849
+ if(((self_.offset_ + 2) < self_.tokens_.length)) {
1850
1850
  return ff_core_List.List_grab(self_.tokens_, (self_.offset_ + 2))
1851
1851
  } else {
1852
1852
  return self_.end_
@@ -2013,9 +2013,9 @@ ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseSymbol
2013
2013
  };
2014
2014
  const signature_ = ff_compiler_Parser.Parser_parseSignature(self_, member_);
2015
2015
  const body_ = (ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_current(self_), "{")
2016
- ? ff_core_Option.Some(ff_compiler_Parser.Parser_parseLambda(self_, ff_core_List.List_size(signature_.parameters_), false, false))
2016
+ ? ff_core_Option.Some(ff_compiler_Parser.Parser_parseLambda(self_, signature_.parameters_.length, false, false))
2017
2017
  : ff_core_Option.None());
2018
- const targets_ = ff_compiler_Parser.Parser_parseTargets(self_, ff_core_List.List_size(signature_.parameters_));
2018
+ const targets_ = ff_compiler_Parser.Parser_parseTargets(self_, signature_.parameters_.length);
2019
2019
  const bestTarget_ = ff_compiler_Parser.findBestTarget_(self_.targetIsNode_, body_, targets_);
2020
2020
  const result_ = ff_compiler_Syntax.DFunction(signature_.at_, signature_, bestTarget_);
2021
2021
  if(self_.lspHook_.trackSymbols_) {
@@ -2238,7 +2238,7 @@ ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseSymbol
2238
2238
  signatures_.array.push(signature_);
2239
2239
  if(ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_current(self_), "{")) {
2240
2240
  const generator_ = (ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_ahead(self_), ff_compiler_Token.LKeyword()) && ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_ahead(self_), "generate"));
2241
- const body_ = ff_compiler_Parser.Parser_parseLambda(self_, ff_core_List.List_size(signature_.parameters_), true, false);
2241
+ const body_ = ff_compiler_Parser.Parser_parseLambda(self_, signature_.parameters_.length, true, false);
2242
2242
  if(generator_) {
2243
2243
  methodGenerators_.array.push(ff_core_Pair.Pair(signature_.name_, body_))
2244
2244
  } else {
@@ -2362,7 +2362,7 @@ ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseSymbol
2362
2362
  ff_compiler_Parser.Parser_rawSkip(self_, ff_compiler_Token.LBracketRight(), "}");
2363
2363
  return ff_core_Array.Array_toList(variantsBuilder_, 0, 9007199254740991)
2364
2364
  })()));
2365
- if((newtype_ && (ff_core_List.List_size(commonFields_) !== 1))) {
2365
+ if((newtype_ && (commonFields_.length !== 1))) {
2366
2366
  ff_core_Log.show_(commonFields_, ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Parameter));
2367
2367
  throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(ff_compiler_Token.Token_at(nameToken_), "Newtypes must have exactly one field"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
2368
2368
  };
@@ -2483,7 +2483,7 @@ const parts_ = ff_core_String.String_split(ff_compiler_Token.Token_raw(majorMino
2483
2483
  const patch_ = (ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LDot())
2484
2484
  ? (ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LDot()), ff_core_String.String_grabInt(ff_compiler_Token.Token_raw(ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LInt()))))
2485
2485
  : 0);
2486
- return ff_compiler_Syntax.Version(ff_compiler_Token.Token_at(majorMinor_), ff_core_String.String_grabInt(ff_core_List.List_grab(parts_, 0)), ff_core_String.String_grabInt(ff_core_List.List_grab(parts_, 1)), patch_)
2486
+ return ff_compiler_Syntax.Version(ff_compiler_Token.Token_at(majorMinor_), ff_core_String.String_grabInt((parts_[0] ?? ff_core_List.internalGrab_(parts_, 0))), ff_core_String.String_grabInt((parts_[1] ?? ff_core_List.internalGrab_(parts_, 1))), patch_)
2487
2487
  } else {
2488
2488
  const major_ = ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LInt());
2489
2489
  return ff_compiler_Syntax.Version(ff_compiler_Token.Token_at(major_), ff_core_String.String_grabInt(ff_compiler_Token.Token_raw(major_)), 0, 0)
@@ -2622,7 +2622,7 @@ return ff_core_Option.Some(token_)
2622
2622
  const value_ = ff_compiler_Parser.Parser_parseTerm(self_);
2623
2623
  if((ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_) && (!self_.lspEmittedArgumentHook_))) {
2624
2624
  if(ff_compiler_LspHook.strictlyBetween_(callAt_, ff_compiler_Token.Token_at(ff_compiler_Parser.Parser_current(self_)), self_.lspHook_.at_, 1)) {
2625
- ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(callAt_, ff_core_Array.Array_size(arguments_), ff_core_Option.Option_map(nameToken_, ((_w1) => {
2625
+ ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(callAt_, arguments_.array.length, ff_core_Option.Option_map(nameToken_, ((_w1) => {
2626
2626
  return ff_compiler_Token.Token_raw(_w1)
2627
2627
  }))));
2628
2628
  self_.lspEmittedArgumentHook_ = true
@@ -2637,7 +2637,7 @@ ff_compiler_Parser.Parser_skipSeparator(self_, ff_compiler_Token.LComma())
2637
2637
  };
2638
2638
  if((ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_) && (!self_.lspEmittedArgumentHook_))) {
2639
2639
  if(ff_compiler_LspHook.strictlyBetween_(callAt_, ff_compiler_Token.Token_at(ff_compiler_Parser.Parser_current(self_)), self_.lspHook_.at_, 1)) {
2640
- ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(callAt_, ff_core_Array.Array_size(arguments_), ff_core_Option.None()));
2640
+ ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(callAt_, arguments_.array.length, ff_core_Option.None()));
2641
2641
  self_.lspEmittedArgumentHook_ = true
2642
2642
  }
2643
2643
  };
@@ -2652,7 +2652,7 @@ const temporaryEffect_ = ff_compiler_Syntax.TConstructor(term_.at_, "TemporaryEf
2652
2652
  const cases_ = [ff_compiler_Syntax.MatchCase(term_.at_, [], [], term_)];
2653
2653
  if((ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_) && (!self_.lspEmittedArgumentHook_))) {
2654
2654
  if(ff_compiler_LspHook.strictlyBetween_(callAt_, ff_compiler_Token.Token_at(ff_compiler_Parser.Parser_current(self_)), self_.lspHook_.at_, 1)) {
2655
- ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(callAt_, ff_core_Array.Array_size(arguments_), ff_core_Option.None()));
2655
+ ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(callAt_, arguments_.array.length, ff_core_Option.None()));
2656
2656
  self_.lspEmittedArgumentHook_ = true
2657
2657
  }
2658
2658
  };
@@ -2663,7 +2663,7 @@ lastWasCurly_ = ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_current(
2663
2663
  const lambda_ = ff_compiler_Parser.Parser_parseLambda(self_, 0, false, true);
2664
2664
  if((ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_) && (!self_.lspEmittedArgumentHook_))) {
2665
2665
  if(ff_compiler_LspHook.strictlyBetween_(callAt_, ff_compiler_Token.Token_at(ff_compiler_Parser.Parser_current(self_)), self_.lspHook_.at_, 1)) {
2666
- ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(callAt_, ff_core_Array.Array_size(arguments_), ff_core_Option.None()));
2666
+ ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(callAt_, arguments_.array.length, ff_core_Option.None()));
2667
2667
  self_.lspEmittedArgumentHook_ = true
2668
2668
  }
2669
2669
  };
@@ -2802,7 +2802,7 @@ while((!ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_
2802
2802
  const pattern_ = ff_compiler_Parser.Parser_parsePattern(self_);
2803
2803
  if((ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_) && (!self_.lspEmittedArgumentHook_))) {
2804
2804
  if(ff_compiler_LspHook.strictlyBetween_(ff_compiler_Token.Token_at(token_), ff_compiler_Token.Token_at(ff_compiler_Parser.Parser_current(self_)), self_.lspHook_.at_, 1)) {
2805
- ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(ff_compiler_Token.Token_at(token_), ff_core_Array.Array_size(patterns_), ff_core_Option.None()));
2805
+ ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(ff_compiler_Token.Token_at(token_), patterns_.array.length, ff_core_Option.None()));
2806
2806
  self_.lspEmittedArgumentHook_ = true
2807
2807
  }
2808
2808
  };
@@ -2813,7 +2813,7 @@ ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LComma())
2813
2813
  };
2814
2814
  if((ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_) && (!self_.lspEmittedArgumentHook_))) {
2815
2815
  if(ff_compiler_LspHook.strictlyBetween_(ff_compiler_Token.Token_at(token_), ff_compiler_Token.Token_at(ff_compiler_Parser.Parser_current(self_)), self_.lspHook_.at_, 1)) {
2816
- ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(ff_compiler_Token.Token_at(token_), ff_core_Array.Array_size(patterns_), ff_core_Option.None()));
2816
+ ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(ff_compiler_Token.Token_at(token_), patterns_.array.length, ff_core_Option.None()));
2817
2817
  self_.lspEmittedArgumentHook_ = true
2818
2818
  }
2819
2819
  };
@@ -2859,12 +2859,12 @@ const arguments_ = ((!ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_cu
2859
2859
  : ff_compiler_Parser.Parser_parseTypeArguments(self_, false));
2860
2860
  return [ff_compiler_Syntax.TConstructor(ff_compiler_Token.Token_at(token_), (namespace_ + ff_compiler_Token.Token_raw(token_)), arguments_)]
2861
2861
  })()));
2862
- if(((!ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LArrowThick())) && (ff_core_List.List_size(leftTypes_) === 1))) {
2862
+ if(((!ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LArrowThick())) && (leftTypes_.length === 1))) {
2863
2863
  return ff_core_List.List_grabFirst(leftTypes_)
2864
2864
  } else {
2865
2865
  const arrowToken_ = ff_compiler_Parser.Parser_skip(self_, ff_compiler_Token.LArrowThick());
2866
2866
  const rightType_ = ff_compiler_Parser.Parser_parseType(self_);
2867
- return ff_compiler_Syntax.TConstructor(ff_compiler_Token.Token_at(arrowToken_), ("Function$" + ff_core_List.List_size(leftTypes_)), [...leftTypes_, rightType_])
2867
+ return ff_compiler_Syntax.TConstructor(ff_compiler_Token.Token_at(arrowToken_), ("Function$" + leftTypes_.length), [...leftTypes_, rightType_])
2868
2868
  }
2869
2869
  }
2870
2870
 
@@ -2979,7 +2979,7 @@ const body_ = ((ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_) && (!ff_co
2979
2979
  const temporaryEffect_ = ff_compiler_Syntax.TConstructor(functionAt_, "TemporaryEffect$", []);
2980
2980
  return ff_compiler_Syntax.Lambda(functionAt_, temporaryEffect_, [])
2981
2981
  })())
2982
- : ff_compiler_Parser.Parser_parseLambda(self_, ff_core_List.List_size(signature_.parameters_), false, false));
2982
+ : ff_compiler_Parser.Parser_parseLambda(self_, signature_.parameters_.length, false, false));
2983
2983
  functions_.array.push(ff_compiler_Syntax.DFunction(signature_.at_, signature_, ff_compiler_Syntax.FireflyTarget(body_)));
2984
2984
  if(self_.lspHook_.trackSymbols_) {
2985
2985
  ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseSymbolEnd(signature_.name_, ff_compiler_LspHook.SFunction(false), signature_.at_, (((_c) => {
@@ -3001,7 +3001,7 @@ return ff_compiler_Parser.Parser_parseBinary(self_, 0)
3001
3001
  }
3002
3002
 
3003
3003
  export async function Parser_parseBinary$(self_, level_, $task) {
3004
- if((level_ >= ff_core_List.List_size(ff_compiler_Parser.binaryOperators_))) {
3004
+ if((level_ >= ff_compiler_Parser.binaryOperators_.length)) {
3005
3005
  return ff_compiler_Parser.Parser_parseUnary(self_)
3006
3006
  } else {
3007
3007
  const operators_ = (ff_compiler_Parser.binaryOperators_[level_] ?? ff_core_List.internalGrab_(ff_compiler_Parser.binaryOperators_, level_));
@@ -3115,7 +3115,7 @@ const _1 = ff_core_List.List_indexWhere(arguments_.first_, ((_w1) => {
3115
3115
  return (!ff_core_Option.Option_isEmpty(_w1.name_))
3116
3116
  }));
3117
3117
  if(_1.None) {
3118
- const target_ = ff_compiler_Syntax.DynamicCall(ff_compiler_Syntax.EField(ff_compiler_Token.Token_at(token_), false, record_, ("new" + ff_core_List.List_size(arguments_.first_))), false);
3118
+ const target_ = ff_compiler_Syntax.DynamicCall(ff_compiler_Syntax.EField(ff_compiler_Token.Token_at(token_), false, record_, ("new" + arguments_.first_.length)), false);
3119
3119
  return ff_compiler_Syntax.ECall(record_.at_, target_, effect_, [], arguments_.first_, [])
3120
3120
  }
3121
3121
  if(_1.Some && _1.value_ === 0) {
@@ -3133,13 +3133,13 @@ return result_
3133
3133
  }
3134
3134
  if(_1.Some) {
3135
3135
  const i_ = _1.value_;
3136
- throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(ff_core_List.List_grab(arguments_.first_, i_).at_, "Unexpected named argument"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
3136
+ throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError((arguments_.first_[i_] ?? ff_core_List.internalGrab_(arguments_.first_, i_)).at_, "Unexpected named argument"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
3137
3137
  }
3138
3138
  }
3139
3139
  } else if(ff_compiler_Token.Token_rawIs(ff_compiler_Parser.Parser_current(self_), "{")) {
3140
3140
  const lambda_ = ff_compiler_Parser.Parser_parseLambda(self_, 0, false, false);
3141
3141
  const effect_ = ff_compiler_Parser.Parser_freshUnificationVariable(self_, record_.at_);
3142
- const arguments_ = ff_core_List.List_size(ff_core_List.List_grabFirst(lambda_.cases_).patterns_);
3142
+ const arguments_ = ff_core_List.List_grabFirst(lambda_.cases_).patterns_.length;
3143
3143
  const target_ = ff_compiler_Syntax.DynamicCall(ff_compiler_Syntax.EField(ff_compiler_Token.Token_at(token_), false, record_, ("function" + arguments_)), false);
3144
3144
  return ff_compiler_Syntax.ECall(record_.at_, target_, effect_, [], [ff_compiler_Syntax.Argument(lambda_.at_, ff_core_Option.None(), ff_compiler_Syntax.ELambda(lambda_.at_, lambda_))], [])
3145
3145
  } else {
@@ -3159,7 +3159,7 @@ return (!ff_core_Option.Option_isEmpty(_w1.name_))
3159
3159
  throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(argument_.at_, "Unexpected named argument"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
3160
3160
  }));
3161
3161
  const effect_ = ff_compiler_Parser.Parser_freshUnificationVariable(self_, record_.at_);
3162
- const target_ = ff_compiler_Syntax.DynamicCall(ff_compiler_Syntax.EField(ff_compiler_Token.Token_at(token_), false, record_, ("call" + ff_core_List.List_size(arguments_.first_))), false);
3162
+ const target_ = ff_compiler_Syntax.DynamicCall(ff_compiler_Syntax.EField(ff_compiler_Token.Token_at(token_), false, record_, ("call" + arguments_.first_.length)), false);
3163
3163
  return ff_compiler_Syntax.ECall(record_.at_, target_, effect_, [], [ff_compiler_Syntax.Argument(member_.at_, ff_core_Option.None(), member_), ...arguments_.first_], [])
3164
3164
  } else if(ff_compiler_Token.Token_is3(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LAssign(), ff_compiler_Token.LAssignPlus(), ff_compiler_Token.LAssignMinus())) {
3165
3165
  const method_ = (ff_compiler_Token.Token_is(ff_compiler_Parser.Parser_current(self_), ff_compiler_Token.LAssign())
@@ -3283,7 +3283,7 @@ const field_ = (((!ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_)) || ff_
3283
3283
  : ff_compiler_Syntax.Field(ff_compiler_Token.Token_at(fieldToken_), ff_compiler_Token.Token_raw(fieldToken_), ff_compiler_Syntax.EVariable(ff_compiler_Token.Token_at(fieldToken_), ff_compiler_Token.Token_raw(fieldToken_))));
3284
3284
  if((ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_) && (!self_.lspEmittedArgumentHook_))) {
3285
3285
  if(ff_compiler_LspHook.strictlyBetween_(startAt_, ff_compiler_Token.Token_at(ff_compiler_Parser.Parser_current(self_)), self_.lspHook_.at_, 1)) {
3286
- ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(startAt_, ff_core_Array.Array_size(fields_), ff_core_Option.Option_filter(ff_core_Option.Some(field_.name_), ((_w1) => {
3286
+ ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(startAt_, fields_.array.length, ff_core_Option.Option_filter(ff_core_Option.Some(field_.name_), ((_w1) => {
3287
3287
  return (_w1 !== "")
3288
3288
  }))));
3289
3289
  self_.lspEmittedArgumentHook_ = true
@@ -3296,7 +3296,7 @@ ff_compiler_Parser.Parser_skipSeparator(self_, ff_compiler_Token.LComma())
3296
3296
  };
3297
3297
  if((ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_) && (!self_.lspEmittedArgumentHook_))) {
3298
3298
  if(ff_compiler_LspHook.strictlyBetween_(startAt_, ff_compiler_Token.Token_at(ff_compiler_Parser.Parser_current(self_)), self_.lspHook_.at_, 1)) {
3299
- ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(startAt_, ff_core_Array.Array_size(fields_), ff_core_Option.None()));
3299
+ ff_compiler_LspHook.LspHook_emit(self_.lspHook_, ff_compiler_LspHook.ParseArgumentHook(startAt_, fields_.array.length, ff_core_Option.None()));
3300
3300
  self_.lspEmittedArgumentHook_ = true
3301
3301
  }
3302
3302
  };
@@ -157,7 +157,7 @@ const vs_ = _1.second_;
157
157
  return ((f_ + " could be ") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(ff_core_Set.Set_toList(vs_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)))
158
158
  }
159
159
  }));
160
- if((ff_core_List.List_size(remaining_) !== 0)) {
160
+ if((remaining_.length !== 0)) {
161
161
  ff_core_Core.panic_(("Unexhaustive match:\n" + ff_core_List.List_join(remaining_, "\n")))
162
162
  }
163
163
  return
@@ -270,7 +270,7 @@ const converted_ = ff_compiler_Patterns.convert_(modules_, cases_);
270
270
  ff_core_Try.Try_else(ff_core_Core.try_((() => {
271
271
  ff_compiler_Patterns.check_(ff_core_List.List_toMap([], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), [], converted_, false, false)
272
272
  })), (() => {
273
- throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(ff_core_List.List_grab(cases_, 0).at_, "Unexhaustive match"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
273
+ throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError((cases_[0] ?? ff_core_List.internalGrab_(cases_, 0)).at_, "Unexhaustive match"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
274
274
  }))
275
275
  }
276
276
 
@@ -327,7 +327,7 @@ const vs_ = _1.second_;
327
327
  return ((f_ + " could be ") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(ff_core_Set.Set_toList(vs_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)))
328
328
  }
329
329
  }));
330
- if((ff_core_List.List_size(remaining_) !== 0)) {
330
+ if((remaining_.length !== 0)) {
331
331
  ff_core_Core.panic_(("Unexhaustive match:\n" + ff_core_List.List_join(remaining_, "\n")))
332
332
  }
333
333
  return
@@ -440,7 +440,7 @@ const converted_ = ff_compiler_Patterns.convert_(modules_, cases_);
440
440
  ff_core_Try.Try_else(ff_core_Core.try_((() => {
441
441
  ff_compiler_Patterns.check_(ff_core_List.List_toMap([], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), [], converted_, false, false)
442
442
  })), (() => {
443
- throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(ff_core_List.List_grab(cases_, 0).at_, "Unexhaustive match"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
443
+ throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError((cases_[0] ?? ff_core_List.internalGrab_(cases_, 0)).at_, "Unexhaustive match"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
444
444
  }))
445
445
  }
446
446
 
@@ -136,7 +136,7 @@ if((((last_.stopLine_ === startLine_) && ff_compiler_Token.ff_core_Equal_Equal$f
136
136
  if((((completionLine_ === last_.startLine_) && (completionColumn_ >= ((1 + last_.startOffset_) - last_.startLineOffset_))) && (completionColumn_ <= ((1 + last_.stopOffset_) - last_.stopLineOffset_)))) {
137
137
  tokens_.array.push(ff_compiler_Token.Token(file_, code_, ff_compiler_Token.LSeparator(), startLine_, startLineOffset_, startLineOffset_, startLine_, startLineOffset_, startLineOffset_))
138
138
  } else {
139
- ff_core_Array.Array_modify(tokens_, (ff_core_Array.Array_size(tokens_) - 1), ((_w1) => {
139
+ ff_core_Array.Array_modify(tokens_, (tokens_.array.length - 1), ((_w1) => {
140
140
  {
141
141
  const _1 = _w1;
142
142
  {
@@ -383,7 +383,7 @@ if((((last_.stopLine_ === startLine_) && ff_compiler_Token.ff_core_Equal_Equal$f
383
383
  if((((completionLine_ === last_.startLine_) && (completionColumn_ >= ((1 + last_.startOffset_) - last_.startLineOffset_))) && (completionColumn_ <= ((1 + last_.stopOffset_) - last_.stopLineOffset_)))) {
384
384
  tokens_.array.push(ff_compiler_Token.Token(file_, code_, ff_compiler_Token.LSeparator(), startLine_, startLineOffset_, startLineOffset_, startLine_, startLineOffset_, startLineOffset_))
385
385
  } else {
386
- ff_core_Array.Array_modify(tokens_, (ff_core_Array.Array_size(tokens_) - 1), ((_w1) => {
386
+ ff_core_Array.Array_modify(tokens_, (tokens_.array.length - 1), ((_w1) => {
387
387
  {
388
388
  const _1 = _w1;
389
389
  {
@@ -426,7 +426,7 @@ const name1_ = t1_a.name_;
426
426
  const generics1_ = t1_a.generics_;
427
427
  const name2_ = t2_a.name_;
428
428
  const generics2_ = t2_a.generics_;
429
- if(((name1_ !== name2_) || (ff_core_List.List_size(generics1_) !== ff_core_List.List_size(generics2_)))) {
429
+ if(((name1_ !== name2_) || (generics1_.length !== generics2_.length))) {
430
430
  if((!self_.attemptFixes_)) {
431
431
  const t3_ = ff_compiler_Unification.Unification_substitute(self_, t1_);
432
432
  const t4_ = ff_compiler_Unification.Unification_substitute(self_, t2_);
@@ -803,7 +803,7 @@ const name1_ = t1_a.name_;
803
803
  const generics1_ = t1_a.generics_;
804
804
  const name2_ = t2_a.name_;
805
805
  const generics2_ = t2_a.generics_;
806
- if(((name1_ !== name2_) || (ff_core_List.List_size(generics1_) !== ff_core_List.List_size(generics2_)))) {
806
+ if(((name1_ !== name2_) || (generics1_.length !== generics2_.length))) {
807
807
  if((!self_.attemptFixes_)) {
808
808
  const t3_ = ff_compiler_Unification.Unification_substitute(self_, t1_);
809
809
  const t4_ = ff_compiler_Unification.Unification_substitute(self_, t2_);
@@ -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_))