Lemma.ShowRule (lemma_engine v0.10.2)

Copy Markdown View Source

One rule in Lemma.Show.rules (x-lemma-rules: this spec's graph, local plus reachable imports).

type is the raw LemmaType JSON map. path is the import hops to this rule; empty means this spec. 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 planning topo list as input_key strings.

Summary

Functions

Builds a Lemma.ShowRule from one value of the decoded Lemma.show/4 JSON "rules" map. path is required (empty list is valid).

Types

t()

@type t() :: %Lemma.ShowRule{
  branches: [map()],
  depends_on_rules: [String.t()],
  path: [Lemma.PathSegment.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. path is required (empty list is valid).