@magnusopera/fscript 0.77.0 → 0.78.1

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 (85) hide show
  1. package/dist/FScript.Language/Ast.js +2 -2
  2. package/dist/FScript.Language/BuiltinFunctions.js +68 -67
  3. package/dist/FScript.Language/BuiltinSignatures.js +7 -7
  4. package/dist/FScript.Language/BuiltinTypes.js +3 -3
  5. package/dist/FScript.Language/Error.js +2 -2
  6. package/dist/FScript.Language/Eval.js +305 -213
  7. package/dist/FScript.Language/IncludeResolver.js +97 -79
  8. package/dist/FScript.Language/Interactive.js +149 -0
  9. package/dist/FScript.Language/Lexer.js +77 -77
  10. package/dist/FScript.Language/Parser.js +274 -272
  11. package/dist/FScript.Language/Pretty.js +4 -4
  12. package/dist/FScript.Language/Span.js +2 -2
  13. package/dist/FScript.Language/Token.js +59 -2
  14. package/dist/FScript.Language/TypeInfer.js +452 -348
  15. package/dist/FScript.Language/Types.js +22 -10
  16. package/dist/FScript.Language/Value.js +3 -2
  17. package/dist/Library.js +91 -79
  18. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Array.js +36 -35
  19. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Async.js +52 -23
  20. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/AsyncBuilder.js +23 -2
  21. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/BigInt.js +33 -32
  22. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/BitConverter.js +2 -2
  23. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/CHANGELOG.md +80 -1
  24. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Date.js +8 -15
  25. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/DateOffset.js +8 -17
  26. package/dist/fable_modules/fable-library-js.5.13.0/Directory.js +11 -0
  27. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Double.js +8 -2
  28. package/dist/fable_modules/fable-library-js.5.13.0/Environment.js +3 -0
  29. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Event.js +10 -1
  30. package/dist/fable_modules/fable-library-js.5.13.0/File.js +27 -0
  31. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/List.js +35 -21
  32. package/dist/fable_modules/fable-library-js.5.13.0/Long.js +38 -0
  33. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/MailboxProcessor.js +11 -5
  34. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Map.js +8 -4
  35. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/MutableMap.js +2 -2
  36. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/MutableSet.js +1 -1
  37. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Observable.js +5 -3
  38. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Option.js +1 -18
  39. package/dist/fable_modules/fable-library-js.5.13.0/Path.js +31 -0
  40. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Reflection.js +13 -3
  41. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/RegExp.js +53 -24
  42. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Seq.js +109 -22
  43. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Set.js +16 -3
  44. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/String.js +28 -1
  45. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/System.js +15 -9
  46. package/dist/fable_modules/fable-library-js.5.13.0/Task.js +27 -0
  47. package/dist/fable_modules/fable-library-js.5.13.0/TaskBuilder.js +72 -0
  48. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Types.js +12 -12
  49. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Util.js +15 -3
  50. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/package.json +1 -1
  51. package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/quotation.js +25 -8
  52. package/dist/fable_modules/project_cracked.json +1 -1
  53. package/package.json +1 -1
  54. package/dist/fable_modules/fable-library-js.5.2.0/Long.js +0 -47
  55. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Boolean.js +0 -0
  56. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Char.js +0 -0
  57. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Choice.js +0 -0
  58. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/CollectionUtil.js +0 -0
  59. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/ConditionalWeakTable.js +0 -0
  60. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/DateOnly.js +0 -0
  61. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Decimal.js +0 -0
  62. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Encoding.js +0 -0
  63. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/FSharp.Collections.js +0 -0
  64. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/FSharp.Core.CompilerServices.js +0 -0
  65. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/FSharp.Core.js +0 -0
  66. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Global.js +0 -0
  67. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Guid.js +0 -0
  68. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Int32.js +0 -0
  69. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/MapUtil.js +0 -0
  70. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Native.js +0 -0
  71. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Numeric.js +0 -0
  72. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/README.md +0 -0
  73. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Random.js +0 -0
  74. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Range.js +0 -0
  75. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Result.js +0 -0
  76. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Seq2.js +0 -0
  77. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/System.Collections.Generic.js +0 -0
  78. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/System.Text.js +0 -0
  79. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/TimeOnly.js +0 -0
  80. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/TimeSpan.js +0 -0
  81. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Timer.js +0 -0
  82. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Unicode.13.0.0.js +0 -0
  83. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/Uri.js +0 -0
  84. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/big.d.ts +0 -0
  85. /package/dist/fable_modules/{fable-library-js.5.2.0 → fable-library-js.5.13.0}/lib/big.js +0 -0
@@ -1,6 +1,6 @@
1
1
 
2
- import { Union, Record } from "../fable_modules/fable-library-js.5.2.0/Types.js";
3
- import { float64_type, int64_type, union_type, record_type, option_type, list_type, tuple_type, bool_type, string_type } from "../fable_modules/fable-library-js.5.2.0/Reflection.js";
2
+ import { Union, Record } from "../fable_modules/fable-library-js.5.13.0/Types.js";
3
+ import { float64_type, int64_type, union_type, record_type, option_type, list_type, tuple_type, bool_type, string_type } from "../fable_modules/fable-library-js.5.13.0/Reflection.js";
4
4
  import { Span_$reflection } from "./Span.js";
5
5
 
