firefly-compiler 0.4.31 → 0.4.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/bin/Release.ff +6 -0
  2. package/compiler/Builder.ff +15 -7
  3. package/compiler/Compiler.ff +13 -8
  4. package/compiler/Dependencies.ff +24 -17
  5. package/compiler/DependencyLock.ff +17 -0
  6. package/compiler/Deriver.ff +2 -1
  7. package/compiler/Dictionaries.ff +4 -4
  8. package/compiler/Environment.ff +3 -3
  9. package/compiler/Inference.ff +7 -7
  10. package/compiler/JsEmitter.ff +2 -2
  11. package/compiler/JsImporter.ff +2 -2
  12. package/compiler/LspHook.ff +2 -2
  13. package/compiler/Main.ff +22 -8
  14. package/compiler/ModuleCache.ff +6 -6
  15. package/compiler/Parser.ff +36 -36
  16. package/compiler/Resolver.ff +7 -7
  17. package/compiler/Syntax.ff +1 -1
  18. package/compiler/Tokenizer.ff +2 -2
  19. package/compiler/Unification.ff +3 -3
  20. package/compiler/Wildcards.ff +1 -1
  21. package/core/.firefly/include/package-lock.json +96 -96
  22. package/core/.firefly/include/package.json +1 -1
  23. package/core/Array.ff +2 -2
  24. package/core/Atomic.ff +1 -1
  25. package/core/Buffer.ff +1 -1
  26. package/core/Int.ff +2 -2
  27. package/core/IntMap.ff +4 -4
  28. package/core/Json.ff +5 -5
  29. package/core/List.ff +15 -15
  30. package/core/Map.ff +1 -1
  31. package/core/NodeSystem.ff +89 -0
  32. package/core/Option.ff +10 -3
  33. package/core/Random.ff +1 -1
  34. package/core/RbMap.ff +1 -1
  35. package/core/Serializable.ff +2 -2
  36. package/core/Set.ff +2 -2
  37. package/core/Stream.ff +4 -4
  38. package/core/StringMap.ff +4 -4
  39. package/experimental/random/Index.ff +53 -0
  40. package/experimental/random/MapTest.ff +2 -2
  41. package/experimental/random/Process.ff +120 -0
  42. package/experimental/random/RunLength.ff +2 -2
  43. package/experimental/random/Symbols.ff +2 -2
  44. package/lsp/CompletionHandler.ff +3 -6
  45. package/lsp/Handler.ff +45 -24
  46. package/lsp/LanguageServer.ff +13 -3
  47. package/lsp/SymbolHandler.ff +2 -2
  48. package/lsp/TestReferences.ff +2 -2
  49. package/lux/Lux.ff +6 -6
  50. package/output/js/ff/compiler/Builder.mjs +40 -28
  51. package/output/js/ff/compiler/Compiler.mjs +38 -14
  52. package/output/js/ff/compiler/Dependencies.mjs +30 -16
  53. package/output/js/ff/compiler/DependencyLock.mjs +128 -0
  54. package/output/js/ff/compiler/Deriver.mjs +4 -4
  55. package/output/js/ff/compiler/Dictionaries.mjs +8 -8
  56. package/output/js/ff/compiler/Environment.mjs +6 -6
  57. package/output/js/ff/compiler/Inference.mjs +12 -12
  58. package/output/js/ff/compiler/JsEmitter.mjs +4 -4
  59. package/output/js/ff/compiler/JsImporter.mjs +4 -4
  60. package/output/js/ff/compiler/LspHook.mjs +4 -4
  61. package/output/js/ff/compiler/Main.mjs +14 -12
  62. package/output/js/ff/compiler/ModuleCache.mjs +4 -4
  63. package/output/js/ff/compiler/Parser.mjs +72 -72
  64. package/output/js/ff/compiler/Resolver.mjs +14 -14
  65. package/output/js/ff/compiler/Syntax.mjs +2 -2
  66. package/output/js/ff/compiler/Tokenizer.mjs +4 -4
  67. package/output/js/ff/compiler/Unification.mjs +4 -4
  68. package/output/js/ff/compiler/Wildcards.mjs +2 -2
  69. package/output/js/ff/core/Array.mjs +5 -5
  70. package/output/js/ff/core/Atomic.mjs +3 -3
  71. package/output/js/ff/core/Buffer.mjs +3 -3
  72. package/output/js/ff/core/Int.mjs +4 -4
  73. package/output/js/ff/core/IntMap.mjs +9 -9
  74. package/output/js/ff/core/Json.mjs +10 -10
  75. package/output/js/ff/core/List.mjs +31 -31
  76. package/output/js/ff/core/Map.mjs +2 -2
  77. package/output/js/ff/core/NodeSystem.mjs +115 -0
  78. package/output/js/ff/core/Option.mjs +28 -2
  79. package/output/js/ff/core/Random.mjs +2 -2
  80. package/output/js/ff/core/RbMap.mjs +2 -2
  81. package/output/js/ff/core/Serializable.mjs +4 -4
  82. package/output/js/ff/core/Set.mjs +4 -4
  83. package/output/js/ff/core/Stream.mjs +8 -8
  84. package/output/js/ff/core/StringMap.mjs +9 -9
  85. package/package.json +1 -1
  86. package/postgresql/Pg.ff +2 -2
  87. package/rpc/Rpc.ff +3 -3
  88. package/vscode/package.json +1 -1
  89. package/webserver/WebServer.ff +2 -2
  90. package/httpserver/.firefly/package.ff +0 -1
  91. package/httpserver/HttpServer.ff +0 -184
@@ -121,7 +121,7 @@ export const coreImports_ = ff_core_List.List_map(["Any", "Array", "AssetSystem"
121
121
  return ff_compiler_Syntax.DImport(ff_compiler_Syntax.Location("<prelude>", 1, 1), moduleName_, ff_compiler_Syntax.PackagePair("ff", "core"), [], moduleName_)
122
122
  }));
123
123
 
