firefly-compiler 0.5.75 → 0.5.76
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/bin/firefly.mjs +1 -1
- package/compiler/Deriver.ff +3 -0
- package/core/Core.ff +5 -5
- package/core/Error.ff +1 -1
- package/core/Log.ff +1 -1
- package/core/Path.ff +1 -1
- package/experimental/foldertest/Root.ff +6 -1
- package/output/js/ff/compiler/Compiler.mjs +8 -8
- package/output/js/ff/compiler/Dependencies.mjs +10 -10
- package/output/js/ff/compiler/Deriver.mjs +4 -4
- package/output/js/ff/compiler/Dictionaries.mjs +4 -4
- package/output/js/ff/compiler/Environment.mjs +6 -6
- package/output/js/ff/compiler/Inference.mjs +86 -80
- package/output/js/ff/compiler/JsEmitter.mjs +8 -8
- package/output/js/ff/compiler/JsImporter.mjs +8 -8
- package/output/js/ff/compiler/LspHook.mjs +4 -4
- package/output/js/ff/compiler/Main.mjs +30 -30
- package/output/js/ff/compiler/Parser.mjs +54 -50
- package/output/js/ff/compiler/Patterns.mjs +6 -6
- package/output/js/ff/compiler/Resolver.mjs +32 -32
- package/output/js/ff/compiler/Syntax.mjs +74 -74
- package/output/js/ff/compiler/Token.mjs +4 -4
- package/output/js/ff/compiler/Tokenizer.mjs +4 -4
- package/output/js/ff/compiler/Unification.mjs +14 -14
- package/output/js/ff/compiler/Workspace.mjs +4 -4
- package/output/js/ff/core/Array.mjs +10 -10
- package/output/js/ff/core/Buffer.mjs +4 -4
- package/output/js/ff/core/Core.mjs +27 -10
- package/output/js/ff/core/IntMap.mjs +2 -2
- package/output/js/ff/core/JsValue.mjs +20 -20
- package/output/js/ff/core/Json.mjs +10 -10
- package/output/js/ff/core/List.mjs +4 -4
- package/output/js/ff/core/Lock.mjs +4 -4
- package/output/js/ff/core/NodeSystem.mjs +19 -2
- package/output/js/ff/core/Option.mjs +2 -2
- package/output/js/ff/core/Pair.mjs +2 -2
- package/output/js/ff/core/Path.mjs +2 -2
- package/output/js/ff/core/Serializable.mjs +19 -2
- package/output/js/ff/core/String.mjs +10 -10
- package/output/js/ff/core/StringMap.mjs +2 -2
- package/output/js/ff/core/Try.mjs +2 -2
- package/package.json +1 -1
- package/vscode/client/src/extension.ts +2 -2
- package/vscode/package.json +1 -1
package/bin/firefly.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#!/usr/bin/env node --harmony-temporal
|
|
1
|
+
#!/usr/bin/env -S node --harmony-temporal
|
|
2
2
|
import * as firefly from '../output/js/ff/compiler/Main.run.mjs';
|
package/compiler/Deriver.ff
CHANGED
|
@@ -102,6 +102,9 @@ extend self: Deriver {
|
|
|
102
102
|
makeShowInstances(modulePrefix: String, module: Module): List[DInstance] {
|
|
103
103
|
let coreWhitelist = [
|
|
104
104
|
"ff:core/Option.Option"
|
|
105
|
+
"ff:core/Serializable.DeserializationChecksumException"
|
|
106
|
+
"ff:core/Core.GrabException"
|
|
107
|
+
"ff:core/NodeSystem.ProcessException"
|
|
105
108
|
].toSet()
|
|
106
109
|
let missingInstance =
|
|
107
110
|
self.findTypesThatNeedInstances("ff:core/Show.Show", modulePrefix, coreWhitelist, True, module)
|
package/core/Core.ff
CHANGED
|
@@ -38,13 +38,13 @@ try[T](body: () => T): Try[T] {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
throw[E: HasAnyTag, T](exception: E): T {
|
|
42
|
-
|
|
41
|
+
throw[E: HasAnyTag: Show, T](exception: E): T {
|
|
42
|
+
throwWithMessage(exception, Show.show(exception))
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
let e = Js->Error->()
|
|
47
|
-
e->ffException = exception!
|
|
45
|
+
throwWithMessage[E: HasAnyTag, T](exception: E, message: String): T {
|
|
46
|
+
let e = Js->Error->(message)
|
|
47
|
+
e->ffException = Any.toAny(exception)!
|
|
48
48
|
Js.throw(e)
|
|
49
49
|
}
|
|
50
50
|
|
package/core/Error.ff
CHANGED
package/core/Log.ff
CHANGED
package/core/Path.ff
CHANGED
|
@@ -331,7 +331,7 @@ internalReadStream(createReadStream: () => JsValue): Stream[Buffer] {
|
|
|
331
331
|
Some(buffer)
|
|
332
332
|
} else:
|
|
333
333
|
if(!seenError.isNullOrUndefined()) {
|
|
334
|
-
|
|
334
|
+
Js.throw(seenError?)
|
|
335
335
|
} else:
|
|
336
336
|
if(jsStream->destroyed?) {None} else:
|
|
337
337
|
Js.withSignal {signal =>
|
|
@@ -177,7 +177,7 @@ const if_o = importedAt_
|
|
|
177
177
|
if(if_o.Some) {
|
|
178
178
|
const at_ = if_o.value_;
|
|
179
179
|
if((!ff_core_Path.Path_exists(path_, false, false, false))) {
|
|
180
|
-
|
|
180
|
+
ff_core_Core.throw_(ff_compiler_Syntax.CompileError(at_, ("Imported module not found: " + ff_compiler_Syntax.ModuleKey_importName(moduleKey_))), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
};
|
|
@@ -203,7 +203,7 @@ export function Compiler_imports(self_, module_) {
|
|
|
203
203
|
return ff_core_List.List_map(module_.imports_, ((import_) => {
|
|
204
204
|
const newPackagePair_ = import_.moduleKey_.packagePair_;
|
|
205
205
|
if((!ff_core_Map.Map_contains(self_.packagePaths_, newPackagePair_, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair))) {
|
|
206
|
-
|
|
206
|
+
ff_core_Core.throw_(ff_compiler_Syntax.CompileError(import_.at_, ("Missing dependency declaration for: " + ff_compiler_Syntax.PackagePair_groupName(newPackagePair_, ":"))), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
207
207
|
};
|
|
208
208
|
return ff_core_Try.Try_catch(ff_core_Try.Try_tryCatch(ff_core_Core.try_((() => {
|
|
209
209
|
return ff_compiler_Compiler.Compiler_parse(self_, import_.moduleKey_, ff_core_Option.Some(import_.at_))
|
|
@@ -212,14 +212,14 @@ return ff_compiler_Compiler.Compiler_parse(self_, import_.moduleKey_, ff_core_Op
|
|
|
212
212
|
const e_ = _1;
|
|
213
213
|
const error_ = _2;
|
|
214
214
|
const newError_ = ff_compiler_Syntax.CompileError(import_.at_, ("Parse error in imported module: " + ff_compiler_Syntax.ModuleKey_importName(import_.moduleKey_)));
|
|
215
|
-
|
|
215
|
+
return ff_core_Core.throw_(ff_compiler_Syntax.CompileErrors([e_, newError_]), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileErrors, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileErrors)
|
|
216
216
|
}
|
|
217
217
|
}), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError), ((_1, _2) => {
|
|
218
218
|
{
|
|
219
219
|
const compileErrors_ = _1.errors_;
|
|
220
220
|
const error_ = _2;
|
|
221
221
|
const newError_ = ff_compiler_Syntax.CompileError(import_.at_, ("Parse errors in imported module: " + ff_compiler_Syntax.ModuleKey_importName(import_.moduleKey_)));
|
|
222
|
-
|
|
222
|
+
return ff_core_Core.throw_(ff_compiler_Syntax.CompileErrors([...compileErrors_, newError_]), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileErrors, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileErrors)
|
|
223
223
|
}
|
|
224
224
|
}), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileErrors)
|
|
225
225
|
}))
|
|
@@ -326,7 +326,7 @@ const if_o = importedAt_
|
|
|
326
326
|
if(if_o.Some) {
|
|
327
327
|
const at_ = if_o.value_;
|
|
328
328
|
if((!(await ff_core_Path.Path_exists$(path_, false, false, false, $task)))) {
|
|
329
|
-
|
|
329
|
+
ff_core_Core.throw_(ff_compiler_Syntax.CompileError(at_, ("Imported module not found: " + ff_compiler_Syntax.ModuleKey_importName(moduleKey_))), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
};
|
|
@@ -352,7 +352,7 @@ export async function Compiler_imports$(self_, module_, $task) {
|
|
|
352
352
|
return (await ff_core_List.List_map$(module_.imports_, (async (import_, $task) => {
|
|
353
353
|
const newPackagePair_ = import_.moduleKey_.packagePair_;
|
|
354
354
|
if((!ff_core_Map.Map_contains(self_.packagePaths_, newPackagePair_, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair))) {
|
|
355
|
-
|
|
355
|
+
ff_core_Core.throw_(ff_compiler_Syntax.CompileError(import_.at_, ("Missing dependency declaration for: " + ff_compiler_Syntax.PackagePair_groupName(newPackagePair_, ":"))), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
356
356
|
};
|
|
357
357
|
return ff_core_Try.Try_catch(ff_core_Try.Try_tryCatch((await ff_core_Core.try_$((async ($task) => {
|
|
358
358
|
return (await ff_compiler_Compiler.Compiler_parse$(self_, import_.moduleKey_, ff_core_Option.Some(import_.at_), $task))
|
|
@@ -361,14 +361,14 @@ return (await ff_compiler_Compiler.Compiler_parse$(self_, import_.moduleKey_, ff
|
|
|
361
361
|
const e_ = _1;
|
|
362
362
|
const error_ = _2;
|
|
363
363
|
const newError_ = ff_compiler_Syntax.CompileError(import_.at_, ("Parse error in imported module: " + ff_compiler_Syntax.ModuleKey_importName(import_.moduleKey_)));
|
|
364
|
-
|
|
364
|
+
return ff_core_Core.throw_(ff_compiler_Syntax.CompileErrors([e_, newError_]), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileErrors, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileErrors)
|
|
365
365
|
}
|
|
366
366
|
}), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError), ((_1, _2) => {
|
|
367
367
|
{
|
|
368
368
|
const compileErrors_ = _1.errors_;
|
|
369
369
|
const error_ = _2;
|
|
370
370
|
const newError_ = ff_compiler_Syntax.CompileError(import_.at_, ("Parse errors in imported module: " + ff_compiler_Syntax.ModuleKey_importName(import_.moduleKey_)));
|
|
371
|
-
|
|
371
|
+
return ff_core_Core.throw_(ff_compiler_Syntax.CompileErrors([...compileErrors_, newError_]), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileErrors, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileErrors)
|
|
372
372
|
}
|
|
373
373
|
}), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileErrors)
|
|
374
374
|
}), $task))
|
|
@@ -125,9 +125,9 @@ const workspace_ = ff_compiler_Workspace.loadWorkspace_(path_);
|
|
|
125
125
|
const self_ = ff_compiler_Dependencies.Dependencies(workspace_, ff_core_List.List_toMap([], ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair), ff_core_List.List_toMap([], ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair), ff_core_List.List_toSet([], ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair));
|
|
126
126
|
const packageInfo_ = ff_core_Option.Option_else(ff_compiler_Dependencies.Dependencies_loadPackageInfo(self_, ff_compiler_Syntax.scriptPackagePair_, path_), (() => {
|
|
127
127
|
if((!ff_core_Path.Path_exists(path_, false, false, false))) {
|
|
128
|
-
|
|
128
|
+
return ff_core_Core.throw_(ff_compiler_Syntax.CompileError(ff_compiler_Syntax.Location(ff_core_Path.Path_absolute(path_), 1, 1), "File not found"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
129
129
|
} else {
|
|
130
|
-
|
|
130
|
+
return ff_core_Core.throw_(ff_compiler_Syntax.CompileError(ff_compiler_Syntax.Location(ff_core_Path.Path_absolute(path_), 1, 1), "Could not load package info"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
131
131
|
}
|
|
132
132
|
}));
|
|
133
133
|
const newDependencies_ = ff_compiler_Dependencies.Dependencies_processPackageInfo(self_, packageInfo_);
|
|
@@ -169,9 +169,9 @@ const workspace_ = (await ff_compiler_Workspace.loadWorkspace_$(path_, $task));
|
|
|
169
169
|
const self_ = ff_compiler_Dependencies.Dependencies(workspace_, ff_core_List.List_toMap([], ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair), ff_core_List.List_toMap([], ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair), ff_core_List.List_toSet([], ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair));
|
|
170
170
|
const packageInfo_ = (await ff_core_Option.Option_else$((await ff_compiler_Dependencies.Dependencies_loadPackageInfo$(self_, ff_compiler_Syntax.scriptPackagePair_, path_, $task)), (async ($task) => {
|
|
171
171
|
if((!(await ff_core_Path.Path_exists$(path_, false, false, false, $task)))) {
|
|
172
|
-
|
|
172
|
+
return ff_core_Core.throw_(ff_compiler_Syntax.CompileError(ff_compiler_Syntax.Location((await ff_core_Path.Path_absolute$(path_, $task)), 1, 1), "File not found"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
173
173
|
} else {
|
|
174
|
-
|
|
174
|
+
return ff_core_Core.throw_(ff_compiler_Syntax.CompileError(ff_compiler_Syntax.Location((await ff_core_Path.Path_absolute$(path_, $task)), 1, 1), "Could not load package info"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
175
175
|
}
|
|
176
176
|
}), $task));
|
|
177
177
|
const newDependencies_ = (await ff_compiler_Dependencies.Dependencies_processPackageInfo$(self_, packageInfo_, $task));
|
|
@@ -272,7 +272,7 @@ return ff_core_Option.Some((function() {
|
|
|
272
272
|
ff_core_Log.trace_(("Fetching " + location_));
|
|
273
273
|
const buffer_ = ff_core_HttpClient.HttpClient_get(httpClient_, location_, [], ((response_) => {
|
|
274
274
|
if((!ff_core_HttpClient.FetchResponse_ok(response_))) {
|
|
275
|
-
|
|
275
|
+
ff_core_Core.throw_(ff_compiler_Syntax.CompileError(dependency_.at_, ("Could not download dependency: " + location_)), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
276
276
|
};
|
|
277
277
|
return ff_core_HttpClient.FetchResponse_readBuffer(response_)
|
|
278
278
|
}));
|
|
@@ -289,7 +289,7 @@ return ff_core_Path.Path_renameTo(tarGzPath_, donePath_)
|
|
|
289
289
|
};
|
|
290
290
|
return dependencyPath_
|
|
291
291
|
} else {
|
|
292
|
-
|
|
292
|
+
return ff_core_Core.throw_(ff_compiler_Syntax.CompileError(dependency_.at_, ("Loading packages by this protocol is not supported: " + location_)), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
293
293
|
}
|
|
294
294
|
} else {
|
|
295
295
|
return ff_core_Path.Path_path(path_, location_)
|
|
@@ -301,7 +301,7 @@ const packageInfos_ = ff_core_List.List_map(dependencies_, ((dependency_) => {
|
|
|
301
301
|
const dependencyPath_ = ff_compiler_Dependencies.Dependencies_fetchDependency(self_, path_, httpClient_, dependencyLock_, dependency_);
|
|
302
302
|
self_.packagePaths_ = ff_core_Map.Map_add(self_.packagePaths_, dependency_.packagePair_, dependencyPath_, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair);
|
|
303
303
|
const packageInfo_ = ff_core_Option.Option_else(ff_compiler_Dependencies.Dependencies_loadPackageInfo(self_, dependency_.packagePair_, dependencyPath_), (() => {
|
|
304
|
-
|
|
304
|
+
return ff_core_Core.throw_(ff_compiler_Syntax.CompileError(dependency_.at_, ("Dependency not found: " + ff_core_Path.Path_absolute(dependencyPath_))), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
305
305
|
}));
|
|
306
306
|
ff_compiler_Dependencies.checkPackagePairs_(dependency_.packagePair_, packageInfo_.package_.packagePair_);
|
|
307
307
|
return packageInfo_
|
|
@@ -378,7 +378,7 @@ return ff_core_Option.Some((await (async function() {
|
|
|
378
378
|
ff_core_Log.trace_(("Fetching " + location_));
|
|
379
379
|
const buffer_ = (await ff_core_HttpClient.HttpClient_get$(httpClient_, location_, [], (async (response_, $task) => {
|
|
380
380
|
if((!(await ff_core_HttpClient.FetchResponse_ok$(response_, $task)))) {
|
|
381
|
-
|
|
381
|
+
ff_core_Core.throw_(ff_compiler_Syntax.CompileError(dependency_.at_, ("Could not download dependency: " + location_)), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
382
382
|
};
|
|
383
383
|
return (await ff_core_HttpClient.FetchResponse_readBuffer$(response_, $task))
|
|
384
384
|
}), $task));
|
|
@@ -395,7 +395,7 @@ return (await ff_core_Path.Path_renameTo$(tarGzPath_, donePath_, $task))
|
|
|
395
395
|
};
|
|
396
396
|
return dependencyPath_
|
|
397
397
|
} else {
|
|
398
|
-
|
|
398
|
+
return ff_core_Core.throw_(ff_compiler_Syntax.CompileError(dependency_.at_, ("Loading packages by this protocol is not supported: " + location_)), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
399
399
|
}
|
|
400
400
|
} else {
|
|
401
401
|
return (await ff_core_Path.Path_path$(path_, location_, $task))
|
|
@@ -407,7 +407,7 @@ const packageInfos_ = (await ff_core_List.List_map$(dependencies_, (async (depen
|
|
|
407
407
|
const dependencyPath_ = (await ff_compiler_Dependencies.Dependencies_fetchDependency$(self_, path_, httpClient_, dependencyLock_, dependency_, $task));
|
|
408
408
|
self_.packagePaths_ = ff_core_Map.Map_add(self_.packagePaths_, dependency_.packagePair_, dependencyPath_, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair);
|
|
409
409
|
const packageInfo_ = (await ff_core_Option.Option_else$((await ff_compiler_Dependencies.Dependencies_loadPackageInfo$(self_, dependency_.packagePair_, dependencyPath_, $task)), (async ($task) => {
|
|
410
|
-
|
|
410
|
+
return ff_core_Core.throw_(ff_compiler_Syntax.CompileError(dependency_.at_, ("Dependency not found: " + (await ff_core_Path.Path_absolute$(dependencyPath_, $task)))), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
411
411
|
}), $task));
|
|
412
412
|
ff_compiler_Dependencies.checkPackagePairs_(dependency_.packagePair_, packageInfo_.package_.packagePair_);
|
|
413
413
|
return packageInfo_
|
|
@@ -167,7 +167,7 @@ return ff_compiler_Syntax.DInstance(at_, declaration_.generics_, constraints_, "
|
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
export function Deriver_makeShowInstances(self_, modulePrefix_, module_) {
|
|
170
|
-
const coreWhitelist_ = ff_core_List.List_toSet(["ff:core/Option.Option"], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String);
|
|
170
|
+
const coreWhitelist_ = ff_core_List.List_toSet(["ff:core/Option.Option", "ff:core/Serializable.DeserializationChecksumException", "ff:core/Core.GrabException", "ff:core/NodeSystem.ProcessException"], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String);
|
|
171
171
|
const missingInstance_ = ff_compiler_Deriver.Deriver_findTypesThatNeedInstances(self_, "ff:core/Show.Show", modulePrefix_, coreWhitelist_, true, module_);
|
|
172
172
|
return ff_core_List.List_map(missingInstance_, ((_w1) => {
|
|
173
173
|
return ff_compiler_Deriver.Deriver_makeShowInstance(self_, modulePrefix_, _w1)
|
|
@@ -569,7 +569,7 @@ return ff_compiler_Syntax.DInstance(at_, declaration_.generics_, constraints_, "
|
|
|
569
569
|
}
|
|
570
570
|
|
|
571
571
|
export async function Deriver_makeShowInstances$(self_, modulePrefix_, module_, $task) {
|
|
572
|
-
const coreWhitelist_ = ff_core_List.List_toSet(["ff:core/Option.Option"], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String);
|
|
572
|
+
const coreWhitelist_ = ff_core_List.List_toSet(["ff:core/Option.Option", "ff:core/Serializable.DeserializationChecksumException", "ff:core/Core.GrabException", "ff:core/NodeSystem.ProcessException"], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String);
|
|
573
573
|
const missingInstance_ = ff_compiler_Deriver.Deriver_findTypesThatNeedInstances(self_, "ff:core/Show.Show", modulePrefix_, coreWhitelist_, true, module_);
|
|
574
574
|
return ff_core_List.List_map(missingInstance_, ((_w1) => {
|
|
575
575
|
return ff_compiler_Deriver.Deriver_makeShowInstance(self_, modulePrefix_, _w1)
|
|
@@ -1021,7 +1021,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
1021
1021
|
return ff_compiler_Deriver.Deriver()
|
|
1022
1022
|
}
|
|
1023
1023
|
{
|
|
1024
|
-
|
|
1024
|
+
return ff_core_Core.throw_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException, ff_core_Serializable.ff_core_Show_Show$ff_core_Serializable_DeserializationChecksumException)
|
|
1025
1025
|
}
|
|
1026
1026
|
}
|
|
1027
1027
|
},
|
|
@@ -1047,7 +1047,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
1047
1047
|
return ff_compiler_Deriver.Deriver()
|
|
1048
1048
|
}
|
|
1049
1049
|
{
|
|
1050
|
-
|
|
1050
|
+
return ff_core_Core.throw_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException, ff_core_Serializable.ff_core_Show_Show$ff_core_Serializable_DeserializationChecksumException)
|
|
1051
1051
|
}
|
|
1052
1052
|
}
|
|
1053
1053
|
}
|
|
@@ -541,7 +541,7 @@ const _1 = ff_core_List.List_grabFirst(newGenerics_);
|
|
|
541
541
|
if(_1.TConstructor) {
|
|
542
542
|
const firstType_ = _1;
|
|
543
543
|
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), (() => {
|
|
544
|
-
|
|
544
|
+
return ff_core_Core.throw_(ff_compiler_Syntax.CompileError(at_, ((("Missing instance " + firstType_.name_) + ": ") + constraint_.name_)), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
545
545
|
}));
|
|
546
546
|
const dictionaries_ = ff_core_List.List_map(instance_.constraints_, ((c_) => {
|
|
547
547
|
return ff_compiler_Dictionaries.Dictionaries_makeDictionary(self_, at_, instance_.generics_, firstType_.generics_, c_)
|
|
@@ -939,7 +939,7 @@ const _1 = ff_core_List.List_grabFirst(newGenerics_);
|
|
|
939
939
|
if(_1.TConstructor) {
|
|
940
940
|
const firstType_ = _1;
|
|
941
941
|
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), (() => {
|
|
942
|
-
|
|
942
|
+
return ff_core_Core.throw_(ff_compiler_Syntax.CompileError(at_, ((("Missing instance " + firstType_.name_) + ": ") + constraint_.name_)), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
943
943
|
}));
|
|
944
944
|
const dictionaries_ = ff_core_List.List_map(instance_.constraints_, ((c_) => {
|
|
945
945
|
return ff_compiler_Dictionaries.Dictionaries_makeDictionary(self_, at_, instance_.generics_, firstType_.generics_, c_)
|
|
@@ -1061,7 +1061,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
1061
1061
|
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_))
|
|
1062
1062
|
}
|
|
1063
1063
|
{
|
|
1064
|
-
|
|
1064
|
+
return ff_core_Core.throw_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException, ff_core_Serializable.ff_core_Show_Show$ff_core_Serializable_DeserializationChecksumException)
|
|
1065
1065
|
}
|
|
1066
1066
|
}
|
|
1067
1067
|
},
|
|
@@ -1088,7 +1088,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
1088
1088
|
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_))
|
|
1089
1089
|
}
|
|
1090
1090
|
{
|
|
1091
|
-
|
|
1091
|
+
return ff_core_Core.throw_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException, ff_core_Serializable.ff_core_Show_Show$ff_core_Serializable_DeserializationChecksumException)
|
|
1092
1092
|
}
|
|
1093
1093
|
}
|
|
1094
1094
|
}
|
|
@@ -724,7 +724,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
724
724
|
return ff_compiler_Environment.Environment(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Environment.ff_core_Serializable_Serializable$ff_compiler_Environment_Scheme).deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_DTrait).deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_DImport).deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type.deserializeUsing_(serialization_), ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_))
|
|
725
725
|
}
|
|
726
726
|
{
|
|
727
|
-
|
|
727
|
+
return ff_core_Core.throw_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException, ff_core_Serializable.ff_core_Show_Show$ff_core_Serializable_DeserializationChecksumException)
|
|
728
728
|
}
|
|
729
729
|
}
|
|
730
730
|
},
|
|
@@ -756,7 +756,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
756
756
|
return ff_compiler_Environment.Environment(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Environment.ff_core_Serializable_Serializable$ff_compiler_Environment_Scheme).deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_DTrait).deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_DImport).deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type.deserializeUsing_(serialization_), ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_))
|
|
757
757
|
}
|
|
758
758
|
{
|
|
759
|
-
|
|
759
|
+
return ff_core_Core.throw_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException, ff_core_Serializable.ff_core_Show_Show$ff_core_Serializable_DeserializationChecksumException)
|
|
760
760
|
}
|
|
761
761
|
}
|
|
762
762
|
}
|
|
@@ -790,7 +790,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
790
790
|
return ff_compiler_Environment.Scheme(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Signature.deserializeUsing_(serialization_))
|
|
791
791
|
}
|
|
792
792
|
{
|
|
793
|
-
|
|
793
|
+
return ff_core_Core.throw_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException, ff_core_Serializable.ff_core_Show_Show$ff_core_Serializable_DeserializationChecksumException)
|
|
794
794
|
}
|
|
795
795
|
}
|
|
796
796
|
},
|
|
@@ -821,7 +821,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
821
821
|
return ff_compiler_Environment.Scheme(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Signature.deserializeUsing_(serialization_))
|
|
822
822
|
}
|
|
823
823
|
{
|
|
824
|
-
|
|
824
|
+
return ff_core_Core.throw_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException, ff_core_Serializable.ff_core_Show_Show$ff_core_Serializable_DeserializationChecksumException)
|
|
825
825
|
}
|
|
826
826
|
}
|
|
827
827
|
}
|
|
@@ -852,7 +852,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
852
852
|
return ff_compiler_Environment.Instantiated(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Pair.ff_core_Serializable_Serializable$ff_core_Pair_Pair(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type)).deserializeUsing_(serialization_), ff_compiler_Environment.ff_core_Serializable_Serializable$ff_compiler_Environment_Scheme.deserializeUsing_(serialization_))
|
|
853
853
|
}
|
|
854
854
|
{
|
|
855
|
-
|
|
855
|
+
return ff_core_Core.throw_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException, ff_core_Serializable.ff_core_Show_Show$ff_core_Serializable_DeserializationChecksumException)
|
|
856
856
|
}
|
|
857
857
|
}
|
|
858
858
|
},
|
|
@@ -880,7 +880,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
880
880
|
return ff_compiler_Environment.Instantiated(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Pair.ff_core_Serializable_Serializable$ff_core_Pair_Pair(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type)).deserializeUsing_(serialization_), ff_compiler_Environment.ff_core_Serializable_Serializable$ff_compiler_Environment_Scheme.deserializeUsing_(serialization_))
|
|
881
881
|
}
|
|
882
882
|
{
|
|
883
|
-
|
|
883
|
+
return ff_core_Core.throw_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException, ff_core_Serializable.ff_core_Show_Show$ff_core_Serializable_DeserializationChecksumException)
|
|
884
884
|
}
|
|
885
885
|
}
|
|
886
886
|
}
|