firefly-compiler 0.4.4 → 0.4.6
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/.hintrc +5 -0
- package/README.md +42 -61
- package/compiler/Compiler.ff +6 -2
- package/compiler/Deriver.ff +10 -0
- package/compiler/Environment.ff +2 -1
- package/compiler/JsEmitter.ff +29 -17
- package/compiler/Resolver.ff +1 -1
- package/core/.firefly/package.ff +1 -2
- package/core/Box.ff +7 -0
- package/core/BuildSystem.ff +5 -4
- package/core/Core.ff +4 -0
- package/core/HttpClient.ff +1 -1
- package/core/JsValue.ff +22 -1
- package/core/Lock.ff +4 -4
- package/core/NodeSystem.ff +12 -3
- package/core/Path.ff +1 -1
- package/core/SourceLocation.ff +41 -0
- package/core/Stack.ff +6 -6
- package/core/StringMap.ff +3 -3
- package/lsp/LanguageServer.ff +32 -7
- package/lsp/stderr.txt +1 -0
- package/lsp/stdin.txt +11 -0
- package/lsp/stdout.txt +41 -0
- package/lux/.firefly/package.ff +2 -0
- package/lux/Lux.ff +473 -0
- package/lux/LuxEvent.ff +116 -0
- package/lux/Main.ff +126 -0
- package/lux/Main2.ff +144 -0
- package/meetup/AutoCompletion.ff +6 -0
- package/output/js/ff/compiler/Builder.mjs +444 -440
- package/output/js/ff/compiler/Compiler.mjs +416 -410
- package/output/js/ff/compiler/Dependencies.mjs +389 -385
- package/output/js/ff/compiler/Deriver.mjs +1170 -1166
- package/output/js/ff/compiler/Dictionaries.mjs +1309 -1305
- package/output/js/ff/compiler/Environment.mjs +1015 -1005
- package/output/js/ff/compiler/Inference.mjs +4268 -4264
- package/output/js/ff/compiler/JsEmitter.mjs +5391 -5353
- package/output/js/ff/compiler/JsImporter.mjs +266 -262
- package/output/js/ff/compiler/LspHook.mjs +793 -789
- package/output/js/ff/compiler/Main.mjs +1699 -1695
- package/output/js/ff/compiler/Parser.mjs +4008 -4004
- package/output/js/ff/compiler/Patterns.mjs +927 -923
- package/output/js/ff/compiler/Resolver.mjs +2307 -2303
- package/output/js/ff/compiler/Substitution.mjs +1150 -1146
- package/output/js/ff/compiler/Syntax.mjs +12434 -12430
- package/output/js/ff/compiler/Token.mjs +3096 -3092
- package/output/js/ff/compiler/Tokenizer.mjs +593 -589
- package/output/js/ff/compiler/Unification.mjs +1752 -1748
- package/output/js/ff/compiler/Wildcards.mjs +608 -604
- package/output/js/ff/compiler/Workspace.mjs +687 -683
- package/output/js/ff/core/Any.mjs +143 -139
- package/output/js/ff/core/Array.mjs +547 -543
- package/output/js/ff/core/AssetSystem.mjs +274 -270
- package/output/js/ff/core/Atomic.mjs +154 -150
- package/output/js/ff/core/Bool.mjs +152 -141
- package/output/js/ff/core/Box.mjs +112 -0
- package/output/js/ff/core/BrowserSystem.mjs +126 -122
- package/output/js/ff/core/Buffer.mjs +395 -391
- package/output/js/ff/core/BuildSystem.mjs +296 -290
- package/output/js/ff/core/Channel.mjs +189 -185
- package/output/js/ff/core/Char.mjs +149 -145
- package/output/js/ff/core/Core.mjs +300 -288
- package/output/js/ff/core/Duration.mjs +116 -112
- package/output/js/ff/core/Equal.mjs +179 -175
- package/output/js/ff/core/Error.mjs +142 -138
- package/output/js/ff/core/FileHandle.mjs +150 -146
- package/output/js/ff/core/Float.mjs +225 -214
- package/output/js/ff/core/HttpClient.mjs +190 -186
- package/output/js/ff/core/Instant.mjs +109 -105
- package/output/js/ff/core/Int.mjs +265 -254
- package/output/js/ff/core/IntMap.mjs +280 -276
- package/output/js/ff/core/JsSystem.mjs +238 -234
- package/output/js/ff/core/JsValue.mjs +714 -664
- package/output/js/ff/core/List.mjs +2334 -2321
- package/output/js/ff/core/Lock.mjs +230 -226
- package/output/js/ff/core/Log.mjs +163 -159
- package/output/js/ff/core/Map.mjs +362 -358
- package/output/js/ff/core/NodeSystem.mjs +302 -283
- package/output/js/ff/core/Nothing.mjs +104 -100
- package/output/js/ff/core/Option.mjs +1015 -1002
- package/output/js/ff/core/Ordering.mjs +730 -726
- package/output/js/ff/core/Pair.mjs +331 -318
- package/output/js/ff/core/Path.mjs +546 -542
- package/output/js/ff/core/RbMap.mjs +1940 -1936
- package/output/js/ff/core/Serializable.mjs +428 -424
- package/output/js/ff/core/Set.mjs +254 -250
- package/output/js/ff/core/Show.mjs +205 -201
- package/output/js/ff/core/SourceLocation.mjs +229 -0
- package/output/js/ff/core/Stack.mjs +541 -537
- package/output/js/ff/core/Stream.mjs +1304 -1300
- package/output/js/ff/core/String.mjs +365 -354
- package/output/js/ff/core/StringMap.mjs +280 -276
- package/output/js/ff/core/Task.mjs +320 -316
- package/output/js/ff/core/Try.mjs +507 -503
- package/output/js/ff/core/Unit.mjs +151 -103
- package/package.json +29 -29
- package/vscode/package-lock.json +5 -5
- package/vscode/package.json +1 -1
|
@@ -1,282 +1,286 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import * as ff_core_Any from "../../ff/core/Any.mjs"
|
|
4
|
-
|
|
5
|
-
import * as ff_core_Array from "../../ff/core/Array.mjs"
|
|
6
|
-
|
|
7
|
-
import * as ff_core_AssetSystem from "../../ff/core/AssetSystem.mjs"
|
|
8
|
-
|
|
9
|
-
import * as ff_core_Atomic from "../../ff/core/Atomic.mjs"
|
|
10
|
-
|
|
11
|
-
import * as ff_core_Bool from "../../ff/core/Bool.mjs"
|
|
12
|
-
|
|
13
|
-
import * as
|
|
14
|
-
|
|
15
|
-
import * as
|
|
16
|
-
|
|
17
|
-
import * as
|
|
18
|
-
|
|
19
|
-
import * as
|
|
20
|
-
|
|
21
|
-
import * as
|
|
22
|
-
|
|
23
|
-
import * as
|
|
24
|
-
|
|
25
|
-
import * as
|
|
26
|
-
|
|
27
|
-
import * as
|
|
28
|
-
|
|
29
|
-
import * as
|
|
30
|
-
|
|
31
|
-
import * as
|
|
32
|
-
|
|
33
|
-
import * as
|
|
34
|
-
|
|
35
|
-
import * as
|
|
36
|
-
|
|
37
|
-
import * as
|
|
38
|
-
|
|
39
|
-
import * as
|
|
40
|
-
|
|
41
|
-
import * as
|
|
42
|
-
|
|
43
|
-
import * as
|
|
44
|
-
|
|
45
|
-
import * as
|
|
46
|
-
|
|
47
|
-
import * as
|
|
48
|
-
|
|
49
|
-
import * as
|
|
50
|
-
|
|
51
|
-
import * as
|
|
52
|
-
|
|
53
|
-
import * as
|
|
54
|
-
|
|
55
|
-
import * as
|
|
56
|
-
|
|
57
|
-
import * as
|
|
58
|
-
|
|
59
|
-
import * as
|
|
60
|
-
|
|
61
|
-
import * as
|
|
62
|
-
|
|
63
|
-
import * as
|
|
64
|
-
|
|
65
|
-
import * as
|
|
66
|
-
|
|
67
|
-
import * as
|
|
68
|
-
|
|
69
|
-
import * as
|
|
70
|
-
|
|
71
|
-
import * as
|
|
72
|
-
|
|
73
|
-
import * as
|
|
74
|
-
|
|
75
|
-
import * as
|
|
76
|
-
|
|
77
|
-
import * as
|
|
78
|
-
|
|
79
|
-
import * as
|
|
80
|
-
|
|
81
|
-
import * as
|
|
82
|
-
|
|
83
|
-
import * as
|
|
84
|
-
|
|
85
|
-
import * as
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
export
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export function
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export function
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
import * as ff_core_Any from "../../ff/core/Any.mjs"
|
|
4
|
+
|
|
5
|
+
import * as ff_core_Array from "../../ff/core/Array.mjs"
|
|
6
|
+
|
|
7
|
+
import * as ff_core_AssetSystem from "../../ff/core/AssetSystem.mjs"
|
|
8
|
+
|
|
9
|
+
import * as ff_core_Atomic from "../../ff/core/Atomic.mjs"
|
|
10
|
+
|
|
11
|
+
import * as ff_core_Bool from "../../ff/core/Bool.mjs"
|
|
12
|
+
|
|
13
|
+
import * as ff_core_Box from "../../ff/core/Box.mjs"
|
|
14
|
+
|
|
15
|
+
import * as ff_core_BrowserSystem from "../../ff/core/BrowserSystem.mjs"
|
|
16
|
+
|
|
17
|
+
import * as ff_core_Buffer from "../../ff/core/Buffer.mjs"
|
|
18
|
+
|
|
19
|
+
import * as ff_core_BuildSystem from "../../ff/core/BuildSystem.mjs"
|
|
20
|
+
|
|
21
|
+
import * as ff_core_Channel from "../../ff/core/Channel.mjs"
|
|
22
|
+
|
|
23
|
+
import * as ff_core_Char from "../../ff/core/Char.mjs"
|
|
24
|
+
|
|
25
|
+
import * as ff_core_Core from "../../ff/core/Core.mjs"
|
|
26
|
+
|
|
27
|
+
import * as ff_core_Duration from "../../ff/core/Duration.mjs"
|
|
28
|
+
|
|
29
|
+
import * as ff_core_Equal from "../../ff/core/Equal.mjs"
|
|
30
|
+
|
|
31
|
+
import * as ff_core_Error from "../../ff/core/Error.mjs"
|
|
32
|
+
|
|
33
|
+
import * as ff_core_FileHandle from "../../ff/core/FileHandle.mjs"
|
|
34
|
+
|
|
35
|
+
import * as ff_core_Float from "../../ff/core/Float.mjs"
|
|
36
|
+
|
|
37
|
+
import * as ff_core_HttpClient from "../../ff/core/HttpClient.mjs"
|
|
38
|
+
|
|
39
|
+
import * as ff_core_Instant from "../../ff/core/Instant.mjs"
|
|
40
|
+
|
|
41
|
+
import * as ff_core_Int from "../../ff/core/Int.mjs"
|
|
42
|
+
|
|
43
|
+
import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
|
|
44
|
+
|
|
45
|
+
import * as ff_core_JsSystem from "../../ff/core/JsSystem.mjs"
|
|
46
|
+
|
|
47
|
+
import * as ff_core_JsValue from "../../ff/core/JsValue.mjs"
|
|
48
|
+
|
|
49
|
+
import * as ff_core_List from "../../ff/core/List.mjs"
|
|
50
|
+
|
|
51
|
+
import * as ff_core_Lock from "../../ff/core/Lock.mjs"
|
|
52
|
+
|
|
53
|
+
import * as ff_core_Log from "../../ff/core/Log.mjs"
|
|
54
|
+
|
|
55
|
+
import * as ff_core_Map from "../../ff/core/Map.mjs"
|
|
56
|
+
|
|
57
|
+
import * as ff_core_NodeSystem from "../../ff/core/NodeSystem.mjs"
|
|
58
|
+
|
|
59
|
+
import * as ff_core_Nothing from "../../ff/core/Nothing.mjs"
|
|
60
|
+
|
|
61
|
+
import * as ff_core_Option from "../../ff/core/Option.mjs"
|
|
62
|
+
|
|
63
|
+
import * as ff_core_Ordering from "../../ff/core/Ordering.mjs"
|
|
64
|
+
|
|
65
|
+
import * as ff_core_Pair from "../../ff/core/Pair.mjs"
|
|
66
|
+
|
|
67
|
+
import * as ff_core_Path from "../../ff/core/Path.mjs"
|
|
68
|
+
|
|
69
|
+
import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
|
|
70
|
+
|
|
71
|
+
import * as ff_core_Set from "../../ff/core/Set.mjs"
|
|
72
|
+
|
|
73
|
+
import * as ff_core_Show from "../../ff/core/Show.mjs"
|
|
74
|
+
|
|
75
|
+
import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
|
|
76
|
+
|
|
77
|
+
import * as ff_core_Stack from "../../ff/core/Stack.mjs"
|
|
78
|
+
|
|
79
|
+
import * as ff_core_Stream from "../../ff/core/Stream.mjs"
|
|
80
|
+
|
|
81
|
+
import * as ff_core_String from "../../ff/core/String.mjs"
|
|
82
|
+
|
|
83
|
+
import * as ff_core_StringMap from "../../ff/core/StringMap.mjs"
|
|
84
|
+
|
|
85
|
+
import * as ff_core_Task from "../../ff/core/Task.mjs"
|
|
86
|
+
|
|
87
|
+
import * as ff_core_Try from "../../ff/core/Try.mjs"
|
|
88
|
+
|
|
89
|
+
import * as ff_core_Unit from "../../ff/core/Unit.mjs"
|
|
90
|
+
|
|
91
|
+
// type StringMap
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
export function make_() {
|
|
97
|
+
return new Map()
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export async function make_$($task) {
|
|
101
|
+
throw new Error('Function make is missing on this target in async context.');
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function StringMap_get(self_, key_) {
|
|
105
|
+
return self_.has(key_) ? ff_core_Option.Some(self_.get(key_)) : ff_core_Option.None()
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function StringMap_grab(self_, key_) {
|
|
105
109
|
|
|
106
110
|
const result = self_.get(key_)
|
|
107
111
|
if(key_ === void 0 && !self_.has(key_)) {
|
|
108
112
|
ff_core_Try.internalThrowGrabException_()
|
|
109
113
|
}
|
|
110
114
|
return result
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export function StringMap_set(self_, key_, value_) {
|
|
115
|
-
self_.set(key_, value_)
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export function StringMap_has(self_, key_) {
|
|
119
|
-
return self_.has(key_)
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export function StringMap_remove(self_, key_) {
|
|
123
|
-
return self_.delete(key_)
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export function StringMap_clear(self_) {
|
|
127
|
-
self_.clear()
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
export function StringMap_size(self_) {
|
|
131
|
-
return self_.size
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
export function StringMap_each(self_, body_) {
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export function StringMap_eachWhile(self_, body_) {
|
|
139
|
-
for(const [k, v] of self_) if(!body_(k, v)) break
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
export function StringMap_toStack(self_) {
|
|
143
|
-
const stack_ = ff_core_Stack.make_();
|
|
144
|
-
ff_core_StringMap.StringMap_each(self_, ((k_, v_) => {
|
|
145
|
-
ff_core_Stack.Stack_push(stack_, ff_core_Pair.Pair(k_, v_))
|
|
146
|
-
}));
|
|
147
|
-
return stack_
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
export function StringMap_toArray(self_) {
|
|
151
|
-
return ff_core_Stack.Stack_drain(ff_core_StringMap.StringMap_toStack(self_))
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export function StringMap_toList(self_) {
|
|
155
|
-
return ff_core_Array.Array_toList(ff_core_StringMap.StringMap_toArray(self_))
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
export function StringMap_toStream(self_) {
|
|
159
|
-
return ff_core_Array.Array_toStream(ff_core_StringMap.StringMap_toArray(self_), false)
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export function StringMap_toMap(self_) {
|
|
163
|
-
return ff_core_Array.Array_toMap(ff_core_StringMap.StringMap_toArray(self_), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
export function StringMap_keys(self_) {
|
|
167
|
-
const stack_ = ff_core_Stack.make_();
|
|
168
|
-
ff_core_StringMap.StringMap_each(self_, ((k_, v_) => {
|
|
169
|
-
ff_core_Stack.Stack_push(stack_, k_)
|
|
170
|
-
}));
|
|
171
|
-
return ff_core_Stack.Stack_toList(stack_, 0, 9007199254740991)
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
export function StringMap_values(self_) {
|
|
175
|
-
const stack_ = ff_core_Stack.make_();
|
|
176
|
-
ff_core_StringMap.StringMap_each(self_, ((k_, v_) => {
|
|
177
|
-
ff_core_Stack.Stack_push(stack_, v_)
|
|
178
|
-
}));
|
|
179
|
-
return ff_core_Stack.Stack_toList(stack_, 0, 9007199254740991)
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
export function StringMap_copy(self_) {
|
|
183
|
-
return new Map(self_)
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
export function StringMap_getOrSet(self_, key_, body_) {
|
|
187
|
-
if((!ff_core_StringMap.StringMap_has(self_, key_))) {
|
|
188
|
-
ff_core_StringMap.StringMap_set(self_, key_, body_())
|
|
189
|
-
};
|
|
190
|
-
return ff_core_StringMap.StringMap_grab(self_, key_)
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
export async function StringMap_get$(self_, key_, $task) {
|
|
194
|
-
throw new Error('Function StringMap_get is missing on this target in async context.');
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
export async function StringMap_grab$(self_, key_, $task) {
|
|
198
|
-
throw new Error('Function StringMap_grab is missing on this target in async context.');
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
export async function StringMap_set$(self_, key_, value_, $task) {
|
|
202
|
-
throw new Error('Function StringMap_set is missing on this target in async context.');
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
export async function StringMap_has$(self_, key_, $task) {
|
|
206
|
-
throw new Error('Function StringMap_has is missing on this target in async context.');
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
export async function StringMap_remove$(self_, key_, $task) {
|
|
210
|
-
throw new Error('Function StringMap_remove is missing on this target in async context.');
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
export async function StringMap_clear$(self_, $task) {
|
|
214
|
-
throw new Error('Function StringMap_clear is missing on this target in async context.');
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
export async function StringMap_size$(self_, $task) {
|
|
218
|
-
throw new Error('Function StringMap_size is missing on this target in async context.');
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
export async function StringMap_each$(self_, body_, $task) {
|
|
222
|
-
for(const [k, v] of self_) await body_(k, v)
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
export async function StringMap_eachWhile$(self_, body_, $task) {
|
|
226
|
-
for(const [k, v] of self_) if(!await body_(k, v)) break
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
export async function StringMap_toStack$(self_, $task) {
|
|
230
|
-
const stack_ = ff_core_Stack.make_();
|
|
231
|
-
ff_core_StringMap.StringMap_each(self_, ((k_, v_) => {
|
|
232
|
-
ff_core_Stack.Stack_push(stack_, ff_core_Pair.Pair(k_, v_))
|
|
233
|
-
}));
|
|
234
|
-
return stack_
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
export async function StringMap_toArray$(self_, $task) {
|
|
238
|
-
return ff_core_Stack.Stack_drain(ff_core_StringMap.StringMap_toStack(self_))
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
export async function StringMap_toList$(self_, $task) {
|
|
242
|
-
return ff_core_Array.Array_toList(ff_core_StringMap.StringMap_toArray(self_))
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
export async function StringMap_toStream$(self_, $task) {
|
|
246
|
-
return (await ff_core_Array.Array_toStream$(ff_core_StringMap.StringMap_toArray(self_), false, $task))
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
export async function StringMap_toMap$(self_, $task) {
|
|
250
|
-
return ff_core_Array.Array_toMap(ff_core_StringMap.StringMap_toArray(self_), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
export async function StringMap_keys$(self_, $task) {
|
|
254
|
-
const stack_ = ff_core_Stack.make_();
|
|
255
|
-
ff_core_StringMap.StringMap_each(self_, ((k_, v_) => {
|
|
256
|
-
ff_core_Stack.Stack_push(stack_, k_)
|
|
257
|
-
}));
|
|
258
|
-
return ff_core_Stack.Stack_toList(stack_, 0, 9007199254740991)
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
export async function StringMap_values$(self_, $task) {
|
|
262
|
-
const stack_ = ff_core_Stack.make_();
|
|
263
|
-
ff_core_StringMap.StringMap_each(self_, ((k_, v_) => {
|
|
264
|
-
ff_core_Stack.Stack_push(stack_, v_)
|
|
265
|
-
}));
|
|
266
|
-
return ff_core_Stack.Stack_toList(stack_, 0, 9007199254740991)
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
export async function StringMap_copy$(self_, $task) {
|
|
270
|
-
throw new Error('Function StringMap_copy is missing on this target in async context.');
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
export async function StringMap_getOrSet$(self_, key_, body_, $task) {
|
|
274
|
-
if((!ff_core_StringMap.StringMap_has(self_, key_))) {
|
|
275
|
-
ff_core_StringMap.StringMap_set(self_, key_, (await body_($task)))
|
|
276
|
-
};
|
|
277
|
-
return ff_core_StringMap.StringMap_grab(self_, key_)
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
115
|
+
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function StringMap_set(self_, key_, value_) {
|
|
119
|
+
self_.set(key_, value_)
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function StringMap_has(self_, key_) {
|
|
123
|
+
return self_.has(key_)
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export function StringMap_remove(self_, key_) {
|
|
127
|
+
return self_.delete(key_)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export function StringMap_clear(self_) {
|
|
131
|
+
self_.clear()
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function StringMap_size(self_) {
|
|
135
|
+
return self_.size
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function StringMap_each(self_, body_) {
|
|
139
|
+
self_.forEach((v, k) => body_(k, v))
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function StringMap_eachWhile(self_, body_) {
|
|
143
|
+
for(const [k, v] of self_) if(!body_(k, v)) break
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function StringMap_toStack(self_) {
|
|
147
|
+
const stack_ = ff_core_Stack.make_();
|
|
148
|
+
ff_core_StringMap.StringMap_each(self_, ((k_, v_) => {
|
|
149
|
+
ff_core_Stack.Stack_push(stack_, ff_core_Pair.Pair(k_, v_))
|
|
150
|
+
}));
|
|
151
|
+
return stack_
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export function StringMap_toArray(self_) {
|
|
155
|
+
return ff_core_Stack.Stack_drain(ff_core_StringMap.StringMap_toStack(self_))
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export function StringMap_toList(self_) {
|
|
159
|
+
return ff_core_Array.Array_toList(ff_core_StringMap.StringMap_toArray(self_))
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export function StringMap_toStream(self_) {
|
|
163
|
+
return ff_core_Array.Array_toStream(ff_core_StringMap.StringMap_toArray(self_), false)
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export function StringMap_toMap(self_) {
|
|
167
|
+
return ff_core_Array.Array_toMap(ff_core_StringMap.StringMap_toArray(self_), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export function StringMap_keys(self_) {
|
|
171
|
+
const stack_ = ff_core_Stack.make_();
|
|
172
|
+
ff_core_StringMap.StringMap_each(self_, ((k_, v_) => {
|
|
173
|
+
ff_core_Stack.Stack_push(stack_, k_)
|
|
174
|
+
}));
|
|
175
|
+
return ff_core_Stack.Stack_toList(stack_, 0, 9007199254740991)
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export function StringMap_values(self_) {
|
|
179
|
+
const stack_ = ff_core_Stack.make_();
|
|
180
|
+
ff_core_StringMap.StringMap_each(self_, ((k_, v_) => {
|
|
181
|
+
ff_core_Stack.Stack_push(stack_, v_)
|
|
182
|
+
}));
|
|
183
|
+
return ff_core_Stack.Stack_toList(stack_, 0, 9007199254740991)
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export function StringMap_copy(self_) {
|
|
187
|
+
return new Map(self_)
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export function StringMap_getOrSet(self_, key_, body_) {
|
|
191
|
+
if((!ff_core_StringMap.StringMap_has(self_, key_))) {
|
|
192
|
+
ff_core_StringMap.StringMap_set(self_, key_, body_())
|
|
193
|
+
};
|
|
194
|
+
return ff_core_StringMap.StringMap_grab(self_, key_)
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export async function StringMap_get$(self_, key_, $task) {
|
|
198
|
+
throw new Error('Function StringMap_get is missing on this target in async context.');
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export async function StringMap_grab$(self_, key_, $task) {
|
|
202
|
+
throw new Error('Function StringMap_grab is missing on this target in async context.');
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export async function StringMap_set$(self_, key_, value_, $task) {
|
|
206
|
+
throw new Error('Function StringMap_set is missing on this target in async context.');
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export async function StringMap_has$(self_, key_, $task) {
|
|
210
|
+
throw new Error('Function StringMap_has is missing on this target in async context.');
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export async function StringMap_remove$(self_, key_, $task) {
|
|
214
|
+
throw new Error('Function StringMap_remove is missing on this target in async context.');
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export async function StringMap_clear$(self_, $task) {
|
|
218
|
+
throw new Error('Function StringMap_clear is missing on this target in async context.');
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export async function StringMap_size$(self_, $task) {
|
|
222
|
+
throw new Error('Function StringMap_size is missing on this target in async context.');
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export async function StringMap_each$(self_, body_, $task) {
|
|
226
|
+
for(const [k, v] of self_) await body_(k, v)
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export async function StringMap_eachWhile$(self_, body_, $task) {
|
|
230
|
+
for(const [k, v] of self_) if(!await body_(k, v)) break
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export async function StringMap_toStack$(self_, $task) {
|
|
234
|
+
const stack_ = ff_core_Stack.make_();
|
|
235
|
+
ff_core_StringMap.StringMap_each(self_, ((k_, v_) => {
|
|
236
|
+
ff_core_Stack.Stack_push(stack_, ff_core_Pair.Pair(k_, v_))
|
|
237
|
+
}));
|
|
238
|
+
return stack_
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export async function StringMap_toArray$(self_, $task) {
|
|
242
|
+
return ff_core_Stack.Stack_drain(ff_core_StringMap.StringMap_toStack(self_))
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export async function StringMap_toList$(self_, $task) {
|
|
246
|
+
return ff_core_Array.Array_toList(ff_core_StringMap.StringMap_toArray(self_))
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export async function StringMap_toStream$(self_, $task) {
|
|
250
|
+
return (await ff_core_Array.Array_toStream$(ff_core_StringMap.StringMap_toArray(self_), false, $task))
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export async function StringMap_toMap$(self_, $task) {
|
|
254
|
+
return ff_core_Array.Array_toMap(ff_core_StringMap.StringMap_toArray(self_), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export async function StringMap_keys$(self_, $task) {
|
|
258
|
+
const stack_ = ff_core_Stack.make_();
|
|
259
|
+
ff_core_StringMap.StringMap_each(self_, ((k_, v_) => {
|
|
260
|
+
ff_core_Stack.Stack_push(stack_, k_)
|
|
261
|
+
}));
|
|
262
|
+
return ff_core_Stack.Stack_toList(stack_, 0, 9007199254740991)
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export async function StringMap_values$(self_, $task) {
|
|
266
|
+
const stack_ = ff_core_Stack.make_();
|
|
267
|
+
ff_core_StringMap.StringMap_each(self_, ((k_, v_) => {
|
|
268
|
+
ff_core_Stack.Stack_push(stack_, v_)
|
|
269
|
+
}));
|
|
270
|
+
return ff_core_Stack.Stack_toList(stack_, 0, 9007199254740991)
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export async function StringMap_copy$(self_, $task) {
|
|
274
|
+
throw new Error('Function StringMap_copy is missing on this target in async context.');
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export async function StringMap_getOrSet$(self_, key_, body_, $task) {
|
|
278
|
+
if((!ff_core_StringMap.StringMap_has(self_, key_))) {
|
|
279
|
+
ff_core_StringMap.StringMap_set(self_, key_, (await body_($task)))
|
|
280
|
+
};
|
|
281
|
+
return ff_core_StringMap.StringMap_grab(self_, key_)
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
|