firefly-compiler 0.4.4

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 (221) hide show
  1. package/.firefly-workspace +1 -0
  2. package/.vscode/settings.json +5 -0
  3. package/LICENSE.txt +21 -0
  4. package/README.md +96 -0
  5. package/bin/firefly.mjs +2 -0
  6. package/compiler/.firefly/package.ff +1 -0
  7. package/compiler/Builder.ff +218 -0
  8. package/compiler/Compiler.ff +241 -0
  9. package/compiler/Dependencies.ff +179 -0
  10. package/compiler/Deriver.ff +647 -0
  11. package/compiler/Dictionaries.ff +205 -0
  12. package/compiler/Environment.ff +166 -0
  13. package/compiler/Inference.ff +1117 -0
  14. package/compiler/JsEmitter.ff +861 -0
  15. package/compiler/JsImporter.ff +56 -0
  16. package/compiler/LspHook.ff +188 -0
  17. package/compiler/Main.ff +237 -0
  18. package/compiler/Parser.ff +1383 -0
  19. package/compiler/Patterns.ff +111 -0
  20. package/compiler/Resolver.ff +620 -0
  21. package/compiler/Substitution.ff +178 -0
  22. package/compiler/Syntax.ff +299 -0
  23. package/compiler/Token.ff +180 -0
  24. package/compiler/Tokenizer.ff +278 -0
  25. package/compiler/Unification.ff +220 -0
  26. package/compiler/Wildcards.ff +50 -0
  27. package/compiler/Workspace.ff +88 -0
  28. package/core/.firefly/package.ff +2 -0
  29. package/core/Any.ff +30 -0
  30. package/core/Array.ff +249 -0
  31. package/core/AssetSystem.ff +61 -0
  32. package/core/Atomic.ff +64 -0
  33. package/core/Bool.ff +13 -0
  34. package/core/BrowserSystem.ff +14 -0
  35. package/core/Buffer.ff +211 -0
  36. package/core/BuildSystem.ff +144 -0
  37. package/core/Channel.ff +131 -0
  38. package/core/Char.ff +18 -0
  39. package/core/Core.ff +58 -0
  40. package/core/Duration.ff +15 -0
  41. package/core/Equal.ff +52 -0
  42. package/core/Error.ff +20 -0
  43. package/core/FileHandle.ff +41 -0
  44. package/core/Float.ff +41 -0
  45. package/core/HttpClient.ff +84 -0
  46. package/core/Instant.ff +9 -0
  47. package/core/Int.ff +61 -0
  48. package/core/IntMap.ff +85 -0
  49. package/core/JsSystem.ff +66 -0
  50. package/core/JsValue.ff +240 -0
  51. package/core/List.ff +440 -0
  52. package/core/Lock.ff +144 -0
  53. package/core/Log.ff +24 -0
  54. package/core/Map.ff +126 -0
  55. package/core/NodeSystem.ff +88 -0
  56. package/core/Nothing.ff +1 -0
  57. package/core/Option.ff +133 -0
  58. package/core/Ordering.ff +157 -0
  59. package/core/Pair.ff +55 -0
  60. package/core/Path.ff +393 -0
  61. package/core/RbMap.ff +216 -0
  62. package/core/Serializable.ff +173 -0
  63. package/core/Set.ff +38 -0
  64. package/core/Show.ff +43 -0
  65. package/core/Stack.ff +263 -0
  66. package/core/Stream.ff +406 -0
  67. package/core/String.ff +175 -0
  68. package/core/StringMap.ff +85 -0
  69. package/core/Task.ff +138 -0
  70. package/core/Try.ff +81 -0
  71. package/core/Unit.ff +3 -0
  72. package/experimental/random/AltGeneric.ff +44 -0
  73. package/experimental/random/Async.ff +68 -0
  74. package/experimental/random/Buffer2.ff +77 -0
  75. package/experimental/random/Cat.ff +12 -0
  76. package/experimental/random/Dictionary.ff +52 -0
  77. package/experimental/random/Example.ff +46 -0
  78. package/experimental/random/Generic.ff +102 -0
  79. package/experimental/random/HappyEyeballs.ff +40 -0
  80. package/experimental/random/HashMap.ff +72 -0
  81. package/experimental/random/IfElseUnit.ff +9 -0
  82. package/experimental/random/InputOutput.ff +23 -0
  83. package/experimental/random/ListVsArray.ff +45 -0
  84. package/experimental/random/Main.ff +44 -0
  85. package/experimental/random/MapTest.ff +67 -0
  86. package/experimental/random/OldTaskSystem.ff +210 -0
  87. package/experimental/random/PatternTest.ff +39 -0
  88. package/experimental/random/Patterns.ff +226 -0
  89. package/experimental/random/ReadBytesTest.ff +10 -0
  90. package/experimental/random/RunLength.ff +65 -0
  91. package/experimental/random/Scrape.ff +51 -0
  92. package/experimental/random/Serialization.ff +217 -0
  93. package/experimental/random/SerializationTest.ff +46 -0
  94. package/experimental/random/Serializer.ff +36 -0
  95. package/experimental/random/StdInOutErr.ff +4 -0
  96. package/experimental/random/Symbols.ff +74 -0
  97. package/experimental/random/Tag.ff +49 -0
  98. package/experimental/random/Tensor.ff +52 -0
  99. package/experimental/random/Try.ff +56 -0
  100. package/experimental/random/Tsv.ff +9 -0
  101. package/experimental/random/TypesAreModules.ff +87 -0
  102. package/experimental/random/blueprints/Blueprint.ff +52 -0
  103. package/experimental/random/blueprints/Main.ff +11 -0
  104. package/experimental/random/blueprints/Pretty.ff +58 -0
  105. package/experimental/random/blueprints/User.ff +64 -0
  106. package/experimental/random/blueprintsystem/BlueprintSystem.ff +48 -0
  107. package/experimental/random/blueprintsystem/Deserialize.ff +53 -0
  108. package/experimental/random/blueprintsystem/ReadJs.ff +13 -0
  109. package/experimental/random/blueprintsystem/User.ff +2 -0
  110. package/experimental/random/kahrs/Kahrs.ff +112 -0
  111. package/experimental/random/kahrs/TestKahrs.ff +22 -0
  112. package/experimental/random/kahrs/TestMap.ff +18 -0
  113. package/experimental/random/streaming/Gzip.ff +3 -0
  114. package/experimental/random/streaming/Main.ff +34 -0
  115. package/experimental/random/streaming/S3Bucket.ff +11 -0
  116. package/experimental/random/streaming/Tar.ff +5 -0
  117. package/experimental/rhymeapp/Main.ff +81 -0
  118. package/experimental/rhymeapp/index.html +14 -0
  119. package/firefly.sh +5 -0
  120. package/fireflysite/Main.ff +13 -0
  121. package/httpserver/.firefly/package.ff +1 -0
  122. package/httpserver/HttpServer.ff +184 -0
  123. package/lsp/.firefly/package.ff +1 -0
  124. package/lsp/CompletionHandler.ff +814 -0
  125. package/lsp/Handler.ff +551 -0
  126. package/lsp/HoverHandler.ff +82 -0
  127. package/lsp/LanguageServer.ff +229 -0
  128. package/lsp/SignatureHelpHandler.ff +55 -0
  129. package/lsp/SymbolHandler.ff +167 -0
  130. package/output/js/ff/compiler/Builder.mjs +483 -0
  131. package/output/js/ff/compiler/Compiler.mjs +410 -0
  132. package/output/js/ff/compiler/Dependencies.mjs +388 -0
  133. package/output/js/ff/compiler/Deriver.mjs +1166 -0
  134. package/output/js/ff/compiler/Dictionaries.mjs +1305 -0
  135. package/output/js/ff/compiler/Environment.mjs +1005 -0
  136. package/output/js/ff/compiler/Inference.mjs +4264 -0
  137. package/output/js/ff/compiler/JsEmitter.mjs +5353 -0
  138. package/output/js/ff/compiler/JsImporter.mjs +262 -0
  139. package/output/js/ff/compiler/LspHook.mjs +789 -0
  140. package/output/js/ff/compiler/Main.mjs +1695 -0
  141. package/output/js/ff/compiler/Parser.mjs +4004 -0
  142. package/output/js/ff/compiler/Patterns.mjs +923 -0
  143. package/output/js/ff/compiler/Resolver.mjs +2303 -0
  144. package/output/js/ff/compiler/Substitution.mjs +1146 -0
  145. package/output/js/ff/compiler/Syntax.mjs +12430 -0
  146. package/output/js/ff/compiler/Token.mjs +3092 -0
  147. package/output/js/ff/compiler/Tokenizer.mjs +589 -0
  148. package/output/js/ff/compiler/Unification.mjs +1748 -0
  149. package/output/js/ff/compiler/Wildcards.mjs +604 -0
  150. package/output/js/ff/compiler/Workspace.mjs +683 -0
  151. package/output/js/ff/core/Any.mjs +139 -0
  152. package/output/js/ff/core/Array.mjs +594 -0
  153. package/output/js/ff/core/AssetSystem.mjs +270 -0
  154. package/output/js/ff/core/Atomic.mjs +186 -0
  155. package/output/js/ff/core/Bool.mjs +141 -0
  156. package/output/js/ff/core/BrowserSystem.mjs +122 -0
  157. package/output/js/ff/core/Buffer.mjs +467 -0
  158. package/output/js/ff/core/BuildSystem.mjs +320 -0
  159. package/output/js/ff/core/Channel.mjs +268 -0
  160. package/output/js/ff/core/Char.mjs +145 -0
  161. package/output/js/ff/core/Core.mjs +300 -0
  162. package/output/js/ff/core/Duration.mjs +112 -0
  163. package/output/js/ff/core/Equal.mjs +175 -0
  164. package/output/js/ff/core/Error.mjs +138 -0
  165. package/output/js/ff/core/FileHandle.mjs +164 -0
  166. package/output/js/ff/core/Float.mjs +214 -0
  167. package/output/js/ff/core/HttpClient.mjs +210 -0
  168. package/output/js/ff/core/Instant.mjs +105 -0
  169. package/output/js/ff/core/Int.mjs +254 -0
  170. package/output/js/ff/core/IntMap.mjs +282 -0
  171. package/output/js/ff/core/JsSystem.mjs +234 -0
  172. package/output/js/ff/core/JsValue.mjs +678 -0
  173. package/output/js/ff/core/List.mjs +2335 -0
  174. package/output/js/ff/core/Lock.mjs +322 -0
  175. package/output/js/ff/core/Log.mjs +159 -0
  176. package/output/js/ff/core/Map.mjs +358 -0
  177. package/output/js/ff/core/NodeSystem.mjs +288 -0
  178. package/output/js/ff/core/Nothing.mjs +100 -0
  179. package/output/js/ff/core/Option.mjs +1002 -0
  180. package/output/js/ff/core/Ordering.mjs +734 -0
  181. package/output/js/ff/core/Pair.mjs +318 -0
  182. package/output/js/ff/core/Path.mjs +768 -0
  183. package/output/js/ff/core/RbMap.mjs +1936 -0
  184. package/output/js/ff/core/Serializable.mjs +434 -0
  185. package/output/js/ff/core/Set.mjs +250 -0
  186. package/output/js/ff/core/Show.mjs +201 -0
  187. package/output/js/ff/core/Stack.mjs +595 -0
  188. package/output/js/ff/core/Stream.mjs +1300 -0
  189. package/output/js/ff/core/String.mjs +433 -0
  190. package/output/js/ff/core/StringMap.mjs +282 -0
  191. package/output/js/ff/core/Task.mjs +345 -0
  192. package/output/js/ff/core/Try.mjs +503 -0
  193. package/output/js/ff/core/Unit.mjs +103 -0
  194. package/package.json +29 -0
  195. package/postgresql/.firefly/include/package-lock.json +250 -0
  196. package/postgresql/.firefly/include/package.json +5 -0
  197. package/postgresql/.firefly/include/prepare.sh +2 -0
  198. package/postgresql/.firefly/package.ff +3 -0
  199. package/postgresql/Pg.ff +530 -0
  200. package/unsafejs/.firefly/package.ff +1 -0
  201. package/unsafejs/UnsafeJs.ff +19 -0
  202. package/vscode/.vscode/launch.json +18 -0
  203. package/vscode/.vscode/tasks.json +33 -0
  204. package/vscode/LICENSE.txt +21 -0
  205. package/vscode/Prepublish.ff +15 -0
  206. package/vscode/README.md +17 -0
  207. package/vscode/client/package-lock.json +544 -0
  208. package/vscode/client/package.json +22 -0
  209. package/vscode/client/src/extension.ts +64 -0
  210. package/vscode/client/tsconfig.json +12 -0
  211. package/vscode/icons/firefly-icon.png +0 -0
  212. package/vscode/icons/firefly-icon.svg +10 -0
  213. package/vscode/icons/firefly-logo-notext.png +0 -0
  214. package/vscode/icons/firefly-logo.png +0 -0
  215. package/vscode/language-configuration.json +39 -0
  216. package/vscode/package-lock.json +3623 -0
  217. package/vscode/package.json +144 -0
  218. package/vscode/snippets-none.json +1 -0
  219. package/vscode/snippets.json +241 -0
  220. package/vscode/syntaxes/firefly.tmLanguage.json +294 -0
  221. package/vscode/tsconfig.json +20 -0
