Dsxir.Program.Source.Module (dsxir v0.2.0)

Copy Markdown

Source impl wrapping a static use Dsxir.Module user module.

Summary

Functions

Reconstruct a Source.Module from an artifact blob (a fully-qualified "Elixir.<...>" module-atom string). The module must already be loaded and must be a Dsxir.Module; otherwise raises Dsxir.Errors.Invalid.Module. Routes through new!/1 so the Dsxir-module check fires at load time instead of being deferred to predictors/1.

Types

t()

@type t() :: %Dsxir.Program.Source.Module{module: module()}

Functions

from_artifact_blob(mod_str)

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

Reconstruct a Source.Module from an artifact blob (a fully-qualified "Elixir.<...>" module-atom string). The module must already be loaded and must be a Dsxir.Module; otherwise raises Dsxir.Errors.Invalid.Module. Routes through new!/1 so the Dsxir-module check fires at load time instead of being deferred to predictors/1.

new!(mod)

@spec new!(module()) :: t()

Wrap mod in a Dsxir.Program.Source.Module. Raises Dsxir.Errors.Invalid.Module when mod is not a Dsxir.Module.