124
- export function make_(emitTarget_, task_, compilerModulePath_, jsOutputPath_, resolvedDependencies_, virtualFiles_, cache_, lspHook_) {
124
+ export function new_(emitTarget_, task_, compilerModulePath_, jsOutputPath_, resolvedDependencies_, virtualFiles_, cache_, lspHook_) {
125
125
  return ff_compiler_Compiler.Compiler(emitTarget_, task_, compilerModulePath_, jsOutputPath_, resolvedDependencies_.packagePaths_, resolvedDependencies_.singleFilePackages_, virtualFiles_, cache_, lspHook_, 0.0, ff_core_List.List_toArray([]))
126
126
  }
127
127
 
@@ -129,7 +129,7 @@ export function fail_(at_, message_) {
129
129
  return ff_core_Core.panic_(((message_ + " ") + ff_compiler_Syntax.Location_show(at_)))
130
130
  }
131
131
 
132
- export async function make_$(emitTarget_, task_, compilerModulePath_, jsOutputPath_, resolvedDependencies_, virtualFiles_, cache_, lspHook_, $task) {
132
+ export async function new_$(emitTarget_, task_, compilerModulePath_, jsOutputPath_, resolvedDependencies_, virtualFiles_, cache_, lspHook_, $task) {
133
133
  return ff_compiler_Compiler.Compiler(emitTarget_, task_, compilerModulePath_, jsOutputPath_, resolvedDependencies_.packagePaths_, resolvedDependencies_.singleFilePackages_, virtualFiles_, cache_, lspHook_, 0.0, ff_core_List.List_toArray([]))
134
134
  }
135
135
 
@@ -178,7 +178,7 @@ const completionAt_ = ((ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_) &&
178
178
  ? ff_core_Option.Some(self_.lspHook_.at_)
179
179
  : ff_core_Option.None());
180
180
  const tokens_ = ff_compiler_Tokenizer.tokenize_(ff_core_Path.Path_absolute(path_), code_, completionAt_, ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_));
181
- const parser_ = ff_compiler_Parser.make_(packagePair_, ff_core_Path.Path_base(path_), tokens_, ff_core_Equal.notEquals_(self_.emitTarget_, ff_compiler_JsEmitter.EmitBrowser(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget), self_.lspHook_);
181
+ const parser_ = ff_compiler_Parser.new_(packagePair_, ff_core_Path.Path_base(path_), tokens_, ff_core_Equal.notEquals_(self_.emitTarget_, ff_compiler_JsEmitter.EmitBrowser(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget), self_.lspHook_);
182
182
  const module_ = (ff_core_Set.Set_contains(self_.singleFilePackages_, packagePair_, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair)
183
183
  ? ff_compiler_Parser.Parser_parseModuleWithPackageInfo(parser_).module_
184
184
  : ff_compiler_Parser.Parser_parseModuleWithoutPackageInfo(parser_));
@@ -199,7 +199,19 @@ return (_w1 + "/")
199
199
  if((!ff_core_Map.Map_contains(self_.packagePaths_, newPackagePair_, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair))) {
200
200
  throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(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)})
201
201
  };
202
+ try {
202
203
  return ff_compiler_Compiler.Compiler_parse(self_, newPackagePair_, newModuleName_, ff_core_Option.Some(import_.at_))
204
+ } catch(_error) {
205
+ if(!_error.ffException) throw _error
206
+ const _exception = ff_core_Any.fromAny_(_error.ffException, ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)
207
+ if(!_exception.Some) throw _error
208
+ {
209
+ const e_ = _exception.value_;
210
+ const error_ = _error;
211
+ const newError_ = ff_compiler_Syntax.CompileError(import_.at_, ((("Parse error in imported module: " + ff_compiler_Syntax.PackagePair_groupName(import_.package_, ":")) + "/") + newModuleName_));
212
+ throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileErrors([e_, newError_]), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileErrors)})
213
+ }
214
+ }
203
215
  }))
204
216
  }
205
217
 
@@ -208,7 +220,7 @@ return ff_compiler_ModuleCache.ModuleCache_cacheResolvedModule(self_.cache_, sel
208
220
  return ff_compiler_Compiler.Compiler_measure(self_, "Resolve", packagePair_, moduleName_, (() => {
209
221
  const module_ = ff_compiler_Compiler.Compiler_parse(self_, packagePair_, moduleName_, ff_core_Option.None());
210
222
  const otherModules_ = ff_compiler_Compiler.Compiler_imports(self_, module_);
211
- const resolver_ = ff_compiler_Resolver.make_(packagePair_, moduleName_, self_.lspHook_);
223
+ const resolver_ = ff_compiler_Resolver.new_(packagePair_, moduleName_, self_.lspHook_);
212
224
  return ff_compiler_Resolver.Resolver_resolveModule(resolver_, module_, otherModules_)
213
225
  }))
214
226
  }))
@@ -218,7 +230,7 @@ export function Compiler_derive(self_, packagePair_, moduleName_) {
218
230
  return ff_compiler_ModuleCache.ModuleCache_cacheDerivedModule(self_.cache_, self_.packagePaths_, packagePair_, moduleName_, ((path_) => {
219
231
  return ff_compiler_Compiler.Compiler_measure(self_, "Derive", packagePair_, moduleName_, (() => {
220
232
  const module_ = ff_compiler_Compiler.Compiler_resolve(self_, packagePair_, moduleName_);
221
- return ff_compiler_Deriver.Deriver_deriveModule(ff_compiler_Deriver.make_(), module_)
233
+ return ff_compiler_Deriver.Deriver_deriveModule(ff_compiler_Deriver.new_(), module_)
222
234
  }))
223
235
  }))
224
236
  }
@@ -230,9 +242,9 @@ const module_ = ff_compiler_Compiler.Compiler_derive(self_, packagePair_, module
230
242
  const otherModules_ = ff_core_List.List_map(ff_compiler_Compiler.Compiler_imports(self_, module_), ((i_) => {
231
243
  return ff_compiler_Compiler.Compiler_derive(self_, i_.packagePair_, ff_core_String.String_dropLast(i_.file_, ff_core_String.String_size(".ff")))
232
244
  }));
233
- const inference_ = ff_compiler_Inference.make_([module_, ...otherModules_], self_.lspHook_);
245
+ const inference_ = ff_compiler_Inference.new_([module_, ...otherModules_], self_.lspHook_);
234
246
  const inferredModule_ = ff_compiler_Inference.Inference_inferModule(inference_, module_, otherModules_);
235
- return ff_compiler_Dictionaries.Dictionaries_processModule(ff_compiler_Dictionaries.make_([module_, ...otherModules_]), inferredModule_, otherModules_)
247
+ return ff_compiler_Dictionaries.Dictionaries_processModule(ff_compiler_Dictionaries.new_([module_, ...otherModules_]), inferredModule_, otherModules_)
236
248
  }))
237
249
  }))
238
250
  }
@@ -247,7 +259,7 @@ ff_compiler_Compiler.Compiler_emit(self_, i_.packagePair_, newModuleName_, false
247
259
  return ff_compiler_Compiler.Compiler_infer(self_, i_.packagePair_, newModuleName_)
248
260
  }));
249
261
  const allModules_ = [module_, ...otherModules_];
250
- const js_ = ff_compiler_JsEmitter.JsEmitter_emitModule(ff_compiler_JsEmitter.make_(allModules_, self_.emitTarget_, isMainModule_, self_.compilerModulePath_, packagePair_, moduleName_), packagePair_, module_);
262
+ const js_ = ff_compiler_JsEmitter.JsEmitter_emitModule(ff_compiler_JsEmitter.new_(allModules_, self_.emitTarget_, isMainModule_, self_.compilerModulePath_, packagePair_, moduleName_), packagePair_, module_);
251
263
  const jsPath_ = ff_core_Path.Path_slash(ff_core_Path.Path_slash(self_.jsOutputPath_, packagePair_.group_), packagePair_.name_);
