@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.
- package/README.md +15 -0
- package/dist/FScript.Language/Ast.js +2 -2
- package/dist/FScript.Language/BuiltinFunctions.js +61 -68
- 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 +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 +34 -33
- package/dist/FScript.Language/SupportLibrary.js +21 -20
- 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
package/README.md
CHANGED
|
@@ -13,3 +13,18 @@ See the [JavaScript hosting reference](https://fscript.magnusopera.io/manual/emb
|
|
|
13
13
|
## Exit status
|
|
14
14
|
|
|
15
15
|
JavaScript treats `Env.setExitCode` as a no-op for source portability. It does not change process status or enforce a shell-code range. Arguments are still evaluated normally, and the program's returned value is unchanged. The website continues displaying that value. Existing `run`, `evaluate`, and `invoke` APIs retain their tagged-value results.
|
|
16
|
+
|
|
17
|
+
## Hosted interpreter permissions
|
|
18
|
+
|
|
19
|
+
JavaScript hosting grants no capabilities by default. Pass `permissions: ['IO']` (or `Interactive`, `Threading`, `Native`) in run/load/parse/session options to grant them explicitly. `extern` and `HostFunctions.create` accept `requiredPermissions: ['IO']`; omitted requirements declare a host-authored callback as requiring none. Loaded exports and sessions retain grants; returned callables and invocation-context operations check the active policy. For example:
|
|
20
|
+
|
|
21
|
+
```javascript
|
|
22
|
+
const write = HostFunctions.create({
|
|
23
|
+
name: 'Host.write', parameters: [T.string], result: T.unit,
|
|
24
|
+
requiredPermissions: ['IO'],
|
|
25
|
+
invoke: ([text]) => { console.log(text.value); return {kind: 'unit'}; }
|
|
26
|
+
});
|
|
27
|
+
run('Host.write "hello"', {externs: [write], permissions: ['IO']});
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
These declarations rely on truthful host classification; arbitrary JavaScript handlers are trusted code. Granting `Threading` does not add Task implementation support to Fable: task operations remain unsupported. See the [host permissions guide](https://fscript.magnusopera.io/manual/embedding/host-permissions) for the capability model and .NET host API.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { Union, Record } from "../fable_modules/fable-library-js.5.
|
|
3
|
-
import { float64_type, int64_type, union_type, option_type, list_type, tuple_type, bool_type, record_type, string_type } from "../fable_modules/fable-library-js.5.
|
|
2
|
+
import { Union, Record } from "../fable_modules/fable-library-js.5.27.0/Types.js";
|
|
3
|
+
import { float64_type, int64_type, union_type, option_type, list_type, tuple_type, bool_type, record_type, string_type } from "../fable_modules/fable-library-js.5.27.0/Reflection.js";
|
|
4
4
|
import { Span_$reflection } from "./Span.js";
|
|
5
5
|
|
|
6
6
|
export class BackendImport extends Record {
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
|
|
2
2
|
import { Span, Position } from "./Span.js";
|
|
3
3
|
import { EvalException, EvalError$ } from "./Error.js";
|
|
4
|
-
import { FSharpMap__Remove, toList, add, FSharpMap__Add, FSharpMap__ContainsKey, FSharpMap__TryFind, empty as empty_1, forAll, FSharpMap__get_Count, tryFind } from "../fable_modules/fable-library-js.5.
|
|
4
|
+
import { FSharpMap__Remove, toList, add, FSharpMap__Add, FSharpMap__ContainsKey, FSharpMap__TryFind, empty as empty_1, forAll, FSharpMap__get_Count, tryFind } from "../fable_modules/fable-library-js.5.27.0/Map.js";
|
|
5
5
|
import { builtinSchemes } from "./BuiltinSignatures.js";
|
|
6
|
-
import { uncurry2, compare as compare_1, equals as equals_1, curry2, defaultOf, Exception } from "../fable_modules/fable-library-js.5.
|
|
7
|
-
import { endsWith, split, join, substring, indexOf, replace, format, concat } from "../fable_modules/fable-library-js.5.
|
|
8
|
-
import { FSharpRef, Record } from "../fable_modules/fable-library-js.5.
|
|
6
|
+
import { uncurry2, compare as compare_1, equals as equals_1, curry2, defaultOf, Exception } from "../fable_modules/fable-library-js.5.27.0/Util.js";
|
|
7
|
+
import { endsWith, split, join, substring, indexOf, replace, format, concat } from "../fable_modules/fable-library-js.5.27.0/String.js";
|
|
8
|
+
import { FSharpRef, Record } from "../fable_modules/fable-library-js.5.27.0/Types.js";
|
|
9
9
|
import { Value, MapKey, ExternalFunction, Value_$reflection } from "./Value.js";
|
|
10
10
|
import { Execution_Builder__TryWith_1CEB6EA5, Execution_fold, Execution_execution, Execution_Builder__For_Z3A5BE4A, Execution$1__get_IsImmediate, Execution_map, Execution$1, Execution_run, Execution$1_$reflection } from "./Execution.js";
|
|
11
|
-
import { record_type, list_type, lambda_type } from "../fable_modules/fable-library-js.5.
|
|
12
|
-
import { Dictionary } from "../fable_modules/fable-library-js.5.
|
|
13
|
-
import { HashIdentity_Reference } from "../fable_modules/fable-library-js.5.
|
|
14
|
-
import { tryGetValue, addToDict } from "../fable_modules/fable-library-js.5.
|
|
15
|
-
import { tryParse } from "../fable_modules/fable-library-js.5.
|
|
16
|
-
import { tryParse as tryParse_1 } from "../fable_modules/fable-library-js.5.
|
|
17
|
-
import { append, tryHead, choose, concat as concat_1, ofArray, map, exists as exists_1, fold, forAll2, length as length_1, empty, reverse, cons, tail as tail_1, head as head_1, isEmpty } from "../fable_modules/fable-library-js.5.
|
|
18
|
-
import { compare, op_Addition, toInt32_unchecked, fromInt32, toInt64_unchecked, equals } from "../fable_modules/fable-library-js.5.
|
|
19
|
-
import { exists } from "../fable_modules/fable-library-js.5.
|
|
20
|
-
import { some, toArray } from "../fable_modules/fable-library-js.5.
|
|
11
|
+
import { record_type, list_type, lambda_type } from "../fable_modules/fable-library-js.5.27.0/Reflection.js";
|
|
12
|
+
import { Dictionary } from "../fable_modules/fable-library-js.5.27.0/MutableMap.js";
|
|
13
|
+
import { HashIdentity_Reference } from "../fable_modules/fable-library-js.5.27.0/FSharp.Collections.js";
|
|
14
|
+
import { tryGetValue, addToDict } from "../fable_modules/fable-library-js.5.27.0/MapUtil.js";
|
|
15
|
+
import { tryParse } from "../fable_modules/fable-library-js.5.27.0/Long.js";
|
|
16
|
+
import { tryParse as tryParse_1 } from "../fable_modules/fable-library-js.5.27.0/Double.js";
|
|
17
|
+
import { append, tryHead, choose, concat as concat_1, ofArray, map, exists as exists_1, fold, forAll2, length as length_1, empty, reverse, cons, tail as tail_1, head as head_1, isEmpty } from "../fable_modules/fable-library-js.5.27.0/List.js";
|
|
18
|
+
import { compare, op_Addition, toInt32_unchecked, fromInt32, toInt64_unchecked, equals } from "../fable_modules/fable-library-js.5.27.0/BigInt.js";
|
|
19
|
+
import { exists } from "../fable_modules/fable-library-js.5.27.0/Seq.js";
|
|
20
|
+
import { some, toArray } from "../fable_modules/fable-library-js.5.27.0/Option.js";
|
|
21
21
|
import { $007CRecordFields$007C_$007C } from "./HostInterop.js";
|
|
22
|
-
import { tryParse as tryParse_2 } from "../fable_modules/fable-library-js.5.
|
|
22
|
+
import { tryParse as tryParse_2 } from "../fable_modules/fable-library-js.5.27.0/Boolean.js";
|
|
23
23
|
import { invoke } from "./SupportCollections.js";
|
|
24
|
-
import { OverflowException, ArgumentException } from "../fable_modules/fable-library-js.5.
|
|
24
|
+
import { OverflowException, ArgumentException } from "../fable_modules/fable-library-js.5.27.0/System.js";
|
|
25
25
|
import { signatures } from "./SupportLibrary.js";
|
|
26
26
|
|
|
27
27
|
const unknownSpan = new Span(new Position(undefined, 0, 0), new Position(undefined, 0, 0));
|
|
@@ -54,17 +54,15 @@ function ResumableImplementation_$reflection() {
|
|
|
54
54
|
const implementations = new Dictionary([], HashIdentity_Reference());
|
|
55
55
|
|
|
56
56
|
function resumable(name, arity, implementation) {
|
|
57
|
-
const descriptor = new ExternalFunction(name, scheme(name), (context, arguments$) => Execution_run(implementation((f) => ((a) => (new Execution$1(context.Apply(f, a), defaultOf()))), arguments$)), arity);
|
|
57
|
+
const descriptor = new ExternalFunction(0, name, scheme(name), (context, arguments$) => Execution_run(implementation((f) => ((a) => (new Execution$1(context.Apply(f, a), defaultOf()))), arguments$)), arity);
|
|
58
58
|
addToDict(implementations, descriptor, new ResumableImplementation(implementation));
|
|
59
59
|
return descriptor;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
export function tryExecution(descriptor) {
|
|
63
63
|
let matchValue;
|
|
64
|
-
|
|
65
|
-
matchValue = [tryGetValue(implementations, descriptor,
|
|
66
|
-
outArg = v;
|
|
67
|
-
})), outArg];
|
|
64
|
+
const cell = new FSharpRef(defaultOf());
|
|
65
|
+
matchValue = [tryGetValue(implementations, descriptor, cell), cell.contents];
|
|
68
66
|
if (matchValue[0]) {
|
|
69
67
|
return curry2(matchValue[1].Invoke);
|
|
70
68
|
}
|
|
@@ -75,10 +73,8 @@ export function tryExecution(descriptor) {
|
|
|
75
73
|
|
|
76
74
|
function tryParseInt64(text) {
|
|
77
75
|
let matchValue;
|
|
78
|
-
|
|
79
|
-
matchValue = [tryParse(text, 511, false, 64,
|
|
80
|
-
outArg = v;
|
|
81
|
-
})), outArg];
|
|
76
|
+
const cell = new FSharpRef(0n);
|
|
77
|
+
matchValue = [tryParse(text, 511, false, 64, cell), cell.contents];
|
|
82
78
|
if (matchValue[0]) {
|
|
83
79
|
return matchValue[1];
|
|
84
80
|
}
|
|
@@ -89,10 +85,8 @@ function tryParseInt64(text) {
|
|
|
89
85
|
|
|
90
86
|
function tryParseDouble(text) {
|
|
91
87
|
let matchValue;
|
|
92
|
-
|
|
93
|
-
matchValue = [tryParse_1(text,
|
|
94
|
-
outArg = v;
|
|
95
|
-
})), outArg];
|
|
88
|
+
const cell = new FSharpRef(0);
|
|
89
|
+
matchValue = [tryParse_1(text, 231, cell), cell.contents];
|
|
96
90
|
if (matchValue[0]) {
|
|
97
91
|
return matchValue[1];
|
|
98
92
|
}
|
|
@@ -700,30 +694,29 @@ function distinctValues(values) {
|
|
|
700
694
|
}, empty(), values));
|
|
701
695
|
}
|
|
702
696
|
|
|
703
|
-
const builtinIgnore = new ExternalFunction("ignore", scheme("ignore"), (_arg, _arg_1) => Value.VUnit, 1);
|
|
697
|
+
const builtinIgnore = new ExternalFunction(0, "ignore", scheme("ignore"), (_arg, _arg_1) => Value.VUnit, 1);
|
|
704
698
|
|
|
705
|
-
const builtinIntTryParse = new ExternalFunction("Int.tryParse", scheme("Int.tryParse"), (_arg, args) => {
|
|
699
|
+
const builtinIntTryParse = new ExternalFunction(0, "Int.tryParse", scheme("Int.tryParse"), (_arg, args) => {
|
|
706
700
|
const matchValue = tryParseInt64(expectString("Int.tryParse", args));
|
|
707
701
|
return (matchValue == null) ? (new Value(/* VOption */ 9, [undefined])) : (new Value(/* VOption */ 9, [new Value(/* VInt */ 1, [matchValue])]));
|
|
708
702
|
}, 1);
|
|
709
703
|
|
|
710
|
-
const builtinFloatTryParse = new ExternalFunction("Float.tryParse", scheme("Float.tryParse"), (_arg, args) => {
|
|
704
|
+
const builtinFloatTryParse = new ExternalFunction(0, "Float.tryParse", scheme("Float.tryParse"), (_arg, args) => {
|
|
711
705
|
const matchValue = tryParseDouble(expectString("Float.tryParse", args));
|
|
712
706
|
return (matchValue == null) ? (new Value(/* VOption */ 9, [undefined])) : (new Value(/* VOption */ 9, [new Value(/* VFloat */ 2, [matchValue])]));
|
|
713
707
|
}, 1);
|
|
714
708
|
|
|
715
|
-
const builtinBoolTryParse = new ExternalFunction("Bool.tryParse", scheme("Bool.tryParse"), (_arg, args) => {
|
|
709
|
+
const builtinBoolTryParse = new ExternalFunction(0, "Bool.tryParse", scheme("Bool.tryParse"), (_arg, args) => {
|
|
710
|
+
const text = expectString("Bool.tryParse", args);
|
|
716
711
|
let matchValue;
|
|
717
|
-
|
|
718
|
-
matchValue = [tryParse_2(
|
|
719
|
-
outArg = v;
|
|
720
|
-
})), outArg];
|
|
712
|
+
const cell = new FSharpRef(false);
|
|
713
|
+
matchValue = [tryParse_2(text, cell), cell.contents];
|
|
721
714
|
return matchValue[0] ? (new Value(/* VOption */ 9, [new Value(/* VBool */ 3, [matchValue[1]])])) : (new Value(/* VOption */ 9, [undefined]));
|
|
722
715
|
}, 1);
|
|
723
716
|
|
|
724
|
-
const builtinIntToString = new ExternalFunction("Int.toString", scheme("Int.toString"), (_arg, args) => (new Value(/* VString */ 4, [String(expectInt("Int.toString", args))])), 1);
|
|
717
|
+
const builtinIntToString = new ExternalFunction(0, "Int.toString", scheme("Int.toString"), (_arg, args) => (new Value(/* VString */ 4, [String(expectInt("Int.toString", args))])), 1);
|
|
725
718
|
|
|
726
|
-
const builtinFloatToString = new ExternalFunction("Float.toString", scheme("Float.toString"), (_arg, args) => {
|
|
719
|
+
const builtinFloatToString = new ExternalFunction(0, "Float.toString", scheme("Float.toString"), (_arg, args) => {
|
|
727
720
|
let matchResult, value;
|
|
728
721
|
if (!isEmpty(args)) {
|
|
729
722
|
if (head_1(args).tag === 2) {
|
|
@@ -750,9 +743,9 @@ const builtinFloatToString = new ExternalFunction("Float.toString", scheme("Floa
|
|
|
750
743
|
}
|
|
751
744
|
}, 1);
|
|
752
745
|
|
|
753
|
-
const builtinBoolToString = new ExternalFunction("Bool.toString", scheme("Bool.toString"), (_arg, args) => (new Value(/* VString */ 4, [expectBool("Bool.toString", args) ? "true" : "false"])), 1);
|
|
746
|
+
const builtinBoolToString = new ExternalFunction(0, "Bool.toString", scheme("Bool.toString"), (_arg, args) => (new Value(/* VString */ 4, [expectBool("Bool.toString", args) ? "true" : "false"])), 1);
|
|
754
747
|
|
|
755
|
-
const builtinStringReplace = new ExternalFunction("String.replace", scheme("String.replace"), (_arg, args) => {
|
|
748
|
+
const builtinStringReplace = new ExternalFunction(0, "String.replace", scheme("String.replace"), (_arg, args) => {
|
|
756
749
|
let matchResult, newValue, oldValue, source;
|
|
757
750
|
if (!isEmpty(args)) {
|
|
758
751
|
if (head_1(args).tag === 4) {
|
|
@@ -801,7 +794,7 @@ const builtinStringReplace = new ExternalFunction("String.replace", scheme("Stri
|
|
|
801
794
|
}
|
|
802
795
|
}, 3);
|
|
803
796
|
|
|
804
|
-
const builtinStringIndexOf = new ExternalFunction("String.indexOf", scheme("String.indexOf"), (_arg, args) => {
|
|
797
|
+
const builtinStringIndexOf = new ExternalFunction(0, "String.indexOf", scheme("String.indexOf"), (_arg, args) => {
|
|
805
798
|
let matchResult, source, value;
|
|
806
799
|
if (!isEmpty(args)) {
|
|
807
800
|
if (head_1(args).tag === 4) {
|
|
@@ -841,17 +834,17 @@ const builtinStringIndexOf = new ExternalFunction("String.indexOf", scheme("Stri
|
|
|
841
834
|
}
|
|
842
835
|
}, 2);
|
|
843
836
|
|
|
844
|
-
const builtinStringToLower = new ExternalFunction("String.toLower", scheme("String.toLower"), (_arg, args) => {
|
|
837
|
+
const builtinStringToLower = new ExternalFunction(0, "String.toLower", scheme("String.toLower"), (_arg, args) => {
|
|
845
838
|
const source = expectString("String.toLower", args);
|
|
846
839
|
return new Value(/* VString */ 4, [source.toLowerCase()]);
|
|
847
840
|
}, 1);
|
|
848
841
|
|
|
849
|
-
const builtinStringToUpper = new ExternalFunction("String.toUpper", scheme("String.toUpper"), (_arg, args) => {
|
|
842
|
+
const builtinStringToUpper = new ExternalFunction(0, "String.toUpper", scheme("String.toUpper"), (_arg, args) => {
|
|
850
843
|
const source = expectString("String.toUpper", args);
|
|
851
844
|
return new Value(/* VString */ 4, [source.toUpperCase()]);
|
|
852
845
|
}, 1);
|
|
853
846
|
|
|
854
|
-
const builtinStringSubstring = new ExternalFunction("String.substring", scheme("String.substring"), (_arg, args) => {
|
|
847
|
+
const builtinStringSubstring = new ExternalFunction(0, "String.substring", scheme("String.substring"), (_arg, args) => {
|
|
855
848
|
let matchResult, length, source, start;
|
|
856
849
|
if (!isEmpty(args)) {
|
|
857
850
|
if (head_1(args).tag === 1) {
|
|
@@ -903,7 +896,7 @@ const builtinStringSubstring = new ExternalFunction("String.substring", scheme("
|
|
|
903
896
|
}
|
|
904
897
|
}, 3);
|
|
905
898
|
|
|
906
|
-
const builtinStringConcat = new ExternalFunction("String.concat", scheme("String.concat"), (_arg, args) => {
|
|
899
|
+
const builtinStringConcat = new ExternalFunction(0, "String.concat", scheme("String.concat"), (_arg, args) => {
|
|
907
900
|
let matchResult, separator, values;
|
|
908
901
|
if (!isEmpty(args)) {
|
|
909
902
|
if (head_1(args).tag === 4) {
|
|
@@ -941,7 +934,7 @@ const builtinStringConcat = new ExternalFunction("String.concat", scheme("String
|
|
|
941
934
|
}
|
|
942
935
|
}, 2);
|
|
943
936
|
|
|
944
|
-
const builtinStringSplit = new ExternalFunction("String.split", scheme("String.split"), (_arg, args) => {
|
|
937
|
+
const builtinStringSplit = new ExternalFunction(0, "String.split", scheme("String.split"), (_arg, args) => {
|
|
945
938
|
let matchResult, separator, source;
|
|
946
939
|
if (!isEmpty(args)) {
|
|
947
940
|
if (head_1(args).tag === 4) {
|
|
@@ -979,7 +972,7 @@ const builtinStringSplit = new ExternalFunction("String.split", scheme("String.s
|
|
|
979
972
|
}
|
|
980
973
|
}, 2);
|
|
981
974
|
|
|
982
|
-
const builtinStringEndsWith = new ExternalFunction("String.endsWith", scheme("String.endsWith"), (_arg, args) => {
|
|
975
|
+
const builtinStringEndsWith = new ExternalFunction(0, "String.endsWith", scheme("String.endsWith"), (_arg, args) => {
|
|
983
976
|
let matchResult, source, suffix;
|
|
984
977
|
if (!isEmpty(args)) {
|
|
985
978
|
if (head_1(args).tag === 4) {
|
|
@@ -1017,7 +1010,7 @@ const builtinStringEndsWith = new ExternalFunction("String.endsWith", scheme("St
|
|
|
1017
1010
|
}
|
|
1018
1011
|
}, 2);
|
|
1019
1012
|
|
|
1020
|
-
const builtinListEmpty = new ExternalFunction("List.empty", scheme("List.empty"), (_arg, _arg_1) => (new Value(/* VList */ 5, [empty()])), 0);
|
|
1013
|
+
const builtinListEmpty = new ExternalFunction(0, "List.empty", scheme("List.empty"), (_arg, _arg_1) => (new Value(/* VList */ 5, [empty()])), 0);
|
|
1021
1014
|
|
|
1022
1015
|
const builtinListMap = resumable("List.map", 2, (apply, args) => {
|
|
1023
1016
|
let matchResult, mapper, values;
|
|
@@ -1460,7 +1453,7 @@ const builtinListExists = resumable("List.exists", 2, (apply, args) => {
|
|
|
1460
1453
|
}
|
|
1461
1454
|
});
|
|
1462
1455
|
|
|
1463
|
-
const builtinListContains = new ExternalFunction("List.contains", scheme("List.contains"), (_arg, args) => {
|
|
1456
|
+
const builtinListContains = new ExternalFunction(0, "List.contains", scheme("List.contains"), (_arg, args) => {
|
|
1464
1457
|
let matchResult, needle, values;
|
|
1465
1458
|
if (!isEmpty(args)) {
|
|
1466
1459
|
if (!isEmpty(tail_1(args))) {
|
|
@@ -1566,9 +1559,9 @@ const builtinListContains = new ExternalFunction("List.contains", scheme("List.c
|
|
|
1566
1559
|
}
|
|
1567
1560
|
}, 2);
|
|
1568
1561
|
|
|
1569
|
-
const builtinListRev = new ExternalFunction("List.rev", scheme("List.rev"), (_arg, args) => (new Value(/* VList */ 5, [reverse(expectList("List.rev", args))])), 1);
|
|
1562
|
+
const builtinListRev = new ExternalFunction(0, "List.rev", scheme("List.rev"), (_arg, args) => (new Value(/* VList */ 5, [reverse(expectList("List.rev", args))])), 1);
|
|
1570
1563
|
|
|
1571
|
-
const builtinListDistinct = new ExternalFunction("List.distinct", scheme("List.distinct"), (_arg, args) => (new Value(/* VList */ 5, [distinctValues(expectList("List.distinct", args))])), 1);
|
|
1564
|
+
const builtinListDistinct = new ExternalFunction(0, "List.distinct", scheme("List.distinct"), (_arg, args) => (new Value(/* VList */ 5, [distinctValues(expectList("List.distinct", args))])), 1);
|
|
1572
1565
|
|
|
1573
1566
|
const builtinListFold = resumable("List.fold", 3, (apply, args) => {
|
|
1574
1567
|
let matchResult, folder, state, values;
|
|
@@ -1727,7 +1720,7 @@ const builtinListFilter = resumable("List.filter", 2, (apply, args) => {
|
|
|
1727
1720
|
}
|
|
1728
1721
|
});
|
|
1729
1722
|
|
|
1730
|
-
const builtinListLength = new ExternalFunction("List.length", scheme("List.length"), (_arg, args) => (new Value(/* VInt */ 1, [toInt64_unchecked(fromInt32(length_1(expectList("List.length", args))))])), 1);
|
|
1723
|
+
const builtinListLength = new ExternalFunction(0, "List.length", scheme("List.length"), (_arg, args) => (new Value(/* VInt */ 1, [toInt64_unchecked(fromInt32(length_1(expectList("List.length", args))))])), 1);
|
|
1731
1724
|
|
|
1732
1725
|
const builtinListTryFind = resumable("List.tryFind", 2, (apply, args) => {
|
|
1733
1726
|
let matchResult, predicate, values;
|
|
@@ -1910,7 +1903,7 @@ const builtinListTryGet = resumable("List.tryGet", 2, (apply, args) => {
|
|
|
1910
1903
|
}
|
|
1911
1904
|
});
|
|
1912
1905
|
|
|
1913
|
-
const builtinListTryItem = new ExternalFunction("List.tryItem", scheme("List.tryItem"), (_arg, args) => {
|
|
1906
|
+
const builtinListTryItem = new ExternalFunction(0, "List.tryItem", scheme("List.tryItem"), (_arg, args) => {
|
|
1914
1907
|
let matchResult, index, values;
|
|
1915
1908
|
if (!isEmpty(args)) {
|
|
1916
1909
|
if (head_1(args).tag === 1) {
|
|
@@ -1969,14 +1962,14 @@ const builtinListTryItem = new ExternalFunction("List.tryItem", scheme("List.try
|
|
|
1969
1962
|
}
|
|
1970
1963
|
}, 2);
|
|
1971
1964
|
|
|
1972
|
-
const builtinListTryHead = new ExternalFunction("List.tryHead", scheme("List.tryHead"), (_arg, args) => (new Value(/* VOption */ 9, [tryHead(expectList("List.tryHead", args))])), 1);
|
|
1965
|
+
const builtinListTryHead = new ExternalFunction(0, "List.tryHead", scheme("List.tryHead"), (_arg, args) => (new Value(/* VOption */ 9, [tryHead(expectList("List.tryHead", args))])), 1);
|
|
1973
1966
|
|
|
1974
|
-
const builtinListTail = new ExternalFunction("List.tail", scheme("List.tail"), (_arg, args) => {
|
|
1967
|
+
const builtinListTail = new ExternalFunction(0, "List.tail", scheme("List.tail"), (_arg, args) => {
|
|
1975
1968
|
const matchValue = expectList("List.tail", args);
|
|
1976
1969
|
return !isEmpty(matchValue) ? (new Value(/* VList */ 5, [tail_1(matchValue)])) : fail("List.tail expects a non-empty list");
|
|
1977
1970
|
}, 1);
|
|
1978
1971
|
|
|
1979
|
-
const builtinListAppend = new ExternalFunction("List.append", scheme("List.append"), (_arg, args) => {
|
|
1972
|
+
const builtinListAppend = new ExternalFunction(0, "List.append", scheme("List.append"), (_arg, args) => {
|
|
1980
1973
|
let matchResult, left, right;
|
|
1981
1974
|
if (!isEmpty(args)) {
|
|
1982
1975
|
if (head_1(args).tag === 5) {
|
|
@@ -2014,7 +2007,7 @@ const builtinListAppend = new ExternalFunction("List.append", scheme("List.appen
|
|
|
2014
2007
|
}
|
|
2015
2008
|
}, 2);
|
|
2016
2009
|
|
|
2017
|
-
const builtinOptionDefaultValue = new ExternalFunction("Option.defaultValue", scheme("Option.defaultValue"), (_arg, args) => {
|
|
2010
|
+
const builtinOptionDefaultValue = new ExternalFunction(0, "Option.defaultValue", scheme("Option.defaultValue"), (_arg, args) => {
|
|
2018
2011
|
let matchResult, current, fallback, fallback_1;
|
|
2019
2012
|
if (!isEmpty(args)) {
|
|
2020
2013
|
if (!isEmpty(tail_1(args))) {
|
|
@@ -2101,7 +2094,7 @@ const builtinOptionDefaultWith = resumable("Option.defaultWith", 2, (apply, args
|
|
|
2101
2094
|
}
|
|
2102
2095
|
});
|
|
2103
2096
|
|
|
2104
|
-
const builtinOptionIsNone = new ExternalFunction("Option.isNone", scheme("Option.isNone"), (_arg, args) => {
|
|
2097
|
+
const builtinOptionIsNone = new ExternalFunction(0, "Option.isNone", scheme("Option.isNone"), (_arg, args) => {
|
|
2105
2098
|
let matchResult;
|
|
2106
2099
|
if (!isEmpty(args)) {
|
|
2107
2100
|
if (head_1(args).tag === 9) {
|
|
@@ -2137,7 +2130,7 @@ const builtinOptionIsNone = new ExternalFunction("Option.isNone", scheme("Option
|
|
|
2137
2130
|
}
|
|
2138
2131
|
}, 1);
|
|
2139
2132
|
|
|
2140
|
-
const builtinOptionIsSome = new ExternalFunction("Option.isSome", scheme("Option.isSome"), (_arg, args) => {
|
|
2133
|
+
const builtinOptionIsSome = new ExternalFunction(0, "Option.isSome", scheme("Option.isSome"), (_arg, args) => {
|
|
2141
2134
|
let matchResult;
|
|
2142
2135
|
if (!isEmpty(args)) {
|
|
2143
2136
|
if (head_1(args).tag === 9) {
|
|
@@ -2237,11 +2230,11 @@ const builtinOptionMap = resumable("Option.map", 2, (apply, args) => {
|
|
|
2237
2230
|
}
|
|
2238
2231
|
});
|
|
2239
2232
|
|
|
2240
|
-
const builtinMapEmpty = new ExternalFunction("Map.empty", scheme("Map.empty"), (_arg, _arg_1) => (new Value(/* VMap */ 8, [empty_1({
|
|
2233
|
+
const builtinMapEmpty = new ExternalFunction(0, "Map.empty", scheme("Map.empty"), (_arg, _arg_1) => (new Value(/* VMap */ 8, [empty_1({
|
|
2241
2234
|
Compare: (x, y) => (compare_1(x, y) | 0),
|
|
2242
2235
|
})])), 0);
|
|
2243
2236
|
|
|
2244
|
-
const builtinMapTryGet = new ExternalFunction("Map.tryGet", scheme("Map.tryGet"), (_arg, args) => {
|
|
2237
|
+
const builtinMapTryGet = new ExternalFunction(0, "Map.tryGet", scheme("Map.tryGet"), (_arg, args) => {
|
|
2245
2238
|
let matchResult, key, values;
|
|
2246
2239
|
if (!isEmpty(args)) {
|
|
2247
2240
|
if (!isEmpty(tail_1(args))) {
|
|
@@ -2274,7 +2267,7 @@ const builtinMapTryGet = new ExternalFunction("Map.tryGet", scheme("Map.tryGet")
|
|
|
2274
2267
|
}
|
|
2275
2268
|
}, 2);
|
|
2276
2269
|
|
|
2277
|
-
const builtinMapContainsKey = new ExternalFunction("Map.containsKey", scheme("Map.containsKey"), (_arg, args) => {
|
|
2270
|
+
const builtinMapContainsKey = new ExternalFunction(0, "Map.containsKey", scheme("Map.containsKey"), (_arg, args) => {
|
|
2278
2271
|
let matchResult, key, values;
|
|
2279
2272
|
if (!isEmpty(args)) {
|
|
2280
2273
|
if (!isEmpty(tail_1(args))) {
|
|
@@ -2307,7 +2300,7 @@ const builtinMapContainsKey = new ExternalFunction("Map.containsKey", scheme("Ma
|
|
|
2307
2300
|
}
|
|
2308
2301
|
}, 2);
|
|
2309
2302
|
|
|
2310
|
-
const builtinMapAdd = new ExternalFunction("Map.add", scheme("Map.add"), (_arg, args) => {
|
|
2303
|
+
const builtinMapAdd = new ExternalFunction(0, "Map.add", scheme("Map.add"), (_arg, args) => {
|
|
2311
2304
|
let matchResult, key, value, values;
|
|
2312
2305
|
if (!isEmpty(args)) {
|
|
2313
2306
|
if (!isEmpty(tail_1(args))) {
|
|
@@ -2346,7 +2339,7 @@ const builtinMapAdd = new ExternalFunction("Map.add", scheme("Map.add"), (_arg,
|
|
|
2346
2339
|
}
|
|
2347
2340
|
}, 3);
|
|
2348
2341
|
|
|
2349
|
-
const builtinMapOfList = new ExternalFunction("Map.ofList", scheme("Map.ofList"), (_arg, args) => {
|
|
2342
|
+
const builtinMapOfList = new ExternalFunction(0, "Map.ofList", scheme("Map.ofList"), (_arg, args) => {
|
|
2350
2343
|
let matchResult, pairs;
|
|
2351
2344
|
if (!isEmpty(args)) {
|
|
2352
2345
|
if (head_1(args).tag === 5) {
|
|
@@ -2541,7 +2534,7 @@ const builtinMapFold = resumable("Map.fold", 3, (apply, args) => {
|
|
|
2541
2534
|
}
|
|
2542
2535
|
});
|
|
2543
2536
|
|
|
2544
|
-
const builtinMapCount = new ExternalFunction("Map.count", scheme("Map.count"), (_arg, args) => (new Value(/* VInt */ 1, [toInt64_unchecked(fromInt32(FSharpMap__get_Count(expectMap("Map.count", args))))])), 1);
|
|
2537
|
+
const builtinMapCount = new ExternalFunction(0, "Map.count", scheme("Map.count"), (_arg, args) => (new Value(/* VInt */ 1, [toInt64_unchecked(fromInt32(FSharpMap__get_Count(expectMap("Map.count", args))))])), 1);
|
|
2545
2538
|
|
|
2546
2539
|
const builtinMapFilter = resumable("Map.filter", 2, (apply, args) => {
|
|
2547
2540
|
let matchResult, callback, values;
|
|
@@ -3169,7 +3162,7 @@ const builtinMapIter = resumable("Map.iter", 2, (apply, args) => {
|
|
|
3169
3162
|
}
|
|
3170
3163
|
});
|
|
3171
3164
|
|
|
3172
|
-
const builtinMapRemove = new ExternalFunction("Map.remove", scheme("Map.remove"), (_arg, args) => {
|
|
3165
|
+
const builtinMapRemove = new ExternalFunction(0, "Map.remove", scheme("Map.remove"), (_arg, args) => {
|
|
3173
3166
|
let matchResult, key, values;
|
|
3174
3167
|
if (!isEmpty(args)) {
|
|
3175
3168
|
if (!isEmpty(tail_1(args))) {
|
|
@@ -3202,7 +3195,7 @@ const builtinMapRemove = new ExternalFunction("Map.remove", scheme("Map.remove")
|
|
|
3202
3195
|
}
|
|
3203
3196
|
}, 2);
|
|
3204
3197
|
|
|
3205
|
-
const builtinSetExitCode = new ExternalFunction("Env.setExitCode", scheme("Env.setExitCode"), (context, _arg) => {
|
|
3198
|
+
const builtinSetExitCode = new ExternalFunction(0, "Env.setExitCode", scheme("Env.setExitCode"), (context, _arg) => {
|
|
3206
3199
|
let matchResult;
|
|
3207
3200
|
if (!isEmpty(_arg)) {
|
|
3208
3201
|
if (head_1(_arg).tag === 1) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
import { keys, ofList } from "../fable_modules/fable-library-js.5.
|
|
3
|
-
import { ofArray, singleton, empty, map, append } from "../fable_modules/fable-library-js.5.
|
|
2
|
+
import { keys, ofList } from "../fable_modules/fable-library-js.5.27.0/Map.js";
|
|
3
|
+
import { ofArray, singleton, empty, map, append } from "../fable_modules/fable-library-js.5.27.0/List.js";
|
|
4
4
|
import { names, signatures } from "./SupportLibrary.js";
|
|
5
5
|
import { Scheme, Type } from "./Types.js";
|
|
6
|
-
import { comparePrimitives } from "../fable_modules/fable-library-js.5.
|
|
7
|
-
import { contains, ofSeq } from "../fable_modules/fable-library-js.5.
|
|
8
|
-
import { filter } from "../fable_modules/fable-library-js.5.
|
|
9
|
-
import { startsWith } from "../fable_modules/fable-library-js.5.
|
|
6
|
+
import { comparePrimitives } from "../fable_modules/fable-library-js.5.27.0/Util.js";
|
|
7
|
+
import { contains, ofSeq } from "../fable_modules/fable-library-js.5.27.0/Set.js";
|
|
8
|
+
import { filter } from "../fable_modules/fable-library-js.5.27.0/Seq.js";
|
|
9
|
+
import { startsWith } from "../fable_modules/fable-library-js.5.27.0/String.js";
|
|
10
10
|
|
|
11
11
|
export const builtinSchemes = ofList(append(map((tupledArg) => [tupledArg[0], tupledArg[1]], signatures), ofArray([["Env.setExitCode", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TInt, Type.TUnit]))], ["ignore", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), Type.TUnit]))], ["Int.tryParse", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, new Type(/* TOption */ 10, [Type.TInt])]))], ["Float.tryParse", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, new Type(/* TOption */ 10, [Type.TFloat])]))], ["Bool.tryParse", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, new Type(/* TOption */ 10, [Type.TBool])]))], ["Int.toString", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TInt, Type.TString]))], ["Float.toString", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TFloat, Type.TString]))], ["Bool.toString", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TBool, Type.TString]))], ["String.replace", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, new Type(/* TFun */ 11, [Type.TString, new Type(/* TFun */ 11, [Type.TString, Type.TString])])]))], ["String.indexOf", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, new Type(/* TFun */ 11, [Type.TString, new Type(/* TOption */ 10, [Type.TInt])])]))], ["String.toLower", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, Type.TString]))], ["String.toUpper", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, Type.TString]))], ["String.substring", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TInt, new Type(/* TFun */ 11, [Type.TInt, new Type(/* TFun */ 11, [Type.TString, new Type(/* TOption */ 10, [Type.TString])])])]))], ["String.concat", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, new Type(/* TFun */ 11, [new Type(/* TList */ 5, [Type.TString]), Type.TString])]))], ["String.split", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, new Type(/* TFun */ 11, [Type.TString, new Type(/* TList */ 5, [Type.TString])])]))], ["String.endsWith", new Scheme(empty(), new Type(/* TFun */ 11, [Type.TString, new Type(/* TFun */ 11, [Type.TString, Type.TBool])]))], ["List.empty", new Scheme(singleton(0), new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]))], ["List.map", new Scheme(ofArray([0, 1]), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), new Type(/* TVar */ 15, [1])]), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TList */ 5, [new Type(/* TVar */ 15, [1])])])]))], ["List.iter", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), Type.TUnit]), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), Type.TUnit])]))], ["List.choose", new Scheme(ofArray([0, 1]), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), new Type(/* TOption */ 10, [new Type(/* TVar */ 15, [1])])]), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TList */ 5, [new Type(/* TVar */ 15, [1])])])]))], ["List.collect", new Scheme(ofArray([0, 1]), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), new Type(/* TList */ 5, [new Type(/* TVar */ 15, [1])])]), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TList */ 5, [new Type(/* TVar */ 15, [1])])])]))], ["List.exists", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), Type.TBool]), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), Type.TBool])]))], ["List.contains", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), Type.TBool])]))], ["List.rev", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])])]))], ["List.distinct", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])])]))], ["List.fold", new Scheme(ofArray([0, 1]), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [1]), new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), new Type(/* TVar */ 15, [1])])]), new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [1]), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TVar */ 15, [1])])])]))], ["List.filter", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), Type.TBool]), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])])])]))], ["List.length", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), Type.TInt]))], ["List.tryFind", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), Type.TBool]), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TOption */ 10, [new Type(/* TVar */ 15, [0])])])]))], ["List.tryGet", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), Type.TBool]), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TOption */ 10, [Type.TInt])])]))], ["List.tryItem", new Scheme(singleton(0), new Type(/* TFun */ 11, [Type.TInt, new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TOption */ 10, [new Type(/* TVar */ 15, [0])])])]))], ["List.tryHead", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TOption */ 10, [new Type(/* TVar */ 15, [0])])]))], ["List.tail", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])])]))], ["List.append", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])]), new Type(/* TList */ 5, [new Type(/* TVar */ 15, [0])])])]))], ["Option.defaultValue", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), new Type(/* TFun */ 11, [new Type(/* TOption */ 10, [new Type(/* TVar */ 15, [0])]), new Type(/* TVar */ 15, [0])])]))], ["Option.defaultWith", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [Type.TUnit, new Type(/* TVar */ 15, [0])]), new Type(/* TFun */ 11, [new Type(/* TOption */ 10, [new Type(/* TVar */ 15, [0])]), new Type(/* TVar */ 15, [0])])]))], ["Option.isNone", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TOption */ 10, [new Type(/* TVar */ 15, [0])]), Type.TBool]))], ["Option.isSome", new Scheme(singleton(0), new Type(/* TFun */ 11, [new Type(/* TOption */ 10, [new Type(/* TVar */ 15, [0])]), Type.TBool]))], ["Option.map", new Scheme(ofArray([0, 1]), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), new Type(/* TVar */ 15, [1])]), new Type(/* TFun */ 11, [new Type(/* TOption */ 10, [new Type(/* TVar */ 15, [0])]), new Type(/* TOption */ 10, [new Type(/* TVar */ 15, [1])])])]))], ["Map.empty", new Scheme(ofArray([0, 1]), new Type(/* TMap */ 9, [new Type(/* TVar */ 15, [1]), new Type(/* TVar */ 15, [0])]))], ["Map.tryGet", new Scheme(ofArray([0, 1]), new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [1]), new Type(/* TFun */ 11, [new Type(/* TMap */ 9, [new Type(/* TVar */ 15, [1]), new Type(/* TVar */ 15, [0])]), new Type(/* TOption */ 10, [new Type(/* TVar */ 15, [0])])])]))], ["Map.containsKey", new Scheme(ofArray([0, 1]), new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [1]), new Type(/* TFun */ 11, [new Type(/* TMap */ 9, [new Type(/* TVar */ 15, [1]), new Type(/* TVar */ 15, [0])]), Type.TBool])]))], ["Map.add", new Scheme(ofArray([0, 1]), new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [1]), new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), new Type(/* TFun */ 11, [new Type(/* TMap */ 9, [new Type(/* TVar */ 15, [1]), new Type(/* TVar */ 15, [0])]), new Type(/* TMap */ 9, [new Type(/* TVar */ 15, [1]), new Type(/* TVar */ 15, [0])])])])]))], ["Map.ofList", new Scheme(ofArray([0, 1]), new Type(/* TFun */ 11, [new Type(/* TList */ 5, [new Type(/* TTuple */ 7, [ofArray([new Type(/* TVar */ 15, [1]), new Type(/* TVar */ 15, [0])])])]), new Type(/* TMap */ 9, [new Type(/* TVar */ 15, [1]), new Type(/* TVar */ 15, [0])])]))], ["Map.fold", new Scheme(ofArray([0, 1, 2]), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [2]), new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [1]), new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), new Type(/* TVar */ 15, [2])])])]), new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [2]), new Type(/* TFun */ 11, [new Type(/* TMap */ 9, [new Type(/* TVar */ 15, [1]), new Type(/* TVar */ 15, [0])]), new Type(/* TVar */ 15, [2])])])]))], ["Map.count", new Scheme(ofArray([0, 1]), new Type(/* TFun */ 11, [new Type(/* TMap */ 9, [new Type(/* TVar */ 15, [1]), new Type(/* TVar */ 15, [0])]), Type.TInt]))], ["Map.filter", new Scheme(ofArray([0, 1]), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [1]), new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), Type.TBool])]), new Type(/* TFun */ 11, [new Type(/* TMap */ 9, [new Type(/* TVar */ 15, [1]), new Type(/* TVar */ 15, [0])]), new Type(/* TMap */ 9, [new Type(/* TVar */ 15, [1]), new Type(/* TVar */ 15, [0])])])]))], ["Map.choose", new Scheme(ofArray([0, 1, 2]), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [1]), new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), new Type(/* TOption */ 10, [new Type(/* TVar */ 15, [2])])])]), new Type(/* TFun */ 11, [new Type(/* TMap */ 9, [new Type(/* TVar */ 15, [1]), new Type(/* TVar */ 15, [0])]), new Type(/* TMap */ 9, [new Type(/* TVar */ 15, [1]), new Type(/* TVar */ 15, [2])])])]))], ["Map.map", new Scheme(ofArray([0, 1, 2]), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), new Type(/* TVar */ 15, [2])]), new Type(/* TFun */ 11, [new Type(/* TMap */ 9, [new Type(/* TVar */ 15, [1]), new Type(/* TVar */ 15, [0])]), new Type(/* TMap */ 9, [new Type(/* TVar */ 15, [1]), new Type(/* TVar */ 15, [2])])])]))], ["Map.iter", new Scheme(ofArray([0, 1]), new Type(/* TFun */ 11, [new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [1]), new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [0]), Type.TUnit])]), new Type(/* TFun */ 11, [new Type(/* TMap */ 9, [new Type(/* TVar */ 15, [1]), new Type(/* TVar */ 15, [0])]), Type.TUnit])]))], ["Map.remove", new Scheme(ofArray([0, 1]), new Type(/* TFun */ 11, [new Type(/* TVar */ 15, [1]), new Type(/* TFun */ 11, [new Type(/* TMap */ 9, [new Type(/* TVar */ 15, [1]), new Type(/* TVar */ 15, [0])]), new Type(/* TMap */ 9, [new Type(/* TVar */ 15, [1]), new Type(/* TVar */ 15, [0])])])]))]])), {
|
|
12
12
|
Compare: (x, y) => (comparePrimitives(x, y) | 0),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { Span, Position } from "./Span.js";
|
|
3
3
|
import { TypeDef, TypeRef } from "./Ast.js";
|
|
4
|
-
import { empty, ofArray } from "../fable_modules/fable-library-js.5.
|
|
4
|
+
import { empty, ofArray } from "../fable_modules/fable-library-js.5.27.0/List.js";
|
|
5
5
|
|
|
6
6
|
const unknownSpan = new Span(new Position(undefined, 0, 0), new Position(undefined, 0, 0));
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { FSharpException, Record } from "../fable_modules/fable-library-js.5.
|
|
3
|
-
import { class_type, record_type, string_type } from "../fable_modules/fable-library-js.5.
|
|
2
|
+
import { FSharpException, Record } from "../fable_modules/fable-library-js.5.27.0/Types.js";
|
|
3
|
+
import { class_type, record_type, string_type } from "../fable_modules/fable-library-js.5.27.0/Reflection.js";
|
|
4
4
|
import { Span_$reflection } from "./Span.js";
|
|
5
5
|
|
|
6
6
|
export class ParseError extends Record {
|