Metastatic.Supplemental.Info (Metastatic v0.10.4)

View Source

Metadata structure for supplemental modules.

Contains information about a supplemental module's capabilities, dependencies, and target language.

Fields

  • :name - Unique atom identifier for this supplemental (e.g., :pykka_actor)
  • :language - Target language atom (e.g., :python, :javascript)
  • :constructs - List of MetaAST construct atoms this supplemental handles
  • :requires - List of external library dependencies with version constraints
  • :description - Human-readable description string

Example

%Info{
  name: :pykka_actor,
  language: :python,
  constructs: [:actor_call, :actor_cast, :spawn_actor],
  requires: ["pykka >= 3.0"],
  description: "Actor model support for Python via Pykka library"
}

Summary

Functions

Validates that an Info struct has all required fields properly set.

Types

t()

@type t() :: %Metastatic.Supplemental.Info{
  constructs: [atom()],
  description: String.t(),
  language: atom(),
  name: atom(),
  requires: [String.t()]
}

Functions

valid?(arg1)

@spec valid?(t()) :: boolean()

Validates that an Info struct has all required fields properly set.

Examples

iex> info = %Info{
...>   name: :test,
...>   language: :python,
...>   constructs: [:actor_call],
...>   description: "Test"
...> }
iex> Info.valid?(info)
true

iex> Info.valid?(%Info{name: nil, language: :python, constructs: [], description: "Test"})
false