firefly-compiler 0.4.7 → 0.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/compiler/Compiler.ff +2 -0
  2. package/compiler/Deriver.ff +7 -0
  3. package/core/Array.ff +17 -4
  4. package/core/AssetSystem.ff +1 -1
  5. package/core/BrowserSystem.ff +27 -0
  6. package/core/List.ff +4 -0
  7. package/core/Lock.ff +2 -2
  8. package/core/Random.ff +148 -0
  9. package/core/SourceLocation.ff +27 -0
  10. package/core/Task.ff +3 -0
  11. package/core/WebSocket.ff +127 -0
  12. package/httpserver/HttpServer.ff +1 -1
  13. package/lux/Css.ff +648 -0
  14. package/lux/CssTest.ff +48 -0
  15. package/lux/Lux.ff +33 -18
  16. package/lux/Main.ff +4 -1
  17. package/output/js/ff/compiler/Builder.mjs +4 -0
  18. package/output/js/ff/compiler/Compiler.mjs +5 -1
  19. package/output/js/ff/compiler/Dependencies.mjs +4 -0
  20. package/output/js/ff/compiler/Deriver.mjs +10 -2
  21. package/output/js/ff/compiler/Dictionaries.mjs +6 -0
  22. package/output/js/ff/compiler/Environment.mjs +10 -0
  23. package/output/js/ff/compiler/Inference.mjs +4 -0
  24. package/output/js/ff/compiler/JsEmitter.mjs +14 -0
  25. package/output/js/ff/compiler/JsImporter.mjs +4 -0
  26. package/output/js/ff/compiler/LspHook.mjs +6 -0
  27. package/output/js/ff/compiler/Main.mjs +16 -0
  28. package/output/js/ff/compiler/Parser.mjs +8 -0
  29. package/output/js/ff/compiler/Patterns.mjs +8 -0
  30. package/output/js/ff/compiler/Resolver.mjs +4 -0
  31. package/output/js/ff/compiler/Substitution.mjs +4 -0
  32. package/output/js/ff/compiler/Syntax.mjs +132 -0
  33. package/output/js/ff/compiler/Token.mjs +56 -0
  34. package/output/js/ff/compiler/Tokenizer.mjs +4 -0
  35. package/output/js/ff/compiler/Unification.mjs +10 -0
  36. package/output/js/ff/compiler/Wildcards.mjs +4 -0
  37. package/output/js/ff/compiler/Workspace.mjs +8 -0
  38. package/output/js/ff/core/Any.mjs +4 -0
  39. package/output/js/ff/core/Array.mjs +27 -1
  40. package/output/js/ff/core/AssetSystem.mjs +6 -2
  41. package/output/js/ff/core/Atomic.mjs +4 -0
  42. package/output/js/ff/core/Bool.mjs +4 -0
  43. package/output/js/ff/core/Box.mjs +4 -0
  44. package/output/js/ff/core/BrowserSystem.mjs +55 -0
  45. package/output/js/ff/core/Buffer.mjs +4 -0
  46. package/output/js/ff/core/BuildSystem.mjs +4 -0
  47. package/output/js/ff/core/Channel.mjs +4 -0
  48. package/output/js/ff/core/Char.mjs +4 -0
  49. package/output/js/ff/core/Core.mjs +4 -0
  50. package/output/js/ff/core/Duration.mjs +4 -0
  51. package/output/js/ff/core/Equal.mjs +4 -0
  52. package/output/js/ff/core/Error.mjs +4 -0
  53. package/output/js/ff/core/FileHandle.mjs +4 -0
  54. package/output/js/ff/core/Float.mjs +4 -0
  55. package/output/js/ff/core/HttpClient.mjs +4 -0
  56. package/output/js/ff/core/Instant.mjs +4 -0
  57. package/output/js/ff/core/Int.mjs +4 -0
  58. package/output/js/ff/core/IntMap.mjs +4 -0
  59. package/output/js/ff/core/JsSystem.mjs +4 -0
  60. package/output/js/ff/core/JsValue.mjs +4 -0
  61. package/output/js/ff/core/List.mjs +12 -0
  62. package/output/js/ff/core/Lock.mjs +6 -2
  63. package/output/js/ff/core/Log.mjs +4 -0
  64. package/output/js/ff/core/Map.mjs +4 -0
  65. package/output/js/ff/core/NodeSystem.mjs +4 -0
  66. package/output/js/ff/core/Nothing.mjs +4 -0
  67. package/output/js/ff/core/Option.mjs +8 -0
  68. package/output/js/ff/core/Ordering.mjs +4 -0
  69. package/output/js/ff/core/Pair.mjs +6 -0
  70. package/output/js/ff/core/Path.mjs +4 -0
  71. package/output/js/ff/core/Random.mjs +340 -0
  72. package/output/js/ff/core/RbMap.mjs +4 -0
  73. package/output/js/ff/core/Serializable.mjs +4 -0
  74. package/output/js/ff/core/Set.mjs +4 -0
  75. package/output/js/ff/core/Show.mjs +4 -0
  76. package/output/js/ff/core/SourceLocation.mjs +45 -1
  77. package/output/js/ff/core/Stack.mjs +4 -0
  78. package/output/js/ff/core/Stream.mjs +4 -0
  79. package/output/js/ff/core/String.mjs +4 -0
  80. package/output/js/ff/core/StringMap.mjs +4 -0
  81. package/output/js/ff/core/Task.mjs +7 -1
  82. package/output/js/ff/core/Try.mjs +4 -0
  83. package/output/js/ff/core/Unit.mjs +4 -0
  84. package/output/js/ff/core/WebSocket.mjs +198 -0
  85. package/package.json +1 -1
  86. package/vscode/package.json +1 -1
  87. package/webserver/.firefly/include/package-lock.json +16 -0
  88. package/webserver/.firefly/include/package.json +5 -0
  89. package/webserver/.firefly/package.ff +2 -0
  90. package/webserver/WebServer.ff +608 -0
