ToolCall. TypeCompiler
(ToolCall v0.4.0)
Copy Markdown
Compiles a declaration's ToolCall.TypeExpr values into ToolCall.IR.Type.
The compiler owns local-type expansion, recursive $defs hoisting, provider
mapping, and result-type handling; the declaration source has already resolved
aliases, current-module references, and when bindings. The builder remains
responsible for docs, defaults, parameter names, and overrides.
Summary
Functions
Converts the module's local type definitions once.
Types
Functions
@spec compile_param(t(), ToolCall.TypeExpr.t()) :: {ToolCall.IR.Type.t(), boolean(), t()}
@spec compile_result(t(), ToolCall.TypeExpr.t()) :: {ToolCall.IR.Type.t() | nil, boolean(), t()}
Converts the module's local type definitions once.
The result is shared by every tool in the module; new/1 only resets the
per-tool $defs budget.