firefly-compiler 0.4.5 → 0.4.6

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 (78) hide show
  1. package/.hintrc +4 -4
  2. package/README.md +1 -1
  3. package/core/HttpClient.ff +1 -1
  4. package/lsp/LanguageServer.ff +32 -7
  5. package/lsp/stderr.txt +1 -0
  6. package/lsp/stdin.txt +11 -0
  7. package/lsp/stdout.txt +41 -0
  8. package/lux/Main.ff +56 -2
  9. package/meetup/AutoCompletion.ff +6 -0
  10. package/output/js/ff/compiler/Builder.mjs +444 -444
  11. package/output/js/ff/compiler/Compiler.mjs +416 -416
  12. package/output/js/ff/compiler/Dependencies.mjs +389 -389
  13. package/output/js/ff/compiler/Deriver.mjs +1170 -1170
  14. package/output/js/ff/compiler/Dictionaries.mjs +1309 -1309
  15. package/output/js/ff/compiler/Environment.mjs +1015 -1015
  16. package/output/js/ff/compiler/Inference.mjs +4268 -4268
  17. package/output/js/ff/compiler/JsEmitter.mjs +5391 -5391
  18. package/output/js/ff/compiler/JsImporter.mjs +266 -266
  19. package/output/js/ff/compiler/LspHook.mjs +793 -793
  20. package/output/js/ff/compiler/Main.mjs +1675 -1675
  21. package/output/js/ff/compiler/Parser.mjs +4008 -4008
  22. package/output/js/ff/compiler/Patterns.mjs +927 -927
  23. package/output/js/ff/compiler/Resolver.mjs +2307 -2307
  24. package/output/js/ff/compiler/Substitution.mjs +1150 -1150
  25. package/output/js/ff/compiler/Syntax.mjs +12434 -12434
  26. package/output/js/ff/compiler/Token.mjs +3096 -3096
  27. package/output/js/ff/compiler/Tokenizer.mjs +593 -593
  28. package/output/js/ff/compiler/Unification.mjs +1752 -1752
  29. package/output/js/ff/compiler/Wildcards.mjs +608 -608
  30. package/output/js/ff/compiler/Workspace.mjs +687 -687
  31. package/output/js/ff/core/Any.mjs +143 -143
  32. package/output/js/ff/core/Array.mjs +547 -547
  33. package/output/js/ff/core/AssetSystem.mjs +274 -274
  34. package/output/js/ff/core/Atomic.mjs +154 -154
  35. package/output/js/ff/core/Bool.mjs +152 -152
  36. package/output/js/ff/core/Box.mjs +112 -112
  37. package/output/js/ff/core/BrowserSystem.mjs +126 -126
  38. package/output/js/ff/core/Buffer.mjs +395 -395
  39. package/output/js/ff/core/BuildSystem.mjs +296 -296
  40. package/output/js/ff/core/Channel.mjs +189 -189
  41. package/output/js/ff/core/Char.mjs +149 -149
  42. package/output/js/ff/core/Core.mjs +300 -300
  43. package/output/js/ff/core/Duration.mjs +116 -116
  44. package/output/js/ff/core/Equal.mjs +179 -179
  45. package/output/js/ff/core/Error.mjs +142 -142
  46. package/output/js/ff/core/FileHandle.mjs +150 -150
  47. package/output/js/ff/core/Float.mjs +225 -225
  48. package/output/js/ff/core/HttpClient.mjs +190 -190
  49. package/output/js/ff/core/Instant.mjs +109 -109
  50. package/output/js/ff/core/Int.mjs +265 -265
  51. package/output/js/ff/core/IntMap.mjs +280 -280
  52. package/output/js/ff/core/JsSystem.mjs +238 -238
  53. package/output/js/ff/core/JsValue.mjs +708 -708
  54. package/output/js/ff/core/List.mjs +2334 -2334
  55. package/output/js/ff/core/Lock.mjs +229 -229
  56. package/output/js/ff/core/Log.mjs +163 -163
  57. package/output/js/ff/core/Map.mjs +362 -362
  58. package/output/js/ff/core/NodeSystem.mjs +294 -294
  59. package/output/js/ff/core/Nothing.mjs +104 -104
  60. package/output/js/ff/core/Option.mjs +1015 -1015
  61. package/output/js/ff/core/Ordering.mjs +730 -730
  62. package/output/js/ff/core/Pair.mjs +331 -331
  63. package/output/js/ff/core/Path.mjs +545 -545
  64. package/output/js/ff/core/RbMap.mjs +1940 -1940
  65. package/output/js/ff/core/Serializable.mjs +428 -428
  66. package/output/js/ff/core/Set.mjs +254 -254
  67. package/output/js/ff/core/Show.mjs +205 -205
  68. package/output/js/ff/core/SourceLocation.mjs +229 -229
  69. package/output/js/ff/core/Stack.mjs +529 -529
  70. package/output/js/ff/core/Stream.mjs +1304 -1304
  71. package/output/js/ff/core/String.mjs +365 -365
  72. package/output/js/ff/core/StringMap.mjs +280 -280
  73. package/output/js/ff/core/Task.mjs +320 -320
  74. package/output/js/ff/core/Try.mjs +507 -507
  75. package/output/js/ff/core/Unit.mjs +151 -151
  76. package/package.json +29 -29
  77. package/vscode/package-lock.json +5 -5
  78. package/vscode/package.json +1 -1
