@magnusopera/fscript 0.88.0 → 0.90.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 (101) hide show
  1. package/README.md +15 -0
  2. package/dist/FScript.Language/Ast.js +2 -2
  3. package/dist/FScript.Language/BuiltinFunctions.js +61 -68
  4. package/dist/FScript.Language/BuiltinSignatures.js +6 -6
  5. package/dist/FScript.Language/BuiltinTypes.js +1 -1
  6. package/dist/FScript.Language/Error.js +2 -2
  7. package/dist/FScript.Language/Eval.js +176 -127
  8. package/dist/FScript.Language/Execution.js +8 -7
  9. package/dist/FScript.Language/ExportSignatures.js +5 -5
  10. package/dist/FScript.Language/HostInterop.js +41 -11
  11. package/dist/FScript.Language/IncludeResolver.js +15 -19
  12. package/dist/FScript.Language/Interactive.js +9 -9
  13. package/dist/FScript.Language/Lexer.js +39 -39
  14. package/dist/FScript.Language/Parser.js +17 -17
  15. package/dist/FScript.Language/Pretty.js +5 -5
  16. package/dist/FScript.Language/Span.js +2 -2
  17. package/dist/FScript.Language/SupportCollections.js +34 -33
  18. package/dist/FScript.Language/SupportLibrary.js +21 -20
  19. package/dist/FScript.Language/TaskFunctions.js +51 -7
  20. package/dist/FScript.Language/TaskSharingAnalysis.js +310 -129
  21. package/dist/FScript.Language/Token.js +2 -2
  22. package/dist/FScript.Language/TypeInfer.js +21 -25
  23. package/dist/FScript.Language/Types.js +9 -9
  24. package/dist/FScript.Language/Value.js +11 -8
  25. package/dist/Library.js +54 -28
  26. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Array.js +325 -198
  27. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/BigInt.js +18 -6
  28. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/CHANGELOG.md +64 -1
  29. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Date.js +1 -1
  30. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Decimal.js +33 -47
  31. package/dist/fable_modules/fable-library-js.5.27.0/Double.js +78 -0
  32. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/FSharp.Core.js +7 -1
  33. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Global.js +1 -1
  34. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Int32.js +10 -1
  35. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/List.js +230 -157
  36. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Long.js +7 -2
  37. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Map.js +46 -39
  38. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/MutableMap.js +76 -96
  39. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/MutableSet.js +58 -80
  40. package/dist/fable_modules/fable-library-js.5.27.0/NumberStyles.js +56 -0
  41. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Numeric.js +72 -4
  42. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Random.js +26 -17
  43. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Range.js +4 -3
  44. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Reflection.js +7 -1
  45. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/RegExp.js +3 -2
  46. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Seq.js +149 -70
  47. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Seq2.js +4 -8
  48. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Set.js +66 -59
  49. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/String.js +160 -39
  50. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/System.Collections.Generic.js +3 -2
  51. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/System.Text.js +10 -10
  52. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/System.js +5 -5
  53. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/TimeOnly.js +1 -1
  54. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Types.js +28 -10
  55. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Util.js +151 -54
  56. package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/package.json +1 -1
  57. package/dist/fable_modules/project_cracked.json +1 -1
  58. package/package.json +1 -1
  59. package/dist/fable_modules/fable-library-js.5.24.0/Double.js +0 -53
  60. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Async.js +0 -0
  61. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/AsyncBuilder.js +0 -0
  62. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/BitConverter.js +0 -0
  63. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Boolean.js +0 -0
  64. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Char.js +0 -0
  65. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Choice.js +0 -0
  66. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/CollectionUtil.js +0 -0
  67. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/ConditionalWeakTable.js +0 -0
  68. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/DateOffset.js +0 -0
  69. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/DateOnly.js +0 -0
  70. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/DateOnlyTemporal.js +0 -0
  71. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/DateTimeFormat.js +0 -0
  72. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/DateTimeOffsetTemporal.js +0 -0
  73. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/DateTimeTemporal.js +0 -0
  74. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Directory.js +0 -0
  75. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Encoding.js +0 -0
  76. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Environment.js +0 -0
  77. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Event.js +0 -0
  78. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/FSharp.Collections.js +0 -0
  79. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/FSharp.Core.CompilerServices.js +0 -0
  80. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/File.js +0 -0
  81. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Guid.js +0 -0
  82. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/MailboxProcessor.js +0 -0
  83. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/MapUtil.js +0 -0
  84. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Native.js +0 -0
  85. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Observable.js +0 -0
  86. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Option.js +0 -0
  87. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Path.js +0 -0
  88. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/README.md +0 -0
  89. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Result.js +0 -0
  90. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Stopwatch.js +0 -0
  91. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Task.js +0 -0
  92. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/TaskBuilder.js +0 -0
  93. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/TimeOnlyTemporal.js +0 -0
  94. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/TimeSpan.js +0 -0
  95. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/TimeSpanTemporal.js +0 -0
  96. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Timer.js +0 -0
  97. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Unicode.13.0.0.js +0 -0
  98. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Uri.js +0 -0
  99. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/big.d.ts +0 -0
  100. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/lib/big.js +0 -0
  101. /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/quotation.js +0 -0
@@ -1,10 +1,11 @@
1
1
 
