firefly-compiler 0.4.15 → 0.4.17

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 (87) hide show
  1. package/compiler/Compiler.ff +0 -1
  2. package/compiler/Deriver.ff +3 -3
  3. package/core/Array.ff +154 -2
  4. package/core/BrowserSystem.ff +0 -4
  5. package/core/Int.ff +2 -2
  6. package/core/IntMap.ff +11 -0
  7. package/core/List.ff +2 -2
  8. package/core/Map.ff +11 -0
  9. package/core/StringMap.ff +11 -0
  10. package/guide/Main.ff +2 -1
  11. package/lsp/Handler.ff +48 -8
  12. package/lsp/LanguageServer.ff +9 -2
  13. package/output/js/ff/compiler/Builder.mjs +0 -2
  14. package/output/js/ff/compiler/Compiler.mjs +1 -3
  15. package/output/js/ff/compiler/Dependencies.mjs +0 -2
  16. package/output/js/ff/compiler/Deriver.mjs +4 -6
  17. package/output/js/ff/compiler/Dictionaries.mjs +0 -2
  18. package/output/js/ff/compiler/Environment.mjs +0 -2
  19. package/output/js/ff/compiler/Inference.mjs +0 -2
  20. package/output/js/ff/compiler/JsEmitter.mjs +0 -2
  21. package/output/js/ff/compiler/JsImporter.mjs +0 -2
  22. package/output/js/ff/compiler/LspHook.mjs +0 -2
  23. package/output/js/ff/compiler/Main.mjs +0 -2
  24. package/output/js/ff/compiler/Parser.mjs +0 -2
  25. package/output/js/ff/compiler/Patterns.mjs +0 -2
  26. package/output/js/ff/compiler/Resolver.mjs +0 -2
  27. package/output/js/ff/compiler/Substitution.mjs +0 -2
  28. package/output/js/ff/compiler/Syntax.mjs +0 -2
  29. package/output/js/ff/compiler/Token.mjs +0 -2
  30. package/output/js/ff/compiler/Tokenizer.mjs +0 -2
  31. package/output/js/ff/compiler/Unification.mjs +0 -2
  32. package/output/js/ff/compiler/Wildcards.mjs +0 -2
  33. package/output/js/ff/compiler/Workspace.mjs +0 -2
  34. package/output/js/ff/core/Any.mjs +0 -2
  35. package/output/js/ff/core/Array.mjs +368 -4
  36. package/output/js/ff/core/AssetSystem.mjs +0 -2
  37. package/output/js/ff/core/Atomic.mjs +0 -2
  38. package/output/js/ff/core/Bool.mjs +0 -2
  39. package/output/js/ff/core/Box.mjs +0 -2
  40. package/output/js/ff/core/BrowserSystem.mjs +0 -10
  41. package/output/js/ff/core/Buffer.mjs +0 -2
  42. package/output/js/ff/core/BuildSystem.mjs +0 -2
  43. package/output/js/ff/core/Channel.mjs +0 -2
  44. package/output/js/ff/core/Char.mjs +0 -2
  45. package/output/js/ff/core/Core.mjs +0 -2
  46. package/output/js/ff/core/Duration.mjs +0 -2
  47. package/output/js/ff/core/Equal.mjs +0 -2
  48. package/output/js/ff/core/Error.mjs +0 -2
  49. package/output/js/ff/core/FileHandle.mjs +0 -2
  50. package/output/js/ff/core/Float.mjs +0 -2
  51. package/output/js/ff/core/HttpClient.mjs +0 -2
  52. package/output/js/ff/core/Instant.mjs +0 -2
  53. package/output/js/ff/core/Int.mjs +4 -6
  54. package/output/js/ff/core/IntMap.mjs +38 -2
  55. package/output/js/ff/core/JsSystem.mjs +0 -2
  56. package/output/js/ff/core/JsValue.mjs +0 -2
  57. package/output/js/ff/core/Json.mjs +0 -2
  58. package/output/js/ff/core/List.mjs +4 -6
  59. package/output/js/ff/core/Lock.mjs +0 -2
  60. package/output/js/ff/core/Log.mjs +0 -2
  61. package/output/js/ff/core/Map.mjs +40 -2
  62. package/output/js/ff/core/NodeSystem.mjs +0 -2
  63. package/output/js/ff/core/Nothing.mjs +0 -2
  64. package/output/js/ff/core/Option.mjs +0 -2
  65. package/output/js/ff/core/Ordering.mjs +0 -2
  66. package/output/js/ff/core/Pair.mjs +0 -2
  67. package/output/js/ff/core/Path.mjs +0 -2
  68. package/output/js/ff/core/Random.mjs +0 -2
  69. package/output/js/ff/core/RbMap.mjs +0 -2
  70. package/output/js/ff/core/Serializable.mjs +0 -2
  71. package/output/js/ff/core/Set.mjs +0 -2
  72. package/output/js/ff/core/Show.mjs +0 -2
  73. package/output/js/ff/core/SourceLocation.mjs +0 -2
  74. package/output/js/ff/core/Stack.mjs +0 -2
  75. package/output/js/ff/core/Stream.mjs +0 -2
  76. package/output/js/ff/core/String.mjs +0 -2
  77. package/output/js/ff/core/StringMap.mjs +38 -2
  78. package/output/js/ff/core/Task.mjs +0 -2
  79. package/output/js/ff/core/Try.mjs +0 -2
  80. package/output/js/ff/core/Unit.mjs +0 -2
  81. package/package.json +1 -1
  82. package/vscode/README.md +1 -4
  83. package/vscode/client/src/extension.ts +12 -1
  84. package/vscode/package.json +1 -1
  85. package/websocket/.firefly/package.ff +1 -0
  86. package/{core → websocket}/WebSocket.ff +4 -0
  87. package/output/js/ff/core/WebSocket.mjs +0 -200
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
 
