firefly-compiler 0.4.6 → 0.4.8

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 (90) hide show
  1. package/compiler/Compiler.ff +2 -0
  2. package/compiler/Deriver.ff +7 -0
  3. package/core/Array.ff +17 -4
  4. package/core/AssetSystem.ff +1 -1
  5. package/core/BrowserSystem.ff +27 -0
  6. package/core/List.ff +4 -0
  7. package/core/Lock.ff +2 -2
  8. package/core/Random.ff +148 -0
  9. package/core/SourceLocation.ff +27 -0
  10. package/core/Task.ff +3 -0
  11. package/core/WebSocket.ff +127 -0
  12. package/httpserver/HttpServer.ff +1 -1
  13. package/lux/Css.ff +648 -0
  14. package/lux/CssTest.ff +48 -0
  15. package/lux/Lux.ff +33 -18
  16. package/lux/Main.ff +4 -1
  17. package/output/js/ff/compiler/Builder.mjs +448 -444
  18. package/output/js/ff/compiler/Compiler.mjs +420 -416
  19. package/output/js/ff/compiler/Dependencies.mjs +393 -389
  20. package/output/js/ff/compiler/Deriver.mjs +1178 -1170
  21. package/output/js/ff/compiler/Dictionaries.mjs +1315 -1309
  22. package/output/js/ff/compiler/Environment.mjs +1025 -1015
  23. package/output/js/ff/compiler/Inference.mjs +4272 -4268
  24. package/output/js/ff/compiler/JsEmitter.mjs +5405 -5391
  25. package/output/js/ff/compiler/JsImporter.mjs +270 -266
  26. package/output/js/ff/compiler/LspHook.mjs +799 -793
  27. package/output/js/ff/compiler/Main.mjs +1691 -1675
  28. package/output/js/ff/compiler/Parser.mjs +4016 -4008
  29. package/output/js/ff/compiler/Patterns.mjs +935 -927
  30. package/output/js/ff/compiler/Resolver.mjs +2311 -2307
  31. package/output/js/ff/compiler/Substitution.mjs +1154 -1150
  32. package/output/js/ff/compiler/Syntax.mjs +12566 -12434
  33. package/output/js/ff/compiler/Token.mjs +3152 -3096
  34. package/output/js/ff/compiler/Tokenizer.mjs +597 -593
  35. package/output/js/ff/compiler/Unification.mjs +1762 -1752
  36. package/output/js/ff/compiler/Wildcards.mjs +612 -608
  37. package/output/js/ff/compiler/Workspace.mjs +695 -687
  38. package/output/js/ff/core/Any.mjs +147 -143
  39. package/output/js/ff/core/Array.mjs +573 -547
  40. package/output/js/ff/core/AssetSystem.mjs +278 -274
  41. package/output/js/ff/core/Atomic.mjs +158 -154
  42. package/output/js/ff/core/Bool.mjs +156 -152
  43. package/output/js/ff/core/Box.mjs +116 -112
  44. package/output/js/ff/core/BrowserSystem.mjs +181 -126
  45. package/output/js/ff/core/Buffer.mjs +399 -395
  46. package/output/js/ff/core/BuildSystem.mjs +300 -296
  47. package/output/js/ff/core/Channel.mjs +193 -189
  48. package/output/js/ff/core/Char.mjs +153 -149
  49. package/output/js/ff/core/Core.mjs +304 -300
  50. package/output/js/ff/core/Duration.mjs +120 -116
  51. package/output/js/ff/core/Equal.mjs +183 -179
  52. package/output/js/ff/core/Error.mjs +146 -142
  53. package/output/js/ff/core/FileHandle.mjs +154 -150
  54. package/output/js/ff/core/Float.mjs +229 -225
  55. package/output/js/ff/core/HttpClient.mjs +195 -191
  56. package/output/js/ff/core/Instant.mjs +113 -109
  57. package/output/js/ff/core/Int.mjs +269 -265
  58. package/output/js/ff/core/IntMap.mjs +284 -280
  59. package/output/js/ff/core/JsSystem.mjs +242 -238
  60. package/output/js/ff/core/JsValue.mjs +712 -708
  61. package/output/js/ff/core/List.mjs +2346 -2334
  62. package/output/js/ff/core/Lock.mjs +235 -231
  63. package/output/js/ff/core/Log.mjs +167 -163
  64. package/output/js/ff/core/Map.mjs +366 -362
  65. package/output/js/ff/core/NodeSystem.mjs +298 -294
  66. package/output/js/ff/core/Nothing.mjs +108 -104
  67. package/output/js/ff/core/Option.mjs +1023 -1015
  68. package/output/js/ff/core/Ordering.mjs +734 -730
  69. package/output/js/ff/core/Pair.mjs +337 -331
  70. package/output/js/ff/core/Path.mjs +549 -545
  71. package/output/js/ff/core/Random.mjs +340 -0
  72. package/output/js/ff/core/RbMap.mjs +1944 -1940
  73. package/output/js/ff/core/Serializable.mjs +432 -428
  74. package/output/js/ff/core/Set.mjs +258 -254
  75. package/output/js/ff/core/Show.mjs +209 -205
  76. package/output/js/ff/core/SourceLocation.mjs +273 -229
  77. package/output/js/ff/core/Stack.mjs +533 -529
  78. package/output/js/ff/core/Stream.mjs +1308 -1304
  79. package/output/js/ff/core/String.mjs +369 -365
  80. package/output/js/ff/core/StringMap.mjs +284 -280
  81. package/output/js/ff/core/Task.mjs +325 -319
  82. package/output/js/ff/core/Try.mjs +511 -507
  83. package/output/js/ff/core/Unit.mjs +155 -151
  84. package/output/js/ff/core/WebSocket.mjs +198 -0
  85. package/package.json +1 -1
  86. package/vscode/package.json +1 -1
  87. package/webserver/.firefly/include/package-lock.json +16 -0
  88. package/webserver/.firefly/include/package.json +5 -0
  89. package/webserver/.firefly/package.ff +2 -0
  90. package/webserver/WebServer.ff +608 -0
