Matcha.Pattern (Matcha v0.1.1) View Source

About patterns.

Link to this section Summary

Link to this section Types

Specs

t() :: %Matcha.Pattern{
  context: Matcha.Context.t(),
  source: Matcha.Source.pattern(),
  type: Matcha.Source.type()
}

Link to this section Functions

Link to this function

filter(pattern, enumerable)

View Source

Specs

filter(t(), Enumerable.t()) :: Enumerable.t()

Specs

match!(t(), term()) :: term() | no_return()

Specs

match?(t(), term()) :: boolean()
Link to this macro

to_spec(pattern, list)

View Source (macro)

Specs

to_test_spec(t()) :: {:ok, Matcha.Spec.t()}

Specs

validate(t()) :: {:ok, t()} | {:error, Matcha.Error.problems()}

Specs

validate!(t()) :: t() | no_return()