firefly-compiler 0.5.75 → 0.5.77
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/Builder.ff +3 -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/Builder.mjs +4 -0
- 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
|
@@ -1398,7 +1398,7 @@ const instanceCall_ = _1.target_.instanceCall_;
|
|
|
1398
1398
|
const effect_ = _1.effect_;
|
|
1399
1399
|
const arguments_ = _1.arguments_;
|
|
1400
1400
|
if(instanceCall_) {
|
|
1401
|
-
|
|
1401
|
+
ff_core_Core.throw_(ff_compiler_Syntax.CompileError(at_, "Not yet implemented: Tail calls on trait methods."), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
1402
1402
|
};
|
|
1403
1403
|
self_.tailCallUsed_ = true;
|
|
1404
1404
|
const pair_ = ff_core_List.List_unzip(ff_core_List.List_collect(ff_core_List.List_map(arguments_, ((a_) => {
|
|
@@ -1951,7 +1951,7 @@ return ff_core_Option.Some((((("async (" + ff_core_List.List_join(patternParamet
|
|
|
1951
1951
|
{
|
|
1952
1952
|
const name_ = _1;
|
|
1953
1953
|
if(ff_core_String.String_startsWith(name_, "ff:core/Js.async", 0)) {
|
|
1954
|
-
|
|
1954
|
+
return ff_core_Core.throw_(ff_compiler_Syntax.CompileError(term_.at_, "JS async functions must take a simple parameter list"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
1955
1955
|
}
|
|
1956
1956
|
}
|
|
1957
1957
|
if(_1 === "ff:core/Js.cancelled") {
|
|
@@ -3928,7 +3928,7 @@ const instanceCall_ = _1.target_.instanceCall_;
|
|
|
3928
3928
|
const effect_ = _1.effect_;
|
|
3929
3929
|
const arguments_ = _1.arguments_;
|
|
3930
3930
|
if(instanceCall_) {
|
|
3931
|
-
|
|
3931
|
+
ff_core_Core.throw_(ff_compiler_Syntax.CompileError(at_, "Not yet implemented: Tail calls on trait methods."), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
3932
3932
|
};
|
|
3933
3933
|
self_.tailCallUsed_ = true;
|
|
3934
3934
|
const pair_ = ff_core_List.List_unzip(ff_core_List.List_collect(ff_core_List.List_map(arguments_, ((a_) => {
|
|
@@ -4481,7 +4481,7 @@ return ff_core_Option.Some((((("async (" + ff_core_List.List_join(patternParamet
|
|
|
4481
4481
|
{
|
|
4482
4482
|
const name_ = _1;
|
|
4483
4483
|
if(ff_core_String.String_startsWith(name_, "ff:core/Js.async", 0)) {
|
|
4484
|
-
|
|
4484
|
+
return ff_core_Core.throw_(ff_compiler_Syntax.CompileError(term_.at_, "JS async functions must take a simple parameter list"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
4485
4485
|
}
|
|
4486
4486
|
}
|
|
4487
4487
|
if(_1 === "ff:core/Js.cancelled") {
|
|
@@ -5995,7 +5995,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
5995
5995
|
return ff_compiler_JsEmitter.EmitExecutable()
|
|
5996
5996
|
}
|
|
5997
5997
|
{
|
|
5998
|
-
|
|
5998
|
+
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)
|
|
5999
5999
|
}
|
|
6000
6000
|
}
|
|
6001
6001
|
},
|
|
@@ -6057,7 +6057,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
6057
6057
|
return ff_compiler_JsEmitter.EmitExecutable()
|
|
6058
6058
|
}
|
|
6059
6059
|
{
|
|
6060
|
-
|
|
6060
|
+
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)
|
|
6061
6061
|
}
|
|
6062
6062
|
}
|
|
6063
6063
|
}
|
|
@@ -6090,7 +6090,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
6090
6090
|
return ff_compiler_JsEmitter.ProcessedVariantCase(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.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_List_List(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_))
|
|
6091
6091
|
}
|
|
6092
6092
|
{
|
|
6093
|
-
|
|
6093
|
+
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)
|
|
6094
6094
|
}
|
|
6095
6095
|
}
|
|
6096
6096
|
},
|
|
@@ -6120,7 +6120,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
6120
6120
|
return ff_compiler_JsEmitter.ProcessedVariantCase(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.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_List_List(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_))
|
|
6121
6121
|
}
|
|
6122
6122
|
{
|
|
6123
|
-
|
|
6123
|
+
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)
|
|
6124
6124
|
}
|
|
6125
6125
|
}
|
|
6126
6126
|
}
|
|
@@ -149,23 +149,23 @@ const name_ = ff_core_String.String_takeWhile(rest2_, ((_w1) => {
|
|
|
149
149
|
return ff_core_Char.Char_isAsciiLetterOrDigit(_w1)
|
|
150
150
|
}));
|
|
151
151
|
if((name_.length === 0)) {
|
|
152
|
-
|
|
152
|
+
ff_core_Core.throw_(ff_compiler_Syntax.CompileError(at_, "Expected alias after \"import * as \""), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
153
153
|
};
|
|
154
154
|
const rest3_ = ff_core_String.String_dropFirst(rest2_, name_.length);
|
|
155
155
|
if((!ff_core_String.String_startsWith(rest3_, " from '", 0))) {
|
|
156
|
-
|
|
156
|
+
ff_core_Core.throw_(ff_compiler_Syntax.CompileError(at_, "Expected \" from '\" after \"import * as ...\""), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
157
157
|
};
|
|
158
158
|
const rest4_ = ff_core_String.String_dropFirst(rest3_, " from '".length);
|
|
159
159
|
const url_ = ff_core_String.String_takeWhile(rest4_, ((_w1) => {
|
|
160
160
|
return (_w1 !== 39)
|
|
161
161
|
}));
|
|
162
162
|
if((url_.length === 0)) {
|
|
163
|
-
|
|
163
|
+
ff_core_Core.throw_(ff_compiler_Syntax.CompileError(at_, "Expected module name after \" from '\""), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
164
164
|
};
|
|
165
165
|
if(ff_core_String.String_any(url_, ((_w1) => {
|
|
166
166
|
return (_w1 === 10)
|
|
167
167
|
}))) {
|
|
168
|
-
|
|
168
|
+
ff_core_Core.throw_(ff_compiler_Syntax.CompileError(at_, "Unclosed module name string"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
169
169
|
};
|
|
170
170
|
const rest5_ = ff_core_String.String_dropFirst(rest4_, (url_.length + 1));
|
|
171
171
|
const importName_ = ff_compiler_JsImporter.JsImporter_add(self_, url_);
|
|
@@ -216,23 +216,23 @@ const name_ = ff_core_String.String_takeWhile(rest2_, ((_w1) => {
|
|
|
216
216
|
return ff_core_Char.Char_isAsciiLetterOrDigit(_w1)
|
|
217
217
|
}));
|
|
218
218
|
if((name_.length === 0)) {
|
|
219
|
-
|
|
219
|
+
ff_core_Core.throw_(ff_compiler_Syntax.CompileError(at_, "Expected alias after \"import * as \""), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
220
220
|
};
|
|
221
221
|
const rest3_ = ff_core_String.String_dropFirst(rest2_, name_.length);
|
|
222
222
|
if((!ff_core_String.String_startsWith(rest3_, " from '", 0))) {
|
|
223
|
-
|
|
223
|
+
ff_core_Core.throw_(ff_compiler_Syntax.CompileError(at_, "Expected \" from '\" after \"import * as ...\""), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
224
224
|
};
|
|
225
225
|
const rest4_ = ff_core_String.String_dropFirst(rest3_, " from '".length);
|
|
226
226
|
const url_ = ff_core_String.String_takeWhile(rest4_, ((_w1) => {
|
|
227
227
|
return (_w1 !== 39)
|
|
228
228
|
}));
|
|
229
229
|
if((url_.length === 0)) {
|
|
230
|
-
|
|
230
|
+
ff_core_Core.throw_(ff_compiler_Syntax.CompileError(at_, "Expected module name after \" from '\""), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
231
231
|
};
|
|
232
232
|
if(ff_core_String.String_any(url_, ((_w1) => {
|
|
233
233
|
return (_w1 === 10)
|
|
234
234
|
}))) {
|
|
235
|
-
|
|
235
|
+
ff_core_Core.throw_(ff_compiler_Syntax.CompileError(at_, "Unclosed module name string"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
236
236
|
};
|
|
237
237
|
const rest5_ = ff_core_String.String_dropFirst(rest4_, (url_.length + 1));
|
|
238
238
|
const importName_ = ff_compiler_JsImporter.JsImporter_add(self_, url_);
|
|
@@ -911,7 +911,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
911
911
|
return ff_compiler_LspHook.SymbolHook(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Location.deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Location.deserializeUsing_(serialization_))
|
|
912
912
|
}
|
|
913
913
|
{
|
|
914
|
-
|
|
914
|
+
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)
|
|
915
915
|
}
|
|
916
916
|
}
|
|
917
917
|
},
|
|
@@ -940,7 +940,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
940
940
|
return ff_compiler_LspHook.SymbolHook(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Location.deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Location.deserializeUsing_(serialization_))
|
|
941
941
|
}
|
|
942
942
|
{
|
|
943
|
-
|
|
943
|
+
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)
|
|
944
944
|
}
|
|
945
945
|
}
|
|
946
946
|
}
|
|
@@ -1067,7 +1067,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
1067
1067
|
return ff_compiler_LspHook.SParameter()
|
|
1068
1068
|
}
|
|
1069
1069
|
{
|
|
1070
|
-
|
|
1070
|
+
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)
|
|
1071
1071
|
}
|
|
1072
1072
|
}
|
|
1073
1073
|
},
|
|
@@ -1191,7 +1191,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
1191
1191
|
return ff_compiler_LspHook.SParameter()
|
|
1192
1192
|
}
|
|
1193
1193
|
{
|
|
1194
|
-
|
|
1194
|
+
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)
|
|
1195
1195
|
}
|
|
1196
1196
|
}
|
|
1197
1197
|
}
|
|
@@ -202,7 +202,7 @@ const mainPath_ = ff_core_NodeSystem.NodeSystem_path(system_, mainFile_);
|
|
|
202
202
|
const moduleKey_ = buildScript_(mainPath_, resolvedDependencies_.mainPackagePair_, ff_compiler_JsEmitter.EmitNode(), resolvedDependencies_);
|
|
203
203
|
if((!ff_compiler_Main.importAndRun_(system_, fireflyPath_, "node", moduleKey_, arguments_))) {
|
|
204
204
|
const at_ = ff_compiler_Syntax.Location(ff_core_Path.Path_absolute(ff_core_NodeSystem.NodeSystem_path(system_, mainFile_)), 1, 1);
|
|
205
|
-
|
|
205
|
+
ff_core_Core.throw_(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
206
|
}
|
|
207
207
|
return
|
|
208
208
|
}
|
|
@@ -230,7 +230,7 @@ if(command_a.CheckCommand) {
|
|
|
230
230
|
const filePath_ = command_a.filePath_;
|
|
231
231
|
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
232
|
if((!ff_core_List.List_isEmpty(errors_))) {
|
|
233
|
-
|
|
233
|
+
ff_core_Core.throw_(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
234
|
}
|
|
235
235
|
return
|
|
236
236
|
}
|
|
@@ -331,7 +331,7 @@ return ff_compiler_Main.RunCommand(mainFile_, mainArguments_)
|
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
{
|
|
334
|
-
|
|
334
|
+
return ff_core_Core.throw_(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
335
|
}
|
|
336
336
|
}
|
|
337
337
|
return
|
|
@@ -349,10 +349,10 @@ return ff_compiler_Main.BrowserCommand(mainFile_)
|
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
if(_1.length >= 2) {
|
|
352
|
-
|
|
352
|
+
return ff_core_Core.throw_(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
353
|
}
|
|
354
354
|
{
|
|
355
|
-
|
|
355
|
+
return ff_core_Core.throw_(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
356
|
}
|
|
357
357
|
}
|
|
358
358
|
return
|
|
@@ -370,10 +370,10 @@ return ff_compiler_Main.BuildCommand(mainFile_)
|
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
372
|
if(_1.length >= 2) {
|
|
373
|
-
|
|
373
|
+
return ff_core_Core.throw_(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
374
|
}
|
|
375
375
|
{
|
|
376
|
-
|
|
376
|
+
return ff_core_Core.throw_(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
377
|
}
|
|
378
378
|
}
|
|
379
379
|
return
|
|
@@ -387,10 +387,10 @@ const fileName_ = _1[0];
|
|
|
387
387
|
return ff_compiler_Main.CheckCommand(fileName_)
|
|
388
388
|
}
|
|
389
389
|
if(_1.length >= 2) {
|
|
390
|
-
|
|
390
|
+
return ff_core_Core.throw_(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
391
|
}
|
|
392
392
|
{
|
|
393
|
-
|
|
393
|
+
return ff_core_Core.throw_(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
394
|
}
|
|
395
395
|
}
|
|
396
396
|
return
|
|
@@ -408,23 +408,23 @@ return ff_compiler_Main.SymbolsCommand(outName_, [fileName_, ...fileNames_])
|
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
410
|
{
|
|
411
|
-
|
|
411
|
+
return ff_core_Core.throw_(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
412
|
}
|
|
413
413
|
}
|
|
414
414
|
return
|
|
415
415
|
}
|
|
416
416
|
if(arguments_a.length === 2 && arguments_a[0] === "bootstrap") {
|
|
417
|
-
|
|
417
|
+
return ff_core_Core.throw_(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
418
|
}
|
|
419
419
|
if(arguments_a.length === 1 && arguments_a[0] === "bootstrap") {
|
|
420
420
|
return ff_compiler_Main.BootstrapCommand()
|
|
421
421
|
}
|
|
422
422
|
if(arguments_a.length === 0) {
|
|
423
|
-
|
|
423
|
+
return ff_core_Core.throw_(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
424
|
}
|
|
425
425
|
{
|
|
426
426
|
const s_ = arguments_a[0];
|
|
427
|
-
|
|
427
|
+
return ff_core_Core.throw_(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
428
|
}
|
|
429
429
|
}
|
|
430
430
|
|
|
@@ -606,7 +606,7 @@ const mainPath_ = (await ff_core_NodeSystem.NodeSystem_path$(system_, mainFile_,
|
|
|
606
606
|
const moduleKey_ = (await buildScript_$(mainPath_, resolvedDependencies_.mainPackagePair_, ff_compiler_JsEmitter.EmitNode(), resolvedDependencies_, $task));
|
|
607
607
|
if((!(await ff_compiler_Main.importAndRun_$(system_, fireflyPath_, "node", moduleKey_, arguments_, $task)))) {
|
|
608
608
|
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
|
-
|
|
609
|
+
ff_core_Core.throw_(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
610
|
}
|
|
611
611
|
return
|
|
612
612
|
}
|
|
@@ -634,7 +634,7 @@ if(command_a.CheckCommand) {
|
|
|
634
634
|
const filePath_ = command_a.filePath_;
|
|
635
635
|
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
636
|
if((!ff_core_List.List_isEmpty(errors_))) {
|
|
637
|
-
|
|
637
|
+
ff_core_Core.throw_(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
638
|
}
|
|
639
639
|
return
|
|
640
640
|
}
|
|
@@ -735,7 +735,7 @@ return ff_compiler_Main.RunCommand(mainFile_, mainArguments_)
|
|
|
735
735
|
}
|
|
736
736
|
}
|
|
737
737
|
{
|
|
738
|
-
|
|
738
|
+
return ff_core_Core.throw_(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
739
|
}
|
|
740
740
|
}
|
|
741
741
|
return
|
|
@@ -753,10 +753,10 @@ return ff_compiler_Main.BrowserCommand(mainFile_)
|
|
|
753
753
|
}
|
|
754
754
|
}
|
|
755
755
|
if(_1.length >= 2) {
|
|
756
|
-
|
|
756
|
+
return ff_core_Core.throw_(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
757
|
}
|
|
758
758
|
{
|
|
759
|
-
|
|
759
|
+
return ff_core_Core.throw_(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
760
|
}
|
|
761
761
|
}
|
|
762
762
|
return
|
|
@@ -774,10 +774,10 @@ return ff_compiler_Main.BuildCommand(mainFile_)
|
|
|
774
774
|
}
|
|
775
775
|
}
|
|
776
776
|
if(_1.length >= 2) {
|
|
777
|
-
|
|
777
|
+
return ff_core_Core.throw_(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
778
|
}
|
|
779
779
|
{
|
|
780
|
-
|
|
780
|
+
return ff_core_Core.throw_(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
781
|
}
|
|
782
782
|
}
|
|
783
783
|
return
|
|
@@ -791,10 +791,10 @@ const fileName_ = _1[0];
|
|
|
791
791
|
return ff_compiler_Main.CheckCommand(fileName_)
|
|
792
792
|
}
|
|
793
793
|
if(_1.length >= 2) {
|
|
794
|
-
|
|
794
|
+
return ff_core_Core.throw_(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
795
|
}
|
|
796
796
|
{
|
|
797
|
-
|
|
797
|
+
return ff_core_Core.throw_(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
798
|
}
|
|
799
799
|
}
|
|
800
800
|
return
|
|
@@ -812,23 +812,23 @@ return ff_compiler_Main.SymbolsCommand(outName_, [fileName_, ...fileNames_])
|
|
|
812
812
|
}
|
|
813
813
|
}
|
|
814
814
|
{
|
|
815
|
-
|
|
815
|
+
return ff_core_Core.throw_(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
816
|
}
|
|
817
817
|
}
|
|
818
818
|
return
|
|
819
819
|
}
|
|
820
820
|
if(arguments_a.length === 2 && arguments_a[0] === "bootstrap") {
|
|
821
|
-
|
|
821
|
+
return ff_core_Core.throw_(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
822
|
}
|
|
823
823
|
if(arguments_a.length === 1 && arguments_a[0] === "bootstrap") {
|
|
824
824
|
return ff_compiler_Main.BootstrapCommand()
|
|
825
825
|
}
|
|
826
826
|
if(arguments_a.length === 0) {
|
|
827
|
-
|
|
827
|
+
return ff_core_Core.throw_(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
828
|
}
|
|
829
829
|
{
|
|
830
830
|
const s_ = arguments_a[0];
|
|
831
|
-
|
|
831
|
+
return ff_core_Core.throw_(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
832
|
}
|
|
833
833
|
}
|
|
834
834
|
|
|
@@ -1478,7 +1478,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
1478
1478
|
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
1479
|
}
|
|
1480
1480
|
{
|
|
1481
|
-
|
|
1481
|
+
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)
|
|
1482
1482
|
}
|
|
1483
1483
|
}
|
|
1484
1484
|
},
|
|
@@ -1571,7 +1571,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
1571
1571
|
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
1572
|
}
|
|
1573
1573
|
{
|
|
1574
|
-
|
|
1574
|
+
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)
|
|
1575
1575
|
}
|
|
1576
1576
|
}
|
|
1577
1577
|
}
|
|
@@ -1601,7 +1601,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
1601
1601
|
return ff_compiler_Main.CommandLineError(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_))
|
|
1602
1602
|
}
|
|
1603
1603
|
{
|
|
1604
|
-
|
|
1604
|
+
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)
|
|
1605
1605
|
}
|
|
1606
1606
|
}
|
|
1607
1607
|
},
|
|
@@ -1628,7 +1628,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
1628
1628
|
return ff_compiler_Main.CommandLineError(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_))
|
|
1629
1629
|
}
|
|
1630
1630
|
{
|
|
1631
|
-
|
|
1631
|
+
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)
|
|
1632
1632
|
}
|
|
1633
1633
|
}
|
|
1634
1634
|
}
|