@@ -1,307 +1,311 @@
1
- import * as import$0 from 'fs/promises';
2
-
3
- import * as import$1 from 'path';
4
-
5
- import * as import$2 from 'url';
6
-
7
- import * as ff_core_Any from "../../ff/core/Any.mjs"
8
-
9
- import * as ff_core_Array from "../../ff/core/Array.mjs"
10
-
11
- import * as ff_core_AssetSystem from "../../ff/core/AssetSystem.mjs"
12
-
13
- import * as ff_core_Atomic from "../../ff/core/Atomic.mjs"
14
-
15
- import * as ff_core_Bool from "../../ff/core/Bool.mjs"
16
-
17
- import * as ff_core_Box from "../../ff/core/Box.mjs"
18
-
19
- import * as ff_core_BrowserSystem from "../../ff/core/BrowserSystem.mjs"
20
-
21
- import * as ff_core_Buffer from "../../ff/core/Buffer.mjs"
22
-
23
- import * as ff_core_BuildSystem from "../../ff/core/BuildSystem.mjs"
24
-
25
- import * as ff_core_Channel from "../../ff/core/Channel.mjs"
26
-
27
- import * as ff_core_Char from "../../ff/core/Char.mjs"
28
-
29
- import * as ff_core_Core from "../../ff/core/Core.mjs"
30
-
31
- import * as ff_core_Duration from "../../ff/core/Duration.mjs"
32
-
33
- import * as ff_core_Equal from "../../ff/core/Equal.mjs"
34
-
35
- import * as ff_core_Error from "../../ff/core/Error.mjs"
36
-
37
- import * as ff_core_FileHandle from "../../ff/core/FileHandle.mjs"
38
-
39
- import * as ff_core_Float from "../../ff/core/Float.mjs"
40
-
41
- import * as ff_core_HttpClient from "../../ff/core/HttpClient.mjs"
42
-
43
- import * as ff_core_Instant from "../../ff/core/Instant.mjs"
44
-
45
- import * as ff_core_Int from "../../ff/core/Int.mjs"
46
-
47
- import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
48
-
49
- import * as ff_core_JsSystem from "../../ff/core/JsSystem.mjs"
50
-
51
- import * as ff_core_JsValue from "../../ff/core/JsValue.mjs"
52
-
53
- import * as ff_core_List from "../../ff/core/List.mjs"
54
-
55
- import * as ff_core_Lock from "../../ff/core/Lock.mjs"
56
-
57
- import * as ff_core_Log from "../../ff/core/Log.mjs"
58
-
59
- import * as ff_core_Map from "../../ff/core/Map.mjs"
60
-
61
- import * as ff_core_NodeSystem from "../../ff/core/NodeSystem.mjs"
62
-
63
- import * as ff_core_Nothing from "../../ff/core/Nothing.mjs"
64
-
65
- import * as ff_core_Option from "../../ff/core/Option.mjs"
66
-
67
- import * as ff_core_Ordering from "../../ff/core/Ordering.mjs"
68
-
69
- import * as ff_core_Pair from "../../ff/core/Pair.mjs"
70
-
71
- import * as ff_core_Path from "../../ff/core/Path.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_Stack from "../../ff/core/Stack.mjs"
82
-
83
- import * as ff_core_Stream from "../../ff/core/Stream.mjs"
84
-
85
- import * as ff_core_String from "../../ff/core/String.mjs"
86
-
87
- import * as ff_core_StringMap from "../../ff/core/StringMap.mjs"
88
-
89
- import * as ff_core_Task from "../../ff/core/Task.mjs"
90
-
91
- import * as ff_core_Try from "../../ff/core/Try.mjs"
92
-
93
- import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
-
95
- // type NodeSystem
96
-
97
-
98
-
99
-
100
- export function internalAssets_(system_) {
101
- throw new Error('Function internalAssets is missing on this target in sync context.');
102
- }
103
-
104
- export function internalListDirectoryWithoutOpendir_(system_, path_) {
105
- throw new Error('Function internalListDirectoryWithoutOpendir is missing on this target in sync context.');
106
- }
107
-
108
- export async function internalAssets_$(system_, $task) {
109
- return system_.assets_
110
- }
111
-
112
- export async function internalListDirectoryWithoutOpendir_$(system_, path_, $task) {
1
+ import * as import$0 from 'fs/promises';
2
+
3
+ import * as import$1 from 'path';
4
+
5
+ import * as import$2 from 'url';
6
+
7
+ import * as ff_core_Any from "../../ff/core/Any.mjs"
8
+
9
+ import * as ff_core_Array from "../../ff/core/Array.mjs"
10
+
11
+ import * as ff_core_AssetSystem from "../../ff/core/AssetSystem.mjs"
12
+
13
+ import * as ff_core_Atomic from "../../ff/core/Atomic.mjs"
14
+
15
+ import * as ff_core_Bool from "../../ff/core/Bool.mjs"
16
+
17
+ import * as ff_core_Box from "../../ff/core/Box.mjs"
18
+
19
+ import * as ff_core_BrowserSystem from "../../ff/core/BrowserSystem.mjs"
20
+
21
+ import * as ff_core_Buffer from "../../ff/core/Buffer.mjs"
22
+
23
+ import * as ff_core_BuildSystem from "../../ff/core/BuildSystem.mjs"
24
+
25
+ import * as ff_core_Channel from "../../ff/core/Channel.mjs"
26
+
27
+ import * as ff_core_Char from "../../ff/core/Char.mjs"
28
+
29
+ import * as ff_core_Core from "../../ff/core/Core.mjs"
30
+
31
+ import * as ff_core_Duration from "../../ff/core/Duration.mjs"
32
+
33
+ import * as ff_core_Equal from "../../ff/core/Equal.mjs"
34
+
35
+ import * as ff_core_Error from "../../ff/core/Error.mjs"
36
+
37
+ import * as ff_core_FileHandle from "../../ff/core/FileHandle.mjs"
38
+
39
+ import * as ff_core_Float from "../../ff/core/Float.mjs"
40
+
41
+ import * as ff_core_HttpClient from "../../ff/core/HttpClient.mjs"
42
+
43
+ import * as ff_core_Instant from "../../ff/core/Instant.mjs"
44
+
45
+ import * as ff_core_Int from "../../ff/core/Int.mjs"
46
+
47
+ import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
48
+
49
+ import * as ff_core_JsSystem from "../../ff/core/JsSystem.mjs"
50
+
51
+ import * as ff_core_JsValue from "../../ff/core/JsValue.mjs"
52
+
53
+ import * as ff_core_List from "../../ff/core/List.mjs"
54
+
55
+ import * as ff_core_Lock from "../../ff/core/Lock.mjs"
56
+
57
+ import * as ff_core_Log from "../../ff/core/Log.mjs"
58
+
59
+ import * as ff_core_Map from "../../ff/core/Map.mjs"
60
+
61
+ import * as ff_core_NodeSystem from "../../ff/core/NodeSystem.mjs"
62
+
63
+ import * as ff_core_Nothing from "../../ff/core/Nothing.mjs"
64
+
65
+ import * as ff_core_Option from "../../ff/core/Option.mjs"
66
+
67
+ import * as ff_core_Ordering from "../../ff/core/Ordering.mjs"
68
+
69
+ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
70
+
71
+ import * as ff_core_Path from "../../ff/core/Path.mjs"
72
+
73
+ import * as ff_core_Random from "../../ff/core/Random.mjs"
74
+
75
+ import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
76
+
77
+ import * as ff_core_Set from "../../ff/core/Set.mjs"
78
+
79
+ import * as ff_core_Show from "../../ff/core/Show.mjs"
80
+
81
+ import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
82
+
83
+ import * as ff_core_Stack from "../../ff/core/Stack.mjs"
84
+
85
+ import * as ff_core_Stream from "../../ff/core/Stream.mjs"
86
+
87
+ import * as ff_core_String from "../../ff/core/String.mjs"
88
+
89
+ import * as ff_core_StringMap from "../../ff/core/StringMap.mjs"
90
+
91
+ import * as ff_core_Task from "../../ff/core/Task.mjs"
92
+
93
+ import * as ff_core_Try from "../../ff/core/Try.mjs"
94
+
95
+ import * as ff_core_Unit from "../../ff/core/Unit.mjs"
96
+
97
+ import * as ff_core_WebSocket from "../../ff/core/WebSocket.mjs"
98
+
99
+ // type NodeSystem
100
+
101
+
102
+
103
+
104
+ export function internalAssets_(system_) {
105
+ throw new Error('Function internalAssets is missing on this target in sync context.');
106
+ }
107
+
108
+ export function internalListDirectoryWithoutOpendir_(system_, path_) {
109
+ throw new Error('Function internalListDirectoryWithoutOpendir is missing on this target in sync context.');
110
+ }
111
+
112
+ export async function internalAssets_$(system_, $task) {
113
+ return system_.assets_
114
+ }
115
+
116
+ export async function internalListDirectoryWithoutOpendir_$(system_, path_, $task) {
113
117
 
114
118
  const fsPromises = import$0
115
119
  const path = import$1
116
120
  let files = await fsPromises.readdir(path_)
117
121
  return files.map(file => path.join(path_, file))
118
-
119
- }
120
-
121
- export function NodeSystem_arguments(self_) {
122
- throw new Error('Function NodeSystem_arguments is missing on this target in sync context.');
123
- }
124
-
125
- export function NodeSystem_assets(self_) {
126
- const assetPkgSnapshotPath_ = ff_core_NodeSystem.NodeSystem_path(self_, "/snapshot/output/assets");
127
- if(ff_core_Path.Path_isDirectory(assetPkgSnapshotPath_)) {
128
- function streams_(path_) {
129
- return ff_core_Stream.Stream_flatMap(ff_core_Array.Array_toStream(ff_core_NodeSystem.internalListDirectoryWithoutOpendir_(self_, path_), false), ((file_) => {
130
- if(ff_core_Path.Path_isDirectory(file_)) {
131
- return streams_(file_)
132
- } else {
133
- return ff_core_List.List_toStream(ff_core_List.Link(ff_core_Pair.Pair(("/" + ff_core_Path.Path_relativeTo(file_, assetPkgSnapshotPath_)), (() => {
134
- return ff_core_Path.Path_readStream(file_)
135
- })), ff_core_List.Empty()), false)
136
- }
137
- }))
138
- }
139
- return ff_core_AssetSystem.AssetSystem(ff_core_Stream.Stream_toMap(streams_(assetPkgSnapshotPath_), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String))
140
- } else {
141
- return ff_core_NodeSystem.internalAssets_(self_)
142
- }
143
- }
144
-
145
- export function NodeSystem_path(self_, relativePath_) {
146
- throw new Error('Function NodeSystem_path is missing on this target in sync context.');
147
- }
148
-
149
- export function NodeSystem_pathFromUrl(self_, url_) {
150
- throw new Error('Function NodeSystem_pathFromUrl is missing on this target in sync context.');
151
- }
152
-
153
- export function NodeSystem_httpClient(self_) {
154
- throw new Error('Function NodeSystem_httpClient is missing on this target in sync context.');
155
- }
156
-
157
- export function NodeSystem_mainTask(self_) {
158
- throw new Error('Function NodeSystem_mainTask is missing on this target in sync context.');
159
- }
160
-
161
- export function NodeSystem_js(self_) {
162
- throw new Error('Function NodeSystem_js is missing on this target in sync context.');
163
- }
164
-
165
- export function NodeSystem_exit(self_, exitCode_ = 0) {
166
- throw new Error('Function NodeSystem_exit is missing on this target in sync context.');
167
- }
168
-
169
- export function NodeSystem_readStream(self_) {
170
- throw new Error('Function NodeSystem_readStream is missing on this target in sync context.');
171
- }
172
-
173
- export function NodeSystem_writeBuffer(self_, buffer_) {
174
- throw new Error('Function NodeSystem_writeBuffer is missing on this target in sync context.');
175
- }
176
-
177
- export function NodeSystem_writeStream(self_, stream_) {
178
- ff_core_Stream.Stream_each(stream_, ((_w1) => {
179
- ff_core_NodeSystem.NodeSystem_writeBuffer(self_, _w1)
180
- }))
181
- }
182
-
183
- export function NodeSystem_writeText(self_, text_) {
184
- ff_core_NodeSystem.NodeSystem_writeBuffer(self_, ff_core_String.String_toBuffer(text_))
185
- }
186
-
187
- export function NodeSystem_writeLine(self_, text_) {
188
- ff_core_NodeSystem.NodeSystem_writeText(self_, (text_ + "\n"))
189
- }
190
-
191
- export function NodeSystem_writeErrorBuffer(self_, buffer_) {
192
- throw new Error('Function NodeSystem_writeErrorBuffer is missing on this target in sync context.');
193
- }
194
-
195
- export function NodeSystem_writeErrorStream(self_, stream_) {
196
- ff_core_Stream.Stream_each(stream_, ((_w1) => {
197
- ff_core_NodeSystem.NodeSystem_writeErrorBuffer(self_, _w1)
198
- }))
199
- }
200
-
201
- export function NodeSystem_writeErrorText(self_, text_) {
202
- ff_core_NodeSystem.NodeSystem_writeErrorBuffer(self_, ff_core_String.String_toBuffer(text_))
203
- }
204
-
205
- export function NodeSystem_writeErrorLine(self_, text_) {
206
- ff_core_NodeSystem.NodeSystem_writeErrorText(self_, (text_ + "\n"))
207
- }
208
-
209
- export async function NodeSystem_arguments$(self_, $task) {
210
- return self_.array_
211
- }
212
-
213
- export async function NodeSystem_assets$(self_, $task) {
214
- const assetPkgSnapshotPath_ = (await ff_core_NodeSystem.NodeSystem_path$(self_, "/snapshot/output/assets", $task));
215
- if((await ff_core_Path.Path_isDirectory$(assetPkgSnapshotPath_, $task))) {
216
- async function streams_$(path_, $task) {
217
- return (await ff_core_Stream.Stream_flatMap$((await ff_core_Array.Array_toStream$((await ff_core_NodeSystem.internalListDirectoryWithoutOpendir_$(self_, path_, $task)), false, $task)), (async (file_, $task) => {
218
- if((await ff_core_Path.Path_isDirectory$(file_, $task))) {
219
- return (await streams_$(file_, $task))
220
- } else {
221
- return (await ff_core_List.List_toStream$(ff_core_List.Link(ff_core_Pair.Pair(("/" + (await ff_core_Path.Path_relativeTo$(file_, assetPkgSnapshotPath_, $task))), (async ($task) => {
222
- return (await ff_core_Path.Path_readStream$(file_, $task))
223
- })), ff_core_List.Empty()), false, $task))
224
- }
225
- }), $task))
226
- }
227
- return ff_core_AssetSystem.AssetSystem((await ff_core_Stream.Stream_toMap$((await streams_$(assetPkgSnapshotPath_, $task)), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, $task)))
228
- } else {
229
- return (await ff_core_NodeSystem.internalAssets_$(self_, $task))
230
- }
231
- }
232
-
233
- export async function NodeSystem_path$(self_, relativePath_, $task) {
122
+
123
+ }
124
+
125
+ export function NodeSystem_arguments(self_) {
126
+ throw new Error('Function NodeSystem_arguments is missing on this target in sync context.');
127
+ }
128
+
129
+ export function NodeSystem_assets(self_) {
130
+ const assetPkgSnapshotPath_ = ff_core_NodeSystem.NodeSystem_path(self_, "/snapshot/output/assets");
131
+ if(ff_core_Path.Path_isDirectory(assetPkgSnapshotPath_)) {
132
+ function streams_(path_) {
133
+ return ff_core_Stream.Stream_flatMap(ff_core_Array.Array_toStream(ff_core_NodeSystem.internalListDirectoryWithoutOpendir_(self_, path_), false), ((file_) => {
134
+ if(ff_core_Path.Path_isDirectory(file_)) {
135
+ return streams_(file_)
136
+ } else {
137
+ return ff_core_List.List_toStream(ff_core_List.Link(ff_core_Pair.Pair(("/" + ff_core_Path.Path_relativeTo(file_, assetPkgSnapshotPath_)), (() => {
138
+ return ff_core_Path.Path_readStream(file_)
139
+ })), ff_core_List.Empty()), false)
140
+ }
141
+ }))
142
+ }
143
+ return ff_core_AssetSystem.AssetSystem(ff_core_Stream.Stream_toMap(streams_(assetPkgSnapshotPath_), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String))
144
+ } else {
145
+ return ff_core_NodeSystem.internalAssets_(self_)
146
+ }
147
+ }
148
+
149
+ export function NodeSystem_path(self_, relativePath_) {
150
+ throw new Error('Function NodeSystem_path is missing on this target in sync context.');
151
+ }
152
+
153
+ export function NodeSystem_pathFromUrl(self_, url_) {
154
+ throw new Error('Function NodeSystem_pathFromUrl is missing on this target in sync context.');
155
+ }
156
+
157
+ export function NodeSystem_httpClient(self_) {
158
+ throw new Error('Function NodeSystem_httpClient is missing on this target in sync context.');
159
+ }
160
+
161
+ export function NodeSystem_mainTask(self_) {
162
+ throw new Error('Function NodeSystem_mainTask is missing on this target in sync context.');
163
+ }
164
+
165
+ export function NodeSystem_js(self_) {
166
+ throw new Error('Function NodeSystem_js is missing on this target in sync context.');
167
+ }
168
+
169
+ export function NodeSystem_exit(self_, exitCode_ = 0) {
170
+ throw new Error('Function NodeSystem_exit is missing on this target in sync context.');
171
+ }
172
+
173
+ export function NodeSystem_readStream(self_) {
174
+ throw new Error('Function NodeSystem_readStream is missing on this target in sync context.');
175
+ }
176
+
177
+ export function NodeSystem_writeBuffer(self_, buffer_) {
178
+ throw new Error('Function NodeSystem_writeBuffer is missing on this target in sync context.');
179
+ }
180
+
181
+ export function NodeSystem_writeStream(self_, stream_) {
182
+ ff_core_Stream.Stream_each(stream_, ((_w1) => {
183
+ ff_core_NodeSystem.NodeSystem_writeBuffer(self_, _w1)
184
+ }))
185
+ }
186
+
187
+ export function NodeSystem_writeText(self_, text_) {
188
+ ff_core_NodeSystem.NodeSystem_writeBuffer(self_, ff_core_String.String_toBuffer(text_))
189
+ }
190
+
191
+ export function NodeSystem_writeLine(self_, text_) {
192
+ ff_core_NodeSystem.NodeSystem_writeText(self_, (text_ + "\n"))
193
+ }
194
+
195
+ export function NodeSystem_writeErrorBuffer(self_, buffer_) {
196
+ throw new Error('Function NodeSystem_writeErrorBuffer is missing on this target in sync context.');
197
+ }
198
+
199
+ export function NodeSystem_writeErrorStream(self_, stream_) {
200
+ ff_core_Stream.Stream_each(stream_, ((_w1) => {
201
+ ff_core_NodeSystem.NodeSystem_writeErrorBuffer(self_, _w1)
202
+ }))
203
+ }
204
+
205
+ export function NodeSystem_writeErrorText(self_, text_) {
206
+ ff_core_NodeSystem.NodeSystem_writeErrorBuffer(self_, ff_core_String.String_toBuffer(text_))
207
+ }
208
+
209
+ export function NodeSystem_writeErrorLine(self_, text_) {
210
+ ff_core_NodeSystem.NodeSystem_writeErrorText(self_, (text_ + "\n"))
211
+ }
212
+
213
+ export async function NodeSystem_arguments$(self_, $task) {
214
+ return self_.array_
215
+ }
216
+
217
+ export async function NodeSystem_assets$(self_, $task) {
218
+ const assetPkgSnapshotPath_ = (await ff_core_NodeSystem.NodeSystem_path$(self_, "/snapshot/output/assets", $task));
219
+ if((await ff_core_Path.Path_isDirectory$(assetPkgSnapshotPath_, $task))) {
220
+ async function streams_$(path_, $task) {
221
+ return (await ff_core_Stream.Stream_flatMap$((await ff_core_Array.Array_toStream$((await ff_core_NodeSystem.internalListDirectoryWithoutOpendir_$(self_, path_, $task)), false, $task)), (async (file_, $task) => {
222
+ if((await ff_core_Path.Path_isDirectory$(file_, $task))) {
223
+ return (await streams_$(file_, $task))
224
+ } else {
225
+ return (await ff_core_List.List_toStream$(ff_core_List.Link(ff_core_Pair.Pair(("/" + (await ff_core_Path.Path_relativeTo$(file_, assetPkgSnapshotPath_, $task))), (async ($task) => {
226
+ return (await ff_core_Path.Path_readStream$(file_, $task))
227
+ })), ff_core_List.Empty()), false, $task))
228
+ }
229
+ }), $task))
230
+ }
231
+ return ff_core_AssetSystem.AssetSystem((await ff_core_Stream.Stream_toMap$((await streams_$(assetPkgSnapshotPath_, $task)), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, $task)))
232
+ } else {
233
+ return (await ff_core_NodeSystem.internalAssets_$(self_, $task))
234
+ }
235
+ }
236
+
237
+ export async function NodeSystem_path$(self_, relativePath_, $task) {
234
238
 
235
239
  const path = import$1
236
240
  return path.resolve(relativePath_)
237
-
238
- }
239
-
240
- export async function NodeSystem_pathFromUrl$(self_, url_, $task) {
241
+
242
+ }
243
+
244
+ export async function NodeSystem_pathFromUrl$(self_, url_, $task) {
241
245
 
242
246
  const url = import$2;
243
247
  return url.fileURLToPath(new URL(url_));
244
-
245
- }
246
-
247
- export async function NodeSystem_httpClient$(self_, $task) {
248
- return null
249
- }
250
-
251
- export async function NodeSystem_mainTask$(self_, $task) {
252
- return self_.task_
253
- }
254
-
255
- export async function NodeSystem_js$(self_, $task) {
256
- return typeof globalThis !== 'undefined' ? globalThis : window
257
- }
258
-
259
- export async function NodeSystem_exit$(self_, exitCode_ = 0, $task) {
260
- process.exit(exitCode_)
261
- }
262
-
263
- export async function NodeSystem_readStream$(self_, $task) {
248
+
249
+ }
250
+
251
+ export async function NodeSystem_httpClient$(self_, $task) {
252
+ return null
253
+ }
254
+
255
+ export async function NodeSystem_mainTask$(self_, $task) {
256
+ return self_.task_
257
+ }
258
+
259
+ export async function NodeSystem_js$(self_, $task) {
260
+ return typeof globalThis !== 'undefined' ? globalThis : window
261
+ }
262
+
263
+ export async function NodeSystem_exit$(self_, exitCode_ = 0, $task) {
264
+ process.exit(exitCode_)
265
+ }
266
+
267
+ export async function NodeSystem_readStream$(self_, $task) {
264
268
 
265
269
  return ff_core_Path.internalReadStream_$(() => process.stdin)
266
-
267
- }
268
-
269
- export async function NodeSystem_writeBuffer$(self_, buffer_, $task) {
270
- process.stdout.write(new Uint8Array(buffer_.buffer, buffer_.byteOffset, buffer_.byteLength))
271
- }
272
-
273
- export async function NodeSystem_writeStream$(self_, stream_, $task) {
274
- (await ff_core_Stream.Stream_each$(stream_, (async (_w1, $task) => {
275
- (await ff_core_NodeSystem.NodeSystem_writeBuffer$(self_, _w1, $task))
276
- }), $task))
277
- }
278
-
279
- export async function NodeSystem_writeText$(self_, text_, $task) {
280
- (await ff_core_NodeSystem.NodeSystem_writeBuffer$(self_, ff_core_String.String_toBuffer(text_), $task))
281
- }
282
-
283
- export async function NodeSystem_writeLine$(self_, text_, $task) {
284
- (await ff_core_NodeSystem.NodeSystem_writeText$(self_, (text_ + "\n"), $task))
285
- }
286
-
287
- export async function NodeSystem_writeErrorBuffer$(self_, buffer_, $task) {
288
- process.stderr.write(new Uint8Array(buffer_.buffer, buffer_.byteOffset, buffer_.byteLength))
289
- }
290
-
291
- export async function NodeSystem_writeErrorStream$(self_, stream_, $task) {
292
- (await ff_core_Stream.Stream_each$(stream_, (async (_w1, $task) => {
293
- (await ff_core_NodeSystem.NodeSystem_writeErrorBuffer$(self_, _w1, $task))
294
- }), $task))
295
- }
296
-
297
- export async function NodeSystem_writeErrorText$(self_, text_, $task) {
298
- (await ff_core_NodeSystem.NodeSystem_writeErrorBuffer$(self_, ff_core_String.String_toBuffer(text_), $task))
299
- }
300
-
301
- export async function NodeSystem_writeErrorLine$(self_, text_, $task) {
302
- (await ff_core_NodeSystem.NodeSystem_writeErrorText$(self_, (text_ + "\n"), $task))
303
- }
304
-
305
-
306
-
307
-
270
+
271
+ }
272
+
273
+ export async function NodeSystem_writeBuffer$(self_, buffer_, $task) {
274
+ process.stdout.write(new Uint8Array(buffer_.buffer, buffer_.byteOffset, buffer_.byteLength))
275
+ }
276
+
277
+ export async function NodeSystem_writeStream$(self_, stream_, $task) {
278
+ (await ff_core_Stream.Stream_each$(stream_, (async (_w1, $task) => {
279
+ (await ff_core_NodeSystem.NodeSystem_writeBuffer$(self_, _w1, $task))
280
+ }), $task))
281
+ }
282
+
283
+ export async function NodeSystem_writeText$(self_, text_, $task) {
284
+ (await ff_core_NodeSystem.NodeSystem_writeBuffer$(self_, ff_core_String.String_toBuffer(text_), $task))
285
+ }
286
+
287
+ export async function NodeSystem_writeLine$(self_, text_, $task) {
288
+ (await ff_core_NodeSystem.NodeSystem_writeText$(self_, (text_ + "\n"), $task))
289
+ }
290
+
291
+ export async function NodeSystem_writeErrorBuffer$(self_, buffer_, $task) {
292
+ process.stderr.write(new Uint8Array(buffer_.buffer, buffer_.byteOffset, buffer_.byteLength))
293
+ }
294
+
295
+ export async function NodeSystem_writeErrorStream$(self_, stream_, $task) {
296
+ (await ff_core_Stream.Stream_each$(stream_, (async (_w1, $task) => {
297
+ (await ff_core_NodeSystem.NodeSystem_writeErrorBuffer$(self_, _w1, $task))
298
+ }), $task))
299
+ }
300
+
301
+ export async function NodeSystem_writeErrorText$(self_, text_, $task) {
302
+ (await ff_core_NodeSystem.NodeSystem_writeErrorBuffer$(self_, ff_core_String.String_toBuffer(text_), $task))
303
+ }
304
+
305
+ export async function NodeSystem_writeErrorLine$(self_, text_, $task) {
306
+ (await ff_core_NodeSystem.NodeSystem_writeErrorText$(self_, (text_ + "\n"), $task))
307
+ }
308
+
309
+
310
+
311
+