ToolCall.LocalTypes (ToolCall v0.4.0)

Copy Markdown

AST-facing facade for local type expansion.

The shared expansion algorithm lives in ToolCall.LocalTypeAlgorithm; this module supplies module attributes and the legacy AST adapter.

Summary

Functions

Expands local type references in ast.

Types

instantiation()

@type instantiation() :: ToolCall.LocalTypeAlgorithm.instantiation()

Functions

expand(ast, module_or_definitions, opts \\ [])

@spec expand(term(), module() | map(), keyword()) ::
  {term(), boolean(), [instantiation()]}

Expands local type references in ast.

See ToolCall.LocalTypeAlgorithm.expand/4. The returned instantiation refs use the AST adapter's reserved :tool_call_ref syntax.