2
- import { Record, Union } from "../fable_modules/fable-library-js.5.24.0/Types.js";
3
- import { record_type, union_type, class_type, lambda_type, unit_type } from "../fable_modules/fable-library-js.5.24.0/Reflection.js";
4
- import { Exception, disposeSafe, getEnumerator, defaultOf } from "../fable_modules/fable-library-js.5.24.0/Util.js";
5
- import { FSharpChoice$2 } from "../fable_modules/fable-library-js.5.24.0/Choice.js";
6
- import { value as value_11, some, defaultArg } from "../fable_modules/fable-library-js.5.24.0/Option.js";
7
- import { cons, empty, singleton, ofSeq, ofArray, head as head_1, tail as tail_1, isEmpty } from "../fable_modules/fable-library-js.5.24.0/List.js";
2
+ import { Record, Union } from "../fable_modules/fable-library-js.5.27.0/Types.js";
3
+ import { record_type, union_type, class_type, lambda_type, unit_type } from "../fable_modules/fable-library-js.5.27.0/Reflection.js";
4
+ import { disposeSafe, getEnumerator, defaultOf } from "../fable_modules/fable-library-js.5.27.0/Util.js";
5
+ import { FSharpChoice$2 } from "../fable_modules/fable-library-js.5.27.0/Choice.js";
6
+ import { value as value_11, some, defaultArg } from "../fable_modules/fable-library-js.5.27.0/Option.js";
7
+ import { cons, empty, singleton, ofSeq, ofArray, head as head_1, tail as tail_1, isEmpty } from "../fable_modules/fable-library-js.5.27.0/List.js";
8
+ import { Operators_InvalidOp } from "../fable_modules/fable-library-js.5.27.0/FSharp.Core.js";
8
9
 
