on master help sign in
Default decimal values and isolate import fixture failures
commit2d5deb253750cec37bd917f334ea1ce26ea56ed8 authoriko <mail@iko.soy> dateFri 30 Oct 2026, 18:23 (1 day ago) parentbd37989
31 files changed+496−200
README.md+3−3 docs/compiler.md+3−1 docs/development.md+4−2 docs/prelude-inventory.md+20−1 docs/status.md+8−7 jibb-dev/lib/jibb-import.hoon+33 jibb-dev/lib/jibb.hoon+31−2 tests/golden/types-import-missing-mold/about.txt+4 tests/golden/types-import-missing-mold/imports.txt+1 tests/golden/types-import-missing-mold/source.jibb+2 tests/golden/types-import-missing-mold/sur/fixture.txt+3 tests/golden/types-import-missing-mold/tokens.txt+11 tests/golden/types-import-missing-mold/tree.txt+6 tests/golden/types-import-missing-mold/types.txt+2 tests/golden/types-partial-atom-alias/types.txt+1−1 tests/golden/types-partial-aura/about.txt+1−1 tests/golden/types-partial-aura/types.txt+1−1 tests/golden/types-partial-decimal-default/about.txt+7 tests/golden/types-partial-decimal-default/source.jibb+6 tests/golden/types-partial-decimal-default/tokens.txt+34 tests/golden/types-partial-decimal-default/tree.txt+12 tests/golden/types-partial-decimal-default/types.txt+7 tests/importer/about.txt+2−1 tests/importer/small.txt+1 tests/importer/tree.txt+6 tests/lib/jibb.hoon+186−157 tools/golden+30−12 tools/importer-test+1−1 tools/ship+26−10 tools/testdata/selftest+40 tools/testdata/ship-selftest+4
README.md+3−3
@@ -16,7 +16,7 @@ Milestone 1 of the doc's eight, the parser and the `%jibb` mark, is done; milest
1616
1717## Golden tests
1818
19−Each case, `tests/golden/<case>/`, holds `source.jibb`, `about.txt` (where it comes from, what it tests, the expected outcome), and the expected outputs: `tokens.txt` from the layout pass and `tree.txt` from the parser. A file holds the output plus one trailing newline. A case may also have a `path.txt` specifying its logical `/ui/.../*.jibb` path. An `expect-types:` line in `about.txt` opts it into the provisional `golden-types` checker output in `types.txt`; `--update` creates it. A case can select Hoon molds in `imports.txt` and provide each module in `sur/<module>.txt`, as described in [docs/development.md](docs/development.md).
19+Each case, `tests/golden/<case>/`, holds `source.jibb`, `about.txt` (where it comes from, what it tests, the expected outcome), and the expected outputs: `tokens.txt` from the layout pass and `tree.txt` from the parser. A file holds the output plus one trailing newline. A case may also have a `path.txt` specifying its logical `/ui/.../*.jibb` path. An `expect-types:` line in `about.txt` opts it into the provisional `golden-types` checker output in `types.txt`; `--update` creates it. A case can select Hoon molds in `imports.txt` and provide each module in `sur/<module>.txt`, or select marks in `marks.txt` and provide their source in `mar/<name>.txt`, as described in [docs/development.md](docs/development.md).
2020
2121Run them without a ship. This needs `urbit` on PATH and Python 3.
2222
@@ -42,7 +42,7 @@ tools/hoon '(golden /a/b/jibb (crip "++ main view"))'
4242tools/hoon --raw --cord src=tests/golden/foo/source.jibb 'tree:(golden /a/b/jibb src)'
4343```
4444
45−`tools/testdata/selftest` tests both tools against a stub library, and `tools/doc-blocks` against Markdown it writes. `tools/importer-test` compares the partial Hoon importer's fixture projections against their golden file. `tools/type-import-test` checks the importer/checker bridge under eval; the ship suite runs the same fixture.
45+`tools/testdata/selftest` tests both tools against a stub library, and `tools/doc-blocks` against Markdown it writes. `tools/importer-test` compares the partial Hoon importer's fixture projections against their golden file. `tools/type-import-test` and `tools/type-mark-test` check the importer/checker bridges under eval; the ship suite runs the same fixtures.
4646
4747### The doc's examples
4848
@@ -86,7 +86,7 @@ A sync with nothing to commit takes about 2 s. A commit adds 3 to 10 s, and 300
8686
8787`tools/ship check-commit` proves that `|commit` stores `.jibb` files. It syncs `my-app`, reads every `/ui` file back with `%cx`, byte for byte, and converts `%jibb` to `%mime` and `%txt` and back. It commits half-written files, then deletes them. It merges a file that two desks changed on different lines, and checks that changes to the same line conflict. It can be rerun, and it leaves the two scratch desks it merges with (`%jibb-check-ours` and `%jibb-check-theirs`) holding only what `|new-desk` gives, unmounted.
8888
89−`tools/clay-fixtures` syncs `my-app`, builds its example `/sur` files and marks through Clay, and checks selected molds read from the compiled `/sur` type graphs. It compares both results with golden files under `tests/clay-fixtures/`.
89+`tools/clay-fixtures` syncs `my-app`, builds its example `/sur` files and marks through Clay, and checks selected types read from the compiled graphs and passed to the partial checker. It compares the results with golden files under `tests/clay-fixtures/`.
9090
9191For anything else:
9292
docs/compiler.md+3−1
@@ -56,10 +56,12 @@ The core is split into chapters, `+| %name`, in this order:
5656| `%span-check` | `+check-spans`, which `+golden` runs on every tree, and `+check-spans-test` |
5757| `%type-inference` | The initial inference fragment and its unification helpers; not yet a module type checker |
5858
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, preserve those constraints through aliases, instantiate them independently, and print multiple constraints. Numeric defaulting and other constraint cases 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, incompatible branches and overlapping union cases report both sites and excerpts. Concrete branch results can join at an explicitly present parent aura or `@`; function compatibility involving nested `@` and variable-dependent joins 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.
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, preserve those constraints through aliases, instantiate them independently, and print multiple constraints. Unresolved decimal variables default to `@ud` for inferred types without gates; defaulting inside gate types and other constraint cases remain incomplete. It does not yet check a module, 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, incompatible branches and overlapping union cases report both sites and excerpts. Concrete branch results can join at an explicitly present parent aura or `@`; function compatibility involving nested `@` and variable-dependent joins 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.
6060
6161The 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. The reader can also import a nonrecursive mark door sample, removing its outer sample face and validating its build subject; recursive mark samples fail closed until their source modules are tracked. Nested `$^`, other nested ordered maps, general source-level disjointness 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; `+golden-types-with-marks` accepts those same shapes from declared mark imports in a separate list. 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. Recursive results with Ford imports are rejected until references retain their source module. Its fixtures include three real Tlon files; `tools/importer-test` compares the internal projection under eval, and the ship test compares the same golden output. `tools/type-import-test` and `tools/type-mark-test` compare bridge reports under eval and on the ship. `tools/clay-fixtures` also passes Clay-built `/sur` molds and mark samples through the Clay-built importer and partial checker.
6262
63+Callers that have a `/sur` core and a name can use `+read-named`: it checks for a locally declared arm before asking Hoon to evaluate the mold, and reports evaluation failures with the final Hoon trace line. `+read-mold-in` remains available when the caller already has the selected type. The checker currently treats a failed import as unsupported rather than rendering the importer's error.
64+
6365And the design notes:
6466
6567| Note | Says |
docs/development.md+4−2
@@ -79,7 +79,7 @@ tools/importer-test # Hoon importer fixture projections match
7979tools/type-import-test # importer/checker bridge golden report matches
8080tools/type-mark-test # mark/checker bridge golden report matches
8181tools/hoon check-spans-test # prints <<>>
82−tools/testdata/selftest # 19 checks, 0 failed
82+tools/testdata/selftest # 20 checks, 0 failed
8383tools/doc-blocks docs/spec # every jibb block has its case
8484tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
8585tools/ship test # the cases pass as -test arms on the ship
@@ -99,7 +99,9 @@ A case is a folder `tests/golden/<name>/` holding:
9999- the expected outputs, `tokens.txt` and `tree.txt`, each the output plus one newline.
100100- optionally, `path.txt`, the logical `/ui/.../*.jibb` path to pass to the compiler; the source remains `source.jibb`.
101101- optionally, an `expect-types:` line in `about.txt` opts the case into `+golden-types`; `types.txt` holds its output plus one newline and `--update` creates it. A `types.txt` also opts in when the line is absent. This interface is provisional while the checker is under construction.
102−- optionally, `imports.txt` selects Hoon `/sur` molds, one `module mold` pair per line. Each module's source goes in `sur/<module>.txt` and is compiled against zuse by both runners. `marks.txt` selects marks, one name per line, with source in `mar/<name>.txt`; both kinds may be supplied together. The reader results go to the partial checker, and a type output is required. These fixtures currently handle only sources without Ford imports, not Jibb module fixtures.
102+- optionally, `imports.txt` selects Hoon `/sur` molds, one `module mold` pair per line. Each module's source goes in `sur/<module>.txt` and is compiled against zuse by both runners. `marks.txt` selects marks, one name per line, with source in `mar/<name>.txt`; both kinds may be supplied together. The reader results go to the partial checker, and a type output is required. Both runners reconstruct fixture text from `%txt` lines and identify the fixture if its compilation crashes; a crash fails the case without discarding its successful parse output. These fixtures currently handle only sources without Ford imports, not Jibb module fixtures.
103+
104+A zero-byte mark fixture currently fails ship synchronization validation after commit. Use a newline-only fixture to test an empty Hoon source on the ship.
103105
104106Names say what a case is for:
105107
docs/prelude-inventory.md+20−1
@@ -20,6 +20,25 @@ Hoon `+$` arms are marked **mold** below; `++` arms can be gates, doors or mold
2020
2121`biff`, `bind`, `bond`, `both`, `clap`, `clef`, `drop`, `fall`, `flit`, `hunt`, `lift`, `mate`, `need`, `some`.
2222
23+The following is an audit of the Hoon 135 bodies, not a completed Jibb interface. The current Jibb implementations have only been parsed; the checker and backend do not yet validate or run them.
24+
25+| Name | Hoon behavior | Jibb status |
26+| --- | --- | --- |
27+| `biff` | Applies a gate returning a unit to a present value; absent stays absent. | Written |
28+| `bind` | Applies a gate to a present value and wraps the result; absent stays absent. | Written |
29+| `bond` | Calls a fallback trap for an absent unit, otherwise returns its value. | Missing |
30+| `both` | Returns a unit of both values when both units are present. | Missing |
31+| `clap` | Returns the present unit if only one is present; combines both values with a gate if both are present. | Missing |
32+| `clef` | Applies a gate returning a unit when both inputs are present; otherwise returns an absent unit. | Missing |
33+| `drop` | Converts an absent unit to an empty list and a present unit to a singleton. | Written |
34+| `fall` | Returns the value of a present unit or the supplied fallback. | Written |
35+| `flit` | Returns a gate that wraps a value only if it satisfies the predicate. | Missing |
36+| `hunt` | Returns the only present unit or chooses between two present values with an ordering gate. | Missing |
37+| `lift` | Takes a mold and a unit, then applies the mold to a present value as `bind` does. | Missing; Jibb molds are not callable values |
38+| `mate` | Returns the present unit if only one is present; when both are present it returns one if their values are equal and crashes otherwise. | Missing |
39+| `need` | Extracts a present value and crashes on an absent unit. | Written |
40+| `some` | Wraps a value in a present unit. | Written |
41+
2342## 2b
2443
2544`snoc`, `lure`, `fand`, `find`, `flop`, `gulf`, `homo`, `join`, `bake`, `lent`, `levy`, `lien`, `limo`, `murn`, `oust`, `reap`, `rear`, `reel`, `roll`, `scag`, `skid`, `skim`, `skip`, `slag`, `snag`, `snip`, `sort`, `spin`, `spun`, `swag`, `turn`, `weld`, `snap`, `into`, `welp`, `zing`.
@@ -90,7 +109,7 @@ Hoon 135's `3g` section has exactly 12 exports: ten `+$` molds (`coin`, `dime`,
90109
91110| Hoon name | Source shape and Jibb audit |
92111| --- | --- |
93−| `coin` | A union of `[%$ p=dime]`, `[%blob p=*]`, and `[%many p=(list coin)]`. Its `$~` default is dropped: Jibb molds have no default. @iko approved `%$` as a Jibb term literal and pattern on 2026-10-30; the parser implements it and ship verification is pending. Its `%$` case uses the `dime` mold below. |
112+| `coin` | A union of `[%$ p=dime]`, `[%blob p=*]`, and `[%many p=(list coin)]`. Its `$~` default is dropped: Jibb molds have no default. @iko approved `%$` as a Jibb term literal and pattern on 2026-10-30; the parser implements it and its golden cases pass under eval and on the ship. Its `%$` case uses the `dime` mold below. |
94113| `dime` | `[p=@ta q=@]` in Hoon. The `q` field accepts any atom, as does Jibb `@` after @iko's decision in question 15. |
95114| `edge` | `[p=hair q=(unit [p=* q=nail])]`: a parsing position and either no result or a result and remaining input. |
96115| `hair` | `[p=@ud q=@ud]`: a parsing position. |
docs/status.md+8−7
@@ -19,7 +19,7 @@ On 2026-10-30, @iko decided that Jibb drops `$?`, so a `+$` takes a union's case
1919
2020## Milestone 2: in progress
2121
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; partial bridges pass selected Hoon atoms and unfaced cells from `/sur` molds and marks into inference. The reader handles nonrecursive mark samples, named recursion without Ford imports, nested collections, direct ordered maps, certain ordered-map fields, and direct `$^` unions whose cases can be proved disjoint. Recursive mark samples and recursive molds in Ford-importing subjects fail closed until their origin is tracked. Nested `$^`, other nested ordered maps, general union disjointness and complete import integration 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, including aliases; 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.
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; partial bridges pass selected Hoon atoms and unfaced cells from `/sur` molds and marks into inference. The reader handles nonrecursive mark samples, named recursion without Ford imports, nested collections, direct ordered maps, certain ordered-map fields, and direct `$^` unions whose cases can be proved disjoint. Recursive mark samples and recursive molds in Ford-importing subjects fail closed until their origin is tracked. Nested `$^`, other nested ordered maps, general union disjointness and complete import integration 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, including aliases. Unfixed decimal literals default to `@ud` in gate-free inferred types; other constraint cases and defaulting inside gate types still need work. Collection recognition checks the originating core and fails closed on shadows or unsupported Ford subject shapes; 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.
2323
2424## Milestone 1: parser and mark
2525
@@ -37,9 +37,9 @@ What the plan asks for, and where it is:
3737
3838Besides the plan's list:
3939
40−- 410 golden cases: 194 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 410-case corpus passed under `urbit eval` in 20.5 s. The fake ship passed all 414 tests, including the importer, importer/checker and mark/checker bridges, and unification checks, with 17.9 s for sync and 15.5 s for tests. The importer golden compares 68 projections; `tools/clay-fixtures` builds the example Hoon fixtures through Clay, reads selected molds and marks, and passes Clay-built types through the Clay-built importer and partial checker.
42−- `tools/testdata/selftest` (19 checks) and `tools/testdata/ship-selftest` test the tools themselves.
40+- 412 golden cases: 196 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 412-case corpus passed under `urbit eval` in 21.8 s. The fake ship passed all 416 tests, including the importer, importer/checker and mark/checker bridges, and unification checks, with 19.1 s for sync and 22.5 s for tests. The importer golden compares 74 projections; `tools/clay-fixtures` builds the example Hoon fixtures through Clay, reads selected molds and marks, and passes Clay-built types through the Clay-built importer and partial checker.
42+- `tools/testdata/selftest` (20 checks) and `tools/testdata/ship-selftest` test the tools themselves.
4343- 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.
4444- 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).
4545
@@ -60,14 +60,15 @@ Besides the plan's list:
6060| 26554ac | 2026-10-30 | Infer an atom constraint, extend the prelude and read example molds through Clay |
6161| fbeaa83 | 2026-10-30 | Extend atom constraints and nested ordered-map imports; connect Clay types to partial inference |
6262| 47a1f49 | 2026-10-30 | Read validated Ford imports, widen aura families, and show both sites of selected errors |
63−| This change | 2026-10-30 | Read mark samples and test partial mark imports; reject unproven nested `$^`; preserve atom constraints through aliases |
63+| bd37989 | 2026-10-30 | Read mark samples and test partial mark imports; reject unproven nested `$^`; preserve atom constraints through aliases |
64+| This change | 2026-10-30 | Default gate-free decimal types, validate named Hoon mold lookup, and isolate fixture failures |
6465
6566## Checking it
6667
6768On a machine set up as [development.md](development.md) says:
6869
6970```
70−tools/golden # 410 cases under urbit eval
71+tools/golden # 412 cases under urbit eval
7172tools/importer-test # the Hoon importer fixture projection
7273tools/type-import-test # the importer/checker bridge fixture
7374tools/type-mark-test # the mark/checker bridge fixture
@@ -76,7 +77,7 @@ tools/testdata/selftest # the tools themselves
7677tools/doc-blocks docs/spec # the doc's examples are golden cases
7778tools/ship start
7879tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
79−tools/ship test # the same 410 cases as -test arms on the ship
80+tools/ship test # the same 412 cases as -test arms on the ship
8081tools/testdata/ship-selftest
8182tools/ship check-commit # |commit stores .jibb files
8283tools/clay-fixtures # example /sur files and marks build through Clay
jibb-dev/lib/jibb-import.hoon+33
@@ -74,6 +74,9 @@
7474 ?. ?=([%core *] cor) [%| 'Hoon module provenance is unavailable']
7575 ?: =(cor -:!>(..zuse)) [%| 'Hoon module provenance is unavailable']
7676 ?. (scope-safe cor %$) [%| 'Hoon module provenance is unavailable']
77+ =/ chapters=(map term tome) q.r.q.cor
78+ ?. (lien ~(tap by chapters) |=(entry=[term tome] =((chapter-has +.entry name) [~ &])))
79+ [%| (crip "Hoon mold `{(trip name)}` is not declared")]
7780 ?. =(typ (~(play ut cor) (ream (cat 3 '*' name))))
7881 [%| 'Hoon module provenance does not match the selected mold']
7982 =/ result (read-with module name typ [~ cor])
@@ -82,6 +85,30 @@
8285 [%| 'a recursive Hoon mold with Ford imports needs source-aware import']
8386 result
8487::
88+:: +read-named is the source-aware entry point for callers that have
89+:: not selected a Hoon type yet. Check the core and the local arm
90+:: before invoking Hoon's type engine, which otherwise crashes when
91+:: the requested name is absent.
92+++ read-named
93+ |= [module=term name=term cor=type]
94+ ^- (each imported @t)
95+ ?. ?=([%core *] cor) [%| 'Hoon module provenance is unavailable']
96+ ?: =(cor -:!>(..zuse)) [%| 'Hoon module provenance is unavailable']
97+ ?. (scope-safe cor %$) [%| 'Hoon module provenance is unavailable']
98+ =/ chapters=(map term tome) q.r.q.cor
99+ ?. (lien ~(tap by chapters) |=(entry=[term tome] =((chapter-has +.entry name) [~ &])))
100+ [%| (crip "Hoon mold `{(trip name)}` is not declared")]
101+ =/ attempted=(each type tang)
102+ (mule |.((~(play ut cor) (ream (cat 3 '*' name)))))
103+ ?- attempted
104+ [%& *] (read-mold-in module name p.attempted cor)
105+ [%| *]
106+ =/ lines=wall (zing (turn (flop p.attempted) |=(a=tank (wash [0 80] a))))
107+ =/ rev=wall (flop lines)
108+ ?~ rev [%| (crip "Hoon mold `{(trip name)}` could not be evaluated")]
109+ [%| (crip "Hoon mold `{(trip name)}` could not be evaluated: {i.rev}")]
110+ ==
111+::
85112:: A mark door's payload is [sample build-subject]. Its outer sample
86113:: face names the door sample, not the imported mark type. Collection
87114:: lookup for the sample happened against the pre-door build subject.
@@ -956,6 +983,12 @@
956983 (crip "shadow-jar: {(show-result (shad %aa))}")
957984 (crip "shadow-jug: {(show-result (shad %bb))}")
958985 (crip "no-provenance: {(show-result (read-mold %small %jar-test (~(play ut sc) (ream '*jar-test'))))}")
986+ (crip "named-not-mold: {(show-result (read-named %small %not-mold sc))}")
987+ (crip "named-present: {(show-result (read-named %small %items sc))}")
988+ (crip "named-missing: {(show-result (read-named %small %missing sc))}")
989+ (crip "named-invalid-core: {(show-result (read-named %small %items [%atom %ud ~]))}")
990+ (crip "named-ford-recursive: {(show-result (read-named %ford %recursive fc))}")
991+ (crip "missing-arm: {(show-result (read-mold-in %small %missing [%atom %ud ~] sc))}")
959992 (crip "wrong-provenance: {(show-result (read-mold-in %small %action (~(play ut sc) (ream '*items')) sc))}")
960993 (crip "unverified-subject: {(show-result (read-mold-in %std %jar (~(play ut -:!>(..zuse)) (ream '*(jar @ud @t)')) -:!>(..zuse)))}")
961994 (crip "presence-topic: {(show-result (present %topic))}")
jibb-dev/lib/jibb.hoon+31−2
@@ -4891,6 +4891,35 @@
48914891 [%cell $(t hed.t) $(t tal.t)]
48924892 t
48934893::
4894+::
4895+:: Default decimal variables only in types with no gates. A gate can
4896+:: generalize an aura from its sample, which requires constraint analysis
4897+:: beyond this fragment; leave those cases unresolved.
4898+::
4899+++ itype-has-gate
4900+ |= t=itype
4901+ ^- ?
4902+ ?- -.t
4903+ %fn &
4904+ %cell |($(t hed.t) $(t tal.t))
4905+ %var |
4906+ %avar |
4907+ %nvar |
4908+ %atom |
4909+ %any-atom |
4910+ %flag |
4911+ ==
4912+::
4913+++ default-decimals
4914+ |= t=itype
4915+ ^- itype
4916+ ?: (itype-has-gate t) t
4917+ ?- -.t
4918+ %nvar [%atom %ud]
4919+ %cell [%cell $(t hed.t) $(t tal.t)]
4920+ * t
4921+ ==
4922+::
48944923++ itype-vars
48954924 |= t=itype
48964925 ^- (list @ud)
@@ -5471,7 +5500,7 @@
54715500 =/ result=iresult (infer-fragment val.d env [0 ~ ~ ~ molds globals externals surs mark-externals marks ~ |])
54725501 ?: ?=(%| -.result) $(ds t.ds)
54735502 ?: (constrained-capitals caps.state.p.result sub.state.p.result) $(ds t.ds)
5474− =/ typ=itype (itype-normalize typ.p.result sub.state.p.result)
5503+ =/ typ=itype (default-decimals (itype-normalize typ.p.result sub.state.p.result))
54755504 ?: (unsupported-atom-vars typ caps.state.p.result binders.state.p.result sub.state.p.result) $(ds t.ds)
54765505 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
54775506 ?: (gth (lent vars) 26) $(ds t.ds)
@@ -5698,7 +5727,7 @@
56985727 $(ds t.ds, lines [(show-inference-diagnostic file src name.d p.result) lines])
56995728 ?: (constrained-capitals caps.state.p.result sub.state.p.result)
57005729 $(ds t.ds, lines [(crip "++ {(trip name.d)}: explicit capital constraints are not supported by partial inference") lines])
5701− =/ typ=itype (itype-normalize typ.p.result sub.state.p.result)
5730+ =/ typ=itype (default-decimals (itype-normalize typ.p.result sub.state.p.result))
57025731 ?: (unsupported-atom-vars typ caps.state.p.result binders.state.p.result sub.state.p.result)
57035732 $(ds t.ds, lines [(crip "++ {(trip name.d)}: unresolved aura-variable inference") lines])
57045733 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
tests/golden/types-import-missing-mold/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Imports: `/- todo` imports molds from a Hoon `/sur` file; unsupported imports are errors where used.
2+tests: The selected `/sur` fixture has no `missing` mold. The reader reports the missing name without crashing the golden runner; partial inference does not claim to check the value.
3+expect: parses
4+expect-types: partial inference reports the imported mold as unsupported
tests/golden/types-import-missing-mold/imports.txtnew file+1
@@ -0,0 +1 @@
1+fixture missing
tests/golden/types-import-missing-mold/source.jibbnew file+2
@@ -0,0 +1,2 @@
1+/- fixture
2+++ identity |= x=missing.fixture x
tests/golden/types-import-missing-mold/sur/fixture.txtnew file+3
@@ -0,0 +1,3 @@
1+|%
2++$ title @t
3+--
tests/golden/types-import-missing-mold/tokens.txtnew file+11
@@ -0,0 +1,11 @@
1+1:1 glyph /-
2+1:5 name fixture
3+2:1 NEWLINE
4+2:1 glyph ++
5+2:4 name identity
6+2:13 glyph |=
7+2:16 name x
8+2:17 tight glyph =
9+2:18 tight wing missing.fixture
10+2:34 name x
11+2:35 NEWLINE
tests/golden/types-import-missing-mold/tree.txtnew file+6
@@ -0,0 +1,6 @@
1+(module
2+ (sur 1:1 fixture)
3+ (value 2:1 identity
4+ (gate 2:13
5+ (face 2:16 x (ref 2:18 missing.fixture))
6+ (wing 2:34 x))))
tests/golden/types-import-missing-mold/types.txtnew file+2
@@ -0,0 +1,2 @@
1+partial inference; module not checked
2+++ identity: sample mold is not supported by partial inference
tests/golden/types-partial-atom-alias/types.txt+1−1
@@ -11,7 +11,7 @@ partial inference; module not checked
1111/tests/golden/types-partial-atom-alias/source.jibb:8:15: argument has type [@p @t]
1212++ bad (alias [~zod "hi"])
1313 ^
14−++ number: unresolved aura-variable inference
14+++ number: @ud
1515++ relay: cast mold and expression type do not unify
1616/tests/golden/types-partial-atom-alias/source.jibb:10:13: cast mold has type ?
1717++ relay ^- ? (alias 7)
tests/golden/types-partial-aura/about.txt+1−1
@@ -1,4 +1,4 @@
11source: Grammar tab, Molds: "every expression has a principal type, and there is no general subtyping".
2−tests: partial inference: an open numeric aura, an aura fixed by a cast, and an incompatible cast.
2+tests: partial inference: a defaulted decimal aura, an aura fixed by a cast, and an incompatible cast.
33expect: parses
44expect-types: a partial inference report, not a checked module
tests/golden/types-partial-aura/types.txt+1−1
@@ -1,5 +1,5 @@
11partial inference; module not checked
2−++ n: unresolved aura-variable inference
2+++ n: @ud
33++ good: @ux
44++ bad: cast mold and expression type do not unify
55/tests/golden/types-partial-aura/source.jibb:3:11: cast mold has type ?
tests/golden/types-partial-decimal-default/about.txtnew file+7
@@ -0,0 +1,7 @@
1+Grammar, Literals by context: "A number takes `@ud` only if nothing fixes
2+its aura and its `++` isn't generic over it". Partial inference defaults
3+numbers when the complete inferred type is gate-free, including tuple
4+positions and a polymorphic identity call. A later definition sees the
5+defaulted dependency. Gate types remain unsupported until the checker can
6+establish which aura variables are generalized. This report does not claim
7+that the module has been checked.
tests/golden/types-partial-decimal-default/source.jibbnew file+6
@@ -0,0 +1,6 @@
1+++ later count
2+++ count 7
3+++ pair [1 2]
4+++ id |= x x
5+++ applied (id 5)
6+++ gate |= x 9
tests/golden/types-partial-decimal-default/tokens.txtnew file+34
@@ -0,0 +1,34 @@
1+1:1 glyph ++
2+1:4 name later
3+1:10 name count
4+2:1 NEWLINE
5+2:1 glyph ++
6+2:4 name count
7+2:10 lit 7
8+3:1 NEWLINE
9+3:1 glyph ++
10+3:4 name pair
11+3:9 glyph [
12+3:10 tight lit 1
13+3:12 lit 2
14+3:13 tight glyph ]
15+4:1 NEWLINE
16+4:1 glyph ++
17+4:4 name id
18+4:7 glyph |=
19+4:10 name x
20+4:12 name x
21+5:1 NEWLINE
22+5:1 glyph ++
23+5:4 name applied
24+5:12 glyph (
25+5:13 tight name id
26+5:16 lit 5
27+5:17 tight glyph )
28+6:1 NEWLINE
29+6:1 glyph ++
30+6:4 name gate
31+6:9 glyph |=
32+6:12 name x
33+6:14 lit 9
34+6:15 NEWLINE
tests/golden/types-partial-decimal-default/tree.txtnew file+12
@@ -0,0 +1,12 @@
1+(module
2+ (value 1:1 later (wing 1:10 count))
3+ (value 2:1 count (lit 2:10 7))
4+ (value 3:1 pair
5+ (tuple 3:9 (lit 3:10 1) (lit 3:12 2)))
6+ (value 4:1 id
7+ (gate 4:7 (bind 4:10 x) (wing 4:12 x)))
8+ (value 5:1 applied
9+ (group 5:12
10+ (call 5:13 (wing 5:13 id) (lit 5:16 5))))
11+ (value 6:1 gate
12+ (gate 6:9 (bind 6:12 x) (lit 6:14 9))))
tests/golden/types-partial-decimal-default/types.txtnew file+7
@@ -0,0 +1,7 @@
1+partial inference; module not checked
2+++ later: @ud
3+++ count: @ud
4+++ pair: [@ud @ud]
5+++ id: $-(A A)
6+++ applied: @ud
7+++ gate: unresolved aura-variable inference
tests/importer/about.txt+2−1
@@ -5,7 +5,8 @@ list shadow alongside a nested ordered map is rejected. Static sibling
55collections and dependent sibling molds are tested separately. Nested `$^`
66cases fail closed, while nested `$@` cases remain supported. `ford.txt`
77checks a synthetic imported subject and selected mold; other cases check
8−transitive imports, shadowing, malformed subjects and recursion whose
8+transitive imports, named mold lookup, missing names, shadowing, malformed
9+subjects and recursion whose
910origin cannot yet be established. The mark fixtures check door samples,
1011collection provenance, unsupported gates and recursive sample rejection.
1112The synthetic hold in +bad-branch-fixture checks that a failed Hoon branch expansion returns
tests/importer/small.txt+1
@@ -1,4 +1,5 @@
11|%
2+++ not-mold 42
23+$ action $%([%add text=@t] [%remove id=@ud])
34+$ item [id=@ud text=@t]
45+$ optional $@(@ud [name=@t stamp=@ud])
tests/importer/tree.txt+6
@@ -57,6 +57,12 @@ shadow-mop: error: Hoon collection provenance is unavailable or shadowed
5757shadow-jar: error: Hoon collection provenance is unavailable or shadowed
5858shadow-jug: error: Hoon collection provenance is unavailable or shadowed
5959no-provenance: error: Hoon collection provenance is unavailable or shadowed
60+named-not-mold: error: Hoon mold `not-mold` could not be evaluated: -find.$
61+named-present: (map @ud [id=@ud text=@t])
62+named-missing: error: Hoon mold `missing` is not declared
63+named-invalid-core: error: Hoon module provenance is unavailable
64+named-ford-recursive: error: a recursive Hoon mold with Ford imports needs source-aware import
65+missing-arm: error: Hoon mold `missing` is not declared
6066wrong-provenance: error: Hoon module provenance does not match the selected mold
6167unverified-subject: error: Hoon module provenance is unavailable
6268presence-topic: (union other typing computing)
tests/lib/jibb.hoon+186−157
@@ -1174,124 +1174,133 @@
11741174/* typ-381 %txt /tests/golden/types-import-mark/types/txt
11751175/* imp-381-1 %txt /tests/golden/types-import-mark/sur/fixture/txt
11761176/* mark-381-1 %txt /tests/golden/types-import-mark/mar/label/txt
1177−/* src-382 %jibb /tests/golden/types-import-sur/source/jibb
1178−/* tok-382 %txt /tests/golden/types-import-sur/tokens/txt
1179−/* tre-382 %txt /tests/golden/types-import-sur/tree/txt
1180−/* typ-382 %txt /tests/golden/types-import-sur/types/txt
1181−/* imp-382-1 %txt /tests/golden/types-import-sur/sur/fixture/txt
1182−/* imp-382-2 %txt /tests/golden/types-import-sur/sur/fixture/txt
1183−/* src-383 %jibb /tests/golden/types-partial-apply/source/jibb
1184−/* tok-383 %txt /tests/golden/types-partial-apply/tokens/txt
1185−/* tre-383 %txt /tests/golden/types-partial-apply/tree/txt
1186−/* typ-383 %txt /tests/golden/types-partial-apply/types/txt
1187−/* src-384 %jibb /tests/golden/types-partial-atom-alias/source/jibb
1188−/* tok-384 %txt /tests/golden/types-partial-atom-alias/tokens/txt
1189−/* tre-384 %txt /tests/golden/types-partial-atom-alias/tree/txt
1190−/* typ-384 %txt /tests/golden/types-partial-atom-alias/types/txt
1191−/* src-385 %jibb /tests/golden/types-partial-atom-constraint/source/jibb
1192−/* tok-385 %txt /tests/golden/types-partial-atom-constraint/tokens/txt
1193−/* tre-385 %txt /tests/golden/types-partial-atom-constraint/tree/txt
1194−/* typ-385 %txt /tests/golden/types-partial-atom-constraint/types/txt
1195−/* src-386 %jibb /tests/golden/types-partial-atom-widening/source/jibb
1196−/* tok-386 %txt /tests/golden/types-partial-atom-widening/tokens/txt
1197−/* tre-386 %txt /tests/golden/types-partial-atom-widening/tree/txt
1198−/* typ-386 %txt /tests/golden/types-partial-atom-widening/types/txt
1199−/* src-387 %jibb /tests/golden/types-partial-aura/source/jibb
1200−/* tok-387 %txt /tests/golden/types-partial-aura/tokens/txt
1201−/* tre-387 %txt /tests/golden/types-partial-aura/tree/txt
1202−/* typ-387 %txt /tests/golden/types-partial-aura/types/txt
1203−/* src-388 %jibb /tests/golden/types-partial-aura-family/source/jibb
1204−/* tok-388 %txt /tests/golden/types-partial-aura-family/tokens/txt
1205−/* tre-388 %txt /tests/golden/types-partial-aura-family/tree/txt
1206−/* typ-388 %txt /tests/golden/types-partial-aura-family/types/txt
1207−/* src-389 %jibb /tests/golden/types-partial-aura-generalization/source/jibb
1208−/* tok-389 %txt /tests/golden/types-partial-aura-generalization/tokens/txt
1209−/* tre-389 %txt /tests/golden/types-partial-aura-generalization/tree/txt
1210−/* typ-389 %txt /tests/golden/types-partial-aura-generalization/types/txt
1211−/* src-390 %jibb /tests/golden/types-partial-bare-atom/source/jibb
1212−/* tok-390 %txt /tests/golden/types-partial-bare-atom/tokens/txt
1213−/* tre-390 %txt /tests/golden/types-partial-bare-atom/tree/txt
1214−/* typ-390 %txt /tests/golden/types-partial-bare-atom/types/txt
1215−/* src-391 %jibb /tests/golden/types-partial-branch-widening/source/jibb
1216−/* tok-391 %txt /tests/golden/types-partial-branch-widening/tokens/txt
1217−/* tre-391 %txt /tests/golden/types-partial-branch-widening/tree/txt
1218−/* typ-391 %txt /tests/golden/types-partial-branch-widening/types/txt
1219−/* src-392 %jibb /tests/golden/types-partial-conflicting-sites/source/jibb
1220−/* tok-392 %txt /tests/golden/types-partial-conflicting-sites/tokens/txt
1221−/* tre-392 %txt /tests/golden/types-partial-conflicting-sites/tree/txt
1222−/* typ-392 %txt /tests/golden/types-partial-conflicting-sites/types/txt
1223−/* src-393 %jibb /tests/golden/types-partial-dependency-chain/source/jibb
1224−/* tok-393 %txt /tests/golden/types-partial-dependency-chain/tokens/txt
1225−/* tre-393 %txt /tests/golden/types-partial-dependency-chain/tree/txt
1226−/* typ-393 %txt /tests/golden/types-partial-dependency-chain/types/txt
1227−/* src-394 %jibb /tests/golden/types-partial-explicit-capital/source/jibb
1228−/* tok-394 %txt /tests/golden/types-partial-explicit-capital/tokens/txt
1229−/* tre-394 %txt /tests/golden/types-partial-explicit-capital/tree/txt
1230−/* typ-394 %txt /tests/golden/types-partial-explicit-capital/types/txt
1231−/* src-395 %jibb /tests/golden/types-partial-forward/source/jibb
1232−/* tok-395 %txt /tests/golden/types-partial-forward/tokens/txt
1233−/* tre-395 %txt /tests/golden/types-partial-forward/tree/txt
1234−/* typ-395 %txt /tests/golden/types-partial-forward/types/txt
1235−/* src-396 %jibb /tests/golden/types-partial-generalization/source/jibb
1236−/* tok-396 %txt /tests/golden/types-partial-generalization/tokens/txt
1237−/* tre-396 %txt /tests/golden/types-partial-generalization/tree/txt
1238−/* typ-396 %txt /tests/golden/types-partial-generalization/types/txt
1239−/* src-397 %jibb /tests/golden/types-partial-identity/source/jibb
1240−/* tok-397 %txt /tests/golden/types-partial-identity/tokens/txt
1241−/* tre-397 %txt /tests/golden/types-partial-identity/tree/txt
1242−/* typ-397 %txt /tests/golden/types-partial-identity/types/txt
1243−/* src-398 %jibb /tests/golden/types-partial-independent-atoms/source/jibb
1244−/* tok-398 %txt /tests/golden/types-partial-independent-atoms/tokens/txt
1245−/* tre-398 %txt /tests/golden/types-partial-independent-atoms/tree/txt
1246−/* typ-398 %txt /tests/golden/types-partial-independent-atoms/types/txt
1247−/* src-399 %jibb /tests/golden/types-partial-many-atom-constraints/source/jibb
1248−/* tok-399 %txt /tests/golden/types-partial-many-atom-constraints/tokens/txt
1249−/* tre-399 %txt /tests/golden/types-partial-many-atom-constraints/tree/txt
1250−/* typ-399 %txt /tests/golden/types-partial-many-atom-constraints/types/txt
1251−/* src-400 %jibb /tests/golden/types-partial-mold-bare-aura/source/jibb
1252−/* tok-400 %txt /tests/golden/types-partial-mold-bare-aura/tokens/txt
1253−/* tre-400 %txt /tests/golden/types-partial-mold-bare-aura/tree/txt
1254−/* typ-400 %txt /tests/golden/types-partial-mold-bare-aura/types/txt
1255−/* src-401 %jibb /tests/golden/types-partial-mold-composite/source/jibb
1256−/* tok-401 %txt /tests/golden/types-partial-mold-composite/tokens/txt
1257−/* tre-401 %txt /tests/golden/types-partial-mold-composite/tree/txt
1258−/* typ-401 %txt /tests/golden/types-partial-mold-composite/types/txt
1259−/* src-402 %jibb /tests/golden/types-partial-mold-forward/source/jibb
1260−/* tok-402 %txt /tests/golden/types-partial-mold-forward/tokens/txt
1261−/* tre-402 %txt /tests/golden/types-partial-mold-forward/tree/txt
1262−/* typ-402 %txt /tests/golden/types-partial-mold-forward/types/txt
1263−/* src-403 %jibb /tests/golden/types-partial-mold-recursive/source/jibb
1264−/* tok-403 %txt /tests/golden/types-partial-mold-recursive/tokens/txt
1265−/* tre-403 %txt /tests/golden/types-partial-mold-recursive/tree/txt
1266−/* typ-403 %txt /tests/golden/types-partial-mold-recursive/types/txt
1267−/* src-404 %jibb /tests/golden/types-partial-occurs/source/jibb
1268−/* tok-404 %txt /tests/golden/types-partial-occurs/tokens/txt
1269−/* tre-404 %txt /tests/golden/types-partial-occurs/tree/txt
1270−/* typ-404 %txt /tests/golden/types-partial-occurs/types/txt
1271−/* src-405 %jibb /tests/golden/types-partial-projection/source/jibb
1272−/* tok-405 %txt /tests/golden/types-partial-projection/tokens/txt
1273−/* tre-405 %txt /tests/golden/types-partial-projection/tree/txt
1274−/* typ-405 %txt /tests/golden/types-partial-projection/types/txt
1275−/* src-406 %jibb /tests/golden/types-partial-shadow-global/source/jibb
1276−/* tok-406 %txt /tests/golden/types-partial-shadow-global/tokens/txt
1277−/* tre-406 %txt /tests/golden/types-partial-shadow-global/tree/txt
1278−/* typ-406 %txt /tests/golden/types-partial-shadow-global/types/txt
1279−/* src-407 %jibb /tests/golden/types-partial-shared-tvar/source/jibb
1280−/* tok-407 %txt /tests/golden/types-partial-shared-tvar/tokens/txt
1281−/* tre-407 %txt /tests/golden/types-partial-shared-tvar/tree/txt
1282−/* typ-407 %txt /tests/golden/types-partial-shared-tvar/types/txt
1283−/* src-408 %jibb /tests/golden/types-partial-union-cases/source/jibb
1284−/* tok-408 %txt /tests/golden/types-partial-union-cases/tokens/txt
1285−/* tre-408 %txt /tests/golden/types-partial-union-cases/tree/txt
1286−/* typ-408 %txt /tests/golden/types-partial-union-cases/types/txt
1287−/* src-409 %jibb /tests/golden/types-partial-union-edges/source/jibb
1288−/* tok-409 %txt /tests/golden/types-partial-union-edges/tokens/txt
1289−/* tre-409 %txt /tests/golden/types-partial-union-edges/tree/txt
1290−/* typ-409 %txt /tests/golden/types-partial-union-edges/types/txt
1291−/* src-410 %jibb /tests/golden/types-partial-unresolved-tag/source/jibb
1292−/* tok-410 %txt /tests/golden/types-partial-unresolved-tag/tokens/txt
1293−/* tre-410 %txt /tests/golden/types-partial-unresolved-tag/tree/txt
1294−/* typ-410 %txt /tests/golden/types-partial-unresolved-tag/types/txt
1177+/* src-382 %jibb /tests/golden/types-import-missing-mold/source/jibb
1178+/* tok-382 %txt /tests/golden/types-import-missing-mold/tokens/txt
1179+/* tre-382 %txt /tests/golden/types-import-missing-mold/tree/txt
1180+/* typ-382 %txt /tests/golden/types-import-missing-mold/types/txt
1181+/* imp-382-1 %txt /tests/golden/types-import-missing-mold/sur/fixture/txt
1182+/* src-383 %jibb /tests/golden/types-import-sur/source/jibb
1183+/* tok-383 %txt /tests/golden/types-import-sur/tokens/txt
1184+/* tre-383 %txt /tests/golden/types-import-sur/tree/txt
1185+/* typ-383 %txt /tests/golden/types-import-sur/types/txt
1186+/* imp-383-1 %txt /tests/golden/types-import-sur/sur/fixture/txt
1187+/* imp-383-2 %txt /tests/golden/types-import-sur/sur/fixture/txt
1188+/* src-384 %jibb /tests/golden/types-partial-apply/source/jibb
1189+/* tok-384 %txt /tests/golden/types-partial-apply/tokens/txt
1190+/* tre-384 %txt /tests/golden/types-partial-apply/tree/txt
1191+/* typ-384 %txt /tests/golden/types-partial-apply/types/txt
1192+/* src-385 %jibb /tests/golden/types-partial-atom-alias/source/jibb
1193+/* tok-385 %txt /tests/golden/types-partial-atom-alias/tokens/txt
1194+/* tre-385 %txt /tests/golden/types-partial-atom-alias/tree/txt
1195+/* typ-385 %txt /tests/golden/types-partial-atom-alias/types/txt
1196+/* src-386 %jibb /tests/golden/types-partial-atom-constraint/source/jibb
1197+/* tok-386 %txt /tests/golden/types-partial-atom-constraint/tokens/txt
1198+/* tre-386 %txt /tests/golden/types-partial-atom-constraint/tree/txt
1199+/* typ-386 %txt /tests/golden/types-partial-atom-constraint/types/txt
1200+/* src-387 %jibb /tests/golden/types-partial-atom-widening/source/jibb
1201+/* tok-387 %txt /tests/golden/types-partial-atom-widening/tokens/txt
1202+/* tre-387 %txt /tests/golden/types-partial-atom-widening/tree/txt
1203+/* typ-387 %txt /tests/golden/types-partial-atom-widening/types/txt
1204+/* src-388 %jibb /tests/golden/types-partial-aura/source/jibb
1205+/* tok-388 %txt /tests/golden/types-partial-aura/tokens/txt
1206+/* tre-388 %txt /tests/golden/types-partial-aura/tree/txt
1207+/* typ-388 %txt /tests/golden/types-partial-aura/types/txt
1208+/* src-389 %jibb /tests/golden/types-partial-aura-family/source/jibb
1209+/* tok-389 %txt /tests/golden/types-partial-aura-family/tokens/txt
1210+/* tre-389 %txt /tests/golden/types-partial-aura-family/tree/txt
1211+/* typ-389 %txt /tests/golden/types-partial-aura-family/types/txt
1212+/* src-390 %jibb /tests/golden/types-partial-aura-generalization/source/jibb
1213+/* tok-390 %txt /tests/golden/types-partial-aura-generalization/tokens/txt
1214+/* tre-390 %txt /tests/golden/types-partial-aura-generalization/tree/txt
1215+/* typ-390 %txt /tests/golden/types-partial-aura-generalization/types/txt
1216+/* src-391 %jibb /tests/golden/types-partial-bare-atom/source/jibb
1217+/* tok-391 %txt /tests/golden/types-partial-bare-atom/tokens/txt
1218+/* tre-391 %txt /tests/golden/types-partial-bare-atom/tree/txt
1219+/* typ-391 %txt /tests/golden/types-partial-bare-atom/types/txt
1220+/* src-392 %jibb /tests/golden/types-partial-branch-widening/source/jibb
1221+/* tok-392 %txt /tests/golden/types-partial-branch-widening/tokens/txt
1222+/* tre-392 %txt /tests/golden/types-partial-branch-widening/tree/txt
1223+/* typ-392 %txt /tests/golden/types-partial-branch-widening/types/txt
1224+/* src-393 %jibb /tests/golden/types-partial-conflicting-sites/source/jibb
1225+/* tok-393 %txt /tests/golden/types-partial-conflicting-sites/tokens/txt
1226+/* tre-393 %txt /tests/golden/types-partial-conflicting-sites/tree/txt
1227+/* typ-393 %txt /tests/golden/types-partial-conflicting-sites/types/txt
1228+/* src-394 %jibb /tests/golden/types-partial-decimal-default/source/jibb
1229+/* tok-394 %txt /tests/golden/types-partial-decimal-default/tokens/txt
1230+/* tre-394 %txt /tests/golden/types-partial-decimal-default/tree/txt
1231+/* typ-394 %txt /tests/golden/types-partial-decimal-default/types/txt
1232+/* src-395 %jibb /tests/golden/types-partial-dependency-chain/source/jibb
1233+/* tok-395 %txt /tests/golden/types-partial-dependency-chain/tokens/txt
1234+/* tre-395 %txt /tests/golden/types-partial-dependency-chain/tree/txt
1235+/* typ-395 %txt /tests/golden/types-partial-dependency-chain/types/txt
1236+/* src-396 %jibb /tests/golden/types-partial-explicit-capital/source/jibb
1237+/* tok-396 %txt /tests/golden/types-partial-explicit-capital/tokens/txt
1238+/* tre-396 %txt /tests/golden/types-partial-explicit-capital/tree/txt
1239+/* typ-396 %txt /tests/golden/types-partial-explicit-capital/types/txt
1240+/* src-397 %jibb /tests/golden/types-partial-forward/source/jibb
1241+/* tok-397 %txt /tests/golden/types-partial-forward/tokens/txt
1242+/* tre-397 %txt /tests/golden/types-partial-forward/tree/txt
1243+/* typ-397 %txt /tests/golden/types-partial-forward/types/txt
1244+/* src-398 %jibb /tests/golden/types-partial-generalization/source/jibb
1245+/* tok-398 %txt /tests/golden/types-partial-generalization/tokens/txt
1246+/* tre-398 %txt /tests/golden/types-partial-generalization/tree/txt
1247+/* typ-398 %txt /tests/golden/types-partial-generalization/types/txt
1248+/* src-399 %jibb /tests/golden/types-partial-identity/source/jibb
1249+/* tok-399 %txt /tests/golden/types-partial-identity/tokens/txt
1250+/* tre-399 %txt /tests/golden/types-partial-identity/tree/txt
1251+/* typ-399 %txt /tests/golden/types-partial-identity/types/txt
1252+/* src-400 %jibb /tests/golden/types-partial-independent-atoms/source/jibb
1253+/* tok-400 %txt /tests/golden/types-partial-independent-atoms/tokens/txt
1254+/* tre-400 %txt /tests/golden/types-partial-independent-atoms/tree/txt
1255+/* typ-400 %txt /tests/golden/types-partial-independent-atoms/types/txt
1256+/* src-401 %jibb /tests/golden/types-partial-many-atom-constraints/source/jibb
1257+/* tok-401 %txt /tests/golden/types-partial-many-atom-constraints/tokens/txt
1258+/* tre-401 %txt /tests/golden/types-partial-many-atom-constraints/tree/txt
1259+/* typ-401 %txt /tests/golden/types-partial-many-atom-constraints/types/txt
1260+/* src-402 %jibb /tests/golden/types-partial-mold-bare-aura/source/jibb
1261+/* tok-402 %txt /tests/golden/types-partial-mold-bare-aura/tokens/txt
1262+/* tre-402 %txt /tests/golden/types-partial-mold-bare-aura/tree/txt
1263+/* typ-402 %txt /tests/golden/types-partial-mold-bare-aura/types/txt
1264+/* src-403 %jibb /tests/golden/types-partial-mold-composite/source/jibb
1265+/* tok-403 %txt /tests/golden/types-partial-mold-composite/tokens/txt
1266+/* tre-403 %txt /tests/golden/types-partial-mold-composite/tree/txt
1267+/* typ-403 %txt /tests/golden/types-partial-mold-composite/types/txt
1268+/* src-404 %jibb /tests/golden/types-partial-mold-forward/source/jibb
1269+/* tok-404 %txt /tests/golden/types-partial-mold-forward/tokens/txt
1270+/* tre-404 %txt /tests/golden/types-partial-mold-forward/tree/txt
1271+/* typ-404 %txt /tests/golden/types-partial-mold-forward/types/txt
1272+/* src-405 %jibb /tests/golden/types-partial-mold-recursive/source/jibb
1273+/* tok-405 %txt /tests/golden/types-partial-mold-recursive/tokens/txt
1274+/* tre-405 %txt /tests/golden/types-partial-mold-recursive/tree/txt
1275+/* typ-405 %txt /tests/golden/types-partial-mold-recursive/types/txt
1276+/* src-406 %jibb /tests/golden/types-partial-occurs/source/jibb
1277+/* tok-406 %txt /tests/golden/types-partial-occurs/tokens/txt
1278+/* tre-406 %txt /tests/golden/types-partial-occurs/tree/txt
1279+/* typ-406 %txt /tests/golden/types-partial-occurs/types/txt
1280+/* src-407 %jibb /tests/golden/types-partial-projection/source/jibb
1281+/* tok-407 %txt /tests/golden/types-partial-projection/tokens/txt
1282+/* tre-407 %txt /tests/golden/types-partial-projection/tree/txt
1283+/* typ-407 %txt /tests/golden/types-partial-projection/types/txt
1284+/* src-408 %jibb /tests/golden/types-partial-shadow-global/source/jibb
1285+/* tok-408 %txt /tests/golden/types-partial-shadow-global/tokens/txt
1286+/* tre-408 %txt /tests/golden/types-partial-shadow-global/tree/txt
1287+/* typ-408 %txt /tests/golden/types-partial-shadow-global/types/txt
1288+/* src-409 %jibb /tests/golden/types-partial-shared-tvar/source/jibb
1289+/* tok-409 %txt /tests/golden/types-partial-shared-tvar/tokens/txt
1290+/* tre-409 %txt /tests/golden/types-partial-shared-tvar/tree/txt
1291+/* typ-409 %txt /tests/golden/types-partial-shared-tvar/types/txt
1292+/* src-410 %jibb /tests/golden/types-partial-union-cases/source/jibb
1293+/* tok-410 %txt /tests/golden/types-partial-union-cases/tokens/txt
1294+/* tre-410 %txt /tests/golden/types-partial-union-cases/tree/txt
1295+/* typ-410 %txt /tests/golden/types-partial-union-cases/types/txt
1296+/* src-411 %jibb /tests/golden/types-partial-union-edges/source/jibb
1297+/* tok-411 %txt /tests/golden/types-partial-union-edges/tokens/txt
1298+/* tre-411 %txt /tests/golden/types-partial-union-edges/tree/txt
1299+/* typ-411 %txt /tests/golden/types-partial-union-edges/types/txt
1300+/* src-412 %jibb /tests/golden/types-partial-unresolved-tag/source/jibb
1301+/* tok-412 %txt /tests/golden/types-partial-unresolved-tag/tokens/txt
1302+/* tre-412 %txt /tests/golden/types-partial-unresolved-tag/tree/txt
1303+/* typ-412 %txt /tests/golden/types-partial-unresolved-tag/types/txt
12951304|%
12961305:: one arm per case
12971306::
@@ -2057,64 +2066,68 @@
20572066 (weld (check ~.prelude-unit-list-transforms src-380 `tok-380 `tre-380) (check-types ~.prelude-unit-list-transforms ~[%tests %golden ~.prelude-unit-list-transforms %source %jibb] src-380 `typ-380))
20582067++ test-types-import-mark
20592068 (weld (check ~.types-import-mark src-381 `tok-381 `tre-381) (check-mark-types ~.types-import-mark ~[%tests %golden ~.types-import-mark %source %jibb] src-381 `typ-381 ~[[%fixture %title imp-381-1]] ~[[%label mark-381-1]]))
2069+++ test-types-import-missing-mold
2070+ (weld (check ~.types-import-missing-mold src-382 `tok-382 `tre-382) (check-import-types ~.types-import-missing-mold ~[%tests %golden ~.types-import-missing-mold %source %jibb] src-382 `typ-382 ~[[%fixture %missing imp-382-1]]))
20602071++ test-types-import-sur
2061− (weld (check ~.types-import-sur src-382 `tok-382 `tre-382) (check-import-types ~.types-import-sur ~[%tests %golden ~.types-import-sur %source %jibb] src-382 `typ-382 ~[[%fixture %title imp-382-1] [%fixture %pair imp-382-2]]))
2072+ (weld (check ~.types-import-sur src-383 `tok-383 `tre-383) (check-import-types ~.types-import-sur ~[%tests %golden ~.types-import-sur %source %jibb] src-383 `typ-383 ~[[%fixture %title imp-383-1] [%fixture %pair imp-383-2]]))
20622073++ test-types-partial-apply
2063− (weld (check ~.types-partial-apply src-383 `tok-383 `tre-383) (check-types ~.types-partial-apply ~[%tests %golden ~.types-partial-apply %source %jibb] src-383 `typ-383))
2074+ (weld (check ~.types-partial-apply src-384 `tok-384 `tre-384) (check-types ~.types-partial-apply ~[%tests %golden ~.types-partial-apply %source %jibb] src-384 `typ-384))
20642075++ test-types-partial-atom-alias
2065− (weld (check ~.types-partial-atom-alias src-384 `tok-384 `tre-384) (check-types ~.types-partial-atom-alias ~[%tests %golden ~.types-partial-atom-alias %source %jibb] src-384 `typ-384))
2076+ (weld (check ~.types-partial-atom-alias src-385 `tok-385 `tre-385) (check-types ~.types-partial-atom-alias ~[%tests %golden ~.types-partial-atom-alias %source %jibb] src-385 `typ-385))
20662077++ test-types-partial-atom-constraint
2067− (weld (check ~.types-partial-atom-constraint src-385 `tok-385 `tre-385) (check-types ~.types-partial-atom-constraint ~[%tests %golden ~.types-partial-atom-constraint %source %jibb] src-385 `typ-385))
2078+ (weld (check ~.types-partial-atom-constraint src-386 `tok-386 `tre-386) (check-types ~.types-partial-atom-constraint ~[%tests %golden ~.types-partial-atom-constraint %source %jibb] src-386 `typ-386))
20682079++ test-types-partial-atom-widening
2069− (weld (check ~.types-partial-atom-widening src-386 `tok-386 `tre-386) (check-types ~.types-partial-atom-widening ~[%tests %golden ~.types-partial-atom-widening %source %jibb] src-386 `typ-386))
2080+ (weld (check ~.types-partial-atom-widening src-387 `tok-387 `tre-387) (check-types ~.types-partial-atom-widening ~[%tests %golden ~.types-partial-atom-widening %source %jibb] src-387 `typ-387))
20702081++ test-types-partial-aura
2071− (weld (check ~.types-partial-aura src-387 `tok-387 `tre-387) (check-types ~.types-partial-aura ~[%tests %golden ~.types-partial-aura %source %jibb] src-387 `typ-387))
2082+ (weld (check ~.types-partial-aura src-388 `tok-388 `tre-388) (check-types ~.types-partial-aura ~[%tests %golden ~.types-partial-aura %source %jibb] src-388 `typ-388))
20722083++ test-types-partial-aura-family
2073− (weld (check ~.types-partial-aura-family src-388 `tok-388 `tre-388) (check-types ~.types-partial-aura-family ~[%tests %golden ~.types-partial-aura-family %source %jibb] src-388 `typ-388))
2084+ (weld (check ~.types-partial-aura-family src-389 `tok-389 `tre-389) (check-types ~.types-partial-aura-family ~[%tests %golden ~.types-partial-aura-family %source %jibb] src-389 `typ-389))
20742085++ test-types-partial-aura-generalization
2075− (weld (check ~.types-partial-aura-generalization src-389 `tok-389 `tre-389) (check-types ~.types-partial-aura-generalization ~[%tests %golden ~.types-partial-aura-generalization %source %jibb] src-389 `typ-389))
2086+ (weld (check ~.types-partial-aura-generalization src-390 `tok-390 `tre-390) (check-types ~.types-partial-aura-generalization ~[%tests %golden ~.types-partial-aura-generalization %source %jibb] src-390 `typ-390))
20762087++ test-types-partial-bare-atom
2077− (weld (check ~.types-partial-bare-atom src-390 `tok-390 `tre-390) (check-types ~.types-partial-bare-atom ~[%tests %golden ~.types-partial-bare-atom %source %jibb] src-390 `typ-390))
2088+ (weld (check ~.types-partial-bare-atom src-391 `tok-391 `tre-391) (check-types ~.types-partial-bare-atom ~[%tests %golden ~.types-partial-bare-atom %source %jibb] src-391 `typ-391))
20782089++ test-types-partial-branch-widening
2079− (weld (check ~.types-partial-branch-widening src-391 `tok-391 `tre-391) (check-types ~.types-partial-branch-widening ~[%tests %golden ~.types-partial-branch-widening %source %jibb] src-391 `typ-391))
2090+ (weld (check ~.types-partial-branch-widening src-392 `tok-392 `tre-392) (check-types ~.types-partial-branch-widening ~[%tests %golden ~.types-partial-branch-widening %source %jibb] src-392 `typ-392))
20802091++ test-types-partial-conflicting-sites
2081− (weld (check ~.types-partial-conflicting-sites src-392 `tok-392 `tre-392) (check-types ~.types-partial-conflicting-sites ~[%tests %golden ~.types-partial-conflicting-sites %source %jibb] src-392 `typ-392))
2092+ (weld (check ~.types-partial-conflicting-sites src-393 `tok-393 `tre-393) (check-types ~.types-partial-conflicting-sites ~[%tests %golden ~.types-partial-conflicting-sites %source %jibb] src-393 `typ-393))
2093+++ test-types-partial-decimal-default
2094+ (weld (check ~.types-partial-decimal-default src-394 `tok-394 `tre-394) (check-types ~.types-partial-decimal-default ~[%tests %golden ~.types-partial-decimal-default %source %jibb] src-394 `typ-394))
20822095++ test-types-partial-dependency-chain
2083− (weld (check ~.types-partial-dependency-chain src-393 `tok-393 `tre-393) (check-types ~.types-partial-dependency-chain ~[%tests %golden ~.types-partial-dependency-chain %source %jibb] src-393 `typ-393))
2096+ (weld (check ~.types-partial-dependency-chain src-395 `tok-395 `tre-395) (check-types ~.types-partial-dependency-chain ~[%tests %golden ~.types-partial-dependency-chain %source %jibb] src-395 `typ-395))
20842097++ test-types-partial-explicit-capital
2085− (weld (check ~.types-partial-explicit-capital src-394 `tok-394 `tre-394) (check-types ~.types-partial-explicit-capital ~[%tests %golden ~.types-partial-explicit-capital %source %jibb] src-394 `typ-394))
2098+ (weld (check ~.types-partial-explicit-capital src-396 `tok-396 `tre-396) (check-types ~.types-partial-explicit-capital ~[%tests %golden ~.types-partial-explicit-capital %source %jibb] src-396 `typ-396))
20862099++ test-types-partial-forward
2087− (weld (check ~.types-partial-forward src-395 `tok-395 `tre-395) (check-types ~.types-partial-forward ~[%tests %golden ~.types-partial-forward %source %jibb] src-395 `typ-395))
2100+ (weld (check ~.types-partial-forward src-397 `tok-397 `tre-397) (check-types ~.types-partial-forward ~[%tests %golden ~.types-partial-forward %source %jibb] src-397 `typ-397))
20882101++ test-types-partial-generalization
2089− (weld (check ~.types-partial-generalization src-396 `tok-396 `tre-396) (check-types ~.types-partial-generalization ~[%tests %golden ~.types-partial-generalization %source %jibb] src-396 `typ-396))
2102+ (weld (check ~.types-partial-generalization src-398 `tok-398 `tre-398) (check-types ~.types-partial-generalization ~[%tests %golden ~.types-partial-generalization %source %jibb] src-398 `typ-398))
20902103++ test-types-partial-identity
2091− (weld (check ~.types-partial-identity src-397 `tok-397 `tre-397) (check-types ~.types-partial-identity ~[%tests %golden ~.types-partial-identity %source %jibb] src-397 `typ-397))
2104+ (weld (check ~.types-partial-identity src-399 `tok-399 `tre-399) (check-types ~.types-partial-identity ~[%tests %golden ~.types-partial-identity %source %jibb] src-399 `typ-399))
20922105++ test-types-partial-independent-atoms
2093− (weld (check ~.types-partial-independent-atoms src-398 `tok-398 `tre-398) (check-types ~.types-partial-independent-atoms ~[%tests %golden ~.types-partial-independent-atoms %source %jibb] src-398 `typ-398))
2106+ (weld (check ~.types-partial-independent-atoms src-400 `tok-400 `tre-400) (check-types ~.types-partial-independent-atoms ~[%tests %golden ~.types-partial-independent-atoms %source %jibb] src-400 `typ-400))
20942107++ test-types-partial-many-atom-constraints
2095− (weld (check ~.types-partial-many-atom-constraints src-399 `tok-399 `tre-399) (check-types ~.types-partial-many-atom-constraints ~[%tests %golden ~.types-partial-many-atom-constraints %source %jibb] src-399 `typ-399))
2108+ (weld (check ~.types-partial-many-atom-constraints src-401 `tok-401 `tre-401) (check-types ~.types-partial-many-atom-constraints ~[%tests %golden ~.types-partial-many-atom-constraints %source %jibb] src-401 `typ-401))
20962109++ test-types-partial-mold-bare-aura
2097− (weld (check ~.types-partial-mold-bare-aura src-400 `tok-400 `tre-400) (check-types ~.types-partial-mold-bare-aura ~[%tests %golden ~.types-partial-mold-bare-aura %source %jibb] src-400 `typ-400))
2110+ (weld (check ~.types-partial-mold-bare-aura src-402 `tok-402 `tre-402) (check-types ~.types-partial-mold-bare-aura ~[%tests %golden ~.types-partial-mold-bare-aura %source %jibb] src-402 `typ-402))
20982111++ test-types-partial-mold-composite
2099− (weld (check ~.types-partial-mold-composite src-401 `tok-401 `tre-401) (check-types ~.types-partial-mold-composite ~[%tests %golden ~.types-partial-mold-composite %source %jibb] src-401 `typ-401))
2112+ (weld (check ~.types-partial-mold-composite src-403 `tok-403 `tre-403) (check-types ~.types-partial-mold-composite ~[%tests %golden ~.types-partial-mold-composite %source %jibb] src-403 `typ-403))
21002113++ test-types-partial-mold-forward
2101− (weld (check ~.types-partial-mold-forward src-402 `tok-402 `tre-402) (check-types ~.types-partial-mold-forward ~[%tests %golden ~.types-partial-mold-forward %source %jibb] src-402 `typ-402))
2114+ (weld (check ~.types-partial-mold-forward src-404 `tok-404 `tre-404) (check-types ~.types-partial-mold-forward ~[%tests %golden ~.types-partial-mold-forward %source %jibb] src-404 `typ-404))
21022115++ test-types-partial-mold-recursive
2103− (weld (check ~.types-partial-mold-recursive src-403 `tok-403 `tre-403) (check-types ~.types-partial-mold-recursive ~[%tests %golden ~.types-partial-mold-recursive %source %jibb] src-403 `typ-403))
2116+ (weld (check ~.types-partial-mold-recursive src-405 `tok-405 `tre-405) (check-types ~.types-partial-mold-recursive ~[%tests %golden ~.types-partial-mold-recursive %source %jibb] src-405 `typ-405))
21042117++ test-types-partial-occurs
2105− (weld (check ~.types-partial-occurs src-404 `tok-404 `tre-404) (check-types ~.types-partial-occurs ~[%tests %golden ~.types-partial-occurs %source %jibb] src-404 `typ-404))
2118+ (weld (check ~.types-partial-occurs src-406 `tok-406 `tre-406) (check-types ~.types-partial-occurs ~[%tests %golden ~.types-partial-occurs %source %jibb] src-406 `typ-406))
21062119++ test-types-partial-projection
2107− (weld (check ~.types-partial-projection src-405 `tok-405 `tre-405) (check-types ~.types-partial-projection ~[%tests %golden ~.types-partial-projection %source %jibb] src-405 `typ-405))
2120+ (weld (check ~.types-partial-projection src-407 `tok-407 `tre-407) (check-types ~.types-partial-projection ~[%tests %golden ~.types-partial-projection %source %jibb] src-407 `typ-407))
21082121++ test-types-partial-shadow-global
2109− (weld (check ~.types-partial-shadow-global src-406 `tok-406 `tre-406) (check-types ~.types-partial-shadow-global ~[%tests %golden ~.types-partial-shadow-global %source %jibb] src-406 `typ-406))
2122+ (weld (check ~.types-partial-shadow-global src-408 `tok-408 `tre-408) (check-types ~.types-partial-shadow-global ~[%tests %golden ~.types-partial-shadow-global %source %jibb] src-408 `typ-408))
21102123++ test-types-partial-shared-tvar
2111− (weld (check ~.types-partial-shared-tvar src-407 `tok-407 `tre-407) (check-types ~.types-partial-shared-tvar ~[%tests %golden ~.types-partial-shared-tvar %source %jibb] src-407 `typ-407))
2124+ (weld (check ~.types-partial-shared-tvar src-409 `tok-409 `tre-409) (check-types ~.types-partial-shared-tvar ~[%tests %golden ~.types-partial-shared-tvar %source %jibb] src-409 `typ-409))
21122125++ test-types-partial-union-cases
2113− (weld (check ~.types-partial-union-cases src-408 `tok-408 `tre-408) (check-types ~.types-partial-union-cases ~[%tests %golden ~.types-partial-union-cases %source %jibb] src-408 `typ-408))
2126+ (weld (check ~.types-partial-union-cases src-410 `tok-410 `tre-410) (check-types ~.types-partial-union-cases ~[%tests %golden ~.types-partial-union-cases %source %jibb] src-410 `typ-410))
21142127++ test-types-partial-union-edges
2115− (weld (check ~.types-partial-union-edges src-409 `tok-409 `tre-409) (check-types ~.types-partial-union-edges ~[%tests %golden ~.types-partial-union-edges %source %jibb] src-409 `typ-409))
2128+ (weld (check ~.types-partial-union-edges src-411 `tok-411 `tre-411) (check-types ~.types-partial-union-edges ~[%tests %golden ~.types-partial-union-edges %source %jibb] src-411 `typ-411))
21162129++ test-types-partial-unresolved-tag
2117− (weld (check ~.types-partial-unresolved-tag src-410 `tok-410 `tre-410) (check-types ~.types-partial-unresolved-tag ~[%tests %golden ~.types-partial-unresolved-tag %source %jibb] src-410 `typ-410))
2130+ (weld (check ~.types-partial-unresolved-tag src-412 `tok-412 `tre-412) (check-types ~.types-partial-unresolved-tag ~[%tests %golden ~.types-partial-unresolved-tag %source %jibb] src-412 `typ-412))
21182131::
21192132:: +check: run golden:jibb on a case and compare both outputs
21202133::
@@ -2179,34 +2192,50 @@
21792192++ check-import-types
21802193 |= [case=@ta at=path src=@t want=(unit wain) fixtures=(list [module=term mold=term source=wain])]
21812194 ^- tang
2182− ?: (lien fixtures |=(f=[module=term mold=term source=wain] ?=(~ source.f)))
2183− ~[leaf+"an imported Hoon fixture is missing or empty"]
2195+ =/ result (mule |.((import-types-result at src fixtures)))
2196+ ?: ?=(%| -.result)
2197+ [leaf+"fixture compilation or type checking crashed" p.result]
2198+ (compare (file case "types.txt") want p.result)
2199+::
2200+++ import-types-result
2201+ |= [at=path src=@t fixtures=(list [module=term mold=term source=wain])]
2202+ ^- @t
21842203 =/ external=(list [module=term name=term result=*])
21852204 %+ turn fixtures
21862205 |= fixture=[module=term mold=term source=wain]
2206+ ~_ leaf+"/sur/{(trip module.fixture)}.txt fixture"
2207+ ?~ source.fixture !!
21872208 =/ text=@t (rap 3 (turn source.fixture |=(line=@t (cat 3 line '\0a'))))
21882209 =/ cor=type -:(ride -:!>(..zuse) text)
2189− =/ typ=type (~(play ut cor) (ream (cat 3 '*' mold.fixture)))
2190− [module.fixture mold.fixture (read-mold-in:jibb-import module.fixture mold.fixture typ cor)]
2191− (compare (file case "types.txt") want (golden-types-imports:jibb at src external))
2210+ [module.fixture mold.fixture (read-named:jibb-import module.fixture mold.fixture cor)]
2211+ (golden-types-imports:jibb at src external)
21922212::
21932213++ check-mark-types
21942214 |= [case=@ta at=path src=@t want=(unit wain) fixtures=(list [module=term mold=term source=wain]) marks=(list [name=term source=wain])]
21952215 ^- tang
2196− ?: |((lien fixtures |=(f=[module=term mold=term source=wain] ?=(~ source.f))) (lien marks |=(m=[name=term source=wain] ?=(~ source.m))))
2197− ~[leaf+"an imported Hoon fixture is missing or empty"]
2216+ =/ result (mule |.((mark-types-result at src fixtures marks)))
2217+ ?: ?=(%| -.result)
2218+ [leaf+"fixture compilation or type checking crashed" p.result]
2219+ (compare (file case "types.txt") want p.result)
2220+::
2221+++ mark-types-result
2222+ |= [at=path src=@t fixtures=(list [module=term mold=term source=wain]) marks=(list [name=term source=wain])]
2223+ ^- @t
21982224 =/ external=(list [module=term name=term result=*])
21992225 %+ turn fixtures
22002226 |= fixture=[module=term mold=term source=wain]
2227+ ~_ leaf+"/sur/{(trip module.fixture)}.txt fixture"
2228+ ?~ source.fixture !!
22012229 =/ text=@t (rap 3 (turn source.fixture |=(line=@t (cat 3 line '\0a'))))
22022230 =/ cor=type -:(ride -:!>(..zuse) text)
2203− =/ typ=type (~(play ut cor) (ream (cat 3 '*' mold.fixture)))
2204− [module.fixture mold.fixture (read-mold-in:jibb-import module.fixture mold.fixture typ cor)]
2231+ [module.fixture mold.fixture (read-named:jibb-import module.fixture mold.fixture cor)]
22052232 =/ mark-external=(list [name=term result=*])
22062233 %+ turn marks
22072234 |= fixture=[name=term source=wain]
2235+ ~_ leaf+"/mar/{(trip name.fixture)}.txt fixture"
2236+ ?~ source.fixture !!
22082237 =/ text=@t (rap 3 (turn source.fixture |=(line=@t (cat 3 line '\0a'))))
22092238 =/ cor=type -:(ride -:!>(..zuse) text)
22102239 [name.fixture (read-mark:jibb-import name.fixture cor)]
2211− (compare (file case "types.txt") want (golden-types-with-marks:jibb at src external mark-external))
2240+ (golden-types-with-marks:jibb at src external mark-external)
22122241--
tools/golden+30−12
@@ -58,12 +58,15 @@ HARNESS = r""":: The harness tools/golden writes after the library. It runs
5858 |= [name=@t metadata=[logical=(unit path) check=? imports=(list [module=term mold=term source=@t]) marks=(list [name=term source=@t])] src=@t]
5959 ^- @t
6060 =/ at=path ?~(logical.metadata (file name) u.logical.metadata)
61− =/ res (mule |.([(golden:lib at src) {types-expr}]))
62− ?: ?=(%| -.res)
63− =/ why=@t (crash p.res)
61+ =/ parsed (mule |.((golden:lib at src)))
62+ ?: ?=(%| -.parsed)
63+ =/ why=@t (crash p.parsed)
6464 (fields ~[name 'crash' why why why])
65− =/ out=[[tokens=@t tree=@t] types=@t] p.res
66− (fields ~[name 'ok' tokens.out tree.out types.out])
65+ =/ out=[tokens=@t tree=@t] p.parsed
66+ =/ typed (mule |.({types-expr}))
67+ ?: ?=(%| -.typed)
68+ (fields ~[name 'types-crash' tokens.out tree.out (crash p.typed)])
69+ (fields ~[name 'ok' tokens.out tree.out p.typed])
6770::
6871++ file
6972 |= name=@
@@ -98,17 +101,27 @@ IMPORT_HELPER = r"""
98101 ^- (list [module=term name=term result=*])
99102 %+ turn fixtures
100103 |= fixture=[module=term mold=term source=@t]
101− =/ cor=type -:(ride -:!>(..zuse) source.fixture)
102− =/ typ=type (~(play ut cor) (ream (cat 3 '*' mold.fixture)))
103− [module.fixture mold.fixture (read-mold-in:reader module.fixture mold.fixture typ cor)]
104+ ~_ leaf+"/sur/{(trip module.fixture)}.txt fixture"
105+ =/ source=@t (fixture-text source.fixture)
106+ ?~ source !!
107+ =/ cor=type -:(ride -:!>(..zuse) source)
108+ [module.fixture mold.fixture (read-named:reader module.fixture mold.fixture cor)]
104109::
105110++ import-marks
106111 |= fixtures=(list [name=term source=@t])
107112 ^- (list [name=term result=*])
108113 %+ turn fixtures
109114 |= fixture=[name=term source=@t]
110− =/ cor=type -:(ride -:!>(..zuse) source.fixture)
115+ ~_ leaf+"/mar/{(trip name.fixture)}.txt fixture"
116+ =/ source=@t (fixture-text source.fixture)
117+ ?~ source !!
118+ =/ cor=type -:(ride -:!>(..zuse) source)
111119 [name.fixture (read-mark:reader name.fixture cor)]
120+:: Clay's %txt mark supplies lines, with a newline reconstructed per line.
121+++ fixture-text
122+ |= source=@t
123+ ^- @t
124+ (rap 3 (turn (to-wain:format source) |=(line=@t (cat 3 line '\0a'))))
112125"""
113126
114127
@@ -136,6 +149,7 @@ class Case:
136149 with open(self.source_path, 'rb') as f:
137150 self.source = f.read()
138151 self.crashed = False
152+ self.crash_kind = 'tokens' # the output holding a crash's trace
139153 self.crash_at = None # the innermost library spot of a crash
140154 self.outputs = {} # 'tokens' and 'tree' -> bytes
141155
@@ -251,11 +265,15 @@ def decode(prog, noun, cases):
251265 if name != case.name.encode():
252266 raise ue.ToolError('the harness output is out of order at %s'
253267 % case.name)
254− case.crashed = status == b'crash'
255− if case.crashed:
268+ case.crashed = status in (b'crash', b'types-crash')
269+ if status == b'crash':
256270 tokens, case.crash_at = crash_text(
257271 prog, tokens.decode('utf-8', 'surrogateescape').split('\n'))
258272 tree = types = tokens
273+ elif status == b'types-crash':
274+ case.crash_kind = 'types'
275+ types, case.crash_at = crash_text(
276+ prog, types.decode('utf-8', 'surrogateescape').split('\n'))
259277 case.outputs = {'tokens': tokens, 'tree': tree}
260278 if case.want_types:
261279 case.outputs['types'] = types
@@ -356,7 +374,7 @@ def compare(case):
356374 """PASS or FAIL lines for one case."""
357375 if case.crashed:
358376 out = [colour('31', 'FAIL') + ' %s: crashed' % case.name]
359− out += [' ' + l for l in case.outputs['tokens']
377+ out += [' ' + l for l in case.outputs[case.crash_kind]
360378 .decode('utf-8', 'surrogateescape').split('\n')]
361379 if case.crash_at is not None:
362380 out += [' at %s' % case.crash_at.label(),
tools/importer-test+1−1
@@ -31,4 +31,4 @@ if result.stdout != expected:
3131 result.stdout.decode().splitlines(keepends=True),
3232 fromfile='expected tree.txt', tofile='actual types'))
3333 sys.exit(1)
34−print('importer golden: 68 projections passed')
34+print('importer golden: 74 projections passed')
tools/ship+26−10
@@ -1140,38 +1140,54 @@ def generate_tests(golden):
11401140++ check-import-types
11411141 |= [case=@ta at=path src=@t want=(unit wain) fixtures=(list [module=term mold=term source=wain])]
11421142 ^- tang
1143− ?: (lien fixtures |=(f=[module=term mold=term source=wain] ?=(~ source.f)))
1144− ~[leaf+"an imported Hoon fixture is missing or empty"]
1143+ =/ result (mule |.((import-types-result at src fixtures)))
1144+ ?: ?=(%| -.result)
1145+ [leaf+"fixture compilation or type checking crashed" p.result]
1146+ (compare (file case "types.txt") want p.result)
1147+::
1148+++ import-types-result
1149+ |= [at=path src=@t fixtures=(list [module=term mold=term source=wain])]
1150+ ^- @t
11451151 =/ external=(list [module=term name=term result=*])
11461152 %+ turn fixtures
11471153 |= fixture=[module=term mold=term source=wain]
1154+ ~_ leaf+"/sur/{(trip module.fixture)}.txt fixture"
1155+ ?~ source.fixture !!
11481156 =/ text=@t (rap 3 (turn source.fixture |=(line=@t (cat 3 line '\\0a'))))
11491157 =/ cor=type -:(ride -:!>(..zuse) text)
1150− =/ typ=type (~(play ut cor) (ream (cat 3 '*' mold.fixture)))
1151− [module.fixture mold.fixture (read-mold-in:jibb-import module.fixture mold.fixture typ cor)]
1152− (compare (file case "types.txt") want (golden-types-imports:jibb at src external))
1158+ [module.fixture mold.fixture (read-named:jibb-import module.fixture mold.fixture cor)]
1159+ (golden-types-imports:jibb at src external)
11531160'''
11541161 if has_marks:
11551162 types_helper += '''::
11561163++ check-mark-types
11571164 |= [case=@ta at=path src=@t want=(unit wain) fixtures=(list [module=term mold=term source=wain]) marks=(list [name=term source=wain])]
11581165 ^- tang
1159− ?: |((lien fixtures |=(f=[module=term mold=term source=wain] ?=(~ source.f))) (lien marks |=(m=[name=term source=wain] ?=(~ source.m))))
1160− ~[leaf+"an imported Hoon fixture is missing or empty"]
1166+ =/ result (mule |.((mark-types-result at src fixtures marks)))
1167+ ?: ?=(%| -.result)
1168+ [leaf+"fixture compilation or type checking crashed" p.result]
1169+ (compare (file case "types.txt") want p.result)
1170+::
1171+++ mark-types-result
1172+ |= [at=path src=@t fixtures=(list [module=term mold=term source=wain]) marks=(list [name=term source=wain])]
1173+ ^- @t
11611174 =/ external=(list [module=term name=term result=*])
11621175 %+ turn fixtures
11631176 |= fixture=[module=term mold=term source=wain]
1177+ ~_ leaf+"/sur/{(trip module.fixture)}.txt fixture"
1178+ ?~ source.fixture !!
11641179 =/ text=@t (rap 3 (turn source.fixture |=(line=@t (cat 3 line '\\0a'))))
11651180 =/ cor=type -:(ride -:!>(..zuse) text)
1166− =/ typ=type (~(play ut cor) (ream (cat 3 '*' mold.fixture)))
1167− [module.fixture mold.fixture (read-mold-in:jibb-import module.fixture mold.fixture typ cor)]
1181+ [module.fixture mold.fixture (read-named:jibb-import module.fixture mold.fixture cor)]
11681182 =/ mark-external=(list [name=term result=*])
11691183 %+ turn marks
11701184 |= fixture=[name=term source=wain]
1185+ ~_ leaf+"/mar/{(trip name.fixture)}.txt fixture"
1186+ ?~ source.fixture !!
11711187 =/ text=@t (rap 3 (turn source.fixture |=(line=@t (cat 3 line '\\0a'))))
11721188 =/ cor=type -:(ride -:!>(..zuse) text)
11731189 [name.fixture (read-mark:jibb-import name.fixture cor)]
1174− (compare (file case "types.txt") want (golden-types-with-marks:jibb at src external mark-external))
1190+ (golden-types-with-marks:jibb at src external mark-external)
11751191'''
11761192 return '\n'.join(lines) + '\n' + TESTS_HELPERS.replace('\n--\n', '\n' + types_helper + '--\n')
11771193
tools/testdata/selftest+40
@@ -287,6 +287,46 @@ def check_crash_isolated(c, tmp):
287287 '--update should not write a crash:\n' + out)
288288
289289
290+def check_fixture_crash_isolated(c, tmp):
291+ """A bad Hoon fixture must not hide the Jibb parse or other cases."""
292+ original = os.path.join(ROOT, 'tests', 'golden', 'types-import-mark')
293+ cases = os.path.join(tmp, 'fixture-cases')
294+ os.makedirs(cases)
295+ for name in ('good', 'bad', 'empty', 'mark-only'):
296+ shutil.copytree(original, os.path.join(cases, name))
297+ with open(os.path.join(cases, 'bad', 'mar', 'label.txt'), 'w') as f:
298+ f.write('not hoon\n')
299+ with open(os.path.join(cases, 'empty', 'mar', 'label.txt'), 'w'):
300+ pass
301+ # Clay's %txt mark treats the last unterminated line as a line too.
302+ good = os.path.join(cases, 'good', 'mar', 'label.txt')
303+ with open(good, 'rb') as f:
304+ without_newline = f.read().rstrip(b'\n')
305+ with open(good, 'wb') as f:
306+ f.write(without_newline)
307+ only = os.path.join(cases, 'mark-only')
308+ os.remove(os.path.join(only, 'imports.txt'))
309+ with open(os.path.join(only, 'source.jibb'), 'w') as f:
310+ f.write('/% %label\n++ label-id |= x=label x\n')
311+ status, out = golden('--dir', cases, '--show')
312+ c.expect(status == 1, 'fixture failure must fail the run: %d\n%s' % (status, out))
313+ c.expect('==> bad: tokens <==\n1:1' in out and
314+ '==> bad: tree <==\n(module' in out and
315+ '==> bad: types <==\nCRASH\n/mar/label.txt fixture' in out,
316+ 'malformed fixture should preserve parse and name the fixture:\n' + out)
317+ c.expect('==> empty: types <==\nCRASH\n/mar/label.txt fixture' in out,
318+ 'empty fixture should name the fixture:\n' + out)
319+ for name in ('good', 'mark-only'):
320+ c.expect(('==> %s: types <==\npartial inference; module not checked\n'
321+ '++ label-id: $-(@t @t)') % name in out,
322+ 'valid fixture should be isolated: ' + name + '\n' + out)
323+ expected = read(os.path.join(cases, 'bad', 'types.txt'))
324+ status, out = golden('--dir', cases, '--case', 'bad', '--update')
325+ c.expect(status == 1 and read(os.path.join(cases, 'bad', 'types.txt')) == expected and
326+ 'CRASH' in out and '/mar/label.txt fixture' in out,
327+ 'update must report the fixture crash and leave outputs alone:\n' + out)
328+
329+
290330def check_eval_death(c, tmp):
291331 cases = copy_cases(tmp)
292332 add_case(cases, 'bails', b'bail\n')
tools/testdata/ship-selftest+4
@@ -177,6 +177,10 @@ def generator_checks(tmp):
177177 '/tests/golden/molds/mar/label/txt' in out and
178178 '[%label mark-1-1]' in out and '[%fixture %title imp-1-1]' in out and
179179 '(golden-types-with-marks:jibb at src external mark-external)' in out, out)
180+ check('fixture crashes are caught with the source name on the ship',
181+ '(mule |.((mark-types-result at src fixtures marks)))' in out and
182+ '/mar/{(trip name.fixture)}.txt fixture' in out and
183+ '/sur/{(trip module.fixture)}.txt fixture' in out, out)
180184 with open(os.path.join(folder, 'marks.txt'), 'a') as f:
181185 f.write('label\n')
182186 try: