on 651b8ec help sign in
.gitignore−5
since splitsnapshots
unifiedsplit
@@ -1,7 +1,2 @@
1__pycache__/
1__pycache__/
2*.pyc
2*.pyc
3−result
4−result-*
5−
6−# Generated by tools/ship gen-tests; desk assembly regenerates it.
7−/tests/lib/jibb.hoon
LICENSEdeleted−21
@@ -1,21 +0,0 @@
1−MIT License
2−
3−Copyright (c) 2026 the Jibb authors
4−
5−Permission is hereby granted, free of charge, to any person obtaining a copy
6−of this software and associated documentation files (the "Software"), to deal
7−in the Software without restriction, including without limitation the rights
8−to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9−copies of the Software, and to permit persons to whom the Software is
10−furnished to do so, subject to the following conditions:
11−
12−The above copyright notice and this permission notice shall be included in all
13−copies or substantial portions of the Software.
14−
15−THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16−IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17−FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18−AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19−LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20−OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21−SOFTWARE.
README.md+7−61
@@ -1,6 +1,6 @@
1# Jibb
1# Jibb
2
2
3−Jibb is a UI language for Urbit: a Hoon dialect with an indentation layout. Its design doc, [Jibb — an Elm-architecture UI language for Urbit](https://claude.ai/artifact/DMBr48qzi5z8hcwn2ccPBv), is the spec. Its copy in [docs/spec/](docs/spec/) records decisions the doc doesn't have yet, so until the doc is synced, that copy wins where it and the doc differ, and where this code and the spec disagree, the spec wins.
3+Jibb is a UI language for Urbit: a Hoon dialect with an indentation layout. Its design doc, [Jibb — an Elm-architecture UI language for Urbit](https://claude.ai/artifact/DMBr48qzi5z8hcwn2ccPBv), is the spec, and where this code and the doc disagree, the doc wins.
4
4
5Milestone 1 of the doc's eight, the parser and the `%jibb` mark, is done; milestone 2, types and prelude, is in progress. The type checker and Hoon importer are partial. [docs/](docs/) holds a copy of the doc's tabs, the status of each milestone, the open questions, a development guide, a map of the compiler, and the brief for milestone 2.
5Milestone 1 of the doc's eight, the parser and the `%jibb` mark, is done; milestone 2, types and prelude, is in progress. The type checker and Hoon importer are partial. [docs/](docs/) holds a copy of the doc's tabs, the status of each milestone, the open questions, a development guide, a map of the compiler, and the brief for milestone 2.
6
6
@@ -10,27 +10,10 @@ Milestone 1 of the doc's eight, the parser and the `%jibb` mark, is done; milest
10- `jibb/`: the `%jibb` desk, for the shared host (milestone 4).
10- `jibb/`: the `%jibb` desk, for the shared host (milestone 4).
11- `my-app/`: an example app desk built from the doc's worked examples.
11- `my-app/`: an example app desk built from the doc's worked examples.
12- `vendor/`: pinned copies of the base-dev and landscape files the desks need.
12- `vendor/`: pinned copies of the base-dev and landscape files the desks need.
13−- `tests/`: golden cases in `golden/<case>/`, test suites in `lib/` and their fixtures, for `tools/test-arms` and the ship's `-test` thread, and in `clay-fixtures/`, the threads `tools/clay-fixtures` runs and, in `clay-fixtures/desk/`, the Hoon files the `jibb-fixtures` desk adds to `my-app`. `lib/jibb.hoon`, which runs the golden cases on the ship, is generated.
13+- `tests/`: golden cases in `golden/<case>/`, and on-ship tests for the `-test` thread in `lib/jibb.hoon`.
14−- `tools/`: dev tooling: `golden`, `test-arms`, `hoon` and `doc-blocks`, with their self-test in `testdata/`, `ship`, and `check`, which runs every check.
14+- `tools/`: dev tooling: `golden`, `hoon` and `doc-blocks`, with their self-test in `testdata/`, and `ship`.
15- `docs/`: the doc's tabs as Markdown in `spec/`, the status, the open questions, the development guide, the compiler's map, and briefs for milestones in `prompts/`.
15- `docs/`: the doc's tabs as Markdown in `spec/`, the status, the open questions, the development guide, the compiler's map, and briefs for milestones in `prompts/`.
16
16
17−## Building and checking with Nix
18−
19−The flake (`flake.nix`, pinned by `flake.lock`) builds the desks and runs every check, with vere 4.6, Python 3, click and the brass pill pinned:
20−
21−```
22−nix build # result/my-app, result/jibb, result/jibb-dev, result/jibb-fixtures: the desks
23−nix flake check # every check: the eval group and, on Linux, the ship group on a fresh fake ~zod
24−nix develop # a shell with urbit, python3 and click, for running the tools by hand
25−nix build .#fakezod # a freshly booted fake ~zod pier (Linux)
26−```
27−
28−Jibb has no native binary: what it ships is desks, Hoon and Jibb source that a ship builds. So `nix build` writes the four desks exactly as `tools/ship sync` would commit them (it runs `tools/ship assemble`), and compiles `jibb.hoon` and `jibb-import.hoon` under `urbit eval` to check that they build.
29−
30−`nix flake check` builds that too, then runs `tools/check --group eval` and, on Linux, `tools/check --group ship` against a copy of a fake ~zod it boots from the pill. Everything runs in the Nix sandbox without network, so a check can't pass because of something on your machine. Each group is one build; a failure prints the failing checks' output, and a passing build keeps every check's log in its output. On four CPUs it takes about 10 minutes, the two groups building side by side: under 3 minutes for the eval group (it took 18 before `tools/test-arms` replaced a script per suite) and 10 for the ship group. To run a single check, use `nix develop -c tools/check <name>` (see [docs/development.md](docs/development.md#before-pushing)).
31−
32−Limits: the ship checks need Linux, since `tools/ship` finds the ship's processes in `/proc`, so on macOS `nix flake check` runs only the eval group. Only `x86_64-linux` has been tried; the flake also declares `aarch64-linux` and `aarch64-darwin`, the other platforms nixpkgs builds vere for.
33−
34## Golden tests
17## Golden tests
35
18
36Each case, `tests/golden/<case>/`, holds `source.jibb`, `about.txt` (where it comes from, what it tests, the expected outcome), and the expected outputs: `tokens.txt` from the layout pass and `tree.txt` from the parser. A file holds the output plus one trailing newline. A case may also have a `path.txt` specifying its logical `/ui/.../*.jibb` path. An `expect-types:` line in `about.txt` opts it into the provisional `golden-types` checker output in `types.txt`; `--update` creates it. A case can select Hoon molds in `imports.txt` and provide each module in `sur/<module>.txt`, or select marks in `marks.txt` and provide their source in `mar/<name>.txt`. `modules.txt` selects Jibb source fixtures; their trees go in `module-trees.txt`, and the partial checker can resolve a subset of library imports. See [docs/development.md](docs/development.md).
19Each case, `tests/golden/<case>/`, holds `source.jibb`, `about.txt` (where it comes from, what it tests, the expected outcome), and the expected outputs: `tokens.txt` from the layout pass and `tree.txt` from the parser. A file holds the output plus one trailing newline. A case may also have a `path.txt` specifying its logical `/ui/.../*.jibb` path. An `expect-types:` line in `about.txt` opts it into the provisional `golden-types` checker output in `types.txt`; `--update` creates it. A case can select Hoon molds in `imports.txt` and provide each module in `sur/<module>.txt`, or select marks in `marks.txt` and provide their source in `mar/<name>.txt`. `modules.txt` selects Jibb source fixtures; their trees go in `module-trees.txt`, and the partial checker can resolve a subset of library imports. See [docs/development.md](docs/development.md).
@@ -59,7 +42,7 @@ tools/hoon '(golden /a/b/jibb (crip "++ main view"))'
59tools/hoon --raw --cord src=tests/golden/foo/source.jibb 'tree:(golden /a/b/jibb src)'
42tools/hoon --raw --cord src=tests/golden/foo/source.jibb 'tree:(golden /a/b/jibb src)'
60```
43```
61
44
62−`tools/testdata/selftest` tests `tools/golden` and `tools/hoon` against a stub library, `tools/test-arms` against the same library with suites it writes, and `tools/doc-blocks` against Markdown it writes.
45+`tools/testdata/selftest` tests both tools against a stub library, and `tools/doc-blocks` against Markdown it writes. `tools/importer-test` compares the partial Hoon importer's fixture projections against their golden file. `tools/type-import-test`, `tools/type-tlon-test`, `tools/type-mark-test`, `tools/type-poke-test` and `tools/type-api-paths-test` check importer/checker, prelude and partial API path analysis boundaries under eval; the ship suite runs the same fixtures.
63
46
64### The doc's examples
47### The doc's examples
65
48
@@ -72,43 +55,6 @@ tools/doc-blocks Grammar.md Overview.md Core-language.md # fresh exports
72
55
73It matches each labelled block to the case whose `source.jibb` is the block's text plus a newline, and lists the blocks no case holds, each with a diff against the closest unmatched case, and the `doc-*` cases no block holds. Pass every tab with Jibb blocks, or the other tabs' cases count as stale. The exit status is 0 when every block has a case and every case a block, 1 when one doesn't, and 2 when the check can't run, for example because no block is labelled `jibb`.
56It matches each labelled block to the case whose `source.jibb` is the block's text plus a newline, and lists the blocks no case holds, each with a diff against the closest unmatched case, and the `doc-*` cases no block holds. Pass every tab with Jibb blocks, or the other tabs' cases count as stale. The exit status is 0 when every block has a case and every case a block, 1 when one doesn't, and 2 when the check can't run, for example because no block is labelled `jibb`.
74
57
75−## Test suites
76−
77−Each `tests/lib/<suite>.hoon` file is a test suite: a core whose `test-` arms return a `tang`, empty when the arm passes. `tools/ship test` runs every suite on the fake ship with the `-test` thread. `tools/test-arms` runs the same arms under `urbit eval`, without a ship, for every suite but the generated `jibb.hoon`, whose golden cases `tools/golden` runs. It gives each suite the subject Ford would give it on the `jibb-dev` desk: its `/+` libraries and its `/*` files, which must be `%txt` or `%jibb` files, from where `tools/ship assemble` puts them. Like `tools/golden`, it needs `urbit` on PATH and Python 3.
78−
79−```
80−tools/test-arms # every suite
81−tools/test-arms jibb-store 'jibb-program-*' # suites by name or glob
82−tools/test-arms --shard 2/4 # the second of four shards, balanced by measured cost
83−tools/test-arms --list # the suites and their arms; ", report" marks a golden report
84−tools/test-arms --report jibb-import # print a golden-report suite's report
85−tools/test-arms --update jibb-import # write it to the suite's expected file
86−```
87−
88−Many suites share one eval, so the library is built once per eval, not once per suite. Each arm runs under `mule` and prints OK, FAILED or CRASHED, as `-test` does, with what it returned or, for a crash, its trace mapped to lines of the suite and the library. When an eval fails, it is run again one suite at a time, and each suite that doesn't build is reported as `FAILED <suite> (build)`, with its error placed in the suite file. An eval that runs past `--timeout`, 1800 s by default, fails each of its suites as `(timeout)`. The exit status is 0 when every arm passes, 1 when an arm or a golden file fails, and 2 when the suites can't run, for example on a usage error or a suite header it can't read. `tools/check` runs the suites in four shards, `arms-1` to `arms-4`.
89−
90−A golden-report suite has a `report` arm and a `/*` file bound to the face `expected`; when one of its arms fails, the runner prints a diff between that file and the report. Before any eval, the runner checks the golden files of the suites it runs, the `%txt` files bound to a face containing `expected`: each must end in exactly one newline, which an arm can't see in the file's wain, and hold no line that starts `BAD ` or ends `: BAD`. `--update` won't write a report that breaks either rule.
91−
92−The `jibb-dev` desk holds `my-app`'s sources under `/my-app`, without its desk files, so the suites below that check `my-app` files read them there, and a golden case that uses one links to it: `tests/golden/doc-overview-02-theme/source.jibb` is a symlink to `my-app/ui/theme.jibb`.
93−
94−`tools/test-arms --list` lists every suite, and [The test suites](docs/development.md#the-test-suites) in the development guide says what each one checks. Each suite it lists runs under eval and on the fake ship, with the same fixtures. The `jibb-import` suite compares the partial Hoon importer's fixture projections against their golden file. The suites `jibb-bridge`, `jibb-import-overlap`, `jibb-import-structural`, `jibb-union-source`, `jibb-union-alias-overlap`, `jibb-full-overlap-basic`, `jibb-full-overlap-graph`, `jibb-generic-recursion`, `jibb-generic-construction`, `jibb-generic-pattern`, `jibb-deferred`, `jibb-deferred-prepared`, `jibb-deferred-resolver`, `jibb-deferred-context`, `jibb-empty`, `jibb-cell-branch`, `jibb-tlon-bridge`, `jibb-mark-bridge`, `jibb-poke-bridge` and `jibb-api-paths` check importer/checker, prelude and partial API path analysis boundaries.
95−
96−`tests/lib/jibb-page-main.hoon` fully checks the byte-identical static about page and direct blog/todo data pages through the real readers, with exact main types, downstream imports and fail-closed syntax/evidence controls. It does not render pages or execute requests.
97−
98−`tests/lib/jibb-buttons.hoon` fully checks the documented `labelled` and `wide` definitions and the unchanged module's exact source-located unresolved-`%add` error through detailed and legacy inference, with the valid source, schemes and error fixtures in `tests/type-buttons/`. It does not render or execute UI.
99−
100−`tests/lib/jibb-doc-examples.hoon` fully checks the import-only example with real Hoon readers and the card module, the `view-day` and `step` modules, and the `cmd`/`sub` molds at their prelude path through detailed and legacy inference.
101−
102−`tests/lib/jibb-theme.hoon` fully checks the byte-identical real theme against the exact prelude mold, including its exported type, structural downstream import, dark absent/present forms and malformed-field negatives. It does not check contrast, render themes or route fonts.
103−
104−`tests/lib/jibb-store.hoon` checks the byte-identical cart store and basket through detailed and legacy inference, exact main and derived schemes, structural imports, direct store watch evidence and rejection controls. It does not lower or execute stores, support multi-action declarations, or permit store requests in page loads.
105−
106−`tests/lib/jibb-program-main.hoon` checks the narrow closed, subscription-free `main` slice. `tests/lib/jibb-program-init.hoon` checks transactional initializer recovery for a synthetic direct program, including exact exported and imported types and rejection boundaries. `tests/lib/jibb-program-update.hoon` checks derived result context for an unannotated two-slot update, including a union/boolean branch, downstream types and fail-closed controls. `tests/lib/jibb-program-watch.hoon` uses the real todo readers with synthetic program components to check one direct request value against merged API-source evidence and reject hand-built, indirect, parameterized, diff and ambiguous subscriptions. These are static checks only: they do not run an island or establish runtime watching. `tests/lib/jibb-todo-full.hoon` additionally checks the byte-identical todo island through both full-module APIs, verifies its exact closed `main` type and structural downstream import, and runs rejection controls.
107−
108−## Licence
109−
110−Jibb is under the MIT licence, in [LICENSE](LICENSE). Two kinds of files in it are other people's, under their own MIT licences: the files in `vendor/` are copies from urbit/urbit, whose licence is in [vendor/LICENSE-urbit.txt](vendor/LICENSE-urbit.txt), and the Tlon `/sur` files that `tests/` uses as importer fixtures come from tloncorp/tlon-apps, whose licence is in [tests/importer/tlon-license.txt](tests/importer/tlon-license.txt).
111−
112## Fake ship
58## Fake ship
113
59
114`tools/ship` runs the desks on a fake `~zod` at `/root/urbit/zod` (`--pier` or `$JIBB_PIER`). It needs Python 3 and click (`/root/src/tools/pkg/click/click`, or `--click`). The ship runs in the background, logging to `/root/urbit/zod.log`.
60`tools/ship` runs the desks on a fake `~zod` at `/root/urbit/zod` (`--pier` or `$JIBB_PIER`). It needs Python 3 and click (`/root/src/tools/pkg/click/click`, or `--click`). The ship runs in the background, logging to `/root/urbit/zod.log`.
@@ -120,7 +66,7 @@ tools/ship log # the end of its log
120tools/ship stop
66tools/ship stop
121```
67```
122
68
123−`tools/ship assemble --out <dir> [<desk> ...]` writes the desks' files to `<dir>/<desk>` as sync assembles them, without a ship; `nix build` uses it. `tools/ship sync <desk>` assembles a desk from the repo's folders, creates it if it's missing (as `|new-desk` does), mounts it, deletes from the desk through Clay the files the repo doesn't have, makes the mount hold exactly the repo's files, runs `|commit` and waits until the desk matches the repo, checking every file. If Clay rejects the commit, it prints Clay's error, which the log doesn't show.
69+`tools/ship sync <desk>` assembles a desk from the repo's folders, creates it if it's missing (as `|new-desk` does), mounts it, deletes from the desk through Clay the files the repo doesn't have, makes the mount hold exactly the repo's files, runs `|commit` and waits until the desk matches the repo, checking every file. If Clay rejects the commit, it prints Clay's error, which the log doesn't show.
124
70
125| Desk | Assembled from |
71| Desk | Assembled from |
126| --- | --- |
72| --- | --- |
@@ -128,7 +74,7 @@ tools/ship stop
128| `jibb` | `vendor/*`, then `jibb` |
74| `jibb` | `vendor/*`, then `jibb` |
129| `jibb-dev` | `vendor/*`, then `jibb-dev`, then `tests/`, with `tests/lib/jibb.hoon` generated, and `jibb/sys.kelvin` |
75| `jibb-dev` | `vendor/*`, then `jibb-dev`, then `tests/`, with `tests/lib/jibb.hoon` generated, and `jibb/sys.kelvin` |
130
76
131−The `jibb-dev` desk runs the golden cases on the ship, as `-test` arms. `tools/ship gen-tests` writes `tests/lib/jibb.hoon` from `tests/golden`: for each case it imports `source.jibb`, `tokens.txt` and `tree.txt` with `/*`, reading a `source.jibb` that links to a `my-app` file from `/my-app`, and its `test-` arm compares `golden:jibb` with them. Cases opted into `types.txt` also compare the partial inference output. The file is generated, not committed (review question 32): desk assembly writes it afresh, and `.gitignore` lists it. `tools/ship test` regenerates it, syncs the desk and runs `-test /=jibb-dev=/tests`, printing each case's OK, FAILED or CRASHED and the reason. It exits 0 only when every case passes.
77+The `jibb-dev` desk runs the golden cases on the ship, as `-test` arms. `tools/ship gen-tests` writes `tests/lib/jibb.hoon` from `tests/golden`: for each case it imports `source.jibb`, `tokens.txt` and `tree.txt` with `/*`, and its `test-` arm compares `golden:jibb` with them. Cases opted into `types.txt` also compare the partial inference output. Don't edit that file; `--check` says whether it's up to date. `tools/ship test` regenerates it, syncs the desk and runs `-test /=jibb-dev=/tests`, printing each case's OK, FAILED or CRASHED and the reason. It exits 0 only when every case passes.
132
78
133```
79```
134tools/ship test # the library and tests/golden
80tools/ship test # the library and tests/golden
@@ -140,7 +86,7 @@ A sync with nothing to commit takes about 2 s. A commit adds 3 to 10 s, and 300
140
86
141`tools/ship check-commit` proves that `|commit` stores `.jibb` files. It syncs `my-app`, reads every `/ui` file back with `%cx`, byte for byte, and converts `%jibb` to `%mime` and `%txt` and back. It commits half-written files, then deletes them. It merges a file that two desks changed on different lines, and checks that changes to the same line conflict. It can be rerun, and it leaves the two scratch desks it merges with (`%jibb-check-ours` and `%jibb-check-theirs`) holding only what `|new-desk` gives, unmounted.
87`tools/ship check-commit` proves that `|commit` stores `.jibb` files. It syncs `my-app`, reads every `/ui` file back with `%cx`, byte for byte, and converts `%jibb` to `%mime` and `%txt` and back. It commits half-written files, then deletes them. It merges a file that two desks changed on different lines, and checks that changes to the same line conflict. It can be rerun, and it leaves the two scratch desks it merges with (`%jibb-check-ours` and `%jibb-check-theirs`) holding only what `|new-desk` gives, unmounted.
142
88
143−`tools/clay-fixtures` syncs `my-app` and `jibb-fixtures`, builds their example `/sur` files and marks through Clay, and checks selected types read from the compiled graphs and passed to the partial checker. It compares the results with golden files under `tests/clay-fixtures/`.
89+`tools/clay-fixtures` syncs `my-app`, builds its example `/sur` files and marks through Clay, and checks selected types read from the compiled graphs and passed to the partial checker. It compares the results with golden files under `tests/clay-fixtures/`.
144
90
145For anything else:
91For anything else:
146
92
docs/README.md+4−14
@@ -2,26 +2,16 @@
2
2
3Jibb's spec is a design doc by @iko, [Jibb — an Elm-architecture UI language for Urbit](https://claude.ai/artifact/DMBr48qzi5z8hcwn2ccPBv), and its repository copy in `spec/`. The repository copy records decisions made on 2026-10-30, including dropping `$?`, adding `%$` as a term literal and pattern, making `@` an unrestricted atom, treating `?` as two atoms for union disjointness, and the milestone 2 type and prelude decisions; the Claude document still needs to be synchronized. This folder also holds where the build stands, what is still open, and how to work on the code.
3Jibb's spec is a design doc by @iko, [Jibb — an Elm-architecture UI language for Urbit](https://claude.ai/artifact/DMBr48qzi5z8hcwn2ccPBv), and its repository copy in `spec/`. The repository copy records decisions made on 2026-10-30, including dropping `$?`, adding `%$` as a term literal and pattern, making `@` an unrestricted atom, treating `?` as two atoms for union disjointness, and the milestone 2 type and prelude decisions; the Claude document still needs to be synchronized. This folder also holds where the build stands, what is still open, and how to work on the code.
4
4
5−The current full-module checker also has a narrow static/data-page slice, documented in [compiler.md](compiler.md) and [status.md](status.md). Its shared eval/ship fixture checks the real about, blog index and todo index sources without claiming rendering or request execution. The shared theme fixture likewise full-checks the byte-identical real theme and its exact type without implementing theme behavior.
6−
7| File | What it holds |
5| File | What it holds |
8| --- | --- |
6| --- | --- |
9−| [spec/](spec/) | The doc's tabs, as Markdown, with decisions the doc doesn't have yet; until the doc is synced, this copy is the spec |
7+| [spec/](spec/) | The doc's tabs, as Markdown |
10−| [status.md](status.md) | The eight milestones, what Jibb does now with the test that proves each part, and the known gaps |
8+| [status.md](status.md) | The eight milestones, what milestone 1 built, and how to check it |
11| [open-questions.md](open-questions.md) | Questions still open: the plan's, the grammar's, and those milestone 2 raises |
9| [open-questions.md](open-questions.md) | Questions still open: the plan's, the grammar's, and those milestone 2 raises |
12| [development.md](development.md) | Setting up a machine, the ground rules, the checks to run before pushing |
10| [development.md](development.md) | Setting up a machine, the ground rules, the checks to run before pushing |
13| [compiler.md](compiler.md) | A map of `jibb-dev/lib/jibb.hoon`: its API, data, errors and printed formats |
11| [compiler.md](compiler.md) | A map of `jibb-dev/lib/jibb.hoon`: its API, data, errors and printed formats |
14| [prelude-inventory.md](prelude-inventory.md) | Working source audit for the prelude's exported inventory |
12| [prelude-inventory.md](prelude-inventory.md) | Working source audit for the prelude's exported inventory |
15| [prompts/milestone-2.md](prompts/milestone-2.md) | A brief for the developer who builds milestone 2, types and prelude |
13| [prompts/milestone-2.md](prompts/milestone-2.md) | A brief for the developer who builds milestone 2, types and prelude |
16| [prompts/drop-union-rune.md](prompts/drop-union-rune.md) | The completed brief for dropping `$?`, as decided on 2026-10-30, before milestone 2 |
14| [prompts/drop-union-rune.md](prompts/drop-union-rune.md) | The completed brief for dropping `$?`, as decided on 2026-10-30, before milestone 2 |
17−| [prompts/syntax-review-follow-up.md](prompts/syntax-review-follow-up.md) | A brief for finishing the syntax changes Montelot decided on 2026-11-03: open gaps, unfinished reviews, work that waits on the checker core, and questions to ask |
18−| [reviews/2026-11-02-repo-review.md](reviews/2026-11-02-repo-review.md) | A review of the whole repository on 2026-11-02: bugs, gaps and simplifications, each checked by a second reviewer |
19−| [reviews/2026-11-02-questions.md](reviews/2026-11-02-questions.md) | The 45 decisions that review raises, with options and recommendations |
20−| [reviews/2026-11-02-syntax-review.md](reviews/2026-11-02-syntax-review.md) | A review of Jibb's syntax on 2026-11-02: 15 verified proposals with before and after examples, what to keep, and questions for @iko |
21−| [reviews/2026-11-03-milestone-2-review.md](reviews/2026-11-03-milestone-2-review.md) | A review of milestone 2 against the plan on 2026-11-03: the done-criteria, the errors the spec describes, findings M1 to M17, with its [probes](reviews/2026-11-03-milestone-2-probes/) |
22−| [prompts/milestone-2-finish.md](prompts/milestone-2-finish.md) | A brief for finishing milestone 2: the general checker core, diagnostics, patterns, kinds, imports, tests and docs that the milestone 2 review found missing |
23−| [prompts/repo-review-finish.md](prompts/repo-review-finish.md) | A brief for finishing the 2026-11-02 repository review: the open findings no other brief covers, the rulings waiting for @iko, and the review's advice for the checker core |
24−| [reviews/2026-11-03-checker-map.md](reviews/2026-11-03-checker-map.md) | A map of the type checker on 2026-11-03 for whoever builds the general core: its families, recovery slices, hazards, and what the core replaces and keeps |
25
15
26## The spec
16## The spec
27
17
@@ -32,14 +22,14 @@ The current full-module checker also has a narrow static/data-page slice, docume
32| [spec/overview.md](spec/overview.md) | Jibb — an Elm-architecture UI language for Urbit: the language, the stages, the mark, the host, worked examples |
22| [spec/overview.md](spec/overview.md) | Jibb — an Elm-architecture UI language for Urbit: the language, the stages, the mark, the host, worked examples |
33| [spec/grammar.md](spec/grammar.md) | Grammar: lexical rules, literals, runes, imports, modules, molds, tag resolution, patterns, the EBNF |
23| [spec/grammar.md](spec/grammar.md) | Grammar: lexical rules, literals, runes, imports, modules, molds, tag resolution, patterns, the EBNF |
34| [spec/core-language.md](spec/core-language.md) | Core language: the untyped language between the checker and both backends |
24| [spec/core-language.md](spec/core-language.md) | Core language: the untyped language between the checker and both backends |
35−| [spec/decisions.md](spec/decisions.md) | Decisions: every choice, with the date it was made and whether the doc has it yet, and the settled milestone 2 questions |
25+| [spec/decisions.md](spec/decisions.md) | Decisions: every choice, with the date it was made |
36| [spec/implementation-plan.md](spec/implementation-plan.md) | Implementation plan: the eight milestones, ground rules, architecture, risks, open questions |
26| [spec/implementation-plan.md](spec/implementation-plan.md) | Implementation plan: the eight milestones, ground rules, architecture, risks, open questions |
37
27
38The doc has a sixth tab, "Loom on Urbit", which is empty, so it has no file.
28The doc has a sixth tab, "Loom on Urbit", which is empty, so it has no file.
39
29
40The overview's pipeline diagram, "Jibb pipeline · source to browser in three stages", is embedded content, so the export holds only a placeholder line for it under Architecture. The doc shows it.
30The overview's pipeline diagram, "Jibb pipeline · source to browser in three stages", is embedded content, so the export holds only a placeholder line for it under Architecture. The doc shows it.
41
31
42−The two copies can diverge, and until they are synced, this copy wins (review question 42). Sync the repository decisions to the Claude document before refreshing this copy: the rows that decisions.md's Synced column marks No or Check, and its settled milestone 2 questions. Then export each tab as Markdown again (in a Claude session, the Claude Docs connector's `export` gives each tab's Markdown), replace the files, and run:
32+The two copies can diverge. Sync the repository decisions to the Claude document before refreshing this copy, then export each tab as Markdown again (in a Claude session, the Claude Docs connector's `export` gives each tab's Markdown), replace the files, and run:
43
33
44```
34```
45git diff docs/spec # what changed in the doc
35git diff docs/spec # what changed in the doc
docs/compiler.md+11−75
@@ -56,40 +56,26 @@ The core is split into chapters, `+| %name`, in this order:
56| `%span-check` | `+check-spans`, which `+golden` runs on every tree, and `+check-spans-test` |
56| `%span-check` | `+check-spans`, which `+golden` runs on every tree, and `+check-spans-test` |
57| `%type-inference` | The initial inference fragment and its unification helpers; not yet a module type checker |
57| `%type-inference` | The initial inference fragment and its unification helpers; not yet a module type checker |
58
58
59−The inference fragment supports fixed auras, unrestricted `@`, one-way widening into it and toward aura-family ancestors, generic variables and gates, faced and unfaced cells, cell sample binders, known record field reads, a cell pattern of two or more binders, a complete two-arm loobean branch, a complete two-arm unit-shaped branch, closed local mold aliases and acyclic forward value references. For a supported single syntactic top-level recursive gate, the checker infers the sample first and uses that exact sample, including its field faces, in a monomorphic self placeholder. The completed body must unify with the placeholder before the gate is generalized; incompatible recursive arguments can report the call and argument sites. Uses of generalized top-level definitions instantiate their schemes independently. For a complete loobean branch with one direct self-call arm, the checker can infer the other arm independently and use its closed, fully resolved type to seed the recursive result; it then checks the whole body. Open or pending base types do not seed the result, and other branch shapes still depend on the existing partial inference. A supported single local recursive gate also uses a monomorphic self reference while its body is checked, then generalizes variables free of its enclosing environment; captured variables remain shared. Acyclic local value definitions can refer forward. When the remaining local definitions stop making progress and no cyclic group applies, the earliest of them whose definite error no order of the siblings could change reports it; otherwise the generic message remains. A definite error names sites, except an uncertain type hole, which names its site but is unsupported. A sibling can change another's result through a type variable the locals share, such as one in an untyped sample of the enclosing gate: a sibling's cast of the sample to `!!` makes every cast of it fit. So the error of a local that names no sibling and nothing whose type has a shared variable always counts. Another local's error counts only if no sibling had bound or refined a shared variable when it was tried and every other waiting definition also failed with sites, since one that waits without them, on a checker limit, a pending tag or its own nested stall, might in another order constrain the shared variable. In that case every definition is inferred against the same state in every order. A definition that infers but is then rejected as unsupported, such as for an uncertain type hole or a capital forced to a concrete type, reports its own message. Errors found while a cyclic group is inferred together are dropped, so a mutual group whose error comes after the call to its partner keeps the generic message. The checker collects written capitals per `++` before inference, excluding nested definitions: a capital used in an enclosing definition is shared with its locals, even when written later, while a capital introduced only in a local definition is generalized there. Sibling locals can introduce independent capitals with the same spelling; generic mold parameters keep their own scope. Top-level groups of syntactic gates are inferred together with monomorphic placeholders and shared substitutions, then generalized only after the whole group checks; downstream uses and library interfaces instantiate those schemes independently. A dependency graph identifies groups with two iterative depth-first passes; its conservative local-reference edges can reject otherwise valid programs. Top-level definitions are inferred in the order of the same graph's components, dependencies first, so a chain of forward references resolves in one pass; the checker repeats passes while one adds a definition, as a fallback. Supported local mutually recursive gate groups also use shared monomorphic placeholders and generalize only after the group checks, preserving captured outer variables. Some proven non-gate value cycles are diagnosed; other mixed gate/value cycles, polymorphic recursion, unresolved literal constraints and unresolved branch joins remain unsupported. Acyclic simple local mold aliases can also refer forward, and are scoped to the body, not its gate's sample. Nonrecursive generic aliases of supported molds can be applied at exact arity, including locally and through library interfaces; their parameters are lexical. Closed, provably disjoint nonrecursive unions and tagged single-case molds support contextual term values, `~` and `|=%tag` constructors. Literal heads compare by their runtime noun, so `|=%$` can construct an explicit null-, loobean-zero- or term-zero-headed case. Equal heads with distinct payloads can be selected when exactly one payload fit is proven; unknown or ambiguous alternatives remain unsupported. Unresolved tags and nulls remain pending, with distinct partial-inference diagnostics. Nonrecursive top-level generic union molds with provably disjoint cases also support contextual tags and constructors at exact arity; their arguments are retained through generalization and supported library interfaces. Nonrecursive generic aliases can reorder, repeat or omit parameters while preserving a supported union’s origin, including through local scopes and library interfaces. Generic unions declared directly inside a body and recursive molds outside the source-proven slices described below remain unsupported. A directly known named union can instantiate an unconstrained generic gate sample while retaining its origin, generic arguments and faces. Unnamed, pending-tag, recursive, unknown-atom and variable-bound union origins remain unsupported. A value with type variable `A` can fit a field whose type is that same `A`, including in generic union payloads and nested or repeated record fields. A differing-variable face constraint remains unsupported. When inference forces two distinct explicitly written capitals equal, it reports both source sites; forcing a capital to a concrete type remains unsupported in this fragment. It can infer and generalize atom constraints arising from explicit capitals or bare sample binders, preserve those constraints through aliases, instantiate them independently, and print multiple constraints. Unresolved decimal variables default to `@ud` for inferred types without gates; defaulting inside gate types and other constraint cases remain incomplete. It does not yet check a module, complete imports, general patterns, general deferred constraints, recursive molds, dependency cycles or most errors with both conflicting excerpts. Definite cast and call mismatches, incompatible branches and overlapping union cases report both sites and excerpts. Concrete branch results can join at an explicitly present parent aura or `@`. Some known tuple and record positions acquire matching faces; other variable-dependent face merges, general branch tag context and ambiguous call-result propagation remain unsupported; function compatibility involving nested `@` and variable-dependent joins remain unsupported except for equal types and the source-bound gate-sample proof below. For a single recursive gate outside a group, the reporting path repeats inference rather than instantiating its generalized interface inside its own body; a group report uses its stored schemes. This adds work, and the current dependency pass can take quadratic time on long forward chains; the milestone's speed target remains unverified. A separate conservative pass reports unions whose cases are provably disjoint or overlapping and leaves other cases unresolved; it does not claim the mold is checked. Unsupported forms are reported as such, and the partial output says the module has not been checked.
59+The inference fragment supports fixed auras, unrestricted `@`, one-way widening into it and toward aura-family ancestors, generic variables and gates, faced and unfaced cells, cell sample binders, known record field reads, a cell pattern of two or more binders, a complete two-arm loobean branch, a complete two-arm unit-shaped branch, closed local mold aliases and acyclic forward value references. For a supported single syntactic top-level recursive gate, the checker infers the sample first and uses that exact sample, including its field faces, in a monomorphic self placeholder. The completed body must unify with the placeholder before the gate is generalized; incompatible recursive arguments can report the call and argument sites. Uses of generalized top-level definitions instantiate their schemes independently. For a complete loobean branch with one direct self-call arm, the checker can infer the other arm independently and use its closed, fully resolved type to seed the recursive result; it then checks the whole body. Open or pending base types do not seed the result, and other branch shapes still depend on the existing partial inference. A supported single local recursive gate also uses a monomorphic self reference while its body is checked, then generalizes variables free of its enclosing environment; captured variables remain shared. Acyclic local value definitions can refer forward. The checker collects written capitals per `++` before inference, excluding nested definitions: a capital used in an enclosing definition is shared with its locals, even when written later, while a capital introduced only in a local definition is generalized there. Sibling locals can introduce independent capitals with the same spelling; generic mold parameters keep their own scope. Top-level groups of syntactic gates are inferred together with monomorphic placeholders and shared substitutions, then generalized only after the whole group checks; downstream uses and library interfaces instantiate those schemes independently. A dependency graph identifies groups with two iterative depth-first passes; its conservative local-reference edges can reject otherwise valid programs. Supported local mutually recursive gate groups also use shared monomorphic placeholders and generalize only after the group checks, preserving captured outer variables. Some proven non-gate value cycles are diagnosed; other mixed gate/value cycles, polymorphic recursion, unresolved literal constraints and unresolved branch joins remain unsupported. Acyclic simple local mold aliases can also refer forward, and are scoped to the body, not its gate's sample. Nonrecursive generic aliases of supported molds can be applied at exact arity, including locally and through library interfaces; their parameters are lexical. Closed, provably disjoint nonrecursive unions and tagged single-case molds support contextual term values, `~` and `|=%tag` constructors. Literal heads compare by their runtime noun, so `|=%$` can construct an explicit null-, loobean-zero- or term-zero-headed case. Equal heads with distinct payloads can be selected when exactly one payload fit is proven; unknown or ambiguous alternatives remain unsupported. Unresolved tags and nulls remain pending, with distinct partial-inference diagnostics. Nonrecursive top-level generic union molds with provably disjoint cases also support contextual tags and constructors at exact arity; their arguments are retained through generalization and supported library interfaces. Nonrecursive generic aliases can reorder, repeat or omit parameters while preserving a supported union’s origin, including through local scopes and library interfaces. A generic union declared directly inside a body and recursive molds remain unsupported. A directly known named union can instantiate an unconstrained generic gate sample while retaining its origin, generic arguments and faces. Unnamed, pending-tag, recursive, unknown-atom and variable-bound union origins remain unsupported. A value with type variable `A` can fit a field whose type is that same `A`, including in generic union payloads and nested or repeated record fields. A differing-variable face constraint remains unsupported. When inference forces two distinct explicitly written capitals equal, it reports both source sites; forcing a capital to a concrete type remains unsupported in this fragment. It can infer and generalize atom constraints arising from explicit capitals or bare sample binders, preserve those constraints through aliases, instantiate them independently, and print multiple constraints. Unresolved decimal variables default to `@ud` for inferred types without gates; defaulting inside gate types and other constraint cases remain incomplete. It does not yet check a module, complete imports, general patterns, general deferred constraints, recursive molds, dependency cycles or most errors with both conflicting excerpts. Definite cast and call mismatches, incompatible branches and overlapping union cases report both sites and excerpts. Concrete branch results can join at an explicitly present parent aura or `@`. Some known tuple and record positions acquire matching faces; other variable-dependent face merges, general branch tag context and ambiguous call-result propagation remain unsupported; function compatibility involving nested `@` and variable-dependent joins remain unsupported except for equal types and the source-bound gate-sample proof below. For a single recursive gate outside a group, the reporting path repeats inference rather than instantiating its generalized interface inside its own body; a group report uses its stored schemes. This adds work, and the current dependency pass can take quadratic time on long forward chains; the milestone's speed target remains unverified. A separate conservative pass reports unions whose cases are provably disjoint or overlapping and leaves other cases unresolved; it does not claim the mold is checked. Unsupported forms are reported as such, and the partial output says the module has not been checked.
60−
61−Uncontextual `?-` branches share one result join across loobean, unit, list and known-union folds. They first unify the arm types and retain the resulting substitution, including gate-free constraints. If unification fails, they widen only to an explicitly present parent aura or unrestricted `@`; sibling auras do not acquire a guessed common parent. Multi-arm union folds first unify as a group; if that fails, they select an explicitly present atom parent independently of arm order and bind variables to that final parent. Explicit `@` accepts atom singletons and restricted atom variables. Deferred boolean branches try the same join before their pending-literal fallback.
62
60
63A direct unshadowed prelude call can use checked source layouts when a positional argument is a directly named, already inferred root gate. For two-slot function samples, the checker can match a named update against an unnamed generic gate sample without confusing a binder face with a nested record face. Both explicitly named slots must agree; source boundaries are evidence for this fit, not a call-arity rule. The source gate and prelude annotation must be available from their checked bindings. Local or dynamic gates, aliases without direct evidence, recursive or SCC placeholder bodies, other sample shapes and unresolved call-sample variables remain unsupported by this proof. Ordinary inference remains the fallback.
61A direct unshadowed prelude call can use checked source layouts when a positional argument is a directly named, already inferred root gate. For two-slot function samples, the checker can match a named update against an unnamed generic gate sample without confusing a binder face with a nested record face. Both explicitly named slots must agree; source boundaries are evidence for this fit, not a call-arity rule. The source gate and prelude annotation must be available from their checked bindings. Local or dynamic gates, aliases without direct evidence, recursive or SCC placeholder bodies, other sample shapes and unresolved call-sample variables remain unsupported by this proof. Ordinary inference remains the fallback.
64
62
65The checker retains a per-analysis index of finalized root gates and a prelude source table bound to the entire trusted prepared interface. A dependency screen avoids building the table when the root cannot use it; changing the interface invalidates it. The host remains responsible for supplying a prepared interface paired with its source. The matcher checks each slot and product in both directions with a shared substitution. Before returning its tentative proof it requires both complete call samples to normalize to closed, tag-free types, then repeats every slot check and requires the substitution and fresh-ID counter to remain unchanged. This keeps later argument or enclosing constraints from invalidating an earlier face check, and preserves pending constraints, capital checks and projection evidence. These scans and the bounded second proof add work; they do not establish a global linear-time bound.
63The checker retains a per-analysis index of finalized root gates and a prelude source table bound to the entire trusted prepared interface. A dependency screen avoids building the table when the root cannot use it; changing the interface invalidates it. The host remains responsible for supplying a prepared interface paired with its source. The matcher checks each slot and product in both directions with a shared substitution. Before returning its tentative proof it requires both complete call samples to normalize to closed, tag-free types, then repeats every slot check and requires the substitution and fresh-ID counter to remain unchanged. This keeps later argument or enclosing constraints from invalidating an earlier face check, and preserves pending constraints, capital checks and projection evidence. These scans and the bounded second proof add work; they do not establish a global linear-time bound.
66
64
67−Before the empty-capital optimization below, single sequential eval runs including startup showed that 2,000 ordinary gates used 70.20 seconds of user CPU at baseline and 70.64 seconds with the cached source table. Fifty unsupported eligible scalar-slot calls used 24.75 and 25.71 seconds, while fifty function-slot failures used 24.15 and 25.36 seconds. Fifty successful calls took 26.56 seconds before the final stability replay and 26.99 seconds with it. These are synthetic measurements, not production performance limits.
65+In single sequential eval runs including startup, 2,000 ordinary gates used 70.20 seconds of user CPU at baseline and 70.64 seconds with the cached source table. Fifty unsupported eligible scalar-slot calls used 24.75 and 25.71 seconds, while fifty function-slot failures used 24.15 and 25.36 seconds. Fifty successful calls took 26.56 seconds before the final stability replay and 26.99 seconds with it. These are synthetic measurements, not production performance limits.
68−
69−Restricted-number promotion only applies to written capital variables. If none are present, it returns immediately instead of traversing the environment. In one startup-inclusive pair of runs on 2,000 independent gates, output was byte-identical and user CPU fell from 71.67 to 38.26 seconds; wall time was 72.80 versus 51.66 seconds while other checks were running. This does not establish a bound for dependent modules or a complete-checker benchmark.
70−
71−A bounded source proof can also establish distinct literal heads when a union case is a one-hop application of a uniquely resolved local generic mold. It compares literal runtime nouns and checks the original mold normally before publishing an interface. The same source proof improves the partial report, which still says the mold is not checked. The new proof declines nested or qualified applications, opaque references, recursive-index states, holes and deferred obligations; other valid unions can remain unsupported. A 256-node source budget and a separate 256-entry inherited-state budget apply per attempt. They do not bound the existing pairwise union pass, parsing, atom or name sizes, or downstream checking. Prepared interfaces and inference state remain trusted inputs. The `tests/lib/jibb-union-source.hoon` suite exercises source resolution, reporting, rollback and these bounds under eval (`tools/test-arms jibb-union-source`) and on the ship. A separate positive witness can identify overlap in two-field, literal-headed cases when a unique one-hop local, one-parameter generic alias is applied to a concrete primitive payload. It compares the literal noun values and proves the payloads have a shared noun, so an empty or unknown payload is not a witness. The partial report identifies both original case sites. The partial report and the full module check find overlaps with one helper, `mold-overlap-witness`: it takes the first overlapping pair from the pairwise projection, which covers atoms, `?` and literal constants, and nested literal-headed cells, and tries this source witness only when no pair overlaps and some pair stays unknown. A projected overlap is therefore named even when the source witness would prove an earlier pair. For the same union both paths name the same pair, but the full check attaches evidence only when that union is the first mold whose inference fails and its generic parameters are valid; an earlier failing mold, including one that refers to the union, and a union with duplicate or too many parameters keep the generic error. `infer-jibb-file-detailed` returns structured overlap evidence for the first failed mold, including the originating path, exact source, mold name and both case spans. Ordinary Jibb imports preserve a child’s evidence through source and cache checks; the legacy `infer-jibb-file` API remains a text-result adapter and renders both excerpts. Specialized API and prepared-prelude paths retain their existing generic or text-only error boundaries. This witness uses a shared 256-node source/pair budget per attempt; generic-wrapper parameter validation has a separate 256-entry cap. An unsupported earlier case may hide a later overlap. The pairwise projection has no budget: the full check runs it before inferring a union's cases, and once more, to find the pair, on a failed union mold whose generic parameters are valid. Parsing, atom and name sizes, source-excerpt rendering, and downstream checking also remain outside these budgets. `tests/lib/jibb-union-alias-overlap.hoon` checks the source proof and partial report; `tests/lib/jibb-full-overlap-basic.hoon` and `tests/lib/jibb-full-overlap-graph.hoon` check the detailed and legacy full-module paths, source attribution and cache behavior.
72
66
73A single-arm cell pattern can bind two or more positions, with its last binder capturing the remaining tail. Duplicate and shadowed names are rejected. A definite non-cell spine fails; an intermediate union or collection that might contain a cell remains unsupported. For a known non-union cell, a separate one-arm rule also accepts structured patterns, including nested literal and wildcard positions, when the existing coverage proof establishes the whole pattern. It binds payloads with their original types and checks result context; unknown, partially covered, union or recursive spines stay unsupported.
67A single-arm cell pattern can bind two or more positions, with its last binder capturing the remaining tail. Duplicate and shadowed names are rejected. A definite non-cell spine fails; an intermediate union or collection that might contain a cell remains unsupported. For a known non-union cell, a separate one-arm rule also accepts structured patterns, including nested literal and wildcard positions, when the existing coverage proof establishes the whole pattern. It binds payloads with their original types and checks result context; unknown, partially covered, union or recursive spines stay unsupported.
74
68
75String interpolation infers its pieces in order and preserves substitutions and pending constraints. A piece with a known atom aura, unrestricted `@`, or a tape `(list @tD)` is accepted; an isolated decimal literal takes its normal `@ud` default. A known cell reports that it needs a printer, and an explicitly generic atom asks for an aura at its use site. Loobeans, term singletons, non-tape collections, open types and a type fixed only later remain unsupported in this fragment.
69String interpolation infers its pieces in order and preserves substitutions and pending constraints. A piece with a known atom aura, unrestricted `@`, or a tape `(list @tD)` is accepted; an isolated decimal literal takes its normal `@ud` default. A known cell reports that it needs a printer, and an explicitly generic atom asks for an aura at its use site. Loobeans, term singletons, non-tape collections, open types and a type fixed only later remain unsupported in this fragment.
76
70
77−A bare decimal is a `@ud` (S4): its variable binds only `@ud` or `@u`, and it fits `@` and `*`. A `++` generic over the decimal's aura generalizes it to an atom variable, so there it takes any aura. When a fit fails, `+decimal-misfit` refits with each decimal widened to any aura, so that a generic gate's capital learns its aura from the other arguments, then walks the value's syntax beside the expected type through groups, faces, tuples, term-headed pairs, the union case a head tag picks, units and lists. The first decimal at an atom of another aura gets an error naming it and the expected aura's literal, as "`30` is a @ud, not a @dr; write ~s30"; otherwise the site's own error stands. Casts, call arguments, change fields, list items and tails, unit payloads, branch joins and contextual branch arms use it, and a `?-` over a known union or an atom checks its number patterns against the subject's type the same way.
78−
79−The Hoon bridge translates imported `(unit T)` to the canonical public `unit` union when the prepared template validates as the standard mold. Without that template it retains the older opaque collection behavior. Conversion recurses through imported unions and collection arguments, and API path/diff/poke analysis uses the same prepared reader. The fixtures prove identity, `fall`, `need`, casts, union- and list-nested `need`, canonical unit-typed API full/diff marks, and a canonical direct-poke export while leaving no-prelude output unchanged.
80−
81The Hoon bridge translates imported `*` as the any-noun type, directly or within supported nonrecursive cells. The reader may still decline a disjoint tagged union with a noun payload, and recursive imports containing `*` remain unsupported. It accepts an exact fork of the two loobean singletons as `?`, and each singleton separately as `%.y` or `%.n`, including inside supported faced cells. Contextual loobean literals specialize against a matching singleton by noun, including a proven singleton in a direct union; named loobean singletons do not silently widen to a distinct aura. Open `%f`, other values, and other forks containing loobean singletons remain unsupported; recursive Hoon molds containing flags can also fail closed.
71The Hoon bridge translates imported `*` as the any-noun type, directly or within supported nonrecursive cells. The reader may still decline a disjoint tagged union with a noun payload, and recursive imports containing `*` remain unsupported. It accepts an exact fork of the two loobean singletons as `?`, and each singleton separately as `%.y` or `%.n`, including inside supported faced cells. Contextual loobean literals specialize against a matching singleton by noun, including a proven singleton in a direct union; named loobean singletons do not silently widen to a distinct aura. Open `%f`, other values, and other forks containing loobean singletons remain unsupported; recursive Hoon molds containing flags can also fail closed.
82
72
83A bare tag that provably matches no case of a known union reports the union and tag sites. This covers casts, single-argument calls, contextual unit payloads, list items and supported branch arms, including unnamed imported unions. For syntactic tuples, ordered fit replay can identify a missing tag in a nested position; an earlier mismatch or uncertainty stops the replay instead of guessing. Existing tags whose shape or payload does not fit retain the ordinary mismatch; unresolved tags stay pending.
73A bare tag that provably matches no case of a known union reports the union and tag sites. This covers casts, single-argument calls, contextual unit payloads, list items and supported branch arms, including unnamed imported unions. For syntactic tuples, ordered fit replay can identify a missing tag in a nested position; an earlier mismatch or uncertainty stops the replay instead of guessing. Existing tags whose shape or payload does not fit retain the ordinary mismatch; unresolved tags stay pending.
84
74
85−A change can replace uniquely named fields on a fully known, faced record spine, including through a nested wing. An item named by a wing, as `m(open.cart=x)`, reads its field through such spines, outermost first. Replacements receive the field type as context, substitutions and pending constraints are retained, and the resulting type remains the original record. Missing fields, empty changes and definite replacement mismatches report sites; the expected-type site is the edit, since the original field declaration location is not retained. A missing field in an item's wing is reported at that name, and a wing through a field that is surely no record, such as a list, an atom or a unit, at the field it goes through. Unknown or partly unfaced spines, wings through tuples and type variables, and ambiguous fields remain unsupported. Two items that set the same field, or one a field inside the other's, are a module error at both items, as a repeated record field is. A cast to a known record also supplies field context to a tuple or record initializer, including nested list and union fields. The expected-type site is the cast mold; the original field declaration location is not retained. Isolated cart-style `init` and `update` expressions infer in this fragment. The complete cart-store source fails closed because store kind and declaration scope are not yet checked.
75+A change can replace uniquely named fields on a fully known, faced record spine, including through a nested wing. Replacements receive the field type as context, substitutions and pending constraints are retained, and the resulting type remains the original record. Missing fields, empty changes and definite replacement mismatches report sites; the expected-type site is the edit, since the original field declaration location is not retained. Unknown or partly unfaced spines, ambiguous fields and repeated edits remain unsupported. A cast to a known record also supplies field context to a tuple or record initializer, including nested list and union fields. The expected-type site is the cast mold; the original field declaration location is not retained. Isolated cart-style `init` and `update` expressions infer in this fragment. The complete cart-store source fails closed because store kind and declaration scope are not yet checked.
86−
87−Nested labels of the three public re-exports are normalized recursively to `ask`, `qath` and `raw-poke`, so prepared records and instantiated types do not expose their private `.internal` suffixes. Other private names remain private.
88
76
89For supported closed unions, the type printer keeps the union’s origin separate from its displayed name. It prints an in-scope name such as `msg` or `msg.lib`, including in records and gates; an accessible imported nongeneric alias may name a transitive union. A nongeneric body-local union that escapes its scope, or an origin without an accessible name, prints its cases separated by spaces, parenthesized when nested. That case-list form is print-only. A supported generic union prints its name and all arguments, including unused arguments; when its name is unavailable, the partial printer reports that limitation instead of dropping its arguments. Two faces for the same imported origin remain compatible; compatibility between distinct union origins, including in gate types, remains unsupported. Some comparisons of generic union arguments also remain unsupported rather than deciding equality or mismatch. The Hoon bridge also translates some imported unnamed unions into this representation; unsupported cases remain errors.
77For supported closed unions, the type printer keeps the union’s origin separate from its displayed name. It prints an in-scope name such as `msg` or `msg.lib`, including in records and gates; an accessible imported nongeneric alias may name a transitive union. A nongeneric body-local union that escapes its scope, or an origin without an accessible name, prints its cases separated by spaces, parenthesized when nested. That case-list form is print-only. A supported generic union prints its name and all arguments, including unused arguments; when its name is unavailable, the partial printer reports that limitation instead of dropping its arguments. Two faces for the same imported origin remain compatible; compatibility between distinct union origins, including in gate types, remains unsupported. Some comparisons of generic union arguments also remain unsupported rather than deciding equality or mismatch. The Hoon bridge also translates some imported unnamed unions into this representation; unsupported cases remain errors.
90
78
91−The type printer shows a type variable by the name it was written with. A variable's ID holds that name above a 64-bit count (`+named-var`), so the name travels through substitution, generalization and instantiation, and `+ienv-fresh-id` counts without it. When a definition is generalized, `+cap-names` names each quantified variable after a capital written in the definition that resolves to it, or else after the earliest made of the named variables joined with it; a call note does the same without the capitals. `+canonical-itype` keeps the names and numbers the other variables as the letters (`+show-var`) that no name in the same type spells.
92−
93Multi-argument calls form one right-nested sample: `f a b c` supplies `[a [b c]]`, with the last argument able to be a cell itself. The fragment fits the complete sample, preserving known faces and shared variables. Known sample positions can provide list or union context to arguments; unknown sample shapes use ordinary inference and some contextual forms remain unsupported. For a definite mismatch, the diagnostic points to a specific argument when it can establish which one failed; otherwise it reports the combined sample.
79Multi-argument calls form one right-nested sample: `f a b c` supplies `[a [b c]]`, with the last argument able to be a cell itself. The fragment fits the complete sample, preserving known faces and shared variables. Known sample positions can provide list or union context to arguments; unknown sample shapes use ordinary inference and some contextual forms remain unsupported. For a definite mismatch, the diagnostic points to a specific argument when it can establish which one failed; otherwise it reports the combined sample.
94
80
95A list literal can be inferred when a cast or known gate sample supplies a list type and the supplied prelude has the validated standard list definition. Empty, nonempty and nested literals work, including contextual union tags in elements; mismatched elements report the item and expected type. Imported Hoon lists share this representation. Under the same known context, `~` and zero-valued term literals fit an empty list, and a two-item unfaced cell `[head tail]` is a cons; cons cells and list literals can be nested. Mismatched heads or tails report both sites. A known list result also supplies context through complete loobean, unit-shaped and list-shaped branches, including recursive and nested branches. Known loobean result context can propagate through supported complete branches and binder-only cell arms, with a final directional fit; a binder-only arm over a union subject remains unsupported. A known gate with an unresolved result variable can also receive an enclosing result type before its argument is inferred, for example allowing `^- (list @t) (id ~)`; unknown callees and unresolved targets retain the conservative path. A known gate sample supplies context to corresponding positions of a single tuple or record argument, including nested cells; a zero literal can therefore fit a list position. A bound zero constant still remains unsupported rather than a definite mismatch, and an unknown callee does not supply context. Uncontextualized list literals also infer with a fresh element variable, including empty and nested lists; the resulting variable can generalize. Unresolved item tags and uncertain widening remain unsupported. Faced or longer cons cells, and a missing or altered prelude list remain unsupported. For a known standard list with a supported element type, it also infers a complete two-arm branch using `~` and `[item rest]`, in either order. The binders have the element and list types and cannot shadow or duplicate names. Unknown subjects, unsupported element types, other patterns and incomplete arms remain unsupported.
81A list literal can be inferred when a cast or known gate sample supplies a list type and the supplied prelude has the validated standard list definition. Empty, nonempty and nested literals work, including contextual union tags in elements; mismatched elements report the item and expected type. Imported Hoon lists share this representation. Under the same known context, `~` and zero-valued term literals fit an empty list, and a two-item unfaced cell `[head tail]` is a cons; cons cells and list literals can be nested. Mismatched heads or tails report both sites. A known list result also supplies context through complete loobean, unit-shaped and list-shaped branches, including recursive and nested branches. Known loobean result context can propagate through supported complete branches and binder-only cell arms, with a final directional fit; a binder-only arm over a union subject remains unsupported. A known gate with an unresolved result variable can also receive an enclosing result type before its argument is inferred, for example allowing `^- (list @t) (id ~)`; unknown callees and unresolved targets retain the conservative path. A known gate sample supplies context to corresponding positions of a single tuple or record argument, including nested cells; a zero literal can therefore fit a list position. A bound zero constant still remains unsupported rather than a definite mismatch, and an unknown callee does not supply context. Uncontextualized list literals also infer with a fresh element variable, including empty and nested lists; the resulting variable can generalize. Unresolved item tags and uncertain widening remain unsupported. Faced or longer cons cells, and a missing or altered prelude list remain unsupported. For a known standard list with a supported element type, it also infers a complete two-arm branch using `~` and `[item rest]`, in either order. The binders have the element and list types and cannot shadow or duplicate names. Unknown subjects, unsupported element types, other patterns and incomplete arms remain unsupported.
@@ -100,31 +86,21 @@ A backtick constructs a unit when the supplied prelude has the validated standar
100
86
101A known union of `~` and a null-headed cell can be matched by `~` and `[~ value]` arms in either order. The payload binder is checked for shadowing. Unknown subjects, missing or duplicate arms, and unresolved branch results remain unsupported; this fragment infers the prelude’s `fall` and `need` signatures.
87A known union of `~` and a null-headed cell can be matched by `~` and `[~ value]` arms in either order. The payload binder is checked for shadowing. Unknown subjects, missing or duplicate arms, and unresolved branch results remain unsupported; this fragment infers the prelude’s `fall` and `need` signatures.
102
88
103−The checked inference fragment represents the empty mold `!!` explicitly. A cell with a proven-empty field is empty, while a gate returning `!!` and the empty values of `(list !!)` and `(unit !!)` remain inhabited. Supported union matches discard proven-empty cases, reject unreachable list or unit payload arms, and require a proof of reachability for fixed opaque cases. A written capital may have an inhabited instance; the existing definition-boundary checks still reject forcing it to a concrete empty type. A directly known standard `(list !!)` permits a single null arm, including in a result context. Unknown and opaque types, other one-arm list subjects, and proofs exceeding their budgets fail closed. Emptiness checks use up to 256 type-node visits per fit or list/unit reachability proof and 4,096 visits when filtering union cases. These bounds do not cover substitution walking, parsing, normalization, source lookup or repeated attempts. This is a supported checking slice, not a proof of arbitrary recursive molds or runtime execution.
104−
105A known closed union with two or more arms can be matched when each arm provably covers or excludes each remaining case. The checker first tries whole cases; when a pattern splits a case, it can expand known `?` positions into their two noun values, up to 64 alternatives across the union. Binders retain the original case type, and one arm may bind several refinements of that case. It reports missing alternatives and arms already covered, checks tags by noun value, and supports imported and generic union cases. Other partial patterns, expansions above the limit, binders spanning distinct cases, differing arm result types and some complex two-arm subjects remain unsupported. When a cast or known call sample supplies a result type, a known union subject accessed by a wing, a grouped wing or a supported shallow call can propagate that context through whole-case arms and supported finite loobean refinements, including nested cell and list positions. Other partial-pattern contexts and subject forms remain unsupported. The Grammar’s `step` block infers in this fragment, but its module is not yet checked.
89A known closed union with two or more arms can be matched when each arm provably covers or excludes each remaining case. The checker first tries whole cases; when a pattern splits a case, it can expand known `?` positions into their two noun values, up to 64 alternatives across the union. Binders retain the original case type, and one arm may bind several refinements of that case. It reports missing alternatives and arms already covered, checks tags by noun value, and supports imported and generic union cases. Other partial patterns, expansions above the limit, binders spanning distinct cases, differing arm result types and some complex two-arm subjects remain unsupported. When a cast or known call sample supplies a result type, a known union subject accessed by a wing, a grouped wing or a supported shallow call can propagate that context through whole-case arms and supported finite loobean refinements, including nested cell and list positions. Other partial-pattern contexts and subject forms remain unsupported. The Grammar’s `step` block infers in this fragment, but its module is not yet checked.
106
90
107−Before any branch path runs, `+branch-tag-name` rejects a pattern name that spells one of the subject's tags at its position, as `stop` for `%stop` (Grammar, Patterns). It infers the subject on its own and walks each arm's pattern through faces, cells and union cases, skipping the cases a cell pattern can't match. It stops at atoms, `*`, variables, collections, recursive molds and a generic union's argument positions, so every path that checks a `?-` reports the same error. A subject whose inference fails, or whose type isn't known yet, is left to the path.
108−
109A known closed union can also provide context to each arm of a complete loobean or unit-shaped branch in a cast or a call with a known union sample. Nested branches and transparent groups work; a mismatch reports the expected union and the offending arm. General patterns and context through bodies with local definitions remain unsupported, and unrelated unresolved tags stay pending.
91A known closed union can also provide context to each arm of a complete loobean or unit-shaped branch in a cast or a call with a known union sample. Nested branches and transparent groups work; a mismatch reports the expected union and the offending arm. General patterns and context through bodies with local definitions remain unsupported, and unrelated unresolved tags stay pending.
110
92
111−The separate `jibb-dev/lib/jibb-import.hoon` is an unfinished reader for selected Hoon type graphs. It handles named recursion, nested map, set, queue, list, unit, jar and jug arguments, direct ordered maps, and direct `$^` unions whose source branches can be proved disjoint. It also recognizes a direct ordered-map call with two simple named mold operands, as in Tlon `notes.log`, after validating provenance and operand source; revisiting the same map hold fails closed. It also reads ordered map fields in records when the map arguments are syntactically fixed atom molds and other fields are fixed atom molds or standard collections of static atom molds. Collection names must not be shadowed. The reader can also import a mark door sample, removing its outer sample face and validating its build subject. For a mark whose sample is exactly a named arm of its single Ford-imported `/sur` core, it can recover a source-proved nonrecursive union, including source-location wrappers around fields; recursive or unverified fallback results remain unsupported. The reader checks explicit Hoon `$%`, `$?` and `$^` unions against the Grammar’s disjointness rule, as @iko confirmed on 2026-10-30. For an explicit `$%` with distinct literal head tags, it can also prove restricted local named payload dependencies, including bare `~` fields, re-evaluate and validate each source branch, and recover the union before Hoon collapses it. The real Tlon `notes.u-note` exercises its `[%deleted ~]` case. A bounded fallback also recovers one level of local named tagged unions inside such a union, including Tlon `notes.u-notebook` and `notes.u-notes`. Source-proved tagged unions can also be wrapped in Hoon `$~` defaults, including a downstream union using Tlon `epic.saga`; the selected source and projected branches still undergo the same provenance and disjointness checks. The tagged-source helper peels up to four consecutive default wrappers, while default wrappers encountered inside dependency proofs consume the existing semantic-node budget. A source-proved nested self-recursive union retains its named owner, including Tlon `notes.import-node`; deeper, mutually recursive or unproven cases stay unsupported. The nested source proof has a 256-visit semantic-node budget, and source-location wrapper peeling is limited to four per node; Hoon evaluation and source scans are not metered. It rejects recursive or computed dependencies, inherited same-name collisions, unsupported nested unions and proofs exceeding a shared 4,096-node budget. It re-evaluates statically recognizable source branches before Hoon can collapse them, checks materialized fork cases, and rejects shapes it cannot prove disjoint. Static records may also have verified standard-collection and `path` siblings. One direct explicit union argument in a standard list, set, map or unit is accepted when its call wrapper and collection provenance are verified and its static cases are pairwise disjoint. A synthetic regression checks that forged wrapper subjects, samples and tails are rejected. Other collection-union forms, nested ordered maps, general source-level disjointness and complete integration with the checker remain unfinished. `+golden-types-imports` can consume fixed-aura atoms, valid term singletons, Hoon's `%n` zero singleton as Jibb `~`, nested faced or unfaced cells, unions of supported, pairwise-disjoint cases, and opaque standard collections with supported arguments from caller-supplied reader results for declared `/-` imports; `+golden-types-with-marks` accepts the same shapes for declared marks. The caller must pass unchanged results from the source-aware reader: the bridge validates the supplied graph but cannot detect source cases Hoon collapsed before that graph was built. The opaque collection types retain their names and arguments for identity, unification and printing. The validated standard prelude `list` mold shares the imported list representation; other Jibb-written collection molds and most prelude collection operations remain unsupported. Other forms remain unsupported. Its disjointness proof is conservative and can reject a valid union it cannot prove disjoint. Collection recognition requires the originating `/sur` core. The reader validates direct zuse subjects and Ford subjects consisting of faced imported cores and a validated tail, checking imported cores transitively; it rejects shadowed names, inconsistent core subjects and other subject shapes. For a recursive reference, the reader matches the exact Hoon hold against named arms in validated cores, including transitive Ford imports; it rejects missing, unlabelled or ambiguous origins. Its fixtures include three real Tlon files; the `tests/lib/jibb-import.hoon` suite, which holds the probes, compares the internal projection with its golden output and checks the structured values behind it, under eval (`tools/test-arms jibb-import`) and on the ship. `tests/lib/jibb-bridge.hoon` and `tests/lib/jibb-mark-bridge.hoon` compare bridge reports under eval and on the ship. `tests/lib/jibb-tlon-bridge.hoon` exercises four real Tlon presence unions and a field read through the source-aware reader and partial checker, under eval and on the ship. `tools/clay-fixtures` also passes Clay-built `/sur` molds and mark samples through the Clay-built importer and partial checker.
93+The separate `jibb-dev/lib/jibb-import.hoon` is an unfinished reader for selected Hoon type graphs. It handles named recursion, nested map, set, queue, list, unit, jar and jug arguments, direct ordered maps, and direct `$^` unions whose source branches can be proved disjoint. It also recognizes a direct ordered-map call with two simple named mold operands, as in Tlon `notes.log`, after validating provenance and operand source; revisiting the same map hold fails closed. It also reads ordered map fields in records when the map arguments are syntactically fixed atom molds and other fields are fixed atom molds or standard collections of static atom molds. Collection names must not be shadowed. The reader can also import a mark door sample, removing its outer sample face and validating its build subject. For a mark whose sample is exactly a named arm of its single Ford-imported `/sur` core, it can recover a source-proved nonrecursive union, including source-location wrappers around fields; recursive or unverified fallback results remain unsupported. The reader checks explicit Hoon `$%`, `$?` and `$^` unions against the Grammar’s disjointness rule, as @iko confirmed on 2026-10-30. For an explicit `$%` with distinct literal head tags, it can also prove restricted local named payload dependencies, including bare `~` fields, re-evaluate and validate each source branch, and recover the union before Hoon collapses it. The real Tlon `notes.u-note` exercises its `[%deleted ~]` case. A bounded fallback also recovers one level of local named tagged unions inside such a union, including Tlon `notes.u-notebook` and `notes.u-notes`. Source-proved tagged unions can also be wrapped in Hoon `$~` defaults, including a downstream union using Tlon `epic.saga`; the selected source and projected branches still undergo the same provenance and disjointness checks. The tagged-source helper peels up to four consecutive default wrappers, while default wrappers encountered inside dependency proofs consume the existing semantic-node budget. A source-proved nested self-recursive union retains its named owner, including Tlon `notes.import-node`; deeper, mutually recursive or unproven cases stay unsupported. The nested source proof has a 256-visit semantic-node budget, and source-location wrapper peeling is limited to four per node; Hoon evaluation and source scans are not metered. It rejects recursive or computed dependencies, inherited same-name collisions, unsupported nested unions and proofs exceeding a shared 4,096-node budget. It re-evaluates statically recognizable source branches before Hoon can collapse them, checks materialized fork cases, and rejects shapes it cannot prove disjoint. Static records may also have verified standard-collection and `path` siblings. One direct explicit union argument in a standard list, set, map or unit is accepted when its call wrapper and collection provenance are verified and its static cases are pairwise disjoint. A synthetic regression checks that forged wrapper subjects, samples and tails are rejected. Other collection-union forms, nested ordered maps, general source-level disjointness and complete integration with the checker remain unfinished. `+golden-types-imports` can consume fixed-aura atoms, valid term singletons, Hoon's `%n` zero singleton as Jibb `~`, nested faced or unfaced cells, unions of supported, pairwise-disjoint cases, and opaque standard collections with supported arguments from caller-supplied reader results for declared `/-` imports; `+golden-types-with-marks` accepts the same shapes for declared marks. The caller must pass unchanged results from the source-aware reader: the bridge validates the supplied graph but cannot detect source cases Hoon collapsed before that graph was built. The opaque collection types retain their names and arguments for identity, unification and printing. The validated standard prelude `list` mold shares the imported list representation; other Jibb-written collection molds and most prelude collection operations remain unsupported. Other forms remain unsupported. Its disjointness proof is conservative and can reject a valid union it cannot prove disjoint. Collection recognition requires the originating `/sur` core. The reader validates direct zuse subjects and Ford subjects consisting of faced imported cores and a validated tail, checking imported cores transitively; it rejects shadowed names, inconsistent core subjects and other subject shapes. For a recursive reference, the reader matches the exact Hoon hold against named arms in validated cores, including transitive Ford imports; it rejects missing, unlabelled or ambiguous origins. Its fixtures include three real Tlon files; `tools/importer-test` compares the internal projection under eval, and the ship test compares the same golden output. `tools/type-import-test` and `tools/type-mark-test` compare bridge reports under eval and on the ship. `tools/type-tlon-test` and its ship counterpart exercise four real Tlon presence unions and a field read through the source-aware reader and partial checker. `tools/clay-fixtures` also passes Clay-built `/sur` molds and mark samples through the Clay-built importer and partial checker.
112−
113−An import-free Jibb library can export an opaque single-parameter recursive identity when its source has exactly two distinct term-tagged cases: a text leaf and a node containing `(list (name M))`, optionally with one `$-(@t M)` event field. A module-local index records the exact parsed source, defining path and prepared prelude interface; it is shared across that module's inference passes, and its canonical `list` must be source-backed. The normal resolver publishes an interface only after all ordinary mold and value checks succeed. Same-origin aliases retain the defining identity and independently instantiate type arguments; distinct origins remain unsupported. The opaque identity is conservatively treated as gate-bearing for numeric defaulting, and gate-freedom remains unknown. Explicit literal-headed construction uses a source-proven one-layer view: the event result receives the existing type argument and recursive children keep the defining identity. It consumes the existing shared 256-step recursive inference budget, and a per-view 4,096-visit guard bounds the new face and substitution scan; longer scans decline. These bounds do not cover parsing, existing inference, atom sizes or repeated attempts. One startup-inclusive, shared-load comparison of 100 valid and 100 invalid source definitions took 29.67 s wall / 25.14 s user CPU before this slice and 33.47 s / 26.99 s with it; the former declined all 200 while the latter inferred the valid definitions. These single runs are not a production benchmark. Matches over explicit source tags, flat binder or wildcard fields, and nonbinding catch-alls use that same one-layer view and existing binder, coverage and branch checks. Up to 128 arms are screened per attempt; longer matches decline. A single-arm match on a direct in-scope wing can report its missing case, and a contextual one-arm call subject can use a nonbinding catch-all. Recursive children retain their nominal type and arguments. Subject recognition and view validation can each scan substitutions, and the scan cap applies separately to each attempt. In one separate startup-inclusive comparison of 100 valid and 100 invalid source matches, the construction-only checker took 30.18 s wall / 29.31 s user CPU and declined all 200, while the pattern slice took 28.28 s / 27.69 s and inferred or diagnosed them. These single shared-load figures are not production benchmarks. General structural fits, whole-case binders, nested recursive patterns, uncontextualized single-arm call subjects, recursive source with imports and local recursive molds remain unsupported; the test tree does not prescribe the eventual `element` representation. Caller-supplied detached interfaces and caches retain the existing trusted-input contract.
114
94
115Self-recursive `/sur` molds can cross the bridge as opaque module-and-name identities when their supported source-aware graph passes validation, including one-argument lists containing same-origin recursive references. The real Tlon `notes.import-node` reaches this bridge; it does not unfold or construct the recursive type. Aliases, foreign references, recursive marks, unfolding, construction and field access remain unsupported; the partial printer declines recursive names that are not in scope.
95Self-recursive `/sur` molds can cross the bridge as opaque module-and-name identities when their supported source-aware graph passes validation, including one-argument lists containing same-origin recursive references. The real Tlon `notes.import-node` reaches this bridge; it does not unfold or construct the recursive type. Aliases, foreign references, recursive marks, unfolding, construction and field access remain unsupported; the partial printer declines recursive names that are not in scope.
116
96
117The partial checker also recognizes a source-proven Jibb recursive mold consisting of `~` and one faced cell with a fixed-aura head and direct self tail. Its identity includes the defining path and name. It unfolds this shape for supported null and cell construction and for a two-arm null/cell match; static application-path literals use the verified public `qath` alias. The internal prelude defines `qath` as a transparent knot sequence and the public prelude re-exports it. Each inference attempt has 256 unfolding and static-segment steps; parsing and separate retries are not bounded by that limit. Dynamic application-path segments, broader patterns and other recursive shapes remain unsupported. Route and static-file existence checks remain milestone 4.
97The partial checker also recognizes a source-proven Jibb recursive mold consisting of `~` and one faced cell with a fixed-aura head and direct self tail. Its identity includes the defining path and name. It unfolds this shape for supported null and cell construction and for a two-arm null/cell match; static application-path literals use the verified public `qath` alias. The internal prelude defines `qath` as a transparent knot sequence and the public prelude re-exports it. Each inference attempt has 256 unfolding and static-segment steps; parsing and separate retries are not bounded by that limit. Dynamic application-path segments, broader patterns and other recursive shapes remain unsupported. Route and static-file existence checks remain milestone 4.
118
98
119−Callers that have a `/sur` core and a name can use `+read-named`: it checks for a locally declared arm before asking Hoon to evaluate the mold, and reports evaluation failures with the final Hoon trace line. `+read-mold-in` remains available when the caller already has the selected type. The opt-in `+read-named-diagnostic` and `+read-mark-diagnostic` preserve successful graphs and distinguish definite `%invalid` evidence emitted directly by the reader from `%unsupported` failures. Other failures, including unverified union disjointness and vase recognition based only on a name, remain unsupported. These entry points revalidate and re-walk failed types; the opt-in `+golden-types-with-reader-diagnostics` accepts unchanged structured reader results and reports definite aura, core or proven union-overlap errors at their imported mold use sites, when the import and supplied input are unique. Ordered replay covers direct and nested cell samples, record and function casts, and non-generic same-module aliases; it stops at an unsupported prefix, cycle or shadowing failure. Union molds, generic applications, transitive modules and unsupported reader outcomes still report generic limitations. Replay repeats inference and may add work; this entry point remains partial. Existing checker entry points continue treating failed imports as unsupported. It also fails closed on repeated field faces along an imported record spine, including recursive roots; the diagnostic remains generic. Hoon type graphs can erase unfaced nested-cell boundaries, so the check may conservatively reject a valid source with equal names in distinct erased scopes. Faced nested records and union alternatives keep separate scopes.
99+Callers that have a `/sur` core and a name can use `+read-named`: it checks for a locally declared arm before asking Hoon to evaluate the mold, and reports evaluation failures with the final Hoon trace line. `+read-mold-in` remains available when the caller already has the selected type. The opt-in `+read-named-diagnostic` and `+read-mark-diagnostic` preserve successful graphs and distinguish definite `%invalid` aura and core evidence emitted directly by the reader from `%unsupported` failures. Other failures, including unverified union disjointness and vase recognition based only on a name, remain unsupported. These entry points revalidate and re-walk failed types; the opt-in `+golden-types-with-reader-diagnostics` accepts unchanged structured reader results and reports definite aura or core errors at their imported mold use sites, when the import and supplied input are unique. Ordered replay covers direct and nested cell samples, record and function casts, and non-generic same-module aliases; it stops at an unsupported prefix, cycle or shadowing failure. Union molds, generic applications, transitive modules and unsupported reader outcomes still report generic limitations. Replay repeats inference and may add work; this entry point remains partial. Existing checker entry points continue treating failed imports as unsupported. It also fails closed on repeated field faces along an imported record spine, including recursive roots; the diagnostic remains generic. Hoon type graphs can erase unfaced nested-cell boundaries, so the check may conservatively reject a valid source with equal names in distinct erased scopes. Faced nested records and union alternatives keep separate scopes.
120−
121−For supported source-aware Hoon `$?` unions, the reader can prove a definite overlap by independently evaluating and projecting the original cases, verifying each projected head against its source tag, and finding a shared runtime noun in a pair. Its positive witness traverses faces, named nodes, forks, cells, supported atom forms and `*`; `!!`, opaque references, applications and unproved aura intersections cannot themselves establish a witness. It compares singleton noun values independently of aura, and requires inhabited positions throughout a cell. Unknown or exhausted proof remains unsupported, while existing disjoint-source recovery still handles proven distinct cases. The source screen admits at most 128 cases and 4,096 raw noun nodes; dependency checking and the pair/type witness each have their own 4,096-node budget. Hoon evaluation, projected-graph validation, chapter lookup, atom byte sizes and other type-graph walks remain outside those budgets. The error points at the Jibb use; source case locations are unavailable. This is a partial named-reader analysis, not general imported-union checking or a mark-reader overlap diagnostic.
122−
123−In single startup-inclusive runs of eight Hoon reads, a benign three-case union used 37.78 seconds of user CPU with the earlier narrow witness and 39.99 seconds with the structural witness; a repeated-head union used 39.84 and 40.97 seconds. Other checks ran concurrently, so these measurements do not establish a production bound.
124
100
125The partial report can diagnose certain non-gate value dependency cycles, including cycles through gates. It requires an explicit atom or loobean result cast and a syntactically proven dependency group with unshadowed simple samples; it identifies the value and a dependency site. Untyped results, branches, nested definitions, qualified wings and complex samples remain unsupported. The proof constructs an additional dependency graph. One 24-case recursive/generic eval run took 19.7 s with it and 18.6 s before it, including startup; these single runs do not isolate the graph cost.
101The partial report can diagnose certain non-gate value dependency cycles, including cycles through gates. It requires an explicit atom or loobean result cast and a syntactically proven dependency group with unshadowed simple samples; it identifies the value and a dependency site. Untyped results, branches, nested definitions, qualified wings and complex samples remain unsupported. The proof constructs an additional dependency graph. One 24-case recursive/generic eval run took 19.7 s with it and 18.6 s before it, including startup; these single runs do not isolate the graph cost.
126
102
127−The source-backed `+api-path-analysis-source` is a separate partial analysis, not an API check: it resolves reachable Jibb imports and declared mark graphs and returns path and scry segments, full and diff mark identities and their types. It also checks derived-name collisions and reports a clash as a definite error at both sites. Full and diff payloads must be direct declared mark names; typed scry parameters must be a same-name, same-aura subset of the watch parameters, and unknown or duplicate segment binders fail closed. It creates no request gates. The caller must pass a trusted prepared prelude and unchanged source-aware reader results.
103+The source-backed `+api-path-analysis-source` is a separate partial analysis, not an API check: it resolves reachable Jibb imports and declared mark graphs and returns path and scry segments, full and diff mark identities and their types. It also checks derived-name collisions. Full and diff payloads must be direct declared mark names; typed scry parameters must be a same-name, same-aura subset of the watch parameters, and unknown or duplicate segment binders fail closed. It creates no request gates. The caller must pass a trusted prepared prelude and unchanged source-aware reader results.
128
104
129`+api-path-evidence-source` retains that analysis with the API source, complete prepared prelude (including reserved names), supplied reader results and resolved Jibb dependency cache. `+api-path-watchability` classifies a unique declaration as watchable or not watchable, or reports unknown when evidence is absent or ambiguous. The artifact and reader results are trusted host inputs; the host must bind them to the source versions used later. This is declaration evidence, not proof about an arbitrary request value, a checked API module, a runtime validator or an island watch.
105`+api-path-evidence-source` retains that analysis with the API source, complete prepared prelude (including reserved names), supplied reader results and resolved Jibb dependency cache. `+api-path-watchability` classifies a unique declaration as watchable or not watchable, or reports unknown when evidence is absent or ambiguous. The artifact and reader results are trusted host inputs; the host must bind them to the source versions used later. This is declaration evidence, not proof about an arbitrary request value, a checked API module, a runtime validator or an island watch.
130
106
@@ -132,46 +108,22 @@ For a unique supported declaration, `+api-request-parts` retains that evidence w
132
108
133`+api-support-analysis-source` additionally infers supported ordinary API molds and values, resolves every declared mark, and retains their source, dependency and path evidence. Unsupported helpers or marks fail closed. An unused `/-` core is not independently validated, ordinary definitions that need derived gates remain unsupported, and this result is not a checked API interface or an exported request.
109`+api-support-analysis-source` additionally infers supported ordinary API molds and values, resolves every declared mark, and retains their source, dependency and path evidence. Unsupported helpers or marks fail closed. An unused `/-` core is not independently validated, ordinary definitions that need derived gates remain unsupported, and this result is not a checked API interface or an exported request.
134
110
135−The ordinary import resolver can infer derived request-gate types for multiple supported API paths. A case may take one typed path parameter before its reply gate, or one diff fold after the reply; a case with both, multiple parameters or diffs, or a separate scry path remains unsupported. Each reply maps the full mark type to a fresh `M` and the request result is `(ask M)`. Checked ordinary API values and molds, declared mark molds and a supported generic poke command helper are exported too. Every selected `/sur` core must have a directly used, successfully read mold; unselected core bindings are not independently validated, and Jibb module imports remain unsupported in this API fragment. An API module outside the fragment fails with the reason its check gave: without `+$ paths`, the poke-only check's, such as `API poke mark %todo-action has no reader result`; otherwise its request constructor's, such as `request paths need unsupported inference`. A failing Jibb import reports its own error, as it does for other modules. A derived `poke` or request name that clashes with a definition, an import face, a prelude value or another derived name is a definite error showing where the name is derived and what it clashes with; `+api-path-analysis-source` and the path evidence entries report it the same way. Only names that surely exist are checked: `poke` when the module declares `+$ poke`, and the case names of a `+$ paths` that reads as path cases. Two cases with the same name do not read as path cases, so that clash stays unsupported, as does a case named `proj` or `unface`, a reserved name. A name conflict among an API's imports and ordinary definitions reports `module has conflicting names`, as in other modules; a `/%` mark names a mold, so it conflicts only with another mark or mold, and a mark beside a value of the same name, such as a request, is not a conflict. The unchanged todo API fits this fragment.
111+The ordinary import resolver can infer derived request-gate types for multiple supported API paths. A case may take one typed path parameter before its reply gate, or one diff fold after the reply; a case with both, multiple parameters or diffs, or a separate scry path remains unsupported. Each reply maps the full mark type to a fresh `M` and the request result is `(ask M)`. Checked ordinary API values and molds, declared mark molds and a supported poke constructor are exported too. Every selected `/sur` core must have a directly used, successfully read mold; unselected core bindings are not independently validated, and Jibb module imports remain unsupported in this API fragment. The unchanged todo API fits this fragment.
136
112
137A call whose direct result is a known named generic union can receive a matching same-origin, same-arity result context before its arguments are inferred. This retains the ordered generic arguments and existing capital checks; pending tags, recursive or variable-bound origins and unrestricted atom cases remain conservative. Constructor fitting reports unsupported when an unresolved or opaque case could contain the requested tagged head. It keeps definite missing-case errors for proven nonmatching cases, including an explicitly atom-only faced head. The real todo callback `|=%got` can infer when an `(ask msg)` result context fixes its message union; the uncontextualized call remains unsupported.
113A call whose direct result is a known named generic union can receive a matching same-origin, same-arity result context before its arguments are inferred. This retains the ordered generic arguments and existing capital checks; pending tags, recursive or variable-bound origins and unrestricted atom cases remain conservative. Constructor fitting reports unsupported when an unresolved or opaque case could contain the requested tagged head. It keeps definite missing-case errors for proven nonmatching cases, including an explicitly atom-only faced head. The real todo callback `|=%got` can infer when an `(ask msg)` result context fixes its message union; the uncontextualized call remains unsupported.
138
114
139A two-item tuple with an explicit term, null or loobean head can receive payload context from a known union when every alternative is a literal-headed cell and its head noun is unique. The payload must be a direct wing-headed call, optionally grouped, with literal, wing or constructor arguments. The checker first retains the original inference if it already fits; otherwise it tries the contextual path once and fits the selected case and enclosing union. It declines this path if any substitution has a structural root, because a caller may have walked away variable provenance. Duplicate heads, opaque competitors and other shapes also stay conservative. The guard scans the substitution for each eligible tuple and may perform one extra shallow inference; it does not guarantee globally linear work. This lets an explicitly typed todo subscription body infer; it does not check an island or prove request watchability.
115A two-item tuple with an explicit term, null or loobean head can receive payload context from a known union when every alternative is a literal-headed cell and its head noun is unique. The payload must be a direct wing-headed call, optionally grouped, with literal, wing or constructor arguments. The checker first retains the original inference if it already fits; otherwise it tries the contextual path once and fits the selected case and enclosing union. It declines this path if any substitution has a structural root, because a caller may have walked away variable provenance. Duplicate heads, opaque competitors and other shapes also stay conservative. The guard scans the substitution for each eligible tuple and may perform one extra shallow inference; it does not guarantee globally linear work. This lets an explicitly typed todo subscription body infer; it does not check an island or prove request watchability.
140
116
141−`+gate-free-type` is a separate three-way proof over normalized checker types: it reports a gate-free result, a gate-bearing witness with its field path, or unknown. It tracks conservative inhabitance before reporting a gate in a cell, spends one shared node budget, and treats opaque recursion, open variables, unknown collection forms and `*` conservatively. Source-proven `qath` and the recognized list/unit representations have dedicated proofs. `+gate-free-mold-source` parses and resolves one named mold with a fresh active-root graph, retaining the complete prepared prelude, source bundle, trusted reader inputs, dependency cache and inferred mold. It caps classification at 256 nodes; parsing, import resolution and type inference are not covered by that cap. The host must canonicalize paths and bind trusted sources and reader results to their versions. API, store and private roots decline; other definitions and unused imported Hoon bindings are not fully checked. This is mold analysis, not a module, kind, island, watchability or runtime check, and it is separate from the generalized constraint solver below.
117+`+gate-free-type` is a separate three-way proof over normalized checker types: it reports a gate-free result, a gate-bearing witness with its field path, or unknown. It tracks conservative inhabitance before reporting a gate in a cell, spends one shared node budget, and treats opaque recursion, open variables, unknown collection forms and `*` conservatively. Source-proven `qath` and the recognized list/unit representations have dedicated proofs. `+gate-free-mold-source` parses and resolves one named mold with a fresh active-root graph, retaining the complete prepared prelude, source bundle, trusted reader inputs, dependency cache and inferred mold. It caps classification at 256 nodes; parsing, import resolution and type inference are not covered by that cap. The host must canonicalize paths and bind trusted sources and reader results to their versions. API, store and private roots decline; other definitions and unused imported Hoon bindings are not fully checked. This is mold analysis, not a module, kind, island, watchability or runtime check, and it does not infer general gate-free constraints.
142−
143−A dedicated `%fvar` form retains the `contains no gates` constraint inside schemes. Unification resolves and updates nested substitutions, so existing or later gate injection fails rather than bypassing the constraint; atom-constrained variables remain the stronger form. Constraint propagation covers open cells, faces, collections and unions with a 256-node bound. Canonicalization and instantiation preserve the constraint, template application validates constrained arguments, and an exhausted variable scan never chooses the unconstrained fallback. `set`, `map`, `mop`, `jar` and `jug` apply the same bounded propagation only to their key positions, leaving values independent. Public `eq` uses the private primitive interface, and generic `mate` retains the same constraint.
144−
145−A full ordinary module may export a narrow checked program `main` only as a direct, unqualified `(program init update view subs)` call with four simple wing arguments, modulo transparent grouping. The canonical prepared prelude must supply both the `program` value and mold. The ordinary source-backed program fit and all normal mold, value and request-graph checks complete first. The inferred `main` must be closed and invariantly match an instantiated `program` mold from that prelude. The initializer must have a closed gate scheme; its data and model contain no open variables and share the existing 256-node gate-free budget, with `%yes` required for both. The named subscription gate may syntactically return null through transparent casts, groups and definition-free bodies. Alternatively, after a successful request-graph merge, it may return one singleton list containing an unfaced `[%watch request]` pair whose request is a direct `case.face` call with one direct constructor callback. The face must resolve to an imported interface whose member has the exact plain derived-request scheme. Exactly one merged request evidence must match its API path and case, agree with the declaration's inner name, and appear in that interface's own graph; the interface source must equal the evidence's API source. The declaration must have no scry, diffs or path parameters. Pure or hand-built requests, helpers, aliases, re-exports, typed paths, folds, multiple subscriptions and missing or ambiguous evidence fail closed. Arbitrary or aliased mains, API/store kinds, and gates or unknowns in data/model also fail closed. This retains source and graph evidence and permits ordinary downstream imports; it neither executes the program nor implements runtime watching.
146−
147−The same post-inference, post-request-graph kind boundary accepts a static `main` by instantiating its ordinary scheme, fitting it to canonical `(element !!)`, requiring the specialized result closed, and publishing that closed canonical scheme. Thus `main view` works when `view` is generic only in its element message. A data page must instead be a direct `(page load view)` call with simple wing arguments and a closed main type invariant against the instantiated canonical `page` mold. Its named load must be a direct gate whose transparent body is exactly `case.face reply`, with a simple wing or direct constructor reply. Page loads and direct program watches share the exact plain derived-member/request-evidence check: unique evidence in the selected interface's own graph, matching API source and inner case name, no typed path segments, diffs or scry. Page aliases, indirect or hand-built/pure/unknown requests, other main types and store paths fail closed. These are interface checks only, not rendering or runtime request claims.
148−
149−A store `main` is recognized only as a direct, unqualified `(store init update)` call with two simple wing arguments, modulo grouping, independently of its directory. Its module must declare exactly one ordinary `state` mold and one ordinary, nongeneric local `+$ poke` action mold. Both remain in ordinary mold/value inference and are exported. `+store-main-closed` checks the canonical closed store main, exact init/state equality, and an invariant `$-([action state] state)` update after erasing only the two outer binder faces. It deliberately performs no gate-free-state check. The direct form can recover a missing main from checked components; aliases and hand-built records cannot.
150−
151−The store interface adds a derived `$-([action $-((unit @t) M)] (cmd M))` poke helper and a generic `$-($-(state M) (ask M))` state request after validating the exact internal `raw-poke`, canonical `cmd`, standard `unit` and `ask` representations. Derived names must not collide with values, imports or other derived names. Once the store's `state` and `poke` molds are unique and nongeneric and `main`'s `store` is the prelude's builder, such a collision is a definite error, reported before other scope conflicts, showing the mold the name derives from and the clashing definition or import face. Store request certificates are distinct from API certificates and retain the exact store path, source, state and action identities across graph merges. `+derived-store-request-member` requires the selected interface's unique state member and action constructor to match freshly derived canonical schemes and the same certificate to occur in both interface and consumer graphs. Store state is watchable by definition only after those checks; page loads continue to accept API evidence alone. Multi-action declarations, lowering and execution are outside this slice.
152−
153−When only that program's initializer and `main` are unresolved, one transactional retry checks the initializer, which must be a direct gate with a closed, tag-free written sample, against the program's closed model. Update's written two-item sample gives the model when it can be read. Otherwise main's own source-backed program fit gives it: update, view and subs are instantiated above the greatest variable ID in the module and prelude and fitted together against the prelude `program` sample, with the initializer an open variable. Only the initializer's data may stay open, a replay of the fit must not change the substitution, and the model must come out closed and tag-free. So an update written `|= =input`, `|= in=input` or generic in its model, and a view and subs with generic samples, still let the initializer check. The body is inferred with the model as context; a body that context inference cannot take, such as a branch over a nested call's union, is inferred ordinarily as a whole gate instead, and its sample must fit the written one. The product and whole-gate fits, pending-tag and finalization checks, and a fresh ordinary `main` inference must all succeed before the ordinary kind and graph checks publish anything. This one path replaced a separate retry for bodies ending in null and a gate that took only a null sample (review question 8), so any body and any closed sample of a direct gate check the same way. The fresh `main` inference is what checks that the four components agree: an initializer that fits update's model while view uses another message passes recovery, and `main` then rejects the program. Aliased mains or initializers, non-main libraries, simultaneously unresolved subscriptions and unrelated pending tags decline.
154−
155−Ordinary inference runs for every component before recovery, so a keyed view no longer causes an already-valid initializer to be skipped. Recovery is a fallback for unresolved components, not a replacement for definitions that check normally. The regression's initializer is a gate under a `^-` cast to its full type. Ordinary inference checks it, but recovery, which takes only a direct gate, cannot, so the fixture fails if a keyed view ever skips ordinary inference again.
156−
157−A component-local recovery sequence handles a recognized direct program whose context-dependent definitions cannot resolve ordinarily. Update first derives its result from its inferred two-slot sample and canonical `cmd`/`list` templates. Subscription recovery then checks the same message/model relation and the canonical fourth slot. A narrow keyed-view proof finds exactly one direct `each (turn xs mapper)` site, derives the mapper from the actual `each` and `turn` schemes, and recovers the view before the existing initializer and ordinary `main` retries. Every recovered scheme must be closed and freshly allocated above the current environment and prelude IDs. That bound comes from one unbudgeted pass over the environment and prelude schemes, which treats named recursive types as leaves and declines only when a scheme still holds an unresolved literal tag. Non-gate views and aliases decline without crashing. Final publication still requires all module definitions, the program-mold and gate-free checks, and request-value watchability.
158−
159−Canonical `element` composition has two tightly scoped accommodations. Recursive result context is allowed only when every recursive side has the prepared prelude's `element` origin. When ordinary list-item fitting fails, an `element` target may instead prove its message argument invariantly or select one exact literal case with a full payload fit; a successful ordinary fit always takes precedence. This covers the unchanged todo's union controls and raw constructors without opening those paths to other unions. The `tests/lib/jibb-todo-full.hoon` suite checks the byte-identical island through both full APIs, the exact closed `main` type, structural downstream import, and model/message/mapper/watch rejection controls. It does not execute Jibb or implement runtime watching.
160
118
161Each case's canonical API identity and source-derived schema travel across imports in a nonrecursive graph certificate containing the exact source bundle, prelude, reserved scope and trusted reader results. Cached interfaces must match those inputs and cannot hide an active ancestor; unknown legacy entries are rebuilt from their unique supplied source. Request-bearing closures are limited to 256 paths and requests. Closed gate samples can also fit when an unnamed input slot corresponds to a named one, provided products are identical and nested value faces and ambiguous cell tails remain intact. This is type inference only: request lowering, runtime schema validation and value watchability proofs are not implemented.
119Each case's canonical API identity and source-derived schema travel across imports in a nonrecursive graph certificate containing the exact source bundle, prelude, reserved scope and trusted reader results. Cached interfaces must match those inputs and cannot hide an active ancestor; unknown legacy entries are rebuilt from their unique supplied source. Request-bearing closures are limited to 256 paths and requests. Closed gate samples can also fit when an unnamed input slot corresponds to a named one, provided products are identical and nested value faces and ambiguous cell tails remain intact. This is type inference only: request lowering, runtime schema validation and value watchability proofs are not implemented.
162
120
163`+golden-types-with-prelude` accepts case-local Jibb module sources alongside `/sur` and mark results and the vendored prelude source. It resolves reachable ordinary library modules in dependency order, caching completed interfaces per invocation and exporting supported closed value schemes, direct generic unions, and simple or nonrecursive generic mold aliases whose bodies the fragment supports. It detects missing sources and cycles and rejects a dependency if its interface cannot be inferred by the fragment. Qualified wings can also read nested fields of an imported value, instantiating that value’s scheme independently at each use; missing, ambiguous and non-record fields remain unsupported.
121`+golden-types-with-prelude` accepts case-local Jibb module sources alongside `/sur` and mark results and the vendored prelude source. It resolves reachable ordinary library modules in dependency order, caching completed interfaces per invocation and exporting supported closed value schemes, direct generic unions, and simple or nonrecursive generic mold aliases whose bodies the fragment supports. It detects missing sources and cycles and rejects a dependency if its interface cannot be inferred by the fragment. Qualified wings can also read nested fields of an imported value, instantiating that value’s scheme independently at each use; missing, ambiguous and non-record fields remain unsupported.
164
122
165−The supplied prelude is parsed into a **partial interface**: all names actually declared in the source are reserved, while only the molds and values this fragment can infer are available. These include the validated standard `list` mold, `unit`, the doc-exact generic `cmd` union, `same`, `fall`, `need`, `bond`, `lure`, `weld`, `snoc`, `turn`, `lent`, `zing`, `flop`, `rear`, `drop`, `skim`, `skip`, `murn`, `join`, `snip`, `levy`, `lien`, `cork`, `corl`, `cury`, `curr`, `lead`, `late`, `trip` and `tuba`; unsupported entries remain unavailable. The validated `list` is injected while the prelude’s gates are inferred; `weld` and `turn` use ordinary explicit result casts. An absent or altered `list` is not injected, and an altered declaration cannot leak through a direct or transitive mold alias. The same validated template is available when prelude mold aliases are prepared, so supported direct and transitive aliases can use it. A named prelude union keeps the fixed `/lib/jibb/prelude/jibb` origin in every module, and its name remains unqualified when a library exports a type containing it. The prelude inventory is incomplete, so reserving the names in this source does not establish complete shadowing coverage. The source-backed internal prelude defines `poke`, which the public prelude re-exports as an ordinary transparent type. A dedicated trusted internal-prelude preparation path also supplies private comparison, arithmetic and text-conversion schemes for the Jibb-written `gth`, `add`, `dec`, `trip` and `tuba` wrappers. Ordinary module resolution rejects that primitive path even if a caller supplies a spoofed root or bundle. The low-level prepared interface is still trusted host input; the host must select the vendored sources and canonicalize paths. Primitive execution and shape-based jet recognition are not implemented. The Jibb-written `lth`, `gte` and `lte` gates compose the source-backed `gth` and `not` gates; supported calls infer a shared atom constraint and return `?`. Their execution and jet recognition await the backend. The source-backed `add` and `dec` wrappers use private arithmetic interfaces whose shared atom variable excludes loobeans; the partial checker preserves that constraint through supported inference and prints `where A is an atom other than ?`. The partial checker resolves the supported `poke` source shape, preserves its public name, and rejects ordinary imports of the private internal path. The Jibb-written `lent` recursively counts a list using `add`; the partial checker infers its generic list argument and `@ud` result. Its execution and jet recognition remain unverified until the backend exists. The Jibb-written `zing` concatenates homogeneous lists in order using `weld`; the checker infers `(list (list A))` to `(list A)`, including for gate elements. Hoon `zing` also accepts heterogeneous noun lists, which this type does not express. The `test-zing-reference` arm of `tests/lib/jibb-hoon-reference.hoon` compares an equivalent Hoon recursion with Hoon `zing` on selected finite inputs; it does not execute Jibb or verify lowering or jet recognition. The Jibb-written `lead` and `late` are curried pair constructors: `((lead a) b)` returns `[a b]`, while `((late a) b)` returns `[b a]`. The checker infers independent argument types and accepts gates as ordinary values; neither helper invokes an input gate. A Hoon translation is compared with Hoon’s helpers by the same suite's `test-lead-late-reference` arm. This does not execute Jibb or verify lowering or jet recognition. An imported API with one mark and a matching direct `+$ poke` declaration can export a derived constructor and retain agent/mark metadata when the source representation has the supported agent case. Other API shapes, complete private module checking, root API and kind checking, stores, complete `ask` and `pure` checking, lowering and runtime effects remain unfinished. A possible store or root API declaring `+$ poke` reports that kind or scope needs unsupported inference; definite duplicate declarations and unrelated shadowing still report conflicts. Prepared interfaces and caches are trusted caller inputs; the future host and linker must ensure the private source validated during preparation is the same version used to lower derived constructors. A `*` payload may contain gates, so the fragment treats it conservatively; full gate-free checks are unfinished. The shared module-scope fixture compares the prepared and source-taking paths against the real prelude and a two-module golden under eval and on the ship.
123+The supplied prelude is parsed into a **partial interface**: all names actually declared in the source are reserved, while only the molds and values this fragment can infer are available. These include the validated standard `list` mold, `unit`, the doc-exact generic `cmd` union, `same`, `fall`, `need`, `bond`, `lure`, `weld`, `snoc`, `turn`, `flop`, `rear`, `drop`, `skim`, `skip`, `murn`, `join`, `snip`, `levy`, `lien`, `cork`, `corl`, `cury` and `curr`; unsupported entries remain unavailable. The validated `list` is injected while the prelude’s gates are inferred; `weld` and `turn` use ordinary explicit result casts. An absent or altered `list` is not injected, and an altered declaration cannot leak through a direct or transitive mold alias. The same validated template is available when prelude mold aliases are prepared, so supported direct and transitive aliases can use it. A named prelude union keeps the fixed `/lib/jibb/prelude/jibb` origin in every module, and its name remains unqualified when a library exports a type containing it. The prelude inventory is incomplete, so reserving the names in this source does not establish complete shadowing coverage. The source-backed internal prelude defines `poke`, which the public prelude re-exports as an ordinary transparent type. A dedicated trusted internal-prelude preparation path also supplies private comparison and arithmetic schemes for the Jibb-written `gth`, `add` and `dec` wrappers. Ordinary module resolution rejects that primitive path even if a caller supplies a spoofed root or bundle. The low-level prepared interface is still trusted host input; the host must select the vendored sources and canonicalize paths. Primitive execution and shape-based jet recognition are not implemented. The source-backed `add` and `dec` wrappers use private arithmetic interfaces whose shared atom variable excludes loobeans; the partial checker preserves that constraint through supported inference and prints `where A is an atom other than ?`. Length and primitive execution remain unavailable. The partial checker resolves its supported source shape, preserves its public name, and rejects ordinary imports of the private internal path. An imported API with one mark and a matching direct `+$ poke` declaration can export a derived constructor and retain agent/mark metadata when the source representation has the supported agent case. Other API shapes, complete private module checking, root API and kind checking, stores, complete `ask` and `pure` checking, lowering and runtime effects remain unfinished. A possible store or root API declaring `+$ poke` reports that kind or scope needs unsupported inference; definite duplicate declarations and unrelated shadowing still report conflicts. Prepared interfaces and caches are trusted caller inputs; the future host and linker must ensure the private source validated during preparation is the same version used to lower derived constructors. A `*` payload may contain gates, so the fragment treats it conservatively; full gate-free checks are unfinished. The shared module-scope fixture compares the prepared and source-taking paths against the real prelude and a two-module golden under eval and on the ship.
166
124
167`+prepare-prelude` derives the interface and declared-name inventory from the trusted vendored source. Hosts can reuse its result with `+golden-types-with-prepared-prelude`; they must pass the unchanged result of preparation, not an independently constructed value. Empty, malformed and duplicate-name prelude sources fail closed. The source-taking `+prepare-prelude` and `+golden-types-with-prelude` do not supply the internal module; their `-and-internal` or `-with-internal` variants accept its source for the supported private import. API files, modules with `main`, unsupported definitions and many other features remain outside this subset. The older `+golden-types-with-modules` entry point fails closed for imports because it has no prelude scope. None of these partial reports claims the module has been checked.
125`+prepare-prelude` derives the interface and declared-name inventory from the trusted vendored source. Hosts can reuse its result with `+golden-types-with-prepared-prelude`; they must pass the unchanged result of preparation, not an independently constructed value. Empty, malformed and duplicate-name prelude sources fail closed. The source-taking `+prepare-prelude` and `+golden-types-with-prelude` do not supply the internal module; their `-and-internal` or `-with-internal` variants accept its source for the supported private import. API files, modules with `main`, unsupported definitions and many other features remain outside this subset. The older `+golden-types-with-modules` entry point fails closed for imports because it has no prelude scope. None of these partial reports claims the module has been checked.
168
126
169−The prepared interface includes the source-backed UI molds and constructors, the full nonrecursive `element` union, and the exact `program` and `page` records and builders. Its element union erases nested child, keyed-item and table payloads to `*`, while public constructor schemes retain typed composition and independent key parameters. `types-prelude-ui` checks those schemes and selected valid and invalid compositions. A child-message mismatch currently fails closed as an unsupported list-item constraint rather than a definite mismatch diagnostic. Raw-constructor encapsulation, duplicate-attribute checks, rendering, navigation, storage and execution remain outside this slice.
170−
171−The Grammar's buttons example has a shared full-check fixture. Without `add-button`, `labelled` and `wide` export their exact generic `(element A)` and `(list attr)` schemes through detailed and legacy inference. The ordinary call fit handles this by unifying a variable actual argument with the body of an expected faced slot, rather than putting the sample face on the argument's type. With the unchanged `add-button`, final incompleteness triggers a diagnostic-only retry bounded to 64 missing definitions. A pending tag retains its literal span, so the error says that nothing fixes the union of `%add` at the literal and includes its source excerpt. Otherwise, when a missing value is a gate whose own sample has the name of a top-level value, import face or prelude value, the error is that the sample shadows a name, shown at the sample: with `++ user |= x=@t (helper x)` and `++ helper |= user=@t user`, it is `helper`'s sample `user`. Other incomplete modules keep the generic error, which names one missing value: the first whose module dependencies all resolved. When every missing value waits on another, it follows the first value each waits on, from the first missing value, until a value repeats, and names that value. The walk is over the syntactic dependency graph, which ignores binders: a local binder with a top-level value's name, such as a cell-sample item or a nested gate's sample, reads as a dependency on that value. The named value lies on a cycle of that graph but may only call into the value that failed; with `++ helper |= x=@t |= user=@t user` instead, it names `user`, and the shadowing is not reported. Successful modules never run the retry. This checks types only; it does not render or execute buttons.
172−
173−The prepared interface also includes the exact documented `theme` mold. Full checking covers the unchanged real `/ui/theme.jibb`, its exact exported record and a structural downstream import, with dark absent/present and field/type rejection controls. The documented present dark record uses explicit backtick unit syntax, as the Decisions tab records; there is no theme-specific inference exception. This is type checking only: contrast validation, theme rendering and routing remain unimplemented.
174−
175And the design notes:
127And the design notes:
176
128
177| Note | Says |
129| Note | Says |
@@ -187,9 +139,7 @@ The internal prelude defines transparent `(ask M)` cases for pure, agent and sto
187
139
188Public identity aliases of private generic unions retain their public name when the origin, arity and argument order match exactly, including through imported values. Fixed, reordered, repeated and phantom generic aliases remain unsupported where a safe public name cannot be recovered; a fixed nongeneric alias is not printed as though it accepted type arguments.
140Public identity aliases of private generic unions retain their public name when the origin, arity and argument order match exactly, including through imported values. Fixed, reordered, repeated and phantom generic aliases remain unsupported where a safe public name cannot be recovered; a fixed nongeneric alias is not printed as though it accepted type arguments.
189
141
190−The partial checker reserves `proj` and `unface`, one set checked by `+reserved-name`, in module, local, sample, pattern and import bindings, including bindings inside unsupported source; a field, tag or path segment may still have that spelling. With a known expected record type, it checks selected explicit `(proj record)` calls over closed, uniquely faced records, preserving the source expression, its type, the result type and field axes in the checked interface. Imported and private-prelude dependencies retain the source needed to lower those plans. The checker does not yet lower or execute them. It supports selecting one or more fields in their original order; a single selected field keeps its face and uses one source axis. Reordered fields, unknown or open record spines, some nested contexts and recursive groups with projections remain unsupported. A directional fit of a wider faced record fails closed instead of inserting a projection, including within supported list, unit and record positions. To limit repeated work, record-spine proofs are reused along the same closed spine and stop at 1,024 fields; field boundaries and the special handling of positional calls reset the appropriate proof. Prepared interfaces and their source remain trusted host inputs.
142+The partial checker reserves `proj` in module, local, sample, pattern and import bindings, including bindings inside unsupported source; a field, tag or path segment may still have that spelling. With a known expected record type, it checks selected explicit `(proj record)` calls over closed, uniquely faced records, preserving the source expression, its type, the result type and field axes in the checked interface. Imported and private-prelude dependencies retain the source needed to lower those plans. The checker does not yet lower or execute them. It supports selecting one or more fields in their original order; a single selected field keeps its face and uses one source axis. Reordered fields, unknown or open record spines, some nested contexts and recursive groups with projections remain unsupported. A directional fit of a wider faced record fails closed instead of inserting a projection, including within supported list, unit and record positions. To limit repeated work, record-spine proofs are reused along the same closed spine and stop at 1,024 fields; field boundaries and the special handling of positional calls reset the appropriate proof. Prepared interfaces and their source remain trusted host inputs.
191−
192−An explicit `(unface e)` has e's type with every face removed (`+itype-unface`): through cells, a gate's sample and product, collection arguments and the prelude unit's payload, whose own `u=` stays. Other unions and recursive molds go by name or exact cases, so they are kept whole, and an unbound variable stays, keeping any faces it is bound to later. When e's type is still a bare variable the checker reports `unface on a type not yet known is not supported by partial inference`, as it does field access; the deferred transaction declines `unface`. `unface` written as a value, or with other than one argument, is a definite error. A `++` whose body is `(unface |= …)` counts as a gate for self-recursion, recursive groups and the report, with the unfaced type, while direct-call layout evidence, which reads sample faces, leaves it out. Nothing is lowered yet; the core language's row lowers it to its argument.
193
143
194## The tree
144## The tree
195
145
@@ -226,18 +176,4 @@ Note 4 has examples of each.
226
176
227## Speed
177## Speed
228
178
229−Starting `urbit eval` and building the library takes about 27 s, or 24 s without `!:` (`tools/hoon --no-debug`), measured on 2026-11-02. Every timing in this document was measured with `!:`, which the dev tools add so errors have positions, and which makes checker work 2.2 to 2.6 times slower than on a ship; the comparisons hold, but the absolute figures overstate a ship's time. A 2,000-line module of 400 definitions then parses in about a second. Loops over definitions, arms, lines and items are tail calls, so a long module grows no stack; nesting costs a few stack frames a level, and 100,000 nested brackets still parse (note 3).
179+Starting `urbit eval` and building the library takes about 8 s. A 2,000-line module of 400 definitions then parses in about a second. Loops over definitions, arms, lines and items are tail calls, so a long module grows no stack; nesting costs a few stack frames a level, and 100,000 nested brackets still parse (note 3).
230−
231−The experimental deferred constructor path can close a small import-free library transaction when ordinary resolution stalls. It retries definitions whose earlier attempts failed from their original states, retaining only successful attempts. A transaction with at most 64 definitions makes at most 4,096 attempts; it stops after a pass with no progress. This bounds the new attempt count, not each attempt's parsing, type walks or ordinary inference. Deferred definitions are restricted to simple one-component wings, literals, static strings, gates, transparent groups and empty bodies, calls, casts and a restricted boolean branch. Each successful call or cast fit must have exactly equal normalized operands so later substitutions cannot invalidate a face check. A multi-argument call also needs closed argument, sample and product types because positional face checks depend on slot boundaries and whether the result can be a cell. Other fits fail closed. A 512-node screen bounds visited expression nodes and a separate 512-node scan bounds each stability check; neither bounds mold shapes, string-piece checks, parsing, normalization, lookup, or total repeated inference. It accepts only a direct constructor callback with a closed input, records its pending fit under the source-owned inference state, and generalizes each definition against the live environment and pending constraints. Before publication it discharges and replays every edge, rejects unresolved tags or changed replay state, and checks that all molds and values are complete. The reporter reads the committed schemes for definitions added by the transaction. API and store paths, `main`, prepared-prelude recovery, imports, recursive groups, unresolved holes or written capitals, and new projection actions remain outside this full-module path. `%grec` in the constraint scan is conservatively unsupported. This is not an island-kind, runtime, or watchability check.
232−
233−An expected cell type can supply context to both arms of a loobean branch. This slice first retains any ordinary inference that already fits. Otherwise it retries from the original state only when a syntax screen excludes nested branches, casts, gates and local bodies, and a substitution screen excludes structural bindings. Both arms must fit, their normalized results and the expected type must be closed, their result types must match, and both fits must replay without changing the final substitution or fresh-ID counter. A successful retry retains the original arm type and its written faces; a failed retry returns the original inference result. The source and substitution screens each visit at most 512 entries. This permits at most one extra attempt for an eligible branch; the screens do not bound preexisting inference, type walks, list construction, or work across separate analyses.
234−
235−In an isolated diagnostic with the real todo API and reader inputs, this cell context allowed the original update body to infer when its result type was written explicitly and experimental source-defined text helpers were supplied. The unchanged island still needs those text helpers, an actual source-backed `program` and UI interface, context propagation across definitions, island-kind checking and watchability proof. This branch change itself provides no runtime implementation or watchability evidence.
236−
237−A deferred boolean branch must use both distinct literal loobean patterns. Its subject is unified with `?`; the arms are inferred in source order without contextual retry. The shared unification-first result join applies before the pending-literal fallback. When both written arms are direct literals that each created their own unbound pending tag, the checker can instead retain two source-owned fit obligations to a shared, monomorphic result variable. A later definition may close that variable; replay uses the ordinary literal fit, requires a closed atomic target or a union of direct constant/cell cases, and rejects faced targets and faced union cases. It replays all edges under the final substitution without adding bindings or fresh IDs. This does not support deferred list literals, union-pattern reachability, arbitrary branch expressions or prepared-prelude/imported modules. It does not establish request watchability.
238−
239−With the caller's unchanged prepared prelude, the partial report can also recover a narrow import-free, non-main ordinary library initializer. A direct tuple literal may retain one source-owned fit obligation for each newly created pending literal until a later exact result cast closes them. A separate bounded candidate screen admits a direct tuple even without a constructor call. The prepared transaction requires exact agreement among the supplied interface, value inventory and reserved molds, and retains the API, store, import and `main` exclusions. It only adds recovered entries to the partial report: the ordinary full-module resolver does not publish them. Wrong unit or draft fields, unrelated pending tags and mold-name collisions fail closed; without the later final cast, the initializer remains not checked. This does not add list-literal deferral or import-aware recovery.
240−
241−Before the no-prepared-prelude fallback, the checker screens the already parsed source for a direct single-constructor call beneath groups, gates, casts or bodies without local definitions. The screen visits at most 64 AST nodes per definition and rejects sources with more than 64 definitions or 65,536 bytes. A transaction is attempted at most once per resolver or report invocation and holds at most 64 pending edges. These limits do not bound the initial parsing, ordinary resolution, normalization, or total work across separate analyses. On the pre-recursive-index snapshot, startup-inclusive synthetic 1,000-gate comparisons had baseline/candidate user times of 25.97/29.30 seconds and 26.30/27.46 seconds in reverse order. These are limited shared-load measurements, not production benchmarks. The trimmed source-backed and direct-guard fixture passed in 28.13 seconds wall and 27.53 seconds user on one run after screening; its cases include parse-success checks in the same transaction source pass. The outer resolver and reporter each parse independently, and a fallback currently parses the source again.
242−
243−A single sequential, startup-inclusive comparison against checkpoint `c96597d` measured user CPU for an unrelated stalled library at 25.04 seconds baseline and 26.32 seconds with the screened fallback; an incompatible constructor took 25.72 and 27.16 seconds; a direct constructor that the baseline declined and the candidate resolved took 24.46 and 26.79 seconds. These are small shared-load measurements, not a production benchmark. The screen was separately checked with a trapping fallback: the unrelated source skipped it, while the eligible conflicting source reached it.
docs/development.md+80−108
@@ -6,31 +6,19 @@ How to work on Jibb: the rules the plan sets, how to set up a machine, and what
6
6
7From the plan's Setup and ground rules, and from @iko:
7From the plan's Setup and ground rules, and from @iko:
8
8
9−- **The spec wins.** Where code and spec disagree, the spec stands until it changes. Until the Claude doc is synced with the repository's decisions, the spec is the copy in [spec/](spec/); the Synced column in [spec/decisions.md](spec/decisions.md) shows which rows the doc has.
9+- **The doc wins.** Where code and doc disagree, the doc stands until it changes. [spec/](spec/) is a snapshot; the doc itself is the authority.
10- **Language changes are agreed first** and recorded in the Decisions tab, before the code changes.
10- **Language changes are agreed first** and recorded in the Decisions tab, before the code changes.
11- **Questions go to @iko**, as comments on the doc, on the words they're about. While one is open, follow the most likely reading, mark it "(doc question)" in the library's notes, and list it in [open-questions.md](open-questions.md). Where an error points is not a doc question: the library's section 2.0 settles it.
11- **Questions go to @iko**, as comments on the doc, on the words they're about. While one is open, follow the most likely reading, mark it "(doc question)" in the library's notes, and list it in [open-questions.md](open-questions.md). Where an error points is not a doc question: the library's section 2.0 settles it.
12- **Every Jibb code block in the doc is a golden test**, and each stage's output is printed and compared. The doc labels its Jibb blocks `jibb`; `tools/doc-blocks` checks that each has its case.
12- **Every Jibb code block in the doc is a golden test**, and each stage's output is printed and compared. The doc labels its Jibb blocks `jibb`; `tools/doc-blocks` checks that each has its case.
13- **Each milestone ends with its checks passing on a fake ship**, not only under `urbit eval`.
13- **Each milestone ends with its checks passing on a fake ship**, not only under `urbit eval`.
14- **Push straight to `master`.** @iko reviews work in the project's chat, not in pull requests, so there are none. Run the checks below first.
14- **Push straight to `master`.** @iko reviews work in the project's chat, not in pull requests, so there are none. Run the checks below first.
15−- **Keep docs/ current**: [status.md](status.md) when a milestone moves, [open-questions.md](open-questions.md) when a question is found, and [spec/decisions.md](spec/decisions.md) when one is settled: it moves there.
15+- **Keep docs/ current**: [status.md](status.md) when a milestone moves, [open-questions.md](open-questions.md) when a question is settled or found.
16−
17−The source-backed generic-union guard is the suite `tests/lib/jibb-union-source.hoon`: `tools/test-arms jibb-union-source` runs its `test-union-source` arm under eval, and the same arm is assembled for the fake ship. It checks a bounded partial inference slice, not general union completeness. `tests/lib/jibb-union-alias-overlap.hoon` exercises the separate positive overlap witness, with one test arm shared by eval and the ship. `tests/lib/jibb-full-overlap-basic.hoon` and `tests/lib/jibb-full-overlap-graph.hoon` check structured full-module overlap evidence and the legacy error text; `tools/test-arms 'jibb-full-overlap-*'` runs both of their test arms under eval, and both are assembled for the fake ship.
18
16
19## Setting up a machine
17## Setting up a machine
20
18
21The tools need Python 3 and `urbit` (vere) on `PATH`; the ship tools also need a fake `~zod` and click. Everything so far ran with vere 4.6 on Linux.
19The tools need Python 3 and `urbit` (vere) on `PATH`; the ship tools also need a fake `~zod` and click. Everything so far ran with vere 4.6 on Linux.
22
20
23−With Nix (and flakes), `nix develop` gives a shell with vere 4.6, Python 3 and click, as the flake pins them, and sets `$JIBB_CLICK`. `nix build .#fakezod` boots a fake `~zod` from the pinned brass pill in about half a minute; copy it to where `tools/ship` expects it:
24−
25−```
26−mkdir -p /root/urbit
27−cp -r "$(nix build .#fakezod --no-link --print-out-paths)" /root/urbit/zod
28−chmod -R u+w /root/urbit/zod
29−```
30−
31−`nix flake check` needs neither step, since it boots a ship of its own; see the [README](../README.md#building-and-checking-with-nix).
32−
33−Without Nix, on a usual machine:
21+On a usual machine:
34
22
351. Install vere as [docs.urbit.org](https://docs.urbit.org) says, and get a brass pill.
231. Install vere as [docs.urbit.org](https://docs.urbit.org) says, and get a brass pill.
362. Boot a fake ship where `tools/ship` expects it, or point `--pier` or `$JIBB_PIER` elsewhere. Booting takes a few minutes:
242. Boot a fake ship where `tools/ship` expects it, or point `--pier` or `$JIBB_PIER` elsewhere. Booting takes a few minutes:
@@ -41,7 +29,7 @@ Without Nix, on a usual machine:
413. Get click, the command-line client for a ship's `conn.sock`, from [urbit/tools](https://github.com/urbit/tools), at `/root/src/tools/pkg/click/click` or wherever `--click` or `$JIBB_CLICK` says.
293. Get click, the command-line client for a ship's `conn.sock`, from [urbit/tools](https://github.com/urbit/tools), at `/root/src/tools/pkg/click/click` or wherever `--click` or `$JIBB_CLICK` says.
424. Optionally, clone [urbit/urbit](https://github.com/urbit/urbit) to read Arvo's source. `vendor/SOURCES.txt` names the commit the vendored files come from.
304. Optionally, clone [urbit/urbit](https://github.com/urbit/urbit) to read Arvo's source. `vendor/SOURCES.txt` names the commit the vendored files come from.
43
31
44−In a Claude cloud container, the network blocks urbit.org, bootstrap.urbit.org, nixos.org's installer and GitHub's release downloads. When Nix is already installed, as it was on 2026-11-02, the flake does all of the below: it fetches nixpkgs from channels.nixos.org, click with git and the pill from media.githubusercontent.com, which the network allows. Otherwise, this worked on 2026-10-29, and has to be redone in each new container:
32+In a Claude cloud container, the network blocks urbit.org, bootstrap.urbit.org, nixos.org's installer and GitHub's release downloads. This worked on 2026-10-29, and has to be redone in each new container:
45
33
46```
34```
47# Nix, single-user
35# Nix, single-user
@@ -70,121 +58,105 @@ git clone https://github.com/urbit/tools /root/src/tools
70
58
71| Tool | What it does |
59| Tool | What it does |
72| --- | --- |
60| --- | --- |
73−| `tools/check` | Runs every check in this table, or a group (`--group eval` or `ship`), or some by name: see [Before pushing](#before-pushing) |
74| `tools/golden` | Runs the golden cases under `urbit eval`: every case, or those matching `--case`; `--update` rewrites the expected outputs; `--show` prints them |
61| `tools/golden` | Runs the golden cases under `urbit eval`: every case, or those matching `--case`; `--update` rewrites the expected outputs; `--show` prints them |
75−| `tools/test-arms` | Runs the `test-` arms of the `tests/lib` suites under `urbit eval`, each with the subject Ford would give it on the `jibb-dev` desk: every suite, or those named or matched by a glob, as `tools/test-arms jibb-store 'jibb-program-*'`; `--shard I/N` runs the I-th of N balanced shards; `--list` prints the suites and their arms; `--report` and `--update` print or rewrite a golden-report suite's report. See [The test suites](#the-test-suites) |
62+| `tools/importer-test` | Compares the partial Hoon importer's diagnostic trees and errors with `tests/importer/tree.txt` under `urbit eval` |
63+| `tools/type-import-default-test` | Compares default-wrapped union source proofs and adversarial cases under eval; the same golden runs on the ship |
64+| `tools/type-import-test` | Composes the Hoon importer with the partial checker and compares `tests/type-import/expected.txt` under eval |
65+| `tools/type-tlon-test` | Runs the real Tlon presence source through the importer and partial checker, comparing `tests/type-tlon/expected.txt` under eval |
66+| `tools/type-import-diagnostic-test` | Compares the structured reader diagnostic bridge report under eval |
67+| `tools/type-mark-test` | Checks the partial checker’s mark import boundary against `tests/type-mark/expected.txt` under eval |
68+| `tools/type-poke-test` | Checks source-backed prelude and poke-only API reports against `tests/type-poke/expected.txt` under eval |
69+| `tools/type-api-paths-test` | Checks partial API path analysis with real todo mark samples against `tests/type-api-paths/expected.txt` under eval |
70+| `tools/type-api-evidence-test` | Runs source, scope, reader-result and declaration-watchability evidence guards under eval and on the ship |
71+| `tools/type-hole-guards-test` | Runs the shared hole-defaulting and API interface guards under eval; the same checks run on the ship |
72+| `tools/type-list-alias-test` | Runs the shared prelude list-alias and provenance guards under eval and on the ship |
73+| `tools/type-generic-alias-test` | Runs public/private generic union alias and provenance guards under eval and on the ship |
74+| `tools/type-positional-face-guards-test` | Runs positional-call and nested-face guards under eval and on the ship |
75+| `tools/type-qath-guards-test` | Runs source-provenance, recursive unfolding and face guards under eval and on the ship |
76+| `tools/type-todo-api-test` | Exercises the actual todo API through the real Hoon readers and partial checker |
77+| `tools/type-direct-gate-test` | Checks a synthetic source-backed program report and direct gate provenance under eval and on the ship |
78+| `tools/type-closed-gate-guards-test` | Checks closed gate sample labels and face uncertainty under eval and on the ship |
79+| `tools/type-constructor-fit-guards-test` | Checks constructor-case uncertainty and known mismatches under eval and on the ship |
80+| `tools/type-nested-union-guards-test` | Checks nested tagged-union case selection and uncertainty under eval and on the ship |
81+| `tools/type-gate-free-guards-test` | Checks bounded gate-free verdicts, inhabitation and witness paths under eval and on the ship |
82+| `tools/type-gate-free-source-test` | Checks source-backed todo mold analysis through the real readers under eval and on the ship |
83+| `tools/type-sub-guards-test` | Checks source-backed subscription mold dependencies under eval and on the ship |
84+| `tools/type-ask-guards-test` | Runs ask origin and canonical list/unit bootstrap guards under eval and on the ship |
85+| `tools/type-request-guards-test` | Runs request evidence, source consistency and cache provenance guards under eval and on the ship |
86+| `tools/type-proj-guards-test` | Runs projection evidence, name-scope and dependency guards under eval and on the ship |
87+| `tools/type-arithmetic-guards-test` | Runs restricted atom-variable, unification and projection guards under eval and on the ship |
88+| `tools/type-module-scope-test` | Checks the partial module checker’s prelude boundary and duplicate-source rejection against `tests/type-module-scope/expected.txt` under eval |
76−| `tools/clay-fixtures` | Syncs `my-app` and `jibb-fixtures`, builds their example `/sur` files and marks through Clay, checks selected mold and mark projections and the partial checker, and records Ford and mark subject shapes on the fake ship |
89+| `tools/clay-fixtures` | Syncs `my-app`, builds its example `/sur` files and marks through Clay, checks selected mold and mark projections and the partial checker, and records Ford and mark subject shapes on the fake ship |
77−| `tools/hoon` | Evaluates Hoon with the library in scope, as `tools/hoon '(golden /a/b/jibb (crip "++ main view"))'`; `--cord name=file` binds a file's text, `-f` reads the expression from a file; `--no-debug` leaves out `!:`, which gives errors their positions but makes the checker 2.2 to 2.6 times slower than on a ship, for timings |
90+| `tools/hoon` | Evaluates Hoon with the library in scope, as `tools/hoon '(golden /a/b/jibb (crip "++ main view"))'`; `--cord name=file` binds a file's text, `-f` reads the expression from a file |
78| `tools/doc-blocks` | Checks the doc's `jibb` blocks against the `doc-*` golden cases: `tools/doc-blocks docs/spec` |
91| `tools/doc-blocks` | Checks the doc's `jibb` blocks against the `doc-*` golden cases: `tools/doc-blocks docs/spec` |
79−| `tools/ship` | Runs the fake ship: `start`, `stop`, `status`, `log`, `sync <desk>`, `assemble --out <dir>` (no ship needed), `test`, `gen-tests`, `check-commit`, `scry`, `hoon`, `run`, `poke`, `commit`, `mount`, `unmount` |
92+| `tools/ship` | Runs the fake ship: `start`, `stop`, `status`, `log`, `sync <desk>`, `test`, `gen-tests`, `check-commit`, `scry`, `hoon`, `run`, `poke`, `commit`, `mount`, `unmount` |
80−| `tools/testdata/selftest` | Tests `tools/golden` and `tools/hoon` against a stub library, `tools/test-arms` against the stub library with suites it writes, and `tools/doc-blocks` against Markdown it writes |
93+| `tools/testdata/selftest` | Tests `tools/golden` and `tools/hoon` against a stub library, and `tools/doc-blocks` against Markdown it writes |
81| `tools/testdata/ship-selftest` | Tests `tools/ship`'s test generator and runner against a stub library on the ship |
94| `tools/testdata/ship-selftest` | Tests `tools/ship`'s test generator and runner against a stub library on the ship |
95+| `tools/testdata/clay-fixtures-selftest` | Tests temporary Clay fixture cleanup and signal handling without a ship |
82
96
83−`tools/golden` starts `urbit eval` once and builds the library, which takes about 27 s, then runs every case under `mule`, so a crash fails only its own case.
97+`tools/golden` starts `urbit eval` once and builds the library, which takes about 8 s, then runs every case under `mule`, so a crash fails only its own case.
84−
85−## The test suites
86−
87−Each file in `tests/lib` is a suite: a core of `test-` arms, with the libraries and files it reads bound by `/+` and `/*`. On the fake ship, `tools/ship test` runs every suite's arms with `-test /=jibb-dev=/tests`; under eval, `tools/test-arms` runs the same arms, so every suite below runs in both places. `tools/test-arms` gives each suite the subject Ford would give it on the `jibb-dev` desk: each `/+` library and each `/*` file, found where `tools/ship assemble` puts them. Before a suite's `|%` it takes only comments, `/+` lines and `/*` lines, and binds only `%txt` and `%jibb` files. The suites it runs share one eval, so the library is built once for all of them, in about 17 s with `!:`, and so is the importer library `jibb-import`, in about 20 s more, when any of them uses it. Each arm runs under `mule` and prints `OK`, `FAILED` or `CRASHED`, as `-test` does; a crashed arm's trace is mapped to lines in the suite and the library, with an excerpt of the innermost spot. When a suite doesn't build, `tools/test-arms` runs the suites again one at a time and reports it as `FAILED <suite> (build)`, with its error placed in the suite file. `tools/test-arms <suite>` runs one suite, and names or globs pick several, as `tools/test-arms jibb-store 'jibb-program-*'`; `tools/test-arms --list` prints the suites and their arms. `tools/check` runs them all in four shards, `arms-1` to `arms-4`, each `tools/test-arms --shard I/4` in an eval of its own, balanced by the measured costs in `COSTS` and `LIB_COSTS` in `tools/test-arms`. `tests/lib/jibb.hoon`, which `tools/ship gen-tests` writes from `tests/golden`, is left out under eval, since `tools/golden` runs those cases.
88−
89−A golden-report suite has a `report` arm and a golden file bound to the face `expected`; its test arm compares the report with that file, and `tools/test-arms --list` marks it `, report`. `tools/test-arms --report <suite>` prints the report, and `tools/test-arms --update <suite>` writes it to the file; with no suite named, `--update` writes every golden-report suite's. When such a suite's arm fails, `tools/test-arms` prints a unified diff between the file and the report. `jibb-buttons` and `jibb-deferred-prepared` have golden files too, but compare them inside helpers over several cases and have no `report` arm. Every golden file, a `/*` `%txt` file bound to a face containing `expected`, must end in exactly one newline (a suite compares `wain`s, which can't show a missing one) and hold no line that starts `BAD ` or ends `: BAD`; `tools/test-arms` checks that before any eval, and `--update` won't write a report that breaks it.
90−
91−`tools/doc-fragments` guards the examples checked in a larger context: the Core language's `update` must match the todo island's definition, and the valid buttons fixture must match the Grammar's buttons block with `add-button` removed. It runs as part of `tools/check` alongside `tools/doc-blocks`.
92−
93−The `jibb-dev` desk holds `my-app`'s `ui/`, `sur/` and `mar/` under `/my-app` (review question 31), so the suites that check `my-app` files bind them there, as `/* sur %txt /my-app/sur/todo/hoon`, and keep no copies. A mark's `/-` line is Ford's, which `ride` can't parse, so the suites that ride a mark drop it with their `+mark-text` arm. Where the table below calls a `my-app` file byte-identical or unchanged, the suite reads that file itself. Files that only the importer's tests need are kept off `my-app` (review question 34): the Clay fixtures' `/sur` with a Ford import, their mark and the real Tlon notes `/sur` are in `tests/clay-fixtures/desk/`, which the `jibb-fixtures` desk adds to `my-app` and the `jibb-dev` desk leaves out, and the golden cases and `tests/type-poke/mark.txt` that use the mark link to `tests/clay-fixtures/desk/mar/label.hoon`.
94−
95−| Suite | What it checks | Golden files |
96−| --- | --- | --- |
97−| `jibb-api-evidence` | Source, scope, reader-result and declaration-watchability evidence guards for path declarations, in two arms, over synthetic and real todo inputs | |
98−| `jibb-api-paths` | Partial API path analysis with real todo mark samples; it does not generate request interfaces | `tests/type-api-paths/expected.txt` |
99−| `jibb-arithmetic-guards` | Restricted atom-variable, unification and projection guards | |
100−| `jibb-ask-guards` | Ask origin and canonical list/unit bootstrap guards | |
101−| `jibb-bridge` | The importer/checker bridge: the Hoon importer composed with the partial checker | `tests/type-import/expected.txt` |
102−| `jibb-buttons` | The documented valid button helpers and the unchanged unresolved-`%add` module, through detailed and legacy inference | `tests/type-buttons/expected.txt` |
103−| `jibb-cell-branch` | Closed-cell branch context, rollback and bounded retry screens | |
104−| `jibb-check-spans` | `+check-spans`, which `+golden` runs on every tree: its own test, `+check-spans-test`, moves the spans of parsed nodes as a parser bug would and checks that it says so | |
105−| `jibb-closed-gate-guards` | Closed gate sample labels and face uncertainty | |
106−| `jibb-constructor-fit-guards` | Constructor-case uncertainty and known mismatches | |
107−| `jibb-deferred` | The bounded source-owned deferred inference transaction | `tests/type-deferred/expected.txt` |
108−| `jibb-deferred-context` | Deferred source order and literal branch contexts | `tests/type-deferred-context/report.txt` |
109−| `jibb-deferred-prepared` | Prepared-prelude tuple initializer recovery, exact partial reports and fail-closed guards | `tests/type-deferred-prepared/expected.txt`, `expected-control.txt` and `expected-tuple-only.txt` |
110−| `jibb-deferred-resolver` | Deferred resolution, report consistency and atomic failure | `tests/type-deferred-resolver/expected.txt` |
111−| `jibb-direct-gate-guards` | Direct gate provenance: direct layout evidence keeps its provenance and final face constraints | |
112−| `jibb-direct-gate-source` | A synthetic source-backed program report: direct-source gate layouts through a synthetic program scaffold | `tests/type-direct-gate/expected.txt` |
113−| `jibb-doc-examples` | Full checking of the import-only, view-day, step and cmd/sub doc fragments in their intended contexts, through detailed and legacy inference | |
114−| `jibb-empty` | Source-backed empty molds, inhabitedness, coverage and proof budgets | `tests/type-empty/expected.txt` |
115−| `jibb-full-overlap-basic` | Structured full-module overlap evidence: source-bound overlap witnesses, generic parameter limits, precedence and rejection controls, and the legacy full-module error text | `tests/type-full-overlap/expected-basic.txt` |
116−| `jibb-full-overlap-graph` | Imported-source attribution of overlap evidence across parent and child modules: cache rebuilds and source binding, and private, cyclic, duplicate, missing and transitive imports | `tests/type-full-overlap/expected-graph.txt` |
117−| `jibb-gate-free-guards` | Bounded gate-free verdicts, persistent constraints, substitution safeguards, collection keys and witness paths | |
118−| `jibb-gate-free-source` | Source-backed todo mold analysis through the real readers | `tests/type-gate-free/expected.txt` |
119−| `jibb-generic-alias` | Public/private generic union alias and provenance guards | |
120−| `jibb-generic-construction` | Source-backed one-layer recursive construction, provenance and fuel | `tests/type-generic-construction/expected.txt` |
121−| `jibb-generic-pattern` | Source-backed recursive patterns, catch-all coverage, state and per-attempt fuel/arm limits | `tests/type-generic-pattern/expected.txt` |
122−| `jibb-generic-recursion` | Source-backed generic recursive identity and provenance | `tests/type-generic-recursion/expected.txt` |
123−| `jibb-hole-guards` | Hole-defaulting and API interface guards | |
124−| `jibb-hoon-reference` | Hoon translations of the Jibb-written `zing`, `lead`, `late` and `succ` against Hoon's own arms, on selected inputs; this does not execute Jibb, test lowering or prove jet recognition | |
125−| `jibb-import` | The partial Hoon importer's diagnostic trees and errors over the importer fixtures, and the structured values behind them; the projection is an internal tree, not the Jibb type printer | `tests/importer/tree.txt` |
126−| `jibb-import-default` | Default-wrapped union source proofs over a real Tlon mold, and adversarial cases | `tests/type-import-default/expected.txt` |
127−| `jibb-import-diagnostic` | The structured reader diagnostic bridge report: definite and unsupported reader diagnostics through the checker | `tests/type-import-diagnostic/expected.txt` |
128−| `jibb-import-overlap` | Source-aware Hoon union overlap, provenance and proof-budget controls | `tests/type-import-overlap/expected.txt` |
129−| `jibb-import-structural` | Multi-case and nested Hoon union overlap witnesses | `tests/type-import-structural/expected.txt` |
130−| `jibb-list-alias-guards` | Prelude list-alias and provenance guards | `tests/type-list-alias/expected.txt` |
131−| `jibb-mark-bridge` | The partial checker's mark import boundary | `tests/type-mark/expected.txt` |
132−| `jibb-module-scope` | The partial module checker's prelude boundary and duplicate-source rejection | `tests/type-module-scope/expected.txt`, and the golden case's `tests/golden/types-prelude-interface/types.txt` |
133−| `jibb-nested-union-guards` | Nested tagged-union case selection and uncertainty | |
134−| `jibb-page-main` | Full checking of byte-identical static and direct data pages through real readers, exact main types, downstream imports and rejection guards | |
135−| `jibb-poke-bridge` | Source-backed prelude and poke-only API reports | `tests/type-poke/expected.txt` |
136−| `jibb-positional-face-guards` | Positional-call and nested-face guards | |
137−| `jibb-program-init` | Transactional direct-program initializer recovery, exact exported/imported types and fail-closed boundaries | |
138−| `jibb-program-main` | The narrow closed subscription-free program-main interface, downstream import and rejection guards | |
139−| `jibb-program-update` | Transactional direct-program update result recovery, union/boolean context, exact exported/imported types and fail-closed boundaries | |
140−| `jibb-program-watch` | Direct singleton request-value watchability against merged real-todo evidence, exact types/imports and rejection boundaries | |
141−| `jibb-proj-guards` | Projection evidence, name-scope and dependency guards | |
142−| `jibb-qath-fuel` | Recursive qath unfolding and face guards: unfolding uses bounded fuel and keeps uncertain faces | |
143−| `jibb-qath-source` | Qath source-provenance guards: source-backed qath accepts only the proven public and internal interfaces | |
144−| `jibb-request-guards` | Request evidence, source consistency and cache provenance guards | |
145−| `jibb-store` | The unchanged cart/basket through detailed and legacy inference, exact store/derived schemes, malformed-prelude guards, structural imports, source-bound state watch evidence and rejection guards | |
146−| `jibb-sub-guards` | Source-backed subscription mold dependencies | |
147−| `jibb-theme` | Full checking of the byte-identical real theme, its exact exported type, structural downstream import, dark absent/present forms and rejection guards | |
148−| `jibb-tlon-bridge` | The real, unmodified Tlon presence source through the importer and partial checker | `tests/type-tlon/expected.txt` |
149−| `jibb-todo-api` | The actual todo API through the real Hoon readers and partial checker | `tests/type-todo-api/expected.txt` and `negative-expected.txt` |
150−| `jibb-todo-full` | Full checking of the byte-identical todo island and an ordinary call-bodied annotated-initializer variant through real readers, exact main types, structural downstream import and rejection controls | `tests/type-todo-full/expected.txt` |
151−| `jibb-todo-partial` | Partial inference reports for the unchanged todo island through the real API and readers | `tests/type-todo-partial/expected.txt` |
152−| `jibb-typecheck` | The partial inference unifier, through the library's own `+itype-unify-test` cases | `tests/checker/unification.txt` |
153−| `jibb-union-alias-overlap` | Source-backed generic-alias overlap witnesses | `tests/type-union-alias-overlap/expected.txt` |
154−| `jibb-union-source` | Bounded local generic-alias disjointness and state guards | `tests/type-union-source/expected.txt` |
155−
156−`jibb-deferred` exercises the bounded, source-owned constructor transaction and low-level freshness/replay guards. `jibb-deferred-resolver` checks the experimental import-free library resolver, report consistency, atomic failure, and that both source orders of a late face constraint decline. `jibb-deferred-prepared` checks the separate partial-report-only prepared-prelude route, direct tuple-literal obligations, exact report types and its wrong-field, unrelated-tag, mold-collision and no-final-cast controls. These suites do not establish island-kind or watchability support.
157
98
158## Before pushing
99## Before pushing
159
100
160```
101```
161−tools/check # every check; it exits 0 only when all pass
102+tools/golden # all cases pass
162−tools/check --group eval # only the checks that need no ship
103+tools/importer-test # Hoon importer fixture projections match
163−nix flake check # the same checks in the Nix sandbox, on a fresh fake ~zod
104+tools/type-import-default-test # default-wrapped source proofs match
105+tools/type-import-test # importer/checker bridge golden report matches
106+tools/type-tlon-test # real Tlon importer/checker report matches
107+tools/type-import-diagnostic-test # direct structured reader diagnostics match
108+tools/type-mark-test # mark/checker bridge golden report matches
109+tools/type-poke-test # source-backed poke/API bridge report matches
110+tools/type-api-paths-test # partial API path analysis report matches
111+tools/type-api-evidence-test # API declaration evidence guards pass
112+tools/type-hole-guards-test # hole defaulting and API guards pass
113+tools/type-list-alias-test # prelude list-alias guards pass
114+tools/type-generic-alias-test # generic union alias guards pass
115+tools/type-positional-face-guards-test # positional sample face guards pass
116+tools/type-qath-guards-test # qath source and unfolding guards pass
117+tools/type-todo-api-test # real todo API partial inference and reader guards pass
118+tools/type-direct-gate-test # direct gate source and provenance guards pass
119+tools/type-closed-gate-guards-test # closed gate fit guards pass
120+tools/type-constructor-fit-guards-test # constructor fit guards pass
121+tools/type-nested-union-guards-test # nested union selector guards pass
122+tools/type-gate-free-guards-test # bounded gate-free classifier guards pass
123+tools/type-gate-free-source-test # real todo mold analysis and source guards pass
124+tools/type-sub-guards-test # subscription source guards pass
125+tools/type-ask-guards-test # ask source and bootstrap guards pass
126+tools/type-request-guards-test # request evidence and cache guards pass
127+tools/type-proj-guards-test # projection evidence and scope guards pass
128+tools/type-arithmetic-guards-test # arithmetic constraint guards pass
129+tools/type-module-scope-test # module/prelude scope golden report matches
130+tools/hoon check-spans-test # prints <<>>
131+tools/hoon itype-unify-test # type-unification controls pass
132+tools/testdata/selftest # 22 checks, 0 failed
133+tools/doc-blocks docs/spec # every jibb block has its case
134+tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
135+tools/ship test # the cases pass as -test arms on the ship
136+tools/testdata/ship-selftest # when tools/ship changed
137+tools/testdata/clay-fixtures-selftest # scratch fixture cleanup without a ship
138+tools/ship check-commit # when the mark or the desks changed
139+tools/clay-fixtures # builds example fixtures and real Tlon notes through Clay
164```
140```
165
141
166−`tools/check` runs every check the repo has. Their one list is `CHECKS` in the script, so a new check goes there, as well as in the table above; `tools/check --list` prints it with each check's command. A new suite in `tests/lib` needs no new check: `arms-1` to `arms-4` run every suite's arms, in shards of about equal time, and a slow suite's cost belongs in `COSTS` in `tools/test-arms`, which balances them. The eval group, the 7 checks that need only `urbit` and Python, runs several at a time (`-j`, by default one per CPU), the slowest first. The ship group, `ship-selftest`, `ship-test`, `check-commit` and `clay-fixtures`, then runs one check at a time on the ship `tools/ship` talks to; `tools/check` starts it if it isn't running and stops it again afterwards. Name checks, or globs, to run only those: `tools/check golden 'arms-*'`. To run one suite under eval, use `tools/test-arms <suite>`, as `tools/test-arms jibb-todo-full`. A failing check's output follows its FAIL line; `-v` prints every check's output, and `--logs DIR` keeps it all.
167−
168−There is no CI, so nothing runs these checks for you: run `tools/check` or `nix flake check` before every push. `nix flake check` needs nothing but Nix, since it builds the desks and runs both groups in the Nix sandbox, the ship group (Linux only) on a fake ~zod it boots itself; see the [README](../README.md#building-and-checking-with-nix).
169−
170−`ship-selftest` matters most when `tools/ship` changed, and `check-commit` when the mark or the desks changed, but `tools/check` runs both every time. The self-test leaves fixture files on the `jibb-dev` desk, and `ship-test`, which runs after it, puts the real ones back.
171−
172−`tools/ship test` regenerates `tests/lib/jibb.hoon` and syncs the `jibb-dev` desk before it runs. The file is ignored by git, since desk assembly always regenerates it. Sync preflights and splits large deletion lists into bounded click requests, waiting for each Clay revision; a failure stops later batches. The ship self-test exercises this when switching from the full desk to a smaller fixture desk. A run with `--stub`, `--lib`, or a custom `--golden` isolates its generated golden tests from the repository's other test programs; run the default command afterward to restore and test those programs. `tools/ship test` also runs every other suite in `tests/lib`, and `tools/test-arms` runs the same suites under eval, so each compares the same fixtures and golden files in both places. `tests/lib/jibb-import.hoon` runs the importer fixtures against their expected diagnostic projection, an internal tree, not the Jibb type printer, and checks the structured values behind it. The probes it runs live in the suite, not in `jibb-dev/lib/jibb-import.hoon`, which app desks vendor. `tests/lib/jibb-bridge.hoon` runs the importer/checker bridge fixture, and `tests/lib/jibb-tlon-bridge.hoon` the real Tlon presence reader/checker fixture. `tests/lib/jibb-import-diagnostic.hoon` covers the structured reader diagnostics, and `tests/lib/jibb-mark-bridge.hoon` compares the mark bridge's fixture report. `tests/lib/jibb-poke-bridge.hoon` holds the source-backed prelude and poke-only API fixture. `tests/lib/jibb-api-paths.hoon` runs partial path analysis over the real todo marks; this does not generate request interfaces. `tests/lib/jibb-module-scope.hoon` compares the prelude scope report.
142+`tools/ship test` regenerates `tests/lib/jibb.hoon` and syncs the `jibb-dev` desk before it runs, so commit the regenerated file. Sync preflights and splits large deletion lists into bounded click requests, waiting for each Clay revision; a failure stops later batches. The ship self-test exercises this when switching from the full desk to a smaller fixture desk. A run with `--stub`, `--lib`, or a custom `--golden` isolates its generated golden tests from the repository's other test programs; run the default command afterward to restore and test those programs. It also runs the independent `tests/lib/jibb-import.hoon` test against the same importer fixtures and expected diagnostic projection as `tools/importer-test`. The projection is an internal tree, not the Jibb type printer. `tests/lib/jibb-bridge.hoon` also runs the importer/checker bridge fixture on the ship; `tools/type-import-test` runs the same report under eval. `tests/lib/jibb-tlon-bridge.hoon` and `tools/type-tlon-test` run the real Tlon presence reader/checker fixture on both. The structured reader diagnostics have their own `tests/lib/jibb-import-diagnostic.hoon` ship test and `tools/type-import-diagnostic-test` eval test. The mark bridge has its own `tests/lib/jibb-mark-bridge.hoon` ship test and `tools/type-mark-test` eval test; both compare the same fixture report. `tests/lib/jibb-poke-bridge.hoon` and `tools/type-poke-test` share the source-backed prelude and poke-only API fixture. `tests/lib/jibb-api-paths.hoon` and `tools/type-api-paths-test` share partial path analysis over the real todo marks; this does not generate request interfaces. `tests/lib/jibb-module-scope.hoon` and `tools/type-module-scope-test` compare the prelude scope report on the ship and under eval.
173
143
174## Golden cases
144## Golden cases
175
145
176A case is a folder `tests/golden/<name>/` holding:
146A case is a folder `tests/golden/<name>/` holding:
177
147
178−- `source.jibb`, the input, ending in one newline. A case whose input is a `my-app` file, such as a doc block that `my-app` holds, makes it a symlink to that file; desk assembly leaves the link out, and `tools/ship gen-tests` reads the file from `/my-app`. A file under `modules/` may link to `my-app` the same way;
148+- `source.jibb`, the input, ending in one newline;
179- `about.txt`: a `source:` line with the doc's words or block it comes from, a `tests:` line saying what it exercises, and an `expect:` line, either `parses` or `error at <line>:<col>` and why (one case, `inline-leftout-signed-float-auras`, says `unclear`: see grammar question 13 in [open-questions.md](open-questions.md));
149- `about.txt`: a `source:` line with the doc's words or block it comes from, a `tests:` line saying what it exercises, and an `expect:` line, either `parses` or `error at <line>:<col>` and why (one case, `inline-leftout-signed-float-auras`, says `unclear`: see grammar question 13 in [open-questions.md](open-questions.md));
180- the expected outputs, `tokens.txt` and `tree.txt`, each the output plus one newline.
150- the expected outputs, `tokens.txt` and `tree.txt`, each the output plus one newline.
181- optionally, `path.txt`, the logical `/ui/.../*.jibb` path to pass to the compiler; the source remains `source.jibb`.
151- optionally, `path.txt`, the logical `/ui/.../*.jibb` path to pass to the compiler; the source remains `source.jibb`.
182- optionally, an `expect-types:` line in `about.txt` opts the case into `+golden-types`; `types.txt` holds its output plus one newline and `--update` creates it. A `types.txt` also opts in when the line is absent. This interface is provisional while the checker is under construction.
152- optionally, an `expect-types:` line in `about.txt` opts the case into `+golden-types`; `types.txt` holds its output plus one newline and `--update` creates it. A `types.txt` also opts in when the line is absent. This interface is provisional while the checker is under construction.
183- optionally, `imports.txt` selects Hoon `/sur` molds, one `module mold` pair per line. Each module's source goes in `sur/<module>.txt` and is compiled against zuse by both runners. `marks.txt` selects marks, one name per line, with source in `mar/<name>.txt`; both kinds may be supplied together. The reader results go to the partial checker, and a type output is required. Both runners reconstruct fixture text from `%txt` lines and identify the fixture if its compilation crashes; a crash fails the case without discarding its successful parse output. These fixtures currently handle only sources without Ford imports.
153- optionally, `imports.txt` selects Hoon `/sur` molds, one `module mold` pair per line. Each module's source goes in `sur/<module>.txt` and is compiled against zuse by both runners. `marks.txt` selects marks, one name per line, with source in `mar/<name>.txt`; both kinds may be supplied together. The reader results go to the partial checker, and a type output is required. Both runners reconstruct fixture text from `%txt` lines and identify the fixture if its compilation crashes; a crash fails the case without discarding its successful parse output. These fixtures currently handle only sources without Ford imports.
184−- optionally, `modules.txt` lists logical `/ui/.../*.jibb` paths, one per line. The corresponding sources live below the case's `modules/ui/` directory. Both runners parse each source at its logical path and compare the combined `module-trees.txt`; `--update` writes that output. A case with type output also supplies these sources and the vendored prelude to the partial module checker. The file opts in even when it lists no sources; use a comment such as `# no module fixtures` for an empty bundle. Blank lines and comment lines are ignored. Cases without `modules.txt` keep their existing no-prelude type interface.
154+- optionally, `modules.txt` lists logical `/ui/.../*.jibb` paths, one per line. The corresponding sources live below the case's `modules/ui/` directory. Both runners parse each source at its logical path and compare the combined `module-trees.txt`; `--update` writes that output. A case with type output also supplies these sources and the vendored prelude to the partial module checker. The file opts in even when it lists no sources; use a comment such as `# no module fixtures` for an empty bundle, since zero-byte `%txt` fixtures do not sync reliably on the ship. Blank lines and comment lines are ignored. Cases without `modules.txt` keep their existing no-prelude type interface.
185
155
186The runners prepare the trusted vendored public and internal prelude sources once for their generated test core and share the partial interface. Preparation reserves all names present in the public source and supplies the molds and values the fragment can infer; an unsupported declaration remains reserved but unavailable. The source and checker are incomplete, so the output still says the module has not been checked and does not claim complete shadowing coverage. `+golden-types-with-prelude-and-internal` accepts both sources directly; callers using `+golden-types-with-prepared-prelude` pass the unchanged result of `+prepare-prelude-with-internal`. The older source-only entry points remain available for preludes without imports. Missing or malformed sources fail closed.
156The runners prepare the trusted vendored public and internal prelude sources once for their generated test core and share the partial interface. Preparation reserves all names present in the public source and supplies the molds and values the fragment can infer; an unsupported declaration remains reserved but unavailable. The source and checker are incomplete, so the output still says the module has not been checked and does not claim complete shadowing coverage. `+golden-types-with-prelude-and-internal` accepts both sources directly; callers using `+golden-types-with-prepared-prelude` pass the unchanged result of `+prepare-prelude-with-internal`. The older source-only entry points remain available for preludes without imports. Missing or malformed sources fail closed.
187
157
158+A zero-byte mark fixture currently fails ship synchronization validation after commit. Use a newline-only fixture to test an empty Hoon source on the ship.
159+
188Names say what a case is for:
160Names say what a case is for:
189
161
190| Name | For |
162| Name | For |
docs/open-questions.md+47−22
@@ -1,6 +1,6 @@
1# Open questions
1# Open questions
2
2
3−Questions the doc doesn't settle yet, as of 2026-11-02. Language questions belong to the doc's author, @iko: the plan says they go "as comments on the doc, on the words they're about", and a change to the language is "agreed first and recorded in Decisions". When one is settled, record it there, change the code if needed, and move it from here to [Decisions](spec/decisions.md), which holds the settled ones.
3+Questions the doc doesn't settle yet, as of 2026-10-30. Language questions belong to the doc's author, @iko: the plan says they go "as comments on the doc, on the words they're about", and a change to the language is "agreed first and recorded in Decisions". When one is settled, record it there, change the code if needed, and remove it here.
4
4
5## The plan's open questions
5## The plan's open questions
6
6
@@ -14,32 +14,57 @@ From [spec/implementation-plan.md](spec/implementation-plan.md), Open questions:
14| Are the proposed loop rules adopted, along with no overlays in v1? | Milestone 6 |
14| Are the proposed loop rules adopted, along with no overlays in v1? | Milestone 6 |
15| What do controls look like by default: buttons, toggles and fields, with their focus and disabled states? | Milestone 6 |
15| What do controls look like by default: buttons, toggles and fields, with their focus and disabled states? | Milestone 6 |
16
16
17+On 2026-10-30, @iko adopted gate-free `eq` arguments and map and set keys, treating gates as opaque when distinguishing union cases, and rejecting a non-gate value that depends on itself even through a gate. The checker infers and generalizes the gate-free constraint. @iko also said jetted prelude functions may take gates.
18+
17## Questions milestone 2 raises
19## Questions milestone 2 raises
18
20
19−Found while writing [prompts/milestone-2.md](prompts/milestone-2.md), checking it against the doc's examples, and building the checker. Question 3 remains open, and the field-order detail in question 32. The others are settled and are in [Decisions](spec/decisions.md#settled-milestone-2-questions), which keeps their numbers, so existing references stay valid.
21+Found while writing [prompts/milestone-2.md](prompts/milestone-2.md), checking it against the doc's examples, and building the checker. The numbering is retained so existing references stay valid. Question 3 remains open; the field-order detail in question 32 is being clarified. The other questions are settled.
22+
23+1. **Settled: how the prelude identifies jetted functions.** On 2026-10-30, @iko said the prelude functions have working Jibb implementations, and the compiler recognizes their shapes and uses the Hoon versions so jets can fire.
24+2. **Settled: how the prelude keeps helpers private.** On 2026-10-30, @iko chose a separate internal prelude module imported by the prelude, without exposing the imported helpers.
25+3. **The prelude's inventory.** On 2026-10-30, @iko chose to include all names from the listed Hoon library sections, excluding groups the spec explicitly leaves out. All of 3g is included; its Hoon `tone` is exposed as `tone.hoon`, distinct from the styling type. Hoon 1c `step` is exposed as `step.hoon`, leaving the Grammar example's `step` name available. On 2026-10-30, @iko also approved `%$` as a term literal and pattern, so Jibb can write the `%$` case of Hoon `coin`. For parsing sections 4j and 4l, only the explicitly listed `slav` and `slaw` are included; other parser helpers are left out. Jibb's `not` negates a loobean, and Hoon's bitwise `not` is exposed as `not.bit`. @iko also agreed to specifying the complete exported inventory in the doc, building its types and gates needed by the examples in milestone 2, and doing native implementations in milestone 3. Prelude unions such as spaces, roles and tones need names that other modules cannot shadow. The actual inventory and signatures still need to be specified.
26+4. **Settled: a capital in a local `++`.** On 2026-10-30, @iko said it shares the enclosing `++`'s variable of that name if the enclosing `++` also uses it; otherwise the local `++` introduces and generalizes its own variable. For example, `++ inner |= y=A y` shares `A` with an enclosing gate whose sample is `x=A`, but generalizes its own `A` if the enclosing `++` does not use `A`. A different type uses a different capital. The Grammar and Decisions record this alongside the earlier aura rules.
27+5. **Settled: cells of no items or one.** On 2026-10-30, @iko said a single-item cell is the value and `[]` is an error. The theme's `dark=[tones=[…]]`, a record of one field, must still check.
28+6. **Settled: a change with no items.** On 2026-10-30, @iko said `m()` is an error. The parser still accepts it; the checker needs to reject it and add a golden case.
29+7. **Settled: the doc's blocks that aren't whole modules.** On 2026-10-30, @iko agreed to check each in its intended context: the `cmd` and `sub` definitions as prelude source, the Core language tab's `update` inside the todo island, and the Grammar's imports example against fixture files.
30+8. **Settled: tuples and records.** On 2026-10-30, @iko agreed that an unnamed position can unify with a faced position and take its face; two different explicit faces still conflict. The Grammar and Decisions record this rule.
31+9. **Settled: values where `*` is expected.** On 2026-10-30, @iko said `*` is the noun type, not a type variable; generic positions use proper type variables. A value already known to be `@ud` can be passed where `*` is expected. The `each` and `table` signatures use `key=K`.
32+10. **Settled: navigation commands.** On 2026-10-30, @iko chose separate declarations for application paths and unchecked cords, with `link-unsafe`, `image-unsafe` and `go-unsafe` for the unchecked forms. `image-unsafe` takes a sized URL record. Both navigation declarations produce `[%go url=@t]`; `go` converts the application path to a cord including the app's base path.
33+11. **Settled: stores and derived gates.** On 2026-10-30, @iko said a store's `+$ poke` is a declaration, like an API file's, not a mold; a derived name clashes with an import face; and an island watching a request whose case has a separate `scry=` path has a type error. The todo API's request is renamed `todo-by-id` so it does not clash with `/- todo`. The checker must account for the fact that a store's kind is determined by the type of `main`.
34+12. **Settled: how to print a union without a name.** On 2026-10-30, @iko said to print its cases separated by spaces, as `%approve %deny`. This is print-only, not Jibb syntax.
35+13. **Settled: how to print type constraints.** On 2026-10-30, @iko chose `$-([A A] A) where A is an atom` for an atom constraint and `$-([A A] ?) where A contains no gates` for a gate-free constraint. Multiple clauses are comma-separated, as `where A is an atom, B contains no gates`.
36+14. **Settled: how the prelude implements foundational operations.** On 2026-10-30, @iko chose private low-level primitives in the internal prelude module, with the public foundational gates implemented in Jibb on top of them.
37+15. **Settled: unrestricted atoms and shared auras.** On 2026-10-30, @iko said `@` means any atom, independently at each occurrence, so Hoon `dime` and `pint` keep their bare-`@` fields. A specific atom such as `@ud` fits where `@` is expected; an `@` value needs a check to fit `@ud`. Shared atom types use one capital, with the atom constraint inferred from its body, as for `add` taking `[A A]` and returning `A`.
38+16. **Settled: loobeans in union disjointness.** On 2026-10-30, @iko said `?` counts as its two atoms, `%.y` and `%.n`: it is disjoint from any cell and overlaps the constants 0 and 1.
39+17. **Settled: empty cases in union disjointness.** On 2026-10-30, @iko said `!!` is disjoint from every case. A cell containing an empty position at any depth is itself empty and is also disjoint from every case.
40+18. **Settled: the value gate `like`.** On 2026-10-31, @iko chose a gate `(like convert result)` that maps the product of an existing `(like A)` result with `convert=$-(A B)`, yielding `(like B)` while preserving its position and remaining input. An absent result stays absent. The `(like A)` mold remains available in the separate mold namespace. Hoon's wet `+like` instead builds a gate that constructs a result from an input noun; the chosen Jibb value gate is an adaptation of that behavior.
41+19. **Settled: Hoon aura families and `step.hoon`.** On 2026-10-30, @iko chose `step.hoon` for Hoon 1c `step`, avoiding a clash with the Grammar example's `step`, and chose one-way widening across Hoon aura families: for example, `@ud` and `@ux` fit `@u`, and `@tD` fits `@t`. The reverse needs a check. The `step.hoon` group representation is not implemented yet.
42+20. **Settled: the type of `clap`.** On 2026-10-30, @iko chose one shared value type for both units and the combining gate. If either unit is absent, `clap` returns the other; if both are present, it applies the gate to their values and wraps the result.
43+21. **Settled: duplicate faces in imported Hoon records.** On 2026-10-30, @iko chose to reject an imported Hoon record with duplicate field names where its type is used. Hoon permits `[a=@ud a=@t]` and picks the first `a`; Jibb rejects it.
44+22. **Settled: overlapping imported `$%` and `$?` cases.** On 2026-10-30, @iko confirmed that the general union disjointness rule rejects imported `$%` and `$?` cases that overlap as nouns where the type is used, as it does for `$^`. The importer rejects recognizable overlaps and fails closed when it cannot verify them.
45+23. **Settled: converging explicit capitals.** On 2026-10-30, @iko chose that a body cannot force two separately written capitals to be equal. For `++ repeated |= x=(choice A A) x`, `++ f |= x=(choice A B) (repeated x)` is an error; use `A` in both positions when the type must be shared. This also applies across local captures and within generic mold applications.
46+
47+24. **Settled: how the internal prelude provides `poke`.** On 2026-10-31, @iko chose to define `poke` in the source-backed private internal prelude module and re-export it through the public prelude as an ordinary transparent type. Ordinary modules can construct and inspect its values. This settles `poke`; it does not decide the representation of `ask` or `qath`.
48+
49+25. **Settled: how the prelude provides `ask` and `qath`.** On 2026-10-31, @iko chose ordinary transparent types defined in the internal prelude and re-exported normally, as for `poke`. Callers may construct and inspect their values.
50+
51+26. **Settled: the `step` example's `at` binder.** On 2026-10-31, @iko chose to rename the `describe` pattern binder to `sent-at`, keeping Hoon's `at` in the prelude and the no-shadowing rule.
52+
53+27. **Settled: duplicate fields in a Jibb-written record.** On 2026-10-31, @iko chose to reject duplicate field names, as for imported Hoon records.
54+
55+28. **Settled: arithmetic on loobeans.** On 2026-10-31, @iko chose to reject loobean operands for arithmetic. Comparison may still accept loobeans and returns `?`. The checker needs to retain this constraint through inference, generalization and instantiation before it exports `add` or `dec`.
56+
57+29. **Settled: printing the arithmetic atom constraint.** On 2026-10-31, @iko chose `where A is an atom other than ?` for a generic arithmetic type whose atom variable excludes loobeans.
20
58
21−**3. The prelude's inventory.** On 2026-10-30, @iko chose to include all names from the listed Hoon library sections, excluding groups the spec explicitly leaves out. All of 3g is included; its Hoon `tone` is exposed as `tone.hoon`, distinct from the styling type. Hoon 1c `step` is exposed as `step.hoon`, leaving the Grammar example's `step` name available. On 2026-10-30, @iko also approved `%$` as a term literal and pattern, so Jibb can write the `%$` case of Hoon `coin`. For parsing sections 4j and 4l, only the explicitly listed `slav` and `slaw` are included; other parser helpers are left out. Jibb's `not` negates a loobean, and Hoon's bitwise `not` is exposed as `not.bit`. @iko also agreed to specifying the complete exported inventory in the doc, building its types and gates needed by the examples in milestone 2, and doing native implementations in milestone 3. Prelude unions such as spaces, roles and tones need names that other modules cannot shadow. The actual inventory and signatures still need to be specified.
59+30. **Settled: a hole inferred as a generic variable.** On 2026-10-31, @iko said a hole resolved to an explicitly written type variable counts as inferred: in `++ id |= x=A ^- _ x`, the result hole is `A`. Named molds must determine their own holes without constraints from later uses; an unconstrained hole is an error.
22
60
23−**32. Partly settled: type-directed record projection.** On 2026-10-31, @iko chose an explicit `(proj record)` whose expected result type selects the fields. There is no automatic projection, and `proj` is reserved against definitions and imports. The result contains exactly the fields of its expected type. Whether the result may reorder fields from the source remains open.
61+31. **Settled: uses of a value with a hole.** On 2026-10-31, @iko said a value definition must determine its own holes; another definition's use cannot fix an otherwise unresolved hole. For example, `++ id |= x=_ x` remains an error even if a later definition calls `id` with a cord.
24
62
25−## Review rulings waiting for @iko
63+32. **Partly settled: type-directed record projection.** On 2026-10-31, @iko chose an explicit `(proj record)` whose expected result type selects the fields. There is no automatic projection, and `proj` is reserved against definitions and imports. The result contains exactly the fields of its expected type. Whether the result may reorder fields from the source remains open.
26
64
27−The [2026-11-02 review](reviews/2026-11-02-repo-review.md) raised these language and spec questions. Montelot answered them on 2026-11-02 as proposals. Each waits for @iko to confirm before it goes in [Decisions](spec/decisions.md) and the code changes.
65+33. **Settled: watching a request with unknown provenance.** On 2026-10-31, @iko said an island may watch a request only if the checker proves it watchable at compile time. An unknown request, including one built or passed through a gate without sufficient evidence, is rejected rather than deferred to a runtime check.
28
66
29−| # | Question | Proposed answer | Refs |
67+34. **Settled: constructors and equal noun literals.** On 2026-10-31, @iko said expressions with the same runtime representation count as equal, and cases that cannot be distinguished at runtime are rejected at compile time. Thus `|=%$` matches a case headed by `%$`, `%.y` or `~`: each is the noun 0. Cases with equal heads and overlapping payloads cannot coexist in a union.
30−| --- | --- | --- | --- |
31−| [16](reviews/2026-11-02-questions.md) | Which auras may a term literal fit? Today `^- @tas %1.000` is accepted and `^- @ud %1.000` is rejected | Follow Hoon: `%1.000` is `@ud` and `%&` is `?` | A20 |
32−| [17](reviews/2026-11-02-questions.md) | May a name term fit `@t`, as `@tas` nests in `@t` in Hoon? | Yes | A20 |
33−| [18](reviews/2026-11-02-questions.md) | May a gate fit `*`? The prelude's `element` erases gates into `*` | Yes, and say in the spec that `*` may hold gates | A23 |
34−| [19](reviews/2026-11-02-questions.md) | Where are `[]` and `m()`, both decided errors, rejected? | In the parser, at the closer, with golden cases | A6, A100 |
35−| [20](reviews/2026-11-02-questions.md) | Is `[a=@ud [a=@t b=?]]` one record or two scopes? | One record: the duplicate `a` is an error | A30 |
36−| [21](reviews/2026-11-02-questions.md) | May `/% %foo` and `++ foo 1` share a name? | Yes: molds and values have separate namespaces | A25 |
37−| [22](reviews/2026-11-02-questions.md) | Is a `?-` arm that matches no remaining case a definite error? | Yes: "arm matches no case" | A15 |
38−| [23](reviews/2026-11-02-questions.md) | Should `(mop K V)` carry its comparator? | No, match Hoon | A55 |
39−| [24](reviews/2026-11-02-questions.md) | Should Hoon's `each` mold be renamed, since the prelude has the element gate `each`? | No, keep both | A64 |
40−| [26](reviews/2026-11-02-questions.md) | Which Hoon unions should the importer read? | `$%` with `%&`, `%\|` and `%0` tags now, then `each` and `json` as catalog entries | A50 |
41−| [27](reviews/2026-11-02-questions.md) | Should the `%jibb` mark keep dropping the final newline on a `%txt` round trip? | Keep it, like `%hoon` | A61 |
42−| [28](reviews/2026-11-02-questions.md) | Should the printer flatten `[a [b c]]` and print named molds by name, such as `theme`? | Yes | A136 |
43
68
44## Grammar questions never put to the doc's author
69## Grammar questions never put to the doc's author
45
70
@@ -50,14 +75,14 @@ In milestone 1 the parser met about thirty places where the doc could be read mo
50| 1 | `knot` may be empty, so the EBNF admits `//`, `/a//b` and a trailing `/`. Which are paths? | A segment has at least one character, as in Hoon. `/` alone is the empty path, in expressions and molds; `%/` alone is the root application path. `//` fails at the second `/`, and a trailing `/` just past it. `inline-mold-paths` has `/` alone as a mold |
75| 1 | `knot` may be empty, so the EBNF admits `//`, `/a//b` and a trailing `/`. Which are paths? | A segment has at least one character, as in Hoon. `/` alone is the empty path, in expressions and molds; `%/` alone is the root application path. `//` fails at the second `/`, and a trailing `/` just past it. `inline-mold-paths` has `/` alone as a mold |
51| 2 | Is `/` alone a valid path for a `/=` import? | No: `/=` names a module's file, so its path has a segment. `/= card /` fails just past the `/` (`inline-import-root-bad`) |
76| 2 | Is `/` alone a valid path for a `/=` import? | No: `/=` names a module's file, so its path has a segment. `/= card /` fails just past the `/` (`inline-import-root-bad`) |
52| 3 | The EBNF's `line = [ name "=" ] expr` lets every open bracket's lines take `name=`. What would it mean on a line of an open `(` or `~[`? | An error: `name=` lines belong to tuples and changes. "expected a space between items, found `=`; `name=value` goes in a cell, as [a=1], or a change, as m(a=1)" |
77| 3 | The EBNF's `line = [ name "=" ] expr` lets every open bracket's lines take `name=`. What would it mean on a line of an open `(` or `~[`? | An error: `name=` lines belong to tuples and changes. "expected a space between items, found `=`; `name=value` goes in a cell, as [a=1], or a change, as m(a=1)" |
53−| 4 | Does "items named" make every item of a change need `name=`? | Settled on 2026-11-03 (syntax review S6): yes, `name=value` or `wing=value`, as `m(open.cart=x)`. `m(x)` still fails just past `x`, "a change's items are named, as in m(done=%.y)" (`lex-tight-change-bad-3` to `-7`, where `-5` is a wing with no `=`; `-8` and `-9` test what follows a name there) |
78+| 4 | Does "items named" make every item of a change need `name=`? | Yes: `m(x)` fails just past `x`, "a change's items are named, as in m(done=%.y)" (`lex-tight-change-bad-3` to `-7`; `-8` and `-9` test what follows a name there). The parser still accepts `m()`, though question 6 settled it as an error |
54| 5 | `term` includes `%0`, `%&` and `%\|`, which no mark is called. What does `/%` take? | `%` and a name only: `/% %0` is "expected a mark's term, as `%todo-action`, found `%0`" |
79| 5 | `term` includes `%0`, `%&` and `%\|`, which no mark is called. What does `/%` take? | `%` and a name only: `/% %0` is "expected a mark's term, as `%todo-action`, found `%0`" |
55| 6 | What does an indented first line mean? | An error: "the first line is indented: top-level lines start at column 1" (`lex-indent-bad-3`) |
80| 6 | What does an indented first line mean? | An error: "the first line is indented: top-level lines start at column 1" (`lex-indent-bad-3`) |
56| 7 | With levels open at columns 1 and 5, what does a line at column 3 mean? | An error naming the open columns: "this line's indentation matches no enclosing line: indent it to column 1 or 5". `lex-indent-bad-2`, with levels at 1, 5 and 7, gives "column 1, 5 or 7" |
81| 7 | With levels open at columns 1 and 5, what does a line at column 3 mean? | An error naming the open columns: "this line's indentation matches no enclosing line: indent it to column 1 or 5". `lex-indent-bad-2`, with levels at 1, 5 and 7, gives "column 1, 5 or 7" |
57| 8 | Tabs, carriage returns, other control characters, and non-ASCII text outside strings and comments? | Errors everywhere, strings and comments included, except that UTF-8 is allowed in strings and comments; a tab in a string is written `\09`. `lex-indent-bad-1` and `lex-spacing-bad-2` test tabs |
82| 8 | Tabs, carriage returns, other control characters, and non-ASCII text outside strings and comments? | Errors everywhere, strings and comments included, except that UTF-8 is allowed in strings and comments; a tab in a string is written `\09`. `lex-indent-bad-1` and `lex-spacing-bad-2` test tabs |
58| 9 | Must a file be valid UTF-8? | Not checked yet: any byte from 128 up passes in strings and comments, and columns assume UTF-8. The proposed reading makes a byte that can't continue a UTF-8 sequence an error. An escape such as `\ff` still writes any byte, as in Hoon |
83| 9 | Must a file be valid UTF-8? | Not checked yet: any byte from 128 up passes in strings and comments, and columns assume UTF-8. The proposed reading makes a byte that can't continue a UTF-8 sequence an error. An escape such as `\ff` still writes any byte, as in Hoon |
59| 10 | Inside `{…}`, may `::` start a comment, which would swallow the `}` and the `"`? Is a lone `}` in a string text? May a comment follow code with no space, as in `5::note`? | A `:` inside `{…}` is "a comment can't start inside `{…}`". A lone `}` is text, as in Hoon. `5::note` is `5` and a comment |
84| 10 | Inside `{…}`, may `::` start a comment, which would swallow the `}` and the `"`? Is a lone `}` in a string text? May a comment follow code with no space, as in `5::note`? | A `:` inside `{…}` is "a comment can't start inside `{…}`". A lone `}` is text, as in Hoon. `5::note` is `5` and a comment |
60−| 11 | Is a type variable exactly one capital letter, as `typevar = upper` says? | Settled on 2026-11-03 (syntax review S7): no, a capital then lowercase letters and digits, as `Msg`; `AB` is an error |
85+| 11 | Is a type variable exactly one capital letter, as `typevar = upper` says? | Yes: `Msg` is "a type variable is one capital letter" |
61| 12 | Hoon has more runes of the left-out kinds than the list names: `?~ ?= ?. ?@ ?^`, `:- :+ :^ :_`, `%- %+ %^ %~`, `=+ =? =.`, `;:` and `~&(…)`. Are they all left out? | Yes, with the list's reasons, as "`:-` is left out: indentation covers it; write a cell as [a b]". Naming them in the doc, or saying "Hoon's other runes", would make the messages the doc's words (`inline-leftout-*`) |
86| 12 | Hoon has more runes of the left-out kinds than the list names: `?~ ?= ?. ?@ ?^`, `:- :+ :^ :_`, `%- %+ %^ %~`, `=+ =? =.`, `;:` and `~&(…)`. Are they all left out? | Yes, with the list's reasons, as "`:-` is left out: indentation covers it; write a cell as [a b]". Naming them in the doc, or saying "Hoon's other runes", would make the messages the doc's words (`inline-leftout-*`) |
62| 13 | `@s…` and `@r…` auras are "errors wherever used". Is that the parser's error in Jibb source, or the checker's? | An error before the checker. Where a mold goes, the layout pass's, at the `s` or `r`: "signed and floating-point auras are left out of Jibb". Where an expression goes, the parser's, at the `@`: "expected an expression, found `@`; signed and floating-point auras are left out of Jibb". Imported ones are milestone 2's importer's. The case `inline-leftout-signed-float-auras` still says "expect: unclear" |
87| 13 | `@s…` and `@r…` auras are "errors wherever used". Is that the parser's error in Jibb source, or the checker's? | An error before the checker. Where a mold goes, the layout pass's, at the `s` or `r`: "signed and floating-point auras are left out of Jibb". Where an expression goes, the parser's, at the `@`: "expected an expression, found `@`; signed and floating-point auras are left out of Jibb". Imported ones are milestone 2's importer's. The case `inline-leftout-signed-float-auras` still says "expect: unclear" |
63
88
docs/prelude-inventory.md+9−17
@@ -4,15 +4,9 @@ This is a working inventory, not a completed prelude interface. It lists top-lev
4
4
5The source is the fake ship's `%base` `/sys/hoon.hoon` (Hoon version 135), read through Clay with `tools/ship scry /cx/=base=/sys/hoon/hoon --raw`. SHA-256: `ef538ced0877230f02ff86f9fb7a0abc6833bb1cf0e8675742b4d6ce478fcc92`. It differs in bytes from [upstream Hoon at the inspected commit](https://github.com/urbit/urbit/blob/5a187fededc4582a34fcd6055c67bb63e0917b94/pkg/arvo/sys/hoon.hoon); verify against the actual target ship when updating this inventory.
5The source is the fake ship's `%base` `/sys/hoon.hoon` (Hoon version 135), read through Clay with `tools/ship scry /cx/=base=/sys/hoon/hoon --raw`. SHA-256: `ef538ced0877230f02ff86f9fb7a0abc6833bb1cf0e8675742b4d6ce478fcc92`. It differs in bytes from [upstream Hoon at the inspected commit](https://github.com/urbit/urbit/blob/5a187fededc4582a34fcd6055c67bb63e0917b94/pkg/arvo/sys/hoon.hoon); verify against the actual target ship when updating this inventory.
6
6
7−The vendored prelude defines `raw-poke` in its private internal module and re-exports it as a transparent type. Derived API/store `poke` helpers take an action and reply and return `(cmd M)` after checking the canonical `raw-poke`, `cmd` and `unit` shapes; complete checking of the private body, other API shapes, effect lowering and runtime execution remain unfinished. `qath` is defined there as a transparent recursive knot sequence and re-exported by the public prelude; the partial checker supports its named identity, selected construction and matching, and static application-path literals. The internal prelude also defines a transparent generic `ask` with pure, agent and store cases; the public prelude re-exports it and defines `pure`. Supported source construction and matching infer, while derived requests, source-schema validation and execution remain unfinished.
7+The vendored prelude defines `poke` in its private internal module and re-exports it as a transparent type. The partial checker resolves its supported source shape and a narrow imported API constructor; complete checking of the private body, other API shapes, effect lowering and runtime execution remain unfinished. `qath` is defined there as a transparent recursive knot sequence and re-exported by the public prelude; the partial checker supports its named identity, selected construction and matching, and static application-path literals. The internal prelude also defines a transparent generic `ask` with pure, agent and store cases; the public prelude re-exports it and defines `pure`. Supported source construction and matching infer, while derived requests, source-schema validation and execution remain unfinished.
8
8
9−The prelude also declares the generic `cmd` mold exactly as in Overview, Effects. The partial checker infers its five cases and independent message types in the supported examples; the doc's `cmd`/`sub` block also passes full detailed and legacy checking at the prelude path with matching printed schemes. Backend validation, request watchability and execution remain outstanding.
9+The prelude also declares the generic `cmd` mold exactly as in Overview, Effects. The partial checker infers its five cases and independent message types in the supported examples; complete module checking and backend validation remain outstanding. The related `sub` declaration awaits checking and the remaining request support.
10−
11−The public prelude now defines the UI `length`, `align`, `role`, `tone` and `attr` molds, a nonrecursive generic `element` union with one case per UI node, and the exact `program` and `page` records with their builders. Nested child, keyed-item and table payloads in the runtime union are erased to `*`; the public constructors retain typed children and independent key types, and `island` stores `[program data]` in its erased payload. The focused `types-prelude-ui` golden infers the complete union and constructor schemes, including static and message-bearing composition. Raw-constructor encapsulation, duplicate-attribute rejection, rendering, storage, navigation and execution are not established by this slice.
12−
13−The public prelude defines the approved generic `store` record `[init=S update=*]` and its builder, whose update argument is `$-([A S] S)` while the result exposes only `S`. Focused store coverage checks both exact schemes, the unchanged cart's closed main and derived generic poke/state gates, malformed-prelude controls and downstream structural imports. The local `+$ poke` remains an ordinary action mold. Store declaration checking and watch evidence are implemented; multi-action declarations, lowering and runtime execution are not.
14−
15−The public prelude also defines the exact `theme` mold: three space cords, five normal tone cords, `wide`, `lang` and `zone` cords, `(unit qath)` for `font`, and a unit containing the same five dark tone cords. The shared `type-theme` fixture fully checks the byte-identical real theme and its structural downstream import, including dark absent/present and malformed-field negatives. It does not implement contrast checking, rendering, routing or any other theme behavior.
16
10
17Hoon `+$` arms are marked **mold** below; `++` arms can be gates, doors or mold generators, and need individual inspection. Jibb's loobean `not` and Hoon's bitwise `not.bit` are distinct. Parser helpers outside 3g are excluded from the intended prelude except the specifically listed `slav` and `slaw`; the raw candidates below still need to be classified.
11Hoon `+$` arms are marked **mold** below; `++` arms can be gates, doors or mold generators, and need individual inspection. Jibb's loobean `not` and Hoon's bitwise `not.bit` are distinct. Parser helpers outside 3g are excluded from the intended prelude except the specifically listed `slav` and `slaw`; the raw candidates below still need to be classified.
18
12
@@ -20,7 +14,7 @@ Hoon `+$` arms are marked **mold** below; `++` arms can be gates, doors or mold
20
14
21`add`, `dec`, `div`, `dvr`, `gte`, `gth`, `lte`, `lth`, `max`, `min`, `mod`, `mul`, `sub`.
15`add`, `dec`, `div`, `dvr`, `gte`, `gth`, `lte`, `lth`, `max`, `min`, `mod`, `mul`, `sub`.
22
16
23−The source-backed `gth` gate calls a compiler-supplied private comparison interface. The partial checker accepts supported equal-aura atom arguments, including loobeans, and returns `?`; lowering, jet recognition and execution remain unfinished. The public `add` and `dec` gates are written in Jibb over private primitive interfaces. The partial checker infers a shared atom type that excludes loobeans, including through supported generic calls. The Jibb-written `lth`, `gte` and `lte` gates compose `gth` and `not`; supported calls infer a shared atom constraint and return `?`. Primitive execution and jet recognition remain unfinished.
17+The source-backed `gth` gate calls a compiler-supplied private comparison interface. The partial checker accepts supported equal-aura atom arguments, including loobeans, and returns `?`; lowering, jet recognition and execution remain unfinished. The public `add` and `dec` gates are written in Jibb over private primitive interfaces. The partial checker infers a shared atom type that excludes loobeans, including through supported generic calls. Primitive execution and jet recognition remain unfinished.
24
18
25## 1c
19## 1c
26
20
@@ -32,7 +26,7 @@ The source-backed `gth` gate calls a compiler-supplied private comparison interf
32
26
33`biff`, `bind`, `bond`, `both`, `clap`, `clef`, `drop`, `fall`, `flit`, `hunt`, `lift`, `mate`, `need`, `some`.
27`biff`, `bind`, `bond`, `both`, `clap`, `clef`, `drop`, `fall`, `flit`, `hunt`, `lift`, `mate`, `need`, `some`.
34
28
35−The following is an audit of the Hoon 135 bodies, not a completed Jibb interface. The partial checker infers `fall`, `need`, `some`, `bind`, `biff`, `bond`, `both`, `clap`, `clef`, `drop`, `flit`, `hunt` and `mate`; the remaining written implementations have been parsed, but complete checker validation remains outstanding. Backend validation and jet recognition remain outstanding for all of them.
29+The following is an audit of the Hoon 135 bodies, not a completed Jibb interface. The partial checker infers `fall`, `need`, `some`, `bind`, `biff`, `bond`, `both`, `clap`, `clef`, `drop` and `flit`; the remaining written implementations have been parsed, but complete checker validation remains outstanding. Backend validation remains outstanding for all of them.
36
30
37| Name | Hoon behavior | Jibb status |
31| Name | Hoon behavior | Jibb status |
38| --- | --- | --- |
32| --- | --- | --- |
@@ -45,9 +39,9 @@ The following is an audit of the Hoon 135 bodies, not a completed Jibb interface
45| `drop` | Converts an absent unit to an empty list and a present unit to a singleton. | Written; inferred by the partial checker |
39| `drop` | Converts an absent unit to an empty list and a present unit to a singleton. | Written; inferred by the partial checker |
46| `fall` | Returns the value of a present unit or the supplied fallback. | Written; inferred by the partial checker |
40| `fall` | Returns the value of a present unit or the supplied fallback. | Written; inferred by the partial checker |
47| `flit` | Returns a gate that wraps a value only if it satisfies the predicate. | Written |
41| `flit` | Returns a gate that wraps a value only if it satisfies the predicate. | Written |
48−| `hunt` | Returns the only present unit or chooses between two present values with an ordering gate. | Written with the ordering gate first, as `(hunt ord a b)`; both ordering outcomes and absent units are inferred |
42+| `hunt` | Returns the only present unit or chooses between two present values with an ordering gate. | Missing |
49| `lift` | Takes a mold and a unit, then applies the mold to a present value as `bind` does. | Missing; Jibb molds are not callable values |
43| `lift` | Takes a mold and a unit, then applies the mold to a present value as `bind` does. | Missing; Jibb molds are not callable values |
50−| `mate` | Returns the present unit if only one is present; when both are present it returns one if their values are equal and crashes otherwise. | Written over `eq`; its generic payload retains the gate-free constraint |
44+| `mate` | Returns the present unit if only one is present; when both are present it returns one if their values are equal and crashes otherwise. | Missing |
51| `need` | Extracts a present value and crashes on an absent unit. | Written; inferred by the partial checker |
45| `need` | Extracts a present value and crashes on an absent unit. | Written; inferred by the partial checker |
52| `some` | Wraps a value in a present unit. | Written |
46| `some` | Wraps a value in a present unit. | Written |
53
47
@@ -55,7 +49,7 @@ The following is an audit of the Hoon 135 bodies, not a completed Jibb interface
55
49
56`snoc`, `lure`, `fand`, `find`, `flop`, `gulf`, `homo`, `join`, `bake`, `lent`, `levy`, `lien`, `limo`, `murn`, `oust`, `reap`, `rear`, `reel`, `roll`, `scag`, `skid`, `skim`, `skip`, `slag`, `snag`, `snip`, `sort`, `spin`, `spun`, `swag`, `turn`, `weld`, `snap`, `into`, `welp`, `zing`.
50`snoc`, `lure`, `fand`, `find`, `flop`, `gulf`, `homo`, `join`, `bake`, `lent`, `levy`, `lien`, `limo`, `murn`, `oust`, `reap`, `rear`, `reel`, `roll`, `scag`, `skid`, `skim`, `skip`, `slag`, `snag`, `snip`, `sort`, `spin`, `spun`, `swag`, `turn`, `weld`, `snap`, `into`, `welp`, `zing`.
57
51
58−The current prelude writes `snoc`, `lure`, `flop`, `join`, `lent`, `zing`, `levy`, `lien`, `murn`, `rear`, `reel`, `roll`, `skim`, `skip`, `snip`, `turn` and `weld`. `lent` counts items by recursion and `add`; `murn` keeps the present products of its gate in order; `join` inserts a separator between items; `snip` drops the last item, and `rear` returns it or crashes on an empty list. The folds take an explicit initial value as the Prelude table specifies. The partial checker infers `snoc`, `lure`, `weld`, `turn`, `flop`, `rear`, `skim`, `skip`, `murn`, `join`, `snip`, `lent`, `zing`, `levy` and `lien` using the validated prelude `list` mold; other list helpers remain limited by that fragment. The result casts on `drop`, `skim`, `skip`, `murn`, `join`, `snip`, `levy` and `lien` state their existing result types without changing their bodies. `zing` concatenates homogeneous lists in order; Hoon’s raw `zing` can also flatten heterogeneous noun lists, which this Jibb type does not express. A Hoon translation agrees with Hoon `zing` on selected finite inputs; this is not Jibb execution. Backend validation and jet recognition remain outstanding for all of them.
52+The current prelude writes `snoc`, `lure`, `flop`, `join`, `levy`, `lien`, `murn`, `rear`, `reel`, `roll`, `skim`, `skip`, `snip`, `turn` and `weld`. `murn` keeps the present products of its gate in order; `join` inserts a separator between items; `snip` drops the last item, and `rear` returns it or crashes on an empty list. The folds take an explicit initial value as the Prelude table specifies. The partial checker infers `snoc`, `lure`, `weld`, `turn`, `flop`, `rear`, `skim`, `skip`, `murn`, `join`, `snip`, `levy` and `lien` using the validated prelude `list` mold; other list helpers remain limited by that fragment. The result casts on `drop`, `skim`, `skip`, `murn`, `join`, `snip`, `levy` and `lien` state their existing result types without changing their bodies. Backend validation remains outstanding for all of them.
59
53
60## 2c
54## 2c
61
55
@@ -105,7 +99,7 @@ The current prelude writes `snoc`, `lure`, `flop`, `join`, `lent`, `zing`, `levy
105
99
106`aftr`, `cork`, `corl`, `cury`, `curr`, `fore`, `head`, `same`, `succ`, `tail`, `test`, `lead`, `late`.
100`aftr`, `cork`, `corl`, `cury`, `curr`, `fore`, `head`, `same`, `succ`, `tail`, `test`, `lead`, `late`.
107
101
108−The source-backed `cork` and `corl` compose gates forward and backward, respectively; `cury` and `curr` bind the first and second item of an unfaced pair. `succ` increments an atom through `add`; the partial checker infers a shared atom type excluding loobeans. A Hoon translation agrees with Hoon on ten selected inputs; Jibb execution and jet recognition remain unverified. `lead` and `late` are curried pair constructors: `((lead a) b)` returns `[a b]`, and `((late a) b)` returns `[b a]`. Their arguments may have independent types, including gate values, and neither constructor invokes a gate. The partial checker infers their polymorphic types. A Hoon translation agrees with Hoon’s helpers on selected inputs, but this is not Jibb execution; lowering and jet recognition remain to be validated by a backend.
102+The source-backed `cork` and `corl` compose gates forward and backward, respectively; `cury` and `curr` bind the first and second item of an unfaced pair. The partial checker infers their polymorphic types. Their runtime implementations remain to be validated by a backend.
109
103
110## 2o
104## 2o
111
105
@@ -158,7 +152,7 @@ The following shapes can be written as Jibb declarations once their referenced p
158 [%2 p=(list tank)]
152 [%2 p=(list tank)]
159```
153```
160
154
161−The compiler-result `tone.hoon` has the three cases listed above; the qualified name is a prelude group member, not a `+$` identifier containing a dot. Question 15 in [Decisions](spec/decisions.md#settled-milestone-2-questions) records @iko's decision that `@` is an unrestricted atom, resolving the `dime` and `pint` mismatch. The source-backed value form of `like` maps an existing result's product. Supported calls infer in the partial checker; complete checking and backend validation for `like` and `wonk` remain outstanding.
155+The compiler-result `tone.hoon` has the three cases listed above; the qualified name is a prelude group member, not a `+$` identifier containing a dot. Question 15 in [open-questions.md](open-questions.md) records @iko's decision that `@` is an unrestricted atom, resolving the `dime` and `pint` mismatch. The source-backed value form of `like` maps an existing result's product. Supported calls infer in the partial checker; complete checking and backend validation for `like` and `wonk` remain outstanding.
162
156
163## 4a
157## 4a
164
158
@@ -168,8 +162,6 @@ The compiler-result `tone.hoon` has the three cases listed above; the qualified
168
162
169`at`, `cass`, `cuss`, `crip`, `mesc`, `runt`, `sand`, `sane`, `ruth`, `trim`, `trip`, `teff`, `taft`, `tuba`, `tufa`, `tuft`, `wack`, `wick`, `woad`, `wood`.
163`at`, `cass`, `cuss`, `crip`, `mesc`, `runt`, `sand`, `sane`, `ruth`, `trim`, `trip`, `teff`, `taft`, `tuba`, `tufa`, `tuft`, `wack`, `wick`, `woad`, `wood`.
170
164
171−The prelude writes `trip` and `tuba` over private primitives. Their inferred types are `$-(@t (list @tD))` and `$-((list @tD) (list @c))`, matching the target ship's Hoon 135 definitions. Composition with `lent` and invalid argument controls pass in the partial checker; primitive lowering, execution and jet recognition remain unfinished.
172−
173## 4k
165## 4k
174
166
175`co`.
167`co`.
docs/prompts/milestone-2-finish.mddeleted−97
@@ -1,97 +0,0 @@
1−# Finishing milestone 2
2−
3−A brief for the developer who finishes milestone 2 of Jibb, types and prelude. Paste it as the first message of a session, or hand it to a person; it assumes the repo `iko-soy/jibb`. Written 2026-11-03, at commit `f84a29e`, from the [milestone 2 review](../reviews/2026-11-03-milestone-2-review.md) of the same day. That review was still running in seven of its nine areas when this was written; where a section below depends on them it says so, and both files will be updated when they finish.
4−
5−---
6−
7−You are finishing milestone 2 of Jibb, a UI language for Urbit: a Hoon dialect with an indentation layout, whose compiler is a Hoon library, `jibb-dev/lib/jibb.hoon`. Milestone 1 built the layout pass and the parser. Milestone 2 has built a large partial type checker, a Hoon type importer and most of the prelude; every check passes, under `urbit eval` and on a fake ship, and the doc's 14 `jibb` blocks check as written. What is missing is a checker that is general rather than fitted to those examples, and that tells the user what is wrong.
8−
9−## Read first
10−
11−1. [docs/reviews/2026-11-03-milestone-2-review.md](../reviews/2026-11-03-milestone-2-review.md): the verdict, findings M1 to M17, and the table of the 33 errors the spec describes. This brief is its to-do list.
12−2. [docs/prompts/milestone-2.md](milestone-2.md): the original brief. Its "What the doc asks of the checker", "Suggested design" and "Tests" sections still hold, and this brief doesn't repeat them.
13−3. [docs/spec/implementation-plan.md](../spec/implementation-plan.md), milestone 2, and the spec tabs it points at, closely Grammar's Tag resolution, Literals by context, Patterns, Modules and Imports.
14−4. [docs/reviews/2026-11-02-questions.md](../reviews/2026-11-02-questions.md): the owner's answers, marked *(chosen)*. Q5 and Q6 set the direction below. Q16 to Q28 are proposals waiting for @iko, not spec.
15−5. [docs/development.md](../development.md): setting up (`nix develop`), the tools, the test suites, and the checks before pushing (`tools/check` or `nix flake check`).
16−6. `git log origin/master`: @iko works in `jibb.hoon` in parallel, and another thread is implementing syntax-review proposals S1, S2, S4 to S7, S11 to S13 and S15 ([syntax review](../reviews/2026-11-02-syntax-review.md)). Rebase often and keep your changes out of theirs where you can. The thread that fixes the 2026-11-02 review's findings planned this same core on 2026-11-03, in stages that keep every check green; ask in the project chat who is building it before you start step 2.
17−
18−## Ground rules
19−
20−The original brief's rules hold: the spec wins, language questions go to @iko and are recorded in Decisions first, no built-ins, everything is a golden test that passes under eval and on the fake ship, push straight to `master` in commits that each leave every check passing, and keep `docs/` current. Two more:
21−
22−- **Fail closed, but say why.** A program the checker can't yet handle must be rejected, never accepted, and its message must name the construct and its site. "module definitions need unsupported inference: <path>: ++ x" is not an acceptable message for an error the spec describes.
23−- **Delete what the core replaces.** When the general core covers a recovery path or a "source-proven" slice, delete the slice and keep its tests. The milestone is done when the slices are gone, not when they are joined by a core.
24−
25−## What is left
26−
27−In order. Steps 1 and 2 can start at once; the rest build on step 2.
28−
29−### 1. Keep the diagnostics the checker already finds (M1, M12, M17)
30−
31−The full checker, `infer-jibb-file-detailed`, drops every per-definition reason in `add-supported-result` (`jibb.hoon` 10670-10689), so almost every error reaches the user as the generic message. The partial report already computes most of them. Thread a diagnostic, an `idiag` with its sites, through `add-supported-defs-core` for each unresolved definition, mold and kind check, and render the first in dependency order where the generic text is built today (14820-14857). Keep the generic text only for real checker limits, and make those name the construct. Make `module-scope-valid` return the shadowed name and both sites, with its own wording for `proj`. This plumbing carries over to the core of step 2.
32−
33−### 2. The general checker core (Q5)
34−
35−The owner chose this on 2026-11-02: union-find bindings with levels, a queue of deferred constraints, and a usefulness check for matches, built before more recovery paths. It is a long piece of work, so first write its design as a new section of the library's design notes, and share it in the project chat for @iko before replacing code. Start from [the checker map](../reviews/2026-11-03-checker-map.md), which says what each part of today's checker does, which tests pin it, what the core replaces and keeps, and the hazards; [repo-review-finish.md](repo-review-finish.md) step 6 has the review's advice for staging it.
36−
37−- **Unification**: union-find over type variables, with levels for generalization instead of environment scans; an occurs check; aura variables and the "is an atom" and "contains no gates" constraints carried on the variable, as `0858191` already does for gate-freedom.
38−- **Deferred constraints**: tags, `~`, numbers and cells, wing access, changes and `?-` on a type not yet known each wait in one queue, retried as variables are bound, as the Grammar's Tag resolution says. A tag-constrained variable does not generalize and stays open until something in the module fixes it. At the end of the module, each still-open constraint is an error at its source: "nothing fixes the union of %add; add a `^-`".
39−- **Order**: infer `++`s by the strongly connected components `839f6b0` already computes, a group of mutually recursive gates together; reject a non-gate value that depends on itself, naming the cycle.
40−- **Kinds by type**: check `main` as an ordinary expression. `(program init update view subs)`, `(page load view)` and `(store init update)` are calls whose unification fixes their components' types, messages included, so a tag in `view` is resolved by `main`. Then read the kind from `main`'s type, as the Grammar says, and run each kind's own checks after inference: gate-free island data and models, naming the field; for islands, a walk of the `(list (sub M))` that asks for a watchability proof only for `%watch`; for pages, a load that is any gate to `(ask D)`, `pure` and typed paths included.
41−- **Rulings it must build in**, chosen by Montelot on 2026-11-03 from the syntax review: a capital that meets a faced position binds only the type under the face, never the face, so `[A A]` fits `[x=@ y=@]`, `(hunt lt-a `1 `2)` checks, and `(roll ~[1 2] 0 add-f)` checks with `++ add-f |= [a=@ud b=@ud] (add a b)`; a join keeps a face once a position takes one, so reordering a list's items never changes whether it checks; and, as the syntax thread lands them, the explicit `unface` (S1), bare decimals fitting only `@ud`, `@u`, `@` and `*` (S4), and a bare-name pattern that spells a union tag being an error (S5). Take their final wording from `decisions.md`, and add each ruling's examples as golden cases in the stage that builds it.
42−- **Then delete** the program, page and store recovery chain, the deferred transactions, the prepared-tuple route and the other example-shaped slices as the core covers their tests (the earlier review counts about 1,180 lines of program recovery alone).
43−
44−When this is done, M2 to M5 are gone: every valid variant in the review's [probe corpus](../reviews/2026-11-03-milestone-2-probes/) checks, and each error in an island is reported where it is, as `button "Add" %submitt` giving "msg has no case `%submitt`" at the tag, with the union's site.
45−
46−### 3. Patterns by a usefulness check (M10)
47−
48−Replace the per-case coverage loops with Maranget's usefulness check over nouns: constants and cells, a loobean as its two constants, lists and units as their unions, nested patterns, literal patterns, `*` and bare names. It gives the missing-case error with a witness, at the `?-` and its subject, and the dead-arm error naming the arm that covers it, for the Grammar's `[%move * *]` example too. Keep the matrix reusable: milestone 3 lowers `?-` with it.
49−
50−### 4. One types pipeline (Q6, M14, M15)
51−
52−Render `types.txt` from the full checker: each definition's type, the module's kind, or the error with its excerpts. Retire the partial report, or make it a view of the full result. Give every `doc-*` case a `types.txt`, with the buttons error for `doc-grammar-02-buttons`.
53−
54−### 5. Every error the spec describes (done-criterion 2)
55−
56−Work down the review's [error table](../reviews/2026-11-03-milestone-2-review.md#appendix-the-errors-the-spec-describes) until every row says Met: a golden case with the spec's message, from the full checker, naming both conflicting sites with excerpts. The rows with no message anywhere today: a capital made `@ud` or a list, `~[text "hi"]` with its suggestion, `(facts …)` outside an API's `paths`, a gate in island data or a model with the field named, `[]`, a generic aura in `{…}` or a path's `(…)`, an imported vase or repeated record face, and a repeated attribute in a literal list, which today is accepted (M9).
57−
58−### 6. Kinds, APIs and the prelude in general (M4, M7, M9)
59−
60−- Pages: the overview's route-parameter page, `(post.api slug same)`, and its catch-all page, `(pure p)`, check.
61−- Islands: `|=(m ~)` for no subscriptions, several watches, `%every`, and a watch with a fold, `(changes.todo |=%got apply)`, check.
62−- Stores: a `poke` with several cases checks.
63−- APIs: an API other than the todo one checks as a module, with typed segments, several parameters, `scry=` paths and folds; `(facts …)` outside `paths` is an error.
64−- `element` can't be built by hand: `^- (element !!) [%island 5]` is rejected, so island data is always checked against `init`.
65−- The prelude: every name in the overview's Prelude and Layout tables is usable with its signature, or listed as deliberately left out. `max` is missing today, so the Grammar's `clamp` example fails. The inventory and its gaps are still being reviewed.
66−- The inline Grammar examples in M7 check: `|=(p title.p)`, `"{(add 1 2)}"`, path and unit literals, and every row of the Patterns table.
67−
68−### 7. The Hoon import table (done-criterion 3)
69−
70−A test `/sur` file with `$%`, `$@`, a map and a recursive mold, imported, printed in Jibb's notation and used from a Jibb module through the full checker, under eval and on the ship. Each row of the overview's import table works or gives the table's error where used. Known gaps from the earlier review: only `%tas` head tags (`%&`, `%|`, `%0` and `(each a b)` fail, A50) and no bare `@` or `@uw` (A14). The review's import area is still running and will add to this list.
71−
72−### 8. Tests (M6, M8, M16)
73−
74−- A ship check of the `my-app` desk as the original brief asks: build each `/sur` and mark through Clay, run the full checker over every `/ui/**.jibb` in dependency order, expect exactly one failure, `buttons.jibb` at 3:16, and record the time in `status.md`.
75−- Turn the spec-valid negatives (two `each` sites, a mapper alias, a page alias, an indirect or `pure` load, a store alias, a hand-built main) into positive cases. Fix `tests/type-page-main/hand-built-load.txt`, which doesn't parse. Make every negative assert its message and place, not only "rejected".
76−- Turn the review's [probe corpus](../reviews/2026-11-03-milestone-2-probes/) into a regression suite: its about 90 valid one-edit variants of the doc modules check, and its wrong variants and error probes fail with their own error at their own site.
77−- Guard the copies: the Core language block as a slice of `todo-list.jibb`, and `tests/type-buttons/valid.txt` as the buttons block without `add-button`.
78−
79−### 9. Speed
80−
81−The original brief asks that "a 2,000-line module should check in seconds, not minutes". Measure the full check of generated modules, written bottom-up and top-down, and of the `my-app` desk, with `tools/hoon --no-debug`, and record the numbers in `status.md`. The review's speed area is still running and will add its measurements here.
82−
83−### 10. Docs
84−
85−`status.md` becomes the capability table that Q41 asked for, then shows milestone 2 done with counts and timings. `compiler.md` and the library's header stop saying milestone 1, and describe the core. `open-questions.md` lists what is still open, and `decisions.md` records any new decision.
86−
87−## Out of scope
88−
89−As in the original brief: lowering and the backends (milestone 3), routes, static files, the theme's contrast check and the host (milestone 4), `load`'s per-request behaviour (milestone 5), the JavaScript runtime (milestone 6) and the formatter (milestone 7). Also the syntax-review changes another thread is making.
90−
91−## When you're done
92−
93−- The plan's three "Done when" items hold, but for the route check: the doc's examples and the review's valid variants check; every row of the error table is Met; the `/sur` import test passes.
94−- Every check passes, under eval and on the ship (`nix flake check`), and the `my-app` desk checks on the ship with its types read through Clay.
95−- The recovery paths and slices the core replaced are deleted.
96−- `docs/status.md` shows milestone 2 done, with counts and timings, and the other docs describe the checker as it is.
97−- Everything is pushed to `master`, and a few lines go to @iko in the project chat: what changed, the counts and timings, the decisions needed, and what is still open.
docs/prompts/milestone-2.md+5−5
@@ -49,7 +49,7 @@ And from the plan's Risks:
49
49
50## First steps
50## First steps
51
51
52−1. **Specify the prelude inventory.** The checker needs the prelude's complete exported inventory and signatures; include all names from the listed Hoon library sections except explicitly excluded groups, as `docs/open-questions.md` question 3 records. The prelude imports private helpers and low-level primitives from a separate internal module without exposing them; its public foundational gates are implemented in Jibb on those primitives. The source-backed internal module defines `raw-poke`, `ask` and `qath`; the public prelude re-exports them as ordinary transparent types that modules can construct and inspect, as questions 24 and 25 record. Their current representations and partial checker support are described in `docs/compiler.md`.
52+1. **Specify the prelude inventory.** The checker needs the prelude's complete exported inventory and signatures; include all names from the listed Hoon library sections except explicitly excluded groups, as `docs/open-questions.md` question 3 records. The prelude imports private helpers and low-level primitives from a separate internal module without exposing them; its public foundational gates are implemented in Jibb on those primitives. The source-backed internal module defines `poke`, `ask` and `qath`; the public prelude re-exports them as ordinary transparent types that modules can construct and inspect, as questions 24 and 25 record. Their current representations and partial checker support are described in `docs/compiler.md`.
53
53
54 The plan's three core-language rules were adopted: gate-free `eq` arguments and map and set keys, with gates opaque for union matching; jetted prelude functions taking gates; and rejection of a non-gate value that depends on itself even through a gate.
54 The plan's three core-language rules were adopted: gate-free `eq` arguments and map and set keys, with gates opaque for union matching; jetted prelude functions taking gates; and rejection of a non-gate value that depends on itself even through a gate.
552. **Start the importer early**, as the plan's Risks ask: first on a small `/sur` file, then on Tlon's. "Suggested design" below has a way in.
552. **Start the importer early**, as the plan's Risks ask: first on a small `/sur` file, then on Tlon's. "Suggested design" below has a way in.
@@ -70,7 +70,7 @@ The rules are scattered across the tabs. This is a map of them, not a replacemen
70- Generic molds: `+$ result |$ [V E]` with cases below, applied as `(result V E)`; `|$` goes right after a `+$`'s name, and the prelude's `cmd` and `sub` use `|$ [M]`.
70- Generic molds: `+$ result |$ [V E]` with cases below, applied as `(result V E)`; `|$` goes right after a `+$`'s name, and the prelude's `cmd` and `sub` use `|$ [M]`.
71- `!!` is the empty mold, and as an expression it has any type. `*` is the noun type, not a type variable; generic positions such as the keys in `each` and `table` use a capital. A value of a more specific noun type can be used where `*` is expected.
71- `!!` is the empty mold, and as an expression it has any type. `*` is the noun type, not a type variable; generic positions such as the keys in `each` and `table` use a capital. A value of a more specific noun type can be used where `*` is expected.
72- `_` is an inferable hole wherever a mold can appear, including an inferred path-segment aura. A hole resolved to an explicitly named generic variable is resolved; an unconstrained hole is an error. A named mold or value definition must determine its own holes without constraints from later uses.
72- `_` is an inferable hole wherever a mold can appear, including an inferred path-segment aura. A hole resolved to an explicitly named generic variable is resolved; an unconstrained hole is an error. A named mold or value definition must determine its own holes without constraints from later uses.
73−- `raw-poke`, `ask` and `qath` are transparent types defined in the internal prelude and re-exported normally. Derived gates and `pure` also construct requests; application-path literals have type `qath`. A store's local `poke` is an ordinary action mold.
73+- `poke`, `ask` and `qath` are transparent types defined in the internal prelude and re-exported normally. Derived gates and `pure` also construct requests; application-path literals have type `qath`.
74- The Literals table gives every other literal its type: `0x1f` a `@ux`, ships `@p`, dates `@da`, durations `@dr`, `~.knot` a `@ta`, strings `@t`, `` `x `` a `(unit A)`, `~[…]` a `(list A)`, `gap+%s2` the pair `[%gap %s2]`, `/posts/~zod` a `path`, `%/blog` a `qath`.
74- The Literals table gives every other literal its type: `0x1f` a `@ux`, ships `@p`, dates `@da`, durations `@dr`, `~.knot` a `@ta`, strings `@t`, `` `x `` a `(unit A)`, `~[…]` a `(list A)`, `gap+%s2` the pair `[%gap %s2]`, `/posts/~zod` a `path`, `%/blog` a `qath`.
75
75
76**Tags, `~`, numbers and cells wait for their context** (Grammar: Tag resolution, Literals by context)
76**Tags, `~`, numbers and cells wait for their context** (Grammar: Tag resolution, Literals by context)
@@ -93,7 +93,7 @@ The rules are scattered across the tabs. This is a map of them, not a replacemen
93
93
94**Names and modules** (Grammar: Modules, Imports, Runes, Expressions; Core language: Programs and linking)
94**Names and modules** (Grammar: Modules, Imports, Runes, Expressions; Core language: Programs and linking)
95- "No name may shadow one already in scope, imports and the prelude included": samples, local `++`s and pattern binders too. The backends rely on it (Core language, "No shadowing").
95- "No name may shadow one already in scope, imports and the prelude included": samples, local `++`s and pattern binders too. The backends rely on it (Core language, "No shadowing").
96−- Molds and values have separate namespaces, "told apart by position": `todo-action.todo` is a mold and `poke.todo` is its derived command helper.
96+- Molds and values have separate namespaces, "told apart by position": `todo-action.todo` is a mold and its constructor.
97- Local definitions may start any body, "visible to each other and the final expression".
97- Local definitions may start any body, "visible to each other and the final expression".
98- `/- todo` gives the molds of `/sur/todo.hoon` the module uses; `/% %todo-action` gives a mark's type, named after the mark, with no face; `/= card /ui/components/card` gives a Jibb module. API modules re-export their `/%` types, "not `/-` faces or `/=` modules". Import cycles are errors.
98- `/- todo` gives the molds of `/sur/todo.hoon` the module uses; `/% %todo-action` gives a mark's type, named after the mark, with no face; `/= card /ui/components/card` gives a Jibb module. API modules re-export their `/%` types, "not `/-` faces or `/=` modules". Import cycles are errors.
99- Imports and prelude groups are records, read with `.`: `card.card`, `space.theme.theme`, `get.by`. "A module used as a whole value is a cell of its definitions, in name order."
99- Imports and prelude groups are records, read with `.`: `card.card`, `space.theme.theme`, `get.by`. "A module used as a whole value is a cell of its definitions, in name order."
@@ -110,8 +110,8 @@ The rules are scattered across the tabs. This is a map of them, not a replacemen
110
110
111**API files, stores and derived gates** (overview: Agent APIs, Effects; Grammar: Modules)
111**API files, stores and derived gates** (overview: Agent APIs, Effects; Grammar: Modules)
112- `/ui/api/<agent>.jibb` declares `+$ poke` and `+$ paths`; "`poke` and `paths` are declarations, not molds." "A path case is a request name, a path and a type", and "A case can name another scry path, as in `[%changes /updates (facts todos todo-update) scry=/todos]`, used only by pages." An island may watch a request only when the checker proves it is watchable; a separate `scry=` path or unknown watchability is a type error.
112- `/ui/api/<agent>.jibb` declares `+$ poke` and `+$ paths`; "`poke` and `paths` are declarations, not molds." "A path case is a request name, a path and a type", and "A case can name another scry path, as in `[%changes /updates (facts todos todo-update) scry=/todos]`, used only by pages." An island may watch a request only when the checker proves it is watchable; a separate `scry=` path or unknown watchability is a type error.
113−- Each API gives a generic `poke` command helper taking an action and reply, and each path case a request, as `(todos.todo |=%got)`. A path with typed segments takes them too: the overview's `(post.api slug same)` suggests they come first. A `(facts full diff …)` case's request also takes a fold, as `$-([[%todo-update todo-update] todos] todos)`.
113+- Each poke type gives a constructor, as `todo-action.todo`, and each path case a request, as `(todos.todo |=%got)`. A path with typed segments takes them too: the overview's `(post.api slug same)` suggests they come first. A `(facts full diff …)` case's request also takes a fold, as `$-([[%todo-update todo-update] todos] todos)`.
114−- A store's local `+$ poke` is an ordinary action mold. A store exports a generic `poke` command helper and a `state` request. Clashing derived names are errors, including clashes with an import face. The checker must account for the fact that the type of `main` determines whether a module is a store.
114+- A store's `+$ poke` is a declaration, not a mold. A store exports a constructor per poke type and a `state` request. Clashing derived names are errors, including clashes with an import face. The checker must account for the fact that the type of `main` determines whether a module is a store.
115
115
116**The prelude** (overview: Prelude, Layout and styling, Links and URLs, Effects)
116**The prelude** (overview: Prelude, Layout and styling, Links and URLs, Effects)
117- Hoon's standard library regrouped, "written in Jibb and vendored as `/lib/jibb/prelude`", plus `eq`, `not`, `page`, `program`, `store`, `pure`, `island`, the layout elements and molds, `attr`, `theme`, and `cmd` and `sub` as the overview's Effects block writes them.
117- Hoon's standard library regrouped, "written in Jibb and vendored as `/lib/jibb/prelude`", plus `eq`, `not`, `page`, `program`, `store`, `pure`, `island`, the layout elements and molds, `attr`, `theme`, and `cmd` and `sub` as the overview's Effects block writes them.
docs/prompts/repo-review-finish.mddeleted−149
@@ -1,149 +0,0 @@
1−# Finishing the 2026-11-02 repository review
2−
3−A brief for the developer who finishes what the [2026-11-02 repository review](../reviews/2026-11-02-repo-review.md) started. Paste it as the first message of a session, or hand it to a person; it assumes the repo `iko-soy/jibb`. Written 2026-11-03, at commit `e208bcb`, by the thread that fixed the review's findings, from a check of every question and finding against `master` that day.
4−
5−---
6−
7−You are finishing the follow-up to a review of the whole Jibb repository. Jibb is a UI language for Urbit, a Hoon dialect with an indentation layout; its compiler is a Hoon library, `jibb-dev/lib/jibb.hoon`, with a Hoon type importer in `jibb-dev/lib/jibb-import.hoon`. The review, at commit `4bf477e`, found 137 problems (A1 to A137) and raised 45 questions, which Montelot, the project's owner, answered: each answer is marked *(chosen)* in [the questions](../reviews/2026-11-02-questions.md). Most answers have landed. What is left is small fixes, simplifications and docs that no other brief covers, twelve language rulings and one more question (A62) that wait for @iko, and the review's advice for the checker core, which milestone-2-finish.md builds.
8−
9−Three briefs share the remaining work. Don't do one brief's work under another:
10−
11−- **[milestone-2-finish.md](milestone-2-finish.md)** owns the general checker core (review question 5), the diagnostics the full checker still drops (its step 1), the usefulness check for `?-`, one types pipeline (question 6), kinds, APIs, the import table, tests and speed. Its import table step lists two known gaps from this review, A14 and A50; they are fixed here, in step 1 and under question 26.
12−- **[syntax-review-follow-up.md](syntax-review-follow-up.md)** owns the syntax changes S1 to S15, including `unface` and the gaps in S2, S4 to S7.
13−- **This brief** owns the rest of the repository review: the open findings below, the rulings for @iko, and the review's input to the core.
14−
15−## What landed
16−
17−| Questions | What | Commits |
18−| --- | --- | --- |
19−| 1 to 4 | The review on `master`, fixes as commits straight to `master`, a fake ship in cloud containers | `c7cd17d`, `f583172` |
20−| 7 to 15 and the eight "fix first" bugs | Ordinary inference before recovery, the narrow initializer recovery deleted, imported `(unit T)` as the prelude's unit, `ask` and `qath` printed without `.internal`, one branch-join rule, dependency-order resolution, kept diagnostics, no 26-variable gate, a fresh-ID high-water mark, lexer, `tools/ship` and `tools/golden` fixes | `a211c34`, `38c711c` and `ec7c6d4` (@iko), `93d6b23`, `839f6b0`, `f0411ad`, `ce69a3b`, `447a592`, `2b9666c`, `96d1784`, `c0a0b85`, `941c486`, `452f64c`, `68d9b76` |
21−| 25 | `eq` and the gate-free constraint | `0858191` (@iko) |
22−| 29 to 35 | `tools/test-arms` instead of 52 scripts, `tools/check`, `my-app` read on the test desk, the generated `tests/lib/jibb.hoon` no longer committed, importer fixtures in their suite, a `jibb-fixtures` desk, span and Hoon-reference checks as test arms | `d74b5e2`, `0a86d7c`, `8125287`, `ba67080`, `933bc83`, `d43c99b`, `32f4b78` |
23−| 30 (CI) | A GitHub Actions job ran the eval checks; Montelot had it removed on 2026-11-03. There is no CI; don't add one back without asking | `84b8527`, `f84a29e` |
24−| 36, 37, 39, 43 | Decided to keep things as they are | `bf65f8f` |
25−| 40 to 42, 44, 45 | `tools/hoon --no-debug`, `status.md` as a capability table, the repository spec wins until synced, `open-questions.md` only open questions, the MIT licence | `cdf53c8`, `e97aebe`, `7bc7d54`, `116178b` |
26−
27−## Read first
28−
29−1. [The review](../reviews/2026-11-02-repo-review.md): its summary, and the appendix rows for the findings below. Its line numbers are pinned to `4bf477e` and have drifted; find code by arm name.
30−2. [The questions](../reviews/2026-11-02-questions.md), and in [open-questions.md](../open-questions.md) the section "Review rulings waiting for @iko".
31−3. The two other briefs, so you know what they own.
32−4. [The checker map](../reviews/2026-11-03-checker-map.md), before you touch the type checker: what each family of arms does, which tests pin it, the 22 recovery slices, the five copies of definition finalization, and 22 hazards for anyone changing the checker.
33−5. [development.md](../development.md): setting up (`nix develop`), the tools, the test suites, and the checks to run before pushing (`tools/check`, or `nix flake check`).
34−6. `git log origin/master`. @iko and other threads work in `jibb.hoon` in parallel; rebase often.
35−
36−Then run `tools/check`. Every check should pass before you change anything.
37−
38−## Ground rules
39−
40−- **Push straight to `master`**, rebased on `origin/master`, in commits that each leave every check passing, the ship group included. Never force-push. Before a change to `tools/ship`, the desks or the `%jibb` mark, run the ship checks on a fake ship.
41−- **Every fix is a golden case or a test arm.** A finding that changes behaviour gets a case that fails before the fix.
42−- **Don't decide the language.** Questions 16 to 24 and 26 to 28 are Montelot's proposals, and each waits for @iko to confirm it before it goes in `decisions.md` and the code changes. Ask @iko in the project chat; don't build them on the proposal alone.
43−- **Don't patch what the core replaces.** The findings listed at the end of step 6 are fixed by building the core, not by repairing the old code. Before you change `+itype-unify`, `+itype-fit`, branch joins, `?-` coverage, the program, page and store recovery, or the `dg-*` transaction, ask in the project chat who is building the core and what has landed.
44−- **Keep docs current.** `status.md` is a table of capabilities: change the row a fix affects, don't add history. `compiler.md` follows the code.
45−
46−## Step 1: fixes that don't wait for anything
47−
48−A19 and the inhabitation half of A13 touch `+itype-fit-inner` and `+itype-inhabited-proof`, which the core replaces, so follow the ground rule: ask in the project chat first, and leave them to the core if it has replaced that code. A13's `+gate-free-type` half and A14's bridge are code the core keeps (the checker map, 4.2), so they don't wait.
49−
50−Checker and importer:
51−
52−- **A19.** `+width-scan` counts each faced entry on a spine, so a flat faced tuple has more entries than a record whose last field is a faced nested record. The flat tuple is then refused, as unknown by the `too-wide` guard in `+itype-fit-inner`, and as "record width constraint needs unsupported inference" by `+width-shape` in the cast and call checks. When the target's last field is a faced cell, match the source against it structurally instead of by count, and check the `lth` guards in `+width-proj-shape` and `+width-infer-literal` with the same case.
53−- **A13.** `+itype-inhabited-proof` and `+gate-free-type` know only the list and unit collections. Treat set, map, qeu, mop, jar and jug as inhabited by `~`, and check gate-freedom over all their arguments. Add a union match on a case that holds an imported map.
54−- **A14.** One whitelist of auras, `?(%u %ud %ux %uv %t %ta %tas %p %da %dr)`, is copied in `+rec-pattern`, `+import-to-itype-standard` and the API parameter check, and rejects bare `@` and other unsigned auras. Write one predicate for `@` and every unsigned, non-float aura and use it at all three; teach `+rec-pattern` `*` and `?` fields. Add bridge cases. Milestone-2-finish step 7 lists this gap for its import test; fix it here, and that test then covers it.
55−- **A56.** The importer's `+overlap-source-witness` proves a definite overlap only for a top-level `$?` of tagged cells. Accept `$%` bodies and `?(...)` leaves, so duplicate `$%` tags and `?(%a %a)` give the definite overlap, with cases in `tests/importer/tree.txt`.
56−- **A43.** Without a prelude the partial report says a bare "module has a reserved proj or unface name", with no "partial inference; module not checked" header, while the prepared path says "module has conflicting names". Give both paths one message under the header: the prepared path's, or, if milestone-2-finish step 1 has given `proj` its own wording by then, that wording. `inline-unface-reserved-no-prelude` already covers the no-prelude branch for a mold named `unface`; add a case for `++ proj 1`, and update that case's output.
57−- **A22.** The comment on the noun fit says a bare tag is "fixed as a constant", but the code binds it to the expected type. Fix the comment.
58−
59−Lexer and parser:
60−
61−- **A4.** `+read-string` calls `+doomed` for "the `}` of an interpolation", a case that never happens. Delete the call, fall through to `+bad`, and drop the clause from the notes and `+doomed`'s comment.
62−- **A5.** In the lexer's glyph dispatch, the second-character messages ("`|` begins `|=`…", "`^` begins `^-`") win over the 2.2 character errors, so a tab or control character after a glyph gets the wrong message, and only some left-out runes get the doc's reason. Run `+bad-char` first and give every left-out rune of the doc's kinds its reason. The syntax review's S9 (undecided) would rewrite nearby messages; keep to the review's fix.
63−- **A3, what is left.** About a dozen lexer hints have no golden case, among them "this `}` closes no `{`", "`|` begins …", "`^` begins `^-`", a comment inside `{…}`, interpolation outside a string, a wing's `.`, the `@u` and `@t` literal errors, the date bounds, "Jibb writes no such literal" and "Jibb can't read this literal". Several parser hints have none either, as "`+` begins `++` or `+$`", "patterns take no units: write [~ x]", "`?` alone is the loobean mold" and "the wide gate's body is one operand". Add a `lex-*-bad-*` case for each lexical one and an `inline-*` case for each parser one.
64−
65−## Step 2: tools and tests
66−
67−- **A68.** `tools/golden` splices `jibb-import.hoon` into the "(harness)" segment, so its compile errors and crash frames are blamed on the harness. Add the reader as its own segment, so spots map to `jibb-import.hoon` lines.
68−- **A69.** `tools/ship test`, `sync` and `gen-tests` accept a `--golden` folder that doesn't exist and pass with no tests. Fail when the folder is missing or a named folder has no cases, as `tools/golden` does.
69−- **A70, A84.** `tools/testdata/ship-selftest` hard-codes 45 `tests/lib` names, which miss 14 of the 58 suites, and dozens of fixture names in the checks after them. Replace them with one check: every file under `tests/` except `golden/` and `clay-fixtures/desk/` is in `assemble('jibb-dev')`, and so is the generated `tests/lib/jibb.hoon`. Keep the `--lib` and `--golden` isolation checks. That list is the last place a new suite must be registered by hand, so this also closes A84.
70−- **A74.** An `about.txt` that isn't UTF-8 crashes `tools/golden` and `tools/ship gen-tests` with a traceback, because `wants_types` in `tools/golden_case.py` is called outside the `except ValueError` handlers. Have it raise a `ValueError` that names the file, as `source_path` does, and move its calls inside the handlers: in `Case.__init__` in `tools/golden`, and in `generate_tests`' per-case loop and types-helper test in `tools/ship`. Both then exit 2 with a report.
71−- **A75.** `tools/golden` fills the harness's `{…}` placeholders after splicing in the cases' sources, the reader and the preludes, so any of them that contains a placeholder is rewritten. Substitute every placeholder in one pass.
72−- **A76.** The ship's plain `+check-types` isn't under `mule`, unlike `+check-import-types` and its other siblings, so a crash in it shows only as CRASHED, without the case's tokens and tree results or the label its siblings give. Wrap it. The eval and ship runners also keep separate copies of their Hoon helpers and their walk over a case's metadata; share them.
73−- **A72, A77, A73, A79.** Smaller tool copies: `tools/golden` renders the two preludes twice and repeats its read-to-`rap` code three times; `tools/ship` keeps its own `KNOT`/`TERM`, noun decoding and cord escaping beside `golden_case.py`, `noun.py` and `urbit_eval.py`; `delete_batches` keeps an empty-list case only a selftest uses; `tools/ship`'s `find_urbit` ignores `$URBIT`.
74−- **A71.** `check_fixture_crash_isolated` in `tools/testdata/selftest` runs the real compiler and pins checker output, though the file says the selftest runs against the stub. Give it a stub fixture, or say so.
75−- **Test-only code in the shipped library (A93, A127).** Move `+itype-unify-test` and `+check-spans-test` from `jibb.hoon` into the `jibb-typecheck` and `jibb-check-spans` suites, and have `test-unification` return the unifier's failures as its tang, so the one-line `tests/checker/unification.txt` can go (A85).
76−- **A86.** 38 suites repeat a lines-to-cord helper. Put one in a shared test library bound with `/+`.
77−- **A87, A88.** `development.md`'s golden naming table lists only `lex-`, `inline-` and `doc-`; add `types-`, `module-`, `prelude-`, `parser-` and `fixture-`, fix the ten `about.txt` files that lack a required line, and have `tools/golden` or the selftest reject them. Say in the suites section which `tests/type-*` folder belongs to which suite, or rename the folders after their suites.
78−- **A89.** The importer's fixtures are bound one by one in `tests/lib/jibb-import.hoon`; bind them as one list and derive the report and the missing-file checks from it. `tools/clay-fixtures` prints hand-written counts, "7 passed" and "4 projections passed"; compute them from the expected files.
79−- **A90, A102.** Nothing tests the claims that 100,000 nested brackets and a 20,000-line module parse. Add a suite or selftest step that generates them; milestone-2-finish step 9 then records the timings. Then re-measure design note 3's figures with `tools/hoon --no-debug` and say which mode they use: its "8 s" for starting urbit and building the library is now about 27 s.
80−- **A114.** The Clay fixture `tests/clay-fixtures/desk/sur/import-fixture.hoon` writes `$^(@ud [a=@ud b=@t])`, which accepts only atom-headed cells. Write the intended `$@(@ud [a=@ud b=@t])` and update the `ford-nested-union` expected files.
81−- **A111, A117.** `tools/ship`'s `DESKS` skips a `jibb-dev/tests` folder that doesn't exist, for `my-app` and `jibb-fixtures`; drop the skip and the README's "without tests/", and make the README's desk table match `DESKS`: add the `jibb-fixtures` row, and on `jibb-dev` name `my-app` under `/my-app` and the skipped `tests/clay-fixtures/desk`. Make `tools/ship assemble` fail when `my-app/sys.kelvin` and `jibb/sys.kelvin` differ.
82−- **A118.** `vendor/SOURCES.txt` records the machine-local path `/root/src/urbit` it was copied from, and credits the docket files to urbit/urbit's legacy `pkg/landscape`. Drop the local path, and say where the docket files are maintained now.
83−- **A110.** The Clay fixtures build `my-app`'s marks only as Hoon cores. Add a `%cb` build and a `vale` of one sample noun for each, with milestone-2-finish step 8's `my-app` ship check if that lands first.
84−
85−## Step 3: simplifications in code the core keeps
86−
87−Most are in the parser, the importer, and the module and API code, which the core keeps. A few are dead lines in checker arms that the core replaces, as the fuel of `+itype-closed-sample-match` and the last unify of `+itype-closed-gates-match`; deleting them changes nothing, so they don't wait for the core. Each must leave every golden output unchanged.
88−
89−- **Dead code (A26, A31, A42, A44, A130, A18, part of A45).** Delete `+width-has-projections`, `+infer-width-elaboration` and its type `+$ iwidth-elaboration`, `+direct-find-gate`, `+resolve-supported-defs`, the newly dead `+import-to-itypes`, `+one-request-interface-source` and `+golden-types-with-modules` (and its sentence in `compiler.md`), and the orphan comments above unrelated arms. Drop the narrow API branch, `+one-request-interface-graph`, so every API with `+$ paths` goes through `+multi-request-interface-graph`, after checking that `blog.jibb`'s interface and the `type-api` outputs don't change. Remove the never-decremented fuel of `+itype-closed-sample-match`, the always-true unify at the end of `+itype-closed-gates-match`, `+width-scan`'s unused `sub`, and two dead lines in `+find-imported-mold-prelude`. Of A45, fix only what is outside the recovery and `dg-*` arms: the double negation and the `?~ index` branch in the module driver, and the fake `ifile`s in the store code.
90−- **The `?(` check (A7).** `+hoon-union` walks back over tokens at twelve call sites to report a tight `?(`. Have the lexer's `?` branch report it, with the same column and message, and delete `+hoon-union`.
91−- **Names that shadow the standard library (A8).** Rename `+in`, move the `+fail*` helpers into `+parser` so `file` is in scope, and delete the `file` forwarders and the sixteen `in:..zuse` workarounds. Then drop the Code conventions bullet in `development.md` that says `+in` and `+fail` shadow the standard library, and move the `+fail*` helpers from the `%parser-helpers` row of `compiler.md`'s chapter table to the `%parser` row.
92−- **Copies in the parser (A9).** The path-segment loops of `+read-pathlit`, `+read-qath` and `+read-pathmold`, the open-mold-line loops, and the item and line name branches are near copies. Merge them where the result is clearly simpler; the review found some merges are not.
93−- **`%gate` and `%gate-wide` (A34, A123).** The two nodes carry the same fields, and 39 lines in the checker chapters test both or repeat an identical body for each (A34). Make one `%gate` node with a `wide=?` flag that only the printers read. That merges the checker's copies too and changes note 3's tree forms, but no golden output. Ask first if the core is being built; if its builder wants the old node kept for now, use `?(%gate %gate-wide)` in the parser, the printers and the syntax walkers only, and leave A34 to the core.
94−- **Syntax walkers (A32, A129).** The `scope-*`, `dependency-*`, `duplicate-*`, `*-has-hole` and reserved-name walker families each repeat the per-node dispatch. Add one enumeration of an expression's children and a fold, and rewrite these families on it. The type walkers (A21, A35) wait for the core.
95−- **API and module copies (A27, A29, A31).** `+request-graph-merge` should reuse `+request-graph-inputs-match` and `+request-graph-bounded`, drop its fuel arguments, and make the bound agree with its comment. `+prepare-prelude` and `+prepare-prelude-with-internal`, and `+module-mold-types` and its `-detail` form, should each share one core. `+api-path-evidence-source` and `+api-support-analysis-source` should call their `-graph` forms.
96−- **Importer copies (A57, A58, A59).** A provenance-error helper for the repeated preamble, `+local-arm-source` in `+tagged-union-fallback`, one list of standard collections, one unwrap gate parameterised by the wrapper's tag, one case lister for `$%` and `$?` with the budget as a parameter. A59, a reader that walks once for both the plain and diagnostic results, is low priority.
97−- **Budgets (A124).** The checker's literal budgets (256, 64, 4,096 and others) are scattered. Name the ones in code the core keeps in one arm; the `dg-*` ones go with the core.
98−
99−## Step 4: docs
100−
101−- **The library's header and `compiler.md` (A2, A60, A101, A131).** `jibb.hoon`'s first line says milestone 1, and its API list lacks `infer-jibb-file`, `infer-jibb-file-detailed` and the `golden-types-with-*` entry points. Its API list also lacks `+layout-error`, `+golden-types-imports`, `+prepare-prelude` and `+prepare-prelude-with-internal`, which hosts and `tools/golden` call. Add them all, make `compiler.md`'s API table list the same arms, fix its `%api` row, and add `%union-analysis` to its chapter table with an accurate `%type-inference` row; that chapter also holds the module checker, the API code and the recovery, so say so or split it. The header also still says the doc wins, where question 42 made the copy in `docs/spec/` win, and its Status paragraph calls the checker a partial inference fragment; fix both, as `development.md` words the first, and fix `compiler.md`'s first paragraph, which says "as milestone 1 left it". Milestone-2-finish step 10 rewrites these again for the core; this fix is for the code as it is now.
102−- **Design notes 2.6, 3 and 4.2 (A2).** They don't mention the `_` type hole (its token, where a mold may be `_`, its tree form) or the `?(` hint ("a union is a `+$` with its cases below"). Add them, writing the hint where A7 leaves the check: once the lexer reports it, in note 2.6's table of left-out forms, beside `$?` and `$%`.
103−- **The recovery chain (A41).** Neither `compiler.md` nor `status.md` mentions the plain-view recovery, `+program-plain-view-context`, which runs only when the keyed-view proof declines. Add it to `compiler.md`'s recovery paragraph and to `status.md`'s component-local recovery row, or leave it if the core has deleted it by then.
104−- **The importer's header (A53).** It opens with `+read-mold`, which only tests use; the callers use `+read-named` and `+read-mark` and their `-diagnostic` forms. Rewrite the header's API paragraph around them, and fix the two `jibb.hoon` comments that name `+read-mold`.
105−- **The prelude docs (A54, A105, A63, A99).** `prelude-inventory.md` lists the nine 3g shapes as future work though all exist, and its 2a rows contradict the paragraph above them. `decisions.md`'s Core language row still says three rules in its tab are proposed, but `core-language.md` marks none, and the review found each decided in its own row; drop the clause and set the row's Synced column to No, and ask @iko only about a rule that has no decided row. `internal.jibb` should say in a comment that the compiler adds the public prelude's validated list and unit to `core`, to avoid an import cycle, and `tuba-text` should take `values=(list @tD)`.
106−- **Question 38 (A112).** Montelot chose to keep `my-app`'s deliberately failing buttons example and the theme's static font, and to list them as a milestone 4 question. Add it to `open-questions.md` under "Questions milestone 2 raises", or in the plan's table with "review question 38" in the row, so the table doesn't credit the plan with it.
107−- **A106.** A paragraph about the tools sits under `development.md`'s ground rules, and `docs/README.md` carries status prose. Move the first into "The test suites". Delete the second, after adding to a `status.md` row anything it says that no row does.
108−- **A103, what is left.** `open-questions.md` still lists grammar questions 4 and 11, which the syntax review settled (S6, S7). `decisions.md`'s Syntax and Type variables rows already record the answers, so delete the two rows, keep the other rows' numbers, and update the page's "as of" date.
109−- **A115, A116.** `my-app/mar/todo-action.hoon` says it is "not supplied by the design doc", but it is the overview's `todo-action` block; fix the line. Say in the README's desk table that `my-app`'s `desk.bill` is `~` until fixture agents arrive. List the missing `%todo` and `%blog` fixture agents, and a page that embeds the basket, as gaps in `status.md` for milestones 5 and 6, and ask @iko before adding them to `implementation-plan.md`, which is @iko's tab.
110−
111−## Step 5: the rulings, when @iko confirms them
112−
113−Ask @iko about each in the project chat, with the proposal from `open-questions.md`. When one is confirmed, record it in `decisions.md`, move it out of `open-questions.md`, then change the code with golden cases. Until then, change nothing.
114−
115−| Question | Proposal | Then |
116−| --- | --- | --- |
117−| 16, 17 (A20) | A term literal fits its own aura family, `%1.000` a `@ud` and `%&` a `?`; a name term also fits `@t` | Change the two term-literal branches of `+itype-fit-inner`, the `%atom` row of `+tag-presence`, and the sentence in `grammar.md`'s Tag resolution that lists `@tas`, `@ta`, `@` and `*`; the syntax review's S4 already did this for bare decimals |
118−| 18 (A23) | A gate may fit `*` | No code change; say in `core-language.md` that `*` may hold gates |
119−| 19 (A6, A100) | `[]` and `m()` are rejected in the parser, at the closer | Parser errors at the closer, with golden cases; make the EBNF's `tuple` rule take at least one item; delete the three "empty cell is not supported by partial inference" strings, and the checker's "a change takes at least one field" once the parser reports `m()` |
120−| 20 (A30) | `[a=@ud [a=@t b=?]]` is one record, so the duplicate `a` is an error | `+duplicate-fields` carries seen fields through unfaced tails; fix the comment above `+$ written-fields` in `jibb.hoon`, which says each written record has its own scope |
121−| 21 (A25) | `/% %foo` and `++ foo 1` may share a name | `+module-scope-valid` checks marks only against marks and molds, as the API scope check has done since `ce69a3b`; add golden cases for `/% %foo` beside `++ foo 1` and beside a prelude value in an ordinary module. Tell @iko that API modules already allow it |
122−| 22 (A15) | A `?-` arm that matches no remaining case is a definite error, "arm matches no case" | The core's usefulness check gives it; until then it reads "union pattern is not supported" |
123−| 23 (A55), 24 (A64), 27 (A61) | Match Hoon: no comparator in `(mop K V)`; keep both `each`s; the mark keeps dropping the final newline | No code change; record each in `decisions.md` |
124−| 26 (A50) | The importer reads `$%` with `%&`, `%\|` and `%0` tags, then `each` and `json` | `jibb-import.hoon`'s tag checks, then catalogue entries, with importer fixtures |
125−| 28 (A136) | The printer flattens `[a [b c]]` and prints named molds by name | `+show-itype`, and the missing-tag message, which lists an imported union's cases (`union %no %yes has no case %other` in `types-missing-tag-imported`) instead of naming it, `choice.fixture`; many `types.txt` change, so do it with or after the core's one pipeline |
126−
127−One more was never asked: **A62**, whether the prelude's `+$ attr` should spell `pad` and `gap` with a `+$ space %s0 %s1 %s2 %s3` instead of eight constant cases. It adds a public prelude name, which is @iko's call. Ask with the others.
128−
129−Milestone-2-finish step 7 lists the same import gaps (A50, and A14 from step 1). Build A50 here once @iko confirms question 26, and say in the project chat when it lands, so that brief's builder doesn't build it again.
130−
131−## Step 6: the checker core
132−
133−[milestone-2-finish.md](milestone-2-finish.md), steps 2 to 4, describes the core and owns it. Whoever builds it should start from [the checker map](../reviews/2026-11-03-checker-map.md). The review's own advice for staging it:
134−
135−- Give `istate` a constructor first (A28, A125): it has 27 positional fields, built as literals at 10 places in `jibb.hoon`, so every field the core adds touches all of them. The 13 suites that use it bunt `*istate:jibb` and set fields by name, so they don't need to change.
136−- The partial report re-infers each definition on its own, so a new core can sit behind the report one definition at a time, before the full check changes (map, section 4.4).
137−- The program, page and store recovery arms run only for definitions still missing after ordinary resolution, so when the core resolves one ordinarily, its recovery arm stops firing and can be deleted with its tests kept.
138−- Keep `+itype-fit`'s three answers while old callers remain: `%unknown` should still mean "would need a deferred constraint".
139−- Budget the golden changes: question 6 moves every `types.txt` once, 347 on `master` today (283 when the review counted). Do that in one commit, with every changed output read.
140−
141−These findings close when the core lands, and nobody should patch them before: A11 (same-origin unions compared by their raw cases), A15 with question 22, A16 (variable kinds kept by self-bindings in six copied `+itype-walk` arms), A17 (three union-coverage loops), A21 and A35 (the type walkers and variable-kind disjunctions), A33 (`+infer-recursive-gate` retried after every failure), A36 (the call-argument copies in the check-mode dispatcher), A46 (the report's own resolver), A47 (the `dg-*` transaction), A48 (the program recovery arms), A49 (the generic tree proof), A132 (the prelude parsed again for each direct gate-layout proof), the rest of A42 and A130 (the report's entry chain, which parses and duplicate-checks the source again in `+golden-types-in-context` and repeats its eligibility guards, and the ten `+golden-types*` wrappers, which the one pipeline should reduce to the entry points hosts need), the rest of A45, and A121 and A122, the review's direction items on example-fitted slices and two pipelines.
142−
143−## When you're done
144−
145−- Every finding in steps 1 to 4 is fixed, each with its case, or written up in `open-questions.md` with the reason it was left.
146−- Every ruling @iko has confirmed is in `decisions.md` and built; the rest are still listed as waiting.
147−- Every check passes, under eval and on the ship.
148−- `status.md`, `compiler.md` and `open-questions.md` describe the code as it is.
149−- Everything is pushed to `master`, and a few lines go to Montelot in the project chat: what landed, what was left and why, and what waits on @iko or the core.
docs/prompts/syntax-review-follow-up.mddeleted−80
@@ -1,80 +0,0 @@
1−# Finish the 2026-11-02 syntax review's changes
2−
3−A brief for the developer who finishes what the [2026-11-02 syntax review](../reviews/2026-11-02-syntax-review.md) started. Paste it as the first message of a session, or hand it to a person; it assumes a fresh start in the repo `iko-soy/jibb`. Written 2026-11-03, when S1, S2, S4 to S7, S11 to S13 and S15 landed on `master`.
4−
5−---
6−
7−You are finishing a set of syntax changes to Jibb, a UI language for Urbit: a Hoon dialect with an indentation layout. Its spec is in `docs/spec/`; the parser, checker and printer are `jibb-dev/lib/jibb.hoon`; the prelude is `jibb-dev/lib/jibb/prelude.jibb`. On 2026-11-03 Montelot decided ten of the review's fifteen proposals, and they were built the same day, each on its own branch with its own golden cases, then merged. What is left is the gaps those builds reported, four adversarial reviews that didn't finish, and work that waits on the new checker core.
8−
9−## What landed
10−
11−Each proposal is a section of the review, numbered S1 to S15, and a row of `docs/spec/decisions.md` dated 2026-11-03.
12−
13−| # | What it does now | Where to look |
14−| --- | --- | --- |
15−| S1 | `(unface e)` removes every face from `e`'s type, through cells, a gate's sample and product, containers' arguments and the unit's payload; unions and recursive molds go by name and are kept whole. It is reserved with `proj`, is not a value, and `++ f (unface \|= …)` is still a gate | grammar.md "Unface", `+itype-unface`, `+reserved-name`, `inline-unface-*` |
16−| S1 step 1 | Decided, not built: a capital that meets a faced position binds only the type under the face | decisions.md Inference row, `inline-unface-labelled-slot` |
17−| S2 | A body's final line hands the lines after it at its depth to a tall `\|=`, `^-` or `~&` that ends it; a `?-` that begins a body's final line may take its arms at its own depth | grammar.md "The rest of a body", `lex-body-rest-*` |
18−| S4 | A bare decimal is a `@ud`: it fits `@u`, `@` and `*`, and no other aura, unless its `++` is generic over its aura | grammar.md Literals, `inline-decimal-*` |
19−| S5 | A bare pattern name is an error where a case the pattern can match has a tag there that the name spells | grammar.md Patterns, `inline-pattern-tag-name-*` |
20−| S6 | A change's item may name a wing through record fields, `m(open.cart=x)`; overlapping items are an error | grammar.md Expressions, `inline-change-wing`, `types-change-*` |
21−| S7 | Type variables may be words, `Msg`, `T2`, and print by their written names; `program` is `\|$ [Data Model Msg]` | grammar.md Type variables and Printed types, `lex-typevar-*`, `types-typevar-*` |
22−| S11, S12, S15 | Spec wording for deeper lines and nested patterns; the examples build their models with faced cells | grammar.md Lexical rules and Patterns |
23−| S13 | A cast whose expression takes the deeper lines ends its owner line; the prelude, my-app and the spec's examples use the canonical layout, with flat `?-` arms | grammar.md Spacing, prelude.jibb |
24−
25−## Read first
26−
27−1. `docs/README.md` and `docs/development.md`: the ground rules, the checks, and how golden cases work.
28−2. The review's sections for S1, S2, S4, S5, S6, S7 and S12, and decisions.md's rows dated 2026-11-03.
29−3. `docs/status.md`, the rows that name S1 to S7: each says what is partial.
30−
31−Then run `tools/check`. Everything should pass before you change anything.
32−
33−## Ground rules
34−
35−- **The spec wins**, and a language question is Montelot's to decide, as the 2026-11-03 rows were. Where this brief would decide more of the language, it says so, and you ask instead.
36−- **Another thread is building the checker core** that review question 5 asks for: union-find with levels, deferred constraints and a usefulness check for `?-`. It will replace `+itype-unify`, branch joins, `?-` exhaustiveness and pattern binding. Don't patch those for S1 step 1 or face joins; that thread owns them. Ask in the project chat what has landed before you touch the checker.
37−- **Every change is a golden case or a test arm**, and every check passes, the ship group included (`nix flake check` runs it on a fresh fake ship, or see `docs/development.md`).
38−- **Push straight to `master`**, rebased, in commits that each leave every check passing.
39−- **Keep docs current**: the status.md row for each capability, decisions.md when something is settled.
40−
41−## Step 1: finish the adversarial reviews
42−
43−The reviews of S2, S4, S6 and S7 didn't finish before the merge. For each, try to break it: probe edge cases the golden cases don't cover, check that the spec says exactly what the code does, and check every golden output the change touched. Fix what you find, with a golden case for each fix. The probe recipe is at the end of the review.
44−
45−Known already:
46−
47−- **S2.** A body of 40,000 same-depth `~& x` lines runs out of memory under eval, where 40,000 nested parentheses don't: each rest is a level of recursion in the parser. Make the rest loop iterative, if that stays small. Some new ok cases have no `types.txt` because the partial checker can't type them (`lex-body-rest-ok-3`, `-5` and `-6`).
48−- **S4.** Number patterns are checked against the subject only on known-union and atom subjects. The unit, list, loobean, single-case and deferred `?-` paths don't check them, so `[~ 0]` against a `(unit @dr)` falls through to older messages. A constructor applied directly, `(|=%wait 30)`, and a call whose head is still a variable keep the generic "call's sample and argument types do not unify".
49−- **S6.** A wing through a union field's site note reads just "field `data`", with no type. The inference-level "repeated change fields" check is now unreachable from the module entry points, because the duplicate pass reports overlaps first; keep it as a safety net or remove it.
50−- **S7.** A few messages still say "capital", as "use the same capital for a shared type". Names live in the bits of a variable's ID (`+named-var`, `+var-name`), so any test that compares a prelude scheme's IDs exactly must use the named IDs.
51−
52−## Step 2: close S1's and S5's gaps
53−
54−- `unface` on an argument whose type isn't known yet, as `|= f (unface f)` or `|=(g (unface g))` passed where the call fixes `g`, says "not supported by partial inference". The spec says it waits, as wing access does. Make it wait when the deferred path can, and fail closed otherwise. The check also looks only at the top of the type: a faced variable passes and a bare one is refused.
55−- Islands, pages and stores that find `init`, `update`, `load` or `view` by a literal `|=` (around the program, page and store recognisers) don't see through `unface`. `++ update (unface |= …)` should be a gate there, as it is for recursion (`+unfaced-gate`).
56−- Golden cases for `unface` over a set, a map and a jug, which the code handles but no case shows. `inline-unface-unknown`'s about.txt cites the wrong spec sentence. `(unface)` gets a different error in a `++` body and as a call argument; make it one.
57−- S5's exemption for a union's generic arguments works by type equality, so a concretely typed position whose type happens to equal an argument is skipped. Make it follow where the mold puts the type variable. The full module check reports an S5 error only as "module definitions need unsupported inference"; give it the partial report's message and sites.
58−
59−## Step 3: after the checker core lands
60−
61−These wait on the core from review question 5. Coordinate with that thread first.
62−
63−1. **S1 step 1** is the core's job, with a golden case each for `(hunt lt-a `1 `2)`, `(roll ~[1 2] 0 add-f)` and `[A A]` against `[x=@ y=@]`. The same thread makes joins keep a face once a position has taken one, so `~[lt-u lt-a lt-c]` and `~[lt-a lt-u lt-c]` are errors alike (today the first checks and the second doesn't). Update `inline-unface-labelled-slot` and `inline-unface-lambda` when it lands.
64−2. **The prelude's `args=` gates.** Thirty prelude gates take an unfaced `args=[…]` and open a one-arm `?-` to name its parts, only so that they fit slots with any labels. With step 1, write them with labelled samples, `++ weld |= [xs=(list A) ys=(list A)] ^- (list A)`. Use `(unface |=(…))` only for small gates mostly passed as values, as `lth`, `gte` and `lte`. Each rewrite must keep the gate's type report.
65−3. **S12, later part.** Flatten the eight prelude gates that nest a `?-` inside another's arm to look at two values (`both`, `clap`, `hunt`, `mate`, `clef`, `join`, `snip`, `rear`) into nested cell patterns, as the review shows for `hunt`. The partial checker says "branch is not supported" for those today, so wait until the core types nested patterns.
66−
67−## Step 4: lowering, at milestone 3
68−
69−When the lowering to the core language is built, `(unface e)` lowers to `e`, a `++` whose body is `(unface |= …)` joins its group's `rec` as a gate, and a wing item in a change lowers to an edit at the wing's axis (core-language.md says how).
70−
71−## Questions to ask, not decide
72−
73−Put these to Montelot in the project chat, each with a recommendation, and record the answers in decisions.md:
74−
75−1. **What faces does a cast's result keep?** `^- $-([@ud @ud] ?) lt-a` drops the gate's labels today (the fall-through at the end of `+itype-merge-faces`), while `^- [@t @ud] r` keeps a record's. The critique recommends that a cast never removes faces, so `unface` is the one place labels go.
76−2. **May a flat arm's bare-name pattern hide a prelude name?** With flat arms, Hoon's habit of writing `?:`'s else branch back at the rune's column, as `dec a`, parses as a catch-all arm binding `dec`. Today "pattern binder shadows a name" catches it. If S3 ever lands, it wouldn't.
77−3. **Is a `|=` or `~&` that ends a body's final line written flat or with a deeper body by the formatter?** The prelude keeps deeper bodies for `flit` and `bond`.
78−4. **When named type variables merge, which name prints?** Today a capital written in the `++` wins, otherwise the one made first, so `(cork fk fv)` prints `cork`'s `A`, not `fk`'s `Key`.
79−
80−The review's other proposals (S3, S8, S9, S10 and S14) weren't decided. Leave them unless Montelot asks.
docs/reviews/2026-11-02-questions.mddeleted−346
@@ -1,346 +0,0 @@
1−# Questions from the 2026-11-02 review
2−
3−Every decision that [the review](2026-11-02-repo-review.md) raises, with options. Each **Answer** was prefilled with the recommended option. An answer marked *(chosen)* is the one Montelot picked; the rest are still the recommendation. A-numbers point into the review's appendix.
4−
5−Questions 16 to 28 are language or spec rulings. Under the ground rules they are @iko's to make and are recorded in decisions.md before the code changes.
6−
7−## Scope and process
8−
9−**1. Where should the review land?** It is on `claude/project-thread-7prdcx` now.
10−
11−- a) Push it to `master`, as development.md's "push straight to master" rule says.
12−- b) Open a pull request.
13−- c) Leave it on the branch.
14−
15−**Answer:** a *(chosen)*
16−
17−**2. What should be done first?**
18−
19−- a) The eight "fix first" bugs.
20−- b) The simplifications, starting with the test runner.
21−- c) The docs cleanup.
22−- d) Nothing more for now.
23−
24−**Answer:** a *(chosen)*
25−
26−**3. How should fixes land?**
27−
28−- a) Commits straight to `master` once every check passes, as development.md says.
29−- b) One pull request per theme.
30−- c) A branch you merge yourself.
31−
32−**Answer:** a *(chosen)*
33−
34−**4. Should a fake ship be set up in the cloud container**, so the ship checks run too? That needs the brass pill from GitHub LFS and a few minutes to boot.
35−
36−- a) Yes, before any fix that touches tools/ship, the desks or the mark.
37−- b) No, eval checks are enough.
38−
39−**Answer:** a *(chosen)*
40−
41−## Direction
42−
43−**5. How should the checker grow from here?** (A121)
44−
45−- a) Build the general core first: union-find bindings with levels, a deferred-constraint queue and Maranget's usefulness check, with `main = (program …)` checked as an ordinary application.
46−- b) Keep adding recovery paths until milestone 2's examples pass, and refactor after.
47−- c) Both: make today's recovery fall back to ordinary inference now, and plan the core as the next milestone-2 task.
48−
49−**Answer:** a *(chosen)*
50−
51−**6. Should the partial `golden-types` report be rendered from the full checker's per-definition results**, so there is one pipeline? (A122) About 283 `types.txt` outputs would change once.
52−
53−- a) Yes.
54−- b) No, keep the two pipelines.
55−
56−**Answer:** a *(chosen)*
57−
58−## Checker fixes
59−
60−**7. How should the keyed-view screen be fixed?** (A119, A38)
61−
62−- a) Run ordinary inference first, and recovery only for components it leaves unresolved. Some todo diagnostics may change.
63−- b) Keep recovery first, and fall back to ordinary inference when it declines.
64−
65−**Answer:** a *(chosen)*
66−
67−**8. Should the narrow initializer recovery go?** Deleting the null-sample gate and `program-init-context` (about 140 lines) lets the general path handle reordered models, and the seven negative init fixtures still fail. (A39)
68−
69−- a) Yes, once the todo, store and program tests pass.
70−- b) No.
71−
72−**Answer:** a *(chosen)*
73−
74−**9. How should an imported Hoon `(unit T)` be handled?** (A10)
75−
76−- a) Translate it to the prelude's `unit` union, passing the prelude template into the import bridge.
77−- b) For now, make it fit as unknown, so it fails closed instead of giving a false error.
78−
79−**Answer:** a *(chosen)*
80−
81−**10. Should printed types say `ask` and `qath` instead of `ask.internal` and `qath.internal`?** Two expected outputs change. (A134)
82−
83−- a) Yes.
84−- b) No.
85−
86−**Answer:** a *(chosen)*
87−
88−**11. Should every `?-` branch kind join its arm results by one rule:** unify, and if that fails, widen to an explicitly present parent aura or `@`? Then `?- b %.y n %.n 0` with `n=@ud` checks. (A133)
89−
90−- a) Yes.
91−- b) No, keep the per-kind rules.
92−
93−**Answer:** a *(chosen)*
94−
95−**12. Should top-level resolution make one pass in dependency order**, keeping the fixpoint as a fallback, with a 400-definition timing check added to the suite? (A135)
96−
97−- a) Yes.
98−- b) Only the fix.
99−- c) No.
100−
101−**Answer:** b *(chosen)*
102−
103−**13. Should the checker keep the errors it already finds?** That means the real error inside a local `++`, the name of the failing definition, the API reasons, and a definite error for a derived-name clash. Boundary strings that tests lock in would change. (A12, A40, A24)
104−
105−- a) Yes.
106−- b) No.
107−
108−**Answer:** a *(chosen)*
109−
110−**14. Should the 26-variable printer limit stop gating which modules check?** The printer would print `T27` and on, as it already can. (A124)
111−
112−- a) Yes.
113−- b) No.
114−
115−**Answer:** a *(chosen)*
116−
117−**15. Should the 32,768-node freshness scan be replaced** by a fresh-ID high-water mark computed once, with `%recursive` treated as a leaf? (A37)
118−
119−- a) Yes.
120−- b) Keep the scan and document its budget.
121−
122−**Answer:** a *(chosen)*
123−
124−## Language and spec rulings
125−
126−Montelot's answers to 16 to 28 are proposals. They are listed in [open-questions.md](../open-questions.md) until @iko confirms them; the code changes wait until then.
127−
128−**16. Which auras may a term literal fit?** Today `^- @tas %1.000` and `^- @tas %&` are accepted and `^- @ud %1.000` is rejected, the opposite of Hoon. grammar.md:141 supports the code; grammar.md:29 and "Literals: exactly Hoon's" don't. (A20)
129−
130−- a) Follow Hoon: a term literal fits its own aura family, so `%1.000` is `@ud` and `%&` is `?`.
131−- b) Keep grammar.md:141 as written.
132−
133−**Answer:** a *(chosen)*
134−
135−**17. May a name term fit `@t`, as `@tas` nests in `@t` in Hoon?** grammar.md:141 lists only `@tas`, `@ta`, `@` and `*`. (A20)
136−
137−- a) Yes.
138−- b) No.
139−
140−**Answer:** a *(chosen)*
141−
142−**18. May a gate fit `*`?** core-language.md says a function isn't a noun, but the prelude's `element` erases gates into `*`. (A23)
143−
144−- a) Yes: say in the spec that `*` may hold gates.
145−- b) No: design a typed erasure first.
146−
147−**Answer:** a *(chosen)*
148−
149−**19. Where should `[]` and `m()` be rejected?** Both are decided errors. Today the parser accepts them, and the checker calls `[]` "not supported". (A6, A100)
150−
151−- a) In the parser, at the closer, with new golden cases.
152−- b) In the checker, as definite errors.
153−
154−**Answer:** a *(chosen)*
155−
156−**20. Is `[a=@ud [a=@t b=?]]` one record or two scopes?** Hoon treats it as flat, and field access already does. Today the duplicate `a` is accepted and `a.x` is "ambiguous". (A30)
157−
158−- a) One record: the duplicate is an error.
159−- b) Two scopes, as compiler.md says now.
160−
161−**Answer:** a *(chosen)*
162−
163−**21. Should `/% %foo` together with `++ foo 1` be allowed?** `/%` binds only a mold, and molds and values have separate namespaces (grammar.md:94 and :102), but the scope check rejects it. (A25)
164−
165−- a) Yes.
166−- b) No.
167−
168−**Answer:** a *(chosen)*
169−
170−**22. Should a `?-` arm that matches no remaining case be a definite error** ("arm matches no case"), as grammar.md:184 implies, instead of "not supported"? (A15)
171−
172−- a) Yes.
173−- b) No.
174−
175−**Answer:** a *(chosen)*
176−
177−**23. Should `(mop K V)` carry its comparator,** so that `get.on gth` on an `lte` mop is an error? Neither Hoon nor decisions.md:39 does this. (A55)
178−
179−- a) No, match Hoon.
180−- b) Yes.
181−
182−**Answer:** a *(chosen)*
183−
184−**24. Should Hoon's `each` mold be renamed to `each.hoon`**, since the prelude also has the element gate `each`? They live in separate namespaces. (A64)
185−
186−- a) No, keep both.
187−- b) Yes.
188−
189−**Answer:** a *(chosen)*
190−
191−**25. When should `eq` and the gate-free type-variable constraint be built?** Both are decided, neither exists, and no doc tracks them. (A98)
192−
193−- a) In milestone 2.
194−- b) Later, and list them as outstanding.
195−
196−**Answer:** a *(chosen)*
197−
198−**26. Which Hoon unions should the importer learn?** Today `$%` with `%&`, `%|` or `%0` tags, `(each a b)` and `json` all fail, though the spec's import table lists them. (A50)
199−
200−- a) The non-`%tas` tags now, then `each` and `json` as catalog entries.
201−- b) Only the tags.
202−- c) Later.
203−
204−**Answer:** a *(chosen)*
205−
206−**27. Should the `%jibb` mark keep dropping the final newline on a `%txt` round trip**, as `%hoon` does? (A61)
207−
208−- a) Keep it, like `%hoon`.
209−- b) Preserve the newline, and change tools/ship's assertion.
210−
211−**Answer:** a *(chosen)*
212−
213−**28. Should the printer flatten `[a [b c]]` to `[a b c]` and print named molds by name**, such as `theme` and `item.todo`? (A136)
214−
215−- a) Yes.
216−- b) No.
217−
218−**Answer:** a *(chosen)*
219−
220−## Tests and tooling
221−
222−**29. Should one runner over the `tests/lib` test arms replace the 49 `tools/type-*-test` scripts and `importer-test`?** A prototype ran them in 681 s instead of 2,591 s. The `my-app` byte guards would move to a manifest. (A82, A120)
223−
224−- a) Yes.
225−- b) No.
226−
227−**Answer:** a *(chosen)*
228−
229−**30. Should there be one `tools/check` command, and CI?** (A92, A96)
230−
231−- a) `tools/check` now, and a CI job for the eval checks now.
232−- b) `tools/check` now, CI at milestone 7 as planned.
233−- c) Neither.
234−
235−**Answer:** a *(chosen)*
236−
237−On 2026-11-03 Montelot had the GitHub Actions job removed. The checks run before each push instead, with `tools/check` or `nix flake check`.
238−
239−**31. How should the 28 copies of `my-app` files under `tests/` be handled?** (A108, A109)
240−
241−- a) Map `my-app` into the `jibb-dev` desk outside `/tests` and read it directly, removing the copies.
242−- b) Keep the copies, and guard them all from one manifest.
243−
244−**Answer:** a *(chosen)*
245−
246−**32. Should the generated `tests/lib/jibb.hoon` (3,949 lines) stop being committed?** Assembly drops it and regenerates it anyway. (A83)
247−
248−- a) Yes, and add it to .gitignore.
249−- b) No.
250−
251−**Answer:** a *(chosen)*
252−
253−**33. Should the importer's test fixtures (about 550 lines) move out of `jibb-import.hoon`**, which app desks vendor, into `tests/lib/jibb-import.hoon`? (A52)
254−
255−- a) Yes.
256−- b) No.
257−
258−**Answer:** a *(chosen)*
259−
260−**34. Should the import-only fixtures move off `my-app`** (`sur/import-fixture.hoon`, `mar/label.hoon`, the Tlon probe) to a fixtures desk? (A113)
261−
262−- a) Yes.
263−- b) No.
264−
265−**Answer:** a *(chosen)*
266−
267−**35. Should the five `tools/hoon` checks that exit 0 whatever they print become test arms?** (A91)
268−
269−- a) Yes.
270−- b) No.
271−
272−**Answer:** a *(chosen)*
273−
274−**36. Should type-checker golden cases keep their full token and tree outputs?** They are 73% of all parser golden lines. (A94)
275−
276−- a) Keep them: each stage's output is compared.
277−- b) Let type cases opt out.
278−
279−**Answer:** a *(chosen)*
280−
281−**37. Should the tests keep calling internal library arms (137 of them)?** (A126)
282−
283−- a) Keep them for now, and revisit after the checker core changes.
284−- b) Move them behind a small public facade.
285−
286−**Answer:** a *(chosen)*
287−
288−**38. Should `my-app` keep the failing buttons example and the doc theme's static font?** Milestone 4 will treat both as errors. (A112)
289−
290−- a) Keep them through milestone 2, and list it as a milestone-4 open question.
291−- b) Move the error example out now.
292−
293−**Answer:** a *(chosen)*
294−
295−**39. Should every vendored package keep going into every desk?** (A117)
296−
297−- a) Yes, as designed.
298−- b) Make it per desk.
299−
300−**Answer:** a *(chosen)*
301−
302−**40. Should `tools/hoon` get a `--no-debug` mode** for timings, with the docs' figures re-measured? Every eval runs with `!:`, which makes checker work 2.2 to 2.6 times slower. (A137)
303−
304−- a) Yes.
305−- b) No.
306−
307−**Answer:** a *(chosen)*
308−
309−## Docs and repository
310−
311−**41. Should status.md become a capability table** (area, status, the test that proves it) plus a short list of gaps, with the history table replaced by `git log`? (A97, A95)
312−
313−- a) Yes.
314−- b) Only fix the contradictions.
315−
316−**Answer:** a *(chosen)*
317−
318−**42. Until the Claude design doc is synced, which spec wins?** (A104)
319−
320−- a) The repository copy, with a "synced" column in decisions.md.
321−- b) The Claude doc, as development.md says now.
322−
323−**Answer:** a *(chosen)*
324−
325−**43. Who syncs the Claude design doc with the repository's decisions?**
326−
327−- a) Me, if you give me edit access to it.
328−- b) @iko.
329−- c) Leave it for now.
330−
331−**Answer:** c *(chosen)*
332−
333−**44. Should open-questions.md hold only open questions**, with settled ones moved to decisions.md? (A103)
334−
335−- a) Yes.
336−- b) No.
337−
338−**Answer:** a *(chosen)*
339−
340−**45. Which licence should the repository have?** It has none, and doesn't state the licences of `vendor/` or the Tlon fixtures. (A107)
341−
342−- a) MIT, like urbit/urbit.
343−- b) Another licence.
344−- c) None: keep it private.
345−
346−**Answer:** a *(chosen)*
docs/reviews/2026-11-02-repo-review.mddeleted−294
@@ -1,294 +0,0 @@
1−# Repository review, 2026-11-02
2−
3−A review of the whole repository at [`4bf477e`](https://github.com/iko-soy/jibb/commit/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36), asked for in the project chat: look for issues and gaps, and for what could be simpler or more elegant.
4−
5−How it was done: ten reviewers each took one area (the lexer and parser, three slices of the checker, the importer with the mark and prelude, the Python tooling, the test harness, the docs, the example desks, and the architecture as a whole). A second reviewer then tried to refute every finding, by reading the code and by reproducing it with `tools/hoon` where that was cheap. A final pass looked for what the ten had missed. Every eval-based check in [development.md](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/development.md#L124-L194) was also run, with vere 4.6 built from nixpkgs.
6−
7−Four commits reached `master` while the review ran (`2d74861` to `5ccd150`). The fix-first items 1 to 3 were rechecked at `5ccd150` and still hold there. Line numbers below are links into `4bf477e`. Findings are numbered A1 to A137 in the [appendix](#appendix-every-finding).
8−
9−## Summary
10−
11−- **Everything that can run without a ship passes.** All 60 eval checks pass, including 660 of 660 golden cases. The ship checks were not run, because this container has no fake ship.
12−- **137 findings survived verification: 2 high, 31 medium and 104 low.** 75 held exactly as reported and 62 held with corrections to scope, numbers or severity. None was refuted outright. Most of the low ones are polish.
13−- **The real bugs are in the full checker, and they reject valid code.** A program that is one step away from the todo island's exact shape is rejected, an imported Hoon `(unit T)` doesn't fit the prelude's `unit`, and private prelude names leak into printed types. None of them accepts a wrong program.
14−- **The test and docs scaffolding is heavier than it needs to be.** The push checklist is about 65 commands and 49 minutes. 49 copy-paste test scripts rebuild the library 81 times. `my-app` files are copied 28 times under `tests/`, several with no guard. `status.md` is a 59 KB log that contradicts itself on whether the cart store checks.
15−- **The checker grows one example at a time.** Each new example gets a narrow recovery path, a script, a fixture folder and a paragraph of docs, where a few shared mechanisms would remove code. That trend is the main thing worth deciding on (see [Direction](#direction)).
16−
17−## Check run
18−
19−| Check | Result | Time |
20−| --- | --- | --- |
21−| `tools/golden` | 660 of 660 pass | 74 s |
22−| 49 `tools/type-*-test` scripts and `tools/importer-test` | All pass | 2,591 s together. The slowest are `type-todo-full-test` (581 s) and `type-deferred-prepared-test` (411 s) |
23−| `tools/testdata/selftest` | 22 checks, 0 failed | 141 s |
24−| `tools/doc-blocks docs/spec` | 14 `jibb` blocks, 14 `doc-*` cases, none missing | under 1 s |
25−| `tools/ship gen-tests --check` | Up to date, 660 cases | under 1 s |
26−| The 5 `tools/hoon` checks (`check-spans-test`, `itype-unify-test`, three reference files) | Print the expected values. They exit 0 whatever they print (A91) | about 23 s each |
27−| `tools/testdata/clay-fixtures-selftest` | Pass | 4 s |
28−| `tools/ship test`, `check-commit`, `clay-fixtures`, `ship-selftest` | Not run: they need a fake ship | |
29−
30−The checks ran three at a time on four CPUs and took 2,924 s of check time in all. Every eval rebuilds the 15,172-line library, which now takes about 22 s, not the 8 s the docs quote (A102).
31−
32−## Fix first
33−
34−These are the bugs and gaps with the most effect on users of the checker or the tools. Each was reproduced by the second reviewer.
35−
36−| # | Problem | Evidence | Fix | Refs |
37−| --- | --- | --- | --- | --- |
38−| 1 | **Valid programs are rejected when their view has one keyed `each (turn …)` site.** The screen that skips "doomed" ordinary inference also skips attempts that would succeed | A program whose `init` is ``^- model [0 input `"x"]`` is rejected with "module definitions need unsupported inference". Listing the same `each` site twice turns the screen off, and the same program then passes. [`add-supported-defs-core`](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10293) skips every name from [`program-recovery-names`](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L12997-L13038). Only the [recovery chain](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14152-L14173) can add them back, and its init recoveries accept only a tuple ending in `~` or a `~` sample ([13667](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L13667), [13595](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L13595)) | Run ordinary inference first, then recover only the components it left unresolved. Separately, deleting the null-sample gate at 13595 makes reordered models pass and keeps all seven negative init fixtures failing, which removes about 140 lines | A119, A38, A39 |
39−| 2 | **An imported Hoon `(unit T)` does not fit the prelude's `unit`.** `fall`, `need` and `^- (unit @t)` on an imported unit give definite "do not unify" errors | [`import-to-itype`](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L6339-L6350) builds `[%collection %unit …]`, while the prelude's unit is an origin-tagged union ([8245-8255](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L8245-L8255)). [`itype-fit-inner`](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L5437-L5439) answers `%bad`. No fixture passes an imported unit to `fall` or `need` | Translate Hoon `unit` to the prelude's union, as `list` already shares its representation. At the least, make a collection against a prelude-origin union fit as `%unknown`. Add a golden case | A10 |
40−| 3 | **Printed types name the private prelude module**, as `(ask.internal @ud)` and `(unit qath.internal)` inside every `page` and `theme` type | [`prelude-label`](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L11423-L11436) relabels only a mold's top level. Two expected outputs lock the leak in: [types-prelude-ui/types.txt:85](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/golden/types-prelude-ui/types.txt#L85) and [jibb-theme.hoon:66](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/lib/jibb-theme.hoon#L66). [grammar.md:104](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/spec/grammar.md#L104) says the prelude does not expose its internal module | Relabel internal origins with the public re-export name while preparing the prelude | A134 |
41−| 4 | **`?-` branches join their results by three different rules.** `?- b %.y n %.n 0` with `n=@ud` fails with "branch widening is not supported", even under `^- @ud`. A unit branch can't widen, and a union branch compares types with `!=` | Loobean pre-check at [8518](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L8518), plain unify for unit and list at [7671](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L7671), syntactic inequality for unions at [7841](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L7841) and [7943](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L7943) | One join helper for every branch kind: unify, then widen to an explicitly present parent aura or `@` | A133 |
42−| 5 | **Diagnostics the checker already has are thrown away** | An error inside a local `++` becomes the site-less "local definitions need unsupported inference" ([7236-7258](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L7236-L7258)). Full-check failures don't name the definition, and the API branch drops reasons it computed ([14087](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14087), [14092](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14092)). A derived-name clash, an error in the spec, is reported as "unsupported". The full module check reports a plain `@t`/`@ud` overlap as "unsupported" while the partial report proves it ([11340-11351](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L11340-L11351)) | Thread a reason, or the failing definition's name, through the resolver and recoveries. Use one overlap witness for both paths | A12, A40, A24 |
43−| 6 | **Forward references cost near-cubic time.** A 400-definition chain written top-down takes about 26 s of checker work, against about 1 s written bottom-up. The brief asks for "a 2,000-line module in seconds" | [`resolve-groups-core`](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10309-L10328) is a fixpoint that resolves one link per pass and re-infers every unresolved definition each time. The dependency-ordered SCCs at [10318](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10318) are used only for cycles | Resolve in one pass over the components already computed, keeping the fixpoint as a fallback. Compute `program-recovery-names` once per module, not per definition per pass | A135, A33 |
44−| 7 | **`tools/ship` and `tools/golden` bugs** | `tools/ship --pier /abs/path stop` can SIGTERM itself, because [`processes()`](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L285-L305) takes any process naming the pier for the king. The zero-byte `.txt` sync failure that [development.md:206](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/development.md#L206) blames on the ship is a `MANIFEST` and `verify()` bug in `tools/ship` ([693](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L693), [1438](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L1438)). When a batch dies, `tools/golden` reruns all 660 cases one by one, each rebuilding the library, and Ctrl-C doesn't stop the queue ([363-396](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/golden#L363-L396)) | Identify the king from `.vere.lock`. Test `%txt` before `?@` in `MANIFEST`. Bisect failing batches and cancel queued futures | A65, A66, A67 |
45−| 8 | **A trailing `\` in a string says "a control character"**, and the lexer's character rules have no tests | [`+bad-char`](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L1637-L1643) treats the line feed as a control character. No golden source holds a CR, a control byte or any byte at or above 0x80, so UTF-8 column counting and about 20 hints are untested | Make `+bad-char` return `~` for 10 (verified to give the end-of-file messages). Add `lex-char-*` and `lex-utf8-*` cases | A1, A3 |
46−
47−Medium gaps that fail closed, so nothing wrong is accepted, but common code is refused:
48−
49−| Gap | Refs |
50−| --- | --- |
51−| A union reached through two import faces stops matching once one of its cases holds another named union, because cases are compared with their display labels ([4859](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L4859)) | A11 |
52−| Union matches on cases holding an imported `map`, `set`, `qeu`, `mop`, `jar` or `jug` fail, because inhabitation and gate-free proofs know only `list` and `unit` ([4793](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L4793), [5785](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L5785)) | A13 |
53−| An imported bare `@`, and auras such as `@uw`, are rejected, and the aura whitelist is written twice ([6326](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L6326-L6329), [6198-6209](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L6198-L6209)) | A14 |
54−| An undocumented 32,768-node freshness scan, run in up to six recovery arms, turns recovery off silently. The prelude alone uses 57% of it, and any imported recursive type makes it decline ([dg-scan](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14512-L14539)) | A37 |
55−| The importer accepts only `%tas` head tags and knows no standard unions, so `$%` with `%&`, `%\|` or `%0` tags, `(each a b)` and `json` fail, although the spec's import table lists them ([jibb-import.hoon:104-110](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb-import.hoon#L104-L110)) | A50 |
56−| The full todo, page and API checks read five copies of the todo `/sur` and marks that nothing compares with `my-app`. Changing `my-app/sur/todo.hoon` leaves `type-todo-partial-test` passing | A109, A81 |
57−| `eq` is decided but missing from the prelude, the checker has no gate-free type-variable constraint, and no doc tracks either | A98 |
58−
59−## Simplify
60−
61−Each row was checked to be behaviour-preserving, or the table says what it would change.
62−
63−| Opportunity | Today | Proposed | Payoff | Refs |
64−| --- | --- | --- | --- | --- |
65−| One test runner | 49 `tools/type-*-test` scripts and `importer-test`, 2,154 lines. Each one slices a `tests/lib` file at `'\n\|%\n'` or at arm names, rebinds its fixtures under new names, and starts its own eval. Several keep Python copies of the check lists in the ship arms, so eval and ship run different wrappers | One runner that reads each `tests/lib/jibb-*.hoon` header, binds `/+` and `/*` as Ford would, and runs every `test-` arm under `mule`. Keep the `my-app` byte guards, diffs and `--update` somewhere else | A 90-line prototype ran all 55 ship test arms under eval in 681 s, against 2,591 s for the scripts, and removes the eval/ship drift | A82, A120, A80, A84 |
66−| One check command | About 65 commands, kept in four lists that disagree. `status.md` misses 18 and the README names 27 of the 49 type tools | `tools/check`, with `--ship` for the ship steps. Point every doc at it | One list, and a base for the CI that milestone 7 plans | A96, A92 |
67−| One source of `my-app` | 28 byte copies of 13 `my-app` files, plus 5 marks with the `/-` line removed. Eight tools hard-code their own guard pairs, and several copies have no guard | Map `my-app` into the `jibb-dev` desk outside `/tests` and read it directly, or keep one manifest checked by one tool | Removes the copies, and the drift they allow | A108, A128, A81, A109 |
68−| One checker pipeline | The partial report ([`golden-types-in-context-core`](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14385-L14510)) repeats the finalization of [`add-supported-result`](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10266-L10286) and runs none of the kind checks. The todo island gets a partial report but passes the full check | Have `infer-jibb-file-detailed` return a scheme or an error per definition, and render the report from that | Finalization in one place, and typed goldens that test the real checker | A122, A46, A42 |
69−| Program recovery | Six recovery arms repeat a preamble and a 25-35 line tail, and the copies have drifted. Four copies of the `main` walk | A `recover-def` helper and one `main-call-args` walk | A few hundred lines | A48, A39 |
70−| AST and type walkers | 56 arms, about 650 lines, in the `scope-*`, `dependency-*`, `duplicate-*`, `reserved-proj-*`, `*-has-hole` and `program-view-sites-*` families | One `node-kids` enumeration and a fold. The printers and `infer-fragment` still need their own dispatch | Fewer places to edit per new node kind | A129, A32, A21 |
71−| `%gate` and `%gate-wide` | Identical fields. 40 uses in the checker, 10 `\|(?=(%gate …) ?=(%gate-wide …))` tests and two duplicated 9-line branches | `?=(?(%gate %gate-wide) -.x)`, or one node with a `wide` flag | Noise removed without changing goldens | A123, A34 |
72−| Dead code | Five unreferenced arms and a type (A26). `one-request-interface-source`, and the narrow API branch, which gives an identical interface for `blog.jibb` (A44). `golden-types-with-modules`. The importer's `+fixture-test`. The committed, generated `tests/lib/jibb.hoon` (3,949 lines), which assembly drops and regenerates. `my-app` assembly skipping a `jibb-dev/tests` that doesn't exist | Delete them, and drop `gen-tests --check` from the checklist | Less to read and keep current | A26, A31, A44, A42, A51, A83, A111 |
73−| Test code in shipped libraries | About 550 lines, nearly a quarter of `jibb-import.hoon`, are fixtures used only by tests, and app desks vendor the file | Move them into `tests/lib/jibb-import.hoon`, as `jibb-api-paths.hoon` already does | A smaller vendored library | A52, A127 |
74−| Named state and limits | `istate`'s 27 fields are built positionally at 10 sites, `add-supported-defs-core` takes 19 positional arguments, and budgets are literals (256 ×32, 64 ×18, 32,768 ×13). The printer's 26-variable cap also rejects modules with 27 type variables | An `icontext` record with a `fresh-state` constructor, a `limits` core, and one `deferred-eligible` arm in place of three copies | Safer edits, and no printer limit on what checks | A28, A125, A124 |
75−| Parser helpers | The `?(` check is a backward token walk at 12 call sites. `+in` and `+fail` shadow the standard library, which costs 16 `in:..zuse` workarounds | One lexer branch for `?(` (verified to keep every error column). Rename `+in` and move the `+fail*` helpers into `+parser` | Smaller parser, no shadowing | A7, A8 |
76−
77−## Direction
78−
79−The checker is growing as narrow recovery paths fitted to the example files: the todo island, the cart store, the theme. In the 50 commits this clone holds, `jibb.hoon` grew by 6,199 lines, and the seven commits that add a kind of module added 1,816 of them. There are now three representations of recursive types (`%recursive`, `%jrec`, `%grec`), about 50 branch and pattern arms, and 257 strings that report something as "unsupported" or "not supported". Each slice also brings a test script, a fixture folder and a paragraph in `compiler.md`, which is now 75 KB. Fix-first item 1 shows the cost: a program one edit away from the todo's shape is rejected.
80−
81−The milestone-2 brief suggests, without requiring it, a different core: union-find bindings with levels, a queue of deferred constraints, and Maranget's usefulness check for matches ([milestone-2.md:130-142](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/prompts/milestone-2.md#L130-L142)). With it, `main = (program init update view subs)` would be an ordinary application whose sample unifies with its components, and much of the 1,180 lines of program recovery could go. Whether to build that core before adding the next slice is the main decision this review raises. (A121)
82−
83−## Docs
84−
85−| Doc | Problem | Fix | Refs |
86−| --- | --- | --- | --- |
87−| [status.md](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/status.md) | 59 KB, with a 16,412-character paragraph at line 68 and a 115-row table that repeats `git log`. It says the cart store passes ([54](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/status.md#L54)) and that it fails closed ([68](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/status.md#L68)). Both are true, for different entry points, and the doc says neither | A capability table (area, status, the test that proves it), a short list of known gaps, and milestone commits instead of the history table | A97, A95 |
88−| Check lists in README, development.md and status.md | They disagree. [development.md:3](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/development.md#L3) says the README describes each tool in full, but only development.md's table is complete | One `tools/check`, and one list | A96 |
89−| [compiler.md](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/compiler.md) and the [`jibb.hoon` header](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L1-L36) | Both still say milestone 1, and the chapter map leaves out `%union-analysis`, about 4,700 lines. The program-recovery chain is described inaccurately: the "doomed attempts" the screen skips can succeed | Update the header, the chapter map and the recovery paragraph | A60, A101, A131, A41 |
90−| The library's design notes | Sections 2.6, 3 and 4.2 don't mention the `_` type hole or the `?(` hint | Add both | A2 |
91−| [open-questions.md](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/open-questions.md) | Mostly settled questions, against its own rule. Question 6 is stale. `eq` reads as implemented | Move settled ones to decisions; mark `eq` as decided, not built | A103, A100, A98 |
92−| decisions.md, prelude-inventory.md | The core-language row still says "proposed". The inventory lists shapes as future work that now exist | Update | A99, A54, A105 |
93−| Timings | "About 8 s" to build the library is now about 22 s. Every figure is measured with `!:`, which makes checker work 2.2 to 2.6 times slower than on a ship, and no doc says so | Update the figure, and say which mode each figure uses | A102, A137 |
94−| Licence | No LICENSE, and the licences of `vendor/` and the Tlon fixtures are unstated | Add a LICENSE and a line in the README | A107 |
95−
96−## Not covered
97−
98−The ship checks weren't run, so ship-only behaviour, such as `tools/ship test`, `check-commit` and `clay-fixtures`, is reviewed from the code only. The spec in `docs/spec/` was checked for internal consistency and against the code, not as language design. The findings come from targeted reading and probes, not a line-by-line audit of all 15,172 lines.
99−
100−## Appendix: every finding
101−
102−"Confirmed" means the second reviewer reproduced the finding as stated. "Partly" means the core holds but the scope, numbers or severity were corrected; the title shown is the corrected one. Severity is the second reviewer's, judged for a project in the middle of milestone 2. Some problems were found independently by two reviewers and appear in both areas, for example A38 and A119, A82 and A120, A108 and A128.
103−
104−### Lexer, parser and printers (`jibb.hoon` 1–4597)
105−
106−| # | Finding | Severity | Verdict | Kind | Where |
107−| --- | --- | --- | --- | --- | --- |
108−| A1 | A `\` or `\X` escape cut off by the end of the line reports "a control character", which contradicts 2.2 and differs from the same text at the end of the file | Medium | Confirmed | bug | [jibb.hoon:1609-1625](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L1609-L1625), [jibb.hoon:1637-1643](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L1637-L1643), [jibb.hoon:105-110](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L105-L110) and 1 more |
109−| A2 | Design notes 2.6, 3 and 4.2 never mention the `_` type hole or the `?(` union hint; the header still says milestone 1 | Medium | Confirmed | inconsistency | [jibb.hoon:1](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L1), [jibb.hoon:162-231](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L162-L231), [jibb.hoon:489-505](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L489-L505) and 7 more |
110−| A3 | Section 2.2's CR/control/non-ASCII errors, UTF-8 column counting and about 20 lexer and parser hints have no golden case | Medium | Confirmed | test-gap | [jibb.hoon:1637-1645](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L1637-L1645), [jibb.hoon:1630](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L1630), [jibb.hoon:1709-1712](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L1709-L1712) and 3 more |
111−| A4 | +read-string's +doomed call, and the notes' "or the } of an interpolation" case, can never trigger | Low | Confirmed | dead-code | [jibb.hoon:3426-3431](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L3426-L3431), [jibb.hoon:2953-2975](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L2953-L2975), [jibb.hoon:651-657](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L651-L657) and 2 more |
112−| A5 | Left-out Hoon runes get the doc's reason only sometimes, and second-character messages override 2.2's character errors | Low | Confirmed | inconsistency | [jibb.hoon:238-240](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L238-L240), [jibb.hoon:270-274](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L270-L274), [jibb.hoon:1317-1324](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L1317-L1324) and 3 more |
113−| A6 | `[]` in an expression reaches the checker as "not supported", not the decided error, and open question 6 is stale; the parser's acceptance of `[]`/`m()` is a documented milestone-1 choice | Low | Partly | gap | [jibb.hoon:3492-3493](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L3492-L3493), [jibb.hoon:9400](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L9400), [jibb.hoon:9440](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L9440) and 4 more |
114−| A7 | The `?(` check is a backward token walk repeated at 12 parser call sites, where one lexer branch would do (verified to keep every column) | Low | Partly | simplification | [jibb.hoon:3144-3153](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L3144-L3153), [jibb.hoon:1337-1345](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L1337-L1345), [jibb.hoon:3164](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L3164) and 2 more |
115−| A8 | Renaming +in and moving the +fail* helpers into +parser would remove both standard-library shadowings, the 16 `in:..zuse` workarounds and the `file` forwarders | Low | Partly | simplification | [jibb.hoon:2368-2572](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L2368-L2572), [jibb.hoon:2727-2759](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L2727-L2759), [jibb.hoon:2892-2902](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L2892-L2902) and 3 more |
116−| A9 | Path-segment loops, open-mold-line loops and item/line name branches are near copies; some proposed merges are not clearly simpler | Low | Partly | duplication | [jibb.hoon:3087-3105](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L3087-L3105), [jibb.hoon:3375-3391](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L3375-L3391), [jibb.hoon:4048-4064](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L4048-L4064) and 6 more |
117−
118−### Checker core (`jibb.hoon` 4597–8364)
119−
120−| # | Finding | Severity | Verdict | Kind | Where |
121−| --- | --- | --- | --- | --- | --- |
122−| A10 | An imported Hoon (unit T) is a %collection, but the prelude unit is an origin-tagged union, so fall, need and (unit T) casts give false definite errors | High | Confirmed | bug | [jibb.hoon:6339-6350](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L6339-L6350), [jibb.hoon:5437-5439](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L5437-L5439), [jibb.hoon:8245-8255](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L8245-L8255) and 3 more |
123−| A11 | Same-origin, non-generic unions are compared by raw case equality, so a union reached through two import faces fails once a case contains a relabelled nested union | Medium | Confirmed | bug | [jibb.hoon:4857-4860](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L4857-L4860), [jibb.hoon:5415-5418](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L5415-L5418), [jibb.hoon:6553-6582](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L6553-L6582) and 1 more |
124−| A12 | Definite errors inside local `++` definitions are deferred and then replaced by the site-less 'local definitions need unsupported inference' | Medium | Confirmed | gap | [jibb.hoon:7236-7258](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L7236-L7258), [jibb.hoon:7284-7300](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L7284-L7300) |
125−| A13 | Union inhabitation and gate-free proofs only recognize list/unit collections, so union matches on cases holding imported map/set/qeu/mop/jar/jug fail closed | Medium | Confirmed | gap | [jibb.hoon:4792-4794](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L4792-L4794), [jibb.hoon:5784-5788](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L5784-L5788), [jibb.hoon:6342-6350](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L6342-L6350) |
126−| A14 | The import bridge rejects bare `@` and other unsigned auras, and recursive molds with `?` or `*` fields; the aura whitelist is duplicated | Medium | Confirmed | gap | [jibb.hoon:6326-6329](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L6326-L6329), [jibb.hoon:6198-6209](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L6198-L6209), [jibb-import.hoon:1522-1526](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb-import.hoon#L1522-L1526) |
127−| A15 | A ?- arm that matches no remaining case is reported as 'union pattern is not supported' instead of a definite unreachable-arm error | Low | Confirmed | gap | [jibb.hoon:7830-7833](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L7830-L7833), [jibb.hoon:7869-7872](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L7869-L7872), [jibb.hoon:7918-7921](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L7918-L7921) and 1 more |
128−| A16 | Variable-kind refinement relies on self-bindings that itype-walk special-cases in six copied arms (plus a seventh copy at 14523) | Low | Confirmed | robustness | [jibb.hoon:4693-4727](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L4693-L4727), [jibb.hoon:4873-4876](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L4873-L4876), [jibb.hoon:5939](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L5939) and 1 more |
129−| A17 | Union-branch coverage loop exists in three copies; list/unit branch, list-item, standard-list and fit-and-diagnose code is also duplicated, and one copy has drifted | Low | Confirmed | duplication | [jibb.hoon:7806-7945](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L7806-L7945), [jibb.hoon:7583-7673](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L7583-L7673), [jibb.hoon:7477-7519](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L7477-L7519) and 1 more |
130−| A18 | Dead fuel and sub parameters, an always-true unify, and two dead find-imported-mold lines | Low | Confirmed | dead-code | [jibb.hoon:5089-5111](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L5089-L5111), [jibb.hoon:5656-5730](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L5656-L5730), [jibb.hoon:6439-6440](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L6439-L6440) |
131−| A19 | The record-width guard counts faced spine entries, so a flat faced tuple cast to a record with a faced nested tail is refused as unsupported | Low | Confirmed | gap | [jibb.hoon:5373-5377](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L5373-L5377), [jibb.hoon:5656-5675](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L5656-L5675) |
132−| A20 | Term-literal fit into an atom ignores the literal's aura: `%1.000`, `%&` and `%1` fit @tas or ?, and `%1.000` never fits @ud, unlike Hoon; the spec is ambiguous | Low | Partly | bug | [jibb.hoon:5459-5465](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L5459-L5465), [jibb.hoon:5477-5486](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L5477-L5486), [jibb.hoon:8279](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L8279) and 2 more |
133−| A21 | Many hand-written itype 'contains X' traversals and a repeated variable-kind disjunction could share one children/fold helper | Low | Partly | simplification | [jibb.hoon:5064-5075](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L5064-L5075), [jibb.hoon:5216-5290](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L5216-L5290), [jibb.hoon:5846-5870](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L5846-L5870) and 1 more |
134−| A22 | The noun-fit comment says a bare tag is 'fixed as a constant', but the tag is bound to `*` or to the expected aura | Low | Partly | inconsistency | [jibb.hoon:5390-5396](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L5390-L5396), [jibb.hoon:5460-5463](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L5460-L5463) |
135−| A23 | Gates fit `*`, in tension with core-language.md ('a function isn't a noun'), but the prelude relies on it | Low | Partly | inconsistency | [jibb.hoon:5390-5396](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L5390-L5396), [docs/spec/core-language.md:33](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/spec/core-language.md#L33), [docs/compiler.md:149](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/compiler.md#L149) and 1 more |
136−
137−### Expression inference, unions, API analysis (`jibb.hoon` 8364–12535)
138−
139−| # | Finding | Severity | Verdict | Kind | Where |
140−| --- | --- | --- | --- | --- | --- |
141−| A24 | Full module check reports overlaps that the partial report proves (atoms, ? vs a loobean, nested tags) as 'unsupported', with no overlap evidence | Medium | Confirmed | inconsistency | [jibb.hoon:11340-11351](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L11340-L11351), [jibb.hoon:11352-11365](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L11352-L11365), [jibb.hoon:10965-10993](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10965-L10993) and 3 more |
142−| A25 | module-scope-valid checks /% mark names against the value namespace, though /% binds only a mold | Low | Confirmed | inconsistency | [jibb.hoon:11232-11242](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L11232-L11242), [jibb.hoon:11298-11311](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L11298-L11311), [jibb.hoon:11893-11903](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L11893-L11903) and 2 more |
143−| A26 | Five unreferenced arms (plus the iwidth-elaboration type) and header comments sitting above unrelated arms | Low | Confirmed | dead-code | [jibb.hoon:8585-8603](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L8585-L8603), [jibb.hoon:8919-8920](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L8919-L8920), [jibb.hoon:9099-9104](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L9099-L9104) and 4 more |
144−| A27 | request-graph-merge re-inlines input matching and the bound check; its fuel arguments never limit; the unconditional bound contradicts 'request-bearing graphs alone have a size limit' | Low | Confirmed | inconsistency | [jibb.hoon:11656-11728](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L11656-L11728), [jibb.hoon:14192](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14192), [jibb.hoon:14234-14235](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14234-L14235) and 1 more |
145−| A28 | istate (27 fields) is built as a positional tuple at 10 sites | Low | Confirmed | robustness | [jibb.hoon:5807](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L5807), [jibb.hoon:10297](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10297), [jibb.hoon:10324](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10324) and 8 more |
146−| A29 | prepare-prelude*, module-mold-types*, union-state budgets and several small predicates are near-copies | Low | Confirmed | duplication | [jibb.hoon:11614-11634](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L11614-L11634), [jibb.hoon:11352-11377](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L11352-L11377), [jibb.hoon:10704-10721](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10704-L10721) and 5 more |
147−| A30 | Nested unfaced tail brackets get their own duplicate-field scope (documented), while field reads treat the whole spine as one record, so [a=@ud [a=@t b=?]] is accepted but a.x is 'ambiguous' | Low | Partly | bug | [jibb.hoon:11058](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L11058), [jibb.hoon:11098](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L11098), [jibb.hoon:11141-11150](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L11141-L11150) and 4 more |
148−| A31 | API analysis duplicates its -source/-graph gates, keeps a dead one-request-interface-source and a narrow branch that multi-request nearly subsumes | Low | Partly | duplication | [jibb.hoon:12006-12043](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L12006-L12043), [jibb.hoon:12112-12178](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L12112-L12178), [jibb.hoon:12253-12359](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L12253-L12359) and 3 more |
149−| A32 | Expression and itype walkers repeat the same per-kind dispatch and per-container helpers | Low | Partly | duplication | [jibb.hoon:9917-10018](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L9917-L10018), [jibb.hoon:10936-10955](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10936-L10955), [jibb.hoon:11134-11231](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L11134-L11231) and 5 more |
150−| A33 | infer-recursive-gate is retried for every failed definition, including non-self-referencing gates, and a failed single self-loop is retried again via infer-gate-group | Low | Partly | performance | [jibb.hoon:10287-10307](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10287-L10307), [jibb.hoon:10234-10256](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10234-L10256), [jibb.hoon:10309-10328](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10309-L10328) and 3 more |
151−| A34 | %gate and %gate-wide get separate ?- arms with identical bodies in the inference chapter | Low | Partly | simplification | [jibb.hoon:8559-8576](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L8559-L8576), [jibb.hoon:9850-9910](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L9850-L9910), [jibb.hoon:10031-10047](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10031-L10047) and 2 more |
152−| A35 | Four capital helpers repeat the same resolve-to-ident block; show-itype has five identical variable arms; 'is a variable' tests are inlined in several places | Low | Partly | simplification | [jibb.hoon:9640-9699](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L9640-L9699), [jibb.hoon:9537-9552](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L9537-L9552), [jibb.hoon:8904](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L8904) and 4 more |
153−| A36 | infer-call-context-args and infer-fragment's two-name %wing branch duplicate existing gates; raw-expected use at the 'direct' context sites is deliberate but uncommented | Low | Partly | simplification | [jibb.hoon:9419-9433](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L9419-L9433), [jibb.hoon:8840-8844](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L8840-L8844), [jibb.hoon:8423-8431](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L8423-L8431) and 2 more |
154−
155−### Program, page and store mains; entry points; deferred inference (`jibb.hoon` 12535–15172)
156−
157−| # | Finding | Severity | Verdict | Kind | Where |
158−| --- | --- | --- | --- | --- | --- |
159−| A37 | An undocumented 32,768-node freshness scan, repeated in up to six recovery arms, silently turns off program recovery when it runs out or meets a %recursive type | Medium | Confirmed | robustness | [jibb.hoon:12747](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L12747), [jibb.hoon:12909](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L12909), [jibb.hoon:13302](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L13302) and 6 more |
160−| A38 | The keyed-view screen also skips ordinary inference of init, so an init that would check ordinarily is rejected unless it matches the tuple-ending-null or null-sample recovery shape | Medium | Partly | bug | [jibb.hoon:10293](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10293), [jibb.hoon:12997-13037](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L12997-L13037), [jibb.hoon:14152-14173](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14152-L14173) and 4 more |
161−| A39 | Unannotated init recovery is limited to a tuple ending in `~` or a `~` sample; dropping the null-sample gate in program-plain-init-context covers reordered models and keeps the init guards | Medium | Partly | gap | [jibb.hoon:13595](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L13595), [jibb.hoon:13650-13752](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L13650-L13752), [jibb.hoon:12692-12706](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L12692-L12706) and 4 more |
162−| A40 | Full-check failures collapse to generic boundary messages: no definition named, API reasons discarded, and a derived-name clash (a spec error) reported as unsupported | Medium | Partly | gap | [jibb.hoon:14189-14190](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14189-L14190), [jibb.hoon:14087](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14087), [jibb.hoon:14092](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14092) and 4 more |
163−| A41 | compiler.md and status.md describe the program-recovery chain inaccurately (nonempty subscriptions, 'doomed' screen, missing null-sample and plain-view recoveries), and a comment points the wrong way | Low | Confirmed | docs | [docs/compiler.md:139](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/compiler.md#L139), [docs/compiler.md:141](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/compiler.md#L141), [docs/status.md:50](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/status.md#L50) and 2 more |
164−| A42 | The golden-types entry chain parses and duplicate-checks the source up to three times, the deferred paths parse and resolve again, eligibility guards are repeated, and golden-types-with-modules has no callers | Low | Confirmed | simplification | [jibb.hoon:14297-14392](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14297-L14392), [jibb.hoon:14943-15017](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14943-L15017), [jibb.hoon:14176-14185](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14176-L14185) and 3 more |
165−| A43 | The no-prelude report prints a bare 'module has reserved proj name' without the partial-inference header, the prepared path reports 'module has conflicting names', and the no-prelude branch is untested | Low | Confirmed | inconsistency | [jibb.hoon:14393-14394](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14393-L14394), [jibb.hoon:14344-14347](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14344-L14347), [jibb.hoon:11305](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L11305) |
166−| A44 | The 'narrow' API branch with one-request-interface-graph is redundant for blog.jibb: multi-request-interface-graph produces the identical interface and cache | Low | Confirmed | simplification | [jibb.hoon:14078-14093](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14078-L14093), [jibb.hoon:12307-12362](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L12307-L12362), [jibb.hoon:12488-12531](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L12488-L12531) and 1 more |
167−| A45 | Unused parameters, no-op scans and defensive or unreachable checks in the recovery and dg arms | Low | Confirmed | dead-code | [jibb.hoon:12713](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L12713), [jibb.hoon:14585-14591](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14585-L14591), [jibb.hoon:14842](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14842) and 6 more |
168−| A46 | The partial golden-types report uses its own resolver, with no program recovery and no grec index, so it disagrees with the full checker; this is deliberate, labelled and tested | Low | Partly | inconsistency | [jibb.hoon:14385-14508](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14385-L14508), [jibb.hoon:14400](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14400), [jibb.hoon:14152-14173](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14152-L14173) and 1 more |
169−| A47 | The experimental deferred (dg-*) transaction cannot affect a prelude-backed full check; this is already documented, and the cost is maintenance | Low | Partly | gap | [jibb.hoon:14176-14185](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14176-L14185), [jibb.hoon:14972](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14972), [jibb.hoon:15014](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L15014) and 4 more |
170−| A48 | Program recovery arms repeat the same preamble and a 25-35 line tail, which has drifted slightly; a shared helper would remove a few hundred lines, not most of 1,000 | Low | Partly | duplication | [jibb.hoon:12712-12816](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L12712-L12816), [jibb.hoon:12874-12972](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L12874-L12972), [jibb.hoon:13266-13341](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L13266-L13341) and 4 more |
171−| A49 | grec proves one fixed recursive-tree layout on purpose; unfolding re-proves it and re-asserts its shape with 16 ?> checks instead of reusing the parts the proof found | Low | Partly | simplification | [jibb.hoon:15085-15115](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L15085-L15115), [jibb.hoon:15118-15157](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L15118-L15157), [tests/type-generic-recursion/about.txt:1-12](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/type-generic-recursion/about.txt#L1-L12) and 1 more |
172−
173−### Hoon importer, `%jibb` mark and prelude
174−
175−| # | Finding | Severity | Verdict | Kind | Where |
176−| --- | --- | --- | --- | --- | --- |
177−| A50 | The source fallback accepts only %tas head tags, and the catalog has no hoon.hoon or zuse unions, so $% or $? with %&, %\| or %0 tags, (each a b) and json all fail closed, although the spec's import table lists them | Medium | Partly | gap | [jibb-import.hoon:104-110](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb-import.hoon#L104-L110), [jibb-import.hoon:383](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb-import.hoon#L383), [jibb-import.hoon:413](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb-import.hoon#L413) and 5 more |
178−| A51 | +fixture-test is never called, but tests/importer/about.txt says it checks the structured values | Low | Confirmed | dead-code | [jibb-import.hoon:1720](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb-import.hoon#L1720), [jibb-import.hoon:1727-1839](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb-import.hoon#L1727-L1839), [tests/importer/about.txt:57-58](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/importer/about.txt#L57-L58) |
179−| A52 | About 540 lines (about 23%) of test-only fixture arms live in the importer library that app desks vendor | Low | Confirmed | simplification | [jibb-import.hoon:1720-1839](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb-import.hoon#L1720-L1839), [jibb-import.hoon:1887-2306](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb-import.hoon#L1887-L2306), [tests/lib/jibb-import.hoon:42](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/lib/jibb-import.hoon#L42) and 1 more |
180−| A53 | The importer header and two jibb.hoon comments name +read-mold, which no caller uses and which cannot import collections, instead of +read-named or +read-mark | Low | Confirmed | inconsistency | [jibb-import.hoon:1-31](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb-import.hoon#L1-L31), [jibb.hoon:5640](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L5640), [jibb.hoon:11032](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L11032) |
181−| A54 | prelude-inventory.md still lists the 3g shapes as future work and contradicts itself on the 2a inference status | Low | Confirmed | docs | [docs/prelude-inventory.md:141-157](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/prelude-inventory.md#L141-L157), [docs/prelude-inventory.md:35](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/prelude-inventory.md#L35), [docs/prelude-inventory.md:39-52](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/prelude-inventory.md#L39-L52) and 1 more |
182−| A55 | The importer drops a mop's comparator, as the spec's (mop K V) decision implies, so lte and gth mops import identically; whether the order should be checked is a design question, not an importer bug | Low | Partly | gap | [jibb-import.hoon:1242-1266](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb-import.hoon#L1242-L1266), [jibb-import.hoon:1578-1581](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb-import.hoon#L1578-L1581), [docs/spec/decisions.md:39](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/spec/decisions.md#L39) and 2 more |
183−| A56 | The definite-overlap witness covers only a top-level $? of tagged cells, as documented; duplicate $% tags, ?(%a %a) and nested overlaps report 'could not be verified' | Low | Partly | inconsistency | [jibb-import.hoon:416-441](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb-import.hoon#L416-L441), [jibb-import.hoon:390-401](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb-import.hoon#L390-L401), [tests/importer/tree.txt:76-78](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/importer/tree.txt#L76-L78) and 1 more |
184−| A57 | The provenance preamble, the local-chapter scan and the standard-collection name list are copied in many places | Low | Partly | duplication | [jibb-import.hoon:527-532](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb-import.hoon#L527-L532), [jibb-import.hoon:552-557](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb-import.hoon#L552-L557), [jibb-import.hoon:629-634](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb-import.hoon#L629-L634) and 12 more |
185−| A58 | Several helpers are near-copies; the $% and $? case scans differ only in a budget that was deliberately added to the $? path alone | Low | Partly | simplification | [jibb-import.hoon:88-102](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb-import.hoon#L88-L102), [jibb-import.hoon:168-181](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb-import.hoon#L168-L181), [jibb-import.hoon:124-163](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb-import.hoon#L124-L163) and 8 more |
186−| A59 | The opt-in diagnostic readers re-run provenance, the overlap witness and the walk after a failure; this is documented | Low | Partly | performance | [jibb-import.hoon:624-660](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb-import.hoon#L624-L660), [jibb-import.hoon:535-536](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb-import.hoon#L535-L536), [docs/compiler.md:107](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/compiler.md#L107) and 1 more |
187−| A60 | jibb.hoon's header still says milestone 1 and lists a partial API; compiler.md's 'From the header' table and its %api chapter row do not match the file | Low | Partly | docs | [jibb.hoon:1-36](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L1-L36), [docs/compiler.md:25-38](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/compiler.md#L25-L38), [docs/compiler.md:51](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/compiler.md#L51) and 3 more |
188−| A61 | The %jibb mark's %txt round trip drops the final newline, deliberately mirroring %hoon; changing grab txt would also require changing tools/ship's assertion | Low | Partly | robustness | [mar/jibb.hoon:6](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/mar/jibb.hoon#L6), [mar/jibb.hoon:11](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/mar/jibb.hoon#L11), [mar/jibb.hoon:14](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/mar/jibb.hoon#L14) and 2 more |
189−| A62 | +$ attr spells pad and gap as eight constant cases where a spacing mold and two cases would match the other attributes | Low | Partly | simplification | [prelude.jibb:405-417](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb/prelude.jibb#L405-L417), [docs/spec/overview.md:198](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/spec/overview.md#L198), [docs/spec/overview.md:204](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/spec/overview.md#L204) |
190−| A63 | internal.jibb has no comment saying that list.core and unit.core are the public prelude's validated molds, which the compiler injects; tuba-text has no sample mold | Low | Partly | docs | [internal.jibb:1](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb/internal.jibb#L1), [internal.jibb:22](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb/internal.jibb#L22), [internal.jibb:29-33](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb/internal.jibb#L29-L33) and 2 more |
191−| A64 | The prelude's mold each (Hoon 1c) and the element gate each are unrelated, as the spec requires; whether to rename is a spec question | Low | Partly | inconsistency | [prelude.jibb:131-133](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb/prelude.jibb#L131-L133), [prelude.jibb:464-465](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb/prelude.jibb#L464-L465), [docs/spec/overview.md:184](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/spec/overview.md#L184) and 2 more |
192−
193−### Python tooling
194−
195−| # | Finding | Severity | Verdict | Kind | Where |
196−| --- | --- | --- | --- | --- | --- |
197−| A65 | Ship.processes() treats any process whose argv names the absolute pier path as the king, tools/ship itself included, so `tools/ship --pier /abs/pier stop` can SIGTERM itself and `start` reports 'already running' with no ship | Medium | Confirmed | bug | [tools/ship:285-305](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L285-L305), [tools/ship:340-344](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L340-L344), [tools/ship:388-409](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L388-L409) and 2 more |
198−| A66 | sync's verify reports a zero-byte .txt file as different: %txt stores ~ (an atom) for it, MANIFEST classifies any atom as %cord before checking for %txt, and verify() requires 'wain' for .txt; docs blame the ship | Medium | Confirmed | bug | [tools/ship:693-696](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L693-L696), [tools/ship:1437-1439](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L1437-L1439), [docs/development.md:206](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/development.md#L206) and 1 more |
199−| A67 | When the batched eval dies, tools/golden reruns every case alone, each compiling the whole library (no bisection), under the same 600 s timeout, and Ctrl-C does not stop the queued reruns | Medium | Confirmed | robustness | [tools/golden:363-396](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/golden#L363-L396), [tools/golden:285-286](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/golden#L285-L286), [tools/golden:522-526](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/golden#L522-L526) |
200−| A68 | jibb-import.hoon is spliced into the '(harness)' segment, so its compile errors get the 'golden harness doesn't compile / golden arm must be' headline with harness line numbers, and crash frames inside the reader are dropped | Low | Confirmed | bug | [tools/golden:243-247](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/golden#L243-L247), [tools/golden:287-294](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/golden#L287-L294), [tools/golden:311-316](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/golden#L311-L316) and 1 more |
201−| A69 | tools/ship test/sync/gen-tests accept a nonexistent --golden folder: zero cases are generated, the other tests/lib programs are dropped as 'isolated', and -test passes with 0 tests | Low | Confirmed | gap | [tools/ship:1018-1021](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L1018-L1021), [tools/ship:877-898](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L877-L898), [tools/ship:1754-1778](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L1754-L1778) and 1 more |
202−| A70 | ship-selftest hard-codes 44 tests/lib program names (11 of the 55 are missing) and dozens of fixture names that assemble() copies generically | Low | Confirmed | test-gap | [tools/testdata/ship-selftest:301-345](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/testdata/ship-selftest#L301-L345), [tools/testdata/ship-selftest:346-448](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/testdata/ship-selftest#L346-L448) |
203−| A71 | check_fixture_crash_isolated in tools/testdata/selftest runs the real 15k-line compiler and asserts on checker output, contradicting the 'about half a minute' docstring | Low | Confirmed | inconsistency | [tools/testdata/selftest:373-410](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/testdata/selftest#L373-L410), [tools/testdata/selftest:5](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/testdata/selftest#L5) |
204−| A72 | tools/golden embeds the prelude and internal prelude twice per module-types program (as arms and inline in prepare-prelude) and repeats the read-to-rap-literal code several times | Low | Confirmed | simplification | [tools/golden:201-222](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/golden#L201-L222), [tools/golden:263-286](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/golden#L263-L286) |
205−| A73 | delete_batches keeps an empty-list special case (`batches or partition([])`) that only a selftest relies on; sync never calls it with no paths | Low | Confirmed | simplification | [tools/ship:1512-1538](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L1512-L1538), [tools/testdata/ship-selftest:550-554](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/testdata/ship-selftest#L550-L554) |
206−| A74 | A non-UTF-8 about.txt makes tools/golden and tools/ship gen-tests die with a UnicodeDecodeError traceback and exit 1 instead of a report and exit 2 | Low | Confirmed | robustness | [tools/golden_case.py:34-41](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/golden_case.py#L34-L41), [tools/golden:160-168](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/golden#L160-L168), [tools/ship:1114](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L1114) and 1 more |
207−| A75 | tools/golden substitutes harness placeholders after splicing in case sources, so a Jibb source that interpolates {types-expr}, {import-helper}, {modules-expr}, {module-helper} or {prelude-helper} is silently rewritten or breaks the harness (latent: nothing in the corpus triggers it) | Low | Partly | bug | [tools/golden:287-294](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/golden#L287-L294), [tools/golden:243-247](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/golden#L243-L247), [tools/golden:285-286](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/golden#L285-L286) and 1 more |
208−| A76 | The eval and ship runners duplicate per-case metadata handling and the fixture-compiling Hoon helpers, and crash isolation has drifted (the ship's plain check-types is not under mule); the per-batch/per-case entry-point choice is equivalent and keeps stub libraries minimal | Low | Partly | duplication | [tools/golden:103-143](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/golden#L103-L143), [tools/golden:248-262](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/golden#L248-L262), [tools/ship:1058-1168](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L1058-L1168) and 5 more |
209−| A77 | tools/ship keeps its own copies of noun decoding, cord-literal escaping, display paths and KNOT/TERM; some are not drop-in replaceable (tuple vs Cell nouns, pier-first urbit lookup) | Low | Partly | duplication | [tools/ship:121-228](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L121-L228), [tools/ship:83-84](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L83-L84), [tools/ship:266-273](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L266-L273) and 6 more |
210−| A78 | tools/clay-fixtures repeats one run/compare/print block for 11 fixtures (plus build, import and Tlon variants), and the Tlon step clones tools/ship into a scratch repo just to add one /sur file; the restore has no timeout | Low | Partly | simplification | [tools/clay-fixtures:54-145](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/clay-fixtures#L54-L145), [tools/clay-fixtures:188-238](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/clay-fixtures#L188-L238), [tools/clay-fixtures:147-186](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/clay-fixtures#L147-L186) and 1 more |
211−| A79 | tools/ship defaults to /root/urbit/zod and /root/src/tools/pkg/click/click (documented and overridable), and its find_urbit ignores $URBIT | Low | Partly | tooling | [tools/ship:53-54](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L53-L54), [tools/ship:18-24](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L18-L24), [tools/noun.py:5-6](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/noun.py#L5-L6) and 2 more |
212−
213−### Test harness
214−
215−| # | Finding | Severity | Verdict | Kind | Where |
216−| --- | --- | --- | --- | --- | --- |
217−| A80 | Eval scripts cut or bypass the ship's test- arms and keep their own copies of the check lists, so eval and ship run different wrapper code | Medium | Confirmed | inconsistency | [tools/type-store-test:19-34](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/type-store-test#L19-L34), [tests/lib/jibb-store.hoon:256-260](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/lib/jibb-store.hoon#L256-L260), [tools/type-todo-full-test:21-32](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/type-todo-full-test#L21-L32) and 6 more |
218−| A81 | Test copies of my-app files are guarded inconsistently: the todo /sur and mark copies and all 14 golden copies are unchecked, and no check parses my-app's own .jibb files | Medium | Confirmed | gap | [tests/type-api-paths/about.txt:2](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/type-api-paths/about.txt#L2), [tests/type-api-paths/todo-sur.txt](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/type-api-paths/todo-sur.txt), [tests/type-api-paths/todo-action.txt](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/type-api-paths/todo-action.txt) and 3 more |
219−| A82 | The 49 tools/type-*-test scripts and importer-test rebuild by hand the bindings each ship test file already declares; a generic runner over tests/lib could replace most of them and run several times faster | Medium | Partly | simplification | [tools/type-deferred-prepared-test:10-48](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/type-deferred-prepared-test#L10-L48), [tools/type-todo-full-test:16-97](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/type-todo-full-test#L16-L97), [tools/type-arithmetic-guards-test:13-28](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/type-arithmetic-guards-test#L13-L28) and 1 more |
220−| A83 | The committed, generated tests/lib/jibb.hoon (3,949 lines) is never used: assembly drops it and regenerates it | Low | Confirmed | simplification | [tools/ship:887-898](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L887-L898), [tools/ship:1754-1778](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L1754-L1778), [docs/development.md:186](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/development.md#L186) and 1 more |
221−| A84 | Each new test is registered by hand in several places, and some of those lists are incomplete | Low | Confirmed | duplication | [tools/testdata/ship-selftest:304-346](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/testdata/ship-selftest#L304-L346), [tools/testdata/ship-selftest:348-446](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/testdata/ship-selftest#L348-L446), [docs/development.md:3](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/development.md#L3) and 2 more |
222−| A85 | Some checks test little: a one-line pass/fail golden file for unification, and three Hoon-versus-Hoon reference files that build the full library for nothing | Low | Confirmed | simplification | [tests/checker/unification.txt:1](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/checker/unification.txt#L1), [tests/lib/jibb-typecheck.hoon:5-13](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/lib/jibb-typecheck.hoon#L5-L13), [tools/testdata/succ-hoon-reference.hoon:1-9](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/testdata/succ-hoon-reference.hoon#L1-L9) and 3 more |
223−| A86 | 36 tests/lib files repeat the same lines-to-cord helper, and many suites build Jibb sources inline from '\0a' cords | Low | Confirmed | duplication | [tests/lib/jibb-store.hoon:8-45](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/lib/jibb-store.hoon#L8-L45), [tests/lib/jibb-program-watch.hoon:12-55](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/lib/jibb-program-watch.hoon#L12-L55) |
224−| A87 | The golden naming table documents only lex-, inline- and doc- prefixes, and 10 about.txt files miss required lines; nothing lints them | Low | Confirmed | docs | [docs/development.md:212-218](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/development.md#L212-L218), [tests/golden/types-constructor-context/about.txt:1](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/golden/types-constructor-context/about.txt#L1), [tests/golden/types-partial-locals/about.txt:1](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/golden/types-partial-locals/about.txt#L1) and 1 more |
225−| A88 | Fixture folders, script names, arm names and flags follow no consistent mapping | Low | Confirmed | inconsistency | [tests/type-program-watch/about.txt:1](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/type-program-watch/about.txt#L1), [tools/type-gate-free-source-test:13](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/type-gate-free-source-test#L13), [tools/type-program-init-test:27-32](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/type-program-init-test#L27-L32) and 3 more |
226−| A89 | tools/clay-fixtures repeats one run-and-compare block per fixture, and the importer fixture list is spread over several places with a hand-kept count | Low | Confirmed | duplication | [tools/clay-fixtures:15-238](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/clay-fixtures#L15-L238), [tools/importer-test:10-37](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/importer-test#L10-L37), [tests/lib/jibb-import.hoon:3-42](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/lib/jibb-import.hoon#L3-L42) and 1 more |
227−| A90 | The docs' claims about 2,000-line modules and 100,000 nested brackets have no automated test | Low | Confirmed | test-gap | [docs/compiler.md:209](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/compiler.md#L209), [docs/development.md:230](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/development.md#L230) |
228−| A91 | Five 'Before pushing' checks run through tools/hoon are eyeball checks: they exit 0 whatever value they print | Low | Partly | bug | [docs/development.md:179-183](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/development.md#L179-L183), [tools/hoon:149-171](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/hoon#L149-L171) |
229−| A92 | No single command runs the ~65-command push checklist (about 49 minutes serially); CI is planned only for milestone 7 | Low | Partly | gap | [docs/development.md:124-192](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/development.md#L124-L192), [docs/development.md:234](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/development.md#L234), [docs/spec/implementation-plan.md:31](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/spec/implementation-plan.md#L31) |
230−| A93 | The importer's +fixture-test is never run although tests/importer/about.txt says it checks structured values; test-support arms live in the shipped libraries | Low | Partly | dead-code | [jibb-import.hoon:1720-1842](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb-import.hoon#L1720-L1842), [tests/importer/about.txt:58](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/importer/about.txt#L58), [jibb.hoon:4505-4595](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L4505-L4595) and 2 more |
231−| A94 | Type-checker golden cases also carry full token and tree outputs (about 73% of all parser golden lines), a deliberate trade-off that adds churn when sources or printers change | Low | Partly | simplification | [docs/spec/implementation-plan.md:40](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/spec/implementation-plan.md#L40), [docs/development.md:12](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/development.md#L12), [tools/ship:947](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L947) |
232−
233−### Documentation
234−
235−| # | Finding | Severity | Verdict | Kind | Where |
236−| --- | --- | --- | --- | --- | --- |
237−| A95 | status.md says the cart store fully checks (line 54) and also that it fails closed (line 68), because the golden-types path and the full-module path disagree and status.md never says which it means | Medium | Confirmed | inconsistency | [docs/status.md:54](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/status.md#L54), [docs/status.md:68](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/status.md#L68), [tests/golden/doc-grammar-06-cart-store/types.txt:2](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/golden/doc-grammar-06-cart-store/types.txt#L2) and 2 more |
238−| A96 | The hand-maintained check lists have drifted: status.md's 'Checking it' misses 18 checks, the README names 27 of the 49 type-* tools, and development.md:3 points to the README as the full reference | Medium | Confirmed | tooling | [docs/status.md:234-286](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/status.md#L234-L286), [docs/development.md:3](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/development.md#L3), [docs/development.md:124-194](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/development.md#L124-L194) and 3 more |
239−| A97 | status.md is a 59 KB append-only log: a 16,412-character paragraph, a 115-row history table that repeats git log, and stale dates | Medium | Confirmed | docs | [docs/status.md:3](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/status.md#L3), [docs/status.md:68](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/status.md#L68), [docs/status.md:90](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/status.md#L90) and 2 more |
240−| A98 | `eq` is absent from the prelude and the checker has no gate-free type-variable constraint, and no doc lists either as outstanding | Medium | Partly | gap | [docs/open-questions.md:17](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/open-questions.md#L17), [docs/spec/decisions.md:31](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/spec/decisions.md#L31), [docs/spec/grammar.md:137](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/spec/grammar.md#L137) and 4 more |
241−| A99 | decisions.md's Core language row still says three rules are proposed, but core-language.md marks none and the decisions rows record them as adopted | Low | Confirmed | inconsistency | [docs/spec/decisions.md:63](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/spec/decisions.md#L63), [docs/spec/core-language.md:5](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/spec/core-language.md#L5), [docs/spec/decisions.md:21](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/spec/decisions.md#L21) and 2 more |
242−| A100 | The EBNF admits `[]` but not `m()`, the checker reports `[]` as unsupported rather than as the decided error, nothing tests `[]`, and open-questions Q6 is stale | Low | Confirmed | inconsistency | [docs/spec/grammar.md:245](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/spec/grammar.md#L245), [docs/spec/grammar.md:250](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/spec/grammar.md#L250), [docs/spec/decisions.md:13](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/spec/decisions.md#L13) and 6 more |
243−| A101 | compiler.md's chapter table omits `%union-analysis`, which holds the golden-types and module-checking entry points; the page and the file header still say milestone 1 | Low | Confirmed | docs | [docs/compiler.md:3](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/compiler.md#L3), [docs/compiler.md:23-38](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/compiler.md#L23-L38), [docs/compiler.md:44-57](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/compiler.md#L44-L57) and 4 more |
244−| A102 | Three docs say starting urbit eval and building the library takes about 8 s; it takes about 23 s now | Low | Confirmed | docs | [docs/development.md:122](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/development.md#L122), [docs/compiler.md:209](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/compiler.md#L209), [docs/status.md:112](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/status.md#L112) |
245−| A103 | open-questions.md mostly holds settled questions, against its own stated rule, its 'as of' date is stale, and status.md cites a nonexistent 'corpus question 3' | Low | Confirmed | docs | [docs/open-questions.md:3](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/open-questions.md#L3), [docs/open-questions.md:21](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/open-questions.md#L21), [docs/status.md:108](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/status.md#L108) and 1 more |
246−| A104 | 'The doc itself is the authority' conflicts with the repo spec, which records decisions the Claude doc does not yet have | Low | Confirmed | inconsistency | [docs/development.md:9](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/development.md#L9), [README.md:3](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/README.md#L3), [docs/README.md:3](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/README.md#L3) and 2 more |
247−| A105 | prelude-inventory.md says nine molds already in the prelude 'can be written once present', and its 2a table disagrees with its own paragraph | Low | Confirmed | docs | [docs/prelude-inventory.md:141-159](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/prelude-inventory.md#L141-L159), [docs/prelude-inventory.md:35-52](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/prelude-inventory.md#L35-L52), [prelude.jibb:58-97](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb/prelude.jibb#L58-L97) |
248−| A106 | Tool narratives have been appended under Ground rules and Commits in development.md, and status content sits in the docs/README.md index | Low | Confirmed | docs | [docs/development.md:17](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/development.md#L17), [docs/development.md:236](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/development.md#L236), [docs/README.md:5](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/README.md#L5) |
249−| A107 | The repo has no licence and does not state the licences of its vendored code; CI is deliberately deferred to milestone 7 | Low | Partly | gap | [README.md:1](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/README.md#L1), [vendor/SOURCES.txt:1](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/vendor/SOURCES.txt#L1), [tests/importer/tlon-license.txt:1](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/importer/tlon-license.txt#L1) and 1 more |
250−
251−### Example desk, host desk and vendored files
252−
253−| # | Finding | Severity | Verdict | Kind | Where |
254−| --- | --- | --- | --- | --- | --- |
255−| A108 | my-app files are copied 28 times under tests/, with sync pairs hand-coded in 8 tools and several copies never checked | Medium | Confirmed | duplication | [tools/type-page-main-test:15-30](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/type-page-main-test#L15-L30), [tools/type-todo-full-test:16-19](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/type-todo-full-test#L16-L19), [tools/type-todo-partial-test:18-21](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/type-todo-partial-test#L18-L21) and 9 more |
256−| A109 | Nothing compares the five todo reader copies (todo-sur.txt and four mark copies) with my-app. Clay checks cover only item, action and the todo-action mark | Medium | Partly | test-gap | [tools/type-todo-partial-test:18-34](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/type-todo-partial-test#L18-L34), [tools/type-todo-full-test:16-43](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/type-todo-full-test#L16-L43), [tools/type-page-main-test:15-40](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/type-page-main-test#L15-L40) and 5 more |
257−| A110 | The example marks are built only as Hoon cores (%ca); no test builds them as marks (%cb) or checks their vale | Low | Confirmed | test-gap | [tests/clay-fixtures/build.txt:6-11](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/clay-fixtures/build.txt#L6-L11), [tests/clay-fixtures/mark-shape.txt:4](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/clay-fixtures/mark-shape.txt#L4), [tools/ship:685](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L685) |
258−| A111 | The my-app assembly skips jibb-dev/tests, which does not exist | Low | Confirmed | dead-code | [tools/ship:63](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L63), [README.md:81](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/README.md#L81), [tools/ship:2261](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L2261) |
259−| A112 | Milestone-4 tension: my-app deliberately holds the failing buttons example, and its doc-identical theme names a static font that milestone 4 will treat as missing | Low | Partly | gap | [my-app/ui/components/buttons.jibb:3](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/my-app/ui/components/buttons.jibb#L3), [my-app/ui/theme.jibb:7](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/my-app/ui/theme.jibb#L7), [docs/prompts/milestone-2.md:154](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/prompts/milestone-2.md#L154) and 4 more |
260−| A113 | Importer-only fixtures (sur/import-fixture.hoon, mar/label.hoon) sit on the example desk, and the Tlon probe needs a temp-copy, sync and restore of my-app | Low | Partly | simplification | [my-app/sur/import-fixture.hoon:1-7](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/my-app/sur/import-fixture.hoon#L1-L7), [my-app/mar/label.hoon:1](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/my-app/mar/label.hoon#L1), [tools/clay-fixtures:144-187](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/clay-fixtures#L144-L187) and 2 more |
261−| A114 | The importer fixture's $^(@ud [a=@ud b=@t]) is a malformed $^ whose mold accepts only atom-headed cells, though its type (and the import) admits atoms | Low | Partly | bug | [my-app/sur/import-fixture.hoon:6](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/my-app/sur/import-fixture.hoon#L6), [tests/clay-fixtures/ford-nested-union-expected.txt:1](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/clay-fixtures/ford-nested-union-expected.txt#L1), [tests/clay-fixtures/ford-nested-union-bridge-expected.txt:1](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/clay-fixtures/ford-nested-union-bridge-expected.txt#L1) and 1 more |
262−| A115 | my-app/mar/todo-action.hoon claims it is 'not supplied by the design doc', but apart from that comment line it is the overview's block | Low | Partly | inconsistency | [my-app/mar/todo-action.hoon:1](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/my-app/mar/todo-action.hoon#L1), [docs/spec/overview.md:310-316](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/spec/overview.md#L310-L316), [tests/type-api-paths/todo-action.txt:1](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/type-api-paths/todo-action.txt#L1) and 1 more |
263−| A116 | No %todo/%blog fixture agents and no page embedding basket exist yet for milestones 5-6, and my-app's agentless desk.bill `~` is undocumented | Low | Partly | gap | [my-app/desk.bill:1](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/my-app/desk.bill#L1), [docs/spec/overview.md:350](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/spec/overview.md#L350), [docs/spec/overview.md:358](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/spec/overview.md#L358) and 4 more |
264−| A117 | Every desk gets all vendor packages by documented design (so app desks carry lib/test.hoon), and the zuse kelvin is hand-copied in two desks | Low | Partly | simplification | [tools/ship:59-69](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L59-L69), [tools/ship:881-884](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/ship#L881-L884), [vendor/SOURCES.txt:9-10](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/vendor/SOURCES.txt#L9-L10) and 3 more |
265−| A118 | SOURCES.txt credits the docket files to urbit/urbit's legacy pkg/landscape and records a machine-local path; the files themselves are current | Low | Partly | docs | [vendor/SOURCES.txt:1-15](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/vendor/SOURCES.txt#L1-L15) |
266−
267−### Architecture (cross-cutting)
268−
269−| # | Finding | Severity | Verdict | Kind | Where |
270−| --- | --- | --- | --- | --- | --- |
271−| A119 | The one-site keyed-view screen skips ordinary inference for all five program components, so a fully annotated, valid program is rejected | High | Confirmed | bug | [jibb.hoon:10293](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10293), [jibb.hoon:12975-13038](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L12975-L13038), [jibb.hoon:13595](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L13595) and 3 more |
272−| A120 | 49 near-identical type-*-test scripts each start an eval and rebuild the library | Medium | Confirmed | tooling | [tools/type-closed-gate-guards-test:1-29](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/type-closed-gate-guards-test#L1-L29), [tools/type-todo-full-test:19-98](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/type-todo-full-test#L19-L98), [tools/golden:61](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/golden#L61) |
273−| A121 | The checker grows by example-fitted recovery slices rather than a module-wide deferred-constraint core; the brief suggests that core but does not prescribe it | Medium | Partly | gap | [docs/prompts/milestone-2.md:130-142](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/prompts/milestone-2.md#L130-L142), [docs/spec/implementation-plan.md:15](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/spec/implementation-plan.md#L15), [jibb.hoon:4674-4691](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L4674-L4691) and 2 more |
274−| A122 | The partial golden report and the full-module interface are separate pipelines with duplicated finalization, and the typed goldens exercise only the report | Medium | Partly | inconsistency | [jibb.hoon:14385-14510](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14385-L14510), [jibb.hoon:10266-10286](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10266-L10286), [jibb.hoon:14176-14184](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14176-L14184) and 1 more |
275−| A123 | %gate and %gate-wide carry identical fields and the checker handles both identically | Low | Confirmed | simplification | [jibb.hoon:945-948](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L945-L948), [jibb.hoon:8559-8575](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L8559-L8575), [jibb.hoon:9848-9862](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L9848-L9862) |
276−| A124 | Hard-coded budgets are scattered, and the printer's 26-variable cap also gates interface acceptance | Low | Confirmed | robustness | [jibb.hoon:10279](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10279), [jibb.hoon:10095](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10095), [jibb.hoon:14939](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L14939) and 3 more |
277−| A125 | The 27-field istate is built from positional literals in 10 places, and resolver arms take up to 19 positional arguments | Low | Confirmed | robustness | [jibb.hoon:5807](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L5807), [jibb.hoon:10287-10297](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10287-L10297), [jibb.hoon:10309-10324](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10309-L10324) |
278−| A126 | Tests call 137 internal library arms directly, coupling guards to the current code shape | Low | Confirmed | test-gap | [tests/lib/jibb-deferred.hoon:1](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/lib/jibb-deferred.hoon#L1), [tests/lib/jibb-cell-branch.hoon:1](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/lib/jibb-cell-branch.hoon#L1), [tests/lib/jibb-generic-pattern.hoon:1](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/lib/jibb-generic-pattern.hoon#L1) |
279−| A127 | About 586 lines of jibb-import.hoon, which app desks vendor, are test fixtures and printers | Low | Confirmed | simplification | [jibb-import.hoon:1720-2308](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb-import.hoon#L1720-L2308), [jibb.hoon:5555-5615](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L5555-L5615), [README.md:11](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/README.md#L11) |
280−| A128 | my-app sources are copied 28 times under tests, with 9 hand-written byte checks in 8 tools | Low | Confirmed | duplication | [tools/type-page-main-test:14-31](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/type-page-main-test#L14-L31), [tests/golden/types-module-fixtures/modules/ui/api/blog.jibb:1](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/golden/types-module-fixtures/modules/ui/api/blog.jibb#L1) |
281−| A129 | Several AST walker families and itype predicates repeat the same recursion skeleton | Low | Partly | simplification | [jibb.hoon:7097-7223](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L7097-L7223), [jibb.hoon:9917-10022](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L9917-L10022), [jibb.hoon:11059-11297](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L11059-L11297) and 2 more |
282−| A130 | Dead arms, copy-pasted -source/-graph twins and many golden-types wrappers | Low | Partly | duplication | [jibb.hoon:8591-8603](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L8591-L8603), [jibb.hoon:8661-8666](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L8661-L8666), [jibb.hoon:10142-10145](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10142-L10145) and 6 more |
283−| A131 | The library header and compiler.md chapter map are stale (milestone 1, no %union-analysis), and %union-analysis mislabels about 4,700 lines | Low | Partly | inconsistency | [jibb.hoon:1-36](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L1-L36), [jibb.hoon:10452](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10452), [docs/compiler.md:3](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/compiler.md#L3) and 2 more |
284−| A132 | The prelude source is reparsed on each direct-prelude-evidence call, and program-recovery-names is recomputed for every definition | Low | Partly | performance | [jibb.hoon:8633-8647](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L8633-L8647), [jibb.hoon:10293](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10293), [jibb.hoon:11488-11492](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L11488-L11492) and 2 more |
285−
286−### Found by the completeness pass
287−
288−| # | Finding | Severity | Verdict | Kind | Where |
289−| --- | --- | --- | --- | --- | --- |
290−| A133 | Loobean, unit/list and union ?- branches join arm results by three different rules: a loobean branch rejects a decimal literal against @ud even under ^- @ud, a unit/list branch unifies them but cannot widen, and a union branch requires syntactically equal normalized types | Medium | Confirmed | inconsistency | [jibb.hoon:8518-8519](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L8518-L8519), [jibb.hoon:7671-7672](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L7671-L7672), [jibb.hoon:7841-7842](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L7841-L7842) and 2 more |
291−| A134 | Printed types name the private prelude module: `(ask.internal @ud)` and `(unit qath.internal)` appear when ask or qath is reached through page or theme, and a golden and a ship test lock this in | Medium | Confirmed | bug | [jibb.hoon:11423-11436](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L11423-L11436), [prelude.jibb:3](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb/prelude.jibb#L3), [prelude.jibb:338](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb/prelude.jibb#L338) and 6 more |
292−| A135 | Top-level resolution is a whole-module fixpoint that resolves one link of a forward chain per pass. It re-infers every unresolved definition and rescans the module on each pass, giving roughly cubic cost, and the SCC order it already computes is used only for cycles. | Medium | Partly | performance | [jibb.hoon:10309-10328](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10309-L10328), [jibb.hoon:10293](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10293), [jibb.hoon:10303](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L10303) and 6 more |
293−| A136 | The type printer leaves right-nested tuples unflattened and does not name non-recursive records or imported non-recursive Hoon molds; the missing-tag error for a named imported union lists its cases instead of naming it | Low | Partly | inconsistency | [jibb.hoon:9570](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L9570), [jibb.hoon:9562-9565](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/jibb-dev/lib/jibb.hoon#L9562-L9565), [tests/golden/types-missing-tag-imported/types.txt:2-3](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tests/golden/types-missing-tag-imported/types.txt#L2-L3) and 5 more |
294−| A137 | Every eval tool compiles with `!:`, which makes checker work about 2.2-2.6x slower and library build about 20% slower than a ship build; docs/ never says so, though the published figures are caveated A/B comparisons and status.md's 8 s startup figure is stale | Low | Partly | docs | [tools/urbit_eval.py:176-185](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/tools/urbit_eval.py#L176-L185), [docs/compiler.md:65](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/compiler.md#L65), [docs/compiler.md:67](https://github.com/iko-soy/jibb/blob/4bf477e2c4a093f7d2d6aa2bff1ce5858bd98e36/docs/compiler.md#L67) and 5 more |
docs/reviews/2026-11-02-syntax-review.mddeleted−502
@@ -1,502 +0,0 @@
1−# Syntax review, 2026-11-02
2−
3−A review of Jibb's syntax at [`0858191`](https://github.com/iko-soy/jibb/commit/0858191ab08738c4da5c6d84f00492e629564e73), asked for in the project chat: how can the syntax be improved for readability, consistency, ambiguity and ergonomics? Every proposal here is a proposal. Under the ground rules, a language change is agreed by @iko and recorded in [decisions.md](../spec/decisions.md) before the code changes, and the spec text is @iko's too. Nothing in the implementation was changed.
4−
5−How it was done: five reviewers each read the spec, the prelude, the example desk and the parser's design notes through one lens (readability, consistency, ambiguity, ergonomics for Hoon and Elm programmers, and growth). Their 28 proposals, and 11 of my own, were merged into 22. Three verifiers then tried to refute each one, mostly by running the snippet through the real parser and partial checker (`tools/golden --dir <folder> --show` under urbit eval, vere 4.6), and by checking Hoon's behaviour with `urbit eval`. 15 survived, most of them revised; 7 were dropped. [How to rerun a probe](#how-to-rerun-a-probe) is at the end.
6−
7−This review does not restate the language rulings that [the repository review](2026-11-02-questions.md) raised (questions 16 to 28, now listed in [open-questions.md](../open-questions.md) under "Review rulings waiting for @iko"). Where a proposal extends one of them, it says so. Proposals here are numbered S1 to S15 so they don't collide with those numbers. "Review question N" means a question in that file, and "open question N" means item N of [open-questions.md](../open-questions.md).
8−
9−## Outcome, 2026-11-03
10−
11−Montelot decided ten of the proposals on 2026-11-03, and they were built the same day. [decisions.md](../spec/decisions.md) has a row for each, dated 2026-11-03, and [prompts/syntax-review-follow-up.md](../prompts/syntax-review-follow-up.md) lists what is left.
12−
13−| # | Decision | Built |
14−| --- | --- | --- |
15−| S1 | Not as proposed: an explicit `unface` that strips every face from a type, reserved like `proj`, instead of ignoring sample names when gates unify. Step 1 too: a capital binds only the type under a face | `unface` yes; step 1 waits for the checker core of review question 5 |
16−| S2 | Yes, and a `?-` that begins a body's final line may also take its arms at its own depth, without indenting them | Yes |
17−| S4, S5, S6, S7 | Yes | Yes, with gaps listed in the follow-up prompt |
18−| S11, S12, S13, S15 | Yes; S12's prelude rewrite waits for a checker that types nested patterns | Yes |
19−| S3, S8, S9, S10, S14 | Not decided | No |
20−
21−The sections below are the review as written on 2026-11-02, before these decisions.
22−
23−## Summary
24−
25−- **The syntax is in good shape.** Open brackets without closers, tightness as the one disambiguator, one exhaustive `?-`, named unions, `|=%tag` constructors and named changes all read well, and nearly every slip the reviewers tried gets an error at the right character. The [keep list](#what-to-keep) says what not to change.
26−- **Three changes would help most, and each needs @iko.** Gates whose parameters are named differently can't fit each other today, which is why the prelude writes 27 gates as `|= args=[…]` followed by a one-arm `?-` ([S1](#s1-let-gates-with-differently-named-parameters-fit-each-other)). A cast or trace can't be followed by its expression at the same depth, as Hoon's tall form does, so every one adds an indentation level ([S2](#s2-let-a-bodys-last---or--take-the-rest-of-the-body-at-the-same-depth)). And no binder may reuse a prelude name, so `text`, `head`, `row`, `max` and soon about 110 more everyday words can't name a local ([S3](#s3-let-local-binders-reuse-prelude-value-names)).
27−- **Two literal and pattern rules accept code that is almost certainly wrong.** A bare decimal fits any aura, so `[%every 1 |=%tick]` is a timer of 1/2^64 s and `(text 5)` renders a control byte ([S4](#s4-let-a-bare-decimal-fit-only-ud-and-its-ancestors)). A tag written without its `%` in the last arm silently becomes a catch-all ([S5](#s5-reject-a-pattern-name-that-spells-one-of-the-subjects-tags)).
28−- **Much can be done without changing the language.** Better messages for Hoon and Elm habits ([S9](#s9-name-the-hoon-or-elm-habit-behind-each-likely-slip)), an EBNF that says what the parser accepts ([S10](#s10-make-the-ebnf-say-what-the-parser-accepts)), and a canonical layout for casts ([S13](#s13-put-a-cast-whose-expression-takes-deeper-lines-at-the-end-of-its-line)).
29−
30−## The proposals at a glance
31−
32−Links in the "Today" column go to the code at `0858191`.
33−
34−| # | Proposal | Today | Proposed | Language change? | Touches | Benefit |
35−| --- | --- | --- | --- | --- | --- | --- |
36−| [S1](#s1-let-gates-with-differently-named-parameters-fit-each-other) | Gates with differently named parameters fit each other | `~[lth2 lte2]` and `(turn pairs \|=([k v] k))` are type errors; the prelude uses unfaced `args=` ([prelude.jibb:52](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/jibb-dev/lib/jibb/prelude.jibb#L52-L58)) | Sample names label a gate but are ignored when two gate types unify | Yes, a typing rule | [decisions.md:33](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/decisions.md?plain=1#L33), [open question 8](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/open-questions.md?plain=1#L30) | High |
37−| [S2](#s2-let-a-bodys-last---or--take-the-rest-of-the-body-at-the-same-depth) | Hoon's backstep for a body's last `^-`, `~&` or `\|=` | `^- @ud` above `n` at the same depth is an error ([grammar.md:54](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/grammar.md?plain=1#L54)) | The rest of the body at the same depth is the rune's last child | Yes, layout | [grammar.md:54, :61](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/grammar.md?plain=1#L54-L61) | High |
38−| [S3](#s3-let-local-binders-reuse-prelude-value-names) | Local binders may reuse prelude value names | `[%typed text]` is "pattern binder shadows a name" ([todo-list.jibb:18](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/my-app/ui/todo-list.jibb#L18)) | Samples, pattern binders and local `++` may hide a prelude value | Yes, scope | [decisions.md:11](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/decisions.md?plain=1#L11), [open question 26](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/open-questions.md?plain=1#L51) | High |
39−| [S4](#s4-let-a-bare-decimal-fit-only-ud-and-its-ancestors) | A bare decimal fits only `@ud`, `@u`, `@` and `*` | `^- @dr 30`, `^- @p 0`, `(text 5)` check ([grammar.md:167](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/grammar.md?plain=1#L167)) | Other auras take their own literals: `~s30`, `~zod`, `"5"` | Yes, literals | [grammar.md:21](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/grammar.md?plain=1#L21); extends review question 16 | Medium |
40−| [S5](#s5-reject-a-pattern-name-that-spells-one-of-the-subjects-tags) | A pattern name that spells a case's tag is an error | `stop` for `%stop` in the last arm checks as a catch-all | "`stop` binds a name, but s can be the case %stop here" | Yes, a checker rule | [grammar.md:184](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/grammar.md?plain=1#L184) | Medium |
41−| [S6](#s6-let-a-changes-item-name-a-wing) | A change's item may name a wing | `m(open.cart=x)` is "expected a named item" | `m(open.cart=x)`, as Hoon's `m(open.cart x)` | Yes, small | [decisions.md:11](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/decisions.md?plain=1#L11) | Low |
42−| [S7](#s7-allow-type-variables-longer-than-one-letter) | Type variables longer than one letter | `(program D X M)`; `Msg` is a lexer error ([grammar.md:286](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/grammar.md?plain=1#L286)) | `(program Data Model Msg)`, printed as written | Yes, lexer and printer | [parser reading 11](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/open-questions.md?plain=1#L85) | Low |
43−| [S8](#s8-catch-a-route-segment-that-should-have-been-a-value) | Catch a route segment that should have been a value | `%/blog/slug.p` is the literal text "slug.p" | An error at milestone 4's route check, for two narrow cases | Yes, milestone 4 | [decisions.md:83](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/decisions.md?plain=1#L83) | Low |
44−| [S9](#s9-name-the-hoon-or-elm-habit-behind-each-likely-slip) | Messages that name the Hoon or Elm habit | `(a == b)` is blamed on the closer `==`; `True` is "found `T`" | "Jibb has no operators: write (eq a b)" and so on | No, messages | [grammar.md:68](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/grammar.md?plain=1#L68-L82) | High |
45−| [S10](#s10-make-the-ebnf-say-what-the-parser-accepts) | The EBNF says what the parser accepts | No `sample` rule; `change` allows unnamed items; `knot` may be empty ([grammar.md:221](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/grammar.md?plain=1#L221-L289)) | Productions for samples, edits, line kinds, knots and imports | No, spec text | [parser readings 1-5](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/open-questions.md?plain=1#L75-L79) | High |
46−| [S11](#s11-say-which-deeper-lines-are-allowed) | Say which deeper lines are allowed | "a deeper line continues the line above" ([grammar.md:9](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/grammar.md?plain=1#L9)), though a call never continues | List what takes deeper lines; say an opener's line splits on spaces | No, spec text | [decisions.md:42](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/decisions.md?plain=1#L42) | Medium |
47−| [S12](#s12-say-that-cell-patterns-nest-and-flatten-the-prelude-later) | Say that cell patterns nest; flatten the prelude later | "not lists or pairs" reads as "no nesting"; `hunt` uses four `?-`s ([prelude.jibb:203](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/jibb-dev/lib/jibb/prelude.jibb#L203-L214)) | Pattern rows such as `[[~ a] [~ b]]`; one `?-` once the checker can | No | [grammar.md:184](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/grammar.md?plain=1#L184) | Medium |
48−| [S13](#s13-put-a-cast-whose-expression-takes-deeper-lines-at-the-end-of-its-line) | Canonical place for a cast | `^- @ud` alone below `\|=` pushes the body right ([prelude.jibb:376](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/jibb-dev/lib/jibb/prelude.jibb#L376-L380)) | `++ lent \|= xs=(list A) ^- @ud`, body below | No, layout convention | [decisions.md:97](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/decisions.md?plain=1#L97) | Medium |
49−| [S14](#s14-pin-down-the-spellings-the-formatter-writes) | Spellings the formatter writes | `(text …)` beside `field …` on open-list lines; `align=align` beside `=msg` | One spelling each; alignment stays the writer's | No, layout convention | [decisions.md:16, :97](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/decisions.md?plain=1#L16) | Low |
50−| [S15](#s15-name-the-fields-when-the-examples-build-a-model) | Name the fields when the examples build a model | `[[~ %.n] ""]` ([basket.jibb:15](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/my-app/ui/basket.jibb#L15)) | `[cart=[items=~ open=%.n] note=""]` | No, examples | none | Low |
51−
52−Seven proposals were dropped after verification; [the dropped table](#considered-and-dropped) gives each reason.
53−
54−## Language changes
55−
56−Each of these needs @iko's agreement before any code changes.
57−
58−### S1. Let gates with differently named parameters fit each other
59−
60−**Problem.** A cell sample's names become faces of the gate's type: `|= [a=A b=B]` and `|= [a b]` both give `$-([a=A b=B] …)`. Faces are part of record types, and two different faces don't unify ([decisions.md:33](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/decisions.md?plain=1#L33), [settled open question 8](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/open-questions.md?plain=1#L30)). So a gate's parameter names are part of its interface. Two comparators named differently can't share a list, a lambda over Hoon's `[p= q=]` pairs can't be passed to `turn`, and renaming a parameter is a breaking type change. Hoon ignores faces when it nests types, so Hoon programmers don't expect this.
61−
62−The prelude works around it. 30 of its gates take an unfaced `args=[…]` or `gates=[…]` sample, and 27 then open a one-arm `?-` whose only job is to name the parts ([prelude.jibb:33, 45, 53 and 24 more](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/jibb-dev/lib/jibb/prelude.jibb#L52-L58)). That costs two lines and two indentation levels per gate, and reads as a branch where nothing branches. Meanwhile the element constructors and the spec's examples face their samples (`|= [=msg m=model]`), so the prelude and the spec teach two styles, and about 110 inventory gates are still to be written.
63−
64−There are two separate causes, and they need separate fixes:
65−
66−1. A capital takes a face. `(hunt lth2 `1 `2)` fails because `lth2`'s type `$-([x=A y=A] ?)` meets `hunt`'s slot `$-([A A] ?)`, and the capital `A` takes `x=` from one position and `y=` from the other. [Open question 8](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/open-questions.md?plain=1#L30) says only that an unnamed position takes a face; it doesn't say whether a capital does.
67−2. The decided rule itself. `~[lth2 lte2]` and `(turn pairs |=([k v] k))` fail because two explicit faces meet.
68−
69−**Evidence** (probes with the prelude loaded):
70−
71−```
72−++ lth2 |= [x=A y=A] (gth y x)
73−++ lte2 |= [a=A b=A] (not (gth a b))
74−++ pickers ~[lth2 lte2] :: list items do not have compatible types
75−++ use-hunt (hunt lth2 `1 `2) :: argument has type $-([x=A y=A] ?)
76−++ c2 ^- $-([A A] ?) lth2 :: cast mold and expression type do not unify
77−++ pairs ^- (list [p=@t q=@ud]) ~[["a" 1]]
78−++ keys (turn pairs |=([k v] k)) :: argument has type $-([k=A v=B] A)
79−```
80−
81−In Hoon, `^- $-([x=@ y=@] @) |=([a=@ b=@] a)` and `(turn ~(tap by m) |=([k=@t v=@ud] k))` both compile. A faced gate already fits a concrete unfaced slot in Jibb, as `^- $-([@ud @ud] @ud) sum` does, so the failures are confined to the two causes above.
82−
83−**Before**, [prelude.jibb:52-58](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/jibb-dev/lib/jibb/prelude.jibb#L52-L58):
84−
85−```
86−++ turn |= args=[(list A) $-(A B)]
87− ?- args
88− [xs f]
89− ^- (list B)
90− ?- xs
91− ~ ~
92− [item rest] [(f item) (turn rest f)]
93−```
94−
95−**After.** Step 1 settles a reading and reopens nothing: a face belongs to its position, and a capital binds only the type under it, so `[A A]` fits `[x=@ y=@]`. Step 2 is the ruling: the names a cell sample binds, faced or bare, are the gate's labels. They bind in the body, print in its type, check a direct call's argument and feed `proj` and route binding, which reads `load`'s own labels. They are ignored when the gate's type unifies with another type and never flow into a capital, and labels that differ where two gate types meet are dropped.
96−
97−```
98−++ pickers ~[lth2 lte2] :: (list $-([A A] ?))
99−++ use-hunt (hunt lth2 `1 `2) :: (unit @ud), step 1
100−++ keys (turn pairs |=([k v] k)) :: (list @t), step 2
101−(sum [p=1 q=2]) :: still an error: a direct call checks labels
102−
103−:: after step 2, the prelude can name its parameters (with S13's cast placement):
104−++ turn |= [xs=(list A) f=$-(A B)] ^- (list B)
105− ?- xs
106− ~ ~
107− [item rest] [(f item) (turn rest f)]
108−```
109−
110−**Compatibility.** Only errors become meaning, except that step 1 changes some printed types: `(diff-slot lth2)` prints `$-([A A] ?)` where it printed `$-([x=A y=A] ?)`. Data records keep today's rule: `[hi=10 lo=0]` where `[lo=@ud hi=@ud]` is expected stays an error. A scratch rewrite of the whole prelude with S1, S12 and S13, in syntax that parses today, went from 431 to 347 code lines and from a deepest indent of 16 to 8; S1 accounts for about 54 of the 84 lines.
111−
112−**Parser.** None. `+read-sample` already tells binders, faces and molds apart ([jibb.hoon:3772](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/jibb-dev/lib/jibb.hoon#L3772-L3800)). The checker records faces per position (step 1) and keeps a gate's labels apart from its sample type (step 2).
113−
114−**Touches.** Step 2 reopens [decisions.md:33](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/decisions.md?plain=1#L33) and settled open question 8 (both 2026-10-30) for gate samples only. It stays consistent with Sample names (:19), `proj` (:41) and Routing (:92).
115−
116−**Alternatives.** (b) Make a cell sample's names pure binders, out of the type altogether, as `n` in `|= n=@ud` already is. It is simpler, but it breaks `(f (proj wider))` into a faced sample, which checks today, and loses parameter names in printed types such as `button`'s. (c) Keep the rule and the `args=` idiom, and only make the error say that just the faces differ.
117−
118−### S2. Let a body's last `^-`, `~&` or `|=` take the rest of the body at the same depth
119−
120−**Problem.** A tall rune's last child sits on its line or deeper ([grammar.md:54](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/grammar.md?plain=1#L54), and `~&` "runs the body below", [:61](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/grammar.md?plain=1#L61)). So every cast or trace whose expression goes below adds an indentation level. Adding one `~& msg` while debugging, with the one debugging rune Jibb keeps, re-indents every line below it, and removing it re-indents them again. Hoon programmers write `|= a=@`, `^- @ud` and `~& x` each on its own line with what follows at the same column. In Jibb that is an error.
121−
122−**Evidence.** `++ f |= n=@ud` above `^- @ud` and `n` at the same depth gives "expected an expression, or a body on deeper lines, found a line at the same depth"; the `~&` version gives "expected `~&`'s body on deeper lines". Ten of the prelude's casts sit alone on their line ([prelude.jibb:47, 55, 108, 158, 260, 271, 297, 323, 377, 395](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/jibb-dev/lib/jibb/prelude.jibb#L157-L161)). Eleven more sit on a `?-` arm's line, where the next same-depth line must stay the next arm, so this rule doesn't change them.
123−
124−**Before**, [todo-list.jibb:16-25](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/my-app/ui/todo-list.jibb#L16-L25) with a trace added, and [prelude.jibb:163-167](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/jibb-dev/lib/jibb/prelude.jibb#L163-L167):
125−
126−```
127−++ update |= [=msg m=model]
128− ~& msg
129− ?- msg
130− [%typed t]
131− …
132−
133−++ bond |= fallback=$-(~ A)
134− |= maybe=(unit A)
135− ?- maybe
136− ~ (fallback ~)
137− [~ value] value
138−```
139−
140−**After:**
141−
142−```
143−++ update |= [=msg m=model]
144− ~& msg :: insert or delete this one line; nothing else moves
145− ?- msg
146− [%typed t]
147− …
148−
149−++ bond |= fallback=$-(~ A)
150− |= maybe=(unit A)
151− ?- maybe
152− ~ (fallback ~)
153− [~ value] value
154−```
155−
156−The rule, for grammar.md's Runes: a body's final line may be a tall `^-`, `~&` or `|=`, or a chain of them such as `^- @ud ~& x`. When that line ends where the innermost rune's last child goes, the rest of the body at the same depth is that child: first its local `++` and `+$`, then its expression. It does not apply on a `?-` arm's line, on a line of an open bracket, after a bracket opened earlier on the line, at the top level, or to a definition's own expression: `++ inner |= y=@ud` above `(inner x)` stays an error.
157−
158−**Compatibility.** Only errors become meaning: a NEWLINE right after a body's final expression is always an error today. Of the golden corpus, only `lex-rune-layout-bad-3` flips, and its about.txt already calls the form "as Hoon's tall form would put it". The other cases that fail on "a line at the same depth" are at the top level, on arms, on definitions or in brackets, and keep their errors.
159−
160−**Parser.** Small, with no backtracking. The body loop already knows it has reached the final expression when the next token isn't `++` or `+$`. After a rune's head the next token is an expression start, INDENT (today's body) or NEWLINE (the new case). A "final line of a body, nothing open before" flag passes down the chain of runes on that line.
161−
162−**Touches.** grammar.md:54 and :61 and the EBNF's `rune`, for a body's final line only. No decisions row requires a deeper body. The formatter's one canonical layout ([decisions.md:97](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/decisions.md?plain=1#L97)) has to make this flat form canonical, or the "nothing else moves" benefit is lost.
163−
164−**Alternatives.** `^-` and `~&` only, leaving `|=`. Or no language change at all: [S13](#s13-put-a-cast-whose-expression-takes-deeper-lines-at-the-end-of-its-line) puts a cast on its `|=` line, which removes most of the cast drift today but does nothing for `~&`.
165−
166−### S3. Let local binders reuse prelude value names
167−
168−**Problem.** No name may shadow one in scope, "imports and the prelude included" ([grammar.md:101](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/grammar.md?plain=1#L101)). The prelude has 75 top-level values, and the inventory decision adds about 110 more, many of them everyday words: `at`, `end`, `cut`, `min`, `max`, `find`, `sort`, `trim`, `test`, `year`, `head`, `tail`, `in`, `by`, `to`. The element gates take `text`, `row`, `field`, `link`, `form` and `table`. So the natural name for a binder is often forbidden: the field `text=@t` is bound as `t` ([todo-list.jibb:18](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/my-app/ui/todo-list.jibb#L18)), 13 golden sources name a value `text-value`, and [settled open question 26](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/open-questions.md?plain=1#L51) renamed the grammar example's `at` to `sent-at`. Every name the prelude adds later can break code that bound it. The messages don't say which name clashed with what.
169−
170−**Evidence** (prelude loaded): `[%typed text] text` gives "pattern binder shadows a name"; `|= row=@ud row` gives "sample shadows a name"; a local `++ head 1` gives "local definitions shadow a name"; golden case [module-import-prelude-sample-shadow](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/tests/golden/module-import-prelude-sample-shadow/source.jibb) rejects `|=(same same)`.
171−
172−**Before** and **after**:
173−
174−```
175−:: today
176− ?- msg
177− [%typed t]
178− ?- (gth (lent (tuba (trip t))) 80)
179− %.y [m(draft=t error=`"Too long") ~]
180−
181−:: proposed
182− ?- msg
183− [%typed text]
184− ?- (gth (lent (tuba (trip text))) 80)
185− %.y [m(draft=text error=`"Too long") ~]
186−
187−++ text "hi" :: still an error, now naming both sides:
188− :: "`text` is the prelude gate text; a top-level name can't reuse it"
189−```
190−
191−The rule, for grammar.md:101: "No name may shadow one already in scope, with one exception: a sample, a pattern binder or a local `++` may reuse the name of a prelude value, which that scope then can't name. Top-level names, import faces and molds never shadow the prelude, and nothing shadows an import face or a name the module defines. `proj` stays reserved."
192−
193−**Compatibility.** Only errors become meaning; no valid program binds a prelude name today. Inside a scope that hides a prelude gate, using that gate is an error, and the message should name the hidden gate.
194−
195−**Parser.** None. The lowering renames such binders, since [core-language.md](../spec/core-language.md) assumes prelude names are never hidden; it already generates `_` names.
196−
197−**Touches.** The Syntax row ([decisions.md:11](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/decisions.md?plain=1#L11)) for local binders, and settled open question 26, which @iko decided on 2026-10-31 with the inventory decision already made. The new evidence is the size of that inventory. Decide it together with [S5](#s5-reject-a-pattern-name-that-spells-one-of-the-subjects-tags): today `add` written for `%add` happens to be caught as a shadowing error, and under S3 it would need S5 to be caught.
198−
199−**Not affected by S3.** The prelude's own `toggle |= [on=? …]` ([prelude.jibb:513](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/jibb-dev/lib/jibb/prelude.jibb#L513)) will collide if `on` is ever defined in the prelude, because a module can't shadow its own names; rename the face then.
200−
201−**Alternatives.** Let a module's top-level names shadow the prelude too: rejected, since a top-level `++ text` would hide the element gate in the whole module and Jibb has no qualifier to reach it. Or keep the rule and only improve the message.
202−
203−### S4. Let a bare decimal fit only `@ud` and its ancestors
204−
205−**Problem.** A bare decimal takes "any aura by context" ([grammar.md:21](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/grammar.md?plain=1#L21), [:167](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/grammar.md?plain=1#L167)). So a number written where a duration, date, ship or cord is expected compiles with a meaning nobody intends: `[%every 1 |=%tick]` fires every 1/2^64 s, `[%wait 30 %done]` waits about nothing, `(text 5)` renders the byte 0x05 and `^- @p 0` is `~zod`. Hoon rejects all of these (`mint-nice -need.@dr -have.@ud`), and "Literals: exactly Hoon's" ([decisions.md:12](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/decisions.md?plain=1#L12)) points the same way. Once review question 16 lands, `%1.000` fits only its own aura family, and `1.000` would be the looser of the two.
206−
207−**Evidence.** `^- @dr 30`, `^- @p 0`, `^- @t 5` and `^- (element !!) (text 5)` all check today. No source in my-app, jibb-dev or the docs relies on it.
208−
209−**After:**
210−
211−```
212−++ subs |= m=model
213− ~[[%every ~s1 |=%tick]] :: [%every 1 |=%tick]: "1 is a @ud; a duration is written ~s1"
214−++ note (text "5") :: (text 5): "5 is a @ud; text is written \"5\""
215−++ bump |= x=A (add x 1) :: unchanged: generic over its aura, so (bump ~s1) checks
216−```
217−
218−The rule, for grammar.md:21 and :167: a decimal is `@ud`, and also fits `@u`, `@` and `*`, as in Hoon. Where its `++` is generic over its aura it stays generic, as decisions.md:33 already says. Other auras take their own literals: `~s30`, `~2026.1.1`, `~zod`, `"5"`, `0x1`.
219−
220−**Compatibility.** Some programs that check today become errors. In the corpus only [types-partial-aura](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/tests/golden/types-partial-aura/source.jibb#L2) flips: `^- @ux 1`, which Hoon also rejects, becomes `0x1`. If @iko would rather keep `^- @ux 1`, allowing `@ux` and `@uv` is a stated deviation from Hoon.
221−
222−**Parser.** None. In the checker, the decimal constraint against a concrete atom ([jibb.hoon:4909-4914](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/jibb-dev/lib/jibb.hoon#L4909-L4914)) accepts only `ud`, `u` and the empty aura.
223−
224−**Touches.** grammar.md:21, :162 and :167. It extends review question 16 (a) to bare decimals without restating it.
225−
226−### S5. Reject a pattern name that spells one of the subject's tags
227−
228−**Problem.** A bare name in a pattern always binds ([grammar.md:184](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/grammar.md?plain=1#L184)), so a tag written without its `%` becomes a catch-all. In any arm but the last, review question 22's dead-arm error catches it. In the last arm it checks, and from then on it silently takes every case later added to the union, which switches off the exhaustiveness check that [decisions.md:30](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/decisions.md?plain=1#L30) relies on. In Hoon a bare `stop` in a `?-` arm is not a binder, so Hoon programmers expect an error.
229−
230−**Evidence.** grammar.md's own `step` example with `stop` for `%stop` as its last arm checks as `$-(step @t)`. `[typed t]` for `[%typed t]` checks too.
231−
232−**Before** and **after**, [grammar.md:210-216](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/grammar.md?plain=1#L210-L216) with one `%` dropped:
233−
234−```
235−++ describe |= s=step
236− ?- s
237− [%move %left n] "left {n}"
238− [%move %right n] "right {n}"
239− [t %draft] t
240− [t %sent sent-at] t
241− stop "stop"
242−:: today: accepted; binds stop and catches everything left
243−:: proposed: "`stop` binds a name, but s can be the case %stop here; write %stop, or * for a catch-all"
244−```
245−
246−The rule, a new sentence in Patterns: "A bare name in a pattern is an error where the subject's type at that position is a union, or a one-case mold, with a case whose constant there is the term that name spells. Positions typed by an aura, `*`, a type variable or a container's element are unaffected, so `[t %draft] t` still binds `t`, and `x` is still a catch-all on a `@tas` subject." The limit to union positions matters: under review questions 16 and 17 every name spells a constant that a `@tas` or `@t` position can hold.
247−
248−**Compatibility.** Only adds errors, and no golden, prelude, my-app or doc arm is affected. **Parser.** None; the exhaustiveness check already computes the remaining cases' constants. **Touches.** A type-directed rule, which [decisions.md:32](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/decisions.md?plain=1#L32) welcomes if the Grammar tab lists it.
249−
250−### S6. Let a change's item name a wing
251−
252−**Problem.** A change's items are single names, so updating a field of a nested record repeats the path, and a Hoon programmer's `m(open.cart x)` gets "expected a named item, found `open.cart`", which is wrong in spirit since the item is named. Hoon's `%=` takes wings: `=/ m [a=[b=1 c=2] d=3] m(b.a 5)` gives `[a=[b=5 c=2] d=3]`.
253−
254−```
255−:: today, synthetic: nothing in the repository writes a nested change yet
256−++ toggle-open |= m=model
257− m(cart=cart.m(open=(not open.cart.m)))
258−
259−:: proposed
260−++ toggle-open |= m=model
261− m(open.cart=(not open.cart.m))
262−```
263−
264−The rule: a change's item, inline or on a line of an open change, is `name=value` or `wing=value`, read through record fields only. Every value is computed from the original record, and two items that name the same field, or one inside the other, are an error. Tuples, samples and patterns keep plain names.
265−
266−**Compatibility.** Only errors become meaning: a wing followed tight by `=` parses nowhere today. [lex-tight-change-bad-5](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/tests/golden/lex-tight-change-bad-5/source.jibb) flips. **Parser.** Still LL(2); the lexer already emits the wing token. **Touches.** The Syntax row ("changes take one or more record items") and parser reading 4. The benefit is low: Elm has no nested update either, and no code here needs one yet. Whatever is decided, the message for `m(a.b 1)` should say "expected `=` right after `a.b`" (part of [S9](#s9-name-the-hoon-or-elm-habit-behind-each-likely-slip)).
267−
268−### S7. Allow type variables longer than one letter
269−
270−**Problem.** A type variable is one capital ([grammar.md:286](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/grammar.md?plain=1#L286)), so the architecture's molds read `(program D X M)`, with `X` for the model because `M` is taken, and the prose has to decode them. Hoon names `|$` parameters with words. The one-letter rule is the parser's own [reading 11](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/open-questions.md?plain=1#L85), never put to @iko.
271−
272−```
273−:: today, prelude.jibb:531-532; ++ id |= x=Msg x is "a type variable is one capital letter"
274−+$ program |$ [D X M]
275− [init=$-(D X) update=$-([M X] [X (list (cmd M))]) view=$-(X (element M)) subs=$-(X (list (sub M)))]
276−
277−:: proposed
278−+$ program |$ [Data Model Msg]
279− [ init=$-(Data Model)
280− update=$-([Msg Model] [Model (list (cmd Msg))])
281− view=$-(Model (element Msg))
282− subs=$-(Model (list (sub Msg)))
283−```
284−
285−`typevar = upper { lower | digit }`, so `Msg` and `T2` are variables and `AB` stays an error. Only a lexer error becomes meaning ([jibb.hoon:1357-1361](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/jibb-dev/lib/jibb.hoon#L1357-L1361)), and single capitals stay valid.
286−
287−Two conditions. The printer must print written names: today `program`'s `D X M` print as `A B C` ([types-prelude-ui/types.txt:22](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/tests/golden/types-prelude-ui/types.txt#L22)), so without that the names never reach an error message. And the spec should say plainly that capitalized names are variables and lowercase names are molds, the reverse of Elm, where `Msg` is a concrete type. The benefit is low: my-app writes one type variable in all.
288−
289−### S8. Catch a route segment that should have been a value
290−
291−**Problem.** A value goes into an application path in parentheses, `%/blog/(slug.p)`. A bare segment is a knot, and knots may hold dots, so `%/blog/slug.p` is the literal text "slug.p" and types as `qath` with no complaint. With `/ui/blog/_slug.jibb` present, milestone 4's route check as designed would accept it, and every card would link to one post. `%/blog/{slug}` is caught, but the message doesn't say how to put a value in a path.
292−
293−**After**, at milestone 4's route check and for a `@ta` or `@tas` parameter only: `%/blog/slug.p` is an error when it reads as a wing of a local binding ("write (slug.p) for its value, or (~.slug.p) for the text"), and `%/blog/slug` when it is the parameter's own name. Ordinary words stay literal links, since the prelude makes nearly every word a name in scope. The `{` message can improve now: "a segment's value goes in parentheses, as %/blog/(slug)".
294−
295−**Touches.** Refines [decisions.md:83](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/decisions.md?plain=1#L83) and :92. Low value until milestone 4.
296−
297−## No language change
298−
299−These change messages, spec text, examples or the formatter's choices. The spec text is still @iko's, but none of them changes what a program means.
300−
301−### S9. Name the Hoon or Elm habit behind each likely slip
302−
303−**Problem.** Jibb's messages for the Hoon forms grammar.md names as left out are good. The next most likely slips get messages that blame another construct, or say nothing useful. Each new message is chosen where the parser or lexer already fails, using tokens it already holds, so LL(2) and the no-backtracking rule are untouched.
304−
305−| Written | Today | Proposed message |
306−| --- | --- | --- |
307−| `(a == b)` | "the closer `==` is left out: indentation covers it" | "Jibb has no operators: write (eq a b)"; likewise `+`, `-`, `<`, `>`, `\|>`, `&&` |
308−| `?- -.a` | "a name starts with a letter, and Jibb has no operators" | "`-.a` is left out: write (head a), or switch on a itself with arms such as [%add n]"; `+.a` gets `(tail a)` |
309−| `(~(get by m) "a")` | "expected a space between items, found `(`" | "`~(arm door …)` is left out: call the group's gate, as (get.by m \"a\")" |
310−| `True` | "expected an expression, found `T`" | "names are lowercase: the loobeans are %.y and %.n, null is ~" |
311−| `[x :: xs]` | an error two lines later about a shallower line | "the `::` at 2:6 begins a comment: a list's head and tail are [x xs]" |
312−| `b=2 c=3` on a line of an open `[` | "`name=value` goes in a cell", though it is in one | "a bracket open at the end of its line takes one item per line" |
313−| `-- note` | "the closer `--` is left out" | "comments start with `::`" |
314−| `+(n)`, `$:`, `$@`, `$~`, `=\|`, `^+`, `` `@ud`x `` | generic messages | `(succ n)`; a record; a `+$` with cases; no defaults; `^-` with a mold or `_`; `^- @ud x` |
315−| `\x -> …`, `{ m \| … }`, `f(x)`, `_` in a pattern | generic messages | `\|=(x …)`; `m(note="x")`; `(f x)`; `*` |
316−| `(lent "abc")`; a shadowing binder | a type mismatch; "pattern binder shadows a name" | "a string is a cord; (trip \"abc\") is its tape"; "binder `text` shadows the prelude's `text`" |
317−
318−**Compatibility.** Error text only, plus a one-bit layout flag on a token followed by a comment, used only for the `[x :: xs]` message. The golden `tree.txt` files of the affected `lex-*`, `inline-leftout-*` and types cases change.
319−
320−### S10. Make the EBNF say what the parser accepts
321−
322−**Problem.** The tree-sitter grammar and the formatter ([decisions.md:96-97](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/decisions.md?plain=1#L96-L97)) will be written from the EBNF, and grammar.md calls itself "the syntax the compiler accepts". In several places the EBNF and the parser disagree, and every mismatch below was reproduced:
323−
324−- Samples: `rune = "|=" field …` reuses `field`, so a bare name in a sample reads as a mold reference, but it binds ([decisions.md:19](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/decisions.md?plain=1#L19)), at any depth, while inside a faced mold such as `p=[a b]` the same names are molds. A cell sample's `[` closes on its line.
325−- `change` uses `item`, whose name is optional, though every item and every line of an open change must be named.
326−- `group` and `list` share `line = [ name "=" ] expr`, but their lines take no `name=`.
327−- `knot` may be empty, so the EBNF admits `//` and a trailing `/`; `/` alone is the empty path, which `pathlit` doesn't admit.
328−- `/%` takes any `term`, but only `%name` works; a `/=` path needs a segment.
329−
330−**After** ([grammar.md:221-289](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/grammar.md?plain=1#L221-L289)):
331−
332−```
333−import = "/-" name | "/%" "%" name | "/=" name "/" knot { "/" knot } ;
334−change = wing "(" edit { edit } ")" | wing "(" { edit } elines ; (* "(" tight after the wing; m() is an error, review question 19 *)
335−edit = name "=" operand ;
336−elines = INDENT name "=" expr { NEWLINE name "=" expr } DEDENT ;
337−group = "(" expr ")" | "(" { operand } xlines ;
338−list = "~[" { operand } "]" | "~[" { operand } xlines ;
339−tuple = "[" item { item } "]" | "[" { item } ilines ; (* [] is an error, review question 19 *)
340−item = [ name "=" ] operand ;
341−xlines = INDENT expr { NEWLINE expr } DEDENT ; (* lines take no name= *)
342−ilines = INDENT [ name "=" ] expr { NEWLINE [ name "=" ] expr } DEDENT ;
343−sample = name (* one name, no ".": binds, at any depth *)
344− | name "=" mold | "=" name (* a name inside the mold is a mold *)
345− | "[" sample { sample } "]" (* a cell of samples; closes on its line *)
346− | mold ; (* any other mold, never a lone name or "[":
347− binds nothing, as |= ~ or |= post.blog *)
348−gate = "|=(" sample operand ")" ;
349−rune = "|=" sample ( expr | body ) | … ;
350−pathlit = "/" | "/" knot { "/" knot } ;
351−pathmold = "/" | "/" segment { "/" segment } ;
352−knot = kchar { kchar } ;
353−kchar = lower | digit | "-" | "." | "~" | "_" ;
354−```
355−
356−The prose changes with it: grammar.md:58 adds that a sample may be a bare name, which binds, or another mold, which binds nothing, as `|= ~`; :66 says `|=(sample operand)`. `[]` and `m()` follow review question 19's answer; the parser still accepts both until that lands. `~[]` stays valid (see [the dropped table](#considered-and-dropped)).
357−
358−**Touches.** No decided row. It writes [parser readings 1 to 5](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/open-questions.md?plain=1#L75-L79) into the spec, which @iko should confirm. If S6 lands, `edit` becomes `( name | wing ) "=" operand`.
359−
360−### S11. Say which deeper lines are allowed
361−
362−**Problem.** [grammar.md:9](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/grammar.md?plain=1#L9) says "a deeper line continues the line above", which suggests a call can continue onto a deeper line. It can't: `f a` above a deeper `b` is "expected the end of the line, found a deeper line". Separately, the same text reads differently on an opener's line and on a deeper line. `~[heading 2 "Todos"` holds three items, while `text "a"` on a deeper line is one call; `[label=trim " x " n=1]` has three items, while `label=trim " x "` on a deeper line means `label=(trim " x ")`. grammar.md:44 explains this for lists only.
363−
364−**After**, grammar.md:9: "**Indentation is structure**: a block of deeper lines belongs to the line above it: to the last bracket that line leaves open at its end, to the body of the last rune or `++` on it, to `?-`'s arms, to an arm's body, or to a `+$`'s cases. A deeper line that nothing on the line above takes is an error, so a call never continues onto a deeper line. Returning to an earlier indentation closes every block since."
365−
366−And to Open brackets (grammar.md:11): "On the opener's line, spaces separate items, so `~[text "a"` holds two items. In an expression's open bracket each deeper line is one whole item: `text "a"` there is `(text "a")`, `label=trim " x "` is `label=(trim " x ")`, and under a `(` alone the first deeper line is the head. A mold's open bracket takes exactly one field or mold per deeper line." Also rename [lex-call-open-bad-1](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/tests/golden/lex-call-open-bad-1/about.txt), which parses, as its about.txt says.
367−
368−### S12. Say that cell patterns nest, and flatten the prelude later
369−
370−**Problem.** Eight prelude gates nest a `?-` inside another `?-`'s arm, to look at two values or one list cell ahead: `both`, `clap`, `hunt`, `mate`, `clef`, `join`, `snip` and `rear`. `hunt` needs four `?-`s for one decision. The EBNF already allows nested cell patterns, but the spec shows none, and "not lists or pairs" ([grammar.md:184](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/grammar.md?plain=1#L184)) reads as if cells don't nest. The partial checker doesn't support nested or list-refining patterns yet, which is why the prelude was written this way.
371−
372−**Now**, in grammar.md's Patterns: "… ships, loobeans and `~`, and cells of patterns, which nest; not `~[…]` lists or `a+b` pairs." Add the rows `[[~ a] [~ b]]` (a pair of present units) and `[x ~]` (a list of one item), and a note: over `[(unit A) (unit A)]`, `[~ b]` means "the first is null", not "a present unit", so keep every position visible, as `[* ~ b]`.
373−
374−**Later**, once the checker supports nested patterns along with review questions 5 and 22 ([prelude.jibb:203-214](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/jibb-dev/lib/jibb/prelude.jibb#L203-L214) and [:331-337](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/jibb-dev/lib/jibb/prelude.jibb#L331-L337)):
375−
376−```
377−:: today
378−++ hunt |= args=[$-([A A] ?) (unit A) (unit A)]
379− ?- args
380− [choose first second] ^- (unit A)
381− ?- first
382− ~ second
383− [~ a]
384− ?- second
385− ~ first
386− [~ b]
387− ?- (choose a b)
388− %.y first
389− %.n second
390−
391−:: later
392−++ hunt |= args=[$-([A A] ?) (unit A) (unit A)] ^- (unit A)
393− ?- args
394− [* ~ second] second
395− [* first ~] first
396− [choose [~ a] [~ b]]
397− ?- (choose a b)
398− %.y `a
399− %.n `b
400−```
401−
402−Both versions parse today; the flat one gets "branch is not supported by partial inference", so the prelude must wait or it stops checking.
403−
404−### S13. Put a cast whose expression takes deeper lines at the end of its line
405−
406−**Problem.** Eight prelude gates put `^- T` alone on the line below `|=`, and two arms do the same, so each pushes its body one level right. The spec's examples already write casts on the line they belong to (`++ theme ^- theme`, `++ id |= x=A ^- _ x`), and Hoon programmers read `|= a=@ ^- @` as one header. The formatter's "one canonical layout" doesn't say where a cast goes.
407−
408−```
409−:: today, prelude.jibb:376-380
410−++ lent |= xs=(list A)
411− ^- @ud
412− ?- xs
413− ~ 0
414− [item rest] (add 1 (lent rest))
415−
416−:: proposed
417−++ lent |= xs=(list A) ^- @ud
418− ?- xs
419− ~ 0
420− [item rest] (add 1 (lent rest))
421−
422−:: unchanged: a cast and its expression that fit on one line stay below the |=
423−++ row |= [attrs=(list attr) kids=(list (element M))]
424− ^- (element M) [%row attrs kids]
425−```
426−
427−For grammar.md:60: "A cast whose expression takes the deeper lines goes at the end of the line it belongs to, the `|=`, `++` or arm line; a cast whose expression fits on its own line goes on the line below with it." Both layouts parse to the same meaning today. If [S2](#s2-let-a-bodys-last---or--take-the-rest-of-the-body-at-the-same-depth) lands, the formatter must pick between this and the flat form; S13 can be adopted in the prelude now.
428−
429−### S14. Pin down the spellings the formatter writes
430−
431−**Problem.** The spec's code mixes equivalent spellings side by side, which suggests they differ: `(text …)` lines beside unparenthesized `field …` lines in one open list ([basket.jibb:29-32](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/my-app/ui/basket.jibb#L29-L32)); `align=align` ([prelude.jibb:443-445](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/jibb-dev/lib/jibb/prelude.jibb#L443-L445)) where the spec teaches `=msg`; a cast's body indented 2 deeper in some places and 4 in others. Each pair parses to the same thing.
432−
433−**After**, for grammar.md's Spacing: "The formatter writes one layout, except for runs of spaces. It drops parentheses around an unfaced whole line of an open list or group, writes `name=name` as `=name` in molds and samples, and indents a body two spaces deeper than the line it continues. Spaces for alignment and import gaps stay as written." Dropping alignment was considered and not proposed: it would reopen [decisions.md:16](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/decisions.md?plain=1#L16) on diff-noise grounds alone. Whether a null-sample `load` is written wide, `|=(~ …)`, or tall is left to @iko; the spec uses both.
434−
435−### S15. Name the fields when the examples build a model
436−
437−**Problem.** The examples build models and state as bare tuples that take their faces from the expected type: `[[~ %.n] ""]` ([basket.jibb:15](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/my-app/ui/basket.jibb#L15)), `[~ %.n]` ([cart.jibb:8](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/my-app/ui/stores/cart.jibb#L8)), `[ts "" ~]` ([todo-list.jibb:14](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/my-app/ui/todo-list.jibb#L14)). A reader of basket.jibb needs stores/cart.jibb open to learn what `[~ %.n]` means.
438−
439−```
440−++ init |= ~
441− [cart=[items=~ open=%.n] note=""]
442−++ init ^- state [items=~ open=%.n]
443−++ init |= ts=(list item.todo)
444− [todos=ts draft="" error=~]
445−```
446−
447−The faced form checks to the same type, and a misnamed field (`opened=`) becomes a definite error. These are the spec's teaching examples, so the matching doc blocks and `doc-*` golden sources change with them.
448−
449−## Considered and dropped
450−
451−| Proposal | Why it was dropped |
452−| --- | --- |
453−| Reject a bare sample name that also names a mold in scope (`\|= [n=@ud item]` binds a value named `item`) | It rejects natural code that checks today, such as `\|=(item item)` beside `+$ item` and `\|=(path …)` with the prelude's `path`, and every new prelude mold would break more. The typed spellings `=item` and `it=item` already exist. |
454−| Name the fields in patterns, `[%acked err=e]` | Opt-in, so it doesn't protect the positional arms that have the hazard; the probed real arms fail at the next use rather than silently; and it reopens Binding patterns ([decisions.md:55](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/docs/spec/decisions.md?plain=1#L55)). Hoon-style narrowing conflicts with Refinement types: none. A checker message naming the rest a binder took is enough if the hazard shows up. |
455−| Let a cell sample's `[` be left open | Only two prelude lines need it, `++ program` can take `p=(program D X M)` instead, and in an open `(turn xs` the same layout would read two ways. |
456−| Let a call continue its arguments onto deeper lines | A call followed by deeper lines already means a `~&` body or `?-` arms; mis-indented list items would become calls instead of layout errors; and the decided form `(field "New todo"` with deeper arguments costs only one `(`. S11 fixes the prose that suggested it. |
457−| Let patterns take `` `x `` and `gap+s` | A second spelling for every unit and pair pattern, and the existing hints already name the one accepted spelling. |
458−| Puns in tuples and changes, `[=draft]`, `m(=draft)` | The corpus has no expression `name=name` outside two test sources, and Hoon has no expression pun either (`[=a =b]` fails under urbit eval). |
459−| Reject `~[]`, as `[]` is rejected | `~[]` is the only empty list that types without context, `(list A)`, while a bare `~` asks for a `^-`; 38 golden uses rely on it. Instead, grammar.md's Literals table could say so. |
460−
461−Five of these seven were my own candidates; the verification refuted them.
462−
463−## What to keep
464−
465−The reviewers agreed on these strengths, and the proposals above are built not to disturb them.
466−
467−- **Open brackets with no closers**, plus the several-open-brackets rule: `column ~[gap+%s2] ~[` with one item per line reads like elm-ui without commas or closers, adding an item is a one-line diff, and every mis-nesting the reviewers tried failed to parse or failed to type.
468−- **Tightness as the one disambiguator, with an error for every slip**: `m(note=t)` is a change and `m (note t)` a call, `|=%got` a constructor and `|= %got` a gate, and `gap+%s2` binds tighter than a call, so attribute lists need no parentheses.
469−- **`|=%tag` constructors**: Elm's constructor-as-function with nothing to write, and a bare tag is always a value, so a tag never silently becomes a reply gate.
470−- **Named changes**, `m(draft="" error=~)`: Elm's record update in Hoon's shape, untouched when the model grows.
471−- **One exhaustive `?-`**, loobeans included, with no operators and so no precedence or dangling else. When a union gains a case, every `?-` that must handle it is flagged.
472−- **`+$` with cases below as the only union syntax**, so every union has a name and `+$ msg` reads like an Elm type declaration.
473−- **Left-out Hoon runes fail at the exact character** with the reason and the Jibb form to write ([inline-leftout-* cases](https://github.com/iko-soy/jibb/tree/0858191ab08738c4da5c6d84f00492e629564e73/tests/golden)).
474−- **Separate mold and value namespaces**, with one `.` for fields, imports and prelude groups, so `todos.todo` can be a mold and a request, and an imported module's growth never collides with the importer's names.
475−- **Hoon's literals exactly**, strings only `"…"` and always cords, and `{…}` holding a whole expression, so `"{lent xs} items"` needs no parentheses.
476−- **Rune bodies must be deeper, and a deeper line nothing takes is an error**, so structure never drifts silently. S2 is a narrow exception where no other parse is possible.
477−- **The LL(2) parser over layout tokens** never backtracks and puts each error at the first character that can't continue ([jibb.hoon:405-415](https://github.com/iko-soy/jibb/blob/0858191ab08738c4da5c6d84f00492e629564e73/jibb-dev/lib/jibb.hoon#L405-L415)); the layout pass works by column alone, so a tree-sitter scanner needs only an indent stack.
478−
479−## Questions for @iko
480−
481−In priority order. Each would be recorded in decisions.md before any code changes.
482−
483−1. **S1**: (a) Does a capital bind only the type under a face, so `[A A]` fits `[x=@ y=@]`? (b) Are a gate's sample names ignored when two gate types unify, reopening decisions.md:33 and open question 8 for gate samples only?
484−2. **S2**: May a body's last `^-`, `~&` or `|=` take the rest of the body at the same depth, with the flat form canonical?
485−3. **S3**: May samples, pattern binders and local `++` reuse prelude value names, reopening settled open question 26? Decide with S5.
486−4. **S4**: Does a bare decimal fit only `@ud`, `@u`, `@` and `*`, as in Hoon?
487−5. **S5**: Is a pattern name that spells a case's tag at a union position an error?
488−6. **S7**: May type variables be words such as `Msg`, with the printer keeping written names?
489−7. **S6**: May a change's item name a wing?
490−8. **S10 and S11**: Do the EBNF and the indentation prose take the wording above, confirming the parser's readings 1 to 5?
491−9. **S12, S13 and S14**: May the spec show nested patterns, and does the canonical layout put casts and spellings as proposed?
492−10. **S8**, at milestone 4: should the route check catch the two narrow segment slips?
493−
494−## How to rerun a probe
495−
496−Every claim above came from a probe like this, run at `0858191`:
497−
498−1. Make a folder with one subfolder per case, holding `source.jibb` and an `about.txt` of the four lines `source: probe`, `tests: x`, `expect: unclear`, `expect-types: probe`.
499−2. For prelude-aware type reports, start the source with `/= lib /ui/lib`, add a `modules.txt` holding `/ui/lib.jibb`, and a `modules/ui/lib.jibb` holding `++ identity |=(x x)`. Without an import, the partial checker doesn't load the prelude.
500−3. Run `tools/golden --dir <folder> --show`. It prints each case's tokens, its tree or parse error, and the partial type report.
501−
502−"Not supported by partial inference" in a report is a checker gap, not a verdict on the syntax.
docs/reviews/2026-11-03-checker-map.mddeleted−587
@@ -1,587 +0,0 @@
1−# The checker on 2026-11-03, and what a general core replaces
2−
3−A map of the type checker in `jibb-dev/lib/jibb.hoon`, written for whoever builds the general checker core that [review question 5](2026-11-02-questions.md) chose. It was written by the thread that fixed the [2026-11-02 review](2026-11-02-repo-review.md)'s findings, by reading the code; nothing in it was run. Claims about which tests would fail come from the tests' fixtures, their direct `name:jibb` references, and the code paths.
4−
5−Line numbers without a file are `jibb-dev/lib/jibb.hoon` at commit [`f84a29e`](https://github.com/iko-soy/jibb/blob/f84a29e/jibb-dev/lib/jibb.hoon) (15,838 lines). The syntax changes of 2026-11-03 (`d4aed71` to `706e9ca`: `unface`, S2, S4 to S7) moved them by up to about 800 lines. They added `+itype-unface`, `+infer-unface`, `+unfaced-gate`, the `+decimal-*` arms, `+tag-name-pattern`, `+change-wing-field`, `+wing-overlap` and named type variables kept in the bits of a variable's ID (`+named-var`, `+var-name`, `+show-var`), and renamed `+module-has-reserved-proj` and `+reserved-proj-*` to `+module-has-reserved` and `+reserved-*`. This map doesn't cover them, and its rows in 6.2 for S1, S4, S5, S7 and S12 predate Montelot's decisions of that day; read `decisions.md`'s rows dated 2026-11-03 instead. Find an arm by its name, not its number. Review finding numbers (A1 to A137) come from [the review](2026-11-02-repo-review.md), whose own line numbers are pinned to `4bf477e`.
6−
7−Review Q5 (`docs/reviews/2026-11-02-questions.md:43-49`) was answered (a): *"Build the general core
8−first: union-find bindings with levels, a deferred-constraint queue and Maranget's usefulness check,
9−with `main = (program …)` checked as an ordinary application."* Q6 (l.51-56, one golden pipeline),
10−Q11 (l.88, one branch-join rule) and Q12 (l.95, dependency-order pass) were also chosen.
11−
12−## 0. Numbers
13−
14−| Thing | Value |
15−| --- | --- |
16−| `%type-inference` chapter | 4601-10901 (325 arms) |
17−| `%union-analysis` chapter | 10902-15838 (224 arms). Despite its name it holds union analysis (10902-11302), the module checker, API derivation, program/store recovery, the report and the dg-* transaction (A131) |
18−| Arms and types from 4601 on | 549 `++` arms, 91 `+$` types |
19−| `itype` | 22 cases (4663-4686), six of them variable kinds plus `%tag` |
20−| `istate` | 27 positional fields (5996); built as a positional literal at 10 sites (10699, 10752, 11986, 12001, 12057, 12735, 12769, 14759, 14924, 15107) and bunted at 5 (14497, 14550, 14566, 15610, 15652) |
21−| Program/store/page/static recovery and kind code | 13146-14648 (1,503 lines) |
22−| dg-* deferred transaction | 15147-15719 (573 lines) |
23−| Direct gate-layout evidence | 9002-9228 (227 lines) |
24−| Lines saying "unsupported" or "not supported" | 283 |
25−| Golden cases | 690 in `tests/golden`; 304 have `types.txt`, every one of which starts `partial inference; module not checked`; 177 of those also have `modules.txt` (module-check mode, prepared prelude); 127 of the 304 contain an "unsupported"/"not supported" line |
26−| Suites | 58 files in `tests/lib` (the 57 checker-related suites of the brief plus `jibb-check-spans`/`jibb-hoon-reference`, which are not checker tests); they reference 125 distinct `jibb.hoon` arms and 55 types by `name:jibb` |
27−| Call sites | `itype-fit` 59 (22 in 13311-14648), `itype-unify` 43, `itype-normalize` 95 (20 in program/store, 7 in dg), `instantiate-scheme` 17 (12 in program/store), `itype-merge-faces` 13 (12 in program/store), `direct-invariant` 19 (16 in program/store), `template-apply` 22 (15 in program/store), `add-supported-result` 7 (6 in program/store) |
28−
29−## 1. The checker as it is
30−
31−### 1.1 Data types
32−
33−| Type | Line | Shape | Role and quirks |
34−| --- | --- | --- | --- |
35−| `itype` | 4663 | `%var %fvar %avar %rvar %nvar %rnvar` (one id space), `%atom aura`, `%any-atom` (bare `@`), `%flag`, `%noun`, `%empty`, `%tag [id literal constructor=?]`, `%const literal`, `%collection [name args]`, `%recursive [module name label]`, `%jrec [at name label head aura tail]`, `%grec [at name label proof=shape args]`, `%union [cases origin label args]`, `%face [name body]`, `%fn [sample product]`, `%cell [hed tal]` | The whole type language. `%var` unconstrained; `%fvar` gate-free; `%avar` any atom incl. `?` and `@`; `%rvar` atom other than `?` (arithmetic); `%nvar` decimal literal, defaults to `@ud`; `%rnvar` both. `%tag` is a pending literal resolved by binding its id. Faces and display labels live inside the type, so relabelling changes equality (A11). `%collection` is opaque except list/unit (A13). Three recursive representations (`%recursive` imported, `%jrec` qath-shaped, `%grec` test tree) |
36−| `ibinding`, `isub` | 4687-4688 | `(list [id val])` | Substitution as an association list; first entry wins; entries only prepended; no path compression. Kind refinement is encoded as a self-binding (`[n -> %fvar n]`, `[n -> %rvar n]`, `[n -> %rnvar n]`) |
37−| `ipending` | 4689 | `[id literal at]` | One per `%term`/`%null` literal or `%ctor` tag (created 8780, 8781, 8848) in `istate.tags` |
38−| `igf-form(s)` | 4942-4943 | `[typ sub left]` | Gate-free conversion result with fuel |
39−| `ifit` | 5019 | `%ok [sub next]` / `%bad` / `%unknown` | Three-valued directional fit. `%unknown` is the universal fail-closed answer |
40−| `ischeme`, `ienv`, `imold-types` | 5804-5806 | `[typ vars=(list @ud)]`; `(list [name scheme])`; `(list [name template])` | Schemes with raw (not canonical) quantified ids; environment is newest-first, linear `ienv-lookup` (6001) |
41−| `iderived`, `iwidth-definition`, `iwidth-dependency` | 5807-5809 | | Derived poke constructors; `proj` elaboration evidence (carries the raw `sub`, 10687) |
42−| `irequest-evidence`, `istore-request-evidence`, `irequest-graph` | 5812, 5816, 5820 | | Source-bound API/store request certificates and the trusted closure inputs |
43−| `ifile` | 5822 | `[values molds at derived elaborations dependencies source graph]` | Checked module interface; `graph ~` = detached legacy/prelude file |
44−| `ijimports`, `icap(s)`, `iparams`, `imolds`, `iexternals`, `imark-externals`, `ihole` | 5823-5834 | | Imports in scope; written capitals with their var ids; generic params; local mold shapes; raw importer nouns; type holes (created 7103) |
45−| `iwfield(s)`, `iwstep`, `iwidth-result`, `iwprojection` | 5839-5843 | | Record-spine scan and `proj` plan |
46−| `igf-segment`, `igate-free` | 5931, 5938 | `[verdict=?(%yes %no %unknown) inhabited left path]` | Gate-free proof with witness path |
47−| `igate-prelude-evidence` | 5994 | `[iface gates=(map term def)]` | Re-parsed prelude gate defs for direct-gate recovery |
48−| `dgo` | 5995 | `[left right at context]` | Deferred fit obligation (dg-* only) |
49−| `istate` | 5996 | `next sub caps binders molds globals externals surs mark-externals marks jimports reserved-molds params active tags in-mold at top-molds prelude holes jrec-fuel projections gate-defs head-evidence grec-index defer obligations` | Threaded functional state. `next` restarts at 0 per top-level definition. Recovery-only fields: `jrec-fuel`, `gate-defs`, `head-evidence`, `grec-index`, `defer`, `obligations` |
50−| `idiag`, `iresult`, `isample-result` | 5997-5999 | `[msg sites]`; `(each [typ state] idiag)`; `(each [typ env state] tape)` | A diag with no sites is "unsupported"/retryable (`definite-diag` 7521) |
51−| `irec-pattern` | 6416 | `[pat=upat has=?]` | Imported recursive fork proof |
52−| `ilocal-result` | 7306 | `(each [env state] idiag)` | Locals and groups |
53−| `icap-site` | 7377 | `[name at]` | Written capital occurrence |
54−| `imatch`, `ifinite` | 8106, 8170 | `?(%full %none %unknown)`; `[origin base part]` | Pattern-vs-case classifier; finite loobean refinement row |
55−| `itag-presence` | 8661 | `?(%yes %no %maybe)` | Missing-tag diagnosis |
56−| `iwidth-elaboration` | 8994 | | Dead (only the dead `infer-width-elaboration`) |
57−| `igate-entry`, `igate-seeds` | 10433-10434 | | Recursive-group seeds |
58−| `iresolved` | 10552 | `[env grouped artifacts]` | Resolver output threaded by the recovery chain |
59−| `iadj ivisited iwork iwresult icresult icomponents` | 10553-10558 | | Kosaraju state |
60−| `iadded-definition` | 10668 | `[env checked artifacts]` | `add-supported-result` output |
61−| `icyclesite`, `icycle` | 10788-10789 | | Value-cycle proof |
62−| `upat`, `urelation`, `upair` | 10909, 10919, 10920 | `%unknown %all %empty [%atom (unit @)] %flag [%cell] [%or]`; `?(%disjoint %overlap %unknown)`; `[first second relation]` | Noun-shape projection for disjointness/overlap (also used by the importer at 6463, 6645) |
63−| `uow-case` | 11191 | | Source overlap witness case |
64−| `jsource jbundle jcache jfile-result jfile-overlap jfile-failure jfile-detailed-result jimports(-detailed)-result` | 11507-11518 | | Module sources, per-invocation cache, results with structured overlap evidence |
65−| `written-fields` | 11521 | `(map term span)` | Duplicate-field scope |
66−| `imold-failure` | 11777 | `[message overlap=(unit [name upair])]` | First failing mold |
67−| `iprelude` | 12090 | `[iface values molds]` | Prepared prelude; values/molds reserve every declared name |
68−| `iapi-*` | 12328-12706 | | API path/request/support evidence |
69−| `ione-request-interface`, `imulti-request-gates` | 12780, 13043 | | API constructors |
70−| `istore-declaration` | 13242 | `[action=term defs]` | Store declaration (action always `%poke`) |
71−| `iview-site` | 13608 | `[xs mapper]` | Keyed `each (turn xs mapper)` site |
72−| `igate-free-mold` | 14885 | | `gate-free-mold-source` result |
73−| `dgscan`, `dgcommit`, `dg-step`, `dgparse` | 15149, 15243, 15444, 15581 | | dg-* transaction |
74−| `grec-collected` | 15782 | `[molds proofs]` | grec index input |
75−
76−### 1.2 Pipelines
77−
78−#### (a) The partial golden-types report (all 304 typed goldens)
79−
80−Entry chain:
81−- No prelude (127 typed goldens): `golden-types` 11486 → `golden-types-imports` 11497 → `golden-types-with-marks` 15016 → `golden-types-in-context` 15021 → `golden-types-in-context-core` 15025. `tools/golden:248-253` picks the arm by whether the case has `/sur` or mark fixtures.
82−- Module-check mode (177 typed goldens with `modules.txt`): `tools/golden:254-260` calls `golden-types-with-prepared-prelude` 14975 with a prelude prepared once under `mule` by `prepare-prelude-with-internal` 12103 (`tools/golden:291`), falling back to `golden-types-with-prelude-and-internal` 14969. 14975 parses, runs `duplicate-defs`, `module-scope-valid` 14986, and **resolves Jibb imports with the full checker** (`resolve-jibb-imports` 14989 → `infer-jibb-file-detailed` per imported module), then calls the core.
83−
84−`golden-types-in-context-core` 15025-15146:
85−1. Parse (15029), `duplicate-defs` 15031 (→ `duplicate-fields-report`), reserved `proj` 15033 (bare `'module has reserved proj name'`, no header, A43).
86−2. `resolve-groups` 15040: the same resolver as the full check (10662 → `resolve-groups-core` 10736) but **with no grec index**, so `%grec` never arises here; no program/store recovery, no kind checks.
87−3. `definite-value-cycles` 15041.
88−4. dg-* transaction if eligible (15044-15075): import-free, not API/store, no `main`, incomplete, ≤65,536 bytes, ≤64 defs, and either no prelude + `dg-source-candidate`, or the exact prepared prelude + `dg-prepared-candidate`. Names it adds are "recovered" only if the transaction env is complete and `dg-interface-safe`.
89−5. Per definition in source order (15079-15146): molds → `show-partial-mold` 11431 (never infers the mold; hole report, union disjointness verdict or `not checked`); duplicate name → `name already in scope`; cycle → `non-gate value depends on itself through a cycle`; recovered/grouped → print the scheme from env; otherwise **re-infer the definition afresh** (state literal 15107, `gate-defs`/`head-evidence` 15108-15109, `reserve-def-caps` 15110; gates through `infer-recursive-gate` 15113, others `infer-fragment` 15114) and finalize with its own copy of the finalization (15117-15143, table in 2.8), then `canonical-itype` 15144 + `show-itype` + `show-atom-constraint`.
90−
91−So a report line is not the scheme the resolver published; it is a second inference against the resolved env. The report never runs recovery, kind checks or grec; its messages are the raw per-definition failures.
92−
93−#### (b) The full module check
94−
95−`infer-jibb-file` 14650 (text adapter) → `infer-jibb-file-detailed` 14658-14879:
96−1. Parse 14661 (`module source does not parse: /p`), `duplicate-defs` 14664, API module with `main` rejected 14666.
97−2. `/ui/api/...` branch 14668-14725: `api-poke-interface-result` 12979 first; else `api-derived-clash` 14678, scope with mark rules 14684-14698, prelude required 14699, `resolve-jibb-imports-detailed` 14705, `+$ paths` required 14708, then the "narrow" `one-request-interface-graph` 14711-14721 or `multi-request-interface-graph` 14722-14725. No value inference beyond `api-support-analysis-*` (12708, 12742), which calls `resolve-groups`.
98−3. Other modules: `program-main-def` 14726 and the syntactic recognisers `program-main-parts` 14728, `page-main-parts` 14730, `store-main-parts` 14732; `store-declaration` 14734 (definite clash 14736; `module kind or scope needs unsupported inference` 14740); a `/ui/stores` main that is not a store is rejected 14741.
99−4. `module-scope-valid` 14745, `resolve-jibb-imports-detailed` 14748 (mutual recursion with this arm; cycle check before cache, cache reuse rules 12275).
100−5. Molds: `grec-collect-molds` 15825 only for import-free modules (14750-14752); istate literal 14759; grec index only for import-free prelude-backed modules whose prelude list is exactly `[[%collection %list ~[[%var 0]]] ~[0]]` and that have no local `list` (14762-14772); `module-mold-types-detail` 11799 (first failure aborts; overlap evidence rendered 14774-14780).
101−6. Values: `resolve-groups` or, with an index, `resolve-groups-core` (14781-14784). `resolve-groups-core` 10736-10756: compute names, graph, Kosaraju components, `direct-prelude-evidence` (prelude re-parse) and `dependency-order` 10768 once, then loop: `add-supported-defs-core` 10690 over the ordered defs (fresh positional state per def with `next=0`, `jrec-fuel=256`, `gate-defs` = `direct-checked-gates` of the current env, `head-evidence`; `reserve-def-caps`; `infer-fragment`, then `infer-recursive-gate` if that failed; `add-supported-result` 10670, which **silently drops** any failure or pending tag), then `add-groups` 10645 (cyclic components through `infer-gate-group` 10509), until env stops changing.
102−7. Program recovery chain 14786-14804, only for a direct `(program i u v s)` main: `program-update-context` 13346 → `program-subs-context` 13508 → `program-view-context` 13938 (keyed) → `program-plain-view-context` 13858 (only if keyed declined) → `program-plain-init-context` 14238 → `program-main-context` 14472. Single pass, fixed order, each arm a no-op unless its component (and `main`) is still missing.
103−8. dg fallback 14807-14816: only if incomplete, not a store, no imports **and no prelude** (14809), so it can never affect a prelude-backed check (A47).
104−9. Completeness 14817-14832 (store modules exclude `main`): `module-pending-tag` 10715 (re-infers ≤64 missing defs to find `nothing fixes the union of %x`), then `module-sample-shadow` 12171, then `module definitions need unsupported inference: /p[: ++ name]` with `module-missing-value` 12132 choosing the name.
105−10. `request-graph-merge` 14834; static main swap 14836-14843 (`static-main-specialized` 14487); store main swap 14844-14849 (`store-main-closed` 14599); kind boundary 14850-14857 (`program-main-closed` 14555, `page-main-closed` 14540, store/static results) → `module kind needs unsupported inference: /p`; store-derived exports 14858-14875; `request-graph-bounded` 14876; `ifile` 14878.
106−
107−#### Where the two pipelines differ (A46, A122)
108−
109−| | Report (a) | Full check (b) |
110−| --- | --- | --- |
111−| Resolver | `resolve-groups`, grec index `~` | `resolve-groups-core` with index when import-free |
112−| After resolving | re-infers each definition and prints its own failure | keeps resolver env; failures are silent |
113−| Recovery | none | program chain, static/store main swaps |
114−| Kind checks | none | `program-main-closed`, `page-main-closed`, store, static |
115−| dg-* | eligible with or without prepared prelude (15053-15061) | only without prelude (14809) |
116−| Finalization | 15117-15143 (adds `pending-null`, hidden recursive/generic, merged-capitals messages) | `add-supported-result` 10675-10689 (no `pending-null`, no hidden-name check, merged capitals caught only as `constrained-capitals`) |
117−| Mold check | `show-partial-mold` (projection only) | `module-mold-types-detail` (real templates) |
118−
119−### 1.3 Families, by layer
120−
121−"Category": G general inference, U union analysis, M module and imports, A API and paths, R recovery slice, P reporting/printing, O other. "Tests" lists suites (without the `jibb-` prefix) and goldens; `[call]` marks suites that name the family's arms directly.
122−
123−#### A. Substrate (4601-6400)
124−
125−| Family | Lines | Cat | How it works | Tests |
126−| --- | --- | --- | --- | --- |
127−| Chapter contract, `itype`, `isub` | 4601-4689 | G | Contract comment 4603-4661 (assoc-list sub, occurs check, per-definition generalization, monomorphic binders, capitals shared per definition, `@` one-way, unions keep origin/args; `proj` limits 1,024/4,096; "The unchanged todo API fits this fragment" 4643-4644; closed gate sample may omit one outer face 4653-4655) | every `types-*`; 32 suites build `itype:jibb` |
128−| Lookup, walk, occurs, normalize | 4691-4732, 4817-4843, 6012-6026 | G | Linear `itype-lookup`; `itype-walk` follows chains for the six var kinds and `%tag`, stopping only at a self-binding to `%fvar`/`%rvar`/`%rnvar` (six copied arms, A16); `itype-occurs` (opaque `%recursive`/`%jrec`; same-id `%tag` counts); `itype-normalize` full zonk, leaves `%tag`/`%recursive`/`%jrec` | typecheck, hole-guards [call], arithmetic-guards [call], deferred [call], generic-construction [call]; `types-partial-occurs`, `types-partial-dependency-chain`, `types-partial-shared-tvar` |
129−| Emptiness and inhabitation | 4734-4815 | U | Budgeted; `itype-empty-proof` proves only emptiness; `itype-inhabited-proof` three-valued (`%var` yes only via written capital; only list/unit collections decided, A13; `%grec` via `grec-tree-proof` 4801); `itype-live-cases` drops proven-empty cases, any unknown → `~` | empty [call]; `types-list-patterns`, `types-partial-union-edges`, `types-union-finite-limit`, `types-tuple-context` |
130−| Unification | 4851-4940, 5005-5012 | G | `(unit isub)`, no reason. Walk both, equal → ok; grec by at+name then args; jrec by 5 fields; recursive by module+name; union by origin, then raw `cases` equality when argless (A11) else args; collection by name then args; `%var` binds anything after occurs; `%fvar` via `itype-bind-gate-free`; atom-kind lattice 4884-4925 (nvar~rvar → rnvar with self-binding 4887-4889); const by value; atoms of different aura fail (no widening); face~face same name; fn/cell pointwise | typecheck, arithmetic-guards, gate-free-guards, generic-recursion [call]; `types-arithmetic-*`, `types-partial-atom-*`, `types-union-phantom-generic` |
131−| Gate-free propagation | 4942-5003, 6320-6343 | G | `itype-gate-free-form` (budget; unbound `%var` → self-binding to `%fvar`; fails on fn/noun/tag/recursive/grec); `itype-bind-gate-free` 256 (exhaustion reads as mismatch); `itype-collection-keys` for set/map/mop/jar/jug keys; `itype-var-is-gate-free-fuel` fails open at fuel 0 | gate-free-guards [call], gate-free-source; `types-prelude-unit-helpers` |
132−| Directional fit | 5014-5019, 5451-5711 | G | `itype-fit` = `itype-fit-inner` + empty-source rescue (256). About 45 ordered guards: width (spine ≥1,024 or wider source → unknown); empty/flag-vs-`@f`; `*` accepts anything incl. gates (A23) and binds bare tags to `*` (A22); actual `*` only to a var; grec/jrec/recursive by identity; unions by origin; known union to var by unify; non-var vs union → `itype-fit-cases` (unique %ok wins, two → unknown); tags: ctor only vs fn via `itype-fit-ctor-cases`, term vs `@tas`/`@ta` with no aura check (A20), vs `?` if 0/1, vs `@`; zero vs list → unknown; var vs face unifies with the body (5652); `@` turns a var into a fresh `%avar` (only allocation, 5666); atom by `aura-prefix`; cells head then tail; faces same name; closed gates by `itype-closed-gates-match`; last resort unify, with failures turned to `%unknown` when unions, recursion or related auras are involved. **Gates (fn vs fn) only unify: no variance** | closed-gate-guards, constructor-fit-guards, empty, qath-fuel, generic-construction, arithmetic-guards, generic-recursion, deferred [call]; 32 golden lines `call constraint…`, 37 `cast constraint…` |
133−| Aura families | 5049-5092 | G | `aura-prefix` textual prefix (`@` above all); `itype-family-related` only to turn failures into unknown | `types-partial-aura*`, `types-partial-atom-widening`, `types-partial-branch-widening` |
134−| Branch joins | 5094-5097, 5125-5210 | G | Unify, else `itype-concrete-join` (prefix parent or `@`, never touches sub); n-ary: unify all, else first `@` or common prefix parent present among arms | `types-partial-branch-widening`, `types-list-branch`, `types-union-branch-*`, `types-recursive-branch`, cell-branch, deferred |
135−| Face guards | 5212-5227, 5265-5349 | G | `itype-face-asym` (face on one side vs non-var); `itype-merge-faces` (cast result, 1 + 12 recovery calls); positional rules `itype-positional-face-asym`/`-slot-face-asym` (added with `like`, 640a442); `itype-output-may-be-cell` | positional-face-guards [call], direct-gate-guards [call], deferred [call]; `types-positional-faces`, `types-prelude-like`, `types-generic-face-inference`; 4 golden lines `call result face propagation` |
136−| Closed gate sample matching | 5229-5263 | R | See 3, R12 | closed-gate-guards (via `itype-fit`), todo-api |
137−| Fail-closed structure guards | 5020-5046, 5098-5123, 5372-5449 | G | `itype-has-any-atom/-tag/-union/-recursive/-hidden-generic/-hidden-recursive`; `itype-has-fixed-atom` (5098) is dead | `types-union-unresolved*`, `types-generic-union-escaping`, `types-qath-module-identity` |
138−| Pending tags | 5351-5370 | G | `pending-tags`, `pending-null`, `pending-tag-diagnostic` (`nothing fixes the union of ` + `show-lit`, 5363); checked only at definition end | buttons (`tests/type-buttons/error.txt`), program-init, program-update, deferred [call]; 80 golden lines `tag needs context`, 24 `` `~` needs context `` |
139−| Self-test | 5713-5798 | O | `itype-unify-test`, compared by `jibb-typecheck` with `tests/checker/unification.txt` (the old `tools/hoon` check is gone) | typecheck [call] |
140−| State, env, results | 5800-5806, 5824-5827, 5832-5834, 5995-6006 | G | see 1.1 | 13 suites build `istate:jibb` |
141−| Interface/evidence types | 5807-5823, 5828-5831 | M | see 1.1 | module-*, api-evidence, store, program-watch |
142−| Record width and `proj` | 5835-5923 | O | `width-scan` (closed uniquely faced spine), `width-known-shape`, `width-shape` (wider source → `record width constraint needs unsupported inference`), `width-proj-shape`/`width-project` (source-order planner, 4,096) | proj-guards; `types-proj-*`, `types-partial-projection` |
143−| Gate-free proof with witness | 5925-5992 | O | `gate-free-type` on normalized types; budgeted; list/unit only (A13) | gate-free-guards, gate-free-source, empty, generic-recursion [call]; program-main |
144−| Defaulting, promotion, holes | 6028-6181 | G | `promote-restricted-numbers` (only with written caps), `default-hole-numbers` (only when the type has no gate), `unresolved-hole`, `default-decimals` (`itype-has-gate` treats `%grec` as gate-bearing, ignores union args), `uncertain-hole-msg` | hole-guards [call], generic-recursion [call]; `types-hole-*`, `types-partial-decimal-default` |
145−| Vars, rename, canonical, instantiate | 6183-6318, 6345-6368 | G | `itype-vars` order (fn sample before product, head before tail, union args before cases); `unique-type-vars` O(n²); `itype-rename` single pass, no sub; `canonical-itype` kind precedence rvar > avar (nvar/rnvar → avar) > fvar > var; `instantiate-scheme` pushes fresh fvar/avar/rvar ids onto `binders` | gate-free-guards [call]; `types-partial-generalization`, `types-partial-atom-alias`, `types-many-variables`, `module-import-atom-scheme` |
146−| Local capital and mold lookup | 6370-6395 | M | `icap-lookup`, `find-simple-mold` (unique only), `collect-simple-molds` | 5 suites [call] |
147−
148−#### B. Import bridge and mold elaboration (6397-7253)
149−
150−| Family | Lines | Cat | How it works | Tests |
151−| --- | --- | --- | --- | --- |
152−| Imported Hoon validation and bridge | 6397-6728 | M | `jibb-face-name`, `rec-pattern(s)` (self-recursive disjoint fork → opaque `%recursive`), `imported-faces-valid` (repeated face on a spine fails), `import-to-itype(-standard)` (aura whitelist u ud ux uv t ta tas p da dr tD, duplicated at 6432, 6557, 12666, A14; `%f` pair → `?`; `%unit` → prelude unit union only with the standard template, A10; other forks → originless `%union` after pairwise `union-relate`), `find-imported-mold(-prelude)`, `find-imported-mark(-prelude)`, `collect-sur-imports`, `collect-mark-imports`. 6682-6683 dead (A18). All failures `~` | bridge, api-evidence [call], import*, mark-bridge, tlon-bridge, poke-bridge; `types-import-*`, `module-import-api-*` |
153−| Interface lookup and relabelling | 6730-6841 | M | `find-jibb-interface`, `find-jibb-mold` (~40 callers), `itype-in-import` relabels unions/jrec/grec (display only), `prelude-union-alias`, `identity-union-parameters` | generic-alias, ask-guards, store, page-main, program-watch, todo-full, theme [call]; `module-import-*`, `types-union-print-*` |
154−| Mold elaboration and templates | 6843-6919, 6970-7000, 7099-7253 | G | `infer-simple-shape` (shape→itype; holes allocate a var + `ihole`; unions need `union-pairs` without overlap, else the source slice; local mold expansion guarded by `active`; generic local mold re-elaborated with params bound; generic local unions refused 7216-7217); `template-apply(-sub)` renames scheme vars to args (`template-apply` drops the sub); `infer-mold-template` builds +$ schemes, generalizing exactly the params; `label-direct-union` gives a top-level union its origin | union-source [call], gate-free-guards [call]; `types-generic-*`, `types-hole-*`, `types-union-alias` |
155−| Source-recursive recognisers | 6921-6967 | R | `simple-source-recursive` (`%jrec`), `simple-source-generic-recursive` (`%grec`). See R17, R18 | qath-*, generic-recursion [call] |
156−| Import-invalid replay | 7002-7097 | M | Replays a failed shape to recover the importer's `[%invalid …]` message with site note `invalid imported mold` | import, import-diagnostic, import-overlap, import-structural |
157−| Gate samples | 7255-7300 | G | `infer-sample`: binders fresh `%var`, monomorphic, pushed onto `binders`; shadow → tape `sample shadows a name` | `types-partial-shadow-global`, `module-import-*-shadow` |
158−| Local definitions | 7302-7373, 7514-7702 | G | See 2.7; generalization subtracts `free-env-vars` and `free-cap-vars`; order-independence machinery `shared-types`/`shared-moved`/`closed-local` | `types-local-*`, `types-partial-locals`, `types-local-scc*` |
159−| Capital scope walker | 7375-7512 | G | `scope-*` syntactic walk; `reserve-def-caps` allocates one `%var` per written capital per `++` | `types-local-capitals`, `types-capital-distinct` |
160−| Record field access | 7704-7747 | G | `record-fields-named` on a known faced spine; no deferred has-field constraint | program-init/main/update/watch [call]; `types-record-faces` |
161−
162−#### C. Expression checker (7749-10032)
163−
164−| Family | Lines | Cat | How it works | Tests |
165−| --- | --- | --- | --- | --- |
166−| Contextual branches and list literals | 7749-7921 | G | `infer-union-context` (two loobean arms or unit arms with the same expected type, no join), `infer-list-context` (exact prelude list scheme; cons only under list context), `infer-open-list-items`/`infer-list-items` (drifted copies, A17), each with the `element` fallback hook (R7) | `types-list-*`, `types-flag-branch-context`, `types-union-branch-context`, deferred-context, todo-partial |
167−| Unit and list two-arm branches | 7923-8075 | U | Hand-coded two-arm exhaustiveness (`~` + `[~ x]`, `~` + `[h t]`); unit recognised structurally (no origin check); inhabitation 256 | empty [call]; `types-unit-patterns`, `types-list-patterns` |
168−| String interpolation | 8077-8101 | G | Accepts atoms, `@`, leftover decimals, `(list @tD)`; generic atom from a capital → `a generic atom in interpolation needs an aura`; cell → `a cell in interpolation needs a printer` | `types-string-interpolation` |
169−| Union coverage, three copies | 8103-8390 | U | `union-pattern` %full/%none/%unknown; `infer-known-union-whole` 8208, `-context-whole` 8246, `-finite` 8292 (loobean expansion ≤64 rows); `single-structured-pattern`/`infer-single-case-branch` 8351-8390 | generic-pattern, cell-branch, nested-union-guards, empty; `types-union-patterns*`, `types-union-finite*`, `types-single-case-pattern` |
170−| jrec/grec match views | 8392-8475 | R | R17, R18 | qath-fuel, generic-pattern [call] |
171−| Branch routing | 8477-8549 + 8878-8930 | G | Order in `infer-fragment %branch`: dg → one arm (empty-list, empty-union, grec, structured, cell) → ≥3 arms known-union → two arms: speculative `known-union-subject`, unit, non-literal → known-union, loobeans (unify subject with `?`, infer arms, `itype-branch-join`, failure classified 8921-8929) | `types-union-*`, `types-loobean-*`, `doc-grammar-04-step` |
172−| Empty list / empty union | 8555-8608 | U | `empty-list-null-branch` (exact prelude list; element proven empty), `known-empty-union-wing` | empty [call] |
173−| Record change | 8612-8656 | G | `infer-change-edits` on a known faced spine; `standard-unit-template` 8646 | `types-record-change*` |
174−| Missing-tag diagnostics | 8658-8744 | P | `missing-union-tag` (`{label} has no case %x`), `nested-missing-tag` replay | `types-missing-tag-*`, `types-nested-missing-tag` |
175−| `infer-fragment` | 8749-8980 | G | Synthesis by node kind (literals: `%ud` → `%nvar`, `%loobean` → `%flag`, term/null → `%tag` + `ipending`; ctor → `%tag … &`; `%unit`/`%list`/`%qath` require the exact prelude templates; `%wing` instantiates; `%cast` = shape + check-mode + width check + fit + merge faces; `%gate` monomorphic sample; `%call` → `infer-call-with-head`) | every typed golden; cell-branch, deferred, generic-pattern, qath-source [call] |
176−| Dead code | 8988-9000, 9058-9063, 10780-10783 | O | `width-has-projections`, `infer-width-elaboration`, `direct-find-gate`, `resolve-supported-defs` | none |
177−| Direct gate-layout evidence | 9002-9228 | R | R11 | direct-gate-guards [call] |
178−| Call checking | 9230-9294, 9296-9314 | G | Head first; known `%fn`: context args, width, fit (`itype-fit-inner … skip-width` for multi-arg), else `direct-gate-call-fit`; `%unknown` → `call constraint…` (or a `dgo` in defer mode); `%bad` → missing tag → nested tag → `call's sample and argument types do not unify` (`call-error-site` blame); face-propagation guard 9283-9288. Unknown head: unify with `[%fn arg fresh]` | 116 golden lines `call's sample…` in 53 goldens; positional-face-guards |
179−| Contextual call and singleton/unit/tagged-case | 9316-9562 | R/G | `infer-unit-context` 9321, `infer-contextual-call` 9355 (pre-unify product with expected; `element` exception), `explicit-singleton-in-union` 9480, `contextual-*` 9501-9562 (R15), `grec-direct-context` 9527 | nested-union-guards, constructor-fit-guards [call]; `types-nested-union-context`, `types-unit-context` |
180−| `proj` intrinsic | 9396-9475 | O | `explicit-proj-call`, `infer-proj-context` (check mode only), literal fields by name | proj-guards; `types-proj-*` |
181−| Closed-cell branch retry | 9564-9662 | R | R14 | cell-branch [call]; `types-cell-branch-context` |
182−| Check-mode dispatcher | 9664-9783 | G | `infer-call-context-arg`, ~19 ordered steps (9667-9783): defer → unwrap pair/group/body/trace → peel faces → `proj` → grec ctor → jrec `~`/tuple → call → empty list → structured/cell patterns → loobean singleton → known-union branch → unit → closed-cell → flag/union/list branch → list literal → tagged case → cell tuple → synth. Reads the raw `expected` at 9732, 9743, 9756 to keep provenance (A36). Callers do the final fit | generic-construction, qath-fuel [call] |
183−| Positional items, cell binders | 9785-9928 | G | `infer-call-context-items/-args`, `projection-field-target` (peels one slot face), `infer-simple-items`, `infer-cell-branch` | `types-cell-pattern-*`, `types-multi-call` |
184−| Printers | 9930-10032 | P | `show-itype` (A-Z then T26…; six identical variable arms 9936-9951, A35), `show-itype-cases`, `site-type-note` (bare label for vars, nvar, tags, unions, hidden recursion) | every typed golden; 11 suites [call] |
185−
186−#### D. Definition boundary and module resolver (10034-10900)
187−
188−| Family | Lines | Cat | How it works | Tests |
189−| --- | --- | --- | --- | --- |
190−| Capital and atom-var guards | 10034-10169 | G | `merged-capitals` 10072, `constrained-capitals` 10089 (capital bound to non-var or shared → "explicit capital constraints are not supported"), `atom-var-from-cap`, `atom-var-from-binder`, `unsupported-atom-vars` 10159 (atom vars generalize only from caps or `binders`) | deferred [call]; `types-capital-distinct`, `types-partial-explicit-capital`, `types-partial-aura-*` |
191−| Constraint printing | 10171-10191 | P | `show-atom-constraint`: ` where A is an atom other than ?` / ` is an atom` / ` contains no gates` | all typed goldens with constrained vars |
192−| Names, dependencies | 10193-10214, 10327-10428 | M | `global-value-names`, `unique-value-name`, `dependency-expr` (syntactic, ignores binders, errs closed) | `types-partial-forward`, `types-scope-*` |
193−| Single recursion | 10216-10325 | G | `infer-recursive-gate` 10285: monomorphic `[%fn sam seed-or-fresh]`, body, unify product; `recursive-branch-seed` 10254 (closed base arm of a one-self-call loobean branch); refuses in defer mode; clears `gate-defs` | `types-recursive-*`, `types-local-recursive` |
194−| Mutual recursion groups | 10430-10533 | G | `seed-gate-group`, `infer-gate-group-bodies`, `group-schemes` (short merged-capital text 10495), `infer-gate-group` 10509 (rejects projections, holes, pending tags) | `types-recursion-scc-*`, `types-local-scc*` |
195−| Projection finalization | 10535-10549 | O | `width-finalize` | `types-proj-*` |
196−| Kosaraju SCC | 10552-10643 | M | Work-list DFS; components dependencies-first; duplicates → no components | `types-recursion-scc-order`, `types-value-cycles` |
197−| Resolver fixpoint and finalization | 10645-10778 | M | `add-groups`, `resolve-groups`, `add-supported-result`, `add-supported-defs-core`, `resolve-groups-core`, `dependency-order` (see 1.2(b) step 6, 2.7, 2.8) | all full-check suites; `module-import-*` |
198−| Failure diagnostics, value cycles | 10711-10734, 10785-10900 | P | `module-pending-tag` 10715; `definite-value-cycles` 10885 (report only) | buttons, program-init, program-update; `types-value-cycle*` |
199−
200−#### E. Union analysis and module checker (10902-12600)
201−
202−| Family | Lines | Cat | How it works | Tests |
203−| --- | --- | --- | --- | --- |
204−| Union projection and relation | 10904-11022, 11275-11286 | U | `project-union-mold` (local refs only, `seen` list), `union-relate` (`?` = {0,1}), `union-pairs` O(n²) in (i, j) order | full-overlap-*, import-overlap; 73 goldens print `cases proven disjoint`, 12 `overlapping cases` |
205−| Source disjointness slice + state screen | 11024-11187 | R | R19 | union-source [call] |
206−| Overlap witness | 11189-11273, 11288-11302 | U | `mold-overlap-witness` 11296: first projected overlap, else (only if some pair unknown) `union-source-overlap` 256 | union-alias-overlap, full-overlap-basic [call] |
207−| Hole detection | 11304-11430 | G | `simple-mold-hole` (unit unit span), syntactic `*-has-hole` | hole-guards [call]; `types-hole-*` |
208−| Report printers and entry wrappers | 11431-11500 | P | `show-partial-mold`, `show-inference-diagnostic`, `show-duplicate-fields`, `duplicate-fields-report`, `golden-types`, `golden-types-imports` | all typed goldens |
209−| Duplicate fields | 11520-11693 | O | Pre-inference syntax pass; nested cell opens a new scope (A30); message `record field `x` is repeated` | `types-record-field-*` |
210−| Scope validity, reserved `proj` | 11694-11773 | M | `import-binding-names` (includes `/%` marks, A25), `reserved-proj-*`, `module-scope-valid` | proj-guards, deferred-resolver [call]; `types-proj-reserved-*` |
211−| Module mold elaboration | 11775-11824 | G | `module-mold-types(-detail)`: each mold from the same base state (ids may repeat across templates); first failure aborts; overlap evidence for a union | full-overlap-basic [call]; `module-cache-incomplete` |
212−| Prelude bootstrap | 11826-12024 | R | R21 | `prelude-*`, `types-prelude-*` |
213−| Partial prelude interface | 11913-11926, 12026-12112 | M | `partial-prelude-molds` drops failing molds silently; `prepare-prelude(-with-internal)` re-parse | 33 suites call `prepare-prelude-with-internal`; `tools/golden:291` |
214−| Completeness and failure naming | 12114-12188 | P | `module-values-complete`, `module-missing-value`, `module-sample-shadow` | `module-missing-value-*` |
215−| Import resolver and cache | 12190-12200, 12219-12228, 12275-12324 | M | Cycle check before cache; legacy entries rebuilt; reuse needs identical inputs | `module-import-*`, `module-cache-*`; full-overlap-graph, request-guards |
216−| Request-graph merge | 12202-12218, 12229-12274 | A | Set union of paths; dedup requests/stores; 256/256 bound (A27) | store [call], request-guards |
217−| API path extraction, derived names, typing | 12326-12615 | A | `+$ paths`/`+$ poke` declarations, `api-derived-clash`, `api-path-analysis(-source)`, `api-path-evidence-source` | api-paths, api-evidence, hole-guards, proj-guards [call]; `module-import-api-*` |
218−
219−#### F. API interfaces (12596-13144)
220−
221−| Family | Lines | Cat | How it works | Tests |
222−| --- | --- | --- | --- | --- |
223−| Path evidence | 12596-12652 | A | `api-path-evidence-source/-graph` (copies, A31), `api-path-watchability` | api-evidence [call] |
224−| Request components | 12654-12698 | A | `api-request-parameter-types`, `api-request-fold-type`, `api-request-parts` (argument order not fixed) | api-evidence [call], todo-api |
225−| Supporting definitions | 12700-12774 | A | `api-support-analysis-source/-graph` (copies): ordinary `resolve-groups` with a positional state | api-evidence [call] |
226−| Prelude shape certificates | 12776-12845 | A | `compatible-raw-poke`, `request-compatible-ask`: structural `=` on hard-coded itype nouns | store [call], ask-guards, sub-guards |
227−| Request interface constructors | 12847-12956, 13020-13075, 13099-13144 | A | `one-request-interface-source` (dead) and `-graph` (narrow branch, A44), `api-sur-covered`, `api-request-gates` (fuel 256), `multi-request-interface-graph`; hand-built `∀0` schemes | request-guards, todo-api, page-main, todo-full; `types-request-normal`, `module-import-api-request-reason` |
228−| Poke-only interface | 12958-13018, 13077-13097 | A | `api-poke-interface(-result)`, `api-poke-from-checked`, `api-mark-exports` | hole-guards, api-paths, proj-guards [call]; `module-import-api-poke-*` |
229−
230−#### G. Kind recognition and program/store recovery (13146-14648)
231−
232−| Family | Lines | Cat | How it works | Tests |
233−| --- | --- | --- | --- | --- |
234−| Main-call recognisers | 13146-13240 | M | `program-main-def`, `program-main-wing`, `program-main-args/-parts`, `page-main-parts`, `store-main-parts`: syntax, heads matched by name (four copies of one walk, A48) | program-main, program-watch, store, page-main [call] |
235−| Store declaration, derived-name clash | 13242-13309 | M/P | `store-declaration`, `derived-name-clash` (precedence: definition, import face, another derived name, prelude name) | store; `module-import-store-*`, `module-import-api-*-clash` |
236−| Transparency helpers | 13311-13340 | R | `program-empty-null`, `program-subs-empty`, `program-transparent` | program-main, page-main |
237−| Update, subs recovery | 13342-13606 | R | R1, R2 | via `infer-jibb-file(-detailed)` |
238−| Slot and relation helpers | 13452-13503 | R | `program-inferred-slot`, `program-two-slot-names`, `program-update-relation` | via recovery |
239−| Keyed view-site walker | 13608-13749 | R | R3 | todo-full |
240−| Element message fits | 13751-13853 | R | R7 | todo-full, store, buttons; `types-prelude-ui` |
241−| View recovery | 13855-14155 | R | R3, R4 | todo-full, store |
242−| Initializer | 14157-14312 | R | R5 | program-init |
243−| Derived request/store evidence | 14314-14470 | A | `derived-poke-command-scheme`, `store-derived-schemes`, `program-subs-watch` 14367, `derived-request-member` 14405-14441, `derived-store-request-member` 14443-14470: provenance certificates compared by `=` | store [call], program-watch, page-main |
244−| Program main completion, kind boundary | 14472-14582 | R/M | `program-main-context` (R6), `static-main-specialized` (R9), `page-load-derived`, `page-main-closed` (R10), `program-main-closed` (R6) | program-main, program-watch, store, page-main [call] |
245−| Store kind | 14584-14648 | R | R8 | store |
246−
247−#### H. Driver, report, dg, fresh ids, grec (14650-15838)
248−
249−| Family | Lines | Cat | How it works | Tests |
250−| --- | --- | --- | --- | --- |
251−| Module driver | 14650-14879 | M | 1.2(b) | 23 suites call `infer-jibb-file`, 12 `infer-jibb-file-detailed` |
252−| Mold analysis entry | 14881-14933 | O | `gate-free-mold-source` | gate-free-source [call] |
253−| Report adapters | 14935-15024 | P | `golden-types-with-modules` (dead, A42), `-with-prelude`, `-with-prelude-and-internal`, `-with-prepared-prelude`, `reader-result-for-checker`, `-with-reader-diagnostics`, `-with-marks`, `-in-context` | tools/golden, tools/ship; 24 suites |
254−| Report core | 15025-15146 | P | 1.2(a) | all 304 typed goldens; deferred-prepared [call] |
255−| dg-* | 15147-15656, 15704-15719 | R/G | R20 | deferred, deferred-context, deferred-prepared, deferred-resolver [call] |
256−| Fresh ids | 15658-15702 | G | `ienv-fresh-id` = one above the max id in env (declines on a pending `%tag`); stands in for a global fresh supply | deferred [call]; program recovery suites |
257−| grec trees | 15721-15835 | R | R18 | generic-*, union-source [call] |
258−
259−## 2. Inference today
260−
261−### 2.1 Unification and type comparison: one unifier, one fit, many special comparators
262−
263−| # | Comparator | Lines | Direction | What differs |
264−| --- | --- | --- | --- | --- |
265−| 1 | `itype-unify` | 4851-4940 | symmetric | The only structural unifier. Returns `(unit isub)` with no reason. Nominal rules: grec/jrec/recursive identity; union by origin then (argless) raw case equality or args; face names must match. Atom-kind lattice by pairwise cases 4884-4925. Never widens |
266−| 2 | `itype-fit` / `itype-fit-inner` | 5516-5711 | actual → expected | Widening (aura prefix, `@`, `*`, empty source), tag binding, ctor case selection; three-valued; calls unify for vars and as last resort. Gate types are compared by unify (invariant) except `itype-closed-gates-match` |
267−| 3 | `itype-fit-cases`, `itype-fit-ctor-cases` | 5451-5514 | actual → union cases | Each case tried from the original sub; unique `%ok` wins, two → `%unknown` |
268−| 4 | `itype-closed-gates-match` | 5229-5263 | symmetric, closed only | Gate equality modulo one omitted outer sample-slot face; all unifies from empty sub |
269−| 5 | `direct-invariant` | 9097 | both ways | Fit forward and backward plus a face-asymmetry test; 19 call sites, 16 in program/store recovery |
270−| 6 | `direct-function-fit`, `direct-positional-fit` | 9107, 9142 | both ways per slot | Two-slot gate samples matched with binder-face stripping, then replay must leave `sub`/`next` unchanged |
271−| 7 | `program-union-tag-case`, `program-single-case-fit`, `program-single-generic-fit`, `program-keyed-product-fit` | 13751-13853 | element messages | Select the one literal-tagged case, fit head and tail; element covariance only for a single case |
272−| 8 | `contextual-tagged-case` | 9545 | expected union | Unique const-headed case by head noun |
273−| 9 | Structural `=` on itype | 12782, 12805, 14314-14349, 14408-14470, 14599-14648; `infer-closed-cell-branch` 9616; `dg-stable-fit` 15427; `dg-stage-one` 22-field state equality 15458-15479; `program-init-model` replay 14163-14213 | exact | Prelude certificates and "stability" checks substitute for constraint solving |
274−| 10 | `union-relate` | 10994 | pattern overlap | Not a type relation; noun-shape projection used for disjointness |
275−
276−### 2.2 Substitution
277−
278−- Representation: `isub` assoc list (4688), prepended, never compressed; `itype-lookup` 4691 linear.
279−- Head walk: `itype-walk` 4698-4732, six identical arms (`%var|%fvar`, `%avar`, `%rvar`, `%nvar`, `%rnvar`, `%tag`) that stop at a self-binding to `%fvar`/`%rvar`/`%rnvar` (A16). Self-bindings are created at 4887-4889 (nvar~rvar), 4962 (gate-free form) and in `promote-restricted-numbers` (6119-6131). Any other self-binding loops forever (no fuel).
280−- Second walker: `dg-scan` 15150-15178 follows the sub with fuel; recognises only `%rvar`/`%rnvar` self-bindings, so an `%fvar` self-binding burns fuel and declines.
281−- Full application: `itype-normalize` 6012 (95 call sites); leaves `%tag`, `%recursive`, `%jrec` unexpanded.
282−- Whole-sub scans used as provenance screens: `contextual-simple-sub` 9519 (unbounded), `closed-cell-sub-safe` 9592 (512), `grec-direct-context` 9527 (4,096), `union-state-sub-budget` 11147 (256). Each declines if *any* entry binds a structural type, so behaviour depends on inference order.
283−- Mold-level substitutions (not the type substitution): `bind-params` 6873 (param name → arg type, by re-elaboration), `template-apply-sub` 6882 (rename scheme vars to args), `union-overlap-case` 11206 (tvar → arg pattern).
284−- Rollback is implicit: speculative attempts drop their returned state (`known-union-subject` 8541, closed-cell retry, tagged-case retry 9768-9774, direct-gate replay, `infer-recursive-gate` retry, failed locals).
285−
286−### 2.3 Generalization: six sites, four rules
287−
288−| Site | Lines | Rule |
289−| --- | --- | --- |
290−| Top level (`add-supported-result`) | 10682 | Quantify **every** variable of the normalized type. Sound only because each definition starts at `next=0` (10699) and the env holds closed schemes |
291−| Report (`golden-types-in-context-core`) | 15141 | Same, copied |
292−| Locals (`infer-local-defs`) | 7677-7681 | Type vars minus `free-env-vars(env)` (7307: normalizes every non-quantified var of every env scheme) minus `free-cap-vars(enclosing caps)` (7320) |
293−| Groups (`group-schemes`) | 10502-10504 | Same rule with the outer state's caps |
294−| dg (`dg-generalize`) | 15222 (called 15482) | Vars of the normalized type minus "blocked" = env-free (`dg-env` 15187, whole env scan) + obligation vars + tag-reachable vars (`dg-tags` 15209) + captured; bounded scan 32,768; ≤64 edges |
295−| Molds (`infer-mold-template`) | 6970-7000 | Exactly the fresh param ids; a nongeneric mold must be closed |
296−| Hand-built schemes | 12889, 12943, 13068, 14349, `store-derived-schemes` 14351 | `[… ~[0]]` literals |
297−| Recovery publication | via `add-supported-result` in 13444, 13600, 13927, 14107, 14149, 14306 | Then require `vars ~` and no `itype-vars` (closed-only) |
298−
299−Instantiation is one arm, `instantiate-scheme` 6355 (fresh ids from `next`, kind precedence, fresh atom/gate-free ids pushed onto `binders`, which is what lets `types-partial-atom-alias` re-generalize), plus `template-apply(-sub)` for molds and `itype-rename` 6219. Fresh ids for env-mixing code come from `ienv-fresh-id` 15666 (program recovery 13381, 13543, 13894, 14008, 14271; dg roots 15607, 15649).
300−
301−### 2.4 Branch joins: one join, several non-joins
302−
303−- Join rule (Q11, A133 fixed in 38c711c): `itype-branch-join` 5138 (two arms) and `itype-branch-join-list` 5202 (n arms), falling back to `itype-concrete-join` 5125. Callers: 8029 (list), 8073 (unit), 8226 and 8314 (union folds), 8919 (loobean; failures classified into five messages 8921-8929), 15333 (dg boolean).
304−- Checking-mode branches do not join; each arm is fitted to the expected type and the result is `expected`: `infer-union-context` 7763, `infer-known-union-context-whole` 8246, `infer-known-union-finite` with expected 8292, `infer-single-case-branch` 8361, `infer-cell-branch` 9894, `infer-unit-branch`/`infer-list-branch` with expected (A133 note).
305−- Other "joins": open list literal items are fitted to one element var (`infer-open-list-items` 7879, messages `list item widening is not supported` / `list items do not have compatible types`); `infer-closed-cell-branch` 9616 requires the two arm results to be equal and closed; `dg-boolean-branch` 15316 falls back to a fresh result var with two `dgo` edges.
306−
307−### 2.5 Pending constraints (no queue)
308−
309−| Constraint | Where held | Created | Checked | Outcome when unresolved |
310−| --- | --- | --- | --- | --- |
311−| Tag/`~` literal, ctor | `istate.tags` (`ipending`) + `%tag` pseudo-var | 8780, 8781, 8848 | end of each definition: `pending-tags`/`pending-null` 5351-5370 | locals wait (7673); top level dropped (10680); report prints `tag needs context` / `` `~` needs context `` (15131-15134); groups fail (10529); dg fails (15503); full check explains with `module-pending-tag` 10715 |
312−| Type hole | `istate.holes` (`ihole`) | 7103 | `default-hole-numbers` 6133, `unresolved-hole` 6168 | error (locals, report) or drop (top level); groups reject any new hole (10527) |
313−| Decimal literal | `%nvar`/`%rnvar` | 8773 | `default-decimals` 6062 at top level (10679), report (15130), `width-finalize` | locals do **not** default before generalizing; groups/dg reject `%nvar` (10499, 15481) |
314−| Atom-kind var | `%avar`/`%rvar` + `binders` | 5666, 4887, `instantiate-scheme` | `unsupported-atom-vars` 10159 | locals wait; top level drop; report `unresolved aura-variable inference` |
315−| Written capitals | `istate.caps` | `reserve-def-caps` 7509 | `merged-capitals` 10072, `constrained-capitals` 10089 | definite error (locals, report) or drop |
316−| `proj` | `istate.projections` | 9461 | `width-finalize` 10535 | drop / report message; groups reject |
317−| Call/cast fit `%unknown` | nowhere |: | immediately | `call/cast constraint is not supported…`; in defer mode a `dgo` |
318−| Deferred fit edges | `istate.obligations` (`dgo`) | 9262-9265, 15316, 15355 | `dg-replay-edges` 15252 at transaction close | whole transaction declines; outside dg any obligation is an error (7661) |
319−
320−Nothing carries a constraint from one definition to the next except the dg transaction. A later definition (e.g. `main`) can never fix an earlier definition's tag; that is why the program recovery arms exist.
321−
322−### 2.6 Order of solving
323−
324−Synthesis is left-to-right and eager: every fit is decided when it is met, with `%unknown` meaning "give up". Expected types flow only through `infer-call-context-arg` 9664 and its ~19-step ladder; casts and known call samples are the only sources of context.
325−
326−### 2.7 Fixpoints and retries
327−
328−| Loop | Lines | Bound | Notes |
329−| --- | --- | --- | --- |
330−| Module resolver | 10749-10756 | env stops changing | One productive pass in dependency order (839f6b0) plus a confirming pass; fixpoint kept as fallback (A135) |
331−| `add-supported-defs-core` | 10690-10709 | one pass | Retries `infer-recursive-gate` after every failed `infer-fragment` (10705), gate or not (A33) |
332−| `add-groups` | 10645-10660 | one pass per resolver iteration | Errors discarded |
333−| Locals | 7624-7639 | progress | Pass loop; then `graph-components` + `try-local-group` 7686; then the order-independence rules decide definite vs `local definitions need unsupported inference` (7637) |
334−| dg-stage | 15496-15522 | ≤64 defs, fuel² = 4,096 attempts | Retry `(flop waiting)`; close: replay edges twice and require unchanged `sub`/`next` (15501-15510) |
335−| Program recovery | 14786-14804 | single pass | No fixpoint; order matters |
336−| Report | 15079-15146 | one pass | Re-infers every non-group definition after resolution |
337−| `module-pending-tag` | 10715-10734 | fuel 64 | Failure-path re-inference only |
338−| Replay "stability" checks | 9142/9191 (direct gate), 9616 (closed cell), 14163-14213 (init model), 15501-15510 (dg) |: | Stand-ins for "the constraints are solved" |
339−
340−### 2.8 Definition finalization: five copies
341−
342−| Step | `add-supported-result` 10670 | report 15117 | locals 7659 | groups 10488/10509 | `dg-stage-one` 15445 |
343−| --- | --- | --- | --- | --- | --- |
344−| obligations unchanged |: |: | 7661 | refuses defer 10512 | collects them |
345−| `promote-restricted-numbers` | 10675 | 15117 | 7662 |: |: |
346−| `default-hole-numbers` | 10676 | 15118 | 7663 | holes must not change 10527 | holes unchanged 15477 |
347−| `unresolved-hole` | 10677 drop | 15119 message | 7664 fail |: |: |
348−| `merged-capitals` |: (only via constrained) | 15122 long text | 7666-7669 long text | 10493-10495 short text | any written capital declines 15452 |
349−| `constrained-capitals` | 10678 | 15128 | 7670 | 10496 |: |
350−| `default-decimals` | 10679 | 15130 | **none** | nvar → fail 10499 | nvar → decline 15481 |
351−| `pending-null` |: | 15131 |: |: |: |
352−| pending tags / tag in type | 10680 drop | 15133 | 7673 wait | 10529, 10500 | blocks generalization; 15503 at close |
353−| hidden recursive/generic name |: | 15135-15138 |: | 10500 | `dg-interface-safe` 15573 at publish |
354−| `unsupported-atom-vars` | 10681 drop | 15139 | 7675 wait | 10500 | 15480 |
355−| quantify | all vars 10682 | all vars 15141 | minus env/caps 7677-7680 | minus env/outer caps 10502-10504 | `dg-generalize` 15482 |
356−| `width-finalize` | 10683 | 15142 | (left to the enclosing definition) | projections must not change 10525 | projections unchanged 15479 |
357−
358−## 3. Recovery slices
359−
360−"Would fail if removed today": `[call]` suites name the slice's arms and stop compiling if the arms go; `[out]` suites or goldens whose expected output depends on the path (from fixtures; not executed). **No typed golden reaches R1-R10, R18 or the full-check side of R20**, because the report (15025) runs no recovery, no kind check and no grec index, and the only goldens whose case-local modules have a `main` (`module-import-api-import-error`, `module-import-store-derived-clash`, `module-import-store-face-clash`, all importing a cart store) stop at the derived-name clash before inference. Those slices are pinned only by `tests/lib`.
361−
362−### 3.1 Example-fitted slices
363−
364−| # | Slice | Lines | Serves | Does instead of ordinary inference | Would fail if removed |
365−| --- | --- | --- | --- | --- | --- |
366−| R1 | Update recovery `program-update-context` | 13342-13450 | Todo island `update` (`my-app/ui/todo-list.jibb:16-25`) and basket `update`: bodies end in `[m ~]` and `\|=%acked`, whose tags have no context inside the definition, so `add-supported-result` drops them (10680) | Reads message/model from the written two-slot sample (binder faces stripped), builds `[model (list (cmd message))]` from prelude templates, proves it against program's instantiated slot with `direct-invariant`, checks the body in context, casts, merges faces, publishes only a closed scheme | [out] program-update (all `tests/type-program-update/*`), todo-full, store (basket), page-main (`index.jibb` imports `todo-list`), program-init (needs the update relation) |
367−| R2 | Subs recovery `program-subs-context` | 13505-13606 | Todo `subs ~[[%watch (todos.todo \|=%got)]]`, basket `(state.cart \|=%got)` | Same pattern with `(list (sub message))` and program slot 4 | [out] todo-full, store, page-main, program-init (`initializer-subs`) |
368−| R3 | Keyed view recovery `program-view-context` + view-site walker | 13608-13749, 13938-14155 | Todo `view` with exactly one `each (turn todos.m row-of)` and the mapper `row-of` | Finds the site syntactically, instantiates `each`/`turn`, infers the mapper and the view against hand-built `element message` types, publishes both mapper and view | [out] todo-full (`expected`, `alias`, `ambiguous-mapper`, `open-key`, `non-gate-view`, `wrong-*`), page-main, program-init (`initializer-open-view`) |
369−| R4 | Plain view `program-plain-view-context` | 13855-13936 | Basket `view` (no keyed site, 4bf477e) | Checks the body against `(element message)`; does not check program slot 3 (A48 drift) | [out] store (basket) |
370−| R5 | Initializer `program-init-model`, `program-init-ordinary`, `program-plain-init-context` | 14157-14312 | Todo `init \|= ts=(list item.todo) [ts "" ~]` (`~` needs context), basket `init \|= ~` | Model from the update relation or from a tentative positional fit of main's args (`direct-positional-fit` + replay stability), then context check of the body; ordinary fallback in a separate state | [out] program-init (17 `initializer*` fixtures), todo-full (`cast-init` guards ordering), store, page-main |
371−| R6 | Main completion and program kind check `program-main-context`, `program-main-closed`, `program-subs-watch`, `program-subs-empty` | 13311-13340, 14367-14403, 14472-14482, 14555-14582 | Any direct `(program i u v s)` main | Re-infers `main` after recovery (only agreement check); kind check instantiates program from `*istate`, requires closed invariant main, gate-free init data and model (256 shared budget), and one syntactic watch shape | [call] program-main, program-watch, store (`program-main-closed`); [out] program-main, program-watch, todo-full, store, page-main, program-update/init |
372−| R7 | Element message fits and the list-item hook | 7887-7891, 7909-7913, 9355-9394 (element exception in `infer-contextual-call`), 13751-13853 | Todo union controls (`button "Add" %submit`, `field … \|=%typed`), raw constructors (docs/compiler.md:153) | When an ordinary list-item fit to a prelude `element` union fails, prove the message argument invariantly or pick the single literal case; pre-unify recursive `element` results | [out] todo-full, store, buttons; goldens `types-prelude-ui` (`bad-child` and element lines), probably `doc-grammar-02-buttons` (`labelled`) |
373−| R8 | Store kind and main recovery `store-update-unfaced`, `store-main-closed` | 14584-14648, swap 14844-14849, completeness exception 14817-14819 | Cart store `my-app/ui/stores/cart.jibb` ("The builder erases the action from main", 14597) | Checks prelude `store` value and mold by `=`, checks init/update against local `state`/`poke` invariantly, publishes `[canonical ~]` as `main` even if `main` never inferred | [out] store (cart, basket); compiler.md:143 |
374−| R9 | Static main `static-main-specialized` | 14484-14508, swap 14836-14843 | `about.jibb` `++ main view` | Instantiates main from `*istate`, fits into `(element !!)`, publishes the canonical closed scheme | [out] page-main (about, `wrong-static`) |
375−| R10 | Page kind `page-load-derived`, `page-main-closed` | 14510-14553 | `index.jibb`, `blog/index.jibb` | One syntactic load shape `case.face reply`, provenance via `derived-request-member` | [call] page-main |
376−| R11 | Direct gate-layout evidence `direct-*`, `istate.gate-defs/head-evidence` | 9002-9228; set at 10701-10702, 15108-15109, recovery arms | `(program init update view subs)` with a faced `update \|= [=msg m=model]` against prelude `update=$-([M X] …)` (`prelude.jibb:534`) | After an ordinary call fit is not `%ok`, re-parse the prelude (A132), match written gate samples slot by slot, both ways, then replay | [call] direct-gate-guards; [out] direct-gate-source (`tests/type-direct-gate`), program-main, program-update, todo-full; golden probably `types-prelude-ui` `++ concrete-program` (line 72 of its source) since the report sets `gate-defs` |
377−| R12 | Closed gate sample matching | 5229-5263 (called 5701, 5316) | Todo API named closed fold gates (a1c5f35; contract 4643-4644, 4653-4655) | Gate equality ignoring one outer slot face | [out] closed-gate-guards (through `itype-fit`), todo-api, todo-full, program-watch, page-main |
378−| R13 | Positional face rule | 5313-5349, 9285 | `like` result mapping (640a442) | Ignore one sample-slot face per written argument | [call] positional-face-guards, direct-gate-guards; goldens `types-positional-faces`, `types-prelude-like` |
379−| R14 | Closed-cell branch retry | 9564-9662, dispatch 9743 | Todo `update` inner `?- (gth …)` returning `[m(...) ~]` (22f3788) | Re-check a two-loobean branch against a cell target from the original state; results must be equal, closed, tag-free; replay | [call] cell-branch; golden `types-cell-branch-context`; [out] todo-full |
380−| R15 | Contextual tagged case | 9477-9562 (`contextual-tagged-case` 9545), dispatch 9753-9780 | Todo `subs` body `~[[%watch (todos.todo \|=%got)]]` (72acdb3) | Try ordinary inference; else select the union case by literal head and check the payload in context | [call] nested-union-guards; goldens `types-nested-union-context`, `types-nested-shallow-preserve`; [out] todo-full |
381−| R16 | `infer-contextual-call` element exception | 9355-9394 | Todo controls, `\|=%got` callbacks | Pre-unify a same-origin generic union result with the expected type; recursive only for prelude `element` | goldens `types-generic-result-context`, `types-prelude-ui` (likely); [out] todo-full |
382−| R17 | `%jrec` / qath | 4680, 6925-6952, 8392-8420, 8757-8763, 8807-8821, 9699-9714 | Internal prelude `qath` (`internal.jibb:15-17`, 0ea700d); theme `font=` qath literal; `image`/`link` | Recognise `~ / [h=@aura t=self]`, unfold one layer per fuel (256 per definition) for matching, construction and static path literals | [call] qath-fuel; qath-source, theme; goldens `types-qath-*`, `types-arithmetic-proj-qath`, `types-prelude-ui` (`image-scheme`, `link-scheme` print `qath`) |
383−| R18 | `%grec` generic tree | 4681, 6954-6968, 8422-8475, 9527-9539, 9684-9698, 15721-15835, 4801 | Test-only node tree (`tests/type-generic-recursion`, c96597d) | Fixed two-case shape proof; one-layer view for patterns/construction; index only for import-free prelude-backed modules (14762-14772) | [call] generic-recursion, generic-construction, generic-pattern, union-source; golden `types-generic-recursive-union` only as an unsupported control |
384−| R19 | Union source disjointness, state screen, source overlap witness | 11024-11187, 11189-11273 | One-hop local generic alias with a literal head (b93a94b) | Bounded syntactic proof of distinct heads / positive overlap when projection is unknown | [call] union-source, union-alias-overlap, full-overlap-basic; goldens `types-union-source-alias`, `types-prelude-succ` |
385−| R20 | dg-* deferred transaction | 15147-15656, 15704-15719; hooks 8854, 8879, 8951, 9261-9265, 9281, 9667-9669, 10288, 10512 | Import-free modules without a prelude (full check, 14807-14816); prepared-prelude reports whose fixture is the todo initializer `[xs "" ~]` closed by a later cast (`tests/type-deferred-prepared/good.txt`) | Re-infer definitions with obligation edges for literal branch arms, tuple items and ctor args, retry to a fixpoint, replay edges twice | [call] deferred, deferred-context, deferred-prepared, deferred-resolver; goldens `types-constructor-context`, `types-union-singleton` reach the screens but the transaction declines (report unchanged) |
386−| R21 | Prelude bootstrap | 11826-12024 | `prelude.jibb`, `internal.jibb` | `standard-prelude-list` pattern-matches `\|$ [A] $@(~ [i=A t=(list A)])` and publishes `%collection`; six hard-coded primitive schemes (11930); `infer-private-internal` proof retry; `prelude-label*` | all module-check goldens and 33 suites that prepare the prelude |
387−| R22 | API narrow branch `one-request-interface-graph` | 12904-12956, 14711-14721 | Blog API (one mark import, non-union paths) | Hand-built one-request interface; redundant with multi-request (A44); `one-request-interface-source` 12850 is dead | [out] page-main (blog API), request-guards |
388−
389−### 3.2 Ad hoc slices of general inference (not fitted to one example, but replaced by the core)
390−
391−| Slice | Lines | Replaced by |
392−| --- | --- | --- |
393−| Two-arm unit/list branches | 7923-8075 | usefulness over `~`/cell constructors |
394−| Three coverage loops + 64-row loobean expansion | 8103-8350 | usefulness |
395−| One-arm structured / cell-binder / empty-list / empty-union | 8351-8390, 8555-8608, 9852-9928 | one-row usefulness, empty types have no constructors |
396−| Speculative subject screens | 8477-8549 | infer subject once |
397−| `recursive-branch-seed`, blanket `infer-recursive-gate` retry | 10216-10325, 10705, 10729, 7646 | SCC let-rec with levels |
398−| `known-union-subject` double inference | 8541 |: |
399−| Loobean join failure classification | 8920-8929 | one join + deferred widen |
400−| Import-invalid replay | 7002-7097 | elaboration returning reasons |
401−| `module-pending-tag`, `module-missing-value`, `module-sample-shadow` | 10715, 12132, 12171 | per-definition errors from the core |
402−| Order-independence rules for locals | 7521-7584, 7633-7637 | SCC order + deferral |
403−
404−## 4. What the core replaces, what it must keep, and the hazards
405−
406−### 4.1 Replaced
407−
408−| Core piece | Replaces |
409−| --- | --- |
410−| Union-find store over a map, path compression, one global fresh counter | `isub`/`ibinding` 4687-4688, `itype-lookup` 4691, `itype-walk` 4698-4732, `dg-scan` 15150, `ienv-fresh-id` 15666-15702, per-definition `next=0` (10699, 10752, 14759, 15107) |
411−| Kind on the root (any ⊐ gate-free ⊐ atom ⊐ atom-other-than-? / defaultable number) | `%fvar %avar %rvar %nvar %rnvar` (4666-4670), the pairwise lattice 4884-4925, self-binding refinement (4887-4889, 4962, 6119-6131), `itype-bind-gate-free` 4998 and its 256 budget, `itype-var-is-*` 6267-6343, `binders` bookkeeping for `unsupported-atom-vars` 10159 |
412−| Levels | `free-env-vars` 7307, `free-cap-vars` 7320, `shared-types`/`shared-moved`/`closed-local` 7534-7584, `dg-env` 15187, `dg-generalize` 15222, all-var quantification 10682/15141 |
413−| Deferred-constraint queue (woken on binding, reported at module end) | `%tag` + `ipending` + `pending-tags`/`pending-null` 5351-5370 + drop at 10680 + `module-pending-tag` 10715; holes 6133-6181 (as level-exit obligations); decimal defaulting 6062 and promotion 6119 (as level-exit defaulting); fit `%unknown` (5527-5711) as "enqueue"; `itype-fit-ctor-cases` 5474; field access 7720, change 8622, interpolation 8081, `proj` 9461, cell/cons literals 7834; the whole dg-* transaction 15147-15719 and its hooks |
414−| Bidirectional check mode (synthesize then unify/subsume with expected; push expected into arms and items) | most of `infer-call-context-arg` 9664-9783: contextual branches 7749-7921, unit context 9321, singleton 9480, tagged case 9477-9562, closed-cell retry 9564-9662, `infer-contextual-call` pre-unify 9355 |
415−| Maranget usefulness over a constructor signature taken from the subject type | 7923-8075, 8103-8390, 8395, 8425-8475, 8477-8608, 9852-9928, `dg-boolean-patterns` 15292; branch routing 8878-8930 |
416−| One nominal recursive mold `(module, name, args)` unfolded on demand | `%recursive`/`%jrec`/`%grec` 4679-4681, `simple-source-recursive` 6925, `simple-source-generic-recursive` 6954, `jrec-match-view`, `qath-static-fuel`, grec 15721-15835, `jrec-fuel` |
417−| SCC driver, one pass, scheme-or-error per definition | `resolve-groups-core` fixpoint 10736-10756, `add-supported-defs-core` retries, `add-groups`, locals' pass loop 7611-7681, `try-local-group` 7686, `dg-stage` 15487 |
418−| `main` as an ordinary application, sample-slot faces as labels | program chain 13342-14482, `direct-*` 9002-9228, `itype-closed-gates-match` 5229-5263, positional face rules 5313-5349, element fits 13751-13853 and hooks 7887-7891/7909-7913, `static-main-specialized` 14487, store component recovery 14599-14648 |
419−| One pipeline (Q6) | report re-inference 15079-15146; its separate finalization 15117-15143 |
420−| Five finalization copies (2.8) | one generalization step at level exit |
421−
422−### 4.2 Kept (retargeted to the new representation, behaviour preserved)
423−
424−- **Printers**: `show-itype` 9930-9995 (A-Z then T26…, `(label args)`, space-separated unnamed unions, parenthesised in context), `site-type-note` 10024, `show-atom-constraint` 10171, `canonical-itype` 6345 with `itype-vars` order 6183 (fn sample before product, head before tail, union args before cases) and kind precedence rvar > avar > fvar > var, `show-partial-mold` 11431 (until Q6 changes the report), `show-inference-diagnostic` 11458, `show-duplicate-fields` 11470, `prelude-label*` 11870-11911, `itype-in-import` labels 6806 (display separate from identity).
425−- **Error wording and site notes** (golden-pinned; full list in 4.3).
426−- **API path analysis and derived interfaces**: 12326-13144 and 14314-14470, `derived-name-clash` 13289, request-graph 12202-12274, watchability; they synthesize schemes into interfaces before consumers are checked. The hand-built schemes should become instantiations of declared templates.
427−- **Hoon importer bridge**: 6397-6728 plus `jibb-dev/lib/jibb-import.hoon`; the import-invalid wording (`invalid imported mold` + importer message).
428−- **Overlap witness and disjointness**: `upat`/`union-relate`/`union-pairs` 10904-11022/11275, `mold-overlap-witness` 11296, `module-mold-overlap` 11786, `jfile-overlap` 11513 evidence. `union-relate` is also the importer's disjointness relation (6477, 6665), so either keep `upat` as the importer projection or give itype a pattern view.
429−- **Pre-inference passes**: duplicate fields 11520-11693, scope and reserved `proj` 11694-11773, dependency extraction 10327-10428, Kosaraju 10552-10643, value-cycle diagnosis 10785-10900 (wording), module graph and cache 12190-12324.
430−- **Elaboration**: `infer-simple-shape` 7099 / `infer-mold-template` 6970 / `label-direct-union` 6843 (mold → type, origin assignment), `proj` planning 5835-5923, 9396-9475, `width-finalize` 10535 (artifacts), `gate-free-type` 5925-5992 as a post-solve check with witness path.
431−- **Kind boundary** as post-solve matching of `main`'s closed type against prelude molds; watch/load provenance checks; store-derived exports.
432−
433−### 4.3 Hazards
434−
435−1. **Golden output moves.** All 304 `types.txt` come from the report path. Pinned fail-closed lines: 80 `tag needs context in partial inference`, 24 `` `~` needs context ``, 32 `call constraint is not supported…`, 37 `cast constraint…`, 5 `record width constraint…`, 5 `proj constraint…`, 6 `type hole needs unsupported inference`, 6 `unresolved aura-variable inference`, 4 `call result face propagation`, 31 `local definitions need unsupported inference`, 47 `name is not available to partial inference`; 127 goldens contain some unsupported text. Mold lines: 171 `+$ X: not checked`, 171 `cases proven disjoint; mold not checked`, 6 `case disjointness unresolved`, 22 `overlapping cases`. A stronger core changes these; each stage must either keep the exact `%unknown` sites or budget a deliberate golden update (Q6 predicts ~283 outputs change once).
436−2. **Definite wording to keep byte-exact**: `call's sample and argument types do not unify` + `called gate`/`argument` (116 golden lines, 53 goldens); `branch arms have incompatible types` + `first arm`/`second arm`; `cast mold and expression type do not unify` + `cast mold`/`expression`; `{label} has no case `%x`` + `expected union`/`tag` (8706); `record has no field `x`` + `unknown field`; `change field and replacement do not unify`; `a change takes at least one field` + `empty change`; `missing union case X` (no sites, first remaining case); `branch arm is covered by earlier arms` + `covered arm`; `branch does not cover both loobeans`; `nothing fixes the union of %x` (5363; `tests/type-buttons/error.txt`, program-init, program-update; not in any golden); `non-gate value depends on itself through a cycle` + `value in cycle`/`dependency in cycle`; the long capitals message (7669, 15126) vs the short one (10495); `type hole needs a determined type` + `unresolved type hole`; `a generic atom in interpolation needs an aura`, `a cell in interpolation needs a printer`; `record field `x` is repeated` + `first field`/`repeated field`; derived-name clash texts; module/API texts in 1.2(b).
437−3. **Sites decide definiteness.** `definite-diag` 7521 treats site-less diags as retryable; several definite-sounding errors have no sites (`missing union case`, `pattern binder shadows a name`, `unit present pattern is unreachable`, `sample shadows a name`). Adding sites changes local-definition outcomes (they stop ending as `local definitions need unsupported inference`).
438−4. **Message precedence is order-dependent**: report checks 15117-15143 in fixed order; loobean join classification 8921-8929; missing tag → nested tag → generic after every `%bad`; union coverage checks `%unknown` before coverage and `covered` before `not supported` (A15); locals report the earliest failing local (`rear sure`, 7636); finite expansion prints `%.n` rows before `%.y`; the full check reports pending tag, then shadowing sample, then missing value (14821-14832); API precedence poke-only → clash → scope → import error → constructor reason.
439−5. **Unification semantics goldens rely on**: unequal atoms never unify; argful named unions unify by args only, argless by raw case equality (A11); `%var` binds faces, unions, tags; a `%tag` vs non-var fails in unify; faces must match by name; fit is invariant for gates; `*` accepts gates (A23, pending Q18) and binds bare tags (A22); term literal fits `@tas`/`@ta` with no aura check (A20); `?` vs `@f` is unknown; zero vs list unknown; only `@` allocates in fit.
440−6. **Self-binding invariant**: any self-binding other than `%fvar`/`%rvar`/`%rnvar` loops `itype-walk`. A staged migration that keeps `isub` alongside a union-find store must keep this invariant or convert at the boundary.
441−7. **Ids**: ids restart at 0 per top-level definition, `itype-rename` is single-pass, so scheme ids may coincide with fresh ids by design (6008-6010); `module-mold-types` reuses one base state per mold, so template ids repeat. A union-find store must never assume scheme ids are globally unique; instantiate always.
442−8. **Rollback**: speculative attempts drop state; tests assert that failed retries return the original result and replays leave `sub`/`next` byte-identical (cell-branch, direct-gate-guards, deferred). A mutable store needs a trail/snapshot or a persistent map.
443−9. **Provenance screens**: grec, tagged-case and closed-cell screens decline if any substitution entry is structural; `infer-call-context-arg` reads raw `expected` at 9732, 9743, 9756. Behaviour of these slices depends on inference order; a new store changes when they fire.
444−10. **Budgets pinned by tests**: `jrec-fuel` 256 (qath-fuel uses 0/1/2); grec arms 128; closed-cell screens 512 (cell-branch tests the limits); `union-source-distinct-tags` 18 ok / 17 declines; `union-source-overlap` 20/19; `module-mold-params-valid` 256/257; `union-source-state-safe` 256/257 caps; `dg-direct-source` 63/64 wrappers, `dg-source-candidate` 64/65 defs; `ienv-fresh-id` results `2.000.002`, `1`, `10`; `dg-generalize` results `~[43]`, `~[81]`, `~[722]`, `~[713]`. Other literals: empty proof 256 in fit, live cases 4,096, inhabitation 256, finite 64, width 1,024/4,096, gate-free 256, obligations 62/63/64, `module-pending-tag` 64, request graph 256/256, `api-request-gates` 256.
445−11. **`istate` shape**: 27 positional fields at 10 literal sites, 5 bunts, `dg-stage-one` compares 22 fields (15458-15479), 13 suites use `istate:jibb`, all by bunting `*istate:jibb` and setting fields by name. Adding union-find, level or queue fields touches the 10 literal sites; a constructor arm (A28/A125) should come first.
446−12. **Interfaces are hashed nouns**: `iwidth-definition` carries the raw `sub` (10687) into `ifile.elaborations`; cache reuse compares inputs by equality (12219, 12275). Changing the representation changes interface nouns, cache keys and anything comparing `ifile`s (`request-graph-merge` dedup, `derived-request-member` evidence equality).
447−13. **Structural `=` certificates**: `compatible-raw-poke`, `request-compatible-ask`, `derived-poke-command-scheme` (five `cmd` cases in order `poke go wait now who`, label `raw-poke`), `store-main-closed`, `derived-request-member` (`∀m. $-($-(full m) (ask m))`), `derived-store-request-member`. A new var representation must keep these equal or replace them with template comparisons; any edit to `prelude.jibb`/`internal.jibb` silently disables them.
448−14. **Printer stability**: variable letters depend on `itype-vars` order and kind precedence; `site-type-note` suppression rules; nvar/rnvar print as atom constraints; `(unit qath)` and other public labels rely on `prelude-label-nested` (A134; jibb-theme).
449−15. **Prelude identity checks**: exact list scheme compared at 7844, 7996, 8572, 8800, 14767 (and built at 11920, 11979, 12013, 12064); unit via `standard-unit-template` 8646; `element` by origin `[at.prelude %element]`; qath must be `%jrec` at `/lib/jibb/internal/jibb` (8816). The core must expose the same identities or these paths all fail closed.
450−16. **Two pipelines**: changing the resolver or finalization in one pipeline without the other moves goldens or suites (A46, A122). The golden report also runs the full check on imported case-local modules (14989), so module-check goldens see both.
451−17. **Recovery adapters**: until R1-R10 are retired, they call `itype-fit` (22×), `itype-merge-faces` (12×), `instantiate-scheme` (12×), `direct-invariant` (16×), `template-apply` (15×), `infer-sample`, `reserve-def-caps`, `record-fields-named`, `itype-in-import`, `add-supported-result` (6×), `infer-call-context-arg` (6×), `ienv-fresh-id`; and they mix substitutions on purpose (body inferred from the sample's own sub with the gate-fit's `next`, 13418-13421; mapper from `initial`). A core that threads one store changes their edge behaviour.
452−18. **Negative fixtures that encode recovery limits, not spec errors**: `tests/type-todo-full/ambiguous-mapper.txt`, `alias.txt`, probably `open-key.txt`; generic strings `module definitions need unsupported inference: /p: ++ name` and `module kind needs unsupported inference: /p` asserted by program-update/init/main. An ordinary-application core will accept or reject these differently; decide per fixture.
453−19. **`program-single-generic-fit` is in ordinary inference** (7890, 7912) for any prelude `element` target, so removing the program recovery does not remove it; `types-prelude-ui` and `doc-grammar-02-buttons` depend on the path that reaches it.
454−20. **Performance**: assoc-list lookups and 95 `itype-normalize` calls; `unique-type-vars` O(n²); `free-env-vars`/`dg-env` rescans per generalization; `itype-fit-cases` re-fits every case; subjects inferred twice; whole-to-finite re-inference; prelude re-parsed per `direct-prelude-evidence` call (A132); report re-infers every definition; compiler.md:67-69 reports 38-72 s CPU for 2,000 gates. Brief l.141 asks for seconds.
455−21. **Deviations from the spec the core should not copy unknowingly**: gates fit `*` (Q18 pending), tag fits `@tas`/`@ta` without aura check (Q16/Q17), faces handled by asymmetric guards instead of "unnamed acquires the face" (S1 pending), argless union identity by raw cases (A11), only list/unit in inhabitation/gate-free (A13), arms matching no case reported as unsupported (Q22), decimal defaulting skipped in locals and gate types (compiler.md:59 notes defaulting in gate types is incomplete).
456−22. **Dead code not to port**: `itype-has-fixed-atom` 5098, `width-has-projections` 8988, `infer-width-elaboration` 8995 and `iwidth-elaboration` 8994, `direct-find-gate` 9058, `resolve-supported-defs` 10780, `golden-types-with-modules` 14939, `one-request-interface-source` 12850, unreachable `!!` at 14258 and 14525, the last `[%& …]` of `dg-boolean-branch` (15351), the always-`~` `captured` argument of `dg-generalize`, misplaced headers (5014-5018, 6008-6010, 6320-6321, 6397-6403, 5835-5837), the stale comment at 11502-11505.
457−
458−### 4.4 Seams a staged plan can use (observations, not a plan)
459−
460−- `golden-types-in-context-core` re-infers each definition independently (15107-15114), so a new core can be swapped in per definition behind the same printer and finalization, leaving `resolve-groups` in place, before the full check changes.
461−- The full check's recovery chain only runs for components still missing after `resolve-groups-core` (`?^ (ienv-lookup …) ~` at the top of each arm). A core that resolves a component ordinarily turns its recovery arm into a no-op without deleting it; the `cast-init` regression already guards that ordering.
462−- `itype-fit`'s three-valued API can be preserved over a new store as long as `%unknown` stays the answer for "would need a queued constraint" in the old callers; R1-R10 are its heaviest users.
463−- The dg-* transaction is reachable from the full check only without a prelude (14809) and from the report only on eligible sources; its tests are self-contained (four suites), so it can be retired as a unit once the queue exists.
464−
465−## 5. Entry points that must stay stable during a staged migration
466−
467−### 5.1 Tools (signatures are checked)
468−
469−| Arm | Line | Caller |
470−| --- | --- | --- |
471−| `golden` | (%api chapter) | `tools/golden` (parser outputs), module trees |
472−| `golden-types` `[file=path src=@t] -> @t` | 11486 | `tools/golden:251-253` (signature enforced at `tools/golden:407-408`), `tools/ship:1234` |
473−| `golden-types-imports` | 11497 | `tools/golden:252`, `tools/ship:1257` |
474−| `golden-types-with-marks` | 15016 | `tools/golden:248`, `tools/ship:1288` |
475−| `golden-types-with-prelude-and-internal` | 14969 | `tools/golden:259`, `tools/ship:1345` |
476−| `golden-types-with-prepared-prelude` | 14975 | `tools/golden:260`, `tools/ship:1346` |
477−| `prepare-prelude-with-internal` | 12103 | `tools/golden:291` (under `mule`), `tools/ship:1222` |
478−
479−### 5.2 Module-check API (suites, and itself recursively)
480−
481−`infer-jibb-file` 14650 (23 suites; also builds the internal prelude, 11956), `infer-jibb-file-detailed` 14658 (12 suites; `resolve-jibb-imports-detailed` 12316/12320), `resolve-jibb-imports` 12286 (deferred-resolver, generic-recursion), `prepare-prelude` 12092 (api-evidence, poke-bridge), `prepare-prelude-with-internal` (33 suites), `golden-types-with-prelude` 14955 (bridge, list-alias-guards, module-scope), `golden-types-with-reader-diagnostics` 15007 (bridge, import-*), `golden-types-in-context` 15021 (empty, union-alias-overlap, union-source), `golden-types-in-context-core` 15025 (deferred-prepared), `gate-free-mold-source` 14887, the API evidence arms (`api-path-analysis(-source)`, `api-path-evidence-source`, `api-path-parameters`, `api-path-watchability`, `api-request-parts`, `api-support-analysis-source`, `api-poke-interface`), `find-jibb-cache`, `request-graph-bounded`, `request-graph-reusable`, `module-scope-valid`, `module-mold-params-valid`, `program-main-def`, `program-main-parts`, `page-main-parts`, `parse`, `show-error`, `show-itype` (11 suites), `canonical-itype` (buttons, deferred-resolver, doc-examples), `record-fields-named` (program-init/main/update/watch), `itype-in-import` (5 suites), `itype-vars` (page-main, program-watch, store, theme), `ienv-lookup` (17 suites), `find-jibb-mold` (13 suites), `find-jibb-interface`, `find-simple-mold`, `collect-simple-molds`, `find-imported-mold`, `find-imported-mark`, `import-to-itype`, `template-apply`, `identity-union-parameters`, `prelude-union-alias`, `compatible-raw-poke`, `request-compatible-ask`, `derived-poke-command-scheme`.
482−
483−### 5.3 Substrate arms called by suites (keep or migrate the suites in the same stage)
484−
485−`itype-fit` (8 suites: arithmetic-guards, closed-gate-guards, constructor-fit-guards, deferred, empty, generic-construction, generic-recursion, qath-fuel), `itype-unify` (arithmetic-guards, gate-free-guards, generic-recursion), `itype-unify-test` (typecheck), `itype-walk` (arithmetic-guards, deferred), `itype-lookup` (hole-guards), `itype-normalize` (deferred, generic-construction), `itype-empty-proof`/`itype-inhabited-proof`/`itype-live-cases`/`empty-list-null-branch` (empty), `itype-gate-free-form`/`itype-collection-keys`/`itype-var-is-gate-free`/`instantiate-scheme`/`template-apply-sub` (gate-free-guards), `gate-free-type` (empty, gate-free-guards, generic-recursion), `itype-has-face` (deferred, empty), `itype-face-asym`/`itype-output-may-be-cell`/`pending-tags`/`unsupported-atom-vars` (deferred), `itype-positional-face-asym` (positional-face-guards), `itype-positional-slot-face-asym` (direct-gate-guards), `itype-fit-ctor-cases` (constructor-fit-guards), `itype-has-gate`/`default-decimals` (generic-recursion), `default-hole-numbers`/`simple-mold-hole` (hole-guards), `infer-fragment` (cell-branch, deferred, generic-pattern, qath-source), `infer-call-context-arg` (generic-construction, qath-fuel), `infer-simple-shape` (union-source).
486−
487−### 5.4 Recovery and dg arms called by suites (retire with their suites)
488−
489−direct-gate-guards: `direct-checked-gates`, `direct-gate-call-fit`, `direct-gate-sample`, `direct-positional-fit`, `direct-prelude-evidence`. cell-branch: `closed-cell-branch-eligible`, `closed-cell-retry-safe`, `closed-cell-sub-safe`, `infer-closed-cell-branch`. nested-union-guards: `contextual-direct-union`, `contextual-simple-sub`, `contextual-tagged-case`. constructor-fit-guards: `explicit-singleton-in-union`. qath-fuel: `jrec-match-view`, `qath-static-fuel`. generic-*: `simple-source-generic-recursive`, `grec-direct-context`, `grec-match-view`, `grec-patterns-eligible`, `grec-single-wing-subject`, `grec-unfold-view`. union-source: `grec-collect-molds`, `union-source-distinct-tags`, `union-source-state-safe`. union-alias-overlap and full-overlap-basic: `union-source-overlap`. program-main/-watch/store: `program-main-closed`; page-main: `page-main-closed`. deferred*: `dg-close-env`, `dg-direct-source`, `dg-generalize`, `dg-obligations`, `dg-replay-edges`, `dg-root-detail`, `dg-root-prepared`, `dg-root-source`, `dg-scan`, `dg-source-candidate`, `dg-stable-call-fit`, `dg-stage`, `ienv-fresh-id`.
490−
491−### 5.5 Types constructed by suites
492−
493−`itype` (32 suites), `iprelude` (32), `ifile` (25), `ischeme` (24), `istate` (13: cell-branch, deferred-context, deferred, direct-gate-guards, empty, gate-free-guards, generic-construction, generic-pattern, generic-recursion, hole-guards, qath-fuel, qath-source, union-source), `ienv` (11), `isub` (10), `iresult` (6), `ifit` (6), `upair` (3), `irequest-graph`/`irequest-evidence` (3), `dgo`/`ipending`/`igate-free`/`iwprojection`/`iwidth-definition` (2), `istore-request-evidence`, `igate-prelude-evidence`, `igf-form`, `igf-segment`, `ibinding`, `dgscan`, `dgparse`, `dgcommit`, `grec-collected` (1 each). Q37 decided tests keep calling internal arms (A126) until the core lands; a facade or same-stage suite edits are required for every renamed arm or reshaped type.
494−
495−## 6. Spec rules the core must meet, and open rulings
496−
497−Repository spec wins over the design doc (review Q42); several type-system rows in `decisions.md` are still marked unsynced.
498−
499−### 6.1 Rules
500−
501−| Topic | Rule (short) | Where | Core requirement | Today |
502−| --- | --- | --- | --- | --- |
503−| Inference basis | HM with aura variables; principal types; no general subtyping except listed one-way widenings and explicit `proj` | grammar.md l.121; decisions.md l.35; implementation-plan.md l.15; milestone-2.md l.39, l.62, l.141 | Union-find + levels; widening as directional constraints outside unify | assoc list, env scans, fit mixes widening and unification |
504−| Atoms and auras | `@` any atom per occurrence; specific auras distinct; aura fits `@` and Hoon-family ancestor; reverse needs a check | grammar.md l.124; decisions.md l.59, l.35, Q15 l.134, Q19 l.142 | `fit(actual, expected)` constraint that waits while actual is unbound; unify never widens | `aura-prefix` 5052, fit 5663-5680, `itype-concrete-join` 5125 |
505−| Noun | `*` is the noun type, top of fit only; arbitrary noun does not fit narrower | grammar.md l.121, l.132; decisions.md l.49, Q9 l.122 | unify(`*`, T) fails unless T is `*` | 5549-5557 accepts gates (Q18) |
506−| Empty and crash | `!!` expression has any type; mold `!!` empty; empty-position cells empty, disjoint from all | grammar.md l.62, l.127, l.132; decisions.md l.48, Q17 l.138 | crash = fresh var; usefulness drops uninhabited constructors | `%empty`, 4744, 5521-5525 |
507−| Loobeans | `?` = {0,1}; disjoint from cells, overlaps 0 and 1; arithmetic rejects, comparison accepts | grammar.md l.124, l.127, l.59; decisions.md l.52, l.60, Q16, Q28 | finite constructor set; "atom other than ?" kind | `?` vs `@f` unresolved (5546-5548) |
508−| Constants | singletons compared by noun (`%$` = `%.y` = `~` = 0) | grammar.md l.29-31, l.125, l.144; decisions.md l.29, Q34 | key singletons by noun in unify, fit, ctor, patterns, disjointness | `%const` by value 4926, 5617 |
509−| Literals | decimal `@ud` or any aura by context; prefixed numbers, ships, dates, knots, cords; `` `x ``, `~[…]`, `a+b`, paths, qath read as Hoon | grammar.md l.19-39; decisions.md l.14, l.58 | literal → type or var + literal constraint; prelude unit/list/path/qath templates available | 8770-8821 |
510−| Faces | faces are part of types; unnamed position unifies with faced and takes its face; different faces don't unify; duplicate fields error (also imported); `[a]` is `a`; `[]` error; theme `dark=[tones=…]` must check | grammar.md l.126, l.33; decisions.md l.15, l.42, l.35, Q5, Q8, Q21, Q27 | label slot that may be unknown, bound by unification | `%face` wrapper + asymmetry guards 5212-5349 |
511−| `proj` | explicit, type-directed; expected type selects fields; evaluated once; never inserted implicitly; reserved name | grammar.md l.126; decisions.md l.43; core-language.md l.85; Q32 | deferred `proj(S) : T` with recorded axes | 5835-5923, 9461, 10535, 11706-11760 |
512−| Capitals | generalized per `++`; local `++` shares an enclosing capital it also uses; cannot force two capitals equal; cannot become more specific | grammar.md l.129; decisions.md l.50, Q4, Q23; milestone-2.md l.66 | rigid (skolem) vars scoped before inference; violations name both sites | `merged-capitals` 10072; forcing concrete is "unsupported" (10089) |
513−| Atom/arith constraints | atom constraint and "atom other than ?" retained through generalization and instantiation; printed as where-clauses separated by commas | grammar.md l.124, l.137; decisions.md l.31, l.60, Q28, Q29 | kind lattice on roots | six var kinds, A16 |
514−| Gate-free | `eq` args and map/set keys contain no gates; inferred and generalized; printed `where A contains no gates` | grammar.md l.137; decisions.md l.33, l.106; core-language.md l.39 | gate-free kind, structural propagation, binding a gate fails with sites | `%fvar`, 4998, 5951 |
515−| Holes | `_` wherever a mold may; resolves to a concrete type or written capital; unconstrained is an error; a definition determines its own holes | grammar.md l.123, l.130; decisions.md l.51, Q30, Q31 | hole var with span checked at its level exit | 6133-6181 |
516−| Order, recursion, value cycles | any order; gates self/mutually recursive; non-gate value depending on itself is an error; infer in dependency order, groups together | grammar.md l.56, l.101; decisions.md l.23; core-language.md l.145; milestone-2.md l.66, l.141 | one SCC pass; value cycles reported from the graph | fixpoint fallback 10749-10756; cycle proof needs a cast |
517−| Locals | `++` at the start of any body; mutually visible; generalize locally, captured outer vars shared | grammar.md l.56; decisions.md l.22; milestone-2.md l.97 | levels + same SCC machinery | 7611-7681 |
518−| No shadowing | samples, locals, pattern binders, imports, prelude | grammar.md l.101; decisions.md l.13; core-language.md l.37; milestone-2.md l.95 | scope pass with sites | several site-less messages (8018, 8240…) |
519−| Namespaces | molds and values separate, by position | grammar.md l.102; overview.md l.305 | two tables per scope/interface | `ifile` 5822 |
520−| Tag resolution | tag/`~` = fresh var + pending constraint; non-union = one-case union; checked by shape and shared tag positions, field positions against fields; `@tas`/`@ta`/`@`/`*` make it that constant; no match → `msg has no case %submitt` | grammar.md l.141-143; decisions.md l.29; milestone-2.md l.77 | the deferred queue, woken on binding | `%tag` 4676, 5451, 8693, 8711 |
521−| Non-generalization, module end | tag-constrained vars (and what they mention) do not generalize; an island's `main` fixes its messages; open at module end → error asking for `^-`, never guess | grammar.md l.145-146, l.150-158; milestone-2.md l.79 | keep such vars at module level; module-end pass reports `nothing fixes the union of %add` | dropped at 10680; recovery R1-R5; `module-pending-tag` |
522−| `\|=%tag` | case constructor typed by the expected gate; any case whose head noun equals the tag; no such case is an error | grammar.md l.48, l.141, l.144; decisions.md l.47, Q34; milestone-2.md l.78, l.124 | deferred ctor constraint on the product's root | 5474 |
523−| Numbers by context | wait for context; default `@ud` at the `++` only if unfixed and not generic over it | grammar.md l.162-167; decisions.md l.35; milestone-2.md l.81 | defaultable kind, defaulted at level exit unless linked to a quantified/rigid var | 6062, 6119; incomplete in gate types (compiler.md:59) |
524−| Cell literals | tuple, record or cons (under list); default tuple | grammar.md l.33, l.168, l.172 | deferred cell constraint | cons only under known list context (7834) |
525−| Null | `~` is the `~` case of any union that has one | grammar.md l.31, l.141 | same queue keyed on noun 0 | 5365, 5613-5616 |
526−| Waiting | wing access, changes and `?-` on unknown types wait; patterns don't; `m()` error | grammar.md l.147-148, l.45, l.47; decisions.md l.13, Q6 | deferred has-field / edit / match constraints | 7720, 8622 need a known spine |
527−| Samples, inline gates | every bare name in a sample binds; `\|=(p title.p)` works when the call fixes the type | grammar.md l.48, l.58; decisions.md l.21, l.47; milestone-2.md l.69 | relies on deferred wing access |: |
528−| Calls | right-nested sample; parentheses only group | grammar.md l.43; core-language.md l.29, l.88 | apply = unify/fit with `$-(sample result)` | several call paths |
529−| Named unions | every Jibb union is named; imports may be unnamed; identity = origin + args, display separate | grammar.md l.57, l.127; decisions.md l.29; overview.md l.77 | nominal identity | raw-case equality (A11) |
530−| Disjointness | cases must differ as nouns (for all generic args); `*`, vars and `(list A)` overlap; `!!` disjoint; imported `$% $? $^` too; unverifiable imports fail closed; error suggests leaving `[` open | grammar.md l.127, l.94; decisions.md l.29, l.41, Q16, Q17, Q22; overview.md l.66-68; milestone-2.md l.86, l.125; jibb.hoon 4620 | noun-shape signature shared with usefulness; overlap witness naming both sites | 10909-11302 |
531−| Generic molds | `\|$ [V E]` right after `+$` name; prelude `cmd`/`sub` use `\|$ [M]` | grammar.md l.64, l.131; milestone-2.md l.70 | templates instantiated at exact arity; unions keep origin/args | 6970, 6355; recursive generics only via grec |
532−| Recursive molds | allowed; identity by name and module; imported (e.g. `json`) matched by name | grammar.md l.57, l.135; decisions.md l.56; overview.md l.74 | one nominal recursive type unfolded on demand | three forms |
533−| Containers | list, unit, set, map, mop, qeu, jar, jug; imported maps/sets checked with `apt`; keys gate-free | grammar.md l.128; overview.md l.70-71, l.88, l.102 | inhabitation and gate-free over all containers | list/unit only (A13) |
534−| `?-` | exhaustive, ordered; missing case error naming it; covered arm error; nested patterns allowed; last position binds the rest | grammar.md l.59, l.184-219, l.276-277; decisions.md l.32, l.57; milestone-2.md l.89-92, l.142 | Maranget usefulness with witnesses; one matrix also for milestone-3 lowering | three loops + slices; nested mostly unsupported |
535−| Pattern typing | patterns checked against the subject; binders take position types | grammar.md l.148, l.184; core-language.md l.92-93 | binder types from specialized matrix columns | `union-pattern-bind` 8156 |
536−| Branch join | unify, else widen only to an explicitly present parent aura or `@`; with an expected type each arm fits it | questions.md Q11; A133; grammar.md l.121 | unify + deferred widen; check mode with expected | 5138, 5202 |
537−| Interpolation | atoms print by aura (`@` as `@ud`); text auras and tapes splice; other cells error; generic aura error here and in qath segments; `~&` printer from type | grammar.md l.49, l.170-171; decisions.md l.58; core-language.md l.79, l.95; milestone-2.md l.82 | deferred printable constraint decided at level exit; record the printer | 8081 rejects late-known types |
538−| Paths | constant, empty, typed by aura (`_` allowed); qath with printable segments; route check is milestone 4 | grammar.md l.130, l.36-37, l.173; overview.md l.337 | path mold kind; same printable constraint | jrec qath |
539−| Imports, module values | `/-`, `/%` (no face), `/=` under a face; records read with `.`; module as a value is a cell of definitions in name order; APIs re-export `/%` types; import cycles are errors | grammar.md l.86-94, l.104, l.47; core-language.md l.146; overview.md l.305; milestone-2.md l.98-99 | interface noun; faces as record access with per-use instantiation | `ifile`, 12293, cycle 12304 |
540−| Hoon import table | `$% $? $^` unions if disjoint; `$@`; `$~` dropped; containers by name; tags `%0 %& %\|`; recursive by name; errors where used for duplicates, cores, gates, vases, signed/float auras | overview.md l.60-77; grammar.md l.94; decisions.md l.41, Q21, Q22; milestone-2.md l.102-104, l.134-140, l.153 | imported molds become the same core types; unsupported molds poisoned at use | 6527-6728; whitelist triplicated (A14) |
541−| Module kinds | main's type decides: `(element !!)` page, `(page R D)`, `(program D X M)`, `(store S)`, none = library; built by builders; stages never inferred | grammar.md l.103, l.107-117; overview.md l.106-115; decisions.md l.55, l.66, Q11; milestone-2.md l.100, l.107 | post-solve match of main's closed type; main ordinary (Q5) | syntactic recognisers 13146-13240 |
542−| Islands | `main` record of exactly init/update/view/subs; `island` checks data against init's sample; update/subs/init types from the prelude | overview.md l.112, l.115-121, l.155, l.166; grammar.md l.293-343; decisions.md l.70-71 | follows from prelude types once tags defer across `++` | R1-R6 |
543−| Gate-free island data/model | no gates in data and models; name the field | overview.md l.121; decisions.md l.73; core-language.md l.39; milestone-2.md l.109, l.124 | post-solve gate-free check with witness path | `program-main-closed` 14555 + 5951 (256) |
544−| Effects | `cmd`/`sub` prelude unions with `\|$ [M]`; `raw-poke`, `ask`, `qath` transparent internal types re-exported | overview.md l.140-160; grammar.md l.133-134; decisions.md l.36-37, Q24, Q25 | generic unions with gate payloads; public names in printing | `prelude-label-nested` 11878 |
545−| Stores | `state`, local `+$ poke`, `++ main (store init update)`; builder `\|= [init=S update=$-([A S] S)] ^- (store S)`; kind check verifies A against poke; derived poke helper and state request; one store per page | overview.md l.168-169; grammar.md l.105, l.293-306, l.343; decisions.md l.77-78, Q11 | record A's instantiation at main's application, or check update against `$-([poke state] state)` | R8 |
546−| APIs | `/ui/api/<agent>.jibb` declares `+$ poke` and `+$ paths` (declarations); `(facts full diff …)` with fold `$-([[%mark diff] full] full)`; optional `scry=`; derived poke helper and one request per case; clashes are errors | overview.md l.283-307, l.157-158; grammar.md l.105, l.134; decisions.md l.38-40; milestone-2.md l.111-114 | declaration elaboration into interface schemes | 12329-13148 |
547−| Watchability | islands read agents only by watching; first fact full state; a `scry=` case cannot be watched; unproven watchability is a type error; store state is watchable | overview.md l.159; grammar.md l.105; decisions.md l.38, l.79, Q33 | type-level marker or provenance analysis over the elaborated tree | one syntactic watch shape (14367) |
548−| Pages with data | `load` maps route parameters to one `ask`/`pure`; `view` takes D, returns `(element !!)` | overview.md l.125-130, l.334; grammar.md l.103; decisions.md l.67; milestone-2.md l.161 | ordinary application of `page` | one load shape (14512) |
549−| Elements, attributes | elements are ordinary gates; duplicate attribute in a literal list is an error; `~[text "hi"]` gets a suggestion | overview.md l.174-204; grammar.md l.44; milestone-2.md l.121, l.124 | type-directed post-solve checks | absent |
550−| Theme | `++ theme ^- theme`, backtick units | overview.md l.211-222; decisions.md l.83, Q5 | plain record check | works (uses R17 for the qath font) |
551−| Prelude | Hoon stdlib regrouped in Jibb with a complete inventory; private internal module | overview.md l.81-102; decisions.md l.87-88; open-questions Q3; milestone-2.md l.116-121 | prelude checked by the same core and exported as an interface | partial interface (compiler.md:159) |
552−| No built-ins | type-directed rules only if listed in the Grammar; special cases for one gate are language changes | decisions.md l.34; milestone-2.md l.28 | `program`, `page`, `store`, `each`, `turn`, `element` as ordinary gates | R3, R7 are gate-specific |
553−| Printing | Jibb mold syntax; unnamed unions as space-separated cases; where-clauses; no private names | grammar.md l.137; overview.md l.77; decisions.md l.30-31; milestone-2.md l.143, l.148 | keep origin/name through solving; canonical names past 26 | 9930, 6345, 10171 |
554−| Errors | each error names both sites with excerpts; messages are golden tests; catalogue (aura mismatch, faces, missing case, open constraint, ctor, overlap, missing `?-` case, covered arm, self-dependent value, shadowing, interpolation, capitals, `~[text "hi"]`, clashing derived names, import cycle, `(facts …)` misuse, gate in island data, repeated attribute) | implementation-plan.md Risks; milestone-2.md l.48, l.123-127 | every constraint carries spans; union-find keeps a reason per binding | `idiag` 5997; 283 unsupported lines |
555−| Elaborated output | types/faces/casts leave nothing; lowering needs field axes, edits, decision tree, `proj` plans, printers, path validators | core-language.md l.74-98, l.33-41 | apply the final substitution to a typed tree | only width artifacts (5808) |
556−| Checker as function | caller passes Clay inputs; interface is its own noun; cache with interface and body hashed separately; modules one at a time in dependency order | milestone-2.md l.133; implementation-plan.md (pipeline, cache row); compiler.md:19 | interfaces store generalized schemes with constraints and mold templates | `ifile`, `prepare-prelude` |
557−| Speed | a 2,000-line module checks in seconds | milestone-2.md l.141, l.155; implementation-plan.md Risks | near-constant find, level generalization, one SCC pass | 38-72 s CPU for 2,000 gates (compiler.md:67-69) |
558−| Golden types | third golden output: each definition's type and the module kind, or the rendered error | milestone-2.md l.148; questions.md Q6 | one pipeline returning scheme-or-error per definition | all 304 from the report path (A122) |
559−
560−### 6.2 Open rulings that affect the core
561−
562−| Ruling | State | Effect on the core |
563−| --- | --- | --- |
564−| open-questions.md Q3 (prelude inventory and signatures) | open | Fixes the environment the core checks against; the prepared prelude is partial today |
565−| open-questions.md Q32 (`proj` reordering) | partly settled | How `proj` constraints discharge (jibb.hoon 4625 treats reordering as a doc question) |
566−| Review Q16 (A20): follow Hoon, `%1.000` is `@ud`, `%&` is `?` | proposed, awaiting @iko | How tag constraints discharge against atoms (today 5617-5626, 5636-5648) |
567−| Review Q17 (A20): a name term fits `@t` | proposed | Same discharge rule |
568−| Review Q18 (A23): `*` may hold gates | proposed "yes" | Fit to `*`, gate-free proofs, element's child erasure to `*` (prelude.jibb l.447-466), core-language.md l.33 |
569−| Review Q19 (A6, A100): reject `[]` and `m()` in the parser | proposed | Otherwise the core must reject them |
570−| Review Q20 (A30): `[a=@ud [a=@t b=?]]` is one record, duplicate `a` is an error | proposed | Record and field-access semantics (today nested tails get their own scope, 11556) |
571−| Review Q21 (A25): `/% %foo` beside `++ foo` | proposed | Scope check (11760) |
572−| Review Q22 (A15): an arm matching no remaining case is definite (`arm matches no case`) | proposed | Usefulness reports a useless row; today `union pattern is not supported` (8236, 8273, 8324) |
573−| Review Q23 (A55): `(mop K V)` without comparator | proposed | No comparator in the type |
574−| Review Q24 (A64): Hoon's `each` mold beside the `each` gate | proposed | Relies on separate namespaces |
575−| Review Q26 (A50): importer learns `$%` with `%& %\| %0` tags, then `each` and `json` | proposed | Which imported unions reach the core |
576−| Review Q28 (A136): printer flattens `[a [b c]]`, prints named molds by name | proposed | Core must keep mold names through solving |
577−| Review Q6 (A122): render the report from the full checker | decided, not done | ~283 `types.txt` change once |
578−| Review Q37 (A126): tests keep calling ~137 internal arms | decided; revisit after the core | Keep arms or move suites behind a facade per stage |
579−| Syntax review S1: capitals bind only the type under a face; gate sample names ignored when gate types unify | question for @iko | Decides the face rules; reopens decisions.md l.33 and settled Q8; directly decides whether R11-R13 become unnecessary |
580−| Syntax review S3: samples/binders/locals may reuse prelude value names | question for @iko | Shadowing pass; todo-list's `[%typed text]` fails today |
581−| Syntax review S4: bare decimal fits only `@ud @u @ *` | question for @iko | Number-literal constraint (grammar.md l.21 says any aura) |
582−| Syntax review S5: a pattern name spelling a case tag at a union position is an error | question for @iko | Usefulness-time check |
583−| Syntax review S7: multi-letter type variables | question for @iko | Printer and capital scoping |
584−| Syntax review S12: nested cell patterns shown in the spec | question for @iko | The EBNF allows them; the prelude uses nested `?-` because the checker lacks them, so the core must handle nesting |
585−| Derived request argument order | unresolved in code (`api-request-parts` 12683) | Overview's `(post.api slug same)` suggests segments first |
586−| Application paths vs routes | milestone 4 | Core types `%/…` as qath with printable segments only |
587−| Spec sync | repository copy wins (Q42) | Unsynced decisions.md rows (Unions, Printed type constraints, Partial type annotations, Record fields, Record projection, Store builder, Agent APIs, Effects) may still differ from the design doc |
docs/reviews/2026-11-03-milestone-2-probes/README.mddeleted−23
@@ -1,23 +0,0 @@
1−# Probes for the milestone 2 review
2−
3−The Jibb sources the [milestone 2 review](../2026-11-03-milestone-2-review.md) ran through the full module checker, `infer-jibb-file-detailed`, at `f84a29e`, with what the checker printed then. They are evidence for the review and a ready regression corpus for [finishing milestone 2](../../prompts/milestone-2-finish.md). No check runs them: they are not tests, and several outputs record what is wrong today.
4−
5−Each `.jibb` file holds sections, each starting with a line `#### <label>`; each section is checked as a module on its own. A `.out` file is the output of its `.jibb`: per section, `CHECKED` and the exported molds and values with their types, or `REJECTED:` and the message.
6−
7−| Files | What they hold | Run with |
8−| --- | --- | --- |
9−| `variants/p1.jibb` to `p10.jibb` | The `my-app` modules and the doc blocks as written (`p1`), then about 90 spec-valid one-edit variants of them (`p2` to `p8`: reordered, renamed, extra helpers, a second watch, `\|=(m ~)` subscriptions, aliases, typed and `pure` loads) and wrong variants that must fail with their own error (`p9`, `p10`, labels starting `BAD-`). A label is the module's path, then a name | `run app` |
10−| `errors/p1.jibb` to `p5.jibb` | One or more probes for each error the spec describes, labelled as in the review's error table (`E01` an aura mismatch, `S2` the Grammar's `[%move * *]`, `C1` `%submitt` in an island, `W1` to `W4` island initializers) | `run plain` |
11−| `errors/import-check.hoon` | Invalid Hoon imports (`I1` to `I9`), module-graph errors (`M1` to `M5`) and the raw reader results | `run imports` |
12−
13−`variants/p1.jibb` has no saved output; every section in it checks, except `buttons`, which fails with "nothing fixes the union of %add".
14−
15−From the repo root, with `urbit` on `PATH` (`nix develop`):
16−
17−```
18−docs/reviews/2026-11-03-milestone-2-probes/run app docs/reviews/2026-11-03-milestone-2-probes/variants/p9.jibb
19−docs/reviews/2026-11-03-milestone-2-probes/run plain docs/reviews/2026-11-03-milestone-2-probes/errors/p1.jibb
20−docs/reviews/2026-11-03-milestone-2-probes/run imports
21−```
22−
23−`run plain` checks each section as `/ui/probe/jibb` against the real prelude (`check.hoon`). `run app` checks each section at the path its label names, with `my-app`'s todo and blog `/sur` files and marks compiled by `ride` (marks without their `/-` lines, as the `tests/lib` suites do) and a bundle of `api/todo`, `todo-list`, `api/blog`, `card` and `cart`, the section's own path left out (`app-check.hoon`). A label of the form `<path> module <name>` adds that section to the bundle instead. Each run takes 30 to 80 s, most of it building the libraries.
docs/reviews/2026-11-03-milestone-2-probes/app-check.hoondeleted−67
@@ -1,67 +0,0 @@
1−=/ prepared=iprelude (need (prepare-prelude-with-internal prelude internal))
2−=/ todo=type -:(ride -:!>(..zuse) sur)
3−=/ subject=type [%cell [%face %todo todo] -:!>(..zuse)]
4−=/ ma=* (read-mark:imp %todo-action -:(ride subject action))
5−=/ mt=* (read-mark:imp %todos -:(ride subject todos))
6−=/ mu=* (read-mark:imp %todo-update -:(ride subject update))
7−=/ mi=* (read-mark:imp %todo-item -:(ride subject item))
8−=/ blog=type -:(ride -:!>(..zuse) blogsur)
9−=/ blog-subject=type [%cell [%face %blog blog] -:!>(..zuse)]
10−=/ mp=* (read-mark:imp %posts -:(ride blog-subject posts))
11−=/ item-input=* (read-named:imp %todo %item todo)
12−=/ post-input=* (read-named:imp %blog %post blog)
13−=/ marks=imark-externals ~[[%todo-action ma] [%todos mt] [%todo-update mu] [%todo-item mi] [%posts mp]]
14−=/ externals=iexternals ~[[%todo %item item-input] [%blog %post post-input]]
15−=/ all-modules=jbundle
16− :~ [/ui/api/todo/jibb todoapi]
17− [/ui/todo-list/jibb todolist]
18− [/ui/api/blog/jibb blogapi]
19− [/ui/components/card/jibb card]
20− [/ui/stores/cart/jibb cart]
21− ==
22−=/ lines=wain (to-wain:format src)
23−=| out=(list [label=@t body=wain])
24−=| cur=(unit [label=@t body=wain])
25−=/ sections=(list [label=@t body=wain])
26− |-
27− ?~ lines
28− (flop ?~(cur out [[label.u.cur (flop body.u.cur)] out]))
29− ?: =('#### ' (end [3 5] i.lines))
30− =? out ?=(^ cur) [[label.u.cur (flop body.u.cur)] out]
31− $(lines t.lines, cur `[(rsh [3 5] i.lines) ~])
32− ?~ cur $(lines t.lines)
33− $(lines t.lines, body.u.cur [i.lines body.u.cur])
34−=/ extra=jbundle
35− %+ murn sections
36− |= [label=@t body=wain]
37− ^- (unit jsource)
38− =/ words=(list tape) (rash label (more ace (star ;~(less ace next))))
39− ?. (gte (lent words) 3) ~
40− ?. =('module' (crip (snag 1 words))) ~
41− `[(stab (crip (snag 0 words))) (of-wain:format body)]
42−=/ base=jbundle
43− %+ weld extra
44− (skip all-modules |=(j=jsource (lien extra |=(e=jsource =(at.e at.j)))))
45−^- tape
46−%- zing
47−%+ turn sections
48−|= [label=@t body=wain]
49−^- tape
50−=/ words=(list tape) (rash label (more ace (star ;~(less ace next))))
51−=/ at=path (stab (crip (snag 0 words)))
52−=/ text=@t (of-wain:format body)
53−=/ modules=jbundle (skip base |=(j=jsource =(at.j at)))
54−=/ r=jfile-detailed-result
55− (infer-jibb-file-detailed at text externals marks modules ~[at] values.prepared molds.prepared ~ `iface.prepared)
56−=/ head=tape "#### {(trip label)}\0a"
57−?: ?=(%| -.r) `tape`(zing `(list tape)`~[head "REJECTED: " (trip message.p.r) "\0a"])
58−=/ ms=(list tape)
59− %+ turn molds.iface.p.r
60− |= [name=term s=ischeme]
61− "+$ {(trip name)}: {(show-itype (canonical-itype typ.s vars.s) ~)}\0a"
62−=/ vals=(list tape)
63− %+ turn values.iface.p.r
64− |= [name=term s=ischeme]
65− =/ c=itype (canonical-itype typ.s vars.s)
66− "++ {(trip name)}: {(show-itype c ~)}{(show-atom-constraint c)}\0a"
67−`tape`(zing `(list tape)`~[head "CHECKED\0a" `tape`(zing ms) `tape`(zing vals)])
docs/reviews/2026-11-03-milestone-2-probes/check.hoondeleted−37
@@ -1,37 +0,0 @@
1−:: Full-module check of several sources in one eval. Bind `src` to a
2−:: file whose sections each start with a line "#### <label>"; each
3−:: section is checked on its own as /ui/probe/jibb against the real
4−:: prelude. Bind: prelude, internal, src.
5−=/ prepared=iprelude (need (prepare-prelude-with-internal prelude internal))
6−=/ at=path /ui/probe/jibb
7−=/ lines=wain (to-wain:format src)
8−=| out=(list [label=@t body=wain])
9−=| cur=(unit [label=@t body=wain])
10−=/ sections=(list [label=@t body=wain])
11− |-
12− ?~ lines
13− (flop ?~(cur out [[label.u.cur (flop body.u.cur)] out]))
14− ?: =('#### ' (end [3 5] i.lines))
15− =? out ?=(^ cur) [[label.u.cur (flop body.u.cur)] out]
16− $(lines t.lines, cur `[(rsh [3 5] i.lines) ~])
17− ?~ cur $(lines t.lines)
18− $(lines t.lines, body.u.cur [i.lines body.u.cur])
19−^- tape
20−%- zing
21−%+ turn sections
22−|= [label=@t body=wain]
23−^- tape
24−=/ text=@t (of-wain:format body)
25−=/ r=jfile-detailed-result
26− (infer-jibb-file-detailed at text ~ ~ ~ ~[at] values.prepared molds.prepared ~ `iface.prepared)
27−=/ head=tape "#### {(trip label)}\0a"
28−?: ?=(%| -.r) `tape`(zing `(list tape)`~[head "REJECTED: " (trip message.p.r) "\0a"])
29−=/ ms=(list tape)
30− %+ turn molds.iface.p.r
31− |= [name=term s=ischeme]
32− "+$ {(trip name)}: {(show-itype (canonical-itype typ.s vars.s) ~)}\0a"
33−=/ vals=(list tape)
34− %+ turn values.iface.p.r
35− |= [name=term s=ischeme]
36− "++ {(trip name)}: {(show-itype (canonical-itype typ.s vars.s) ~)}\0a"
37−`tape`(zing `(list tape)`~[head "CHECKED\0a" `tape`(zing ms) `tape`(zing vals)])
docs/reviews/2026-11-03-milestone-2-probes/errors/import-check.hoondeleted−101
@@ -1,101 +0,0 @@
1−=> [lib=jibb-lib reader=reader prelude=prelude internal=internal ..zuse]
2−=/ prepared=iprelude:lib (need (prepare-prelude-with-internal:lib prelude internal))
3−=/ sur=@t
4− '''
5− |%
6− +$ signed @sd
7− +$ flt @rd
8− +$ gat $-(@t @t)
9− +$ vas vase
10− +$ dup [a=@ud a=@t]
11− +$ ovl $%([%a @t] [%a @ud])
12− +$ ovl2 $?(@t @ud)
13− +$ cel $^([@t @t] [@ud @ud])
14− +$ good @t
15− +$ cor _^|(|=(a=@ a))
16− --
17− '''
18−=/ cor=type -:(ride -:!>(..zuse) sur)
19−=/ conv
20− |= d=import-diagnostic:reader
21− ^- *
22− ?- -.d
23− %ok [%& value.d]
24− %invalid d
25− %unsupported [%| message.d]
26− ==
27−=/ names=(list term) ~[%signed %flt %gat %vas %dup %ovl %ovl2 %cel %good %cor]
28−=/ ext=(list [module=term name=term result=*])
29− %+ turn names
30− |= n=term
31− =/ r (mule |.((read-named-diagnostic:reader %fix n cor)))
32− ?: ?=(%| -.r) [%fix n [%| 'reader crashed']]
33− [%fix n (conv p.r)]
34−=/ raw=(list [term *])
35− %+ turn names
36− |= n=term
37− =/ r (mule |.((read-named-diagnostic:reader %fix n cor)))
38− ?: ?=(%| -.r) [n %crash]
39− [n p.r]
40−=/ mark-src=@t
41− '''
42− |_ a=@t
43− ++ grab |% ++ noun @t --
44− ++ grow |% ++ noun a --
45− ++ grad %noun
46− --
47− '''
48−=/ mcor=type -:(ride -:!>(..zuse) mark-src)
49−=/ full-mark=* (read-mark:reader %full mcor)
50−=/ marks=(list [mark=term result=*]) ~[[%full full-mark]]
51−=/ probes=(list [label=@t at=path src=@t mods=jbundle:lib])
52− :~ ['I1-signed' /ui/probe/jibb '/- fix\0a++ a |= x=signed.fix x\0a' ~]
53− ['I2-float' /ui/probe/jibb '/- fix\0a++ a |= x=flt.fix x\0a' ~]
54− ['I3-gate' /ui/probe/jibb '/- fix\0a++ a |= x=gat.fix x\0a' ~]
55− ['I3b-core' /ui/probe/jibb '/- fix\0a++ a |= x=cor.fix x\0a' ~]
56− ['I4-vase' /ui/probe/jibb '/- fix\0a++ a |= x=vas.fix x\0a' ~]
57− ['I5-dupfields' /ui/probe/jibb '/- fix\0a++ a |= x=dup.fix x\0a' ~]
58− ['I6-overlap-cen' /ui/probe/jibb '/- fix\0a++ a |= x=ovl.fix x\0a' ~]
59− ['I7-overlap-wut' /ui/probe/jibb '/- fix\0a++ a |= x=ovl2.fix x\0a' ~]
60− ['I8-overlap-ket' /ui/probe/jibb '/- fix\0a++ a |= x=cel.fix x\0a' ~]
61− ['I9-good-unused-bad' /ui/probe/jibb '/- fix\0a++ a |= x=good.fix x\0a' ~]
62− ['M1-cycle' /ui/probe/jibb '/= a /ui/a\0a++ v (identity.a "hi")\0a' ~[[/ui/a/jibb '/= b /ui/b\0a++ identity |=(x (identity.b x))\0a'] [/ui/b/jibb '/= a /ui/a\0a++ identity |=(x (identity.a x))\0a']]]
63− ['M1b-root-cycle' /ui/probe/jibb '/= a /ui/a\0a++ v 1\0a' ~[[/ui/a/jibb '/= p /ui/probe\0a++ w 2\0a']]]
64− ['M2-derived-clash' /ui/probe/jibb '/= api /ui/api/demo\0a++ x 1\0a' ~[[/ui/api/demo/jibb '/% %full\0a+$ paths\0a [%plain /plain full]\0a [%other /other full]\0a++ plain 5\0a']]]
65− ['M2b-derived-clash-root' /ui/api/demo/jibb '/% %full\0a+$ paths\0a [%plain /plain full]\0a [%other /other full]\0a++ plain 5\0a' ~]
66− ['M2c-derived-face-clash' /ui/api/demo/jibb '/% %full\0a/- plain\0a+$ paths\0a [%plain /plain full]\0a' ~]
67− ['M2d-poke-clash' /ui/api/demo/jibb '/% %full\0a+$ poke full\0a++ poke "bad"\0a' ~]
68− ['M3-facts-in-library' /ui/probe/jibb '/% %full\0a+$ x (facts full full)\0a' ~]
69− ['M3b-facts-in-api-other-mold' /ui/api/demo/jibb '/% %full\0a+$ paths\0a [%plain /plain full]\0a+$ x (facts full full)\0a' ~]
70− ['M4-shadow-import-face' /ui/probe/jibb '/= lib /ui/lib\0a++ f |= lib=@t lib\0a' ~[[/ui/lib/jibb '++ identity |=(x x)\0a']]]
71− ['M4b-shadow-import-value' /ui/probe/jibb '/= lib /ui/lib\0a++ lib 1\0a' ~[[/ui/lib/jibb '++ identity |=(x x)\0a']]]
72− ['M5-api-ok' /ui/api/demo/jibb '/% %full\0a+$ paths\0a [%plain /plain full]\0a' ~]
73− ==
74−=/ out=(list tape)
75− %+ turn probes
76− |= [label=@t at=path src=@t mods=jbundle:lib]
77− ^- tape
78− =/ r (mule |.((infer-jibb-file-detailed:lib at src ext marks mods ~[at] values.prepared molds.prepared ~ `iface.prepared)))
79− =/ head=tape "#### {(trip label)}\0a"
80− ?: ?=(%| -.r) `tape`(weld head "CRASH\0a")
81− =/ res p.r
82− ?: ?=(%| -.res) `tape`(zing `(list tape)`~[head "REJECTED: " (trip message.p.res) "\0a"])
83− =/ vals=(list tape)
84− %+ turn values.iface.p.res
85− |= [name=term s=ischeme:lib]
86− ^- tape
87− "++ {(trip name)}: {(show-itype:lib (canonical-itype:lib typ.s vars.s) ~)}\0a"
88− `tape`(zing `(list tape)`~[head "CHECKED\0a" `tape`(zing vals)])
89−=/ rawt=tape
90− %- zing
91− %+ turn raw
92− |= [n=term v=*]
93− ^- tape
94− =/ desc=tape
95− ?@ v "atom"
96− ?: ?=([%invalid @ @] v) "invalid {(trip ;;(@t +<.v))}: {(trip ;;(@t +>.v))}"
97− ?: ?=([%unsupported @] v) "unsupported: {(trip ;;(@t +.v))}"
98− ?: ?=([%ok *] v) "ok"
99− "other"
100− "{(trip n)}: {desc}\0a"
101−^- tape (zing `(list tape)`~[`tape`(zing out) "#### RAW\0a" rawt])
docs/reviews/2026-11-03-milestone-2-probes/errors/import-check.outdeleted−82
@@ -1,82 +0,0 @@
1−#### I1-signed
2−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ a
3−#### I2-float
4−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ a
5−#### I3-gate
6−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ a
7−#### I3b-core
8−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ a
9−#### I4-vase
10−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ a
11−#### I5-dupfields
12−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ a
13−#### I6-overlap-cen
14−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ a
15−#### I7-overlap-wut
16−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ a
17−#### I8-overlap-ket
18−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ a
19−#### I9-good-unused-bad
20−CHECKED
21−++ a: $-(@t @t)
22−#### M1-cycle
23−REJECTED: import cycle at /ui/a/jibb
24−#### M1b-root-cycle
25−REJECTED: import cycle at /ui/probe/jibb
26−#### M2-derived-clash
27−REJECTED: API derived name `plain` clashes with a definition
28−/ui/api/demo.jibb:3:3: `plain` is derived from this path case
29− [%plain /plain full]
30− ^
31−/ui/api/demo.jibb:5:1: clashing definition
32−++ plain 5
33−^
34−#### M2b-derived-clash-root
35−REJECTED: API derived name `plain` clashes with a definition
36−/ui/api/demo.jibb:3:3: `plain` is derived from this path case
37− [%plain /plain full]
38− ^
39−/ui/api/demo.jibb:5:1: clashing definition
40−++ plain 5
41−^
42−#### M2c-derived-face-clash
43−REJECTED: API derived name `plain` clashes with an import face
44−/ui/api/demo.jibb:4:3: `plain` is derived from this path case
45− [%plain /plain full]
46− ^
47−/ui/api/demo.jibb:2:1: clashing import face
48−/- plain
49−^
50−#### M2d-poke-clash
51−REJECTED: API derived name `poke` clashes with a definition
52−/ui/api/demo.jibb:2:1: `poke` is derived from this mold
53−+$ poke full
54−^
55−/ui/api/demo.jibb:3:1: clashing definition
56−++ poke "bad"
57−^
58−#### M3-facts-in-library
59−REJECTED: module mold needs unsupported inference: /ui/probe/jibb
60−#### M3b-facts-in-api-other-mold
61−REJECTED: API module needs unsupported inference: /ui/api/demo/jibb: module mold needs unsupported inference
62−#### M4-shadow-import-face
63−REJECTED: /ui/probe.jibb:2:9: sample `lib` shadows a name already in scope
64−++ f |= lib=@t lib
65− ^
66−#### M4b-shadow-import-value
67−REJECTED: module has conflicting names: /ui/probe/jibb
68−#### M5-api-ok
69−CHECKED
70−++ plain: $-($-(@t A) (ask A))
71−#### RAW
72−signed: invalid aura: signed and float auras cannot be imported
73−flt: invalid aura: signed and float auras cannot be imported
74−gat: invalid core: cores and gates cannot be imported
75−vas: unsupported: vases cannot be imported
76−dup: ok
77−ovl: unsupported: Hoon union disjointness could not be verified
78−ovl2: unsupported: Hoon union disjointness could not be verified
79−cel: unsupported: Hoon $^ union disjointness could not be verified
80−good: ok
81−cor: invalid core: cores and gates cannot be imported
82−
docs/reviews/2026-11-03-milestone-2-probes/errors/p1.jibbdeleted−155
@@ -1,155 +0,0 @@
1−#### ok-control
2−++ inc |= n=@ud (add n 1)
3−#### E01-aura-call
4−++ inc |= n=@ud (add n 1)
5−++ x (inc "hi")
6−#### E01b-aura-cast
7−++ x ^- @ud "hi"
8−#### E01c-aura-sample-only
9−++ f |= x=@t ^- @ud x
10−#### E01d-at-to-ud
11−++ f |= x=@ ^- @ud x
12−#### E02-faces-call
13−++ f |= p=[a=@ud b=@ud] a.p
14−++ g |= q=[x=@ud y=@ud] (f q)
15−#### E02b-faces-cast
16−+$ ab [a=@ud b=@ud]
17−+$ xy [x=@ud y=@ud]
18−++ v ^- ab [1 2]
19−++ w ^- xy v
20−#### E03-submitt-cast
21−+$ msg
22− [%typed text=@t]
23− %submit
24−++ bad ^- msg %submitt
25−#### E03b-submitt-call
26−+$ msg
27− [%typed text=@t]
28− %submit
29−++ take |= m=msg "ok"
30−++ call (take %submitt)
31−#### E04-unresolved-tag
32−++ absent %submitt
33−#### E04b-add-button
34−++ add-button |= label=@t
35− button label %add
36−#### E05-open-null
37−++ loose ~
38−#### E06-ctor-no-case
39−+$ msg
40− [%typed text=@t]
41− %submit
42−++ f ^- $-(@t msg) |=%other
43−#### E07-overlap
44−+$ overlap
45− @t
46− @ud
47−++ identity |=(x x)
48−#### E07b-overlap-records
49−+$ pt
50− [a=@ud b=@ud]
51− [x=@ud y=@ud]
52−#### E08-missing-case
53−+$ choice
54− [%a value=@t]
55− %b
56− %c
57−++ missing |= v=choice
58− ?- v
59− [%a payload] payload
60− %b "b"
61−#### E08b-missing-loobean
62−++ f |= b=?
63− ?- b
64− %.y "yes"
65−#### E09-covered-arm
66−+$ choice
67− [%a value=@t]
68− %b
69− %c
70−++ duplicate |= v=choice
71− ?- v
72− [%a payload] payload
73− %b "b"
74− %b "again"
75− %c "c"
76−#### E09b-covered-after-wild
77−+$ choice
78− %b
79− %c
80−++ covered |= v=choice
81− ?- v
82− * "all"
83− %c "never"
84−#### E10-self-ref-doc
85−++ title (trim title)
86−#### E10b-self-ref-cast
87−++ title ^- @t title
88−#### E10c-through-gate
89−++ maker |= x=@t value
90−++ value ^- @t (maker "hi")
91−#### E11-shadow-prelude-sample
92−++ f |= add=@ud add
93−#### E11b-shadow-global-sample
94−++ x 1
95−++ f |= x=@ud x
96−#### E11c-shadow-local
97−++ y 1
98−++ f |= z=@ud
99− ++ y 2
100− z
101−#### E11d-shadow-pattern
102−+$ choice
103− [%a value=@t]
104− %b
105−++ complete "c"
106−++ shadow |= v=choice
107− ?- v
108− [%a complete] complete
109− %b "b"
110−#### E11e-shadow-prelude-top
111−++ add 1
112−#### E11f-shadow-prelude-mold
113−+$ list @ud
114−#### E12-cell-printer
115−++ record |= x=[@t @ud] "{x}"
116−#### E13-generic-aura-interp
117−++ show |= n=A "{(add n 1)}"
118−#### E13b-generic-aura-path
119−++ link-to |= n=A %/blog/(add n 1)
120−#### E14-capital-ud
121−++ concrete |= x=A ^- @t x
122−#### E14b-capital-ud-arith
123−++ c |= x=A ^- @ud (add x 1)
124−#### E14c-capital-list
125−++ l |= x=A (lent x)
126−#### E15-text-hi
127−++ v ^- (list (element !!)) ~[text "hi"]
128−#### E16-empty-change
129−++ f |= m=[a=@ud b=@ud] m()
130−#### E17-dup-fields-mold
131−+$ r [a=@ud a=@t]
132−++ v ^- r [1 "x"]
133−#### E17b-dup-fields-expr
134−++ v [a=1 a=2]
135−#### E18-proj-defined
136−++ proj 1
137−#### E19-loobean-arith
138−++ v (add %.y %.n)
139−#### E20-capitals-forced
140−++ repeat |= p=[A A] p
141−++ bad |= p=[A B] (repeat p)
142−#### E21-hole-unconstrained
143−++ id |= x=_ x
144−#### E21b-hole-mold
145−+$ box [item=_]
146−#### E22-eq-gate
147−++ f |= g=$-(@ud @ud) (eq g g)
148−#### E22b-map-key-gate
149−++ m |= [g=$-(@ud @ud) mp=(map $-(@ud @ud) @ud)] (put.by mp g 1)
150−#### E23-facts-outside
151−+$ x (facts @t @t)
152−#### E24-repeat-attr
153−++ v (el ~[pad+%s1 pad+%s2] (text "x"))
154−#### E25-empty-cell
155−++ v []
docs/reviews/2026-11-03-milestone-2-probes/errors/p1.outdeleted−133
@@ -1,133 +0,0 @@
1−#### ok-control
2−CHECKED
3−++ inc: $-(@ud @ud)
4−#### E01-aura-call
5−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ x
6−#### E01b-aura-cast
7−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ x
8−#### E01c-aura-sample-only
9−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ f
10−#### E01d-at-to-ud
11−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ f
12−#### E02-faces-call
13−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ g
14−#### E02b-faces-cast
15−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ w
16−#### E03-submitt-cast
17−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ bad
18−#### E03b-submitt-call
19−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ call
20−#### E04-unresolved-tag
21−REJECTED: /ui/probe.jibb:1:11: nothing fixes the union of %submitt
22−++ absent %submitt
23− ^
24−#### E04b-add-button
25−REJECTED: /ui/probe.jibb:2:16: nothing fixes the union of %add
26− button label %add
27− ^
28−#### E05-open-null
29−REJECTED: /ui/probe.jibb:1:10: nothing fixes the union of ~
30−++ loose ~
31− ^
32−#### E06-ctor-no-case
33−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ f
34−#### E07-overlap
35−REJECTED: module mold overlap has overlapping cases
36−/ui/probe.jibb:2:3: first union case
37− @t
38− ^
39−/ui/probe.jibb:3:3: overlapping case
40− @ud
41− ^
42−#### E07b-overlap-records
43−REJECTED: module mold pt has overlapping cases
44−/ui/probe.jibb:2:3: first union case
45− [a=@ud b=@ud]
46− ^
47−/ui/probe.jibb:3:3: overlapping case
48− [x=@ud y=@ud]
49− ^
50−#### E08-missing-case
51−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ missing
52−#### E08b-missing-loobean
53−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ f
54−#### E09-covered-arm
55−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ duplicate
56−#### E09b-covered-after-wild
57−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ covered
58−#### E10-self-ref-doc
59−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ title
60−#### E10b-self-ref-cast
61−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ title
62−#### E10c-through-gate
63−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ maker
64−#### E11-shadow-prelude-sample
65−REJECTED: /ui/probe.jibb:1:9: sample `add` shadows a name already in scope
66−++ f |= add=@ud add
67− ^
68−#### E11b-shadow-global-sample
69−REJECTED: /ui/probe.jibb:2:9: sample `x` shadows a name already in scope
70−++ f |= x=@ud x
71− ^
72−#### E11c-shadow-local
73−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ f
74−#### E11d-shadow-pattern
75−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ shadow
76−#### E11e-shadow-prelude-top
77−REJECTED: module has conflicting names: /ui/probe/jibb
78−#### E11f-shadow-prelude-mold
79−REJECTED: module has conflicting names: /ui/probe/jibb
80−#### E12-cell-printer
81−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ record
82−#### E13-generic-aura-interp
83−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ show
84−#### E13b-generic-aura-path
85−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ link-to
86−#### E14-capital-ud
87−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ concrete
88−#### E14b-capital-ud-arith
89−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ c
90−#### E14c-capital-list
91−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ l
92−#### E15-text-hi
93−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ v
94−#### E16-empty-change
95−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ f
96−#### E17-dup-fields-mold
97−REJECTED: record field `a` is repeated
98−/ui/probe.jibb:1:7: first field
99−+$ r [a=@ud a=@t]
100− ^
101−/ui/probe.jibb:1:13: repeated field
102−+$ r [a=@ud a=@t]
103− ^
104−#### E17b-dup-fields-expr
105−REJECTED: record field `a` is repeated
106−/ui/probe.jibb:1:7: first field
107−++ v [a=1 a=2]
108− ^
109−/ui/probe.jibb:1:11: repeated field
110−++ v [a=1 a=2]
111− ^
112−#### E18-proj-defined
113−REJECTED: module has conflicting names: /ui/probe/jibb
114−#### E19-loobean-arith
115−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ v
116−#### E20-capitals-forced
117−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ bad
118−#### E21-hole-unconstrained
119−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ id
120−#### E21b-hole-mold
121−REJECTED: module mold needs unsupported inference: /ui/probe/jibb
122−#### E22-eq-gate
123−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ f
124−#### E22b-map-key-gate
125−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ m
126−#### E23-facts-outside
127−REJECTED: module mold needs unsupported inference: /ui/probe/jibb
128−#### E24-repeat-attr
129−CHECKED
130−++ v: (element A)
131−#### E25-empty-cell
132−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ v
133−
docs/reviews/2026-11-03-milestone-2-probes/errors/p2.jibbdeleted−106
@@ -1,106 +0,0 @@
1−#### G1-gate-model
2−+$ message
3− %start
4− %stop
5−+$ model [count=@ud callback=$-(@t @t)]
6−++ main (program init update view subs)
7−++ init |= input=@t ^- model [count=0 callback=echo]
8−++ update |= [msg=message state=model]
9− ^- [model (list (cmd message))] [state ~]
10−++ view |= state=model ^- (element message) (text "view")
11−++ subs |= state=model ^- (list (sub message)) ~
12−++ echo |= input=@t input
13−#### G2-gate-data
14−+$ message
15− %start
16− %stop
17−+$ model [count=@ud]
18−++ main (program init update view subs)
19−++ init |= input=$-(@t @t) ^- model [count=0]
20−++ update |= [msg=message state=model]
21− ^- [model (list (cmd message))] [state ~]
22−++ view |= state=model ^- (element message) (text "view")
23−++ subs |= state=model ^- (list (sub message)) ~
24−#### G3-gate-model-nested
25−+$ message
26− %start
27− %stop
28−+$ model [count=@ud inner=[cb=(list $-(@t @t))]]
29−++ main (program init update view subs)
30−++ init |= input=@t ^- model [count=0 inner=[cb=~]]
31−++ update |= [msg=message state=model]
32− ^- [model (list (cmd message))] [state ~]
33−++ view |= state=model ^- (element message) (text "view")
34−++ subs |= state=model ^- (list (sub message)) ~
35−#### S1-step-missing-stop
36−+$ step
37− [%move %left n=@ud]
38− [%move %right n=@ud]
39− [text=@t %draft]
40− [text=@t %sent at=@da]
41− %stop
42−++ describe |= s=step
43− ?- s
44− [%move %left n] "left {n}"
45− [%move %right n] "right {n}"
46− [t %draft] t
47− [t %sent sent-at] t
48−#### S2-move-any-covered
49−+$ step
50− [%move dir=@tas n=@ud]
51− %stop
52−++ describe |= s=step
53− ?- s
54− [%move * *] "move"
55− [%move %left n] "left"
56− %stop "stop"
57−#### S3-loobean-repeated
58−++ f |= flag=? ^- ?
59− ?- flag
60− %.y %.y
61− %.y %.n
62−#### S4-list-missing
63−++ f |= xs=(list @t) ^- ?
64− ?- xs
65− ~ %.y
66−#### S5-pattern-no-case
67−+$ choice
68− %a
69− %b
70−++ f |= v=choice
71− ?- v
72− %a "a"
73− %b "b"
74− %c "c"
75−#### T1-local-aura
76−++ inc |= n=@ud n
77−++ f |= x=@t
78− ++ bad (inc %.y)
79− x
80−#### T2-change-bad-tag
81−+$ actions
82− %start
83− %stop
84−+$ model [mode=actions data=(unit @t)]
85−++ bad-tag |= m=model m(mode=%missing)
86−#### T3-hole-path
87−++ p /todo/[id=_]
88−#### T4-unit-inner
89−++ v ^- (unit @ud) `"x"
90−#### T5-list-item
91−++ v ^- (list @ud) ~[1 "x"]
92−#### T6-repeat-attr-column
93−++ v (column ~[gap+%s1 gap+%s2] ~[(text "x")])
94−#### T7-msg-mismatch-element
95−+$ msg
96− %a
97− %b
98−++ v ^- (element msg) (button "x" %c)
99−#### T8-generic-aura-path-sample
100−++ link-to |= n=A
101− ++ m (add n 1)
102− %/blog/(m)
103−#### T9-wing-unknown-field
104−++ f |= p=[a=@ud b=@ud] c.p
105−#### T10-unknown-name
106−++ f missing
docs/reviews/2026-11-03-milestone-2-probes/errors/p2.outdeleted−38
@@ -1,38 +0,0 @@
1−#### G1-gate-model
2−REJECTED: module kind needs unsupported inference: /ui/probe/jibb
3−#### G2-gate-data
4−REJECTED: module kind needs unsupported inference: /ui/probe/jibb
5−#### G3-gate-model-nested
6−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ init
7−#### S1-step-missing-stop
8−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ describe
9−#### S2-move-any-covered
10−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ describe
11−#### S3-loobean-repeated
12−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ f
13−#### S4-list-missing
14−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ f
15−#### S5-pattern-no-case
16−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ f
17−#### T1-local-aura
18−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ f
19−#### T2-change-bad-tag
20−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ bad-tag
21−#### T3-hole-path
22−REJECTED: module source does not parse: /ui/probe/jibb
23−#### T4-unit-inner
24−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ v
25−#### T5-list-item
26−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ v
27−#### T6-repeat-attr-column
28−CHECKED
29−++ v: (element A)
30−#### T7-msg-mismatch-element
31−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ v
32−#### T8-generic-aura-path-sample
33−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ link-to
34−#### T9-wing-unknown-field
35−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ f
36−#### T10-unknown-name
37−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ f
38−
docs/reviews/2026-11-03-milestone-2-probes/errors/p3.jibbdeleted−68
@@ -1,68 +0,0 @@
1−#### C0-island-ok
2−+$ msg
3− [%typed text=@t]
4− %submit
5−+$ model [draft=@t]
6−++ main (program init update view subs)
7−++ init |= input=@t ^- model [draft=input]
8−++ update |= [=msg m=model]
9− ^- [model (list (cmd msg))]
10− ?- msg
11− [%typed t] [m(draft=t) ~]
12− %submit [m(draft="") ~]
13−++ view |= m=model ^- (element msg)
14− row ~[gap+%s1] ~[
15− (field "New todo" draft.m |=%typed)
16− button "Add" %submit
17−++ subs |= m=model ^- (list (sub msg)) ~
18−#### C1-island-submitt-view
19−+$ msg
20− [%typed text=@t]
21− %submit
22−+$ model [draft=@t]
23−++ main (program init update view subs)
24−++ init |= input=@t ^- model [draft=input]
25−++ update |= [=msg m=model]
26− ^- [model (list (cmd msg))]
27− ?- msg
28− [%typed t] [m(draft=t) ~]
29− %submit [m(draft="") ~]
30−++ view |= m=model ^- (element msg)
31− row ~[gap+%s1] ~[
32− (field "New todo" draft.m |=%typed)
33− button "Add" %submitt
34−++ subs |= m=model ^- (list (sub msg)) ~
35−#### C2-island-submitt-noview-cast
36−+$ msg
37− [%typed text=@t]
38− %submit
39−+$ model [draft=@t]
40−++ main (program init update view subs)
41−++ init |= input=@t ^- model [draft=input]
42−++ update |= [=msg m=model]
43− ^- [model (list (cmd msg))]
44− ?- msg
45− [%typed t] [m(draft=t) ~]
46− %submit [m(draft="") ~]
47−++ view |= m=model
48− row ~[gap+%s1] ~[
49− (field "New todo" draft.m |=%typed)
50− button "Add" %submitt
51−++ subs |= m=model ^- (list (sub msg)) ~
52−#### C3-island-ctor-typo
53−+$ msg
54− [%typed text=@t]
55− %submit
56−+$ model [draft=@t]
57−++ main (program init update view subs)
58−++ init |= input=@t ^- model [draft=input]
59−++ update |= [=msg m=model]
60− ^- [model (list (cmd msg))]
61− ?- msg
62− [%typed t] [m(draft=t) ~]
63− %submit [m(draft="") ~]
64−++ view |= m=model ^- (element msg)
65− row ~[gap+%s1] ~[
66− (field "New todo" draft.m |=%typd)
67− button "Add" %submit
68−++ subs |= m=model ^- (list (sub msg)) ~
docs/reviews/2026-11-03-milestone-2-probes/errors/p3.outdeleted−16
@@ -1,16 +0,0 @@
1−#### C0-island-ok
2−CHECKED
3−+$ msg: msg
4−+$ model: [draft=@t]
5−++ main: [init=$-(@t [draft=@t]) [update=$-([msg draft=@t] [draft=@t (list (cmd msg))]) [view=$-([draft=@t] (element msg)) subs=$-([draft=@t] (list (sub msg)))]]]
6−++ subs: $-([draft=@t] (list (sub msg)))
7−++ view: $-([draft=@t] (element msg))
8−++ update: $-([msg=msg m=[draft=@t]] [draft=@t (list (cmd msg))])
9−++ init: $-(@t [draft=@t])
10−#### C1-island-submitt-view
11−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ view
12−#### C2-island-submitt-noview-cast
13−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ view
14−#### C3-island-ctor-typo
15−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ view
16−
docs/reviews/2026-11-03-milestone-2-probes/errors/p4.jibbdeleted−30
@@ -1,30 +0,0 @@
1−#### X1-multiarg-site
2−++ v (add 1 "x")
3−#### X2-pt-valid
4−+$ pt
5− @t
6− [@ud @ud]
7−++ a ^- pt "x"
8−#### X3-pt-faced-cases
9−+$ pt
10− x=@ud
11− y=@ud
12−#### X4-pt-tuple-meant
13−+$ pt
14− @ud
15− @ud
16−#### X5-step-doc-missing-stop
17−+$ step
18− [%move %left n=@ud]
19− [%move %right n=@ud]
20− [text=@t %draft]
21− [text=@t %sent at=@da]
22− %stop
23−++ describe |= s=step
24− ?- s
25− [%move %left n] "left {n}"
26− [%move %right n] "right {n}"
27− [t %draft] t
28− [t %sent sent-at] t
29−#### X6-title-trim-annotated
30−++ title ^- @t (trim title)
docs/reviews/2026-11-03-milestone-2-probes/errors/p4.outdeleted−22
@@ -1,22 +0,0 @@
1−#### X1-multiarg-site
2−CHECKED
3−++ v: @t
4−#### X2-pt-valid
5−CHECKED
6−+$ pt: pt
7−++ a: pt
8−#### X3-pt-faced-cases
9−REJECTED: module source does not parse: /ui/probe/jibb
10−#### X4-pt-tuple-meant
11−REJECTED: module mold pt has overlapping cases
12−/ui/probe.jibb:2:3: first union case
13− @ud
14− ^
15−/ui/probe.jibb:3:3: overlapping case
16− @ud
17− ^
18−#### X5-step-doc-missing-stop
19−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ describe
20−#### X6-title-trim-annotated
21−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ title
22−
docs/reviews/2026-11-03-milestone-2-probes/errors/p5.jibbdeleted−45
@@ -1,45 +0,0 @@
1−#### W1-initializer-error
2−+$ model [xs=(list @t) draft=@t error=@t]
3−+$ message
4− %start
5− %stop
6−++ main (program init update view subs)
7−++ init |= ts=(list @t) [ts "" ~]
8−++ update |= [msg=message state=model]
9− ^- [model (list (cmd message))] [state ~]
10−++ view |= state=model ^- (element message) (text "view")
11−++ subs |= state=model ^- (list (sub message)) ~
12−#### W2-initializer-earlier
13−+$ model [xs=(list @t) draft=@t error=(unit @t)]
14−+$ message
15− %start
16− %stop
17−++ main (program init update view subs)
18−++ init |= ts=(list @t) [ts ~zod ~]
19−++ update |= [msg=message state=model]
20− ^- [model (list (cmd message))] [state ~]
21−++ view |= state=model ^- (element message) (text "view")
22−++ subs |= state=model ^- (list (sub message)) ~
23−#### W3-initializer-model
24−+$ model [xs=(list @t) draft=@t error=(unit @t)]
25−+$ other [xs=(list @t) draft=@t error=(unit @t) extra=@ud]
26−+$ message
27− %start
28− %stop
29−++ main (program init update view subs)
30−++ init |= ts=(list @t) [ts "" ~]
31−++ update |= [msg=message state=other]
32− ^- [other (list (cmd message))] [state ~]
33−++ view |= state=model ^- (element message) (text "view")
34−++ subs |= state=model ^- (list (sub message)) ~
35−#### W4-earlier-annotated
36−+$ model [xs=(list @t) draft=@t error=(unit @t)]
37−+$ message
38− %start
39− %stop
40−++ main (program init update view subs)
41−++ init |= ts=(list @t) ^- model [ts ~zod ~]
42−++ update |= [msg=message state=model]
43− ^- [model (list (cmd message))] [state ~]
44−++ view |= state=model ^- (element message) (text "view")
45−++ subs |= state=model ^- (list (sub message)) ~
docs/reviews/2026-11-03-milestone-2-probes/rundeleted−46
@@ -1,46 +0,0 @@
1−#!/bin/sh
2−# Rerun the milestone 2 review's probes through the full module checker,
3−# infer-jibb-file-detailed, from the repo root:
4−#
5−# docs/reviews/2026-11-03-milestone-2-probes/run plain FILE one module per section
6−# docs/reviews/2026-11-03-milestone-2-probes/run app FILE sections at my-app paths, with its imports
7−# docs/reviews/2026-11-03-milestone-2-probes/run imports the Hoon import errors
8−#
9−# FILE holds sections, each starting with a line "#### <label>"; see README.md.
10−set -e
11−HERE=$(cd "$(dirname "$0")" && pwd)
12−ROOT=$(cd "$HERE/../../.." && pwd)
13−cd "$ROOT"
14−TMP=$(mktemp -d)
15−trap 'rm -rf "$TMP"' EXIT
16−PRELUDE="--cord prelude=jibb-dev/lib/jibb/prelude.jibb --cord internal=jibb-dev/lib/jibb/internal.jibb"
17−case "$1" in
18− plain)
19− tools/hoon --raw $PRELUDE --cord src="$2" -f "$HERE/check.hoon"
20− ;;
21− app)
22− # Marks without their /- lines, which ride can't parse; the check binds
23− # the /sur face by hand, as the tests/lib suites do.
24− for m in todo-action todos todo-update todo-item posts; do
25− grep -v '^/-' "my-app/mar/$m.hoon" > "$TMP/$m.hoon"
26− done
27− { printf '=/ imp\n => ..zuse\n'; cat jibb-dev/lib/jibb-import.hoon; cat "$HERE/app-check.hoon"; } > "$TMP/check.hoon"
28− tools/hoon --raw $PRELUDE \
29− --cord sur=my-app/sur/todo.hoon --cord blogsur=my-app/sur/blog.hoon \
30− --cord action="$TMP/todo-action.hoon" --cord todos="$TMP/todos.hoon" \
31− --cord update="$TMP/todo-update.hoon" --cord item="$TMP/todo-item.hoon" \
32− --cord posts="$TMP/posts.hoon" \
33− --cord todoapi=my-app/ui/api/todo.jibb --cord todolist=my-app/ui/todo-list.jibb \
34− --cord blogapi=my-app/ui/api/blog.jibb --cord card=my-app/ui/components/card.jibb \
35− --cord cart=my-app/ui/stores/cart.jibb \
36− --cord src="$2" -f "$TMP/check.hoon"
37− ;;
38− imports)
39− { printf '=/ jibb-lib .\n=/ reader\n'; cat jibb-dev/lib/jibb-import.hoon; printf '\n'; cat "$HERE/errors/import-check.hoon"; } > "$TMP/check.hoon"
40− tools/hoon --raw $PRELUDE -f "$TMP/check.hoon"
41− ;;
42− *)
43− sed -n '2,10p' "$0"
44− exit 2
45− ;;
46−esac
docs/reviews/2026-11-03-milestone-2-probes/variants/p1.jibbdeleted−194
@@ -1,194 +0,0 @@
1−#### /ui/api/todo/jibb api-todo
2−:: /ui/api/todo.jibb
3−/- todo
4−/% %todo-action
5−/% %todos
6−/% %todo-update
7−/% %todo-item
8−
9−+$ item item.todo
10−+$ poke todo-action
11−+$ paths
12− [%todos /todos todos]
13− [%changes /changes (facts todos todo-update)]
14− [%todo-by-id /todo/[id=@ud] todo-item]
15−#### /ui/api/blog/jibb api-blog
16−:: Fixture for the documented examples; not supplied by the design doc.
17−/% %posts
18−
19−+$ paths
20− [%posts /posts posts]
21−#### /ui/components/card/jibb card
22−:: Fixture for the documented examples; not supplied by the design doc.
23−/- blog
24−
25−++ card |= p=post.blog
26− text title.p
27−#### /ui/components/buttons/jibb buttons
28−:: /ui/components/buttons.jibb, a library with no main
29−++ add-button |= label=@t
30− button label %add :: error: nothing fixes the union of %add
31−++ labelled |= [label=@t msg=M]
32− button label msg :: fine: the caller's union
33−++ wide ^- (list attr)
34− ~[width+[%fill 1] pad+%s2] :: fine: the cast fixes the tags
35−#### /ui/theme/jibb theme
36−++ theme ^- theme
37− [ space=[s1="4px" s2="8px" s3="16px"]
38− tones=[normal="#222" background="#fff" accent="#17734f" danger="#b3261e" muted="#5f5f5f"]
39− wide="60rem"
40− lang="en"
41− zone="UTC"
42− font=`%/static/fonts/inter.woff2
43− dark=`[tones=[normal="#eee" background="#111" accent="#4c9" danger="#f28b82" muted="#aaa"]]
44−#### /ui/stores/cart/jibb cart
45−:: /ui/stores/cart.jibb
46−+$ state [items=(list @t) open=?]
47−+$ poke
48− [%add item=@t]
49− %toggle
50−
51−++ main (store init update)
52−++ init ^- state [items=~ open=%.n]
53−++ update |= [a=poke s=state]
54− ?- a
55− [%add item] s(items=[item items.s])
56− %toggle s(open=(not open.s))
57−#### /ui/basket/jibb basket
58−:: /ui/basket.jibb
59−/= cart /ui/stores/cart
60−
61−++ main (program init update view subs)
62−
63−+$ model [cart=state.cart note=@t]
64−+$ msg
65− [%noted text=@t]
66− %add
67− %toggle
68− [%got cart=state.cart]
69− [%acked err=(unit @t)]
70−
71−++ init |= ~
72− [cart=[items=~ open=%.n] note=""]
73−
74−++ update |= [=msg m=model]
75− ?- msg
76− [%noted t] [m(note=t) ~]
77− %add [m(note="") ~[(poke.cart [%add note.m] |=%acked)]]
78− %toggle [m ~[(poke.cart %toggle |=%acked)]]
79− [%got c] [m(cart=c) ~]
80− [%acked err] [m ~]
81−
82−++ subs |= m=model
83− ~[[%watch (state.cart |=%got)]]
84−
85−++ view |= m=model
86− column ~[gap+%s1] ~[
87− (text "{(lent items.cart.m)} items")
88− field "Item" note.m |=%noted
89− button "Add" %add
90−#### /ui/todo-list/jibb todo-list
91−/= todo /ui/api/todo
92−
93−++ main (program init update view subs)
94−
95−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
96−+$ msg
97− [%typed text=@t]
98− %submit
99− [%toggled id=@ud]
100− [%got todos=(list item.todo)]
101− [%acked err=(unit @t)]
102−
103−++ init |= ts=(list item.todo)
104− [todos=ts draft="" error=~]
105−
106−++ update |= [=msg m=model]
107− ?- msg
108− [%typed t]
109− ?- (gth (lent (tuba (trip t))) 80)
110− %.y [m(draft=t error=`"Too long") ~]
111− %.n [m(draft=t error=~) ~]
112− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
113− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
114− [%got ts] [m(todos=ts) ~]
115− [%acked err] [m(error=err) ~]
116−
117−++ subs |= m=model
118− ~[[%watch (todos.todo |=%got)]]
119−
120−++ view |= m=model
121− column ~[gap+%s2] ~[
122− heading 2 "Todos"
123− each (turn todos.m row-of)
124− row ~[gap+%s1] ~[
125− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
126− button "Add" %submit
127− el ~[tone+%danger] (text (fall error.m ""))
128−
129−++ row-of |= t=item.todo
130− [id.t (toggle done.t text.t [%toggled id.t])]
131−#### /ui/index/jibb index
132−/= todo /ui/api/todo
133−/= todo-list /ui/todo-list
134−
135−++ main (page load view)
136−++ load |=(~ (todos.todo same))
137−
138−++ view |= ts=(list item.todo)
139− column ~[pad+%s3] ~[
140− heading 1 "My ship"
141− island main.todo-list ts
142−#### /ui/about/jibb about
143−++ main view
144−
145−++ view
146− column ~[width+[%fill 1] pad+%s3 gap+%s2] ~[
147− heading 1 "About this ship"
148− para ~[(text "Hosted on Urbit. This page ships no JavaScript.")]
149− el ~[tone+%accent] (link %/blog "Read the blog")
150−#### /ui/blog/index/jibb blog-index
151−/- blog
152−/= api /ui/api/blog
153−/= card /ui/components/card
154−
155−++ main (page load view)
156−++ load |=(~ (posts.api same))
157−
158−++ view |= ps=(list post.blog)
159− column ~[gap+%s2] (turn ps card.card)
160−#### /ui/imports/jibb imports
161−/- todo :: the molds from /sur/todo.hoon this module uses
162−/% %todo-action :: a mark's type, named todo-action
163−/= card /ui/components/card :: a Jibb module
164−#### /ui/view-day/jibb view-day
165−++ view |= [day=@da n=@ud]
166− column ~[gap+%s1] ~[
167− (text "Updated {day}") :: day printed as a date
168− (text "{n} items") :: n printed as @ud
169−#### /ui/step/jibb step
170−+$ step
171− [%move %left n=@ud]
172− [%move %right n=@ud]
173− [text=@t %draft]
174− [text=@t %sent at=@da]
175− %stop
176−
177−++ describe |= s=step
178− ?- s
179− [%move %left n] "left {n}"
180− [%move %right n] "right {n}"
181− [t %draft] t
182− [t %sent sent-at] t
183− %stop "stop"
184−#### /ui/update/jibb core-update-alone
185−++ update |= [=msg m=model]
186− ?- msg
187− [%typed t]
188− ?- (gth (lent (tuba (trip t))) 80)
189− %.y [m(draft=t error=`"Too long") ~]
190− %.n [m(draft=t error=~) ~]
191− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
192− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
193− [%got ts] [m(todos=ts) ~]
194− [%acked err] [m(error=err) ~]
docs/reviews/2026-11-03-milestone-2-probes/variants/p10.jibbdeleted−324
@@ -1,324 +0,0 @@
1−#### /ui/index/jibb BAD-island-data-atom
2−/= todo /ui/api/todo
3−/= todo-list /ui/todo-list
4−
5−++ main (page load view)
6−++ load |=(~ (todos.todo same))
7−
8−++ view |= ts=(list item.todo)
9− column ~[pad+%s3] ~[
10− heading 1 "My ship"
11− island main.todo-list 5
12−#### /ui/index/jibb BAD-view-sample
13−/= todo /ui/api/todo
14−/= todo-list /ui/todo-list
15−
16−++ main (page load view)
17−++ load |=(~ (todos.todo same))
18−
19−++ view |= ts=(list @t)
20− column ~[pad+%s3] ~[
21− heading 1 "My ship"
22− text "x"
23−#### /ui/todo-list/jibb BAD-cmd-bare-tag
24−/= todo /ui/api/todo
25−
26−++ main (program init update view subs)
27−
28−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
29−+$ msg
30− [%typed text=@t]
31− %submit
32− [%toggled id=@ud]
33− [%got todos=(list item.todo)]
34− [%acked err=(unit @t)]
35−
36−++ init |= ts=(list item.todo)
37− [todos=ts draft="" error=~]
38−
39−++ update |= [=msg m=model]
40− ?- msg
41− [%typed t]
42− ?- (gth (lent (tuba (trip t))) 80)
43− %.y [m(draft=t error=`"Too long") ~]
44− %.n [m(draft=t error=~) ~]
45− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
46− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
47− [%got ts] [m(todos=ts) ~[%submit]]
48− [%acked err] [m(error=err) ~]
49−
50−++ subs |= m=model
51− ~[[%watch (todos.todo |=%got)]]
52−
53−++ view |= m=model
54− column ~[gap+%s2] ~[
55− heading 2 "Todos"
56− each (turn todos.m row-of)
57− row ~[gap+%s1] ~[
58− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
59− button "Add" %submit
60− el ~[tone+%danger] (text (fall error.m ""))
61−
62−++ row-of |= t=item.todo
63− [id.t (toggle done.t text.t [%toggled id.t])]
64−#### /ui/basket/jibb BAD-cart-poke-case
65−:: /ui/basket.jibb
66−/= cart /ui/stores/cart
67−
68−++ main (program init update view subs)
69−
70−+$ model [cart=state.cart note=@t]
71−+$ msg
72− [%noted text=@t]
73− %add
74− %toggle
75− [%got cart=state.cart]
76− [%acked err=(unit @t)]
77−
78−++ init |= ~
79− [cart=[items=~ open=%.n] note=""]
80−
81−++ update |= [=msg m=model]
82− ?- msg
83− [%noted t] [m(note=t) ~]
84− %add [m(note="") ~[(poke.cart [%remove note.m] |=%acked)]]
85− %toggle [m ~[(poke.cart %toggle |=%acked)]]
86− [%got c] [m(cart=c) ~]
87− [%acked err] [m ~]
88−
89−++ subs |= m=model
90− ~[[%watch (state.cart |=%got)]]
91−
92−++ view |= m=model
93− column ~[gap+%s1] ~[
94− (text "{(lent items.cart.m)} items")
95− field "Item" note.m |=%noted
96− button "Add" %add
97−#### /ui/todo-list/jibb BAD-watch-reply
98−/= todo /ui/api/todo
99−
100−++ main (program init update view subs)
101−
102−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
103−+$ msg
104− [%typed text=@t]
105− %submit
106− [%toggled id=@ud]
107− [%got todos=(list item.todo)]
108− [%acked err=(unit @t)]
109−
110−++ init |= ts=(list item.todo)
111− [todos=ts draft="" error=~]
112−
113−++ update |= [=msg m=model]
114− ?- msg
115− [%typed t]
116− ?- (gth (lent (tuba (trip t))) 80)
117− %.y [m(draft=t error=`"Too long") ~]
118− %.n [m(draft=t error=~) ~]
119− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
120− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
121− [%got ts] [m(todos=ts) ~]
122− [%acked err] [m(error=err) ~]
123−
124−++ subs |= m=model
125− ~[[%watch (todos.todo |=%acked)]]
126−
127−++ view |= m=model
128− column ~[gap+%s2] ~[
129− heading 2 "Todos"
130− each (turn todos.m row-of)
131− row ~[gap+%s1] ~[
132− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
133− button "Add" %submit
134− el ~[tone+%danger] (text (fall error.m ""))
135−
136−++ row-of |= t=item.todo
137− [id.t (toggle done.t text.t [%toggled id.t])]
138−#### /ui/stores/cart/jibb BAD-cart-open-num
139−:: /ui/stores/cart.jibb
140−+$ state [items=(list @t) open=?]
141−+$ poke
142− [%add item=@t]
143− %toggle
144−
145−++ main (store init update)
146−++ init ^- state [items=~ open=%.n]
147−++ update |= [a=poke s=state]
148− ?- a
149− [%add item] s(items=[item items.s])
150− %toggle s(open=5)
151−#### /ui/todo-list/jibb BAD-init-error-cord
152−/= todo /ui/api/todo
153−
154−++ main (program init update view subs)
155−
156−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
157−+$ msg
158− [%typed text=@t]
159− %submit
160− [%toggled id=@ud]
161− [%got todos=(list item.todo)]
162− [%acked err=(unit @t)]
163−
164−++ init |= ts=(list item.todo)
165− [todos=ts draft="" error="x"]
166−
167−++ update |= [=msg m=model]
168− ?- msg
169− [%typed t]
170− ?- (gth (lent (tuba (trip t))) 80)
171− %.y [m(draft=t error=`"Too long") ~]
172− %.n [m(draft=t error=~) ~]
173− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
174− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
175− [%got ts] [m(todos=ts) ~]
176− [%acked err] [m(error=err) ~]
177−
178−++ subs |= m=model
179− ~[[%watch (todos.todo |=%got)]]
180−
181−++ view |= m=model
182− column ~[gap+%s2] ~[
183− heading 2 "Todos"
184− each (turn todos.m row-of)
185− row ~[gap+%s1] ~[
186− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
187− button "Add" %submit
188− el ~[tone+%danger] (text (fall error.m ""))
189−
190−++ row-of |= t=item.todo
191− [id.t (toggle done.t text.t [%toggled id.t])]
192−#### /ui/todo-list/jibb BAD-model-gate
193−/= todo /ui/api/todo
194−
195−++ main (program init update view subs)
196−
197−+$ model [todos=(list item.todo) draft=@t error=(unit @t) f=$-(@t @t)]
198−+$ msg
199− [%typed text=@t]
200− %submit
201− [%toggled id=@ud]
202− [%got todos=(list item.todo)]
203− [%acked err=(unit @t)]
204−
205−++ init |= ts=(list item.todo)
206− [todos=ts draft="" error=~ f=same]
207−
208−++ update |= [=msg m=model]
209− ?- msg
210− [%typed t]
211− ?- (gth (lent (tuba (trip t))) 80)
212− %.y [m(draft=t error=`"Too long") ~]
213− %.n [m(draft=t error=~) ~]
214− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
215− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
216− [%got ts] [m(todos=ts) ~]
217− [%acked err] [m(error=err) ~]
218−
219−++ subs |= m=model
220− ~[[%watch (todos.todo |=%got)]]
221−
222−++ view |= m=model
223− column ~[gap+%s2] ~[
224− heading 2 "Todos"
225− each (turn todos.m row-of)
226− row ~[gap+%s1] ~[
227− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
228− button "Add" %submit
229− el ~[tone+%danger] (text (fall error.m ""))
230−
231−++ row-of |= t=item.todo
232− [id.t (toggle done.t text.t [%toggled id.t])]
233−#### /ui/blog/index/jibb BAD-card-wrong
234−/- blog
235−/= api /ui/api/blog
236−/= card /ui/components/card
237−
238−++ main (page load view)
239−++ load |=(~ (posts.api same))
240−
241−++ view |= ps=(list post.blog)
242− column ~[gap+%s2] (turn ps |=(p=post.blog p))
243−#### /ui/todo-list/jibb BAD-poke-payload
244−/= todo /ui/api/todo
245−
246−++ main (program init update view subs)
247−
248−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
249−+$ msg
250− [%typed text=@t]
251− %submit
252− [%toggled id=@ud]
253− [%got todos=(list item.todo)]
254− [%acked err=(unit @t)]
255−
256−++ init |= ts=(list item.todo)
257− [todos=ts draft="" error=~]
258−
259−++ update |= [=msg m=model]
260− ?- msg
261− [%typed t]
262− ?- (gth (lent (tuba (trip t))) 80)
263− %.y [m(draft=t error=`"Too long") ~]
264− %.n [m(draft=t error=~) ~]
265− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
266− [%toggled id] [m ~[(poke.todo [%toggle "x"] |=%acked)]]
267− [%got ts] [m(todos=ts) ~]
268− [%acked err] [m(error=err) ~]
269−
270−++ subs |= m=model
271− ~[[%watch (todos.todo |=%got)]]
272−
273−++ view |= m=model
274− column ~[gap+%s2] ~[
275− heading 2 "Todos"
276− each (turn todos.m row-of)
277− row ~[gap+%s1] ~[
278− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
279− button "Add" %submit
280− el ~[tone+%danger] (text (fall error.m ""))
281−
282−++ row-of |= t=item.todo
283− [id.t (toggle done.t text.t [%toggled id.t])]
284−#### /ui/todo-list/jibb BAD-row-key-gate
285−/= todo /ui/api/todo
286−
287−++ main (program init update view subs)
288−
289−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
290−+$ msg
291− [%typed text=@t]
292− %submit
293− [%toggled id=@ud]
294− [%got todos=(list item.todo)]
295− [%acked err=(unit @t)]
296−
297−++ init |= ts=(list item.todo)
298− [todos=ts draft="" error=~]
299−
300−++ update |= [=msg m=model]
301− ?- msg
302− [%typed t]
303− ?- (gth (lent (tuba (trip t))) 80)
304− %.y [m(draft=t error=`"Too long") ~]
305− %.n [m(draft=t error=~) ~]
306− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
307− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
308− [%got ts] [m(todos=ts) ~]
309− [%acked err] [m(error=err) ~]
310−
311−++ subs |= m=model
312− ~[[%watch (todos.todo |=%got)]]
313−
314−++ view |= m=model
315− column ~[gap+%s2] ~[
316− heading 2 "Todos"
317− each (turn todos.m row-of)
318− row ~[gap+%s1] ~[
319− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
320− button "Add" %submit
321− el ~[tone+%danger] (text (fall error.m ""))
322−
323−++ row-of |= t=item.todo
324− [same (toggle done.t text.t [%toggled id.t])]
docs/reviews/2026-11-03-milestone-2-probes/variants/p10.outdeleted−33
@@ -1,33 +0,0 @@
1−#### /ui/index/jibb BAD-island-data-atom
2−REJECTED: module definitions need unsupported inference: /ui/index/jibb: ++ view
3−#### /ui/index/jibb BAD-view-sample
4−REJECTED: module definitions need unsupported inference: /ui/index/jibb: ++ main
5−#### /ui/todo-list/jibb BAD-cmd-bare-tag
6−REJECTED: /ui/todo-list.jibb:14:28: nothing fixes the union of ~
7− [todos=ts draft="" error=~]
8− ^
9−#### /ui/basket/jibb BAD-cart-poke-case
10−REJECTED: /ui/basket.jibb:15:16: nothing fixes the union of ~
11− [cart=[items=~ open=%.n] note=""]
12− ^
13−#### /ui/todo-list/jibb BAD-watch-reply
14−REJECTED: /ui/todo-list.jibb:14:28: nothing fixes the union of ~
15− [todos=ts draft="" error=~]
16− ^
17−#### /ui/stores/cart/jibb BAD-cart-open-num
18−REJECTED: module definitions need unsupported inference: /ui/stores/cart/jibb: ++ update
19−#### /ui/todo-list/jibb BAD-init-error-cord
20−REJECTED: module definitions need unsupported inference: /ui/todo-list/jibb: ++ main
21−#### /ui/todo-list/jibb BAD-model-gate
22−REJECTED: module kind needs unsupported inference: /ui/todo-list/jibb
23−#### /ui/blog/index/jibb BAD-card-wrong
24−REJECTED: module definitions need unsupported inference: /ui/blog/index/jibb: ++ view
25−#### /ui/todo-list/jibb BAD-poke-payload
26−REJECTED: /ui/todo-list.jibb:14:28: nothing fixes the union of ~
27− [todos=ts draft="" error=~]
28− ^
29−#### /ui/todo-list/jibb BAD-row-key-gate
30−REJECTED: /ui/todo-list.jibb:14:28: nothing fixes the union of ~
31− [todos=ts draft="" error=~]
32− ^
33−
docs/reviews/2026-11-03-milestone-2-probes/variants/p2.jibbdeleted−919
@@ -1,919 +0,0 @@
1−#### /ui/todo-list/jibb control
2−/= todo /ui/api/todo
3−
4−++ main (program init update view subs)
5−
6−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
7−+$ msg
8− [%typed text=@t]
9− %submit
10− [%toggled id=@ud]
11− [%got todos=(list item.todo)]
12− [%acked err=(unit @t)]
13−
14−++ init |= ts=(list item.todo)
15− [todos=ts draft="" error=~]
16−
17−++ update |= [=msg m=model]
18− ?- msg
19− [%typed t]
20− ?- (gth (lent (tuba (trip t))) 80)
21− %.y [m(draft=t error=`"Too long") ~]
22− %.n [m(draft=t error=~) ~]
23− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
24− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
25− [%got ts] [m(todos=ts) ~]
26− [%acked err] [m(error=err) ~]
27−
28−++ subs |= m=model
29− ~[[%watch (todos.todo |=%got)]]
30−
31−++ view |= m=model
32− column ~[gap+%s2] ~[
33− heading 2 "Todos"
34− each (turn todos.m row-of)
35− row ~[gap+%s1] ~[
36− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
37− button "Add" %submit
38− el ~[tone+%danger] (text (fall error.m ""))
39−
40−++ row-of |= t=item.todo
41− [id.t (toggle done.t text.t [%toggled id.t])]
42−#### /ui/todo-list/jibb reorder
43−/= todo /ui/api/todo
44−
45−++ row-of |= t=item.todo
46− [id.t (toggle done.t text.t [%toggled id.t])]
47−
48−++ view |= m=model
49− column ~[gap+%s2] ~[
50− heading 2 "Todos"
51− each (turn todos.m row-of)
52− row ~[gap+%s1] ~[
53− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
54− button "Add" %submit
55− el ~[tone+%danger] (text (fall error.m ""))
56−
57−++ subs |= m=model
58− ~[[%watch (todos.todo |=%got)]]
59−
60−++ update |= [=msg m=model]
61− ?- msg
62− [%typed t]
63− ?- (gth (lent (tuba (trip t))) 80)
64− %.y [m(draft=t error=`"Too long") ~]
65− %.n [m(draft=t error=~) ~]
66− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
67− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
68− [%got ts] [m(todos=ts) ~]
69− [%acked err] [m(error=err) ~]
70−
71−++ init |= ts=(list item.todo)
72− [todos=ts draft="" error=~]
73−
74−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
75−+$ msg
76− [%typed text=@t]
77− %submit
78− [%toggled id=@ud]
79− [%got todos=(list item.todo)]
80− [%acked err=(unit @t)]
81−
82−++ main (program init update view subs)
83−#### /ui/todo-list/jibb rename-view-sample
84−/= todo /ui/api/todo
85−
86−++ main (program init update view subs)
87−
88−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
89−+$ msg
90− [%typed text=@t]
91− %submit
92− [%toggled id=@ud]
93− [%got todos=(list item.todo)]
94− [%acked err=(unit @t)]
95−
96−++ init |= ts=(list item.todo)
97− [todos=ts draft="" error=~]
98−
99−++ update |= [=msg m=model]
100− ?- msg
101− [%typed t]
102− ?- (gth (lent (tuba (trip t))) 80)
103− %.y [m(draft=t error=`"Too long") ~]
104− %.n [m(draft=t error=~) ~]
105− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
106− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
107− [%got ts] [m(todos=ts) ~]
108− [%acked err] [m(error=err) ~]
109−
110−++ subs |= m=model
111− ~[[%watch (todos.todo |=%got)]]
112−
113−++ view |= mdl=model
114− column ~[gap+%s2] ~[
115− heading 2 "Todos"
116− each (turn todos.mdl row-of)
117− row ~[gap+%s1] ~[
118− el ~[width+[%fill 1]] (field "New todo" draft.mdl |=%typed)
119− button "Add" %submit
120− el ~[tone+%danger] (text (fall error.mdl ""))
121−
122−++ row-of |= t=item.todo
123− [id.t (toggle done.t text.t [%toggled id.t])]
124−#### /ui/todo-list/jibb rename-row-sample
125−/= todo /ui/api/todo
126−
127−++ main (program init update view subs)
128−
129−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
130−+$ msg
131− [%typed text=@t]
132− %submit
133− [%toggled id=@ud]
134− [%got todos=(list item.todo)]
135− [%acked err=(unit @t)]
136−
137−++ init |= ts=(list item.todo)
138− [todos=ts draft="" error=~]
139−
140−++ update |= [=msg m=model]
141− ?- msg
142− [%typed t]
143− ?- (gth (lent (tuba (trip t))) 80)
144− %.y [m(draft=t error=`"Too long") ~]
145− %.n [m(draft=t error=~) ~]
146− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
147− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
148− [%got ts] [m(todos=ts) ~]
149− [%acked err] [m(error=err) ~]
150−
151−++ subs |= m=model
152− ~[[%watch (todos.todo |=%got)]]
153−
154−++ view |= m=model
155− column ~[gap+%s2] ~[
156− heading 2 "Todos"
157− each (turn todos.m row-of)
158− row ~[gap+%s1] ~[
159− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
160− button "Add" %submit
161− el ~[tone+%danger] (text (fall error.m ""))
162−
163−++ row-of |= it=item.todo
164− [id.it (toggle done.it text.it [%toggled id.it])]
165−#### /ui/todo-list/jibb rename-init-sample
166−/= todo /ui/api/todo
167−
168−++ main (program init update view subs)
169−
170−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
171−+$ msg
172− [%typed text=@t]
173− %submit
174− [%toggled id=@ud]
175− [%got todos=(list item.todo)]
176− [%acked err=(unit @t)]
177−
178−++ init |= items=(list item.todo)
179− [todos=items draft="" error=~]
180−
181−++ update |= [=msg m=model]
182− ?- msg
183− [%typed t]
184− ?- (gth (lent (tuba (trip t))) 80)
185− %.y [m(draft=t error=`"Too long") ~]
186− %.n [m(draft=t error=~) ~]
187− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
188− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
189− [%got ts] [m(todos=ts) ~]
190− [%acked err] [m(error=err) ~]
191−
192−++ subs |= m=model
193− ~[[%watch (todos.todo |=%got)]]
194−
195−++ view |= m=model
196− column ~[gap+%s2] ~[
197− heading 2 "Todos"
198− each (turn todos.m row-of)
199− row ~[gap+%s1] ~[
200− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
201− button "Add" %submit
202− el ~[tone+%danger] (text (fall error.m ""))
203−
204−++ row-of |= t=item.todo
205− [id.t (toggle done.t text.t [%toggled id.t])]
206−#### /ui/todo-list/jibb rename-subs-sample
207−/= todo /ui/api/todo
208−
209−++ main (program init update view subs)
210−
211−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
212−+$ msg
213− [%typed text=@t]
214− %submit
215− [%toggled id=@ud]
216− [%got todos=(list item.todo)]
217− [%acked err=(unit @t)]
218−
219−++ init |= ts=(list item.todo)
220− [todos=ts draft="" error=~]
221−
222−++ update |= [=msg m=model]
223− ?- msg
224− [%typed t]
225− ?- (gth (lent (tuba (trip t))) 80)
226− %.y [m(draft=t error=`"Too long") ~]
227− %.n [m(draft=t error=~) ~]
228− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
229− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
230− [%got ts] [m(todos=ts) ~]
231− [%acked err] [m(error=err) ~]
232−
233−++ subs |= mdl=model
234− ~[[%watch (todos.todo |=%got)]]
235−
236−++ view |= m=model
237− column ~[gap+%s2] ~[
238− heading 2 "Todos"
239− each (turn todos.m row-of)
240− row ~[gap+%s1] ~[
241− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
242− button "Add" %submit
243− el ~[tone+%danger] (text (fall error.m ""))
244−
245−++ row-of |= t=item.todo
246− [id.t (toggle done.t text.t [%toggled id.t])]
247−#### /ui/todo-list/jibb unused-helper
248−/= todo /ui/api/todo
249−
250−++ main (program init update view subs)
251−
252−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
253−+$ msg
254− [%typed text=@t]
255− %submit
256− [%toggled id=@ud]
257− [%got todos=(list item.todo)]
258− [%acked err=(unit @t)]
259−
260−++ init |= ts=(list item.todo)
261− [todos=ts draft="" error=~]
262−
263−++ update |= [=msg m=model]
264− ?- msg
265− [%typed t]
266− ?- (gth (lent (tuba (trip t))) 80)
267− %.y [m(draft=t error=`"Too long") ~]
268− %.n [m(draft=t error=~) ~]
269− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
270− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
271− [%got ts] [m(todos=ts) ~]
272− [%acked err] [m(error=err) ~]
273−
274−++ subs |= m=model
275− ~[[%watch (todos.todo |=%got)]]
276−
277−++ view |= m=model
278− column ~[gap+%s2] ~[
279− heading 2 "Todos"
280− each (turn todos.m row-of)
281− row ~[gap+%s1] ~[
282− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
283− button "Add" %submit
284− el ~[tone+%danger] (text (fall error.m ""))
285−
286−++ row-of |= t=item.todo
287− [id.t (toggle done.t text.t [%toggled id.t])]
288−
289−++ count |= m=model
290− (lent todos.m)
291−#### /ui/todo-list/jibb unused-helper-mold
292−/= todo /ui/api/todo
293−
294−++ main (program init update view subs)
295−
296−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
297−+$ msg
298− [%typed text=@t]
299− %submit
300− [%toggled id=@ud]
301− [%got todos=(list item.todo)]
302− [%acked err=(unit @t)]
303−
304−++ init |= ts=(list item.todo)
305− [todos=ts draft="" error=~]
306−
307−++ update |= [=msg m=model]
308− ?- msg
309− [%typed t]
310− ?- (gth (lent (tuba (trip t))) 80)
311− %.y [m(draft=t error=`"Too long") ~]
312− %.n [m(draft=t error=~) ~]
313− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
314− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
315− [%got ts] [m(todos=ts) ~]
316− [%acked err] [m(error=err) ~]
317−
318−++ subs |= m=model
319− ~[[%watch (todos.todo |=%got)]]
320−
321−++ view |= m=model
322− column ~[gap+%s2] ~[
323− heading 2 "Todos"
324− each (turn todos.m row-of)
325− row ~[gap+%s1] ~[
326− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
327− button "Add" %submit
328− el ~[tone+%danger] (text (fall error.m ""))
329−
330−++ row-of |= t=item.todo
331− [id.t (toggle done.t text.t [%toggled id.t])]
332−
333−+$ flag ?
334−#### /ui/todo-list/jibb swap-model-fields
335−/= todo /ui/api/todo
336−
337−++ main (program init update view subs)
338−
339−+$ model [draft=@t todos=(list item.todo) error=(unit @t)]
340−+$ msg
341− [%typed text=@t]
342− %submit
343− [%toggled id=@ud]
344− [%got todos=(list item.todo)]
345− [%acked err=(unit @t)]
346−
347−++ init |= ts=(list item.todo)
348− [draft="" todos=ts error=~]
349−
350−++ update |= [=msg m=model]
351− ?- msg
352− [%typed t]
353− ?- (gth (lent (tuba (trip t))) 80)
354− %.y [m(draft=t error=`"Too long") ~]
355− %.n [m(draft=t error=~) ~]
356− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
357− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
358− [%got ts] [m(todos=ts) ~]
359− [%acked err] [m(error=err) ~]
360−
361−++ subs |= m=model
362− ~[[%watch (todos.todo |=%got)]]
363−
364−++ view |= m=model
365− column ~[gap+%s2] ~[
366− heading 2 "Todos"
367− each (turn todos.m row-of)
368− row ~[gap+%s1] ~[
369− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
370− button "Add" %submit
371− el ~[tone+%danger] (text (fall error.m ""))
372−
373−++ row-of |= t=item.todo
374− [id.t (toggle done.t text.t [%toggled id.t])]
375−#### /ui/todo-list/jibb init-cast-body
376−/= todo /ui/api/todo
377−
378−++ main (program init update view subs)
379−
380−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
381−+$ msg
382− [%typed text=@t]
383− %submit
384− [%toggled id=@ud]
385− [%got todos=(list item.todo)]
386− [%acked err=(unit @t)]
387−
388−++ init |= ts=(list item.todo)
389− ^- model [ts "" ~]
390−
391−++ update |= [=msg m=model]
392− ?- msg
393− [%typed t]
394− ?- (gth (lent (tuba (trip t))) 80)
395− %.y [m(draft=t error=`"Too long") ~]
396− %.n [m(draft=t error=~) ~]
397− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
398− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
399− [%got ts] [m(todos=ts) ~]
400− [%acked err] [m(error=err) ~]
401−
402−++ subs |= m=model
403− ~[[%watch (todos.todo |=%got)]]
404−
405−++ view |= m=model
406− column ~[gap+%s2] ~[
407− heading 2 "Todos"
408− each (turn todos.m row-of)
409− row ~[gap+%s1] ~[
410− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
411− button "Add" %submit
412− el ~[tone+%danger] (text (fall error.m ""))
413−
414−++ row-of |= t=item.todo
415− [id.t (toggle done.t text.t [%toggled id.t])]
416−#### /ui/todo-list/jibb init-positional
417−/= todo /ui/api/todo
418−
419−++ main (program init update view subs)
420−
421−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
422−+$ msg
423− [%typed text=@t]
424− %submit
425− [%toggled id=@ud]
426− [%got todos=(list item.todo)]
427− [%acked err=(unit @t)]
428−
429−++ init |= ts=(list item.todo)
430− [ts "" ~]
431−
432−++ update |= [=msg m=model]
433− ?- msg
434− [%typed t]
435− ?- (gth (lent (tuba (trip t))) 80)
436− %.y [m(draft=t error=`"Too long") ~]
437− %.n [m(draft=t error=~) ~]
438− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
439− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
440− [%got ts] [m(todos=ts) ~]
441− [%acked err] [m(error=err) ~]
442−
443−++ subs |= m=model
444− ~[[%watch (todos.todo |=%got)]]
445−
446−++ view |= m=model
447− column ~[gap+%s2] ~[
448− heading 2 "Todos"
449− each (turn todos.m row-of)
450− row ~[gap+%s1] ~[
451− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
452− button "Add" %submit
453− el ~[tone+%danger] (text (fall error.m ""))
454−
455−++ row-of |= t=item.todo
456− [id.t (toggle done.t text.t [%toggled id.t])]
457−#### /ui/todo-list/jibb second-sub-every
458−/= todo /ui/api/todo
459−
460−++ main (program init update view subs)
461−
462−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
463−+$ msg
464− [%typed text=@t]
465− %submit
466− [%toggled id=@ud]
467− [%got todos=(list item.todo)]
468− [%acked err=(unit @t)]
469− [%tick at=@da]
470−
471−++ init |= ts=(list item.todo)
472− [todos=ts draft="" error=~]
473−
474−++ update |= [=msg m=model]
475− ?- msg
476− [%typed t]
477− ?- (gth (lent (tuba (trip t))) 80)
478− %.y [m(draft=t error=`"Too long") ~]
479− %.n [m(draft=t error=~) ~]
480− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
481− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
482− [%got ts] [m(todos=ts) ~]
483− [%acked err] [m(error=err) ~]
484− [%tick at] [m ~]
485−
486−++ subs |= m=model
487− ~[[%watch (todos.todo |=%got)] [%every ~s30 |=%tick]]
488−
489−++ view |= m=model
490− column ~[gap+%s2] ~[
491− heading 2 "Todos"
492− each (turn todos.m row-of)
493− row ~[gap+%s1] ~[
494− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
495− button "Add" %submit
496− el ~[tone+%danger] (text (fall error.m ""))
497−
498−++ row-of |= t=item.todo
499− [id.t (toggle done.t text.t [%toggled id.t])]
500−#### /ui/todo-list/jibb second-sub-watch
501−/= todo /ui/api/todo
502−
503−++ main (program init update view subs)
504−
505−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
506−+$ msg
507− [%typed text=@t]
508− %submit
509− [%toggled id=@ud]
510− [%got todos=(list item.todo)]
511− [%acked err=(unit @t)]
512−
513−++ init |= ts=(list item.todo)
514− [todos=ts draft="" error=~]
515−
516−++ update |= [=msg m=model]
517− ?- msg
518− [%typed t]
519− ?- (gth (lent (tuba (trip t))) 80)
520− %.y [m(draft=t error=`"Too long") ~]
521− %.n [m(draft=t error=~) ~]
522− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
523− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
524− [%got ts] [m(todos=ts) ~]
525− [%acked err] [m(error=err) ~]
526−
527−++ subs |= m=model
528− ~[[%watch (todos.todo |=%got)] [%watch (todos.todo |=%got)]]
529−
530−++ view |= m=model
531− column ~[gap+%s2] ~[
532− heading 2 "Todos"
533− each (turn todos.m row-of)
534− row ~[gap+%s1] ~[
535− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
536− button "Add" %submit
537− el ~[tone+%danger] (text (fall error.m ""))
538−
539−++ row-of |= t=item.todo
540− [id.t (toggle done.t text.t [%toggled id.t])]
541−#### /ui/todo-list/jibb subs-none
542−/= todo /ui/api/todo
543−
544−++ main (program init update view subs)
545−
546−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
547−+$ msg
548− [%typed text=@t]
549− %submit
550− [%toggled id=@ud]
551− [%got todos=(list item.todo)]
552− [%acked err=(unit @t)]
553−
554−++ init |= ts=(list item.todo)
555− [todos=ts draft="" error=~]
556−
557−++ update |= [=msg m=model]
558− ?- msg
559− [%typed t]
560− ?- (gth (lent (tuba (trip t))) 80)
561− %.y [m(draft=t error=`"Too long") ~]
562− %.n [m(draft=t error=~) ~]
563− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
564− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
565− [%got ts] [m(todos=ts) ~]
566− [%acked err] [m(error=err) ~]
567−
568−++ subs |=(m ~)
569−
570−++ view |= m=model
571− column ~[gap+%s2] ~[
572− heading 2 "Todos"
573− each (turn todos.m row-of)
574− row ~[gap+%s1] ~[
575− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
576− button "Add" %submit
577− el ~[tone+%danger] (text (fall error.m ""))
578−
579−++ row-of |= t=item.todo
580− [id.t (toggle done.t text.t [%toggled id.t])]
581−#### /ui/todo-list/jibb sixth-msg
582−/= todo /ui/api/todo
583−
584−++ main (program init update view subs)
585−
586−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
587−+$ msg
588− [%typed text=@t]
589− %submit
590− [%toggled id=@ud]
591− [%got todos=(list item.todo)]
592− [%acked err=(unit @t)]
593− %clear
594−
595−++ init |= ts=(list item.todo)
596− [todos=ts draft="" error=~]
597−
598−++ update |= [=msg m=model]
599− ?- msg
600− [%typed t]
601− ?- (gth (lent (tuba (trip t))) 80)
602− %.y [m(draft=t error=`"Too long") ~]
603− %.n [m(draft=t error=~) ~]
604− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
605− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
606− [%got ts] [m(todos=ts) ~]
607− [%acked err] [m(error=err) ~]
608− %clear [m(todos=~) ~]
609−
610−++ subs |= m=model
611− ~[[%watch (todos.todo |=%got)]]
612−
613−++ view |= m=model
614− column ~[gap+%s2] ~[
615− heading 2 "Todos"
616− each (turn todos.m row-of)
617− row ~[gap+%s1] ~[
618− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
619− button "Add" %submit
620− el ~[tone+%danger] (text (fall error.m ""))
621−
622−++ row-of |= t=item.todo
623− [id.t (toggle done.t text.t [%toggled id.t])]
624−#### /ui/todo-list/jibb sixth-msg-button
625−/= todo /ui/api/todo
626−
627−++ main (program init update view subs)
628−
629−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
630−+$ msg
631− [%typed text=@t]
632− %submit
633− [%toggled id=@ud]
634− [%got todos=(list item.todo)]
635− [%acked err=(unit @t)]
636− %clear
637−
638−++ init |= ts=(list item.todo)
639− [todos=ts draft="" error=~]
640−
641−++ update |= [=msg m=model]
642− ?- msg
643− [%typed t]
644− ?- (gth (lent (tuba (trip t))) 80)
645− %.y [m(draft=t error=`"Too long") ~]
646− %.n [m(draft=t error=~) ~]
647− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
648− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
649− [%got ts] [m(todos=ts) ~]
650− [%acked err] [m(error=err) ~]
651− %clear [m(todos=~) ~]
652−
653−++ subs |= m=model
654− ~[[%watch (todos.todo |=%got)]]
655−
656−++ view |= m=model
657− column ~[gap+%s2] ~[
658− heading 2 "Todos"
659− each (turn todos.m row-of)
660− row ~[gap+%s1] ~[
661− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
662− button "Add" %submit
663− button "Clear" %clear
664− el ~[tone+%danger] (text (fall error.m ""))
665−
666−++ row-of |= t=item.todo
667− [id.t (toggle done.t text.t [%toggled id.t])]
668−#### /ui/todo-list/jibb view-helper-title
669−/= todo /ui/api/todo
670−
671−++ main (program init update view subs)
672−
673−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
674−+$ msg
675− [%typed text=@t]
676− %submit
677− [%toggled id=@ud]
678− [%got todos=(list item.todo)]
679− [%acked err=(unit @t)]
680−
681−++ init |= ts=(list item.todo)
682− [todos=ts draft="" error=~]
683−
684−++ update |= [=msg m=model]
685− ?- msg
686− [%typed t]
687− ?- (gth (lent (tuba (trip t))) 80)
688− %.y [m(draft=t error=`"Too long") ~]
689− %.n [m(draft=t error=~) ~]
690− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
691− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
692− [%got ts] [m(todos=ts) ~]
693− [%acked err] [m(error=err) ~]
694−
695−++ subs |= m=model
696− ~[[%watch (todos.todo |=%got)]]
697−
698−++ view |= m=model
699− column ~[gap+%s2] ~[
700− (title "Todos")
701− each (turn todos.m row-of)
702− row ~[gap+%s1] ~[
703− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
704− button "Add" %submit
705− el ~[tone+%danger] (text (fall error.m ""))
706−
707−++ row-of |= t=item.todo
708− [id.t (toggle done.t text.t [%toggled id.t])]
709−
710−++ title |= words=@t
711− heading 2 words
712−#### /ui/todo-list/jibb view-helper-error
713−/= todo /ui/api/todo
714−
715−++ main (program init update view subs)
716−
717−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
718−+$ msg
719− [%typed text=@t]
720− %submit
721− [%toggled id=@ud]
722− [%got todos=(list item.todo)]
723− [%acked err=(unit @t)]
724−
725−++ init |= ts=(list item.todo)
726− [todos=ts draft="" error=~]
727−
728−++ update |= [=msg m=model]
729− ?- msg
730− [%typed t]
731− ?- (gth (lent (tuba (trip t))) 80)
732− %.y [m(draft=t error=`"Too long") ~]
733− %.n [m(draft=t error=~) ~]
734− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
735− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
736− [%got ts] [m(todos=ts) ~]
737− [%acked err] [m(error=err) ~]
738−
739−++ subs |= m=model
740− ~[[%watch (todos.todo |=%got)]]
741−
742−++ view |= m=model
743− column ~[gap+%s2] ~[
744− heading 2 "Todos"
745− each (turn todos.m row-of)
746− row ~[gap+%s1] ~[
747− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
748− button "Add" %submit
749− (error-line m)
750−
751−++ row-of |= t=item.todo
752− [id.t (toggle done.t text.t [%toggled id.t])]
753−
754−++ error-line |= m=model
755− el ~[tone+%danger] (text (fall error.m ""))
756−#### /ui/todo-list/jibb inline-row-of
757−/= todo /ui/api/todo
758−
759−++ main (program init update view subs)
760−
761−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
762−+$ msg
763− [%typed text=@t]
764− %submit
765− [%toggled id=@ud]
766− [%got todos=(list item.todo)]
767− [%acked err=(unit @t)]
768−
769−++ init |= ts=(list item.todo)
770− [todos=ts draft="" error=~]
771−
772−++ update |= [=msg m=model]
773− ?- msg
774− [%typed t]
775− ?- (gth (lent (tuba (trip t))) 80)
776− %.y [m(draft=t error=`"Too long") ~]
777− %.n [m(draft=t error=~) ~]
778− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
779− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
780− [%got ts] [m(todos=ts) ~]
781− [%acked err] [m(error=err) ~]
782−
783−++ subs |= m=model
784− ~[[%watch (todos.todo |=%got)]]
785−
786−++ view |= m=model
787− column ~[gap+%s2] ~[
788− heading 2 "Todos"
789− each (turn todos.m |=(t=item.todo [id.t (toggle done.t text.t [%toggled id.t])]))
790− row ~[gap+%s1] ~[
791− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
792− button "Add" %submit
793− el ~[tone+%danger] (text (fall error.m ""))
794−#### /ui/todo-list/jibb view-local-rows
795−/= todo /ui/api/todo
796−
797−++ main (program init update view subs)
798−
799−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
800−+$ msg
801− [%typed text=@t]
802− %submit
803− [%toggled id=@ud]
804− [%got todos=(list item.todo)]
805− [%acked err=(unit @t)]
806−
807−++ init |= ts=(list item.todo)
808− [todos=ts draft="" error=~]
809−
810−++ update |= [=msg m=model]
811− ?- msg
812− [%typed t]
813− ?- (gth (lent (tuba (trip t))) 80)
814− %.y [m(draft=t error=`"Too long") ~]
815− %.n [m(draft=t error=~) ~]
816− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
817− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
818− [%got ts] [m(todos=ts) ~]
819− [%acked err] [m(error=err) ~]
820−
821−++ subs |= m=model
822− ~[[%watch (todos.todo |=%got)]]
823−
824−++ view |= m=model
825− ++ rows (turn todos.m row-of)
826− column ~[gap+%s2] ~[
827− heading 2 "Todos"
828− each rows
829− row ~[gap+%s1] ~[
830− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
831− button "Add" %submit
832− el ~[tone+%danger] (text (fall error.m ""))
833−
834−++ row-of |= t=item.todo
835− [id.t (toggle done.t text.t [%toggled id.t])]
836−#### /ui/todo-list/jibb drop-each
837−/= todo /ui/api/todo
838−
839−++ main (program init update view subs)
840−
841−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
842−+$ msg
843− [%typed text=@t]
844− %submit
845− [%toggled id=@ud]
846− [%got todos=(list item.todo)]
847− [%acked err=(unit @t)]
848−
849−++ init |= ts=(list item.todo)
850− [todos=ts draft="" error=~]
851−
852−++ update |= [=msg m=model]
853− ?- msg
854− [%typed t]
855− ?- (gth (lent (tuba (trip t))) 80)
856− %.y [m(draft=t error=`"Too long") ~]
857− %.n [m(draft=t error=~) ~]
858− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
859− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
860− [%got ts] [m(todos=ts) ~]
861− [%acked err] [m(error=err) ~]
862−
863−++ subs |= m=model
864− ~[[%watch (todos.todo |=%got)]]
865−
866−++ view |= m=model
867− column ~[gap+%s2] ~[
868− heading 2 "Todos"
869− row ~[gap+%s1] ~[
870− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
871− button "Add" %submit
872− el ~[tone+%danger] (text (fall error.m ""))
873−
874−++ row-of |= t=item.todo
875− [id.t (toggle done.t text.t [%toggled id.t])]
876−#### /ui/todo-list/jibb update-helper-cmd
877−/= todo /ui/api/todo
878−
879−++ main (program init update view subs)
880−
881−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
882−+$ msg
883− [%typed text=@t]
884− %submit
885− [%toggled id=@ud]
886− [%got todos=(list item.todo)]
887− [%acked err=(unit @t)]
888−
889−++ init |= ts=(list item.todo)
890− [todos=ts draft="" error=~]
891−
892−++ update |= [=msg m=model]
893− ?- msg
894− [%typed t]
895− ?- (gth (lent (tuba (trip t))) 80)
896− %.y [m(draft=t error=`"Too long") ~]
897− %.n [m(draft=t error=~) ~]
898− %submit [m(draft="") ~[(add-cmd draft.m)]]
899− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
900− [%got ts] [m(todos=ts) ~]
901− [%acked err] [m(error=err) ~]
902−
903−++ subs |= m=model
904− ~[[%watch (todos.todo |=%got)]]
905−
906−++ view |= m=model
907− column ~[gap+%s2] ~[
908− heading 2 "Todos"
909− each (turn todos.m row-of)
910− row ~[gap+%s1] ~[
911− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
912− button "Add" %submit
913− el ~[tone+%danger] (text (fall error.m ""))
914−
915−++ row-of |= t=item.todo
916− [id.t (toggle done.t text.t [%toggled id.t])]
917−
918−++ add-cmd |= d=@t
919− (poke.todo [%add d] |=%acked)
docs/reviews/2026-11-03-milestone-2-probes/variants/p2.outdeleted−185
@@ -1,185 +0,0 @@
1−#### /ui/todo-list/jibb control
2−CHECKED
3−+$ model: [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]
4−+$ msg: msg
5−++ main: [init=$-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]) [update=$-([msg [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))]) [view=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg)) subs=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))]]]
6−++ init: $-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]])
7−++ view: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg))
8−++ row-of: $-([id=@ud [done=? text=@t]] [key=@ud el=(element msg)])
9−++ subs: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))
10−++ update: $-([msg=msg m=[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))])
11−#### /ui/todo-list/jibb reorder
12−CHECKED
13−+$ model: [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]
14−+$ msg: msg
15−++ main: [init=$-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]) [update=$-([msg [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))]) [view=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg)) subs=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))]]]
16−++ init: $-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]])
17−++ view: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg))
18−++ row-of: $-([id=@ud [done=? text=@t]] [key=@ud el=(element msg)])
19−++ subs: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))
20−++ update: $-([msg=msg m=[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))])
21−#### /ui/todo-list/jibb rename-view-sample
22−CHECKED
23−+$ model: [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]
24−+$ msg: msg
25−++ main: [init=$-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]) [update=$-([msg [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))]) [view=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg)) subs=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))]]]
26−++ init: $-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]])
27−++ view: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg))
28−++ row-of: $-([id=@ud [done=? text=@t]] [key=@ud el=(element msg)])
29−++ subs: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))
30−++ update: $-([msg=msg m=[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))])
31−#### /ui/todo-list/jibb rename-row-sample
32−CHECKED
33−+$ model: [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]
34−+$ msg: msg
35−++ main: [init=$-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]) [update=$-([msg [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))]) [view=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg)) subs=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))]]]
36−++ init: $-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]])
37−++ view: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg))
38−++ row-of: $-([id=@ud [done=? text=@t]] [key=@ud el=(element msg)])
39−++ subs: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))
40−++ update: $-([msg=msg m=[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))])
41−#### /ui/todo-list/jibb rename-init-sample
42−CHECKED
43−+$ model: [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]
44−+$ msg: msg
45−++ main: [init=$-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]) [update=$-([msg [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))]) [view=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg)) subs=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))]]]
46−++ init: $-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]])
47−++ view: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg))
48−++ row-of: $-([id=@ud [done=? text=@t]] [key=@ud el=(element msg)])
49−++ subs: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))
50−++ update: $-([msg=msg m=[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))])
51−#### /ui/todo-list/jibb rename-subs-sample
52−CHECKED
53−+$ model: [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]
54−+$ msg: msg
55−++ main: [init=$-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]) [update=$-([msg [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))]) [view=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg)) subs=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))]]]
56−++ init: $-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]])
57−++ view: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg))
58−++ row-of: $-([id=@ud [done=? text=@t]] [key=@ud el=(element msg)])
59−++ subs: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))
60−++ update: $-([msg=msg m=[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))])
61−#### /ui/todo-list/jibb unused-helper
62−CHECKED
63−+$ model: [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]
64−+$ msg: msg
65−++ main: [init=$-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]) [update=$-([msg [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))]) [view=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg)) subs=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))]]]
66−++ init: $-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]])
67−++ view: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg))
68−++ row-of: $-([id=@ud [done=? text=@t]] [key=@ud el=(element msg)])
69−++ subs: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))
70−++ update: $-([msg=msg m=[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))])
71−++ count: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] @ud)
72−#### /ui/todo-list/jibb unused-helper-mold
73−CHECKED
74−+$ model: [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]
75−+$ msg: msg
76−+$ flag: ?
77−++ main: [init=$-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]) [update=$-([msg [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))]) [view=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg)) subs=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))]]]
78−++ init: $-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]])
79−++ view: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg))
80−++ row-of: $-([id=@ud [done=? text=@t]] [key=@ud el=(element msg)])
81−++ subs: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))
82−++ update: $-([msg=msg m=[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))])
83−#### /ui/todo-list/jibb swap-model-fields
84−CHECKED
85−+$ model: [draft=@t [todos=(list [id=@ud [done=? text=@t]]) error=(unit @t)]]
86−+$ msg: msg
87−++ main: [init=$-((list [id=@ud [done=? text=@t]]) [draft=@t [todos=(list [id=@ud [done=? text=@t]]) error=(unit @t)]]) [update=$-([msg [draft=@t [todos=(list [id=@ud [done=? text=@t]]) error=(unit @t)]]] [[draft=@t [todos=(list [id=@ud [done=? text=@t]]) error=(unit @t)]] (list (cmd msg))]) [view=$-([draft=@t [todos=(list [id=@ud [done=? text=@t]]) error=(unit @t)]] (element msg)) subs=$-([draft=@t [todos=(list [id=@ud [done=? text=@t]]) error=(unit @t)]] (list (sub msg)))]]]
88−++ init: $-((list [id=@ud [done=? text=@t]]) [draft=@t [todos=(list [id=@ud [done=? text=@t]]) error=(unit @t)]])
89−++ view: $-([draft=@t [todos=(list [id=@ud [done=? text=@t]]) error=(unit @t)]] (element msg))
90−++ row-of: $-([id=@ud [done=? text=@t]] [key=@ud el=(element msg)])
91−++ subs: $-([draft=@t [todos=(list [id=@ud [done=? text=@t]]) error=(unit @t)]] (list (sub msg)))
92−++ update: $-([msg=msg m=[draft=@t [todos=(list [id=@ud [done=? text=@t]]) error=(unit @t)]]] [[draft=@t [todos=(list [id=@ud [done=? text=@t]]) error=(unit @t)]] (list (cmd msg))])
93−#### /ui/todo-list/jibb init-cast-body
94−CHECKED
95−+$ model: [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]
96−+$ msg: msg
97−++ main: [init=$-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]) [update=$-([msg [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))]) [view=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg)) subs=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))]]]
98−++ view: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg))
99−++ row-of: $-([id=@ud [done=? text=@t]] [key=@ud el=(element msg)])
100−++ subs: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))
101−++ update: $-([msg=msg m=[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))])
102−++ init: $-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]])
103−#### /ui/todo-list/jibb init-positional
104−CHECKED
105−+$ model: [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]
106−+$ msg: msg
107−++ main: [init=$-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]) [update=$-([msg [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))]) [view=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg)) subs=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))]]]
108−++ init: $-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]])
109−++ view: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg))
110−++ row-of: $-([id=@ud [done=? text=@t]] [key=@ud el=(element msg)])
111−++ subs: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))
112−++ update: $-([msg=msg m=[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))])
113−#### /ui/todo-list/jibb second-sub-every
114−REJECTED: module kind needs unsupported inference: /ui/todo-list/jibb
115−#### /ui/todo-list/jibb second-sub-watch
116−REJECTED: /ui/todo-list.jibb:14:28: nothing fixes the union of ~
117− [todos=ts draft="" error=~]
118− ^
119−#### /ui/todo-list/jibb subs-none
120−REJECTED: /ui/todo-list.jibb:14:28: nothing fixes the union of ~
121− [todos=ts draft="" error=~]
122− ^
123−#### /ui/todo-list/jibb sixth-msg
124−CHECKED
125−+$ model: [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]
126−+$ msg: msg
127−++ main: [init=$-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]) [update=$-([msg [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))]) [view=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg)) subs=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))]]]
128−++ init: $-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]])
129−++ view: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg))
130−++ row-of: $-([id=@ud [done=? text=@t]] [key=@ud el=(element msg)])
131−++ subs: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))
132−++ update: $-([msg=msg m=[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))])
133−#### /ui/todo-list/jibb sixth-msg-button
134−CHECKED
135−+$ model: [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]
136−+$ msg: msg
137−++ main: [init=$-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]) [update=$-([msg [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))]) [view=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg)) subs=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))]]]
138−++ init: $-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]])
139−++ view: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg))
140−++ row-of: $-([id=@ud [done=? text=@t]] [key=@ud el=(element msg)])
141−++ subs: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))
142−++ update: $-([msg=msg m=[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))])
143−#### /ui/todo-list/jibb view-helper-title
144−CHECKED
145−+$ model: [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]
146−+$ msg: msg
147−++ main: [init=$-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]) [update=$-([msg [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))]) [view=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg)) subs=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))]]]
148−++ init: $-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]])
149−++ view: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg))
150−++ row-of: $-([id=@ud [done=? text=@t]] [key=@ud el=(element msg)])
151−++ subs: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))
152−++ update: $-([msg=msg m=[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))])
153−++ title: $-(@t (element A))
154−#### /ui/todo-list/jibb view-helper-error
155−CHECKED
156−+$ model: [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]
157−+$ msg: msg
158−++ main: [init=$-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]) [update=$-([msg [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))]) [view=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg)) subs=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))]]]
159−++ init: $-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]])
160−++ view: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg))
161−++ row-of: $-([id=@ud [done=? text=@t]] [key=@ud el=(element msg)])
162−++ subs: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))
163−++ update: $-([msg=msg m=[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))])
164−++ error-line: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element A))
165−#### /ui/todo-list/jibb inline-row-of
166−REJECTED: /ui/todo-list.jibb:14:28: nothing fixes the union of ~
167− [todos=ts draft="" error=~]
168− ^
169−#### /ui/todo-list/jibb view-local-rows
170−REJECTED: /ui/todo-list.jibb:14:28: nothing fixes the union of ~
171− [todos=ts draft="" error=~]
172− ^
173−#### /ui/todo-list/jibb drop-each
174−REJECTED: /ui/todo-list.jibb:39:32: nothing fixes the union of %toggled
175− [id.t (toggle done.t text.t [%toggled id.t])]
176− ^
177−#### /ui/todo-list/jibb update-helper-cmd
178−REJECTED: /ui/todo-list.jibb:14:28: nothing fixes the union of ~
179− [todos=ts draft="" error=~]
180− ^
181−
182−
183−real 1m14.273s
184−user 1m13.404s
185−sys 0m0.129s
docs/reviews/2026-11-03-milestone-2-probes/variants/p3.jibbdeleted−712
@@ -1,712 +0,0 @@
1−#### /ui/stores/cart/jibb cart-reorder
2−+$ poke
3− [%add item=@t]
4− %toggle
5−++ update |= [a=poke s=state]
6− ?- a
7− [%add item] s(items=[item items.s])
8− %toggle s(open=(not open.s))
9−++ init ^- state [items=~ open=%.n]
10−++ main (store init update)
11−+$ state [items=(list @t) open=?]
12−#### /ui/stores/cart/jibb cart-init-uncast
13−:: /ui/stores/cart.jibb
14−+$ state [items=(list @t) open=?]
15−+$ poke
16− [%add item=@t]
17− %toggle
18−
19−++ main (store init update)
20−++ init [items=~ open=%.n]
21−++ update |= [a=poke s=state]
22− ?- a
23− [%add item] s(items=[item items.s])
24− %toggle s(open=(not open.s))
25−#### /ui/stores/cart/jibb cart-rename
26−:: /ui/stores/cart.jibb
27−+$ state [items=(list @t) open=?]
28−+$ poke
29− [%add item=@t]
30− %toggle
31−
32−++ main (store init update)
33−++ init ^- state [items=~ open=%.n]
34−++ update |= [p=poke st=state]
35− ?- p
36− [%add item] st(items=[item items.st])
37− %toggle st(open=(not open.st))
38−#### /ui/stores/cart/jibb cart-third-case
39−:: /ui/stores/cart.jibb
40−+$ state [items=(list @t) open=?]
41−+$ poke
42− [%add item=@t]
43− %toggle
44− %clear
45−
46−++ main (store init update)
47−++ init ^- state [items=~ open=%.n]
48−++ update |= [a=poke s=state]
49− ?- a
50− [%add item] s(items=[item items.s])
51− %toggle s(open=(not open.s))
52− %clear s(items=~)
53−#### /ui/stores/cart/jibb cart-unused-helper
54−:: /ui/stores/cart.jibb
55−+$ state [items=(list @t) open=?]
56−+$ poke
57− [%add item=@t]
58− %toggle
59−
60−++ main (store init update)
61−++ init ^- state [items=~ open=%.n]
62−++ update |= [a=poke s=state]
63− ?- a
64− [%add item] s(items=[item items.s])
65− %toggle s(open=(not open.s))
66−++ size |= s=state
67− (lent items.s)
68−#### /ui/stores/cart/jibb cart-swap-fields
69−:: /ui/stores/cart.jibb
70−+$ state [open=? items=(list @t)]
71−+$ poke
72− [%add item=@t]
73− %toggle
74−
75−++ main (store init update)
76−++ init ^- state [open=%.n items=~]
77−++ update |= [a=poke s=state]
78− ?- a
79− [%add item] s(items=[item items.s])
80− %toggle s(open=(not open.s))
81−#### /ui/stores/cart/jibb cart-update-helper
82−:: /ui/stores/cart.jibb
83−+$ state [items=(list @t) open=?]
84−+$ poke
85− [%add item=@t]
86− %toggle
87−
88−++ main (store init update)
89−++ init ^- state [items=~ open=%.n]
90−++ update |= [a=poke s=state]
91− ?- a
92− [%add item] s(items=[item items.s])
93− %toggle (flip s)
94−++ flip |= s=state
95− s(open=(not open.s))
96−#### /ui/basket/jibb basket-control
97−:: /ui/basket.jibb
98−/= cart /ui/stores/cart
99−
100−++ main (program init update view subs)
101−
102−+$ model [cart=state.cart note=@t]
103−+$ msg
104− [%noted text=@t]
105− %add
106− %toggle
107− [%got cart=state.cart]
108− [%acked err=(unit @t)]
109−
110−++ init |= ~
111− [cart=[items=~ open=%.n] note=""]
112−
113−++ update |= [=msg m=model]
114− ?- msg
115− [%noted t] [m(note=t) ~]
116− %add [m(note="") ~[(poke.cart [%add note.m] |=%acked)]]
117− %toggle [m ~[(poke.cart %toggle |=%acked)]]
118− [%got c] [m(cart=c) ~]
119− [%acked err] [m ~]
120−
121−++ subs |= m=model
122− ~[[%watch (state.cart |=%got)]]
123−
124−++ view |= m=model
125− column ~[gap+%s1] ~[
126− (text "{(lent items.cart.m)} items")
127− field "Item" note.m |=%noted
128− button "Add" %add
129−#### /ui/basket/jibb basket-init-cast
130−:: /ui/basket.jibb
131−/= cart /ui/stores/cart
132−
133−++ main (program init update view subs)
134−
135−+$ model [cart=state.cart note=@t]
136−+$ msg
137− [%noted text=@t]
138− %add
139− %toggle
140− [%got cart=state.cart]
141− [%acked err=(unit @t)]
142−
143−++ init |= ~
144− ^- model [[~ %.n] ""]
145−
146−++ update |= [=msg m=model]
147− ?- msg
148− [%noted t] [m(note=t) ~]
149− %add [m(note="") ~[(poke.cart [%add note.m] |=%acked)]]
150− %toggle [m ~[(poke.cart %toggle |=%acked)]]
151− [%got c] [m(cart=c) ~]
152− [%acked err] [m ~]
153−
154−++ subs |= m=model
155− ~[[%watch (state.cart |=%got)]]
156−
157−++ view |= m=model
158− column ~[gap+%s1] ~[
159− (text "{(lent items.cart.m)} items")
160− field "Item" note.m |=%noted
161− button "Add" %add
162−#### /ui/basket/jibb basket-rename-view
163−:: /ui/basket.jibb
164−/= cart /ui/stores/cart
165−
166−++ main (program init update view subs)
167−
168−+$ model [cart=state.cart note=@t]
169−+$ msg
170− [%noted text=@t]
171− %add
172− %toggle
173− [%got cart=state.cart]
174− [%acked err=(unit @t)]
175−
176−++ init |= ~
177− [cart=[items=~ open=%.n] note=""]
178−
179−++ update |= [=msg m=model]
180− ?- msg
181− [%noted t] [m(note=t) ~]
182− %add [m(note="") ~[(poke.cart [%add note.m] |=%acked)]]
183− %toggle [m ~[(poke.cart %toggle |=%acked)]]
184− [%got c] [m(cart=c) ~]
185− [%acked err] [m ~]
186−
187−++ subs |= m=model
188− ~[[%watch (state.cart |=%got)]]
189−
190−++ view |= mdl=model
191− column ~[gap+%s1] ~[
192− (text "{(lent items.cart.mdl)} items")
193− field "Item" note.mdl |=%noted
194− button "Add" %add
195−#### /ui/basket/jibb basket-sixth-msg
196−:: /ui/basket.jibb
197−/= cart /ui/stores/cart
198−
199−++ main (program init update view subs)
200−
201−+$ model [cart=state.cart note=@t]
202−+$ msg
203− [%noted text=@t]
204− %add
205− %toggle
206− [%got cart=state.cart]
207− [%acked err=(unit @t)]
208− %clear
209−
210−++ init |= ~
211− [cart=[items=~ open=%.n] note=""]
212−
213−++ update |= [=msg m=model]
214− ?- msg
215− [%noted t] [m(note=t) ~]
216− %add [m(note="") ~[(poke.cart [%add note.m] |=%acked)]]
217− %toggle [m ~[(poke.cart %toggle |=%acked)]]
218− [%got c] [m(cart=c) ~]
219− [%acked err] [m ~]
220− %clear [m(note="") ~]
221−
222−++ subs |= m=model
223− ~[[%watch (state.cart |=%got)]]
224−
225−++ view |= m=model
226− column ~[gap+%s1] ~[
227− (text "{(lent items.cart.m)} items")
228− field "Item" note.m |=%noted
229− button "Add" %add
230− button "Clear" %clear
231−#### /ui/basket/jibb basket-second-sub
232−:: /ui/basket.jibb
233−/= cart /ui/stores/cart
234−
235−++ main (program init update view subs)
236−
237−+$ model [cart=state.cart note=@t]
238−+$ msg
239− [%noted text=@t]
240− %add
241− %toggle
242− [%got cart=state.cart]
243− [%acked err=(unit @t)]
244− [%tick at=@da]
245−
246−++ init |= ~
247− [cart=[items=~ open=%.n] note=""]
248−
249−++ update |= [=msg m=model]
250− ?- msg
251− [%noted t] [m(note=t) ~]
252− %add [m(note="") ~[(poke.cart [%add note.m] |=%acked)]]
253− %toggle [m ~[(poke.cart %toggle |=%acked)]]
254− [%got c] [m(cart=c) ~]
255− [%acked err] [m ~]
256− [%tick at] [m ~]
257−
258−++ subs |= m=model
259− ~[[%watch (state.cart |=%got)] [%every ~s30 |=%tick]]
260−
261−++ view |= m=model
262− column ~[gap+%s1] ~[
263− (text "{(lent items.cart.m)} items")
264− field "Item" note.m |=%noted
265− button "Add" %add
266−#### /ui/basket/jibb basket-view-helper
267−:: /ui/basket.jibb
268−/= cart /ui/stores/cart
269−
270−++ main (program init update view subs)
271−
272−+$ model [cart=state.cart note=@t]
273−+$ msg
274− [%noted text=@t]
275− %add
276− %toggle
277− [%got cart=state.cart]
278− [%acked err=(unit @t)]
279−
280−++ init |= ~
281− [cart=[items=~ open=%.n] note=""]
282−
283−++ update |= [=msg m=model]
284− ?- msg
285− [%noted t] [m(note=t) ~]
286− %add [m(note="") ~[(poke.cart [%add note.m] |=%acked)]]
287− %toggle [m ~[(poke.cart %toggle |=%acked)]]
288− [%got c] [m(cart=c) ~]
289− [%acked err] [m ~]
290−
291−++ subs |= m=model
292− ~[[%watch (state.cart |=%got)]]
293−
294−++ view |= m=model
295− column ~[gap+%s1] ~[
296− (count-line m)
297− field "Item" note.m |=%noted
298− button "Add" %add
299−
300−++ count-line |= m=model
301− text "{(lent items.cart.m)} items"
302−#### /ui/basket/jibb basket-swap-fields
303−:: /ui/basket.jibb
304−/= cart /ui/stores/cart
305−
306−++ main (program init update view subs)
307−
308−+$ model [note=@t cart=state.cart]
309−+$ msg
310− [%noted text=@t]
311− %add
312− %toggle
313− [%got cart=state.cart]
314− [%acked err=(unit @t)]
315−
316−++ init |= ~
317− [note="" cart=[items=~ open=%.n]]
318−
319−++ update |= [=msg m=model]
320− ?- msg
321− [%noted t] [m(note=t) ~]
322− %add [m(note="") ~[(poke.cart [%add note.m] |=%acked)]]
323− %toggle [m ~[(poke.cart %toggle |=%acked)]]
324− [%got c] [m(cart=c) ~]
325− [%acked err] [m ~]
326−
327−++ subs |= m=model
328− ~[[%watch (state.cart |=%got)]]
329−
330−++ view |= m=model
331− column ~[gap+%s1] ~[
332− (text "{(lent items.cart.m)} items")
333− field "Item" note.m |=%noted
334− button "Add" %add
335−#### /ui/basket/jibb basket-unused-helper
336−:: /ui/basket.jibb
337−/= cart /ui/stores/cart
338−
339−++ main (program init update view subs)
340−
341−+$ model [cart=state.cart note=@t]
342−+$ msg
343− [%noted text=@t]
344− %add
345− %toggle
346− [%got cart=state.cart]
347− [%acked err=(unit @t)]
348−
349−++ init |= ~
350− [cart=[items=~ open=%.n] note=""]
351−
352−++ update |= [=msg m=model]
353− ?- msg
354− [%noted t] [m(note=t) ~]
355− %add [m(note="") ~[(poke.cart [%add note.m] |=%acked)]]
356− %toggle [m ~[(poke.cart %toggle |=%acked)]]
357− [%got c] [m(cart=c) ~]
358− [%acked err] [m ~]
359−
360−++ subs |= m=model
361− ~[[%watch (state.cart |=%got)]]
362−
363−++ view |= m=model
364− column ~[gap+%s1] ~[
365− (text "{(lent items.cart.m)} items")
366− field "Item" note.m |=%noted
367− button "Add" %add
368−
369−++ empty |= m=model
370− (eq items.cart.m ~)
371−#### /ui/index/jibb index-reorder
372−/= todo /ui/api/todo
373−/= todo-list /ui/todo-list
374−
375−++ view |= ts=(list item.todo)
376− column ~[pad+%s3] ~[
377− heading 1 "My ship"
378− island main.todo-list ts
379−
380−++ load |=(~ (todos.todo same))
381−++ main (page load view)
382−#### /ui/index/jibb index-rename
383−/= todo /ui/api/todo
384−/= todo-list /ui/todo-list
385−
386−++ main (page load view)
387−++ load |=(~ (todos.todo same))
388−
389−++ view |= items=(list item.todo)
390− column ~[pad+%s3] ~[
391− heading 1 "My ship"
392− island main.todo-list items
393−#### /ui/index/jibb index-tall-load
394−/= todo /ui/api/todo
395−/= todo-list /ui/todo-list
396−
397−++ main (page load view)
398−++ load |= ~
399− (todos.todo same)
400−
401−++ view |= ts=(list item.todo)
402− column ~[pad+%s3] ~[
403− heading 1 "My ship"
404− island main.todo-list ts
405−#### /ui/index/jibb index-cast-load
406−/= todo /ui/api/todo
407−/= todo-list /ui/todo-list
408−
409−++ main (page load view)
410−++ load |= ~
411− ^- (ask (list item.todo)) (todos.todo same)
412−
413−++ view |= ts=(list item.todo)
414− column ~[pad+%s3] ~[
415− heading 1 "My ship"
416− island main.todo-list ts
417−#### /ui/index/jibb index-view-helper
418−/= todo /ui/api/todo
419−/= todo-list /ui/todo-list
420−
421−++ main (page load view)
422−++ load |=(~ (todos.todo same))
423−
424−++ view |= ts=(list item.todo)
425− column ~[pad+%s3] ~[
426− (title "My ship")
427− island main.todo-list ts
428−
429−++ title |= words=@t
430− heading 1 words
431−#### /ui/index/jibb index-unused-helper
432−/= todo /ui/api/todo
433−/= todo-list /ui/todo-list
434−
435−++ main (page load view)
436−++ load |=(~ (todos.todo same))
437−
438−++ view |= ts=(list item.todo)
439− column ~[pad+%s3] ~[
440− heading 1 "My ship"
441− island main.todo-list ts
442−
443−++ count |= ts=(list item.todo)
444− (lent ts)
445−#### /ui/index/jibb index-pure-load
446−/= todo /ui/api/todo
447−/= todo-list /ui/todo-list
448−
449−++ main (page load view)
450−++ load |=(~ (pure ~))
451−
452−++ view |= ts=(list item.todo)
453− column ~[pad+%s3] ~[
454− heading 1 "My ship"
455− island main.todo-list ts
456−#### /ui/index/jibb index-mapped-reply
457−/= todo /ui/api/todo
458−
459−++ main (page load view)
460−++ load |=(~ (todos.todo lent))
461−
462−++ view |= n=@ud
463− text "{n} todos"
464−#### /ui/index/jibb index-typed-load
465−/= todo /ui/api/todo
466−
467−++ main (page load view)
468−++ load |=(~ (todo-by-id.todo 1 same))
469−
470−++ view |= t=item.todo
471− text text.t
472−#### /ui/about/jibb about-reorder
473−++ view
474− column ~[width+[%fill 1] pad+%s3 gap+%s2] ~[
475− heading 1 "About this ship"
476− para ~[(text "Hosted on Urbit. This page ships no JavaScript.")]
477− el ~[tone+%accent] (link %/blog "Read the blog")
478−
479−++ main view
480−#### /ui/about/jibb about-inline
481−++ main
482− column ~[width+[%fill 1] pad+%s3 gap+%s2] ~[
483− heading 1 "About this ship"
484− para ~[(text "Hosted on Urbit. This page ships no JavaScript.")]
485− el ~[tone+%accent] (link %/blog "Read the blog")
486−#### /ui/about/jibb about-helper
487−++ main view
488−
489−++ view
490− column ~[width+[%fill 1] pad+%s3 gap+%s2] ~[
491− heading 1 "About this ship"
492− intro
493− el ~[tone+%accent] (link %/blog "Read the blog")
494−
495−++ intro
496− para ~[(text "Hosted on Urbit. This page ships no JavaScript.")]
497−#### /ui/about/jibb about-rename
498−++ main body
499−
500−++ body
501− column ~[width+[%fill 1] pad+%s3 gap+%s2] ~[
502− heading 1 "About this ship"
503− para ~[(text "Hosted on Urbit. This page ships no JavaScript.")]
504− el ~[tone+%accent] (link %/blog "Read the blog")
505−#### /ui/blog/index/jibb blog-reorder
506−/- blog
507−/= api /ui/api/blog
508−/= card /ui/components/card
509−
510−++ view |= ps=(list post.blog)
511− column ~[gap+%s2] (turn ps card.card)
512−
513−++ load |=(~ (posts.api same))
514−++ main (page load view)
515−#### /ui/blog/index/jibb blog-rename
516−/- blog
517−/= api /ui/api/blog
518−/= card /ui/components/card
519−
520−++ main (page load view)
521−++ load |=(~ (posts.api same))
522−
523−++ view |= items=(list post.blog)
524− column ~[gap+%s2] (turn items card.card)
525−#### /ui/blog/index/jibb blog-inline-card
526−/- blog
527−/= api /ui/api/blog
528−/= card /ui/components/card
529−
530−++ main (page load view)
531−++ load |=(~ (posts.api same))
532−
533−++ view |= ps=(list post.blog)
534− column ~[gap+%s2] (turn ps |=(p=post.blog (text title.p)))
535−#### /ui/blog/index/jibb blog-inline-card-bare
536−/- blog
537−/= api /ui/api/blog
538−/= card /ui/components/card
539−
540−++ main (page load view)
541−++ load |=(~ (posts.api same))
542−
543−++ view |= ps=(list post.blog)
544− column ~[gap+%s2] (turn ps |=(p (text title.p)))
545−#### /ui/blog/index/jibb blog-local-helper
546−/- blog
547−/= api /ui/api/blog
548−/= card /ui/components/card
549−
550−++ main (page load view)
551−++ load |=(~ (posts.api same))
552−
553−++ view |= ps=(list post.blog)
554− column ~[gap+%s2] (turn ps show)
555−
556−++ show |= p=post.blog
557− (card.card p)
558−#### /ui/theme/jibb theme-no-font
559−++ theme ^- theme
560− [ space=[s1="4px" s2="8px" s3="16px"]
561− tones=[normal="#222" background="#fff" accent="#17734f" danger="#b3261e" muted="#5f5f5f"]
562− wide="60rem"
563− lang="en"
564− zone="UTC"
565− font=~
566− dark=`[tones=[normal="#eee" background="#111" accent="#4c9" danger="#f28b82" muted="#aaa"]]
567−#### /ui/theme/jibb theme-helper-value
568−++ theme ^- theme
569− [ space=[s1="4px" s2="8px" s3="16px"]
570− tones=[normal="#222" background="#fff" accent=accent danger="#b3261e" muted="#5f5f5f"]
571− wide="60rem"
572− lang="en"
573− zone="UTC"
574− font=`%/static/fonts/inter.woff2
575− dark=`[tones=[normal="#eee" background="#111" accent="#4c9" danger="#f28b82" muted="#aaa"]]
576−
577−++ accent "#17734f"
578−#### /ui/components/buttons/jibb buttons-reorder
579−++ wide ^- (list attr)
580− ~[width+[%fill 1] pad+%s2]
581−++ labelled |= [label=@t msg=M]
582− button label msg
583−++ add-button |= label=@t
584− button label %add
585−#### /ui/components/buttons/jibb buttons-fixed
586−+$ add-msg %add
587−++ add-button |= label=@t
588− ^- (element add-msg) (button label %add)
589−++ labelled |= [label=@t msg=M]
590− button label msg
591−++ wide ^- (list attr)
592− ~[width+[%fill 1] pad+%s2]
593−#### /ui/components/buttons/jibb buttons-labelled-use
594−++ labelled |= [label=@t msg=M]
595− button label msg
596−++ wide ^- (list attr)
597− ~[width+[%fill 1] pad+%s2]
598−+$ go-msg %go
599−++ go-button ^- (element go-msg) (labelled "Go" %go)
600−#### /ui/step/jibb step-reorder
601−++ describe |= s=step
602− ?- s
603− [%move %left n] "left {n}"
604− [%move %right n] "right {n}"
605− [t %draft] t
606− [t %sent sent-at] t
607− %stop "stop"
608−
609−+$ step
610− [%move %left n=@ud]
611− [%move %right n=@ud]
612− [text=@t %draft]
613− [text=@t %sent at=@da]
614− %stop
615−#### /ui/step/jibb step-arm-order
616−+$ step
617− [%move %left n=@ud]
618− [%move %right n=@ud]
619− [text=@t %draft]
620− [text=@t %sent at=@da]
621− %stop
622−
623−++ describe |= s=step
624− ?- s
625− [%move %right n] "right {n}"
626− [t %draft] t
627− [t %sent sent-at] t
628− %stop "stop"
629− [%move %left n] "left {n}"
630−#### /ui/step/jibb step-catch-all
631−+$ step
632− [%move %left n=@ud]
633− [%move %right n=@ud]
634− [text=@t %draft]
635− [text=@t %sent at=@da]
636− %stop
637−
638−++ describe |= s=step
639− ?- s
640− [%move %left n] "left {n}"
641− [%move %right n] "right {n}"
642− [t %draft] t
643− [t %sent sent-at] t
644− * "other"
645−#### /ui/step/jibb step-rename
646−+$ step
647− [%move %left n=@ud]
648− [%move %right n=@ud]
649− [text=@t %draft]
650− [text=@t %sent at=@da]
651− %stop
652−
653−++ describe |= x=step
654− ?- x
655− [%move %left n] "left {n}"
656− [%move %right n] "right {n}"
657− [t %draft] t
658− [t %sent sent-at] t
659− %stop "stop"
660−#### /ui/step/jibb step-sent-star
661−+$ step
662− [%move %left n=@ud]
663− [%move %right n=@ud]
664− [text=@t %draft]
665− [text=@t %sent at=@da]
666− %stop
667−
668−++ describe |= s=step
669− ?- s
670− [%move %left n] "left {n}"
671− [%move %right n] "right {n}"
672− [t %draft] t
673− [t %sent *] t
674− %stop "stop"
675−#### /ui/step/jibb step-stop-crash
676−+$ step
677− [%move %left n=@ud]
678− [%move %right n=@ud]
679− [text=@t %draft]
680− [text=@t %sent at=@da]
681− %stop
682−
683−++ describe |= s=step
684− ?- s
685− [%move %left n] "left {n}"
686− [%move %right n] "right {n}"
687− [t %draft] t
688− [t %sent sent-at] t
689− %stop !!
690−#### /ui/view-day/jibb viewday-swap
691−++ view |= [n=@ud day=@da]
692− column ~[gap+%s1] ~[
693− (text "Updated {day}") :: day printed as a date
694− (text "{n} items") :: n printed as @ud
695−#### /ui/view-day/jibb viewday-add
696−++ view |= [day=@da n=@ud]
697− column ~[gap+%s1] ~[
698− (text "Updated {day}") :: day printed as a date
699− (text "{n} items")
700− (text "{(add n 1)} next") :: n printed as @ud
701−#### /ui/view-day/jibb viewday-generic-sum
702−++ total
703− text "{(add 1 2)}"
704−#### /ui/imports/jibb imports-use
705−/- todo :: the molds from /sur/todo.hoon this module uses
706−/% %todo-action :: a mark's type, named todo-action
707−/= card /ui/components/card :: a Jibb module
708−
709−++ first |= i=item.todo
710− text.i
711−++ show card.card
712−++ act |= a=todo-action a
docs/reviews/2026-11-03-milestone-2-probes/variants/p3.outdeleted−262
@@ -1,262 +0,0 @@
1−#### /ui/stores/cart/jibb cart-reorder
2−CHECKED
3−+$ poke: poke
4−+$ state: [items=(list @t) open=?]
5−++ state: $-($-([items=(list @t) open=?] A) (ask A))
6−++ poke: $-([poke $-((unit @t) A)] (cmd A))
7−++ main: [init=[items=(list @t) open=?] update=*]
8−++ init: [items=(list @t) open=?]
9−++ update: $-([a=poke s=[items=(list @t) open=?]] [items=(list @t) open=?])
10−#### /ui/stores/cart/jibb cart-init-uncast
11−REJECTED: /ui/stores/cart.jibb:8:16: nothing fixes the union of ~
12−++ init [items=~ open=%.n]
13− ^
14−#### /ui/stores/cart/jibb cart-rename
15−CHECKED
16−+$ state: [items=(list @t) open=?]
17−+$ poke: poke
18−++ state: $-($-([items=(list @t) open=?] A) (ask A))
19−++ poke: $-([poke $-((unit @t) A)] (cmd A))
20−++ main: [init=[items=(list @t) open=?] update=*]
21−++ update: $-([p=poke st=[items=(list @t) open=?]] [items=(list @t) open=?])
22−++ init: [items=(list @t) open=?]
23−#### /ui/stores/cart/jibb cart-third-case
24−CHECKED
25−+$ state: [items=(list @t) open=?]
26−+$ poke: poke
27−++ state: $-($-([items=(list @t) open=?] A) (ask A))
28−++ poke: $-([poke $-((unit @t) A)] (cmd A))
29−++ main: [init=[items=(list @t) open=?] update=*]
30−++ update: $-([a=poke s=[items=(list @t) open=?]] [items=(list @t) open=?])
31−++ init: [items=(list @t) open=?]
32−#### /ui/stores/cart/jibb cart-unused-helper
33−CHECKED
34−+$ state: [items=(list @t) open=?]
35−+$ poke: poke
36−++ state: $-($-([items=(list @t) open=?] A) (ask A))
37−++ poke: $-([poke $-((unit @t) A)] (cmd A))
38−++ main: [init=[items=(list @t) open=?] update=*]
39−++ size: $-([items=(list @t) open=?] @ud)
40−++ update: $-([a=poke s=[items=(list @t) open=?]] [items=(list @t) open=?])
41−++ init: [items=(list @t) open=?]
42−#### /ui/stores/cart/jibb cart-swap-fields
43−CHECKED
44−+$ state: [open=? items=(list @t)]
45−+$ poke: poke
46−++ state: $-($-([open=? items=(list @t)] A) (ask A))
47−++ poke: $-([poke $-((unit @t) A)] (cmd A))
48−++ main: [init=[open=? items=(list @t)] update=*]
49−++ update: $-([a=poke s=[open=? items=(list @t)]] [open=? items=(list @t)])
50−++ init: [open=? items=(list @t)]
51−#### /ui/stores/cart/jibb cart-update-helper
52−CHECKED
53−+$ state: [items=(list @t) open=?]
54−+$ poke: poke
55−++ state: $-($-([items=(list @t) open=?] A) (ask A))
56−++ poke: $-([poke $-((unit @t) A)] (cmd A))
57−++ main: [init=[items=(list @t) open=?] update=*]
58−++ update: $-([a=poke s=[items=(list @t) open=?]] [items=(list @t) open=?])
59−++ flip: $-([items=(list @t) open=?] [items=(list @t) open=?])
60−++ init: [items=(list @t) open=?]
61−#### /ui/basket/jibb basket-control
62−CHECKED
63−+$ model: [cart=[items=(list @t) open=?] note=@t]
64−+$ msg: msg
65−++ main: [init=$-(~ [cart=[items=(list @t) open=?] note=@t]) [update=$-([msg [cart=[items=(list @t) open=?] note=@t]] [[cart=[items=(list @t) open=?] note=@t] (list (cmd msg))]) [view=$-([cart=[items=(list @t) open=?] note=@t] (element msg)) subs=$-([cart=[items=(list @t) open=?] note=@t] (list (sub msg)))]]]
66−++ init: $-(~ [cart=[items=(list @t) open=?] note=@t])
67−++ view: $-([cart=[items=(list @t) open=?] note=@t] (element msg))
68−++ subs: $-([cart=[items=(list @t) open=?] note=@t] (list (sub msg)))
69−++ update: $-([msg=msg m=[cart=[items=(list @t) open=?] note=@t]] [[cart=[items=(list @t) open=?] note=@t] (list (cmd msg))])
70−#### /ui/basket/jibb basket-init-cast
71−CHECKED
72−+$ model: [cart=[items=(list @t) open=?] note=@t]
73−+$ msg: msg
74−++ main: [init=$-(~ [cart=[items=(list @t) open=?] note=@t]) [update=$-([msg [cart=[items=(list @t) open=?] note=@t]] [[cart=[items=(list @t) open=?] note=@t] (list (cmd msg))]) [view=$-([cart=[items=(list @t) open=?] note=@t] (element msg)) subs=$-([cart=[items=(list @t) open=?] note=@t] (list (sub msg)))]]]
75−++ view: $-([cart=[items=(list @t) open=?] note=@t] (element msg))
76−++ subs: $-([cart=[items=(list @t) open=?] note=@t] (list (sub msg)))
77−++ update: $-([msg=msg m=[cart=[items=(list @t) open=?] note=@t]] [[cart=[items=(list @t) open=?] note=@t] (list (cmd msg))])
78−++ init: $-(~ [cart=[items=(list @t) open=?] note=@t])
79−#### /ui/basket/jibb basket-rename-view
80−CHECKED
81−+$ model: [cart=[items=(list @t) open=?] note=@t]
82−+$ msg: msg
83−++ main: [init=$-(~ [cart=[items=(list @t) open=?] note=@t]) [update=$-([msg [cart=[items=(list @t) open=?] note=@t]] [[cart=[items=(list @t) open=?] note=@t] (list (cmd msg))]) [view=$-([cart=[items=(list @t) open=?] note=@t] (element msg)) subs=$-([cart=[items=(list @t) open=?] note=@t] (list (sub msg)))]]]
84−++ init: $-(~ [cart=[items=(list @t) open=?] note=@t])
85−++ view: $-([cart=[items=(list @t) open=?] note=@t] (element msg))
86−++ subs: $-([cart=[items=(list @t) open=?] note=@t] (list (sub msg)))
87−++ update: $-([msg=msg m=[cart=[items=(list @t) open=?] note=@t]] [[cart=[items=(list @t) open=?] note=@t] (list (cmd msg))])
88−#### /ui/basket/jibb basket-sixth-msg
89−CHECKED
90−+$ model: [cart=[items=(list @t) open=?] note=@t]
91−+$ msg: msg
92−++ main: [init=$-(~ [cart=[items=(list @t) open=?] note=@t]) [update=$-([msg [cart=[items=(list @t) open=?] note=@t]] [[cart=[items=(list @t) open=?] note=@t] (list (cmd msg))]) [view=$-([cart=[items=(list @t) open=?] note=@t] (element msg)) subs=$-([cart=[items=(list @t) open=?] note=@t] (list (sub msg)))]]]
93−++ init: $-(~ [cart=[items=(list @t) open=?] note=@t])
94−++ view: $-([cart=[items=(list @t) open=?] note=@t] (element msg))
95−++ subs: $-([cart=[items=(list @t) open=?] note=@t] (list (sub msg)))
96−++ update: $-([msg=msg m=[cart=[items=(list @t) open=?] note=@t]] [[cart=[items=(list @t) open=?] note=@t] (list (cmd msg))])
97−#### /ui/basket/jibb basket-second-sub
98−REJECTED: module kind needs unsupported inference: /ui/basket/jibb
99−#### /ui/basket/jibb basket-view-helper
100−CHECKED
101−+$ model: [cart=[items=(list @t) open=?] note=@t]
102−+$ msg: msg
103−++ main: [init=$-(~ [cart=[items=(list @t) open=?] note=@t]) [update=$-([msg [cart=[items=(list @t) open=?] note=@t]] [[cart=[items=(list @t) open=?] note=@t] (list (cmd msg))]) [view=$-([cart=[items=(list @t) open=?] note=@t] (element msg)) subs=$-([cart=[items=(list @t) open=?] note=@t] (list (sub msg)))]]]
104−++ init: $-(~ [cart=[items=(list @t) open=?] note=@t])
105−++ view: $-([cart=[items=(list @t) open=?] note=@t] (element msg))
106−++ subs: $-([cart=[items=(list @t) open=?] note=@t] (list (sub msg)))
107−++ update: $-([msg=msg m=[cart=[items=(list @t) open=?] note=@t]] [[cart=[items=(list @t) open=?] note=@t] (list (cmd msg))])
108−++ count-line: $-([cart=[items=(list @t) open=?] note=@t] (element A))
109−#### /ui/basket/jibb basket-swap-fields
110−CHECKED
111−+$ model: [note=@t cart=[items=(list @t) open=?]]
112−+$ msg: msg
113−++ main: [init=$-(~ [note=@t cart=[items=(list @t) open=?]]) [update=$-([msg [note=@t cart=[items=(list @t) open=?]]] [[note=@t cart=[items=(list @t) open=?]] (list (cmd msg))]) [view=$-([note=@t cart=[items=(list @t) open=?]] (element msg)) subs=$-([note=@t cart=[items=(list @t) open=?]] (list (sub msg)))]]]
114−++ init: $-(~ [note=@t cart=[items=(list @t) open=?]])
115−++ view: $-([note=@t cart=[items=(list @t) open=?]] (element msg))
116−++ subs: $-([note=@t cart=[items=(list @t) open=?]] (list (sub msg)))
117−++ update: $-([msg=msg m=[note=@t cart=[items=(list @t) open=?]]] [[note=@t cart=[items=(list @t) open=?]] (list (cmd msg))])
118−#### /ui/basket/jibb basket-unused-helper
119−REJECTED: module definitions need unsupported inference: /ui/basket/jibb: ++ empty
120−#### /ui/index/jibb index-reorder
121−CHECKED
122−++ main: [load=$-(~ (ask (list [id=@ud [done=? text=@t]]))) view=$-((list [id=@ud [done=? text=@t]]) (element !!))]
123−++ load: $-(~ (ask (list [id=@ud [done=? text=@t]])))
124−++ view: $-((list [id=@ud [done=? text=@t]]) (element !!))
125−#### /ui/index/jibb index-rename
126−CHECKED
127−++ main: [load=$-(~ (ask (list [id=@ud [done=? text=@t]]))) view=$-((list [id=@ud [done=? text=@t]]) (element !!))]
128−++ view: $-((list [id=@ud [done=? text=@t]]) (element !!))
129−++ load: $-(~ (ask (list [id=@ud [done=? text=@t]])))
130−#### /ui/index/jibb index-tall-load
131−CHECKED
132−++ main: [load=$-(~ (ask (list [id=@ud [done=? text=@t]]))) view=$-((list [id=@ud [done=? text=@t]]) (element !!))]
133−++ view: $-((list [id=@ud [done=? text=@t]]) (element !!))
134−++ load: $-(~ (ask (list [id=@ud [done=? text=@t]])))
135−#### /ui/index/jibb index-cast-load
136−CHECKED
137−++ main: [load=$-(~ (ask (list [id=@ud [done=? text=@t]]))) view=$-((list [id=@ud [done=? text=@t]]) (element !!))]
138−++ view: $-((list [id=@ud [done=? text=@t]]) (element !!))
139−++ load: $-(~ (ask (list [id=@ud [done=? text=@t]])))
140−#### /ui/index/jibb index-view-helper
141−CHECKED
142−++ main: [load=$-(~ (ask (list [id=@ud [done=? text=@t]]))) view=$-((list [id=@ud [done=? text=@t]]) (element !!))]
143−++ view: $-((list [id=@ud [done=? text=@t]]) (element !!))
144−++ title: $-(@t (element A))
145−++ load: $-(~ (ask (list [id=@ud [done=? text=@t]])))
146−#### /ui/index/jibb index-unused-helper
147−CHECKED
148−++ count: $-((list [id=@ud [done=? text=@t]]) @ud)
149−++ main: [load=$-(~ (ask (list [id=@ud [done=? text=@t]]))) view=$-((list [id=@ud [done=? text=@t]]) (element !!))]
150−++ view: $-((list [id=@ud [done=? text=@t]]) (element !!))
151−++ load: $-(~ (ask (list [id=@ud [done=? text=@t]])))
152−#### /ui/index/jibb index-pure-load
153−REJECTED: /ui/index.jibb:5:20: nothing fixes the union of ~
154−++ load |=(~ (pure ~))
155− ^
156−#### /ui/index/jibb index-mapped-reply
157−CHECKED
158−++ main: [load=$-(~ (ask @ud)) view=$-(@ud (element !!))]
159−++ view: $-(@ud (element A))
160−++ load: $-(~ (ask @ud))
161−#### /ui/index/jibb index-typed-load
162−REJECTED: module kind needs unsupported inference: /ui/index/jibb
163−#### /ui/about/jibb about-reorder
164−CHECKED
165−++ main: (element !!)
166−++ view: (element A)
167−#### /ui/about/jibb about-inline
168−CHECKED
169−++ main: (element !!)
170−#### /ui/about/jibb about-helper
171−CHECKED
172−++ main: (element !!)
173−++ view: (element A)
174−++ intro: (element A)
175−#### /ui/about/jibb about-rename
176−CHECKED
177−++ main: (element !!)
178−++ body: (element A)
179−#### /ui/blog/index/jibb blog-reorder
180−CHECKED
181−++ main: [load=$-(~ (ask (list [title=@t slug=@ta]))) view=$-((list [title=@t slug=@ta]) (element !!))]
182−++ load: $-(~ (ask (list [title=@t slug=@ta])))
183−++ view: $-((list [title=@t slug=@ta]) (element A))
184−#### /ui/blog/index/jibb blog-rename
185−CHECKED
186−++ main: [load=$-(~ (ask (list [title=@t slug=@ta]))) view=$-((list [title=@t slug=@ta]) (element !!))]
187−++ view: $-((list [title=@t slug=@ta]) (element A))
188−++ load: $-(~ (ask (list [title=@t slug=@ta])))
189−#### /ui/blog/index/jibb blog-inline-card
190−CHECKED
191−++ main: [load=$-(~ (ask (list [title=@t slug=@ta]))) view=$-((list [title=@t slug=@ta]) (element !!))]
192−++ view: $-((list [title=@t slug=@ta]) (element A))
193−++ load: $-(~ (ask (list [title=@t slug=@ta])))
194−#### /ui/blog/index/jibb blog-inline-card-bare
195−REJECTED: module definitions need unsupported inference: /ui/blog/index/jibb: ++ view
196−#### /ui/blog/index/jibb blog-local-helper
197−CHECKED
198−++ main: [load=$-(~ (ask (list [title=@t slug=@ta]))) view=$-((list [title=@t slug=@ta]) (element !!))]
199−++ view: $-((list [title=@t slug=@ta]) (element A))
200−++ show: $-([title=@t slug=@ta] (element A))
201−++ load: $-(~ (ask (list [title=@t slug=@ta])))
202−#### /ui/theme/jibb theme-no-font
203−CHECKED
204−++ theme: [space=[s1=@t [s2=@t s3=@t]] [tones=[normal=@t [background=@t [accent=@t [danger=@t muted=@t]]]] [wide=@t [lang=@t [zone=@t [font=(unit qath) dark=(unit [tones=[normal=@t [background=@t [accent=@t [danger=@t muted=@t]]]]])]]]]]]
205−#### /ui/theme/jibb theme-helper-value
206−CHECKED
207−++ theme: [space=[s1=@t [s2=@t s3=@t]] [tones=[normal=@t [background=@t [accent=@t [danger=@t muted=@t]]]] [wide=@t [lang=@t [zone=@t [font=(unit qath) dark=(unit [tones=[normal=@t [background=@t [accent=@t [danger=@t muted=@t]]]]])]]]]]]
208−++ accent: @t
209−#### /ui/components/buttons/jibb buttons-reorder
210−REJECTED: /ui/components/buttons.jibb:6:16: nothing fixes the union of %add
211− button label %add
212− ^
213−#### /ui/components/buttons/jibb buttons-fixed
214−CHECKED
215−+$ add-msg: %add
216−++ wide: (list attr)
217−++ labelled: $-([label=@t msg=A] (element A))
218−++ add-button: $-(@t (element %add))
219−#### /ui/components/buttons/jibb buttons-labelled-use
220−CHECKED
221−+$ go-msg: %go
222−++ go-button: (element %go)
223−++ wide: (list attr)
224−++ labelled: $-([label=@t msg=A] (element A))
225−#### /ui/step/jibb step-reorder
226−CHECKED
227−+$ step: step
228−++ describe: $-(step @t)
229−#### /ui/step/jibb step-arm-order
230−CHECKED
231−+$ step: step
232−++ describe: $-(step @t)
233−#### /ui/step/jibb step-catch-all
234−CHECKED
235−+$ step: step
236−++ describe: $-(step @t)
237−#### /ui/step/jibb step-rename
238−CHECKED
239−+$ step: step
240−++ describe: $-(step @t)
241−#### /ui/step/jibb step-sent-star
242−CHECKED
243−+$ step: step
244−++ describe: $-(step @t)
245−#### /ui/step/jibb step-stop-crash
246−CHECKED
247−+$ step: step
248−++ describe: $-(step @t)
249−#### /ui/view-day/jibb viewday-swap
250−CHECKED
251−++ view: $-([n=@ud day=@da] (element A))
252−#### /ui/view-day/jibb viewday-add
253−CHECKED
254−++ view: $-([day=@da n=@ud] (element A))
255−#### /ui/view-day/jibb viewday-generic-sum
256−REJECTED: module definitions need unsupported inference: /ui/view-day/jibb: ++ total
257−#### /ui/imports/jibb imports-use
258−CHECKED
259−++ act: $-(([%add text=@t] [%toggle id=@ud]) ([%add text=@t] [%toggle id=@ud]))
260−++ show: $-([title=@t slug=@ta] (element A))
261−++ first: $-([id=@ud [done=? text=@t]] @t)
262−
docs/reviews/2026-11-03-milestone-2-probes/variants/p4.jibbdeleted−196
@@ -1,196 +0,0 @@
1−#### /ui/probe/jibb inc-generic
2−++ inc |= n=A (add n 1)
3−#### /ui/probe/jibb inc-ud
4−++ inc |= n=@ud (add n 1)
5−++ two (inc 1)
6−#### /ui/probe/jibb clamp-max
7−++ clamp |= [lo=A hi=A n=A]
8− ?- (gth n hi)
9− %.y hi
10− %.n (max lo n)
11−#### /ui/probe/jibb clamp-no-max
12−++ clamp |= [lo=A hi=A n=A]
13− ?- (gth n hi)
14− %.y hi
15− %.n
16− ?- (gth lo n)
17− %.y lo
18− %.n n
19−++ use (clamp 1 10 5)
20−#### /ui/probe/jibb sum-print
21−++ shown "{(add 1 2)}"
22−#### /ui/probe/jibb literals-atoms
23−++ a 0x1f
24−++ b 0v5.fdf99
25−++ c ~zod
26−++ c2 ~sampel-palnet
27−++ d ~2026.10.23
28−++ d2 ~2026.10.23..14.30.00
29−++ e ~s30
30−++ e2 ~h1.m30
31−++ f ~.my-post
32−++ g "milk"
33−++ h %.y
34−++ i 1.000
35−++ j /posts/~zod
36−++ k %/blog
37−#### /ui/probe/jibb literals-containers
38−++ u `5
39−++ l ~[1 2 3]
40−++ t [1 "a"]
41−++ r [text="milk" done=%.n]
42−++ n ^- (unit @ud) ~
43−++ term ^- @tas %add
44−++ pair ^- attr gap+%s2
45−#### /ui/probe/jibb hole-id
46−++ id |= x=A ^- _ x
47−#### /ui/probe/jibb one-case-union
48−+$ go [%go url=@t]
49−++ g ^- go [%go "x"]
50−#### /ui/probe/jibb ctor-one-case
51−+$ typed [%typed text=@t]
52−++ mk ^- $-(@t typed) |=%typed
53−#### /ui/probe/jibb proj
54−++ wider ^- [x=@ud y=@ud z=@ud] [1 2 3]
55−++ narrow ^- [x=@ud y=@ud] (proj wider)
56−#### /ui/probe/jibb unnamed-takes-face
57−++ pt ^- [x=@ud y=@ud] [0 0]
58−#### /ui/probe/jibb widen-to-bare-atom
59−++ f |= a=@ a
60−++ g (f 5)
61−#### /ui/probe/jibb widen-aura-family
62−++ f |= a=@u a
63−++ five ^- @ud 5
64−++ g (f five)
65−#### /ui/probe/jibb pattern-unit
66−++ show |= u=(unit @ud)
67− ?- u
68− ~ 0
69− [~ x] x
70−#### /ui/probe/jibb pattern-pair-units
71−++ both |= p=[(unit @ud) (unit @ud)]
72− ?- p
73− [[~ a] [~ b]] (add a b)
74− * 0
75−#### /ui/probe/jibb pattern-list-one
76−++ one |= xs=(list @ud)
77− ?- xs
78− [x ~] x
79− * 0
80−#### /ui/probe/jibb pattern-literals
81−++ lit |= n=@ud
82− ?- n
83− 1.000 %.y
84− * %.n
85−++ who |= s=@p
86− ?- s
87− ~zod "zod"
88− * "other"
89−++ milk |= t=@t
90− ?- t
91− "milk" %.y
92− * %.n
93−#### /ui/probe/jibb pattern-eq
94−++ same-ud |= [a=@ud b=@ud]
95− ?- (eq a b)
96− %.y "same"
97− %.n "different"
98−#### /ui/probe/jibb gate-free-generic
99−++ same-as |= [a=A b=A] (eq a b)
100−#### /ui/probe/jibb cons-where-list
101−++ cons |= xs=(list @ud)
102− ^- (list @ud) [1 xs]
103−#### /ui/probe/jibb shared-capital
104−++ outer |= x=A
105− ++ inner |= y=A y
106− (inner x)
107−#### /ui/probe/jibb bind-any-depth
108−++ f |= [a=@ b]
109− a
110−++ g (f 1 "x")
111−#### /ui/probe/jibb roll
112−++ total |= xs=(list @ud) (roll xs 0 add)
113−#### /ui/probe/jibb clap
114−++ both (clap `1 `2 add)
115−#### /ui/probe/jibb bare-sample-inline
116−++ titles |= ps=(list [title=@t n=@ud])
117− (turn ps |=(p title.p))
118−#### /ui/probe/jibb typed-sample-inline
119−++ titles |= ps=(list [title=@t n=@ud])
120− (turn ps |=(p=[title=@t n=@ud] title.p))
121−#### /ui/probe/jibb image-element
122−++ logo ^- (element !!) (image %/static/img/logo.png "The logo")
123−#### /ui/probe/jibb get-by
124−++ look |= [m=(map @t @ud) k=@t] (get.by m k)
125−#### /ui/probe/jibb items-count
126−++ show |= n=@ud
127− text "{n} items"
128−#### /ui/probe/jibb add-cmd-helper-lib
129−+$ msg
130− [%acked err=(unit @t)]
131− %go
132−++ wait-cmd |= gap=@dr
133− ^- (cmd msg) [%wait gap %go]
134−#### /ui/probe/jibb eq-list-null
135−++ empty |= xs=(list @t) (eq xs ~)
136−#### /ui/probe/jibb fall-literal
137−++ f |= e=(unit @t) (fall e "")
138−#### /ui/probe/jibb lent-tuba-trip
139−++ long |= t=@t (gth (lent (tuba (trip t))) 80)
140−#### /ui/api/journal/jibb module journal-api
141−/% %posts
142−
143−+$ paths
144− [%posts /posts posts]
145− [%post /post/[slug=@ta] posts]
146−#### /ui/blog/_slug/jibb slug-page
147−/= api /ui/api/journal
148−
149−++ main (page load view)
150−++ load |=([slug=@ta] (post.api slug same))
151−
152−++ view |= ps=posts.api
153− text "post"
154−#### /ui/settings/__rest/jibb catch-all-page
155−++ main (page load view)
156−++ load |=(p=path (pure p))
157−
158−++ view |= p=path
159− text "settings"
160−#### /ui/todo-list/jibb island-changes-fold
161−/= todo /ui/api/todo
162−
163−++ main (program init update view subs)
164−
165−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
166−+$ msg
167− [%typed text=@t]
168− %submit
169− [%toggled id=@ud]
170− [%got todos=(list item.todo)]
171− [%acked err=(unit @t)]
172−
173−++ init |= ts=(list item.todo)
174− [todos=ts draft="" error=~]
175−
176−++ update |= [=msg m=model]
177− ?- msg
178− [%typed t] [m(draft=t) ~]
179− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
180− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
181− [%got ts] [m(todos=ts) ~]
182− [%acked err] [m(error=err) ~]
183−
184−++ apply |= [d=[%todo-update todo-update.todo] s=todos.todo]
185− s
186−
187−++ subs |= m=model
188− ~[[%watch (changes.todo |=%got apply)]]
189−
190−++ view |= m=model
191− column ~[gap+%s2] ~[
192− heading 2 "Todos"
193− each (turn todos.m row-of)
194−
195−++ row-of |= t=item.todo
196− [id.t (toggle done.t text.t [%toggled id.t])]
docs/reviews/2026-11-03-milestone-2-probes/variants/p4.outdeleted−113
@@ -1,113 +0,0 @@
1−#### /ui/probe/jibb inc-generic
2−CHECKED
3−++ inc: $-(A A)
4−#### /ui/probe/jibb inc-ud
5−CHECKED
6−++ two: @ud
7−++ inc: $-(@ud @ud)
8−#### /ui/probe/jibb clamp-max
9−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ clamp
10−#### /ui/probe/jibb clamp-no-max
11−CHECKED
12−++ use: @ud
13−++ clamp: $-([lo=A [hi=A n=A]] A)
14−#### /ui/probe/jibb sum-print
15−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ shown
16−#### /ui/probe/jibb literals-atoms
17−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ j
18−#### /ui/probe/jibb literals-containers
19−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ u
20−#### /ui/probe/jibb hole-id
21−CHECKED
22−++ id: $-(A A)
23−#### /ui/probe/jibb one-case-union
24−CHECKED
25−+$ go: [%go url=@t]
26−++ g: [%go url=@t]
27−#### /ui/probe/jibb ctor-one-case
28−CHECKED
29−+$ typed: [%typed text=@t]
30−++ mk: $-(@t [%typed text=@t])
31−#### /ui/probe/jibb proj
32−CHECKED
33−++ narrow: [x=@ud y=@ud]
34−++ wider: [x=@ud [y=@ud z=@ud]]
35−#### /ui/probe/jibb unnamed-takes-face
36−CHECKED
37−++ pt: [x=@ud y=@ud]
38−#### /ui/probe/jibb widen-to-bare-atom
39−CHECKED
40−++ g: @
41−++ f: $-(@ @)
42−#### /ui/probe/jibb widen-aura-family
43−CHECKED
44−++ g: @u
45−++ five: @ud
46−++ f: $-(@u @u)
47−#### /ui/probe/jibb pattern-unit
48−CHECKED
49−++ show: $-((unit @ud) @ud)
50−#### /ui/probe/jibb pattern-pair-units
51−REJECTED: module has conflicting names: /ui/probe/jibb
52−#### /ui/probe/jibb pattern-list-one
53−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ one
54−#### /ui/probe/jibb pattern-literals
55−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ lit
56−#### /ui/probe/jibb pattern-eq
57−CHECKED
58−++ same-ud: $-([a=@ud b=@ud] @t)
59−#### /ui/probe/jibb gate-free-generic
60−CHECKED
61−++ same-as: $-([a=A b=A] ?)
62−#### /ui/probe/jibb cons-where-list
63−CHECKED
64−++ cons: $-((list @ud) (list @ud))
65−#### /ui/probe/jibb shared-capital
66−CHECKED
67−++ outer: $-(A A)
68−#### /ui/probe/jibb bind-any-depth
69−CHECKED
70−++ g: @
71−++ f: $-([a=@ b=A] @)
72−#### /ui/probe/jibb roll
73−CHECKED
74−++ total: $-((list @ud) @ud)
75−#### /ui/probe/jibb clap
76−REJECTED: module has conflicting names: /ui/probe/jibb
77−#### /ui/probe/jibb bare-sample-inline
78−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ titles
79−#### /ui/probe/jibb typed-sample-inline
80−CHECKED
81−++ titles: $-((list [title=@t n=@ud]) (list @t))
82−#### /ui/probe/jibb image-element
83−CHECKED
84−++ logo: (element !!)
85−#### /ui/probe/jibb get-by
86−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ look
87−#### /ui/probe/jibb items-count
88−CHECKED
89−++ show: $-(@ud (element A))
90−#### /ui/probe/jibb add-cmd-helper-lib
91−CHECKED
92−+$ msg: msg
93−++ wait-cmd: $-(@dr (cmd msg))
94−#### /ui/probe/jibb eq-list-null
95−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ empty
96−#### /ui/probe/jibb fall-literal
97−CHECKED
98−++ f: $-((unit @t) @t)
99−#### /ui/probe/jibb lent-tuba-trip
100−CHECKED
101−++ long: $-(@t ?)
102−#### /ui/api/journal/jibb module journal-api
103−CHECKED
104−+$ posts: (list [title=@t slug=@ta])
105−++ posts: $-($-((list [title=@t slug=@ta]) A) (ask A))
106−++ post: $-([@ta $-((list [title=@t slug=@ta]) A)] (ask A))
107−#### /ui/blog/_slug/jibb slug-page
108−REJECTED: module kind needs unsupported inference: /ui/blog/_slug/jibb
109−#### /ui/settings/__rest/jibb catch-all-page
110−REJECTED: module kind needs unsupported inference: /ui/settings/__rest/jibb
111−#### /ui/todo-list/jibb island-changes-fold
112−REJECTED: module kind needs unsupported inference: /ui/todo-list/jibb
113−
docs/reviews/2026-11-03-milestone-2-probes/variants/p5.jibbdeleted−130
@@ -1,130 +0,0 @@
1−#### /ui/probe/jibb lit-hex
2−++ x 0x1f
3−#### /ui/probe/jibb lit-b32
4−++ x 0v5.fdf99
5−#### /ui/probe/jibb lit-ship
6−++ x ~zod
7−#### /ui/probe/jibb lit-ship2
8−++ x ~sampel-palnet
9−#### /ui/probe/jibb lit-date
10−++ x ~2026.10.23
11−#### /ui/probe/jibb lit-date2
12−++ x ~2026.10.23..14.30.00
13−#### /ui/probe/jibb lit-dur
14−++ x ~s30
15−#### /ui/probe/jibb lit-dur2
16−++ x ~h1.m30
17−#### /ui/probe/jibb lit-knot
18−++ x ~.my-post
19−#### /ui/probe/jibb lit-str
20−++ x "milk"
21−#### /ui/probe/jibb lit-loob
22−++ x %.y
23−#### /ui/probe/jibb lit-dec
24−++ x 1.000
25−#### /ui/probe/jibb lit-path
26−++ x /posts/~zod
27−#### /ui/probe/jibb lit-qath
28−++ x %/blog
29−#### /ui/probe/jibb lit-unit
30−++ x `5
31−#### /ui/probe/jibb lit-list
32−++ x ~[1 2 3]
33−#### /ui/probe/jibb lit-tuple
34−++ x [1 "a"]
35−#### /ui/probe/jibb lit-record
36−++ x [text="milk" done=%.n]
37−#### /ui/probe/jibb lit-null-cast
38−++ x ^- (unit @ud) ~
39−#### /ui/probe/jibb lit-term-cast
40−++ x ^- @tas %add
41−#### /ui/probe/jibb lit-pair-cast
42−++ x ^- attr gap+%s2
43−#### /ui/probe/jibb lit-num-term-cast
44−++ x ^- @ %1.000
45−#### /ui/probe/jibb lit-empty-path
46−++ x /
47−#### /ui/probe/jibb lit-unit-cast
48−++ x ^- (unit @ud) `5
49−#### /ui/probe/jibb lit-list-cast
50−++ x ^- (list @ud) ~[1 2 3]
51−#### /ui/probe/jibb lit-path-cast
52−++ x ^- path /posts/~zod
53−#### /ui/probe/jibb lit-interp-day
54−++ x "Since {~2026.10.23}"
55−#### /ui/probe/jibb inc-cell-unsound?
56−++ inc |= n=A (add n 1)
57−++ bad (inc [1 2])
58−#### /ui/probe/jibb inc-loobean
59−++ inc |= n=A (add n 1)
60−++ bad (inc %.y)
61−#### /ui/probe/jibb inc-generic-print
62−++ inc |= n=A (add n 1)
63−#### /ui/probe/jibb eq-gates-unsound?
64−++ same-as |= [a=A b=A] (eq a b)
65−++ bad (same-as same same)
66−#### /ui/probe/jibb eq-generic-print
67−++ same-as |= [a=A b=A] (eq a b)
68−#### /ui/probe/jibb clamp-print
69−++ clamp |= [lo=A hi=A n=A]
70− ?- (gth n hi)
71− %.y hi
72− %.n
73− ?- (gth lo n)
74− %.y lo
75− %.n n
76−#### /ui/probe/jibb unknown-name
77−++ x (nosuch 1)
78−#### /ui/probe/jibb pattern-pair-units
79−++ pair-sum |= p=[(unit @ud) (unit @ud)]
80− ?- p
81− [[~ a] [~ b]] (add a b)
82− * 0
83−#### /ui/probe/jibb clap-units
84−++ summed (clap `1 `2 add)
85−#### /ui/probe/jibb pattern-lit-ud
86−++ lit |= n=@ud
87− ?- n
88− 1.000 %.y
89− * %.n
90−#### /ui/probe/jibb pattern-lit-ship
91−++ who |= s=@p
92− ?- s
93− ~zod "zod"
94− * "other"
95−#### /ui/probe/jibb pattern-lit-cord
96−++ milk |= t=@t
97− ?- t
98− "milk" %.y
99− * %.n
100−#### /ui/probe/jibb pattern-list-cons
101−++ first |= xs=(list @ud)
102− ?- xs
103− ~ 0
104− [x xs2] x
105−#### /ui/probe/jibb pattern-list-one-catch
106−++ one |= xs=(list @ud)
107− ?- xs
108− [x ~] x
109− * 0
110−#### /ui/probe/jibb pattern-trailing-rest
111−++ second |= p=[(unit @ud) (unit @ud)]
112− ?- p
113− [~ b] b
114− * ~
115−#### /ui/probe/jibb print-sum-annotated
116−++ shown ^- @t "{(add 1 2)}"
117−#### /ui/probe/jibb print-ud-var
118−++ shown |= n=@ud "{n} items"
119−#### /ui/probe/jibb print-generic-error
120−++ shown |= n=A
121− "{(add n 1)}"
122−#### /ui/probe/jibb eq-list-null
123−++ empty |= xs=(list @t) (eq xs ~)
124−#### /ui/probe/jibb eq-list-null-cast
125−++ empty |= xs=(list @t) (eq xs ^-((list @t) ~))
126−#### /ui/probe/jibb self-ref-error
127−++ title (lent title)
128−#### /ui/probe/jibb capital-made-ud
129−++ f |= x=A (add x ^- @ud 1)
130−
docs/reviews/2026-11-03-milestone-2-probes/variants/p5.outdeleted−127
@@ -1,127 +0,0 @@
1−#### /ui/probe/jibb lit-hex
2−CHECKED
3−++ x: @ux
4−#### /ui/probe/jibb lit-b32
5−CHECKED
6−++ x: @uv
7−#### /ui/probe/jibb lit-ship
8−CHECKED
9−++ x: @p
10−#### /ui/probe/jibb lit-ship2
11−CHECKED
12−++ x: @p
13−#### /ui/probe/jibb lit-date
14−CHECKED
15−++ x: @da
16−#### /ui/probe/jibb lit-date2
17−CHECKED
18−++ x: @da
19−#### /ui/probe/jibb lit-dur
20−CHECKED
21−++ x: @dr
22−#### /ui/probe/jibb lit-dur2
23−CHECKED
24−++ x: @dr
25−#### /ui/probe/jibb lit-knot
26−CHECKED
27−++ x: @ta
28−#### /ui/probe/jibb lit-str
29−CHECKED
30−++ x: @t
31−#### /ui/probe/jibb lit-loob
32−CHECKED
33−++ x: ?
34−#### /ui/probe/jibb lit-dec
35−CHECKED
36−++ x: @ud
37−#### /ui/probe/jibb lit-path
38−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ x
39−#### /ui/probe/jibb lit-qath
40−CHECKED
41−++ x: qath
42−#### /ui/probe/jibb lit-unit
43−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ x
44−#### /ui/probe/jibb lit-list
45−CHECKED
46−++ x: (list @ud)
47−#### /ui/probe/jibb lit-tuple
48−CHECKED
49−++ x: [@ud @t]
50−#### /ui/probe/jibb lit-record
51−CHECKED
52−++ x: [text=@t done=?]
53−#### /ui/probe/jibb lit-null-cast
54−CHECKED
55−++ x: (unit @ud)
56−#### /ui/probe/jibb lit-term-cast
57−CHECKED
58−++ x: @tas
59−#### /ui/probe/jibb lit-pair-cast
60−CHECKED
61−++ x: attr
62−#### /ui/probe/jibb lit-num-term-cast
63−CHECKED
64−++ x: @
65−#### /ui/probe/jibb lit-empty-path
66−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ x
67−#### /ui/probe/jibb lit-unit-cast
68−CHECKED
69−++ x: (unit @ud)
70−#### /ui/probe/jibb lit-list-cast
71−CHECKED
72−++ x: (list @ud)
73−#### /ui/probe/jibb lit-path-cast
74−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ x
75−#### /ui/probe/jibb lit-interp-day
76−CHECKED
77−++ x: @t
78−#### /ui/probe/jibb inc-cell-unsound?
79−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ bad
80−#### /ui/probe/jibb inc-loobean
81−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ bad
82−#### /ui/probe/jibb inc-generic-print
83−CHECKED
84−++ inc: $-(A A) where A is an atom other than ?
85−#### /ui/probe/jibb eq-gates-unsound?
86−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ bad
87−#### /ui/probe/jibb eq-generic-print
88−CHECKED
89−++ same-as: $-([a=A b=A] ?) where A contains no gates
90−#### /ui/probe/jibb clamp-print
91−CHECKED
92−++ clamp: $-([lo=A [hi=A n=A]] A) where A is an atom
93−#### /ui/probe/jibb unknown-name
94−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ x
95−#### /ui/probe/jibb pattern-pair-units
96−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ pair-sum
97−#### /ui/probe/jibb clap-units
98−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ summed
99−#### /ui/probe/jibb pattern-lit-ud
100−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ lit
101−#### /ui/probe/jibb pattern-lit-ship
102−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ who
103−#### /ui/probe/jibb pattern-lit-cord
104−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ milk
105−#### /ui/probe/jibb pattern-list-cons
106−CHECKED
107−++ first: $-((list @ud) @ud)
108−#### /ui/probe/jibb pattern-list-one-catch
109−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ one
110−#### /ui/probe/jibb pattern-trailing-rest
111−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ second
112−#### /ui/probe/jibb print-sum-annotated
113−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ shown
114−#### /ui/probe/jibb print-ud-var
115−CHECKED
116−++ shown: $-(@ud @t)
117−#### /ui/probe/jibb print-generic-error
118−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ shown
119−#### /ui/probe/jibb eq-list-null
120−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ empty
121−#### /ui/probe/jibb eq-list-null-cast
122−REJECTED: module source does not parse: /ui/probe/jibb
123−#### /ui/probe/jibb self-ref-error
124−REJECTED: module definitions need unsupported inference: /ui/probe/jibb: ++ title
125−#### /ui/probe/jibb capital-made-ud
126−REJECTED: module source does not parse: /ui/probe/jibb
127−
docs/reviews/2026-11-03-milestone-2-probes/variants/p6.jibbdeleted−498
@@ -1,498 +0,0 @@
1−#### /ui/todo-list/jibb todo-full-alias
2−/= todo /ui/api/todo
3−
4−++ main (program init update view subs)
5−
6−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
7−+$ msg
8− [%typed text=@t]
9− %submit
10− [%toggled id=@ud]
11− [%got todos=(list item.todo)]
12− [%acked err=(unit @t)]
13−
14−++ init |= ts=(list item.todo)
15− [ts "" ~]
16−
17−++ update |= [=msg m=model]
18− ?- msg
19− [%typed t]
20− ?- (gth (lent (tuba (trip t))) 80)
21− %.y [m(draft=t error=`"Too long") ~]
22− %.n [m(draft=t error=~) ~]
23− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
24− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
25− [%got ts] [m(todos=ts) ~]
26− [%acked err] [m(error=err) ~]
27−
28−++ subs |= m=model
29− ~[[%watch (todos.todo |=%got)]]
30−
31−++ view |= m=model
32− column ~[gap+%s2] ~[
33− heading 2 "Todos"
34− each (turn todos.m row-alias)
35− row ~[gap+%s1] ~[
36− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
37− button "Add" %submit
38− el ~[tone+%danger] (text (fall error.m ""))
39−
40−++ row-of |= t=item.todo
41− [id.t (toggle done.t text.t [%toggled id.t])]
42−
43−++ row-alias row-of
44−#### /ui/todo-list/jibb todo-full-ambiguous-mapper
45−/= todo /ui/api/todo
46−
47−++ main (program init update view subs)
48−
49−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
50−+$ msg
51− [%typed text=@t]
52− %submit
53− [%toggled id=@ud]
54− [%got todos=(list item.todo)]
55− [%acked err=(unit @t)]
56−
57−++ init |= ts=(list item.todo)
58− [ts "" ~]
59−
60−++ update |= [=msg m=model]
61− ?- msg
62− [%typed t]
63− ?- (gth (lent (tuba (trip t))) 80)
64− %.y [m(draft=t error=`"Too long") ~]
65− %.n [m(draft=t error=~) ~]
66− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
67− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
68− [%got ts] [m(todos=ts) ~]
69− [%acked err] [m(error=err) ~]
70−
71−++ subs |= m=model
72− ~[[%watch (todos.todo |=%got)]]
73−
74−++ view |= m=model
75− column ~[gap+%s2] ~[
76− heading 2 "Todos"
77− each (turn todos.m row-of)
78− each (turn todos.m row-of)
79− row ~[gap+%s1] ~[
80− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
81− button "Add" %submit
82− el ~[tone+%danger] (text (fall error.m ""))
83−
84−++ row-of |= t=item.todo
85− [id.t (toggle done.t text.t [%toggled id.t])]
86−#### /ui/index/jibb page-main-page-alias
87−/= todo /ui/api/todo
88−/= todo-list /ui/todo-list
89−
90−++ make-page page
91−++ main (make-page load view)
92−++ load |=(~ (todos.todo same))
93−
94−++ view |= ts=(list item.todo)
95− column ~[pad+%s3] ~[
96− heading 1 "My ship"
97− island main.todo-list ts
98−#### /ui/index/jibb page-main-indirect-load
99−/= todo /ui/api/todo
100−/= todo-list /ui/todo-list
101−
102−++ main (page load view)
103−++ request |=(~ (todos.todo same))
104−++ load |=(~ (request ~))
105−
106−++ view |= ts=(list item.todo)
107− column ~[pad+%s3] ~[
108− heading 1 "My ship"
109− island main.todo-list ts
110−#### /ui/index/jibb page-main-pure-load
111−/= todo /ui/api/todo
112−/= todo-list /ui/todo-list
113−
114−++ main (page load view)
115−++ load |=(~ (pure ~))
116−
117−++ view |= ts=(list item.todo)
118− column ~[pad+%s3] ~[
119− heading 1 "My ship"
120− island main.todo-list ts
121−#### /ui/index/jibb page-main-hand-built-load
122−/= todo /ui/api/todo
123−/= todo-list /ui/todo-list
124−
125−++ main (page load view)
126−++ load |=(~
127− ^- (ask (list item.todo))
128− [%agent api="/ui/api/todo" case=%todos agent=%todo path=~[%todos] scry=~ receive=receive])
129−++ receive |= input=[mark=@tas state=(unit *) fact=*]
130− ^- [state=* message=(list item.todo)] [state=0 message=~]
131−
132−++ view |= ts=(list item.todo)
133− column ~[pad+%s3] ~[
134− heading 1 "My ship"
135− island main.todo-list ts
136−#### /ui/index/jibb page-main-typed-load
137−/= todo /ui/api/todo
138−/= todo-list /ui/todo-list
139−
140−++ main (page load view)
141−++ load |=(~ (todo-by-id.todo 1 |=%one))
142−
143−++ view |= item=todo-item.todo
144− text "One todo"
145−#### /ui/index/jibb page-main-diff-load
146−/= todo /ui/api/todo
147−/= todo-list /ui/todo-list
148−
149−++ main (page load view)
150−++ fold |= [d=[%todo-update todo-update.todo] s=todos.todo] s
151−++ load |=(~ (changes.todo same fold))
152−
153−++ view |= ts=(list item.todo)
154− column ~[pad+%s3] ~[
155− heading 1 "My ship"
156− island main.todo-list ts
157−#### /ui/stores/cart/jibb store-alias-main
158−:: /ui/stores/cart.jibb
159−+$ state [items=(list @t) open=?]
160−+$ poke
161− [%add item=@t]
162− %toggle
163−
164−++ main (build init update)
165−++ init ^- state [items=~ open=%.n]
166−++ update |= [a=poke s=state]
167− ?- a
168− [%add item] s(items=[item items.s])
169− %toggle s(open=(not open.s))
170−++ build store
171−#### /ui/stores/cart/jibb store-hand-main
172−:: /ui/stores/cart.jibb
173−+$ state [items=(list @t) open=?]
174−+$ poke
175− [%add item=@t]
176− %toggle
177−
178−++ main [init update]
179−++ init ^- state [items=~ open=%.n]
180−++ update |= [a=poke s=state]
181− ?- a
182− [%add item] s(items=[item items.s])
183− %toggle s(open=(not open.s))
184−#### /ui/todo-list/jibb castinit-second-watch
185−/= todo /ui/api/todo
186−
187−++ main (program init update view subs)
188−
189−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
190−+$ msg
191− [%typed text=@t]
192− %submit
193− [%toggled id=@ud]
194− [%got todos=(list item.todo)]
195− [%acked err=(unit @t)]
196−
197−++ init |= ts=(list item.todo)
198− ^- model [ts "" ~]
199−
200−++ update |= [=msg m=model]
201− ?- msg
202− [%typed t]
203− ?- (gth (lent (tuba (trip t))) 80)
204− %.y [m(draft=t error=`"Too long") ~]
205− %.n [m(draft=t error=~) ~]
206− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
207− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
208− [%got ts] [m(todos=ts) ~]
209− [%acked err] [m(error=err) ~]
210−
211−++ subs |= m=model
212− ~[[%watch (todos.todo |=%got)] [%watch (todos.todo |=%got)]]
213−
214−++ view |= m=model
215− column ~[gap+%s2] ~[
216− heading 2 "Todos"
217− each (turn todos.m row-of)
218− row ~[gap+%s1] ~[
219− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
220− button "Add" %submit
221− el ~[tone+%danger] (text (fall error.m ""))
222−
223−++ row-of |= t=item.todo
224− [id.t (toggle done.t text.t [%toggled id.t])]
225−#### /ui/todo-list/jibb castinit-subs-none
226−/= todo /ui/api/todo
227−
228−++ main (program init update view subs)
229−
230−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
231−+$ msg
232− [%typed text=@t]
233− %submit
234− [%toggled id=@ud]
235− [%got todos=(list item.todo)]
236− [%acked err=(unit @t)]
237−
238−++ init |= ts=(list item.todo)
239− ^- model [ts "" ~]
240−
241−++ update |= [=msg m=model]
242− ?- msg
243− [%typed t]
244− ?- (gth (lent (tuba (trip t))) 80)
245− %.y [m(draft=t error=`"Too long") ~]
246− %.n [m(draft=t error=~) ~]
247− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
248− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
249− [%got ts] [m(todos=ts) ~]
250− [%acked err] [m(error=err) ~]
251−
252−++ subs |=(m ~)
253−
254−++ view |= m=model
255− column ~[gap+%s2] ~[
256− heading 2 "Todos"
257− each (turn todos.m row-of)
258− row ~[gap+%s1] ~[
259− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
260− button "Add" %submit
261− el ~[tone+%danger] (text (fall error.m ""))
262−
263−++ row-of |= t=item.todo
264− [id.t (toggle done.t text.t [%toggled id.t])]
265−#### /ui/todo-list/jibb castinit-subs-none-typed
266−/= todo /ui/api/todo
267−
268−++ main (program init update view subs)
269−
270−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
271−+$ msg
272− [%typed text=@t]
273− %submit
274− [%toggled id=@ud]
275− [%got todos=(list item.todo)]
276− [%acked err=(unit @t)]
277−
278−++ init |= ts=(list item.todo)
279− ^- model [ts "" ~]
280−
281−++ update |= [=msg m=model]
282− ?- msg
283− [%typed t]
284− ?- (gth (lent (tuba (trip t))) 80)
285− %.y [m(draft=t error=`"Too long") ~]
286− %.n [m(draft=t error=~) ~]
287− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
288− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
289− [%got ts] [m(todos=ts) ~]
290− [%acked err] [m(error=err) ~]
291−
292−++ subs |=(m=model ~)
293−
294−++ view |= m=model
295− column ~[gap+%s2] ~[
296− heading 2 "Todos"
297− each (turn todos.m row-of)
298− row ~[gap+%s1] ~[
299− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
300− button "Add" %submit
301− el ~[tone+%danger] (text (fall error.m ""))
302−
303−++ row-of |= t=item.todo
304− [id.t (toggle done.t text.t [%toggled id.t])]
305−#### /ui/todo-list/jibb castinit-inline-row
306−/= todo /ui/api/todo
307−
308−++ main (program init update view subs)
309−
310−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
311−+$ msg
312− [%typed text=@t]
313− %submit
314− [%toggled id=@ud]
315− [%got todos=(list item.todo)]
316− [%acked err=(unit @t)]
317−
318−++ init |= ts=(list item.todo)
319− ^- model [ts "" ~]
320−
321−++ update |= [=msg m=model]
322− ?- msg
323− [%typed t]
324− ?- (gth (lent (tuba (trip t))) 80)
325− %.y [m(draft=t error=`"Too long") ~]
326− %.n [m(draft=t error=~) ~]
327− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
328− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
329− [%got ts] [m(todos=ts) ~]
330− [%acked err] [m(error=err) ~]
331−
332−++ subs |= m=model
333− ~[[%watch (todos.todo |=%got)]]
334−
335−++ view |= m=model
336− column ~[gap+%s2] ~[
337− heading 2 "Todos"
338− each (turn todos.m |=(t=item.todo [id.t (toggle done.t text.t [%toggled id.t])]))
339− row ~[gap+%s1] ~[
340− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
341− button "Add" %submit
342− el ~[tone+%danger] (text (fall error.m ""))
343−#### /ui/todo-list/jibb castinit-update-helper
344−/= todo /ui/api/todo
345−
346−++ main (program init update view subs)
347−
348−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
349−+$ msg
350− [%typed text=@t]
351− %submit
352− [%toggled id=@ud]
353− [%got todos=(list item.todo)]
354− [%acked err=(unit @t)]
355−
356−++ init |= ts=(list item.todo)
357− ^- model [ts "" ~]
358−
359−++ update |= [=msg m=model]
360− ?- msg
361− [%typed t]
362− ?- (gth (lent (tuba (trip t))) 80)
363− %.y [m(draft=t error=`"Too long") ~]
364− %.n [m(draft=t error=~) ~]
365− %submit [m(draft="") ~[(add-cmd draft.m)]]
366− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
367− [%got ts] [m(todos=ts) ~]
368− [%acked err] [m(error=err) ~]
369−
370−++ subs |= m=model
371− ~[[%watch (todos.todo |=%got)]]
372−
373−++ view |= m=model
374− column ~[gap+%s2] ~[
375− heading 2 "Todos"
376− each (turn todos.m row-of)
377− row ~[gap+%s1] ~[
378− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
379− button "Add" %submit
380− el ~[tone+%danger] (text (fall error.m ""))
381−
382−++ row-of |= t=item.todo
383− [id.t (toggle done.t text.t [%toggled id.t])]
384−
385−++ add-cmd |= d=@t
386− (poke.todo [%add d] |=%acked)
387−#### /ui/todo-list/jibb castinit-second-sub-every
388−/= todo /ui/api/todo
389−
390−++ main (program init update view subs)
391−
392−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
393−+$ msg
394− [%typed text=@t]
395− %submit
396− [%toggled id=@ud]
397− [%got todos=(list item.todo)]
398− [%acked err=(unit @t)]
399− [%tick at=@da]
400−
401−++ init |= ts=(list item.todo)
402− ^- model [ts "" ~]
403−
404−++ update |= [=msg m=model]
405− ?- msg
406− [%typed t]
407− ?- (gth (lent (tuba (trip t))) 80)
408− %.y [m(draft=t error=`"Too long") ~]
409− %.n [m(draft=t error=~) ~]
410− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
411− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
412− [%got ts] [m(todos=ts) ~]
413− [%acked err] [m(error=err) ~]
414− [%tick at] [m ~]
415−
416−++ subs |= m=model
417− ~[[%watch (todos.todo |=%got)] [%every ~s30 |=%tick]]
418−
419−++ view |= m=model
420− column ~[gap+%s2] ~[
421− heading 2 "Todos"
422− each (turn todos.m row-of)
423− row ~[gap+%s1] ~[
424− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
425− button "Add" %submit
426− el ~[tone+%danger] (text (fall error.m ""))
427−
428−++ row-of |= t=item.todo
429− [id.t (toggle done.t text.t [%toggled id.t])]
430−#### /ui/todo-list/jibb castinit-every-only
431−/= todo /ui/api/todo
432−
433−++ main (program init update view subs)
434−
435−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
436−+$ msg
437− [%typed text=@t]
438− %submit
439− [%toggled id=@ud]
440− [%got todos=(list item.todo)]
441− [%acked err=(unit @t)]
442− [%tick at=@da]
443−
444−++ init |= ts=(list item.todo)
445− ^- model [ts "" ~]
446−
447−++ update |= [=msg m=model]
448− ?- msg
449− [%typed t]
450− ?- (gth (lent (tuba (trip t))) 80)
451− %.y [m(draft=t error=`"Too long") ~]
452− %.n [m(draft=t error=~) ~]
453− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
454− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
455− [%got ts] [m(todos=ts) ~]
456− [%acked err] [m(error=err) ~]
457− [%tick at] [m ~]
458−
459−++ subs |= m=model
460− ~[[%every ~s30 |=%tick]]
461−
462−++ view |= m=model
463− column ~[gap+%s2] ~[
464− heading 2 "Todos"
465− each (turn todos.m row-of)
466− row ~[gap+%s1] ~[
467− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
468− button "Add" %submit
469− el ~[tone+%danger] (text (fall error.m ""))
470−
471−++ row-of |= t=item.todo
472− [id.t (toggle done.t text.t [%toggled id.t])]
473−#### /ui/stores/cart/jibb cart-init-uncast-tuple
474−:: /ui/stores/cart.jibb
475−+$ state [items=(list @t) open=?]
476−+$ poke
477− [%add item=@t]
478− %toggle
479−
480−++ main (store init update)
481−++ init [~ %.n]
482−++ update |= [a=poke s=state]
483− ?- a
484− [%add item] s(items=[item items.s])
485− %toggle s(open=(not open.s))
486−#### /ui/stores/cart/jibb cart-init-uncast-nonull
487−:: /ui/stores/cart.jibb
488−+$ state [count=@ud open=?]
489−+$ poke
490− [%add item=@t]
491− %toggle
492−
493−++ main (store init update)
494−++ init [count=0 open=%.n]
495−++ update |= [a=poke s=state]
496− ?- a
497− [%add item] s(count=(add 1 count.s))
498− %toggle s(open=(not open.s))
docs/reviews/2026-11-03-milestone-2-probes/variants/p6.outdeleted−66
@@ -1,66 +0,0 @@
1−#### /ui/todo-list/jibb todo-full-alias
2−REJECTED: /ui/todo-list.jibb:14:10: nothing fixes the union of ~
3− [ts "" ~]
4− ^
5−#### /ui/todo-list/jibb todo-full-ambiguous-mapper
6−REJECTED: /ui/todo-list.jibb:14:10: nothing fixes the union of ~
7− [ts "" ~]
8− ^
9−#### /ui/index/jibb page-main-page-alias
10−REJECTED: module kind needs unsupported inference: /ui/index/jibb
11−#### /ui/index/jibb page-main-indirect-load
12−REJECTED: module kind needs unsupported inference: /ui/index/jibb
13−#### /ui/index/jibb page-main-pure-load
14−REJECTED: /ui/index.jibb:5:20: nothing fixes the union of ~
15−++ load |=(~ (pure ~))
16− ^
17−#### /ui/index/jibb page-main-hand-built-load
18−REJECTED: module source does not parse: /ui/index/jibb
19−#### /ui/index/jibb page-main-typed-load
20−REJECTED: module definitions need unsupported inference: /ui/index/jibb: ++ load
21−#### /ui/index/jibb page-main-diff-load
22−REJECTED: module kind needs unsupported inference: /ui/index/jibb
23−#### /ui/stores/cart/jibb store-alias-main
24−REJECTED: module kind needs unsupported inference: /ui/stores/cart/jibb
25−#### /ui/stores/cart/jibb store-hand-main
26−REJECTED: module kind needs unsupported inference: /ui/stores/cart/jibb
27−#### /ui/todo-list/jibb castinit-second-watch
28−REJECTED: module definitions need unsupported inference: /ui/todo-list/jibb: ++ subs
29−#### /ui/todo-list/jibb castinit-subs-none
30−REJECTED: /ui/todo-list.jibb:27:14: nothing fixes the union of ~
31−++ subs |=(m ~)
32− ^
33−#### /ui/todo-list/jibb castinit-subs-none-typed
34−CHECKED
35−+$ model: [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]
36−+$ msg: msg
37−++ main: [init=$-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]) [update=$-([msg [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))]) [view=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg)) subs=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))]]]
38−++ view: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg))
39−++ row-of: $-([id=@ud [done=? text=@t]] [key=@ud el=(element msg)])
40−++ subs: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))
41−++ update: $-([msg=msg m=[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))])
42−++ init: $-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]])
43−#### /ui/todo-list/jibb castinit-inline-row
44−REJECTED: module definitions need unsupported inference: /ui/todo-list/jibb: ++ view
45−#### /ui/todo-list/jibb castinit-update-helper
46−REJECTED: /ui/todo-list.jibb:40:32: nothing fixes the union of %toggled
47− [id.t (toggle done.t text.t [%toggled id.t])]
48− ^
49−#### /ui/todo-list/jibb castinit-second-sub-every
50−REJECTED: module kind needs unsupported inference: /ui/todo-list/jibb
51−#### /ui/todo-list/jibb castinit-every-only
52−REJECTED: module kind needs unsupported inference: /ui/todo-list/jibb
53−#### /ui/stores/cart/jibb cart-init-uncast-tuple
54−REJECTED: /ui/stores/cart.jibb:8:10: nothing fixes the union of ~
55−++ init [~ %.n]
56− ^
57−#### /ui/stores/cart/jibb cart-init-uncast-nonull
58−CHECKED
59−+$ state: [count=@ud open=?]
60−+$ poke: poke
61−++ state: $-($-([count=@ud open=?] A) (ask A))
62−++ poke: $-([poke $-((unit @t) A)] (cmd A))
63−++ main: [init=[count=@ud open=?] update=*]
64−++ update: $-([a=poke s=[count=@ud open=?]] [count=@ud open=?])
65−++ init: [count=@ud open=?]
66−
docs/reviews/2026-11-03-milestone-2-probes/variants/p7.jibbdeleted−389
@@ -1,389 +0,0 @@
1−#### /ui/todo-list/jibb castinit-two-each
2−/= todo /ui/api/todo
3−
4−++ main (program init update view subs)
5−
6−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
7−+$ msg
8− [%typed text=@t]
9− %submit
10− [%toggled id=@ud]
11− [%got todos=(list item.todo)]
12− [%acked err=(unit @t)]
13−
14−++ init |= ts=(list item.todo)
15− ^- model [ts "" ~]
16−
17−++ update |= [=msg m=model]
18− ?- msg
19− [%typed t]
20− ?- (gth (lent (tuba (trip t))) 80)
21− %.y [m(draft=t error=`"Too long") ~]
22− %.n [m(draft=t error=~) ~]
23− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
24− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
25− [%got ts] [m(todos=ts) ~]
26− [%acked err] [m(error=err) ~]
27−
28−++ subs |= m=model
29− ~[[%watch (todos.todo |=%got)]]
30−
31−++ view |= m=model
32− column ~[gap+%s2] ~[
33− heading 2 "Todos"
34− each (turn todos.m row-of)
35− each (turn todos.m row-of)
36− row ~[gap+%s1] ~[
37− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
38− button "Add" %submit
39− el ~[tone+%danger] (text (fall error.m ""))
40−
41−++ row-of |= t=item.todo
42− [id.t (toggle done.t text.t [%toggled id.t])]
43−#### /ui/todo-list/jibb two-each-orig-init
44−/= todo /ui/api/todo
45−
46−++ main (program init update view subs)
47−
48−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
49−+$ msg
50− [%typed text=@t]
51− %submit
52− [%toggled id=@ud]
53− [%got todos=(list item.todo)]
54− [%acked err=(unit @t)]
55−
56−++ init |= ts=(list item.todo)
57− [todos=ts draft="" error=~]
58−
59−++ update |= [=msg m=model]
60− ?- msg
61− [%typed t]
62− ?- (gth (lent (tuba (trip t))) 80)
63− %.y [m(draft=t error=`"Too long") ~]
64− %.n [m(draft=t error=~) ~]
65− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
66− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
67− [%got ts] [m(todos=ts) ~]
68− [%acked err] [m(error=err) ~]
69−
70−++ subs |= m=model
71− ~[[%watch (todos.todo |=%got)]]
72−
73−++ view |= m=model
74− column ~[gap+%s2] ~[
75− heading 2 "Todos"
76− each (turn todos.m row-of)
77− each (turn todos.m row-of)
78− row ~[gap+%s1] ~[
79− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
80− button "Add" %submit
81− el ~[tone+%danger] (text (fall error.m ""))
82−
83−++ row-of |= t=item.todo
84− [id.t (toggle done.t text.t [%toggled id.t])]
85−#### /ui/todo-list/jibb update-catch-all
86−/= todo /ui/api/todo
87−
88−++ main (program init update view subs)
89−
90−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
91−+$ msg
92− [%typed text=@t]
93− %submit
94− [%toggled id=@ud]
95− [%got todos=(list item.todo)]
96− [%acked err=(unit @t)]
97−
98−++ init |= ts=(list item.todo)
99− [todos=ts draft="" error=~]
100−
101−++ update |= [=msg m=model]
102− ?- msg
103− [%typed t]
104− ?- (gth (lent (tuba (trip t))) 80)
105− %.y [m(draft=t error=`"Too long") ~]
106− %.n [m(draft=t error=~) ~]
107− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
108− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
109− [%got ts] [m(todos=ts) ~]
110− * [m ~]
111−
112−++ subs |= m=model
113− ~[[%watch (todos.todo |=%got)]]
114−
115−++ view |= m=model
116− column ~[gap+%s2] ~[
117− heading 2 "Todos"
118− each (turn todos.m row-of)
119− row ~[gap+%s1] ~[
120− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
121− button "Add" %submit
122− el ~[tone+%danger] (text (fall error.m ""))
123−
124−++ row-of |= t=item.todo
125− [id.t (toggle done.t text.t [%toggled id.t])]
126−#### /ui/todo-list/jibb update-arms-reordered
127−/= todo /ui/api/todo
128−
129−++ main (program init update view subs)
130−
131−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
132−+$ msg
133− [%typed text=@t]
134− %submit
135− [%toggled id=@ud]
136− [%got todos=(list item.todo)]
137− [%acked err=(unit @t)]
138−
139−++ init |= ts=(list item.todo)
140− [todos=ts draft="" error=~]
141−
142−++ update |= [=msg m=model]
143− ?- msg
144− [%typed t]
145− ?- (gth (lent (tuba (trip t))) 80)
146− %.y [m(draft=t error=`"Too long") ~]
147− %.n [m(draft=t error=~) ~]
148− [%got ts] [m(todos=ts) ~]
149− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
150− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
151− [%acked err] [m(error=err) ~]
152−
153−++ subs |= m=model
154− ~[[%watch (todos.todo |=%got)]]
155−
156−++ view |= m=model
157− column ~[gap+%s2] ~[
158− heading 2 "Todos"
159− each (turn todos.m row-of)
160− row ~[gap+%s1] ~[
161− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
162− button "Add" %submit
163− el ~[tone+%danger] (text (fall error.m ""))
164−
165−++ row-of |= t=item.todo
166− [id.t (toggle done.t text.t [%toggled id.t])]
167−#### /ui/todo-list/jibb model-extra-field
168−/= todo /ui/api/todo
169−
170−++ main (program init update view subs)
171−
172−+$ model [todos=(list item.todo) draft=@t error=(unit @t) count=@ud]
173−+$ msg
174− [%typed text=@t]
175− %submit
176− [%toggled id=@ud]
177− [%got todos=(list item.todo)]
178− [%acked err=(unit @t)]
179−
180−++ init |= ts=(list item.todo)
181− [todos=ts draft="" error=~ count=0]
182−
183−++ update |= [=msg m=model]
184− ?- msg
185− [%typed t]
186− ?- (gth (lent (tuba (trip t))) 80)
187− %.y [m(draft=t error=`"Too long") ~]
188− %.n [m(draft=t error=~) ~]
189− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
190− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
191− [%got ts] [m(todos=ts) ~]
192− [%acked err] [m(error=err) ~]
193−
194−++ subs |= m=model
195− ~[[%watch (todos.todo |=%got)]]
196−
197−++ view |= m=model
198− column ~[gap+%s2] ~[
199− heading 2 "Todos"
200− each (turn todos.m row-of)
201− row ~[gap+%s1] ~[
202− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
203− button "Add" %submit
204− el ~[tone+%danger] (text (fall error.m ""))
205−
206−++ row-of |= t=item.todo
207− [id.t (toggle done.t text.t [%toggled id.t])]
208−#### /ui/todo-list/jibb main-open-paren
209−/= todo /ui/api/todo
210−
211−++ main (program init update
212− view
213− subs
214−
215−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
216−+$ msg
217− [%typed text=@t]
218− %submit
219− [%toggled id=@ud]
220− [%got todos=(list item.todo)]
221− [%acked err=(unit @t)]
222−
223−++ init |= ts=(list item.todo)
224− [todos=ts draft="" error=~]
225−
226−++ update |= [=msg m=model]
227− ?- msg
228− [%typed t]
229− ?- (gth (lent (tuba (trip t))) 80)
230− %.y [m(draft=t error=`"Too long") ~]
231− %.n [m(draft=t error=~) ~]
232− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
233− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
234− [%got ts] [m(todos=ts) ~]
235− [%acked err] [m(error=err) ~]
236−
237−++ subs |= m=model
238− ~[[%watch (todos.todo |=%got)]]
239−
240−++ view |= m=model
241− column ~[gap+%s2] ~[
242− heading 2 "Todos"
243− each (turn todos.m row-of)
244− row ~[gap+%s1] ~[
245− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
246− button "Add" %submit
247− el ~[tone+%danger] (text (fall error.m ""))
248−
249−++ row-of |= t=item.todo
250− [id.t (toggle done.t text.t [%toggled id.t])]
251−#### /ui/index/jibb index-two-islands
252−/= todo /ui/api/todo
253−/= todo-list /ui/todo-list
254−
255−++ main (page load view)
256−++ load |=(~ (todos.todo same))
257−
258−++ view |= ts=(list item.todo)
259− column ~[pad+%s3] ~[
260− heading 1 "My ship"
261− island main.todo-list ts
262− island main.todo-list ts
263−#### /ui/index/jibb index-island-flop
264−/= todo /ui/api/todo
265−/= todo-list /ui/todo-list
266−
267−++ main (page load view)
268−++ load |=(~ (todos.todo same))
269−
270−++ view |= ts=(list item.todo)
271− column ~[pad+%s3] ~[
272− heading 1 "My ship"
273− island main.todo-list (flop ts)
274−#### /ui/index/jibb index-hand-built-tall
275−/= todo /ui/api/todo
276−/= todo-list /ui/todo-list
277−
278−++ main (page load view)
279−++ load |= ~
280− ^- (ask (list item.todo))
281− [%pure ~]
282−
283−++ view |= ts=(list item.todo)
284− column ~[pad+%s3] ~[
285− heading 1 "My ship"
286− island main.todo-list ts
287−#### /ui/basket/jibb basket-unused-size
288−:: /ui/basket.jibb
289−/= cart /ui/stores/cart
290−
291−++ main (program init update view subs)
292−
293−+$ model [cart=state.cart note=@t]
294−+$ msg
295− [%noted text=@t]
296− %add
297− %toggle
298− [%got cart=state.cart]
299− [%acked err=(unit @t)]
300−
301−++ init |= ~
302− [cart=[items=~ open=%.n] note=""]
303−
304−++ update |= [=msg m=model]
305− ?- msg
306− [%noted t] [m(note=t) ~]
307− %add [m(note="") ~[(poke.cart [%add note.m] |=%acked)]]
308− %toggle [m ~[(poke.cart %toggle |=%acked)]]
309− [%got c] [m(cart=c) ~]
310− [%acked err] [m ~]
311−
312−++ subs |= m=model
313− ~[[%watch (state.cart |=%got)]]
314−
315−++ view |= m=model
316− column ~[gap+%s1] ~[
317− (text "{(lent items.cart.m)} items")
318− field "Item" note.m |=%noted
319− button "Add" %add
320−
321−++ size |= m=model
322− (lent items.cart.m)
323−#### /ui/basket/jibb basket-update-helper
324−:: /ui/basket.jibb
325−/= cart /ui/stores/cart
326−
327−++ main (program init update view subs)
328−
329−+$ model [cart=state.cart note=@t]
330−+$ msg
331− [%noted text=@t]
332− %add
333− %toggle
334− [%got cart=state.cart]
335− [%acked err=(unit @t)]
336−
337−++ init |= ~
338− [cart=[items=~ open=%.n] note=""]
339−
340−++ update |= [=msg m=model]
341− ?- msg
342− [%noted t] [m(note=t) ~]
343− %add [m(note="") ~[(poke.cart [%add note.m] |=%acked)]]
344− %toggle [m ~[flip]]
345− [%got c] [m(cart=c) ~]
346− [%acked err] [m ~]
347−
348−++ subs |= m=model
349− ~[[%watch (state.cart |=%got)]]
350−
351−++ view |= m=model
352− column ~[gap+%s1] ~[
353− (text "{(lent items.cart.m)} items")
354− field "Item" note.m |=%noted
355− button "Add" %add
356−
357−++ flip ^- (cmd msg) (poke.cart %toggle |=%acked)
358−#### /ui/basket/jibb basket-subs-none
359−:: /ui/basket.jibb
360−/= cart /ui/stores/cart
361−
362−++ main (program init update view subs)
363−
364−+$ model [cart=state.cart note=@t]
365−+$ msg
366− [%noted text=@t]
367− %add
368− %toggle
369− [%got cart=state.cart]
370− [%acked err=(unit @t)]
371−
372−++ init |= ~
373− [cart=[items=~ open=%.n] note=""]
374−
375−++ update |= [=msg m=model]
376− ?- msg
377− [%noted t] [m(note=t) ~]
378− %add [m(note="") ~[(poke.cart [%add note.m] |=%acked)]]
379− %toggle [m ~[(poke.cart %toggle |=%acked)]]
380− [%got c] [m(cart=c) ~]
381− [%acked err] [m ~]
382−
383−++ subs |=(m ~)
384−
385−++ view |= m=model
386− column ~[gap+%s1] ~[
387− (text "{(lent items.cart.m)} items")
388− field "Item" note.m |=%noted
389− button "Add" %add
docs/reviews/2026-11-03-milestone-2-probes/variants/p7.outdeleted−85
@@ -1,85 +0,0 @@
1−#### /ui/todo-list/jibb castinit-two-each
2−REJECTED: /ui/todo-list.jibb:41:32: nothing fixes the union of %toggled
3− [id.t (toggle done.t text.t [%toggled id.t])]
4− ^
5−#### /ui/todo-list/jibb two-each-orig-init
6−REJECTED: /ui/todo-list.jibb:14:28: nothing fixes the union of ~
7− [todos=ts draft="" error=~]
8− ^
9−#### /ui/todo-list/jibb update-catch-all
10−CHECKED
11−+$ model: [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]
12−+$ msg: msg
13−++ main: [init=$-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]) [update=$-([msg [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))]) [view=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg)) subs=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))]]]
14−++ init: $-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]])
15−++ view: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg))
16−++ row-of: $-([id=@ud [done=? text=@t]] [key=@ud el=(element msg)])
17−++ subs: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))
18−++ update: $-([msg=msg m=[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))])
19−#### /ui/todo-list/jibb update-arms-reordered
20−CHECKED
21−+$ model: [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]
22−+$ msg: msg
23−++ main: [init=$-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]) [update=$-([msg [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))]) [view=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg)) subs=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))]]]
24−++ init: $-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]])
25−++ view: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg))
26−++ row-of: $-([id=@ud [done=? text=@t]] [key=@ud el=(element msg)])
27−++ subs: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))
28−++ update: $-([msg=msg m=[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))])
29−#### /ui/todo-list/jibb model-extra-field
30−CHECKED
31−+$ model: [todos=(list [id=@ud [done=? text=@t]]) [draft=@t [error=(unit @t) count=@ud]]]
32−+$ msg: msg
33−++ main: [init=$-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t [error=(unit @t) count=@ud]]]) [update=$-([msg [todos=(list [id=@ud [done=? text=@t]]) [draft=@t [error=(unit @t) count=@ud]]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t [error=(unit @t) count=@ud]]] (list (cmd msg))]) [view=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t [error=(unit @t) count=@ud]]] (element msg)) subs=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t [error=(unit @t) count=@ud]]] (list (sub msg)))]]]
34−++ init: $-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t [error=(unit @t) count=@ud]]])
35−++ view: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t [error=(unit @t) count=@ud]]] (element msg))
36−++ row-of: $-([id=@ud [done=? text=@t]] [key=@ud el=(element msg)])
37−++ subs: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t [error=(unit @t) count=@ud]]] (list (sub msg)))
38−++ update: $-([msg=msg m=[todos=(list [id=@ud [done=? text=@t]]) [draft=@t [error=(unit @t) count=@ud]]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t [error=(unit @t) count=@ud]]] (list (cmd msg))])
39−#### /ui/todo-list/jibb main-open-paren
40−CHECKED
41−+$ model: [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]
42−+$ msg: msg
43−++ main: [init=$-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]) [update=$-([msg [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))]) [view=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg)) subs=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))]]]
44−++ init: $-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]])
45−++ view: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg))
46−++ row-of: $-([id=@ud [done=? text=@t]] [key=@ud el=(element msg)])
47−++ subs: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))
48−++ update: $-([msg=msg m=[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))])
49−#### /ui/index/jibb index-two-islands
50−CHECKED
51−++ main: [load=$-(~ (ask (list [id=@ud [done=? text=@t]]))) view=$-((list [id=@ud [done=? text=@t]]) (element !!))]
52−++ view: $-((list [id=@ud [done=? text=@t]]) (element !!))
53−++ load: $-(~ (ask (list [id=@ud [done=? text=@t]])))
54−#### /ui/index/jibb index-island-flop
55−CHECKED
56−++ main: [load=$-(~ (ask (list [id=@ud [done=? text=@t]]))) view=$-((list [id=@ud [done=? text=@t]]) (element !!))]
57−++ view: $-((list [id=@ud [done=? text=@t]]) (element !!))
58−++ load: $-(~ (ask (list [id=@ud [done=? text=@t]])))
59−#### /ui/index/jibb index-hand-built-tall
60−REJECTED: module source does not parse: /ui/index/jibb
61−#### /ui/basket/jibb basket-unused-size
62−CHECKED
63−+$ model: [cart=[items=(list @t) open=?] note=@t]
64−+$ msg: msg
65−++ main: [init=$-(~ [cart=[items=(list @t) open=?] note=@t]) [update=$-([msg [cart=[items=(list @t) open=?] note=@t]] [[cart=[items=(list @t) open=?] note=@t] (list (cmd msg))]) [view=$-([cart=[items=(list @t) open=?] note=@t] (element msg)) subs=$-([cart=[items=(list @t) open=?] note=@t] (list (sub msg)))]]]
66−++ init: $-(~ [cart=[items=(list @t) open=?] note=@t])
67−++ view: $-([cart=[items=(list @t) open=?] note=@t] (element msg))
68−++ subs: $-([cart=[items=(list @t) open=?] note=@t] (list (sub msg)))
69−++ update: $-([msg=msg m=[cart=[items=(list @t) open=?] note=@t]] [[cart=[items=(list @t) open=?] note=@t] (list (cmd msg))])
70−++ size: $-([cart=[items=(list @t) open=?] note=@t] @ud)
71−#### /ui/basket/jibb basket-update-helper
72−CHECKED
73−+$ model: [cart=[items=(list @t) open=?] note=@t]
74−+$ msg: msg
75−++ main: [init=$-(~ [cart=[items=(list @t) open=?] note=@t]) [update=$-([msg [cart=[items=(list @t) open=?] note=@t]] [[cart=[items=(list @t) open=?] note=@t] (list (cmd msg))]) [view=$-([cart=[items=(list @t) open=?] note=@t] (element msg)) subs=$-([cart=[items=(list @t) open=?] note=@t] (list (sub msg)))]]]
76−++ init: $-(~ [cart=[items=(list @t) open=?] note=@t])
77−++ view: $-([cart=[items=(list @t) open=?] note=@t] (element msg))
78−++ subs: $-([cart=[items=(list @t) open=?] note=@t] (list (sub msg)))
79−++ update: $-([msg=msg m=[cart=[items=(list @t) open=?] note=@t]] [[cart=[items=(list @t) open=?] note=@t] (list (cmd msg))])
80−++ flip: (cmd msg)
81−#### /ui/basket/jibb basket-subs-none
82−REJECTED: /ui/basket.jibb:15:16: nothing fixes the union of ~
83− [cart=[items=~ open=%.n] note=""]
84− ^
85−
docs/reviews/2026-11-03-milestone-2-probes/variants/p8.jibbdeleted−342
@@ -1,342 +0,0 @@
1−#### /ui/todo-list/jibb todo-full-wrong-model
2−/= todo /ui/api/todo
3−
4−++ main (program init update view subs)
5−
6−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
7−+$ msg
8− [%typed text=@t]
9− %submit
10− [%toggled id=@ud]
11− [%got todos=(list item.todo)]
12− [%acked err=(unit @t)]
13−
14−++ init |= ts=(list item.todo)
15− [ts "" ~]
16−
17−++ update |= [=msg m=model]
18− ?- msg
19− [%typed t]
20− ?- (gth (lent (tuba (trip t))) 80)
21− %.y [m(draft=t error=`"Too long") ~]
22− %.n [m(draft=t error=~) ~]
23− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
24− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
25− [%got ts] [m(todos=ts) ~]
26− [%acked err] [m(error=err) ~]
27−
28−++ subs |= m=[count=@ud]
29− ~[[%watch (todos.todo |=%got)]]
30−
31−++ view |= m=model
32− column ~[gap+%s2] ~[
33− heading 2 "Todos"
34− each (turn todos.m row-of)
35− row ~[gap+%s1] ~[
36− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
37− button "Add" %submit
38− el ~[tone+%danger] (text (fall error.m ""))
39−
40−++ row-of |= t=item.todo
41− [id.t (toggle done.t text.t [%toggled id.t])]
42−#### /ui/todo-list/jibb todo-full-wrong-message
43−/= todo /ui/api/todo
44−
45−++ main (program init update view subs)
46−
47−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
48−+$ msg
49− [%typed text=@t]
50− %submit
51− [%toggled id=@ud]
52− [%got todos=(list item.todo)]
53− [%acked err=(unit @t)]
54−
55−++ init |= ts=(list item.todo)
56− [ts "" ~]
57−
58−++ update |= [=msg m=model]
59− ?- msg
60− [%typed t]
61− ?- (gth (lent (tuba (trip t))) 80)
62− %.y [m(draft=t error=`"Too long") ~]
63− %.n [m(draft=t error=~) ~]
64− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
65− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
66− [%got ts] [m(todos=ts) ~]
67− [%acked err] [m(error=err) ~]
68−
69−++ subs |= m=model
70− ~[[%watch (todos.todo |=%got)]]
71−
72−++ view |= m=model
73− column ~[gap+%s2] ~[
74− heading 2 "Todos"
75− each (turn todos.m row-of)
76− row ~[gap+%s1] ~[
77− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
78− button "Add" %submit
79− el ~[tone+%danger] (text (fall error.m ""))
80−
81−++ row-of |= t=item.todo
82− [id.t (toggle done.t text.t [%other])]
83−#### /ui/todo-list/jibb todo-full-wrong-result
84−/= todo /ui/api/todo
85−
86−++ main (program init update view subs)
87−
88−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
89−+$ msg
90− [%typed text=@t]
91− %submit
92− [%toggled id=@ud]
93− [%got todos=(list item.todo)]
94− [%acked err=(unit @t)]
95−
96−++ init |= ts=(list item.todo)
97− [ts "" ~]
98−
99−++ update |= [=msg m=model]
100− ?- msg
101− [%typed t]
102− ?- (gth (lent (tuba (trip t))) 80)
103− %.y [m(draft=t error=`"Too long") ~]
104− %.n [m(draft=t error=~) ~]
105− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
106− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
107− [%got ts] [m(todos=ts) ~]
108− [%acked err] [m(error=err) ~]
109−
110−++ subs |= m=model
111− ~[[%watch (todos.todo |=%got)]]
112−
113−++ view |= m=model
114− column ~[gap+%s2] ~[
115− heading 2 "Todos"
116− each (turn todos.m row-of)
117− row ~[gap+%s1] ~[
118− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
119− button "Add" %submit
120− el ~[tone+%danger] (text (fall error.m ""))
121−
122−++ row-of |= t=item.todo
123− text.t
124−#### /ui/todo-list/jibb todo-full-open-key
125−/= todo /ui/api/todo
126−
127−++ main (program init update view subs)
128−
129−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
130−+$ msg
131− [%typed text=@t]
132− %submit
133− [%toggled id=@ud]
134− [%got todos=(list item.todo)]
135− [%acked err=(unit @t)]
136−
137−++ init |= ts=(list item.todo)
138− [ts "" ~]
139−
140−++ update |= [=msg m=model]
141− ?- msg
142− [%typed t]
143− ?- (gth (lent (tuba (trip t))) 80)
144− %.y [m(draft=t error=`"Too long") ~]
145− %.n [m(draft=t error=~) ~]
146− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
147− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
148− [%got ts] [m(todos=ts) ~]
149− [%acked err] [m(error=err) ~]
150−
151−++ subs |= m=model
152− ~[[%watch (todos.todo |=%got)]]
153−
154−++ view |= m=model
155− column ~[gap+%s2] ~[
156− heading 2 "Todos"
157− each (turn todos.m row-of)
158− row ~[gap+%s1] ~[
159− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
160− button "Add" %submit
161− el ~[tone+%danger] (text (fall error.m ""))
162−
163−++ row-of |= t=item.todo
164− [!! (toggle done.t text.t [%toggled id.t])]
165−#### /ui/todo-list/jibb todo-full-wrong-watch
166−/= todo /ui/api/todo
167−
168−++ main (program init update view subs)
169−
170−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
171−+$ msg
172− [%typed text=@t]
173− %submit
174− [%toggled id=@ud]
175− [%got todos=(list item.todo)]
176− [%acked err=(unit @t)]
177−
178−++ init |= ts=(list item.todo)
179− [ts "" ~]
180−
181−++ update |= [=msg m=model]
182− ?- msg
183− [%typed t]
184− ?- (gth (lent (tuba (trip t))) 80)
185− %.y [m(draft=t error=`"Too long") ~]
186− %.n [m(draft=t error=~) ~]
187− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
188− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
189− [%got ts] [m(todos=ts) ~]
190− [%acked err] [m(error=err) ~]
191−
192−++ subs |= m=model
193− ~[[%watch (pure %submit)]]
194−
195−++ view |= m=model
196− column ~[gap+%s2] ~[
197− heading 2 "Todos"
198− each (turn todos.m row-of)
199− row ~[gap+%s1] ~[
200− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
201− button "Add" %submit
202− el ~[tone+%danger] (text (fall error.m ""))
203−
204−++ row-of |= t=item.todo
205− [id.t (toggle done.t text.t [%toggled id.t])]
206−#### /ui/todo-list/jibb todo-full-non-gate-view
207−/= todo /ui/api/todo
208−
209−++ main (program init update view subs)
210−
211−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
212−+$ msg
213− [%typed text=@t]
214− %submit
215− [%toggled id=@ud]
216− [%got todos=(list item.todo)]
217− [%acked err=(unit @t)]
218−
219−++ init |= ts=(list item.todo)
220− [ts "" ~]
221−
222−++ update |= [=msg m=model]
223− ?- msg
224− [%typed t]
225− ?- (gth (lent (tuba (trip t))) 80)
226− %.y [m(draft=t error=`"Too long") ~]
227− %.n [m(draft=t error=~) ~]
228− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
229− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
230− [%got ts] [m(todos=ts) ~]
231− [%acked err] [m(error=err) ~]
232−
233−++ subs |= m=model
234− ~[[%watch (todos.todo |=%got)]]
235−
236−++ view init
237−
238−++ row-of |= t=item.todo
239− [id.t (toggle done.t text.t [%toggled id.t])]
240−#### /ui/todo-list/jibb todo-full-cast-init
241−/= todo /ui/api/todo
242−
243−++ main (program init update view subs)
244−
245−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
246−+$ msg
247− [%typed text=@t]
248− %submit
249− [%toggled id=@ud]
250− [%got todos=(list item.todo)]
251− [%acked err=(unit @t)]
252−
253−++ make-model |= ts=(list item.todo)
254− ^- model [ts "" ~]
255−
256−++ init ^- $-((list item.todo) model)
257− |= ts=(list item.todo) (make-model ts)
258−
259−++ update |= [=msg m=model]
260− ?- msg
261− [%typed t]
262− ?- (gth (lent (tuba (trip t))) 80)
263− %.y [m(draft=t error=`"Too long") ~]
264− %.n [m(draft=t error=~) ~]
265− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
266− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
267− [%got ts] [m(todos=ts) ~]
268− [%acked err] [m(error=err) ~]
269−
270−++ subs |= m=model
271− ~[[%watch (todos.todo |=%got)]]
272−
273−++ view |= m=model
274− column ~[gap+%s2] ~[
275− heading 2 "Todos"
276− each (turn todos.m row-of)
277− row ~[gap+%s1] ~[
278− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
279− button "Add" %submit
280− el ~[tone+%danger] (text (fall error.m ""))
281−
282−++ row-of |= t=item.todo
283− [id.t (toggle done.t text.t [%toggled id.t])]
284−#### /ui/theme/jibb theme-dark-absent
285−++ theme ^- theme
286− [ space=[s1="4px" s2="8px" s3="16px"]
287− tones=[normal="#222" background="#fff" accent="#17734f" danger="#b3261e" muted="#5f5f5f"]
288− wide="60rem"
289− lang="en"
290− zone="UTC"
291− font=`%/static/fonts/inter.woff2
292− dark=~
293−#### /ui/theme/jibb theme-wrong-nested-aura
294−++ theme ^- theme
295− [ space=[s1="4px" s2="8px" s3="16px"]
296− tones=[normal=~zod background="#fff" accent="#17734f" danger="#b3261e" muted="#5f5f5f"]
297− wide="60rem"
298− lang="en"
299− zone="UTC"
300− font=`%/static/fonts/inter.woff2
301− dark=[tones=[normal="#eee" background="#111" accent="#4c9" danger="#f28b82" muted="#aaa"]]
302−#### /ui/theme/jibb theme-missing-field
303−++ theme ^- theme
304− [ space=[s1="4px" s2="8px" s3="16px"]
305− tones=[normal="#222" background="#fff" accent="#17734f" danger="#b3261e" muted="#5f5f5f"]
306− wide="60rem"
307− lang="en"
308− font=`%/static/fonts/inter.woff2
309− dark=[tones=[normal="#eee" background="#111" accent="#4c9" danger="#f28b82" muted="#aaa"]]
310−#### /ui/theme/jibb theme-wrong-font
311−++ theme ^- theme
312− [ space=[s1="4px" s2="8px" s3="16px"]
313− tones=[normal="#222" background="#fff" accent="#17734f" danger="#b3261e" muted="#5f5f5f"]
314− wide="60rem"
315− lang="en"
316− zone="UTC"
317− font=`"/static/fonts/inter.woff2"
318− dark=[tones=[normal="#eee" background="#111" accent="#4c9" danger="#f28b82" muted="#aaa"]]
319−#### /ui/theme/jibb theme-wrong-dark
320−++ theme ^- theme
321− [ space=[s1="4px" s2="8px" s3="16px"]
322− tones=[normal="#222" background="#fff" accent="#17734f" danger="#b3261e" muted="#5f5f5f"]
323− wide="60rem"
324− lang="en"
325− zone="UTC"
326− font=`%/static/fonts/inter.woff2
327− dark="dark"
328−#### /ui/index/jibb page-main-wrong-static
329−++ main (button "Go" %go)
330−#### /ui/index/jibb page-main-arbitrary-main
331−++ main 42
332−#### /tests/page-main/ctor/jibb page-main-ctor-page
333−/= todo /ui/api/todo
334−
335−+$ msg
336− [%got todos=(list item.todo)]
337−++ main (page load view)
338−++ load |= ~
339− ^- (ask msg) (todos.todo |=%got)
340−
341−++ view |= m=msg
342− text "Todos loaded"
docs/reviews/2026-11-03-milestone-2-probes/variants/p8.outdeleted−57
@@ -1,57 +0,0 @@
1−#### /ui/todo-list/jibb todo-full-wrong-model
2−REJECTED: /ui/todo-list.jibb:14:10: nothing fixes the union of ~
3− [ts "" ~]
4− ^
5−#### /ui/todo-list/jibb todo-full-wrong-message
6−REJECTED: /ui/todo-list.jibb:14:10: nothing fixes the union of ~
7− [ts "" ~]
8− ^
9−#### /ui/todo-list/jibb todo-full-wrong-result
10−REJECTED: /ui/todo-list.jibb:14:10: nothing fixes the union of ~
11− [ts "" ~]
12− ^
13−#### /ui/todo-list/jibb todo-full-open-key
14−REJECTED: /ui/todo-list.jibb:14:10: nothing fixes the union of ~
15− [ts "" ~]
16− ^
17−#### /ui/todo-list/jibb todo-full-wrong-watch
18−REJECTED: module kind needs unsupported inference: /ui/todo-list/jibb
19−#### /ui/todo-list/jibb todo-full-non-gate-view
20−REJECTED: /ui/todo-list.jibb:14:10: nothing fixes the union of ~
21− [ts "" ~]
22− ^
23−#### /ui/todo-list/jibb todo-full-cast-init
24−CHECKED
25−+$ model: [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]
26−+$ msg: msg
27−++ main: [init=$-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]) [update=$-([msg [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))]) [view=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg)) subs=$-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))]]]
28−++ view: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (element msg))
29−++ row-of: $-([id=@ud [done=? text=@t]] [key=@ud el=(element msg)])
30−++ subs: $-([todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (sub msg)))
31−++ update: $-([msg=msg m=[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]]] [[todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]] (list (cmd msg))])
32−++ init: $-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]])
33−++ make-model: $-((list [id=@ud [done=? text=@t]]) [todos=(list [id=@ud [done=? text=@t]]) [draft=@t error=(unit @t)]])
34−#### /ui/theme/jibb theme-dark-absent
35−CHECKED
36−++ theme: [space=[s1=@t [s2=@t s3=@t]] [tones=[normal=@t [background=@t [accent=@t [danger=@t muted=@t]]]] [wide=@t [lang=@t [zone=@t [font=(unit qath) dark=(unit [tones=[normal=@t [background=@t [accent=@t [danger=@t muted=@t]]]]])]]]]]]
37−#### /ui/theme/jibb theme-wrong-nested-aura
38−REJECTED: module definitions need unsupported inference: /ui/theme/jibb: ++ theme
39−#### /ui/theme/jibb theme-missing-field
40−REJECTED: module definitions need unsupported inference: /ui/theme/jibb: ++ theme
41−#### /ui/theme/jibb theme-wrong-font
42−REJECTED: module definitions need unsupported inference: /ui/theme/jibb: ++ theme
43−#### /ui/theme/jibb theme-wrong-dark
44−REJECTED: module definitions need unsupported inference: /ui/theme/jibb: ++ theme
45−#### /ui/index/jibb page-main-wrong-static
46−REJECTED: /ui/index.jibb:1:22: nothing fixes the union of %go
47−++ main (button "Go" %go)
48− ^
49−#### /ui/index/jibb page-main-arbitrary-main
50−REJECTED: module kind needs unsupported inference: /ui/index/jibb
51−#### /tests/page-main/ctor/jibb page-main-ctor-page
52−CHECKED
53−+$ msg: [%got todos=(list [id=@ud [done=? text=@t]])]
54−++ main: [load=$-(~ (ask [%got todos=(list [id=@ud [done=? text=@t]])])) view=$-([%got todos=(list [id=@ud [done=? text=@t]])] (element !!))]
55−++ view: $-([%got todos=(list [id=@ud [done=? text=@t]])] (element A))
56−++ load: $-(~ (ask [%got todos=(list [id=@ud [done=? text=@t]])]))
57−
docs/reviews/2026-11-03-milestone-2-probes/variants/p9.jibbdeleted−311
@@ -1,311 +0,0 @@
1−#### /ui/todo-list/jibb typo-submitt-view
2−/= todo /ui/api/todo
3−
4−++ main (program init update view subs)
5−
6−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
7−+$ msg
8− [%typed text=@t]
9− %submit
10− [%toggled id=@ud]
11− [%got todos=(list item.todo)]
12− [%acked err=(unit @t)]
13−
14−++ init |= ts=(list item.todo)
15− [todos=ts draft="" error=~]
16−
17−++ update |= [=msg m=model]
18− ?- msg
19− [%typed t]
20− ?- (gth (lent (tuba (trip t))) 80)
21− %.y [m(draft=t error=`"Too long") ~]
22− %.n [m(draft=t error=~) ~]
23− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
24− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
25− [%got ts] [m(todos=ts) ~]
26− [%acked err] [m(error=err) ~]
27−
28−++ subs |= m=model
29− ~[[%watch (todos.todo |=%got)]]
30−
31−++ view |= m=model
32− column ~[gap+%s2] ~[
33− heading 2 "Todos"
34− each (turn todos.m row-of)
35− row ~[gap+%s1] ~[
36− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
37− button "Add" %submitt
38− el ~[tone+%danger] (text (fall error.m ""))
39−
40−++ row-of |= t=item.todo
41− [id.t (toggle done.t text.t [%toggled id.t])]
42−#### /ui/todo-list/jibb typo-typd-ctor
43−/= todo /ui/api/todo
44−
45−++ main (program init update view subs)
46−
47−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
48−+$ msg
49− [%typed text=@t]
50− %submit
51− [%toggled id=@ud]
52− [%got todos=(list item.todo)]
53− [%acked err=(unit @t)]
54−
55−++ init |= ts=(list item.todo)
56− [todos=ts draft="" error=~]
57−
58−++ update |= [=msg m=model]
59− ?- msg
60− [%typed t]
61− ?- (gth (lent (tuba (trip t))) 80)
62− %.y [m(draft=t error=`"Too long") ~]
63− %.n [m(draft=t error=~) ~]
64− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
65− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
66− [%got ts] [m(todos=ts) ~]
67− [%acked err] [m(error=err) ~]
68−
69−++ subs |= m=model
70− ~[[%watch (todos.todo |=%got)]]
71−
72−++ view |= m=model
73− column ~[gap+%s2] ~[
74− heading 2 "Todos"
75− each (turn todos.m row-of)
76− row ~[gap+%s1] ~[
77− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typd)
78− button "Add" %submit
79− el ~[tone+%danger] (text (fall error.m ""))
80−
81−++ row-of |= t=item.todo
82− [id.t (toggle done.t text.t [%toggled id.t])]
83−#### /ui/todo-list/jibb typo-in-update-pattern
84−/= todo /ui/api/todo
85−
86−++ main (program init update view subs)
87−
88−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
89−+$ msg
90− [%typed text=@t]
91− %submit
92− [%toggled id=@ud]
93− [%got todos=(list item.todo)]
94− [%acked err=(unit @t)]
95−
96−++ init |= ts=(list item.todo)
97− [todos=ts draft="" error=~]
98−
99−++ update |= [=msg m=model]
100− ?- msg
101− [%typed t]
102− ?- (gth (lent (tuba (trip t))) 80)
103− %.y [m(draft=t error=`"Too long") ~]
104− %.n [m(draft=t error=~) ~]
105− %submitt [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
106− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
107− [%got ts] [m(todos=ts) ~]
108− [%acked err] [m(error=err) ~]
109−
110−++ subs |= m=model
111− ~[[%watch (todos.todo |=%got)]]
112−
113−++ view |= m=model
114− column ~[gap+%s2] ~[
115− heading 2 "Todos"
116− each (turn todos.m row-of)
117− row ~[gap+%s1] ~[
118− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
119− button "Add" %submit
120− el ~[tone+%danger] (text (fall error.m ""))
121−
122−++ row-of |= t=item.todo
123− [id.t (toggle done.t text.t [%toggled id.t])]
124−#### /ui/todo-list/jibb missing-case-in-update
125−/= todo /ui/api/todo
126−
127−++ main (program init update view subs)
128−
129−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
130−+$ msg
131− [%typed text=@t]
132− %submit
133− [%toggled id=@ud]
134− [%got todos=(list item.todo)]
135− [%acked err=(unit @t)]
136−
137−++ init |= ts=(list item.todo)
138− [todos=ts draft="" error=~]
139−
140−++ update |= [=msg m=model]
141− ?- msg
142− [%typed t]
143− ?- (gth (lent (tuba (trip t))) 80)
144− %.y [m(draft=t error=`"Too long") ~]
145− %.n [m(draft=t error=~) ~]
146− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
147− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
148− [%got ts] [m(todos=ts) ~]
149−
150−++ subs |= m=model
151− ~[[%watch (todos.todo |=%got)]]
152−
153−++ view |= m=model
154− column ~[gap+%s2] ~[
155− heading 2 "Todos"
156− each (turn todos.m row-of)
157− row ~[gap+%s1] ~[
158− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
159− button "Add" %submit
160− el ~[tone+%danger] (text (fall error.m ""))
161−
162−++ row-of |= t=item.todo
163− [id.t (toggle done.t text.t [%toggled id.t])]
164−#### /ui/todo-list/jibb aura-mismatch-update
165−/= todo /ui/api/todo
166−
167−++ main (program init update view subs)
168−
169−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
170−+$ msg
171− [%typed text=@t]
172− %submit
173− [%toggled id=@ud]
174− [%got todos=(list item.todo)]
175− [%acked err=(unit @t)]
176−
177−++ init |= ts=(list item.todo)
178− [todos=ts draft="" error=~]
179−
180−++ update |= [=msg m=model]
181− ?- msg
182− [%typed t]
183− ?- (gth (lent (tuba (trip t))) 80)
184− %.y [m(draft=t error=`"Too long") ~]
185− %.n [m(draft=~zod error=~) ~]
186− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
187− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
188− [%got ts] [m(todos=ts) ~]
189− [%acked err] [m(error=err) ~]
190−
191−++ subs |= m=model
192− ~[[%watch (todos.todo |=%got)]]
193−
194−++ view |= m=model
195− column ~[gap+%s2] ~[
196− heading 2 "Todos"
197− each (turn todos.m row-of)
198− row ~[gap+%s1] ~[
199− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
200− button "Add" %submit
201− el ~[tone+%danger] (text (fall error.m ""))
202−
203−++ row-of |= t=item.todo
204− [id.t (toggle done.t text.t [%toggled id.t])]
205−#### /ui/todo-list/jibb dead-arm-update
206−/= todo /ui/api/todo
207−
208−++ main (program init update view subs)
209−
210−+$ model [todos=(list item.todo) draft=@t error=(unit @t)]
211−+$ msg
212− [%typed text=@t]
213− %submit
214− [%toggled id=@ud]
215− [%got todos=(list item.todo)]
216− [%acked err=(unit @t)]
217−
218−++ init |= ts=(list item.todo)
219− [todos=ts draft="" error=~]
220−
221−++ update |= [=msg m=model]
222− ?- msg
223− [%typed t]
224− ?- (gth (lent (tuba (trip t))) 80)
225− %.y [m(draft=t error=`"Too long") ~]
226− %.n [m(draft=t error=~) ~]
227− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
228− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
229− [%got ts] [m(todos=ts) ~]
230− [%acked err] [m(error=err) ~]
231− %submit [m ~]
232−
233−++ subs |= m=model
234− ~[[%watch (todos.todo |=%got)]]
235−
236−++ view |= m=model
237− column ~[gap+%s2] ~[
238− heading 2 "Todos"
239− each (turn todos.m row-of)
240− row ~[gap+%s1] ~[
241− el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
242− button "Add" %submit
243− el ~[tone+%danger] (text (fall error.m ""))
244−
245−++ row-of |= t=item.todo
246− [id.t (toggle done.t text.t [%toggled id.t])]
247−#### /ui/basket/jibb basket-typo-addd
248−:: /ui/basket.jibb
249−/= cart /ui/stores/cart
250−
251−++ main (program init update view subs)
252−
253−+$ model [cart=state.cart note=@t]
254−+$ msg
255− [%noted text=@t]
256− %add
257− %toggle
258− [%got cart=state.cart]
259− [%acked err=(unit @t)]
260−
261−++ init |= ~
262− [cart=[items=~ open=%.n] note=""]
263−
264−++ update |= [=msg m=model]
265− ?- msg
266− [%noted t] [m(note=t) ~]
267− %add [m(note="") ~[(poke.cart [%add note.m] |=%acked)]]
268− %toggle [m ~[(poke.cart %toggle |=%acked)]]
269− [%got c] [m(cart=c) ~]
270− [%acked err] [m ~]
271−
272−++ subs |= m=model
273− ~[[%watch (state.cart |=%got)]]
274−
275−++ view |= m=model
276− column ~[gap+%s1] ~[
277− (text "{(lent items.cart.m)} items")
278− field "Item" note.m |=%noted
279− button "Add" %addd
280−#### /ui/basket/jibb basket-missing-case
281−:: /ui/basket.jibb
282−/= cart /ui/stores/cart
283−
284−++ main (program init update view subs)
285−
286−+$ model [cart=state.cart note=@t]
287−+$ msg
288− [%noted text=@t]
289− %add
290− %toggle
291− [%got cart=state.cart]
292− [%acked err=(unit @t)]
293−
294−++ init |= ~
295− [cart=[items=~ open=%.n] note=""]
296−
297−++ update |= [=msg m=model]
298− ?- msg
299− [%noted t] [m(note=t) ~]
300− %add [m(note="") ~[(poke.cart [%add note.m] |=%acked)]]
301− %toggle [m ~[(poke.cart %toggle |=%acked)]]
302− [%got c] [m(cart=c) ~]
303−
304−++ subs |= m=model
305− ~[[%watch (state.cart |=%got)]]
306−
307−++ view |= m=model
308− column ~[gap+%s1] ~[
309− (text "{(lent items.cart.m)} items")
310− field "Item" note.m |=%noted
311− button "Add" %add
docs/reviews/2026-11-03-milestone-2-probes/variants/p9.outdeleted−33
@@ -1,33 +0,0 @@
1−#### /ui/todo-list/jibb typo-submitt-view
2−REJECTED: /ui/todo-list.jibb:14:28: nothing fixes the union of ~
3− [todos=ts draft="" error=~]
4− ^
5−#### /ui/todo-list/jibb typo-typd-ctor
6−REJECTED: /ui/todo-list.jibb:14:28: nothing fixes the union of ~
7− [todos=ts draft="" error=~]
8− ^
9−#### /ui/todo-list/jibb typo-in-update-pattern
10−REJECTED: /ui/todo-list.jibb:14:28: nothing fixes the union of ~
11− [todos=ts draft="" error=~]
12− ^
13−#### /ui/todo-list/jibb missing-case-in-update
14−REJECTED: /ui/todo-list.jibb:14:28: nothing fixes the union of ~
15− [todos=ts draft="" error=~]
16− ^
17−#### /ui/todo-list/jibb aura-mismatch-update
18−REJECTED: /ui/todo-list.jibb:14:28: nothing fixes the union of ~
19− [todos=ts draft="" error=~]
20− ^
21−#### /ui/todo-list/jibb dead-arm-update
22−REJECTED: /ui/todo-list.jibb:14:28: nothing fixes the union of ~
23− [todos=ts draft="" error=~]
24− ^
25−#### /ui/basket/jibb basket-typo-addd
26−REJECTED: /ui/basket.jibb:15:16: nothing fixes the union of ~
27− [cart=[items=~ open=%.n] note=""]
28− ^
29−#### /ui/basket/jibb basket-missing-case
30−REJECTED: /ui/basket.jibb:15:16: nothing fixes the union of ~
31− [cart=[items=~ open=%.n] note=""]
32− ^
33−
docs/reviews/2026-11-03-milestone-2-review.mddeleted−115
@@ -1,115 +0,0 @@
1−# Milestone 2 review, 2026-11-03
2−
3−A review of milestone 2, "Types and prelude", at [`f84a29e`](https://github.com/iko-soy/jibb/commit/f84a29e1a0af663afdb77e793c933470b59a249b), asked for in the project chat. It judges the combined result of the milestone's commits, from `1dd92a6` ("Start type inference and Hoon imports", 2026-10-30) to `f84a29e`, about 150 of them, against the plan in [implementation-plan.md](../spec/implementation-plan.md) and the brief in [prompts/milestone-2.md](../prompts/milestone-2.md). It builds on the [repository review of 2026-11-02](2026-11-02-repo-review.md) (findings A1 to A137, at `4bf477e`) and does not repeat what that review settled.
4−
5−**This is a first version.** The review runs in nine areas. Two have finished: whether the doc's examples typecheck (done-criterion 1) and whether every error the spec describes has a test with its message (done-criterion 2). The other seven are still running: the Hoon import table (done-criterion 3), inference soundness, unions and `?-`, modules, APIs and the prelude, what became of the earlier review's findings, tests and docs, and architecture and speed. Their results, and a second reviewer's check of every finding, will be added to this file. The findings below had one reviewer each, who reproduced them with probes; the headline ones (M1, M2, M3 and M9) were reproduced again for this write-up.
6−
7−What is left to build is briefed in [prompts/milestone-2-finish.md](../prompts/milestone-2-finish.md). The probe sources behind the findings, with the checker's output for each, are in [2026-11-03-milestone-2-probes/](2026-11-03-milestone-2-probes/), with a script to rerun them.
8−
9−Line numbers are links into `f84a29e`.
10−
11−## Verdict
12−
13−**Milestone 2 is not done by its own "Done when" list.** Every check passes, the 14 `jibb` blocks of the doc check as written, and nothing wrong that the core probes tried was accepted. But the checker that a build will run, the full module checker, reports almost every error in the spec as "module definitions need unsupported inference: <path>: ++ name", with no line, column or excerpt. And the island, page and store checks are fitted to the examples' exact shapes, so small valid edits are rejected, often with a wrong error. `docs/status.md` still says "In progress", which matches; its rewrite as a capability table (`e97aebe`) landed while this review ran.
14−
15−| Plan item | Status | Evidence |
16−| --- | --- | --- |
17−| Done when: the doc's examples typecheck, except those written as errors | **Met as written, fragile** | All 14 blocks check with exact types (`jibb-doc-examples`, `jibb-todo-full`, `jibb-store`, `jibb-page-main`, `jibb-theme`, `jibb-buttons`), and `add-button` fails with "nothing fixes the union of %add". Of about 90 spec-valid one-edit variants of those modules, about 27 are rejected (M2, M4) |
18−| Done when: each error the Grammar tab describes has a test with its message | **Not met** | Of the 33 errors the spec describes, 4 have a test and get their message from the full checker. 28 don't get their message from the full checker, most of them only the generic "needs unsupported inference"; the partial report, which no build runs, has a message for most of those. One, a repeated attribute, is accepted (M1, M3, the [error table](#appendix-the-errors-the-spec-describes)) |
19−| Done when: a `/sur` file with `$%`, `$@`, maps and a recursive mold imports as the table says | Not yet reviewed | Still running. The earlier review's A50 (only `%tas` head tags, no `each` or `json`) and A14 (bare `@`, `@uw`) were open at `4bf477e` |
20−| Each milestone ends with its checks passing on a fake ship | **Met** | `nix flake check`: 11 of 11 checks pass, the ship group on a fresh fake `~zod` ([Check run](#check-run)) |
21−| Brief: on the ship, the `my-app` desk checked with its Hoon types read through Clay, every module but `buttons.jibb` checking | **Not met** | No check walks `my-app/ui`. The suites compile `/sur` and mark text themselves with `ride`; Clay-built types reach only the partial report (M8) |
22−| Builds: exhaustive `?-` with dead-arm errors | Partly | Flat whole-case unions only; the Grammar's own `[%move * *]` example is "not supported" (M10) |
23−| Builds: the prelude's types | Partly | `max`, which the Grammar's `clamp` example calls, is missing; a repeated attribute is accepted; a hand-built element checks (M9). The full inventory review is still running |
24−| Builds: Hindley–Milner inference, deferred constraints, union disjointness, imports, API files | Still running | Early probe results are under [Early results](#early-results-from-the-areas-still-running) |
25−
26−## Check run
27−
28−`nix flake check` at `f84a29e`, on 4 CPUs, took 471 s and passed every check:
29−
30−| Group | Checks | Result | Time |
31−| --- | --- | --- | --- |
32−| eval | `selftest`, `golden`, `arms-1` to `arms-4`, `doc-blocks` | 7 of 7 pass | 225 s |
33−| ship, on a fake `~zod` booted in the sandbox | `ship-selftest`, `ship-test`, `check-commit`, `clay-fixtures` | 4 of 4 pass | 414 s |
34−
35−The corpus has 691 golden cases, 304 of them with a `types.txt`, and 58 suites in `tests/lib` with 62 test arms. All 304 `types.txt` files are partial reports that begin "partial inference; module not checked".
36−
37−## What works
38−
39−- The 14 doc blocks check with exact, closed types, including the todo island, the cart store and basket, the theme, the three pages and the imports example, and the `cmd`/`sub` block as prelude source.
40−- About 64 of 90 valid edits to those modules still check: reordering and renaming, unused helpers, consistent field swaps, an `init` written as a cast, a sixth message, helpers in `view`, two islands on a page.
41−- Overlapping union cases, a repeated field in a Jibb record, and derived-name clashes get good errors from the full checker, with both sites and excerpts. The unresolved-tag error of the Grammar's buttons example is exact, and moves with the code when the block is reordered.
42−- None of the wrong programs probed in this version was accepted, apart from the two in M9.
43−
44−## Findings so far
45−
46−Severity follows the earlier review's scale: high means unsound, or a done-criterion clearly not met, or a false error on common valid code.
47−
48−| # | Finding | Severity | Evidence | Fix | Prior |
49−| --- | --- | --- | --- | --- | --- |
50−| M1 | **The full checker throws away every per-definition diagnostic.** An aura mismatch, mismatched faces, `msg has no case %submitt`, a missing `?-` case, a covered arm, `++ title (trim title)`, a shadowed local, a cell in `{…}`, a capital made `@ud`, `m()`, `[]`, `(add %.y %.n)`, a gate in `eq`, an unknown name and every invalid Hoon import all give only "module definitions need unsupported inference: /ui/probe/jibb: ++ x". The partial report has a definite message with sites for most of them | High | [`add-supported-result`](https://github.com/iko-soy/jibb/blob/f84a29e1a0af663afdb77e793c933470b59a249b/jibb-dev/lib/jibb.hoon#L10670-L10689) returns `~` on a failed result and on hole, capital, pending-tag and atom-variable failures, dropping the reason. Only the pending-tag and sample-shadow retries rebuild an error ([14820-14832](https://github.com/iko-soy/jibb/blob/f84a29e1a0af663afdb77e793c933470b59a249b/jibb-dev/lib/jibb.hoon#L14820-L14832)); mold and kind failures go the same way ([14856-14857](https://github.com/iko-soy/jibb/blob/f84a29e1a0af663afdb77e793c933470b59a249b/jibb-dev/lib/jibb.hoon#L14856-L14857)) | Keep the first definite diagnostic per unresolved definition and render it at 14830, in dependency order; keep the generic text for real checker limits. Same for molds and kinds | A40, A12 still open |
51−| M2 | **Valid one-edit variants of the doc's islands are rejected, mostly with a false error at a correct line.** `++ subs \|=(m ~)`, which the overview gives for "no subscriptions", a second watch, an inline or local mapper, two `each` sites, and an update helper that returns a poke command each give "todo-list.jibb:14:28: nothing fixes the union of ~", pointing at `error=~` in a correct `init`. Any `%every` subscription, and a watch with a fold (`(changes.todo \|=%got apply)`, from the overview), give "module kind needs unsupported inference" | High | `main` is not checked as an application: a fixed chain of program recoveries fits each component, and a definition the chain can't resolve falls to the pending-tag retry, which reports whatever tag is still open ([10711-10735](https://github.com/iko-soy/jibb/blob/f84a29e1a0af663afdb77e793c933470b59a249b/jibb-dev/lib/jibb.hoon#L10711-L10735)). The Grammar says such a constraint "stays open until something in the module fixes it. An island's `main` fixes its messages" | The general core of Q5: check `main = (program init update view subs)` as an ordinary application whose unification fixes the components, with module-wide deferred tag constraints. Walk the `(list (sub M))` and ask for a watchability proof only for `%watch` | A121, fix-first 1 in a new form |
52−| M3 | **In an island, every error is reported as "nothing fixes the union of ~" at `init`.** The criterion's own example, `button "Add" %submitt` in the todo view, gives "todo-list.jibb:14:28: nothing fixes the union of ~". So do `\|=%typd`, a pattern typo, a missing `[%acked err]` arm, a second `%submit` arm, an aura mismatch in `update`, and a gate as a row key. Outside an island, the partial report puts the caret under `"Add"`, the wrong argument | High | Probes of the unchanged island with one edit each, reproduced for this write-up. The same in the basket: "basket.jibb:15:16: nothing fixes the union of ~". A gate in the model gives "module kind needs unsupported inference" and names no field, though the overview says "the checker names the field" | Report a pending tag only when the definition otherwise checks in its module context. For a call whose sample fit fails, re-fit each argument and report the first failing one, as "msg has no case `%submitt`" when it is a tag | A121 |
53−| M4 | **Page and store kinds are recognised by syntax**, so the overview's route-parameter page (`(post.api slug same)`), its catch-all page (`(pure p)`), a typed-path load, `(pure ~)`, a page or store alias, and the cart's `init` without its cast are rejected | Medium | [`page-main-parts`, `store-main-parts`](https://github.com/iko-soy/jibb/blob/f84a29e1a0af663afdb77e793c933470b59a249b/jibb-dev/lib/jibb.hoon#L13200-L13240) match the literal `(page w w)` and `(store w w)`; [`page-load-derived`](https://github.com/iko-soy/jibb/blob/f84a29e1a0af663afdb77e793c933470b59a249b/jibb-dev/lib/jibb.hoon#L14510-L14538) takes only a gate whose body is one derived request. The Grammar says "`main`'s type decides a module's kind" | Decide the kind from `main`'s inferred type. Check a load as a gate to `(ask D)`, `pure` and typed paths included; pages need no watchability | A121 |
54−| M5 | **An island `init` mismatch is blamed on a correct `~`.** In `[ts ~zod ~]` against `draft=@t`, the error is `~zod`, but the checker says "nothing fixes the union of ~" at the last `~`. `jibb-program-init` locks three such messages | Medium | `tests/type-program-main/initializer-earlier.txt` and two siblings; [`jibb-program-init.hoon:129-131`](https://github.com/iko-soy/jibb/blob/f84a29e1a0af663afdb77e793c933470b59a249b/tests/lib/jibb-program-init.hoon#L129-L131) | As M3, then update the three expected strings | |
55−| M6 | **Negative tests lock in rejections of valid programs, one fixture doesn't parse, and negatives check only "rejected".** Two `each` sites and a mapper alias (`jibb-todo-full`), a page alias, an indirect and a `pure` load (`jibb-page-main`), an alias and a hand-built main (`jibb-store`) are all spec-valid. `tests/type-page-main/hand-built-load.txt` fails to parse, so its case passes on a parse error. Every `jibb-todo-full` negative, "wrong message" included, fails with the same `~` error and the arm compares only "<label>: rejected" | Medium | [`jibb-todo-full.hoon:121-168`](https://github.com/iko-soy/jibb/blob/f84a29e1a0af663afdb77e793c933470b59a249b/tests/lib/jibb-todo-full.hoon#L121-L168), [`jibb-page-main.hoon:164-167`](https://github.com/iko-soy/jibb/blob/f84a29e1a0af663afdb77e793c933470b59a249b/tests/lib/jibb-page-main.hoon#L164-L167), [`jibb-store.hoon:261-262`](https://github.com/iko-soy/jibb/blob/f84a29e1a0af663afdb77e793c933470b59a249b/tests/lib/jibb-store.hoon#L261-L262). The fixtures also still use the positional `[ts "" ~]` that `44e3324` replaced in the doc | Move the valid cases to positive expectations, marked as known gaps until they pass. Fix the fixture. Make each negative assert its message and place | |
56−| M7 | **Inline Grammar examples meant to check are rejected**: `(turn ps \|=(p title.p))`, `"{(add 1 2)}"`, `/posts/~zod` (even under `^- path`), `` `5 `` without a cast, the Patterns rows `1.000`, `~zod`, `"milk"`, `[x ~]`, `[[~ a] [~ b]]` and `[~ b]`, `(eq xs ~)`, `(clap `1 `2 add)`. `clamp` fails because the prelude has no `max`, and the unknown name is reported as "unsupported", not as unknown | Medium | Probes, one module each. `inline-pattern-literals` and `inline-pattern-nested` have no `types.txt`, so nothing tests them | Add a typed case for each, and support them in the general core | |
57−| M8 | **No check runs the `my-app` desk with its Hoon types read through Clay**, as the brief asks, or asserts that every module but `buttons.jibb` checks. `card.jibb` and `api/blog.jibb` are checked only as imports, with no asserted type. No `my-app` timing is recorded | Medium | The suites read `/sur` and mark text with `/*` and `ride` it after dropping `/-` lines ([`jibb-todo-full.hoon:29-53`](https://github.com/iko-soy/jibb/blob/f84a29e1a0af663afdb77e793c933470b59a249b/tests/lib/jibb-todo-full.hoon#L29-L53)). `tools/clay-fixtures` builds types with `.^(vase %ca …)` but feeds only the partial report | A ship check that builds each `/sur` and mark through Clay, runs the full checker over every `/ui/**.jibb` in dependency order and expects exactly one failure, `buttons.jibb` at 3:16, timed | |
58−| M9 | **Two wrong programs are accepted.** A repeated attribute, `(column ~[gap+%s1 gap+%s2] ~[(text "x")])`, checks as `(element A)`, though the overview makes it an error. A hand-built element, `^- (element !!) [%island 5]`, checks as `(element !!)`, bypassing the island's check of its data against `init` | Medium | Both reproduced with the full checker. [status.md](../status.md) lists raw-constructor encapsulation and duplicate-attribute checks as missing; nothing tests either error | Report a repeated head tag in a literal `(list attr)` with both sites. Make `element`'s constructors the only way to build one, or check its payloads | |
59−| M10 | **`?-` exhaustiveness and dead arms cover only flat whole-case unions.** A missing case has no site ("missing union case %c"); a covered arm doesn't name the arm that covers it; the Grammar's `[%move * *]` then `[%move %left n]` is "union pattern is not supported"; a loobean without `%.n` and a list without `[i t]` are "branch pattern is not supported"; a repeated `%.y` says "branch does not cover both loobeans" | Medium | Partial report; the full checker is generic for all (M1). The loop matches arms to whole cases ([8225-8311](https://github.com/iko-soy/jibb/blob/f84a29e1a0af663afdb77e793c933470b59a249b/jibb-dev/lib/jibb.hoon#L8225-L8311)) | The usefulness check Q5 chose (Maranget): a missing-case witness at the `?-`, and a dead-arm error naming the covering arm, for loobeans, lists, units and nested cells | A15 still open |
60−| M11 | **Errors in imported Hoon types are generic in the full checker**, and a vase, a record with a repeated face, and most overlapping `$%`, `$?` and `$^` have no definite message in either pipeline | Medium | The reader is definite for signed and float auras and for cores and gates, and the partial report shows them at a use site. A vase is only `%unsupported` ([`jibb-import.hoon:1560`](https://github.com/iko-soy/jibb/blob/f84a29e1a0af663afdb77e793c933470b59a249b/jibb-dev/lib/jibb-import.hoon#L1560)); `[a=@ud a=@t]` reads as ok and the bridge drops it silently | Reuse the partial path's import diagnostics through M1. Give vases and repeated faces `%invalid` codes. Extend the overlap witness | A56 |
61−| M12 | **Shadowing and `proj` errors name neither the name nor its sites.** `++ add 1`, `+$ list @ud`, `++ proj 1` and a definition named like an import face all give "module has conflicting names: /ui/probe/jibb". A shadowing local or pattern binder is generic in the full checker | Medium | [`module-scope-valid`](https://github.com/iko-soy/jibb/blob/f84a29e1a0af663afdb77e793c933470b59a249b/jibb-dev/lib/jibb.hoon#L11760-L11773) returns a bare `?`. Only a gate sample gets a definite error | Return a diagnostic naming the binding and what it shadows, with a separate wording for `proj` | A43 partly |
62−| M13 | **Several errors the spec describes have no definite message anywhere**: a capital that a body makes `@ud` or a list, `~[text "hi"]` with its suggestion, `(facts …)` outside an API's `paths`, a gate in island data or a model naming the field, `[]`, and a generic aura in `{…}` or a path's `(…)` | Medium | Each probed in both pipelines: "explicit capital constraints are not supported", "list item constraint is not supported", "module mold needs unsupported inference", "module kind needs unsupported inference". No code suggests `~[(text "hi")]` | One definite diagnostic each, with a golden case | A6, A100 for `[]` |
63−| M14 | **Message tests lock the partial report, which no build produces.** For about 20 of the 33 errors, the only test asserts a message the real checker never gives | Medium | `tools/golden` calls only the `golden-types-*` entry points ([`tools/golden:248-262`](https://github.com/iko-soy/jibb/blob/f84a29e1a0af663afdb77e793c933470b59a249b/tools/golden#L248-L262)). The program suites lock the generic strings themselves, as at [`jibb-program-watch.hoon:178`](https://github.com/iko-soy/jibb/blob/f84a29e1a0af663afdb77e793c933470b59a249b/tests/lib/jibb-program-watch.hoon#L178) | Q6: render `types.txt` from the full checker, and add one case per error in the catalogue, with the doc's own examples | A122 still open |
64−| M15 | **The goldens never show a doc example checking.** 11 of the 14 `doc-*` cases have no `types.txt`; the other 3 are partial reports, and `doc-grammar-04-step` says "+$ step: cases proven disjoint; mold not checked" although the full checker accepts it | Low | `grep -L '^partial inference' tests/golden/*/types.txt` finds none | As M14 | A122 |
65−| M16 | **Two fragment checks rest on unguarded copies.** The Core language block is "checked inside the todo island" only because `todo-list.jibb` lines 16-25 equal `tests/golden/doc-core-02-update/source.jibb`, which nothing compares. `tests/type-buttons/valid.txt` is a hand copy of the buttons block | Low | `sed -n 16,25p my-app/ui/todo-list.jibb \| diff - tests/golden/doc-core-02-update/source.jibb` is empty today; no tool references `doc-core-02` | Assert the slice in `tools/doc-blocks` or `jibb-todo-full`; derive `valid.txt` from the doc block | |
66−| M17 | **Message polish**: an import cycle names one path, with no `/=` line or chain; "nothing fixes the union of %add" doesn't ask for a `^-` as the Grammar says; an overlap doesn't suggest an open `[`; some mismatch sites print no types; an imported union is named by its cases | Low | [12303-12304](https://github.com/iko-soy/jibb/blob/f84a29e1a0af663afdb77e793c933470b59a249b/jibb-dev/lib/jibb.hoon#L12303-L12304), [5363](https://github.com/iko-soy/jibb/blob/f84a29e1a0af663afdb77e793c933470b59a249b/jibb-dev/lib/jibb.hoon#L5363) | Report the cycle as a chain; append "; add a `^-`"; add the hint; print types at every site | A136 |
67−
68−## Early results from the areas still running
69−
70−These come from probes the inference reviewer had run when this version was written. They have not been through that reviewer's own write-up or a second reviewer, so treat them as leads:
71−
72−- Every wrong program in about 40 soundness probes was rejected, except the two in M9 and a gate passed where `*` is expected (A23, known).
73−- Common valid code is rejected as "unsupported": a sum with `roll`, a pair of mutually recursive top-level gates, list reverse, factorial, a recursive count, a pattern binding the rest of a list, wing access on a union or list, and patterns over atoms with number or string literals.
74−- `~[1 "a"]` checks as `(list @t)`: a bare decimal takes the aura `@t`. The spec allows that today; syntax-review proposal S4 would forbid it.
75−
76−## Appendix: the errors the spec describes
77−
78−From [grammar.md](../spec/grammar.md), [overview.md](../spec/overview.md), [core-language.md](../spec/core-language.md) and [decisions.md](../spec/decisions.md), leaving out milestone 1's parse errors and the route, static-file and contrast checks that the brief leaves to milestone 4. "Full" is what `infer-jibb-file-detailed`, the checker a build runs, reports; "generic" is "module definitions need unsupported inference: <path>: ++ name". "Partial" is the report `types.txt` shows.
79−
80−| Error | Test with its message | Full checker | Status |
81−| --- | --- | --- | --- |
82−| Aura mismatch | Partial only (`types-local-error-call`) | Generic | Partly |
83−| Mismatched faces | Partial only (`types-record-faces`) | Generic | Partly |
84−| `msg has no case %submitt` | Partial only (`types-missing-tag-named`) | Generic; in an island, the `~` error of M3 | Partly |
85−| Unresolved tag, "nothing fixes the union of %add" | `jibb-buttons` | Exact, one site | Met |
86−| `~` still pending at the end of a module | None | Exact, one site | Partly |
87−| `\|=%tag` with no case of an equal head | Partial, as a generic unify failure | Generic | Partly |
88−| Overlapping union cases | `jibb-full-overlap-basic`, `types-union-overlap` | Exact, both sites | Met |
89−| Missing `?-` case, named | Partial, no site | Generic | Partly |
90−| Arm that earlier arms cover | Partial, one site; `[%move * *]` unsupported | Generic | Partly |
91−| Value that depends on itself | Partial, annotated values only | Generic | Partly |
92−| Shadowing, prelude and imports included | Gate samples only | Exact for samples; "module has conflicting names" or generic otherwise | Partly |
93−| Cell in `{…}` with no printer | Partial | Generic | Partly |
94−| Generic aura in `{…}` or a path's `(…)` | Partial, one narrow form | Generic | Partly |
95−| Capital that a body makes `@ud` or a list | None; partial says "not supported" | Generic | Partly |
96−| `~[text "hi"]`, suggesting `~[(text "hi")]` | None | Generic | Partly |
97−| Clashing derived names, import faces included | `module-import-api-derived-clash` and three more | Exact, both sites | Met |
98−| Import cycle | `module-import-cycle`, `module-import-root-cycle` | One path, no site | Partly |
99−| Imported signed or float aura | Partial (`type-import-diagnostic`) | Generic | Partly |
100−| Imported core, gate or vase | Partial for cores and gates; vases "unsupported" | Generic | Partly |
101−| Imported `$%`, `$?`, `$^` whose cases overlap | Partial for one form | Generic | Partly |
102−| Imported record with a repeated field | None; silently dropped | Generic | Partly |
103−| `(facts …)` outside an API's `paths` | None; partial accepts it | "module mold needs unsupported inference" | Partly |
104−| Gate in island data or a model, naming the field | Rejection only | "module kind needs unsupported inference", no field | Partly |
105−| Repeated attribute in a literal list | None | Accepted | Not met |
106−| Repeated field in a Jibb record | `types-record-field-expr-duplicate` and two more | Exact, both sites | Met |
107−| `proj` is reserved | "module has conflicting names" | Same, no name | Partly |
108−| `m()` | Partial | Generic | Partly |
109−| `[]` | None; partial says "not supported" | Generic | Partly |
110−| Loobean operands to arithmetic | Partial | Generic | Partly |
111−| Two distinct capitals forced equal | Partial, both sites | Generic | Partly |
112−| Unconstrained hole, or one fixed only by a later use | Partial | Generic; a mold's hole names neither | Partly |
113−| Gates in `eq` arguments and map or set keys | Partial | Generic | Partly |
114−| Watching an unwatchable request, or one with `scry=` | The generic kind message is the expected value | "module kind needs unsupported inference" | Partly |
115−| Each error names both conflicting sites, with excerpts | | Two sites only for overlaps, repeated fields and derived clashes | Partly |
docs/spec/core-language.md+9−10
@@ -83,9 +83,8 @@ Types, faces and casts leave nothing behind. Everything else lowers by these rul
83| `/posts/~zod`, `%/blog/(slug)` | A list of knots, typed segments printed by their aura's native; the runtime adds the base path to an application path |
83| `/posts/~zod`, `%/blog/(slug)` | A list of knots, typed segments printed by their aura's native; the runtime adds the base path to an application path |
84| `title.p`, `space.theme.theme` | `slot` at the field's axis, nested for longer wings |
84| `title.p`, `space.theme.theme` | `slot` at the field's axis, nested for longer wings |
85| `(proj record)` | Apply a `lam` to the source once; its body constructs the expected record from the required fields using `slot` and `cons`, discarding extra fields |
85| `(proj record)` | Apply a `lam` to the source once; its body constructs the expected record from the required fields using `slot` and `cons`, discarding extra fields |
86−| `(unface e)` | `e`: only its type changes |
87| `card.card`, an import | The qualified name `components/card:card` |
86| `card.card`, an import | The qualified name `components/card:card` |
88−| `m(draft=t error=~)` | One `edit` per item, in order: `(edit 7 (edit 6 m t) ~)`. A wing's item edits at the wing's axis, so with `cart` at 2 and `open` at 3 inside it, `m(open.cart=x)` is `(edit 5 m x)`. Each value is computed from `m` as it was |
87+| `m(draft=t error=~)` | One `edit` per item, in order: `(edit 7 (edit 6 m t) ~)` |
89| `f a b c` | `(app f (cons a (cons b c)))`: the arguments are the sample |
88| `f a b c` | `(app f (cons a (cons b c)))`: the arguments are the sample |
90| `\|= [a=@ b=@] body` | `(lam _1 (let a (slot 2 _1) (let b (slot 3 _1) body)))`; a single face, as in `\|= m=model`, names the `lam` itself |
89| `\|= [a=@ b=@] body` | `(lam _1 (let a (slot 2 _1) (let b (slot 3 _1) body)))`; a single face, as in `\|= m=model`, names the `lam` itself |
91| `\|=%got` | `(lam _1 (cons %got _1))` |
90| `\|=%got` | `(lam _1 (cons %got _1))` |
@@ -105,14 +104,14 @@ The todo island's `update`, from worked example 3:
105```jibb
104```jibb
106++ update |= [=msg m=model]
105++ update |= [=msg m=model]
107 ?- msg
106 ?- msg
108− [%typed t]
107+ [%typed t]
109− ?- (gth (lent (tuba (trip t))) 80)
108+ ?- (gth (lent (tuba (trip t))) 80)
110− %.y [m(draft=t error=`"Too long") ~]
109+ %.y [m(draft=t error=`"Too long") ~]
111− %.n [m(draft=t error=~) ~]
110+ %.n [m(draft=t error=~) ~]
112− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
111+ %submit [m(draft="") ~[[%poke (todo-action.todo [%add draft.m]) |=%acked]]]
113− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
112+ [%toggled id] [m ~[[%poke (todo-action.todo [%toggle id]) |=%acked]]]
114− [%got ts] [m(todos=ts) ~]
113+ [%got ts] [m(todos=ts) ~]
115− [%acked err] [m(error=err) ~]
114+ [%acked err] [m(error=err) ~]
116```
115```
117
116
118lowers to the program below. The model `[todos draft error]` puts `todos` at axis 2, `draft` at 6 and `error` at 7, and `%submit`, the only atom case, needs no test once `cell?` fails.
117lowers to the program below. The model `[todos draft error]` puts `todos` at axis 2, `draft` at 6 and `error` at 7, and `%submit`, the only atom case, needs no test once `cell?` fails.
docs/spec/decisions.md+89−167
@@ -6,173 +6,95 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
6
6
7## Decisions
7## Decisions
8
8
9−Until the Claude doc is synced with this copy, this copy is the spec (review question 42). Synced says whether the doc's Decisions tab has the row as written here. A row decided by 2026-10-29 or undated was in the doc when `spec/` was copied from it on 2026-10-30, and is unchanged. A row decided on or after 2026-10-31 is only here. A row of 2026-10-30 says Check: the copy had that day's answers to the 12 grammar questions, but other rows of that day were added or edited here afterwards ([docs/README.md](../README.md#the-spec)), and nobody has compared them with the doc yet.
9+| Decision | Choice | Status |
10−
10+| --- | --- | --- |
11−Rows dated 2026-11-03 are Montelot's decisions on the [syntax review](../reviews/2026-11-02-syntax-review.md): S1 with its step 1, S2, S4 to S7, S11 to S13 and S15. S1 step 1 is decided but not built yet; the checker core that review question 5 asks for will build it.
11+| Syntax | Hoon's runes as keywords, and its literals; wide forms only for `\|=` and `$-`; changes take one or more record items, as `m(draft="x")`, so `m()` is an error; `.` reads fields, imports and prelude groups; no name may shadow another | Decided 2026-10-30 |
12−
12+| Literals | Exactly Hoon's, including `%$` as a term literal and pattern: `1000` is an error, `~2026.2.31` is `~2026.3.3`, and years BC and sub-second groups are dates; `print-date`'s minute form is not a literal | Decided 2026-10-30 |
13−| Decision | Choice | Status | Synced |
13+| Cells | A single-item cell `[a]` is `a`; an empty `[]` is an error, in expressions and molds | Decided 2026-10-30 |
14−| --- | --- | --- | --- |
14+| Numeric terms | `%` and a decimal as Hoon writes it: `%1.000`; `%1000` and `%007` are errors | Decided 2026-10-30 |
15−| Syntax | Hoon's runes as keywords, and its literals; wide forms only for `\|=` and `$-`; changes take one or more record items, as `m(draft="x")`, so `m()` is an error; an item may name a wing through record fields, as `m(open.cart=x)`, every value is computed from the original record, and two items that name the same field, or one inside the other, are an error; `.` reads fields, imports and prelude groups; no name may shadow another | Decided 2026-11-03 | No |
15+| Strings | Hoon's escapes: `\\`, `\"`, `\{`, and `\` with two lowercase hex digits; a string and each `{…}` close on the line they open; `::` in a string is text | Decided 2026-10-30 |
16−| Literals | Exactly Hoon's, including `%$` as a term literal and pattern: a bare decimal is a `@ud`, so `^- @dr 30` is an error and a duration is written `~s30`; `1000` is an error, `~2026.2.31` is `~2026.3.3`, and years BC and sub-second groups are dates; `print-date`'s minute form is not a literal | Decided 2026-11-03 | No |
16+| Spacing | Style, kept by the formatter: one or more spaces between items, and spaces allowed after an opener, before a closer and at the end of a line; faces, puns and typed path segments take no spaces; a rune is followed by one | Decided 2026-10-30 |
17−| Cells | A single-item cell `[a]` is `a`; an empty `[]` is an error, in expressions and molds | Decided 2026-10-30 | Check |
17+| Path literals | `/posts/~zod` is an expression: `pathlit` is an operand | Decided 2026-10-30 |
18−| Numeric terms | `%` and a decimal as Hoon writes it: `%1.000`; `%1000` and `%007` are errors | Decided 2026-10-30 | Check |
18+| Crash | `!!` is an operand, so `f !!` and `~[!!]` need no parentheses | Decided 2026-10-30 |
19−| Strings | Hoon's escapes: `\\`, `\"`, `\{`, and `\` with two lowercase hex digits; a string and each `{…}` close on the line they open; `::` in a string is text | Decided 2026-10-30 | Check |
19+| Sample names | Every bare name in a sample binds, at any depth: `\|= [a=@ b]` binds `a` and `b` | Decided 2026-10-30 |
20−| Spacing | Style, kept by the formatter: one or more spaces between items, and spaces allowed after an opener, before a closer and at the end of a line; faces, puns and typed path segments take no spaces; a rune is followed by one | Decided 2026-10-30 | Check |
20+| Local definitions | At the start of any body: a gate's, an arm's, a `^-`'s, a `~&`'s or a `++`'s | Decided 2026-10-30 |
21−| Path literals | `/posts/~zod` is an expression: `pathlit` is an operand | Decided 2026-10-30 | Check |
21+| Value cycles | A non-gate value that depends on itself, even through a gate, is an error; mutually recursive gates are allowed | Decided 2026-10-30 |
22−| Crash | `!!` is an operand, so `f !!` and `~[!!]` need no parentheses | Decided 2026-10-30 | Check |
22+| Open molds | A mold's `[` and `(` may be left open at line end, one field or mold per deeper line; a `(` keeps the mold's name on its first line | Decided 2026-10-30 |
23−| Sample names | Every bare name in a sample binds, at any depth: `\|= [a=@ b]` binds `a` and `b` | Decided 2026-10-30 | Check |
23+| Open groups | A `(` alone at line end puts the call's head on the first deeper line | Decided 2026-10-30 |
24−| Local definitions | At the start of any body: a gate's, an arm's, a `^-`'s, a `~&`'s or a `++`'s | Decided 2026-10-30 | Check |
24+| Several open brackets | The deeper lines go to the last bracket, or the last rune's body, left open on a line, and the brackets before it close with it: `(column ~ ~[` needs no `)` | Decided 2026-10-30 |
25−| Value cycles | A non-gate value that depends on itself, even through a gate, is an error; mutually recursive gates are allowed | Decided 2026-10-30 | Check |
25+| Jibb code blocks | Labelled `jibb` in this doc; each is a golden test | Decided 2026-10-30 |
26−| Open molds | A mold's `[` and `(` may be left open at line end, one field or mold per deeper line; a `(` keeps the mold's name on its first line | Decided 2026-10-30 | Check |
26+| Definitions | `++` for values, `+$` for molds; no `=/` | Decided |
27−| Open groups | A `(` alone at line end puts the call's head on the first deeper line | Decided 2026-10-30 | Check |
27+| Unions | No `$?`: a `+$` with its cases on the lines below is a union, so every union written in Jibb has a name; one case is just that mold; a mold that isn't a union counts as a union of one case for tags and `\|=%tag`; a generic's `\|$` comes right after the `+$`'s name; tags anywhere; constructor heads and case disjointness compare literal noun values regardless of spelling, so `%$`, `%.y` and `~` are equal and overlapping cases are errors; cases differ as nouns, with `?` treated as the two atoms `%.y` and `%.n`, disjoint from cells and overlapping constants 0 and 1, and `!!` or any cell with an empty position disjoint from every case; a tag literal or `~` waits for its union, and an unresolved one is an error | Decided 2026-10-31 |
28−| Several open brackets | The deeper lines go to the last bracket, or the last rune's body, left open on a line, and the brackets before it close with it: `(column ~ ~[` needs no `)` | Decided 2026-10-30 | Check |
28+| Printed unnamed unions | Print the cases separated by spaces, as `%approve %deny`; this is print-only, not Jibb syntax | Decided 2026-10-30 |
29−| Jibb code blocks | Labelled `jibb` in this doc; each is a golden test | Decided 2026-10-30 | Check |
29+| Printed type constraints | Print an atom constraint as `$-([A A] A) where A is an atom`, an arithmetic atom constraint as `where A is an atom other than ?`, and a gate-free constraint as `$-([A A] ?) where A contains no gates`; separate multiple clauses with commas, as `where A is an atom, B contains no gates` | Decided 2026-10-31 |
30−| Definitions | `++` for values, `+$` for molds; no `=/` | Decided | Yes |
30+| Branching | `?-` only, loobeans included; exhaustive, with explicit catch-alls; covered arms are errors; failures say `!!` | Decided 2026-10-29 |
31−| Unions | No `$?`: a `+$` with its cases on the lines below is a union, so every union written in Jibb has a name; one case is just that mold; a mold that isn't a union counts as a union of one case for tags and `\|=%tag`; a generic's `\|$` comes right after the `+$`'s name; tags anywhere; constructor heads and case disjointness compare literal noun values regardless of spelling, so `%$`, `%.y` and `~` are equal and overlapping cases are errors; cases differ as nouns, with `?` treated as the two atoms `%.y` and `%.n`, disjoint from cells and overlapping constants 0 and 1, and `!!` or any cell with an empty position disjoint from every case; a tag literal or `~` waits for its union, and an unresolved one is an error | Decided 2026-10-31 | No |
31+| Equality and negation | The gates `eq` and `not`, with Hoon's bitwise `not` exposed as `not.bit`; `eq`'s arguments and map and set keys contain no gates, even nested; the checker infers and generalizes that constraint; union matching never inspects a gate to distinguish cases | Decided 2026-10-30 |
32−| Printed unnamed unions | Print the cases separated by spaces, as `%approve %deny`; this is print-only, not Jibb syntax | Decided 2026-10-30 | Check |
32+| Special rules | No built-ins; type-directed rules are welcome, each listed in the Grammar tab | Decided 2026-10-29 |
33−| Printed type constraints | Print an atom constraint as `$-([A A] A) where A is an atom`, an arithmetic atom constraint as `where A is an atom other than ?`, and a gate-free constraint as `$-([A A] ?) where A contains no gates`; separate multiple clauses with commas, as `where A is an atom, B contains no gates` | Decided 2026-10-31 | No |
33+| Inference | Hindley–Milner with aura variables; `@` is any atom, a specific atom fits `@` and a more specific aura fits an ancestor in its Hoon aura family, but each reverse needs a check, and repeated atom-constrained capitals give the same type; a number takes `@ud` only where its `++` isn't generic over its aura; distinct specific auras remain distinct; faces are part of record types, and an unnamed position can take a face but two different faces don't unify; principal types | Decided 2026-10-30 |
34−| Branching | `?-` only, loobeans included; exhaustive, with explicit catch-alls; covered arms are errors; failures say `!!` | Decided 2026-10-29 | Yes |
34+| Effects | The library unions `cmd` and `sub`; `poke`, `ask` and `qath` are transparent types defined in the internal prelude and re-exported normally; derived gates and `pure` also construct requests; islands read agents only by watching; replies get full state, and diffs take a fold; timers carry the time; `%who` gives the owner's `@p`; nacks reach replies as text | Decided 2026-10-31 |
35−| Equality and negation | The gates `eq` and `not`, with Hoon's bitwise `not` exposed as `not.bit`; `eq`'s arguments and map and set keys contain no gates, even nested; the checker infers and generalizes that constraint; union matching never inspects a gate to distinguish cases | Decided 2026-10-30 | Check |
35+| Poke representation | The source-backed private internal prelude module defines `poke`, and the public prelude re-exports it as an ordinary transparent type. Ordinary modules can construct and inspect its values | Decided 2026-10-31 |
36−| Special rules | No built-ins; type-directed rules are welcome, each listed in the Grammar tab | Decided 2026-10-29 | Yes |
36+| Agent APIs | `/ui/api/<agent>.jibb` with `+$ poke` and `+$ paths`, over the agent's mark types; a case is a name, a path and a type, with `(facts full diff …)` for diffs, told apart by mark; an optional scry path, for pages; an island may watch a request only when the checker proves it is watchable, so a separate scry path or unknown watchability is an error; typed segments by aura | Decided 2026-10-31 |
37−| Inference | Hindley–Milner with aura variables; `@` is any atom, a specific atom fits `@` and a more specific aura fits an ancestor in its Hoon aura family, but each reverse needs a check, and repeated atom-constrained capitals give the same type; a decimal is a `@ud`, which fits `@u`, `@` and `*` but no other aura, except where its `++` is generic over its aura; distinct specific auras remain distinct; faces are part of record types, and an unnamed position can take a face but two different faces don't unify; a capital that meets a faced position binds only the type under the face, so `$-([A A] ?)` takes a gate with named parameters (not built yet); principal types | Decided 2026-11-03 | No |
37+| Mark names | Any name: `/%` names types after marks, and constructors poke with their type's mark; no alias marks | Decided 2026-10-26 |
38−| Effects | The library unions `cmd` and `sub`; `raw-poke`, `ask` and `qath` are transparent types defined in the internal prelude and re-exported normally; derived gates and `pure` also construct requests; islands read agents only by watching; replies get full state, and diffs take a fold; timers carry the time; `%who` gives the owner's `@p`; nacks reach replies as text | Decided 2026-11-01 | No |
38+| Derived gates | API files and stores give a constructor per poke type and a checked request per path or store state; clashing names are errors, including a derived name that clashes with an import face | Decided 2026-10-30 |
39−| Poke representation | The source-backed private internal prelude module defines `raw-poke`, and the public prelude re-exports it as an ordinary transparent type. A store's local `poke` action remains an ordinary mold; derived helpers produce the runtime envelope | Decided 2026-11-01 | No |
39+| Hoon types | A fixed translation table; `map`, `set`, `qeu`, `jar`, `jug` by name; `mop` as `(mop K V)`, read with `on`; imported `$%`, `$?` and `$^` cases must differ as nouns, and records with duplicate field names are errors where used; unused molds skipped | Decided 2026-10-30 |
40−| Agent APIs | `/ui/api/<agent>.jibb` with `+$ poke` and `+$ paths`, over the agent's mark types; a case is a name, a path and a type, with `(facts full diff …)` for diffs, told apart by mark; an optional scry path, for pages; an island may watch a request only when the checker proves it is watchable, so a separate scry path or unknown watchability is an error; typed segments by aura | Decided 2026-10-31 | No |
40+| Record fields | Duplicate field names in a Jibb-written record are an error, as they are in an imported Hoon record | Decided 2026-10-31 |
41−| Mark names | Any name: `/%` names types after marks, and constructors poke with their type's mark; no alias marks | Decided 2026-10-26 | Yes |
41+| Record projection | The explicit type-directed operation `proj` takes a record and uses its expected result type to select its fields; no projection is inserted automatically. `proj` is reserved and cannot be defined or imported under that name. The result has exactly the fields declared by its type | Decided 2026-10-31 |
42−| Derived gates | API files and stores give a generic `poke` command helper taking an action and reply, and a checked request per path or store state; clashing names are errors, including a derived name that clashes with an import face | Decided 2026-11-01 | No |
42+| Layout | Indentation; juxtaposed calls; a bracket open at line end takes one item per line, with no closer | Decided |
43−| Hoon types | A fixed translation table; `map`, `set`, `qeu`, `jar`, `jug` by name; `mop` as `(mop K V)`, read with `on`; imported `$%`, `$?` and `$^` cases must differ as nouns, and records with duplicate field names are errors where used; unused molds skipped | Decided 2026-10-30 | Check |
43+| Elements | Ordinary gates; containers take attribute lists; `stack` switches at `wide`; `el` adds attributes and wins; headings 1 to 6; `form` sends on Enter, the innermost when nested; `image` from an application path, sized from the file, or a sized URL; no focus control for now | Decided 2026-10-29 |
44−| Record fields | Duplicate field names in a Jibb-written record are an error, as they are in an imported Hoon record | Decided 2026-10-31 | No |
44+| Long calls | One argument per line inside parentheses | Decided |
45−| Unface | The explicit type-directed operation `unface` removes every face from its argument's type, through cells, a gate's sample and product, and containers' arguments; unions and recursive molds go by name and are kept whole; like `proj`, it is reserved and not a value; it leaves nothing behind at run time | Decided 2026-11-03 | No |
45+| Inline gates | Hoon's wide form; the mold may be inferred; a bare sample name binds; `\|=%got` is a case's constructor, typed by the gate expected; a bare tag is always a value | Decided 2026-10-29 |
46−| Record projection | The explicit type-directed operation `proj` takes a record and uses its expected result type to select its fields; no projection is inserted automatically. `proj` is reserved and cannot be defined or imported under that name. The result has exactly the fields declared by its type | Decided 2026-10-31 | No |
46+| Empty mold | `!!`, with no values; the expression has any type; pages are `(element !!)`, which keeps islands out of islands | Decided 2026-10-29 |
47−| Layout | Indentation; juxtaposed calls; a bracket open at line end takes one item per line, with no closer; a block of deeper lines belongs to the line above, so a call never continues onto a deeper line; a body's final line may hand the rest of the body, at its depth, to a tall `\|=`, `^-` or `~&` that ends it, and a `?-` that begins it may take its arms at its depth | Decided 2026-11-03 | No |
47+| Noun mold | `*` is the noun type, not a type variable; use a capital for a generic type; a value of a more specific noun type can be used where `*` is expected | Decided 2026-10-30 |
48−| Elements | Ordinary gates; containers take attribute lists; `stack` switches at `wide`; `el` adds attributes and wins; headings 1 to 6; `form` sends on Enter, the innermost when nested; `image` from an application path, sized from the file, or a sized URL; no focus control for now | Decided 2026-10-29 | Yes |
48+| Type variables | Capitals, generalized per `++`; a capital in a local `++` shares the enclosing `++`'s variable of that name if the enclosing `++` also uses it; otherwise it is introduced and generalized locally; a different type takes a different capital; a body cannot force distinct capitals to be equal, so a shared type uses the same capital; one used where an atom is required gains an inferred atom constraint, and cannot be fixed to a more specific type in its body | Decided 2026-10-30 |
49−| Long calls | One argument per line inside parentheses | Decided | Yes |
49+| Partial type annotations | `_` may appear wherever a mold may appear and marks that part of the type for inference; a hole inferred as a named type variable is resolved; an unconstrained hole is an error, and a named mold or value definition must determine its own holes without constraints from later uses | Decided 2026-10-31 |
50−| Inline gates | Hoon's wide form; the mold may be inferred; a bare sample name binds; `\|=%got` is a case's constructor, typed by the gate expected; a bare tag is always a value | Decided 2026-10-29 | Yes |
50+| Loobean mold | `?`, switched with `?-` | Decided 2026-10-26 |
51−| Empty mold | `!!`, with no values; the expression has any type; pages are `(element !!)`, which keeps islands out of islands | Decided 2026-10-29 | Yes |
51+| Defaults | None | Decided |
52−| Noun mold | `*` is the noun type, not a type variable; use a capital for a generic type; a value of a more specific noun type can be used where `*` is expected | Decided 2026-10-30 | Check |
52+| Modules | Records, not cores | Decided |
53−| Type variables | A capital, then lowercase letters and digits, as `A` or `Msg`, printed by the name they were written with; generalized per `++`; a capital in a local `++` shares the enclosing `++`'s variable of that name if the enclosing `++` also uses it; otherwise it is introduced and generalized locally; a different type takes a different capital; a body cannot force distinct capitals to be equal, so a shared type uses the same capital; one used where an atom is required gains an inferred atom constraint, and cannot be fixed to a more specific type in its body | Decided 2026-11-03 | No |
53+| Kinds | The type of `main`: `(element !!)`, `(page R D)`, `(program D X M)` or `(store S)`; other names by file kind, in the Grammar tab | Decided 2026-10-29 |
54−| Partial type annotations | `_` may appear wherever a mold may appear and marks that part of the type for inference; a hole inferred as a named type variable is resolved; an unconstrained hole is an error, and a named mold or value definition must determine its own holes without constraints from later uses | Decided 2026-10-31 | No |
54+| Type identity | Recursive molds by name and module | Decided 2026-10-29 |
55−| Loobean mold | `?`, switched with `?-` | Decided 2026-10-26 | Yes |
55+| Binding patterns | In `?-` arms; the last position binds the rest | Decided 2026-10-29 |
56−| Defaults | None | Decided | Yes |
56+| Text | Strings are written only as `"…"` and are always cords; tapes come from `trip`; `{…}` prints by aura, a bare `@` as `@ud`, and an atom whose aura its `++` is generic over is an error; `print-date` prints Urbit-style to the minute in the theme's zone, from jibb-dev's zone table; numbers keep Hoon's form | Decided 2026-10-30 |
57−| Modules | Records, not cores | Decided | Yes |
57+| Auras | Specific auras stay distinct; `@` is any atom, a more specific aura fits an ancestor in its Hoon aura family one way, with the reverse requiring a check, and shared atom-constrained type variables preserve the same aura | Decided 2026-10-30 |
58−| Kinds | The type of `main`: `(element !!)`, `(page Params Data)`, `(program Data Model Msg)` or `(store S)`; other names by file kind, in the Grammar tab | Decided 2026-11-03 | No |
58+| Loobean arithmetic | Arithmetic rejects loobean operands; comparison may accept them and returns `?` | Decided 2026-10-31 |
59−| Type identity | Recursive molds by name and module | Decided 2026-10-29 | Yes |
59+| Crashes | As in Hoon; an island keeps its model and shows the standard notice; a failing page, or one rendering a control outside an island, gets Jibb's error page; no render limit, so an endless render stalls the ship | Decided 2026-10-29 |
60−| Binding patterns | In `?-` arms; the last position binds the rest; cells of patterns nest; a bare name is an error where a case the pattern can match has there a tag the name spells, as `stop` for `%stop` | Decided 2026-11-03 | No |
60+| Refinement types | None | Decided |
61−| Text | Strings are written only as `"…"` and are always cords; tapes come from `trip`; `{…}` prints by aura, a bare `@` as `@ud`, and an atom whose aura its `++` is generic over is an error; `print-date` prints Urbit-style to the minute in the theme's zone, from jibb-dev's zone table; numbers keep Hoon's form | Decided 2026-10-30 | Check |
61+| Imports | `/-`, `/%` (a mark's type, with no face) and `/=`; no `/+`; cycles are errors | Decided 2026-10-29 |
62−| Auras | Specific auras stay distinct; `@` is any atom, a more specific aura fits an ancestor in its Hoon aura family one way, with the reverse requiring a check, and shared atom-constrained type variables preserve the same aura | Decided 2026-10-30 | Check |
62+| Hoon marks for Jibb types | None: wire types are the agent's marks, and Jibb's own types never cross | Decided 2026-10-26 |
63−| Loobean arithmetic | Arithmetic rejects loobean operands; comparison may accept them and returns `?` | Decided 2026-10-31 | No |
63+| Core language | A small untyped core language between the checker and both backends: Nock's operations on nouns plus a lambda calculus with names; one sample per call; s-expressions as its text form; a reference interpreter in Hoon; three rules in its tab still proposed | Decided |
64−| Crashes | As in Hoon; an island keeps its model and shows the standard notice; a failing page, or one rendering a control outside an island, gets Jibb's error page; no render limit, so an endless render stalls the ship | Decided 2026-10-29 | Yes |
64+| Stages | By kind: pages without data at commit, with data in the host, islands and stores in the browser; never inferred | Decided 2026-10-29 |
65−| Refinement types | None | Decided | Yes |
65+| Page loading | `load` maps route parameters, `~` for none, to one `ask` or `pure`; pages render per request from a fresh scry of the path, or of its case's scry path; nothing is watched or kept | Decided 2026-10-29 |
66−| Imports | `/-`, `/%` (a mark's type, with no face) and `/=`; no `/+`; cycles are errors | Decided 2026-10-29 | Yes |
66+| Compile targets | Nock on the ship, JavaScript in the browser | Decided |
67−| Hoon marks for Jibb types | None: wire types are the agent's marks, and Jibb's own types never cross | Decided 2026-10-26 | Yes |
67+| Optimizer | Basic lowering; holes later | Decided 2026-10-29 |
68−| Core language | A small untyped core language between the checker and both backends: Nock's operations on nouns plus a lambda calculus with names; one sample per call; s-expressions as its text form; a reference interpreter in Hoon; three rules in its tab still proposed | Decided | Yes |
68+| Island `update` | In the browser | Decided |
69−| Stages | By kind: pages without data at commit, with data in the host, islands and stores in the browser; never inferred | Decided 2026-10-29 | Yes |
69+| Island `init` | Takes the page's data, returns the model | Decided 2026-10-29 |
70−| Page loading | `load` maps route parameters, `~` for none, to one `ask` or `pure`; pages render per request from a fresh scry of the path, or of its case's scry path; nothing is watched or kept | Decided 2026-10-29 | Yes |
70+| Island rendering | `view` re-runs on model changes; a keyed diff patches the DOM; holes later | Decided 2026-10-29 |
71−| Compile targets | Nock on the ship, JavaScript in the browser | Decided | Yes |
71+| Data crossing to the browser | No gates in island data or models | Decided 2026-10-29 |
72−| Optimizer | Basic lowering; holes later | Decided 2026-10-29 | Yes |
72+| Inputs | A message per input event, none mid-composition; controls reset to the latest view after every event; fields read-only until the island starts | Decided 2026-10-29 |
73−| Island `update` | In the browser; returns the model and a list of commands, which the runtime processes one at a time in list order | Decided 2026-11-02 | No |
73+| Transactions | None; one poke per command | Decided |
74−| Island `init` | Takes the page's data, returns the model | Decided 2026-10-29 | Yes |
74+| Reloads | Restart from the model the page is served with | Decided 2026-10-29 |
75−| Island rendering | `view` re-runs on model changes; a keyed diff patches the DOM; holes later | Decided 2026-10-29 | Yes |
75+| Shared state | Stores: browser agents written like API files, with `state`, `+$ poke` and `(store init update)`; the store's `+$ poke` is a declaration, not a mold; derived gates provide poke constructors and state requests; one per page | Decided 2026-10-31 |
76−| Data crossing to the browser | No gates in island data or models | Decided 2026-10-29 | Yes |
76+| Subscriptions | By agent and path, shared per page; the first fact is full state, so no paths that need a scry path | Decided 2026-10-29 |
77−| Inputs | A message per input event, none mid-composition; controls reset to the latest view after every event; fields read-only until the island starts | Decided 2026-10-29 | Yes |
77+| Apps | One island under a catch-all route, given the path by `pure`; `%url` delivers the path on every change; in-section links act as `go`; focus moves to the first heading | Decided 2026-10-29 |
78−| Transactions | None; one poke per command | Decided | Yes |
78+| Layout vocabulary | Jibb's elements and theme tokens; the stylesheet comes from the theme alone; chars and fill are inline; `[%fill n]` below 1 counts as 1 | Decided 2026-10-29 |
79−| Reloads | Restart from the model the page is served with | Decided 2026-10-29 | Yes |
79+| Responsive layout | `stack` switches at the theme's `wide` | Decided 2026-10-29 |
80−| Shared state | Stores: browser agents written like API files, with `state`, a local `+$ poke` action mold and `(store init update)`; derived gates provide the generic `poke` command helper and state requests; one per page | Decided 2026-11-01 | No |
80+| Theme | A prelude mold with every token required: spaces, five tones with `normal` and `background`, language, zone, `wide`, and an optional static font; 4.5:1 contrast enforced | Decided 2026-10-29 |
81−| Store builder | `+$ store |$ [S] [init=S update=*]`, with `++ store |= [init=S update=$-([A S] S)] ^- (store S) [init update]`: the builder checks action `A`, while `main` exposes only state `S`; the store kind check verifies `A` against the poke declaration | Decided 2026-11-01 | No |
81+| Dark mode | Hand-written dark tones under `dark`, used when the reader prefers dark | Decided 2026-10-27 |
82−| Subscriptions | By agent and path, shared per page; the first fact is full state, so no paths that need a scry path | Decided 2026-10-29 | Yes |
82+| Links | All text escaped; in-app links are application paths, as `%/blog/(slug)`, with no query or fragment, checked at compile time against routes and static files; paths and unchecked `https`, `mailto` and `tel` URLs and root-relative cords such as `"/apps/groups"` have separate declarations; `link-unsafe`, `image-unsafe` and `go-unsafe` are the unchecked forms; both navigation declarations produce `[%go url=@t]`, with `go` converting the path to a cord including the app's base path; other cords render as text; a CSP on every page | Decided 2026-10-30 |
83−| Apps | One island under a catch-all route, given the path by `pure`; `%url` delivers the path on every change; in-section links act as `go`; focus moves to the first heading | Decided 2026-10-29 | Yes |
83+| Data layer | Hoon's nouns: units, treaps, loobeans | Decided |
84−| Layout vocabulary | Jibb's elements and theme tokens; the stylesheet comes from the theme alone; chars and fill are inline; `[%fill n]` below 1 counts as 1 | Decided 2026-10-29 | Yes |
84+| Prelude | Hoon's standard library regrouped: all names from the listed sections except explicitly excluded groups, including all of 3g, with Hoon's `tone` exposed as `tone.hoon` and Hoon's 1c `step` as `step.hoon`; arithmetic over aura variables, units, lists, maps, sets, queues, ordered maps, function helpers, text, atom printing, a zoned date printer, time and data molds; folds take a start; jetted functions have working Jibb implementations, whose shapes the compiler recognizes to use the Hoon versions, and may take gates; private helpers and low-level primitives live in a separate internal module imported without exposing them, with public foundational gates implemented in Jibb on those primitives; `clap` takes two units of the same type and a combining gate over that type; no signed or float gates, or parser gates outside 3g except `slav` and `slaw`; signed or float auras are errors | Decided 2026-10-30 |
85−| Responsive layout | `stack` switches at the theme's `wide` | Decided 2026-10-29 | Yes |
85+| `like` | The `(like A)` mold remains available; the value gate `like` maps the product of an existing `(like A)` with a gate `$-(A B)`, preserving the position and remaining input, and returns `(like B)` | Decided 2026-10-31 |
86−| Theme | A prelude mold with every token required: spaces, five tones with `normal` and `background`, language, zone, `wide`, and an optional static font; optional values such as dark tones use explicit backtick unit syntax; 4.5:1 contrast enforced | Decided 2026-11-01 | No |
86+| Wire format | Noun channels; Jibb's own noun codec in the browser | Decided 2026-10-29 |
87−| Dark mode | Hand-written dark tones under `dark`, used when the reader prefers dark | Decided 2026-10-27 | Yes |
87+| Hosting | One thin host agent on `%jibb` binds, caches and serves every Jibb desk; each desk vendors jibb-dev, names its base path in docket's `site+`, and builds and renders with its own copy through fixed entry points; install `%jibb` first; app agents stay plain Hoon; pokes only from the ship | Decided 2026-10-29 |
88−| Links | All text escaped; in-app links are application paths, as `%/blog/(slug)`, with no query or fragment, checked at compile time against routes and static files; paths and unchecked `https`, `mailto` and `tel` URLs and root-relative cords such as `"/apps/groups"` have separate declarations; `link-unsafe`, `image-unsafe` and `go-unsafe` are the unchecked forms; both navigation declarations produce `[%go url=@t]`, with `go` converting the path to a cord including the app's base path; other cords render as text; a CSP on every page | Decided 2026-10-30 | Check |
88+| Private pages | Served by the host per request and never cached; non-owners go to the login page | Decided 2026-10-29 |
89−| Data layer | Hoon's nouns: units, treaps, loobeans | Decided | Yes |
89+| Cache | Eyre holds only the hashed assets, all public; the host serves every page; a desk's entries are cleared on suspend or uninstall, and all by `-jibb!clear` | Decided 2026-10-29 |
90−| Prelude | Hoon's standard library regrouped: all names from the listed sections except explicitly excluded groups, including all of 3g, with Hoon's `tone` exposed as `tone.hoon` and Hoon's 1c `step` as `step.hoon`; arithmetic over aura variables, units, lists, maps, sets, queues, ordered maps, function helpers, text, atom printing, a zoned date printer, time and data molds; folds take a start; jetted functions have working Jibb implementations, whose shapes the compiler recognizes to use the Hoon versions, and may take gates; private helpers and low-level primitives live in a separate internal module imported without exposing them, with public foundational gates implemented in Jibb on those primitives; `clap` takes two units of the same type and a combining gate over that type; no signed or float gates, or parser gates outside 3g except `slav` and `slaw`; signed or float auras are errors | Decided 2026-10-30 | Check |
90+| Static files | Under `/ui/static/`, committed, at hashed immutable URLs; referenced by application path, so a missing file fails to compile, and images are sized from the file; no large media, since Clay keeps every version and the cache ignores `Range` | Decided 2026-10-29 |
91−| `like` | The `(like A)` mold remains available; the value gate `like` maps the product of an existing `(like A)` with a gate `$-(A B)`, preserving the position and remaining input, and returns `(like B)` | Decided 2026-10-31 | No |
91+| Routing | A literal beats a parameter, which beats a catch-all; parameters bind to `load`'s sample by name; `@ta` and `@tas` raw, other auras as Hoon prints them | Decided 2026-10-29 |
92−| Wire format | Noun channels; Jibb's own noun codec in the browser | Decided 2026-10-29 | Yes |
92+| Linking | Folder convention; the mark stores text; the host runs each desk's own compiler; modules cached by their own and their imports' hashes | Decided 2026-10-29 |
93−| Hosting | One thin host agent on `%jibb` binds, caches and serves every Jibb desk; each desk vendors jibb-dev, names its base path in docket's `site+`, and builds and renders with its own copy through fixed entry points; install `%jibb` first; app agents stay plain Hoon; pokes only from the ship | Decided 2026-10-29 | Yes |
93+| Access | Every page is private to the owner; public pages come in a later version | Decided 2026-10-29 |
94−| Private pages | Served by the host per request and never cached; non-owners go to the login page | Decided 2026-10-29 | Yes |
94+| Tests | `test-…` arms under `/ui/tests`, run by `-jibb!test`; the JavaScript side and differential tests under Node from jibb-dev | Decided 2026-10-29 |
95−| Cache | Eyre holds only the hashed assets, all public; the host serves every page; a desk's entries are cleared on suspend or uninstall, and all by `-jibb!clear` | Decided 2026-10-29 | Yes |
95+| Editor support | Tree-sitter grammar | Decided |
96−| Static files | Under `/ui/static/`, committed, at hashed immutable URLs; referenced by application path, so a missing file fails to compile, and images are sized from the file; no large media, since Clay keeps every version and the cache ignores `Range` | Decided 2026-10-29 | Yes |
96+| Formatter | One canonical layout | Decided |
97−| Routing | A literal beats a parameter, which beats a catch-all; parameters bind to `load`'s sample by name; `@ta` and `@tas` raw, other auras as Hoon prints them | Decided 2026-10-29 | Yes |
97+| Name | Jibb | Decided |
98−| Linking | Folder convention; the mark stores text; the host runs each desk's own compiler; modules cached by their own and their imports' hashes | Decided 2026-10-29 | Yes |
99−| Access | Every page is private to the owner; public pages come in a later version | Decided 2026-10-29 | Yes |
100−| Tests | `test-…` arms under `/ui/tests`, run by `-jibb!test`; the JavaScript side and differential tests under Node from jibb-dev | Decided 2026-10-29 | Yes |
101−| Editor support | Tree-sitter grammar | Decided | Yes |
102−| Formatter | One canonical layout: a cast whose expression takes the deeper lines ends the line it belongs to; every `?-` begins its own line, with its arms at its depth where the rest of a body allows that | Decided 2026-11-03 | No |
103−| Name | Jibb | Decided | Yes |
104−
105−## Settled milestone 2 questions
106−
107−Kept only in this copy. These were open questions in [open-questions.md](../open-questions.md) until @iko settled them; the rows above record each choice, and the questions keep their numbers there, so references to them stay valid. Questions 3 and 32 are still open there.
108−
109−On 2026-10-30, @iko adopted gate-free `eq` arguments and map and set keys, treating gates as opaque when distinguishing union cases, and rejecting a non-gate value that depends on itself even through a gate. The checker infers and generalizes the gate-free constraint. @iko also said jetted prelude functions may take gates.
110−
111−**1. Settled: how the prelude identifies jetted functions.** On 2026-10-30, @iko said the prelude functions have working Jibb implementations, and the compiler recognizes their shapes and uses the Hoon versions so jets can fire.
112−
113−**2. Settled: how the prelude keeps helpers private.** On 2026-10-30, @iko chose a separate internal prelude module imported by the prelude, without exposing the imported helpers.
114−
115−**4. Settled: a capital in a local `++`.** On 2026-10-30, @iko said it shares the enclosing `++`'s variable of that name if the enclosing `++` also uses it; otherwise the local `++` introduces and generalizes its own variable. For example, `++ inner |= y=A y` shares `A` with an enclosing gate whose sample is `x=A`, but generalizes its own `A` if the enclosing `++` does not use `A`. A different type uses a different capital. The Grammar and Decisions record this alongside the earlier aura rules.
116−
117−**5. Settled: cells of no items or one.** On 2026-10-30, @iko said a single-item cell is the value and `[]` is an error. The theme's `dark=[tones=[…]]`, a record of one field, must still check.
118−
119−**6. Settled: a change with no items.** On 2026-10-30, @iko said `m()` is an error. The parser still accepts it; the checker needs to reject it and add a golden case.
120−
121−**7. Settled: the doc's blocks that aren't whole modules.** On 2026-10-30, @iko agreed to check each in its intended context: the `cmd` and `sub` definitions as prelude source, the Core language tab's `update` inside the todo island, and the Grammar's imports example against fixture files.
122−
123−**8. Settled: tuples and records.** On 2026-10-30, @iko agreed that an unnamed position can unify with a faced position and take its face; two different explicit faces still conflict. The Grammar and Decisions record this rule.
124−
125−**9. Settled: values where `*` is expected.** On 2026-10-30, @iko said `*` is the noun type, not a type variable; generic positions use proper type variables. A value already known to be `@ud` can be passed where `*` is expected. The `each` and `table` signatures use `key=K`.
126−
127−**10. Settled: navigation commands.** On 2026-10-30, @iko chose separate declarations for application paths and unchecked cords, with `link-unsafe`, `image-unsafe` and `go-unsafe` for the unchecked forms. `image-unsafe` takes a sized URL record. Both navigation declarations produce `[%go url=@t]`; `go` converts the application path to a cord including the app's base path.
128−
129−**11. Settled: stores and derived gates.** On 2026-11-01, @iko said a store's local `+$ poke` is an ordinary action mold and the runtime envelope is `raw-poke`; a derived name clashes with an import face; and an island watching a request whose case has a separate `scry=` path has a type error. The todo API's request is renamed `todo-by-id` so it does not clash with `/- todo`. The checker must account for the fact that a store's kind is determined by the type of `main`.
130−
131−**12. Settled: how to print a union without a name.** On 2026-10-30, @iko said to print its cases separated by spaces, as `%approve %deny`. This is print-only, not Jibb syntax.
132−
133−**13. Settled: how to print type constraints.** On 2026-10-30, @iko chose `$-([A A] A) where A is an atom` for an atom constraint and `$-([A A] ?) where A contains no gates` for a gate-free constraint. Multiple clauses are comma-separated, as `where A is an atom, B contains no gates`.
134−
135−**14. Settled: how the prelude implements foundational operations.** On 2026-10-30, @iko chose private low-level primitives in the internal prelude module, with the public foundational gates implemented in Jibb on top of them.
136−
137−**15. Settled: unrestricted atoms and shared auras.** On 2026-10-30, @iko said `@` means any atom, independently at each occurrence, so Hoon `dime` and `pint` keep their bare-`@` fields. A specific atom such as `@ud` fits where `@` is expected; an `@` value needs a check to fit `@ud`. Shared atom types use one capital, with the atom constraint inferred from its body, as for `add` taking `[A A]` and returning `A`.
138−
139−**16. Settled: loobeans in union disjointness.** On 2026-10-30, @iko said `?` counts as its two atoms, `%.y` and `%.n`: it is disjoint from any cell and overlaps the constants 0 and 1.
140−
141−**17. Settled: empty cases in union disjointness.** On 2026-10-30, @iko said `!!` is disjoint from every case. A cell containing an empty position at any depth is itself empty and is also disjoint from every case.
142−
143−**18. Settled: the value gate `like`.** On 2026-10-31, @iko chose a gate `(like convert result)` that maps the product of an existing `(like A)` result with `convert=$-(A B)`, yielding `(like B)` while preserving its position and remaining input. An absent result stays absent. The `(like A)` mold remains available in the separate mold namespace. Hoon's wet `+like` instead builds a gate that constructs a result from an input noun; the chosen Jibb value gate is an adaptation of that behavior.
144−
145−**19. Settled: Hoon aura families and `step.hoon`.** On 2026-10-30, @iko chose `step.hoon` for Hoon 1c `step`, avoiding a clash with the Grammar example's `step`, and chose one-way widening across Hoon aura families: for example, `@ud` and `@ux` fit `@u`, and `@tD` fits `@t`. The reverse needs a check. The `step.hoon` group representation is not implemented yet.
146−
147−**20. Settled: the type of `clap`.** On 2026-10-30, @iko chose one shared value type for both units and the combining gate. If either unit is absent, `clap` returns the other; if both are present, it applies the gate to their values and wraps the result.
148−
149−**21. Settled: duplicate faces in imported Hoon records.** On 2026-10-30, @iko chose to reject an imported Hoon record with duplicate field names where its type is used. Hoon permits `[a=@ud a=@t]` and picks the first `a`; Jibb rejects it.
150−
151−**22. Settled: overlapping imported `$%` and `$?` cases.** On 2026-10-30, @iko confirmed that the general union disjointness rule rejects imported `$%` and `$?` cases that overlap as nouns where the type is used, as it does for `$^`. The importer rejects recognizable overlaps and fails closed when it cannot verify them.
152−
153−**23. Settled: converging explicit capitals.** On 2026-10-30, @iko chose that a body cannot force two separately written capitals to be equal. For `++ repeated |= x=(choice A A) x`, `++ f |= x=(choice A B) (repeated x)` is an error; use `A` in both positions when the type must be shared. This also applies across local captures and within generic mold applications.
154−
155−**24. Settled: how the internal prelude provides `raw-poke`.** On 2026-11-01, @iko chose to define `raw-poke` in the source-backed private internal prelude module and re-export it through the public prelude as an ordinary transparent type. Ordinary modules can construct and inspect its values, while derived API/store `poke` helpers return commands. This settles `raw-poke`; it does not decide the representation of `ask` or `qath`.
156−
157−**25. Settled: how the prelude provides `ask` and `qath`.** On 2026-10-31, @iko chose ordinary transparent types defined in the internal prelude and re-exported normally, as for `raw-poke`. Callers may construct and inspect their values.
158−
159−**26. Settled: the `step` example's `at` binder.** On 2026-10-31, @iko chose to rename the `describe` pattern binder to `sent-at`, keeping Hoon's `at` in the prelude and the no-shadowing rule.
160−
161−**27. Settled: duplicate fields in a Jibb-written record.** On 2026-10-31, @iko chose to reject duplicate field names, as for imported Hoon records.
162−
163−**28. Settled: arithmetic on loobeans.** On 2026-10-31, @iko chose to reject loobean operands for arithmetic. Comparison may still accept loobeans and returns `?`. The checker needs to retain this constraint through inference, generalization and instantiation before it exports `add` or `dec`.
164−
165−**29. Settled: printing the arithmetic atom constraint.** On 2026-10-31, @iko chose `where A is an atom other than ?` for a generic arithmetic type whose atom variable excludes loobeans.
166−
167−**30. Settled: a hole inferred as a generic variable.** On 2026-10-31, @iko said a hole resolved to an explicitly written type variable counts as inferred: in `++ id |= x=A ^- _ x`, the result hole is `A`. Named molds must determine their own holes without constraints from later uses; an unconstrained hole is an error.
168−
169−**31. Settled: uses of a value with a hole.** On 2026-10-31, @iko said a value definition must determine its own holes; another definition's use cannot fix an otherwise unresolved hole. For example, `++ id |= x=_ x` remains an error even if a later definition calls `id` with a cord.
170−
171−**33. Settled: watching a request with unknown provenance.** On 2026-10-31, @iko said an island may watch a request only if the checker proves it watchable at compile time. An unknown request, including one built or passed through a gate without sufficient evidence, is rejected rather than deferred to a runtime check.
172−
173−**34. Settled: constructors and equal noun literals.** On 2026-10-31, @iko said expressions with the same runtime representation count as equal, and cases that cannot be distinguished at runtime are rejected at compile time. Thus `|=%$` matches a case headed by `%$`, `%.y` or `~`: each is the noun 0. Cases with equal heads and overlapping payloads cannot coexist in a union.
174−
175−Review question 25, when to build `eq` and the gate-free constraint, is settled: @iko's commit 0858191 adds `eq` and infers the constraint.
176
98
177## Checked against the kernel
99## Checked against the kernel
178
100
docs/spec/grammar.md+42−62
@@ -6,20 +6,19 @@ The syntax the compiler accepts.
6
6
7## Lexical rules
7## Lexical rules
8
8
9−- **Indentation is structure**: a block of deeper lines belongs to the line above it: to the last bracket that line leaves open at its end, to the body of the last rune or `++` on it, to `?-`'s arms, to an arm's body, or to a `+$`'s cases; or, for a rune or `?-` that ends a body's final line, so do the lines after it at the same depth, as The rest of a body says. A deeper line that nothing on the line above takes is an error, so a call never continues onto a deeper line. Returning to an earlier indentation closes every block since. Spaces only; blank and comment-only lines don't count.
9+- **Indentation is structure**: a deeper line continues the line above; returning to an earlier indentation closes every block since. Spaces only; blank and comment-only lines don't count.
10- **Layout tokens**: a deeper line emits INDENT, the same depth NEWLINE, a shallower one a DEDENT per closed level, then NEWLINE.
10- **Layout tokens**: a deeper line emits INDENT, the same depth NEWLINE, a shallower one a DEDENT per closed level, then NEWLINE.
11−- **Open brackets**: a bracket open at line end takes one item per deeper line and closes at the first line that isn't deeper, with no closer. Brackets opened and closed on one line work as usual. A mold's `[` and `(` open the same way, with one field or mold per deeper line. A line may leave several brackets open: the deeper lines go to the last one, or to the body of the last rune, and the others close with it, so `(column ~ ~[` above its items needs no `)`. On the opener's line, spaces separate items, so `~[text "a"` holds two items. In an expression's open bracket each deeper line is one whole item: `text "a"` there is `(text "a")`, `label=trim " x "` is `label=(trim " x ")`, and under a `(` alone the first deeper line is the head. A mold's open bracket takes exactly one field or mold per deeper line.
11+- **Open brackets**: a bracket open at line end takes one item per deeper line and closes at the first line that isn't deeper, with no closer. Brackets opened and closed on one line work as usual. A mold's `[` and `(` open the same way, with one field or mold per deeper line. A line may leave several brackets open: the deeper lines go to the last one, or to the body of the last rune, and the others close with it, so `(column ~ ~[` above its items needs no `)`.
12- **Tight forms**: `a+b`, `a.b`, `` `x ``, `|=%got` and the openers `~[`, `|=(`, `$-(` take no spaces. A `(` right after a wing is a change: `m(note=text)` changes, `m (note text)` calls. `%/` starts an application path, `%/blog/(slug)`.
12- **Tight forms**: `a+b`, `a.b`, `` `x ``, `|=%got` and the openers `~[`, `|=(`, `$-(` take no spaces. A `(` right after a wing is a change: `m(note=text)` changes, `m (note text)` calls. `%/` starts an application path, `%/blog/(slug)`.
13−- **Spacing**: one space between items; more for alignment. That is style, which the formatter keeps: the parser takes one or more spaces between items, and allows spaces after an opener, before a closer and at the end of a line. Faces `name=value`, puns `=name` and typed path segments `[id=@ud]` take no spaces, and a rune is followed by one. The formatter puts a cast whose expression takes the deeper lines at the end of the line it belongs to, the `|=`, `++` or arm line, and a cast whose expression fits on its own line on the line below with it. It starts every `?-` on its own line, below the line it belongs to, with its arms at its depth where the rest of a body allows that, and one level deeper on an open bracket's line.
13+- **Spacing**: one space between items; more for alignment. That is style, which the formatter keeps: the parser takes one or more spaces between items, and allows spaces after an opener, before a closer and at the end of a line. Faces `name=value`, puns `=name` and typed path segments `[id=@ud]` take no spaces, and a rune is followed by one.
14- **Comments**: `::` to the end of the line, outside strings; inside a string, `::` is text.
14- **Comments**: `::` to the end of the line, outside strings; inside a string, `::` is text.
15- **Names**: Hoon terms; lowercase letters, digits and hyphens, starting with a letter.
15- **Names**: Hoon terms; lowercase letters, digits and hyphens, starting with a letter.
16−- **Type variables**: a capital, then lowercase letters and digits: `A`, `Msg`, `T2`. `AB`, `MSG`, `Msg_x` and `Msg-x` are errors. In a mold, a capitalized name is a type variable and a lowercase name is a mold: the reverse of Elm, where `Msg` is a concrete type and `msg` a type variable.
17
16
18## Literals
17## Literals
19
18
20| Form | Example | Type |
19| Form | Example | Type |
21| --- | --- | --- |
20| --- | --- | --- |
22−| Decimal | `1.000` | `@ud`, which also fits `@u`, `@` and `*`; groups of three, as in Hoon |
21+| Decimal | `1.000` | `@ud`, or any aura by context; groups of three, as in Hoon |
23| Hexadecimal | `0x1f` | `@ux` |
22| Hexadecimal | `0x1f` | `@ux` |
24| Base 32 | `0v5.fdf99` | `@uv` |
23| Base 32 | `0v5.fdf99` | `@uv` |
25| Ship | `~zod`, `~sampel-palnet` | `@p` |
24| Ship | `~zod`, `~sampel-palnet` | `@p` |
@@ -43,35 +42,27 @@ Every literal reads exactly as Hoon reads it: `1000` is an error (write `1.000`)
43
42
44- **Call**: `f a b`; parentheses only group. A call open in parentheses puts its head and first arguments on the first line, then one argument per indented line; a `(` alone at the end of a line puts the head on the first indented line.
43- **Call**: `f a b`; parentheses only group. A call open in parentheses puts its head and first arguments on the first line, then one argument per indented line; a `(` alone at the end of a line puts the head on the first indented line.
45- **Lists**: `~[a b c]`, or `~[` at line end with one item per line. On one line, whitespace separates items, so calls need parentheses: `~[(text "hi")]`, which the checker suggests for `~[text "hi"]`. On indented lines, each line is an item.
44- **Lists**: `~[a b c]`, or `~[` at line end with one item per line. On one line, whitespace separates items, so calls need parentheses: `~[(text "hi")]`, which the checker suggests for `~[text "hi"]`. On indented lines, each line is an item.
46−- **Faced cells**: `[text="milk" done=%.n]`, or one `name=value` per line of an open bracket. A change takes one or more of the same items, as `m(done=%.y)`; `m()` is an error. A change's item, inline or on a line, may name a wing instead, read through record fields only: `m(open.cart=(not open.cart.m))` sets field `open` of field `cart`, as Hoon's `m(open.cart x)`. Every value is computed from the original record. Two items that set the same field, or one a field inside the other's, as `m(cart=c open.cart=%.y)`, are an error. A cell's items take plain names.
45+- **Faced cells**: `[text="milk" done=%.n]`, or one `name=value` per line of an open bracket. A change takes one or more of the same items, as `m(done=%.y)`; `m()` is an error.
47- **Pairs and units**: `gap+%s2` and `` `x `` bind tighter than calls, so `pad+%s3 gap+%s2` is two items.
46- **Pairs and units**: `gap+%s2` and `` `x `` bind tighter than calls, so `pad+%s3 gap+%s2` is two items.
48- **Wing** `title.p`, also for imports and prelude groups, which are records: `card.card`, `space.theme.theme`, `get.by`. **Change** `m(draft="x" error=~)`.
47- **Wing** `title.p`, also for imports and prelude groups, which are records: `card.card`, `space.theme.theme`, `get.by`. **Change** `m(draft="x" error=~)`.
49−- **Unface**: `(unface e)` is `e` with every face removed from its type, so a gate or record fits where other names are expected. `~[(unface lth2) (unface lte2)]` is a list though `lth2` names its sample `[x=A y=A]` and `lte2` names it `[a=A b=A]`, and `(take-kv (unface pair))` passes a `[p=@t q=@ud]` where `[k=@t v=@ud]` is expected; the fields then match by position alone. Faces go from cells, from a gate's sample and product, and from a container's arguments, as in `(list [p=@t q=@ud])`. A union or recursive mold goes by name, so it is kept whole: a gate over `msg` still takes a `msg`. A type variable inside `e`'s type keeps the faces it is bound to later. Like `proj`, it is an operation the checker handles by type, not a gate: it takes one argument, and `(turn gs unface)` is an error; write `|=(g (unface g))`. A `++` whose body is `(unface |= …)` is still a gate, so it can call itself.
50- **Inline gate**: `|=(p=post.blog title.p)`, or `|=(p title.p)` when the call fixes the type. A bare name in a sample always binds. `|=%got` is case `%got`'s constructor, typed by the gate expected. A bare name binds at any depth of a sample, so `|= [a=@ b]` binds `a` and `b`.
48- **Inline gate**: `|=(p=post.blog title.p)`, or `|=(p title.p)` when the call fixes the type. A bare name in a sample always binds. `|=%got` is case `%got`'s constructor, typed by the gate expected. A bare name binds at any depth of a sample, so `|= [a=@ b]` binds `a` and `b`.
51- **Interpolation**: `{…}` holds any expression; `\{` writes a brace and `\"` a quote; no `<…>`. Strings take Hoon's escapes: `\\` writes a backslash, and `\` with two lowercase hex digits writes that byte, as `\0a` a line feed; any other `\` is an error. A string and each `{…}` close on the line they open, and `::` inside a string is text.
49- **Interpolation**: `{…}` holds any expression; `\{` writes a brace and `\"` a quote; no `<…>`. Strings take Hoon's escapes: `\\` writes a backslash, and `\` with two lowercase hex digits writes that byte, as `\0a` a line feed; any other `\` is an error. A string and each `{…}` close on the line they open, and `::` inside a string is text.
52- **No operators**: `eq a b`, `not x`, `gth a b` are gates.
50- **No operators**: `eq a b`, `not x`, `gth a b` are gates.
53
51
54## Runes
52## Runes
55
53
56−A rune's first children sit on its line, the last taking the rest of it; the others follow, indented. On a body's final line, the last child may instead take the rest of the body at the same depth, as The rest of a body says.
54+A rune's first children sit on its line, the last taking the rest of it; the others follow, indented.
57
55
58- `++` **luslus**: defines a value, at top level or as local names at the start of any body (a gate's, an arm's, a `^-`'s, a `~&`'s or a `++`'s), visible to each other and the final expression. Gates may call themselves and their siblings; other values can't depend on themselves, even through a gate, so `++ title (trim title)` is an error.
56- `++` **luslus**: defines a value, at top level or as local names at the start of any body (a gate's, an arm's, a `^-`'s, a `~&`'s or a `++`'s), visible to each other and the final expression. Gates may call themselves and their siblings; other values can't depend on themselves, even through a gate, so `++ title (trim title)` is an error.
59- `+$` **lusbuc**: defines a mold, likewise: on its line, or as cases on the lines below, one per line, where several cases make a union and one is just that mold. Molds may be recursive.
57- `+$` **lusbuc**: defines a mold, likewise: on its line, or as cases on the lines below, one per line, where several cases make a union and one is just that mold. Molds may be recursive.
60- `|=` **bartis**: a gate with a faced sample, `m=model`, `=msg` (`msg=msg`) or `[a=@ b=@]`; the body on the same line or below.
58- `|=` **bartis**: a gate with a faced sample, `m=model`, `=msg` (`msg=msg`) or `[a=@ b=@]`; the body on the same line or below.
61−- `?-` **wuthep**: the only branch, exhaustive; the subject on its line, then arms of a pattern and an expression or body, one per line, deeper. A `?-` that begins a body's final line may instead take its arms at its own depth, to the end of the body. A `?-` takes all its arms deeper or all at its own depth. Conditions switch on `%.y` and `%.n`.
59+- `?-` **wuthep**: the only branch, exhaustive; the subject on its line, then arms of a pattern and an expression or body. Conditions switch on `%.y` and `%.n`.
62- `^-` **kethep**: a cast; the mold on its line, the expression after it or below.
60- `^-` **kethep**: a cast; the mold on its line, the expression after it or below.
63- `~&` **sigpam**: prints the value on its line, then runs the body below; output goes to the ship's log or the browser's console.
61- `~&` **sigpam**: prints the value on its line, then runs the body below; output goes to the ship's log or the browser's console.
64- `!!` **zapzap**: a crash, an expression of any type; as a mold, the empty mold. It is an operand, so `f !!` and `~[!!]` need no parentheses.
62- `!!` **zapzap**: a crash, an expression of any type; as a mold, the empty mold. It is an operand, so `f !!` and `~[!!]` need no parentheses.
65- `$-` **buchep**: a gate's mold, `$-(sample product)`.
63- `$-` **buchep**: a gate's mold, `$-(sample product)`.
66- `|$` **barbuc**: a generic mold, right after a `+$`'s name: `+$ result |$ [V E]`, then the mold on its line or the cases below.
64- `|$` **barbuc**: a generic mold, right after a `+$`'s name: `+$ result |$ [V E]`, then the mold on its line or the cases below.
67
65
68−**The rest of a body.** A body's final line may hand the rest of the body, the lines after it at the same depth, to the rune that ends the line:
69−
70−- a tall `|=`, `^-` or `~&`, or a chain of them such as `^- @ud ~& x`, when the line ends where the innermost rune's last child goes. That child is the rest, a body of its own: first its local `++` and `+$`, then its expression, whose own final line may do the same;
71−- a `?-` that begins the line and ends it with its subject. Its arms are the rest, one per line, so nothing follows them.
72−
73−A gate's body can then be `~& msg`, then `?- msg`, then its arms, all at one depth, and adding or removing the `~&` line moves no other line. This doesn't apply on a `?-` arm's line, on a line of an open bracket, after a bracket opened earlier on the line (the subject's included), at the top level, or to a definition's own expression. So `++ inner |= y=@ud` above `(inner x)`, `[a b] ?- a` above `%.y 1`, `^- @ud ?- x` above `%.y 1` and `++ g ?- x` above `%.y 1` stay errors.
74−
75Only `|=` and `$-` have wide forms: `|=(sample expr)` and `$-(mold mold)`. Their children are operands, so calls inside need parentheses.
66Only `|=` and `$-` have wide forms: `|=(sample expr)` and `$-(mold mold)`. Their children are operands, so calls inside need parentheses.
76
67
77Left out on purpose:
68Left out on purpose:
@@ -100,18 +91,18 @@ Imports come first:
100/= card /ui/components/card :: a Jibb module
91/= card /ui/components/card :: a Jibb module
101```
92```
102
93
103−An imported Hoon record with duplicate field names is an error where used; imported union cases must differ as nouns. `/%` names a type after its mark, so it takes no face, and any mark name works; Hoon's `/%` binds the mark's core instead. Derived helpers such as `poke.todo` supply the agent and mark, so callers need not write those details. API modules re-export their `/%` types, not `/-` faces or `/=` modules. Import cycles are errors.
94+An imported Hoon record with duplicate field names is an error where used; imported union cases must differ as nouns. `/%` names a type after its mark, so it takes no face, and any mark name works; Hoon's `/%` binds the mark's core instead. Derived constructors such as `todo-action.todo` supply the agent and mark, so callers need not write those details. API modules re-export their `/%` types, not `/-` faces or `/=` modules. Import cycles are errors.
104
95
105## Modules
96## Modules
106
97
107A file is a module: imports, then definitions.
98A file is a module: imports, then definitions.
108
99
109- `+$ name mold` defines a mold; `++ name expr` a value.
100- `+$ name mold` defines a mold; `++ name expr` a value.
110−- Names may refer to each other in any order, and no name may shadow one already in scope, imports and the prelude included. `proj` and `unface` are reserved: no module can define, import or bind either, as a value or a mold.
101+- Names may refer to each other in any order, and no name may shadow one already in scope, imports and the prelude included.
111−- Molds and values have separate namespaces, told apart by position: `todo-action.todo` is a mold, `poke.todo` its command helper, and `todos.todo` a mold and a request.
102+- Molds and values have separate namespaces, told apart by position: `todo-action.todo` is a mold and its constructor, `todos.todo` a mold and a request.
112−- `main`'s type decides the kind: `(element !!)` a page; `(page Params Data)` a page with data, from parameters to data; `(program Data Model Msg)` an island, with data, model and messages; `(store S)` a store with state `S`. They're built by `(page load view)`, `(program init update view subs)` and `(store init update)`. A module without `main` is a library.
103+- `main`'s type decides the kind: `(element !!)` a page; `(page R D)` a page with data, from parameters `R` to data `D`; `(program D X M)` an island, with data, model and messages; `(store S)` a store with state `S`. They're built by `(page load view)`, `(program init update view subs)` and `(store init update)`. A module without `main` is a library.
113- Everything is exported and read through the import's face, as `card.card`. The prelude keeps private helpers in a separate internal module; it imports them without exposing them.
104- Everything is exported and read through the import's face, as `card.card`. The prelude keeps private helpers in a separate internal module; it imports them without exposing them.
114−- An API module, `/ui/api/<agent>.jibb`, also exports derived gates: a generic `poke` command helper, adding the agent and mark and taking a reply, and a request per `paths` case, taking a reply over full state, plus a fold for `(facts full diff …)`. An island may watch a request only when the checker proves it is watchable. A request whose case has a separate `scry=` path, or whose watchability cannot be proved, is a type error. A store's local `+$ poke` is its ordinary action mold; a store exports a generic `poke` command helper and a `state` request. Clashing derived names are errors, including a derived name that clashes with an import face.
105+- An API module, `/ui/api/<agent>.jibb`, also exports derived gates: a constructor per `poke` type, adding the agent and mark, and a request per `paths` case, taking a reply over full state, plus a fold for `(facts full diff …)`. An island may watch a request only when the checker proves it is watchable. A request whose case has a separate `scry=` path, or whose watchability cannot be proved, is a type error. A store's `+$ poke` is a declaration, not a mold; a store exports a constructor per `poke` type and a `state` request. Clashing derived names are errors, including a derived name that clashes with an import face.
115
106
116Names the host reads, by file:
107Names the host reads, by file:
117
108
@@ -130,18 +121,17 @@ Every other name is free.
130A mold is only a type: never called on a noun, and with no default. Types are inferred, Hindley–Milner with aura variables: every expression has a principal type, and there is no general subtyping. These one-way widenings are allowed: a value of a specific atom type fits `@`, a value of a specific noun type fits `*`, and a more specific aura fits an ancestor in its Hoon aura family; the reverse of each widening needs a check. Records can also be projected explicitly, as described below.
121A mold is only a type: never called on a noun, and with no default. Types are inferred, Hindley–Milner with aura variables: every expression has a principal type, and there is no general subtyping. These one-way widenings are allowed: a value of a specific atom type fits `@`, a value of a specific noun type fits `*`, and a more specific aura fits an ancestor in its Hoon aura family; the reverse of each widening needs a check. Records can also be projected explicitly, as described below.
131
122
132- **Partial annotations**: `_` may appear wherever a mold may appear. It marks a part of the type for the checker to infer, so a type annotation can specify only the parts it needs to. A hole inferred to be a named type variable is resolved: in `++ id |= x=A ^- _ x`, the result hole is `A`. An unconstrained hole is an error. A named mold or value definition must determine its own holes: `+$ box [item=_]` and `++ id |= x=_ x` do not determine their holes, and later uses cannot fix them.
123- **Partial annotations**: `_` may appear wherever a mold may appear. It marks a part of the type for the checker to infer, so a type annotation can specify only the parts it needs to. A hole inferred to be a named type variable is resolved: in `++ id |= x=A ^- _ x`, the result hole is `A`. An unconstrained hole is an error. A named mold or value definition must determine its own holes: `+$ box [item=_]` and `++ id |= x=_ x` do not determine their holes, and later uses cannot fix them.
133−- **Atoms**: `@` is any atom, regardless of aura; auras such as `@ud`, `@t`, `@p` and `@da` are specific atom types. An `@ud` value fits where `@` is expected, but an `@` value needs a check to fit `@ud`. A more specific aura also fits an ancestor in its Hoon aura family: `@ud` and `@ux` fit `@u`, and `@tD` fits `@t`. The reverse needs a check. Distinct specific auras remain distinct; sharing an ancestor does not make them unify. Each bare `@` independently accepts any atom: it is not an aura variable. Atoms that must share a type take one type variable, as `[lo=A hi=A]`, with the atom constraint inferred from the body. `add` takes `[A A]` and returns `A`, with `A` constrained to atoms, so `(add n 1)` with `n=@ud` is a `@ud`. Arithmetic rejects loobean operands: `?` contains only 0 and 1, while an arithmetic result need not. Comparison may take loobeans and returns `?`.
124+- **Atoms**: `@` is any atom, regardless of aura; auras such as `@ud`, `@t`, `@p` and `@da` are specific atom types. An `@ud` value fits where `@` is expected, but an `@` value needs a check to fit `@ud`. A more specific aura also fits an ancestor in its Hoon aura family: `@ud` and `@ux` fit `@u`, and `@tD` fits `@t`. The reverse needs a check. Distinct specific auras remain distinct; sharing an ancestor does not make them unify. Each bare `@` independently accepts any atom: it is not an aura variable. Atoms that must share a type take one capital, as `[lo=A hi=A]`, with the atom constraint inferred from the body. `add` takes `[A A]` and returns `A`, with `A` constrained to atoms, so `(add n 1)` with `n=@ud` is a `@ud`. Arithmetic rejects loobean operands: `?` contains only 0 and 1, while an arithmetic result need not. Comparison may take loobeans and returns `?`.
134- **Constants**: `%add`, `~` and the loobeans have one value each.
125- **Constants**: `%add`, `~` and the loobeans have one value each.
135- **Records and tuples**: `[text=@t done=?]`, `[@t ?]`. An empty `[]` is an error. Duplicate field names in a record are an error. Faces are part of the type, so `[a=@ b=@]` and `[x=@ y=@]` don't unify. An unnamed position can unify with a faced position and take its face, so `[0 0]` fits `[x=@ud y=@ud]`; two different faces don't unify. The explicit type-directed operation `(proj record)` selects fields from its argument according to the expected result type: `^- [x=@ud y=@ud] (proj wider)`, or `(f (proj wider))` when `f` expects that record. The source is evaluated once, and the result contains exactly the fields in the expected layout. No projection is inserted for a direct call. `proj` is reserved: a module cannot define or import another name `proj`. A record too long for one line can leave its `[` open, with one field per deeper line, as an expression's bracket does.
126- **Records and tuples**: `[text=@t done=?]`, `[@t ?]`. An empty `[]` is an error. Duplicate field names in a record are an error. Faces are part of the type, so `[a=@ b=@]` and `[x=@ y=@]` don't unify. An unnamed position can unify with a faced position and take its face, so `[0 0]` fits `[x=@ud y=@ud]`; two different faces don't unify. The explicit type-directed operation `(proj record)` selects fields from its argument according to the expected result type: `^- [x=@ud y=@ud] (proj wider)`, or `(f (proj wider))` when `f` expects that record. The source is evaluated once, and the result contains exactly the fields in the expected layout. No projection is inserted for a direct call. `proj` is reserved: a module cannot define or import another name `proj`. A record too long for one line can leave its `[` open, with one field per deeper line, as an expression's bracket does.
136- **Unions**: a `+$` with several cases below it. Every union written in Jibb has a name, so one used in a field, a sample, a cast, a gate's mold or an argument gets its own `+$`; only imports bring in unions without one. Tags take their union from context, as Tag resolution describes. Cases must differ as nouns: inhabited cases must differ at some position of their right-nested cells, where one is an atom and the other a cell, or both are different constants. `*`, type variables and molds that can be either, such as `(list A)`, can overlap atoms and cells. `?` counts as the two atoms `%.y` and `%.n`: it is disjoint from cells and overlaps the constants 0 and 1. The empty mold `!!` is disjoint from every case; a cell with an empty position at any depth is itself empty and is also disjoint from every case. A union whose cases don't all differ is rejected.
127- **Unions**: a `+$` with several cases below it. Every union written in Jibb has a name, so one used in a field, a sample, a cast, a gate's mold or an argument gets its own `+$`; only imports bring in unions without one. Tags take their union from context, as Tag resolution describes. Cases must differ as nouns: inhabited cases must differ at some position of their right-nested cells, where one is an atom and the other a cell, or both are different constants. `*`, type variables and molds that can be either, such as `(list A)`, can overlap atoms and cells. `?` counts as the two atoms `%.y` and `%.n`: it is disjoint from cells and overlaps the constants 0 and 1. The empty mold `!!` is disjoint from every case; a cell with an empty position at any depth is itself empty and is also disjoint from every case. A union whose cases don't all differ is rejected.
137- **Containers**: `(list A)`, `(unit A)`, `(set A)`, `(map K V)`, `(mop K V)`, `(qeu A)`, `(jar K V)`, `(jug K V)`.
128- **Containers**: `(list A)`, `(unit A)`, `(set A)`, `(map K V)`, `(mop K V)`, `(qeu A)`, `(jar K V)`, `(jug K V)`.
138−- **Gates**: `$-(A B)`. Type variables are capitalized names, as `A` or `Msg`, generalized per `++`. A capital in a local `++` shares the enclosing `++`'s variable of the same name if the enclosing `++` also uses it; otherwise the local `++` introduces and generalizes its own variable. For example, `++ inner |= y=A y` uses the enclosing `A` when its enclosing gate has a sample `x=A`; if the enclosing `++` does not use `A`, `inner` generalizes its own `A`. Use another capital for a different type. A body can't force two distinct capitals to be equal; use the same capital wherever a type must be shared. A type variable used where an atom is required gains an atom constraint, so `++ clamp |= [lo=A hi=A n=A]`, whose body calls `gth` and `max`, works on any one aura. It can become nothing more specific: a body that makes `A` a `@ud` or a list is an error.
129+- **Gates**: `$-(A B)`. Type variables are capitals, generalized per `++`. A capital in a local `++` shares the enclosing `++`'s variable of the same name if the enclosing `++` also uses it; otherwise the local `++` introduces and generalizes its own variable. For example, `++ inner |= y=A y` uses the enclosing `A` when its enclosing gate has a sample `x=A`; if the enclosing `++` does not use `A`, `inner` generalizes its own `A`. Use another capital for a different type. A body can't force two distinct capitals to be equal; use the same capital wherever a type must be shared. A type variable used where an atom is required gains an atom constraint, so `++ clamp |= [lo=A hi=A n=A]`, whose body calls `gth` and `max`, works on any one aura. It can become nothing more specific: a body that makes `A` a `@ud` or a list is an error.
139−- **Printed types** show a type variable by the name it was written with: `++ id |= x=Msg x` prints `$-(Msg Msg)`. A variable from a gate a `++` uses keeps that gate's name, so `++ make program` keeps `program`'s `Data`, `Model` and `Msg`. When several named variables become one, a capital written in the `++` names it; otherwise the one made first does, and a called gate's variables are made before its arguments', so `(cork same same)` prints `$-(A A)`, from `cork`'s `A`. A variable with no name prints as a letter that no other variable in the same type uses: `++ h |= x=A [x same]` prints `$-(A [A $-(B B)])`.
140- **Paths**: `/todos` is constant, `/` empty, and `/todo/[id=@ud]` typed by aura. A typed segment may use `_` for an inferred aura; it still must resolve to an aura that the path rules can print and parse. `%/blog/(slug)` is an `qath`, checked against routes and static files.
130- **Paths**: `/todos` is constant, `/` empty, and `/todo/[id=@ud]` typed by aura. A typed segment may use `_` for an inferred aura; it still must resolve to an aura that the path rules can print and parse. `%/blog/(slug)` is an `qath`, checked against routes and static files.
141- **Generic molds**: `+$ result |$ [V E]` with cases below; `|$` goes only right after a `+$`'s name.
131- **Generic molds**: `+$ result |$ [V E]` with cases below; `|$` goes only right after a `+$`'s name.
142−- **Noun**: `*`, not a type variable; use a type variable for a generic type. A value already known to have a more specific noun type, such as `@ud`, can be used where `*` is expected. **Empty**: `!!`.
132+- **Noun**: `*`, not a type variable; use a capital for a generic type. A value already known to have a more specific noun type, such as `@ud`, can be used where `*` is expected. **Empty**: `!!`.
143−- **Pokes**: `raw-poke` is defined in the source-backed private internal prelude module and re-exported by the public prelude as an ordinary transparent type. Ordinary modules can construct and inspect its values; derived `poke` helpers return commands.
133+- **Pokes**: `poke` is defined in the source-backed private internal prelude module and re-exported by the public prelude as an ordinary transparent type. Ordinary modules can construct and inspect its values.
144−- **Effect and application-path types**: `raw-poke`, `ask` and `qath` are transparent types, defined in the internal prelude and re-exported normally; callers can construct and inspect their values. Derived gates and `pure` also construct requests, and application-path literals have type `qath`. `(facts full diff …)` appears only in an API file's `paths`.
134+- **Effect and application-path types**: `poke`, `ask` and `qath` are transparent types, defined in the internal prelude and re-exported normally; callers can construct and inspect their values. Derived gates and `pure` also construct requests, and application-path literals have type `qath`. `(facts full diff …)` appears only in an API file's `paths`.
145- **Identity**: recursive molds go by name and module.
135- **Identity**: recursive molds go by name and module.
146
136
147`eq`'s arguments and map and set keys must contain no gates, even nested inside another value. The checker infers this gate-free constraint on type variables and retains it when generalizing a `++`, so a generic helper that calls `eq` stays generic over gate-free types. Printed types show the constraint as `$-([A A] ?) where A contains no gates`. An inferred atom constraint prints as `$-([A A] A) where A is an atom`; an arithmetic atom constraint that excludes loobeans prints as `where A is an atom other than ?`. Multiple clauses are comma-separated, as `where A is an atom, B contains no gates`. Union-case matching treats gates as opaque and never inspects a gate to distinguish cases.
137`eq`'s arguments and map and set keys must contain no gates, even nested inside another value. The checker infers this gate-free constraint on type variables and retains it when generalizing a `++`, so a generic helper that calls `eq` stays generic over gate-free types. Printed types show the constraint as `$-([A A] ?) where A contains no gates`. An inferred atom constraint prints as `$-([A A] A) where A is an atom`; an arithmetic atom constraint that excludes loobeans prints as `where A is an atom other than ?`. Multiple clauses are comma-separated, as `where A is an atom, B contains no gates`. Union-case matching treats gates as opaque and never inspects a gate to distinguish cases.
@@ -154,7 +144,7 @@ A tag literal or `~` gets a fresh type variable and a pending constraint: the va
154- `|=%typed` is a case's constructor: against `$-(@t M)` it is `|=(t [%typed t])`, requiring `M` to have a case `[%typed @t]`. It works for cases whose head is a literal with the same noun as the tag, regardless of how that literal is written: `|=%$` also constructs a case headed by `%.y` or `~`, since each is the noun 0. A bare tag is always a value.
144- `|=%typed` is a case's constructor: against `$-(@t M)` it is `|=(t [%typed t])`, requiring `M` to have a case `[%typed @t]`. It works for cases whose head is a literal with the same noun as the tag, regardless of how that literal is written: `|=%$` also constructs a case headed by `%.y` or `~`, since each is the noun 0. A bare tag is always a value.
155- A variable constrained by tag resolution, and any it mentions, doesn't generalize; it stays open until something in the module fixes it. An island's `main` fixes its messages, so islands resolve their own tags. The inferred gate-free constraint is retained when a type variable is generalized.
145- A variable constrained by tag resolution, and any it mentions, doesn't generalize; it stays open until something in the module fixes it. An island's `main` fixes its messages, so islands resolve their own tags. The inferred gate-free constraint is retained when a type variable is generalized.
156- A constraint still open when its module is checked is an error asking for a `^-`; the checker never guesses. Library helpers can cast, as in `^- (list attr)`.
146- A constraint still open when its module is checked is an error asking for a `^-`; the checker never guesses. Library helpers can cast, as in `^- (list attr)`.
157−- Wing access, changes, `unface` and `?-` on a type not yet known wait the same way.
147+- Wing access, changes and `?-` on a type not yet known wait the same way.
158- Patterns need none of this; they're checked against the subject's type.
148- Patterns need none of this; they're checked against the subject's type.
159
149
160```jibb
150```jibb
@@ -169,12 +159,12 @@ A tag literal or `~` gets a fresh type variable and a pending constraint: the va
169
159
170## Literals by context
160## Literals by context
171
161
172−Number and cell literals resolve like tags: each waits for its context and takes a default when its `++` is checked. A number is a `@ud`, as in Hoon: a context can make it a `@u`, and it fits `@` and `*`, but every other aura takes its own literal, as `~s30` for a `@dr`, `~2026.1.1` for a `@da`, `~zod` for a `@p`, `"5"` for a `@t` and `0x1` for a `@ux`. So `^- @dr 30`, `^- @p 0`, `(add ~s1 1)` and `(text 5)` are errors, each naming the number and the aura it met. A number takes `@ud` only if nothing fixes its aura and its `++` isn't generic over it, so `++ inc |= n=A (add n 1)` stays generic, and `(inc ~s1)` is a `@dr`, while the sum in `"{(add 1 2)}"` is a `@ud`.
162+Number and cell literals resolve like tags: each waits for its context and takes a default when its `++` is checked. A number takes `@ud` only if nothing fixes its aura and its `++` isn't generic over it, so `++ inc |= n=A (add n 1)` stays generic, while the sum in `"{(add 1 2)}"` is a `@ud`.
173
163
174| Literal | Can become | Default |
164| Literal | Can become | Default |
175| --- | --- | --- |
165| --- | --- | --- |
176| Tag `%a`, or `~` | A union's case or a constant atom | None: an error asking for a `^-` |
166| Tag `%a`, or `~` | A union's case or a constant atom | None: an error asking for a `^-` |
177−| Number `5` | `@ud` or `@u`, or any aura its `++` is generic over | `@ud` |
167+| Number `5` | Any aura | `@ud` |
178| Cell `[x xs]` | A tuple, a record, a cons | A tuple |
168| Cell `[x xs]` | A tuple, a record, a cons | A tuple |
179
169
180- In `{…}`, an atom prints by its aura: `@ud` as `1.000`, `@da` as a UTC date with sub-seconds, `@p` as a ship, and a bare `@` as `@ud`. `@t`, `@ta`, `@tas` and tapes splice as text; any other cell is an error asking for a printer. Printers are picked when compiling, so an atom whose aura its `++` is generic over, as `n` in `|= n=A` when `A` is constrained to atoms, is an error asking for an aura, here and in a `(…)` segment of an application path. For readers, `print-date` prints in the theme's zone, Urbit-style, to the minute, as `~2026.10.29..14.30`; numbers keep Hoon's form.
170- In `{…}`, an atom prints by its aura: `@ud` as `1.000`, `@da` as a UTC date with sub-seconds, `@p` as a ship, and a bare `@` as `@ud`. `@t`, `@ta`, `@tas` and tapes splice as text; any other cell is an error asking for a printer. Printers are picked when compiling, so an atom whose aura its `++` is generic over, as `n` in `|= n=A` when `A` is constrained to atoms, is an error asking for an aura, here and in a `(…)` segment of an application path. For readers, `print-date` prints in the theme's zone, Urbit-style, to the minute, as `~2026.10.29..14.30`; numbers keep Hoon's form.
@@ -191,7 +181,7 @@ Number and cell literals resolve like tags: each waits for its context and takes
191
181
192## Patterns
182## Patterns
193
183
194−Arms are tried in order. Every case needs an arm or a catch-all, `*` or a bare name. An arm that earlier arms cover, such as a second `%add` or anything after `[%move * *]`, is an error, and a case that should fail says `!!`. A name in a pattern always binds anew, so compare values with `?- (eq a b)`. A name is an error where the subject's type at its position is a union, or a one-case mold, and a case that the rest of the pattern can match has there the constant the name spells, so `stop` written for `%stop` below is an error, not a catch-all. Positions typed by an aura, `*`, a type variable, a container's element or a recursive mold are unaffected, so `[t %draft] t` still binds `t`, and `x` is still a catch-all on a `@tas` subject. Patterns take terms, numbers, strings without `{…}`, ships, loobeans and `~`, and cells of patterns, which nest; not `~[…]` lists or `a+b` pairs. A number pattern is a `@ud` too, so `0` can't match a `@p` or a `@dr`: write `~zod`, or compare a duration with `eq`.
184+Arms are tried in order. Every case needs an arm or a catch-all, `*` or a bare name. An arm that earlier arms cover, such as a second `%add` or anything after `[%move * *]`, is an error, and a case that should fail says `!!`. A name in a pattern always binds anew, so compare values with `?- (eq a b)`. Patterns take terms, numbers, strings without `{…}`, ships, loobeans and `~`, not lists or pairs.
195
185
196| Pattern | Matches | Binds |
186| Pattern | Matches | Binds |
197| --- | --- | --- |
187| --- | --- | --- |
@@ -202,15 +192,11 @@ Arms are tried in order. Every case needs an arm or a catch-all, `*` or a bare n
202| `[%move %left n]` | Tagged `%move`, then `%left` | `n` |
192| `[%move %left n]` | Tagged `%move`, then `%left` | `n` |
203| `~` | Null | Nothing |
193| `~` | Null | Nothing |
204| `[~ x]` | A unit holding a value | `x` |
194| `[~ x]` | A unit holding a value | `x` |
205−| `[[~ a] [~ b]]` | A pair of units that both hold a value | `a`, `b` |
206−| `[x ~]` | A list of one item | `x` |
207| `1.000`, `"milk"`, `~zod` | That literal | Nothing |
195| `1.000`, `"milk"`, `~zod` | That literal | Nothing |
208| `[a b]` | Any cell; `b` is the rest | `a`, `b` |
196| `[a b]` | Any cell; `b` is the rest | `a`, `b` |
209| `*` | Anything | Nothing |
197| `*` | Anything | Nothing |
210| `x` | Anything | `x` |
198| `x` | Anything | `x` |
211
199
212−Cells nest, so one arm can look into several values, or a list's first cells. A cell pattern matches from the left, and its last pattern takes the rest: over `[(unit A) (unit A)]`, `[~ b]` means "the first is null", with `b` the second unit, not "a unit holding `b`". Keep every position visible, as `[* ~ b]`.
213−
214Tags can sit anywhere in a case, and a case can carry several:
200Tags can sit anywhere in a case, and a case can carry several:
215
201
216```jibb
202```jibb
@@ -223,11 +209,11 @@ Tags can sit anywhere in a case, and a case can carry several:
223
209
224++ describe |= s=step
210++ describe |= s=step
225 ?- s
211 ?- s
226− [%move %left n] "left {n}"
212+ [%move %left n] "left {n}"
227− [%move %right n] "right {n}"
213+ [%move %right n] "right {n}"
228− [t %draft] t
214+ [t %draft] t
229− [t %sent sent-at] t
215+ [t %sent sent-at] t
230− %stop "stop"
216+ %stop "stop"
231```
217```
232
218
233Leaving out `%stop` is an error naming it; to crash instead, write `%stop !!`.
219Leaving out `%stop` is an error naming it; to crash instead, write `%stop !!`.
@@ -249,21 +235,14 @@ definition = "+$" name [ generic ] ( mold | cases )
249generic = "|$" "[" typevar { typevar } "]" ;
235generic = "|$" "[" typevar { typevar } "]" ;
250cases = INDENT mold { NEWLINE mold } DEDENT ; (* one case is that mold; more make a union *)
236cases = INDENT mold { NEWLINE mold } DEDENT ; (* one case is that mold; more make a union *)
251
237
252−body = INDENT rest DEDENT ;
253−rest = { definition NEWLINE } last ; (* a body's lines, to its DEDENT *)
238+body = INDENT { definition NEWLINE } expr DEDENT ;
254−last = expr
255− | head NEWLINE rest (* the rest is the innermost rune's last child *)
256− | "?-" expr NEWLINE arm { NEWLINE arm } ; (* arms at the ?-'s depth *)
257−head = { "|=" field | "^-" mold } ( "|=" field | "^-" mold | "~&" expr ) ; (* on one line *)
258expr = rune | call ;
239expr = rune | call ;
259call = operand { operand } ;
240call = operand { operand } ;
260operand = literal | qath | ref | change | pair | unit | group | list | tuple
241operand = literal | qath | ref | change | pair | unit | group | list | tuple
261 | gate | ctor | pathlit | "!!" ;
242 | gate | ctor | pathlit | "!!" ;
262ref = wing ;
243ref = wing ;
263wing = name { "." name } ;
244wing = name { "." name } ;
264−change = wing "(" edit { edit } ")" | wing "(" { edit } elines ; (* no space before "(" *)
245+change = wing "(" item { item } ")" | wing "(" { item } open ; (* no space before "("; items named *)
265−edit = wing "=" operand ; (* a name, or a wing through record fields *)
266−elines = INDENT wing "=" expr { NEWLINE wing "=" expr } DEDENT ;
267pair = name "+" operand ; (* [%name operand] *)
246pair = name "+" operand ; (* [%name operand] *)
268unit = "`" operand ; (* [~ operand] *)
247unit = "`" operand ; (* [~ operand] *)
269group = "(" expr ")" | "(" { operand } open ;
248group = "(" expr ")" | "(" { operand } open ;
@@ -295,7 +274,7 @@ pathmold = "/" [ segment { "/" segment } ] ;
295segment = knot | "[" name "=" ( aura | "_" ) "]" ;
274segment = knot | "[" name "=" ( aura | "_" ) "]" ;
296
275
297pattern = term | number | string | ship | loobean | "~" | "*" | name
276pattern = term | number | string | ship | loobean | "~" | "*" | name
298− | "[" pattern { pattern } "]" ; (* a name can't spell a tag the subject has there; see Patterns *)
277+ | "[" pattern { pattern } "]" ;
299
278
300literal = number | string | ship | date | duration | knotlit
279literal = number | string | ship | date | duration | knotlit
301 | term | loobean | "~" ;
280 | term | loobean | "~" ;
@@ -304,7 +283,7 @@ pathlit = "/" knot { "/" knot } ;
304term = "%" name | "%" decimal | "%&" | "%|" | "%$" ;
283term = "%" name | "%" decimal | "%&" | "%|" | "%$" ;
305loobean = "%.y" | "%.n" ;
284loobean = "%.y" | "%.n" ;
306aura = "@" { lower } [ upper ] ;
285aura = "@" { lower } [ upper ] ;
307−typevar = upper { lower | digit } ;
286+typevar = upper ;
308name = lower { lower | digit | "-" } ;
287name = lower { lower | digit | "-" } ;
309knot = { lower | digit | "-" | "." | "~" | "_" } ;
288knot = { lower | digit | "-" | "." | "~" | "_" } ;
310```
289```
@@ -314,16 +293,17 @@ knot = { lower | digit | "-" | "." | "~" | "_" } ;
314```jibb
293```jibb
315:: /ui/stores/cart.jibb
294:: /ui/stores/cart.jibb
316+$ state [items=(list @t) open=?]
295+$ state [items=(list @t) open=?]
317−+$ poke
296++$ cart-action
318 [%add item=@t]
297 [%add item=@t]
319 %toggle
298 %toggle
299++$ poke cart-action
320
300
321++ main (store init update)
301++ main (store init update)
322−++ init ^- state [items=~ open=%.n]
302+++ init ^- state [~ %.n]
323−++ update |= [a=poke s=state]
303+++ update |= [a=cart-action s=state]
324 ?- a
304 ?- a
325− [%add item] s(items=[item items.s])
305+ [%add item] s(items=[item items.s])
326− %toggle s(open=(not open.s))
306+ %toggle s(open=(not open.s))
327```
307```
328
308
329```jibb
309```jibb
@@ -341,15 +321,15 @@ knot = { lower | digit | "-" | "." | "~" | "_" } ;
341 [%acked err=(unit @t)]
321 [%acked err=(unit @t)]
342
322
343++ init |= ~
323++ init |= ~
344− [cart=[items=~ open=%.n] note=""]
324+ [[~ %.n] ""]
345
325
346++ update |= [=msg m=model]
326++ update |= [=msg m=model]
347 ?- msg
327 ?- msg
348− [%noted t] [m(note=t) ~]
328+ [%noted t] [m(note=t) ~]
349− %add [m(note="") ~[(poke.cart [%add note.m] |=%acked)]]
329+ %add [m(note="") ~[[%poke (cart-action.cart [%add note.m]) |=%acked]]]
350− %toggle [m ~[(poke.cart %toggle |=%acked)]]
330+ %toggle [m ~[[%poke (cart-action.cart %toggle) |=%acked]]]
351− [%got c] [m(cart=c) ~]
331+ [%got c] [m(cart=c) ~]
352− [%acked err] [m ~]
332+ [%acked err] [m ~]
353
333
354++ subs |= m=model
334++ subs |= m=model
355 ~[[%watch (state.cart |=%got)]]
335 ~[[%watch (state.cart |=%got)]]
docs/spec/implementation-plan.md+1−1
@@ -73,7 +73,7 @@ For milestone 6. An island is one loop over one model: events become messages, `
73- **Messages** come from controls, command replies, facts, timers and `%url`. *Proposed*: an island handles them one at a time, in arrival order.
73- **Messages** come from controls, command replies, facts, timers and `%url`. *Proposed*: an island handles them one at a time, in arrival order.
74- **Rendering**: a message changes the model when `update` returns a different noun; `view` then re-runs and a keyed diff patches the DOM. An unchanged model renders nothing. *Proposed*: the patch lands before the next message, so a crash in `view` belongs to one message.
74- **Rendering**: a message changes the model when `update` returns a different noun; `view` then re-runs and a keyed diff patches the DOM. An unchanged model renders nothing. *Proposed*: the patch lands before the next message, so a crash in `view` belongs to one message.
75- **Controls**: after every event, the control that fired is reset to the latest view, even when the model didn't change. A field's text is rewritten only when it differs from the screen, which keeps the caret and any IME composition.
75- **Controls**: after every event, the control that fired is reset to the latest view, even when the model didn't change. A field's text is rewritten only when it differs from the screen, which keeps the caret and any IME composition.
76−- **Commands**: an update may return several commands. The runtime processes them one at a time, in list order, after the patch. Each reply arrives later as a new message, never inside the `update` that sent it.
76+- **Commands**: each reply arrives later as a new message, never inside the `update` that sent it. *Proposed*: commands run in list order, after the patch.
77
77
78| Control | Sends | When |
78| Control | Sends | When |
79| --- | --- | --- |
79| --- | --- | --- |
docs/spec/overview.md+14−16
@@ -141,7 +141,7 @@ Loads and renders run in Nock.
141
141
142```jibb
142```jibb
143+$ cmd |$ [M]
143+$ cmd |$ [M]
144− [%poke p=raw-poke reply=$-((unit @t) M)]
144+ [%poke p=poke reply=$-((unit @t) M)]
145 [%go url=@t]
145 [%go url=@t]
146 [%wait gap=@dr msg=M]
146 [%wait gap=@dr msg=M]
147 [%now reply=$-(@da M)]
147 [%now reply=$-(@da M)]
@@ -152,9 +152,7 @@ Loads and renders run in Nock.
152 [%url reply=$-(path M)]
152 [%url reply=$-(path M)]
153```
153```
154
154
155−An island's `update` returns `[model (list (cmd M))]`, so one message may produce several commands. The runtime processes the returned commands one at a time, in list order. A store's `update` consumes exactly one poke with the current state and returns the next state.
156−
157−- `raw-poke`, `ask` and `qath` are transparent types defined in the internal prelude and re-exported normally. Derived gates and `pure` also construct requests. A derived poke helper such as `(poke.todo [%add draft.m] |=%acked)` checks its value and supplies the agent and mark, returning a command whose reply becomes an island message, so one island can poke several agents. The agent's mark rechecks on the ship; a nack's `tang` reaches the reply as text. Store helpers poke the store in the browser.
155+- `poke`, `ask` and `qath` are transparent types defined in the internal prelude and re-exported normally. Derived gates and `pure` also construct requests. A derived poke constructor such as `(todo-action.todo [%add draft.m])` checks its value and supplies the agent and mark, so one island can poke several agents. The agent's mark rechecks on the ship; a nack's `tang` reaches the reply as text. Store constructors poke the store in the browser.
158- A request such as `(todos.todo |=%got)` comes from a declared path or a store's `state`; its reply always gets full state. A path with diffs also takes a fold, `(changes.todo |=%got apply)`, which the runtime applies first. Facts are checked; a bad one crashes the reply, which counts as a crashed `update`.
156- A request such as `(todos.todo |=%got)` comes from a declared path or a store's `state`; its reply always gets full state. A path with diffs also takes a fold, `(changes.todo |=%got apply)`, which the runtime applies first. Facts are checked; a bad one crashes the reply, which counts as a crashed `update`.
159- Islands read agents only by watching. A watch's first fact must be full state, so watching a request whose path case has a separate `scry=` path is a type error in an island. The checker must prove a request is watchable; unknown watchability is also a type error. The runtime acks facts, rewatches after a kick or a dropped connection and reseeds from the first fact; a refused watch shows the crash notice.
157- Islands read agents only by watching. A watch's first fact must be full state, so watching a request whose path case has a separate `scry=` path is a type error in an island. The checker must prove a request is watchable; unknown watchability is also a type error. The runtime acks facts, rewatches after a kick or a dropped connection and reseeds from the first fact; a refused watch shows the crash notice.
160- Watches match by agent and path, timers by gap, and the newest reply is always used. After each `update`, `subs` is diffed to start and stop watches and timers. `%now` and `%every` give the time, `%who` the owner's `@p` from `/~/name`; `%wait` is a one-shot delay.
158- Watches match by agent and path, timers by gap, and the newest reply is always used. After each `update`, `subs` is diffed to start and stop watches and timers. `%now` and `%every` give the time, `%who` the owner's `@p` from `/~/name`; `%wait` is a one-shot delay.
@@ -165,7 +163,7 @@ Inputs send a message per `input` event, and one per IME composition, so validat
165
163
166- `init` runs on the ship with the page's data and returns only the model, jammed into the page; the browser resumes from it at start. A reload starts from the model the page is served with.
164- `init` runs on the ship with the page's data and returns only the model, jammed into the page; the browser resumes from it at start. A reload starts from the model the page is served with.
167- A crash in `update` drops the message, keeps the model and shows the standard notice.
165- A crash in `update` drops the message, keeps the model and shows the standard notice.
168−- Stores share state between a page's islands. A store module, written like an API file, has `state`, `+$ poke` and `++ main (store init update)`, where `update` applies a poke. The store's local `+$ poke` is an ordinary action mold; the runtime envelope is `raw-poke`. The builder is `+$ store |$ [S] [init=S update=*]` with `++ store |= [init=S update=$-([A S] S)] ^- (store S) [init update]`: it checks action `A`, while `main` exposes only state `S`; the store kind check verifies `A` against the declaration. Islands import it with `/=` and use its derived gates: the generic `poke` command helper, and `(state.cart |=%got)`, whose first fact is the current state and each later fact the next.
166+- Stores share state between a page's islands. A store module, written like an API file, has `state`, `+$ poke` and `++ main (store init update)`, where `update` applies a poke. The store's `+$ poke` is a declaration, not a mold. Islands import it with `/=` and use its derived gates: a constructor per poke type, and `(state.cart |=%got)`, whose first fact is the current state and each later fact the next.
169- A store runs in the browser from its `init` when its first island starts, and lasts as long as the page. Islands keep what they watch in their own models.
167- A store runs in the browser from its `init` when its first island starts, and lasts as long as the page. Islands keep what they watch in their own models.
170- An app is a page whose view is one island under a catch-all route; its `load` passes the path with `pure`. The island's `%url` subscription delivers the path at start and after every change, back and forward included. `go` pushes history, and `go` or `link` within the section changes the island without a reload. Focus then moves to the new view's first heading, which screen readers announce.
168- An app is a page whose view is one island under a catch-all route; its `load` passes the path with `pure`. The island's `%url` subscription delivers the path at start and after every change, back and forward included. `go` pushes history, and `go` or `link` within the section changes the island without a reload. Focus then moves to the new view's first heading, which screen readers announce.
171
169
@@ -218,7 +216,7 @@ The theme, `++ theme` in `/ui/theme.jibb`, uses the prelude's `theme` mold, with
218 lang="en"
216 lang="en"
219 zone="UTC"
217 zone="UTC"
220 font=`%/static/fonts/inter.woff2
218 font=`%/static/fonts/inter.woff2
221− dark=`[tones=[normal="#eee" background="#111" accent="#4c9" danger="#f28b82" muted="#aaa"]]
219+ dark=[tones=[normal="#eee" background="#111" accent="#4c9" danger="#f28b82" muted="#aaa"]]
222```
220```
223
221
224Style attributes compile to atomic classes in one stylesheet built from the theme, so islands can't compute a missing class. `[%chars n]` and `[%fill n]` become inline styles.
222Style attributes compile to atomic classes in one stylesheet built from the theme, so islands can't compute a missing class. `[%chars n]` and `[%fill n]` become inline styles.
@@ -282,7 +280,7 @@ The host is one Gall agent on the `%jibb` desk, serving every Jibb desk, so app
282
280
283### Agent APIs
281### Agent APIs
284
282
285−Each agent Jibb talks to has `/ui/api/<agent>.jibb`, declaring its pokes in `+$ poke` and its paths in `+$ paths`, over types from the agent's own marks through `/%`. Importing it gives derived gates: a generic `poke` command helper, which checks the action and reply and pokes with the action's mark, and a request per path, which checks what comes back. Clashing derived names are errors.
283+Each agent Jibb talks to has `/ui/api/<agent>.jibb`, declaring its pokes in `+$ poke` and its paths in `+$ paths`, over types from the agent's own marks through `/%`. Importing it gives derived gates: a constructor per poke type, which pokes with that type's mark, and a request per path, which checks what comes back. Clashing derived names are errors.
286
284
287```jibb
285```jibb
288:: /ui/api/todo.jibb
286:: /ui/api/todo.jibb
@@ -465,18 +463,18 @@ A `page`: each request scries `%blog` and renders in Nock.
465 [%acked err=(unit @t)]
463 [%acked err=(unit @t)]
466
464
467++ init |= ts=(list item.todo)
465++ init |= ts=(list item.todo)
468− [todos=ts draft="" error=~]
466+ [ts "" ~]
469
467
470++ update |= [=msg m=model]
468++ update |= [=msg m=model]
471 ?- msg
469 ?- msg
472− [%typed t]
470+ [%typed t]
473− ?- (gth (lent (tuba (trip t))) 80)
471+ ?- (gth (lent (tuba (trip t))) 80)
474− %.y [m(draft=t error=`"Too long") ~]
472+ %.y [m(draft=t error=`"Too long") ~]
475− %.n [m(draft=t error=~) ~]
473+ %.n [m(draft=t error=~) ~]
476− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
474+ %submit [m(draft="") ~[[%poke (todo-action.todo [%add draft.m]) |=%acked]]]
477− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
475+ [%toggled id] [m ~[[%poke (todo-action.todo [%toggle id]) |=%acked]]]
478− [%got ts] [m(todos=ts) ~]
476+ [%got ts] [m(todos=ts) ~]
479− [%acked err] [m(error=err) ~]
477+ [%acked err] [m(error=err) ~]
480
478
481++ subs |= m=model
479++ subs |= m=model
482 ~[[%watch (todos.todo |=%got)]]
480 ~[[%watch (todos.todo |=%got)]]
docs/status.md+164−252
@@ -1,13 +1,11 @@
1# Status
1# Status
2
2
3−As of 2026-11-03. This file lists what Jibb does now, whether each part is done, partial or missing, and the test or check that proves it, then the known gaps. History is in git (`git log --oneline`). The plan is [spec/implementation-plan.md](spec/implementation-plan.md), and each milestone ends with its checks passing on a fake ship.
3+As of 2026-10-31. The plan is [spec/implementation-plan.md](spec/implementation-plan.md); each milestone ends with its checks passing on a fake ship.
4−
5−## Milestones
6
4
7| # | Milestone | Status |
5| # | Milestone | Status |
8| --- | --- | --- |
6| --- | --- | --- |
9| 1 | Parser and mark | Done (7c739b7; the doc's grammar decisions of 2026-10-30 in ab797a9) |
7| 1 | Parser and mark | Done (7c739b7; the doc's grammar decisions of 2026-10-30 in ab797a9) |
10−| 2 | Types and prelude | In progress: the checker and the Hoon importer are partial. [prompts/milestone-2.md](prompts/milestone-2.md) briefs it. The [milestone 2 review](reviews/2026-11-03-milestone-2-review.md) of 2026-11-03 lists what the done-criteria still need, briefed in [prompts/milestone-2-finish.md](prompts/milestone-2-finish.md) |
8+| 2 | Types and prelude | In progress. [prompts/milestone-2.md](prompts/milestone-2.md) briefs the developer; the checker and importer are partial |
11| 3 | Core language | Not started |
9| 3 | Core language | Not started |
12| 4 | Host and static pages: the first release | Not started |
10| 4 | Host and static pages: the first release | Not started |
13| 5 | Published pages | Not started |
11| 5 | Published pages | Not started |
@@ -15,278 +13,192 @@ As of 2026-11-03. This file lists what Jibb does now, whether each part is done,
15| 7 | Tooling | Not started |
13| 7 | Tooling | Not started |
16| 8 | Polish | Not started |
14| 8 | Polish | Not started |
17
15
18−The plan sets no dates ("agree them after milestone 1, once it shows how fast the Hoon work goes"), and none have been agreed yet. Milestone 1's commits ran from 2026-10-29 18:13 to 2026-10-30 11:50 UTC.
16+The plan sets no dates: "agree them after milestone 1, once it shows how fast the Hoon work goes". They haven't been agreed yet. Milestone 1's commits run from 2026-10-29 18:13 UTC to 2026-10-30 11:50 UTC.
19−
20−Decisions the Claude doc does not have yet, such as dropping `$?` ([prompts/drop-union-rune.md](prompts/drop-union-rune.md)), explicit `proj`, the `like` gate and backtick units, are rows of [spec/decisions.md](spec/decisions.md) whose Synced column says No (rows of 2026-10-30 say Check: nobody has compared them yet). The parser already follows the `$?` decision. Until the doc is synced, the repository copy wins.
21−
22−## Reading the tables
23
17
24−- Done: works as the row says, and the linked test or check proves it. Partial: works for the shapes named, and the words after the colon say what is left out or unproved. Missing: not implemented, or rejected on purpose; the link shows the current failure where a test pins it.
18+On 2026-10-30, @iko decided that Jibb drops `$?`, so a `+$` takes a union's cases on the lines below its name. [prompts/drop-union-rune.md](prompts/drop-union-rune.md) records the change before milestone 2. The repository spec records the decision; the Claude document still needs to be synchronized.
25−- Suite names link to `tests/lib/<suite>.hoon`, and case names to `tests/golden/<case>/`; a name with `*` stands for every case it matches. Every suite runs under `urbit eval` and on the fake ship.
26−- The checker has two entry points, and they can disagree. The full-module check, in its detailed and legacy forms, decides whether a module checks, and "checks" in this file means it. The partial inference report, which all 304 golden `types.txt` files print, starts "partial inference; module not checked" and declines more. For example, its report on the cart store leaves the store's kind and scope unresolved ([doc-grammar-06-cart-store](../tests/golden/doc-grammar-06-cart-store/)) and its report on the Grammar's buttons example says only "tag needs context" ([doc-grammar-02-buttons](../tests/golden/doc-grammar-02-buttons/)), while the full check passes the cart store ([jibb-store](../tests/lib/jibb-store.hoon)) and reports the buttons error exactly ([jibb-buttons](../tests/lib/jibb-buttons.hoon)).
27
19
28−## Parser and mark
20+## Milestone 2: in progress
29
21
30−These rows cover milestone 1. The plan's three done-when criteria are the rows on the doc examples, the lexical rules and `|commit`.
22+The parser accepts `_` in mold positions and typed path segments, retaining each hole’s span. The partial checker tracks ordinary annotation holes through inference and requires each value or local definition to resolve its own holes before generalization. A hole can resolve to a concrete type or an explicitly written in-scope type variable; later uses cannot fix an unresolved definition. Independent decimal holes can default, but captured variables are not defaulted prematurely. Structural named molds with an unresolved hole report its site. Complex mold forms, inferred path segments, mutual recursive groups and other unsupported constraints still fail closed, and the fragment does not claim the module is checked. A syntax-tree pass rejects duplicate field names within each written record and reports both sites. The repository spec now records that `ask` and `qath` are transparent; complete request checking remains outstanding.
31−
32−| Area | Status | Proved by |
33−| --- | --- | --- |
34−| The `%jibb` mark: grab `mime`, `noun` and `txt`, grow `mime`, `txt` and `noun`, grad `%txt` | Done | [jibb-dev/mar/jibb.hoon](../jibb-dev/mar/jibb.hoon), `tools/ship check-commit` |
35−| `\|commit` stores `.jibb` files on a fake ship: 7 checks, from reading every `/ui` file back byte for byte to three-way merges and conflicts | Done | `tools/ship check-commit` |
36−| Layout pass: `+layout` (library section 2) emits INDENT, DEDENT and NEWLINE | Done | `lex-layout-*`, `lex-indent-*`, `lex-rune-layout-*` |
37−| Lexical rules: for each rule, inputs that break it, with the error's expected place, and inputs that keep it | Done: 148 `-bad-` and 57 `-ok-` cases; the left-out closers, blob and `@c` literals have only `-bad-` cases, and so does `lex-char` | `lex-*` |
38−| Parser: `+parse` and `+parse-tokens` (library section 3) turn the Grammar tab's EBNF into a syntax tree | Done | every golden `tree.txt` |
39−| The rest of a body (syntax review S2): a body's final line hands the lines after it at its depth to a tall `\|=`, `^-` or `~&` that ends it, and a `?-` that begins it may take its arms at its depth; arm, bracket, top-level and definition lines keep deeper bodies | Done: a body of 40,000 same-depth rest lines runs out of memory under eval, where 20,000 parse | `lex-body-rest-*`, [lex-rune-layout-ok-3](../tests/golden/lex-rune-layout-ok-3/) |
40−| Type variables longer than one letter (S7): a capital, then lowercase letters and digits; `AB`, `MSG` and `Msg_x` are errors | Done | `lex-typevar-*` |
41−| Unions without `$?`: a `+$` takes its cases on the lines below, and `$?` is an error | Done | [inline-union-wide](../tests/golden/inline-union-wide/), [inline-union-one-case](../tests/golden/inline-union-one-case/), `inline-hoon-union-*` |
42−| Spans: every node keeps its start and end, and `+golden` appends `SPAN ERROR` when `+check-spans` fails | Done | [jibb-check-spans](../tests/lib/jibb-check-spans.hoon), `tools/golden` |
43−| Parse errors: file, line, column, message, excerpt and caret (`+show-error`), at the first character where the text stops being the start of any valid module (library section 2.0) | Done: each failing case's `about.txt` states the position, except the unclear case below | `lex-*-bad-*`, `inline-*-bad` |
44−| Underlining with span ends | Partial: parse errors give a start only, and type errors name both sites with excerpts but mark each with one caret at its start | [jibb-check-spans](../tests/lib/jibb-check-spans.hoon), [types-multi-call](../tests/golden/types-multi-call/) |
45−| Type holes: `_` in mold positions and typed path segments (`[id=_]`), each with its own span; `_` stays a literal knot in `/_` and `%/_` | Done: holes in parameters, patterns and values are rejected | `parser-hole-*`, `types-hole-*` |
46−| Doc examples: the 14 `jibb` blocks in [spec/](spec/) (6 in grammar.md, 7 in overview.md, 1 in core-language.md) are golden cases, and all parse | Done | `doc-*`, `tools/doc-blocks docs/spec` |
47−| Golden corpus: 691 cases, 462 that parse and 229 that fail, each failure pinned to a line and column | Partial: eight `types-*` cases have no `expect:` line in their `about.txt`, which [development.md](development.md#golden-cases) asks for | `tools/golden` |
48−| The expected result of [inline-leftout-signed-float-auras](../tests/golden/inline-leftout-signed-float-auras/) | Partial: its `about.txt` says "expect: unclear" (grammar question 13); the outputs pin the layout pass's error at 1:7 | [inline-leftout-signed-float-auras](../tests/golden/inline-leftout-signed-float-auras/) |
49−| The 13 grammar questions never put to the doc's author | Partial: the parser follows provisional readings, listed in [open-questions.md](open-questions.md#grammar-questions-never-put-to-the-docs-author) | [inline-import-root-bad](../tests/golden/inline-import-root-bad/), [lex-indent-bad-3](../tests/golden/lex-indent-bad-3/) and others |
50−| Forms the parser leaves to the checker: `!! a`, the module kinds and an empty change `m()` | Partial: the partial checker reports an empty change ("a change takes at least one field") | [inline-crash-call](../tests/golden/inline-crash-call/), [inline-kinds](../tests/golden/inline-kinds/), [types-record-change](../tests/golden/types-record-change/) |
51−| `[]` as an error and `[a]` as `a`, as [spec/decisions.md](spec/decisions.md) decides (Cells) | Partial: the checker types `[a]` as `a`, but `[]` parses and the checker calls it unsupported, not an error; no case writes `[]` | [lex-tight-opener-bad-1](../tests/golden/lex-tight-opener-bad-1/) |
52−| Long and deeply nested input | Partial: library section 3 records 100,000 nested brackets and a 20,000-line module parsing, but no case, suite or check exercises them | none |
53
23
54−Two independent audits came before 7c739b7: one compared the library with a reference parser written in Python from the doc, over about 19,000 generated programs. Before ab797a9, a second Python parser, written from the decisions, agreed with the library on 8,000 generated programs and 900 hand-written probes. Neither audit's code nor its results are in the repository.
24+On 2026-10-31, @iko chose explicit, result-directed `(proj record)` to construct a record with exactly the expected fields, and reserved `proj` against definitions and imports. The partial checker handles selected explicit calls with known, closed record types, records field-selection evidence for later lowering, and reserves the name across source bindings. Reordered fields, some nested contexts and several open or recursive cases remain unsupported; lowering and execution are not implemented yet. The field-order question remains open.
55
25
56−## Types and prelude: full-module checks
26+The internal prelude also defines `qath` as a transparent recursive knot sequence, re-exported by the public prelude. The partial checker recognizes its source identity, supports selected null/cell construction and matching, and types static application-path literals. Other recursive shapes, broader patterns and dynamic application-path segments remain unsupported. A 256-step limit applies per inference attempt, not to parsing or retries; checking routes and static files remains milestone 4.
57
27
58−| Area | Status | Proved by |
28+The internal prelude defines a transparent generic `ask` with pure, agent and store cases, re-exported alongside the Jibb-written `pure` gate. The partial checker infers supported constructors and exhaustive matches. Agent and store receivers operate on raw nouns; their fields do not prove schema validity or watchability. The public prelude now defines the documented source-backed `sub` union; supported `%watch` payloads retain the public `(ask M)` type. Constructing a `sub` does not prove that its request is watchable. Request lowering, checked decoding, runtime validation and island watch checking remain unimplemented.
59−| --- | --- | --- |
60−| Program `main`: a direct four-wing `(program init update view subs)`, closed and matching the canonical `program` mold invariantly | Done: generic mains, open messages, mismatched models, arbitrary mains, store paths and an aliased `program` are rejected | [jibb-program-main](../tests/lib/jibb-program-main.hoon), [type-program-main/source.txt](../tests/type-program-main/source.txt) |
61−| Initializer data and model: closed and gate-free, with `%yes` verdicts inside one shared 256-node budget | Done: a gate in the model or the data is rejected; no test exhausts the shared budget | [jibb-program-main](../tests/lib/jibb-program-main.hoon), [jibb-gate-free-guards](../tests/lib/jibb-gate-free-guards.hoon) |
62−| Initializer recovery: with update, view and subs resolved, a direct initializer is inferred against the model, then `main` is inferred again | Done: also when update's sample is a faced mold, a pun, a named mold or generic in the model, and with generic view and subs samples; the recovered model must be closed and tag-free | [jibb-program-init](../tests/lib/jibb-program-init.hoon), [type-program-main/initializer-unfaced.txt](../tests/type-program-main/initializer-unfaced.txt) |
63−| Recovery boundaries: non-main sources, init and subs unresolved together, unrelated pending tags, a `program` alias, a main that is not a program | Partial: all rejected in detailed and legacy checks; no fixture tries an aliased initializer (`++ init other`) | [jibb-program-init](../tests/lib/jibb-program-init.hoon), [jibb-program-main](../tests/lib/jibb-program-main.hoon) |
64−| Update recovery: an unannotated two-slot update takes its result type from the program, through a union and a loobean branch | Done: a wrong result, model or message, a malformed or three-slot sample, a non-main source, an unrelated tag, a missing `cmd` or `list`, and API and store paths are rejected | [jibb-program-update](../tests/lib/jibb-program-update.hoon) |
65−| Program `subs`: null, or one unfaced `[%watch (case.face \|=%callback)]` whose request has the exact derived scheme and matches the API's path, case names and source, with no scry, diffs or parameters | Done | [jibb-program-watch](../tests/lib/jibb-program-watch.hoon), [jibb-program-main](../tests/lib/jibb-program-main.hoon) |
66−| Other watches: pure or hand-built requests, helpers, aliases, typed paths, diff folds, several watches, unknown or ambiguous evidence | Missing: all rejected, but only unknown or ambiguous evidence by decision (settled question 33 in [spec/decisions.md](spec/decisions.md)); re-exports have no test | [jibb-program-watch](../tests/lib/jibb-program-watch.hoon) |
67−| Program interfaces keep their source evidence and work in downstream imports | Done | [jibb-program-main](../tests/lib/jibb-program-main.hoon), [jibb-program-watch](../tests/lib/jibb-program-watch.hoon), [jibb-todo-full](../tests/lib/jibb-todo-full.hoon) |
68−| The unchanged todo island: exact closed `main`, a cast-initializer variant and a structural downstream import | Done: wrong model, message, result, mapper, key, alias, watch and non-gate view are rejected | [jibb-todo-full](../tests/lib/jibb-todo-full.hoon), [type-todo-full/cast-init.txt](../tests/type-todo-full/cast-init.txt) |
69−| Component-local recovery of update, subs, one keyed `each`/`turn` mapper and view, before init and `main` | Partial: fresh allocation and the `element` and singleton-list guards are not asserted separately | [jibb-todo-full](../tests/lib/jibb-todo-full.hoon) |
70−| The partial report on the todo island, with its real API and readers | Done: missing or duplicate marks and a missing `/sur` are rejected; the report still declines `main`, init, update, subs, view and row-of | [jibb-todo-partial](../tests/lib/jibb-todo-partial.hoon), [type-todo-partial/expected.txt](../tests/type-todo-partial/expected.txt) |
71−| Pages: the unchanged about page, blog index and index page, with exact `main` types and downstream imports; the about page is `(element !!)` | Done | [jibb-page-main](../tests/lib/jibb-page-main.hoon) |
72−| Page loads, through the same derived-request identity check as program watches | Done: builder aliases, indirect, pure, hand-built and unknown requests, typed paths, diffs and store paths are rejected; no test puts a request alias in a load | [jibb-page-main](../tests/lib/jibb-page-main.hoon) |
73−| Stores: the unchanged cart store and basket, as direct two-wing mains with exact schemes and structural imports | Done: wrong init, action or result, name collisions, aliases and forged evidence are rejected; state holding gates is accepted | [jibb-store](../tests/lib/jibb-store.hoon) |
74−| Store exports: state and action molds, a derived generic `poke` command helper returning `(cmd M)`, and state requests | Done: a noncanonical `cmd`, `unit` or `raw-poke` is rejected | [jibb-store](../tests/lib/jibb-store.hoon) |
75−| Store watchability: source-bound store evidence, merged into the basket's graph | Partial: indirect state requests and a store state used as a page load are rejected | [jibb-store](../tests/lib/jibb-store.hoon), [jibb-api-evidence](../tests/lib/jibb-api-evidence.hoon) |
76−| Store scope: a definite duplicate `+$ poke` or unrelated prelude shadowing | Partial: reported as a conflict; a possible root API's `poke` is left unchecked, and no test asserts the "module kind or scope" message | [jibb-store](../tests/lib/jibb-store.hoon), [types-scope-store-duplicate](../tests/golden/types-scope-store-duplicate/), [types-scope-store-shadow](../tests/golden/types-scope-store-shadow/), [types-scope-root-api](../tests/golden/types-scope-root-api/) |
77−| Theme: the real `my-app/ui/theme.jibb`, with backtick units, against the prelude's `theme` | Done: absent dark tones check; a wrong nested aura, a missing field and a wrong font or dark type are rejected | [jibb-theme](../tests/lib/jibb-theme.hoon), [doc-overview-02-theme](../tests/golden/doc-overview-02-theme/) |
78−| Buttons: `labelled` and `wide` with exact generic schemes, and the unchanged module's "nothing fixes the union of %add" at 3:16 with its excerpt | Done: the retry that finds the tag runs only on an incomplete module, and its fuel of 64 counts every definition visited | [jibb-buttons](../tests/lib/jibb-buttons.hoon), [type-buttons/error.txt](../tests/type-buttons/error.txt) |
79−| Doc fragments: the import-only module (real `/sur`, mark and Jibb module), `view-day`, `step` (`describe: $-(step @t)`) and the `cmd`/`sub` block at the prelude path | Done: missing `/sur`, mark or module inputs are rejected | [jibb-doc-examples](../tests/lib/jibb-doc-examples.hoon) |
80−| Generic-alias unions: a bounded local source proof of cases with different literal heads, then the ordinary mold checks | Done: the full check accepts the module, though its partial report says "mold not checked" | [jibb-union-source](../tests/lib/jibb-union-source.hoon), [type-union-source/good.txt](../tests/type-union-source/good.txt) |
81−| Generic-alias unions through nested or qualified aliases, structured or pending states, recursive-index states or the deferred transaction | Missing: declined | [jibb-union-source](../tests/lib/jibb-union-source.hoon) |
82−| Generic-alias overlaps: a bounded witness reports proven collisions with both case sites, and the module stays rejected | Done: unknown or opaque payload intersections, wrong arity, duplicate and qualified owners and short fuel decline | [jibb-union-alias-overlap](../tests/lib/jibb-union-alias-overlap.hoon), [jibb-full-overlap-basic](../tests/lib/jibb-full-overlap-basic.hoon), [jibb-full-overlap-graph](../tests/lib/jibb-full-overlap-graph.hoon) |
83−| Full-module overlap evidence: the first failing mold's source-bound evidence, through imports, with both excerpts in the legacy text | Partial: not on the specialized API and prelude paths | [jibb-full-overlap-basic](../tests/lib/jibb-full-overlap-basic.hoon), [jibb-full-overlap-graph](../tests/lib/jibb-full-overlap-graph.hoon) |
84−| Complete private module checking, other API shapes, root API and kind checking, complete `ask` and `pure` checking | Missing | none |
85−
86−## Types and prelude: requests and API analysis
87−
88−| Area | Status | Proved by |
89−| --- | --- | --- |
90−| API paths: supported path declarations and their full and diff mark types, including the todo paths | Done: unknown scry parameters, bad marks, a wrong path, a missing prelude, private imports and cycles fail closed; it creates no requests | [jibb-api-paths](../tests/lib/jibb-api-paths.hoon), [type-api-paths/expected.txt](../tests/type-api-paths/expected.txt) |
91−| Path evidence: source, prepared prelude, reader graphs and dependencies; a unique declaration is watchable, not watchable (scry) or unknown | Partial: declaration evidence only, not proof about a request value | [jibb-api-evidence](../tests/lib/jibb-api-evidence.hoon) |
92−| Request parts: ordered typed parameters, a full-state reply sample and a one-diff fold | Done: several diffs, a missing or duplicate case, missing evidence and unknown auras fail closed | [jibb-api-evidence](../tests/lib/jibb-api-evidence.hoon) |
93−| Supporting definitions: ordinary API molds and values, and every declared mark with its source and mark-graph evidence | Partial: unused `/-` cores are not validated, dependence on derived gates is unsupported (noted only in code), and the whole API is neither checked nor exported | [jibb-api-evidence](../tests/lib/jibb-api-evidence.hoon) |
94−| Request gates through ordinary imports: several API paths, one typed segment before the reply or one diff fold after it; the todo's plain, typed and diff requests, including a named closed fold | Done | [jibb-todo-api](../tests/lib/jibb-todo-api.hoon), [jibb-request-guards](../tests/lib/jibb-request-guards.hoon), [types-request-normal](../tests/golden/types-request-normal/) |
95−| Request gates for Jibb module imports in an API, scry paths, two or more parameters or diffs, a parameter with a fold | Missing: only two parameters and two diffs are tested; the rest is rejected in code (`api-request-gates`, `multi-request-interface-graph`) | [module-import-api-request-reason](../tests/golden/module-import-api-request-reason/), [type-todo-api/unsupported.txt](../tests/type-todo-api/unsupported.txt) |
96−| Request evidence through diamond and transitive imports and cached interfaces | Done: changed sources, stale caches and duplicates fail closed or rebuild | [jibb-request-guards](../tests/lib/jibb-request-guards.hoon) |
97−| API exports: the real todo API's checked definitions, mark molds and derived poke and request members, with a request certificate | Partial: unselected `/sur` bindings are not validated | [jibb-todo-api](../tests/lib/jibb-todo-api.hoon), [jibb-poke-bridge](../tests/lib/jibb-poke-bridge.hoon) |
98−| API poke export: one mark and a matching direct `+$ poke` give a `(cmd ...)` constructor with agent and mark metadata | Partial: one mark only; wrong payloads, marks and cases are rejected | [jibb-poke-bridge](../tests/lib/jibb-poke-bridge.hoon), `module-import-api-poke-*` |
99−| The todo's `subs` with an explicit type: `~[[%watch (todos.api \|=%got)]]` infers `(list (sub msg))` | Done | [jibb-todo-api](../tests/lib/jibb-todo-api.hoon), [jibb-todo-full](../tests/lib/jibb-todo-full.hoon) |
100−| A todo request under explicit `(ask msg)` context infers `\|=%got` and reports an absent tag | Partial: without context, the full check accepts it in the todo's `main`, but the partial report does not | [jibb-program-watch](../tests/lib/jibb-program-watch.hoon), [jibb-todo-full](../tests/lib/jibb-todo-full.hoon), [type-todo-partial/expected.txt](../tests/type-todo-partial/expected.txt) |
101−| Gate-free analysis of one named mold: gate-free, a gate with its field path, or unknown | Partial: capped at 256 nodes; API, store and private roots are rejected, and it checks no module or island and proves no watchability | [jibb-gate-free-source](../tests/lib/jibb-gate-free-source.hoon), [jibb-gate-free-guards](../tests/lib/jibb-gate-free-guards.hoon) |
102−| Request lowering, checked decoding, runtime validation, general island watch checking | Missing: only the direct program watch and page loads are proved | none |
103−| `ask` receivers for agents and stores | Missing: they take raw nouns (`state=(unit *)`, `fact=*`), so they prove no schema validity or watchability | [internal.jibb](../jibb-dev/lib/jibb/internal.jibb) |
104
29
105−## Types and prelude: checker
30+Known same-origin generic-union result context can now constrain a call before its arguments are inferred. An unresolved or opaque constructor target stays unsupported rather than producing a definite mismatch; proven missing tags still report errors. A todo request with explicit `(ask msg)` context can infer `|=%got`; its uncontextualized form remains unsupported. A two-item literal-headed tuple can receive payload context from a known union of uniquely headed literal cells when its payload is a shallow wing-headed call with literal, wing or constructor arguments. Existing inference takes precedence when it fits; otherwise the checker tries the contextual path once. It conservatively declines that path when any substitution has a structural root, as well as for duplicate or opaque competitors. The guard scans substitutions per eligible tuple and may add one shallow inference; no global linear-time bound is claimed. This allows an explicitly typed todo subscription body to infer, but does not check the island or prove request watchability.
106
31
107−### Atoms, literals, holes and capitals
32+A separate source-backed analysis can prove one named mold gate-free, report a definite gate with a field path, or return unknown. It retains the prepared prelude, source bundle, reader results and resolved imports; the actual todo model proves gate-free, while a callback field reports its path and `*` remains unknown. Its classifier is capped at 256 nodes, not the surrounding parse and import work. API, store and private roots are unsupported, and the artifact does not check a module or island, infer generalized constraints, or prove watchability.
108
33
109−| Area | Status | Proved by |
34+The partial checker can also match a directly named, checked root gate against a generic gate sample in a direct, unshadowed source-backed prelude call. It uses the written two-slot sample layouts to preserve nested record faces, then requires the complete call samples to be closed and tag-free and repeats the fit under the final substitution. The proof falls back to existing inference for unavailable or ambiguous source layouts, local or dynamic gates, aliases, recursive placeholders and open generic caller types. It preserves written-capital checks and projection evidence; it does not add `program`, check islands or prove request watchability. Prepared prelude source and interface remain a trusted pair.
110−| --- | --- | --- |
111−| Unification: the library's own `+itype-unify-test` cases | Done | [jibb-typecheck](../tests/lib/jibb-typecheck.hoon) |
112−| Atoms: `@`, one-way widening to aura-family parents, branch widening to a present parent, atom constraints from capitals or bare binders | Partial: generic joins needing a common-type rule are unsupported | [types-partial-atom-widening](../tests/golden/types-partial-atom-widening/), [types-partial-aura-family](../tests/golden/types-partial-aura-family/), [types-partial-branch-widening](../tests/golden/types-partial-branch-widening/), [types-partial-bare-atom](../tests/golden/types-partial-bare-atom/), [types-partial-many-atom-constraints](../tests/golden/types-partial-many-atom-constraints/) |
113−| Decimal defaulting: unfixed decimals become `@ud` in gate-free types, including tuples and polymorphic calls | Partial: gate types still report "unresolved aura-variable inference" | [types-partial-decimal-default](../tests/golden/types-partial-decimal-default/) |
114−| Bare decimals fit only `@ud`, `@u`, `@` and `*` (S4), in casts, calls, fields, lists, branch joins and number patterns, with a hint for the aura's own literal | Partial: number patterns are checked only on known-union and atom subjects; a constructor applied directly, `(\|=%wait 30)`, keeps the generic message | `inline-decimal-*` |
115−| Literal heads: `%$` matches null-, loobean-zero- and term-zero-headed cases, and equal heads with disjoint payloads select a unique case | Partial: overlapping same-noun cases decline | [types-literal-constructor-nouns](../tests/golden/types-literal-constructor-nouns/), [types-equal-head-disjoint](../tests/golden/types-equal-head-disjoint/), [types-loobean-singleton-source](../tests/golden/types-loobean-singleton-source/) |
116−| String interpolation: known auras, `@`, tapes and isolated decimals; a known cell asks for a printer, a generic atom for an aura | Partial: a gate or non-tape list, which the Grammar makes a printer error, pending tags, generic or unknown types and a type fixed only later are unsupported | [types-string-interpolation](../tests/golden/types-string-interpolation/) |
117−| Annotation holes: each value or local definition resolves its own `_` before generalization, and later uses cannot repair it | Done: independent decimal holes default to `@ud`, captured and written-capital variables don't, and structural named molds report the hole's site | `types-hole-*`, [jibb-hole-guards](../tests/lib/jibb-hole-guards.hoon) |
118−| Holes in complex molds (`(list _)`), mutual recursive groups and inferred path segments | Missing: the first two fail closed; path-segment holes are only parsed and have no type test | [types-hole-named-complex](../tests/golden/types-hole-named-complex/), [types-hole-local-boundary](../tests/golden/types-hole-local-boundary/), [types-hole-unbound-mold](../tests/golden/types-hole-unbound-mold/), [parser-hole-path](../tests/golden/parser-hole-path/) |
119−| Written capitals: collected per `++`, shared with locals even when written later, generalized locally otherwise, independent across siblings | Done | [types-local-capitals](../tests/golden/types-local-capitals/), [types-generic-local-parameter](../tests/golden/types-generic-local-parameter/) |
120−| Forcing two distinct written capitals equal, by a call or a cast | Done: both sites are reported; forcing one to a concrete type is unsupported | [types-capital-distinct](../tests/golden/types-capital-distinct/), [types-multi-call](../tests/golden/types-multi-call/) |
121−| Empty types: `!!`, proven-empty cell positions and union cases; empty list or unit payload arms are rejected | Done: opaque reachability and spent budgets decline | [jibb-empty](../tests/lib/jibb-empty.hoon) |
122
35
123−### Records, lists and units
36+The API path analyzer can retain its source, complete prepared prelude, reader results and resolved dependencies as evidence, and classify a unique declaration as watchable, not watchable or unknown. It does not yet prove the provenance of request values or check island subscriptions. Prepared artifacts and reader results remain trusted host inputs.
124
37
125−| Area | Status | Proved by |
38+For a unique supported path declaration, the request-parts analysis derives ordered typed path parameters, a full-state reply sample and a fold type for one diff mark. Multiple diffs and unsupported or ambiguous evidence fail closed. By itself it does not create request gates or establish watchability of values.
126−| --- | --- | --- |
127−| Duplicate field names in a written record, including nested records, samples and expressions | Done: both sites are shown | [types-record-field-nested-mold](../tests/golden/types-record-field-nested-mold/), [types-record-field-expr-duplicate](../tests/golden/types-record-field-expr-duplicate/), [types-record-field-sample-duplicate](../tests/golden/types-record-field-sample-duplicate/) |
128−| Acyclic local definitions with captures, simple and nonrecursive generic mold aliases, faced record casts and field reads | Partial: selected shapes only | `types-local-*`, `types-generic-*`, `types-record-*` |
129−| Record changes: uniquely named fields, wing items through record fields (S6), with same-field and nested overlaps rejected, nested wings, field context for replacements | Done: unknown or partly unfaced spines are unsupported, and mismatches point at the edit, not the field's declaration | [types-record-change](../tests/golden/types-record-change/) |
130−| Record initializers under a known record cast, including nested list and union fields | Partial: mismatches point at the cast mold | [types-record-cast-context](../tests/golden/types-record-cast-context/) |
131−| A value of type variable `A` in a field typed `A`, including union payloads and nested or repeated fields | Partial: faces of differing variables don't merge | [types-generic-face-inference](../tests/golden/types-generic-face-inference/) |
132−| `proj`: explicit `(proj record)` with a known closed record type, keeping field-axis evidence for lowering; `proj` is reserved in definitions, samples, patterns and imports | Partial: same-order fields only; no context, a bare or aliased `proj` and the wrong arity fail closed | [jibb-proj-guards](../tests/lib/jibb-proj-guards.hoon), `types-proj-*` |
133−| `unface` (S1): removes every face from its argument's type, through cells, gate samples and products, containers' arguments and the unit's payload, keeping unions and recursive molds whole; reserved with `proj`; `++ f (unface \|= …)` is a gate for recursion | Partial: an argument of unknown type is unsupported; islands, pages and stores don't see a gate through `unface`; lowering waits for milestone 3 | `inline-unface-*` |
134−| `proj` with reordered fields or in nested unit, list or call contexts; `proj` lowering and execution | Missing: field order is open (question 32 in [open-questions.md](open-questions.md)) | [types-proj-explicit-context](../tests/golden/types-proj-explicit-context/), [types-proj-nested-no-implicit](../tests/golden/types-proj-nested-no-implicit/) |
135−| List literals without context, empty and nested, generalized independently | Partial: unresolved item tags and uncertain widening fail closed | [types-list-open](../tests/golden/types-list-open/), [types-list-open-constraints](../tests/golden/types-list-open-constraints/) |
136−| List literals with the validated prelude list and a known cast or sample: empty, nonempty, nested and cons, contextual tags, imported-list contexts | Done: a bad element, head or tail names both sites | [types-list-context](../tests/golden/types-list-context/), [types-list-cons](../tests/golden/types-list-cons/), [types-list-imported](../tests/golden/types-list-imported/), [types-list-zero-fit](../tests/golden/types-list-zero-fit/) |
137−| Gate sample context for one tuple or record argument, including nested cells and empty lists | Partial: a bound zero constant is unsupported, an unknown callee gives no context, and faced or three-item cons cells fail closed | [types-tuple-context](../tests/golden/types-tuple-context/), [types-list-zero-fit](../tests/golden/types-list-zero-fit/), [types-list-cons](../tests/golden/types-list-cons/) |
138−| List branches: a known list result gives context through complete loobean, unit-shaped and list-shaped branches, and `~` / `[item rest]` infers element and tail in either order | Done: unknown or non-list subjects, sets and incomplete patterns are unsupported | [types-list-branch](../tests/golden/types-list-branch/), [types-list-patterns](../tests/golden/types-list-patterns/), [types-list-pattern-imported](../tests/golden/types-list-pattern-imported/) |
139−| Unit construction with backticks, `some`, and `bind`, `biff`, `both`, `clap`, `clef` and `flit` under result annotations | Done: an unrelated union in unit context, a forced capital and an incompatible `clef` gate are unsupported | [types-unit-construction](../tests/golden/types-unit-construction/), [types-prelude-unit-helpers](../tests/golden/types-prelude-unit-helpers/) |
140−| Unit context: a known unit in a cast, call, list item or record field gives its payload context | Partial: unrelated union identities, some variable-dependent fits and a missing or altered unit template are unsupported | [types-unit-context](../tests/golden/types-unit-context/) |
141−| Nulls stay pending until resolved, and a known `~` / null-headed-cell union takes a complete `~` / `[~ value]` branch in either order | Partial: unknown subjects, missing or duplicate arms and unresolved results are not accepted | `types-null-*`, [types-unit-patterns](../tests/golden/types-unit-patterns/) |
142−| Loobean result context through complete list, unit and binder-only cell branches | Partial: binder-only arms over union subjects are unsupported | [types-flag-branch-context](../tests/golden/types-flag-branch-context/) |
143
39
144−### Unions and patterns
40+A separate supporting-definition analysis infers supported ordinary API molds and values and resolves all declared marks, retaining their source and dependency evidence. It fails closed on unsupported helpers or marks; unused `/-` cores are not independently validated, and definitions depending on derived gates remain unsupported. This does not check or export the whole API.
145
41
146−| Area | Status | Proved by |
42+Ordinary imports can infer derived request-gate types for multiple supported API paths. A case may take one typed segment before the reply or one diff fold after it; the unchanged todo API's plain, typed and diff requests infer, including a named closed fold. Checked ordinary API definitions, mark molds and a supported poke constructor are exported. Each `/sur` core must have a directly used, successfully read mold; unselected bindings are not independently validated. Jibb module imports, scry paths, multiple parameters or diffs and a parameter together with a fold remain unsupported. Source-qualified request evidence and exact trusted graph inputs survive transitive imports and cached interfaces, while stale or ambiguous evidence fails closed. This is a type-only interface: request execution, schema validation and proof that a request value is watchable remain unimplemented. In one loaded-machine run, the real-todo eval took 195.83 s wall and 67.83 s user CPU; the prior prototype took 111.81 s wall and 64.60 s user. Both include Hoon compilation and reader setup and overlapped other work, so they are not isolated checker benchmarks.
147−| --- | --- | --- |
148−| Contextual tags, `~` and constructors for closed disjoint and direct nonrecursive generic unions, through complete and nested loobean branches | Partial: no test carries union context through a unit-shaped `~` / `[~ x]` branch | [types-union-tags](../tests/golden/types-union-tags/), [types-union-context-flow](../tests/golden/types-union-context-flow/), [types-union-branch-context](../tests/golden/types-union-branch-context/), [types-generic-union-local](../tests/golden/types-generic-union-local/), [types-nested-union-context](../tests/golden/types-nested-union-context/) |
149−| Result context: a known result type, including a same-origin generic union, reaches a call before its arguments are inferred | Partial: unknown targets and calls stay unsupported; wrong payloads and proven missing tags report errors | [types-constructor-context](../tests/golden/types-constructor-context/), [types-generic-result-context](../tests/golden/types-generic-result-context/), [jibb-constructor-fit-guards](../tests/lib/jibb-constructor-fit-guards.hoon) |
150−| Tuple payload context: a two-item literal-headed tuple whose payload is a shallow call, from a known union of uniquely headed cells | Partial: inference that already fits wins; the path has no complexity bound | [types-nested-union-context](../tests/golden/types-nested-union-context/), [types-nested-noun-context](../tests/golden/types-nested-noun-context/), [types-nested-shallow-preserve](../tests/golden/types-nested-shallow-preserve/), [types-prelude-sub-nested](../tests/golden/types-prelude-sub-nested/), [jibb-nested-union-guards](../tests/lib/jibb-nested-union-guards.hoon) |
151−| Missing tags: a bare tag absent from a known union reports both sites in casts, calls, unit payloads, list items, branch arms and nested tuples | Done | `types-missing-tag-*`, [types-nested-missing-tag](../tests/golden/types-nested-missing-tag/) |
152−| Union printing: by in-scope name or imported alias; unnamed unions that escape print their cases, and generic unions keep their arguments | Done | `types-union-print-*`, [types-generic-union-escaping](../tests/golden/types-generic-union-escaping/), [types-generic-union-transitive](../tests/golden/types-generic-union-transitive/) |
153−| Different import faces for one union origin are compatible, and distinct origins stay distinct | Partial: compatibility across distinct origins and some generic-argument comparisons are unsupported | [types-union-print-same-origin](../tests/golden/types-union-print-same-origin/), [types-union-print-distinct](../tests/golden/types-union-print-distinct/) |
154−| Generic aliases may reorder, repeat or omit parameters, keeping a union's origin through scopes and library interfaces | Done: generic unions declared in a body and constraints on differing variables' faces are unsupported | [types-generic-union-alias](../tests/golden/types-generic-union-alias/), [types-generic-union-transitive](../tests/golden/types-generic-union-transitive/), [jibb-generic-alias](../tests/lib/jibb-generic-alias.hoon) |
155−| Nested unions compare by runtime noun; an empty field empties a cell, and unknown inhabitation stays unresolved | Done | [types-partial-union-nested-nouns](../tests/golden/types-partial-union-nested-nouns/) |
156−| Union patterns: whole-case arms, payload binders, imported and generic cases and binder-free catch-alls; missing cases and covered arms are reported | Done | [types-union-patterns](../tests/golden/types-union-patterns/), [types-union-patterns-generic](../tests/golden/types-union-patterns-generic/), [types-union-patterns-import](../tests/golden/types-union-patterns-import/) |
157−| A bare pattern name that spells a tag a matching case has at that position is an error (S5), on every checker path that types `?-` | Done: the full module check reports it only as "needs unsupported inference" | `inline-pattern-tag-name-*` |
158−| Partial boolean patterns: `?` positions split into at most 64 alternatives across the union | Done: past the limit the report says "union pattern expansion needs unsupported inference" | [types-union-finite](../tests/golden/types-union-finite/), [types-union-finite-limit](../tests/golden/types-union-finite-limit/), [types-union-finite-generic](../tests/golden/types-union-finite-generic/) |
159−| Other partial patterns, binders spanning cases, some complex two-arm subjects | Missing: fail closed | [types-union-finite-limit](../tests/golden/types-union-finite-limit/), [types-union-patterns-generic](../tests/golden/types-union-patterns-generic/) |
160−| Union pattern result context from a cast or call sample, for a union reached by a wing, grouped wing or shallow call | Partial: other subject forms are unsupported | [types-union-pattern-result-context](../tests/golden/types-union-pattern-result-context/), [types-union-pattern-result-controls](../tests/golden/types-union-pattern-result-controls/), [types-union-finite-context](../tests/golden/types-union-finite-context/) |
161−| Branch result joins: `?-` arms unify, then widen only to a present parent aura or `@`, in any arm order | Done: sibling auras without a parent stay distinct, and distinct variables forced equal get a two-site error | [types-partial-branch-widening](../tests/golden/types-partial-branch-widening/), [types-union-finite](../tests/golden/types-union-finite/), [types-union-finite-generic](../tests/golden/types-union-finite-generic/), [jibb-deferred](../tests/lib/jibb-deferred.hoon) |
162−| Recursive local branches, such as `rec-widen` | Done: arms over a known union whose results are all pending tags still fail closed as unsupported | [types-recursive-branch](../tests/golden/types-recursive-branch/), [types-local-error-order](../tests/golden/types-local-error-order/), [types-recursion-scc-local](../tests/golden/types-recursion-scc-local/), [types-union-patterns-generic](../tests/golden/types-union-patterns-generic/) |
163−| Cell patterns: a single arm with two or more binders, the last taking the tail | Done: duplicate and shadowed binders and definite non-cell subjects fail | `types-cell-pattern-*` |
164−| Structured single-arm patterns on a known non-union cell, with nested sub-patterns, wildcards and literal heads | Partial: intermediate union or collection tails and faced-record patterns are unsupported | [types-cell-pattern-many](../tests/golden/types-cell-pattern-many/), [types-cell-pattern-tail](../tests/golden/types-cell-pattern-tail/), [types-single-case-pattern](../tests/golden/types-single-case-pattern/) |
165−| Closed cell context through a bounded loobean branch, keeping value faces and rolling back on failure | Partial: open or uncertain substitutions and nested retries are unsupported | [jibb-cell-branch](../tests/lib/jibb-cell-branch.hoon), [types-cell-branch-context](../tests/golden/types-cell-branch-context/) |
166
43
167−### Gates, recursion and imports
44+The Hoon reader's tagged-union source proof also handles `$~` default wrappers. A shared eval and ship golden exercises the unmodified Tlon `epic.saga` mold as a named payload in a labeled downstream extension, alongside overlap, recursive, shadow and malformed-wrapper controls. The tagged-source helper peels at most four consecutive defaults; defaults inside dependency proofs spend the existing semantic-node budget. Other unverified nested unions and dependencies remain unsupported.
168
45
169−| Area | Status | Proved by |
46+The repository spec records the subsequent type-system and prelude decisions, including the chosen `like` result-mapping gate; those changes also need synchronization to the Claude document. An initial inference fragment and a standalone Hoon type reader are being tested. The fragment explicitly reports that it does not check a module; partial bridges pass Hoon `*` in supported nonrecursive molds, selected Hoon atoms, term singletons, the null singleton, the two loobean singletons and their exact fork, nested faced or unfaced cells, supported disjoint unions and opaque standard collections from `/sur` molds and marks into inference. Collections retain their names and supported arguments for printing and unification; nested supported union arguments are retained too. The bridge trusts unchanged results from the source-aware reader; a materialized type graph alone cannot reveal cases Hoon already collapsed. The source-validated standard prelude `list` mold shares this representation with imported lists; other Jibb-written collection molds and most prelude collection operations remain unsupported; malformed names and arities fail closed. Selected self-recursive `/sur` molds, including Tlon `notes.import-node` with list-wrapped self references, cross as opaque module-and-name identities; aliases, foreign references, recursive marks, unfolding and construction remain unsupported. The reader handles mark samples, including a source-proved nonrecursive union from a single Ford-imported `/sur` core, recursive molds whose origins can be verified through Ford imports, nested collections, direct ordered maps, including source-validated named operands such as Tlon `notes.log`, certain ordered-map fields, direct `$^` unions whose cases can be proved disjoint, and one verified explicit union argument in a list, set, map or unit. Tagged `$%` cases can additionally use restricted local named payload molds, bare `~` fields and one level of local named tagged unions, as in real Tlon `notes`, with bounded source proof; unsupported or ambiguous dependencies fail closed. Ambiguous recursive origins fail closed; recognizable explicit unions are checked from source before Hoon can collapse their cases, as @iko confirmed for imported `$%`, `$?` and `$^`, while other nested unions, nested ordered maps, general union disjointness and complete import integration remain unfinished. Opt-in structured reader APIs preserve successful graphs and distinguish definite unsupported-aura and core evidence from failures the reader cannot prove; unverified union disjointness and name-only vase recognition remain unsupported. They revalidate and re-walk failed types. An opt-in partial checker entry point consumes unchanged reader results and reports definite aura or core errors at imported mold use sites when their inputs are unique. Ordered replay covers nested cell samples, record and function casts, and non-generic same-module aliases; unsupported prefixes, cycles and shadowing stop it. Union molds, generic applications, transitive modules and unsupported reader outcomes remain generic. Replay repeats inference and may add work. The partial checker resolves a subset of ordinary library imports in dependency order using supplied Jibb sources and a source-derived partial prelude interface, caches completed interfaces per run, detects missing sources and cycles, and resolves nested fields of imported values with independent scheme instantiation. The source-backed internal prelude defines `poke` and the public prelude re-exports it as a transparent type. A dedicated trusted preparation path supplies private comparison and arithmetic schemes to the Jibb-written `gth`, `add` and `dec` wrappers; ordinary imports cannot access them. The public `add` and `dec` wrappers use private arithmetic interfaces; supported inference preserves the shared atom constraint that excludes loobeans. Primitive execution, jet recognition and length remain unfinished. The partial checker resolves its supported source shape and rejects ordinary imports of the private path. An imported API with one mark and a matching direct `+$ poke` declaration can export a constructor and retain agent/mark metadata when the representation has the supported agent case. A separate partial analysis resolves supported API path declarations and their full and diff mark types, including the todo paths; it does not by itself create requests or check an API module. Ordinary imports additionally infer the supported multi-path request-gate types described above. Complete private module checking, other API shapes, request lowering, root API and kind checking, stores, complete `ask` and `pure` checking and runtime effects remain unfinished. A possible store or root API with `+$ poke` reports unsupported kind or scope, while definite duplicates and unrelated shadowing still report conflicts. The prelude includes the doc-exact generic `cmd` union; the prelude inventory is incomplete. The inference fragment supports unrestricted `@`, selected one-way widenings including aura-family ancestors, generalized atom constraints arising from explicit capitals or bare sample binders, acyclic local value definitions with captures, selected single self-recursive top-level and local gates, simple and nonrecursive generic mold aliases, selected faced record casts and field reads, and contextual tags, `~` and constructors for closed disjoint unions, including direct nonrecursive generic unions and propagation through complete loobean and unit-shaped branches in casts and known union-sample calls, including nested branches. Known loobean result context also propagates through supported complete branches and binder-only cell arms; binder-only arms over union subjects remain unsupported. A directly known named union can instantiate an unconstrained generic gate sample with its origin, generic arguments and faces preserved; unnamed, pending, recursive and variable-bound cases remain unsupported. A known gate with an unresolved result variable can receive a known enclosing result type before its arguments are inferred; unknown calls and unresolved targets remain conservative. Multi-argument calls form a right-nested sample, retain known faces and shared type variables, and can use known sample positions to contextualize list and union arguments. A definite mismatch points to the failing argument when the fragment can establish it, otherwise to the combined sample; unsupported contextual forms still fail closed. For a supported recursive gate, the checker infers the sample first and uses its exact type, including field faces, for one monomorphic self reference. It generalizes after the body is checked; subsequent uses instantiate it independently. Incompatible recursive arguments can report the gate and argument sites. For a complete loobean branch with one direct self-call arm, a separately inferred closed base type can seed the recursive result before the whole body is checked. Open or pending base types do not seed it; other branch shapes remain subject to the fragment’s existing limits. A supported single local recursive gate also uses a monomorphic self reference and generalizes variables free of the enclosing environment after checking its body; captured variables remain shared. The checker collects written capitals per `++` before inference, excluding nested definitions: a capital used in an enclosing definition is shared with its locals even when written later, while a capital introduced only in a local definition is generalized there. Sibling locals can introduce independent capitals with the same spelling; generic mold parameters keep their own scope. Top-level groups of syntactic gates are inferred together with monomorphic placeholders and shared substitutions, then generalized only after the whole group checks; downstream uses and library interfaces instantiate those schemes independently. A dependency graph identifies groups with two iterative depth-first passes; its conservative local-reference edges can reject otherwise valid programs. Supported local mutually recursive gate groups also use shared monomorphic placeholders and generalize only after the group checks, preserving captured outer variables. A bounded dependency proof reports certain non-gate cycles through values and gates when an explicit atom or loobean result cast and simple unshadowed expressions establish the cycle. Other mixed gate/value cycles, polymorphic recursion, unresolved literal constraints and unresolved branch joins remain unsupported. Reporting repeats inference for a single recursive gate outside a group; grouped reports use the stored schemes. Its performance cost remains unmeasured. A single-arm cell pattern accepts two or more binders, the last capturing the remaining tail; duplicate and shadowed binders are rejected. A structured single-arm pattern also works for a known non-union cell when coverage is proven, including nested literal and wildcard positions. Intermediate union or collection tails, nested patterns, wildcards and faced records remain unsupported. String interpolation accepts known atom auras, unrestricted `@`, tapes and isolated decimal literals; a known cell asks for a printer, and an explicitly generic atom asks for an aura. Loobeans, term singletons, non-tape collections, open types and a type fixed only later remain unsupported. A known closed union with two or more arms supports patterns that provably cover or exclude each remaining case, including payload binders, imported and generic cases, and binder-free catch-alls. Partial boolean patterns can split known `?` positions into their two noun values, up to 64 alternatives across the union; binders retain their original case type. Missing alternatives and covered arms are reported. Other partial patterns, expansions above the limit, binders spanning distinct cases, differing arm result types and some complex two-arm subjects remain unsupported. A cast or known call sample can supply result context through whole-case arms and supported finite loobean refinements for a known union accessed by a wing, a grouped wing or a supported shallow call, including nested cell and list positions; other partial-pattern contexts and subject forms remain unsupported. The Grammar’s `step` block infers in this fragment, but its module is not yet checked. A bare tag proved absent from a known union reports the union and tag sites in casts, single-argument calls, unit payloads, list items and supported branch arms; imported unnamed unions print their cases. Ordered fit replay can identify a missing tag nested in a syntactic tuple, stopping at an earlier mismatch or uncertainty. Known faced records support uniquely named field changes, including nested wings, with field context passed to replacements and the original record type retained. Missing fields, empty changes and definite mismatches report sites; the expected-type site is the edit because the original field declaration location is not retained. Unknown or partly unfaced spines, ambiguous fields and repeated edits remain unsupported. A known record cast supplies field context to its tuple or record initializer, including nested list and union fields; mismatch diagnostics use the cast mold because the original field declaration location is not retained. Isolated cart-style `init` and `update` expressions infer, while the complete cart-store fails closed because its kind and declaration scope remain unchecked. Uncontextualized list literals infer a fresh element type, including empty and nested lists, with independently generalized uses. Unresolved item tags and uncertain widening remain unsupported. Backtick unit construction uses the validated standard prelude unit template, infers its payload without losing pending constraints, and makes the prelude’s `some` available. Ordinary result annotations also let its `bind`, `biff`, `both`, `clap`, `clef` and `flit` infer. A known unit in a cast, call, list item or record field supplies context to its payload, including nested units and lists; mismatches identify the payload and context. Unrelated union identities, some variable-dependent fits, and missing or altered prelude unit templates remain unsupported. Literal singleton heads compare by runtime noun, so `|=%$` also matches explicit null- and loobean-zero-headed cases. When equal heads have disjoint payloads, the constructor selects a uniquely proven compatible payload; unknown and ambiguous candidates remain unsupported. Unresolved nulls remain pending and are reported separately from tags. A known union of `~` and a null-headed cell supports a complete `~` / `[~ value]` branch in either order, including shadow checks; unknown subjects, missing or duplicate arms, and unresolved branch results remain unsupported. This fragment infers the prelude’s `fall` and `need` signatures. With the validated prelude list and a known cast or gate sample, empty, nonempty and nested list literals infer their element types, including contextual union tags; a mismatched element names both sites. In that context `~` and zero-valued terms fit an empty list, and two-item unfaced cells form cons lists, including nested cons and imported-list contexts; invalid heads or tails name both sites. A known gate sample also supplies context to matching positions in a single tuple or record argument, including nested cells; zero literals can fit list positions. A bound zero constant remains unsupported rather than a definite mismatch, and an unknown callee does not supply context. Faced or longer cells and a missing or altered prelude list fail closed. A known list result also supplies context through complete loobean, unit-shaped and list-shaped branches, including recursive and nested branches. For a known standard list with a supported element type, a complete `~` / `[item rest]` branch infers the element and tail types in either arm order and checks binders for shadowing. Unknown subjects, unsupported element types and other or incomplete list patterns remain unsupported. A value with type variable `A` can fit a field whose type is that same `A`, including in generic union payloads and nested or repeated record fields. Other variable-dependent face merges remain unsupported. Forced equality of distinct written capitals now reports both source sites, following @iko’s decision; forcing one to a concrete type remains unsupported. Imported record spines with repeated faces fail closed where used, but only with a generic unsupported diagnostic. Hoon may erase unfaced nested-cell boundaries, so the check can conservatively reject valid names in distinct erased scopes. Supported closed unions print using an in-scope name or imported alias; an unnamed nongeneric union prints its cases, parenthesized when nested. The latter is print-only. Generic union types retain all arguments in their printed name; if that name is unavailable, the partial printer reports the limitation. Different import faces for the same origin remain compatible; compatibility across distinct union origins and some generic-argument comparisons remain unsupported. Nonrecursive generic aliases can reorder, repeat or omit parameters while retaining a union’s origin, including through local scopes and library interfaces. A generic union declared directly inside a body remains unsupported, as do differing-variable face constraints in a union payload. A transitive generic union whose name is unavailable is reported as unsupported instead of hiding its arguments. Unfixed decimal literals default to `@ud` in gate-free inferred types; recursive molds, general branch tag context, other constraint cases and defaulting inside gate types still need work. Collection recognition checks the originating core and fails closed on shadows or unsupported Ford subject shapes; a wrapper regression also rejects forged subjects, samples and tails. Its golden fixtures include three real Tlon files. A Clay test passes a Ford-built nested union through the reader into partial inference. The partial prelude includes `murn`, `join`, `snip`, `rear` and the agreed shared-type `clap`; supported calls infer, while backend validation remains outstanding, and [prelude-inventory.md](prelude-inventory.md) is a source audit, not the complete inventory or signatures. The milestone remains unfinished.
170−| --- | --- | --- |
171−| Multi-argument calls: a right-nested sample keeping faces and shared variables, giving context to list and union arguments | Done: unknown-callee contexts and pending tags are unsupported | [types-multi-call](../tests/golden/types-multi-call/) |
172−| Positional calls unify a variable argument with a faced sample slot without passing the face on | Done: `labelled` checks as `$-([label=@t msg=A] (element A))` | [jibb-buttons](../tests/lib/jibb-buttons.hoon), [jibb-positional-face-guards](../tests/lib/jibb-positional-face-guards.hoon), [jibb-closed-gate-guards](../tests/lib/jibb-closed-gate-guards.hoon), [types-positional-faces](../tests/golden/types-positional-faces/) |
173−| A capital that meets a faced position binds only the type under the face (S1 step 1, decided 2026-11-03) | Missing: `(hunt lt-a `1 `2)` still fails; the checker core of review question 5 builds it | [inline-unface-labelled-slot](../tests/golden/inline-unface-labelled-slot/) |
174−| Printed type variables keep their written names (S7), as `(program Data Model Msg)`; a variable with no name prints as an unused letter | Done: when named variables merge, a capital written in the `++` names the result, otherwise the earliest-made one | [types-typevar-names](../tests/golden/types-typevar-names/), [types-typevar-print](../tests/golden/types-typevar-print/) |
175−| Named unions through unconstrained polymorphic gates, keeping origin, arguments and faces | Partial: different origins, explicit-capital forcing and pending tags are unsupported | [types-union-polymorphic-identity](../tests/golden/types-union-polymorphic-identity/) |
176−| Direct gate sample fit: a directly named, checked root gate against a generic gate sample in a direct prelude call | Partial: other cases fall back to ordinary inference, and it proves no island or watchability | [jibb-direct-gate-guards](../tests/lib/jibb-direct-gate-guards.hoon), [jibb-direct-gate-source](../tests/lib/jibb-direct-gate-source.hoon) |
177−| Single self-recursive gates, top-level and local: a monomorphic self reference, then generalization; bad recursive arguments name both sites | Done: polymorphic recursion, explicit-capital forcing and local name collisions are unsupported | [types-recursive-sample](../tests/golden/types-recursive-sample/), [types-recursive-gate](../tests/golden/types-recursive-gate/), [types-local-recursive](../tests/golden/types-local-recursive/) |
178−| A closed base type seeds the result of a complete loobean branch with one direct self-call arm | Done: open or pending bases don't seed it | [types-recursive-branch](../tests/golden/types-recursive-branch/) |
179−| Top-level mutual recursion: gate groups inferred together, generalized after the group checks, instantiated independently downstream | Partial: conservative dependency edges can reject valid programs | `types-recursion-scc-*` |
180−| Local mutual recursion: shared monomorphic seeds, captured outer variables kept shared | Partial: distinct forced captures, unresolved tags, shadowing and mixed gate/value cycles fail closed | [types-local-scc](../tests/golden/types-local-scc/), [types-local-scc-adversarial](../tests/golden/types-local-scc-adversarial/), [types-recursion-scc-local](../tests/golden/types-recursion-scc-local/) |
181−| Non-gate value cycles, reported with a dependency site when an explicit atom or loobean cast establishes them | Partial: bare aliases, branches and nested-local edges decline | [types-value-cycles](../tests/golden/types-value-cycles/), [types-value-cycle-shadow](../tests/golden/types-value-cycle-shadow/), [types-value-cycle-unsupported](../tests/golden/types-value-cycle-unsupported/) |
182−| Other mixed gate/value cycles, polymorphic recursion, unresolved literal constraints and unresolved branch joins | Missing | [types-recursion-scc-failures](../tests/golden/types-recursion-scc-failures/), [types-value-cycle-unsupported](../tests/golden/types-value-cycle-unsupported/) |
183−| Library imports: supplied Jibb sources in dependency order, a per-run interface cache, missing-source and cycle reports, nested fields of imported values | Partial: a library with a recursive mold yields no interface | `module-import-*`, `module-cache-*`, `types-module-field-*` |
184
47
185−### Bounded and experimental routes
48+The shared prelude interface reserves every name present in the supplied vendored source and makes only supported inferred entries available, including `list`, `unit`, `same`, `fall`, `need`, `bond`, `lure`, `weld`, `snoc` and `turn`. The validated standard `list` mold is injected when the prelude’s own gates are inferred; `weld` and `turn` have ordinary explicit result casts. An absent or altered `list` is not injected, and an altered declaration cannot leak through direct or transitive mold aliases. The same validated template is available when prelude mold aliases are prepared, so supported direct and transitive aliases can use it. Unsupported entries such as most list helpers remain reserved but unavailable; backend validation of the helpers remains outstanding. All callers use the same prelude origin, so a library can export a type containing unqualified `(unit A)` to another module. The source-only `+prepare-prelude` rejects empty, malformed, conflicting or import-bearing source; `+prepare-prelude-with-internal` also accepts the supported private internal import. Prepared values are trusted and must come unchanged from the matching preparation arm. When canonical public list or unit templates are missing or altered, independently inferred private molds remain available, while molds that depend on those templates do not. The module-scope fixture compares the prepared and source-taking paths against the real prelude and a two-module golden under eval and on the ship. The source and checker remain incomplete, so this does not establish complete shadowing coverage or a checked module.
186
49
187−| Area | Status | Proved by |
50+## Milestone 1: parser and mark
188−| --- | --- | --- |
189−| Generic recursive trees: a source-proven tree in an import-free owner module keeps its nominal identity across imports and aliases | Partial: a narrow test tree, not `element`; different origins and unproved casts decline | [jibb-generic-recursion](../tests/lib/jibb-generic-recursion.hoon) |
190−| Tree construction one source-proven layer at a time under a known type | Partial: wrong-owner, wrong-argument and bad-child cases report "list item constraint is not supported", not an error | [jibb-generic-construction](../tests/lib/jibb-generic-construction.hoon) |
191−| Flat tree matches with explicit tags or nonbinding catch-alls, and a missing-case error for a single-arm match | Done: 128 arms are screened and 129 decline | [jibb-generic-pattern](../tests/lib/jibb-generic-pattern.hoon) |
192−| Whole-case binders, nested patterns, general structural fits and gate-free proof for these trees | Missing: declined | [jibb-generic-pattern](../tests/lib/jibb-generic-pattern.hoon), [jibb-generic-recursion](../tests/lib/jibb-generic-recursion.hoon) |
193−| Tree limits: 4,096 face and substitution visits per scan, 128 arms per pattern, unfolding fuel per attempt | Partial: the 4,096 and 128-arm boundaries are tested; the suites test fuel 0 to 4, not the 256-step `jrec-fuel` | [jibb-generic-construction](../tests/lib/jibb-generic-construction.hoon), [jibb-generic-pattern](../tests/lib/jibb-generic-pattern.hoon) |
194−| `qath`: source identity, null and cell construction and matching, static application-path literals, faces and identity across imports | Partial: the suites test fuel 0 to 2, not the 256-step limit | `types-qath-*`, [jibb-qath-fuel](../tests/lib/jibb-qath-fuel.hoon), [jibb-qath-source](../tests/lib/jibb-qath-source.hoon) |
195−| `qath` for other recursive shapes, broader patterns and dynamic path segments; route and static-file checks | Missing: dynamic segments need unsupported inference, and routes wait for milestone 4 | [types-qath-recursive](../tests/golden/types-qath-recursive/) |
196−| Deferred constructor transaction: unsafe shapes decline, so a later substitution cannot undo a face check | Partial: experimental; no test isolates each declined category | [jibb-deferred](../tests/lib/jibb-deferred.hoon) |
197−| Deferred retries once later dependencies exist; a two-arm boolean branch keeps literal obligations until a closed context resolves them | Partial: faced targets, unions with a case that is not a constant or a cell, list literals and general union-pattern branches decline | [jibb-deferred-context](../tests/lib/jibb-deferred-context.hoon), [jibb-deferred](../tests/lib/jibb-deferred.hoon) |
198−| Deferred direct-constructor constraints in an import-free library without a prepared prelude, published only when everything closes | Partial: experimental; stores, preludes, imports, recursive groups, open interfaces and `%grec` scans are rejected | [jibb-deferred](../tests/lib/jibb-deferred.hoon), [jibb-deferred-resolver](../tests/lib/jibb-deferred-resolver.hoon) |
199−| Prepared-prelude initializer recovery: a non-main library tuple initializer deferred to a later exact result cast | Partial: needs exact value, mold and interface inventories, and the report keeps "partial inference; module not checked"; list literals are not deferred | [jibb-deferred-prepared](../tests/lib/jibb-deferred-prepared.hoon) |
200−| Prepared recovery guards: API and store paths, `main` and imports are excluded; wrong fields, unrelated tags and mold collisions fail closed | Done | [jibb-deferred-prepared](../tests/lib/jibb-deferred-prepared.hoon) |
201
51
202−## Types and prelude: prelude
52+What the plan asks for, and where it is:
203
53
204−| Area | Status | Proved by |
54+| The plan | Where |
205−| --- | --- | --- |
55+| --- | --- |
206−| Shared interface: every vendored name reserved, only inferred entries exposed, such as `list`, `unit`, `same`, `fall`, `need`, `bond`, `lure`, `weld`, `snoc`, `turn` and `lent` | Partial: backend validation is outstanding | [jibb-module-scope](../tests/lib/jibb-module-scope.hoon), [jibb-list-alias-guards](../tests/lib/jibb-list-alias-guards.hoon), [types-prelude-interface](../tests/golden/types-prelude-interface/) |
56+| The `%jibb` mark as the first tab gives it | `jibb-dev/mar/jibb.hoon`, as the doc writes it |
207−| One prelude origin for all callers, so a library can export a type with unqualified `(unit A)` | Done | [types-prelude-interface](../tests/golden/types-prelude-interface/), [jibb-module-scope](../tests/lib/jibb-module-scope.hoon) |
57+| The layout pass, emitting INDENT, DEDENT and NEWLINE | `+layout` in `jibb-dev/lib/jibb.hoon`, designed in its section 2 |
208−| Preparation: `+prepare-prelude` rejects malformed, conflicting and import-bearing source, and `+prepare-prelude-with-internal` takes the private internal import | Done: that prepared values are trusted is a contract, which no test checks | [jibb-poke-bridge](../tests/lib/jibb-poke-bridge.hoon), [jibb-module-scope](../tests/lib/jibb-module-scope.hoon) |
58+| A parser for the Grammar tab's EBNF that returns a syntax tree with source positions | `+parse` and `+parse-tokens`, section 3. Every node has a span, its start and end, and `+check-spans` tests the spans of every tree the golden tests print |
209−| The validated `list` template for the prelude's own gates and mold aliases; an altered, omitted, duplicate or malformed `list` doesn't leak through aliases | Done | [jibb-list-alias-guards](../tests/lib/jibb-list-alias-guards.hoon), [types-prelude-list-alias](../tests/golden/types-prelude-list-alias/), [types-prelude-list-functions](../tests/golden/types-prelude-list-functions/) |
59+| Errors with file, line, column and an excerpt | `+show-error`, section 4.3. Each error points at the first character where the text stops being the start of any valid module (section 2.0) |
210−| The prelude `list` and imported Hoon lists unify both ways | Partial: other Jibb-written collection molds and most collection operations are unsupported | [types-list-imported](../tests/golden/types-list-imported/), [types-list-pattern-imported](../tests/golden/types-list-pattern-imported/), [jibb-bridge](../tests/lib/jibb-bridge.hoon) |
60+| Done when every Jibb code block in the doc parses | The doc labels its 14 Jibb blocks `jibb`. Each is a golden case, `tests/golden/doc-*`, and `tools/doc-blocks docs/spec` checks that they match. All parse; the one block written as an error, the Grammar's buttons example, has a type error for milestone 2 |
211−| With `list` or `unit` missing or altered, independent private molds (`qath`) stay available and dependent ones (`ask`) don't | Done | [jibb-qath-source](../tests/lib/jibb-qath-source.hoon), [jibb-ask-guards](../tests/lib/jibb-ask-guards.hoon) |
61+| Done when each lexical rule has a test input that breaks it | The `lex-*` golden cases: for each lexical rule, inputs that break it (`-bad-`), each with the error's expected place, and inputs that keep it (`-ok-`), except for the forms Jibb leaves out (the closers, blob and `@c` literals) |
212−| Module scope: the prepared and source-taking prelude paths compared against the real prelude | Partial: full checks name top-level conflicts and show both sites when sources are available; nested reserved names and API mark conflicts can still be generic | [jibb-full-scope](../tests/lib/jibb-full-scope.hoon), [jibb-module-scope](../tests/lib/jibb-module-scope.hoon), [types-prelude-interface](../tests/golden/types-prelude-interface/) |
62+| Done when `\|commit` stores `.jibb` files on a fake ship | `tools/ship check-commit`: 7 checks, from reading every file back byte for byte to three-way merges |
213−| Full-check definition diagnostics | Partial: definite inference failures on unresolved definitions retain their sites; mold, kind and context-dependent failures remain incomplete | [jibb-full-diagnostics](../tests/lib/jibb-full-diagnostics.hoon) |
214−| `fall` and `need` | Done | [prelude-list-unit](../tests/golden/prelude-list-unit/), [types-prelude-direct](../tests/golden/types-prelude-direct/) |
215−| `drop`, `skim`, `skip`, `murn`, `join`, `snip`, `rear` and a shared-type `clap` | Partial: no test calls `rear` | [types-prelude-list-helpers](../tests/golden/types-prelude-list-helpers/), [types-prelude-unit-helpers](../tests/golden/types-prelude-unit-helpers/) |
216−| `bond`, `levy`, `lien`, and gate composition and currying | Partial: currying a faced sample is unsupported | [types-prelude-bond](../tests/golden/types-prelude-bond/), [types-prelude-predicates](../tests/golden/types-prelude-predicates/), [types-prelude-functional](../tests/golden/types-prelude-functional/) |
217−| `hunt`, with the ordering gate first | Done: both ordering outcomes and absent units infer; a mismatched payload or ordering-gate sample names both sites | [types-prelude-unit-helpers](../tests/golden/types-prelude-unit-helpers/), [prelude-unit-list-transforms](../tests/golden/prelude-unit-list-transforms/) |
218−| `like`: the value gate maps a `(like A)` result with a gate, and `like` is still a mold | Partial: an incompatible converter is reported as unsupported, not as an error | [types-prelude-like](../tests/golden/types-prelude-like/) |
219−| `eq` and `mate`, with a gate-free variable; `set`, `map`, `mop`, `jar` and `jug` constrain only their keys | Partial: backend equality and crash behavior are unverified | [jibb-gate-free-guards](../tests/lib/jibb-gate-free-guards.hoon), [types-prelude-unit-helpers](../tests/golden/types-prelude-unit-helpers/) |
220−| `lent` | Done | [types-prelude-lent](../tests/golden/types-prelude-lent/) |
221−| `succ` through `add`, keeping its non-loobean atom constraint | Done: a Hoon translation agrees with Hoon's `succ` on ten inputs | [types-prelude-succ](../tests/golden/types-prelude-succ/), [jibb-hoon-reference](../tests/lib/jibb-hoon-reference.hoon) |
222−| `lead` and `late`, curried | Done: a Hoon translation agrees with Hoon's on 25 pairs of five nouns, a gate among them | [types-prelude-lead-late](../tests/golden/types-prelude-lead-late/), [jibb-hoon-reference](../tests/lib/jibb-hoon-reference.hoon) |
223−| `zing` over `weld` | Done: a Hoon translation matches Hoon's `zing` on 4 inputs | [types-prelude-zing](../tests/golden/types-prelude-zing/), [jibb-hoon-reference](../tests/lib/jibb-hoon-reference.hoon) |
224−| `lth`, `gte` and `lte` over `gth` and `not` | Partial: complete import checking is unfinished | [types-prelude-comparison](../tests/golden/types-prelude-comparison/) |
225−| Private `gth`, `add` and `dec` schemes that ordinary imports cannot reach; `add` and `dec` reject loobeans | Done | [types-prelude-arithmetic](../tests/golden/types-prelude-arithmetic/), [types-arithmetic-module](../tests/golden/types-arithmetic-module/), [jibb-arithmetic-guards](../tests/lib/jibb-arithmetic-guards.hoon) |
226−| `trip` and `tuba` over private primitives: `$-(@t (list @tD))` and `$-((list @tD) (list @c))` | Partial: no test compares them with Hoon's definitions | [types-prelude-text](../tests/golden/types-prelude-text/) |
227−| `cmd`, the doc's generic union with five cases | Partial: the prelude inventory is incomplete | [types-prelude-cmd](../tests/golden/types-prelude-cmd/) |
228−| `sub`, with `%watch` payloads of type `(ask M)` | Done: building a `sub` proves no watchability | [types-prelude-sub](../tests/golden/types-prelude-sub/), [types-prelude-sub-nested](../tests/golden/types-prelude-sub-nested/), [jibb-sub-guards](../tests/lib/jibb-sub-guards.hoon) |
229−| `ask`, with pure, agent and store cases, and `pure` | Partial: receiver mismatches and path, `qath` and erased-fact casts are unsupported | [jibb-ask-guards](../tests/lib/jibb-ask-guards.hoon), [types-prelude-ask](../tests/golden/types-prelude-ask/) |
230−| `qath`, `~` or `[i=@ta t=qath]` in the internal prelude, re-exported | Done | [jibb-qath-source](../tests/lib/jibb-qath-source.hoon), [types-qath-module-identity](../tests/golden/types-qath-module-identity/) |
231−| `raw-poke`, defined in the internal prelude and re-exported as a transparent type | Done | [jibb-poke-bridge](../tests/lib/jibb-poke-bridge.hoon) |
232−| Printed types say `ask`, `qath` and `raw-poke`, without `.internal` | Done | [types-prelude-ui](../tests/golden/types-prelude-ui/), [jibb-theme](../tests/lib/jibb-theme.hoon), [types-prelude-cmd](../tests/golden/types-prelude-cmd/) |
233−| `store` mold and builder; a store's local `+$ poke` stays its own action mold | Done: multi-action declarations are unsupported | [jibb-store](../tests/lib/jibb-store.hoon), [jibb-poke-bridge](../tests/lib/jibb-poke-bridge.hoon) |
234−| UI length and attribute molds, the 19 element constructors, and `program` and `page` records and builders, with exact schemes | Done | [types-prelude-ui](../tests/golden/types-prelude-ui/) |
235−| `element`: a nonrecursive 19-case union with `*` children, and `island` giving `(element !!)` | Partial: a child-message mismatch (`bad-child`) is reported as unsupported, not as an error | [types-prelude-ui](../tests/golden/types-prelude-ui/) |
236−| Raw-constructor encapsulation, duplicate-attribute checks, rendering, storage and navigation | Missing: a raw `[%text "raw"]` element infers | [types-prelude-ui](../tests/golden/types-prelude-ui/) |
237−| `theme`: required text tokens, an optional `qath` font and optional dark tones | Done: no theme behavior is implemented | [jibb-theme](../tests/lib/jibb-theme.hoon), [doc-overview-02-theme](../tests/golden/doc-overview-02-theme/) |
238−| Execution and jet recognition of prelude gates and primitives | Missing | none |
239
63
240−## Types and prelude: Hoon importer
64+Besides the plan's list:
241
65
242−| Area | Status | Proved by |
66+- 649 golden cases: 429 that parse and 220 that fail, each failure at a stated line and column. One failing case has an unclear expectation (corpus question 3). The newer type-output cases exercise only the partial inference fragment. Each case's `about.txt` quotes the doc's words it tests.
243−| --- | --- | --- |
67+- The 649-case corpus passed under `urbit eval` in 109.6 s while other checks were running. The fake ship passed all 680 tests, including the importer, importer/checker and mark/checker bridges, module scope, unification, hole, qath, ask, default-wrapper importer, projection, arithmetic, generic-alias, positional-face, API-evidence, request, closed-gate, todo API, constructor, sub, nested-union, gate-free and direct-gate guards, with 80.2 s for sync and 94.0 s for tests. The importer golden compares 221 projections; `tools/clay-fixtures` builds the example Hoon fixtures through Clay, checks a recursive Ford import's origin, and passes Clay-built types through the Clay-built importer and partial checker.
244−| The bridge into inference: `*`, selected atoms, singletons, nested cells, disjoint unions and opaque standard collections from `/sur` molds and marks | Partial: supported shapes only, with `*` only in nonrecursive molds; the mark bridge mainly tests that only the declared aura mark resolves | [jibb-bridge](../tests/lib/jibb-bridge.hoon), [jibb-tlon-bridge](../tests/lib/jibb-tlon-bridge.hoon), [type-import/expected.txt](../tests/type-import/expected.txt), [jibb-mark-bridge](../tests/lib/jibb-mark-bridge.hoon) |
68+- `tools/testdata/selftest` (22 checks), `tools/testdata/ship-selftest` and `tools/testdata/clay-fixtures-selftest` test the tools themselves; the last checks temporary Clay fixture cleanup and signal handling without a ship.
245−| Bridged collections keep their names and arguments, including nested union arguments | Partial: the bridge trusts unchanged source-aware reader results, which is documented, not testable | [jibb-bridge](../tests/lib/jibb-bridge.hoon) |
69+- Two independent audits before 7c739b7, one of which compared the library with a reference parser written in Python from the doc over about 19,000 generated programs. Before ab797a9, a second Python parser, written from the decisions, agreed with the library on 8,000 generated programs and 900 hand-written probes.
246−| A Hoon `(unit T)` becomes the prelude `unit`, also inside unions and lists, API marks and poke exports | Done | [jibb-bridge](../tests/lib/jibb-bridge.hoon), [jibb-api-paths](../tests/lib/jibb-api-paths.hoon) |
70+- Speed: starting `urbit eval` and building the library takes about 8 s. After that, a 2,000-line module of 400 definitions parses in about a second. Loops over definitions, arms, lines and items grow no stack; nesting costs a few stack frames a level, and 100,000 nested brackets still parse (library section 3).
247−| Repeated faces in imported record spines | Partial: fail closed with a generic diagnostic, and may reject valid names in scopes Hoon erased | [jibb-bridge](../tests/lib/jibb-bridge.hoon) |
248−| Reader coverage: mark samples, Ford-verified recursive molds, nested collections, direct ordered maps (Tlon `notes.log`), disjoint direct `$^` unions, one explicit union argument in a collection | Done | [jibb-import](../tests/lib/jibb-import.hoon), [jibb-mark-bridge](../tests/lib/jibb-mark-bridge.hoon), [types-import-tlon-notes](../tests/golden/types-import-tlon-notes/) |
249−| Tagged `$%` cases with local named payload molds, bare `~` fields and one level of nested tagged unions, as in the real Tlon notes | Partial: other nested unions are unfinished | [types-import-tlon-notes](../tests/golden/types-import-tlon-notes/), [jibb-import](../tests/lib/jibb-import.hoon) |
250−| Self-recursive `/sur` molds, including Tlon `notes.import-node`, as opaque module-and-name identities | Partial: aliases, foreign references, recursive marks, unfolding and construction are unsupported | [types-import-tlon-notes](../tests/golden/types-import-tlon-notes/), [jibb-import](../tests/lib/jibb-import.hoon) |
251−| Explicit `$%`, `$?` and `$^` unions checked from source, including cases Hoon would collapse | Partial: ambiguous recursive origins fail closed | [jibb-import](../tests/lib/jibb-import.hoon), [jibb-import-overlap](../tests/lib/jibb-import-overlap.hoon), [jibb-import-structural](../tests/lib/jibb-import-structural.hoon) |
252−| Other nested unions, nested ordered maps, general union disjointness, complete import integration | Missing: reported as disjointness that could not be verified | [jibb-import](../tests/lib/jibb-import.hoon) |
253−| Collection recognition checks the originating core and rejects shadows, missing provenance and forged subjects, samples and tails | Done | [jibb-import](../tests/lib/jibb-import.hoon), the Tlon fixtures [importer/tlon-epic.txt](../tests/importer/tlon-epic.txt), [importer/tlon-presence.txt](../tests/importer/tlon-presence.txt) and [importer/tlon-docs.txt](../tests/importer/tlon-docs.txt) |
254−| `$?` overlaps, proved by comparing each case's runtime noun and reported at the Jibb use site | Partial: Hoon case locations are not reported, and the mark reader reports no overlaps | [jibb-import-overlap](../tests/lib/jibb-import-overlap.hoon), [jibb-import-structural](../tests/lib/jibb-import-structural.hoon) |
255−| Overlap budgets: 128 cases and 4,096 source nodes per union, and 4,096 nodes each for dependencies and the witness | Done: they don't bound chapter lookup, Hoon evaluation or graph walks | [jibb-import-overlap](../tests/lib/jibb-import-overlap.hoon), [jibb-import-structural](../tests/lib/jibb-import-structural.hoon) |
256−| `$~` default wrappers in the tagged-union proof: the Tlon saga mold and a labelled saga envelope | Done: overlap, recursive, shadow and malformed controls are rejected | [jibb-import-default](../tests/lib/jibb-import-default.hoon) |
257−| Consecutive default wrappers | Partial: four are peeled and five rejected; no test shows that defaults in dependency proofs spend the node budget | [jibb-import-default](../tests/lib/jibb-import-default.hoon) |
258−| Structured reader APIs (`read-named-diagnostic`, `read-mark-diagnostic`) keep graphs and tell definite aura and core errors from unprovable ones | Partial: unverified union disjointness and name-only vase recognition are unsupported | [jibb-import-diagnostic](../tests/lib/jibb-import-diagnostic.hoon), [jibb-import](../tests/lib/jibb-import.hoon) |
259−| Reader errors at Jibb use sites, replayed into nested samples, casts and same-module aliases | Partial: imported union molds, generic applications and transitive modules keep the generic message, as do duplicate, missing or clashing inputs | [jibb-import-diagnostic](../tests/lib/jibb-import-diagnostic.hoon), [type-import-diagnostic/nested.txt](../tests/type-import-diagnostic/nested.txt) |
260−| The importer golden: 221 projections | Done | [jibb-import](../tests/lib/jibb-import.hoon), [importer/tree.txt](../tests/importer/tree.txt) |
261−| Clay: the example `/sur` files and marks built through Clay, a recursive Ford import's origin, a Ford-built nested union into partial inference | Done: 14 threads, each with an expected file | `tools/clay-fixtures`, [clay-fixtures/](../tests/clay-fixtures/) |
262
71
263−## Desks and tools
72+### History
264
73
265−| Area | Status | Proved by |
74+| Commit | Date | What |
266| --- | --- | --- |
75| --- | --- | --- |
267−| `tools/golden`: the golden corpus under `urbit eval` | Done | `tools/testdata/selftest` |
76+| 1cb51df | 2026-10-29 | Foundation: the parser's design, the tools, the desks, the vendored base-dev and landscape files, the golden corpus |
268−| `tools/test-arms`: the 62 `test-` arms of the 58 `tests/lib` suites under eval, chosen by name, glob or shard, with `--list`, `--report` and `--update` | Done | `tools/testdata/selftest` |
77+| 15a5545 | 2026-10-29 | The layout pass |
269−| `tools/ship test`: the same arms and one arm per golden case on the fake ship, 753 in all | Done | `tools/testdata/ship-selftest` |
78+| 3c5f50a | 2026-10-29 | The parser |
270−| `tools/check`: every check, with the suites in four cost-balanced shards (`arms-1` to `arms-4`) | Done | `nix flake check` runs the same groups ([flake.nix](../flake.nix)); nothing tests the runner itself |
79+| 7c739b7 | 2026-10-30 | Fixes from two independent audits; milestone 1 done |
271−| `nix build` and `nix flake check`: the four desks, and every check in the Nix sandbox | Done | [flake.nix](../flake.nix) |
80+| 5a4aa73 | 2026-10-30 | `tools/doc-blocks`, after the doc labelled its Jibb blocks |
272−| The tools' own tests: `tools/testdata/selftest` (23 checks) and `tools/testdata/ship-selftest` | Done | the two scripts |
81+| ab797a9 | 2026-10-30 | The 12 grammar decisions of 2026-10-30: four changed the parser, eight confirmed it |
273−| `tools/hoon --no-debug` builds the library without `!:`, for timings | Done | `tools/testdata/selftest` |
82+| aad6ddb | 2026-10-30 | Drop `$?`; `+$` takes union cases below its name |
274−| A UI runtime and the shared host | Missing: the `jibb` desk holds only `desk.bill` and `sys.kelvin` | none |
83+| 1dd92a6 | 2026-10-30 | Begin type inference and Hoon imports |
275−
84+| 51ce4d9 | 2026-10-30 | Extend partial inference and importer, record type and prelude decisions |
276−## Gaps
85+| be6d2a5 | 2026-10-30 | Add atom widening, nested collections and case-local Hoon import fixtures |
277−
86+| 26554ac | 2026-10-30 | Infer an atom constraint, extend the prelude and read example molds through Clay |
278−- Nothing runs yet: with no lowering, backend, UI runtime or jet recognition, programs, pages, stores, islands and prelude gates are checked statically only ([type-todo-full/about.txt](../tests/type-todo-full/about.txt)).
87+| fbeaa83 | 2026-10-30 | Extend atom constraints and nested ordered-map imports; connect Clay types to partial inference |
279−- Requests have no lowering, checked decoding or runtime validation, nothing proves an arbitrary request value watchable, agent and store `ask` receivers take raw nouns, and API request gates don't take Jibb module imports, scry paths, more than one parameter or diff, or a parameter with a fold ([internal.jibb](../jibb-dev/lib/jibb/internal.jibb), [module-import-api-request-reason](../tests/golden/module-import-api-request-reason/)).
88+| 47a1f49 | 2026-10-30 | Read validated Ford imports, widen aura families, and show both sites of selected errors |
280−- Complete private module checking, other API shapes, root API and module kind checking, complete `ask` and `pure` checking and multi-action stores are not implemented (Kinds, Agent APIs and Shared state in [spec/decisions.md](spec/decisions.md)), and the partial report every golden `types.txt` prints declines modules the full check accepts.
89+| bd37989 | 2026-10-30 | Read mark samples and test partial mark imports; reject unproven nested `$^`; preserve atom constraints through aliases |
281−- The `my-app` modules are checked with Hoon types read by `ride`, not through Clay as [prompts/milestone-2.md](prompts/milestone-2.md) asks; the Clay threads run only the partial checker, on synthetic modules ([clay-fixtures/](../tests/clay-fixtures/)).
90+| 2d5deb2 | 2026-10-30 | Default gate-free decimal types, validate named Hoon mold lookup, and isolate fixture failures |
282−- The parser still accepts `[]` and `m()`, which the decisions make errors (where to reject them waits for [review ruling 19](open-questions.md#review-rulings-waiting-for-iko)), and the 13 unasked grammar questions follow [provisional readings](open-questions.md#grammar-questions-never-put-to-the-docs-author).
91+| 1b7dbae | 2026-10-30 | Infer acyclic local definitions and parse case-local Jibb module fixtures |
283−- The prelude's inventory and signatures are not specified yet (question 3 in [open-questions.md](open-questions.md)), most collection operations are unsupported, the UI prelude has no raw-constructor encapsulation or duplicate-attribute check, and themes have no contrast check, rendering or font routing ([types-prelude-ui](../tests/golden/types-prelude-ui/), [jibb-theme](../tests/lib/jibb-theme.hoon)).
92+| 8b9c9ac | 2026-10-30 | Preserve recursive import origins, infer simple local molds, and supply Jibb module sources to the partial checker |
284−- Inference declines many shapes it should decide, and the Partial and Missing rows name them. The largest are `proj` with reordered fields (question 32 in [open-questions.md](open-questions.md)) or in nested contexts, patterns past 64 boolean alternatives or across cases, polymorphic recursion and other mixed gate/value cycles, holes in complex molds, and dynamic `qath` segments.
93+| 529736a | 2026-10-30 | Infer supported library import graphs and guard nested Hoon `$^` in collections |
285−- Some definite errors come out as "unsupported": a child-message mismatch in UI composition, a gate or non-tape list in interpolation, union branch arms whose results are all pending tags, and wrong-owner tree construction ([types-prelude-ui](../tests/golden/types-prelude-ui/), [types-string-interpolation](../tests/golden/types-string-interpolation/), [types-union-patterns-generic](../tests/golden/types-union-patterns-generic/), [jibb-generic-construction](../tests/lib/jibb-generic-construction.hoon)). Diagnostics are coarse in places: one caret per site, record mismatches at the cast or edit, generic messages for imported union molds and repeated faces, and no Hoon case locations ([types-multi-call](../tests/golden/types-multi-call/), [type-import-diagnostic/about.txt](../tests/type-import-diagnostic/about.txt)).
94+| 8bf1b12 | 2026-10-30 | Infer selected record faces and check nested `$^` in static Hoon records |
286−- The Hoon importer leaves other nested unions, nested ordered maps, general disjointness, mark-reader overlap diagnostics, recursive aliases and marks, unfolding and complete import integration unfinished, and peels at most four `$~` wrappers ([compiler.md](compiler.md), [importer/tree.txt](../tests/importer/tree.txt), [jibb-import-default](../tests/lib/jibb-import-default.hoon)).
95+| d8ac47d | 2026-10-30 | Cache library interfaces, preserve imported Hoon record faces, and check nested tagged unions |
287−- No test reaches some stated limits: the 256-step `jrec-fuel`, program `main`'s shared 256-node budget, the 64-definition pending-tag retry behind the buttons error, defaults inside `$~` dependency proofs, and the rejection of re-exported watches and of aliased initializers ([jibb-dev/lib/jibb.hoon](../jibb-dev/lib/jibb.hoon)).
96+| edd9277 | 2026-10-30 | Infer nonrecursive generic mold aliases with lexical parameters |
288−- No test or check measures performance. The timings in [compiler.md](compiler.md) and the library's notes are single runs, the brief's timings of the corpus and the `my-app` desk ([prompts/milestone-2.md](prompts/milestone-2.md)) are not recorded, and neither the tuple payload context nor reader diagnostic replay has a complexity bound.
97+| 4406f6f | 2026-10-30 | Resolve selected contextual tags and check explicit imported unions |
98+| 5c73614 | 2026-10-30 | Print supported named and escaping union types |
99+| 0070584 | 2026-10-30 | Propagate union context through loobean branches, read selected unions in Hoon collections, and add `flit` |
100+| 250564c | 2026-10-30 | Infer selected named generic unions, test Hoon collection wrappers, and add list helpers |
101+| e95ef8f | 2026-10-30 | Bridge selected Hoon unions into partial inference and support generic union aliases |
102+| 56a899f | 2026-10-30 | Infer matching variable types in faced fields and bridge opaque Hoon collections |
103+| 4d45d2f | 2026-10-30 | Resolve selected contextual null literals |
104+| e878edc | 2026-10-30 | Infer complete unit-shaped branches and bridge selected recursive Hoon molds |
105+| 743dfd8 | 2026-10-30 | Propagate union context through unit-shaped branches |
106+| 3f90fa8 | 2026-10-30 | Share a partial prelude interface across module inference |
107+| 29bd39f | 2026-10-30 | Infer contextual list literals and validate prelude parity |
108+| a2a6ef5 | 2026-10-30 | Infer complete list-shaped branches |
109+| 671fe72 | 2026-10-30 | Infer contextual list nulls and cons cells |
110+| 7e69436 | 2026-10-30 | Infer selected self-recursive gates |
111+| 9ab52e8 | 2026-10-30 | Infer recursive branches with closed base types |
112+| d782b45 | 2026-10-30 | Propagate list context and apply settled type decisions |
113+| c7082e0 | 2026-10-30 | Infer multi-argument calls |
114+| 918acbd | 2026-10-30 | Infer recursive gates from their samples first |
115+| 1470d18 | 2026-10-30 | Infer selected prelude list helpers |
116+| 10cbf9c | 2026-10-30 | Infer selected local recursive gates and distinguish reader diagnostics |
117+| 45afb13 | 2026-10-30 | Infer local capital scopes and report direct reader diagnostics |
118+| 054e651 | 2026-10-30 | Report nested reader diagnostics |
119+| 98c19cd | 2026-10-30 | Infer known-aura string interpolation |
120+| ddba633 | 2026-10-30 | Infer top-level mutually recursive gates |
121+| 9f1517e | 2026-10-30 | Infer whole-case union patterns and prelude `turn` |
122+| 9dd35c8 | 2026-10-31 | Match finite boolean refinements of union cases |
123+| 54852d4 | 2026-10-31 | Contextualize tuple calls and infer known record changes |
124+| 0bc5113 | 2026-10-31 | Contextualize record initializers and infer unit construction |
125+| 264a436 | 2026-10-31 | Contextualize unit payloads in casts, calls and nested values |
126+| a140383 | 2026-10-31 | Report missing union tags and infer prelude unit helpers |
127+| d69cc52 | 2026-10-31 | Infer longer cell binder patterns and prelude unit helpers |
128+| ae35005 | 2026-10-31 | Import source-verified tagged Hoon unions |
129+| c8f894a | 2026-10-31 | Report nested missing tags and contextualize union branch results |
130+| ef2ea71 | 2026-10-31 | Import Hoon null singleton cases |
131+| 67f900e | 2026-10-31 | Infer local mutual gates and uncontextualized lists |
132+| 7ff15f1 | 2026-10-31 | Contextualize finite union patterns and record the initial poke decision |
133+| c790a9f | 2026-10-31 | Expose transparent `poke` from the internal prelude |
134+| ef4772a | 2026-10-31 | Bridge imported loobeans and loobean singletons |
135+| ad46655 | 2026-10-31 | Bridge selected imported any-noun molds |
136+| beada10 | 2026-10-31 | Import source-proved Ford mark unions, analyze API paths and infer list helpers |
137+| e28f7be | 2026-10-31 | Diagnose proven non-gate cycles and import Tlon null-payload union cases |
138+| fd2f288 | 2026-10-31 | Infer qualified fields of imported values |
139+| ed9291e | 2026-10-31 | Infer term-headed pairs and function helpers, and import nested named unions |
140+| ad0265e | 2026-10-31 | Infer proven single-case patterns and the prelude command union |
141+| 413b12b | 2026-10-31 | Propagate known result context into generic calls and batch ship deletions |
142+| c690076 | 2026-10-31 | Propagate loobean context, infer predicate helpers, and import named ordered-map operands |
143+| 0bf6178 | 2026-10-31 | Bridge recursive Tlon lists and prepare a private comparison interface |
144+| 4e472b5 | 2026-10-31 | Pass known named unions through polymorphic gates |
145+| e3e184f | 2026-10-31 | Parse type holes, reject duplicate written record fields, and extend partial union inference and imports |
146+| 80e221a | 2026-10-31 | Infer supported annotation holes and prelude list aliases |
147+| ba1fec4 | 2026-10-31 | Add the curried `bond` prelude gate |
148+| 0ea700d | 2026-10-31 | Infer a source-defined recursive `qath` subset and record the explicit `proj` decision |
149+| 75f5952 | 2026-10-31 | Check a subset of explicit `proj` calls and retain their lowering evidence |
150+| cf17925 | 2026-10-31 | Infer supported single-field projections |
151+| 1a891e2 | 2026-10-31 | Infer source-backed addition and decrement without loobean operands; record the watchability decision |
152+| 81af5fd | 2026-10-31 | Preserve public names of identity-generic union aliases and record the `like` decision |
153+| 640a442 | 2026-10-31 | Add the source-backed `like` result mapper and infer supported positional calls |
154+| 445a0a1 | 2026-10-31 | Retain source-backed API path evidence and classify declarations |
155+| f69493d | 2026-10-31 | Derive supported request components from API declarations |
156+| f0f6954 | 2026-10-31 | Analyze supported API helper definitions and declared marks |
157+| 3f55af7 | 2026-10-31 | Define source-backed transparent ask and pure |
158+| ae1ec26 | 2026-10-31 | Prove selected default-wrapped Hoon unions from source |
159+| dde791c | 2026-10-31 | Infer a source-backed request-gate type through ordinary imports |
160+| a1c5f35 | 2026-10-31 | Infer supported multi-path requests and named closed folds |
161+| 911ca0c | 2026-10-31 | Propagate union context, define subscriptions and match literal nouns |
162+| 72acdb3 | 2026-10-31 | Infer selected nested union payloads from context |
163+| 706035c | 2026-10-31 | Analyze gate-free source molds with field witnesses |
164+| This change | 2026-10-31 | Match source-proven gate samples in direct calls |
289
165
290## Checking it
166## Checking it
291
167
292−[Before pushing](development.md#before-pushing) in development.md says how to run every check (`tools/check`; `tools/check --list` prints them), and [The test suites](development.md#the-test-suites) says what each suite checks. The [README](../README.md) gives each tool's commands: the [golden tests](../README.md#golden-tests), the [test suites](../README.md#test-suites), the [fake ship](../README.md#fake-ship) and [Nix](../README.md#building-and-checking-with-nix). `tools/test-arms --shard 2/4 --list` prints the suites of one shard.
168+On a machine set up as [development.md](development.md) says:
169+
170+```
171+tools/golden # 649 cases under urbit eval
172+tools/importer-test # the Hoon importer fixture projection
173+tools/type-import-default-test # default-wrapped source proof golden
174+tools/type-import-test # the importer/checker bridge fixture
175+tools/type-tlon-test # the real Tlon reader/checker fixture
176+tools/type-mark-test # the mark/checker bridge fixture
177+tools/type-poke-test # the source-backed poke/API fixture
178+tools/type-api-evidence-test # API declaration evidence guards
179+tools/type-api-paths-test # partial API path metadata fixture
180+tools/type-hole-guards-test # hole defaulting and API interface guards
181+tools/type-list-alias-test # prelude list-alias guards
182+tools/type-generic-alias-test # generic union alias guards
183+tools/type-positional-face-guards-test # positional sample face guards
184+tools/type-qath-guards-test # qath source and unfolding guards
185+tools/type-ask-guards-test # ask source and bootstrap guards
186+tools/type-proj-guards-test # projection evidence and scope guards
187+tools/type-module-scope-test # module and prelude scope fixture
188+tools/hoon check-spans-test # prints <<>> when the span checker works
189+tools/testdata/selftest # the tools themselves
190+tools/doc-blocks docs/spec # the doc's examples are golden cases
191+tools/ship start
192+tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
193+tools/ship test # the same 649 cases as -test arms on the ship
194+tools/testdata/ship-selftest
195+tools/testdata/clay-fixtures-selftest # scratch fixture cleanup without a ship
196+tools/ship check-commit # |commit stores .jibb files
197+tools/clay-fixtures # example /sur files and marks build through Clay
198+```
199+
200+## What milestone 1 leaves to later milestones
201+
202+- Errors carry a start only. Spans keep each node's end so that milestone 2's type errors can underline both conflicting sites with excerpts (library section 1).
203+- The parser accepts forms for the checker to judge: `[]`, `[a]`, `m()`, `!! a`, and the module kinds. `[]` and `m()` have since been decided to be errors, and `[a]` is `a`; the parser has not changed. The Grammar's buttons example parses, though the doc marks it as a type error.
204+- Grammar questions the doc's author hasn't been asked follow the readings in [open-questions.md](open-questions.md).
flake.lockdeleted−41
@@ -1,41 +0,0 @@
1−{
2− "nodes": {
3− "nixpkgs": {
4− "locked": {
5− "lastModified": 1793540411,
6− "narHash": "sha256-us2GRWGXbOQpN1blyJGvmdx+g4bv9GoFYq5iiOHRiZ8=",
7− "rev": "0bb2eedc20e4739f29e8045034f2828ad7054f8f",
8− "type": "tarball",
9− "url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1106360.0bb2eedc20e4/nixexprs.tar.xz"
10− },
11− "original": {
12− "type": "tarball",
13− "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"
14− }
15− },
16− "root": {
17− "inputs": {
18− "nixpkgs": "nixpkgs",
19− "urbit-tools": "urbit-tools"
20− }
21− },
22− "urbit-tools": {
23− "flake": false,
24− "locked": {
25− "lastModified": 1750452841,
26− "narHash": "sha256-2IoU8tGR92g8SaoDZdMxbzh2VLr/63XUCbrPS3nestg=",
27− "ref": "refs/heads/master",
28− "rev": "c9c91ce142cfe85edbed320138f21c7213aceaab",
29− "revCount": 19,
30− "type": "git",
31− "url": "https://github.com/urbit/tools"
32− },
33− "original": {
34− "type": "git",
35− "url": "https://github.com/urbit/tools"
36− }
37− }
38− },
39− "root": "root",
40− "version": 7
41−}
flake.nixdeleted−193
@@ -1,193 +0,0 @@
1−{
2− description = "Jibb, a UI language for Urbit: its desks, and the repo's checks";
3−
4− inputs = {
5− # A channel tarball rather than github:NixOS/nixpkgs, so the flake
6− # also fetches where GitHub's archive downloads are blocked, as in a
7− # Claude cloud container. flake.lock pins the exact release.
8− # nixos-unstable has vere 4.6, which the tools were written against.
9− nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz";
10− # click, which tools/ship formats its requests to the ship with.
11− urbit-tools = {
12− url = "git+https://github.com/urbit/tools";
13− flake = false;
14− };
15− };
16−
17− outputs = { self, nixpkgs, urbit-tools }:
18− let
19− # The platforms nixpkgs builds vere for.
20− systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" ];
21− forSystems = f: nixpkgs.lib.genAttrs systems
22− (system: f nixpkgs.legacyPackages.${system});
23− inherit (nixpkgs) lib;
24− fs = lib.fileset;
25−
26− # What the desks are assembled from, and the tools that assemble
27− # them and compile their libraries.
28− deskFiles = fs.unions [
29− ./jibb
30− ./jibb-dev
31− ./my-app
32− ./vendor
33− ./tests
34− ./tools/ship
35− ./tools/golden_case.py
36− ./tools/hoon
37− ./tools/urbit_eval.py
38− ./tools/noun.py
39− ];
40− # What the checks read: the desks' files, the tools and the doc's
41− # tabs, but not the other docs, so editing those reruns nothing.
42− checkFiles = fs.unions [ deskFiles ./tools ./docs/spec ];
43− source = fileset: fs.toSource { root = ./.; inherit fileset; };
44−
45− perSystem = pkgs:
46− let
47− inherit (pkgs) python3 urbit;
48− isLinux = pkgs.stdenv.hostPlatform.isLinux;
49−
50− click = pkgs.stdenvNoCC.mkDerivation {
51− pname = "click";
52− version = "0-unstable-${builtins.substring 0 8 urbit-tools.lastModifiedDate}";
53− src = urbit-tools;
54− nativeBuildInputs = [ pkgs.makeWrapper ];
55− buildInputs = [ pkgs.bash ];
56− installPhase = ''
57− runHook preInstall
58− # click runs click-format from its own folder.
59− install -Dm755 -t $out/libexec/click \
60− pkg/click/click pkg/click/click-format
61− makeWrapper $out/libexec/click/click $out/bin/click \
62− --prefix PATH : ${lib.makeBinPath [ pkgs.coreutils pkgs.gnused ]} \
63− --prefix PATH : ${pkgs.netcat}/bin
64− runHook postInstall
65− '';
66− meta = {
67− description = "Thin client for a running Urbit ship's conn.sock";
68− homepage = "https://github.com/urbit/tools";
69− license = lib.licenses.mit;
70− mainProgram = "click";
71− };
72− };
73−
74− # The brass pill from the urbit/urbit commit vendor/ is copied
75− # from (vendor/SOURCES.txt). GitHub serves it from Git LFS.
76− pill = pkgs.fetchurl {
77− name = "brass.pill";
78− url = "https://media.githubusercontent.com/media/urbit/urbit/50c7f5239610fc72263df7aa99b4d171cfe9d408/bin/brass.pill";
79− hash = "sha256-tLq9FOnxrL20IbPDHCFe5jetZpG344K5nG/YmR5iNwg=";
80− };
81−
82− # A freshly booted fake ~zod: the pier itself. Booting takes
83− # about half a minute; the ship checks start a copy of it.
84− fakezod = pkgs.runCommand "fakezod" {
85− nativeBuildInputs = [ urbit ];
86− } ''
87− urbit -F zod -B ${pill} -t -x -c zod
88− test -d zod/.urb/log
89− mv zod $out
90− '';
91−
92− # The desks, as tools/ship assembles them for the ship:
93− # $out/my-app, $out/jibb, $out/jibb-dev, the test desk, and
94− # $out/jibb-fixtures, for the Clay fixtures. The
95− # check phase compiles the two libraries under urbit eval.
96− desks = pkgs.stdenvNoCC.mkDerivation {
97− # No version in the name, so a commit that changes no desk
98− # file reuses the last build.
99− name = "jibb-desks";
100− src = source deskFiles;
101− nativeBuildInputs = [ python3 ];
102− nativeCheckInputs = [ urbit ];
103− dontConfigure = true;
104− buildPhase = ''
105− runHook preBuild
106− patchShebangs tools > /dev/null
107− tools/ship assemble --out desks
108− runHook postBuild
109− '';
110− doCheck = true;
111− checkPhase = ''
112− runHook preCheck
113− for lib in jibb jibb-import; do
114− echo "compiling $lib.hoon"
115− tools/hoon --lib desks/jibb-dev/lib/$lib.hoon '~'
116− done
117− runHook postCheck
118− '';
119− installPhase = ''
120− runHook preInstall
121− mv desks $out
122− runHook postInstall
123− '';
124− # The files are the desks' as they are: nothing to patch.
125− dontFixup = true;
126− meta = {
127− description = "The Jibb desks: my-app, jibb, jibb-dev and jibb-fixtures";
128− platforms = systems;
129− };
130− };
131−
132− # A check: tools/check run on the repo with the given arguments.
133− check = name: args: extra: pkgs.stdenvNoCC.mkDerivation ({
134− name = "jibb-check-${name}";
135− src = source checkFiles;
136− nativeBuildInputs = [ python3 urbit ];
137− dontConfigure = true;
138− dontInstall = true;
139− dontFixup = true;
140− buildPhase = ''
141− runHook preBuild
142− patchShebangs tools > /dev/null
143− mkdir $out
144− tools/check ${args} --logs $out
145− runHook postBuild
146− '';
147− } // extra);
148−
149− # Every check that needs only urbit and Python, at once.
150− evalChecks = check "eval" "--group eval -j $NIX_BUILD_CORES" { };
151−
152− # The checks that need a ship, on a writable copy of fakezod.
153− shipChecks = check "ship" "--group ship" {
154− preBuild = ''
155− cp -r ${fakezod} $TMPDIR/zod
156− chmod -R u+w $TMPDIR/zod
157− export JIBB_PIER=$TMPDIR/zod
158− export JIBB_CLICK=${lib.getExe click}
159− '';
160− # A failed run shows the end of the ship's log too.
161− failureHook = ''
162− echo "the end of the ship's log, $TMPDIR/zod.log:"
163− tail -n 100 $TMPDIR/zod.log || true
164− '';
165− };
166− in
167− {
168− packages = {
169− inherit desks click;
170− default = desks;
171− } // lib.optionalAttrs isLinux { inherit fakezod; };
172−
173− checks = {
174− inherit desks;
175− eval = evalChecks;
176− } // lib.optionalAttrs isLinux { ship = shipChecks; };
177−
178− devShells.default = pkgs.mkShell {
179− packages = [ python3 urbit click ];
180− # tools/ship looks for click here; the pier stays
181− # /root/urbit/zod unless $JIBB_PIER says otherwise.
182− JIBB_CLICK = lib.getExe click;
183− };
184− };
185−
186− all = forSystems perSystem;
187− in
188− {
189− packages = lib.mapAttrs (_: s: s.packages) all;
190− checks = lib.mapAttrs (_: s: s.checks) all;
191− devShells = lib.mapAttrs (_: s: s.devShells) all;
192− };
193−}
jibb-dev/lib/jibb-import.hoon+549−181
@@ -47,7 +47,7 @@
47 ==
47 ==
48+$ import-diagnostic
48+$ import-diagnostic
49 $% [%ok value=imported]
49 $% [%ok value=imported]
50− [%invalid code=?(%aura %core %overlap) message=@t]
50+ [%invalid code=?(%aura %core) message=@t]
51 [%unsupported message=@t]
51 [%unsupported message=@t]
52 ==
52 ==
53+$ signatures (list [name=term code=hoon])
53+$ signatures (list [name=term code=hoon])
@@ -132,35 +132,6 @@
132 =/ rest $(cases t.cases, tags [u.tag tags])
132 =/ rest $(cases t.cases, tags [u.tag tags])
133 ?~ rest ~
133 ?~ rest ~
134 `[[u.tag i.cases] u.rest]
134 `[[u.tag i.cases] u.rest]
135−
136−::
137−:: Bound the new $? branch screen independently of the existing $% path.
138−:: Count raw noun nodes across all cases, and cap pairwise tag comparisons.
139−++ bounded-no-spec-unions
140− |= [h=* fuel=@ud]
141− ^- (unit @ud)
142− ?: =(fuel 0) ~
143− =. fuel (dec fuel)
144− ?@ h `fuel
145− ?: ?=([%bckt ^ ^] h) ~
146− ?: ?=([%bcwt [^ [^ *]]] h) ~
147− ?: ?=([%bccn [^ [^ *]]] h) ~
148− =/ left=(unit @ud) $(h -.h)
149− ?~ left ~
150− $(h +.h, fuel u.left)
151−++ tagged-bounded-cases
152− |= [cases=(list spec) tags=(list @) fuel=@ud left=@ud]
153− ^- (unit (list tagged-case))
154− ?~ cases `~
155− ?: =(left 0) ~
156− =/ remaining=(unit @ud) (bounded-no-spec-unions i.cases fuel)
157− ?~ remaining ~
158− =/ tag=(unit @) (tagged-head i.cases)
159− ?~ tag ~
160− ?: (lien tags |=(x=@ =(x u.tag))) ~
161− =/ rest $(cases t.cases, tags [u.tag tags], fuel u.remaining, left (dec left))
162− ?~ rest ~
163− `[[u.tag i.cases] u.rest]
164::
135::
165:: Benign source annotations have different typed representations on
136:: Benign source annotations have different typed representations on
166:: Clay and under eval. Inspect the wrapper as a noun, and validate the
137:: Clay and under eval. Inspect the wrapper as a noun, and validate the
@@ -199,19 +170,11 @@
199 ?~ found ~
170 ?~ found ~
200 =/ body=(unit spec) (tagged-default-union u.found 4)
171 =/ body=(unit spec) (tagged-default-union u.found 4)
201 ?~ body ~
172 ?~ body ~
202− ?- u.body
203− [%bccn *]
173+ ?. ?=([%bccn *] u.body) ~
204− =/ cases=(list spec) p.u.body
205− ?~ cases ~
206− ?~ t.cases ~
207− (tagged-cases cases ~)
208− [%bcwt *]
209− =/ cases=(list spec) p.u.body
174+ =/ cases=(list spec) p.u.body
210− ?~ cases ~
175+ ?~ cases ~
211− ?~ t.cases ~
176+ ?~ t.cases ~
212− (tagged-bounded-cases cases ~ 4.096 128)
177+ (tagged-cases cases ~)
213− * ~
214− ==
215::
178::
216:: Source proof for dependencies of an explicitly tagged union. Only
179:: Source proof for dependencies of an explicitly tagged union. Only
217:: simple local molds, standard collections and distinct term enums are
180:: simple local molds, standard collections and distinct term enums are
@@ -383,140 +346,6 @@
383 ?. ?=([%cell [%atom %tas [~ @]] *] i.ys) ~
346 ?. ?=([%cell [%atom %tas [~ @]] *] i.ys) ~
384 ?. =(tag.i.xs u.value.head.i.ys) ~
347 ?. =(tag.i.xs u.value.head.i.ys) ~
385 $(xs t.xs, ys t.ys)
348 $(xs t.xs, ys t.ys)
386−
387−::
388−:: Unlike the disjoint-reader fallback, source overlap may have repeated
389−:: tags. Bound both raw case traversal and the number of pair attempts.
390−++ overlap-source-cases
391− |= [cases=(list spec) fuel=@ud left=@ud]
392− ^- (unit (list tagged-case))
393− ?~ cases `~
394− ?: =(left 0) ~
395− =/ remaining=(unit @ud) (bounded-no-spec-unions i.cases fuel)
396− ?~ remaining ~
397− =/ tag=(unit @) (tagged-head i.cases)
398− ?~ tag ~
399− =/ rest $(cases t.cases, fuel u.remaining, left (dec left))
400− ?~ rest ~
401− `[[u.tag i.cases] u.rest]
402−++ overlap-repeated-tag
403− |= cases=(list tagged-case)
404− ^- ?
405− ?~ cases |
406− ?: (lien t.cases |=(c=tagged-case =(tag.c tag.i.cases))) &
407− $(cases t.cases)
408−++ overlap-projections-match
409− |= [xs=(list tagged-case) ys=(list imported)]
410− ^- ?
411− ?~ xs ?=(~ ys)
412− ?~ ys |
413− ?. ?=([%cell [%atom %tas [~ @]] *] i.ys) |
414− ?. =(tag.i.xs u.value.head.i.ys) |
415− $(xs t.xs, ys t.ys)
416−++ overlap-source-witness
417− |= [module=term name=term cor=type]
418− ^- ?
419− ?. ?=([%core *] cor) |
420− =/ selected=(unit hoon) (local-arm-source cor name)
421− ?~ selected |
422− =/ shape=(unit spec) (local-mold-spec u.selected name)
423− ?~ shape |
424− =/ body=(unit spec) (tagged-default-union u.shape 4)
425− ?~ body |
426− ?. ?=([%bcwt *] u.body) |
427− =/ cases=(unit (list tagged-case)) (overlap-source-cases p.u.body 4.096 128)
428− ?~ cases |
429− ?. (overlap-repeated-tag u.cases) |
430− ?. ?=(^ (safe-source-tagged-fuel-mode u.cases cor ~[name] 4.096 |)) |
431− =/ tried=(each (list type) tang)
432− (mule |.((turn u.cases |=(c=tagged-case (~(play ut cor) [%kttr branch.c])))))
433− ?. ?=([%& *] tried) |
434− =/ projected=(each (list imported) tang)
435− (mule |.((turn p.tried |=(t=type (walk module t catalog ~ `cor)))))
436− ?. ?=([%& *] projected) |
437− ?^ (first-bads p.projected) |
438− ?. (overlap-projections-match u.cases p.projected) |
439− =/ witness=(unit overlap-proof-result) (overlap-case-pairs p.projected 4.096)
440− ?~ witness |
441− found.u.witness
442−::
443−:: Positive overlap evidence only: false means no proof, not disjointness.
444−:: Fuel is shared across all examined nodes and sibling alternatives.
445−+$ overlap-proof-result [found=? left=@ud]
446−++ overlap-known-atom
447− |= aura=term
448− ^- ?
449− (lien `(list term)`~[%t %tas %ud %f] |=(n=term =(n aura)))
450−++ overlap-inhabited-list
451− |= [xs=(list imported) fuel=@ud]
452− ^- (unit overlap-proof-result)
453− ?~ xs `[| fuel]
454− ?: =(0 fuel) ~
455− =/ one=(unit overlap-proof-result) (overlap-inhabited i.xs (dec fuel))
456− ?~ one ~
457− ?: found.u.one one
458− $(xs t.xs, fuel left.u.one)
459−++ overlap-inhabited
460− |= [x=imported fuel=@ud]
461− ^- (unit overlap-proof-result)
462− ?: =(0 fuel) ~
463− =. fuel (dec fuel)
464− ?- x
465− [%noun *] `[& fuel]
466− [%void *] `[| fuel]
467− [%atom *] `[|(?=(^ value.x) (overlap-known-atom aura.x)) fuel]
468− [%face *] $(x body.x)
469− [%named *] $(x body.x)
470− [%fork *] (overlap-inhabited-list cases.x fuel)
471− [%cell *]
472− =/ a=(unit overlap-proof-result) $(x head.x)
473− ?~ a ~
474− ?. found.u.a a
475− $(x tail.x, fuel left.u.a)
476− * `[| fuel]
477− ==
478−++ overlap-pair-list
479− |= [xs=(list imported) y=imported fuel=@ud]
480− ^- (unit overlap-proof-result)
481− ?~ xs `[| fuel]
482− ?: =(0 fuel) ~
483− =/ p=(unit overlap-proof-result) (overlap-pair i.xs y (dec fuel))
484− ?~ p ~
485− ?: found.u.p p
486− $(xs t.xs, fuel left.u.p)
487−++ overlap-pair
488− |= [a=imported b=imported fuel=@ud]
489− ^- (unit overlap-proof-result)
490− ?: =(0 fuel) ~
491− =. fuel (dec fuel)
492− ?: ?=([%face *] a) $(a body.a)
493− ?: ?=([%face *] b) $(b body.b)
494− ?: ?=([%named *] a) $(a body.a)
495− ?: ?=([%named *] b) $(b body.b)
496− ?: ?=([%fork *] a) (overlap-pair-list cases.a b fuel)
497− ?: ?=([%fork *] b) (overlap-pair-list cases.b a fuel)
498− ?: ?=([%noun *] a) (overlap-inhabited b fuel)
499− ?: ?=([%noun *] b) (overlap-inhabited a fuel)
500− ?: &(?=([%cell *] a) ?=([%cell *] b))
501− =/ p=(unit overlap-proof-result) $(a head.a, b head.b)
502− ?~ p ~
503− ?. found.u.p p
504− $(a tail.a, b tail.b, fuel left.u.p)
505− ?. &(?=([%atom *] a) ?=([%atom *] b)) `[| fuel]
506− ?^ value.a
507− ?^ value.b `[=(u.value.a u.value.b) fuel]
508− `[&(=(u.value.a 0) (overlap-known-atom aura.b)) fuel]
509− ?^ value.b `[&(=(u.value.b 0) (overlap-known-atom aura.a)) fuel]
510− `[&((overlap-known-atom aura.a) (overlap-known-atom aura.b)) fuel]
511−++ overlap-case-pairs
512− |= [xs=(list imported) fuel=@ud]
513− ^- (unit overlap-proof-result)
514− ?~ xs `[| fuel]
515− ?: =(0 fuel) ~
516− =/ p=(unit overlap-proof-result) (overlap-pair-list t.xs i.xs (dec fuel))
517− ?~ p ~
518− ?: found.u.p p
519− $(xs t.xs, fuel left.u.p)
520::
349::
521:: +read-mold-in: accept the /sur core as provenance. The core must be
350:: +read-mold-in: accept the /sur core as provenance. The core must be
522:: built against zuse or validated Ford imports, and its selected arm
351:: built against zuse or validated Ford imports, and its selected arm
@@ -532,8 +361,6 @@
532 [%| (crip "Hoon mold `{(trip name)}` is not declared")]
361 [%| (crip "Hoon mold `{(trip name)}` is not declared")]
533 ?. =(typ (~(play ut cor) (ream (cat 3 '*' name))))
362 ?. =(typ (~(play ut cor) (ream (cat 3 '*' name))))
534 [%| 'Hoon module provenance does not match the selected mold']
363 [%| 'Hoon module provenance does not match the selected mold']
535− =/ overlap=(each ? tang) (mule |.((overlap-source-witness module name cor)))
536− ?: &(?=(%& -.overlap) p.overlap) [%| 'Hoon union cases overlap']
537 =/ result (read-with module name typ [~ cor])
364 =/ result (read-with module name typ [~ cor])
538 ?: ?=([%& *] result) result
365 ?: ?=([%& *] result) result
539 =/ fallback=(each (unit (each imported @t)) tang)
366 =/ fallback=(each (unit (each imported @t)) tang)
@@ -634,8 +461,6 @@
634 [%unsupported p.result]
461 [%unsupported p.result]
635 =/ selected=(each type tang) (mule |.((~(play ut cor) (ream (cat 3 '*' name)))))
462 =/ selected=(each type tang) (mule |.((~(play ut cor) (ream (cat 3 '*' name)))))
636 ?. ?=(%& -.selected) [%unsupported p.result]
463 ?. ?=(%& -.selected) [%unsupported p.result]
637− =/ overlap=(each ? tang) (mule |.((overlap-source-witness module name cor)))
638− ?: &(?=(%& -.overlap) p.overlap) [%invalid %overlap 'Hoon union cases overlap']
639 =/ again=(each imported tang) (mule |.((walk module p.selected catalog ~ [~ cor])))
464 =/ again=(each imported tang) (mule |.((walk module p.selected catalog ~ [~ cor])))
640 ?. ?=(%& -.again) [%unsupported p.result]
465 ?. ?=(%& -.again) [%unsupported p.result]
641 =/ evidence=(unit import-diagnostic) (first-invalid p.again)
466 =/ evidence=(unit import-diagnostic) (first-invalid p.again)
@@ -1717,6 +1542,127 @@
1717 ?~ first $(xs t.xs)
1542 ?~ first $(xs t.xs)
1718 first
1543 first
1719::
1544::
1545+:: +fixture-test: shared golden expectations for eval and the ship.
1546+:: A synthetic hold whose first $^ branch cannot be evaluated. It tests
1547+:: that a failed branch probe is reported rather than crashing the host.
1548+++ bad-branch-fixture
1549+ ^- type
1550+ [%hold -:!>(..zuse) [%tsls [%note [%made %bad ~] [%wtcl [%dtwt [%$ 12]] [%wing ~[%jibb-no-such-branch-name]] [%rock %n 0]]] [%$ 1]]]
1551+::
1552+++ fixture-test
1553+ |= [small=@t epic=@t presence=@t docs=@t shadow=@t]
1554+ ^- (list @t)
1555+ =/ sc=type -:(ride -:!>(..zuse) small)
1556+ =/ ec=type -:(ride -:!>(..zuse) epic)
1557+ =/ pc=type -:(ride -:!>(..zuse) presence)
1558+ =/ dc=type -:(ride -:!>(..zuse) docs)
1559+ =/ hc=type -:(ride -:!>(..zuse) shadow)
1560+ =/ sample
1561+ |= name=term
1562+ (read-mold-in %small name (~(play ut sc) (ream (cat 3 '*' name))) sc)
1563+ =/ tlon
1564+ |= name=term
1565+ (read-mold-in %epic name (~(play ut ec) (ream (cat 3 '*' name))) ec)
1566+ =/ present
1567+ |= name=term
1568+ (read-mold-in %presence name (~(play ut pc) (ream (cat 3 '*' name))) pc)
1569+ =/ shad
1570+ |= name=term
1571+ (read-mold-in %shadow name (~(play ut hc) (ream (cat 3 '*' name))) hc)
1572+ =/ docs-type
1573+ |= name=term
1574+ (read-mold-in %docs name (~(play ut dc) (ream (cat 3 '*' name))) dc)
1575+ =/ errors=(list @t) ~
1576+ =/ expect-action=imported
1577+ [%fork ~[[%cell [%atom %tas [~ %add]] [%face %text [%atom %t ~]]] [%cell [%atom %tas [~ %remove]] [%face %id [%atom %ud ~]]]]]
1578+ =/ errors ?: =((sample %action) [%& expect-action]) errors
1579+ ['union cases and faces' errors]
1580+ =/ expect-map=imported
1581+ [%apply %map ~[[%atom %ud ~] [%cell [%face %id [%atom %ud ~]] [%face %text [%atom %t ~]]]]]
1582+ =/ errors ?: =((sample %items) [%& expect-map]) errors
1583+ ['map and its arguments' errors]
1584+ =/ expect-optional=imported
1585+ [%fork ~[[%cell [%face %name [%atom %t ~]] [%face %stamp [%atom %ud ~]]] [%atom %ud ~]]]
1586+ =/ errors ?: =((sample %optional) [%& expect-optional]) errors
1587+ ['atom-or-cell union' errors]
1588+ =/ expect-containers=imported
1589+ [%cell [%apply %set ~[[%atom %ud ~]]] [%cell [%apply %qeu ~[[%atom %ud ~]]] [%cell [%apply %list ~[[%atom %t ~]]] [%apply %unit ~[[%atom %ud ~]]]]]]
1590+ =/ errors ?: =((sample %containers) [%& expect-containers]) errors
1591+ ['set queue list and unit' errors]
1592+ =/ expect-chain=imported
1593+ [%fork ~[[%cell [%face %value [%atom %ud ~]] [%face %next [%ref %small %chain]]] [%atom %n [~ 0]]]]
1594+ =/ errors ?: =((sample %chain) [%& expect-chain]) errors
1595+ ['recursive reference' errors]
1596+ =/ expect-jar=imported [%apply %jar ~[[%atom %ud ~] [%atom %t ~]]]
1597+ =/ expect-jug=imported [%apply %jug ~[[%atom %ud ~] [%atom %t ~]]]
1598+ =/ errors ?: =((sample %jar-test) [%& expect-jar]) errors
1599+ ['jar name and arguments' errors]
1600+ =/ errors ?: =((sample %jug-test) [%& expect-jug]) errors
1601+ ['jug name and arguments' errors]
1602+ =/ expect-nested-jar=imported [%face %field [%apply %jar ~[[%atom %ud ~] [%atom %t ~]]]]
1603+ =/ errors ?: =((sample %nested-jar) [%& expect-nested-jar]) errors
1604+ ['nested jar is preserved' errors]
1605+ =/ expect-paired=imported
1606+ [%cell [%face %values [%apply %jar ~[[%atom %ud ~] [%atom %t ~]]]] [%face %cache [%apply %jug ~[[%atom %ud ~] [%atom %t ~]]]]]
1607+ =/ errors ?: =((sample %paired-aliases) [%& expect-paired]) errors
1608+ ['multiple collection aliases are preserved' errors]
1609+ =/ expect-nested-alias=imported
1610+ [%apply %jar ~[[%atom %ud ~] [%apply %jug ~[[%atom %ud ~] [%atom %t ~]]]]]
1611+ =/ errors ?: =((sample %nested-alias) [%& expect-nested-alias]) errors
1612+ ['nested collection arguments preserve names' errors]
1613+ =/ expect-mop=imported [%apply %mop ~[[%atom %ud ~] [%atom %t ~]]]
1614+ =/ errors ?: =((sample %mop-test) [%& expect-mop]) errors
1615+ ['ordered map name and arguments' errors]
1616+ =/ expect-nested-mop=imported
1617+ [%cell [%face %table expect-mop] [%face %other [%atom %ud ~]]]
1618+ =/ errors ?: =((sample %nested-mop) [%& expect-nested-mop]) errors
1619+ ['ordered map field is preserved' errors]
1620+ =/ expect-mixed=imported
1621+ [%cell [%face %a expect-mop] [%face %b [%apply %list ~[[%atom %ud ~]]]]]
1622+ =/ errors ?: =((sample %mixed-mop) [%& expect-mixed]) errors
1623+ ['static list sibling is preserved' errors]
1624+ =/ errors ?: =((sample %named-mop) [%| 'a nested Hoon mop needs source-aware import']) errors
1625+ ['non-atom argument remains unsupported' errors]
1626+ =/ errors ?: =((sample %mop-list) [%| 'a nested Hoon mop needs source-aware import']) errors
1627+ ['ordered map in a list remains unsupported' errors]
1628+ =/ errors ?: =((sample %signed) [%| 'signed and float auras cannot be imported']) errors
1629+ ['signed aura rejected' errors]
1630+ =/ errors ?: =((sample %float) [%| 'signed and float auras cannot be imported']) errors
1631+ ['float aura rejected' errors]
1632+ =/ errors ?: =((sample %gate-test) [%| 'cores and gates cannot be imported']) errors
1633+ ['gate rejected' errors]
1634+ =/ errors ?: =((read-mold %std %vase (~(play ut -:!>(..zuse)) (ream '*vase'))) [%| 'vases cannot be imported']) errors
1635+ ['vase rejected' errors]
1636+ =/ expect-valid=imported
1637+ [%fork ~[[%cell [%face %x [%atom %ud ~]] [%face %y [%atom %ud ~]]] [%atom %ud ~]]]
1638+ =/ errors ?: =((sample %valid-cell) [%& expect-valid]) errors
1639+ ['disjoint cell union' errors]
1640+ =/ errors ?: =((sample %invalid-cell) [%| 'Hoon $^ union disjointness could not be verified']) errors
1641+ ['overlapping cell union is rejected' errors]
1642+ =/ errors ?: =((shad %mn) [%| 'Hoon collection provenance is unavailable or shadowed']) errors
1643+ ['local mop shadow in a field is rejected' errors]
1644+ =/ errors ?: =((shad %mm) [%| 'Hoon collection provenance is unavailable or shadowed']) errors
1645+ ['local mop shadow is rejected' errors]
1646+ =/ errors ?: =((shad %aa) [%| 'Hoon collection provenance is unavailable or shadowed']) errors
1647+ ['local jar shadow is rejected' errors]
1648+ =/ errors ?: =((shad %bb) [%| 'Hoon collection provenance is unavailable or shadowed']) errors
1649+ ['local jug shadow in a field is rejected' errors]
1650+ =/ errors ?: =((read-mold %small %jar-test (~(play ut sc) (ream '*jar-test'))) [%| 'Hoon collection provenance is unavailable or shadowed']) errors
1651+ ['missing provenance is rejected' errors]
1652+ =/ expect-timing=imported
1653+ [%cell [%face %since [%atom %da ~]] [%face %timeout [%apply %unit ~[[%atom %dr ~]]]]]
1654+ =/ errors ?: =((present %timing) [%& expect-timing]) errors
1655+ ['Tlon presence timing' errors]
1656+ =/ errors ?: =((read-mold %external %bad bad-branch-fixture) [%| 'a Hoon $^ union needs a source-level disjointness check']) errors
1657+ ['failed branch expansion is reported' errors]
1658+ =/ expect-saga=imported
1659+ [%fork ~[[%cell [%atom %tas [~ %chi]] [%atom %n [~ 0]]] [%cell [%atom %tas [~ %lev]] [%atom %n [~ 0]]] [%cell [%atom %tas [~ %dex]] [%face %ver [%atom %ud ~]]]]]
1660+ =/ errors ?: =((tlon %saga) [%& expect-saga]) errors
1661+ ['Tlon saga union' errors]
1662+ =/ errors ?: =((tlon %epic) [%& [%atom %ud ~]]) errors
1663+ ['Tlon epic atom' errors]
1664+ errors
1665+
1720:: A compact diagnostic projection for importer golden files. This is
1666:: A compact diagnostic projection for importer golden files. This is
1721:: not the Jibb type printer: it exposes constants and recursive refs.
1667:: not the Jibb type printer: it exposes constants and recursive refs.
1722++ show-import
1668++ show-import
@@ -1762,4 +1708,426 @@
1762 [%invalid *] "invalid/{(trip code.result)}: {(trip message.result)}"
1708 [%invalid *] "invalid/{(trip code.result)}: {(trip message.result)}"
1763 [%unsupported *] "unsupported: {(trip message.result)}"
1709 [%unsupported *] "unsupported: {(trip message.result)}"
1764 ==
1710 ==
1711+::
1712+:: Clay includes debug spans around source nodes. Reproduce that
1713+:: shape without Clay so the same regression runs under eval and -test.
1714+++ decorate-union-source
1715+ |= h=hoon
1716+ ^- hoon
1717+ =/ at=spot [/tests/importer/synthetic/hoon [[1 1] [1 2]]]
1718+ ?^ -.h [%dbug at [$(h -.h) $(h +.h)]]
1719+ ?+ h [%dbug at h]
1720+ [%note *] [%dbug at h(q $(h q.h))]
1721+ [%ktts *] [%dbug at h(q $(h q.h))]
1722+ [%wtcl *] [%dbug at h(q $(h q.h), r $(h r.h))]
1723+ ==
1724+::
1725+++ debug-union-fixture
1726+ |= [cor=type name=term]
1727+ ^- (each imported @t)
1728+ =/ typ=type (~(play ut cor) (ream (cat 3 '*' name)))
1729+ ?. ?=([%hold *] typ) [%| 'synthetic union is not a hold']
1730+ =/ original=hoon q.typ
1731+ ?. ?=([%tsls [%note * *] *] original) [%| 'synthetic union source is unavailable']
1732+ =/ source=hoon original(q.p (decorate-union-source q.p.original))
1733+ (read-mold %small name typ(q source))
1734+::
1735+:: Test debug metadata at the spec boundary without assuming that the
1736+:: eval version of Hoon's spec mold itself includes Clay's %dbug tag.
1737+++ debug-spec-fixture
1738+ ^- tape
1739+ =/ location=* [/tests/importer/synthetic/hoon [[1 1] [1 2]]]
1740+ =/ wrapped=* [%dbug location [%leaf %tas %x]]
1741+ =/ got=(unit *) (source-gist-tail wrapped)
1742+ ?~ got "debug wrapper missing"
1743+ =/ leaf=(each spec tang) (mule |.(;;(spec u.got)))
1744+ ?. ?=([%& [%leaf %tas %x]] leaf) "debug leaf not recovered"
1745+ =/ branch=spec [%bccl ~[p.leaf [%base [%atom %t]]]]
1746+ ?^ (tagged-cases ~[branch branch] ~) "duplicate tags accepted"
1747+ =/ broken=(unit *) (source-gist-tail [%dbug location 42])
1748+ ?~ broken "debug wrapper missing"
1749+ =/ invalid=(each spec tang) (mule |.(;;(spec u.broken)))
1750+ ?: ?=(%& -.invalid) "malformed spec accepted"
1751+ "valid wrapper; duplicate and malformed rejected"
1752+::
1753+:: The same named-operand call with Clay-style source-location wrappers.
1754+++ debug-mop-fixture
1755+ |= cor=type
1756+ ^- tape
1757+ =/ typ=type (~(play ut cor) (ream '*mop-wing-valid'))
1758+ ?> ?=([%hold *] typ)
1759+ =/ original=hoon q.typ
1760+ ?> ?=([%tsls [%note * *] *] original)
1761+ =/ body=hoon q.p.original
1762+ ?> ?=([%cncl *] body)
1763+ ?> ?=([%tsgr *] p.body)
1764+ =/ b=hoon q.p.body
1765+ ?> ?=([%cncl *] b)
1766+ =/ call=hoon p.b
1767+ ?> ?=([%cncl *] call)
1768+ ?> ?=([* [* ~]] q.call)
1769+ =/ at=spot [/tests/importer/synthetic/hoon [[1 1] [1 2]]]
1770+ =/ inner=hoon call(p [%dbug at p.call], q ~[[%dbug at i.q.call] [%dbug at i.t.q.call]])
1771+ =/ outer=hoon body(p p.body(q b(p [%dbug at inner])))
1772+ =/ mixed=hoon body(p p.body(q b(p inner)))
1773+ =/ multi=hoon body(p p.body(q b(p call(p [%dbug at [%wing ~[%one %two]]]))))
1774+ =/ plain=(unit [key=spec value=spec]) (mop-specs body)
1775+ ?~ plain "unwrapped mop not recognized"
1776+ ?. =((mop-specs [%dbug at outer]) plain) "wrapped mop not recognized"
1777+ ?. =((mop-specs mixed) plain) "mixed mop not recognized"
1778+ ?^ (mop-specs multi) "multi-segment callee accepted"
1779+ ?^ (mop-specs [%dbug at [%sand %ud 42]]) "malformed call accepted"
1780+ ?^ (source-single-wing [%dbug at 42]) "malformed wing accepted"
1781+ ?^ (source-single-wing [%dbug at [%wing ~[%one %two]]]) "multi-segment operand accepted"
1782+ =/ four=* [%dbug at [%dbug at [%dbug at [%dbug at [%wing ~[%mop]]]]]]
1783+ =/ five=* [%dbug at four]
1784+ ?~ (source-single-wing four) "four wrappers rejected"
1785+ ?^ (source-single-wing five) "wrapper limit exceeded"
1786+ ?~ (source-note-unwrap four 4) "four note wrappers rejected"
1787+ ?^ (source-note-unwrap five 4) "note wrapper limit exceeded"
1788+ =/ selected=(unit hoon) (local-arm-source cor %tag-valid)
1789+ ?~ selected "selected union not found"
1790+ =/ arm-four=hoon [%dbug at [%dbug at [%dbug at [%dbug at u.selected]]]]
1791+ =/ arm-five=hoon [%dbug at arm-four]
1792+ ?~ (tagged-source-code arm-four %tag-valid) "four wrapped selected arms rejected"
1793+ ?^ (tagged-source-code arm-five %tag-valid) "selected arm wrapper limit exceeded"
1794+ "wrapped and mixed calls accepted; malformed, multi-segment and excessive wrappers rejected"
1795+::
1796+:: Synthetic nodes test each part of the direct collection-call proof.
1797+++ collection-wrapper-fixture
1798+ ^- tape
1799+ =/ call=hoon [%cncl [%tsgr [%wing ~[[%.y 7]]] [%cncl [%wing ~[%list]] ~]] ~[[%$ 6]]]
1800+ =/ subject=hoon [%cncl [%tsgr [%wing ~[[%.y 8]]] [%cncl [%wing ~[%list]] ~]] ~[[%$ 6]]]
1801+ =/ sample=hoon [%cncl [%tsgr [%wing ~[[%.y 7]]] [%cncl [%wing ~[%list]] ~]] ~[[%$ 2]]]
1802+ =/ good=hoon [%tsls [%note [%made %x ~] call] [%tsls [%dtts [%$ 14] [%$ 2]] [%$ 6]]]
1803+ =/ tail=hoon [%tsls [%note [%made %x ~] call] [%$ 6]]
1804+ =/ args=(list [hoon hoon]) ~[[call good] [subject good] [sample good] [call tail]]
1805+ =/ flags=(list ?) (turn args |=(pair=[hoon hoon] (direct-collection-source -.pair +.pair)))
1806+ ?: =(flags ~[& | | |]) "valid; forged subject, sample and tail rejected"
1807+ "wrapper guard failed"
1808+::
1809+++ overlap-fork-fixture
1810+ ^- type
1811+ =/ nodes=(list type) ~[[%atom %ud ~] [%atom %t ~]]
1812+ [%fork (silt nodes)]
1813+::
1814+++ invalid-fork-fixture
1815+ ^- type
1816+ =/ nodes=(list type) ~[[%atom %ud ~] [%atom %sd ~]]
1817+ [%fork (silt nodes)]
1818+::
1819+++ fixture-output
1820+ |= [small=@t epic=@t presence=@t docs=@t shadow=@t shadow-static=@t ford=@t mark=@t mark-rec=@t mark-gate=@t mark-basic=@t origin-trans=@t origin-first=@t origin-other=@t]
1821+ ^- wain
1822+ =/ sc=type -:(ride -:!>(..zuse) small)
1823+ =/ ec=type -:(ride -:!>(..zuse) epic)
1824+ =/ pc=type -:(ride -:!>(..zuse) presence)
1825+ =/ dc=type -:(ride -:!>(..zuse) docs)
1826+ =/ hc=type -:(ride -:!>(..zuse) shadow)
1827+ =/ xc=type -:(ride -:!>(..zuse) shadow-static)
1828+ =/ fp=type [%cell [%face %small sc] -:!>(..zuse)]
1829+ =/ other=type -:(ride -:!>(..zuse) origin-other)
1830+ =/ fc=type -:(ride fp ford)
1831+ ?> ?=([%core *] fc)
1832+ =/ only-list=@t '|%\0a+$ lists (list @ud)\0a--\0a'
1833+ =/ tp=type [%cell [%face %intermediate fc] -:!>(..zuse)]
1834+ =/ tc=type -:(ride tp only-list)
1835+ =/ sp=type [%cell [%face %small xc] -:!>(..zuse)]
1836+ =/ shc=type -:(ride sp only-list)
1837+ =/ mark-core=type -:(ride fp mark)
1838+ =/ mark-rec-core=type -:(ride fp mark-rec)
1839+ =/ mark-gate-core=type -:(ride -:!>(..zuse) mark-gate)
1840+ =/ mark-basic-core=type -:(ride -:!>(..zuse) mark-basic)
1841+ =/ make-mark
1842+ |= [field=@t scope=type]
1843+ ^- type
1844+ -:(ride scope (crip "|_ a={(trip field)}\0a++ grab |% ++ noun a --\0a++ grow |% ++ noun a --\0a++ grad %noun\0a--\0a"))
1845+ =/ mark-union-core=type (make-mark 'mark-flag-valid:small' fp)
1846+ =/ mark-overlap-core=type (make-mark 'mark-flag-overlap:small' fp)
1847+ =/ mark-hidden-core=type (make-mark 'mark-flag-hidden:small' fp)
1848+ =/ mark-signed-core=type (make-mark 'signed:small' fp)
1849+ =/ mark-callable-core=type (make-mark 'gate-test:small' fp)
1850+ =/ extra-subject=type [%cell [%face %other other] fp]
1851+ =/ mark-extra-core=type (make-mark 'mark-flag-valid:small' extra-subject)
1852+ =/ other-hold=type (~(play ut other) (ream '*chain'))
1853+ =/ recursive-hold=type (~(play ut sc) (ream '*chain'))
1854+ =/ fake-vase=type -:(ride -:!>(..zuse) '|%\0a+$ vase @ud\0a--\0a')
1855+ =/ spoof=(unit import-diagnostic)
1856+ (first-invalid [%bad 'signed and float auras cannot be imported'])
1857+ ?> ?=(^ spoof)
1858+ =/ mark-shadow-core=type -:(ride sp mark-basic)
1859+ =/ tshp=type [%cell [%face %intermediate shc] -:!>(..zuse)]
1860+ =/ tshc=type -:(ride tshp only-list)
1861+ =/ trans=type -:(ride tp origin-trans)
1862+ =/ ambiguous-parent=type [%cell [%face %first sc] [%cell [%face %second sc] -:!>(..zuse)]]
1863+ =/ ambiguous=type -:(ride ambiguous-parent origin-first)
1864+ =/ distinct-parent=type [%cell [%face %first sc] [%cell [%face %second other] -:!>(..zuse)]]
1865+ =/ distinct=type -:(ride distinct-parent origin-first)
1866+ =/ trans-amb-parent=type [%cell [%face %intermediate fc] [%cell [%face %second sc] -:!>(..zuse)]]
1867+ =/ trans-amb=type -:(ride trans-amb-parent origin-trans)
1868+ =/ tag-child=@t
1869+ '|%\0a+$ tag-invalid-cell @t\0a+$ choice $%([%ok a=tag-invalid-cell] [%err a=@ud])\0a--\0a'
1870+ =/ tag-collision=type -:(ride [%cell [%face %base sc] -:!>(..zuse)] tag-child)
1871+ =/ tag-clean=type -:(ride [%cell [%face %base other] -:!>(..zuse)] tag-child)
1872+ =/ tag-zuse=@t
1873+ '|%\0a+$ ship @t\0a+$ path @ud\0a+$ choice $%([%ok who=ship] [%err where=path])\0a--\0a'
1874+ =/ tag-zuse-core=type -:(ride -:!>(..zuse) tag-zuse)
1875+ =/ nest-parent-src=@t
1876+ '|%\0a+$ tag-nest-inner $%([%foreign @t] [%foreign @t])\0a--\0a'
1877+ =/ nest-parent=type -:(ride -:!>(..zuse) nest-parent-src)
1878+ =/ nest-child-src=@t
1879+ '|%\0a+$ tag-nest-inner $%([%left @t] [%right @ud])\0a+$ tag-nest-middle $%([%one x=tag-nest-inner] [%two ~])\0a--\0a'
1880+ =/ nest-collision=type -:(ride [%cell [%face %base nest-parent] -:!>(..zuse)] nest-child-src)
1881+ =/ self-parent=type
1882+ -:(ride -:!>(..zuse) '|%\0a+$ tag-self ?(%same %same)\0a--\0a')
1883+ =/ self-child=@t
1884+ '|%\0a+$ tag-self $%([%branch children=(list tag-self)] [%leaf value=@t])\0a--\0a'
1885+ =/ self-collision=type -:(ride [%cell [%face %tag-self self-parent] -:!>(..zuse)] self-child)
1886+ =/ self-other=type
1887+ -:(ride -:!>(..zuse) '|%\0a+$ tag-self $%([%branch children=(list tag-self)] [%leaf value=@ud])\0a--\0a')
1888+ =/ mop-ford-parent=type
1889+ -:(ride -:!>(..zuse) '|%\0a+$ value ?(%same %same)\0a--\0a')
1890+ =/ mop-ford-child=type
1891+ -:(ride [%cell [%face %value mop-ford-parent] -:!>(..zuse)] '|%\0a+$ key @ud\0a+$ value @t\0a+$ mm ((mop key value) lte)\0a--\0a')
1892+ =/ sample
1893+ |= name=term
1894+ (read-mold-in %small name (~(play ut sc) (ream (cat 3 '*' name))) sc)
1895+ =/ tlon
1896+ |= name=term
1897+ (read-mold-in %epic name (~(play ut ec) (ream (cat 3 '*' name))) ec)
1898+ =/ present
1899+ |= name=term
1900+ (read-mold-in %presence name (~(play ut pc) (ream (cat 3 '*' name))) pc)
1901+ =/ shad
1902+ |= name=term
1903+ (read-mold-in %shadow name (~(play ut hc) (ream (cat 3 '*' name))) hc)
1904+ =/ docs-type
1905+ |= name=term
1906+ (read-mold-in %docs name (~(play ut dc) (ream (cat 3 '*' name))) dc)
1907+ =/ chapter-tree=(map term hoon)
1908+ (~(put by *(map term hoon)) %jar [%zpzp ~])
1909+ =/ vase (read-mold %std %vase (~(play ut -:!>(..zuse)) (ream '*vase')))
1910+ :~ (crip "action: {(show-result (sample %action))}")
1911+ (crip "optional: {(show-result (sample %optional))}")
1912+ (crip "items: {(show-result (sample %items))}")
1913+ (crip "containers: {(show-result (sample %containers))}")
1914+ (crip "chain: {(show-result (sample %chain))}")
1915+ (crip "jar: {(show-result (sample %jar-test))}")
1916+ (crip "jug: {(show-result (sample %jug-test))}")
1917+ (crip "nested-jar: {(show-result (sample %nested-jar))}")
1918+ (crip "paired-aliases: {(show-result (sample %paired-aliases))}")
1919+ (crip "nested-alias: {(show-result (sample %nested-alias))}")
1920+ (crip "compound: {(show-result (sample %compound))}")
1921+ (crip "compound-fields: {(show-result (sample %compound-fields))}")
1922+ (crip "mop: {(show-result (sample %mop-test))}")
1923+ (crip "nested-mop: {(show-result (sample %nested-mop))}")
1924+ (crip "two-mops: {(show-result (sample %two-mops))}")
1925+ (crip "mixed-mop: {(show-result (sample %mixed-mop))}")
1926+ (crip "nested-static-mop: {(show-result (sample %nested-static-mop))}")
1927+ (crip "collection-siblings: {(show-result (sample %collection-siblings))}")
1928+ (crip "dynamic-sibling-mop: {(show-result (sample %dynamic-sibling-mop))}")
1929+ (crip "mark-flag-source: {(show-result (read-named %small %mark-flag-valid sc))}")
1930+ (crip "mark-flag-union: {(show-result (read-mark %flag-union mark-union-core))}")
1931+ (crip "mark-flag-overlap: {(show-result (read-mark %flag-overlap mark-overlap-core))}")
1932+ (crip "mark-flag-hidden: {(show-result (read-mark %flag-hidden mark-hidden-core))}")
1933+ (crip "mark-flag-signed: {(show-result (read-mark %flag-signed mark-signed-core))}")
1934+ (crip "mark-flag-callable: {(show-result (read-mark %flag-callable mark-callable-core))}")
1935+ (crip "mark-flag-extra: {(show-result (read-mark %flag-extra mark-extra-core))}")
1936+ (crip "mark-flag-other-hold: {?~((mark-union-fallback other-hold fp) "unsupported" "BAD")}")
1937+ (crip "mark-flag-recursive-fallback: {?~((mark-union-fallback recursive-hold fp) "unsupported" "BAD")}")
1938+ (crip "mark-record: {(show-result (read-mark %todo-item mark-core))}")
1939+ (crip "mark-recursive: {(show-result (read-mark %recursive mark-rec-core))}")
1940+ (crip "mark-gate: {(show-result (read-mark %bad mark-gate-core))}")
1941+ (crip "mark-list: {(show-result (read-mark %list-mark mark-basic-core))}")
1942+ (crip "mark-shadow: {(show-result (read-mark %list-mark mark-shadow-core))}")
1943+ (crip "mark-not-core: {(show-result (read-mark %bad [%atom %ud ~]))}")
1944+ (crip "ford-list: {(show-result (read-mold-in %ford %lists (~(play ut fc) (ream '*lists')) fc))}")
1945+ (crip "ford-imported: {(show-result (read-mold-in %ford %wrapped (~(play ut fc) (ream '*wrapped')) fc))}")
1946+ (crip "ford-recursive: {(show-result (read-mold-in %ford %recursive (~(play ut fc) (ream '*recursive')) fc))}")
1947+ (crip "ford-local-recursive: {(show-result (read-mold-in %ford %local (~(play ut fc) (ream '*local')) fc))}")
1948+ (crip "ford-recursive-transitive: {(show-result (read-named %outer %wrapped trans))}")
1949+ (crip "ford-recursive-ambiguous: {(show-result (read-named %outer %pick-one ambiguous))}")
1950+ (crip "ford-recursive-transitive-ambiguous: {(show-result (read-named %outer %wrapped trans-amb))}")
1951+ (crip "ford-recursive-distinct-first: {(show-result (read-named %outer %pick-one distinct))}")
1952+ (crip "ford-recursive-distinct-second: {(show-result (read-named %outer %pick-two distinct))}")
1953+ (crip "ford-transitive: {(show-result (read-mold-in %ford %lists (~(play ut tc) (ream '*lists')) tc))}")
1954+ (crip "ford-shadow: {(show-result (read-mold-in %ford %lists (~(play ut shc) (ream '*lists')) shc))}")
1955+ (crip "ford-transitive-shadow: {(show-result (read-mold-in %ford %lists (~(play ut tshc) (ream '*lists')) tshc))}")
1956+ (crip "ford-shadow-face: {?:((scope-safe [%cell [%face %list sc] -:!>(..zuse)] %list) "wrong" "unsafe")}")
1957+ (crip "ford-unknown: {?:((scope-safe [%cell [%atom %ud ~] -:!>(..zuse)] %list) "wrong" "unsafe")}")
1958+ (crip "ford-mismatched-core: {?:((scope-safe fc(p -:!>(..zuse)) %list) "wrong" "unsafe")}")
1959+ (crip "shadow-list-mop: {(show-result (read-mold-in %shadow-static %bad (~(play ut xc) (ream '*bad')) xc))}")
1960+ (crip "named-mop: {(show-result (sample %named-mop))}")
1961+ (crip "mop-list: {(show-result (sample %mop-list))}")
1962+ (crip "mop-wing-valid: {(show-result (sample %mop-wing-valid))}")
1963+ (crip "mop-wing-invalid-key: {(show-result (sample %mop-wing-invalid-key))}")
1964+ (crip "mop-wing-invalid-key-alias: {(show-result (sample %mop-wing-invalid-key-alias))}")
1965+ (crip "mop-wing-invalid-value: {(show-result (sample %mop-wing-invalid-value))}")
1966+ (crip "mop-wing-invalid-value-alias: {(show-result (sample %mop-wing-invalid-value-alias))}")
1967+ (crip "mop-wing-rec-key: {(show-result (sample %mop-wing-rec-key))}")
1968+ (crip "mop-wing-rec-value: {(show-result (sample %mop-wing-rec-value))}")
1969+ (crip "mop-wing-shadow: {(show-result (read-named %shadow %mmw hc))}")
1970+ (crip "mop-wing-ford-collision: {(show-result (read-named %child %mm mop-ford-child))}")
1971+ (crip "mop-wing-debug: {(debug-mop-fixture sc)}")
1972+ (crip "signed: {(show-result (sample %signed))}")
1973+ (crip "float: {(show-result (sample %float))}")
1974+ (crip "gate: {(show-result (sample %gate-test))}")
1975+ (crip "vase: {(show-result vase)}")
1976+ (crip "failed-branch: {(show-result (read-mold %external %bad bad-branch-fixture))}")
1977+ (crip "debug-spec: {debug-spec-fixture}")
1978+ (crip "debug-union: {(show-result (debug-union-fixture sc %action))}")
1979+ (crip "debug-union-overlap: {(show-result (debug-union-fixture sc %explicit-wut-overlap))}")
1980+ (crip "debug-nested-cell: {(show-result (debug-union-fixture sc %nested-valid-cell))}")
1981+ (crip "debug-nested-cell-overlap: {(show-result (debug-union-fixture sc %nested-invalid-cell))}")
1982+ (crip "explicit-graph: {(show-result (read-mold %raw %raw overlap-fork-fixture))}")
1983+ (crip "explicit-graph-unsupported: {(show-result (read-mold %raw %raw invalid-fork-fixture))}")
1984+ (crip "explicit-wut-safe: {(show-result (sample %explicit-wut-safe))}")
1985+ (crip "explicit-percent-overlap: {(show-result (sample %explicit-percent-overlap))}")
1986+ (crip "explicit-wut-overlap: {(show-result (sample %explicit-wut-overlap))}")
1987+ (crip "explicit-collapsed: {(show-result (sample %explicit-collapsed))}")
1988+ (crip "explicit-subsumed: {(show-result (sample %explicit-subsumed))}")
1989+ (crip "explicit-three: {(show-result (sample %explicit-three))}")
1990+ (crip "explicit-unknown: {(show-result (sample %explicit-unknown))}")
1991+ (crip "explicit-nested: {(show-result (sample %explicit-nested))}")
1992+ (crip "collection-union-wrapper: {collection-wrapper-fixture}")
1993+ (crip "collection-union-list: {(show-result (sample %collection-union-list))}")
1994+ (crip "collection-union-set: {(show-result (sample %collection-union-set))}")
1995+ (crip "collection-union-map-key: {(show-result (sample %collection-union-map-key))}")
1996+ (crip "collection-union-map-value: {(show-result (sample %collection-union-map-value))}")
1997+ (crip "collection-union-unit: {(show-result (sample %collection-union-unit))}")
1998+ (crip "collection-union-collapsed: {(show-result (sample %collection-union-collapsed))}")
1999+ (crip "collection-union-multiple: {(show-result (sample %collection-union-multiple))}")
2000+ (crip "collection-union-nested: {(show-result (sample %collection-union-nested))}")
2001+ (crip "collection-union-dependent: {(show-result (sample %collection-union-dependent))}")
2002+ (crip "collection-union-shadow: {(show-result (read-named %shadow %collection-union-shadow xc))}")
2003+ (crip "explicit-list: {(show-result (sample %explicit-list))}")
2004+ (crip "explicit-set: {(show-result (sample %explicit-set))}")
2005+ (crip "explicit-faces: {(show-result (sample %explicit-faces))}")
2006+ (crip "explicit-alias: {(show-result (sample %explicit-alias))}")
2007+ (crip "explicit-ford: {(show-result (read-named %outer %bad-union trans))}")
2008+ (crip "explicit-shadow-path: {(show-result (read-named %shadow %path-shadow xc))}")
2009+ (crip "list-bckt-field: {(show-result (sample %list-bckt-field))}")
2010+ (crip "list-noun-overlap: {(show-result (sample %list-noun-overlap))}")
2011+ (crip "list-null-overlap: {(show-result (sample %list-null-overlap))}")
2012+ (crip "list-nested-atom-cell: {(show-result (sample %list-nested-atom-cell))}")
2013+ (crip "list-nested-valid-cell: {(show-result (sample %list-nested-valid-cell))}")
2014+ (crip "list-nested-invalid-cell: {(show-result (sample %list-nested-invalid-cell))}")
2015+ (crip "map-nested-invalid-cell: {(show-result (sample %map-nested-invalid-cell))}")
2016+ (crip "set-direct-invalid-cell: {(show-result (sample %set-direct-invalid-cell))}")
2017+ (crip "map-key-invalid-cell: {(show-result (sample %map-key-invalid-cell))}")
2018+ (crip "nested-atom-cell: {(show-result (sample %nested-atom-cell))}")
2019+ (crip "nested-tags: {(show-result (sample %nested-tags))}")
2020+ (crip "nested-tags-overlap: {(show-result (sample %nested-tags-overlap))}")
2021+ (crip "nested-tagged: {(show-result (sample %nested-tagged))}")
2022+ (crip "nested-tagged-bckt: {(show-result (sample %nested-tagged-bckt))}")
2023+ (crip "nested-tagged-overlap: {(show-result (sample %nested-tagged-overlap))}")
2024+ (crip "nested-tagged-alias: {(show-result (sample %nested-tagged-alias))}")
2025+ (crip "nested-tagged-ford: {(show-result (read-named %outer %tagged trans))}")
2026+ (crip "tag-static-valid: {?:((fixed-cell-mold [%wtgr [%dtts [%$ 13] [%rock %$ %foo]] [%rock %tas %foo]] 13) "yes" "no")}")
2027+ (crip "tag-static-wrong-axis: {?:((fixed-cell-mold [%wtgr [%dtts [%$ 12] [%rock %$ %foo]] [%rock %tas %foo]] 13) "wrong" "no")}")
2028+ (crip "tag-static-nonconstant: {?:((fixed-cell-mold [%wtgr [%dtts [%$ 13] [%rock %$ %foo]] [%$ 13]] 13) "wrong" "no")}")
2029+ (crip "tag-static-wrong-value: {?:((fixed-cell-mold [%wtgr [%dtts [%$ 13] [%rock %$ %foo]] [%rock %tas %bar]] 13) "wrong" "no")}")
2030+ (crip "nested-first-cell: {(show-result (sample %nested-first-cell))}")
2031+ (crip "nested-alias-cell: {(show-result (sample %nested-alias-cell))}")
2032+ (crip "nested-multiple-cell: {(show-result (sample %nested-multiple-cell))}")
2033+ (crip "nested-named-sibling: {(show-result (sample %nested-named-sibling))}")
2034+ (crip "nested-list-sibling: {(show-result (sample %nested-list-sibling))}")
2035+ (crip "nested-validated-sibling: {(show-result (sample %nested-validated-sibling))}")
2036+ (crip "nested-validated-branch: {(show-result (sample %nested-validated-branch))}")
2037+ (crip "nested-named-branch: {(show-result (sample %nested-named-branch))}")
2038+ (crip "nested-ford-cell: {(show-result (read-named %outer %nested trans))}")
2039+ (crip "nested-valid-cell: {(show-result (sample %nested-valid-cell))}")
2040+ (crip "nested-invalid-cell: {(show-result (sample %nested-invalid-cell))}")
2041+ (crip "valid-cell: {(show-result (sample %valid-cell))}")
2042+ (crip "invalid-cell: {(show-result (sample %invalid-cell))}")
2043+ (crip "chapter-malformed: {?:((chapter-unsafe [%x %y %z] %jar) "unsafe" "wrong")}")
2044+ (crip "chapter-wrapped-malformed: {?:((chapter-unsafe [~ [%x %y %z]] %jar) "unsafe" "wrong")}")
2045+ (crip "chapter-direct-hit: {?:(=((chapter-has chapter-tree %jar) [~ &]) "yes" "no")}")
2046+ (crip "chapter-wrapped-hit: {?:(=((chapter-has [~ chapter-tree] %jar) [~ &]) "yes" "no")}")
2047+ (crip "chapter-direct-miss: {?:(=((chapter-has chapter-tree %jug) [~ &]) "yes" "no")}")
2048+ (crip "chapter-wrapped-miss: {?:(=((chapter-has [~ chapter-tree] %jug) [~ &]) "yes" "no")}")
2049+ (crip "shadow-nested-mop: {(show-result (shad %mn))}")
2050+ (crip "shadow-mop: {(show-result (shad %mm))}")
2051+ (crip "shadow-jar: {(show-result (shad %aa))}")
2052+ (crip "shadow-jug: {(show-result (shad %bb))}")
2053+ (crip "no-provenance-atom: {(show-result (read-mold %small %word (~(play ut sc) (ream '*word'))))}")
2054+ (crip "no-provenance-recursive: {(show-result (read-mold %wrong %alias (~(play ut sc) (ream '*chain'))))}")
2055+ (crip "no-provenance: {(show-result (read-mold %small %jar-test (~(play ut sc) (ream '*jar-test'))))}")
2056+ (crip "named-not-mold: {(show-result (read-named %small %not-mold sc))}")
2057+ (crip "named-present: {(show-result (read-named %small %items sc))}")
2058+ (crip "named-missing: {(show-result (read-named %small %missing sc))}")
2059+ (crip "named-invalid-core: {(show-result (read-named %small %items [%atom %ud ~]))}")
2060+ (crip "named-ford-recursive: {(show-result (read-named %ford %recursive fc))}")
2061+ (crip "diagnostic-items: {(show-import-diagnostic (read-named-diagnostic %small %items sc))}")
2062+ (crip "diagnostic-signed: {(show-import-diagnostic (read-named-diagnostic %small %signed sc))}")
2063+ (crip "diagnostic-float: {(show-import-diagnostic (read-named-diagnostic %small %float sc))}")
2064+ (crip "diagnostic-overlap: {(show-import-diagnostic (read-named-diagnostic %small %explicit-percent-overlap sc))}")
2065+ (crip "diagnostic-unproved: {(show-import-diagnostic (read-named-diagnostic %small %list-nested-invalid-cell sc))}")
2066+ (crip "diagnostic-mark-gate: {(show-import-diagnostic (read-mark-diagnostic %bad mark-gate-core))}")
2067+ (crip "diagnostic-shadow-vase: {(show-import-diagnostic (read-named-diagnostic %fake %vase fake-vase))}")
2068+ (crip "diagnostic-spoof: {(show-import-diagnostic u.spoof)}")
2069+ (crip "missing-arm: {(show-result (read-mold-in %small %missing [%atom %ud ~] sc))}")
2070+ (crip "wrong-provenance: {(show-result (read-mold-in %small %action (~(play ut sc) (ream '*items')) sc))}")
2071+ (crip "unverified-subject: {(show-result (read-mold-in %std %jar (~(play ut -:!>(..zuse)) (ream '*(jar @ud @t)')) -:!>(..zuse)))}")
2072+ (crip "tag-ford-collision: {(show-result (read-named %child %choice tag-collision))}")
2073+ (crip "tag-ford-clean: {(show-result (read-named %child %choice tag-clean))}")
2074+ (crip "tag-zuse-local: {(show-result (read-named %child %choice tag-zuse-core))}")
2075+ (crip "tag-nest-inner: {(show-result (sample %tag-nest-inner))}")
2076+ (crip "tag-nest-middle: {(show-result (sample %tag-nest-middle))}")
2077+ (crip "tag-nest-diamond: {(show-result (sample %tag-nest-diamond))}")
2078+ (crip "tag-nest-deep: {(show-result (sample %tag-nest-deep))}")
2079+ (crip "tag-nest-hidden: {(show-result (sample %tag-nest-hidden))}")
2080+ (crip "tag-nest-overlap: {(show-result (sample %tag-nest-overlap))}")
2081+ (crip "tag-nest-recursive: {(show-result (sample %tag-nest-recursive-outer))}")
2082+ (crip "tag-nest-rec-list: {(show-result (sample %tag-nest-rec-list-outer))}")
2083+ (crip "tag-nest-rec-repeat: {(show-result (sample %tag-nest-rec-repeat))}")
2084+ (crip "tag-nest-rec-duplicate: {(show-result (sample %tag-nest-rec-bad-outer))}")
2085+ (crip "tag-nest-rec-hidden: {(show-result (sample %tag-nest-rec-hidden-outer))}")
2086+ (crip "tag-nest-rec-mutual: {(show-result (sample %tag-nest-rec-mutual-outer))}")
2087+ (crip "tag-nest-rec-outer-overlap: {(show-result (sample %tag-nest-rec-outer-overlap))}")
2088+ (crip "tag-nest-rec-owner: {?:(&((contains-named-ref [%ref %small %tag-self] %small %tag-self) !(contains-named-ref [%named %small %other [%ref %small %tag-self]] %small %tag-self)) "yes" "wrong")}")
2089+ (crip "tag-nest-many: {(show-result (sample %tag-nest-many))}")
2090+ (crip "tag-nest-shadow: {(show-result (read-named %shadow-static %tag-nest-shadow xc))}")
2091+ (crip "tag-nest-wrong-hold: {?~((nested-tagged-union %small (~(play ut other) (ream '*chain')) `sc) "unsupported" "BAD")}")
2092+ (crip "tag-nest-ford-collision: {(show-result (read-named %outer %tag-nest-middle nest-collision))}")
2093+ (crip "tag-self: {(show-result (sample %tag-self))}")
2094+ (crip "tag-self-tail: {(show-result (sample %tag-self-tail))}")
2095+ (crip "tag-self-duplicate: {(show-result (sample %tag-self-duplicate))}")
2096+ (crip "tag-self-hidden: {(show-result (sample %tag-self-hidden))}")
2097+ (crip "tag-self-indirect: {(show-result (sample %tag-self-indirect))}")
2098+ (crip "tag-mutual-a: {(show-result (sample %tag-mutual-a))}")
2099+ (crip "tag-mutual-b: {(show-result (sample %tag-mutual-b))}")
2100+ (crip "tag-self-pair: {(show-result (sample %tag-self-pair))}")
2101+ (crip "tag-self-ford-collision: {(show-result (read-named %child %tag-self self-collision))}")
2102+ (crip "tag-self-wrong-core: {(show-result (read-mold-in %other %tag-self (~(play ut sc) (ream '*tag-self')) self-other))}")
2103+ (crip "tag-flat-large: {?:(&(?=(~ (safe-source-name-mode %tag-fuel-7 sc ~ 256 |)) ?=(^ (safe-source-name-mode %tag-fuel-7 sc ~ 4.096 |)) ?=([%& *] (sample %tag-flat-large))) "supported above 256" "BAD")}")
2104+ (crip "tag-null-good: {(show-result (sample %tag-null-good))}")
2105+ (crip "tag-null-duplicate: {(show-result (sample %tag-null-duplicate))}")
2106+ (crip "tag-null-hidden: {(show-result (sample %tag-null-hidden))}")
2107+ (crip "tag-valid: {(show-result (sample %tag-valid))}")
2108+ (crip "tag-duplicate: {(show-result (sample %tag-duplicate))}")
2109+ (crip "tag-collapsed: {(show-result (sample %tag-collapsed))}")
2110+ (crip "tag-invalid-direct: {(show-result (sample %tag-invalid-direct))}")
2111+ (crip "tag-invalid-alias: {(show-result (sample %tag-invalid-alias))}")
2112+ (crip "tag-invalid-list: {(show-result (sample %tag-invalid-list))}")
2113+ (crip "tag-enum-good: {(show-result (sample %tag-enum-good))}")
2114+ (crip "tag-enum-bad: {(show-result (sample %tag-enum-bad))}")
2115+ (crip "tag-nested-good: {(show-result (sample %tag-nested-good))}")
2116+ (crip "tag-shadow-jar: {(show-result (read-named %shadow-static %tag-shadow-jar xc))}")
2117+ (crip "tag-shadow-jug: {(show-result (read-named %shadow-static %tag-shadow-jug xc))}")
2118+ (crip "tag-fuel-small: {?:(?=(^ (safe-source-name %tag-fuel-2 sc ~ 64)) "yes" "no")}")
2119+ (crip "tag-fuel-large: {?:(?=(~ (safe-source-name %tag-fuel-11 sc ~ 64)) "rejected" "wrong")}")
2120+ (crip "presence-action-1: {(show-result (present %action-1))}")
2121+ (crip "presence-command-1: {(show-result (present %command-1))}")
2122+ (crip "presence-update-1: {(show-result (present %update-1))}")
2123+ (crip "presence-response-1: {(show-result (present %response-1))}")
2124+ (crip "presence-topic: {(show-result (present %topic))}")
2125+ (crip "presence-timing: {(show-result (present %timing))}")
2126+ (crip "presence-places: {(show-result (present %places))}")
2127+ (crip "docs-ent: {(show-result (docs-type %ent))}")
2128+ (crip "docs-nud: {(show-result (docs-type %nud))}")
2129+ (crip "tlon-saga: {(show-result (tlon %saga))}")
2130+ (crip "tlon-epic: {(show-result (tlon %epic))}")
2131+ ==
2132+
1765--
2133--
jibb-dev/lib/jibb.hoon+527−5425
@@ -63,8 +63,8 @@
63:: finds each node's end from the tokens alone, matching each opener
63:: finds each node's end from the tokens alone, matching each opener
64:: with its closer on the line, so a node that stops at a child where
64:: with its closer on the line, so a node that stops at a child where
65:: its closer follows fails it, and +check-spans-test plants such
65:: its closer follows fails it, and +check-spans-test plants such
66−:: wrong ends to show that it does (the jibb-check-spans test suite
66+:: wrong ends to show that it does (tools/hoon check-spans-test prints
67−:: runs it).
67+:: the empty list, <<>>, when it passes).
68::
68::
69:: ===================================================================
69:: ===================================================================
70:: 2. The layout pass (+layout)
70:: 2. The layout pass (+layout)
@@ -206,11 +206,9 @@
206:: token holds the text after @. An aura starting @s or
206:: token holds the text after @. An aura starting @s or
207:: @r is an error at 2nd: "signed and floating-point
207:: @r is an error at 2nd: "signed and floating-point
208:: auras are left out of Jibb"
208:: auras are left out of Jibb"
209−:: A-Z type variable [A-Z][a-z0-9]*: a capital, then
209+:: A-Z type variable: one capital. A letter or digit right
210−:: lowercase letters and digits, as M, Msg or T2. Right
211−:: after it, which is emitted first, a capital, _ or -
212−:: is an error there, "a type variable is a capital,
210+:: after it is an error there, "a type variable is one
213−:: then lowercase letters and digits"
211+:: capital letter", after the type variable's token
214:: a-z name [a-z][a-z0-9-]*, or a wing: two or more names
212:: a-z name [a-z][a-z0-9-]*, or a wing: two or more names
215:: joined by dots. Right after the name or wing, which
213:: joined by dots. Right after the name or wing, which
216:: is emitted first, a capital or _ is an error there,
214:: is emitted first, a capital or _ is an error there,
@@ -407,7 +405,6 @@
407:: Why: after the layout pass the grammar is LL(2). Each choice is made by
405:: Why: after the layout pass the grammar is LL(2). Each choice is made by
408:: the next token, at most with the one after it and whether it is tight:
406:: the next token, at most with the one after it and whether it is tight:
409:: name, then = tight a face (items, lines, fields, samples)
407:: name, then = tight a face (items, lines, fields, samples)
410−:: wing, then = tight a change's item or line, wing=value
411:: name, then + tight a pair
408:: name, then + tight a pair
412:: name or wing, then ( tight a change
409:: name or wing, then ( tight a change
413:: |=, then a term tight a constructor; else, where an
410:: |=, then a term tight a constructor; else, where an
@@ -415,9 +412,6 @@
415:: ++ or +$ a definition; else a body's final expr
412:: ++ or +$ a definition; else a body's final expr
416:: INDENT a body, an open bracket's lines, arms
413:: INDENT a body, an open bracket's lines, arms
417:: or cases; else the expression goes on
414:: or cases; else the expression goes on
418−:: NEWLINE, after a rune's head the rest of the body, on a body's
419−:: or ?-'s subject final line (The rest of a body);
420−:: else an error
421:: So the parser never backtracks, its first failure is its furthest, and
415:: So the parser never backtracks, its first failure is its furthest, and
422:: "expected X, found Y" falls out of each arm without tracking failures
416:: "expected X, found Y" falls out of each arm without tracking failures
423:: across alternatives. Hoon's combinators read tapes of characters and
417:: across alternatives. Hoon's combinators read tapes of characters and
@@ -461,9 +455,7 @@
461:: cases below -> %mold; one case is that mold, several
455:: cases below -> %mold; one case is that mold, several
462:: are %union. The optional generic wraps either in %generic.
456:: are %union. The optional generic wraps either in %generic.
463:: ++ name expr or body -> %value (a body becomes a %body expr)
457:: ++ name expr or body -> %value (a body becomes a %body expr)
464−:: body INDENT rest DEDENT; rest is { definition NEWLINE } last
458+:: body INDENT { definition NEWLINE } expr DEDENT -> %body
465−:: -> %body, and last is expr, or the rest of a body that
466−:: a rune on its final line took (The rest of a body)
467:: call one operand is that operand; more -> %call head args
459:: call one operand is that operand; more -> %call head args
468:: operand literal -> %lit or %str; pathlit -> %path, as a path
460:: operand literal -> %lit or %str; pathlit -> %path, as a path
469:: literal is an expression (Decisions); !! -> %crash, as
461:: literal is an expression (Decisions); !! -> %crash, as
@@ -480,9 +472,7 @@
480:: that line, as () is no group. A ( followed by a rune is
472:: that line, as () is no group. A ( followed by a rune is
481:: the closed form. Lines of an open group or list take no
473:: the closed form. Lines of an open group or list take no
482:: name= (doc question)
474:: name= (doc question)
483−:: change every item and line has name= or wing=, as open.cart=
475+:: change every item and line has name= (the EBNF's "items named")
484−:: (the EBNF's edit) -> %change of edits, each with its
485−:: names as written; a tuple's item takes no wing=
486:: rune |= -> %gate; ^- -> %cast; ~& -> %trace; ?- -> %branch.
476:: rune |= -> %gate; ^- -> %cast; ~& -> %trace; ?- -> %branch.
487:: !! is an operand, not a rune (Decisions): alone where an
477:: !! is an operand, not a rune (Decisions): alone where an
488:: expression goes it is a call of one operand, and !! a
478:: expression goes it is a call of one operand, and !! a
@@ -563,23 +553,7 @@
563:: - Local definitions: at the start of any body, a gate's, an arm's,
553:: - Local definitions: at the start of any body, a gate's, an arm's,
564:: a ^-'s, a ~&'s or a ++'s, as the EBNF's body takes them
554:: a ^-'s, a ~&'s or a ++'s, as the EBNF's body takes them
565:: (Decisions); +$ as well as ++, as the Runes prose's "likewise"
555:: (Decisions); +$ as well as ++, as the Runes prose's "likewise"
566−:: says. The rest of a body is a body too, so it takes them.
556+:: says.
567−:: - The rest of a body (decided 2026-11-03, syntax review S2): a
568−:: body's final line is read with a flag, fin (+read-last), that
569−:: passes down the chain of runes on the line, as ^- @ud ~& x, while
570−:: nothing on the line is left open. A rune whose last child would
571−:: go next, and finds NEWLINE there, takes the lines after it at its
572−:: depth as that child, a body of its own (+read-rest); a ?- that
573−:: begins the line takes them as its arms (+read-branch). The flag
574−:: is off everywhere else: in a bracket, on an arm's line, for a
575−:: definition's own expression, and for a ?- after a rune on the
576−:: line, so ^- @ud ?- x keeps its arms deeper. A line nothing takes
577−:: is an error as before. A rest ends at its body's DEDENT, which
578−:: +read-rest leaves for whatever opened the body, so one DEDENT
579−:: ends every rest nested on that body's lines. Each rest is a level
580−:: of nesting, so the stack grows with them, as with brackets: a
581−:: body of 20.000 ~& x lines at one depth parses, and one of 40.000
582−:: runs out of memory, where 40.000 nested parentheses don't.
583:: - Where errors point: the doc says only "line, column and an
557:: - Where errors point: the doc says only "line, column and an
584:: excerpt"; 2.0 and Errors below say where.
558:: excerpt"; 2.0 and Errors below say where.
585::
559::
@@ -630,12 +604,11 @@
630:: found the end of the line" (+fail-space). No later line can give
604:: found the end of the line" (+fail-space). No later line can give
631:: a tight form its next token. A wing and a ( after a space are no
605:: a tight form its next token. A wing and a ( after a space are no
632:: error: that is a call; nor is / or %/ alone, a whole path. A
606:: error: that is a call; nor is / or %/ alone, a whole path. A
633−:: change's item is name= or wing=, so a name or a wing there with
607+:: change's item is name=, so a name there with no = right after it
634−:: no = right after it fails just past it, whatever follows: `m(b c)`
608+:: fails just past the name, whatever follows: `m(b c)` at the
635−:: and `m(a.b 1)` at the space, `m(b)` at the ), `m(a"x)` at the "
609+:: space, `m(b)` at the ), `m(a"x)` at the " with the layout pass's
636−:: with the layout pass's message after the parser's (+unnamed,
610+:: message after the parser's (+unnamed, +moved). `m(a==1)` has its
637−:: +moved). `m(a==1)` has its =, and fails at the second, where the
611+:: =, and fails at the second, where the layout pass does.
638−:: layout pass does.
639:: - Where the place needs text on its own line and the line ends,
612:: - Where the place needs text on its own line and the line ends,
640:: whatever line comes next: at the end of that line, just past its
613:: whatever line comes next: at the end of that line, just past its
641:: last token, "found the end of the line" (+fail-line), as no later
614:: last token, "found the end of the line" (+fail-line), as no later
@@ -801,40 +774,39 @@
801:: (face 2:11 items
774:: (face 2:11 items
802:: (apply 2:17 list (aura 2:23 @t)))
775:: (apply 2:17 list (aura 2:23 @t)))
803:: (face 2:27 open (flag 2:32))))
776:: (face 2:27 open (flag 2:32))))
804−:: (mold 3:1 poke
777+:: (mold 3:1 cart-action
805:: (union 4:3
778:: (union 4:3
806:: (cell 4:3
779:: (cell 4:3
807:: (const 4:4 %add)
780:: (const 4:4 %add)
808:: (face 4:9 item (aura 4:14 @t)))
781:: (face 4:9 item (aura 4:14 @t)))
809:: (const 5:3 %toggle)))
782:: (const 5:3 %toggle)))
783+:: (mold 6:1 poke (ref 6:9 cart-action))
810−:: (value 7:1 main
784+:: (value 8:1 main
811−:: (group 7:9
785+:: (group 8:9
812−:: (call 7:10 (wing 7:10 store) (wing 7:16 init) (wing 7:21 update))))
786+:: (call 8:10 (wing 8:10 store) (wing 8:16 init) (wing 8:21 update))))
813−:: (value 8:1 init
787+:: (value 9:1 init
814−:: (cast 8:9
788+:: (cast 9:9
815−:: (ref 8:12 state)
789+:: (ref 9:12 state)
816−:: (tuple 8:18
790+:: (tuple 9:18 (lit 9:19 ~) (lit 9:21 %.n))))
817−:: (face 8:19 items (lit 8:25 ~))
818−:: (face 8:27 open (lit 8:32 %.n)))))
819−:: (value 9:1 update
791+:: (value 10:1 update
820−:: (gate 9:11
792+:: (gate 10:11
821−:: (cell 9:14
793+:: (cell 10:14
822−:: (face 9:15 a (ref 9:17 poke))
794+:: (face 10:15 a (ref 10:17 cart-action))
823−:: (face 9:22 s (ref 9:24 state)))
795+:: (face 10:29 s (ref 10:31 state)))
824−:: (body 10:3
796+:: (body 11:3
825−:: (branch 10:3
797+:: (branch 11:3
826−:: (wing 10:6 a)
798+:: (wing 11:6 a)
827−:: (arm 11:3
799+:: (arm 12:5
828−:: (cell 11:3 (lit 11:4 %add) (bind 11:9 item))
800+:: (cell 12:5 (lit 12:6 %add) (bind 12:11 item))
829−:: (change 11:16 s
801+:: (change 12:18 s
830−:: (edit 11:18 items
802+:: (edit 12:20 items
831−:: (tuple 11:24 (wing 11:25 item) (wing 11:30 items.s)))))
803+:: (tuple 12:26 (wing 12:27 item) (wing 12:32 items.s)))))
832−:: (arm 12:3
804+:: (arm 13:5
833−:: (lit 12:3 %toggle)
805+:: (lit 13:5 %toggle)
834−:: (change 12:16 s
806+:: (change 13:18 s
835−:: (edit 12:18 open
807+:: (edit 13:20 open
836−:: (group 12:23
808+:: (group 13:25
837−:: (call 12:24 (wing 12:24 not) (wing 12:28 open.s)))))))))))
809+:: (call 13:26 (wing 13:26 not) (wing 13:30 open.s)))))))))))
838::
810::
839:: 4.3 Errors (+show-error): "<file>:<line>:<col>: <message>", then the
811:: 4.3 Errors (+show-error): "<file>:<line>:<col>: <message>", then the
840:: source line, then a caret under the column (col - 1 spaces, then ^).
812:: source line, then a caret under the column (col - 1 spaces, then ^).
@@ -845,93 +817,9 @@
845:: prints as a space, so the caret stays under its column and golden
817:: prints as a space, so the caret stays under its column and golden
846:: files hold no raw control bytes.
818:: files hold no raw control bytes.
847::
819::
848−:: /ui/basket.jibb:22:3: msg has no case %submitt
820+:: /ui/basket.jibb:22:5: msg has no case %submitt
849−:: %submitt [m(note="") ~]
821+:: %submitt [m(note="") ~]
850−:: ^
822+:: ^
851−::
852−:: ===================================================================
853−:: 5. General checker core (design; not implemented yet)
854−:: ===================================================================
855−::
856−:: The existing inference and recovery paths are described in
857−:: docs/compiler.md. This section is a plan for replacing them, not a
858−:: claim that the current checker implements these rules. The Grammar and
859−:: Decisions are authoritative if this design needs adjustment.
860−::
861−:: 5.1 State and unification. Give each inference variable an identity and
862−:: a union-find entry: parent or binding, rank, level, source, rigidity,
863−:: and the atom, arithmetic-atom and gate-free obligations it carries.
864−:: Hoon's immutable maps hold the entries; operations return the updated
865−:: state. Find compresses paths in that returned state. Bind only after an
866−:: occurs check, merge obligations at roots, and lower levels throughout
867−:: the bound type to the root's level. A rigid written capital may acquire
868−:: allowed constraints but cannot be forced to a concrete type or a
869−:: different written capital. Keep origins for both sides of each fit so
870−:: a failure can show both excerpts. Recursive named molds retain their
871−:: identity; the occurs check is for inference variables, not a ban on
872−:: declared recursion.
873−::
874−:: A scheme quantifies eligible variables above the enclosing level;
875−:: instantiate with fresh variables and copy their obligations. Written
876−:: capitals respect their lexical scope, including sharing with a local
877−:: definition when the enclosing definition uses the same name. Retain
878−:: aura variables and directional aura fits, rather than turning every
879−:: fit into symmetric equality. At a faced position a capital binds the
880−:: type under the face; joining an unnamed position with a faced one keeps
881−:: the face, independently of the order of the inputs. Different explicit
882−:: faces conflict. No gate may hide inside a gate-free type, including in
883−:: a container; propagate the obligation through its arguments.
884−::
885−:: 5.2 Work queue. A constraint owns its source span, the types and
886−:: expression shape it depends on, and the information needed to report
887−:: failure. Tags and constructors, null, decimal and cell literals,
888−:: wings, changes, unface and unknown match subjects enter the same queue.
889−:: Index waiting constraints by the roots they read. Binding or merging a
890−:: root wakes its dependants; a retry either solves, fails with its sites,
891−:: or registers the roots still needed. Run to a fixed point, without
892−:: losing constraints when a root is redirected. Check patterns once the
893−:: subject is known. Contextual tags inspect case shapes and noun-equal
894−:: heads, retaining the named union and its site in diagnostics.
895−::
896−:: Variables reachable from an open tag constraint remain monomorphic
897−:: across definitions, so a later use, including main, can fix them.
898−:: Other eligible variables can generalize, with their atom and gate-free
899−:: obligations intact. At each definition boundary resolve its holes and
900−:: apply the specified decimal and cell defaults, without defaulting a
901−:: decimal whose definition is generic over its aura. A decimal fits @ud,
902−:: @u, @ and *; other concrete auras need their own literal. At module
903−:: completion retry the queue and report each still-open constraint at its
904−:: source; an unresolved tag asks for a ^-, never a guessed union.
905−::
906−:: 5.3 Definition order and kinds. Use the existing dependency graph's
907−:: strongly connected components in dependency order. Give a recursive
908−:: group of gates monomorphic placeholders, infer all members in one state,
909−:: solve what can be solved, then generalize together. Reject a cycle
910−:: involving a non-gate value, including one through a gate, and show the
911−:: cycle. Check a named definition's holes before later uses can fix them.
912−:: Infer main as an ordinary expression against ordinary prelude schemes;
913−:: only its resulting type determines library, page, island or store.
914−:: Afterwards check kind-specific invariants: recursively find the field
915−:: containing a gate in island data or a model, and inspect subscriptions
916−:: for watchability only at %watch. A page load may be any gate to ask,
917−:: including pure and typed paths. Preserve request provenance needed for
918−:: a watchability proof through ordinary calls and aliases.
919−::
920−:: 5.4 Matches and migration. A reusable usefulness matrix over noun
921−:: constructors, constants, cells and wildcards checks nested patterns;
922−:: loobeans, lists and units expand to their cases. Test an arm against
923−:: previous rows for usefulness, then test a wildcard for exhaustiveness;
924−:: keep a witness for a missing case and the covering arm's site for a
925−:: dead one. Recursive types require memoized specialization and a
926−:: terminating treatment of recursive states. The same matrix can later
927−:: drive lowering. The bare-name/tag spelling rule is checked against the
928−:: subject and the cases the rest of the pattern can match.
929−::
930−:: Migrate in small stages with eval and ship goldens for every change.
931−:: Keep diagnostics and source sites in the single full result; types.txt
932−:: is a rendering of that result. As general inference covers an existing
933−:: recovery or source-proven slice, remove that slice and retain its tests.
934−:: An unsupported construct fails closed at its own site until then.
935::
823::
936|%
824|%
937+| %positions
825+| %positions
@@ -1077,10 +965,9 @@
1077::
965::
1078+$ item $~([*span ~ *expr] [at=span face=(unit term) val=expr])
966+$ item $~([*span ~ *expr] [at=span face=(unit term) val=expr])
1079::
967::
1080−:: +edit: a change's item or line, name=value or wing=value; names
968+:: +edit: a change's item or line, name=value
1081−:: as written, as a %wing's: open.cart is ~[%open %cart]
1082::
969::
1083−+$ edit $~([*span ~ *expr] [at=span names=(list term) val=expr])
970++$ edit $~([*span %$ *expr] [at=span name=term val=expr])
1084::
971::
1085:: +arm: a ?- arm, a pattern and an expression or body
972:: +arm: a ?- arm, a pattern and an expression or body
1086::
973::
@@ -1469,10 +1356,10 @@
1469 =? n &(?=(^ rest) (is-upper i.rest)) +(n)
1356 =? n &(?=(^ rest) (is-upper i.rest)) +(n)
1470 (emit +(n) [%aura (@ta (crip (scag n t.cs)))])
1357 (emit +(n) [%aura (@ta (crip (scag n t.cs)))])
1471 ?: (is-upper a)
1358 ?: (is-upper a)
1472− =/ n=@ud (run-len t.cs tvar-mask)
1473− => (emit +(n) [%tvar (crip [a (scag n t.cs)])])
1359+ => (emit 1 [%tvar a])
1474− ?. &(?=(^ cs) |((is-upper i.cs) =('_' i.cs) =('-' i.cs))) cor
1360+ ?. &(?=(^ cs) |((is-lower i.cs) (is-upper i.cs) (is-digit i.cs)))
1361+ cor
1475− (err col "a type variable is a capital, then lowercase letters and digits")
1362+ (err col "a type variable is one capital letter")
1476 ?: =(':' a)
1363 ?: =(':' a)
1477 ?. =(0 dep) (err col "a comment can't start inside `\{…}`")
1364 ?. =(0 dep) (err col "a comment can't start inside `\{…}`")
1478 ?: =(':' b) comment
1365 ?: =(':' b) comment
@@ -1747,14 +1634,9 @@
1747::
1634::
1748:: +bad-char: the error for a character that no text may hold (2.2)
1635:: +bad-char: the error for a character that no text may hold (2.2)
1749::
1636::
1750−:: The line feed ends a line and is no such character, so an escape
1751−:: cut off by the end of its line gets the same error as one cut off
1752−:: by the end of the text.
1753−::
1754++ bad-char
1637++ bad-char
1755 |= c=@
1638 |= c=@
1756 ^- (unit tape)
1639 ^- (unit tape)
1757− ?: =(10 c) ~
1758 ?: =(9 c) `"a tab: Jibb uses spaces only"
1640 ?: =(9 c) `"a tab: Jibb uses spaces only"
1759 ?: =(13 c) `"a carriage return: Jibb lines end with a line feed alone"
1641 ?: =(13 c) `"a carriage return: Jibb lines end with a line feed alone"
1760 ?: |((lth c 32) =(127 c)) `"a control character"
1642 ?: |((lth c 32) =(127 c)) `"a control character"
@@ -1776,7 +1658,6 @@
1776++ digit-mask 0x3ff.0000.0000.0000 :: 0-9
1658++ digit-mask 0x3ff.0000.0000.0000 :: 0-9
1777++ hex-mask 0x7e.0000.0000.03ff.0000.0000.0000 :: 0-9 a-f
1659++ hex-mask 0x7e.0000.0000.03ff.0000.0000.0000 :: 0-9 a-f
1778++ name-mask 0x7ff.fffe.0000.0000.03ff.2000.0000.0000 :: a-z 0-9 -
1660++ name-mask 0x7ff.fffe.0000.0000.03ff.2000.0000.0000 :: a-z 0-9 -
1779−++ tvar-mask 0x7ff.fffe.0000.0000.03ff.0000.0000.0000 :: a-z 0-9
1780++ knot-mask 0x47ff.fffe.8000.0000.03ff.6000.0000.0000 :: and . ~ _
1661++ knot-mask 0x47ff.fffe.8000.0000.03ff.6000.0000.0000 :: and . ~ _
1781++ number-mask 0x7ff.fffe.07ff.fffe.03ff.4000.0000.0000 :: a-z A-Z 0-9 .
1662++ number-mask 0x7ff.fffe.07ff.fffe.03ff.4000.0000.0000 :: a-z A-Z 0-9 .
1782++ bad-mask 0x8000.0000.0000.0000.0000.0000.ffff.fbff :: 2.2
1663++ bad-mask 0x8000.0000.0000.0000.0000.0000.ffff.fbff :: 2.2
@@ -2395,7 +2276,7 @@
2395++ sexp-edit
2276++ sexp-edit
2396 |= e=edit
2277 |= e=edit
2397 ^- sexp
2278 ^- sexp
2398− (nod "edit" at.e (show-names names.e) ~[(sexp-expr val.e)])
2279+ (nod "edit" at.e (trip name.e) ~[(sexp-expr val.e)])
2399::
2280::
2400++ sexp-arm
2281++ sexp-arm
2401 |= a=arm
2282 |= a=arm
@@ -2804,32 +2685,24 @@
2804 ?~ t.els i.els
2685 ?~ t.els i.els
2805 [%call [beg:(span-of i.els) end:(span-of (rear t.els))] i.els t.els]
2686 [%call [beg:(span-of i.els) end:(span-of (rear t.els))] i.els t.els]
2806::
2687::
2807−:: +slot: a bracket's item or line as read, before +bracket-node
2808−:: makes it an item or an edit: its name=, or a change's wing=, else ~
2809−::
2810−+$ slot [at=span face=(list term) val=expr]
2811−::
2812:: +bracket-node: a tuple, list or change from its items, ending at fin
2688:: +bracket-node: a tuple, list or change from its items, ending at fin
2813::
2689::
2814++ bracket-node
2690++ bracket-node
2815 |= $: kind=?(%tuple %list %change)
2691 |= $: kind=?(%tuple %list %change)
2816 op=token
2692 op=token
2817 target=(unit [t=token names=(list term)])
2693 target=(unit [t=token names=(list term)])
2818− its=(list slot)
2694+ its=(list item)
2819 fin=loc
2695 fin=loc
2820 ==
2696 ==
2821 ^- expr
2697 ^- expr
2822 ?- kind
2698 ?- kind
2823− %tuple
2824− :+ %tuple [beg.at.op fin]
2699+ %tuple [%tuple [beg.at.op fin] its]
2825− (turn its |=(i=slot ^-(item [at.i ?~(face.i ~ `i.face.i) val.i])))
2826− ::
2827− %list [%list [beg.at.op fin] (turn its |=(i=slot val.i))]
2700+ %list [%list [beg.at.op fin] (turn its |=(i=item val.i))]
2828 ::
2701 ::
2829 %change
2702 %change
2830 =/ beg=loc ?~(target beg.at.op beg.at.t.u.target)
2703 =/ beg=loc ?~(target beg.at.op beg.at.t.u.target)
2831 :^ %change [beg fin] ?~(target ~ names.u.target)
2704 :^ %change [beg fin] ?~(target ~ names.u.target)
2832− (turn its |=(i=slot ^-(edit [at.i face.i val.i])))
2705+ (turn its |=(i=item ^-(edit [at.i ?~(face.i %$ u.face.i) val.i])))
2833 ==
2706 ==
2834::
2707::
2835+| %parser
2708+| %parser
@@ -3050,22 +2923,23 @@
3050 ::
2923 ::
3051 :: +unnamed: a change's item or line without its name=
2924 :: +unnamed: a change's item or line without its name=
3052 ::
2925 ::
3053− :: A name or a wing could still begin one, so the error is just
2926+ :: A name could still begin one, so the error is just past it, as
3054− :: past it, as a tight form's is (+fail-space): `m(b c)` and
2927+ :: a tight form's is (+fail-space): `m(b c)` at the space, `m(b)`
3055− :: `m(a.b 1)` at the space, `m(b)` at the ). So is an error token's
2928+ :: at the ). So is an error token's text there, unless it begins
3056− :: text there, unless it begins with the =: `m(a"x)` at the ", with
2929+ :: with the =: `m(a"x)` at the ", with the layout pass's message
3057− :: the layout pass's message after the parser's (+moved), but
2930+ :: after the parser's (+moved), but `m(a==1)` at the lexer's error,
3058− :: `m(a==1)` at the lexer's error, the second =. At an error token
2931+ :: the second =. So is a wing's first name: `m(a.b=1)` fails at the
2932+ :: dot (+fail-in). At an error token whose text can't begin a name,
3059− :: whose text can't begin a name, at that text, as `m( @sd` at the
2933+ :: at that text, as `m( @sd` at the @ (+fail-in).
3060− :: @ (+fail-in).
3061 ::
2934 ::
3062 ++ unnamed
2935 ++ unnamed
3063 |= ts=(list token)
2936 |= ts=(list token)
3064 ^- [%| p=error]
2937 ^- [%| p=error]
3065 =/ why=tape "a change's items are named, as in m(done=%.y)"
2938 =/ why=tape "a change's items are named, as in m(done=%.y)"
3066 ?: ?=([[* * [%error *]] *] ts) (bad-in ts "a named item" lower-mask)
2939 ?: ?=([[* * [%error *]] *] ts) (bad-in ts "a named item" lower-mask)
3067− ?. ?=([[* * ?([%name *] [%wing *])] *] ts)
2940+ ?: ?=([[* * [%wing *]] *] ts)
2941+ (bad-in-why ts "a named item" lower-mask why)
3068− (bad-why ts "a named item" why)
2942+ ?. ?=([[* * [%name *]] *] ts) (bad-why ts "a named item" why)
3069 =/ want=tape "`=` right after {(show-found i.ts)}"
2943 =/ want=tape "`=` right after {(show-found i.ts)}"
3070 ?: ?& ?=([* [* * [%error *]] *] ts)
2944 ?: ?& ?=([* [* * [%error *]] *] ts)
3071 =(end.at.i.ts from.lex.i.t.ts)
2945 =(end.at.i.ts from.lex.i.t.ts)
@@ -3083,10 +2957,9 @@
3083 :: closes on its line (2.9). A bracket that needs none of these
2957 :: closes on its line (2.9). A bracket that needs none of these
3084 :: closes with the deeper lines instead (+shut). No later line can
2958 :: closes with the deeper lines instead (+shut). No later line can
3085 :: give it that, so the error is at the end of the line that took
2959 :: give it that, so the error is at the end of the line that took
3086− :: them (section 3, Errors). want is what it needs. It looks only when
2960+ :: them (section 3, Errors). want is what it needs. Only an error path
2961+ :: calls this, and it looks only when after begins with NEWLINE or
3087− :: after begins with NEWLINE or DEDENT, so it costs nothing on the way
2962+ :: DEDENT, so it costs nothing on the way to a tree.
3088− :: to a tree, except where a rune takes the rest of a body (+read-last):
3089− :: a look at that rune's line.
3090 ::
2963 ::
3091 ++ doomed
2964 ++ doomed
3092 |= [ts=(list token) after=(list token) want=tape]
2965 |= [ts=(list token) after=(list token) want=tape]
@@ -3243,7 +3116,7 @@
3243 ?: =(%'++' lex.rune)
3116 ?: =(%'++' lex.rune)
3244 ;< [nam=term after=(list token)] then (read-def-name rune t.ts)
3117 ;< [nam=term after=(list token)] then (read-def-name rune t.ts)
3245 ;< [e=expr more=(list token)] then
3118 ;< [e=expr more=(list token)] then
3246− (read-expr-or-body | "the name" after)
3119+ (read-expr-or-body "the name" after)
3247 [%& [%value [beg.at.rune end:(span-of e)] nam e] more]
3120 [%& [%value [beg.at.rune end:(span-of e)] nam e] more]
3248 ?: (is-closer rune)
3121 ?: (is-closer rune)
3249 %^ bad-why ts "a definition"
3122 %^ bad-why ts "a definition"
@@ -3323,36 +3196,20 @@
3323 [%& p.lex.i.ts t.ts]
3196 [%& p.lex.i.ts t.ts]
3324 ::
3197 ::
3325 :: +read-expr-or-body: a space and an expression on the line, or a
3198 :: +read-expr-or-body: a space and an expression on the line, or a
3326− :: body on deeper lines; what names what comes before, for errors.
3199+ :: body on deeper lines; what names what comes before, for errors
3327− :: On a body's final line (fin, +read-last), a line at the same depth
3328− :: is the rest of the body instead, and the expression on the line
3329− :: goes on with fin, except a ?-, which keeps its arms deeper
3330 ::
3200 ::
3331 ++ read-expr-or-body
3201 ++ read-expr-or-body
3332− |= [fin=? what=tape ts=(list token)]
3202+ |= [what=tape ts=(list token)]
3333 ^- (pare expr)
3203 ^- (pare expr)
3334 ?: ?=([[* * %indent] *] ts) (read-body t.ts)
3204 ?: ?=([[* * %indent] *] ts) (read-body t.ts)
3335− ?: &(fin ?=([[* * %newline] *] ts)) (read-rest t.ts)
3336 ?: ?=([[* * ?(%newline %dedent)] *] ts)
3205 ?: ?=([[* * ?(%newline %dedent)] *] ts)
3337 (bad ts "an expression, or a body on deeper lines")
3206 (bad ts "an expression, or a body on deeper lines")
3338 ?: &(?=(^ ts) tight.i.ts) (no-gap ts "a space after {what}")
3207 ?: &(?=(^ ts) tight.i.ts) (no-gap ts "a space after {what}")
3339− (read-last &(fin !?=([[* * %'?-'] *] ts)) ts)
3208+ (read-expr ts)
3340 ::
3209 ::
3341− :: +read-body: after its INDENT, the rest of a body, then its DEDENT
3210+ :: +read-body: after its INDENT, { definition NEWLINE } expr DEDENT
3342 ::
3211 ::
3343 ++ read-body
3212 ++ read-body
3344− |= ts=(list token)
3345− ^- (pare expr)
3346− ;< [e=expr after=(list token)] then (read-rest ts)
3347− ?> ?=([[* * %dedent] *] after)
3348− [%& e t.after]
3349− ::
3350− :: +read-rest: { definition NEWLINE } last, up to the DEDENT that ends
3351− :: a body, which it leaves for whatever opened the body: its INDENT's
3352− :: reader, or the rune on the final line that took the rest of it
3353− :: (+read-last)
3354− ::
3355− ++ read-rest
3356 |= ts=(list token)
3213 |= ts=(list token)
3357 ^- (pare expr)
3214 ^- (pare expr)
3358 =| defs=(list def)
3215 =| defs=(list def)
@@ -3366,15 +3223,12 @@
3366 %: bad-in-why ts "a definition or an expression" plus-mask
3223 %: bad-in-why ts "a definition or an expression" plus-mask
3367 "`+` begins `++` or `+$`"
3224 "`+` begins `++` or `+$`"
3368 ==
3225 ==
3369− ;< [e=expr after=(list token)] then (read-last & ts)
3226+ ;< [e=expr after=(list token)] then (read-expr ts)
3370 ?: ?=([[* * %dedent] *] after)
3227 ?: ?=([[* * %dedent] *] after)
3371 =/ ds=(list def) (flop defs)
3228 =/ ds=(list def) (flop defs)
3372 =/ beg=loc ?~(ds beg:(span-of e) beg:(span-of i.ds))
3229 =/ beg=loc ?~(ds beg:(span-of e) beg:(span-of i.ds))
3373− [%& [%body [beg end:(span-of e)] ds e] after]
3230+ [%& [%body [beg end:(span-of e)] ds e] t.after]
3374 ?. ?=([[* * %newline] *] after) (bad-end-in after (tail-can e))
3231 ?. ?=([[* * %newline] *] after) (bad-end-in after (tail-can e))
3375− ?: &(?=(%branch -.e) !?=([* [* * ?(%'++' %'+$')] *] after))
3376− %^ bad-why after "the end of the body"
3377− "this `?-`'s arms are on deeper lines, so this one goes there too"
3378 %^ bad-why after "the end of the body"
3232 %^ bad-why after "the end of the body"
3379 "a body's final expression is its last line"
3233 "a body's final expression is its last line"
3380 ::
3234 ::
@@ -3383,24 +3237,13 @@
3383 ++ read-expr
3237 ++ read-expr
3384 |= ts=(list token)
3238 |= ts=(list token)
3385 ^- (pare expr)
3239 ^- (pare expr)
3386− (read-last | ts)
3387− ::
3388− :: +read-last: +read-expr, where fin says the expression is a body's
3389− :: final line or goes on one, with no bracket open before it: then
3390− :: the rune that ends the line may take the rest of the body at the
3391− :: same depth as its last child, and a ?- that begins the line its
3392− :: arms (section 3, The rest of a body)
3393− ::
3394− ++ read-last
3395− |= [fin=? ts=(list token)]
3396− ^- (pare expr)
3397 ?~ ts (bad ts "an expression")
3240 ?~ ts (bad ts "an expression")
3398 =* t i.ts
3241 =* t i.ts
3399 ?+ lex.t (read-call ts)
3242 ?+ lex.t (read-call ts)
3400− %'|=' ?:((is-ctor ts) (read-call ts) (read-gate fin t t.ts))
3243+ %'|=' ?:((is-ctor ts) (read-call ts) (read-gate t t.ts))
3401− %'^-' (read-cast fin t t.ts)
3244+ %'^-' (read-cast t t.ts)
3402− %'~&' (read-trace fin t t.ts)
3245+ %'~&' (read-trace t t.ts)
3403− %'?-' (read-branch fin t t.ts)
3246+ %'?-' (read-branch t t.ts)
3404 ==
3247 ==
3405 ::
3248 ::
3406 :: +read-call: operand { operand }; one operand alone is itself
3249 :: +read-call: operand { operand }; one operand alone is itself
@@ -3615,9 +3458,9 @@
3615 (unclosed par ")" after)
3458 (unclosed par ")" after)
3616 ;< [els=(list expr) after=(list token)] then (read-operands ts)
3459 ;< [els=(list expr) after=(list token)] then (read-operands ts)
3617 ?: ?=([[* * %indent] *] after)
3460 ?: ?=([[* * %indent] *] after)
3618− ;< [ls=(list slot) more=(list token)] then
3461+ ;< [ls=(list item) more=(list token)] then
3619 (read-lines %group t.after)
3462 (read-lines %group t.after)
3620− =/ inner=expr (call-of (weld els (turn ls |=(i=slot val.i))))
3463+ =/ inner=expr (call-of (weld els (turn ls |=(i=item val.i))))
3621 [%& [%group [beg.at.par end:(span-of inner)] inner] more]
3464 [%& [%group [beg.at.par end:(span-of inner)] inner] more]
3622 ?~ els
3465 ?~ els
3623 ?: ?=([[* * ?(%newline %dedent)] *] after)
3466 ?: ?=([[* * ?(%newline %dedent)] *] after)
@@ -3642,7 +3485,7 @@
3642 ==
3485 ==
3643 ^- (pare expr)
3486 ^- (pare expr)
3644 =/ close=?(%')' %']') ?:(?=(%change kind) %')' %']')
3487 =/ close=?(%')' %']') ?:(?=(%change kind) %')' %']')
3645− =| its=(list slot)
3488+ =| its=(list item)
3646 |- ^- (pare expr)
3489 |- ^- (pare expr)
3647 ?~ ts (bad ts "an item")
3490 ?~ ts (bad ts "an item")
3648 =* t i.ts
3491 =* t i.ts
@@ -3650,8 +3493,8 @@
3650 [%& (bracket-node kind op target (flop its) end.at.t) t.ts]
3493 [%& (bracket-node kind op target (flop its) end.at.t) t.ts]
3651 ?: (is-closer t) (unclosed op (trip close) ts)
3494 ?: (is-closer t) (unclosed op (trip close) ts)
3652 ?: ?=(%indent lex.t)
3495 ?: ?=(%indent lex.t)
3653− ;< [ls=(list slot) more=(list token)] then (read-lines kind t.ts)
3496+ ;< [ls=(list item) more=(list token)] then (read-lines kind t.ts)
3654− =/ every=(list slot) (weld (flop its) ls)
3497+ =/ every=(list item) (weld (flop its) ls)
3655 =/ fin=loc ?~(every end.at.op end.at:(rear every))
3498 =/ fin=loc ?~(every end.at.op end.at:(rear every))
3656 [%& (bracket-node kind op target every fin) more]
3499 [%& (bracket-node kind op target every fin) more]
3657 ?: &(?=(^ its) (shut op `at.i.its ts))
3500 ?: &(?=(^ its) (shut op `at.i.its ts))
@@ -3659,21 +3502,21 @@
3659 ?: ?=(?(%newline %dedent) lex.t)
3502 ?: ?=(?(%newline %dedent) lex.t)
3660 (unclosed-open op (trip close) "an item" ts)
3503 (unclosed-open op (trip close) "an item" ts)
3661 ?: &(tight.t ?=(^ its)) (no-space ts)
3504 ?: &(tight.t ?=(^ its)) (no-space ts)
3662− ;< [i=slot more=(list token)] then (read-item kind ts)
3505+ ;< [i=item more=(list token)] then (read-item kind ts)
3663 $(its [i its], ts more)
3506 $(its [i its], ts more)
3664 ::
3507 ::
3665 :: +read-item: [ name= ] operand; a tuple's item may be named, a
3508 :: +read-item: [ name= ] operand; a tuple's item may be named, a
3666− :: change's must be, by a name or a wing, a list's is not
3509+ :: change's must be, a list's is not
3667 ::
3510 ::
3668 ++ read-item
3511 ++ read-item
3669 |= [kind=?(%tuple %list %change) ts=(list token)]
3512 |= [kind=?(%tuple %list %change) ts=(list token)]
3670− ^- (pare slot)
3513+ ^- (pare item)
3671− ?: &(?=([* * *] ts) (named-item kind ts))
3514+ ?: &(!?=(%list kind) ?=([[* * [%name *]] [* %& %'='] *] ts))
3672 =* nam i.ts
3515 =* nam i.ts
3673 =/ rest=(list token) t.t.ts
3516 =/ rest=(list token) t.t.ts
3674 ?: |(?=(~ rest) !tight.i.rest) (bad-space i.t.ts rest "a value")
3517 ?: |(?=(~ rest) !tight.i.rest) (bad-space i.t.ts rest "a value")
3675 ;< [v=expr after=(list token)] then (read-operand rest)
3518 ;< [v=expr after=(list token)] then (read-operand rest)
3676− [%& [[beg.at.nam end:(span-of v)] (names-of lex.nam) v] after]
3519+ [%& [[beg.at.nam end:(span-of v)] `p.lex.nam v] after]
3677 ?: ?=(%change kind) (unnamed ts)
3520 ?: ?=(%change kind) (unnamed ts)
3678 ?: &(?=(^ ts) (is-rune i.ts))
3521 ?: &(?=(^ ts) (is-rune i.ts))
3679 %: bad-in-why ts "an expression" operand-mask
3522 %: bad-in-why ts "an expression" operand-mask
@@ -3682,25 +3525,15 @@
3682 ;< [v=expr after=(list token)] then (read-operand ts)
3525 ;< [v=expr after=(list token)] then (read-operand ts)
3683 [%& [(span-of v) ~ v] after]
3526 [%& [(span-of v) ~ v] after]
3684 ::
3527 ::
3685− :: +named-item: whether ts begins an item's or a line's name=: a
3686− :: tuple's or a change's name, or a change's wing, then = tight
3687− ::
3688− ++ named-item
3689− |= [kind=?(%tuple %list %change %group) ts=(list token)]
3690− ^- ?
3691− ?. ?=([* [* %& %'='] *] ts) |
3692− ?: ?=([[* * [%name *]] *] ts) ?=(?(%tuple %change) kind)
3693− &(?=(%change kind) ?=([[* * [%wing *]] *] ts))
3694− ::
3695 :: +read-lines: after an open bracket's INDENT, its lines, an item
3528 :: +read-lines: after an open bracket's INDENT, its lines, an item
3696 :: each, to its DEDENT
3529 :: each, to its DEDENT
3697 ::
3530 ::
3698 ++ read-lines
3531 ++ read-lines
3699 |= [kind=?(%tuple %list %change %group) ts=(list token)]
3532 |= [kind=?(%tuple %list %change %group) ts=(list token)]
3700− ^- (pare (list slot))
3533+ ^- (pare (list item))
3701− =| ls=(list slot)
3534+ =| ls=(list item)
3702− |- ^- (pare (list slot))
3535+ |- ^- (pare (list item))
3703− ;< [l=slot after=(list token)] then (read-line kind ts)
3536+ ;< [l=item after=(list token)] then (read-line kind ts)
3704 ?: ?=([[* * %newline] *] after) $(ls [l ls], ts t.after)
3537 ?: ?=([[* * %newline] *] after) $(ls [l ls], ts t.after)
3705 ?: ?=([[* * %dedent] *] after) [%& (flop [l ls]) t.after]
3538 ?: ?=([[* * %dedent] *] after) [%& (flop [l ls]) t.after]
3706 ?. ?=([[* * ?(%')' %']')] *] after) (bad-end-in after (tail-can val.l))
3539 ?. ?=([[* * ?(%')' %']')] *] after) (bad-end-in after (tail-can val.l))
@@ -3727,20 +3560,22 @@
3727 "its items end at the first line that isn't deeper"
3560 "its items end at the first line that isn't deeper"
3728 ::
3561 ::
3729 :: +read-line: an open bracket's line, [ name= ] expr; a tuple's may
3562 :: +read-line: an open bracket's line, [ name= ] expr; a tuple's may
3730− :: be named, a change's must be, by a name or a wing, a list's and a
3563+ :: be named, a change's must be, a list's and a group's are not
3731− :: group's are not (doc question)
3564+ :: (doc question)
3732 ::
3565 ::
3733 ++ read-line
3566 ++ read-line
3734 |= [kind=?(%tuple %list %change %group) ts=(list token)]
3567 |= [kind=?(%tuple %list %change %group) ts=(list token)]
3735− ^- (pare slot)
3568+ ^- (pare item)
3736 =/ cf (closer-first ts "an item")
3569 =/ cf (closer-first ts "an item")
3737 ?^ cf u.cf
3570 ?^ cf u.cf
3738− ?: &(?=([* * *] ts) (named-item kind ts))
3571+ ?: ?& ?=(?(%tuple %change) kind)
3572+ ?=([[* * [%name *]] [* %& %'='] *] ts)
3573+ ==
3739 =* nam i.ts
3574 =* nam i.ts
3740 =/ rest=(list token) t.t.ts
3575 =/ rest=(list token) t.t.ts
3741 ?: |(?=(~ rest) !tight.i.rest) (bad-space i.t.ts rest "a value")
3576 ?: |(?=(~ rest) !tight.i.rest) (bad-space i.t.ts rest "a value")
3742 ;< [v=expr after=(list token)] then (read-expr rest)
3577 ;< [v=expr after=(list token)] then (read-expr rest)
3743− [%& [[beg.at.nam end:(span-of v)] (names-of lex.nam) v] after]
3578+ [%& [[beg.at.nam end:(span-of v)] `p.lex.nam v] after]
3744 ?: ?=(%change kind) (unnamed ts)
3579 ?: ?=(%change kind) (unnamed ts)
3745 ;< [v=expr after=(list token)] then (read-expr ts)
3580 ;< [v=expr after=(list token)] then (read-expr ts)
3746 [%& [(span-of v) ~ v] after]
3581 [%& [(span-of v) ~ v] after]
@@ -3777,11 +3612,10 @@
3777 %^ bad-why more (closing op ")")
3612 %^ bad-why more (closing op ")")
3778 "the wide gate's body is one operand, so a call goes in parentheses"
3613 "the wide gate's body is one operand, so a call goes in parentheses"
3779 ::
3614 ::
3780− :: +read-gate: |= sample, then an expression or a body; fin as for
3615+ :: +read-gate: |= sample, then an expression or a body
3781− :: +read-last
3782 ::
3616 ::
3783 ++ read-gate
3617 ++ read-gate
3784− |= [fin=? bar=token ts=(list token)]
3618+ |= [bar=token ts=(list token)]
3785 ^- (pare expr)
3619 ^- (pare expr)
3786 ?: &(?=(^ ts) tight.i.ts)
3620 ?: &(?=(^ ts) tight.i.ts)
3787 :: a % could begin a constructor's term, as |=%got
3621 :: a % could begin a constructor's term, as |=%got
@@ -3793,14 +3627,13 @@
3793 =/ dm (doomed ts after "an expression, or a body on deeper lines")
3627 =/ dm (doomed ts after "an expression, or a body on deeper lines")
3794 ?^ dm u.dm
3628 ?^ dm u.dm
3795 ;< [e=expr more=(list token)] then
3629 ;< [e=expr more=(list token)] then
3796− (read-expr-or-body fin "the sample" after)
3630+ (read-expr-or-body "the sample" after)
3797 [%& [%gate [beg.at.bar end:(span-of e)] s e] more]
3631 [%& [%gate [beg.at.bar end:(span-of e)] s e] more]
3798 ::
3632 ::
3799− :: +read-cast: ^- mold, then an expression or a body; fin as for
3633+ :: +read-cast: ^- mold, then an expression or a body
3800− :: +read-last
3801 ::
3634 ::
3802 ++ read-cast
3635 ++ read-cast
3803− |= [fin=? ket=token ts=(list token)]
3636+ |= [ket=token ts=(list token)]
3804 ^- (pare expr)
3637 ^- (pare expr)
3805 ?: &(?=(^ ts) tight.i.ts) (wide-rune "^-" ts)
3638 ?: &(?=(^ ts) tight.i.ts) (wide-rune "^-" ts)
3806 ;< [s=shape after=(list token)] then (read-mold ts)
3639 ;< [s=shape after=(list token)] then (read-mold ts)
@@ -3809,65 +3642,41 @@
3809 =/ dm (doomed ts after "an expression, or a body on deeper lines")
3642 =/ dm (doomed ts after "an expression, or a body on deeper lines")
3810 ?^ dm u.dm
3643 ?^ dm u.dm
3811 ;< [e=expr more=(list token)] then
3644 ;< [e=expr more=(list token)] then
3812− (read-expr-or-body fin "the mold" after)
3645+ (read-expr-or-body "the mold" after)
3813 [%& [%cast [beg.at.ket end:(span-of e)] s e] more]
3646 [%& [%cast [beg.at.ket end:(span-of e)] s e] more]
3814 ::
3647 ::
3815− :: +read-trace: ~& expr, then its body below, or, on a body's final
3648+ :: +read-trace: ~& expr, then its body below
3816− :: line (fin, +read-last), the rest of the body
3817 ::
3649 ::
3818 ++ read-trace
3650 ++ read-trace
3819− |= [fin=? sig=token ts=(list token)]
3651+ |= [sig=token ts=(list token)]
3820 ^- (pare expr)
3652 ^- (pare expr)
3821 ?: &(?=(^ ts) tight.i.ts) (wide-rune "~&" ts)
3653 ?: &(?=(^ ts) tight.i.ts) (wide-rune "~&" ts)
3822 ;< [v=expr after=(list token)] then (read-expr ts)
3654 ;< [v=expr after=(list token)] then (read-expr ts)
3655+ ?. ?=([[* * %indent] *] after)
3823− =/ dm (doomed ts after "`~&`'s body on deeper lines")
3656+ =/ dm (doomed ts after "`~&`'s body on deeper lines")
3824− ?^ dm u.dm
3657+ ?^ dm u.dm
3825− ;< [b=expr more=(list token)] then
3826− ?: ?=([[* * %indent] *] after) (read-body t.after)
3827− ?: &(fin ?=([[* * %newline] *] after)) (read-rest t.after)
3828 (bad after "`~&`'s body on deeper lines")
3658 (bad after "`~&`'s body on deeper lines")
3659+ ;< [b=expr more=(list token)] then (read-body t.after)
3829 [%& [%trace [beg.at.sig end:(span-of b)] v b] more]
3660 [%& [%trace [beg.at.sig end:(span-of b)] v b] more]
3830 ::
3661 ::
3831− :: +read-branch: ?- expr, then its arms below, one per line; or, when
3662+ :: +read-branch: ?- expr, then its arms below, one per line
3832− :: it begins a body's final line (fin, +read-last), at its own depth
3833− :: to the end of the body, whose DEDENT it leaves (+read-rest)
3834 ::
3663 ::
3835 ++ read-branch
3664 ++ read-branch
3836− |= [fin=? wut=token ts=(list token)]
3665+ |= [wut=token ts=(list token)]
3837 ^- (pare expr)
3666 ^- (pare expr)
3838 ?: &(?=(^ ts) tight.i.ts) (wide-rune "?-" ts)
3667 ?: &(?=(^ ts) tight.i.ts) (wide-rune "?-" ts)
3839 ;< [s=expr after=(list token)] then (read-expr ts)
3668 ;< [s=expr after=(list token)] then (read-expr ts)
3669+ ?. ?=([[* * %indent] *] after)
3840− =/ dm (doomed ts after "`?-`'s arms on deeper lines")
3670+ =/ dm (doomed ts after "`?-`'s arms on deeper lines")
3841− ?^ dm u.dm
3671+ ?^ dm u.dm
3842− ?. ?=([[* * ?(%indent %newline)] *] after)
3843 (bad after "`?-`'s arms on deeper lines")
3672 (bad after "`?-`'s arms on deeper lines")
3844− =/ flat=? ?=(%newline lex.i.after)
3845− ?: &(flat !fin) (bad after "`?-`'s arms on deeper lines")
3846 =| arms=(list arm)
3673 =| arms=(list arm)
3847 =/ rest=(list token) t.after
3674 =/ rest=(list token) t.after
3848 |- ^- (pare expr)
3675 |- ^- (pare expr)
3849− ;< [a=arm more=(list token)] then
3676+ ;< [a=arm more=(list token)] then (read-arm rest)
3850− ?:(flat (read-flat-arm rest) (read-arm rest))
3851 ?: ?=([[* * %newline] *] more) $(arms [a arms], rest t.more)
3677 ?: ?=([[* * %newline] *] more) $(arms [a arms], rest t.more)
3852 ?. ?=([[* * %dedent] *] more) (bad-end-in more (tail-can val.a))
3678 ?. ?=([[* * %dedent] *] more) (bad-end-in more (tail-can val.a))
3853− =/ at=span [beg.at.wut end.at.a]
3679+ [%& [%branch [beg.at.wut end.at.a] s (flop [a arms])] t.more]
3854− [%& [%branch at s (flop [a arms])] ?:(flat more t.more)]
3855− ::
3856− :: +read-flat-arm: +read-arm at its ?-'s depth, where a line that
3857− :: could begin the body's other lines gets a hint
3858− ::
3859− ++ read-flat-arm
3860− |= ts=(list token)
3861− ^- (pare arm)
3862− ?: ?=([[* * ?(%'++' %'+$')] *] ts)
3863− %: bad-in-why ts "a pattern" pattern-mask
3864− "a body's local definitions come before its final expression"
3865− ==
3866− ?: ?=([[* * ?(%'~&' %'^-')] *] ts)
3867− %: bad-in-why ts "a pattern" pattern-mask
3868− "a trace or cast goes in the arm's body"
3869− ==
3870− (read-arm ts)
3871 ::
3680 ::
3872 :: +read-arm: a pattern, then an expression or a body
3681 :: +read-arm: a pattern, then an expression or a body
3873 ::
3682 ::
@@ -3882,7 +3691,7 @@
3882 %^ bad-why after "a space after the pattern"
3691 %^ bad-why after "a space after the pattern"
3883 "patterns take no `name=`: a bare name binds, as [a b]"
3692 "patterns take no `name=`: a bare name binds, as [a b]"
3884 ;< [e=expr more=(list token)] then
3693 ;< [e=expr more=(list token)] then
3885− (read-expr-or-body | "the pattern" after)
3694+ (read-expr-or-body "the pattern" after)
3886 [%& [[beg:(span-of p) end:(span-of e)] p e] more]
3695 [%& [[beg:(span-of p) end:(span-of e)] p e] more]
3887 ::
3696 ::
3888 :: +read-pattern: a term, number, string, ship, loobean, ~, * or name,
3697 :: +read-pattern: a term, number, string, ship, loobean, ~, * or name,
@@ -4624,7 +4433,7 @@
4624++ outline-edit
4433++ outline-edit
4625 |= e=edit
4434 |= e=edit
4626 ^- outline
4435 ^- outline
4627− [%edit at.e ~[%name %wing] %kid ~[(outline-expr val.e)]]
4436+ [%edit at.e ~[%name] %kid ~[(outline-expr val.e)]]
4628::
4437::
4629++ outline-arm
4438++ outline-arm
4630 |= a=arm
4439 |= a=arm
@@ -4697,9 +4506,9 @@
4697::
4506::
4698:: Each case parses a source, checks that its spans pass, then moves
4507:: Each case parses a source, checks that its spans pass, then moves
4699:: the span of every node of a kind that starts at a place, as a
4508:: the span of every node of a kind that starts at a place, as a
4700−:: parser bug would, and checks that +check-spans says so.
4509+:: parser bug would, and checks that +check-spans says so. Run it as
4701−:: tests/lib/jibb-check-spans.hoon runs it, under eval with
4510+:: tools/hoon check-spans-test, which prints <<>> when every case
4702−:: tools/test-arms and on the ship.
4511+:: passes.
4703::
4512::
4704++ check-spans-test
4513++ check-spans-test
4705 ^- (list tape)
4514 ^- (list tape)
@@ -4798,13 +4607,8 @@
4798:: Atom constraints tied to an explicit capital or an inferred sample
4607:: Atom constraints tied to an explicit capital or an inferred sample
4799:: are generalized and printed. Other aura variables remain unsupported until
4608:: are generalized and printed. Other aura variables remain unsupported until
4800:: their defaulting and inferred generalization are implemented.
4609:: their defaulting and inferred generalization are implemented.
4801−:: Restricted-number promotion considers written capitals only; if there
4802−:: are none, it skips the otherwise unnecessary environment traversal.
4803:: Bare @ is a separate unrestricted atom type. A directional fit check
4610:: Bare @ is a separate unrestricted atom type. A directional fit check
4804−:: permits concrete atoms to widen to it, never the reverse. A bare
4611+:: permits concrete atoms to widen to it, never the reverse. A fit that
4805−:: decimal is a @ud: its variable binds only @ud or @u, it fits @ and *,
4806−:: and +decimal-misfit names it where it meets another aura (S4); a
4807−:: ++ generic over its aura generalizes it to any aura. A fit that
4808:: needs a not-yet-implemented constraint remains unsupported. Named unions
4612:: needs a not-yet-implemented constraint remains unsupported. Named unions
4809:: retain origin and ordered arguments, including phantom arguments, apart
4613:: retain origin and ordered arguments, including phantom arguments, apart
4810:: from their display name. Generic cases must be disjoint for all arguments.
4614:: from their display name. Generic cases must be disjoint for all arguments.
@@ -4824,14 +4628,6 @@
4824:: proofs to fewer than 1,024 cells; the projection planner has a separate
4628:: proofs to fewer than 1,024 cells; the projection planner has a separate
4825:: 4,096-step bound. These are inference limits, not language limits.
4629:: 4,096-step bound. These are inference limits, not language limits.
4826::
4630::
4827−:: `unface` is reserved with proj (+reserved-name) and is also handled by
4828−:: type: (unface e) has e's type with every face removed, through cells,
4829−:: gates and collection arguments, keeping unions and recursive molds
4830−:: whole (+itype-unface). It is not a value, it takes one argument, and
4831−:: a bare type variable is unsupported, as field access on one is. A ++
4832−:: whose body is (unface |= …) is a gate for recursion (+unfaced-gate).
4833−:: It lowers to its argument; no lowering is implemented yet.
4834−::
4835:: Supported API imports derive request-gate types atomically for multiple
4631:: Supported API imports derive request-gate types atomically for multiple
4836:: paths, including one typed segment or one diff fold per case. Their checked
4632:: paths, including one typed segment or one diff fold per case. Their checked
4837:: ordinary definitions, mark molds and supported poke constructor are also
4633:: ordinary definitions, mark molds and supported poke constructor are also
@@ -4860,8 +4656,7 @@
4860::
4656::
4861+$ itype
4657+$ itype
4862 $~ [%var 0]
4658 $~ [%var 0]
4863− $% [%var id=@ud]
4659+ $% [%var id=@ud]
4864− [%fvar id=@ud]
4865 [%avar id=@ud]
4660 [%avar id=@ud]
4866 [%rvar id=@ud]
4661 [%rvar id=@ud]
4867 [%nvar id=@ud]
4662 [%nvar id=@ud]
@@ -4870,13 +4665,11 @@
4870 [%any-atom ~]
4665 [%any-atom ~]
4871 [%flag ~]
4666 [%flag ~]
4872 [%noun ~]
4667 [%noun ~]
4873− [%empty ~]
4874 [%tag id=@ud literal=lit constructor=?]
4668 [%tag id=@ud literal=lit constructor=?]
4875 [%const literal=lit]
4669 [%const literal=lit]
4876 [%collection name=term args=(list itype)]
4670 [%collection name=term args=(list itype)]
4877 [%recursive module=term name=term label=(unit @t)]
4671 [%recursive module=term name=term label=(unit @t)]
4878 [%jrec at=path name=term label=(unit @t) head=term aura=@ta tail=term]
4672 [%jrec at=path name=term label=(unit @t) head=term aura=@ta tail=term]
4879− [%grec at=path name=term label=(unit @t) proof=shape args=(list itype)]
4880 [%union cases=(list itype) origin=(unit [at=path name=term]) label=(unit @t) args=(list itype)]
4673 [%union cases=(list itype) origin=(unit [at=path name=term]) label=(unit @t) args=(list itype)]
4881 [%face name=term body=itype]
4674 [%face name=term body=itype]
4882 [%fn sample=itype product=itype]
4675 [%fn sample=itype product=itype]
@@ -4884,7 +4677,7 @@
4884 ==
4677 ==
4885+$ ibinding [id=@ud val=itype]
4678+$ ibinding [id=@ud val=itype]
4886+$ isub (list ibinding)
4679+$ isub (list ibinding)
4887−+$ ipending [id=@ud literal=lit at=span]
4680++$ ipending [id=@ud literal=lit]
4888::
4681::
4889++ itype-lookup
4682++ itype-lookup
4890 |= [n=@ud sub=isub]
4683 |= [n=@ud sub=isub]
@@ -4897,128 +4690,44 @@
4897 |= [t=itype sub=isub]
4690 |= [t=itype sub=isub]
4898 ^- itype
4691 ^- itype
4899 ?+ -.t t
4692 ?+ -.t t
4900− ?(%var %fvar)
4693+ %var
4901 =/ found=(unit itype) (itype-lookup id.t sub)
4694 =/ found=(unit itype) (itype-lookup id.t sub)
4902 ?~ found t
4695 ?~ found t
4903− ?: &(|(?=(%fvar -.u.found) ?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4696+ ?: &(|(?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4904 $(t u.found)
4697 $(t u.found)
4905 %avar
4698 %avar
4906 =/ found=(unit itype) (itype-lookup id.t sub)
4699 =/ found=(unit itype) (itype-lookup id.t sub)
4907 ?~ found t
4700 ?~ found t
4908− ?: &(|(?=(%fvar -.u.found) ?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4701+ ?: &(|(?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4909 $(t u.found)
4702 $(t u.found)
4910 %rvar
4703 %rvar
4911 =/ found=(unit itype) (itype-lookup id.t sub)
4704 =/ found=(unit itype) (itype-lookup id.t sub)
4912 ?~ found t
4705 ?~ found t
4913− ?: &(|(?=(%fvar -.u.found) ?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4706+ ?: &(|(?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4914 $(t u.found)
4707 $(t u.found)
4915 %nvar
4708 %nvar
4916 =/ found=(unit itype) (itype-lookup id.t sub)
4709 =/ found=(unit itype) (itype-lookup id.t sub)
4917 ?~ found t
4710 ?~ found t
4918− ?: &(|(?=(%fvar -.u.found) ?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4711+ ?: &(|(?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4919 $(t u.found)
4712 $(t u.found)
4920 %rnvar
4713 %rnvar
4921 =/ found=(unit itype) (itype-lookup id.t sub)
4714 =/ found=(unit itype) (itype-lookup id.t sub)
4922 ?~ found t
4715 ?~ found t
4923− ?: &(|(?=(%fvar -.u.found) ?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4716+ ?: &(|(?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4924 $(t u.found)
4717 $(t u.found)
4925 %tag
4718 %tag
4926 =/ found=(unit itype) (itype-lookup id.t sub)
4719 =/ found=(unit itype) (itype-lookup id.t sub)
4927 ?~ found t
4720 ?~ found t
4928− ?: &(|(?=(%fvar -.u.found) ?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4721+ ?: &(|(?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4929 $(t u.found)
4722 $(t u.found)
4930 ==
4723 ==
4931::
4724::
4932−:: Prove only emptiness; unknown types are never treated as empty.
4933−:: A shared node budget bounds each proof attempt.
4934−++ itype-empty-cases
4935− |= [xs=(list itype) sub=isub fuel=@ud]
4936− ^- (unit [empty=? left=@ud])
4937− ?~ xs `[& fuel]
4938− =/ first=(unit [empty=? left=@ud]) (itype-empty-proof i.xs sub fuel)
4939− ?~ first ~
4940− ?. empty.u.first `[| left.u.first]
4941− $(xs t.xs, fuel left.u.first)
4942−++ itype-empty-proof
4943− |= [typ=itype sub=isub fuel=@ud]
4944− ^- (unit [empty=? left=@ud])
4945− ?: =(0 fuel) ~
4946− =. fuel (dec fuel)
4947− =. typ (itype-walk typ sub)
4948− ?- -.typ
4949− %empty `[& fuel]
4950− %face $(typ body.typ)
4951− %cell
4952− =/ left=(unit [empty=? left=@ud]) $(typ hed.typ)
4953− ?~ left ~
4954− ?: empty.u.left `[& left.u.left]
4955− $(typ tal.typ, fuel left.u.left)
4956− %union (itype-empty-cases cases.typ sub fuel)
4957− * `[| fuel]
4958− ==
4959−:: Prove reachability separately from emptiness. An unresolved fixed
4960−:: recursive type is not presumed inhabited. A written, still-unconstrained
4961−:: capital is existentially inhabited for pattern reachability; the normal
4962−:: definition-boundary checks reject subsequently constrained capitals.
4963−++ itype-inhabited-cases
4964− |= [xs=(list itype) sub=isub caps=icaps fuel=@ud pending=?]
4965− ^- (unit [result=?(%yes %no %unknown) left=@ud])
4966− ?~ xs `[?:(pending %unknown %no) fuel]
4967− =/ first=(unit [result=?(%yes %no %unknown) left=@ud])
4968− (itype-inhabited-proof i.xs sub caps fuel)
4969− ?~ first ~
4970− ?: =(%yes result.u.first) first
4971− $(xs t.xs, fuel left.u.first, pending |(pending =(%unknown result.u.first)))
4972−++ itype-inhabited-proof
4973− |= [typ=itype sub=isub caps=icaps fuel=@ud]
4974− ^- (unit [result=?(%yes %no %unknown) left=@ud])
4975− ?: =(0 fuel) ~
4976− =. fuel (dec fuel)
4977− =. typ (itype-walk typ sub)
4978− ?- -.typ
4979− %empty `[%no fuel]
4980− ?(%atom %any-atom %flag %const %noun %avar %rvar %nvar %rnvar %fn %jrec) `[%yes fuel]
4981− %fvar `[%unknown fuel]
4982− %var
4983− ?: (lien caps |=(c=icap (hole-same-variable typ (itype-walk [%var id.c] sub)))) `[%yes fuel]
4984− `[%unknown fuel]
4985− %face $(typ body.typ)
4986− %cell
4987− =/ head=(unit [result=?(%yes %no %unknown) left=@ud]) $(typ hed.typ)
4988− ?~ head ~
4989− ?: =(%no result.u.head) head
4990− =/ tail=(unit [result=?(%yes %no %unknown) left=@ud]) $(typ tal.typ, fuel left.u.head)
4991− ?~ tail ~
4992− ?: =(%no result.u.tail) tail
4993− ?: |(=(%unknown result.u.head) =(%unknown result.u.tail)) `[%unknown left.u.tail]
4994− `[%yes left.u.tail]
4995− %union (itype-inhabited-cases cases.typ sub caps fuel |)
4996− %collection
4997− ?. &(|(=(%list name.typ) =(%unit name.typ)) ?=([* ~] args.typ)) `[%unknown fuel]
4998− `[%yes fuel]
4999− %grec ?:((grec-tree-proof name.typ proof.typ) `[%yes fuel] `[%unknown fuel])
5000− * `[%unknown fuel]
5001− ==
5002−++ itype-live-cases
5003− |= [xs=(list itype) sub=isub caps=icaps fuel=@ud]
5004− ^- (unit (list itype))
5005− ?~ xs `~
5006− =/ first=(unit [result=?(%yes %no %unknown) left=@ud])
5007− (itype-inhabited-proof i.xs sub caps fuel)
5008− ?~ first ~
5009− ?: =(%unknown result.u.first) ~
5010− =/ rest=(unit (list itype)) $(xs t.xs, fuel left.u.first)
5011− ?~ rest ~
5012− ?: =(%no result.u.first) rest
5013− `[i.xs u.rest]
5014−::
5015++ itype-occurs
4725++ itype-occurs
5016 |= [n=@ud t=itype sub=isub]
4726 |= [n=@ud t=itype sub=isub]
5017 ^- ?
4727 ^- ?
5018 =. t (itype-walk t sub)
4728 =. t (itype-walk t sub)
5019 ?- -.t
4729 ?- -.t
5020 %var =(n id.t)
4730 %var =(n id.t)
5021− %fvar =(n id.t)
5022 %avar =(n id.t)
4731 %avar =(n id.t)
5023 %rvar =(n id.t)
4732 %rvar =(n id.t)
5024 %nvar =(n id.t)
4733 %nvar =(n id.t)
@@ -5027,13 +4736,11 @@
5027 %any-atom |
4736 %any-atom |
5028 %flag |
4737 %flag |
5029 %noun |
4738 %noun |
5030− %empty |
5031 %tag =(n id.t)
4739 %tag =(n id.t)
5032 %const |
4740 %const |
5033 %union |((lien cases.t |=(c=itype (itype-occurs n c sub))) (lien args.t |=(c=itype (itype-occurs n c sub))))
4741 %union |((lien cases.t |=(c=itype (itype-occurs n c sub))) (lien args.t |=(c=itype (itype-occurs n c sub))))
5034 %recursive |
4742 %recursive |
5035 %jrec |
4743 %jrec |
5036− %grec (lien args.t |=(c=itype (itype-occurs n c sub)))
5037 %collection (lien args.t |=(c=itype (itype-occurs n c sub)))
4744 %collection (lien args.t |=(c=itype (itype-occurs n c sub)))
5038 %face $(t body.t)
4745 %face $(t body.t)
5039 %fn |($(t sample.t) $(t product.t))
4746 %fn |($(t sample.t) $(t product.t))
@@ -5043,8 +4750,7 @@
5043:: +itype-unify: consistent substitutions, or ~ for a mismatch
4750:: +itype-unify: consistent substitutions, or ~ for a mismatch
5044::
4751::
5045:: Different concrete auras conflict. A variable may become an atom or
4752:: Different concrete auras conflict. A variable may become an atom or
5046−:: a function, but cannot contain itself. A decimal's variable binds
4753+:: a function, but cannot contain itself. Aura-only variables and faces
5047−:: only @ud or @u (+decimal-aura). Aura-only variables and faces
5048:: require further distinctions before this supports general Jibb.
4754:: require further distinctions before this supports general Jibb.
5049::
4755::
5050++ itype-unify
4756++ itype-unify
@@ -5053,9 +4759,6 @@
5053 =. a (itype-walk a sub)
4759 =. a (itype-walk a sub)
5054 =. b (itype-walk b sub)
4760 =. b (itype-walk b sub)
5055 ?: =(a b) `sub
4761 ?: =(a b) `sub
5056− ?: &(?=(%grec -.a) ?=(%grec -.b))
5057− ?. &(=(at.a at.b) =(name.a name.b)) ~
5058− (itype-unify-args args.a args.b sub)
5059 ?: &(?=(%jrec -.a) ?=(%jrec -.b))
4762 ?: &(?=(%jrec -.a) ?=(%jrec -.b))
5060 ?:(&(=(at.a at.b) =(name.a name.b) =(head.a head.b) =(aura.a aura.b) =(tail.a tail.b)) `sub ~)
4763 ?:(&(=(at.a at.b) =(name.a name.b) =(head.a head.b) =(aura.a aura.b) =(tail.a tail.b)) `sub ~)
5061 ?: &(?=(%recursive -.a) ?=(%recursive -.b))
4764 ?: &(?=(%recursive -.a) ?=(%recursive -.b))
@@ -5074,12 +4777,6 @@
5074 ?: ?=(%var -.b)
4777 ?: ?=(%var -.b)
5075 ?: (itype-occurs id.b a sub) ~
4778 ?: (itype-occurs id.b a sub) ~
5076 `[[id.b a] sub]
4779 `[[id.b a] sub]
5077− ?: ?=(%fvar -.a)
5078− ?: (itype-occurs id.a b sub) ~
5079− (itype-bind-gate-free id.a b sub)
5080− ?: ?=(%fvar -.b)
5081− ?: (itype-occurs id.b a sub) ~
5082− (itype-bind-gate-free id.b a sub)
5083 :: Arithmetic's aura variable excludes loobeans; decimal literals
4780 :: Arithmetic's aura variable excludes loobeans; decimal literals
5084 :: remain defaultable until a later constraint makes them concrete.
4781 :: remain defaultable until a later constraint makes them concrete.
5085 ?: &(?=(%nvar -.a) ?=(%rvar -.b))
4782 ?: &(?=(%nvar -.a) ?=(%rvar -.b))
@@ -5093,10 +4790,10 @@
5093 ?: &(?=(%rnvar -.a) ?=(%avar -.b)) `[[id.b a] sub]
4790 ?: &(?=(%rnvar -.a) ?=(%avar -.b)) `[[id.b a] sub]
5094 ?: &(?=(%avar -.a) ?=(%rnvar -.b)) `[[id.a b] sub]
4791 ?: &(?=(%avar -.a) ?=(%rnvar -.b)) `[[id.a b] sub]
5095 ?: ?=(%rnvar -.a)
4792 ?: ?=(%rnvar -.a)
5096− ?. |(?=(%rnvar -.b) &(?=(%atom -.b) (decimal-aura aura.b))) ~
4793+ ?. |(?=(%rnvar -.b) ?=(%atom -.b)) ~
5097 `[[id.a b] sub]
4794 `[[id.a b] sub]
5098 ?: ?=(%rnvar -.b)
4795 ?: ?=(%rnvar -.b)
5099− ?. &(?=(%atom -.a) (decimal-aura aura.a)) ~
4796+ ?. ?=(%atom -.a) ~
5100 `[[id.b a] sub]
4797 `[[id.b a] sub]
5101 ?: &(?=(%avar -.a) ?=(%rvar -.b)) `[[id.a b] sub]
4798 ?: &(?=(%avar -.a) ?=(%rvar -.b)) `[[id.a b] sub]
5102 ?: &(?=(%rvar -.a) ?=(%avar -.b)) `[[id.b a] sub]
4799 ?: &(?=(%rvar -.a) ?=(%avar -.b)) `[[id.b a] sub]
@@ -5107,15 +4804,14 @@
5107 ?. ?=(%atom -.a) ~
4804 ?. ?=(%atom -.a) ~
5108 `[[id.b a] sub]
4805 `[[id.b a] sub]
5109 :: The narrower decimal constraint survives a match with an atom
4806 :: The narrower decimal constraint survives a match with an atom
5110− :: variable; decimal syntax alone does not make it a loobean. A
4807+ :: variable; decimal syntax alone does not make it a loobean.
5111− :: concrete aura takes a decimal only if it is @ud or @u.
5112 ?: &(?=(%nvar -.a) ?=(%avar -.b)) `[[id.b a] sub]
4808 ?: &(?=(%nvar -.a) ?=(%avar -.b)) `[[id.b a] sub]
5113 ?: &(?=(%avar -.a) ?=(%nvar -.b)) `[[id.a b] sub]
4809 ?: &(?=(%avar -.a) ?=(%nvar -.b)) `[[id.a b] sub]
5114 ?: ?=(%nvar -.a)
4810 ?: ?=(%nvar -.a)
5115− ?. |(?=(%nvar -.b) &(?=(%atom -.b) (decimal-aura aura.b))) ~
4811+ ?. |(?=(%nvar -.b) ?=(%atom -.b)) ~
5116 `[[id.a b] sub]
4812 `[[id.a b] sub]
5117 ?: ?=(%nvar -.b)
4813 ?: ?=(%nvar -.b)
5118− ?. &(?=(%atom -.a) (decimal-aura aura.a)) ~
4814+ ?. ?=(%atom -.a) ~
5119 `[[id.b a] sub]
4815 `[[id.b a] sub]
5120 ?: ?=(%avar -.a)
4816 ?: ?=(%avar -.a)
5121 ?. |(?=(%avar -.b) ?=(%atom -.b) ?=(%any-atom -.b) ?=(%flag -.b)) ~
4817 ?. |(?=(%avar -.b) ?=(%atom -.b) ?=(%any-atom -.b) ?=(%flag -.b)) ~
@@ -5139,98 +4835,6 @@
5139 $(a tal.a, b tal.b, sub u.first)
4835 $(a tal.a, b tal.b, sub u.first)
5140 ~
4836 ~
5141::
4837::
5142−:: +itype-unface: t with every face removed, for (unface e)
5143−::
5144−:: It strips through cells, through a gate's sample and product and
5145−:: through a built-in collection's arguments, the prelude's unit
5146−:: included, walking bound variables. Other unions and recursive
5147−:: molds are compared by name or by their exact cases, so stripping
5148−:: inside them would stop them from fitting their own name: they are
5149−:: kept whole. An unbound variable stays, so faces it is bound to
5150−:: later are kept. The unit keeps its own u=, as a list keeps i= and
5151−:: t= in its mold.
5152−::
5153−++ itype-unface
5154− |= [t=itype sub=isub]
5155− ^- itype
5156− =. t (itype-walk t sub)
5157− ?+ -.t t
5158− %face $(t body.t)
5159− %cell [%cell $(t hed.t) $(t tal.t)]
5160− %fn [%fn $(t sample.t) $(t product.t)]
5161− %collection [%collection name.t (turn args.t |=(a=itype ^$(t a)))]
5162− %union
5163− ?. =(origin.t `[/lib/jibb/prelude/jibb %unit]) t
5164− ?. ?=([* ~] args.t) t
5165− =/ nil=itype [%const [%null %n 0 '~']]
5166− ?. =(cases.t ~[nil [%cell nil [%face %u i.args.t]]]) t
5167− =/ arg=itype $(t i.args.t)
5168− t(cases ~[nil [%cell nil [%face %u arg]]], args ~[arg])
5169− ==
5170−::
5171−+$ igf-form [typ=itype sub=isub left=@ud]
5172−+$ igf-forms [types=(list itype) sub=isub left=@ud]
5173−++ itype-gate-free-forms
5174− |= [xs=(list itype) sub=isub fuel=@ud]
5175− ^- (unit igf-forms)
5176− ?~ xs `[~ sub fuel]
5177− =/ head=(unit igf-form) (itype-gate-free-form i.xs sub fuel)
5178− ?~ head ~
5179− =/ tail=(unit igf-forms) $(xs t.xs, sub sub.u.head, fuel left.u.head)
5180− ?~ tail ~
5181− `[[typ.u.head types.u.tail] sub.u.tail left.u.tail]
5182−::
5183−++ itype-gate-free-form
5184− |= [t=itype sub=isub fuel=@ud]
5185− ^- (unit igf-form)
5186− ?: =(0 fuel) ~
5187− =. fuel (dec fuel)
5188− =. t (itype-walk t sub)
5189− ?- -.t
5190− %var
5191− =/ free=itype [%fvar id.t]
5192− `[free [[id.t free] sub] fuel]
5193− %fvar `[t sub fuel]
5194− ?(%atom %any-atom %flag %const %empty %avar %rvar %nvar %rnvar %jrec) `[t sub fuel]
5195− %face
5196− =/ body=(unit igf-form) $(t body.t, sub sub, fuel fuel)
5197− ?~ body ~
5198− `[[%face name.t typ.u.body] sub.u.body left.u.body]
5199− %cell
5200− =/ head=(unit igf-form) $(t hed.t, sub sub, fuel fuel)
5201− ?~ head ~
5202− =/ tail=(unit igf-form) $(t tal.t, sub sub.u.head, fuel left.u.head)
5203− ?~ tail ~
5204− `[[%cell typ.u.head typ.u.tail] sub.u.tail left.u.tail]
5205− %collection
5206− =/ args=(unit igf-forms) (itype-gate-free-forms args.t sub fuel)
5207− ?~ args ~
5208− `[[%collection name.t types.u.args] sub.u.args left.u.args]
5209− %union
5210− =/ cases=(unit igf-forms) (itype-gate-free-forms cases.t sub fuel)
5211− ?~ cases ~
5212− =/ args=(unit igf-forms) (itype-gate-free-forms args.t sub.u.cases left.u.cases)
5213− ?~ args ~
5214− `[[%union types.u.cases origin.t label.t types.u.args] sub.u.args left.u.args]
5215− * ~
5216− ==
5217−::
5218−++ itype-collection-keys
5219− |= [name=term args=(list itype) sub=isub]
5220− ^- (unit [types=(list itype) sub=isub])
5221− ?~ args `[~ sub]
5222− ?. |(?=(?(%set %map %mop %jar %jug) name)) `[args sub]
5223− =/ key=(unit igf-form) (itype-gate-free-form i.args sub 256)
5224− ?~ key ~
5225− `[[typ.u.key t.args] sub.u.key]
5226−::
5227−++ itype-bind-gate-free
5228− |= [n=@ud t=itype sub=isub]
5229− ^- (unit isub)
5230− =/ constrained=(unit igf-form) (itype-gate-free-form t sub 256)
5231− ?~ constrained ~
5232− `[[n typ.u.constrained] sub.u.constrained]
5233−::
5234++ itype-unify-args
4838++ itype-unify-args
5235 |= [as=(list itype) bs=(list itype) sub=isub]
4839 |= [as=(list itype) bs=(list itype) sub=isub]
5236 ^- (unit isub)
4840 ^- (unit isub)
@@ -5252,22 +4856,19 @@
5252 =. t (itype-walk t sub)
4856 =. t (itype-walk t sub)
5253 ?- -.t
4857 ?- -.t
5254 %var |
4858 %var |
5255− %fvar |
5256 %avar |
4859 %avar |
5257 %rvar |
4860 %rvar |
5258 %nvar |
4861 %nvar |
5259− %rnvar |
4862+ %rnvar |
5260 %atom |
4863 %atom |
5261 %any-atom &
4864 %any-atom &
5262 %flag |
4865 %flag |
5263 %noun |
4866 %noun |
5264− %empty |
5265 %tag |
4867 %tag |
5266 %const |
4868 %const |
5267 %union |((lien cases.t |=(c=itype (itype-has-any-atom c sub))) (lien args.t |=(c=itype (itype-has-any-atom c sub))))
4869 %union |((lien cases.t |=(c=itype (itype-has-any-atom c sub))) (lien args.t |=(c=itype (itype-has-any-atom c sub))))
5268 %recursive |
4870 %recursive |
5269 %jrec |
4871 %jrec |
5270− %grec (lien args.t |=(c=itype (itype-has-any-atom c sub)))
5271 %collection (lien args.t |=(c=itype (itype-has-any-atom c sub)))
4872 %collection (lien args.t |=(c=itype (itype-has-any-atom c sub)))
5272 %face $(t body.t)
4873 %face $(t body.t)
5273 %fn |($(t sample.t) $(t product.t))
4874 %fn |($(t sample.t) $(t product.t))
@@ -5289,16 +4890,6 @@
5289 ?. =(i.a i.b) |
4890 ?. =(i.a i.b) |
5290 $(a t.a, b t.b)
4891 $(a t.a, b t.b)
5291::
4892::
5292−:: +decimal-aura: whether a bare decimal fits an atom of this aura
5293−::
5294−:: A decimal is a @ud, so as in Hoon it fits @ud and its ancestors
5295−:: @u and @; every other aura takes its own literal (S4).
5296−::
5297−++ decimal-aura
5298− |= aura=@ta
5299− ^- ?
5300− (aura-prefix aura %ud)
5301−::
5302:: Related auras in a structural unification need a common-type rule;
4893:: Related auras in a structural unification need a common-type rule;
5303:: until that rule is implemented, report an unknown rather than error.
4894:: until that rule is implemented, report an unknown rather than error.
5304::
4895::
@@ -5339,7 +4930,6 @@
5339 ^- ?
4930 ^- ?
5340 ?- -.typ
4931 ?- -.typ
5341 %var |
4932 %var |
5342− %fvar |
5343 %avar |
4933 %avar |
5344 %rvar |
4934 %rvar |
5345 %nvar |
4935 %nvar |
@@ -5348,13 +4938,11 @@
5348 %any-atom &
4938 %any-atom &
5349 %flag &
4939 %flag &
5350 %noun |
4940 %noun |
5351− %empty |
5352 %tag &
4941 %tag &
5353 %const &
4942 %const &
5354 %union |((lien cases.typ |=(c=itype (itype-has-fixed-atom c))) (lien args.typ |=(c=itype (itype-has-fixed-atom c))))
4943 %union |((lien cases.typ |=(c=itype (itype-has-fixed-atom c))) (lien args.typ |=(c=itype (itype-has-fixed-atom c))))
5355 %recursive |
4944 %recursive |
5356 %jrec |
4945 %jrec |
5357− %grec (lien args.typ |=(c=itype (itype-has-fixed-atom c)))
5358 %collection (lien args.typ |=(c=itype (itype-has-fixed-atom c)))
4946 %collection (lien args.typ |=(c=itype (itype-has-fixed-atom c)))
5359 %face $(typ body.typ)
4947 %face $(typ body.typ)
5360 %fn |($(typ sample.typ) $(typ product.typ))
4948 %fn |($(typ sample.typ) $(typ product.typ))
@@ -5370,84 +4958,10 @@
5370 ?: (aura-prefix aura.a aura.b) `a
4958 ?: (aura-prefix aura.a aura.b) `a
5371 ?: (aura-prefix aura.b aura.a) `b
4959 ?: (aura-prefix aura.b aura.a) `b
5372 ~
4960 ~
5373− ?: &(?=(%any-atom -.a) |(?=(%atom -.b) ?=(%flag -.b) ?=(%const -.b) ?=(%avar -.b) ?=(%rvar -.b) ?=(%nvar -.b) ?=(%rnvar -.b))) `a
4961+ ?: &(?=(%any-atom -.a) |(?=(%atom -.b) ?=(%flag -.b))) `a
5374− ?: &(?=(%any-atom -.b) |(?=(%atom -.a) ?=(%flag -.a) ?=(%const -.a) ?=(%avar -.a) ?=(%rvar -.a) ?=(%nvar -.a) ?=(%rnvar -.a))) `b
4962+ ?: &(?=(%any-atom -.b) |(?=(%atom -.a) ?=(%flag -.a))) `b
5375 ~
4963 ~
5376::
4964::
5377−++ itype-branch-join
5378− |= [a=itype b=itype sub=isub]
5379− ^- (unit [typ=itype sub=isub])
5380− =/ unified=(unit isub) (itype-unify a b sub)
5381− ?^ unified `[(itype-normalize a u.unified) u.unified]
5382− =/ common=(unit itype) (itype-concrete-join a b sub)
5383− ?~ common ~
5384− `[u.common sub]
5385−::
5386−++ itype-branch-join-with
5387− |= [candidate=itype types=(list itype) sub=isub]
5388− ^- (unit [typ=itype sub=isub])
5389− ?~ types `[(itype-normalize candidate sub) sub]
5390− =/ joined=(unit [typ=itype sub=isub]) (itype-branch-join candidate i.types sub)
5391− ?~ joined ~
5392− $(candidate typ.u.joined, types t.types, sub sub.u.joined)
5393−::
5394−++ itype-branch-unify-list
5395− |= [types=(list itype) sub=isub]
5396− ^- (unit [typ=itype sub=isub])
5397− ?~ types ~
5398− =/ candidate=itype i.types
5399− =/ rest=(list itype) t.types
5400− |-
5401− ?~ rest `[(itype-normalize candidate sub) sub]
5402− =/ unified=(unit isub) (itype-unify candidate i.rest sub)
5403− ?~ unified ~
5404− $(candidate (itype-normalize candidate u.unified), rest t.rest, sub u.unified)
5405−::
5406−++ itype-branch-any-atom
5407− |= [types=(list itype) sub=isub]
5408− ^- (unit itype)
5409− ?~ types ~
5410− =/ typ=itype (itype-walk i.types sub)
5411− ?: ?=(%any-atom -.typ) `typ
5412− $(types t.types)
5413−::
5414−++ itype-branch-atom-parent
5415− |= [candidate=itype types=(list itype) sub=isub]
5416− ^- (unit itype)
5417− ?~ types `candidate
5418− =/ typ=itype (itype-walk i.types sub)
5419− ?. ?=(%atom -.typ) $(types t.types)
5420− =/ joined=(unit itype) (itype-concrete-join candidate typ sub)
5421− ?~ joined ~
5422− $(candidate u.joined, types t.types)
5423−::
5424−++ itype-branch-atom-candidates
5425− |= [candidates=(list itype) types=(list itype) sub=isub]
5426− ^- (unit itype)
5427− ?~ candidates ~
5428− =/ candidate=itype (itype-walk i.candidates sub)
5429− ?. ?=(%atom -.candidate) $(candidates t.candidates)
5430− =/ parent=(unit itype) (itype-branch-atom-parent candidate types sub)
5431− ?^ parent parent
5432− $(candidates t.candidates)
5433−::
5434−++ itype-branch-parent
5435− |= [types=(list itype) sub=isub]
5436− ^- (unit itype)
5437− =/ unrestricted=(unit itype) (itype-branch-any-atom types sub)
5438− ?^ unrestricted unrestricted
5439− (itype-branch-atom-candidates types types sub)
5440−::
5441−++ itype-branch-join-list
5442− |= [types=(list itype) sub=isub]
5443− ^- (unit [typ=itype sub=isub])
5444− ?~ types ~
5445− =/ unified=(unit [typ=itype sub=isub]) (itype-branch-unify-list types sub)
5446− ?^ unified unified
5447− =/ parent=(unit itype) (itype-branch-parent types sub)
5448− ?~ parent ~
5449− (itype-branch-join-with u.parent types sub)
5450−::
5451:: Unifying an already-bound tuple with a faced position would need to
4965:: Unifying an already-bound tuple with a faced position would need to
5452:: update the bound type. Until substitutions can retain that information,
4966:: update the bound type. Until substitutions can retain that information,
5453:: variable-dependent face merges stay unresolved.
4967:: variable-dependent face merges stay unresolved.
@@ -5457,7 +4971,6 @@
5457 ^- ?
4971 ^- ?
5458 =. t (itype-walk t sub)
4972 =. t (itype-walk t sub)
5459 ?- -.t
4973 ?- -.t
5460− %grec (lien args.t |=(c=itype (itype-has-face c sub)))
5461 %collection (lien args.t |=(c=itype (itype-has-face c sub)))
4974 %collection (lien args.t |=(c=itype (itype-has-face c sub)))
5462 %face &
4975 %face &
5463 %cell |($(t hed.t) $(t tal.t))
4976 %cell |($(t hed.t) $(t tal.t))
@@ -5514,15 +5027,12 @@
5514 ^- ?
5027 ^- ?
5515 =. a (itype-walk a sub)
5028 =. a (itype-walk a sub)
5516 =. b (itype-walk b sub)
5029 =. b (itype-walk b sub)
5517− ?: &(?=(%grec -.a) ?=(%grec -.b))
5518− ?. &(=(at.a at.b) =(name.a name.b)) |
5519− (itype-face-asym-collection-args args.a args.b sub)
5520 ?: &(?=(%collection -.a) ?=(%collection -.b))
5030 ?: &(?=(%collection -.a) ?=(%collection -.b))
5521 ?. =(name.a name.b) |
5031 ?. =(name.a name.b) |
5522 (itype-face-asym-collection-args args.a args.b sub)
5032 (itype-face-asym-collection-args args.a args.b sub)
5523 ?: &(?=(%face -.a) ?=(%face -.b)) $(a body.a, b body.b)
5033 ?: &(?=(%face -.a) ?=(%face -.b)) $(a body.a, b body.b)
5524− ?: ?=(%face -.a) !|(?=(%var -.b) ?=(%fvar -.b) ?=(%avar -.b) ?=(%rvar -.b) |(?=(%nvar -.b) ?=(%rnvar -.b)))
5034+ ?: ?=(%face -.a) !|(?=(%var -.b) ?=(%avar -.b) ?=(%rvar -.b) |(?=(%nvar -.b) ?=(%rnvar -.b)))
5525− ?: ?=(%face -.b) !|(?=(%var -.a) ?=(%fvar -.a) ?=(%avar -.a) ?=(%rvar -.a) |(?=(%nvar -.a) ?=(%rnvar -.a)))
5035+ ?: ?=(%face -.b) !|(?=(%var -.a) ?=(%avar -.a) ?=(%rvar -.a) |(?=(%nvar -.a) ?=(%rnvar -.a)))
5526 ?: &(?=(%cell -.a) ?=(%cell -.b)) |($(a hed.a, b hed.b) $(a tal.a, b tal.b))
5036 ?: &(?=(%cell -.a) ?=(%cell -.b)) |($(a hed.a, b hed.b) $(a tal.a, b tal.b))
5527 ?: &(?=(%fn -.a) ?=(%fn -.b)) |($(a sample.a, b sample.b) $(a product.a, b product.b))
5037 ?: &(?=(%fn -.a) ?=(%fn -.b)) |($(a sample.a, b sample.b) $(a product.a, b product.b))
5528 |
5038 |
@@ -5579,7 +5089,6 @@
5579 %union &
5089 %union &
5580 %recursive &
5090 %recursive &
5581 %jrec &
5091 %jrec &
5582− %grec &
5583 %noun &
5092 %noun &
5584 %collection &
5093 %collection &
5585 %face $(t body.t)
5094 %face $(t body.t)
@@ -5594,13 +5103,6 @@
5594 ?~ (itype-lookup id.i.tags sub) &
5103 ?~ (itype-lookup id.i.tags sub) &
5595 $(tags t.tags)
5104 $(tags t.tags)
5596::
5105::
5597−++ pending-tag-diagnostic
5598− |= [tags=(list ipending) sub=isub]
5599− ^- (unit [at=span msg=tape])
5600− ?~ tags ~
5601− ?^ (itype-lookup id.i.tags sub) $(tags t.tags)
5602− `[at.i.tags (weld "nothing fixes the union of " (show-lit literal.i.tags))]
5603−::
5604++ pending-null
5106++ pending-null
5605 |= [tags=(list ipending) sub=isub]
5107 |= [tags=(list ipending) sub=isub]
5606 ^- ?
5108 ^- ?
@@ -5616,7 +5118,6 @@
5616 ^- ?
5118 ^- ?
5617 ?- -.t
5119 ?- -.t
5618 %tag &
5120 %tag &
5619− %grec (lien args.t |=(c=itype (itype-has-tag c)))
5620 %collection (lien args.t |=(c=itype (itype-has-tag c)))
5121 %collection (lien args.t |=(c=itype (itype-has-tag c)))
5621 %face $(t body.t)
5122 %face $(t body.t)
5622 %fn |($(t sample.t) $(t product.t))
5123 %fn |($(t sample.t) $(t product.t))
@@ -5630,7 +5131,6 @@
5630 ^- ?
5131 ^- ?
5631 ?- -.t
5132 ?- -.t
5632 %union &
5133 %union &
5633− %grec (lien args.t |=(c=itype (itype-has-union c)))
5634 %collection (lien args.t |=(c=itype (itype-has-union c)))
5134 %collection (lien args.t |=(c=itype (itype-has-union c)))
5635 %face $(t body.t)
5135 %face $(t body.t)
5636 %fn |($(t sample.t) $(t product.t))
5136 %fn |($(t sample.t) $(t product.t))
@@ -5649,7 +5149,6 @@
5649 %union
5149 %union
5650 ?: &(?=(~ label.t) ?=(^ args.t)) &
5150 ?: &(?=(~ label.t) ?=(^ args.t)) &
5651 (lien (weld args.t cases.t) |=(c=itype (itype-has-hidden-generic c)))
5151 (lien (weld args.t cases.t) |=(c=itype (itype-has-hidden-generic c)))
5652− %grec |(?=(~ label.t) (lien args.t |=(c=itype (itype-has-hidden-generic c))))
5653 %collection (lien args.t |=(c=itype (itype-has-hidden-generic c)))
5152 %collection (lien args.t |=(c=itype (itype-has-hidden-generic c)))
5654 %face $(t body.t)
5153 %face $(t body.t)
5655 %fn |($(t sample.t) $(t product.t))
5154 %fn |($(t sample.t) $(t product.t))
@@ -5663,7 +5162,6 @@
5663 ?- -.t
5162 ?- -.t
5664 %recursive &
5163 %recursive &
5665 %jrec &
5164 %jrec &
5666− %grec &
5667 %collection (lien args.t |=(c=itype (itype-has-recursive c)))
5165 %collection (lien args.t |=(c=itype (itype-has-recursive c)))
5668 %union (lien (weld args.t cases.t) |=(c=itype (itype-has-recursive c)))
5166 %union (lien (weld args.t cases.t) |=(c=itype (itype-has-recursive c)))
5669 %face $(t body.t)
5167 %face $(t body.t)
@@ -5678,7 +5176,6 @@
5678 ?- -.t
5176 ?- -.t
5679 %recursive ?=(~ label.t)
5177 %recursive ?=(~ label.t)
5680 %jrec ?=(~ label.t)
5178 %jrec ?=(~ label.t)
5681− %grec |(?=(~ label.t) (lien args.t |=(c=itype (itype-has-hidden-recursive c))))
5682 %collection (lien args.t |=(c=itype (itype-has-hidden-recursive c)))
5179 %collection (lien args.t |=(c=itype (itype-has-hidden-recursive c)))
5683 %union (lien (weld args.t cases.t) |=(c=itype (itype-has-hidden-recursive c)))
5180 %union (lien (weld args.t cases.t) |=(c=itype (itype-has-hidden-recursive c)))
5684 %face $(t body.t)
5181 %face $(t body.t)
@@ -5724,7 +5221,7 @@
5724 ?: ?=(%var -.raw)
5221 ?: ?=(%var -.raw)
5725 $(cases t.cases, pending &)
5222 $(cases t.cases, pending &)
5726 =/ c=itype (itype-walk raw sub)
5223 =/ c=itype (itype-walk raw sub)
5727− ?: ?=(?(%var %tag %recursive %jrec %grec %union %face) -.c)
5224+ ?: ?=(?(%var %tag %recursive %jrec %union %face) -.c)
5728 $(cases t.cases, pending &)
5225 $(cases t.cases, pending &)
5729 ?. ?=(%cell -.c) $(cases t.cases)
5226 ?. ?=(%cell -.c) $(cases t.cases)
5730 =/ raw-head=itype hed.c
5227 =/ raw-head=itype hed.c
@@ -5737,7 +5234,7 @@
5737 ?: ?=(?(%atom %any-atom %flag %avar %rvar %nvar %rnvar) -.body.head)
5234 ?: ?=(?(%atom %any-atom %flag %avar %rvar %nvar %rnvar) -.body.head)
5738 $(cases t.cases)
5235 $(cases t.cases)
5739 $(cases t.cases, pending &)
5236 $(cases t.cases, pending &)
5740− ?: ?=(?(%var %tag %recursive %jrec %grec %union) -.head)
5237+ ?: ?=(?(%var %tag %recursive %jrec %union) -.head)
5741 $(cases t.cases, pending &)
5238 $(cases t.cases, pending &)
5742 ?. ?=(%const -.head) $(cases t.cases)
5239 ?. ?=(%const -.head) $(cases t.cases)
5743 ?. =(val.literal.head val.tag) $(cases t.cases)
5240 ?. =(val.literal.head val.tag) $(cases t.cases)
@@ -5755,14 +5252,7 @@
5755++ itype-fit
5252++ itype-fit
5756 |= [actual=itype expected=itype sub=isub next=@ud]
5253 |= [actual=itype expected=itype sub=isub next=@ud]
5757 ^- ifit
5254 ^- ifit
5758− =/ result=ifit (itype-fit-inner actual expected sub next | |)
5255+ (itype-fit-inner actual expected sub next | |)
5759− ?: ?=(%ok -.result) result
5760− =/ source=itype (itype-walk actual sub)
5761− ?. ?=(?(%empty %face %cell %union) -.source) result
5762− =/ empty=(unit [empty=? left=@ud]) (itype-empty-proof actual sub 256)
5763− ?~ empty [%unknown ~]
5764− ?: empty.u.empty [%ok sub next]
5765− result
5766++ itype-fit-inner
5256++ itype-fit-inner
5767 |= [actual=itype expected=itype sub=isub next=@ud skip-width=? spine-proof=?]
5257 |= [actual=itype expected=itype sub=isub next=@ud skip-width=? spine-proof=?]
5768 ^- ifit
5258 ^- ifit
@@ -5775,13 +5265,12 @@
5775 ?: too-wide [%unknown ~]
5265 ?: too-wide [%unknown ~]
5776 =/ spine-checked=? |(spine-proof ?=(^ known))
5266 =/ spine-checked=? |(spine-proof ?=(^ known))
5777 =/ uncertain=?
5267 =/ uncertain=?
5778− |(?=(%var -.actual) ?=(%fvar -.actual) ?=(%avar -.actual) ?=(%rvar -.actual) |(?=(%nvar -.actual) ?=(%rnvar -.actual)) ?=(%var -.expected) ?=(%fvar -.expected) ?=(%avar -.expected) ?=(%rvar -.expected) |(?=(%nvar -.expected) ?=(%rnvar -.expected)))
5268+ |(?=(%var -.actual) ?=(%avar -.actual) ?=(%rvar -.actual) |(?=(%nvar -.actual) ?=(%rnvar -.actual)) ?=(%var -.expected) ?=(%avar -.expected) ?=(%rvar -.expected) |(?=(%nvar -.expected) ?=(%rnvar -.expected)))
5779 =/ actual-open=?
5269 =/ actual-open=?
5780− |(?=(%var -.actual) ?=(%fvar -.actual) ?=(%avar -.actual) ?=(%rvar -.actual) |(?=(%nvar -.actual) ?=(%rnvar -.actual)))
5270+ |(?=(%var -.actual) ?=(%avar -.actual) ?=(%rvar -.actual) |(?=(%nvar -.actual) ?=(%rnvar -.actual)))
5781 =. actual (itype-walk actual sub)
5271 =. actual (itype-walk actual sub)
5782 =. expected (itype-walk expected sub)
5272 =. expected (itype-walk expected sub)
5783 ?: =(actual expected) [%ok sub next]
5273 ?: =(actual expected) [%ok sub next]
5784− ?: &(?=(%empty -.expected) |(?=(%cell -.actual) ?=(%face -.actual) ?=(%union -.actual) ?=(%grec -.actual) ?=(%recursive -.actual))) [%unknown ~]
5785 :: The relation of the source loobean mold to explicit @f is not yet
5274 :: The relation of the source loobean mold to explicit @f is not yet
5786 :: established. Keep it unsupported rather than asserting a mismatch.
5275 :: established. Keep it unsupported rather than asserting a mismatch.
5787 ?: &(?=(%flag -.actual) ?=(%atom -.expected) =(%f aura.expected)) [%unknown ~]
5276 ?: &(?=(%flag -.actual) ?=(%atom -.expected) =(%f aura.expected)) [%unknown ~]
@@ -5794,14 +5283,6 @@
5794 [%ok sub next]
5283 [%ok sub next]
5795 :: An arbitrary noun is not known to fit a narrower type.
5284 :: An arbitrary noun is not known to fit a narrower type.
5796 ?: &(?=(%noun -.actual) !?=(%var -.expected)) [%unknown ~]
5285 ?: &(?=(%noun -.actual) !?=(%var -.expected)) [%unknown ~]
5797− ?: &(!uncertain ?=(%grec -.actual) ?=(%face -.expected)) $(expected body.expected)
5798− ?: &(!uncertain ?=(%face -.actual) ?=(%grec -.expected)) $(actual body.actual)
5799− ?: &(?=(%grec -.actual) ?=(%grec -.expected))
5800− ?. &(=(at.actual at.expected) =(name.actual name.expected)) [%unknown ~]
5801− =/ matched=(unit isub) (itype-unify-args args.actual args.expected sub)
5802− ?~ matched [%unknown ~]
5803− [%ok u.matched next]
5804− ?: &(|(?=(%grec -.actual) ?=(%grec -.expected)) !|(?=(%var -.actual) ?=(%var -.expected))) [%unknown ~]
5805 ?: &(!uncertain ?=(%jrec -.actual) ?=(%face -.expected)) $(expected body.expected)
5286 ?: &(!uncertain ?=(%jrec -.actual) ?=(%face -.expected)) $(expected body.expected)
5806 ?: &(!uncertain ?=(%face -.actual) ?=(%jrec -.expected)) $(actual body.actual)
5287 ?: &(!uncertain ?=(%face -.actual) ?=(%jrec -.expected)) $(actual body.actual)
5807 ?: &(?=(%jrec -.actual) ?=(%jrec -.expected))
5288 ?: &(?=(%jrec -.actual) ?=(%jrec -.expected))
@@ -5832,7 +5313,7 @@
5832 ?: &(!uncertain ?=(%union -.actual) ?=(%face -.expected))
5313 ?: &(!uncertain ?=(%union -.actual) ?=(%face -.expected))
5833 $(expected body.expected)
5314 $(expected body.expected)
5834 ?: ?=(%union -.actual) [%unknown ~]
5315 ?: ?=(%union -.actual) [%unknown ~]
5835− ?: &(?=(%union -.expected) |(?=(%fvar -.actual) ?=(%avar -.actual) ?=(%rvar -.actual) |(?=(%nvar -.actual) ?=(%rnvar -.actual)))) [%unknown ~]
5316+ ?: &(?=(%union -.expected) |(?=(%avar -.actual) ?=(%rvar -.actual) |(?=(%nvar -.actual) ?=(%rnvar -.actual)))) [%unknown ~]
5836 ?: &(?=(%union -.expected) !?=(%var -.actual))
5317 ?: &(?=(%union -.expected) !?=(%var -.actual))
5837 (itype-fit-cases actual cases.expected sub next)
5318 (itype-fit-cases actual cases.expected sub next)
5838 ?: ?=(%tag -.actual)
5319 ?: ?=(%tag -.actual)
@@ -5840,7 +5321,7 @@
5840 =/ u=(unit isub) (itype-unify actual expected sub)
5321 =/ u=(unit isub) (itype-unify actual expected sub)
5841 ?~ u [%bad ~]
5322 ?~ u [%bad ~]
5842 [%ok u.u next]
5323 [%ok u.u next]
5843− ?: |(?=(%fvar -.expected) ?=(%avar -.expected) ?=(%rvar -.expected) |(?=(%nvar -.expected) ?=(%rnvar -.expected))) [%unknown ~]
5324+ ?: |(?=(%avar -.expected) ?=(%rvar -.expected) |(?=(%nvar -.expected) ?=(%rnvar -.expected))) [%unknown ~]
5844 ?: ?=(%face -.expected) $(expected body.expected)
5325 ?: ?=(%face -.expected) $(expected body.expected)
5845 ?: constructor.actual
5326 ?: constructor.actual
5846 ?. ?=(%fn -.expected) [%bad ~]
5327 ?. ?=(%fn -.expected) [%bad ~]
@@ -5868,7 +5349,7 @@
5868 =/ u=(unit isub) (itype-unify actual expected sub)
5349 =/ u=(unit isub) (itype-unify actual expected sub)
5869 ?~ u [%bad ~]
5350 ?~ u [%bad ~]
5870 [%ok u.u next]
5351 [%ok u.u next]
5871− ?: |(?=(%fvar -.expected) ?=(%avar -.expected) ?=(%rvar -.expected) |(?=(%nvar -.expected) ?=(%rnvar -.expected))) [%unknown ~]
5352+ ?: |(?=(%avar -.expected) ?=(%rvar -.expected) |(?=(%nvar -.expected) ?=(%rnvar -.expected))) [%unknown ~]
5872 ?: ?=(%face -.expected) $(expected body.expected)
5353 ?: ?=(%face -.expected) $(expected body.expected)
5873 ?: &(?=(%collection -.expected) =(%list name.expected) =(0 val.literal.actual))
5354 ?: &(?=(%collection -.expected) =(%list name.expected) =(0 val.literal.actual))
5874 [%unknown ~]
5355 [%unknown ~]
@@ -5885,13 +5366,6 @@
5885 ?:(|(=(0 val.literal.actual) =(1 val.literal.actual)) [%ok sub next] [%bad ~])
5366 ?:(|(=(0 val.literal.actual) =(1 val.literal.actual)) [%ok sub next] [%bad ~])
5886 ?: ?=(%any-atom -.expected) [%ok sub next]
5367 ?: ?=(%any-atom -.expected) [%ok sub next]
5887 [%bad ~]
5368 [%bad ~]
5888− :: A field on an expected sample slot labels the value's type; it does
5889− :: not become a face on the actual argument. Unify with the slot body
5890− :: rather than binding either variable to the face around the other.
5891− ?: &(?=(%var -.actual) ?=(%face -.expected))
5892− =/ unified=(unit isub) (itype-unify actual body.expected sub)
5893− ?~ unified [%unknown ~]
5894− [%ok u.unified next]
5895 ?: &(uncertain (itype-face-asym actual expected sub)) [%unknown ~]
5369 ?: &(uncertain (itype-face-asym actual expected sub)) [%unknown ~]
5896 :: A known face labels the same noun. Peel it before applying the
5370 :: A known face labels the same noun. Peel it before applying the
5897 :: directional unrestricted-atom rule, preserving raw-variable guards.
5371 :: directional unrestricted-atom rule, preserving raw-variable guards.
@@ -5911,7 +5385,7 @@
5911 =/ unified=(unit isub) (itype-unify actual expected sub)
5385 =/ unified=(unit isub) (itype-unify actual expected sub)
5912 ?~ unified [%bad ~]
5386 ?~ unified [%bad ~]
5913 [%ok u.unified next]
5387 [%ok u.unified next]
5914− ?: |(?=(%fvar -.expected) ?=(%avar -.expected) ?=(%rvar -.expected) |(?=(%nvar -.expected) ?=(%rnvar -.expected))) [%unknown ~]
5388+ ?: |(?=(%avar -.expected) ?=(%rvar -.expected) |(?=(%nvar -.expected) ?=(%rnvar -.expected))) [%unknown ~]
5915 [%bad ~]
5389 [%bad ~]
5916 ?: &(?=(%atom -.actual) ?=(%atom -.expected))
5390 ?: &(?=(%atom -.actual) ?=(%atom -.expected))
5917 ?: (aura-prefix aura.expected aura.actual) [%ok sub next]
5391 ?: (aura-prefix aura.expected aura.actual) [%ok sub next]
@@ -5921,10 +5395,18 @@
5921 =/ first=ifit $(actual hed.actual, expected hed.expected, skip-width |, spine-proof |)
5395 =/ first=ifit $(actual hed.actual, expected hed.expected, skip-width |, spine-proof |)
5922 ?. ?=(%ok -.first) first
5396 ?. ?=(%ok -.first) first
5923 $(actual tal.actual, expected tal.expected, sub sub.first, next next.first, skip-width spine-checked, spine-proof spine-checked)
5397 $(actual tal.actual, expected tal.expected, sub sub.first, next next.first, skip-width spine-checked, spine-proof spine-checked)
5398+ :: A field may add a face to an occurrence of the very same type
5399+ :: variable. Binding that variable to a face around itself would fail
5400+ :: the occurs check, but its underlying type has already matched.
5401+ ?: &(?=(%var -.actual) ?=(%face -.expected) =(actual (itype-walk body.expected sub)))
5402+ [%ok sub next]
5403+ :: Differing variables and faces need propagation that is not yet
5404+ :: represented. Binding one to the face can create a false mismatch.
5405+ ?: &(?=(%var -.actual) ?=(%face -.expected)) [%unknown ~]
5924 ?: &(?=(%face -.actual) ?=(%var -.expected)) [%unknown ~]
5406 ?: &(?=(%face -.actual) ?=(%var -.expected)) [%unknown ~]
5925 ?: &(?=(%var -.actual) (itype-has-any-atom expected sub))
5407 ?: &(?=(%var -.actual) (itype-has-any-atom expected sub))
5926 [%unknown ~]
5408 [%unknown ~]
5927− ?: |(?=(%var -.actual) ?=(%var -.expected) ?=(%fvar -.expected))
5409+ ?: |(?=(%var -.actual) ?=(%var -.expected))
5928 =/ unified=(unit isub) (itype-unify actual expected sub)
5410 =/ unified=(unit isub) (itype-unify actual expected sub)
5929 ?~ unified
5411 ?~ unified
5930 ?: |(?=(%face -.actual) ?=(%face -.expected)) [%unknown ~]
5412 ?: |(?=(%face -.actual) ?=(%face -.expected)) [%unknown ~]
@@ -6004,54 +5486,6 @@
6004 (itype-fit [%collection %list ~[a]] list-t ~[[0 recursive]] 1)
5486 (itype-fit [%collection %list ~[a]] list-t ~[[0 recursive]] 1)
6005 =? problems !?=(%unknown -.nested-fit)
5487 =? problems !?=(%unknown -.nested-fit)
6006 ["recursive types behind substitutions should remain uncertain" problems]
5488 ["recursive types behind substitutions should remain uncertain" problems]
6007− =/ free=itype [%fvar 40]
6008− =/ open-cell=itype [%cell [%var 41] [%face %x [%var 42]]]
6009− =/ constrained=(unit isub) (itype-unify free open-cell ~)
6010− =/ expected-cell=itype [%cell [%fvar 41] [%face %x [%fvar 42]]]
6011− =? problems !=(constrained [~ [[40 expected-cell] [[42 [%fvar 42]] [[41 [%fvar 41]] ~]]]])
6012− ["gate-free constraints should propagate through cells and faces" problems]
6013− =? problems ?=(^ (itype-unify free open-cell ~[[41 [%fn txt txt]]]))
6014− ["an existing nested gate substitution should be rejected" problems]
6015− =/ shared-sub=isub [[42 [%fvar 42]] [[41 [%fvar 41]] ~]]
6016− =? problems ?=(^ (itype-unify [%var 41] [%fn txt txt] shared-sub))
6017− ["a later nested gate substitution should be rejected" problems]
6018− =? problems ?=(^ (itype-unify free [%fn txt txt] ~))
6019− ["a gate-free variable should reject a gate" problems]
6020− =? problems ?=(^ (itype-unify free [%noun ~] ~))
6021− ["a gate-free variable should reject an opaque noun" problems]
6022− =/ atom-strong=(unit isub) (itype-unify [%avar 43] free ~)
6023− =? problems !=(atom-strong [~ [[40 [%avar 43]] ~]])
6024− ["the atom constraint should be stronger than gate-free" problems]
6025− =/ free-fit=ifit (itype-fit txt free ~ 44)
6026− =? problems !?=(%ok -.free-fit)
6027− ["a concrete atom should fit a gate-free variable" problems]
6028− =/ gate-fit=ifit (itype-fit [%fn txt txt] free ~ 44)
6029− =? problems !?=(%bad -.gate-fit)
6030− ["a gate should not fit a gate-free variable" problems]
6031− =/ free-scheme=ischeme [[%fn free free] ~[40]]
6032− =/ canonical-free=itype (canonical-itype typ.free-scheme vars.free-scheme)
6033− =? problems !=(canonical-free [%fn [%fvar 0] [%fvar 0]])
6034− ["canonicalization should retain gate-free variables" problems]
6035− =? problems !=((show-atom-constraint canonical-free) " where A contains no gates")
6036− ["the printer should show gate-free constraints" problems]
6037− =/ decimal=itype [%nvar 50]
6038− =? problems ?=(~ (itype-unify decimal num ~))
6039− ["a decimal should unify with @ud" problems]
6040− =? problems ?=(~ (itype-unify [%atom %u] decimal ~))
6041− ["a decimal should unify with @u" problems]
6042− =? problems ?=(^ (itype-unify decimal [%atom %dr] ~))
6043− ["a decimal should not unify with @dr" problems]
6044− =? problems ?=(^ (itype-unify [%atom %ux] decimal ~))
6045− ["a decimal should not unify with @ux" problems]
6046− =/ restricted=(unit isub) (itype-unify decimal [%rvar 51] ~)
6047− =? problems |(?=(~ restricted) ?=(^ (itype-unify [%rvar 51] [%atom %p] u.restricted)))
6048− ["arithmetic should keep a decimal's aura rule" problems]
6049− =/ decimal-any=ifit (itype-fit decimal [%any-atom ~] ~ 52)
6050− =? problems !?=(%ok -.decimal-any)
6051− ["a decimal should fit @" problems]
6052− =/ decimal-noun=ifit (itype-fit decimal [%noun ~] ~ 52)
6053− =? problems !?=(%ok -.decimal-noun)
6054− ["a decimal should fit a noun" problems]
6055 problems
5489 problems
6056::
5490::
6057:: The expression inference below is deliberately a fragment: bindings,
5491:: The expression inference below is deliberately a fragment: bindings,
@@ -6068,14 +5502,10 @@
6068:: of an arbitrary ask value. Reader graphs and source inputs are trusted.
5502:: of an arbitrary ask value. Reader graphs and source inputs are trusted.
6069+$ irequest-evidence
5503+$ irequest-evidence
6070 [api-at=path name=term path=iapi-path-typed api-source=@t public-source=@t internal-source=@t prelude-values=(list term) prelude-molds=(list term) externals=iexternals marks=imark-externals]
5504 [api-at=path name=term path=iapi-path-typed api-source=@t public-source=@t internal-source=@t prelude-values=(list term) prelude-molds=(list term) externals=iexternals marks=imark-externals]
6071−:: Store requests have their own source-bound evidence. In particular, an
6072−:: API path certificate cannot make a store state member watchable, or vice versa.
6073−+$ istore-request-evidence
6074− [store-at=path source=@t state=itype action-name=term action=itype]
6075:: A unit distinguishes a verified empty closure from a detached legacy file.
5505:: A unit distinguishes a verified empty closure from a detached legacy file.
6076:: The opaque prelude is an exact trusted input, not a recursive interface mold.
5506:: The opaque prelude is an exact trusted input, not a recursive interface mold.
6077+$ irequest-graph
5507+$ irequest-graph
6078− [paths=(set path) requests=(list irequest-evidence) stores=(list istore-request-evidence) bundle-input=* prelude-input=* prelude-values=(list term) prelude-molds=(list term) externals=iexternals marks=imark-externals]
5508+ [paths=(set path) requests=(list irequest-evidence) bundle-input=* prelude-input=* prelude-values=(list term) prelude-molds=(list term) externals=iexternals marks=imark-externals]
6079+$ ifile [values=ienv molds=imold-types at=path derived=(list iderived) elaborations=(list iwidth-definition) dependencies=(list iwidth-dependency) source=(unit @t) graph=(unit irequest-graph)]
5509+$ ifile [values=ienv molds=imold-types at=path derived=(list iderived) elaborations=(list iwidth-definition) dependencies=(list iwidth-dependency) source=(unit @t) graph=(unit irequest-graph)]
6080+$ ijimports (list [face=term interface=ifile])
5510+$ ijimports (list [face=term interface=ifile])
6081+$ icap [name=@t id=@ud at=span]
5511+$ icap [name=@t id=@ud at=span]
@@ -6221,7 +5651,6 @@
6221 =/ head=igate-free $(typ hed.typ, path [[%head ~] path])
5651 =/ head=igate-free $(typ hed.typ, path [[%head ~] path])
6222 =/ tail=igate-free $(typ tal.typ, fuel left.head, path [[%tail ~] path])
5652 =/ tail=igate-free $(typ tal.typ, fuel left.head, path [[%tail ~] path])
6223 =/ inhabited=? &(inhabited.head inhabited.tail)
5653 =/ inhabited=? &(inhabited.head inhabited.tail)
6224− ?: |(&(=(%yes verdict.head) !inhabited.head) &(=(%yes verdict.tail) !inhabited.tail)) [%yes | left.tail ~]
6225 ?: &(=(%no verdict.head) inhabited.tail) head(left left.tail)
5654 ?: &(=(%no verdict.head) inhabited.tail) head(left left.tail)
6226 ?: &(=(%no verdict.tail) inhabited.head) tail
5655 ?: &(=(%no verdict.tail) inhabited.head) tail
6227 ?: |(!=(%yes verdict.head) !=(%yes verdict.tail)) [%unknown inhabited left.tail ~]
5656 ?: |(!=(%yes verdict.head) !=(%yes verdict.tail)) [%unknown inhabited left.tail ~]
@@ -6235,9 +5664,7 @@
6235 ?~ cases.typ [%unknown | fuel ~]
5664 ?~ cases.typ [%unknown | fuel ~]
6236 (gate-free-types cases.typ fuel path 0)
5665 (gate-free-types cases.typ fuel path 0)
6237 %noun [%unknown & fuel ~]
5666 %noun [%unknown & fuel ~]
6238− %empty [%yes | fuel ~]
6239 %var [%unknown | fuel ~]
5667 %var [%unknown | fuel ~]
6240− %fvar [%yes & fuel ~]
6241 %avar [%yes & fuel ~]
5668 %avar [%yes & fuel ~]
6242 %rvar [%yes & fuel ~]
5669 %rvar [%yes & fuel ~]
6243 %nvar [%yes & fuel ~]
5670 %nvar [%yes & fuel ~]
@@ -6245,12 +5672,10 @@
6245 %tag [%unknown | fuel ~]
5672 %tag [%unknown | fuel ~]
6246 %recursive [%unknown | fuel ~]
5673 %recursive [%unknown | fuel ~]
6247 %jrec [%yes & fuel ~]
5674 %jrec [%yes & fuel ~]
6248− %grec [%unknown | fuel ~]
6249 ==
5675 ==
6250::
5676::
6251+$ igate-prelude-evidence [iface=ifile gates=(map term def)]
5677+$ igate-prelude-evidence [iface=ifile gates=(map term def)]
6252−+$ dgo [left=itype right=itype at=span context=span]
6253−+$ istate [next=@ud sub=isub caps=icaps binders=(list @ud) molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) params=iparams active=(list term) tags=(list ipending) in-mold=? at=path top-molds=(list term) prelude=(unit ifile) holes=(list ihole) jrec-fuel=@ud projections=(list iwprojection) gate-defs=(map term def) head-evidence=(unit igate-prelude-evidence) grec-index=(unit [at=path source=@t prelude=ifile shapes=(map term shape)]) defer=(unit ~) obligations=(list dgo)]
5678++$ istate [next=@ud sub=isub caps=icaps binders=(list @ud) molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) params=iparams active=(list term) tags=(list ipending) in-mold=? at=path top-molds=(list term) prelude=(unit ifile) holes=(list ihole) jrec-fuel=@ud projections=(list iwprojection) gate-defs=(map term def) head-evidence=(unit igate-prelude-evidence)]
6254+$ idiag [msg=tape sites=(list [at=span note=tape])]
5679+$ idiag [msg=tape sites=(list [at=span note=tape])]
6255+$ iresult (each [typ=itype state=istate] idiag)
5680+$ iresult (each [typ=itype state=istate] idiag)
6256+$ isample-result (each [typ=itype env=ienv state=istate] tape)
5681+$ isample-result (each [typ=itype env=ienv state=istate] tape)
@@ -6270,7 +5695,6 @@
6270 |= [t=itype sub=isub]
5695 |= [t=itype sub=isub]
6271 ^- itype
5696 ^- itype
6272 =. t (itype-walk t sub)
5697 =. t (itype-walk t sub)
6273− ?: ?=(%grec -.t) t(args (turn args.t |=(c=itype (itype-normalize c sub))))
6274 ?: ?=(%collection -.t) [%collection name.t (turn args.t |=(c=itype (itype-normalize c sub)))]
5698 ?: ?=(%collection -.t) [%collection name.t (turn args.t |=(c=itype (itype-normalize c sub)))]
6275 ?: ?=(%union -.t)
5699 ?: ?=(%union -.t)
6276 [%union (turn cases.t |=(c=itype (itype-normalize c sub))) origin.t label.t (turn args.t |=(c=itype (itype-normalize c sub)))]
5700 [%union (turn cases.t |=(c=itype (itype-normalize c sub))) origin.t label.t (turn args.t |=(c=itype (itype-normalize c sub)))]
@@ -6297,23 +5721,20 @@
6297 %cell |($(t hed.t) $(t tal.t))
5721 %cell |($(t hed.t) $(t tal.t))
6298 %recursive |
5722 %recursive |
6299 %jrec |
5723 %jrec |
6300− %grec &
6301 %collection (lien args.t |=(c=itype (itype-has-gate c)))
5724 %collection (lien args.t |=(c=itype (itype-has-gate c)))
6302 %face $(t body.t)
5725 %face $(t body.t)
6303 %union (lien cases.t |=(c=itype (itype-has-gate c)))
5726 %union (lien cases.t |=(c=itype (itype-has-gate c)))
6304 %tag |
5727 %tag |
6305 %const |
5728 %const |
6306 %var |
5729 %var |
6307− %fvar |
6308 %avar |
5730 %avar |
6309 %rvar |
5731 %rvar |
6310 %nvar |
5732 %nvar |
6311− %rnvar |
5733+ %rnvar |
6312 %atom |
5734 %atom |
6313 %any-atom |
5735 %any-atom |
6314 %flag |
5736 %flag |
6315 %noun |
5737 %noun |
6316− %empty |
6317 ==
5738 ==
6318::
5739::
6319++ default-decimals
5740++ default-decimals
@@ -6323,7 +5744,6 @@
6323 ?- -.t
5744 ?- -.t
6324 %nvar [%atom %ud]
5745 %nvar [%atom %ud]
6325 %rnvar [%atom %ud]
5746 %rnvar [%atom %ud]
6326− %grec t(args (turn args.t |=(c=itype (default-decimals c))))
6327 %collection [%collection name.t (turn args.t |=(c=itype (default-decimals c)))]
5747 %collection [%collection name.t (turn args.t |=(c=itype (default-decimals c)))]
6328 %face [%face name.t $(t body.t)]
5748 %face [%face name.t $(t body.t)]
6329 %cell [%cell $(t hed.t) $(t tal.t)]
5749 %cell [%cell $(t hed.t) $(t tal.t)]
@@ -6339,7 +5759,6 @@
6339 ^- (unit @ud)
5759 ^- (unit @ud)
6340 ?- -.t
5760 ?- -.t
6341 %var `id.t
5761 %var `id.t
6342− %fvar `id.t
6343 %avar `id.t
5762 %avar `id.t
6344 %rvar `id.t
5763 %rvar `id.t
6345 %nvar `id.t
5764 %nvar `id.t
@@ -6360,13 +5779,12 @@
6360 ^- ?
5779 ^- ?
6361 =. t (itype-walk t sub.state)
5780 =. t (itype-walk t sub.state)
6362 ?- -.t
5781 ?- -.t
6363− ?(%var %fvar %avar %rvar %nvar %rnvar)
5782+ ?(%var %avar %rvar %nvar %rnvar)
6364 ?: (lien caps.state |=(c=icap (hole-same-variable t (itype-walk [%var id.c] sub.state)))) &
5783 ?: (lien caps.state |=(c=icap (hole-same-variable t (itype-walk [%var id.c] sub.state)))) &
6365 (lien params.state |=(p=[name=@t typ=itype] (hole-same-variable t (itype-walk typ.p sub.state))))
5784 (lien params.state |=(p=[name=@t typ=itype] (hole-same-variable t (itype-walk typ.p sub.state))))
6366 %tag |
5785 %tag |
6367 %any-atom &
5786 %any-atom &
6368 %union &((levy cases.t |=(c=itype (hole-known c state))) (levy args.t |=(c=itype (hole-known c state))))
5787 %union &((levy cases.t |=(c=itype (hole-known c state))) (levy args.t |=(c=itype (hole-known c state))))
6369− %grec (levy args.t |=(c=itype (hole-known c state)))
6370 %collection (levy args.t |=(c=itype (hole-known c state)))
5788 %collection (levy args.t |=(c=itype (hole-known c state)))
6371 %face $(t body.t)
5789 %face $(t body.t)
6372 %fn &($(t sample.t) $(t product.t))
5790 %fn &($(t sample.t) $(t product.t))
@@ -6376,8 +5794,6 @@
6376++ promote-restricted-numbers
5794++ promote-restricted-numbers
6377 |= [state=istate env=ienv]
5795 |= [state=istate env=ienv]
6378 ^- istate
5796 ^- istate
6379− :: With no written capitals, there is nothing to promote.
6380− ?~ caps.state state
6381 =/ ids=(list @ud) (turn caps.state |=(c=icap id.c))
5797 =/ ids=(list @ud) (turn caps.state |=(c=icap id.c))
6382 =/ free=(list @ud) (free-env-vars env sub.state)
5798 =/ free=(list @ud) (free-env-vars env sub.state)
6383 |-
5799 |-
@@ -6412,9 +5828,8 @@
6412 ^- ?
5828 ^- ?
6413 =. t (itype-walk t sub.state)
5829 =. t (itype-walk t sub.state)
6414 ?- -.t
5830 ?- -.t
6415− ?(%tag %nvar %rnvar %fvar %avar %rvar) !(hole-known t state)
5831+ ?(%tag %nvar %rnvar %avar %rvar) !(hole-known t state)
6416 %union |((lien cases.t |=(c=itype (hole-uncertain c state))) (lien args.t |=(c=itype (hole-uncertain c state))))
5832 %union |((lien cases.t |=(c=itype (hole-uncertain c state))) (lien args.t |=(c=itype (hole-uncertain c state))))
6417− %grec (lien args.t |=(c=itype (hole-uncertain c state)))
6418 %collection (lien args.t |=(c=itype (hole-uncertain c state)))
5833 %collection (lien args.t |=(c=itype (hole-uncertain c state)))
6419 %face $(t body.t)
5834 %face $(t body.t)
6420 %fn |($(t sample.t) $(t product.t))
5835 %fn |($(t sample.t) $(t product.t))
@@ -6430,19 +5845,14 @@
6430 ?~ work ~
5845 ?~ work ~
6431 ?: (hole-known [%var id.i.work] state) $(work t.work)
5846 ?: (hole-known [%var id.i.work] state) $(work t.work)
6432 ?: (hole-uncertain [%var id.i.work] state)
5847 ?: (hole-uncertain [%var id.i.work] state)
6433− `[uncertain-hole-msg ~[[at.i.work "type hole"]]]
5848+ `["type hole needs unsupported inference" ~[[at.i.work "type hole"]]]
6434 `["type hole needs a determined type" ~[[at.i.work "unresolved type hole"]]]
5849 `["type hole needs a determined type" ~[[at.i.work "unresolved type hole"]]]
6435::
5850::
6436−:: +uncertain-hole-msg: unsupported, though it names the hole's site
6437−::
6438−++ uncertain-hole-msg "type hole needs unsupported inference"
6439−::
6440++ itype-vars
5851++ itype-vars
6441 |= t=itype
5852 |= t=itype
6442 ^- (list @ud)
5853 ^- (list @ud)
6443 ?- -.t
5854 ?- -.t
6444 %var ~[id.t]
5855 %var ~[id.t]
6445− %fvar ~[id.t]
6446 %avar ~[id.t]
5856 %avar ~[id.t]
6447 %rvar ~[id.t]
5857 %rvar ~[id.t]
6448 %nvar ~[id.t]
5858 %nvar ~[id.t]
@@ -6451,13 +5861,11 @@
6451 %any-atom ~
5861 %any-atom ~
6452 %flag ~
5862 %flag ~
6453 %noun ~
5863 %noun ~
6454− %empty ~
6455 %tag ~
5864 %tag ~
6456 %const ~
5865 %const ~
6457 %union (zing (turn (weld args.t cases.t) |=(c=itype (itype-vars c))))
5866 %union (zing (turn (weld args.t cases.t) |=(c=itype (itype-vars c))))
6458 %recursive ~
5867 %recursive ~
6459 %jrec ~
5868 %jrec ~
6460− %grec (zing (turn args.t |=(c=itype (itype-vars c))))
6461 %collection (zing (turn args.t |=(c=itype (itype-vars c))))
5869 %collection (zing (turn args.t |=(c=itype (itype-vars c))))
6462 %face $(t body.t)
5870 %face $(t body.t)
6463 %fn (weld $(t sample.t) $(t product.t))
5871 %fn (weld $(t sample.t) $(t product.t))
@@ -6481,10 +5889,6 @@
6481 =/ found=(unit itype) (itype-lookup id.t ren)
5889 =/ found=(unit itype) (itype-lookup id.t ren)
6482 ?~ found t
5890 ?~ found t
6483 u.found
5891 u.found
6484− %fvar
6485− =/ found=(unit itype) (itype-lookup id.t ren)
6486− ?~ found t
6487− u.found
6488 %avar
5892 %avar
6489 =/ found=(unit itype) (itype-lookup id.t ren)
5893 =/ found=(unit itype) (itype-lookup id.t ren)
6490 ?~ found t
5894 ?~ found t
@@ -6505,13 +5909,11 @@
6505 %any-atom t
5909 %any-atom t
6506 %flag t
5910 %flag t
6507 %noun t
5911 %noun t
6508− %empty t
6509 %tag t
5912 %tag t
6510 %const t
5913 %const t
6511 %union [%union (turn cases.t |=(c=itype (itype-rename c ren))) origin.t label.t (turn args.t |=(c=itype (itype-rename c ren)))]
5914 %union [%union (turn cases.t |=(c=itype (itype-rename c ren))) origin.t label.t (turn args.t |=(c=itype (itype-rename c ren)))]
6512 %recursive t
5915 %recursive t
6513 %jrec t
5916 %jrec t
6514− %grec t(args (turn args.t |=(c=itype (itype-rename c ren))))
6515 %collection [%collection name.t (turn args.t |=(c=itype (itype-rename c ren)))]
5917 %collection [%collection name.t (turn args.t |=(c=itype (itype-rename c ren)))]
6516 %face [%face name.t $(t body.t)]
5918 %face [%face name.t $(t body.t)]
6517 %fn [%fn $(t sample.t) $(t product.t)]
5919 %fn [%fn $(t sample.t) $(t product.t)]
@@ -6526,7 +5928,6 @@
6526 ^- ?
5928 ^- ?
6527 ?- -.t
5929 ?- -.t
6528 %var |
5930 %var |
6529− %fvar |
6530 %avar =(n id.t)
5931 %avar =(n id.t)
6531 %rvar =(n id.t)
5932 %rvar =(n id.t)
6532 %nvar =(n id.t)
5933 %nvar =(n id.t)
@@ -6535,13 +5936,11 @@
6535 %any-atom |
5936 %any-atom |
6536 %flag |
5937 %flag |
6537 %noun |
5938 %noun |
6538− %empty |
6539 %tag |
5939 %tag |
6540 %const |
5940 %const |
6541 %union |((lien cases.t |=(c=itype (itype-var-is-atom n c))) (lien args.t |=(c=itype (itype-var-is-atom n c))))
5941 %union |((lien cases.t |=(c=itype (itype-var-is-atom n c))) (lien args.t |=(c=itype (itype-var-is-atom n c))))
6542 %recursive |
5942 %recursive |
6543 %jrec |
5943 %jrec |
6544− %grec (lien args.t |=(c=itype (itype-var-is-atom n c)))
6545 %collection (lien args.t |=(c=itype (itype-var-is-atom n c)))
5944 %collection (lien args.t |=(c=itype (itype-var-is-atom n c)))
6546 %face $(t body.t)
5945 %face $(t body.t)
6547 %fn |($(t sample.t) $(t product.t))
5946 %fn |($(t sample.t) $(t product.t))
@@ -6552,7 +5951,6 @@
6552 ^- ?
5951 ^- ?
6553 ?- -.t
5952 ?- -.t
6554 %var |
5953 %var |
6555− %fvar |
6556 %avar |
5954 %avar |
6557 %rvar =(n id.t)
5955 %rvar =(n id.t)
6558 %nvar |
5956 %nvar |
@@ -6561,13 +5959,11 @@
6561 %any-atom |
5959 %any-atom |
6562 %flag |
5960 %flag |
6563 %noun |
5961 %noun |
6564− %empty |
6565 %tag |
5962 %tag |
6566 %const |
5963 %const |
6567 %union |((lien cases.t |=(c=itype (itype-var-is-restricted n c))) (lien args.t |=(c=itype (itype-var-is-restricted n c))))
5964 %union |((lien cases.t |=(c=itype (itype-var-is-restricted n c))) (lien args.t |=(c=itype (itype-var-is-restricted n c))))
6568 %recursive |
5965 %recursive |
6569 %jrec |
5966 %jrec |
6570− %grec (lien args.t |=(c=itype (itype-var-is-restricted n c)))
6571 %collection (lien args.t |=(c=itype (itype-var-is-restricted n c)))
5967 %collection (lien args.t |=(c=itype (itype-var-is-restricted n c)))
6572 %face $(t body.t)
5968 %face $(t body.t)
6573 %fn |($(t sample.t) $(t product.t))
5969 %fn |($(t sample.t) $(t product.t))
@@ -6577,89 +5973,15 @@
6577:: Canonical numbering makes printed variables independent of the order
5973:: Canonical numbering makes printed variables independent of the order
6578:: the unifier happened to allocate intermediates.
5974:: the unifier happened to allocate intermediates.
6579::
5975::
6580−++ itype-var-is-gate-free-fuel
6581− |= [n=@ud t=itype fuel=@ud]
6582− ^- ?
6583− ?: =(0 fuel) &
6584− =. fuel (dec fuel)
6585− ?- -.t
6586− %var |
6587− %fvar =(n id.t)
6588− %union |((lien cases.t |=(c=itype (itype-var-is-gate-free-fuel n c fuel))) (lien args.t |=(c=itype (itype-var-is-gate-free-fuel n c fuel))))
6589− %grec (lien args.t |=(c=itype (itype-var-is-gate-free-fuel n c fuel)))
6590− %collection (lien args.t |=(c=itype (itype-var-is-gate-free-fuel n c fuel)))
6591− %face $(t body.t, fuel fuel)
6592− %fn |($(t sample.t, fuel fuel) $(t product.t, fuel fuel))
6593− %cell |($(t hed.t, fuel fuel) $(t tal.t, fuel fuel))
6594− * |
6595− ==
6596−::
6597−++ itype-var-is-gate-free
6598− |= [n=@ud t=itype]
6599− ^- ?
6600− (itype-var-is-gate-free-fuel n t 256)
6601−::
6602−:: +named-var: the ID of the nth type variable, written as name
6603−::
6604−:: An ID counts in its low 64 bits. The name a variable was written
6605−:: with, as Msg, sits above them, or 0 for none, so the name travels
6606−:: with the variable through substitution, generalization and
6607−:: instantiation, and the printer can show it (+show-var). No two
6608−:: IDs share a count, so a name never makes two variables one.
6609−::
6610−++ named-var
6611− |= [name=@t n=@ud]
6612− ^- @ud
6613− (add (lsh 6 name) (end 6 n))
6614−::
6615−:: +var-name: the name in a type variable's ID, or 0 for none
6616−::
6617−++ var-name
6618− |= id=@ud
6619− ^- @t
6620− (rsh 6 id)
6621−::
6622−:: +var-count: a type variable's ID without its name
6623−::
6624−++ var-count
6625− |= id=@ud
6626− ^- @ud
6627− (end 6 id)
6628−::
6629−:: +canonical-itype: t with the variables in vars renumbered to print
6630−::
6631−:: A variable keeps its name unless one before it in vars has the same
6632−:: name. The others take numbers from 0, skipping any whose letter
6633−:: (+show-var) is a name in vars, so a printed type never shows one
6634−:: name for two variables.
6635−::
6636++ canonical-itype
5976++ canonical-itype
6637 |= [t=itype vars=(list @ud)]
5977 |= [t=itype vars=(list @ud)]
6638 ^- itype
5978 ^- itype
6639− =/ names=(list @t) (turn vars var-name)
6640− =/ used=(list @t) ~
6641 =/ ren=isub ~
5979 =/ ren=isub ~
6642 =/ n=@ud 0
5980 =/ n=@ud 0
6643 |-
5981 |-
6644 ?~ vars (itype-rename t ren)
5982 ?~ vars (itype-rename t ren)
6645− =/ name=@t (var-name i.vars)
6646− =/ own=? &(!=(0 name) !(lien used |=(u=@t =(u name))))
6647− =? n !own (letter-free n names)
6648− =/ id=@ud ?:(own (named-var name 0) n)
6649− =/ replacement=itype ?:((itype-var-is-restricted i.vars t) [%rvar id] ?:((itype-var-is-atom i.vars t) [%avar id] ?:((itype-var-is-gate-free i.vars t) [%fvar id] [%var id])))
5983+ =/ replacement=itype ?:((itype-var-is-restricted i.vars t) [%rvar n] ?:((itype-var-is-atom i.vars t) [%avar n] [%var n]))
6650− $(vars t.vars, ren [[i.vars replacement] ren], n ?:(own n +(n)), used ?:(own [name used] used))
5984+ $(vars t.vars, ren [[i.vars replacement] ren], n +(n))
6651−::
6652−:: +letter-free: the first number from n whose letter is none of names
6653−::
6654−++ letter-free
6655− |= [n=@ud names=(list @t)]
6656− ^- @ud
6657− ?. (lien names |=(m=@t =(m (crip (show-var n))))) n
6658− $(n +(n))
6659−::
6660−:: +instantiate-scheme: a scheme's type with fresh quantified variables
6661−::
6662−:: Each fresh variable keeps the name of the one it replaces.
6663::
5985::
6664++ instantiate-scheme
5986++ instantiate-scheme
6665 |= [scheme=ischeme state=istate]
5987 |= [scheme=ischeme state=istate]
@@ -6668,13 +5990,12 @@
6668 =/ vars=(list @ud) vars.scheme
5990 =/ vars=(list @ud) vars.scheme
6669 |-
5991 |-
6670 ?~ vars [(itype-rename typ.scheme ren) state]
5992 ?~ vars [(itype-rename typ.scheme ren) state]
6671− =/ fresh=@ud (named-var (var-name i.vars) next.state)
6672 =/ replacement=itype
5993 =/ replacement=itype
6673− ?:((itype-var-is-restricted i.vars typ.scheme) [%rvar fresh] ?:((itype-var-is-atom i.vars typ.scheme) [%avar fresh] ?:((itype-var-is-gate-free i.vars typ.scheme) [%fvar fresh] [%var fresh])))
5994+ ?:((itype-var-is-restricted i.vars typ.scheme) [%rvar next.state] ?:((itype-var-is-atom i.vars typ.scheme) [%avar next.state] [%var next.state]))
6674 :: A generalized atom variable is a valid origin for re-generalizing
5995 :: A generalized atom variable is a valid origin for re-generalizing
6675 :: an alias, just as a sample binder is.
5996 :: an alias, just as a sample binder is.
6676 =/ st=istate state(next +(next.state))
5997 =/ st=istate state(next +(next.state))
6677− =? binders.st |(?=(%fvar -.replacement) ?=(%avar -.replacement) ?=(%rvar -.replacement)) [fresh binders.state]
5998+ =? binders.st |(?=(%avar -.replacement) ?=(%rvar -.replacement)) [next.state binders.state]
6678 $(vars t.vars, ren [[i.vars replacement] ren], state st)
5999 $(vars t.vars, ren [[i.vars replacement] ren], state st)
6679::
6000::
6680++ icap-lookup
6001++ icap-lookup
@@ -6837,11 +6158,6 @@
6837++ import-to-itype
6158++ import-to-itype
6838 |= node=*
6159 |= node=*
6839 ^- (unit itype)
6160 ^- (unit itype)
6840− (import-to-itype-standard node ~)
6841−::
6842−++ import-to-itype-standard
6843− |= [node=* standard=(unit ischeme)]
6844− ^- (unit itype)
6845 ?@ node ~
6161 ?@ node ~
6846 ?+ -.node ~
6162 ?+ -.node ~
6847 %noun ?:(=(node [%noun ~]) `[%noun ~] ~)
6163 %noun ?:(=(node [%noun ~]) `[%noun ~] ~)
@@ -6883,24 +6199,16 @@
6883 ?: |(=(%map name) =(%mop name) =(%jar name) =(%jug name)) 2
6199 ?: |(=(%map name) =(%mop name) =(%jar name) =(%jug name)) 2
6884 0
6200 0
6885 ?: =(arity 0) ~
6201 ?: =(arity 0) ~
6886− =/ args=(unit (list itype)) (import-to-itypes-standard +>.node standard)
6202+ =/ args=(unit (list itype)) (import-to-itypes +>.node)
6887 ?~ args ~
6203 ?~ args ~
6888 ?. =(arity (lent u.args)) ~
6204 ?. =(arity (lent u.args)) ~
6889− =/ keyed=(unit [types=(list itype) sub=isub]) (itype-collection-keys name u.args ~)
6205+ `[%collection name u.args]
6890− ?~ keyed ~
6891− ?: =(%unit name)
6892− ?. ?=([* ~] types.u.keyed) ~
6893− ?~ standard `[%collection name types.u.keyed]
6894− ?. (standard-unit-template u.standard /lib/jibb/prelude/jibb) ~
6895− =/ nil=itype [%const [%null %n 0 '~']]
6896− `[%union ~[nil [%cell nil [%face %u i.types.u.keyed]]] `[/lib/jibb/prelude/jibb %unit] `%unit types.u.keyed]
6897− `[%collection name types.u.keyed]
6898 %fork
6206 %fork
6899 :: Hoon's ordinary ? mold is the fork of its two %f singletons.
6207 :: Hoon's ordinary ? mold is the fork of its two %f singletons.
6900 =/ raw=* +.node
6208 =/ raw=* +.node
6901 ?: |(=(raw ~[[%atom %f `0] [%atom %f `1]]) =(raw ~[[%atom %f `1] [%atom %f `0]]))
6209 ?: |(=(raw ~[[%atom %f `0] [%atom %f `1]]) =(raw ~[[%atom %f `1] [%atom %f `0]]))
6902 `[%flag ~]
6210 `[%flag ~]
6903− =/ cases=(unit (list itype)) (import-to-itypes-standard raw standard)
6211+ =/ cases=(unit (list itype)) (import-to-itypes raw)
6904 ?~ cases ~
6212 ?~ cases ~
6905 ?~ u.cases ~
6213 ?~ u.cases ~
6906 ?~ t.u.cases ~
6214 ?~ t.u.cases ~
@@ -6940,15 +6248,10 @@
6940++ import-to-itypes
6248++ import-to-itypes
6941 |= nodes=*
6249 |= nodes=*
6942 ^- (unit (list itype))
6250 ^- (unit (list itype))
6943− (import-to-itypes-standard nodes ~)
6944−::
6945−++ import-to-itypes-standard
6946− |= [nodes=* standard=(unit ischeme)]
6947− ^- (unit (list itype))
6948 ?@ nodes ?:(=(nodes 0) `~ ~)
6251 ?@ nodes ?:(=(nodes 0) `~ ~)
6949− =/ first (import-to-itype-standard -.nodes standard)
6252+ =/ first (import-to-itype -.nodes)
6950 ?~ first ~
6253 ?~ first ~
6951− =/ rest $(nodes +.nodes, standard standard)
6254+ =/ rest $(nodes +.nodes)
6952 ?~ rest ~
6255 ?~ rest ~
6953 `[u.first u.rest]
6256 `[u.first u.rest]
6954::
6257::
@@ -6957,7 +6260,6 @@
6957 ^- upat
6260 ^- upat
6958 ?- -.typ
6261 ?- -.typ
6959 %noun [%all ~]
6262 %noun [%all ~]
6960− %empty [%empty ~]
6961 %atom [%atom ~]
6263 %atom [%atom ~]
6962 %flag [%or ~[[%atom `0] [%atom `1]]]
6264 %flag [%or ~[[%atom `0] [%atom `1]]]
6963 %const [%atom `val.literal.typ]
6265 %const [%atom `val.literal.typ]
@@ -6975,10 +6277,9 @@
6975 ?. (levy t.cases |=(t=itype =(%disjoint (union-relate first (import-type-pattern t))))) |
6277 ?. (levy t.cases |=(t=itype =(%disjoint (union-relate first (import-type-pattern t))))) |
6976 $(cases t.cases)
6278 $(cases t.cases)
6977::
6279::
6978−++ find-imported-mold-prelude
6280+++ find-imported-mold
6979− |= [module=term name=term externals=iexternals surs=(list term) prelude=ifile]
6281+ |= [module=term name=term externals=iexternals surs=(list term)]
6980 ^- (unit itype)
6282 ^- (unit itype)
6981− =/ standard=(unit ischeme) (find-jibb-mold %unit prelude)
6982 ?. (lien surs |=(n=term =(n module))) ~
6283 ?. (lien surs |=(n=term =(n module))) ~
6983 =/ found=iexternals
6284 =/ found=iexternals
6984 (skim externals |=(e=[module=term name=term result=*] &(=(module module.e) =(name name.e))))
6285 (skim externals |=(e=[module=term name=term result=*] &(=(module module.e) =(name name.e))))
@@ -6989,17 +6290,13 @@
6989 ?. ?=(%& -.result) ~
6290 ?. ?=(%& -.result) ~
6990 =/ node=* +.result
6291 =/ node=* +.result
6991 ?. (imported-faces-valid node) ~
6292 ?. (imported-faces-valid node) ~
6992− ?@ node (import-to-itype-standard node standard)
6293+ ?@ node (import-to-itype node)
6993− ?: ?=(%ref -.node) (import-to-itype-standard node standard)
6294+ ?: ?=(%ref -.node) (import-to-itype node)
6994 =/ pattern=(unit irec-pattern) (rec-pattern node module name)
6295 =/ pattern=(unit irec-pattern) (rec-pattern node module name)
6995− ?~ pattern (import-to-itype-standard node standard)
6296+ ?~ pattern (import-to-itype node)
6996− ?. has.u.pattern (import-to-itype-standard node standard)
6297+ ?. has.u.pattern (import-to-itype node)
6997 `[%recursive module name `(crip "{(trip name)}.{(trip module)}")]
6298 `[%recursive module name `(crip "{(trip name)}.{(trip module)}")]
6998−::
6299+
6999−++ find-imported-mold
7000− |= [module=term name=term externals=iexternals surs=(list term)]
7001− ^- (unit itype)
7002− (find-imported-mold-prelude module name externals surs *ifile)
7003::
6300::
7004++ collect-sur-imports
6301++ collect-sur-imports
7005 |= imports=(list import)
6302 |= imports=(list import)
@@ -7017,10 +6314,9 @@
7017 [mark.i.imports $(imports t.imports)]
6314 [mark.i.imports $(imports t.imports)]
7018 $(imports t.imports)
6315 $(imports t.imports)
7019::
6316::
7020−++ find-imported-mark-prelude
6317+++ find-imported-mark
7021− |= [name=term externals=imark-externals marks=(list term) prelude=ifile]
6318+ |= [name=term externals=imark-externals marks=(list term)]
7022 ^- (unit itype)
6319 ^- (unit itype)
7023− =/ standard=(unit ischeme) (find-jibb-mold %unit prelude)
7024 ?. (unique-value-name name marks) ~
6320 ?. (unique-value-name name marks) ~
7025 =/ found=imark-externals
6321 =/ found=imark-externals
7026 (skim externals |=(e=[mark=term result=*] =(name mark.e)))
6322 (skim externals |=(e=[mark=term result=*] =(name mark.e)))
@@ -7030,12 +6326,7 @@
7030 ?@ result ~
6326 ?@ result ~
7031 ?. ?=(%& -.result) ~
6327 ?. ?=(%& -.result) ~
7032 ?. (imported-faces-valid +.result) ~
6328 ?. (imported-faces-valid +.result) ~
7033− (import-to-itype-standard +.result standard)
6329+ (import-to-itype +.result)
7034−::
7035−++ find-imported-mark
7036− |= [name=term externals=imark-externals marks=(list term)]
7037− ^- (unit itype)
7038− (find-imported-mark-prelude name externals marks *ifile)
7039::
6330::
7040++ find-jibb-interface
6331++ find-jibb-interface
7041 |= [face=term imports=ijimports]
6332 |= [face=term imports=ijimports]
@@ -7103,16 +6394,6 @@
7103 ?: &(?=(~ vars.template) ?=(%jrec -.typ.template) =(at.typ.template origin) =(name.typ.template name)) `name.i.molds
6394 ?: &(?=(~ vars.template) ?=(%jrec -.typ.template) =(at.typ.template origin) =(name.typ.template name)) `name.i.molds
7104 $(molds t.molds)
6395 $(molds t.molds)
7105::
6396::
7106−++ grec-visible-alias
7107− |= [origin=path name=term proof=shape args=(list itype) molds=imold-types]
7108− ^- (unit term)
7109− ?~ molds ~
7110− =/ template=ischeme template.i.molds
7111− ?. ?=(%grec -.typ.template) $(molds t.molds)
7112− ?. &(=(at.typ.template origin) =(name.typ.template name) =(proof.typ.template proof)) $(molds t.molds)
7113− ?. &((identity-union-parameters vars.template args.typ.template) =((lent vars.template) (lent args))) $(molds t.molds)
7114− `name.i.molds
7115−::
7116++ itype-in-import
6397++ itype-in-import
7117 |= [t=itype iface=ifile face=term prelude=(unit ifile)]
6398 |= [t=itype iface=ifile face=term prelude=(unit ifile)]
7118 ^- itype
6399 ^- itype
@@ -7132,11 +6413,6 @@
7132 `(crip "{(trip u.alias)}.{(trip face)}")
6413 `(crip "{(trip u.alias)}.{(trip face)}")
7133 [%union (turn cases.t |=(c=itype (itype-in-import c iface face prelude))) origin.t label (turn args.t |=(c=itype (itype-in-import c iface face prelude)))]
6414 [%union (turn cases.t |=(c=itype (itype-in-import c iface face prelude))) origin.t label (turn args.t |=(c=itype (itype-in-import c iface face prelude)))]
7134 %recursive [%recursive module.t name.t ~]
6415 %recursive [%recursive module.t name.t ~]
7135− %grec
7136− =/ public=(unit term) ?~(prelude ~ (grec-visible-alias at.t name.t proof.t args.t molds.u.prelude))
7137− =/ alias=(unit term) ?~(public (grec-visible-alias at.t name.t proof.t args.t molds.iface) public)
7138− =/ label=(unit @t) ?~(alias ~ ?~(public `(crip "{(trip u.alias)}.{(trip face)}") `u.alias))
7139− t(label label, args (turn args.t |=(c=itype (itype-in-import c iface face prelude))))
7140 %jrec
6416 %jrec
7141 =/ public=(unit term) ?~(prelude ~ (jrec-alias at.t name.t molds.u.prelude))
6417 =/ public=(unit term) ?~(prelude ~ (jrec-alias at.t name.t molds.u.prelude))
7142 ?^ public t(label `u.public)
6418 ?^ public t(label `u.public)
@@ -7189,27 +6465,15 @@
7189 ?~ rest ~
6465 ?~ rest ~
7190 `[[i.names i.args] u.rest]
6466 `[[i.names i.args] u.rest]
7191::
6467::
7192−++ template-apply-sub
6468+++ template-apply
7193− |= [template=ischeme args=(list itype) sub=isub]
6469+ |= [template=ischeme args=(list itype)]
7194− ^- (unit [typ=itype sub=isub])
6470+ ^- (unit itype)
7195 =/ vars=(list @ud) vars.template
6471 =/ vars=(list @ud) vars.template
7196 =/ ren=isub ~
6472 =/ ren=isub ~
7197 |-
6473 |-
7198− ?~ vars ?~(args `[(itype-rename typ.template ren) sub] ~)
6474+ ?~ vars ?~(args `(itype-rename typ.template ren) ~)
7199 ?~ args ~
6475 ?~ args ~
7200− =/ replacement=(unit igf-form)
7201− ?: (itype-var-is-gate-free i.vars typ.template)
7202− (itype-gate-free-form i.args sub 256)
7203− `[i.args sub 256]
7204− ?~ replacement ~
7205− $(vars t.vars, args t.args, ren [[i.vars typ.u.replacement] ren], sub sub.u.replacement)
6476+ $(vars t.vars, args t.args, ren [[i.vars i.args] ren])
7206−::
7207−++ template-apply
7208− |= [template=ischeme args=(list itype)]
7209− ^- (unit itype)
7210− =/ applied=(unit [typ=itype sub=isub]) (template-apply-sub template args ~)
7211− ?~ applied ~
7212− `typ.u.applied
7213::
6477::
7214++ infer-shape-args
6478++ infer-shape-args
7215 |= [args=(list shape) state=istate]
6479 |= [args=(list shape) state=istate]
@@ -7261,29 +6525,9 @@
7261 ?. =(names.tail ~[name]) ~
6525 ?. =(names.tail ~[name]) ~
7262 `[%jrec at.state name `name name.i.fs aura.shape.i.fs name.i.t.fs]
6526 `[%jrec at.state name `name name.i.fs aura.shape.i.fs name.i.t.fs]
7263::
6527::
7264−++ simple-source-generic-recursive
7265− |= [name=term sh=shape args=(list itype) state=istate]
7266− ^- (unit itype)
7267− ?. ?=(%generic -.sh) ~
7268− ?. ?=([@ ~] vars.sh) ~
7269− ?. ?=([* ~] args) ~
7270− ?~ grec-index.state ~
7271− ?. =(at.u.grec-index.state at.state) ~
7272− ?~ prelude.state ~
7273− ?. =(prelude.u.grec-index.state u.prelude.state) ~
7274− =/ proof=(unit shape) (~(get by shapes.u.grec-index.state) name)
7275− ?~ proof ~
7276− ?. =(u.proof sh) ~
7277− `[%grec at.state name `name sh args]
7278−::
7279−
7280++ infer-mold-template
6528++ infer-mold-template
7281 |= [sh=shape state=istate]
6529 |= [sh=shape state=istate]
7282 ^- (unit [template=ischeme state=istate])
6530 ^- (unit [template=ischeme state=istate])
7283− =/ generic=(unit itype)
7284− ?. ?=([@ ~] active.state) ~
7285− (simple-source-generic-recursive i.active.state sh ~[[%var next.state]] state)
7286− ?^ generic `[[u.generic ~[next.state]] state(next +(next.state))]
7287 =/ direct=(unit itype)
6531 =/ direct=(unit itype)
7288 ?. ?=([@ ~] active.state) ~
6532 ?. ?=([@ ~] active.state) ~
7289 (simple-source-recursive i.active.state sh state)
6533 (simple-source-recursive i.active.state sh state)
@@ -7341,7 +6585,7 @@
7341 ?~ found ~
6585 ?~ found ~
7342 ?^ t.found ~
6586 ?^ t.found ~
7343 result.i.found
6587 result.i.found
7344− ?. ?=([%invalid ?(%aura %core %overlap) @] raw) ~
6588+ ?. ?=([%invalid ?(%aura %core) @] raw) ~
7345 `["{(trip +>.raw)}" ~[[at.sh "invalid imported mold"]]]
6589 `["{(trip +>.raw)}" ~[[at.sh "invalid imported mold"]]]
7346::
6590::
7347:: Replay only the shape branches whose evaluation order we can prove.
6591:: Replay only the shape branches whose evaluation order we can prove.
@@ -7416,18 +6660,13 @@
7416 `[[%atom aura.sh] state]
6660 `[[%atom aura.sh] state]
7417 %flag `[[%flag ~] state]
6661 %flag `[[%flag ~] state]
7418 %noun `[[%noun ~] state]
6662 %noun `[[%noun ~] state]
7419− %void `[[%empty ~] state]
7420 %const
6663 %const
7421 ?. |(=(%term form.lit.sh) =(%null form.lit.sh) =(%loobean form.lit.sh)) ~
6664 ?. |(=(%term form.lit.sh) =(%null form.lit.sh) =(%loobean form.lit.sh)) ~
7422 ?: &(=(%loobean form.lit.sh) !|(=(0 val.lit.sh) =(1 val.lit.sh))) ~
6665 ?: &(=(%loobean form.lit.sh) !|(=(0 val.lit.sh) =(1 val.lit.sh))) ~
7423 `[[%const lit.sh] state]
6666 `[[%const lit.sh] state]
7424 %union
6667 %union
7425 =/ pairs=(list upair) (union-pairs cases.sh molds.state)
6668 =/ pairs=(list upair) (union-pairs cases.sh molds.state)
7426− ?: (lien pairs |=(p=upair =(%overlap relation.p))) ~
7427− =/ source-proof=?
7428− ?: (levy pairs |=(p=upair =(%disjoint relation.p))) &
6669+ ?. (levy pairs |=(p=upair =(%disjoint relation.p))) ~
7429− &((union-source-state-safe state 256) (union-source-distinct-tags cases.sh molds.state 256))
7430− ?. source-proof ~
7431 =/ cs=(unit [types=(list itype) state=istate]) (infer-shape-args cases.sh state)
6670 =/ cs=(unit [types=(list itype) state=istate]) (infer-shape-args cases.sh state)
7432 ?~ cs ~
6671 ?~ cs ~
7433 `[[%union types.u.cs ~ ~ ~] state.u.cs]
6672 `[[%union types.u.cs ~ ~ ~] state.u.cs]
@@ -7450,12 +6689,12 @@
7450 ?^ vars.u.found ~
6689 ?^ vars.u.found ~
7451 `[(itype-in-import typ.u.found u.iface i.t.names.sh prelude.state) state]
6690 `[(itype-in-import typ.u.found u.iface i.t.names.sh prelude.state) state]
7452 =/ found=(unit itype)
6691 =/ found=(unit itype)
7453− (find-imported-mold-prelude i.t.names.sh n externals.state surs.state ?~(prelude.state *ifile u.prelude.state))
6692+ (find-imported-mold i.t.names.sh n externals.state surs.state)
7454 ?~ found ~
6693 ?~ found ~
7455 `[u.found state]
6694 `[u.found state]
7456 ?: (lien marks.state |=(x=term =(x n)))
6695 ?: (lien marks.state |=(x=term =(x n)))
7457 ?^ (find-simple-mold n molds.state) ~
6696 ?^ (find-simple-mold n molds.state) ~
7458− =/ imported=(unit itype) (find-imported-mark-prelude n mark-externals.state marks.state ?~(prelude.state *ifile u.prelude.state))
6697+ =/ imported=(unit itype) (find-imported-mark n mark-externals.state marks.state)
7459 ?~ imported ~
6698 ?~ imported ~
7460 `[u.imported state]
6699 `[u.imported state]
7461 ?: (lien active.state |=(x=term =(x n))) ~
6700 ?: (lien active.state |=(x=term =(x n))) ~
@@ -7479,17 +6718,6 @@
7479 =/ args=(unit [types=(list itype) state=istate]) (infer-shape-args args.sh state)
6718 =/ args=(unit [types=(list itype) state=istate]) (infer-shape-args args.sh state)
7480 ?~ args ~
6719 ?~ args ~
7481 =/ n=term i.ref.sh
6720 =/ n=term i.ref.sh
7482− =/ keyed=(unit [types=(list itype) sub=isub])
7483− ?: ?=(^ (find-simple-mold n molds.state.u.args))
7484− `[types.u.args sub.state.u.args]
7485− ?~ prelude.state.u.args
7486− (itype-collection-keys n types.u.args sub.state.u.args)
7487− ?: ?=(^ (find-jibb-mold n u.prelude.state.u.args))
7488− `[types.u.args sub.state.u.args]
7489− (itype-collection-keys n types.u.args sub.state.u.args)
7490− ?~ keyed ~
7491− =. types.u.args types.u.keyed
7492− =. sub.state.u.args sub.u.keyed
7493 ?^ t.ref.sh
6721 ?^ t.ref.sh
7494 ?^ t.t.ref.sh ~
6722 ?^ t.t.ref.sh ~
7495 =/ iface=(unit ifile) (find-jibb-interface i.t.ref.sh jimports.state.u.args)
6723 =/ iface=(unit ifile) (find-jibb-interface i.t.ref.sh jimports.state.u.args)
@@ -7497,10 +6725,9 @@
7497 =/ template=(unit ischeme) (find-jibb-mold n u.iface)
6725 =/ template=(unit ischeme) (find-jibb-mold n u.iface)
7498 ?~ template ~
6726 ?~ template ~
7499 ?~ vars.u.template ~
6727 ?~ vars.u.template ~
7500− =/ applied=(unit [typ=itype sub=isub]) (template-apply-sub u.template types.u.args sub.state.u.args)
6728+ =/ applied=(unit itype) (template-apply u.template types.u.args)
7501 ?~ applied ~
6729 ?~ applied ~
7502− =. sub.state.u.args sub.u.applied
7503− `[(itype-in-import typ.u.applied u.iface i.t.ref.sh prelude.state.u.args) state.u.args]
6730+ `[(itype-in-import u.applied u.iface i.t.ref.sh prelude.state.u.args) state.u.args]
7504 ?: (lien active.state.u.args |=(x=term =(x n))) ~
6731 ?: (lien active.state.u.args |=(x=term =(x n))) ~
7505 =/ found=(unit shape) (find-simple-mold n molds.state.u.args)
6732 =/ found=(unit shape) (find-simple-mold n molds.state.u.args)
7506 ?~ found
6733 ?~ found
@@ -7509,13 +6736,10 @@
7509 =/ prelude-entry=(unit ischeme) (find-jibb-mold n u.prelude.state.u.args)
6736 =/ prelude-entry=(unit ischeme) (find-jibb-mold n u.prelude.state.u.args)
7510 ?~ prelude-entry ~
6737 ?~ prelude-entry ~
7511 ?~ vars.u.prelude-entry ~
6738 ?~ vars.u.prelude-entry ~
7512− =/ applied=(unit [typ=itype sub=isub]) (template-apply-sub u.prelude-entry types.u.args sub.state.u.args)
6739+ =/ applied=(unit itype) (template-apply u.prelude-entry types.u.args)
7513 ?~ applied ~
6740 ?~ applied ~
7514− =. sub.state.u.args sub.u.applied
7515− `[typ.u.applied state.u.args]
6741+ `[u.applied state.u.args]
7516 ?. ?=(%generic -.u.found) ~
6742 ?. ?=(%generic -.u.found) ~
7517− =/ grec=(unit itype) (simple-source-generic-recursive n u.found types.u.args state.u.args)
7518− ?^ grec `[u.grec state.u.args]
7519 ?. (distinct-params vars.u.found) ~
6743 ?. (distinct-params vars.u.found) ~
7520 =/ params=(unit iparams) (bind-params vars.u.found types.u.args)
6744 =/ params=(unit iparams) (bind-params vars.u.found types.u.args)
7521 ?~ params ~
6745 ?~ params ~
@@ -7534,8 +6758,7 @@
7534 ?: in-mold.state ~
6758 ?: in-mold.state ~
7535 =/ n=(unit @ud) (icap-lookup name.sh caps.state)
6759 =/ n=(unit @ud) (icap-lookup name.sh caps.state)
7536 ?^ n `[[%var u.n] state]
6760 ?^ n `[[%var u.n] state]
7537− =/ id=@ud (named-var name.sh next.state)
7538− `[[%var id] state(next +(next.state), caps [[name.sh id at.sh] caps.state])]
6761+ `[[%var next.state] state(next +(next.state), caps [[name.sh next.state at.sh] caps.state])]
7539 * ~
6762 * ~
7540 ==
6763 ==
7541::
6764::
@@ -7568,12 +6791,12 @@
7568 ^- isample-result
6791 ^- isample-result
7569 ?- -.s
6792 ?- -.s
7570 %bind
6793 %bind
7571− ?: |((reserved-name name.s) ?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
6794+ ?: |(=(name.s %proj) ?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
7572 [%| "sample shadows a name"]
6795 [%| "sample shadows a name"]
7573 =/ t=itype [%var next.state]
6796 =/ t=itype [%var next.state]
7574 [%& t [[name.s [t ~]] env] state(next +(next.state), binders [next.state binders.state])]
6797 [%& t [[name.s [t ~]] env] state(next +(next.state), binders [next.state binders.state])]
7575 %face
6798 %face
7576− ?: |((reserved-name name.s) ?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
6799+ ?: |(=(name.s %proj) ?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
7577 [%| "sample shadows a name"]
6800 [%| "sample shadows a name"]
7578 =/ t=(unit [typ=itype state=istate]) (infer-simple-shape shape.s state)
6801 =/ t=(unit [typ=itype state=istate]) (infer-simple-shape shape.s state)
7579 ?~ t [%| "sample mold is not supported by partial inference"]
6802 ?~ t [%| "sample mold is not supported by partial inference"]
@@ -7641,7 +6864,7 @@
7641 |-
6864 |-
7642 ?~ ds &
6865 ?~ ds &
7643 ?: ?=(%mold -.i.ds) $(ds t.ds)
6866 ?: ?=(%mold -.i.ds) $(ds t.ds)
7644− ?: (reserved-name name.i.ds) |
6867+ ?: =(name.i.ds %proj) |
7645 ?. (unique-value-name name.i.ds names) |
6868 ?. (unique-value-name name.i.ds names) |
7646 ?: ?=(^ (ienv-lookup name.i.ds env)) |
6869 ?: ?=(^ (ienv-lookup name.i.ds env)) |
7647 ?: (lien globals.state |=(n=term =(n name.i.ds))) |
6870 ?: (lien globals.state |=(n=term =(n name.i.ds))) |
@@ -7665,7 +6888,7 @@
7665 |-
6888 |-
7666 ?~ locals &
6889 ?~ locals &
7667 =/ n=term name.i.locals
6890 =/ n=term name.i.locals
7668− ?: (reserved-name n) |
6891+ ?: =(n %proj) |
7669 ?. (unique-value-name n names) |
6892 ?. (unique-value-name n names) |
7670 ?: (lien molds.state |=(m=[name=term body=shape] =(n name.m))) |
6893 ?: (lien molds.state |=(m=[name=term body=shape] =(n name.m))) |
7671 ?: (lien marks.state |=(m=term =(n m))) |
6894 ?: (lien marks.state |=(m=term =(n m))) |
@@ -7815,123 +7038,17 @@
7815 ^- istate
7038 ^- istate
7816 ?~ sites state
7039 ?~ sites state
7817 ?: ?=(^ (icap-lookup name.i.sites caps.state)) $(sites t.sites)
7040 ?: ?=(^ (icap-lookup name.i.sites caps.state)) $(sites t.sites)
7818− =/ id=@ud (named-var name.i.sites next.state)
7819− $(sites t.sites, state state(next +(next.state), caps [[name.i.sites id at.i.sites] caps.state]))
7041+ $(sites t.sites, state state(next +(next.state), caps [[name.i.sites next.state at.i.sites] caps.state]))
7820::
7042::
7821++ reserve-def-caps
7043++ reserve-def-caps
7822 |= [e=expr state=istate]
7044 |= [e=expr state=istate]
7823 ^- istate
7045 ^- istate
7824 (reserve-cap-sites (scope-expr e) state)
7046 (reserve-cap-sites (scope-expr e) state)
7825::
7047::
7826−:: +definite-diag: whether a failure is an error in the program itself
7827−::
7828−:: A definite error names the sites that conflict. A form partial
7829−:: inference does not support names none, and neither does a name
7830−:: that is not inferred yet, such as a sibling that waits for a later
7831−:: pass. An uncertain hole is the one unsupported result with a site.
7832−::
7833−++ definite-diag
7834− |= diag=idiag
7835− ^- ?
7836− ?~ sites.diag |
7837− !=(msg.diag uncertain-hole-msg)
7838−::
7839−:: +shared-types: what a body's shared variables resolve to
7840−::
7841−:: The variables free in env or in the enclosing capitals, such as an
7842−:: enclosing gate's untyped sample, are shared by all of the body's
7843−:: locals. A local keeps monomorphic only the variables that these
7844−:: resolve to; it generalizes the rest, which each use renames.
7845−::
7846−++ shared-types
7847− |= [env=ienv caps=icaps sub=isub]
7848− ^- (list [id=@ud typ=itype])
7849− %+ turn
7850− (unique-type-vars (weld (free-env-vars env sub) (free-cap-vars caps sub)))
7851− |=(id=@ud [id (itype-normalize [%var id] sub)])
7852−::
7853−:: +shared-moved: whether a sibling bound or refined a shared variable
7854−::
7855−:: A sibling that infers can constrain a shared variable and so turn
7856−:: another local's failure into a success: +itype-fit accepts any type
7857−:: it can prove empty, so after `^- !! x` every cast of x fits. Such a
7858−:: failure can depend on the order siblings are tried in. A variable
7859−:: that a sibling keeps monomorphic occurs in what a shared variable
7860−:: resolves to, so constraining it moves a shared variable too. A
7861−:: substitution only grows, so when none moved, every sibling inferred
7862−:: so far, and the local, ran against the entry state and generalized
7863−:: schemes alone.
7864−::
7865−++ shared-moved
7866− |= [shared=(list [id=@ud typ=itype]) sub=isub]
7867− ^- ?
7868− (lien shared |=([id=@ud typ=itype] !=(typ (itype-normalize [%var id] sub))))
7869−::
7870−:: +closed-local: whether a local cannot see any shared variable
7871−::
7872−:: A local that names no sibling, itself included, no name whose type
7873−:: had a free variable when the body was entered, and no enclosing
7874−:: capital that did, is inferred from generalized schemes and known
7875−:: types alone. What its siblings do cannot change its result, so its
7876−:: error is its own in any order. +sub is the substitution on entry,
7877−:: since a sibling may since have bound such a variable. The names are
7878−:: syntactic and ignore binders, so this errs closed.
7879−::
7880−++ closed-local
7881− |= [d=def siblings=(list term) env=ienv caps=icaps sub=isub]
7882− ^- ?
7883− ?. ?=(%value -.d) |
7884− =/ deps=(list term) (dependency-expr val.d)
7885− ?: (lien deps |=(n=term |(=(n name.d) (lien siblings |=(s=term =(s n)))))) |
7886− ?: %+ lien deps
7887− |= n=term
7888− =/ sc=(unit ischeme) (ienv-lookup n env)
7889− ?~ sc |
7890− ?=(^ (free-env-vars ~[[n u.sc]] sub))
7891− |
7892− %+ levy (scope-expr val.d)
7893− |= site=icap-site
7894− =/ id=(unit @ud) (icap-lookup name.site caps)
7895− ?~ id &
7896− ?=(~ (itype-vars (itype-normalize [%var u.id] sub)))
7897−::
7898−:: +infer-local-defs: infer a body's local values in dependency order
7899−::
7900−:: A definition that fails, or whose type is still pending, waits for
7901−:: the next pass, since it may refer to a sibling inferred later. When
7902−:: a pass makes no progress and no cyclic group applies, report the
7903−:: definite error of the earliest waiting definition, if no order of
7904−:: the siblings could change it; otherwise the message stays generic.
7905−::
7906−:: A failure counts only if it names its sites. The failure of a
7907−:: local that sees no shared variable (+closed-local) is its own. Any
7908−:: other failure counts only if no shared variable had moved when it
7909−:: was tried, and, when the body has shared variables, every other
7910−:: waiting definition also failed with sites: one that waits without
7911−:: them, on a checker limit, a pending tag or its own nested stall,
7912−:: might in another order, or once supported, constrain a shared
7913−:: variable and so let the failing local pass. When all of them failed
7914−:: with sites and none moved a shared variable, the state is the same
7915−:: in every order. With no shared variables, each local is inferred
7916−:: from generalized schemes alone.
7917−::
7918−:: A cyclic group's own errors are not kept. A definition that infers
7919−:: but is then unsupported reports that at once: a failure recorded
7920−:: earlier in the pass may still pass on a retry, once a sibling has
7921−:: constrained a shared variable.
7922−::
7923++ infer-local-defs
7048++ infer-local-defs
7924 |= [ds=(list def) env=ienv state=istate]
7049 |= [ds=(list def) env=ienv state=istate]
7925 ^- ilocal-result
7050 ^- ilocal-result
7926− =/ shared=(list [id=@ud typ=itype]) (shared-types env caps.state sub.state)
7927 =/ remaining=(list def) ~
7051 =/ remaining=(list def) ~
7928− =/ siblings=(list term) (global-value-names ds)
7929− =/ entry=isub sub.state
7930− :: this pass's failures with sites that are closed or were tried before
7931− :: any shared variable moved, newest first; and whether a definition
7932− :: waits without sites
7933− =/ failures=(list [diag=idiag closed=?]) ~
7934− =/ blocked=? |
7935 =/ progressed=? |
7052 =/ progressed=? |
7936 |-
7053 |-
7937 ?~ ds
7054 ?~ ds
@@ -7941,36 +7058,16 @@
7941 =/ groups=icomponents (graph-components pending (global-value-names pending))
7058 =/ groups=icomponents (graph-components pending (global-value-names pending))
7942 =/ grouped=(unit [rest=(list def) env=ienv state=istate])
7059 =/ grouped=(unit [rest=(list def) env=ienv state=istate])
7943 (try-local-group pending groups env state)
7060 (try-local-group pending groups env state)
7944− ?~ grouped
7945− =/ sure=(list [diag=idiag closed=?])
7946− ?: |(?=(~ shared) !blocked) failures
7947− (skim failures |=([diag=idiag closed=?] closed))
7948− ?^ sure [%| diag:(rear sure)]
7949− [%| ["local definitions need unsupported inference" ~]]
7061+ ?~ grouped [%| ["local definitions need unsupported inference" ~]]
7950− $(ds rest.u.grouped, remaining ~, failures ~, blocked |, env env.u.grouped, state state.u.grouped, progressed |)
7062+ $(ds rest.u.grouped, remaining ~, env env.u.grouped, state state.u.grouped, progressed |)
7951− $(ds (flop remaining), remaining ~, failures ~, blocked |, progressed |)
7063+ $(ds (flop remaining), remaining ~, progressed |)
7952 =/ d=def i.ds
7064 =/ d=def i.ds
7953 ?> ?=(%value -.d)
7065 ?> ?=(%value -.d)
7954 =/ local-state=istate (reserve-def-caps val.d state)
7066 =/ local-state=istate (reserve-def-caps val.d state)
7955− =/ plain=iresult (infer-fragment val.d env local-state)
7067+ =/ inferred=iresult (infer-fragment val.d env local-state)
7956− =/ inferred=iresult
7068+ =/ retried=? ?=(%| -.inferred)
7957− ?: ?=(%& -.plain) plain
7958− (infer-recursive-gate d env local-state)
7069+ =? inferred retried (infer-recursive-gate d env local-state)
7959− ?: ?=(%| -.inferred)
7960− :: For a value that is not a gate the retry only says so; keep the
7961− :: first failure unless the retry found a definite error.
7962− =/ failure=idiag
7963− ?: ?=(%& -.plain) p.inferred
7964− ?: (definite-diag p.inferred) p.inferred
7965− p.plain
7966− ?. (definite-diag failure) $(ds t.ds, remaining [d remaining], blocked &)
7967− =/ closed=? (closed-local d siblings env caps.state entry)
7968− =? failures |(closed !(shared-moved shared sub.state))
7969− [[failure closed] failures]
7970− $(ds t.ds, remaining [d remaining])
7070+ ?: ?=(%| -.inferred) $(ds t.ds, remaining [d remaining])
7971− :: Only the deferred transaction adds obligations, and it keeps no
7972− :: failure reason. Obligations from a local are a checker limit.
7973− ?: !=(obligations.state.p.inferred obligations.state) [%| ["deferred local definition needs unsupported inference" ~]]
7974 =. state.p.inferred (promote-restricted-numbers state.p.inferred env)
7071 =. state.p.inferred (promote-restricted-numbers state.p.inferred env)
7975 =. state.p.inferred (default-hole-numbers holes.state.p.inferred holes.state state.p.inferred env !(itype-has-gate (itype-normalize typ.p.inferred sub.state.p.inferred)))
7072 =. state.p.inferred (default-hole-numbers holes.state.p.inferred holes.state state.p.inferred env !(itype-has-gate (itype-normalize typ.p.inferred sub.state.p.inferred)))
7976 =/ hole=(unit idiag) (unresolved-hole holes.state.p.inferred holes.state state.p.inferred)
7073 =/ hole=(unit idiag) (unresolved-hole holes.state.p.inferred holes.state state.p.inferred)
@@ -7983,15 +7080,14 @@
7983 [%| ["explicit capital constraints are not supported by partial inference" ~]]
7080 [%| ["explicit capital constraints are not supported by partial inference" ~]]
7984 =/ typ=itype (itype-normalize typ.p.inferred sub.state.p.inferred)
7081 =/ typ=itype (itype-normalize typ.p.inferred sub.state.p.inferred)
7985 ?: |((pending-tags tags.state.p.inferred sub.state.p.inferred) (itype-has-tag typ))
7082 ?: |((pending-tags tags.state.p.inferred sub.state.p.inferred) (itype-has-tag typ))
7986− $(ds t.ds, remaining [d remaining], blocked &)
7083+ $(ds t.ds, remaining [d remaining])
7987 ?: (unsupported-atom-vars typ caps.state.p.inferred binders.state.p.inferred sub.state.p.inferred)
7084 ?: (unsupported-atom-vars typ caps.state.p.inferred binders.state.p.inferred sub.state.p.inferred)
7988− $(ds t.ds, remaining [d remaining], blocked &)
7085+ $(ds t.ds, remaining [d remaining])
7989 =/ free=(list @ud)
7086 =/ free=(list @ud)
7990 (weld (free-env-vars env sub.state.p.inferred) (free-cap-vars caps.state sub.state.p.inferred))
7087 (weld (free-env-vars env sub.state.p.inferred) (free-cap-vars caps.state sub.state.p.inferred))
7991 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
7088 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
7992 =. vars (skim vars |=(n=@ud !(lien free |=(f=@ud =(f n)))))
7089 =. vars (skim vars |=(n=@ud !(lien free |=(f=@ud =(f n)))))
7993− =/ named=[typ=itype vars=(list @ud)] (cap-names typ vars caps.state.p.inferred sub.state.p.inferred)
7994− $(ds t.ds, env [[name.d named] env], state state.p.inferred(caps caps.state, holes holes.state), progressed &)
7090+ $(ds t.ds, env [[name.d [typ vars]] env], state state.p.inferred(caps caps.state, holes holes.state), progressed &)
7995::
7091::
7996:: Try complete cyclic local groups after individual definitions stall.
7092:: Try complete cyclic local groups after individual definitions stall.
7997:: Components with non-gates or unresolved constraints stay unavailable.
7093:: Components with non-gates or unresolved constraints stay unavailable.
@@ -8081,10 +7177,6 @@
8081 ?: &(?=(%collection -.expected) =(%list name.expected) (context-list-expression e))
7177 ?: &(?=(%collection -.expected) =(%list name.expected) (context-list-expression e))
8082 (infer-list-context e expected env state context)
7178 (infer-list-context e expected env state context)
8083 ?: ?=(%branch -.e)
7179 ?: ?=(%branch -.e)
8084− =/ named=(unit idiag) (branch-tag-name e env state)
8085− ?^ named [%| u.named]
8086− =/ empty-list=(unit iresult) (empty-list-null-branch e env state `[expected context])
8087− ?^ empty-list u.empty-list
8088 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
7180 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
8089 ?~ t.arms.e [%| ["branch pattern is not supported by partial inference" ~]]
7181 ?~ t.arms.e [%| ["branch pattern is not supported by partial inference" ~]]
8090 ?^ t.t.arms.e [%| ["branch is not supported by partial inference" ~]]
7182 ?^ t.t.arms.e [%| ["branch is not supported by partial inference" ~]]
@@ -8123,8 +7215,6 @@
8123 ?^ missing [%| u.missing]
7215 ?^ missing [%| u.missing]
8124 =/ nested=(unit idiag) (nested-missing-tag e typ.p.value expected sub.state.p.value next.state.p.value context)
7216 =/ nested=(unit idiag) (nested-missing-tag e typ.p.value expected sub.state.p.value next.state.p.value context)
8125 ?^ nested [%| u.nested]
7217 ?^ nested [%| u.nested]
8126− =/ decimal=(unit idiag) (decimal-misfit e typ.p.value expected sub.state.p.value next.state.p.value)
8127− ?^ decimal [%| u.decimal]
8128 ?: &(?=(%collection -.expected) =(%list name.expected))
7218 ?: &(?=(%collection -.expected) =(%list name.expected))
8129 [%| ["branch arm does not fit its expected list" ~[[context "expected list"] [(span-of e) "branch arm"]]]]
7219 [%| ["branch arm does not fit its expected list" ~[[context "expected list"] [(span-of e) "branch arm"]]]]
8130 ?: ?=(%flag -.expected)
7220 ?: ?=(%flag -.expected)
@@ -8190,42 +7280,25 @@
8190 =/ fit=ifit (itype-fit typ.p.tail target sub.state.p.tail next.state.p.tail)
7280 =/ fit=ifit (itype-fit typ.p.tail target sub.state.p.tail next.state.p.tail)
8191 ?: ?=(%unknown -.fit) [%| ["list tail constraint is not supported by partial inference" ~]]
7281 ?: ?=(%unknown -.fit) [%| ["list tail constraint is not supported by partial inference" ~]]
8192 ?: ?=(%bad -.fit)
7282 ?: ?=(%bad -.fit)
8193− =/ decimal=(unit idiag) (decimal-misfit val.i.t.items.e typ.p.tail target sub.state.p.tail next.state.p.tail)
8194− ?^ decimal [%| u.decimal]
8195 [%| ["list tail does not fit its expected type" ~[[context (site-type-note "expected list" target sub.state.p.tail)] [(span-of val.i.t.items.e) (site-type-note "list tail" typ.p.tail sub.state.p.tail)]]]]
7283 [%| ["list tail does not fit its expected type" ~[[context (site-type-note "expected list" target sub.state.p.tail)] [(span-of val.i.t.items.e) (site-type-note "list tail" typ.p.tail sub.state.p.tail)]]]]
8196 [%& target state.p.tail(sub sub.fit, next next.fit)]
7284 [%& target state.p.tail(sub sub.fit, next next.fit)]
8197::
7285::
8198−:: done holds the items already checked, the last first, so that a
8199−:: decimal among them can be blamed when a later item fixes its aura.
8200++ infer-open-list-items
7286++ infer-open-list-items
8201− |= [items=(list expr) expected=itype env=ienv state=istate context=span done=(list expr)]
7287+ |= [items=(list expr) expected=itype env=ienv state=istate context=span]
8202 ^- iresult
7288 ^- iresult
8203 ?~ items [%& expected state]
7289 ?~ items [%& expected state]
8204 =/ target=itype (itype-walk expected sub.state)
7290 =/ target=itype (itype-walk expected sub.state)
8205 =/ value=iresult (infer-call-context-arg i.items target env state context)
7291 =/ value=iresult (infer-call-context-arg i.items target env state context)
8206 ?: ?=(%| -.value) value
7292 ?: ?=(%| -.value) value
8207− =/ ordinary-fit=ifit (itype-fit typ.p.value target sub.state.p.value next.state.p.value)
7293+ =/ fit=ifit (itype-fit typ.p.value target sub.state.p.value next.state.p.value)
8208− =/ fit=ifit
8209− ?: ?=(%ok -.ordinary-fit) ordinary-fit
8210− ?: ?&(?=(%union -.target) ?=(^ prelude.state) =(origin.target `[at.u.prelude.state %element]))
8211− (program-single-generic-fit typ.p.value target sub.state.p.value next.state.p.value)
8212− ordinary-fit
8213 ?: ?=(%unknown -.fit) [%| ["list item constraint is not supported by partial inference" ~]]
7294 ?: ?=(%unknown -.fit) [%| ["list item constraint is not supported by partial inference" ~]]
8214 ?: ?=(%bad -.fit)
7295 ?: ?=(%bad -.fit)
8215 ?: |((itype-family-related typ.p.value target sub.state.p.value) (itype-has-any-atom typ.p.value sub.state.p.value) (itype-has-any-atom target sub.state.p.value))
7296 ?: |((itype-family-related typ.p.value target sub.state.p.value) (itype-has-any-atom typ.p.value sub.state.p.value) (itype-has-any-atom target sub.state.p.value))
8216 [%| ["list item widening is not supported by partial inference" ~]]
7297 [%| ["list item widening is not supported by partial inference" ~]]
8217− =/ decimal=(unit idiag) (decimal-misfit i.items typ.p.value target sub.state.p.value next.state.p.value)
8218− ?^ decimal [%| u.decimal]
8219− =/ earlier=(list expr) (flop done)
8220− |- ^- iresult
8221− ?^ earlier
8222− =/ found=(unit idiag) (decimal-misfit-at i.earlier typ.p.value sub.state.p.value)
8223− ?^ found [%| u.found]
8224− $(earlier t.earlier)
8225 [%| ["list items do not have compatible types" ~[[context (site-type-note "expected item" target sub.state.p.value)] [(span-of i.items) (site-type-note "list item" typ.p.value sub.state.p.value)]]]]
7298 [%| ["list items do not have compatible types" ~[[context (site-type-note "expected item" target sub.state.p.value)] [(span-of i.items) (site-type-note "list item" typ.p.value sub.state.p.value)]]]]
8226 ?: (itype-has-tag (itype-normalize expected sub.fit))
7299 ?: (itype-has-tag (itype-normalize expected sub.fit))
8227 [%| ["list item needs context in partial inference" ~]]
7300 [%| ["list item needs context in partial inference" ~]]
8228− $(items t.items, state state.p.value(sub sub.fit, next next.fit), done [i.items done])
7301+ $(items t.items, state state.p.value(sub sub.fit, next next.fit))
8229::
7302::
8230++ infer-list-items
7303++ infer-list-items
8231 |= [items=(list expr) expected=itype env=ienv state=istate context=span]
7304 |= [items=(list expr) expected=itype env=ienv state=istate context=span]
@@ -8234,20 +7307,13 @@
8234 =/ target=itype (itype-walk expected sub.state)
7307 =/ target=itype (itype-walk expected sub.state)
8235 =/ value=iresult (infer-call-context-arg i.items target env state context)
7308 =/ value=iresult (infer-call-context-arg i.items target env state context)
8236 ?: ?=(%| -.value) value
7309 ?: ?=(%| -.value) value
8237− =/ ordinary-fit=ifit (itype-fit typ.p.value target sub.state.p.value next.state.p.value)
7310+ =/ fit=ifit (itype-fit typ.p.value target sub.state.p.value next.state.p.value)
8238− =/ fit=ifit
8239− ?: ?=(%ok -.ordinary-fit) ordinary-fit
8240− ?: ?&(?=(%union -.target) ?=(^ prelude.state) =(origin.target `[at.u.prelude.state %element]))
8241− (program-single-generic-fit typ.p.value target sub.state.p.value next.state.p.value)
8242− ordinary-fit
8243 ?: ?=(%unknown -.fit) [%| ["list item constraint is not supported by partial inference" ~]]
7311 ?: ?=(%unknown -.fit) [%| ["list item constraint is not supported by partial inference" ~]]
8244 ?: ?=(%bad -.fit)
7312 ?: ?=(%bad -.fit)
8245 =/ missing=(unit idiag) (missing-union-tag i.items target sub.state.p.value context)
7313 =/ missing=(unit idiag) (missing-union-tag i.items target sub.state.p.value context)
8246 ?^ missing [%| u.missing]
7314 ?^ missing [%| u.missing]
8247 =/ nested=(unit idiag) (nested-missing-tag i.items typ.p.value target sub.state.p.value next.state.p.value context)
7315 =/ nested=(unit idiag) (nested-missing-tag i.items typ.p.value target sub.state.p.value next.state.p.value context)
8248 ?^ nested [%| u.nested]
7316 ?^ nested [%| u.nested]
8249− =/ decimal=(unit idiag) (decimal-misfit i.items typ.p.value target sub.state.p.value next.state.p.value)
8250− ?^ decimal [%| u.decimal]
8251 [%| ["list item does not fit its expected type" ~[[context (site-type-note "expected item" target sub.state.p.value)] [(span-of i.items) (site-type-note "list item" typ.p.value sub.state.p.value)]]]]
7317 [%| ["list item does not fit its expected type" ~[[context (site-type-note "expected item" target sub.state.p.value)] [(span-of i.items) (site-type-note "list item" typ.p.value sub.state.p.value)]]]]
8252 $(items t.items, state state.p.value(sub sub.fit, next next.fit))
7318 $(items t.items, state state.p.value(sub sub.fit, next next.fit))
8253::
7319::
@@ -8328,11 +7394,6 @@
8328 [%| ["list pattern needs the standard prelude in partial inference" ~]]
7394 [%| ["list pattern needs the standard prelude in partial inference" ~]]
8329 ?~ args.typ [%| ["list pattern is not supported by partial inference" ~]]
7395 ?~ args.typ [%| ["list pattern is not supported by partial inference" ~]]
8330 ?^ t.args.typ [%| ["list pattern is not supported by partial inference" ~]]
7396 ?^ t.args.typ [%| ["list pattern is not supported by partial inference" ~]]
8331− =/ item-live=(unit [result=?(%yes %no %unknown) left=@ud])
8332− (itype-inhabited-proof i.args.typ sub.state caps.state 256)
8333− ?~ item-live [%| ["list element reachability needs unsupported inference" ~]]
8334− ?: =(%unknown result.u.item-live) [%| ["list element reachability needs unsupported inference" ~]]
8335− ?: =(%no result.u.item-live) [%| ["list nonempty pattern is unreachable" ~]]
8336 ?~ arms.e [%| ["list branch is not supported by partial inference" ~]]
7397 ?~ arms.e [%| ["list branch is not supported by partial inference" ~]]
8337 ?~ t.arms.e [%| ["list branch is not supported by partial inference" ~]]
7398 ?~ t.arms.e [%| ["list branch is not supported by partial inference" ~]]
8338 ?^ t.t.arms.e [%| ["list branch is not supported by partial inference" ~]]
7399 ?^ t.t.arms.e [%| ["list branch is not supported by partial inference" ~]]
@@ -8345,7 +7406,7 @@
8345 [%| ["list branch pattern is not supported by partial inference" ~]]
7406 [%| ["list branch pattern is not supported by partial inference" ~]]
8346 =/ binder=(unit [head=term tail=term]) ?:(first-empty second-name first-name)
7407 =/ binder=(unit [head=term tail=term]) ?:(first-empty second-name first-name)
8347 ?~ binder [%| ["list branch pattern is not supported by partial inference" ~]]
7408 ?~ binder [%| ["list branch pattern is not supported by partial inference" ~]]
8348− ?: |((reserved-name head.u.binder) (reserved-name tail.u.binder) =(head.u.binder tail.u.binder) ?=(^ (ienv-lookup head.u.binder env)) ?=(^ (ienv-lookup tail.u.binder env)) (lien globals.state |=(n=term |(=(n head.u.binder) =(n tail.u.binder)))))
7409+ ?: |(=(head.u.binder %proj) =(tail.u.binder %proj) =(head.u.binder tail.u.binder) ?=(^ (ienv-lookup head.u.binder env)) ?=(^ (ienv-lookup tail.u.binder env)) (lien globals.state |=(n=term |(=(n head.u.binder) =(n tail.u.binder)))))
8349 [%| ["pattern binder shadows a name" ~]]
7410 [%| ["pattern binder shadows a name" ~]]
8350 =/ extended=ienv [[head.u.binder [i.args.typ ~]] [tail.u.binder [typ ~]] env]
7411 =/ extended=ienv [[head.u.binder [i.args.typ ~]] [tail.u.binder [typ ~]] env]
8351 =/ left=iresult
7412 =/ left=iresult
@@ -8357,9 +7418,9 @@
8357 (infer-union-context val.y typ.u.expected ?:(first-empty extended env) state.p.left context.u.expected)
7418 (infer-union-context val.y typ.u.expected ?:(first-empty extended env) state.p.left context.u.expected)
8358 ?: ?=(%| -.right) right
7419 ?: ?=(%| -.right) right
8359 ?^ expected [%& typ.u.expected state.p.right]
7420 ?^ expected [%& typ.u.expected state.p.right]
8360− =/ joined=(unit [typ=itype sub=isub]) (itype-branch-join typ.p.left typ.p.right sub.state.p.right)
7421+ =/ joined=(unit isub) (itype-unify typ.p.left typ.p.right sub.state.p.right)
8361 ?~ joined [%| ["list branch results need unsupported inference" ~]]
7422 ?~ joined [%| ["list branch results need unsupported inference" ~]]
8362− [%& typ.u.joined state.p.right(sub sub.u.joined)]
7423+ [%& typ.p.left state.p.right(sub u.joined)]
8363::
7424::
8364++ infer-unit-branch
7425++ infer-unit-branch
8365 |= [e=expr env=ienv state=istate expected=(unit [typ=itype context=span])]
7426 |= [e=expr env=ienv state=istate expected=(unit [typ=itype context=span])]
@@ -8382,15 +7443,10 @@
8382 [%| ["unit branch pattern is not supported by partial inference" ~]]
7443 [%| ["unit branch pattern is not supported by partial inference" ~]]
8383 =/ binder=(unit term) ?:(first-empty second-name first-name)
7444 =/ binder=(unit term) ?:(first-empty second-name first-name)
8384 ?~ binder [%| ["unit branch pattern is not supported by partial inference" ~]]
7445 ?~ binder [%| ["unit branch pattern is not supported by partial inference" ~]]
8385− ?: |((reserved-name u.binder) ?=(^ (ienv-lookup u.binder env)) (lien globals.state |=(n=term =(n u.binder))))
7446+ ?: |(=(u.binder %proj) ?=(^ (ienv-lookup u.binder env)) (lien globals.state |=(n=term =(n u.binder))))
8386 [%| ["pattern binder shadows a name" ~]]
7447 [%| ["pattern binder shadows a name" ~]]
8387 =/ payload=(unit itype) (unit-union-payload typ)
7448 =/ payload=(unit itype) (unit-union-payload typ)
8388 ?~ payload [%| ["unit branch subject is not supported by partial inference" ~]]
7449 ?~ payload [%| ["unit branch subject is not supported by partial inference" ~]]
8389− =/ payload-live=(unit [result=?(%yes %no %unknown) left=@ud])
8390− (itype-inhabited-proof u.payload sub.state.p.subject caps.state.p.subject 256)
8391− ?~ payload-live [%| ["unit payload reachability needs unsupported inference" ~]]
8392− ?: =(%unknown result.u.payload-live) [%| ["unit payload reachability needs unsupported inference" ~]]
8393− ?: =(%no result.u.payload-live) [%| ["unit present pattern is unreachable" ~]]
8394 =/ extended=ienv [[u.binder [u.payload ~]] env]
7450 =/ extended=ienv [[u.binder [u.payload ~]] env]
8395 =/ left=iresult
7451 =/ left=iresult
8396 ?~ expected (infer-fragment val.x ?:(first-empty env extended) state.p.subject)
7452 ?~ expected (infer-fragment val.x ?:(first-empty env extended) state.p.subject)
@@ -8401,9 +7457,9 @@
8401 (infer-union-context val.y typ.u.expected ?:(first-empty extended env) state.p.left context.u.expected)
7457 (infer-union-context val.y typ.u.expected ?:(first-empty extended env) state.p.left context.u.expected)
8402 ?: ?=(%| -.right) right
7458 ?: ?=(%| -.right) right
8403 ?^ expected [%& typ.u.expected state.p.right]
7459 ?^ expected [%& typ.u.expected state.p.right]
8404− =/ joined=(unit [typ=itype sub=isub]) (itype-branch-join typ.p.left typ.p.right sub.state.p.right)
7460+ =/ joined=(unit isub) (itype-unify typ.p.left typ.p.right sub.state.p.right)
8405 ?~ joined [%| ["unit branch results need unsupported inference" ~]]
7461 ?~ joined [%| ["unit branch results need unsupported inference" ~]]
8406− [%& typ.u.joined state.p.right(sub sub.u.joined)]
7462+ [%& typ.p.left state.p.right(sub u.joined)]
8407::
7463::
8408:: Infer pieces in order, retaining their substitutions and pending tags.
7464:: Infer pieces in order, retaining their substitutions and pending tags.
8409:: A bare decimal literal has no outside type constraint, so it takes its
7465:: A bare decimal literal has no outside type constraint, so it takes its
@@ -8489,83 +7545,11 @@
8489 ^- (unit ienv)
7545 ^- (unit ienv)
8490 =. t ?:(?=(%face -.t) body.t t)
7546 =. t ?:(?=(%face -.t) body.t t)
8491 ?: ?=(%bind -.p)
7547 ?: ?=(%bind -.p)
8492− ?: |((reserved-name name.p) ?=(^ (ienv-lookup name.p env)) (lien globals |=(n=term =(n name.p)))) ~
7548+ ?: |(=(name.p %proj) ?=(^ (ienv-lookup name.p env)) (lien globals |=(n=term =(n name.p)))) ~
8493 `[[name.p [t ~]] env]
7549 `[[name.p [t ~]] env]
8494 ?: ?=(%cell -.p) (union-pattern-bind-items items.p t env globals)
7550 ?: ?=(%cell -.p) (union-pattern-bind-items items.p t env globals)
8495 `env
7551 `env
8496::
7552::
8497−:: +branch-tag-name: a ?- pattern name that spells one of the subject's tags
8498−::
8499−:: A name in a pattern binds, so `stop` written for `%stop` would
8500−:: catch every case left. Where the subject's type at a name's
8501−:: position is a union, or a one-case mold, with a case whose constant
8502−:: there is the term the name spells, the name is an error (Grammar,
8503−:: Patterns). Every path that checks a ?- asks this first, so they
8504−:: agree; it infers the subject apart and drops the state it leaves.
8505−:: A subject that fails, or whose type isn't known yet, is left to the
8506−:: path. Samples aren't patterns: every sample name binds.
8507−++ branch-tag-name
8508− |= [e=expr env=ienv state=istate]
8509− ^- (unit idiag)
8510− ?. ?=(%branch -.e) ~
8511− ?. (lien arms.e |=(a=arm (union-pattern-has-bind pat.a))) ~
8512− =/ subject=iresult (infer-fragment subject.e env state)
8513− ?: ?=(%| -.subject) ~
8514− =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
8515− =/ arms=(list arm) arms.e
8516− |-
8517− ?~ arms ~
8518− =/ found=(unit [at=span name=term]) (tag-name-pattern pat.i.arms typ ~)
8519− ?~ found $(arms t.arms)
8520− =/ name=tape (trip name.u.found)
8521− :- ~
8522− :- "`{name}` binds a name, but the subject's type has `%{name}` here; write %{name}, or * for a catch-all"
8523− ~[[(span-of subject.e) "subject"] [at.u.found "pattern name"]]
8524−::
8525−:: +tag-name-pattern: the first name in p that t types by a tag
8526−::
8527−:: The walk enters faces, cells and unions, and of a union only the
8528−:: cases a cell pattern can match, so `[t %draft]` reads t at @t. It
8529−:: stops at atoms, `*`, variables, collections and recursive molds,
8530−:: and at a generic union's argument positions, which a type variable
8531−:: types in its mold, as u in `[~ u=A]`.
8532−++ tag-name-pattern
8533− |= [p=pattern t=itype args=(list itype)]
8534− ^- (unit [at=span name=term])
8535− ?. ?=(?(%bind %cell) -.p) ~
8536− ?: ?=(%face -.t) $(t body.t)
8537− ?: (lien args |=(a=itype =(a t))) ~
8538− ?: ?=(%union -.t)
8539− =/ inner=(list itype) (weld args.t args)
8540− =/ cases=(list itype) cases.t
8541− |-
8542− ?~ cases ~
8543− ?: &(?=(%cell -.p) =(%none (union-pattern p i.cases))) $(cases t.cases)
8544− =/ found=(unit [at=span name=term]) (tag-name-pattern p i.cases inner)
8545− ?^ found found
8546− $(cases t.cases)
8547− ?: ?=(%cell -.p) (tag-name-items items.p t args)
8548− ?. ?=(%const -.t) ~
8549− ?. &(=(%term form.literal.t) =(%tas aura.literal.t) =(name.p val.literal.t)) ~
8550− `[at.p name.p]
8551−::
8552−:: +tag-name-items: +tag-name-pattern along a cell pattern's items
8553−::
8554−:: As in +union-pattern-items, the last item takes the rest of the
8555−:: spine. A union mid-spine is read as the rest of the pattern.
8556−++ tag-name-items
8557− |= [ps=(list pattern) t=itype args=(list itype)]
8558− ^- (unit [at=span name=term])
8559− ?~ ps ~
8560− ?~ t.ps (tag-name-pattern i.ps t args)
8561− ?: ?=(%face -.t) $(t body.t)
8562− ?: (lien args |=(a=itype =(a t))) ~
8563− ?: ?=(%union -.t) (tag-name-pattern [%cell at.i.ps ps] t args)
8564− ?. ?=(%cell -.t) ~
8565− =/ head=(unit [at=span name=term]) (tag-name-pattern i.ps hed.t args)
8566− ?^ head head
8567− $(ps t.ps, t tal.t)
8568−::
8569:: Split loobean fields into finite refinements for partial patterns.
7553:: Split loobean fields into finite refinements for partial patterns.
8570:: Keep original cases for binder types and preserve whole-case matching
7554:: Keep original cases for binder types and preserve whole-case matching
8571:: before trying refinements. Cap products at 64; unknown, empty or opaque
7555:: before trying refinements. Cap products at 64; unknown, empty or opaque
@@ -8613,24 +7597,19 @@
8613 ^- (unit iresult)
7597 ^- (unit iresult)
8614 ?> ?=(%branch -.e)
7598 ?> ?=(%branch -.e)
8615 ?: ?=(%| -.subject) `subject
7599 ?: ?=(%| -.subject) `subject
8616− =/ decimal=(unit idiag) (decimal-arms-misfit arms.e typ.p.subject sub.state.p.subject)
8617− ?^ decimal `[%| u.decimal]
8618 =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7600 =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
8619 ?. ?=(%union -.typ) `[%| ["branch is not supported by partial inference" ~]]
7601 ?. ?=(%union -.typ) `[%| ["branch is not supported by partial inference" ~]]
8620− =/ live=(unit (list itype)) (itype-live-cases cases.typ sub.state.p.subject caps.state.p.subject 4.096)
7602+ =/ cases=(list itype) cases.typ
8621− ?~ live ~
8622− =/ cases=(list itype) u.live
8623 =/ remaining=(list itype) cases
7603 =/ remaining=(list itype) cases
8624 =/ arms=(list arm) arms.e
7604 =/ arms=(list arm) arms.e
8625 =/ st=istate state.p.subject
7605 =/ st=istate state.p.subject
8626− =/ results=(list itype) ~
7606+ =/ answer=(unit itype) ~
8627 |-
7607 |-
8628 ?~ arms
7608 ?~ arms
8629 ?^ remaining
7609 ?^ remaining
8630 `[%| ["missing union case {(show-itype i.remaining sub.st)}" ~]]
7610 `[%| ["missing union case {(show-itype i.remaining sub.st)}" ~]]
8631− =/ joined=(unit [typ=itype sub=isub]) (itype-branch-join-list (flop results) sub.st)
7611+ ?~ answer `[%| ["empty union branch is not supported by partial inference" ~]]
8632− ?~ joined `[%| ["union branch result matching needs unsupported inference" ~]]
7612+ `[%& u.answer st]
8633− `[%& typ.u.joined st(sub sub.u.joined)]
8634 =/ a=arm i.arms
7613 =/ a=arm i.arms
8635 ?: (lien remaining |=(c=itype =(%unknown (union-pattern pat.a c))))
7614 ?: (lien remaining |=(c=itype =(%unknown (union-pattern pat.a c))))
8636 ~
7615 ~
@@ -8646,20 +7625,18 @@
8646 =/ body=iresult (infer-fragment val.a u.bound st)
7625 =/ body=iresult (infer-fragment val.a u.bound st)
8647 ?: ?=(%| -.body) `body
7626 ?: ?=(%| -.body) `body
8648 =/ result=itype (itype-normalize typ.p.body sub.state.p.body)
7627 =/ result=itype (itype-normalize typ.p.body sub.state.p.body)
7628+ =/ mismatch=? ?~(answer | !=((itype-normalize u.answer sub.state.p.body) result))
7629+ ?: mismatch `[%| ["union branch result matching needs unsupported inference" ~]]
8649− $(arms t.arms, remaining (skim remaining |=(c=itype !=(%full (union-pattern pat.a c)))), st state.p.body, results [result results])
7630+ $(arms t.arms, remaining (skim remaining |=(c=itype !=(%full (union-pattern pat.a c)))), st state.p.body, answer `result)
8650::
7631::
8651++ infer-known-union-context-whole
7632++ infer-known-union-context-whole
8652 |= [e=expr expected=itype env=ienv subject=iresult context=span]
7633 |= [e=expr expected=itype env=ienv subject=iresult context=span]
8653 ^- (unit iresult)
7634 ^- (unit iresult)
8654 ?> ?=(%branch -.e)
7635 ?> ?=(%branch -.e)
8655 ?: ?=(%| -.subject) `subject
7636 ?: ?=(%| -.subject) `subject
8656− =/ decimal=(unit idiag) (decimal-arms-misfit arms.e typ.p.subject sub.state.p.subject)
8657− ?^ decimal `[%| u.decimal]
8658 =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7637 =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
8659 ?. ?=(%union -.typ) `[%| ["branch is not supported by partial inference" ~]]
7638 ?. ?=(%union -.typ) `[%| ["branch is not supported by partial inference" ~]]
8660− =/ live=(unit (list itype)) (itype-live-cases cases.typ sub.state.p.subject caps.state.p.subject 4.096)
7639+ =/ cases=(list itype) cases.typ
8661− ?~ live ~
8662− =/ cases=(list itype) u.live
8663 =/ remaining=(list itype) cases
7640 =/ remaining=(list itype) cases
8664 =/ arms=(list arm) arms.e
7641 =/ arms=(list arm) arms.e
8665 =/ st=istate state.p.subject
7642 =/ st=istate state.p.subject
@@ -8703,24 +7680,20 @@
8703 ?: ?=(%| -.subject) subject
7680 ?: ?=(%| -.subject) subject
8704 =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7681 =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
8705 ?. ?=(%union -.typ) [%| ["branch is not supported by partial inference" ~]]
7682 ?. ?=(%union -.typ) [%| ["branch is not supported by partial inference" ~]]
8706− =/ live=(unit (list itype)) (itype-live-cases cases.typ sub.state.p.subject caps.state.p.subject 4.096)
8707− ?~ live [%| ["union emptiness needs unsupported inference" ~]]
8708− =/ expanded=(unit (list ifinite)) (finite-cases u.live ~ 0)
7683+ =/ expanded=(unit (list ifinite)) (finite-cases cases.typ ~ 0)
8709 ?~ expanded [%| ["union pattern expansion needs unsupported inference" ~]]
7684 ?~ expanded [%| ["union pattern expansion needs unsupported inference" ~]]
8710 =/ cases=(list ifinite) u.expanded
7685 =/ cases=(list ifinite) u.expanded
8711 =/ remaining=(list ifinite) cases
7686 =/ remaining=(list ifinite) cases
8712 =/ arms=(list arm) arms.e
7687 =/ arms=(list arm) arms.e
8713 =/ st=istate state.p.subject
7688 =/ st=istate state.p.subject
8714− =/ results=(list itype) ~
7689+ =/ answer=(unit itype) ~
8715 |-
7690 |-
8716 ?~ arms
7691 ?~ arms
8717 ?^ remaining
7692 ?^ remaining
8718 [%| ["missing union case {(show-itype part.i.remaining sub.st)}" ~]]
7693 [%| ["missing union case {(show-itype part.i.remaining sub.st)}" ~]]
8719− ?~ results [%| ["empty union branch is not supported by partial inference" ~]]
7694+ ?~ answer [%| ["empty union branch is not supported by partial inference" ~]]
8720− ?^ expected [%& typ.u.expected st]
7695+ ?~ expected [%& u.answer st]
8721− =/ joined=(unit [typ=itype sub=isub]) (itype-branch-join-list (flop results) sub.st)
7696+ [%& typ.u.expected st]
8722− ?~ joined [%| ["union branch result matching needs unsupported inference" ~]]
8723− [%& typ.u.joined st(sub sub.u.joined)]
8724 =/ a=arm i.arms
7697 =/ a=arm i.arms
8725 ?: (lien remaining |=(c=ifinite =(%unknown (union-pattern pat.a part.c))))
7698 ?: (lien remaining |=(c=ifinite =(%unknown (union-pattern pat.a part.c))))
8726 [%| ["partial union pattern is not supported by partial inference" ~]]
7699 [%| ["partial union pattern is not supported by partial inference" ~]]
@@ -8748,9 +7721,11 @@
8748 [%| ["union branch arm does not fit its expected type" ~[[context.u.expected "expected type"] [(span-of val.a) "branch arm"]]]]
7721 [%| ["union branch arm does not fit its expected type" ~[[context.u.expected "expected type"] [(span-of val.a) "branch arm"]]]]
8749 ?: (itype-has-tag (itype-normalize typ.u.expected sub.fit))
7722 ?: (itype-has-tag (itype-normalize typ.u.expected sub.fit))
8750 [%| ["union branch result needs context in partial inference" ~]]
7723 [%| ["union branch result needs context in partial inference" ~]]
8751− $(arms t.arms, remaining (skim remaining |=(c=ifinite !=(%full (union-pattern pat.a part.c)))), st state.p.body(sub sub.fit, next next.fit), results [typ.p.body results])
7724+ $(arms t.arms, remaining (skim remaining |=(c=ifinite !=(%full (union-pattern pat.a part.c)))), st state.p.body(sub sub.fit, next next.fit), answer `typ.u.expected)
8752 =/ result=itype (itype-normalize typ.p.body sub.state.p.body)
7725 =/ result=itype (itype-normalize typ.p.body sub.state.p.body)
7726+ =/ mismatch=? ?~(answer | !=((itype-normalize u.answer sub.state.p.body) result))
7727+ ?: mismatch [%| ["union branch result matching needs unsupported inference" ~]]
8753− $(arms t.arms, remaining (skim remaining |=(c=ifinite !=(%full (union-pattern pat.a part.c)))), st state.p.body, results [result results])
7728+ $(arms t.arms, remaining (skim remaining |=(c=ifinite !=(%full (union-pattern pat.a part.c)))), st state.p.body, answer `result)
8754::
7729::
8755:: Prove a one-arm record pattern covers a known, non-union subject.
7730:: Prove a one-arm record pattern covers a known, non-union subject.
8756:: Variable or partial matches stay unsupported; binding uses the same
7731:: Variable or partial matches stay unsupported; binding uses the same
@@ -8826,65 +7801,9 @@
8826 =/ cell=itype [%cell [%face head.typ [%atom aura.typ]] [%face tail.typ typ]]
7801 =/ cell=itype [%cell [%face head.typ [%atom aura.typ]] [%face tail.typ typ]]
8827 [%& [%union ~[nil cell] ~ ~ ~] state.p.subject(jrec-fuel (dec jrec-fuel.state.p.subject))]
7802 [%& [%union ~[nil cell] ~ ~ ~] state.p.subject(jrec-fuel (dec jrec-fuel.state.p.subject))]
8828::
7803::
8829−:: A bounded source-proven tree match permits flat tag patterns and
8830−:: nonbinding catch-alls. Whole-case binders cannot consume the temporary
8831−:: structural view. Pattern count and field arity are checked first.
8832−++ grec-simple-pattern
8833− |= [pat=pattern view=itype]
8834− ^- ?
8835− ?. ?=(%cell -.pat) |
8836− ?~ items.pat |
8837− =/ first=pattern i.items.pat
8838− ?. ?=(%lit -.first) |
8839− ?. =(%term form.lit.first) |
8840− =/ chosen=(unit itype) (contextual-tagged-case view val.lit.first ~)
8841− ?~ chosen |
8842− ?> ?=(%cell -.u.chosen)
8843− =/ rest=(list pattern) t.items.pat
8844− =/ arity=? ?:(?=(%cell -.tal.u.chosen) ?=([* [* ~]] rest) ?=([* ~] rest))
8845− ?. arity |
8846− (levy rest |=(p=pattern |(?=(%bind -.p) ?=(%any -.p))))
8847−::
8848−:: A catch-all with no binder is safe even when it covers both cases.
8849−:: A bound whole case still declines to avoid exporting the analysis view.
8850−++ grec-patterns-eligible
8851− |= [arms=(list arm) view=itype left=@ud]
8852− ^- ?
8853− ?~ arms &
8854− ?: =(0 left) |
8855− =/ pat=pattern pat.i.arms
8856− ?. |(?=(%any -.pat) (grec-simple-pattern pat view)) |
8857− $(arms t.arms, left (dec left))
8858−++ grec-match-view
8859− |= [e=expr subject=iresult]
8860− ^- iresult
8861− ?: ?=(%| -.subject) subject
8862− ?. ?=(%branch -.e) subject
8863− ?. (grec-direct-context typ.p.subject sub.state.p.subject) subject
8864− =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
8865− ?. ?=(%grec -.typ) subject
8866− ?~ arms.e subject
8867− =/ view=(unit [view=itype left=@ud]) (grec-unfold-view typ jrec-fuel.state.p.subject)
8868− ?~ view [%| ["recursive mold unfolding needs unsupported inference" ~]]
8869− ?. (grec-patterns-eligible arms.e view.u.view 128) subject
8870− [%& view.u.view state.p.subject(jrec-fuel left.u.view)]
8871−::
8872−:: A single-arm diagnostic only probes a direct, source-typed in-scope wing;
8873−:: other subjects retain the prior single-pattern inference path.
8874−++ grec-single-wing-subject
8875− |= [e=expr env=ienv state=istate]
8876− ^- (unit iresult)
8877− ?. ?=(%wing -.e) ~
8878− ?. ?=([@ ~] names.e) ~
8879− =/ scheme=(unit ischeme) (ienv-lookup i.names.e env)
8880− ?~ scheme ~
8881− ?. (grec-direct-context typ.u.scheme sub.state) ~
8882− `(infer-fragment e env state)
8883−::
8884++ infer-known-union-branch-subject
7804++ infer-known-union-branch-subject
8885 |= [e=expr env=ienv subject=iresult]
7805 |= [e=expr env=ienv subject=iresult]
8886 ^- iresult
7806 ^- iresult
8887− =. subject (grec-match-view e subject)
8888 =. subject (jrec-match-view e subject)
7807 =. subject (jrec-match-view e subject)
8889 =/ whole=(unit iresult) (infer-known-union-whole e env subject)
7808 =/ whole=(unit iresult) (infer-known-union-whole e env subject)
8890 ?~ whole (infer-known-union-finite e env subject ~)
7809 ?~ whole (infer-known-union-finite e env subject ~)
@@ -8899,7 +7818,6 @@
8899++ infer-known-union-context-subject
7818++ infer-known-union-context-subject
8900 |= [e=expr expected=itype env=ienv subject=iresult context=span]
7819 |= [e=expr expected=itype env=ienv subject=iresult context=span]
8901 ^- iresult
7820 ^- iresult
8902− =. subject (grec-match-view e subject)
8903 =. subject (jrec-match-view e subject)
7821 =. subject (jrec-match-view e subject)
8904 =/ whole=(unit iresult) (infer-known-union-context-whole e expected env subject context)
7822 =/ whole=(unit iresult) (infer-known-union-context-whole e expected env subject context)
8905 ?~ whole (infer-known-union-finite e env subject `[expected context])
7823 ?~ whole (infer-known-union-finite e env subject `[expected context])
@@ -8952,72 +7870,12 @@
8952 =/ subject=iresult (infer-fragment e env state)
7870 =/ subject=iresult (infer-fragment e env state)
8953 ?: ?=(%| -.subject) ?:((union-subject-call e) `subject ~)
7871 ?: ?=(%| -.subject) ?:((union-subject-call e) `subject ~)
8954 =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7872 =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
8955− ?. |(?=(%union -.typ) ?=(%jrec -.typ) &(?=(%grec -.typ) (grec-direct-context typ.p.subject sub.state.p.subject))) ~
7873+ ?. |(?=(%union -.typ) ?=(%jrec -.typ)) ~
8956 `subject
7874 `subject
8957::
7875::
8958−:: A direct wing with an already-known union may skip genuinely empty cases
8959−:: when checking a one-arm match. Other subjects keep their existing path.
8960−:: A directly known canonical list of an empty element contains only null.
8961−:: This helper never refines an opaque or variable-bound subject.
8962−++ empty-list-null-branch
8963− |= [e=expr env=ienv state=istate expected=(unit [typ=itype context=span])]
8964− ^- (unit iresult)
8965− ?. ?=(%branch -.e) ~
8966− ?~ arms.e ~
8967− ?^ t.arms.e ~
8968− ?. (unit-empty-pattern pat.i.arms.e) ~
8969− ?. ?=(%wing -.subject.e) ~
8970− ?. ?=([@ ~] names.subject.e) ~
8971− =/ scheme=(unit ischeme) (ienv-lookup i.names.subject.e env)
8972− ?~ scheme ~
8973− ?. ?=(%collection -.typ.u.scheme) ~
8974− ?. =(%list name.typ.u.scheme) ~
8975− ?~ prelude.state ~
8976− ?. =(at.u.prelude.state /lib/jibb/prelude/jibb) ~
8977− =/ standard=(unit ischeme) (find-jibb-mold %list u.prelude.state)
8978− ?~ standard ~
8979− ?. =(u.standard [[%collection %list ~[[%var 0]]] ~[0]]) ~
8980− =/ subject=iresult (infer-fragment subject.e env state)
8981− ?: ?=(%| -.subject) ~
8982− =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
8983− ?. ?=(%collection -.typ) ~
8984− ?. =(%list name.typ) ~
8985− ?~ args.typ ~
8986− ?^ t.args.typ ~
8987− =/ proof=(unit [empty=? left=@ud]) (itype-empty-proof i.args.typ sub.state.p.subject 256)
8988− ?~ proof ~
8989− ?. empty.u.proof ~
8990− ?~ expected `(infer-fragment val.i.arms.e env state.p.subject)
8991− =/ body=iresult (infer-call-context-arg val.i.arms.e typ.u.expected env state.p.subject context.u.expected)
8992− ?: ?=(%| -.body) `body
8993− =/ fit=ifit (itype-fit typ.p.body typ.u.expected sub.state.p.body next.state.p.body)
8994− ?: ?=(%unknown -.fit) `[%| ["single-case branch result constraint is not supported by partial inference" ~]]
8995− ?: ?=(%bad -.fit) `[%| ["single-case branch arm does not fit its expected type" ~[[context.u.expected "expected type"] [(span-of val.i.arms.e) "branch arm"]]]]
8996− ?: (itype-has-tag (itype-normalize typ.u.expected sub.fit))
8997− `[%| ["single-case branch result needs context in partial inference" ~]]
8998− `[%& typ.p.body state.p.body(sub sub.fit, next next.fit)]
8999−::
9000−++ known-empty-union-wing
9001− |= [e=expr env=ienv state=istate]
9002− ^- (unit iresult)
9003− ?. ?=(%wing -.e) ~
9004− ?. ?=([@ ~] names.e) ~
9005− =/ scheme=(unit ischeme) (ienv-lookup i.names.e env)
9006− ?~ scheme ~
9007− ?. (contextual-direct-union typ.u.scheme) ~
9008− =/ subject=iresult (infer-fragment e env state)
9009− ?: ?=(%| -.subject) ~
9010− =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
9011− ?. ?=(%union -.typ) ~
9012− =/ live=(unit (list itype)) (itype-live-cases cases.typ sub.state.p.subject caps.state.p.subject 4.096)
9013− ?~ live ~
9014− ?: =(u.live cases.typ) ~
9015− `subject
9016::
7876::
9017:: Infer changes only against a fully known record spine. Retain the
7877:: Infer changes only against a fully known record spine. Retain the
9018−:: target type; unknown spines and overlapping edits remain unsupported.
7878+:: target type; unknown spines and repeated edits remain unsupported.
9019−:: An edit's wing, as open.cart, reads through record fields only,
9020−:: outermost first, and its value fits the field it names.
9021++ change-spine-known
7879++ change-spine-known
9022 |= [t=itype sub=isub]
7880 |= [t=itype sub=isub]
9023 ^- ?
7881 ^- ?
@@ -9029,87 +7887,26 @@
9029 $(t tal.t)
7887 $(t tal.t)
9030::
7888::
9031++ infer-change-edits
7889++ infer-change-edits
9032− |= [edits=(list edit) target=itype env=ienv state=istate seen=(list (list term))]
7890+ |= [edits=(list edit) target=itype env=ienv state=istate seen=(list term)]
9033 ^- iresult
7891 ^- iresult
9034 ?~ edits [%& target state]
7892 ?~ edits [%& target state]
9035 =/ entry=edit i.edits
7893 =/ entry=edit i.edits
9036− =/ outer=(list term) (flop names.entry)
7894+ ?: (lien seen |=(name=term =(name name.entry)))
9037− ?: (lien seen |=(prior=(list term) (wing-overlap prior outer)))
9038 [%| ["repeated change fields are not supported by partial inference" ~]]
7895 [%| ["repeated change fields are not supported by partial inference" ~]]
9039 ?. (change-spine-known target sub.state)
7896 ?. (change-spine-known target sub.state)
9040 [%| ["change target needs a known record in partial inference" ~]]
7897 [%| ["change target needs a known record in partial inference" ~]]
9041− =/ field=(each itype idiag) (change-wing-field entry target sub.state)
7898+ =/ found=(list itype) (record-fields-named name.entry target sub.state)
9042− ?: ?=(%| -.field) [%| p.field]
7899+ ?~ found
7900+ [%| ["record has no field `{(trip name.entry)}`" ~[[at.entry "unknown field"]]]]
7901+ ?^ t.found [%| ["change field is ambiguous in partial inference" ~]]
9043− =/ expected=itype p.field
7902+ =/ expected=itype i.found
9044 =/ value=iresult (infer-call-context-arg val.entry expected env state at.entry)
7903 =/ value=iresult (infer-call-context-arg val.entry expected env state at.entry)
9045 ?: ?=(%| -.value) value
7904 ?: ?=(%| -.value) value
9046 =/ fit=ifit (itype-fit typ.p.value expected sub.state.p.value next.state.p.value)
7905 =/ fit=ifit (itype-fit typ.p.value expected sub.state.p.value next.state.p.value)
9047 ?: ?=(%unknown -.fit) [%| ["change field constraint is not supported by partial inference" ~]]
7906 ?: ?=(%unknown -.fit) [%| ["change field constraint is not supported by partial inference" ~]]
9048 ?: ?=(%bad -.fit)
7907 ?: ?=(%bad -.fit)
9049− =/ decimal=(unit idiag) (decimal-misfit val.entry typ.p.value expected sub.state.p.value next.state.p.value)
9050− ?^ decimal [%| u.decimal]
9051 [%| ["change field and replacement do not unify" ~[[at.entry (site-type-note "expected replacement" expected sub.state.p.value)] [(span-of val.entry) (site-type-note "replacement" typ.p.value sub.state.p.value)]]]]
7908 [%| ["change field and replacement do not unify" ~[[at.entry (site-type-note "expected replacement" expected sub.state.p.value)] [(span-of val.entry) (site-type-note "replacement" typ.p.value sub.state.p.value)]]]]
9052− $(edits t.edits, state state.p.value(sub sub.fit, next next.fit), seen [outer seen])
7909+ $(edits t.edits, state state.p.value(sub sub.fit, next next.fit), seen [name.entry seen])
9053−::
9054−:: +change-wing-field: the type of the field an edit's wing names in
9055−:: a known record target, read through record fields, outermost first
9056−::
9057−++ change-wing-field
9058− |= [entry=edit target=itype sub=isub]
9059− ^- (each itype idiag)
9060− =/ outer=(list term) (flop names.entry)
9061− =/ k=@ud (lent names.entry)
9062− =/ typ=itype target
9063− =| through=(unit [name=term at=span])
9064− |- ^- (each itype idiag)
9065− ?~ outer [%& typ]
9066− =/ here=span (edit-name-at entry (dec k))
9067− ?: &(?=(^ through) !(change-spine-known typ sub))
9068− ?. (itype-not-record typ sub)
9069− [%| ["change wing needs a known record in partial inference" ~]]
9070− =/ label=tape "field `{(trip name.u.through)}`"
9071− :- %|
9072− :- "change wing `{(show-names names.entry)}` goes through `{(trip name.u.through)}`, which is not a record"
9073− ~[[at.u.through (site-type-note label typ sub)]]
9074− =/ found=(list itype) (record-fields-named i.outer typ sub)
9075− ?~ found
9076− [%| ["record has no field `{(trip i.outer)}`" ~[[here "unknown field"]]]]
9077− ?^ t.found [%| ["change field is ambiguous in partial inference" ~]]
9078− $(outer t.outer, k (dec k), typ i.found, through `[i.outer here])
9079−::
9080−:: +edit-name-at: where the kth name of an edit's wing is written,
9081−:: counting from 0: its names are joined by dots from the edit's start
9082−::
9083−++ edit-name-at
9084− |= [e=edit k=@ud]
9085− ^- span
9086− =/ col=@ud col.beg.at.e
9087− =/ ns=(list term) names.e
9088− |- ^- span
9089− ?~ ns at.e
9090− =/ len=@ud (met 3 i.ns)
9091− ?: =(0 k) [[line.beg.at.e col] [line.beg.at.e (add col len)]]
9092− $(ns t.ns, k (dec k), col +((add col len)))
9093−::
9094−:: +itype-not-record: whether a type is surely no record: an atom, a
9095−:: loobean, a list or other collection, a gate, a union or a noun
9096−::
9097−++ itype-not-record
9098− |= [t=itype sub=isub]
9099− ^- ?
9100− =. t (itype-walk t sub)
9101− ?=(?(%atom %any-atom %flag %const %tag %collection %fn %union %noun %empty) -.t)
9102−::
9103−:: +wing-overlap: whether two edits' wings, outermost first, name the
9104−:: same field or one a field inside the other's
9105−::
9106−++ wing-overlap
9107− |= [a=(list term) b=(list term)]
9108− ^- ?
9109− ?~ a &
9110− ?~ b &
9111− ?. =(i.a i.b) |
9112− $(a t.a, b t.b)
9113::
7910::
9114:: Backtick constructs the canonical prelude unit, after checking its
7911:: Backtick constructs the canonical prelude unit, after checking its
9115:: prepared template has the standard null and [~ u=A] cases.
7912:: prepared template has the standard null and [~ u=A] cases.
@@ -9213,183 +8010,6 @@
9213 ?. ?=(%ok -.first) ~
8010 ?. ?=(%ok -.first) ~
9214 $(items t.items, actual tal.actual, expected tal.expected, sub sub.first, next next.first)
8011 $(items t.items, actual tal.actual, expected tal.expected, sub sub.first, next next.first)
9215::
8012::
9216−:: +decimal-misfit: a decimal's error where another aura is expected
9217−::
9218−:: A bare decimal is a @ud and fits only @ud, @u, @ and * (S4). After
9219−:: a value fails to fit, refit it with each decimal's variable widened
9220−:: to any aura (+decimal-relax), so that a gate's shared capital learns
9221−:: its aura from the other arguments, then walk the value's syntax
9222−:: beside the type it should fit. The first decimal whose place is an
9223−:: atom of another aura gets the error; otherwise ~, and the caller's
9224−:: own error stands.
9225−::
9226−++ decimal-misfit
9227− |= [e=expr actual=itype expected=itype sub=isub next=@ud]
9228− ^- (unit idiag)
9229− =/ loose=isub (turn sub |=(b=ibinding b(val (decimal-relax val.b))))
9230− =/ fit=ifit (itype-fit (decimal-relax actual) (decimal-relax expected) loose next)
9231− (decimal-misfit-at e (decimal-relax expected) ?:(?=(%ok -.fit) sub.fit loose))
9232−::
9233−:: +decimal-relax: a type with each decimal's variable taking any aura
9234−::
9235−++ decimal-relax
9236− |= t=itype
9237− ^- itype
9238− ?+ -.t t
9239− %nvar [%avar id.t]
9240− %rnvar [%rvar id.t]
9241− %collection t(args (turn args.t |=(c=itype (decimal-relax c))))
9242− %grec t(args (turn args.t |=(c=itype (decimal-relax c))))
9243− %union t(cases (turn cases.t |=(c=itype (decimal-relax c))), args (turn args.t |=(c=itype (decimal-relax c))))
9244− %face t(body $(t body.t))
9245− %fn [%fn $(t sample.t) $(t product.t)]
9246− %cell [%cell $(t hed.t) $(t tal.t)]
9247− ==
9248−::
9249−:: +decimal-misfit-at: walk a value beside the type it should fit
9250−::
9251−:: Through groups, faces, tuples and term-headed pairs, the union case
9252−:: a tuple's head tag picks, units and list literals.
9253−::
9254−++ decimal-misfit-at
9255− |= [e=expr expected=itype sub=isub]
9256− ^- (unit idiag)
9257− =. expected (itype-walk expected sub)
9258− ?: ?=(%face -.expected) $(expected body.expected)
9259− ?+ -.e ~
9260− %lit (decimal-lit-misfit at.e lit.e expected |)
9261− %group $(e inner.e)
9262− %pair $(e (pair-as-cell e))
9263− %tuple (decimal-misfit-items items.e expected sub)
9264− %unit
9265− ?. ?=(%collection -.expected) ~
9266− ?. &(=(%unit name.expected) ?=([* ~] args.expected)) ~
9267− $(e val.e, expected i.args.expected)
9268− %list
9269− ?. ?=(%collection -.expected) ~
9270− ?. &(=(%list name.expected) ?=([* ~] args.expected)) ~
9271− =/ items=(list expr) items.e
9272− |-
9273− ?~ items ~
9274− =/ found=(unit idiag) ^$(e i.items, expected i.args.expected)
9275− ?^ found found
9276− $(items t.items)
9277− ==
9278−::
9279−:: +decimal-misfit-items: a tuple's items beside a cell, the last its tail
9280−::
9281−++ decimal-misfit-items
9282− |= [items=(list item) expected=itype sub=isub]
9283− ^- (unit idiag)
9284− ?~ items ~
9285− ?~ t.items (decimal-misfit-at val.i.items expected sub)
9286− =. expected (itype-walk expected sub)
9287− ?: ?=(%face -.expected) $(expected body.expected)
9288− ?: ?=(%union -.expected)
9289− =/ head=expr val.i.items
9290− ?. ?=(%lit -.head) ~
9291− =/ case=(unit itype) (decimal-case val.lit.head cases.expected sub)
9292− ?~ case ~
9293− $(expected u.case)
9294− ?. ?=(%cell -.expected) ~
9295− =/ found=(unit idiag) (decimal-misfit-at val.i.items hed.expected sub)
9296− ?^ found found
9297− $(items t.items, expected tal.expected)
9298−::
9299−:: +decimal-pattern-misfit: a decimal pattern where another aura is matched
9300−::
9301−:: The subject's type is known, so no refit is needed. A cell pattern
9302−:: picks its union case by its head, as a tuple does.
9303−::
9304−++ decimal-pattern-misfit
9305− |= [p=pattern expected=itype sub=isub]
9306− ^- (unit idiag)
9307− =. expected (itype-walk expected sub)
9308− ?: ?=(%face -.expected) $(expected body.expected)
9309− ?: ?=(%lit -.p) (decimal-lit-misfit at.p lit.p expected &)
9310− ?. ?=(%cell -.p) ~
9311− (decimal-pattern-items items.p expected sub)
9312−::
9313−:: +decimal-pattern-items: a cell pattern's items, as +decimal-misfit-items
9314−::
9315−++ decimal-pattern-items
9316− |= [items=(list pattern) expected=itype sub=isub]
9317− ^- (unit idiag)
9318− ?~ items ~
9319− ?~ t.items (decimal-pattern-misfit i.items expected sub)
9320− =. expected (itype-walk expected sub)
9321− ?: ?=(%face -.expected) $(expected body.expected)
9322− ?: ?=(%union -.expected)
9323− ?. ?=(%lit -.i.items) ~
9324− =/ case=(unit itype) (decimal-case val.lit.i.items cases.expected sub)
9325− ?~ case ~
9326− $(expected u.case)
9327− ?. ?=(%cell -.expected) ~
9328− =/ found=(unit idiag) (decimal-pattern-misfit i.items hed.expected sub)
9329− ?^ found found
9330− $(items t.items, expected tal.expected)
9331−::
9332−:: +decimal-arms-misfit: the first arm whose pattern has a misplaced decimal
9333−::
9334−++ decimal-arms-misfit
9335− |= [arms=(list arm) subject=itype sub=isub]
9336− ^- (unit idiag)
9337− ?~ arms ~
9338− =/ found=(unit idiag) (decimal-pattern-misfit pat.i.arms subject sub)
9339− ?^ found found
9340− $(arms t.arms)
9341−::
9342−:: +decimal-case: the one union case whose head is the constant value
9343−::
9344−++ decimal-case
9345− |= [value=@ cases=(list itype) sub=isub]
9346− ^- (unit itype)
9347− =/ hits=(list itype)
9348− %+ skim cases
9349− |= c=itype
9350− =. c (itype-walk c sub)
9351− ?. ?=(%cell -.c) |
9352− =/ head=itype (itype-walk hed.c sub)
9353− =? head ?=(%face -.head) (itype-walk body.head sub)
9354− &(?=(%const -.head) =(value val.literal.head))
9355− ?. ?=([* ~] hits) ~
9356− `i.hits
9357−::
9358−:: +decimal-lit-misfit: the error for a decimal at a place of known type
9359−::
9360−++ decimal-lit-misfit
9361− |= [at=span l=lit expected=itype pattern=?]
9362− ^- (unit idiag)
9363− ?. &(=(%number form.l) =(%ud aura.l)) ~
9364− ?. ?=(%atom -.expected) ~
9365− ?: (decimal-aura aura.expected) ~
9366− `[(decimal-misfit-msg l aura.expected pattern) ~[[at "decimal"]]]
9367−::
9368−:: +decimal-misfit-msg: "`30` is a @ud, not a @dr; write ~s30"
9369−::
9370−:: The hint writes the value in the expected aura's own literal where
9371−:: that reads naturally: 30 seconds, the text "30", the ship ~syd; a
9372−:: date gets an example. Patterns take no dates, durations or knots,
9373−:: so in a pattern those auras get no hint.
9374−::
9375−++ decimal-misfit-msg
9376− |= [l=lit aura=@ta pattern=?]
9377− ^- tape
9378− =/ what=tape "`{(trip txt.l)}` is a @ud, not a @{(trip aura)}"
9379− =/ hint=tape
9380− ?: &(pattern ?=(?(%da %dr %ta) aura)) ""
9381− ?+ aura ""
9382− %da "a date, as ~2026.1.1"
9383− %dr (trip (scot %dr (mul val.l ~s1)))
9384− %p (trip (scot %p val.l))
9385− %t (show-quoted txt.l)
9386− %ta "~.{(trip txt.l)}"
9387− %ux (trip (scot %ux val.l))
9388− %uv (trip (scot %uv val.l))
9389− ==
9390− ?~ hint what
9391− "{what}; write {hint}"
9392−::
9393:: A term-headed pair is the same noun as a two-item cell. Preserve the
8013:: A term-headed pair is the same noun as a two-item cell. Preserve the
9394:: whole pair span for the synthetic head and the value's own span for
8014:: whole pair span for the synthetic head and the value's own span for
9395:: the payload; unresolved term constraints follow ordinary cell inference.
8015:: the payload; unresolved term constraints follow ordinary cell inference.
@@ -9424,8 +8044,8 @@
9424 %duration [%& [%atom %dr] state]
8044 %duration [%& [%atom %dr] state]
9425 %knot [%& [%atom %ta] state]
8045 %knot [%& [%atom %ta] state]
9426 %loobean [%& [%flag ~] state]
8046 %loobean [%& [%flag ~] state]
9427− %term [%& [%tag next.state lit.e |] state(next +(next.state), tags [[next.state lit.e at.e] tags.state])]
8047+ %term [%& [%tag next.state lit.e |] state(next +(next.state), tags [[next.state lit.e] tags.state])]
9428− %null [%& [%tag next.state lit.e |] state(next +(next.state), tags [[next.state lit.e at.e] tags.state])]
8048+ %null [%& [%tag next.state lit.e |] state(next +(next.state), tags [[next.state lit.e] tags.state])]
9429 ==
8049 ==
9430 %unit
8050 %unit
9431 ?~ prelude.state [%| ["unit construction needs the standard prelude in partial inference" ~]]
8051 ?~ prelude.state [%| ["unit construction needs the standard prelude in partial inference" ~]]
@@ -9447,7 +8067,7 @@
9447 ?. =(u.standard [[%collection %list ~[[%var 0]]] ~[0]])
8067 ?. =(u.standard [[%collection %list ~[[%var 0]]] ~[0]])
9448 [%| ["list literal needs the standard prelude in partial inference" ~]]
8068 [%| ["list literal needs the standard prelude in partial inference" ~]]
9449 =/ element=itype [%var next.state]
8069 =/ element=itype [%var next.state]
9450− =/ result=iresult (infer-open-list-items items.e element env state(next +(next.state)) at.e ~)
8070+ =/ result=iresult (infer-open-list-items items.e element env state(next +(next.state)) at.e)
9451 ?: ?=(%| -.result) result
8071 ?: ?=(%| -.result) result
9452 [%& [%collection %list ~[element]] state.p.result]
8072 [%& [%collection %list ~[element]] state.p.result]
9453 %str (infer-string-pieces pieces.e env state)
8073 %str (infer-string-pieces pieces.e env state)
@@ -9479,7 +8099,6 @@
9479 [%& typ.instance state.instance]
8099 [%& typ.instance state.instance]
9480 =/ scheme=(unit ischeme) (ienv-lookup i.names.e env)
8100 =/ scheme=(unit ischeme) (ienv-lookup i.names.e env)
9481 ?~ scheme
8101 ?~ scheme
9482− ?: =(i.names.e %unface) [%| (unface-value at.e)]
9483 ?~ prelude.state [%| ["name is not available to partial inference" ~]]
8102 ?~ prelude.state [%| ["name is not available to partial inference" ~]]
9484 =/ prelude-entry=(unit ischeme) (ienv-lookup i.names.e values.u.prelude.state)
8103 =/ prelude-entry=(unit ischeme) (ienv-lookup i.names.e values.u.prelude.state)
9485 ?~ prelude-entry [%| ["name is not available to partial inference" ~]]
8104 ?~ prelude-entry [%| ["name is not available to partial inference" ~]]
@@ -9487,24 +8106,18 @@
9487 [%& typ.inst state.inst]
8106 [%& typ.inst state.inst]
9488 =/ instance=[typ=itype state=istate] (instantiate-scheme u.scheme state)
8107 =/ instance=[typ=itype state=istate] (instantiate-scheme u.scheme state)
9489 [%& typ.instance state.instance]
8108 [%& typ.instance state.instance]
9490− %group
9491− ?: &(?=(%wing -.inner.e) =(names.inner.e ~[%unface]) ?=(~ (ienv-lookup %unface env)))
9492− [%| ["unface takes one argument, as (unface e)" ~[[at.e "unface call"]]]]
9493− $(e inner.e)
8109+ %group $(e inner.e)
9494 %change
8110 %change
9495 ?~ edits.e [%| ["a change takes at least one field" ~[[at.e "empty change"]]]]
8111 ?~ edits.e [%| ["a change takes at least one field" ~[[at.e "empty change"]]]]
9496 =/ target=iresult $(e [%wing at.e target.e])
8112 =/ target=iresult $(e [%wing at.e target.e])
9497 ?: ?=(%| -.target) target
8113 ?: ?=(%| -.target) target
9498 (infer-change-edits edits.e typ.p.target env state.p.target ~)
8114 (infer-change-edits edits.e typ.p.target env state.p.target ~)
9499− %ctor [%& [%tag next.state tag.e &] state(next +(next.state), tags [[next.state tag.e at.e] tags.state])]
8115+ %ctor [%& [%tag next.state tag.e &] state(next +(next.state), tags [[next.state tag.e] tags.state])]
9500 %trace
8116 %trace
9501 =/ traced=iresult $(e val.e)
8117 =/ traced=iresult $(e val.e)
9502 ?: ?=(%| -.traced) traced
8118 ?: ?=(%| -.traced) traced
9503 $(e then.e, state state.p.traced)
8119 $(e then.e, state state.p.traced)
9504− %tuple
9505− ?: &(?=(^ defer.state) ?=(^ prelude.state))
9506− (dg-infer-tuple-items items.e env state)
9507− (infer-simple-items items.e env state)
8120+ %tuple (infer-simple-items items.e env state)
9508 %body
8121 %body
9509 ?~ defs.e $(e final.e)
8122 ?~ defs.e $(e final.e)
9510 =/ local-names=(list term) (global-value-names defs.e)
8123 =/ local-names=(list term) (global-value-names defs.e)
@@ -9527,17 +8140,8 @@
9527 ?: ?=(%| -.result) result
8140 ?: ?=(%| -.result) result
9528 [%& typ.p.result state.p.result(globals globals.state, molds molds.state)]
8141 [%& typ.p.result state.p.result(globals globals.state, molds molds.state)]
9529 %branch
8142 %branch
9530− =/ named=(unit idiag) (branch-tag-name e env state)
9531− ?^ named [%| u.named]
9532− ?^ defer.state (dg-boolean-branch e env state)
9533 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
8143 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
9534 ?~ t.arms.e
8144 ?~ t.arms.e
9535− =/ empty-list=(unit iresult) (empty-list-null-branch e env state ~)
9536− ?^ empty-list u.empty-list
9537− =/ empty-union=(unit iresult) (known-empty-union-wing subject.e env state)
9538− ?^ empty-union (infer-known-union-branch-subject e env u.empty-union)
9539− =/ single=(unit iresult) (grec-single-wing-subject subject.e env state)
9540− ?^ single (infer-known-union-branch-subject e env u.single)
9541 ?: (single-structured-pattern e) (infer-single-case-branch e env state ~)
8145 ?: (single-structured-pattern e) (infer-single-case-branch e env state ~)
9542 (infer-cell-branch e env state ~)
8146 (infer-cell-branch e env state ~)
9543 ?^ t.t.arms.e (infer-known-union-branch e env state)
8147 ?^ t.t.arms.e (infer-known-union-branch e env state)
@@ -9569,22 +8173,22 @@
9569 ?: ?=(%| -.right) right
8173 ?: ?=(%| -.right) right
9570 =/ ltype=itype (itype-normalize typ.p.left sub.state.p.right)
8174 =/ ltype=itype (itype-normalize typ.p.left sub.state.p.right)
9571 =/ rtype=itype (itype-normalize typ.p.right sub.state.p.right)
8175 =/ rtype=itype (itype-normalize typ.p.right sub.state.p.right)
8176+ ?: &(!=(ltype rtype) |(?=(^ (itype-vars ltype)) ?=(^ (itype-vars rtype))) |((itype-has-fixed-atom ltype) (itype-has-fixed-atom rtype)))
8177+ [%| ["branch widening is not supported by partial inference" ~]]
9572− =/ joined=(unit [typ=itype sub=isub]) (itype-branch-join typ.p.left typ.p.right sub.state.p.right)
8178+ =/ joined=(unit isub) (itype-unify typ.p.left typ.p.right sub.state.p.right)
9573 ?~ joined
8179 ?~ joined
9574 ?: |((itype-has-recursive ltype) (itype-has-recursive rtype))
8180 ?: |((itype-has-recursive ltype) (itype-has-recursive rtype))
9575 [%| ["recursive branch matching is not supported by partial inference" ~]]
8181 [%| ["recursive branch matching is not supported by partial inference" ~]]
9576 ?: |((itype-has-tag ltype) (itype-has-tag rtype) (itype-has-union ltype) (itype-has-union rtype))
8182 ?: |((itype-has-tag ltype) (itype-has-tag rtype) (itype-has-union ltype) (itype-has-union rtype))
9577 [%| ["branch tag or union context is not supported by partial inference" ~]]
8183 [%| ["branch tag or union context is not supported by partial inference" ~]]
8184+ =/ common=(unit itype) (itype-concrete-join typ.p.left typ.p.right sub.state.p.right)
8185+ ?^ common [%& u.common state.p.right]
9578 ?: |((itype-has-face typ.p.left sub.state.p.right) (itype-has-face typ.p.right sub.state.p.right))
8186 ?: |((itype-has-face typ.p.left sub.state.p.right) (itype-has-face typ.p.right sub.state.p.right))
9579 [%| ["record branch matching is not supported by partial inference" ~]]
8187 [%| ["record branch matching is not supported by partial inference" ~]]
9580 ?: |((itype-has-any-atom typ.p.left sub.state.p.right) (itype-has-any-atom typ.p.right sub.state.p.right) (itype-family-related typ.p.left typ.p.right sub.state.p.right))
8188 ?: |((itype-has-any-atom typ.p.left sub.state.p.right) (itype-has-any-atom typ.p.right sub.state.p.right) (itype-family-related typ.p.left typ.p.right sub.state.p.right))
9581 [%| ["branch widening is not supported by partial inference" ~]]
8189 [%| ["branch widening is not supported by partial inference" ~]]
9582− =/ decimal-x=(unit idiag) (decimal-misfit val.x typ.p.left typ.p.right sub.state.p.right next.state.p.right)
9583− ?^ decimal-x [%| u.decimal-x]
9584− =/ decimal-y=(unit idiag) (decimal-misfit val.y typ.p.right typ.p.left sub.state.p.right next.state.p.right)
9585− ?^ decimal-y [%| u.decimal-y]
9586 [%| ["branch arms have incompatible types" ~[[(span-of val.x) (site-type-note "first arm" typ.p.left sub.state.p.right)] [(span-of val.y) (site-type-note "second arm" typ.p.right sub.state.p.right)]]]]
8190 [%| ["branch arms have incompatible types" ~[[(span-of val.x) (site-type-note "first arm" typ.p.left sub.state.p.right)] [(span-of val.y) (site-type-note "second arm" typ.p.right sub.state.p.right)]]]]
9587− [%& typ.u.joined state.p.right(sub sub.u.joined)]
8191+ [%& typ.p.left state.p.right(sub u.joined)]
9588 %cast
8192 %cast
9589 =/ target=(unit [typ=itype state=istate]) (infer-simple-shape shape.e state)
8193 =/ target=(unit [typ=itype state=istate]) (infer-simple-shape shape.e state)
9590 ?~ target
8194 ?~ target
@@ -9604,11 +8208,7 @@
9604 ?^ missing [%| u.missing]
8208 ?^ missing [%| u.missing]
9605 =/ nested=(unit idiag) (nested-missing-tag val.e typ.p.value typ.u.target sub.state.p.value next.state.p.value at.shape.e)
8209 =/ nested=(unit idiag) (nested-missing-tag val.e typ.p.value typ.u.target sub.state.p.value next.state.p.value at.shape.e)
9606 ?^ nested [%| u.nested]
8210 ?^ nested [%| u.nested]
9607− =/ decimal=(unit idiag) (decimal-misfit val.e typ.p.value typ.u.target sub.state.p.value next.state.p.value)
9608− ?^ decimal [%| u.decimal]
9609 [%| ["cast mold and expression type do not unify" ~[[at.shape.e (site-type-note "cast mold" typ.u.target sub.state.p.value)] [(span-of val.e) (site-type-note "expression" typ.p.value sub.state.p.value)]]]]
8211 [%| ["cast mold and expression type do not unify" ~[[at.shape.e (site-type-note "cast mold" typ.u.target sub.state.p.value)] [(span-of val.e) (site-type-note "expression" typ.p.value sub.state.p.value)]]]]
9610− ?: &(?=(^ defer.state.p.value) !(dg-stable-fit typ.p.value typ.u.target sub.fit))
9611− [%| ["deferred cast fit needs stable inference" ~]]
9612 =/ merged=itype (itype-merge-faces typ.p.value typ.u.target sub.fit)
8212 =/ merged=itype (itype-merge-faces typ.p.value typ.u.target sub.fit)
9613 [%& merged state.p.value(sub sub.fit, next next.fit)]
8213 [%& merged state.p.value(sub sub.fit, next next.fit)]
9614 %crash [%& [%var next.state] state(next +(next.state))]
8214 %crash [%& [%var next.state] state(next +(next.state))]
@@ -9634,7 +8234,6 @@
9634 ?~ args.e [%| ["call has no argument" ~]]
8234 ?~ args.e [%| ["call has no argument" ~]]
9635 ?: (explicit-proj-call e env state)
8235 ?: (explicit-proj-call e env state)
9636 [%| ["proj needs an expected record type" ~]]
8236 [%| ["proj needs an expected record type" ~]]
9637− ?: (reserved-call %unface e env state) (infer-unface e env state)
9638 (infer-call-with-head e env state (infer-fragment head.e env state))
8237 (infer-call-with-head e env state (infer-fragment head.e env state))
9639 * [%| ["expression is not supported by partial inference" ~]]
8238 * [%| ["expression is not supported by partial inference" ~]]
9640 ==
8239 ==
@@ -9917,35 +8516,21 @@
9917 ?: ?=(%ok -.fit) ~
8516 ?: ?=(%ok -.fit) ~
9918 (direct-gate-call-fit e typ.p.arg sample.ht env st)
8517 (direct-gate-call-fit e typ.p.arg sample.ht env st)
9919 =. fit ?~(direct fit u.direct)
8518 =. fit ?~(direct fit u.direct)
9920− ?: ?=(%unknown -.fit)
9921− ?~ defer.st [%| ["call constraint is not supported by partial inference" ~]]
8519+ ?: ?=(%unknown -.fit) [%| ["call constraint is not supported by partial inference" ~]]
9922− =/ edge=(unit dgo) (dg-eligible-ctor e typ.p.head typ.p.arg sample.ht st)
9923− ?~ edge [%| ["call constraint is not supported by partial inference" ~]]
9924− ?: (gth (lent obligations.st) 63) [%| ["call constraint is not supported by partial inference" ~]]
9925− [%& product.ht st(obligations [u.edge obligations.st])]
9926−
9927 ?: ?=(%bad -.fit)
8520 ?: ?=(%bad -.fit)
9928 ?~ t.args.e
8521 ?~ t.args.e
9929 =/ missing=(unit idiag) (missing-union-tag i.args.e sample.ht sub.st (span-of head.e))
8522 =/ missing=(unit idiag) (missing-union-tag i.args.e sample.ht sub.st (span-of head.e))
9930 ?^ missing [%| u.missing]
8523 ?^ missing [%| u.missing]
9931 =/ nested=(unit idiag) (nested-missing-tag i.args.e typ.p.arg sample.ht sub.st next.st (span-of head.e))
8524 =/ nested=(unit idiag) (nested-missing-tag i.args.e typ.p.arg sample.ht sub.st next.st (span-of head.e))
9932 ?^ nested [%| u.nested]
8525 ?^ nested [%| u.nested]
9933− =/ decimal=(unit idiag) (decimal-misfit i.args.e typ.p.arg sample.ht sub.st next.st)
9934− ?^ decimal [%| u.decimal]
9935 [%| ["call's sample and argument types do not unify" ~[[(span-of head.e) (site-type-note "called gate" ht sub.st)] [(span-of i.args.e) (site-type-note "argument" typ.p.arg sub.st)]]]]
8526 [%| ["call's sample and argument types do not unify" ~[[(span-of head.e) (site-type-note "called gate" ht sub.st)] [(span-of i.args.e) (site-type-note "argument" typ.p.arg sub.st)]]]]
9936 =/ bad=(unit [at=span typ=itype])
8527 =/ bad=(unit [at=span typ=itype])
9937 (call-error-site args.e typ.p.arg sample.ht sub.st next.st)
8528 (call-error-site args.e typ.p.arg sample.ht sub.st next.st)
9938 =/ whole-args=span
8529 =/ whole-args=span
9939 [beg:(span-of i.args.e) end:(span-of (rear args.e))]
8530 [beg:(span-of i.args.e) end:(span-of (rear args.e))]
9940− =/ decimal=(unit idiag)
9941− =/ items=(list item) (turn args.e |=(a=expr [(span-of a) ~ a]))
9942− (decimal-misfit [%tuple whole-args items] typ.p.arg sample.ht sub.st next.st)
9943− ?^ decimal [%| u.decimal]
9944 =/ arg-at=span ?~(bad whole-args at.u.bad)
8531 =/ arg-at=span ?~(bad whole-args at.u.bad)
9945 =/ arg-type=itype ?~(bad typ.p.arg typ.u.bad)
8532 =/ arg-type=itype ?~(bad typ.p.arg typ.u.bad)
9946 [%| ["call's sample and argument types do not unify" ~[[(span-of head.e) (site-type-note "called gate" ht sub.st)] [arg-at (site-type-note "argument" arg-type sub.st)]]]]
8533 [%| ["call's sample and argument types do not unify" ~[[(span-of head.e) (site-type-note "called gate" ht sub.st)] [arg-at (site-type-note "argument" arg-type sub.st)]]]]
9947− ?: &(?=(^ defer.st) !(dg-stable-call-fit typ.p.arg sample.ht product.ht sub.fit ?=(^ t.args.e)))
9948− [%| ["deferred call fit needs stable inference" ~]]
9949 =/ face-asym=?
8534 =/ face-asym=?
9950 ?^ direct |
8535 ?^ direct |
9951 ?^ t.args.e (itype-positional-face-asym args.e typ.p.arg sample.ht sub.fit)
8536 ?^ t.args.e (itype-positional-face-asym args.e typ.p.arg sample.ht sub.fit)
@@ -10011,8 +8596,6 @@
10011 ?^ missing [%| u.missing]
8596 ?^ missing [%| u.missing]
10012 =/ nested=(unit idiag) (nested-missing-tag val.e typ.p.value payload sub.state.p.value next.state.p.value context)
8597 =/ nested=(unit idiag) (nested-missing-tag val.e typ.p.value payload sub.state.p.value next.state.p.value context)
10013 ?^ nested [%| u.nested]
8598 ?^ nested [%| u.nested]
10014− =/ decimal=(unit idiag) (decimal-misfit val.e typ.p.value payload sub.state.p.value next.state.p.value)
10015− ?^ decimal [%| u.decimal]
10016 [%| ["unit payload does not fit its expected type" ~[[context (site-type-note "expected unit payload" payload sub.state.p.value)] [(span-of val.e) (site-type-note "payload" typ.p.value sub.state.p.value)]]]]
8599 [%| ["unit payload does not fit its expected type" ~[[context (site-type-note "expected unit payload" payload sub.state.p.value)] [(span-of val.e) (site-type-note "payload" typ.p.value sub.state.p.value)]]]]
10017 [%& expected state.p.value(sub sub.fit, next next.fit)]
8600 [%& expected state.p.value(sub sub.fit, next next.fit)]
10018::
8601::
@@ -10025,7 +8608,6 @@
10025 ^- iresult
8608 ^- iresult
10026 ?> ?=(%call -.e)
8609 ?> ?=(%call -.e)
10027 ?~ args.e [%| ["call has no argument" ~]]
8610 ?~ args.e [%| ["call has no argument" ~]]
10028− ?: (reserved-call %unface e env state) (infer-unface e env state)
10029 =/ head=iresult (infer-fragment head.e env state)
8611 =/ head=iresult (infer-fragment head.e env state)
10030 ?: ?=(%| -.head) head
8612 ?: ?=(%| -.head) head
10031 =/ ht=itype (itype-walk typ.p.head sub.state.p.head)
8613 =/ ht=itype (itype-walk typ.p.head sub.state.p.head)
@@ -10042,17 +8624,7 @@
10042 ?~ args.result |
8624 ?~ args.result |
10043 ?. =((lent args.result) (lent args.expected)) |
8625 ?. =((lent args.result) (lent args.expected)) |
10044 ?: |((itype-has-tag (itype-normalize result sub.state.p.head)) (itype-has-tag (itype-normalize expected sub.state.p.head))) |
8626 ?: |((itype-has-tag (itype-normalize result sub.state.p.head)) (itype-has-tag (itype-normalize expected sub.state.p.head))) |
10045− =/ result-recursive=? (itype-has-recursive (itype-normalize result sub.state.p.head))
10046− =/ expected-recursive=? (itype-has-recursive (itype-normalize expected sub.state.p.head))
8627+ ?: |((itype-has-recursive (itype-normalize result sub.state.p.head)) (itype-has-recursive (itype-normalize expected sub.state.p.head))) |
10047− =/ result-ok=?
10048− ?. result-recursive &
10049− ?~ prelude.state |
10050− &(=(at.u.prelude.state /lib/jibb/prelude/jibb) =(origin.result `[at.u.prelude.state %element]))
10051− =/ expected-ok=?
10052− ?. expected-recursive &
10053− ?~ prelude.state |
10054− &(=(at.u.prelude.state /lib/jibb/prelude/jibb) =(origin.expected `[at.u.prelude.state %element]))
10055− ?. &(result-ok expected-ok) |
10056 ?: |((itype-has-any-atom result sub.state.p.head) (itype-has-any-atom expected sub.state.p.head)) |
8628 ?: |((itype-has-any-atom result sub.state.p.head) (itype-has-any-atom expected sub.state.p.head)) |
10057 &
8629 &
10058 ?. eligible (infer-call-with-head e env state head)
8630 ?. eligible (infer-call-with-head e env state head)
@@ -10108,70 +8680,18 @@
10108 `(infer-simple-items items.e env state)
8680 `(infer-simple-items items.e env state)
10109 `(width-infer-items items.e index.u.target env state context)
8681 `(width-infer-items items.e index.u.target env state context)
10110::
8682::
10111−:: +reserved-call: whether e calls the reserved operation n
10112−::
10113−:: Experimental intrinsic recognition; real bindings retain normal calls.
8683+:: Experimental intrinsic recognition; real bindings retain normal calls.
10114−++ reserved-call
10115− |= [n=term e=expr env=ienv state=istate]
10116− ^- ?
10117− ?. ?=(%call -.e) |
10118− ?. ?=(%wing -.head.e) |
10119− ?. =(names.head.e ~[n]) |
10120− ?: ?=(^ (ienv-lookup n env)) |
10121− ?: (lien globals.state |=(x=term =(x n))) |
10122− ?~ prelude.state &
10123− ?:(?=(^ (ienv-lookup n values.u.prelude.state)) | &)
10124++ explicit-proj-call
8684++ explicit-proj-call
10125 |= [e=expr env=ienv state=istate]
8685 |= [e=expr env=ienv state=istate]
10126 ^- ?
8686 ^- ?
10127 ?. ?=(%call -.e) |
8687 ?. ?=(%call -.e) |
10128 ?. ?=([* ~] args.e) |
8688 ?. ?=([* ~] args.e) |
10129− (reserved-call %proj e env state)
8689+ ?. ?=(%wing -.head.e) |
10130−::
8690+ ?. =(names.head.e ~[%proj]) |
10131−:: +infer-unface: (unface e), e's type with every face removed
8691+ ?: ?=(^ (ienv-lookup %proj env)) |
10132−::
8692+ ?: (lien globals.state |=(n=term =(n %proj))) |
10133−:: A reserved operation handled by type, like proj. Any number of
8693+ ?~ prelude.state &
10134−:: arguments is taken here so that a wrong count is an error. A type
8694+ ?:(?=(^ (ienv-lookup %proj values.u.prelude.state)) | &)
10135−:: not yet known would wait, as wing access does; the partial checker
10136−:: has no such wait and reports it as unsupported, as it does field
10137−:: access on such a type.
10138−++ infer-unface
10139− |= [e=expr env=ienv state=istate]
10140− ^- iresult
10141− ?> ?=(%call -.e)
10142− ?. ?=([* ~] args.e)
10143− [%| ["unface takes one argument, as (unface e)" ~[[at.e "unface call"]]]]
10144− ?^ defer.state [%| ["deferred unface needs unsupported inference" ~]]
10145− =/ value=iresult (infer-fragment i.args.e env state)
10146− ?: ?=(%| -.value) value
10147− =/ typ=itype (itype-walk typ.p.value sub.state.p.value)
10148− ?: ?=(?(%var %fvar) -.typ)
10149− [%| ["unface on a type not yet known is not supported by partial inference" ~]]
10150− [%& (itype-unface typ sub.state.p.value) state.p.value]
10151−::
10152−:: +unface-value: the error for unface written where a value goes
10153−::
10154−++ unface-value
10155− |= at=span
10156− ^- idiag
10157− ["unface is not a value; write |=(g (unface g))" ~[[at "unface used as a value"]]]
10158−::
10159−:: +unfaced-gate: the gate under a ++'s (unface |= …), or ~
10160−::
10161−:: Such a ++ is a gate for recursion: its own name has the unfaced
10162−:: type, and its body may call it.
10163−++ unfaced-gate
10164− |= [e=expr env=ienv state=istate]
10165− ^- (unit expr)
10166− ?: ?=(%group -.e) $(e inner.e)
10167− ?. (reserved-call %unface e env state) ~
10168− ?> ?=(%call -.e)
10169− ?. ?=([* ~] args.e) ~
10170− =/ gate=expr i.args.e
10171− |-
10172− ?: ?=(%group -.gate) $(gate inner.gate)
10173− ?. ?=(?(%gate %gate-wide) -.gate) ~
10174− `gate
10175++ infer-proj-source
8695++ infer-proj-source
10176 |= [e=expr expected=itype env=ienv state=istate context=span]
8696 |= [e=expr expected=itype env=ienv state=istate context=span]
10177 ^- iresult
8697 ^- iresult
@@ -10244,20 +8764,6 @@
10244 ?: ?=(?(%cell %face %fn %union %collection) -.val.i.sub) |
8764 ?: ?=(?(%cell %face %fn %union %collection) -.val.i.sub) |
10245 $(sub t.sub)
8765 $(sub t.sub)
10246::
8766::
10247−:: Check the syntactic root before scanning; scan substitutions once.
10248−++ grec-direct-context
10249− |= [expected=itype sub=isub]
10250− ^- ?
10251− =/ left=@ud 4.096
10252− |-
10253− ?: ?=(%face -.expected)
10254− ?: =(0 left) |
10255− $(expected body.expected, left (dec left))
10256− ?. ?=(%grec -.expected) |
10257− ?~ sub &
10258− ?: =(0 left) |
10259− ?: ?=(?(%cell %face %fn %union %collection %grec) -.val.i.sub) |
10260− $(sub t.sub, left (dec left))
10261++ contextual-direct-union
8767++ contextual-direct-union
10262 |= target=itype
8768 |= target=itype
10263 ^- ?
8769 ^- ?
@@ -10282,112 +8788,9 @@
10282 $(remaining t.remaining, found `c)
8788 $(remaining t.remaining, found `c)
10283 $(remaining t.remaining)
8789 $(remaining t.remaining)
10284::
8790::
10285−:: A bounded syntactic screen: no nested branch, cast, gate or local body
10286−:: can re-enter cell-branch retry during either inference attempt.
10287−++ closed-cell-retry-safe
10288− |= [todo=(list expr) fuel=@ud]
10289− ^- ?
10290− ?~ todo &
10291− ?: =(0 fuel) |
10292− =/ e=expr i.todo
10293− =. fuel (dec fuel)
10294− ?+ -.e |
10295− %lit $(todo t.todo)
10296− %wing $(todo t.todo)
10297− %ctor $(todo t.todo)
10298− %path $(todo t.todo)
10299− %crash $(todo t.todo)
10300− %str
10301− ?. (levy pieces.e |=(p=piece ?=(%text -.p))) |
10302− $(todo t.todo)
10303− %group $(todo [inner.e t.todo])
10304− %pair $(todo [val.e t.todo])
10305− %unit $(todo [val.e t.todo])
10306− %list $(todo (weld items.e t.todo))
10307− %tuple $(todo (weld (turn items.e |=(i=item val.i)) t.todo))
10308− %change $(todo (weld (turn edits.e |=(ed=edit val.ed)) t.todo))
10309− %call $(todo [head.e (weld args.e t.todo)])
10310− %trace $(todo [val.e then.e t.todo])
10311− ==
10312−::
10313−++ closed-cell-sub-safe
10314− |= [sub=isub fuel=@ud]
10315− ^- ?
10316− ?~ sub &
10317− ?: =(0 fuel) |
10318− ?: ?=(?(%cell %face %fn %union %collection %grec %jrec %recursive) -.val.i.sub) |
10319− $(sub t.sub, fuel (dec fuel))
10320−::
10321−++ closed-cell-branch-eligible
10322− |= [e=expr expected=itype sub=isub]
10323− ^- ?
10324− ?. &(?=(%branch -.e) ?=(%cell -.expected) (closed-cell-sub-safe sub 512)) |
10325− ?~ arms.e |
10326− ?~ t.arms.e |
10327− ?^ t.t.arms.e |
10328− =/ x=arm i.arms.e
10329− =/ y=arm i.t.arms.e
10330− ?. &(?=(%lit -.pat.x) ?=(%lit -.pat.y)) |
10331− ?. &(=(%loobean form.lit.pat.x) =(%loobean form.lit.pat.y)) |
10332− ?: =(val.lit.pat.x val.lit.pat.y) |
10333− (closed-cell-retry-safe ~[subject.e val.x val.y] 512)
10334−::
10335−:: Attempt ordinary inference first; retry from the same state only for
10336−:: the bounded non-reentrant syntax above. Preserve original value faces.
10337−++ infer-closed-cell-branch
10338− |= [e=expr expected=itype env=ienv state=istate context=span]
10339− ^- iresult
10340− ?> (closed-cell-branch-eligible e expected sub.state)
10341− ?> ?=(%branch -.e)
10342− ?> ?=(^ arms.e)
10343− ?> ?=(^ t.arms.e)
10344− =/ ordinary=iresult (infer-fragment e env state)
10345− =/ ordinary-good=?
10346− ?: ?=(%| -.ordinary) |
10347− =/ fit=ifit (itype-fit typ.p.ordinary expected sub.state.p.ordinary next.state.p.ordinary)
10348− ?=(%ok -.fit)
10349− ?: ordinary-good ordinary
10350− =/ attempt=(unit iresult)
10351− =/ x=arm i.arms.e
10352− =/ y=arm i.t.arms.e
10353− =/ subject=iresult (infer-fragment subject.e env state)
10354− ?: ?=(%| -.subject) ~
10355− =/ subject-type=itype (itype-normalize typ.p.subject sub.state.p.subject)
10356− ?: ?=(%union -.subject-type) ~
10357− =/ su=(unit isub) (itype-unify typ.p.subject [%flag ~] sub.state.p.subject)
10358− ?~ su ~
10359− =/ left=iresult (infer-call-context-arg val.x expected env state.p.subject(sub u.su) context)
10360− ?: ?=(%| -.left) ~
10361− =/ lf=ifit (itype-fit typ.p.left expected sub.state.p.left next.state.p.left)
10362− ?. ?=(%ok -.lf) ~
10363− =/ right=iresult (infer-call-context-arg val.y expected env state.p.left(sub sub.lf, next next.lf) context)
10364− ?: ?=(%| -.right) ~
10365− =/ rf=ifit (itype-fit typ.p.right expected sub.state.p.right next.state.p.right)
10366− ?. ?=(%ok -.rf) ~
10367− =/ sub=isub sub.rf
10368− =/ next=@ud next.rf
10369− =/ lt=itype (itype-normalize typ.p.left sub)
10370− =/ rt=itype (itype-normalize typ.p.right sub)
10371− =/ et=itype (itype-normalize expected sub)
10372− ?. =(lt rt) ~
10373− ?: |(?=(^ (itype-vars lt)) ?=(^ (itype-vars rt)) ?=(^ (itype-vars et))) ~
10374− ?: |((itype-has-tag lt) (itype-has-tag rt) (itype-has-tag et)) ~
10375− =/ lcheck=ifit (itype-fit typ.p.left expected sub next)
10376− ?. ?=(%ok -.lcheck) ~
10377− ?. &(=(sub.lcheck sub) =(next.lcheck next)) ~
10378− =/ rcheck=ifit (itype-fit typ.p.right expected sub next)
10379− ?. ?=(%ok -.rcheck) ~
10380− ?. &(=(sub.rcheck sub) =(next.rcheck next)) ~
10381− `[%& typ.p.left state.p.right(sub sub, next next)]
10382− ?~ attempt ordinary
10383− u.attempt
10384−::
10385++ infer-call-context-arg
8791++ infer-call-context-arg
10386 |= [e=expr expected=itype env=ienv state=istate context=span]
8792 |= [e=expr expected=itype env=ienv state=istate context=span]
10387 ^- iresult
8793 ^- iresult
10388− ?: &(?=(^ defer.state) ?=(%branch -.e)) (infer-fragment e env state)
10389− ?: &(?=(^ defer.state) ?=(^ prelude.state) ?=(%tuple -.e))
10390− (infer-fragment e env state)
10391 ?: ?=(%pair -.e) $(e (pair-as-cell e))
8794 ?: ?=(%pair -.e) $(e (pair-as-cell e))
10392 ?: ?=(%group -.e) $(e inner.e)
8795 ?: ?=(%group -.e) $(e inner.e)
10393 ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
8796 ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
@@ -10400,23 +8803,6 @@
10400 ?: ?=(%face -.target) $(target (itype-walk body.target sub.state))
8803 ?: ?=(%face -.target) $(target (itype-walk body.target sub.state))
10401 ?: (explicit-proj-call e env state)
8804 ?: (explicit-proj-call e env state)
10402 (infer-proj-context e expected env state context)
8805 (infer-proj-context e expected env state context)
10403− :: Experimental construction only for a source-proven direct target.
10404− :: Decline any walked structural binding to retain raw-variable provenance.
10405− ?: &(?=(%grec -.target) ?=(%tuple -.e) (grec-direct-context expected sub.state))
10406− =/ unfolded=(unit [view=itype left=@ud]) (grec-unfold-view target jrec-fuel.state)
10407− ?~ unfolded [%| ["recursive mold unfolding needs unsupported inference" ~]]
10408− ?~ items.e [%| ["recursive mold constructor needs unsupported inference" ~]]
10409− =/ first=item i.items.e
10410− ?. &(?=(~ face.first) ?=(%lit -.val.first) =(%term form.lit.val.first))
10411− [%| ["recursive mold constructor needs unsupported inference" ~]]
10412− =/ chosen=(unit itype) (contextual-tagged-case view.u.unfolded val.lit.val.first sub.state)
10413− ?~ chosen [%| ["recursive mold constructor has no matching case" ~]]
10414− =/ value=iresult (infer-call-context-items items.e u.chosen env state(jrec-fuel left.u.unfolded) context)
10415− ?: ?=(%| -.value) value
10416− =/ fit=ifit (itype-fit typ.p.value u.chosen sub.state.p.value next.state.p.value)
10417− ?: ?=(%unknown -.fit) [%| ["recursive mold case needs unsupported inference" ~]]
10418− ?: ?=(%bad -.fit) [%| ["recursive mold case does not fit its source shape" ~]]
10419− [%& target state.p.value(sub sub.fit, next next.fit)]
10420 :: Only the source-proven one-layer cell is exposed. Each recursive
8806 :: Only the source-proven one-layer cell is exposed. Each recursive
10421 :: descent consumes one written tuple; named values use ordinary fit.
8807 :: descent consumes one written tuple; named values use ordinary fit.
10422 ?: &(?=(%jrec -.target) ?=(%lit -.e) =(%null form.lit.e))
8808 ?: &(?=(%jrec -.target) ?=(%lit -.e) =(%null form.lit.e))
@@ -10434,16 +8820,7 @@
10434 ?: ?=(%bad -.fit) [%| ["recursive mold cell does not fit its source shape" ~]]
8820 ?: ?=(%bad -.fit) [%| ["recursive mold cell does not fit its source shape" ~]]
10435 [%& target state.p.value(sub sub.fit, next next.fit)]
8821 [%& target state.p.value(sub sub.fit, next next.fit)]
10436 ?: ?=(%call -.e) (infer-contextual-call e target env state)
8822 ?: ?=(%call -.e) (infer-contextual-call e target env state)
10437− =/ named=(unit idiag) (branch-tag-name e env state)
10438− ?^ named [%| u.named]
10439− =/ empty-list=(unit iresult) (empty-list-null-branch e env state `[target context])
10440− ?^ empty-list u.empty-list
10441 ?: (single-structured-pattern e)
8823 ?: (single-structured-pattern e)
10442− ?> ?=(%branch -.e)
10443− =/ empty-union=(unit iresult) (known-empty-union-wing subject.e env state)
10444− ?^ empty-union (infer-known-union-context-subject e target env u.empty-union context)
10445− =/ single=(unit iresult) (grec-single-wing-subject subject.e env state)
10446− ?^ single (infer-known-union-context-subject e target env u.single context)
10447 (infer-single-case-branch e env state `[target context])
8824 (infer-single-case-branch e env state `[target context])
10448 ?: (cell-binder-pattern e)
8825 ?: (cell-binder-pattern e)
10449 (infer-cell-branch e env state `[target context])
8826 (infer-cell-branch e env state `[target context])
@@ -10463,8 +8840,6 @@
10463 (infer-known-union-context-subject e target env u.known context)
8840 (infer-known-union-context-subject e target env u.known context)
10464 ?: &(?=(%union -.target) ?=(%unit -.e))
8841 ?: &(?=(%union -.target) ?=(%unit -.e))
10465 (infer-unit-context e target env state context)
8842 (infer-unit-context e target env state context)
10466− ?: (closed-cell-branch-eligible e expected sub.state)
10467− (infer-closed-cell-branch e expected env state context)
10468 ?: &(?=(%flag -.target) (context-union-branch e))
8843 ?: &(?=(%flag -.target) (context-union-branch e))
10469 (infer-union-context e target env state context)
8844 (infer-union-context e target env state context)
10470 ?: &(?=(%union -.target) (context-union-branch e))
8845 ?: &(?=(%union -.target) (context-union-branch e))
@@ -10578,7 +8953,7 @@
10578 ?~ pats [%& ~]
8953 ?~ pats [%& ~]
10579 ?. ?=(%bind -.i.pats) [%| 'branch pattern is not supported by partial inference']
8954 ?. ?=(%bind -.i.pats) [%| 'branch pattern is not supported by partial inference']
10580 =/ name=term name.i.pats
8955 =/ name=term name.i.pats
10581− ?: |((reserved-name name) ?=(^ (ienv-lookup name env)) (lien globals |=(n=term =(n name))) (lien seen |=(n=term =(n name))))
8956+ ?: |(=(name %proj) ?=(^ (ienv-lookup name env)) (lien globals |=(n=term =(n name))) (lien seen |=(n=term =(n name))))
10582 [%| 'pattern shadows a name']
8957 [%| 'pattern shadows a name']
10583 =/ rest=(each (list term) @t) $(pats t.pats, seen [name seen])
8958 =/ rest=(each (list term) @t) $(pats t.pats, seen [name seen])
10584 ?: ?=(%| -.rest) rest
8959 ?: ?=(%| -.rest) rest
@@ -10603,7 +8978,7 @@
10603 ?~ t.names |
8978 ?~ t.names |
10604 =. typ (itype-walk typ sub)
8979 =. typ (itype-walk typ sub)
10605 ?: ?=(%cell -.typ) $(typ tal.typ, names t.names)
8980 ?: ?=(%cell -.typ) $(typ tal.typ, names t.names)
10606− |(?=(%union -.typ) ?=(%collection -.typ) ?=(%recursive -.typ) ?=(%jrec -.typ) ?=(%grec -.typ) ?=(%noun -.typ) ?=(%fn -.typ) ?=(%tag -.typ))
8981+ |(?=(%union -.typ) ?=(%collection -.typ) ?=(%recursive -.typ) ?=(%jrec -.typ) ?=(%noun -.typ) ?=(%fn -.typ) ?=(%tag -.typ))
10607::
8982::
10608++ cell-binder-pattern
8983++ cell-binder-pattern
10609 |= e=expr
8984 |= e=expr
@@ -10655,17 +9030,25 @@
10655 ^- tape
9030 ^- tape
10656 =. t (itype-walk t sub)
9031 =. t (itype-walk t sub)
10657 ?- -.t
9032 ?- -.t
10658− %var (show-var id.t)
9033+ %var
10659− %fvar (show-var id.t)
9034+ ?: (lth id.t 26) [(add 65 id.t) ~]
10660− %avar (show-var id.t)
9035+ "T{<id.t>}"
10661− %rvar (show-var id.t)
9036+ %avar
10662− %nvar (show-var id.t)
9037+ ?: (lth id.t 26) [(add 65 id.t) ~]
10663− %rnvar (show-var id.t)
9038+ "T{<id.t>}"
9039+ %rvar
9040+ ?: (lth id.t 26) [(add 65 id.t) ~]
9041+ "T{<id.t>}"
9042+ %nvar
9043+ ?: (lth id.t 26) [(add 65 id.t) ~]
9044+ "T{<id.t>}"
9045+ %rnvar
9046+ ?: (lth id.t 26) [(add 65 id.t) ~]
9047+ "T{<id.t>}"
10664 %atom "@{(trip aura.t)}"
9048 %atom "@{(trip aura.t)}"
10665 %any-atom "@"
9049 %any-atom "@"
10666 %flag "?"
9050 %flag "?"
10667 %noun "*"
9051 %noun "*"
10668− %empty "!!"
10669 %tag (trip txt.literal.t)
9052 %tag (trip txt.literal.t)
10670 %const (trip txt.literal.t)
9053 %const (trip txt.literal.t)
10671 %union
9054 %union
@@ -10674,24 +9057,12 @@
10674 "({(trip u.label.t)} {(show-itype-cases args.t sub)})"
9057 "({(trip u.label.t)} {(show-itype-cases args.t sub)})"
10675 %recursive ?~(label.t "recursive mold" (trip u.label.t))
9058 %recursive ?~(label.t "recursive mold" (trip u.label.t))
10676 %jrec ?~(label.t "recursive mold" (trip u.label.t))
9059 %jrec ?~(label.t "recursive mold" (trip u.label.t))
10677− %grec ?~(label.t "recursive mold" "({(trip u.label.t)} {(show-itype-cases args.t sub)})")
10678 %collection "({(trip name.t)} {(show-itype-cases args.t sub)})"
9060 %collection "({(trip name.t)} {(show-itype-cases args.t sub)})"
10679 %face "[{(trip name.t)}={(show-itype-context body.t sub)}]"
9061 %face "[{(trip name.t)}={(show-itype-context body.t sub)}]"
10680 %fn "$-({(show-itype-context sample.t sub)} {(show-itype-context product.t sub)})"
9062 %fn "$-({(show-itype-context sample.t sub)} {(show-itype-context product.t sub)})"
10681 %cell "[{(show-itype-item hed.t sub)} {(show-itype-item tal.t sub)}]"
9063 %cell "[{(show-itype-item hed.t sub)} {(show-itype-item tal.t sub)}]"
10682 ==
9064 ==
10683::
9065::
10684−:: +show-var: a type variable as printed: its name if it has one, else
10685−:: a letter for its number, A to Z, then T26, T27 and on
10686−::
10687−++ show-var
10688− |= id=@ud
10689− ^- tape
10690− =/ name=@t (var-name id)
10691− ?. =(0 name) (trip name)
10692− ?: (lth id 26) [(add 65 id) ~]
10693− "T{<id>}"
10694−::
10695++ show-itype-item
9066++ show-itype-item
10696 |= [t=itype sub=isub]
9067 |= [t=itype sub=isub]
10697 ^- tape
9068 ^- tape
@@ -10723,20 +9094,17 @@
10723 %nvar &
9094 %nvar &
10724 %rnvar &
9095 %rnvar &
10725 %var |
9096 %var |
10726− %fvar |
10727 %avar |
9097 %avar |
10728 %rvar |
9098 %rvar |
10729 %atom |
9099 %atom |
10730 %any-atom |
9100 %any-atom |
10731 %flag |
9101 %flag |
10732 %noun |
9102 %noun |
10733− %empty |
10734 %tag |
9103 %tag |
10735 %const |
9104 %const |
10736 %union |((lien cases.typ |=(c=itype (itype-has-nvar c))) (lien args.typ |=(c=itype (itype-has-nvar c))))
9105 %union |((lien cases.typ |=(c=itype (itype-has-nvar c))) (lien args.typ |=(c=itype (itype-has-nvar c))))
10737 %recursive |
9106 %recursive |
10738 %jrec |
9107 %jrec |
10739− %grec (lien args.typ |=(c=itype (itype-has-nvar c)))
10740 %collection (lien args.typ |=(c=itype (itype-has-nvar c)))
9108 %collection (lien args.typ |=(c=itype (itype-has-nvar c)))
10741 %face $(typ body.typ)
9109 %face $(typ body.typ)
10742 %fn |($(typ sample.typ) $(typ product.typ))
9110 %fn |($(typ sample.typ) $(typ product.typ))
@@ -10747,10 +9115,11 @@
10747 |= [label=tape typ=itype sub=isub]
9115 |= [label=tape typ=itype sub=isub]
10748 ^- tape
9116 ^- tape
10749 =/ normalized=itype (itype-normalize typ sub)
9117 =/ normalized=itype (itype-normalize typ sub)
10750− ?: |(?=(%var -.normalized) ?=(%fvar -.normalized) ?=(%avar -.normalized) ?=(%rvar -.normalized) (itype-has-nvar normalized) (itype-has-tag normalized) (itype-has-union normalized)) label
9118+ ?: |(?=(%var -.normalized) ?=(%avar -.normalized) ?=(%rvar -.normalized) (itype-has-nvar normalized) (itype-has-tag normalized) (itype-has-union normalized)) label
10751 ?: (itype-has-hidden-recursive normalized) label
9119 ?: (itype-has-hidden-recursive normalized) label
10752 =/ vars=(list @ud) (unique-type-vars (itype-vars normalized))
9120 =/ vars=(list @ud) (unique-type-vars (itype-vars normalized))
10753− =/ printable=itype (canonical-itype (cap-names normalized vars ~ sub))
9121+ ?: (gth (lent vars) 26) label
9122+ =/ printable=itype (canonical-itype normalized vars)
10754 "{label} has type {(show-itype printable ~)}{(show-atom-constraint printable)}"
9123 "{label} has type {(show-itype printable ~)}{(show-atom-constraint printable)}"
10755::
9124::
10756:: A capital in a written mold is generalized with its enclosing ++.
9125:: A capital in a written mold is generalized with its enclosing ++.
@@ -10767,7 +9136,6 @@
10767 =/ ident=(unit @ud)
9136 =/ ident=(unit @ud)
10768 ?+ -.resolved ~
9137 ?+ -.resolved ~
10769 %var `id.resolved
9138 %var `id.resolved
10770− %fvar `id.resolved
10771 %avar `id.resolved
9139 %avar `id.resolved
10772 %rvar `id.resolved
9140 %rvar `id.resolved
10773 ==
9141 ==
@@ -10783,7 +9151,6 @@
10783 =/ ident=(unit @ud)
9151 =/ ident=(unit @ud)
10784 ?+ -.resolved ~
9152 ?+ -.resolved ~
10785 %var `id.resolved
9153 %var `id.resolved
10786− %fvar `id.resolved
10787 %avar `id.resolved
9154 %avar `id.resolved
10788 %rvar `id.resolved
9155 %rvar `id.resolved
10789 ==
9156 ==
@@ -10791,116 +9158,6 @@
10791 ?: =(n u.ident) `i.caps
9158 ?: =(n u.ident) `i.caps
10792 $(caps t.caps)
9159 $(caps t.caps)
10793::
9160::
10794−:: +cap-names: give each variable in vars the name it was written with
10795−::
10796−:: Unification joins variables, and the one an ID resolves to may not
10797−:: carry the name its definition wrote, as when a capital meets a
10798−:: called gate's variable or an atom variable. Each variable in vars
10799−:: takes the name of the first capital in caps that resolves to it;
10800−:: failing that, of the earliest made of the named variables that
10801−:: resolve to it, itself included (+joined-names). Only the name part
10802−:: of an ID changes, not its count, so IDs stay distinct.
10803−::
10804−++ cap-names
10805− |= [typ=itype vars=(list @ud) caps=icaps sub=isub]
10806− ^- [typ=itype vars=(list @ud)]
10807− =/ written=icaps (flop caps)
10808− =/ joined=(map @ud @ud) (joined-names sub)
10809− =/ ren=(map @ud @ud) ~
10810− =/ out=(list @ud) ~
10811− |-
10812− ?~ vars [?~(ren typ (itype-reid typ ren)) (flop out)]
10813− =/ cap=(unit icap) (cap-with-id i.vars written sub)
10814− =/ first=(unit @ud) (~(get by joined) i.vars)
10815− =/ name=@t
10816− ?^ cap name.u.cap
10817− ?~ first (var-name i.vars)
10818− ?: =(0 (var-name i.vars)) (var-name u.first)
10819− ?: (lth (var-count u.first) (var-count i.vars)) (var-name u.first)
10820− (var-name i.vars)
10821− =/ to=@ud (named-var name i.vars)
10822− ?: =(to i.vars) $(vars t.vars, out [i.vars out])
10823− $(vars t.vars, out [to out], ren (~(put by ren) i.vars to))
10824−::
10825−:: +joined-names: for each variable that named ones resolve to, the
10826−:: earliest made of those, by count
10827−::
10828−:: One pass over sub keeps each ID's newest binding, as +itype-lookup
10829−:: would find it: the variable it is bound to, or ~ for another type.
10830−:: Each named ID then follows those bindings to the variable it
10831−:: resolves to, if any.
10832−::
10833−++ joined-names
10834− |= sub=isub
10835− ^- (map @ud @ud)
10836− =/ edges=(map @ud (unit @ud))
10837− %+ roll (flop sub)
10838− |= [b=ibinding m=(map @ud (unit @ud))]
10839− (~(put by m) id.b (var-of val.b))
10840− =/ named=(list @ud)
10841− (murn ~(tap by edges) |=([k=@ud *] ?:(=(0 (var-name k)) ~ `k)))
10842− =/ fuel=@ud ~(wyt by edges)
10843− =/ out=(map @ud @ud) ~
10844− |-
10845− ?~ named out
10846− =/ root=(unit @ud) (follow-var i.named edges fuel)
10847− ?~ root $(named t.named)
10848− ?: =(u.root i.named) $(named t.named)
10849− =/ best=(unit @ud) (~(get by out) u.root)
10850− ?: &(?=(^ best) (lth (var-count u.best) (var-count i.named)))
10851− $(named t.named)
10852− $(named t.named, out (~(put by out) u.root i.named))
10853−::
10854−:: +follow-var: the variable that id resolves to through edges, or ~ if
10855−:: it resolves to another type; fuel bounds the steps
10856−::
10857−++ follow-var
10858− |= [id=@ud edges=(map @ud (unit @ud)) fuel=@ud]
10859− ^- (unit @ud)
10860− |-
10861− ?: =(0 fuel) ~
10862− =/ edge=(unit (unit @ud)) (~(get by edges) id)
10863− ?~ edge `id
10864− ?~ u.edge ~
10865− ?: =(u.u.edge id) `id
10866− $(id u.u.edge, fuel (dec fuel))
10867−::
10868−:: +var-of: the ID of a type variable node, or ~ for another type
10869−::
10870−++ var-of
10871− |= t=itype
10872− ^- (unit @ud)
10873− ?+ -.t ~
10874− %var `id.t
10875− %fvar `id.t
10876− %avar `id.t
10877− %rvar `id.t
10878− %nvar `id.t
10879− %rnvar `id.t
10880− ==
10881−::
10882−:: +itype-reid: t with the variable IDs in ids replaced, each node
10883−:: keeping its kind
10884−::
10885−++ itype-reid
10886− |= [t=itype ids=(map @ud @ud)]
10887− ^- itype
10888− ?- -.t
10889− %var t(id (fall (~(get by ids) id.t) id.t))
10890− %fvar t(id (fall (~(get by ids) id.t) id.t))
10891− %avar t(id (fall (~(get by ids) id.t) id.t))
10892− %rvar t(id (fall (~(get by ids) id.t) id.t))
10893− %nvar t(id (fall (~(get by ids) id.t) id.t))
10894− %rnvar t(id (fall (~(get by ids) id.t) id.t))
10895− ?(%atom %any-atom %flag %noun %empty %tag %const %recursive %jrec) t
10896− %union t(cases (turn cases.t |=(c=itype ^$(t c))), args (turn args.t |=(c=itype ^$(t c))))
10897− %grec t(args (turn args.t |=(c=itype ^$(t c))))
10898− %collection t(args (turn args.t |=(c=itype ^$(t c))))
10899− %face t(body $(t body.t))
10900− %fn t(sample $(t sample.t), product $(t product.t))
10901− %cell t(hed $(t hed.t), tal $(t tal.t))
10902− ==
10903−::
10904++ merged-capitals
9161++ merged-capitals
10905 |= [caps=icaps sub=isub]
9162 |= [caps=icaps sub=isub]
10906 ^- (unit [first=icap second=icap])
9163 ^- (unit [first=icap second=icap])
@@ -10909,7 +9166,6 @@
10909 =/ ident=(unit @ud)
9166 =/ ident=(unit @ud)
10910 ?+ -.resolved ~
9167 ?+ -.resolved ~
10911 %var `id.resolved
9168 %var `id.resolved
10912− %fvar `id.resolved
10913 %avar `id.resolved
9169 %avar `id.resolved
10914 %rvar `id.resolved
9170 %rvar `id.resolved
10915 ==
9171 ==
@@ -10926,7 +9182,6 @@
10926 =/ ident=(unit @ud)
9182 =/ ident=(unit @ud)
10927 ?+ -.resolved ~
9183 ?+ -.resolved ~
10928 %var `id.resolved
9184 %var `id.resolved
10929− %fvar `id.resolved
10930 %avar `id.resolved
9185 %avar `id.resolved
10931 %rvar `id.resolved
9186 %rvar `id.resolved
10932 ==
9187 ==
@@ -10953,7 +9208,6 @@
10953 ^- ?
9208 ^- ?
10954 ?- -.t
9209 ?- -.t
10955 %var |
9210 %var |
10956− %fvar |
10957 %avar =(n id.t)
9211 %avar =(n id.t)
10958 %rvar =(n id.t)
9212 %rvar =(n id.t)
10959 %nvar |
9213 %nvar |
@@ -10962,13 +9216,11 @@
10962 %any-atom |
9216 %any-atom |
10963 %flag |
9217 %flag |
10964 %noun |
9218 %noun |
10965− %empty |
10966 %tag |
9219 %tag |
10967 %const |
9220 %const |
10968 %union |((lien cases.t |=(c=itype (has-atom-var n c))) (lien args.t |=(c=itype (has-atom-var n c))))
9221 %union |((lien cases.t |=(c=itype (has-atom-var n c))) (lien args.t |=(c=itype (has-atom-var n c))))
10969 %recursive |
9222 %recursive |
10970 %jrec |
9223 %jrec |
10971− %grec (lien args.t |=(c=itype (has-atom-var n c)))
10972 %collection (lien args.t |=(c=itype (has-atom-var n c)))
9224 %collection (lien args.t |=(c=itype (has-atom-var n c)))
10973 %face $(t body.t)
9225 %face $(t body.t)
10974 %fn |($(t sample.t) $(t product.t))
9226 %fn |($(t sample.t) $(t product.t))
@@ -11016,17 +9268,12 @@
11016 =/ sep=tape ?:(printed ", " " where ")
9268 =/ sep=tape ?:(printed ", " " where ")
11017 =/ clause=tape "{sep}{(show-itype [%avar i.vars] ~)} is an atom"
9269 =/ clause=tape "{sep}{(show-itype [%avar i.vars] ~)} is an atom"
11018 $(vars t.vars, printed &, out (weld out clause))
9270 $(vars t.vars, printed &, out (weld out clause))
11019− ?: (itype-var-is-gate-free i.vars t)
11020− =/ sep=tape ?:(printed ", " " where ")
11021− =/ clause=tape "{sep}{(show-itype [%fvar i.vars] ~)} contains no gates"
11022− $(vars t.vars, printed &, out (weld out clause))
11023 $(vars t.vars)
9271 $(vars t.vars)
11024::
9272::
11025:: Build the supported part of the value environment in dependency order.
9273:: Build the supported part of the value environment in dependency order.
11026−:: Each pass adds successful definitions, visiting them dependencies first
9274+:: Each pass adds successful definitions. Forward references become
11027−:: (+dependency-order), so a forward reference usually resolves in the
9275+:: available on a later pass; unsupported syntax does not enter the
11028−:: first pass; any that do not are retried on a later pass. Unsupported
9276+:: environment. Generalized definitions are closed, so a use instantiates
11029−:: syntax does not enter the environment. Generalized definitions are closed, so a use instantiates
11030:: its variables afresh.
9277:: its variables afresh.
11031::
9278::
11032++ global-value-names
9279++ global-value-names
@@ -11117,12 +9364,8 @@
11117++ infer-recursive-gate
9364++ infer-recursive-gate
11118 |= [d=def env=ienv state=istate]
9365 |= [d=def env=ienv state=istate]
11119 ^- iresult
9366 ^- iresult
11120− ?^ defer.state [%| ["deferred recursive inference is unsupported" ~]]
11121 =. gate-defs.state ~
9367 =. gate-defs.state ~
11122 ?. ?=(%value -.d) [%| ["recursive definition is not a gate" ~]]
9368 ?. ?=(%value -.d) [%| ["recursive definition is not a gate" ~]]
11123− :: A ++ whose body is (unface |= …) is a gate too, unfaced
11124− =/ peeled=(unit expr) (unfaced-gate val.d env state)
11125− =? val.d ?=(^ peeled) u.peeled
11126 ?. |(?=(%gate -.val.d) ?=(%gate-wide -.val.d))
9369 ?. |(?=(%gate -.val.d) ?=(%gate-wide -.val.d))
11127 [%| ["recursive definition is not a gate" ~]]
9370 [%| ["recursive definition is not a gate" ~]]
11128 =/ result=(unit itype) (recursive-branch-seed d env state)
9371 =/ result=(unit itype) (recursive-branch-seed d env state)
@@ -11146,7 +9389,6 @@
11146 =/ product=itype ?~(result [%var id] u.result)
9389 =/ product=itype ?~(result [%var id] u.result)
11147 =/ st=istate state.p.sam(next +(id))
9390 =/ st=istate state.p.sam(next +(id))
11148 =/ seed=itype [%fn typ.p.sam product]
9391 =/ seed=itype [%fn typ.p.sam product]
11149− =? seed ?=(^ peeled) (itype-unface seed sub.st)
11150 =/ seeded=ienv [[name.d [seed ~]] env.p.sam]
9392 =/ seeded=ienv [[name.d [seed ~]] env.p.sam]
11151 =/ body=expr
9393 =/ body=expr
11152 ?- -.gate
9394 ?- -.gate
@@ -11158,9 +9400,7 @@
11158 ?: ?=(%| -.out) out
9400 ?: ?=(%| -.out) out
11159 =/ uni=(unit isub) (itype-unify product typ.p.out sub.state.p.out)
9401 =/ uni=(unit isub) (itype-unify product typ.p.out sub.state.p.out)
11160 ?~ uni [%| ["recursive gate constraint is not supported by partial inference" ~]]
9402 ?~ uni [%| ["recursive gate constraint is not supported by partial inference" ~]]
11161− =/ typ=itype [%fn typ.p.sam typ.p.out]
9403+ [%& [%fn typ.p.sam typ.p.out] state.p.out(sub u.uni)]
11162− =? typ ?=(^ peeled) (itype-unface typ u.uni)
11163− [%& typ state.p.out(sub u.uni)]
11164::
9404::
11165++ dependency-root
9405++ dependency-root
11166 |= names=(list term)
9406 |= names=(list term)
@@ -11268,7 +9508,7 @@
11268:: Infer a cyclic component with one monomorphic seed per gate. All members
9508:: Infer a cyclic component with one monomorphic seed per gate. All members
11269:: must succeed before any scheme is available; pending constraints and
9509:: must succeed before any scheme is available; pending constraints and
11270:: unresolved branch joins remain partial.
9510:: unresolved branch joins remain partial.
11271−+$ igate-entry [name=term typ=itype body=expr env=ienv caps=icaps unfaced=?]
9511++$ igate-entry [name=term typ=itype body=expr env=ienv caps=icaps]
11272+$ igate-seeds (each [entries=(list igate-entry) state=istate] idiag)
9512+$ igate-seeds (each [entries=(list igate-entry) state=istate] idiag)
11273++ seed-gate-group
9513++ seed-gate-group
11274 |= [ds=(list def) env=ienv state=istate]
9514 |= [ds=(list def) env=ienv state=istate]
@@ -11276,9 +9516,7 @@
11276 ?~ ds [%& [~ state]]
9516 ?~ ds [%& [~ state]]
11277 =/ d=def i.ds
9517 =/ d=def i.ds
11278 ?. ?=(%value -.d) [%| ["recursive group contains a non-gate" ~]]
9518 ?. ?=(%value -.d) [%| ["recursive group contains a non-gate" ~]]
11279− :: A ++ whose body is (unface |= …) is a gate too, unfaced
9519+ =/ gate=expr val.d
11280− =/ peeled=(unit expr) (unfaced-gate val.d env state)
11281− =/ gate=expr ?~(peeled val.d u.peeled)
11282 ?. |(?=(%gate -.gate) ?=(%gate-wide -.gate))
9520 ?. |(?=(%gate -.gate) ?=(%gate-wide -.gate))
11283 [%| ["recursive group contains a non-gate" ~]]
9521 [%| ["recursive group contains a non-gate" ~]]
11284 =/ initial=istate (reserve-def-caps gate state)
9522 =/ initial=istate (reserve-def-caps gate state)
@@ -11296,8 +9534,7 @@
11296 * !!
9534 * !!
11297 ==
9535 ==
11298 =/ seed=itype [%fn typ.p.sam [%var next.state.p.sam]]
9536 =/ seed=itype [%fn typ.p.sam [%var next.state.p.sam]]
11299− =? seed ?=(^ peeled) (itype-unface seed sub.state.p.sam)
9537+ =/ entry=igate-entry [name.d seed body env.p.sam caps.state.p.sam]
11300− =/ entry=igate-entry [name.d seed body env.p.sam caps.state.p.sam ?=(^ peeled)]
11301 =/ after=istate state.p.sam(next +(next.state.p.sam), caps caps.state)
9538 =/ after=istate state.p.sam(next +(next.state.p.sam), caps caps.state)
11302 =/ rest=igate-seeds $(ds t.ds, state after)
9539 =/ rest=igate-seeds $(ds t.ds, state after)
11303 ?: ?=(%| -.rest) rest
9540 ?: ?=(%| -.rest) rest
@@ -11337,21 +9574,20 @@
11337 ?: (constrained-capitals caps.entry sub.state)
9574 ?: (constrained-capitals caps.entry sub.state)
11338 [%| ["explicit capital constraints are not supported by partial inference" ~]]
9575 [%| ["explicit capital constraints are not supported by partial inference" ~]]
11339 =/ typ=itype (itype-normalize typ.entry sub.state)
9576 =/ typ=itype (itype-normalize typ.entry sub.state)
11340− =? typ unfaced.entry (itype-unface typ ~)
11341 ?: (itype-has-nvar typ) [%| ["recursive group needs unsupported inference" ~]]
9577 ?: (itype-has-nvar typ) [%| ["recursive group needs unsupported inference" ~]]
11342 ?: |((itype-has-tag typ) (itype-has-hidden-generic typ) (itype-has-hidden-recursive typ) (unsupported-atom-vars typ caps.entry binders.state sub.state))
9578 ?: |((itype-has-tag typ) (itype-has-hidden-generic typ) (itype-has-hidden-recursive typ) (unsupported-atom-vars typ caps.entry binders.state sub.state))
11343 [%| ["recursive group needs unsupported inference" ~]]
9579 [%| ["recursive group needs unsupported inference" ~]]
11344 =/ free=(list @ud) (weld (free-env-vars env sub.state) (free-cap-vars caps.outer sub.state))
9580 =/ free=(list @ud) (weld (free-env-vars env sub.state) (free-cap-vars caps.outer sub.state))
11345 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
9581 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
11346 =. vars (skim vars |=(n=@ud !(lien free |=(f=@ud =(f n)))))
9582 =. vars (skim vars |=(n=@ud !(lien free |=(f=@ud =(f n)))))
9583+ ?: (gth (lent vars) 26) [%| ["recursive group needs too many type variables" ~]]
11347 =/ rest=(each ienv idiag) $(entries t.entries)
9584 =/ rest=(each ienv idiag) $(entries t.entries)
11348 ?: ?=(%| -.rest) rest
9585 ?: ?=(%| -.rest) rest
11349− [%& [[name.entry (cap-names typ vars caps.entry sub.state)] p.rest]]
9586+ [%& [[name.entry [typ vars]] p.rest]]
11350::
9587::
11351++ infer-gate-group
9588++ infer-gate-group
11352 |= [ds=(list def) env=ienv state=istate]
9589 |= [ds=(list def) env=ienv state=istate]
11353 ^- ilocal-result
9590 ^- ilocal-result
11354− ?^ defer.state [%| ["deferred recursive inference is unsupported" ~]]
11355 =/ names=(list term) (global-value-names ds)
9591 =/ names=(list term) (global-value-names ds)
11356 ?. (levy names |=(n=term (unique-value-name n names)))
9592 ?. (levy names |=(n=term (unique-value-name n names)))
11357 [%| ["recursive group contains duplicate names" ~]]
9593 [%| ["recursive group contains duplicate names" ~]]
@@ -11390,8 +9626,40 @@
11390 =. entry entry(source src, target dst)
9626 =. entry entry(source src, target dst)
11391 `[entry u.rest]
9627 `[entry u.rest]
11392::
9628::
11393−
9629+++ add-supported-defs
11394−+$ iresolved [env=ienv grouped=(list term) artifacts=(list iwidth-definition) failures=(list [name=term diag=idiag])]
9630+ |= [ds=(list def) all-defs=(list def) checked=(map term def) heads=(unit igate-prelude-evidence) env=ienv molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) at=path prelude=(unit ifile) artifacts=(list iwidth-definition)]
9631+ ^- [env=ienv artifacts=(list iwidth-definition)]
9632+ ?~ ds [env artifacts]
9633+ =/ d=def i.ds
9634+ ?: ?=(%mold -.d) $(ds t.ds)
9635+ ?. (unique-value-name name.d globals) $(ds t.ds)
9636+ ?^ (ienv-lookup name.d env) $(ds t.ds)
9637+ =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
9638+ =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude ~ 256 ~ ~ ~]
9639+ =. gate-defs.initial checked
9640+ =. head-evidence.initial heads
9641+ =. initial (reserve-def-caps val.d initial)
9642+ =/ result=iresult (infer-fragment val.d env initial)
9643+ =? result ?=(%| -.result) (infer-recursive-gate d env initial)
9644+ ?: ?=(%| -.result) $(ds t.ds)
9645+ =. state.p.result (promote-restricted-numbers state.p.result env)
9646+ =. state.p.result (default-hole-numbers holes.state.p.result holes.initial state.p.result env !(itype-has-gate (itype-normalize typ.p.result sub.state.p.result)))
9647+ ?^ (unresolved-hole holes.state.p.result holes.initial state.p.result) $(ds t.ds)
9648+ ?: (constrained-capitals caps.state.p.result sub.state.p.result) $(ds t.ds)
9649+ =/ typ=itype (default-decimals (itype-normalize typ.p.result sub.state.p.result))
9650+ ?: |((pending-tags tags.state.p.result sub.state.p.result) (itype-has-tag typ)) $(ds t.ds)
9651+ ?: (unsupported-atom-vars typ caps.state.p.result binders.state.p.result sub.state.p.result) $(ds t.ds)
9652+ =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
9653+ ?: (gth (lent vars) 26) $(ds t.ds)
9654+ =/ finalized=(unit (list iwprojection))
9655+ (width-finalize projections.state.p.result sub.state.p.result vars)
9656+ ?~ finalized $(ds t.ds)
9657+ =? artifacts ?=(^ u.finalized)
9658+ [[name.d val.d typ sub.state.p.result (flop u.finalized)] artifacts]
9659+ =? checked |(?=(%gate -.val.d) ?=(%gate-wide -.val.d)) (~(put by checked) name.d d)
9660+ $(ds t.ds, env [[name.d [typ vars]] env], checked checked)
9661+::
9662++$ iresolved [env=ienv grouped=(list term) artifacts=(list iwidth-definition)]
11395+$ iadj (map term (list term))
9663+$ iadj (map term (list term))
11396+$ ivisited (map term ?)
9664+$ ivisited (map term ?)
11397+$ iwork (list [name=term done=?])
9665+$ iwork (list [name=term done=?])
@@ -11487,7 +9755,7 @@
11487++ add-groups
9755++ add-groups
11488 |= [ds=(list def) components=icomponents graph=iadj env=ienv grouped=(list term) artifacts=(list iwidth-definition) state=istate]
9756 |= [ds=(list def) components=icomponents graph=iadj env=ienv grouped=(list term) artifacts=(list iwidth-definition) state=istate]
11489 ^- iresolved
9757 ^- iresolved
11490− ?~ components [env grouped artifacts ~]
9758+ ?~ components [env grouped artifacts]
11491 =/ component=(list term) i.components
9759 =/ component=(list term) i.components
11492 ?. (graph-cycle component graph) $(components t.components)
9760 ?. (graph-cycle component graph) $(components t.components)
11493 ?: (lien component |=(n=term ?=(^ (ienv-lookup n env)))) $(components t.components)
9761 ?: (lien component |=(n=term ?=(^ (ienv-lookup n env)))) $(components t.components)
@@ -11504,79 +9772,6 @@
11504++ resolve-groups
9772++ resolve-groups
11505 |= [ds=(list def) molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) at=path prelude=(unit ifile)]
9773 |= [ds=(list def) molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) at=path prelude=(unit ifile)]
11506 ^- iresolved
9774 ^- iresolved
11507− (resolve-groups-core ds molds globals externals surs mark-externals marks jimports reserved-molds at prelude ~)
11508−::
11509−
11510−+$ iadded-definition
11511− [env=ienv checked=(map term def) artifacts=(list iwidth-definition)]
11512−++ add-supported-result
11513− |= [d=def result=iresult initial=istate env=ienv checked=(map term def) artifacts=(list iwidth-definition)]
11514− ^- (unit iadded-definition)
11515− ?> ?=(%value -.d)
11516− ?: ?=(%| -.result) ~
11517− =. state.p.result (promote-restricted-numbers state.p.result env)
11518− =. state.p.result (default-hole-numbers holes.state.p.result holes.initial state.p.result env !(itype-has-gate (itype-normalize typ.p.result sub.state.p.result)))
11519− ?^ (unresolved-hole holes.state.p.result holes.initial state.p.result) ~
11520− ?: (constrained-capitals caps.state.p.result sub.state.p.result) ~
11521− =/ typ=itype (default-decimals (itype-normalize typ.p.result sub.state.p.result))
11522− ?: |((pending-tags tags.state.p.result sub.state.p.result) (itype-has-tag typ)) ~
11523− ?: (unsupported-atom-vars typ caps.state.p.result binders.state.p.result sub.state.p.result) ~
11524− =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
11525− =/ finalized=(unit (list iwprojection))
11526− (width-finalize projections.state.p.result sub.state.p.result vars)
11527− ?~ finalized ~
11528− =? artifacts ?=(^ u.finalized)
11529− [[name.d val.d typ sub.state.p.result (flop u.finalized)] artifacts]
11530− =? checked |(?=(%gate -.val.d) ?=(%gate-wide -.val.d)) (~(put by checked) name.d d)
11531− `[[[name.d (cap-names typ vars caps.state.p.result sub.state.p.result)] env] checked artifacts]
11532−++ add-supported-defs-core
11533− |= [ds=(list def) checked=(map term def) heads=(unit igate-prelude-evidence) env=ienv molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) at=path prelude=(unit ifile) artifacts=(list iwidth-definition) index=(unit [at=path source=@t prelude=ifile shapes=(map term shape)])]
11534− ^- [env=ienv artifacts=(list iwidth-definition) failures=(list [name=term diag=idiag])]
11535− =/ failures=(list [name=term diag=idiag]) ~
11536− |-
11537− ?~ ds [env artifacts (flop failures)]
11538− =/ d=def i.ds
11539− ?: ?=(%mold -.d) $(ds t.ds)
11540− ?. (unique-value-name name.d globals) $(ds t.ds)
11541− ?^ (ienv-lookup name.d env) $(ds t.ds)
11542− =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
11543− =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude ~ 256 ~ ~ ~ ~ ~ ~]
11544− =. grec-index.initial index
11545− =. gate-defs.initial checked
11546− =. head-evidence.initial heads
11547− =. initial (reserve-def-caps val.d initial)
11548− =/ plain=iresult (infer-fragment val.d env initial)
11549− =/ result=iresult plain
11550− =? result ?=(%| -.result) (infer-recursive-gate d env initial)
11551− ?: ?=(%| -.result)
11552− =/ failure=idiag
11553− ?: (definite-diag p.result) p.result
11554− ?: ?=(%| -.plain) p.plain
11555− p.result
11556− =? failures (definite-diag failure) [[name.d failure] failures]
11557− $(ds t.ds)
11558− =/ added=(unit iadded-definition)
11559− (add-supported-result d result initial env checked artifacts)
11560− ?~ added $(ds t.ds)
11561− $(ds t.ds, env env.u.added, checked checked.u.added, artifacts artifacts.u.added)
11562−::
11563−:: Retry one unresolved definition to explain a pending tag. The gate
11564−:: evidence is built from the whole module, not only this definition.
11565−++ module-pending-tag-one
11566− |= [d=def env=ienv base=istate checked=(map term def) heads=(unit igate-prelude-evidence)]
11567− ^- (unit [at=span msg=tape])
11568− ?. ?=(%value -.d) ~
11569− ?^ (ienv-lookup name.d env) ~
11570− =/ initial=istate base(gate-defs checked, head-evidence heads)
11571− =. initial (reserve-def-caps val.d initial)
11572− =/ result=iresult (infer-fragment val.d env initial)
11573− =? result ?=(%| -.result) (infer-recursive-gate d env initial)
11574− ?: ?=(%| -.result) ~
11575− (pending-tag-diagnostic tags.state.p.result sub.state.p.result)
11576−::
11577−++ resolve-groups-core
11578− |= [ds=(list def) molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) at=path prelude=(unit ifile) index=(unit [at=path source=@t prelude=ifile shapes=(map term shape)])]
11579− ^- iresolved
11580 =/ env=ienv ~
9775 =/ env=ienv ~
11581 =/ grouped=(list term) ~
9776 =/ grouped=(list term) ~
11582 =/ artifacts=(list iwidth-definition) ~
9777 =/ artifacts=(list iwidth-definition) ~
@@ -11586,38 +9781,14 @@
11586 =/ components=icomponents (graph-components ds names)
9781 =/ components=icomponents (graph-components ds names)
11587 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
9782 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
11588 =/ heads=(unit igate-prelude-evidence) (direct-prelude-evidence ds prelude)
9783 =/ heads=(unit igate-prelude-evidence) (direct-prelude-evidence ds prelude)
11589− =/ ordered=(list def) (dependency-order ds components)
11590 |-
9784 |-
11591− =/ next=[env=ienv artifacts=(list iwidth-definition) failures=(list [name=term diag=idiag])]
9785+ =/ next=[env=ienv artifacts=(list iwidth-definition)]
11592− (add-supported-defs-core ordered (direct-checked-gates ds env) heads env molds globals externals surs mark-externals marks jimports reserved-molds at prelude artifacts index)
9786+ (add-supported-defs ds ds (direct-checked-gates ds env) heads env molds globals externals surs mark-externals marks jimports reserved-molds at prelude artifacts)
11593− =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude ~ 256 ~ ~ ~ ~ ~ ~]
9787+ =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude ~ 256 ~ ~ ~]
11594− =. grec-index.initial index
11595 =/ out=iresolved (add-groups ds components graph env.next grouped artifacts.next initial)
9788 =/ out=iresolved (add-groups ds components graph env.next grouped artifacts.next initial)
11596− ?: =(env env.out) out(failures failures.next)
9789+ ?: =(env env.out) out
11597 $(env env.out, grouped grouped.out, artifacts artifacts.out)
9790 $(env env.out, grouped grouped.out, artifacts artifacts.out)
11598::
9791::
11599−:: +dependency-order: the value definitions, dependencies first
11600−::
11601−:: +graph-components lists the components dependencies first, so one
11602−:: pass of +add-supported-defs-core in this order resolves a forward
11603−:: chain that would otherwise take a pass per link; the fixpoint above
11604−:: stays as the fallback (review question 12). Members of a component
11605−:: keep their source order. Definitions in no component (molds, and
11606−:: every value when duplicate names leave no components) follow in
11607−:: source order.
11608−::
11609−++ dependency-order
11610− |= [ds=(list def) components=icomponents]
11611− ^- (list def)
11612− =/ ranked=(list def)
11613− %- zing
11614− %+ turn components
11615− |= component=(list term)
11616− (skim ds |=(d=def &(?=(%value -.d) (lien component |=(n=term =(n name.d))))))
11617− =/ members=(list term) (zing components)
11618− =/ named=ivisited (graph-nameset members ~)
11619− (weld ranked (skip ds |=(d=def &(?=(%value -.d) (~(has by named) name.d)))))
11620−::
11621++ resolve-supported-defs
9792++ resolve-supported-defs
11622 |= [ds=(list def) molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) at=path prelude=(unit ifile)]
9793 |= [ds=(list def) molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) at=path prelude=(unit ifile)]
11623 ^- ienv
9794 ^- ienv
@@ -11862,311 +10033,44 @@
11862 %overlap
10033 %overlap
11863 %unknown
10034 %unknown
11864::
10035::
11865−:: A source-only fallback for literal-tagged cells and one-hop local
10036+++ union-pairs
11866−:: generic applications. It screens all work before ordinary inference.
10037+ |= [cases=(list shape) molds=imolds]
11867−++ union-simple-shape-budget
10038+ ^- (list upair)
11868− |= [s=shape fuel=@ud vars=(unit (list @t))]
10039+ ?~ cases ~
11869− ^- (unit @ud)
10040+ =/ first=shape i.cases
11870− ?: =(0 fuel) ~
10041+ =/ a=upat (project-union-mold first molds ~)
11871− =. fuel (dec fuel)
10042+ =/ pairs=(list upair)
11872− ?- -.s
10043+ %+ turn t.cases
11873− ?(%aura %noun %void %flag) `fuel
10044+ |= second=shape
11874− %tvar
10045+ ^- upair
11875− ?~ vars `fuel
10046+ [at.first at.second (union-relate a (project-union-mold second molds ~))]
11876− ?:((lien u.vars |=(n=@t =(n name.s))) `fuel ~)
10047+ (weld pairs $(cases t.cases))
11877− %const
10048+::
11878− ?. |(=(%term form.lit.s) =(%null form.lit.s) =(%loobean form.lit.s)) ~
10049+:: A closed structural mold supplies no equation to determine a hole.
11879− ?: &(=(%loobean form.lit.s) !|(=(0 val.lit.s) =(1 val.lit.s))) ~
10050+:: Applications, references, unbound capitals and unions are unproved.
11880− `fuel
10051+++ simple-mold-hole
11881− %cell (union-simple-fields-budget fields.s fuel vars)
10052+ |= sh=shape
10053+ ^- (unit (unit span))
10054+ ?: ?=(%generic -.sh)
10055+ ?~ vars.sh ~
10056+ ?. (distinct-params vars.sh) ~
10057+ (simple-mold-hole-in body.sh vars.sh)
10058+ (simple-mold-hole-in sh ~)
10059+++ simple-mold-hole-in
10060+ |= [sh=shape vars=(list @t)]
10061+ ^- (unit (unit span))
10062+ ?- -.sh
10063+ %hole ``at.sh
10064+ ?(%aura %noun %void %flag %const) `~
10065+ %tvar ?:((lien vars |=(v=@t =(v name.sh))) `~ ~)
10066+ %cell (simple-mold-field-holes fields.sh vars)
11882 %fn
10067 %fn
11883− =/ left=(unit @ud) $(s sample.s, fuel fuel)
10068+ =/ a=(unit (unit span)) $(sh sample.sh)
11884− ?~ left ~
10069+ ?~ a ~
11885− $(s product.s, fuel u.left)
10070+ =/ b=(unit (unit span)) $(sh product.sh)
11886− * ~
10071+ ?~ b ~
11887− ==
10072+ `?~(u.a u.b u.a)
11888−++ union-simple-fields-budget
10073+ %generic ~
11889− |= [fields=(list field) fuel=@ud vars=(unit (list @t))]
11890− ^- (unit @ud)
11891− ?~ fields `fuel
11892− ?: =(0 fuel) ~
11893− =/ field-shape=shape
11894− ?- -.i.fields
11895− %bare shape.i.fields
11896− %face shape.i.fields
11897− %pun [%ref at.i.fields ~[name.i.fields]]
11898− ==
11899− =/ head=(unit @ud) (union-simple-shape-budget field-shape (dec fuel) vars)
11900− ?~ head ~
11901− $(fields t.fields, fuel u.head)
11902−++ union-source-find
11903− |= [n=term molds=imolds fuel=@ud]
11904− ^- (unit [body=shape left=@ud])
11905− =/ found=(unit shape) ~
11906− |-
11907− ?~ molds
11908− ?~ found ~
11909− `[u.found fuel]
11910− ?: =(0 fuel) ~
11911− ?: =(n name.i.molds)
11912− ?^ found ~
11913− $(molds t.molds, fuel (dec fuel), found `body.i.molds)
11914− $(molds t.molds, fuel (dec fuel))
11915−++ union-source-args-budget
11916− |= [vars=(list @t) args=(list shape) fuel=@ud]
11917− ^- (unit @ud)
11918− =/ seen=(set @t) *(set @t)
11919− |-
11920− ?~ vars ?~(args `fuel ~)
11921− ?~ args ~
11922− ?: =(0 fuel) ~
11923− ?: (~(has in:..zuse seen) i.vars) ~
11924− =/ arg=(unit @ud) (union-simple-shape-budget i.args (dec fuel) ~)
11925− ?~ arg ~
11926− $(vars t.vars, args t.args, fuel u.arg, seen (~(put in:..zuse seen) i.vars))
11927−++ union-source-cell-tag
11928− |= s=shape
11929− ^- (unit @)
11930− ?. ?=(%cell -.s) ~
11931− ?~ fields.s ~
11932− ?~ t.fields.s ~
11933− ?. ?=(%bare -.i.fields.s) ~
11934− =/ head=shape shape.i.fields.s
11935− ?. ?=(%const -.head) ~
11936− ?. |(=(%term form.lit.head) =(%null form.lit.head) =(%loobean form.lit.head)) ~
11937− ?: &(=(%loobean form.lit.head) !|(=(0 val.lit.head) =(1 val.lit.head))) ~
11938− `val.lit.head
11939−++ union-source-case-tag
11940− |= [s=shape molds=imolds fuel=@ud]
11941− ^- (unit [tag=@ left=@ud])
11942− ?: ?=(%cell -.s)
11943− =/ tag=(unit @) (union-source-cell-tag s)
11944− ?~ tag ~
11945− =/ left=(unit @ud) (union-simple-shape-budget s fuel ~)
11946− ?~ left ~
11947− `[u.tag u.left]
11948− ?. ?=(%apply -.s) ~
11949− ?. ?=([@ ~] ref.s) ~
11950− ?: =(0 fuel) ~
11951− =/ found=(unit [body=shape left=@ud]) (union-source-find i.ref.s molds (dec fuel))
11952− ?~ found ~
11953− ?. ?=(%generic -.body.u.found) ~
11954− ?~ vars.body.u.found ~
11955− =/ tag=(unit @) (union-source-cell-tag body.body.u.found)
11956− ?~ tag ~
11957− =/ args=(unit @ud) (union-source-args-budget vars.body.u.found args.s left.u.found)
11958− ?~ args ~
11959− =/ left=(unit @ud) (union-simple-shape-budget body.body.u.found u.args `vars.body.u.found)
11960− ?~ left ~
11961− `[u.tag u.left]
11962−++ union-source-distinct-tags
11963− |= [cases=(list shape) molds=imolds fuel=@ud]
11964− ^- ?
11965− =/ seen=(set @) *(set @)
11966− =/ has-application=? |
11967− |-
11968− ?~ cases has-application
11969− ?: =(0 fuel) |
11970− =/ item=(unit [tag=@ left=@ud]) (union-source-case-tag i.cases molds (dec fuel))
11971− ?~ item |
11972− ?: (~(has in:..zuse seen) tag.u.item) |
11973− $(cases t.cases, fuel left.u.item, seen (~(put in:..zuse seen) tag.u.item), has-application |(has-application ?=(%apply -.i.cases)))
11974−::
11975−:: This inference-only screen bounds inherited work that the small source
11976−:: slice may consult. It does not authenticate a caller-created state.
11977−++ union-state-leaf
11978− |= t=itype
11979− ^- ?
11980− ?=(?(%var %fvar %avar %rvar %nvar %rnvar %atom %any-atom %flag %noun %empty %const) -.t)
11981−++ union-state-params-budget
11982− |= [params=iparams fuel=@ud]
11983− ^- (unit @ud)
11984− ?~ params `fuel
11985− ?: =(0 fuel) ~
11986− ?. (union-state-leaf typ.i.params) ~
11987− $(params t.params, fuel (dec fuel))
11988−++ union-state-sub-budget
11989− |= [sub=isub fuel=@ud]
11990− ^- (unit @ud)
11991− ?~ sub `fuel
11992− ?: =(0 fuel) ~
11993− ?. (union-state-leaf val.i.sub) ~
11994− $(sub t.sub, fuel (dec fuel))
11995−++ union-state-caps-budget
11996− |= [caps=icaps fuel=@ud]
11997− ^- (unit @ud)
11998− ?~ caps `fuel
11999− ?: =(0 fuel) ~
12000− $(caps t.caps, fuel (dec fuel))
12001−++ union-state-active-budget
12002− |= [active=(list term) fuel=@ud]
12003− ^- (unit @ud)
12004− ?~ active `fuel
12005− ?: =(0 fuel) ~
12006− $(active t.active, fuel (dec fuel))
12007−++ union-state-tags-budget
12008− |= [tags=(list ipending) fuel=@ud]
12009− ^- (unit @ud)
12010− ?~ tags `fuel
12011− ?: =(0 fuel) ~
12012− $(tags t.tags, fuel (dec fuel))
12013−++ union-source-state-safe
12014− |= [state=istate fuel=@ud]
12015− ^- ?
12016− ?^ grec-index.state |
12017− ?^ holes.state |
12018− ?^ defer.state |
12019− ?^ obligations.state |
12020− =/ params=(unit @ud) (union-state-params-budget params.state fuel)
12021− ?~ params |
12022− =/ sub=(unit @ud) (union-state-sub-budget sub.state u.params)
12023− ?~ sub |
12024− =/ caps=(unit @ud) (union-state-caps-budget caps.state u.sub)
12025− ?~ caps |
12026− =/ active=(unit @ud) (union-state-active-budget active.state u.caps)
12027− ?~ active |
12028− ?=(^ (union-state-tags-budget tags.state u.active))
12029−::
12030−:: Positive overlap witnesses from parsed, one-hop local source only.
12031−:: Unknown or exhausted work returns no witness, never disjointness.
12032−+$ uow-case [at=span head=@ payload=upat]
12033−++ union-overlap-primitive
12034− |= s=shape
12035− ^- (unit upat)
12036− ?- -.s
12037− %aura `[%atom ~]
12038− %noun `[%all ~]
12039− %void `[%empty ~]
12040− %flag `[%flag ~]
12041− %const
12042− ?. |(=(%term form.lit.s) =(%null form.lit.s) =(%loobean form.lit.s)) ~
12043− ?: &(=(%loobean form.lit.s) !|(=(0 val.lit.s) =(1 val.lit.s))) ~
12044− `[%atom `val.lit.s]
12045− * ~
12046− ==
12047−++ union-overlap-case
12048− |= [s=shape molds=imolds fuel=@ud]
12049− ^- (unit [item=uow-case left=@ud])
12050− ?: =(0 fuel) ~
12051− =. fuel (dec fuel)
12052− :: Each body has exactly two fields; an application has exactly one
12053− :: parameter and one concrete primitive argument. The full mold table
12054− :: is scanned to establish unique ownership.
12055− =/ expanded=(unit [body=shape param=(unit [name=@t pat=upat]) left=@ud])
12056− ?: ?=(%cell -.s) `[s ~ fuel]
12057− ?. ?=(%apply -.s) ~
12058− ?. ?=([@ ~] ref.s) ~
12059− ?. ?=([* ~] args.s) ~
12060− ?: =(0 fuel) ~
12061− =/ found=(unit [body=shape left=@ud]) (union-source-find i.ref.s molds (dec fuel))
12062− ?~ found ~
12063− ?. ?=(%generic -.body.u.found) ~
12064− ?. ?=([@ ~] vars.body.u.found) ~
12065− ?: =(0 left.u.found) ~
12066− =/ argument=(unit upat) (union-overlap-primitive i.args.s)
12067− ?~ argument ~
12068− `[body.body.u.found `[i.vars.body.u.found u.argument] (dec left.u.found)]
12069− ?~ expanded ~
12070− =/ body=shape body.u.expanded
12071− ?. ?=(%cell -.body) ~
12072− ?. ?=([* * ~] fields.body) ~
12073− :: Charge the cell, two fields, and the head and payload nodes.
12074− ?: (lth left.u.expanded 5) ~
12075− =/ head=(unit @) (union-source-cell-tag body)
12076− ?~ head ~
12077− =/ field=field i.t.fields.body
12078− =/ payload=shape
12079− ?- -.field
12080− %bare shape.field
12081− %face shape.field
12082− %pun [%ref at.field ~[name.field]]
12083− ==
12084− =/ pattern=(unit upat)
12085− ?: ?=(%tvar -.payload)
12086− ?~ param.u.expanded ~
12087− ?. =(name.payload name.u.param.u.expanded) ~
12088− `pat.u.param.u.expanded
12089− (union-overlap-primitive payload)
12090− ?~ pattern ~
12091− `[[at.s u.head u.pattern] (sub left.u.expanded 5)]
12092−++ union-overlap-against
12093− |= [first=uow-case rest=(list shape) molds=imolds fuel=@ud]
12094− ^- (unit [witness=(unit upair) left=@ud])
12095− ?~ rest `[~ fuel]
12096− ?: =(0 fuel) ~
12097− =/ other=(unit [item=uow-case left=@ud]) (union-overlap-case i.rest molds (dec fuel))
12098− ?~ other ~
12099− ?: &(=(head.first head.item.u.other) =(%overlap (union-relate payload.first payload.item.u.other)))
12100− `[`[at.first at.item.u.other %overlap] left.u.other]
12101− $(rest t.rest, fuel left.u.other)
12102−++ union-source-overlap
12103− |= [cases=(list shape) molds=imolds fuel=@ud]
12104− ^- (unit upair)
12105− ?~ cases ~
12106− ?~ t.cases ~
12107− ?: =(0 fuel) ~
12108− =/ first=(unit [item=uow-case left=@ud]) (union-overlap-case i.cases molds (dec fuel))
12109− ?~ first ~
12110− =/ found=(unit [witness=(unit upair) left=@ud])
12111− (union-overlap-against item.u.first t.cases molds left.u.first)
12112− ?~ found ~
12113− ?^ witness.u.found witness.u.found
12114− $(cases t.cases, fuel left.u.found)
12115−::
12116−++ union-pairs
12117− |= [cases=(list shape) molds=imolds]
12118− ^- (list upair)
12119− ?~ cases ~
12120− =/ first=shape i.cases
12121− =/ a=upat (project-union-mold first molds ~)
12122− =/ pairs=(list upair)
12123− %+ turn t.cases
12124− |= second=shape
12125− ^- upair
12126− [at.first at.second (union-relate a (project-union-mold second molds ~))]
12127− (weld pairs $(cases t.cases))
12128−::
12129−:: The partial report and the full module check share one overlap proof,
12130−:: so for the same union both name the same pair. The caller passes the
12131−:: projected .pairs, which the partial report reads again. The projection
12132−:: proves atoms, flags and nested literal cells, and its first overlap is
12133−:: named even when the source slice would prove an earlier pair. The
12134−:: source slice is tried only when some pair is unknown, for its one-hop
12135−:: generic applications. A missing witness does not mean the cases are
12136−:: disjoint.
12137−++ mold-overlap-witness
12138− |= [cases=(list shape) pairs=(list upair) molds=imolds]
12139− ^- (unit upair)
12140− =/ overlapping=(list upair) (skim pairs |=(p=upair =(%overlap relation.p)))
12141− ?^ overlapping `i.overlapping
12142− ?. (lien pairs |=(p=upair =(%unknown relation.p))) ~
12143− (union-source-overlap cases molds 256)
12144−::
12145−:: A closed structural mold supplies no equation to determine a hole.
12146−:: Applications, references, unbound capitals and unions are unproved.
12147−++ simple-mold-hole
12148− |= sh=shape
12149− ^- (unit (unit span))
12150− ?: ?=(%generic -.sh)
12151− ?~ vars.sh ~
12152− ?. (distinct-params vars.sh) ~
12153− (simple-mold-hole-in body.sh vars.sh)
12154− (simple-mold-hole-in sh ~)
12155−++ simple-mold-hole-in
12156− |= [sh=shape vars=(list @t)]
12157− ^- (unit (unit span))
12158− ?- -.sh
12159− %hole ``at.sh
12160− ?(%aura %noun %void %flag %const) `~
12161− %tvar ?:((lien vars |=(v=@t =(v name.sh))) `~ ~)
12162− %cell (simple-mold-field-holes fields.sh vars)
12163− %fn
12164− =/ a=(unit (unit span)) $(sh sample.sh)
12165− ?~ a ~
12166− =/ b=(unit (unit span)) $(sh product.sh)
12167− ?~ b ~
12168− `?~(u.a u.b u.a)
12169− %generic ~
12170 * ~
10074 * ~
12171 ==
10075 ==
12172++ simple-mold-field-holes
10076++ simple-mold-field-holes
@@ -12281,17 +10185,15 @@
12281 =? sh ?=(%generic -.sh) body.sh
10185 =? sh ?=(%generic -.sh) body.sh
12282 ?. ?=(%union -.sh) (crip "+$ {(trip name.d)}: not checked")
10186 ?. ?=(%union -.sh) (crip "+$ {(trip name.d)}: not checked")
12283 =/ pairs=(list upair) (union-pairs cases.sh molds)
10187 =/ pairs=(list upair) (union-pairs cases.sh molds)
12284− =/ witness=(unit upair) (mold-overlap-witness cases.sh pairs molds)
10188+ =/ overlapping=(list upair) (skim pairs |=(p=upair =(%overlap relation.p)))
12285− ?^ witness
10189+ ?^ overlapping
12286− =/ p=upair u.witness
10190+ =/ p=upair i.overlapping
12287 =/ summary=@t (crip "+$ {(trip name.d)}: overlapping cases; mold not checked")
10191 =/ summary=@t (crip "+$ {(trip name.d)}: overlapping cases; mold not checked")
12288 =/ first=@t (show-error src [file line.beg.first.p col.beg.first.p "first union case"])
10192 =/ first=@t (show-error src [file line.beg.first.p col.beg.first.p "first union case"])
12289 =/ second=@t (show-error src [file line.beg.second.p col.beg.second.p "overlapping case"])
10193 =/ second=@t (show-error src [file line.beg.second.p col.beg.second.p "overlapping case"])
12290 (of-wain:format ~[summary first second])
10194 (of-wain:format ~[summary first second])
12291 ?: (lien pairs |=(p=upair =(%unknown relation.p)))
10195 ?: (lien pairs |=(p=upair =(%unknown relation.p)))
12292− ?. (union-source-distinct-tags cases.sh molds 256)
10196+ (crip "+$ {(trip name.d)}: case disjointness unresolved; mold not checked")
12293− (crip "+$ {(trip name.d)}: case disjointness unresolved; mold not checked")
12294− (crip "+$ {(trip name.d)}: cases proven disjoint; mold not checked")
12295 (crip "+$ {(trip name.d)}: cases proven disjoint; mold not checked")
10197 (crip "+$ {(trip name.d)}: cases proven disjoint; mold not checked")
12296::
10198::
12297:: +show-inference-diagnostic: a partial report with both source sites
10199:: +show-inference-diagnostic: a partial report with both source sites
@@ -12307,7 +10209,6 @@
12307 (of-wain:format [summary excerpts])
10209 (of-wain:format [summary excerpts])
12308::
10210::
12309:: Both written field sites are shown in the source that declares them.
10211:: Both written field sites are shown in the source that declares them.
12310−:: A store's derived-name clash shows its two sites the same way.
12311++ show-duplicate-fields
10212++ show-duplicate-fields
12312 |= [file=path src=@t diagnostic=idiag]
10213 |= [file=path src=@t diagnostic=idiag]
12313 ^- @t
10214 ^- @t
@@ -12349,14 +10250,7 @@
12349+$ jbundle (list jsource)
10250+$ jbundle (list jsource)
12350+$ jcache (list [at=path iface=ifile])
10251+$ jcache (list [at=path iface=ifile])
12351+$ jfile-result (each [iface=ifile cache=jcache] @t)
10252+$ jfile-result (each [iface=ifile cache=jcache] @t)
12352−:: Overlap evidence retains the exact source that supplied its spans.
12353−:: Ordinary Jibb imports preserve this evidence through the resolver.
12354−+$ jfile-overlap [file=path source=@t name=term cases=upair]
12355−+$ jfile-failure [message=@t overlap=(unit jfile-overlap)]
12356−+$ jfile-detailed-result (each [iface=ifile cache=jcache] jfile-failure)
12357+$ jimports-result (each [resolved=ijimports cache=jcache] @t)
10253+$ jimports-result (each [resolved=ijimports cache=jcache] @t)
12358−:: Preserve an imported overlap's original file and source across the graph.
12359−+$ jimports-detailed-result (each [resolved=ijimports cache=jcache] jfile-failure)
12360::
10254::
12361:: Written record fields each have their own lexical record scope.
10255:: Written record fields each have their own lexical record scope.
12362+$ written-fields (map term span)
10256+$ written-fields (map term span)
@@ -12465,29 +10359,13 @@
12465 =/ first=(unit idiag) ?:(?=(%expr -.i.segs) (duplicate-expr p.i.segs) ~)
10359 =/ first=(unit idiag) ?:(?=(%expr -.i.segs) (duplicate-expr p.i.segs) ~)
12466 ?^ first first
10360 ?^ first first
12467 $(segs t.segs)
10361 $(segs t.segs)
12468−:: A change's items each set a field once: two that name the same field,
12469−:: or one a field inside the other's, as cart and open.cart, overlap.
12470++ duplicate-edits
10362++ duplicate-edits
12471 |= edits=(list edit)
10363 |= edits=(list edit)
12472 ^- (unit idiag)
10364 ^- (unit idiag)
12473− =| seen=(list edit)
12474− |- ^- (unit idiag)
12475 ?~ edits ~
10365 ?~ edits ~
12476− =/ e=edit i.edits
10366+ =/ first (duplicate-expr val.i.edits)
12477− =/ prior=(list edit)
12478− (skim seen |=(p=edit (wing-overlap (flop names.p) (flop names.e))))
12479− ?^ prior
12480− =/ same=? =(names.i.prior names.e)
12481− =/ sites=(list [at=span note=tape])
12482− :~ [at.i.prior "first field"]
12483− [at.e ?:(same "repeated field" "overlapping field")]
12484− ==
12485− ?: same `["change field `{(show-names names.e)}` is repeated" sites]
12486− =/ a=tape (show-names names.i.prior)
12487− `["change fields `{a}` and `{(show-names names.e)}` overlap" sites]
12488− =/ first (duplicate-expr val.e)
12489 ?^ first first
10367 ?^ first first
12490− $(edits t.edits, seen [e seen])
10368+ $(edits t.edits)
12491++ duplicate-arms
10369++ duplicate-arms
12492 |= arms=(list arm)
10370 |= arms=(list arm)
12493 ^- (unit idiag)
10371 ^- (unit idiag)
@@ -12560,142 +10438,59 @@
12560 ==
10438 ==
12561 [n $(imports t.imports)]
10439 [n $(imports t.imports)]
12562::
10440::
12563−:: +reserved-name: whether n names a reserved operation
10441+++ reserved-proj-sample
12564−::
12565−:: proj and unface are handled by the checker by type, not bound, so
12566−:: no module may define, import or bind either name, as a value or
12567−:: as a mold. A field, tag or path segment may still be spelled so.
12568−++ reserved-name
12569− |= n=term
12570− ^- ?
12571− |(=(n %proj) =(n %unface))
12572−++ reserved-sample
12573 |= sam=sample
10442 |= sam=sample
12574 ^- ?
10443 ^- ?
12575 ?- -.sam
10444 ?- -.sam
12576− %bind (reserved-name name.sam)
10445+ %bind =(name.sam %proj)
12577− %face (reserved-name name.sam)
10446+ %face =(name.sam %proj)
12578− %pun (reserved-name name.sam)
10447+ %pun =(name.sam %proj)
12579− %cell (lien items.sam reserved-sample)
10448+ %cell (lien items.sam reserved-proj-sample)
12580 * |
10449 * |
12581 ==
10450 ==
12582−++ reserved-pattern
10451+++ reserved-proj-pattern
12583 |= p=pattern
10452 |= p=pattern
12584 ^- ?
10453 ^- ?
12585 ?- -.p
10454 ?- -.p
12586− %bind (reserved-name name.p)
10455+ %bind =(name.p %proj)
12587− %cell (lien items.p reserved-pattern)
10456+ %cell (lien items.p reserved-proj-pattern)
12588 * |
10457 * |
12589 ==
10458 ==
12590−++ reserved-def
10459+++ reserved-proj-def
12591 |= d=def
10460 |= d=def
12592 ^- ?
10461 ^- ?
12593− ?: (reserved-name name.d) &
10462+ ?: =(name.d %proj) &
12594− ?: ?=(%value -.d) (reserved-expr val.d)
10463+ ?: ?=(%value -.d) (reserved-proj-expr val.d)
12595 |
10464 |
12596−++ reserved-expr
10465+++ reserved-proj-expr
12597 |= e=expr
10466 |= e=expr
12598 ^- ?
10467 ^- ?
12599 ?- -.e
10468 ?- -.e
12600− %str (lien pieces.e |=(p=piece ?:(?=(%expr -.p) (reserved-expr p.p) |)))
10469+ %str (lien pieces.e |=(p=piece ?:(?=(%expr -.p) (reserved-proj-expr p.p) |)))
12601− %qath (lien segs.e |=(p=qseg ?:(?=(%expr -.p) (reserved-expr p.p) |)))
10470+ %qath (lien segs.e |=(p=qseg ?:(?=(%expr -.p) (reserved-proj-expr p.p) |)))
12602− %change (lien edits.e |=(p=edit (reserved-expr val.p)))
10471+ %change (lien edits.e |=(p=edit (reserved-proj-expr val.p)))
12603 %pair $(e val.e)
10472 %pair $(e val.e)
12604 %unit $(e val.e)
10473 %unit $(e val.e)
12605 %group $(e inner.e)
10474 %group $(e inner.e)
12606− %list (lien items.e reserved-expr)
10475+ %list (lien items.e reserved-proj-expr)
12607− %tuple (lien items.e |=(i=item (reserved-expr val.i)))
10476+ %tuple (lien items.e |=(i=item (reserved-proj-expr val.i)))
12608− ?(%gate %gate-wide) |((reserved-sample sample.e) $(e body.e))
10477+ ?(%gate %gate-wide) |((reserved-proj-sample sample.e) $(e body.e))
12609 %cast $(e val.e)
10478 %cast $(e val.e)
12610− %call |($(e head.e) (lien args.e reserved-expr))
10479+ %call |($(e head.e) (lien args.e reserved-proj-expr))
12611 %trace |($(e val.e) $(e then.e))
10480 %trace |($(e val.e) $(e then.e))
12612− %branch |($(e subject.e) (lien arms.e |=(a=arm |((reserved-pattern pat.a) (reserved-expr val.a)))))
10481+ %branch |($(e subject.e) (lien arms.e |=(a=arm |((reserved-proj-pattern pat.a) (reserved-proj-expr val.a)))))
12613− %body |((lien defs.e reserved-def) $(e final.e))
10482+ %body |((lien defs.e reserved-proj-def) $(e final.e))
12614 * |
10483 * |
12615 ==
10484 ==
12616::
10485::
12617−++ module-has-reserved
10486+++ module-has-reserved-proj
12618 |= mod=module
10487 |= mod=module
12619 ^- ?
10488 ^- ?
12620 =/ imported=(list term) (import-binding-names imports.mod)
10489 =/ imported=(list term) (import-binding-names imports.mod)
12621 =/ vals=(list term) (global-value-names defs.mod)
10490 =/ vals=(list term) (global-value-names defs.mod)
12622 =/ molds=imolds (collect-simple-molds defs.mod)
10491 =/ molds=imolds (collect-simple-molds defs.mod)
12623 =/ mold-names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
10492 =/ mold-names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
12624− |((lien (weld imported (weld vals mold-names)) reserved-name) (lien defs.mod reserved-def))
10493+ |((lien (weld imported (weld vals mold-names)) |=(n=term =(n %proj))) (lien defs.mod reserved-proj-def))
12625−::
12626−:: A scope collision retains source sites. Prelude declarations may be in
12627−:: another source, so their name and namespace are retained separately.
12628−+$ iscope-diagnostic
12629− [issue=idiag prelude=(unit [name=term kind=?(%value %mold %any)])]
12630−++ scope-import-diagnostic
12631− |= [imports=(list import) prelude-values=(list term) prelude-molds=(list term) seen=written-fields]
12632− ^- (each written-fields iscope-diagnostic)
12633− ?~ imports [%& seen]
12634− =/ imp=import i.imports
12635− =/ n=term
12636− ?- -.imp
12637− %jibb face.imp
12638− %sur name.imp
12639− %mark mark.imp
12640− ==
12641− ?: (reserved-name n)
12642− [%| [["`{(trip n)}` is reserved and cannot be bound" ~[[at.imp "reserved name"]]] ~]]
12643− =/ earlier=(unit span) (~(get by seen) n)
12644− ?^ earlier
12645− [%| [["import `{(trip n)}` shadows an earlier import" ~[[u.earlier "earlier import"] [at.imp "conflicting import"]]] ~]]
12646− ?: |((lien prelude-values |=(x=term =(n x))) (lien prelude-molds |=(x=term =(n x))))
12647− [%| [["import `{(trip n)}` shadows a prelude name" ~[[at.imp "conflicting import"]]] `[n %any]]]
12648− $(imports t.imports, seen (~(put by seen) n at.imp))
12649−++ scope-def-diagnostic
12650− |= [defs=(list def) imports=written-fields prelude-values=(list term) prelude-molds=(list term) values=written-fields molds=written-fields]
12651− ^- (unit iscope-diagnostic)
12652− ?~ defs ~
12653− =/ d=def i.defs
12654− =/ n=term name.d
12655− ?: (reserved-name n)
12656− `[["`{(trip n)}` is reserved and cannot be bound" ~[[at.d "reserved name"]]] ~]
12657− =/ imported=(unit span) (~(get by imports) n)
12658− ?^ imported
12659− `[["definition `{(trip n)}` shadows an import" ~[[u.imported "import"] [at.d "conflicting definition"]]] ~]
12660− =/ seen=written-fields ?:(?=(%value -.d) values molds)
12661− =/ earlier=(unit span) (~(get by seen) n)
12662− ?^ earlier
12663− `[["definition `{(trip n)}` shadows an earlier definition" ~[[u.earlier "earlier definition"] [at.d "conflicting definition"]]] ~]
12664− =/ prelude-names=(list term) ?:(?=(%value -.d) prelude-values prelude-molds)
12665− ?: (lien prelude-names |=(x=term =(n x)))
12666− `[["definition `{(trip n)}` shadows a prelude name" ~[[at.d "conflicting definition"]]] `[n ?:(?=(%value -.d) %value %mold)]]
12667− ?: ?=(%value -.d)
12668− $(defs t.defs, values (~(put by values) n at.d))
12669− $(defs t.defs, molds (~(put by molds) n at.d))
12670−++ module-scope-diagnostic
12671− |= [mod=module prelude-values=(list term) prelude-molds=(list term)]
12672− ^- (unit iscope-diagnostic)
12673− =/ imports=(each written-fields iscope-diagnostic)
12674− (scope-import-diagnostic imports.mod prelude-values prelude-molds ~)
12675− ?: ?=(%| -.imports) `p.imports
12676− (scope-def-diagnostic defs.mod p.imports prelude-values prelude-molds ~ ~)
12677−++ show-scope-diagnostic
12678− |= [file=path src=@t diagnostic=iscope-diagnostic prelude=(unit ifile)]
12679− ^- @t
12680− =/ excerpts=(list @t)
12681− %+ turn sites.issue.diagnostic
12682− |= site=[at=span note=tape]
12683− (show-error src [file line.beg.at.site col.beg.at.site note.site])
12684− =/ previous=(list @t)
12685− ?~ prelude.diagnostic ~
12686− ?~ prelude ~
12687− ?~ source.u.prelude ~
12688− =/ parsed (parse at.u.prelude u.source.u.prelude)
12689− ?: ?=(%| -.parsed) ~
12690− =/ matching=(list def)
12691− %+ skim defs.p.parsed
12692− |= d=def
12693− ?& =(name.d name.u.prelude.diagnostic)
12694− |(=(%any kind.u.prelude.diagnostic) =(-.d kind.u.prelude.diagnostic))
12695− ==
12696− ?~ matching ~
12697− ~[(show-error u.source.u.prelude [at.u.prelude line.beg.at.i.matching col.beg.at.i.matching "prelude declaration"])]
12698− (of-wain:format [(crip msg.issue.diagnostic) (weld excerpts previous)])
12699::
10494::
12700++ module-scope-valid
10495++ module-scope-valid
12701 |= [mod=module prelude-values=(list term) prelude-molds=(list term)]
10496 |= [mod=module prelude-values=(list term) prelude-molds=(list term)]
@@ -12704,7 +10499,7 @@
12704 =/ vals=(list term) (global-value-names defs.mod)
10499 =/ vals=(list term) (global-value-names defs.mod)
12705 =/ molds=imolds (collect-simple-molds defs.mod)
10500 =/ molds=imolds (collect-simple-molds defs.mod)
12706 =/ mold-names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
10501 =/ mold-names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
12707− ?: (module-has-reserved mod) |
10502+ ?: (module-has-reserved-proj mod) |
12708 ?. %+ levy imported
10503 ?. %+ levy imported
12709 |= n=term
10504 |= n=term
12710 &((unique-value-name n imported) !(lien vals |=(v=term =(n v))) !(lien mold-names |=(m=term =(n m))) !(lien prelude-values |=(v=term =(n v))) !(lien prelude-molds |=(m=term =(n m))))
10505 &((unique-value-name n imported) !(lien vals |=(v=term =(n v))) !(lien mold-names |=(m=term =(n m))) !(lien prelude-values |=(v=term =(n v))) !(lien prelude-molds |=(m=term =(n m))))
@@ -12712,44 +10507,22 @@
12712 ?. (levy vals |=(n=term &((unique-value-name n vals) !(lien prelude-values |=(v=term =(n v)))))) |
10507 ?. (levy vals |=(n=term &((unique-value-name n vals) !(lien prelude-values |=(v=term =(n v)))))) |
12713 (levy mold-names |=(n=term &((unique-value-name n mold-names) !(lien prelude-molds |=(m=term =(n m))))))
10508 (levy mold-names |=(n=term &((unique-value-name n mold-names) !(lien prelude-molds |=(m=term =(n m))))))
12714::
10509::
12715−:: A detailed failure is attached only to the first mold that actually
10510+:: In an API file or before main's kind is known, a lone `+$ poke`
12716−:: failed in this check, using that module's checked source mold table.
10511+:: may be a declaration rather than a mold that shadows the prelude. Do not call
12717−+$ imold-failure [message=@t overlap=(unit [name=term cases=upair])]
10512+:: that one collision definite, and do not hide unrelated scope errors.
12718−:: Validate a generic wrapper without an unbounded duplicate-name pass.
10513+++ pending-declared-poke
12719−++ module-mold-params-valid
10514+ |= [at=path mod=module prelude-values=(list term) prelude-molds=(list term)]
12720− |= [vars=(list @t) seen=(set @t) fuel=@ud]
12721 ^- ?
10515 ^- ?
12722− ?~ vars &
10516+ ?. (lien prelude-molds |=(n=term =(%poke n))) |
12723− ?: =(0 fuel) |
10517+ ?. |(?=([%ui %api @ %jibb ~] at) (lien defs.mod |=(d=def &(?=(%value -.d) =(%main name.d))))) |
12724− ?: (~(has in:..zuse seen) i.vars) |
10518+ =/ pokes=(list def)
12725− $(vars t.vars, seen (~(put in:..zuse seen) i.vars), fuel (dec fuel))
10519+ (skim defs.mod |=(d=def &(?=(%mold -.d) =(%poke name.d))))
12726−++ module-mold-overlap
10520+ ?~ pokes |
12727− |= [m=[name=term body=shape] molds=imolds]
10521+ ?^ t.pokes |
12728− ^- (unit upair)
10522+ =/ remaining=(list def)
12729− =/ sh=shape body.m
10523+ (skim defs.mod |=(d=def !&(?=(%mold -.d) =(%poke name.d))))
12730− =/ valid=?
10524+ (module-scope-valid mod(defs remaining) prelude-values prelude-molds)
12731− ?. ?=(%generic -.sh) &
10525+::
12732− ?~ vars.sh |
12733− (module-mold-params-valid vars.sh *(set @t) 256)
12734− ?. valid ~
12735− =? sh ?=(%generic -.sh) body.sh
12736− ?. ?=(%union -.sh) ~
12737− :: A failed inference keeps no projection, so it is computed once more.
12738− (mold-overlap-witness cases.sh (union-pairs cases.sh molds) molds)
12739−++ module-mold-types-detail
12740− |= [molds=imolds state=istate]
12741− ^- (each imold-types imold-failure)
12742− ?~ molds [%& ~]
12743− =/ m=[name=term body=shape] i.molds
12744− =/ t=(unit [template=ischeme state=istate])
12745− (infer-mold-template body.m state(active [name.m active.state], in-mold &))
12746− ?~ t
12747− =/ overlap=(unit upair) (module-mold-overlap m molds.state)
12748− [%| ['module mold needs unsupported inference' ?~(overlap ~ `[name.m u.overlap])]]
12749− =. typ.template.u.t (label-direct-union typ.template.u.t body.m name.m state)
12750− =/ rest=(each imold-types imold-failure) $(molds t.molds)
12751− ?: ?=(%| -.rest) rest
12752− [%& [[name.m template.u.t] p.rest]]
12753++ module-mold-types
10526++ module-mold-types
12754 |= [molds=imolds state=istate]
10527 |= [molds=imolds state=istate]
12755 ^- (each imold-types @t)
10528 ^- (each imold-types @t)
@@ -12807,42 +10580,10 @@
12807 ?. ?=(%tvar -.i.args.tail) |
10580 ?. ?=(%tvar -.i.args.tail) |
12808 =(var name.i.args.tail)
10581 =(var name.i.args.tail)
12809::
10582::
12810−++ prelude-public-label
12811− |= label=@t
12812− ^- (unit @t)
12813− ?: =(label 'ask.internal') `'ask'
12814− ?: =(label 'qath.internal') `'qath'
12815− ?: =(label 'raw-poke.internal') `'raw-poke'
12816− `label
12817−::
12818−++ prelude-label-nested
12819− |= typ=itype
12820− ^- itype
12821− ?- -.typ
12822− %union
12823− =/ label=(unit @t) ?~(label.typ ~ (prelude-public-label u.label.typ))
12824− [%union (turn cases.typ |=(c=itype (prelude-label-nested c))) origin.typ label (turn args.typ |=(c=itype (prelude-label-nested c)))]
12825− %grec
12826− =/ label=(unit @t) ?~(label.typ ~ (prelude-public-label u.label.typ))
12827− typ(label label, args (turn args.typ |=(c=itype (prelude-label-nested c))))
12828− %jrec
12829− =/ label=(unit @t) ?~(label.typ ~ (prelude-public-label u.label.typ))
12830− typ(label label)
12831− %collection [%collection name.typ (turn args.typ |=(c=itype (prelude-label-nested c)))]
12832− %face [%face name.typ $(typ body.typ)]
12833− %fn [%fn $(typ sample.typ) $(typ product.typ)]
12834− %cell [%cell $(typ hed.typ) $(typ tal.typ)]
12835− * typ
12836− ==
12837−::
12838++ prelude-label
10583++ prelude-label
12839 |= [typ=itype name=term vars=(list @ud)]
10584 |= [typ=itype name=term vars=(list @ud)]
12840 ^- itype
10585 ^- itype
12841− =. typ (prelude-label-nested typ)
12842 ?: ?=(%jrec -.typ) typ(label `name)
10586 ?: ?=(%jrec -.typ) typ(label `name)
12843− ?: ?=(%grec -.typ)
12844− ?. (identity-union-parameters vars args.typ) typ(label ~)
12845− typ(label `name)
12846 ?. ?=(%union -.typ) typ
10587 ?. ?=(%union -.typ) typ
12847 ?. (identity-union-parameters vars args.typ)
10588 ?. (identity-union-parameters vars args.typ)
12848 ?~ origin.typ typ
10589 ?~ origin.typ typ
@@ -12875,14 +10616,7 @@
12875 =/ plus=ischeme [[%fn [%cell b b] b] ~[0]]
10616 =/ plus=ischeme [[%fn [%cell b b] b] ~[0]]
12876 =/ minus=ischeme [[%fn b b] ~[0]]
10617 =/ minus=ischeme [[%fn b b] ~[0]]
12877 =/ greater=ischeme [[%fn pair [%flag ~]] ~[0]]
10618 =/ greater=ischeme [[%fn pair [%flag ~]] ~[0]]
12878− =/ free=itype [%fvar 0]
10619+ [~[[%raw-add plus] [%raw-dec minus] [%raw-gth greater]] ~ /lib/jibb/primitives/jibb ~ ~ ~ ~ ~]
12879− =/ equal=ischeme [[%fn [%cell free free] [%flag ~]] ~[0]]
12880− =/ utf8=itype [%atom 'tD']
12881− =/ tape=itype [%collection %list ~[utf8]]
12882− =/ codepoints=itype [%collection %list ~[[%atom %c]]]
12883− =/ text-trip=ischeme [[%fn [%atom %t] tape] ~]
12884− =/ text-tuba=ischeme [[%fn tape codepoints] ~]
12885− [~[[%raw-add plus] [%raw-dec minus] [%raw-gth greater] [%raw-eq equal] [%raw-trip text-trip] [%raw-tuba text-tuba]] ~ /lib/jibb/primitives/jibb ~ ~ ~ ~ ~]
12886::
10620::
12887++ infer-private-internal
10621++ infer-private-internal
12888 |= [src=@t public-source=@t]
10622 |= [src=@t public-source=@t]
@@ -12923,7 +10657,7 @@
12923 =/ source-unit=(unit ischeme)
10657 =/ source-unit=(unit ischeme)
12924 ?~ unit-decl ~
10658 ?~ unit-decl ~
12925 =/ unit-molds=imolds ~[[%unit u.unit-decl]]
10659 =/ unit-molds=imolds ~[[%unit u.unit-decl]]
12926− =/ unit-state=istate [0 ~ ~ ~ unit-molds ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | /lib/jibb/prelude/jibb ~[%unit] ~ ~ 256 ~ ~ ~ ~ ~ ~]
10660+ =/ unit-state=istate [0 ~ ~ ~ unit-molds ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | /lib/jibb/prelude/jibb ~[%unit] ~ ~ 256 ~ ~ ~]
12927 =/ unit-types=imold-types (partial-prelude-molds unit-molds unit-state)
10661 =/ unit-types=imold-types (partial-prelude-molds unit-molds unit-state)
12928 =/ unit-iface=ifile [~ unit-types /lib/jibb/prelude/jibb ~ ~ ~ ~ ~]
10662 =/ unit-iface=ifile [~ unit-types /lib/jibb/prelude/jibb ~ ~ ~ ~ ~]
12929 =/ found=(unit ischeme) (find-jibb-mold %unit unit-iface)
10663 =/ found=(unit ischeme) (find-jibb-mold %unit unit-iface)
@@ -12938,7 +10672,7 @@
12938 =/ js=ijimports ~[[face.i.imports.mod primitive]]
10672 =/ js=ijimports ~[[face.i.imports.mod primitive]]
12939 =/ reserved=(list term) ~[face.i.imports.mod]
10673 =/ reserved=(list term) ~[face.i.imports.mod]
12940 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
10674 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
12941− =/ state=istate [0 ~ ~ ~ molds globals ~ ~ ~ ~ js reserved ~ ~ ~ | at top ~ ~ 256 ~ ~ ~ ~ ~ ~]
10675+ =/ state=istate [0 ~ ~ ~ molds globals ~ ~ ~ ~ js reserved ~ ~ ~ | at top ~ ~ 256 ~ ~ ~]
12942 =/ mts=(each imold-types @t) (module-mold-types molds state)
10676 =/ mts=(each imold-types @t) (module-mold-types molds state)
12943 =/ usable=(unit imold-types)
10677 =/ usable=(unit imold-types)
12944 ?: ?=(%& -.mts) `p.mts
10678 ?: ?=(%& -.mts) `p.mts
@@ -12994,7 +10728,7 @@
12994 =? env-molds declared
10728 =? env-molds declared
12995 (skim molds |=(m=[name=term body=shape] !=(%list name.m)))
10729 (skim molds |=(m=[name=term body=shape] !=(%list name.m)))
12996 =/ reserved=(list term) ?:(declared ~[%list] ~)
10730 =/ reserved=(list term) ?:(declared ~[%list] ~)
12997− =/ state=istate [0 ~ ~ ~ env-molds globals ~ ~ ~ ~ u.private reserved ~ ~ ~ | at names ~ ~ 256 ~ ~ ~ ~ ~ ~]
10731+ =/ state=istate [0 ~ ~ ~ env-molds globals ~ ~ ~ ~ u.private reserved ~ ~ ~ | at names ~ ~ 256 ~ ~ ~]
12998 :: Other prelude molds may use list only after its source has passed
10732 :: Other prelude molds may use list only after its source has passed
12999 :: the standard-list check. The raw declaration remains removed.
10733 :: the standard-list check. The raw declaration remains removed.
13000 =/ declared-list=(unit shape) (find-simple-mold %list molds)
10734 =/ declared-list=(unit shape) (find-simple-mold %list molds)
@@ -13059,99 +10793,6 @@
13059 ?~ (ienv-lookup name.i.ds env) |
10793 ?~ (ienv-lookup name.i.ds env) |
13060 $(ds t.ds)
10794 $(ds t.ds)
13061::
10795::
13062−:: Names the value a failed full check stops at, for its message only. A
13063−:: value whose module dependencies all resolved failed on its own, so the
13064−:: first such missing value is named. Otherwise every missing value waits
13065−:: on another, so following the first one each waits on, from the first
13066−:: missing value, reaches a value twice, which is named. The walk is over
13067−:: the syntactic dependency graph: dependency-expr ignores binders, so a
13068−:: sample or other local binder with a top-level value's name reads as a
13069−:: dependency on it. The named value is on a cycle of that graph, but may
13070−:: only call into the value that failed, as when a binder in that value
13071−:: shadows the named one. It claims no error in the named value.
13072−++ module-missing-value
13073− |= [ds=(list def) env=ienv]
13074− ^- (unit term)
13075− =/ missing=(list term)
13076− %+ murn ds
13077− |= d=def
13078− ?. ?=(%value -.d) ~
13079− ?^ (ienv-lookup name.d env) ~
13080− `name.d
13081− ?~ missing ~
13082− =/ pending=ivisited (graph-nameset missing ~)
13083− =/ roots=(list term)
13084− %+ murn ds
13085− |= d=def
13086− ?. ?=(%value -.d) ~
13087− ?~ (~(get by pending) name.d) ~
13088− =/ deps=(list term) (dependency-expr val.d)
13089− ?. (levy deps |=(n=term |(=(n name.d) ?=(~ (~(get by pending) n))))) ~
13090− `name.d
13091− ?^ roots `i.roots
13092− =/ seen=ivisited ~
13093− =/ here=term i.missing
13094− |-
13095− ?^ (~(get by seen) here) `here
13096− =/ next=(list term)
13097− %- zing
13098− %+ turn ds
13099− |= d=def
13100− ?. ?=(%value -.d) ~
13101− ?. =(here name.d) ~
13102− (skim (dependency-expr val.d) |=(n=term &(!=(n here) ?=(^ (~(get by pending) n)))))
13103− ?~ next `here
13104− $(seen (~(put by seen) here &), here i.next)
13105−::
13106−:: Finds the first missing value that is a gate whose own sample has the
13107−:: name of a value in scope. Partial inference rejects that sample ("sample
13108−:: shadows a name"), and it is an error (grammar, Modules). Mark names name
13109−:: molds and are left out, as are cell samples and binders deeper in the
13110−:: value.
13111−++ module-sample-shadow
13112− |= [ds=(list def) env=ienv values=(list term)]
13113− ^- (unit [name=term at=span])
13114− ?~ ds ~
13115− ?. ?=(%value -.i.ds) $(ds t.ds)
13116− ?^ (ienv-lookup name.i.ds env) $(ds t.ds)
13117− =/ e=expr val.i.ds
13118− ?. ?=(?(%gate %gate-wide) -.e) $(ds t.ds)
13119− =/ s=sample sample.e
13120− =/ name=(unit term)
13121− ?+ -.s ~
13122− %bind `name.s
13123− %face `name.s
13124− %pun `name.s
13125− ==
13126− ?~ name $(ds t.ds)
13127− ?. (lien values |=(n=term =(n u.name))) $(ds t.ds)
13128− `[u.name at.s]
13129−::
13130−:: Select the first available reason in dependency order, rather than
13131−:: preferring one class of diagnostic across the whole module. Only the
13132−:: first 64 definitions are retried for pending tags, as before.
13133−++ module-unresolved-diagnostic
13134− |= [ds=(list def) env=ienv base=istate checked=(map term def) heads=(unit igate-prelude-evidence) failures=(list [name=term diag=idiag]) values=(list term) file=path src=@t fuel=@ud]
13135− ^- (unit @t)
13136− ?~ ds ~
13137− =/ d=def i.ds
13138− =/ remaining=@ud ?:(=(0 fuel) 0 (dec fuel))
13139− ?: ?=(%mold -.d) $(ds t.ds, fuel remaining)
13140− ?^ (ienv-lookup name.d env) $(ds t.ds, fuel remaining)
13141− =/ found=(list [name=term diag=idiag])
13142− (skim failures |=(failure=[name=term diag=idiag] =(name.failure name.d)))
13143− ?^ found `(show-inference-diagnostic file src name.d diag.i.found)
13144− =/ pending=(unit [at=span msg=tape])
13145− ?: =(0 fuel) ~
13146− (module-pending-tag-one d env base checked heads)
13147− ?^ pending
13148− `(show-error src [file line.beg.at.u.pending col.beg.at.u.pending msg.u.pending])
13149− =/ shadow=(unit [name=term at=span]) (module-sample-shadow ~[d] env values)
13150− ?^ shadow
13151− =/ msg=tape "sample `{(trip name.u.shadow)}` shadows a name already in scope"
13152− `(show-error src [file line.beg.at.u.shadow col.beg.at.u.shadow msg])
13153− $(ds t.ds, fuel remaining)
13154−::
13155:: Cache only completed interfaces for this invocation. The source bundle,
10796:: Cache only completed interfaces for this invocation. The source bundle,
13156:: imported Hoon types and prelude are fixed for the whole graph. Check the
10797:: imported Hoon types and prelude are fixed for the whole graph. Check the
13157:: active path and duplicate sources before consulting it, so a cache hit
10798:: active path and duplicate sources before consulting it, so a cache hit
@@ -13191,25 +10832,6 @@
13191 =(externals.g externals)
10832 =(externals.g externals)
13192 =(marks.g marks)
10833 =(marks.g marks)
13193 ==
10834 ==
13194−++ request-graph-bounded
13195− |= g=irequest-graph
13196− ^- ?
13197− =/ total=@ud (add (lent requests.g) (lent stores.g))
13198− &((lte (lent ~(tap in:..zuse paths.g)) 256) (lte total 256))
13199−::
13200−++ store-graph-requests-add
13201− |= [pending=(list istore-request-evidence) acc=(list istore-request-evidence) fuel=@ud]
13202− ^- (unit (list istore-request-evidence))
13203− ?~ pending `acc
13204− ?: =(0 fuel) ~
13205− =/ hit=(list istore-request-evidence)
13206− (skim acc |=(x=istore-request-evidence =(store-at.x store-at.i.pending)))
13207− ?^ hit
13208− ?. ?=([* ~] hit) ~
13209− ?. =(i.hit i.pending) ~
13210− $(pending t.pending, fuel (dec fuel))
13211− $(pending t.pending, acc [i.pending acc], fuel (dec fuel))
13212−::
13213++ request-graph-merge
10835++ request-graph-merge
13214 |= [imports=ijimports g=irequest-graph fuel=@ud]
10836 |= [imports=ijimports g=irequest-graph fuel=@ud]
13215 ^- (unit irequest-graph)
10837 ^- (unit irequest-graph)
@@ -13230,13 +10852,8 @@
13230 =/ rs=(unit (list irequest-evidence))
10852 =/ rs=(unit (list irequest-evidence))
13231 (request-graph-requests-add requests.cg requests.g (add 1 (lent requests.cg)))
10853 (request-graph-requests-add requests.cg requests.g (add 1 (lent requests.cg)))
13232 ?~ rs ~
10854 ?~ rs ~
13233− =/ ss=(unit (list istore-request-evidence))
10855+ ?: &(?=(^ u.rs) |((gth (lent ~(tap in:..zuse merged)) 256) (gth (lent u.rs) 256))) ~
13234− (store-graph-requests-add stores.cg stores.g (add 1 (lent stores.cg)))
10856+ $(imports t.imports, g g(paths merged, requests u.rs), fuel (dec fuel))
13235− ?~ ss ~
13236− =/ total=@ud (add (lent u.rs) (lent u.ss))
13237− ?: &(?=(^ u.rs) |((gth (lent ~(tap in:..zuse merged)) 256) (gth total 256))) ~
13238− ?: &(?=(^ u.ss) |((gth (lent ~(tap in:..zuse merged)) 256) (gth total 256))) ~
13239− $(imports t.imports, g g(paths merged, requests u.rs, stores u.ss), fuel (dec fuel))
13240++ request-graph-reusable
10857++ request-graph-reusable
13241 |= [f=ifile src=@t externals=iexternals marks=imark-externals modules=jbundle active=(list path) values=(list term) molds=(list term) prelude=(unit ifile)]
10858 |= [f=ifile src=@t externals=iexternals marks=imark-externals modules=jbundle active=(list path) values=(list term) molds=(list term) prelude=(unit ifile)]
13242 ^- ?
10859 ^- ?
@@ -13251,40 +10868,33 @@
13251++ resolve-jibb-imports
10868++ resolve-jibb-imports
13252 |= [imports=(list import) externals=iexternals mark-externals=imark-externals modules=jbundle active=(list path) prelude-values=(list term) prelude-molds=(list term) cache=jcache prelude=(unit ifile)]
10869 |= [imports=(list import) externals=iexternals mark-externals=imark-externals modules=jbundle active=(list path) prelude-values=(list term) prelude-molds=(list term) cache=jcache prelude=(unit ifile)]
13253 ^- jimports-result
10870 ^- jimports-result
13254− =/ result=jimports-detailed-result
13255− (resolve-jibb-imports-detailed imports externals mark-externals modules active prelude-values prelude-molds cache prelude)
13256− ?: ?=(%| -.result) [%| message.p.result]
13257− [%& p.result]
13258−++ resolve-jibb-imports-detailed
13259− |= [imports=(list import) externals=iexternals mark-externals=imark-externals modules=jbundle active=(list path) prelude-values=(list term) prelude-molds=(list term) cache=jcache prelude=(unit ifile)]
13260− ^- jimports-detailed-result
13261 ?~ imports [%& [~ cache]]
10871 ?~ imports [%& [~ cache]]
13262 ?. ?=(%jibb -.i.imports) $(imports t.imports)
10872 ?. ?=(%jibb -.i.imports) $(imports t.imports)
13263 =/ at=path (weld path.i.imports `path`~[%jibb])
10873 =/ at=path (weld path.i.imports `path`~[%jibb])
13264 ?: =(at /lib/jibb/internal/jibb)
10874 ?: =(at /lib/jibb/internal/jibb)
13265− [%| ['the prelude internal module is private' ~]]
10875+ [%| 'the prelude internal module is private']
13266 ?: =(at /lib/jibb/primitives/jibb)
10876 ?: =(at /lib/jibb/primitives/jibb)
13267− [%| ['the prelude primitive interface is private' ~]]
10877+ [%| 'the prelude primitive interface is private']
13268 ?: (lien active |=(p=path =(p at)))
10878 ?: (lien active |=(p=path =(p at)))
13269− [%| [(crip "import cycle at {(spud at)}") ~]]
10879+ [%| (crip "import cycle at {(spud at)}")]
13270 =/ found=jbundle (skim modules |=(m=jsource =(at at.m)))
10880 =/ found=jbundle (skim modules |=(m=jsource =(at at.m)))
13271− ?~ found [%| [(crip "module source missing: {(spud at)}") ~]]
10881+ ?~ found [%| (crip "module source missing: {(spud at)}")]
13272− ?^ t.found [%| [(crip "duplicate module sources: {(spud at)}") ~]]
10882+ ?^ t.found [%| (crip "duplicate module sources: {(spud at)}")]
13273 =/ cached=(unit ifile) (find-jibb-cache at cache)
10883 =/ cached=(unit ifile) (find-jibb-cache at cache)
13274− =/ iface=jfile-detailed-result
10884+ =/ iface=jfile-result
13275 ?^ cached
10885 ?^ cached
13276− ?. =(at.u.cached at) [%| ['cached module identity needs unsupported inference' ~]]
10886+ ?. =(at.u.cached at) [%| 'cached module identity needs unsupported inference']
13277 ?~ graph.u.cached
10887 ?~ graph.u.cached
13278 :: A detached legacy interface has unknown evidence. Rebuild it
10888 :: A detached legacy interface has unknown evidence. Rebuild it
13279 :: against the current graph, without retaining any stale entry.
10889 :: against the current graph, without retaining any stale entry.
13280 =/ clean=jcache (skim cache |=(x=[at=path iface=ifile] !=(at.x at)))
10890 =/ clean=jcache (skim cache |=(x=[at=path iface=ifile] !=(at.x at)))
13281− (infer-jibb-file-detailed at source.i.found externals mark-externals modules [at active] prelude-values prelude-molds clean prelude)
10891+ (infer-jibb-file at source.i.found externals mark-externals modules [at active] prelude-values prelude-molds clean prelude)
13282 ?. (request-graph-reusable u.cached source.i.found externals mark-externals modules active prelude-values prelude-molds prelude)
10892 ?. (request-graph-reusable u.cached source.i.found externals mark-externals modules active prelude-values prelude-molds prelude)
13283− [%| ['cached module evidence needs unsupported inference' ~]]
10893+ [%| 'cached module evidence needs unsupported inference']
13284 [%& [u.cached cache]]
10894 [%& [u.cached cache]]
13285− (infer-jibb-file-detailed at source.i.found externals mark-externals modules [at active] prelude-values prelude-molds cache prelude)
10895+ (infer-jibb-file at source.i.found externals mark-externals modules [at active] prelude-values prelude-molds cache prelude)
13286 ?: ?=(%| -.iface) [%| p.iface]
10896 ?: ?=(%| -.iface) [%| p.iface]
13287− =/ rest=jimports-detailed-result $(imports t.imports, cache cache.p.iface)
10897+ =/ rest=jimports-result $(imports t.imports, cache cache.p.iface)
13288 ?: ?=(%| -.rest) rest
10898 ?: ?=(%| -.rest) rest
13289 [%& [[[face.i.imports iface.p.iface] resolved.p.rest] cache.p.rest]]
10899 [%& [[[face.i.imports iface.p.iface] resolved.p.rest] cache.p.rest]]
13290::
10900::
@@ -13418,70 +11028,31 @@
13418 ^- ?
11028 ^- ?
13419 =/ path-names=(list term) (turn paths |=(p=iapi-path name.p))
11029 =/ path-names=(list term) (turn paths |=(p=iapi-path name.p))
13420 =/ derived=(list term) (weld path-names poke-names)
11030 =/ derived=(list term) (weld path-names poke-names)
13421− ?: (lien derived reserved-name) |
11031+ ?: (lien derived |=(n=term =(n %proj))) |
13422 =/ outer=(list term) (weld prelude-values (weld (global-value-names defs.mod) (api-import-faces imports.mod)))
11032 =/ outer=(list term) (weld prelude-values (weld (global-value-names defs.mod) (api-import-faces imports.mod)))
13423 (levy derived |=(n=term &((unique-value-name n derived) !(lien outer |=(x=term =(n x))))))
11033 (levy derived |=(n=term &((unique-value-name n derived) !(lien outer |=(x=term =(n x))))))
13424::
11034::
13425−:: The definite error behind some failures of the check above. An API
13426−:: exports `poke` when it declares `+$ poke`, and a request per case of a
13427−:: `+$ paths` that reads as path cases; these names surely exist, so a clash
13428−:: among them or with the module's scope is an error (grammar, Modules). A
13429−:: reserved `proj` stays unsupported, as in the check above.
13430−++ api-derived-clash
13431− |= [mod=module prelude-values=(list term)]
13432− ^- (unit idiag)
13433− =/ declared=(list term) (collect-mark-imports imports.mod)
13434− =/ declarations=(list def)
13435− (skim defs.mod |=(d=def &(?=(%mold -.d) =(%paths name.d))))
13436− =/ cases=(list [name=term at=span note=tape])
13437− ?. ?=([* ~] declarations) ~
13438− =/ decl=def i.declarations
13439− ?> ?=(%mold -.decl)
13440− =/ paths=(unit (list iapi-path)) (api-path-declaration shape.decl declared)
13441− ?~ paths ~
13442− (turn u.paths |=(p=iapi-path [name.p at.p "`{(trip name.p)}` is derived from this path case"]))
13443− =/ pokes=(list def)
13444− (skim defs.mod |=(d=def &(?=(%mold -.d) =(%poke name.d))))
13445− =/ derived=(list [name=term at=span note=tape])
13446− ?. ?=([* ~] pokes) cases
13447− (snoc cases [%poke at.i.pokes "`poke` is derived from this mold"])
13448− =/ names=(list term) (turn derived |=(x=[name=term at=span note=tape] name.x))
13449− =/ outer=(list term) (weld prelude-values (weld (global-value-names defs.mod) (api-import-faces imports.mod)))
13450− =/ clashes=(list term)
13451− %+ skip names
13452− |= n=term
13453− ?| (reserved-name n)
13454− &((unique-value-name n names) !(lien outer |=(x=term =(n x))))
13455− ==
13456− ?~ clashes ~
13457− =/ sites=(list [at=span note=tape])
13458− %+ murn derived
13459− |= x=[name=term at=span note=tape]
13460− ?. =(i.clashes name.x) ~
13461− `[at.x note.x]
13462− `(derived-name-clash "API" i.clashes sites mod)
13463−::
13464:: Analysis only. Successful external entries must be unchanged results
11035:: Analysis only. Successful external entries must be unchanged results
13465:: produced for the declared marks; no request interface is produced.
11036:: produced for the declared marks; no request interface is produced.
13466+$ iapi-mark-type [name=term typ=itype]
11037+$ iapi-mark-type [name=term typ=itype]
13467+$ iapi-path-typed [path=iapi-path full=itype diffs=(list iapi-mark-type)]
11038+$ iapi-path-typed [path=iapi-path full=itype diffs=(list iapi-mark-type)]
13468++ api-diff-types
11039++ api-diff-types
13469− |= [names=(list term) externals=imark-externals declared=(list term) prelude=ifile]
11040+ |= [names=(list term) externals=imark-externals declared=(list term)]
13470 ^- (unit (list iapi-mark-type))
11041 ^- (unit (list iapi-mark-type))
13471 ?~ names `~
11042 ?~ names `~
13472− =/ typ=(unit itype) (find-imported-mark-prelude i.names externals declared prelude)
11043+ =/ typ=(unit itype) (find-imported-mark i.names externals declared)
13473 ?~ typ ~
11044 ?~ typ ~
13474 =/ tail=(unit (list iapi-mark-type)) $(names t.names)
11045 =/ tail=(unit (list iapi-mark-type)) $(names t.names)
13475 ?~ tail ~
11046 ?~ tail ~
13476 `[[i.names u.typ] u.tail]
11047 `[[i.names u.typ] u.tail]
13477::
11048::
13478++ api-path-types
11049++ api-path-types
13479− |= [paths=(list iapi-path) externals=imark-externals declared=(list term) prelude=ifile]
11050+ |= [paths=(list iapi-path) externals=imark-externals declared=(list term)]
13480 ^- (unit (list iapi-path-typed))
11051 ^- (unit (list iapi-path-typed))
13481 ?~ paths `~
11052 ?~ paths `~
13482− =/ full=(unit itype) (find-imported-mark-prelude full.i.paths externals declared prelude)
11053+ =/ full=(unit itype) (find-imported-mark full.i.paths externals declared)
13483 ?~ full ~
11054 ?~ full ~
13484− =/ diffs=(unit (list iapi-mark-type)) (api-diff-types diffs.i.paths externals declared prelude)
11055+ =/ diffs=(unit (list iapi-mark-type)) (api-diff-types diffs.i.paths externals declared)
13485 ?~ diffs ~
11056 ?~ diffs ~
13486 =/ tail=(unit (list iapi-path-typed)) $(paths t.paths)
11057 =/ tail=(unit (list iapi-path-typed)) $(paths t.paths)
13487 ?~ tail ~
11058 ?~ tail ~
@@ -13501,7 +11072,7 @@
13501 `~[u.name]
11072 `~[u.name]
13502::
11073::
13503++ api-path-analysis
11074++ api-path-analysis
13504− |= [mod=module externals=imark-externals prelude-values=(list term) prelude-molds=(list term) prelude=ifile]
11075+ |= [mod=module externals=imark-externals prelude-values=(list term) prelude-molds=(list term)]
13505 ^- (unit (list iapi-path-typed))
11076 ^- (unit (list iapi-path-typed))
13506 ?: (lien defs.mod def-has-hole) ~
11077 ?: (lien defs.mod def-has-hole) ~
13507 ?^ (duplicate-defs defs.mod) ~
11078 ?^ (duplicate-defs defs.mod) ~
@@ -13522,9 +11093,8 @@
13522 ?> ?=(%mold -.decl)
11093 ?> ?=(%mold -.decl)
13523 =/ paths=(unit (list iapi-path)) (api-path-declaration shape.decl declared)
11094 =/ paths=(unit (list iapi-path)) (api-path-declaration shape.decl declared)
13524 ?~ paths ~
11095 ?~ paths ~
13525− =/ derived-pokes=(list term) ?~(pokes ~ ~[%poke])
11096+ ?. (api-derived-names-valid u.paths u.poke-names mod prelude-values) ~
13526− ?. (api-derived-names-valid u.paths derived-pokes mod prelude-values) ~
11097+ (api-path-types u.paths externals declared)
13527− (api-path-types u.paths externals declared prelude)
13528::
11098::
13529:: Source/graph entry for path analysis only. The returned paths retain
11099:: Source/graph entry for path analysis only. The returned paths retain
13530:: reader-derived mark types and import resolution has checked reachable
11100:: reader-derived mark types and import resolution has checked reachable
@@ -13538,16 +11108,12 @@
13538 =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
11108 =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
13539 ?^ duplicate [%| (show-duplicate-fields file src u.duplicate)]
11109 ?^ duplicate [%| (show-duplicate-fields file src u.duplicate)]
13540 ?~ prepared [%| 'API path analysis needs the prepared prelude']
11110 ?~ prepared [%| 'API path analysis needs the prepared prelude']
13541− =/ public=ifile iface.u.prepared
13542− :: The analysis below would call a derived-name clash unsupported.
13543− =/ clash=(unit idiag) (api-derived-clash p.parsed values.u.prepared)
13544− ?^ clash [%| (show-duplicate-fields file src u.clash)]
13545 =/ prelude=(unit ifile) `iface.u.prepared
11111 =/ prelude=(unit ifile) `iface.u.prepared
13546 =/ deps=jimports-result
11112 =/ deps=jimports-result
13547 (resolve-jibb-imports imports.p.parsed externals marks modules ~[file] values.u.prepared molds.u.prepared ~ prelude)
11113 (resolve-jibb-imports imports.p.parsed externals marks modules ~[file] values.u.prepared molds.u.prepared ~ prelude)
13548 ?: ?=(%| -.deps) [%| p.deps]
11114 ?: ?=(%| -.deps) [%| p.deps]
13549 =/ paths=(unit (list iapi-path-typed))
11115 =/ paths=(unit (list iapi-path-typed))
13550− (api-path-analysis p.parsed marks values.u.prepared molds.u.prepared public)
11116+ (api-path-analysis p.parsed marks values.u.prepared molds.u.prepared)
13551 ?~ paths [%| 'API path declaration needs unsupported analysis']
11117 ?~ paths [%| 'API path declaration needs unsupported analysis']
13552 [%& u.paths]
11118 [%& u.paths]
13553::
11119::
@@ -13567,15 +11133,12 @@
13567 =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
11133 =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
13568 ?^ duplicate [%| (show-duplicate-fields file src u.duplicate)]
11134 ?^ duplicate [%| (show-duplicate-fields file src u.duplicate)]
13569 ?~ prepared [%| 'API path evidence needs the prepared prelude']
11135 ?~ prepared [%| 'API path evidence needs the prepared prelude']
13570− :: The analysis below would call a derived-name clash unsupported.
13571− =/ clash=(unit idiag) (api-derived-clash p.parsed values.u.prepared)
13572− ?^ clash [%| (show-duplicate-fields file src u.clash)]
13573 =/ public=ifile iface.u.prepared
11136 =/ public=ifile iface.u.prepared
13574 =/ deps=jimports-result
11137 =/ deps=jimports-result
13575 (resolve-jibb-imports imports.p.parsed externals marks modules ~[file] values.u.prepared molds.u.prepared ~ `public)
11138 (resolve-jibb-imports imports.p.parsed externals marks modules ~[file] values.u.prepared molds.u.prepared ~ `public)
13576 ?: ?=(%| -.deps) [%| p.deps]
11139 ?: ?=(%| -.deps) [%| p.deps]
13577 =/ paths=(unit (list iapi-path-typed))
11140 =/ paths=(unit (list iapi-path-typed))
13578− (api-path-analysis p.parsed marks values.u.prepared molds.u.prepared public)
11141+ (api-path-analysis p.parsed marks values.u.prepared molds.u.prepared)
13579 ?~ paths [%| 'API path declaration needs unsupported analysis']
11142 ?~ paths [%| 'API path declaration needs unsupported analysis']
13580 [%& [file src u.prepared externals marks cache.p.deps u.paths]]
11143 [%& [file src u.prepared externals marks cache.p.deps u.paths]]
13581:: Graph-aware variant preserves the caller active stack and cache.
11144:: Graph-aware variant preserves the caller active stack and cache.
@@ -13591,15 +11154,12 @@
13591 =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
11154 =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
13592 ?^ duplicate [%| (show-duplicate-fields file src u.duplicate)]
11155 ?^ duplicate [%| (show-duplicate-fields file src u.duplicate)]
13593 ?~ prepared [%| 'API path evidence needs the prepared prelude']
11156 ?~ prepared [%| 'API path evidence needs the prepared prelude']
13594− :: The analysis below would call a derived-name clash unsupported.
13595− =/ clash=(unit idiag) (api-derived-clash p.parsed values.u.prepared)
13596− ?^ clash [%| (show-duplicate-fields file src u.clash)]
13597 =/ public=ifile iface.u.prepared
11157 =/ public=ifile iface.u.prepared
13598 =/ deps=jimports-result
11158 =/ deps=jimports-result
13599 (resolve-jibb-imports imports.p.parsed externals marks modules active values.u.prepared molds.u.prepared cache `public)
11159 (resolve-jibb-imports imports.p.parsed externals marks modules active values.u.prepared molds.u.prepared cache `public)
13600 ?: ?=(%| -.deps) [%| p.deps]
11160 ?: ?=(%| -.deps) [%| p.deps]
13601 =/ paths=(unit (list iapi-path-typed))
11161 =/ paths=(unit (list iapi-path-typed))
13602− (api-path-analysis p.parsed marks values.u.prepared molds.u.prepared public)
11162+ (api-path-analysis p.parsed marks values.u.prepared molds.u.prepared)
13603 ?~ paths [%| 'API path declaration needs unsupported analysis']
11163 ?~ paths [%| 'API path declaration needs unsupported analysis']
13604 [%& [file src u.prepared externals marks cache.p.deps u.paths]]
11164 [%& [file src u.prepared externals marks cache.p.deps u.paths]]
13605::
11165::
@@ -13686,7 +11246,7 @@
13686 =/ vals=(list term) (global-value-names ordinary)
11246 =/ vals=(list term) (global-value-names ordinary)
13687 ?: (lien vals |=(n=term =(n %main))) [%| 'API module kind needs unsupported inference']
11247 ?: (lien vals |=(n=term =(n %main))) [%| 'API module kind needs unsupported inference']
13688 =/ declared=(list term) (collect-mark-imports imports.mod)
11248 =/ declared=(list term) (collect-mark-imports imports.mod)
13689− =/ mark-types=(unit (list iapi-mark-type)) (api-diff-types declared marks declared iface.prep)
11249+ =/ mark-types=(unit (list iapi-mark-type)) (api-diff-types declared marks declared)
13690 ?~ mark-types [%| 'API declared marks need unsupported inference']
11250 ?~ mark-types [%| 'API declared marks need unsupported inference']
13691 =/ prelude=(unit ifile) `iface.prep
11251 =/ prelude=(unit ifile) `iface.prep
13692 =/ deps=jimports-result
11252 =/ deps=jimports-result
@@ -13697,7 +11257,7 @@
13697 =/ surs=(list term) (collect-sur-imports imports.mod)
11257 =/ surs=(list term) (collect-sur-imports imports.mod)
13698 =/ reserved=(list term) (weld molds.prep (turn resolved.p.deps |=(j=[face=term interface=ifile] face.j)))
11258 =/ reserved=(list term) (weld molds.prep (turn resolved.p.deps |=(j=[face=term interface=ifile] face.j)))
13699 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
11259 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
13700− =/ state=istate [0 ~ ~ ~ molds globals externals surs marks declared resolved.p.deps reserved ~ ~ ~ | file top prelude ~ 256 ~ ~ ~ ~ ~ ~]
11260+ =/ state=istate [0 ~ ~ ~ molds globals externals surs marks declared resolved.p.deps reserved ~ ~ ~ | file top prelude ~ 256 ~ ~ ~]
13701 =/ mts=(each imold-types @t) (module-mold-types molds state)
11261 =/ mts=(each imold-types @t) (module-mold-types molds state)
13702 ?: ?=(%| -.mts) [%| p.mts]
11262 ?: ?=(%| -.mts) [%| p.mts]
13703 =/ resolution=iresolved (resolve-groups ordinary molds globals externals surs marks declared resolved.p.deps reserved file prelude)
11263 =/ resolution=iresolved (resolve-groups ordinary molds globals externals surs marks declared resolved.p.deps reserved file prelude)
@@ -13720,7 +11280,7 @@
13720 =/ vals=(list term) (global-value-names ordinary)
11280 =/ vals=(list term) (global-value-names ordinary)
13721 ?: (lien vals |=(n=term =(n %main))) [%| 'API module kind needs unsupported inference']
11281 ?: (lien vals |=(n=term =(n %main))) [%| 'API module kind needs unsupported inference']
13722 =/ declared=(list term) (collect-mark-imports imports.mod)
11282 =/ declared=(list term) (collect-mark-imports imports.mod)
13723− =/ mark-types=(unit (list iapi-mark-type)) (api-diff-types declared marks declared iface.prep)
11283+ =/ mark-types=(unit (list iapi-mark-type)) (api-diff-types declared marks declared)
13724 ?~ mark-types [%| 'API declared marks need unsupported inference']
11284 ?~ mark-types [%| 'API declared marks need unsupported inference']
13725 =/ prelude=(unit ifile) `iface.prep
11285 =/ prelude=(unit ifile) `iface.prep
13726 =/ deps=jimports-result
11286 =/ deps=jimports-result
@@ -13731,7 +11291,7 @@
13731 =/ surs=(list term) (collect-sur-imports imports.mod)
11291 =/ surs=(list term) (collect-sur-imports imports.mod)
13732 =/ reserved=(list term) (weld molds.prep (turn resolved.p.deps |=(j=[face=term interface=ifile] face.j)))
11292 =/ reserved=(list term) (weld molds.prep (turn resolved.p.deps |=(j=[face=term interface=ifile] face.j)))
13733 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
11293 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
13734− =/ state=istate [0 ~ ~ ~ molds globals externals surs marks declared resolved.p.deps reserved ~ ~ ~ | file top prelude ~ 256 ~ ~ ~ ~ ~ ~]
11294+ =/ state=istate [0 ~ ~ ~ molds globals externals surs marks declared resolved.p.deps reserved ~ ~ ~ | file top prelude ~ 256 ~ ~ ~]
13735 =/ mts=(each imold-types @t) (module-mold-types molds state)
11295 =/ mts=(each imold-types @t) (module-mold-types molds state)
13736 ?: ?=(%| -.mts) [%| p.mts]
11296 ?: ?=(%| -.mts) [%| p.mts]
13737 =/ resolution=iresolved (resolve-groups ordinary molds globals externals surs marks declared resolved.p.deps reserved file prelude)
11297 =/ resolution=iresolved (resolve-groups ordinary molds globals externals surs marks declared resolved.p.deps reserved file prelude)
@@ -13744,29 +11304,6 @@
13744:: Value watchability remains unproved even for a watchable declaration.
11304:: Value watchability remains unproved even for a watchable declaration.
13745+$ ione-request-interface
11305+$ ione-request-interface
13746 [support=iapi-support-evidence parts=iapi-request-parts iface=ifile]
11306 [support=iapi-support-evidence parts=iapi-request-parts iface=ifile]
13747−++ compatible-raw-poke
13748− |= prelude=iprelude
13749− ^- (unit ischeme)
13750− =/ public=ifile iface.prelude
13751− ?. =(at.public /lib/jibb/prelude/jibb) ~
13752− =/ poke=(unit ischeme) (find-jibb-mold %raw-poke public)
13753− ?~ poke ~
13754− ?^ vars.u.poke ~
13755− ?. ?=(%union -.typ.u.poke) ~
13756− ?^ args.typ.u.poke ~
13757− ?. =(origin.typ.u.poke `[/lib/jibb/internal/jibb %raw-poke]) ~
13758− ?: (itype-has-tag typ.u.poke) ~
13759− =/ private=(list iwidth-dependency)
13760− (skim dependencies.public |=(d=iwidth-dependency =(at.d /lib/jibb/internal/jibb)))
13761− ?. ?=([* ~] private) ~
13762− ?~ source.i.private ~
13763− =/ agent-case=itype
13764− [%cell [%const [%term %tas %agent '%agent']] [%cell [%face %agent [%atom %tas]] [%cell [%face %mark [%atom %tas]] [%face %payload [%noun ~]]]]]
13765− =/ store-case=itype
13766− [%cell [%const [%term %tas %store '%store']] [%cell [%face %module [%atom %t]] [%cell [%face %action [%atom %tas]] [%face %payload [%noun ~]]]]]
13767− ?. =(cases.typ.u.poke ~[agent-case store-case]) ~
13768− poke
13769−::
13770++ request-compatible-ask
11307++ request-compatible-ask
13771 |= prelude=iprelude
11308 |= prelude=iprelude
13772 ^- (unit ischeme)
11309 ^- (unit ischeme)
@@ -13863,7 +11400,7 @@
13863 ?~ source.i.private [%| 'request internal source needs unsupported inference']
11400 ?~ source.i.private [%| 'request internal source needs unsupported inference']
13864 =/ req=irequest-evidence
11401 =/ req=irequest-evidence
13865 [file name.path.p p src u.source.public u.source.i.private values.prelude molds.prelude externals marks]
11402 [file name.path.p p src u.source.public u.source.i.private values.prelude molds.prelude externals marks]
13866− =/ interface=ifile [~[[name.path.p scheme]] exports file ~ ~ ~ `src `[(silt `(list path)`~[file]) ~[req] ~ modules `public values.prelude molds.prelude externals marks]]
11403+ =/ interface=ifile [~[[name.path.p scheme]] exports file ~ ~ ~ `src `[(silt `(list path)`~[file]) ~[req] modules `public values.prelude molds.prelude externals marks]]
13867 [%& [support u.parts interface]]
11404 [%& [support u.parts interface]]
13868:: Graph-aware request artifact; resolver use remains type-only.
11405:: Graph-aware request artifact; resolver use remains type-only.
13869++ one-request-interface-graph
11406++ one-request-interface-graph
@@ -13917,14 +11454,14 @@
13917 ?~ source.i.private [%| 'request internal source needs unsupported inference']
11454 ?~ source.i.private [%| 'request internal source needs unsupported inference']
13918 =/ req=irequest-evidence
11455 =/ req=irequest-evidence
13919 [file name.path.p p src u.source.public u.source.i.private values.prelude molds.prelude externals marks]
11456 [file name.path.p p src u.source.public u.source.i.private values.prelude molds.prelude externals marks]
13920− =/ interface=ifile [~[[name.path.p scheme]] exports file ~ ~ ~ `src `[(silt `(list path)`~[file]) ~[req] ~ modules `public values.prelude molds.prelude externals marks]]
11457+ =/ interface=ifile [~[[name.path.p scheme]] exports file ~ ~ ~ `src `[(silt `(list path)`~[file]) ~[req] modules `public values.prelude molds.prelude externals marks]]
13921 [%& [support u.parts interface]]
11458 [%& [support u.parts interface]]
13922::
11459::
13923++ api-mark-exports
11460++ api-mark-exports
13924− |= [marks=(list term) all=(list term) externals=imark-externals prelude=ifile]
11461+ |= [marks=(list term) all=(list term) externals=imark-externals]
13925 ^- imold-types
11462 ^- imold-types
13926 ?~ marks ~
11463 ?~ marks ~
13927− =/ t=(unit itype) (find-imported-mark-prelude i.marks externals all prelude)
11464+ =/ t=(unit itype) (find-imported-mark i.marks externals all)
13928 ?~ t $(marks t.marks)
11465 ?~ t $(marks t.marks)
13929 [[i.marks [u.t ~]] $(marks t.marks)]
11466 [[i.marks [u.t ~]] $(marks t.marks)]
13930::
11467::
@@ -13933,54 +11470,37 @@
13933++ api-poke-interface
11470++ api-poke-interface
13934 |= [at=path mod=module mark-externals=imark-externals prelude-values=(list term) prelude-molds=(list term) prelude=(unit ifile)]
11471 |= [at=path mod=module mark-externals=imark-externals prelude-values=(list term) prelude-molds=(list term) prelude=(unit ifile)]
13935 ^- (unit ifile)
11472 ^- (unit ifile)
13936− =/ out=(each ifile @t)
11473+ ?: (lien defs.mod def-has-hole) ~
13937− (api-poke-interface-result at mod mark-externals prelude-values prelude-molds prelude)
11474+ ?. ?=([%ui %api @ %jibb ~] at) ~
13938− ?:(?=(%& -.out) `p.out ~)
11475+ ?^ (duplicate-defs defs.mod) ~
13939−::
11476+ ?~ prelude ~
13940−:: The same check, naming the part that stopped it. Each reason says which
11477+ ?. =(at.u.prelude /lib/jibb/prelude/jibb) ~
13941−:: part is outside this fragment and claims no error in the module, except
11478+ =/ poke=(unit ischeme) (find-jibb-mold %poke u.prelude)
13942−:: duplicate definitions, an error the full check reports first, as for
11479+ ?~ poke ~
13943−:: other modules.
11480+ ?. ?=(%union -.typ.u.poke) ~
13944−++ api-poke-interface-result
11481+ ?^ vars.u.poke ~
13945− |= [at=path mod=module mark-externals=imark-externals prelude-values=(list term) prelude-molds=(list term) prelude=(unit ifile)]
13946− ^- (each ifile @t)
13947− ?: (lien defs.mod def-has-hole) [%| 'API holes need unsupported inference']
13948− ?. ?=([%ui %api @ %jibb ~] at) [%| 'API path evidence requires /ui/api/<agent>.jibb']
13949− ?^ (duplicate-defs defs.mod) [%| 'API has duplicate definitions']
13950− ?~ prelude [%| 'API poke prelude needs unsupported inference']
13951− ?. =(at.u.prelude /lib/jibb/prelude/jibb) [%| 'API poke prelude needs unsupported inference']
13952− =/ poke=(unit ischeme) (find-jibb-mold %raw-poke u.prelude)
13953− ?~ poke [%| 'API poke prelude needs unsupported inference']
13954− ?. ?=(%union -.typ.u.poke) [%| 'API poke prelude needs unsupported inference']
13955− ?^ vars.u.poke [%| 'API poke prelude needs unsupported inference']
13956 =/ compatible=?
11482 =/ compatible=?
13957 %+ lien cases.typ.u.poke
11483 %+ lien cases.typ.u.poke
13958 |= c=itype
11484 |= c=itype
13959 ?=([%cell [%const [%term %tas %agent *]] [%cell [%face %agent [%atom %tas]] [%cell [%face %mark [%atom %tas]] [%face %payload [%noun ~]]]]] c)
11485 ?=([%cell [%const [%term %tas %agent *]] [%cell [%face %agent [%atom %tas]] [%cell [%face %mark [%atom %tas]] [%face %payload [%noun ~]]]]] c)
13960− ?. compatible [%| 'API poke prelude needs unsupported inference']
11486+ ?. compatible ~
13961− :: Definitions come before imports so that a module with more than a
11487+ ?. (module-scope-valid mod(defs ~) prelude-values prelude-molds) ~
13962− :: `+$ poke` is not described by its imports.
11488+ ?. (levy imports.mod |=(i=import ?=(%mark -.i))) ~
13963− =/ ds=(list def) defs.mod
13964− ?. ?=([[%mold *] ~] ds) [%| 'poke-only API definitions need unsupported inference']
13965− ?. =(%poke name.i.ds) [%| 'poke-only API definitions need unsupported inference']
13966− ?. (module-scope-valid mod(defs ~) prelude-values prelude-molds) [%| 'API import scope needs unsupported inference']
13967− ?. (levy imports.mod |=(i=import ?=(%mark -.i))) [%| 'poke-only API imports need unsupported inference']
13968 =/ marks=(list term) (collect-mark-imports imports.mod)
11489 =/ marks=(list term) (collect-mark-imports imports.mod)
13969− ?. ?=([@ ~] marks) [%| 'poke-only API mark imports need unsupported inference']
11490+ ?. ?=([@ ~] marks) ~
11491+ =/ ds=(list def) defs.mod
11492+ ?. ?=([[%mold *] ~] ds) ~
11493+ ?. =(%poke name.i.ds) ~
13970 =/ sh=shape shape.i.ds
11494 =/ sh=shape shape.i.ds
13971− ?. ?=([%ref *] sh) [%| 'API poke mold needs unsupported inference']
11495+ ?. ?=([%ref *] sh) ~
13972− ?. ?=([@ ~] names.sh) [%| 'API poke mold needs unsupported inference']
11496+ ?. ?=([@ ~] names.sh) ~
13973 =/ n=term i.names.sh
11497 =/ n=term i.names.sh
13974− ?. (unique-value-name n marks) [%| 'API poke mold needs unsupported inference']
11498+ ?. (unique-value-name n marks) ~
13975− ?: |((lien prelude-values |=(x=term =(n x))) (lien prelude-molds |=(x=term =(n x)))) [%| 'API poke mold needs unsupported inference']
11499+ ?: |((lien prelude-values |=(x=term =(n x))) (lien prelude-molds |=(x=term =(n x)))) ~
13976− =/ results=@ud (lent (skim mark-externals |=(e=[mark=term result=*] =(n mark.e))))
11500+ =/ mark=(unit itype) (find-imported-mark n mark-externals marks)
13977− ?: =(0 results) [%| (crip "API poke mark %{(trip n)} has no reader result")]
11501+ ?~ mark ~
13978− ?. =(1 results) [%| (crip "API poke mark %{(trip n)} has duplicate reader results")]
11502+ =/ sc=ischeme [[%fn u.mark typ.u.poke] ~]
13979− =/ mark=(unit itype) (find-imported-mark-prelude n mark-externals marks u.prelude)
11503+ `[~[[n sc]] (api-mark-exports marks marks mark-externals) at ~[[n i.t.t.at n]] ~ ~ ~ ~]
13980− ?~ mark [%| 'API poke mark reader result needs unsupported inference']
13981− =/ sc=(unit ischeme) (derived-poke-command-scheme u.prelude u.mark)
13982− ?~ sc [%| 'API poke command needs unsupported inference']
13983− [%& [~[[%poke u.sc]] (api-mark-exports marks marks mark-externals u.prelude) at ~[[n i.t.t.at n]] ~ ~ ~ ~]]
13984::
11504::
13985:: Source-proven ordinary helpers validate each selected /sur dependency.
11505:: Source-proven ordinary helpers validate each selected /sur dependency.
13986:: Unused or less direct cores remain unsupported by this first interface.
11506:: Unused or less direct cores remain unsupported by this first interface.
@@ -14103,1579 +11623,26 @@
14103 [%| 'API exported molds need unsupported inference']
11623 [%| 'API exported molds need unsupported inference']
14104 =/ env=ienv (weld values.u.gates (weld values.u.poke values.support))
11624 =/ env=ienv (weld values.u.gates (weld values.u.poke values.support))
14105 =/ graph=irequest-graph
11625 =/ graph=irequest-graph
14106− [(silt `(list path)`~[file]) requests.u.gates ~ modules `public values.prep molds.prep externals marks]
11626+ [(silt `(list path)`~[file]) requests.u.gates modules `public values.prep molds.prep externals marks]
14107 =/ iface=ifile
11627 =/ iface=ifile
14108 [env exports file derived.u.poke elaborations.support ~ `src `graph]
11628 [env exports file derived.u.poke elaborations.support ~ `src `graph]
14109 [%& [iface dependencies.ev]]
11629 [%& [iface dependencies.ev]]
14110::
11630::
14111−:: A checked program main is only the direct four-component source call.
14112−:: Grouping is transparent, but aliases, qualified wings and other module
14113−:: kinds remain outside this slice.
14114−++ program-main-def
14115− |= ds=(list def)
14116− ^- (unit def)
14117− ?~ ds ~
14118− ?: &(?=(%value -.i.ds) =(%main name.i.ds)) `i.ds
14119− $(ds t.ds)
14120−::
14121−++ program-main-wing
14122− |= e=expr
14123− ^- (unit term)
14124− ?: ?=(%group -.e) $(e inner.e)
14125− ?. ?=(%wing -.e) ~
14126− ?. ?=([@ ~] names.e) ~
14127− `i.names.e
14128−::
14129−++ program-main-args
14130− |= d=def
14131− ^- (unit (list expr))
14132− ?. ?=(%value -.d) ~
14133− |-
14134− ?: ?=(%group -.val.d) $(val.d inner.val.d)
14135− ?. ?=(%call -.val.d) ~
14136− =/ head=(unit term) (program-main-wing head.val.d)
14137− ?~ head ~
14138− ?. =(%program u.head) ~
14139− ?. ?=([* * * * ~] args.val.d) ~
14140− `args.val.d
14141−::
14142−++ program-main-parts
14143− |= d=def
14144− ^- (unit [init=term update=term view=term subs=term])
14145− ?. ?=(%value -.d) ~
14146− |-
14147− ?: ?=(%group -.val.d) $(val.d inner.val.d)
14148− ?. ?=(%call -.val.d) ~
14149− =/ head=(unit term) (program-main-wing head.val.d)
14150− ?~ head ~
14151− ?. =(%program u.head) ~
14152− ?. ?=([* * * * ~] args.val.d) ~
14153− =/ args=(list expr) args.val.d
14154− ?> ?=([* * * * ~] args)
14155− =/ init=(unit term) (program-main-wing i.args)
14156− =/ update=(unit term) (program-main-wing i.t.args)
14157− =/ view=(unit term) (program-main-wing i.t.t.args)
14158− =/ subs=(unit term) (program-main-wing i.t.t.t.args)
14159− ?~ init ~
14160− ?~ update ~
14161− ?~ view ~
14162− ?~ subs ~
14163− `[u.init u.update u.view u.subs]
14164−::
14165−:: A data page is only the direct two-component source call. Grouping is
14166−:: transparent, but page aliases, qualified wings and other kinds are not.
14167−++ page-main-parts
14168− |= d=def
14169− ^- (unit [load=term view=term])
14170− ?. ?=(%value -.d) ~
14171− |-
14172− ?: ?=(%group -.val.d) $(val.d inner.val.d)
14173− ?. ?=(%call -.val.d) ~
14174− =/ head=(unit term) (program-main-wing head.val.d)
14175− ?~ head ~
14176− ?. =(%page u.head) ~
14177− ?. ?=([* * ~] args.val.d) ~
14178− =/ args=(list expr) args.val.d
14179− ?> ?=([* * ~] args)
14180− =/ load=(unit term) (program-main-wing i.args)
14181− =/ view=(unit term) (program-main-wing i.t.args)
14182− ?~ load ~
14183− ?~ view ~
14184− `[u.load u.view]
14185−::
14186−:: A store main is only the direct two-wing source call. Its local poke mold
14187−:: is checked here and remains in ordinary mold/value inference.
14188−++ store-main-parts
14189− |= d=def
14190− ^- (unit [init=term update=term])
14191− ?. ?=(%value -.d) ~
14192− |-
14193− ?: ?=(%group -.val.d) $(val.d inner.val.d)
14194− ?. ?=(%call -.val.d) ~
14195− =/ head=(unit term) (program-main-wing head.val.d)
14196− ?~ head ~
14197− ?. =(%store u.head) ~
14198− ?. ?=([* * ~] args.val.d) ~
14199− =/ args=(list expr) args.val.d
14200− ?> ?=([* * ~] args)
14201− =/ init=(unit term) (program-main-wing i.args)
14202− =/ update=(unit term) (program-main-wing i.t.args)
14203− ?~ init ~
14204− ?~ update ~
14205− `[u.init u.update]
14206−::
14207−+$ istore-declaration [action=term defs=(list def)]
14208−:: A failure carries a diagnostic only when it is a definite error of the
14209−:: source; every other failure is unsupported and carries none.
14210−++ store-declaration
14211− |= [mod=module prelude-values=(list term) prelude-molds=(list term)]
14212− ^- (each istore-declaration (unit idiag))
14213− =/ ds=(list def) defs.mod
14214− =/ pokes=(list def)
14215− (skim ds |=(d=def &(?=(%mold -.d) =(%poke name.d))))
14216− ?. ?=([* ~] pokes) [%| ~]
14217− =/ states=(list def)
14218− (skim ds |=(d=def &(?=(%mold -.d) =(%state name.d))))
14219− ?. ?=([* ~] states) [%| ~]
14220− =/ poke=def i.pokes
14221− =/ state=def i.states
14222− ?> &(?=(%mold -.poke) ?=(%mold -.state))
14223− ?: ?=(%generic -.shape.state) [%| ~]
14224− ?: ?=(%generic -.shape.poke) [%| ~]
14225− =/ action=term %poke
14226− =/ ordinary=(list def) ds
14227− =/ derived=(list term) ~[%state action]
14228− ?: (lien derived reserved-name) [%| ~]
14229− =/ outer=(list term)
14230− (weld prelude-values (weld (global-value-names ordinary) (api-import-faces imports.mod)))
14231− =/ clashes=(list term)
14232− (skip derived |=(n=term &((unique-value-name n derived) !(lien outer |=(x=term =(n x))))))
14233− :: main's `store` is the prelude's builder when the prelude declares it and
14234− :: nothing local takes the name. Only then do the derived names surely
14235− :: exist, and then a clash is an error even where the scope also fails, as
14236− :: for an import face that clashes with both a derived name and its mold.
14237− =/ builder=?
14238− ?& (lien prelude-values |=(x=term =(x %store)))
14239− !(lien (global-value-names ds) |=(x=term =(x %store)))
14240− !(lien (import-binding-names imports.mod) |=(x=term =(x %store)))
14241− ==
14242− ?: &(?=(^ clashes) builder (lien outer |=(x=term =(x i.clashes))))
14243− =/ from=span ?:(=(%state i.clashes) at.state at.poke)
14244− =/ derived=[at=span note=tape] [from "`{(trip i.clashes)}` is derived from this mold"]
14245− [%| `(derived-name-clash "store" i.clashes ~[derived] mod)]
14246− ?. (module-scope-valid mod prelude-values prelude-molds) [%| ~]
14247− ?^ clashes [%| ~]
14248− [%& [action ordinary]]
14249−::
14250−:: A store or API exports names derived from its declarations, and a
14251−:: clashing derived name is an error (grammar, Modules). Show where the name
14252−:: is derived and the definition, import face or other derived name it
14253−:: clashes with; a prelude name has no site in the module.
14254−++ derived-name-clash
14255− |= [kind=tape n=term derived=(list [at=span note=tape]) mod=module]
14256− ^- idiag
14257− =/ values=(list span)
14258− (murn defs.mod |=(d=def ?.(&(?=(%value -.d) =(n name.d)) ~ `at.d)))
14259− =/ faces=(list span)
14260− %+ murn imports.mod
14261− |= i=import
14262− ?- -.i
14263− %mark ~
14264− %sur ?.(=(n name.i) ~ `at.i)
14265− %jibb ?.(=(n face.i) ~ `at.i)
14266− ==
14267− =/ head=tape "{kind} derived name `{(trip n)}` clashes with"
14268− ?^ values
14269− ["{head} a definition" (weld derived ~[[i.values "clashing definition"]])]
14270− ?^ faces
14271− ["{head} an import face" (weld derived ~[[i.faces "clashing import face"]])]
14272− ?: ?=([* * *] derived)
14273− ["{head} another derived name" derived]
14274− ["{head} a prelude name" derived]
14275−::
14276−++ program-empty-null
14277− |= e=expr
14278− ^- ?
14279− ?- -.e
14280− %lit =(%null form.lit.e)
14281− %cast $(e val.e)
14282− %group $(e inner.e)
14283− %body ?~(defs.e $(e final.e) |)
14284− * |
14285− ==
14286−::
14287−++ program-subs-empty
14288− |= d=def
14289− ^- ?
14290− ?. ?=(%value -.d) |
14291− ?- -.val.d
14292− %gate (program-empty-null body.val.d)
14293− %gate-wide (program-empty-null body.val.d)
14294− * |
14295− ==
14296−::
14297−++ program-transparent
14298− |= e=expr
14299− ^- expr
14300− ?- -.e
14301− %group $(e inner.e)
14302− %cast $(e val.e)
14303− %body ?~(defs.e $(e final.e) e)
14304− * e
14305− ==
14306−::
14307−:: Recover only the update of an already recognized direct program main.
14308−:: Its written sample determines the message/model relationship; the canonical
14309−:: cmd, unit and update slot determine the result context. Publication is
14310−:: component-local so later subscription/view/initializer retries can accumulate.
14311−++ program-update-context
14312− |= [main=def parts=[init=term update=term view=term subs=term] ds=(list def) resolution=iresolved initial=istate]
14313− ^- (unit iresolved)
14314− =/ env=ienv env.resolution
14315− ?^ (ienv-lookup %main env) ~
14316− ?^ (ienv-lookup update.parts env) ~
14317− =/ updates=(list def)
14318− (skim ds |=(d=def &(?=(%value -.d) =(update.parts name.d))))
14319− ?. ?=([* ~] updates) ~
14320− =/ update-def=def i.updates
14321− ?> ?=(%value -.update-def)
14322− =/ written-update=(unit sample) (direct-gate-sample update-def)
14323− ?~ written-update ~
14324− ?. ?=(%cell -.u.written-update) ~
14325− ?. ?=([* * ~] items.u.written-update) ~
14326− ?~ prelude.initial ~
14327− =/ program=(unit ischeme) (ienv-lookup %program values.u.prelude.initial)
14328− ?~ program ~
14329− =/ command=(unit ischeme) (find-jibb-mold %cmd u.prelude.initial)
14330− =/ list-template=(unit ischeme) (find-jibb-mold %list u.prelude.initial)
14331− ?~ command ~
14332− ?~ list-template ~
14333− =/ heads=(unit igate-prelude-evidence) (direct-prelude-evidence ds prelude.initial)
14334− ?~ heads ~
14335− =/ written=(unit def) (~(get by gates.u.heads) %program)
14336− ?~ written ~
14337− =/ written-sample=(unit sample) (direct-gate-sample u.written)
14338− ?~ written-sample ~
14339− ?. ?=(%cell -.u.written-sample) ~
14340− ?. ?=([* * * * ~] items.u.written-sample) ~
14341− =/ checked=(map term def)
14342− (~(put by (direct-checked-gates ds env)) update.parts update-def)
14343− =/ templates=ienv
14344− (turn molds.u.prelude.initial |=(x=[name=term template=ischeme] [name.x template.x]))
14345− =/ fresh=(unit @ud)
14346− (ienv-fresh-id (weld env (weld values.u.prelude.initial templates)))
14347− ?~ fresh ~
14348− =. next.initial u.fresh
14349− =/ update-state=istate (reserve-def-caps val.update-def initial)
14350− =/ sam=isample-result (infer-sample u.written-update env update-state)
14351− ?: ?=(%| -.sam) ~
14352− =/ actual-sample=itype (itype-normalize typ.p.sam sub.state.p.sam)
14353− ?. ?=(%cell -.actual-sample) ~
14354− =/ message=(unit itype)
14355− (direct-slot-body hed.actual-sample (direct-sample-name i.items.u.written-update))
14356− =/ model=(unit itype)
14357− (direct-slot-body tal.actual-sample (direct-sample-name i.t.items.u.written-update))
14358− ?~ message ~
14359− ?~ model ~
14360− =/ cmd=(unit itype) (template-apply u.command ~[u.message])
14361− ?~ cmd ~
14362− =/ command-result=(unit itype) (template-apply u.list-template ~[u.cmd])
14363− ?~ command-result ~
14364− =/ product=itype [%cell u.model u.command-result]
14365− =/ instance=[typ=itype state=istate] (instantiate-scheme u.program state.p.sam)
14366− ?. ?=(%fn -.typ.instance) ~
14367− ?. ?=(%cell -.sample.typ.instance) ~
14368− ?. ?=(%cell -.tal.sample.typ.instance) ~
14369− =/ expected-update=(unit itype)
14370− (direct-slot-body hed.tal.sample.typ.instance (direct-sample-name i.t.items.u.written-sample))
14371− ?~ expected-update ~
14372− ?. ?=(%fn -.u.expected-update) ~
14373− :: Sample binders are not value faces. Strip only those two slot faces
14374− :: for the invariant canonical-gate proof; the source-faced gate is still
14375− :: used by the complete positional call and final ordinary result cast.
14376− =/ canonical-candidate=itype [%fn [%cell u.message u.model] product]
14377− =/ gate-fit=ifit
14378− (direct-invariant canonical-candidate u.expected-update sub.state.instance next.state.instance)
14379− ?. ?=(%ok -.gate-fit) ~
14380− =/ closed=itype
14381− (itype-normalize [%fn typ.p.sam product] sub.gate-fit)
14382− ?. ?=(%fn -.closed) ~
14383− :: The closed product no longer needs the canonical slot substitutions.
14384− :: Start the body at its ordinary sample state so existing branch retries
14385− :: keep their substitution guards, but retain the shared fresh-ID high water.
14386− =/ st=istate state.p.sam(next next.gate-fit, gate-defs checked, head-evidence heads)
14387− =/ body=expr
14388− ?- -.val.update-def
14389− %gate body.val.update-def
14390− %gate-wide body.val.update-def
14391− * !!
14392− ==
14393− =/ inferred=iresult
14394− (infer-call-context-arg body product.closed env.p.sam st (span-of body))
14395− ?: ?=(%| -.inferred) ~
14396− =/ product-fit=ifit
14397− (itype-fit typ.p.inferred product.closed sub.state.p.inferred next.state.p.inferred)
14398− ?. ?=(%ok -.product-fit) ~
14399− =/ merged-product=itype
14400− (itype-merge-faces typ.p.inferred product.closed sub.product-fit)
14401− =/ actual-cast=itype [%fn typ.p.sam merged-product]
14402− =/ cast=ifit
14403− (itype-fit actual-cast closed sub.product-fit next.product-fit)
14404− ?. ?=(%ok -.cast) ~
14405− =/ merged=itype (itype-merge-faces actual-cast closed sub.cast)
14406− =/ adjusted=iresult
14407− [%& merged state.p.inferred(sub sub.cast, next next.cast)]
14408− =/ added=(unit iadded-definition)
14409− (add-supported-result update-def adjusted update-state env checked artifacts.resolution)
14410− ?~ added ~
14411− =/ recovered=(unit ischeme) (ienv-lookup update.parts env.u.added)
14412− ?~ recovered ~
14413− ?. ?=(~ vars.u.recovered) ~
14414− ?. ?=(~ (itype-vars typ.u.recovered)) ~
14415− `[env.u.added grouped.resolution artifacts.u.added failures.resolution]
14416−::
14417−++ program-inferred-slot
14418− |= [typ=itype name=(unit term)]
14419− ^- itype
14420− ?~ name typ
14421− ?: &(?=(%face -.typ) =(name.typ u.name)) body.typ
14422− typ
14423−::
14424−++ program-inferred-sample
14425− |= [typ=itype sam=sample]
14426− ^- itype
14427− (program-inferred-slot typ (direct-sample-name sam))
14428−::
14429−++ program-two-slot-names
14430− |= sam=sample
14431− ^- (unit [first=(unit term) second=(unit term)])
14432− ?- -.sam
14433− %cell
14434− ?. ?=([* * ~] items.sam) ~
14435− `[(direct-sample-name i.items.sam) (direct-sample-name i.t.items.sam)]
14436− %face
14437− ?. ?=(%cell -.shape.sam) ~
14438− ?. ?=([* * ~] fields.shape.sam) ~
14439− `[(direct-field-name i.fields.shape.sam) (direct-field-name i.t.fields.shape.sam)]
14440− * ~
14441− ==
14442−::
14443−:: Read message/model from the checked update and its written source layout.
14444−:: The source names strip only top-level sample binder faces; nested value
14445−:: faces remain part of the canonical message and model.
14446−++ program-update-relation
14447− |= [name=term ds=(list def) env=ienv]
14448− ^- (unit [message=itype model=itype])
14449− =/ update=(unit ischeme) (ienv-lookup name env)
14450− ?~ update ~
14451− ?. ?=(~ vars.u.update) ~
14452− ?. ?=(~ (itype-vars typ.u.update)) ~
14453− ?. ?=(%fn -.typ.u.update) ~
14454− ?. ?=(%cell -.sample.typ.u.update) ~
14455− =/ defs=(list def)
14456− (skim ds |=(d=def &(?=(%value -.d) =(name name.d))))
14457− ?. ?=([* ~] defs) ~
14458− =/ written=(unit sample) (direct-gate-sample i.defs)
14459− ?~ written ~
14460− ?. ?=(%cell -.u.written) ~
14461− ?. ?=([* * ~] items.u.written) ~
14462− =/ message=(unit itype)
14463− (direct-slot-body hed.sample.typ.u.update (direct-sample-name i.items.u.written))
14464− =/ model=(unit itype)
14465− (direct-slot-body tal.sample.typ.u.update (direct-sample-name i.t.items.u.written))
14466− ?~ message ~
14467− ?~ model ~
14468− `[u.message u.model]
14469−::
14470−:: Recover an unannotated direct subscription component from the checked
14471−:: update relation and canonical fourth program slot. This establishes only
14472−:: the value type; the final program watch proof remains separate.
14473−++ program-subs-context
14474− |= [parts=[init=term update=term view=term subs=term] ds=(list def) resolution=iresolved initial=istate]
14475− ^- (unit iresolved)
14476− =/ env=ienv env.resolution
14477− ?^ (ienv-lookup %main env) ~
14478− ?^ (ienv-lookup subs.parts env) ~
14479− =/ relation=(unit [message=itype model=itype])
14480− (program-update-relation update.parts ds env)
14481− ?~ relation ~
14482− =/ subs=(list def)
14483− (skim ds |=(d=def &(?=(%value -.d) =(subs.parts name.d))))
14484− ?. ?=([* ~] subs) ~
14485− =/ subs-def=def i.subs
14486− ?> ?=(%value -.subs-def)
14487− =/ written-subs=(unit sample) (direct-gate-sample subs-def)
14488− ?~ written-subs ~
14489− ?~ prelude.initial ~
14490− =/ program=(unit ischeme) (ienv-lookup %program values.u.prelude.initial)
14491− =/ sub=(unit ischeme) (find-jibb-mold %sub u.prelude.initial)
14492− =/ list-template=(unit ischeme) (find-jibb-mold %list u.prelude.initial)
14493− ?~ program ~
14494− ?~ sub ~
14495− ?~ list-template ~
14496− =/ heads=(unit igate-prelude-evidence) (direct-prelude-evidence ds prelude.initial)
14497− ?~ heads ~
14498− =/ written=(unit def) (~(get by gates.u.heads) %program)
14499− ?~ written ~
14500− =/ written-sample=(unit sample) (direct-gate-sample u.written)
14501− ?~ written-sample ~
14502− ?. ?=(%cell -.u.written-sample) ~
14503− ?. ?=([* * * * ~] items.u.written-sample) ~
14504− =/ checked=(map term def) (direct-checked-gates ds env)
14505− =/ templates=ienv
14506− (turn molds.u.prelude.initial |=(x=[name=term template=ischeme] [name.x template.x]))
14507− =/ fresh=(unit @ud)
14508− (ienv-fresh-id (weld env (weld values.u.prelude.initial templates)))
14509− ?~ fresh ~
14510− =. next.initial u.fresh
14511− =/ subs-state=istate (reserve-def-caps val.subs-def initial)
14512− =/ sam=isample-result (infer-sample u.written-subs env subs-state)
14513− ?: ?=(%| -.sam) ~
14514− =/ actual-model=itype (program-inferred-sample typ.p.sam u.written-subs)
14515− ?. ?=(~ (itype-vars actual-model)) ~
14516− ?: (itype-has-tag actual-model) ~
14517− =/ model-fit=ifit
14518− (direct-invariant actual-model model.u.relation sub.state.p.sam next.state.p.sam)
14519− ?. ?=(%ok -.model-fit) ~
14520− =/ message-sub=(unit itype) (template-apply u.sub ~[message.u.relation])
14521− ?~ message-sub ~
14522− =/ product=(unit itype) (template-apply u.list-template ~[u.message-sub])
14523− ?~ product ~
14524− =/ instance=[typ=itype state=istate]
14525− (instantiate-scheme u.program state.p.sam(sub sub.model-fit, next next.model-fit))
14526− ?. ?=(%fn -.typ.instance) ~
14527− ?. ?=(%cell -.sample.typ.instance) ~
14528− ?. ?=(%cell -.tal.sample.typ.instance) ~
14529− ?. ?=(%cell -.tal.tal.sample.typ.instance) ~
14530− =/ expected-subs=(unit itype)
14531− (direct-slot-body tal.tal.tal.sample.typ.instance (direct-sample-name i.t.t.t.items.u.written-sample))
14532− ?~ expected-subs ~
14533− ?. ?=(%fn -.u.expected-subs) ~
14534− =/ canonical=itype [%fn model.u.relation u.product]
14535− =/ gate-fit=ifit
14536− (direct-invariant canonical u.expected-subs sub.state.instance next.state.instance)
14537− ?. ?=(%ok -.gate-fit) ~
14538− =/ closed=itype
14539− (itype-normalize [%fn typ.p.sam u.product] sub.gate-fit)
14540− ?. ?=(%fn -.closed) ~
14541− =/ body=expr
14542− ?- -.val.subs-def
14543− %gate body.val.subs-def
14544− %gate-wide body.val.subs-def
14545− * !!
14546− ==
14547− =/ st=istate
14548− state.p.sam(next next.gate-fit, gate-defs checked, head-evidence heads)
14549− =/ inferred=iresult
14550− (infer-call-context-arg body product.closed env.p.sam st (span-of body))
14551− ?: ?=(%| -.inferred) ~
14552− =/ product-fit=ifit
14553− (itype-fit typ.p.inferred product.closed sub.state.p.inferred next.state.p.inferred)
14554− ?. ?=(%ok -.product-fit) ~
14555− =/ merged-product=itype
14556− (itype-merge-faces typ.p.inferred product.closed sub.product-fit)
14557− =/ actual-cast=itype [%fn typ.p.sam merged-product]
14558− =/ cast=ifit
14559− (itype-fit actual-cast closed sub.product-fit next.product-fit)
14560− ?. ?=(%ok -.cast) ~
14561− =/ merged=itype (itype-merge-faces actual-cast closed sub.cast)
14562− =/ adjusted=iresult
14563− [%& merged state.p.inferred(sub sub.cast, next next.cast)]
14564− =/ added=(unit iadded-definition)
14565− (add-supported-result subs-def adjusted subs-state env checked artifacts.resolution)
14566− ?~ added ~
14567− =/ recovered=(unit ischeme) (ienv-lookup subs.parts env.u.added)
14568− ?~ recovered ~
14569− ?. ?=(~ vars.u.recovered) ~
14570− ?. ?=(~ (itype-vars typ.u.recovered)) ~
14571− `[env.u.added grouped.resolution artifacts.u.added failures.resolution]
14572−::
14573−+$ iview-site [xs=expr mapper=term]
14574−++ program-view-site
14575− |= e=expr
14576− ^- (unit iview-site)
14577− =. e (program-transparent e)
14578− ?. ?=(%call -.e) ~
14579− ?. ?=([* ~] args.e) ~
14580− =/ each=expr (program-transparent head.e)
14581− ?. ?=(%wing -.each) ~
14582− ?. ?=([%each ~] names.each) ~
14583− =/ turned=expr (program-transparent i.args.e)
14584− ?. ?=(%call -.turned) ~
14585− ?. ?=([* * ~] args.turned) ~
14586− =/ turn=expr (program-transparent head.turned)
14587− ?. ?=(%wing -.turn) ~
14588− ?. ?=([%turn ~] names.turn) ~
14589− =/ xs=expr (program-transparent i.args.turned)
14590− ?. ?=(%wing -.xs) ~
14591− ?~ names.xs ~
14592− =/ mapper=(unit term) (program-main-wing i.t.args.turned)
14593− ?~ mapper ~
14594− `[xs u.mapper]
14595−::
14596−++ program-sample-binders
14597− |= sam=sample
14598− ^- (list term)
14599− ?- -.sam
14600− %bind ~[name.sam]
14601− %face ~[name.sam]
14602− %pun ~[name.sam]
14603− %cell (zing (turn items.sam |=(s=sample (program-sample-binders s))))
14604− * ~
14605− ==
14606−::
14607−++ program-pattern-binders
14608− |= pat=pattern
14609− ^- (list term)
14610− ?- -.pat
14611− %bind ~[name.pat]
14612− %cell (zing (turn items.pat |=(p=pattern (program-pattern-binders p))))
14613− * ~
14614− ==
14615−::
14616−++ program-view-sites-merge
14617− |= [a=(unit (list iview-site)) b=(unit (list iview-site))]
14618− ^- (unit (list iview-site))
14619− ?~ a ~
14620− ?~ b ~
14621− `(weld u.a u.b)
14622−::
14623−++ program-view-sites-exprs
14624− |= [xs=(list expr) locals=(list term)]
14625− ^- (unit (list iview-site))
14626− ?~ xs `~
14627− (program-view-sites-merge (program-view-sites i.xs locals) $(xs t.xs))
14628−::
14629−++ program-view-sites-items
14630− |= [xs=(list item) locals=(list term)]
14631− ^- (unit (list iview-site))
14632− ?~ xs `~
14633− (program-view-sites-merge (program-view-sites val.i.xs locals) $(xs t.xs))
14634−::
14635−++ program-view-sites-pieces
14636− |= [xs=(list piece) locals=(list term)]
14637− ^- (unit (list iview-site))
14638− ?~ xs `~
14639− =/ here=(unit (list iview-site))
14640− ?- -.i.xs
14641− %expr (program-view-sites p.i.xs locals)
14642− %text `~
14643− ==
14644− (program-view-sites-merge here $(xs t.xs))
14645−::
14646−++ program-view-sites-qsegs
14647− |= [xs=(list qseg) locals=(list term)]
14648− ^- (unit (list iview-site))
14649− ?~ xs `~
14650− =/ here=(unit (list iview-site))
14651− ?- -.i.xs
14652− %expr (program-view-sites p.i.xs locals)
14653− %knot `~
14654− ==
14655− (program-view-sites-merge here $(xs t.xs))
14656−::
14657−++ program-view-sites-edits
14658− |= [xs=(list edit) locals=(list term)]
14659− ^- (unit (list iview-site))
14660− ?~ xs `~
14661− (program-view-sites-merge (program-view-sites val.i.xs locals) $(xs t.xs))
14662−::
14663−++ program-view-sites-defs
14664− |= [xs=(list def) locals=(list term)]
14665− ^- (unit (list iview-site))
14666− ?~ xs `~
14667− =/ here=(unit (list iview-site))
14668− ?: ?=(%mold -.i.xs) `~
14669− (program-view-sites val.i.xs locals)
14670− (program-view-sites-merge here $(xs t.xs))
14671−::
14672−++ program-view-sites-arms
14673− |= [xs=(list arm) locals=(list term)]
14674− ^- (unit (list iview-site))
14675− ?~ xs `~
14676− =/ nested=(list term) (weld (program-pattern-binders pat.i.xs) locals)
14677− (program-view-sites-merge (program-view-sites val.i.xs nested) $(xs t.xs))
14678−::
14679−++ program-view-sites
14680− |= [e=expr locals=(list term)]
14681− ^- (unit (list iview-site))
14682− =/ site=(unit iview-site) (program-view-site e)
14683− ?^ site
14684− =/ names=(list term) ~[%each %turn mapper.u.site]
14685− ?> ?=(%wing -.xs.u.site)
14686− =/ root=term (rear names.xs.u.site)
14687− ?: |((lien names |=(n=term (lien locals |=(x=term =(n x))))) (lien locals |=(x=term =(root x))))
14688− ~
14689− `~[u.site]
14690− ?- -.e
14691− %str (program-view-sites-pieces pieces.e locals)
14692− %qath (program-view-sites-qsegs segs.e locals)
14693− %change (program-view-sites-edits edits.e locals)
14694− %pair (program-view-sites val.e locals)
14695− %unit (program-view-sites val.e locals)
14696− %group (program-view-sites inner.e locals)
14697− %list (program-view-sites-exprs items.e locals)
14698− %tuple (program-view-sites-items items.e locals)
14699− %gate
14700− (program-view-sites body.e (weld (program-sample-binders sample.e) locals))
14701− %gate-wide
14702− (program-view-sites body.e (weld (program-sample-binders sample.e) locals))
14703− %call
14704− (program-view-sites-merge (program-view-sites head.e locals) (program-view-sites-exprs args.e locals))
14705− %cast (program-view-sites val.e locals)
14706− %trace
14707− (program-view-sites-merge (program-view-sites val.e locals) (program-view-sites then.e locals))
14708− %branch
14709− (program-view-sites-merge (program-view-sites subject.e locals) (program-view-sites-arms arms.e locals))
14710− %body
14711− =/ nested=(list term) (weld (global-value-names defs.e) locals)
14712− (program-view-sites-merge (program-view-sites-defs defs.e nested) (program-view-sites final.e nested))
14713− * `~
14714− ==
14715−::
14716−++ program-union-tag-case
14717− |= [expected=itype tag=@]
14718− ^- (unit itype)
14719− ?. ?=(%union -.expected) ~
14720− =/ remaining=(list itype) cases.expected
14721− =/ found=(unit itype) ~
14722− =/ seen=(set @) *(set @)
14723− |-
14724− ?~ remaining found
14725− =/ case=itype i.remaining
14726− =/ head=(unit @)
14727− ?: ?=(%const -.case) `val.literal.case
14728− ?. ?=(%cell -.case) ~
14729− ?. ?=(%const -.hed.case) ~
14730− `val.literal.hed.case
14731− ?~ head ~
14732− ?: (~(has in:..zuse seen) u.head) ~
14733− =. seen (~(put in:..zuse seen) u.head)
14734− =? found =(tag u.head)
14735− ?^(found ~ `case)
14736− $(remaining t.remaining)
14737−::
14738−++ program-single-case-fit
14739− |= [actual=itype expected=itype sub=isub next=@ud]
14740− ^- ifit
14741− =. actual (itype-normalize actual sub)
14742− =. expected (itype-normalize expected sub)
14743− ?. ?=(%union -.expected) [%unknown ~]
14744− =/ found=(unit itype)
14745− ?: ?=(%const -.actual) `actual
14746− ?: ?=(%tag -.actual) `actual
14747− ?: ?=(%cell -.actual) `actual
14748− ?. ?=(%union -.actual) ~
14749− ?. ?=([* ~] cases.actual) ~
14750− `i.cases.actual
14751− ?~ found [%unknown ~]
14752− =/ case=itype u.found
14753− =/ tag=(unit lit)
14754− ?: ?=(%const -.case) `literal.case
14755− ?: ?=(%tag -.case) `literal.case
14756− ?. ?=(%cell -.case) ~
14757− =/ head=itype (projection-field-target hed.case)
14758− ?: ?=(%const -.head) `literal.head
14759− ?: ?=(%tag -.head) `literal.head
14760− ~
14761− ?~ tag [%unknown ~]
14762− =/ chosen=(unit itype) (program-union-tag-case expected val.u.tag)
14763− ?~ chosen [%unknown ~]
14764− ?: |(?=(%const -.case) ?=(%tag -.case))
14765− ?. ?=(%const -.u.chosen) [%unknown ~]
14766− (itype-fit case u.chosen sub next)
14767− ?. ?=(%cell -.case) [%unknown ~]
14768− ?. ?=(%cell -.u.chosen) [%unknown ~]
14769− =/ head-fit=ifit (itype-fit hed.case hed.u.chosen sub next)
14770− ?. ?=(%ok -.head-fit) head-fit
14771− (itype-fit tal.case tal.u.chosen sub.head-fit next.head-fit)
14772−::
14773−++ program-single-generic-fit
14774− |= [actual=itype expected=itype sub=isub next=@ud]
14775− ^- ifit
14776− =. actual (itype-normalize actual sub)
14777− =. expected (itype-normalize expected sub)
14778− ?. &(?=(%union -.actual) ?=(%union -.expected)) [%unknown ~]
14779− ?~ origin.actual [%unknown ~]
14780− ?. =(origin.actual origin.expected) [%unknown ~]
14781− ?. ?=([* ~] args.actual) [%unknown ~]
14782− ?. ?=([* ~] args.expected) [%unknown ~]
14783− =/ argument-fit=ifit (direct-invariant i.args.actual i.args.expected sub next)
14784− ?: ?=(%ok -.argument-fit) argument-fit
14785− (program-single-case-fit i.args.actual i.args.expected sub next)
14786−::
14787−++ program-keyed-product-fit
14788− |= [actual=itype expected=itype element=ischeme sub=isub next=@ud]
14789− ^- ifit
14790− =. actual (itype-normalize actual sub)
14791− =. expected (itype-normalize expected sub)
14792− ?. &(?=(%cell -.actual) ?=(%cell -.expected)) [%unknown ~]
14793− =/ key-fit=ifit
14794− (itype-fit (projection-field-target hed.actual) (projection-field-target hed.expected) sub next)
14795− ?. ?=(%ok -.key-fit) key-fit
14796− =/ actual-el=itype
14797− (itype-normalize (projection-field-target tal.actual) sub.key-fit)
14798− =/ expected-el=itype
14799− (itype-normalize (projection-field-target tal.expected) sub.key-fit)
14800− ?. &(?=(%union -.actual-el) ?=(%union -.expected-el)) [%unknown ~]
14801− ?. =(origin.actual-el origin.expected-el) [%unknown ~]
14802− ?. ?=([* ~] args.actual-el) [%unknown ~]
14803− ?. ?=([* ~] args.expected-el) [%unknown ~]
14804− =/ canonical-actual=(unit itype)
14805− (template-apply element ~[i.args.actual-el])
14806− =/ canonical-expected=(unit itype)
14807− (template-apply element ~[i.args.expected-el])
14808− ?~ canonical-actual [%unknown ~]
14809− ?~ canonical-expected [%unknown ~]
14810− =/ actual-check=ifit
14811− (direct-invariant actual-el u.canonical-actual sub.key-fit next.key-fit)
14812− ?. ?=(%ok -.actual-check) actual-check
14813− =/ expected-check=ifit
14814− (direct-invariant expected-el u.canonical-expected sub.actual-check next.actual-check)
14815− ?. ?=(%ok -.expected-check) expected-check
14816− =/ case-fit=ifit
14817− (program-single-case-fit i.args.actual-el i.args.expected-el sub.expected-check next.expected-check)
14818− case-fit
14819−::
14820−:: A direct view without a keyed each/turn site still needs the message type
14821−:: from the checked update. Recover only that closed component; final main
14822−:: checking remains the canonical program-kind boundary.
14823−++ program-plain-view-context
14824− |= [parts=[init=term update=term view=term subs=term] ds=(list def) resolution=iresolved initial=istate]
14825− ^- (unit iresolved)
14826− =/ env=ienv env.resolution
14827− ?^ (ienv-lookup %main env) ~
14828− ?^ (ienv-lookup view.parts env) ~
14829− =/ relation=(unit [message=itype model=itype])
14830− (program-update-relation update.parts ds env)
14831− ?~ relation ~
14832− =/ views=(list def)
14833− (skim ds |=(d=def &(?=(%value -.d) =(view.parts name.d))))
14834− ?. ?=([* ~] views) ~
14835− =/ view-def=def i.views
14836− ?> ?=(%value -.view-def)
14837− =/ written-view=(unit sample) (direct-gate-sample view-def)
14838− ?~ written-view ~
14839− =/ body=expr
14840− ?- -.val.view-def
14841− %gate body.val.view-def
14842− %gate-wide body.val.view-def
14843− * !!
14844− ==
14845− =/ sites=(unit (list iview-site)) (program-view-sites body ~)
14846− ?~ sites ~
14847− ?^ u.sites ~
14848− ?~ prelude.initial ~
14849− ?~ (ienv-lookup %program values.u.prelude.initial) ~
14850− =/ element=(unit ischeme) (find-jibb-mold %element u.prelude.initial)
14851− ?~ element ~
14852− =/ heads=(unit igate-prelude-evidence) (direct-prelude-evidence ds prelude.initial)
14853− ?~ heads ~
14854− ?~ (~(get by gates.u.heads) %program) ~
14855− =/ checked=(map term def) (direct-checked-gates ds env)
14856− =/ templates=ienv
14857− (turn molds.u.prelude.initial |=(x=[name=term template=ischeme] [name.x template.x]))
14858− =/ fresh=(unit @ud)
14859− (ienv-fresh-id (weld env (weld values.u.prelude.initial templates)))
14860− ?~ fresh ~
14861− =. next.initial u.fresh
14862− =/ view-state=istate (reserve-def-caps val.view-def initial)
14863− =/ sam=isample-result (infer-sample u.written-view env view-state)
14864− ?: ?=(%| -.sam) ~
14865− =/ actual-model=itype (program-inferred-sample typ.p.sam u.written-view)
14866− ?. ?=(~ (itype-vars actual-model)) ~
14867− ?: (itype-has-tag actual-model) ~
14868− =/ model-fit=ifit
14869− (direct-invariant actual-model model.u.relation sub.state.p.sam next.state.p.sam)
14870− ?. ?=(%ok -.model-fit) ~
14871− =/ product=(unit itype) (template-apply u.element ~[message.u.relation])
14872− ?~ product ~
14873− =/ st=istate
14874− state.p.sam(sub sub.model-fit, next next.model-fit, gate-defs checked, head-evidence heads)
14875− =/ inferred=iresult
14876− (infer-call-context-arg body u.product env.p.sam st (span-of body))
14877− ?: ?=(%| -.inferred) ~
14878− =/ product-fit=ifit
14879− (itype-fit typ.p.inferred u.product sub.state.p.inferred next.state.p.inferred)
14880− ?. ?=(%ok -.product-fit) ~
14881− =/ merged-product=itype
14882− (itype-merge-faces typ.p.inferred u.product sub.product-fit)
14883− =/ actual-cast=itype [%fn typ.p.sam merged-product]
14884− =/ closed=itype [%fn typ.p.sam u.product]
14885− =/ cast=ifit
14886− (itype-fit actual-cast closed sub.product-fit next.product-fit)
14887− ?. ?=(%ok -.cast) ~
14888− =/ merged=itype (itype-merge-faces actual-cast closed sub.cast)
14889− =/ adjusted=iresult
14890− [%& merged state.p.inferred(sub sub.cast, next next.cast)]
14891− =/ added=(unit iadded-definition)
14892− (add-supported-result view-def adjusted view-state env checked artifacts.resolution)
14893− ?~ added ~
14894− =/ recovered=(unit ischeme) (ienv-lookup view.parts env.u.added)
14895− ?~ recovered ~
14896− ?. ?=(~ vars.u.recovered) ~
14897− ?. ?=(~ (itype-vars typ.u.recovered)) ~
14898− `[env.u.added grouped.resolution artifacts.u.added failures.resolution]
14899−::
14900−:: Recover exactly one direct keyed each/turn row mapper, then its view.
14901−:: The prelude's own each and turn schemes determine the mapper gate: the
14902−:: key is inferred from the mapper body, never selected by this recovery.
14903−++ program-view-context
14904− |= [parts=[init=term update=term view=term subs=term] ds=(list def) resolution=iresolved initial=istate]
14905− ^- (unit iresolved)
14906− =/ env=ienv env.resolution
14907− ?^ (ienv-lookup %main env) ~
14908− ?^ (ienv-lookup view.parts env) ~
14909− =/ relation=(unit [message=itype model=itype])
14910− (program-update-relation update.parts ds env)
14911− ?~ relation ~
14912− =/ views=(list def)
14913− (skim ds |=(d=def &(?=(%value -.d) =(view.parts name.d))))
14914− ?. ?=([* ~] views) ~
14915− =/ view-def=def i.views
14916− ?> ?=(%value -.view-def)
14917− =/ written-view=(unit sample) (direct-gate-sample view-def)
14918− ?~ written-view ~
14919− =/ view-body=expr
14920− ?- -.val.view-def
14921− %gate body.val.view-def
14922− %gate-wide body.val.view-def
14923− * !!
14924− ==
14925− =/ sites=(unit (list iview-site)) (program-view-sites view-body ~)
14926− ?~ sites ~
14927− ?. ?=([* ~] u.sites) ~
14928− =/ site=iview-site i.u.sites
14929− =/ component-names=(list term) ~[init.parts update.parts view.parts subs.parts]
14930− ?: (lien component-names |=(n=term =(n mapper.site))) ~
14931− ?^ (ienv-lookup mapper.site env) ~
14932− =/ mappers=(list def)
14933− (skim ds |=(d=def &(?=(%value -.d) =(mapper.site name.d))))
14934− ?. ?=([* ~] mappers) ~
14935− =/ mapper-def=def i.mappers
14936− ?> ?=(%value -.mapper-def)
14937− =/ written-mapper=(unit sample) (direct-gate-sample mapper-def)
14938− ?~ written-mapper ~
14939− ?~ prelude.initial ~
14940− =/ program=(unit ischeme) (ienv-lookup %program values.u.prelude.initial)
14941− =/ each-scheme=(unit ischeme) (ienv-lookup %each values.u.prelude.initial)
14942− =/ turn-scheme=(unit ischeme) (ienv-lookup %turn values.u.prelude.initial)
14943− =/ element=(unit ischeme) (find-jibb-mold %element u.prelude.initial)
14944− =/ list-template=(unit ischeme) (find-jibb-mold %list u.prelude.initial)
14945− ?~ program ~
14946− ?~ each-scheme ~
14947− ?~ turn-scheme ~
14948− ?~ element ~
14949− ?~ list-template ~
14950− =/ heads=(unit igate-prelude-evidence) (direct-prelude-evidence ds prelude.initial)
14951− ?~ heads ~
14952− =/ written-program=(unit def) (~(get by gates.u.heads) %program)
14953− =/ written-each=(unit def) (~(get by gates.u.heads) %each)
14954− =/ written-turn=(unit def) (~(get by gates.u.heads) %turn)
14955− ?~ written-program ~
14956− ?~ written-each ~
14957− ?~ written-turn ~
14958− =/ program-sample=(unit sample) (direct-gate-sample u.written-program)
14959− =/ each-sample=(unit sample) (direct-gate-sample u.written-each)
14960− =/ turn-sample=(unit sample) (direct-gate-sample u.written-turn)
14961− ?~ program-sample ~
14962− ?~ each-sample ~
14963− ?~ turn-sample ~
14964− ?. ?=(%cell -.u.program-sample) ~
14965− ?. ?=([* * * * ~] items.u.program-sample) ~
14966− =/ turn-names=(unit [first=(unit term) second=(unit term)])
14967− (program-two-slot-names u.turn-sample)
14968− ?~ turn-names ~
14969− =/ checked=(map term def) (direct-checked-gates ds env)
14970− =/ templates=ienv
14971− (turn molds.u.prelude.initial |=(x=[name=term template=ischeme] [name.x template.x]))
14972− =/ fresh=(unit @ud)
14973− (ienv-fresh-id (weld env (weld values.u.prelude.initial templates)))
14974− ?~ fresh ~
14975− =. next.initial u.fresh
14976− =/ view-state=istate (reserve-def-caps val.view-def initial)
14977− =/ sam=isample-result (infer-sample u.written-view env view-state)
14978− ?: ?=(%| -.sam) ~
14979− =/ actual-model=itype (program-inferred-sample typ.p.sam u.written-view)
14980− =/ model-fit=ifit
14981− (direct-invariant actual-model model.u.relation sub.state.p.sam next.state.p.sam)
14982− ?. ?=(%ok -.model-fit) ~
14983− =/ xs-result=iresult
14984− (infer-fragment xs.site env.p.sam state.p.sam(sub sub.model-fit, next next.model-fit))
14985− ?: ?=(%| -.xs-result) ~
14986− =/ element-var=itype [%var next.state.p.xs-result]
14987− =/ list-a=(unit itype) (template-apply u.list-template ~[element-var])
14988− ?~ list-a ~
14989− =/ xs-fit=ifit
14990− (itype-fit typ.p.xs-result u.list-a sub.state.p.xs-result +(next.state.p.xs-result))
14991− ?. ?=(%ok -.xs-fit) ~
14992− =/ closed-xs=itype (itype-normalize u.list-a sub.xs-fit)
14993− ?^ (itype-vars closed-xs) ~
14994− ?: (itype-has-tag closed-xs) ~
14995− =/ each-instance=[typ=itype state=istate]
14996− (instantiate-scheme u.each-scheme state.p.xs-result(sub sub.xs-fit, next next.xs-fit))
14997− ?. ?=(%fn -.typ.each-instance) ~
14998− =/ turn-instance=[typ=itype state=istate]
14999− (instantiate-scheme u.turn-scheme state.each-instance)
15000− ?. ?=(%fn -.typ.turn-instance) ~
15001− ?. ?=(%cell -.sample.typ.turn-instance) ~
15002− =/ element-message=(unit itype)
15003− (template-apply u.element ~[message.u.relation])
15004− ?~ element-message ~
15005− =/ each-fit=ifit
15006− (itype-fit product.typ.each-instance u.element-message sub.state.turn-instance next.state.turn-instance)
15007− ?. ?=(%ok -.each-fit) ~
15008− =/ each-input=itype
15009− (program-inferred-sample sample.typ.each-instance u.each-sample)
15010− =/ turn-fit=ifit
15011− (itype-fit product.typ.turn-instance each-input sub.each-fit next.each-fit)
15012− ?. ?=(%ok -.turn-fit) ~
15013− =/ turn-list=itype
15014− (program-inferred-slot hed.sample.typ.turn-instance first.u.turn-names)
15015− =/ list-fit=ifit
15016− (itype-fit closed-xs turn-list sub.turn-fit next.turn-fit)
15017− ?. ?=(%ok -.list-fit) ~
15018− =/ mapper-type=itype
15019− (program-inferred-slot tal.sample.typ.turn-instance second.u.turn-names)
15020− =/ expected-mapper=itype (itype-normalize mapper-type sub.list-fit)
15021− ?. ?=(%fn -.expected-mapper) ~
15022− ?^ (itype-vars sample.expected-mapper) ~
15023− ?: (itype-has-tag sample.expected-mapper) ~
15024− :: These faces come from the source-backed each sample. Keeping them in
15025− :: the expected mapper product lets ordinary tuple inference supply key/el.
15026− ?. ?=(%cell -.product.expected-mapper) ~
15027− ?. ?=(%face -.hed.product.expected-mapper) ~
15028− ?. =(%key name.hed.product.expected-mapper) ~
15029− ?. ?=(%face -.tal.product.expected-mapper) ~
15030− ?. =(%el name.tal.product.expected-mapper) ~
15031− =/ mapper-state=istate
15032− (reserve-def-caps val.mapper-def initial(next next.list-fit))
15033− =/ mapper-sam=isample-result (infer-sample u.written-mapper env mapper-state)
15034− ?: ?=(%| -.mapper-sam) ~
15035− =/ mapper-input=itype (program-inferred-sample typ.p.mapper-sam u.written-mapper)
15036− =/ mapper-sample-fit=ifit
15037− (direct-invariant mapper-input sample.expected-mapper sub.state.p.mapper-sam next.state.p.mapper-sam)
15038− ?. ?=(%ok -.mapper-sample-fit) ~
15039− =/ mapper-product=itype
15040− (itype-normalize product.expected-mapper sub.mapper-sample-fit)
15041− =/ mapper-body=expr
15042− ?- -.val.mapper-def
15043− %gate body.val.mapper-def
15044− %gate-wide body.val.mapper-def
15045− * !!
15046− ==
15047− =/ mapper-inferred=iresult
15048− (infer-call-context-arg mapper-body mapper-product env.p.mapper-sam state.p.mapper-sam(sub sub.mapper-sample-fit, next next.mapper-sample-fit) (span-of mapper-body))
15049− ?: ?=(%| -.mapper-inferred) ~
15050− =/ ordinary-product-fit=ifit
15051− (itype-fit typ.p.mapper-inferred mapper-product sub.state.p.mapper-inferred next.state.p.mapper-inferred)
15052− =/ mapper-product-fit=ifit
15053− ?: ?=(%ok -.ordinary-product-fit) ordinary-product-fit
15054− (program-keyed-product-fit typ.p.mapper-inferred mapper-product u.element sub.state.p.mapper-inferred next.state.p.mapper-inferred)
15055− ?. ?=(%ok -.mapper-product-fit) ~
15056− =/ closed-mapper-product=itype
15057− (itype-normalize mapper-product sub.mapper-product-fit)
15058− ?^ (itype-vars closed-mapper-product) ~
15059− ?: (itype-has-tag closed-mapper-product) ~
15060− =/ merged-mapper-product=itype
15061− (itype-merge-faces typ.p.mapper-inferred closed-mapper-product sub.mapper-product-fit)
15062− =/ mapper-cast=itype [%fn typ.p.mapper-sam merged-mapper-product]
15063− =/ closed-mapper=itype [%fn typ.p.mapper-sam closed-mapper-product]
15064− =/ mapper-cast-fit=ifit
15065− (itype-fit mapper-cast closed-mapper sub.mapper-product-fit next.mapper-product-fit)
15066− ?. ?=(%ok -.mapper-cast-fit) ~
15067− =/ merged-mapper=itype
15068− (itype-merge-faces mapper-cast closed-mapper sub.mapper-cast-fit)
15069− =/ mapper-adjusted=iresult
15070− [%& merged-mapper state.p.mapper-inferred(sub sub.mapper-cast-fit, next next.mapper-cast-fit)]
15071− =/ mapper-added=(unit iadded-definition)
15072− (add-supported-result mapper-def mapper-adjusted mapper-state env checked artifacts.resolution)
15073− ?~ mapper-added ~
15074− =/ mapper-scheme=(unit ischeme) (ienv-lookup mapper.site env.u.mapper-added)
15075− ?~ mapper-scheme ~
15076− ?. ?=(~ vars.u.mapper-scheme) ~
15077− ?. ?=(~ (itype-vars typ.u.mapper-scheme)) ~
15078− =/ program-instance=[typ=itype state=istate]
15079− (instantiate-scheme u.program state.p.sam(next next.mapper-cast-fit))
15080− ?. ?=(%fn -.typ.program-instance) ~
15081− ?. ?=(%cell -.sample.typ.program-instance) ~
15082− ?. ?=(%cell -.tal.sample.typ.program-instance) ~
15083− ?. ?=(%cell -.tal.tal.sample.typ.program-instance) ~
15084− =/ expected-view=(unit itype)
15085− (direct-slot-body hed.tal.tal.sample.typ.program-instance (direct-sample-name i.t.t.items.u.program-sample))
15086− ?~ expected-view ~
15087− ?. ?=(%fn -.u.expected-view) ~
15088− =/ canonical-view=itype [%fn model.u.relation u.element-message]
15089− =/ view-fit=ifit
15090− (direct-invariant canonical-view u.expected-view sub.state.program-instance next.state.program-instance)
15091− ?. ?=(%ok -.view-fit) ~
15092− =/ closed-view=itype
15093− (itype-normalize [%fn typ.p.sam u.element-message] sub.view-fit)
15094− ?. ?=(%fn -.closed-view) ~
15095− =/ view-env=ienv [[mapper.site u.mapper-scheme] env.p.sam]
15096− =/ final-view-state=istate
15097− (reserve-def-caps val.view-def state.p.sam(next next.view-fit, gate-defs checked.u.mapper-added, head-evidence heads))
15098− =/ inferred=iresult
15099− (infer-call-context-arg view-body product.closed-view view-env final-view-state (span-of view-body))
15100− ?: ?=(%| -.inferred) ~
15101− =/ product-fit=ifit
15102− (itype-fit typ.p.inferred product.closed-view sub.state.p.inferred next.state.p.inferred)
15103− ?. ?=(%ok -.product-fit) ~
15104− =/ merged-product=itype
15105− (itype-merge-faces typ.p.inferred product.closed-view sub.product-fit)
15106− =/ actual-cast=itype [%fn typ.p.sam merged-product]
15107− =/ cast=ifit
15108− (itype-fit actual-cast closed-view sub.product-fit next.product-fit)
15109− ?. ?=(%ok -.cast) ~
15110− =/ merged=itype (itype-merge-faces actual-cast closed-view sub.cast)
15111− =/ adjusted=iresult
15112− [%& merged state.p.inferred(sub sub.cast, next next.cast)]
15113− =/ added=(unit iadded-definition)
15114− (add-supported-result view-def adjusted final-view-state env.u.mapper-added checked.u.mapper-added artifacts.u.mapper-added)
15115− ?~ added ~
15116− =/ recovered=(unit ischeme) (ienv-lookup view.parts env.u.added)
15117− ?~ recovered ~
15118− ?. ?=(~ vars.u.recovered) ~
15119− ?. ?=(~ (itype-vars typ.u.recovered)) ~
15120− `[env.u.added grouped.resolution artifacts.u.added failures.resolution]
15121−::
15122−:: The model a direct program's initializer must produce. Update's written
15123−:: two-item sample gives it when it can be read. Otherwise main's own program
15124−:: fit does: update, view and subs are fitted together against the prelude
15125−:: program's sample, as main's call will fit them, with the initializer an
15126−:: open variable. Only the initializer's data may stay open, a replay of the
15127−:: fit must not move, and the model must come out closed and tag-free.
15128−++ program-init-model
15129− |= [main=def parts=[init=term update=term view=term subs=term] ds=(list def) env=ienv program=ischeme program-def=def initial=istate]
15130− ^- (unit itype)
15131− =/ relation=(unit [message=itype model=itype])
15132− (program-update-relation update.parts ds env)
15133− ?^ relation `model.u.relation
15134− =/ args=(unit (list expr)) (program-main-args main)
15135− ?~ args ~
15136− =/ written=(unit sample) (direct-gate-sample program-def)
15137− ?~ written ~
15138− ?. ?=(%cell -.u.written) ~
15139− ?~ items.u.written ~
15140− =/ update=(unit ischeme) (ienv-lookup update.parts env)
15141− =/ view=(unit ischeme) (ienv-lookup view.parts env)
15142− =/ subs=(unit ischeme) (ienv-lookup subs.parts env)
15143− ?~ update ~
15144− ?~ view ~
15145− ?~ subs ~
15146− =/ instance=[typ=itype state=istate] (instantiate-scheme program initial)
15147− ?. ?=(%fn -.typ.instance) ~
15148− ?. ?=(%cell -.sample.typ.instance) ~
15149− =/ expected-init=(unit itype)
15150− (direct-slot-body hed.sample.typ.instance (direct-sample-name i.items.u.written))
15151− ?~ expected-init ~
15152− ?. ?=(%fn -.u.expected-init) ~
15153− ?. ?=(%var -.sample.u.expected-init) ~
15154− =/ data=@ud id.sample.u.expected-init
15155− =/ init-var=itype [%var next.state.instance]
15156− =/ up=[typ=itype state=istate]
15157− (instantiate-scheme u.update state.instance(next +(next.state.instance)))
15158− =/ vw=[typ=itype state=istate] (instantiate-scheme u.view state.up)
15159− =/ sb=[typ=itype state=istate] (instantiate-scheme u.subs state.vw)
15160− =/ st=istate state.sb
15161− =/ actual=itype [%cell init-var [%cell typ.up [%cell typ.vw typ.sb]]]
15162− =/ fit=ifit
15163− (direct-positional-fit u.args items.u.written actual sample.typ.instance env st sub.st next.st)
15164− ?. ?=(%ok -.fit) ~
15165− =/ actual-final=itype (itype-normalize actual sub.fit)
15166− =/ expected-final=itype (itype-normalize sample.typ.instance sub.fit)
15167− =/ open=(list @ud)
15168− (unique-type-vars (weld (itype-vars actual-final) (itype-vars expected-final)))
15169− ?. (levy open |=(n=@ud =(data n))) ~
15170− ?: |((itype-has-tag actual-final) (itype-has-tag expected-final)) ~
15171− =/ replay=ifit
15172− (direct-positional-fit u.args items.u.written actual sample.typ.instance env st sub.fit next.fit)
15173− ?. ?=(%ok -.replay) ~
15174− ?. &(=(sub.fit sub.replay) =(next.fit next.replay)) ~
15175− =/ expected=itype (itype-normalize u.expected-init sub.fit)
15176− ?. ?=(%fn -.expected) ~
15177− ?^ (itype-vars product.expected) ~
15178− `product.expected
15179−::
15180−:: The product of an initializer inferred ordinarily, as a whole gate with no
15181−:: expected type, for a body that context inference cannot take, such as a
15182−:: branch over a nested call's union. Its sample must fit the written one.
15183−++ program-init-ordinary
15184− |= [init-def=def env=ienv sample=itype state=istate]
15185− ^- iresult
15186− ?> ?=(%value -.init-def)
15187− =/ gate=iresult (infer-fragment val.init-def env state)
15188− =? gate ?=(%| -.gate) (infer-recursive-gate init-def env state)
15189− ?: ?=(%| -.gate) gate
15190− ?. ?=(%fn -.typ.p.gate) [%| ["initializer is not a gate" ~]]
15191− =/ fit=ifit
15192− (itype-fit sample.typ.p.gate sample sub.state.p.gate next.state.p.gate)
15193− ?. ?=(%ok -.fit) [%| ["initializer sample differs" ~]]
15194− [%& product.typ.p.gate state.p.gate(sub sub.fit, next next.fit)]
15195−::
15196−:: Recover a direct program's initializer once update, view and
15197−:: subscriptions are resolved: its body is inferred against their closed
15198−:: model (+program-init-model), under its own closed written sample. This one
15199−:: path replaced a separate retry for bodies ending in null and a gate that
15200−:: took only a null sample, so any body and any closed sample check the same
15201−:: way (review question 8). The fresh ordinary main inference afterwards
15202−:: checks that all four components agree.
15203−++ program-plain-init-context
15204− |= [main=def parts=[init=term update=term view=term subs=term] ds=(list def) resolution=iresolved initial=istate]
15205− ^- (unit iresolved)
15206− =/ env=ienv env.resolution
15207− ?^ (ienv-lookup %main env) ~
15208− ?^ (ienv-lookup init.parts env) ~
15209− ?~ (ienv-lookup update.parts env) ~
15210− ?~ (ienv-lookup view.parts env) ~
15211− ?~ (ienv-lookup subs.parts env) ~
15212− =/ inits=(list def)
15213− (skim ds |=(d=def &(?=(%value -.d) =(init.parts name.d))))
15214− ?. ?=([* ~] inits) ~
15215− =/ init-def=def i.inits
15216− ?> ?=(%value -.init-def)
15217− =/ written=(unit sample) (direct-gate-sample init-def)
15218− ?~ written ~
15219− =/ body=expr
15220− ?- -.val.init-def
15221− %gate body.val.init-def
15222− %gate-wide body.val.init-def
15223− * !!
15224− ==
15225− ?~ prelude.initial ~
15226− =/ program=(unit ischeme) (ienv-lookup %program values.u.prelude.initial)
15227− ?~ program ~
15228− =/ heads=(unit igate-prelude-evidence) (direct-prelude-evidence ds prelude.initial)
15229− ?~ heads ~
15230− =/ program-def=(unit def) (~(get by gates.u.heads) %program)
15231− ?~ program-def ~
15232− =/ checked=(map term def) (direct-checked-gates ds env)
15233− =/ templates=ienv
15234− (turn molds.u.prelude.initial |=(x=[name=term template=ischeme] [name.x template.x]))
15235− =/ fresh=(unit @ud)
15236− (ienv-fresh-id (weld env (weld values.u.prelude.initial templates)))
15237− ?~ fresh ~
15238− =. next.initial u.fresh
15239− =/ model=(unit itype)
15240− %: program-init-model
15241− main parts ds env u.program u.program-def
15242− initial(gate-defs checked, head-evidence heads)
15243− ==
15244− ?~ model ~
15245− =/ init-state=istate (reserve-def-caps val.init-def initial)
15246− =/ sam=isample-result (infer-sample u.written env init-state)
15247− ?: ?=(%| -.sam) ~
15248− ?. ?=(~ (itype-vars typ.p.sam)) ~
15249− ?: (itype-has-tag typ.p.sam) ~
15250− =/ st=istate state.p.sam(gate-defs checked, head-evidence heads)
15251− =/ contextual=iresult
15252− (infer-call-context-arg body u.model env.p.sam st (span-of body))
15253− =/ inferred=iresult
15254− ?: ?=(%& -.contextual) contextual
15255− (program-init-ordinary init-def env typ.p.sam init-state(gate-defs checked, head-evidence heads))
15256− ?: ?=(%| -.inferred) ~
15257− =/ product-fit=ifit
15258− (itype-fit typ.p.inferred u.model sub.state.p.inferred next.state.p.inferred)
15259− ?. ?=(%ok -.product-fit) ~
15260− =/ merged-product=itype
15261− (itype-merge-faces typ.p.inferred u.model sub.product-fit)
15262− =/ actual-cast=itype [%fn typ.p.sam merged-product]
15263− =/ closed=itype [%fn typ.p.sam u.model]
15264− =/ cast=ifit
15265− (itype-fit actual-cast closed sub.product-fit next.product-fit)
15266− ?. ?=(%ok -.cast) ~
15267− =/ merged=itype (itype-merge-faces actual-cast closed sub.cast)
15268− =/ adjusted=iresult
15269− [%& merged state.p.inferred(sub sub.cast, next next.cast)]
15270− =/ added=(unit iadded-definition)
15271− (add-supported-result init-def adjusted init-state env checked artifacts.resolution)
15272− ?~ added ~
15273− =/ recovered=(unit ischeme) (ienv-lookup init.parts env.u.added)
15274− ?~ recovered ~
15275− ?. ?=(~ vars.u.recovered) ~
15276− ?. ?=(~ (itype-vars typ.u.recovered)) ~
15277− `[env.u.added grouped.resolution artifacts.u.added failures.resolution]
15278−::
15279−++ derived-poke-command-scheme
15280− |= [prelude=ifile action=itype]
15281− ^- (unit ischeme)
15282− =/ prep=iprelude [prelude ~ ~]
15283− =/ raw=(unit ischeme) (compatible-raw-poke prep)
15284− ?~ raw ~
15285− =/ command=(unit ischeme) (find-jibb-mold %cmd prelude)
15286− =/ unit-template=(unit ischeme) (find-jibb-mold %unit prelude)
15287− ?~ command ~
15288− ?~ unit-template ~
15289− ?. (standard-unit-template u.unit-template /lib/jibb/prelude/jibb) ~
15290− ?. ?=([@ ~] vars.u.command) ~
15291− ?. ?=(%union -.typ.u.command) ~
15292− ?. =(origin.typ.u.command `[/lib/jibb/prelude/jibb %cmd]) ~
15293− ?. (identity-union-parameters vars.u.command args.typ.u.command) ~
15294− =/ m=@ud i.vars.u.command
15295− ?: (itype-var-is-atom m typ.u.command) ~
15296− ?. (levy (itype-vars typ.u.command) |=(n=@ud =(n m))) ~
15297− ?: (itype-has-tag typ.u.command) ~
15298− =/ error=(unit itype) (template-apply u.unit-template ~[[%atom %t]])
15299− ?~ error ~
15300− ?. ?=(%union -.typ.u.raw) ~
15301− =/ poke-case=itype
15302− [%cell [%const [%term %tas %poke '%poke']] [%cell [%face %p typ.u.raw(label `'raw-poke')] [%face %reply [%fn u.error [%var m]]]]]
15303− =/ go-case=itype
15304− [%cell [%const [%term %tas %go '%go']] [%face %url [%atom %t]]]
15305− =/ wait-case=itype
15306− [%cell [%const [%term %tas %wait '%wait']] [%cell [%face %gap [%atom %dr]] [%face %msg [%var m]]]]
15307− =/ now-case=itype
15308− [%cell [%const [%term %tas %now '%now']] [%face %reply [%fn [%atom %da] [%var m]]]]
15309− =/ who-case=itype
15310− [%cell [%const [%term %tas %who '%who']] [%face %reply [%fn [%atom %p] [%var m]]]]
15311− ?. =(cases.typ.u.command ~[poke-case go-case wait-case now-case who-case]) ~
15312− =/ command-result=(unit itype) (template-apply u.command ~[[%var 0]])
15313− ?~ command-result ~
15314− `[[%fn [%cell action [%fn u.error [%var 0]]] u.command-result] ~[0]]
15315−::
15316−++ store-derived-schemes
15317− |= [prelude=ifile values=(list term) molds=(list term) state=itype action=itype]
15318− ^- (unit [state=ischeme action=ischeme])
15319− =/ prep=iprelude [prelude values molds]
15320− =/ ask=(unit ischeme) (request-compatible-ask prep)
15321− ?~ ask ~
15322− ?^ (itype-vars state) ~
15323− ?^ (itype-vars action) ~
15324− ?: |((itype-has-tag state) (itype-has-tag action)) ~
15325− =/ result=(unit itype) (template-apply u.ask ~[[%var 0]])
15326− ?~ result ~
15327− =/ request=ischeme [[%fn [%fn state [%var 0]] u.result] ~[0]]
15328− =/ constructor=(unit ischeme) (derived-poke-command-scheme prelude action)
15329− ?~ constructor ~
15330− `[request u.constructor]
15331−::
15332−++ program-subs-watch
15333− |= [d=def imports=ijimports graph=irequest-graph prelude=ifile]
15334− ^- ?
15335− ?. ?=(%value -.d) |
15336− ?. |(?=(%gate -.val.d) ?=(%gate-wide -.val.d)) |
15337− =/ body=expr
15338− ?- -.val.d
15339− %gate body.val.d
15340− %gate-wide body.val.d
15341− * val.d
15342− ==
15343− =. body (program-transparent body)
15344− ?. ?=(%list -.body) |
15345− ?. ?=([* ~] items.body) |
15346− =/ watch=expr (program-transparent i.items.body)
15347− ?. ?=(%tuple -.watch) |
15348− ?. ?=([* * ~] items.watch) |
15349− =/ tag=item i.items.watch
15350− =/ payload=item i.t.items.watch
15351− ?. &(?=(~ face.tag) ?=(~ face.payload)) |
15352− =/ tag-expr=expr (program-transparent val.tag)
15353− ?. ?=(%lit -.tag-expr) |
15354− ?. &(?=(%term form.lit.tag-expr) =(%watch val.lit.tag-expr)) |
15355− =/ request=expr (program-transparent val.payload)
15356− ?. ?=(%call -.request) |
15357− ?. ?=([* ~] args.request) |
15358− =/ head=expr (program-transparent head.request)
15359− ?. ?=(%wing -.head) |
15360− ?. ?=([@ @ ~] names.head) |
15361− =/ case=term i.names.head
15362− =/ face=term i.t.names.head
15363− =/ callback=expr (program-transparent i.args.request)
15364− ?. ?=(%ctor -.callback) |
15365− ?. ?=(%term form.tag.callback) |
15366− ?| ?=(^ (derived-request-member case face imports graph prelude))
15367− ?=(^ (derived-store-request-member case face imports graph prelude))
15368− ==
15369−::
15370−:: Exact derived-member and request-evidence identity, shared by direct
15371−:: program watches and direct data-page loads. Only a plain request in the
15372−:: selected interface's own source-backed graph can establish this shape.
15373−++ derived-request-member
15374− |= [case=term face=term imports=ijimports graph=irequest-graph prelude=ifile]
15375− ^- (unit ischeme)
15376− =/ selected=(list [face=term interface=ifile])
15377− (skim imports |=(j=[face=term interface=ifile] =(face face.j)))
15378− ?. ?=([* ~] selected) ~
15379− =/ iface=ifile interface.i.selected
15380− =/ member=(unit ischeme) (ienv-lookup case values.iface)
15381− ?~ member ~
15382− ?~ source.iface ~
15383− =/ evidence=(list irequest-evidence)
15384− (skim requests.graph |=(r=irequest-evidence &(=(api-at.r at.iface) =(name.r case))))
15385− ?. ?=([* ~] evidence) ~
15386− =/ request-evidence=irequest-evidence i.evidence
15387− ?. =(u.source.iface api-source.request-evidence) ~
15388− ?. =(name.path.path.request-evidence case) ~
15389− ?~ graph.iface ~
15390− ?. (lien requests.u.graph.iface |=(r=irequest-evidence =(r request-evidence))) ~
15391− ?. ?=(~ scry.path.path.request-evidence) ~
15392− ?. &(?=(~ diffs.path.request-evidence) ?=(~ diffs.path.path.request-evidence)) ~
15393− ?: (lien segments.path.path.request-evidence |=(p=pseg !?=(%knot -.p))) ~
15394− ?. ?=([@ ~] vars.u.member) ~
15395− =/ message=@ud i.vars.u.member
15396− ?. ?=(%fn -.typ.u.member) ~
15397− ?. ?=(%fn -.sample.typ.u.member) ~
15398− ?. =(sample.sample.typ.u.member full.path.request-evidence) ~
15399− ?. =(product.sample.typ.u.member [%var message]) ~
15400− =/ prep=iprelude [prelude prelude-values.graph prelude-molds.graph]
15401− =/ ask=(unit ischeme) (request-compatible-ask prep)
15402− ?~ ask ~
15403− =/ result=(unit itype) (template-apply u.ask ~[[%var message]])
15404− ?~ result ~
15405− ?. =(product.typ.u.member u.result) ~
15406− member
15407−::
15408−:: Store state is watchable by definition, but only the actual derived member
15409−:: of the uniquely selected source-bound store interface proves that fact.
15410−++ derived-store-request-member
15411− |= [case=term face=term imports=ijimports graph=irequest-graph prelude=ifile]
15412− ^- (unit ischeme)
15413− ?. =(%state case) ~
15414− =/ selected=(list [face=term interface=ifile])
15415− (skim imports |=(j=[face=term interface=ifile] =(face face.j)))
15416− ?. ?=([* ~] selected) ~
15417− =/ iface=ifile interface.i.selected
15418− =/ member=(unit ischeme) (ienv-lookup %state values.iface)
15419− ?~ member ~
15420− ?~ source.iface ~
15421− =/ evidence=(list istore-request-evidence)
15422− (skim stores.graph |=(r=istore-request-evidence =(store-at.r at.iface)))
15423− ?. ?=([* ~] evidence) ~
15424− =/ request=istore-request-evidence i.evidence
15425− ?. =(u.source.iface source.request) ~
15426− ?~ graph.iface ~
15427− ?. (lien stores.u.graph.iface |=(r=istore-request-evidence =(r request))) ~
15428− =/ derived=(unit [state=ischeme action=ischeme])
15429− (store-derived-schemes prelude prelude-values.graph prelude-molds.graph state.request action.request)
15430− ?~ derived ~
15431− ?. =(u.member state.u.derived) ~
15432− =/ constructor=(unit ischeme) (ienv-lookup action-name.request values.iface)
15433− ?~ constructor ~
15434− ?. =(u.constructor action.u.derived) ~
15435− member
15436−::
15437−++ program-main-context
15438− |= [main=def ds=(list def) resolution=iresolved initial=istate]
15439− ^- iresolved
15440− ?^ (ienv-lookup %main env.resolution) resolution
15441− =/ heads=(unit igate-prelude-evidence)
15442− (direct-prelude-evidence ds prelude.initial)
15443− ?~ heads resolution
15444− =/ checked=(map term def) (direct-checked-gates ds env.resolution)
15445− =/ completed=[env=ienv artifacts=(list iwidth-definition) failures=(list [name=term diag=idiag])]
15446− (add-supported-defs-core ~[main] checked heads env.resolution molds.initial globals.initial externals.initial surs.initial mark-externals.initial marks.initial jimports.initial reserved-molds.initial at.initial prelude.initial artifacts.resolution grec-index.initial)
15447− [env.completed grouped.resolution artifacts.completed failures.resolution]
15448−::
15449−:: A static main may retain a generic element message in its ordinary
15450−:: scheme. Instantiate that scheme, specialize it to canonical element !!,
15451−:: and publish only the resulting closed scheme.
15452−++ static-main-specialized
15453− |= [env=ienv prelude=(unit ifile)]
15454− ^- (unit ischeme)
15455− ?~ prelude ~
15456− =/ element=(unit ischeme) (find-jibb-mold %element u.prelude)
15457− ?~ element ~
15458− =/ main=(unit ischeme) (ienv-lookup %main env)
15459− ?~ main ~
15460− =/ canonical=(unit itype) (template-apply u.element ~[[%empty ~]])
15461− ?~ canonical ~
15462− =/ instance=[typ=itype state=istate] (instantiate-scheme u.main *istate)
15463− =/ fit=ifit (itype-fit typ.instance u.canonical ~ next.state.instance)
15464− ?. ?=(%ok -.fit) ~
15465− =/ closed=itype (itype-normalize typ.instance sub.fit)
15466− ?^ (itype-vars closed) ~
15467− ?: (itype-has-tag closed) ~
15468− ?. ?=(%union -.closed) ~
15469− ?. ?=(%union -.u.canonical) ~
15470− ?. &(=(origin.closed origin.u.canonical) =(args.closed args.u.canonical)) ~
15471− =/ exact=ifit (direct-invariant closed u.canonical ~ next.fit)
15472− ?. ?=(%ok -.exact) ~
15473− `[u.canonical ~]
15474−::
15475−:: The load of a direct data page must itself be a direct gate whose
15476−:: transparent body is one plain derived request with a wing or ctor reply.
15477−++ page-load-derived
15478− |= [name=term ds=(list def) imports=ijimports graph=irequest-graph prelude=ifile]
15479− ^- ?
15480− =/ loads=(list def)
15481− (skim ds |=(d=def &(?=(%value -.d) =(name name.d))))
15482− ?. ?=([* ~] loads) |
15483− =/ load=def i.loads
15484− ?> ?=(%value -.load)
15485− ?. |(?=(%gate -.val.load) ?=(%gate-wide -.val.load)) |
15486− =/ body=expr
15487− ?- -.val.load
15488− %gate body.val.load
15489− %gate-wide body.val.load
15490− * !!
15491− ==
15492− =. body (program-transparent body)
15493− ?. ?=(%call -.body) |
15494− ?. ?=([* ~] args.body) |
15495− =/ head=expr (program-transparent head.body)
15496− ?. ?=(%wing -.head) |
15497− ?. ?=([@ @ ~] names.head) |
15498− =/ reply=expr (program-transparent i.args.body)
15499− ?. ?| &(?=(%wing -.reply) ?=([@ ~] names.reply))
15500− &(?=(%ctor -.reply) ?=(%term form.tag.reply))
15501− ==
15502− |
15503− ?=(^ (derived-request-member i.names.head i.t.names.head imports graph prelude))
15504−::
15505−++ page-main-closed
15506− |= [parts=[load=term view=term] ds=(list def) env=ienv prelude=(unit ifile) imports=ijimports graph=irequest-graph]
15507− ^- ?
15508− ?~ prelude |
15509− =/ page=(unit ischeme) (find-jibb-mold %page u.prelude)
15510− ?~ page |
15511− =/ main=(unit ischeme) (ienv-lookup %main env)
15512− ?~ main |
15513− ?. ?=(~ vars.u.main) |
15514− ?. ?=(~ (itype-vars typ.u.main)) |
15515− =/ instance=[typ=itype state=istate] (instantiate-scheme u.page *istate)
15516− =/ main-fit=ifit (direct-invariant typ.u.main typ.instance ~ next.state.instance)
15517− ?. ?=(%ok -.main-fit) |
15518− (page-load-derived load.parts ds imports graph u.prelude)
15519−::
15520−++ program-main-closed
15521− |= [parts=[init=term update=term view=term subs=term] ds=(list def) env=ienv prelude=(unit ifile) imports=ijimports graph=irequest-graph]
15522− ^- ?
15523− ?~ prelude |
15524− ?~ (ienv-lookup %program values.u.prelude) |
15525− =/ program=(unit ischeme) (find-jibb-mold %program u.prelude)
15526− ?~ program |
15527− =/ main=(unit ischeme) (ienv-lookup %main env)
15528− ?~ main |
15529− ?. ?=(~ vars.u.main) |
15530− ?. ?=(~ (itype-vars typ.u.main)) |
15531− =/ instance=[typ=itype state=istate] (instantiate-scheme u.program *istate)
15532− =/ main-fit=ifit (direct-invariant typ.u.main typ.instance ~ next.state.instance)
15533− ?. ?=(%ok -.main-fit) |
15534− =/ init=(unit ischeme) (ienv-lookup init.parts env)
15535− ?~ init |
15536− ?. ?=(~ vars.u.init) |
15537− ?. ?=(%fn -.typ.u.init) |
15538− ?. ?=(~ (itype-vars sample.typ.u.init)) |
15539− ?. ?=(~ (itype-vars product.typ.u.init)) |
15540− =/ data=igate-free (gate-free-type sample.typ.u.init 256 ~)
15541− ?. =(%yes verdict.data) |
15542− =/ model=igate-free (gate-free-type product.typ.u.init left.data ~)
15543− ?. =(%yes verdict.model) |
15544− =/ subs=(list def)
15545− (skim ds |=(d=def &(?=(%value -.d) =(subs.parts name.d))))
15546− ?. ?=([* ~] subs) |
15547− |((program-subs-empty i.subs) (program-subs-watch i.subs imports graph u.prelude))
15548−::
15549−:: The two outer sample faces are binder names, not part of the action/state
15550−:: relation. Leave every face inside either component untouched.
15551−++ store-update-unfaced
15552− |= typ=itype
15553− ^- itype
15554− ?. ?=(%fn -.typ) typ
15555− ?. ?=(%cell -.sample.typ) typ
15556− =/ head=itype hed.sample.typ
15557− =/ tail=itype tal.sample.typ
15558− =? head ?=(%face -.head) body.head
15559− =? tail ?=(%face -.tail) body.tail
15560− typ(sample [%cell head tail])
15561−::
15562−:: The builder erases the action from main. Recover it only from the local
15563−:: poke mold and check both ordinary components invariantly.
15564−++ store-main-closed
15565− |= [parts=[init=term update=term] action=term env=ienv molds=imold-types prelude=(unit ifile)]
15566− ^- (unit ischeme)
15567− ?~ prelude ~
15568− =/ builder=(unit ischeme) (ienv-lookup %store values.u.prelude)
15569− ?~ builder ~
15570− ?. ?=([@ @ ~] vars.u.builder) ~
15571− =/ state-var=@ud i.vars.u.builder
15572− =/ action-var=@ud i.t.vars.u.builder
15573− ?: =(state-var action-var) ~
15574− =/ builder-sample=itype
15575− [%cell [%face %init [%var state-var]] [%face %update [%fn [%cell [%var action-var] [%var state-var]] [%var state-var]]]]
15576− =/ builder-product=itype [%cell [%face %init [%var state-var]] [%face %update [%noun ~]]]
15577− ?. =(typ.u.builder [%fn builder-sample builder-product]) ~
15578− =/ store=(unit ischeme) (find-jibb-mold %store u.prelude)
15579− ?~ store ~
15580− ?. ?=([@ ~] vars.u.store) ~
15581− ?. =(typ.u.store [%cell [%face %init [%var i.vars.u.store]] [%face %update [%noun ~]]]) ~
15582− =/ state=(unit ischeme) (find-jibb-mold %state [~ molds /tmp ~ ~ ~ ~ ~])
15583− ?~ state ~
15584− =/ action-mold=(unit ischeme) (find-jibb-mold action [~ molds /tmp ~ ~ ~ ~ ~])
15585− ?~ action-mold ~
15586− ?. &(?=(~ vars.u.state) ?=(~ (itype-vars typ.u.state))) ~
15587− ?. &(?=(~ vars.u.action-mold) ?=(~ (itype-vars typ.u.action-mold))) ~
15588− =/ canonical=(unit itype) (template-apply u.store ~[typ.u.state])
15589− ?~ canonical ~
15590− =/ main=(unit ischeme) (ienv-lookup %main env)
15591− =/ main-fit=(unit ifit)
15592− ?~(main ~ `(direct-invariant typ.u.main u.canonical ~ 0))
15593− =/ main-ok=?
15594− ?~ main &
15595− ?. ?=(~ vars.u.main) |
15596− ?. ?=(~ (itype-vars typ.u.main)) |
15597− ?~ main-fit |
15598− ?=(%ok -.u.main-fit)
15599− ?. main-ok ~
15600− =/ init=(unit ischeme) (ienv-lookup init.parts env)
15601− ?~ init ~
15602− ?. ?=(~ vars.u.init) ~
15603− ?. ?=(~ (itype-vars typ.u.init)) ~
15604− =/ init-fit=ifit (direct-invariant typ.u.init typ.u.state ~ 0)
15605− ?. ?=(%ok -.init-fit) ~
15606− =/ update=(unit ischeme) (ienv-lookup update.parts env)
15607− ?~ update ~
15608− ?. ?=(~ vars.u.update) ~
15609− ?. ?=(~ (itype-vars typ.u.update)) ~
15610− =/ expected=itype [%fn [%cell typ.u.action-mold typ.u.state] typ.u.state]
15611− =/ update-fit=ifit (direct-invariant (store-update-unfaced typ.u.update) expected ~ 0)
15612− ?. ?=(%ok -.update-fit) ~
15613− `[u.canonical ~]
15614−::
15615++ infer-jibb-file
11631++ infer-jibb-file
15616 |= [at=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle active=(list path) prelude-values=(list term) prelude-molds=(list term) cache=jcache prelude=(unit ifile)]
11632 |= [at=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle active=(list path) prelude-values=(list term) prelude-molds=(list term) cache=jcache prelude=(unit ifile)]
15617 ^- jfile-result
11633 ^- jfile-result
15618− =/ out=jfile-detailed-result
15619− (infer-jibb-file-detailed at src externals mark-externals modules active prelude-values prelude-molds cache prelude)
15620− ?: ?=(%| -.out) [%| message.p.out]
15621− [%& p.out]
15622−:: Returns structured root-source overlap evidence after the same full check.
15623−++ infer-jibb-file-detailed
15624− |= [at=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle active=(list path) prelude-values=(list term) prelude-molds=(list term) cache=jcache prelude=(unit ifile)]
15625− ^- jfile-detailed-result
15626 =/ parsed (parse at src)
11634 =/ parsed (parse at src)
15627− ?: ?=(%| -.parsed) [%| [(crip "module source does not parse: {(spud at)}") ~]]
11635+ ?: ?=(%| -.parsed) [%| (crip "module source does not parse: {(spud at)}")]
15628 =/ mod=module p.parsed
11636 =/ mod=module p.parsed
15629 =/ duplicate=(unit idiag) (duplicate-defs defs.mod)
11637 =/ duplicate=(unit idiag) (duplicate-defs defs.mod)
15630− ?^ duplicate [%| [(show-duplicate-fields at src u.duplicate) ~]]
11638+ ?^ duplicate [%| (show-duplicate-fields at src u.duplicate)]
15631− ?: &(?=([%ui %api *] at) ?=(^ (program-main-def defs.mod)))
15632− [%| [(crip "module kind needs unsupported inference: {(spud at)}") ~]]
15633 ?: ?=([%ui %api *] at)
11639 ?: ?=([%ui %api *] at)
15634− =/ poke=(each ifile @t)
11640+ =/ iface=(unit ifile) (api-poke-interface at mod mark-externals prelude-values prelude-molds prelude)
15635− (api-poke-interface-result at mod mark-externals prelude-values prelude-molds prelude)
11641+ ?^ iface
15636− ?: ?=(%& -.poke)
11642+ =/ checked=ifile u.iface(source `src, graph `[(silt `(list path)`~[at]) ~ modules prelude prelude-values prelude-molds externals mark-externals])
15637− =/ iface=ifile p.poke
15638− =/ checked=ifile iface(source `src, graph `[(silt `(list path)`~[at]) ~ ~ modules prelude prelude-values prelude-molds externals mark-externals])
15639 [%& [checked [[at checked] cache]]]
11643 [%& [checked [[at checked] cache]]]
15640− :: A clashing derived name is an error wherever the checks below stop.
11644+ ?~ prelude [%| (crip "API module needs unsupported inference: {(spud at)}")]
15641− =/ clash=(unit idiag)
15642− ?. ?=([%ui %api @ %jibb ~] at) ~
15643− (api-derived-clash mod prelude-values)
15644− ?^ clash [%| [(show-duplicate-fields at src u.clash) ~]]
15645− :: So is a name conflict in its scope, reported as for other modules.
15646− :: `+$ paths` and `+$ poke` are declarations, not molds (overview), and
15647− :: a `/%` mark names a mold, so it conflicts only with another mark or
15648− :: mold: `/% %todos` beside the request `todos` is the usual API.
15649− =/ ordinary=(list def)
15650− (skim defs.mod |=(d=def !&(?=(%mold -.d) |(=(%paths name.d) =(%poke name.d)))))
15651− =/ marks=(list term) (collect-mark-imports imports.mod)
15652− =/ mold-names=(list term)
15653− (turn (collect-simple-molds ordinary) |=(m=[name=term body=shape] name.m))
15654− =/ faces=(list import) (skip imports.mod |=(i=import ?=(%mark -.i)))
15655− ?. ?& (module-scope-valid mod(defs ordinary, imports faces) prelude-values prelude-molds)
15656− %+ levy marks
15657− |= n=term
15658− ?& (unique-value-name n marks)
15659− !(lien mold-names |=(m=term =(m n)))
15660− !(lien prelude-molds |=(m=term =(m n)))
15661− ==
15662− ==
15663− =/ scope=(unit iscope-diagnostic)
15664− (module-scope-diagnostic mod(defs ordinary, imports faces) prelude-values prelude-molds)
15665− ?^ scope [%| [(show-scope-diagnostic at src u.scope prelude) ~]]
15666− [%| [(crip "module has conflicting names: {(spud at)}") ~]]
15667− ?~ prelude [%| [(crip "API module needs unsupported inference: {(spud at)}") ~]]
15668 =/ prepared=iprelude [u.prelude prelude-values prelude-molds]
11645 =/ prepared=iprelude [u.prelude prelude-values prelude-molds]
15669− :: A failing Jibb import gives its own error, which may be definite, as
15670− :: it does for other modules; the constructors below would only wrap it.
15671− :: They resolve the same imports again, from the interfaces cached here.
15672− =/ js=jimports-detailed-result
15673− (resolve-jibb-imports-detailed imports.mod externals mark-externals modules active prelude-values prelude-molds cache prelude)
15674− ?: ?=(%| -.js) [%| p.js]
15675− :: Without `+$ paths` only the poke-only interface applies; keep its reason.
15676− ?. (lien defs.mod |=(d=def &(?=(%mold -.d) =(%paths name.d))))
15677− [%| [(crip "API module needs unsupported inference: {(spud at)}: {(trip p.poke)}") ~]]
15678− :: Each constructor names the part that stopped it; keep that reason.
15679 =/ narrow=?
11646 =/ narrow=?
15680 ?. ?=([[%mark *] ~] imports.mod) |
11647 ?. ?=([[%mark *] ~] imports.mod) |
15681 ?. ?=([[%mold *] ~] defs.mod) |
11648 ?. ?=([[%mold *] ~] defs.mod) |
@@ -15683,168 +11650,39 @@
15683 !?=(%union -.shape.i.defs.mod)
11650 !?=(%union -.shape.i.defs.mod)
15684 ?: narrow
11651 ?: narrow
15685 =/ request=(each ione-request-interface @t)
11652 =/ request=(each ione-request-interface @t)
15686− (one-request-interface-graph at src externals mark-externals modules active cache.p.js `prepared)
11653+ (one-request-interface-graph at src externals mark-externals modules active cache `prepared)
15687− ?: ?=(%| -.request) [%| [(crip "API module needs unsupported inference: {(spud at)}: {(trip p.request)}") ~]]
11654+ ?: ?=(%| -.request) [%| (crip "API module needs unsupported inference: {(spud at)}")]
15688 =/ checked=ifile iface.p.request
11655 =/ checked=ifile iface.p.request
15689 [%& [checked [[at checked] dependencies.paths.support.p.request]]]
11656 [%& [checked [[at checked] dependencies.paths.support.p.request]]]
15690 =/ multi=(each [iface=ifile cache=jcache] @t)
11657 =/ multi=(each [iface=ifile cache=jcache] @t)
15691− (multi-request-interface-graph at src externals mark-externals modules active cache.p.js `prepared)
11658+ (multi-request-interface-graph at src externals mark-externals modules active cache `prepared)
15692− ?: ?=(%| -.multi) [%| [(crip "API module needs unsupported inference: {(spud at)}: {(trip p.multi)}") ~]]
11659+ ?: ?=(%| -.multi) [%| (crip "API module needs unsupported inference: {(spud at)}")]
15693 [%& [iface.p.multi [[at iface.p.multi] cache.p.multi]]]
11660 [%& [iface.p.multi [[at iface.p.multi] cache.p.multi]]]
15694− =/ main=(unit def) (program-main-def defs.mod)
11661+ ?. (module-scope-valid mod prelude-values prelude-molds)
15695− =/ main-parts=(unit [init=term update=term view=term subs=term])
11662+ ?: (pending-declared-poke at mod prelude-values prelude-molds)
15696− ?~(main ~ (program-main-parts u.main))
11663+ [%| (crip "module kind or scope needs unsupported inference: {(spud at)}")]
15697− =/ page-parts=(unit [load=term view=term])
11664+ [%| (crip "module has conflicting names: {(spud at)}")]
15698− ?~(main ~ (page-main-parts u.main))
11665+ =/ vals=(list term) (global-value-names defs.mod)
15699− =/ store-parts=(unit [init=term update=term])
11666+ ?: (lien vals |=(n=term =(n %main)))
15700− ?~(main ~ (store-main-parts u.main))
11667+ [%| (crip "module kind needs unsupported inference: {(spud at)}")]
15701− =/ declaration=(each istore-declaration (unit idiag))
11668+ =/ js=jimports-result (resolve-jibb-imports imports.mod externals mark-externals modules active prelude-values prelude-molds cache prelude)
15702− ?~(store-parts [%| ~] (store-declaration mod prelude-values prelude-molds))
15703− =/ clash=(unit idiag) ?:(?=(%| -.declaration) p.declaration ~)
15704− ?^ clash [%| [(show-duplicate-fields at src u.clash) ~]]
15705− =/ declared=(unit istore-declaration)
15706− ?:(?=(%| -.declaration) ~ `p.declaration)
15707− ?: &(?=(^ store-parts) ?=(~ declared))
15708− [%| [(crip "module kind or scope needs unsupported inference: {(spud at)}") ~]]
15709− ?: &(?=([%ui %stores *] at) ?=(^ main) ?=(~ store-parts))
15710− [%| [(crip "module kind needs unsupported inference: {(spud at)}") ~]]
15711− =/ ds=(list def) ?~(declared defs.mod defs.u.declared)
15712− =/ checking=module mod(defs ds)
15713− ?. (module-scope-valid checking prelude-values prelude-molds)
15714− =/ scope=(unit iscope-diagnostic)
15715− (module-scope-diagnostic checking prelude-values prelude-molds)
15716− ?^ scope [%| [(show-scope-diagnostic at src u.scope prelude) ~]]
15717− [%| [(crip "module has conflicting names: {(spud at)}") ~]]
15718− =/ vals=(list term) (global-value-names ds)
15719− =/ js=jimports-detailed-result (resolve-jibb-imports-detailed imports.mod externals mark-externals modules active prelude-values prelude-molds cache prelude)
15720 ?: ?=(%| -.js) [%| p.js]
11669 ?: ?=(%| -.js) [%| p.js]
15721− =/ collected=grec-collected
11670+ =/ molds=imolds (collect-simple-molds defs.mod)
15722− ?^ imports.mod [(collect-simple-molds ds) *(map term shape)]
15723− (grec-collect-molds ds)
15724− =/ molds=imolds molds.collected
15725 =/ globals=(list term) (weld prelude-values (weld (import-binding-names imports.mod) vals))
11671 =/ globals=(list term) (weld prelude-values (weld (import-binding-names imports.mod) vals))
15726 =/ surs=(list term) (collect-sur-imports imports.mod)
11672 =/ surs=(list term) (collect-sur-imports imports.mod)
15727 =/ marks=(list term) (collect-mark-imports imports.mod)
11673 =/ marks=(list term) (collect-mark-imports imports.mod)
15728 =/ reserved=(list term) (weld prelude-molds (turn resolved.p.js |=(j=[face=term interface=ifile] face.j)))
11674 =/ reserved=(list term) (weld prelude-molds (turn resolved.p.js |=(j=[face=term interface=ifile] face.j)))
15729 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
11675 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
15730− =/ state=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks resolved.p.js reserved ~ ~ ~ | at top prelude ~ 256 ~ ~ ~ ~ ~ ~]
11676+ =/ state=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks resolved.p.js reserved ~ ~ ~ | at top prelude ~ 256 ~ ~ ~]
15731− :: Source and scope were checked above; preserve that exact root and prelude.
11677+ =/ mts=(each imold-types @t) (module-mold-types molds state)
15732− :: This first integration only indexes import-free library sources.
11678+ ?: ?=(%| -.mts) [%| (crip "{(trip p.mts)}: {(spud at)}")]
15733− =/ index=(unit [at=path source=@t prelude=ifile shapes=(map term shape)])
11679+ =/ resolution=iresolved (resolve-groups defs.mod molds globals externals surs mark-externals marks resolved.p.js reserved at prelude)
15734− ?^ imports.mod ~
15735− ?~ prelude ~
15736− =/ standard=(unit ischeme) (find-jibb-mold %list u.prelude)
15737− ?~ standard ~
15738− ?. =(u.standard [[%collection %list ~[[%var 0]]] ~[0]]) ~
15739− =/ index=(map term shape) proofs.collected
15740− ?. !=(index *(map term shape)) ~
15741− ?: (lien molds |=(m=[name=term body=shape] =(%list name.m))) ~
15742− `[at src u.prelude index]
15743− =. grec-index.state index
15744− =/ mts=(each imold-types imold-failure) (module-mold-types-detail molds state)
15745− ?: ?=(%| -.mts)
15746− ?~ overlap.p.mts [%| [(crip "{(trip message.p.mts)}: {(spud at)}") ~]]
15747− =/ witness=[name=term cases=upair] u.overlap.p.mts
15748− =/ first=@t (show-error src [at line.beg.first.cases.witness col.beg.first.cases.witness "first union case"])
15749− =/ second=@t (show-error src [at line.beg.second.cases.witness col.beg.second.cases.witness "overlapping case"])
15750− =/ msg=@t (of-wain:format ~[(crip "module mold {(trip name.witness)} has overlapping cases") first second])
15751− [%| [msg `[at src name.witness cases.witness]]]
15752− =/ resolution=iresolved
15753− ?~ index
15754− (resolve-groups ds molds globals externals surs mark-externals marks resolved.p.js reserved at prelude)
15755− (resolve-groups-core ds molds globals externals surs mark-externals marks resolved.p.js reserved at prelude index)
15756 =/ env=ienv env.resolution
11680 =/ env=ienv env.resolution
15757− =/ recovered=iresolved
11681+ ?. (module-values-complete defs.mod env)
15758− ?~ main resolution
11682+ [%| (crip "module definitions need unsupported inference: {(spud at)}")]
15759− ?~ main-parts resolution
11683+ =/ initial=irequest-graph [(silt `(list path)`~[at]) ~ modules prelude prelude-values prelude-molds externals mark-externals]
15760− =/ updated=(unit iresolved)
15761− (program-update-context u.main u.main-parts ds resolution state)
15762− =/ with-update=iresolved ?~(updated resolution u.updated)
15763− =/ subscribed=(unit iresolved)
15764− (program-subs-context u.main-parts ds with-update state)
15765− =/ with-subs=iresolved ?~(subscribed with-update u.subscribed)
15766− =/ viewed=(unit iresolved)
15767− (program-view-context u.main-parts ds with-subs state)
15768− =/ with-keyed-view=iresolved ?~(viewed with-subs u.viewed)
15769− =/ plain-view=(unit iresolved)
15770− ?^(viewed ~ (program-plain-view-context u.main-parts ds with-keyed-view state))
15771− =/ with-view=iresolved ?~(plain-view with-keyed-view u.plain-view)
15772− =/ initialized=(unit iresolved)
15773− (program-plain-init-context u.main u.main-parts ds with-view state)
15774− =/ components=iresolved ?~(initialized with-view u.initialized)
15775− (program-main-context u.main ds components state)
15776− =. env env.recovered
15777− =. artifacts.resolution artifacts.recovered
15778− =. env
15779− ?: (module-values-complete ds env) env
15780− ?: |(?=([%ui %stores *] at) ?=(^ imports.mod) ?=(^ prelude) ?=(^ prelude-values) ?=(^ prelude-molds)) env
15781− ?: (gth (met 3 src) 65.536) env
15782− ?: (gth (lent ds) 64) env
15783− ?. (dg-source-candidate ds 64) env
15784− =/ transaction=(unit dgcommit) (dg-root-source at src)
15785− ?~ transaction env
15786− ?: (dg-interface-safe env.u.transaction) env.u.transaction
15787− env
15788− =/ required=(list def)
15789− ?~ store-parts ds
15790− (skim ds |=(d=def !&(?=(%value -.d) =(%main name.d))))
15791− ?. (module-values-complete required env)
15792− =/ components=icomponents (graph-components required (global-value-names required))
15793− =/ ordered=(list def) (dependency-order required components)
15794− =/ values=(list term) (weld prelude-values (weld (api-import-faces imports.mod) vals))
15795− =/ checked=(map term def) (direct-checked-gates required env)
15796− =/ heads=(unit igate-prelude-evidence) (direct-prelude-evidence required prelude.state)
15797− =/ diagnostic=(unit @t)
15798− (module-unresolved-diagnostic ordered env state checked heads failures.resolution values at src 64)
15799− ?^ diagnostic [%| [u.diagnostic ~]]
15800− =/ missing=(unit term) (module-missing-value required env)
15801− =/ named=tape ?~(missing "" ": ++ {(trip u.missing)}")
15802− [%| [(crip "module definitions need unsupported inference: {(spud at)}{named}") ~]]
15803− =/ initial=irequest-graph [(silt `(list path)`~[at]) ~ ~ modules prelude prelude-values prelude-molds externals mark-externals]
15804 =/ graph=(unit irequest-graph) (request-graph-merge resolved.p.js initial (add 1 (lent resolved.p.js)))
11684 =/ graph=(unit irequest-graph) (request-graph-merge resolved.p.js initial (add 1 (lent resolved.p.js)))
15805− ?~ graph [%| ['module request evidence needs unsupported inference' ~]]
11685+ ?~ graph [%| 'module request evidence needs unsupported inference']
15806− =/ static-main=(unit ischeme)
15807− ?~ main ~
15808− ?^ main-parts ~
15809− ?^ page-parts ~
15810− ?^ store-parts ~
15811− (static-main-specialized env prelude)
15812− =? env ?=(^ static-main)
15813− [[%main u.static-main] (skim env |=(entry=[name=term scheme=ischeme] !=(%main name.entry)))]
15814− =/ store-main=(unit ischeme)
15815− ?~ store-parts ~
15816− ?~ declared ~
15817− (store-main-closed u.store-parts action.u.declared env p.mts prelude)
15818− =? env ?=(^ store-main)
15819− [[%main u.store-main] (skim env |=(entry=[name=term scheme=ischeme] !=(%main name.entry)))]
15820− =/ kind-ok=?
15821− ?~ main &
15822− ?^ main-parts (program-main-closed u.main-parts ds env prelude resolved.p.js u.graph)
15823− ?^ page-parts (page-main-closed u.page-parts ds env prelude resolved.p.js u.graph)
15824− ?^ store-parts ?=(^ store-main)
15825− ?=(^ static-main)
15826− ?. kind-ok
15827− [%| [(crip "module kind needs unsupported inference: {(spud at)}") ~]]
15828− =/ store-derived=(unit [values=ienv evidence=istore-request-evidence])
15829− ?~ declared ~
15830− ?~ prelude ~
15831− =/ state=(unit ischeme) (find-jibb-mold %state [~ p.mts at ~ ~ ~ ~ ~])
15832− ?~ state ~
15833− =/ action-mold=(unit ischeme) (find-jibb-mold action.u.declared [~ p.mts at ~ ~ ~ ~ ~])
15834− ?~ action-mold ~
15835− =/ schemes=(unit [state=ischeme action=ischeme])
15836− (store-derived-schemes u.prelude prelude-values prelude-molds typ.u.state typ.u.action-mold)
15837− ?~ schemes ~
15838− =/ evidence=istore-request-evidence
15839− [at src typ.u.state action.u.declared typ.u.action-mold]
15840− `[~[[%state state.u.schemes] [action.u.declared action.u.schemes]] evidence]
15841− ?: &(?=(^ declared) ?=(~ store-derived))
15842− [%| [(crip "store derived gates need unsupported inference: {(spud at)}") ~]]
15843− =? env ?=(^ store-derived) (weld values.u.store-derived env)
15844− =? graph ?=(^ store-derived)
15845− `u.graph(stores [evidence.u.store-derived stores.u.graph])
15846− ?. (request-graph-bounded u.graph)
15847− [%| ['module request evidence needs unsupported inference' ~]]
15848 =/ iface=ifile [env p.mts at ~ artifacts.resolution ~ `src graph]
11686 =/ iface=ifile [env p.mts at ~ artifacts.resolution ~ `src graph]
15849 [%& [iface [[at iface] cache.p.js]]]
11687 [%& [iface [[at iface] cache.p.js]]]
15850::
11688::
@@ -15891,7 +11729,7 @@
15891 =/ declared=(list term) (collect-mark-imports imports.mod)
11729 =/ declared=(list term) (collect-mark-imports imports.mod)
15892 =/ reserved=(list term) (weld molds.u.prepared (turn resolved.p.js |=(j=[face=term interface=ifile] face.j)))
11730 =/ reserved=(list term) (weld molds.u.prepared (turn resolved.p.js |=(j=[face=term interface=ifile] face.j)))
15893 =/ top=(list term) (turn ms |=(m=[name=term body=shape] name.m))
11731 =/ top=(list term) (turn ms |=(m=[name=term body=shape] name.m))
15894− =/ state=istate [0 ~ ~ ~ ms globals externals surs marks declared resolved.p.js reserved ~ ~ ~ | file top `public ~ 256 ~ ~ ~ ~ ~ ~]
11732+ =/ state=istate [0 ~ ~ ~ ms globals externals surs marks declared resolved.p.js reserved ~ ~ ~ | file top `public ~ 256 ~ ~ ~]
15895 =/ inferred=(unit [template=ischeme state=istate])
11733 =/ inferred=(unit [template=ischeme state=istate])
15896 (infer-mold-template shape.i.selected state(active ~[name], in-mold &))
11734 (infer-mold-template shape.i.selected state(active ~[name], in-mold &))
15897 ?~ inferred [%| 'selected mold needs unsupported inference']
11735 ?~ inferred [%| 'selected mold needs unsupported inference']
@@ -15954,13 +11792,15 @@
15954 =/ prelude-molds=(list term) molds.u.prepared
11792 =/ prelude-molds=(list term) molds.u.prepared
15955 =/ iface=(unit ifile) `iface.u.prepared
11793 =/ iface=(unit ifile) `iface.u.prepared
15956 ?. (module-scope-valid p.parsed prelude-values prelude-molds)
11794 ?. (module-scope-valid p.parsed prelude-values prelude-molds)
11795+ ?: (pending-declared-poke file p.parsed prelude-values prelude-molds)
11796+ 'partial inference; module not checked\0amodule kind or scope needs unsupported inference'
15957 'partial inference; module not checked\0amodule has conflicting names'
11797 'partial inference; module not checked\0amodule has conflicting names'
15958 =/ js=jimports-result
11798 =/ js=jimports-result
15959 (resolve-jibb-imports imports.p.parsed externals mark-externals modules ~[file] prelude-values prelude-molds ~ iface)
11799 (resolve-jibb-imports imports.p.parsed externals mark-externals modules ~[file] prelude-values prelude-molds ~ iface)
15960 ?: ?=(%| -.js) (of-wain:format ~['partial inference; module not checked' p.js])
11800 ?: ?=(%| -.js) (of-wain:format ~['partial inference; module not checked' p.js])
15961 =/ scope-values=(list term)
11801 =/ scope-values=(list term)
15962 (weld prelude-values (weld (collect-sur-imports imports.p.parsed) (collect-mark-imports imports.p.parsed)))
11802 (weld prelude-values (weld (collect-sur-imports imports.p.parsed) (collect-mark-imports imports.p.parsed)))
15963− (golden-types-in-context-core file src externals mark-externals resolved.p.js scope-values prelude-molds iface prepared)
11803+ (golden-types-in-context file src externals mark-externals resolved.p.js scope-values prelude-molds iface)
15964::
11804::
15965:: +golden-types-with-marks: supply declared mark types separately from /sur
11805:: +golden-types-with-marks: supply declared mark types separately from /sur
15966:: entries, as [mark result] with the result from +read-mark:jibb-import.
11806:: entries, as [mark result] with the result from +read-mark:jibb-import.
@@ -15991,17 +11831,13 @@
15991++ golden-types-in-context
11831++ golden-types-in-context
15992 |= [file=path src=@t externals=iexternals mark-externals=imark-externals jimports=ijimports prelude-values=(list term) reserved-molds=(list term) prelude=(unit ifile)]
11832 |= [file=path src=@t externals=iexternals mark-externals=imark-externals jimports=ijimports prelude-values=(list term) reserved-molds=(list term) prelude=(unit ifile)]
15993 ^- @t
11833 ^- @t
15994− (golden-types-in-context-core file src externals mark-externals jimports prelude-values reserved-molds prelude ~)
15995−++ golden-types-in-context-core
15996− |= [file=path src=@t externals=iexternals mark-externals=imark-externals jimports=ijimports prelude-values=(list term) reserved-molds=(list term) prelude=(unit ifile) prepared=(unit iprelude)]
15997− ^- @t
15998 =. reserved-molds (weld reserved-molds (turn jimports |=(j=[face=term interface=ifile] face.j)))
11834 =. reserved-molds (weld reserved-molds (turn jimports |=(j=[face=term interface=ifile] face.j)))
15999 =/ parsed (parse file src)
11835 =/ parsed (parse file src)
16000 ?: ?=(%| -.parsed) (show-error src p.parsed)
11836 ?: ?=(%| -.parsed) (show-error src p.parsed)
16001 =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
11837 =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
16002 ?^ duplicate (duplicate-fields-report file src u.duplicate)
11838 ?^ duplicate (duplicate-fields-report file src u.duplicate)
16003− ?: (module-has-reserved p.parsed)
11839+ ?: (module-has-reserved-proj p.parsed)
16004− 'module has a reserved proj or unface name'
11840+ 'module has reserved proj name'
16005 =/ ds=(list def) defs.p.parsed
11841 =/ ds=(list def) defs.p.parsed
16006 =/ molds=imolds (collect-simple-molds ds)
11842 =/ molds=imolds (collect-simple-molds ds)
16007 =/ globals=(list term) (weld prelude-values (weld (turn jimports |=(j=[face=term interface=ifile] face.j)) (global-value-names ds)))
11843 =/ globals=(list term) (weld prelude-values (weld (turn jimports |=(j=[face=term interface=ifile] face.j)) (global-value-names ds)))
@@ -16010,39 +11846,6 @@
16010 =/ resolution=iresolved (resolve-groups ds molds globals externals surs mark-externals marks jimports reserved-molds file prelude)
11846 =/ resolution=iresolved (resolve-groups ds molds globals externals surs mark-externals marks jimports reserved-molds file prelude)
16011 =/ cycles=(list icycle) (definite-value-cycles ds globals)
11847 =/ cycles=(list icycle) (definite-value-cycles ds globals)
16012 =/ env=ienv env.resolution
11848 =/ env=ienv env.resolution
16013− =/ recovered=(list term) ~
16014− =/ eligible=?
16015− ?& ?=(~ imports.p.parsed)
16016− ?=(~ jimports)
16017− !?=([%ui %api *] file)
16018− !?=([%ui %stores *] file)
16019− !(lien (global-value-names ds) |=(n=term =(n %main)))
16020− !(module-values-complete ds env)
16021− (lte (met 3 src) 65.536)
16022− (lte (lent ds) 64)
16023− ?| &(?=(~ prepared) ?=(~ prelude) ?=(~ prelude-values) ?=(~ reserved-molds) (module-scope-valid p.parsed ~ ~) (dg-source-candidate ds 64))
16024− ?& ?=(^ prepared)
16025− ?=(^ prelude)
16026− =(u.prelude iface.u.prepared)
16027− =(prelude-values values.u.prepared)
16028− =(reserved-molds molds.u.prepared)
16029− (module-scope-valid p.parsed values.u.prepared molds.u.prepared)
16030− (dg-prepared-candidate ds 64)
16031− ==
16032− ==
16033− ==
16034− =/ transaction=(unit dgcommit)
16035− ?. eligible ~
16036− ?~ prepared (dg-root-source file src)
16037− (dg-root-prepared file src u.prepared)
16038− =. recovered
16039− ?~ transaction ~
16040− ?. &((module-values-complete ds env.u.transaction) (dg-interface-safe env.u.transaction)) ~
16041− (turn (skim env.u.transaction |=(entry=[name=term scheme=ischeme] ?=(~ (ienv-lookup name.entry env)))) |=(entry=[name=term scheme=ischeme] name.entry))
16042− =. env
16043− ?~ transaction env
16044− ?: &((module-values-complete ds env.u.transaction) (dg-interface-safe env.u.transaction)) env.u.transaction
16045− env
16046 =/ source-defs=(map term def) (direct-checked-gates ds env)
11849 =/ source-defs=(map term def) (direct-checked-gates ds env)
16047 =/ heads=(unit igate-prelude-evidence) (direct-prelude-evidence ds prelude)
11850 =/ heads=(unit igate-prelude-evidence) (direct-prelude-evidence ds prelude)
16048 =/ lines=(list @t) ~
11851 =/ lines=(list @t) ~
@@ -16057,16 +11860,6 @@
16057 ?^ cycle
11860 ?^ cycle
16058 =/ diag=idiag ["non-gate value depends on itself through a cycle" ~[[first.i.cycle "value in cycle"] [next.i.cycle "dependency in cycle"]]]
11861 =/ diag=idiag ["non-gate value depends on itself through a cycle" ~[[first.i.cycle "value in cycle"] [next.i.cycle "dependency in cycle"]]]
16059 $(ds t.ds, lines [(show-inference-diagnostic file src name.d diag) lines])
11862 $(ds t.ds, lines [(show-inference-diagnostic file src name.d diag) lines])
16060− ?: (lien recovered |=(n=term =(n name.d)))
16061− =/ found=(unit ischeme) (ienv-lookup name.d env)
16062− ?~ found $(ds t.ds, lines [(crip "++ {(trip name.d)}: committed definition unavailable") lines])
16063− ?: (itype-has-hidden-recursive typ.u.found)
16064− $(ds t.ds, lines [(crip "++ {(trip name.d)}: recursive mold name is not available in this scope") lines])
16065− ?: (itype-has-hidden-generic typ.u.found)
16066− $(ds t.ds, lines [(crip "++ {(trip name.d)}: generic union name is not available in this scope") lines])
16067− =/ typ=itype (canonical-itype typ.u.found vars.u.found)
16068− =/ line=@t (crip "++ {(trip name.d)}: {(show-itype typ ~)}{(show-atom-constraint typ)}")
16069− $(ds t.ds, lines [line lines])
16070 ?: (lien grouped.resolution |=(n=term =(n name.d)))
11863 ?: (lien grouped.resolution |=(n=term =(n name.d)))
16071 =/ found=(unit ischeme) (ienv-lookup name.d env)
11864 =/ found=(unit ischeme) (ienv-lookup name.d env)
16072 ?~ found $(ds t.ds, lines [(crip "++ {(trip name.d)}: recursive group unavailable") lines])
11865 ?~ found $(ds t.ds, lines [(crip "++ {(trip name.d)}: recursive group unavailable") lines])
@@ -16074,12 +11867,12 @@
16074 =/ line=@t (crip "++ {(trip name.d)}: {(show-itype typ ~)}{(show-atom-constraint typ)}")
11867 =/ line=@t (crip "++ {(trip name.d)}: {(show-itype typ ~)}{(show-atom-constraint typ)}")
16075 $(ds t.ds, lines [line lines])
11868 $(ds t.ds, lines [line lines])
16076 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
11869 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
16077− =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | file top prelude ~ 256 ~ ~ ~ ~ ~ ~]
11870+ =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | file top prelude ~ 256 ~ ~ ~]
16078 =. gate-defs.initial source-defs
11871 =. gate-defs.initial source-defs
16079 =. head-evidence.initial heads
11872 =. head-evidence.initial heads
16080 =. initial (reserve-def-caps val.d initial)
11873 =. initial (reserve-def-caps val.d initial)
16081 =/ result=iresult
11874 =/ result=iresult
16082− ?: |(?=(%gate -.val.d) ?=(%gate-wide -.val.d) ?=(^ (unfaced-gate val.d env initial)))
11875+ ?: |(?=(%gate -.val.d) ?=(%gate-wide -.val.d))
16083 (infer-recursive-gate d env initial)
11876 (infer-recursive-gate d env initial)
16084 (infer-fragment val.d env initial)
11877 (infer-fragment val.d env initial)
16085 ?: ?=(%| -.result)
11878 ?: ?=(%| -.result)
@@ -16109,702 +11902,11 @@
16109 ?: (unsupported-atom-vars typ caps.state.p.result binders.state.p.result sub.state.p.result)
11902 ?: (unsupported-atom-vars typ caps.state.p.result binders.state.p.result sub.state.p.result)
16110 $(ds t.ds, lines [(crip "++ {(trip name.d)}: unresolved aura-variable inference") lines])
11903 $(ds t.ds, lines [(crip "++ {(trip name.d)}: unresolved aura-variable inference") lines])
16111 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
11904 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
11905+ ?: (gth (lent vars) 26)
11906+ $(ds t.ds, lines [(crip "++ {(trip name.d)}: too many variables for partial printer") lines])
16112 ?~ (width-finalize projections.state.p.result sub.state.p.result vars)
11907 ?~ (width-finalize projections.state.p.result sub.state.p.result vars)
16113 $(ds t.ds, lines [(crip "++ {(trip name.d)}: record projection elaboration needs unsupported inference") lines])
11908 $(ds t.ds, lines [(crip "++ {(trip name.d)}: record projection elaboration needs unsupported inference") lines])
16114− =/ named=[typ=itype vars=(list @ud)] (cap-names typ vars caps.state.p.result sub.state.p.result)
11909+ =/ printable=itype (canonical-itype typ vars)
16115− =/ printable=itype (canonical-itype named)
16116 =/ line=@t (crip "++ {(trip name.d)}: {(show-itype printable ~)}{(show-atom-constraint printable)}")
11910 =/ line=@t (crip "++ {(trip name.d)}: {(show-itype printable ~)}{(show-atom-constraint printable)}")
16117 $(ds t.ds, lines [line lines])
11911 $(ds t.ds, lines [line lines])
16118−:: Experimental module-owned pending-constraint generalization only.
16119−:: Inputs, IDs and substitution come from one checker-owned transaction.
16120−+$ dgscan [ids=(list @ud) fuel=@ud]
16121−++ dg-scan
16122− |= [todo=(list itype) sub=isub fuel=@ud ids=(list @ud)]
16123− ^- (unit dgscan)
16124− ?~ todo `[ids fuel]
16125− ?: =(0 fuel) ~
16126− =. fuel (dec fuel)
16127− =/ t=itype i.todo
16128− ?: ?=(?(%var %fvar %avar %rvar %nvar %rnvar %tag) -.t)
16129− =/ node-id=@ud ?:(?=(%tag -.t) id.t +.t)
16130− =/ found=(unit itype) (itype-lookup node-id sub)
16131− ?~ found $(todo t.todo, ids [node-id ids])
16132− ?: &(?=(?(%rvar %rnvar) -.u.found) =(node-id +.u.found))
16133− $(todo t.todo, ids [node-id ids])
16134− $(todo [u.found t.todo])
16135− ?: ?=(%jrec -.t) $(todo t.todo)
16136− ?+ -.t ~
16137− %collection $(todo (weld args.t t.todo))
16138− %union $(todo (weld args.t (weld cases.t t.todo)))
16139− %face $(todo [body.t t.todo])
16140− %fn $(todo [sample.t product.t t.todo])
16141− %cell $(todo [hed.t tal.t t.todo])
16142− %atom $(todo t.todo)
16143− %any-atom $(todo t.todo)
16144− %flag $(todo t.todo)
16145− %noun $(todo t.todo)
16146− %empty $(todo t.todo)
16147− %const $(todo t.todo)
16148− ==
16149−::
16150−++ dg-scan-ids
16151− |= [ids=(list @ud) sub=isub fuel=@ud blocked=(list @ud)]
16152− ^- (unit dgscan)
16153− ?~ ids `[blocked fuel]
16154− =/ one=(unit dgscan) (dg-scan ~[[%var i.ids]] sub fuel blocked)
16155− ?~ one ~
16156− $(ids t.ids, fuel fuel.u.one, blocked ids.u.one)
16157−::
16158−++ dg-env
16159− |= [env=ienv sub=isub fuel=@ud blocked=(list @ud)]
16160− ^- (unit dgscan)
16161− ?~ env `[blocked fuel]
16162− =/ sc=ischeme scheme.i.env
16163− :: Quantifiers are local to the scheme: first find raw free IDs, then
16164− :: follow those IDs in the module substitution without capturing them.
16165− =/ raw=(unit dgscan) (dg-scan ~[typ.sc] ~ fuel ~)
16166− ?~ raw ~
16167− =/ free=(list @ud) (skim ids.u.raw |=(n=@ud !(lien vars.sc |=(q=@ud =(q n)))))
16168− =/ resolved=(unit dgscan) (dg-scan-ids free sub fuel.u.raw blocked)
16169− ?~ resolved ~
16170− $(env t.env, fuel fuel.u.resolved, blocked ids.u.resolved)
16171−::
16172−++ dg-obligations
16173− |= [pending=(list dgo) sub=isub fuel=@ud blocked=(list @ud)]
16174− ^- (unit dgscan)
16175− ?~ pending `[blocked fuel]
16176− =/ found=(unit dgscan) (dg-scan ~[left.i.pending right.i.pending] sub fuel blocked)
16177− ?~ found ~
16178− $(pending t.pending, fuel fuel.u.found, blocked ids.u.found)
16179−::
16180−++ dg-tags
16181− |= [tags=(list ipending) sub=isub fuel=@ud blocked=(list @ud)]
16182− ^- (unit dgscan)
16183− ?~ tags `[blocked fuel]
16184− ?: =(0 fuel) ~
16185− =/ found=(unit itype) (itype-lookup id.i.tags sub)
16186− ?~ found $(tags t.tags, fuel (dec fuel), blocked [id.i.tags blocked])
16187− :: Until this entry is explicitly discharged, retain variables reachable
16188− :: through its binding; mere existence of a substitution is not proof.
16189− =/ reached=(unit dgscan) (dg-scan ~[u.found] sub (dec fuel) blocked)
16190− ?~ reached ~
16191− $(tags t.tags, fuel fuel.u.reached, blocked ids.u.reached)
16192−::
16193−++ dg-generalize
16194− |= [typ=itype env=ienv pending=(list dgo) tags=(list ipending) captured=(list @ud) state=istate fuel=@ud]
16195− ^- (unit ischeme)
16196− :: Bound the obligation list and all graph/substitution walks. The
16197− :: substitution is assumed checker-owned and occurs-checked.
16198− ?: (gth (lent pending) 64) ~
16199− =/ capt=(unit dgscan) (dg-scan-ids captured sub.state fuel ~)
16200− ?~ capt ~
16201− =/ env-free=(unit dgscan) (dg-env env sub.state fuel.u.capt ids.u.capt)
16202− ?~ env-free ~
16203− =/ obligations=(unit dgscan) (dg-obligations pending sub.state fuel.u.env-free ids.u.env-free)
16204− ?~ obligations ~
16205− =/ tagged=(unit dgscan) (dg-tags tags sub.state fuel.u.obligations ids.u.obligations)
16206− ?~ tagged ~
16207− =/ bounded=(unit dgscan) (dg-scan ~[typ] sub.state fuel.u.tagged ~)
16208− ?~ bounded ~
16209− =/ normalized=itype (itype-normalize typ sub.state)
16210− =/ vars=(list @ud) (unique-type-vars (itype-vars normalized))
16211− =/ quantified=(list @ud) (skim vars |=(n=@ud !(lien ids.u.tagged |=(b=@ud =(b n)))))
16212− `(cap-names normalized quantified caps.state sub.state)
16213−::
16214−+$ dgcommit [env=ienv state=istate]
16215−:: A branch literal must not acquire a value face through replay.
16216−++ dg-literal-target-safe
16217− |= target=itype
16218− ^- ?
16219− ?: ?=(%union -.target)
16220− (levy cases.target |=(c=itype ?=(?(%const %cell) -.c)))
16221− ?=(?(%const %atom %any-atom %flag %noun) -.target)
16222−::
16223−++ dg-replay-edges
16224− |= [edges=(list dgo) state=istate fuel=@ud]
16225− ^- (unit istate)
16226− ?~ edges `state
16227− ?: =(0 fuel) ~
16228− =/ trial=ifit (itype-fit left.i.edges right.i.edges sub.state next.state)
16229− ?. ?=(%ok -.trial) ~
16230− =/ valid=?
16231− ?: ?=(%tag -.left.i.edges)
16232− ?. constructor.left.i.edges
16233− =/ closed=(unit dgscan) (dg-scan ~[right.i.edges] sub.trial 512 ~)
16234− ?~ closed |
16235− ?^ ids.u.closed |
16236− (dg-literal-target-safe (itype-normalize right.i.edges sub.trial))
16237− =((itype-walk left.i.edges sub.trial) (itype-walk right.i.edges sub.trial))
16238− =((itype-walk left.i.edges sub.trial) (itype-walk right.i.edges sub.trial))
16239− ?. valid ~
16240− $(edges t.edges, state state(sub sub.trial, next next.trial), fuel (dec fuel))
16241−::
16242−++ dg-close-env
16243− |= [env=ienv sub=isub fuel=@ud]
16244− ^- (unit ienv)
16245− ?~ env `~
16246− ?: =(0 fuel) ~
16247− =/ s=ischeme scheme.i.env
16248− :: Quantified IDs are scheme-local and cannot be rewritten on publication.
16249− ?. (levy vars.s |=(n=@ud ?=(~ (itype-lookup n sub)))) ~
16250− =/ bounded=(unit dgscan) (dg-scan ~[typ.s] sub (dec fuel) ~)
16251− ?~ bounded ~
16252− =/ normalized=itype (itype-normalize typ.s sub)
16253− ?: (itype-has-tag normalized) ~
16254− =/ vars=(list @ud) (unique-type-vars (itype-vars normalized))
16255− ?. (levy vars |=(n=@ud (lien vars.s |=(v=@ud =(v n))))) ~
16256− =/ rest=(unit ienv) (dg-close-env t.env sub fuel.u.bounded)
16257− ?~ rest ~
16258− `[[name.i.env [normalized vars.s]] u.rest]
16259−::
16260−:: A deferred boolean branch has exactly the two literal flag patterns.
16261−:: Arms are inferred in order. Equal types are retained; two direct pending
16262−:: literals may instead retain source-owned obligations for later context.
16263−++ dg-boolean-patterns
16264− |= e=expr
16265− ^- ?
16266− ?. ?=(%branch -.e) |
16267− ?~ arms.e |
16268− ?~ t.arms.e |
16269− ?^ t.t.arms.e |
16270− =/ x=arm i.arms.e
16271− =/ y=arm i.t.arms.e
16272− ?. &(?=(%lit -.pat.x) ?=(%lit -.pat.y)) |
16273− ?. &(=(%loobean form.lit.pat.x) =(%loobean form.lit.pat.y)) |
16274− !=(val.lit.pat.x val.lit.pat.y)
16275−:: Only a direct source literal which created its own unbound pending tag
16276−:: may create a branch edge. The caller must retain the exact source and state.
16277−++ dg-owned-arm-literal
16278− |= [e=expr t=itype tags=(list ipending) sub=isub initial=@ud]
16279− ^- ?
16280− ?. ?=(%lit -.e) |
16281− ?. ?=(%tag -.t) |
16282− ?: constructor.t |
16283− ?. =(lit.e literal.t) |
16284− ?: (lth id.t initial) |
16285− ?^ (itype-lookup id.t sub) |
16286− (lien tags |=(x=ipending &(=(id.x id.t) =(literal.x literal.t))))
16287−++ dg-boolean-branch
16288− |= [e=expr env=ienv state=istate]
16289− ^- iresult
16290− ?. (dg-boolean-patterns e) [%| ["deferred branch patterns need unsupported inference" ~]]
16291− ?> ?=(%branch -.e)
16292− ?> ?=(^ arms.e)
16293− ?> ?=(^ t.arms.e)
16294− =/ x=arm i.arms.e
16295− =/ y=arm i.t.arms.e
16296− =/ subject=iresult (infer-fragment subject.e env state)
16297− ?: ?=(%| -.subject) subject
16298− =/ su=(unit isub) (itype-unify typ.p.subject [%flag ~] sub.state.p.subject)
16299− ?~ su [%| ["deferred branch subject does not unify with ?" ~]]
16300− =/ left=iresult (infer-fragment val.x env state.p.subject(sub u.su))
16301− ?: ?=(%| -.left) left
16302− =/ right=iresult (infer-fragment val.y env state.p.left)
16303− ?: ?=(%| -.right) right
16304− =/ joined=(unit [typ=itype sub=isub]) (itype-branch-join typ.p.left typ.p.right sub.state.p.right)
16305− ?^ joined [%& typ.u.joined state.p.right(sub sub.u.joined)]
16306− ?. (dg-stable-fit typ.p.left typ.p.right sub.state.p.right)
16307− =/ st=istate state.p.right
16308− ?. (dg-owned-arm-literal val.x typ.p.left tags.st sub.st next.state)
16309− [%| ["deferred branch arm context needs unsupported inference" ~]]
16310− ?. (dg-owned-arm-literal val.y typ.p.right tags.st sub.st next.state)
16311− [%| ["deferred branch arm context needs unsupported inference" ~]]
16312− ?> ?=(%tag -.typ.p.left)
16313− ?> ?=(%tag -.typ.p.right)
16314− ?: =(id.typ.p.left id.typ.p.right)
16315− [%| ["deferred branch arm context needs unsupported inference" ~]]
16316− ?: (gth (lent obligations.st) 62)
16317− [%| ["deferred branch arm context needs unsupported inference" ~]]
16318− =/ result=itype [%var next.st]
16319− =/ ex=dgo [typ.p.left result (span-of val.x) (span-of e)]
16320− =/ ey=dgo [typ.p.right result (span-of val.y) (span-of e)]
16321− [%& result st(next +(next.st), obligations [ex ey obligations.st])]
16322− [%& typ.p.left state.p.right]
16323−::
16324−:: A direct tuple literal may wait for a later exact result context.
16325−:: Each pending literal retains its source tag and its own fit obligation.
16326−++ dg-infer-tuple-items
16327− |= [items=(list item) env=ienv state=istate]
16328− ^- iresult
16329− ?~ items [%| ["empty cell is not supported by partial inference" ~]]
16330− =/ head=iresult (infer-fragment val.i.items env state)
16331− ?: ?=(%| -.head) head
16332− =/ typ=itype typ.p.head
16333− =/ st=istate state.p.head
16334− =/ adjusted=(unit [typ=itype state=istate])
16335− ?. (dg-owned-arm-literal val.i.items typ tags.st sub.st next.state) `[typ st]
16336− ?: (gth (lent obligations.st) 63) ~
16337− =/ pending=itype [%var next.st]
16338− =/ edge=dgo [typ pending (span-of val.i.items) at.i.items]
16339− `[pending st(next +(next.st), obligations [edge obligations.st])]
16340− ?~ adjusted [%| ["deferred tuple context needs unsupported inference" ~]]
16341− =. typ typ.u.adjusted
16342− =. st state.u.adjusted
16343− =. typ ?~(face.i.items typ [%face u.face.i.items typ])
16344− ?~ t.items [%& typ st]
16345− =/ tail=iresult $(items t.items, state st)
16346− ?: ?=(%| -.tail) tail
16347− [%& [%cell typ typ.p.tail] state.p.tail]
16348−::
16349−:: Deferred inference uses only source forms whose successful fit sites are
16350−:: guarded below; a shared source-node budget bounds this screen.
16351−++ dg-safe-expressions
16352− |= [todo=(list expr) fuel=@ud]
16353− ^- (unit @ud)
16354− ?~ todo `fuel
16355− =/ first=(unit @ud) (dg-safe-expression i.todo fuel)
16356− ?~ first ~
16357− $(todo t.todo, fuel u.first)
16358−++ dg-safe-items
16359− |= [items=(list item) fuel=@ud]
16360− ^- (unit @ud)
16361− ?~ items `fuel
16362− =/ first=(unit @ud) (dg-safe-expression val.i.items fuel)
16363− ?~ first ~
16364− $(items t.items, fuel u.first)
16365−++ dg-safe-expression
16366− |= [e=expr fuel=@ud]
16367− ^- (unit @ud)
16368− ?: =(0 fuel) ~
16369− =. fuel (dec fuel)
16370− ?+ -.e ~
16371− ?(%lit %ctor) `fuel
16372− %wing ?:(?=([@ ~] names.e) `fuel ~)
16373− %str
16374− ?. (levy pieces.e |=(p=piece ?=(%text -.p))) ~
16375− `fuel
16376− %group $(e inner.e, fuel fuel)
16377− %body
16378− ?^ defs.e ~
16379− $(e final.e, fuel fuel)
16380− %gate $(e body.e, fuel fuel)
16381− %gate-wide $(e body.e, fuel fuel)
16382− %tuple (dg-safe-items items.e fuel)
16383− %branch
16384− ?. (dg-boolean-patterns e) ~
16385− ?> ?=(^ arms.e)
16386− ?> ?=(^ t.arms.e)
16387− =/ subject=(unit @ud) $(e subject.e, fuel fuel)
16388− ?~ subject ~
16389− (dg-safe-expressions ~[val.i.arms.e val.i.t.arms.e] u.subject)
16390− %cast $(e val.e, fuel fuel)
16391− %call
16392− =/ head=(unit @ud) $(e head.e, fuel fuel)
16393− ?~ head ~
16394− (dg-safe-expressions args.e u.head)
16395− ==
16396−:: Exact normalized equality is preserved by all later substitutions.
16397−:: The bounded scan declines opaque types and oversized inputs.
16398−++ dg-stable-fit
16399− |= [actual=itype expected=itype sub=isub]
16400− ^- ?
16401− ?~ (dg-scan ~[actual expected] sub 512 ~) |
16402− =((itype-normalize actual sub) (itype-normalize expected sub))
16403−::
16404−:: A positional call peels sample-slot faces during its separate face check.
16405−:: Require its argument, sample and result closed so that check stays valid.
16406−++ dg-stable-call-fit
16407− |= [actual=itype expected=itype product=itype sub=isub positional=?]
16408− ^- ?
16409− =/ checked=(unit dgscan) (dg-scan ~[actual expected product] sub 512 ~)
16410− ?~ checked |
16411− ?: &(positional ?=(^ ids.u.checked)) |
16412− =((itype-normalize actual sub) (itype-normalize expected sub))
16413−::
16414−:: One definition attempt retains state only when inference succeeds.
16415−+$ dg-step [env=ienv state=istate pending=(list dgo)]
16416−++ dg-stage-one
16417− |= [d=def env=ienv state=istate]
16418− ^- (unit dg-step)
16419− ?> ?=(%value -.d)
16420− ?~ (dg-safe-expression val.d 512) ~
16421− =/ local=istate (reserve-def-caps val.d state)
16422− :: This first slice declines all written capitals and holes/projections.
16423− ?^ caps.local ~
16424− =/ ordinary=iresult (infer-fragment val.d env local)
16425− ?: ?=(%| -.ordinary) ~
16426− =/ typ=itype typ.p.ordinary
16427− =/ after=istate state.p.ordinary
16428− =/ edges=(list dgo) obligations.after
16429− ?. =(binders.after binders.state) ~
16430− ?. =(molds.after molds.state) ~
16431− ?. =(globals.after globals.state) ~
16432− ?. =(externals.after externals.state) ~
16433− ?. =(surs.after surs.state) ~
16434− ?. =(mark-externals.after mark-externals.state) ~
16435− ?. =(marks.after marks.state) ~
16436− ?. =(jimports.after jimports.state) ~
16437− ?. =(reserved-molds.after reserved-molds.state) ~
16438− ?. =(params.after params.state) ~
16439− ?. =(active.after active.state) ~
16440− ?. =(in-mold.after in-mold.state) ~
16441− ?. =(at.after at.state) ~
16442− ?. =(top-molds.after top-molds.state) ~
16443− ?. =(prelude.after prelude.state) ~
16444− ?. =(gate-defs.after gate-defs.state) ~
16445− ?. =(head-evidence.after head-evidence.state) ~
16446− ?. =(grec-index.after grec-index.state) ~
16447− ?. =(defer.after defer.state) ~
16448− ?. =(holes.after holes.state) ~
16449− ?. =(caps.after caps.state) ~
16450− ?. =(projections.after projections.state) ~
16451− ?: (unsupported-atom-vars (itype-normalize typ sub.after) caps.after binders.after sub.after) ~
16452− ?: (itype-has-nvar (itype-normalize typ sub.after)) ~
16453− =/ scheme=(unit ischeme) (dg-generalize typ env edges tags.after ~ after 32.768)
16454− ?~ scheme ~
16455− `[[[name.d u.scheme] env] after edges]
16456−:: Retry only definitions that did not infer. Successful definitions are
16457−:: committed into the local transaction, never published until all close.
16458−++ dg-stage
16459− |= [ds=(list def) base=ienv env=ienv state=istate pending=(list dgo) fuel=@ud]
16460− ^- (unit dgcommit)
16461− ?: (gth fuel 64) ~
16462− ?: (gth (lent ds) fuel) ~
16463− =/ remaining=(list def) ds
16464− =/ waiting=(list def) ~
16465− =/ progress=? |
16466− =/ attempts=@ud (mul fuel fuel)
16467− |-
16468− ?~ remaining
16469− ?^ waiting
16470− ?. progress ~
16471− $(remaining (flop waiting), waiting ~, progress |)
16472− =/ replayed=(unit istate) (dg-replay-edges pending state 64)
16473− ?~ replayed ~
16474− ?: (pending-tags tags.u.replayed sub.u.replayed) ~
16475− =/ closed-edges=(unit dgscan) (dg-obligations pending sub.u.replayed 32.768 ~)
16476− ?~ closed-edges ~
16477− ?^ ids.u.closed-edges ~
16478− =/ rechecked=(unit istate) (dg-replay-edges pending u.replayed 64)
16479− ?~ rechecked ~
16480− ?. =(sub.u.rechecked sub.u.replayed) ~
16481− ?. =(next.u.rechecked next.u.replayed) ~
16482− =/ closed=(unit ienv) (dg-close-env env sub.u.replayed 32.768)
16483− ?~ closed ~
16484− `[[u.closed u.replayed(defer ~, obligations ~)]]
16485− ?: =(0 attempts) ~
16486− =. attempts (dec attempts)
16487− =/ d=def i.remaining
16488− ?: ?=(%mold -.d) $(remaining t.remaining)
16489− ?^ (ienv-lookup name.d base) $(remaining t.remaining)
16490− ?^ (ienv-lookup name.d env) ~
16491− =/ done=(unit dg-step) (dg-stage-one d env state)
16492− ?~ done $(remaining t.remaining, waiting [d waiting])
16493− $(remaining t.remaining, env env.u.done, state state.u.done, pending pending.u.done, progress &)
16494−::
16495−:: Cheap bounded eligibility check on the already parsed source. This
16496−:: deliberately covers only direct constructor calls beneath transparent
16497−:: groups, gates, casts and definition-free bodies. Other shapes decline
16498−:: this fallback without a second parse or resolution pass.
16499−++ dg-direct-source
16500− |= [e=expr fuel=@ud]
16501− ^- ?
16502− ?: =(0 fuel) |
16503− ?+ -.e |
16504− %group $(e inner.e, fuel (dec fuel))
16505− %gate $(e body.e, fuel (dec fuel))
16506− %gate-wide $(e body.e, fuel (dec fuel))
16507− %cast $(e val.e, fuel (dec fuel))
16508− %body ?~(defs.e $(e final.e, fuel (dec fuel)) |)
16509− %call
16510− ?. ?=([* ~] args.e) |
16511− ?=(%ctor -.i.args.e)
16512− ==
16513−++ dg-source-candidate
16514− |= [ds=(list def) fuel=@ud]
16515− ^- ?
16516− ?~ ds |
16517− ?: =(0 fuel) |
16518− ?. ?=(%value -.i.ds) $(ds t.ds, fuel (dec fuel))
16519− ?: (dg-direct-source val.i.ds 64) &
16520− $(ds t.ds, fuel (dec fuel))
16521−::
16522−++ dg-prepared-source
16523− |= [e=expr fuel=@ud]
16524− ^- ?
16525− ?: (dg-direct-source e fuel) &
16526− ?: =(0 fuel) |
16527− ?+ -.e |
16528− %group $(e inner.e, fuel (dec fuel))
16529− %gate $(e body.e, fuel (dec fuel))
16530− %gate-wide $(e body.e, fuel (dec fuel))
16531− %cast $(e val.e, fuel (dec fuel))
16532− %body ?~(defs.e $(e final.e, fuel (dec fuel)) |)
16533− %tuple &
16534− ==
16535−++ dg-prepared-candidate
16536− |= [ds=(list def) fuel=@ud]
16537− ^- ?
16538− ?~ ds |
16539− ?: =(0 fuel) |
16540− ?. ?=(%value -.i.ds) $(ds t.ds, fuel (dec fuel))
16541− ?: (dg-prepared-source val.i.ds 64) &
16542− $(ds t.ds, fuel (dec fuel))
16543−::
16544−++ dg-interface-safe
16545− |= [env=ienv]
16546− ^- ?
16547− ?~ env &
16548− =/ sc=ischeme scheme.i.env
16549− ?: |((itype-has-hidden-recursive typ.sc) (itype-has-hidden-generic typ.sc)) |
16550− $(env t.env)
16551−:: Parse status and the transaction result come from the same source parse.
16552−+$ dgparse [parsed=? result=(unit dgcommit)]
16553−++ dg-root-source
16554− |= [at=path src=@t]
16555− ^- (unit dgcommit)
16556− result:(dg-root-detail at src)
16557−++ dg-root-detail
16558− |= [at=path src=@t]
16559− ^- dgparse
16560− =/ parsed (parse at src)
16561− ?: ?=(%| -.parsed) [| ~]
16562− =/ transact
16563− |.
16564− ?^ imports.p.parsed ~
16565− ?. (module-scope-valid p.parsed ~ ~) ~
16566− ?^ (duplicate-defs defs.p.parsed) ~
16567− =/ defs=(list def) defs.p.parsed
16568− ?: (gth (lent defs) 64) ~
16569− =/ molds=imolds (collect-simple-molds defs)
16570− =/ globals=(list term) (global-value-names defs)
16571− =/ resolution=iresolved (resolve-groups defs molds globals ~ ~ ~ ~ ~ ~ at ~)
16572− ?^ grouped.resolution ~
16573− ?^ artifacts.resolution ~
16574− =/ base=ienv env.resolution
16575− =/ free=(unit dgscan) (dg-env base ~ 32.768 ~)
16576− ?~ free ~
16577− ?^ ids.u.free ~
16578− =/ all=(unit @ud) (ienv-fresh-id base)
16579− ?~ all ~
16580− =/ fresh=@ud u.all
16581− =/ st=istate *istate
16582− =. st st(next fresh, defer `~, molds molds, globals globals, at at, top-molds (turn molds |=(m=[name=term body=shape] name.m)), in-mold |, jrec-fuel 256)
16583− =/ checked-molds=(each imold-types @t) (module-mold-types molds st)
16584− ?: ?=(%| -.checked-molds) ~
16585− (dg-stage defs base base st ~ 64)
16586− ::
16587− [& (transact)]
16588−:: The caller supplies the trusted prepared prelude. This transaction is
16589−:: only report evidence; the ordinary module resolver does not publish it.
16590−++ dg-root-prepared
16591− |= [at=path src=@t prepared=iprelude]
16592− ^- (unit dgcommit)
16593− ?: ?=([%ui %api *] at) ~
16594− ?: ?=([%ui %stores *] at) ~
16595− ?: (gth (met 3 src) 65.536) ~
16596− =/ parsed (parse at src)
16597− ?: ?=(%| -.parsed) ~
16598− ?^ imports.p.parsed ~
16599− ?. (module-scope-valid p.parsed values.prepared molds.prepared) ~
16600− ?^ (duplicate-defs defs.p.parsed) ~
16601− =/ defs=(list def) defs.p.parsed
16602− ?: (gth (lent defs) 64) ~
16603− ?: (lien (global-value-names defs) |=(n=term =(n %main))) ~
16604− ?. (dg-prepared-candidate defs 64) ~
16605− =/ local-molds=imolds (collect-simple-molds defs)
16606− =/ globals=(list term) (weld values.prepared (global-value-names defs))
16607− =/ iface=ifile iface.prepared
16608− =/ prelude=(unit ifile) `iface
16609− =/ resolution=iresolved
16610− (resolve-groups defs local-molds globals ~ ~ ~ ~ ~ molds.prepared at prelude)
16611− ?^ grouped.resolution ~
16612− ?^ artifacts.resolution ~
16613− =/ base=ienv env.resolution
16614− =/ templates=ienv
16615− (turn molds.iface |=(x=[name=term template=ischeme] [name.x template.x]))
16616− =/ all-env=ienv (weld base (weld values.iface templates))
16617− =/ free=(unit dgscan) (dg-env all-env ~ 32.768 ~)
16618− ?~ free ~
16619− ?^ ids.u.free ~
16620− =/ all=(unit @ud) (ienv-fresh-id all-env)
16621− ?~ all ~
16622− =/ fresh=@ud u.all
16623− =/ st=istate *istate
16624− =. st st(next fresh, defer `~, molds local-molds, globals globals, at at, reserved-molds molds.prepared, prelude prelude, top-molds (turn local-molds |=(m=[name=term body=shape] name.m)), in-mold |, jrec-fuel 256)
16625− =/ checked-molds=(each imold-types @t) (module-mold-types local-molds st)
16626− ?: ?=(%| -.checked-molds) ~
16627− (dg-stage defs base base st ~ 64)
16628−::
16629−:: +ienv-fresh-id: one above the largest type variable or tag ID in env
16630−::
16631−:: One pass over every ID in env's schemes, quantified or free, so a
16632−:: variable numbered from it captures none of them. A %recursive or
16633−:: %jrec type names its mold and holds no variable, so it is a leaf,
16634−:: and the pass is linear in the size of the types, with no budget.
16635−:: A scheme that still holds an unresolved tag declines.
16636−::
16637−++ ienv-fresh-id
16638− |= env=ienv
16639− ^- (unit @ud)
16640− =/ top=@ud 0
16641− |-
16642− ?~ env `+(top)
16643− =/ sc=ischeme scheme.i.env
16644− ?: (itype-has-tag typ.sc) ~
16645− $(env t.env, top (itype-max-id typ.sc (max top (roll (turn vars.sc var-count) max))))
16646−::
16647−:: +itype-max-id: the largest variable or tag ID in t, or top, without
16648−:: the variables' names (+named-var)
16649−::
16650−++ itype-max-id
16651− |= [t=itype top=@ud]
16652− ^- @ud
16653− ?- -.t
16654− %var (max top (var-count id.t))
16655− %fvar (max top (var-count id.t))
16656− %avar (max top (var-count id.t))
16657− %rvar (max top (var-count id.t))
16658− %nvar (max top (var-count id.t))
16659− %rnvar (max top (var-count id.t))
16660− %tag (max top id.t)
16661− ?(%atom %any-atom %flag %noun %empty %const %recursive %jrec) top
16662− %collection (itype-max-ids args.t top)
16663− %grec (itype-max-ids args.t top)
16664− %union (itype-max-ids args.t (itype-max-ids cases.t top))
16665− %face $(t body.t)
16666− %fn $(t sample.t, top $(t product.t))
16667− %cell $(t hed.t, top $(t tal.t))
16668− ==
16669−::
16670−++ itype-max-ids
16671− |= [ts=(list itype) top=@ud]
16672− ^- @ud
16673− ?~ ts top
16674− $(ts t.ts, top (itype-max-id i.ts top))
16675−::
16676−++ dg-eligible-ctor
16677− |= [e=expr head=itype actual=itype expected=itype state=istate]
16678− ^- (unit dgo)
16679− ?. ?=(%call -.e) ~
16680− ?. ?=([* ~] args.e) ~
16681− ?. ?=(%ctor -.i.args.e) ~
16682− ?. ?=(%fn -.head) ~
16683− ?. ?=(%fn -.expected) ~
16684− ?. ?=(%tag -.actual) ~
16685− ?. constructor.actual ~
16686− ?. ?=(%var -.product.expected) ~
16687− ?^ (itype-lookup id.product.expected sub.state) ~
16688− =/ bounded=(unit dgscan) (dg-scan ~[sample.expected] sub.state 256 ~)
16689− ?~ bounded ~
16690− ?^ ids.u.bounded ~
16691− `[[actual expected (span-of i.args.e) (span-of head.e)]]
16692−::
16693−:: Experimental per-module, source-derived recursive tree index.
16694−:: The two tags and the exact children/list/self layout are fixed-shape
16695−:: checks, so ordinary definitions incur no type-tree or source scans.
16696−++ grec-tagged-fields
16697− |= sh=shape
16698− ^- (unit [tag=@ fields=(list field)])
16699− ?. ?=(%cell -.sh) ~
16700− ?~ fields.sh ~
16701− =/ head=field i.fields.sh
16702− ?. ?=(%bare -.head) ~
16703− ?. ?=(%const -.shape.head) ~
16704− ?. &(?=(%term form.lit.shape.head) =(%tas aura.lit.shape.head)) ~
16705− `[val.lit.shape.head t.fields.sh]
16706−++ grec-tree-children
16707− |= [fs=(list field) param=@t]
16708− ^- (unit field)
16709− ?~ fs ~
16710− ?~ t.fs `i.fs
16711− ?^ t.t.fs ~
16712− =/ event=field i.fs
16713− =/ kids=field i.t.fs
16714− ?. &(?=(%face -.event) ?=(%face -.kids)) ~
16715− ?. !=(name.event name.kids) ~
16716− ?. ?=(%fn -.shape.event) ~
16717− ?. ?=(%aura -.sample.shape.event) ~
16718− ?. =(%t aura.sample.shape.event) ~
16719− ?. ?=(%tvar -.product.shape.event) ~
16720− ?. =(param name.product.shape.event) ~
16721− `kids
16722−::
16723−++ grec-tree-proof
16724− |= [name=term sh=shape]
16725− ^- ?
16726− ?. ?=(%generic -.sh) |
16727− ?. ?=([@ ~] vars.sh) |
16728− =/ param=@t i.vars.sh
16729− ?. ?=(%union -.body.sh) |
16730− ?. ?=([* [* ~]] cases.body.sh) |
16731− =/ a=(unit [tag=@ fields=(list field)]) (grec-tagged-fields i.cases.body.sh)
16732− =/ b=(unit [tag=@ fields=(list field)]) (grec-tagged-fields i.t.cases.body.sh)
16733− ?~ a |
16734− ?~ b |
16735− ?. !=(tag.u.a tag.u.b) |
16736− ?. ?=([* ~] fields.u.a) |
16737− =/ value=field i.fields.u.a
16738− ?. ?=(%face -.value) |
16739− ?. ?=(%aura -.shape.value) |
16740− ?. =(%t aura.shape.value) |
16741− =/ selected=(unit field) (grec-tree-children fields.u.b param)
16742− ?~ selected |
16743− =/ kids=field u.selected
16744− ?. ?=(%face -.kids) |
16745− ?. ?=(%apply -.shape.kids) |
16746− ?. =(ref.shape.kids ~[%list]) |
16747− ?. ?=([* ~] args.shape.kids) |
16748− =/ self=shape i.args.shape.kids
16749− ?. ?=(%apply -.self) |
16750− ?. =(ref.self ~[name]) |
16751− ?. ?=([* ~] args.self) |
16752− ?. ?=(%tvar -.i.args.self) |
16753− =(name.i.args.self param)
16754−+$ grec-collected [molds=imolds proofs=(map term shape)]
16755−:: Experimental one-layer analysis view, never an exported mold identity.
16756−++ grec-unfold-view
16757− |= [typ=itype fuel=@ud]
16758− ^- (unit [view=itype left=@ud])
16759− ?. ?=(%grec -.typ) ~
16760− ?: =(fuel 0) ~
16761− ?. ?=([* ~] args.typ) ~
16762− =/ sh=shape proof.typ
16763− ?. (grec-tree-proof name.typ sh) ~
16764− ?> ?=(%generic -.sh)
16765− ?> ?=([@ ~] vars.sh)
16766− ?> ?=(%union -.body.sh)
16767− ?> ?=([* [* ~]] cases.body.sh)
16768− =/ ca=shape i.cases.body.sh
16769− =/ cb=shape i.t.cases.body.sh
16770− ?> ?=(%cell -.ca)
16771− ?> ?=(%cell -.cb)
16772− ?> ?=([* [* ~]] fields.ca)
16773− ?> ?=([* *] fields.cb)
16774− =/ tag-a=field i.fields.ca
16775− =/ tag-b=field i.fields.cb
16776− ?> ?=(%bare -.tag-a)
16777− ?> ?=(%bare -.tag-b)
16778− ?> ?=(%const -.shape.tag-a)
16779− ?> ?=(%const -.shape.tag-b)
16780− =/ text-field=field i.t.fields.ca
16781− ?> ?=(%face -.text-field)
16782− =/ branch=(list field) t.fields.cb
16783− =/ kids=(unit field) (grec-tree-children branch i.vars.sh)
16784− ?~ kids ~
16785− ?> ?=(%face -.u.kids)
16786− =/ children=itype [%face name.u.kids [%collection %list ~[typ]]]
16787− ?> ?=(^ branch)
16788− =/ payload=itype
16789− ?~ t.branch children
16790− =/ event=field i.branch
16791− ?> ?=(%face -.event)
16792− [%cell [%face name.event [%fn [%atom %t] i.args.typ]] children]
16793− =/ leaf=itype [%cell [%const lit.shape.tag-a] [%face name.text-field [%atom %t]]]
16794− =/ node=itype [%cell [%const lit.shape.tag-b] payload]
16795− `[[%union ~[leaf node] ~ ~ ~] (dec fuel)]
16796−::
16797−++ grec-collect-molds
16798− |= ds=(list def)
16799− ^- grec-collected
16800− ?~ ds [~ *(map term shape)]
16801− =/ rest=grec-collected $(ds t.ds)
16802− ?. ?=(%mold -.i.ds) rest
16803− =/ name=term name.i.ds
16804− =/ body=shape shape.i.ds
16805− =/ proofs=(map term shape) proofs.rest
16806− =? proofs (grec-tree-proof name body) (~(put by proofs) name body)
16807− [[[name body] molds.rest] proofs]
16808−::
16809−
16810--
11912--
jibb-dev/lib/jibb/internal.jibb+1−4
@@ -3,13 +3,12 @@
3:: Representation for agent and in-process store pokes.
3:: Representation for agent and in-process store pokes.
4:: The prelude re-exports this mold; effect lowering and the runtime must
4:: The prelude re-exports this mold; effect lowering and the runtime must
5:: agree on these cells when effect execution is implemented.
5:: agree on these cells when effect execution is implemented.
6−+$ raw-poke
6++$ poke
7 [%agent agent=@tas mark=@tas payload=*]
7 [%agent agent=@tas mark=@tas payload=*]
8 [%store module=@t action=@tas payload=*]
8 [%store module=@t action=@tas payload=*]
9
9
10:: The compiler supplies this private interface; execution is not yet implemented.
10:: The compiler supplies this private interface; execution is not yet implemented.
11++ gth-atom |= args=[A A] (raw-gth.core args)
11++ gth-atom |= args=[A A] (raw-gth.core args)
12−++ eq-data |= args=[A A] (raw-eq.core args)
13
12
14:: Application paths are knot sequences.
13:: Application paths are knot sequences.
15+$ qath
14+$ qath
@@ -19,8 +18,6 @@
19:: Private compiler primitive wrappers; execution is a later milestone.
18:: Private compiler primitive wrappers; execution is a later milestone.
20++ add-atom |= args=[A A] (raw-add.core args)
19++ add-atom |= args=[A A] (raw-add.core args)
21++ dec-atom |= atom=A (raw-dec.core atom)
20++ dec-atom |= atom=A (raw-dec.core atom)
22−++ trip-text |= value=@t (raw-trip.core value)
23−++ tuba-text |= values (raw-tuba.core values)
24
21
25:: Transparent request data. Identity and path fields are writable and do not
22:: Transparent request data. Identity and path fields are writable and do not
26:: prove a schema or watchability. A future executor must bind them to checked
23:: prove a schema or watchability. A future executor must bind them to checked
jibb-dev/lib/jibb/prelude.jibb+149−346
@@ -1,5 +1,5 @@
1/= internal /lib/jibb/internal
1/= internal /lib/jibb/internal
2−+$ raw-poke raw-poke.internal
2++$ poke poke.internal
3+$ qath qath.internal
3+$ qath qath.internal
4
4
5:: Initial prelude functions. The rest of the inventory is still to come.
5:: Initial prelude functions. The rest of the inventory is still to come.
@@ -8,18 +8,16 @@
8
8
9++ head |= p=[A B]
9++ head |= p=[A B]
10 ?- p
10 ?- p
11− [a b] a
11+ [a b] a
12
12
13++ tail |= p=[A B]
13++ tail |= p=[A B]
14 ?- p
14 ?- p
15− [a b] b
15+ [a b] b
16
16
17++ not |= b=?
17++ not |= b=?
18 ?- b
18 ?- b
19− %.y %.n
19+ %.y %.n
20− %.n %.y
20+ %.n %.y
21−
22−++ eq |= args=[A A] (eq-data.internal args)
23
21
24+$ list |$ [A]
22+$ list |$ [A]
25 ~
23 ~
@@ -31,29 +29,31 @@
31
29
32++ fall |= args=[(unit A) A]
30++ fall |= args=[(unit A) A]
33 ?- args
31 ?- args
34− [maybe fallback]
32+ [maybe fallback]
35− ?- maybe
33+ ?- maybe
36− ~ fallback
34+ ~ fallback
37− [~ value] value
35+ [~ value] value
38
36
39++ need |= maybe=(unit A)
37++ need |= maybe=(unit A)
40 ?- maybe
38 ?- maybe
41− ~ !!
39+ ~ !!
42− [~ value] value
40+ [~ value] value
43
41
44++ weld |= args=[(list A) (list A)]
42++ weld |= args=[(list A) (list A)]
45 ?- args
43 ?- args
46− [xs ys] ^- (list A)
44+ [xs ys]
47− ?- xs
45+ ^- (list A)
48− ~ ys
46+ ?- xs
49− [item rest] [item (weld rest ys)]
47+ ~ ys
48+ [item rest] [item (weld rest ys)]
50
49
51++ turn |= args=[(list A) $-(A B)]
50++ turn |= args=[(list A) $-(A B)]
52 ?- args
51 ?- args
53− [xs f] ^- (list B)
52+ [xs f]
54− ?- xs
53+ ^- (list B)
55− ~ ~
54+ ?- xs
56− [item rest] [(f item) (turn rest f)]
55+ ~ ~
56+ [item rest] [(f item) (turn rest f)]
57
57
58+$ dime [p=@ta q=@]
58+$ dime [p=@ta q=@]
59
59
@@ -102,16 +102,17 @@
102+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]
102+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]
103
103
104++ like |= [f=$-(A B) result=(like A)]
104++ like |= [f=$-(A B) result=(like A)]
105− ++ mapped ^- (unit [p=B q=nail])
105+ ++ mapped
106− ?- q.result
106+ ^- (unit [p=B q=nail])
107− ~ ~
107+ ?- q.result
108− [~ value] `[p=(f p.value) q=q.value]
108+ ~ ~
109+ [~ value] `[p=(f p.value) q=q.value]
109 ^- (like B) [p=p.result q=mapped]
110 ^- (like B) [p=p.result q=mapped]
110
111
111++ wonk |= veq=(like A)
112++ wonk |= veq=(like A)
112 ?- q.veq
113 ?- q.veq
113− ~ !!
114+ ~ !!
114− [~ product] p.product
115+ [~ product] p.product
115
116
116+$ lone |$ [A] [p=A]
117+$ lone |$ [A] [p=A]
117
118
@@ -140,212 +141,191 @@
140
141
141++ snoc |= args=[(list A) A]
142++ snoc |= args=[(list A) A]
142 ?- args
143 ?- args
143− [xs item] (weld xs [item ~])
144+ [xs item] (weld xs [item ~])
144
145
145++ flop |= xs=(list A)
146++ flop |= xs=(list A)
146 ++ reverse-into |= args=[(list A) (list A)]
147 ++ reverse-into |= args=[(list A) (list A)]
147 ?- args
148 ?- args
148− [rest acc]
149+ [rest acc]
149− ?- rest
150+ ?- rest
150− ~ acc
151+ ~ acc
151− [item more] (reverse-into more [item acc])
152+ [item more] (reverse-into more [item acc])
152 (reverse-into xs ~)
153 (reverse-into xs ~)
153
154
154−++ drop |= maybe=(unit A) ^- (list A)
155+++ drop |= maybe=(unit A)
155− ?- maybe
156+ ^- (list A)
156− ~ ~
157+ ?- maybe
157− [~ value] [value ~]
158+ ~ ~
159+ [~ value] [value ~]
158
160
159++ bond |= fallback=$-(~ A)
161++ bond |= fallback=$-(~ A)
160 |= maybe=(unit A)
162 |= maybe=(unit A)
161 ?- maybe
163 ?- maybe
162− ~ (fallback ~)
164+ ~ (fallback ~)
163− [~ value] value
165+ [~ value] value
164
166
165++ bind |= args=[(unit A) $-(A B)]
167++ bind |= args=[(unit A) $-(A B)]
166 ?- args
168 ?- args
167− [maybe f] ^- (unit B)
169+ [maybe f] ^- (unit B)
168− ?- maybe
170+ ?- maybe
169− ~ ~
171+ ~ ~
170− [~ value] `(f value)
172+ [~ value] `(f value)
171
173
172++ biff |= args=[(unit A) $-(A (unit B))]
174++ biff |= args=[(unit A) $-(A (unit B))]
173 ?- args
175 ?- args
174− [maybe f] ^- (unit B)
176+ [maybe f] ^- (unit B)
175− ?- maybe
177+ ?- maybe
176− ~ ~
178+ ~ ~
177− [~ value] (f value)
179+ [~ value] (f value)
178
180
179++ both |= args=[(unit A) (unit B)]
181++ both |= args=[(unit A) (unit B)]
180 ?- args
182 ?- args
181− [first second] ^- (unit [A B])
183+ [first second] ^- (unit [A B])
182− ?- first
184+ ?- first
183− ~ ~
185+ ~ ~
184− [~ a]
186+ [~ a]
185− ?- second
187+ ?- second
186− ~ ~
188+ ~ ~
187− [~ b] `[a b]
189+ [~ b] `[a b]
188
190
189++ clap |= args=[(unit A) (unit A) $-([A A] A)]
191++ clap |= args=[(unit A) (unit A) $-([A A] A)]
190 ?- args
192 ?- args
191− [first second combine] ^- (unit A)
193+ [first second combine] ^- (unit A)
192− ?- first
193− ~ second
194− [~ a]
195− ?- second
196− ~ first
197− [~ b] `(combine a b)
198−
199−++ hunt |= args=[$-([A A] ?) (unit A) (unit A)]
200− ?- args
201− [choose first second] ^- (unit A)
202− ?- first
203− ~ second
204− [~ a]
205− ?- second
206− ~ first
207− [~ b]
208− ?- (choose a b)
209− %.y first
210− %.n second
211−
212−++ mate |= args=[(unit A) (unit A)]
213− ?- args
214− [first second] ^- (unit A)
215− ?- second
216− ~ first
217− [~ b]
218 ?- first
194 ?- first
219− ~ second
195+ ~ second
220− [~ a]
196+ [~ a]
221− ?- (eq a b)
197+ ?- second
222− %.y first
198+ ~ first
223− %.n !!
199+ [~ b] `(combine a b)
224
200
225++ clef |= args=[(unit A) (unit B) $-([A B] (unit C))]
201++ clef |= args=[(unit A) (unit B) $-([A B] (unit C))]
226 ?- args
202 ?- args
227− [first second combine] ^- (unit C)
203+ [first second combine] ^- (unit C)
228− ?- first
204+ ?- first
229− ~ ~
205+ ~ ~
230− [~ a]
206+ [~ a]
231− ?- second
207+ ?- second
232− ~ ~
208+ ~ ~
233− [~ b] (combine a b)
209+ [~ b] (combine a b)
234
210
235++ skim |= args=[(list A) $-(A ?)]
211++ skim |= args=[(list A) $-(A ?)]
236 ?- args
212 ?- args
237− [xs predicate] ^- (list A)
213+ [xs predicate] ^- (list A)
238− ?- xs
214+ ?- xs
239− ~ ~
215+ ~ ~
240− [item rest]
216+ [item rest]
241− ?- (predicate item)
217+ ?- (predicate item)
242− %.y [item (skim rest predicate)]
218+ %.y [item (skim rest predicate)]
243− %.n (skim rest predicate)
219+ %.n (skim rest predicate)
244
220
245++ skip |= args=[(list A) $-(A ?)]
221++ skip |= args=[(list A) $-(A ?)]
246 ?- args
222 ?- args
247− [xs predicate] ^- (list A)
223+ [xs predicate] ^- (list A)
248− ?- xs
224+ ?- xs
249− ~ ~
225+ ~ ~
250− [item rest]
226+ [item rest]
251− ?- (predicate item)
227+ ?- (predicate item)
252− %.y (skip rest predicate)
228+ %.y (skip rest predicate)
253− %.n [item (skip rest predicate)]
229+ %.n [item (skip rest predicate)]
254−
230+
255−++ levy |= args=[(list A) $-(A ?)] ^- ?
231+++ levy |= args=[(list A) $-(A ?)]
256− ?- args
232+ ^- ?
257− [xs predicate]
233+ ?- args
258− ?- xs
234+ [xs predicate]
259− ~ %.y
235+ ?- xs
260− [item rest]
236+ ~ %.y
261− ?- (predicate item)
237+ [item rest]
262− %.y (levy rest predicate)
238+ ?- (predicate item)
263− %.n %.n
239+ %.y (levy rest predicate)
264−
240+ %.n %.n
265−++ lien |= args=[(list A) $-(A ?)] ^- ?
241+
266− ?- args
242+++ lien |= args=[(list A) $-(A ?)]
267− [xs predicate]
243+ ^- ?
268− ?- xs
244+ ?- args
269− ~ %.n
245+ [xs predicate]
270− [item rest]
246+ ?- xs
271− ?- (predicate item)
247+ ~ %.n
272− %.y %.y
248+ [item rest]
273− %.n (lien rest predicate)
249+ ?- (predicate item)
250+ %.y %.y
251+ %.n (lien rest predicate)
274
252
275++ roll |= args=[(list A) B $-([A B] B)]
253++ roll |= args=[(list A) B $-([A B] B)]
276 ?- args
254 ?- args
277− [xs start combine]
255+ [xs start combine]
278− ?- xs
256+ ?- xs
279− ~ start
257+ ~ start
280− [item rest] (roll rest (combine item start) combine)
258+ [item rest] (roll rest (combine item start) combine)
281
259
282++ reel |= args=[(list A) B $-([A B] B)]
260++ reel |= args=[(list A) B $-([A B] B)]
283 ?- args
261 ?- args
284− [xs start combine]
262+ [xs start combine]
285− ?- xs
263+ ?- xs
286− ~ start
264+ ~ start
287− [item rest] (combine item (reel rest start combine))
265+ [item rest] (combine item (reel rest start combine))
288
266
289++ flit |= predicate=$-(A ?)
267++ flit |= predicate=$-(A ?)
290− |= value=A ^- (unit A)
268+ |= value=A
291− ?- (predicate value)
269+ ^- (unit A)
292− %.y `value
270+ ?- (predicate value)
293− %.n ~
271+ %.y `value
272+ %.n ~
294
273
295++ murn |= args=[(list A) $-(A (unit B))]
274++ murn |= args=[(list A) $-(A (unit B))]
296 ?- args
275 ?- args
297− [xs f] ^- (list B)
276+ [xs f] ^- (list B)
298− ?- xs
277+ ?- xs
299− ~ ~
278+ ~ ~
300− [item rest]
279+ [item rest]
301− ?- (f item)
280+ ?- (f item)
302− ~ (murn rest f)
281+ ~ (murn rest f)
303− [~ value] [value (murn rest f)]
282+ [~ value] [value (murn rest f)]
304
283
305++ join |= args=[A (list A)]
284++ join |= args=[A (list A)]
306 ?- args
285 ?- args
307− [separator xs] ^- (list A)
286+ [separator xs] ^- (list A)
287+ ?- xs
288+ ~ ~
289+ [item rest]
290+ ?- rest
291+ ~ [item ~]
292+ [next more] [item [separator (join separator rest)]]
293+
294+++ snip |= xs=(list A)
295+ ^- (list A)
308 ?- xs
296 ?- xs
309− ~ ~
297+ ~ ~
310− [item rest]
298+ [item rest]
311− ?- rest
299+ ?- rest
312− ~ [item ~]
300+ ~ ~
313− [next more] [item [separator (join separator rest)]]
301+ [next more] [item (snip rest)]
314−
315−++ snip |= xs=(list A) ^- (list A)
316− ?- xs
317− ~ ~
318− [item rest]
319− ?- rest
320− ~ ~
321− [next more] [item (snip rest)]
322
302
323++ rear |= xs=(list A)
303++ rear |= xs=(list A)
324 ?- xs
304 ?- xs
325− ~ !!
305+ ~ !!
326− [item rest]
306+ [item rest]
327− ?- rest
307+ ?- rest
328− ~ item
308+ ~ item
329− [next more] (rear rest)
309+ [next more] (rear rest)
330
310
331++ cork |= gates=[$-(A B) $-(B C)]
311++ cork |= gates=[$-(A B) $-(B C)]
332 ?- gates
312 ?- gates
333− [f g] |= x=A (g (f x))
313+ [f g] |= x=A (g (f x))
334
314
335++ corl |= gates=[$-(B C) $-(A B)]
315++ corl |= gates=[$-(B C) $-(A B)]
336 ?- gates
316 ?- gates
337− [f g] |= x=A (f (g x))
317+ [f g] |= x=A (f (g x))
338
318
339++ cury |= args=[$-([A B] C) A]
319++ cury |= args=[$-([A B] C) A]
340 ?- args
320 ?- args
341− [f a] |= b=B (f a b)
321+ [f a] |= b=B (f a b)
342
322
343++ curr |= args=[$-([A B] C) B]
323++ curr |= args=[$-([A B] C) B]
344 ?- args
324 ?- args
345− [f b] |= a=A (f a b)
325+ [f b] |= a=A (f a b)
346
326
347+$ cmd |$ [M]
327+$ cmd |$ [M]
348− [%poke p=raw-poke reply=$-((unit @t) M)]
328+ [%poke p=poke reply=$-((unit @t) M)]
349 [%go url=@t]
329 [%go url=@t]
350 [%wait gap=@dr msg=M]
330 [%wait gap=@dr msg=M]
351 [%now reply=$-(@da M)]
331 [%now reply=$-(@da M)]
@@ -363,180 +343,3 @@
363 [%watch a=(ask M)]
343 [%watch a=(ask M)]
364 [%every gap=@dr reply=$-(@da M)]
344 [%every gap=@dr reply=$-(@da M)]
365 [%url reply=$-(path M)]
345 [%url reply=$-(path M)]
366−
367−:: Count a finite list with the source-backed addition gate.
368−++ lent |= xs=(list A) ^- @ud
369− ?- xs
370− ~ 0
371− [item rest] (add 1 (lent rest))
372−
373−++ lth |= args=[A A]
374− ?- args
375− [x y] (gth y x)
376−
377−++ gte |= args=[A A]
378− ?- args
379− [x y] (not (gth y x))
380−
381−++ lte |= args=[A A]
382− ?- args
383− [x y] (not (gth x y))
384−
385−++ zing |= xss=(list (list A)) ^- (list A)
386− ?- xss
387− ~ ~
388− [xs rest] (weld xs (zing rest))
389−
390−++ lead |= first=A |= second=B [first second]
391−++ late |= second=B |= first=A [first second]
392−
393−++ succ |= x=A (add x 1)
394−
395−++ trip |= value=@t (trip-text.internal value)
396−++ tuba |= values=(list @tD) (tuba-text.internal values)
397−
398−:: UI values are source-level descriptions only. Nested element payloads are
399−:: erased in the nonrecursive union; the public constructors below retain the
400−:: typed composition boundaries. Raw-constructor encapsulation, rendering and
401−:: execution are not established by this slice.
402−+$ length
403− [%chars n=@ud]
404− [%fill n=@ud]
405− %shrink
406−
407−+$ align
408− %start
409− %center
410− %end
411−
412−+$ role
413− %body
414− %caption
415− %label
416−
417−+$ tone
418− %normal
419− %muted
420− %accent
421− %danger
422−
423−+$ attr
424− [%pad %s0]
425− [%pad %s1]
426− [%pad %s2]
427− [%pad %s3]
428− [%gap %s0]
429− [%gap %s1]
430− [%gap %s2]
431− [%gap %s3]
432− [%width width=length]
433− [%align align=align]
434− [%role role=role]
435− [%tone tone=tone]
436−
437−+$ element |$ [M]
438− [%row attrs=(list attr) kids=*]
439− [%column attrs=(list attr) kids=*]
440− [%wrap attrs=(list attr) kids=*]
441− [%stack attrs=(list attr) kids=*]
442− [%el attrs=(list attr) kid=*]
443− [%para kids=*]
444− [%text words=@t]
445− [%heading level=@ud words=@t]
446− [%each items=*]
447− [%table columns=* rows=*]
448− [%image source=qath description=@t]
449− [%image-unsafe source=[url=@t width=@ud height=@ud] description=@t]
450− [%link target=qath label=@t]
451− [%link-unsafe target=@t label=@t]
452− [%button label=@t message=M]
453− [%toggle on=? label=@t message=M]
454− [%field label=@t value=@t reply=$-(@t M)]
455− [%form message=M kids=*]
456− [%island payload=*]
457−
458−++ row |= [attrs=(list attr) kids=(list (element M))]
459− ^- (element M) [%row attrs kids]
460−
461−++ column |= [attrs=(list attr) kids=(list (element M))]
462− ^- (element M) [%column attrs kids]
463−
464−++ wrap |= [attrs=(list attr) kids=(list (element M))]
465− ^- (element M) [%wrap attrs kids]
466−
467−++ stack |= [attrs=(list attr) kids=(list (element M))]
468− ^- (element M) [%stack attrs kids]
469−
470−++ el |= [attrs=(list attr) kid=(element M)]
471− ^- (element M) [%el attrs kid]
472−
473−++ para |= kids=(list (element M))
474− ^- (element M) [%para kids]
475−
476−++ text |= words=@t
477− ^- (element M) [%text words]
478−
479−++ heading |= [level=@ud words=@t]
480− ^- (element M) [%heading level words]
481−
482−++ each |= items=(list [key=K el=(element M)])
483− ^- (element M) [%each items]
484−
485−++ table |= [columns=(list [header=@t width=length align=align]) rows=(list [key=K cells=(list (element M))])]
486− ^- (element M) [%table columns rows]
487−
488−++ image |= [source=qath description=@t]
489− ^- (element M) [%image source description]
490−
491−++ image-unsafe |= [source=[url=@t width=@ud height=@ud] description=@t]
492− ^- (element M) [%image-unsafe source description]
493−
494−++ link |= [target=qath label=@t]
495− ^- (element M) [%link target label]
496−
497−++ link-unsafe |= [target=@t label=@t]
498− ^- (element M) [%link-unsafe target label]
499−
500−++ button |= [label=@t message=M]
501− ^- (element M) [%button label message]
502−
503−++ toggle |= [on=? label=@t message=M]
504− ^- (element M) [%toggle on label message]
505−
506−++ field |= [label=@t value=@t reply=$-(@t M)]
507− ^- (element M) [%field label value reply]
508−
509−++ form |= [message=M kids=(list (element M))]
510− ^- (element M) [%form message kids]
511−
512−+$ theme
513− [ space=[s1=@t s2=@t s3=@t]
514− tones=[normal=@t background=@t accent=@t danger=@t muted=@t]
515− wide=@t
516− lang=@t
517− zone=@t
518− font=(unit qath)
519− dark=(unit [tones=[normal=@t background=@t accent=@t danger=@t muted=@t]])
520−
521−+$ program |$ [Data Model Msg]
522− [ init=$-(Data Model)
523− update=$-([Msg Model] [Model (list (cmd Msg))])
524− view=$-(Model (element Msg))
525− subs=$-(Model (list (sub Msg)))
526−
527−++ program |= [init=$-(Data Model) update=$-([Msg Model] [Model (list (cmd Msg))]) view=$-(Model (element Msg)) subs=$-(Model (list (sub Msg)))]
528− ^- (program Data Model Msg) [init update view subs]
529−
530−++ island |= [p=(program Data Model Msg) data=Data]
531− ^- (element !!) [%island [p data]]
532−
533−+$ page |$ [Params Data]
534− [load=$-(Params (ask Data)) view=$-(Data (element !!))]
535−
536−++ page |= [load=$-(Params (ask Data)) view=$-(Data (element !!))]
537− ^- (page Params Data) [load view]
538−
539−+$ store |$ [S] [init=S update=*]
540−
541−++ store |= [init=S update=$-([A S] S)]
542− ^- (store S) [init update]
my-app/desk.docket-0+1−1
@@ -3,6 +3,6 @@
3 color+0x17.734f
3 color+0x17.734f
4 version+[0 1 0]
4 version+[0 1 0]
5 website+''
5 website+''
6− license+'MIT'
6+ license+''
7 site+/apps/my-app
7 site+/apps/my-app
8==
8==
tests/clay-fixtures/desk/mar/label.hoon → my-app/mar/label.hoonrenamed+1
@@ -1,3 +1,4 @@
1+:: Fixture for the Hoon mark importer; not supplied by the design doc.
1|_ a=@t
2|_ a=@t
2++ grab |% ++ noun @t --
3++ grab |% ++ noun @t --
3++ grow |% ++ noun a --
4++ grow |% ++ noun a --
tests/clay-fixtures/desk/sur/import-fixture.hoon → my-app/sur/import-fixture.hoonrenamed

The content is the same.

my-app/ui/basket.jibb+6−6
@@ -12,15 +12,15 @@
12 [%acked err=(unit @t)]
12 [%acked err=(unit @t)]
13
13
14++ init |= ~
14++ init |= ~
15− [cart=[items=~ open=%.n] note=""]
15+ [[~ %.n] ""]
16
16
17++ update |= [=msg m=model]
17++ update |= [=msg m=model]
18 ?- msg
18 ?- msg
19− [%noted t] [m(note=t) ~]
19+ [%noted t] [m(note=t) ~]
20− %add [m(note="") ~[(poke.cart [%add note.m] |=%acked)]]
20+ %add [m(note="") ~[[%poke (cart-action.cart [%add note.m]) |=%acked]]]
21− %toggle [m ~[(poke.cart %toggle |=%acked)]]
21+ %toggle [m ~[[%poke (cart-action.cart %toggle) |=%acked]]]
22− [%got c] [m(cart=c) ~]
22+ [%got c] [m(cart=c) ~]
23− [%acked err] [m ~]
23+ [%acked err] [m ~]
24
24
25++ subs |= m=model
25++ subs |= m=model
26 ~[[%watch (state.cart |=%got)]]
26 ~[[%watch (state.cart |=%got)]]
my-app/ui/stores/cart.jibb+6−5
@@ -1,12 +1,13 @@
1:: /ui/stores/cart.jibb
1:: /ui/stores/cart.jibb
2+$ state [items=(list @t) open=?]
2+$ state [items=(list @t) open=?]
3−+$ poke
3++$ cart-action
4 [%add item=@t]
4 [%add item=@t]
5 %toggle
5 %toggle
6++$ poke cart-action
6
7
7++ main (store init update)
8++ main (store init update)
8−++ init ^- state [items=~ open=%.n]
9+++ init ^- state [~ %.n]
9−++ update |= [a=poke s=state]
10+++ update |= [a=cart-action s=state]
10 ?- a
11 ?- a
11− [%add item] s(items=[item items.s])
12+ [%add item] s(items=[item items.s])
12− %toggle s(open=(not open.s))
13+ %toggle s(open=(not open.s))
my-app/ui/theme.jibb+1−1
@@ -5,4 +5,4 @@
5 lang="en"
5 lang="en"
6 zone="UTC"
6 zone="UTC"
7 font=`%/static/fonts/inter.woff2
7 font=`%/static/fonts/inter.woff2
8− dark=`[tones=[normal="#eee" background="#111" accent="#4c9" danger="#f28b82" muted="#aaa"]]
8+ dark=[tones=[normal="#eee" background="#111" accent="#4c9" danger="#f28b82" muted="#aaa"]]
my-app/ui/todo-list.jibb+9−9
@@ -11,18 +11,18 @@
11 [%acked err=(unit @t)]
11 [%acked err=(unit @t)]
12
12
13++ init |= ts=(list item.todo)
13++ init |= ts=(list item.todo)
14− [todos=ts draft="" error=~]
14+ [ts "" ~]
15
15
16++ update |= [=msg m=model]
16++ update |= [=msg m=model]
17 ?- msg
17 ?- msg
18− [%typed t]
18+ [%typed t]
19− ?- (gth (lent (tuba (trip t))) 80)
19+ ?- (gth (lent (tuba (trip t))) 80)
20− %.y [m(draft=t error=`"Too long") ~]
20+ %.y [m(draft=t error=`"Too long") ~]
21− %.n [m(draft=t error=~) ~]
21+ %.n [m(draft=t error=~) ~]
22− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
22+ %submit [m(draft="") ~[[%poke (todo-action.todo [%add draft.m]) |=%acked]]]
23− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
23+ [%toggled id] [m ~[[%poke (todo-action.todo [%toggle id]) |=%acked]]]
24− [%got ts] [m(todos=ts) ~]
24+ [%got ts] [m(todos=ts) ~]
25− [%acked err] [m(error=err) ~]
25+ [%acked err] [m(error=err) ~]
26
26
27++ subs |= m=model
27++ subs |= m=model
28 ~[[%watch (todos.todo |=%got)]]
28 ~[[%watch (todos.todo |=%got)]]
tests/clay-fixtures/desk/sur/mop-tlon-probe.hoondeleted−1
@@ -1 +0,0 @@
1−../../../golden/types-import-tlon-notes/sur/notes.txt
tests/clay-fixtures/build-expected.txt → tests/clay-fixtures/expected.txtrenamed

The content is the same.

tests/clay-fixtures/ford-import.txt+2−2
@@ -1,8 +1,8 @@
1=/ m (strand ,vase)
1=/ m (strand ,vase)
2;< =bowl:spider bind:m get-bowl
2;< =bowl:spider bind:m get-bowl
3=/ now=@da now.bowl
3=/ now=@da now.bowl
4−=/ src=vase .^(vase %ca /[(scot %p our.bowl)]/jibb-fixtures/[(scot %da now)]/sur/import-fixture/hoon)
4+=/ src=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/sur/import-fixture/hoon)
5−=/ reader=vase .^(vase %ca /[(scot %p our.bowl)]/jibb-fixtures/[(scot %da now)]/lib/jibb-import/hoon)
5+=/ reader=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/lib/jibb-import/hoon)
6=/ cor=type -.src
6=/ cor=type -.src
7=/ typ=type (~(play ut cor) (ream '*sample'))
7=/ typ=type (~(play ut cor) (ream '*sample'))
8=/ read-gate=vase (slap reader (ream 'read-mold-in'))
8=/ read-gate=vase (slap reader (ream 'read-mold-in'))
tests/clay-fixtures/ford-nested-union-bridge.txt+4−4
@@ -1,10 +1,10 @@
1=/ m (strand ,vase)
1=/ m (strand ,vase)
2;< =bowl:spider bind:m get-bowl
2;< =bowl:spider bind:m get-bowl
3=/ now=@da now.bowl
3=/ now=@da now.bowl
4−=/ src=vase .^(vase %ca /[(scot %p our.bowl)]/jibb-fixtures/[(scot %da now)]/sur/import-fixture/hoon)
4+=/ src=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/sur/import-fixture/hoon)
5−=/ blog=vase .^(vase %ca /[(scot %p our.bowl)]/jibb-fixtures/[(scot %da now)]/sur/blog/hoon)
5+=/ blog=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/sur/blog/hoon)
6−=/ reader=vase .^(vase %ca /[(scot %p our.bowl)]/jibb-fixtures/[(scot %da now)]/lib/jibb-import/hoon)
6+=/ reader=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/lib/jibb-import/hoon)
7−=/ jibb=vase .^(vase %ca /[(scot %p our.bowl)]/jibb-fixtures/[(scot %da now)]/lib/jibb/hoon)
7+=/ jibb=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/lib/jibb/hoon)
8=/ read-gate=vase (slap reader (ream 'read-named'))
8=/ read-gate=vase (slap reader (ream 'read-named'))
9=/ result=vase (slym read-gate [%import-fixture %nested -.src])
9=/ result=vase (slym read-gate [%import-fixture %nested -.src])
10=/ sample-result=vase (slym read-gate [%import-fixture %sample -.src])
10=/ sample-result=vase (slym read-gate [%import-fixture %sample -.src])
tests/clay-fixtures/ford-nested-union.txt+2−2
@@ -1,8 +1,8 @@
1=/ m (strand ,vase)
1=/ m (strand ,vase)
2;< =bowl:spider bind:m get-bowl
2;< =bowl:spider bind:m get-bowl
3=/ now=@da now.bowl
3=/ now=@da now.bowl
4−=/ src=vase .^(vase %ca /[(scot %p our.bowl)]/jibb-fixtures/[(scot %da now)]/sur/import-fixture/hoon)
4+=/ src=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/sur/import-fixture/hoon)
5−=/ reader=vase .^(vase %ca /[(scot %p our.bowl)]/jibb-fixtures/[(scot %da now)]/lib/jibb-import/hoon)
5+=/ reader=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/lib/jibb-import/hoon)
6=/ read-gate=vase (slap reader (ream 'read-named'))
6=/ read-gate=vase (slap reader (ream 'read-named'))
7=/ got=vase (slym read-gate [%import-fixture %nested -.src])
7=/ got=vase (slym read-gate [%import-fixture %nested -.src])
8=/ show-gate=vase (slap reader (ream 'show-result'))
8=/ show-gate=vase (slap reader (ream 'show-result'))
tests/clay-fixtures/ford-recursive.txt+2−2
@@ -1,8 +1,8 @@
1=/ m (strand ,vase)
1=/ m (strand ,vase)
2;< =bowl:spider bind:m get-bowl
2;< =bowl:spider bind:m get-bowl
3=/ now=@da now.bowl
3=/ now=@da now.bowl
4−=/ src=vase .^(vase %ca /[(scot %p our.bowl)]/jibb-fixtures/[(scot %da now)]/sur/import-fixture/hoon)
4+=/ src=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/sur/import-fixture/hoon)
5−=/ reader=vase .^(vase %ca /[(scot %p our.bowl)]/jibb-fixtures/[(scot %da now)]/lib/jibb-import/hoon)
5+=/ reader=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/lib/jibb-import/hoon)
6=/ read-gate=vase (slap reader (ream 'read-named'))
6=/ read-gate=vase (slap reader (ream 'read-named'))
7=/ got=vase (slym read-gate [%import-fixture %recursive -.src])
7=/ got=vase (slym read-gate [%import-fixture %recursive -.src])
8=/ show-gate=vase (slap reader (ream 'show-result'))
8=/ show-gate=vase (slap reader (ream 'show-result'))
tests/clay-fixtures/ford.txt+1−1
@@ -1,7 +1,7 @@
1=/ m (strand ,vase)
1=/ m (strand ,vase)
2;< =bowl:spider bind:m get-bowl
2;< =bowl:spider bind:m get-bowl
3=/ now=@da now.bowl
3=/ now=@da now.bowl
4−=/ src=vase .^(vase %ca /[(scot %p our.bowl)]/jibb-fixtures/[(scot %da now)]/sur/import-fixture/hoon)
4+=/ src=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/sur/import-fixture/hoon)
5=/ cor=type -.src
5=/ cor=type -.src
6?. ?=([%core *] cor) (pure:m !>('not a core'))
6?. ?=([%core *] cor) (pure:m !>('not a core'))
7=/ subject=type q.q.cor
7=/ subject=type q.q.cor
tests/clay-fixtures/mark-bridge.txt+3−3
@@ -1,9 +1,9 @@
1=/ m (strand ,vase)
1=/ m (strand ,vase)
2;< =bowl:spider bind:m get-bowl
2;< =bowl:spider bind:m get-bowl
3=/ now=@da now.bowl
3=/ now=@da now.bowl
4−=/ mark=vase .^(vase %ca /[(scot %p our.bowl)]/jibb-fixtures/[(scot %da now)]/mar/label/hoon)
4+=/ mark=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/mar/label/hoon)
5−=/ reader=vase .^(vase %ca /[(scot %p our.bowl)]/jibb-fixtures/[(scot %da now)]/lib/jibb-import/hoon)
5+=/ reader=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/lib/jibb-import/hoon)
6−=/ jibb=vase .^(vase %ca /[(scot %p our.bowl)]/jibb-fixtures/[(scot %da now)]/lib/jibb/hoon)
6+=/ jibb=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/lib/jibb/hoon)
7=/ read-gate=vase (slap reader (ream 'read-mark'))
7=/ read-gate=vase (slap reader (ream 'read-mark'))
8=/ label-result=vase (slym read-gate [%label -.mark])
8=/ label-result=vase (slym read-gate [%label -.mark])
9=/ check-gate=vase (slap jibb (ream 'golden-types-with-marks'))
9=/ check-gate=vase (slap jibb (ream 'golden-types-with-marks'))
tests/clay-fixtures/tlon-mop.txt+2−2
@@ -1,8 +1,8 @@
1=/ m (strand ,vase)
1=/ m (strand ,vase)
2;< =bowl:spider bind:m get-bowl
2;< =bowl:spider bind:m get-bowl
3=/ now=@da now.bowl
3=/ now=@da now.bowl
4−=/ src=vase .^(vase %ca /[(scot %p our.bowl)]/jibb-fixtures/[(scot %da now)]/sur/mop-tlon-probe/hoon)
4+=/ src=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/sur/mop-tlon-probe/hoon)
5−=/ reader=vase .^(vase %ca /[(scot %p our.bowl)]/jibb-fixtures/[(scot %da now)]/lib/jibb-import/hoon)
5+=/ reader=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/lib/jibb-import/hoon)
6=/ read-gate=vase (slap reader (ream 'read-named'))
6=/ read-gate=vase (slap reader (ream 'read-named'))
7=/ result=vase (slym read-gate [%notes %log -.src])
7=/ result=vase (slym read-gate [%notes %log -.src])
8=/ recursive=vase (slym read-gate [%notes %import-node -.src])
8=/ recursive=vase (slym read-gate [%notes %import-node -.src])
tests/golden/doc-core-02-update/about.txt+1−1
@@ -1,3 +1,3 @@
1source: Core language tab, section "Example", code block 2 of the tab
1source: Core language tab, section "Example", code block 2 of the tab
2−tests: the todo island's `update` on its own, as the Core language tab quotes it: a module of one `++`; a `?-` with its arms at its own depth, one arm with its body on the deeper lines holding a nested `?-` whose arms are at that `?-`'s depth; changes, units, lists and constructors in arm expressions. The same text as lines 16-25 of doc-overview-10-todo-list
2+tests: the todo island's `update` on its own, as the Core language tab quotes it: a module of one `++`; a `?-` arm with its body on the deeper lines holding a nested `?-`; changes, units, lists and constructors in arm expressions. The same text as lines 16-25 of doc-overview-10-todo-list
3expect: parses
3expect: parses
tests/golden/doc-core-02-update/source.jibb+8−8
@@ -1,10 +1,10 @@
1++ update |= [=msg m=model]
1++ update |= [=msg m=model]
2 ?- msg
2 ?- msg
3− [%typed t]
3+ [%typed t]
4− ?- (gth (lent (tuba (trip t))) 80)
4+ ?- (gth (lent (tuba (trip t))) 80)
5− %.y [m(draft=t error=`"Too long") ~]
5+ %.y [m(draft=t error=`"Too long") ~]
6− %.n [m(draft=t error=~) ~]
6+ %.n [m(draft=t error=~) ~]
7− %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
7+ %submit [m(draft="") ~[[%poke (todo-action.todo [%add draft.m]) |=%acked]]]
8− [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
8+ [%toggled id] [m ~[[%poke (todo-action.todo [%toggle id]) |=%acked]]]
9− [%got ts] [m(todos=ts) ~]
9+ [%got ts] [m(todos=ts) ~]
10− [%acked err] [m(error=err) ~]
10+ [%acked err] [m(error=err) ~]
tests/golden/doc-core-02-update/tokens.txt+128−120
@@ -11,124 +11,132 @@
112:3 INDENT
112:3 INDENT
122:3 glyph ?-
122:3 glyph ?-
132:6 name msg
132:6 name msg
14−3:3 NEWLINE
14+3:5 INDENT
15−3:3 glyph [
15+3:5 glyph [
16−3:4 tight lit %typed
16+3:6 tight lit %typed
17−3:11 name t
17+3:13 name t
18−3:12 tight glyph ]
18+3:14 tight glyph ]
19−4:5 INDENT
19+4:7 INDENT
20−4:5 glyph ?-
20+4:7 glyph ?-
21−4:8 glyph (
21+4:10 glyph (
22−4:9 tight name gth
22+4:11 tight name gth
23−4:13 glyph (
23+4:15 glyph (
24−4:14 tight name lent
24+4:16 tight name lent
25−4:19 glyph (
25+4:21 glyph (
26−4:20 tight name tuba
26+4:22 tight name tuba
27−4:25 glyph (
27+4:27 glyph (
28−4:26 tight name trip
28+4:28 tight name trip
29−4:31 name t
29+4:33 name t
30−4:32 tight glyph )
31−4:33 tight glyph )
324:34 tight glyph )
304:34 tight glyph )
33−4:36 lit 80
31+4:35 tight glyph )
34−4:38 tight glyph )
32+4:36 tight glyph )
35−5:5 NEWLINE
33+4:38 lit 80
36−5:5 lit %.y
34+4:40 tight glyph )
37−5:10 glyph [
35+5:9 INDENT
38−5:11 tight name m
36+5:9 lit %.y
39−5:12 tight glyph (
37+5:14 glyph [
40−5:13 tight name draft
38+5:15 tight name m
41−5:18 tight glyph =
39+5:16 tight glyph (
42−5:19 tight name t
40+5:17 tight name draft
43−5:21 name error
41+5:22 tight glyph =
44−5:26 tight glyph =
42+5:23 tight name t
45−5:27 tight glyph `
43+5:25 name error
46−5:28 tight str "Too long"
44+5:30 tight glyph =
47−5:38 tight glyph )
45+5:31 tight glyph `
48−5:40 lit ~
46+5:32 tight str "Too long"
49−5:41 tight glyph ]
47+5:42 tight glyph )
50−6:5 NEWLINE
48+5:44 lit ~
51−6:5 lit %.n
49+5:45 tight glyph ]
52−6:10 glyph [
50+6:9 NEWLINE
53−6:11 tight name m
51+6:9 lit %.n
54−6:12 tight glyph (
52+6:14 glyph [
55−6:13 tight name draft
53+6:15 tight name m
56−6:18 tight glyph =
54+6:16 tight glyph (
57−6:19 tight name t
55+6:17 tight name draft
58−6:21 name error
56+6:22 tight glyph =
59−6:26 tight glyph =
57+6:23 tight name t
60−6:27 tight lit ~
58+6:25 name error
61−6:28 tight glyph )
59+6:30 tight glyph =
62−6:30 lit ~
60+6:31 tight lit ~
63−6:31 tight glyph ]
61+6:32 tight glyph )
64−7:3 DEDENT
62+6:34 lit ~
65−7:3 NEWLINE
63+6:35 tight glyph ]
66−7:3 lit %submit
64+7:5 DEDENT
67−7:18 glyph [
65+7:5 DEDENT
68−7:19 tight name m
66+7:5 NEWLINE
69−7:20 tight glyph (
67+7:5 lit %submit
70−7:21 tight name draft
68+7:20 glyph [
71−7:26 tight glyph =
69+7:21 tight name m
72−7:27 tight str ""
70+7:22 tight glyph (
73−7:29 tight glyph )
71+7:23 tight name draft
74−7:31 glyph ~[
72+7:28 tight glyph =
75−7:33 tight glyph (
73+7:29 tight str ""
76−7:34 tight wing poke.todo
74+7:31 tight glyph )
77−7:44 glyph [
75+7:33 glyph ~[
78−7:45 tight lit %add
76+7:35 tight glyph [
79−7:50 wing draft.m
77+7:36 tight lit %poke
80−7:57 tight glyph ]
78+7:42 glyph (
81−7:59 glyph |=
79+7:43 tight wing todo-action.todo
82−7:61 tight lit %acked
80+7:60 glyph [
83−7:67 tight glyph )
81+7:61 tight lit %add
84−7:68 tight glyph ]
82+7:66 wing draft.m
85−7:69 tight glyph ]
83+7:73 tight glyph ]
86−8:3 NEWLINE
84+7:74 tight glyph )
87−8:3 glyph [
85+7:76 glyph |=
88−8:4 tight lit %toggled
86+7:78 tight lit %acked
89−8:13 name id
87+7:84 tight glyph ]
90−8:15 tight glyph ]
88+7:85 tight glyph ]
91−8:18 glyph [
89+7:86 tight glyph ]
92−8:19 tight name m
90+8:5 NEWLINE
93−8:21 glyph ~[
91+8:5 glyph [
94−8:23 tight glyph (
92+8:6 tight lit %toggled
95−8:24 tight wing poke.todo
93+8:15 name id
96−8:34 glyph [
94+8:17 tight glyph ]
97−8:35 tight lit %toggle
95+8:20 glyph [
98−8:43 name id
96+8:21 tight name m
99−8:45 tight glyph ]
97+8:23 glyph ~[
100−8:47 glyph |=
98+8:25 tight glyph [
101−8:49 tight lit %acked
99+8:26 tight lit %poke
102−8:55 tight glyph )
100+8:32 glyph (
103−8:56 tight glyph ]
101+8:33 tight wing todo-action.todo
104−8:57 tight glyph ]
102+8:50 glyph [
105−9:3 NEWLINE
103+8:51 tight lit %toggle
106−9:3 glyph [
104+8:59 name id
107−9:4 tight lit %got
105+8:61 tight glyph ]
108−9:9 name ts
106+8:62 tight glyph )
109−9:11 tight glyph ]
107+8:64 glyph |=
110−9:18 glyph [
108+8:66 tight lit %acked
111−9:19 tight name m
109+8:72 tight glyph ]
112−9:20 tight glyph (
110+8:73 tight glyph ]
113−9:21 tight name todos
111+8:74 tight glyph ]
114−9:26 tight glyph =
112+9:5 NEWLINE
115−9:27 tight name ts
113+9:5 glyph [
116−9:29 tight glyph )
114+9:6 tight lit %got
117−9:31 lit ~
115+9:11 name ts
118−9:32 tight glyph ]
116+9:13 tight glyph ]
119−10:3 NEWLINE
117+9:20 glyph [
120−10:3 glyph [
118+9:21 tight name m
121−10:4 tight lit %acked
119+9:22 tight glyph (
122−10:11 name err
120+9:23 tight name todos
123−10:14 tight glyph ]
121+9:28 tight glyph =
124−10:18 glyph [
122+9:29 tight name ts
125−10:19 tight name m
123+9:31 tight glyph )
126−10:20 tight glyph (
124+9:33 lit ~
127−10:21 tight name error
125+9:34 tight glyph ]
128−10:26 tight glyph =
126+10:5 NEWLINE
129−10:27 tight name err
127+10:5 glyph [
130−10:30 tight glyph )
128+10:6 tight lit %acked
131−10:32 lit ~
129+10:13 name err
132−10:33 tight glyph ]
130+10:16 tight glyph ]
133−10:34 DEDENT
131+10:20 glyph [
134−10:34 NEWLINE
132+10:21 tight name m
133+10:22 tight glyph (
134+10:23 tight name error
135+10:28 tight glyph =
136+10:29 tight name err
137+10:32 tight glyph )
138+10:34 lit ~
139+10:35 tight glyph ]
140+10:36 DEDENT
141+10:36 DEDENT
142+10:36 NEWLINE
tests/golden/doc-core-02-update/tree.txt+68−64

This diff is too big to show here.

tests/golden/doc-grammar-02-buttons/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/doc-grammar-02-buttons/source.jibbmode 120000 → 100644+7−1

This diff is too big to show here.

tests/golden/doc-grammar-02-buttons/types.txtdeleted−4

This diff is too big to show here.

tests/golden/doc-grammar-04-step/about.txt+1−1

This diff is too big to show here.

tests/golden/doc-grammar-04-step/source.jibb+5−5

This diff is too big to show here.

tests/golden/doc-grammar-04-step/tokens.txt+37−36

This diff is too big to show here.

tests/golden/doc-grammar-04-step/tree.txt+13−13

This diff is too big to show here.

tests/golden/doc-grammar-06-cart-store/about.txt+1−1

This diff is too big to show here.

tests/golden/doc-grammar-06-cart-store/source.jibbmode 120000 → 100644+13−1

This diff is too big to show here.

tests/golden/doc-grammar-06-cart-store/tokens.txt+62−61

This diff is too big to show here.

tests/golden/doc-grammar-06-cart-store/tree.txt+28−29

This diff is too big to show here.

tests/golden/doc-grammar-06-cart-store/types.txt+1−5

This diff is too big to show here.

tests/golden/doc-grammar-07-basket/about.txt+1−1

This diff is too big to show here.

tests/golden/doc-grammar-07-basket/source.jibbmode 120000 → 100644+32−1

This diff is too big to show here.

tests/golden/doc-grammar-07-basket/tokens.txt+84−85

This diff is too big to show here.

tests/golden/doc-grammar-07-basket/tree.txt+40−38

This diff is too big to show here.

tests/golden/doc-overview-01-cmd-sub/source.jibb+1−1

This diff is too big to show here.

tests/golden/doc-overview-01-cmd-sub/tokens.txt+11−11

This diff is too big to show here.

tests/golden/doc-overview-01-cmd-sub/tree.txt+5−5

This diff is too big to show here.

tests/golden/doc-overview-02-theme/source.jibbmode 120000 → 100644+8−1

This diff is too big to show here.

tests/golden/doc-overview-02-theme/tokens.txt+23−24

This diff is too big to show here.

tests/golden/doc-overview-02-theme/tree.txt+8−9

This diff is too big to show here.

tests/golden/doc-overview-04-todo-api/source.jibbmode 120000 → 100644+13−1

This diff is too big to show here.

tests/golden/doc-overview-08-about/source.jibbmode 120000 → 100644+7−1

This diff is too big to show here.

tests/golden/doc-overview-09-blog-index/source.jibbmode 120000 → 100644+9−1

This diff is too big to show here.

tests/golden/doc-overview-10-todo-list/about.txt+1−1

This diff is too big to show here.

tests/golden/doc-overview-10-todo-list/source.jibbmode 120000 → 100644+40−1

This diff is too big to show here.

tests/golden/doc-overview-10-todo-list/tokens.txt+130−128

This diff is too big to show here.

tests/golden/doc-overview-10-todo-list/tree.txt+69−68

This diff is too big to show here.

tests/golden/doc-overview-11-index/source.jibbmode 120000 → 100644+10−1

This diff is too big to show here.

tests/golden/fixture-blog-api/source.jibbmode 120000 → 100644+5−1

This diff is too big to show here.

tests/golden/fixture-blog-card/source.jibbmode 120000 → 100644+5−1

This diff is too big to show here.

tests/golden/inline-cell-wing-face-bad/about.txtdeleted−3

This diff is too big to show here.

tests/golden/inline-cell-wing-face-bad/source.jibbdeleted−1

This diff is too big to show here.

tests/golden/inline-cell-wing-face-bad/tokens.txtdeleted−8

This diff is too big to show here.

tests/golden/inline-cell-wing-face-bad/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/inline-change-wing/about.txtdeleted−3

This diff is too big to show here.

tests/golden/inline-change-wing/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/inline-change-wing/tokens.txtdeleted−18

This diff is too big to show here.

tests/golden/inline-change-wing/tree.txtdeleted−9

This diff is too big to show here.

tests/golden/inline-decimal-aura-bad/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-decimal-aura-bad/source.jibbdeleted−10

This diff is too big to show here.

tests/golden/inline-decimal-aura-bad/tokens.txtdeleted−60

This diff is too big to show here.

tests/golden/inline-decimal-aura-bad/tree.txtdeleted−21

This diff is too big to show here.

tests/golden/inline-decimal-aura-bad/types.txtdeleted−41

This diff is too big to show here.

tests/golden/inline-decimal-fits/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-decimal-fits/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-decimal-fits/source.jibbdeleted−9

This diff is too big to show here.

tests/golden/inline-decimal-fits/tokens.txtdeleted−64

This diff is too big to show here.

tests/golden/inline-decimal-fits/tree.txtdeleted−23

This diff is too big to show here.

tests/golden/inline-decimal-fits/types.txtdeleted−10

This diff is too big to show here.

tests/golden/inline-decimal-generic/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-decimal-generic/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-decimal-generic/source.jibbdeleted−5

This diff is too big to show here.

tests/golden/inline-decimal-generic/tokens.txtdeleted−40

This diff is too big to show here.

tests/golden/inline-decimal-generic/tree.txtdeleted−18

This diff is too big to show here.

tests/golden/inline-decimal-generic/types.txtdeleted−6

This diff is too big to show here.

tests/golden/inline-decimal-patterns/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-decimal-patterns/source.jibbdeleted−30

This diff is too big to show here.

tests/golden/inline-decimal-patterns/tokens.txtdeleted−181

This diff is too big to show here.

tests/golden/inline-decimal-patterns/tree.txtdeleted−82

This diff is too big to show here.

tests/golden/inline-decimal-patterns/types.txtdeleted−28

This diff is too big to show here.

tests/golden/inline-decimal-sites/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-decimal-sites/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-decimal-sites/source.jibbdeleted−24

This diff is too big to show here.

tests/golden/inline-decimal-sites/tokens.txtdeleted−258

This diff is too big to show here.

tests/golden/inline-decimal-sites/tree.txtdeleted−103

This diff is too big to show here.

tests/golden/inline-decimal-sites/types.txtdeleted−69

This diff is too big to show here.

tests/golden/inline-decimal/about.txt+1−1

This diff is too big to show here.

tests/golden/inline-mold-opaque/about.txt+1−1

This diff is too big to show here.

tests/golden/inline-mold-opaque/source.jibb+1−1

This diff is too big to show here.

tests/golden/inline-mold-opaque/tokens.txt+1−1

This diff is too big to show here.

tests/golden/inline-mold-opaque/tree.txt+1−1

This diff is too big to show here.

tests/golden/inline-namespaces/about.txt+1−1

This diff is too big to show here.

tests/golden/inline-namespaces/source.jibb+1−1

This diff is too big to show here.

tests/golden/inline-namespaces/tokens.txt+1−1

This diff is too big to show here.

tests/golden/inline-namespaces/tree.txt+1−1

This diff is too big to show here.

tests/golden/inline-pattern-nested/about.txtdeleted−3

This diff is too big to show here.

tests/golden/inline-pattern-nested/source.jibbdeleted−9

This diff is too big to show here.

tests/golden/inline-pattern-nested/tokens.txtdeleted−71

This diff is too big to show here.

tests/golden/inline-pattern-nested/tree.txtdeleted−31

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-any-arm/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-any-arm/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-any-arm/source.jibbdeleted−30

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-any-arm/tokens.txtdeleted−160

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-any-arm/tree.txtdeleted−69

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-any-arm/types.txtdeleted−32

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-generic/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-generic/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-generic/source.jibbdeleted−30

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-generic/tokens.txtdeleted−158

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-generic/tree.txtdeleted−71

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-generic/types.txtdeleted−21

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-last/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-last/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-last/source.jibbdeleted−14

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-last/tokens.txtdeleted−85

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-last/tree.txtdeleted−38

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-last/types.txtdeleted−9

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-nested/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-nested/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-nested/source.jibbdeleted−27

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-nested/tokens.txtdeleted−132

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-nested/tree.txtdeleted−59

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-nested/types.txtdeleted−25

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-ok/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-ok/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-ok/source.jibbdeleted−53

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-ok/tokens.txtdeleted−303

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-ok/tree.txtdeleted−133

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-ok/types.txtdeleted−13

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-one-case/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-one-case/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-one-case/source.jibbdeleted−11

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-one-case/tokens.txtdeleted−64

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-one-case/tree.txtdeleted−31

This diff is too big to show here.

tests/golden/inline-pattern-tag-name-one-case/types.txtdeleted−18

This diff is too big to show here.

tests/golden/inline-requests/about.txt+2−2

This diff is too big to show here.

tests/golden/inline-requests/source.jibb+1−1

This diff is too big to show here.

tests/golden/inline-requests/tokens.txt+6−7

This diff is too big to show here.

tests/golden/inline-requests/tree.txt+2−3

This diff is too big to show here.

tests/golden/inline-unface-arity-bad/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-unface-arity-bad/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-unface-arity-bad/source.jibbdeleted−3

This diff is too big to show here.

tests/golden/inline-unface-arity-bad/tokens.txtdeleted−31

This diff is too big to show here.

tests/golden/inline-unface-arity-bad/tree.txtdeleted−13

This diff is too big to show here.

tests/golden/inline-unface-arity-bad/types.txtdeleted−10

This diff is too big to show here.

tests/golden/inline-unface-deep/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-unface-deep/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-unface-deep/source.jibbdeleted−10

This diff is too big to show here.

tests/golden/inline-unface-deep/tokens.txtdeleted−129

This diff is too big to show here.

tests/golden/inline-unface-deep/tree.txtdeleted−55

This diff is too big to show here.

tests/golden/inline-unface-deep/types.txtdeleted−11

This diff is too big to show here.

tests/golden/inline-unface-gates/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-unface-gates/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-unface-gates/source.jibbdeleted−11

This diff is too big to show here.

tests/golden/inline-unface-gates/tokens.txtdeleted−160

This diff is too big to show here.

tests/golden/inline-unface-gates/tree.txtdeleted−78

This diff is too big to show here.

tests/golden/inline-unface-gates/types.txtdeleted−30

This diff is too big to show here.

tests/golden/inline-unface-import/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-unface-import/module-trees.txtdeleted−43

This diff is too big to show here.

tests/golden/inline-unface-import/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-unface-import/modules/ui/lib.jibbdeleted−9

This diff is too big to show here.

tests/golden/inline-unface-import/source.jibbdeleted−5

This diff is too big to show here.

tests/golden/inline-unface-import/tokens.txtdeleted−38

This diff is too big to show here.

tests/golden/inline-unface-import/tree.txtdeleted−17

This diff is too big to show here.

tests/golden/inline-unface-import/types.txtdeleted−5

This diff is too big to show here.

tests/golden/inline-unface-labelled-slot/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-unface-labelled-slot/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-unface-labelled-slot/source.jibbdeleted−5

This diff is too big to show here.

tests/golden/inline-unface-labelled-slot/tokens.txtdeleted−76

This diff is too big to show here.

tests/golden/inline-unface-labelled-slot/tree.txtdeleted−37

This diff is too big to show here.

tests/golden/inline-unface-labelled-slot/types.txtdeleted−12

This diff is too big to show here.

tests/golden/inline-unface-lambda/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-unface-lambda/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-unface-lambda/source.jibbdeleted−3

This diff is too big to show here.

tests/golden/inline-unface-lambda/tokens.txtdeleted−52

This diff is too big to show here.

tests/golden/inline-unface-lambda/tree.txtdeleted−28

This diff is too big to show here.

tests/golden/inline-unface-lambda/types.txtdeleted−10

This diff is too big to show here.

tests/golden/inline-unface-named-union/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-unface-named-union/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-unface-named-union/source.jibbdeleted−9

This diff is too big to show here.

tests/golden/inline-unface-named-union/tokens.txtdeleted−89

This diff is too big to show here.

tests/golden/inline-unface-named-union/tree.txtdeleted−46

This diff is too big to show here.

tests/golden/inline-unface-named-union/types.txtdeleted−8

This diff is too big to show here.

tests/golden/inline-unface-records/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-unface-records/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-unface-records/source.jibbdeleted−8

This diff is too big to show here.

tests/golden/inline-unface-records/tokens.txtdeleted−94

This diff is too big to show here.

tests/golden/inline-unface-records/tree.txtdeleted−44

This diff is too big to show here.

tests/golden/inline-unface-records/types.txtdeleted−21

This diff is too big to show here.

tests/golden/inline-unface-recursive/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-unface-recursive/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-unface-recursive/source.jibbdeleted−23

This diff is too big to show here.

tests/golden/inline-unface-recursive/tokens.txtdeleted−182

This diff is too big to show here.

tests/golden/inline-unface-recursive/tree.txtdeleted−98

This diff is too big to show here.

tests/golden/inline-unface-recursive/types.txtdeleted−6

This diff is too big to show here.

tests/golden/inline-unface-reserved-import/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-unface-reserved-import/module-trees.txtdeleted−6

This diff is too big to show here.

tests/golden/inline-unface-reserved-import/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-unface-reserved-import/modules/ui/lib.jibbdeleted−1

This diff is too big to show here.

tests/golden/inline-unface-reserved-import/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/inline-unface-reserved-import/tokens.txtdeleted−11

This diff is too big to show here.

tests/golden/inline-unface-reserved-import/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/inline-unface-reserved-import/types.txtdeleted−2

This diff is too big to show here.

tests/golden/inline-unface-reserved-local/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-unface-reserved-local/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-unface-reserved-local/source.jibbdeleted−3

This diff is too big to show here.

tests/golden/inline-unface-reserved-local/tokens.txtdeleted−14

This diff is too big to show here.

tests/golden/inline-unface-reserved-local/tree.txtdeleted−8

This diff is too big to show here.

tests/golden/inline-unface-reserved-local/types.txtdeleted−2

This diff is too big to show here.

tests/golden/inline-unface-reserved-mold/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-unface-reserved-mold/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-unface-reserved-mold/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/inline-unface-reserved-mold/tokens.txtdeleted−8

This diff is too big to show here.

tests/golden/inline-unface-reserved-mold/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/inline-unface-reserved-mold/types.txtdeleted−2

This diff is too big to show here.

tests/golden/inline-unface-reserved-no-prelude/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-unface-reserved-no-prelude/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/inline-unface-reserved-no-prelude/tokens.txtdeleted−8

This diff is too big to show here.

tests/golden/inline-unface-reserved-no-prelude/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/inline-unface-reserved-no-prelude/types.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-unface-reserved-pattern/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-unface-reserved-pattern/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-unface-reserved-pattern/source.jibbdeleted−3

This diff is too big to show here.

tests/golden/inline-unface-reserved-pattern/tokens.txtdeleted−21

This diff is too big to show here.

tests/golden/inline-unface-reserved-pattern/tree.txtdeleted−11

This diff is too big to show here.

tests/golden/inline-unface-reserved-pattern/types.txtdeleted−2

This diff is too big to show here.

tests/golden/inline-unface-reserved-positive/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-unface-reserved-positive/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-unface-reserved-positive/source.jibbdeleted−6

This diff is too big to show here.

tests/golden/inline-unface-reserved-positive/tokens.txtdeleted−36

This diff is too big to show here.

tests/golden/inline-unface-reserved-positive/tree.txtdeleted−15

This diff is too big to show here.

tests/golden/inline-unface-reserved-positive/types.txtdeleted−5

This diff is too big to show here.

tests/golden/inline-unface-reserved-sample/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-unface-reserved-sample/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-unface-reserved-sample/source.jibbdeleted−1

This diff is too big to show here.

tests/golden/inline-unface-reserved-sample/tokens.txtdeleted−13

This diff is too big to show here.

tests/golden/inline-unface-reserved-sample/tree.txtdeleted−7

This diff is too big to show here.

tests/golden/inline-unface-reserved-sample/types.txtdeleted−2

This diff is too big to show here.

tests/golden/inline-unface-reserved-value/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-unface-reserved-value/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-unface-reserved-value/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/inline-unface-reserved-value/tokens.txtdeleted−12

This diff is too big to show here.

tests/golden/inline-unface-reserved-value/tree.txtdeleted−6

This diff is too big to show here.

tests/golden/inline-unface-reserved-value/types.txtdeleted−2

This diff is too big to show here.

tests/golden/inline-unface-unknown/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-unface-unknown/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-unface-unknown/source.jibbdeleted−3

This diff is too big to show here.

tests/golden/inline-unface-unknown/tokens.txtdeleted−36

This diff is too big to show here.

tests/golden/inline-unface-unknown/tree.txtdeleted−18

This diff is too big to show here.

tests/golden/inline-unface-unknown/types.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-unface-value-bad/about.txtdeleted−4

This diff is too big to show here.

tests/golden/inline-unface-value-bad/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/inline-unface-value-bad/source.jibbdeleted−6

This diff is too big to show here.

tests/golden/inline-unface-value-bad/tokens.txtdeleted−75

This diff is too big to show here.

tests/golden/inline-unface-value-bad/tree.txtdeleted−37

This diff is too big to show here.

tests/golden/inline-unface-value-bad/types.txtdeleted−13

This diff is too big to show here.

tests/golden/lex-body-rest-bad-1/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-1/source.jibbdeleted−4

This diff is too big to show here.

tests/golden/lex-body-rest-bad-1/tokens.txtdeleted−26

This diff is too big to show here.

tests/golden/lex-body-rest-bad-1/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-10/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-10/source.jibbdeleted−5

This diff is too big to show here.

tests/golden/lex-body-rest-bad-10/tokens.txtdeleted−21

This diff is too big to show here.

tests/golden/lex-body-rest-bad-10/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-11/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-11/source.jibbdeleted−4

This diff is too big to show here.

tests/golden/lex-body-rest-bad-11/tokens.txtdeleted−18

This diff is too big to show here.

tests/golden/lex-body-rest-bad-11/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-12/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-12/source.jibbdeleted−5

This diff is too big to show here.

tests/golden/lex-body-rest-bad-12/tokens.txtdeleted−21

This diff is too big to show here.

tests/golden/lex-body-rest-bad-12/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-13/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-13/source.jibbdeleted−5

This diff is too big to show here.

tests/golden/lex-body-rest-bad-13/tokens.txtdeleted−20

This diff is too big to show here.

tests/golden/lex-body-rest-bad-13/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-14/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-14/source.jibbdeleted−5

This diff is too big to show here.

tests/golden/lex-body-rest-bad-14/tokens.txtdeleted−20

This diff is too big to show here.

tests/golden/lex-body-rest-bad-14/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-15/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-15/source.jibbdeleted−5

This diff is too big to show here.

tests/golden/lex-body-rest-bad-15/tokens.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-15/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-16/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-16/source.jibbdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-16/tokens.txtdeleted−15

This diff is too big to show here.

tests/golden/lex-body-rest-bad-16/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-2/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-2/source.jibbdeleted−5

This diff is too big to show here.

tests/golden/lex-body-rest-bad-2/tokens.txtdeleted−27

This diff is too big to show here.

tests/golden/lex-body-rest-bad-2/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-3/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-3/source.jibbdeleted−4

This diff is too big to show here.

tests/golden/lex-body-rest-bad-3/tokens.txtdeleted−19

This diff is too big to show here.

tests/golden/lex-body-rest-bad-3/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-4/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-4/source.jibbdeleted−5

This diff is too big to show here.

tests/golden/lex-body-rest-bad-4/tokens.txtdeleted−21

This diff is too big to show here.

tests/golden/lex-body-rest-bad-4/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-5/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-5/source.jibbdeleted−5

This diff is too big to show here.

tests/golden/lex-body-rest-bad-5/tokens.txtdeleted−20

This diff is too big to show here.

tests/golden/lex-body-rest-bad-5/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-6/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-6/source.jibbdeleted−4

This diff is too big to show here.

tests/golden/lex-body-rest-bad-6/tokens.txtdeleted−16

This diff is too big to show here.

tests/golden/lex-body-rest-bad-6/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-7/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-7/source.jibbdeleted−5

This diff is too big to show here.

tests/golden/lex-body-rest-bad-7/tokens.txtdeleted−22

This diff is too big to show here.

tests/golden/lex-body-rest-bad-7/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-8/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-8/source.jibbdeleted−4

This diff is too big to show here.

tests/golden/lex-body-rest-bad-8/tokens.txtdeleted−16

This diff is too big to show here.

tests/golden/lex-body-rest-bad-8/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-9/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-bad-9/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/lex-body-rest-bad-9/tokens.txtdeleted−7

This diff is too big to show here.

tests/golden/lex-body-rest-bad-9/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-ok-1/about.txtdeleted−4

This diff is too big to show here.

tests/golden/lex-body-rest-ok-1/module-trees.txtdeleted−4

This diff is too big to show here.

tests/golden/lex-body-rest-ok-1/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/lex-body-rest-ok-1/modules/ui/lib.jibbdeleted−1

This diff is too big to show here.

tests/golden/lex-body-rest-ok-1/source.jibbdeleted−11

This diff is too big to show here.

tests/golden/lex-body-rest-ok-1/tokens.txtdeleted−62

This diff is too big to show here.

tests/golden/lex-body-rest-ok-1/tree.txtdeleted−30

This diff is too big to show here.

tests/golden/lex-body-rest-ok-1/types.txtdeleted−4

This diff is too big to show here.

tests/golden/lex-body-rest-ok-2/about.txtdeleted−4

This diff is too big to show here.

tests/golden/lex-body-rest-ok-2/module-trees.txtdeleted−4

This diff is too big to show here.

tests/golden/lex-body-rest-ok-2/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/lex-body-rest-ok-2/modules/ui/lib.jibbdeleted−1

This diff is too big to show here.

tests/golden/lex-body-rest-ok-2/source.jibbdeleted−12

This diff is too big to show here.

tests/golden/lex-body-rest-ok-2/tokens.txtdeleted−67

This diff is too big to show here.

tests/golden/lex-body-rest-ok-2/tree.txtdeleted−36

This diff is too big to show here.

tests/golden/lex-body-rest-ok-2/types.txtdeleted−4

This diff is too big to show here.

tests/golden/lex-body-rest-ok-3/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-ok-3/source.jibbdeleted−6

This diff is too big to show here.

tests/golden/lex-body-rest-ok-3/tokens.txtdeleted−35

This diff is too big to show here.

tests/golden/lex-body-rest-ok-3/tree.txtdeleted−18

This diff is too big to show here.

tests/golden/lex-body-rest-ok-4/about.txtdeleted−4

This diff is too big to show here.

tests/golden/lex-body-rest-ok-4/source.jibbdeleted−13

This diff is too big to show here.

tests/golden/lex-body-rest-ok-4/tokens.txtdeleted−46

This diff is too big to show here.

tests/golden/lex-body-rest-ok-4/tree.txtdeleted−23

This diff is too big to show here.

tests/golden/lex-body-rest-ok-4/types.txtdeleted−4

This diff is too big to show here.

tests/golden/lex-body-rest-ok-5/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-ok-5/source.jibbdeleted−7

This diff is too big to show here.

tests/golden/lex-body-rest-ok-5/tokens.txtdeleted−25

This diff is too big to show here.

tests/golden/lex-body-rest-ok-5/tree.txtdeleted−15

This diff is too big to show here.

tests/golden/lex-body-rest-ok-6/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-ok-6/source.jibbdeleted−7

This diff is too big to show here.

tests/golden/lex-body-rest-ok-6/tokens.txtdeleted−35

This diff is too big to show here.

tests/golden/lex-body-rest-ok-6/tree.txtdeleted−18

This diff is too big to show here.

tests/golden/lex-body-rest-ok-7/about.txtdeleted−4

This diff is too big to show here.

tests/golden/lex-body-rest-ok-7/module-trees.txtdeleted−4

This diff is too big to show here.

tests/golden/lex-body-rest-ok-7/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/lex-body-rest-ok-7/modules/ui/lib.jibbdeleted−1

This diff is too big to show here.

tests/golden/lex-body-rest-ok-7/source.jibbdeleted−10

This diff is too big to show here.

tests/golden/lex-body-rest-ok-7/tokens.txtdeleted−51

This diff is too big to show here.

tests/golden/lex-body-rest-ok-7/tree.txtdeleted−26

This diff is too big to show here.

tests/golden/lex-body-rest-ok-7/types.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-body-rest-ok-8/about.txtdeleted−4

This diff is too big to show here.

tests/golden/lex-body-rest-ok-8/module-trees.txtdeleted−4

This diff is too big to show here.

tests/golden/lex-body-rest-ok-8/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/lex-body-rest-ok-8/modules/ui/lib.jibbdeleted−1

This diff is too big to show here.

tests/golden/lex-body-rest-ok-8/source.jibbdeleted−14

This diff is too big to show here.

tests/golden/lex-body-rest-ok-8/tokens.txtdeleted−63

This diff is too big to show here.

tests/golden/lex-body-rest-ok-8/tree.txtdeleted−32

This diff is too big to show here.

tests/golden/lex-body-rest-ok-8/types.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-call-open-ok-3/about.txt → tests/golden/lex-call-open-bad-1/about.txtrenamed

The content is the same.

tests/golden/lex-call-open-ok-3/source.jibb → tests/golden/lex-call-open-bad-1/source.jibbrenamed

The content is the same.

tests/golden/lex-call-open-ok-3/tokens.txt → tests/golden/lex-call-open-bad-1/tokens.txtrenamed

The content is the same.

tests/golden/lex-call-open-ok-3/tree.txt → tests/golden/lex-call-open-bad-1/tree.txtrenamed

The content is the same.

tests/golden/lex-char-bad-1/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-char-bad-1/source.jibbdeleted−1

This diff is too big to show here.

tests/golden/lex-char-bad-1/tokens.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-char-bad-1/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-char-bad-2/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-char-bad-2/source.jibbdeleted−1

This diff is too big to show here.

tests/golden/lex-char-bad-2/tokens.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-char-bad-2/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-char-bad-3/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-char-bad-3/source.jibbdeleted−1

This diff is too big to show here.

tests/golden/lex-char-bad-3/tokens.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-char-bad-3/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-layout-bad-4/about.txt+1−1

This diff is too big to show here.

tests/golden/lex-layout-bad-4/tree.txt+1−1

This diff is too big to show here.

tests/golden/lex-name-bad-5/tokens.txt+3−4

This diff is too big to show here.

tests/golden/lex-name-bad-5/tree.txt+1−1

This diff is too big to show here.

tests/golden/lex-rune-layout-bad-3/about.txtnew file+3

This diff is too big to show here.

tests/golden/lex-rune-layout-ok-3/source.jibb → tests/golden/lex-rune-layout-bad-3/source.jibbrenamed

The content is the same.

tests/golden/lex-rune-layout-ok-3/tokens.txt → tests/golden/lex-rune-layout-bad-3/tokens.txtrenamed

The content is the same.

tests/golden/lex-rune-layout-bad-3/tree.txtnew file+3

This diff is too big to show here.

tests/golden/lex-rune-layout-ok-3/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-rune-layout-ok-3/tree.txtdeleted−6

This diff is too big to show here.

tests/golden/lex-string-bad-3/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-string-bad-3/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/lex-string-bad-3/tokens.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-string-bad-3/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-string-bad-4/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-string-bad-4/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/lex-string-bad-4/tokens.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-string-bad-4/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-string-bad-5/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-string-bad-5/source.jibbdeleted−1

This diff is too big to show here.

tests/golden/lex-string-bad-5/tokens.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-string-bad-5/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-string-bad-6/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-string-bad-6/source.jibbdeleted−1

This diff is too big to show here.

tests/golden/lex-string-bad-6/tokens.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-string-bad-6/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-tight-change-bad-10/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-tight-change-bad-10/source.jibbdeleted−1

This diff is too big to show here.

tests/golden/lex-tight-change-bad-10/tokens.txtdeleted−7

This diff is too big to show here.

tests/golden/lex-tight-change-bad-10/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-tight-change-bad-11/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-tight-change-bad-11/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/lex-tight-change-bad-11/tokens.txtdeleted−9

This diff is too big to show here.

tests/golden/lex-tight-change-bad-11/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-tight-change-bad-5/about.txt+3−3

This diff is too big to show here.

tests/golden/lex-tight-change-bad-5/source.jibb+1−1

This diff is too big to show here.

tests/golden/lex-tight-change-bad-5/tokens.txt+2−1

This diff is too big to show here.

tests/golden/lex-tight-change-bad-5/tree.txt+3−3

This diff is too big to show here.

tests/golden/lex-tight-change-ok-2/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-tight-change-ok-2/source.jibbdeleted−7

This diff is too big to show here.

tests/golden/lex-tight-change-ok-2/tokens.txtdeleted−55

This diff is too big to show here.

tests/golden/lex-tight-change-ok-2/tree.txtdeleted−20

This diff is too big to show here.

tests/golden/lex-typevar-bad-1/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-typevar-bad-1/source.jibbdeleted−1

This diff is too big to show here.

tests/golden/lex-typevar-bad-1/tokens.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-typevar-bad-1/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-typevar-bad-2/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-typevar-bad-2/source.jibbdeleted−1

This diff is too big to show here.

tests/golden/lex-typevar-bad-2/tokens.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-typevar-bad-2/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-typevar-bad-3/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-typevar-bad-3/source.jibbdeleted−1

This diff is too big to show here.

tests/golden/lex-typevar-bad-3/tokens.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-typevar-bad-3/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-typevar-bad-4/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-typevar-bad-4/source.jibbdeleted−1

This diff is too big to show here.

tests/golden/lex-typevar-bad-4/tokens.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-typevar-bad-4/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-typevar-ok-1/about.txtdeleted−4

This diff is too big to show here.

tests/golden/lex-typevar-ok-1/source.jibbdeleted−3

This diff is too big to show here.

tests/golden/lex-typevar-ok-1/tokens.txtdeleted−39

This diff is too big to show here.

tests/golden/lex-typevar-ok-1/tree.txtdeleted−15

This diff is too big to show here.

tests/golden/lex-typevar-ok-1/types.txtdeleted−4

This diff is too big to show here.

tests/golden/lex-utf8-bad-1/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-utf8-bad-1/source.jibbdeleted−1

This diff is too big to show here.

tests/golden/lex-utf8-bad-1/tokens.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-utf8-bad-1/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-utf8-bad-2/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-utf8-bad-2/source.jibbdeleted−1

This diff is too big to show here.

tests/golden/lex-utf8-bad-2/tokens.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-utf8-bad-2/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-utf8-ok-1/about.txtdeleted−3

This diff is too big to show here.

tests/golden/lex-utf8-ok-1/source.jibbdeleted−1

This diff is too big to show here.

tests/golden/lex-utf8-ok-1/tokens.txtdeleted−7

This diff is too big to show here.

tests/golden/lex-utf8-ok-1/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/module-import-api-derived-clash/about.txtdeleted−4

This diff is too big to show here.

tests/golden/module-import-api-derived-clash/mar/full.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-derived-clash/marks.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-derived-clash/module-trees.txtdeleted−8

This diff is too big to show here.

tests/golden/module-import-api-derived-clash/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-derived-clash/modules/ui/api/demo.jibbdeleted−5

This diff is too big to show here.

tests/golden/module-import-api-derived-clash/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/module-import-api-derived-clash/tokens.txtdeleted−13

This diff is too big to show here.

tests/golden/module-import-api-derived-clash/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/module-import-api-derived-clash/types.txtdeleted−8

This diff is too big to show here.

tests/golden/module-import-api-import-error/about.txtdeleted−4

This diff is too big to show here.

tests/golden/module-import-api-import-error/mar/full.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-import-error/marks.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-import-error/module-trees.txtdeleted−48

This diff is too big to show here.

tests/golden/module-import-api-import-error/modules.txtdeleted−2

This diff is too big to show here.

tests/golden/module-import-api-import-error/modules/ui/api/demo.jibbdeleted−5

This diff is too big to show here.

tests/golden/module-import-api-import-error/modules/ui/stores/cart.jibbdeleted−12

This diff is too big to show here.

tests/golden/module-import-api-import-error/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/module-import-api-import-error/tokens.txtdeleted−13

This diff is too big to show here.

tests/golden/module-import-api-import-error/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/module-import-api-import-error/types.txtdeleted−8

This diff is too big to show here.

tests/golden/module-import-api-mark-prelude-value/about.txtdeleted−4

This diff is too big to show here.

tests/golden/module-import-api-mark-prelude-value/mar/same.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-mark-prelude-value/marks.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-mark-prelude-value/module-trees.txtdeleted−4

This diff is too big to show here.

tests/golden/module-import-api-mark-prelude-value/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-mark-prelude-value/modules/ui/api/demo.jibbdeleted−2

This diff is too big to show here.

tests/golden/module-import-api-mark-prelude-value/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/module-import-api-mark-prelude-value/tokens.txtdeleted−13

This diff is too big to show here.

tests/golden/module-import-api-mark-prelude-value/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/module-import-api-mark-prelude-value/types.txtdeleted−2

This diff is too big to show here.

tests/golden/module-import-api-mark-value/about.txtdeleted−4

This diff is too big to show here.

tests/golden/module-import-api-mark-value/mar/full.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-mark-value/marks.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-mark-value/module-trees.txtdeleted−5

This diff is too big to show here.

tests/golden/module-import-api-mark-value/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-mark-value/modules/ui/api/demo.jibbdeleted−3

This diff is too big to show here.

tests/golden/module-import-api-mark-value/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/module-import-api-mark-value/tokens.txtdeleted−13

This diff is too big to show here.

tests/golden/module-import-api-mark-value/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/module-import-api-mark-value/types.txtdeleted−2

This diff is too big to show here.

tests/golden/module-import-api-nested-path/about.txtdeleted−4

This diff is too big to show here.

tests/golden/module-import-api-nested-path/mar/full.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-nested-path/marks.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-nested-path/module-trees.txtdeleted−4

This diff is too big to show here.

tests/golden/module-import-api-nested-path/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-nested-path/modules/ui/api/foo/bar.jibbdeleted−2

This diff is too big to show here.

tests/golden/module-import-api-nested-path/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/module-import-api-nested-path/tokens.txtdeleted−15

This diff is too big to show here.

tests/golden/module-import-api-nested-path/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/module-import-api-nested-path/types.txtdeleted−2

This diff is too big to show here.

tests/golden/module-import-api-paths-mark-value/about.txtdeleted−4

This diff is too big to show here.

tests/golden/module-import-api-paths-mark-value/mar/full.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-paths-mark-value/mar/other.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-paths-mark-value/marks.txtdeleted−2

This diff is too big to show here.

tests/golden/module-import-api-paths-mark-value/module-trees.txtdeleted−7

This diff is too big to show here.

tests/golden/module-import-api-paths-mark-value/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-paths-mark-value/modules/ui/api/demo.jibbdeleted−5

This diff is too big to show here.

tests/golden/module-import-api-paths-mark-value/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/module-import-api-paths-mark-value/tokens.txtdeleted−13

This diff is too big to show here.

tests/golden/module-import-api-paths-mark-value/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/module-import-api-paths-mark-value/types.txtdeleted−2

This diff is too big to show here.

tests/golden/module-import-api-paths-scope-conflict/about.txtdeleted−4

This diff is too big to show here.

tests/golden/module-import-api-paths-scope-conflict/mar/full.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-paths-scope-conflict/marks.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-paths-scope-conflict/module-trees.txtdeleted−6

This diff is too big to show here.

tests/golden/module-import-api-paths-scope-conflict/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-paths-scope-conflict/modules/ui/api/demo.jibbdeleted−3

This diff is too big to show here.

tests/golden/module-import-api-paths-scope-conflict/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/module-import-api-paths-scope-conflict/tokens.txtdeleted−13

This diff is too big to show here.

tests/golden/module-import-api-paths-scope-conflict/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/module-import-api-paths-scope-conflict/types.txtdeleted−2

This diff is too big to show here.

tests/golden/module-import-api-poke-clash/about.txtdeleted−4

This diff is too big to show here.

tests/golden/module-import-api-poke-clash/mar/full.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-poke-clash/marks.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-poke-clash/module-trees.txtdeleted−5

This diff is too big to show here.

tests/golden/module-import-api-poke-clash/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-poke-clash/modules/ui/api/demo.jibbdeleted−3

This diff is too big to show here.

tests/golden/module-import-api-poke-clash/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/module-import-api-poke-clash/tokens.txtdeleted−13

This diff is too big to show here.

tests/golden/module-import-api-poke-clash/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/module-import-api-poke-clash/types.txtdeleted−8

This diff is too big to show here.

tests/golden/module-import-api-poke-reason/about.txtdeleted−4

This diff is too big to show here.

tests/golden/module-import-api-poke-reason/module-trees.txtdeleted−3

This diff is too big to show here.

tests/golden/module-import-api-poke-reason/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-poke-reason/modules/ui/api/demo.jibbdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-poke-reason/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/module-import-api-poke-reason/tokens.txtdeleted−13

This diff is too big to show here.

tests/golden/module-import-api-poke-reason/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/module-import-api-poke-reason/types.txtdeleted−2

This diff is too big to show here.

tests/golden/module-import-api-request-reason/about.txtdeleted−4

This diff is too big to show here.

tests/golden/module-import-api-request-reason/mar/full.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-request-reason/marks.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-request-reason/module-trees.txtdeleted−7

This diff is too big to show here.

tests/golden/module-import-api-request-reason/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-request-reason/modules/ui/api/demo.jibbdeleted−4

This diff is too big to show here.

tests/golden/module-import-api-request-reason/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/module-import-api-request-reason/tokens.txtdeleted−21

This diff is too big to show here.

tests/golden/module-import-api-request-reason/tree.txtdeleted−9

This diff is too big to show here.

tests/golden/module-import-api-request-reason/types.txtdeleted−2

This diff is too big to show here.

tests/golden/module-import-api-scope-conflict/about.txtdeleted−4

This diff is too big to show here.

tests/golden/module-import-api-scope-conflict/mar/full.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-scope-conflict/marks.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-scope-conflict/module-trees.txtdeleted−11

This diff is too big to show here.

tests/golden/module-import-api-scope-conflict/modules.txtdeleted−2

This diff is too big to show here.

tests/golden/module-import-api-scope-conflict/modules/ui/api/demo.jibbdeleted−3

This diff is too big to show here.

tests/golden/module-import-api-scope-conflict/modules/ui/lib.jibbdeleted−1

This diff is too big to show here.

tests/golden/module-import-api-scope-conflict/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/module-import-api-scope-conflict/tokens.txtdeleted−13

This diff is too big to show here.

tests/golden/module-import-api-scope-conflict/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/module-import-api-scope-conflict/types.txtdeleted−8

This diff is too big to show here.

tests/golden/module-import-cycle/source.jibb+1−1

This diff is too big to show here.

tests/golden/module-import-cycle/tokens.txt+6−6

This diff is too big to show here.

tests/golden/module-import-cycle/tree.txt+3−3

This diff is too big to show here.

tests/golden/module-import-identity/source.jibb+1−1

This diff is too big to show here.

tests/golden/module-import-identity/tokens.txt+5−5

This diff is too big to show here.

tests/golden/module-import-identity/tree.txt+3−3

This diff is too big to show here.

tests/golden/module-import-identity/types.txt+1−1

This diff is too big to show here.

tests/golden/module-import-prelude-value-shadow/types.txt+1−7

This diff is too big to show here.

tests/golden/module-import-root-import-shadow/mar/label.txtmode 120000 → 100644+5−1

This diff is too big to show here.

tests/golden/module-import-store-derived-clash/about.txtdeleted−4

This diff is too big to show here.

tests/golden/module-import-store-derived-clash/module-trees.txtdeleted−40

This diff is too big to show here.

tests/golden/module-import-store-derived-clash/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-store-derived-clash/modules/ui/stores/cart.jibbdeleted−12

This diff is too big to show here.

tests/golden/module-import-store-derived-clash/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/module-import-store-derived-clash/tokens.txtdeleted−13

This diff is too big to show here.

tests/golden/module-import-store-derived-clash/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/module-import-store-derived-clash/types.txtdeleted−8

This diff is too big to show here.

tests/golden/module-import-store-face-clash/about.txtdeleted−4

This diff is too big to show here.

tests/golden/module-import-store-face-clash/module-trees.txtdeleted−40

This diff is too big to show here.

tests/golden/module-import-store-face-clash/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/module-import-store-face-clash/modules/ui/stores/cart.jibbdeleted−12

This diff is too big to show here.

tests/golden/module-import-store-face-clash/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/module-import-store-face-clash/tokens.txtdeleted−13

This diff is too big to show here.

tests/golden/module-import-store-face-clash/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/module-import-store-face-clash/types.txtdeleted−8

This diff is too big to show here.

tests/golden/module-import-sur-scope/types.txt+1−1

This diff is too big to show here.

tests/golden/module-import-transitive/source.jibb+1−1

This diff is too big to show here.

tests/golden/module-import-transitive/tokens.txt+6−6

This diff is too big to show here.

tests/golden/module-import-transitive/tree.txt+3−3

This diff is too big to show here.

tests/golden/module-import-transitive/types.txt+1−1

This diff is too big to show here.

tests/golden/module-import-unused-invalid/source.jibb+1−1

This diff is too big to show here.

tests/golden/module-import-unused-invalid/tokens.txt+6−6

This diff is too big to show here.

tests/golden/module-import-unused-invalid/tree.txt+3−3

This diff is too big to show here.

tests/golden/module-import-unused-invalid/types.txt+1−1

This diff is too big to show here.

tests/golden/module-missing-value-cycle/about.txtdeleted−4

This diff is too big to show here.

tests/golden/module-missing-value-cycle/module-trees.txtdeleted−21

This diff is too big to show here.

tests/golden/module-missing-value-cycle/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/module-missing-value-cycle/modules/ui/lib.jibbdeleted−4

This diff is too big to show here.

tests/golden/module-missing-value-cycle/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/module-missing-value-cycle/tokens.txtdeleted−14

This diff is too big to show here.

tests/golden/module-missing-value-cycle/tree.txtdeleted−5

This diff is too big to show here.

tests/golden/module-missing-value-cycle/types.txtdeleted−2

This diff is too big to show here.

tests/golden/module-missing-value-sample-shadow/about.txtdeleted−4

This diff is too big to show here.

tests/golden/module-missing-value-sample-shadow/module-trees.txtdeleted−15

This diff is too big to show here.

tests/golden/module-missing-value-sample-shadow/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/module-missing-value-sample-shadow/modules/ui/lib.jibbdeleted−3

This diff is too big to show here.

tests/golden/module-missing-value-sample-shadow/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/module-missing-value-sample-shadow/tokens.txtdeleted−14

This diff is too big to show here.

tests/golden/module-missing-value-sample-shadow/tree.txtdeleted−5

This diff is too big to show here.

tests/golden/module-missing-value-sample-shadow/types.txtdeleted−4

This diff is too big to show here.

tests/golden/prelude-unit-list-transforms/about.txt+2−2

This diff is too big to show here.

tests/golden/prelude-unit-list-transforms/source.jibb+2−30

This diff is too big to show here.

tests/golden/prelude-unit-list-transforms/tokens.txt+2045−2211

This diff is too big to show here.

tests/golden/prelude-unit-list-transforms/tree.txt+924−995

This diff is too big to show here.

tests/golden/prelude-unit-list-transforms/types.txt+2−5

This diff is too big to show here.

tests/golden/types-arithmetic-module/source.jibb+1−1

This diff is too big to show here.

tests/golden/types-arithmetic-module/tokens.txt+8−8

This diff is too big to show here.

tests/golden/types-arithmetic-module/tree.txt+5−5

This diff is too big to show here.

tests/golden/types-arithmetic-module/types.txt+2−2

This diff is too big to show here.

tests/golden/types-cell-branch-context/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-cell-branch-context/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-cell-branch-context/source.jibbdeleted−37

This diff is too big to show here.

tests/golden/types-cell-branch-context/tokens.txtdeleted−308

This diff is too big to show here.

tests/golden/types-cell-branch-context/tree.txtdeleted−156

This diff is too big to show here.

tests/golden/types-cell-branch-context/types.txtdeleted−11

This diff is too big to show here.

tests/golden/types-cell-pattern-schemes/source.jibb+1−1

This diff is too big to show here.

tests/golden/types-cell-pattern-schemes/tokens.txt+7−7

This diff is too big to show here.

tests/golden/types-cell-pattern-schemes/tree.txt+3−3

This diff is too big to show here.

tests/golden/types-cell-pattern-schemes/types.txt+1−1

This diff is too big to show here.

tests/golden/types-change-overlap-lines/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-change-overlap-lines/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-change-overlap-lines/source.jibbdeleted−7

This diff is too big to show here.

tests/golden/types-change-overlap-lines/tokens.txtdeleted−49

This diff is too big to show here.

tests/golden/types-change-overlap-lines/tree.txtdeleted−18

This diff is too big to show here.

tests/golden/types-change-overlap-lines/types.txtdeleted−8

This diff is too big to show here.

tests/golden/types-change-overlap/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-change-overlap/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-change-overlap/source.jibbdeleted−4

This diff is too big to show here.

tests/golden/types-change-overlap/tokens.txtdeleted−57

This diff is too big to show here.

tests/golden/types-change-overlap/tree.txtdeleted−22

This diff is too big to show here.

tests/golden/types-change-overlap/types.txtdeleted−8

This diff is too big to show here.

tests/golden/types-change-repeated-wing/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-change-repeated-wing/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-change-repeated-wing/source.jibbdeleted−3

This diff is too big to show here.

tests/golden/types-change-repeated-wing/tokens.txtdeleted−41

This diff is too big to show here.

tests/golden/types-change-repeated-wing/tree.txtdeleted−16

This diff is too big to show here.

tests/golden/types-change-repeated-wing/types.txtdeleted−8

This diff is too big to show here.

tests/golden/types-change-repeated/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-change-repeated/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-change-repeated/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-change-repeated/tokens.txtdeleted−39

This diff is too big to show here.

tests/golden/types-change-repeated/tree.txtdeleted−15

This diff is too big to show here.

tests/golden/types-change-repeated/types.txtdeleted−8

This diff is too big to show here.

tests/golden/types-change-wing/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-change-wing/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-change-wing/source.jibbdeleted−24

This diff is too big to show here.

tests/golden/types-change-wing/tokens.txtdeleted−289

This diff is too big to show here.

tests/golden/types-change-wing/tree.txtdeleted−111

This diff is too big to show here.

tests/golden/types-change-wing/types.txtdeleted−46

This diff is too big to show here.

tests/golden/types-constructor-context/types.txt+2−2

This diff is too big to show here.

tests/golden/types-generic-face-inference/types.txt+1−7

This diff is too big to show here.

tests/golden/types-generic-gates/about.txt+1−1

This diff is too big to show here.

tests/golden/types-generic-gates/source.jibb−2

This diff is too big to show here.

tests/golden/types-generic-gates/tokens.txt+1−43

This diff is too big to show here.

tests/golden/types-generic-gates/tree.txt+1−18

This diff is too big to show here.

tests/golden/types-generic-gates/types.txt−2

This diff is too big to show here.

tests/golden/types-generic-result-context/source.jibb+9−9

This diff is too big to show here.

tests/golden/types-generic-result-context/tokens.txt+65−65

This diff is too big to show here.

tests/golden/types-generic-result-context/tree.txt+24−24

This diff is too big to show here.

tests/golden/types-generic-result-context/types.txt+6−6

This diff is too big to show here.

tests/golden/types-generic-union-alias-face/types.txt+1−1

This diff is too big to show here.

tests/golden/types-generic-union-alias/types.txt+1−1

This diff is too big to show here.

tests/golden/types-generic-union-escaping/module-trees.txt+4−4

This diff is too big to show here.

tests/golden/types-generic-union-escaping/modules/ui/mid.jibb+1−1

This diff is too big to show here.

tests/golden/types-generic-union-escaping/source.jibb+1−1

This diff is too big to show here.

tests/golden/types-generic-union-escaping/tokens.txt+1−1

This diff is too big to show here.

tests/golden/types-generic-union-escaping/tree.txt+1−1

This diff is too big to show here.

tests/golden/types-generic-union-local/types.txt+1−1

This diff is too big to show here.

tests/golden/types-hole-module-boundary/types.txt+1−1

This diff is too big to show here.

tests/golden/types-hole-numeric-capture/types.txt+4−10

This diff is too big to show here.

tests/golden/types-import-mark/mar/label.txtmode 120000 → 100644+5−1

This diff is too big to show here.

tests/golden/types-list-open-constraints/about.txt+1−1

This diff is too big to show here.

tests/golden/types-list-open-constraints/types.txt+1−4

This diff is too big to show here.

tests/golden/types-list-patterns/about.txt+1−1

This diff is too big to show here.

tests/golden/types-list-patterns/source.jibb−4

This diff is too big to show here.

tests/golden/types-list-patterns/tokens.txt+215−241

This diff is too big to show here.

tests/golden/types-list-patterns/tree.txt+110−121

This diff is too big to show here.

tests/golden/types-list-patterns/types.txt+1−2

This diff is too big to show here.

tests/golden/types-local-capitals/about.txt+1−1

This diff is too big to show here.

tests/golden/types-local-capitals/types.txt+1−7

This diff is too big to show here.

tests/golden/types-local-error-call/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-local-error-call/source.jibbdeleted−27

This diff is too big to show here.

tests/golden/types-local-error-call/tokens.txtdeleted−171

This diff is too big to show here.

tests/golden/types-local-error-call/tree.txtdeleted−82

This diff is too big to show here.

tests/golden/types-local-error-call/types.txtdeleted−33

This diff is too big to show here.

tests/golden/types-local-error-cast/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-local-error-cast/source.jibbdeleted−56

This diff is too big to show here.

tests/golden/types-local-error-cast/tokens.txtdeleted−339

This diff is too big to show here.

tests/golden/types-local-error-cast/tree.txtdeleted−151

This diff is too big to show here.

tests/golden/types-local-error-cast/types.txtdeleted−54

This diff is too big to show here.

tests/golden/types-local-error-forward/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-local-error-forward/source.jibbdeleted−26

This diff is too big to show here.

tests/golden/types-local-error-forward/tokens.txtdeleted−157

This diff is too big to show here.

tests/golden/types-local-error-forward/tree.txtdeleted−69

This diff is too big to show here.

tests/golden/types-local-error-forward/types.txtdeleted−8

This diff is too big to show here.

tests/golden/types-local-error-order/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-local-error-order/source.jibbdeleted−80

This diff is too big to show here.

tests/golden/types-local-error-order/tokens.txtdeleted−588

This diff is too big to show here.

tests/golden/types-local-error-order/tree.txtdeleted−269

This diff is too big to show here.

tests/golden/types-local-error-order/types.txtdeleted−12

This diff is too big to show here.

tests/golden/types-local-recursive/about.txt+1−1

This diff is too big to show here.

tests/golden/types-local-recursive/types.txt+3−15

This diff is too big to show here.

tests/golden/types-many-variables/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-many-variables/source.jibbdeleted−6

This diff is too big to show here.

tests/golden/types-many-variables/tokens.txtdeleted−266

This diff is too big to show here.

tests/golden/types-many-variables/tree.txtdeleted−26

This diff is too big to show here.

tests/golden/types-many-variables/types.txtdeleted−13

This diff is too big to show here.

tests/golden/types-module-fixtures/modules/ui/api/blog.jibbmode 120000 → 100644+5−1

This diff is too big to show here.

tests/golden/types-module-fixtures/modules/ui/components/card.jibbmode 120000 → 100644+5−1

This diff is too big to show here.

tests/golden/types-module-fixtures/source.jibbmode 120000 → 100644+9−1

This diff is too big to show here.

tests/golden/types-module-fixtures/types.txt+1−1

This diff is too big to show here.

tests/golden/types-module-mixed/mar/label.txtmode 120000 → 100644+5−1

This diff is too big to show here.

tests/golden/types-nested-shallow-preserve/source.jibb+15−15

This diff is too big to show here.

tests/golden/types-nested-shallow-preserve/tokens.txt+107−107

This diff is too big to show here.

tests/golden/types-nested-shallow-preserve/tree.txt+61−61

This diff is too big to show here.

tests/golden/types-nested-shallow-preserve/types.txt+20−20

This diff is too big to show here.

tests/golden/types-pair-context/source.jibb+14−14

This diff is too big to show here.

tests/golden/types-pair-context/tokens.txt+71−71

This diff is too big to show here.

tests/golden/types-pair-context/tree.txt+34−34

This diff is too big to show here.

tests/golden/types-pair-context/types.txt+19−19

This diff is too big to show here.

tests/golden/types-partial-aura-family/source.jibb+1−1

This diff is too big to show here.

tests/golden/types-partial-aura-family/tokens.txt+8−8

This diff is too big to show here.

tests/golden/types-partial-aura-family/tree.txt+4−4

This diff is too big to show here.

tests/golden/types-partial-aura-family/types.txt+1−1

This diff is too big to show here.

tests/golden/types-partial-aura-generalization/source.jibb+1−1

This diff is too big to show here.

tests/golden/types-partial-aura-generalization/tokens.txt+8−8

This diff is too big to show here.

tests/golden/types-partial-aura-generalization/tree.txt+5−5

This diff is too big to show here.

tests/golden/types-partial-aura-generalization/types.txt+1−1

This diff is too big to show here.

tests/golden/types-partial-aura/source.jibb+1−1

This diff is too big to show here.

tests/golden/types-partial-aura/tokens.txt+2−2

This diff is too big to show here.

tests/golden/types-partial-aura/tree.txt+1−1

This diff is too big to show here.

tests/golden/types-partial-aura/types.txt+1−1

This diff is too big to show here.

tests/golden/types-partial-branch-widening/about.txt+1−1

This diff is too big to show here.

tests/golden/types-partial-branch-widening/source.jibb−55

This diff is too big to show here.

tests/golden/types-partial-branch-widening/tokens.txt+18−358

This diff is too big to show here.

tests/golden/types-partial-branch-widening/tree.txt+14−164

This diff is too big to show here.

tests/golden/types-partial-branch-widening/types.txt+3−16

This diff is too big to show here.

tests/golden/types-partial-forward/about.txt+1−1

This diff is too big to show here.

tests/golden/types-partial-forward/source.jibb+1−3

This diff is too big to show here.

tests/golden/types-partial-forward/tokens.txt+2−10

This diff is too big to show here.

tests/golden/types-partial-forward/tree.txt+1−3

This diff is too big to show here.

tests/golden/types-partial-forward/types.txt−2

This diff is too big to show here.

tests/golden/types-partial-locals/source.jibb+2−2

This diff is too big to show here.

tests/golden/types-partial-locals/tokens.txt+10−10

This diff is too big to show here.

tests/golden/types-partial-locals/tree.txt+5−5

This diff is too big to show here.

tests/golden/types-partial-locals/types.txt+1−1

This diff is too big to show here.

tests/golden/types-partial-union-nested-nouns/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-partial-union-nested-nouns/source.jibbdeleted−18

This diff is too big to show here.

tests/golden/types-partial-union-nested-nouns/tokens.txtdeleted−108

This diff is too big to show here.

tests/golden/types-partial-union-nested-nouns/tree.txtdeleted−47

This diff is too big to show here.

tests/golden/types-partial-union-nested-nouns/types.txtdeleted−25

This diff is too big to show here.

tests/golden/types-prelude-arithmetic/about.txt+1−1

This diff is too big to show here.

tests/golden/types-prelude-arithmetic/source.jibb+1−1

This diff is too big to show here.

tests/golden/types-prelude-arithmetic/tokens.txt+7−7

This diff is too big to show here.

tests/golden/types-prelude-arithmetic/tree.txt+5−5

This diff is too big to show here.

tests/golden/types-prelude-arithmetic/types.txt+2−8

This diff is too big to show here.

tests/golden/types-prelude-ask/about.txt+1−1

This diff is too big to show here.

tests/golden/types-prelude-ask/source.jibb+1−1

This diff is too big to show here.

tests/golden/types-prelude-ask/tokens.txt+25−25

This diff is too big to show here.

tests/golden/types-prelude-ask/tree.txt+11−11

This diff is too big to show here.

tests/golden/types-prelude-ask/types.txt+1−1

This diff is too big to show here.

tests/golden/types-prelude-bond/source.jibb+1−1

This diff is too big to show here.

tests/golden/types-prelude-bond/tokens.txt+12−12

This diff is too big to show here.

tests/golden/types-prelude-bond/tree.txt+6−6

This diff is too big to show here.

tests/golden/types-prelude-bond/types.txt+1−1

This diff is too big to show here.

tests/golden/types-prelude-cmd/source.jibb+6−6

This diff is too big to show here.

tests/golden/types-prelude-cmd/tokens.txt+32−32

This diff is too big to show here.

tests/golden/types-prelude-cmd/tree.txt+15−15

This diff is too big to show here.

tests/golden/types-prelude-cmd/types.txt+8−8

This diff is too big to show here.

tests/golden/types-prelude-comparison/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-prelude-comparison/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-comparison/source.jibbdeleted−18

This diff is too big to show here.

tests/golden/types-prelude-comparison/tokens.txtdeleted−175

This diff is too big to show here.

tests/golden/types-prelude-comparison/tree.txtdeleted−71

This diff is too big to show here.

tests/golden/types-prelude-comparison/types.txtdeleted−31

This diff is too big to show here.

tests/golden/types-prelude-generic-alias/types.txt+1−1

This diff is too big to show here.

tests/golden/types-prelude-lead-late/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-prelude-lead-late/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-lead-late/source.jibbdeleted−10

This diff is too big to show here.

tests/golden/types-prelude-lead-late/tokens.txtdeleted−151

This diff is too big to show here.

tests/golden/types-prelude-lead-late/tree.txtdeleted−83

This diff is too big to show here.

tests/golden/types-prelude-lead-late/types.txtdeleted−17

This diff is too big to show here.

tests/golden/types-prelude-lent/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-prelude-lent/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-lent/source.jibbdeleted−8

This diff is too big to show here.

tests/golden/types-prelude-lent/tokens.txtdeleted−76

This diff is too big to show here.

tests/golden/types-prelude-lent/tree.txtdeleted−38

This diff is too big to show here.

tests/golden/types-prelude-lent/types.txtdeleted−15

This diff is too big to show here.

tests/golden/types-prelude-like/source.jibb+1−1

This diff is too big to show here.

tests/golden/types-prelude-like/tokens.txt+7−7

This diff is too big to show here.

tests/golden/types-prelude-like/tree.txt+1−2

This diff is too big to show here.

tests/golden/types-prelude-list-alias/source.jibb+1−1

This diff is too big to show here.

tests/golden/types-prelude-list-alias/tokens.txt+9−9

This diff is too big to show here.

tests/golden/types-prelude-list-alias/tree.txt+5−5

This diff is too big to show here.

tests/golden/types-prelude-list-alias/types.txt+1−1

This diff is too big to show here.

tests/golden/types-prelude-list-functions/types.txt+1−1

This diff is too big to show here.

tests/golden/types-prelude-sub/types.txt+1−1

This diff is too big to show here.

tests/golden/types-prelude-succ/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-prelude-succ/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-succ/source.jibbdeleted−4

This diff is too big to show here.

tests/golden/types-prelude-succ/tokens.txtdeleted−32

This diff is too big to show here.

tests/golden/types-prelude-succ/tree.txtdeleted−15

This diff is too big to show here.

tests/golden/types-prelude-succ/types.txtdeleted−11

This diff is too big to show here.

tests/golden/types-prelude-text/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-prelude-text/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-text/source.jibbdeleted−8

This diff is too big to show here.

tests/golden/types-prelude-text/tokens.txtdeleted−66

This diff is too big to show here.

tests/golden/types-prelude-text/tree.txtdeleted−36

This diff is too big to show here.

tests/golden/types-prelude-text/types.txtdeleted−26

This diff is too big to show here.

tests/golden/types-prelude-ui/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-prelude-ui/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-ui/source.jibbdeleted−78

This diff is too big to show here.

tests/golden/types-prelude-ui/tokens.txtdeleted−728

This diff is too big to show here.

tests/golden/types-prelude-ui/tree.txtdeleted−300

This diff is too big to show here.

tests/golden/types-prelude-ui/types.txtdeleted−85

This diff is too big to show here.

tests/golden/types-prelude-unit-helpers/about.txt+1−1

This diff is too big to show here.

tests/golden/types-prelude-unit-helpers/source.jibb−16

This diff is too big to show here.

tests/golden/types-prelude-unit-helpers/tokens.txt+1−219

This diff is too big to show here.

tests/golden/types-prelude-unit-helpers/tree.txt+1−117

This diff is too big to show here.

tests/golden/types-prelude-unit-helpers/types.txt−52

This diff is too big to show here.

tests/golden/types-prelude-zing/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-prelude-zing/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-zing/source.jibbdeleted−6

This diff is too big to show here.

tests/golden/types-prelude-zing/tokens.txtdeleted−92

This diff is too big to show here.

tests/golden/types-prelude-zing/tree.txtdeleted−43

This diff is too big to show here.

tests/golden/types-prelude-zing/types.txtdeleted−13

This diff is too big to show here.

tests/golden/types-proj-explicit-context/types.txt+2−2

This diff is too big to show here.

tests/golden/types-proj-nested-no-implicit/types.txt+3−3

This diff is too big to show here.

tests/golden/types-proj-reserved-imported-definition/types.txt+1−4

This diff is too big to show here.

tests/golden/types-record-cast-context/types.txt+1−1

This diff is too big to show here.

tests/golden/types-record-change-generic/about.txt+1−1

This diff is too big to show here.

tests/golden/types-record-change-generic/source.jibb+1

This diff is too big to show here.

tests/golden/types-record-change-generic/tokens.txt+59−35

This diff is too big to show here.

tests/golden/types-record-change-generic/tree.txt+24−15

This diff is too big to show here.

tests/golden/types-record-change-generic/types.txt+1

This diff is too big to show here.

tests/golden/types-recursion-scc-groups/types.txt+1−1

This diff is too big to show here.

tests/golden/types-recursion-scc-import-bad/types.txt+1−1

This diff is too big to show here.

tests/golden/types-recursion-scc-import/source.jibb+1−1

This diff is too big to show here.

tests/golden/types-recursion-scc-import/tokens.txt+7−7

This diff is too big to show here.

tests/golden/types-recursion-scc-import/tree.txt+5−5

This diff is too big to show here.

tests/golden/types-recursion-scc-import/types.txt+1−1

This diff is too big to show here.

tests/golden/types-recursion-scc-local/about.txt+1−1

This diff is too big to show here.

tests/golden/types-recursion-scc-local/types.txt+1−1

This diff is too big to show here.

tests/golden/types-recursive-branch/types.txt+4−4

This diff is too big to show here.

tests/golden/types-recursive-gate/types.txt+2−2

This diff is too big to show here.

tests/golden/types-request-normal/mar/full.txtmode 120000 → 100644+5−1

This diff is too big to show here.

tests/golden/types-scope-library-poke/types.txt+1−2

This diff is too big to show here.

tests/golden/types-scope-root-api/types.txt+1−1

This diff is too big to show here.

tests/golden/types-typevar-names/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-typevar-names/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-typevar-names/source.jibbdeleted−14

This diff is too big to show here.

tests/golden/types-typevar-names/tokens.txtdeleted−162

This diff is too big to show here.

tests/golden/types-typevar-names/tree.txtdeleted−67

This diff is too big to show here.

tests/golden/types-typevar-names/types.txtdeleted−27

This diff is too big to show here.

tests/golden/types-typevar-print/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-typevar-print/source.jibbdeleted−11

This diff is too big to show here.

tests/golden/types-typevar-print/tokens.txtdeleted−108

This diff is too big to show here.

tests/golden/types-typevar-print/tree.txtdeleted−43

This diff is too big to show here.

tests/golden/types-typevar-print/types.txtdeleted−10

This diff is too big to show here.

tests/golden/types-union-finite-context/source.jibb+1−1

This diff is too big to show here.

tests/golden/types-union-finite-context/tokens.txt+3−3

This diff is too big to show here.

tests/golden/types-union-finite-context/tree.txt+2−2

This diff is too big to show here.

tests/golden/types-union-finite-generic/about.txt+1−1

This diff is too big to show here.

tests/golden/types-union-finite-generic/types.txt+1−7

This diff is too big to show here.

tests/golden/types-union-finite-limit/about.txt+1−1

This diff is too big to show here.

tests/golden/types-union-finite-limit/types.txt+1−1

This diff is too big to show here.

tests/golden/types-union-finite/about.txt+1−1

This diff is too big to show here.

tests/golden/types-union-finite/source.jibb−7

This diff is too big to show here.

tests/golden/types-union-finite/tokens.txt+163−210

This diff is too big to show here.

tests/golden/types-union-finite/tree.txt+78−99

This diff is too big to show here.

tests/golden/types-union-finite/types.txt+2−3

This diff is too big to show here.

tests/golden/types-union-nonwing-subject/source.jibb+13−13

This diff is too big to show here.

tests/golden/types-union-nonwing-subject/tokens.txt+54−54

This diff is too big to show here.

tests/golden/types-union-nonwing-subject/tree.txt+26−26

This diff is too big to show here.

tests/golden/types-union-nonwing-subject/types.txt+3−3

This diff is too big to show here.

tests/golden/types-union-patterns-generic/about.txt+1−1

This diff is too big to show here.

tests/golden/types-union-patterns-generic/types.txt+1−7

This diff is too big to show here.

tests/golden/types-union-polymorphic-identity/types.txt+1−1

This diff is too big to show here.

tests/golden/types-union-runtime-equality/about.txtdeleted−3

This diff is too big to show here.

tests/golden/types-union-runtime-equality/source.jibbdeleted−16

This diff is too big to show here.

tests/golden/types-union-runtime-equality/tokens.txtdeleted−96

This diff is too big to show here.

tests/golden/types-union-runtime-equality/tree.txtdeleted−37

This diff is too big to show here.

tests/golden/types-union-runtime-equality/types.txtdeleted−25

This diff is too big to show here.

tests/golden/types-union-source-alias/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-union-source-alias/source.jibbdeleted−18

This diff is too big to show here.

tests/golden/types-union-source-alias/tokens.txtdeleted−119

This diff is too big to show here.

tests/golden/types-union-source-alias/tree.txtdeleted−41

This diff is too big to show here.

tests/golden/types-union-source-alias/types.txtdeleted−23

This diff is too big to show here.

tests/golden/types-unit-context/source.jibb+3−3

This diff is too big to show here.

tests/golden/types-unit-context/tokens.txt+33−33

This diff is too big to show here.

tests/golden/types-unit-context/tree.txt+21−21

This diff is too big to show here.

tests/golden/types-unit-context/types.txt+15−15

This diff is too big to show here.

tests/importer/about.txt+2−8

This diff is too big to show here.

tests/importer/tree.txt+3−3

This diff is too big to show here.

tests/lib/jibb-api-evidence.hoon+6−12

This diff is too big to show here.

tests/lib/jibb-api-paths.hoon+9−55

This diff is too big to show here.

tests/lib/jibb-arithmetic-guards.hoon+3−4

This diff is too big to show here.

tests/lib/jibb-bridge.hoon+5−14

This diff is too big to show here.

tests/lib/jibb-buttons.hoondeleted−81

This diff is too big to show here.

tests/lib/jibb-cell-branch.hoondeleted−53

This diff is too big to show here.

tests/lib/jibb-check-spans.hoondeleted−8

This diff is too big to show here.

tests/lib/jibb-deferred-context.hoondeleted−87

This diff is too big to show here.

tests/lib/jibb-deferred-prepared.hoondeleted−114

This diff is too big to show here.

tests/lib/jibb-deferred-resolver.hoondeleted−116

This diff is too big to show here.

tests/lib/jibb-deferred.hoondeleted−253

This diff is too big to show here.

tests/lib/jibb-direct-gate-source.hoon+4−8

This diff is too big to show here.

tests/lib/jibb-doc-examples.hoondeleted−172

This diff is too big to show here.

tests/lib/jibb-empty.hoondeleted−176

This diff is too big to show here.

tests/lib/jibb-full-diagnostics.hoondeleted−45

This diff is too big to show here.

tests/lib/jibb-full-overlap-basic.hoondeleted−193

This diff is too big to show here.

tests/lib/jibb-full-overlap-graph.hoondeleted−129

This diff is too big to show here.

tests/lib/jibb-full-scope.hoondeleted−37

This diff is too big to show here.

tests/lib/jibb-gate-free-guards.hoon−64

This diff is too big to show here.

tests/lib/jibb-gate-free-source.hoon+8−17

This diff is too big to show here.

tests/lib/jibb-generic-construction.hoondeleted−143

This diff is too big to show here.

tests/lib/jibb-generic-pattern.hoondeleted−167

This diff is too big to show here.

tests/lib/jibb-generic-recursion.hoondeleted−173

This diff is too big to show here.

tests/lib/jibb-hole-guards.hoon+3−3

This diff is too big to show here.

tests/lib/jibb-hoon-reference.hoondeleted−60

This diff is too big to show here.

tests/lib/jibb-import-default.hoon+1−4

This diff is too big to show here.

tests/lib/jibb-import-diagnostic.hoon+1−4

This diff is too big to show here.

tests/lib/jibb-import-overlap.hoondeleted−83

This diff is too big to show here.

tests/lib/jibb-import-structural.hoondeleted−85

This diff is too big to show here.

tests/lib/jibb-import.hoon+3−571

This diff is too big to show here.

tests/lib/jibb-list-alias-guards.hoon+2−6

This diff is too big to show here.

tests/lib/jibb-mark-bridge.hoon+1−4

This diff is too big to show here.

tests/lib/jibb-module-scope.hoon+1−4

This diff is too big to show here.

tests/lib/jibb-page-main.hoondeleted−176

This diff is too big to show here.

tests/lib/jibb-poke-bridge.hoon+3−6

This diff is too big to show here.

tests/lib/jibb-program-init.hoondeleted−168

This diff is too big to show here.

tests/lib/jibb-program-main.hoondeleted−141

This diff is too big to show here.

tests/lib/jibb-program-update.hoondeleted−140

This diff is too big to show here.

tests/lib/jibb-program-watch.hoondeleted−215

This diff is too big to show here.

tests/lib/jibb-proj-guards.hoon+3−3

This diff is too big to show here.

tests/lib/jibb-request-guards.hoon+2−2

This diff is too big to show here.

tests/lib/jibb-store.hoondeleted−288

This diff is too big to show here.

tests/lib/jibb-theme.hoondeleted−86

This diff is too big to show here.

tests/lib/jibb-tlon-bridge.hoon+1−4

This diff is too big to show here.

tests/lib/jibb-todo-api.hoon+8−20

This diff is too big to show here.

tests/lib/jibb-todo-full.hoondeleted−175

This diff is too big to show here.

tests/lib/jibb-todo-partial.hoondeleted−67

This diff is too big to show here.

tests/lib/jibb-typecheck.hoon+5−7

This diff is too big to show here.

tests/lib/jibb-union-alias-overlap.hoondeleted−110

This diff is too big to show here.

tests/lib/jibb-union-source.hoondeleted−155

This diff is too big to show here.

tests/lib/jibb.hoonnew file+3883

This diff is too big to show here.

tests/type-api-evidence/expected.txtnew file+1

This diff is too big to show here.

tests/type-api-paths/about.txt+1−1

This diff is too big to show here.

tests/type-api-paths/api.txtnew file+13

This diff is too big to show here.

tests/type-api-paths/expected.txt+2−17

This diff is too big to show here.

tests/type-api-paths/poke-clash.txt−2

This diff is too big to show here.

tests/type-api-paths/todo-action.txtnew file+6

This diff is too big to show here.

tests/type-api-paths/todo-item.txtnew file+6

This diff is too big to show here.

tests/type-api-paths/todo-sur.txtnew file+12

This diff is too big to show here.

tests/type-api-paths/todo-update.txtnew file+6

This diff is too big to show here.

tests/type-api-paths/todos.txtnew file+6

This diff is too big to show here.

tests/type-buttons/error.txtdeleted−3

This diff is too big to show here.

tests/type-buttons/expected.txtdeleted−2

This diff is too big to show here.

tests/type-buttons/valid.txtdeleted−4

This diff is too big to show here.

tests/type-cell-branch/about.txtdeleted−2

This diff is too big to show here.

tests/type-cell-branch/bad.txtdeleted−3

This diff is too big to show here.

tests/type-cell-branch/good.txtdeleted−3

This diff is too big to show here.

tests/type-deferred-context/about.txtdeleted−3

This diff is too big to show here.

tests/type-deferred-context/collision-early.txtdeleted−27

This diff is too big to show here.

tests/type-deferred-context/collision-late.txtdeleted−28

This diff is too big to show here.

tests/type-deferred-context/dangling.txtdeleted−16

This diff is too big to show here.

tests/type-deferred-context/duplicate.txtdeleted−14

This diff is too big to show here.

tests/type-deferred-context/missing.txtdeleted−14

This diff is too big to show here.

tests/type-deferred-context/plain.txtdeleted−11

This diff is too big to show here.

tests/type-deferred-context/report.txtdeleted−15

This diff is too big to show here.

tests/type-deferred-context/rich.txtdeleted−27

This diff is too big to show here.

tests/type-deferred-context/simple.txtdeleted−10

This diff is too big to show here.

tests/type-deferred-context/wrong.txtdeleted−14

This diff is too big to show here.

tests/type-deferred-prepared/expected-control.txtdeleted−7

This diff is too big to show here.

tests/type-deferred-prepared/expected-tuple-only.txtdeleted−4

This diff is too big to show here.

tests/type-deferred-prepared/expected.txtdeleted−8

This diff is too big to show here.

tests/type-deferred-prepared/good.txtdeleted−9

This diff is too big to show here.

tests/type-deferred-prepared/imported.txtdeleted−11

This diff is too big to show here.

tests/type-deferred-prepared/main.txtdeleted−10

This diff is too big to show here.

tests/type-deferred-prepared/mold-collision.txtdeleted−9

This diff is too big to show here.

tests/type-deferred-prepared/no-final-cast.txtdeleted−8

This diff is too big to show here.

tests/type-deferred-prepared/no-prelude.txtdeleted−9

This diff is too big to show here.

tests/type-deferred-prepared/tuple-only.txtdeleted−3

This diff is too big to show here.

tests/type-deferred-prepared/unrelated-tag.txtdeleted−11

This diff is too big to show here.

tests/type-deferred-prepared/wrong-draft.txtdeleted−9

This diff is too big to show here.

tests/type-deferred-prepared/wrong-unit.txtdeleted−9

This diff is too big to show here.

tests/type-deferred-resolver/about.txtdeleted−5

This diff is too big to show here.

tests/type-deferred-resolver/conflict.txtdeleted−12

This diff is too big to show here.

tests/type-deferred-resolver/duplicate.txtdeleted−12

This diff is too big to show here.

tests/type-deferred-resolver/expected.txtdeleted−42

This diff is too big to show here.

tests/type-deferred-resolver/face.txtdeleted−6

This diff is too big to show here.

tests/type-deferred-resolver/good.txtdeleted−11

This diff is too big to show here.

tests/type-deferred-resolver/hole.txtdeleted−12

This diff is too big to show here.

tests/type-deferred-resolver/missing.txtdeleted−10

This diff is too big to show here.

tests/type-deferred-resolver/stability-early.txtdeleted−6

This diff is too big to show here.

tests/type-deferred-resolver/stability-late.txtdeleted−6

This diff is too big to show here.

tests/type-deferred-resolver/stability-output-early.txtdeleted−9

This diff is too big to show here.

tests/type-deferred-resolver/stability-output-late.txtdeleted−9

This diff is too big to show here.

tests/type-deferred-resolver/stability-simple-early.txtdeleted−6

This diff is too big to show here.

tests/type-deferred-resolver/stability-simple-late.txtdeleted−6

This diff is too big to show here.

tests/type-deferred-resolver/stability-slot-early.txtdeleted−9

This diff is too big to show here.

tests/type-deferred-resolver/stability-slot-late.txtdeleted−9

This diff is too big to show here.

tests/type-deferred-resolver/store.txtdeleted−12

This diff is too big to show here.

tests/type-deferred/about.txtdeleted−3

This diff is too big to show here.

tests/type-deferred/conflict-src.txtdeleted−12

This diff is too big to show here.

tests/type-deferred/duplicate-src.txtdeleted−12

This diff is too big to show here.

tests/type-deferred/expected.txtdeleted−39

This diff is too big to show here.

tests/type-deferred/face-bad-src.txtdeleted−6

This diff is too big to show here.

tests/type-deferred/face-good-src.txtdeleted−6

This diff is too big to show here.

tests/type-deferred/hole-src.txtdeleted−12

This diff is too big to show here.

tests/type-deferred/local-src.txtdeleted−8

This diff is too big to show here.

tests/type-deferred/missing-src.txtdeleted−10

This diff is too big to show here.

tests/type-deferred/mold-hole-src.txtdeleted−12

This diff is too big to show here.

tests/type-deferred/mutual-src.txtdeleted−7

This diff is too big to show here.

tests/type-deferred/nested-src.txtdeleted−7

This diff is too big to show here.

tests/type-deferred/principal-src.txtdeleted−11

This diff is too big to show here.

tests/type-direct-gate/expected.txt+11−11

This diff is too big to show here.

tests/type-direct-gate/source.txt+3−3

This diff is too big to show here.

tests/type-empty/about.txtdeleted−3

This diff is too big to show here.

tests/type-empty/dead.txtdeleted−7

This diff is too big to show here.

tests/type-empty/expected.txtdeleted−59

This diff is too big to show here.

tests/type-empty/face-source.txtdeleted−2

This diff is too big to show here.

tests/type-empty/good.txtdeleted−11

This diff is too big to show here.

tests/type-empty/late-cap.txtdeleted−16

This diff is too big to show here.

tests/type-empty/list-dead.txtdeleted−4

This diff is too big to show here.

tests/type-empty/list-live.txtdeleted−3

This diff is too big to show here.

tests/type-empty/list-open.txtdeleted−3

This diff is too big to show here.

tests/type-empty/missing.txtdeleted−6

This diff is too big to show here.

tests/type-empty/overlap.txtdeleted−3

This diff is too big to show here.

tests/type-empty/standard-good.txtdeleted−11

This diff is too big to show here.

tests/type-empty/unit-dead.txtdeleted−4

This diff is too big to show here.

tests/type-full-overlap/about.txtdeleted−3

This diff is too big to show here.

tests/type-full-overlap/atoms.txtdeleted−4

This diff is too big to show here.

tests/type-full-overlap/child.txtdeleted−4

This diff is too big to show here.

tests/type-full-overlap/distinct.txtdeleted−5

This diff is too big to show here.

tests/type-full-overlap/duplicate-generic.txtdeleted−4

This diff is too big to show here.

tests/type-full-overlap/duplicate.txtdeleted−5

This diff is too big to show here.

tests/type-full-overlap/expected-basic.txtdeleted−23

This diff is too big to show here.

tests/type-full-overlap/expected-graph.txtdeleted−8

This diff is too big to show here.

tests/type-full-overlap/flag.txtdeleted−4

This diff is too big to show here.

tests/type-full-overlap/generic.txtdeleted−4

This diff is too big to show here.

tests/type-full-overlap/invalid.txtdeleted−4

This diff is too big to show here.

tests/type-full-overlap/nested.txtdeleted−4

This diff is too big to show here.

tests/type-full-overlap/order.txtdeleted−7

This diff is too big to show here.

tests/type-full-overlap/parent.txtdeleted−5

This diff is too big to show here.

tests/type-full-overlap/precedence.txtdeleted−5

This diff is too big to show here.

tests/type-full-overlap/same.txtdeleted−4

This diff is too big to show here.

tests/type-full-overlap/unsupported.txtdeleted−4

This diff is too big to show here.

tests/type-full-overlap/zero.txtdeleted−4

This diff is too big to show here.

tests/type-gate-free/about.txt+1−1

This diff is too big to show here.

tests/type-gate-free/todo-gate.txt+2−2

This diff is too big to show here.

tests/type-gate-free/todo-noun.txt+2−2

This diff is too big to show here.

tests/type-todo-full/ambiguous-mapper.txt → tests/type-gate-free/todo.txtrenamed+2−3

This diff is too big to show here.

tests/type-generic-construction/about.txtdeleted−9

This diff is too big to show here.

tests/type-generic-construction/alias-client.txtdeleted−12

This diff is too big to show here.

tests/type-generic-construction/alias.txtdeleted−3

This diff is too big to show here.

tests/type-generic-construction/client.txtdeleted−24

This diff is too big to show here.

tests/type-generic-construction/expected.txtdeleted−65

This diff is too big to show here.

tests/type-generic-construction/no-event-client.txtdeleted−8

This diff is too big to show here.

tests/type-generic-construction/owner-negative.txtdeleted−10

This diff is too big to show here.

tests/type-generic-construction/owner-positive.txtdeleted−9

This diff is too big to show here.

tests/type-generic-construction/sibling-values.txtdeleted−4

This diff is too big to show here.

tests/type-generic-construction/tree-no-event.txtdeleted−4

This diff is too big to show here.

tests/type-generic-construction/tree.txtdeleted−6

This diff is too big to show here.

tests/type-generic-pattern/about.txtdeleted−10

This diff is too big to show here.

tests/type-generic-pattern/client.txtdeleted−166

This diff is too big to show here.

tests/type-generic-pattern/expected.txtdeleted−91

This diff is too big to show here.

tests/type-generic-pattern/no-event.txtdeleted−17

This diff is too big to show here.

tests/type-generic-pattern/owner-bad.txtdeleted−22

This diff is too big to show here.

tests/type-generic-pattern/owner.txtdeleted−18

This diff is too big to show here.

tests/type-generic-pattern/poly-values.txtdeleted−2

This diff is too big to show here.

tests/type-generic-pattern/values.txtdeleted−18

This diff is too big to show here.

tests/type-generic-recursion/about.txtdeleted−14

This diff is too big to show here.

tests/type-generic-recursion/alias.txtdeleted−3

This diff is too big to show here.

tests/type-generic-recursion/bad-constructor.txtdeleted−8

This diff is too big to show here.

tests/type-generic-recursion/bad-match.txtdeleted−10

This diff is too big to show here.

tests/type-generic-recursion/bad-mold.txtdeleted−8

This diff is too big to show here.

tests/type-generic-recursion/bad-parameter.txtdeleted−6

This diff is too big to show here.

tests/type-generic-recursion/chain.txtdeleted−3

This diff is too big to show here.

tests/type-generic-recursion/client.txtdeleted−11

This diff is too big to show here.

tests/type-generic-recursion/expected.txtdeleted−35

This diff is too big to show here.

tests/type-generic-recursion/list-shadow.txtdeleted−4

This diff is too big to show here.

tests/type-generic-recursion/local-distinct.txtdeleted−11

This diff is too big to show here.

tests/type-generic-recursion/local-only.txtdeleted−11

This diff is too big to show here.

tests/type-generic-recursion/local-shadow.txtdeleted−11

This diff is too big to show here.

tests/type-generic-recursion/tree-changed.txtdeleted−6

This diff is too big to show here.

tests/type-generic-recursion/tree.txtdeleted−6

This diff is too big to show here.

tests/type-import-overlap/about.txtdeleted−24

This diff is too big to show here.

tests/type-import-overlap/expected.txtdeleted−26

This diff is too big to show here.

tests/type-import-overlap/source.txtdeleted−4

This diff is too big to show here.

tests/type-import-overlap/sur.txtdeleted−17

This diff is too big to show here.

tests/type-import-structural/about.txtdeleted−14

This diff is too big to show here.

tests/type-import-structural/expected.txtdeleted−41

This diff is too big to show here.

tests/type-import-structural/source.txtdeleted−5

This diff is too big to show here.

tests/type-import-structural/sur.txtdeleted−12

This diff is too big to show here.

tests/type-import/about.txt+4−14

This diff is too big to show here.

tests/type-import/expected.txt+5−24

This diff is too big to show here.

tests/type-import/source.txt−6

This diff is too big to show here.

tests/type-import/sur.txt−3

This diff is too big to show here.

tests/type-list-alias/expected.txt+4−4

This diff is too big to show here.

tests/type-page-main/about.txtdeleted−3

This diff is too big to show here.

tests/type-page-main/arbitrary-main.txtdeleted−1

This diff is too big to show here.

tests/type-page-main/ctor-page.txtdeleted−10

This diff is too big to show here.

tests/type-page-main/diff-load.txtdeleted−11

This diff is too big to show here.

tests/type-page-main/hand-built-load.txtdeleted−14

This diff is too big to show here.

tests/type-page-main/indirect-load.txtdeleted−11

This diff is too big to show here.

tests/type-page-main/page-alias.txtdeleted−11

This diff is too big to show here.

tests/type-page-main/pure-load.txtdeleted−10

This diff is too big to show here.

tests/type-page-main/typed-load.txtdeleted−8

This diff is too big to show here.

tests/type-page-main/wrong-static.txtdeleted−1

This diff is too big to show here.

tests/type-poke/about.txt+4−7

This diff is too big to show here.

tests/type-poke/alias.txt+1−1

This diff is too big to show here.

tests/type-poke/client.txt+13−13

This diff is too big to show here.

tests/type-poke/direct.txt+1−1

This diff is too big to show here.

tests/type-poke/expected.txt+26−32

This diff is too big to show here.

tests/type-poke/exported.txt+4−4

This diff is too big to show here.

tests/type-poke/inner.txt+1−1

This diff is too big to show here.

tests/type-poke/mark.txtmode 120000 → 100644+5−1

This diff is too big to show here.

tests/type-poke/public.txt+1−1

This diff is too big to show here.

tests/type-poke/transitive.txt+1−1

This diff is too big to show here.

tests/type-program-main/about.txtdeleted−1

This diff is too big to show here.

tests/type-program-main/alias-main.txtdeleted−11

This diff is too big to show here.

tests/type-program-main/arbitrary-main.txtdeleted−10

This diff is too big to show here.

tests/type-program-main/consumer.txtdeleted−2

This diff is too big to show here.

tests/type-program-main/gate-data.txtdeleted−10

This diff is too big to show here.

tests/type-program-main/gate-model.txtdeleted−11

This diff is too big to show here.

tests/type-program-main/initializer-alias.txtdeleted−11

This diff is too big to show here.

tests/type-program-main/initializer-consumer.txtdeleted−2

This diff is too big to show here.

tests/type-program-main/initializer-earlier.txtdeleted−10

This diff is too big to show here.

tests/type-program-main/initializer-error.txtdeleted−10

This diff is too big to show here.

tests/type-program-main/initializer-generic.txtdeleted−10

This diff is too big to show here.

tests/type-program-main/initializer-message.txtdeleted−13

This diff is too big to show here.

tests/type-program-main/initializer-missing.txtdeleted−9

This diff is too big to show here.

tests/type-program-main/initializer-model.txtdeleted−11

This diff is too big to show here.

tests/type-program-main/initializer-nested-branch.txtdeleted−24

This diff is too big to show here.

tests/type-program-main/initializer-no-main.txtdeleted−10

This diff is too big to show here.

tests/type-program-main/initializer-open-update.txtdeleted−10

This diff is too big to show here.

tests/type-program-main/initializer-open-view.txtdeleted−11

This diff is too big to show here.

tests/type-program-main/initializer-pun.txtdeleted−11

This diff is too big to show here.

tests/type-program-main/initializer-subs.txtdeleted−10

This diff is too big to show here.

tests/type-program-main/initializer-tag.txtdeleted−13

This diff is too big to show here.

tests/type-program-main/initializer-unfaced.txtdeleted−10

This diff is too big to show here.

tests/type-program-main/initializer.txtdeleted−12

This diff is too big to show here.

tests/type-program-main/mismatched-model.txtdeleted−10

This diff is too big to show here.

tests/type-program-main/nonempty-subs.txtdeleted−12

This diff is too big to show here.

tests/type-program-main/open-message.txtdeleted−7

This diff is too big to show here.

tests/type-program-main/source.txtdeleted−12

This diff is too big to show here.

tests/type-program-update/consumer.txtdeleted−2

This diff is too big to show here.

tests/type-program-update/malformed-sample.txtdeleted−9

This diff is too big to show here.

tests/type-program-update/missing-list.txtdeleted−15

This diff is too big to show here.

tests/type-program-update/non-main.txtdeleted−14

This diff is too big to show here.

tests/type-program-update/source.txtdeleted−15

This diff is too big to show here.

tests/type-program-update/three-slot-sample.txtdeleted−9

This diff is too big to show here.

tests/type-program-update/unrelated-tag.txtdeleted−16

This diff is too big to show here.

tests/type-program-update/wrong-message.txtdeleted−10

This diff is too big to show here.

tests/type-program-update/wrong-model.txtdeleted−12

This diff is too big to show here.

tests/type-program-update/wrong-result.txtdeleted−12

This diff is too big to show here.

tests/type-program-watch/about.txtdeleted−1

This diff is too big to show here.

tests/type-theme/dark-absent.txtdeleted−8

This diff is too big to show here.

tests/type-theme/missing-field.txtdeleted−7

This diff is too big to show here.

tests/type-theme/wrong-dark.txtdeleted−8

This diff is too big to show here.

tests/type-theme/wrong-font.txtdeleted−8

This diff is too big to show here.

tests/type-theme/wrong-nested-aura.txtdeleted−8

This diff is too big to show here.

tests/type-todo-api/about.txt+1−1

This diff is too big to show here.

tests/type-todo-api/expected.txt+1−1

This diff is too big to show here.

tests/type-todo-api/negative-expected.txt+4−4

This diff is too big to show here.

tests/type-todo-api/negative.txt+1−1

This diff is too big to show here.

tests/type-todo-api/source.txt+1−1

This diff is too big to show here.

tests/type-todo-full/about.txtdeleted−3

This diff is too big to show here.

tests/type-todo-full/alias.txtdeleted−42

This diff is too big to show here.

tests/type-todo-full/cast-init.txtdeleted−43

This diff is too big to show here.

tests/type-todo-full/expected.txtdeleted−2

This diff is too big to show here.

tests/type-todo-full/non-gate-view.txtdeleted−33

This diff is too big to show here.

tests/type-todo-full/open-key.txtdeleted−40

This diff is too big to show here.

tests/type-todo-full/wrong-message.txtdeleted−40

This diff is too big to show here.

tests/type-todo-full/wrong-model.txtdeleted−40

This diff is too big to show here.

tests/type-todo-full/wrong-result.txtdeleted−40

This diff is too big to show here.

tests/type-todo-full/wrong-watch.txtdeleted−40

This diff is too big to show here.

tests/type-todo-partial/about.txtdeleted−4

This diff is too big to show here.

tests/type-todo-partial/expected.txtdeleted−17

This diff is too big to show here.

tests/type-union-alias-overlap/duplicate.txtdeleted−5

This diff is too big to show here.

tests/type-union-alias-overlap/expected.txtdeleted−25

This diff is too big to show here.

tests/type-union-alias-overlap/flag-source.txtdeleted−7

This diff is too big to show here.

tests/type-union-alias-overlap/multi.txtdeleted−5

This diff is too big to show here.

tests/type-union-alias-overlap/negative.txtdeleted−16

This diff is too big to show here.

tests/type-union-alias-overlap/nonzero.txtdeleted−4

This diff is too big to show here.

tests/type-union-alias-overlap/opaque.txtdeleted−4

This diff is too big to show here.

tests/type-union-alias-overlap/positive.txtdeleted−8

This diff is too big to show here.

tests/type-union-alias-overlap/qualified.txtdeleted−5

This diff is too big to show here.

tests/type-union-alias-overlap/wrong.txtdeleted−5

This diff is too big to show here.

tests/type-union-source/direct-source.txtdeleted−3

This diff is too big to show here.

tests/type-union-source/duplicate-params.txtdeleted−4

This diff is too big to show here.

tests/type-union-source/duplicate.txtdeleted−5

This diff is too big to show here.

tests/type-union-source/expected.txtdeleted−36

This diff is too big to show here.

tests/type-union-source/free-source.txtdeleted−4

This diff is too big to show here.

tests/type-union-source/good.txtdeleted−9

This diff is too big to show here.

tests/type-union-source/hidden-ref.txtdeleted−5

This diff is too big to show here.

tests/type-union-source/late-source.txtdeleted−4

This diff is too big to show here.

tests/type-union-source/mixed-source.txtdeleted−8

This diff is too big to show here.

tests/type-union-source/nested.txtdeleted−4

This diff is too big to show here.

tests/type-union-source/qualified.txtdeleted−4

This diff is too big to show here.

tests/type-union-source/same.txtdeleted−5

This diff is too big to show here.

tests/type-union-source/shadow-source.txtdeleted−7

This diff is too big to show here.

tests/type-union-source/wide-source.txtdeleted−4

This diff is too big to show here.

tests/type-union-source/wrong.txtdeleted−5

This diff is too big to show here.

tests/type-union-source/zero.txtdeleted−5

This diff is too big to show here.

tools/checkdeleted−317

This diff is too big to show here.

tools/clay-fixtures+221−75

This diff is too big to show here.

tools/doc-fragmentsdeleted−61

This diff is too big to show here.

tools/golden+15−39

This diff is too big to show here.

tools/hoon+2−8

This diff is too big to show here.

tools/importer-testnew file+37

This diff is too big to show here.

tools/ship+18−97

This diff is too big to show here.

tools/test-armsdeleted−504

This diff is too big to show here.

tools/testdata/clay-fixtures-selftestnew file+109

This diff is too big to show here.

tools/testdata/selftest+4−113

This diff is too big to show here.

tools/testdata/ship-golden/empty/about.txt+1−1

This diff is too big to show here.

tools/testdata/ship-golden/empty/blank.txtdeleted

No changes to the content.

tools/testdata/ship-selftest+1−156

This diff is too big to show here.

tools/testdata/stub.hoon+1−4

This diff is too big to show here.

tools/type-api-evidence-testnew file+40

This diff is too big to show here.

tools/type-api-paths-testnew file+52

This diff is too big to show here.

tools/type-arithmetic-guards-testnew file+28

This diff is too big to show here.

tools/type-ask-guards-testnew file+31

This diff is too big to show here.

tools/type-closed-gate-guards-testnew file+29

This diff is too big to show here.

tools/type-constructor-fit-guards-testnew file+29

This diff is too big to show here.

tools/type-direct-gate-testnew file+64

This diff is too big to show here.

tools/type-gate-free-guards-testnew file+29

This diff is too big to show here.

tools/type-gate-free-source-testnew file+50

This diff is too big to show here.

tools/type-generic-alias-testnew file+28

This diff is too big to show here.

tools/type-hole-guards-testnew file+32

This diff is too big to show here.

tools/type-import-default-testnew file+38

This diff is too big to show here.

tools/type-import-diagnostic-testnew file+43

This diff is too big to show here.

tools/type-import-testnew file+39

This diff is too big to show here.

tools/type-list-alias-testnew file+33

This diff is too big to show here.

tools/type-mark-testnew file+35

This diff is too big to show here.

tools/type-module-scope-testnew file+40

This diff is too big to show here.

tools/type-nested-union-guards-testnew file+29

This diff is too big to show here.

tools/type-poke-testnew file+50

This diff is too big to show here.

tools/type-positional-face-guards-testnew file+29

This diff is too big to show here.

tools/type-proj-guards-testnew file+32

This diff is too big to show here.

tools/type-qath-guards-testnew file+31

This diff is too big to show here.

tools/type-request-guards-testnew file+31

This diff is too big to show here.

tools/type-sub-guards-testnew file+31

This diff is too big to show here.

tools/type-tlon-testnew file+39

This diff is too big to show here.

tools/type-todo-api-testnew file+62

This diff is too big to show here.

tools/urbit_eval.py+6−12

This diff is too big to show here.

vendor/LICENSE-urbit.txtdeleted−21

This diff is too big to show here.

vendor/SOURCES.txt+1−3

This diff is too big to show here.