98
96
 
99
97
 
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // type Error
98
96
 
99
97
 
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // type FileHandle
98
96
 
99
97
 
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // type Float
98
96
 
99
97
 
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // type HttpClient
98
96
 
99
97
 
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // newtype Instant
98
96
 
99
97
 
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // type Int
98
96
 
99
97
 
@@ -127,11 +125,11 @@ export function Int_bitXor(self_, that_) {
127
125
  return self_ ^ that_;
128
126
  }
129
127
 
130
- export function Int_bitLeft(self_, bits_ = 1) {
128
+ export function Int_bitLeft(self_, bits_) {
131
129
  return self_ << bits_;
132
130
  }
133
131
 
134
- export function Int_bitRight(self_, bits_ = 1, signed_ = true) {
132
+ export function Int_bitRight(self_, bits_, signed_ = true) {
135
133
  return signed_ ? self_ >> bits_ : self_ >>> bits_;
136
134
  }
137
135
 
@@ -209,11 +207,11 @@ export async function Int_bitXor$(self_, that_, $task) {
209
207
  throw new Error('Function Int_bitXor is missing on this target in async context.');
210
208
  }
211
209
 
212
- export async function Int_bitLeft$(self_, bits_ = 1, $task) {
210
+ export async function Int_bitLeft$(self_, bits_, $task) {
213
211
  throw new Error('Function Int_bitLeft is missing on this target in async context.');
214
212
  }
215
213
 
216
- export async function Int_bitRight$(self_, bits_ = 1, signed_ = true, $task) {
214
+ export async function Int_bitRight$(self_, bits_, signed_ = true, $task) {
217
215
  throw new Error('Function Int_bitRight is missing on this target in async context.');
218
216
  }
219
217
 
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // type IntMap
98
96
 
99
97
 
@@ -287,6 +285,44 @@ ff_core_IntMap.IntMap_set(self_, key_, (await body_($task)))
287
285
  return ff_core_IntMap.IntMap_grab(self_, key_)
288
286
  }
289
287
 
288
+ export function IntMap_push(self_, key_, value_) {
289
+ {
290
+ const _1 = ff_core_IntMap.IntMap_get(self_, key_);
291
+ {
292
+ if(_1.None) {
293
+ ff_core_IntMap.IntMap_set(self_, key_, ff_core_List.List_toStack(ff_core_List.Link(value_, ff_core_List.Empty())))
294
+ return
295
+ }
296
+ }
297
+ {
298
+ if(_1.Some) {
299
+ const stack_ = _1.value_;
300
+ ff_core_Stack.Stack_push(stack_, value_)
301
+ return
302
+ }
303
+ }
304
+ }
305
+ }
306
+
307
+ export async function IntMap_push$(self_, key_, value_, $task) {
308
+ {
309
+ const _1 = ff_core_IntMap.IntMap_get(self_, key_);
310
+ {
311
+ if(_1.None) {
312
+ ff_core_IntMap.IntMap_set(self_, key_, ff_core_List.List_toStack(ff_core_List.Link(value_, ff_core_List.Empty())))
313
+ return
314
+ }
315
+ }
316
+ {
317
+ if(_1.Some) {
318
+ const stack_ = _1.value_;
319
+ ff_core_Stack.Stack_push(stack_, value_)
320
+ return
321
+ }
322
+ }
323
+ }
324
+ }
325
+
290
326
 
291
327
 
292
328
 
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // type JsSystem
98
96
 
99
97
 
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // type JsValue
98
96
 
99
97
 
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // type Json
98
96
 
99
97
 
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // type List
98
96
  const Empty$ = {Empty: true};
99
97
  export function Empty() {
@@ -800,7 +798,7 @@ return
800
798
  return go_(initial_, self_)
801
799
  }
802
800
 
803
- export function List_updated(self_, index_, value_) {
801
+ export function List_update(self_, index_, value_) {
804
802
  function go_(list_, i_, result_) {
805
803
  _tailcall: for(;;) {
806
804
  {
@@ -1055,7 +1053,7 @@ remaining_ = ff_core_List.Empty()
1055
1053
  }))
1056
1054
  }
1057
1055
 
1058
- export function List_insertBetween(self_, separator_) {
1056
+ export function List_separate(self_, separator_) {
1059
1057
  return ff_core_List.List_dropFirst(ff_core_List.List_flatMap(self_, ((e_) => {
1060
1058
  return ff_core_List.List_addAll(separator_, ff_core_List.Link(e_, ff_core_List.Empty()))
1061
1059
  })), ff_core_List.List_size(separator_))
@@ -1670,7 +1668,7 @@ return
1670
1668
  return (await go_$(initial_, self_, $task))
1671
1669
  }
1672
1670
 
1673
- export async function List_updated$(self_, index_, value_, $task) {
1671
+ export async function List_update$(self_, index_, value_, $task) {
1674
1672
  function go_(list_, i_, result_) {
1675
1673
  _tailcall: for(;;) {
1676
1674
  {
@@ -1925,7 +1923,7 @@ remaining_ = ff_core_List.Empty()
1925
1923
  }))
1926
1924
  }
1927
1925
 
1928
- export async function List_insertBetween$(self_, separator_, $task) {
1926
+ export async function List_separate$(self_, separator_, $task) {
1929
1927
  return ff_core_List.List_dropFirst(ff_core_List.List_flatMap(self_, ((e_) => {
1930
1928
  return ff_core_List.List_addAll(separator_, ff_core_List.Link(e_, ff_core_List.Empty()))
1931
1929
  })), ff_core_List.List_size(separator_))
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // type Lock
98
96
 
99
97
 
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
 
98
96
 
99
97
 
@@ -94,8 +94,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
94
94
 
95
95
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
96
96
 
97
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
98
-
99
97
  // newtype Map
100
98
 
101
99
 
@@ -338,6 +336,46 @@ return ff_core_List.Link(value_, ff_core_List.Empty())
338
336
  }), ff_core_Ordering_Order$K)
339
337
  }
340
338
 
339
+ export function Map_push(self_, key_, value_, ff_core_Ordering_Order$K) {
340
+ {
341
+ const _1 = ff_core_Map.Map_get(self_, key_, ff_core_Ordering_Order$K);
342
+ {
343
+ if(_1.None) {
344
+ return ff_core_Map.Map_add(self_, key_, ff_core_List.List_toStack(ff_core_List.Link(value_, ff_core_List.Empty())), ff_core_Ordering_Order$K)
345
+ return
346
+ }
347
+ }
348
+ {
349
+ if(_1.Some) {
350
+ const stack_ = _1.value_;
351
+ ff_core_Stack.Stack_push(stack_, value_);
352
+ return self_
353
+ return
354
+ }
355
+ }
356
+ }
357
+ }
358
+
359
+ export async function Map_push$(self_, key_, value_, ff_core_Ordering_Order$K, $task) {
360
+ {
361
+ const _1 = ff_core_Map.Map_get(self_, key_, ff_core_Ordering_Order$K);
362
+ {
363
+ if(_1.None) {
364
+ return ff_core_Map.Map_add(self_, key_, ff_core_List.List_toStack(ff_core_List.Link(value_, ff_core_List.Empty())), ff_core_Ordering_Order$K)
365
+ return
366
+ }
367
+ }
368
+ {
369
+ if(_1.Some) {
370
+ const stack_ = _1.value_;
371
+ ff_core_Stack.Stack_push(stack_, value_);
372
+ return self_
373
+ return
374
+ }
375
+ }
376
+ }
377
+ }
378
+
341
379
  export function ff_core_Equal_Equal$ff_core_Map_Map(ff_core_Equal_Equal$K, ff_core_Ordering_Order$K, ff_core_Equal_Equal$V) { return {
342
380
  equals_(x_, y_) {
343
381
  return ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_core_Pair.ff_core_Equal_Equal$ff_core_Pair_Pair(ff_core_Equal_Equal$K, ff_core_Equal_Equal$V)).equals_(ff_core_Map.Map_pairs(x_, ff_core_Ordering_Order$K), ff_core_Map.Map_pairs(y_, ff_core_Ordering_Order$K))
@@ -96,8 +96,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
96
96
 
97
97
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
98
98
 
99
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
100
-
101
99
  // type NodeSystem
102
100
 
103
101
 
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // type Nothing
98
96
 
99
97
 
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // type Option
98
96
  const None$ = {None: true};
99
97
  export function None() {
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // type Ordering
98
96
  const OrderingBefore$ = {OrderingBefore: true};
99
97
  export function OrderingBefore() {
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // type Pair
98
96
  export function Pair(first_, second_) {
99
97
  return {first_, second_};
@@ -98,8 +98,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
98
98
 
99
99
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
100
100
 
101
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
102
-
103
101
  // type Path
104
102
 
105
103
 
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // type Random
98
96
 
99
97
 
@@ -94,8 +94,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
94
94
 
95
95
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
96
96
 
97
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
98
-
99
97
  // type Color
100
98
  const R$ = {R: true};
101
99
  export function R() {
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // type DeserializationChecksumException
98
96
  const DeserializationChecksumException$ = {DeserializationChecksumException: true};
99
97
  export function DeserializationChecksumException() {
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // newtype Set
98
96
 
99
97
 
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
 
98
96
 
99
97
 
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // newtype SourceLocation
98
96
 
99
97
 
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // type Stack
98
96
 
99
97
 
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // type Stream
98
96
  export function Stream(next_, close_) {
99
97
  return {next_, close_};
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // type String
98
96
 
99
97
 
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // type StringMap
98
96
 
99
97
 
@@ -287,6 +285,44 @@ ff_core_StringMap.StringMap_set(self_, key_, (await body_($task)))
287
285
  return ff_core_StringMap.StringMap_grab(self_, key_)
288
286
  }
289
287
 
288
+ export function StringMap_push(self_, key_, value_) {
289
+ {
290
+ const _1 = ff_core_StringMap.StringMap_get(self_, key_);
291
+ {
292
+ if(_1.None) {
293
+ ff_core_StringMap.StringMap_set(self_, key_, ff_core_List.List_toStack(ff_core_List.Link(value_, ff_core_List.Empty())))
294
+ return
295
+ }
296
+ }
297
+ {
298
+ if(_1.Some) {
299
+ const stack_ = _1.value_;
300
+ ff_core_Stack.Stack_push(stack_, value_)
301
+ return
302
+ }
303
+ }
304
+ }
305
+ }
306
+
307
+ export async function StringMap_push$(self_, key_, value_, $task) {
308
+ {
309
+ const _1 = ff_core_StringMap.StringMap_get(self_, key_);
310
+ {
311
+ if(_1.None) {
312
+ ff_core_StringMap.StringMap_set(self_, key_, ff_core_List.List_toStack(ff_core_List.Link(value_, ff_core_List.Empty())))
313
+ return
314
+ }
315
+ }
316
+ {
317
+ if(_1.Some) {
318
+ const stack_ = _1.value_;
319
+ ff_core_Stack.Stack_push(stack_, value_)
320
+ return
321
+ }
322
+ }
323
+ }
324
+ }
325
+
290
326
 
291
327
 
292
328
 
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // type Task
98
96
 
99
97
 
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // type Try
98
96
  export function Success(value_) {
99
97
  return {Success: true, value_};
@@ -92,8 +92,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
92
 
93
93
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
94
 
95
- import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
96
-
97
95
  // type Unit
98
96
  const Unit$ = {Unit: true};
99
97
  export function Unit() {
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.15",
7
+ "version": "0.4.17",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"
package/vscode/README.md CHANGED
@@ -9,9 +9,6 @@ This extension adds support for the Firefly programming language (`.ff` files).
9
9
  - Symbol renaming
10
10
  - Document and workspace symbols
11
11
  - Show type on hover
12
- - Diagnostics`*`
13
-
14
- `*` Diagnostics don't currently update automatically when included files have been edited. It's disabled for performance reasons, and we're working on a solution.
12
+ - Diagnostics
15
13
 
16
14
  You can run `.ff` main files via the usual *Run and Debug* side panel - just choose *create a launch.json file*. After that you can also press *F5* to run the currently open file.
17
-
@@ -26,7 +26,7 @@ export function activate(context: vscode.ExtensionContext) {
26
26
  context.subscriptions.push(vscode.commands.registerCommand('extension.firefly-lang.getFireflyCompiler', config => {
27
27
  return fireflyCompiler;
28
28
  }));
29
-
29
+
30
30
  const runOrDebug = {
31
31
  module: fireflyCompiler,
32
32
  args: ['LanguageServer.ff'],
@@ -54,6 +54,17 @@ export function activate(context: vscode.ExtensionContext) {
54
54
  );
55
55
 
56
56
  client.start();
57
+
58
+ vscode.window.onDidChangeActiveTextEditor(editor => {
59
+ if(editor && editor.document.languageId === 'firefly') {
60
+ client.sendNotification('custom/focusDocument', {
61
+ "textDocument": {
62
+ uri: editor.document.uri.toString(),
63
+ version: editor.document.version,
64
+ }
65
+ });
66
+ }
67
+ });
57
68
  }
58
69
 
59
70
  export function deactivate(): Thenable<void> | undefined {
@@ -4,7 +4,7 @@
4
4
  "description": "Firefly language support",
5
5
  "author": "Firefly team",
6
6
  "license": "MIT",
7
- "version": "0.4.15",
7
+ "version": "0.4.17",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"
@@ -0,0 +1 @@
1
+ package ff:websocket:0.0.0
@@ -1,5 +1,9 @@
1
1
  capability WebSocket {}
2
2
 
3
+ open(browserSystem: BrowserSystem, url: String): WebSocket {
4
+ internalOpenBrowserWebSocket(browserSystem, url)
5
+ }
6
+
3
7
  extend self: WebSocket {
4
8
 
5
9
  readText(encoding: String = "utf8"): Option[String] {