PtcRunner.Lisp.Eval.Capture (PtcRunner v0.14.0)

Copy Markdown View Source

The evaluator's single nestable effect-capture stack.

Capture brackets make Effects produced inside plain host callbacks explicit without creating a second effect representation. A frame owns a stable baseline, its local delta, and the cumulative effects visible to a nested callback. On every return, expected abort, throw, or exception the frame is popped exactly once and the normalized context's effects field is replaced from that authoritative frame.

Host callback binding and selection of value-versus-outcome capture belong to PtcRunner.Lisp.Eval.HostContext.

Summary

Types

value_result()

@type value_result() ::
  {:ok, term(), PtcRunner.Lisp.Eval.Context.t()}
  | {:raise, :error | :exit | :throw, term(), Exception.stacktrace(),
     PtcRunner.Lisp.Eval.Context.t()}