firefly-compiler 0.4.19 → 0.4.21
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/compiler/Builder.ff +23 -13
- package/compiler/JsEmitter.ff +120 -76
- package/compiler/LspHook.ff +17 -3
- package/compiler/Main.ff +13 -7
- package/compiler/Parser.ff +11 -13
- package/compiler/Resolver.ff +15 -15
- package/compiler/Syntax.ff +1 -0
- package/core/Array.ff +6 -4
- package/core/Int.ff +12 -12
- package/core/Json.ff +2 -2
- package/core/List.ff +6 -4
- package/experimental/benchmarks/ListGrab.ff +23 -0
- package/experimental/benchmarks/ListGrab.java +55 -0
- package/experimental/benchmarks/Pyrotek45.ff +30 -0
- package/experimental/benchmarks/Pyrotek45.java +64 -0
- package/experimental/tests/TestJson.ff +26 -0
- package/lsp/CompletionHandler.ff +14 -14
- package/lsp/Handler.ff +56 -60
- package/lsp/SignatureHelpHandler.ff +5 -4
- package/lsp/SymbolHandler.ff +18 -4
- package/lsp/TestReferences.ff +15 -0
- package/lsp/TestReferencesCase.ff +8 -0
- package/output/js/ff/compiler/Builder.mjs +50 -44
- package/output/js/ff/compiler/Dependencies.mjs +0 -2
- package/output/js/ff/compiler/Deriver.mjs +16 -140
- package/output/js/ff/compiler/Dictionaries.mjs +8 -222
- package/output/js/ff/compiler/Environment.mjs +12 -154
- package/output/js/ff/compiler/Inference.mjs +127 -1013
- package/output/js/ff/compiler/JsEmitter.mjs +434 -2344
- package/output/js/ff/compiler/JsImporter.mjs +0 -12
- package/output/js/ff/compiler/LspHook.mjs +548 -151
- package/output/js/ff/compiler/Main.mjs +96 -550
- package/output/js/ff/compiler/Parser.mjs +58 -390
- package/output/js/ff/compiler/Patterns.mjs +20 -200
- package/output/js/ff/compiler/Resolver.mjs +26 -340
- package/output/js/ff/compiler/Substitution.mjs +2 -160
- package/output/js/ff/compiler/Syntax.mjs +449 -3293
- package/output/js/ff/compiler/Token.mjs +9 -1095
- package/output/js/ff/compiler/Tokenizer.mjs +4 -2
- package/output/js/ff/compiler/Unification.mjs +26 -360
- package/output/js/ff/compiler/Wildcards.mjs +0 -86
- package/output/js/ff/compiler/Workspace.mjs +8 -96
- package/output/js/ff/core/Array.mjs +15 -8
- package/output/js/ff/core/AssetSystem.mjs +4 -14
- package/output/js/ff/core/Bool.mjs +0 -12
- package/output/js/ff/core/Core.mjs +0 -30
- package/output/js/ff/core/Int.mjs +24 -24
- package/output/js/ff/core/IntMap.mjs +0 -8
- package/output/js/ff/core/Json.mjs +2 -42
- package/output/js/ff/core/List.mjs +23 -32
- package/output/js/ff/core/Lock.mjs +0 -10
- package/output/js/ff/core/Map.mjs +0 -24
- package/output/js/ff/core/Option.mjs +10 -286
- package/output/js/ff/core/Ordering.mjs +16 -158
- package/output/js/ff/core/Pair.mjs +2 -34
- package/output/js/ff/core/Path.mjs +2 -28
- package/output/js/ff/core/Random.mjs +4 -4
- package/output/js/ff/core/RbMap.mjs +56 -644
- package/output/js/ff/core/Show.mjs +0 -16
- package/output/js/ff/core/Stream.mjs +14 -144
- package/output/js/ff/core/StringMap.mjs +0 -8
- package/output/js/ff/core/Try.mjs +4 -108
- package/output/js/ff/core/Unit.mjs +2 -16
- package/package.json +1 -1
- package/postgresql/Pg.ff +23 -23
- package/vscode/client/src/extension.ts +30 -2
- package/vscode/package.json +17 -1
- package/core/Stack.ff +0 -250
|
@@ -116,19 +116,13 @@ return ff_core_Core.panic_(((message_ + " ") + ff_compiler_Syntax.Location_show(
|
|
|
116
116
|
export function constraintsToInstances_(constraints_) {
|
|
117
117
|
return ff_core_List.List_toMap(ff_core_List.List_map(constraints_, ((c_) => {
|
|
118
118
|
const typeName_ = (((_1) => {
|
|
119
|
-
{
|
|
120
119
|
if(_1.TConstructor) {
|
|
121
120
|
const name_ = _1.name_;
|
|
122
121
|
return name_
|
|
123
|
-
return
|
|
124
122
|
}
|
|
125
|
-
}
|
|
126
|
-
{
|
|
127
123
|
if(_1.TVariable) {
|
|
128
124
|
const i_ = _1.index_;
|
|
129
125
|
return ff_compiler_Dictionaries.fail_(c_.at_, ("Unexpected unification variable: $" + i_))
|
|
130
|
-
return
|
|
131
|
-
}
|
|
132
126
|
}
|
|
133
127
|
}))(ff_core_List.List_grabFirst(c_.generics_));
|
|
134
128
|
return ff_core_Pair.Pair(ff_compiler_Unification.InstanceKey(c_.name_, typeName_), ff_compiler_Unification.InstanceValue([], [], ff_compiler_Syntax.PackagePair("", ""), "", c_.name_, c_.generics_))
|
|
@@ -146,19 +140,13 @@ return ff_core_Core.panic_(((message_ + " ") + ff_compiler_Syntax.Location_show(
|
|
|
146
140
|
export async function constraintsToInstances_$(constraints_, $task) {
|
|
147
141
|
return ff_core_List.List_toMap(ff_core_List.List_map(constraints_, ((c_) => {
|
|
148
142
|
const typeName_ = (((_1) => {
|
|
149
|
-
{
|
|
150
143
|
if(_1.TConstructor) {
|
|
151
144
|
const name_ = _1.name_;
|
|
152
145
|
return name_
|
|
153
|
-
return
|
|
154
|
-
}
|
|
155
146
|
}
|
|
156
|
-
{
|
|
157
147
|
if(_1.TVariable) {
|
|
158
148
|
const i_ = _1.index_;
|
|
159
149
|
return ff_compiler_Dictionaries.fail_(c_.at_, ("Unexpected unification variable: $" + i_))
|
|
160
|
-
return
|
|
161
|
-
}
|
|
162
150
|
}
|
|
163
151
|
}))(ff_core_List.List_grabFirst(c_.generics_));
|
|
164
152
|
return ff_core_Pair.Pair(ff_compiler_Unification.InstanceKey(c_.name_, typeName_), ff_compiler_Unification.InstanceValue([], [], ff_compiler_Syntax.PackagePair("", ""), "", c_.name_, c_.generics_))
|
|
@@ -171,15 +159,12 @@ const functionSignatures_ = ff_core_List.List_toMap(ff_core_List.List_collect(ff
|
|
|
171
159
|
{
|
|
172
160
|
const name_ = _1.first_;
|
|
173
161
|
const s_ = _1.second_;
|
|
174
|
-
|
|
175
|
-
if(_guard1) {
|
|
162
|
+
if((!s_.isVariable_)) {
|
|
176
163
|
return ff_core_Option.Some(ff_core_Pair.Pair(name_, s_.signature_))
|
|
177
|
-
return
|
|
178
164
|
}
|
|
179
165
|
}
|
|
180
166
|
{
|
|
181
167
|
return ff_core_Option.None()
|
|
182
|
-
return
|
|
183
168
|
}
|
|
184
169
|
})), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String);
|
|
185
170
|
const lets_ = ff_core_List.List_map(module_.lets_, ((_w1) => {
|
|
@@ -199,7 +184,6 @@ const _1 = module_;
|
|
|
199
184
|
{
|
|
200
185
|
const _c = _1;
|
|
201
186
|
return ff_compiler_Syntax.Module(_c.file_, _c.packagePair_, _c.imports_, _c.types_, _c.traits_, instances_, extends_, lets_, functions_)
|
|
202
|
-
return
|
|
203
187
|
}
|
|
204
188
|
}
|
|
205
189
|
}
|
|
@@ -210,7 +194,6 @@ const _1 = definition_;
|
|
|
210
194
|
{
|
|
211
195
|
const _c = _1;
|
|
212
196
|
return ff_compiler_Syntax.DLet(_c.at_, _c.name_, _c.variableType_, ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, definition_.value_))
|
|
213
|
-
return
|
|
214
197
|
}
|
|
215
198
|
}
|
|
216
199
|
}
|
|
@@ -278,7 +261,6 @@ const _1 = g_;
|
|
|
278
261
|
{
|
|
279
262
|
const _c = _1;
|
|
280
263
|
return ff_compiler_Syntax.MatchGuard(_c.at_, ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, g_.term_), _c.pattern_)
|
|
281
|
-
return
|
|
282
264
|
}
|
|
283
265
|
}
|
|
284
266
|
})), ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, case_.body_))
|
|
@@ -294,37 +276,21 @@ return
|
|
|
294
276
|
export function Dictionaries_processTerm(self_, functions_, term_) {
|
|
295
277
|
{
|
|
296
278
|
const _1 = term_;
|
|
297
|
-
{
|
|
298
279
|
if(_1.EString) {
|
|
299
280
|
return term_
|
|
300
|
-
return
|
|
301
|
-
}
|
|
302
281
|
}
|
|
303
|
-
{
|
|
304
282
|
if(_1.EChar) {
|
|
305
283
|
return term_
|
|
306
|
-
return
|
|
307
|
-
}
|
|
308
284
|
}
|
|
309
|
-
{
|
|
310
285
|
if(_1.EInt) {
|
|
311
286
|
return term_
|
|
312
|
-
return
|
|
313
|
-
}
|
|
314
287
|
}
|
|
315
|
-
{
|
|
316
288
|
if(_1.EFloat) {
|
|
317
289
|
return term_
|
|
318
|
-
return
|
|
319
290
|
}
|
|
320
|
-
}
|
|
321
|
-
{
|
|
322
291
|
if(_1.EVariable) {
|
|
323
292
|
return term_
|
|
324
|
-
return
|
|
325
|
-
}
|
|
326
293
|
}
|
|
327
|
-
{
|
|
328
294
|
if(_1.EField) {
|
|
329
295
|
const e_ = _1;
|
|
330
296
|
{
|
|
@@ -332,20 +298,14 @@ const _1 = e_;
|
|
|
332
298
|
{
|
|
333
299
|
const _c = _1;
|
|
334
300
|
return ff_compiler_Syntax.EField(_c.at_, _c.newtype_, ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, e_.record_), _c.field_)
|
|
335
|
-
return
|
|
336
301
|
}
|
|
337
302
|
}
|
|
338
303
|
return
|
|
339
304
|
}
|
|
340
|
-
}
|
|
341
|
-
{
|
|
342
305
|
if(_1.EWildcard) {
|
|
343
306
|
const e_ = _1;
|
|
344
307
|
return term_
|
|
345
|
-
return
|
|
346
|
-
}
|
|
347
308
|
}
|
|
348
|
-
{
|
|
349
309
|
if(_1.EList) {
|
|
350
310
|
const e_ = _1;
|
|
351
311
|
{
|
|
@@ -357,7 +317,6 @@ return ff_compiler_Syntax.EList(_c.at_, _c.elementType_, ff_core_List.List_map(e
|
|
|
357
317
|
const item_ = _1.first_;
|
|
358
318
|
const b_ = _1.second_;
|
|
359
319
|
return ff_core_Pair.Pair(ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, item_), b_)
|
|
360
|
-
return
|
|
361
320
|
}
|
|
362
321
|
})))
|
|
363
322
|
return
|
|
@@ -365,8 +324,6 @@ return
|
|
|
365
324
|
}
|
|
366
325
|
return
|
|
367
326
|
}
|
|
368
|
-
}
|
|
369
|
-
{
|
|
370
327
|
if(_1.ESequential) {
|
|
371
328
|
const e_ = _1;
|
|
372
329
|
{
|
|
@@ -374,13 +331,10 @@ const _1 = e_;
|
|
|
374
331
|
{
|
|
375
332
|
const _c = _1;
|
|
376
333
|
return ff_compiler_Syntax.ESequential(_c.at_, ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, e_.before_), ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, e_.after_))
|
|
377
|
-
return
|
|
378
334
|
}
|
|
379
335
|
}
|
|
380
336
|
return
|
|
381
337
|
}
|
|
382
|
-
}
|
|
383
|
-
{
|
|
384
338
|
if(_1.ELet) {
|
|
385
339
|
const e_ = _1;
|
|
386
340
|
const newFunctions_ = ff_core_Map.Map_remove(functions_, e_.name_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String);
|
|
@@ -389,13 +343,10 @@ const _1 = e_;
|
|
|
389
343
|
{
|
|
390
344
|
const _c = _1;
|
|
391
345
|
return ff_compiler_Syntax.ELet(_c.at_, _c.mutable_, _c.name_, _c.valueType_, ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, e_.value_), ff_compiler_Dictionaries.Dictionaries_processTerm(self_, newFunctions_, e_.body_))
|
|
392
|
-
return
|
|
393
346
|
}
|
|
394
347
|
}
|
|
395
348
|
return
|
|
396
349
|
}
|
|
397
|
-
}
|
|
398
|
-
{
|
|
399
350
|
if(_1.ELambda) {
|
|
400
351
|
const e_ = _1;
|
|
401
352
|
{
|
|
@@ -403,13 +354,10 @@ const _1 = e_;
|
|
|
403
354
|
{
|
|
404
355
|
const _c = _1;
|
|
405
356
|
return ff_compiler_Syntax.ELambda(_c.at_, ff_compiler_Dictionaries.Dictionaries_processLambda(self_, functions_, e_.lambda_))
|
|
406
|
-
return
|
|
407
357
|
}
|
|
408
358
|
}
|
|
409
359
|
return
|
|
410
360
|
}
|
|
411
|
-
}
|
|
412
|
-
{
|
|
413
361
|
if(_1.EVariant) {
|
|
414
362
|
const e_ = _1;
|
|
415
363
|
{
|
|
@@ -426,15 +374,10 @@ return
|
|
|
426
374
|
}
|
|
427
375
|
return
|
|
428
376
|
}
|
|
429
|
-
}
|
|
430
|
-
{
|
|
431
377
|
if(_1.EVariantIs) {
|
|
432
378
|
const e_ = _1;
|
|
433
379
|
return term_
|
|
434
|
-
return
|
|
435
380
|
}
|
|
436
|
-
}
|
|
437
|
-
{
|
|
438
381
|
if(_1.ECopy) {
|
|
439
382
|
const e_ = _1;
|
|
440
383
|
{
|
|
@@ -449,8 +392,6 @@ return
|
|
|
449
392
|
}
|
|
450
393
|
return
|
|
451
394
|
}
|
|
452
|
-
}
|
|
453
|
-
{
|
|
454
395
|
if(_1.EPipe) {
|
|
455
396
|
const e_ = _1;
|
|
456
397
|
{
|
|
@@ -458,16 +399,12 @@ const _1 = e_;
|
|
|
458
399
|
{
|
|
459
400
|
const _c = _1;
|
|
460
401
|
return ff_compiler_Syntax.EPipe(_c.at_, ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, e_.value_), _c.effect_, ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, e_.function_))
|
|
461
|
-
return
|
|
462
402
|
}
|
|
463
403
|
}
|
|
464
404
|
return
|
|
465
405
|
}
|
|
466
|
-
|
|
467
|
-
{
|
|
468
|
-
if(_1.ECall) {
|
|
406
|
+
if(_1.ECall && _1.target_.StaticCall) {
|
|
469
407
|
const at_ = _1.at_;
|
|
470
|
-
if(_1.target_.StaticCall) {
|
|
471
408
|
const target_ = _1.target_;
|
|
472
409
|
const effect_ = _1.effect_;
|
|
473
410
|
const typeArguments_ = _1.typeArguments_;
|
|
@@ -486,13 +423,9 @@ return ff_compiler_Dictionaries.Dictionaries_processArgument(self_, functions_,
|
|
|
486
423
|
return
|
|
487
424
|
}
|
|
488
425
|
}
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
{
|
|
492
426
|
if(_1.ECall) {
|
|
493
427
|
const e_ = _1;
|
|
494
428
|
const target_ = (((_1) => {
|
|
495
|
-
{
|
|
496
429
|
if(_1.DynamicCall) {
|
|
497
430
|
const call_ = _1;
|
|
498
431
|
{
|
|
@@ -500,17 +433,12 @@ const _1 = call_;
|
|
|
500
433
|
{
|
|
501
434
|
const _c = _1;
|
|
502
435
|
return ff_compiler_Syntax.DynamicCall(ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, call_.function_), _c.tailCall_)
|
|
503
|
-
return
|
|
504
436
|
}
|
|
505
437
|
}
|
|
506
438
|
return
|
|
507
439
|
}
|
|
508
|
-
}
|
|
509
|
-
{
|
|
510
440
|
if(_1.StaticCall) {
|
|
511
441
|
return e_.target_
|
|
512
|
-
return
|
|
513
|
-
}
|
|
514
442
|
}
|
|
515
443
|
}))(e_.target_);
|
|
516
444
|
{
|
|
@@ -525,8 +453,6 @@ return
|
|
|
525
453
|
}
|
|
526
454
|
return
|
|
527
455
|
}
|
|
528
|
-
}
|
|
529
|
-
{
|
|
530
456
|
if(_1.ERecord) {
|
|
531
457
|
const e_ = _1;
|
|
532
458
|
{
|
|
@@ -541,8 +467,6 @@ return
|
|
|
541
467
|
}
|
|
542
468
|
return
|
|
543
469
|
}
|
|
544
|
-
}
|
|
545
|
-
{
|
|
546
470
|
if(_1.EFunctions) {
|
|
547
471
|
const e_ = _1;
|
|
548
472
|
const newFunctions_ = ff_core_Map.Map_addAll(functions_, ff_core_List.List_toMap(ff_core_List.List_map(e_.functions_, ((f_) => {
|
|
@@ -560,8 +484,6 @@ return
|
|
|
560
484
|
}
|
|
561
485
|
return
|
|
562
486
|
}
|
|
563
|
-
}
|
|
564
|
-
{
|
|
565
487
|
if(_1.EAssign) {
|
|
566
488
|
const e_ = _1;
|
|
567
489
|
{
|
|
@@ -569,13 +491,10 @@ const _1 = e_;
|
|
|
569
491
|
{
|
|
570
492
|
const _c = _1;
|
|
571
493
|
return ff_compiler_Syntax.EAssign(_c.at_, _c.operator_, _c.variable_, ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, e_.value_))
|
|
572
|
-
return
|
|
573
494
|
}
|
|
574
495
|
}
|
|
575
496
|
return
|
|
576
497
|
}
|
|
577
|
-
}
|
|
578
|
-
{
|
|
579
498
|
if(_1.EAssignField) {
|
|
580
499
|
const e_ = _1;
|
|
581
500
|
{
|
|
@@ -583,14 +502,12 @@ const _1 = e_;
|
|
|
583
502
|
{
|
|
584
503
|
const _c = _1;
|
|
585
504
|
return ff_compiler_Syntax.EAssignField(_c.at_, _c.operator_, ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, e_.record_), _c.field_, ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, e_.value_))
|
|
586
|
-
return
|
|
587
505
|
}
|
|
588
506
|
}
|
|
589
507
|
return
|
|
590
508
|
}
|
|
591
509
|
}
|
|
592
510
|
}
|
|
593
|
-
}
|
|
594
511
|
|
|
595
512
|
export function Dictionaries_processArgument(self_, functions_, argument_) {
|
|
596
513
|
{
|
|
@@ -598,7 +515,6 @@ const _1 = argument_;
|
|
|
598
515
|
{
|
|
599
516
|
const _c = _1;
|
|
600
517
|
return ff_compiler_Syntax.Argument(_c.at_, _c.name_, ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, argument_.value_))
|
|
601
|
-
return
|
|
602
518
|
}
|
|
603
519
|
}
|
|
604
520
|
}
|
|
@@ -609,7 +525,6 @@ const _1 = field_;
|
|
|
609
525
|
{
|
|
610
526
|
const _c = _1;
|
|
611
527
|
return ff_compiler_Syntax.Field(_c.at_, _c.name_, ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, field_.value_))
|
|
612
|
-
return
|
|
613
528
|
}
|
|
614
529
|
}
|
|
615
530
|
}
|
|
@@ -621,19 +536,13 @@ const newGenerics_ = ff_core_List.List_map(constraint_.generics_, ((_w1) => {
|
|
|
621
536
|
return ff_compiler_Unification.Unification_instantiate(unification_, instantiationMap_, _w1)
|
|
622
537
|
}));
|
|
623
538
|
const firstType_ = (((_1) => {
|
|
624
|
-
{
|
|
625
539
|
if(_1.TConstructor) {
|
|
626
540
|
const t_ = _1;
|
|
627
541
|
return t_
|
|
628
|
-
return
|
|
629
|
-
}
|
|
630
542
|
}
|
|
631
|
-
{
|
|
632
543
|
if(_1.TVariable) {
|
|
633
544
|
const t_ = _1;
|
|
634
545
|
return ff_compiler_Dictionaries.fail_(t_.at_, " is still a unification variable")
|
|
635
|
-
return
|
|
636
|
-
}
|
|
637
546
|
}
|
|
638
547
|
}))(ff_core_List.List_grabFirst(newGenerics_));
|
|
639
548
|
const instance_ = ff_core_Option.Option_else(ff_core_Map.Map_get(self_.instances_, ff_compiler_Unification.InstanceKey(constraint_.name_, firstType_.name_), ff_compiler_Unification.ff_core_Ordering_Order$ff_compiler_Unification_InstanceKey), (() => {
|
|
@@ -651,15 +560,12 @@ const functionSignatures_ = ff_core_List.List_toMap(ff_core_List.List_collect(ff
|
|
|
651
560
|
{
|
|
652
561
|
const name_ = _1.first_;
|
|
653
562
|
const s_ = _1.second_;
|
|
654
|
-
|
|
655
|
-
if(_guard1) {
|
|
563
|
+
if((!s_.isVariable_)) {
|
|
656
564
|
return ff_core_Option.Some(ff_core_Pair.Pair(name_, s_.signature_))
|
|
657
|
-
return
|
|
658
565
|
}
|
|
659
566
|
}
|
|
660
567
|
{
|
|
661
568
|
return ff_core_Option.None()
|
|
662
|
-
return
|
|
663
569
|
}
|
|
664
570
|
})), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String);
|
|
665
571
|
const lets_ = ff_core_List.List_map(module_.lets_, ((_w1) => {
|
|
@@ -679,7 +585,6 @@ const _1 = module_;
|
|
|
679
585
|
{
|
|
680
586
|
const _c = _1;
|
|
681
587
|
return ff_compiler_Syntax.Module(_c.file_, _c.packagePair_, _c.imports_, _c.types_, _c.traits_, instances_, extends_, lets_, functions_)
|
|
682
|
-
return
|
|
683
588
|
}
|
|
684
589
|
}
|
|
685
590
|
}
|
|
@@ -690,7 +595,6 @@ const _1 = definition_;
|
|
|
690
595
|
{
|
|
691
596
|
const _c = _1;
|
|
692
597
|
return ff_compiler_Syntax.DLet(_c.at_, _c.name_, _c.variableType_, ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, definition_.value_))
|
|
693
|
-
return
|
|
694
598
|
}
|
|
695
599
|
}
|
|
696
600
|
}
|
|
@@ -758,7 +662,6 @@ const _1 = g_;
|
|
|
758
662
|
{
|
|
759
663
|
const _c = _1;
|
|
760
664
|
return ff_compiler_Syntax.MatchGuard(_c.at_, ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, g_.term_), _c.pattern_)
|
|
761
|
-
return
|
|
762
665
|
}
|
|
763
666
|
}
|
|
764
667
|
})), ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, case_.body_))
|
|
@@ -774,37 +677,21 @@ return
|
|
|
774
677
|
export async function Dictionaries_processTerm$(self_, functions_, term_, $task) {
|
|
775
678
|
{
|
|
776
679
|
const _1 = term_;
|
|
777
|
-
{
|
|
778
680
|
if(_1.EString) {
|
|
779
681
|
return term_
|
|
780
|
-
return
|
|
781
|
-
}
|
|
782
682
|
}
|
|
783
|
-
{
|
|
784
683
|
if(_1.EChar) {
|
|
785
684
|
return term_
|
|
786
|
-
return
|
|
787
|
-
}
|
|
788
685
|
}
|
|
789
|
-
{
|
|
790
686
|
if(_1.EInt) {
|
|
791
687
|
return term_
|
|
792
|
-
return
|
|
793
|
-
}
|
|
794
688
|
}
|
|
795
|
-
{
|
|
796
689
|
if(_1.EFloat) {
|
|
797
690
|
return term_
|
|
798
|
-
return
|
|
799
691
|
}
|
|
800
|
-
}
|
|
801
|
-
{
|
|
802
692
|
if(_1.EVariable) {
|
|
803
693
|
return term_
|
|
804
|
-
return
|
|
805
|
-
}
|
|
806
694
|
}
|
|
807
|
-
{
|
|
808
695
|
if(_1.EField) {
|
|
809
696
|
const e_ = _1;
|
|
810
697
|
{
|
|
@@ -812,20 +699,14 @@ const _1 = e_;
|
|
|
812
699
|
{
|
|
813
700
|
const _c = _1;
|
|
814
701
|
return ff_compiler_Syntax.EField(_c.at_, _c.newtype_, ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, e_.record_), _c.field_)
|
|
815
|
-
return
|
|
816
702
|
}
|
|
817
703
|
}
|
|
818
704
|
return
|
|
819
705
|
}
|
|
820
|
-
}
|
|
821
|
-
{
|
|
822
706
|
if(_1.EWildcard) {
|
|
823
707
|
const e_ = _1;
|
|
824
708
|
return term_
|
|
825
|
-
return
|
|
826
|
-
}
|
|
827
709
|
}
|
|
828
|
-
{
|
|
829
710
|
if(_1.EList) {
|
|
830
711
|
const e_ = _1;
|
|
831
712
|
{
|
|
@@ -837,7 +718,6 @@ return ff_compiler_Syntax.EList(_c.at_, _c.elementType_, ff_core_List.List_map(e
|
|
|
837
718
|
const item_ = _1.first_;
|
|
838
719
|
const b_ = _1.second_;
|
|
839
720
|
return ff_core_Pair.Pair(ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, item_), b_)
|
|
840
|
-
return
|
|
841
721
|
}
|
|
842
722
|
})))
|
|
843
723
|
return
|
|
@@ -845,8 +725,6 @@ return
|
|
|
845
725
|
}
|
|
846
726
|
return
|
|
847
727
|
}
|
|
848
|
-
}
|
|
849
|
-
{
|
|
850
728
|
if(_1.ESequential) {
|
|
851
729
|
const e_ = _1;
|
|
852
730
|
{
|
|
@@ -854,13 +732,10 @@ const _1 = e_;
|
|
|
854
732
|
{
|
|
855
733
|
const _c = _1;
|
|
856
734
|
return ff_compiler_Syntax.ESequential(_c.at_, ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, e_.before_), ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, e_.after_))
|
|
857
|
-
return
|
|
858
735
|
}
|
|
859
736
|
}
|
|
860
737
|
return
|
|
861
738
|
}
|
|
862
|
-
}
|
|
863
|
-
{
|
|
864
739
|
if(_1.ELet) {
|
|
865
740
|
const e_ = _1;
|
|
866
741
|
const newFunctions_ = ff_core_Map.Map_remove(functions_, e_.name_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String);
|
|
@@ -869,13 +744,10 @@ const _1 = e_;
|
|
|
869
744
|
{
|
|
870
745
|
const _c = _1;
|
|
871
746
|
return ff_compiler_Syntax.ELet(_c.at_, _c.mutable_, _c.name_, _c.valueType_, ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, e_.value_), ff_compiler_Dictionaries.Dictionaries_processTerm(self_, newFunctions_, e_.body_))
|
|
872
|
-
return
|
|
873
747
|
}
|
|
874
748
|
}
|
|
875
749
|
return
|
|
876
750
|
}
|
|
877
|
-
}
|
|
878
|
-
{
|
|
879
751
|
if(_1.ELambda) {
|
|
880
752
|
const e_ = _1;
|
|
881
753
|
{
|
|
@@ -883,13 +755,10 @@ const _1 = e_;
|
|
|
883
755
|
{
|
|
884
756
|
const _c = _1;
|
|
885
757
|
return ff_compiler_Syntax.ELambda(_c.at_, ff_compiler_Dictionaries.Dictionaries_processLambda(self_, functions_, e_.lambda_))
|
|
886
|
-
return
|
|
887
758
|
}
|
|
888
759
|
}
|
|
889
760
|
return
|
|
890
761
|
}
|
|
891
|
-
}
|
|
892
|
-
{
|
|
893
762
|
if(_1.EVariant) {
|
|
894
763
|
const e_ = _1;
|
|
895
764
|
{
|
|
@@ -906,15 +775,10 @@ return
|
|
|
906
775
|
}
|
|
907
776
|
return
|
|
908
777
|
}
|
|
909
|
-
}
|
|
910
|
-
{
|
|
911
778
|
if(_1.EVariantIs) {
|
|
912
779
|
const e_ = _1;
|
|
913
780
|
return term_
|
|
914
|
-
return
|
|
915
781
|
}
|
|
916
|
-
}
|
|
917
|
-
{
|
|
918
782
|
if(_1.ECopy) {
|
|
919
783
|
const e_ = _1;
|
|
920
784
|
{
|
|
@@ -929,8 +793,6 @@ return
|
|
|
929
793
|
}
|
|
930
794
|
return
|
|
931
795
|
}
|
|
932
|
-
}
|
|
933
|
-
{
|
|
934
796
|
if(_1.EPipe) {
|
|
935
797
|
const e_ = _1;
|
|
936
798
|
{
|
|
@@ -938,16 +800,12 @@ const _1 = e_;
|
|
|
938
800
|
{
|
|
939
801
|
const _c = _1;
|
|
940
802
|
return ff_compiler_Syntax.EPipe(_c.at_, ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, e_.value_), _c.effect_, ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, e_.function_))
|
|
941
|
-
return
|
|
942
803
|
}
|
|
943
804
|
}
|
|
944
805
|
return
|
|
945
806
|
}
|
|
946
|
-
|
|
947
|
-
{
|
|
948
|
-
if(_1.ECall) {
|
|
807
|
+
if(_1.ECall && _1.target_.StaticCall) {
|
|
949
808
|
const at_ = _1.at_;
|
|
950
|
-
if(_1.target_.StaticCall) {
|
|
951
809
|
const target_ = _1.target_;
|
|
952
810
|
const effect_ = _1.effect_;
|
|
953
811
|
const typeArguments_ = _1.typeArguments_;
|
|
@@ -966,13 +824,9 @@ return ff_compiler_Dictionaries.Dictionaries_processArgument(self_, functions_,
|
|
|
966
824
|
return
|
|
967
825
|
}
|
|
968
826
|
}
|
|
969
|
-
}
|
|
970
|
-
}
|
|
971
|
-
{
|
|
972
827
|
if(_1.ECall) {
|
|
973
828
|
const e_ = _1;
|
|
974
829
|
const target_ = (((_1) => {
|
|
975
|
-
{
|
|
976
830
|
if(_1.DynamicCall) {
|
|
977
831
|
const call_ = _1;
|
|
978
832
|
{
|
|
@@ -980,17 +834,12 @@ const _1 = call_;
|
|
|
980
834
|
{
|
|
981
835
|
const _c = _1;
|
|
982
836
|
return ff_compiler_Syntax.DynamicCall(ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, call_.function_), _c.tailCall_)
|
|
983
|
-
return
|
|
984
837
|
}
|
|
985
838
|
}
|
|
986
839
|
return
|
|
987
840
|
}
|
|
988
|
-
}
|
|
989
|
-
{
|
|
990
841
|
if(_1.StaticCall) {
|
|
991
842
|
return e_.target_
|
|
992
|
-
return
|
|
993
|
-
}
|
|
994
843
|
}
|
|
995
844
|
}))(e_.target_);
|
|
996
845
|
{
|
|
@@ -1005,8 +854,6 @@ return
|
|
|
1005
854
|
}
|
|
1006
855
|
return
|
|
1007
856
|
}
|
|
1008
|
-
}
|
|
1009
|
-
{
|
|
1010
857
|
if(_1.ERecord) {
|
|
1011
858
|
const e_ = _1;
|
|
1012
859
|
{
|
|
@@ -1021,8 +868,6 @@ return
|
|
|
1021
868
|
}
|
|
1022
869
|
return
|
|
1023
870
|
}
|
|
1024
|
-
}
|
|
1025
|
-
{
|
|
1026
871
|
if(_1.EFunctions) {
|
|
1027
872
|
const e_ = _1;
|
|
1028
873
|
const newFunctions_ = ff_core_Map.Map_addAll(functions_, ff_core_List.List_toMap(ff_core_List.List_map(e_.functions_, ((f_) => {
|
|
@@ -1040,8 +885,6 @@ return
|
|
|
1040
885
|
}
|
|
1041
886
|
return
|
|
1042
887
|
}
|
|
1043
|
-
}
|
|
1044
|
-
{
|
|
1045
888
|
if(_1.EAssign) {
|
|
1046
889
|
const e_ = _1;
|
|
1047
890
|
{
|
|
@@ -1049,13 +892,10 @@ const _1 = e_;
|
|
|
1049
892
|
{
|
|
1050
893
|
const _c = _1;
|
|
1051
894
|
return ff_compiler_Syntax.EAssign(_c.at_, _c.operator_, _c.variable_, ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, e_.value_))
|
|
1052
|
-
return
|
|
1053
895
|
}
|
|
1054
896
|
}
|
|
1055
897
|
return
|
|
1056
898
|
}
|
|
1057
|
-
}
|
|
1058
|
-
{
|
|
1059
899
|
if(_1.EAssignField) {
|
|
1060
900
|
const e_ = _1;
|
|
1061
901
|
{
|
|
@@ -1063,14 +903,12 @@ const _1 = e_;
|
|
|
1063
903
|
{
|
|
1064
904
|
const _c = _1;
|
|
1065
905
|
return ff_compiler_Syntax.EAssignField(_c.at_, _c.operator_, ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, e_.record_), _c.field_, ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, e_.value_))
|
|
1066
|
-
return
|
|
1067
906
|
}
|
|
1068
907
|
}
|
|
1069
908
|
return
|
|
1070
909
|
}
|
|
1071
910
|
}
|
|
1072
911
|
}
|
|
1073
|
-
}
|
|
1074
912
|
|
|
1075
913
|
export async function Dictionaries_processArgument$(self_, functions_, argument_, $task) {
|
|
1076
914
|
{
|
|
@@ -1078,7 +916,6 @@ const _1 = argument_;
|
|
|
1078
916
|
{
|
|
1079
917
|
const _c = _1;
|
|
1080
918
|
return ff_compiler_Syntax.Argument(_c.at_, _c.name_, ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, argument_.value_))
|
|
1081
|
-
return
|
|
1082
919
|
}
|
|
1083
920
|
}
|
|
1084
921
|
}
|
|
@@ -1089,7 +926,6 @@ const _1 = field_;
|
|
|
1089
926
|
{
|
|
1090
927
|
const _c = _1;
|
|
1091
928
|
return ff_compiler_Syntax.Field(_c.at_, _c.name_, ff_compiler_Dictionaries.Dictionaries_processTerm(self_, functions_, field_.value_))
|
|
1092
|
-
return
|
|
1093
929
|
}
|
|
1094
930
|
}
|
|
1095
931
|
}
|
|
@@ -1101,19 +937,13 @@ const newGenerics_ = ff_core_List.List_map(constraint_.generics_, ((_w1) => {
|
|
|
1101
937
|
return ff_compiler_Unification.Unification_instantiate(unification_, instantiationMap_, _w1)
|
|
1102
938
|
}));
|
|
1103
939
|
const firstType_ = (((_1) => {
|
|
1104
|
-
{
|
|
1105
940
|
if(_1.TConstructor) {
|
|
1106
941
|
const t_ = _1;
|
|
1107
942
|
return t_
|
|
1108
|
-
return
|
|
1109
|
-
}
|
|
1110
943
|
}
|
|
1111
|
-
{
|
|
1112
944
|
if(_1.TVariable) {
|
|
1113
945
|
const t_ = _1;
|
|
1114
946
|
return ff_compiler_Dictionaries.fail_(t_.at_, " is still a unification variable")
|
|
1115
|
-
return
|
|
1116
|
-
}
|
|
1117
947
|
}
|
|
1118
948
|
}))(ff_core_List.List_grabFirst(newGenerics_));
|
|
1119
949
|
const instance_ = ff_core_Option.Option_else(ff_core_Map.Map_get(self_.instances_, ff_compiler_Unification.InstanceKey(constraint_.name_, firstType_.name_), ff_compiler_Unification.ff_core_Ordering_Order$ff_compiler_Unification_InstanceKey), (() => {
|
|
@@ -1136,75 +966,50 @@ return ff_core_Any.internalAnyTag_((("ff:compiler/Dictionaries.Dictionaries" + "
|
|
|
1136
966
|
|
|
1137
967
|
export const ff_core_Show_Show$ff_compiler_Dictionaries_Dictionaries = {
|
|
1138
968
|
show_(value_) {
|
|
1139
|
-
{
|
|
1140
969
|
const value_a = value_;
|
|
1141
970
|
{
|
|
1142
971
|
const z_ = value_a;
|
|
1143
972
|
return ((("Dictionaries" + "(") + ff_core_Map.ff_core_Show_Show$ff_core_Map_Map(ff_compiler_Unification.ff_core_Show_Show$ff_compiler_Unification_InstanceKey, ff_compiler_Unification.ff_core_Ordering_Order$ff_compiler_Unification_InstanceKey, ff_compiler_Unification.ff_core_Show_Show$ff_compiler_Unification_InstanceValue).show_(z_.instances_)) + ")")
|
|
1144
|
-
return
|
|
1145
|
-
}
|
|
1146
973
|
}
|
|
1147
974
|
},
|
|
1148
975
|
async show_$(value_, $task) {
|
|
1149
|
-
{
|
|
1150
976
|
const value_a = value_;
|
|
1151
977
|
{
|
|
1152
978
|
const z_ = value_a;
|
|
1153
979
|
return ((("Dictionaries" + "(") + ff_core_Map.ff_core_Show_Show$ff_core_Map_Map(ff_compiler_Unification.ff_core_Show_Show$ff_compiler_Unification_InstanceKey, ff_compiler_Unification.ff_core_Ordering_Order$ff_compiler_Unification_InstanceKey, ff_compiler_Unification.ff_core_Show_Show$ff_compiler_Unification_InstanceValue).show_(z_.instances_)) + ")")
|
|
1154
|
-
return
|
|
1155
|
-
}
|
|
1156
980
|
}
|
|
1157
981
|
}
|
|
1158
982
|
};
|
|
1159
983
|
|
|
1160
984
|
export const ff_core_Equal_Equal$ff_compiler_Dictionaries_Dictionaries = {
|
|
1161
985
|
equals_(x_, y_) {
|
|
1162
|
-
{
|
|
1163
986
|
const x_a = x_;
|
|
1164
987
|
const y_a = y_;
|
|
1165
|
-
{
|
|
1166
|
-
const _guard1 = (x_ === y_);
|
|
1167
|
-
if(_guard1) {
|
|
988
|
+
if((x_ === y_)) {
|
|
1168
989
|
return true
|
|
1169
|
-
return
|
|
1170
|
-
}
|
|
1171
990
|
}
|
|
1172
991
|
{
|
|
1173
992
|
return ff_core_Map.ff_core_Equal_Equal$ff_core_Map_Map(ff_compiler_Unification.ff_core_Equal_Equal$ff_compiler_Unification_InstanceKey, ff_compiler_Unification.ff_core_Ordering_Order$ff_compiler_Unification_InstanceKey, ff_compiler_Unification.ff_core_Equal_Equal$ff_compiler_Unification_InstanceValue).equals_(x_.instances_, y_.instances_)
|
|
1174
|
-
return
|
|
1175
|
-
}
|
|
1176
993
|
}
|
|
1177
994
|
},
|
|
1178
995
|
async equals_$(x_, y_, $task) {
|
|
1179
|
-
{
|
|
1180
996
|
const x_a = x_;
|
|
1181
997
|
const y_a = y_;
|
|
1182
|
-
{
|
|
1183
|
-
const _guard1 = (x_ === y_);
|
|
1184
|
-
if(_guard1) {
|
|
998
|
+
if((x_ === y_)) {
|
|
1185
999
|
return true
|
|
1186
|
-
return
|
|
1187
|
-
}
|
|
1188
1000
|
}
|
|
1189
1001
|
{
|
|
1190
1002
|
return ff_core_Map.ff_core_Equal_Equal$ff_core_Map_Map(ff_compiler_Unification.ff_core_Equal_Equal$ff_compiler_Unification_InstanceKey, ff_compiler_Unification.ff_core_Ordering_Order$ff_compiler_Unification_InstanceKey, ff_compiler_Unification.ff_core_Equal_Equal$ff_compiler_Unification_InstanceValue).equals_(x_.instances_, y_.instances_)
|
|
1191
|
-
return
|
|
1192
|
-
}
|
|
1193
1003
|
}
|
|
1194
1004
|
}
|
|
1195
1005
|
};
|
|
1196
1006
|
|
|
1197
1007
|
export const ff_core_Ordering_Order$ff_compiler_Dictionaries_Dictionaries = {
|
|
1198
1008
|
compare_(x_, y_) {
|
|
1199
|
-
{
|
|
1200
1009
|
const x_a = x_;
|
|
1201
1010
|
const y_a = y_;
|
|
1202
|
-
{
|
|
1203
|
-
const _guard1 = (x_ === y_);
|
|
1204
|
-
if(_guard1) {
|
|
1011
|
+
if((x_ === y_)) {
|
|
1205
1012
|
return ff_core_Ordering.OrderingSame()
|
|
1206
|
-
return
|
|
1207
|
-
}
|
|
1208
1013
|
}
|
|
1209
1014
|
{
|
|
1210
1015
|
const instancesOrdering_ = ff_core_Map.ff_core_Ordering_Order$ff_core_Map_Map(ff_compiler_Unification.ff_core_Ordering_Order$ff_compiler_Unification_InstanceKey, ff_compiler_Unification.ff_core_Ordering_Order$ff_compiler_Unification_InstanceValue).compare_(x_.instances_, y_.instances_);
|
|
@@ -1215,18 +1020,12 @@ return ff_core_Ordering.OrderingSame()
|
|
|
1215
1020
|
}
|
|
1216
1021
|
return
|
|
1217
1022
|
}
|
|
1218
|
-
}
|
|
1219
1023
|
},
|
|
1220
1024
|
async compare_$(x_, y_, $task) {
|
|
1221
|
-
{
|
|
1222
1025
|
const x_a = x_;
|
|
1223
1026
|
const y_a = y_;
|
|
1224
|
-
{
|
|
1225
|
-
const _guard1 = (x_ === y_);
|
|
1226
|
-
if(_guard1) {
|
|
1027
|
+
if((x_ === y_)) {
|
|
1227
1028
|
return ff_core_Ordering.OrderingSame()
|
|
1228
|
-
return
|
|
1229
|
-
}
|
|
1230
1029
|
}
|
|
1231
1030
|
{
|
|
1232
1031
|
const instancesOrdering_ = ff_core_Map.ff_core_Ordering_Order$ff_core_Map_Map(ff_compiler_Unification.ff_core_Ordering_Order$ff_compiler_Unification_InstanceKey, ff_compiler_Unification.ff_core_Ordering_Order$ff_compiler_Unification_InstanceValue).compare_(x_.instances_, y_.instances_);
|
|
@@ -1238,12 +1037,10 @@ return ff_core_Ordering.OrderingSame()
|
|
|
1238
1037
|
return
|
|
1239
1038
|
}
|
|
1240
1039
|
}
|
|
1241
|
-
}
|
|
1242
1040
|
};
|
|
1243
1041
|
|
|
1244
1042
|
export const ff_core_Serializable_Serializable$ff_compiler_Dictionaries_Dictionaries = {
|
|
1245
1043
|
serializeUsing_(serialization_, value_) {
|
|
1246
|
-
{
|
|
1247
1044
|
const serialization_a = serialization_;
|
|
1248
1045
|
const value_a = value_;
|
|
1249
1046
|
{
|
|
@@ -1255,28 +1052,22 @@ serialization_.offset_ += 1;
|
|
|
1255
1052
|
ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_compiler_Unification.ff_core_Serializable_Serializable$ff_compiler_Unification_InstanceKey, ff_compiler_Unification.ff_core_Ordering_Order$ff_compiler_Unification_InstanceKey, ff_compiler_Unification.ff_core_Serializable_Serializable$ff_compiler_Unification_InstanceValue).serializeUsing_(serialization_, v_.instances_)
|
|
1256
1053
|
return
|
|
1257
1054
|
}
|
|
1258
|
-
}
|
|
1259
1055
|
},
|
|
1260
1056
|
deserializeUsing_(serialization_) {
|
|
1261
1057
|
const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
|
|
1262
1058
|
serialization_.offset_ += 1;
|
|
1263
1059
|
{
|
|
1264
1060
|
const _1 = variantIndex_;
|
|
1265
|
-
{
|
|
1266
1061
|
if(_1 === 0) {
|
|
1267
1062
|
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 37), 0);
|
|
1268
1063
|
return ff_compiler_Dictionaries.Dictionaries(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_compiler_Unification.ff_core_Serializable_Serializable$ff_compiler_Unification_InstanceKey, ff_compiler_Unification.ff_core_Ordering_Order$ff_compiler_Unification_InstanceKey, ff_compiler_Unification.ff_core_Serializable_Serializable$ff_compiler_Unification_InstanceValue).deserializeUsing_(serialization_))
|
|
1269
|
-
return
|
|
1270
|
-
}
|
|
1271
1064
|
}
|
|
1272
1065
|
{
|
|
1273
1066
|
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException)})
|
|
1274
|
-
return
|
|
1275
1067
|
}
|
|
1276
1068
|
}
|
|
1277
1069
|
},
|
|
1278
1070
|
async serializeUsing_$(serialization_, value_, $task) {
|
|
1279
|
-
{
|
|
1280
1071
|
const serialization_a = serialization_;
|
|
1281
1072
|
const value_a = value_;
|
|
1282
1073
|
{
|
|
@@ -1288,23 +1079,18 @@ serialization_.offset_ += 1;
|
|
|
1288
1079
|
ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_compiler_Unification.ff_core_Serializable_Serializable$ff_compiler_Unification_InstanceKey, ff_compiler_Unification.ff_core_Ordering_Order$ff_compiler_Unification_InstanceKey, ff_compiler_Unification.ff_core_Serializable_Serializable$ff_compiler_Unification_InstanceValue).serializeUsing_(serialization_, v_.instances_)
|
|
1289
1080
|
return
|
|
1290
1081
|
}
|
|
1291
|
-
}
|
|
1292
1082
|
},
|
|
1293
1083
|
async deserializeUsing_$(serialization_, $task) {
|
|
1294
1084
|
const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
|
|
1295
1085
|
serialization_.offset_ += 1;
|
|
1296
1086
|
{
|
|
1297
1087
|
const _1 = variantIndex_;
|
|
1298
|
-
{
|
|
1299
1088
|
if(_1 === 0) {
|
|
1300
1089
|
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 37), 0);
|
|
1301
1090
|
return ff_compiler_Dictionaries.Dictionaries(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_compiler_Unification.ff_core_Serializable_Serializable$ff_compiler_Unification_InstanceKey, ff_compiler_Unification.ff_core_Ordering_Order$ff_compiler_Unification_InstanceKey, ff_compiler_Unification.ff_core_Serializable_Serializable$ff_compiler_Unification_InstanceValue).deserializeUsing_(serialization_))
|
|
1302
|
-
return
|
|
1303
|
-
}
|
|
1304
1091
|
}
|
|
1305
1092
|
{
|
|
1306
1093
|
throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException)})
|
|
1307
|
-
return
|
|
1308
1094
|
}
|
|
1309
1095
|
}
|
|
1310
1096
|
}
|