Experimental/internal API for 0.2; subject to change before 0.3. Checked declaration package for a generated matcher.
Summary
Functions
Builds a checked matcher declaration spec from equation metadata.
Builds an explicit checked indexed matcher declaration spec from equation metadata.
Converts the matcher spec to environment metadata.
Returns the matcher type for supported equation fragments.
Returns the matcher value for supported equation fragments.
Types
@type mode() :: :source_aligned | :matcher | :indexed_matcher
@type t() :: %Theoria.Equation.Matcher.Spec{ equation_identities: [atom()], info: Theoria.Equation.Matcher.Info.t(), level_params: [atom()], mode: mode(), name: atom(), schema: Theoria.Equation.Schema.t() | nil, source: atom(), type: Theoria.Term.t(), value: Theoria.Term.t() }
Functions
@spec from_info( Theoria.Equation.Info.t(), keyword() ) :: {:ok, t()} | {:error, term()}
Builds a checked matcher declaration spec from equation metadata.
@spec indexed_from_info( Theoria.Equation.Info.t(), keyword() ) :: {:ok, t()} | {:error, term()}
Builds an explicit checked indexed matcher declaration spec from equation metadata.
@spec metadata(t()) :: Theoria.Env.Matcher.t()
Converts the matcher spec to environment metadata.
@spec type_for( Theoria.Equation.Matcher.Info.t(), Theoria.Equation.Schema.t() | nil, Theoria.Term.t(), mode() ) :: {:ok, Theoria.Term.t()} | {:error, term()}
Returns the matcher type for supported equation fragments.
@spec value_for( Theoria.Equation.Matcher.Info.t(), Theoria.Equation.Schema.t() | nil, Theoria.Term.t(), mode() ) :: {:ok, Theoria.Term.t()} | {:error, term()}
Returns the matcher value for supported equation fragments.