Lemma.ShowRule (lemma_engine v0.9.10)

Copy Markdown View Source

One local rule in Lemma.Show.rules.

type is the raw LemmaType JSON map. branches is the authored default/unless table as a list of maps (condition optional on the default arm; result required). Expression trees stay raw maps tagged by "type" (same wire as the JSON API). depends_on_rules is the stored local planning topo list.

Summary

Functions

Builds a Lemma.ShowRule from one value of the decoded Lemma.show/4 JSON "rules" map.

Types

t()

@type t() :: %Lemma.ShowRule{
  branches: [map()],
  depends_on_rules: [String.t()],
  type: map()
}

Functions

from_map(map)

@spec from_map(map()) :: t()

Builds a Lemma.ShowRule from one value of the decoded Lemma.show/4 JSON "rules" map.