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.
- package/.hintrc +4 -4
- package/README.md +1 -1
- package/core/HttpClient.ff +1 -1
- package/lsp/LanguageServer.ff +32 -7
- package/lsp/stderr.txt +1 -0
- package/lsp/stdin.txt +11 -0
- package/lsp/stdout.txt +41 -0
- package/lux/Main.ff +56 -2
- package/meetup/AutoCompletion.ff +6 -0
- 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 +190 -190
- 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 +29 -29
- package/vscode/package-lock.json +5 -5
- package/vscode/package.json +1 -1
|
@@ -1,185 +1,185 @@
|
|
|
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 String
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
export function String_size(self_) {
|
|
101
|
-
return self_.length
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export function String_grab(self_, index_) {
|
|
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 String
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
export function String_size(self_) {
|
|
101
|
+
return self_.length
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function String_grab(self_, index_) {
|
|
105
105
|
|
|
106
106
|
if(index_ < 0 || index_ >= self_.length) {
|
|
107
107
|
ff_core_Try.internalThrowGrabException_()
|
|
108
108
|
}
|
|
109
109
|
return self_.charCodeAt(index_)
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export function String_replace(self_, needle_, replacement_) {
|
|
114
|
-
return self_.replaceAll(needle_, replacement_)
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export function String_replaceFirst(self_, needle_, replacement_) {
|
|
118
|
-
return self_.replace(needle_, replacement_)
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export function String_reverse(self_) {
|
|
122
|
-
return [...self_].reverse().join('')
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export function String_lower(self_) {
|
|
126
|
-
return self_.toLowerCase()
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export function String_upper(self_) {
|
|
130
|
-
return self_.toUpperCase()
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export function String_dropWhile(self_, p_) {
|
|
110
|
+
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function String_replace(self_, needle_, replacement_) {
|
|
114
|
+
return self_.replaceAll(needle_, replacement_)
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function String_replaceFirst(self_, needle_, replacement_) {
|
|
118
|
+
return self_.replace(needle_, replacement_)
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function String_reverse(self_) {
|
|
122
|
+
return [...self_].reverse().join('')
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export function String_lower(self_) {
|
|
126
|
+
return self_.toLowerCase()
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export function String_upper(self_) {
|
|
130
|
+
return self_.toUpperCase()
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export function String_dropWhile(self_, p_) {
|
|
134
134
|
|
|
135
135
|
let i = 0
|
|
136
136
|
for(; i < self_.length && p_(self_.codePointAt(i)); i++);
|
|
137
137
|
return self_.slice(i)
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
export function String_takeWhile(self_, p_) {
|
|
138
|
+
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export function String_takeWhile(self_, p_) {
|
|
142
142
|
|
|
143
143
|
let i = 0
|
|
144
144
|
for(; i < self_.length && p_(self_.codePointAt(i)); i++);
|
|
145
145
|
return self_.slice(0, i)
|
|
146
|
-
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
export function String_slice(self_, from_, until_) {
|
|
150
|
-
return self_.slice(from_, until_)
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
export function String_split(self_, char_) {
|
|
154
|
-
return self_.split(String.fromCharCode(char_))
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
export function String_splitFirst(self_, char_) {
|
|
146
|
+
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export function String_slice(self_, from_, until_) {
|
|
150
|
+
return self_.slice(from_, until_)
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export function String_split(self_, char_) {
|
|
154
|
+
return self_.split(String.fromCharCode(char_))
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export function String_splitFirst(self_, char_) {
|
|
158
158
|
|
|
159
159
|
const array = self_.split(String.fromCharCode(char_), 2)
|
|
160
160
|
return array.length === 2
|
|
161
161
|
? ff_core_Option.Some(ff_core_Pair.Pair(array[0], array[1]))
|
|
162
162
|
: ff_core_Option.None()
|
|
163
|
-
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
export function String_lines(self_) {
|
|
163
|
+
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export function String_lines(self_) {
|
|
167
167
|
|
|
168
168
|
return ff_core_Array.Array_toList(self_.split(
|
|
169
169
|
new RegExp("[" + String.fromCharCode(13) + "]?[" + String.fromCharCode(10) + "]", "g")
|
|
170
170
|
))
|
|
171
|
-
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
export function String_dropFirst(self_, count_ = 1) {
|
|
175
|
-
return self_.slice(count_)
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
export function String_dropLast(self_, count_ = 1) {
|
|
179
|
-
return self_.slice(0, self_.length - count_)
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
export function String_getInt(self_) {
|
|
171
|
+
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export function String_dropFirst(self_, count_ = 1) {
|
|
175
|
+
return self_.slice(count_)
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export function String_dropLast(self_, count_ = 1) {
|
|
179
|
+
return self_.slice(0, self_.length - count_)
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export function String_getInt(self_) {
|
|
183
183
|
|
|
184
184
|
if(self_.length == 0) {
|
|
185
185
|
return ff_core_Option.None()
|
|
@@ -189,10 +189,10 @@ export function String_getInt(self_) {
|
|
|
189
189
|
if(c < 48 || c > 57) ff_core_Option.None()
|
|
190
190
|
}
|
|
191
191
|
return ff_core_Option.Some(parseInt(self_, 10));
|
|
192
|
-
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
export function String_grabInt(self_) {
|
|
192
|
+
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export function String_grabInt(self_) {
|
|
196
196
|
|
|
197
197
|
if(self_.length == 0) {
|
|
198
198
|
ff_core_Try.internalThrowGrabException_()
|
|
@@ -202,243 +202,243 @@ export function String_grabInt(self_) {
|
|
|
202
202
|
if(c < 48 || c > 57) ff_core_Try.internalThrowGrabException_()
|
|
203
203
|
}
|
|
204
204
|
return parseInt(self_, 10);
|
|
205
|
-
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
export function String_first(self_) {
|
|
205
|
+
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export function String_first(self_) {
|
|
209
209
|
|
|
210
210
|
return self_.length > 0
|
|
211
211
|
? ff_core_Option.Some(self_.charCodeAt(0))
|
|
212
212
|
: ff_core_Option.None()
|
|
213
|
-
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
export function String_last(self_) {
|
|
213
|
+
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export function String_last(self_) {
|
|
217
217
|
|
|
218
218
|
return self_.length > 0
|
|
219
219
|
? ff_core_Option.Some(self_.charCodeAt(self_.length - 1))
|
|
220
220
|
: ff_core_Option.None()
|
|
221
|
-
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
export function String_grabFirst(self_) {
|
|
225
|
-
return ff_core_Option.Option_else(ff_core_String.String_first(self_), (() => {
|
|
226
|
-
return ff_core_Try.internalThrowGrabException_()
|
|
227
|
-
}))
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
export function String_grabLast(self_) {
|
|
231
|
-
return ff_core_Option.Option_else(ff_core_String.String_last(self_), (() => {
|
|
232
|
-
return ff_core_Try.internalThrowGrabException_()
|
|
233
|
-
}))
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
export function String_contains(self_, substring_) {
|
|
237
|
-
return self_.includes(substring_)
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
export function String_startsWith(self_, prefix_, offset_ = 0) {
|
|
241
|
-
return self_.startsWith(prefix_, offset_)
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
export function String_endsWith(self_, prefix_) {
|
|
245
|
-
return self_.endsWith(prefix_)
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
export function String_removeFirst(self_, prefix_) {
|
|
249
|
-
if(ff_core_String.String_startsWith(self_, prefix_, 0)) {
|
|
250
|
-
return ff_core_Option.Some(ff_core_String.String_dropFirst(self_, ff_core_String.String_size(prefix_)))
|
|
251
|
-
} else {
|
|
252
|
-
return ff_core_Option.None()
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
export function String_removeLast(self_, suffix_) {
|
|
257
|
-
if(ff_core_String.String_endsWith(self_, suffix_)) {
|
|
258
|
-
return ff_core_Option.Some(ff_core_String.String_dropLast(self_, ff_core_String.String_size(suffix_)))
|
|
259
|
-
} else {
|
|
260
|
-
return ff_core_Option.None()
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
export function String_any(self_, body_) {
|
|
221
|
+
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export function String_grabFirst(self_) {
|
|
225
|
+
return ff_core_Option.Option_else(ff_core_String.String_first(self_), (() => {
|
|
226
|
+
return ff_core_Try.internalThrowGrabException_()
|
|
227
|
+
}))
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export function String_grabLast(self_) {
|
|
231
|
+
return ff_core_Option.Option_else(ff_core_String.String_last(self_), (() => {
|
|
232
|
+
return ff_core_Try.internalThrowGrabException_()
|
|
233
|
+
}))
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export function String_contains(self_, substring_) {
|
|
237
|
+
return self_.includes(substring_)
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export function String_startsWith(self_, prefix_, offset_ = 0) {
|
|
241
|
+
return self_.startsWith(prefix_, offset_)
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export function String_endsWith(self_, prefix_) {
|
|
245
|
+
return self_.endsWith(prefix_)
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export function String_removeFirst(self_, prefix_) {
|
|
249
|
+
if(ff_core_String.String_startsWith(self_, prefix_, 0)) {
|
|
250
|
+
return ff_core_Option.Some(ff_core_String.String_dropFirst(self_, ff_core_String.String_size(prefix_)))
|
|
251
|
+
} else {
|
|
252
|
+
return ff_core_Option.None()
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export function String_removeLast(self_, suffix_) {
|
|
257
|
+
if(ff_core_String.String_endsWith(self_, suffix_)) {
|
|
258
|
+
return ff_core_Option.Some(ff_core_String.String_dropLast(self_, ff_core_String.String_size(suffix_)))
|
|
259
|
+
} else {
|
|
260
|
+
return ff_core_Option.None()
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export function String_any(self_, body_) {
|
|
265
265
|
|
|
266
266
|
for(let i = 0; i < self_.length; i++) {
|
|
267
267
|
if(body_(self_.charCodeAt(i))) return true;
|
|
268
268
|
}
|
|
269
269
|
return false;
|
|
270
|
-
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
export function String_all(self_, body_) {
|
|
270
|
+
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export function String_all(self_, body_) {
|
|
274
274
|
|
|
275
275
|
for(let i = 0; i < self_.length; i++) {
|
|
276
276
|
if(!body_(self_.charCodeAt(i))) return false;
|
|
277
277
|
}
|
|
278
278
|
return true;
|
|
279
|
-
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
export function String_toBuffer(self_) {
|
|
279
|
+
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export function String_toBuffer(self_) {
|
|
283
283
|
|
|
284
284
|
const encoded = new TextEncoder().encode(self_)
|
|
285
285
|
return new DataView(encoded.buffer, encoded.byteOffset, encoded.byteLength)
|
|
286
|
-
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
export async function String_size$(self_, $task) {
|
|
290
|
-
throw new Error('Function String_size is missing on this target in async context.');
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
export async function String_grab$(self_, index_, $task) {
|
|
294
|
-
throw new Error('Function String_grab is missing on this target in async context.');
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
export async function String_replace$(self_, needle_, replacement_, $task) {
|
|
298
|
-
throw new Error('Function String_replace is missing on this target in async context.');
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
export async function String_replaceFirst$(self_, needle_, replacement_, $task) {
|
|
302
|
-
throw new Error('Function String_replaceFirst is missing on this target in async context.');
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
export async function String_reverse$(self_, $task) {
|
|
306
|
-
throw new Error('Function String_reverse is missing on this target in async context.');
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
export async function String_lower$(self_, $task) {
|
|
310
|
-
throw new Error('Function String_lower is missing on this target in async context.');
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
export async function String_upper$(self_, $task) {
|
|
314
|
-
throw new Error('Function String_upper is missing on this target in async context.');
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
export async function String_dropWhile$(self_, p_, $task) {
|
|
286
|
+
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
export async function String_size$(self_, $task) {
|
|
290
|
+
throw new Error('Function String_size is missing on this target in async context.');
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export async function String_grab$(self_, index_, $task) {
|
|
294
|
+
throw new Error('Function String_grab is missing on this target in async context.');
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
export async function String_replace$(self_, needle_, replacement_, $task) {
|
|
298
|
+
throw new Error('Function String_replace is missing on this target in async context.');
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export async function String_replaceFirst$(self_, needle_, replacement_, $task) {
|
|
302
|
+
throw new Error('Function String_replaceFirst is missing on this target in async context.');
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export async function String_reverse$(self_, $task) {
|
|
306
|
+
throw new Error('Function String_reverse is missing on this target in async context.');
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export async function String_lower$(self_, $task) {
|
|
310
|
+
throw new Error('Function String_lower is missing on this target in async context.');
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export async function String_upper$(self_, $task) {
|
|
314
|
+
throw new Error('Function String_upper is missing on this target in async context.');
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export async function String_dropWhile$(self_, p_, $task) {
|
|
318
318
|
|
|
319
319
|
let i = 0
|
|
320
320
|
for(; i < self_.length && await p_(self_.codePointAt(i), $task); i++);
|
|
321
321
|
return self_.slice(i)
|
|
322
|
-
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
export async function String_takeWhile$(self_, p_, $task) {
|
|
322
|
+
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export async function String_takeWhile$(self_, p_, $task) {
|
|
326
326
|
|
|
327
327
|
let i = 0
|
|
328
328
|
for(; i < self_.length && await p_(self_.codePointAt(i), $task); i++);
|
|
329
329
|
return self_.slice(0, i)
|
|
330
|
-
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
export async function String_slice$(self_, from_, until_, $task) {
|
|
334
|
-
throw new Error('Function String_slice is missing on this target in async context.');
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
export async function String_split$(self_, char_, $task) {
|
|
338
|
-
throw new Error('Function String_split is missing on this target in async context.');
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
export async function String_splitFirst$(self_, char_, $task) {
|
|
342
|
-
throw new Error('Function String_splitFirst is missing on this target in async context.');
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
export async function String_lines$(self_, $task) {
|
|
346
|
-
throw new Error('Function String_lines is missing on this target in async context.');
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
export async function String_dropFirst$(self_, count_ = 1, $task) {
|
|
350
|
-
throw new Error('Function String_dropFirst is missing on this target in async context.');
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
export async function String_dropLast$(self_, count_ = 1, $task) {
|
|
354
|
-
throw new Error('Function String_dropLast is missing on this target in async context.');
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
export async function String_getInt$(self_, $task) {
|
|
358
|
-
throw new Error('Function String_getInt is missing on this target in async context.');
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
export async function String_grabInt$(self_, $task) {
|
|
362
|
-
throw new Error('Function String_grabInt is missing on this target in async context.');
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
export async function String_first$(self_, $task) {
|
|
366
|
-
throw new Error('Function String_first is missing on this target in async context.');
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
export async function String_last$(self_, $task) {
|
|
370
|
-
throw new Error('Function String_last is missing on this target in async context.');
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
export async function String_grabFirst$(self_, $task) {
|
|
374
|
-
return ff_core_Option.Option_else(ff_core_String.String_first(self_), (() => {
|
|
375
|
-
return ff_core_Try.internalThrowGrabException_()
|
|
376
|
-
}))
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
export async function String_grabLast$(self_, $task) {
|
|
380
|
-
return ff_core_Option.Option_else(ff_core_String.String_last(self_), (() => {
|
|
381
|
-
return ff_core_Try.internalThrowGrabException_()
|
|
382
|
-
}))
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
export async function String_contains$(self_, substring_, $task) {
|
|
386
|
-
throw new Error('Function String_contains is missing on this target in async context.');
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
export async function String_startsWith$(self_, prefix_, offset_ = 0, $task) {
|
|
390
|
-
throw new Error('Function String_startsWith is missing on this target in async context.');
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
export async function String_endsWith$(self_, prefix_, $task) {
|
|
394
|
-
throw new Error('Function String_endsWith is missing on this target in async context.');
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
export async function String_removeFirst$(self_, prefix_, $task) {
|
|
398
|
-
if(ff_core_String.String_startsWith(self_, prefix_, 0)) {
|
|
399
|
-
return ff_core_Option.Some(ff_core_String.String_dropFirst(self_, ff_core_String.String_size(prefix_)))
|
|
400
|
-
} else {
|
|
401
|
-
return ff_core_Option.None()
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
export async function String_removeLast$(self_, suffix_, $task) {
|
|
406
|
-
if(ff_core_String.String_endsWith(self_, suffix_)) {
|
|
407
|
-
return ff_core_Option.Some(ff_core_String.String_dropLast(self_, ff_core_String.String_size(suffix_)))
|
|
408
|
-
} else {
|
|
409
|
-
return ff_core_Option.None()
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
export async function String_any$(self_, body_, $task) {
|
|
330
|
+
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
export async function String_slice$(self_, from_, until_, $task) {
|
|
334
|
+
throw new Error('Function String_slice is missing on this target in async context.');
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export async function String_split$(self_, char_, $task) {
|
|
338
|
+
throw new Error('Function String_split is missing on this target in async context.');
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
export async function String_splitFirst$(self_, char_, $task) {
|
|
342
|
+
throw new Error('Function String_splitFirst is missing on this target in async context.');
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
export async function String_lines$(self_, $task) {
|
|
346
|
+
throw new Error('Function String_lines is missing on this target in async context.');
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
export async function String_dropFirst$(self_, count_ = 1, $task) {
|
|
350
|
+
throw new Error('Function String_dropFirst is missing on this target in async context.');
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
export async function String_dropLast$(self_, count_ = 1, $task) {
|
|
354
|
+
throw new Error('Function String_dropLast is missing on this target in async context.');
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
export async function String_getInt$(self_, $task) {
|
|
358
|
+
throw new Error('Function String_getInt is missing on this target in async context.');
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
export async function String_grabInt$(self_, $task) {
|
|
362
|
+
throw new Error('Function String_grabInt is missing on this target in async context.');
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
export async function String_first$(self_, $task) {
|
|
366
|
+
throw new Error('Function String_first is missing on this target in async context.');
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export async function String_last$(self_, $task) {
|
|
370
|
+
throw new Error('Function String_last is missing on this target in async context.');
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
export async function String_grabFirst$(self_, $task) {
|
|
374
|
+
return ff_core_Option.Option_else(ff_core_String.String_first(self_), (() => {
|
|
375
|
+
return ff_core_Try.internalThrowGrabException_()
|
|
376
|
+
}))
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
export async function String_grabLast$(self_, $task) {
|
|
380
|
+
return ff_core_Option.Option_else(ff_core_String.String_last(self_), (() => {
|
|
381
|
+
return ff_core_Try.internalThrowGrabException_()
|
|
382
|
+
}))
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
export async function String_contains$(self_, substring_, $task) {
|
|
386
|
+
throw new Error('Function String_contains is missing on this target in async context.');
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
export async function String_startsWith$(self_, prefix_, offset_ = 0, $task) {
|
|
390
|
+
throw new Error('Function String_startsWith is missing on this target in async context.');
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
export async function String_endsWith$(self_, prefix_, $task) {
|
|
394
|
+
throw new Error('Function String_endsWith is missing on this target in async context.');
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
export async function String_removeFirst$(self_, prefix_, $task) {
|
|
398
|
+
if(ff_core_String.String_startsWith(self_, prefix_, 0)) {
|
|
399
|
+
return ff_core_Option.Some(ff_core_String.String_dropFirst(self_, ff_core_String.String_size(prefix_)))
|
|
400
|
+
} else {
|
|
401
|
+
return ff_core_Option.None()
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
export async function String_removeLast$(self_, suffix_, $task) {
|
|
406
|
+
if(ff_core_String.String_endsWith(self_, suffix_)) {
|
|
407
|
+
return ff_core_Option.Some(ff_core_String.String_dropLast(self_, ff_core_String.String_size(suffix_)))
|
|
408
|
+
} else {
|
|
409
|
+
return ff_core_Option.None()
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
export async function String_any$(self_, body_, $task) {
|
|
414
414
|
|
|
415
415
|
for(let i = 0; i < self_.length; i++) {
|
|
416
416
|
if(await body_(self_.charCodeAt(i), $task)) return true;
|
|
417
417
|
}
|
|
418
418
|
return false;
|
|
419
|
-
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
export async function String_all$(self_, body_, $task) {
|
|
419
|
+
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
export async function String_all$(self_, body_, $task) {
|
|
423
423
|
|
|
424
424
|
for(let i = 0; i < self_.length; i++) {
|
|
425
425
|
if(!await body_(self_.charCodeAt(i), $task)) return false;
|
|
426
426
|
}
|
|
427
427
|
return true;
|
|
428
|
-
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
export async function String_toBuffer$(self_, $task) {
|
|
432
|
-
throw new Error('Function String_toBuffer is missing on this target in async context.');
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
export const ff_core_Any_HasAnyTag$ff_core_String_String = {
|
|
436
|
-
anyTag_() {
|
|
437
|
-
return ff_core_Any.internalAnyTag_((("ff:core/String.String" + "[") + "]"))
|
|
438
|
-
},
|
|
439
|
-
async anyTag_$($task) {
|
|
440
|
-
return ff_core_Any.internalAnyTag_((("ff:core/String.String" + "[") + "]"))
|
|
441
|
-
}
|
|
442
|
-
};
|
|
443
|
-
|
|
444
|
-
|
|
428
|
+
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
export async function String_toBuffer$(self_, $task) {
|
|
432
|
+
throw new Error('Function String_toBuffer is missing on this target in async context.');
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
export const ff_core_Any_HasAnyTag$ff_core_String_String = {
|
|
436
|
+
anyTag_() {
|
|
437
|
+
return ff_core_Any.internalAnyTag_((("ff:core/String.String" + "[") + "]"))
|
|
438
|
+
},
|
|
439
|
+
async anyTag_$($task) {
|
|
440
|
+
return ff_core_Any.internalAnyTag_((("ff:core/String.String" + "[") + "]"))
|
|
441
|
+
}
|
|
442
|
+
};
|
|
443
|
+
|
|
444
|
+
|