import type { EdictModule } from "../ast/nodes.js"; import type { StructuredError } from "../errors/structured-errors.js"; import { type AnalysisDiagnostic } from "../errors/structured-errors.js"; import type { TypedModuleInfo } from "../checker/check.js"; /** * Result of effect checking: errors (violations) + diagnostics (skipped checks). */ export interface EffectCheckResult { errors: StructuredError[]; diagnostics: AnalysisDiagnostic[]; } /** * Check effect consistency across all functions in the module. * * For each function, iterates its call edges (skipping imports): * - If caller is `pure`: any callee with non-pure effects → `effect_in_pure` error * - If caller is not `pure`: missing caller effects → `effect_violation` error * * Also checks approval propagation: if a callee requires approval, * the caller must also require approval. * * When `typeInfo` is provided, also checks resolved call-site effects from * effect variable unification (e.g., HOF called with an IO lambda). * * Skipped checks produce INFO-level diagnostics instead of silent success. * * @param module - A validated and type-checked Edict module * @param typeInfo - Optional type checker output with resolved effect variable bindings * @returns `{ errors, diagnostics }` — effect violation errors and skipped-check diagnostics */ export declare function effectCheck(module: EdictModule, typeInfo?: TypedModuleInfo): EffectCheckResult; //# sourceMappingURL=effect-check.d.ts.map