import type { EdictModule, ConcreteEffect } from "../ast/nodes.js"; import type { TypeExpr } from "../ast/types.js"; import type { StructuredError } from "../errors/structured-errors.js"; /** * Side-table of inferred types produced by the type checker. * Replaces AST mutation — downstream stages read from this instead. */ export interface TypedModuleInfo { /** fnId → inferred return type (only for functions without explicit returnType) */ inferredReturnTypes: Map; /** letExprId → inferred type (only for lets without explicit type annotation) */ inferredLetTypes: Map; /** lambdaParamId → inferred type from call-site context */ inferredLambdaParamTypes: Map; /** string_interp part nodeId → coercion builtin name (e.g. "intToString") */ stringInterpCoercions: Map; /** callArgNodeId → coercion builtin name for print/println/toString auto-coercion */ callArgCoercions: Map; /** callSiteNodeId → resolved concrete effects from effect variable unification */ resolvedCallSiteEffects: Map; } export interface TypeCheckResult { errors: StructuredError[]; typeInfo: TypedModuleInfo; } /** * Type-check a validated and name-resolved Edict module. * * Uses bidirectional type inference: infers types for expressions and checks * them against annotations. Produces a side-table of inferred types (no AST mutation). * * @param module - A validated and resolved Edict module * @returns `{ errors, typeInfo }` — errors array (empty if well-typed) and inferred type side-table */ export declare function typeCheck(module: EdictModule): TypeCheckResult; //# sourceMappingURL=check.d.ts.map