9
10
  /**
10
11
  * Continuations and exception scopes are data, rather than suspended CLR stacks.
@@ -493,7 +494,7 @@ export function Execution_run(body) {
493
494
  break;
494
495
  }
495
496
  default:
496
- throw new Exception("Execution completed without a result.");
497
+ throw Operators_InvalidOp("Execution completed without a result.");
497
498
  }
498
499
  }
499
500
  catch (error) {
@@ -1,10 +1,10 @@
1
1
 
2
- import { Record } from "../fable_modules/fable-library-js.5.24.0/Types.js";
3
- import { record_type, list_type, string_type } from "../fable_modules/fable-library-js.5.24.0/Reflection.js";
2
+ import { Record } from "../fable_modules/fable-library-js.5.27.0/Types.js";
3
+ import { record_type, list_type, string_type } from "../fable_modules/fable-library-js.5.27.0/Reflection.js";
4
4
  import { Type_$reflection } from "./Types.js";
5
- import { choose, singleton, collect, length, isEmpty, empty, reverse, cons } from "../fable_modules/fable-library-js.5.24.0/List.js";
6
- import { comparePrimitives, Exception } from "../fable_modules/fable-library-js.5.24.0/Util.js";
7
- import { ofList } from "../fable_modules/fable-library-js.5.24.0/Map.js";
5
+ import { choose, singleton, collect, length, isEmpty, empty, reverse, cons } from "../fable_modules/fable-library-js.5.27.0/List.js";
6
+ import { comparePrimitives, Exception } from "../fable_modules/fable-library-js.5.27.0/Util.js";
7
+ import { ofList } from "../fable_modules/fable-library-js.5.27.0/Map.js";
8
8
 
9
9
  export class ExportedFunctionSignature extends Record {
10
10
  constructor(Name, ParameterNames, ParameterTypes, ReturnType) {
@@ -1,17 +1,17 @@
1
1
 
2
2
  import { Span, Position } from "./Span.js";
3
3
  import { EvalException, EvalError$ } from "./Error.js";
4
- import { tail as tail_1, head, isEmpty as isEmpty_1, iterate2, iterate as iterate_1, tryFind as tryFind_1, forAll2, length, forAll as forAll_1, contains, map, ofArray, append, empty as empty_1 } from "../fable_modules/fable-library-js.5.24.0/List.js";
4
+ import { tail as tail_1, head, isEmpty as isEmpty_1, iterate2, iterate as iterate_1, tryFind as tryFind_1, forAll2, length, forAll as forAll_1, contains, map, append, filter, ofArray, choose, empty as empty_1 } from "../fable_modules/fable-library-js.5.27.0/List.js";
5
5
  import { Value, HostManagedValue, ExtensionRegistration } from "./Value.js";
6
+ import { concat, isNullOrWhiteSpace, join } from "../fable_modules/fable-library-js.5.27.0/String.js";
6
7
  import { typeDefs } from "./BuiltinTypes.js";
7
- import { FSharpMap__get_Item, iterate, map as map_1, FSharpMap__get_Count, FSharpMap__TryFind, tryFind, forAll, exists, FSharpMap__get_IsEmpty, FSharpMap__Add, containsKey, empty as empty_2 } from "../fable_modules/fable-library-js.5.24.0/Map.js";
8
- import { curry2, stringHash, disposeSafe, getEnumerator, comparePrimitives } from "../fable_modules/fable-library-js.5.24.0/Util.js";
9
- import { concat, isNullOrWhiteSpace } from "../fable_modules/fable-library-js.5.24.0/String.js";
8
+ import { FSharpMap__get_Item, iterate, map as map_1, FSharpMap__get_Count, FSharpMap__TryFind, tryFind, forAll, exists, FSharpMap__get_IsEmpty, FSharpMap__Add, containsKey, empty as empty_2 } from "../fable_modules/fable-library-js.5.27.0/Map.js";
9
+ import { curry2, stringHash, disposeSafe, getEnumerator, comparePrimitives } from "../fable_modules/fable-library-js.5.27.0/Util.js";
10
10
  import { Types_ftvType, Types_typeToString, Type } from "./Types.js";
11
- import { exists as exists_1 } from "../fable_modules/fable-library-js.5.24.0/Seq.js";
12
- import { value as value_4, toArray } from "../fable_modules/fable-library-js.5.24.0/Option.js";
13
- import { minElement, isEmpty } from "../fable_modules/fable-library-js.5.24.0/Set.js";
14
- import { min } from "../fable_modules/fable-library-js.5.24.0/Double.js";
11
+ import { exists as exists_1 } from "../fable_modules/fable-library-js.5.27.0/Seq.js";
12
+ import { value as value_4, toArray } from "../fable_modules/fable-library-js.5.27.0/Option.js";
13
+ import { minElement, isEmpty } from "../fable_modules/fable-library-js.5.27.0/Set.js";
14
+ import { min } from "../fable_modules/fable-library-js.5.27.0/Double.js";
15
15
 
16
16
  const span = new Span(new Position(undefined, 0, 0), new Position(undefined, 0, 0));
17
17
 
@@ -19,10 +19,37 @@ function fail(message) {
19
19
  throw new EvalException(new EvalError$(message, span));
20
20
  }
21
21
 
22
- export const empty = new ExtensionRegistration(empty_1(), empty_1(), empty_1());
22
+ export const empty = new ExtensionRegistration(0, empty_1(), empty_1(), empty_1());
23
23
 
24
24
  export function ofExterns(functions) {
25
- return new ExtensionRegistration(empty.Types, empty.Unions, functions);
25
+ return new ExtensionRegistration(empty.Permissions, empty.Types, empty.Unions, functions);
26
+ }
27
+
28
+ export function allows(granted, required) {
29
+ return (granted & required) === required;
30
+ }
31
+
32
+ export function permissionNames(permissions) {
33
+ return join(", ", choose((tupledArg) => {
34
+ if (allows(permissions, tupledArg[0])) {
35
+ return tupledArg[1];
36
+ }
37
+ else {
38
+ return undefined;
39
+ }
40
+ }, ofArray([[1, "Interactive"], [2, "Threading"], [4, "IO"], [8, "Native"]])));
41
+ }
42
+
43
+ export function withPermissions(permissions, registration) {
44
+ return new ExtensionRegistration(permissions, registration.Types, registration.Unions, registration.Functions);
45
+ }
46
+
47
+ export function ofExternsWithPermissions(permissions, functions) {
48
+ return withPermissions(permissions, ofExterns(functions));
49
+ }
50
+
51
+ export function permitted(registration) {
52
+ return new ExtensionRegistration(registration.Permissions, registration.Types, registration.Unions, filter((fn) => allows(registration.Permissions, fn.RequiredPermissions), registration.Functions));
26
53
  }
27
54
 
28
55
  export function typeDefinitions(registration, scriptNames) {
@@ -819,7 +846,10 @@ export function validateCall(definitions, signature, arguments$, action) {
819
846
  }
820
847
 
821
848
  export function invoke(definitions, externalFunction, context, arguments$) {
822
- return validateCall(definitions, externalFunction.Scheme.fields[1], arguments$, () => externalFunction.Impl(context, arguments$));
849
+ return validateCall(definitions, externalFunction.Scheme.fields[1], arguments$, () => {
850
+ context.CheckPermissions(externalFunction.RequiredPermissions);
851
+ return externalFunction.Impl(context, arguments$);
852
+ });
823
853
  }
824
854
 
825
855
  export function $007CRecordFields$007C_$007C(value) {
@@ -1,18 +1,18 @@
1
1
 
2
- import { printf, toText, isNullOrWhiteSpace, concat, endsWith, substring, split, join, trimEnd, startsWith, replace, isNullOrEmpty, compare } from "../fable_modules/fable-library-js.5.24.0/String.js";
3
- import { exists, choose, collect, append, map, ofArray, fold as fold_1, singleton, empty, tail as tail_2, cons, head as head_1, isEmpty, reverse } from "../fable_modules/fable-library-js.5.24.0/List.js";
4
- import { fold } from "../fable_modules/fable-library-js.5.24.0/Array.js";
2
+ import { printf, toText, getCharAtIndex, isNullOrWhiteSpace, concat, endsWith, substring, split, join, trimEnd, startsWith, replace, isNullOrEmpty, compare } from "../fable_modules/fable-library-js.5.27.0/String.js";
3
+ import { exists, choose, collect, append, map, ofArray, fold as fold_1, singleton, empty, tail as tail_2, cons, head as head_1, isEmpty, reverse } from "../fable_modules/fable-library-js.5.27.0/List.js";
4
+ import { fold } from "../fable_modules/fable-library-js.5.27.0/Array.js";
5
5
  import { ParseException, ParseError } from "./Error.js";
6
- import { isLetterOrDigit, isLetter } from "../fable_modules/fable-library-js.5.24.0/Char.js";
7
- import { map as map_1, toList as toList_1, fold as fold_2, forAll } from "../fable_modules/fable-library-js.5.24.0/Seq.js";
8
- import { union, toList, ofList, FSharpSet__Contains, empty as empty_1, add } from "../fable_modules/fable-library-js.5.24.0/Set.js";
9
- import { curry4, defaultOf, disposeSafe, getEnumerator, Exception, curry2, comparePrimitives } from "../fable_modules/fable-library-js.5.24.0/Util.js";
10
- import { ofSeq, empty as empty_2, add as add_1, FSharpMap__ContainsKey, FSharpMap__get_Item } from "../fable_modules/fable-library-js.5.24.0/Map.js";
6
+ import { isLetterOrDigit, isLetter } from "../fable_modules/fable-library-js.5.27.0/Char.js";
7
+ import { map as map_1, toList as toList_1, fold as fold_2, forAll } from "../fable_modules/fable-library-js.5.27.0/Seq.js";
8
+ import { union, toList, ofList, FSharpSet__Contains, empty as empty_1, add } from "../fable_modules/fable-library-js.5.27.0/Set.js";
9
+ import { curry4, defaultOf, disposeSafe, getEnumerator, Exception, curry2, comparePrimitives } from "../fable_modules/fable-library-js.5.27.0/Util.js";
10
+ import { ofSeq, empty as empty_2, add as add_1, FSharpMap__ContainsKey, FSharpMap__get_Item } from "../fable_modules/fable-library-js.5.27.0/Map.js";
11
11
  import { Stmt, TypeDef, InterpolatedPart, MapEntry, Param, Expr, Pattern, TypeRef } from "./Ast.js";
12
12
  import { parseProgramWithSourceName } from "./Parser.js";
13
- import { FSharpRef } from "../fable_modules/fable-library-js.5.24.0/Types.js";
13
+ import { FSharpRef } from "../fable_modules/fable-library-js.5.27.0/Types.js";
14
14
  import { Span, Position } from "./Span.js";
15
- import { addToSet, tryGetValue } from "../fable_modules/fable-library-js.5.24.0/MapUtil.js";
15
+ import { addToSet, tryGetValue } from "../fable_modules/fable-library-js.5.27.0/MapUtil.js";
16
16
 
17
17
  const pathComparison = 4;
18
18
 
@@ -183,7 +183,7 @@ function resolveImportPath(currentFile, importPath, rootDirectoryWithSeparator,
183
183
 
184
184
  function isValidAliasName(name) {
185
185
  let c;
186
- if (!isNullOrWhiteSpace(name) && ((c = name[0], isLetter(c) ? true : (c === "_")))) {
186
+ if (!isNullOrWhiteSpace(name) && ((c = getCharAtIndex(name, 0), isLetter(c) ? true : (c === "_")))) {
187
187
  return forAll((c_1) => {
188
188
  if (isLetterOrDigit(c_1)) {
189
189
  return true;
@@ -759,10 +759,8 @@ export function parseIncludedSource(sourceName, source) {
759
759
  return new Span(p, p);
760
760
  }, (path_1) => {
761
761
  let matchValue;
762
- let outArg = defaultOf();
763
- matchValue = [tryGetValue(pathPrefixes, path_1, new FSharpRef(() => outArg, (v) => {
764
- outArg = v;
765
- })), outArg];
762
+ const cell = new FSharpRef(defaultOf());
763
+ matchValue = [tryGetValue(pathPrefixes, path_1, cell), cell.contents];
766
764
  if (matchValue[0]) {
767
765
  return matchValue[1];
768
766
  }
@@ -817,10 +815,8 @@ function parseProgramFromSourceWithIncludesCore(rootDirectory, entryFile, entryS
817
815
  })() : matchValue_1))));
818
816
  return expandProgram(rootDirectoryWithSeparator, fileSpan, (path_1) => {
819
817
  let matchValue;
820
- let outArg = defaultOf();
821
- matchValue = [tryGetValue(pathPrefixes, path_1, new FSharpRef(() => outArg, (v) => {
822
- outArg = v;
823
- })), outArg];
818
+ const cell = new FSharpRef(defaultOf());
819
+ matchValue = [tryGetValue(pathPrefixes, path_1, cell), cell.contents];
824
820
  if (matchValue[0]) {
825
821
  return matchValue[1];
826
822
  }
@@ -1,16 +1,16 @@
1
1
 
2
- import { Record } from "../fable_modules/fable-library-js.5.24.0/Types.js";
2
+ import { Record } from "../fable_modules/fable-library-js.5.27.0/Types.js";
3
3
  import { ExtensionRegistration, ExternalFunction, Value, ExternalFunction_$reflection, ExtensionRegistration_$reflection } from "./Value.js";
4
4
  import { Stmt_$reflection } from "./Ast.js";
5
- import { int32_type, record_type, option_type, class_type, string_type, list_type } from "../fable_modules/fable-library-js.5.24.0/Reflection.js";
5
+ import { int32_type, record_type, option_type, class_type, string_type, list_type } from "../fable_modules/fable-library-js.5.27.0/Reflection.js";
6
6
  import { evalProgramFromState, evalProgramWithRegistrationState, ProgramState_$reflection } from "./Eval.js";
7
7
  import { inferProgramWithRegistration, TypedStmt_$reflection } from "./TypeInfer.js";
8
- import { skip, reverse, append, exists, length, empty, choose, cons, fold, filter } from "../fable_modules/fable-library-js.5.24.0/List.js";
9
- import { toList } from "../fable_modules/fable-library-js.5.24.0/Set.js";
8
+ import { skip, reverse, append, exists, length, empty, choose, cons, fold, filter } from "../fable_modules/fable-library-js.5.27.0/List.js";
9
+ import { toList } from "../fable_modules/fable-library-js.5.27.0/Set.js";
10
10
  import { Scheme, Types_ftvType } from "./Types.js";
11
- import { values, empty as empty_1, add, fold as fold_1 } from "../fable_modules/fable-library-js.5.24.0/Map.js";
12
- import { comparePrimitives } from "../fable_modules/fable-library-js.5.24.0/Util.js";
13
- import { toList as toList_1 } from "../fable_modules/fable-library-js.5.24.0/Seq.js";
11
+ import { values, empty as empty_1, add, fold as fold_1 } from "../fable_modules/fable-library-js.5.27.0/Map.js";
12
+ import { comparePrimitives } from "../fable_modules/fable-library-js.5.27.0/Util.js";
13
+ import { toList as toList_1 } from "../fable_modules/fable-library-js.5.27.0/Seq.js";
14
14
  import { ofExterns } from "./HostInterop.js";
15
15
 
16
16
  export class Session extends Record {
@@ -76,7 +76,7 @@ function typeDeclarations(program) {
76
76
  }
77
77
 
78
78
  function inferenceBinding(name, bindingType) {
79
- return new ExternalFunction(name, new Scheme(toList(Types_ftvType(bindingType)), bindingType), (_arg, _arg_1) => Value.VUnit, 0);
79
+ return new ExternalFunction(0, name, new Scheme(toList(Types_ftvType(bindingType)), bindingType), (_arg, _arg_1) => Value.VUnit, 0);
80
80
  }
81
81
 
82
82
  function updateInferenceBindings(bindings, typedProgram) {
@@ -138,7 +138,7 @@ export function submit(session, program) {
138
138
  }
139
139
  else {
140
140
  const previousState = matchValue;
141
- const typed_2 = inferProgramWithRegistration((bind$0040 = session.Registration, new ExtensionRegistration(bind$0040.Types, bind$0040.Unions, append(session.Registration.Functions, toList_1(values(session.InferenceBindings))))), append(session.TypeDeclarations, program));
141
+ const typed_2 = inferProgramWithRegistration((bind$0040 = session.Registration, new ExtensionRegistration(bind$0040.Permissions, bind$0040.Types, bind$0040.Unions, append(session.Registration.Functions, toList_1(values(session.InferenceBindings))))), append(session.TypeDeclarations, program));
142
142
  const submittedTyped_1 = skip(length(session.TypeDeclarations), typed_2);
143
143
  const state_2 = evalProgramFromState(previousState, submittedTyped_1);
144
144
  return new Submission(new Session(session.Registration, retainedRev, session.TypeDeclarations, updateInferenceBindings(session.InferenceBindings, submittedTyped_1), state_2), submittedTyped_1, state_2, retainedCount_1);
@@ -1,16 +1,16 @@
1
1
 
2
- import { isDigit, isLetterOrDigit, isLetter } from "../fable_modules/fable-library-js.5.24.0/Char.js";
3
- import { parse } from "../fable_modules/fable-library-js.5.24.0/Double.js";
2
+ import { isDigit, isLetterOrDigit, isLetter } from "../fable_modules/fable-library-js.5.27.0/Char.js";
3
+ import { parse } from "../fable_modules/fable-library-js.5.27.0/Double.js";
4
4
  import { Span, Position } from "./Span.js";
5
5
  import { Token, TokenKind } from "./Token.js";
6
- import { StringBuilder__Append_244C7CD6, StringBuilder_$ctor } from "../fable_modules/fable-library-js.5.24.0/System.Text.js";
6
+ import { StringBuilder__Append_244C7CD6, StringBuilder_$ctor } from "../fable_modules/fable-library-js.5.27.0/System.Text.js";
7
+ import { printf, toText, substring, getCharAtIndex } from "../fable_modules/fable-library-js.5.27.0/String.js";
7
8
  import { ParseException, ParseError } from "./Error.js";
8
- import { toString } from "../fable_modules/fable-library-js.5.24.0/Types.js";
9
- import { printf, toText, substring } from "../fable_modules/fable-library-js.5.24.0/String.js";
10
- import { item } from "../fable_modules/fable-library-js.5.24.0/Array.js";
11
- import { toInt64_unchecked } from "../fable_modules/fable-library-js.5.24.0/BigInt.js";
12
- import { parse as parse_1 } from "../fable_modules/fable-library-js.5.24.0/Long.js";
13
- import { toList } from "../fable_modules/fable-library-js.5.24.0/Seq.js";
9
+ import { toString } from "../fable_modules/fable-library-js.5.27.0/Types.js";
10
+ import { item } from "../fable_modules/fable-library-js.5.27.0/Array.js";
11
+ import { toInt64_unchecked } from "../fable_modules/fable-library-js.5.27.0/BigInt.js";
12
+ import { parse as parse_1 } from "../fable_modules/fable-library-js.5.27.0/Long.js";
13
+ import { toList } from "../fable_modules/fable-library-js.5.27.0/Seq.js";
14
14
 
15
15
  function isIdentStart(c) {
16
16
  if (isLetter(c)) {
@@ -31,7 +31,7 @@ function isIdentPart(c) {
31
31
  }
32
32
 
33
33
  function parseFloatLiteral(text) {
34
- return parse(text);
34
+ return parse(text, 231);
35
35
  }
36
36
 
37
37
  function mkSpan(sourceName, line, col, length) {
@@ -102,14 +102,14 @@ function readString(sourceName, src, i, line, col) {
102
102
  let cCol = col + 1;
103
103
  let doneFlag = false;
104
104
  while ((idx < src.length) && !doneFlag) {
105
- const ch = src[idx];
105
+ const ch = getCharAtIndex(src, idx);
106
106
  if (ch === "\"") {
107
107
  doneFlag = true;
108
108
  idx = ((idx + 1) | 0);
109
109
  cCol = ((cCol + 1) | 0);
110
110
  }
111
111
  else if ((ch === "\\") && ((idx + 1) < src.length)) {
112
- const next = src[idx + 1];
112
+ const next = getCharAtIndex(src, idx + 1);
113
113
  switch (next) {
114
114
  case "\"": {
115
115
  StringBuilder__Append_244C7CD6(sb, "\"");
@@ -161,7 +161,7 @@ function readInterpolatedRaw(sourceName, src, i, line, col) {
161
161
  let inPlaceholderString = false;
162
162
  let placeholderEscaped = false;
163
163
  while ((idx < src.length) && !doneFlag) {
164
- const ch = src[idx];
164
+ const ch = getCharAtIndex(src, idx);
165
165
  if (placeholderDepth > 0) {
166
166
  if (inPlaceholderString) {
167
167
  if (placeholderEscaped) {
@@ -241,7 +241,7 @@ function readInterpolatedRaw(sourceName, src, i, line, col) {
241
241
  break;
242
242
  }
243
243
  case "{": {
244
- if (((idx + 1) < src.length) && (src[idx + 1] === "{")) {
244
+ if (((idx + 1) < src.length) && (getCharAtIndex(src, idx + 1) === "{")) {
245
245
  idx = ((idx + 2) | 0);
246
246
  cCol = ((cCol + 2) | 0);
247
247
  }
@@ -280,30 +280,30 @@ function tokenizeCore(sourceName, startLine, startColumn, src) {
280
280
  let bracketDepth = 0;
281
281
  let braceDepth = 0;
282
282
  while (i < src.length) {
283
- const ch = src[i];
283
+ const ch = getCharAtIndex(src, i);
284
284
  if (atLineStart) {
285
285
  let idx = i;
286
286
  let indent = 0;
287
287
  let cCol = col;
288
288
  let onlyWhitespace = true;
289
- while ((idx < src.length) && ((src[idx] === " ") ? true : (src[idx] === "\t"))) {
290
- indent = ((indent + ((src[idx] === "\t") ? 4 : 1)) | 0);
289
+ while ((idx < src.length) && ((getCharAtIndex(src, idx) === " ") ? true : (getCharAtIndex(src, idx) === "\t"))) {
290
+ indent = ((indent + ((getCharAtIndex(src, idx) === "\t") ? 4 : 1)) | 0);
291
291
  idx = ((idx + 1) | 0);
292
292
  cCol = ((cCol + 1) | 0);
293
293
  }
294
- if ((idx < src.length) && (src[idx] === "\n")) {
294
+ if ((idx < src.length) && (getCharAtIndex(src, idx) === "\n")) {
295
295
  addToken(TokenKind.Newline, mkSpan(sourceName, line, col, 1), tokens);
296
296
  i = ((idx + 1) | 0);
297
297
  line = ((line + 1) | 0);
298
298
  col = 1;
299
299
  atLineStart = true;
300
300
  }
301
- else if ((((idx < src.length) && (src[idx] === "/")) && ((idx + 1) < src.length)) && (src[idx + 1] === "/")) {
302
- while ((i < src.length) && (src[i] !== "\n")) {
301
+ else if ((((idx < src.length) && (getCharAtIndex(src, idx) === "/")) && ((idx + 1) < src.length)) && (getCharAtIndex(src, idx + 1) === "/")) {
302
+ while ((i < src.length) && (getCharAtIndex(src, i) !== "\n")) {
303
303
  i = ((i + 1) | 0);
304
304
  }
305
305
  addToken(TokenKind.Newline, mkSpan(sourceName, line, col, 1), tokens);
306
- if ((i < src.length) && (src[i] === "\n")) {
306
+ if ((i < src.length) && (getCharAtIndex(src, i) === "\n")) {
307
307
  i = ((i + 1) | 0);
308
308
  line = ((line + 1) | 0);
309
309
  col = 1;
@@ -312,7 +312,7 @@ function tokenizeCore(sourceName, startLine, startColumn, src) {
312
312
  }
313
313
  else {
314
314
  const span_1 = mkSpan(sourceName, line, col, 1);
315
- const startsWithParameterHead = (idx < src.length) && ((src[idx] === "(") ? true : isIdentStart(src[idx]));
315
+ const startsWithParameterHead = (idx < src.length) && ((getCharAtIndex(src, idx) === "(") ? true : isIdentStart(getCharAtIndex(src, idx)));
316
316
  if (inLetBindingHead && startsWithParameterHead) {
317
317
  }
318
318
  else {
@@ -381,7 +381,7 @@ function tokenizeCore(sourceName, startLine, startColumn, src) {
381
381
  break;
382
382
  }
383
383
  case "$": {
384
- if (((i + 1) < src.length) && (src[i + 1] === "\"")) {
384
+ if (((i + 1) < src.length) && (getCharAtIndex(src, i + 1) === "\"")) {
385
385
  matchResult = 6;
386
386
  }
387
387
  else if (isDigit(ch)) {
@@ -420,7 +420,7 @@ function tokenizeCore(sourceName, startLine, startColumn, src) {
420
420
  matchResult = 8;
421
421
  c_49 = ch;
422
422
  }
423
- else if (((i + 1) < src.length) && (src[i + 1] === "&")) {
423
+ else if (((i + 1) < src.length) && (getCharAtIndex(src, i + 1) === "&")) {
424
424
  matchResult = 13;
425
425
  }
426
426
  else {
@@ -429,7 +429,7 @@ function tokenizeCore(sourceName, startLine, startColumn, src) {
429
429
  break;
430
430
  }
431
431
  case "(": {
432
- if (((i + 1) < src.length) && (src[i + 1] === "*")) {
432
+ if (((i + 1) < src.length) && (getCharAtIndex(src, i + 1) === "*")) {
433
433
  matchResult = 4;
434
434
  }
435
435
  else if (isDigit(ch)) {
@@ -510,7 +510,7 @@ function tokenizeCore(sourceName, startLine, startColumn, src) {
510
510
  matchResult = 8;
511
511
  c_49 = ch;
512
512
  }
513
- else if (((i + 1) < src.length) && (src[i + 1] === ">")) {
513
+ else if (((i + 1) < src.length) && (getCharAtIndex(src, i + 1) === ">")) {
514
514
  matchResult = 9;
515
515
  }
516
516
  else {
@@ -527,7 +527,7 @@ function tokenizeCore(sourceName, startLine, startColumn, src) {
527
527
  matchResult = 8;
528
528
  c_49 = ch;
529
529
  }
530
- else if (((i + 1) < src.length) && (src[i + 1] === ".")) {
530
+ else if (((i + 1) < src.length) && (getCharAtIndex(src, i + 1) === ".")) {
531
531
  matchResult = 35;
532
532
  }
533
533
  else {
@@ -536,7 +536,7 @@ function tokenizeCore(sourceName, startLine, startColumn, src) {
536
536
  break;
537
537
  }
538
538
  case "/": {
539
- if (((i + 1) < src.length) && (src[i + 1] === "/")) {
539
+ if (((i + 1) < src.length) && (getCharAtIndex(src, i + 1) === "/")) {
540
540
  matchResult = 3;
541
541
  }
542
542
  else if (isDigit(ch)) {
@@ -561,7 +561,7 @@ function tokenizeCore(sourceName, startLine, startColumn, src) {
561
561
  matchResult = 8;
562
562
  c_49 = ch;
563
563
  }
564
- else if (((i + 1) < src.length) && (src[i + 1] === ":")) {
564
+ else if (((i + 1) < src.length) && (getCharAtIndex(src, i + 1) === ":")) {
565
565
  matchResult = 10;
566
566
  }
567
567
  else {
@@ -592,7 +592,7 @@ function tokenizeCore(sourceName, startLine, startColumn, src) {
592
592
  matchResult = 8;
593
593
  c_49 = ch;
594
594
  }
595
- else if (((i + 1) < src.length) && (src[i + 1] === "=")) {
595
+ else if (((i + 1) < src.length) && (getCharAtIndex(src, i + 1) === "=")) {
596
596
  matchResult = 11;
597
597
  }
598
598
  else {
@@ -623,7 +623,7 @@ function tokenizeCore(sourceName, startLine, startColumn, src) {
623
623
  matchResult = 8;
624
624
  c_49 = ch;
625
625
  }
626
- else if (((i + 1) < src.length) && (src[i + 1] === "=")) {
626
+ else if (((i + 1) < src.length) && (getCharAtIndex(src, i + 1) === "=")) {
627
627
  matchResult = 12;
628
628
  }
629
629
  else {
@@ -654,7 +654,7 @@ function tokenizeCore(sourceName, startLine, startColumn, src) {
654
654
  matchResult = 8;
655
655
  c_49 = ch;
656
656
  }
657
- else if (((i + 1) < src.length) && (src[i + 1] === "|")) {
657
+ else if (((i + 1) < src.length) && (getCharAtIndex(src, i + 1) === "|")) {
658
658
  matchResult = 29;
659
659
  }
660
660
  else {
@@ -699,13 +699,13 @@ function tokenizeCore(sourceName, startLine, startColumn, src) {
699
699
  matchResult = 8;
700
700
  c_49 = ch;
701
701
  }
702
- else if (((i + 1) < src.length) && (src[i + 1] === "]")) {
702
+ else if (((i + 1) < src.length) && (getCharAtIndex(src, i + 1) === "]")) {
703
703
  matchResult = 14;
704
704
  }
705
- else if (((i + 1) < src.length) && (src[i + 1] === "|")) {
705
+ else if (((i + 1) < src.length) && (getCharAtIndex(src, i + 1) === "|")) {
706
706
  matchResult = 15;
707
707
  }
708
- else if (((i + 1) < src.length) && (src[i + 1] === ">")) {
708
+ else if (((i + 1) < src.length) && (getCharAtIndex(src, i + 1) === ">")) {
709
709
  matchResult = 16;
710
710
  }
711
711
  else {
@@ -759,7 +759,7 @@ function tokenizeCore(sourceName, startLine, startColumn, src) {
759
759
  break;
760
760
  }
761
761
  case 3: {
762
- while ((i < src.length) && (src[i] !== "\n")) {
762
+ while ((i < src.length) && (getCharAtIndex(src, i) !== "\n")) {
763
763
  i = ((i + 1) | 0);
764
764
  }
765
765
  break;
@@ -791,8 +791,8 @@ function tokenizeCore(sourceName, startLine, startColumn, src) {
791
791
  const startCol = col | 0;
792
792
  let hasDot = false;
793
793
  let idx_3 = i;
794
- while ((idx_3 < src.length) && (isDigit(src[idx_3]) ? true : ((((src[idx_3] === ".") && !hasDot) && ((idx_3 + 1) < src.length)) && isDigit(src[idx_3 + 1])))) {
795
- if (src[idx_3] === ".") {
794
+ while ((idx_3 < src.length) && (isDigit(getCharAtIndex(src, idx_3)) ? true : ((((getCharAtIndex(src, idx_3) === ".") && !hasDot) && ((idx_3 + 1) < src.length)) && isDigit(getCharAtIndex(src, idx_3 + 1))))) {
795
+ if (getCharAtIndex(src, idx_3) === ".") {
796
796
  hasDot = true;
797
797
  idx_3 = ((idx_3 + 1) | 0);
798
798
  }
@@ -816,7 +816,7 @@ function tokenizeCore(sourceName, startLine, startColumn, src) {
816
816
  const start_1 = i | 0;
817
817
  const startCol_1 = col | 0;
818
818
  let idx_4 = i + 1;
819
- while ((idx_4 < src.length) && isIdentPart(src[idx_4])) {
819
+ while ((idx_4 < src.length) && isIdentPart(getCharAtIndex(src, idx_4))) {
820
820
  idx_4 = ((idx_4 + 1) | 0);
821
821
  }
822
822
  const ident = substring(src, start_1, idx_4 - start_1);
@@ -1,19 +1,19 @@
1
1
 
2
- import { class_type } from "../fable_modules/fable-library-js.5.24.0/Reflection.js";
3
- import { item } from "../fable_modules/fable-library-js.5.24.0/Array.js";
4
- import { equals } from "../fable_modules/fable-library-js.5.24.0/Util.js";
2
+ import { class_type } from "../fable_modules/fable-library-js.5.27.0/Reflection.js";
3
+ import { item } from "../fable_modules/fable-library-js.5.27.0/Array.js";
4
+ import { equals } from "../fable_modules/fable-library-js.5.27.0/Util.js";
5
5
  import { ParseException, ParseError } from "./Error.js";
6
6
  import { TokenKind } from "./Token.js";
7
7
  import { Span, SpanModule_merge } from "./Span.js";
8
- import { substring, isNullOrWhiteSpace, concat, join, isNullOrEmpty } from "../fable_modules/fable-library-js.5.24.0/String.js";
9
- import { isUpper } from "../fable_modules/fable-library-js.5.24.0/Char.js";
8
+ import { substring, isNullOrWhiteSpace, concat, join, getCharAtIndex, isNullOrEmpty } from "../fable_modules/fable-library-js.5.27.0/String.js";
9
+ import { isUpper } from "../fable_modules/fable-library-js.5.27.0/Char.js";
10
10
  import { Ast_spanOfStmt, Attribute, MapEntry, Ast_spanOfExpr, InterpolatedPart, Expr, Ast_spanOfPattern, Pattern, Stmt, TypeDef, BackendImport, Param, TypeRef, Literal } from "./Ast.js";
11
11
  import { tokenizeArrayWithSourceNameAndOrigin } from "./Lexer.js";
12
- import { addToSet } from "../fable_modules/fable-library-js.5.24.0/MapUtil.js";
13
- import { foldBack as foldBack_1, toList } from "../fable_modules/fable-library-js.5.24.0/Seq.js";
14
- import { singleton, foldBack, head as head_1, tail as tail_1, isEmpty, empty } from "../fable_modules/fable-library-js.5.24.0/List.js";
15
- import { StringBuilder__Append_244C7CD6, StringBuilder__Clear, StringBuilder__get_Length, StringBuilder_$ctor } from "../fable_modules/fable-library-js.5.24.0/System.Text.js";
16
- import { toString } from "../fable_modules/fable-library-js.5.24.0/Types.js";
12
+ import { addToSet } from "../fable_modules/fable-library-js.5.27.0/MapUtil.js";
13
+ import { foldBack as foldBack_1, toList } from "../fable_modules/fable-library-js.5.27.0/Seq.js";
14
+ import { singleton, foldBack, head as head_1, tail as tail_1, isEmpty, empty } from "../fable_modules/fable-library-js.5.27.0/List.js";
15
+ import { StringBuilder__Append_244C7CD6, StringBuilder__Clear, StringBuilder__get_Length, StringBuilder_$ctor } from "../fable_modules/fable-library-js.5.27.0/System.Text.js";
16
+ import { toString } from "../fable_modules/fable-library-js.5.27.0/Types.js";
17
17
 
18
18
  class TokenStream {
19
19
  constructor(tokens) {
@@ -133,7 +133,7 @@ function isStartAtom(k) {
133
133
 
134
134
  function isUpperIdent(name) {
135
135
  if (!isNullOrEmpty(name)) {
136
- return isUpper(name[0]);
136
+ return isUpper(getCharAtIndex(name, 0));
137
137
  }
138
138
  else {
139
139
  return false;
@@ -1054,7 +1054,7 @@ function parseProgramWithSourceNameAndOrigin(sourceName, startLine, startColumn,
1054
1054
  let i_1 = 0;
1055
1055
  while (i_1 < raw.length) {
1056
1056
  let parsed;
1057
- const matchValue = raw[i_1];
1057
+ const matchValue = getCharAtIndex(raw, i_1);
1058
1058
  let matchResult_3, ch_1;
1059
1059
  switch (matchValue) {
1060
1060
  case "\\": {
@@ -1068,7 +1068,7 @@ function parseProgramWithSourceNameAndOrigin(sourceName, startLine, startColumn,
1068
1068
  break;
1069
1069
  }
1070
1070
  case "{": {
1071
- if (((i_1 + 1) < raw.length) && (raw[i_1 + 1] === "{")) {
1071
+ if (((i_1 + 1) < raw.length) && (getCharAtIndex(raw, i_1 + 1) === "{")) {
1072
1072
  matchResult_3 = 0;
1073
1073
  }
1074
1074
  else {
@@ -1077,7 +1077,7 @@ function parseProgramWithSourceNameAndOrigin(sourceName, startLine, startColumn,
1077
1077
  break;
1078
1078
  }
1079
1079
  case "}": {
1080
- if (((i_1 + 1) < raw.length) && (raw[i_1 + 1] === "}")) {
1080
+ if (((i_1 + 1) < raw.length) && (getCharAtIndex(raw, i_1 + 1) === "}")) {
1081
1081
  matchResult_3 = 1;
1082
1082
  }
1083
1083
  else {
@@ -1111,7 +1111,7 @@ function parseProgramWithSourceNameAndOrigin(sourceName, startLine, startColumn,
1111
1111
  let inString = false;
1112
1112
  let escaped = false;
1113
1113
  while ((i < s.length) && (depth > 0)) {
1114
- const ch = s[i];
1114
+ const ch = getCharAtIndex(s, i);
1115
1115
  if (inString) {
1116
1116
  if (escaped) {
1117
1117
  escaped = false;
@@ -1166,7 +1166,7 @@ function parseProgramWithSourceNameAndOrigin(sourceName, startLine, startColumn,
1166
1166
  let originLine_1 = span.Start.Line;
1167
1167
  let originColumn_1 = span.Start.Column + 2;
1168
1168
  for (let offset = 0; offset <= (start - 1); offset++) {
1169
- if (s[offset] === "\n") {
1169
+ if (getCharAtIndex(s, offset) === "\n") {
1170
1170
  originLine_1 = ((originLine_1 + 1) | 0);
1171
1171
  originColumn_1 = 1;
1172
1172
  }
@@ -1190,7 +1190,7 @@ function parseProgramWithSourceNameAndOrigin(sourceName, startLine, startColumn,
1190
1190
  break;
1191
1191
  }
1192
1192
  case 4: {
1193
- const next = raw[i_1 + 1];
1193
+ const next = getCharAtIndex(raw, i_1 + 1);
1194
1194
  switch (next) {
1195
1195
  case "\"": {
1196
1196
  StringBuilder__Append_244C7CD6(text, "\"");
@@ -1,8 +1,8 @@
1
1
 
2
- import { length, isEmpty, map, singleton, append } from "../fable_modules/fable-library-js.5.24.0/List.js";
3
- import { concat, join, printf, toText, replace } from "../fable_modules/fable-library-js.5.24.0/String.js";
4
- import { int64ToString } from "../fable_modules/fable-library-js.5.24.0/Util.js";
5
- import { toList } from "../fable_modules/fable-library-js.5.24.0/Map.js";
2
+ import { length, isEmpty, map, singleton, append } from "../fable_modules/fable-library-js.5.27.0/List.js";
3
+ import { concat, join, printf, toText, float64ToString, replace } from "../fable_modules/fable-library-js.5.27.0/String.js";
4
+ import { int64ToString } from "../fable_modules/fable-library-js.5.27.0/Util.js";
5
+ import { toList } from "../fable_modules/fable-library-js.5.27.0/Map.js";
6
6
  import { Types_typeToString } from "./Types.js";
7
7
 
8
8
  function closureParameters(firstArg, body) {
@@ -133,7 +133,7 @@ export function valueToString(v) {
133
133
  case 1:
134
134
  return int64ToString(i);
135
135
  case 2:
136
- return f.toString();
136
+ return float64ToString(f);
137
137
  case 3:
138
138
  if (b) {
139
139
  return "true";
@@ -1,6 +1,6 @@
1
1
 
2
- import { Record } from "../fable_modules/fable-library-js.5.24.0/Types.js";
3
- import { record_type, int32_type, option_type, string_type } from "../fable_modules/fable-library-js.5.24.0/Reflection.js";
2
+ import { Record } from "../fable_modules/fable-library-js.5.27.0/Types.js";
3
+ import { record_type, int32_type, option_type, string_type } from "../fable_modules/fable-library-js.5.27.0/Reflection.js";
4
4
 
5
5
  export class Position extends Record {
6
6
  constructor(File, Line, Column) {