Matcha.Source (Matcha v0.1.1) View Source

About sources.

Link to this section Summary

Link to this section Types

Specs

body() :: [expression()]

Specs

clause() :: {pattern(), conditions(), body()}

Specs

compiled() :: :ets.comp_match_spec()

Specs

condition() :: expression()

Specs

conditions() :: [condition()]

Specs

expression() :: tuple()

Specs

pattern() :: tuple()

Specs

spec() :: [clause()]

Specs

test_result() ::
  {:returned, any()} | {:traced, boolean() | String.t(), trace_flags()}

Specs

test_target() :: tuple() | [tuple()] | term()

Specs

trace_flags() :: list()

Specs

type() :: :table | :trace

Link to this section Functions

Link to this function

compile(spec_source, type)

View Source

Specs

compile(spec(), type()) :: {:ok, compiled()} | {:error, Matcha.Error.problems()}

Specs

run(compiled(), list()) :: list()
Link to this function

test(source, type, test_target)

View Source

Specs

test(spec(), type(), test_target()) ::
  {:ok, test_target()} | {:error, Matcha.Error.problems()}