@@ -66,6 +66,8 @@ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
66
66
 
67
67
  import * as ff_core_Path from "../../ff/core/Path.mjs"
68
68
 
69
+ import * as ff_core_Random from "../../ff/core/Random.mjs"
70
+
69
71
  import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
70
72
 
71
73
  import * as ff_core_Set from "../../ff/core/Set.mjs"
@@ -88,6 +90,8 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
88
90
 
89
91
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
90
92
 
93
+ import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
94
+
91
95
  // type Pair
92
96
  export function Pair(first_, second_) {
93
97
  return {first_, second_};
@@ -267,6 +271,7 @@ const value_a = value_;
267
271
  {
268
272
  const v_ = value_a;
269
273
  serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 17), 0);
274
+ ff_core_Serializable.Serialization_autoResize(serialization_, 1);
270
275
  ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 0);
271
276
  serialization_.offset_ += 1;
272
277
  ff_core_Serializable_Serializable$A.serializeUsing_(serialization_, v_.first_);
@@ -300,6 +305,7 @@ const value_a = value_;
300
305
  {
301
306
  const v_ = value_a;
302
307
  serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 17), 0);
308
+ ff_core_Serializable.Serialization_autoResize(serialization_, 1);
303
309
  ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 0);
304
310
  serialization_.offset_ += 1;
305
311
  ff_core_Serializable_Serializable$A.serializeUsing_(serialization_, v_.first_);
@@ -72,6 +72,8 @@ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
72
72
 
73
73
  import * as ff_core_Path from "../../ff/core/Path.mjs"
74
74
 
75
+ import * as ff_core_Random from "../../ff/core/Random.mjs"
76
+
75
77
  import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
76
78
 
77
79
  import * as ff_core_Set from "../../ff/core/Set.mjs"
@@ -94,6 +96,8 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
94
96
 
95
97
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
96
98
 
99
+ import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
100
+
97
101
  // type Path
98
102
 
99
103
 
