firefly-compiler 0.5.35 → 0.5.37

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 (225) hide show
  1. package/.hintrc +4 -4
  2. package/.vscode/settings.json +4 -4
  3. package/bin/Release.ff +157 -154
  4. package/bin/firefly.mjs +1 -1
  5. package/compiler/Builder.ff +275 -277
  6. package/compiler/Compiler.ff +234 -233
  7. package/compiler/Dependencies.ff +186 -187
  8. package/compiler/DependencyLock.ff +17 -17
  9. package/compiler/Deriver.ff +23 -31
  10. package/compiler/Dictionaries.ff +1 -1
  11. package/compiler/Inference.ff +43 -20
  12. package/compiler/JsEmitter.ff +1437 -1282
  13. package/compiler/LspHook.ff +202 -202
  14. package/compiler/Main.ff +25 -24
  15. package/compiler/ModuleCache.ff +178 -178
  16. package/compiler/Parser.ff +36 -109
  17. package/compiler/Resolver.ff +5 -8
  18. package/compiler/Substitution.ff +1 -1
  19. package/compiler/Syntax.ff +1 -16
  20. package/compiler/Token.ff +9 -0
  21. package/compiler/Tokenizer.ff +4 -0
  22. package/compiler/Workspace.ff +88 -88
  23. package/core/.firefly/include/package.json +5 -5
  24. package/core/.firefly/package.ff +2 -2
  25. package/core/Any.ff +26 -30
  26. package/core/Array.ff +298 -265
  27. package/core/Atomic.ff +63 -64
  28. package/core/Box.ff +7 -7
  29. package/core/BrowserSystem.ff +40 -40
  30. package/core/Buffer.ff +185 -152
  31. package/core/BuildSystem.ff +156 -148
  32. package/core/Channel.ff +95 -92
  33. package/core/Char.ff +3 -2
  34. package/core/Core.ff +16 -23
  35. package/core/Crypto.ff +94 -96
  36. package/core/Equal.ff +41 -36
  37. package/core/Error.ff +15 -10
  38. package/core/FileHandle.ff +45 -37
  39. package/core/Float.ff +176 -200
  40. package/core/HttpClient.ff +142 -148
  41. package/core/Instant.ff +6 -8
  42. package/core/Int.ff +40 -24
  43. package/core/IntMap.ff +61 -39
  44. package/core/Js.ff +305 -0
  45. package/core/JsSystem.ff +135 -114
  46. package/core/JsValue.ff +303 -159
  47. package/core/Json.ff +423 -443
  48. package/core/List.ff +482 -486
  49. package/core/Lock.ff +108 -144
  50. package/core/Log.ff +25 -14
  51. package/core/NodeSystem.ff +198 -191
  52. package/core/Ordering.ff +160 -161
  53. package/core/Path.ff +377 -409
  54. package/core/Queue.ff +90 -0
  55. package/core/Random.ff +140 -134
  56. package/core/RbMap.ff +216 -216
  57. package/core/Serializable.ff +16 -13
  58. package/core/Show.ff +44 -43
  59. package/core/SourceLocation.ff +68 -68
  60. package/core/Stream.ff +1 -1
  61. package/core/String.ff +224 -202
  62. package/core/StringMap.ff +58 -36
  63. package/core/Task.ff +165 -149
  64. package/experimental/benchmarks/ListGrab.ff +23 -23
  65. package/experimental/benchmarks/ListGrab.java +55 -55
  66. package/experimental/benchmarks/Pyrotek45.ff +30 -30
  67. package/experimental/benchmarks/Pyrotek45.java +64 -64
  68. package/experimental/bidirectional/Bidi.ff +88 -88
  69. package/experimental/lines/Main.ff +40 -0
  70. package/experimental/random/Index.ff +53 -53
  71. package/experimental/random/Process.ff +120 -120
  72. package/experimental/random/RunLength.ff +65 -65
  73. package/experimental/random/Scrape.ff +51 -51
  74. package/experimental/random/Symbols.ff +73 -73
  75. package/experimental/random/Tensor.ff +52 -52
  76. package/experimental/random/Units.ff +36 -36
  77. package/experimental/s3/S3TestAuthorizationHeader.ff +39 -39
  78. package/experimental/s3/S3TestPut.ff +16 -16
  79. package/experimental/tests/TestJson.ff +26 -26
  80. package/firefly.sh +0 -0
  81. package/fireflysite/.firefly/package.ff +4 -4
  82. package/fireflysite/CommunityOverview.ff +20 -20
  83. package/fireflysite/CountingButtonDemo.ff +58 -58
  84. package/fireflysite/DocumentParser.ff +325 -331
  85. package/fireflysite/ExamplesOverview.ff +40 -40
  86. package/fireflysite/FrontPage.ff +344 -344
  87. package/fireflysite/GettingStarted.ff +45 -45
  88. package/fireflysite/Guide.ff +456 -456
  89. package/fireflysite/Main.ff +163 -152
  90. package/fireflysite/MatchingPasswordsDemo.ff +82 -82
  91. package/fireflysite/PackagesOverview.ff +49 -49
  92. package/fireflysite/PostgresqlDemo.ff +34 -34
  93. package/fireflysite/ReferenceAll.ff +18 -18
  94. package/fireflysite/ReferenceIntroduction.ff +11 -11
  95. package/fireflysite/Styles.ff +567 -567
  96. package/fireflysite/Test.ff +121 -62
  97. package/fireflysite/assets/markdown/reference/BaseTypes.md +209 -209
  98. package/fireflysite/assets/markdown/reference/EmittedJavascript.md +65 -65
  99. package/fireflysite/assets/markdown/reference/Exceptions.md +101 -101
  100. package/fireflysite/assets/markdown/reference/FunctionsAndMethods.md +364 -364
  101. package/fireflysite/assets/markdown/reference/JavascriptInterop.md +235 -172
  102. package/fireflysite/assets/markdown/reference/ModulesAndPackages.md +162 -162
  103. package/fireflysite/assets/markdown/reference/OldStructuredConcurrency.md +48 -48
  104. package/fireflysite/assets/markdown/reference/PatternMatching.md +224 -224
  105. package/fireflysite/assets/markdown/reference/StatementsAndExpressions.md +86 -86
  106. package/fireflysite/assets/markdown/reference/StructuredConcurrency.md +99 -99
  107. package/fireflysite/assets/markdown/reference/TraitsAndInstances.md +100 -100
  108. package/fireflysite/assets/markdown/reference/UserDefinedTypes.md +184 -184
  109. package/fireflysite/assets/markdown/scratch/ControlFlow.md +136 -136
  110. package/fireflysite/assets/markdown/scratch/Toc.md +40 -40
  111. package/lsp/.firefly/package.ff +1 -1
  112. package/lsp/CompletionHandler.ff +827 -827
  113. package/lsp/Handler.ff +714 -714
  114. package/lsp/HoverHandler.ff +79 -79
  115. package/lsp/LanguageServer.ff +272 -272
  116. package/lsp/SignatureHelpHandler.ff +55 -55
  117. package/lsp/SymbolHandler.ff +181 -181
  118. package/lsp/TestReferences.ff +17 -17
  119. package/lsp/TestReferencesCase.ff +7 -7
  120. package/lsp/stderr.txt +1 -1
  121. package/lsp/stdout.txt +34 -34
  122. package/lux/.firefly/package.ff +1 -1
  123. package/lux/Css.ff +648 -648
  124. package/lux/CssTest.ff +48 -48
  125. package/lux/Lux.ff +608 -617
  126. package/lux/LuxEvent.ff +79 -116
  127. package/lux/Main.ff +123 -123
  128. package/lux/Main2.ff +143 -143
  129. package/lux/TestDry.ff +28 -28
  130. package/output/js/ff/compiler/Builder.mjs +72 -71
  131. package/output/js/ff/compiler/Compiler.mjs +19 -13
  132. package/output/js/ff/compiler/Dependencies.mjs +8 -7
  133. package/output/js/ff/compiler/DependencyLock.mjs +6 -4
  134. package/output/js/ff/compiler/Deriver.mjs +26 -24
  135. package/output/js/ff/compiler/Dictionaries.mjs +14 -18
  136. package/output/js/ff/compiler/Environment.mjs +6 -4
  137. package/output/js/ff/compiler/Inference.mjs +238 -164
  138. package/output/js/ff/compiler/JsEmitter.mjs +1160 -350
  139. package/output/js/ff/compiler/JsImporter.mjs +20 -18
  140. package/output/js/ff/compiler/LspHook.mjs +12 -10
  141. package/output/js/ff/compiler/Main.mjs +61 -41
  142. package/output/js/ff/compiler/ModuleCache.mjs +10 -8
  143. package/output/js/ff/compiler/Parser.mjs +153 -669
  144. package/output/js/ff/compiler/Patterns.mjs +12 -10
  145. package/output/js/ff/compiler/Resolver.mjs +52 -78
  146. package/output/js/ff/compiler/Substitution.mjs +12 -16
  147. package/output/js/ff/compiler/Syntax.mjs +50 -341
  148. package/output/js/ff/compiler/Token.mjs +126 -4
  149. package/output/js/ff/compiler/Tokenizer.mjs +62 -52
  150. package/output/js/ff/compiler/Unification.mjs +74 -90
  151. package/output/js/ff/compiler/Wildcards.mjs +4 -2
  152. package/output/js/ff/compiler/Workspace.mjs +26 -20
  153. package/output/js/ff/core/Any.mjs +20 -20
  154. package/output/js/ff/core/Array.mjs +268 -175
  155. package/output/js/ff/core/AssetSystem.mjs +8 -6
  156. package/output/js/ff/core/Atomic.mjs +84 -52
  157. package/output/js/ff/core/Bool.mjs +6 -4
  158. package/output/js/ff/core/BrowserSystem.mjs +38 -29
  159. package/output/js/ff/core/Buffer.mjs +285 -133
  160. package/output/js/ff/core/BuildSystem.mjs +36 -56
  161. package/output/js/ff/core/Channel.mjs +250 -97
  162. package/output/js/ff/core/Char.mjs +5 -3
  163. package/output/js/ff/core/Core.mjs +28 -34
  164. package/output/js/ff/core/Crypto.mjs +30 -52
  165. package/output/js/ff/core/Duration.mjs +4 -2
  166. package/output/js/ff/core/Equal.mjs +14 -12
  167. package/output/js/ff/core/Error.mjs +17 -11
  168. package/output/js/ff/core/FileHandle.mjs +76 -38
  169. package/output/js/ff/core/Float.mjs +92 -160
  170. package/output/js/ff/core/HttpClient.mjs +208 -76
  171. package/output/js/ff/core/Instant.mjs +8 -10
  172. package/output/js/ff/core/Int.mjs +36 -26
  173. package/output/js/ff/core/IntMap.mjs +79 -33
  174. package/output/js/ff/core/Js.mjs +751 -0
  175. package/output/js/ff/core/JsSystem.mjs +54 -60
  176. package/output/js/ff/core/JsValue.mjs +294 -143
  177. package/output/js/ff/core/Json.mjs +443 -253
  178. package/output/js/ff/core/List.mjs +262 -214
  179. package/output/js/ff/core/Lock.mjs +156 -125
  180. package/output/js/ff/core/Log.mjs +20 -10
  181. package/output/js/ff/core/Map.mjs +10 -8
  182. package/output/js/ff/core/NodeSystem.mjs +189 -123
  183. package/output/js/ff/core/Nothing.mjs +4 -2
  184. package/output/js/ff/core/Option.mjs +40 -38
  185. package/output/js/ff/core/Ordering.mjs +26 -20
  186. package/output/js/ff/core/Pair.mjs +4 -2
  187. package/output/js/ff/core/Path.mjs +517 -315
  188. package/output/js/ff/core/Queue.mjs +306 -0
  189. package/output/js/ff/core/Random.mjs +141 -77
  190. package/output/js/ff/core/RbMap.mjs +36 -34
  191. package/output/js/ff/core/Serializable.mjs +44 -28
  192. package/output/js/ff/core/Set.mjs +6 -4
  193. package/output/js/ff/core/Show.mjs +8 -6
  194. package/output/js/ff/core/SourceLocation.mjs +4 -2
  195. package/output/js/ff/core/Stream.mjs +30 -50
  196. package/output/js/ff/core/String.mjs +263 -172
  197. package/output/js/ff/core/StringMap.mjs +77 -31
  198. package/output/js/ff/core/Task.mjs +91 -76
  199. package/output/js/ff/core/Try.mjs +20 -18
  200. package/output/js/ff/core/Unit.mjs +4 -2
  201. package/package.json +1 -1
  202. package/postgresql/Pg.ff +53 -59
  203. package/rpc/.firefly/package.ff +1 -1
  204. package/rpc/Rpc.ff +70 -70
  205. package/s3/.firefly/package.ff +1 -1
  206. package/s3/S3.ff +92 -94
  207. package/vscode/LICENSE.txt +21 -21
  208. package/vscode/Prepublish.ff +15 -15
  209. package/vscode/README.md +16 -16
  210. package/vscode/client/package-lock.json +544 -544
  211. package/vscode/client/package.json +22 -22
  212. package/vscode/client/src/extension.ts +104 -104
  213. package/vscode/icons/firefly-icon.svg +10 -10
  214. package/vscode/language-configuration.json +61 -61
  215. package/vscode/package-lock.json +3623 -3623
  216. package/vscode/package.json +1 -1
  217. package/vscode/snippets.json +241 -241
  218. package/vscode/syntaxes/firefly-markdown-injection.json +45 -45
  219. package/webserver/.firefly/include/package.json +5 -5
  220. package/webserver/.firefly/package.ff +2 -2
  221. package/webserver/WebServer.ff +647 -685
  222. package/websocket/.firefly/package.ff +1 -1
  223. package/websocket/WebSocket.ff +100 -131
  224. package/core/UnsafeJs.ff +0 -42
  225. package/output/js/ff/core/UnsafeJs.mjs +0 -191
