Theoria.Equation.Matcher.Type (theoria v0.5.0)

Copy Markdown View Source

Experimental/internal API for 0.2; subject to change before 0.3. Internal builder for checked matcher declaration types and bodies for supported fragments.

Summary

Functions

Returns branch descriptors for the matcher alternatives in a schema.

Returns branch descriptors from a matcher descriptor.

Builds a matcher type for supported schemas.

Builds a matcher type from a descriptor.

Experimentally emits an indexed matcher type term without enabling checked matcher declarations.

Experimentally emits an indexed matcher value term without enabling checked matcher declarations.

Plans matcher declaration binders and body from a descriptor.

Validates planned matcher declaration shape invariants.

Builds a matcher value for supported schemas.

Builds a matcher body from a descriptor.

Functions

alternatives(schema, info)

Returns branch descriptors for the matcher alternatives in a schema.

alternatives_from_descriptor(descriptor)

Returns branch descriptors from a matcher descriptor.

build(schema, info)

Builds a matcher type for supported schemas.

from_descriptor(descriptor)

@spec from_descriptor(Theoria.Equation.Matcher.Descriptor.t()) ::
  {:ok, Theoria.Term.t()} | {:error, term()}

Builds a matcher type from a descriptor.

indexed_from_descriptor(descriptor)

@spec indexed_from_descriptor(Theoria.Equation.Matcher.Descriptor.t()) ::
  {:ok, Theoria.Term.t()} | {:error, term()}

Experimentally emits an indexed matcher type term without enabling checked matcher declarations.

indexed_value_from_descriptor(descriptor)

@spec indexed_value_from_descriptor(Theoria.Equation.Matcher.Descriptor.t()) ::
  {:ok, Theoria.Term.t()} | {:error, term()}

Experimentally emits an indexed matcher value term without enabling checked matcher declarations.

shape_from_descriptor(descriptor)

@spec shape_from_descriptor(Theoria.Equation.Matcher.Descriptor.t()) ::
  {:ok, Theoria.Equation.Matcher.Type.Shape.t()} | {:error, term()}

Plans matcher declaration binders and body from a descriptor.

validate_shape(shape)

@spec validate_shape(Theoria.Equation.Matcher.Type.Shape.t()) ::
  :ok | {:error, term()}

Validates planned matcher declaration shape invariants.

value(schema, info)

Builds a matcher value for supported schemas.

value_from_descriptor(descriptor)

@spec value_from_descriptor(Theoria.Equation.Matcher.Descriptor.t()) ::
  {:ok, Theoria.Term.t()} | {:error, term()}

Builds a matcher body from a descriptor.