@@ -0,0 +1,340 @@
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_Random from "../../ff/core/Random.mjs"
70
+
71
+ import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
72
+
73
+ import * as ff_core_Set from "../../ff/core/Set.mjs"
74
+
75
+ import * as ff_core_Show from "../../ff/core/Show.mjs"
76
+
77
+ import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
78
+
79
+ import * as ff_core_Stack from "../../ff/core/Stack.mjs"
80
+
81
+ import * as ff_core_Stream from "../../ff/core/Stream.mjs"
82
+
83
+ import * as ff_core_String from "../../ff/core/String.mjs"
84
+
85
+ import * as ff_core_StringMap from "../../ff/core/StringMap.mjs"
86
+
87
+ import * as ff_core_Task from "../../ff/core/Task.mjs"
88
+
89
+ import * as ff_core_Try from "../../ff/core/Try.mjs"
90
+
91
+ import * as ff_core_Unit from "../../ff/core/Unit.mjs"
92
+
93
+ import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
94
+
95
+ // type Random
96
+
97
+
98
+
99
+
100
+ export function seedInt_(seed_) {
101
+ return ff_core_Random.seedFloat_(ff_core_Int.Int_toFloat(seed_))
102
+ }
103
+
104
+ export function seedFloat_(seed_) {
105
+ const buffer_ = ff_core_Buffer.make_(8, false);
106
+ ff_core_Buffer.Buffer_setFloat64(buffer_, 0, seed_, true);
107
+ return ff_core_Random.seedBuffer_(buffer_)
108
+ }
109
+
110
+ export function seedInstant_(seed_) {
111
+ return ff_core_Random.seedFloat_(seed_)
112
+ }
113
+
114
+ export function seedBuffer_(buffer_) {
115
+
116
+ var n = 0xefc8249d;
117
+ function mash(data) {
118
+ for(var i = 0; i < data.byteLength; i++) {
119
+ n += data.getUint8(i);
120
+ var h = 0.02519603282416938 * n;
121
+ n = h >>> 0;
122
+ h -= n;
123
+ h *= n;
124
+ n = h >>> 0;
125
+ h -= n;
126
+ n += h * 0x100000000; // 2^32
127
+ }
128
+ return (n >>> 0) * 2.3283064365386963e-10; // 2^-32
129
+ }
130
+ var space = new DataView(new Uint8Array([32]).buffer);
131
+ var r = {
132
+ s0: mash(space),
133
+ s1: mash(space),
134
+ s2: mash(space),
135
+ c: 1,
136
+ spareGauss: NaN
137
+ };
138
+ r.s0 -= mash(buffer_);
139
+ if(r.s0 < 0) r.s0 += 1;
140
+ r.s1 -= mash(buffer_);
141
+ if(r.s1 < 0) r.s1 += 1;
142
+ r.s2 -= mash(buffer_);
143
+ if(r.s2 < 0) r.s2 += 1;
144
+ return r;
145
+
146
+ }
147
+
148
+ export async function seedInt_$(seed_, $task) {
149
+ return ff_core_Random.seedFloat_(ff_core_Int.Int_toFloat(seed_))
150
+ }
151
+
152
+ export async function seedFloat_$(seed_, $task) {
153
+ const buffer_ = ff_core_Buffer.make_(8, false);
154
+ ff_core_Buffer.Buffer_setFloat64(buffer_, 0, seed_, true);
155
+ return ff_core_Random.seedBuffer_(buffer_)
156
+ }
157
+
158
+ export async function seedInstant_$(seed_, $task) {
159
+ return ff_core_Random.seedFloat_(seed_)
160
+ }
161
+
162
+ export async function seedBuffer_$(buffer_, $task) {
163
+ throw new Error('Function seedBuffer is missing on this target in async context.');
164
+ }
165
+
166
+ export function Random_copy(self_) {
167
+
168
+ return {...self_};
169
+
170
+ }
171
+
172
+ export function Random_nextInt(self_, from_, until_) {
173
+
174
+ return Random_nextFloat(self_, from_, until_) | 0;
175
+
176
+ }
177
+
178
+ export function Random_nextFloat(self_, from_, until_) {
179
+
180
+ var t = 2091639 * self_.s0 + self_.c * 2.3283064365386963e-10; // 2^-32
181
+ self_.s0 = self_.s1;
182
+ self_.s1 = self_.s2;
183
+ var uniform = self_.s2 = t - (self_.c = t | 0);
184
+ return from_ + uniform * (until_ - from_);
185
+
186
+ }
187
+
188
+ export function Random_nextBool(self_) {
189
+ return (ff_core_Random.Random_nextInt(self_, 0, 2) === 0)
190
+ }
191
+
192
+ export function Random_nextBytes(self_, buffer_, start_, stop_) {
193
+ ff_core_List.List_each(ff_core_Int.Int_until(start_, stop_), ((i_) => {
194
+ ff_core_Buffer.Buffer_setUint8(buffer_, i_, ff_core_Random.Random_nextInt(self_, 0, 256))
195
+ }))
196
+ }
197
+
198
+ export function Random_nextGauss(self_, mean_, standardDeviation_) {
199
+
200
+ if(!isNaN(self_.spareGauss)) {
201
+ const result = self_.spareGauss * standardDeviation_ + mean_;
202
+ self_.spareGauss = NaN;
203
+ return result;
204
+ } else {
205
+ let u = 0.5, v = 0.5, s = 0.5;
206
+ do {
207
+ u = Random_nextFloat(self_, 0.0, 1.0) * 2 - 1;
208
+ v = Random_nextFloat(self_, 0.0, 1.0) * 2 - 1;
209
+ s = u * u + v * v;
210
+ } while(s >= 1 || s == 0);
211
+ s = Math.sqrt(-2.0 * Math.log(s) / s);
212
+ self_.spareGauss = v * s;
213
+ return mean_ + standardDeviation_ * u * s;
214
+ }
215
+
216
+ }
217
+
218
+ export function Random_shuffleStack(self_, stack_) {
219
+ ff_core_List.List_each(ff_core_Int.Int_until(0, (ff_core_Stack.Stack_size(stack_) - 1)), ((i_) => {
220
+ const j_ = (ff_core_Random.Random_nextInt(self_, 0, (ff_core_Stack.Stack_size(stack_) - i_)) + i_);
221
+ const value_ = ff_core_Stack.Stack_grab(stack_, i_);
222
+ ff_core_Stack.Stack_set(stack_, i_, ff_core_Stack.Stack_grab(stack_, j_));
223
+ ff_core_Stack.Stack_set(stack_, j_, value_)
224
+ }))
225
+ }
226
+
227
+ export function Random_shuffleArray(self_, array_) {
228
+ const stack_ = ff_core_Array.Array_toStack(array_);
229
+ ff_core_Random.Random_shuffleStack(self_, ff_core_Array.Array_toStack(array_));
230
+ return ff_core_Stack.Stack_drain(stack_)
231
+ }
232
+
233
+ export function Random_shuffleList(self_, list_) {
234
+ const stack_ = ff_core_List.List_toStack(list_);
235
+ ff_core_Random.Random_shuffleStack(self_, ff_core_List.List_toStack(list_));
236
+ return ff_core_Stack.Stack_toList(stack_, 0, 9007199254740991)
237
+ }
238
+
239
+ export function Random_sampleStack(self_, count_, stack_, body_) {
240
+ ff_core_Array.Array_each(ff_core_Array.Array_takeFirst(ff_core_Random.Random_shuffleArray(self_, ff_core_Stack.Stack_toArray(stack_, 0, 9007199254740991)), count_), ((_w1) => {
241
+ body_(_w1)
242
+ }))
243
+ }
244
+
245
+ export function Random_sampleArray(self_, count_, array_) {
246
+ return ff_core_Array.Array_takeFirst(ff_core_Random.Random_shuffleArray(self_, array_), count_)
247
+ }
248
+
249
+ export function Random_sampleList(self_, count_, list_) {
250
+ return ff_core_List.List_takeFirst(ff_core_Random.Random_shuffleList(self_, list_), count_)
251
+ }
252
+
253
+ export function Random_grabStack(self_, stack_) {
254
+ return ff_core_Stack.Stack_grab(stack_, ff_core_Random.Random_nextInt(self_, 0, ff_core_Stack.Stack_size(stack_)))
255
+ }
256
+
257
+ export function Random_grabArray(self_, array_) {
258
+ return ff_core_Array.Array_grab(array_, ff_core_Random.Random_nextInt(self_, 0, ff_core_Array.Array_size(array_)))
259
+ }
260
+
261
+ export function Random_grabList(self_, list_) {
262
+ return ff_core_Stack.Stack_grab(list_, ff_core_Random.Random_nextInt(self_, 0, ff_core_Stack.Stack_size(list_)))
263
+ }
264
+
265
+ export async function Random_copy$(self_, $task) {
266
+ throw new Error('Function Random_copy is missing on this target in async context.');
267
+ }
268
+
269
+ export async function Random_nextInt$(self_, from_, until_, $task) {
270
+ throw new Error('Function Random_nextInt is missing on this target in async context.');
271
+ }
272
+
273
+ export async function Random_nextFloat$(self_, from_, until_, $task) {
274
+ throw new Error('Function Random_nextFloat is missing on this target in async context.');
275
+ }
276
+
277
+ export async function Random_nextBool$(self_, $task) {
278
+ return (ff_core_Random.Random_nextInt(self_, 0, 2) === 0)
279
+ }
280
+
281
+ export async function Random_nextBytes$(self_, buffer_, start_, stop_, $task) {
282
+ ff_core_List.List_each(ff_core_Int.Int_until(start_, stop_), ((i_) => {
283
+ ff_core_Buffer.Buffer_setUint8(buffer_, i_, ff_core_Random.Random_nextInt(self_, 0, 256))
284
+ }))
285
+ }
286
+
287
+ export async function Random_nextGauss$(self_, mean_, standardDeviation_, $task) {
288
+ throw new Error('Function Random_nextGauss is missing on this target in async context.');
289
+ }
290
+
291
+ export async function Random_shuffleStack$(self_, stack_, $task) {
292
+ ff_core_List.List_each(ff_core_Int.Int_until(0, (ff_core_Stack.Stack_size(stack_) - 1)), ((i_) => {
293
+ const j_ = (ff_core_Random.Random_nextInt(self_, 0, (ff_core_Stack.Stack_size(stack_) - i_)) + i_);
294
+ const value_ = ff_core_Stack.Stack_grab(stack_, i_);
295
+ ff_core_Stack.Stack_set(stack_, i_, ff_core_Stack.Stack_grab(stack_, j_));
296
+ ff_core_Stack.Stack_set(stack_, j_, value_)
297
+ }))
298
+ }
299
+
300
+ export async function Random_shuffleArray$(self_, array_, $task) {
301
+ const stack_ = ff_core_Array.Array_toStack(array_);
302
+ ff_core_Random.Random_shuffleStack(self_, ff_core_Array.Array_toStack(array_));
303
+ return ff_core_Stack.Stack_drain(stack_)
304
+ }
305
+
306
+ export async function Random_shuffleList$(self_, list_, $task) {
307
+ const stack_ = ff_core_List.List_toStack(list_);
308
+ ff_core_Random.Random_shuffleStack(self_, ff_core_List.List_toStack(list_));
309
+ return ff_core_Stack.Stack_toList(stack_, 0, 9007199254740991)
310
+ }
311
+
312
+ export async function Random_sampleStack$(self_, count_, stack_, body_, $task) {
313
+ (await ff_core_Array.Array_each$(ff_core_Array.Array_takeFirst(ff_core_Random.Random_shuffleArray(self_, ff_core_Stack.Stack_toArray(stack_, 0, 9007199254740991)), count_), (async (_w1, $task) => {
314
+ (await body_(_w1, $task))
315
+ }), $task))
316
+ }
317
+
318
+ export async function Random_sampleArray$(self_, count_, array_, $task) {
319
+ return ff_core_Array.Array_takeFirst(ff_core_Random.Random_shuffleArray(self_, array_), count_)
320
+ }
321
+
322
+ export async function Random_sampleList$(self_, count_, list_, $task) {
323
+ return ff_core_List.List_takeFirst(ff_core_Random.Random_shuffleList(self_, list_), count_)
324
+ }
325
+
326
+ export async function Random_grabStack$(self_, stack_, $task) {
327
+ return ff_core_Stack.Stack_grab(stack_, ff_core_Random.Random_nextInt(self_, 0, ff_core_Stack.Stack_size(stack_)))
328
+ }
329
+
330
+ export async function Random_grabArray$(self_, array_, $task) {
331
+ return ff_core_Array.Array_grab(array_, ff_core_Random.Random_nextInt(self_, 0, ff_core_Array.Array_size(array_)))
332
+ }
333
+
334
+ export async function Random_grabList$(self_, list_, $task) {
335
+ return ff_core_Stack.Stack_grab(list_, ff_core_Random.Random_nextInt(self_, 0, ff_core_Stack.Stack_size(list_)))
336
+ }
337
+
338
+
339
+
340
+
@@ -68,6 +68,8 @@ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
68
68
 
