on master help sign in
Validate Ford imports and report type error sites
47a1f49iko
docs/compiler.md+2−2
@@ -56,9 +56,9 @@ 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 `@` and one-way widening into it, generic variables and gates, unfaced cells, a two-binder cell pattern, a complete two-arm loobean branch, closed local mold aliases and acyclic forward value references. It instantiates generalized top-level definitions when they are used. It can infer and generalize atom constraints arising from explicit capitals or bare sample binders, instantiate them independently, and print multiple constraints. Other cases, including aliasing a constrained generic and numeric defaulting, remain incomplete. It does not yet check a module, its imports, faces, general patterns, deferred constraints, recursive or generic molds, dependency cycles or errors with both conflicting excerpts. Function compatibility involving nested `@` remains unsupported except for equal types. 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, unfaced cells, a two-binder cell pattern, a complete two-arm loobean branch, closed local mold aliases and acyclic forward value references. It instantiates generalized top-level definitions when they are used. It can infer and generalize atom constraints arising from explicit capitals or bare sample binders, instantiate them independently, and print multiple constraints. Other cases, including aliasing a constrained generic and numeric defaulting, remain incomplete. It does not yet check a module, its imports, faces, general patterns, deferred constraints, recursive or generic molds, dependency cycles or most errors with both conflicting excerpts. Definite cast and call mismatches report both sites and excerpts. Function compatibility involving nested `@`, and ambiguous joins between related auras, remain unsupported except for equal types. 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
60
61−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 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. Nested `$^`, other nested ordered maps, general source-level disjointness, marks and complete integration with the checker remain unfinished. `+golden-types-imports` can consume fixed-aura atoms and unfaced cells from caller-supplied reader results for declared `/-` imports; 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, built directly against zuse, and rejects locally shadowed names and subjects with unresolved Ford imports. 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 the corresponding ship test compose the importer with the inference fragment and compare a separate golden report. `tools/clay-fixtures` also passes a Clay-built `/sur` mold through the Clay-built importer and partial checker.
61+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 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. Nested `$^`, other nested ordered maps, general source-level disjointness, marks and complete integration with the checker remain unfinished. `+golden-types-imports` can consume fixed-aura atoms and unfaced cells from caller-supplied reader results for declared `/-` imports; 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. 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 the corresponding ship test compose the importer with the inference fragment and compare a separate golden report. `tools/clay-fixtures` also passes a Clay-built `/sur` mold through the Clay-built importer and partial checker.
62
62
63And the design notes:
63And the design notes:
64
64
docs/development.md+1−1
@@ -61,7 +61,7 @@ git clone https://github.com/urbit/tools /root/src/tools
61| `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 |
62| `tools/importer-test` | Compares the partial Hoon importer's diagnostic trees and errors with `tests/importer/tree.txt` under `urbit eval` |
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-test` | Composes the Hoon importer with the partial checker and compares `tests/type-import/expected.txt` under eval |
63| `tools/type-import-test` | Composes the Hoon importer with the partial checker and compares `tests/type-import/expected.txt` under eval |
64−| `tools/clay-fixtures` | Syncs `my-app`, builds its example `/sur` files and marks through Clay, and checks selected imported mold projections on the fake ship |
64+| `tools/clay-fixtures` | Syncs `my-app`, builds its example `/sur` files and marks through Clay, checks selected imported mold projections and the partial checker, and records a Ford-import subject shape on the fake ship |
65| `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 |
65| `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 |
66| `tools/doc-blocks` | Checks the doc's `jibb` blocks against the `doc-*` golden cases: `tools/doc-blocks docs/spec` |
66| `tools/doc-blocks` | Checks the doc's `jibb` blocks against the `doc-*` golden cases: `tools/doc-blocks docs/spec` |
67| `tools/ship` | Runs the fake ship: `start`, `stop`, `status`, `log`, `sync <desk>`, `test`, `gen-tests`, `check-commit`, `scry`, `hoon`, `run`, `poke`, `commit`, `mount`, `unmount` |
67| `tools/ship` | Runs the fake ship: `start`, `stop`, `status`, `log`, `sync <desk>`, `test`, `gen-tests`, `check-commit`, `scry`, `hoon`, `run`, `poke`, `commit`, `mount`, `unmount` |
docs/open-questions.md+2−1
@@ -22,7 +22,7 @@ Found while writing [prompts/milestone-2.md](prompts/milestone-2.md) and checkin
22
22
231. **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.
231. **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.
242. **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.
242. **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. 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.
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.
264. **Settled: a capital in a local `++`.** On 2026-10-30, @iko said it shares the enclosing `++`'s variable of that name; a different type uses a different capital. The Grammar and Decisions record this alongside the earlier aura rules.
264. **Settled: a capital in a local `++`.** On 2026-10-30, @iko said it shares the enclosing `++`'s variable of that name; a different type uses a different capital. The Grammar and Decisions record this alongside the earlier aura rules.
275. **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.
275. **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.
286. **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.
286. **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.
@@ -38,6 +38,7 @@ Found while writing [prompts/milestone-2.md](prompts/milestone-2.md) and checkin
3816. **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.
3816. **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.
3917. **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.
3917. **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.
4018. **The two uses of Hoon `like`.** Hoon `+like` is a wet mold builder, but the gate it returns is callable and applies its supplied gate to the product. In a verified Hoon 135 example, applying `(like f)` to `[[1 2] [7 8 ~]]` produces an edge whose product is `8` when `f` is identity and `42` when `f` returns `42`; the resulting nail is the original input. Jibb molds are types, not callable values. The prelude now declares a generic `(like A)` mold and a `wonk` extractor; both parse, but their full type and backend validation remain outstanding. Should it also expose a value gate under `like`? If so, should the value preserve Hoon's input shape and behavior, or instead map the product of an already constructed edge? @iko is reviewing these alternatives; the exact public signature is not yet decided.
4018. **The two uses of Hoon `like`.** Hoon `+like` is a wet mold builder, but the gate it returns is callable and applies its supplied gate to the product. In a verified Hoon 135 example, applying `(like f)` to `[[1 2] [7 8 ~]]` produces an edge whose product is `8` when `f` is identity and `42` when `f` returns `42`; the resulting nail is the original input. Jibb molds are types, not callable values. The prelude now declares a generic `(like A)` mold and a `wonk` extractor; both parse, but their full type and backend validation remain outstanding. Should it also expose a value gate under `like`? If so, should the value preserve Hoon's input shape and behavior, or instead map the product of an already constructed edge? @iko is reviewing these alternatives; the exact public signature is not yet decided.
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.
41
42
42## Grammar questions never put to the doc's author
43## Grammar questions never put to the doc's author
43
44
docs/prelude-inventory.md+2
@@ -14,6 +14,8 @@ Hoon `+$` arms are marked **mold** below; `++` arms can be gates, doors or mold
14
14
15`bite` (mold), `bloq` (mold), `each`, `gate` (mold), `list`, `lone`, `lest`, `mold` (mold), `pair`, `pole`, `qual`, `quip`, `step`, `trap`, `tree`, `trel`, `unit`.
15`bite` (mold), `bloq` (mold), `each`, `gate` (mold), `list`, `lone`, `lest`, `mold` (mold), `pair`, `pole`, `qual`, `quip`, `step`, `trap`, `tree`, `trel`, `unit`.
16
16
17+@iko chose to expose Hoon `step` as `step.hoon`, so it does not clash with the Grammar's `step` example. Hoon's `step` uses `@u`. @iko chose one-way widening across Hoon aura families, such as `@ud` and `@ux` into `@u` and `@tD` into `@t`; the reverse needs a check (see [question 19](open-questions.md)). The prelude group needed to expose `step.hoon` is not implemented. Hoon's `bite` is a union of `bloq` and `[bloq=bloq step=step]`; its declaration awaits that group.
18+
17## 2a
19## 2a
18
20
19`biff`, `bind`, `bond`, `both`, `clap`, `clef`, `drop`, `fall`, `flit`, `hunt`, `lift`, `mate`, `need`, `some`.
21`biff`, `bind`, `bond`, `both`, `clap`, `clef`, `drop`, `fall`, `flit`, `hunt`, `lift`, `mate`, `need`, `some`.
docs/prompts/milestone-2.md+2−2
@@ -59,8 +59,8 @@ And from the plan's Risks:
59The rules are scattered across the tabs. This is a map of them, not a replacement: read each in place, and where this summary and the doc differ, the doc is right.
59The rules are scattered across the tabs. This is a map of them, not a replacement: read each in place, and where this summary and the doc differ, the doc is right.
60
60
61**Types and inference** (Grammar: Molds, Modules, Runes, Expressions; Decisions: Inference, Type variables, Sample names, Inline gates)
61**Types and inference** (Grammar: Molds, Modules, Runes, Expressions; Decisions: Inference, Type variables, Sample names, Inline gates)
62−- Hindley–Milner with aura variables: "every expression has a principal type, and there is no general subtyping". A specific atom fits `@`, and a specific noun fits `*`, each only in that direction.
62+- Hindley–Milner with aura variables: "every expression has a principal type, and there is no general subtyping". A specific atom fits `@`, a specific noun fits `*`, and a more specific aura fits an ancestor in its Hoon aura family, each only in that direction; the reverse needs a check.
63−- `@` means any atom, independently at each occurrence. A specific atom such as `@ud` fits where `@` is expected; an `@` value needs a check to fit `@ud`. Different specific auras never unify. `add` takes `[A A]` and returns `A`, with an atom constraint inferred for the shared type variable.
63+- `@` means any atom, independently at each occurrence. A specific atom such as `@ud` fits where `@` is expected; an `@` value needs a check to fit `@ud`. `@ud` and `@ux` also fit `@u`, and `@tD` fits `@t`, following Hoon aura families; the reverse needs a check. Distinct specific auras remain distinct. `add` takes `[A A]` and returns `A`, with an atom constraint inferred for the shared type variable.
64- Faces are part of record types: `[a=@ b=@]` and `[x=@ y=@]` don't unify. An unnamed position can unify with a faced one and take its face, so `[0 0]` fits `[x=@ud y=@ud]`. A single-item cell `[a]` is `a`; an empty `[]` is an error.
64- Faces are part of record types: `[a=@ b=@]` and `[x=@ y=@]` don't unify. An unnamed position can unify with a faced one and take its face, so `[0 0]` fits `[x=@ud y=@ud]`. A single-item cell `[a]` is `a`; an empty `[]` is an error.
65- Type variables are capitals, "generalized per `++`". A capital in a local `++` shares the enclosing `++`'s variable of that name; a different type takes a different capital. "A type variable used where an atom is required gains an atom constraint", so `++ clamp |= [lo=A hi=A n=A]`, calling `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." Names "may refer to each other in any order", so infer `++` definitions in dependency order, a group of mutually recursive ones together.
65- Type variables are capitals, "generalized per `++`". A capital in a local `++` shares the enclosing `++`'s variable of that name; a different type takes a different capital. "A type variable used where an atom is required gains an atom constraint", so `++ clamp |= [lo=A hi=A n=A]`, calling `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." Names "may refer to each other in any order", so infer `++` definitions in dependency order, a group of mutually recursive ones together.
66- The checker infers a gate-free constraint for `eq` arguments and map and set keys and retains it when a type variable is generalized. The requirement applies recursively to nested values; union-case matching treats gates as opaque. Print a gate-free constraint as `$-([A A] ?) where A contains no gates` and an atom constraint as `$-([A A] A) where A is an atom`; separate multiple clauses with commas, as `where A is an atom, B contains no gates`.
66- The checker infers a gate-free constraint for `eq` arguments and map and set keys and retains it when a type variable is generalized. The requirement applies recursively to nested values; union-case matching treats gates as opaque. Print a gate-free constraint as `$-([A A] ?) where A contains no gates` and an atom constraint as `$-([A A] A) where A is an atom`; separate multiple clauses with commas, as `where A is an atom, B contains no gates`.
docs/spec/decisions.md+3−3
@@ -30,7 +30,7 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
30| Branching | `?-` only, loobeans included; exhaustive, with explicit catch-alls; covered arms are errors; failures say `!!` | Decided 2026-10-29 |
30| Branching | `?-` only, loobeans included; exhaustive, with explicit catch-alls; covered arms are errors; failures say `!!` | Decided 2026-10-29 |
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 |
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| Special rules | No built-ins; type-directed rules are welcome, each listed in the Grammar tab | Decided 2026-10-29 |
32| Special rules | No built-ins; type-directed rules are welcome, each listed in the Grammar tab | Decided 2026-10-29 |
33−| Inference | Hindley–Milner with aura variables; `@` is any atom, a specific atom fits `@` but the 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; different specific auras never unify; 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 |
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| Effects | The library unions `cmd` and `sub`; pokes and requests are opaque, from derived gates and `pure`; 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-29 |
34| Effects | The library unions `cmd` and `sub`; pokes and requests are opaque, from derived gates and `pure`; 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-29 |
35| 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 watching such a request has a type error; typed segments by aura | Decided 2026-10-30 |
35| 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 watching such a request has a type error; typed segments by aura | Decided 2026-10-30 |
36| Mark names | Any name: `/%` names types after marks, and constructors poke with their type's mark; no alias marks | Decided 2026-10-26 |
36| Mark names | Any name: `/%` names types after marks, and constructors poke with their type's mark; no alias marks | Decided 2026-10-26 |
@@ -50,7 +50,7 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
50| Type identity | Recursive molds by name and module | Decided 2026-10-29 |
50| Type identity | Recursive molds by name and module | Decided 2026-10-29 |
51| Binding patterns | In `?-` arms; the last position binds the rest | Decided 2026-10-29 |
51| Binding patterns | In `?-` arms; the last position binds the rest | Decided 2026-10-29 |
52| 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 |
52| 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 |
53−| Auras | Specific auras stay distinct; `@` is any atom, and shared atom-constrained type variables preserve the same aura | Decided 2026-10-30 |
53+| 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 |
54| 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 |
54| 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 |
55| Refinement types | None | Decided |
55| Refinement types | None | Decided |
56| Imports | `/-`, `/%` (a mark's type, with no face) and `/=`; no `/+`; cycles are errors | Decided 2026-10-29 |
56| Imports | `/-`, `/%` (a mark's type, with no face) and `/=`; no `/+`; cycles are errors | Decided 2026-10-29 |
@@ -76,7 +76,7 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
76| Dark mode | Hand-written dark tones under `dark`, used when the reader prefers dark | Decided 2026-10-27 |
76| Dark mode | Hand-written dark tones under `dark`, used when the reader prefers dark | Decided 2026-10-27 |
77| 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 |
77| 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 |
78| Data layer | Hoon's nouns: units, treaps, loobeans | Decided |
78| Data layer | Hoon's nouns: units, treaps, loobeans | Decided |
79−| 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`; 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; no signed or float gates, or parser gates outside 3g except `slav` and `slaw`; signed or float auras are errors | Decided 2026-10-30 |
79+| 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; no signed or float gates, or parser gates outside 3g except `slav` and `slaw`; signed or float auras are errors | Decided 2026-10-30 |
80| Wire format | Noun channels; Jibb's own noun codec in the browser | Decided 2026-10-29 |
80| Wire format | Noun channels; Jibb's own noun codec in the browser | Decided 2026-10-29 |
81| 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 |
81| 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 |
82| Private pages | Served by the host per request and never cached; non-owners go to the login page | Decided 2026-10-29 |
82| Private pages | Served by the host per request and never cached; non-owners go to the login page | Decided 2026-10-29 |
docs/spec/grammar.md+2−2
@@ -118,9 +118,9 @@ Every other name is free.
118
118
119## Molds
119## Molds
120
120
121−A 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. Two one-way widenings are allowed: a value of a specific atom type fits `@`, and a value of a specific noun type fits `*`; neither rule permits the reverse.
121+A 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.
122
122
123−- **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`. Different specific auras never 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`. `?` is a loobean.
123+- **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`. `?` is a loobean.
124- **Constants**: `%add`, `~` and the loobeans have one value each.
124- **Constants**: `%add`, `~` and the loobeans have one value each.
125- **Records and tuples**: `[text=@t done=?]`, `[@t ?]`. An empty `[]` is 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. A record too long for one line can leave its `[` open, with one field per deeper line, as an expression's bracket does.
125- **Records and tuples**: `[text=@t done=?]`, `[@t ?]`. An empty `[]` is 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. A record too long for one line can leave its `[` open, with one field per deeper line, as an expression's bracket does.
126- **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.
126- **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.
docs/spec/overview.md+1−1
@@ -90,7 +90,7 @@ Hoon's standard library regrouped, written in Jibb and vendored as `/lib/jibb/pr
90| Text | [4b](https://docs.urbit.org/hoon/stdlib/4b) | `crip`, `trip`, `cass`, `cuss`, `trim`, `tufa`, `tuba` |
90| Text | [4b](https://docs.urbit.org/hoon/stdlib/4b) | `crip`, `trip`, `cass`, `cuss`, `trim`, `tufa`, `tuba` |
91| Atom printing | [4a](https://docs.urbit.org/hoon/stdlib/4a), [4j](https://docs.urbit.org/hoon/stdlib/4j)–[4m](https://docs.urbit.org/hoon/stdlib/4m) | `scot`, `scow`, `slav`, `slaw`. `print-date` prints Urbit-style in the theme's zone, to the minute, as `~2026.10.29..14.30`, from a zone table jibb-dev keeps current. Numbers print as Hoon does, as `1.000` |
91| Atom printing | [4a](https://docs.urbit.org/hoon/stdlib/4a), [4j](https://docs.urbit.org/hoon/stdlib/4j)–[4m](https://docs.urbit.org/hoon/stdlib/4m) | `scot`, `scow`, `slav`, `slaw`. `print-date` prints Urbit-style in the theme's zone, to the minute, as `~2026.10.29..14.30`, from a zone table jibb-dev keeps current. Numbers print as Hoon does, as `1.000` |
92| Time | [3c](https://docs.urbit.org/hoon/stdlib/3c) | `yore`, `year` |
92| Time | [3c](https://docs.urbit.org/hoon/stdlib/3c) | `yore`, `year` |
93−| Data molds | [1c](https://docs.urbit.org/hoon/stdlib/1c), [2q](https://docs.urbit.org/hoon/stdlib/2q), [3g](https://docs.urbit.org/hoon/stdlib/3g) | `unit`, `list`, `pair`, `tape`, `path`, `coin`, `dime` and the rest; Hoon's 3g `tone` is `tone.hoon`, distinct from the styling type |
93+| Data molds | [1c](https://docs.urbit.org/hoon/stdlib/1c), [2q](https://docs.urbit.org/hoon/stdlib/2q), [3g](https://docs.urbit.org/hoon/stdlib/3g) | `unit`, `list`, `pair`, `tape`, `path`, `coin`, `dime` and the rest; Hoon's 3g `tone` is `tone.hoon`, distinct from the styling type, and its 1c `step` is `step.hoon` |
94| Bits | [2c](https://docs.urbit.org/hoon/stdlib/2c), [2d](https://docs.urbit.org/hoon/stdlib/2d) | Jibb's `not` negates a loobean; Hoon's bitwise `not` is exposed as `not.bit` |
94| Bits | [2c](https://docs.urbit.org/hoon/stdlib/2c), [2d](https://docs.urbit.org/hoon/stdlib/2d) | Jibb's `not` negates a loobean; Hoon's bitwise `not` is exposed as `not.bit` |
95| Hashing and ordering | [2e](https://docs.urbit.org/hoon/stdlib/2e), [2f](https://docs.urbit.org/hoon/stdlib/2f) | Natives behind maps and sets; `aor` exposed |
95| Hashing and ordering | [2e](https://docs.urbit.org/hoon/stdlib/2e), [2f](https://docs.urbit.org/hoon/stdlib/2f) | Natives behind maps and sets; `aor` exposed |
96| Signed and floats | [3a](https://docs.urbit.org/hoon/stdlib/3a), [3b](https://docs.urbit.org/hoon/stdlib/3b) | Left out; `@s…` and `@r…` auras are errors, imported ones included |
96| Signed and floats | [3a](https://docs.urbit.org/hoon/stdlib/3a), [3b](https://docs.urbit.org/hoon/stdlib/3b) | Left out; `@s…` and `@r…` auras are errors, imported ones included |
docs/status.md+7−6
@@ -19,7 +19,7 @@ On 2026-10-30, @iko decided that Jibb drops `$?`, so a `+$` takes a union's case
19
19
20## Milestone 2: in progress
20## Milestone 2: in progress
21
21
22−The repository spec records the subsequent type-system and prelude decisions; 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; a partial bridge passes selected Hoon atoms and unfaced cells into inference, while the reader and bridge do not cover every supported Hoon type. It reads named recursion, nested collections, direct ordered maps, certain ordered-map fields, and direct `$^` unions whose cases can be proved disjoint. Nested `$^`, other nested ordered maps, marks and general union disjointness remain unfinished. The inference fragment supports unrestricted `@`, selected one-way widenings, and generalized atom constraints arising from explicit capitals or bare sample binders; other constraint cases and defaulting still need work. Collection recognition checks the originating core and fails closed on local shadows or unresolved Ford subjects; its golden fixtures include three real Tlon files. The prelude currently has only a few functions, and [prelude-inventory.md](prelude-inventory.md) is a source audit, not the complete inventory or signatures. The milestone remains unfinished.
22+The repository spec records the subsequent type-system and prelude decisions; 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; a partial bridge passes selected Hoon atoms and unfaced cells into inference, while the reader and bridge do not cover every supported Hoon type. It reads named recursion, nested collections, direct ordered maps, certain ordered-map fields, and direct `$^` unions whose cases can be proved disjoint. Nested `$^`, other nested ordered maps, marks and general union disjointness remain unfinished. The inference fragment supports unrestricted `@`, selected one-way widenings including aura-family ancestors, and generalized atom constraints arising from explicit capitals or bare sample binders; other constraint cases and defaulting still need work. Collection recognition checks the originating core and fails closed on shadows or unsupported Ford subject shapes; its golden fixtures include three real Tlon files. The prelude currently has only a few functions, and [prelude-inventory.md](prelude-inventory.md) is a source audit, not the complete inventory or signatures. The milestone remains unfinished.
23
23
24## Milestone 1: parser and mark
24## Milestone 1: parser and mark
25
25
@@ -37,8 +37,8 @@ What the plan asks for, and where it is:
37
37
38Besides the plan's list:
38Besides the plan's list:
39
39
40−- 403 golden cases: 187 that parse and 216 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.
40+- 406 golden cases: 190 that parse and 216 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.
41−- The 403-case corpus passed under `urbit eval` in 19.4 s. The fake ship passed all 406 tests, including the importer, importer/checker bridge and unification checks, with 19.5 s for sync and 11.0 s for tests. The importer golden compares 49 projections; `tools/clay-fixtures` built all seven example Hoon fixtures through Clay, read four selected molds, and passed a Clay-built mold through the Clay-built importer and partial checker.
41+- The 406-case corpus passed under `urbit eval` in 21.4 s. The fake ship passed all 409 tests, including the importer, importer/checker bridge and unification checks, with 18.9 s for sync and 18.0 s for tests. The importer golden compares 57 projections; `tools/clay-fixtures` built all seven example Hoon fixtures through Clay, read selected molds, passed a Clay-built mold through the Clay-built importer and partial checker, and checked a real Ford-importing `/sur`.
42- `tools/testdata/selftest` (19 checks) and `tools/testdata/ship-selftest` test the tools themselves.
42- `tools/testdata/selftest` (19 checks) and `tools/testdata/ship-selftest` test the tools themselves.
43- 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.
43- 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.
44- 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).
44- 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).
@@ -58,14 +58,15 @@ Besides the plan's list:
58| 51ce4d9 | 2026-10-30 | Extend partial inference and importer, record type and prelude decisions |
58| 51ce4d9 | 2026-10-30 | Extend partial inference and importer, record type and prelude decisions |
59| be6d2a5 | 2026-10-30 | Add atom widening, nested collections and case-local Hoon import fixtures |
59| be6d2a5 | 2026-10-30 | Add atom widening, nested collections and case-local Hoon import fixtures |
60| 26554ac | 2026-10-30 | Infer an atom constraint, extend the prelude and read example molds through Clay |
60| 26554ac | 2026-10-30 | Infer an atom constraint, extend the prelude and read example molds through Clay |
61−| This change | 2026-10-30 | Extend atom constraints and nested ordered-map imports; connect Clay types to partial inference |
61+| fbeaa83 | 2026-10-30 | Extend atom constraints and nested ordered-map imports; connect Clay types to partial inference |
62+| This change | 2026-10-30 | Read validated Ford imports, widen aura families, and show both sites of selected errors |
62
63
63## Checking it
64## Checking it
64
65
65On a machine set up as [development.md](development.md) says:
66On a machine set up as [development.md](development.md) says:
66
67
67```
68```
68−tools/golden # 403 cases under urbit eval
69+tools/golden # 406 cases under urbit eval
69tools/importer-test # the Hoon importer fixture projection
70tools/importer-test # the Hoon importer fixture projection
70tools/type-import-test # the importer/checker bridge fixture
71tools/type-import-test # the importer/checker bridge fixture
71tools/hoon check-spans-test # prints <<>> when the span checker works
72tools/hoon check-spans-test # prints <<>> when the span checker works
@@ -73,7 +74,7 @@ tools/testdata/selftest # the tools themselves
73tools/doc-blocks docs/spec # the doc's examples are golden cases
74tools/doc-blocks docs/spec # the doc's examples are golden cases
74tools/ship start
75tools/ship start
75tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
76tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
76−tools/ship test # the same 403 cases as -test arms on the ship
77+tools/ship test # the same 406 cases as -test arms on the ship
77tools/testdata/ship-selftest
78tools/testdata/ship-selftest
78tools/ship check-commit # |commit stores .jibb files
79tools/ship check-commit # |commit stores .jibb files
79tools/clay-fixtures # example /sur files and marks build through Clay
80tools/clay-fixtures # example /sur files and marks build through Clay
jibb-dev/lib/jibb-import.hoon+48−12
@@ -13,8 +13,8 @@
13:: A direct $^ is read from its original branches and accepted only when
13:: A direct $^ is read from its original branches and accepted only when
14:: their imported shapes prove disjoint. Nested $^ and some valid but
14:: their imported shapes prove disjoint. Nested $^ and some valid but
15:: unprovably disjoint cases remain unsupported. Source-level overlap in
15:: unprovably disjoint cases remain unsupported. Source-level overlap in
16−:: other unions, general nested ordered maps, Ford import provenance,
16+:: other unions, general nested ordered maps, broader Ford subject
17−:: marks and full error locations still need work. A nested ordered map
17+:: shapes, marks and full error locations still need work. A nested ordered map
18:: is recovered only when its key and value are fixed atom molds and
18:: is recovered only when its key and value are fixed atom molds and
19:: the other fields are fixed atoms or collections of static atoms;
19:: the other fields are fixed atoms or collections of static atoms;
20:: other source shapes fail closed.
20:: other source shapes fail closed.
@@ -66,13 +66,14 @@
66 (read-with module name typ ~)
66 (read-with module name typ ~)
67::
67::
68:: +read-mold-in: accept the /sur core as provenance. The core must be
68:: +read-mold-in: accept the /sur core as provenance. The core must be
69−:: built directly against zuse and its selected arm must be this type;
69+:: built against zuse or validated Ford imports, and its selected arm
70−:: imported Ford subjects need a future provenance-aware host.
70+:: must be this type. Unknown subject shapes fail closed.
71++ read-mold-in
71++ read-mold-in
72 |= [module=term name=term typ=type cor=type]
72 |= [module=term name=term typ=type cor=type]
73 ^- (each imported @t)
73 ^- (each imported @t)
74 ?. ?=([%core *] cor) [%| 'Hoon module provenance is unavailable']
74 ?. ?=([%core *] cor) [%| 'Hoon module provenance is unavailable']
75− ?. =(q.q.cor -:!>(..zuse)) [%| 'Hoon module provenance is unavailable']
75+ ?: =(cor -:!>(..zuse)) [%| 'Hoon module provenance is unavailable']
76+ ?. (scope-safe cor %$) [%| 'Hoon module provenance is unavailable']
76 ?. =(typ (~(play ut cor) (ream (cat 3 '*' name))))
77 ?. =(typ (~(play ut cor) (ream (cat 3 '*' name))))
77 [%| 'Hoon module provenance does not match the selected mold']
78 [%| 'Hoon module provenance does not match the selected mold']
78 (read-with module name typ [~ cor])
79 (read-with module name typ [~ cor])
@@ -417,16 +418,33 @@
417 ?~ has &
418 ?~ has &
418 u.has
419 u.has
419::
420::
421+:: Verify every lexical subject layer until the exact standard subject.
422+:: Refuse unknown forms, malformed chapters, mismatched core payloads,
423+:: faces that shadow the selected name, and imported arms of that name.
424+++ scope-safe
425+ |= [scope=type target=term]
426+ ^- ?
427+ ?: =(scope -:!>(..zuse)) &
428+ ?- scope
429+ [%cell *]
430+ ?. ?=([%face *] p.scope) |
431+ ?^ p.p.scope |
432+ ?: =(p.p.scope target) |
433+ ?. ?=([%core *] q.p.scope) |
434+ &($(scope q.p.scope) $(scope q.scope))
435+ [%core *]
436+ ?. =(p.scope q.q.scope) |
437+ =/ chapters=(map term tome) q.r.q.scope
438+ ?: (lien ~(tap by chapters) |=(entry=[term tome] (chapter-unsafe +.entry target))) |
439+ $(scope p.scope)
440+ * |
441+ ==
442+::
420++ alias-safe
443++ alias-safe
421 |= [context=(unit type) target=term]
444 |= [context=(unit type) target=term]
422 ^- ?
445 ^- ?
423 ?~ context |
446 ?~ context |
424− =/ cor=type u.context
447+ (scope-safe u.context target)
425− ?. ?=([%core *] cor) |
426− ?. =(q.q.cor -:!>(..zuse)) |
427− =/ chapters=(map term tome) q.r.q.cor
428− ?: (lien ~(tap by chapters) |=(entry=[term tome] (chapter-unsafe +.entry target))) |
429− &
430::
448::
431++ source-uses
449++ source-uses
432 |= [src=* target=term]
450 |= [src=* target=term]
@@ -782,7 +800,7 @@
782 ==
800 ==
783::
801::
784++ fixture-output
802++ fixture-output
785− |= [small=@t epic=@t presence=@t docs=@t shadow=@t shadow-static=@t]
803+ |= [small=@t epic=@t presence=@t docs=@t shadow=@t shadow-static=@t ford=@t]
786 ^- wain
804 ^- wain
787 =/ sc=type -:(ride -:!>(..zuse) small)
805 =/ sc=type -:(ride -:!>(..zuse) small)
788 =/ ec=type -:(ride -:!>(..zuse) epic)
806 =/ ec=type -:(ride -:!>(..zuse) epic)
@@ -790,6 +808,16 @@
790 =/ dc=type -:(ride -:!>(..zuse) docs)
808 =/ dc=type -:(ride -:!>(..zuse) docs)
791 =/ hc=type -:(ride -:!>(..zuse) shadow)
809 =/ hc=type -:(ride -:!>(..zuse) shadow)
792 =/ xc=type -:(ride -:!>(..zuse) shadow-static)
810 =/ xc=type -:(ride -:!>(..zuse) shadow-static)
811+ =/ fp=type [%cell [%face %small sc] -:!>(..zuse)]
812+ =/ fc=type -:(ride fp ford)
813+ ?> ?=([%core *] fc)
814+ =/ only-list=@t '|%\0a+$ lists (list @ud)\0a--\0a'
815+ =/ tp=type [%cell [%face %intermediate fc] -:!>(..zuse)]
816+ =/ tc=type -:(ride tp only-list)
817+ =/ sp=type [%cell [%face %small xc] -:!>(..zuse)]
818+ =/ shc=type -:(ride sp only-list)
819+ =/ tshp=type [%cell [%face %intermediate shc] -:!>(..zuse)]
820+ =/ tshc=type -:(ride tshp only-list)
793 =/ sample
821 =/ sample
794 |= name=term
822 |= name=term
795 (read-mold-in %small name (~(play ut sc) (ream (cat 3 '*' name))) sc)
823 (read-mold-in %small name (~(play ut sc) (ream (cat 3 '*' name))) sc)
@@ -827,6 +855,14 @@
827 (crip "nested-static-mop: {(show-result (sample %nested-static-mop))}")
855 (crip "nested-static-mop: {(show-result (sample %nested-static-mop))}")
828 (crip "collection-siblings: {(show-result (sample %collection-siblings))}")
856 (crip "collection-siblings: {(show-result (sample %collection-siblings))}")
829 (crip "dynamic-sibling-mop: {(show-result (sample %dynamic-sibling-mop))}")
857 (crip "dynamic-sibling-mop: {(show-result (sample %dynamic-sibling-mop))}")
858+ (crip "ford-list: {(show-result (read-mold-in %ford %lists (~(play ut fc) (ream '*lists')) fc))}")
859+ (crip "ford-imported: {(show-result (read-mold-in %ford %wrapped (~(play ut fc) (ream '*wrapped')) fc))}")
860+ (crip "ford-transitive: {(show-result (read-mold-in %ford %lists (~(play ut tc) (ream '*lists')) tc))}")
861+ (crip "ford-shadow: {(show-result (read-mold-in %ford %lists (~(play ut shc) (ream '*lists')) shc))}")
862+ (crip "ford-transitive-shadow: {(show-result (read-mold-in %ford %lists (~(play ut tshc) (ream '*lists')) tshc))}")
863+ (crip "ford-shadow-face: {?:((scope-safe [%cell [%face %list sc] -:!>(..zuse)] %list) "wrong" "unsafe")}")
864+ (crip "ford-unknown: {?:((scope-safe [%cell [%atom %ud ~] -:!>(..zuse)] %list) "wrong" "unsafe")}")
865+ (crip "ford-mismatched-core: {?:((scope-safe fc(p -:!>(..zuse)) %list) "wrong" "unsafe")}")
830 (crip "shadow-list-mop: {(show-result (read-mold-in %shadow-static %bad (~(play ut xc) (ream '*bad')) xc))}")
866 (crip "shadow-list-mop: {(show-result (read-mold-in %shadow-static %bad (~(play ut xc) (ream '*bad')) xc))}")
831 (crip "named-mop: {(show-result (sample %named-mop))}")
867 (crip "named-mop: {(show-result (sample %named-mop))}")
832 (crip "mop-list: {(show-result (sample %mop-list))}")
868 (crip "mop-list: {(show-result (sample %mop-list))}")
jibb-dev/lib/jibb.hoon+128−43
@@ -4718,9 +4718,43 @@
4718 %cell |($(t hed.t) $(t tal.t))
4718 %cell |($(t hed.t) $(t tal.t))
4719 ==
4719 ==
4720::
4720::
4721+::
4722+:: Hoon aura families are textual prefixes: @tD is in @t, and @uvJ
4723+:: is in @uv and @u. Jibb permits widening toward the prefix only.
4724+::
4725+++ aura-prefix
4726+ |= [parent=@ta child=@ta]
4727+ ^- ?
4728+ =/ a=tape (trip parent)
4729+ =/ b=tape (trip child)
4730+ |-
4731+ ?~ a &
4732+ ?~ b |
4733+ ?. =(i.a i.b) |
4734+ $(a t.a, b t.b)
4735+::
4736+:: Related auras in a structural unification need a common-type rule;
4737+:: until that rule is implemented, report an unknown rather than error.
4738+::
4739+++ itype-family-related
4740+ |= [a=itype b=itype sub=isub]
4741+ ^- ?
4742+ =. a (itype-walk a sub)
4743+ =. b (itype-walk b sub)
4744+ ?: &(?=(%atom -.a) ?=(%atom -.b))
4745+ ?. !=(aura.a aura.b) |
4746+ |((aura-prefix aura.a aura.b) (aura-prefix aura.b aura.a))
4747+ ?: &(?=(%cell -.a) ?=(%cell -.b))
4748+ |($(a hed.a, b hed.b) $(a tal.a, b tal.b))
4749+ ?: &(?=(%fn -.a) ?=(%fn -.b))
4750+ |($(a sample.a, b sample.b) $(a product.a, b product.b))
4751+ |
4752+::
4721++ itype-fit
4753++ itype-fit
4722 |= [actual=itype expected=itype sub=isub next=@ud]
4754 |= [actual=itype expected=itype sub=isub next=@ud]
4723 ^- ifit
4755 ^- ifit
4756+ =/ uncertain=?
4757+ |(?=(%var -.actual) ?=(%avar -.actual) ?=(%nvar -.actual) ?=(%var -.expected) ?=(%avar -.expected) ?=(%nvar -.expected))
4724 =. actual (itype-walk actual sub)
4758 =. actual (itype-walk actual sub)
4725 =. expected (itype-walk expected sub)
4759 =. expected (itype-walk expected sub)
4726 ?: =(actual expected) [%ok sub next]
4760 ?: =(actual expected) [%ok sub next]
@@ -4738,6 +4772,10 @@
4738 [%ok u.unified next]
4772 [%ok u.unified next]
4739 ?: |(?=(%avar -.expected) ?=(%nvar -.expected)) [%unknown ~]
4773 ?: |(?=(%avar -.expected) ?=(%nvar -.expected)) [%unknown ~]
4740 [%bad ~]
4774 [%bad ~]
4775+ ?: &(?=(%atom -.actual) ?=(%atom -.expected))
4776+ ?: (aura-prefix aura.expected aura.actual) [%ok sub next]
4777+ ?: &((aura-prefix aura.actual aura.expected) uncertain) [%unknown ~]
4778+ [%bad ~]
4741 ?: &(?=(%cell -.actual) ?=(%cell -.expected))
4779 ?: &(?=(%cell -.actual) ?=(%cell -.expected))
4742 =/ first=ifit $(actual hed.actual, expected hed.expected)
4780 =/ first=ifit $(actual hed.actual, expected hed.expected)
4743 ?. ?=(%ok -.first) first
4781 ?. ?=(%ok -.first) first
@@ -4746,12 +4784,16 @@
4746 [%unknown ~]
4784 [%unknown ~]
4747 ?: |(?=(%var -.actual) ?=(%var -.expected))
4785 ?: |(?=(%var -.actual) ?=(%var -.expected))
4748 =/ unified=(unit isub) (itype-unify actual expected sub)
4786 =/ unified=(unit isub) (itype-unify actual expected sub)
4749− ?~ unified [%bad ~]
4787+ ?~ unified
4788+ ?: (itype-family-related actual expected sub) [%unknown ~]
4789+ [%bad ~]
4750 [%ok u.unified next]
4790 [%ok u.unified next]
4751 ?: |((itype-has-any-atom actual sub) (itype-has-any-atom expected sub))
4791 ?: |((itype-has-any-atom actual sub) (itype-has-any-atom expected sub))
4752 [%unknown ~]
4792 [%unknown ~]
4753 =/ unified=(unit isub) (itype-unify actual expected sub)
4793 =/ unified=(unit isub) (itype-unify actual expected sub)
4754− ?~ unified [%bad ~]
4794+ ?~ unified
4795+ ?: (itype-family-related actual expected sub) [%unknown ~]
4796+ [%bad ~]
4755 [%ok u.unified next]
4797 [%ok u.unified next]
4756::
4798::
4757++ itype-unify-test
4799++ itype-unify-test
@@ -4792,7 +4834,8 @@
4792:: This core has no Ford dependencies; unrecognized payloads fail closed.
4834:: This core has no Ford dependencies; unrecognized payloads fail closed.
4793+$ iexternals (list [module=term name=term result=*])
4835+$ iexternals (list [module=term name=term result=*])
4794+$ istate [next=@ud sub=isub caps=icaps binders=(list @ud) molds=imolds globals=(list term) externals=iexternals surs=(list term) active=(list term) in-mold=?]
4836+$ istate [next=@ud sub=isub caps=icaps binders=(list @ud) molds=imolds globals=(list term) externals=iexternals surs=(list term) active=(list term) in-mold=?]
4837++$ idiag [msg=tape sites=(list [at=span note=tape])]
4795−+$ iresult (each [typ=itype state=istate] tape)
4838++$ iresult (each [typ=itype state=istate] idiag)
4796+$ isample-result (each [typ=itype env=ienv state=istate] tape)
4839+$ isample-result (each [typ=itype env=ienv state=istate] tape)
4797::
4840::
4798++ ienv-lookup
4841++ ienv-lookup
@@ -4943,7 +4986,7 @@
4943 %atom
4986 %atom
4944 ?. ?=([%atom @ ~] node) ~
4987 ?. ?=([%atom @ ~] node) ~
4945 =/ aura=@ta (@ta +<.node)
4988 =/ aura=@ta (@ta +<.node)
4946− ?. ?=(?(%ud %ux %uv %t %ta %tas %p %da %dr) aura) ~
4989+ ?. |(?=(?(%u %ud %ux %uv %t %ta %tas %p %da %dr) aura) =('tD' aura)) ~
4947 `[%atom aura]
4990 `[%atom aura]
4948 %cell
4991 %cell
4949 ?. ?=([%cell * *] node) ~
4992 ?. ?=([%cell * *] node) ~
@@ -5062,17 +5105,17 @@
5062 %duration [%& [%atom %dr] state]
5105 %duration [%& [%atom %dr] state]
5063 %knot [%& [%atom %ta] state]
5106 %knot [%& [%atom %ta] state]
5064 %loobean [%& [%flag ~] state]
5107 %loobean [%& [%flag ~] state]
5065− * [%| "literal needs contextual inference"]
5108+ * [%| ["literal needs contextual inference" ~]]
5066 ==
5109 ==
5067 %str
5110 %str
5068 =/ interpolated=? (lien pieces.e |=(p=piece ?=(%expr -.p)))
5111 =/ interpolated=? (lien pieces.e |=(p=piece ?=(%expr -.p)))
5069− ?: interpolated [%| "interpolation is not supported by partial inference"]
5112+ ?: interpolated [%| ["interpolation is not supported by partial inference" ~]]
5070 [%& [%atom %t] state]
5113 [%& [%atom %t] state]
5071 %wing
5114 %wing
5072− ?~ names.e [%| "empty wing"]
5115+ ?~ names.e [%| ["empty wing" ~]]
5073− ?^ t.names.e [%| "field access is not supported by partial inference"]
5116+ ?^ t.names.e [%| ["field access is not supported by partial inference" ~]]
5074 =/ scheme=(unit ischeme) (ienv-lookup i.names.e env)
5117 =/ scheme=(unit ischeme) (ienv-lookup i.names.e env)
5075− ?~ scheme [%| "name is not available to partial inference"]
5118+ ?~ scheme [%| ["name is not available to partial inference" ~]]
5076 =/ instance=[typ=itype state=istate] (instantiate-scheme u.scheme state)
5119 =/ instance=[typ=itype state=istate] (instantiate-scheme u.scheme state)
5077 [%& typ.instance state.instance]
5120 [%& typ.instance state.instance]
5078 %group $(e inner.e)
5121 %group $(e inner.e)
@@ -5082,59 +5125,60 @@
5082 $(e then.e, state state.p.traced)
5125 $(e then.e, state state.p.traced)
5083 %tuple (infer-simple-items items.e env state)
5126 %tuple (infer-simple-items items.e env state)
5084 %body
5127 %body
5085− ?^ defs.e [%| "local definitions are not supported by partial inference"]
5128+ ?^ defs.e [%| ["local definitions are not supported by partial inference" ~]]
5086 $(e final.e)
5129 $(e final.e)
5087 %branch
5130 %branch
5088− ?~ arms.e [%| "branch is not supported by partial inference"]
5131+ ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
5089 ?~ t.arms.e (infer-cell-branch e env state)
5132 ?~ t.arms.e (infer-cell-branch e env state)
5090− ?^ t.t.arms.e [%| "branch is not supported by partial inference"]
5133+ ?^ t.t.arms.e [%| ["branch is not supported by partial inference" ~]]
5091 =/ x=arm i.arms.e
5134 =/ x=arm i.arms.e
5092 =/ y=arm i.t.arms.e
5135 =/ y=arm i.t.arms.e
5093− ?. ?=(%lit -.pat.x) [%| "branch pattern is not supported by partial inference"]
5136+ ?. ?=(%lit -.pat.x) [%| ["branch pattern is not supported by partial inference" ~]]
5094− ?. ?=(%lit -.pat.y) [%| "branch pattern is not supported by partial inference"]
5137+ ?. ?=(%lit -.pat.y) [%| ["branch pattern is not supported by partial inference" ~]]
5095 ?. &(=(%loobean form.lit.pat.x) =(%loobean form.lit.pat.y))
5138 ?. &(=(%loobean form.lit.pat.x) =(%loobean form.lit.pat.y))
5096− [%| "branch pattern is not supported by partial inference"]
5139+ [%| ["branch pattern is not supported by partial inference" ~]]
5097 ?: =(val.lit.pat.x val.lit.pat.y)
5140 ?: =(val.lit.pat.x val.lit.pat.y)
5098− [%| "branch does not cover both loobeans"]
5141+ [%| ["branch does not cover both loobeans" ~]]
5099 =/ subject=iresult $(e subject.e)
5142 =/ subject=iresult $(e subject.e)
5100 ?: ?=(%| -.subject) subject
5143 ?: ?=(%| -.subject) subject
5101 =/ su=(unit isub) (itype-unify typ.p.subject [%flag ~] sub.state.p.subject)
5144 =/ su=(unit isub) (itype-unify typ.p.subject [%flag ~] sub.state.p.subject)
5102− ?~ su [%| "loobean branch subject does not unify with ?"]
5145+ ?~ su [%| ["loobean branch subject does not unify with ?" ~]]
5103 =/ left=iresult $(e val.x, state state.p.subject(sub u.su))
5146 =/ left=iresult $(e val.x, state state.p.subject(sub u.su))
5104 ?: ?=(%| -.left) left
5147 ?: ?=(%| -.left) left
5105 =/ right=iresult $(e val.y, state state.p.left)
5148 =/ right=iresult $(e val.y, state state.p.left)
5106 ?: ?=(%| -.right) right
5149 ?: ?=(%| -.right) right
5107 =/ joined=(unit isub) (itype-unify typ.p.left typ.p.right sub.state.p.right)
5150 =/ joined=(unit isub) (itype-unify typ.p.left typ.p.right sub.state.p.right)
5108 ?~ joined
5151 ?~ joined
5109− ?: |((itype-has-any-atom typ.p.left sub.state.p.right) (itype-has-any-atom typ.p.right sub.state.p.right))
5152+ ?: |((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))
5110− [%| "branch widening is not supported by partial inference"]
5153+ [%| ["branch widening is not supported by partial inference" ~]]
5111− [%| "branch arms have incompatible types"]
5154+ [%| ["branch arms have incompatible types" ~]]
5112 [%& typ.p.left state.p.right(sub u.joined)]
5155 [%& typ.p.left state.p.right(sub u.joined)]
5113 %cast
5156 %cast
5114 =/ target=(unit [typ=itype state=istate]) (infer-simple-shape shape.e state)
5157 =/ target=(unit [typ=itype state=istate]) (infer-simple-shape shape.e state)
5115− ?~ target [%| "cast mold is not supported by partial inference"]
5158+ ?~ target [%| ["cast mold is not supported by partial inference" ~]]
5116 =/ value=iresult $(e val.e, state state.u.target)
5159 =/ value=iresult $(e val.e, state state.u.target)
5117 ?: ?=(%| -.value) value
5160 ?: ?=(%| -.value) value
5118 =/ fit=ifit (itype-fit typ.p.value typ.u.target sub.state.p.value next.state.p.value)
5161 =/ fit=ifit (itype-fit typ.p.value typ.u.target sub.state.p.value next.state.p.value)
5119− ?: ?=(%unknown -.fit) [%| "cast constraint is not supported by partial inference"]
5162+ ?: ?=(%unknown -.fit) [%| ["cast constraint is not supported by partial inference" ~]]
5120− ?: ?=(%bad -.fit) [%| "cast mold and expression type do not unify"]
5163+ ?: ?=(%bad -.fit)
5164+ [%| ["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)]]]]
5121 [%& typ.u.target state.p.value(sub sub.fit, next next.fit)]
5165 [%& typ.u.target state.p.value(sub sub.fit, next next.fit)]
5122 %crash [%& [%var next.state] state(next +(next.state))]
5166 %crash [%& [%var next.state] state(next +(next.state))]
5123 %gate
5167 %gate
5124 =/ sam=isample-result (infer-sample sample.e env state)
5168 =/ sam=isample-result (infer-sample sample.e env state)
5125− ?: ?=(%| -.sam) [%| p.sam]
5169+ ?: ?=(%| -.sam) [%| [p.sam ~]]
5126 =/ body=iresult $(e body.e, env env.p.sam, state state.p.sam)
5170 =/ body=iresult $(e body.e, env env.p.sam, state state.p.sam)
5127 ?: ?=(%| -.body) body
5171 ?: ?=(%| -.body) body
5128 [%& [%fn typ.p.sam typ.p.body] state.p.body]
5172 [%& [%fn typ.p.sam typ.p.body] state.p.body]
5129 %gate-wide
5173 %gate-wide
5130 =/ sam=isample-result (infer-sample sample.e env state)
5174 =/ sam=isample-result (infer-sample sample.e env state)
5131− ?: ?=(%| -.sam) [%| p.sam]
5175+ ?: ?=(%| -.sam) [%| [p.sam ~]]
5132 =/ body=iresult $(e body.e, env env.p.sam, state state.p.sam)
5176 =/ body=iresult $(e body.e, env env.p.sam, state state.p.sam)
5133 ?: ?=(%| -.body) body
5177 ?: ?=(%| -.body) body
5134 [%& [%fn typ.p.sam typ.p.body] state.p.body]
5178 [%& [%fn typ.p.sam typ.p.body] state.p.body]
5135 %call
5179 %call
5136− ?~ args.e [%| "call has no argument"]
5180+ ?~ args.e [%| ["call has no argument" ~]]
5137− ?^ t.args.e [%| "multiple arguments are not supported by partial inference"]
5181+ ?^ t.args.e [%| ["multiple arguments are not supported by partial inference" ~]]
5138 =/ head=iresult $(e head.e)
5182 =/ head=iresult $(e head.e)
5139 ?: ?=(%| -.head) head
5183 ?: ?=(%| -.head) head
5140 =/ arg=iresult $(e i.args.e, state state.p.head)
5184 =/ arg=iresult $(e i.args.e, state state.p.head)
@@ -5143,14 +5187,16 @@
5143 =/ ht=itype (itype-walk typ.p.head sub.st)
5187 =/ ht=itype (itype-walk typ.p.head sub.st)
5144 ?: ?=(%fn -.ht)
5188 ?: ?=(%fn -.ht)
5145 =/ fit=ifit (itype-fit typ.p.arg sample.ht sub.st next.st)
5189 =/ fit=ifit (itype-fit typ.p.arg sample.ht sub.st next.st)
5146− ?: ?=(%unknown -.fit) [%| "call constraint is not supported by partial inference"]
5190+ ?: ?=(%unknown -.fit) [%| ["call constraint is not supported by partial inference" ~]]
5191+ ?: ?=(%bad -.fit)
5147− ?: ?=(%bad -.fit) [%| "call's sample and argument types do not unify"]
5192+ [%| ["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)]]]]
5148 [%& product.ht st(sub sub.fit, next next.fit)]
5193 [%& product.ht st(sub sub.fit, next next.fit)]
5149 =/ result=itype [%var next.st]
5194 =/ result=itype [%var next.st]
5150 =/ uni=(unit isub) (itype-unify ht [%fn typ.p.arg result] sub.st)
5195 =/ uni=(unit isub) (itype-unify ht [%fn typ.p.arg result] sub.st)
5196+ ?~ uni
5151− ?~ uni [%| "call's sample and argument types do not unify"]
5197+ [%| ["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)]]]]
5152 [%& result st(next +(next.st), sub u.uni)]
5198 [%& result st(next +(next.st), sub u.uni)]
5153− * [%| "expression is not supported by partial inference"]
5199+ * [%| ["expression is not supported by partial inference" ~]]
5154 ==
5200 ==
5155::
5201::
5156:: Unfaced tuple expressions are the one supported cell construction.
5202:: Unfaced tuple expressions are the one supported cell construction.
@@ -5159,8 +5205,8 @@
5159++ infer-simple-items
5205++ infer-simple-items
5160 |= [items=(list item) env=ienv state=istate]
5206 |= [items=(list item) env=ienv state=istate]
5161 ^- iresult
5207 ^- iresult
5162− ?~ items [%| "empty cell is not supported by partial inference"]
5208+ ?~ items [%| ["empty cell is not supported by partial inference" ~]]
5163− ?^ face.i.items [%| "record faces are not supported by partial inference"]
5209+ ?^ face.i.items [%| ["record faces are not supported by partial inference" ~]]
5164 =/ head=iresult (infer-fragment val.i.items env state)
5210 =/ head=iresult (infer-fragment val.i.items env state)
5165 ?: ?=(%| -.head) head
5211 ?: ?=(%| -.head) head
5166 ?~ t.items head
5212 ?~ t.items head
@@ -5175,26 +5221,26 @@
5175 |= [e=expr env=ienv state=istate]
5221 |= [e=expr env=ienv state=istate]
5176 ^- iresult
5222 ^- iresult
5177 ?> ?=(%branch -.e)
5223 ?> ?=(%branch -.e)
5178− ?~ arms.e [%| "branch is not supported by partial inference"]
5224+ ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
5179 =/ arm=arm i.arms.e
5225 =/ arm=arm i.arms.e
5180− ?. ?=(%cell -.pat.arm) [%| "branch pattern is not supported by partial inference"]
5226+ ?. ?=(%cell -.pat.arm) [%| ["branch pattern is not supported by partial inference" ~]]
5181 =/ pats=(list pattern) items.pat.arm
5227 =/ pats=(list pattern) items.pat.arm
5182− ?~ pats [%| "branch pattern is not supported by partial inference"]
5228+ ?~ pats [%| ["branch pattern is not supported by partial inference" ~]]
5183− ?~ t.pats [%| "branch pattern is not supported by partial inference"]
5229+ ?~ t.pats [%| ["branch pattern is not supported by partial inference" ~]]
5184− ?^ t.t.pats [%| "branch pattern is not supported by partial inference"]
5230+ ?^ t.t.pats [%| ["branch pattern is not supported by partial inference" ~]]
5185− ?. ?=(%bind -.i.pats) [%| "branch pattern is not supported by partial inference"]
5231+ ?. ?=(%bind -.i.pats) [%| ["branch pattern is not supported by partial inference" ~]]
5186− ?. ?=(%bind -.i.t.pats) [%| "branch pattern is not supported by partial inference"]
5232+ ?. ?=(%bind -.i.t.pats) [%| ["branch pattern is not supported by partial inference" ~]]
5187 =/ one=term name.i.pats
5233 =/ one=term name.i.pats
5188 =/ two=term name.i.t.pats
5234 =/ two=term name.i.t.pats
5189 ?: |(=(one two) ?=(^ (ienv-lookup one env)) ?=(^ (ienv-lookup two env)) (lien globals.state |=(x=term |(=(x one) =(x two)))))
5235 ?: |(=(one two) ?=(^ (ienv-lookup one env)) ?=(^ (ienv-lookup two env)) (lien globals.state |=(x=term |(=(x one) =(x two)))))
5190− [%| "pattern shadows a name"]
5236+ [%| ["pattern shadows a name" ~]]
5191 =/ subject=iresult (infer-fragment subject.e env state)
5237 =/ subject=iresult (infer-fragment subject.e env state)
5192 ?: ?=(%| -.subject) subject
5238 ?: ?=(%| -.subject) subject
5193 =/ st=istate state.p.subject
5239 =/ st=istate state.p.subject
5194 =/ head=itype [%var next.st]
5240 =/ head=itype [%var next.st]
5195 =/ tail=itype [%var +(next.st)]
5241 =/ tail=itype [%var +(next.st)]
5196 =/ sub=(unit isub) (itype-unify typ.p.subject [%cell head tail] sub.st)
5242 =/ sub=(unit isub) (itype-unify typ.p.subject [%cell head tail] sub.st)
5197− ?~ sub [%| "cell pattern does not match the subject type"]
5243+ ?~ sub [%| ["cell pattern does not match the subject type" ~]]
5198 (infer-fragment val.arm [[one [head ~]] [two [tail ~]] env] st(next (add 2 next.st), sub u.sub))
5244 (infer-fragment val.arm [[one [head ~]] [two [tail ~]] env] st(next (add 2 next.st), sub u.sub))
5199::
5245::
5200++ show-itype
5246++ show-itype
@@ -5218,6 +5264,33 @@
5218 %cell "[{$(t hed.t)} {$(t tal.t)}]"
5264 %cell "[{$(t hed.t)} {$(t tal.t)}]"
5219 ==
5265 ==
5220::
5266::
5267+:: Include the type at a conflicting site where it can be printed.
5268+:: A lone unresolved variable or decimal variable keeps the neutral label.
5269+::
5270+++ itype-has-nvar
5271+ |= typ=itype
5272+ ^- ?
5273+ ?- -.typ
5274+ %nvar &
5275+ %var |
5276+ %avar |
5277+ %atom |
5278+ %any-atom |
5279+ %flag |
5280+ %fn |($(typ sample.typ) $(typ product.typ))
5281+ %cell |($(typ hed.typ) $(typ tal.typ))
5282+ ==
5283+::
5284+++ site-type-note
5285+ |= [label=tape typ=itype sub=isub]
5286+ ^- tape
5287+ =/ normalized=itype (itype-normalize typ sub)
5288+ ?: |(?=(%var -.normalized) ?=(%avar -.normalized) (itype-has-nvar normalized)) label
5289+ =/ vars=(list @ud) (unique-type-vars (itype-vars normalized))
5290+ ?: (gth (lent vars) 26) label
5291+ =/ printable=itype (canonical-itype normalized vars)
5292+ "{label} has type {(show-itype printable ~)}{(show-atom-constraint printable)}"
5293+::
5221:: A capital in a written mold is generalized with its enclosing ++.
5294:: A capital in a written mold is generalized with its enclosing ++.
5222:: Atom constraints may remain generic; until full rigidity checking
5295:: Atom constraints may remain generic; until full rigidity checking
5223:: is implemented, do not report a type if one became more specific.
5296:: is implemented, do not report a type if one became more specific.
@@ -5490,6 +5563,18 @@
5490 (crip "+$ {(trip name.d)}: case disjointness unresolved; mold not checked")
5563 (crip "+$ {(trip name.d)}: case disjointness unresolved; mold not checked")
5491 (crip "+$ {(trip name.d)}: cases proven disjoint; mold not checked")
5564 (crip "+$ {(trip name.d)}: cases proven disjoint; mold not checked")
5492::
5565::
5566+:: +show-inference-diagnostic: a partial report with both source sites
5567+::
5568+++ show-inference-diagnostic
5569+ |= [file=path src=@t name=term diagnostic=idiag]
5570+ ^- @t
5571+ =/ summary=@t (crip "++ {(trip name)}: {msg.diagnostic}")
5572+ =/ excerpts=(list @t)
5573+ %+ turn sites.diagnostic
5574+ |= site=[at=span note=tape]
5575+ (show-error src [file line.beg.at.site col.beg.at.site note.site])
5576+ (of-wain:format [summary excerpts])
5577+::
5493:: +golden-types: a partial report; it does not claim the module checks
5578:: +golden-types: a partial report; it does not claim the module checks
5494::
5579::
5495++ golden-types
5580++ golden-types
@@ -5523,7 +5608,7 @@
5523 $(ds t.ds, lines [(crip "++ {(trip name.d)}: name already in scope") lines])
5608 $(ds t.ds, lines [(crip "++ {(trip name.d)}: name already in scope") lines])
5524 =/ result=iresult (infer-fragment val.d env [0 ~ ~ ~ molds globals externals surs ~ |])
5609 =/ result=iresult (infer-fragment val.d env [0 ~ ~ ~ molds globals externals surs ~ |])
5525 ?: ?=(%| -.result)
5610 ?: ?=(%| -.result)
5526− $(ds t.ds, lines [(crip "++ {(trip name.d)}: {p.result}") lines])
5611+ $(ds t.ds, lines [(show-inference-diagnostic file src name.d p.result) lines])
5527 ?: (constrained-capitals caps.state.p.result sub.state.p.result)
5612 ?: (constrained-capitals caps.state.p.result sub.state.p.result)
5528 $(ds t.ds, lines [(crip "++ {(trip name.d)}: explicit capital constraints are not supported by partial inference") lines])
5613 $(ds t.ds, lines [(crip "++ {(trip name.d)}: explicit capital constraints are not supported by partial inference") lines])
5529 =/ typ=itype (itype-normalize typ.p.result sub.state.p.result)
5614 =/ typ=itype (itype-normalize typ.p.result sub.state.p.result)
jibb-dev/lib/jibb/prelude.jibb+18
@@ -118,3 +118,21 @@
118 [%& p=A]
118 [%& p=A]
119
119
120+$ bloq @
120+$ bloq @
121+
122+++ some |= item=A `item
123+
124+++ lure |= item=A
125+ ^- (list A) [item ~]
126+
127+++ snoc |= args=[(list A) A]
128+ ?- args
129+ [xs item] (weld xs [item ~])
130+
131+++ flop |= xs=(list A)
132+ ++ reverse-into |= args=[(list A) (list A)]
133+ ?- args
134+ [rest acc]
135+ ?- rest
136+ ~ acc
137+ [item more] (reverse-into more [item acc])
138+ (reverse-into xs ~)
my-app/sur/import-fixture.hoonnew file+5
@@ -0,0 +1,5 @@
1+/- blog
2+:: Fixture for the Hoon importer; not supplied by the design doc.
3+|%
4++$ sample [title=title:blog values=(list @ud)]
5+--
tests/clay-fixtures/ford-expected.txtnew file+1
@@ -0,0 +1 @@
1+[%.y %.y %.y %.y %.y]
tests/clay-fixtures/ford-import-expected.txtnew file+1
@@ -0,0 +1 @@
1+"[title=@t values=(list @ud)]"
tests/clay-fixtures/ford-import.txtnew file+12
@@ -0,0 +1,12 @@
1+=/ m (strand ,vase)
2+;< =bowl:spider bind:m get-bowl
3+=/ now=@da now.bowl
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)]/my-app/[(scot %da now)]/lib/jibb-import/hoon)
6+=/ cor=type -.src
7+=/ typ=type (~(play ut cor) (ream '*sample'))
8+=/ read-gate=vase (slap reader (ream 'read-mold-in'))
9+=/ got=vase (slym read-gate [%import-fixture %sample typ cor])
10+=/ show-gate=vase (slap reader (ream 'show-result'))
11+=/ result=vase (slym show-gate +.got)
12+(pure:m result)
tests/clay-fixtures/ford.txtnew file+13
@@ -0,0 +1,13 @@
1+=/ m (strand ,vase)
2+;< =bowl:spider bind:m get-bowl
3+=/ now=@da now.bowl
4+=/ src=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/sur/import-fixture/hoon)
5+=/ cor=type -.src
6+?. ?=([%core *] cor) (pure:m !>('not a core'))
7+=/ subject=type q.q.cor
8+=/ cell=? ?=([%cell *] subject)
9+=/ face=? ?=([%cell [%face %blog *] *] subject)
10+=/ core=? ?=([%cell [%face %blog [%core *]] *] subject)
11+=/ tail=? ?:(?=([%cell *] subject) =(q.subject -:!>(..zuse)) |)
12+=/ payload=? =(p.cor subject)
13+(pure:m !>([cell face core tail payload]))
tests/golden/prelude-1c-structural/about.txt+1−1
@@ -1,4 +1,4 @@
1source: Overview, Prelude: "The exported inventory includes all names from the Hoon library sections listed below, excluding the groups explicitly left out"; section 1c includes `lone`, `lest`, `pole`, `quip`, `tree`, `each` and `bloq`.
1source: Overview, Prelude: "The exported inventory includes all names from the Hoon library sections listed below, excluding the groups explicitly left out"; section 1c includes `lone`, `lest`, `pole`, `quip`, `tree`, `each` and `bloq`.
2−tests: The prelude's 1c structural molds, including a one-field face, nonempty and faceless lists, a pair of list and state, a recursive tree, an either mold whose `%|` and `%&` cases have distinct tags, and the bare-atom `bloq`. The source is the complete current prelude.
2+tests: The prelude's 1c structural molds, including a one-field face, nonempty and faceless lists, a pair of list and state, a recursive tree, an either mold whose `%|` and `%&` cases have distinct tags, and the bare-atom `bloq`. The source contains the prelude definitions through `bloq`.
3expect: parses
3expect: parses
4expect-types: a partial inference report, not a checked module; it checks supported union-case disjointness but not the molds as a whole
4expect-types: a partial inference report, not a checked module; it checks supported union-case disjointness but not the molds as a whole
tests/golden/prelude-list-helpers/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Overview, Prelude: "The exported inventory includes all names from the Hoon library sections listed below, excluding the groups explicitly left out"; Hoon 2a and 2b include `some`, `lure`, `snoc` and `flop`.
2+tests: The prelude's unit constructor, singleton list, append-one gate and tail-recursive list reversal; the local reversal helper shares the enclosing type variable. The source is the complete current prelude.
3+expect: parses
4+expect-types: a partial inference report, not a checked module; unit, list and recursive helper typing is not complete
tests/golden/prelude-list-helpers/source.jibbnew file+138
@@ -0,0 +1,138 @@
1+:: Initial prelude functions. The rest of the inventory is still to come.
2+++ same |= x=A x
3+
4+++ head |= p=[A B]
5+ ?- p
6+ [a b] a
7+
8+++ tail |= p=[A B]
9+ ?- p
10+ [a b] b
11+
12+++ not |= b=?
13+ ?- b
14+ %.y %.n
15+ %.n %.y
16+
17++$ list |$ [A]
18+ ~
19+ [i=A t=(list A)]
20+
21++$ unit |$ [A]
22+ ~
23+ [~ u=A]
24+
25+++ fall |= args=[(unit A) A]
26+ ?- args
27+ [maybe fallback]
28+ ?- maybe
29+ ~ fallback
30+ [~ value] value
31+
32+++ need |= maybe=(unit A)
33+ ?- maybe
34+ ~ !!
35+ [~ value] value
36+
37+++ weld |= args=[(list A) (list A)]
38+ ?- args
39+ [xs ys]
40+ ?- xs
41+ ~ ys
42+ [item rest] [item (weld rest ys)]
43+
44+++ turn |= args=[(list A) $-(A B)]
45+ ?- args
46+ [xs f]
47+ ?- xs
48+ ~ ~
49+ [item rest] [(f item) (turn rest f)]
50+
51++$ dime [p=@ta q=@]
52+
53++$ hair [p=@ud q=@ud]
54+
55++$ pint [p=[p=@ q=@] q=[p=@ q=@]]
56+
57++$ coin
58+ [%$ p=dime]
59+ [%blob p=*]
60+ [%many p=(list coin)]
61+
62++$ pair |$ [A B] [p=A q=B]
63+
64++$ trel |$ [A B C] [p=A q=B r=C]
65+
66++$ qual |$ [A B C D] [p=A q=B r=C s=D]
67+
68++$ cord @t
69+
70++$ knot @ta
71+
72++$ tape (list @tD)
73+
74++$ path (list knot)
75+
76++$ tank
77+ cord
78+ [%leaf p=tape]
79+ [%palm p=(qual tape tape tape tape) q=(list tank)]
80+ [%rose p=(trel tape tape tape) q=(list tank)]
81+
82++$ nail [p=hair q=tape]
83+
84++$ edge [p=hair q=(unit [p=* q=nail])]
85+
86++$ rule $-(nail edge)
87+
88++$ spot [p=path q=pint]
89+
90++$ toon
91+ [%0 p=*]
92+ [%1 p=*]
93+ [%2 p=(list tank)]
94+
95++$ like |$ [A] [p=hair q=(unit [p=A q=nail])]
96+
97+++ wonk |= veq=(like A)
98+ ?- q.veq
99+ ~ !!
100+ [~ product] p.product
101+
102++$ lone |$ [A] [p=A]
103+
104++$ lest |$ [A] [i=A t=(list A)]
105+
106++$ pole |$ [A]
107+ ~
108+ [A (pole A)]
109+
110++$ quip |$ [A B] [(list A) B]
111+
112++$ tree |$ [A]
113+ ~
114+ [n=A l=(tree A) r=(tree A)]
115+
116++$ each |$ [A B]
117+ [%| p=B]
118+ [%& p=A]
119+
120++$ bloq @
121+
122+++ some |= item=A `item
123+
124+++ lure |= item=A
125+ ^- (list A) [item ~]
126+
127+++ snoc |= args=[(list A) A]
128+ ?- args
129+ [xs item] (weld xs [item ~])
130+
131+++ flop |= xs=(list A)
132+ ++ reverse-into |= args=[(list A) (list A)]
133+ ?- args
134+ [rest acc]
135+ ?- rest
136+ ~ acc
137+ [item more] (reverse-into more [item acc])
138+ (reverse-into xs ~)
tests/golden/prelude-list-helpers/tokens.txtnew file+839
@@ -0,0 +1,839 @@
1+2:1 glyph ++
2+2:4 name same
3+2:9 glyph |=
4+2:12 name x
5+2:13 tight glyph =
6+2:14 tight tvar A
7+2:16 name x
8+4:1 NEWLINE
9+4:1 glyph ++
10+4:4 name head
11+4:9 glyph |=
12+4:12 name p
13+4:13 tight glyph =
14+4:14 tight glyph [
15+4:15 tight tvar A
16+4:17 tvar B
17+4:18 tight glyph ]
18+5:3 INDENT
19+5:3 glyph ?-
20+5:6 name p
21+6:5 INDENT
22+6:5 glyph [
23+6:6 tight name a
24+6:8 name b
25+6:9 tight glyph ]
26+6:11 name a
27+8:1 DEDENT
28+8:1 DEDENT
29+8:1 NEWLINE
30+8:1 glyph ++
31+8:4 name tail
32+8:9 glyph |=
33+8:12 name p
34+8:13 tight glyph =
35+8:14 tight glyph [
36+8:15 tight tvar A
37+8:17 tvar B
38+8:18 tight glyph ]
39+9:3 INDENT
40+9:3 glyph ?-
41+9:6 name p
42+10:5 INDENT
43+10:5 glyph [
44+10:6 tight name a
45+10:8 name b
46+10:9 tight glyph ]
47+10:11 name b
48+12:1 DEDENT
49+12:1 DEDENT
50+12:1 NEWLINE
51+12:1 glyph ++
52+12:4 name not
53+12:8 glyph |=
54+12:11 name b
55+12:12 tight glyph =
56+12:13 tight glyph ?
57+13:3 INDENT
58+13:3 glyph ?-
59+13:6 name b
60+14:5 INDENT
61+14:5 lit %.y
62+14:9 lit %.n
63+15:5 NEWLINE
64+15:5 lit %.n
65+15:9 lit %.y
66+17:1 DEDENT
67+17:1 DEDENT
68+17:1 NEWLINE
69+17:1 glyph +$
70+17:4 name list
71+17:9 glyph |$
72+17:12 glyph [
73+17:13 tight tvar A
74+17:14 tight glyph ]
75+18:3 INDENT
76+18:3 lit ~
77+19:3 NEWLINE
78+19:3 glyph [
79+19:4 tight name i
80+19:5 tight glyph =
81+19:6 tight tvar A
82+19:8 name t
83+19:9 tight glyph =
84+19:10 tight glyph (
85+19:11 tight name list
86+19:16 tvar A
87+19:17 tight glyph )
88+19:18 tight glyph ]
89+21:1 DEDENT
90+21:1 NEWLINE
91+21:1 glyph +$
92+21:4 name unit
93+21:9 glyph |$
94+21:12 glyph [
95+21:13 tight tvar A
96+21:14 tight glyph ]
97+22:3 INDENT
98+22:3 lit ~
99+23:3 NEWLINE
100+23:3 glyph [
101+23:4 tight lit ~
102+23:6 name u
103+23:7 tight glyph =
104+23:8 tight tvar A
105+23:9 tight glyph ]
106+25:1 DEDENT
107+25:1 NEWLINE
108+25:1 glyph ++
109+25:4 name fall
110+25:9 glyph |=
111+25:12 name args
112+25:16 tight glyph =
113+25:17 tight glyph [
114+25:18 tight glyph (
115+25:19 tight name unit
116+25:24 tvar A
117+25:25 tight glyph )
118+25:27 tvar A
119+25:28 tight glyph ]
120+26:3 INDENT
121+26:3 glyph ?-
122+26:6 name args
123+27:5 INDENT
124+27:5 glyph [
125+27:6 tight name maybe
126+27:12 name fallback
127+27:20 tight glyph ]
128+28:7 INDENT
129+28:7 glyph ?-
130+28:10 name maybe
131+29:9 INDENT
132+29:9 lit ~
133+29:11 name fallback
134+30:9 NEWLINE
135+30:9 glyph [
136+30:10 tight lit ~
137+30:12 name value
138+30:17 tight glyph ]
139+30:19 name value
140+32:1 DEDENT
141+32:1 DEDENT
142+32:1 DEDENT
143+32:1 DEDENT
144+32:1 NEWLINE
145+32:1 glyph ++
146+32:4 name need
147+32:9 glyph |=
148+32:12 name maybe
149+32:17 tight glyph =
150+32:18 tight glyph (
151+32:19 tight name unit
152+32:24 tvar A
153+32:25 tight glyph )
154+33:3 INDENT
155+33:3 glyph ?-
156+33:6 name maybe
157+34:5 INDENT
158+34:5 lit ~
159+34:7 glyph !!
160+35:5 NEWLINE
161+35:5 glyph [
162+35:6 tight lit ~
163+35:8 name value
164+35:13 tight glyph ]
165+35:15 name value
166+37:1 DEDENT
167+37:1 DEDENT
168+37:1 NEWLINE
169+37:1 glyph ++
170+37:4 name weld
171+37:9 glyph |=
172+37:12 name args
173+37:16 tight glyph =
174+37:17 tight glyph [
175+37:18 tight glyph (
176+37:19 tight name list
177+37:24 tvar A
178+37:25 tight glyph )
179+37:27 glyph (
180+37:28 tight name list
181+37:33 tvar A
182+37:34 tight glyph )
183+37:35 tight glyph ]
184+38:3 INDENT
185+38:3 glyph ?-
186+38:6 name args
187+39:5 INDENT
188+39:5 glyph [
189+39:6 tight name xs
190+39:9 name ys
191+39:11 tight glyph ]
192+40:7 INDENT
193+40:7 glyph ?-
194+40:10 name xs
195+41:9 INDENT
196+41:9 lit ~
197+41:11 name ys
198+42:9 NEWLINE
199+42:9 glyph [
200+42:10 tight name item
201+42:15 name rest
202+42:19 tight glyph ]
203+42:21 glyph [
204+42:22 tight name item
205+42:27 glyph (
206+42:28 tight name weld
207+42:33 name rest
208+42:38 name ys
209+42:40 tight glyph )
210+42:41 tight glyph ]
211+44:1 DEDENT
212+44:1 DEDENT
213+44:1 DEDENT
214+44:1 DEDENT
215+44:1 NEWLINE
216+44:1 glyph ++
217+44:4 name turn
218+44:9 glyph |=
219+44:12 name args
220+44:16 tight glyph =
221+44:17 tight glyph [
222+44:18 tight glyph (
223+44:19 tight name list
224+44:24 tvar A
225+44:25 tight glyph )
226+44:27 glyph $-(
227+44:30 tight tvar A
228+44:32 tvar B
229+44:33 tight glyph )
230+44:34 tight glyph ]
231+45:3 INDENT
232+45:3 glyph ?-
233+45:6 name args
234+46:5 INDENT
235+46:5 glyph [
236+46:6 tight name xs
237+46:9 name f
238+46:10 tight glyph ]
239+47:7 INDENT
240+47:7 glyph ?-
241+47:10 name xs
242+48:9 INDENT
243+48:9 lit ~
244+48:11 lit ~
245+49:9 NEWLINE
246+49:9 glyph [
247+49:10 tight name item
248+49:15 name rest
249+49:19 tight glyph ]
250+49:21 glyph [
251+49:22 tight glyph (
252+49:23 tight name f
253+49:25 name item
254+49:29 tight glyph )
255+49:31 glyph (
256+49:32 tight name turn
257+49:37 name rest
258+49:42 name f
259+49:43 tight glyph )
260+49:44 tight glyph ]
261+51:1 DEDENT
262+51:1 DEDENT
263+51:1 DEDENT
264+51:1 DEDENT
265+51:1 NEWLINE
266+51:1 glyph +$
267+51:4 name dime
268+51:9 glyph [
269+51:10 tight name p
270+51:11 tight glyph =
271+51:12 tight aura @ta
272+51:16 name q
273+51:17 tight glyph =
274+51:18 tight aura @
275+51:19 tight glyph ]
276+53:1 NEWLINE
277+53:1 glyph +$
278+53:4 name hair
279+53:9 glyph [
280+53:10 tight name p
281+53:11 tight glyph =
282+53:12 tight aura @ud
283+53:16 name q
284+53:17 tight glyph =
285+53:18 tight aura @ud
286+53:21 tight glyph ]
287+55:1 NEWLINE
288+55:1 glyph +$
289+55:4 name pint
290+55:9 glyph [
291+55:10 tight name p
292+55:11 tight glyph =
293+55:12 tight glyph [
294+55:13 tight name p
295+55:14 tight glyph =
296+55:15 tight aura @
297+55:17 name q
298+55:18 tight glyph =
299+55:19 tight aura @
300+55:20 tight glyph ]
301+55:22 name q
302+55:23 tight glyph =
303+55:24 tight glyph [
304+55:25 tight name p
305+55:26 tight glyph =
306+55:27 tight aura @
307+55:29 name q
308+55:30 tight glyph =
309+55:31 tight aura @
310+55:32 tight glyph ]
311+55:33 tight glyph ]
312+57:1 NEWLINE
313+57:1 glyph +$
314+57:4 name coin
315+58:3 INDENT
316+58:3 glyph [
317+58:4 tight lit %$
318+58:7 name p
319+58:8 tight glyph =
320+58:9 tight name dime
321+58:13 tight glyph ]
322+59:3 NEWLINE
323+59:3 glyph [
324+59:4 tight lit %blob
325+59:10 name p
326+59:11 tight glyph =
327+59:12 tight glyph *
328+59:13 tight glyph ]
329+60:3 NEWLINE
330+60:3 glyph [
331+60:4 tight lit %many
332+60:10 name p
333+60:11 tight glyph =
334+60:12 tight glyph (
335+60:13 tight name list
336+60:18 name coin
337+60:22 tight glyph )
338+60:23 tight glyph ]
339+62:1 DEDENT
340+62:1 NEWLINE
341+62:1 glyph +$
342+62:4 name pair
343+62:9 glyph |$
344+62:12 glyph [
345+62:13 tight tvar A
346+62:15 tvar B
347+62:16 tight glyph ]
348+62:18 glyph [
349+62:19 tight name p
350+62:20 tight glyph =
351+62:21 tight tvar A
352+62:23 name q
353+62:24 tight glyph =
354+62:25 tight tvar B
355+62:26 tight glyph ]
356+64:1 NEWLINE
357+64:1 glyph +$
358+64:4 name trel
359+64:9 glyph |$
360+64:12 glyph [
361+64:13 tight tvar A
362+64:15 tvar B
363+64:17 tvar C
364+64:18 tight glyph ]
365+64:20 glyph [
366+64:21 tight name p
367+64:22 tight glyph =
368+64:23 tight tvar A
369+64:25 name q
370+64:26 tight glyph =
371+64:27 tight tvar B
372+64:29 name r
373+64:30 tight glyph =
374+64:31 tight tvar C
375+64:32 tight glyph ]
376+66:1 NEWLINE
377+66:1 glyph +$
378+66:4 name qual
379+66:9 glyph |$
380+66:12 glyph [
381+66:13 tight tvar A
382+66:15 tvar B
383+66:17 tvar C
384+66:19 tvar D
385+66:20 tight glyph ]
386+66:22 glyph [
387+66:23 tight name p
388+66:24 tight glyph =
389+66:25 tight tvar A
390+66:27 name q
391+66:28 tight glyph =
392+66:29 tight tvar B
393+66:31 name r
394+66:32 tight glyph =
395+66:33 tight tvar C
396+66:35 name s
397+66:36 tight glyph =
398+66:37 tight tvar D
399+66:38 tight glyph ]
400+68:1 NEWLINE
401+68:1 glyph +$
402+68:4 name cord
403+68:9 aura @t
404+70:1 NEWLINE
405+70:1 glyph +$
406+70:4 name knot
407+70:9 aura @ta
408+72:1 NEWLINE
409+72:1 glyph +$
410+72:4 name tape
411+72:9 glyph (
412+72:10 tight name list
413+72:15 aura @tD
414+72:18 tight glyph )
415+74:1 NEWLINE
416+74:1 glyph +$
417+74:4 name path
418+74:9 glyph (
419+74:10 tight name list
420+74:15 name knot
421+74:19 tight glyph )
422+76:1 NEWLINE
423+76:1 glyph +$
424+76:4 name tank
425+77:3 INDENT
426+77:3 name cord
427+78:3 NEWLINE
428+78:3 glyph [
429+78:4 tight lit %leaf
430+78:10 name p
431+78:11 tight glyph =
432+78:12 tight name tape
433+78:16 tight glyph ]
434+79:3 NEWLINE
435+79:3 glyph [
436+79:4 tight lit %palm
437+79:10 name p
438+79:11 tight glyph =
439+79:12 tight glyph (
440+79:13 tight name qual
441+79:18 name tape
442+79:23 name tape
443+79:28 name tape
444+79:33 name tape
445+79:37 tight glyph )
446+79:39 name q
447+79:40 tight glyph =
448+79:41 tight glyph (
449+79:42 tight name list
450+79:47 name tank
451+79:51 tight glyph )
452+79:52 tight glyph ]
453+80:3 NEWLINE
454+80:3 glyph [
455+80:4 tight lit %rose
456+80:10 name p
457+80:11 tight glyph =
458+80:12 tight glyph (
459+80:13 tight name trel
460+80:18 name tape
461+80:23 name tape
462+80:28 name tape
463+80:32 tight glyph )
464+80:34 name q
465+80:35 tight glyph =
466+80:36 tight glyph (
467+80:37 tight name list
468+80:42 name tank
469+80:46 tight glyph )
470+80:47 tight glyph ]
471+82:1 DEDENT
472+82:1 NEWLINE
473+82:1 glyph +$
474+82:4 name nail
475+82:9 glyph [
476+82:10 tight name p
477+82:11 tight glyph =
478+82:12 tight name hair
479+82:17 name q
480+82:18 tight glyph =
481+82:19 tight name tape
482+82:23 tight glyph ]
483+84:1 NEWLINE
484+84:1 glyph +$
485+84:4 name edge
486+84:9 glyph [
487+84:10 tight name p
488+84:11 tight glyph =
489+84:12 tight name hair
490+84:17 name q
491+84:18 tight glyph =
492+84:19 tight glyph (
493+84:20 tight name unit
494+84:25 glyph [
495+84:26 tight name p
496+84:27 tight glyph =
497+84:28 tight glyph *
498+84:30 name q
499+84:31 tight glyph =
500+84:32 tight name nail
501+84:36 tight glyph ]
502+84:37 tight glyph )
503+84:38 tight glyph ]
504+86:1 NEWLINE
505+86:1 glyph +$
506+86:4 name rule
507+86:9 glyph $-(
508+86:12 tight name nail
509+86:17 name edge
510+86:21 tight glyph )
511+88:1 NEWLINE
512+88:1 glyph +$
513+88:4 name spot
514+88:9 glyph [
515+88:10 tight name p
516+88:11 tight glyph =
517+88:12 tight name path
518+88:17 name q
519+88:18 tight glyph =
520+88:19 tight name pint
521+88:23 tight glyph ]
522+90:1 NEWLINE
523+90:1 glyph +$
524+90:4 name toon
525+91:3 INDENT
526+91:3 glyph [
527+91:4 tight lit %0
528+91:7 name p
529+91:8 tight glyph =
530+91:9 tight glyph *
531+91:10 tight glyph ]
532+92:3 NEWLINE
533+92:3 glyph [
534+92:4 tight lit %1
535+92:7 name p
536+92:8 tight glyph =
537+92:9 tight glyph *
538+92:10 tight glyph ]
539+93:3 NEWLINE
540+93:3 glyph [
541+93:4 tight lit %2
542+93:7 name p
543+93:8 tight glyph =
544+93:9 tight glyph (
545+93:10 tight name list
546+93:15 name tank
547+93:19 tight glyph )
548+93:20 tight glyph ]
549+95:1 DEDENT
550+95:1 NEWLINE
551+95:1 glyph +$
552+95:4 name like
553+95:9 glyph |$
554+95:12 glyph [
555+95:13 tight tvar A
556+95:14 tight glyph ]
557+95:16 glyph [
558+95:17 tight name p
559+95:18 tight glyph =
560+95:19 tight name hair
561+95:24 name q
562+95:25 tight glyph =
563+95:26 tight glyph (
564+95:27 tight name unit
565+95:32 glyph [
566+95:33 tight name p
567+95:34 tight glyph =
568+95:35 tight tvar A
569+95:37 name q
570+95:38 tight glyph =
571+95:39 tight name nail
572+95:43 tight glyph ]
573+95:44 tight glyph )
574+95:45 tight glyph ]
575+97:1 NEWLINE
576+97:1 glyph ++
577+97:4 name wonk
578+97:9 glyph |=
579+97:12 name veq
580+97:15 tight glyph =
581+97:16 tight glyph (
582+97:17 tight name like
583+97:22 tvar A
584+97:23 tight glyph )
585+98:3 INDENT
586+98:3 glyph ?-
587+98:6 wing q.veq
588+99:5 INDENT
589+99:5 lit ~
590+99:7 glyph !!
591+100:5 NEWLINE
592+100:5 glyph [
593+100:6 tight lit ~
594+100:8 name product
595+100:15 tight glyph ]
596+100:17 wing p.product
597+102:1 DEDENT
598+102:1 DEDENT
599+102:1 NEWLINE
600+102:1 glyph +$
601+102:4 name lone
602+102:9 glyph |$
603+102:12 glyph [
604+102:13 tight tvar A
605+102:14 tight glyph ]
606+102:16 glyph [
607+102:17 tight name p
608+102:18 tight glyph =
609+102:19 tight tvar A
610+102:20 tight glyph ]
611+104:1 NEWLINE
612+104:1 glyph +$
613+104:4 name lest
614+104:9 glyph |$
615+104:12 glyph [
616+104:13 tight tvar A
617+104:14 tight glyph ]
618+104:16 glyph [
619+104:17 tight name i
620+104:18 tight glyph =
621+104:19 tight tvar A
622+104:21 name t
623+104:22 tight glyph =
624+104:23 tight glyph (
625+104:24 tight name list
626+104:29 tvar A
627+104:30 tight glyph )
628+104:31 tight glyph ]
629+106:1 NEWLINE
630+106:1 glyph +$
631+106:4 name pole
632+106:9 glyph |$
633+106:12 glyph [
634+106:13 tight tvar A
635+106:14 tight glyph ]
636+107:3 INDENT
637+107:3 lit ~
638+108:3 NEWLINE
639+108:3 glyph [
640+108:4 tight tvar A
641+108:6 glyph (
642+108:7 tight name pole
643+108:12 tvar A
644+108:13 tight glyph )
645+108:14 tight glyph ]
646+110:1 DEDENT
647+110:1 NEWLINE
648+110:1 glyph +$
649+110:4 name quip
650+110:9 glyph |$
651+110:12 glyph [
652+110:13 tight tvar A
653+110:15 tvar B
654+110:16 tight glyph ]
655+110:18 glyph [
656+110:19 tight glyph (
657+110:20 tight name list
658+110:25 tvar A
659+110:26 tight glyph )
660+110:28 tvar B
661+110:29 tight glyph ]
662+112:1 NEWLINE
663+112:1 glyph +$
664+112:4 name tree
665+112:9 glyph |$
666+112:12 glyph [
667+112:13 tight tvar A
668+112:14 tight glyph ]
669+113:3 INDENT
670+113:3 lit ~
671+114:3 NEWLINE
672+114:3 glyph [
673+114:4 tight name n
674+114:5 tight glyph =
675+114:6 tight tvar A
676+114:8 name l
677+114:9 tight glyph =
678+114:10 tight glyph (
679+114:11 tight name tree
680+114:16 tvar A
681+114:17 tight glyph )
682+114:19 name r
683+114:20 tight glyph =
684+114:21 tight glyph (
685+114:22 tight name tree
686+114:27 tvar A
687+114:28 tight glyph )
688+114:29 tight glyph ]
689+116:1 DEDENT
690+116:1 NEWLINE
691+116:1 glyph +$
692+116:4 name each
693+116:9 glyph |$
694+116:12 glyph [
695+116:13 tight tvar A
696+116:15 tvar B
697+116:16 tight glyph ]
698+117:3 INDENT
699+117:3 glyph [
700+117:4 tight lit %|
701+117:7 name p
702+117:8 tight glyph =
703+117:9 tight tvar B
704+117:10 tight glyph ]
705+118:3 NEWLINE
706+118:3 glyph [
707+118:4 tight lit %&
708+118:7 name p
709+118:8 tight glyph =
710+118:9 tight tvar A
711+118:10 tight glyph ]
712+120:1 DEDENT
713+120:1 NEWLINE
714+120:1 glyph +$
715+120:4 name bloq
716+120:9 aura @
717+122:1 NEWLINE
718+122:1 glyph ++
719+122:4 name some
720+122:9 glyph |=
721+122:12 name item
722+122:16 tight glyph =
723+122:17 tight tvar A
724+122:19 glyph `
725+122:20 tight name item
726+124:1 NEWLINE
727+124:1 glyph ++
728+124:4 name lure
729+124:9 glyph |=
730+124:12 name item
731+124:16 tight glyph =
732+124:17 tight tvar A
733+125:3 INDENT
734+125:3 glyph ^-
735+125:6 glyph (
736+125:7 tight name list
737+125:12 tvar A
738+125:13 tight glyph )
739+125:15 glyph [
740+125:16 tight name item
741+125:21 lit ~
742+125:22 tight glyph ]
743+127:1 DEDENT
744+127:1 NEWLINE
745+127:1 glyph ++
746+127:4 name snoc
747+127:9 glyph |=
748+127:12 name args
749+127:16 tight glyph =
750+127:17 tight glyph [
751+127:18 tight glyph (
752+127:19 tight name list
753+127:24 tvar A
754+127:25 tight glyph )
755+127:27 tvar A
756+127:28 tight glyph ]
757+128:3 INDENT
758+128:3 glyph ?-
759+128:6 name args
760+129:5 INDENT
761+129:5 glyph [
762+129:6 tight name xs
763+129:9 name item
764+129:13 tight glyph ]
765+129:15 glyph (
766+129:16 tight name weld
767+129:21 name xs
768+129:24 glyph [
769+129:25 tight name item
770+129:30 lit ~
771+129:31 tight glyph ]
772+129:32 tight glyph )
773+131:1 DEDENT
774+131:1 DEDENT
775+131:1 NEWLINE
776+131:1 glyph ++
777+131:4 name flop
778+131:9 glyph |=
779+131:12 name xs
780+131:14 tight glyph =
781+131:15 tight glyph (
782+131:16 tight name list
783+131:21 tvar A
784+131:22 tight glyph )
785+132:3 INDENT
786+132:3 glyph ++
787+132:6 name reverse-into
788+132:19 glyph |=
789+132:22 name args
790+132:26 tight glyph =
791+132:27 tight glyph [
792+132:28 tight glyph (
793+132:29 tight name list
794+132:34 tvar A
795+132:35 tight glyph )
796+132:37 glyph (
797+132:38 tight name list
798+132:43 tvar A
799+132:44 tight glyph )
800+132:45 tight glyph ]
801+133:5 INDENT
802+133:5 glyph ?-
803+133:8 name args
804+134:7 INDENT
805+134:7 glyph [
806+134:8 tight name rest
807+134:13 name acc
808+134:16 tight glyph ]
809+135:9 INDENT
810+135:9 glyph ?-
811+135:12 name rest
812+136:11 INDENT
813+136:11 lit ~
814+136:13 name acc
815+137:11 NEWLINE
816+137:11 glyph [
817+137:12 tight name item
818+137:17 name more
819+137:21 tight glyph ]
820+137:23 glyph (
821+137:24 tight name reverse-into
822+137:37 name more
823+137:42 glyph [
824+137:43 tight name item
825+137:48 name acc
826+137:51 tight glyph ]
827+137:52 tight glyph )
828+138:3 DEDENT
829+138:3 DEDENT
830+138:3 DEDENT
831+138:3 DEDENT
832+138:3 NEWLINE
833+138:3 glyph (
834+138:4 tight name reverse-into
835+138:17 name xs
836+138:20 lit ~
837+138:21 tight glyph )
838+138:22 DEDENT
839+138:22 NEWLINE
tests/golden/prelude-list-helpers/tree.txtnew file+340
@@ -0,0 +1,340 @@
1+(module
2+ (value 2:1 same
3+ (gate 2:9
4+ (face 2:12 x (tvar 2:14 A))
5+ (wing 2:16 x)))
6+ (value 4:1 head
7+ (gate 4:9
8+ (face 4:12 p
9+ (cell 4:14 (tvar 4:15 A) (tvar 4:17 B)))
10+ (body 5:3
11+ (branch 5:3
12+ (wing 5:6 p)
13+ (arm 6:5
14+ (cell 6:5 (bind 6:6 a) (bind 6:8 b))
15+ (wing 6:11 a))))))
16+ (value 8:1 tail
17+ (gate 8:9
18+ (face 8:12 p
19+ (cell 8:14 (tvar 8:15 A) (tvar 8:17 B)))
20+ (body 9:3
21+ (branch 9:3
22+ (wing 9:6 p)
23+ (arm 10:5
24+ (cell 10:5 (bind 10:6 a) (bind 10:8 b))
25+ (wing 10:11 b))))))
26+ (value 12:1 not
27+ (gate 12:8
28+ (face 12:11 b (flag 12:13))
29+ (body 13:3
30+ (branch 13:3
31+ (wing 13:6 b)
32+ (arm 14:5 (lit 14:5 %.y) (lit 14:9 %.n))
33+ (arm 15:5 (lit 15:5 %.n) (lit 15:9 %.y))))))
34+ (mold 17:1 list
35+ (generic 17:9 A
36+ (union 18:3
37+ (const 18:3 ~)
38+ (cell 19:3
39+ (face 19:4 i (tvar 19:6 A))
40+ (face 19:8 t
41+ (apply 19:10 list (tvar 19:16 A)))))))
42+ (mold 21:1 unit
43+ (generic 21:9 A
44+ (union 22:3
45+ (const 22:3 ~)
46+ (cell 23:3
47+ (const 23:4 ~)
48+ (face 23:6 u (tvar 23:8 A))))))
49+ (value 25:1 fall
50+ (gate 25:9
51+ (face 25:12 args
52+ (cell 25:17
53+ (apply 25:18 unit (tvar 25:24 A))
54+ (tvar 25:27 A)))
55+ (body 26:3
56+ (branch 26:3
57+ (wing 26:6 args)
58+ (arm 27:5
59+ (cell 27:5 (bind 27:6 maybe) (bind 27:12 fallback))
60+ (body 28:7
61+ (branch 28:7
62+ (wing 28:10 maybe)
63+ (arm 29:9 (lit 29:9 ~) (wing 29:11 fallback))
64+ (arm 30:9
65+ (cell 30:9 (lit 30:10 ~) (bind 30:12 value))
66+ (wing 30:19 value)))))))))
67+ (value 32:1 need
68+ (gate 32:9
69+ (face 32:12 maybe
70+ (apply 32:18 unit (tvar 32:24 A)))
71+ (body 33:3
72+ (branch 33:3
73+ (wing 33:6 maybe)
74+ (arm 34:5 (lit 34:5 ~) (crash 34:7))
75+ (arm 35:5
76+ (cell 35:5 (lit 35:6 ~) (bind 35:8 value))
77+ (wing 35:15 value))))))
78+ (value 37:1 weld
79+ (gate 37:9
80+ (face 37:12 args
81+ (cell 37:17
82+ (apply 37:18 list (tvar 37:24 A))
83+ (apply 37:27 list (tvar 37:33 A))))
84+ (body 38:3
85+ (branch 38:3
86+ (wing 38:6 args)
87+ (arm 39:5
88+ (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
89+ (body 40:7
90+ (branch 40:7
91+ (wing 40:10 xs)
92+ (arm 41:9 (lit 41:9 ~) (wing 41:11 ys))
93+ (arm 42:9
94+ (cell 42:9 (bind 42:10 item) (bind 42:15 rest))
95+ (tuple 42:21
96+ (wing 42:22 item)
97+ (group 42:27
98+ (call 42:28 (wing 42:28 weld) (wing 42:33 rest) (wing 42:38 ys))))))))))))
99+ (value 44:1 turn
100+ (gate 44:9
101+ (face 44:12 args
102+ (cell 44:17
103+ (apply 44:18 list (tvar 44:24 A))
104+ (fn 44:27 (tvar 44:30 A) (tvar 44:32 B))))
105+ (body 45:3
106+ (branch 45:3
107+ (wing 45:6 args)
108+ (arm 46:5
109+ (cell 46:5 (bind 46:6 xs) (bind 46:9 f))
110+ (body 47:7
111+ (branch 47:7
112+ (wing 47:10 xs)
113+ (arm 48:9 (lit 48:9 ~) (lit 48:11 ~))
114+ (arm 49:9
115+ (cell 49:9 (bind 49:10 item) (bind 49:15 rest))
116+ (tuple 49:21
117+ (group 49:22
118+ (call 49:23 (wing 49:23 f) (wing 49:25 item)))
119+ (group 49:31
120+ (call 49:32 (wing 49:32 turn) (wing 49:37 rest) (wing 49:42 f))))))))))))
121+ (mold 51:1 dime
122+ (cell 51:9
123+ (face 51:10 p (aura 51:12 @ta))
124+ (face 51:16 q (aura 51:18 @))))
125+ (mold 53:1 hair
126+ (cell 53:9
127+ (face 53:10 p (aura 53:12 @ud))
128+ (face 53:16 q (aura 53:18 @ud))))
129+ (mold 55:1 pint
130+ (cell 55:9
131+ (face 55:10 p
132+ (cell 55:12
133+ (face 55:13 p (aura 55:15 @))
134+ (face 55:17 q (aura 55:19 @))))
135+ (face 55:22 q
136+ (cell 55:24
137+ (face 55:25 p (aura 55:27 @))
138+ (face 55:29 q (aura 55:31 @))))))
139+ (mold 57:1 coin
140+ (union 58:3
141+ (cell 58:3
142+ (const 58:4 %$)
143+ (face 58:7 p (ref 58:9 dime)))
144+ (cell 59:3
145+ (const 59:4 %blob)
146+ (face 59:10 p (noun 59:12)))
147+ (cell 60:3
148+ (const 60:4 %many)
149+ (face 60:10 p
150+ (apply 60:12 list (ref 60:18 coin))))))
151+ (mold 62:1 pair
152+ (generic 62:9 A B
153+ (cell 62:18
154+ (face 62:19 p (tvar 62:21 A))
155+ (face 62:23 q (tvar 62:25 B)))))
156+ (mold 64:1 trel
157+ (generic 64:9 A B C
158+ (cell 64:20
159+ (face 64:21 p (tvar 64:23 A))
160+ (face 64:25 q (tvar 64:27 B))
161+ (face 64:29 r (tvar 64:31 C)))))
162+ (mold 66:1 qual
163+ (generic 66:9 A B C D
164+ (cell 66:22
165+ (face 66:23 p (tvar 66:25 A))
166+ (face 66:27 q (tvar 66:29 B))
167+ (face 66:31 r (tvar 66:33 C))
168+ (face 66:35 s (tvar 66:37 D)))))
169+ (mold 68:1 cord (aura 68:9 @t))
170+ (mold 70:1 knot (aura 70:9 @ta))
171+ (mold 72:1 tape
172+ (apply 72:9 list (aura 72:15 @tD)))
173+ (mold 74:1 path
174+ (apply 74:9 list (ref 74:15 knot)))
175+ (mold 76:1 tank
176+ (union 77:3
177+ (ref 77:3 cord)
178+ (cell 78:3
179+ (const 78:4 %leaf)
180+ (face 78:10 p (ref 78:12 tape)))
181+ (cell 79:3
182+ (const 79:4 %palm)
183+ (face 79:10 p
184+ (apply 79:12 qual (ref 79:18 tape) (ref 79:23 tape) (ref 79:28 tape) (ref 79:33 tape)))
185+ (face 79:39 q
186+ (apply 79:41 list (ref 79:47 tank))))
187+ (cell 80:3
188+ (const 80:4 %rose)
189+ (face 80:10 p
190+ (apply 80:12 trel (ref 80:18 tape) (ref 80:23 tape) (ref 80:28 tape)))
191+ (face 80:34 q
192+ (apply 80:36 list (ref 80:42 tank))))))
193+ (mold 82:1 nail
194+ (cell 82:9
195+ (face 82:10 p (ref 82:12 hair))
196+ (face 82:17 q (ref 82:19 tape))))
197+ (mold 84:1 edge
198+ (cell 84:9
199+ (face 84:10 p (ref 84:12 hair))
200+ (face 84:17 q
201+ (apply 84:19 unit
202+ (cell 84:25
203+ (face 84:26 p (noun 84:28))
204+ (face 84:30 q (ref 84:32 nail)))))))
205+ (mold 86:1 rule
206+ (fn 86:9 (ref 86:12 nail) (ref 86:17 edge)))
207+ (mold 88:1 spot
208+ (cell 88:9
209+ (face 88:10 p (ref 88:12 path))
210+ (face 88:17 q (ref 88:19 pint))))
211+ (mold 90:1 toon
212+ (union 91:3
213+ (cell 91:3
214+ (const 91:4 %0)
215+ (face 91:7 p (noun 91:9)))
216+ (cell 92:3
217+ (const 92:4 %1)
218+ (face 92:7 p (noun 92:9)))
219+ (cell 93:3
220+ (const 93:4 %2)
221+ (face 93:7 p
222+ (apply 93:9 list (ref 93:15 tank))))))
223+ (mold 95:1 like
224+ (generic 95:9 A
225+ (cell 95:16
226+ (face 95:17 p (ref 95:19 hair))
227+ (face 95:24 q
228+ (apply 95:26 unit
229+ (cell 95:32
230+ (face 95:33 p (tvar 95:35 A))
231+ (face 95:37 q (ref 95:39 nail))))))))
232+ (value 97:1 wonk
233+ (gate 97:9
234+ (face 97:12 veq
235+ (apply 97:16 like (tvar 97:22 A)))
236+ (body 98:3
237+ (branch 98:3
238+ (wing 98:6 q.veq)
239+ (arm 99:5 (lit 99:5 ~) (crash 99:7))
240+ (arm 100:5
241+ (cell 100:5 (lit 100:6 ~) (bind 100:8 product))
242+ (wing 100:17 p.product))))))
243+ (mold 102:1 lone
244+ (generic 102:9 A
245+ (cell 102:16
246+ (face 102:17 p (tvar 102:19 A)))))
247+ (mold 104:1 lest
248+ (generic 104:9 A
249+ (cell 104:16
250+ (face 104:17 i (tvar 104:19 A))
251+ (face 104:21 t
252+ (apply 104:23 list (tvar 104:29 A))))))
253+ (mold 106:1 pole
254+ (generic 106:9 A
255+ (union 107:3
256+ (const 107:3 ~)
257+ (cell 108:3
258+ (tvar 108:4 A)
259+ (apply 108:6 pole (tvar 108:12 A))))))
260+ (mold 110:1 quip
261+ (generic 110:9 A B
262+ (cell 110:18
263+ (apply 110:19 list (tvar 110:25 A))
264+ (tvar 110:28 B))))
265+ (mold 112:1 tree
266+ (generic 112:9 A
267+ (union 113:3
268+ (const 113:3 ~)
269+ (cell 114:3
270+ (face 114:4 n (tvar 114:6 A))
271+ (face 114:8 l
272+ (apply 114:10 tree (tvar 114:16 A)))
273+ (face 114:19 r
274+ (apply 114:21 tree (tvar 114:27 A)))))))
275+ (mold 116:1 each
276+ (generic 116:9 A B
277+ (union 117:3
278+ (cell 117:3
279+ (const 117:4 %|)
280+ (face 117:7 p (tvar 117:9 B)))
281+ (cell 118:3
282+ (const 118:4 %&)
283+ (face 118:7 p (tvar 118:9 A))))))
284+ (mold 120:1 bloq (aura 120:9 @))
285+ (value 122:1 some
286+ (gate 122:9
287+ (face 122:12 item (tvar 122:17 A))
288+ (unit 122:19 (wing 122:20 item))))
289+ (value 124:1 lure
290+ (gate 124:9
291+ (face 124:12 item (tvar 124:17 A))
292+ (body 125:3
293+ (cast 125:3
294+ (apply 125:6 list (tvar 125:12 A))
295+ (tuple 125:15 (wing 125:16 item) (lit 125:21 ~))))))
296+ (value 127:1 snoc
297+ (gate 127:9
298+ (face 127:12 args
299+ (cell 127:17
300+ (apply 127:18 list (tvar 127:24 A))
301+ (tvar 127:27 A)))
302+ (body 128:3
303+ (branch 128:3
304+ (wing 128:6 args)
305+ (arm 129:5
306+ (cell 129:5 (bind 129:6 xs) (bind 129:9 item))
307+ (group 129:15
308+ (call 129:16
309+ (wing 129:16 weld)
310+ (wing 129:21 xs)
311+ (tuple 129:24 (wing 129:25 item) (lit 129:30 ~)))))))))
312+ (value 131:1 flop
313+ (gate 131:9
314+ (face 131:12 xs
315+ (apply 131:15 list (tvar 131:21 A)))
316+ (body 132:3
317+ (value 132:3 reverse-into
318+ (gate 132:19
319+ (face 132:22 args
320+ (cell 132:27
321+ (apply 132:28 list (tvar 132:34 A))
322+ (apply 132:37 list (tvar 132:43 A))))
323+ (body 133:5
324+ (branch 133:5
325+ (wing 133:8 args)
326+ (arm 134:7
327+ (cell 134:7 (bind 134:8 rest) (bind 134:13 acc))
328+ (body 135:9
329+ (branch 135:9
330+ (wing 135:12 rest)
331+ (arm 136:11 (lit 136:11 ~) (wing 136:13 acc))
332+ (arm 137:11
333+ (cell 137:11 (bind 137:12 item) (bind 137:17 more))
334+ (group 137:23
335+ (call 137:24
336+ (wing 137:24 reverse-into)
337+ (wing 137:37 more)
338+ (tuple 137:42 (wing 137:43 item) (wing 137:48 acc))))))))))))
339+ (group 138:3
340+ (call 138:4 (wing 138:4 reverse-into) (wing 138:17 xs) (lit 138:20 ~)))))))
tests/golden/prelude-list-helpers/types.txtnew file+41
@@ -0,0 +1,41 @@
1+partial inference; module not checked
2+++ same: $-(A A)
3+++ head: $-([A B] A)
4+++ tail: $-([A B] B)
5+++ not: $-(? ?)
6++$ list: cases proven disjoint; mold not checked
7++$ unit: cases proven disjoint; mold not checked
8+++ fall: sample mold is not supported by partial inference
9+++ need: sample mold is not supported by partial inference
10+++ weld: sample mold is not supported by partial inference
11+++ turn: sample mold is not supported by partial inference
12++$ dime: not checked
13++$ hair: not checked
14++$ pint: not checked
15++$ coin: cases proven disjoint; mold not checked
16++$ pair: not checked
17++$ trel: not checked
18++$ qual: not checked
19++$ cord: not checked
20++$ knot: not checked
21++$ tape: not checked
22++$ path: not checked
23++$ tank: cases proven disjoint; mold not checked
24++$ nail: not checked
25++$ edge: not checked
26++$ rule: not checked
27++$ spot: not checked
28++$ toon: cases proven disjoint; mold not checked
29++$ like: not checked
30+++ wonk: sample mold is not supported by partial inference
31++$ lone: not checked
32++$ lest: not checked
33++$ pole: cases proven disjoint; mold not checked
34++$ quip: not checked
35++$ tree: cases proven disjoint; mold not checked
36++$ each: cases proven disjoint; mold not checked
37++$ bloq: not checked
38+++ some: expression is not supported by partial inference
39+++ lure: cast mold is not supported by partial inference
40+++ snoc: sample mold is not supported by partial inference
41+++ flop: sample mold is not supported by partial inference
tests/golden/types-partial-atom-constraint/types.txt+18
@@ -4,6 +4,24 @@ partial inference; module not checked
4++ cord: @t
4++ cord: @t
5++ flag: ?
5++ flag: ?
6++ bad: call's sample and argument types do not unify
6++ bad: call's sample and argument types do not unify
7+/tests/golden/types-partial-atom-constraint/source.jibb:7:9: called gate has type $-(A A) where A is an atom
8+++ bad (keep [~zod "hi"])
9+ ^
10+/tests/golden/types-partial-atom-constraint/source.jibb:7:14: argument has type [@p @t]
11+++ bad (keep [~zod "hi"])
12+ ^
7++ first: $-([A A] A) where A is an atom
13++ first: $-([A A] A) where A is an atom
8++ decimal: cast mold and expression type do not unify
14++ decimal: cast mold and expression type do not unify
15+/tests/golden/types-partial-atom-constraint/source.jibb:13:15: cast mold has type ?
16+++ decimal ^- ? 1
17+ ^
18+/tests/golden/types-partial-atom-constraint/source.jibb:13:17: expression
19+++ decimal ^- ? 1
20+ ^
9++ relay: cast mold and expression type do not unify
21++ relay: cast mold and expression type do not unify
22+/tests/golden/types-partial-atom-constraint/source.jibb:14:13: cast mold has type ?
23+++ relay ^- ? (keep 7)
24+ ^
25+/tests/golden/types-partial-atom-constraint/source.jibb:14:15: expression
26+++ relay ^- ? (keep 7)
27+ ^
tests/golden/types-partial-atom-widening/types.txt+6
@@ -4,6 +4,12 @@ partial inference; module not checked
4++ widen: @
4++ widen: @
5++ flag: @
5++ flag: @
6++ narrow: cast mold and expression type do not unify
6++ narrow: cast mold and expression type do not unify
7+/tests/golden/types-partial-atom-widening/source.jibb:5:21: cast mold has type @ud
8+++ narrow |= x=@ ^- @ud x
9+ ^
10+/tests/golden/types-partial-atom-widening/source.jibb:5:25: expression has type @
11+++ narrow |= x=@ ^- @ud x
12+ ^
7++ constrained: $-(A @) where A is an atom
13++ constrained: $-(A @) where A is an atom
8++ nested: call constraint is not supported by partial inference
14++ nested: call constraint is not supported by partial inference
9+$ open: not checked
15+$ open: not checked
tests/golden/types-partial-aura-family/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: a Hoon subaura fits its parent aura; the reverse needs a check, and unrelated specific auras stay distinct.
2+tests: unsigned and text subauras widen toward their parents, narrowing and sibling casts fail with both sites, and a generic join that needs a common-type rule remains unsupported.
3+expect: parses
4+expect-types: a partial inference report, not a checked module
tests/golden/types-partial-aura-family/source.jibbnew file+10
@@ -0,0 +1,10 @@
1+++ decimal |= x=@ud ^- @u x
2+++ hex ^- @u 0x1f
3+++ base32 |= x=@uv ^- @u x
4+++ text |= x=@tD ^- @t x
5+++ narrow |= x=@t ^- @tD x
6+++ siblings |= x=@ux ^- @ud x
7+++ dup |= p=[A A] p
8+++ join |= x=@u (dup [0x1f x])
9+++ accept |= n=@u n
10+++ via-call |= x=@ud (accept x)
tests/golden/types-partial-aura-family/tokens.txtnew file+100
@@ -0,0 +1,100 @@
1+1:1 glyph ++
2+1:4 name decimal
3+1:12 glyph |=
4+1:15 name x
5+1:16 tight glyph =
6+1:17 tight aura @ud
7+1:21 glyph ^-
8+1:24 aura @u
9+1:27 name x
10+2:1 NEWLINE
11+2:1 glyph ++
12+2:4 name hex
13+2:8 glyph ^-
14+2:11 aura @u
15+2:14 lit 0x1f
16+3:1 NEWLINE
17+3:1 glyph ++
18+3:4 name base32
19+3:11 glyph |=
20+3:14 name x
21+3:15 tight glyph =
22+3:16 tight aura @uv
23+3:20 glyph ^-
24+3:23 aura @u
25+3:26 name x
26+4:1 NEWLINE
27+4:1 glyph ++
28+4:4 name text
29+4:9 glyph |=
30+4:12 name x
31+4:13 tight glyph =
32+4:14 tight aura @tD
33+4:18 glyph ^-
34+4:21 aura @t
35+4:24 name x
36+5:1 NEWLINE
37+5:1 glyph ++
38+5:4 name narrow
39+5:11 glyph |=
40+5:14 name x
41+5:15 tight glyph =
42+5:16 tight aura @t
43+5:19 glyph ^-
44+5:22 aura @tD
45+5:26 name x
46+6:1 NEWLINE
47+6:1 glyph ++
48+6:4 name siblings
49+6:13 glyph |=
50+6:16 name x
51+6:17 tight glyph =
52+6:18 tight aura @ux
53+6:22 glyph ^-
54+6:25 aura @ud
55+6:29 name x
56+7:1 NEWLINE
57+7:1 glyph ++
58+7:4 name dup
59+7:8 glyph |=
60+7:11 name p
61+7:12 tight glyph =
62+7:13 tight glyph [
63+7:14 tight tvar A
64+7:16 tvar A
65+7:17 tight glyph ]
66+7:19 name p
67+8:1 NEWLINE
68+8:1 glyph ++
69+8:4 name join
70+8:9 glyph |=
71+8:12 name x
72+8:13 tight glyph =
73+8:14 tight aura @u
74+8:17 glyph (
75+8:18 tight name dup
76+8:22 glyph [
77+8:23 tight lit 0x1f
78+8:28 name x
79+8:29 tight glyph ]
80+8:30 tight glyph )
81+9:1 NEWLINE
82+9:1 glyph ++
83+9:4 name accept
84+9:11 glyph |=
85+9:14 name n
86+9:15 tight glyph =
87+9:16 tight aura @u
88+9:19 name n
89+10:1 NEWLINE
90+10:1 glyph ++
91+10:4 name via-call
92+10:13 glyph |=
93+10:16 name x
94+10:17 tight glyph =
95+10:18 tight aura @ud
96+10:22 glyph (
97+10:23 tight name accept
98+10:30 name x
99+10:31 tight glyph )
100+10:32 NEWLINE
tests/golden/types-partial-aura-family/tree.txtnew file+44
@@ -0,0 +1,44 @@
1+(module
2+ (value 1:1 decimal
3+ (gate 1:12
4+ (face 1:15 x (aura 1:17 @ud))
5+ (cast 1:21 (aura 1:24 @u) (wing 1:27 x))))
6+ (value 2:1 hex
7+ (cast 2:8 (aura 2:11 @u) (lit 2:14 0x1f)))
8+ (value 3:1 base32
9+ (gate 3:11
10+ (face 3:14 x (aura 3:16 @uv))
11+ (cast 3:20 (aura 3:23 @u) (wing 3:26 x))))
12+ (value 4:1 text
13+ (gate 4:9
14+ (face 4:12 x (aura 4:14 @tD))
15+ (cast 4:18 (aura 4:21 @t) (wing 4:24 x))))
16+ (value 5:1 narrow
17+ (gate 5:11
18+ (face 5:14 x (aura 5:16 @t))
19+ (cast 5:19 (aura 5:22 @tD) (wing 5:26 x))))
20+ (value 6:1 siblings
21+ (gate 6:13
22+ (face 6:16 x (aura 6:18 @ux))
23+ (cast 6:22 (aura 6:25 @ud) (wing 6:29 x))))
24+ (value 7:1 dup
25+ (gate 7:8
26+ (face 7:11 p
27+ (cell 7:13 (tvar 7:14 A) (tvar 7:16 A)))
28+ (wing 7:19 p)))
29+ (value 8:1 join
30+ (gate 8:9
31+ (face 8:12 x (aura 8:14 @u))
32+ (group 8:17
33+ (call 8:18
34+ (wing 8:18 dup)
35+ (tuple 8:22 (lit 8:23 0x1f) (wing 8:28 x))))))
36+ (value 9:1 accept
37+ (gate 9:11
38+ (face 9:14 n (aura 9:16 @u))
39+ (wing 9:19 n)))
40+ (value 10:1 via-call
41+ (gate 10:13
42+ (face 10:16 x (aura 10:18 @ud))
43+ (group 10:22
44+ (call 10:23 (wing 10:23 accept) (wing 10:30 x))))))
tests/golden/types-partial-aura-family/types.txtnew file+23
@@ -0,0 +1,23 @@
1+partial inference; module not checked
2+++ decimal: $-(@ud @u)
3+++ hex: @u
4+++ base32: $-(@uv @u)
5+++ text: $-(@tD @t)
6+++ narrow: cast mold and expression type do not unify
7+/tests/golden/types-partial-aura-family/source.jibb:5:22: cast mold has type @tD
8+++ narrow |= x=@t ^- @tD x
9+ ^
10+/tests/golden/types-partial-aura-family/source.jibb:5:26: expression has type @t
11+++ narrow |= x=@t ^- @tD x
12+ ^
13+++ siblings: cast mold and expression type do not unify
14+/tests/golden/types-partial-aura-family/source.jibb:6:25: cast mold has type @ud
15+++ siblings |= x=@ux ^- @ud x
16+ ^
17+/tests/golden/types-partial-aura-family/source.jibb:6:29: expression has type @ux
18+++ siblings |= x=@ux ^- @ud x
19+ ^
20+++ dup: $-([A A] [A A])
21+++ join: call constraint is not supported by partial inference
22+++ accept: $-(@u @u)
23+++ via-call: $-(@ud @u)
tests/golden/types-partial-aura/types.txt+6
@@ -2,3 +2,9 @@ partial inference; module not checked
2++ n: unresolved aura-variable inference
2++ n: unresolved aura-variable inference
3++ good: @ux
3++ good: @ux
4++ bad: cast mold and expression type do not unify
4++ bad: cast mold and expression type do not unify
5+/tests/golden/types-partial-aura/source.jibb:3:11: cast mold has type ?
6+++ bad ^- ? 1
7+ ^
8+/tests/golden/types-partial-aura/source.jibb:3:13: expression
9+++ bad ^- ? 1
10+ ^
tests/golden/types-partial-conflicting-sites/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: type errors name both conflicting sites, with excerpts.
2+tests: definite call and cast mismatches report the gate or mold and the argument or expression, including an indented case.
3+expect: parses
4+expect-types: a partial inference report, not a checked module
tests/golden/types-partial-conflicting-sites/source.jibbnew file+5
@@ -0,0 +1,5 @@
1+++ f |= x=@t x
2+++ bad-call (f ~zod)
3+++ bad-cast ^- @ud "hello"
4+++ narrow |= x=@
5+ ^- @t x
tests/golden/types-partial-conflicting-sites/tokens.txtnew file+33
@@ -0,0 +1,33 @@
1+1:1 glyph ++
2+1:4 name f
3+1:6 glyph |=
4+1:9 name x
5+1:10 tight glyph =
6+1:11 tight aura @t
7+1:14 name x
8+2:1 NEWLINE
9+2:1 glyph ++
10+2:4 name bad-call
11+2:13 glyph (
12+2:14 tight name f
13+2:16 lit ~zod
14+2:20 tight glyph )
15+3:1 NEWLINE
16+3:1 glyph ++
17+3:4 name bad-cast
18+3:13 glyph ^-
19+3:16 aura @ud
20+3:20 str "hello"
21+4:1 NEWLINE
22+4:1 glyph ++
23+4:4 name narrow
24+4:11 glyph |=
25+4:14 name x
26+4:15 tight glyph =
27+4:16 tight aura @
28+5:3 INDENT
29+5:3 glyph ^-
30+5:6 aura @t
31+5:9 name x
32+5:10 DEDENT
33+5:10 NEWLINE
tests/golden/types-partial-conflicting-sites/tree.txtnew file+15
@@ -0,0 +1,15 @@
1+(module
2+ (value 1:1 f
3+ (gate 1:6
4+ (face 1:9 x (aura 1:11 @t))
5+ (wing 1:14 x)))
6+ (value 2:1 bad-call
7+ (group 2:13
8+ (call 2:14 (wing 2:14 f) (lit 2:16 ~zod))))
9+ (value 3:1 bad-cast
10+ (cast 3:13 (aura 3:16 @ud) (str 3:20 "hello")))
11+ (value 4:1 narrow
12+ (gate 4:11
13+ (face 4:14 x (aura 4:16 @))
14+ (body 5:3
15+ (cast 5:3 (aura 5:6 @t) (wing 5:9 x))))))
tests/golden/types-partial-conflicting-sites/types.txtnew file+23
@@ -0,0 +1,23 @@
1+partial inference; module not checked
2+++ f: $-(@t @t)
3+++ bad-call: call's sample and argument types do not unify
4+/tests/golden/types-partial-conflicting-sites/source.jibb:2:14: called gate has type $-(@t @t)
5+++ bad-call (f ~zod)
6+ ^
7+/tests/golden/types-partial-conflicting-sites/source.jibb:2:16: argument has type @p
8+++ bad-call (f ~zod)
9+ ^
10+++ bad-cast: cast mold and expression type do not unify
11+/tests/golden/types-partial-conflicting-sites/source.jibb:3:16: cast mold has type @ud
12+++ bad-cast ^- @ud "hello"
13+ ^
14+/tests/golden/types-partial-conflicting-sites/source.jibb:3:20: expression has type @t
15+++ bad-cast ^- @ud "hello"
16+ ^
17+++ narrow: cast mold and expression type do not unify
18+/tests/golden/types-partial-conflicting-sites/source.jibb:5:6: cast mold has type @t
19+ ^- @t x
20+ ^
21+/tests/golden/types-partial-conflicting-sites/source.jibb:5:9: expression has type @
22+ ^- @t x
23+ ^
tests/golden/types-partial-many-atom-constraints/types.txt+18
@@ -2,7 +2,25 @@ partial inference; module not checked
2++ both: $-([A B] @) where A is an atom, B is an atom
2++ both: $-([A B] @) where A is an atom, B is an atom
3++ mix: @
3++ mix: @
4++ bad: call's sample and argument types do not unify
4++ bad: call's sample and argument types do not unify
5+/tests/golden/types-partial-many-atom-constraints/source.jibb:7:9: called gate has type $-([A B] @) where A is an atom, B is an atom
6+++ bad (both [~zod [~zod "hi"]])
7+ ^
8+/tests/golden/types-partial-many-atom-constraints/source.jibb:7:14: argument has type [@p [@p @t]]
9+++ bad (both [~zod [~zod "hi"]])
10+ ^
5++ implicit: $-(A A) where A is an atom
11++ implicit: $-(A A) where A is an atom
6++ flag: ?
12++ flag: ?
7++ decimal: cast mold and expression type do not unify
13++ decimal: cast mold and expression type do not unify
14+/tests/golden/types-partial-many-atom-constraints/source.jibb:12:15: cast mold has type ?
15+++ decimal ^- ? 1
16+ ^
17+/tests/golden/types-partial-many-atom-constraints/source.jibb:12:17: expression
18+++ decimal ^- ? 1
19+ ^
8++ relay: cast mold and expression type do not unify
20++ relay: cast mold and expression type do not unify
21+/tests/golden/types-partial-many-atom-constraints/source.jibb:13:13: cast mold has type ?
22+++ relay ^- ? (implicit 7)
23+ ^
24+/tests/golden/types-partial-many-atom-constraints/source.jibb:13:15: expression
25+++ relay ^- ? (implicit 7)
26+ ^
tests/golden/types-partial-occurs/types.txt+6
@@ -1,2 +1,8 @@
1partial inference; module not checked
1partial inference; module not checked
2++ self-apply: call's sample and argument types do not unify
2++ self-apply: call's sample and argument types do not unify
3+/tests/golden/types-partial-occurs/source.jibb:1:21: called gate
4+++ self-apply |=(x (x x))
5+ ^
6+/tests/golden/types-partial-occurs/source.jibb:1:23: argument
7+++ self-apply |=(x (x x))
8+ ^
tests/golden/types-partial-shared-tvar/types.txt+6
@@ -2,3 +2,9 @@ partial inference; module not checked
2++ dup: $-([A A] [A A])
2++ dup: $-([A A] [A A])
3++ good: [@p @p]
3++ good: [@p @p]
4++ bad: call's sample and argument types do not unify
4++ bad: call's sample and argument types do not unify
5+/tests/golden/types-partial-shared-tvar/source.jibb:3:9: called gate has type $-([A A] [A A])
6+++ bad (dup [~zod "hi"])
7+ ^
8+/tests/golden/types-partial-shared-tvar/source.jibb:3:13: argument has type [@p @t]
9+++ bad (dup [~zod "hi"])
10+ ^
tests/importer/about.txt+3−2
@@ -2,8 +2,9 @@
2recursion, and unsupported forms. `shadow.txt` checks local generator
2recursion, and unsupported forms. `shadow.txt` checks local generator
3shadowing and missing provenance. `shadow-static.txt` checks that a local
3shadowing and missing provenance. `shadow-static.txt` checks that a local
4list shadow alongside a nested ordered map is rejected. Static sibling
4list shadow alongside a nested ordered map is rejected. Static sibling
5−collections and dependent sibling molds are tested separately. The synthetic
5+collections and dependent sibling molds are tested separately. `ford.txt`
6+checks a synthetic imported subject and selected mold; other cases check
6−hold in +bad-branch-fixture checks that a failed Hoon branch expansion returns
7+transitive imports, shadowing and malformed subjects. The synthetic hold in +bad-branch-fixture checks that a failed Hoon branch expansion returns
7an error. `tlon-epic.txt`, `tlon-presence.txt` and `tlon-docs.txt` are the
8an error. `tlon-epic.txt`, `tlon-presence.txt` and `tlon-docs.txt` are the
8unmodified `desk/sur/epic.hoon`, `desk/sur/presence.hoon` and
9unmodified `desk/sur/epic.hoon`, `desk/sur/presence.hoon` and
9`desk/sur/docs.hoon` from tloncorp/tlon-apps at commit
10`desk/sur/docs.hoon` from tloncorp/tlon-apps at commit
tests/importer/ford.txtnew file+4
@@ -0,0 +1,4 @@
1+|%
2++$ lists (list @ud)
3++$ wrapped item:small
4+--
tests/importer/tree.txt+8
@@ -17,6 +17,14 @@ mixed-mop: [a=(mop @ud @t) b=(list @ud)]
17nested-static-mop: [a=(mop @ud @t) b=(map @ud (jar @t @ud))]
17nested-static-mop: [a=(mop @ud @t) b=(map @ud (jar @t @ud))]
18collection-siblings: [a=(mop @ud @t) [b=(set @ud) [c=(qeu @t) [d=(unit @ud) e=(jug @ud @t)]]]]
18collection-siblings: [a=(mop @ud @t) [b=(set @ud) [c=(qeu @t) [d=(unit @ud) e=(jug @ud @t)]]]]
19dynamic-sibling-mop: error: a nested Hoon mop needs source-aware import
19dynamic-sibling-mop: error: a nested Hoon mop needs source-aware import
20+ford-list: (list @ud)
21+ford-imported: [id=@ud text=@t]
22+ford-transitive: (list @ud)
23+ford-shadow: error: Hoon collection provenance is unavailable or shadowed
24+ford-transitive-shadow: error: Hoon collection provenance is unavailable or shadowed
25+ford-shadow-face: unsafe
26+ford-unknown: unsafe
27+ford-mismatched-core: unsafe
20shadow-list-mop: error: Hoon collection provenance is unavailable or shadowed
28shadow-list-mop: error: Hoon collection provenance is unavailable or shadowed
21named-mop: error: a nested Hoon mop needs source-aware import
29named-mop: error: a nested Hoon mop needs source-aware import
22mop-list: error: a nested Hoon mop needs source-aware import
30mop-list: error: a nested Hoon mop needs source-aware import
tests/lib/jibb-import.hoon+3−1
@@ -7,6 +7,7 @@
7/* docs %txt /tests/importer/tlon-docs/txt
7/* docs %txt /tests/importer/tlon-docs/txt
8/* shadow %txt /tests/importer/shadow/txt
8/* shadow %txt /tests/importer/shadow/txt
9/* shadow-static %txt /tests/importer/shadow-static/txt
9/* shadow-static %txt /tests/importer/shadow-static/txt
10+/* ford %txt /tests/importer/ford/txt
10/* expected %txt /tests/importer/tree/txt
11/* expected %txt /tests/importer/tree/txt
11|%
12|%
12++ lines-to-cord
13++ lines-to-cord
@@ -22,8 +23,9 @@
22 ?~ docs ~[leaf+"Tlon docs fixture is missing"]
23 ?~ docs ~[leaf+"Tlon docs fixture is missing"]
23 ?~ shadow ~[leaf+"shadow fixture is missing"]
24 ?~ shadow ~[leaf+"shadow fixture is missing"]
24 ?~ shadow-static ~[leaf+"static shadow fixture is missing"]
25 ?~ shadow-static ~[leaf+"static shadow fixture is missing"]
26+ ?~ ford ~[leaf+"Ford importer fixture is missing"]
25 ?~ expected ~[leaf+"importer golden output is missing"]
27 ?~ expected ~[leaf+"importer golden output is missing"]
26− =/ actual (fixture-output:jibb-import (lines-to-cord small) (lines-to-cord epic) (lines-to-cord presence) (lines-to-cord docs) (lines-to-cord shadow) (lines-to-cord shadow-static))
28+ =/ actual (fixture-output:jibb-import (lines-to-cord small) (lines-to-cord epic) (lines-to-cord presence) (lines-to-cord docs) (lines-to-cord shadow) (lines-to-cord shadow-static) (lines-to-cord ford))
27 ?. =(actual expected)
29 ?. =(actual expected)
28 ~[leaf+"importer projection differs from tests/importer/tree.txt"]
30 ~[leaf+"importer projection differs from tests/importer/tree.txt"]
29 ~
31 ~
tests/lib/jibb.hoon+150−132
@@ -1156,112 +1156,124 @@
1156/* tok-377 %txt /tests/golden/prelude-core-functions/tokens/txt
1156/* tok-377 %txt /tests/golden/prelude-core-functions/tokens/txt
1157/* tre-377 %txt /tests/golden/prelude-core-functions/tree/txt
1157/* tre-377 %txt /tests/golden/prelude-core-functions/tree/txt
1158/* typ-377 %txt /tests/golden/prelude-core-functions/types/txt
1158/* typ-377 %txt /tests/golden/prelude-core-functions/types/txt
1159−/* src-378 %jibb /tests/golden/prelude-list-unit/source/jibb
1159+/* src-378 %jibb /tests/golden/prelude-list-helpers/source/jibb
1160+/* tok-378 %txt /tests/golden/prelude-list-helpers/tokens/txt
1161+/* tre-378 %txt /tests/golden/prelude-list-helpers/tree/txt
1162+/* typ-378 %txt /tests/golden/prelude-list-helpers/types/txt
1163+/* src-379 %jibb /tests/golden/prelude-list-unit/source/jibb
1160−/* tok-378 %txt /tests/golden/prelude-list-unit/tokens/txt
1164+/* tok-379 %txt /tests/golden/prelude-list-unit/tokens/txt
1161−/* tre-378 %txt /tests/golden/prelude-list-unit/tree/txt
1165+/* tre-379 %txt /tests/golden/prelude-list-unit/tree/txt
1162−/* typ-378 %txt /tests/golden/prelude-list-unit/types/txt
1166+/* typ-379 %txt /tests/golden/prelude-list-unit/types/txt
1163−/* src-379 %jibb /tests/golden/types-import-sur/source/jibb
1167+/* src-380 %jibb /tests/golden/types-import-sur/source/jibb
1164−/* tok-379 %txt /tests/golden/types-import-sur/tokens/txt
1168+/* tok-380 %txt /tests/golden/types-import-sur/tokens/txt
1165−/* tre-379 %txt /tests/golden/types-import-sur/tree/txt
1169+/* tre-380 %txt /tests/golden/types-import-sur/tree/txt
1166−/* typ-379 %txt /tests/golden/types-import-sur/types/txt
1170+/* typ-380 %txt /tests/golden/types-import-sur/types/txt
1167−/* imp-379-1 %txt /tests/golden/types-import-sur/sur/fixture/txt
1171+/* imp-380-1 %txt /tests/golden/types-import-sur/sur/fixture/txt
1168−/* imp-379-2 %txt /tests/golden/types-import-sur/sur/fixture/txt
1172+/* imp-380-2 %txt /tests/golden/types-import-sur/sur/fixture/txt
1169−/* src-380 %jibb /tests/golden/types-partial-apply/source/jibb
1173+/* src-381 %jibb /tests/golden/types-partial-apply/source/jibb
1170−/* tok-380 %txt /tests/golden/types-partial-apply/tokens/txt
1174+/* tok-381 %txt /tests/golden/types-partial-apply/tokens/txt
1171−/* tre-380 %txt /tests/golden/types-partial-apply/tree/txt
1175+/* tre-381 %txt /tests/golden/types-partial-apply/tree/txt
1172−/* typ-380 %txt /tests/golden/types-partial-apply/types/txt
1176+/* typ-381 %txt /tests/golden/types-partial-apply/types/txt
1173−/* src-381 %jibb /tests/golden/types-partial-atom-constraint/source/jibb
1177+/* src-382 %jibb /tests/golden/types-partial-atom-constraint/source/jibb
1174−/* tok-381 %txt /tests/golden/types-partial-atom-constraint/tokens/txt
1178+/* tok-382 %txt /tests/golden/types-partial-atom-constraint/tokens/txt
1175−/* tre-381 %txt /tests/golden/types-partial-atom-constraint/tree/txt
1179+/* tre-382 %txt /tests/golden/types-partial-atom-constraint/tree/txt
1176−/* typ-381 %txt /tests/golden/types-partial-atom-constraint/types/txt
1180+/* typ-382 %txt /tests/golden/types-partial-atom-constraint/types/txt
1177−/* src-382 %jibb /tests/golden/types-partial-atom-widening/source/jibb
1181+/* src-383 %jibb /tests/golden/types-partial-atom-widening/source/jibb
1178−/* tok-382 %txt /tests/golden/types-partial-atom-widening/tokens/txt
1182+/* tok-383 %txt /tests/golden/types-partial-atom-widening/tokens/txt
1179−/* tre-382 %txt /tests/golden/types-partial-atom-widening/tree/txt
1183+/* tre-383 %txt /tests/golden/types-partial-atom-widening/tree/txt
1180−/* typ-382 %txt /tests/golden/types-partial-atom-widening/types/txt
1184+/* typ-383 %txt /tests/golden/types-partial-atom-widening/types/txt
1185+/* src-384 %jibb /tests/golden/types-partial-aura/source/jibb
1186+/* tok-384 %txt /tests/golden/types-partial-aura/tokens/txt
1187+/* tre-384 %txt /tests/golden/types-partial-aura/tree/txt
1188+/* typ-384 %txt /tests/golden/types-partial-aura/types/txt
1181−/* src-383 %jibb /tests/golden/types-partial-aura/source/jibb
1189+/* src-385 %jibb /tests/golden/types-partial-aura-family/source/jibb
1182−/* tok-383 %txt /tests/golden/types-partial-aura/tokens/txt
1190+/* tok-385 %txt /tests/golden/types-partial-aura-family/tokens/txt
1183−/* tre-383 %txt /tests/golden/types-partial-aura/tree/txt
1191+/* tre-385 %txt /tests/golden/types-partial-aura-family/tree/txt
1184−/* typ-383 %txt /tests/golden/types-partial-aura/types/txt
1192+/* typ-385 %txt /tests/golden/types-partial-aura-family/types/txt
1185−/* src-384 %jibb /tests/golden/types-partial-aura-generalization/source/jibb
1193+/* src-386 %jibb /tests/golden/types-partial-aura-generalization/source/jibb
1186−/* tok-384 %txt /tests/golden/types-partial-aura-generalization/tokens/txt
1194+/* tok-386 %txt /tests/golden/types-partial-aura-generalization/tokens/txt
1187−/* tre-384 %txt /tests/golden/types-partial-aura-generalization/tree/txt
1195+/* tre-386 %txt /tests/golden/types-partial-aura-generalization/tree/txt
1188−/* typ-384 %txt /tests/golden/types-partial-aura-generalization/types/txt
1196+/* typ-386 %txt /tests/golden/types-partial-aura-generalization/types/txt
1189−/* src-385 %jibb /tests/golden/types-partial-bare-atom/source/jibb
1197+/* src-387 %jibb /tests/golden/types-partial-bare-atom/source/jibb
1190−/* tok-385 %txt /tests/golden/types-partial-bare-atom/tokens/txt
1198+/* tok-387 %txt /tests/golden/types-partial-bare-atom/tokens/txt
1191−/* tre-385 %txt /tests/golden/types-partial-bare-atom/tree/txt
1199+/* tre-387 %txt /tests/golden/types-partial-bare-atom/tree/txt
1192−/* typ-385 %txt /tests/golden/types-partial-bare-atom/types/txt
1200+/* typ-387 %txt /tests/golden/types-partial-bare-atom/types/txt
1201+/* src-388 %jibb /tests/golden/types-partial-conflicting-sites/source/jibb
1202+/* tok-388 %txt /tests/golden/types-partial-conflicting-sites/tokens/txt
1203+/* tre-388 %txt /tests/golden/types-partial-conflicting-sites/tree/txt
1204+/* typ-388 %txt /tests/golden/types-partial-conflicting-sites/types/txt
1193−/* src-386 %jibb /tests/golden/types-partial-dependency-chain/source/jibb
1205+/* src-389 %jibb /tests/golden/types-partial-dependency-chain/source/jibb
1194−/* tok-386 %txt /tests/golden/types-partial-dependency-chain/tokens/txt
1206+/* tok-389 %txt /tests/golden/types-partial-dependency-chain/tokens/txt
1195−/* tre-386 %txt /tests/golden/types-partial-dependency-chain/tree/txt
1207+/* tre-389 %txt /tests/golden/types-partial-dependency-chain/tree/txt
1196−/* typ-386 %txt /tests/golden/types-partial-dependency-chain/types/txt
1208+/* typ-389 %txt /tests/golden/types-partial-dependency-chain/types/txt
1197−/* src-387 %jibb /tests/golden/types-partial-explicit-capital/source/jibb
1209+/* src-390 %jibb /tests/golden/types-partial-explicit-capital/source/jibb
1198−/* tok-387 %txt /tests/golden/types-partial-explicit-capital/tokens/txt
1210+/* tok-390 %txt /tests/golden/types-partial-explicit-capital/tokens/txt
1199−/* tre-387 %txt /tests/golden/types-partial-explicit-capital/tree/txt
1211+/* tre-390 %txt /tests/golden/types-partial-explicit-capital/tree/txt
1200−/* typ-387 %txt /tests/golden/types-partial-explicit-capital/types/txt
1212+/* typ-390 %txt /tests/golden/types-partial-explicit-capital/types/txt
1201−/* src-388 %jibb /tests/golden/types-partial-forward/source/jibb
1213+/* src-391 %jibb /tests/golden/types-partial-forward/source/jibb
1202−/* tok-388 %txt /tests/golden/types-partial-forward/tokens/txt
1214+/* tok-391 %txt /tests/golden/types-partial-forward/tokens/txt
1203−/* tre-388 %txt /tests/golden/types-partial-forward/tree/txt
1215+/* tre-391 %txt /tests/golden/types-partial-forward/tree/txt
1204−/* typ-388 %txt /tests/golden/types-partial-forward/types/txt
1216+/* typ-391 %txt /tests/golden/types-partial-forward/types/txt
1205−/* src-389 %jibb /tests/golden/types-partial-generalization/source/jibb
1217+/* src-392 %jibb /tests/golden/types-partial-generalization/source/jibb
1206−/* tok-389 %txt /tests/golden/types-partial-generalization/tokens/txt
1218+/* tok-392 %txt /tests/golden/types-partial-generalization/tokens/txt
1207−/* tre-389 %txt /tests/golden/types-partial-generalization/tree/txt
1219+/* tre-392 %txt /tests/golden/types-partial-generalization/tree/txt
1208−/* typ-389 %txt /tests/golden/types-partial-generalization/types/txt
1220+/* typ-392 %txt /tests/golden/types-partial-generalization/types/txt
1209−/* src-390 %jibb /tests/golden/types-partial-identity/source/jibb
1221+/* src-393 %jibb /tests/golden/types-partial-identity/source/jibb
1210−/* tok-390 %txt /tests/golden/types-partial-identity/tokens/txt
1222+/* tok-393 %txt /tests/golden/types-partial-identity/tokens/txt
1211−/* tre-390 %txt /tests/golden/types-partial-identity/tree/txt
1223+/* tre-393 %txt /tests/golden/types-partial-identity/tree/txt
1212−/* typ-390 %txt /tests/golden/types-partial-identity/types/txt
1224+/* typ-393 %txt /tests/golden/types-partial-identity/types/txt
1213−/* src-391 %jibb /tests/golden/types-partial-independent-atoms/source/jibb
1225+/* src-394 %jibb /tests/golden/types-partial-independent-atoms/source/jibb
1214−/* tok-391 %txt /tests/golden/types-partial-independent-atoms/tokens/txt
1226+/* tok-394 %txt /tests/golden/types-partial-independent-atoms/tokens/txt
1215−/* tre-391 %txt /tests/golden/types-partial-independent-atoms/tree/txt
1227+/* tre-394 %txt /tests/golden/types-partial-independent-atoms/tree/txt
1216−/* typ-391 %txt /tests/golden/types-partial-independent-atoms/types/txt
1228+/* typ-394 %txt /tests/golden/types-partial-independent-atoms/types/txt
1217−/* src-392 %jibb /tests/golden/types-partial-many-atom-constraints/source/jibb
1229+/* src-395 %jibb /tests/golden/types-partial-many-atom-constraints/source/jibb
1218−/* tok-392 %txt /tests/golden/types-partial-many-atom-constraints/tokens/txt
1230+/* tok-395 %txt /tests/golden/types-partial-many-atom-constraints/tokens/txt
1219−/* tre-392 %txt /tests/golden/types-partial-many-atom-constraints/tree/txt
1231+/* tre-395 %txt /tests/golden/types-partial-many-atom-constraints/tree/txt
1220−/* typ-392 %txt /tests/golden/types-partial-many-atom-constraints/types/txt
1232+/* typ-395 %txt /tests/golden/types-partial-many-atom-constraints/types/txt
1221−/* src-393 %jibb /tests/golden/types-partial-mold-bare-aura/source/jibb
1233+/* src-396 %jibb /tests/golden/types-partial-mold-bare-aura/source/jibb
1222−/* tok-393 %txt /tests/golden/types-partial-mold-bare-aura/tokens/txt
1234+/* tok-396 %txt /tests/golden/types-partial-mold-bare-aura/tokens/txt
1223−/* tre-393 %txt /tests/golden/types-partial-mold-bare-aura/tree/txt
1235+/* tre-396 %txt /tests/golden/types-partial-mold-bare-aura/tree/txt
1224−/* typ-393 %txt /tests/golden/types-partial-mold-bare-aura/types/txt
1236+/* typ-396 %txt /tests/golden/types-partial-mold-bare-aura/types/txt
1225−/* src-394 %jibb /tests/golden/types-partial-mold-composite/source/jibb
1237+/* src-397 %jibb /tests/golden/types-partial-mold-composite/source/jibb
1226−/* tok-394 %txt /tests/golden/types-partial-mold-composite/tokens/txt
1238+/* tok-397 %txt /tests/golden/types-partial-mold-composite/tokens/txt
1227−/* tre-394 %txt /tests/golden/types-partial-mold-composite/tree/txt
1239+/* tre-397 %txt /tests/golden/types-partial-mold-composite/tree/txt
1228−/* typ-394 %txt /tests/golden/types-partial-mold-composite/types/txt
1240+/* typ-397 %txt /tests/golden/types-partial-mold-composite/types/txt
1229−/* src-395 %jibb /tests/golden/types-partial-mold-forward/source/jibb
1241+/* src-398 %jibb /tests/golden/types-partial-mold-forward/source/jibb
1230−/* tok-395 %txt /tests/golden/types-partial-mold-forward/tokens/txt
1242+/* tok-398 %txt /tests/golden/types-partial-mold-forward/tokens/txt
1231−/* tre-395 %txt /tests/golden/types-partial-mold-forward/tree/txt
1243+/* tre-398 %txt /tests/golden/types-partial-mold-forward/tree/txt
1232−/* typ-395 %txt /tests/golden/types-partial-mold-forward/types/txt
1244+/* typ-398 %txt /tests/golden/types-partial-mold-forward/types/txt
1233−/* src-396 %jibb /tests/golden/types-partial-mold-recursive/source/jibb
1245+/* src-399 %jibb /tests/golden/types-partial-mold-recursive/source/jibb
1234−/* tok-396 %txt /tests/golden/types-partial-mold-recursive/tokens/txt
1246+/* tok-399 %txt /tests/golden/types-partial-mold-recursive/tokens/txt
1235−/* tre-396 %txt /tests/golden/types-partial-mold-recursive/tree/txt
1247+/* tre-399 %txt /tests/golden/types-partial-mold-recursive/tree/txt
1236−/* typ-396 %txt /tests/golden/types-partial-mold-recursive/types/txt
1248+/* typ-399 %txt /tests/golden/types-partial-mold-recursive/types/txt
1237−/* src-397 %jibb /tests/golden/types-partial-occurs/source/jibb
1249+/* src-400 %jibb /tests/golden/types-partial-occurs/source/jibb
1238−/* tok-397 %txt /tests/golden/types-partial-occurs/tokens/txt
1250+/* tok-400 %txt /tests/golden/types-partial-occurs/tokens/txt
1239−/* tre-397 %txt /tests/golden/types-partial-occurs/tree/txt
1251+/* tre-400 %txt /tests/golden/types-partial-occurs/tree/txt
1240−/* typ-397 %txt /tests/golden/types-partial-occurs/types/txt
1252+/* typ-400 %txt /tests/golden/types-partial-occurs/types/txt
1241−/* src-398 %jibb /tests/golden/types-partial-projection/source/jibb
1253+/* src-401 %jibb /tests/golden/types-partial-projection/source/jibb
1242−/* tok-398 %txt /tests/golden/types-partial-projection/tokens/txt
1254+/* tok-401 %txt /tests/golden/types-partial-projection/tokens/txt
1243−/* tre-398 %txt /tests/golden/types-partial-projection/tree/txt
1255+/* tre-401 %txt /tests/golden/types-partial-projection/tree/txt
1244−/* typ-398 %txt /tests/golden/types-partial-projection/types/txt
1256+/* typ-401 %txt /tests/golden/types-partial-projection/types/txt
1245−/* src-399 %jibb /tests/golden/types-partial-shadow-global/source/jibb
1257+/* src-402 %jibb /tests/golden/types-partial-shadow-global/source/jibb
1246−/* tok-399 %txt /tests/golden/types-partial-shadow-global/tokens/txt
1258+/* tok-402 %txt /tests/golden/types-partial-shadow-global/tokens/txt
1247−/* tre-399 %txt /tests/golden/types-partial-shadow-global/tree/txt
1259+/* tre-402 %txt /tests/golden/types-partial-shadow-global/tree/txt
1248−/* typ-399 %txt /tests/golden/types-partial-shadow-global/types/txt
1260+/* typ-402 %txt /tests/golden/types-partial-shadow-global/types/txt
1249−/* src-400 %jibb /tests/golden/types-partial-shared-tvar/source/jibb
1261+/* src-403 %jibb /tests/golden/types-partial-shared-tvar/source/jibb
1250−/* tok-400 %txt /tests/golden/types-partial-shared-tvar/tokens/txt
1262+/* tok-403 %txt /tests/golden/types-partial-shared-tvar/tokens/txt
1251−/* tre-400 %txt /tests/golden/types-partial-shared-tvar/tree/txt
1263+/* tre-403 %txt /tests/golden/types-partial-shared-tvar/tree/txt
1252−/* typ-400 %txt /tests/golden/types-partial-shared-tvar/types/txt
1264+/* typ-403 %txt /tests/golden/types-partial-shared-tvar/types/txt
1253−/* src-401 %jibb /tests/golden/types-partial-union-cases/source/jibb
1265+/* src-404 %jibb /tests/golden/types-partial-union-cases/source/jibb
1254−/* tok-401 %txt /tests/golden/types-partial-union-cases/tokens/txt
1266+/* tok-404 %txt /tests/golden/types-partial-union-cases/tokens/txt
1255−/* tre-401 %txt /tests/golden/types-partial-union-cases/tree/txt
1267+/* tre-404 %txt /tests/golden/types-partial-union-cases/tree/txt
1256−/* typ-401 %txt /tests/golden/types-partial-union-cases/types/txt
1268+/* typ-404 %txt /tests/golden/types-partial-union-cases/types/txt
1257−/* src-402 %jibb /tests/golden/types-partial-union-edges/source/jibb
1269+/* src-405 %jibb /tests/golden/types-partial-union-edges/source/jibb
1258−/* tok-402 %txt /tests/golden/types-partial-union-edges/tokens/txt
1270+/* tok-405 %txt /tests/golden/types-partial-union-edges/tokens/txt
1259−/* tre-402 %txt /tests/golden/types-partial-union-edges/tree/txt
1271+/* tre-405 %txt /tests/golden/types-partial-union-edges/tree/txt
1260−/* typ-402 %txt /tests/golden/types-partial-union-edges/types/txt
1272+/* typ-405 %txt /tests/golden/types-partial-union-edges/types/txt
1261−/* src-403 %jibb /tests/golden/types-partial-unresolved-tag/source/jibb
1273+/* src-406 %jibb /tests/golden/types-partial-unresolved-tag/source/jibb
1262−/* tok-403 %txt /tests/golden/types-partial-unresolved-tag/tokens/txt
1274+/* tok-406 %txt /tests/golden/types-partial-unresolved-tag/tokens/txt
1263−/* tre-403 %txt /tests/golden/types-partial-unresolved-tag/tree/txt
1275+/* tre-406 %txt /tests/golden/types-partial-unresolved-tag/tree/txt
1264−/* typ-403 %txt /tests/golden/types-partial-unresolved-tag/types/txt
1276+/* typ-406 %txt /tests/golden/types-partial-unresolved-tag/types/txt
1265|%
1277|%
1266:: one arm per case
1278:: one arm per case
1267::
1279::
@@ -2019,58 +2031,64 @@
2019 (weld (check ~.prelude-3g-structural src-376 `tok-376 `tre-376) (check-types ~.prelude-3g-structural ~[%tests %golden ~.prelude-3g-structural %source %jibb] src-376 `typ-376))
2031 (weld (check ~.prelude-3g-structural src-376 `tok-376 `tre-376) (check-types ~.prelude-3g-structural ~[%tests %golden ~.prelude-3g-structural %source %jibb] src-376 `typ-376))
2020++ test-prelude-core-functions
2032++ test-prelude-core-functions
2021 (weld (check ~.prelude-core-functions src-377 `tok-377 `tre-377) (check-types ~.prelude-core-functions ~[%tests %golden ~.prelude-core-functions %source %jibb] src-377 `typ-377))
2033 (weld (check ~.prelude-core-functions src-377 `tok-377 `tre-377) (check-types ~.prelude-core-functions ~[%tests %golden ~.prelude-core-functions %source %jibb] src-377 `typ-377))
2034+++ test-prelude-list-helpers
2035+ (weld (check ~.prelude-list-helpers src-378 `tok-378 `tre-378) (check-types ~.prelude-list-helpers ~[%tests %golden ~.prelude-list-helpers %source %jibb] src-378 `typ-378))
2022++ test-prelude-list-unit
2036++ test-prelude-list-unit
2023− (weld (check ~.prelude-list-unit src-378 `tok-378 `tre-378) (check-types ~.prelude-list-unit ~[%tests %golden ~.prelude-list-unit %source %jibb] src-378 `typ-378))
2037+ (weld (check ~.prelude-list-unit src-379 `tok-379 `tre-379) (check-types ~.prelude-list-unit ~[%tests %golden ~.prelude-list-unit %source %jibb] src-379 `typ-379))
2024++ test-types-import-sur
2038++ test-types-import-sur
2025− (weld (check ~.types-import-sur src-379 `tok-379 `tre-379) (check-import-types ~.types-import-sur ~[%tests %golden ~.types-import-sur %source %jibb] src-379 `typ-379 ~[[%fixture %title imp-379-1] [%fixture %pair imp-379-2]]))
2039+ (weld (check ~.types-import-sur src-380 `tok-380 `tre-380) (check-import-types ~.types-import-sur ~[%tests %golden ~.types-import-sur %source %jibb] src-380 `typ-380 ~[[%fixture %title imp-380-1] [%fixture %pair imp-380-2]]))
2026++ test-types-partial-apply
2040++ test-types-partial-apply
2027− (weld (check ~.types-partial-apply src-380 `tok-380 `tre-380) (check-types ~.types-partial-apply ~[%tests %golden ~.types-partial-apply %source %jibb] src-380 `typ-380))
2041+ (weld (check ~.types-partial-apply src-381 `tok-381 `tre-381) (check-types ~.types-partial-apply ~[%tests %golden ~.types-partial-apply %source %jibb] src-381 `typ-381))
2028++ test-types-partial-atom-constraint
2042++ test-types-partial-atom-constraint
2029− (weld (check ~.types-partial-atom-constraint src-381 `tok-381 `tre-381) (check-types ~.types-partial-atom-constraint ~[%tests %golden ~.types-partial-atom-constraint %source %jibb] src-381 `typ-381))
2043+ (weld (check ~.types-partial-atom-constraint src-382 `tok-382 `tre-382) (check-types ~.types-partial-atom-constraint ~[%tests %golden ~.types-partial-atom-constraint %source %jibb] src-382 `typ-382))
2030++ test-types-partial-atom-widening
2044++ test-types-partial-atom-widening
2031− (weld (check ~.types-partial-atom-widening src-382 `tok-382 `tre-382) (check-types ~.types-partial-atom-widening ~[%tests %golden ~.types-partial-atom-widening %source %jibb] src-382 `typ-382))
2045+ (weld (check ~.types-partial-atom-widening src-383 `tok-383 `tre-383) (check-types ~.types-partial-atom-widening ~[%tests %golden ~.types-partial-atom-widening %source %jibb] src-383 `typ-383))
2032++ test-types-partial-aura
2046++ test-types-partial-aura
2033− (weld (check ~.types-partial-aura src-383 `tok-383 `tre-383) (check-types ~.types-partial-aura ~[%tests %golden ~.types-partial-aura %source %jibb] src-383 `typ-383))
2047+ (weld (check ~.types-partial-aura src-384 `tok-384 `tre-384) (check-types ~.types-partial-aura ~[%tests %golden ~.types-partial-aura %source %jibb] src-384 `typ-384))
2048+++ test-types-partial-aura-family
2049+ (weld (check ~.types-partial-aura-family src-385 `tok-385 `tre-385) (check-types ~.types-partial-aura-family ~[%tests %golden ~.types-partial-aura-family %source %jibb] src-385 `typ-385))
2034++ test-types-partial-aura-generalization
2050++ test-types-partial-aura-generalization
2035− (weld (check ~.types-partial-aura-generalization src-384 `tok-384 `tre-384) (check-types ~.types-partial-aura-generalization ~[%tests %golden ~.types-partial-aura-generalization %source %jibb] src-384 `typ-384))
2051+ (weld (check ~.types-partial-aura-generalization src-386 `tok-386 `tre-386) (check-types ~.types-partial-aura-generalization ~[%tests %golden ~.types-partial-aura-generalization %source %jibb] src-386 `typ-386))
2036++ test-types-partial-bare-atom
2052++ test-types-partial-bare-atom
2037− (weld (check ~.types-partial-bare-atom src-385 `tok-385 `tre-385) (check-types ~.types-partial-bare-atom ~[%tests %golden ~.types-partial-bare-atom %source %jibb] src-385 `typ-385))
2053+ (weld (check ~.types-partial-bare-atom src-387 `tok-387 `tre-387) (check-types ~.types-partial-bare-atom ~[%tests %golden ~.types-partial-bare-atom %source %jibb] src-387 `typ-387))
2054+++ test-types-partial-conflicting-sites
2055+ (weld (check ~.types-partial-conflicting-sites src-388 `tok-388 `tre-388) (check-types ~.types-partial-conflicting-sites ~[%tests %golden ~.types-partial-conflicting-sites %source %jibb] src-388 `typ-388))
2038++ test-types-partial-dependency-chain
2056++ test-types-partial-dependency-chain
2039− (weld (check ~.types-partial-dependency-chain src-386 `tok-386 `tre-386) (check-types ~.types-partial-dependency-chain ~[%tests %golden ~.types-partial-dependency-chain %source %jibb] src-386 `typ-386))
2057+ (weld (check ~.types-partial-dependency-chain src-389 `tok-389 `tre-389) (check-types ~.types-partial-dependency-chain ~[%tests %golden ~.types-partial-dependency-chain %source %jibb] src-389 `typ-389))
2040++ test-types-partial-explicit-capital
2058++ test-types-partial-explicit-capital
2041− (weld (check ~.types-partial-explicit-capital src-387 `tok-387 `tre-387) (check-types ~.types-partial-explicit-capital ~[%tests %golden ~.types-partial-explicit-capital %source %jibb] src-387 `typ-387))
2059+ (weld (check ~.types-partial-explicit-capital src-390 `tok-390 `tre-390) (check-types ~.types-partial-explicit-capital ~[%tests %golden ~.types-partial-explicit-capital %source %jibb] src-390 `typ-390))
2042++ test-types-partial-forward
2060++ test-types-partial-forward
2043− (weld (check ~.types-partial-forward src-388 `tok-388 `tre-388) (check-types ~.types-partial-forward ~[%tests %golden ~.types-partial-forward %source %jibb] src-388 `typ-388))
2061+ (weld (check ~.types-partial-forward src-391 `tok-391 `tre-391) (check-types ~.types-partial-forward ~[%tests %golden ~.types-partial-forward %source %jibb] src-391 `typ-391))
2044++ test-types-partial-generalization
2062++ test-types-partial-generalization
2045− (weld (check ~.types-partial-generalization src-389 `tok-389 `tre-389) (check-types ~.types-partial-generalization ~[%tests %golden ~.types-partial-generalization %source %jibb] src-389 `typ-389))
2063+ (weld (check ~.types-partial-generalization src-392 `tok-392 `tre-392) (check-types ~.types-partial-generalization ~[%tests %golden ~.types-partial-generalization %source %jibb] src-392 `typ-392))
2046++ test-types-partial-identity
2064++ test-types-partial-identity
2047− (weld (check ~.types-partial-identity src-390 `tok-390 `tre-390) (check-types ~.types-partial-identity ~[%tests %golden ~.types-partial-identity %source %jibb] src-390 `typ-390))
2065+ (weld (check ~.types-partial-identity src-393 `tok-393 `tre-393) (check-types ~.types-partial-identity ~[%tests %golden ~.types-partial-identity %source %jibb] src-393 `typ-393))
2048++ test-types-partial-independent-atoms
2066++ test-types-partial-independent-atoms
2049− (weld (check ~.types-partial-independent-atoms src-391 `tok-391 `tre-391) (check-types ~.types-partial-independent-atoms ~[%tests %golden ~.types-partial-independent-atoms %source %jibb] src-391 `typ-391))
2067+ (weld (check ~.types-partial-independent-atoms src-394 `tok-394 `tre-394) (check-types ~.types-partial-independent-atoms ~[%tests %golden ~.types-partial-independent-atoms %source %jibb] src-394 `typ-394))
2050++ test-types-partial-many-atom-constraints
2068++ test-types-partial-many-atom-constraints
2051− (weld (check ~.types-partial-many-atom-constraints src-392 `tok-392 `tre-392) (check-types ~.types-partial-many-atom-constraints ~[%tests %golden ~.types-partial-many-atom-constraints %source %jibb] src-392 `typ-392))
2069+ (weld (check ~.types-partial-many-atom-constraints src-395 `tok-395 `tre-395) (check-types ~.types-partial-many-atom-constraints ~[%tests %golden ~.types-partial-many-atom-constraints %source %jibb] src-395 `typ-395))
2052++ test-types-partial-mold-bare-aura
2070++ test-types-partial-mold-bare-aura
2053− (weld (check ~.types-partial-mold-bare-aura src-393 `tok-393 `tre-393) (check-types ~.types-partial-mold-bare-aura ~[%tests %golden ~.types-partial-mold-bare-aura %source %jibb] src-393 `typ-393))
2071+ (weld (check ~.types-partial-mold-bare-aura src-396 `tok-396 `tre-396) (check-types ~.types-partial-mold-bare-aura ~[%tests %golden ~.types-partial-mold-bare-aura %source %jibb] src-396 `typ-396))
2054++ test-types-partial-mold-composite
2072++ test-types-partial-mold-composite
2055− (weld (check ~.types-partial-mold-composite src-394 `tok-394 `tre-394) (check-types ~.types-partial-mold-composite ~[%tests %golden ~.types-partial-mold-composite %source %jibb] src-394 `typ-394))
2073+ (weld (check ~.types-partial-mold-composite src-397 `tok-397 `tre-397) (check-types ~.types-partial-mold-composite ~[%tests %golden ~.types-partial-mold-composite %source %jibb] src-397 `typ-397))
2056++ test-types-partial-mold-forward
2074++ test-types-partial-mold-forward
2057− (weld (check ~.types-partial-mold-forward src-395 `tok-395 `tre-395) (check-types ~.types-partial-mold-forward ~[%tests %golden ~.types-partial-mold-forward %source %jibb] src-395 `typ-395))
2075+ (weld (check ~.types-partial-mold-forward src-398 `tok-398 `tre-398) (check-types ~.types-partial-mold-forward ~[%tests %golden ~.types-partial-mold-forward %source %jibb] src-398 `typ-398))
2058++ test-types-partial-mold-recursive
2076++ test-types-partial-mold-recursive
2059− (weld (check ~.types-partial-mold-recursive src-396 `tok-396 `tre-396) (check-types ~.types-partial-mold-recursive ~[%tests %golden ~.types-partial-mold-recursive %source %jibb] src-396 `typ-396))
2077+ (weld (check ~.types-partial-mold-recursive src-399 `tok-399 `tre-399) (check-types ~.types-partial-mold-recursive ~[%tests %golden ~.types-partial-mold-recursive %source %jibb] src-399 `typ-399))
2060++ test-types-partial-occurs
2078++ test-types-partial-occurs
2061− (weld (check ~.types-partial-occurs src-397 `tok-397 `tre-397) (check-types ~.types-partial-occurs ~[%tests %golden ~.types-partial-occurs %source %jibb] src-397 `typ-397))
2079+ (weld (check ~.types-partial-occurs src-400 `tok-400 `tre-400) (check-types ~.types-partial-occurs ~[%tests %golden ~.types-partial-occurs %source %jibb] src-400 `typ-400))
2062++ test-types-partial-projection
2080++ test-types-partial-projection
2063− (weld (check ~.types-partial-projection src-398 `tok-398 `tre-398) (check-types ~.types-partial-projection ~[%tests %golden ~.types-partial-projection %source %jibb] src-398 `typ-398))
2081+ (weld (check ~.types-partial-projection src-401 `tok-401 `tre-401) (check-types ~.types-partial-projection ~[%tests %golden ~.types-partial-projection %source %jibb] src-401 `typ-401))
2064++ test-types-partial-shadow-global
2082++ test-types-partial-shadow-global
2065− (weld (check ~.types-partial-shadow-global src-399 `tok-399 `tre-399) (check-types ~.types-partial-shadow-global ~[%tests %golden ~.types-partial-shadow-global %source %jibb] src-399 `typ-399))
2083+ (weld (check ~.types-partial-shadow-global src-402 `tok-402 `tre-402) (check-types ~.types-partial-shadow-global ~[%tests %golden ~.types-partial-shadow-global %source %jibb] src-402 `typ-402))
2066++ test-types-partial-shared-tvar
2084++ test-types-partial-shared-tvar
2067− (weld (check ~.types-partial-shared-tvar src-400 `tok-400 `tre-400) (check-types ~.types-partial-shared-tvar ~[%tests %golden ~.types-partial-shared-tvar %source %jibb] src-400 `typ-400))
2085+ (weld (check ~.types-partial-shared-tvar src-403 `tok-403 `tre-403) (check-types ~.types-partial-shared-tvar ~[%tests %golden ~.types-partial-shared-tvar %source %jibb] src-403 `typ-403))
2068++ test-types-partial-union-cases
2086++ test-types-partial-union-cases
2069− (weld (check ~.types-partial-union-cases src-401 `tok-401 `tre-401) (check-types ~.types-partial-union-cases ~[%tests %golden ~.types-partial-union-cases %source %jibb] src-401 `typ-401))
2087+ (weld (check ~.types-partial-union-cases src-404 `tok-404 `tre-404) (check-types ~.types-partial-union-cases ~[%tests %golden ~.types-partial-union-cases %source %jibb] src-404 `typ-404))
2070++ test-types-partial-union-edges
2088++ test-types-partial-union-edges
2071− (weld (check ~.types-partial-union-edges src-402 `tok-402 `tre-402) (check-types ~.types-partial-union-edges ~[%tests %golden ~.types-partial-union-edges %source %jibb] src-402 `typ-402))
2089+ (weld (check ~.types-partial-union-edges src-405 `tok-405 `tre-405) (check-types ~.types-partial-union-edges ~[%tests %golden ~.types-partial-union-edges %source %jibb] src-405 `typ-405))
2072++ test-types-partial-unresolved-tag
2090++ test-types-partial-unresolved-tag
2073− (weld (check ~.types-partial-unresolved-tag src-403 `tok-403 `tre-403) (check-types ~.types-partial-unresolved-tag ~[%tests %golden ~.types-partial-unresolved-tag %source %jibb] src-403 `typ-403))
2091+ (weld (check ~.types-partial-unresolved-tag src-406 `tok-406 `tre-406) (check-types ~.types-partial-unresolved-tag ~[%tests %golden ~.types-partial-unresolved-tag %source %jibb] src-406 `typ-406))
2074::
2092::
2075:: +check: run golden:jibb on a case and compare both outputs
2093:: +check: run golden:jibb on a case and compare both outputs
2076::
2094::
tools/clay-fixtures+28
@@ -61,3 +61,31 @@ if result.stdout != expected:
61 print('actual: ', result.stdout.decode().rstrip(), file=sys.stderr)
61 print('actual: ', result.stdout.decode().rstrip(), file=sys.stderr)
62 sys.exit(1)
62 sys.exit(1)
63print('Clay importer/checker bridge golden passed')
63print('Clay importer/checker bridge golden passed')
64+
65+# A /sur with a Ford import has a different parent subject. This golden
66+# records the actual shape for provenance work without claiming support.
67+try:
68+ result = subprocess.run([str(ship), 'run', str(fixtures / 'ford.txt')],
69+ stdout=subprocess.PIPE, check=True)
70+except subprocess.CalledProcessError as error:
71+ sys.exit(error.returncode)
72+expected = (fixtures / 'ford-expected.txt').read_bytes()
73+if result.stdout != expected:
74+ print('Clay Ford subject differs from tests/clay-fixtures/ford-expected.txt', file=sys.stderr)
75+ print('expected:', expected.decode().rstrip(), file=sys.stderr)
76+ print('actual: ', result.stdout.decode().rstrip(), file=sys.stderr)
77+ sys.exit(1)
78+print('Clay Ford subject golden passed')
79+
80+try:
81+ result = subprocess.run([str(ship), 'run', str(fixtures / 'ford-import.txt')],
82+ stdout=subprocess.PIPE, check=True)
83+except subprocess.CalledProcessError as error:
84+ sys.exit(error.returncode)
85+expected = (fixtures / 'ford-import-expected.txt').read_bytes()
86+if result.stdout != expected:
87+ print('Clay Ford import differs from tests/clay-fixtures/ford-import-expected.txt', file=sys.stderr)
88+ print('expected:', expected.decode().rstrip(), file=sys.stderr)
89+ print('actual: ', result.stdout.decode().rstrip(), file=sys.stderr)
90+ sys.exit(1)
91+print('Clay Ford importer golden passed')
tools/importer-test+3−2
@@ -14,7 +14,8 @@ command = [str(root / 'tools' / 'hoon'), '--lib', str(root / 'jibb-dev' / 'lib'
14 '--cord', 'docs=' + str(fixture / 'tlon-docs.txt'),
14 '--cord', 'docs=' + str(fixture / 'tlon-docs.txt'),
15 '--cord', 'shadow=' + str(fixture / 'shadow.txt'),
15 '--cord', 'shadow=' + str(fixture / 'shadow.txt'),
16 '--cord', 'shadow-static=' + str(fixture / 'shadow-static.txt'),
16 '--cord', 'shadow-static=' + str(fixture / 'shadow-static.txt'),
17+ '--cord', 'ford=' + str(fixture / 'ford.txt'),
17− '(fixture-output small epic presence docs shadow shadow-static)']
18+ '(fixture-output small epic presence docs shadow shadow-static ford)']
18result = subprocess.run(command, stdout=subprocess.PIPE)
19result = subprocess.run(command, stdout=subprocess.PIPE)
19if result.returncode:
20if result.returncode:
20 sys.exit(result.returncode)
21 sys.exit(result.returncode)
@@ -26,4 +27,4 @@ if result.stdout != expected:
26 result.stdout.decode().splitlines(keepends=True),
27 result.stdout.decode().splitlines(keepends=True),
27 fromfile='expected tree.txt', tofile='actual types'))
28 fromfile='expected tree.txt', tofile='actual types'))
28 sys.exit(1)
29 sys.exit(1)
29−print('importer golden: 49 projections passed')
30+print('importer golden: 57 projections passed')