6
6
  export class TypeDef extends Record {
@@ -1,19 +1,19 @@
1
1
 
2
2
  import { Span, Position } from "./Span.js";
3
3
  import { EvalException, EvalError$ } from "./Error.js";
4
- import { FSharpMap__Remove, iterate as iterate_1, fold as fold_1, add, FSharpMap__Add, FSharpMap__ContainsKey, FSharpMap__TryFind, empty as empty_1, FSharpMap__get_Item, forAll, FSharpMap__get_Keys, FSharpMap__get_Count, tryFind } from "../fable_modules/fable-library-js.5.2.0/Map.js";
4
+ import { FSharpMap__Remove, iterate as iterate_1, fold as fold_1, add, FSharpMap__Add, FSharpMap__ContainsKey, FSharpMap__TryFind, empty as empty_1, FSharpMap__get_Item, forAll, FSharpMap__get_Keys, FSharpMap__get_Count, tryFind } from "../fable_modules/fable-library-js.5.13.0/Map.js";
5
5
  import { builtinSchemes } from "./BuiltinSignatures.js";
6
- import { equals as equals_1, compare, comparePrimitives, Exception } from "../fable_modules/fable-library-js.5.2.0/Util.js";
7
- import { endsWith, split, join, substring, replace, format, concat } from "../fable_modules/fable-library-js.5.2.0/String.js";
8
- import { tryParse } from "../fable_modules/fable-library-js.5.2.0/Long.js";
9
- import { FSharpRef } from "../fable_modules/fable-library-js.5.2.0/Types.js";
10
- import { tryParse as tryParse_1 } from "../fable_modules/fable-library-js.5.2.0/Double.js";
11
- import { append, tryHead, tryFindIndex, tryFind as tryFind_1, filter, collect, choose, iterate, ofArray, map, exists, fold, forAll2, length as length_1, empty, reverse, cons, tail as tail_1, head as head_1, isEmpty } from "../fable_modules/fable-library-js.5.2.0/List.js";
6
+ import { equals as equals_1, compare, comparePrimitives, Exception } from "../fable_modules/fable-library-js.5.13.0/Util.js";
7
+ import { endsWith, split, join, substring, indexOf, replace, format, concat } from "../fable_modules/fable-library-js.5.13.0/String.js";
8
+ import { tryParse } from "../fable_modules/fable-library-js.5.13.0/Long.js";
9
+ import { FSharpRef } from "../fable_modules/fable-library-js.5.13.0/Types.js";
10
+ import { tryParse as tryParse_1 } from "../fable_modules/fable-library-js.5.13.0/Double.js";
11
+ import { append, tryHead, tryFindIndex, tryFind as tryFind_1, filter, collect, choose, iterate, ofArray, map, exists, fold, forAll2, length as length_1, empty, reverse, cons, tail as tail_1, head as head_1, isEmpty } from "../fable_modules/fable-library-js.5.13.0/List.js";
12
12
  import { ExternalFunction, Value as Value_1, MapKey } from "./Value.js";
13
- import { compare as compare_1, op_Addition, toInt32_unchecked, fromInt32, toInt64_unchecked, equals } from "../fable_modules/fable-library-js.5.2.0/BigInt.js";
14
- import { ofSeq } from "../fable_modules/fable-library-js.5.2.0/Set.js";
15
- import { tryParse as tryParse_2 } from "../fable_modules/fable-library-js.5.2.0/Boolean.js";
16
- import { some, map as map_1 } from "../fable_modules/fable-library-js.5.2.0/Option.js";
13
+ import { compare as compare_1, op_Addition, toInt32_unchecked, fromInt32, toInt64_unchecked, equals } from "../fable_modules/fable-library-js.5.13.0/BigInt.js";
14
+ import { ofSeq } from "../fable_modules/fable-library-js.5.13.0/Set.js";
15
+ import { tryParse as tryParse_2 } from "../fable_modules/fable-library-js.5.13.0/Boolean.js";
16
+ import { some } from "../fable_modules/fable-library-js.5.13.0/Option.js";
17
17
 
18
18
  const unknownSpan = new Span(new Position(undefined, 0, 0), new Position(undefined, 0, 0));
19
19
 
@@ -196,7 +196,7 @@ function expectList(functionName, args) {
196
196
 
197
197
  function asStringKey(functionName, value) {
198
198
  if (value.tag === 4) {
199
- return new MapKey(0, [value.fields[0]]);
199
+ return new MapKey(/* MKString */ 0, [value.fields[0]]);
200
200
  }
201
201
  else {
202
202
  return fail(`${functionName} expects string key`);
@@ -229,10 +229,10 @@ function asStringList(functionName, values) {
229
229
 
230
230
  function mapKeyToValue(key) {
231
231
  if (key.tag === 1) {
232
- return new Value_1(1, [key.fields[0]]);
232
+ return new Value_1(/* VInt */ 1, [key.fields[0]]);
233
233
  }
234
234
  else {
235
- return new Value_1(4, [key.fields[0]]);
235
+ return new Value_1(/* VString */ 4, [key.fields[0]]);
236
236
  }
237
237
  }
238
238
 
@@ -505,16 +505,16 @@ function distinctValues(values) {
505
505
  }, empty(), values));
506
506
  }
507
507
 
508
- const builtinIgnore = new ExternalFunction("ignore", scheme("ignore"), (_arg, _arg_1) => (new Value_1(0, [])), 1);
508
+ const builtinIgnore = new ExternalFunction("ignore", scheme("ignore"), (_arg, _arg_1) => Value_1.VUnit, 1);
509
509
 
510
510
  const builtinIntTryParse = new ExternalFunction("Int.tryParse", scheme("Int.tryParse"), (_arg, args) => {
511
511
  const matchValue = tryParseInt64(expectString("Int.tryParse", args));
512
- return (matchValue == null) ? (new Value_1(9, [undefined])) : (new Value_1(9, [new Value_1(1, [matchValue])]));
512
+ return (matchValue == null) ? (new Value_1(/* VOption */ 9, [undefined])) : (new Value_1(/* VOption */ 9, [new Value_1(/* VInt */ 1, [matchValue])]));
513
513
  }, 1);
514
514
 
515
515
  const builtinFloatTryParse = new ExternalFunction("Float.tryParse", scheme("Float.tryParse"), (_arg, args) => {
516
516
  const matchValue = tryParseDouble(expectString("Float.tryParse", args));
517
- return (matchValue == null) ? (new Value_1(9, [undefined])) : (new Value_1(9, [new Value_1(2, [matchValue])]));
517
+ return (matchValue == null) ? (new Value_1(/* VOption */ 9, [undefined])) : (new Value_1(/* VOption */ 9, [new Value_1(/* VFloat */ 2, [matchValue])]));
518
518
  }, 1);
519
519
 
520
520
  const builtinBoolTryParse = new ExternalFunction("Bool.tryParse", scheme("Bool.tryParse"), (_arg, args) => {
@@ -523,10 +523,10 @@ const builtinBoolTryParse = new ExternalFunction("Bool.tryParse", scheme("Bool.t
523
523
  matchValue = [tryParse_2(expectString("Bool.tryParse", args), new FSharpRef(() => outArg, (v) => {
524
524
  outArg = v;
525
525
  })), outArg];
526
- return matchValue[0] ? (new Value_1(9, [new Value_1(3, [matchValue[1]])])) : (new Value_1(9, [undefined]));
526
+ return matchValue[0] ? (new Value_1(/* VOption */ 9, [new Value_1(/* VBool */ 3, [matchValue[1]])])) : (new Value_1(/* VOption */ 9, [undefined]));
527
527
  }, 1);
528
528
 
529
- const builtinIntToString = new ExternalFunction("Int.toString", scheme("Int.toString"), (_arg, args) => (new Value_1(4, [String(expectInt("Int.toString", args))])), 1);
529
+ const builtinIntToString = new ExternalFunction("Int.toString", scheme("Int.toString"), (_arg, args) => (new Value_1(/* VString */ 4, [String(expectInt("Int.toString", args))])), 1);
530
530
 
531
531
  const builtinFloatToString = new ExternalFunction("Float.toString", scheme("Float.toString"), (_arg, args) => {
532
532
  let matchResult, value;
@@ -549,13 +549,13 @@ const builtinFloatToString = new ExternalFunction("Float.toString", scheme("Floa
549
549
  }
550
550
  switch (matchResult) {
551
551
  case 0:
552
- return new Value_1(4, [format('{0:' + "G17" + '}', value)]);
552
+ return new Value_1(/* VString */ 4, [format('{0:' + "G17" + '}', value)]);
553
553
  default:
554
554
  return fail("Float.toString expects (float)");
555
555
  }
556
556
  }, 1);
557
557
 
558
- const builtinBoolToString = new ExternalFunction("Bool.toString", scheme("Bool.toString"), (_arg, args) => (new Value_1(4, [expectBool("Bool.toString", args) ? "true" : "false"])), 1);
558
+ const builtinBoolToString = new ExternalFunction("Bool.toString", scheme("Bool.toString"), (_arg, args) => (new Value_1(/* VString */ 4, [expectBool("Bool.toString", args) ? "true" : "false"])), 1);
559
559
 
560
560
  const builtinStringReplace = new ExternalFunction("String.replace", scheme("String.replace"), (_arg, args) => {
561
561
  let matchResult, newValue, oldValue, source;
@@ -600,7 +600,7 @@ const builtinStringReplace = new ExternalFunction("String.replace", scheme("Stri
600
600
  }
601
601
  switch (matchResult) {
602
602
  case 0:
603
- return new Value_1(4, [replace(source, oldValue, newValue)]);
603
+ return new Value_1(/* VString */ 4, [replace(source, oldValue, newValue)]);
604
604
  default:
605
605
  return fail("String.replace expects (string, string, string)");
606
606
  }
@@ -638,8 +638,8 @@ const builtinStringIndexOf = new ExternalFunction("String.indexOf", scheme("Stri
638
638
  }
639
639
  switch (matchResult) {
640
640
  case 0: {
641
- const index = source.indexOf(value) | 0;
642
- return (index >= 0) ? (new Value_1(9, [new Value_1(1, [toInt64_unchecked(fromInt32(index))])])) : (new Value_1(9, [undefined]));
641
+ const index = indexOf(source, value, 4) | 0;
642
+ return (index >= 0) ? (new Value_1(/* VOption */ 9, [new Value_1(/* VInt */ 1, [toInt64_unchecked(fromInt32(index))])])) : (new Value_1(/* VOption */ 9, [undefined]));
643
643
  }
644
644
  default:
645
645
  return fail("String.indexOf expects (string, string)");
@@ -648,12 +648,12 @@ const builtinStringIndexOf = new ExternalFunction("String.indexOf", scheme("Stri
648
648
 
649
649
  const builtinStringToLower = new ExternalFunction("String.toLower", scheme("String.toLower"), (_arg, args) => {
650
650
  const source = expectString("String.toLower", args);
651
- return new Value_1(4, [source.toLowerCase()]);
651
+ return new Value_1(/* VString */ 4, [source.toLowerCase()]);
652
652
  }, 1);
653
653
 
654
654
  const builtinStringToUpper = new ExternalFunction("String.toUpper", scheme("String.toUpper"), (_arg, args) => {
655
655
  const source = expectString("String.toUpper", args);
656
- return new Value_1(4, [source.toUpperCase()]);
656
+ return new Value_1(/* VString */ 4, [source.toUpperCase()]);
657
657
  }, 1);
658
658
 
659
659
  const builtinStringSubstring = new ExternalFunction("String.substring", scheme("String.substring"), (_arg, args) => {
@@ -701,7 +701,7 @@ const builtinStringSubstring = new ExternalFunction("String.substring", scheme("
701
701
  case 0: {
702
702
  const startIndex = ~~toInt32_unchecked(start) | 0;
703
703
  const sliceLength = ~~toInt32_unchecked(length) | 0;
704
- return ((((startIndex < 0) ? true : (sliceLength < 0)) ? true : (startIndex > source.length)) ? true : ((startIndex + sliceLength) > source.length)) ? (new Value_1(9, [undefined])) : (new Value_1(9, [new Value_1(4, [substring(source, startIndex, sliceLength)])]));
704
+ return ((((startIndex < 0) ? true : (sliceLength < 0)) ? true : (startIndex > source.length)) ? true : ((startIndex + sliceLength) > source.length)) ? (new Value_1(/* VOption */ 9, [undefined])) : (new Value_1(/* VOption */ 9, [new Value_1(/* VString */ 4, [substring(source, startIndex, sliceLength)])]));
705
705
  }
706
706
  default:
707
707
  return fail("String.substring expects (string, int, int)");
@@ -740,7 +740,7 @@ const builtinStringConcat = new ExternalFunction("String.concat", scheme("String
740
740
  }
741
741
  switch (matchResult) {
742
742
  case 0:
743
- return new Value_1(4, [join(separator, asStringList("String.concat", values))]);
743
+ return new Value_1(/* VString */ 4, [join(separator, asStringList("String.concat", values))]);
744
744
  default:
745
745
  return fail("String.concat expects (string, string list)");
746
746
  }
@@ -778,7 +778,7 @@ const builtinStringSplit = new ExternalFunction("String.split", scheme("String.s
778
778
  }
779
779
  switch (matchResult) {
780
780
  case 0:
781
- return new Value_1(5, [map((Item) => (new Value_1(4, [Item])), ofArray(split(source, [separator], undefined, 0)))]);
781
+ return new Value_1(/* VList */ 5, [map((Item) => (new Value_1(/* VString */ 4, [Item])), ofArray(split(source, [separator], undefined, 0)))]);
782
782
  default:
783
783
  return fail("String.split expects (string, string)");
784
784
  }
@@ -816,13 +816,13 @@ const builtinStringEndsWith = new ExternalFunction("String.endsWith", scheme("St
816
816
  }
817
817
  switch (matchResult) {
818
818
  case 0:
819
- return new Value_1(3, [endsWith(source, suffix, 4)]);
819
+ return new Value_1(/* VBool */ 3, [endsWith(source, suffix, 4)]);
820
820
  default:
821
821
  return fail("String.endsWith expects (string, string)");
822
822
  }
823
823
  }, 2);
824
824
 
825
- const builtinListEmpty = new ExternalFunction("List.empty", scheme("List.empty"), (_arg, _arg_1) => (new Value_1(5, [empty()])), 0);
825
+ const builtinListEmpty = new ExternalFunction("List.empty", scheme("List.empty"), (_arg, _arg_1) => (new Value_1(/* VList */ 5, [empty()])), 0);
826
826
 
827
827
  const builtinListMap = new ExternalFunction("List.map", scheme("List.map"), (ctx, args) => {
828
828
  let matchResult, mapper, values;
@@ -851,7 +851,7 @@ const builtinListMap = new ExternalFunction("List.map", scheme("List.map"), (ctx
851
851
  }
852
852
  switch (matchResult) {
853
853
  case 0:
854
- return new Value_1(5, [map((value) => ctx.Apply(mapper, value), values)]);
854
+ return new Value_1(/* VList */ 5, [map((value) => ctx.Apply(mapper, value), values)]);
855
855
  default:
856
856
  return fail("List.map expects (mapper, values)");
857
857
  }
@@ -887,7 +887,7 @@ const builtinListIter = new ExternalFunction("List.iter", scheme("List.iter"), (
887
887
  iterate((value) => {
888
888
  ctx.Apply(iterator, value);
889
889
  }, values);
890
- return new Value_1(0, []);
890
+ return Value_1.VUnit;
891
891
  }
892
892
  default:
893
893
  return fail("List.iter expects (iterator, values)");
@@ -921,7 +921,7 @@ const builtinListChoose = new ExternalFunction("List.choose", scheme("List.choos
921
921
  }
922
922
  switch (matchResult) {
923
923
  case 0:
924
- return new Value_1(5, [choose((value) => {
924
+ return new Value_1(/* VList */ 5, [choose((value) => {
925
925
  const matchValue = ctx.Apply(chooser, value);
926
926
  if (matchValue.tag === 9) {
927
927
  return matchValue.fields[0];
@@ -962,7 +962,7 @@ const builtinListCollect = new ExternalFunction("List.collect", scheme("List.col
962
962
  }
963
963
  switch (matchResult) {
964
964
  case 0:
965
- return new Value_1(5, [collect((value) => {
965
+ return new Value_1(/* VList */ 5, [collect((value) => {
966
966
  const matchValue = ctx.Apply(collector, value);
967
967
  if (matchValue.tag === 5) {
968
968
  return matchValue.fields[0];
@@ -1003,7 +1003,7 @@ const builtinListExists = new ExternalFunction("List.exists", scheme("List.exist
1003
1003
  }
1004
1004
  switch (matchResult) {
1005
1005
  case 0:
1006
- return new Value_1(3, [exists((value) => {
1006
+ return new Value_1(/* VBool */ 3, [exists((value) => {
1007
1007
  const matchValue = ctx.Apply(predicate, value);
1008
1008
  if (matchValue.tag === 3) {
1009
1009
  return matchValue.fields[0];
@@ -1044,7 +1044,7 @@ const builtinListContains = new ExternalFunction("List.contains", scheme("List.c
1044
1044
  }
1045
1045
  switch (matchResult) {
1046
1046
  case 0:
1047
- return new Value_1(3, [exists((value) => {
1047
+ return new Value_1(/* VBool */ 3, [exists((value) => {
1048
1048
  let matchResult_1, x, y, x_1, y_1, x_2, y_2, x_3, y_3;
1049
1049
  switch (value.tag) {
1050
1050
  case 0: {
@@ -1123,9 +1123,9 @@ const builtinListContains = new ExternalFunction("List.contains", scheme("List.c
1123
1123
  }
1124
1124
  }, 2);
1125
1125
 
1126
- const builtinListRev = new ExternalFunction("List.rev", scheme("List.rev"), (_arg, args) => (new Value_1(5, [reverse(expectList("List.rev", args))])), 1);
1126
+ const builtinListRev = new ExternalFunction("List.rev", scheme("List.rev"), (_arg, args) => (new Value_1(/* VList */ 5, [reverse(expectList("List.rev", args))])), 1);
1127
1127
 
1128
- const builtinListDistinct = new ExternalFunction("List.distinct", scheme("List.distinct"), (_arg, args) => (new Value_1(5, [distinctValues(expectList("List.distinct", args))])), 1);
1128
+ const builtinListDistinct = new ExternalFunction("List.distinct", scheme("List.distinct"), (_arg, args) => (new Value_1(/* VList */ 5, [distinctValues(expectList("List.distinct", args))])), 1);
1129
1129
 
1130
1130
  const builtinListFold = new ExternalFunction("List.fold", scheme("List.fold"), (ctx, args) => {
1131
1131
  let matchResult, folder, state, values;
@@ -1193,7 +1193,7 @@ const builtinListFilter = new ExternalFunction("List.filter", scheme("List.filte
1193
1193
  }
1194
1194
  switch (matchResult) {
1195
1195
  case 0:
1196
- return new Value_1(5, [filter((value) => {
1196
+ return new Value_1(/* VList */ 5, [filter((value) => {
1197
1197
  const matchValue = ctx.Apply(predicate, value);
1198
1198
  if (matchValue.tag === 3) {
1199
1199
  return matchValue.fields[0];
@@ -1207,7 +1207,7 @@ const builtinListFilter = new ExternalFunction("List.filter", scheme("List.filte
1207
1207
  }
1208
1208
  }, 2);
1209
1209
 
1210
- const builtinListLength = new ExternalFunction("List.length", scheme("List.length"), (_arg, args) => (new Value_1(1, [toInt64_unchecked(fromInt32(length_1(expectList("List.length", args))))])), 1);
1210
+ const builtinListLength = new ExternalFunction("List.length", scheme("List.length"), (_arg, args) => (new Value_1(/* VInt */ 1, [toInt64_unchecked(fromInt32(length_1(expectList("List.length", args))))])), 1);
1211
1211
 
1212
1212
  const builtinListTryFind = new ExternalFunction("List.tryFind", scheme("List.tryFind"), (ctx, args) => {
1213
1213
  let matchResult, predicate, values;
@@ -1236,7 +1236,7 @@ const builtinListTryFind = new ExternalFunction("List.tryFind", scheme("List.try
1236
1236
  }
1237
1237
  switch (matchResult) {
1238
1238
  case 0:
1239
- return new Value_1(9, [tryFind_1((value) => {
1239
+ return new Value_1(/* VOption */ 9, [tryFind_1((value) => {
1240
1240
  const matchValue = ctx.Apply(predicate, value);
1241
1241
  if (matchValue.tag === 3) {
1242
1242
  return matchValue.fields[0];
@@ -1251,6 +1251,7 @@ const builtinListTryFind = new ExternalFunction("List.tryFind", scheme("List.try
1251
1251
  }, 2);
1252
1252
 
1253
1253
  const builtinListTryGet = new ExternalFunction("List.tryGet", scheme("List.tryGet"), (ctx, args) => {
1254
+ let option_1;
1254
1255
  let matchResult, predicate, values;
1255
1256
  if (!isEmpty(args)) {
1256
1257
  if (!isEmpty(tail_1(args))) {
@@ -1277,7 +1278,7 @@ const builtinListTryGet = new ExternalFunction("List.tryGet", scheme("List.tryGe
1277
1278
  }
1278
1279
  switch (matchResult) {
1279
1280
  case 0:
1280
- return new Value_1(9, [map_1((arg) => (new Value_1(1, [toInt64_unchecked(fromInt32(arg))])), tryFindIndex((value) => {
1281
+ return new Value_1(/* VOption */ 9, [(option_1 = tryFindIndex((value) => {
1281
1282
  const matchValue = ctx.Apply(predicate, value);
1282
1283
  if (matchValue.tag === 3) {
1283
1284
  return matchValue.fields[0];
@@ -1285,7 +1286,7 @@ const builtinListTryGet = new ExternalFunction("List.tryGet", scheme("List.tryGe
1285
1286
  else {
1286
1287
  return fail("List.tryGet predicate must return bool");
1287
1288
  }
1288
- }, values))]);
1289
+ }, values), (option_1 != null) ? (new Value_1(/* VInt */ 1, [toInt64_unchecked(fromInt32(option_1))])) : undefined)]);
1289
1290
  default:
1290
1291
  return fail("List.tryGet expects (predicate, values)");
1291
1292
  }
@@ -1343,18 +1344,18 @@ const builtinListTryItem = new ExternalFunction("List.tryItem", scheme("List.try
1343
1344
  break;
1344
1345
  }
1345
1346
  };
1346
- return (compare_1(index, 0n) < 0) ? (new Value_1(9, [undefined])) : (new Value_1(9, [loop(values, 0n)]));
1347
+ return (compare_1(index, 0n) < 0) ? (new Value_1(/* VOption */ 9, [undefined])) : (new Value_1(/* VOption */ 9, [loop(values, 0n)]));
1347
1348
  }
1348
1349
  default:
1349
1350
  return fail("List.tryItem expects (index, values)");
1350
1351
  }
1351
1352
  }, 2);
1352
1353
 
1353
- const builtinListTryHead = new ExternalFunction("List.tryHead", scheme("List.tryHead"), (_arg, args) => (new Value_1(9, [tryHead(expectList("List.tryHead", args))])), 1);
1354
+ const builtinListTryHead = new ExternalFunction("List.tryHead", scheme("List.tryHead"), (_arg, args) => (new Value_1(/* VOption */ 9, [tryHead(expectList("List.tryHead", args))])), 1);
1354
1355
 
1355
1356
  const builtinListTail = new ExternalFunction("List.tail", scheme("List.tail"), (_arg, args) => {
1356
1357
  const matchValue = expectList("List.tail", args);
1357
- return !isEmpty(matchValue) ? (new Value_1(5, [tail_1(matchValue)])) : fail("List.tail expects a non-empty list");
1358
+ return !isEmpty(matchValue) ? (new Value_1(/* VList */ 5, [tail_1(matchValue)])) : fail("List.tail expects a non-empty list");
1358
1359
  }, 1);
1359
1360
 
1360
1361
  const builtinListAppend = new ExternalFunction("List.append", scheme("List.append"), (_arg, args) => {
@@ -1389,7 +1390,7 @@ const builtinListAppend = new ExternalFunction("List.append", scheme("List.appen
1389
1390
  }
1390
1391
  switch (matchResult) {
1391
1392
  case 0:
1392
- return new Value_1(5, [append(left, right)]);
1393
+ return new Value_1(/* VList */ 5, [append(left, right)]);
1393
1394
  default:
1394
1395
  return fail("List.append expects (left, right)");
1395
1396
  }
@@ -1477,7 +1478,7 @@ const builtinOptionDefaultWith = new ExternalFunction("Option.defaultWith", sche
1477
1478
  case 0:
1478
1479
  return current;
1479
1480
  case 1:
1480
- return ctx.Apply(fallback_1, new Value_1(0, []));
1481
+ return ctx.Apply(fallback_1, Value_1.VUnit);
1481
1482
  default:
1482
1483
  return fail("Option.defaultWith expects (fallback, value)");
1483
1484
  }
@@ -1511,9 +1512,9 @@ const builtinOptionIsNone = new ExternalFunction("Option.isNone", scheme("Option
1511
1512
  }
1512
1513
  switch (matchResult) {
1513
1514
  case 0:
1514
- return new Value_1(3, [true]);
1515
+ return new Value_1(/* VBool */ 3, [true]);
1515
1516
  case 1:
1516
- return new Value_1(3, [false]);
1517
+ return new Value_1(/* VBool */ 3, [false]);
1517
1518
  default:
1518
1519
  return fail("Option.isNone expects (value)");
1519
1520
  }
@@ -1547,9 +1548,9 @@ const builtinOptionIsSome = new ExternalFunction("Option.isSome", scheme("Option
1547
1548
  }
1548
1549
  switch (matchResult) {
1549
1550
  case 0:
1550
- return new Value_1(3, [false]);
1551
+ return new Value_1(/* VBool */ 3, [false]);
1551
1552
  case 1:
1552
- return new Value_1(3, [true]);
1553
+ return new Value_1(/* VBool */ 3, [true]);
1553
1554
  default:
1554
1555
  return fail("Option.isSome expects (value)");
1555
1556
  }
@@ -1590,15 +1591,15 @@ const builtinOptionMap = new ExternalFunction("Option.map", scheme("Option.map")
1590
1591
  }
1591
1592
  switch (matchResult) {
1592
1593
  case 0:
1593
- return new Value_1(9, [ctx.Apply(mapper, current)]);
1594
+ return new Value_1(/* VOption */ 9, [ctx.Apply(mapper, current)]);
1594
1595
  case 1:
1595
- return new Value_1(9, [undefined]);
1596
+ return new Value_1(/* VOption */ 9, [undefined]);
1596
1597
  default:
1597
1598
  return fail("Option.map expects (mapper, value)");
1598
1599
  }
1599
1600
  }, 2);
1600
1601
 
1601
- const builtinMapEmpty = new ExternalFunction("Map.empty", scheme("Map.empty"), (_arg, _arg_1) => (new Value_1(8, [empty_1({
1602
+ const builtinMapEmpty = new ExternalFunction("Map.empty", scheme("Map.empty"), (_arg, _arg_1) => (new Value_1(/* VMap */ 8, [empty_1({
1602
1603
  Compare: (x, y) => (compare(x, y) | 0),
1603
1604
  })])), 0);
1604
1605
 
@@ -1634,7 +1635,7 @@ const builtinMapTryGet = new ExternalFunction("Map.tryGet", scheme("Map.tryGet")
1634
1635
  }
1635
1636
  switch (matchResult) {
1636
1637
  case 0:
1637
- return new Value_1(9, [FSharpMap__TryFind(values, new MapKey(0, [key]))]);
1638
+ return new Value_1(/* VOption */ 9, [FSharpMap__TryFind(values, new MapKey(/* MKString */ 0, [key]))]);
1638
1639
  default:
1639
1640
  return fail("Map.tryGet expects (key, values)");
1640
1641
  }
@@ -1672,7 +1673,7 @@ const builtinMapContainsKey = new ExternalFunction("Map.containsKey", scheme("Ma
1672
1673
  }
1673
1674
  switch (matchResult) {
1674
1675
  case 0:
1675
- return new Value_1(3, [FSharpMap__ContainsKey(values, new MapKey(0, [key]))]);
1676
+ return new Value_1(/* VBool */ 3, [FSharpMap__ContainsKey(values, new MapKey(/* MKString */ 0, [key]))]);
1676
1677
  default:
1677
1678
  return fail("Map.containsKey expects (key, values)");
1678
1679
  }
@@ -1716,7 +1717,7 @@ const builtinMapAdd = new ExternalFunction("Map.add", scheme("Map.add"), (_arg,
1716
1717
  }
1717
1718
  switch (matchResult) {
1718
1719
  case 0:
1719
- return new Value_1(8, [FSharpMap__Add(values, new MapKey(0, [key]), value)]);
1720
+ return new Value_1(/* VMap */ 8, [FSharpMap__Add(values, new MapKey(/* MKString */ 0, [key]), value)]);
1720
1721
  default:
1721
1722
  return fail("Map.add expects (key, value, values)");
1722
1723
  }
@@ -1743,7 +1744,7 @@ const builtinMapOfList = new ExternalFunction("Map.ofList", scheme("Map.ofList")
1743
1744
  }
1744
1745
  switch (matchResult) {
1745
1746
  case 0:
1746
- return new Value_1(8, [fold((state, entry) => {
1747
+ return new Value_1(/* VMap */ 8, [fold((state, entry) => {
1747
1748
  let matchResult_1, key, value;
1748
1749
  if (entry.tag === 6) {
1749
1750
  if (!isEmpty(entry.fields[0])) {
@@ -1775,7 +1776,7 @@ const builtinMapOfList = new ExternalFunction("Map.ofList", scheme("Map.ofList")
1775
1776
  }
1776
1777
  switch (matchResult_1) {
1777
1778
  case 0:
1778
- return add(new MapKey(0, [key]), value, state);
1779
+ return add(new MapKey(/* MKString */ 0, [key]), value, state);
1779
1780
  default:
1780
1781
  return fail("Map.ofList expects [(string * value)]");
1781
1782
  }
@@ -1826,7 +1827,7 @@ const builtinMapFold = new ExternalFunction("Map.fold", scheme("Map.fold"), (ctx
1826
1827
  }
1827
1828
  }, 3);
1828
1829
 
1829
- const builtinMapCount = new ExternalFunction("Map.count", scheme("Map.count"), (_arg, args) => (new Value_1(1, [toInt64_unchecked(fromInt32(FSharpMap__get_Count(expectMap("Map.count", args))))])), 1);
1830
+ const builtinMapCount = new ExternalFunction("Map.count", scheme("Map.count"), (_arg, args) => (new Value_1(/* VInt */ 1, [toInt64_unchecked(fromInt32(FSharpMap__get_Count(expectMap("Map.count", args))))])), 1);
1830
1831
 
1831
1832
  const builtinMapFilter = new ExternalFunction("Map.filter", scheme("Map.filter"), (ctx, args) => {
1832
1833
  let matchResult, predicate, values;
@@ -1855,7 +1856,7 @@ const builtinMapFilter = new ExternalFunction("Map.filter", scheme("Map.filter")
1855
1856
  }
1856
1857
  switch (matchResult) {
1857
1858
  case 0:
1858
- return new Value_1(8, [fold_1((acc, key, value) => {
1859
+ return new Value_1(/* VMap */ 8, [fold_1((acc, key, value) => {
1859
1860
  const matchValue = ctx.Apply(ctx.Apply(predicate, mapKeyToValue(key)), value);
1860
1861
  if (matchValue.tag === 3) {
1861
1862
  if (matchValue.fields[0]) {
@@ -1903,7 +1904,7 @@ const builtinMapChoose = new ExternalFunction("Map.choose", scheme("Map.choose")
1903
1904
  }
1904
1905
  switch (matchResult) {
1905
1906
  case 0:
1906
- return new Value_1(8, [fold_1((acc, key, value) => {
1907
+ return new Value_1(/* VMap */ 8, [fold_1((acc, key, value) => {
1907
1908
  const matchValue = ctx.Apply(ctx.Apply(chooser, mapKeyToValue(key)), value);
1908
1909
  if (matchValue.tag === 9) {
1909
1910
  if (matchValue.fields[0] == null) {
@@ -1952,7 +1953,7 @@ const builtinMapMap = new ExternalFunction("Map.map", scheme("Map.map"), (ctx, a
1952
1953
  }
1953
1954
  switch (matchResult) {
1954
1955
  case 0:
1955
- return new Value_1(8, [fold_1((acc, key, value) => add(key, ctx.Apply(mapper, value), acc), empty_1({
1956
+ return new Value_1(/* VMap */ 8, [fold_1((acc, key, value) => add(key, ctx.Apply(mapper, value), acc), empty_1({
1956
1957
  Compare: (x, y) => (compare(x, y) | 0),
1957
1958
  }), values)]);
1958
1959
  default:
@@ -1990,7 +1991,7 @@ const builtinMapIter = new ExternalFunction("Map.iter", scheme("Map.iter"), (ctx
1990
1991
  iterate_1((key, value) => {
1991
1992
  ctx.Apply(ctx.Apply(iterator, mapKeyToValue(key)), value);
1992
1993
  }, values);
1993
- return new Value_1(0, []);
1994
+ return Value_1.VUnit;
1994
1995
  }
1995
1996
  default:
1996
1997
  return fail("Map.iter expects (iterator, values)");
@@ -2029,7 +2030,7 @@ const builtinMapRemove = new ExternalFunction("Map.remove", scheme("Map.remove")
2029
2030
  }
2030
2031
  switch (matchResult) {
2031
2032
  case 0:
2032
- return new Value_1(8, [FSharpMap__Remove(values, new MapKey(0, [key]))]);
2033
+ return new Value_1(/* VMap */ 8, [FSharpMap__Remove(values, new MapKey(/* MKString */ 0, [key]))]);
2033
2034
  default:
2034
2035
  return fail("Map.remove expects (key, values)");
2035
2036
  }
@@ -1,13 +1,13 @@
1
1
 
2
- import { keys, ofList } from "../fable_modules/fable-library-js.5.2.0/Map.js";
3
- import { ofArray, empty, singleton } from "../fable_modules/fable-library-js.5.2.0/List.js";
2
+ import { keys, ofList } from "../fable_modules/fable-library-js.5.13.0/Map.js";
3
+ import { ofArray, empty, singleton } from "../fable_modules/fable-library-js.5.13.0/List.js";
4
4
  import { Scheme, Type } from "./Types.js";
5
- import { comparePrimitives } from "../fable_modules/fable-library-js.5.2.0/Util.js";
6
- import { ofSeq } from "../fable_modules/fable-library-js.5.2.0/Set.js";
7
- import { filter } from "../fable_modules/fable-library-js.5.2.0/Seq.js";
8
- import { startsWith } from "../fable_modules/fable-library-js.5.2.0/String.js";
5
+ import { comparePrimitives } from "../fable_modules/fable-library-js.5.13.0/Util.js";
6
+ import { ofSeq } from "../fable_modules/fable-library-js.5.13.0/Set.js";
7
+ import { filter } from "../fable_modules/fable-library-js.5.13.0/Seq.js";
8
+ import { startsWith } from "../fable_modules/fable-library-js.5.13.0/String.js";
9
9
 
10
- export const builtinSchemes = ofList(ofArray([["ignore", new Scheme(singleton(0), new Type(11, [new Type(15, [0]), new Type(0, [])]))], ["Int.tryParse", new Scheme(empty(), new Type(11, [new Type(4, []), new Type(10, [new Type(1, [])])]))], ["Float.tryParse", new Scheme(empty(), new Type(11, [new Type(4, []), new Type(10, [new Type(2, [])])]))], ["Bool.tryParse", new Scheme(empty(), new Type(11, [new Type(4, []), new Type(10, [new Type(3, [])])]))], ["Int.toString", new Scheme(empty(), new Type(11, [new Type(1, []), new Type(4, [])]))], ["Float.toString", new Scheme(empty(), new Type(11, [new Type(2, []), new Type(4, [])]))], ["Bool.toString", new Scheme(empty(), new Type(11, [new Type(3, []), new Type(4, [])]))], ["String.replace", new Scheme(empty(), new Type(11, [new Type(4, []), new Type(11, [new Type(4, []), new Type(11, [new Type(4, []), new Type(4, [])])])]))], ["String.indexOf", new Scheme(empty(), new Type(11, [new Type(4, []), new Type(11, [new Type(4, []), new Type(10, [new Type(1, [])])])]))], ["String.toLower", new Scheme(empty(), new Type(11, [new Type(4, []), new Type(4, [])]))], ["String.toUpper", new Scheme(empty(), new Type(11, [new Type(4, []), new Type(4, [])]))], ["String.substring", new Scheme(empty(), new Type(11, [new Type(1, []), new Type(11, [new Type(1, []), new Type(11, [new Type(4, []), new Type(10, [new Type(4, [])])])])]))], ["String.concat", new Scheme(empty(), new Type(11, [new Type(4, []), new Type(11, [new Type(5, [new Type(4, [])]), new Type(4, [])])]))], ["String.split", new Scheme(empty(), new Type(11, [new Type(4, []), new Type(11, [new Type(4, []), new Type(5, [new Type(4, [])])])]))], ["String.endsWith", new Scheme(empty(), new Type(11, [new Type(4, []), new Type(11, [new Type(4, []), new Type(3, [])])]))], ["List.empty", new Scheme(singleton(0), new Type(5, [new Type(15, [0])]))], ["List.map", new Scheme(ofArray([0, 1]), new Type(11, [new Type(11, [new Type(15, [0]), new Type(15, [1])]), new Type(11, [new Type(5, [new Type(15, [0])]), new Type(5, [new Type(15, [1])])])]))], ["List.iter", new Scheme(singleton(0), new Type(11, [new Type(11, [new Type(15, [0]), new Type(0, [])]), new Type(11, [new Type(5, [new Type(15, [0])]), new Type(0, [])])]))], ["List.choose", new Scheme(ofArray([0, 1]), new Type(11, [new Type(11, [new Type(15, [0]), new Type(10, [new Type(15, [1])])]), new Type(11, [new Type(5, [new Type(15, [0])]), new Type(5, [new Type(15, [1])])])]))], ["List.collect", new Scheme(ofArray([0, 1]), new Type(11, [new Type(11, [new Type(15, [0]), new Type(5, [new Type(15, [1])])]), new Type(11, [new Type(5, [new Type(15, [0])]), new Type(5, [new Type(15, [1])])])]))], ["List.exists", new Scheme(singleton(0), new Type(11, [new Type(11, [new Type(15, [0]), new Type(3, [])]), new Type(11, [new Type(5, [new Type(15, [0])]), new Type(3, [])])]))], ["List.contains", new Scheme(singleton(0), new Type(11, [new Type(15, [0]), new Type(11, [new Type(5, [new Type(15, [0])]), new Type(3, [])])]))], ["List.rev", new Scheme(singleton(0), new Type(11, [new Type(5, [new Type(15, [0])]), new Type(5, [new Type(15, [0])])]))], ["List.distinct", new Scheme(singleton(0), new Type(11, [new Type(5, [new Type(15, [0])]), new Type(5, [new Type(15, [0])])]))], ["List.fold", new Scheme(ofArray([0, 1]), new Type(11, [new Type(11, [new Type(15, [1]), new Type(11, [new Type(15, [0]), new Type(15, [1])])]), new Type(11, [new Type(15, [1]), new Type(11, [new Type(5, [new Type(15, [0])]), new Type(15, [1])])])]))], ["List.filter", new Scheme(singleton(0), new Type(11, [new Type(11, [new Type(15, [0]), new Type(3, [])]), new Type(11, [new Type(5, [new Type(15, [0])]), new Type(5, [new Type(15, [0])])])]))], ["List.length", new Scheme(singleton(0), new Type(11, [new Type(5, [new Type(15, [0])]), new Type(1, [])]))], ["List.tryFind", new Scheme(singleton(0), new Type(11, [new Type(11, [new Type(15, [0]), new Type(3, [])]), new Type(11, [new Type(5, [new Type(15, [0])]), new Type(10, [new Type(15, [0])])])]))], ["List.tryGet", new Scheme(singleton(0), new Type(11, [new Type(11, [new Type(15, [0]), new Type(3, [])]), new Type(11, [new Type(5, [new Type(15, [0])]), new Type(10, [new Type(1, [])])])]))], ["List.tryItem", new Scheme(singleton(0), new Type(11, [new Type(1, []), new Type(11, [new Type(5, [new Type(15, [0])]), new Type(10, [new Type(15, [0])])])]))], ["List.tryHead", new Scheme(singleton(0), new Type(11, [new Type(5, [new Type(15, [0])]), new Type(10, [new Type(15, [0])])]))], ["List.tail", new Scheme(singleton(0), new Type(11, [new Type(5, [new Type(15, [0])]), new Type(5, [new Type(15, [0])])]))], ["List.append", new Scheme(singleton(0), new Type(11, [new Type(5, [new Type(15, [0])]), new Type(11, [new Type(5, [new Type(15, [0])]), new Type(5, [new Type(15, [0])])])]))], ["Option.defaultValue", new Scheme(singleton(0), new Type(11, [new Type(15, [0]), new Type(11, [new Type(10, [new Type(15, [0])]), new Type(15, [0])])]))], ["Option.defaultWith", new Scheme(singleton(0), new Type(11, [new Type(11, [new Type(0, []), new Type(15, [0])]), new Type(11, [new Type(10, [new Type(15, [0])]), new Type(15, [0])])]))], ["Option.isNone", new Scheme(singleton(0), new Type(11, [new Type(10, [new Type(15, [0])]), new Type(3, [])]))], ["Option.isSome", new Scheme(singleton(0), new Type(11, [new Type(10, [new Type(15, [0])]), new Type(3, [])]))], ["Option.map", new Scheme(ofArray([0, 1]), new Type(11, [new Type(11, [new Type(15, [0]), new Type(15, [1])]), new Type(11, [new Type(10, [new Type(15, [0])]), new Type(10, [new Type(15, [1])])])]))], ["Map.empty", new Scheme(singleton(0), new Type(9, [new Type(4, []), new Type(15, [0])]))], ["Map.tryGet", new Scheme(singleton(0), new Type(11, [new Type(4, []), new Type(11, [new Type(9, [new Type(4, []), new Type(15, [0])]), new Type(10, [new Type(15, [0])])])]))], ["Map.containsKey", new Scheme(singleton(0), new Type(11, [new Type(4, []), new Type(11, [new Type(9, [new Type(4, []), new Type(15, [0])]), new Type(3, [])])]))], ["Map.add", new Scheme(singleton(0), new Type(11, [new Type(4, []), new Type(11, [new Type(15, [0]), new Type(11, [new Type(9, [new Type(4, []), new Type(15, [0])]), new Type(9, [new Type(4, []), new Type(15, [0])])])])]))], ["Map.ofList", new Scheme(singleton(0), new Type(11, [new Type(5, [new Type(7, [ofArray([new Type(4, []), new Type(15, [0])])])]), new Type(9, [new Type(4, []), new Type(15, [0])])]))], ["Map.fold", new Scheme(ofArray([0, 1]), new Type(11, [new Type(11, [new Type(15, [1]), new Type(11, [new Type(4, []), new Type(11, [new Type(15, [0]), new Type(15, [1])])])]), new Type(11, [new Type(15, [1]), new Type(11, [new Type(9, [new Type(4, []), new Type(15, [0])]), new Type(15, [1])])])]))], ["Map.count", new Scheme(singleton(0), new Type(11, [new Type(9, [new Type(4, []), new Type(15, [0])]), new Type(1, [])]))], ["Map.filter", new Scheme(singleton(0), new Type(11, [new Type(11, [new Type(4, []), new Type(11, [new Type(15, [0]), new Type(3, [])])]), new Type(11, [new Type(9, [new Type(4, []), new Type(15, [0])]), new Type(9, [new Type(4, []), new Type(15, [0])])])]))], ["Map.choose", new Scheme(ofArray([0, 1]), new Type(11, [new Type(11, [new Type(4, []), new Type(11, [new Type(15, [0]), new Type(10, [new Type(15, [1])])])]), new Type(11, [new Type(9, [new Type(4, []), new Type(15, [0])]), new Type(9, [new Type(4, []), new Type(15, [1])])])]))], ["Map.map", new Scheme(ofArray([0, 1]), new Type(11, [new Type(11, [new Type(15, [0]), new Type(15, [1])]), new Type(11, [new Type(9, [new Type(4, []), new Type(15, [0])]), new Type(9, [new Type(4, []), new Type(15, [1])])])]))], ["Map.iter", new Scheme(singleton(0), new Type(11, [new Type(11, [new Type(4, []), new Type(11, [new Type(15, [0]), new Type(0, [])])]), new Type(11, [new Type(9, [new Type(4, []), new Type(15, [0])]), new Type(0, [])])]))], ["Map.remove", new Scheme(singleton(0), new Type(11, [new Type(4, []), new Type(11, [new Type(9, [new Type(4, []), new Type(15, [0])]), new Type(9, [new Type(4, []), new Type(15, [0])])])]))]]), {
10
+ export const builtinSchemes = ofList(ofArray([["ignore", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), Type.TUnit]))], ["Int.tryParse", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, new Type(/* TOption */ 10, [Type.TInt])]))], ["Float.tryParse", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, new Type(/* TOption */ 10, [Type.TFloat])]))], ["Bool.tryParse", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, new Type(/* TOption */ 10, [Type.TBool])]))], ["Int.toString", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TInt, Type.TString]))], ["Float.toString", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TFloat, Type.TString]))], ["Bool.toString", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TBool, Type.TString]))], ["String.replace", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, new Type(/* TFun */ 11, [Type.TString, new Type(/* TFun */ 11, [Type.TString, Type.TString])])]))], ["String.indexOf", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, new Type(/* TFun */ 11, [Type.TString, new Type(/* TOption */ 10, [Type.TInt])])]))], ["String.toLower", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, Type.TString]))], ["String.toUpper", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, Type.TString]))], ["String.substring", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TInt, new Type(/* TFun */ 11, [Type.TInt, new Type(/* TFun */ 11, [Type.TString, new Type(/* TOption */ 10, [Type.TString])])])]))], ["String.concat", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, new Type(/* TFun */ 11, [new Type(/* TList */ 5, [Type.TString]), Type.TString])]))], ["String.split", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, new Type(/* TFun */ 11, [Type.TString, new Type(/* TList */ 5, [Type.TString])])]))], ["String.endsWith", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, new Type(/* TFun */ 11, [Type.TString, Type.TBool])]))], ["List.empty", new Scheme(singleton(0), new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]))], ["List.map", new Scheme(ofArray([0, 1]), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), new Type(/* TVar */ 15, [1])]), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TList */ 5, [new Type(/* TVar */ 15, [1])])])]))], ["List.iter", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), Type.TUnit]), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), Type.TUnit])]))], ["List.choose", new Scheme(ofArray([0, 1]), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), new Type(/* TOption */ 10, [new Type(/* TVar */ 15, [1])])]), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TList */ 5, [new Type(/* TVar */ 15, [1])])])]))], ["List.collect", new Scheme(ofArray([0, 1]), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), new Type(/* TList */ 5, [new Type(/* TVar */ 15, [1])])]), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TList */ 5, [new Type(/* TVar */ 15, [1])])])]))], ["List.exists", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), Type.TBool]), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), Type.TBool])]))], ["List.contains", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), Type.TBool])]))], ["List.rev", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])])]))], ["List.distinct", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])])]))], ["List.fold", new Scheme(ofArray([0, 1]), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [1]), new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), new Type(/* TVar */ 15, [1])])]), new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [1]), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TVar */ 15, [1])])])]))], ["List.filter", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), Type.TBool]), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])])])]))], ["List.length", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), Type.TInt]))], ["List.tryFind", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), Type.TBool]), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TOption */ 10, [new Type(/* TVar */ 15, [0])])])]))], ["List.tryGet", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), Type.TBool]), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TOption */ 10, [Type.TInt])])]))], ["List.tryItem", new Scheme(singleton(0), new Type(/* TFun */ 11, [Type.TInt, new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TOption */ 10, [new Type(/* TVar */ 15, [0])])])]))], ["List.tryHead", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TOption */ 10, [new Type(/* TVar */ 15, [0])])]))], ["List.tail", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])])]))], ["List.append", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])])])]))], ["Option.defaultValue", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), new Type(/* TFun */ 11, [new Type(/* TOption */ 10, [new Type(/* TVar */ 15, [0])]), new Type(/* TVar */ 15, [0])])]))], ["Option.defaultWith", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [Type.TUnit, new Type(/* TVar */ 15, [0])]), new Type(/* TFun */ 11, [new Type(/* TOption */ 10, [new Type(/* TVar */ 15, [0])]), new Type(/* TVar */ 15, [0])])]))], ["Option.isNone", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TOption */ 10, [new Type(/* TVar */ 15, [0])]), Type.TBool]))], ["Option.isSome", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TOption */ 10, [new Type(/* TVar */ 15, [0])]), Type.TBool]))], ["Option.map", new Scheme(ofArray([0, 1]), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), new Type(/* TVar */ 15, [1])]), new Type(/* TFun */ 11, [new Type(/* TOption */ 10, [new Type(/* TVar */ 15, [0])]), new Type(/* TOption */ 10, [new Type(/* TVar */ 15, [1])])])]))], ["Map.empty", new Scheme(singleton(0), new Type(/* TMap */ 9, [Type.TString, new Type(/* TVar */ 15, [0])]))], ["Map.tryGet", new Scheme(singleton(0), new Type(/* TFun */ 11, [Type.TString, new Type(/* TFun */ 11, [new Type(/* TMap */ 9, [Type.TString, new Type(/* TVar */ 15, [0])]), new Type(/* TOption */ 10, [new Type(/* TVar */ 15, [0])])])]))], ["Map.containsKey", new Scheme(singleton(0), new Type(/* TFun */ 11, [Type.TString, new Type(/* TFun */ 11, [new Type(/* TMap */ 9, [Type.TString, new Type(/* TVar */ 15, [0])]), Type.TBool])]))], ["Map.add", new Scheme(singleton(0), new Type(/* TFun */ 11, [Type.TString, new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), new Type(/* TFun */ 11, [new Type(/* TMap */ 9, [Type.TString, new Type(/* TVar */ 15, [0])]), new Type(/* TMap */ 9, [Type.TString, new Type(/* TVar */ 15, [0])])])])]))], ["Map.ofList", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TTuple */ 7, [ofArray([Type.TString, new Type(/* TVar */ 15, [0])])])]), new Type(/* TMap */ 9, [Type.TString, new Type(/* TVar */ 15, [0])])]))], ["Map.fold", new Scheme(ofArray([0, 1]), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [1]), new Type(/* TFun */ 11, [Type.TString, new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), new Type(/* TVar */ 15, [1])])])]), new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [1]), new Type(/* TFun */ 11, [new Type(/* TMap */ 9, [Type.TString, new Type(/* TVar */ 15, [0])]), new Type(/* TVar */ 15, [1])])])]))], ["Map.count", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TMap */ 9, [Type.TString, new Type(/* TVar */ 15, [0])]), Type.TInt]))], ["Map.filter", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [Type.TString, new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), Type.TBool])]), new Type(/* TFun */ 11, [new Type(/* TMap */ 9, [Type.TString, new Type(/* TVar */ 15, [0])]), new Type(/* TMap */ 9, [Type.TString, new Type(/* TVar */ 15, [0])])])]))], ["Map.choose", new Scheme(ofArray([0, 1]), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [Type.TString, new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), new Type(/* TOption */ 10, [new Type(/* TVar */ 15, [1])])])]), new Type(/* TFun */ 11, [new Type(/* TMap */ 9, [Type.TString, new Type(/* TVar */ 15, [0])]), new Type(/* TMap */ 9, [Type.TString, new Type(/* TVar */ 15, [1])])])]))], ["Map.map", new Scheme(ofArray([0, 1]), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), new Type(/* TVar */ 15, [1])]), new Type(/* TFun */ 11, [new Type(/* TMap */ 9, [Type.TString, new Type(/* TVar */ 15, [0])]), new Type(/* TMap */ 9, [Type.TString, new Type(/* TVar */ 15, [1])])])]))], ["Map.iter", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [Type.TString, new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), Type.TUnit])]), new Type(/* TFun */ 11, [new Type(/* TMap */ 9, [Type.TString, new Type(/* TVar */ 15, [0])]), Type.TUnit])]))], ["Map.remove", new Scheme(singleton(0), new Type(/* TFun */ 11, [Type.TString, new Type(/* TFun */ 11, [new Type(/* TMap */ 9, [Type.TString, new Type(/* TVar */ 15, [0])]), new Type(/* TMap */ 9, [Type.TString, new Type(/* TVar */ 15, [0])])])]))]]), {
11
11
  Compare: (x, y) => (comparePrimitives(x, y) | 0),
12
12
  });