69
69
  import * as ff_core_Path from "../../ff/core/Path.mjs"
70
70
 
71
+ import * as ff_core_Random from "../../ff/core/Random.mjs"
72
+
71
73
  import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
72
74
 
73
75
  import * as ff_core_Set from "../../ff/core/Set.mjs"
@@ -90,6 +92,8 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
90
92
 
91
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
92
94
 
95
+ import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
+
93
97
  // type Color
94
98
  const R$ = {R: true};
95
99
  export function R() {
@@ -66,6 +66,8 @@ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
66
66
 
67
67
  import * as ff_core_Path from "../../ff/core/Path.mjs"
68
68
 
69
+ import * as ff_core_Random from "../../ff/core/Random.mjs"
70
+
69
71
  import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
70
72
 
71
73
  import * as ff_core_Set from "../../ff/core/Set.mjs"
@@ -88,6 +90,8 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
88
90
 
89
91
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
90
92
 
93
+ import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
94
+
91
95
  // type DeserializationChecksumException
92
96
  const DeserializationChecksumException$ = {DeserializationChecksumException: true};
93
97
  export function DeserializationChecksumException() {
@@ -66,6 +66,8 @@ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
66
66
 
67
67
  import * as ff_core_Path from "../../ff/core/Path.mjs"
68
68
 
69
+ import * as ff_core_Random from "../../ff/core/Random.mjs"
70
+
69
71
  import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
70
72
 
71
73
  import * as ff_core_Set from "../../ff/core/Set.mjs"
@@ -88,6 +90,8 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
88
90
 
89
91
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
90
92
 
93
+ import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
94
+
91
95
  // newtype Set
92
96
 
93
97
 
@@ -66,6 +66,8 @@ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
66
66
 
67
67
  import * as ff_core_Path from "../../ff/core/Path.mjs"
68
68
 
69
+ import * as ff_core_Random from "../../ff/core/Random.mjs"
70
+
69
71
  import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
70
72
 
71
73
  import * as ff_core_Set from "../../ff/core/Set.mjs"
@@ -88,6 +90,8 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
88
90
 
89
91
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
90
92
 
93
+ import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
94
+
91
95
 
92
96
 
93
97
 
@@ -66,6 +66,8 @@ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
66
66
 
67
67
  import * as ff_core_Path from "../../ff/core/Path.mjs"
68
68
 
69
+ import * as ff_core_Random from "../../ff/core/Random.mjs"
70
+
69
71
  import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
70
72
 
71
73
  import * as ff_core_Set from "../../ff/core/Set.mjs"
@@ -88,6 +90,8 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
88
90
 
89
91
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
90
92
 
93
+ import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
94
+
91
95
  // newtype SourceLocation
92
96
 
93
97
 
@@ -224,6 +228,46 @@ return (_w1 !== 62)
224
228
  })), 1), 62)
