PtcRunner.Lisp.RuntimeCallable (PtcRunner v0.14.0)

Copy Markdown View Source

Runtime callable for effectful qualified Lisp symbols.

Values such as tool/search are not plain functions: they need an evaluator context to enforce limits, record traces, and call the configured runtime executor. The persisted value only carries the qualified name. A short-lived bound form is created at application time for higher-order runtime calls.

Inspect exposes only the qualified label and whether the callable is bound. It never renders the evaluator context or callback.

Summary

Types

namespace()

@type namespace() :: :tool

t()

@type t() :: %PtcRunner.Lisp.RuntimeCallable{
  do_eval:
    (term(), PtcRunner.Lisp.Eval.Context.t() ->
       {:ok, term(), PtcRunner.Lisp.Eval.Context.t()} | {:error, term()})
    | nil,
  eval_ctx: PtcRunner.Lisp.Eval.Context.t() | nil,
  name: atom() | binary(),
  namespace: namespace()
}

Functions

bind(callable, eval_ctx, do_eval)

@spec bind(t(), PtcRunner.Lisp.Eval.Context.t(), function()) :: t()

call(callable, args)

@spec call(t(), [term()]) :: term()

invoke(callable, args, eval_ctx)

@spec invoke(t(), [term()], PtcRunner.Lisp.Eval.Context.t()) ::
  {:ok, term(), PtcRunner.Lisp.Eval.Context.t()} | {:error, term()}

label(runtime_callable)

@spec label(t()) :: String.t()

new(namespace, name)

@spec new(namespace(), atom() | binary()) :: t()

serializable?(arg1)

@spec serializable?(term()) :: boolean()