firefly-compiler 0.4.18 → 0.4.20

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 (116) hide show
  1. package/compiler/Builder.ff +1 -1
  2. package/compiler/Compiler.ff +6 -5
  3. package/compiler/Inference.ff +31 -19
  4. package/compiler/JsEmitter.ff +98 -71
  5. package/compiler/JsImporter.ff +1 -1
  6. package/compiler/LspHook.ff +17 -5
  7. package/compiler/Main.ff +6 -6
  8. package/compiler/Parser.ff +50 -52
  9. package/compiler/Patterns.ff +2 -0
  10. package/compiler/Syntax.ff +1 -1
  11. package/compiler/Tokenizer.ff +2 -2
  12. package/compiler/Workspace.ff +2 -2
  13. package/core/Array.ff +135 -294
  14. package/core/Buffer.ff +3 -3
  15. package/core/BuildSystem.ff +1 -1
  16. package/core/Equal.ff +36 -52
  17. package/core/HttpClient.ff +1 -1
  18. package/core/IntMap.ff +14 -18
  19. package/core/JsSystem.ff +1 -1
  20. package/core/JsValue.ff +6 -12
  21. package/core/Json.ff +21 -30
  22. package/core/List.ff +281 -312
  23. package/core/Map.ff +4 -8
  24. package/core/NodeSystem.ff +2 -2
  25. package/core/Option.ff +0 -4
  26. package/core/Ordering.ff +10 -6
  27. package/core/Pair.ff +0 -4
  28. package/core/Random.ff +12 -26
  29. package/core/RbMap.ff +216 -216
  30. package/core/Serializable.ff +9 -18
  31. package/core/Set.ff +0 -1
  32. package/core/SourceLocation.ff +1 -1
  33. package/core/Stream.ff +10 -14
  34. package/core/String.ff +24 -6
  35. package/core/StringMap.ff +15 -19
  36. package/guide/Main.ff +20 -2
  37. package/lsp/CompletionHandler.ff +18 -18
  38. package/lsp/Handler.ff +45 -34
  39. package/lsp/HoverHandler.ff +2 -2
  40. package/lsp/LanguageServer.ff +2 -2
  41. package/lsp/SignatureHelpHandler.ff +1 -1
  42. package/lsp/SymbolHandler.ff +19 -5
  43. package/lux/Lux.ff +3 -3
  44. package/output/js/ff/compiler/Builder.mjs +19 -21
  45. package/output/js/ff/compiler/Compiler.mjs +18 -20
  46. package/output/js/ff/compiler/Dependencies.mjs +8 -10
  47. package/output/js/ff/compiler/Deriver.mjs +234 -236
  48. package/output/js/ff/compiler/Dictionaries.mjs +6 -8
  49. package/output/js/ff/compiler/Environment.mjs +42 -44
  50. package/output/js/ff/compiler/Inference.mjs +346 -304
  51. package/output/js/ff/compiler/JsEmitter.mjs +907 -833
  52. package/output/js/ff/compiler/JsImporter.mjs +0 -2
  53. package/output/js/ff/compiler/LspHook.mjs +872 -51
  54. package/output/js/ff/compiler/Main.mjs +109 -111
  55. package/output/js/ff/compiler/Parser.mjs +427 -441
  56. package/output/js/ff/compiler/Patterns.mjs +64 -50
  57. package/output/js/ff/compiler/Resolver.mjs +36 -38
  58. package/output/js/ff/compiler/Substitution.mjs +4 -6
  59. package/output/js/ff/compiler/Syntax.mjs +160 -162
  60. package/output/js/ff/compiler/Token.mjs +52 -54
  61. package/output/js/ff/compiler/Tokenizer.mjs +16 -18
  62. package/output/js/ff/compiler/Unification.mjs +24 -26
  63. package/output/js/ff/compiler/Wildcards.mjs +0 -2
  64. package/output/js/ff/compiler/Workspace.mjs +18 -20
  65. package/output/js/ff/core/Any.mjs +0 -2
  66. package/output/js/ff/core/Array.mjs +216 -613
  67. package/output/js/ff/core/AssetSystem.mjs +2 -4
  68. package/output/js/ff/core/Atomic.mjs +0 -2
  69. package/output/js/ff/core/Bool.mjs +0 -2
  70. package/output/js/ff/core/Box.mjs +0 -2
  71. package/output/js/ff/core/BrowserSystem.mjs +0 -2
  72. package/output/js/ff/core/Buffer.mjs +0 -2
  73. package/output/js/ff/core/BuildSystem.mjs +12 -14
  74. package/output/js/ff/core/Channel.mjs +0 -2
  75. package/output/js/ff/core/Char.mjs +0 -2
  76. package/output/js/ff/core/Core.mjs +0 -2
  77. package/output/js/ff/core/Duration.mjs +0 -2
  78. package/output/js/ff/core/Equal.mjs +0 -22
  79. package/output/js/ff/core/Error.mjs +0 -2
  80. package/output/js/ff/core/FileHandle.mjs +0 -2
  81. package/output/js/ff/core/Float.mjs +0 -2
  82. package/output/js/ff/core/HttpClient.mjs +2 -4
  83. package/output/js/ff/core/Instant.mjs +0 -2
  84. package/output/js/ff/core/Int.mjs +8 -10
  85. package/output/js/ff/core/IntMap.mjs +32 -42
  86. package/output/js/ff/core/JsSystem.mjs +1 -3
  87. package/output/js/ff/core/JsValue.mjs +5 -12
  88. package/output/js/ff/core/Json.mjs +25 -58
  89. package/output/js/ff/core/List.mjs +648 -1989
  90. package/output/js/ff/core/Lock.mjs +0 -2
  91. package/output/js/ff/core/Log.mjs +0 -2
  92. package/output/js/ff/core/Map.mjs +10 -20
  93. package/output/js/ff/core/NodeSystem.mjs +6 -8
  94. package/output/js/ff/core/Nothing.mjs +0 -2
  95. package/output/js/ff/core/Option.mjs +8 -18
  96. package/output/js/ff/core/Ordering.mjs +20 -98
  97. package/output/js/ff/core/Pair.mjs +6 -16
  98. package/output/js/ff/core/Path.mjs +12 -14
  99. package/output/js/ff/core/Random.mjs +24 -54
  100. package/output/js/ff/core/RbMap.mjs +54 -56
  101. package/output/js/ff/core/Serializable.mjs +19 -36
  102. package/output/js/ff/core/Set.mjs +0 -14
  103. package/output/js/ff/core/Show.mjs +0 -2
  104. package/output/js/ff/core/SourceLocation.mjs +0 -2
  105. package/output/js/ff/core/Stream.mjs +34 -44
  106. package/output/js/ff/core/String.mjs +31 -5
  107. package/output/js/ff/core/StringMap.mjs +32 -42
  108. package/output/js/ff/core/Task.mjs +0 -2
  109. package/output/js/ff/core/Try.mjs +0 -2
  110. package/output/js/ff/core/Unit.mjs +0 -2
  111. package/package.json +1 -1
  112. package/vscode/client/src/extension.ts +30 -2
  113. package/vscode/package.json +17 -1
  114. package/webserver/WebServer.ff +8 -8
  115. package/core/Stack.ff +0 -263
  116. package/output/js/ff/core/Stack.mjs +0 -603