225
229
  }
226
230
 
227
-
231
+ export const ff_core_Show_Show$ff_core_SourceLocation_SourceLocation = {
232
+ show_(self_) {
233
+ return self_
234
+ },
235
+ async show_$(self_, $task) {
236
+ return self_
237
+ }
238
+ };
239
+
240
+ export const ff_core_Equal_Equal$ff_core_SourceLocation_SourceLocation = {
241
+ equals_(a_, b_) {
242
+ return (a_ === b_)
243
+ },
244
+ async equals_$(a_, b_, $task) {
245
+ return (a_ === b_)
246
+ }
247
+ };
248
+
249
+ export const ff_core_Ordering_Order$ff_core_SourceLocation_SourceLocation = {
250
+ compare_(a_, b_) {
251
+ return ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String.compare_(a_, b_)
252
+ },
253
+ async compare_$(a_, b_, $task) {
254
+ return ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String.compare_(a_, b_)
255
+ }
256
+ };
257
+
258
+ export const ff_core_Serializable_Serializable$ff_core_SourceLocation_SourceLocation = {
259
+ serializeUsing_(serialization_, self_) {
260
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.serializeUsing_(serialization_, self_)
261
+ },
262
+ deserializeUsing_(serialization_) {
263
+ return ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_)
264
+ },
265
+ async serializeUsing_$(serialization_, self_, $task) {
266
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.serializeUsing_(serialization_, self_)
267
+ },
268
+ async deserializeUsing_$(serialization_, $task) {
269
+ return ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_)
270
+ }
271
+ };
228
272
 
