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
@@ -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 PatternInfo
100
102
  export function PatternInfo(variant_, otherVariants_, fields_) {
101
103
  return {variant_, otherVariants_, fields_};
@@ -147,7 +149,7 @@ const cs_ = _1.second_.slice(1);
147
149
  ff_compiler_Patterns.check_(variants_, fs_, cs_, true, g_)
148
150
  return
149
151
  }
150
- if(_1.first_.length === 0 && _1.second_.length === 0) {
152
+ {
151
153
  const remaining_ = ff_core_List.List_map(ff_core_List.List_filter(ff_core_Map.Map_pairs(variants_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ((_w1) => {
152
154
  return (ff_core_Set.Set_size(_w1.second_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String) !== 0)
153
155
  })), ((_1) => {
@@ -179,7 +181,7 @@ if((name_ === "List$Link")) {
179
181
  return ff_core_List.List_toSet(["List$Empty"], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)
180
182
  } else {
181
183
  const variantName_ = unqualifiedName_(name_);
182
- const moduleName_ = ff_core_String.String_dropLast(name_, (ff_core_String.String_size(variantName_) + 1));
184
+ const moduleName_ = ff_core_String.String_dropLast(name_, (variantName_.length + 1));
183
185
  const variantModule_ = ff_core_Map.Map_grab(modules_, moduleName_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String);
184
186
  return ff_core_Option.Option_grab(ff_core_List.List_collectFirst(variantModule_.types_, ((definition_) => {
185
187
  return ff_core_Option.Option_map(ff_core_List.List_find(definition_.variants_, ((_w1) => {
@@ -230,7 +232,7 @@ if(pattern_a.PVariantAs) {
230
232
  const p_ = pattern_a;
231
233
  return ff_core_Option.Some(ff_compiler_Patterns.PatternInfo(unqualifiedName_(p_.name_), otherVariants_(p_.name_), []))
232
234
  }
233
- if(pattern_a.PAlias) {
235
+ {
234
236
  const p_ = pattern_a;
235
237
  return convertPattern_(p_.pattern_)
236
238
  }
@@ -270,7 +272,7 @@ const converted_ = ff_compiler_Patterns.convert_(modules_, cases_);
270
272
  ff_core_Try.Try_else(ff_core_Core.try_((() => {
271
273
  ff_compiler_Patterns.check_(ff_core_List.List_toMap([], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), [], converted_, false, false)
272
274
  })), (() => {
273
- throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError((cases_[0] ?? ff_core_List.internalGrab_(cases_, 0)).at_, "Unexhaustive match"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
275
+ throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError((cases_[0] ?? ff_core_List.List_grab(cases_, 0)).at_, "Unexhaustive match"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
274
276
  }))
275
277
  }
276
278
 
@@ -317,7 +319,7 @@ const cs_ = _1.second_.slice(1);
317
319
  ff_compiler_Patterns.check_(variants_, fs_, cs_, true, g_)
318
320
  return
319
321
  }
320
- if(_1.first_.length === 0 && _1.second_.length === 0) {
322
+ {
321
323
  const remaining_ = ff_core_List.List_map(ff_core_List.List_filter(ff_core_Map.Map_pairs(variants_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ((_w1) => {
322
324
  return (ff_core_Set.Set_size(_w1.second_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String) !== 0)
323
325
  })), ((_1) => {
@@ -349,7 +351,7 @@ if((name_ === "List$Link")) {
349
351
  return ff_core_List.List_toSet(["List$Empty"], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)
350
352
  } else {
351
353
  const variantName_ = unqualifiedName_(name_);
352
- const moduleName_ = ff_core_String.String_dropLast(name_, (ff_core_String.String_size(variantName_) + 1));
354
+ const moduleName_ = ff_core_String.String_dropLast(name_, (variantName_.length + 1));
353
355
  const variantModule_ = ff_core_Map.Map_grab(modules_, moduleName_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String);
354
356
  return ff_core_Option.Option_grab(ff_core_List.List_collectFirst(variantModule_.types_, ((definition_) => {
355
357
  return ff_core_Option.Option_map(ff_core_List.List_find(definition_.variants_, ((_w1) => {
@@ -400,7 +402,7 @@ if(pattern_a.PVariantAs) {
400
402
  const p_ = pattern_a;
401
403
  return ff_core_Option.Some(ff_compiler_Patterns.PatternInfo(unqualifiedName_(p_.name_), otherVariants_(p_.name_), []))
402
404
  }
403
- if(pattern_a.PAlias) {
405
+ {
404
406
  const p_ = pattern_a;
405
407
  return convertPattern_(p_.pattern_)
406
408
  }
@@ -440,7 +442,7 @@ const converted_ = ff_compiler_Patterns.convert_(modules_, cases_);
440
442
  ff_core_Try.Try_else(ff_core_Core.try_((() => {
441
443
  ff_compiler_Patterns.check_(ff_core_List.List_toMap([], ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), [], converted_, false, false)
442
444
  })), (() => {
443
- throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError((cases_[0] ?? ff_core_List.internalGrab_(cases_, 0)).at_, "Unexhaustive match"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
445
+ throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError((cases_[0] ?? ff_core_List.List_grab(cases_, 0)).at_, "Unexhaustive match"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
444
446
  }))
445
447
  }
446
448
 
@@ -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 Resolver
102
104
  export function Resolver(variables_, variableLocations_, variants_, types_, typeGenerics_, typeLocations_, asyncTypes_, typeParameters_, traits_, traitLocations_, state_, lspHook_) {
103
105
  return {variables_, variableLocations_, variants_, types_, typeGenerics_, typeLocations_, asyncTypes_, typeParameters_, traits_, traitLocations_, state_, lspHook_};
@@ -152,9 +154,9 @@ return ff_compiler_Resolver.Resolver_resolveLetDefinition(self3_, _w1, true)
152
154
  return ff_compiler_Resolver.Resolver_resolveFunctionDefinition(self3_, _w1, true, false)
153
155
  })))
154
156
  }))(module_);
155
- for(let for_i = 0, for_a = module2_.instances_, for_l = for_a.length; for_i < for_l; for_i++) {
157
+ for(let for_a = module2_.instances_, for_i = 0, for_l = for_a.length; for_i < for_l; for_i++) {
156
158
  const _w1 = for_a[for_i];
157
- for(let for_i = 0, for_a = _w1.typeArguments_, for_l = for_a.length; for_i < for_l; for_i++) {
159
+ for(let for_a = _w1.typeArguments_, for_i = 0, for_l = for_a.length; for_i < for_l; for_i++) {
158
160
  const _w1 = for_a[for_i];
159
161
  ff_compiler_Resolver.Resolver_checkInstanceType(self3_, _w1)
160
162
  }
@@ -171,7 +173,7 @@ const typeArguments_ = _1.generics_;
171
173
  if(ff_core_Set.Set_contains(self_.asyncTypes_, name_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)) {
172
174
  throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(type_.at_, "Traits must not be instantiated for capability types"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
173
175
  };
174
- for(let for_i = 0, for_a = typeArguments_, for_l = for_a.length; for_i < for_l; for_i++) {
176
+ for(let for_a = typeArguments_, for_i = 0, for_l = for_a.length; for_i < for_l; for_i++) {
175
177
  const _w1 = for_a[for_i];
176
178
  ff_compiler_Resolver.Resolver_checkInstanceType(self_, _w1)
177
179
  }
@@ -186,7 +188,7 @@ return
186
188
 
187
189
  export function Resolver_processImports(self_, imports_, modules_) {
188
190
  let resolver_ = self_;
189
- for(let for_i = 0, for_a = imports_, for_l = for_a.length; for_i < for_l; for_i++) {
191
+ for(let for_a = imports_, for_i = 0, for_l = for_a.length; for_i < for_l; for_i++) {
190
192
  const import_ = for_a[for_i];
191
193
  do {
192
194
  const _1 = ff_core_List.List_find(modules_, ((_w1) => {
@@ -197,7 +199,7 @@ const module_ = _1.value_;
197
199
  resolver_ = ff_compiler_Resolver.Resolver_processDefinitions(resolver_, module_, ff_core_Option.Some(import_.alias_))
198
200
  break
199
201
  }
200
- if(_1.None) {
202
+ {
201
203
  throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(import_.at_, ("No such module: " + import_.file_)), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
202
204
  }
203
205
  } while(false)
@@ -219,7 +221,7 @@ if(unqualified_) {
219
221
  return [ff_core_Pair.Pair(((alias_ + ".") + name_), full_), ff_core_Pair.Pair(name_, full_), ff_core_Pair.Pair(full_, full_)]
220
222
  }
221
223
  }
222
- if(_1.Some) {
224
+ {
223
225
  const alias_ = _1.value_;
224
226
  return [ff_core_Pair.Pair(((alias_ + ".") + name_), full_), ff_core_Pair.Pair(full_, full_)]
225
227
  }
@@ -321,9 +323,9 @@ return ff_compiler_Resolver.Resolver(_c.variables_, _c.variableLocations_, _c.va
321
323
  if((!ff_core_Option.Option_any(ff_core_List.List_first(definition_.generics_), ((_w1) => {
322
324
  return (_w1 === "Q$")
323
325
  })))) {
324
- for(let for_i = 0, for_a = [...definition_.commonFields_, ...ff_core_List.List_flatMap(definition_.variants_, ((_w1) => {
326
+ for(let for_a = [...definition_.commonFields_, ...ff_core_List.List_flatMap(definition_.variants_, ((_w1) => {
325
327
  return _w1.fields_
326
- }))], for_l = for_a.length; for_i < for_l; for_i++) {
328
+ }))], for_i = 0, for_l = for_a.length; for_i < for_l; for_i++) {
327
329
  const f_ = for_a[for_i];
328
330
  if(ff_compiler_Resolver.Resolver_containsAsyncType(self2_, f_.valueType_)) {
329
331
  throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(f_.at_, "Only capabilities can contain fields of concrete capability types"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
@@ -409,18 +411,9 @@ const lambda_ = _1.second_;
409
411
  const signature_ = ff_core_Option.Option_grab(ff_core_List.List_find(definition_.methods_, ((_w1) => {
410
412
  return (_w1.name_ === name_)
411
413
  })));
412
- const function1_ = ff_compiler_Syntax.DFunction(signature_.at_, signature_, ff_compiler_Syntax.FireflyTarget(lambda_));
414
+ const function1_ = ff_compiler_Syntax.DFunction(signature_.at_, signature_, lambda_);
413
415
  const function2_ = ff_compiler_Resolver.Resolver_resolveFunctionDefinition(self2_, function1_, true, false);
414
- return ff_core_Pair.Pair(name_, (((_1) => {
415
- if(_1.FireflyTarget) {
416
- const lambda_ = _1.lambda_;
417
- return lambda_
418
- }
419
- {
420
- throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(signature_.at_, "Internal error: Expected method default to be a lambda"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
421
- }
422
- }))(function2_.body_))
423
- return
416
+ return ff_core_Pair.Pair(name_, function2_.body_)
424
417
  }
425
418
  })), _c.methodGenerators_)
426
419
  return
@@ -737,7 +730,7 @@ throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Sy
737
730
  })), ff_compiler_Resolver.Resolver_resolveTerm(self_, value_, topLevel_, false))
738
731
  return
739
732
  }
740
- if(_1.EAssignField) {
733
+ {
741
734
  const at_ = _1.at_;
742
735
  const operator_ = _1.operator_;
743
736
  const record_ = _1.record_;
@@ -755,7 +748,7 @@ const topLevel_a = topLevel_;
755
748
  if(type_a.TVariable) {
756
749
  return type_
757
750
  }
758
- if(type_a.TConstructor) {
751
+ {
759
752
  const constructor_ = type_a;
760
753
  if(ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_)) {
761
754
  const at_ = ff_core_Option.Option_else(ff_core_Map.Map_get(self_.typeLocations_, constructor_.name_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), (() => {
@@ -841,18 +834,11 @@ return
841
834
  export function Resolver_resolveFunctionDefinition(self_, definition_, topLevel_, isInstanceMethod_) {
842
835
  const signature_ = ff_compiler_Resolver.Resolver_resolveSignature(self_, definition_.signature_, topLevel_, isInstanceMethod_);
843
836
  const self2_ = ff_compiler_Resolver.Resolver_withSignature(self_, signature_);
844
- const body_ = ff_compiler_Syntax.Target_mapFirefly(definition_.body_, ((lambda_) => {
845
- {
846
- const _1 = lambda_;
847
- {
848
- const _c = _1;
849
- return ff_compiler_Syntax.Lambda(_c.at_, signature_.effect_, ff_core_List.List_map(lambda_.cases_, ((_w1) => {
837
+ const body_ = (((_c) => {
838
+ return ff_compiler_Syntax.Lambda(_c.at_, signature_.effect_, ff_core_List.List_map(definition_.body_.cases_, ((_w1) => {
850
839
  return ff_compiler_Resolver.Resolver_resolveCase(self2_, _w1, false)
851
840
  })))
852
- return
853
- }
854
- }
855
- }));
841
+ }))(definition_.body_);
856
842
  return ff_compiler_Syntax.DFunction(definition_.at_, signature_, body_)
857
843
  }
858
844
 
@@ -867,12 +853,14 @@ return ff_compiler_Syntax.Signature(_c.at_, _c.name_, _c.member_, ["Q$", ...sign
867
853
  : (((_c) => {
868
854
  return ff_compiler_Syntax.Signature(_c.at_, _c.name_, _c.member_, _c.generics_, _c.constraints_, _c.parameters_, _c.returnType_, ff_compiler_Resolver.Resolver_freshUnificationVariable(self_, signature_.at_))
869
855
  }))(signature_));
870
- for(const for_o = ff_core_List.List_find(newSignature_.generics_, ((name_) => {
856
+ {
857
+ const if_o = ff_core_List.List_find(newSignature_.generics_, ((name_) => {
871
858
  return ff_core_Set.Set_contains(self_.typeParameters_, name_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)
872
- })); for_o.Some;) {
873
- const name_ = for_o.value_;
859
+ }))
860
+ if(if_o.Some) {
861
+ const name_ = if_o.value_;
874
862
  throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(signature_.at_, (("Type parameter " + name_) + " is already in scope")), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
875
- break
863
+ }
876
864
  };
877
865
  const self2_ = ff_compiler_Resolver.Resolver_withSignature(self_, newSignature_);
878
866
  {
@@ -958,7 +946,7 @@ return ff_core_Pair.Pair(x_, ff_compiler_Resolver.CaseVariable(variableAt_, x_,
958
946
  })), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)
959
947
  return
960
948
  }
961
- if(pattern_a.PAlias) {
949
+ {
962
950
  const at_ = pattern_a.at_;
963
951
  const pattern_ = pattern_a.pattern_;
964
952
  const variable_ = pattern_a.variable_;
@@ -1034,7 +1022,7 @@ return name_
1034
1022
  }));
1035
1023
  return ff_compiler_Syntax.PVariantAs(at_, newName_, variableAt_, variable_)
1036
1024
  }
1037
- if(pattern_a.PAlias) {
1025
+ {
1038
1026
  const at_ = pattern_a.at_;
1039
1027
  const pattern_ = pattern_a.pattern_;
1040
1028
  const variable_ = pattern_a.variable_;
@@ -1049,7 +1037,7 @@ const type_a = type_;
1049
1037
  if(type_a.TVariable) {
1050
1038
  return false
1051
1039
  }
1052
- if(type_a.TConstructor) {
1040
+ {
1053
1041
  const constructor_ = type_a;
1054
1042
  const name_ = (ff_core_String.String_contains(constructor_.name_, "$")
1055
1043
  ? constructor_.name_
@@ -1097,9 +1085,9 @@ return ff_compiler_Resolver.Resolver_resolveLetDefinition(self3_, _w1, true)
1097
1085
  return ff_compiler_Resolver.Resolver_resolveFunctionDefinition(self3_, _w1, true, false)
1098
1086
  })))
1099
1087
  }))(module_);
1100
- for(let for_i = 0, for_a = module2_.instances_, for_l = for_a.length; for_i < for_l; for_i++) {
1088
+ for(let for_a = module2_.instances_, for_i = 0, for_l = for_a.length; for_i < for_l; for_i++) {
1101
1089
  const _w1 = for_a[for_i];
1102
- for(let for_i = 0, for_a = _w1.typeArguments_, for_l = for_a.length; for_i < for_l; for_i++) {
1090
+ for(let for_a = _w1.typeArguments_, for_i = 0, for_l = for_a.length; for_i < for_l; for_i++) {
1103
1091
  const _w1 = for_a[for_i];
1104
1092
  ff_compiler_Resolver.Resolver_checkInstanceType(self3_, _w1)
1105
1093
  }
@@ -1116,7 +1104,7 @@ const typeArguments_ = _1.generics_;
1116
1104
  if(ff_core_Set.Set_contains(self_.asyncTypes_, name_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)) {
1117
1105
  throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(type_.at_, "Traits must not be instantiated for capability types"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
1118
1106
  };
1119
- for(let for_i = 0, for_a = typeArguments_, for_l = for_a.length; for_i < for_l; for_i++) {
1107
+ for(let for_a = typeArguments_, for_i = 0, for_l = for_a.length; for_i < for_l; for_i++) {
1120
1108
  const _w1 = for_a[for_i];
1121
1109
  ff_compiler_Resolver.Resolver_checkInstanceType(self_, _w1)
1122
1110
  }
@@ -1131,7 +1119,7 @@ return
1131
1119
 
1132
1120
  export async function Resolver_processImports$(self_, imports_, modules_, $task) {
1133
1121
  let resolver_ = self_;
1134
- for(let for_i = 0, for_a = imports_, for_l = for_a.length; for_i < for_l; for_i++) {
1122
+ for(let for_a = imports_, for_i = 0, for_l = for_a.length; for_i < for_l; for_i++) {
1135
1123
  const import_ = for_a[for_i];
1136
1124
  do {
1137
1125
  const _1 = ff_core_List.List_find(modules_, ((_w1) => {
@@ -1142,7 +1130,7 @@ const module_ = _1.value_;
1142
1130
  resolver_ = ff_compiler_Resolver.Resolver_processDefinitions(resolver_, module_, ff_core_Option.Some(import_.alias_))
1143
1131
  break
1144
1132
  }
1145
- if(_1.None) {
1133
+ {
1146
1134
  throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(import_.at_, ("No such module: " + import_.file_)), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
1147
1135
  }
1148
1136
  } while(false)
@@ -1164,7 +1152,7 @@ if(unqualified_) {
1164
1152
  return [ff_core_Pair.Pair(((alias_ + ".") + name_), full_), ff_core_Pair.Pair(name_, full_), ff_core_Pair.Pair(full_, full_)]
1165
1153
  }
1166
1154
  }
1167
- if(_1.Some) {
1155
+ {
1168
1156
  const alias_ = _1.value_;
1169
1157
  return [ff_core_Pair.Pair(((alias_ + ".") + name_), full_), ff_core_Pair.Pair(full_, full_)]
1170
1158
  }
@@ -1266,9 +1254,9 @@ return ff_compiler_Resolver.Resolver(_c.variables_, _c.variableLocations_, _c.va
1266
1254
  if((!ff_core_Option.Option_any(ff_core_List.List_first(definition_.generics_), ((_w1) => {
1267
1255
  return (_w1 === "Q$")
1268
1256
  })))) {
1269
- for(let for_i = 0, for_a = [...definition_.commonFields_, ...ff_core_List.List_flatMap(definition_.variants_, ((_w1) => {
1257
+ for(let for_a = [...definition_.commonFields_, ...ff_core_List.List_flatMap(definition_.variants_, ((_w1) => {
1270
1258
  return _w1.fields_
1271
- }))], for_l = for_a.length; for_i < for_l; for_i++) {
1259
+ }))], for_i = 0, for_l = for_a.length; for_i < for_l; for_i++) {
1272
1260
  const f_ = for_a[for_i];
1273
1261
  if(ff_compiler_Resolver.Resolver_containsAsyncType(self2_, f_.valueType_)) {
1274
1262
  throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(f_.at_, "Only capabilities can contain fields of concrete capability types"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
@@ -1354,18 +1342,9 @@ const lambda_ = _1.second_;
1354
1342
  const signature_ = ff_core_Option.Option_grab(ff_core_List.List_find(definition_.methods_, ((_w1) => {
1355
1343
  return (_w1.name_ === name_)
1356
1344
  })));
1357
- const function1_ = ff_compiler_Syntax.DFunction(signature_.at_, signature_, ff_compiler_Syntax.FireflyTarget(lambda_));
1345
+ const function1_ = ff_compiler_Syntax.DFunction(signature_.at_, signature_, lambda_);
1358
1346
  const function2_ = ff_compiler_Resolver.Resolver_resolveFunctionDefinition(self2_, function1_, true, false);
1359
- return ff_core_Pair.Pair(name_, (((_1) => {
1360
- if(_1.FireflyTarget) {
1361
- const lambda_ = _1.lambda_;
1362
- return lambda_
1363
- }
1364
- {
1365
- throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(signature_.at_, "Internal error: Expected method default to be a lambda"), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
1366
- }
1367
- }))(function2_.body_))
1368
- return
1347
+ return ff_core_Pair.Pair(name_, function2_.body_)
1369
1348
  }
1370
1349
  })), _c.methodGenerators_)
1371
1350
  return
@@ -1682,7 +1661,7 @@ throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Sy
1682
1661
  })), ff_compiler_Resolver.Resolver_resolveTerm(self_, value_, topLevel_, false))
1683
1662
  return
1684
1663
  }
1685
- if(_1.EAssignField) {
1664
+ {
1686
1665
  const at_ = _1.at_;
1687
1666
  const operator_ = _1.operator_;
1688
1667
  const record_ = _1.record_;
@@ -1700,7 +1679,7 @@ const topLevel_a = topLevel_;
1700
1679
  if(type_a.TVariable) {
1701
1680
  return type_
1702
1681
  }
1703
- if(type_a.TConstructor) {
1682
+ {
1704
1683
  const constructor_ = type_a;
1705
1684
  if(ff_compiler_LspHook.LspHook_isEnabled(self_.lspHook_)) {
1706
1685
  const at_ = ff_core_Option.Option_else(ff_core_Map.Map_get(self_.typeLocations_, constructor_.name_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), (() => {
@@ -1786,18 +1765,11 @@ return
1786
1765
  export async function Resolver_resolveFunctionDefinition$(self_, definition_, topLevel_, isInstanceMethod_, $task) {
1787
1766
  const signature_ = ff_compiler_Resolver.Resolver_resolveSignature(self_, definition_.signature_, topLevel_, isInstanceMethod_);
1788
1767
  const self2_ = ff_compiler_Resolver.Resolver_withSignature(self_, signature_);
1789
- const body_ = ff_compiler_Syntax.Target_mapFirefly(definition_.body_, ((lambda_) => {
1790
- {
1791
- const _1 = lambda_;
1792
- {
1793
- const _c = _1;
1794
- return ff_compiler_Syntax.Lambda(_c.at_, signature_.effect_, ff_core_List.List_map(lambda_.cases_, ((_w1) => {
1768
+ const body_ = (((_c) => {
1769
+ return ff_compiler_Syntax.Lambda(_c.at_, signature_.effect_, ff_core_List.List_map(definition_.body_.cases_, ((_w1) => {
1795
1770
  return ff_compiler_Resolver.Resolver_resolveCase(self2_, _w1, false)
1796
1771
  })))
1797
- return
1798
- }
1799
- }
1800
- }));
1772
+ }))(definition_.body_);
1801
1773
  return ff_compiler_Syntax.DFunction(definition_.at_, signature_, body_)
1802
1774
  }
1803
1775
 
@@ -1812,12 +1784,14 @@ return ff_compiler_Syntax.Signature(_c.at_, _c.name_, _c.member_, ["Q$", ...sign
1812
1784
  : (((_c) => {
1813
1785
  return ff_compiler_Syntax.Signature(_c.at_, _c.name_, _c.member_, _c.generics_, _c.constraints_, _c.parameters_, _c.returnType_, ff_compiler_Resolver.Resolver_freshUnificationVariable(self_, signature_.at_))
1814
1786
  }))(signature_));
1815
- for(const for_o = ff_core_List.List_find(newSignature_.generics_, ((name_) => {
1787
+ {
1788
+ const if_o = ff_core_List.List_find(newSignature_.generics_, ((name_) => {
1816
1789
  return ff_core_Set.Set_contains(self_.typeParameters_, name_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)
1817
- })); for_o.Some;) {
1818
- const name_ = for_o.value_;
1790
+ }))
1791
+ if(if_o.Some) {
1792
+ const name_ = if_o.value_;
1819
1793
  throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_compiler_Syntax.CompileError(signature_.at_, (("Type parameter " + name_) + " is already in scope")), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError)})
1820
- break
1794
+ }
1821
1795
  };
1822
1796
  const self2_ = ff_compiler_Resolver.Resolver_withSignature(self_, newSignature_);
1823
1797
  {
@@ -1903,7 +1877,7 @@ return ff_core_Pair.Pair(x_, ff_compiler_Resolver.CaseVariable(variableAt_, x_,
1903
1877
  })), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)
1904
1878
  return
1905
1879
  }
1906
- if(pattern_a.PAlias) {
1880
+ {
1907
1881
  const at_ = pattern_a.at_;
1908
1882
  const pattern_ = pattern_a.pattern_;
1909
1883
  const variable_ = pattern_a.variable_;
@@ -1979,7 +1953,7 @@ return name_
1979
1953
  }));
1980
1954
  return ff_compiler_Syntax.PVariantAs(at_, newName_, variableAt_, variable_)
1981
1955
  }
1982
- if(pattern_a.PAlias) {
1956
+ {
1983
1957
  const at_ = pattern_a.at_;
1984
1958
  const pattern_ = pattern_a.pattern_;
1985
1959
  const variable_ = pattern_a.variable_;
@@ -1994,7 +1968,7 @@ const type_a = type_;
1994
1968
  if(type_a.TVariable) {
1995
1969
  return false
1996
1970
  }
1997
- if(type_a.TConstructor) {
1971
+ {
1998
1972
  const constructor_ = type_a;
1999
1973
  const name_ = (ff_core_String.String_contains(constructor_.name_, "$")
2000
1974
  ? constructor_.name_
@@ -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 Substitution
100
102
  export function Substitution(substitution_) {
101
103
  return {substitution_};
@@ -161,10 +163,7 @@ export function Substitution_substituteFunctionDefinition(self_, definition_) {
161
163
  const _1 = definition_;
162
164
  {
163
165
  const _c = _1;
164
- return ff_compiler_Syntax.DFunction(_c.at_, ff_compiler_Substitution.Substitution_substituteSignature(self_, definition_.signature_), ff_compiler_Syntax.Target_mapFirefly(definition_.body_, ((_w1) => {
165
- return ff_compiler_Substitution.Substitution_substituteLambda(self_, _w1)
166
- })))
167
- return
166
+ return ff_compiler_Syntax.DFunction(_c.at_, ff_compiler_Substitution.Substitution_substituteSignature(self_, definition_.signature_), ff_compiler_Substitution.Substitution_substituteLambda(self_, definition_.body_))
168
167
  }
169
168
  }
170
169
  }
@@ -410,7 +409,7 @@ return ff_compiler_Syntax.DynamicCall(ff_compiler_Substitution.Substitution_subs
410
409
  }
411
410
  return
412
411
  }
413
- if(_1.StaticCall) {
412
+ {
414
413
  return e_.target_
415
414
  }
416
415
  }))(e_.target_), ff_compiler_Substitution.Substitution_substituteType(self_, e_.effect_), ff_core_List.List_map(e_.typeArguments_, ((_w1) => {
@@ -462,7 +461,7 @@ return ff_compiler_Syntax.EAssign(_c.at_, _c.operator_, _c.variable_, ff_compile
462
461
  }
463
462
  return
464
463
  }
465
- if(_1.EAssignField) {
464
+ {
466
465
  const e_ = _1;
467
466
  {
468
467
  const _1 = e_;
@@ -509,7 +508,7 @@ return ff_compiler_Syntax.TConstructor(at_, ff_compiler_Substitution.core_("Noth
509
508
  }
510
509
  return
511
510
  }
512
- if(type_a.TConstructor) {
511
+ {
513
512
  const t_ = type_a;
514
513
  {
515
514
  const _1 = t_;
@@ -601,10 +600,7 @@ export async function Substitution_substituteFunctionDefinition$(self_, definiti
601
600
  const _1 = definition_;
602
601
  {
603
602
  const _c = _1;
604
- return ff_compiler_Syntax.DFunction(_c.at_, ff_compiler_Substitution.Substitution_substituteSignature(self_, definition_.signature_), ff_compiler_Syntax.Target_mapFirefly(definition_.body_, ((_w1) => {
605
- return ff_compiler_Substitution.Substitution_substituteLambda(self_, _w1)
606
- })))
607
- return
603
+ return ff_compiler_Syntax.DFunction(_c.at_, ff_compiler_Substitution.Substitution_substituteSignature(self_, definition_.signature_), ff_compiler_Substitution.Substitution_substituteLambda(self_, definition_.body_))
608
604
  }
609
605
  }
610
606
  }
@@ -850,7 +846,7 @@ return ff_compiler_Syntax.DynamicCall(ff_compiler_Substitution.Substitution_subs
850
846
  }
851
847
  return
852
848
  }
853
- if(_1.StaticCall) {
849
+ {
854
850
  return e_.target_
855
851
  }
856
852
  }))(e_.target_), ff_compiler_Substitution.Substitution_substituteType(self_, e_.effect_), ff_core_List.List_map(e_.typeArguments_, ((_w1) => {
@@ -902,7 +898,7 @@ return ff_compiler_Syntax.EAssign(_c.at_, _c.operator_, _c.variable_, ff_compile
902
898
  }
903
899
  return
904
900
  }
905
- if(_1.EAssignField) {
901
+ {
906
902
  const e_ = _1;
907
903
  {
908
904
  const _1 = e_;
@@ -949,7 +945,7 @@ return ff_compiler_Syntax.TConstructor(at_, ff_compiler_Substitution.core_("Noth
949
945
  }
950
946
  return
951
947
  }
952
- if(type_a.TConstructor) {
948
+ {
953
949
  const t_ = type_a;
954
950
  {
955
951
  const _1 = t_;