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.
- package/.firefly-workspace +1 -0
- package/.vscode/settings.json +5 -0
- package/LICENSE.txt +21 -0
- package/README.md +96 -0
- package/bin/firefly.mjs +2 -0
- package/compiler/.firefly/package.ff +1 -0
- package/compiler/Builder.ff +218 -0
- package/compiler/Compiler.ff +241 -0
- package/compiler/Dependencies.ff +179 -0
- package/compiler/Deriver.ff +647 -0
- package/compiler/Dictionaries.ff +205 -0
- package/compiler/Environment.ff +166 -0
- package/compiler/Inference.ff +1117 -0
- package/compiler/JsEmitter.ff +861 -0
- package/compiler/JsImporter.ff +56 -0
- package/compiler/LspHook.ff +188 -0
- package/compiler/Main.ff +237 -0
- package/compiler/Parser.ff +1383 -0
- package/compiler/Patterns.ff +111 -0
- package/compiler/Resolver.ff +620 -0
- package/compiler/Substitution.ff +178 -0
- package/compiler/Syntax.ff +299 -0
- package/compiler/Token.ff +180 -0
- package/compiler/Tokenizer.ff +278 -0
- package/compiler/Unification.ff +220 -0
- package/compiler/Wildcards.ff +50 -0
- package/compiler/Workspace.ff +88 -0
- package/core/.firefly/package.ff +2 -0
- package/core/Any.ff +30 -0
- package/core/Array.ff +249 -0
- package/core/AssetSystem.ff +61 -0
- package/core/Atomic.ff +64 -0
- package/core/Bool.ff +13 -0
- package/core/BrowserSystem.ff +14 -0
- package/core/Buffer.ff +211 -0
- package/core/BuildSystem.ff +144 -0
- package/core/Channel.ff +131 -0
- package/core/Char.ff +18 -0
- package/core/Core.ff +58 -0
- package/core/Duration.ff +15 -0
- package/core/Equal.ff +52 -0
- package/core/Error.ff +20 -0
- package/core/FileHandle.ff +41 -0
- package/core/Float.ff +41 -0
- package/core/HttpClient.ff +84 -0
- package/core/Instant.ff +9 -0
- package/core/Int.ff +61 -0
- package/core/IntMap.ff +85 -0
- package/core/JsSystem.ff +66 -0
- package/core/JsValue.ff +240 -0
- package/core/List.ff +440 -0
- package/core/Lock.ff +144 -0
- package/core/Log.ff +24 -0
- package/core/Map.ff +126 -0
- package/core/NodeSystem.ff +88 -0
- package/core/Nothing.ff +1 -0
- package/core/Option.ff +133 -0
- package/core/Ordering.ff +157 -0
- package/core/Pair.ff +55 -0
- package/core/Path.ff +393 -0
- package/core/RbMap.ff +216 -0
- package/core/Serializable.ff +173 -0
- package/core/Set.ff +38 -0
- package/core/Show.ff +43 -0
- package/core/Stack.ff +263 -0
- package/core/Stream.ff +406 -0
- package/core/String.ff +175 -0
- package/core/StringMap.ff +85 -0
- package/core/Task.ff +138 -0
- package/core/Try.ff +81 -0
- package/core/Unit.ff +3 -0
- package/experimental/random/AltGeneric.ff +44 -0
- package/experimental/random/Async.ff +68 -0
- package/experimental/random/Buffer2.ff +77 -0
- package/experimental/random/Cat.ff +12 -0
- package/experimental/random/Dictionary.ff +52 -0
- package/experimental/random/Example.ff +46 -0
- package/experimental/random/Generic.ff +102 -0
- package/experimental/random/HappyEyeballs.ff +40 -0
- package/experimental/random/HashMap.ff +72 -0
- package/experimental/random/IfElseUnit.ff +9 -0
- package/experimental/random/InputOutput.ff +23 -0
- package/experimental/random/ListVsArray.ff +45 -0
- package/experimental/random/Main.ff +44 -0
- package/experimental/random/MapTest.ff +67 -0
- package/experimental/random/OldTaskSystem.ff +210 -0
- package/experimental/random/PatternTest.ff +39 -0
- package/experimental/random/Patterns.ff +226 -0
- package/experimental/random/ReadBytesTest.ff +10 -0
- package/experimental/random/RunLength.ff +65 -0
- package/experimental/random/Scrape.ff +51 -0
- package/experimental/random/Serialization.ff +217 -0
- package/experimental/random/SerializationTest.ff +46 -0
- package/experimental/random/Serializer.ff +36 -0
- package/experimental/random/StdInOutErr.ff +4 -0
- package/experimental/random/Symbols.ff +74 -0
- package/experimental/random/Tag.ff +49 -0
- package/experimental/random/Tensor.ff +52 -0
- package/experimental/random/Try.ff +56 -0
- package/experimental/random/Tsv.ff +9 -0
- package/experimental/random/TypesAreModules.ff +87 -0
- package/experimental/random/blueprints/Blueprint.ff +52 -0
- package/experimental/random/blueprints/Main.ff +11 -0
- package/experimental/random/blueprints/Pretty.ff +58 -0
- package/experimental/random/blueprints/User.ff +64 -0
- package/experimental/random/blueprintsystem/BlueprintSystem.ff +48 -0
- package/experimental/random/blueprintsystem/Deserialize.ff +53 -0
- package/experimental/random/blueprintsystem/ReadJs.ff +13 -0
- package/experimental/random/blueprintsystem/User.ff +2 -0
- package/experimental/random/kahrs/Kahrs.ff +112 -0
- package/experimental/random/kahrs/TestKahrs.ff +22 -0
- package/experimental/random/kahrs/TestMap.ff +18 -0
- package/experimental/random/streaming/Gzip.ff +3 -0
- package/experimental/random/streaming/Main.ff +34 -0
- package/experimental/random/streaming/S3Bucket.ff +11 -0
- package/experimental/random/streaming/Tar.ff +5 -0
- package/experimental/rhymeapp/Main.ff +81 -0
- package/experimental/rhymeapp/index.html +14 -0
- package/firefly.sh +5 -0
- package/fireflysite/Main.ff +13 -0
- package/httpserver/.firefly/package.ff +1 -0
- package/httpserver/HttpServer.ff +184 -0
- package/lsp/.firefly/package.ff +1 -0
- package/lsp/CompletionHandler.ff +814 -0
- package/lsp/Handler.ff +551 -0
- package/lsp/HoverHandler.ff +82 -0
- package/lsp/LanguageServer.ff +229 -0
- package/lsp/SignatureHelpHandler.ff +55 -0
- package/lsp/SymbolHandler.ff +167 -0
- package/output/js/ff/compiler/Builder.mjs +483 -0
- package/output/js/ff/compiler/Compiler.mjs +410 -0
- package/output/js/ff/compiler/Dependencies.mjs +388 -0
- package/output/js/ff/compiler/Deriver.mjs +1166 -0
- package/output/js/ff/compiler/Dictionaries.mjs +1305 -0
- package/output/js/ff/compiler/Environment.mjs +1005 -0
- package/output/js/ff/compiler/Inference.mjs +4264 -0
- package/output/js/ff/compiler/JsEmitter.mjs +5353 -0
- package/output/js/ff/compiler/JsImporter.mjs +262 -0
- package/output/js/ff/compiler/LspHook.mjs +789 -0
- package/output/js/ff/compiler/Main.mjs +1695 -0
- package/output/js/ff/compiler/Parser.mjs +4004 -0
- package/output/js/ff/compiler/Patterns.mjs +923 -0
- package/output/js/ff/compiler/Resolver.mjs +2303 -0
- package/output/js/ff/compiler/Substitution.mjs +1146 -0
- package/output/js/ff/compiler/Syntax.mjs +12430 -0
- package/output/js/ff/compiler/Token.mjs +3092 -0
- package/output/js/ff/compiler/Tokenizer.mjs +589 -0
- package/output/js/ff/compiler/Unification.mjs +1748 -0
- package/output/js/ff/compiler/Wildcards.mjs +604 -0
- package/output/js/ff/compiler/Workspace.mjs +683 -0
- package/output/js/ff/core/Any.mjs +139 -0
- package/output/js/ff/core/Array.mjs +594 -0
- package/output/js/ff/core/AssetSystem.mjs +270 -0
- package/output/js/ff/core/Atomic.mjs +186 -0
- package/output/js/ff/core/Bool.mjs +141 -0
- package/output/js/ff/core/BrowserSystem.mjs +122 -0
- package/output/js/ff/core/Buffer.mjs +467 -0
- package/output/js/ff/core/BuildSystem.mjs +320 -0
- package/output/js/ff/core/Channel.mjs +268 -0
- package/output/js/ff/core/Char.mjs +145 -0
- package/output/js/ff/core/Core.mjs +300 -0
- package/output/js/ff/core/Duration.mjs +112 -0
- package/output/js/ff/core/Equal.mjs +175 -0
- package/output/js/ff/core/Error.mjs +138 -0
- package/output/js/ff/core/FileHandle.mjs +164 -0
- package/output/js/ff/core/Float.mjs +214 -0
- package/output/js/ff/core/HttpClient.mjs +210 -0
- package/output/js/ff/core/Instant.mjs +105 -0
- package/output/js/ff/core/Int.mjs +254 -0
- package/output/js/ff/core/IntMap.mjs +282 -0
- package/output/js/ff/core/JsSystem.mjs +234 -0
- package/output/js/ff/core/JsValue.mjs +678 -0
- package/output/js/ff/core/List.mjs +2335 -0
- package/output/js/ff/core/Lock.mjs +322 -0
- package/output/js/ff/core/Log.mjs +159 -0
- package/output/js/ff/core/Map.mjs +358 -0
- package/output/js/ff/core/NodeSystem.mjs +288 -0
- package/output/js/ff/core/Nothing.mjs +100 -0
- package/output/js/ff/core/Option.mjs +1002 -0
- package/output/js/ff/core/Ordering.mjs +734 -0
- package/output/js/ff/core/Pair.mjs +318 -0
- package/output/js/ff/core/Path.mjs +768 -0
- package/output/js/ff/core/RbMap.mjs +1936 -0
- package/output/js/ff/core/Serializable.mjs +434 -0
- package/output/js/ff/core/Set.mjs +250 -0
- package/output/js/ff/core/Show.mjs +201 -0
- package/output/js/ff/core/Stack.mjs +595 -0
- package/output/js/ff/core/Stream.mjs +1300 -0
- package/output/js/ff/core/String.mjs +433 -0
- package/output/js/ff/core/StringMap.mjs +282 -0
- package/output/js/ff/core/Task.mjs +345 -0
- package/output/js/ff/core/Try.mjs +503 -0
- package/output/js/ff/core/Unit.mjs +103 -0
- package/package.json +29 -0
- package/postgresql/.firefly/include/package-lock.json +250 -0
- package/postgresql/.firefly/include/package.json +5 -0
- package/postgresql/.firefly/include/prepare.sh +2 -0
- package/postgresql/.firefly/package.ff +3 -0
- package/postgresql/Pg.ff +530 -0
- package/unsafejs/.firefly/package.ff +1 -0
- package/unsafejs/UnsafeJs.ff +19 -0
- package/vscode/.vscode/launch.json +18 -0
- package/vscode/.vscode/tasks.json +33 -0
- package/vscode/LICENSE.txt +21 -0
- package/vscode/Prepublish.ff +15 -0
- package/vscode/README.md +17 -0
- package/vscode/client/package-lock.json +544 -0
- package/vscode/client/package.json +22 -0
- package/vscode/client/src/extension.ts +64 -0
- package/vscode/client/tsconfig.json +12 -0
- package/vscode/icons/firefly-icon.png +0 -0
- package/vscode/icons/firefly-icon.svg +10 -0
- package/vscode/icons/firefly-logo-notext.png +0 -0
- package/vscode/icons/firefly-logo.png +0 -0
- package/vscode/language-configuration.json +39 -0
- package/vscode/package-lock.json +3623 -0
- package/vscode/package.json +144 -0
- package/vscode/snippets-none.json +1 -0
- package/vscode/snippets.json +241 -0
- package/vscode/syntaxes/firefly.tmLanguage.json +294 -0
- package/vscode/tsconfig.json +20 -0
|
@@ -0,0 +1,789 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
import * as ff_compiler_LspHook from "../../ff/compiler/LspHook.mjs"
|
|
4
|
+
|
|
5
|
+
import * as ff_compiler_Environment from "../../ff/compiler/Environment.mjs"
|
|
6
|
+
|
|
7
|
+
import * as ff_compiler_Syntax from "../../ff/compiler/Syntax.mjs"
|
|
8
|
+
|
|
9
|
+
import * as ff_compiler_Unification from "../../ff/compiler/Unification.mjs"
|
|
10
|
+
|
|
11
|
+
import * as ff_core_Any from "../../ff/core/Any.mjs"
|
|
12
|
+
|
|
13
|
+
import * as ff_core_Array from "../../ff/core/Array.mjs"
|
|
14
|
+
|
|
15
|
+
import * as ff_core_AssetSystem from "../../ff/core/AssetSystem.mjs"
|
|
16
|
+
|
|
17
|
+
import * as ff_core_Atomic from "../../ff/core/Atomic.mjs"
|
|
18
|
+
|
|
19
|
+
import * as ff_core_Bool from "../../ff/core/Bool.mjs"
|
|
20
|
+
|
|
21
|
+
import * as ff_core_BrowserSystem from "../../ff/core/BrowserSystem.mjs"
|
|
22
|
+
|
|
23
|
+
import * as ff_core_Buffer from "../../ff/core/Buffer.mjs"
|
|
24
|
+
|
|
25
|
+
import * as ff_core_BuildSystem from "../../ff/core/BuildSystem.mjs"
|
|
26
|
+
|
|
27
|
+
import * as ff_core_Channel from "../../ff/core/Channel.mjs"
|
|
28
|
+
|
|
29
|
+
import * as ff_core_Char from "../../ff/core/Char.mjs"
|
|
30
|
+
|
|
31
|
+
import * as ff_core_Core from "../../ff/core/Core.mjs"
|
|
32
|
+
|
|
33
|
+
import * as ff_core_Duration from "../../ff/core/Duration.mjs"
|
|
34
|
+
|
|
35
|
+
import * as ff_core_Equal from "../../ff/core/Equal.mjs"
|
|
36
|
+
|
|
37
|
+
import * as ff_core_Error from "../../ff/core/Error.mjs"
|
|
38
|
+
|
|
39
|
+
import * as ff_core_FileHandle from "../../ff/core/FileHandle.mjs"
|
|
40
|
+
|
|
41
|
+
import * as ff_core_Float from "../../ff/core/Float.mjs"
|
|
42
|
+
|
|
43
|
+
import * as ff_core_HttpClient from "../../ff/core/HttpClient.mjs"
|
|
44
|
+
|
|
45
|
+
import * as ff_core_Instant from "../../ff/core/Instant.mjs"
|
|
46
|
+
|
|
47
|
+
import * as ff_core_Int from "../../ff/core/Int.mjs"
|
|
48
|
+
|
|
49
|
+
import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
|
|
50
|
+
|
|
51
|
+
import * as ff_core_JsSystem from "../../ff/core/JsSystem.mjs"
|
|
52
|
+
|
|
53
|
+
import * as ff_core_JsValue from "../../ff/core/JsValue.mjs"
|
|
54
|
+
|
|
55
|
+
import * as ff_core_List from "../../ff/core/List.mjs"
|
|
56
|
+
|
|
57
|
+
import * as ff_core_Lock from "../../ff/core/Lock.mjs"
|
|
58
|
+
|
|
59
|
+
import * as ff_core_Log from "../../ff/core/Log.mjs"
|
|
60
|
+
|
|
61
|
+
import * as ff_core_Map from "../../ff/core/Map.mjs"
|
|
62
|
+
|
|
63
|
+
import * as ff_core_NodeSystem from "../../ff/core/NodeSystem.mjs"
|
|
64
|
+
|
|
65
|
+
import * as ff_core_Nothing from "../../ff/core/Nothing.mjs"
|
|
66
|
+
|
|
67
|
+
import * as ff_core_Option from "../../ff/core/Option.mjs"
|
|
68
|
+
|
|
69
|
+
import * as ff_core_Ordering from "../../ff/core/Ordering.mjs"
|
|
70
|
+
|
|
71
|
+
import * as ff_core_Pair from "../../ff/core/Pair.mjs"
|
|
72
|
+
|
|
73
|
+
import * as ff_core_Path from "../../ff/core/Path.mjs"
|
|
74
|
+
|
|
75
|
+
import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
|
|
76
|
+
|
|
77
|
+
import * as ff_core_Set from "../../ff/core/Set.mjs"
|
|
78
|
+
|
|
79
|
+
import * as ff_core_Show from "../../ff/core/Show.mjs"
|
|
80
|
+
|
|
81
|
+
import * as ff_core_Stack from "../../ff/core/Stack.mjs"
|
|
82
|
+
|
|
83
|
+
import * as ff_core_Stream from "../../ff/core/Stream.mjs"
|
|
84
|
+
|
|
85
|
+
import * as ff_core_String from "../../ff/core/String.mjs"
|
|
86
|
+
|
|
87
|
+
import * as ff_core_StringMap from "../../ff/core/StringMap.mjs"
|
|
88
|
+
|
|
89
|
+
import * as ff_core_Task from "../../ff/core/Task.mjs"
|
|
90
|
+
|
|
91
|
+
import * as ff_core_Try from "../../ff/core/Try.mjs"
|
|
92
|
+
|
|
93
|
+
import * as ff_core_Unit from "../../ff/core/Unit.mjs"
|
|
94
|
+
|
|
95
|
+
// type LspHook
|
|
96
|
+
export function LspHook(at_, definedAt_, insertIdentifier_, trackSymbols_, stackOfResults_) {
|
|
97
|
+
return {at_, definedAt_, insertIdentifier_, trackSymbols_, stackOfResults_};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// type SymbolHook
|
|
101
|
+
export function SymbolHook(qualifiedName_, usageAt_, definedAt_) {
|
|
102
|
+
return {qualifiedName_, usageAt_, definedAt_};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// type Box
|
|
106
|
+
export function Box(value_) {
|
|
107
|
+
return {value_};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// type ResultHook
|
|
111
|
+
const ParseSymbolBegin$ = {ParseSymbolBegin: true};
|
|
112
|
+
export function ParseSymbolBegin() {
|
|
113
|
+
return ParseSymbolBegin$;
|
|
114
|
+
}
|
|
115
|
+
export function ParseSymbolEnd(name_, kind_, selectionStart_, selectionEnd_, start_, end_) {
|
|
116
|
+
return {ParseSymbolEnd: true, name_, kind_, selectionStart_, selectionEnd_, start_, end_};
|
|
117
|
+
}
|
|
118
|
+
export function ParseArgumentHook(callAt_, argumentIndex_, parameterName_) {
|
|
119
|
+
return {ParseArgumentHook: true, callAt_, argumentIndex_, parameterName_};
|
|
120
|
+
}
|
|
121
|
+
export function ResolveSymbolHook(symbol_, annotation_) {
|
|
122
|
+
return {ResolveSymbolHook: true, symbol_, annotation_};
|
|
123
|
+
}
|
|
124
|
+
export function ResolveTypeHook(types_, typeGenerics_, symbol_, explicitType_) {
|
|
125
|
+
return {ResolveTypeHook: true, types_, typeGenerics_, symbol_, explicitType_};
|
|
126
|
+
}
|
|
127
|
+
export function ResolveConstraintHook(symbol_, constrant_) {
|
|
128
|
+
return {ResolveConstraintHook: true, symbol_, constrant_};
|
|
129
|
+
}
|
|
130
|
+
export function ResolveSignatureHook(signature_, isInstanceMethod_) {
|
|
131
|
+
return {ResolveSignatureHook: true, signature_, isInstanceMethod_};
|
|
132
|
+
}
|
|
133
|
+
export function ResolveVariantFieldHook(symbol_, type_, commonField_) {
|
|
134
|
+
return {ResolveVariantFieldHook: true, symbol_, type_, commonField_};
|
|
135
|
+
}
|
|
136
|
+
export function InferTermHook(unification_, environment_, expected_, term_, recordType_, missing_) {
|
|
137
|
+
return {InferTermHook: true, unification_, environment_, expected_, term_, recordType_, missing_};
|
|
138
|
+
}
|
|
139
|
+
export function InferLambdaStartHook(unification_, environment_, lambdaType_) {
|
|
140
|
+
return {InferLambdaStartHook: true, unification_, environment_, lambdaType_};
|
|
141
|
+
}
|
|
142
|
+
export function InferSequentialStartHook(unification_, term_, missing_) {
|
|
143
|
+
return {InferSequentialStartHook: true, unification_, term_, missing_};
|
|
144
|
+
}
|
|
145
|
+
export function InferFunctionDefinitionHook(unification_, environment_, definition_, missing_) {
|
|
146
|
+
return {InferFunctionDefinitionHook: true, unification_, environment_, definition_, missing_};
|
|
147
|
+
}
|
|
148
|
+
export function InferPatternHook(unification_, environment_, expected_, pattern_) {
|
|
149
|
+
return {InferPatternHook: true, unification_, environment_, expected_, pattern_};
|
|
150
|
+
}
|
|
151
|
+
export function InferParameterHook(unification_, environment_, parameter_, missing_) {
|
|
152
|
+
return {InferParameterHook: true, unification_, environment_, parameter_, missing_};
|
|
153
|
+
}
|
|
154
|
+
export function InferArgumentHook(unification_, environment_, isCopy_, callAt_, callName_, parameters_, arguments_, argumentIndex_) {
|
|
155
|
+
return {InferArgumentHook: true, unification_, environment_, isCopy_, callAt_, callName_, parameters_, arguments_, argumentIndex_};
|
|
156
|
+
}
|
|
157
|
+
export function InferLookupHook(unification_, environment_, expected_, selfVariable_, symbol_, instantiated_) {
|
|
158
|
+
return {InferLookupHook: true, unification_, environment_, expected_, selfVariable_, symbol_, instantiated_};
|
|
159
|
+
}
|
|
160
|
+
export function InferRecordFieldHook(unification_, environment_, expected_, recordType_, fieldName_) {
|
|
161
|
+
return {InferRecordFieldHook: true, unification_, environment_, expected_, recordType_, fieldName_};
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
export function disabled_() {
|
|
167
|
+
return ff_compiler_LspHook.make_(ff_core_Option.None(), ff_core_Option.None(), false, false)
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export function make_(at_, definedAt_, insertIdentifier_, trackSymbols_) {
|
|
171
|
+
return ff_compiler_LspHook.LspHook(ff_core_Option.Option_else(at_, (() => {
|
|
172
|
+
return ff_compiler_Syntax.Location("^lsp", (-7), (-7))
|
|
173
|
+
})), ff_core_Option.Option_else(definedAt_, (() => {
|
|
174
|
+
return ff_compiler_Syntax.Location("^lsp", (-7), (-7))
|
|
175
|
+
})), insertIdentifier_, trackSymbols_, ff_core_List.List_toStack(ff_core_List.Empty()))
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export function strictlyBetween_(afterAt_, beforeAt_, at_, extraColumns_) {
|
|
179
|
+
return (((at_.file_ === afterAt_.file_) && (((at_.line_ === afterAt_.line_) && (at_.column_ > afterAt_.column_)) || (at_.line_ > afterAt_.line_))) && (((at_.line_ === beforeAt_.line_) && (at_.column_ < (beforeAt_.column_ + extraColumns_))) || (at_.line_ < beforeAt_.line_)))
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export function showHook_(hook_) {
|
|
183
|
+
{
|
|
184
|
+
const hook_a = hook_;
|
|
185
|
+
{
|
|
186
|
+
if(hook_a.InferArgumentHook) {
|
|
187
|
+
const unification_ = hook_a.unification_;
|
|
188
|
+
const environment_ = hook_a.environment_;
|
|
189
|
+
const isCopy_ = hook_a.isCopy_;
|
|
190
|
+
const callAt_ = hook_a.callAt_;
|
|
191
|
+
const callName_ = hook_a.callName_;
|
|
192
|
+
const parameters_ = hook_a.parameters_;
|
|
193
|
+
const arguments_ = hook_a.arguments_;
|
|
194
|
+
const argumentIndex_ = hook_a.argumentIndex_;
|
|
195
|
+
return "InferArgumentHook(...)"
|
|
196
|
+
return
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
{
|
|
200
|
+
if(hook_a.InferFunctionDefinitionHook) {
|
|
201
|
+
const unification_ = hook_a.unification_;
|
|
202
|
+
const environment_ = hook_a.environment_;
|
|
203
|
+
const definition_ = hook_a.definition_;
|
|
204
|
+
const missing_ = hook_a.missing_;
|
|
205
|
+
return "InferFunctionDefinitionHook(...)"
|
|
206
|
+
return
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
{
|
|
210
|
+
if(hook_a.InferLambdaStartHook) {
|
|
211
|
+
const unification_ = hook_a.unification_;
|
|
212
|
+
const environment_ = hook_a.environment_;
|
|
213
|
+
const lambdaType_ = hook_a.lambdaType_;
|
|
214
|
+
return "InferLambdaStartHook(...)"
|
|
215
|
+
return
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
{
|
|
219
|
+
if(hook_a.InferLookupHook) {
|
|
220
|
+
const unification_ = hook_a.unification_;
|
|
221
|
+
const environment_ = hook_a.environment_;
|
|
222
|
+
const expected_ = hook_a.expected_;
|
|
223
|
+
const selfVariable_ = hook_a.selfVariable_;
|
|
224
|
+
const symbol_ = hook_a.symbol_;
|
|
225
|
+
const instantiated_ = hook_a.instantiated_;
|
|
226
|
+
return "InferLookupHook(...)"
|
|
227
|
+
return
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
{
|
|
231
|
+
if(hook_a.InferParameterHook) {
|
|
232
|
+
const unification_ = hook_a.unification_;
|
|
233
|
+
const environment_ = hook_a.environment_;
|
|
234
|
+
const parameter_ = hook_a.parameter_;
|
|
235
|
+
const missing_ = hook_a.missing_;
|
|
236
|
+
return "InferParameterHook(...)"
|
|
237
|
+
return
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
{
|
|
241
|
+
if(hook_a.InferPatternHook) {
|
|
242
|
+
const unification_ = hook_a.unification_;
|
|
243
|
+
const environment_ = hook_a.environment_;
|
|
244
|
+
const expected_ = hook_a.expected_;
|
|
245
|
+
const pattern_ = hook_a.pattern_;
|
|
246
|
+
return "InferPatternHook(...)"
|
|
247
|
+
return
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
{
|
|
251
|
+
if(hook_a.InferRecordFieldHook) {
|
|
252
|
+
const unification_ = hook_a.unification_;
|
|
253
|
+
const environment_ = hook_a.environment_;
|
|
254
|
+
const expected_ = hook_a.expected_;
|
|
255
|
+
const recordType_ = hook_a.recordType_;
|
|
256
|
+
const fieldName_ = hook_a.fieldName_;
|
|
257
|
+
return "InferRecordFieldHook(...)"
|
|
258
|
+
return
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
{
|
|
262
|
+
if(hook_a.InferSequentialStartHook) {
|
|
263
|
+
const unification_ = hook_a.unification_;
|
|
264
|
+
const term_ = hook_a.term_;
|
|
265
|
+
const missing_ = hook_a.missing_;
|
|
266
|
+
return "InferSequentialStartHook(...)"
|
|
267
|
+
return
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
{
|
|
271
|
+
if(hook_a.InferTermHook) {
|
|
272
|
+
const unification_ = hook_a.unification_;
|
|
273
|
+
const environment_ = hook_a.environment_;
|
|
274
|
+
const expected_ = hook_a.expected_;
|
|
275
|
+
const term_ = hook_a.term_;
|
|
276
|
+
const recordType_ = hook_a.recordType_;
|
|
277
|
+
const missing_ = hook_a.missing_;
|
|
278
|
+
return "InferTermHook(...)"
|
|
279
|
+
return
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
{
|
|
283
|
+
if(hook_a.ParseArgumentHook) {
|
|
284
|
+
const callAt_ = hook_a.callAt_;
|
|
285
|
+
const argumentIndex_ = hook_a.argumentIndex_;
|
|
286
|
+
const parameterName_ = hook_a.parameterName_;
|
|
287
|
+
return "ParseArgumentHook(...)"
|
|
288
|
+
return
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
{
|
|
292
|
+
if(hook_a.ParseSymbolBegin) {
|
|
293
|
+
return "ParseSymbolBegin(...)"
|
|
294
|
+
return
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
{
|
|
298
|
+
if(hook_a.ParseSymbolEnd) {
|
|
299
|
+
const name_ = hook_a.name_;
|
|
300
|
+
const kind_ = hook_a.kind_;
|
|
301
|
+
const selectionStart_ = hook_a.selectionStart_;
|
|
302
|
+
const selectionEnd_ = hook_a.selectionEnd_;
|
|
303
|
+
const start_ = hook_a.start_;
|
|
304
|
+
const end_ = hook_a.end_;
|
|
305
|
+
return "ParseSymbolEnd(...)"
|
|
306
|
+
return
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
{
|
|
310
|
+
if(hook_a.ResolveConstraintHook) {
|
|
311
|
+
const symbol_ = hook_a.symbol_;
|
|
312
|
+
const constrant_ = hook_a.constrant_;
|
|
313
|
+
return "ResolveConstraintHook(...)"
|
|
314
|
+
return
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
{
|
|
318
|
+
if(hook_a.ResolveSignatureHook) {
|
|
319
|
+
const signature_ = hook_a.signature_;
|
|
320
|
+
return "ResolveSignatureHook(...)"
|
|
321
|
+
return
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
{
|
|
325
|
+
if(hook_a.ResolveSymbolHook) {
|
|
326
|
+
const symbol_ = hook_a.symbol_;
|
|
327
|
+
const annotation_ = hook_a.annotation_;
|
|
328
|
+
return "ResolveSymbolHook(...)"
|
|
329
|
+
return
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
{
|
|
333
|
+
if(hook_a.ResolveTypeHook) {
|
|
334
|
+
const types_ = hook_a.types_;
|
|
335
|
+
const typeGenerics_ = hook_a.typeGenerics_;
|
|
336
|
+
const symbol_ = hook_a.symbol_;
|
|
337
|
+
const explicitType_ = hook_a.explicitType_;
|
|
338
|
+
return "ResolveTypeHook(...)"
|
|
339
|
+
return
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
{
|
|
343
|
+
if(hook_a.ResolveVariantFieldHook) {
|
|
344
|
+
const symbol_ = hook_a.symbol_;
|
|
345
|
+
const type_ = hook_a.type_;
|
|
346
|
+
const commonField_ = hook_a.commonField_;
|
|
347
|
+
return "ResolveVariantFieldHook(...)"
|
|
348
|
+
return
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export async function disabled_$($task) {
|
|
355
|
+
return ff_compiler_LspHook.make_(ff_core_Option.None(), ff_core_Option.None(), false, false)
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
export async function make_$(at_, definedAt_, insertIdentifier_, trackSymbols_, $task) {
|
|
359
|
+
return ff_compiler_LspHook.LspHook(ff_core_Option.Option_else(at_, (() => {
|
|
360
|
+
return ff_compiler_Syntax.Location("^lsp", (-7), (-7))
|
|
361
|
+
})), ff_core_Option.Option_else(definedAt_, (() => {
|
|
362
|
+
return ff_compiler_Syntax.Location("^lsp", (-7), (-7))
|
|
363
|
+
})), insertIdentifier_, trackSymbols_, ff_core_List.List_toStack(ff_core_List.Empty()))
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
export async function strictlyBetween_$(afterAt_, beforeAt_, at_, extraColumns_, $task) {
|
|
367
|
+
return (((at_.file_ === afterAt_.file_) && (((at_.line_ === afterAt_.line_) && (at_.column_ > afterAt_.column_)) || (at_.line_ > afterAt_.line_))) && (((at_.line_ === beforeAt_.line_) && (at_.column_ < (beforeAt_.column_ + extraColumns_))) || (at_.line_ < beforeAt_.line_)))
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
export async function showHook_$(hook_, $task) {
|
|
371
|
+
{
|
|
372
|
+
const hook_a = hook_;
|
|
373
|
+
{
|
|
374
|
+
if(hook_a.InferArgumentHook) {
|
|
375
|
+
const unification_ = hook_a.unification_;
|
|
376
|
+
const environment_ = hook_a.environment_;
|
|
377
|
+
const isCopy_ = hook_a.isCopy_;
|
|
378
|
+
const callAt_ = hook_a.callAt_;
|
|
379
|
+
const callName_ = hook_a.callName_;
|
|
380
|
+
const parameters_ = hook_a.parameters_;
|
|
381
|
+
const arguments_ = hook_a.arguments_;
|
|
382
|
+
const argumentIndex_ = hook_a.argumentIndex_;
|
|
383
|
+
return "InferArgumentHook(...)"
|
|
384
|
+
return
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
{
|
|
388
|
+
if(hook_a.InferFunctionDefinitionHook) {
|
|
389
|
+
const unification_ = hook_a.unification_;
|
|
390
|
+
const environment_ = hook_a.environment_;
|
|
391
|
+
const definition_ = hook_a.definition_;
|
|
392
|
+
const missing_ = hook_a.missing_;
|
|
393
|
+
return "InferFunctionDefinitionHook(...)"
|
|
394
|
+
return
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
{
|
|
398
|
+
if(hook_a.InferLambdaStartHook) {
|
|
399
|
+
const unification_ = hook_a.unification_;
|
|
400
|
+
const environment_ = hook_a.environment_;
|
|
401
|
+
const lambdaType_ = hook_a.lambdaType_;
|
|
402
|
+
return "InferLambdaStartHook(...)"
|
|
403
|
+
return
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
{
|
|
407
|
+
if(hook_a.InferLookupHook) {
|
|
408
|
+
const unification_ = hook_a.unification_;
|
|
409
|
+
const environment_ = hook_a.environment_;
|
|
410
|
+
const expected_ = hook_a.expected_;
|
|
411
|
+
const selfVariable_ = hook_a.selfVariable_;
|
|
412
|
+
const symbol_ = hook_a.symbol_;
|
|
413
|
+
const instantiated_ = hook_a.instantiated_;
|
|
414
|
+
return "InferLookupHook(...)"
|
|
415
|
+
return
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
{
|
|
419
|
+
if(hook_a.InferParameterHook) {
|
|
420
|
+
const unification_ = hook_a.unification_;
|
|
421
|
+
const environment_ = hook_a.environment_;
|
|
422
|
+
const parameter_ = hook_a.parameter_;
|
|
423
|
+
const missing_ = hook_a.missing_;
|
|
424
|
+
return "InferParameterHook(...)"
|
|
425
|
+
return
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
{
|
|
429
|
+
if(hook_a.InferPatternHook) {
|
|
430
|
+
const unification_ = hook_a.unification_;
|
|
431
|
+
const environment_ = hook_a.environment_;
|
|
432
|
+
const expected_ = hook_a.expected_;
|
|
433
|
+
const pattern_ = hook_a.pattern_;
|
|
434
|
+
return "InferPatternHook(...)"
|
|
435
|
+
return
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
{
|
|
439
|
+
if(hook_a.InferRecordFieldHook) {
|
|
440
|
+
const unification_ = hook_a.unification_;
|
|
441
|
+
const environment_ = hook_a.environment_;
|
|
442
|
+
const expected_ = hook_a.expected_;
|
|
443
|
+
const recordType_ = hook_a.recordType_;
|
|
444
|
+
const fieldName_ = hook_a.fieldName_;
|
|
445
|
+
return "InferRecordFieldHook(...)"
|
|
446
|
+
return
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
{
|
|
450
|
+
if(hook_a.InferSequentialStartHook) {
|
|
451
|
+
const unification_ = hook_a.unification_;
|
|
452
|
+
const term_ = hook_a.term_;
|
|
453
|
+
const missing_ = hook_a.missing_;
|
|
454
|
+
return "InferSequentialStartHook(...)"
|
|
455
|
+
return
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
{
|
|
459
|
+
if(hook_a.InferTermHook) {
|
|
460
|
+
const unification_ = hook_a.unification_;
|
|
461
|
+
const environment_ = hook_a.environment_;
|
|
462
|
+
const expected_ = hook_a.expected_;
|
|
463
|
+
const term_ = hook_a.term_;
|
|
464
|
+
const recordType_ = hook_a.recordType_;
|
|
465
|
+
const missing_ = hook_a.missing_;
|
|
466
|
+
return "InferTermHook(...)"
|
|
467
|
+
return
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
{
|
|
471
|
+
if(hook_a.ParseArgumentHook) {
|
|
472
|
+
const callAt_ = hook_a.callAt_;
|
|
473
|
+
const argumentIndex_ = hook_a.argumentIndex_;
|
|
474
|
+
const parameterName_ = hook_a.parameterName_;
|
|
475
|
+
return "ParseArgumentHook(...)"
|
|
476
|
+
return
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
{
|
|
480
|
+
if(hook_a.ParseSymbolBegin) {
|
|
481
|
+
return "ParseSymbolBegin(...)"
|
|
482
|
+
return
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
{
|
|
486
|
+
if(hook_a.ParseSymbolEnd) {
|
|
487
|
+
const name_ = hook_a.name_;
|
|
488
|
+
const kind_ = hook_a.kind_;
|
|
489
|
+
const selectionStart_ = hook_a.selectionStart_;
|
|
490
|
+
const selectionEnd_ = hook_a.selectionEnd_;
|
|
491
|
+
const start_ = hook_a.start_;
|
|
492
|
+
const end_ = hook_a.end_;
|
|
493
|
+
return "ParseSymbolEnd(...)"
|
|
494
|
+
return
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
{
|
|
498
|
+
if(hook_a.ResolveConstraintHook) {
|
|
499
|
+
const symbol_ = hook_a.symbol_;
|
|
500
|
+
const constrant_ = hook_a.constrant_;
|
|
501
|
+
return "ResolveConstraintHook(...)"
|
|
502
|
+
return
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
{
|
|
506
|
+
if(hook_a.ResolveSignatureHook) {
|
|
507
|
+
const signature_ = hook_a.signature_;
|
|
508
|
+
return "ResolveSignatureHook(...)"
|
|
509
|
+
return
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
{
|
|
513
|
+
if(hook_a.ResolveSymbolHook) {
|
|
514
|
+
const symbol_ = hook_a.symbol_;
|
|
515
|
+
const annotation_ = hook_a.annotation_;
|
|
516
|
+
return "ResolveSymbolHook(...)"
|
|
517
|
+
return
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
{
|
|
521
|
+
if(hook_a.ResolveTypeHook) {
|
|
522
|
+
const types_ = hook_a.types_;
|
|
523
|
+
const typeGenerics_ = hook_a.typeGenerics_;
|
|
524
|
+
const symbol_ = hook_a.symbol_;
|
|
525
|
+
const explicitType_ = hook_a.explicitType_;
|
|
526
|
+
return "ResolveTypeHook(...)"
|
|
527
|
+
return
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
{
|
|
531
|
+
if(hook_a.ResolveVariantFieldHook) {
|
|
532
|
+
const symbol_ = hook_a.symbol_;
|
|
533
|
+
const type_ = hook_a.type_;
|
|
534
|
+
const commonField_ = hook_a.commonField_;
|
|
535
|
+
return "ResolveVariantFieldHook(...)"
|
|
536
|
+
return
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
export function LspHook_isEnabled(self_) {
|
|
543
|
+
return (((self_.at_.line_ !== (-7)) || (self_.definedAt_.line_ !== (-7))) || self_.trackSymbols_)
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
export function LspHook_isAt(self_, at_) {
|
|
547
|
+
return (((self_.at_.line_ === at_.line_) && (self_.at_.column_ === at_.column_)) && (self_.at_.file_ === at_.file_))
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
export function LspHook_isDefinedAt(self_, at_) {
|
|
551
|
+
return (((self_.definedAt_.line_ === at_.line_) && (self_.definedAt_.column_ === at_.column_)) && (self_.definedAt_.file_ === at_.file_))
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
export function LspHook_emit(self_, result_) {
|
|
555
|
+
ff_core_Stack.Stack_push(self_.stackOfResults_, result_)
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
export function LspHook_results(self_) {
|
|
559
|
+
return ff_core_Stack.Stack_toList(self_.stackOfResults_, 0, 9007199254740991)
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
export async function LspHook_isEnabled$(self_, $task) {
|
|
563
|
+
return (((self_.at_.line_ !== (-7)) || (self_.definedAt_.line_ !== (-7))) || self_.trackSymbols_)
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
export async function LspHook_isAt$(self_, at_, $task) {
|
|
567
|
+
return (((self_.at_.line_ === at_.line_) && (self_.at_.column_ === at_.column_)) && (self_.at_.file_ === at_.file_))
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
export async function LspHook_isDefinedAt$(self_, at_, $task) {
|
|
571
|
+
return (((self_.definedAt_.line_ === at_.line_) && (self_.definedAt_.column_ === at_.column_)) && (self_.definedAt_.file_ === at_.file_))
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
export async function LspHook_emit$(self_, result_, $task) {
|
|
575
|
+
ff_core_Stack.Stack_push(self_.stackOfResults_, result_)
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
export async function LspHook_results$(self_, $task) {
|
|
579
|
+
return ff_core_Stack.Stack_toList(self_.stackOfResults_, 0, 9007199254740991)
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
export const ff_core_Any_HasAnyTag$ff_compiler_LspHook_SymbolHook = {
|
|
583
|
+
anyTag_() {
|
|
584
|
+
return ff_core_Any.internalAnyTag_((("ff:compiler/LspHook.SymbolHook" + "[") + "]"))
|
|
585
|
+
},
|
|
586
|
+
async anyTag_$($task) {
|
|
587
|
+
return ff_core_Any.internalAnyTag_((("ff:compiler/LspHook.SymbolHook" + "[") + "]"))
|
|
588
|
+
}
|
|
589
|
+
};
|
|
590
|
+
|
|
591
|
+
export const ff_core_Show_Show$ff_compiler_LspHook_SymbolHook = {
|
|
592
|
+
show_(value_) {
|
|
593
|
+
{
|
|
594
|
+
const value_a = value_;
|
|
595
|
+
{
|
|
596
|
+
const z_ = value_a;
|
|
597
|
+
return ((((((("SymbolHook" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.qualifiedName_)) + ", ") + ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Location.show_(z_.usageAt_)) + ", ") + ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Location.show_(z_.definedAt_)) + ")")
|
|
598
|
+
return
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
},
|
|
602
|
+
async show_$(value_, $task) {
|
|
603
|
+
{
|
|
604
|
+
const value_a = value_;
|
|
605
|
+
{
|
|
606
|
+
const z_ = value_a;
|
|
607
|
+
return ((((((("SymbolHook" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.qualifiedName_)) + ", ") + ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Location.show_(z_.usageAt_)) + ", ") + ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_Location.show_(z_.definedAt_)) + ")")
|
|
608
|
+
return
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
};
|
|
613
|
+
|
|
614
|
+
export const ff_core_Equal_Equal$ff_compiler_LspHook_SymbolHook = {
|
|
615
|
+
equals_(x_, y_) {
|
|
616
|
+
{
|
|
617
|
+
const x_a = x_;
|
|
618
|
+
const y_a = y_;
|
|
619
|
+
{
|
|
620
|
+
const _guard1 = (x_ === y_);
|
|
621
|
+
if(_guard1) {
|
|
622
|
+
return true
|
|
623
|
+
return
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
{
|
|
627
|
+
return ((x_.qualifiedName_ === y_.qualifiedName_) && (ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Location.equals_(x_.usageAt_, y_.usageAt_) && ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Location.equals_(x_.definedAt_, y_.definedAt_)))
|
|
628
|
+
return
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
},
|
|
632
|
+
async equals_$(x_, y_, $task) {
|
|
633
|
+
{
|
|
634
|
+
const x_a = x_;
|
|
635
|
+
const y_a = y_;
|
|
636
|
+
{
|
|
637
|
+
const _guard1 = (x_ === y_);
|
|
638
|
+
if(_guard1) {
|
|
639
|
+
return true
|
|
640
|
+
return
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
{
|
|
644
|
+
return ((x_.qualifiedName_ === y_.qualifiedName_) && (ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Location.equals_(x_.usageAt_, y_.usageAt_) && ff_compiler_Syntax.ff_core_Equal_Equal$ff_compiler_Syntax_Location.equals_(x_.definedAt_, y_.definedAt_)))
|
|
645
|
+
return
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
};
|
|
650
|
+
|
|
651
|
+
export const ff_core_Ordering_Order$ff_compiler_LspHook_SymbolHook = {
|
|
652
|
+
compare_(x_, y_) {
|
|
653
|
+
{
|
|
654
|
+
const x_a = x_;
|
|
655
|
+
const y_a = y_;
|
|
656
|
+
{
|
|
657
|
+
const _guard1 = (x_ === y_);
|
|
658
|
+
if(_guard1) {
|
|
659
|
+
return ff_core_Ordering.OrderingSame()
|
|
660
|
+
return
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
{
|
|
664
|
+
const qualifiedNameOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String.compare_(x_.qualifiedName_, y_.qualifiedName_);
|
|
665
|
+
if((qualifiedNameOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
666
|
+
return qualifiedNameOrdering_
|
|
667
|
+
} else {
|
|
668
|
+
const usageAtOrdering_ = ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_Location.compare_(x_.usageAt_, y_.usageAt_);
|
|
669
|
+
if((usageAtOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
670
|
+
return usageAtOrdering_
|
|
671
|
+
} else {
|
|
672
|
+
const definedAtOrdering_ = ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_Location.compare_(x_.definedAt_, y_.definedAt_);
|
|
673
|
+
if((definedAtOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
674
|
+
return definedAtOrdering_
|
|
675
|
+
} else {
|
|
676
|
+
return ff_core_Ordering.OrderingSame()
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
return
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
},
|
|
684
|
+
async compare_$(x_, y_, $task) {
|
|
685
|
+
{
|
|
686
|
+
const x_a = x_;
|
|
687
|
+
const y_a = y_;
|
|
688
|
+
{
|
|
689
|
+
const _guard1 = (x_ === y_);
|
|
690
|
+
if(_guard1) {
|
|
691
|
+
return ff_core_Ordering.OrderingSame()
|
|
692
|
+
return
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
{
|
|
696
|
+
const qualifiedNameOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String.compare_(x_.qualifiedName_, y_.qualifiedName_);
|
|
697
|
+
if((qualifiedNameOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
698
|
+
return qualifiedNameOrdering_
|
|
699
|
+
} else {
|
|
700
|
+
const usageAtOrdering_ = ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_Location.compare_(x_.usageAt_, y_.usageAt_);
|
|
701
|
+
if((usageAtOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
702
|
+
return usageAtOrdering_
|
|
703
|
+
} else {
|
|
704
|
+
const definedAtOrdering_ = ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_Location.compare_(x_.definedAt_, y_.definedAt_);
|
|
705
|
+
if((definedAtOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
706
|
+
return definedAtOrdering_
|
|
707
|
+
} else {
|
|
708
|
+
return ff_core_Ordering.OrderingSame()
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
return
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
};
|
|
717
|
+
|
|
718
|
+
export const ff_core_Serializable_Serializable$ff_compiler_LspHook_SymbolHook = {
|
|
719
|
+
serializeUsing_(serialization_, value_) {
|
|
720
|
+
{
|
|
721
|
+
const serialization_a = serialization_;
|
|
722
|
+
const value_a = value_;
|
|
723
|
+
{
|
|
724
|
+
const v_ = value_a;
|
|
725
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 30), 0);
|
|
726
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 0);
|
|
727
|
+
serialization_.offset_ += 1;
|
|
728
|
+
ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.serializeUsing_(serialization_, v_.qualifiedName_);
|
|
729
|
+
ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Location.serializeUsing_(serialization_, v_.usageAt_);
|
|
730
|
+
ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Location.serializeUsing_(serialization_, v_.definedAt_)
|
|
731
|
+
return
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
},
|
|
735
|
+
deserializeUsing_(serialization_) {
|
|
736
|
+
const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
|
|
737
|
+
serialization_.offset_ += 1;
|
|
738
|
+
{
|
|
739
|
+
const _1 = variantIndex_;
|
|
740
|
+
{
|
|
741
|
+
if(_1 == 0) {
|
|
742
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 30), 0);
|
|
743
|
+
return ff_compiler_LspHook.SymbolHook(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Location.deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Location.deserializeUsing_(serialization_))
|
|
744
|
+
return
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
{
|
|
748
|
+
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)})
|
|
749
|
+
return
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
},
|
|
753
|
+
async serializeUsing_$(serialization_, value_, $task) {
|
|
754
|
+
{
|
|
755
|
+
const serialization_a = serialization_;
|
|
756
|
+
const value_a = value_;
|
|
757
|
+
{
|
|
758
|
+
const v_ = value_a;
|
|
759
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 30), 0);
|
|
760
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 0);
|
|
761
|
+
serialization_.offset_ += 1;
|
|
762
|
+
ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.serializeUsing_(serialization_, v_.qualifiedName_);
|
|
763
|
+
ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Location.serializeUsing_(serialization_, v_.usageAt_);
|
|
764
|
+
ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Location.serializeUsing_(serialization_, v_.definedAt_)
|
|
765
|
+
return
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
},
|
|
769
|
+
async deserializeUsing_$(serialization_, $task) {
|
|
770
|
+
const variantIndex_ = ff_core_Buffer.Buffer_grabUint8(serialization_.buffer_, serialization_.offset_);
|
|
771
|
+
serialization_.offset_ += 1;
|
|
772
|
+
{
|
|
773
|
+
const _1 = variantIndex_;
|
|
774
|
+
{
|
|
775
|
+
if(_1 == 0) {
|
|
776
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 30), 0);
|
|
777
|
+
return ff_compiler_LspHook.SymbolHook(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Location.deserializeUsing_(serialization_), ff_compiler_Syntax.ff_core_Serializable_Serializable$ff_compiler_Syntax_Location.deserializeUsing_(serialization_))
|
|
778
|
+
return
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
{
|
|
782
|
+
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)})
|
|
783
|
+
return
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
};
|
|
788
|
+
|
|
789
|
+
|