@@ -78,8 +78,6 @@ import * as ff_core_Show from "../../ff/core/Show.mjs"
78
78
 
79
79
  import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
80
80
 
81
- import * as ff_core_Stack from "../../ff/core/Stack.mjs"
82
-
83
81
  import * as ff_core_Stream from "../../ff/core/Stream.mjs"
84
82
 
85
83
  import * as ff_core_String from "../../ff/core/String.mjs"
@@ -100,11 +98,11 @@ return {files_};
100
98
 
101
99
 
102
100
  export function create_() {
103
- return ff_core_AssetSystem.AssetSystem(ff_core_List.List_toMap(ff_core_List.Empty(), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String))
101
+ return ff_core_AssetSystem.AssetSystem(ff_core_List.List_toMap([], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String))
104
102
  }
105
103
 
106
104
  export async function create_$($task) {
107
- return ff_core_AssetSystem.AssetSystem(ff_core_List.List_toMap(ff_core_List.Empty(), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String))
105
+ return ff_core_AssetSystem.AssetSystem(ff_core_List.List_toMap([], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String))
108
106
  }
109
107
 
110
108
  export function AssetSystem_addAssets(self_, path_, assets_) {
@@ -78,8 +78,6 @@ import * as ff_core_Show from "../../ff/core/Show.mjs"
78
78
 
79
79
  import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
80
80
 
81
- import * as ff_core_Stack from "../../ff/core/Stack.mjs"
82
-
83
81
  import * as ff_core_Stream from "../../ff/core/Stream.mjs"
84
82
 
85
83
  import * as ff_core_String from "../../ff/core/String.mjs"
@@ -78,8 +78,6 @@ import * as ff_core_Show from "../../ff/core/Show.mjs"
78
78
 
79
79
  import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
80
80
 
81
- import * as ff_core_Stack from "../../ff/core/Stack.mjs"
82
-
83
81
  import * as ff_core_Stream from "../../ff/core/Stream.mjs"
84
82
 
85
83
  import * as ff_core_String from "../../ff/core/String.mjs"
@@ -78,8 +78,6 @@ import * as ff_core_Show from "../../ff/core/Show.mjs"
78
78
 
79
79
  import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
80
80
 
81
- import * as ff_core_Stack from "../../ff/core/Stack.mjs"
82
-
83
81
  import * as ff_core_Stream from "../../ff/core/Stream.mjs"
84
82
 
85
83
  import * as ff_core_String from "../../ff/core/String.mjs"
@@ -78,8 +78,6 @@ import * as ff_core_Show from "../../ff/core/Show.mjs"
78
78
 
79
79
  import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
80
80
 
81
- import * as ff_core_Stack from "../../ff/core/Stack.mjs"
82
-
83
81
  import * as ff_core_Stream from "../../ff/core/Stream.mjs"
84
82
 
85
83
  import * as ff_core_String from "../../ff/core/String.mjs"
@@ -78,8 +78,6 @@ import * as ff_core_Show from "../../ff/core/Show.mjs"
78
78
 
79
79
  import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
80
80
 
81
- import * as ff_core_Stack from "../../ff/core/Stack.mjs"
82
-
83
81
  import * as ff_core_Stream from "../../ff/core/Stream.mjs"
84
82
 
85
83
  import * as ff_core_String from "../../ff/core/String.mjs"
@@ -78,8 +78,6 @@ import * as ff_core_Show from "../../ff/core/Show.mjs"
78
78
 
79
79
  import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
80
80
 
81
- import * as ff_core_Stack from "../../ff/core/Stack.mjs"
82
-
83
81
  import * as ff_core_Stream from "../../ff/core/Stream.mjs"
84
82
 
85
83
  import * as ff_core_String from "../../ff/core/String.mjs"
@@ -121,7 +119,7 @@ return ff_core_Stream.Stream_flatMap(ff_core_Path.Path_entries(currentPath_), ((
121
119
  if(ff_core_Path.PathEntry_isDirectory(file_)) {
122
120
  return go_(ff_core_Path.PathEntry_path(file_))
123
121
  } else {
124
- return ff_core_List.List_toStream(ff_core_List.Link(ff_core_Path.PathEntry_path(file_), ff_core_List.Empty()), false)
122
+ return ff_core_List.List_toStream([ff_core_Path.PathEntry_path(file_)], false)
125
123
  }
126
124
  }))
127
125
  }
