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
@@ -1,5 +1,7 @@
1
1
  import * as import$0 from 'fs/promises';
2
2
 
3
+ import * as import$3 from 'node:child_process';
4
+
3
5
  import * as import$1 from 'path';
4
6
 
5
7
  import * as import$2 from 'url';
@@ -95,6 +97,16 @@ import * as ff_core_Unit from "../../ff/core/Unit.mjs"
95
97
  // type NodeSystem
96
98
 
97
99
 
100
+ // type ProcessResult
101
+ export function ProcessResult(exitCode_, standardOut_, standardError_) {
102
+ return {exitCode_, standardOut_, standardError_};
103
+ }
104
+
105
+ // type ProcessException
106
+ export function ProcessException(problem_) {
107
+ return {problem_};
108
+ }
109
+
98
110
 
99
111
 
100
112
  export function internalAssets_(system_) {
@@ -105,6 +117,14 @@ export function internalListDirectoryWithoutOpendir_(system_, path_) {
105
117
  throw new Error('Function internalListDirectoryWithoutOpendir is missing on this target in sync context.');
106
118
  }
107
119
 
120
+ export function internalProcessError_(problem_) {
121
+ return ff_core_Try.Try_grab(ff_core_Try.Try_catchAny(ff_core_Core.try_((() => {
122
+ throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_NodeSystem.ProcessException(problem_), ff_core_NodeSystem.ff_core_Any_HasAnyTag$ff_core_NodeSystem_ProcessException)})
123
+ })), ((error_) => {
124
+ return error_
125
+ })))
126
+ }
127
+
108
128
  export async function internalAssets_$(system_, $task) {
109
129
  return system_.assets_
110
130
  }
@@ -118,6 +138,14 @@ export async function internalListDirectoryWithoutOpendir_$(system_, path_, $tas
118
138
 
119
139
  }
120
140
 
141
+ export async function internalProcessError_$(problem_, $task) {
142
+ return ff_core_Try.Try_grab(ff_core_Try.Try_catchAny(ff_core_Core.try_((() => {
143
+ throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_NodeSystem.ProcessException(problem_), ff_core_NodeSystem.ff_core_Any_HasAnyTag$ff_core_NodeSystem_ProcessException)})
144
+ })), ((error_) => {
145
+ return error_
146
+ })))
147
+ }
148
+
121
149
  export function NodeSystem_arguments(self_) {
122
150
  throw new Error('Function NodeSystem_arguments is missing on this target in sync context.');
123
151
  }
@@ -206,6 +234,14 @@ export function NodeSystem_writeErrorLine(self_, text_) {
206
234
  ff_core_NodeSystem.NodeSystem_writeErrorText(self_, (text_ + "\n"))
207
235
  }
208
236
 
237
+ export function NodeSystem_environment(self_) {
238
+ throw new Error('Function NodeSystem_environment is missing on this target in sync context.');
239
+ }
240
+
241
+ export function NodeSystem_execute(self_, command_, arguments_, standardIn_ = ff_core_Buffer.new_(0), workingDirectory_ = ff_core_Option.None(), environment_ = ff_core_Option.None(), maxBuffer_ = 16777216, killSignal_ = 9) {
242
+ throw new Error('Function NodeSystem_execute is missing on this target in sync context.');
243
+ }
244
+
209
245
  export async function NodeSystem_arguments$(self_, $task) {
210
246
  return self_.array_
211
247
  }
@@ -302,6 +338,85 @@ export async function NodeSystem_writeErrorLine$(self_, text_, $task) {
302
338
  (await ff_core_NodeSystem.NodeSystem_writeErrorText$(self_, (text_ + "\n"), $task))
303
339
  }
304
340
 
341
+ export async function NodeSystem_environment$(self_, $task) {
342
+
343
+ const result = [];
344
+ for(const key in process.env) {
345
+ result.push(ff_core_Pair.Pair(key, process.env[key]));
346
+ }
347
+ return ff_core_List.List_toMap(result, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String);
348
+
349
+ }
305
350
 
