PtcRunner.Lisp.Eval.Context (PtcRunner v0.4.1)
View SourceEvaluation context for the Lisp interpreter.
Bundles the parameters that flow through recursive evaluation:
ctx: External data (read-only)user_ns: User namespace (mutable bindings fromdef)env: Lexical environment (variable bindings)tool_exec: Tool executor functionturn_history: Previous turn results for multi-turn loops
Summary
Functions
Appends a print message to the context.
Increments the iteration count and checks against the limit.
Merges new bindings into the environment.
Creates a new evaluation context.
Sets a new loop limit, respecting the hard maximum.
Updates the user namespace in the context.
Types
Functions
Appends a print message to the context.
Increments the iteration count and checks against the limit.
Merges new bindings into the environment.
Creates a new evaluation context.
Examples
iex> ctx = PtcRunner.Lisp.Eval.Context.new(%{}, %{}, %{}, fn _, _ -> nil end, [])
iex> ctx.user_ns
%{}
Sets a new loop limit, respecting the hard maximum.
Updates the user namespace in the context.