252
264
  const jsFile_ = ff_core_Path.Path_slash(jsPath_, (moduleName_ + ".mjs"));
253
265
  ff_core_Path.Path_createDirectory(jsPath_, true);
@@ -297,7 +309,7 @@ const completionAt_ = ((ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_) &&
297
309
  ? ff_core_Option.Some(self_.lspHook_.at_)
298
310
  : ff_core_Option.None());
299
311
  const tokens_ = ff_compiler_Tokenizer.tokenize_((await ff_core_Path.Path_absolute$(path_, $task)), code_, completionAt_, ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_));
300
- const parser_ = ff_compiler_Parser.make_(packagePair_, (await ff_core_Path.Path_base$(path_, $task)), tokens_, ff_core_Equal.notEquals_(self_.emitTarget_, ff_compiler_JsEmitter.EmitBrowser(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget), self_.lspHook_);
312
+ const parser_ = ff_compiler_Parser.new_(packagePair_, (await ff_core_Path.Path_base$(path_, $task)), tokens_, ff_core_Equal.notEquals_(self_.emitTarget_, ff_compiler_JsEmitter.EmitBrowser(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget), self_.lspHook_);
301
313
  const module_ = (ff_core_Set.Set_contains(self_.singleFilePackages_, packagePair_, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair)
302
314
  ? ff_compiler_Parser.Parser_parseModuleWithPackageInfo(parser_).module_
303
315
  : ff_compiler_Parser.Parser_parseModuleWithoutPackageInfo(parser_));
@@ -318,7 +330,19 @@ return (_w1 + "/")
318
330
  if((!ff_core_Map.Map_contains(self_.packagePaths_, newPackagePair_, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair))) {
319
331
  throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(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)})
320
332
  };
333
+ try {
321
334
  return (await ff_compiler_Compiler.Compiler_parse$(self_, newPackagePair_, newModuleName_, ff_core_Option.Some(import_.at_), $task))
335
+ } catch(_error) {
336
+ if(!_error.ffException) throw _error
337
+ const _exception = ff_core_Any.fromAny_(_error.ffException, ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)
338
+ if(!_exception.Some) throw _error
339
+ {
340
+ const e_ = _exception.value_;
341
+ const error_ = _error;
342
+ const newError_ = ff_compiler_Syntax.CompileError(import_.at_, ((("Parse error in imported module: " + ff_compiler_Syntax.PackagePair_groupName(import_.package_, ":")) + "/") + newModuleName_));
343
+ throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileErrors([e_, newError_]), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileErrors)})
344
+ }
345
+ }
322
346
  }), $task))
323
347
  }
324
348
 
@@ -327,7 +351,7 @@ return (await ff_compiler_ModuleCache.ModuleCache_cacheResolvedModule$(self_.cac
327
351
  return (await ff_compiler_Compiler.Compiler_measure$(self_, "Resolve", packagePair_, moduleName_, (async ($task) => {
328
352
  const module_ = (await ff_compiler_Compiler.Compiler_parse$(self_, packagePair_, moduleName_, ff_core_Option.None(), $task));
329
353
  const otherModules_ = (await ff_compiler_Compiler.Compiler_imports$(self_, module_, $task));
330
- const resolver_ = ff_compiler_Resolver.make_(packagePair_, moduleName_, self_.lspHook_);
354
+ const resolver_ = ff_compiler_Resolver.new_(packagePair_, moduleName_, self_.lspHook_);
331
355
  return ff_compiler_Resolver.Resolver_resolveModule(resolver_, module_, otherModules_)
332
356
  }), $task))
333
357
  }), $task))
@@ -337,7 +361,7 @@ export async function Compiler_derive$(self_, packagePair_, moduleName_, $task)
337
361
  return (await ff_compiler_ModuleCache.ModuleCache_cacheDerivedModule$(self_.cache_, self_.packagePaths_, packagePair_, moduleName_, (async (path_, $task) => {
338
362
  return (await ff_compiler_Compiler.Compiler_measure$(self_, "Derive", packagePair_, moduleName_, (async ($task) => {
339
363
  const module_ = (await ff_compiler_Compiler.Compiler_resolve$(self_, packagePair_, moduleName_, $task));
340
- return ff_compiler_Deriver.Deriver_deriveModule(ff_compiler_Deriver.make_(), module_)
364
+ return ff_compiler_Deriver.Deriver_deriveModule(ff_compiler_Deriver.new_(), module_)
341
365
  }), $task))
342
366
  }), $task))
343
367
  }
@@ -349,9 +373,9 @@ const module_ = (await ff_compiler_Compiler.Compiler_derive$(self_, packagePair_
349
373
  const otherModules_ = (await ff_core_List.List_map$((await ff_compiler_Compiler.Compiler_imports$(self_, module_, $task)), (async (i_, $task) => {
350
374
  return (await ff_compiler_Compiler.Compiler_derive$(self_, i_.packagePair_, ff_core_String.String_dropLast(i_.file_, ff_core_String.String_size(".ff")), $task))
351
375
  }), $task));
352
- const inference_ = ff_compiler_Inference.make_([module_, ...otherModules_], self_.lspHook_);
376
+ const inference_ = ff_compiler_Inference.new_([module_, ...otherModules_], self_.lspHook_);
353
377
  const inferredModule_ = ff_compiler_Inference.Inference_inferModule(inference_, module_, otherModules_);
354
- return ff_compiler_Dictionaries.Dictionaries_processModule(ff_compiler_Dictionaries.make_([module_, ...otherModules_]), inferredModule_, otherModules_)
378
+ return ff_compiler_Dictionaries.Dictionaries_processModule(ff_compiler_Dictionaries.new_([module_, ...otherModules_]), inferredModule_, otherModules_)
355
379
  }), $task))
356
380
  }), $task))
357
381
  }
@@ -366,7 +390,7 @@ const newModuleName_ = ff_core_String.String_dropLast(i_.file_, ff_core_String.S
366
390
  return (await ff_compiler_Compiler.Compiler_infer$(self_, i_.packagePair_, newModuleName_, $task))
367
391
  }), $task));
368
392
  const allModules_ = [module_, ...otherModules_];