@@ -0,0 +1,434 @@
1
+
2
+
3
+ import * as ff_core_Any from "../../ff/core/Any.mjs"
4
+
5
+ import * as ff_core_Array from "../../ff/core/Array.mjs"
6
+
7
+ import * as ff_core_AssetSystem from "../../ff/core/AssetSystem.mjs"
8
+
9
+ import * as ff_core_Atomic from "../../ff/core/Atomic.mjs"
10
+
11
+ import * as ff_core_Bool from "../../ff/core/Bool.mjs"
12
+
13
+ import * as ff_core_BrowserSystem from "../../ff/core/BrowserSystem.mjs"
14
+
15
+ import * as ff_core_Buffer from "../../ff/core/Buffer.mjs"
16
+
17
+ import * as ff_core_BuildSystem from "../../ff/core/BuildSystem.mjs"
18
+
19
+ import * as ff_core_Channel from "../../ff/core/Channel.mjs"
20
+
21
+ import * as ff_core_Char from "../../ff/core/Char.mjs"
22
+
23
+ import * as ff_core_Core from "../../ff/core/Core.mjs"
24
+
25
+ import * as ff_core_Duration from "../../ff/core/Duration.mjs"
26
+
27
+ import * as ff_core_Equal from "../../ff/core/Equal.mjs"
28
+
29
+ import * as ff_core_Error from "../../ff/core/Error.mjs"
30
+
31
+ import * as ff_core_FileHandle from "../../ff/core/FileHandle.mjs"
32
+
33
+ import * as ff_core_Float from "../../ff/core/Float.mjs"
34
+
35
+ import * as ff_core_HttpClient from "../../ff/core/HttpClient.mjs"
36
+
37
+ import * as ff_core_Instant from "../../ff/core/Instant.mjs"
38
+
39
+ import * as ff_core_Int from "../../ff/core/Int.mjs"
40
+
41
+ import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
42
+
43
+ import * as ff_core_JsSystem from "../../ff/core/JsSystem.mjs"
44
+
45
+ import * as ff_core_JsValue from "../../ff/core/JsValue.mjs"
46
+
47
+ import * as ff_core_List from "../../ff/core/List.mjs"
48
+
49
+ import * as ff_core_Lock from "../../ff/core/Lock.mjs"
50
+
51
+ import * as ff_core_Log from "../../ff/core/Log.mjs"
52
+
53
+ import * as ff_core_Map from "../../ff/core/Map.mjs"
54
+
55
+ import * as ff_core_NodeSystem from "../../ff/core/NodeSystem.mjs"
56
+
57
+ import * as ff_core_Nothing from "../../ff/core/Nothing.mjs"
58
+
59
+ import * as ff_core_Option from "../../ff/core/Option.mjs"
60
+
61
+ import * as ff_core_Ordering from "../../ff/core/Ordering.mjs"
62
+
63
+ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
64
+
65
+ import * as ff_core_Path from "../../ff/core/Path.mjs"
66
+
67
+ import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
68
+
69
+ import * as ff_core_Set from "../../ff/core/Set.mjs"
70
+
71
+ import * as ff_core_Show from "../../ff/core/Show.mjs"
72
+
73
+ import * as ff_core_Stack from "../../ff/core/Stack.mjs"
74
+
75
+ import * as ff_core_Stream from "../../ff/core/Stream.mjs"
76
+
77
+ import * as ff_core_String from "../../ff/core/String.mjs"
78
+
79
+ import * as ff_core_StringMap from "../../ff/core/StringMap.mjs"
80
+
81
+ import * as ff_core_Task from "../../ff/core/Task.mjs"
82
+
83
+ import * as ff_core_Try from "../../ff/core/Try.mjs"
84
+
85
+ import * as ff_core_Unit from "../../ff/core/Unit.mjs"
86
+
87
+ // type DeserializationChecksumException
88
+ const DeserializationChecksumException$ = {DeserializationChecksumException: true};
89
+ export function DeserializationChecksumException() {
90
+ return DeserializationChecksumException$;
91
+ }
92
+
93
+ // type Serialization
94
+ export function Serialization(buffer_, offset_, checksum_) {
95
+ return {buffer_, offset_, checksum_};
96
+ }
97
+
98
+
99
+
100
+ export function serialize_(value_, initialBufferSize_ = 1024, ff_core_Serializable_Serializable$T) {
101
+ const serialization_ = ff_core_Serializable.Serialization(ff_core_Buffer.make_(initialBufferSize_, false), 0, 0);
102
+ ff_core_Serializable_Serializable$T.serializeUsing_(serialization_, value_);
103
+ ff_core_Serializable.Serialization_autoResize(serialization_, 4);
104
+ ff_core_Buffer.Buffer_setInt32(serialization_.buffer_, serialization_.offset_, serialization_.checksum_, true);
105
+ serialization_.offset_ += 4;
106
+ return ff_core_Buffer.Buffer_view(serialization_.buffer_, 0, serialization_.offset_)
107
+ }
108
+
109
+ export function deserialize_(buffer_, ff_core_Serializable_Serializable$T) {
110
+ const serialization_ = ff_core_Serializable.Serialization(buffer_, 0, 0);
111
+ const result_ = ff_core_Serializable_Serializable$T.deserializeUsing_(serialization_);
112
+ const checksum_ = ff_core_Buffer.Buffer_grabInt32(serialization_.buffer_, serialization_.offset_, true);
113
+ if((checksum_ !== serialization_.checksum_)) {
114
+ 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)})
115
+ };
116
+ return result_
117
+ }
118
+
119
+ export function internalSetLatin1_(self_, byteOffset_, value_) {
120
+
121
+ for(let i = 0; i < value_.length; i++) {
122
+ let charCode = value_.charCodeAt(i)
123
+ if(charCode >= 256) return false
124
+ self_.setUint8(byteOffset_ + i, charCode)
125
+ }
126
+ return true
127
+
128
+ }
129
+
130
+ export function internalGrabLatin1_(self_, byteOffset_, size_) {
131
+
132
+ const codeUnits = new Uint8Array(self_.buffer, self_.byteOffset + byteOffset_, size_)
133
+ return String.fromCharCode.apply(null, codeUnits)
134
+
135
+ }
136
+
137
+ export async function serialize_$(value_, initialBufferSize_ = 1024, ff_core_Serializable_Serializable$T, $task) {
138
+ const serialization_ = ff_core_Serializable.Serialization(ff_core_Buffer.make_(initialBufferSize_, false), 0, 0);
139
+ ff_core_Serializable_Serializable$T.serializeUsing_(serialization_, value_);
140
+ ff_core_Serializable.Serialization_autoResize(serialization_, 4);
141
+ ff_core_Buffer.Buffer_setInt32(serialization_.buffer_, serialization_.offset_, serialization_.checksum_, true);
142
+ serialization_.offset_ += 4;
143
+ return ff_core_Buffer.Buffer_view(serialization_.buffer_, 0, serialization_.offset_)
144
+ }
145
+
146
+ export async function deserialize_$(buffer_, ff_core_Serializable_Serializable$T, $task) {
147
+ const serialization_ = ff_core_Serializable.Serialization(buffer_, 0, 0);
148
+ const result_ = ff_core_Serializable_Serializable$T.deserializeUsing_(serialization_);
149
+ const checksum_ = ff_core_Buffer.Buffer_grabInt32(serialization_.buffer_, serialization_.offset_, true);
150
+ if((checksum_ !== serialization_.checksum_)) {
151
+ 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)})
152
+ };
153
+ return result_
154
+ }
155
+
156
+ export async function internalSetLatin1_$(self_, byteOffset_, value_, $task) {
157
+ throw new Error('Function internalSetLatin1 is missing on this target in async context.');
158
+ }
159
+
160
+ export async function internalGrabLatin1_$(self_, byteOffset_, size_, $task) {
161
+ throw new Error('Function internalGrabLatin1 is missing on this target in async context.');
162
+ }
163
+
164
+ export function Serialization_autoResize(self_, minSpareCapacity_) {
165
+ if(((self_.offset_ + minSpareCapacity_) > ff_core_Buffer.Buffer_size(self_.buffer_))) {
166
+ const minSize_ = (ff_core_Buffer.Buffer_size(self_.buffer_) + minSpareCapacity_);
167
+ const newBuffer_ = ff_core_Buffer.make_(ff_core_Int.Int_max((ff_core_Buffer.Buffer_size(self_.buffer_) * 2), minSize_), false);
168
+ ff_core_Buffer.Buffer_setAll(newBuffer_, 0, self_.buffer_);
169
+ self_.buffer_ = newBuffer_
170
+ }
171
+ }
172
+
173
+ export async function Serialization_autoResize$(self_, minSpareCapacity_, $task) {
174
+ if(((self_.offset_ + minSpareCapacity_) > ff_core_Buffer.Buffer_size(self_.buffer_))) {
175
+ const minSize_ = (ff_core_Buffer.Buffer_size(self_.buffer_) + minSpareCapacity_);
176
+ const newBuffer_ = ff_core_Buffer.make_(ff_core_Int.Int_max((ff_core_Buffer.Buffer_size(self_.buffer_) * 2), minSize_), false);
177
+ ff_core_Buffer.Buffer_setAll(newBuffer_, 0, self_.buffer_);
178
+ self_.buffer_ = newBuffer_
179
+ }
180
+ }
181
+
182
+ export const ff_core_Serializable_Serializable$ff_core_Int_Int = {
183
+ serializeUsing_(serialization_, value_) {
184
+ ff_core_Serializable.Serialization_autoResize(serialization_, 8);
185
+ ff_core_Buffer.Buffer_setInt64(serialization_.buffer_, serialization_.offset_, value_, true);
186
+ serialization_.offset_ += 8
187
+ },
188
+ deserializeUsing_(serialization_) {
189
+ const result_ = ff_core_Buffer.Buffer_grabInt64(serialization_.buffer_, serialization_.offset_, true);
190
+ serialization_.offset_ += 8;
191
+ return result_
192
+ },
193
+ async serializeUsing_$(serialization_, value_, $task) {
194
+ ff_core_Serializable.Serialization_autoResize(serialization_, 8);
195
+ ff_core_Buffer.Buffer_setInt64(serialization_.buffer_, serialization_.offset_, value_, true);
196
+ serialization_.offset_ += 8
197
+ },
198
+ async deserializeUsing_$(serialization_, $task) {
199
+ const result_ = ff_core_Buffer.Buffer_grabInt64(serialization_.buffer_, serialization_.offset_, true);
200
+ serialization_.offset_ += 8;
201
+ return result_
202
+ }
203
+ };
204
+
205
+ export const ff_core_Serializable_Serializable$ff_core_Bool_Bool = {
206
+ serializeUsing_(serialization_, value_) {
207
+ ff_core_Serializable.Serialization_autoResize(serialization_, 1);
208
+ ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, (value_
209
+ ? 1
210
+ : 0));
211
+ serialization_.offset_ += 1
212
+ },
213
+ deserializeUsing_(serialization_) {
214
+ const result_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
215
+ serialization_.offset_ += 1;
216
+ return (result_ === 1)
217
+ },
218
+ async serializeUsing_$(serialization_, value_, $task) {
219
+ ff_core_Serializable.Serialization_autoResize(serialization_, 1);
220
+ ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, (value_
221
+ ? 1
222
+ : 0));
223
+ serialization_.offset_ += 1
224
+ },
225
+ async deserializeUsing_$(serialization_, $task) {
226
+ const result_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
227
+ serialization_.offset_ += 1;
228
+ return (result_ === 1)
229
+ }
230
+ };
231
+
232
+ export function ff_core_Serializable_Serializable$ff_core_Array_Array(ff_core_Serializable_Serializable$T) { return {
233
+ serializeUsing_(serialization_, value_) {
234
+ if((ff_core_Array.Array_size(value_) < 255)) {
235
+ ff_core_Serializable.Serialization_autoResize(serialization_, 1);
236
+ ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, ff_core_Array.Array_size(value_));
237
+ serialization_.offset_ += 1
238
+ } else if((ff_core_Array.Array_size(value_) < 1073741824)) {
239
+ ff_core_Serializable.Serialization_autoResize(serialization_, (1 + 4));
240
+ ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 255);
241
+ ff_core_Buffer.Buffer_setUint32(serialization_.buffer_, (1 + serialization_.offset_), ff_core_Array.Array_size(value_), true);
242
+ serialization_.offset_ += (1 + 4)
243
+ } else {
244
+ ff_core_Core.panic_("Can't serialize arrays where size() >= 1073741824")
245
+ };
246
+ ff_core_Array.Array_each(value_, ((_w1) => {
247
+ ff_core_Serializable_Serializable$T.serializeUsing_(serialization_, _w1)
248
+ }))
249
+ },
250
+ deserializeUsing_(serialization_) {
251
+ const smallSize_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
252
+ if((smallSize_ !== 255)) {
253
+ serialization_.offset_ += 1;
254
+ return ((() => {
255
+ const size = smallSize_;
256
+ const result = [];
257
+ for(let i = 0; i < size; i++) {
258
+ result.push(ff_core_Serializable_Serializable$T.deserializeUsing_(serialization_));
259
+ }
260
+ return result;
261
+ })())
262
+ } else {
263
+ const size_ = ff_core_Buffer.Buffer_grabUint32(serialization_.buffer_, (serialization_.offset_ + 1), true);
264
+ serialization_.offset_ += (1 + 4);
265
+ return ((() => {
266
+ const size = size_;
267
+ const result = [];
268
+ for(let i = 0; i < size; i++) {
269
+ result.push(ff_core_Serializable_Serializable$T.deserializeUsing_(serialization_));
270
+ }
271
+ return result;
272
+ })())
273
+ }
274
+ },
275
+ async serializeUsing_$(serialization_, value_, $task) {
276
+ if((ff_core_Array.Array_size(value_) < 255)) {
277
+ ff_core_Serializable.Serialization_autoResize(serialization_, 1);
278
+ ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, ff_core_Array.Array_size(value_));
279
+ serialization_.offset_ += 1
280
+ } else if((ff_core_Array.Array_size(value_) < 1073741824)) {
281
+ ff_core_Serializable.Serialization_autoResize(serialization_, (1 + 4));
282
+ ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 255);
283
+ ff_core_Buffer.Buffer_setUint32(serialization_.buffer_, (1 + serialization_.offset_), ff_core_Array.Array_size(value_), true);
284
+ serialization_.offset_ += (1 + 4)
285
+ } else {
286
+ ff_core_Core.panic_("Can't serialize arrays where size() >= 1073741824")
287
+ };
288
+ ff_core_Array.Array_each(value_, ((_w1) => {
289
+ ff_core_Serializable_Serializable$T.serializeUsing_(serialization_, _w1)
290
+ }))
291
+ },
292
+ async deserializeUsing_$(serialization_, $task) {
293
+ const smallSize_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
294
+ if((smallSize_ !== 255)) {
295
+ serialization_.offset_ += 1;
296
+ return ((() => {
297
+ const size = smallSize_;
298
+ const result = [];
299
+ for(let i = 0; i < size; i++) {
300
+ result.push(ff_core_Serializable_Serializable$T.deserializeUsing_(serialization_));
301
+ }
302
+ return result;
303
+ })())
304
+ } else {
305
+ const size_ = ff_core_Buffer.Buffer_grabUint32(serialization_.buffer_, (serialization_.offset_ + 1), true);
306
+ serialization_.offset_ += (1 + 4);
307
+ return ((() => {
308
+ const size = size_;
309
+ const result = [];
310
+ for(let i = 0; i < size; i++) {
311
+ result.push(ff_core_Serializable_Serializable$T.deserializeUsing_(serialization_));
312
+ }
313
+ return result;
314
+ })())
315
+ }
316
+ }
317
+ }}
318
+
319
+ export function ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Serializable_Serializable$T) { return {
320
+ serializeUsing_(serialization_, value_) {
321
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Array_Array(ff_core_Serializable_Serializable$T).serializeUsing_(serialization_, ff_core_List.List_toArray(value_))
322
+ },
323
+ deserializeUsing_(serialization_) {
324
+ return ff_core_Array.Array_toList(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Array_Array(ff_core_Serializable_Serializable$T).deserializeUsing_(serialization_))
325
+ },
326
+ async serializeUsing_$(serialization_, value_, $task) {
327
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Array_Array(ff_core_Serializable_Serializable$T).serializeUsing_(serialization_, ff_core_List.List_toArray(value_))
328
+ },
329
+ async deserializeUsing_$(serialization_, $task) {
330
+ return ff_core_Array.Array_toList(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Array_Array(ff_core_Serializable_Serializable$T).deserializeUsing_(serialization_))
331
+ }
332
+ }}
333
+
334
+ export function ff_core_Serializable_Serializable$ff_core_Set_Set(ff_core_Serializable_Serializable$T, ff_core_Ordering_Order$T) { return {
335
+ serializeUsing_(serialization_, value_) {
336
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Array_Array(ff_core_Serializable_Serializable$T).serializeUsing_(serialization_, ff_core_Set.Set_toArray(value_, ff_core_Ordering_Order$T))
337
+ },
338
+ deserializeUsing_(serialization_) {
339
+ return ff_core_Array.Array_toSet(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Array_Array(ff_core_Serializable_Serializable$T).deserializeUsing_(serialization_), ff_core_Ordering_Order$T)
340
+ },
341
+ async serializeUsing_$(serialization_, value_, $task) {
342
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Array_Array(ff_core_Serializable_Serializable$T).serializeUsing_(serialization_, ff_core_Set.Set_toArray(value_, ff_core_Ordering_Order$T))
343
+ },
344
+ async deserializeUsing_$(serialization_, $task) {
345
+ return ff_core_Array.Array_toSet(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Array_Array(ff_core_Serializable_Serializable$T).deserializeUsing_(serialization_), ff_core_Ordering_Order$T)
346
+ }
347
+ }}
348
+
349
+ export function ff_core_Serializable_Serializable$ff_core_Map_Map(ff_core_Serializable_Serializable$K, ff_core_Ordering_Order$K, ff_core_Serializable_Serializable$V) { return {
350
+ serializeUsing_(serialization_, value_) {
351
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Array_Array(ff_core_Pair.ff_core_Serializable_Serializable$ff_core_Pair_Pair(ff_core_Serializable_Serializable$K, ff_core_Serializable_Serializable$V)).serializeUsing_(serialization_, ff_core_Map.Map_toArray(value_, ff_core_Ordering_Order$K))
352
+ },
353
+ deserializeUsing_(serialization_) {
354
+ return ff_core_Array.Array_toMap(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Array_Array(ff_core_Pair.ff_core_Serializable_Serializable$ff_core_Pair_Pair(ff_core_Serializable_Serializable$K, ff_core_Serializable_Serializable$V)).deserializeUsing_(serialization_), ff_core_Ordering_Order$K)
355
+ },
356
+ async serializeUsing_$(serialization_, value_, $task) {
357
+ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Array_Array(ff_core_Pair.ff_core_Serializable_Serializable$ff_core_Pair_Pair(ff_core_Serializable_Serializable$K, ff_core_Serializable_Serializable$V)).serializeUsing_(serialization_, ff_core_Map.Map_toArray(value_, ff_core_Ordering_Order$K))
358
+ },
359
+ async deserializeUsing_$(serialization_, $task) {
360
+ return ff_core_Array.Array_toMap(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_Array_Array(ff_core_Pair.ff_core_Serializable_Serializable$ff_core_Pair_Pair(ff_core_Serializable_Serializable$K, ff_core_Serializable_Serializable$V)).deserializeUsing_(serialization_), ff_core_Ordering_Order$K)
361
+ }
362
+ }}
363
+
364
+ export const ff_core_Serializable_Serializable$ff_core_String_String = {
365
+ serializeUsing_(serialization_, value_) {
366
+ ff_core_Serializable.Serialization_autoResize(serialization_, (1 + ff_core_String.String_size(value_)));
367
+ ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, ff_core_String.String_size(value_));
368
+ if(((ff_core_String.String_size(value_) < 255) && ff_core_Serializable.internalSetLatin1_(serialization_.buffer_, (serialization_.offset_ + 1), value_))) {
369
+ serialization_.offset_ += (1 + ff_core_String.String_size(value_))
370
+ } else if((ff_core_String.String_size(value_) < 1073741824)) {
371
+ const stringBuffer_ = ff_core_String.String_toBuffer(value_);
372
+ ff_core_Serializable.Serialization_autoResize(serialization_, (5 + ff_core_Buffer.Buffer_size(stringBuffer_)));
373
+ ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 255);
374
+ ff_core_Buffer.Buffer_setUint32(serialization_.buffer_, (serialization_.offset_ + 1), ff_core_Buffer.Buffer_size(stringBuffer_), true);
375
+ ff_core_Buffer.Buffer_setAll(serialization_.buffer_, (serialization_.offset_ + 5), stringBuffer_);
376
+ serialization_.offset_ += (5 + ff_core_Buffer.Buffer_size(stringBuffer_))
377
+ } else {
378
+ ff_core_Core.panic_("Can't serialize strings where size() >= 1073741824")
379
+ }
380
+ },
381
+ deserializeUsing_(serialization_) {
382
+ const smallSize_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
383
+ if((smallSize_ !== 255)) {
384
+ const result_ = ff_core_Serializable.internalGrabLatin1_(serialization_.buffer_, (serialization_.offset_ + 1), smallSize_);
385
+ serialization_.offset_ += (1 + smallSize_);
386
+ return result_
387
+ } else {
388
+ const size_ = ff_core_Buffer.Buffer_grabUint32(serialization_.buffer_, (serialization_.offset_ + 1), true);
389
+ const stringBuffer_ = ff_core_Buffer.Buffer_view(serialization_.buffer_, (serialization_.offset_ + 5), ((serialization_.offset_ + 5) + size_));
390
+ serialization_.offset_ += (5 + size_);
391
+ return ff_core_Buffer.Buffer_toString(stringBuffer_, "utf8")
392
+ }
393
+ },
394
+ async serializeUsing_$(serialization_, value_, $task) {
395
+ ff_core_Serializable.Serialization_autoResize(serialization_, (1 + ff_core_String.String_size(value_)));
396
+ ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, ff_core_String.String_size(value_));
397
+ if(((ff_core_String.String_size(value_) < 255) && ff_core_Serializable.internalSetLatin1_(serialization_.buffer_, (serialization_.offset_ + 1), value_))) {
398
+ serialization_.offset_ += (1 + ff_core_String.String_size(value_))
399
+ } else if((ff_core_String.String_size(value_) < 1073741824)) {
400
+ const stringBuffer_ = ff_core_String.String_toBuffer(value_);
401
+ ff_core_Serializable.Serialization_autoResize(serialization_, (5 + ff_core_Buffer.Buffer_size(stringBuffer_)));
402
+ ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 255);
403
+ ff_core_Buffer.Buffer_setUint32(serialization_.buffer_, (serialization_.offset_ + 1), ff_core_Buffer.Buffer_size(stringBuffer_), true);
404
+ ff_core_Buffer.Buffer_setAll(serialization_.buffer_, (serialization_.offset_ + 5), stringBuffer_);
405
+ serialization_.offset_ += (5 + ff_core_Buffer.Buffer_size(stringBuffer_))
406
+ } else {
407
+ ff_core_Core.panic_("Can't serialize strings where size() >= 1073741824")
408
+ }
409
+ },
410
+ async deserializeUsing_$(serialization_, $task) {
411
+ const smallSize_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
412
+ if((smallSize_ !== 255)) {
413
+ const result_ = ff_core_Serializable.internalGrabLatin1_(serialization_.buffer_, (serialization_.offset_ + 1), smallSize_);
414
+ serialization_.offset_ += (1 + smallSize_);
415
+ return result_
416
+ } else {
417
+ const size_ = ff_core_Buffer.Buffer_grabUint32(serialization_.buffer_, (serialization_.offset_ + 1), true);
418
+ const stringBuffer_ = ff_core_Buffer.Buffer_view(serialization_.buffer_, (serialization_.offset_ + 5), ((serialization_.offset_ + 5) + size_));
419
+ serialization_.offset_ += (5 + size_);
420
+ return ff_core_Buffer.Buffer_toString(stringBuffer_, "utf8")
421
+ }
422
+ }
423
+ };
424
+
425
+ export const ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException = {
426
+ anyTag_() {
427
+ return ff_core_Any.internalAnyTag_((("ff:core/Serializable.DeserializationChecksumException" + "[") + "]"))
428
+ },
429
+ async anyTag_$($task) {
430
+ return ff_core_Any.internalAnyTag_((("ff:core/Serializable.DeserializationChecksumException" + "[") + "]"))
431
+ }
432
+ };
433
+
434
+
@@ -0,0 +1,250 @@
1
+
2
+
3
+ import * as ff_core_Any from "../../ff/core/Any.mjs"
4
+
5
+ import * as ff_core_Array from "../../ff/core/Array.mjs"
6
+
7
+ import * as ff_core_AssetSystem from "../../ff/core/AssetSystem.mjs"
8
+
9
+ import * as ff_core_Atomic from "../../ff/core/Atomic.mjs"
10
+
11
+ import * as ff_core_Bool from "../../ff/core/Bool.mjs"
12
+
13
+ import * as ff_core_BrowserSystem from "../../ff/core/BrowserSystem.mjs"
14
+
15
+ import * as ff_core_Buffer from "../../ff/core/Buffer.mjs"
16
+
17
+ import * as ff_core_BuildSystem from "../../ff/core/BuildSystem.mjs"
18
+
19
+ import * as ff_core_Channel from "../../ff/core/Channel.mjs"
20
+
21
+ import * as ff_core_Char from "../../ff/core/Char.mjs"
22
+
23
+ import * as ff_core_Core from "../../ff/core/Core.mjs"
24
+
25
+ import * as ff_core_Duration from "../../ff/core/Duration.mjs"
26
+
27
+ import * as ff_core_Equal from "../../ff/core/Equal.mjs"
28
+
29
+ import * as ff_core_Error from "../../ff/core/Error.mjs"
30
+
31
+ import * as ff_core_FileHandle from "../../ff/core/FileHandle.mjs"
32
+
33
+ import * as ff_core_Float from "../../ff/core/Float.mjs"
34
+
35
+ import * as ff_core_HttpClient from "../../ff/core/HttpClient.mjs"
36
+
37
+ import * as ff_core_Instant from "../../ff/core/Instant.mjs"
38
+
39
+ import * as ff_core_Int from "../../ff/core/Int.mjs"
40
+
41
+ import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
42
+
43
+ import * as ff_core_JsSystem from "../../ff/core/JsSystem.mjs"
44
+
45
+ import * as ff_core_JsValue from "../../ff/core/JsValue.mjs"
46
+
47
+ import * as ff_core_List from "../../ff/core/List.mjs"
48
+
49
+ import * as ff_core_Lock from "../../ff/core/Lock.mjs"
50
+
51
+ import * as ff_core_Log from "../../ff/core/Log.mjs"
52
+
53
+ import * as ff_core_Map from "../../ff/core/Map.mjs"
54
+
55
+ import * as ff_core_NodeSystem from "../../ff/core/NodeSystem.mjs"
56
+
57
+ import * as ff_core_Nothing from "../../ff/core/Nothing.mjs"
58
+
59
+ import * as ff_core_Option from "../../ff/core/Option.mjs"
60
+
61
+ import * as ff_core_Ordering from "../../ff/core/Ordering.mjs"
62
+
63
+ import * as ff_core_Pair from "../../ff/core/Pair.mjs"
64
+
65
+ import * as ff_core_Path from "../../ff/core/Path.mjs"
66
+
67
+ import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
68
+
69
+ import * as ff_core_Set from "../../ff/core/Set.mjs"
70
+
71
+ import * as ff_core_Show from "../../ff/core/Show.mjs"
72
+
73
+ import * as ff_core_Stack from "../../ff/core/Stack.mjs"
74
+
75
+ import * as ff_core_Stream from "../../ff/core/Stream.mjs"
76
+
77
+ import * as ff_core_String from "../../ff/core/String.mjs"
78
+
79
+ import * as ff_core_StringMap from "../../ff/core/StringMap.mjs"
80
+
81
+ import * as ff_core_Task from "../../ff/core/Task.mjs"
82
+
83
+ import * as ff_core_Try from "../../ff/core/Try.mjs"
84
+
85
+ import * as ff_core_Unit from "../../ff/core/Unit.mjs"
86
+
87
+ // newtype Set
88
+
89
+
90
+
91
+ export function empty_() {
92
+ return ff_core_Map.empty_()
93
+ }
94
+
95
+ export async function empty_$($task) {
96
+ return ff_core_Map.empty_()
97
+ }
98
+
99
+ export function Set_add(self_, value_, ff_core_Ordering_Order$T) {
100
+ return ff_core_Map.Map_add(self_, value_, (void 0), ff_core_Ordering_Order$T)
101
+ }
102
+
103
+ export function Set_addAll(self_, that_, ff_core_Ordering_Order$T) {
104
+ return ff_core_Map.Map_addAll(self_, that_, ff_core_Ordering_Order$T)
105
+ }
106
+
107
+ export function Set_remove(self_, value_, ff_core_Ordering_Order$T) {
108
+ return ff_core_Map.Map_remove(self_, value_, ff_core_Ordering_Order$T)
109
+ }
110
+
111
+ export function Set_removeAll(self_, that_, ff_core_Ordering_Order$T) {
112
+ return ff_core_Map.Map_removeAll(self_, that_, ff_core_Ordering_Order$T)
113
+ }
114
+
115
+ export function Set_contains(self_, value_, ff_core_Ordering_Order$T) {
116
+ return ff_core_Map.Map_contains(self_, value_, ff_core_Ordering_Order$T)
117
+ }
118
+
119
+ export function Set_size(self_, ff_core_Ordering_Order$T) {
120
+ return ff_core_Map.Map_size(self_, ff_core_Ordering_Order$T)
121
+ }
122
+
123
+ export function Set_toList(self_, ff_core_Ordering_Order$T) {
124
+ return ff_core_List.List_map(ff_core_Map.Map_toList(self_, ff_core_Ordering_Order$T), ((_w1) => {
125
+ return _w1.first_
126
+ }))
127
+ }
128
+
129
+ export function Set_toArray(self_, ff_core_Ordering_Order$T) {
130
+ return ff_core_Array.Array_map(ff_core_Map.Map_toArray(self_, ff_core_Ordering_Order$T), ((_w1) => {
131
+ return _w1.first_
132
+ }))
133
+ }
134
+
135
+ export function Set_toStream(self_, cycle_ = false, ff_core_Ordering_Order$T) {
136
+ return ff_core_Stream.Stream_map(ff_core_Map.Map_toStream(self_, cycle_, ff_core_Ordering_Order$T), ((_w1) => {
137
+ return _w1.first_
138
+ }))
139
+ }
140
+
141
+ export function Set_each(self_, body_, ff_core_Ordering_Order$T) {
142
+ ff_core_Map.Map_each(self_, ((k_, _) => {
143
+ body_(k_)
144
+ }), ff_core_Ordering_Order$T)
145
+ }
146
+
147
+ export function Set_eachWhile(self_, body_, ff_core_Ordering_Order$T) {
148
+ return ff_core_Map.Map_eachWhile(self_, ((k_, _) => {
149
+ return body_(k_)
150
+ }), ff_core_Ordering_Order$T)
151
+ }
152
+
153
+ export function Set_find(self_, body_, ff_core_Ordering_Order$T) {
154
+ return ff_core_Option.Option_map(ff_core_Map.Map_find(self_, ((k_, _) => {
155
+ return body_(k_)
156
+ }), ff_core_Ordering_Order$T), ((_w1) => {
157
+ return _w1.first_
158
+ }))
159
+ }
160
+
161
+ export async function Set_add$(self_, value_, ff_core_Ordering_Order$T, $task) {
162
+ return ff_core_Map.Map_add(self_, value_, (void 0), ff_core_Ordering_Order$T)
163
+ }
164
+
165
+ export async function Set_addAll$(self_, that_, ff_core_Ordering_Order$T, $task) {
166
+ return ff_core_Map.Map_addAll(self_, that_, ff_core_Ordering_Order$T)
167
+ }
168
+
169
+ export async function Set_remove$(self_, value_, ff_core_Ordering_Order$T, $task) {
170
+ return ff_core_Map.Map_remove(self_, value_, ff_core_Ordering_Order$T)
171
+ }
172
+
173
+ export async function Set_removeAll$(self_, that_, ff_core_Ordering_Order$T, $task) {
174
+ return ff_core_Map.Map_removeAll(self_, that_, ff_core_Ordering_Order$T)
175
+ }
176
+
177
+ export async function Set_contains$(self_, value_, ff_core_Ordering_Order$T, $task) {
178
+ return ff_core_Map.Map_contains(self_, value_, ff_core_Ordering_Order$T)
179
+ }
180
+
181
+ export async function Set_size$(self_, ff_core_Ordering_Order$T, $task) {
182
+ return ff_core_Map.Map_size(self_, ff_core_Ordering_Order$T)
183
+ }
184
+
185
+ export async function Set_toList$(self_, ff_core_Ordering_Order$T, $task) {
186
+ return ff_core_List.List_map(ff_core_Map.Map_toList(self_, ff_core_Ordering_Order$T), ((_w1) => {
187
+ return _w1.first_
188
+ }))
189
+ }
190
+
191
+ export async function Set_toArray$(self_, ff_core_Ordering_Order$T, $task) {
192
+ return ff_core_Array.Array_map(ff_core_Map.Map_toArray(self_, ff_core_Ordering_Order$T), ((_w1) => {
193
+ return _w1.first_
194
+ }))
195
+ }
196
+
197
+ export async function Set_toStream$(self_, cycle_ = false, ff_core_Ordering_Order$T, $task) {
198
+ return (await ff_core_Stream.Stream_map$((await ff_core_Map.Map_toStream$(self_, cycle_, ff_core_Ordering_Order$T, $task)), (async (_w1, $task) => {
199
+ return _w1.first_
200
+ }), $task))
201
+ }
202
+
203
+ export async function Set_each$(self_, body_, ff_core_Ordering_Order$T, $task) {
204
+ (await ff_core_Map.Map_each$(self_, (async (k_, _, $task) => {
205
+ (await body_(k_, $task))
206
+ }), ff_core_Ordering_Order$T, $task))
207
+ }
208
+
209
+ export async function Set_eachWhile$(self_, body_, ff_core_Ordering_Order$T, $task) {
210
+ return (await ff_core_Map.Map_eachWhile$(self_, (async (k_, _, $task) => {
211
+ return (await body_(k_, $task))
212
+ }), ff_core_Ordering_Order$T, $task))
213
+ }
214
+
215
+ export async function Set_find$(self_, body_, ff_core_Ordering_Order$T, $task) {
216
+ return ff_core_Option.Option_map((await ff_core_Map.Map_find$(self_, (async (k_, _, $task) => {
217
+ return (await body_(k_, $task))
218
+ }), ff_core_Ordering_Order$T, $task)), ((_w1) => {
219
+ return _w1.first_
220
+ }))
221
+ }
222
+
223
+ export function ff_core_Equal_Equal$ff_core_Set_Set(ff_core_Equal_Equal$A, ff_core_Ordering_Order$A) { return {
224
+ equals_(x_, y_) {
225
+ return ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_core_Equal_Equal$A).equals_(ff_core_Set.Set_toList(x_, ff_core_Ordering_Order$A), ff_core_Set.Set_toList(y_, ff_core_Ordering_Order$A))
226
+ },
227
+ async equals_$(x_, y_, $task) {
228
+ return ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_core_Equal_Equal$A).equals_(ff_core_Set.Set_toList(x_, ff_core_Ordering_Order$A), ff_core_Set.Set_toList(y_, ff_core_Ordering_Order$A))
229
+ }
230
+ }}
231
+
232
+ export function ff_core_Ordering_Order$ff_core_Set_Set(ff_core_Ordering_Order$A) { return {
233
+ compare_(x_, y_) {
234
+ return ff_core_Ordering.ff_core_Ordering_Order$ff_core_List_List(ff_core_Ordering_Order$A).compare_(ff_core_Set.Set_toList(x_, ff_core_Ordering_Order$A), ff_core_Set.Set_toList(y_, ff_core_Ordering_Order$A))
235
+ },
236
+ async compare_$(x_, y_, $task) {
237
+ return ff_core_Ordering.ff_core_Ordering_Order$ff_core_List_List(ff_core_Ordering_Order$A).compare_(ff_core_Set.Set_toList(x_, ff_core_Ordering_Order$A), ff_core_Set.Set_toList(y_, ff_core_Ordering_Order$A))
238
+ }
239
+ }}
240
+
241
+ export function ff_core_Show_Show$ff_core_Set_Set(ff_core_Show_Show$A, ff_core_Ordering_Order$A) { return {
242
+ show_(value_) {
243
+ return (ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_core_Show_Show$A).show_(ff_core_Set.Set_toList(value_, ff_core_Ordering_Order$A)) + ".toSet()")
244
+ },
245
+ async show_$(value_, $task) {
246
+ return (ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_core_Show_Show$A).show_(ff_core_Set.Set_toList(value_, ff_core_Ordering_Order$A)) + ".toSet()")
247
+ }
248
+ }}
249
+
250
+