firefly-compiler 0.5.77 → 0.5.78
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/Compiler.ff +7 -3
- package/compiler/JsEmitter.ff +1564 -623
- package/compiler/Main.ff +1 -1
- package/compiler/SourceMap.ff +149 -0
- package/core/Buffer.ff +2 -1
- package/core/BuildSystem.ff +3 -1
- package/core/Js.ff +6 -0
- package/firefly.sh +1 -1
- package/fireflysite/Main.ff +2 -1
- package/output/js/ff/compiler/Builder.mjs +4 -44
- package/output/js/ff/compiler/Builder.mjs.map +181 -0
- package/output/js/ff/compiler/Compiler.mjs +23 -16
- package/output/js/ff/compiler/Compiler.mjs.map +155 -0
- package/output/js/ff/compiler/Dependencies.mjs +12 -14
- package/output/js/ff/compiler/Dependencies.mjs.map +128 -0
- package/output/js/ff/compiler/DependencyLock.mjs +1 -4
- package/output/js/ff/compiler/DependencyLock.mjs.map +22 -0
- package/output/js/ff/compiler/Deriver.mjs +10 -11
- package/output/js/ff/compiler/Deriver.mjs.map +204 -0
- package/output/js/ff/compiler/Dictionaries.mjs +12 -13
- package/output/js/ff/compiler/Dictionaries.mjs.map +183 -0
- package/output/js/ff/compiler/Environment.mjs +24 -27
- package/output/js/ff/compiler/Environment.mjs.map +141 -0
- package/output/js/ff/compiler/Inference.mjs +83 -92
- package/output/js/ff/compiler/Inference.mjs.map +355 -0
- package/output/js/ff/compiler/JsEmitter.mjs +3689 -1687
- package/output/js/ff/compiler/JsEmitter.mjs.map +423 -0
- package/output/js/ff/compiler/JsImporter.mjs +9 -12
- package/output/js/ff/compiler/JsImporter.mjs.map +52 -0
- package/output/js/ff/compiler/LspHook.mjs +17 -18
- package/output/js/ff/compiler/LspHook.mjs.map +140 -0
- package/output/js/ff/compiler/Main.mjs +57 -67
- package/output/js/ff/compiler/Main.mjs.map +226 -0
- package/output/js/ff/compiler/ModuleCache.mjs +1 -4
- package/output/js/ff/compiler/ModuleCache.mjs.map +82 -0
- package/output/js/ff/compiler/Parser.mjs +54 -57
- package/output/js/ff/compiler/Parser.mjs.map +406 -0
- package/output/js/ff/compiler/Patterns.mjs +19 -22
- package/output/js/ff/compiler/Patterns.mjs.map +119 -0
- package/output/js/ff/compiler/Resolver.mjs +40 -39
- package/output/js/ff/compiler/Resolver.mjs.map +294 -0
- package/output/js/ff/compiler/SourceMap.mjs +402 -0
- package/output/js/ff/compiler/SourceMap.mjs.map +83 -0
- package/output/js/ff/compiler/Substitution.mjs +1 -4
- package/output/js/ff/compiler/Substitution.mjs.map +138 -0
- package/output/js/ff/compiler/Syntax.mjs +250 -249
- package/output/js/ff/compiler/Syntax.mjs.map +351 -0
- package/output/js/ff/compiler/Token.mjs +17 -22
- package/output/js/ff/compiler/Token.mjs.map +113 -0
- package/output/js/ff/compiler/Tokenizer.mjs +5 -12
- package/output/js/ff/compiler/Tokenizer.mjs.map +101 -0
- package/output/js/ff/compiler/Unification.mjs +32 -33
- package/output/js/ff/compiler/Unification.mjs.map +135 -0
- package/output/js/ff/compiler/Wildcards.mjs +1 -4
- package/output/js/ff/compiler/Wildcards.mjs.map +69 -0
- package/output/js/ff/compiler/Workspace.mjs +17 -16
- package/output/js/ff/compiler/Workspace.mjs.map +96 -0
- package/output/js/ff/core/Any.mjs +1 -4
- package/output/js/ff/core/Any.mjs.map +21 -0
- package/output/js/ff/core/Array.mjs +14 -15
- package/output/js/ff/core/Array.mjs.map +90 -0
- package/output/js/ff/core/AssetSystem.mjs +1 -4
- package/output/js/ff/core/AssetSystem.mjs.map +56 -0
- package/output/js/ff/core/Atomic.mjs +1 -4
- package/output/js/ff/core/Atomic.mjs.map +24 -0
- package/output/js/ff/core/Bool.mjs +4 -9
- package/output/js/ff/core/Bool.mjs.map +19 -0
- package/output/js/ff/core/BrowserSystem.mjs +1 -8
- package/output/js/ff/core/BrowserSystem.mjs.map +47 -0
- package/output/js/ff/core/Buffer.mjs +18 -17
- package/output/js/ff/core/Buffer.mjs.map +123 -0
- package/output/js/ff/core/BuildSystem.mjs +7 -10
- package/output/js/ff/core/BuildSystem.mjs.map +87 -0
- package/output/js/ff/core/Channel.mjs +1 -4
- package/output/js/ff/core/Channel.mjs.map +67 -0
- package/output/js/ff/core/Char.mjs +1 -8
- package/output/js/ff/core/Char.mjs.map +21 -0
- package/output/js/ff/core/Core.mjs +5 -8
- package/output/js/ff/core/Core.mjs.map +40 -0
- package/output/js/ff/core/Crypto.mjs +1 -4
- package/output/js/ff/core/Crypto.mjs.map +65 -0
- package/output/js/ff/core/Date.mjs +8 -7
- package/output/js/ff/core/Date.mjs.map +168 -0
- package/output/js/ff/core/Duration.mjs +4 -9
- package/output/js/ff/core/Duration.mjs.map +18 -0
- package/output/js/ff/core/Equal.mjs +9 -14
- package/output/js/ff/core/Equal.mjs.map +22 -0
- package/output/js/ff/core/Error.mjs +1 -8
- package/output/js/ff/core/Error.mjs.map +21 -0
- package/output/js/ff/core/FileHandle.mjs +1 -8
- package/output/js/ff/core/FileHandle.mjs.map +32 -0
- package/output/js/ff/core/Float.mjs +4 -5
- package/output/js/ff/core/Float.mjs.map +93 -0
- package/output/js/ff/core/HttpClient.mjs +1 -4
- package/output/js/ff/core/HttpClient.mjs.map +62 -0
- package/output/js/ff/core/Int.mjs +4 -9
- package/output/js/ff/core/Int.mjs.map +49 -0
- package/output/js/ff/core/IntMap.mjs +3 -6
- package/output/js/ff/core/IntMap.mjs.map +52 -0
- package/output/js/ff/core/Js.mjs +13 -8
- package/output/js/ff/core/Js.mjs.map +121 -0
- package/output/js/ff/core/JsSystem.mjs +1 -8
- package/output/js/ff/core/JsSystem.mjs.map +59 -0
- package/output/js/ff/core/JsValue.mjs +23 -42
- package/output/js/ff/core/JsValue.mjs.map +155 -0
- package/output/js/ff/core/Json.mjs +25 -26
- package/output/js/ff/core/Json.mjs.map +134 -0
- package/output/js/ff/core/List.mjs +11 -12
- package/output/js/ff/core/List.mjs.map +123 -0
- package/output/js/ff/core/Lock.mjs +7 -14
- package/output/js/ff/core/Lock.mjs.map +52 -0
- package/output/js/ff/core/Log.mjs +1 -8
- package/output/js/ff/core/Log.mjs.map +26 -0
- package/output/js/ff/core/Map.mjs +6 -7
- package/output/js/ff/core/Map.mjs.map +67 -0
- package/output/js/ff/core/NodeSystem.mjs +11 -14
- package/output/js/ff/core/NodeSystem.mjs.map +137 -0
- package/output/js/ff/core/Nothing.mjs +1 -10
- package/output/js/ff/core/Nothing.mjs.map +11 -0
- package/output/js/ff/core/Option.mjs +10 -15
- package/output/js/ff/core/Option.mjs.map +67 -0
- package/output/js/ff/core/Ordering.mjs +12 -13
- package/output/js/ff/core/Ordering.mjs.map +48 -0
- package/output/js/ff/core/Pair.mjs +8 -13
- package/output/js/ff/core/Pair.mjs.map +48 -0
- package/output/js/ff/core/Path.mjs +5 -14
- package/output/js/ff/core/Path.mjs.map +178 -0
- package/output/js/ff/core/Queue.mjs +1 -4
- package/output/js/ff/core/Queue.mjs.map +45 -0
- package/output/js/ff/core/Random.mjs +1 -4
- package/output/js/ff/core/Random.mjs.map +79 -0
- package/output/js/ff/core/RbMap.mjs +1 -16
- package/output/js/ff/core/RbMap.mjs.map +92 -0
- package/output/js/ff/core/Serializable.mjs +17 -22
- package/output/js/ff/core/Serializable.mjs.map +73 -0
- package/output/js/ff/core/Set.mjs +6 -7
- package/output/js/ff/core/Set.mjs.map +45 -0
- package/output/js/ff/core/Show.mjs +11 -20
- package/output/js/ff/core/Show.mjs.map +29 -0
- package/output/js/ff/core/SourceLocation.mjs +7 -8
- package/output/js/ff/core/SourceLocation.mjs.map +41 -0
- package/output/js/ff/core/Stream.mjs +1 -4
- package/output/js/ff/core/Stream.mjs.map +92 -0
- package/output/js/ff/core/String.mjs +14 -19
- package/output/js/ff/core/String.mjs.map +106 -0
- package/output/js/ff/core/StringMap.mjs +3 -6
- package/output/js/ff/core/StringMap.mjs.map +52 -0
- package/output/js/ff/core/Task.mjs +1 -8
- package/output/js/ff/core/Task.mjs.map +79 -0
- package/output/js/ff/core/Try.mjs +3 -6
- package/output/js/ff/core/Try.mjs.map +41 -0
- package/output/js/ff/core/Unit.mjs +5 -12
- package/output/js/ff/core/Unit.mjs.map +18 -0
- package/package.json +1 -1
- package/vscode/package.json +1 -1
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import * as import$0 from 'url';
|
|
2
|
-
|
|
3
1
|
import * as ff_compiler_Main from "../../ff/compiler/Main.mjs"
|
|
4
2
|
|
|
5
3
|
import * as ff_compiler_Builder from "../../ff/compiler/Builder.mjs"
|
|
@@ -120,6 +118,7 @@ import * as ff_core_Task from "../../ff/core/Task.mjs"
|
|
|
120
118
|
|
|
121
119
|
import * as ff_core_Try from "../../ff/core/Try.mjs"
|
|
122
120
|
|
|
121
|
+
import * as import$0 from 'url';
|
|
123
122
|
import * as ff_core_Unit from "../../ff/core/Unit.mjs"
|
|
124
123
|
|
|
125
124
|
// type MainCommand
|
|
@@ -148,17 +147,7 @@ export function CommandLineError(problem_) {
|
|
|
148
147
|
return {problem_};
|
|
149
148
|
}
|
|
150
149
|
|
|
151
|
-
export const usageString_ =
|
|
152
|
-
usage: firefly <main-file> [<main-arguments>] | <command> [<command-arguments>]
|
|
153
|
-
|
|
154
|
-
These are the commands:
|
|
155
|
-
run <main-file> [<main-arguments>] Run the main file with the provided arguments
|
|
156
|
-
browser <main-file> Compile the main file for the browser
|
|
157
|
-
build <main-file> Build the main file
|
|
158
|
-
check <firefly-file> Check the firefly source file for errors
|
|
159
|
-
symbols <firefly-file> Print a .tsv with the symbols of a firefly source file
|
|
160
|
-
bootstrap Bootstrap the compiler
|
|
161
|
-
`;
|
|
150
|
+
export const usageString_ = "\r\nusage: firefly <main-file> [<main-arguments>] | <command> [<command-arguments>]\r\n\r\nThese are the commands:\r\n run <main-file> [<main-arguments>] Run the main file with the provided arguments\r\n browser <main-file> Compile the main file for the browser\r\n build <main-file> Build the main file\r\n check <firefly-file> Check the firefly source file for errors\r\n symbols <out-file> <firefly-file> Print a .tsv with the symbols of a firefly source file\r\n bootstrap Bootstrap the compiler\r\n";
|
|
162
151
|
|
|
163
152
|
export function main_(system_) {
|
|
164
153
|
const fireflyPath_ = ff_compiler_Main.detectFireflyPath_(system_);
|
|
@@ -202,7 +191,7 @@ const mainPath_ = ff_core_NodeSystem.NodeSystem_path(system_, mainFile_);
|
|
|
202
191
|
const moduleKey_ = buildScript_(mainPath_, resolvedDependencies_.mainPackagePair_, ff_compiler_JsEmitter.EmitNode(), resolvedDependencies_);
|
|
203
192
|
if((!ff_compiler_Main.importAndRun_(system_, fireflyPath_, "node", moduleKey_, arguments_))) {
|
|
204
193
|
const at_ = ff_compiler_Syntax.Location(ff_core_Path.Path_absolute(ff_core_NodeSystem.NodeSystem_path(system_, mainFile_)), 1, 1);
|
|
205
|
-
|
|
194
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Syntax.CompileError(at_, "This module does not contain a 'nodeMain' function"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
206
195
|
}
|
|
207
196
|
return
|
|
208
197
|
}
|
|
@@ -230,7 +219,7 @@ if(command_a.CheckCommand) {
|
|
|
230
219
|
const filePath_ = command_a.filePath_;
|
|
231
220
|
const errors_ = ff_compiler_Builder.check_(system_, fireflyPath_, ff_core_NodeSystem.NodeSystem_path(system_, filePath_), ff_core_Option.None(), ff_core_Set.new_(), ff_core_Map.new_(), ff_compiler_ModuleCache.new_(1), ff_compiler_DependencyLock.new_(ff_core_NodeSystem.NodeSystem_mainTask(system_)), 0, ff_compiler_LspHook.disabled_(), true);
|
|
232
221
|
if((!ff_core_List.List_isEmpty(errors_))) {
|
|
233
|
-
|
|
222
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Syntax.CompileErrors(ff_core_List.List_distinct(errors_, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_CompileError)), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileErrors, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileErrors)
|
|
234
223
|
}
|
|
235
224
|
return
|
|
236
225
|
}
|
|
@@ -331,7 +320,7 @@ return ff_compiler_Main.RunCommand(mainFile_, mainArguments_)
|
|
|
331
320
|
}
|
|
332
321
|
}
|
|
333
322
|
{
|
|
334
|
-
|
|
323
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Main.CommandLineError(("You must specify a Firefly file (.ff) as first argument to run." + ff_compiler_Main.usageString_)), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
335
324
|
}
|
|
336
325
|
}
|
|
337
326
|
return
|
|
@@ -349,10 +338,10 @@ return ff_compiler_Main.BrowserCommand(mainFile_)
|
|
|
349
338
|
}
|
|
350
339
|
}
|
|
351
340
|
if(_1.length >= 2) {
|
|
352
|
-
|
|
341
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Main.CommandLineError(("You must only specify a single argument to browser." + ff_compiler_Main.usageString_)), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
353
342
|
}
|
|
354
343
|
{
|
|
355
|
-
|
|
344
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Main.CommandLineError(("You must specify a Firefly file (.ff) as the argument to browser." + ff_compiler_Main.usageString_)), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
356
345
|
}
|
|
357
346
|
}
|
|
358
347
|
return
|
|
@@ -370,10 +359,10 @@ return ff_compiler_Main.BuildCommand(mainFile_)
|
|
|
370
359
|
}
|
|
371
360
|
}
|
|
372
361
|
if(_1.length >= 2) {
|
|
373
|
-
|
|
362
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Main.CommandLineError(("You must only specify a single argument to build." + ff_compiler_Main.usageString_)), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
374
363
|
}
|
|
375
364
|
{
|
|
376
|
-
|
|
365
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Main.CommandLineError(("You must specify a Firefly file (.ff) as the argument to build." + ff_compiler_Main.usageString_)), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
377
366
|
}
|
|
378
367
|
}
|
|
379
368
|
return
|
|
@@ -387,10 +376,10 @@ const fileName_ = _1[0];
|
|
|
387
376
|
return ff_compiler_Main.CheckCommand(fileName_)
|
|
388
377
|
}
|
|
389
378
|
if(_1.length >= 2) {
|
|
390
|
-
|
|
379
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Main.CommandLineError(("You must only specify a single argument to check." + ff_compiler_Main.usageString_)), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
391
380
|
}
|
|
392
381
|
{
|
|
393
|
-
|
|
382
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Main.CommandLineError(("You must specify a Firefly file (.ff) or directory as the argument to check." + ff_compiler_Main.usageString_)), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
394
383
|
}
|
|
395
384
|
}
|
|
396
385
|
return
|
|
@@ -408,23 +397,23 @@ return ff_compiler_Main.SymbolsCommand(outName_, [fileName_, ...fileNames_])
|
|
|
408
397
|
}
|
|
409
398
|
}
|
|
410
399
|
{
|
|
411
|
-
|
|
400
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Main.CommandLineError(("You must specify a output file (.tsv) and 1+ Firefly files (.ff) to symbols." + ff_compiler_Main.usageString_)), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
412
401
|
}
|
|
413
402
|
}
|
|
414
403
|
return
|
|
415
404
|
}
|
|
416
405
|
if(arguments_a.length === 2 && arguments_a[0] === "bootstrap") {
|
|
417
|
-
|
|
406
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Main.CommandLineError(("bootstrap takes no arguments" + ff_compiler_Main.usageString_)), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
418
407
|
}
|
|
419
408
|
if(arguments_a.length === 1 && arguments_a[0] === "bootstrap") {
|
|
420
409
|
return ff_compiler_Main.BootstrapCommand()
|
|
421
410
|
}
|
|
422
411
|
if(arguments_a.length === 0) {
|
|
423
|
-
|
|
412
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Main.CommandLineError(("You must specify a command or a main file to run." + ff_compiler_Main.usageString_)), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
424
413
|
}
|
|
425
414
|
{
|
|
426
415
|
const s_ = arguments_a[0];
|
|
427
|
-
|
|
416
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Main.CommandLineError(((("Unknown command '" + s_) + "'") + ff_compiler_Main.usageString_)), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
428
417
|
}
|
|
429
418
|
}
|
|
430
419
|
|
|
@@ -500,8 +489,8 @@ return (_w1 + ": ")
|
|
|
500
489
|
return ""
|
|
501
490
|
}));
|
|
502
491
|
return {
|
|
503
|
-
generics_: generics_,
|
|
504
|
-
name_: (g_ + x_.name_),
|
|
492
|
+
generics_: generics_,
|
|
493
|
+
name_: (g_ + x_.name_),
|
|
505
494
|
symbols_: ff_core_List.List_map(x_.methods_, ((_w1) => {
|
|
506
495
|
return processSignature_(_w1)
|
|
507
496
|
}))
|
|
@@ -535,8 +524,8 @@ return _w1.signature_
|
|
|
535
524
|
return processSignature_(_w1)
|
|
536
525
|
}));
|
|
537
526
|
return {
|
|
538
|
-
generics_: x_.generics_,
|
|
539
|
-
name_: x_.name_,
|
|
527
|
+
generics_: x_.generics_,
|
|
528
|
+
name_: x_.name_,
|
|
540
529
|
symbols_: [...variants_, ...methods_]
|
|
541
530
|
}
|
|
542
531
|
}));
|
|
@@ -547,8 +536,8 @@ const functions_ = ff_core_List.List_map(module_.functions_, ((_w1) => {
|
|
|
547
536
|
return processSignature_(_w1.signature_)
|
|
548
537
|
}));
|
|
549
538
|
return [{
|
|
550
|
-
generics_: [],
|
|
551
|
-
name_: "",
|
|
539
|
+
generics_: [],
|
|
540
|
+
name_: "",
|
|
552
541
|
symbols_: [...ff_core_List.List_map(module_.lets_, ((_w1) => {
|
|
553
542
|
return _w1.name_
|
|
554
543
|
})), ...functions_]
|
|
@@ -606,7 +595,7 @@ const mainPath_ = (await ff_core_NodeSystem.NodeSystem_path$(system_, mainFile_,
|
|
|
606
595
|
const moduleKey_ = (await buildScript_$(mainPath_, resolvedDependencies_.mainPackagePair_, ff_compiler_JsEmitter.EmitNode(), resolvedDependencies_, $task));
|
|
607
596
|
if((!(await ff_compiler_Main.importAndRun_$(system_, fireflyPath_, "node", moduleKey_, arguments_, $task)))) {
|
|
608
597
|
const at_ = ff_compiler_Syntax.Location((await ff_core_Path.Path_absolute$((await ff_core_NodeSystem.NodeSystem_path$(system_, mainFile_, $task)), $task)), 1, 1);
|
|
609
|
-
|
|
598
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Syntax.CompileError(at_, "This module does not contain a 'nodeMain' function"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
610
599
|
}
|
|
611
600
|
return
|
|
612
601
|
}
|
|
@@ -634,7 +623,7 @@ if(command_a.CheckCommand) {
|
|
|
634
623
|
const filePath_ = command_a.filePath_;
|
|
635
624
|
const errors_ = (await ff_compiler_Builder.check_$(system_, fireflyPath_, (await ff_core_NodeSystem.NodeSystem_path$(system_, filePath_, $task)), ff_core_Option.None(), ff_core_Set.new_(), ff_core_Map.new_(), ff_compiler_ModuleCache.new_(1), (await ff_compiler_DependencyLock.new_$((await ff_core_NodeSystem.NodeSystem_mainTask$(system_, $task)), $task)), 0, ff_compiler_LspHook.disabled_(), true, $task));
|
|
636
625
|
if((!ff_core_List.List_isEmpty(errors_))) {
|
|
637
|
-
|
|
626
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Syntax.CompileErrors(ff_core_List.List_distinct(errors_, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_CompileError)), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileErrors, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileErrors)
|
|
638
627
|
}
|
|
639
628
|
return
|
|
640
629
|
}
|
|
@@ -735,7 +724,7 @@ return ff_compiler_Main.RunCommand(mainFile_, mainArguments_)
|
|
|
735
724
|
}
|
|
736
725
|
}
|
|
737
726
|
{
|
|
738
|
-
|
|
727
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Main.CommandLineError(("You must specify a Firefly file (.ff) as first argument to run." + ff_compiler_Main.usageString_)), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
739
728
|
}
|
|
740
729
|
}
|
|
741
730
|
return
|
|
@@ -753,10 +742,10 @@ return ff_compiler_Main.BrowserCommand(mainFile_)
|
|
|
753
742
|
}
|
|
754
743
|
}
|
|
755
744
|
if(_1.length >= 2) {
|
|
756
|
-
|
|
745
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Main.CommandLineError(("You must only specify a single argument to browser." + ff_compiler_Main.usageString_)), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
757
746
|
}
|
|
758
747
|
{
|
|
759
|
-
|
|
748
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Main.CommandLineError(("You must specify a Firefly file (.ff) as the argument to browser." + ff_compiler_Main.usageString_)), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
760
749
|
}
|
|
761
750
|
}
|
|
762
751
|
return
|
|
@@ -774,10 +763,10 @@ return ff_compiler_Main.BuildCommand(mainFile_)
|
|
|
774
763
|
}
|
|
775
764
|
}
|
|
776
765
|
if(_1.length >= 2) {
|
|
777
|
-
|
|
766
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Main.CommandLineError(("You must only specify a single argument to build." + ff_compiler_Main.usageString_)), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
778
767
|
}
|
|
779
768
|
{
|
|
780
|
-
|
|
769
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Main.CommandLineError(("You must specify a Firefly file (.ff) as the argument to build." + ff_compiler_Main.usageString_)), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
781
770
|
}
|
|
782
771
|
}
|
|
783
772
|
return
|
|
@@ -791,10 +780,10 @@ const fileName_ = _1[0];
|
|
|
791
780
|
return ff_compiler_Main.CheckCommand(fileName_)
|
|
792
781
|
}
|
|
793
782
|
if(_1.length >= 2) {
|
|
794
|
-
|
|
783
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Main.CommandLineError(("You must only specify a single argument to check." + ff_compiler_Main.usageString_)), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
795
784
|
}
|
|
796
785
|
{
|
|
797
|
-
|
|
786
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Main.CommandLineError(("You must specify a Firefly file (.ff) or directory as the argument to check." + ff_compiler_Main.usageString_)), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
798
787
|
}
|
|
799
788
|
}
|
|
800
789
|
return
|
|
@@ -812,23 +801,23 @@ return ff_compiler_Main.SymbolsCommand(outName_, [fileName_, ...fileNames_])
|
|
|
812
801
|
}
|
|
813
802
|
}
|
|
814
803
|
{
|
|
815
|
-
|
|
804
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Main.CommandLineError(("You must specify a output file (.tsv) and 1+ Firefly files (.ff) to symbols." + ff_compiler_Main.usageString_)), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
816
805
|
}
|
|
817
806
|
}
|
|
818
807
|
return
|
|
819
808
|
}
|
|
820
809
|
if(arguments_a.length === 2 && arguments_a[0] === "bootstrap") {
|
|
821
|
-
|
|
810
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Main.CommandLineError(("bootstrap takes no arguments" + ff_compiler_Main.usageString_)), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
822
811
|
}
|
|
823
812
|
if(arguments_a.length === 1 && arguments_a[0] === "bootstrap") {
|
|
824
813
|
return ff_compiler_Main.BootstrapCommand()
|
|
825
814
|
}
|
|
826
815
|
if(arguments_a.length === 0) {
|
|
827
|
-
|
|
816
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Main.CommandLineError(("You must specify a command or a main file to run." + ff_compiler_Main.usageString_)), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
828
817
|
}
|
|
829
818
|
{
|
|
830
819
|
const s_ = arguments_a[0];
|
|
831
|
-
|
|
820
|
+
throw ff_core_Js.initializeError_(new Error(), ff_compiler_Main.CommandLineError(((("Unknown command '" + s_) + "'") + ff_compiler_Main.usageString_)), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
832
821
|
}
|
|
833
822
|
}
|
|
834
823
|
|
|
@@ -904,8 +893,8 @@ return (_w1 + ": ")
|
|
|
904
893
|
return ""
|
|
905
894
|
}));
|
|
906
895
|
return {
|
|
907
|
-
generics_: generics_,
|
|
908
|
-
name_: (g_ + x_.name_),
|
|
896
|
+
generics_: generics_,
|
|
897
|
+
name_: (g_ + x_.name_),
|
|
909
898
|
symbols_: ff_core_List.List_map(x_.methods_, ((_w1) => {
|
|
910
899
|
return processSignature_(_w1)
|
|
911
900
|
}))
|
|
@@ -939,8 +928,8 @@ return _w1.signature_
|
|
|
939
928
|
return processSignature_(_w1)
|
|
940
929
|
}));
|
|
941
930
|
return {
|
|
942
|
-
generics_: x_.generics_,
|
|
943
|
-
name_: x_.name_,
|
|
931
|
+
generics_: x_.generics_,
|
|
932
|
+
name_: x_.name_,
|
|
944
933
|
symbols_: [...variants_, ...methods_]
|
|
945
934
|
}
|
|
946
935
|
}));
|
|
@@ -951,8 +940,8 @@ const functions_ = ff_core_List.List_map(module_.functions_, ((_w1) => {
|
|
|
951
940
|
return processSignature_(_w1.signature_)
|
|
952
941
|
}));
|
|
953
942
|
return [{
|
|
954
|
-
generics_: [],
|
|
955
|
-
name_: "",
|
|
943
|
+
generics_: [],
|
|
944
|
+
name_: "",
|
|
956
945
|
symbols_: [...ff_core_List.List_map(module_.lets_, ((_w1) => {
|
|
957
946
|
return _w1.name_
|
|
958
947
|
})), ...functions_]
|
|
@@ -968,15 +957,13 @@ return [header_, ...ff_core_List.List_sort(r_.symbols_, ff_core_Ordering.ff_core
|
|
|
968
957
|
}))
|
|
969
958
|
}
|
|
970
959
|
|
|
971
|
-
|
|
972
|
-
|
|
973
960
|
export const ff_core_Any_HasAnyTag$ff_compiler_Main_MainCommand = {
|
|
974
961
|
anyTag_() {
|
|
975
962
|
return ff_core_Any.internalAnyTag_((("ff:compiler/Main.MainCommand" + "[") + "]"))
|
|
976
963
|
},
|
|
977
964
|
async anyTag_$($task) {
|
|
978
965
|
return ff_core_Any.internalAnyTag_((("ff:compiler/Main.MainCommand" + "[") + "]"))
|
|
979
|
-
}
|
|
966
|
+
},
|
|
980
967
|
};
|
|
981
968
|
|
|
982
969
|
export const ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError = {
|
|
@@ -985,7 +972,7 @@ return ff_core_Any.internalAnyTag_((("ff:compiler/Main.CommandLineError" + "[")
|
|
|
985
972
|
},
|
|
986
973
|
async anyTag_$($task) {
|
|
987
974
|
return ff_core_Any.internalAnyTag_((("ff:compiler/Main.CommandLineError" + "[") + "]"))
|
|
988
|
-
}
|
|
975
|
+
},
|
|
989
976
|
};
|
|
990
977
|
|
|
991
978
|
export const ff_core_Show_Show$ff_compiler_Main_MainCommand = {
|
|
@@ -1042,7 +1029,7 @@ return ((("CheckCommand" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_String_
|
|
|
1042
1029
|
const z_ = value_a;
|
|
1043
1030
|
return ((((("SymbolsCommand" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.outPath_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(z_.filePaths_)) + ")")
|
|
1044
1031
|
}
|
|
1045
|
-
}
|
|
1032
|
+
},
|
|
1046
1033
|
};
|
|
1047
1034
|
|
|
1048
1035
|
export const ff_core_Show_Show$ff_compiler_Main_CommandLineError = {
|
|
@@ -1059,7 +1046,7 @@ const value_a = value_;
|
|
|
1059
1046
|
const z_ = value_a;
|
|
1060
1047
|
return ((("CommandLineError" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.problem_)) + ")")
|
|
1061
1048
|
}
|
|
1062
|
-
}
|
|
1049
|
+
},
|
|
1063
1050
|
};
|
|
1064
1051
|
|
|
1065
1052
|
export const ff_core_Equal_Equal$ff_compiler_Main_MainCommand = {
|
|
@@ -1132,7 +1119,7 @@ return ((x_.outPath_ === y_.outPath_) && ff_core_List.ff_core_Equal_Equal$ff_cor
|
|
|
1132
1119
|
{
|
|
1133
1120
|
return false
|
|
1134
1121
|
}
|
|
1135
|
-
}
|
|
1122
|
+
},
|
|
1136
1123
|
};
|
|
1137
1124
|
|
|
1138
1125
|
export const ff_core_Equal_Equal$ff_compiler_Main_CommandLineError = {
|
|
@@ -1155,7 +1142,7 @@ return true
|
|
|
1155
1142
|
{
|
|
1156
1143
|
return (x_.problem_ === y_.problem_)
|
|
1157
1144
|
}
|
|
1158
|
-
}
|
|
1145
|
+
},
|
|
1159
1146
|
};
|
|
1160
1147
|
|
|
1161
1148
|
export const ff_core_Ordering_Order$ff_compiler_Main_MainCommand = {
|
|
@@ -1350,7 +1337,7 @@ return 5
|
|
|
1350
1337
|
}
|
|
1351
1338
|
return ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int.compare_(number_(x_), number_(y_))
|
|
1352
1339
|
}
|
|
1353
|
-
}
|
|
1340
|
+
},
|
|
1354
1341
|
};
|
|
1355
1342
|
|
|
1356
1343
|
export const ff_core_Ordering_Order$ff_compiler_Main_CommandLineError = {
|
|
@@ -1385,7 +1372,7 @@ return ff_core_Ordering.OrderingSame()
|
|
|
1385
1372
|
}
|
|
1386
1373
|
return
|
|
1387
1374
|
}
|
|
1388
|
-
}
|
|
1375
|
+
},
|
|
1389
1376
|
};
|
|
1390
1377
|
|
|
1391
1378
|
export const ff_core_Serializable_Serializable$ff_compiler_Main_MainCommand = {
|
|
@@ -1478,7 +1465,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
1478
1465
|
return ff_compiler_Main.SymbolsCommand(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_))
|
|
1479
1466
|
}
|
|
1480
1467
|
{
|
|
1481
|
-
|
|
1468
|
+
throw ff_core_Js.initializeError_(new Error(), 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)
|
|
1482
1469
|
}
|
|
1483
1470
|
}
|
|
1484
1471
|
},
|
|
@@ -1571,10 +1558,10 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
1571
1558
|
return ff_compiler_Main.SymbolsCommand(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_))
|
|
1572
1559
|
}
|
|
1573
1560
|
{
|
|
1574
|
-
|
|
1575
|
-
}
|
|
1561
|
+
throw ff_core_Js.initializeError_(new Error(), 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)
|
|
1576
1562
|
}
|
|
1577
1563
|
}
|
|
1564
|
+
},
|
|
1578
1565
|
};
|
|
1579
1566
|
|
|
1580
1567
|
export const ff_core_Serializable_Serializable$ff_compiler_Main_CommandLineError = {
|
|
@@ -1601,7 +1588,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
1601
1588
|
return ff_compiler_Main.CommandLineError(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_))
|
|
1602
1589
|
}
|
|
1603
1590
|
{
|
|
1604
|
-
|
|
1591
|
+
throw ff_core_Js.initializeError_(new Error(), 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)
|
|
1605
1592
|
}
|
|
1606
1593
|
}
|
|
1607
1594
|
},
|
|
@@ -1628,8 +1615,11 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
1628
1615
|
return ff_compiler_Main.CommandLineError(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_))
|
|
1629
1616
|
}
|
|
1630
1617
|
{
|
|
1631
|
-
|
|
1632
|
-
}
|
|
1618
|
+
throw ff_core_Js.initializeError_(new Error(), 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)
|
|
1633
1619
|
}
|
|
1634
1620
|
}
|
|
1621
|
+
},
|
|
1635
1622
|
};
|
|
1623
|
+
|
|
1624
|
+
|
|
1625
|
+
//# sourceMappingURL=Main.mjs.map
|