PtcRunner.PreludeStore.Tools (PtcRunner v0.13.0)

Copy Markdown View Source

Private backing tools and public prelude/ wrapper source for PreludeStore.

The backing tools are intentionally private PTC-Lisp tools. User programs see only the compiled prelude/ capability prelude; private tool authority is enforced by the evaluator origin stack.

Summary

Functions

Compiled public prelude/ capability prelude.

Source for the public prelude/ capability prelude.

Reserved private backing tool names.

Returns private backing tools for store.

Raises if tools contains a reserved private store-tool name.

Functions

prelude()

@spec prelude() :: {:ok, PtcRunner.Lisp.Prelude.t()} | {:error, term()}

Compiled public prelude/ capability prelude.

prelude_source()

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

Source for the public prelude/ capability prelude.

reserved_names()

@spec reserved_names() :: [String.t()]

Reserved private backing tool names.

tools(store, opts \\ [])

@spec tools(
  PtcRunner.PreludeStore.t(),
  keyword()
) :: map()

Returns private backing tools for store.

Pass base_tools: existing_tools to fail closed before merging when the host already uses one of the reserved prelude_store_* tool names.

validate_no_reserved_collisions!(tools)

@spec validate_no_reserved_collisions!(map()) :: :ok

Raises if tools contains a reserved private store-tool name.