369
- const js_ = (await ff_compiler_JsEmitter.JsEmitter_emitModule$((await ff_compiler_JsEmitter.make_$(allModules_, self_.emitTarget_, isMainModule_, self_.compilerModulePath_, packagePair_, moduleName_, $task)), packagePair_, module_, $task));
393
+ const js_ = (await ff_compiler_JsEmitter.JsEmitter_emitModule$((await ff_compiler_JsEmitter.new_$(allModules_, self_.emitTarget_, isMainModule_, self_.compilerModulePath_, packagePair_, moduleName_, $task)), packagePair_, module_, $task));
370
394
  const jsPath_ = (await ff_core_Path.Path_slash$((await ff_core_Path.Path_slash$(self_.jsOutputPath_, packagePair_.group_, $task)), packagePair_.name_, $task));
371
395
  const jsFile_ = (await ff_core_Path.Path_slash$(jsPath_, (moduleName_ + ".mjs"), $task));
372
396
  (await ff_core_Path.Path_createDirectory$(jsPath_, true, $task));
@@ -2,6 +2,8 @@ import * as import$0 from 'tar';
2
2
 
3
3
  import * as ff_compiler_Dependencies from "../../ff/compiler/Dependencies.mjs"
4
4
 
5
+ import * as ff_compiler_DependencyLock from "../../ff/compiler/DependencyLock.mjs"
6
+
5
7
  import * as ff_compiler_LspHook from "../../ff/compiler/LspHook.mjs"
6
8
 
7
9
  import * as ff_compiler_Parser from "../../ff/compiler/Parser.mjs"
@@ -112,12 +114,12 @@ return {mainPackagePair_, packages_, packagePaths_, singleFilePackages_};
112
114
 
113
115
 
114
116
 
115
- export function process_(fetch_, path_) {
117
+ export function process_(fetch_, dependencyLock_, path_) {
116
118
  const workspace_ = ff_compiler_Workspace.loadWorkspace_(path_);
117
119
  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));
118
120
  const packageInfo_ = ff_compiler_Dependencies.Dependencies_loadPackageInfo(self_, ff_compiler_Syntax.PackagePair("script", "script"), path_);
119
121
  const newDependencies_ = ff_compiler_Dependencies.Dependencies_processPackageInfo(self_, packageInfo_);
120
- ff_compiler_Dependencies.Dependencies_processDependencies(self_, path_, fetch_, newDependencies_);
122
+ ff_compiler_Dependencies.Dependencies_processDependencies(self_, path_, fetch_, dependencyLock_, newDependencies_);
121
123
  const packagePaths_ = ff_core_Map.Map_add(self_.packagePaths_, packageInfo_.package_.packagePair_, ff_compiler_Dependencies.findScriptPackageLocation_(path_), ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair);
122
124
  return ff_compiler_Dependencies.ResolvedDependencies(packageInfo_.package_.packagePair_, self_.packages_, packagePaths_, self_.singleFilePackages_)
123
125
  }
@@ -149,12 +151,12 @@ export function internalExtractTarGz_(tarGzPath_, path_) {
149
151
  throw new Error('Function internalExtractTarGz is missing on this target in sync context.');
150
152
  }
151
153
 
152
- export async function process_$(fetch_, path_, $task) {
154
+ export async function process_$(fetch_, dependencyLock_, path_, $task) {
153
155
  const workspace_ = (await ff_compiler_Workspace.loadWorkspace_$(path_, $task));
154
156
  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));
155
157
  const packageInfo_ = (await ff_compiler_Dependencies.Dependencies_loadPackageInfo$(self_, ff_compiler_Syntax.PackagePair("script", "script"), path_, $task));
156
158
  const newDependencies_ = (await ff_compiler_Dependencies.Dependencies_processPackageInfo$(self_, packageInfo_, $task));
157
- (await ff_compiler_Dependencies.Dependencies_processDependencies$(self_, path_, fetch_, newDependencies_, $task));
159
+ (await ff_compiler_Dependencies.Dependencies_processDependencies$(self_, path_, fetch_, dependencyLock_, newDependencies_, $task));
158
160
  const packagePaths_ = ff_core_Map.Map_add(self_.packagePaths_, packageInfo_.package_.packagePair_, (await ff_compiler_Dependencies.findScriptPackageLocation_$(path_, $task)), ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair);
159
161
  return ff_compiler_Dependencies.ResolvedDependencies(packageInfo_.package_.packagePair_, self_.packages_, packagePaths_, self_.singleFilePackages_)
160
162
  }
@@ -206,7 +208,7 @@ return ff_compiler_Dependencies.Dependencies_parsePackageFile(self_, packagePair
206
208
 
207
209
  export function Dependencies_parsePackageFile(self_, packagePair_, fileName_, code_) {
208
210
  const tokens_ = ff_compiler_Tokenizer.tokenize_(fileName_, code_, ff_core_Option.None(), true);
209
- const parser_ = ff_compiler_Parser.make_(packagePair_, fileName_, tokens_, false, ff_compiler_LspHook.disabled_());
211
+ const parser_ = ff_compiler_Parser.new_(packagePair_, fileName_, tokens_, false, ff_compiler_LspHook.disabled_());
210
212
  const info_ = ff_compiler_Parser.Parser_parsePackageInfo(parser_);
211
213
  return ff_compiler_Dependencies.Dependencies_addCoreDependencyIfMissing(self_, info_)
212
214
  }
@@ -235,7 +237,7 @@ return (!ff_core_Map.Map_contains(self_.packages_, _w1.packagePair_, ff_compiler
235
237
  }))
236
238
  }
237
239
 