@@ -182,7 +180,7 @@ return (await ff_core_Stream.Stream_flatMap$((await ff_core_Path.Path_entries$(c
182
180
  if((await ff_core_Path.PathEntry_isDirectory$(file_, $task))) {
183
181
  return (await go_$((await ff_core_Path.PathEntry_path$(file_, $task)), $task))
184
182
  } else {
185
- return (await ff_core_List.List_toStream$(ff_core_List.Link((await ff_core_Path.PathEntry_path$(file_, $task)), ff_core_List.Empty()), false, $task))
183
+ return (await ff_core_List.List_toStream$([(await ff_core_Path.PathEntry_path$(file_, $task))], false, $task))
186
184
  }
187
185
  }), $task))
188
186
  }
@@ -286,13 +284,13 @@ const mainJsFile_ = ((((((prefix_ + "/") + self_.packageGroup_) + "/") + self_.p
286
284
  const mainDirectory_ = ff_core_Option.Option_grab(ff_core_Path.Path_parent(self_.mainFile_));
287
285
  const file_ = (prefix_ + "/Main.bundle.js");
288
286
  ff_core_BuildSystem.internalCallEsBuild_(self_, mainJsFile_, file_, minify_, sourceMap_);
289
- const assets_ = ff_core_AssetSystem.AssetSystem(ff_core_List.List_toMap(ff_core_List.Link(ff_core_Pair.Pair(ff_core_String.String_dropFirst(file_, ff_core_String.String_size(prefix_)), (() => {
287
+ const assets_ = ff_core_AssetSystem.AssetSystem(ff_core_List.List_toMap([ff_core_Pair.Pair(ff_core_String.String_dropFirst(file_, ff_core_String.String_size(prefix_)), (() => {
290
288
  return ff_core_Path.Path_readStream(ff_core_Path.Path_path(mainDirectory_, file_))
291
- })), (sourceMap_
292
- ? ff_core_List.Link(ff_core_Pair.Pair((ff_core_String.String_dropFirst(file_, ff_core_String.String_size(prefix_)) + ".map"), (() => {
289
+ })), ...(sourceMap_
290
+ ? [ff_core_Pair.Pair((ff_core_String.String_dropFirst(file_, ff_core_String.String_size(prefix_)) + ".map"), (() => {
293
291
  return ff_core_Path.Path_readStream(ff_core_Path.Path_path(mainDirectory_, (file_ + ".map")))
294
- })), ff_core_List.Empty())
295
- : ff_core_List.Empty())), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String));
292
+ }))]
293
+ : [])], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String));
296
294
  return ff_core_BuildSystem.BrowserBundle(assets_)
297
295
  }
298
296
 
@@ -307,13 +305,13 @@ const mainJsFile_ = ((((((prefix_ + "/") + self_.packageGroup_) + "/") + self_.p
307
305
  const mainDirectory_ = ff_core_Option.Option_grab((await ff_core_Path.Path_parent$(self_.mainFile_, $task)));
308
306
  const file_ = (prefix_ + "/Main.bundle.js");
309
307
  (await ff_core_BuildSystem.internalCallEsBuild_$(self_, mainJsFile_, file_, minify_, sourceMap_, $task));
310
- const assets_ = ff_core_AssetSystem.AssetSystem(ff_core_List.List_toMap(ff_core_List.Link(ff_core_Pair.Pair(ff_core_String.String_dropFirst(file_, ff_core_String.String_size(prefix_)), (async ($task) => {
308
+ const assets_ = ff_core_AssetSystem.AssetSystem(ff_core_List.List_toMap([ff_core_Pair.Pair(ff_core_String.String_dropFirst(file_, ff_core_String.String_size(prefix_)), (async ($task) => {
311
309
  return (await ff_core_Path.Path_readStream$((await ff_core_Path.Path_path$(mainDirectory_, file_, $task)), $task))
312
- })), (sourceMap_
313
- ? ff_core_List.Link(ff_core_Pair.Pair((ff_core_String.String_dropFirst(file_, ff_core_String.String_size(prefix_)) + ".map"), (async ($task) => {
310
+ })), ...(sourceMap_
311
+ ? [ff_core_Pair.Pair((ff_core_String.String_dropFirst(file_, ff_core_String.String_size(prefix_)) + ".map"), (async ($task) => {
314
312
  return (await ff_core_Path.Path_readStream$((await ff_core_Path.Path_path$(mainDirectory_, (file_ + ".map"), $task)), $task))
315
- })), ff_core_List.Empty())
316
- : ff_core_List.Empty())), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String));
313
+ }))]
314
+ : [])], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String));
317
315
  return ff_core_BuildSystem.BrowserBundle(assets_)
318
316
  }
319
317
 
@@ -78,8 +78,6 @@ import * as ff_core_Show from "../../ff/core/Show.mjs"
78
78
 
79
79
  import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
80
80
 
81
- import * as ff_core_Stack from "../../ff/core/Stack.mjs"
82
-
83
81
  import * as ff_core_Stream from "../../ff/core/Stream.mjs"
84
82
 
85
83
  import * as ff_core_String from "../../ff/core/String.mjs"
@@ -78,8 +78,6 @@ import * as ff_core_Show from "../../ff/core/Show.mjs"
78
78
 
79
79
  import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
80
80
 
81
- import * as ff_core_Stack from "../../ff/core/Stack.mjs"
82
-
83
81
  import * as ff_core_Stream from "../../ff/core/Stream.mjs"
84
82
 
85
83
  import * as ff_core_String from "../../ff/core/String.mjs"
@@ -78,8 +78,6 @@ import * as ff_core_Show from "../../ff/core/Show.mjs"
78
78
 
79
79
  import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
80
80
 
81
- import * as ff_core_Stack from "../../ff/core/Stack.mjs"
82
-
83
81
  import * as ff_core_Stream from "../../ff/core/Stream.mjs"
84
82
 
85
83
  import * as ff_core_String from "../../ff/core/String.mjs"
@@ -78,8 +78,6 @@ import * as ff_core_Show from "../../ff/core/Show.mjs"
78
78
 
79
79
  import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
80
80
 
81
- import * as ff_core_Stack from "../../ff/core/Stack.mjs"
82
-
83
81
  import * as ff_core_Stream from "../../ff/core/Stream.mjs"
84
82
 
85
83
  import * as ff_core_String from "../../ff/core/String.mjs"
@@ -78,8 +78,6 @@ import * as ff_core_Show from "../../ff/core/Show.mjs"
78
78
 
79
79
  import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
80
80
 
81
- import * as ff_core_Stack from "../../ff/core/Stack.mjs"
82
-
83
81
  import * as ff_core_Stream from "../../ff/core/Stream.mjs"
84
82
 
85
83
  import * as ff_core_String from "../../ff/core/String.mjs"
@@ -160,24 +158,4 @@ throw new Error('Function equals is missing on this target in async context.');
160
158
  }
161
159
  };
162
160
 
163
- export const ff_core_Equal_Equal$ff_core_List_List = {
164
- equals_(x_, y_) {
165
-
166
- let a = x_
167
- let b = y_
168
- if(a === b) return true
169
- while(a.Link && b.Link) {
170
- if(a === b) return true
171
- if(!ff_core_Equal_Equal$T.equals_(a.head_, b.head_)) return false
172
- a = a.tail_
173
- b = b.tail_
174
- }
175
- return a.Empty && b.Empty
176
-
177
- },
178
- async equals_$(x_, y_, $task) {
179
- throw new Error('Function equals is missing on this target in async context.');
180
- }
181
- };
182
-
183
161
 
@@ -78,8 +78,6 @@ import * as ff_core_Show from "../../ff/core/Show.mjs"
78
78
 
79
79
  import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
80
80
 
81
- import * as ff_core_Stack from "../../ff/core/Stack.mjs"
82
-
83
81
  import * as ff_core_Stream from "../../ff/core/Stream.mjs"
84
82
 
85
83
  import * as ff_core_String from "../../ff/core/String.mjs"
@@ -78,8 +78,6 @@ import * as ff_core_Show from "../../ff/core/Show.mjs"
78
78
 
79
79
  import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
80
80
 
81
- import * as ff_core_Stack from "../../ff/core/Stack.mjs"
82
-
83
81
  import * as ff_core_Stream from "../../ff/core/Stream.mjs"
84
82
 
85
83
  import * as ff_core_String from "../../ff/core/String.mjs"
@@ -78,8 +78,6 @@ import * as ff_core_Show from "../../ff/core/Show.mjs"
78
78
 
79
79
  import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
80
80
 
81
- import * as ff_core_Stack from "../../ff/core/Stack.mjs"
82
-
83
81
  import * as ff_core_Stream from "../../ff/core/Stream.mjs"
84
82
 
85
83
  import * as ff_core_String from "../../ff/core/String.mjs"
@@ -78,8 +78,6 @@ import * as ff_core_Show from "../../ff/core/Show.mjs"
78
78
 
79
79
  import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
80
80
 
81
- import * as ff_core_Stack from "../../ff/core/Stack.mjs"
82
-
83
81
  import * as ff_core_Stream from "../../ff/core/Stream.mjs"
84
82
 
85
83
  import * as ff_core_String from "../../ff/core/String.mjs"
@@ -115,7 +113,7 @@ export function RedirectManual() {
115
113
  return RedirectManual$;
116
114
  }
117
115
 
118
- export const emptyList_ = ff_core_List.Empty();
116
+ export const emptyList_ = [];
119
117
 
120
118
  export function bodyText_(body_) {
121
119
  return body_
@@ -142,7 +140,7 @@ export async function HttpClient_fetch$(self_, url_, method_ = "GET", headers_ =
142
140
  try {
143
141
  const options = {headers: {}, signal: $task.controller.signal}
144
142
  options.method = method_
145
- ff_core_List.List_each(headers_, pair => {options.headers[pair.first_] = pair.second_})
143
+ headers_.forEach(pair => {options.headers[pair.first_] = pair.second_})
146
144
  if(body_.value_) options.body = body_.value_
147
145
  if(redirect_.RedirectError) options.redirect = "error"
148
146
  else if(redirect_.RedirectManual) options.redirect = "manual"
@@ -78,8 +78,6 @@ import * as ff_core_Show from "../../ff/core/Show.mjs"
78
78
 
79
79
  import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
80
80
 
81
- import * as ff_core_Stack from "../../ff/core/Stack.mjs"
82
-
83
81
  import * as ff_core_Stream from "../../ff/core/Stream.mjs"
84
82
 
85
83
  import * as ff_core_String from "../../ff/core/String.mjs"
@@ -78,8 +78,6 @@ import * as ff_core_Show from "../../ff/core/Show.mjs"
78
78
 
79
79
  import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
80
80
 
81
- import * as ff_core_Stack from "../../ff/core/Stack.mjs"
82
-
83
81
  import * as ff_core_Stream from "../../ff/core/Stream.mjs"
84
82
 
85
83
  import * as ff_core_String from "../../ff/core/String.mjs"
@@ -134,20 +132,20 @@ return signed_ ? self_ >> bits_ : self_ >>> bits_;
134
132
  }
135
133
 
136
134
  export function Int_to(self_, inclusiveEnd_) {
137
- let result_ = ff_core_List.Empty();
135
+ let result_ = [];
138
136
  let n_ = inclusiveEnd_;
139
137
  while((self_ <= n_)) {
140
- result_ = ff_core_List.Link(n_, result_);
138
+ result_ = [n_, ...result_];
141
139
  n_ -= 1
142
140
  };
143
141
  return result_
144
142
  }
145
143
 
146
144
  export function Int_until(self_, exclusiveEnd_) {
147
- let result_ = ff_core_List.Empty();
145
+ let result_ = [];
148
146
  let n_ = exclusiveEnd_;
149
147
  while((self_ < n_)) {
150
- result_ = ff_core_List.Link((n_ - 1), result_);
148
+ result_ = [(n_ - 1), ...result_];
151
149
  n_ -= 1
152
150
  };
153
151
  return result_
@@ -216,20 +214,20 @@ throw new Error('Function Int_bitRight is missing on this target in async contex
216
214
  }
217
215
 
218
216
  export async function Int_to$(self_, inclusiveEnd_, $task) {
219
- let result_ = ff_core_List.Empty();
217
+ let result_ = [];
220
218
  let n_ = inclusiveEnd_;
221
219
  while((self_ <= n_)) {
222
- result_ = ff_core_List.Link(n_, result_);
220
+ result_ = [n_, ...result_];
223
221
  n_ -= 1
224
222
  };
225
223
  return result_
226
224
  }
227
225
 
228
226
  export async function Int_until$(self_, exclusiveEnd_, $task) {
229
- let result_ = ff_core_List.Empty();
227
+ let result_ = [];
230
228
  let n_ = exclusiveEnd_;
231
229
  while((self_ < n_)) {
232
- result_ = ff_core_List.Link((n_ - 1), result_);
230
+ result_ = [(n_ - 1), ...result_];
233
231
  n_ -= 1
234
232
  };
235
233
  return result_
@@ -78,8 +78,6 @@ import * as ff_core_Show from "../../ff/core/Show.mjs"
78
78
 
79
79
  import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
80
80
 
81
- import * as ff_core_Stack from "../../ff/core/Stack.mjs"
82
-
83
81
  import * as ff_core_Stream from "../../ff/core/Stream.mjs"
84
82
 
85
83
  import * as ff_core_String from "../../ff/core/String.mjs"
@@ -147,44 +145,40 @@ export function IntMap_eachWhile(self_, body_) {
147
145
  for(const [k, v] of self_) if(!body_(k, v)) break
148
146
  }
149
147
 
150
- export function IntMap_toStack(self_) {
151
- const stack_ = ff_core_Stack.make_();
148
+ export function IntMap_toArray(self_) {
149
+ const array_ = ff_core_Array.make_();
152
150
  ff_core_IntMap.IntMap_each(self_, ((k_, v_) => {
153
- ff_core_Stack.Stack_push(stack_, ff_core_Pair.Pair(k_, v_))
151
+ ff_core_Array.Array_push(array_, ff_core_Pair.Pair(k_, v_))
154
152
  }));
155
- return stack_
156
- }
157
-
158
- export function IntMap_toArray(self_) {
159
- return ff_core_Stack.Stack_drain(ff_core_IntMap.IntMap_toStack(self_))
153
+ return array_
160
154
  }
161
155
 
162
156
  export function IntMap_toList(self_) {
163
- return ff_core_Array.Array_toList(ff_core_IntMap.IntMap_toArray(self_))
157
+ return ff_core_Array.Array_drain(ff_core_IntMap.IntMap_toArray(self_))
164
158
  }
165
159
 
166
160
  export function IntMap_toStream(self_) {
167
- return ff_core_Array.Array_toStream(ff_core_IntMap.IntMap_toArray(self_), false)
161
+ return ff_core_Array.Array_toStream(ff_core_IntMap.IntMap_toArray(self_), 0, 9007199254740991)
168
162
  }
169
163
 
170
164
  export function IntMap_toMap(self_) {
171
- return ff_core_Array.Array_toMap(ff_core_IntMap.IntMap_toArray(self_), ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int)
165
+ return ff_core_List.List_toMap(ff_core_IntMap.IntMap_toList(self_), ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int)
172
166
  }
173
167
 
174
168
  export function IntMap_keys(self_) {
175
- const stack_ = ff_core_Stack.make_();
169
+ const array_ = ff_core_Array.make_();
176
170
  ff_core_IntMap.IntMap_each(self_, ((k_, v_) => {
177
- ff_core_Stack.Stack_push(stack_, k_)
171
+ ff_core_Array.Array_push(array_, k_)
178
172
  }));
179
- return ff_core_Stack.Stack_toList(stack_, 0, 9007199254740991)
173
+ return ff_core_Array.Array_toList(array_, 0, 9007199254740991)
180
174
  }
181
175
 
182
176
  export function IntMap_values(self_) {
183
- const stack_ = ff_core_Stack.make_();
177
+ const array_ = ff_core_Array.make_();
184
178
  ff_core_IntMap.IntMap_each(self_, ((k_, v_) => {
185
- ff_core_Stack.Stack_push(stack_, v_)
179
+ ff_core_Array.Array_push(array_, v_)
186
180
  }));
187
- return ff_core_Stack.Stack_toList(stack_, 0, 9007199254740991)
181
+ return ff_core_Array.Array_toList(array_, 0, 9007199254740991)
188
182
  }
189
183
 
190
184
  export function IntMap_copy(self_) {
@@ -234,44 +228,40 @@ export async function IntMap_eachWhile$(self_, body_, $task) {
234
228
  for(const [k, v] of self_) if(!await body_(k, v)) break
235
229
  }
236
230
 
237
- export async function IntMap_toStack$(self_, $task) {
238
- const stack_ = ff_core_Stack.make_();
231
+ export async function IntMap_toArray$(self_, $task) {
232
+ const array_ = ff_core_Array.make_();
239
233
  ff_core_IntMap.IntMap_each(self_, ((k_, v_) => {
240
- ff_core_Stack.Stack_push(stack_, ff_core_Pair.Pair(k_, v_))
234
+ ff_core_Array.Array_push(array_, ff_core_Pair.Pair(k_, v_))
241
235
  }));
242
- return stack_
243
- }
244
-
245
- export async function IntMap_toArray$(self_, $task) {
246
- return ff_core_Stack.Stack_drain(ff_core_IntMap.IntMap_toStack(self_))
236
+ return array_
247
237
  }
248
238
 
249
239
  export async function IntMap_toList$(self_, $task) {
250
- return ff_core_Array.Array_toList(ff_core_IntMap.IntMap_toArray(self_))
240
+ return ff_core_Array.Array_drain(ff_core_IntMap.IntMap_toArray(self_))
251
241
  }
252
242
 
253
243
  export async function IntMap_toStream$(self_, $task) {
254
- return (await ff_core_Array.Array_toStream$(ff_core_IntMap.IntMap_toArray(self_), false, $task))
244
+ return (await ff_core_Array.Array_toStream$(ff_core_IntMap.IntMap_toArray(self_), 0, 9007199254740991, $task))
255
245
  }
256
246
 
257
247
  export async function IntMap_toMap$(self_, $task) {
258
- return ff_core_Array.Array_toMap(ff_core_IntMap.IntMap_toArray(self_), ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int)
248
+ return ff_core_List.List_toMap(ff_core_IntMap.IntMap_toList(self_), ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int)
259
249
  }
260
250
 
261
251
  export async function IntMap_keys$(self_, $task) {
262
- const stack_ = ff_core_Stack.make_();
252
+ const array_ = ff_core_Array.make_();
263
253
  ff_core_IntMap.IntMap_each(self_, ((k_, v_) => {
264
- ff_core_Stack.Stack_push(stack_, k_)
254
+ ff_core_Array.Array_push(array_, k_)
265
255
  }));
266
- return ff_core_Stack.Stack_toList(stack_, 0, 9007199254740991)
256
+ return ff_core_Array.Array_toList(array_, 0, 9007199254740991)
267
257
  }
268
258
 
269
259
  export async function IntMap_values$(self_, $task) {
270
- const stack_ = ff_core_Stack.make_();
260
+ const array_ = ff_core_Array.make_();
271
261
  ff_core_IntMap.IntMap_each(self_, ((k_, v_) => {
272
- ff_core_Stack.Stack_push(stack_, v_)
262
+ ff_core_Array.Array_push(array_, v_)
273
263
  }));
274
- return ff_core_Stack.Stack_toList(stack_, 0, 9007199254740991)
264
+ return ff_core_Array.Array_toList(array_, 0, 9007199254740991)
275
265
  }
276
266
 
277
267
  export async function IntMap_copy$(self_, $task) {
@@ -290,14 +280,14 @@ export function IntMap_push(self_, key_, value_) {
290
280
  const _1 = ff_core_IntMap.IntMap_get(self_, key_);
291
281
  {
292
282
  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())))
283
+ ff_core_IntMap.IntMap_set(self_, key_, ff_core_List.List_toArray([value_]))
294
284
  return
295
285
  }
296
286
  }
297
287
  {
298
288
  if(_1.Some) {
299
- const stack_ = _1.value_;
300
- ff_core_Stack.Stack_push(stack_, value_)
289
+ const array_ = _1.value_;
290
+ ff_core_Array.Array_push(array_, value_)
301
291
  return
302
292
  }
303
293
  }
@@ -309,14 +299,14 @@ export async function IntMap_push$(self_, key_, value_, $task) {
309
299
  const _1 = ff_core_IntMap.IntMap_get(self_, key_);
310
300
  {
311
301
  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())))
302
+ ff_core_IntMap.IntMap_set(self_, key_, ff_core_List.List_toArray([value_]))
313
303
  return
314
304
  }
315
305
  }
316
306
  {
317
307
  if(_1.Some) {
318
- const stack_ = _1.value_;
319
- ff_core_Stack.Stack_push(stack_, value_)
308
+ const array_ = _1.value_;
309
+ ff_core_Array.Array_push(array_, value_)
320
310
  return
321
311
  }
322
312
  }
@@ -78,8 +78,6 @@ import * as ff_core_Show from "../../ff/core/Show.mjs"
78
78
 
79
79
  import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
80
80
 
81
- import * as ff_core_Stack from "../../ff/core/Stack.mjs"
82
-
83
81
  import * as ff_core_Stream from "../../ff/core/Stream.mjs"
84
82
 
85
83
  import * as ff_core_String from "../../ff/core/String.mjs"
@@ -126,7 +124,7 @@ return {}
126
124
  }
127
125
 
128
126
  export function JsSystem_array(self_, values_) {
129
- return ff_core_List.List_toArray(values_)
127
+ return values_.slice()
130
128
  }
131
129
 
132
130
  export function JsSystem_json(self_, value_) {
@@ -78,8 +78,6 @@ import * as ff_core_Show from "../../ff/core/Show.mjs"
78
78
 
79
79
  import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
80
80
 
81
- import * as ff_core_Stack from "../../ff/core/Stack.mjs"
82
-
83
81
  import * as ff_core_Stream from "../../ff/core/Stream.mjs"
84
82
 
85
83
  import * as ff_core_String from "../../ff/core/String.mjs"
@@ -238,7 +236,7 @@ for(const value of self_) if(!body_(value)) break
238
236
  }
239
237
 
240
238
  export function JsValue_call(self_, name_, arguments_) {
241
- return self_[name_].apply(this_, ff_core_List.List_toArray(arguments_))
239
+ return self_[name_].apply(this_, arguments_)
242
240
  }
243
241
 
244
242
  export function JsValue_call0(self_, name_) {
@@ -282,7 +280,7 @@ return self_[name_].call(self_, a1_, a2_, a3_, a4_, a5_, a6_, a7_, a8_, a9_)
282
280
  }
283
281
 
284
282
  export function JsValue_callValue(self_, this_, arguments_) {
285
- return self_.apply(this_, ff_core_List.List_toArray(arguments_))
283
+ return self_.apply(this_, arguments_)
286
284
  }
287
285
 
288
286
  export function JsValue_callValue0(self_) {
@@ -326,7 +324,7 @@ return self_.call(self_, a1_, a2_, a3_, a4_, a5_, a6_, a7_, a8_, a9_)
326
324
  }
327
325
 
328
326
  export function JsValue_new(self_, this_, arguments_) {
329
- return new (Function.prototype.bind.apply(self_, ff_core_List.List_toArray(arguments_)))
327
+ return new (Function.prototype.bind.apply(self_, arguments_))
330
328
  }
331
329
 
332
330
  export function JsValue_new0(self_) {
@@ -372,12 +370,7 @@ return new self_(a1_, a2_, a3_, a4_, a5_, a6_, a7_, a8_, a9_)
372
370
  export function JsValue_grabPairs(self_) {
373
371
 
374
372
  if(!(self_ instanceof Object)) throw new Error('Expected object, got '+ typeof self_);;
375
- let result = ff_core_List.Empty();
376
- Object.getOwnPropertyNames(self_).forEach((name, i) => {
377
- let pair = ff_core_Pair.Pair(name, self_[name]);
378
- result = ff_core_List.Link(pair, result);
379
- })
380
- return result;
373
+ return Object.getOwnPropertyNames(self_).map((name, i) => ff_core_Pair.Pair(name, self_[name]));
381
374
 
382
375
  }
383
376
 
@@ -699,7 +692,7 @@ export const ff_core_JsValue_IsJsValue$ff_core_Bool_Bool = {
699
692
 
700
693
  };
701
694
 
702
- export function ff_core_JsValue_IsJsValue$ff_core_Array_Array(ff_core_JsValue_IsJsValue$T) { return {
695
+ export function ff_core_JsValue_IsJsValue$ff_core_List_List(ff_core_JsValue_IsJsValue$T) { return {
703
696
 
704
697
  }}
705
698