13
13
 
@@ -1,13 +1,13 @@
1
1
 
2
2
  import { Span, Position } from "./Span.js";
3
3
  import { TypeDef, TypeRef } from "./Ast.js";
4
- import { empty, ofArray } from "../fable_modules/fable-library-js.5.2.0/List.js";
4
+ import { empty, ofArray } from "../fable_modules/fable-library-js.5.13.0/List.js";
5
5
 
6
6
  const unknownSpan = new Span(new Position(undefined, 0, 0), new Position(undefined, 0, 0));
7
7
 
8
- export const environmentType = new TypeDef("Environment", false, ofArray([["ScriptName", new TypeRef(3, [new TypeRef(0, ["string"]), "option"])], ["Arguments", new TypeRef(3, [new TypeRef(0, ["string"]), "list"])]]), empty(), unknownSpan);
8
+ export const environmentType = new TypeDef("Environment", false, ofArray([["ScriptName", new TypeRef(/* TRPostfix */ 3, [new TypeRef(/* TRName */ 0, ["string"]), "option"])], ["Arguments", new TypeRef(/* TRPostfix */ 3, [new TypeRef(/* TRName */ 0, ["string"]), "list"])]]), empty(), unknownSpan);
9
9
 
10
- export const fsKindType = new TypeDef("FsKind", false, empty(), ofArray([["File", new TypeRef(0, ["string"])], ["Directory", new TypeRef(0, ["string"])], ["Missing", undefined]]), unknownSpan);
10
+ export const fsKindType = new TypeDef("FsKind", false, empty(), ofArray([["File", new TypeRef(/* TRName */ 0, ["string"])], ["Directory", new TypeRef(/* TRName */ 0, ["string"])], ["Missing", undefined]]), unknownSpan);
11
11
 
12
12
  export const typeDefs = ofArray([environmentType, fsKindType]);
13
13
 
@@ -1,6 +1,6 @@
1
1
 
2
- import { FSharpException, Record } from "../fable_modules/fable-library-js.5.2.0/Types.js";
3
- import { class_type, record_type, string_type } from "../fable_modules/fable-library-js.5.2.0/Reflection.js";
2
+ import { FSharpException, Record } from "../fable_modules/fable-library-js.5.13.0/Types.js";
3
+ import { class_type, record_type, string_type } from "../fable_modules/fable-library-js.5.13.0/Reflection.js";
4
4
  import { Span_$reflection } from "./Span.js";
5
5
 
6
6
  export class ParseError extends Record {