# `Lemma.Show`
[🔗](https://github.com/lemma/lemma/blob/main/lib/lemma/show.ex#L1)

Typed projection of the JSON map returned by `Lemma.show/4`: spec interface and
resolved temporal window.

`rules` values and each `data` entry's `type` are raw `LemmaType` JSON maps (a Rust
discriminated union tagged by `"kind"`), and `meta` values are raw `MetaValue` JSON
maps (tagged by `"literal"`/`"unquoted"`). Pattern-match on those tags directly
rather than through a parallel Elixir struct hierarchy — see `Lemma.ShowData`.

`Lemma.show/4` itself still returns the plain decoded JSON map for backward
compatibility; call `from_map/1` on that map to get a typed struct.

# `t`

```elixir
@type t() :: %Lemma.Show{
  commentary: String.t() | nil,
  data: %{optional(String.t()) =&gt; Lemma.ShowData.t()},
  effective_from: String.t() | nil,
  effective_to: String.t() | nil,
  meta: %{optional(String.t()) =&gt; map()},
  rules: %{optional(String.t()) =&gt; map()},
  source_type: String.t() | map() | nil,
  spec: String.t(),
  start_line: non_neg_integer(),
  versions: [Lemma.ShowVersion.t()]
}
```

# `from_map`

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

Builds a `Lemma.Show` struct from the map decoded from `Lemma.show/4`'s JSON.

Raises `KeyError` if a required field (`spec`, `start_line`, `data`, `rules`) is
missing — that shape never comes from a real `Lemma.show/4` call, so a missing
key here is a caller bug, not a recoverable `Show` variant.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
