@magnusopera/fscript 0.87.2 → 0.90.0
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/README.md +15 -0
- package/dist/FScript.Language/Ast.js +2 -2
- package/dist/FScript.Language/BuiltinFunctions.js +81 -69
- package/dist/FScript.Language/BuiltinSignatures.js +9 -8
- package/dist/FScript.Language/BuiltinTypes.js +1 -1
- package/dist/FScript.Language/Error.js +2 -2
- package/dist/FScript.Language/Eval.js +176 -127
- package/dist/FScript.Language/Execution.js +8 -7
- package/dist/FScript.Language/ExportSignatures.js +5 -5
- package/dist/FScript.Language/HostInterop.js +41 -11
- package/dist/FScript.Language/IncludeResolver.js +15 -19
- package/dist/FScript.Language/Interactive.js +9 -9
- package/dist/FScript.Language/Lexer.js +39 -39
- package/dist/FScript.Language/Parser.js +17 -17
- package/dist/FScript.Language/Pretty.js +5 -5
- package/dist/FScript.Language/Span.js +2 -2
- package/dist/FScript.Language/SupportCollections.js +2871 -0
- package/dist/FScript.Language/SupportLibrary.js +1998 -0
- package/dist/FScript.Language/TaskFunctions.js +51 -7
- package/dist/FScript.Language/TaskSharingAnalysis.js +310 -129
- package/dist/FScript.Language/Token.js +2 -2
- package/dist/FScript.Language/TypeInfer.js +21 -25
- package/dist/FScript.Language/Types.js +9 -9
- package/dist/FScript.Language/Value.js +11 -8
- package/dist/Library.js +54 -28
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Array.js +325 -198
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/BigInt.js +18 -6
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/CHANGELOG.md +64 -1
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Date.js +1 -1
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Decimal.js +33 -47
- package/dist/fable_modules/fable-library-js.5.27.0/Double.js +78 -0
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/FSharp.Core.js +7 -1
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Global.js +1 -1
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Int32.js +10 -1
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/List.js +230 -157
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Long.js +7 -2
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Map.js +46 -39
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/MutableMap.js +76 -96
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/MutableSet.js +58 -80
- package/dist/fable_modules/fable-library-js.5.27.0/NumberStyles.js +56 -0
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Numeric.js +72 -4
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Random.js +26 -17
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Range.js +4 -3
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Reflection.js +7 -1
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/RegExp.js +3 -2
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Seq.js +149 -70
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Seq2.js +4 -8
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Set.js +66 -59
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/String.js +160 -39
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/System.Collections.Generic.js +3 -2
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/System.Text.js +10 -10
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/System.js +5 -5
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/TimeOnly.js +1 -1
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Types.js +28 -10
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Util.js +151 -54
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/package.json +1 -1
- package/dist/fable_modules/project_cracked.json +1 -1
- package/package.json +1 -1
- package/dist/fable_modules/fable-library-js.5.24.0/Double.js +0 -53
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Async.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/AsyncBuilder.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/BitConverter.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Boolean.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Char.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Choice.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/CollectionUtil.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/ConditionalWeakTable.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/DateOffset.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/DateOnly.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/DateOnlyTemporal.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/DateTimeFormat.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/DateTimeOffsetTemporal.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/DateTimeTemporal.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Directory.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Encoding.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Environment.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Event.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/FSharp.Collections.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/FSharp.Core.CompilerServices.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/File.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Guid.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/MailboxProcessor.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/MapUtil.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Native.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Observable.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Option.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Path.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/README.md +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Result.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Stopwatch.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Task.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/TaskBuilder.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/TimeOnlyTemporal.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/TimeSpan.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/TimeSpanTemporal.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Timer.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Unicode.13.0.0.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Uri.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/big.d.ts +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/lib/big.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/quotation.js +0 -0
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
|
|
2
|
-
import { FSharpRef, Union, Record } from "../fable_modules/fable-library-js.5.
|
|
3
|
-
import { union_type, option_type, int32_type, list_type, bool_type, record_type, class_type, string_type } from "../fable_modules/fable-library-js.5.
|
|
4
|
-
import { fold as fold_2, contains, add as add_1, singleton as singleton_1, toList, FSharpSet__get_IsEmpty, difference, ofList as ofList_1, ofSeq, union, empty as empty_1 } from "../fable_modules/fable-library-js.5.
|
|
5
|
-
import { compareArrays, stringHash, clear, curry2, int32ToString, curry3, defaultOf, disposeSafe, getEnumerator, safeHash, arrayHash, equalArrays,
|
|
2
|
+
import { FSharpRef, Union, Record } from "../fable_modules/fable-library-js.5.27.0/Types.js";
|
|
3
|
+
import { union_type, option_type, int32_type, list_type, bool_type, record_type, class_type, string_type } from "../fable_modules/fable-library-js.5.27.0/Reflection.js";
|
|
4
|
+
import { fold as fold_2, contains, add as add_1, singleton as singleton_1, toList, FSharpSet__get_IsEmpty, difference, ofList as ofList_1, ofSeq, union, empty as empty_1 } from "../fable_modules/fable-library-js.5.27.0/Set.js";
|
|
5
|
+
import { compareArrays, stringHash, clear, curry2, int32ToString, curry3, defaultOf, disposeSafe, getEnumerator, safeHash, arrayHash, equalArrays, equals, compare, comparePrimitives } from "../fable_modules/fable-library-js.5.27.0/Util.js";
|
|
6
6
|
import { Span_$reflection } from "./Span.js";
|
|
7
7
|
import { ResolvedSymbolKind, ResolvedExpression_$reflection, ResolvedBinding_$reflection } from "./TypeInfer.js";
|
|
8
8
|
import { Type, Type_$reflection } from "./Types.js";
|
|
9
|
-
import { filter as filter_1, toList as toList_1, map as map_2, forAll, fold as fold_1, add, toSeq, tryFind, ofList, empty as empty_2 } from "../fable_modules/fable-library-js.5.
|
|
10
|
-
import { ofArrayWithTail, contains as contains_1, tryPick, tryItem, tryHead, ofSeq as ofSeq_1, mapIndexed, length, indexed, ofArray, append, cons, filter, choose, singleton, head, tail as tail_2, isEmpty, collect, fold, map, empty as empty_3 } from "../fable_modules/fable-library-js.5.
|
|
11
|
-
import { defaultArg } from "../fable_modules/fable-library-js.5.
|
|
12
|
-
import { sortBy, toArray, toList as toList_2, collect as collect_1, empty as empty_4, singleton as singleton_2, append as append_1, delay, map as map_1 } from "../fable_modules/fable-library-js.5.
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
9
|
+
import { filter as filter_1, toList as toList_1, map as map_2, forAll, fold as fold_1, add, toSeq, tryFind, ofList, empty as empty_2 } from "../fable_modules/fable-library-js.5.27.0/Map.js";
|
|
10
|
+
import { ofArrayWithTail, contains as contains_1, tryPick, tryItem, tryHead, ofSeq as ofSeq_1, mapIndexed, length, indexed, ofArray, append, cons, filter, choose, singleton, head, tail as tail_2, isEmpty, collect, fold, map, empty as empty_3 } from "../fable_modules/fable-library-js.5.27.0/List.js";
|
|
11
|
+
import { defaultArg } from "../fable_modules/fable-library-js.5.27.0/Option.js";
|
|
12
|
+
import { sortBy, toArray, toList as toList_2, collect as collect_1, empty as empty_4, singleton as singleton_2, append as append_1, delay, map as map_1 } from "../fable_modules/fable-library-js.5.27.0/Seq.js";
|
|
13
|
+
import { Operators_InvalidArg } from "../fable_modules/fable-library-js.5.27.0/FSharp.Core.js";
|
|
14
|
+
import { concat, join as join_1 } from "../fable_modules/fable-library-js.5.27.0/String.js";
|
|
15
|
+
import { HashSet } from "../fable_modules/fable-library-js.5.27.0/MutableSet.js";
|
|
16
|
+
import { Dictionary } from "../fable_modules/fable-library-js.5.27.0/MutableMap.js";
|
|
17
|
+
import { min, max } from "../fable_modules/fable-library-js.5.27.0/Double.js";
|
|
18
|
+
import { addToSet, addToDict, tryGetValue } from "../fable_modules/fable-library-js.5.27.0/MapUtil.js";
|
|
19
|
+
import { equals as equals_1 } from "../fable_modules/fable-library-js.5.27.0/BigInt.js";
|
|
20
|
+
import { addRangeInPlace } from "../fable_modules/fable-library-js.5.27.0/Array.js";
|
|
21
|
+
import { distinct as distinct_1 } from "../fable_modules/fable-library-js.5.27.0/Seq2.js";
|
|
21
22
|
import { builtinSchemes } from "./BuiltinSignatures.js";
|
|
22
|
-
import { rangeDouble } from "../fable_modules/fable-library-js.5.
|
|
23
|
+
import { rangeDouble } from "../fable_modules/fable-library-js.5.27.0/Range.js";
|
|
23
24
|
|
|
24
25
|
export class Options extends Record {
|
|
25
26
|
constructor(ThreadSafeTypes, ThreadSafeFunctions) {
|
|
@@ -187,7 +188,7 @@ export function analyze(registration, options, program) {
|
|
|
187
188
|
}));
|
|
188
189
|
const invalid = union(difference(options.ThreadSafeTypes, knownTypes), difference(options.ThreadSafeFunctions, knownFunctions));
|
|
189
190
|
if (!FSharpSet__get_IsEmpty(invalid)) {
|
|
190
|
-
throw
|
|
191
|
+
throw Operators_InvalidArg("options", "Unknown thread-safety contract names: " + join_1(", ", toList(invalid)));
|
|
191
192
|
}
|
|
192
193
|
const safeTypes = union(options.ThreadSafeTypes, program.Purity.PureTypes);
|
|
193
194
|
const safeFunctions = union(options.ThreadSafeFunctions, program.Purity.PureFunctions);
|
|
@@ -229,10 +230,8 @@ export function analyze(registration, options, program) {
|
|
|
229
230
|
const resource = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
230
231
|
let history;
|
|
231
232
|
let matchValue_1;
|
|
232
|
-
|
|
233
|
-
matchValue_1 = [tryGetValue(histories, resource,
|
|
234
|
-
outArg = v;
|
|
235
|
-
})), outArg];
|
|
233
|
+
const cell = new FSharpRef(defaultOf());
|
|
234
|
+
matchValue_1 = [tryGetValue(histories, resource, cell), cell.contents];
|
|
236
235
|
if (matchValue_1[0]) {
|
|
237
236
|
history = matchValue_1[1];
|
|
238
237
|
}
|
|
@@ -783,10 +782,8 @@ export function analyze(registration, options, program) {
|
|
|
783
782
|
const values_14 = forLoopVar_4[1];
|
|
784
783
|
const key_9 = forLoopVar_4[0];
|
|
785
784
|
let matchValue_22;
|
|
786
|
-
|
|
787
|
-
matchValue_22 = [tryGetValue(histories, key_9,
|
|
788
|
-
outArg_1 = v_1;
|
|
789
|
-
})), outArg_1];
|
|
785
|
+
const cell_1 = new FSharpRef(defaultOf());
|
|
786
|
+
matchValue_22 = [tryGetValue(histories, key_9, cell_1), cell_1.contents];
|
|
790
787
|
if (matchValue_22[0]) {
|
|
791
788
|
addRangeInPlace(values_14, matchValue_22[1]);
|
|
792
789
|
}
|
|
@@ -931,87 +928,271 @@ export function analyze(registration, options, program) {
|
|
|
931
928
|
}
|
|
932
929
|
})));
|
|
933
930
|
const invokeFunction = (span_2) => ((resultType_1) => ((name_9) => ((external_1) => ((arguments$_2) => {
|
|
934
|
-
let
|
|
935
|
-
|
|
931
|
+
let option_27;
|
|
932
|
+
const completed = (value_40) => choose((id_4) => {
|
|
933
|
+
let matchValue_25;
|
|
934
|
+
const cell_2 = new FSharpRef(defaultOf());
|
|
935
|
+
matchValue_25 = [tryGetValue(tasks, id_4, cell_2), cell_2.contents];
|
|
936
|
+
if (matchValue_25[0]) {
|
|
937
|
+
return matchValue_25[1];
|
|
938
|
+
}
|
|
939
|
+
else {
|
|
940
|
+
return undefined;
|
|
941
|
+
}
|
|
942
|
+
}, toList(value_40.Tasks));
|
|
943
|
+
const join = (completions) => {
|
|
944
|
+
let list_41;
|
|
945
|
+
if (!isEmpty(completions)) {
|
|
946
|
+
clock = mergeClock(clock, (list_41 = map((tuple_12) => tuple_12[0], completions), fold(mergeClock, empty_2({
|
|
947
|
+
Compare: (x_24, y_24) => (comparePrimitives(x_24, y_24) | 0),
|
|
948
|
+
}), list_41)));
|
|
949
|
+
}
|
|
950
|
+
tick();
|
|
951
|
+
};
|
|
952
|
+
const ready = (value_41) => {
|
|
953
|
+
nextTask = ((nextTask + 1) | 0);
|
|
954
|
+
tasks.set(nextTask, [clock, value_41]);
|
|
955
|
+
return new AbstractValue(empty.Resources, empty.Fields, empty.Callables, singleton_1(nextTask, {
|
|
956
|
+
Compare: (x_25, y_25) => (comparePrimitives(x_25, y_25) | 0),
|
|
957
|
+
}), empty.Count);
|
|
958
|
+
};
|
|
959
|
+
const fork = (callback, run) => {
|
|
960
|
+
const task_1 = task | 0;
|
|
961
|
+
const clock_3 = clock;
|
|
962
|
+
tick();
|
|
963
|
+
const forkClock = clock;
|
|
964
|
+
nextTask = ((nextTask + 1) | 0);
|
|
965
|
+
const child_1 = nextTask | 0;
|
|
966
|
+
task = (child_1 | 0);
|
|
967
|
+
clock = add(child_1, 0, forkClock);
|
|
968
|
+
const result_2 = run((argument_5) => {
|
|
969
|
+
access(defaultArg(tryHead(callSites), span_2), callback.Resources);
|
|
970
|
+
return apply(span_2)((resultType_1.tag === 6) ? resultType_1.fields[0] : Type.TUnit)(callback)(argument_5);
|
|
971
|
+
});
|
|
972
|
+
tasks.set(child_1, [clock, result_2]);
|
|
973
|
+
task = (task_1 | 0);
|
|
974
|
+
clock = mergeClock(clock_3, forkClock);
|
|
975
|
+
tick();
|
|
976
|
+
return new AbstractValue(empty.Resources, empty.Fields, empty.Callables, singleton_1(child_1, {
|
|
977
|
+
Compare: (x_26, y_26) => (comparePrimitives(x_26, y_26) | 0),
|
|
978
|
+
}), empty.Count);
|
|
979
|
+
};
|
|
980
|
+
let matchResult_5, value_42, callback_1, value_43, callback_2, values_18, callback_3, values_20, values_21, thunk, value_45;
|
|
936
981
|
switch (name_9) {
|
|
937
|
-
case "Task.
|
|
982
|
+
case "Task.fromResult": {
|
|
938
983
|
if (!isEmpty(arguments$_2)) {
|
|
939
984
|
if (isEmpty(tail_2(arguments$_2))) {
|
|
940
985
|
matchResult_5 = 0;
|
|
986
|
+
value_42 = head(arguments$_2);
|
|
987
|
+
}
|
|
988
|
+
else {
|
|
989
|
+
matchResult_5 = 8;
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
else {
|
|
993
|
+
matchResult_5 = 8;
|
|
994
|
+
}
|
|
995
|
+
break;
|
|
996
|
+
}
|
|
997
|
+
case "Task.delay": {
|
|
998
|
+
if (!isEmpty(arguments$_2)) {
|
|
999
|
+
if (isEmpty(tail_2(arguments$_2))) {
|
|
1000
|
+
matchResult_5 = 1;
|
|
1001
|
+
}
|
|
1002
|
+
else {
|
|
1003
|
+
matchResult_5 = 8;
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
else {
|
|
1007
|
+
matchResult_5 = 8;
|
|
1008
|
+
}
|
|
1009
|
+
break;
|
|
1010
|
+
}
|
|
1011
|
+
case "Task.continueWith": {
|
|
1012
|
+
if (!isEmpty(arguments$_2)) {
|
|
1013
|
+
if (!isEmpty(tail_2(arguments$_2))) {
|
|
1014
|
+
if (isEmpty(tail_2(tail_2(arguments$_2)))) {
|
|
1015
|
+
matchResult_5 = 2;
|
|
1016
|
+
callback_1 = head(arguments$_2);
|
|
1017
|
+
value_43 = head(tail_2(arguments$_2));
|
|
1018
|
+
}
|
|
1019
|
+
else {
|
|
1020
|
+
matchResult_5 = 8;
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
else {
|
|
1024
|
+
matchResult_5 = 8;
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
else {
|
|
1028
|
+
matchResult_5 = 8;
|
|
1029
|
+
}
|
|
1030
|
+
break;
|
|
1031
|
+
}
|
|
1032
|
+
case "Task.whenAll": {
|
|
1033
|
+
if (!isEmpty(arguments$_2)) {
|
|
1034
|
+
if (!isEmpty(tail_2(arguments$_2))) {
|
|
1035
|
+
if (isEmpty(tail_2(tail_2(arguments$_2)))) {
|
|
1036
|
+
matchResult_5 = 3;
|
|
1037
|
+
callback_2 = head(arguments$_2);
|
|
1038
|
+
values_18 = head(tail_2(arguments$_2));
|
|
1039
|
+
}
|
|
1040
|
+
else {
|
|
1041
|
+
matchResult_5 = 8;
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
else {
|
|
1045
|
+
matchResult_5 = 8;
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
else {
|
|
1049
|
+
matchResult_5 = 8;
|
|
1050
|
+
}
|
|
1051
|
+
break;
|
|
1052
|
+
}
|
|
1053
|
+
case "Task.whenAny": {
|
|
1054
|
+
if (!isEmpty(arguments$_2)) {
|
|
1055
|
+
if (!isEmpty(tail_2(arguments$_2))) {
|
|
1056
|
+
if (isEmpty(tail_2(tail_2(arguments$_2)))) {
|
|
1057
|
+
matchResult_5 = 4;
|
|
1058
|
+
callback_3 = head(arguments$_2);
|
|
1059
|
+
values_20 = head(tail_2(arguments$_2));
|
|
1060
|
+
}
|
|
1061
|
+
else {
|
|
1062
|
+
matchResult_5 = 8;
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
else {
|
|
1066
|
+
matchResult_5 = 8;
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
else {
|
|
1070
|
+
matchResult_5 = 8;
|
|
1071
|
+
}
|
|
1072
|
+
break;
|
|
1073
|
+
}
|
|
1074
|
+
case "Task.awaitAll": {
|
|
1075
|
+
if (!isEmpty(arguments$_2)) {
|
|
1076
|
+
if (isEmpty(tail_2(arguments$_2))) {
|
|
1077
|
+
matchResult_5 = 5;
|
|
1078
|
+
values_21 = head(arguments$_2);
|
|
1079
|
+
}
|
|
1080
|
+
else {
|
|
1081
|
+
matchResult_5 = 8;
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
else {
|
|
1085
|
+
matchResult_5 = 8;
|
|
1086
|
+
}
|
|
1087
|
+
break;
|
|
1088
|
+
}
|
|
1089
|
+
case "Task.spawn": {
|
|
1090
|
+
if (!isEmpty(arguments$_2)) {
|
|
1091
|
+
if (isEmpty(tail_2(arguments$_2))) {
|
|
1092
|
+
matchResult_5 = 6;
|
|
941
1093
|
thunk = head(arguments$_2);
|
|
942
1094
|
}
|
|
943
1095
|
else {
|
|
944
|
-
matchResult_5 =
|
|
1096
|
+
matchResult_5 = 8;
|
|
945
1097
|
}
|
|
946
1098
|
}
|
|
947
1099
|
else {
|
|
948
|
-
matchResult_5 =
|
|
1100
|
+
matchResult_5 = 8;
|
|
949
1101
|
}
|
|
950
1102
|
break;
|
|
951
1103
|
}
|
|
952
1104
|
case "Task.await": {
|
|
953
1105
|
if (!isEmpty(arguments$_2)) {
|
|
954
1106
|
if (isEmpty(tail_2(arguments$_2))) {
|
|
955
|
-
matchResult_5 =
|
|
956
|
-
|
|
1107
|
+
matchResult_5 = 7;
|
|
1108
|
+
value_45 = head(arguments$_2);
|
|
957
1109
|
}
|
|
958
1110
|
else {
|
|
959
|
-
matchResult_5 =
|
|
1111
|
+
matchResult_5 = 8;
|
|
960
1112
|
}
|
|
961
1113
|
}
|
|
962
1114
|
else {
|
|
963
|
-
matchResult_5 =
|
|
1115
|
+
matchResult_5 = 8;
|
|
964
1116
|
}
|
|
965
1117
|
break;
|
|
966
1118
|
}
|
|
967
1119
|
default:
|
|
968
|
-
matchResult_5 =
|
|
1120
|
+
matchResult_5 = 8;
|
|
969
1121
|
}
|
|
970
1122
|
switch (matchResult_5) {
|
|
971
|
-
case 0:
|
|
972
|
-
|
|
973
|
-
|
|
1123
|
+
case 0:
|
|
1124
|
+
return ready(value_42);
|
|
1125
|
+
case 1:
|
|
1126
|
+
return ready(empty);
|
|
1127
|
+
case 2: {
|
|
1128
|
+
const completions_1 = completed(value_43);
|
|
1129
|
+
return fork(callback_1, (invoke_1) => {
|
|
1130
|
+
join(completions_1);
|
|
1131
|
+
return invoke_1(combine(map((tuple_13) => tuple_13[1], completions_1)));
|
|
1132
|
+
});
|
|
1133
|
+
}
|
|
1134
|
+
case 3: {
|
|
1135
|
+
const completions_2 = completed(contents(values_18));
|
|
1136
|
+
return fork(callback_2, (invoke_2) => {
|
|
1137
|
+
join(completions_2);
|
|
1138
|
+
return invoke_2(container("$items", values_18.Count, combine(map((tuple_14) => tuple_14[1], completions_2))));
|
|
1139
|
+
});
|
|
1140
|
+
}
|
|
1141
|
+
case 4: {
|
|
1142
|
+
const completions_3 = completed(contents(values_20));
|
|
1143
|
+
return fork(callback_3, (invoke_3) => (isEmpty(completions_3) ? invoke_3(contents(values_20)) : branches(map((tupledArg_10) => (() => {
|
|
1144
|
+
const value_44 = tupledArg_10[1];
|
|
1145
|
+
join(singleton([tupledArg_10[0], value_44]));
|
|
1146
|
+
return invoke_3(value_44);
|
|
1147
|
+
}), completions_3))));
|
|
1148
|
+
}
|
|
1149
|
+
case 5: {
|
|
1150
|
+
const completions_4 = completed(contents(values_21));
|
|
1151
|
+
join(completions_4);
|
|
1152
|
+
return container("$items", values_21.Count, combine(map((tuple_15) => tuple_15[1], completions_4)));
|
|
1153
|
+
}
|
|
1154
|
+
case 6: {
|
|
1155
|
+
const task_2 = task | 0;
|
|
1156
|
+
const clock_4 = clock;
|
|
974
1157
|
tick();
|
|
975
|
-
const
|
|
1158
|
+
const forkClock_1 = clock;
|
|
976
1159
|
nextTask = ((nextTask + 1) | 0);
|
|
977
|
-
const
|
|
978
|
-
task = (
|
|
979
|
-
clock = add(
|
|
1160
|
+
const child_2 = nextTask | 0;
|
|
1161
|
+
task = (child_2 | 0);
|
|
1162
|
+
clock = add(child_2, 0, forkClock_1);
|
|
980
1163
|
access(defaultArg(tryHead(callSites), span_2), thunk.Resources);
|
|
981
|
-
const
|
|
982
|
-
tasks.set(
|
|
983
|
-
task = (
|
|
984
|
-
clock = mergeClock(
|
|
1164
|
+
const result_3 = apply(span_2)((resultType_1.tag === 6) ? resultType_1.fields[0] : Type.TUnit)(thunk)(empty);
|
|
1165
|
+
tasks.set(child_2, [clock, result_3]);
|
|
1166
|
+
task = (task_2 | 0);
|
|
1167
|
+
clock = mergeClock(clock_4, forkClock_1);
|
|
985
1168
|
tick();
|
|
986
|
-
return new AbstractValue(empty.Resources, empty.Fields, empty.Callables, singleton_1(
|
|
987
|
-
Compare: (
|
|
1169
|
+
return new AbstractValue(empty.Resources, empty.Fields, empty.Callables, singleton_1(child_2, {
|
|
1170
|
+
Compare: (x_27, y_27) => (comparePrimitives(x_27, y_27) | 0),
|
|
988
1171
|
}), empty.Count);
|
|
989
1172
|
}
|
|
990
|
-
case
|
|
991
|
-
const
|
|
992
|
-
let
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
if (matchValue_26[0]) {
|
|
998
|
-
return matchValue_26[1];
|
|
1173
|
+
case 7: {
|
|
1174
|
+
const completed_1 = choose((id_5) => {
|
|
1175
|
+
let matchValue_27;
|
|
1176
|
+
const cell_3 = new FSharpRef(defaultOf());
|
|
1177
|
+
matchValue_27 = [tryGetValue(tasks, id_5, cell_3), cell_3.contents];
|
|
1178
|
+
if (matchValue_27[0]) {
|
|
1179
|
+
return matchValue_27[1];
|
|
999
1180
|
}
|
|
1000
1181
|
else {
|
|
1001
1182
|
return undefined;
|
|
1002
1183
|
}
|
|
1003
|
-
}, toList(
|
|
1004
|
-
if (!isEmpty(
|
|
1005
|
-
clock = mergeClock(clock, commonClock(map((
|
|
1184
|
+
}, toList(value_45.Tasks));
|
|
1185
|
+
if (!isEmpty(completed_1)) {
|
|
1186
|
+
clock = mergeClock(clock, commonClock(map((tuple_16) => tuple_16[0], completed_1)));
|
|
1006
1187
|
}
|
|
1007
1188
|
tick();
|
|
1008
|
-
return combine(map((
|
|
1189
|
+
return combine(map((tuple_17) => tuple_17[1], completed_1));
|
|
1009
1190
|
}
|
|
1010
1191
|
default: {
|
|
1011
|
-
const
|
|
1192
|
+
const inputs_1 = combine(arguments$_2);
|
|
1012
1193
|
if (external_1 && !contains(name_9, safeFunctions)) {
|
|
1013
|
-
const
|
|
1014
|
-
access(span_2,
|
|
1194
|
+
const arg_19 = add_1(new Resource("function:" + name_9, name_9, true), inputs_1.Resources);
|
|
1195
|
+
access(span_2, arg_19);
|
|
1015
1196
|
}
|
|
1016
1197
|
const parameterTypes = (_arg_14) => {
|
|
1017
1198
|
if (_arg_14.tag === 11) {
|
|
@@ -1021,21 +1202,21 @@ export function analyze(registration, options, program) {
|
|
|
1021
1202
|
return empty_3();
|
|
1022
1203
|
}
|
|
1023
1204
|
};
|
|
1024
|
-
const signature_1 = defaultArg((
|
|
1025
|
-
const items_1 = combine(map(contents, filter((
|
|
1026
|
-
const callbackResults = collect((
|
|
1027
|
-
let
|
|
1028
|
-
const
|
|
1029
|
-
const callbackParameters = defaultArg((
|
|
1030
|
-
if (isEmpty(
|
|
1205
|
+
const signature_1 = defaultArg((option_27 = tryFind(name_9, builtinSchemes), (option_27 != null) ? parameterTypes(option_27.fields[1]) : undefined), empty_3());
|
|
1206
|
+
const items_1 = combine(map(contents, filter((value_47) => isEmpty(value_47.Callables), arguments$_2)));
|
|
1207
|
+
const callbackResults = collect((tupledArg_11) => {
|
|
1208
|
+
let option_30, option_33;
|
|
1209
|
+
const callback_4 = tupledArg_11[1];
|
|
1210
|
+
const callbackParameters = defaultArg((option_30 = tryItem(tupledArg_11[0], signature_1), (option_30 != null) ? parameterTypes(option_30) : undefined), empty_3());
|
|
1211
|
+
if (isEmpty(callback_4.Callables) ? true : isEmpty(callbackParameters)) {
|
|
1031
1212
|
return empty_3();
|
|
1032
1213
|
}
|
|
1033
1214
|
else {
|
|
1034
|
-
const iterations = ((name_9.startsWith("List.") ? true : name_9.startsWith("Map.")) ? defaultArg((
|
|
1035
|
-
return toList_2(delay(() => collect_1((
|
|
1215
|
+
const iterations = ((name_9.startsWith("List.") ? true : name_9.startsWith("Map.")) ? defaultArg((option_33 = tryPick((_arg_16) => _arg_16.Count, arguments$_2), (option_33 != null) ? min(2, option_33) : undefined), 2) : 1) | 0;
|
|
1216
|
+
return toList_2(delay(() => collect_1((matchValue_28) => singleton_2(fold((fn_5, typ_13) => apply(span_2)(typ_13)(fn_5)(items_1), callback_4, callbackParameters)), rangeDouble(1, 1, iterations))));
|
|
1036
1217
|
}
|
|
1037
1218
|
}, indexed(arguments$_2));
|
|
1038
|
-
const
|
|
1219
|
+
const result_6 = unknown("result:" + name_9, resultType_1);
|
|
1039
1220
|
let matchResult_6;
|
|
1040
1221
|
switch (resultType_1.tag) {
|
|
1041
1222
|
case 0:
|
|
@@ -1076,13 +1257,13 @@ export function analyze(registration, options, program) {
|
|
|
1076
1257
|
return empty;
|
|
1077
1258
|
case 1:
|
|
1078
1259
|
return container("$items", tryPick((_arg_17) => _arg_17.Count, arguments$_2), contains_1(name_9, ofArray(["List.map", "List.choose", "List.collect"]), {
|
|
1079
|
-
Equals: (
|
|
1080
|
-
GetHashCode: (
|
|
1081
|
-
}) ? combine(map(contents, callbackResults)) : combine(ofArray([items_1, contents(
|
|
1260
|
+
Equals: (x_28, y_28) => (x_28 === y_28),
|
|
1261
|
+
GetHashCode: (x_28) => (stringHash(x_28) | 0),
|
|
1262
|
+
}) ? combine(map(contents, callbackResults)) : combine(ofArray([items_1, contents(result_6)])));
|
|
1082
1263
|
case 2:
|
|
1083
|
-
return container("$value", undefined, (name_9 === "Option.map") ? combine(callbackResults) : combine(ofArray([items_1, contents(
|
|
1264
|
+
return container("$value", undefined, (name_9 === "Option.map") ? combine(callbackResults) : combine(ofArray([items_1, contents(result_6)])));
|
|
1084
1265
|
case 3:
|
|
1085
|
-
return container("$items", undefined, combine(ofArrayWithTail([contents(
|
|
1266
|
+
return container("$items", undefined, combine(ofArrayWithTail([contents(inputs_1), result_6], callbackResults)));
|
|
1086
1267
|
case 4: {
|
|
1087
1268
|
const arity_2 = (_arg_18) => {
|
|
1088
1269
|
if (_arg_18.tag === 11) {
|
|
@@ -1092,42 +1273,42 @@ export function analyze(registration, options, program) {
|
|
|
1092
1273
|
return 0;
|
|
1093
1274
|
}
|
|
1094
1275
|
};
|
|
1095
|
-
const bind$0040_5 = combine(ofArray([
|
|
1276
|
+
const bind$0040_5 = combine(ofArray([result_6, inputs_1]));
|
|
1096
1277
|
return new AbstractValue(bind$0040_5.Resources, bind$0040_5.Fields, singleton(new Callable(/* Function */ 1, [name_9 + " (returned function)", arity_2(resultType_1), true, resultType_1, empty_3()])), bind$0040_5.Tasks, bind$0040_5.Count);
|
|
1097
1278
|
}
|
|
1098
1279
|
default:
|
|
1099
|
-
return combine(ofArrayWithTail([
|
|
1280
|
+
return combine(ofArrayWithTail([result_6, inputs_1], callbackResults));
|
|
1100
1281
|
}
|
|
1101
1282
|
}
|
|
1102
1283
|
}
|
|
1103
1284
|
}))));
|
|
1104
1285
|
let environment = empty_2({
|
|
1105
|
-
Compare: (
|
|
1286
|
+
Compare: (x_29, y_29) => (comparePrimitives(x_29, y_29) | 0),
|
|
1106
1287
|
});
|
|
1107
1288
|
const entryFunctions = [];
|
|
1108
|
-
const remember = (binding_7,
|
|
1109
|
-
environment = add(binding_7.SymbolId,
|
|
1110
|
-
if (!isEmpty(
|
|
1111
|
-
void (entryFunctions.push([
|
|
1289
|
+
const remember = (binding_7, value_52) => {
|
|
1290
|
+
environment = add(binding_7.SymbolId, value_52, environment);
|
|
1291
|
+
if (!isEmpty(value_52.Callables)) {
|
|
1292
|
+
void (entryFunctions.push([value_52, binding_7.Type, binding_7.Span]));
|
|
1112
1293
|
}
|
|
1113
1294
|
};
|
|
1114
1295
|
const enumerator_9 = getEnumerator(program.ResolvedStatements);
|
|
1115
1296
|
try {
|
|
1116
1297
|
while (enumerator_9["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1117
|
-
const
|
|
1118
|
-
switch (
|
|
1298
|
+
const matchValue_29 = enumerator_9["System.Collections.Generic.IEnumerator`1.get_Current"]().Node;
|
|
1299
|
+
switch (matchValue_29.tag) {
|
|
1119
1300
|
case 1: {
|
|
1120
|
-
const declaration_2 =
|
|
1121
|
-
const
|
|
1122
|
-
remember(declaration_2.Binding,
|
|
1301
|
+
const declaration_2 = matchValue_29.fields[0];
|
|
1302
|
+
const value_53 = evaluate(environment)(declaration_2.Value);
|
|
1303
|
+
remember(declaration_2.Binding, value_53);
|
|
1123
1304
|
if (declaration_2.IsRecursive) {
|
|
1124
|
-
wireRecursive(environment)(singleton(
|
|
1305
|
+
wireRecursive(environment)(singleton(value_53));
|
|
1125
1306
|
}
|
|
1126
1307
|
break;
|
|
1127
1308
|
}
|
|
1128
1309
|
case 3: {
|
|
1129
|
-
const
|
|
1130
|
-
const enumerator_10 = getEnumerator(
|
|
1310
|
+
const values_28 = map((declaration_3) => [declaration_3, evaluate(environment)(declaration_3.Value)], matchValue_29.fields[0]);
|
|
1311
|
+
const enumerator_10 = getEnumerator(values_28);
|
|
1131
1312
|
try {
|
|
1132
1313
|
while (enumerator_10["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1133
1314
|
const forLoopVar_5 = enumerator_10["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
@@ -1137,51 +1318,51 @@ export function analyze(registration, options, program) {
|
|
|
1137
1318
|
finally {
|
|
1138
1319
|
disposeSafe(enumerator_10);
|
|
1139
1320
|
}
|
|
1140
|
-
wireRecursive(environment)(map((
|
|
1321
|
+
wireRecursive(environment)(map((tuple_18) => tuple_18[1], values_28));
|
|
1141
1322
|
break;
|
|
1142
1323
|
}
|
|
1143
1324
|
case 2: {
|
|
1144
|
-
const declaration_5 =
|
|
1145
|
-
const
|
|
1146
|
-
const bound = bindPattern(environment, declaration_5.Pattern,
|
|
1325
|
+
const declaration_5 = matchValue_29.fields[0];
|
|
1326
|
+
const value_55 = evaluate(environment)(declaration_5.Value);
|
|
1327
|
+
const bound = bindPattern(environment, declaration_5.Pattern, value_55);
|
|
1147
1328
|
const bindings_1 = (pattern_6_mut) => {
|
|
1148
1329
|
bindings_1:
|
|
1149
1330
|
while (true) {
|
|
1150
1331
|
const pattern_6 = pattern_6_mut;
|
|
1151
|
-
let
|
|
1152
|
-
const
|
|
1332
|
+
let option_36;
|
|
1333
|
+
const matchValue_30 = pattern_6.Node;
|
|
1153
1334
|
let matchResult_7, binding_8, patterns_1, fields_7, a_2, b_2, item_4, entries_2, tail_1;
|
|
1154
|
-
switch (
|
|
1335
|
+
switch (matchValue_30.tag) {
|
|
1155
1336
|
case 1: {
|
|
1156
1337
|
matchResult_7 = 0;
|
|
1157
|
-
binding_8 =
|
|
1338
|
+
binding_8 = matchValue_30.fields[0];
|
|
1158
1339
|
break;
|
|
1159
1340
|
}
|
|
1160
1341
|
case 5: {
|
|
1161
1342
|
matchResult_7 = 1;
|
|
1162
|
-
patterns_1 =
|
|
1343
|
+
patterns_1 = matchValue_30.fields[0];
|
|
1163
1344
|
break;
|
|
1164
1345
|
}
|
|
1165
1346
|
case 6: {
|
|
1166
1347
|
matchResult_7 = 2;
|
|
1167
|
-
fields_7 =
|
|
1348
|
+
fields_7 = matchValue_30.fields[0];
|
|
1168
1349
|
break;
|
|
1169
1350
|
}
|
|
1170
1351
|
case 4: {
|
|
1171
1352
|
matchResult_7 = 3;
|
|
1172
|
-
a_2 =
|
|
1173
|
-
b_2 =
|
|
1353
|
+
a_2 = matchValue_30.fields[0];
|
|
1354
|
+
b_2 = matchValue_30.fields[1];
|
|
1174
1355
|
break;
|
|
1175
1356
|
}
|
|
1176
1357
|
case 8: {
|
|
1177
1358
|
matchResult_7 = 4;
|
|
1178
|
-
item_4 =
|
|
1359
|
+
item_4 = matchValue_30.fields[0];
|
|
1179
1360
|
break;
|
|
1180
1361
|
}
|
|
1181
1362
|
case 10: {
|
|
1182
|
-
if (
|
|
1363
|
+
if (matchValue_30.fields[2] != null) {
|
|
1183
1364
|
matchResult_7 = 4;
|
|
1184
|
-
item_4 =
|
|
1365
|
+
item_4 = matchValue_30.fields[2];
|
|
1185
1366
|
}
|
|
1186
1367
|
else {
|
|
1187
1368
|
matchResult_7 = 6;
|
|
@@ -1190,8 +1371,8 @@ export function analyze(registration, options, program) {
|
|
|
1190
1371
|
}
|
|
1191
1372
|
case 7: {
|
|
1192
1373
|
matchResult_7 = 5;
|
|
1193
|
-
entries_2 =
|
|
1194
|
-
tail_1 =
|
|
1374
|
+
entries_2 = matchValue_30.fields[0];
|
|
1375
|
+
tail_1 = matchValue_30.fields[1];
|
|
1195
1376
|
break;
|
|
1196
1377
|
}
|
|
1197
1378
|
default:
|
|
@@ -1203,7 +1384,7 @@ export function analyze(registration, options, program) {
|
|
|
1203
1384
|
case 1:
|
|
1204
1385
|
return collect(bindings_1, patterns_1);
|
|
1205
1386
|
case 2:
|
|
1206
|
-
return collect((
|
|
1387
|
+
return collect((arg_20) => bindings_1(arg_20[1]), fields_7);
|
|
1207
1388
|
case 3:
|
|
1208
1389
|
return append(bindings_1(a_2), bindings_1(b_2));
|
|
1209
1390
|
case 4: {
|
|
@@ -1211,7 +1392,7 @@ export function analyze(registration, options, program) {
|
|
|
1211
1392
|
continue bindings_1;
|
|
1212
1393
|
}
|
|
1213
1394
|
case 5:
|
|
1214
|
-
return append(collect((
|
|
1395
|
+
return append(collect((tupledArg_12) => append(bindings_1(tupledArg_12[0]), bindings_1(tupledArg_12[1])), entries_2), defaultArg((option_36 = tail_1, (option_36 != null) ? bindings_1(option_36) : undefined), empty_3()));
|
|
1215
1396
|
default:
|
|
1216
1397
|
return empty_3();
|
|
1217
1398
|
}
|
|
@@ -1219,17 +1400,17 @@ export function analyze(registration, options, program) {
|
|
|
1219
1400
|
}
|
|
1220
1401
|
};
|
|
1221
1402
|
const patternIds = ofList(map((binding_9) => [binding_9.Name, binding_9.SymbolId], bindings_1(declaration_5.Pattern)), {
|
|
1222
|
-
Compare: (
|
|
1403
|
+
Compare: (x_30, y_30) => (comparePrimitives(x_30, y_30) | 0),
|
|
1223
1404
|
});
|
|
1224
|
-
environment = fold((env_9,
|
|
1225
|
-
let
|
|
1226
|
-
const binding_10 =
|
|
1227
|
-
return add(binding_10.SymbolId, defaultArg((
|
|
1405
|
+
environment = fold((env_9, tupledArg_13) => {
|
|
1406
|
+
let option_39;
|
|
1407
|
+
const binding_10 = tupledArg_13[0];
|
|
1408
|
+
return add(binding_10.SymbolId, defaultArg((option_39 = tryFind(binding_10.Name, patternIds), (option_39 != null) ? tryFind(option_39, bound) : undefined), value_55), env_9);
|
|
1228
1409
|
}, bound, declaration_5.Bindings);
|
|
1229
1410
|
break;
|
|
1230
1411
|
}
|
|
1231
1412
|
case 5: {
|
|
1232
|
-
evaluate(environment)(
|
|
1413
|
+
evaluate(environment)(matchValue_29.fields[0]);
|
|
1233
1414
|
break;
|
|
1234
1415
|
}
|
|
1235
1416
|
default:
|
|
@@ -1250,16 +1431,16 @@ export function analyze(registration, options, program) {
|
|
|
1250
1431
|
activeCalls.clear();
|
|
1251
1432
|
task = 0;
|
|
1252
1433
|
clock = ofList(singleton([0, 0]), {
|
|
1253
|
-
Compare: (
|
|
1434
|
+
Compare: (x_31, y_31) => (comparePrimitives(x_31, y_31) | 0),
|
|
1254
1435
|
});
|
|
1255
|
-
const enter = (
|
|
1436
|
+
const enter = (value_61_mut, typ_15_mut, index_4_mut) => {
|
|
1256
1437
|
enter:
|
|
1257
1438
|
while (true) {
|
|
1258
|
-
const
|
|
1259
|
-
if (
|
|
1260
|
-
const
|
|
1261
|
-
|
|
1262
|
-
|
|
1439
|
+
const value_61 = value_61_mut, typ_15 = typ_15_mut, index_4 = index_4_mut;
|
|
1440
|
+
if (typ_15.tag === 11) {
|
|
1441
|
+
const result_8 = typ_15.fields[1];
|
|
1442
|
+
value_61_mut = apply(span_3)(result_8)(value_61)(unknown((("entry:" + int32ToString(index_4)) + ":") + int32ToString(span_3.Start.Line), typ_15.fields[0]));
|
|
1443
|
+
typ_15_mut = result_8;
|
|
1263
1444
|
index_4_mut = (index_4 + 1);
|
|
1264
1445
|
continue enter;
|
|
1265
1446
|
}
|
|
@@ -1274,9 +1455,9 @@ export function analyze(registration, options, program) {
|
|
|
1274
1455
|
}
|
|
1275
1456
|
return toList_2(sortBy((diagnostic) => [diagnostic.Span.Start.File, diagnostic.Span.Start.Line, diagnostic.Span.Start.Column, diagnostic.Code, diagnostic.RelatedSpan.Start.Line], distinct_1(diagnostics, {
|
|
1276
1457
|
Equals: equals,
|
|
1277
|
-
GetHashCode: (
|
|
1458
|
+
GetHashCode: (x_32) => (safeHash(x_32) | 0),
|
|
1278
1459
|
}), {
|
|
1279
|
-
Compare: (
|
|
1460
|
+
Compare: (x_33, y_33) => (compareArrays(x_33, y_33) | 0),
|
|
1280
1461
|
}));
|
|
1281
1462
|
}
|
|
1282
1463
|
|