import type { InterruptEffect } from "../symbolTable.js"; import type { TypeCheckerContext } from "./types.js"; import type { FunctionDefinition } from "../types.js"; /** * For every function/node that declares a `raises` clause, verify that its * transitively-inferred effect set does not exceed the declared set * (inferred ⊆ declared). Emits a bespoke, effect-aware error per offending * effect. Also reports a `raises` clause that references a known type alias * which is not an effect set. * * Compares a declaration to an inferred set; raising inside handler * bodies is legal (the retired AG3010 once flagged it). * * IMPORTANT: do not suggest "handle it inside the function" as a fix. * Under Agency's handler-chain semantics every handler in the stack runs, * so a locally-handled interrupt is still observed by ancestor handlers * and remains part of the function's effect set (spec decision A). */ export declare function checkRaisesDeclarations(interruptEffectsByFunction: Record, ctx: TypeCheckerContext): void; /** The first decorator on `def` that raises `effect`, by the name the file * calls it. The effect table is keyed by that name, imports included, so * the tag's name is the whole lookup. A decorated function's effects are * its decorators' plus its body's; when a decorator brings the effect, the * error names it, since the author did not write that raise in the body. */ export declare function decoratorCarrying(def: FunctionDefinition, effect: string, interruptEffectsByFunction: Record): string | undefined;