@effectful/cc
Version:
Multi-prompt delimited continuations runtime
22 lines (21 loc) • 684 B
TypeScript
import { Frame } from "@effectful/debugger/ctrl";
export { copyFrame, push, pop } from "@effectful/debugger/ctrl";
import { context } from "@effectful/debugger/state";
export { FrameFlags } from "@effectful/debugger/state";
export { Frame, context };
export declare class Prompt<A = unknown> {
name: string;
id: number;
stack: Frame[];
___promt_tag_?: A;
constructor(name: string);
}
export declare class SubCont<A = unknown, B = unknown> {
from: Frame<A>;
till: Frame<B>;
constructor(from: Frame<A>, till: Frame<B>);
}
/**
* Creates a new prompt, distinct from all existing prompts
*/
export declare function newPrompt<A>(name?: string): Prompt<A>;