351
+ export async function NodeSystem_execute$(self_, command_, arguments_, standardIn_ = ff_core_Buffer.new_(0), workingDirectory_ = ff_core_Option.None(), environment_ = ff_core_Option.None(), maxBuffer_ = 16777216, killSignal_ = 9, $task) {
352
+
353
+ const childProcess = import$3;
354
+ const environment = environment_.value_ !== void 0 ? {} : process.env;
355
+ if(environment_.value_ !== void 0) {
356
+ ff_core_Map.Map_each(
357
+ environment_.value_,
358
+ (k, v) => environment[k] = v,
359
+ ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String
360
+ );
361
+ }
362
+ const newProcess = childProcess.spawn(command_, arguments_, {
363
+ cwd: workingDirectory_.value_,
364
+ windowsHide: true,
365
+ signal: $task.controller.signal,
366
+ killSignal: killSignal_,
367
+ env: environment,
368
+ });
369
+
370
+ let size = 0;
371
+ const out = [];
372
+ const err = [];
373
+
374
+ newProcess.stdout.on('data', (data) => {
375
+ if(size > maxBuffer_) return;
376
+ size += data.byteLength;
377
+ if(size > maxBuffer_) newProcess.kill(killSignal_);
378
+ else out.push(data);
379
+ });
380
+
381
+ newProcess.stderr.on('data', (data) => {
382
+ if(size > maxBuffer_) return;
383
+ size += data.byteLength;
384
+ if(size > maxBuffer_) newProcess.kill(killSignal_);
385
+ else err.push(data);
386
+ });
387
+
388
+ return await new Promise((resolve, reject) => {
389
+ if(standardIn_.byteLength !== 0) {
390
+ newProcess.stdin.write(standardIn_);
391
+ }
392
+ newProcess.stdin.end();
393
+ newProcess.on('error', error => {
394
+ if(size > maxBuffer_) {
395
+ reject(internalProcessError_("maxBuffer exceeded"));
396
+ } else {
397
+ reject(internalProcessError_(error.message));
398
+ }
399
+ });
400
+ newProcess.on('close', code => {
401
+ const o = Buffer.concat(out);
402
+ const e = Buffer.concat(err);
403
+ resolve(ProcessResult(
404
+ size > maxBuffer_ ? -1 : code,
405
+ new DataView(o.buffer, o.byteOffset, o.byteLength),
406
+ new DataView(e.buffer, e.byteOffset, e.byteLength),
407
+ ));
408
+ });
409
+ });
410
+
411
+ }
412
+
413
+ export const ff_core_Any_HasAnyTag$ff_core_NodeSystem_ProcessException = {
414
+ anyTag_() {
415
+ return ff_core_Any.internalAnyTag_((("ff:core/NodeSystem.ProcessException" + "[") + "]"))
416
+ },
417
+ async anyTag_$($task) {
418
+ return ff_core_Any.internalAnyTag_((("ff:core/NodeSystem.ProcessException" + "[") + "]"))
419
+ }
420
+ };
306
421
 
307
422
 
@@ -149,6 +149,19 @@ return self_
149
149
  }
150
150
  }
151
151
 
