firefly-compiler 0.4.6 → 0.4.7
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.
- package/output/js/ff/compiler/Builder.mjs +444 -444
- package/output/js/ff/compiler/Compiler.mjs +416 -416
- package/output/js/ff/compiler/Dependencies.mjs +389 -389
- package/output/js/ff/compiler/Deriver.mjs +1170 -1170
- package/output/js/ff/compiler/Dictionaries.mjs +1309 -1309
- package/output/js/ff/compiler/Environment.mjs +1015 -1015
- package/output/js/ff/compiler/Inference.mjs +4268 -4268
- package/output/js/ff/compiler/JsEmitter.mjs +5391 -5391
- package/output/js/ff/compiler/JsImporter.mjs +266 -266
- package/output/js/ff/compiler/LspHook.mjs +793 -793
- package/output/js/ff/compiler/Main.mjs +1675 -1675
- package/output/js/ff/compiler/Parser.mjs +4008 -4008
- package/output/js/ff/compiler/Patterns.mjs +927 -927
- package/output/js/ff/compiler/Resolver.mjs +2307 -2307
- package/output/js/ff/compiler/Substitution.mjs +1150 -1150
- package/output/js/ff/compiler/Syntax.mjs +12434 -12434
- package/output/js/ff/compiler/Token.mjs +3096 -3096
- package/output/js/ff/compiler/Tokenizer.mjs +593 -593
- package/output/js/ff/compiler/Unification.mjs +1752 -1752
- package/output/js/ff/compiler/Wildcards.mjs +608 -608
- package/output/js/ff/compiler/Workspace.mjs +687 -687
- package/output/js/ff/core/Any.mjs +143 -143
- package/output/js/ff/core/Array.mjs +547 -547
- package/output/js/ff/core/AssetSystem.mjs +274 -274
- package/output/js/ff/core/Atomic.mjs +154 -154
- package/output/js/ff/core/Bool.mjs +152 -152
- package/output/js/ff/core/Box.mjs +112 -112
- package/output/js/ff/core/BrowserSystem.mjs +126 -126
- package/output/js/ff/core/Buffer.mjs +395 -395
- package/output/js/ff/core/BuildSystem.mjs +296 -296
- package/output/js/ff/core/Channel.mjs +189 -189
- package/output/js/ff/core/Char.mjs +149 -149
- package/output/js/ff/core/Core.mjs +300 -300
- package/output/js/ff/core/Duration.mjs +116 -116
- package/output/js/ff/core/Equal.mjs +179 -179
- package/output/js/ff/core/Error.mjs +142 -142
- package/output/js/ff/core/FileHandle.mjs +150 -150
- package/output/js/ff/core/Float.mjs +225 -225
- package/output/js/ff/core/HttpClient.mjs +191 -191
- package/output/js/ff/core/Instant.mjs +109 -109
- package/output/js/ff/core/Int.mjs +265 -265
- package/output/js/ff/core/IntMap.mjs +280 -280
- package/output/js/ff/core/JsSystem.mjs +238 -238
- package/output/js/ff/core/JsValue.mjs +708 -708
- package/output/js/ff/core/List.mjs +2334 -2334
- package/output/js/ff/core/Lock.mjs +229 -229
- package/output/js/ff/core/Log.mjs +163 -163
- package/output/js/ff/core/Map.mjs +362 -362
- package/output/js/ff/core/NodeSystem.mjs +294 -294
- package/output/js/ff/core/Nothing.mjs +104 -104
- package/output/js/ff/core/Option.mjs +1015 -1015
- package/output/js/ff/core/Ordering.mjs +730 -730
- package/output/js/ff/core/Pair.mjs +331 -331
- package/output/js/ff/core/Path.mjs +545 -545
- package/output/js/ff/core/RbMap.mjs +1940 -1940
- package/output/js/ff/core/Serializable.mjs +428 -428
- package/output/js/ff/core/Set.mjs +254 -254
- package/output/js/ff/core/Show.mjs +205 -205
- package/output/js/ff/core/SourceLocation.mjs +229 -229
- package/output/js/ff/core/Stack.mjs +529 -529
- package/output/js/ff/core/Stream.mjs +1304 -1304
- package/output/js/ff/core/String.mjs +365 -365
- package/output/js/ff/core/StringMap.mjs +280 -280
- package/output/js/ff/core/Task.mjs +320 -320
- package/output/js/ff/core/Try.mjs +507 -507
- package/output/js/ff/core/Unit.mjs +151 -151
- package/package.json +1 -1
- package/vscode/package.json +1 -1
|
@@ -1,365 +1,365 @@
|
|
|
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_Box from "../../ff/core/Box.mjs"
|
|
14
|
-
|
|
15
|
-
import * as ff_core_BrowserSystem from "../../ff/core/BrowserSystem.mjs"
|
|
16
|
-
|
|
17
|
-
import * as ff_core_Buffer from "../../ff/core/Buffer.mjs"
|
|
18
|
-
|
|
19
|
-
import * as ff_core_BuildSystem from "../../ff/core/BuildSystem.mjs"
|
|
20
|
-
|
|
21
|
-
import * as ff_core_Channel from "../../ff/core/Channel.mjs"
|
|
22
|
-
|
|
23
|
-
import * as ff_core_Char from "../../ff/core/Char.mjs"
|
|
24
|
-
|
|
25
|
-
import * as ff_core_Core from "../../ff/core/Core.mjs"
|
|
26
|
-
|
|
27
|
-
import * as ff_core_Duration from "../../ff/core/Duration.mjs"
|
|
28
|
-
|
|
29
|
-
import * as ff_core_Equal from "../../ff/core/Equal.mjs"
|
|
30
|
-
|
|
31
|
-
import * as ff_core_Error from "../../ff/core/Error.mjs"
|
|
32
|
-
|
|
33
|
-
import * as ff_core_FileHandle from "../../ff/core/FileHandle.mjs"
|
|
34
|
-
|
|
35
|
-
import * as ff_core_Float from "../../ff/core/Float.mjs"
|
|
36
|
-
|
|
37
|
-
import * as ff_core_HttpClient from "../../ff/core/HttpClient.mjs"
|
|
38
|
-
|
|
39
|
-
import * as ff_core_Instant from "../../ff/core/Instant.mjs"
|
|
40
|
-
|
|
41
|
-
import * as ff_core_Int from "../../ff/core/Int.mjs"
|
|
42
|
-
|
|
43
|
-
import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
|
|
44
|
-
|
|
45
|
-
import * as ff_core_JsSystem from "../../ff/core/JsSystem.mjs"
|
|
46
|
-
|
|
47
|
-
import * as ff_core_JsValue from "../../ff/core/JsValue.mjs"
|
|
48
|
-
|
|
49
|
-
import * as ff_core_List from "../../ff/core/List.mjs"
|
|
50
|
-
|
|
51
|
-
import * as ff_core_Lock from "../../ff/core/Lock.mjs"
|
|
52
|
-
|
|
53
|
-
import * as ff_core_Log from "../../ff/core/Log.mjs"
|
|
54
|
-
|
|
55
|
-
import * as ff_core_Map from "../../ff/core/Map.mjs"
|
|
56
|
-
|
|
57
|
-
import * as ff_core_NodeSystem from "../../ff/core/NodeSystem.mjs"
|
|
58
|
-
|
|
59
|
-
import * as ff_core_Nothing from "../../ff/core/Nothing.mjs"
|
|
60
|
-
|
|
61
|
-
import * as ff_core_Option from "../../ff/core/Option.mjs"
|
|
62
|
-
|
|
63
|
-
import * as ff_core_Ordering from "../../ff/core/Ordering.mjs"
|
|
64
|
-
|
|
65
|
-
import * as ff_core_Pair from "../../ff/core/Pair.mjs"
|
|
66
|
-
|
|
67
|
-
import * as ff_core_Path from "../../ff/core/Path.mjs"
|
|
68
|
-
|
|
69
|
-
import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
|
|
70
|
-
|
|
71
|
-
import * as ff_core_Set from "../../ff/core/Set.mjs"
|
|
72
|
-
|
|
73
|
-
import * as ff_core_Show from "../../ff/core/Show.mjs"
|
|
74
|
-
|
|
75
|
-
import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
|
|
76
|
-
|
|
77
|
-
import * as ff_core_Stack from "../../ff/core/Stack.mjs"
|
|
78
|
-
|
|
79
|
-
import * as ff_core_Stream from "../../ff/core/Stream.mjs"
|
|
80
|
-
|
|
81
|
-
import * as ff_core_String from "../../ff/core/String.mjs"
|
|
82
|
-
|
|
83
|
-
import * as ff_core_StringMap from "../../ff/core/StringMap.mjs"
|
|
84
|
-
|
|
85
|
-
import * as ff_core_Task from "../../ff/core/Task.mjs"
|
|
86
|
-
|
|
87
|
-
import * as ff_core_Try from "../../ff/core/Try.mjs"
|
|
88
|
-
|
|
89
|
-
import * as ff_core_Unit from "../../ff/core/Unit.mjs"
|
|
90
|
-
|
|
91
|
-
// type Stack
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
export function make_() {
|
|
97
|
-
return {array: []}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export function fill_(size_, value_) {
|
|
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_Box from "../../ff/core/Box.mjs"
|
|
14
|
+
|
|
15
|
+
import * as ff_core_BrowserSystem from "../../ff/core/BrowserSystem.mjs"
|
|
16
|
+
|
|
17
|
+
import * as ff_core_Buffer from "../../ff/core/Buffer.mjs"
|
|
18
|
+
|
|
19
|
+
import * as ff_core_BuildSystem from "../../ff/core/BuildSystem.mjs"
|
|
20
|
+
|
|
21
|
+
import * as ff_core_Channel from "../../ff/core/Channel.mjs"
|
|
22
|
+
|
|
23
|
+
import * as ff_core_Char from "../../ff/core/Char.mjs"
|
|
24
|
+
|
|
25
|
+
import * as ff_core_Core from "../../ff/core/Core.mjs"
|
|
26
|
+
|
|
27
|
+
import * as ff_core_Duration from "../../ff/core/Duration.mjs"
|
|
28
|
+
|
|
29
|
+
import * as ff_core_Equal from "../../ff/core/Equal.mjs"
|
|
30
|
+
|
|
31
|
+
import * as ff_core_Error from "../../ff/core/Error.mjs"
|
|
32
|
+
|
|
33
|
+
import * as ff_core_FileHandle from "../../ff/core/FileHandle.mjs"
|
|
34
|
+
|
|
35
|
+
import * as ff_core_Float from "../../ff/core/Float.mjs"
|
|
36
|
+
|
|
37
|
+
import * as ff_core_HttpClient from "../../ff/core/HttpClient.mjs"
|
|
38
|
+
|
|
39
|
+
import * as ff_core_Instant from "../../ff/core/Instant.mjs"
|
|
40
|
+
|
|
41
|
+
import * as ff_core_Int from "../../ff/core/Int.mjs"
|
|
42
|
+
|
|
43
|
+
import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
|
|
44
|
+
|
|
45
|
+
import * as ff_core_JsSystem from "../../ff/core/JsSystem.mjs"
|
|
46
|
+
|
|
47
|
+
import * as ff_core_JsValue from "../../ff/core/JsValue.mjs"
|
|
48
|
+
|
|
49
|
+
import * as ff_core_List from "../../ff/core/List.mjs"
|
|
50
|
+
|
|
51
|
+
import * as ff_core_Lock from "../../ff/core/Lock.mjs"
|
|
52
|
+
|
|
53
|
+
import * as ff_core_Log from "../../ff/core/Log.mjs"
|
|
54
|
+
|
|
55
|
+
import * as ff_core_Map from "../../ff/core/Map.mjs"
|
|
56
|
+
|
|
57
|
+
import * as ff_core_NodeSystem from "../../ff/core/NodeSystem.mjs"
|
|
58
|
+
|
|
59
|
+
import * as ff_core_Nothing from "../../ff/core/Nothing.mjs"
|
|
60
|
+
|
|
61
|
+
import * as ff_core_Option from "../../ff/core/Option.mjs"
|
|
62
|
+
|
|
63
|
+
import * as ff_core_Ordering from "../../ff/core/Ordering.mjs"
|
|
64
|
+
|
|
65
|
+
import * as ff_core_Pair from "../../ff/core/Pair.mjs"
|
|
66
|
+
|
|
67
|
+
import * as ff_core_Path from "../../ff/core/Path.mjs"
|
|
68
|
+
|
|
69
|
+
import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
|
|
70
|
+
|
|
71
|
+
import * as ff_core_Set from "../../ff/core/Set.mjs"
|
|
72
|
+
|
|
73
|
+
import * as ff_core_Show from "../../ff/core/Show.mjs"
|
|
74
|
+
|
|
75
|
+
import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
|
|
76
|
+
|
|
77
|
+
import * as ff_core_Stack from "../../ff/core/Stack.mjs"
|
|
78
|
+
|
|
79
|
+
import * as ff_core_Stream from "../../ff/core/Stream.mjs"
|
|
80
|
+
|
|
81
|
+
import * as ff_core_String from "../../ff/core/String.mjs"
|
|
82
|
+
|
|
83
|
+
import * as ff_core_StringMap from "../../ff/core/StringMap.mjs"
|
|
84
|
+
|
|
85
|
+
import * as ff_core_Task from "../../ff/core/Task.mjs"
|
|
86
|
+
|
|
87
|
+
import * as ff_core_Try from "../../ff/core/Try.mjs"
|
|
88
|
+
|
|
89
|
+
import * as ff_core_Unit from "../../ff/core/Unit.mjs"
|
|
90
|
+
|
|
91
|
+
// type Stack
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
export function make_() {
|
|
97
|
+
return {array: []}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function fill_(size_, value_) {
|
|
101
101
|
|
|
102
102
|
return {array: new Array(size_).fill(value_)};
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export function fillBy_(size_, body_) {
|
|
103
|
+
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function fillBy_(size_, body_) {
|
|
107
107
|
|
|
108
108
|
return {array: Array.from({length: size_}, (_, i) => body_(i))};
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
export function range_(size_) {
|
|
109
|
+
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function range_(size_) {
|
|
113
113
|
|
|
114
114
|
return {array: Array.from({length: size_}, (_, i) => i)};
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export function sortRange_(stack_, compare_, start_, end_) {
|
|
119
|
-
if(((end_ - start_) < 2)) {
|
|
120
|
-
|
|
121
|
-
} else {
|
|
122
|
-
let middle_ = (start_ + ((end_ - start_) / 2));
|
|
123
|
-
ff_core_Stack.sortRange_(stack_, compare_, start_, middle_);
|
|
124
|
-
ff_core_Stack.sortRange_(stack_, compare_, middle_, end_);
|
|
125
|
-
let i_ = start_;
|
|
126
|
-
let j_ = middle_;
|
|
127
|
-
while(((i_ < middle_) && (j_ < end_))) {
|
|
128
|
-
if((compare_(ff_core_Stack.Stack_grab(stack_, i_), ff_core_Stack.Stack_grab(stack_, j_)) !== ff_core_Ordering.OrderingAfter())) {
|
|
129
|
-
i_ += 1
|
|
130
|
-
} else {
|
|
131
|
-
const value_ = ff_core_Stack.Stack_grab(stack_, j_);
|
|
132
|
-
let k_ = j_;
|
|
133
|
-
while((k_ > i_)) {
|
|
134
|
-
ff_core_Stack.Stack_set(stack_, k_, ff_core_Stack.Stack_grab(stack_, (k_ - 1)));
|
|
135
|
-
k_ -= 1
|
|
136
|
-
};
|
|
137
|
-
ff_core_Stack.Stack_set(stack_, i_, value_);
|
|
138
|
-
i_ += 1;
|
|
139
|
-
middle_ += 1;
|
|
140
|
-
j_ += 1
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
export async function make_$($task) {
|
|
147
|
-
throw new Error('Function make is missing on this target in async context.');
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
export async function fill_$(size_, value_, $task) {
|
|
151
|
-
throw new Error('Function fill is missing on this target in async context.');
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export async function fillBy_$(size_, body_, $task) {
|
|
155
|
-
throw new Error('Function fillBy is missing on this target in async context.');
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
export async function range_$(size_, $task) {
|
|
159
|
-
throw new Error('Function range is missing on this target in async context.');
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export async function sortRange_$(stack_, compare_, start_, end_, $task) {
|
|
163
|
-
if(((end_ - start_) < 2)) {
|
|
164
|
-
|
|
165
|
-
} else {
|
|
166
|
-
let middle_ = (start_ + ((end_ - start_) / 2));
|
|
167
|
-
(await ff_core_Stack.sortRange_$(stack_, compare_, start_, middle_, $task));
|
|
168
|
-
(await ff_core_Stack.sortRange_$(stack_, compare_, middle_, end_, $task));
|
|
169
|
-
let i_ = start_;
|
|
170
|
-
let j_ = middle_;
|
|
171
|
-
while(((i_ < middle_) && (j_ < end_))) {
|
|
172
|
-
if(((await compare_(ff_core_Stack.Stack_grab(stack_, i_), ff_core_Stack.Stack_grab(stack_, j_), $task)) !== ff_core_Ordering.OrderingAfter())) {
|
|
173
|
-
i_ += 1
|
|
174
|
-
} else {
|
|
175
|
-
const value_ = ff_core_Stack.Stack_grab(stack_, j_);
|
|
176
|
-
let k_ = j_;
|
|
177
|
-
while((k_ > i_)) {
|
|
178
|
-
ff_core_Stack.Stack_set(stack_, k_, ff_core_Stack.Stack_grab(stack_, (k_ - 1)));
|
|
179
|
-
k_ -= 1
|
|
180
|
-
};
|
|
181
|
-
ff_core_Stack.Stack_set(stack_, i_, value_);
|
|
182
|
-
i_ += 1;
|
|
183
|
-
middle_ += 1;
|
|
184
|
-
j_ += 1
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
export function Stack_isEmpty(self_) {
|
|
191
|
-
return self_.array.length === 0
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
export function Stack_size(self_) {
|
|
195
|
-
return self_.array.length
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
export function Stack_get(self_, index_) {
|
|
115
|
+
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function sortRange_(stack_, compare_, start_, end_) {
|
|
119
|
+
if(((end_ - start_) < 2)) {
|
|
120
|
+
|
|
121
|
+
} else {
|
|
122
|
+
let middle_ = (start_ + ((end_ - start_) / 2));
|
|
123
|
+
ff_core_Stack.sortRange_(stack_, compare_, start_, middle_);
|
|
124
|
+
ff_core_Stack.sortRange_(stack_, compare_, middle_, end_);
|
|
125
|
+
let i_ = start_;
|
|
126
|
+
let j_ = middle_;
|
|
127
|
+
while(((i_ < middle_) && (j_ < end_))) {
|
|
128
|
+
if((compare_(ff_core_Stack.Stack_grab(stack_, i_), ff_core_Stack.Stack_grab(stack_, j_)) !== ff_core_Ordering.OrderingAfter())) {
|
|
129
|
+
i_ += 1
|
|
130
|
+
} else {
|
|
131
|
+
const value_ = ff_core_Stack.Stack_grab(stack_, j_);
|
|
132
|
+
let k_ = j_;
|
|
133
|
+
while((k_ > i_)) {
|
|
134
|
+
ff_core_Stack.Stack_set(stack_, k_, ff_core_Stack.Stack_grab(stack_, (k_ - 1)));
|
|
135
|
+
k_ -= 1
|
|
136
|
+
};
|
|
137
|
+
ff_core_Stack.Stack_set(stack_, i_, value_);
|
|
138
|
+
i_ += 1;
|
|
139
|
+
middle_ += 1;
|
|
140
|
+
j_ += 1
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export async function make_$($task) {
|
|
147
|
+
throw new Error('Function make is missing on this target in async context.');
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export async function fill_$(size_, value_, $task) {
|
|
151
|
+
throw new Error('Function fill is missing on this target in async context.');
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export async function fillBy_$(size_, body_, $task) {
|
|
155
|
+
throw new Error('Function fillBy is missing on this target in async context.');
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export async function range_$(size_, $task) {
|
|
159
|
+
throw new Error('Function range is missing on this target in async context.');
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export async function sortRange_$(stack_, compare_, start_, end_, $task) {
|
|
163
|
+
if(((end_ - start_) < 2)) {
|
|
164
|
+
|
|
165
|
+
} else {
|
|
166
|
+
let middle_ = (start_ + ((end_ - start_) / 2));
|
|
167
|
+
(await ff_core_Stack.sortRange_$(stack_, compare_, start_, middle_, $task));
|
|
168
|
+
(await ff_core_Stack.sortRange_$(stack_, compare_, middle_, end_, $task));
|
|
169
|
+
let i_ = start_;
|
|
170
|
+
let j_ = middle_;
|
|
171
|
+
while(((i_ < middle_) && (j_ < end_))) {
|
|
172
|
+
if(((await compare_(ff_core_Stack.Stack_grab(stack_, i_), ff_core_Stack.Stack_grab(stack_, j_), $task)) !== ff_core_Ordering.OrderingAfter())) {
|
|
173
|
+
i_ += 1
|
|
174
|
+
} else {
|
|
175
|
+
const value_ = ff_core_Stack.Stack_grab(stack_, j_);
|
|
176
|
+
let k_ = j_;
|
|
177
|
+
while((k_ > i_)) {
|
|
178
|
+
ff_core_Stack.Stack_set(stack_, k_, ff_core_Stack.Stack_grab(stack_, (k_ - 1)));
|
|
179
|
+
k_ -= 1
|
|
180
|
+
};
|
|
181
|
+
ff_core_Stack.Stack_set(stack_, i_, value_);
|
|
182
|
+
i_ += 1;
|
|
183
|
+
middle_ += 1;
|
|
184
|
+
j_ += 1
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export function Stack_isEmpty(self_) {
|
|
191
|
+
return self_.array.length === 0
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export function Stack_size(self_) {
|
|
195
|
+
return self_.array.length
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export function Stack_get(self_, index_) {
|
|
199
199
|
|
|
200
200
|
return index_ >= 0 && index_ < self_.array.length
|
|
201
201
|
? ff_core_Option.Some(self_.array[index_])
|
|
202
202
|
: ff_core_Option.None()
|
|
203
|
-
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
export function Stack_grab(self_, index_) {
|
|
203
|
+
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export function Stack_grab(self_, index_) {
|
|
207
207
|
|
|
208
208
|
if(index_ < 0 || index_ >= self_.array.length) {
|
|
209
209
|
ff_core_Try.internalThrowGrabException_()
|
|
210
210
|
}
|
|
211
211
|
return self_.array[index_]
|
|
212
|
-
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
export function Stack_grabFirst(self_) {
|
|
216
|
-
return ff_core_Stack.Stack_grab(self_, 0)
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
export function Stack_grabLast(self_) {
|
|
220
|
-
return ff_core_Stack.Stack_grab(self_, (ff_core_Stack.Stack_size(self_) - 1))
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
export function Stack_first(self_) {
|
|
212
|
+
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export function Stack_grabFirst(self_) {
|
|
216
|
+
return ff_core_Stack.Stack_grab(self_, 0)
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export function Stack_grabLast(self_) {
|
|
220
|
+
return ff_core_Stack.Stack_grab(self_, (ff_core_Stack.Stack_size(self_) - 1))
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export function Stack_first(self_) {
|
|
224
224
|
|
|
225
225
|
return self_.array.length > 0
|
|
226
226
|
? ff_core_Option.Some(self_.array[0])
|
|
227
227
|
: ff_core_Option.None()
|
|
228
|
-
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
export function Stack_last(self_) {
|
|
228
|
+
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export function Stack_last(self_) {
|
|
232
232
|
|
|
233
233
|
return self_.array.length > 0
|
|
234
234
|
? ff_core_Option.Some(self_.array[self_.array.length - 1])
|
|
235
235
|
: ff_core_Option.None()
|
|
236
|
-
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
export function Stack_push(self_, value_) {
|
|
240
|
-
self_.array.push(value_)
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
export function Stack_pushAll(self_, value_) {
|
|
244
|
-
self_.array.push(...value_.array)
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
export function Stack_pushArray(self_, value_) {
|
|
248
|
-
self_.array.push(...value_)
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
export function Stack_pop(self_) {
|
|
236
|
+
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export function Stack_push(self_, value_) {
|
|
240
|
+
self_.array.push(value_)
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export function Stack_pushAll(self_, value_) {
|
|
244
|
+
self_.array.push(...value_.array)
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export function Stack_pushArray(self_, value_) {
|
|
248
|
+
self_.array.push(...value_)
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export function Stack_pop(self_) {
|
|
252
252
|
|
|
253
253
|
return self_.array.length > 0
|
|
254
254
|
? ff_core_Option.Some(self_.array.pop())
|
|
255
255
|
: ff_core_Option.None()
|
|
256
|
-
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
export function Stack_set(self_, index_, value_) {
|
|
256
|
+
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export function Stack_set(self_, index_, value_) {
|
|
260
260
|
|
|
261
261
|
if(index_ < 0 || index_ > self_.array.length) {
|
|
262
262
|
ff_core_Try.internalThrowGrabException_()
|
|
263
263
|
}
|
|
264
264
|
self_.array[index_] = value_
|
|
265
|
-
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
export function Stack_modify(self_, index_, body_) {
|
|
265
|
+
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
export function Stack_modify(self_, index_, body_) {
|
|
269
269
|
|
|
270
270
|
if(index_ < 0 || index_ >= self_.array.length) {
|
|
271
271
|
ff_core_Try.internalThrowGrabException_()
|
|
272
272
|
}
|
|
273
273
|
self_.array[index_] = body_(self_.array[index_])
|
|
274
|
-
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
export function Stack_fill(self_, value_, start_ = 0, end_ = 9007199254740991) {
|
|
274
|
+
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export function Stack_fill(self_, value_, start_ = 0, end_ = 9007199254740991) {
|
|
278
278
|
|
|
279
279
|
self_.array.fill(value_, start_, end_);
|
|
280
|
-
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
export function Stack_copy(self_, target_, start_, end_) {
|
|
280
|
+
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export function Stack_copy(self_, target_, start_, end_) {
|
|
284
284
|
|
|
285
285
|
self_.array.copyWithin(target_, start_, end_);
|
|
286
|
-
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
export function Stack_delete(self_, start_, deleteCount_) {
|
|
286
|
+
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
export function Stack_delete(self_, start_, deleteCount_) {
|
|
290
290
|
|
|
291
291
|
self_.array.splice(start_, deleteCount_);
|
|
292
|
-
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
export function Stack_insert(self_, start_, value_, deleteCount_ = 0) {
|
|
292
|
+
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export function Stack_insert(self_, start_, value_, deleteCount_ = 0) {
|
|
296
296
|
|
|
297
297
|
self_.array.splice(start_, deleteCount_, value_);
|
|
298
|
-
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
export function Stack_insertAll(self_, start_, value_, deleteCount_ = 0) {
|
|
298
|
+
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export function Stack_insertAll(self_, start_, value_, deleteCount_ = 0) {
|
|
302
302
|
|
|
303
303
|
self_.array.splice(start_, deleteCount_, ...value_.array);
|
|
304
|
-
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
export function Stack_insertArray(self_, start_, value_, deleteCount_ = 0) {
|
|
304
|
+
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export function Stack_insertArray(self_, start_, value_, deleteCount_ = 0) {
|
|
308
308
|
|
|
309
309
|
self_.array.splice(start_, deleteCount_, ...value_);
|
|
310
|
-
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
export function Stack_each(self_, body_) {
|
|
310
|
+
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export function Stack_each(self_, body_) {
|
|
314
314
|
|
|
315
315
|
return self_.array.forEach(body_);
|
|
316
|
-
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
export function Stack_eachWhile(self_, body_) {
|
|
320
|
-
for(const value of self_.array) if(!body_(value)) break
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
export function Stack_all(self_, body_) {
|
|
324
|
-
let result_ = true;
|
|
325
|
-
ff_core_Stack.Stack_eachWhile(self_, ((x_) => {
|
|
326
|
-
result_ = body_(x_);
|
|
327
|
-
return result_
|
|
328
|
-
}));
|
|
329
|
-
return result_
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
export function Stack_any(self_, body_) {
|
|
333
|
-
let result_ = false;
|
|
334
|
-
ff_core_Stack.Stack_eachWhile(self_, ((x_) => {
|
|
335
|
-
result_ = body_(x_);
|
|
336
|
-
return (!result_)
|
|
337
|
-
}));
|
|
338
|
-
return result_
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
export function Stack_indexWhere(self_, body_) {
|
|
342
|
-
let i_ = (-1);
|
|
343
|
-
let result_ = false;
|
|
344
|
-
ff_core_Stack.Stack_eachWhile(self_, ((x_) => {
|
|
345
|
-
i_ += 1;
|
|
346
|
-
result_ = body_(x_);
|
|
347
|
-
return (!result_)
|
|
348
|
-
}));
|
|
349
|
-
if(result_) {
|
|
350
|
-
return ff_core_Option.Some(i_)
|
|
351
|
-
} else return ff_core_Option.None()
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
export function Stack_drain(self_) {
|
|
355
|
-
const result = self_.array; self_.array = []; return result
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
export function Stack_toArray(self_, start_ = 0, end_ = 9007199254740991) {
|
|
359
|
-
return self_.array.slice(start_, end_)
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
export function Stack_toList(self_, start_ = 0, end_ = 9007199254740991) {
|
|
316
|
+
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export function Stack_eachWhile(self_, body_) {
|
|
320
|
+
for(const value of self_.array) if(!body_(value)) break
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
export function Stack_all(self_, body_) {
|
|
324
|
+
let result_ = true;
|
|
325
|
+
ff_core_Stack.Stack_eachWhile(self_, ((x_) => {
|
|
326
|
+
result_ = body_(x_);
|
|
327
|
+
return result_
|
|
328
|
+
}));
|
|
329
|
+
return result_
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export function Stack_any(self_, body_) {
|
|
333
|
+
let result_ = false;
|
|
334
|
+
ff_core_Stack.Stack_eachWhile(self_, ((x_) => {
|
|
335
|
+
result_ = body_(x_);
|
|
336
|
+
return (!result_)
|
|
337
|
+
}));
|
|
338
|
+
return result_
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
export function Stack_indexWhere(self_, body_) {
|
|
342
|
+
let i_ = (-1);
|
|
343
|
+
let result_ = false;
|
|
344
|
+
ff_core_Stack.Stack_eachWhile(self_, ((x_) => {
|
|
345
|
+
i_ += 1;
|
|
346
|
+
result_ = body_(x_);
|
|
347
|
+
return (!result_)
|
|
348
|
+
}));
|
|
349
|
+
if(result_) {
|
|
350
|
+
return ff_core_Option.Some(i_)
|
|
351
|
+
} else return ff_core_Option.None()
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export function Stack_drain(self_) {
|
|
355
|
+
const result = self_.array; self_.array = []; return result
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
export function Stack_toArray(self_, start_ = 0, end_ = 9007199254740991) {
|
|
359
|
+
return self_.array.slice(start_, end_)
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
export function Stack_toList(self_, start_ = 0, end_ = 9007199254740991) {
|
|
363
363
|
|
|
364
364
|
if(start_ < 0) start_ = self_.array.length + start_
|
|
365
365
|
if(end_ < 0) end_ = self_.array.length + start_
|
|
@@ -370,230 +370,230 @@ export function Stack_toList(self_, start_ = 0, end_ = 9007199254740991) {
|
|
|
370
370
|
result = ff_core_List.Link(self_.array[i], result);
|
|
371
371
|
}
|
|
372
372
|
return result;
|
|
373
|
-
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
export function Stack_toStream(self_, start_ = 0, end_ = 9007199254740991) {
|
|
377
|
-
return ff_core_Array.Array_toStream(ff_core_Stack.Stack_toArray(self_, start_, end_), false)
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
export function Stack_reverse(self_) {
|
|
381
|
-
self_.array.reverse()
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
export function Stack_sortBy(self_, body_, ff_core_Ordering_Order$S) {
|
|
385
|
-
ff_core_Stack.Stack_sortWith(self_, ((_w1, _w2) => {
|
|
386
|
-
return ff_core_Ordering_Order$S.compare_(body_(_w1), body_(_w2))
|
|
387
|
-
}))
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
export function Stack_sortWith(self_, ordering_) {
|
|
391
|
-
self_.array.sort((x, y) => ff_core_Ordering.Ordering_toInt(ordering_(x, y)))
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
export async function Stack_isEmpty$(self_, $task) {
|
|
395
|
-
throw new Error('Function Stack_isEmpty is missing on this target in async context.');
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
export async function Stack_size$(self_, $task) {
|
|
399
|
-
throw new Error('Function Stack_size is missing on this target in async context.');
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
export async function Stack_get$(self_, index_, $task) {
|
|
403
|
-
throw new Error('Function Stack_get is missing on this target in async context.');
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
export async function Stack_grab$(self_, index_, $task) {
|
|
407
|
-
throw new Error('Function Stack_grab is missing on this target in async context.');
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
export async function Stack_grabFirst$(self_, $task) {
|
|
411
|
-
return ff_core_Stack.Stack_grab(self_, 0)
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
export async function Stack_grabLast$(self_, $task) {
|
|
415
|
-
return ff_core_Stack.Stack_grab(self_, (ff_core_Stack.Stack_size(self_) - 1))
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
export async function Stack_first$(self_, $task) {
|
|
419
|
-
throw new Error('Function Stack_first is missing on this target in async context.');
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
export async function Stack_last$(self_, $task) {
|
|
423
|
-
throw new Error('Function Stack_last is missing on this target in async context.');
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
export async function Stack_push$(self_, value_, $task) {
|
|
427
|
-
throw new Error('Function Stack_push is missing on this target in async context.');
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
export async function Stack_pushAll$(self_, value_, $task) {
|
|
431
|
-
throw new Error('Function Stack_pushAll is missing on this target in async context.');
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
export async function Stack_pushArray$(self_, value_, $task) {
|
|
435
|
-
throw new Error('Function Stack_pushArray is missing on this target in async context.');
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
export async function Stack_pop$(self_, $task) {
|
|
439
|
-
throw new Error('Function Stack_pop is missing on this target in async context.');
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
export async function Stack_set$(self_, index_, value_, $task) {
|
|
443
|
-
throw new Error('Function Stack_set is missing on this target in async context.');
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
export async function Stack_modify$(self_, index_, body_, $task) {
|
|
373
|
+
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
export function Stack_toStream(self_, start_ = 0, end_ = 9007199254740991) {
|
|
377
|
+
return ff_core_Array.Array_toStream(ff_core_Stack.Stack_toArray(self_, start_, end_), false)
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
export function Stack_reverse(self_) {
|
|
381
|
+
self_.array.reverse()
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
export function Stack_sortBy(self_, body_, ff_core_Ordering_Order$S) {
|
|
385
|
+
ff_core_Stack.Stack_sortWith(self_, ((_w1, _w2) => {
|
|
386
|
+
return ff_core_Ordering_Order$S.compare_(body_(_w1), body_(_w2))
|
|
387
|
+
}))
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
export function Stack_sortWith(self_, ordering_) {
|
|
391
|
+
self_.array.sort((x, y) => ff_core_Ordering.Ordering_toInt(ordering_(x, y)))
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
export async function Stack_isEmpty$(self_, $task) {
|
|
395
|
+
throw new Error('Function Stack_isEmpty is missing on this target in async context.');
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export async function Stack_size$(self_, $task) {
|
|
399
|
+
throw new Error('Function Stack_size is missing on this target in async context.');
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
export async function Stack_get$(self_, index_, $task) {
|
|
403
|
+
throw new Error('Function Stack_get is missing on this target in async context.');
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
export async function Stack_grab$(self_, index_, $task) {
|
|
407
|
+
throw new Error('Function Stack_grab is missing on this target in async context.');
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
export async function Stack_grabFirst$(self_, $task) {
|
|
411
|
+
return ff_core_Stack.Stack_grab(self_, 0)
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
export async function Stack_grabLast$(self_, $task) {
|
|
415
|
+
return ff_core_Stack.Stack_grab(self_, (ff_core_Stack.Stack_size(self_) - 1))
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
export async function Stack_first$(self_, $task) {
|
|
419
|
+
throw new Error('Function Stack_first is missing on this target in async context.');
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
export async function Stack_last$(self_, $task) {
|
|
423
|
+
throw new Error('Function Stack_last is missing on this target in async context.');
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
export async function Stack_push$(self_, value_, $task) {
|
|
427
|
+
throw new Error('Function Stack_push is missing on this target in async context.');
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
export async function Stack_pushAll$(self_, value_, $task) {
|
|
431
|
+
throw new Error('Function Stack_pushAll is missing on this target in async context.');
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
export async function Stack_pushArray$(self_, value_, $task) {
|
|
435
|
+
throw new Error('Function Stack_pushArray is missing on this target in async context.');
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
export async function Stack_pop$(self_, $task) {
|
|
439
|
+
throw new Error('Function Stack_pop is missing on this target in async context.');
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
export async function Stack_set$(self_, index_, value_, $task) {
|
|
443
|
+
throw new Error('Function Stack_set is missing on this target in async context.');
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
export async function Stack_modify$(self_, index_, body_, $task) {
|
|
447
447
|
|
|
448
448
|
if(index_ < 0 || index_ >= self_.array.length) {
|
|
449
449
|
ff_core_Try.internalThrowGrabException_()
|
|
450
450
|
}
|
|
451
451
|
self_.array[index_] = await body_(self_.array[index_], $task)
|
|
452
|
-
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
export async function Stack_fill$(self_, value_, start_ = 0, end_ = 9007199254740991, $task) {
|
|
456
|
-
throw new Error('Function Stack_fill is missing on this target in async context.');
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
export async function Stack_copy$(self_, target_, start_, end_, $task) {
|
|
460
|
-
throw new Error('Function Stack_copy is missing on this target in async context.');
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
export async function Stack_delete$(self_, start_, deleteCount_, $task) {
|
|
464
|
-
throw new Error('Function Stack_delete is missing on this target in async context.');
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
export async function Stack_insert$(self_, start_, value_, deleteCount_ = 0, $task) {
|
|
468
|
-
throw new Error('Function Stack_insert is missing on this target in async context.');
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
export async function Stack_insertAll$(self_, start_, value_, deleteCount_ = 0, $task) {
|
|
472
|
-
throw new Error('Function Stack_insertAll is missing on this target in async context.');
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
export async function Stack_insertArray$(self_, start_, value_, deleteCount_ = 0, $task) {
|
|
476
|
-
throw new Error('Function Stack_insertArray is missing on this target in async context.');
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
export async function Stack_each$(self_, body_, $task) {
|
|
452
|
+
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
export async function Stack_fill$(self_, value_, start_ = 0, end_ = 9007199254740991, $task) {
|
|
456
|
+
throw new Error('Function Stack_fill is missing on this target in async context.');
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
export async function Stack_copy$(self_, target_, start_, end_, $task) {
|
|
460
|
+
throw new Error('Function Stack_copy is missing on this target in async context.');
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
export async function Stack_delete$(self_, start_, deleteCount_, $task) {
|
|
464
|
+
throw new Error('Function Stack_delete is missing on this target in async context.');
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
export async function Stack_insert$(self_, start_, value_, deleteCount_ = 0, $task) {
|
|
468
|
+
throw new Error('Function Stack_insert is missing on this target in async context.');
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
export async function Stack_insertAll$(self_, start_, value_, deleteCount_ = 0, $task) {
|
|
472
|
+
throw new Error('Function Stack_insertAll is missing on this target in async context.');
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
export async function Stack_insertArray$(self_, start_, value_, deleteCount_ = 0, $task) {
|
|
476
|
+
throw new Error('Function Stack_insertArray is missing on this target in async context.');
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
export async function Stack_each$(self_, body_, $task) {
|
|
480
480
|
|
|
481
481
|
for(let i = 0; i < self_.array.length; i++) {
|
|
482
482
|
await body_(self_.array[i], $task)
|
|
483
483
|
}
|
|
484
|
-
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
export async function Stack_eachWhile$(self_, body_, $task) {
|
|
488
|
-
for(const value of self_.array) if(!await body_(value, $task)) break
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
export async function Stack_all$(self_, body_, $task) {
|
|
492
|
-
let result_ = true;
|
|
493
|
-
(await ff_core_Stack.Stack_eachWhile$(self_, (async (x_, $task) => {
|
|
494
|
-
result_ = (await body_(x_, $task));
|
|
495
|
-
return result_
|
|
496
|
-
}), $task));
|
|
497
|
-
return result_
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
export async function Stack_any$(self_, body_, $task) {
|
|
501
|
-
let result_ = false;
|
|
502
|
-
(await ff_core_Stack.Stack_eachWhile$(self_, (async (x_, $task) => {
|
|
503
|
-
result_ = (await body_(x_, $task));
|
|
504
|
-
return (!result_)
|
|
505
|
-
}), $task));
|
|
506
|
-
return result_
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
export async function Stack_indexWhere$(self_, body_, $task) {
|
|
510
|
-
let i_ = (-1);
|
|
511
|
-
let result_ = false;
|
|
512
|
-
(await ff_core_Stack.Stack_eachWhile$(self_, (async (x_, $task) => {
|
|
513
|
-
i_ += 1;
|
|
514
|
-
result_ = (await body_(x_, $task));
|
|
515
|
-
return (!result_)
|
|
516
|
-
}), $task));
|
|
517
|
-
if(result_) {
|
|
518
|
-
return ff_core_Option.Some(i_)
|
|
519
|
-
} else return ff_core_Option.None()
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
export async function Stack_drain$(self_, $task) {
|
|
523
|
-
throw new Error('Function Stack_drain is missing on this target in async context.');
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
export async function Stack_toArray$(self_, start_ = 0, end_ = 9007199254740991, $task) {
|
|
527
|
-
throw new Error('Function Stack_toArray is missing on this target in async context.');
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
export async function Stack_toList$(self_, start_ = 0, end_ = 9007199254740991, $task) {
|
|
531
|
-
throw new Error('Function Stack_toList is missing on this target in async context.');
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
export async function Stack_toStream$(self_, start_ = 0, end_ = 9007199254740991, $task) {
|
|
535
|
-
return (await ff_core_Array.Array_toStream$(ff_core_Stack.Stack_toArray(self_, start_, end_), false, $task))
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
export async function Stack_reverse$(self_, $task) {
|
|
539
|
-
throw new Error('Function Stack_reverse is missing on this target in async context.');
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
export async function Stack_sortBy$(self_, body_, ff_core_Ordering_Order$S, $task) {
|
|
543
|
-
(await ff_core_Stack.Stack_sortWith$(self_, (async (_w1, _w2, $task) => {
|
|
544
|
-
return ff_core_Ordering_Order$S.compare_((await body_(_w1, $task)), (await body_(_w2, $task)))
|
|
545
|
-
}), $task))
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
export async function Stack_sortWith$(self_, ordering_, $task) {
|
|
549
|
-
throw new Error('Function Stack_sortWith is missing on this target in async context.');
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
export function Stack_sort(self_, ff_core_Ordering_Order$T) {
|
|
553
|
-
ff_core_Stack.Stack_sortWith(self_, ((x_, y_) => {
|
|
554
|
-
return ff_core_Ordering_Order$T.compare_(x_, y_)
|
|
555
|
-
}))
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
export async function Stack_sort$(self_, ff_core_Ordering_Order$T, $task) {
|
|
559
|
-
ff_core_Stack.Stack_sortWith(self_, ((x_, y_) => {
|
|
560
|
-
return ff_core_Ordering_Order$T.compare_(x_, y_)
|
|
561
|
-
}))
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
export function Stack_join(self_, separator_ = "") {
|
|
565
|
-
return self_.array.join(separator_)
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
export async function Stack_join$(self_, separator_ = "", $task) {
|
|
569
|
-
throw new Error('Function Stack_join is missing on this target in async context.');
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
export function ff_core_Show_Show$ff_core_Stack_Stack(ff_core_Show_Show$T) { return {
|
|
573
|
-
show_(value_) {
|
|
574
|
-
const stack_ = ff_core_Stack.make_();
|
|
575
|
-
ff_core_Stack.Stack_push(stack_, "[");
|
|
576
|
-
ff_core_Stack.Stack_each(value_, ((x_) => {
|
|
577
|
-
if((ff_core_Stack.Stack_size(stack_) > 1)) {
|
|
578
|
-
ff_core_Stack.Stack_push(stack_, ", ")
|
|
579
|
-
};
|
|
580
|
-
ff_core_Stack.Stack_push(stack_, ff_core_Show_Show$T.show_(x_))
|
|
581
|
-
}));
|
|
582
|
-
ff_core_Stack.Stack_push(stack_, "].toStack()");
|
|
583
|
-
return ff_core_Stack.Stack_join(stack_, "")
|
|
584
|
-
},
|
|
585
|
-
async show_$(value_, $task) {
|
|
586
|
-
const stack_ = ff_core_Stack.make_();
|
|
587
|
-
ff_core_Stack.Stack_push(stack_, "[");
|
|
588
|
-
ff_core_Stack.Stack_each(value_, ((x_) => {
|
|
589
|
-
if((ff_core_Stack.Stack_size(stack_) > 1)) {
|
|
590
|
-
ff_core_Stack.Stack_push(stack_, ", ")
|
|
591
|
-
};
|
|
592
|
-
ff_core_Stack.Stack_push(stack_, ff_core_Show_Show$T.show_(x_))
|
|
593
|
-
}));
|
|
594
|
-
ff_core_Stack.Stack_push(stack_, "].toStack()");
|
|
595
|
-
return ff_core_Stack.Stack_join(stack_, "")
|
|
596
|
-
}
|
|
597
|
-
}}
|
|
598
|
-
|
|
599
|
-
|
|
484
|
+
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
export async function Stack_eachWhile$(self_, body_, $task) {
|
|
488
|
+
for(const value of self_.array) if(!await body_(value, $task)) break
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
export async function Stack_all$(self_, body_, $task) {
|
|
492
|
+
let result_ = true;
|
|
493
|
+
(await ff_core_Stack.Stack_eachWhile$(self_, (async (x_, $task) => {
|
|
494
|
+
result_ = (await body_(x_, $task));
|
|
495
|
+
return result_
|
|
496
|
+
}), $task));
|
|
497
|
+
return result_
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
export async function Stack_any$(self_, body_, $task) {
|
|
501
|
+
let result_ = false;
|
|
502
|
+
(await ff_core_Stack.Stack_eachWhile$(self_, (async (x_, $task) => {
|
|
503
|
+
result_ = (await body_(x_, $task));
|
|
504
|
+
return (!result_)
|
|
505
|
+
}), $task));
|
|
506
|
+
return result_
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
export async function Stack_indexWhere$(self_, body_, $task) {
|
|
510
|
+
let i_ = (-1);
|
|
511
|
+
let result_ = false;
|
|
512
|
+
(await ff_core_Stack.Stack_eachWhile$(self_, (async (x_, $task) => {
|
|
513
|
+
i_ += 1;
|
|
514
|
+
result_ = (await body_(x_, $task));
|
|
515
|
+
return (!result_)
|
|
516
|
+
}), $task));
|
|
517
|
+
if(result_) {
|
|
518
|
+
return ff_core_Option.Some(i_)
|
|
519
|
+
} else return ff_core_Option.None()
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
export async function Stack_drain$(self_, $task) {
|
|
523
|
+
throw new Error('Function Stack_drain is missing on this target in async context.');
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
export async function Stack_toArray$(self_, start_ = 0, end_ = 9007199254740991, $task) {
|
|
527
|
+
throw new Error('Function Stack_toArray is missing on this target in async context.');
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
export async function Stack_toList$(self_, start_ = 0, end_ = 9007199254740991, $task) {
|
|
531
|
+
throw new Error('Function Stack_toList is missing on this target in async context.');
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
export async function Stack_toStream$(self_, start_ = 0, end_ = 9007199254740991, $task) {
|
|
535
|
+
return (await ff_core_Array.Array_toStream$(ff_core_Stack.Stack_toArray(self_, start_, end_), false, $task))
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
export async function Stack_reverse$(self_, $task) {
|
|
539
|
+
throw new Error('Function Stack_reverse is missing on this target in async context.');
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
export async function Stack_sortBy$(self_, body_, ff_core_Ordering_Order$S, $task) {
|
|
543
|
+
(await ff_core_Stack.Stack_sortWith$(self_, (async (_w1, _w2, $task) => {
|
|
544
|
+
return ff_core_Ordering_Order$S.compare_((await body_(_w1, $task)), (await body_(_w2, $task)))
|
|
545
|
+
}), $task))
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
export async function Stack_sortWith$(self_, ordering_, $task) {
|
|
549
|
+
throw new Error('Function Stack_sortWith is missing on this target in async context.');
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
export function Stack_sort(self_, ff_core_Ordering_Order$T) {
|
|
553
|
+
ff_core_Stack.Stack_sortWith(self_, ((x_, y_) => {
|
|
554
|
+
return ff_core_Ordering_Order$T.compare_(x_, y_)
|
|
555
|
+
}))
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
export async function Stack_sort$(self_, ff_core_Ordering_Order$T, $task) {
|
|
559
|
+
ff_core_Stack.Stack_sortWith(self_, ((x_, y_) => {
|
|
560
|
+
return ff_core_Ordering_Order$T.compare_(x_, y_)
|
|
561
|
+
}))
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
export function Stack_join(self_, separator_ = "") {
|
|
565
|
+
return self_.array.join(separator_)
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
export async function Stack_join$(self_, separator_ = "", $task) {
|
|
569
|
+
throw new Error('Function Stack_join is missing on this target in async context.');
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
export function ff_core_Show_Show$ff_core_Stack_Stack(ff_core_Show_Show$T) { return {
|
|
573
|
+
show_(value_) {
|
|
574
|
+
const stack_ = ff_core_Stack.make_();
|
|
575
|
+
ff_core_Stack.Stack_push(stack_, "[");
|
|
576
|
+
ff_core_Stack.Stack_each(value_, ((x_) => {
|
|
577
|
+
if((ff_core_Stack.Stack_size(stack_) > 1)) {
|
|
578
|
+
ff_core_Stack.Stack_push(stack_, ", ")
|
|
579
|
+
};
|
|
580
|
+
ff_core_Stack.Stack_push(stack_, ff_core_Show_Show$T.show_(x_))
|
|
581
|
+
}));
|
|
582
|
+
ff_core_Stack.Stack_push(stack_, "].toStack()");
|
|
583
|
+
return ff_core_Stack.Stack_join(stack_, "")
|
|
584
|
+
},
|
|
585
|
+
async show_$(value_, $task) {
|
|
586
|
+
const stack_ = ff_core_Stack.make_();
|
|
587
|
+
ff_core_Stack.Stack_push(stack_, "[");
|
|
588
|
+
ff_core_Stack.Stack_each(value_, ((x_) => {
|
|
589
|
+
if((ff_core_Stack.Stack_size(stack_) > 1)) {
|
|
590
|
+
ff_core_Stack.Stack_push(stack_, ", ")
|
|
591
|
+
};
|
|
592
|
+
ff_core_Stack.Stack_push(stack_, ff_core_Show_Show$T.show_(x_))
|
|
593
|
+
}));
|
|
594
|
+
ff_core_Stack.Stack_push(stack_, "].toStack()");
|
|
595
|
+
return ff_core_Stack.Stack_join(stack_, "")
|
|
596
|
+
}
|
|
597
|
+
}}
|
|
598
|
+
|
|
599
|
+
|