229
273
 
@@ -66,6 +66,8 @@ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
66
66
 
67
67
  import * as ff_core_Path from "../../ff/core/Path.mjs"
68
68
 
69
+ import * as ff_core_Random from "../../ff/core/Random.mjs"
70
+
69
71
  import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
70
72
 
71
73
  import * as ff_core_Set from "../../ff/core/Set.mjs"
@@ -88,6 +90,8 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
88
90
 
89
91
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
90
92
 
93
+ import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
94
+
91
95
  // type Stack
92
96
 
93
97
 
@@ -66,6 +66,8 @@ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
66
66
 
67
67
  import * as ff_core_Path from "../../ff/core/Path.mjs"
68
68
 
69
+ import * as ff_core_Random from "../../ff/core/Random.mjs"
70
+
69
71
  import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
70
72
 
71
73
  import * as ff_core_Set from "../../ff/core/Set.mjs"
@@ -88,6 +90,8 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
88
90
 
89
91
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
90
92
 
93
+ import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
94
+
91
95
  // type Stream
92
96
  export function Stream(next_, close_) {
93
97
  return {next_, close_};
@@ -66,6 +66,8 @@ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
66
66
 
67
67
  import * as ff_core_Path from "../../ff/core/Path.mjs"
68
68
 
69
+ import * as ff_core_Random from "../../ff/core/Random.mjs"
70
+
69
71
  import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
70
72
 
71
73
  import * as ff_core_Set from "../../ff/core/Set.mjs"
@@ -88,6 +90,8 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
88
90
 
89
91
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
90
92
 
93
+ import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
94
+
91
95
  // type String
92
96
 
93
97
 
@@ -66,6 +66,8 @@ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
66
66
 
67
67
  import * as ff_core_Path from "../../ff/core/Path.mjs"
68
68
 
69
+ import * as ff_core_Random from "../../ff/core/Random.mjs"
70
+
69
71
  import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
70
72
 
71
73
  import * as ff_core_Set from "../../ff/core/Set.mjs"
@@ -88,6 +90,8 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
88
90
 
89
91
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
90
92
 
93
+ import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
94
+
91
95
  // type StringMap
92
96
 
93
97
 
@@ -66,6 +66,8 @@ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
66
66
 
67
67
  import * as ff_core_Path from "../../ff/core/Path.mjs"
68
68
 
69
+ import * as ff_core_Random from "../../ff/core/Random.mjs"
70
+
69
71
  import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
70
72
 
71
73
  import * as ff_core_Set from "../../ff/core/Set.mjs"
@@ -88,6 +90,8 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
88
90
 
89
91
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
90
92
 
93
+ import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
94
+
91
95
  // type Task
92
96
 
93
97
 
@@ -129,7 +133,9 @@ export function Task_throwIfAborted(self_) {
129
133
  }
130
134
 
131
135
  export function Task_abort(self_) {
132
- throw new Error('Function Task_abort is missing on this target in sync context.');
136
+
137
+ self_.controller.abort()
138
+
133
139
  }
134
140
 
135
141
  export function Task_channel(self_, capacity_ = 0) {
@@ -66,6 +66,8 @@ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
66
66
 
67
67
  import * as ff_core_Path from "../../ff/core/Path.mjs"
68
68
 
69
+ import * as ff_core_Random from "../../ff/core/Random.mjs"
70
+
69
71
  import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
70
72
 
71
73
  import * as ff_core_Set from "../../ff/core/Set.mjs"
@@ -88,6 +90,8 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
88
90
 
89
91
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
90
92
 
93
+ import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
94
+
91
95
  // type Try
92
96
  export function Success(value_) {
93
97
  return {Success: true, value_};
@@ -66,6 +66,8 @@ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
66
66
 
67
67
  import * as ff_core_Path from "../../ff/core/Path.mjs"
68
68
 
69
+ import * as ff_core_Random from "../../ff/core/Random.mjs"
70
+
69
71
  import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
70
72
 
71
73
  import * as ff_core_Set from "../../ff/core/Set.mjs"
@@ -88,6 +90,8 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
88
90
 
89
91
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
90
92
 
93
+ import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
94
+
91
95
  // type Unit
92
96
  const Unit$ = {Unit: true};
93
97
  export function Unit() {