hinmil 0.0.0-stage → 0.2.0
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/LICENSE +21 -0
- package/README.md +2306 -2
- package/dist/cli.d.ts +15 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +338 -0
- package/dist/cli.js.map +1 -0
- package/dist/commentParser.d.ts +384 -0
- package/dist/commentParser.d.ts.map +1 -0
- package/dist/commentParser.js +2487 -0
- package/dist/commentParser.js.map +1 -0
- package/dist/config.d.ts +203 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +375 -0
- package/dist/config.js.map +1 -0
- package/dist/debugLog.d.ts +13 -0
- package/dist/debugLog.d.ts.map +1 -0
- package/dist/debugLog.js +44 -0
- package/dist/debugLog.js.map +1 -0
- package/dist/estree.d.ts +100 -0
- package/dist/estree.d.ts.map +1 -0
- package/dist/estree.js +34 -0
- package/dist/estree.js.map +1 -0
- package/dist/hm/env.d.ts +134 -0
- package/dist/hm/env.d.ts.map +1 -0
- package/dist/hm/env.js +939 -0
- package/dist/hm/env.js.map +1 -0
- package/dist/hm/index.d.ts +7 -0
- package/dist/hm/index.d.ts.map +1 -0
- package/dist/hm/index.js +26 -0
- package/dist/hm/index.js.map +1 -0
- package/dist/hm/substitution.d.ts +57 -0
- package/dist/hm/substitution.d.ts.map +1 -0
- package/dist/hm/substitution.js +546 -0
- package/dist/hm/substitution.js.map +1 -0
- package/dist/hm/typeParser.d.ts +39 -0
- package/dist/hm/typeParser.d.ts.map +1 -0
- package/dist/hm/typeParser.js +1285 -0
- package/dist/hm/typeParser.js.map +1 -0
- package/dist/hm/typeUtils.d.ts +248 -0
- package/dist/hm/typeUtils.d.ts.map +1 -0
- package/dist/hm/typeUtils.js +905 -0
- package/dist/hm/typeUtils.js.map +1 -0
- package/dist/hm/types.d.ts +738 -0
- package/dist/hm/types.d.ts.map +1 -0
- package/dist/hm/types.js +1853 -0
- package/dist/hm/types.js.map +1 -0
- package/dist/hm/unify.d.ts +59 -0
- package/dist/hm/unify.d.ts.map +1 -0
- package/dist/hm/unify.js +1700 -0
- package/dist/hm/unify.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +196 -0
- package/dist/index.js.map +1 -0
- package/dist/infer/annotation-rigid.d.ts +76 -0
- package/dist/infer/annotation-rigid.d.ts.map +1 -0
- package/dist/infer/annotation-rigid.js +542 -0
- package/dist/infer/annotation-rigid.js.map +1 -0
- package/dist/infer/annotation-validation.d.ts +109 -0
- package/dist/infer/annotation-validation.d.ts.map +1 -0
- package/dist/infer/annotation-validation.js +1078 -0
- package/dist/infer/annotation-validation.js.map +1 -0
- package/dist/infer/annotations.d.ts +277 -0
- package/dist/infer/annotations.d.ts.map +1 -0
- package/dist/infer/annotations.js +1343 -0
- package/dist/infer/annotations.js.map +1 -0
- package/dist/infer/call-overloads.d.ts +24 -0
- package/dist/infer/call-overloads.d.ts.map +1 -0
- package/dist/infer/call-overloads.js +900 -0
- package/dist/infer/call-overloads.js.map +1 -0
- package/dist/infer/call-rows.d.ts +154 -0
- package/dist/infer/call-rows.d.ts.map +1 -0
- package/dist/infer/call-rows.js +2162 -0
- package/dist/infer/call-rows.js.map +1 -0
- package/dist/infer/calls.d.ts +20 -0
- package/dist/infer/calls.d.ts.map +1 -0
- package/dist/infer/calls.js +1468 -0
- package/dist/infer/calls.js.map +1 -0
- package/dist/infer/constraints.d.ts +99 -0
- package/dist/infer/constraints.d.ts.map +1 -0
- package/dist/infer/constraints.js +1208 -0
- package/dist/infer/constraints.js.map +1 -0
- package/dist/infer/expr-assignment.d.ts +20 -0
- package/dist/infer/expr-assignment.d.ts.map +1 -0
- package/dist/infer/expr-assignment.js +620 -0
- package/dist/infer/expr-assignment.js.map +1 -0
- package/dist/infer/expr-constraint-lookup.d.ts +44 -0
- package/dist/infer/expr-constraint-lookup.d.ts.map +1 -0
- package/dist/infer/expr-constraint-lookup.js +207 -0
- package/dist/infer/expr-constraint-lookup.js.map +1 -0
- package/dist/infer/expr-functions.d.ts +20 -0
- package/dist/infer/expr-functions.d.ts.map +1 -0
- package/dist/infer/expr-functions.js +1359 -0
- package/dist/infer/expr-functions.js.map +1 -0
- package/dist/infer/expr-jsx.d.ts +19 -0
- package/dist/infer/expr-jsx.d.ts.map +1 -0
- package/dist/infer/expr-jsx.js +310 -0
- package/dist/infer/expr-jsx.js.map +1 -0
- package/dist/infer/expr-member.d.ts +40 -0
- package/dist/infer/expr-member.d.ts.map +1 -0
- package/dist/infer/expr-member.js +1154 -0
- package/dist/infer/expr-member.js.map +1 -0
- package/dist/infer/expr-prototype.d.ts +11 -0
- package/dist/infer/expr-prototype.d.ts.map +1 -0
- package/dist/infer/expr-prototype.js +202 -0
- package/dist/infer/expr-prototype.js.map +1 -0
- package/dist/infer/expressions.d.ts +40 -0
- package/dist/infer/expressions.d.ts.map +1 -0
- package/dist/infer/expressions.js +1497 -0
- package/dist/infer/expressions.js.map +1 -0
- package/dist/infer/functionPatterns.d.ts +229 -0
- package/dist/infer/functionPatterns.d.ts.map +1 -0
- package/dist/infer/functionPatterns.js +1035 -0
- package/dist/infer/functionPatterns.js.map +1 -0
- package/dist/infer/helpers.d.ts +73 -0
- package/dist/infer/helpers.d.ts.map +1 -0
- package/dist/infer/helpers.js +187 -0
- package/dist/infer/helpers.js.map +1 -0
- package/dist/infer/index.d.ts +551 -0
- package/dist/infer/index.d.ts.map +1 -0
- package/dist/infer/index.js +1127 -0
- package/dist/infer/index.js.map +1 -0
- package/dist/infer/jsx-dom.d.ts +26 -0
- package/dist/infer/jsx-dom.d.ts.map +1 -0
- package/dist/infer/jsx-dom.js +303 -0
- package/dist/infer/jsx-dom.js.map +1 -0
- package/dist/infer/moduleReps.d.ts +7 -0
- package/dist/infer/moduleReps.d.ts.map +1 -0
- package/dist/infer/moduleReps.js +48 -0
- package/dist/infer/moduleReps.js.map +1 -0
- package/dist/infer/modules.d.ts +10 -0
- package/dist/infer/modules.d.ts.map +1 -0
- package/dist/infer/modules.js +775 -0
- package/dist/infer/modules.js.map +1 -0
- package/dist/infer/narrowing.d.ts +199 -0
- package/dist/infer/narrowing.d.ts.map +1 -0
- package/dist/infer/narrowing.js +1428 -0
- package/dist/infer/narrowing.js.map +1 -0
- package/dist/infer/results.d.ts +24 -0
- package/dist/infer/results.d.ts.map +1 -0
- package/dist/infer/results.js +611 -0
- package/dist/infer/results.js.map +1 -0
- package/dist/infer/setupPass.d.ts +11 -0
- package/dist/infer/setupPass.d.ts.map +1 -0
- package/dist/infer/setupPass.js +524 -0
- package/dist/infer/setupPass.js.map +1 -0
- package/dist/infer/statements.d.ts +26 -0
- package/dist/infer/statements.d.ts.map +1 -0
- package/dist/infer/statements.js +750 -0
- package/dist/infer/statements.js.map +1 -0
- package/dist/infer/stmt-bindings.d.ts +22 -0
- package/dist/infer/stmt-bindings.d.ts.map +1 -0
- package/dist/infer/stmt-bindings.js +1482 -0
- package/dist/infer/stmt-bindings.js.map +1 -0
- package/dist/infer/stmt-destructure.d.ts +29 -0
- package/dist/infer/stmt-destructure.d.ts.map +1 -0
- package/dist/infer/stmt-destructure.js +490 -0
- package/dist/infer/stmt-destructure.js.map +1 -0
- package/dist/infer/types.d.ts +220 -0
- package/dist/infer/types.d.ts.map +1 -0
- package/dist/infer/types.js +46 -0
- package/dist/infer/types.js.map +1 -0
- package/dist/infer/unifyDiag.d.ts +46 -0
- package/dist/infer/unifyDiag.d.ts.map +1 -0
- package/dist/infer/unifyDiag.js +642 -0
- package/dist/infer/unifyDiag.js.map +1 -0
- package/dist/parsing-babel.d.ts +3 -0
- package/dist/parsing-babel.d.ts.map +1 -0
- package/dist/parsing-babel.js +353 -0
- package/dist/parsing-babel.js.map +1 -0
- package/dist/parsing.d.ts +69 -0
- package/dist/parsing.d.ts.map +1 -0
- package/dist/parsing.js +288 -0
- package/dist/parsing.js.map +1 -0
- package/dist/registries/constraintRegistry.d.ts +233 -0
- package/dist/registries/constraintRegistry.d.ts.map +1 -0
- package/dist/registries/constraintRegistry.js +803 -0
- package/dist/registries/constraintRegistry.js.map +1 -0
- package/dist/registries/dataTypeRegistry.d.ts +63 -0
- package/dist/registries/dataTypeRegistry.d.ts.map +1 -0
- package/dist/registries/dataTypeRegistry.js +180 -0
- package/dist/registries/dataTypeRegistry.js.map +1 -0
- package/dist/registries/domGlobals.d.ts +33 -0
- package/dist/registries/domGlobals.d.ts.map +1 -0
- package/dist/registries/domGlobals.js +309 -0
- package/dist/registries/domGlobals.js.map +1 -0
- package/dist/registries/methodRegistry.d.ts +277 -0
- package/dist/registries/methodRegistry.d.ts.map +1 -0
- package/dist/registries/methodRegistry.js +2074 -0
- package/dist/registries/methodRegistry.js.map +1 -0
- package/dist/registries/session.d.ts +38 -0
- package/dist/registries/session.d.ts.map +1 -0
- package/dist/registries/session.js +75 -0
- package/dist/registries/session.js.map +1 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +1896 -0
- package/dist/server.js.map +1 -0
- package/dist/services/codeActions.d.ts +22 -0
- package/dist/services/codeActions.d.ts.map +1 -0
- package/dist/services/codeActions.js +465 -0
- package/dist/services/codeActions.js.map +1 -0
- package/dist/services/completion.d.ts +259 -0
- package/dist/services/completion.d.ts.map +1 -0
- package/dist/services/completion.js +2794 -0
- package/dist/services/completion.js.map +1 -0
- package/dist/services/definitions.d.ts +37 -0
- package/dist/services/definitions.d.ts.map +1 -0
- package/dist/services/definitions.js +605 -0
- package/dist/services/definitions.js.map +1 -0
- package/dist/services/diagnosticCodes.d.ts +70 -0
- package/dist/services/diagnosticCodes.d.ts.map +1 -0
- package/dist/services/diagnosticCodes.js +239 -0
- package/dist/services/diagnosticCodes.js.map +1 -0
- package/dist/services/diagnostics.d.ts +86 -0
- package/dist/services/diagnostics.d.ts.map +1 -0
- package/dist/services/diagnostics.js +665 -0
- package/dist/services/diagnostics.js.map +1 -0
- package/dist/services/documentCache.d.ts +88 -0
- package/dist/services/documentCache.d.ts.map +1 -0
- package/dist/services/documentCache.js +108 -0
- package/dist/services/documentCache.js.map +1 -0
- package/dist/services/documentSymbols.d.ts +20 -0
- package/dist/services/documentSymbols.d.ts.map +1 -0
- package/dist/services/documentSymbols.js +381 -0
- package/dist/services/documentSymbols.js.map +1 -0
- package/dist/services/fileSelection.d.ts +24 -0
- package/dist/services/fileSelection.d.ts.map +1 -0
- package/dist/services/fileSelection.js +154 -0
- package/dist/services/fileSelection.js.map +1 -0
- package/dist/services/fileSelectionRefresh.d.ts +26 -0
- package/dist/services/fileSelectionRefresh.d.ts.map +1 -0
- package/dist/services/fileSelectionRefresh.js +77 -0
- package/dist/services/fileSelectionRefresh.js.map +1 -0
- package/dist/services/files.d.ts +342 -0
- package/dist/services/files.d.ts.map +1 -0
- package/dist/services/files.js +1712 -0
- package/dist/services/files.js.map +1 -0
- package/dist/services/fsProbe.d.ts +14 -0
- package/dist/services/fsProbe.d.ts.map +1 -0
- package/dist/services/fsProbe.js +112 -0
- package/dist/services/fsProbe.js.map +1 -0
- package/dist/services/globalsLoader.d.ts +20 -0
- package/dist/services/globalsLoader.d.ts.map +1 -0
- package/dist/services/globalsLoader.js +122 -0
- package/dist/services/globalsLoader.js.map +1 -0
- package/dist/services/hmFileServices.d.ts +113 -0
- package/dist/services/hmFileServices.d.ts.map +1 -0
- package/dist/services/hmFileServices.js +686 -0
- package/dist/services/hmFileServices.js.map +1 -0
- package/dist/services/hover.d.ts +280 -0
- package/dist/services/hover.d.ts.map +1 -0
- package/dist/services/hover.js +1687 -0
- package/dist/services/hover.js.map +1 -0
- package/dist/services/importContext.d.ts +396 -0
- package/dist/services/importContext.d.ts.map +1 -0
- package/dist/services/importContext.js +1999 -0
- package/dist/services/importContext.js.map +1 -0
- package/dist/services/projectChecker.d.ts +50 -0
- package/dist/services/projectChecker.d.ts.map +1 -0
- package/dist/services/projectChecker.js +228 -0
- package/dist/services/projectChecker.js.map +1 -0
- package/dist/services/references.d.ts +41 -0
- package/dist/services/references.d.ts.map +1 -0
- package/dist/services/references.js +757 -0
- package/dist/services/references.js.map +1 -0
- package/dist/services/rename.d.ts +22 -0
- package/dist/services/rename.d.ts.map +1 -0
- package/dist/services/rename.js +101 -0
- package/dist/services/rename.js.map +1 -0
- package/dist/services/shortCircuit.d.ts +27 -0
- package/dist/services/shortCircuit.d.ts.map +1 -0
- package/dist/services/shortCircuit.js +28 -0
- package/dist/services/shortCircuit.js.map +1 -0
- package/dist/services/sidecarPerf.d.ts +19 -0
- package/dist/services/sidecarPerf.d.ts.map +1 -0
- package/dist/services/sidecarPerf.js +59 -0
- package/dist/services/sidecarPerf.js.map +1 -0
- package/dist/services/signatureHelp.d.ts +27 -0
- package/dist/services/signatureHelp.d.ts.map +1 -0
- package/dist/services/signatureHelp.js +984 -0
- package/dist/services/signatureHelp.js.map +1 -0
- package/dist/walking.d.ts +25 -0
- package/dist/walking.d.ts.map +1 -0
- package/dist/walking.js +107 -0
- package/dist/walking.js.map +1 -0
- package/hm-types-builtin/assert.hm +20 -0
- package/hm-types-builtin/buffer.hm +8 -0
- package/hm-types-builtin/child_process.hm +16 -0
- package/hm-types-builtin/crypto.hm +17 -0
- package/hm-types-builtin/fs.hm +15 -0
- package/hm-types-builtin/http.hm +14 -0
- package/hm-types-builtin/os.hm +19 -0
- package/hm-types-builtin/path.hm +18 -0
- package/hm-types-builtin/react-dom.hm +27 -0
- package/hm-types-builtin/react.hm +113 -0
- package/hm-types-builtin/url.hm +7 -0
- package/hm-types-builtin/zlib.hm +12 -0
- package/package.json +53 -4
- package/schemas/hinmil.config.schema.json +261 -0
- package/schemas/package-hinmil.schema.json +59 -0
|
@@ -0,0 +1,551 @@
|
|
|
1
|
+
import type * as estree from '../estree';
|
|
2
|
+
import { Type, Scheme, TypeVarAllocator, AstNode, RepEntry } from '../hm/types';
|
|
3
|
+
import { Substitution } from '../hm/substitution';
|
|
4
|
+
import { TypeEnv, defaultEnv } from '../hm/env';
|
|
5
|
+
import { TypeAnnotation } from '../commentParser';
|
|
6
|
+
import { InferenceDiagnostic, ImportResolver, TypeDirectiveResolver, ImportTypeAliasResolver, InferenceResult, UNTYPED_MODULE, UntypedModule, DiagnosticSink, TypeResolutionContext, NodeTypeRecorder, UnifierContext } from './types';
|
|
7
|
+
import { freshVars, computeRestType, findConstructor, exportsToRecord } from './helpers';
|
|
8
|
+
export type { InferenceDiagnostic, ImportResolver, TypeDirectiveResolver, ImportTypeAliasResolver, InferenceResult, UntypedModule };
|
|
9
|
+
export { UNTYPED_MODULE };
|
|
10
|
+
export { markOpenWorldExports, isOpenWorldExports } from './types';
|
|
11
|
+
export { freshVars, computeRestType, findConstructor, exportsToRecord };
|
|
12
|
+
export { defaultEnv };
|
|
13
|
+
export declare class InferenceEngine implements DiagnosticSink, TypeResolutionContext, NodeTypeRecorder, UnifierContext {
|
|
14
|
+
/** @internal */ subst: Substitution;
|
|
15
|
+
/** @internal */ diagnostics: InferenceDiagnostic[];
|
|
16
|
+
/** @internal */ nodeTypes: Map<number, {
|
|
17
|
+
type: Type;
|
|
18
|
+
end: number;
|
|
19
|
+
}>;
|
|
20
|
+
/** @internal Map from a top-level binding declaration's start offset to its
|
|
21
|
+
* generalized scheme. Hover uses this to display the generic type of a
|
|
22
|
+
* polymorphic binding at its declaration site, instead of the live
|
|
23
|
+
* substitution-applied node type which downstream call sites may have
|
|
24
|
+
* specialized (e.g. a generic `getPath` shown with a concrete record). */
|
|
25
|
+
declaredSchemes: Map<number, Scheme>;
|
|
26
|
+
/** @internal */ annotationMap: Map<string, TypeAnnotation>;
|
|
27
|
+
/** @internal */ annotationByOffset: Map<number, TypeAnnotation>;
|
|
28
|
+
/** @internal */ methodSignatures: Map<number, string>;
|
|
29
|
+
/** @internal Maps every rigid skolem name (`§N`) minted while checking an
|
|
30
|
+
* annotated function body back to the annotation's display letter, so
|
|
31
|
+
* skolems can be scrubbed out of hover types and diagnostic messages. */
|
|
32
|
+
skolemDisplayNames: Map<string, string>;
|
|
33
|
+
/** @internal Origin (annotation name + comment range) of each rigid skolem.
|
|
34
|
+
* Used to attach related-information to a diagnostic when two DISTINCT
|
|
35
|
+
* skolems carrying the SAME display letter (e.g. the `a` of a method
|
|
36
|
+
* annotation vs the `a` of the enclosing factory's signature) collide in
|
|
37
|
+
* one message. */
|
|
38
|
+
skolemOrigins: Map<string, {
|
|
39
|
+
name?: string;
|
|
40
|
+
start: number;
|
|
41
|
+
end: number;
|
|
42
|
+
}>;
|
|
43
|
+
/** @internal Stack of the annotated RETURN types of the function(s) whose
|
|
44
|
+
* bodies are currently being inferred. Lets a nested method annotation
|
|
45
|
+
* (`Type#m :: Type e a ~> …` above a const inside a factory returning
|
|
46
|
+
* `Type e a`) link its receiver variables to the factory's own signature
|
|
47
|
+
* variables — the record under construction IS the receiver. */
|
|
48
|
+
enclosingAnnotatedReturns: Type[];
|
|
49
|
+
/** @internal */ importResolver: ImportResolver | null;
|
|
50
|
+
/** @internal */ typeDirectiveResolver: TypeDirectiveResolver | null;
|
|
51
|
+
/** @internal */ importTypeAliasResolver: ImportTypeAliasResolver | null;
|
|
52
|
+
/** @internal Names explicitly exported via `export`, `module.exports`, or `exports.X`. */
|
|
53
|
+
exportedNames: Set<string>;
|
|
54
|
+
/** @internal Inferred RHS type for `exports.X = expr` assignments — used when X is not bound in env. */
|
|
55
|
+
cjsExportTypes: Map<string, Type>;
|
|
56
|
+
/**
|
|
57
|
+
* @internal Names exported through `module.exports = { key: <expr> }` whose
|
|
58
|
+
* value is NOT the same-named identifier: the export's type is the
|
|
59
|
+
* property VALUE's type (from {@link cjsExportTypes}), never an unrelated
|
|
60
|
+
* env binding that happens to share the key's name.
|
|
61
|
+
*/
|
|
62
|
+
cjsValueExports: Set<string>;
|
|
63
|
+
/** @internal Type of `module.exports = { … }` — the CommonJS module value, exported as `default` for ESM interop. */
|
|
64
|
+
cjsObjectExportType: Type | null;
|
|
65
|
+
/** @internal The module uses CommonJS exports (`module.exports…` / `exports.X`). */
|
|
66
|
+
usesCjsExports: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* @internal Unannotated static-member assignments `Obj.prop = <fn>` keyed by
|
|
69
|
+
* object identifier name -> (property name -> resolved function type). Used
|
|
70
|
+
* by `buildExportMap` so a default export's static factories (e.g.
|
|
71
|
+
* `Response.Redirect = _Redirect;`) are exported cross-file even without an
|
|
72
|
+
* explicit `// Response.Redirect :: ...` annotation.
|
|
73
|
+
*/
|
|
74
|
+
staticMemberTypes: Map<string, Map<string, Type>>;
|
|
75
|
+
/** @internal Pending constraint checks: maps fresh type var id -> { constraintName, node } */
|
|
76
|
+
pendingConstraints: {
|
|
77
|
+
varId: number;
|
|
78
|
+
constraintName: string;
|
|
79
|
+
node: AstNode;
|
|
80
|
+
reps?: RepEntry[];
|
|
81
|
+
given?: boolean;
|
|
82
|
+
typeVarName?: string;
|
|
83
|
+
appliedArgNames?: string[];
|
|
84
|
+
annStart?: number;
|
|
85
|
+
annEnd?: number;
|
|
86
|
+
}[];
|
|
87
|
+
/** @internal `::rep` directives parsed from the current file (constraint representations). */
|
|
88
|
+
fileReps: RepEntry[];
|
|
89
|
+
/** @internal `::rep` representatives collected from imported schemes. These
|
|
90
|
+
* let an imported constrained function's reps satisfy constraint checks in
|
|
91
|
+
* the importing file (and propagate further on re-export). */
|
|
92
|
+
importedReps: RepEntry[];
|
|
93
|
+
/** @internal Pending structural-union constraint checks. The constrained
|
|
94
|
+
* type variable must unify with one of the listed alternatives. */
|
|
95
|
+
pendingUnionConstraints: {
|
|
96
|
+
varId: number;
|
|
97
|
+
alternatives: Type[];
|
|
98
|
+
displayName: string;
|
|
99
|
+
node: AstNode;
|
|
100
|
+
}[];
|
|
101
|
+
/** @internal Map from kind-variable id to constraint names (for hover/completion). */
|
|
102
|
+
kvConstraints: Map<number, string[]>;
|
|
103
|
+
/** @internal Rank-N: skolem name → constraint classes promised by the
|
|
104
|
+
* `forall` that minted it (incl. superclass closure). A pending
|
|
105
|
+
* constraint that resolves to such a skolem and is promised is satisfied. */
|
|
106
|
+
rankNSkolemPromises: Map<string, Set<string>>;
|
|
107
|
+
/** @internal Map from kind-variable id to applied constraint names (constraints on the constructor, e.g. Monoid (f a)). */
|
|
108
|
+
kvConstructorConstraints: Map<number, string[]>;
|
|
109
|
+
/** @internal Constraint constructor rewrites: function types to replace with constructors in post-processing. */
|
|
110
|
+
constraintConstructorRewrites: {
|
|
111
|
+
from: Type;
|
|
112
|
+
to: Type;
|
|
113
|
+
}[];
|
|
114
|
+
/** @internal When true, auto-union is suppressed (inside annotated declarations). */
|
|
115
|
+
suppressAutoUnion: boolean;
|
|
116
|
+
/** @internal Var ids that must survive per-element freshening of expanded
|
|
117
|
+
* union element types in array literals. Set by call inference to the
|
|
118
|
+
* free vars of the callee's result type: a var occurring both in the
|
|
119
|
+
* element union and the result (e.g. the params var `p` in
|
|
120
|
+
* `[Selector p] -> Tag p o`) threads element contributions into the
|
|
121
|
+
* result, so freshening it per element would sever the link. */
|
|
122
|
+
pinnedElementVarIds: Set<number> | null;
|
|
123
|
+
/** @internal Stack of yielded-type collectors, one frame per generator
|
|
124
|
+
* function currently being inferred. The `YieldExpression` inference case
|
|
125
|
+
* pushes each yielded value type onto the top frame so the function's
|
|
126
|
+
* caller-visible return type can be modelled as `Generator <yield>`. */
|
|
127
|
+
generatorYieldStack: Type[][];
|
|
128
|
+
/** @internal Names of bindings that are generator functions (`function* f`,
|
|
129
|
+
* `const f = function* () {}`). A call to one of these names yields a
|
|
130
|
+
* `Generator <element>` value rather than the function's element type. */
|
|
131
|
+
generatorFunctionNames: Set<string>;
|
|
132
|
+
/** @internal When true, suppress "Infinite type" diagnostics (annotated constrained self-recursion). */
|
|
133
|
+
suppressInfiniteType: boolean;
|
|
134
|
+
/** @internal When >0, `poisonFreeVars` is a no-op. Set during speculative
|
|
135
|
+
* overload-branch trials so a nested unification failure does not bake the
|
|
136
|
+
* `$error` sentinel into a captured branch remainder (the substitution is
|
|
137
|
+
* rolled back anyway; any genuine failure re-surfaces when a branch is
|
|
138
|
+
* actually committed). */
|
|
139
|
+
suppressPoisonDepth: number;
|
|
140
|
+
/** @internal Name of the top-level binding whose initializer is currently being inferred.
|
|
141
|
+
* Used to attribute an infinite-type (occurs-check) diagnostic to the binding
|
|
142
|
+
* (e.g. "applyArgs has an infinite type ..."). */
|
|
143
|
+
currentBindingName: string | undefined;
|
|
144
|
+
/** @internal Set when an infinite type error was suppressed during constrained annotation body inference. */
|
|
145
|
+
infiniteTypeSuppressedDuringAnnotation: boolean;
|
|
146
|
+
/** @internal Monotonic counter bumped each time the occurs check (infinite type)
|
|
147
|
+
* fires in `unifyWithDiagnostic`. Used to detect whether a binding's body
|
|
148
|
+
* inference produced an infinite type so the signature can overrule the
|
|
149
|
+
* downstream annotation-vs-body mismatch. */
|
|
150
|
+
occursCheckCount: number;
|
|
151
|
+
/** @internal applyArgs-style peeling side-table. When a concrete curried
|
|
152
|
+
* function is applied to a combinator whose parameter is a spread arrow
|
|
153
|
+
* chain `(a -> b -> ... -> z)` and whose result is a spread-array applier
|
|
154
|
+
* `[a, b, ...] -> z`, we record the function's flattened parameter list and
|
|
155
|
+
* terminal result keyed by the (inner) call node. The subsequent array
|
|
156
|
+
* application looks this up via `node.callee` to derive the peeled result
|
|
157
|
+
* type (partial application) and flag over-application. */
|
|
158
|
+
spreadChainPeel: Map<unknown, {
|
|
159
|
+
params: Type[];
|
|
160
|
+
result: Type;
|
|
161
|
+
}>;
|
|
162
|
+
/** @internal Type aliases: uppercase names mapped to their aliased type (e.g. Person -> { name: String, age: Number }). */
|
|
163
|
+
typeAliases: Map<string, Type>;
|
|
164
|
+
/** @internal Type alias var names for polymorphic expansion (e.g. TypedArray -> ['a', 'b']). */
|
|
165
|
+
typeAliasVars: Map<string, string[]>;
|
|
166
|
+
/** @internal Constructor / callable-value annotations imported from
|
|
167
|
+
* sidecars or project overrides. Consulted by `tryConstructorCallable`
|
|
168
|
+
* when a value of an uppercase TCon is invoked but the local
|
|
169
|
+
* `annotationMap` has no entry for that name (typical for values
|
|
170
|
+
* returned from a third-party package and called locally). */
|
|
171
|
+
importedConstructors: Map<string, Scheme>;
|
|
172
|
+
/** @internal Instance-callable schemes, declared via `Name() :: T`.
|
|
173
|
+
* An entry's array contains every overload declared for that name in
|
|
174
|
+
* declaration order, merged from the local source and any imported
|
|
175
|
+
* sidecars (local entries take precedence on name collision).
|
|
176
|
+
* Consulted by `tryConstructorCallable` and by hover / signature help
|
|
177
|
+
* when a value of an uppercase TCon (e.g. `QueryTag {row}`) is invoked
|
|
178
|
+
* or its overloads are surfaced. */
|
|
179
|
+
instanceCallables: Map<string, Scheme[]>;
|
|
180
|
+
/** @internal `[start, end]` source ranges of every top-level binding the
|
|
181
|
+
* engine recognizes (`VariableDeclarator`, `FunctionDeclaration`,
|
|
182
|
+
* `ClassDeclaration`). Populated from the AST after a successful parse
|
|
183
|
+
* and surfaced on the result for `trustAnnotations: 'all-bodies'`. */
|
|
184
|
+
bindingExtents: Array<{
|
|
185
|
+
start: number;
|
|
186
|
+
end: number;
|
|
187
|
+
annotated: boolean;
|
|
188
|
+
}>;
|
|
189
|
+
/** @internal Map from AST node end offset to its inferred type. Used for completion after call expressions. */
|
|
190
|
+
nodeTypesByEnd: Map<number, {
|
|
191
|
+
type: Type;
|
|
192
|
+
start: number;
|
|
193
|
+
}>;
|
|
194
|
+
/** @internal Map from an arrow/function-expression node's start offset to its
|
|
195
|
+
* inferred FUNCTION type. Recorded separately from {@link nodeTypes}
|
|
196
|
+
* because a function's start offset collides with its first parameter
|
|
197
|
+
* identifier (which wins in `nodeTypes` for hover). Hover uses this map to
|
|
198
|
+
* pick the tightest enclosing function scope when seeding display-letter
|
|
199
|
+
* assignment, so sibling body-local bindings get distinct, source-ordered
|
|
200
|
+
* letters (`n :: b`, `xs :: c`) instead of each independently grabbing the
|
|
201
|
+
* next free letter. */
|
|
202
|
+
functionNodeTypes: Map<number, {
|
|
203
|
+
type: Type;
|
|
204
|
+
end: number;
|
|
205
|
+
}>;
|
|
206
|
+
/** @internal Identifier name from `module.exports = X` or `export default X` for default export resolution. */
|
|
207
|
+
defaultExportName: string | null;
|
|
208
|
+
/** @internal Maps local binding name to the import specifier it came from (for default imports). */
|
|
209
|
+
defaultImportSources: Map<string, string>;
|
|
210
|
+
/** @internal Names of auto-detected curry wrapper functions (from spread-tuple type signatures). */
|
|
211
|
+
curryFunctionNames: Set<string>;
|
|
212
|
+
/** curryN-style wrappers: name → number of leading arguments. */
|
|
213
|
+
curryNFunctionNames: Map<string, number>;
|
|
214
|
+
/** @internal Maps a dotted member-assignment name (`Param.Path`) to the
|
|
215
|
+
* 0-based indices of trailing function parameters with JS body defaults.
|
|
216
|
+
* Consulted by call-site arity checks for `obj.prop(...)` so that
|
|
217
|
+
* trailing missing args are accepted when the implementation marks
|
|
218
|
+
* them optional via `(x = …)`. */
|
|
219
|
+
optionalParamSlotsByDottedName: Map<string, number[]>;
|
|
220
|
+
/** @internal After a curry wrapper call, this holds true to mark the next variable binding as curried. */
|
|
221
|
+
pendingIsCurriedResult: boolean;
|
|
222
|
+
/** @internal Pending conditional return info detected during function body inference. */
|
|
223
|
+
pendingConditionalReturn: {
|
|
224
|
+
paramIndex: number;
|
|
225
|
+
matchReturnTypeStr: string;
|
|
226
|
+
literalValue?: string | number | boolean | bigint | RegExp | null;
|
|
227
|
+
isTruthiness?: boolean;
|
|
228
|
+
} | null;
|
|
229
|
+
/** @internal Set of node start offsets whose bindings are curried. */
|
|
230
|
+
curriedNodes: Set<number>;
|
|
231
|
+
/** @internal Maps a call's callee start offset to the index of the
|
|
232
|
+
* overload branch that matched the actual arguments (for hover /
|
|
233
|
+
* signature help to surface only the selected overload). */
|
|
234
|
+
callSiteOverloadIndex: Map<number, number>;
|
|
235
|
+
/** @internal Set of offsets where an unbound-variable diagnostic was raised. */
|
|
236
|
+
unboundIdentifiers: Set<number>;
|
|
237
|
+
/** @internal Set of offsets where property access occurred on an unconstrained type variable. */
|
|
238
|
+
unconstrainedPropAccesses: Set<number>;
|
|
239
|
+
/** @internal Property accesses on a still-unresolved TVar receiver, parked
|
|
240
|
+
* for late re-resolution. When later unification pins the receiver to a
|
|
241
|
+
* concrete type (e.g. the data argument of a curried annotated `map`
|
|
242
|
+
* arriving AFTER the callback), the member is looked up again and its
|
|
243
|
+
* type is unified with the placeholder result var — so `s => s.length`
|
|
244
|
+
* resolves to `String -> Number` instead of staying `s -> b`. */
|
|
245
|
+
deferredMemberAccesses: Array<{
|
|
246
|
+
objType: Type;
|
|
247
|
+
propName: string;
|
|
248
|
+
resultType: Type;
|
|
249
|
+
propStart: number;
|
|
250
|
+
}>;
|
|
251
|
+
/** @internal Set of `TypeName#propName` for properties assigned via `this.prop = ...` in constructors. */
|
|
252
|
+
constructorProperties: Set<string>;
|
|
253
|
+
/** @internal Map of `TypeName##privateName` -> Type for private class fields and methods. */
|
|
254
|
+
privateClassMembers: Map<string, Type>;
|
|
255
|
+
/**
|
|
256
|
+
* @internal Provenance of top-level constructor-like bindings, used to
|
|
257
|
+
* decide how `.constructor` should be typed and whether `new` is required.
|
|
258
|
+
* - `'class'` : `class Foo { ... }`
|
|
259
|
+
* - `'function-this'` : `function Foo(){ this.x = ... }` style constructor
|
|
260
|
+
* - `'arrow-factory'` : `const Foo = (...) => ({...})` — runtime returns Object
|
|
261
|
+
* - `'sumtype'` : registered `@sumtype` root name
|
|
262
|
+
* - `'sumtype-variant'` : variant of an `@sumtype` declaration
|
|
263
|
+
*/
|
|
264
|
+
constructorProvenance: Map<string, "class" | "function-this" | "arrow-factory" | "sumtype" | "sumtype-variant">;
|
|
265
|
+
/**
|
|
266
|
+
* @internal Map from a `.constructor` property-node start offset to the
|
|
267
|
+
* parent sumtype name (e.g. `Maybe`). Populated by
|
|
268
|
+
* `inferTConConstructorAccess` so hover can surface the parent sumtype
|
|
269
|
+
* declaration alongside the constructor's type.
|
|
270
|
+
*/
|
|
271
|
+
constructorParentSumtype: Map<number, string>;
|
|
272
|
+
/**
|
|
273
|
+
* @internal Map from a `.constructor` property-node start offset to the
|
|
274
|
+
* built-in type name (`'Array'`, `'Function'`, …) when the access was
|
|
275
|
+
* resolved via `builtinConstructorType`. Used by call-site logic to
|
|
276
|
+
* specialise the return type (e.g. widen `Array(...)` to a union of arg
|
|
277
|
+
* element types) without piping the receiver through unification.
|
|
278
|
+
*/
|
|
279
|
+
builtinCtorKind: Map<number, string>;
|
|
280
|
+
/**
|
|
281
|
+
* @internal Name-keyed propagation of `builtinCtorKind`. When a
|
|
282
|
+
* declarator's init is a `.constructor` access tagged with a builtin
|
|
283
|
+
* kind, the declared name maps to that kind so subsequent call sites
|
|
284
|
+
* (`const ac = [].constructor; ac(1,2)`) can specialise. Names are
|
|
285
|
+
* module-scoped (last write wins) — this is best-effort, not lexical.
|
|
286
|
+
*/
|
|
287
|
+
builtinCtorByVarName: Map<string, string>;
|
|
288
|
+
/** @internal See InferenceResult.frozenPropertyTypeStr. */
|
|
289
|
+
frozenPropertyTypeStr: Map<number, string>;
|
|
290
|
+
/** @internal See InferenceResult.frozenParamType. */
|
|
291
|
+
frozenParamType: Map<number, Type>;
|
|
292
|
+
/** @internal When set, union-vs-expected diagnostics report on this node (the enclosing annotated method). */
|
|
293
|
+
annotationMethodNode: AstNode | null;
|
|
294
|
+
/** Function node whose annotation is checked by its enclosing `const`
|
|
295
|
+
* binding (body skolemized via annotationByOffset, validated in
|
|
296
|
+
* stmt-bindings like a `function` declaration) — the inline-annotation
|
|
297
|
+
* validation in inferFunctionExpression skips it. */
|
|
298
|
+
annotationCheckedByBinding: AstNode | null;
|
|
299
|
+
/** Lexically scoped annotation type variables (letter → enclosing body
|
|
300
|
+
* skolem); see inferFunctionExpression in expr-functions.ts. */
|
|
301
|
+
scopedTypeVars: Map<string, Type>;
|
|
302
|
+
/** Row variables of the parameters of the functions whose bodies are
|
|
303
|
+
* being checked against their own annotation. Reading a field outside
|
|
304
|
+
* such a row is an error; a row that is not in this set gains the field
|
|
305
|
+
* (see the open-record case in expr-member.ts). */
|
|
306
|
+
rigidRowIds: Set<number>;
|
|
307
|
+
/** Local type equalities in force while inferring the true branch of a
|
|
308
|
+
* `::narrow C` guard on a value of abstract type `f a` (`isArray (xs)`
|
|
309
|
+
* with `xs :: f a`): `f ≡ C` holds INSIDE the branch only. A `return`
|
|
310
|
+
* there of type `C x` is re-expressed as `f x` (see `returnTypeOverrides`)
|
|
311
|
+
* so the branch never pins `f` for the whole function. */
|
|
312
|
+
localKindEqs: {
|
|
313
|
+
varId: number;
|
|
314
|
+
varName: string;
|
|
315
|
+
con: string;
|
|
316
|
+
arity: number;
|
|
317
|
+
}[];
|
|
318
|
+
/** The inferred type of each `return` statement inferred through the
|
|
319
|
+
* statement path (re-expressed under `localKindEqs` where they apply). */
|
|
320
|
+
returnTypeOverrides: Map<estree.AnyNode, Type>;
|
|
321
|
+
/** Each declaration's own annotation (overloads merged), by node start —
|
|
322
|
+
* see `buildAnnotationsByDeclaration`. */
|
|
323
|
+
annotationsByDeclaration: Map<number, TypeAnnotation>;
|
|
324
|
+
/** @internal Bound version of addDiag for passing to helpers. */
|
|
325
|
+
readonly boundAddDiag: (message: string, loc: {
|
|
326
|
+
start: number;
|
|
327
|
+
end: number;
|
|
328
|
+
}, relatedInformation?: {
|
|
329
|
+
message: string;
|
|
330
|
+
start: number;
|
|
331
|
+
end: number;
|
|
332
|
+
}[], severity?: number) => void;
|
|
333
|
+
/**
|
|
334
|
+
* Per-engine type-variable allocator. Installed as the *active* allocator
|
|
335
|
+
* at the start of {@link infer} so that every `tVar()` call during this
|
|
336
|
+
* run uses this engine's counter.
|
|
337
|
+
*/
|
|
338
|
+
readonly allocator: TypeVarAllocator;
|
|
339
|
+
/**
|
|
340
|
+
* Project-level globals source (from `globals.hm` or configured file).
|
|
341
|
+
* Set once by the server; used automatically by every `infer()` call.
|
|
342
|
+
*/
|
|
343
|
+
globalsSource: string | null;
|
|
344
|
+
/** `::global` members from the globals file (re-registered with aliases
|
|
345
|
+
* expanded during setup). */
|
|
346
|
+
globalDirectiveMethods: {
|
|
347
|
+
name: string;
|
|
348
|
+
ann: import('../commentParser').TypeAnnotation;
|
|
349
|
+
}[];
|
|
350
|
+
/**
|
|
351
|
+
* Infer types for a JavaScript source string.
|
|
352
|
+
* @param source The JavaScript source code
|
|
353
|
+
* @param env Optional base type environment
|
|
354
|
+
* @param importResolver Optional callback to resolve import specifiers to exported types
|
|
355
|
+
* @param typeDirectiveResolver Optional callback to resolve `// ::types` directives to source code
|
|
356
|
+
* @param importTypeAliasResolver Optional callback to resolve import specifiers to type aliases
|
|
357
|
+
*/
|
|
358
|
+
infer(source: string, env?: TypeEnv, importResolver?: ImportResolver, typeDirectiveResolver?: TypeDirectiveResolver, importTypeAliasResolver?: ImportTypeAliasResolver): InferenceResult;
|
|
359
|
+
private inferInScope;
|
|
360
|
+
inferProgramWithEnv(program: estree.Program, env: TypeEnv): [TypeEnv, Type];
|
|
361
|
+
inferStatement(node: AstNode, env: TypeEnv): [TypeEnv, Type];
|
|
362
|
+
inferVariableDeclaration(node: estree.VariableDeclaration, env: TypeEnv): [TypeEnv, Type];
|
|
363
|
+
inferNamedBinding(name: string, decl: estree.VariableDeclarator, env: TypeEnv, nodeKind: string, parentStart?: number): {
|
|
364
|
+
scheme: Scheme;
|
|
365
|
+
displayType: Type;
|
|
366
|
+
};
|
|
367
|
+
inferFunctionDeclaration(node: estree.FunctionDeclaration | estree.AnonymousFunctionDeclaration, env: TypeEnv): [TypeEnv, Type];
|
|
368
|
+
inferObjectDestructuring(decl: estree.VariableDeclarator, env: TypeEnv, kind: string): {
|
|
369
|
+
env: TypeEnv;
|
|
370
|
+
lastType: Type;
|
|
371
|
+
};
|
|
372
|
+
inferDestructuringPattern(pattern: AstNode, sourceType: Type, env: TypeEnv, kind: string, freezeLeaves?: boolean): {
|
|
373
|
+
env: TypeEnv;
|
|
374
|
+
};
|
|
375
|
+
inferWhileStatement(node: estree.WhileStatement, env: TypeEnv): [TypeEnv, Type];
|
|
376
|
+
inferDoWhileStatement(node: estree.DoWhileStatement, env: TypeEnv): [TypeEnv, Type];
|
|
377
|
+
inferForStatement(node: estree.ForStatement, env: TypeEnv): [TypeEnv, Type];
|
|
378
|
+
inferForInStatement(node: estree.ForInStatement, env: TypeEnv): [TypeEnv, Type];
|
|
379
|
+
inferForOfStatement(node: estree.ForOfStatement, env: TypeEnv): [TypeEnv, Type];
|
|
380
|
+
inferSwitchStatement(node: estree.SwitchStatement, env: TypeEnv): [TypeEnv, Type];
|
|
381
|
+
inferTryStatement(node: estree.TryStatement, env: TypeEnv): [TypeEnv, Type];
|
|
382
|
+
inferExpression(node: AstNode, env: TypeEnv): Type;
|
|
383
|
+
inferExpressionWithExpected(node: AstNode, env: TypeEnv, expectedType: Type | undefined): Type;
|
|
384
|
+
inferFunctionExpression(node: AstNode, env: TypeEnv, expectedType?: Type): Type;
|
|
385
|
+
inferMemberExpression(node: estree.MemberExpression, env: TypeEnv): Type;
|
|
386
|
+
tryInferPrototypeMethodAssignment(node: estree.AssignmentExpression, env: TypeEnv): Type | null;
|
|
387
|
+
inferCallExpression(node: estree.CallExpression, env: TypeEnv, expectedResultType?: Type): Type;
|
|
388
|
+
/** Rank-N subsumption check of an expression against a `forall` type
|
|
389
|
+
* (delegates to calls.ts; also used for record-field construction). */
|
|
390
|
+
inferRankNArgument(node: AstNode, env: TypeEnv, expected: Extract<Type, {
|
|
391
|
+
tag: 'TForall';
|
|
392
|
+
}>, rankNSkolems: Set<string>): Type;
|
|
393
|
+
inferImportDeclaration(node: estree.ImportDeclaration, env: TypeEnv): TypeEnv;
|
|
394
|
+
inferExportNamedDeclaration(node: estree.ExportNamedDeclaration, env: TypeEnv): [TypeEnv, Type];
|
|
395
|
+
inferExportDefaultDeclaration(node: estree.ExportDefaultDeclaration, env: TypeEnv): [TypeEnv, Type];
|
|
396
|
+
inferExportAllDeclaration(node: estree.ExportAllDeclaration, env: TypeEnv): [TypeEnv, Type];
|
|
397
|
+
inferClassDeclaration(node: estree.ClassDeclaration | estree.AnonymousClassDeclaration, env: TypeEnv): [TypeEnv, Type];
|
|
398
|
+
/** Record a constraint on a kind-variable — see `src/infer/constraints.ts`. */
|
|
399
|
+
private registerKvConstraint;
|
|
400
|
+
/**
|
|
401
|
+
* Instantiate a scheme and register pending constraint checks for any
|
|
402
|
+
* constrained type variables — see `src/infer/constraints.ts`.
|
|
403
|
+
*/
|
|
404
|
+
instantiateWithConstraints(scheme: Scheme, node: AstNode, annotation?: TypeAnnotation, skipPendingConstraints?: boolean, preBindings?: Map<string, Type>, asGiven?: boolean): Type;
|
|
405
|
+
/** Register constraint info for static method body parameter TVars — see `src/infer/constraints.ts`. */
|
|
406
|
+
registerStaticMethodConstraints(scheme: Scheme, bodyType: Type): void;
|
|
407
|
+
/**
|
|
408
|
+
* Count pending constraints whose variable has resolved (under the CURRENT
|
|
409
|
+
* substitution) to a concrete type that does NOT satisfy the constraint.
|
|
410
|
+
* Read-only mirror of {@link validatePendingConstraints} (emits no
|
|
411
|
+
* diagnostics). Used by overload selection to reject a branch that would
|
|
412
|
+
* pin a constraint variable to an incompatible type (e.g. selecting the
|
|
413
|
+
* `Category c => TypeRep c -> c` overload of `id` for `id(Function)` when
|
|
414
|
+
* `Function` does not satisfy `Category`).
|
|
415
|
+
*/
|
|
416
|
+
countViolatedPendingConstraints(): number;
|
|
417
|
+
/**
|
|
418
|
+
* Report constraints that a callee REQUIRES on an enclosing function's own
|
|
419
|
+
* (still-polymorphic) type variable but which the enclosing signature never
|
|
420
|
+
* DECLARES. Haskell's "No instance for (C a) arising from a use of …".
|
|
421
|
+
*
|
|
422
|
+
* Mechanism: an annotated constrained function body instantiates its OWN
|
|
423
|
+
* signature as the authoritative expected type (`asGiven` → pending
|
|
424
|
+
* constraints tagged `given`). Callees referenced in the body push their
|
|
425
|
+
* required constraints (wanted, `given` unset) onto vars that unify with the
|
|
426
|
+
* enclosing function's declared type vars — so both givens and wanteds share
|
|
427
|
+
* the same resolved var id (a bare TVar or a still-polymorphic `$kv:name:id`
|
|
428
|
+
* higher-kinded TCon). A wanted whose class is not entailed by the given
|
|
429
|
+
* closure on that var (via `extends` superclasses) is an under-declared
|
|
430
|
+
* constraint. Only fires when the var carries at least one given, i.e. it
|
|
431
|
+
* belongs to an annotated constrained function — never on inferred /
|
|
432
|
+
* unconstrained polymorphic code.
|
|
433
|
+
*/
|
|
434
|
+
validateMissingConstraints(): void;
|
|
435
|
+
/**
|
|
436
|
+
* Validate all pending constraints after inference is complete.
|
|
437
|
+
* Checks that each constrained type variable resolved to a concrete type
|
|
438
|
+
* that satisfies the constraint (i.e., has all required methods registered).
|
|
439
|
+
*/
|
|
440
|
+
validatePendingConstraints(): void;
|
|
441
|
+
/**
|
|
442
|
+
* Validate pending structural-union constraints. Each constrained type
|
|
443
|
+
* variable must unify with at least one of the listed alternatives.
|
|
444
|
+
* The first alternative that successfully unifies wins; its substitution
|
|
445
|
+
* is committed to the engine. If none unify, a diagnostic is emitted.
|
|
446
|
+
* Variables still unresolved at this point are left alone (no diagnostic).
|
|
447
|
+
*/
|
|
448
|
+
validatePendingUnionConstraints(): void;
|
|
449
|
+
/**
|
|
450
|
+
* Post-process a type by replacing constrained function types with their
|
|
451
|
+
* constructor names. E.g. replaces `a -> Identity a` with `Identity`
|
|
452
|
+
* inside `EitherT e (a -> Identity a) String` → `EitherT e Identity String`.
|
|
453
|
+
* Only rewrites nested occurrences (type args, function params/results,
|
|
454
|
+
* record fields) — not the top-level type itself, so that a standalone
|
|
455
|
+
* variable like `Identity :: a -> Identity a` keeps its function type.
|
|
456
|
+
*/
|
|
457
|
+
applyConstraintConstructorRewrites(t: Type): Type;
|
|
458
|
+
/** Shorthand for pushing a diagnostic with a message and node location. */
|
|
459
|
+
addDiag(message: string, loc: {
|
|
460
|
+
start: number;
|
|
461
|
+
end: number;
|
|
462
|
+
}, relatedInformation?: {
|
|
463
|
+
message: string;
|
|
464
|
+
start: number;
|
|
465
|
+
end: number;
|
|
466
|
+
}[], severity?: number): void;
|
|
467
|
+
/** Record skolem→letter mappings minted while checking an annotated body.
|
|
468
|
+
* `origin` (the declaring annotation's name + comment range) enables the
|
|
469
|
+
* same-letter collision disambiguation in diagnostics. */
|
|
470
|
+
registerSkolemNames(skolemToName: Map<string, string>, origin?: {
|
|
471
|
+
name?: string;
|
|
472
|
+
start: number;
|
|
473
|
+
end: number;
|
|
474
|
+
}): void;
|
|
475
|
+
/** Replace rigid skolem constants in a type with display vars carrying the
|
|
476
|
+
* annotation's letters, so hover never shows `§N`. */
|
|
477
|
+
scrubForDisplay(t: Type): Type;
|
|
478
|
+
/** Replace `§N` skolem tokens in a finished diagnostic string with the
|
|
479
|
+
* annotation's display letters (or `_` when unknown). */
|
|
480
|
+
scrubSkolemString(message: string): string;
|
|
481
|
+
/** Collision-aware skolem scrubbing. Two DISTINCT skolems carrying the
|
|
482
|
+
* SAME letter (the `a` of a method annotation vs the `a` of the enclosing
|
|
483
|
+
* function's signature) would otherwise render an unreadable
|
|
484
|
+
* "Cannot unify 'a' with 'a'" — the second distinct skolem gets a prime
|
|
485
|
+
* suffix (`a'`), and each collided skolem with a known origin contributes
|
|
486
|
+
* a related-information entry pointing at its declaring annotation. */
|
|
487
|
+
scrubSkolemStringDetailed(message: string): {
|
|
488
|
+
message: string;
|
|
489
|
+
related: {
|
|
490
|
+
message: string;
|
|
491
|
+
start: number;
|
|
492
|
+
end: number;
|
|
493
|
+
}[];
|
|
494
|
+
};
|
|
495
|
+
/** Look up an annotation by name, falling back to offset-based method annotations. */
|
|
496
|
+
lookupAnnotation(name: string | undefined, offset: number): TypeAnnotation | undefined;
|
|
497
|
+
/** Diagnostic-producing unification — see `src/infer/unifyDiag.ts`. */
|
|
498
|
+
unifyWithDiagnostic(t1: Type, t2: Type, node: AstNode): void;
|
|
499
|
+
/** Directional variant of `unifyWithDiagnostic` for the call-argument
|
|
500
|
+
* position — see `src/infer/unifyDiag.ts`. */
|
|
501
|
+
unifyArgWithDiagnostic(argType: Type, paramType: Type, node: AstNode): void;
|
|
502
|
+
/** Shorthand for `checkAnnotationRigid` with bound engine state. */
|
|
503
|
+
checkRigid(inferredType: Type, scheme: Scheme, node: AstNode): void;
|
|
504
|
+
/** Expand a TCon alias if registered, instantiating any free alias vars
|
|
505
|
+
* with fresh TVars when the use-site provides no type arguments. Used
|
|
506
|
+
* by call/array/array-elem code paths where the alias appears bare (e.g.
|
|
507
|
+
* `[Selector]` for `Selector :: (String | Prop a | QueryTag a | ...)`),
|
|
508
|
+
* so each occurrence binds its own fresh type variables. */
|
|
509
|
+
maybeExpandAlias(t: Type): Type;
|
|
510
|
+
/** Auto-union bridging on unification failure — see `src/infer/unifyDiag.ts`. */
|
|
511
|
+
tryAutoUnion(t1: Type, r1: Type, t2: Type, r2: Type): boolean;
|
|
512
|
+
/** TCon ↔ TFun bridging via instance-callable annotations — see `src/infer/unifyDiag.ts`. */
|
|
513
|
+
tryConstructorCallable(t1: Type, r1: Type, t2: Type, r2: Type): boolean;
|
|
514
|
+
/** Deepest concretely-bound TVar in a substitution chain — see `src/infer/unifyDiag.ts`. */
|
|
515
|
+
findRootTVarId(t: Type): number | null;
|
|
516
|
+
recordNodeType(node: AstNode, type: Type): void;
|
|
517
|
+
/** Lookup an inferred node type by AST node start offset. Used by
|
|
518
|
+
* post-processing hooks (such as the `Picked` projection in
|
|
519
|
+
* `infer/calls.ts`) that need to inspect the resolved type of a
|
|
520
|
+
* sub-expression by AST identity. Falls back to the by-end-offset
|
|
521
|
+
* map when no entry was recorded at the start offset (e.g. a
|
|
522
|
+
* CallExpression whose callee Identifier already claimed the start
|
|
523
|
+
* slot first via `recordNodeType`'s overlap guard). */
|
|
524
|
+
getNodeType(node: AstNode): Type | undefined;
|
|
525
|
+
/**
|
|
526
|
+
* Coordinately instantiate receiver + methodType from a method annotation,
|
|
527
|
+
* ensuring both share the same fresh type variables.
|
|
528
|
+
* Pre-condition: ann.scheme, ann.receiver, and ann.methodType must be defined.
|
|
529
|
+
*/
|
|
530
|
+
coordinateInstantiate(ann: TypeAnnotation): {
|
|
531
|
+
thisType: Type;
|
|
532
|
+
expectedType: Type;
|
|
533
|
+
};
|
|
534
|
+
/**
|
|
535
|
+
* Skolem variant of `coordinateInstantiate`: instantiate receiver +
|
|
536
|
+
* methodType with rigid skolem constants (shared across both) instead of
|
|
537
|
+
* fresh unifiable TVars. Used when checking an annotated method body so the
|
|
538
|
+
* body cannot poison the annotation's parameter / `this` / return display.
|
|
539
|
+
* Also returns the skolem→name map so the rigid types can be scrubbed back
|
|
540
|
+
* to the annotation's letters for hover display and diagnostics.
|
|
541
|
+
*/
|
|
542
|
+
coordinateInstantiateSkolem(ann: TypeAnnotation, preBindings?: Map<number, Type>): {
|
|
543
|
+
thisType: Type;
|
|
544
|
+
expectedType: Type;
|
|
545
|
+
skolemToName: Map<string, string>;
|
|
546
|
+
};
|
|
547
|
+
propagateCurryFlags(scheme: Scheme, localName: string, nodeStart: number): void;
|
|
548
|
+
/** Shorthand: apply the current substitution to a type. */
|
|
549
|
+
resolve(t: Type): Type;
|
|
550
|
+
}
|
|
551
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/infer/index.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,KAAK,MAAM,MAAM,WAAW,CAAC;AAEzC,OAAO,EACL,IAAI,EACJ,MAAM,EAKN,gBAAgB,EAGhB,OAAO,EACP,QAAQ,EAET,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,UAAU,EAA8D,MAAM,WAAW,CAAC;AAC5G,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AASlD,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACvO,OAAO,EAAE,SAAS,EAAE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