@@ -1,1015 +1,1015 @@
1
-
2
-
3
- import * as ff_compiler_Environment from "../../ff/compiler/Environment.mjs"
4
-
5
- import * as ff_compiler_Syntax from "../../ff/compiler/Syntax.mjs"
6
-
7
- import * as ff_core_Any from "../../ff/core/Any.mjs"
8
-
9
- import * as ff_core_Array from "../../ff/core/Array.mjs"
10
-
11
- import * as ff_core_AssetSystem from "../../ff/core/AssetSystem.mjs"
12
-
13
- import * as ff_core_Atomic from "../../ff/core/Atomic.mjs"
14
-
15
- import * as ff_core_Bool from "../../ff/core/Bool.mjs"
16
-
17
- import * as ff_core_Box from "../../ff/core/Box.mjs"
18
-
19
- import * as ff_core_BrowserSystem from "../../ff/core/BrowserSystem.mjs"
20
-
21
- import * as ff_core_Buffer from "../../ff/core/Buffer.mjs"
22
-
23
- import * as ff_core_BuildSystem from "../../ff/core/BuildSystem.mjs"
24
-
25
- import * as ff_core_Channel from "../../ff/core/Channel.mjs"
26
-
27
- import * as ff_core_Char from "../../ff/core/Char.mjs"
28
-
29
- import * as ff_core_Core from "../../ff/core/Core.mjs"
30
-
31
- import * as ff_core_Duration from "../../ff/core/Duration.mjs"
32
-
33
- import * as ff_core_Equal from "../../ff/core/Equal.mjs"
34
-
35
- import * as ff_core_Error from "../../ff/core/Error.mjs"
36
-
37
- import * as ff_core_FileHandle from "../../ff/core/FileHandle.mjs"
38
-
39
- import * as ff_core_Float from "../../ff/core/Float.mjs"
40
-
41
- import * as ff_core_HttpClient from "../../ff/core/HttpClient.mjs"
42
-
43
- import * as ff_core_Instant from "../../ff/core/Instant.mjs"
44
-
45
- import * as ff_core_Int from "../../ff/core/Int.mjs"
46
-
47
- import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
48
-
49
- import * as ff_core_JsSystem from "../../ff/core/JsSystem.mjs"
50
-
51
- import * as ff_core_JsValue from "../../ff/core/JsValue.mjs"
52
-
53
- import * as ff_core_List from "../../ff/core/List.mjs"
54
-
55
- import * as ff_core_Lock from "../../ff/core/Lock.mjs"
56
-
57
- import * as ff_core_Log from "../../ff/core/Log.mjs"
58
-
59
- import * as ff_core_Map from "../../ff/core/Map.mjs"
60
-
61
- import * as ff_core_NodeSystem from "../../ff/core/NodeSystem.mjs"
62
-
63
- import * as ff_core_Nothing from "../../ff/core/Nothing.mjs"
64
-
65
- import * as ff_core_Option from "../../ff/core/Option.mjs"
66
-
67
- import * as ff_core_Ordering from "../../ff/core/Ordering.mjs"
68
-
69
- import * as ff_core_Pair from "../../ff/core/Pair.mjs"
70
-
71
- import * as ff_core_Path from "../../ff/core/Path.mjs"
72
-
73
- import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
74
-
75
- import * as ff_core_Set from "../../ff/core/Set.mjs"
76
-
77
- import * as ff_core_Show from "../../ff/core/Show.mjs"
78
-
79
- import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
80
-
81
- import * as ff_core_Stack from "../../ff/core/Stack.mjs"
82
-
83
- import * as ff_core_Stream from "../../ff/core/Stream.mjs"
84
-
85
- import * as ff_core_String from "../../ff/core/String.mjs"
86
-
87
- import * as ff_core_StringMap from "../../ff/core/StringMap.mjs"
88
-
89
- import * as ff_core_Task from "../../ff/core/Task.mjs"
90
-
91
- import * as ff_core_Try from "../../ff/core/Try.mjs"
92
-
93
- import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
-
95
- // type Environment
96
- export function Environment(modulePrefix_, symbols_, traits_, imports_, effect_, selfVariable_) {
97
- return {modulePrefix_, symbols_, traits_, imports_, effect_, selfVariable_};
98
- }
99
-
100
- // type Scheme
101
- export function Scheme(isVariable_, isMutable_, isNewtype_, isTraitMethod_, signature_) {
102
- return {isVariable_, isMutable_, isNewtype_, isTraitMethod_, signature_};
103
- }
104
-
105
- // type Instantiated
106
- export function Instantiated(typeArguments_, scheme_) {
107
- return {typeArguments_, scheme_};
108
- }
109
-
110
-
111
-
112
- export function make_(module_, otherModules_, alreadyFlat_) {
113
- const processed_ = ff_compiler_Environment.processModule_(module_, true, alreadyFlat_);
114
- const otherProcessed_ = ff_core_List.List_map(otherModules_, ((_w1) => {
115
- return ff_compiler_Environment.processModule_(_w1, false, false)
116
- }));
117
- return ff_compiler_Environment.Environment(ff_compiler_Environment.fullName_(module_, ""), ff_core_Map.Map_addAll(processed_.symbols_, ff_core_List.List_foldLeft(ff_core_List.List_map(otherProcessed_, ((_w1) => {
118
- return _w1.symbols_
119
- })), ff_core_Map.empty_(), ((_w1, _w2) => {
120
- return ff_core_Map.Map_addAll(_w1, _w2, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)
121
- })), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_Map.Map_addAll(processed_.traits_, ff_core_List.List_foldLeft(ff_core_List.List_map(otherProcessed_, ((_w1) => {
122
- return _w1.traits_
123
- })), ff_core_Map.empty_(), ((_w1, _w2) => {
124
- return ff_core_Map.Map_addAll(_w1, _w2, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)
125
- })), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_List.List_toMap(ff_core_List.List_map(module_.imports_, ((i_) => {
126
- return ff_core_Pair.Pair(i_.alias_, i_)
127
- })), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_compiler_Syntax.TConstructor(ff_compiler_Syntax.Location(module_.file_, 0, 0), "ff:core/Nothing.Nothing", ff_core_List.Empty()), ff_core_Option.None())
128
- }
129
-
130
- export function fullName_(module_, name_) {
131
- return ((((ff_compiler_Syntax.PackagePair_groupName(module_.packagePair_, ":") + "/") + ff_core_String.String_dropLast(module_.file_, 3)) + ".") + name_)
132
- }
133
-
134
- export function fail_(at_, message_) {
135
- return ff_core_Core.panic_(((message_ + " ") + ff_compiler_Syntax.Location_show(at_)))
136
- }
137
-
138
- export function processModule_(module_, isCurrentModule_, alreadyFlat_) {
139
- const functions_ = ff_core_List.List_map(module_.functions_, ((d_) => {
140
- return ff_core_Pair.Pair(ff_compiler_Environment.fullName_(module_, d_.signature_.name_), ff_compiler_Environment.Scheme(false, false, false, false, d_.signature_))
141
- }));
142
- const lets_ = ff_core_List.List_map(module_.lets_, ((d_) => {
143
- const noEffect_ = ff_compiler_Syntax.TConstructor(d_.at_, "ff:core/Nothing.Nothing", ff_core_List.Empty());
144
- return ff_core_Pair.Pair(ff_compiler_Environment.fullName_(module_, d_.name_), ff_compiler_Environment.Scheme(true, false, false, false, ff_compiler_Syntax.Signature(d_.at_, d_.name_, false, ff_core_List.Empty(), ff_core_List.Empty(), ff_core_List.Empty(), d_.variableType_, noEffect_)))
145
- }));
146
- const traitMethods_ = ff_core_List.List_flatMap(module_.traits_, ((definition_) => {
147
- const generics_ = ff_core_List.List_map(definition_.generics_, ((name_) => {
148
- return ff_compiler_Syntax.TConstructor(definition_.at_, name_, ff_core_List.Empty())
149
- }));
150
- const constraint_ = ff_compiler_Syntax.Constraint(definition_.at_, ff_compiler_Environment.fullName_(module_, definition_.name_), generics_);
151
- const outerConstraints_ = (alreadyFlat_
152
- ? ff_core_List.Empty()
153
- : definition_.constraints_);
154
- return ff_core_List.List_map(definition_.methods_, ((methodSignature_) => {
155
- const generics_ = ff_core_List.List_partition(ff_core_List.List_addAll(definition_.generics_, methodSignature_.generics_), ((_w1) => {
156
- return (_w1 === "Q$")
157
- }));
158
- const signature_ = (((_c) => {
159
- return ff_compiler_Syntax.Signature(_c.at_, _c.name_, _c.member_, ff_core_List.List_addAll(ff_core_List.List_takeFirst(generics_.first_, 1), generics_.second_), ff_core_List.Link(constraint_, ff_core_List.List_addAll(outerConstraints_, methodSignature_.constraints_)), _c.parameters_, _c.returnType_, _c.effect_)
160
- }))(methodSignature_);
161
- return ff_core_Pair.Pair(ff_compiler_Environment.fullName_(module_, signature_.name_), ff_compiler_Environment.Scheme(false, false, false, true, signature_))
162
- }))
163
- }));
164
- const extends_ = ff_core_List.List_flatMap(module_.extends_, ((d_) => {
165
- {
166
- const _1 = d_.type_;
167
- {
168
- if(_1.TVariable) {
169
- const t_ = _1;
170
- return ff_compiler_Environment.fail_(t_.at_, ("Unexpected type variable: $" + t_.index_))
171
- return
172
- }
173
- }
174
- {
175
- if(_1.TConstructor) {
176
- const t_ = _1;
177
- const prefix_ = (t_.name_ + "_");
178
- const selfParameter_ = ff_compiler_Syntax.Parameter(d_.at_, false, d_.name_, d_.type_, ff_core_Option.None());
179
- return ff_core_List.List_map(d_.methods_, ((method_) => {
180
- const effect_ = ff_core_List.List_filter(method_.signature_.generics_, ((_w1) => {
181
- return (_w1 === "Q$")
182
- }));
183
- const normalGenerics_ = ff_core_List.List_filter(method_.signature_.generics_, ((_w1) => {
184
- return (_w1 !== "Q$")
185
- }));
186
- const outerGenerics_ = (alreadyFlat_
187
- ? ff_core_List.Empty()
188
- : d_.generics_);
189
- const outerConstraints_ = (alreadyFlat_
190
- ? ff_core_List.Empty()
191
- : d_.constraints_);
192
- return ff_core_Pair.Pair((prefix_ + method_.signature_.name_), ff_compiler_Environment.Scheme(false, false, false, false, (((_c) => {
193
- return ff_compiler_Syntax.Signature(_c.at_, _c.name_, _c.member_, ff_core_List.List_addAll(effect_, ff_core_List.List_addAll(outerGenerics_, normalGenerics_)), ff_core_List.List_addAll(outerConstraints_, method_.signature_.constraints_), ff_core_List.Link(selfParameter_, method_.signature_.parameters_), _c.returnType_, _c.effect_)
194
- }))(method_.signature_)))
195
- }))
196
- return
197
- }
198
- }
199
- }
200
- }));
201
- const fields_ = ff_core_List.List_flatMap(module_.types_, ((d_) => {
202
- const prefix_ = (d_.name_ + "_");
203
- const t_ = ff_compiler_Syntax.TConstructor(d_.at_, d_.name_, ff_core_List.List_map(d_.generics_, ((g_) => {
204
- return ff_compiler_Syntax.TConstructor(d_.at_, g_, ff_core_List.Empty())
205
- })));
206
- const selfParameter_ = ff_compiler_Syntax.Parameter(d_.at_, false, d_.name_, t_, ff_core_Option.None());
207
- return ff_core_List.List_map(d_.commonFields_, ((f_) => {
208
- const noEffect_ = ff_compiler_Syntax.TConstructor(d_.at_, "ff:core/Nothing.Nothing", ff_core_List.Empty());
209
- return ff_core_Pair.Pair(ff_compiler_Environment.fullName_(module_, (prefix_ + f_.name_)), ff_compiler_Environment.Scheme(true, f_.mutable_, d_.newtype_, false, ff_compiler_Syntax.Signature(f_.at_, f_.name_, true, d_.generics_, d_.constraints_, ff_core_List.Link(selfParameter_, ff_core_List.Empty()), f_.valueType_, noEffect_)))
210
- }))
211
- }));
212
- const variants_ = ff_core_List.List_flatMap(module_.types_, ((d_) => {
213
- const returnType_ = ff_compiler_Syntax.TConstructor(d_.at_, ff_compiler_Environment.fullName_(module_, d_.name_), ff_core_List.List_map(d_.generics_, ((typeParameter_) => {
214
- return ff_compiler_Syntax.TConstructor(d_.at_, typeParameter_, ff_core_List.Empty())
215
- })));
216
- return ff_core_List.List_map(d_.variants_, ((variant_) => {
217
- const noEffect_ = ff_compiler_Syntax.TConstructor(d_.at_, "ff:core/Nothing.Nothing", ff_core_List.Empty());
218
- return ff_core_Pair.Pair(ff_compiler_Environment.fullName_(module_, variant_.name_), ff_compiler_Environment.Scheme(false, false, d_.newtype_, false, ff_compiler_Syntax.Signature(variant_.at_, variant_.name_, false, d_.generics_, d_.constraints_, ff_core_List.List_addAll(d_.commonFields_, variant_.fields_), returnType_, noEffect_)))
219
- }))
220
- }));
221
- const traits_ = ff_core_List.List_map(module_.traits_, ((d_) => {
222
- return ff_core_Pair.Pair(ff_compiler_Environment.fullName_(module_, d_.name_), d_)
223
- }));
224
- const effect_ = ff_compiler_Syntax.TConstructor(ff_compiler_Syntax.Location(module_.file_, 0, 0), "ff:core/Nothing.Nothing", ff_core_List.Empty());
225
- return ff_compiler_Environment.Environment("", ff_core_List.List_toMap(ff_core_List.List_addAll(functions_, ff_core_List.List_addAll(lets_, ff_core_List.List_addAll(fields_, ff_core_List.List_addAll(extends_, ff_core_List.List_addAll(variants_, traitMethods_))))), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_List.List_toMap(traits_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_List.List_toMap(ff_core_List.Empty(), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), effect_, ff_core_Option.None())
226
- }
227
-
228
- export async function make_$(module_, otherModules_, alreadyFlat_, $task) {
229
- const processed_ = ff_compiler_Environment.processModule_(module_, true, alreadyFlat_);
230
- const otherProcessed_ = ff_core_List.List_map(otherModules_, ((_w1) => {
231
- return ff_compiler_Environment.processModule_(_w1, false, false)
232
- }));
233
- return ff_compiler_Environment.Environment(ff_compiler_Environment.fullName_(module_, ""), ff_core_Map.Map_addAll(processed_.symbols_, ff_core_List.List_foldLeft(ff_core_List.List_map(otherProcessed_, ((_w1) => {
234
- return _w1.symbols_
235
- })), ff_core_Map.empty_(), ((_w1, _w2) => {
236
- return ff_core_Map.Map_addAll(_w1, _w2, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)
237
- })), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_Map.Map_addAll(processed_.traits_, ff_core_List.List_foldLeft(ff_core_List.List_map(otherProcessed_, ((_w1) => {
238
- return _w1.traits_
239
- })), ff_core_Map.empty_(), ((_w1, _w2) => {
240
- return ff_core_Map.Map_addAll(_w1, _w2, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)
241
- })), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_List.List_toMap(ff_core_List.List_map(module_.imports_, ((i_) => {
242
- return ff_core_Pair.Pair(i_.alias_, i_)
243
- })), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_compiler_Syntax.TConstructor(ff_compiler_Syntax.Location(module_.file_, 0, 0), "ff:core/Nothing.Nothing", ff_core_List.Empty()), ff_core_Option.None())
244
- }
245
-
246
- export async function fullName_$(module_, name_, $task) {
247
- return ((((ff_compiler_Syntax.PackagePair_groupName(module_.packagePair_, ":") + "/") + ff_core_String.String_dropLast(module_.file_, 3)) + ".") + name_)
248
- }
249
-
250
- export async function fail_$(at_, message_, $task) {
251
- return ff_core_Core.panic_(((message_ + " ") + ff_compiler_Syntax.Location_show(at_)))
252
- }
253
-
254
- export async function processModule_$(module_, isCurrentModule_, alreadyFlat_, $task) {
255
- const functions_ = ff_core_List.List_map(module_.functions_, ((d_) => {
256
- return ff_core_Pair.Pair(ff_compiler_Environment.fullName_(module_, d_.signature_.name_), ff_compiler_Environment.Scheme(false, false, false, false, d_.signature_))
257
- }));
258
- const lets_ = ff_core_List.List_map(module_.lets_, ((d_) => {
259
- const noEffect_ = ff_compiler_Syntax.TConstructor(d_.at_, "ff:core/Nothing.Nothing", ff_core_List.Empty());
260
- return ff_core_Pair.Pair(ff_compiler_Environment.fullName_(module_, d_.name_), ff_compiler_Environment.Scheme(true, false, false, false, ff_compiler_Syntax.Signature(d_.at_, d_.name_, false, ff_core_List.Empty(), ff_core_List.Empty(), ff_core_List.Empty(), d_.variableType_, noEffect_)))
261
- }));
262
- const traitMethods_ = ff_core_List.List_flatMap(module_.traits_, ((definition_) => {
263
- const generics_ = ff_core_List.List_map(definition_.generics_, ((name_) => {
264
- return ff_compiler_Syntax.TConstructor(definition_.at_, name_, ff_core_List.Empty())
265
- }));
266
- const constraint_ = ff_compiler_Syntax.Constraint(definition_.at_, ff_compiler_Environment.fullName_(module_, definition_.name_), generics_);
267
- const outerConstraints_ = (alreadyFlat_
268
- ? ff_core_List.Empty()
269
- : definition_.constraints_);
270
- return ff_core_List.List_map(definition_.methods_, ((methodSignature_) => {
271
- const generics_ = ff_core_List.List_partition(ff_core_List.List_addAll(definition_.generics_, methodSignature_.generics_), ((_w1) => {
272
- return (_w1 === "Q$")
273
- }));
274
- const signature_ = (((_c) => {
275
- return ff_compiler_Syntax.Signature(_c.at_, _c.name_, _c.member_, ff_core_List.List_addAll(ff_core_List.List_takeFirst(generics_.first_, 1), generics_.second_), ff_core_List.Link(constraint_, ff_core_List.List_addAll(outerConstraints_, methodSignature_.constraints_)), _c.parameters_, _c.returnType_, _c.effect_)
276
- }))(methodSignature_);
277
- return ff_core_Pair.Pair(ff_compiler_Environment.fullName_(module_, signature_.name_), ff_compiler_Environment.Scheme(false, false, false, true, signature_))
278
- }))
279
- }));
280
- const extends_ = ff_core_List.List_flatMap(module_.extends_, ((d_) => {
281
- {
282
- const _1 = d_.type_;
283
- {
284
- if(_1.TVariable) {
285
- const t_ = _1;
286
- return ff_compiler_Environment.fail_(t_.at_, ("Unexpected type variable: $" + t_.index_))
287
- return
288
- }
289
- }
290
- {
291
- if(_1.TConstructor) {
292
- const t_ = _1;
293
- const prefix_ = (t_.name_ + "_");
294
- const selfParameter_ = ff_compiler_Syntax.Parameter(d_.at_, false, d_.name_, d_.type_, ff_core_Option.None());
295
- return ff_core_List.List_map(d_.methods_, ((method_) => {
296
- const effect_ = ff_core_List.List_filter(method_.signature_.generics_, ((_w1) => {
297
- return (_w1 === "Q$")
298
- }));
299
- const normalGenerics_ = ff_core_List.List_filter(method_.signature_.generics_, ((_w1) => {
300
- return (_w1 !== "Q$")
301
- }));
302
- const outerGenerics_ = (alreadyFlat_
303
- ? ff_core_List.Empty()
304
- : d_.generics_);
305
- const outerConstraints_ = (alreadyFlat_
306
- ? ff_core_List.Empty()
307
- : d_.constraints_);
308
- return ff_core_Pair.Pair((prefix_ + method_.signature_.name_), ff_compiler_Environment.Scheme(false, false, false, false, (((_c) => {
309
- return ff_compiler_Syntax.Signature(_c.at_, _c.name_, _c.member_, ff_core_List.List_addAll(effect_, ff_core_List.List_addAll(outerGenerics_, normalGenerics_)), ff_core_List.List_addAll(outerConstraints_, method_.signature_.constraints_), ff_core_List.Link(selfParameter_, method_.signature_.parameters_), _c.returnType_, _c.effect_)
310
- }))(method_.signature_)))
311
- }))
312
- return
313
- }
314
- }
315
- }
316
- }));
317
- const fields_ = ff_core_List.List_flatMap(module_.types_, ((d_) => {
318
- const prefix_ = (d_.name_ + "_");
319
- const t_ = ff_compiler_Syntax.TConstructor(d_.at_, d_.name_, ff_core_List.List_map(d_.generics_, ((g_) => {
320
- return ff_compiler_Syntax.TConstructor(d_.at_, g_, ff_core_List.Empty())
321
- })));
322
- const selfParameter_ = ff_compiler_Syntax.Parameter(d_.at_, false, d_.name_, t_, ff_core_Option.None());
323
- return ff_core_List.List_map(d_.commonFields_, ((f_) => {
324
- const noEffect_ = ff_compiler_Syntax.TConstructor(d_.at_, "ff:core/Nothing.Nothing", ff_core_List.Empty());
325
- return ff_core_Pair.Pair(ff_compiler_Environment.fullName_(module_, (prefix_ + f_.name_)), ff_compiler_Environment.Scheme(true, f_.mutable_, d_.newtype_, false, ff_compiler_Syntax.Signature(f_.at_, f_.name_, true, d_.generics_, d_.constraints_, ff_core_List.Link(selfParameter_, ff_core_List.Empty()), f_.valueType_, noEffect_)))
326
- }))
327
- }));
328
- const variants_ = ff_core_List.List_flatMap(module_.types_, ((d_) => {
329
- const returnType_ = ff_compiler_Syntax.TConstructor(d_.at_, ff_compiler_Environment.fullName_(module_, d_.name_), ff_core_List.List_map(d_.generics_, ((typeParameter_) => {
330
- return ff_compiler_Syntax.TConstructor(d_.at_, typeParameter_, ff_core_List.Empty())
331
- })));
332
- return ff_core_List.List_map(d_.variants_, ((variant_) => {
333
- const noEffect_ = ff_compiler_Syntax.TConstructor(d_.at_, "ff:core/Nothing.Nothing", ff_core_List.Empty());
334
- return ff_core_Pair.Pair(ff_compiler_Environment.fullName_(module_, variant_.name_), ff_compiler_Environment.Scheme(false, false, d_.newtype_, false, ff_compiler_Syntax.Signature(variant_.at_, variant_.name_, false, d_.generics_, d_.constraints_, ff_core_List.List_addAll(d_.commonFields_, variant_.fields_), returnType_, noEffect_)))
335
- }))
336
- }));
337
- const traits_ = ff_core_List.List_map(module_.traits_, ((d_) => {
338
- return ff_core_Pair.Pair(ff_compiler_Environment.fullName_(module_, d_.name_), d_)
339
- }));
340
- const effect_ = ff_compiler_Syntax.TConstructor(ff_compiler_Syntax.Location(module_.file_, 0, 0), "ff:core/Nothing.Nothing", ff_core_List.Empty());
341
- return ff_compiler_Environment.Environment("", ff_core_List.List_toMap(ff_core_List.List_addAll(functions_, ff_core_List.List_addAll(lets_, ff_core_List.List_addAll(fields_, ff_core_List.List_addAll(extends_, ff_core_List.List_addAll(variants_, traitMethods_))))), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_List.List_toMap(traits_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_List.List_toMap(ff_core_List.Empty(), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), effect_, ff_core_Option.None())
342
- }
343
-
344
-
345
-
346
- export const ff_core_Any_HasAnyTag$ff_compiler_Environment_Environment = {
347
- anyTag_() {
348
- return ff_core_Any.internalAnyTag_((("ff:compiler/Environment.Environment" + "[") + "]"))
349
- },
350
- async anyTag_$($task) {
351
- return ff_core_Any.internalAnyTag_((("ff:compiler/Environment.Environment" + "[") + "]"))
352
- }
353
- };
354
-
355
- export const ff_core_Any_HasAnyTag$ff_compiler_Environment_Scheme = {
356
- anyTag_() {
357
- return ff_core_Any.internalAnyTag_((("ff:compiler/Environment.Scheme" + "[") + "]"))
358
- },
359
- async anyTag_$($task) {
360
- return ff_core_Any.internalAnyTag_((("ff:compiler/Environment.Scheme" + "[") + "]"))
361
- }
362
- };
363
-
364
- export const ff_core_Any_HasAnyTag$ff_compiler_Environment_Instantiated = {
365
- anyTag_() {
366
- return ff_core_Any.internalAnyTag_((("ff:compiler/Environment.Instantiated" + "[") + "]"))
367
- },
368
- async anyTag_$($task) {
369
- return ff_core_Any.internalAnyTag_((("ff:compiler/Environment.Instantiated" + "[") + "]"))
370
- }
371
- };
372
-
373
- export const ff_core_Show_Show$ff_compiler_Environment_Environment = {
374
- show_(value_) {
375
- {
376
- const value_a = value_;
377
- {
378
- const z_ = value_a;
379
- return ((((((((((((("Environment" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.modulePrefix_)) + ", ") + ff_core_Map.ff_core_Show_Show$ff_core_Map_Map(ff_core_Show.ff_core_Show_Show$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Environment.ff_core_Show_Show$ff_compiler_Environment_Scheme).show_(z_.symbols_)) + ", ") + ff_core_Map.ff_core_Show_Show$ff_core_Map_Map(ff_core_Show.ff_core_Show_Show$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_DTrait).show_(z_.traits_)) + ", ") + ff_core_Map.ff_core_Show_Show$ff_core_Map_Map(ff_core_Show.ff_core_Show_Show$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_DImport).show_(z_.imports_)) + ", ") + ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Type.show_(z_.effect_)) + ", ") + ff_core_Option.ff_core_Show_Show$ff_core_Option_Option(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(z_.selfVariable_)) + ")")
380
- return
381
- }
382
- }
383
- },
384
- async show_$(value_, $task) {
385
- {
386
- const value_a = value_;
387
- {
388
- const z_ = value_a;
389
- return ((((((((((((("Environment" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.modulePrefix_)) + ", ") + ff_core_Map.ff_core_Show_Show$ff_core_Map_Map(ff_core_Show.ff_core_Show_Show$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Environment.ff_core_Show_Show$ff_compiler_Environment_Scheme).show_(z_.symbols_)) + ", ") + ff_core_Map.ff_core_Show_Show$ff_core_Map_Map(ff_core_Show.ff_core_Show_Show$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_DTrait).show_(z_.traits_)) + ", ") + ff_core_Map.ff_core_Show_Show$ff_core_Map_Map(ff_core_Show.ff_core_Show_Show$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_DImport).show_(z_.imports_)) + ", ") + ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Type.show_(z_.effect_)) + ", ") + ff_core_Option.ff_core_Show_Show$ff_core_Option_Option(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(z_.selfVariable_)) + ")")
390
- return
391
- }
392
- }
393
- }
394
- };
395
-
396
- export const ff_core_Show_Show$ff_compiler_Environment_Scheme = {
397
- show_(value_) {
398
- {
399
- const value_a = value_;
400
- {
401
- const z_ = value_a;
402
- return ((((((((((("Scheme" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_Bool_Bool.show_(z_.isVariable_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_Bool_Bool.show_(z_.isMutable_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_Bool_Bool.show_(z_.isNewtype_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_Bool_Bool.show_(z_.isTraitMethod_)) + ", ") + ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Signature.show_(z_.signature_)) + ")")
403
- return
404
- }
405
- }
406
- },
407
- async show_$(value_, $task) {
408
- {
409
- const value_a = value_;
410
- {
411
- const z_ = value_a;
412
- return ((((((((((("Scheme" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_Bool_Bool.show_(z_.isVariable_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_Bool_Bool.show_(z_.isMutable_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_Bool_Bool.show_(z_.isNewtype_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_Bool_Bool.show_(z_.isTraitMethod_)) + ", ") + ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Signature.show_(z_.signature_)) + ")")
413
- return
414
- }
415
- }
416
- }
417
- };
418
-
419
- export const ff_core_Show_Show$ff_compiler_Environment_Instantiated = {
420
- show_(value_) {
421
- {
422
- const value_a = value_;
423
- {
424
- const z_ = value_a;
425
- return ((((("Instantiated" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_core_Show.ff_core_Show_Show$ff_core_Pair_Pair(ff_core_Show.ff_core_Show_Show$ff_core_String_String, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Type)).show_(z_.typeArguments_)) + ", ") + ff_compiler_Environment.ff_core_Show_Show$ff_compiler_Environment_Scheme.show_(z_.scheme_)) + ")")
426
- return
427
- }
428
- }
429
- },
430
- async show_$(value_, $task) {
431
- {
432
- const value_a = value_;
433
- {
434
- const z_ = value_a;
435
- return ((((("Instantiated" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_core_Show.ff_core_Show_Show$ff_core_Pair_Pair(ff_core_Show.ff_core_Show_Show$ff_core_String_String, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Type)).show_(z_.typeArguments_)) + ", ") + ff_compiler_Environment.ff_core_Show_Show$ff_compiler_Environment_Scheme.show_(z_.scheme_)) + ")")
436
- return
437
- }
438
- }
439
- }
440
- };
441
-
442
- export const ff_core_Equal_Equal$ff_compiler_Environment_Environment = {
443
- equals_(x_, y_) {
444
- {
445
- const x_a = x_;
446
- const y_a = y_;
447
- {
448
- const _guard1 = (x_ === y_);
449
- if(_guard1) {
450
- return true
451
- return
452
- }
453
- }
454
- {
455
- return ((x_.modulePrefix_ === y_.modulePrefix_) && (ff_core_Map.ff_core_Equal_Equal$ff_core_Map_Map(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Environment.ff_core_Equal_Equal$ff_compiler_Environment_Scheme).equals_(x_.symbols_, y_.symbols_) && (ff_core_Map.ff_core_Equal_Equal$ff_core_Map_Map(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_DTrait).equals_(x_.traits_, y_.traits_) && (ff_core_Map.ff_core_Equal_Equal$ff_core_Map_Map(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_DImport).equals_(x_.imports_, y_.imports_) && (ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Type.equals_(x_.effect_, y_.effect_) && ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String).equals_(x_.selfVariable_, y_.selfVariable_))))))
456
- return
457
- }
458
- }
459
- },
460
- async equals_$(x_, y_, $task) {
461
- {
462
- const x_a = x_;
463
- const y_a = y_;
464
- {
465
- const _guard1 = (x_ === y_);
466
- if(_guard1) {
467
- return true
468
- return
469
- }
470
- }
471
- {
472
- return ((x_.modulePrefix_ === y_.modulePrefix_) && (ff_core_Map.ff_core_Equal_Equal$ff_core_Map_Map(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Environment.ff_core_Equal_Equal$ff_compiler_Environment_Scheme).equals_(x_.symbols_, y_.symbols_) && (ff_core_Map.ff_core_Equal_Equal$ff_core_Map_Map(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_DTrait).equals_(x_.traits_, y_.traits_) && (ff_core_Map.ff_core_Equal_Equal$ff_core_Map_Map(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_DImport).equals_(x_.imports_, y_.imports_) && (ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Type.equals_(x_.effect_, y_.effect_) && ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String).equals_(x_.selfVariable_, y_.selfVariable_))))))
473
- return
474
- }
475
- }
476
- }
477
- };
478
-
479
- export const ff_core_Equal_Equal$ff_compiler_Environment_Scheme = {
480
- equals_(x_, y_) {
481
- {
482
- const x_a = x_;
483
- const y_a = y_;
484
- {
485
- const _guard1 = (x_ === y_);
486
- if(_guard1) {
487
- return true
488
- return
489
- }
490
- }
491
- {
492
- return ((x_.isVariable_ === y_.isVariable_) && ((x_.isMutable_ === y_.isMutable_) && ((x_.isNewtype_ === y_.isNewtype_) && ((x_.isTraitMethod_ === y_.isTraitMethod_) && ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Signature.equals_(x_.signature_, y_.signature_)))))
493
- return
494
- }
495
- }
496
- },
497
- async equals_$(x_, y_, $task) {
498
- {
499
- const x_a = x_;
500
- const y_a = y_;
501
- {
502
- const _guard1 = (x_ === y_);
503
- if(_guard1) {
504
- return true
505
- return
506
- }
507
- }
508
- {
509
- return ((x_.isVariable_ === y_.isVariable_) && ((x_.isMutable_ === y_.isMutable_) && ((x_.isNewtype_ === y_.isNewtype_) && ((x_.isTraitMethod_ === y_.isTraitMethod_) && ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Signature.equals_(x_.signature_, y_.signature_)))))
510
- return
511
- }
512
- }
513
- }
514
- };
515
-
516
- export const ff_core_Equal_Equal$ff_compiler_Environment_Instantiated = {
517
- equals_(x_, y_) {
518
- {
519
- const x_a = x_;
520
- const y_a = y_;
521
- {
522
- const _guard1 = (x_ === y_);
523
- if(_guard1) {
524
- return true
525
- return
526
- }
527
- }
528
- {
529
- return (ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_core_Pair.ff_core_Equal_Equal$ff_core_Pair_Pair(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String, ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Type)).equals_(x_.typeArguments_, y_.typeArguments_) && ff_compiler_Environment.ff_core_Equal_Equal$ff_compiler_Environment_Scheme.equals_(x_.scheme_, y_.scheme_))
530
- return
531
- }
532
- }
533
- },
534
- async equals_$(x_, y_, $task) {
535
- {
536
- const x_a = x_;
537
- const y_a = y_;
538
- {
539
- const _guard1 = (x_ === y_);
540
- if(_guard1) {
541
- return true
542
- return
543
- }
544
- }
545
- {
546
- return (ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_core_Pair.ff_core_Equal_Equal$ff_core_Pair_Pair(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String, ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Type)).equals_(x_.typeArguments_, y_.typeArguments_) && ff_compiler_Environment.ff_core_Equal_Equal$ff_compiler_Environment_Scheme.equals_(x_.scheme_, y_.scheme_))
547
- return
548
- }
549
- }
550
- }
551
- };
552
-
553
- export const ff_core_Ordering_Order$ff_compiler_Environment_Environment = {
554
- compare_(x_, y_) {
555
- {
556
- const x_a = x_;
557
- const y_a = y_;
558
- {
559
- const _guard1 = (x_ === y_);
560
- if(_guard1) {
561
- return ff_core_Ordering.OrderingSame()
562
- return
563
- }
564
- }
565
- {
566
- const modulePrefixOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String.compare_(x_.modulePrefix_, y_.modulePrefix_);
567
- if((modulePrefixOrdering_ !== ff_core_Ordering.OrderingSame())) {
568
- return modulePrefixOrdering_
569
- } else {
570
- const symbolsOrdering_ = ff_core_Map.ff_core_Ordering_Order$ff_core_Map_Map(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Environment.ff_core_Ordering_Order$ff_compiler_Environment_Scheme).compare_(x_.symbols_, y_.symbols_);
571
- if((symbolsOrdering_ !== ff_core_Ordering.OrderingSame())) {
572
- return symbolsOrdering_
573
- } else {
574
- const traitsOrdering_ = ff_core_Map.ff_core_Ordering_Order$ff_core_Map_Map(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_DTrait).compare_(x_.traits_, y_.traits_);
575
- if((traitsOrdering_ !== ff_core_Ordering.OrderingSame())) {
576
- return traitsOrdering_
577
- } else {
578
- const importsOrdering_ = ff_core_Map.ff_core_Ordering_Order$ff_core_Map_Map(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_DImport).compare_(x_.imports_, y_.imports_);
579
- if((importsOrdering_ !== ff_core_Ordering.OrderingSame())) {
580
- return importsOrdering_
581
- } else {
582
- const effectOrdering_ = ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_Type.compare_(x_.effect_, y_.effect_);
583
- if((effectOrdering_ !== ff_core_Ordering.OrderingSame())) {
584
- return effectOrdering_
585
- } else {
586
- const selfVariableOrdering_ = ff_core_Option.ff_core_Ordering_Order$ff_core_Option_Option(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).compare_(x_.selfVariable_, y_.selfVariable_);
587
- if((selfVariableOrdering_ !== ff_core_Ordering.OrderingSame())) {
588
- return selfVariableOrdering_
589
- } else {
590
- return ff_core_Ordering.OrderingSame()
591
- }
592
- }
593
- }
594
- }
595
- }
596
- }
597
- return
598
- }
599
- }
600
- },
601
- async compare_$(x_, y_, $task) {
602
- {
603
- const x_a = x_;
604
- const y_a = y_;
605
- {
606
- const _guard1 = (x_ === y_);
607
- if(_guard1) {
608
- return ff_core_Ordering.OrderingSame()
609
- return
610
- }
611
- }
612
- {
613
- const modulePrefixOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String.compare_(x_.modulePrefix_, y_.modulePrefix_);
614
- if((modulePrefixOrdering_ !== ff_core_Ordering.OrderingSame())) {
615
- return modulePrefixOrdering_
616
- } else {
617
- const symbolsOrdering_ = ff_core_Map.ff_core_Ordering_Order$ff_core_Map_Map(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Environment.ff_core_Ordering_Order$ff_compiler_Environment_Scheme).compare_(x_.symbols_, y_.symbols_);
618
- if((symbolsOrdering_ !== ff_core_Ordering.OrderingSame())) {
619
- return symbolsOrdering_
620
- } else {
621
- const traitsOrdering_ = ff_core_Map.ff_core_Ordering_Order$ff_core_Map_Map(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_DTrait).compare_(x_.traits_, y_.traits_);
622
- if((traitsOrdering_ !== ff_core_Ordering.OrderingSame())) {
623
- return traitsOrdering_
624
- } else {
625
- const importsOrdering_ = ff_core_Map.ff_core_Ordering_Order$ff_core_Map_Map(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_DImport).compare_(x_.imports_, y_.imports_);
626
- if((importsOrdering_ !== ff_core_Ordering.OrderingSame())) {
627
- return importsOrdering_
628
- } else {
629
- const effectOrdering_ = ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_Type.compare_(x_.effect_, y_.effect_);
630
- if((effectOrdering_ !== ff_core_Ordering.OrderingSame())) {
631
- return effectOrdering_
632
- } else {
633
- const selfVariableOrdering_ = ff_core_Option.ff_core_Ordering_Order$ff_core_Option_Option(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).compare_(x_.selfVariable_, y_.selfVariable_);
634
- if((selfVariableOrdering_ !== ff_core_Ordering.OrderingSame())) {
635
- return selfVariableOrdering_
636
- } else {
637
- return ff_core_Ordering.OrderingSame()
638
- }
639
- }
640
- }
641
- }
642
- }
643
- }
644
- return
645
- }
646
- }
647
- }
648
- };
649
-
650
- export const ff_core_Ordering_Order$ff_compiler_Environment_Scheme = {
651
- compare_(x_, y_) {
652
- {
653
- const x_a = x_;
654
- const y_a = y_;
655
- {
656
- const _guard1 = (x_ === y_);
657
- if(_guard1) {
658
- return ff_core_Ordering.OrderingSame()
659
- return
660
- }
661
- }
662
- {
663
- const isVariableOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_Bool_Bool.compare_(x_.isVariable_, y_.isVariable_);
664
- if((isVariableOrdering_ !== ff_core_Ordering.OrderingSame())) {
665
- return isVariableOrdering_
666
- } else {
667
- const isMutableOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_Bool_Bool.compare_(x_.isMutable_, y_.isMutable_);
668
- if((isMutableOrdering_ !== ff_core_Ordering.OrderingSame())) {
669
- return isMutableOrdering_
670
- } else {
671
- const isNewtypeOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_Bool_Bool.compare_(x_.isNewtype_, y_.isNewtype_);
672
- if((isNewtypeOrdering_ !== ff_core_Ordering.OrderingSame())) {
673
- return isNewtypeOrdering_
674
- } else {
675
- const isTraitMethodOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_Bool_Bool.compare_(x_.isTraitMethod_, y_.isTraitMethod_);
676
- if((isTraitMethodOrdering_ !== ff_core_Ordering.OrderingSame())) {
677
- return isTraitMethodOrdering_
678
- } else {
679
- const signatureOrdering_ = ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_Signature.compare_(x_.signature_, y_.signature_);
680
- if((signatureOrdering_ !== ff_core_Ordering.OrderingSame())) {
681
- return signatureOrdering_
682
- } else {
683
- return ff_core_Ordering.OrderingSame()
684
- }
685
- }
686
- }
687
- }
688
- }
689
- return
690
- }
691
- }
692
- },
693
- async compare_$(x_, y_, $task) {
694
- {
695
- const x_a = x_;
696
- const y_a = y_;
697
- {
698
- const _guard1 = (x_ === y_);
699
- if(_guard1) {
700
- return ff_core_Ordering.OrderingSame()
701
- return
702
- }
703
- }
704
- {
705
- const isVariableOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_Bool_Bool.compare_(x_.isVariable_, y_.isVariable_);
706
- if((isVariableOrdering_ !== ff_core_Ordering.OrderingSame())) {
707
- return isVariableOrdering_
708
- } else {
709
- const isMutableOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_Bool_Bool.compare_(x_.isMutable_, y_.isMutable_);
710
- if((isMutableOrdering_ !== ff_core_Ordering.OrderingSame())) {
711
- return isMutableOrdering_
712
- } else {
713
- const isNewtypeOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_Bool_Bool.compare_(x_.isNewtype_, y_.isNewtype_);
714
- if((isNewtypeOrdering_ !== ff_core_Ordering.OrderingSame())) {
715
- return isNewtypeOrdering_
716
- } else {
717
- const isTraitMethodOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_Bool_Bool.compare_(x_.isTraitMethod_, y_.isTraitMethod_);
718
- if((isTraitMethodOrdering_ !== ff_core_Ordering.OrderingSame())) {
719
- return isTraitMethodOrdering_
720
- } else {
721
- const signatureOrdering_ = ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_Signature.compare_(x_.signature_, y_.signature_);
722
- if((signatureOrdering_ !== ff_core_Ordering.OrderingSame())) {
723
- return signatureOrdering_
724
- } else {
725
- return ff_core_Ordering.OrderingSame()
726
- }
727
- }
728
- }
729
- }
730
- }
731
- return
732
- }
733
- }
734
- }
735
- };
736
-
737
- export const ff_core_Ordering_Order$ff_compiler_Environment_Instantiated = {
738
- compare_(x_, y_) {
739
- {
740
- const x_a = x_;
741
- const y_a = y_;
742
- {
743
- const _guard1 = (x_ === y_);
744
- if(_guard1) {
745
- return ff_core_Ordering.OrderingSame()
746
- return
747
- }
748
- }
749
- {
750
- const typeArgumentsOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_List_List(ff_core_Ordering.ff_core_Ordering_Order$ff_core_Pair_Pair(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_Type)).compare_(x_.typeArguments_, y_.typeArguments_);
751
- if((typeArgumentsOrdering_ !== ff_core_Ordering.OrderingSame())) {
752
- return typeArgumentsOrdering_
753
- } else {
754
- const schemeOrdering_ = ff_compiler_Environment.ff_core_Ordering_Order$ff_compiler_Environment_Scheme.compare_(x_.scheme_, y_.scheme_);
755
- if((schemeOrdering_ !== ff_core_Ordering.OrderingSame())) {
756
- return schemeOrdering_
757
- } else {
758
- return ff_core_Ordering.OrderingSame()
759
- }
760
- }
761
- return
762
- }
763
- }
764
- },
765
- async compare_$(x_, y_, $task) {
766
- {
767
- const x_a = x_;
768
- const y_a = y_;
769
- {
770
- const _guard1 = (x_ === y_);
771
- if(_guard1) {
772
- return ff_core_Ordering.OrderingSame()
773
- return
774
- }
775
- }
776
- {
777
- const typeArgumentsOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_List_List(ff_core_Ordering.ff_core_Ordering_Order$ff_core_Pair_Pair(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_Type)).compare_(x_.typeArguments_, y_.typeArguments_);
778
- if((typeArgumentsOrdering_ !== ff_core_Ordering.OrderingSame())) {
779
- return typeArgumentsOrdering_
780
- } else {
781
- const schemeOrdering_ = ff_compiler_Environment.ff_core_Ordering_Order$ff_compiler_Environment_Scheme.compare_(x_.scheme_, y_.scheme_);
782
- if((schemeOrdering_ !== ff_core_Ordering.OrderingSame())) {
783
- return schemeOrdering_
784
- } else {
785
- return ff_core_Ordering.OrderingSame()
786
- }
787
- }
788
- return
789
- }
790
- }
791
- }
792
- };
793
-
794
- export const ff_core_Serializable_Serializable$ff_compiler_Environment_Environment = {
795
- serializeUsing_(serialization_, value_) {
796
- {
797
- const serialization_a = serialization_;
798
- const value_a = value_;
799
- {
800
- const v_ = value_a;
801
- serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 35), 0);
802
- ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 0);
803
- serialization_.offset_ += 1;
804
- ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.serializeUsing_(serialization_, v_.modulePrefix_);
805
- ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Environment.ff_core_Serializable_Serializable$ff_compiler_Environment_Scheme).serializeUsing_(serialization_, v_.symbols_);
806
- ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_DTrait).serializeUsing_(serialization_, v_.traits_);
807
- ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_DImport).serializeUsing_(serialization_, v_.imports_);
808
- ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type.serializeUsing_(serialization_, v_.effect_);
809
- ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).serializeUsing_(serialization_, v_.selfVariable_)
810
- return
811
- }
812
- }
813
- },
814
- deserializeUsing_(serialization_) {
815
- const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
816
- serialization_.offset_ += 1;
817
- {
818
- const _1 = variantIndex_;
819
- {
820
- if(_1 == 0) {
821
- serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 35), 0);
822
- return ff_compiler_Environment.Environment(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Environment.ff_core_Serializable_Serializable$ff_compiler_Environment_Scheme).deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_DTrait).deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_DImport).deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type.deserializeUsing_(serialization_), ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_))
823
- return
824
- }
825
- }
826
- {
827
- throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException)})
828
- return
829
- }
830
- }
831
- },
832
- async serializeUsing_$(serialization_, value_, $task) {
833
- {
834
- const serialization_a = serialization_;
835
- const value_a = value_;
836
- {
837
- const v_ = value_a;
838
- serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 35), 0);
839
- ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 0);
840
- serialization_.offset_ += 1;
841
- ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.serializeUsing_(serialization_, v_.modulePrefix_);
842
- ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Environment.ff_core_Serializable_Serializable$ff_compiler_Environment_Scheme).serializeUsing_(serialization_, v_.symbols_);
843
- ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_DTrait).serializeUsing_(serialization_, v_.traits_);
844
- ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_DImport).serializeUsing_(serialization_, v_.imports_);
845
- ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type.serializeUsing_(serialization_, v_.effect_);
846
- ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).serializeUsing_(serialization_, v_.selfVariable_)
847
- return
848
- }
849
- }
850
- },
851
- async deserializeUsing_$(serialization_, $task) {
852
- const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
853
- serialization_.offset_ += 1;
854
- {
855
- const _1 = variantIndex_;
856
- {
857
- if(_1 == 0) {
858
- serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 35), 0);
859
- return ff_compiler_Environment.Environment(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Environment.ff_core_Serializable_Serializable$ff_compiler_Environment_Scheme).deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_DTrait).deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_DImport).deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type.deserializeUsing_(serialization_), ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_))
860
- return
861
- }
862
- }
863
- {
864
- throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException)})
865
- return
866
- }
867
- }
868
- }
869
- };
870
-
871
- export const ff_core_Serializable_Serializable$ff_compiler_Environment_Scheme = {
872
- serializeUsing_(serialization_, value_) {
873
- {
874
- const serialization_a = serialization_;
875
- const value_a = value_;
876
- {
877
- const v_ = value_a;
878
- serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 30), 0);
879
- ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 0);
880
- serialization_.offset_ += 1;
881
- ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.serializeUsing_(serialization_, v_.isVariable_);
882
- ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.serializeUsing_(serialization_, v_.isMutable_);
883
- ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.serializeUsing_(serialization_, v_.isNewtype_);
884
- ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.serializeUsing_(serialization_, v_.isTraitMethod_);
885
- ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Signature.serializeUsing_(serialization_, v_.signature_)
886
- return
887
- }
888
- }
889
- },
890
- deserializeUsing_(serialization_) {
891
- const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
892
- serialization_.offset_ += 1;
893
- {
894
- const _1 = variantIndex_;
895
- {
896
- if(_1 == 0) {
897
- serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 30), 0);
898
- return ff_compiler_Environment.Scheme(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Signature.deserializeUsing_(serialization_))
899
- return
900
- }
901
- }
902
- {
903
- throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException)})
904
- return
905
- }
906
- }
907
- },
908
- async serializeUsing_$(serialization_, value_, $task) {
909
- {
910
- const serialization_a = serialization_;
911
- const value_a = value_;
912
- {
913
- const v_ = value_a;
914
- serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 30), 0);
915
- ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 0);
916
- serialization_.offset_ += 1;
917
- ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.serializeUsing_(serialization_, v_.isVariable_);
918
- ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.serializeUsing_(serialization_, v_.isMutable_);
919
- ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.serializeUsing_(serialization_, v_.isNewtype_);
920
- ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.serializeUsing_(serialization_, v_.isTraitMethod_);
921
- ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Signature.serializeUsing_(serialization_, v_.signature_)
922
- return
923
- }
924
- }
925
- },
926
- async deserializeUsing_$(serialization_, $task) {
927
- const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
928
- serialization_.offset_ += 1;
929
- {
930
- const _1 = variantIndex_;
931
- {
932
- if(_1 == 0) {
933
- serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 30), 0);
934
- return ff_compiler_Environment.Scheme(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Signature.deserializeUsing_(serialization_))
935
- return
936
- }
937
- }
938
- {
939
- throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException)})
940
- return
941
- }
942
- }
943
- }
944
- };
945
-
946
- export const ff_core_Serializable_Serializable$ff_compiler_Environment_Instantiated = {
947
- serializeUsing_(serialization_, value_) {
948
- {
949
- const serialization_a = serialization_;
950
- const value_a = value_;
951
- {
952
- const v_ = value_a;
953
- serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 36), 0);
954
- ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 0);
955
- serialization_.offset_ += 1;
956
- ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Pair.ff_core_Serializable_Serializable$ff_core_Pair_Pair(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type)).serializeUsing_(serialization_, v_.typeArguments_);
957
- ff_compiler_Environment.ff_core_Serializable_Serializable$ff_compiler_Environment_Scheme.serializeUsing_(serialization_, v_.scheme_)
958
- return
959
- }
960
- }
961
- },
962
- deserializeUsing_(serialization_) {
963
- const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
964
- serialization_.offset_ += 1;
965
- {
966
- const _1 = variantIndex_;
967
- {
968
- if(_1 == 0) {
969
- serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 36), 0);
970
- return ff_compiler_Environment.Instantiated(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Pair.ff_core_Serializable_Serializable$ff_core_Pair_Pair(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type)).deserializeUsing_(serialization_), ff_compiler_Environment.ff_core_Serializable_Serializable$ff_compiler_Environment_Scheme.deserializeUsing_(serialization_))
971
- return
972
- }
973
- }
974
- {
975
- throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException)})
976
- return
977
- }
978
- }
979
- },
980
- async serializeUsing_$(serialization_, value_, $task) {
981
- {
982
- const serialization_a = serialization_;
983
- const value_a = value_;
984
- {
985
- const v_ = value_a;
986
- serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 36), 0);
987
- ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 0);
988
- serialization_.offset_ += 1;
989
- ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Pair.ff_core_Serializable_Serializable$ff_core_Pair_Pair(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type)).serializeUsing_(serialization_, v_.typeArguments_);
990
- ff_compiler_Environment.ff_core_Serializable_Serializable$ff_compiler_Environment_Scheme.serializeUsing_(serialization_, v_.scheme_)
991
- return
992
- }
993
- }
994
- },
995
- async deserializeUsing_$(serialization_, $task) {
996
- const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
997
- serialization_.offset_ += 1;
998
- {
999
- const _1 = variantIndex_;
1000
- {
1001
- if(_1 == 0) {
1002
- serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 36), 0);
1003
- return ff_compiler_Environment.Instantiated(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Pair.ff_core_Serializable_Serializable$ff_core_Pair_Pair(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type)).deserializeUsing_(serialization_), ff_compiler_Environment.ff_core_Serializable_Serializable$ff_compiler_Environment_Scheme.deserializeUsing_(serialization_))
1004
- return
1005
- }
1006
- }
1007
- {
1008
- throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException)})
1009
- return
1010
- }
1011
- }
1012
- }
1013
- };
1014
-
1015
-
1
+
2
+
3
+ import * as ff_compiler_Environment from "../../ff/compiler/Environment.mjs"
4
+
5
+ import * as ff_compiler_Syntax from "../../ff/compiler/Syntax.mjs"
6
+
7
+ import * as ff_core_Any from "../../ff/core/Any.mjs"
8
+
9
+ import * as ff_core_Array from "../../ff/core/Array.mjs"
10
+
11
+ import * as ff_core_AssetSystem from "../../ff/core/AssetSystem.mjs"
12
+
13
+ import * as ff_core_Atomic from "../../ff/core/Atomic.mjs"
14
+
15
+ import * as ff_core_Bool from "../../ff/core/Bool.mjs"
16
+
17
+ import * as ff_core_Box from "../../ff/core/Box.mjs"
18
+
19
+ import * as ff_core_BrowserSystem from "../../ff/core/BrowserSystem.mjs"
20
+
21
+ import * as ff_core_Buffer from "../../ff/core/Buffer.mjs"
22
+
23
+ import * as ff_core_BuildSystem from "../../ff/core/BuildSystem.mjs"
24
+
25
+ import * as ff_core_Channel from "../../ff/core/Channel.mjs"
26
+
27
+ import * as ff_core_Char from "../../ff/core/Char.mjs"
28
+
29
+ import * as ff_core_Core from "../../ff/core/Core.mjs"
30
+
31
+ import * as ff_core_Duration from "../../ff/core/Duration.mjs"
32
+
33
+ import * as ff_core_Equal from "../../ff/core/Equal.mjs"
34
+
35
+ import * as ff_core_Error from "../../ff/core/Error.mjs"
36
+
37
+ import * as ff_core_FileHandle from "../../ff/core/FileHandle.mjs"
38
+
39
+ import * as ff_core_Float from "../../ff/core/Float.mjs"
40
+
41
+ import * as ff_core_HttpClient from "../../ff/core/HttpClient.mjs"
42
+
43
+ import * as ff_core_Instant from "../../ff/core/Instant.mjs"
44
+
45
+ import * as ff_core_Int from "../../ff/core/Int.mjs"
46
+
47
+ import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
48
+
49
+ import * as ff_core_JsSystem from "../../ff/core/JsSystem.mjs"
50
+
51
+ import * as ff_core_JsValue from "../../ff/core/JsValue.mjs"
52
+
53
+ import * as ff_core_List from "../../ff/core/List.mjs"
54
+
55
+ import * as ff_core_Lock from "../../ff/core/Lock.mjs"
56
+
57
+ import * as ff_core_Log from "../../ff/core/Log.mjs"
58
+
59
+ import * as ff_core_Map from "../../ff/core/Map.mjs"
60
+
61
+ import * as ff_core_NodeSystem from "../../ff/core/NodeSystem.mjs"
62
+
63
+ import * as ff_core_Nothing from "../../ff/core/Nothing.mjs"
64
+
65
+ import * as ff_core_Option from "../../ff/core/Option.mjs"
66
+
67
+ import * as ff_core_Ordering from "../../ff/core/Ordering.mjs"
68
+
69
+ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
70
+
71
+ import * as ff_core_Path from "../../ff/core/Path.mjs"
72
+
73
+ import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
74
+
75
+ import * as ff_core_Set from "../../ff/core/Set.mjs"
76
+
77
+ import * as ff_core_Show from "../../ff/core/Show.mjs"
78
+
79
+ import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
80
+
81
+ import * as ff_core_Stack from "../../ff/core/Stack.mjs"
82
+
83
+ import * as ff_core_Stream from "../../ff/core/Stream.mjs"
84
+
85
+ import * as ff_core_String from "../../ff/core/String.mjs"
86
+
87
+ import * as ff_core_StringMap from "../../ff/core/StringMap.mjs"
88
+
89
+ import * as ff_core_Task from "../../ff/core/Task.mjs"
90
+
91
+ import * as ff_core_Try from "../../ff/core/Try.mjs"
92
+
93
+ import * as ff_core_Unit from "../../ff/core/Unit.mjs"
94
+
95
+ // type Environment
96
+ export function Environment(modulePrefix_, symbols_, traits_, imports_, effect_, selfVariable_) {
97
+ return {modulePrefix_, symbols_, traits_, imports_, effect_, selfVariable_};
98
+ }
99
+
100
+ // type Scheme
101
+ export function Scheme(isVariable_, isMutable_, isNewtype_, isTraitMethod_, signature_) {
102
+ return {isVariable_, isMutable_, isNewtype_, isTraitMethod_, signature_};
103
+ }
104
+
105
+ // type Instantiated
106
+ export function Instantiated(typeArguments_, scheme_) {
107
+ return {typeArguments_, scheme_};
108
+ }
109
+
110
+
111
+
112
+ export function make_(module_, otherModules_, alreadyFlat_) {
113
+ const processed_ = ff_compiler_Environment.processModule_(module_, true, alreadyFlat_);
114
+ const otherProcessed_ = ff_core_List.List_map(otherModules_, ((_w1) => {
115
+ return ff_compiler_Environment.processModule_(_w1, false, false)
116
+ }));
117
+ return ff_compiler_Environment.Environment(ff_compiler_Environment.fullName_(module_, ""), ff_core_Map.Map_addAll(processed_.symbols_, ff_core_List.List_foldLeft(ff_core_List.List_map(otherProcessed_, ((_w1) => {
118
+ return _w1.symbols_
119
+ })), ff_core_Map.empty_(), ((_w1, _w2) => {
120
+ return ff_core_Map.Map_addAll(_w1, _w2, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)
121
+ })), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_Map.Map_addAll(processed_.traits_, ff_core_List.List_foldLeft(ff_core_List.List_map(otherProcessed_, ((_w1) => {
122
+ return _w1.traits_
123
+ })), ff_core_Map.empty_(), ((_w1, _w2) => {
124
+ return ff_core_Map.Map_addAll(_w1, _w2, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)
125
+ })), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_List.List_toMap(ff_core_List.List_map(module_.imports_, ((i_) => {
126
+ return ff_core_Pair.Pair(i_.alias_, i_)
127
+ })), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_compiler_Syntax.TConstructor(ff_compiler_Syntax.Location(module_.file_, 0, 0), "ff:core/Nothing.Nothing", ff_core_List.Empty()), ff_core_Option.None())
128
+ }
129
+
130
+ export function fullName_(module_, name_) {
131
+ return ((((ff_compiler_Syntax.PackagePair_groupName(module_.packagePair_, ":") + "/") + ff_core_String.String_dropLast(module_.file_, 3)) + ".") + name_)
132
+ }
133
+
134
+ export function fail_(at_, message_) {
135
+ return ff_core_Core.panic_(((message_ + " ") + ff_compiler_Syntax.Location_show(at_)))
136
+ }
137
+
138
+ export function processModule_(module_, isCurrentModule_, alreadyFlat_) {
139
+ const functions_ = ff_core_List.List_map(module_.functions_, ((d_) => {
140
+ return ff_core_Pair.Pair(ff_compiler_Environment.fullName_(module_, d_.signature_.name_), ff_compiler_Environment.Scheme(false, false, false, false, d_.signature_))
141
+ }));
142
+ const lets_ = ff_core_List.List_map(module_.lets_, ((d_) => {
143
+ const noEffect_ = ff_compiler_Syntax.TConstructor(d_.at_, "ff:core/Nothing.Nothing", ff_core_List.Empty());
144
+ return ff_core_Pair.Pair(ff_compiler_Environment.fullName_(module_, d_.name_), ff_compiler_Environment.Scheme(true, false, false, false, ff_compiler_Syntax.Signature(d_.at_, d_.name_, false, ff_core_List.Empty(), ff_core_List.Empty(), ff_core_List.Empty(), d_.variableType_, noEffect_)))
145
+ }));
146
+ const traitMethods_ = ff_core_List.List_flatMap(module_.traits_, ((definition_) => {
147
+ const generics_ = ff_core_List.List_map(definition_.generics_, ((name_) => {
148
+ return ff_compiler_Syntax.TConstructor(definition_.at_, name_, ff_core_List.Empty())
149
+ }));
150
+ const constraint_ = ff_compiler_Syntax.Constraint(definition_.at_, ff_compiler_Environment.fullName_(module_, definition_.name_), generics_);
151
+ const outerConstraints_ = (alreadyFlat_
152
+ ? ff_core_List.Empty()
153
+ : definition_.constraints_);
154
+ return ff_core_List.List_map(definition_.methods_, ((methodSignature_) => {
155
+ const generics_ = ff_core_List.List_partition(ff_core_List.List_addAll(definition_.generics_, methodSignature_.generics_), ((_w1) => {
156
+ return (_w1 === "Q$")
157
+ }));
158
+ const signature_ = (((_c) => {
159
+ return ff_compiler_Syntax.Signature(_c.at_, _c.name_, _c.member_, ff_core_List.List_addAll(ff_core_List.List_takeFirst(generics_.first_, 1), generics_.second_), ff_core_List.Link(constraint_, ff_core_List.List_addAll(outerConstraints_, methodSignature_.constraints_)), _c.parameters_, _c.returnType_, _c.effect_)
160
+ }))(methodSignature_);
161
+ return ff_core_Pair.Pair(ff_compiler_Environment.fullName_(module_, signature_.name_), ff_compiler_Environment.Scheme(false, false, false, true, signature_))
162
+ }))
163
+ }));
164
+ const extends_ = ff_core_List.List_flatMap(module_.extends_, ((d_) => {
165
+ {
166
+ const _1 = d_.type_;
167
+ {
168
+ if(_1.TVariable) {
169
+ const t_ = _1;
170
+ return ff_compiler_Environment.fail_(t_.at_, ("Unexpected type variable: $" + t_.index_))
171
+ return
172
+ }
173
+ }
174
+ {
175
+ if(_1.TConstructor) {
176
+ const t_ = _1;
177
+ const prefix_ = (t_.name_ + "_");
178
+ const selfParameter_ = ff_compiler_Syntax.Parameter(d_.at_, false, d_.name_, d_.type_, ff_core_Option.None());
179
+ return ff_core_List.List_map(d_.methods_, ((method_) => {
180
+ const effect_ = ff_core_List.List_filter(method_.signature_.generics_, ((_w1) => {
181
+ return (_w1 === "Q$")
182
+ }));
183
+ const normalGenerics_ = ff_core_List.List_filter(method_.signature_.generics_, ((_w1) => {
184
+ return (_w1 !== "Q$")
185
+ }));
186
+ const outerGenerics_ = (alreadyFlat_
187
+ ? ff_core_List.Empty()
188
+ : d_.generics_);
189
+ const outerConstraints_ = (alreadyFlat_
190
+ ? ff_core_List.Empty()
191
+ : d_.constraints_);
192
+ return ff_core_Pair.Pair((prefix_ + method_.signature_.name_), ff_compiler_Environment.Scheme(false, false, false, false, (((_c) => {
193
+ return ff_compiler_Syntax.Signature(_c.at_, _c.name_, _c.member_, ff_core_List.List_addAll(effect_, ff_core_List.List_addAll(outerGenerics_, normalGenerics_)), ff_core_List.List_addAll(outerConstraints_, method_.signature_.constraints_), ff_core_List.Link(selfParameter_, method_.signature_.parameters_), _c.returnType_, _c.effect_)
194
+ }))(method_.signature_)))
195
+ }))
196
+ return
197
+ }
198
+ }
199
+ }
200
+ }));
201
+ const fields_ = ff_core_List.List_flatMap(module_.types_, ((d_) => {
202
+ const prefix_ = (d_.name_ + "_");
203
+ const t_ = ff_compiler_Syntax.TConstructor(d_.at_, d_.name_, ff_core_List.List_map(d_.generics_, ((g_) => {
204
+ return ff_compiler_Syntax.TConstructor(d_.at_, g_, ff_core_List.Empty())
205
+ })));
206
+ const selfParameter_ = ff_compiler_Syntax.Parameter(d_.at_, false, d_.name_, t_, ff_core_Option.None());
207
+ return ff_core_List.List_map(d_.commonFields_, ((f_) => {
208
+ const noEffect_ = ff_compiler_Syntax.TConstructor(d_.at_, "ff:core/Nothing.Nothing", ff_core_List.Empty());
209
+ return ff_core_Pair.Pair(ff_compiler_Environment.fullName_(module_, (prefix_ + f_.name_)), ff_compiler_Environment.Scheme(true, f_.mutable_, d_.newtype_, false, ff_compiler_Syntax.Signature(f_.at_, f_.name_, true, d_.generics_, d_.constraints_, ff_core_List.Link(selfParameter_, ff_core_List.Empty()), f_.valueType_, noEffect_)))
210
+ }))
211
+ }));
212
+ const variants_ = ff_core_List.List_flatMap(module_.types_, ((d_) => {
213
+ const returnType_ = ff_compiler_Syntax.TConstructor(d_.at_, ff_compiler_Environment.fullName_(module_, d_.name_), ff_core_List.List_map(d_.generics_, ((typeParameter_) => {
214
+ return ff_compiler_Syntax.TConstructor(d_.at_, typeParameter_, ff_core_List.Empty())
215
+ })));
216
+ return ff_core_List.List_map(d_.variants_, ((variant_) => {
217
+ const noEffect_ = ff_compiler_Syntax.TConstructor(d_.at_, "ff:core/Nothing.Nothing", ff_core_List.Empty());
218
+ return ff_core_Pair.Pair(ff_compiler_Environment.fullName_(module_, variant_.name_), ff_compiler_Environment.Scheme(false, false, d_.newtype_, false, ff_compiler_Syntax.Signature(variant_.at_, variant_.name_, false, d_.generics_, d_.constraints_, ff_core_List.List_addAll(d_.commonFields_, variant_.fields_), returnType_, noEffect_)))
219
+ }))
220
+ }));
221
+ const traits_ = ff_core_List.List_map(module_.traits_, ((d_) => {
222
+ return ff_core_Pair.Pair(ff_compiler_Environment.fullName_(module_, d_.name_), d_)
223
+ }));
224
+ const effect_ = ff_compiler_Syntax.TConstructor(ff_compiler_Syntax.Location(module_.file_, 0, 0), "ff:core/Nothing.Nothing", ff_core_List.Empty());
225
+ return ff_compiler_Environment.Environment("", ff_core_List.List_toMap(ff_core_List.List_addAll(functions_, ff_core_List.List_addAll(lets_, ff_core_List.List_addAll(fields_, ff_core_List.List_addAll(extends_, ff_core_List.List_addAll(variants_, traitMethods_))))), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_List.List_toMap(traits_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_List.List_toMap(ff_core_List.Empty(), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), effect_, ff_core_Option.None())
226
+ }
227
+
228
+ export async function make_$(module_, otherModules_, alreadyFlat_, $task) {
229
+ const processed_ = ff_compiler_Environment.processModule_(module_, true, alreadyFlat_);
230
+ const otherProcessed_ = ff_core_List.List_map(otherModules_, ((_w1) => {
231
+ return ff_compiler_Environment.processModule_(_w1, false, false)
232
+ }));
233
+ return ff_compiler_Environment.Environment(ff_compiler_Environment.fullName_(module_, ""), ff_core_Map.Map_addAll(processed_.symbols_, ff_core_List.List_foldLeft(ff_core_List.List_map(otherProcessed_, ((_w1) => {
234
+ return _w1.symbols_
235
+ })), ff_core_Map.empty_(), ((_w1, _w2) => {
236
+ return ff_core_Map.Map_addAll(_w1, _w2, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)
237
+ })), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_Map.Map_addAll(processed_.traits_, ff_core_List.List_foldLeft(ff_core_List.List_map(otherProcessed_, ((_w1) => {
238
+ return _w1.traits_
239
+ })), ff_core_Map.empty_(), ((_w1, _w2) => {
240
+ return ff_core_Map.Map_addAll(_w1, _w2, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)
241
+ })), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_List.List_toMap(ff_core_List.List_map(module_.imports_, ((i_) => {
242
+ return ff_core_Pair.Pair(i_.alias_, i_)
243
+ })), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_compiler_Syntax.TConstructor(ff_compiler_Syntax.Location(module_.file_, 0, 0), "ff:core/Nothing.Nothing", ff_core_List.Empty()), ff_core_Option.None())
244
+ }
245
+
246
+ export async function fullName_$(module_, name_, $task) {
247
+ return ((((ff_compiler_Syntax.PackagePair_groupName(module_.packagePair_, ":") + "/") + ff_core_String.String_dropLast(module_.file_, 3)) + ".") + name_)
248
+ }
249
+
250
+ export async function fail_$(at_, message_, $task) {
251
+ return ff_core_Core.panic_(((message_ + " ") + ff_compiler_Syntax.Location_show(at_)))
252
+ }
253
+
254
+ export async function processModule_$(module_, isCurrentModule_, alreadyFlat_, $task) {
255
+ const functions_ = ff_core_List.List_map(module_.functions_, ((d_) => {
256
+ return ff_core_Pair.Pair(ff_compiler_Environment.fullName_(module_, d_.signature_.name_), ff_compiler_Environment.Scheme(false, false, false, false, d_.signature_))
257
+ }));
258
+ const lets_ = ff_core_List.List_map(module_.lets_, ((d_) => {
259
+ const noEffect_ = ff_compiler_Syntax.TConstructor(d_.at_, "ff:core/Nothing.Nothing", ff_core_List.Empty());
260
+ return ff_core_Pair.Pair(ff_compiler_Environment.fullName_(module_, d_.name_), ff_compiler_Environment.Scheme(true, false, false, false, ff_compiler_Syntax.Signature(d_.at_, d_.name_, false, ff_core_List.Empty(), ff_core_List.Empty(), ff_core_List.Empty(), d_.variableType_, noEffect_)))
261
+ }));
262
+ const traitMethods_ = ff_core_List.List_flatMap(module_.traits_, ((definition_) => {
263
+ const generics_ = ff_core_List.List_map(definition_.generics_, ((name_) => {
264
+ return ff_compiler_Syntax.TConstructor(definition_.at_, name_, ff_core_List.Empty())
265
+ }));
266
+ const constraint_ = ff_compiler_Syntax.Constraint(definition_.at_, ff_compiler_Environment.fullName_(module_, definition_.name_), generics_);
267
+ const outerConstraints_ = (alreadyFlat_
268
+ ? ff_core_List.Empty()
269
+ : definition_.constraints_);
270
+ return ff_core_List.List_map(definition_.methods_, ((methodSignature_) => {
271
+ const generics_ = ff_core_List.List_partition(ff_core_List.List_addAll(definition_.generics_, methodSignature_.generics_), ((_w1) => {
272
+ return (_w1 === "Q$")
273
+ }));
274
+ const signature_ = (((_c) => {
275
+ return ff_compiler_Syntax.Signature(_c.at_, _c.name_, _c.member_, ff_core_List.List_addAll(ff_core_List.List_takeFirst(generics_.first_, 1), generics_.second_), ff_core_List.Link(constraint_, ff_core_List.List_addAll(outerConstraints_, methodSignature_.constraints_)), _c.parameters_, _c.returnType_, _c.effect_)
276
+ }))(methodSignature_);
277
+ return ff_core_Pair.Pair(ff_compiler_Environment.fullName_(module_, signature_.name_), ff_compiler_Environment.Scheme(false, false, false, true, signature_))
278
+ }))
279
+ }));
280
+ const extends_ = ff_core_List.List_flatMap(module_.extends_, ((d_) => {
281
+ {
282
+ const _1 = d_.type_;
283
+ {
284
+ if(_1.TVariable) {
285
+ const t_ = _1;
286
+ return ff_compiler_Environment.fail_(t_.at_, ("Unexpected type variable: $" + t_.index_))
287
+ return
288
+ }
289
+ }
290
+ {
291
+ if(_1.TConstructor) {
292
+ const t_ = _1;
293
+ const prefix_ = (t_.name_ + "_");
294
+ const selfParameter_ = ff_compiler_Syntax.Parameter(d_.at_, false, d_.name_, d_.type_, ff_core_Option.None());
295
+ return ff_core_List.List_map(d_.methods_, ((method_) => {
296
+ const effect_ = ff_core_List.List_filter(method_.signature_.generics_, ((_w1) => {
297
+ return (_w1 === "Q$")
298
+ }));
299
+ const normalGenerics_ = ff_core_List.List_filter(method_.signature_.generics_, ((_w1) => {
300
+ return (_w1 !== "Q$")
301
+ }));
302
+ const outerGenerics_ = (alreadyFlat_
303
+ ? ff_core_List.Empty()
304
+ : d_.generics_);
305
+ const outerConstraints_ = (alreadyFlat_
306
+ ? ff_core_List.Empty()
307
+ : d_.constraints_);
308
+ return ff_core_Pair.Pair((prefix_ + method_.signature_.name_), ff_compiler_Environment.Scheme(false, false, false, false, (((_c) => {
309
+ return ff_compiler_Syntax.Signature(_c.at_, _c.name_, _c.member_, ff_core_List.List_addAll(effect_, ff_core_List.List_addAll(outerGenerics_, normalGenerics_)), ff_core_List.List_addAll(outerConstraints_, method_.signature_.constraints_), ff_core_List.Link(selfParameter_, method_.signature_.parameters_), _c.returnType_, _c.effect_)
310
+ }))(method_.signature_)))
311
+ }))
312
+ return
313
+ }
314
+ }
315
+ }
316
+ }));
317
+ const fields_ = ff_core_List.List_flatMap(module_.types_, ((d_) => {
318
+ const prefix_ = (d_.name_ + "_");
319
+ const t_ = ff_compiler_Syntax.TConstructor(d_.at_, d_.name_, ff_core_List.List_map(d_.generics_, ((g_) => {
320
+ return ff_compiler_Syntax.TConstructor(d_.at_, g_, ff_core_List.Empty())
321
+ })));
322
+ const selfParameter_ = ff_compiler_Syntax.Parameter(d_.at_, false, d_.name_, t_, ff_core_Option.None());
323
+ return ff_core_List.List_map(d_.commonFields_, ((f_) => {
324
+ const noEffect_ = ff_compiler_Syntax.TConstructor(d_.at_, "ff:core/Nothing.Nothing", ff_core_List.Empty());
325
+ return ff_core_Pair.Pair(ff_compiler_Environment.fullName_(module_, (prefix_ + f_.name_)), ff_compiler_Environment.Scheme(true, f_.mutable_, d_.newtype_, false, ff_compiler_Syntax.Signature(f_.at_, f_.name_, true, d_.generics_, d_.constraints_, ff_core_List.Link(selfParameter_, ff_core_List.Empty()), f_.valueType_, noEffect_)))
326
+ }))
327
+ }));
328
+ const variants_ = ff_core_List.List_flatMap(module_.types_, ((d_) => {
329
+ const returnType_ = ff_compiler_Syntax.TConstructor(d_.at_, ff_compiler_Environment.fullName_(module_, d_.name_), ff_core_List.List_map(d_.generics_, ((typeParameter_) => {
330
+ return ff_compiler_Syntax.TConstructor(d_.at_, typeParameter_, ff_core_List.Empty())
331
+ })));
332
+ return ff_core_List.List_map(d_.variants_, ((variant_) => {
333
+ const noEffect_ = ff_compiler_Syntax.TConstructor(d_.at_, "ff:core/Nothing.Nothing", ff_core_List.Empty());
334
+ return ff_core_Pair.Pair(ff_compiler_Environment.fullName_(module_, variant_.name_), ff_compiler_Environment.Scheme(false, false, d_.newtype_, false, ff_compiler_Syntax.Signature(variant_.at_, variant_.name_, false, d_.generics_, d_.constraints_, ff_core_List.List_addAll(d_.commonFields_, variant_.fields_), returnType_, noEffect_)))
335
+ }))
336
+ }));
337
+ const traits_ = ff_core_List.List_map(module_.traits_, ((d_) => {
338
+ return ff_core_Pair.Pair(ff_compiler_Environment.fullName_(module_, d_.name_), d_)
339
+ }));
340
+ const effect_ = ff_compiler_Syntax.TConstructor(ff_compiler_Syntax.Location(module_.file_, 0, 0), "ff:core/Nothing.Nothing", ff_core_List.Empty());
341
+ return ff_compiler_Environment.Environment("", ff_core_List.List_toMap(ff_core_List.List_addAll(functions_, ff_core_List.List_addAll(lets_, ff_core_List.List_addAll(fields_, ff_core_List.List_addAll(extends_, ff_core_List.List_addAll(variants_, traitMethods_))))), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_List.List_toMap(traits_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), ff_core_List.List_toMap(ff_core_List.Empty(), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String), effect_, ff_core_Option.None())
342
+ }
343
+
344
+
345
+
346
+ export const ff_core_Any_HasAnyTag$ff_compiler_Environment_Environment = {
347
+ anyTag_() {
348
+ return ff_core_Any.internalAnyTag_((("ff:compiler/Environment.Environment" + "[") + "]"))
349
+ },
350
+ async anyTag_$($task) {
351
+ return ff_core_Any.internalAnyTag_((("ff:compiler/Environment.Environment" + "[") + "]"))
352
+ }
353
+ };
354
+
355
+ export const ff_core_Any_HasAnyTag$ff_compiler_Environment_Scheme = {
356
+ anyTag_() {
357
+ return ff_core_Any.internalAnyTag_((("ff:compiler/Environment.Scheme" + "[") + "]"))
358
+ },
359
+ async anyTag_$($task) {
360
+ return ff_core_Any.internalAnyTag_((("ff:compiler/Environment.Scheme" + "[") + "]"))
361
+ }
362
+ };
363
+
364
+ export const ff_core_Any_HasAnyTag$ff_compiler_Environment_Instantiated = {
365
+ anyTag_() {
366
+ return ff_core_Any.internalAnyTag_((("ff:compiler/Environment.Instantiated" + "[") + "]"))
367
+ },
368
+ async anyTag_$($task) {
369
+ return ff_core_Any.internalAnyTag_((("ff:compiler/Environment.Instantiated" + "[") + "]"))
370
+ }
371
+ };
372
+
373
+ export const ff_core_Show_Show$ff_compiler_Environment_Environment = {
374
+ show_(value_) {
375
+ {
376
+ const value_a = value_;
377
+ {
378
+ const z_ = value_a;
379
+ return ((((((((((((("Environment" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.modulePrefix_)) + ", ") + ff_core_Map.ff_core_Show_Show$ff_core_Map_Map(ff_core_Show.ff_core_Show_Show$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Environment.ff_core_Show_Show$ff_compiler_Environment_Scheme).show_(z_.symbols_)) + ", ") + ff_core_Map.ff_core_Show_Show$ff_core_Map_Map(ff_core_Show.ff_core_Show_Show$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_DTrait).show_(z_.traits_)) + ", ") + ff_core_Map.ff_core_Show_Show$ff_core_Map_Map(ff_core_Show.ff_core_Show_Show$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_DImport).show_(z_.imports_)) + ", ") + ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Type.show_(z_.effect_)) + ", ") + ff_core_Option.ff_core_Show_Show$ff_core_Option_Option(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(z_.selfVariable_)) + ")")
380
+ return
381
+ }
382
+ }
383
+ },
384
+ async show_$(value_, $task) {
385
+ {
386
+ const value_a = value_;
387
+ {
388
+ const z_ = value_a;
389
+ return ((((((((((((("Environment" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.modulePrefix_)) + ", ") + ff_core_Map.ff_core_Show_Show$ff_core_Map_Map(ff_core_Show.ff_core_Show_Show$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Environment.ff_core_Show_Show$ff_compiler_Environment_Scheme).show_(z_.symbols_)) + ", ") + ff_core_Map.ff_core_Show_Show$ff_core_Map_Map(ff_core_Show.ff_core_Show_Show$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_DTrait).show_(z_.traits_)) + ", ") + ff_core_Map.ff_core_Show_Show$ff_core_Map_Map(ff_core_Show.ff_core_Show_Show$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_DImport).show_(z_.imports_)) + ", ") + ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Type.show_(z_.effect_)) + ", ") + ff_core_Option.ff_core_Show_Show$ff_core_Option_Option(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(z_.selfVariable_)) + ")")
390
+ return
391
+ }
392
+ }
393
+ }
394
+ };
395
+
396
+ export const ff_core_Show_Show$ff_compiler_Environment_Scheme = {
397
+ show_(value_) {
398
+ {
399
+ const value_a = value_;
400
+ {
401
+ const z_ = value_a;
402
+ return ((((((((((("Scheme" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_Bool_Bool.show_(z_.isVariable_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_Bool_Bool.show_(z_.isMutable_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_Bool_Bool.show_(z_.isNewtype_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_Bool_Bool.show_(z_.isTraitMethod_)) + ", ") + ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Signature.show_(z_.signature_)) + ")")
403
+ return
404
+ }
405
+ }
406
+ },
407
+ async show_$(value_, $task) {
408
+ {
409
+ const value_a = value_;
410
+ {
411
+ const z_ = value_a;
412
+ return ((((((((((("Scheme" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_Bool_Bool.show_(z_.isVariable_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_Bool_Bool.show_(z_.isMutable_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_Bool_Bool.show_(z_.isNewtype_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_Bool_Bool.show_(z_.isTraitMethod_)) + ", ") + ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Signature.show_(z_.signature_)) + ")")
413
+ return
414
+ }
415
+ }
416
+ }
417
+ };
418
+
419
+ export const ff_core_Show_Show$ff_compiler_Environment_Instantiated = {
420
+ show_(value_) {
421
+ {
422
+ const value_a = value_;
423
+ {
424
+ const z_ = value_a;
425
+ return ((((("Instantiated" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_core_Show.ff_core_Show_Show$ff_core_Pair_Pair(ff_core_Show.ff_core_Show_Show$ff_core_String_String, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Type)).show_(z_.typeArguments_)) + ", ") + ff_compiler_Environment.ff_core_Show_Show$ff_compiler_Environment_Scheme.show_(z_.scheme_)) + ")")
426
+ return
427
+ }
428
+ }
429
+ },
430
+ async show_$(value_, $task) {
431
+ {
432
+ const value_a = value_;
433
+ {
434
+ const z_ = value_a;
435
+ return ((((("Instantiated" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_core_Show.ff_core_Show_Show$ff_core_Pair_Pair(ff_core_Show.ff_core_Show_Show$ff_core_String_String, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Type)).show_(z_.typeArguments_)) + ", ") + ff_compiler_Environment.ff_core_Show_Show$ff_compiler_Environment_Scheme.show_(z_.scheme_)) + ")")
436
+ return
437
+ }
438
+ }
439
+ }
440
+ };
441
+
442
+ export const ff_core_Equal_Equal$ff_compiler_Environment_Environment = {
443
+ equals_(x_, y_) {
444
+ {
445
+ const x_a = x_;
446
+ const y_a = y_;
447
+ {
448
+ const _guard1 = (x_ === y_);
449
+ if(_guard1) {
450
+ return true
451
+ return
452
+ }
453
+ }
454
+ {
455
+ return ((x_.modulePrefix_ === y_.modulePrefix_) && (ff_core_Map.ff_core_Equal_Equal$ff_core_Map_Map(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Environment.ff_core_Equal_Equal$ff_compiler_Environment_Scheme).equals_(x_.symbols_, y_.symbols_) && (ff_core_Map.ff_core_Equal_Equal$ff_core_Map_Map(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_DTrait).equals_(x_.traits_, y_.traits_) && (ff_core_Map.ff_core_Equal_Equal$ff_core_Map_Map(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_DImport).equals_(x_.imports_, y_.imports_) && (ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Type.equals_(x_.effect_, y_.effect_) && ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String).equals_(x_.selfVariable_, y_.selfVariable_))))))
456
+ return
457
+ }
458
+ }
459
+ },
460
+ async equals_$(x_, y_, $task) {
461
+ {
462
+ const x_a = x_;
463
+ const y_a = y_;
464
+ {
465
+ const _guard1 = (x_ === y_);
466
+ if(_guard1) {
467
+ return true
468
+ return
469
+ }
470
+ }
471
+ {
472
+ return ((x_.modulePrefix_ === y_.modulePrefix_) && (ff_core_Map.ff_core_Equal_Equal$ff_core_Map_Map(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Environment.ff_core_Equal_Equal$ff_compiler_Environment_Scheme).equals_(x_.symbols_, y_.symbols_) && (ff_core_Map.ff_core_Equal_Equal$ff_core_Map_Map(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_DTrait).equals_(x_.traits_, y_.traits_) && (ff_core_Map.ff_core_Equal_Equal$ff_core_Map_Map(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_DImport).equals_(x_.imports_, y_.imports_) && (ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Type.equals_(x_.effect_, y_.effect_) && ff_core_Option.ff_core_Equal_Equal$ff_core_Option_Option(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String).equals_(x_.selfVariable_, y_.selfVariable_))))))
473
+ return
474
+ }
475
+ }
476
+ }
477
+ };
478
+
479
+ export const ff_core_Equal_Equal$ff_compiler_Environment_Scheme = {
480
+ equals_(x_, y_) {
481
+ {
482
+ const x_a = x_;
483
+ const y_a = y_;
484
+ {
485
+ const _guard1 = (x_ === y_);
486
+ if(_guard1) {
487
+ return true
488
+ return
489
+ }
490
+ }
491
+ {
492
+ return ((x_.isVariable_ === y_.isVariable_) && ((x_.isMutable_ === y_.isMutable_) && ((x_.isNewtype_ === y_.isNewtype_) && ((x_.isTraitMethod_ === y_.isTraitMethod_) && ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Signature.equals_(x_.signature_, y_.signature_)))))
493
+ return
494
+ }
495
+ }
496
+ },
497
+ async equals_$(x_, y_, $task) {
498
+ {
499
+ const x_a = x_;
500
+ const y_a = y_;
501
+ {
502
+ const _guard1 = (x_ === y_);
503
+ if(_guard1) {
504
+ return true
505
+ return
506
+ }
507
+ }
508
+ {
509
+ return ((x_.isVariable_ === y_.isVariable_) && ((x_.isMutable_ === y_.isMutable_) && ((x_.isNewtype_ === y_.isNewtype_) && ((x_.isTraitMethod_ === y_.isTraitMethod_) && ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Signature.equals_(x_.signature_, y_.signature_)))))
510
+ return
511
+ }
512
+ }
513
+ }
514
+ };
515
+
516
+ export const ff_core_Equal_Equal$ff_compiler_Environment_Instantiated = {
517
+ equals_(x_, y_) {
518
+ {
519
+ const x_a = x_;
520
+ const y_a = y_;
521
+ {
522
+ const _guard1 = (x_ === y_);
523
+ if(_guard1) {
524
+ return true
525
+ return
526
+ }
527
+ }
528
+ {
529
+ return (ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_core_Pair.ff_core_Equal_Equal$ff_core_Pair_Pair(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String, ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Type)).equals_(x_.typeArguments_, y_.typeArguments_) && ff_compiler_Environment.ff_core_Equal_Equal$ff_compiler_Environment_Scheme.equals_(x_.scheme_, y_.scheme_))
530
+ return
531
+ }
532
+ }
533
+ },
534
+ async equals_$(x_, y_, $task) {
535
+ {
536
+ const x_a = x_;
537
+ const y_a = y_;
538
+ {
539
+ const _guard1 = (x_ === y_);
540
+ if(_guard1) {
541
+ return true
542
+ return
543
+ }
544
+ }
545
+ {
546
+ return (ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_core_Pair.ff_core_Equal_Equal$ff_core_Pair_Pair(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String, ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Type)).equals_(x_.typeArguments_, y_.typeArguments_) && ff_compiler_Environment.ff_core_Equal_Equal$ff_compiler_Environment_Scheme.equals_(x_.scheme_, y_.scheme_))
547
+ return
548
+ }
549
+ }
550
+ }
551
+ };
552
+
553
+ export const ff_core_Ordering_Order$ff_compiler_Environment_Environment = {
554
+ compare_(x_, y_) {
555
+ {
556
+ const x_a = x_;
557
+ const y_a = y_;
558
+ {
559
+ const _guard1 = (x_ === y_);
560
+ if(_guard1) {
561
+ return ff_core_Ordering.OrderingSame()
562
+ return
563
+ }
564
+ }
565
+ {
566
+ const modulePrefixOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String.compare_(x_.modulePrefix_, y_.modulePrefix_);
567
+ if((modulePrefixOrdering_ !== ff_core_Ordering.OrderingSame())) {
568
+ return modulePrefixOrdering_
569
+ } else {
570
+ const symbolsOrdering_ = ff_core_Map.ff_core_Ordering_Order$ff_core_Map_Map(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Environment.ff_core_Ordering_Order$ff_compiler_Environment_Scheme).compare_(x_.symbols_, y_.symbols_);
571
+ if((symbolsOrdering_ !== ff_core_Ordering.OrderingSame())) {
572
+ return symbolsOrdering_
573
+ } else {
574
+ const traitsOrdering_ = ff_core_Map.ff_core_Ordering_Order$ff_core_Map_Map(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_DTrait).compare_(x_.traits_, y_.traits_);
575
+ if((traitsOrdering_ !== ff_core_Ordering.OrderingSame())) {
576
+ return traitsOrdering_
577
+ } else {
578
+ const importsOrdering_ = ff_core_Map.ff_core_Ordering_Order$ff_core_Map_Map(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_DImport).compare_(x_.imports_, y_.imports_);
579
+ if((importsOrdering_ !== ff_core_Ordering.OrderingSame())) {
580
+ return importsOrdering_
581
+ } else {
582
+ const effectOrdering_ = ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_Type.compare_(x_.effect_, y_.effect_);
583
+ if((effectOrdering_ !== ff_core_Ordering.OrderingSame())) {
584
+ return effectOrdering_
585
+ } else {
586
+ const selfVariableOrdering_ = ff_core_Option.ff_core_Ordering_Order$ff_core_Option_Option(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).compare_(x_.selfVariable_, y_.selfVariable_);
587
+ if((selfVariableOrdering_ !== ff_core_Ordering.OrderingSame())) {
588
+ return selfVariableOrdering_
589
+ } else {
590
+ return ff_core_Ordering.OrderingSame()
591
+ }
592
+ }
593
+ }
594
+ }
595
+ }
596
+ }
597
+ return
598
+ }
599
+ }
600
+ },
601
+ async compare_$(x_, y_, $task) {
602
+ {
603
+ const x_a = x_;
604
+ const y_a = y_;
605
+ {
606
+ const _guard1 = (x_ === y_);
607
+ if(_guard1) {
608
+ return ff_core_Ordering.OrderingSame()
609
+ return
610
+ }
611
+ }
612
+ {
613
+ const modulePrefixOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String.compare_(x_.modulePrefix_, y_.modulePrefix_);
614
+ if((modulePrefixOrdering_ !== ff_core_Ordering.OrderingSame())) {
615
+ return modulePrefixOrdering_
616
+ } else {
617
+ const symbolsOrdering_ = ff_core_Map.ff_core_Ordering_Order$ff_core_Map_Map(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Environment.ff_core_Ordering_Order$ff_compiler_Environment_Scheme).compare_(x_.symbols_, y_.symbols_);
618
+ if((symbolsOrdering_ !== ff_core_Ordering.OrderingSame())) {
619
+ return symbolsOrdering_
620
+ } else {
621
+ const traitsOrdering_ = ff_core_Map.ff_core_Ordering_Order$ff_core_Map_Map(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_DTrait).compare_(x_.traits_, y_.traits_);
622
+ if((traitsOrdering_ !== ff_core_Ordering.OrderingSame())) {
623
+ return traitsOrdering_
624
+ } else {
625
+ const importsOrdering_ = ff_core_Map.ff_core_Ordering_Order$ff_core_Map_Map(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_DImport).compare_(x_.imports_, y_.imports_);
626
+ if((importsOrdering_ !== ff_core_Ordering.OrderingSame())) {
627
+ return importsOrdering_
628
+ } else {
629
+ const effectOrdering_ = ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_Type.compare_(x_.effect_, y_.effect_);
630
+ if((effectOrdering_ !== ff_core_Ordering.OrderingSame())) {
631
+ return effectOrdering_
632
+ } else {
633
+ const selfVariableOrdering_ = ff_core_Option.ff_core_Ordering_Order$ff_core_Option_Option(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).compare_(x_.selfVariable_, y_.selfVariable_);
634
+ if((selfVariableOrdering_ !== ff_core_Ordering.OrderingSame())) {
635
+ return selfVariableOrdering_
636
+ } else {
637
+ return ff_core_Ordering.OrderingSame()
638
+ }
639
+ }
640
+ }
641
+ }
642
+ }
643
+ }
644
+ return
645
+ }
646
+ }
647
+ }
648
+ };
649
+
650
+ export const ff_core_Ordering_Order$ff_compiler_Environment_Scheme = {
651
+ compare_(x_, y_) {
652
+ {
653
+ const x_a = x_;
654
+ const y_a = y_;
655
+ {
656
+ const _guard1 = (x_ === y_);
657
+ if(_guard1) {
658
+ return ff_core_Ordering.OrderingSame()
659
+ return
660
+ }
661
+ }
662
+ {
663
+ const isVariableOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_Bool_Bool.compare_(x_.isVariable_, y_.isVariable_);
664
+ if((isVariableOrdering_ !== ff_core_Ordering.OrderingSame())) {
665
+ return isVariableOrdering_
666
+ } else {
667
+ const isMutableOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_Bool_Bool.compare_(x_.isMutable_, y_.isMutable_);
668
+ if((isMutableOrdering_ !== ff_core_Ordering.OrderingSame())) {
669
+ return isMutableOrdering_
670
+ } else {
671
+ const isNewtypeOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_Bool_Bool.compare_(x_.isNewtype_, y_.isNewtype_);
672
+ if((isNewtypeOrdering_ !== ff_core_Ordering.OrderingSame())) {
673
+ return isNewtypeOrdering_
674
+ } else {
675
+ const isTraitMethodOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_Bool_Bool.compare_(x_.isTraitMethod_, y_.isTraitMethod_);
676
+ if((isTraitMethodOrdering_ !== ff_core_Ordering.OrderingSame())) {
677
+ return isTraitMethodOrdering_
678
+ } else {
679
+ const signatureOrdering_ = ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_Signature.compare_(x_.signature_, y_.signature_);
680
+ if((signatureOrdering_ !== ff_core_Ordering.OrderingSame())) {
681
+ return signatureOrdering_
682
+ } else {
683
+ return ff_core_Ordering.OrderingSame()
684
+ }
685
+ }
686
+ }
687
+ }
688
+ }
689
+ return
690
+ }
691
+ }
692
+ },
693
+ async compare_$(x_, y_, $task) {
694
+ {
695
+ const x_a = x_;
696
+ const y_a = y_;
697
+ {
698
+ const _guard1 = (x_ === y_);
699
+ if(_guard1) {
700
+ return ff_core_Ordering.OrderingSame()
701
+ return
702
+ }
703
+ }
704
+ {
705
+ const isVariableOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_Bool_Bool.compare_(x_.isVariable_, y_.isVariable_);
706
+ if((isVariableOrdering_ !== ff_core_Ordering.OrderingSame())) {
707
+ return isVariableOrdering_
708
+ } else {
709
+ const isMutableOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_Bool_Bool.compare_(x_.isMutable_, y_.isMutable_);
710
+ if((isMutableOrdering_ !== ff_core_Ordering.OrderingSame())) {
711
+ return isMutableOrdering_
712
+ } else {
713
+ const isNewtypeOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_Bool_Bool.compare_(x_.isNewtype_, y_.isNewtype_);
714
+ if((isNewtypeOrdering_ !== ff_core_Ordering.OrderingSame())) {
715
+ return isNewtypeOrdering_
716
+ } else {
717
+ const isTraitMethodOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_Bool_Bool.compare_(x_.isTraitMethod_, y_.isTraitMethod_);
718
+ if((isTraitMethodOrdering_ !== ff_core_Ordering.OrderingSame())) {
719
+ return isTraitMethodOrdering_
720
+ } else {
721
+ const signatureOrdering_ = ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_Signature.compare_(x_.signature_, y_.signature_);
722
+ if((signatureOrdering_ !== ff_core_Ordering.OrderingSame())) {
723
+ return signatureOrdering_
724
+ } else {
725
+ return ff_core_Ordering.OrderingSame()
726
+ }
727
+ }
728
+ }
729
+ }
730
+ }
731
+ return
732
+ }
733
+ }
734
+ }
735
+ };
736
+
737
+ export const ff_core_Ordering_Order$ff_compiler_Environment_Instantiated = {
738
+ compare_(x_, y_) {
739
+ {
740
+ const x_a = x_;
741
+ const y_a = y_;
742
+ {
743
+ const _guard1 = (x_ === y_);
744
+ if(_guard1) {
745
+ return ff_core_Ordering.OrderingSame()
746
+ return
747
+ }
748
+ }
749
+ {
750
+ const typeArgumentsOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_List_List(ff_core_Ordering.ff_core_Ordering_Order$ff_core_Pair_Pair(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_Type)).compare_(x_.typeArguments_, y_.typeArguments_);
751
+ if((typeArgumentsOrdering_ !== ff_core_Ordering.OrderingSame())) {
752
+ return typeArgumentsOrdering_
753
+ } else {
754
+ const schemeOrdering_ = ff_compiler_Environment.ff_core_Ordering_Order$ff_compiler_Environment_Scheme.compare_(x_.scheme_, y_.scheme_);
755
+ if((schemeOrdering_ !== ff_core_Ordering.OrderingSame())) {
756
+ return schemeOrdering_
757
+ } else {
758
+ return ff_core_Ordering.OrderingSame()
759
+ }
760
+ }
761
+ return
762
+ }
763
+ }
764
+ },
765
+ async compare_$(x_, y_, $task) {
766
+ {
767
+ const x_a = x_;
768
+ const y_a = y_;
769
+ {
770
+ const _guard1 = (x_ === y_);
771
+ if(_guard1) {
772
+ return ff_core_Ordering.OrderingSame()
773
+ return
774
+ }
775
+ }
776
+ {
777
+ const typeArgumentsOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_List_List(ff_core_Ordering.ff_core_Ordering_Order$ff_core_Pair_Pair(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_Type)).compare_(x_.typeArguments_, y_.typeArguments_);
778
+ if((typeArgumentsOrdering_ !== ff_core_Ordering.OrderingSame())) {
779
+ return typeArgumentsOrdering_
780
+ } else {
781
+ const schemeOrdering_ = ff_compiler_Environment.ff_core_Ordering_Order$ff_compiler_Environment_Scheme.compare_(x_.scheme_, y_.scheme_);
782
+ if((schemeOrdering_ !== ff_core_Ordering.OrderingSame())) {
783
+ return schemeOrdering_
784
+ } else {
785
+ return ff_core_Ordering.OrderingSame()
786
+ }
787
+ }
788
+ return
789
+ }
790
+ }
791
+ }
792
+ };
793
+
794
+ export const ff_core_Serializable_Serializable$ff_compiler_Environment_Environment = {
795
+ serializeUsing_(serialization_, value_) {
796
+ {
797
+ const serialization_a = serialization_;
798
+ const value_a = value_;
799
+ {
800
+ const v_ = value_a;
801
+ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 35), 0);
802
+ ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 0);
803
+ serialization_.offset_ += 1;
804
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.serializeUsing_(serialization_, v_.modulePrefix_);
805
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Environment.ff_core_Serializable_Serializable$ff_compiler_Environment_Scheme).serializeUsing_(serialization_, v_.symbols_);
806
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_DTrait).serializeUsing_(serialization_, v_.traits_);
807
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_DImport).serializeUsing_(serialization_, v_.imports_);
808
+ ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type.serializeUsing_(serialization_, v_.effect_);
809
+ ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).serializeUsing_(serialization_, v_.selfVariable_)
810
+ return
811
+ }
812
+ }
813
+ },
814
+ deserializeUsing_(serialization_) {
815
+ const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
816
+ serialization_.offset_ += 1;
817
+ {
818
+ const _1 = variantIndex_;
819
+ {
820
+ if(_1 == 0) {
821
+ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 35), 0);
822
+ return ff_compiler_Environment.Environment(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Environment.ff_core_Serializable_Serializable$ff_compiler_Environment_Scheme).deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_DTrait).deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_DImport).deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type.deserializeUsing_(serialization_), ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_))
823
+ return
824
+ }
825
+ }
826
+ {
827
+ throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException)})
828
+ return
829
+ }
830
+ }
831
+ },
832
+ async serializeUsing_$(serialization_, value_, $task) {
833
+ {
834
+ const serialization_a = serialization_;
835
+ const value_a = value_;
836
+ {
837
+ const v_ = value_a;
838
+ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 35), 0);
839
+ ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 0);
840
+ serialization_.offset_ += 1;
841
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.serializeUsing_(serialization_, v_.modulePrefix_);
842
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Environment.ff_core_Serializable_Serializable$ff_compiler_Environment_Scheme).serializeUsing_(serialization_, v_.symbols_);
843
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_DTrait).serializeUsing_(serialization_, v_.traits_);
844
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_DImport).serializeUsing_(serialization_, v_.imports_);
845
+ ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type.serializeUsing_(serialization_, v_.effect_);
846
+ ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).serializeUsing_(serialization_, v_.selfVariable_)
847
+ return
848
+ }
849
+ }
850
+ },
851
+ async deserializeUsing_$(serialization_, $task) {
852
+ const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
853
+ serialization_.offset_ += 1;
854
+ {
855
+ const _1 = variantIndex_;
856
+ {
857
+ if(_1 == 0) {
858
+ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 35), 0);
859
+ return ff_compiler_Environment.Environment(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Environment.ff_core_Serializable_Serializable$ff_compiler_Environment_Scheme).deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_DTrait).deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_DImport).deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type.deserializeUsing_(serialization_), ff_core_Option.ff_core_Serializable_Serializable$ff_core_Option_Option(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_))
860
+ return
861
+ }
862
+ }
863
+ {
864
+ throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException)})
865
+ return
866
+ }
867
+ }
868
+ }
869
+ };
870
+
871
+ export const ff_core_Serializable_Serializable$ff_compiler_Environment_Scheme = {
872
+ serializeUsing_(serialization_, value_) {
873
+ {
874
+ const serialization_a = serialization_;
875
+ const value_a = value_;
876
+ {
877
+ const v_ = value_a;
878
+ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 30), 0);
879
+ ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 0);
880
+ serialization_.offset_ += 1;
881
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.serializeUsing_(serialization_, v_.isVariable_);
882
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.serializeUsing_(serialization_, v_.isMutable_);
883
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.serializeUsing_(serialization_, v_.isNewtype_);
884
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.serializeUsing_(serialization_, v_.isTraitMethod_);
885
+ ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Signature.serializeUsing_(serialization_, v_.signature_)
886
+ return
887
+ }
888
+ }
889
+ },
890
+ deserializeUsing_(serialization_) {
891
+ const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
892
+ serialization_.offset_ += 1;
893
+ {
894
+ const _1 = variantIndex_;
895
+ {
896
+ if(_1 == 0) {
897
+ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 30), 0);
898
+ return ff_compiler_Environment.Scheme(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Signature.deserializeUsing_(serialization_))
899
+ return
900
+ }
901
+ }
902
+ {
903
+ throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException)})
904
+ return
905
+ }
906
+ }
907
+ },
908
+ async serializeUsing_$(serialization_, value_, $task) {
909
+ {
910
+ const serialization_a = serialization_;
911
+ const value_a = value_;
912
+ {
913
+ const v_ = value_a;
914
+ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 30), 0);
915
+ ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 0);
916
+ serialization_.offset_ += 1;
917
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.serializeUsing_(serialization_, v_.isVariable_);
918
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.serializeUsing_(serialization_, v_.isMutable_);
919
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.serializeUsing_(serialization_, v_.isNewtype_);
920
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.serializeUsing_(serialization_, v_.isTraitMethod_);
921
+ ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Signature.serializeUsing_(serialization_, v_.signature_)
922
+ return
923
+ }
924
+ }
925
+ },
926
+ async deserializeUsing_$(serialization_, $task) {
927
+ const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
928
+ serialization_.offset_ += 1;
929
+ {
930
+ const _1 = variantIndex_;
931
+ {
932
+ if(_1 == 0) {
933
+ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 30), 0);
934
+ return ff_compiler_Environment.Scheme(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Bool_Bool.deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Signature.deserializeUsing_(serialization_))
935
+ return
936
+ }
937
+ }
938
+ {
939
+ throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException)})
940
+ return
941
+ }
942
+ }
943
+ }
944
+ };
945
+
946
+ export const ff_core_Serializable_Serializable$ff_compiler_Environment_Instantiated = {
947
+ serializeUsing_(serialization_, value_) {
948
+ {
949
+ const serialization_a = serialization_;
950
+ const value_a = value_;
951
+ {
952
+ const v_ = value_a;
953
+ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 36), 0);
954
+ ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 0);
955
+ serialization_.offset_ += 1;
956
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Pair.ff_core_Serializable_Serializable$ff_core_Pair_Pair(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type)).serializeUsing_(serialization_, v_.typeArguments_);
957
+ ff_compiler_Environment.ff_core_Serializable_Serializable$ff_compiler_Environment_Scheme.serializeUsing_(serialization_, v_.scheme_)
958
+ return
959
+ }
960
+ }
961
+ },
962
+ deserializeUsing_(serialization_) {
963
+ const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
964
+ serialization_.offset_ += 1;
965
+ {
966
+ const _1 = variantIndex_;
967
+ {
968
+ if(_1 == 0) {
969
+ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 36), 0);
970
+ return ff_compiler_Environment.Instantiated(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Pair.ff_core_Serializable_Serializable$ff_core_Pair_Pair(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type)).deserializeUsing_(serialization_), ff_compiler_Environment.ff_core_Serializable_Serializable$ff_compiler_Environment_Scheme.deserializeUsing_(serialization_))
971
+ return
972
+ }
973
+ }
974
+ {
975
+ throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException)})
976
+ return
977
+ }
978
+ }
979
+ },
980
+ async serializeUsing_$(serialization_, value_, $task) {
981
+ {
982
+ const serialization_a = serialization_;
983
+ const value_a = value_;
984
+ {
985
+ const v_ = value_a;
986
+ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 36), 0);
987
+ ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 0);
988
+ serialization_.offset_ += 1;
989
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Pair.ff_core_Serializable_Serializable$ff_core_Pair_Pair(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type)).serializeUsing_(serialization_, v_.typeArguments_);
990
+ ff_compiler_Environment.ff_core_Serializable_Serializable$ff_compiler_Environment_Scheme.serializeUsing_(serialization_, v_.scheme_)
991
+ return
992
+ }
993
+ }
994
+ },
995
+ async deserializeUsing_$(serialization_, $task) {
996
+ const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
997
+ serialization_.offset_ += 1;
998
+ {
999
+ const _1 = variantIndex_;
1000
+ {
1001
+ if(_1 == 0) {
1002
+ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 36), 0);
1003
+ return ff_compiler_Environment.Instantiated(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Pair.ff_core_Serializable_Serializable$ff_core_Pair_Pair(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String, ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Type)).deserializeUsing_(serialization_), ff_compiler_Environment.ff_core_Serializable_Serializable$ff_compiler_Environment_Scheme.deserializeUsing_(serialization_))
1004
+ return
1005
+ }
1006
+ }
1007
+ {
1008
+ throw Object.assign(new Error(), {ffException: ff_core_Any.toAny_(ff_core_Serializable.DeserializationChecksumException(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException)})
1009
+ return
1010
+ }
1011
+ }
1012
+ }
1013
+ };
1014
+
1015
+