@magnusopera/fscript 0.86.1 → 0.86.3
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.
- package/dist/FScript.Language/Ast.js +2 -2
- package/dist/FScript.Language/BuiltinFunctions.js +106 -61
- package/dist/FScript.Language/BuiltinSignatures.js +6 -6
- package/dist/FScript.Language/BuiltinTypes.js +1 -1
- package/dist/FScript.Language/Error.js +2 -2
- package/dist/FScript.Language/Eval.js +52 -60
- package/dist/FScript.Language/Execution.js +6 -6
- package/dist/FScript.Language/ExportSignatures.js +5 -5
- package/dist/FScript.Language/HostInterop.js +8 -8
- package/dist/FScript.Language/IncludeResolver.js +10 -10
- package/dist/FScript.Language/Interactive.js +7 -7
- package/dist/FScript.Language/Lexer.js +19 -11
- package/dist/FScript.Language/Parser.js +16 -16
- package/dist/FScript.Language/Pretty.js +4 -4
- package/dist/FScript.Language/Span.js +2 -2
- package/dist/FScript.Language/TaskFunctions.js +2 -2
- package/dist/FScript.Language/TaskSharingAnalysis.js +207 -197
- package/dist/FScript.Language/Token.js +2 -2
- package/dist/FScript.Language/TypeInfer.js +188 -168
- package/dist/FScript.Language/Types.js +8 -8
- package/dist/FScript.Language/Value.js +2 -2
- package/dist/Library.js +13 -13
- package/dist/fable_modules/fable-library-js.5.24.0/Async.js +363 -0
- package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/AsyncBuilder.js +70 -10
- package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/CHANGELOG.md +90 -1
- package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/CollectionUtil.js +10 -16
- package/dist/fable_modules/fable-library-js.5.24.0/DateOnlyTemporal.js +146 -0
- package/dist/fable_modules/fable-library-js.5.24.0/DateTimeFormat.js +523 -0
- package/dist/fable_modules/fable-library-js.5.24.0/DateTimeOffsetTemporal.js +283 -0
- package/dist/fable_modules/fable-library-js.5.24.0/DateTimeTemporal.js +243 -0
- package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Decimal.js +100 -11
- package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Encoding.js +23 -16
- package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Guid.js +3 -1
- package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/MailboxProcessor.js +23 -3
- package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/MutableMap.js +5 -1
- package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/MutableSet.js +5 -1
- package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Numeric.js +38 -1
- package/dist/fable_modules/fable-library-js.5.24.0/Stopwatch.js +65 -0
- package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/String.js +43 -9
- package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/System.Text.js +9 -9
- package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Task.js +22 -0
- package/dist/fable_modules/fable-library-js.5.24.0/TimeOnlyTemporal.js +142 -0
- package/dist/fable_modules/fable-library-js.5.24.0/TimeSpanTemporal.js +259 -0
- package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Util.js +15 -3
- package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/big.d.ts +1 -0
- package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/lib/big.js +111 -64
- package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/package.json +1 -1
- package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/quotation.js +47 -0
- package/dist/fable_modules/project_cracked.json +1 -1
- package/package.json +1 -1
- package/dist/fable_modules/fable-library-js.5.13.0/Async.js +0 -163
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Array.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/BigInt.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/BitConverter.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Boolean.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Char.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Choice.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/ConditionalWeakTable.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Date.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/DateOffset.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/DateOnly.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Directory.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Double.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Environment.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Event.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/FSharp.Collections.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/FSharp.Core.CompilerServices.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/FSharp.Core.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/File.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Global.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Int32.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/List.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Long.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Map.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/MapUtil.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Native.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Observable.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Option.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Path.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/README.md +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Random.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Range.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Reflection.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/RegExp.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Result.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Seq.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Seq2.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Set.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/System.Collections.Generic.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/System.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/TaskBuilder.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/TimeOnly.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/TimeSpan.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Timer.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Types.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Unicode.13.0.0.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.13.0 → fable-library-js.5.24.0}/Uri.js +0 -0
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
|
|
2
|
-
import { toString, FSharpRef, Record } from "../fable_modules/fable-library-js.5.
|
|
3
|
-
import { option_type, array_type, bool_type, obj_type, record_type, int32_type, class_type, string_type } from "../fable_modules/fable-library-js.5.
|
|
2
|
+
import { toString, FSharpRef, Record } from "../fable_modules/fable-library-js.5.24.0/Types.js";
|
|
3
|
+
import { option_type, array_type, bool_type, obj_type, record_type, int32_type, class_type, string_type } from "../fable_modules/fable-library-js.5.24.0/Reflection.js";
|
|
4
4
|
import { Scheme as Scheme_1, Type, Types_typeToString, Type_$reflection } from "./Types.js";
|
|
5
5
|
import { ExternalFunction, ExternalCallContext, MapKey, Value, TaskHandle_$reflection, Value_$reflection } from "./Value.js";
|
|
6
6
|
import { EvalException, EvalError$, EvalError$_$reflection } from "./Error.js";
|
|
7
7
|
import { Span, Position } from "./Span.js";
|
|
8
|
-
import { printf, toText, join, concat } from "../fable_modules/fable-library-js.5.
|
|
9
|
-
import { curry2, Exception, defaultOf, disposeSafe, getEnumerator, equals as equals_1,
|
|
10
|
-
import { ofArray, collect, tryFindIndex, choose, tryFind as tryFind_1, tryPick as tryPick_1, reverse, append, zip, fold as fold_1, singleton, forAll as forAll_1, empty, cons, tail as tail_2, head as head_1, isEmpty, forAll2, length, map } from "../fable_modules/fable-library-js.5.
|
|
11
|
-
import { keys, map as map_1, containsKey, FSharpMap__Add, fold, empty as empty_1, FSharpMap__Remove, FSharpMap__get_IsEmpty, FSharpMap__ContainsKey, add, FSharpMap__TryFind,
|
|
12
|
-
import { compare
|
|
13
|
-
import {
|
|
8
|
+
import { printf, toText, join, concat } from "../fable_modules/fable-library-js.5.24.0/String.js";
|
|
9
|
+
import { curry2, Exception, compare as compare_1, defaultOf, disposeSafe, getEnumerator, comparePrimitives, equals as equals_1, int64ToString } from "../fable_modules/fable-library-js.5.24.0/Util.js";
|
|
10
|
+
import { ofArray, collect, tryFindIndex, choose, tryFind as tryFind_1, tryPick as tryPick_1, reverse, append, zip, fold as fold_1, singleton, forAll as forAll_1, empty, cons, tail as tail_2, head as head_1, isEmpty, forAll2, length, map } from "../fable_modules/fable-library-js.5.24.0/List.js";
|
|
11
|
+
import { keys, map as map_1, containsKey, FSharpMap__Add, fold, empty as empty_1, FSharpMap__get_Item, FSharpMap__Remove, FSharpMap__get_IsEmpty, FSharpMap__ContainsKey, add, FSharpMap__TryFind, toSeq, ofList, tryFind, forAll, FSharpMap__get_Count, toList } from "../fable_modules/fable-library-js.5.24.0/Map.js";
|
|
12
|
+
import { compare, op_Modulus, op_Division, op_Multiply, op_Subtraction, op_Addition, toInt64_unchecked, equals } from "../fable_modules/fable-library-js.5.24.0/BigInt.js";
|
|
13
|
+
import { toList as toList_1, filter, length as length_1, foldBack, head as head_2, tryPick, exists } from "../fable_modules/fable-library-js.5.24.0/Seq.js";
|
|
14
|
+
import { some, toArray } from "../fable_modules/fable-library-js.5.24.0/Option.js";
|
|
14
15
|
import { ofExterns, typeDefinitions, invoke, prepareCall, matches, $007CRecordFields$007C_$007C } from "./HostInterop.js";
|
|
15
16
|
import { Ast_spanOfExpr, Expr, Ast_spanOfPattern, TypeRef } from "./Ast.js";
|
|
16
|
-
import { toList as toList_1, filter, length as length_1, foldBack, head as head_2, exists, tryPick } from "../fable_modules/fable-library-js.5.13.0/Seq.js";
|
|
17
|
-
import { some, toArray } from "../fable_modules/fable-library-js.5.13.0/Option.js";
|
|
18
17
|
import { Execution_fold, Execution_map, Execution_execution, Execution_Builder__For_Z3A5BE4A, Execution$1__get_IsImmediate, Execution$1, Execution_run } from "./Execution.js";
|
|
19
18
|
import { awaitTask, spawn } from "./TaskFunctions.js";
|
|
20
19
|
import { builtinExterns, tryExecution } from "./BuiltinFunctions.js";
|
|
21
|
-
import { StringBuilder__Append_Z721C83C5, StringBuilder_$ctor } from "../fable_modules/fable-library-js.5.
|
|
20
|
+
import { StringBuilder__Append_Z721C83C5, StringBuilder_$ctor } from "../fable_modules/fable-library-js.5.24.0/System.Text.js";
|
|
21
|
+
import { contains } from "../fable_modules/fable-library-js.5.24.0/Set.js";
|
|
22
22
|
import { builtinReservedNames } from "./BuiltinSignatures.js";
|
|
23
23
|
import { typeDefs as typeDefs_2 } from "./BuiltinTypes.js";
|
|
24
24
|
|
|
@@ -481,18 +481,14 @@ function valueEquals(a_mut, b_mut) {
|
|
|
481
481
|
return false;
|
|
482
482
|
}
|
|
483
483
|
case 7:
|
|
484
|
-
if (
|
|
485
|
-
|
|
486
|
-
}).Equals(ofSeq(FSharpMap__get_Keys(yf), {
|
|
487
|
-
Compare: (x_5, y_5) => (comparePrimitives(x_5, y_5) | 0),
|
|
488
|
-
}))) {
|
|
489
|
-
return forAll((k, xv) => valueEquals(xv, FSharpMap__get_Item(yf, k)), xf);
|
|
484
|
+
if (FSharpMap__get_Count(xf) === FSharpMap__get_Count(yf)) {
|
|
485
|
+
return forAll((key, value) => exists((b_3) => valueEquals(value, b_3), toArray(tryFind(key, yf))), xf);
|
|
490
486
|
}
|
|
491
487
|
else {
|
|
492
488
|
return false;
|
|
493
489
|
}
|
|
494
490
|
default: {
|
|
495
|
-
let matchResult_1, xf_1, yf_1,
|
|
491
|
+
let matchResult_1, xf_1, yf_1, x_4, y_4, cx, cy, px, py, tx, ty, tx_1, ty_1, tx_2, ty_2;
|
|
496
492
|
switch (a.tag) {
|
|
497
493
|
case 8: {
|
|
498
494
|
if (b.tag === 8) {
|
|
@@ -510,8 +506,8 @@ function valueEquals(a_mut, b_mut) {
|
|
|
510
506
|
if (b.tag === 9) {
|
|
511
507
|
if (b.fields[0] != null) {
|
|
512
508
|
matchResult_1 = 2;
|
|
513
|
-
|
|
514
|
-
|
|
509
|
+
x_4 = a.fields[0];
|
|
510
|
+
y_4 = b.fields[0];
|
|
515
511
|
}
|
|
516
512
|
else {
|
|
517
513
|
matchResult_1 = 6;
|
|
@@ -576,12 +572,8 @@ function valueEquals(a_mut, b_mut) {
|
|
|
576
572
|
}
|
|
577
573
|
switch (matchResult_1) {
|
|
578
574
|
case 0:
|
|
579
|
-
if (
|
|
580
|
-
|
|
581
|
-
}).Equals(ofSeq(FSharpMap__get_Keys(yf_1), {
|
|
582
|
-
Compare: (x_7, y_7) => (compare(x_7, y_7) | 0),
|
|
583
|
-
}))) {
|
|
584
|
-
return forAll((k_1, xv_1) => valueEquals(xv_1, FSharpMap__get_Item(yf_1, k_1)), xf_1);
|
|
575
|
+
if (FSharpMap__get_Count(xf_1) === FSharpMap__get_Count(yf_1)) {
|
|
576
|
+
return forAll((key_1, value_1) => exists((b_4) => valueEquals(value_1, b_4), toArray(tryFind(key_1, yf_1))), xf_1);
|
|
585
577
|
}
|
|
586
578
|
else {
|
|
587
579
|
return false;
|
|
@@ -589,17 +581,17 @@ function valueEquals(a_mut, b_mut) {
|
|
|
589
581
|
case 1:
|
|
590
582
|
return true;
|
|
591
583
|
case 2: {
|
|
592
|
-
a_mut =
|
|
593
|
-
b_mut =
|
|
584
|
+
a_mut = x_4;
|
|
585
|
+
b_mut = y_4;
|
|
594
586
|
continue valueEquals;
|
|
595
587
|
}
|
|
596
588
|
case 3:
|
|
597
589
|
if ((tx === ty) && (cx === cy)) {
|
|
598
|
-
let matchResult_2,
|
|
590
|
+
let matchResult_2, xv, yv;
|
|
599
591
|
if (px != null) {
|
|
600
592
|
if (py != null) {
|
|
601
593
|
matchResult_2 = 1;
|
|
602
|
-
|
|
594
|
+
xv = px;
|
|
603
595
|
yv = py;
|
|
604
596
|
}
|
|
605
597
|
else {
|
|
@@ -616,7 +608,7 @@ function valueEquals(a_mut, b_mut) {
|
|
|
616
608
|
case 0:
|
|
617
609
|
return true;
|
|
618
610
|
case 1: {
|
|
619
|
-
a_mut =
|
|
611
|
+
a_mut = xv;
|
|
620
612
|
b_mut = yv;
|
|
621
613
|
continue valueEquals;
|
|
622
614
|
}
|
|
@@ -1781,7 +1773,7 @@ function binaryOperator(span, op, av, bv) {
|
|
|
1781
1773
|
}
|
|
1782
1774
|
switch (matchResult_3) {
|
|
1783
1775
|
case 0:
|
|
1784
|
-
return new Value(/* VBool */ 3, [(op === "<") ? (
|
|
1776
|
+
return new Value(/* VBool */ 3, [(op === "<") ? (compare(x_11, y_11) < 0) : ((op === ">") ? (compare(x_11, y_11) > 0) : ((op === "<=") ? (compare(x_11, y_11) <= 0) : ((op === ">=") && (compare(x_11, y_11) >= 0))))]);
|
|
1785
1777
|
case 1:
|
|
1786
1778
|
return new Value(/* VBool */ 3, [(op === "<") ? (x_12 < y_12) : ((op === ">") ? (x_12 > y_12) : ((op === "<=") ? (x_12 <= y_12) : ((op === ">=") && (x_12 >= y_12))))]);
|
|
1787
1779
|
default:
|
|
@@ -3335,12 +3327,12 @@ function evalCompound(runtime, typeDefs, env, expr) {
|
|
|
3335
3327
|
}
|
|
3336
3328
|
switch (matchResult_1) {
|
|
3337
3329
|
case 0: {
|
|
3338
|
-
const step = (
|
|
3330
|
+
const step = (compare(s, e) <= 0) ? (1n) : (-1n);
|
|
3339
3331
|
const build = (acc_1_mut, current_mut) => {
|
|
3340
3332
|
build:
|
|
3341
3333
|
while (true) {
|
|
3342
3334
|
const acc_1 = acc_1_mut, current = current_mut;
|
|
3343
|
-
if (((
|
|
3335
|
+
if (((compare(step, 0n) > 0) && (compare(current, e) > 0)) ? true : ((compare(step, 0n) < 0) && (compare(current, e) < 0))) {
|
|
3344
3336
|
return reverse(acc_1);
|
|
3345
3337
|
}
|
|
3346
3338
|
else {
|
|
@@ -3381,12 +3373,12 @@ function evalCompound(runtime, typeDefs, env, expr) {
|
|
|
3381
3373
|
}
|
|
3382
3374
|
switch (matchResult_2) {
|
|
3383
3375
|
case 0: {
|
|
3384
|
-
const step = (
|
|
3376
|
+
const step = (compare(s, e) <= 0) ? (1n) : (-1n);
|
|
3385
3377
|
const build = (acc_1_mut_1, current_mut_1) => {
|
|
3386
3378
|
build:
|
|
3387
3379
|
while (true) {
|
|
3388
3380
|
const acc_1 = acc_1_mut_1, current = current_mut_1;
|
|
3389
|
-
if (((
|
|
3381
|
+
if (((compare(step, 0n) > 0) && (compare(current, e) > 0)) ? true : ((compare(step, 0n) < 0) && (compare(current, e) < 0))) {
|
|
3390
3382
|
return reverse(acc_1);
|
|
3391
3383
|
}
|
|
3392
3384
|
else {
|
|
@@ -3433,12 +3425,12 @@ function evalCompound(runtime, typeDefs, env, expr) {
|
|
|
3433
3425
|
}
|
|
3434
3426
|
switch (matchResult_3) {
|
|
3435
3427
|
case 0: {
|
|
3436
|
-
const step = (
|
|
3428
|
+
const step = (compare(s, e) <= 0) ? (1n) : (-1n);
|
|
3437
3429
|
const build = (acc_1_mut_2, current_mut_2) => {
|
|
3438
3430
|
build:
|
|
3439
3431
|
while (true) {
|
|
3440
3432
|
const acc_1 = acc_1_mut_2, current = current_mut_2;
|
|
3441
|
-
if (((
|
|
3433
|
+
if (((compare(step, 0n) > 0) && (compare(current, e) > 0)) ? true : ((compare(step, 0n) < 0) && (compare(current, e) < 0))) {
|
|
3442
3434
|
return reverse(acc_1);
|
|
3443
3435
|
}
|
|
3444
3436
|
else {
|
|
@@ -3489,12 +3481,12 @@ function evalCompound(runtime, typeDefs, env, expr) {
|
|
|
3489
3481
|
}
|
|
3490
3482
|
switch (matchResult_4) {
|
|
3491
3483
|
case 0: {
|
|
3492
|
-
const step = (
|
|
3484
|
+
const step = (compare(s, e) <= 0) ? (1n) : (-1n);
|
|
3493
3485
|
const build = (acc_1_mut_3, current_mut_3) => {
|
|
3494
3486
|
build:
|
|
3495
3487
|
while (true) {
|
|
3496
3488
|
const acc_1 = acc_1_mut_3, current = current_mut_3;
|
|
3497
|
-
if (((
|
|
3489
|
+
if (((compare(step, 0n) > 0) && (compare(current, e) > 0)) ? true : ((compare(step, 0n) < 0) && (compare(current, e) < 0))) {
|
|
3498
3490
|
return reverse(acc_1);
|
|
3499
3491
|
}
|
|
3500
3492
|
else {
|
|
@@ -3536,12 +3528,12 @@ function evalCompound(runtime, typeDefs, env, expr) {
|
|
|
3536
3528
|
}
|
|
3537
3529
|
switch (matchResult_5) {
|
|
3538
3530
|
case 0: {
|
|
3539
|
-
const step = (
|
|
3531
|
+
const step = (compare(s, e) <= 0) ? (1n) : (-1n);
|
|
3540
3532
|
const build = (acc_1_mut_4, current_mut_4) => {
|
|
3541
3533
|
build:
|
|
3542
3534
|
while (true) {
|
|
3543
3535
|
const acc_1 = acc_1_mut_4, current = current_mut_4;
|
|
3544
|
-
if (((
|
|
3536
|
+
if (((compare(step, 0n) > 0) && (compare(current, e) > 0)) ? true : ((compare(step, 0n) < 0) && (compare(current, e) < 0))) {
|
|
3545
3537
|
return reverse(acc_1);
|
|
3546
3538
|
}
|
|
3547
3539
|
else {
|
|
@@ -3588,12 +3580,12 @@ function evalCompound(runtime, typeDefs, env, expr) {
|
|
|
3588
3580
|
}
|
|
3589
3581
|
switch (matchResult_6) {
|
|
3590
3582
|
case 0: {
|
|
3591
|
-
const step = (
|
|
3583
|
+
const step = (compare(s, e) <= 0) ? (1n) : (-1n);
|
|
3592
3584
|
const build = (acc_1_mut_5, current_mut_5) => {
|
|
3593
3585
|
build:
|
|
3594
3586
|
while (true) {
|
|
3595
3587
|
const acc_1 = acc_1_mut_5, current = current_mut_5;
|
|
3596
|
-
if (((
|
|
3588
|
+
if (((compare(step, 0n) > 0) && (compare(current, e) > 0)) ? true : ((compare(step, 0n) < 0) && (compare(current, e) < 0))) {
|
|
3597
3589
|
return reverse(acc_1);
|
|
3598
3590
|
}
|
|
3599
3591
|
else {
|
|
@@ -3649,12 +3641,12 @@ function evalCompound(runtime, typeDefs, env, expr) {
|
|
|
3649
3641
|
}
|
|
3650
3642
|
switch (matchResult_7) {
|
|
3651
3643
|
case 0: {
|
|
3652
|
-
const step = (
|
|
3644
|
+
const step = (compare(s, e) <= 0) ? (1n) : (-1n);
|
|
3653
3645
|
const build = (acc_1_mut_6, current_mut_6) => {
|
|
3654
3646
|
build:
|
|
3655
3647
|
while (true) {
|
|
3656
3648
|
const acc_1 = acc_1_mut_6, current = current_mut_6;
|
|
3657
|
-
if (((
|
|
3649
|
+
if (((compare(step, 0n) > 0) && (compare(current, e) > 0)) ? true : ((compare(step, 0n) < 0) && (compare(current, e) < 0))) {
|
|
3658
3650
|
return reverse(acc_1);
|
|
3659
3651
|
}
|
|
3660
3652
|
else {
|
|
@@ -3696,12 +3688,12 @@ function evalCompound(runtime, typeDefs, env, expr) {
|
|
|
3696
3688
|
}
|
|
3697
3689
|
switch (matchResult_8) {
|
|
3698
3690
|
case 0: {
|
|
3699
|
-
const step = (
|
|
3691
|
+
const step = (compare(s, e) <= 0) ? (1n) : (-1n);
|
|
3700
3692
|
const build = (acc_1_mut_7, current_mut_7) => {
|
|
3701
3693
|
build:
|
|
3702
3694
|
while (true) {
|
|
3703
3695
|
const acc_1 = acc_1_mut_7, current = current_mut_7;
|
|
3704
|
-
if (((
|
|
3696
|
+
if (((compare(step, 0n) > 0) && (compare(current, e) > 0)) ? true : ((compare(step, 0n) < 0) && (compare(current, e) < 0))) {
|
|
3705
3697
|
return reverse(acc_1);
|
|
3706
3698
|
}
|
|
3707
3699
|
else {
|
|
@@ -3748,12 +3740,12 @@ function evalCompound(runtime, typeDefs, env, expr) {
|
|
|
3748
3740
|
}
|
|
3749
3741
|
switch (matchResult_9) {
|
|
3750
3742
|
case 0: {
|
|
3751
|
-
const step = (
|
|
3743
|
+
const step = (compare(s, e) <= 0) ? (1n) : (-1n);
|
|
3752
3744
|
const build = (acc_1_mut_8, current_mut_8) => {
|
|
3753
3745
|
build:
|
|
3754
3746
|
while (true) {
|
|
3755
3747
|
const acc_1 = acc_1_mut_8, current = current_mut_8;
|
|
3756
|
-
if (((
|
|
3748
|
+
if (((compare(step, 0n) > 0) && (compare(current, e) > 0)) ? true : ((compare(step, 0n) < 0) && (compare(current, e) < 0))) {
|
|
3757
3749
|
return reverse(acc_1);
|
|
3758
3750
|
}
|
|
3759
3751
|
else {
|
|
@@ -4084,7 +4076,7 @@ function evalCompound(runtime, typeDefs, env, expr) {
|
|
|
4084
4076
|
}
|
|
4085
4077
|
}
|
|
4086
4078
|
}, empty_1({
|
|
4087
|
-
Compare: (x_1, y_1) => (
|
|
4079
|
+
Compare: (x_1, y_1) => (compare_1(x_1, y_1) | 0),
|
|
4088
4080
|
}), entries_1);
|
|
4089
4081
|
if (Execution$1__get_IsImmediate(body_57)) {
|
|
4090
4082
|
return new Execution$1(new Value(/* VMap */ 8, [body_57.Value]), defaultOf());
|
|
@@ -4371,7 +4363,7 @@ function evalCompound(runtime, typeDefs, env, expr) {
|
|
|
4371
4363
|
break;
|
|
4372
4364
|
}
|
|
4373
4365
|
};
|
|
4374
|
-
return new Execution$1(new Value(/* VOption */ 9, [(
|
|
4366
|
+
return new Execution$1(new Value(/* VOption */ 9, [(compare(index, 0n) < 0) ? undefined : find(values_3, 0n)]), defaultOf());
|
|
4375
4367
|
}
|
|
4376
4368
|
case 1:
|
|
4377
4369
|
return new Execution$1(new Value(/* VOption */ 9, [FSharpMap__TryFind(values_4, valueToMapKey(span_12, key_1))]), defaultOf());
|
|
@@ -4465,7 +4457,7 @@ function evalCompound(runtime, typeDefs, env, expr) {
|
|
|
4465
4457
|
break;
|
|
4466
4458
|
}
|
|
4467
4459
|
};
|
|
4468
|
-
execution_44 = (new Execution$1(new Value(/* VOption */ 9, [(
|
|
4460
|
+
execution_44 = (new Execution$1(new Value(/* VOption */ 9, [(compare(index, 0n) < 0) ? undefined : find(values_3, 0n)]), defaultOf()));
|
|
4469
4461
|
break;
|
|
4470
4462
|
}
|
|
4471
4463
|
case 1: {
|
|
@@ -4571,7 +4563,7 @@ function evalCompound(runtime, typeDefs, env, expr) {
|
|
|
4571
4563
|
break;
|
|
4572
4564
|
}
|
|
4573
4565
|
};
|
|
4574
|
-
execution_44 = (new Execution$1(new Value(/* VOption */ 9, [(
|
|
4566
|
+
execution_44 = (new Execution$1(new Value(/* VOption */ 9, [(compare(index, 0n) < 0) ? undefined : find(values_3, 0n)]), defaultOf()));
|
|
4575
4567
|
break;
|
|
4576
4568
|
}
|
|
4577
4569
|
case 1: {
|
|
@@ -4681,7 +4673,7 @@ function evalCompound(runtime, typeDefs, env, expr) {
|
|
|
4681
4673
|
break;
|
|
4682
4674
|
}
|
|
4683
4675
|
};
|
|
4684
|
-
execution_46 = (new Execution$1(new Value(/* VOption */ 9, [(
|
|
4676
|
+
execution_46 = (new Execution$1(new Value(/* VOption */ 9, [(compare(index, 0n) < 0) ? undefined : find(values_3, 0n)]), defaultOf()));
|
|
4685
4677
|
break;
|
|
4686
4678
|
}
|
|
4687
4679
|
case 1: {
|
|
@@ -4782,7 +4774,7 @@ function evalCompound(runtime, typeDefs, env, expr) {
|
|
|
4782
4774
|
break;
|
|
4783
4775
|
}
|
|
4784
4776
|
};
|
|
4785
|
-
execution_44 = (new Execution$1(new Value(/* VOption */ 9, [(
|
|
4777
|
+
execution_44 = (new Execution$1(new Value(/* VOption */ 9, [(compare(index, 0n) < 0) ? undefined : find(values_3, 0n)]), defaultOf()));
|
|
4786
4778
|
break;
|
|
4787
4779
|
}
|
|
4788
4780
|
case 1: {
|
|
@@ -4888,7 +4880,7 @@ function evalCompound(runtime, typeDefs, env, expr) {
|
|
|
4888
4880
|
break;
|
|
4889
4881
|
}
|
|
4890
4882
|
};
|
|
4891
|
-
execution_44 = (new Execution$1(new Value(/* VOption */ 9, [(
|
|
4883
|
+
execution_44 = (new Execution$1(new Value(/* VOption */ 9, [(compare(index, 0n) < 0) ? undefined : find(values_3, 0n)]), defaultOf()));
|
|
4892
4884
|
break;
|
|
4893
4885
|
}
|
|
4894
4886
|
case 1: {
|
|
@@ -5003,7 +4995,7 @@ function evalCompound(runtime, typeDefs, env, expr) {
|
|
|
5003
4995
|
break;
|
|
5004
4996
|
}
|
|
5005
4997
|
};
|
|
5006
|
-
execution_46 = (new Execution$1(new Value(/* VOption */ 9, [(
|
|
4998
|
+
execution_46 = (new Execution$1(new Value(/* VOption */ 9, [(compare(index, 0n) < 0) ? undefined : find(values_3, 0n)]), defaultOf()));
|
|
5007
4999
|
break;
|
|
5008
5000
|
}
|
|
5009
5001
|
case 1: {
|
|
@@ -5104,7 +5096,7 @@ function evalCompound(runtime, typeDefs, env, expr) {
|
|
|
5104
5096
|
break;
|
|
5105
5097
|
}
|
|
5106
5098
|
};
|
|
5107
|
-
execution_44 = (new Execution$1(new Value(/* VOption */ 9, [(
|
|
5099
|
+
execution_44 = (new Execution$1(new Value(/* VOption */ 9, [(compare(index, 0n) < 0) ? undefined : find(values_3, 0n)]), defaultOf()));
|
|
5108
5100
|
break;
|
|
5109
5101
|
}
|
|
5110
5102
|
case 1: {
|
|
@@ -5210,7 +5202,7 @@ function evalCompound(runtime, typeDefs, env, expr) {
|
|
|
5210
5202
|
break;
|
|
5211
5203
|
}
|
|
5212
5204
|
};
|
|
5213
|
-
execution_44 = (new Execution$1(new Value(/* VOption */ 9, [(
|
|
5205
|
+
execution_44 = (new Execution$1(new Value(/* VOption */ 9, [(compare(index, 0n) < 0) ? undefined : find(values_3, 0n)]), defaultOf()));
|
|
5214
5206
|
break;
|
|
5215
5207
|
}
|
|
5216
5208
|
case 1: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
import { Record, Union } from "../fable_modules/fable-library-js.5.
|
|
3
|
-
import { record_type, union_type, class_type, lambda_type, unit_type } from "../fable_modules/fable-library-js.5.
|
|
4
|
-
import { Exception, disposeSafe, getEnumerator, defaultOf } from "../fable_modules/fable-library-js.5.
|
|
5
|
-
import { FSharpChoice$2 } from "../fable_modules/fable-library-js.5.
|
|
6
|
-
import { value as value_11, some, defaultArg } from "../fable_modules/fable-library-js.5.
|
|
7
|
-
import { cons, empty, singleton, ofSeq, ofArray, head as head_1, tail as tail_1, isEmpty } from "../fable_modules/fable-library-js.5.
|
|
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";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Continuations and exception scopes are data, rather than suspended CLR stacks.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
import { Record } from "../fable_modules/fable-library-js.5.
|
|
3
|
-
import { record_type, list_type, string_type } from "../fable_modules/fable-library-js.5.
|
|
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";
|
|
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.
|
|
6
|
-
import { comparePrimitives, Exception } from "../fable_modules/fable-library-js.5.
|
|
7
|
-
import { ofList } from "../fable_modules/fable-library-js.5.
|
|
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";
|
|
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.
|
|
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";
|
|
5
5
|
import { Value, HostManagedValue, ExtensionRegistration } from "./Value.js";
|
|
6
6
|
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.
|
|
8
|
-
import { curry2, stringHash, disposeSafe, getEnumerator, comparePrimitives } from "../fable_modules/fable-library-js.5.
|
|
9
|
-
import { concat, isNullOrWhiteSpace } from "../fable_modules/fable-library-js.5.
|
|
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";
|
|
10
10
|
import { Types_ftvType, Types_typeToString, Type } from "./Types.js";
|
|
11
|
-
import { exists as exists_1 } from "../fable_modules/fable-library-js.5.
|
|
12
|
-
import { value as value_4, toArray } from "../fable_modules/fable-library-js.5.
|
|
13
|
-
import { minElement, isEmpty } from "../fable_modules/fable-library-js.5.
|
|
14
|
-
import { min } from "../fable_modules/fable-library-js.5.
|
|
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";
|
|
15
15
|
|
|
16
16
|
const span = new Span(new Position(undefined, 0, 0), new Position(undefined, 0, 0));
|
|
17
17
|
|
|
@@ -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.
|
|
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.
|
|
4
|
-
import { fold } from "../fable_modules/fable-library-js.5.
|
|
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";
|
|
5
5
|
import { ParseException, ParseError } from "./Error.js";
|
|
6
|
-
import { isLetterOrDigit, isLetter } from "../fable_modules/fable-library-js.5.
|
|
7
|
-
import { map as map_1, toList as toList_1, fold as fold_2, forAll } from "../fable_modules/fable-library-js.5.
|
|
8
|
-
import { union, toList, ofList, FSharpSet__Contains, empty as empty_1, add } from "../fable_modules/fable-library-js.5.
|
|
9
|
-
import { curry4, defaultOf, disposeSafe, getEnumerator, Exception, curry2, comparePrimitives } from "../fable_modules/fable-library-js.5.
|
|
10
|
-
import { ofSeq, empty as empty_2, add as add_1, FSharpMap__ContainsKey, FSharpMap__get_Item } from "../fable_modules/fable-library-js.5.
|
|
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";
|
|
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.
|
|
13
|
+
import { FSharpRef } from "../fable_modules/fable-library-js.5.24.0/Types.js";
|
|
14
14
|
import { Span, Position } from "./Span.js";
|
|
15
|
-
import { addToSet, tryGetValue } from "../fable_modules/fable-library-js.5.
|
|
15
|
+
import { addToSet, tryGetValue } from "../fable_modules/fable-library-js.5.24.0/MapUtil.js";
|
|
16
16
|
|
|
17
17
|
const pathComparison = 4;
|
|
18
18
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
|
|
2
|
-
import { Record } from "../fable_modules/fable-library-js.5.
|
|
2
|
+
import { Record } from "../fable_modules/fable-library-js.5.24.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.
|
|
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";
|
|
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.
|
|
9
|
-
import { toList } from "../fable_modules/fable-library-js.5.
|
|
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";
|
|
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.
|
|
12
|
-
import { comparePrimitives } from "../fable_modules/fable-library-js.5.
|
|
13
|
-
import { toList as toList_1 } from "../fable_modules/fable-library-js.5.
|
|
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";
|
|
14
14
|
import { ofExterns } from "./HostInterop.js";
|
|
15
15
|
|
|
16
16
|
export class Session extends Record {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
|
|
2
|
-
import { isDigit, isLetterOrDigit, isLetter } from "../fable_modules/fable-library-js.5.
|
|
3
|
-
import { parse } from "../fable_modules/fable-library-js.5.
|
|
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";
|
|
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.
|
|
6
|
+
import { StringBuilder__Append_244C7CD6, StringBuilder_$ctor } from "../fable_modules/fable-library-js.5.24.0/System.Text.js";
|
|
7
7
|
import { ParseException, ParseError } from "./Error.js";
|
|
8
|
-
import { toString } from "../fable_modules/fable-library-js.5.
|
|
9
|
-
import { printf, toText, substring } from "../fable_modules/fable-library-js.5.
|
|
10
|
-
import { item } from "../fable_modules/fable-library-js.5.
|
|
11
|
-
import { toInt64_unchecked } from "../fable_modules/fable-library-js.5.
|
|
12
|
-
import { parse as parse_1 } from "../fable_modules/fable-library-js.5.
|
|
13
|
-
import { toList } from "../fable_modules/fable-library-js.5.
|
|
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";
|
|
14
14
|
|
|
15
15
|
function isIdentStart(c) {
|
|
16
16
|
if (isLetter(c)) {
|
|
@@ -267,7 +267,7 @@ function readInterpolatedRaw(sourceName, src, i, line, col) {
|
|
|
267
267
|
return [(contentLen <= 0) ? "" : substring(src, start, contentLen), idx, cLine, cCol];
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
-
|
|
270
|
+
function tokenizeCore(sourceName, startLine, startColumn, src) {
|
|
271
271
|
const tokens = [];
|
|
272
272
|
const indentStack = [];
|
|
273
273
|
void (indentStack.push(0));
|
|
@@ -1058,7 +1058,15 @@ export function tokenizeWithSourceNameAndOrigin(sourceName, startLine, startColu
|
|
|
1058
1058
|
addToken(TokenKind.Dedent, mkSpan(sourceName, line, col, 1), tokens);
|
|
1059
1059
|
}
|
|
1060
1060
|
addToken(TokenKind.EOF, mkSpan(sourceName, line, col, 1), tokens);
|
|
1061
|
-
return
|
|
1061
|
+
return tokens;
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
export function tokenizeArrayWithSourceNameAndOrigin(sourceName, startLine, startColumn, src) {
|
|
1065
|
+
return tokenizeCore(sourceName, startLine, startColumn, src).slice();
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
export function tokenizeWithSourceNameAndOrigin(sourceName, startLine, startColumn, src) {
|
|
1069
|
+
return toList(tokenizeCore(sourceName, startLine, startColumn, src));
|
|
1062
1070
|
}
|
|
1063
1071
|
|
|
1064
1072
|
export function tokenizeWithSourceName(sourceName, src) {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
|
|
2
|
-
import { class_type } from "../fable_modules/fable-library-js.5.
|
|
3
|
-
import {
|
|
4
|
-
import { equals } from "../fable_modules/fable-library-js.5.
|
|
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";
|
|
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.
|
|
9
|
-
import { isUpper } from "../fable_modules/fable-library-js.5.
|
|
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";
|
|
10
10
|
import { Ast_spanOfStmt, Attribute, MapEntry, Ast_spanOfExpr, InterpolatedPart, Expr, Ast_spanOfPattern, Pattern, Stmt, TypeDef, BackendImport, Param, TypeRef, Literal } from "./Ast.js";
|
|
11
|
-
import {
|
|
12
|
-
import { addToSet } from "../fable_modules/fable-library-js.5.
|
|
13
|
-
import { foldBack as foldBack_1, toList } from "../fable_modules/fable-library-js.5.
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
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";
|
|
17
17
|
|
|
18
18
|
class TokenStream {
|
|
19
19
|
constructor(tokens) {
|
|
@@ -26,7 +26,7 @@ function TokenStream_$reflection() {
|
|
|
26
26
|
return class_type("FScript.Language.Parser.TokenStream", undefined, TokenStream);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
function TokenStream_$
|
|
29
|
+
function TokenStream_$ctor_Z317EFDB2(tokens) {
|
|
30
30
|
return new TokenStream(tokens);
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -173,8 +173,8 @@ function parseLiteral(t) {
|
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
function parseProgramWithSourceNameAndOrigin(sourceName, startLine, startColumn, src) {
|
|
176
|
-
const tokens =
|
|
177
|
-
const stream = TokenStream_$
|
|
176
|
+
const tokens = tokenizeArrayWithSourceNameAndOrigin(sourceName, startLine, startColumn, src);
|
|
177
|
+
const stream = TokenStream_$ctor_Z317EFDB2(tokens);
|
|
178
178
|
const consumeLayoutSeparators = () => {
|
|
179
179
|
let consumed = false;
|
|
180
180
|
let progress = true;
|
|
@@ -224,7 +224,7 @@ function parseProgramWithSourceNameAndOrigin(sourceName, startLine, startColumn,
|
|
|
224
224
|
let i_3 = tokenIndex_1 + 1;
|
|
225
225
|
let keepSearching_1 = true;
|
|
226
226
|
let foundSameLine_1 = false;
|
|
227
|
-
while (keepSearching_1 && (i_3 < length
|
|
227
|
+
while (keepSearching_1 && (i_3 < tokens.length)) {
|
|
228
228
|
const tok_1 = TokenStream__TokenAt_Z524259A4(stream, i_3);
|
|
229
229
|
const matchValue_2 = tok_1.Kind;
|
|
230
230
|
switch (matchValue_2.tag) {
|
|
@@ -2341,7 +2341,7 @@ function parseProgramWithSourceNameAndOrigin(sourceName, startLine, startColumn,
|
|
|
2341
2341
|
return new Stmt(/* SLet */ 2, [bindingName_1, toList(args_5), returnAnnotation_2, value_79, true, isExported, mkSpanFrom(letTok_1.Span, Ast_spanOfExpr(value_79))]);
|
|
2342
2342
|
}
|
|
2343
2343
|
else {
|
|
2344
|
-
const patternInput_4 =
|
|
2344
|
+
const patternInput_4 = item(bindings_2.length - 1, bindings_2);
|
|
2345
2345
|
return new Stmt(/* SLetRecGroup */ 4, [toList(bindings_2), isExported, mkSpanFrom(letTok_1.Span, patternInput_4[4])]);
|
|
2346
2346
|
}
|
|
2347
2347
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
import { length, isEmpty, map, singleton, append } from "../fable_modules/fable-library-js.5.
|
|
3
|
-
import { concat, join, printf, toText, replace } from "../fable_modules/fable-library-js.5.
|
|
4
|
-
import { int64ToString } from "../fable_modules/fable-library-js.5.
|
|
5
|
-
import { toList } from "../fable_modules/fable-library-js.5.
|
|
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";
|
|
6
6
|
import { Types_typeToString } from "./Types.js";
|
|
7
7
|
|
|
8
8
|
function closureParameters(firstArg, body) {
|