ToolCall.TypeSource.Declaration (ToolCall v0.4.0)

Copy Markdown

A source-neutral function declaration consumed by the builder.

params and return carry ToolCall.TypeExpr values: the source resolves aliases, current-module references, and when bindings, and the compiler expands local types, hoists $defs, and produces the IR. source is compile-time provenance and is dropped from embedded tools. source_label is used in diagnostics so another source does not have to mention @spec. warnings carries non-fatal source diagnostics.

Summary

Types

t()

@type t() :: %ToolCall.TypeSource.Declaration{
  arity: non_neg_integer(),
  indirect?: boolean(),
  name: atom(),
  params: [ToolCall.TypeSource.Param.t()],
  return: ToolCall.TypeExpr.t(),
  source: term(),
  source_label: String.t(),
  warnings: [ToolCall.Diagnostic.t()]
}