152
+ export function Option_or(self_, noneBody_, someBody_) {
153
+ {
154
+ const _1 = self_;
155
+ if(_1.None) {
156
+ return noneBody_()
157
+ }
158
+ if(_1.Some) {
159
+ const value_ = _1.value_;
160
+ return someBody_(value_)
161
+ }
162
+ }
163
+ }
164
+
152
165
  export function Option_isEmpty(self_) {
153
166
  {
154
167
  const _1 = self_;
@@ -180,7 +193,7 @@ return ff_core_List.List_toArray(ff_core_Option.Option_toList(self_))
180
193
 
181
194
  export function Option_toStream(self_, cycle_ = false) {
182
195
  let next_ = self_;
183
- return ff_core_Stream.make_((() => {
196
+ return ff_core_Stream.new_((() => {
184
197
  const result_ = next_;
185
198
  if((!cycle_)) {
186
199
  next_ = ff_core_Option.None()
@@ -332,6 +345,19 @@ return self_
332
345
  }
333
346
  }
334
347
 
348
+ export async function Option_or$(self_, noneBody_, someBody_, $task) {
349
+ {
350
+ const _1 = self_;
351
+ if(_1.None) {
352
+ return (await noneBody_($task))
353
+ }
354
+ if(_1.Some) {
355
+ const value_ = _1.value_;
356
+ return (await someBody_(value_, $task))
357
+ }
358
+ }
359
+ }
360
+
335
361
  export async function Option_isEmpty$(self_, $task) {
336
362
  {
337
363
  const _1 = self_;
@@ -363,7 +389,7 @@ return ff_core_List.List_toArray(ff_core_Option.Option_toList(self_))
363
389
 
364
390
  export async function Option_toStream$(self_, cycle_ = false, $task) {
365
391
  let next_ = self_;
366
- return (await ff_core_Stream.make_$((async ($task) => {
392
+ return (await ff_core_Stream.new_$((async ($task) => {
367
393
  const result_ = next_;
368
394
  if((!cycle_)) {
369
395
  next_ = ff_core_Option.None()
@@ -98,7 +98,7 @@ return ff_core_Random.seedFloat_(ff_core_Int.Int_toFloat(seed_))
98
98
  }
99
99
 
100
100
  export function seedFloat_(seed_) {
101
- const buffer_ = ff_core_Buffer.make_(8, false);
101
+ const buffer_ = ff_core_Buffer.new_(8, false);
102
102
  ff_core_Buffer.Buffer_setFloat64(buffer_, 0, seed_, true);
103
103
  return ff_core_Random.seedBuffer_(buffer_)
104
104
  }
@@ -146,7 +146,7 @@ return ff_core_Random.seedFloat_(ff_core_Int.Int_toFloat(seed_))
146
146
  }
147
147
 
148
148
  export async function seedFloat_$(seed_, $task) {
149
- const buffer_ = ff_core_Buffer.make_(8, false);
149
+ const buffer_ = ff_core_Buffer.new_(8, false);
150
150
  ff_core_Buffer.Buffer_setFloat64(buffer_, 0, seed_, true);
151
151
  return ff_core_Random.seedBuffer_(buffer_)
152
152
  }
@@ -1072,7 +1072,7 @@ return
1072
1072
  return
1073
1073
  }
1074
1074
  }
1075
- return ff_core_Stream.make_((() => {
1075
+ return ff_core_Stream.new_((() => {
1076
1076
  return next_()
1077
1077
  }), (() => {
1078
1078
 
@@ -1265,7 +1265,7 @@ return
1265
1265
  return
1266
1266
  }
1267
1267
  }
1268
- return (await ff_core_Stream.make_$((async ($task) => {
1268
+ return (await ff_core_Stream.new_$((async ($task) => {
1269
1269
  return next_()
1270
1270
  }), (async ($task) => {
1271
1271
 
@@ -102,7 +102,7 @@ return {buffer_, offset_, checksum_};
102
102
 
103
103
 
104
104
  export function serialize_(value_, initialBufferSize_ = 1024, ff_core_Serializable_Serializable$T) {
105
- const serialization_ = ff_core_Serializable.Serialization(ff_core_Buffer.make_(initialBufferSize_, false), 0, 0);
105
+ const serialization_ = ff_core_Serializable.Serialization(ff_core_Buffer.new_(initialBufferSize_, false), 0, 0);
106
106
  ff_core_Serializable_Serializable$T.serializeUsing_(serialization_, value_);
107
107
  ff_core_Serializable.Serialization_autoResize(serialization_, 4);
108
108
  ff_core_Buffer.Buffer_setInt32(serialization_.buffer_, serialization_.offset_, serialization_.checksum_, true);
@@ -139,7 +139,7 @@ export function internalGrabLatin1_(self_, byteOffset_, size_) {
139
139
  }
140
140
 
141
141
  export async function serialize_$(value_, initialBufferSize_ = 1024, ff_core_Serializable_Serializable$T, $task) {
142
- const serialization_ = ff_core_Serializable.Serialization(ff_core_Buffer.make_(initialBufferSize_, false), 0, 0);
142
+ const serialization_ = ff_core_Serializable.Serialization(ff_core_Buffer.new_(initialBufferSize_, false), 0, 0);
143
143
  ff_core_Serializable_Serializable$T.serializeUsing_(serialization_, value_);
144
144
  ff_core_Serializable.Serialization_autoResize(serialization_, 4);
145
145
  ff_core_Buffer.Buffer_setInt32(serialization_.buffer_, serialization_.offset_, serialization_.checksum_, true);
@@ -168,7 +168,7 @@ throw new Error('Function internalGrabLatin1 is missing on this target in async
168
168
  export function Serialization_autoResize(self_, minSpareCapacity_) {
169
169
  if(((self_.offset_ + minSpareCapacity_) > ff_core_Buffer.Buffer_size(self_.buffer_))) {
170
170
  const minSize_ = (ff_core_Buffer.Buffer_size(self_.buffer_) + minSpareCapacity_);
171
- const newBuffer_ = ff_core_Buffer.make_(ff_core_Int.Int_max((ff_core_Buffer.Buffer_size(self_.buffer_) * 2), minSize_), false);
171
+ const newBuffer_ = ff_core_Buffer.new_(ff_core_Int.Int_max((ff_core_Buffer.Buffer_size(self_.buffer_) * 2), minSize_), false);
172
172
  ff_core_Buffer.Buffer_setAll(newBuffer_, 0, self_.buffer_);
173
173
  self_.buffer_ = newBuffer_
174
174
  }
@@ -177,7 +177,7 @@ self_.buffer_ = newBuffer_
177
177
  export async function Serialization_autoResize$(self_, minSpareCapacity_, $task) {
178
178
  if(((self_.offset_ + minSpareCapacity_) > ff_core_Buffer.Buffer_size(self_.buffer_))) {
179
179
  const minSize_ = (ff_core_Buffer.Buffer_size(self_.buffer_) + minSpareCapacity_);
180
- const newBuffer_ = ff_core_Buffer.make_(ff_core_Int.Int_max((ff_core_Buffer.Buffer_size(self_.buffer_) * 2), minSize_), false);
180
+ const newBuffer_ = ff_core_Buffer.new_(ff_core_Int.Int_max((ff_core_Buffer.Buffer_size(self_.buffer_) * 2), minSize_), false);
181
181
  ff_core_Buffer.Buffer_setAll(newBuffer_, 0, self_.buffer_);
182
182
  self_.buffer_ = newBuffer_
183
183
  }
@@ -92,12 +92,12 @@ import * as ff_core_Unit from "../../ff/core/Unit.mjs"
92
92
 
93
93
 
94
94
 
95
- export function empty_() {
96
- return ff_core_Map.empty_()
95
+ export function new_() {
96
+ return ff_core_Map.new_()
97
97
  }
98
98
 
99
- export async function empty_$($task) {
100
- return ff_core_Map.empty_()
99
+ export async function new_$($task) {
100
+ return ff_core_Map.new_()
101
101
  }
102
102
 
103
103
  export function Set_add(self_, value_, ff_core_Ordering_Order$T) {
@@ -95,7 +95,7 @@ return {next_, close_};
95
95
 
96
96
 
97
97
 
98
- export function make_(next_, close_ = (() => {
98
+ export function new_(next_, close_ = (() => {
99
99
 
100
100
  })) {
101
101
  return ff_core_Stream.Stream(next_, close_)
@@ -122,7 +122,7 @@ stream_.close_()
122
122
  }))
123
123
  }
124
124
 
125
- export async function make_$(next_, close_ = (async ($task) => {
125
+ export async function new_$(next_, close_ = (async ($task) => {
126
126
 
127
127
  }), $task) {
128
128
  return ff_core_Stream.Stream(next_, close_)
@@ -595,7 +595,7 @@ return result_
595
595
  }
596
596
 
597
597
  export function Stream_toArray(self_) {
598
- const array_ = ff_core_Array.make_();
598
+ const array_ = ff_core_Array.new_();
599
599
  ff_core_Stream.Stream_each(self_, ((_w1) => {
600
600
  ff_core_Array.Array_push(array_, _w1)
601
601
  }));
@@ -1052,7 +1052,7 @@ return result_
1052
1052
  }
1053
1053
 
1054
1054
  export async function Stream_toArray$(self_, $task) {
1055
- const array_ = ff_core_Array.make_();
1055
+ const array_ = ff_core_Array.new_();
1056
1056
  (await ff_core_Stream.Stream_each$(self_, (async (_w1, $task) => {
1057
1057
  ff_core_Array.Array_push(array_, _w1)
1058
1058
  }), $task));
@@ -1092,7 +1092,7 @@ return ff_core_List.List_toMap((await ff_core_Stream.Stream_toList$(self_, $task
1092
1092
  }
1093
1093
 
1094
1094
  export function Stream_toBuffer(self_) {
1095
- const builder_ = ff_core_Array.make_();
1095
+ const builder_ = ff_core_Array.new_();
1096
1096
  ff_core_Stream.Stream_each(self_, ((_w1) => {
1097
1097
  ff_core_Array.Array_push(builder_, _w1)
1098
1098
  }));
@@ -1107,7 +1107,7 @@ export function Stream_readBytes(self_, bytes_) {
1107
1107
  if((bytes_ <= 0)) {
1108
1108
  return ff_core_Pair.Pair([], self_)
1109
1109
  } else {
1110
- const buffers_ = ff_core_Array.make_();
1110
+ const buffers_ = ff_core_Array.new_();
1111
1111
  let buffer_ = ff_core_Option.Option_grab(self_.next_());
1112
1112
  let taken_ = 0;
1113
1113
  let remainder_ = ff_core_Option.None();
@@ -1127,7 +1127,7 @@ return ff_core_Pair.Pair(ff_core_Array.Array_drain(buffers_), ff_core_Stream.Str
1127
1127
  }
1128
1128
 
1129
1129
  export async function Stream_toBuffer$(self_, $task) {
1130
- const builder_ = ff_core_Array.make_();
1130
+ const builder_ = ff_core_Array.new_();
1131
1131
  (await ff_core_Stream.Stream_each$(self_, (async (_w1, $task) => {
1132
1132
  ff_core_Array.Array_push(builder_, _w1)
1133
1133
  }), $task));
@@ -1142,7 +1142,7 @@ export async function Stream_readBytes$(self_, bytes_, $task) {
1142
1142
  if((bytes_ <= 0)) {
1143
1143
  return ff_core_Pair.Pair([], self_)
1144
1144
  } else {
1145
- const buffers_ = ff_core_Array.make_();
1145
+ const buffers_ = ff_core_Array.new_();
1146
1146
  let buffer_ = ff_core_Option.Option_grab((await self_.next_($task)));
1147
1147
  let taken_ = 0;
1148
1148
  let remainder_ = ff_core_Option.None();
@@ -93,12 +93,12 @@ import * as ff_core_Unit from "../../ff/core/Unit.mjs"
93
93
 
94
94
 
95
95
 
96
- export function make_() {
96
+ export function new_() {
97
97
  return new Map()
98
98
  }
99
99
 
100
- export async function make_$($task) {
101
- throw new Error('Function make is missing on this target in async context.');
100
+ export async function new_$($task) {
101
+ throw new Error('Function new is missing on this target in async context.');
102
102
  }
103
103
 
104
104
  export function StringMap_get(self_, key_) {
@@ -144,7 +144,7 @@ for(const [k, v] of self_) if(!body_(k, v)) break
144
144
  }
145
145
 
146
146
  export function StringMap_toArray(self_) {
147
- const array_ = ff_core_Array.make_();
147
+ const array_ = ff_core_Array.new_();
148
148
  ff_core_StringMap.StringMap_each(self_, ((k_, v_) => {
149
149
  ff_core_Array.Array_push(array_, ff_core_Pair.Pair(k_, v_))
150
150
  }));
@@ -164,7 +164,7 @@ return ff_core_List.List_toMap(ff_core_StringMap.StringMap_toList(self_), ff_cor
164
164
  }
165
165
 
166
166
  export function StringMap_keys(self_) {
167
- const array_ = ff_core_Array.make_();
167
+ const array_ = ff_core_Array.new_();
168
168
  ff_core_StringMap.StringMap_each(self_, ((k_, v_) => {
169
169
  ff_core_Array.Array_push(array_, k_)
170
170
  }));
@@ -172,7 +172,7 @@ return ff_core_Array.Array_toList(array_, 0, 9007199254740991)
172
172
  }
173
173
 
174
174
  export function StringMap_values(self_) {
175
- const array_ = ff_core_Array.make_();
175
+ const array_ = ff_core_Array.new_();
176
176
  ff_core_StringMap.StringMap_each(self_, ((k_, v_) => {
177
177
  ff_core_Array.Array_push(array_, v_)
178
178
  }));
@@ -227,7 +227,7 @@ for(const [k, v] of self_) if(!await body_(k, v)) break
227
227
  }
228
228
 
229
229
  export async function StringMap_toArray$(self_, $task) {
230
- const array_ = ff_core_Array.make_();
230
+ const array_ = ff_core_Array.new_();
231
231
  ff_core_StringMap.StringMap_each(self_, ((k_, v_) => {
232
232
  ff_core_Array.Array_push(array_, ff_core_Pair.Pair(k_, v_))
233
233
  }));
@@ -247,7 +247,7 @@ return ff_core_List.List_toMap(ff_core_StringMap.StringMap_toList(self_), ff_cor
247
247
  }
248
248
 
249
249
  export async function StringMap_keys$(self_, $task) {
250
- const array_ = ff_core_Array.make_();
250
+ const array_ = ff_core_Array.new_();
251
251
  ff_core_StringMap.StringMap_each(self_, ((k_, v_) => {
252
252
  ff_core_Array.Array_push(array_, k_)
253
253
  }));
@@ -255,7 +255,7 @@ return ff_core_Array.Array_toList(array_, 0, 9007199254740991)
255
255
  }
256
256
 
257
257
  export async function StringMap_values$(self_, $task) {
258
- const array_ = ff_core_Array.make_();
258
+ const array_ = ff_core_Array.new_();
259
259
  ff_core_StringMap.StringMap_each(self_, ((k_, v_) => {
260
260
  ff_core_Array.Array_push(array_, v_)
261
261
  }));
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "description": "Firefly compiler",
5
5
  "author": "Firefly team",
6
6
  "license": "MIT",
7
- "version": "0.4.31",
7
+ "version": "0.4.33",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"
package/postgresql/Pg.ff CHANGED
@@ -10,7 +10,7 @@ data PgLevel {
10
10
  PgSerializable
11
11
  }
12
12
 
13
- makePool(
13
+ newPool(
14
14
  system: NodeSystem
15
15
  user: String
16
16
  host: String
@@ -38,7 +38,7 @@ makePool(
38
38
  ))
39
39
  }
40
40
 
41
- makePoolFromConnectionString(
41
+ newPoolFromConnectionString(
42
42
  system: NodeSystem
43
43
  connectionString: String
44
44
  connectionTimeout: Duration = Duration(10.0)
package/rpc/Rpc.ff CHANGED
@@ -4,8 +4,8 @@ capability RpcServer[I, O, C](
4
4
  handlers: StringMap[(C, I) => O]
5
5
  )
6
6
 
7
- makeServer[I, O, C](): RpcServer[I, O, C] {
8
- RpcServer(StringMap.make())
7
+ newServer[I, O, C](): RpcServer[I, O, C] {
8
+ RpcServer(StringMap.new())
9
9
  }
10
10
 
11
11
  extend self[I, O, C]: RpcServer[I, O, C] {
@@ -53,7 +53,7 @@ extend self: RpcClient {
53
53
  }
54
54
  }
55
55
 
56
- makeClient(
56
+ newClient(
57
57
  httpClient: HttpClient
58
58
  prefix: String
59
59
  method: String = "POST"
@@ -4,7 +4,7 @@
4
4
  "description": "Firefly language support",
5
5
  "author": "Firefly team",
6
6
  "license": "MIT",
7
- "version": "0.4.31",
7
+ "version": "0.4.33",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"
@@ -32,7 +32,7 @@ data MultipartField {}
32
32
 
33
33
  capability WebSocketConnection {}
34
34
 
35
- make(
35
+ new(
36
36
  system: NodeSystem
37
37
  host: String
38
38
  port: Int
@@ -612,7 +612,7 @@ internalSend[T](self: WebSocketConnection, send: () => Bool): JsValue
612
612
  """
613
613
 
614
614
  internalArray[T](): Array[T] {
615
- Array.make()
615
+ Array.new()
616
616
  }
617
617
 
618
618
  internalTextChunk(data: String): JsValue
@@ -1 +0,0 @@
1
- package ff:httpserver:0.0.0