238
- export function Dependencies_fetchDependency(self_, path_, httpClient_, dependency_) {
240
+ export function Dependencies_fetchDependency(self_, path_, httpClient_, dependencyLock_, dependency_) {
239
241
  const location_ = ff_compiler_Workspace.Workspace_findPackageLocation(self_.workspace_, dependency_.packagePair_, dependency_.version_);
240
242
  if((ff_core_String.String_contains(location_, ":") && (!ff_core_String.String_startsWith(ff_core_String.String_dropFirst(location_, 1), ":", 0)))) {
241
243
  if((ff_core_String.String_startsWith(location_, "http://", 0) || ff_core_String.String_startsWith(location_, "https://", 0))) {
@@ -248,6 +250,9 @@ const dependencyPath_ = ff_core_Path.Path_slash(ff_core_Path.Path_slash(dependen
248
250
  const tarGzPath_ = ff_core_Path.Path_slash(dependenciesPath_, ff_compiler_Workspace.tarGzName_(packagePair_, dependency_.version_));
249
251
  const donePath_ = ff_core_Path.Path_slash(dependenciesPath_, (ff_compiler_Workspace.tarGzName_(packagePair_, dependency_.version_) + ".done"));
250
252
  if((!ff_core_Path.Path_exists(donePath_, false, false, false))) {
253
+ ff_compiler_DependencyLock.DependencyLock_do(dependencyLock_, ff_core_Path.Path_absolute(donePath_), (() => {
254
+ if((!ff_core_Path.Path_exists(donePath_, false, false, false))) {
255
+ return ff_core_Option.Some((function() {
251
256
  ff_core_Log.trace_(("Fetching " + location_));
252
257
  const response_ = ff_core_HttpClient.HttpClient_fetch(httpClient_, location_, "GET", ff_core_HttpClient.emptyList_, ff_core_Option.None(), ff_core_HttpClient.RedirectFollow(), ff_core_Option.None(), ff_core_Option.None(), ff_core_Option.None(), ff_core_Option.None(), ff_core_Option.None(), false);
253
258
  if((!ff_core_HttpClient.FetchResponse_ok(response_))) {
@@ -260,7 +265,10 @@ ff_core_Path.Path_delete(dependencyPath_, 0, 100)
260
265
  ff_core_Path.Path_createDirectory(dependencyPath_, true);
261
266
  ff_core_Path.Path_writeStream(tarGzPath_, ff_core_List.List_toStream([buffer_], false), false);
262
267
  ff_compiler_Dependencies.internalExtractTarGz_(tarGzPath_, dependencyPath_);
263
- ff_core_Path.Path_renameTo(tarGzPath_, donePath_)
268
+ return ff_core_Path.Path_renameTo(tarGzPath_, donePath_)
269
+ })())
270
+ } else return ff_core_Option.None()
271
+ }))
264
272
  };
265
273
  return dependencyPath_
266
274
  } else {
@@ -271,9 +279,9 @@ return ff_core_Path.Path_path(path_, location_)
271
279
  }
272
280
  }
273
281
 
274
- export function Dependencies_processDependencies(self_, path_, httpClient_, dependencies_) {
282
+ export function Dependencies_processDependencies(self_, path_, httpClient_, dependencyLock_, dependencies_) {
275
283
  const packageInfos_ = ff_core_List.List_map(dependencies_, ((dependency_) => {
276
- const dependencyPath_ = ff_compiler_Dependencies.Dependencies_fetchDependency(self_, path_, httpClient_, dependency_);
284
+ const dependencyPath_ = ff_compiler_Dependencies.Dependencies_fetchDependency(self_, path_, httpClient_, dependencyLock_, dependency_);
277
285
  self_.packagePaths_ = ff_core_Map.Map_add(self_.packagePaths_, dependency_.packagePair_, dependencyPath_, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair);
278
286
  const packageInfo_ = ff_compiler_Dependencies.Dependencies_loadPackageInfo(self_, dependency_.packagePair_, dependencyPath_);
279
287
  ff_compiler_Dependencies.checkPackagePairs_(dependency_.packagePair_, packageInfo_.package_.packagePair_);
@@ -283,7 +291,7 @@ const newDependencies_ = ff_core_List.List_flatMap(packageInfos_, ((_w1) => {
283
291
  return ff_compiler_Dependencies.Dependencies_processPackageInfo(self_, _w1)
284
292
  }));
285
293
  if(ff_core_Equal.notEquals_(newDependencies_, [], ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_DDependency))) {
286
- ff_compiler_Dependencies.Dependencies_processDependencies(self_, path_, httpClient_, newDependencies_)
294
+ ff_compiler_Dependencies.Dependencies_processDependencies(self_, path_, httpClient_, dependencyLock_, newDependencies_)
287
295
  }
288
296
  }
289
297
 
@@ -304,7 +312,7 @@ return (await ff_compiler_Dependencies.Dependencies_parsePackageFile$(self_, pac
304
312
 
305
313
  export async function Dependencies_parsePackageFile$(self_, packagePair_, fileName_, code_, $task) {
306
314
  const tokens_ = ff_compiler_Tokenizer.tokenize_(fileName_, code_, ff_core_Option.None(), true);
307
- const parser_ = ff_compiler_Parser.make_(packagePair_, fileName_, tokens_, false, ff_compiler_LspHook.disabled_());
315
+ const parser_ = ff_compiler_Parser.new_(packagePair_, fileName_, tokens_, false, ff_compiler_LspHook.disabled_());
308
316
  const info_ = ff_compiler_Parser.Parser_parsePackageInfo(parser_);
309
317
  return (await ff_compiler_Dependencies.Dependencies_addCoreDependencyIfMissing$(self_, info_, $task))
310
318
  }
@@ -333,7 +341,7 @@ return (!ff_core_Map.Map_contains(self_.packages_, _w1.packagePair_, ff_compiler
333
341
  }))
334
342
  }
335
343
 
336
- export async function Dependencies_fetchDependency$(self_, path_, httpClient_, dependency_, $task) {
344
+ export async function Dependencies_fetchDependency$(self_, path_, httpClient_, dependencyLock_, dependency_, $task) {
337
345
  const location_ = ff_compiler_Workspace.Workspace_findPackageLocation(self_.workspace_, dependency_.packagePair_, dependency_.version_);
338
346
  if((ff_core_String.String_contains(location_, ":") && (!ff_core_String.String_startsWith(ff_core_String.String_dropFirst(location_, 1), ":", 0)))) {
339
347
  if((ff_core_String.String_startsWith(location_, "http://", 0) || ff_core_String.String_startsWith(location_, "https://", 0))) {
@@ -346,6 +354,9 @@ const dependencyPath_ = (await ff_core_Path.Path_slash$((await ff_core_Path.Path
346
354
  const tarGzPath_ = (await ff_core_Path.Path_slash$(dependenciesPath_, ff_compiler_Workspace.tarGzName_(packagePair_, dependency_.version_), $task));
347
355
  const donePath_ = (await ff_core_Path.Path_slash$(dependenciesPath_, (ff_compiler_Workspace.tarGzName_(packagePair_, dependency_.version_) + ".done"), $task));
348
356
  if((!(await ff_core_Path.Path_exists$(donePath_, false, false, false, $task)))) {
357
+ (await ff_compiler_DependencyLock.DependencyLock_do$(dependencyLock_, (await ff_core_Path.Path_absolute$(donePath_, $task)), (async ($task) => {
358
+ if((!(await ff_core_Path.Path_exists$(donePath_, false, false, false, $task)))) {
359
+ return ff_core_Option.Some((await (async function() {
349
360
  ff_core_Log.trace_(("Fetching " + location_));
350
361
  const response_ = (await ff_core_HttpClient.HttpClient_fetch$(httpClient_, location_, "GET", ff_core_HttpClient.emptyList_, ff_core_Option.None(), ff_core_HttpClient.RedirectFollow(), ff_core_Option.None(), ff_core_Option.None(), ff_core_Option.None(), ff_core_Option.None(), ff_core_Option.None(), false, $task));
351
362
  if((!(await ff_core_HttpClient.FetchResponse_ok$(response_, $task)))) {
@@ -358,7 +369,10 @@ if((await ff_core_Path.Path_exists$(dependencyPath_, false, false, false, $task)
358
369
  (await ff_core_Path.Path_createDirectory$(dependencyPath_, true, $task));
359
370
  (await ff_core_Path.Path_writeStream$(tarGzPath_, (await ff_core_List.List_toStream$([buffer_], false, $task)), false, $task));
360
371
  (await ff_compiler_Dependencies.internalExtractTarGz_$(tarGzPath_, dependencyPath_, $task));
361
- (await ff_core_Path.Path_renameTo$(tarGzPath_, donePath_, $task))
372
+ return (await ff_core_Path.Path_renameTo$(tarGzPath_, donePath_, $task))
373
+ })()))
374
+ } else return ff_core_Option.None()
375
+ }), $task))
362
376
  };
363
377
  return dependencyPath_
364
378
  } else {
@@ -369,9 +383,9 @@ return (await ff_core_Path.Path_path$(path_, location_, $task))
369
383
  }
370
384
  }
371
385
 
372
- export async function Dependencies_processDependencies$(self_, path_, httpClient_, dependencies_, $task) {
386
+ export async function Dependencies_processDependencies$(self_, path_, httpClient_, dependencyLock_, dependencies_, $task) {
373
387
  const packageInfos_ = (await ff_core_List.List_map$(dependencies_, (async (dependency_, $task) => {
374
- const dependencyPath_ = (await ff_compiler_Dependencies.Dependencies_fetchDependency$(self_, path_, httpClient_, dependency_, $task));
388
+ const dependencyPath_ = (await ff_compiler_Dependencies.Dependencies_fetchDependency$(self_, path_, httpClient_, dependencyLock_, dependency_, $task));
375
389
  self_.packagePaths_ = ff_core_Map.Map_add(self_.packagePaths_, dependency_.packagePair_, dependencyPath_, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair);
376
390
  const packageInfo_ = (await ff_compiler_Dependencies.Dependencies_loadPackageInfo$(self_, dependency_.packagePair_, dependencyPath_, $task));
377
391
  ff_compiler_Dependencies.checkPackagePairs_(dependency_.packagePair_, packageInfo_.package_.packagePair_);
@@ -381,7 +395,7 @@ const newDependencies_ = (await ff_core_List.List_flatMap$(packageInfos_, (async
381
395
  return (await ff_compiler_Dependencies.Dependencies_processPackageInfo$(self_, _w1, $task))
382
396
  }), $task));
383
397
  if(ff_core_Equal.notEquals_(newDependencies_, [], ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_DDependency))) {
384
- (await ff_compiler_Dependencies.Dependencies_processDependencies$(self_, path_, httpClient_, newDependencies_, $task))
398
+ (await ff_compiler_Dependencies.Dependencies_processDependencies$(self_, path_, httpClient_, dependencyLock_, newDependencies_, $task))
385
399
  }
386
400
  }
387
401
 
@@ -0,0 +1,128 @@
1
+
2
+
3
+ import * as ff_compiler_DependencyLock from "../../ff/compiler/DependencyLock.mjs"
4
+
5
+ import * as ff_core_Any from "../../ff/core/Any.mjs"
6
+
7
+ import * as ff_core_Array from "../../ff/core/Array.mjs"
8
+
9
+ import * as ff_core_AssetSystem from "../../ff/core/AssetSystem.mjs"
10
+
11
+ import * as ff_core_Atomic from "../../ff/core/Atomic.mjs"
12
+
13
+ import * as ff_core_Bool from "../../ff/core/Bool.mjs"
14
+
15
+ import * as ff_core_BrowserSystem from "../../ff/core/BrowserSystem.mjs"
16
+
17
+ import * as ff_core_Buffer from "../../ff/core/Buffer.mjs"
18
+
19
+ import * as ff_core_BuildSystem from "../../ff/core/BuildSystem.mjs"
20
+
21
+ import * as ff_core_Channel from "../../ff/core/Channel.mjs"
22
+
23
+ import * as ff_core_Char from "../../ff/core/Char.mjs"
24
+
25
+ import * as ff_core_Core from "../../ff/core/Core.mjs"
26
+
27
+ import * as ff_core_Duration from "../../ff/core/Duration.mjs"
28
+
29
+ import * as ff_core_Equal from "../../ff/core/Equal.mjs"
30
+
31
+ import * as ff_core_Error from "../../ff/core/Error.mjs"
32
+
33
+ import * as ff_core_FileHandle from "../../ff/core/FileHandle.mjs"
34
+
35
+ import * as ff_core_Float from "../../ff/core/Float.mjs"
36
+
37
+ import * as ff_core_HttpClient from "../../ff/core/HttpClient.mjs"
38
+
39
+ import * as ff_core_Instant from "../../ff/core/Instant.mjs"
40
+
41
+ import * as ff_core_Int from "../../ff/core/Int.mjs"
42
+
43
+ import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
44
+
45
+ import * as ff_core_JsSystem from "../../ff/core/JsSystem.mjs"
46
+
47
+ import * as ff_core_JsValue from "../../ff/core/JsValue.mjs"
48
+
49
+ import * as ff_core_Json from "../../ff/core/Json.mjs"
50
+
51
+ import * as ff_core_List from "../../ff/core/List.mjs"
52
+
53
+ import * as ff_core_Lock from "../../ff/core/Lock.mjs"
54
+
55
+ import * as ff_core_Log from "../../ff/core/Log.mjs"
56
+
57
+ import * as ff_core_Map from "../../ff/core/Map.mjs"
58
+
59
+ import * as ff_core_NodeSystem from "../../ff/core/NodeSystem.mjs"
60
+
61
+ import * as ff_core_Nothing from "../../ff/core/Nothing.mjs"
62
+
63
+ import * as ff_core_Option from "../../ff/core/Option.mjs"
64
+
65
+ import * as ff_core_Ordering from "../../ff/core/Ordering.mjs"
66
+
67
+ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
68
+
69
+ import * as ff_core_Path from "../../ff/core/Path.mjs"
70
+
71
+ import * as ff_core_Random from "../../ff/core/Random.mjs"
72
+
73
+ import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
74
+
75
+ import * as ff_core_Set from "../../ff/core/Set.mjs"
76
+
77
+ import * as ff_core_Show from "../../ff/core/Show.mjs"
78
+
79
+ import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
80
+
81
+ import * as ff_core_Stream from "../../ff/core/Stream.mjs"
82
+
83
+ import * as ff_core_String from "../../ff/core/String.mjs"
84
+
85
+ import * as ff_core_StringMap from "../../ff/core/StringMap.mjs"
86
+
87
+ import * as ff_core_Task from "../../ff/core/Task.mjs"
88
+
89
+ import * as ff_core_Try from "../../ff/core/Try.mjs"
90
+
91
+ import * as ff_core_Unit from "../../ff/core/Unit.mjs"
92
+
93
+ // type DependencyLock
94
+ export function DependencyLock(doneLocks_, task_) {
95
+ return {doneLocks_, task_};
96
+ }
97
+
98
+
99
+
100
+ export function new_(task_) {
101
+ return ff_compiler_DependencyLock.DependencyLock(ff_core_StringMap.new_(), task_)
102
+ }
103
+
104
+ export async function new_$(task_, $task) {
105
+ return ff_compiler_DependencyLock.DependencyLock(ff_core_StringMap.new_(), task_)
106
+ }
107
+
108
+ export function DependencyLock_do(self_, doneFile_, body_) {
109
+ const lock_ = ff_core_StringMap.StringMap_getOrSet(self_.doneLocks_, doneFile_, (() => {
110
+ return ff_core_Task.Task_lock(self_.task_)
111
+ }));
112
+ return ff_core_Lock.Lock_do(lock_, false, (() => {
113
+ return body_()
114
+ }))
115
+ }
116
+
117
+ export async function DependencyLock_do$(self_, doneFile_, body_, $task) {
118
+ const lock_ = (await ff_core_StringMap.StringMap_getOrSet$(self_.doneLocks_, doneFile_, (async ($task) => {
119
+ return (await ff_core_Task.Task_lock$(self_.task_, $task))
120
+ }), $task));
121
+ return (await ff_core_Lock.Lock_do$(lock_, false, (async ($task) => {
122
+ return (await body_($task))
123
+ }), $task))
124
+ }
125
+
126
+
127
+
128
+
@@ -100,7 +100,7 @@ return Deriver$;
100
100
 
101
101
 
102
102
 
103
- export function make_() {
103
+ export function new_() {
104
104
  return ff_compiler_Deriver.Deriver()
105
105
  }
106
106
 
@@ -108,7 +108,7 @@ export function fail_(at_, message_) {
108
108
  return ff_core_Core.panic_(((message_ + " ") + ff_compiler_Syntax.Location_show(at_)))
109
109
  }
110
110
 
111
- export async function make_$($task) {
111
+ export async function new_$($task) {
112
112
  return ff_compiler_Deriver.Deriver()
113
113
  }
114
114
 
@@ -128,7 +128,7 @@ return ff_compiler_Syntax.Module(_c.file_, _c.packagePair_, _c.imports_, _c.type
128
128
  }
129
129
 
130
130
  export function Deriver_makeHasAnyTagInstances(self_, modulePrefix_, module_) {
131
- const coreWhitelist_ = ff_core_List.List_toSet(["ff:core/Serializable.DeserializationChecksumException", "ff:core/Core.GrabException", "ff:core/Unit.Unit", "ff:core/Pair.Pair", "ff:core/Option.Option", "ff:core/Int.Int", "ff:core/Float.Float", "ff:core/String.String", "ff:core/Char.Char", "ff:core/Bool.Bool", "ff:core/List.List"], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String);
131
+ const coreWhitelist_ = ff_core_List.List_toSet(["ff:core/Serializable.DeserializationChecksumException", "ff:core/Core.GrabException", "ff:core/NodeSystem.ProcessException", "ff:core/Unit.Unit", "ff:core/Pair.Pair", "ff:core/Option.Option", "ff:core/Int.Int", "ff:core/Float.Float", "ff:core/String.String", "ff:core/Char.Char", "ff:core/Bool.Bool", "ff:core/List.List"], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String);
132
132
  const missingInstance_ = ff_compiler_Deriver.Deriver_findTypesThatNeedInstances(self_, "ff:core/Any.HasAnyTag", modulePrefix_, coreWhitelist_, true, module_);
133
133
  return ff_core_List.List_map(missingInstance_, ((_w1) => {
134
134
  return ff_compiler_Deriver.Deriver_makeHasAnyTagInstance(self_, modulePrefix_, _w1)
@@ -530,7 +530,7 @@ return ff_compiler_Syntax.Module(_c.file_, _c.packagePair_, _c.imports_, _c.type
530
530
  }
531
531
 
532
532
  export async function Deriver_makeHasAnyTagInstances$(self_, modulePrefix_, module_, $task) {
533
- const coreWhitelist_ = ff_core_List.List_toSet(["ff:core/Serializable.DeserializationChecksumException", "ff:core/Core.GrabException", "ff:core/Unit.Unit", "ff:core/Pair.Pair", "ff:core/Option.Option", "ff:core/Int.Int", "ff:core/Float.Float", "ff:core/String.String", "ff:core/Char.Char", "ff:core/Bool.Bool", "ff:core/List.List"], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String);
533
+ const coreWhitelist_ = ff_core_List.List_toSet(["ff:core/Serializable.DeserializationChecksumException", "ff:core/Core.GrabException", "ff:core/NodeSystem.ProcessException", "ff:core/Unit.Unit", "ff:core/Pair.Pair", "ff:core/Option.Option", "ff:core/Int.Int", "ff:core/Float.Float", "ff:core/String.String", "ff:core/Char.Char", "ff:core/Bool.Bool", "ff:core/List.List"], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String);
534
534
  const missingInstance_ = ff_compiler_Deriver.Deriver_findTypesThatNeedInstances(self_, "ff:core/Any.HasAnyTag", modulePrefix_, coreWhitelist_, true, module_);
535
535
  return ff_core_List.List_map(missingInstance_, ((_w1) => {
536
536
  return ff_compiler_Deriver.Deriver_makeHasAnyTagInstance(self_, modulePrefix_, _w1)
@@ -103,8 +103,8 @@ return {instances_};
103
103
 
104
104
 
105
105
 
106
- export function make_(modules_) {
107
- return ff_compiler_Dictionaries.Dictionaries(ff_compiler_Unification.make_(modules_, false).instances_)
106
+ export function new_(modules_) {
107
+ return ff_compiler_Dictionaries.Dictionaries(ff_compiler_Unification.new_(modules_, false).instances_)
108
108
  }
109
109
 
110
110
  export function fail_(at_, message_) {
@@ -127,8 +127,8 @@ return ff_core_Pair.Pair(ff_compiler_Unification.InstanceKey(c_.name_, typeName_
127
127
  })), ff_compiler_Unification.ff_core_Ordering_Order$ff_compiler_Unification_InstanceKey)
128
128
  }
129
129
 
130
- export async function make_$(modules_, $task) {
131
- return ff_compiler_Dictionaries.Dictionaries(ff_compiler_Unification.make_(modules_, false).instances_)
130
+ export async function new_$(modules_, $task) {
131
+ return ff_compiler_Dictionaries.Dictionaries(ff_compiler_Unification.new_(modules_, false).instances_)
132
132
  }
133
133
 
134
134
  export async function fail_$(at_, message_, $task) {
@@ -152,7 +152,7 @@ return ff_core_Pair.Pair(ff_compiler_Unification.InstanceKey(c_.name_, typeName_
152
152
  }
153
153
 
154
154
  export function Dictionaries_processModule(self_, module_, otherModules_) {
155
- const environment_ = ff_compiler_Environment.make_(module_, otherModules_, true);
155
+ const environment_ = ff_compiler_Environment.new_(module_, otherModules_, true);
156
156
  const functionSignatures_ = ff_core_List.List_toMap(ff_core_List.List_collect(ff_core_Map.Map_pairs(environment_.symbols_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ((_1) => {
157
157
  {
158
158
  const name_ = _1.first_;
@@ -529,7 +529,7 @@ return ff_compiler_Syntax.Field(_c.at_, _c.name_, ff_compiler_Dictionaries.Dicti
529
529
 
530
530
  export function Dictionaries_makeDictionary(self_, at_, typeParameters_, typeArguments_, constraint_) {
531
531
  const instantiationMap_ = ff_core_List.List_toMap(ff_core_List.List_zip(typeParameters_, typeArguments_), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String);
532
- const unification_ = ff_compiler_Unification.make_([], false);
532
+ const unification_ = ff_compiler_Unification.new_([], false);
533
533
  const newGenerics_ = ff_core_List.List_map(constraint_.generics_, ((_w1) => {
534
534
  return ff_compiler_Unification.Unification_instantiate(unification_, instantiationMap_, _w1)
535
535
  }));
@@ -553,7 +553,7 @@ return ff_compiler_Dictionaries.fail_(t_.at_, " is still a unification variable"
553
553
  }
554
554
 
555
555
  export async function Dictionaries_processModule$(self_, module_, otherModules_, $task) {
556
- const environment_ = ff_compiler_Environment.make_(module_, otherModules_, true);
556
+ const environment_ = ff_compiler_Environment.new_(module_, otherModules_, true);
557
557
  const functionSignatures_ = ff_core_List.List_toMap(ff_core_List.List_collect(ff_core_Map.Map_pairs(environment_.symbols_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ((_1) => {
558
558
  {
559
559
  const name_ = _1.first_;
@@ -930,7 +930,7 @@ return ff_compiler_Syntax.Field(_c.at_, _c.name_, ff_compiler_Dictionaries.Dicti
930
930
 
931
931
  export async function Dictionaries_makeDictionary$(self_, at_, typeParameters_, typeArguments_, constraint_, $task) {
932
932
  const instantiationMap_ = ff_core_List.List_toMap(ff_core_List.List_zip(typeParameters_, typeArguments_), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String);
933
- const unification_ = ff_compiler_Unification.make_([], false);
933
+ const unification_ = ff_compiler_Unification.new_([], false);
934
934
  const newGenerics_ = ff_core_List.List_map(constraint_.generics_, ((_w1) => {
935
935
  return ff_compiler_Unification.Unification_instantiate(unification_, instantiationMap_, _w1)
936
936
  }));
@@ -109,18 +109,18 @@ return {typeArguments_, scheme_};
109
109
 
110
110
 
111
111
 
112
- export function make_(module_, otherModules_, alreadyFlat_) {
112
+ export function new_(module_, otherModules_, alreadyFlat_) {
113
113
  const processed_ = ff_compiler_Environment.processModule_(module_, true, alreadyFlat_);
114
114
  const otherProcessed_ = ff_core_List.List_map(otherModules_, ((_w1) => {
115
115
  return ff_compiler_Environment.processModule_(_w1, false, false)
116
116
  }));
117
117
  return ff_compiler_Environment.Environment(ff_compiler_Environment.fullName_(module_, ""), ff_core_Map.Map_addAll(processed_.symbols_, ff_core_List.List_foldLeft(ff_core_List.List_map(otherProcessed_, ((_w1) => {
118
118
  return _w1.symbols_
119
- })), ff_core_Map.empty_(), ((_w1, _w2) => {
119
+ })), ff_core_Map.new_(), ((_w1, _w2) => {
120
120
  return ff_core_Map.Map_addAll(_w1, _w2, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)
121
121
  })), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_Map.Map_addAll(processed_.traits_, ff_core_List.List_foldLeft(ff_core_List.List_map(otherProcessed_, ((_w1) => {
122
122
  return _w1.traits_
123
- })), ff_core_Map.empty_(), ((_w1, _w2) => {
123
+ })), ff_core_Map.new_(), ((_w1, _w2) => {
124
124
  return ff_core_Map.Map_addAll(_w1, _w2, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)
125
125
  })), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_List.List_toMap(ff_core_List.List_map(module_.imports_, ((i_) => {
126
126
  return ff_core_Pair.Pair(i_.alias_, i_)
@@ -220,18 +220,18 @@ const effect_ = ff_compiler_Syntax.TConstructor(ff_compiler_Syntax.Location(modu
220
220
  return ff_compiler_Environment.Environment("", ff_core_List.List_toMap([...functions_, ...lets_, ...fields_, ...extends_, ...variants_, ...traitMethods_], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_List.List_toMap(traits_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_List.List_toMap([], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), effect_, ff_core_Option.None())
221
221
  }
222
222
 
223
- export async function make_$(module_, otherModules_, alreadyFlat_, $task) {
223
+ export async function new_$(module_, otherModules_, alreadyFlat_, $task) {
224
224
  const processed_ = ff_compiler_Environment.processModule_(module_, true, alreadyFlat_);
225
225
  const otherProcessed_ = ff_core_List.List_map(otherModules_, ((_w1) => {
226
226
  return ff_compiler_Environment.processModule_(_w1, false, false)
227
227
  }));
228
228
  return ff_compiler_Environment.Environment(ff_compiler_Environment.fullName_(module_, ""), ff_core_Map.Map_addAll(processed_.symbols_, ff_core_List.List_foldLeft(ff_core_List.List_map(otherProcessed_, ((_w1) => {
229
229
  return _w1.symbols_
230
- })), ff_core_Map.empty_(), ((_w1, _w2) => {
230
+ })), ff_core_Map.new_(), ((_w1, _w2) => {
231
231
  return ff_core_Map.Map_addAll(_w1, _w2, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)
232
232
  })), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_Map.Map_addAll(processed_.traits_, ff_core_List.List_foldLeft(ff_core_List.List_map(otherProcessed_, ((_w1) => {
233
233
  return _w1.traits_
234
- })), ff_core_Map.empty_(), ((_w1, _w2) => {
234
+ })), ff_core_Map.new_(), ((_w1, _w2) => {
235
235
  return ff_core_Map.Map_addAll(_w1, _w2, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)
236
236
  })), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_List.List_toMap(ff_core_List.List_map(module_.imports_, ((i_) => {
237
237
  return ff_core_Pair.Pair(i_.alias_, i_)