Experimental/internal API for 0.2; subject to change before 0.3. Internal descriptor-driven matcher generation metadata.
Summary
Functions
Returns normalized field types for an alternative.
Returns the normalized field name.
Returns the normalized field type.
Builds a matcher descriptor from checked recursor metadata when an environment is available.
Builds a matcher descriptor from schema, matcher metadata, and recursor shape metadata.
Builds a matcher descriptor from schema and matcher metadata.
Returns whether a normalized field is recursive.
Validates descriptor consistency against matcher metadata.
Types
@type t() :: %Theoria.Equation.Matcher.Descriptor{ alternatives: [Theoria.Equation.Matcher.Descriptor.Alternative.t()], discriminants: [Theoria.Equation.Matcher.Info.Discriminant.t()], family: atom(), indexed?: boolean(), indices: [{atom(), Theoria.Term.t()}], parameters: [{atom(), Theoria.Term.t()}], recursive?: boolean(), recursor: atom(), recursor_descriptor: Theoria.Equation.Recursor.Descriptor.t() | nil, result: Theoria.Term.t() }
Functions
@spec alternative_field_types(Theoria.Equation.Matcher.Descriptor.Alternative.t()) :: [Theoria.Term.t()]
Returns normalized field types for an alternative.
@spec field_name(Theoria.Equation.Matcher.Descriptor.Field.t()) :: atom()
Returns the normalized field name.
@spec field_type(Theoria.Equation.Matcher.Descriptor.Field.t()) :: Theoria.Term.t()
Returns the normalized field type.
@spec from_env( Theoria.Env.t(), Theoria.Equation.Schema.t(), Theoria.Equation.Matcher.Info.t() ) :: {:ok, t()} | {:error, term()}
Builds a matcher descriptor from checked recursor metadata when an environment is available.
@spec from_recursor( Theoria.Equation.Schema.t(), Theoria.Equation.Matcher.Info.t(), Theoria.Equation.Recursor.Descriptor.t() ) :: {:ok, t()} | {:error, term()}
Builds a matcher descriptor from schema, matcher metadata, and recursor shape metadata.
@spec from_schema(Theoria.Equation.Schema.t(), Theoria.Equation.Matcher.Info.t()) :: {:ok, t()} | {:error, term()}
Builds a matcher descriptor from schema and matcher metadata.
@spec recursive_field?(Theoria.Equation.Matcher.Descriptor.Field.t()) :: boolean()
Returns whether a normalized field is recursive.
@spec validate(t(), Theoria.Equation.Matcher.Info.t()) :: :ok | {:error, term()}
Validates descriptor consistency against matcher metadata.