Dsxir. Module
(dsxir v0.1.0)
Copy Markdown
Declarative user-program shell.
defmodule MyApp.MeetingNotes do
use Dsxir.Module
predictor :answer, Dsxir.Predictor.Predict, signature: MyApp.AnswerQuestion
def forward(prog, %{question: q}) do
{prog, pred} = call(prog, :answer, %{question: q})
{prog, pred}
end
endInside forward/2, call(prog, :name, inputs) dispatches through
Dsxir.Module.Runtime. Predictor names referenced in call/3 must be
declared via the predictor entity above; the compile-time verifier
catches typos. Non-literal predictor names (variables, dynamic dispatch)
bypass the static check and are validated at runtime.
Options
:extensions(list of module that adoptsSpark.Dsl.Extension) - A list of DSL extensions to add to theSpark.Dsl:otp_app(atom/0) - The otp_app to use for any application configurable options:fragments(list ofmodule/0) - Fragments to include in theSpark.Dsl. See the fragments guide for more.