@@ -48,6 +48,8 @@ import * as ff_core_Int from "../../ff/core/Int.mjs"
48
48
 
49
49
  import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
50
50
 
51
+ import * as ff_core_Js from "../../ff/core/Js.mjs"
52
+
51
53
  import * as ff_core_JsSystem from "../../ff/core/JsSystem.mjs"
52
54
 
53
55
  import * as ff_core_JsValue from "../../ff/core/JsValue.mjs"
@@ -74,6 +76,8 @@ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
74
76
 
75
77
  import * as ff_core_Path from "../../ff/core/Path.mjs"
76
78
 
79
+ import * as ff_core_Queue from "../../ff/core/Queue.mjs"
80
+
77
81
  import * as ff_core_Random from "../../ff/core/Random.mjs"
78
82
 
79
83
  import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
@@ -96,8 +100,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
96
100
 
97
101
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
98
102
 
99
- import * as ff_core_UnsafeJs from "../../ff/core/UnsafeJs.mjs"
100
-
101
103
  // type Unification
102
104
  export function Unification(substitution_, constraints_, nextUnificationVariableIndex_, instances_, affects_, attemptFixes_) {
103
105
  return {substitution_, constraints_, nextUnificationVariableIndex_, instances_, affects_, attemptFixes_};
@@ -126,14 +128,14 @@ throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Sy
126
128
 
127
129
  export function new_(modules_, attemptFixes_) {
128
130
  return ff_compiler_Unification.Unification(ff_core_Map.new_(), ff_core_Map.new_(), 3, ff_core_List.List_toMap(ff_core_List.List_flatMap(modules_, ((module_) => {
129
- const moduleName_ = ff_core_String.String_dropLast(module_.file_, ff_core_String.String_size(".ff"));
131
+ const moduleName_ = ff_core_String.String_dropLast(module_.file_, ".ff".length);
130
132
  return ff_core_List.List_map(module_.instances_, ((definition_) => {
131
133
  const typeName_ = (((_1) => {
132
134
  if(_1.TConstructor) {
133
135
  const name_ = _1.name_;
134
136
  return name_
135
137
  }
136
- if(_1.TVariable) {
138
+ {
137
139
  const i_ = _1.index_;
138
140
  return ff_compiler_Unification.fail_(definition_.at_, ("Unexpected unification variable: $" + i_))
139
141
  }
@@ -149,14 +151,14 @@ throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Sy
149
151
 
150
152
  export async function new_$(modules_, attemptFixes_, $task) {
151
153
  return ff_compiler_Unification.Unification(ff_core_Map.new_(), ff_core_Map.new_(), 3, ff_core_List.List_toMap(ff_core_List.List_flatMap(modules_, ((module_) => {
152
- const moduleName_ = ff_core_String.String_dropLast(module_.file_, ff_core_String.String_size(".ff"));
154
+ const moduleName_ = ff_core_String.String_dropLast(module_.file_, ".ff".length);
153
155
  return ff_core_List.List_map(module_.instances_, ((definition_) => {
154
156
  const typeName_ = (((_1) => {
155
157
  if(_1.TConstructor) {
156
158
  const name_ = _1.name_;
157
159
  return name_
158
160
  }
159
- if(_1.TVariable) {
161
+ {
160
162
  const i_ = _1.index_;
161
163
  return ff_compiler_Unification.fail_(definition_.at_, ("Unexpected unification variable: $" + i_))
162
164
  }
@@ -195,7 +197,7 @@ if(_1.Some) {
195
197
  const t_ = _1.value_;
196
198
  return t_
197
199
  }
198
- if(_1.None) {
200
+ {
199
201
  return type_
200
202
  }
201
203
  }
@@ -218,7 +220,7 @@ const t_ = _guard1.value_;
218
220
  return ff_compiler_Unification.Unification_instantiate(self_, instantiation_, t_)
219
221
  }
220
222
  }
221
- if(type_a.TVariable) {
223
+ {
222
224
  const i_ = type_a.index_;
223
225
  return type_
224
226
  }
@@ -259,7 +261,7 @@ if(_1.None) {
259
261
  self_.constraints_ = ff_core_Map.Map_add(self_.constraints_, i_, ff_core_List.List_toMap([ff_core_Pair.Pair(constraintName_, ff_compiler_Unification.ConstraintGenerics(at_, generics_))], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int)
260
262
  return
261
263
  }
262
- if(_1.Some) {
264
+ {
263
265
  const map_ = _1.value_;
264
266
  {
265
267
  const _1 = ff_core_Map.Map_get(map_, constraintName_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String);
@@ -268,16 +270,13 @@ const newMap_ = ff_core_Map.Map_add(map_, constraintName_, ff_compiler_Unificati
268
270
  self_.constraints_ = ff_core_Map.Map_add(self_.constraints_, i_, newMap_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int)
269
271
  return
270
272
  }
271
- if(_1.Some) {
272
- const generics2_ = _1.value_.generics_;
273
- ff_core_List.List_each(ff_core_List.List_zip(generics_, generics2_), ((_1) => {
274
273
  {
275
- const t1_ = _1.first_;
276
- const t2_ = _1.second_;
274
+ const generics2_ = _1.value_.generics_;
275
+ for(let for_a = generics_, for_i = 0, for_l = for_a.length, for_a2 = generics2_, for_i2 = 0, for_l2 = for_a2.length; for_i < for_l && for_i2 < for_l2; for_i++, for_i2++) {
276
+ const t1_ = for_a[for_i];
277
+ const t2_ = for_a2[for_i2];
277
278
  ff_compiler_Unification.Unification_unify(self_, at_, t1_, t2_)
278
- return
279
279
  }
280
- }))
281
280
  return
282
281
  }
283
282
  }
@@ -286,7 +285,7 @@ return
286
285
  }
287
286
  return
288
287
  }
289
- if(_1.TConstructor) {
288
+ {
290
289
  const name_ = _1.name_;
291
290
  const generics2_ = _1.generics_;
292
291
  {
@@ -303,7 +302,7 @@ throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Sy
303
302
  }
304
303
  return
305
304
  }
306
- if(_1.Some) {
305
+ {
307
306
  const definition_ = _1.value_;
308
307
  const unificationVariables_ = ff_core_List.List_map(definition_.generics_, ((_) => {
309
308
  return ff_compiler_Unification.Unification_freshUnificationVariable(self_, at_)
@@ -312,7 +311,7 @@ const instantiation_ = ff_core_List.List_toMap(ff_core_List.List_zip(definition_
312
311
  const traitType1_ = ff_compiler_Unification.Unification_instantiate(self_, instantiation_, ff_compiler_Syntax.TConstructor(at_, definition_.traitName_, definition_.typeArguments_));
313
312
  const traitType2_ = ff_compiler_Syntax.TConstructor(at_, constraintName_, [type_, ...generics_]);
314
313
  ff_compiler_Unification.Unification_unify(self_, at_, traitType1_, traitType2_);
315
- for(let for_i = 0, for_a = definition_.constraints_, for_l = for_a.length; for_i < for_l; for_i++) {
314
+ for(let for_a = definition_.constraints_, for_i = 0, for_l = for_a.length; for_i < for_l; for_i++) {
316
315
  const constraint_ = for_a[for_i];
317
316
  do {
318
317
  const _1 = ff_compiler_Unification.Unification_instantiateConstraint(self_, instantiation_, constraint_);
@@ -320,7 +319,6 @@ const _1 = ff_compiler_Unification.Unification_instantiateConstraint(self_, inst
320
319
  const constraintName_ = _1.name_;
321
320
  const newGenerics_ = _1.generics_;
322
321
  ff_compiler_Unification.Unification_constrain(self_, at_, ff_core_List.List_grabFirst(newGenerics_), constraintName_, ff_core_List.List_dropFirst(newGenerics_, 1))
323
- break
324
322
  }
325
323
  } while(false)
326
324
  }
@@ -364,7 +362,7 @@ return ff_compiler_Unification.Unification_substitute(self_, t_)
364
362
  if(type_a.TVariable) {
365
363
  return type_
366
364
  }
367
- if(type_a.TConstructor) {
365
+ {
368
366
  const t_ = type_a;
369
367
  {
370
368
  const _1 = t_;
@@ -421,7 +419,7 @@ const i_ = t2_a.index_;
421
419
  ff_compiler_Unification.Unification_bind(self_, at_, i_, t1_)
422
420
  return
423
421
  }
424
- if(t1_a.TConstructor && t2_a.TConstructor) {
422
+ {
425
423
  const name1_ = t1_a.name_;
426
424
  const generics1_ = t1_a.generics_;
427
425
  const name2_ = t2_a.name_;
@@ -432,32 +430,23 @@ const t3_ = ff_compiler_Unification.Unification_substitute(self_, t1_);
432
430
  const t4_ = ff_compiler_Unification.Unification_substitute(self_, t2_);
433
431
  throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, ((("Type mismatch: " + ff_compiler_Syntax.Type_show(t3_, [t3_, t4_])) + " vs. ") + ff_compiler_Syntax.Type_show(t4_, [t3_, t4_]))), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
434
432
  } else if((ff_core_String.String_startsWith(name1_, "Function$", 0) && ff_core_String.String_startsWith(name2_, "Function$", 0))) {
435
- ff_core_List.List_each(ff_core_List.List_zip(ff_core_List.List_dropLast(generics1_, 1), ff_core_List.List_dropLast(generics2_, 1)), ((_1) => {
436
- {
437
- const t3_ = _1.first_;
438
- const t4_ = _1.second_;
433
+ for(let for_a = generics1_, for_i = 0, for_l = for_a.length - 1, for_a2 = generics2_, for_i2 = 0, for_l2 = for_a2.length - 1; for_i < for_l && for_i2 < for_l2; for_i++, for_i2++) {
434
+ const t3_ = for_a[for_i];
435
+ const t4_ = for_a2[for_i2];
439
436
  ff_compiler_Unification.Unification_unify(self_, at_, t3_, t4_)
440
- return
441
- }
442
- }));
443
- ff_core_List.List_each(ff_core_List.List_zip(ff_core_List.List_takeLast(generics1_, 1), ff_core_List.List_takeLast(generics2_, 1)), ((_1) => {
444
- {
445
- const t3_ = _1.first_;
446
- const t4_ = _1.second_;
437
+ };
438
+ for(let for_a = generics1_, for_i = Math.max(for_a.length - 1, 0), for_l = for_a.length, for_a2 = generics2_, for_i2 = Math.max(for_a2.length - 1, 0), for_l2 = for_a2.length; for_i < for_l && for_i2 < for_l2; for_i++, for_i2++) {
439
+ const t3_ = for_a[for_i];
440
+ const t4_ = for_a2[for_i2];
447
441
  ff_compiler_Unification.Unification_unify(self_, at_, t3_, t4_)
448
- return
449
442
  }
450
- }))
451
443
  } else {}
452
444
  } else {
453
- ff_core_List.List_each(ff_core_List.List_zip(generics1_, generics2_), ((_1) => {
454
- {
455
- const t1_ = _1.first_;
456
- const t2_ = _1.second_;
445
+ for(let for_a = generics1_, for_i = 0, for_l = for_a.length, for_a2 = generics2_, for_i2 = 0, for_l2 = for_a2.length; for_i < for_l && for_i2 < for_l2; for_i++, for_i2++) {
446
+ const t1_ = for_a[for_i];
447
+ const t2_ = for_a2[for_i2];
457
448
  ff_compiler_Unification.Unification_unify(self_, at_, t1_, t2_)
458
- return
459
449
  }
460
- }))
461
450
  }
462
451
  return
463
452
  }
@@ -469,8 +458,10 @@ const t_ = ff_compiler_Unification.Unification_substitute(self_, type_);
469
458
  throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, ((("Infinite type: " + ff_compiler_Syntax.Type_show(ff_compiler_Syntax.TVariable(at_, index_), [t_])) + " = ") + ff_compiler_Syntax.Type_show(t_, []))), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
470
459
  };
471
460
  self_.substitution_ = ff_core_Map.Map_add(self_.substitution_, index_, type_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int);
472
- for(const for_o = ff_core_Map.Map_get(self_.constraints_, index_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int); for_o.Some;) {
473
- const map_ = for_o.value_;
461
+ {
462
+ const if_o = ff_core_Map.Map_get(self_.constraints_, index_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int)
463
+ if(if_o.Some) {
464
+ const map_ = if_o.value_;
474
465
  self_.constraints_ = ff_core_Map.Map_remove(self_.constraints_, index_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int);
475
466
  ff_core_List.List_each(ff_core_Map.Map_pairs(map_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ((_1) => {
476
467
  {
@@ -481,15 +472,17 @@ ff_compiler_Unification.Unification_constrain(self_, at2_, type_, name_, generic
481
472
  return
482
473
  }
483
474
  }))
484
- break
475
+ }
485
476
  };
486
- for(const for_o = ff_core_Map.Map_get(self_.affects_, index_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int); for_o.Some;) {
487
- const affected_ = for_o.value_;
477
+ {
478
+ const if_o = ff_core_Map.Map_get(self_.affects_, index_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int)
479
+ if(if_o.Some) {
480
+ const affected_ = if_o.value_;
488
481
  ff_core_Map.Map_remove(self_.affects_, index_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int);
489
482
  ff_core_Set.Set_each(affected_, ((i_) => {
490
483
  ff_compiler_Unification.Unification_affect(self_, at_, type_, ff_compiler_Syntax.TVariable(at_, i_))
491
484
  }), ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int)
492
- break
485
+ }
493
486
  }
494
487
  }
495
488
 
@@ -538,7 +531,7 @@ if(t_a.TVariable) {
538
531
  const i_ = t_a.index_;
539
532
  return (i_ === index_)
540
533
  }
541
- if(t_a.TConstructor) {
534
+ {
542
535
  const generics_ = t_a.generics_;
543
536
  return ff_core_List.List_any(generics_, ((t_) => {
544
537
  return ff_compiler_Unification.Unification_occursIn(self_, index_, t_)
@@ -576,7 +569,7 @@ if(_1.Some) {
576
569
  const t_ = _1.value_;
577
570
  return t_
578
571
  }
579
- if(_1.None) {
572
+ {
580
573
  return type_
581
574
  }
582
575
  }
@@ -599,7 +592,7 @@ const t_ = _guard1.value_;
599
592
  return ff_compiler_Unification.Unification_instantiate(self_, instantiation_, t_)
600
593
  }
601
594
  }
602
- if(type_a.TVariable) {
595
+ {
603
596
  const i_ = type_a.index_;
604
597
  return type_
605
598
  }
@@ -640,7 +633,7 @@ if(_1.None) {
640
633
  self_.constraints_ = ff_core_Map.Map_add(self_.constraints_, i_, ff_core_List.List_toMap([ff_core_Pair.Pair(constraintName_, ff_compiler_Unification.ConstraintGenerics(at_, generics_))], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int)
641
634
  return
642
635
  }
643
- if(_1.Some) {
636
+ {
644
637
  const map_ = _1.value_;
645
638
  {
646
639
  const _1 = ff_core_Map.Map_get(map_, constraintName_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String);
@@ -649,16 +642,13 @@ const newMap_ = ff_core_Map.Map_add(map_, constraintName_, ff_compiler_Unificati
649
642
  self_.constraints_ = ff_core_Map.Map_add(self_.constraints_, i_, newMap_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int)
650
643
  return
651
644
  }
652
- if(_1.Some) {
653
- const generics2_ = _1.value_.generics_;
654
- ff_core_List.List_each(ff_core_List.List_zip(generics_, generics2_), ((_1) => {
655
645
  {
656
- const t1_ = _1.first_;
657
- const t2_ = _1.second_;
646
+ const generics2_ = _1.value_.generics_;
647
+ for(let for_a = generics_, for_i = 0, for_l = for_a.length, for_a2 = generics2_, for_i2 = 0, for_l2 = for_a2.length; for_i < for_l && for_i2 < for_l2; for_i++, for_i2++) {
648
+ const t1_ = for_a[for_i];
649
+ const t2_ = for_a2[for_i2];
658
650
  ff_compiler_Unification.Unification_unify(self_, at_, t1_, t2_)
659
- return
660
651
  }
661
- }))
662
652
  return
663
653
  }
664
654
  }
@@ -667,7 +657,7 @@ return
667
657
  }
668
658
  return
669
659
  }
670
- if(_1.TConstructor) {
660
+ {
671
661
  const name_ = _1.name_;
672
662
  const generics2_ = _1.generics_;
673
663
  {
@@ -684,7 +674,7 @@ throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Sy
684
674
  }
685
675
  return
686
676
  }
687
- if(_1.Some) {
677
+ {
688
678
  const definition_ = _1.value_;
689
679
  const unificationVariables_ = ff_core_List.List_map(definition_.generics_, ((_) => {
690
680
  return ff_compiler_Unification.Unification_freshUnificationVariable(self_, at_)
@@ -693,7 +683,7 @@ const instantiation_ = ff_core_List.List_toMap(ff_core_List.List_zip(definition_
693
683
  const traitType1_ = ff_compiler_Unification.Unification_instantiate(self_, instantiation_, ff_compiler_Syntax.TConstructor(at_, definition_.traitName_, definition_.typeArguments_));
694
684
  const traitType2_ = ff_compiler_Syntax.TConstructor(at_, constraintName_, [type_, ...generics_]);
695
685
  ff_compiler_Unification.Unification_unify(self_, at_, traitType1_, traitType2_);
696
- for(let for_i = 0, for_a = definition_.constraints_, for_l = for_a.length; for_i < for_l; for_i++) {
686
+ for(let for_a = definition_.constraints_, for_i = 0, for_l = for_a.length; for_i < for_l; for_i++) {
697
687
  const constraint_ = for_a[for_i];
698
688
  do {
699
689
  const _1 = ff_compiler_Unification.Unification_instantiateConstraint(self_, instantiation_, constraint_);
@@ -701,7 +691,6 @@ const _1 = ff_compiler_Unification.Unification_instantiateConstraint(self_, inst
701
691
  const constraintName_ = _1.name_;
702
692
  const newGenerics_ = _1.generics_;
703
693
  ff_compiler_Unification.Unification_constrain(self_, at_, ff_core_List.List_grabFirst(newGenerics_), constraintName_, ff_core_List.List_dropFirst(newGenerics_, 1))
704
- break
705
694
  }
706
695
  } while(false)
707
696
  }
@@ -745,7 +734,7 @@ return ff_compiler_Unification.Unification_substitute(self_, t_)
745
734
  if(type_a.TVariable) {
746
735
  return type_
747
736
  }
748
- if(type_a.TConstructor) {
737
+ {
749
738
  const t_ = type_a;
750
739
  {
751
740
  const _1 = t_;
@@ -802,7 +791,7 @@ const i_ = t2_a.index_;
802
791
  ff_compiler_Unification.Unification_bind(self_, at_, i_, t1_)
803
792
  return
804
793
  }
805
- if(t1_a.TConstructor && t2_a.TConstructor) {
794
+ {
806
795
  const name1_ = t1_a.name_;
807
796
  const generics1_ = t1_a.generics_;
808
797
  const name2_ = t2_a.name_;
@@ -813,32 +802,23 @@ const t3_ = ff_compiler_Unification.Unification_substitute(self_, t1_);
813
802
  const t4_ = ff_compiler_Unification.Unification_substitute(self_, t2_);
814
803
  throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, ((("Type mismatch: " + ff_compiler_Syntax.Type_show(t3_, [t3_, t4_])) + " vs. ") + ff_compiler_Syntax.Type_show(t4_, [t3_, t4_]))), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
815
804
  } else if((ff_core_String.String_startsWith(name1_, "Function$", 0) && ff_core_String.String_startsWith(name2_, "Function$", 0))) {
816
- ff_core_List.List_each(ff_core_List.List_zip(ff_core_List.List_dropLast(generics1_, 1), ff_core_List.List_dropLast(generics2_, 1)), ((_1) => {
817
- {
818
- const t3_ = _1.first_;
819
- const t4_ = _1.second_;
805
+ for(let for_a = generics1_, for_i = 0, for_l = for_a.length - 1, for_a2 = generics2_, for_i2 = 0, for_l2 = for_a2.length - 1; for_i < for_l && for_i2 < for_l2; for_i++, for_i2++) {
806
+ const t3_ = for_a[for_i];
807
+ const t4_ = for_a2[for_i2];
820
808
  ff_compiler_Unification.Unification_unify(self_, at_, t3_, t4_)
821
- return
822
- }
823
- }));
824
- ff_core_List.List_each(ff_core_List.List_zip(ff_core_List.List_takeLast(generics1_, 1), ff_core_List.List_takeLast(generics2_, 1)), ((_1) => {
825
- {
826
- const t3_ = _1.first_;
827
- const t4_ = _1.second_;
809
+ };
810
+ for(let for_a = generics1_, for_i = Math.max(for_a.length - 1, 0), for_l = for_a.length, for_a2 = generics2_, for_i2 = Math.max(for_a2.length - 1, 0), for_l2 = for_a2.length; for_i < for_l && for_i2 < for_l2; for_i++, for_i2++) {
811
+ const t3_ = for_a[for_i];
812
+ const t4_ = for_a2[for_i2];
828
813
  ff_compiler_Unification.Unification_unify(self_, at_, t3_, t4_)
829
- return
830
814
  }
831
- }))
832
815
  } else {}
833
816
  } else {
834
- ff_core_List.List_each(ff_core_List.List_zip(generics1_, generics2_), ((_1) => {
835
- {
836
- const t1_ = _1.first_;
837
- const t2_ = _1.second_;
817
+ for(let for_a = generics1_, for_i = 0, for_l = for_a.length, for_a2 = generics2_, for_i2 = 0, for_l2 = for_a2.length; for_i < for_l && for_i2 < for_l2; for_i++, for_i2++) {
818
+ const t1_ = for_a[for_i];
819
+ const t2_ = for_a2[for_i2];
838
820
  ff_compiler_Unification.Unification_unify(self_, at_, t1_, t2_)
839
- return
840
821
  }
841
- }))
842
822
  }
843
823
  return
844
824
  }
@@ -850,8 +830,10 @@ const t_ = ff_compiler_Unification.Unification_substitute(self_, type_);
850
830
  throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(at_, ((("Infinite type: " + ff_compiler_Syntax.Type_show(ff_compiler_Syntax.TVariable(at_, index_), [t_])) + " = ") + ff_compiler_Syntax.Type_show(t_, []))), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
851
831
  };
852
832
  self_.substitution_ = ff_core_Map.Map_add(self_.substitution_, index_, type_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int);
853
- for(const for_o = ff_core_Map.Map_get(self_.constraints_, index_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int); for_o.Some;) {
854
- const map_ = for_o.value_;
833
+ {
834
+ const if_o = ff_core_Map.Map_get(self_.constraints_, index_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int)
835
+ if(if_o.Some) {
836
+ const map_ = if_o.value_;
855
837
  self_.constraints_ = ff_core_Map.Map_remove(self_.constraints_, index_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int);
856
838
  ff_core_List.List_each(ff_core_Map.Map_pairs(map_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ((_1) => {
857
839
  {
@@ -862,15 +844,17 @@ ff_compiler_Unification.Unification_constrain(self_, at2_, type_, name_, generic
862
844
  return
863
845
  }
864
846
  }))
865
- break
847
+ }
866
848
  };
867
- for(const for_o = ff_core_Map.Map_get(self_.affects_, index_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int); for_o.Some;) {
868
- const affected_ = for_o.value_;
849
+ {
850
+ const if_o = ff_core_Map.Map_get(self_.affects_, index_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int)
851
+ if(if_o.Some) {
852
+ const affected_ = if_o.value_;
869
853
  ff_core_Map.Map_remove(self_.affects_, index_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int);
870
854
  ff_core_Set.Set_each(affected_, ((i_) => {
871
855
  ff_compiler_Unification.Unification_affect(self_, at_, type_, ff_compiler_Syntax.TVariable(at_, i_))
872
856
  }), ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int)
873
- break
857
+ }
874
858
  }
875
859
  }
876
860
 
@@ -919,7 +903,7 @@ if(t_a.TVariable) {
919
903
  const i_ = t_a.index_;
920
904
  return (i_ === index_)
921
905
  }
922
- if(t_a.TConstructor) {
906
+ {
923
907
  const generics_ = t_a.generics_;
924
908
  return ff_core_List.List_any(generics_, ((t_) => {
925
909
  return ff_compiler_Unification.Unification_occursIn(self_, index_, t_)
@@ -46,6 +46,8 @@ import * as ff_core_Int from "../../ff/core/Int.mjs"
46
46
 
47
47
  import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
48
48
 
49
+ import * as ff_core_Js from "../../ff/core/Js.mjs"
50
+
49
51
  import * as ff_core_JsSystem from "../../ff/core/JsSystem.mjs"
50
52
 
51
53
  import * as ff_core_JsValue from "../../ff/core/JsValue.mjs"
@@ -72,6 +74,8 @@ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
72
74
 
73
75
  import * as ff_core_Path from "../../ff/core/Path.mjs"
74
76
 
77
+ import * as ff_core_Queue from "../../ff/core/Queue.mjs"
78
+
75
79
  import * as ff_core_Random from "../../ff/core/Random.mjs"
76
80
 
77
81
  import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
@@ -94,8 +98,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
94
98
 
95
99
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
96
100
 
97
- import * as ff_core_UnsafeJs from "../../ff/core/UnsafeJs.mjs"
98
-
99
101
  // type Wildcards
100
102
  export function Wildcards(seenWildcards_) {
101
103
  return {seenWildcards_};
@@ -46,6 +46,8 @@ import * as ff_core_Int from "../../ff/core/Int.mjs"
46
46
 
47
47
  import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
48
48
 
49
+ import * as ff_core_Js from "../../ff/core/Js.mjs"
50
+
49
51
  import * as ff_core_JsSystem from "../../ff/core/JsSystem.mjs"
50
52
 
51
53
  import * as ff_core_JsValue from "../../ff/core/JsValue.mjs"
@@ -72,6 +74,8 @@ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
72
74
 
73
75
  import * as ff_core_Path from "../../ff/core/Path.mjs"
74
76
 
77
+ import * as ff_core_Queue from "../../ff/core/Queue.mjs"
78
+
75
79
  import * as ff_core_Random from "../../ff/core/Random.mjs"
76
80
 
77
81
  import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
@@ -94,8 +98,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
94
98
 
95
99
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
96
100
 
97
- import * as ff_core_UnsafeJs from "../../ff/core/UnsafeJs.mjs"
98
-
99
101
  // type Workspace
100
102
  export function Workspace(rules_, defaultLocation_, packageDirectory_) {
101
103
  return {rules_, defaultLocation_, packageDirectory_};
@@ -130,21 +132,23 @@ return ff_core_String.String_takeWhile(ff_core_String.String_replace(_w1, "\r",
130
132
  return (_w1 !== 35)
131
133
  }))
132
134
  })), ((_w1) => {
133
- return (ff_core_String.String_size(_w1) !== 0)
135
+ return (_w1.length !== 0)
134
136
  }));
135
137
  const rules_ = ff_core_List.List_collect(lines_, ((line_) => {
136
138
  const columns_ = ff_core_List.List_filter(ff_core_String.String_split(ff_core_String.String_replace(line_, "\t", " "), 32), ((_w1) => {
137
- return (ff_core_String.String_size(_w1) !== 0)
139
+ return (_w1.length !== 0)
138
140
  }));
139
- for(const for_o = defaultLocation_; for_o.Some;) {
141
+ {
142
+ const if_o = defaultLocation_
143
+ if(if_o.Some) {
140
144
  ff_core_Core.panic_(("Unexpected rule after the * rule: " + line_))
141
- break
145
+ }
142
146
  };
143
147
  if((columns_.length !== 2)) {
144
148
  ff_core_Core.panic_(("Could not parse workspace rule: " + line_))
145
149
  };
146
- const package_ = (columns_[0] ?? ff_core_List.internalGrab_(columns_, 0));
147
- const location_ = (columns_[1] ?? ff_core_List.internalGrab_(columns_, 1));
150
+ const package_ = (columns_[0] ?? ff_core_List.List_grab(columns_, 0));
151
+ const location_ = (columns_[1] ?? ff_core_List.List_grab(columns_, 1));
148
152
  const fixedLocation_ = (ff_core_String.String_endsWith(location_, "/")
149
153
  ? location_
150
154
  : (location_ + "/"));
@@ -156,11 +160,11 @@ const packageParts_ = ff_core_String.String_split(package_, 58);
156
160
  if((packageParts_.length !== 2)) {
157
161
  ff_core_Core.panic_(("Could not parse workspace package: " + package_))
158
162
  };
159
- if(((packageParts_[0] ?? ff_core_List.internalGrab_(packageParts_, 0)) === "*")) {
163
+ if(((packageParts_[0] ?? ff_core_List.List_grab(packageParts_, 0)) === "*")) {
160
164
  ff_core_Core.panic_(("Unexpected wildcard: " + package_))
161
165
  };
162
- return ff_core_Option.Some(ff_compiler_Workspace.WorkspaceRule((packageParts_[0] ?? ff_core_List.internalGrab_(packageParts_, 0)), (((packageParts_[1] ?? ff_core_List.internalGrab_(packageParts_, 1)) !== "*")
163
- ? ff_core_Option.Some((packageParts_[1] ?? ff_core_List.internalGrab_(packageParts_, 1)))
166
+ return ff_core_Option.Some(ff_compiler_Workspace.WorkspaceRule((packageParts_[0] ?? ff_core_List.List_grab(packageParts_, 0)), (((packageParts_[1] ?? ff_core_List.List_grab(packageParts_, 1)) !== "*")
167
+ ? ff_core_Option.Some((packageParts_[1] ?? ff_core_List.List_grab(packageParts_, 1)))
164
168
  : ff_core_Option.None()), fixedLocation_))
165
169
  }
166
170
  }));
@@ -195,21 +199,23 @@ return ff_core_String.String_takeWhile(ff_core_String.String_replace(_w1, "\r",
195
199
  return (_w1 !== 35)
196
200
  }))
197
201
  })), ((_w1) => {
198
- return (ff_core_String.String_size(_w1) !== 0)
202
+ return (_w1.length !== 0)
199
203
  }));
200
204
  const rules_ = ff_core_List.List_collect(lines_, ((line_) => {
201
205
  const columns_ = ff_core_List.List_filter(ff_core_String.String_split(ff_core_String.String_replace(line_, "\t", " "), 32), ((_w1) => {
202
- return (ff_core_String.String_size(_w1) !== 0)
206
+ return (_w1.length !== 0)
203
207
  }));
204
- for(const for_o = defaultLocation_; for_o.Some;) {
208
+ {
209
+ const if_o = defaultLocation_
210
+ if(if_o.Some) {
205
211
  ff_core_Core.panic_(("Unexpected rule after the * rule: " + line_))
206
- break
212
+ }
207
213
  };
208
214
  if((columns_.length !== 2)) {
209
215
  ff_core_Core.panic_(("Could not parse workspace rule: " + line_))
210
216
  };
211
- const package_ = (columns_[0] ?? ff_core_List.internalGrab_(columns_, 0));
212
- const location_ = (columns_[1] ?? ff_core_List.internalGrab_(columns_, 1));
217
+ const package_ = (columns_[0] ?? ff_core_List.List_grab(columns_, 0));
218
+ const location_ = (columns_[1] ?? ff_core_List.List_grab(columns_, 1));
213
219
  const fixedLocation_ = (ff_core_String.String_endsWith(location_, "/")
214
220
  ? location_
215
221
  : (location_ + "/"));
@@ -221,11 +227,11 @@ const packageParts_ = ff_core_String.String_split(package_, 58);
221
227
  if((packageParts_.length !== 2)) {
222
228
  ff_core_Core.panic_(("Could not parse workspace package: " + package_))
223
229
  };
224
- if(((packageParts_[0] ?? ff_core_List.internalGrab_(packageParts_, 0)) === "*")) {
230
+ if(((packageParts_[0] ?? ff_core_List.List_grab(packageParts_, 0)) === "*")) {
225
231
  ff_core_Core.panic_(("Unexpected wildcard: " + package_))
226
232
  };
227
- return ff_core_Option.Some(ff_compiler_Workspace.WorkspaceRule((packageParts_[0] ?? ff_core_List.internalGrab_(packageParts_, 0)), (((packageParts_[1] ?? ff_core_List.internalGrab_(packageParts_, 1)) !== "*")
228
- ? ff_core_Option.Some((packageParts_[1] ?? ff_core_List.internalGrab_(packageParts_, 1)))
233
+ return ff_core_Option.Some(ff_compiler_Workspace.WorkspaceRule((packageParts_[0] ?? ff_core_List.List_grab(packageParts_, 0)), (((packageParts_[1] ?? ff_core_List.List_grab(packageParts_, 1)) !== "*")
234
+ ? ff_core_Option.Some((packageParts_[1] ?? ff_core_List.List_grab(packageParts_, 1)))
229
235
  : ff_core_Option.None()), fixedLocation_))
230
236
  }
231
237
  }));
@@ -42,6 +42,8 @@ import * as ff_core_Int from "../../ff/core/Int.mjs"
42
42
 
43
43
  import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
44
44
 
45
+ import * as ff_core_Js from "../../ff/core/Js.mjs"
46
+
45
47
  import * as ff_core_JsSystem from "../../ff/core/JsSystem.mjs"
46
48
 
47
49
  import * as ff_core_JsValue from "../../ff/core/JsValue.mjs"
@@ -68,6 +70,8 @@ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
68
70
 
69
71
  import * as ff_core_Path from "../../ff/core/Path.mjs"
70
72
 
73
+ import * as ff_core_Queue from "../../ff/core/Queue.mjs"
74
+
71
75
  import * as ff_core_Random from "../../ff/core/Random.mjs"
72
76
 
73
77
  import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
@@ -90,8 +94,6 @@ import * as ff_core_Try from "../../ff/core/Try.mjs"
90
94
 
91
95
  import * as ff_core_Unit from "../../ff/core/Unit.mjs"
92
96
 
93
- import * as ff_core_UnsafeJs from "../../ff/core/UnsafeJs.mjs"
94
-
95
97
  // type Any
96
98
 
97
99
 
@@ -101,45 +103,43 @@ import * as ff_core_UnsafeJs from "../../ff/core/UnsafeJs.mjs"
101
103
 
102
104
 
103
105
  export function toAny_(value_, ff_core_Any_HasAnyTag$T) {
104
-
105
- const anyTag = ff_core_Any_HasAnyTag$T.anyTag_()
106
- return {anyTag: anyTag, value: value_}
107
-
106
+ const anyTag_ = ff_core_Any_HasAnyTag$T.anyTag_();
107
+ return {anyTag: anyTag_, value: value_}
108
108
  }
109
109
 
110
110
  export function fromAny_(any_, ff_core_Any_HasAnyTag$T) {
111
-
112
- const anyTag = ff_core_Any_HasAnyTag$T.anyTag_()
113
- return any_.anyTag === anyTag ? ff_core_Option.Some(any_.value) : ff_core_Option.None()
114
-
111
+ const anyTag_ = ff_core_Any_HasAnyTag$T.anyTag_();
112
+ if((any_.anyTag === anyTag_)) {
113
+ return ff_core_Option.Some(any_.value)
114
+ } else return ff_core_Option.None()
115
115
  }
116
116
 
117
117
  export function internalAnyTag_(tag_) {
118
-
119
- return tag_
120
-
118
+ return tag_
121
119
  }
122
120
 
123
121
  export async function toAny_$(value_, ff_core_Any_HasAnyTag$T, $task) {
124
- throw new Error('Function toAny is missing on this target in async context.');
122
+ const anyTag_ = ff_core_Any_HasAnyTag$T.anyTag_();
123
+ return {anyTag: anyTag_, value: value_}
125
124
  }
126
125
 
127
126
  export async function fromAny_$(any_, ff_core_Any_HasAnyTag$T, $task) {
128
- throw new Error('Function fromAny is missing on this target in async context.');
127
+ const anyTag_ = ff_core_Any_HasAnyTag$T.anyTag_();
128
+ if((any_.anyTag === anyTag_)) {
129
+ return ff_core_Option.Some(any_.value)
130
+ } else return ff_core_Option.None()
129
131
  }
130
132
 
131
133
  export async function internalAnyTag_$(tag_, $task) {
132
- throw new Error('Function internalAnyTag is missing on this target in async context.');
134
+ return tag_
133
135
  }
134
136
 
135
137
  export function AnyTag_show(self_) {
136
-
137
- return self_
138
-
138
+ return self_
139
139
  }
140
140
 
141
141
  export async function AnyTag_show$(self_, $task) {
142
- throw new Error('Function AnyTag_show is missing on this target in async context.');
142
+ return self_
143
143
  }
144
144
 
145
145