on master help sign in
Generalize atom constraints and check Clay imports
commitfbeaa83bd99b2aa92562e3f4b69d0706ab01c087 authoriko <mail@iko.soy> dateFri 30 Oct 2026, 17:53 (1 day ago) parent26554ac
30 files changed+1663−192
docs/compiler.md+2−2 docs/status.md+7−6 jibb-dev/lib/jibb-import.hoon+50−8 jibb-dev/lib/jibb.hoon+43−18 jibb-dev/lib/jibb/prelude.jibb+20 my-app/sur/blog.hoon+2−1 tests/clay-fixtures/bridge-expected.txt+1 tests/clay-fixtures/bridge.txt+14 tests/clay-fixtures/import-expected.txt+1 tests/clay-fixtures/import.txt+2−1 tests/golden/prelude-1c-structural/about.txt+4 tests/golden/prelude-1c-structural/source.jibb+120 tests/golden/prelude-1c-structural/tokens.txt+717 tests/golden/prelude-1c-structural/tree.txt+284 tests/golden/prelude-1c-structural/types.txt+37 tests/golden/prelude-3g-like/about.txt+1−1 tests/golden/prelude-3g-structural/about.txt+1−1 tests/golden/types-partial-many-atom-constraints/about.txt+4 tests/golden/types-partial-many-atom-constraints/source.jibb+13 tests/golden/types-partial-many-atom-constraints/tokens.txt+90 tests/golden/types-partial-many-atom-constraints/tree.txt+44 tests/golden/types-partial-many-atom-constraints/types.txt+8 tests/importer/about.txt+5−2 tests/importer/shadow-static.txt+4 tests/importer/small.txt+3 tests/importer/tree.txt+5−1 tests/lib/jibb-import.hoon+3−1 tests/lib/jibb.hoon+159−147 tools/clay-fixtures+16−1 tools/importer-test+3−2
docs/compiler.md+2−2
@@ -56,9 +56,9 @@ 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 `@` 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 one atom constraint arising from an explicit capital, instantiate it independently, and print it. Other atom-constraint cases and defaulting are 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 `@` 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.
6060
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 and all other fields are syntactically fixed atom molds. 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.
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.
6262
6363And the design notes:
6464
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
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; 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 one generalized atom constraint arising from an explicit capital; other constraints 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, 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.
2323
2424## Milestone 1: parser and mark
2525
@@ -37,8 +37,8 @@ What the plan asks for, and where it is:
3737
3838Besides the plan's list:
3939
40−- 401 golden cases: 185 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 401-case corpus passed under `urbit eval` in 20.0 s. The fake ship passed all 404 tests, including the importer, importer/checker bridge and unification checks, with 20.0 s for sync and 16.6 s for tests. The importer golden compares 45 projections; `tools/clay-fixtures` built all seven example Hoon fixtures through Clay and read three selected molds from the resulting type graphs.
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.
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.
4242- `tools/testdata/selftest` (19 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).
@@ -57,14 +57,15 @@ Besides the plan's list:
5757| 1dd92a6 | 2026-10-30 | Begin type inference and Hoon imports |
5858| 51ce4d9 | 2026-10-30 | Extend partial inference and importer, record type and prelude decisions |
5959| be6d2a5 | 2026-10-30 | Add atom widening, nested collections and case-local Hoon import fixtures |
60−| This change | 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 |
6162
6263## Checking it
6364
6465On a machine set up as [development.md](development.md) says:
6566
6667```
67−tools/golden # 401 cases under urbit eval
68+tools/golden # 403 cases under urbit eval
6869tools/importer-test # the Hoon importer fixture projection
6970tools/type-import-test # the importer/checker bridge fixture
7071tools/hoon check-spans-test # prints <<>> when the span checker works
@@ -72,7 +73,7 @@ tools/testdata/selftest # the tools themselves
7273tools/doc-blocks docs/spec # the doc's examples are golden cases
7374tools/ship start
7475tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
75−tools/ship test # the same 401 cases as -test arms on the ship
76+tools/ship test # the same 403 cases as -test arms on the ship
7677tools/testdata/ship-selftest
7778tools/ship check-commit # |commit stores .jibb files
7879tools/clay-fixtures # example /sur files and marks build through Clay
jibb-dev/lib/jibb-import.hoon+50−8
@@ -15,8 +15,9 @@
1515:: unprovably disjoint cases remain unsupported. Source-level overlap in
1616:: other unions, general nested ordered maps, Ford import provenance,
1717:: marks and full error locations still need work. A nested ordered map
18−:: is recovered only in records whose other fields, keys and values are
19−:: syntactically fixed atom molds; other source shapes fail closed.
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;
20+:: other source shapes fail closed.
2021::
2122:: The checker has a small bridge for successful unfaced atom and cell
2223:: results; it rejects other importer shapes. Failures return %|; no
@@ -192,8 +193,39 @@
192193::
193194:: Replace direct mop expressions in records with a simple placeholder;
194195:: recover-alias restores each from its original source specs afterward.
195−:: Only rewrite a record whose other fields are visibly fixed atom
196−:: molds. A general dependent mold could change when a field changes.
196+:: Other fields must be fixed atom molds or standard collections with
197+:: statically fixed atom arguments. A dependent mold could otherwise
198+:: change when a field changes. All collection names are checked below.
199+++ static-spec
200+ |= shape=spec
201+ ^- ?
202+ ?+ shape |
203+ [%base *] ?=([%atom *] p.shape)
204+ [%make *]
205+ ?. ?=([%wing *] p.shape) |
206+ =/ w=wing p.p.shape
207+ ?. |(=(w ~[%map]) =(w ~[%set]) =(w ~[%qeu]) =(w ~[%list]) =(w ~[%unit]) =(w ~[%jar]) =(w ~[%jug])) |
208+ (levy q.shape |=(a=spec (static-spec a)))
209+ ==
210+::
211+++ static-arguments
212+ |= args=(list hoon)
213+ ^- ?
214+ ?~ args &
215+ ?. ?=([%ktcl *] i.args) |
216+ ?. (static-spec p.i.args) |
217+ $(args t.args)
218+::
219+++ static-collection
220+ |= src=hoon
221+ ^- ?
222+ =/ alias (source-alias src)
223+ ?~ alias |
224+ ?> ?=([%cncl *] src)
225+ ?> ?=([%tsgr *] p.src)
226+ ?> ?=([%cncl *] q.p.src)
227+ (static-arguments q.q.p.src)
228+::
197229++ patchable-mop-record
198230 |= src=hoon
199231 ^- ?
@@ -204,7 +236,7 @@
204236 [%ktls *] ?=([%sand *] p.src)
205237 [%cncl *]
206238 =/ specs (mop-specs src)
207− ?~ specs |
239+ ?~ specs (static-collection src)
208240 &(?=([%base [%atom *]] key.u.specs) ?=([%base [%atom *]] value.u.specs))
209241 ==
210242::
@@ -511,6 +543,9 @@
511543 ?^ mop
512544 [%apply %mop ~[$(typ key.u.mop) $(typ value.u.mop)]]
513545 ?: (source-uses q.typ %mop)
546+ =/ checked-names=(list term) ~[%map %set %qeu %list %unit]
547+ ?: (lien checked-names |=(n=term &((source-uses q.typ n) !(alias-safe context n))))
548+ [%bad 'Hoon collection provenance is unavailable or shadowed']
514549 ?. ?=([%tsls [%note * *] *] q.typ)
515550 [%bad 'a nested Hoon mop needs source-aware import']
516551 =/ original=hoon q.typ
@@ -665,8 +700,10 @@
665700 [%cell [%face %table expect-mop] [%face %other [%atom %ud ~]]]
666701 =/ errors ?: =((sample %nested-mop) [%& expect-nested-mop]) errors
667702 ['ordered map field is preserved' errors]
668− =/ errors ?: =((sample %mixed-mop) [%| 'a nested Hoon mop needs source-aware import']) errors
669− ['non-atom sibling remains unsupported' errors]
703+ =/ expect-mixed=imported
704+ [%cell [%face %a expect-mop] [%face %b [%apply %list ~[[%atom %ud ~]]]]]
705+ =/ errors ?: =((sample %mixed-mop) [%& expect-mixed]) errors
706+ ['static list sibling is preserved' errors]
670707 =/ errors ?: =((sample %named-mop) [%| 'a nested Hoon mop needs source-aware import']) errors
671708 ['non-atom argument remains unsupported' errors]
672709 =/ errors ?: =((sample %mop-list) [%| 'a nested Hoon mop needs source-aware import']) errors
@@ -745,13 +782,14 @@
745782 ==
746783::
747784++ fixture-output
748− |= [small=@t epic=@t presence=@t docs=@t shadow=@t]
785+ |= [small=@t epic=@t presence=@t docs=@t shadow=@t shadow-static=@t]
749786 ^- wain
750787 =/ sc=type -:(ride -:!>(..zuse) small)
751788 =/ ec=type -:(ride -:!>(..zuse) epic)
752789 =/ pc=type -:(ride -:!>(..zuse) presence)
753790 =/ dc=type -:(ride -:!>(..zuse) docs)
754791 =/ hc=type -:(ride -:!>(..zuse) shadow)
792+ =/ xc=type -:(ride -:!>(..zuse) shadow-static)
755793 =/ sample
756794 |= name=term
757795 (read-mold-in %small name (~(play ut sc) (ream (cat 3 '*' name))) sc)
@@ -786,6 +824,10 @@
786824 (crip "nested-mop: {(show-result (sample %nested-mop))}")
787825 (crip "two-mops: {(show-result (sample %two-mops))}")
788826 (crip "mixed-mop: {(show-result (sample %mixed-mop))}")
827+ (crip "nested-static-mop: {(show-result (sample %nested-static-mop))}")
828+ (crip "collection-siblings: {(show-result (sample %collection-siblings))}")
829+ (crip "dynamic-sibling-mop: {(show-result (sample %dynamic-sibling-mop))}")
830+ (crip "shadow-list-mop: {(show-result (read-mold-in %shadow-static %bad (~(play ut xc) (ream '*bad')) xc))}")
789831 (crip "named-mop: {(show-result (sample %named-mop))}")
790832 (crip "mop-list: {(show-result (sample %mop-list))}")
791833 (crip "signed: {(show-result (sample %signed))}")
jibb-dev/lib/jibb.hoon+43−18
@@ -4590,8 +4590,8 @@
45904590:: Each top-level inferred definition generalizes its free variables, and
45914591:: a use instantiates them afresh. Binders inside a gate stay monomorphic;
45924592:: capital variables in molds share one allocation within the definition.
4593−:: Atom constraints tied to an explicit capital are generalized and
4594−:: printed. Other unresolved aura variables remain unsupported until
4593+:: Atom constraints tied to an explicit capital or an inferred sample
4594+:: are generalized and printed. Other aura variables remain unsupported until
45954595:: their defaulting and inferred generalization are implemented.
45964596:: Bare @ is a separate unrestricted atom type. A directional fit check
45974597:: permits concrete atoms to widen to it, never the reverse. A fit that
@@ -4791,7 +4791,7 @@
47914791:: A caller supplies the exact noun returned by +read-mold:jibb-import.
47924792:: This core has no Ford dependencies; unrecognized payloads fail closed.
47934793+$ iexternals (list [module=term name=term result=*])
4794−+$ istate [next=@ud sub=isub caps=icaps molds=imolds globals=(list term) externals=iexternals surs=(list term) active=(list term) in-mold=?]
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=?]
47954795+$ iresult (each [typ=itype state=istate] tape)
47964796+$ isample-result (each [typ=itype env=ienv state=istate] tape)
47974797::
@@ -5034,7 +5034,7 @@
50345034 ?: |(?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
50355035 [%| "sample shadows a name"]
50365036 =/ t=itype [%var next.state]
5037− [%& t [[name.s [t ~]] env] state(next +(next.state))]
5037+ [%& t [[name.s [t ~]] env] state(next +(next.state), binders [next.state binders.state])]
50385038 %face
50395039 ?: |(?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
50405040 [%| "sample shadows a name"]
@@ -5230,9 +5230,9 @@
52305230 ?. |(?=(%var -.resolved) ?=(%avar -.resolved)) &
52315231 $(caps t.caps)
52325232::
5233−:: Only atom variables tied to an explicit capital are generalized in
5234−:: this fragment. Other aura variables still need defaulting or inferred
5235−:: constraints. The printer currently handles one atom constraint.
5233+:: An atom variable may be generalized when an explicit capital or a
5234+:: sample binder resolves to it. Decimal-restricted variables still need
5235+:: defaulting and must not be generalized as arbitrary atom types.
52365236::
52375237++ atom-var-from-cap
52385238 |= [n=@ud caps=icaps sub=isub]
@@ -5244,26 +5244,51 @@
52445244 $(caps t.caps)
52455245 $(caps t.caps)
52465246::
5247+++ has-atom-var
5248+ |= [n=@ud t=itype]
5249+ ^- ?
5250+ ?- -.t
5251+ %var |
5252+ %avar =(n id.t)
5253+ %nvar |
5254+ %atom |
5255+ %any-atom |
5256+ %flag |
5257+ %fn |($(t sample.t) $(t product.t))
5258+ %cell |($(t hed.t) $(t tal.t))
5259+ ==
5260+::
5261+++ atom-var-from-binder
5262+ |= [n=@ud binders=(list @ud) sub=isub]
5263+ ^- ?
5264+ ?~ binders |
5265+ =/ resolved=itype (itype-normalize [%var i.binders] sub)
5266+ ?: (has-atom-var n resolved) &
5267+ $(binders t.binders)
5268+::
52475269++ unsupported-atom-vars
5248− |= [t=itype caps=icaps sub=isub]
5270+ |= [t=itype caps=icaps binders=(list @ud) sub=isub]
52495271 ^- ?
52505272 =/ vars=(list @ud) (unique-type-vars (itype-vars t))
5251− =/ count=@ud 0
52525273 |-
5253− ?~ vars (gth count 1)
5274+ ?~ vars |
52545275 ?: (itype-var-is-atom i.vars t)
5255− ?. (atom-var-from-cap i.vars caps sub) &
5256− $(vars t.vars, count +(count))
5276+ ?. |((atom-var-from-cap i.vars caps sub) (atom-var-from-binder i.vars binders sub)) &
5277+ $(vars t.vars)
52575278 $(vars t.vars)
52585279::
52595280++ show-atom-constraint
52605281 |= t=itype
52615282 ^- tape
52625283 =/ vars=(list @ud) (unique-type-vars (itype-vars t))
5284+ =/ printed=? |
5285+ =/ out=tape ""
52635286 |-
5264− ?~ vars ""
5287+ ?~ vars out
52655288 ?: (itype-var-is-atom i.vars t)
5266− " where {(show-itype [%avar i.vars] ~)} is an atom"
5289+ =/ sep=tape ?:(printed ", " " where ")
5290+ =/ clause=tape "{sep}{(show-itype [%avar i.vars] ~)} is an atom"
5291+ $(vars t.vars, printed &, out (weld out clause))
52675292 $(vars t.vars)
52685293::
52695294:: Build the supported part of the value environment in dependency order.
@@ -5296,11 +5321,11 @@
52965321 ?: ?=(%mold -.d) $(ds t.ds)
52975322 ?. (unique-value-name name.d globals) $(ds t.ds)
52985323 ?^ (ienv-lookup name.d env) $(ds t.ds)
5299− =/ result=iresult (infer-fragment val.d env [0 ~ ~ molds globals externals surs ~ |])
5324+ =/ result=iresult (infer-fragment val.d env [0 ~ ~ ~ molds globals externals surs ~ |])
53005325 ?: ?=(%| -.result) $(ds t.ds)
53015326 ?: (constrained-capitals caps.state.p.result sub.state.p.result) $(ds t.ds)
53025327 =/ typ=itype (itype-normalize typ.p.result sub.state.p.result)
5303− ?: (unsupported-atom-vars typ caps.state.p.result sub.state.p.result) $(ds t.ds)
5328+ ?: (unsupported-atom-vars typ caps.state.p.result binders.state.p.result sub.state.p.result) $(ds t.ds)
53045329 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
53055330 ?: (gth (lent vars) 26) $(ds t.ds)
53065331 $(ds t.ds, env [[name.d [typ vars]] env])
@@ -5496,13 +5521,13 @@
54965521 $(ds t.ds, lines [(show-partial-mold d molds) lines])
54975522 ?. (unique-value-name name.d globals)
54985523 $(ds t.ds, lines [(crip "++ {(trip name.d)}: name already in scope") lines])
5499− =/ result=iresult (infer-fragment val.d env [0 ~ ~ molds globals externals surs ~ |])
5524+ =/ result=iresult (infer-fragment val.d env [0 ~ ~ ~ molds globals externals surs ~ |])
55005525 ?: ?=(%| -.result)
55015526 $(ds t.ds, lines [(crip "++ {(trip name.d)}: {p.result}") lines])
55025527 ?: (constrained-capitals caps.state.p.result sub.state.p.result)
55035528 $(ds t.ds, lines [(crip "++ {(trip name.d)}: explicit capital constraints are not supported by partial inference") lines])
55045529 =/ typ=itype (itype-normalize typ.p.result sub.state.p.result)
5505− ?: (unsupported-atom-vars typ caps.state.p.result sub.state.p.result)
5530+ ?: (unsupported-atom-vars typ caps.state.p.result binders.state.p.result sub.state.p.result)
55065531 $(ds t.ds, lines [(crip "++ {(trip name.d)}: unresolved aura-variable inference") lines])
55075532 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
55085533 ?: (gth (lent vars) 26)
jibb-dev/lib/jibb/prelude.jibb+20
@@ -98,3 +98,23 @@
9898 ?- q.veq
9999 ~ !!
100100 [~ 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 @
my-app/sur/blog.hoon+2−1
@@ -1,4 +1,5 @@
11:: Fixture for the documented examples; not supplied by the design doc.
22|%
3−+$ post [title=@t slug=@ta]
3++$ title @t
4++$ post [title=title slug=@ta]
45--
tests/clay-fixtures/bridge-expected.txtnew file+1
@@ -0,0 +1 @@
1+'partial inference; module not checked\0a++ identity: $-(@t @t)'
tests/clay-fixtures/bridge.txtnew file+14
@@ -0,0 +1,14 @@
1+=/ m (strand ,vase)
2+;< =bowl:spider bind:m get-bowl
3+=/ now=@da now.bowl
4+=/ blog=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/sur/blog/hoon)
5+=/ reader=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/lib/jibb-import/hoon)
6+=/ jibb=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/lib/jibb/hoon)
7+=/ bc=type -.blog
8+=/ title-typ=type (~(play ut bc) (ream '*title'))
9+=/ read-gate=vase (slap reader (ream 'read-mold-in'))
10+=/ title-result=vase (slym read-gate [%blog %title title-typ bc])
11+=/ title=* +.title-result
12+=/ check-gate=vase (slap jibb (ream 'golden-types-imports'))
13+=/ src=@t '/- blog\0a++ identity |= x=title.blog x\0a'
14+(pure:m (slym check-gate [/ui/test/jibb src ~[[%blog %title title]]]))
tests/clay-fixtures/import-expected.txt+1
@@ -1,4 +1,5 @@
11[ '[id=@ud [done=(union @f:0 @f:1) text=@t]]'
22 '(union [add text=@t] [toggle id=@ud])'
33 '[title=@t slug=@ta]'
4+ '@t'
45]
tests/clay-fixtures/import.txt+2−1
@@ -9,4 +9,5 @@
99=/ item (read-mold-in:reader %todo %item (~(play ut tc) (ream '*item')) tc)
1010=/ action (read-mold-in:reader %todo %action (~(play ut tc) (ream '*action')) tc)
1111=/ post (read-mold-in:reader %blog %post (~(play ut bc) (ream '*post')) bc)
12−(pure:m !>([(crip (show-result:reader item)) (crip (show-result:reader action)) (crip (show-result:reader post))]))
12+=/ title (read-mold-in:reader %blog %title (~(play ut bc) (ream '*title')) bc)
13+(pure:m !>([(crip (show-result:reader item)) (crip (show-result:reader action)) (crip (show-result:reader post)) (crip (show-result:reader title))]))
tests/golden/prelude-1c-structural/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"; 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.
3+expect: parses
4+expect-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-1c-structural/source.jibbnew file+120
@@ -0,0 +1,120 @@
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 @
tests/golden/prelude-1c-structural/tokens.txtnew file+717
@@ -0,0 +1,717 @@
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+120:10 NEWLINE
tests/golden/prelude-1c-structural/tree.txtnew file+284
@@ -0,0 +1,284 @@
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 @)))
tests/golden/prelude-1c-structural/types.txtnew file+37
@@ -0,0 +1,37 @@
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
tests/golden/prelude-3g-like/about.txt+1−1
@@ -1,4 +1,4 @@
11source: Overview, Prelude: "The exported inventory includes all names from the Hoon library sections listed below, excluding the groups explicitly left out"; Hoon 3g includes `like` and `wonk`.
2−tests: The prelude's `like` generic edge mold and `wonk` extractor; the callable value form of `like` is a separate, unresolved question. The source is the complete current prelude.
2+tests: The prelude's `like` generic edge mold and `wonk` extractor; the callable value form of `like` is a separate, unresolved question. The source contains the prelude definitions through `like` and `wonk`.
33expect: parses
44expect-types: a partial inference report, not a checked module; generic molds and the `wonk` body are not fully checked yet
tests/golden/prelude-3g-structural/about.txt+1−1
@@ -1,4 +1,4 @@
11source: Overview, Prelude: "The exported inventory includes all names from the Hoon library sections listed below, excluding the groups explicitly left out"; 1c, 2q and 3g include `pair`, `trel`, `qual`, `cord`, `knot`, `tape`, `path`, `tank`, `nail`, `edge`, `rule`, `spot` and `toon`.
2−tests: The prelude's structural mold declarations, including the byte aura in `tape`, the recursive `tank` union and the `toon` union; source is the complete current prelude.
2+tests: The prelude's structural mold declarations, including the byte aura in `tape`, the recursive `tank` union and the `toon` union; source contains the prelude definitions through `toon`.
33expect: parses
44expect-types: a partial inference report, not a checked module; it checks supported union-case disjointness but not the molds as a whole
tests/golden/types-partial-many-atom-constraints/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: type variables used where atoms are required gain atom constraints; multiple constraints print as comma-separated clauses.
2+tests: two explicit atom constraints remain independent; an inferred sample constraint generalizes; numeric literals do not become loobeans directly or through that generic.
3+expect: parses
4+expect-types: a partial inference report, not a checked module
tests/golden/types-partial-many-atom-constraints/source.jibbnew file+13
@@ -0,0 +1,13 @@
1+++ both |= p=[A B]
2+ ?- p
3+ [a b]
4+ ~& ^- @ a
5+ ^- @ b
6+++ mix (both [~zod "hi"])
7+++ bad (both [~zod [~zod "hi"]])
8+++ implicit |= x
9+ ~& ^- @ x
10+ x
11+++ flag (implicit %.y)
12+++ decimal ^- ? 1
13+++ relay ^- ? (implicit 7)
tests/golden/types-partial-many-atom-constraints/tokens.txtnew file+90
@@ -0,0 +1,90 @@
1+1:1 glyph ++
2+1:4 name both
3+1:9 glyph |=
4+1:12 name p
5+1:13 tight glyph =
6+1:14 tight glyph [
7+1:15 tight tvar A
8+1:17 tvar B
9+1:18 tight glyph ]
10+2:3 INDENT
11+2:3 glyph ?-
12+2:6 name p
13+3:5 INDENT
14+3:5 glyph [
15+3:6 tight name a
16+3:8 name b
17+3:9 tight glyph ]
18+4:7 INDENT
19+4:7 glyph ~&
20+4:10 glyph ^-
21+4:13 aura @
22+4:15 name a
23+5:9 INDENT
24+5:9 glyph ^-
25+5:12 aura @
26+5:14 name b
27+6:1 DEDENT
28+6:1 DEDENT
29+6:1 DEDENT
30+6:1 DEDENT
31+6:1 NEWLINE
32+6:1 glyph ++
33+6:4 name mix
34+6:8 glyph (
35+6:9 tight name both
36+6:14 glyph [
37+6:15 tight lit ~zod
38+6:20 str "hi"
39+6:24 tight glyph ]
40+6:25 tight glyph )
41+7:1 NEWLINE
42+7:1 glyph ++
43+7:4 name bad
44+7:8 glyph (
45+7:9 tight name both
46+7:14 glyph [
47+7:15 tight lit ~zod
48+7:20 glyph [
49+7:21 tight lit ~zod
50+7:26 str "hi"
51+7:30 tight glyph ]
52+7:31 tight glyph ]
53+7:32 tight glyph )
54+8:1 NEWLINE
55+8:1 glyph ++
56+8:4 name implicit
57+8:13 glyph |=
58+8:16 name x
59+9:3 INDENT
60+9:3 glyph ~&
61+9:6 glyph ^-
62+9:9 aura @
63+9:11 name x
64+10:5 INDENT
65+10:5 name x
66+11:1 DEDENT
67+11:1 DEDENT
68+11:1 NEWLINE
69+11:1 glyph ++
70+11:4 name flag
71+11:9 glyph (
72+11:10 tight name implicit
73+11:19 lit %.y
74+11:22 tight glyph )
75+12:1 NEWLINE
76+12:1 glyph ++
77+12:4 name decimal
78+12:12 glyph ^-
79+12:15 glyph ?
80+12:17 lit 1
81+13:1 NEWLINE
82+13:1 glyph ++
83+13:4 name relay
84+13:10 glyph ^-
85+13:13 glyph ?
86+13:15 glyph (
87+13:16 tight name implicit
88+13:25 lit 7
89+13:26 tight glyph )
90+13:27 NEWLINE
tests/golden/types-partial-many-atom-constraints/tree.txtnew file+44
@@ -0,0 +1,44 @@
1+(module
2+ (value 1:1 both
3+ (gate 1:9
4+ (face 1:12 p
5+ (cell 1:14 (tvar 1:15 A) (tvar 1:17 B)))
6+ (body 2:3
7+ (branch 2:3
8+ (wing 2:6 p)
9+ (arm 3:5
10+ (cell 3:5 (bind 3:6 a) (bind 3:8 b))
11+ (body 4:7
12+ (trace 4:7
13+ (cast 4:10 (aura 4:13 @) (wing 4:15 a))
14+ (body 5:9
15+ (cast 5:9 (aura 5:12 @) (wing 5:14 b))))))))))
16+ (value 6:1 mix
17+ (group 6:8
18+ (call 6:9
19+ (wing 6:9 both)
20+ (tuple 6:14 (lit 6:15 ~zod) (str 6:20 "hi")))))
21+ (value 7:1 bad
22+ (group 7:8
23+ (call 7:9
24+ (wing 7:9 both)
25+ (tuple 7:14
26+ (lit 7:15 ~zod)
27+ (tuple 7:20 (lit 7:21 ~zod) (str 7:26 "hi"))))))
28+ (value 8:1 implicit
29+ (gate 8:13
30+ (bind 8:16 x)
31+ (body 9:3
32+ (trace 9:3
33+ (cast 9:6 (aura 9:9 @) (wing 9:11 x))
34+ (body 10:5 (wing 10:5 x))))))
35+ (value 11:1 flag
36+ (group 11:9
37+ (call 11:10 (wing 11:10 implicit) (lit 11:19 %.y))))
38+ (value 12:1 decimal
39+ (cast 12:12 (flag 12:15) (lit 12:17 1)))
40+ (value 13:1 relay
41+ (cast 13:10
42+ (flag 13:13)
43+ (group 13:15
44+ (call 13:16 (wing 13:16 implicit) (lit 13:25 7))))))
tests/golden/types-partial-many-atom-constraints/types.txtnew file+8
@@ -0,0 +1,8 @@
1+partial inference; module not checked
2+++ both: $-([A B] @) where A is an atom, B is an atom
3+++ mix: @
4+++ bad: call's sample and argument types do not unify
5+++ implicit: $-(A A) where A is an atom
6+++ flag: ?
7+++ decimal: cast mold and expression type do not unify
8+++ relay: cast mold and expression type do not unify
tests/importer/about.txt+5−2
@@ -1,7 +1,10 @@
11`small.txt` exercises union and atom-or-cell cases, fields, collections,
22recursion, and unsupported forms. `shadow.txt` checks local generator
3−shadowing and missing provenance. The synthetic hold in +bad-branch-fixture
4−checks that a failed Hoon branch expansion returns an error. `tlon-epic.txt`, `tlon-presence.txt` and `tlon-docs.txt` are the
3+shadowing and missing provenance. `shadow-static.txt` checks that a local
4+list shadow alongside a nested ordered map is rejected. Static sibling
5+collections and dependent sibling molds are tested separately. The synthetic
6+hold in +bad-branch-fixture checks that a failed Hoon branch expansion returns
7+an error. `tlon-epic.txt`, `tlon-presence.txt` and `tlon-docs.txt` are the
58unmodified `desk/sur/epic.hoon`, `desk/sur/presence.hoon` and
69`desk/sur/docs.hoon` from tloncorp/tlon-apps at commit
71038f9328f4580000a37a7fdc3ab820fcd65069487; its MIT license is in
tests/importer/shadow-static.txtnew file+4
@@ -0,0 +1,4 @@
1+|%
2+++ list list:..zuse
3++$ bad [a=((mop @ud @t) lte) b=(list @ud)]
4+--
tests/importer/small.txt+3
@@ -16,6 +16,9 @@
1616+$ nested-mop [table=((mop @ud @t) lte) other=@ud]
1717+$ two-mops [a=((mop @ud @t) lte) b=((mop @t @ud) lte)]
1818+$ mixed-mop [a=((mop @ud @t) lte) b=(list @ud)]
19++$ nested-static-mop [a=((mop @ud @t) lte) b=(map @ud (jar @t @ud))]
20++$ collection-siblings [a=((mop @ud @t) lte) b=(set @ud) c=(qeu @t) d=(unit @ud) e=(jug @ud @t)]
21++$ dynamic-sibling-mop [a=((mop @ud @t) lte) b=(list word)]
1922+$ named-mop [a=((mop @ud word) lte) b=@ud]
2023+$ word @t
2124+$ mop-list (list ((mop @ud @t) lte))
tests/importer/tree.txt+5−1
@@ -13,7 +13,11 @@ compound-fields: [one=(map @ud (jar @t @ud)) two=(list (jug @t @ud))]
1313mop: (mop @ud @t)
1414nested-mop: [table=(mop @ud @t) other=@ud]
1515two-mops: [a=(mop @ud @t) b=(mop @t @ud)]
16−mixed-mop: error: a nested Hoon mop needs source-aware import
16+mixed-mop: [a=(mop @ud @t) b=(list @ud)]
17+nested-static-mop: [a=(mop @ud @t) b=(map @ud (jar @t @ud))]
18+collection-siblings: [a=(mop @ud @t) [b=(set @ud) [c=(qeu @t) [d=(unit @ud) e=(jug @ud @t)]]]]
19+dynamic-sibling-mop: error: a nested Hoon mop needs source-aware import
20+shadow-list-mop: error: Hoon collection provenance is unavailable or shadowed
1721named-mop: error: a nested Hoon mop needs source-aware import
1822mop-list: error: a nested Hoon mop needs source-aware import
1923signed: error: signed and float auras cannot be imported
tests/lib/jibb-import.hoon+3−1
@@ -6,6 +6,7 @@
66/* presence %txt /tests/importer/tlon-presence/txt
77/* docs %txt /tests/importer/tlon-docs/txt
88/* shadow %txt /tests/importer/shadow/txt
9+/* shadow-static %txt /tests/importer/shadow-static/txt
910/* expected %txt /tests/importer/tree/txt
1011|%
1112++ lines-to-cord
@@ -20,8 +21,9 @@
2021 ?~ presence ~[leaf+"Tlon presence fixture is missing"]
2122 ?~ docs ~[leaf+"Tlon docs fixture is missing"]
2223 ?~ shadow ~[leaf+"shadow fixture is missing"]
24+ ?~ shadow-static ~[leaf+"static shadow fixture is missing"]
2325 ?~ expected ~[leaf+"importer golden output is missing"]
24− =/ 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))
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))
2527 ?. =(actual expected)
2628 ~[leaf+"importer projection differs from tests/importer/tree.txt"]
2729 ~
tests/lib/jibb.hoon+159−147
@@ -1136,124 +1136,132 @@
11361136/* src-372 %jibb /tests/golden/lex-tight-wing-ok-1/source/jibb
11371137/* tok-372 %txt /tests/golden/lex-tight-wing-ok-1/tokens/txt
11381138/* tre-372 %txt /tests/golden/lex-tight-wing-ok-1/tree/txt
1139−/* src-373 %jibb /tests/golden/prelude-3g-basic/source/jibb
1140−/* tok-373 %txt /tests/golden/prelude-3g-basic/tokens/txt
1141−/* tre-373 %txt /tests/golden/prelude-3g-basic/tree/txt
1142−/* typ-373 %txt /tests/golden/prelude-3g-basic/types/txt
1143−/* src-374 %jibb /tests/golden/prelude-3g-like/source/jibb
1144−/* tok-374 %txt /tests/golden/prelude-3g-like/tokens/txt
1145−/* tre-374 %txt /tests/golden/prelude-3g-like/tree/txt
1146−/* typ-374 %txt /tests/golden/prelude-3g-like/types/txt
1147−/* src-375 %jibb /tests/golden/prelude-3g-structural/source/jibb
1148−/* tok-375 %txt /tests/golden/prelude-3g-structural/tokens/txt
1149−/* tre-375 %txt /tests/golden/prelude-3g-structural/tree/txt
1150−/* typ-375 %txt /tests/golden/prelude-3g-structural/types/txt
1151−/* src-376 %jibb /tests/golden/prelude-core-functions/source/jibb
1152−/* tok-376 %txt /tests/golden/prelude-core-functions/tokens/txt
1153−/* tre-376 %txt /tests/golden/prelude-core-functions/tree/txt
1154−/* typ-376 %txt /tests/golden/prelude-core-functions/types/txt
1155−/* src-377 %jibb /tests/golden/prelude-list-unit/source/jibb
1156−/* tok-377 %txt /tests/golden/prelude-list-unit/tokens/txt
1157−/* tre-377 %txt /tests/golden/prelude-list-unit/tree/txt
1158−/* typ-377 %txt /tests/golden/prelude-list-unit/types/txt
1159−/* src-378 %jibb /tests/golden/types-import-sur/source/jibb
1160−/* tok-378 %txt /tests/golden/types-import-sur/tokens/txt
1161−/* tre-378 %txt /tests/golden/types-import-sur/tree/txt
1162−/* typ-378 %txt /tests/golden/types-import-sur/types/txt
1163−/* imp-378-1 %txt /tests/golden/types-import-sur/sur/fixture/txt
1164−/* imp-378-2 %txt /tests/golden/types-import-sur/sur/fixture/txt
1165−/* src-379 %jibb /tests/golden/types-partial-apply/source/jibb
1166−/* tok-379 %txt /tests/golden/types-partial-apply/tokens/txt
1167−/* tre-379 %txt /tests/golden/types-partial-apply/tree/txt
1168−/* typ-379 %txt /tests/golden/types-partial-apply/types/txt
1169−/* src-380 %jibb /tests/golden/types-partial-atom-constraint/source/jibb
1170−/* tok-380 %txt /tests/golden/types-partial-atom-constraint/tokens/txt
1171−/* tre-380 %txt /tests/golden/types-partial-atom-constraint/tree/txt
1172−/* typ-380 %txt /tests/golden/types-partial-atom-constraint/types/txt
1173−/* src-381 %jibb /tests/golden/types-partial-atom-widening/source/jibb
1174−/* tok-381 %txt /tests/golden/types-partial-atom-widening/tokens/txt
1175−/* tre-381 %txt /tests/golden/types-partial-atom-widening/tree/txt
1176−/* typ-381 %txt /tests/golden/types-partial-atom-widening/types/txt
1177−/* src-382 %jibb /tests/golden/types-partial-aura/source/jibb
1178−/* tok-382 %txt /tests/golden/types-partial-aura/tokens/txt
1179−/* tre-382 %txt /tests/golden/types-partial-aura/tree/txt
1180−/* typ-382 %txt /tests/golden/types-partial-aura/types/txt
1181−/* src-383 %jibb /tests/golden/types-partial-aura-generalization/source/jibb
1182−/* tok-383 %txt /tests/golden/types-partial-aura-generalization/tokens/txt
1183−/* tre-383 %txt /tests/golden/types-partial-aura-generalization/tree/txt
1184−/* typ-383 %txt /tests/golden/types-partial-aura-generalization/types/txt
1185−/* src-384 %jibb /tests/golden/types-partial-bare-atom/source/jibb
1186−/* tok-384 %txt /tests/golden/types-partial-bare-atom/tokens/txt
1187−/* tre-384 %txt /tests/golden/types-partial-bare-atom/tree/txt
1188−/* typ-384 %txt /tests/golden/types-partial-bare-atom/types/txt
1189−/* src-385 %jibb /tests/golden/types-partial-dependency-chain/source/jibb
1190−/* tok-385 %txt /tests/golden/types-partial-dependency-chain/tokens/txt
1191−/* tre-385 %txt /tests/golden/types-partial-dependency-chain/tree/txt
1192−/* typ-385 %txt /tests/golden/types-partial-dependency-chain/types/txt
1193−/* src-386 %jibb /tests/golden/types-partial-explicit-capital/source/jibb
1194−/* tok-386 %txt /tests/golden/types-partial-explicit-capital/tokens/txt
1195−/* tre-386 %txt /tests/golden/types-partial-explicit-capital/tree/txt
1196−/* typ-386 %txt /tests/golden/types-partial-explicit-capital/types/txt
1197−/* src-387 %jibb /tests/golden/types-partial-forward/source/jibb
1198−/* tok-387 %txt /tests/golden/types-partial-forward/tokens/txt
1199−/* tre-387 %txt /tests/golden/types-partial-forward/tree/txt
1200−/* typ-387 %txt /tests/golden/types-partial-forward/types/txt
1201−/* src-388 %jibb /tests/golden/types-partial-generalization/source/jibb
1202−/* tok-388 %txt /tests/golden/types-partial-generalization/tokens/txt
1203−/* tre-388 %txt /tests/golden/types-partial-generalization/tree/txt
1204−/* typ-388 %txt /tests/golden/types-partial-generalization/types/txt
1205−/* src-389 %jibb /tests/golden/types-partial-identity/source/jibb
1206−/* tok-389 %txt /tests/golden/types-partial-identity/tokens/txt
1207−/* tre-389 %txt /tests/golden/types-partial-identity/tree/txt
1208−/* typ-389 %txt /tests/golden/types-partial-identity/types/txt
1209−/* src-390 %jibb /tests/golden/types-partial-independent-atoms/source/jibb
1210−/* tok-390 %txt /tests/golden/types-partial-independent-atoms/tokens/txt
1211−/* tre-390 %txt /tests/golden/types-partial-independent-atoms/tree/txt
1212−/* typ-390 %txt /tests/golden/types-partial-independent-atoms/types/txt
1213−/* src-391 %jibb /tests/golden/types-partial-mold-bare-aura/source/jibb
1214−/* tok-391 %txt /tests/golden/types-partial-mold-bare-aura/tokens/txt
1215−/* tre-391 %txt /tests/golden/types-partial-mold-bare-aura/tree/txt
1216−/* typ-391 %txt /tests/golden/types-partial-mold-bare-aura/types/txt
1217−/* src-392 %jibb /tests/golden/types-partial-mold-composite/source/jibb
1218−/* tok-392 %txt /tests/golden/types-partial-mold-composite/tokens/txt
1219−/* tre-392 %txt /tests/golden/types-partial-mold-composite/tree/txt
1220−/* typ-392 %txt /tests/golden/types-partial-mold-composite/types/txt
1221−/* src-393 %jibb /tests/golden/types-partial-mold-forward/source/jibb
1222−/* tok-393 %txt /tests/golden/types-partial-mold-forward/tokens/txt
1223−/* tre-393 %txt /tests/golden/types-partial-mold-forward/tree/txt
1224−/* typ-393 %txt /tests/golden/types-partial-mold-forward/types/txt
1225−/* src-394 %jibb /tests/golden/types-partial-mold-recursive/source/jibb
1226−/* tok-394 %txt /tests/golden/types-partial-mold-recursive/tokens/txt
1227−/* tre-394 %txt /tests/golden/types-partial-mold-recursive/tree/txt
1228−/* typ-394 %txt /tests/golden/types-partial-mold-recursive/types/txt
1229−/* src-395 %jibb /tests/golden/types-partial-occurs/source/jibb
1230−/* tok-395 %txt /tests/golden/types-partial-occurs/tokens/txt
1231−/* tre-395 %txt /tests/golden/types-partial-occurs/tree/txt
1232−/* typ-395 %txt /tests/golden/types-partial-occurs/types/txt
1233−/* src-396 %jibb /tests/golden/types-partial-projection/source/jibb
1234−/* tok-396 %txt /tests/golden/types-partial-projection/tokens/txt
1235−/* tre-396 %txt /tests/golden/types-partial-projection/tree/txt
1236−/* typ-396 %txt /tests/golden/types-partial-projection/types/txt
1237−/* src-397 %jibb /tests/golden/types-partial-shadow-global/source/jibb
1238−/* tok-397 %txt /tests/golden/types-partial-shadow-global/tokens/txt
1239−/* tre-397 %txt /tests/golden/types-partial-shadow-global/tree/txt
1240−/* typ-397 %txt /tests/golden/types-partial-shadow-global/types/txt
1241−/* src-398 %jibb /tests/golden/types-partial-shared-tvar/source/jibb
1242−/* tok-398 %txt /tests/golden/types-partial-shared-tvar/tokens/txt
1243−/* tre-398 %txt /tests/golden/types-partial-shared-tvar/tree/txt
1244−/* typ-398 %txt /tests/golden/types-partial-shared-tvar/types/txt
1245−/* src-399 %jibb /tests/golden/types-partial-union-cases/source/jibb
1246−/* tok-399 %txt /tests/golden/types-partial-union-cases/tokens/txt
1247−/* tre-399 %txt /tests/golden/types-partial-union-cases/tree/txt
1248−/* typ-399 %txt /tests/golden/types-partial-union-cases/types/txt
1249−/* src-400 %jibb /tests/golden/types-partial-union-edges/source/jibb
1250−/* tok-400 %txt /tests/golden/types-partial-union-edges/tokens/txt
1251−/* tre-400 %txt /tests/golden/types-partial-union-edges/tree/txt
1252−/* typ-400 %txt /tests/golden/types-partial-union-edges/types/txt
1253−/* src-401 %jibb /tests/golden/types-partial-unresolved-tag/source/jibb
1254−/* tok-401 %txt /tests/golden/types-partial-unresolved-tag/tokens/txt
1255−/* tre-401 %txt /tests/golden/types-partial-unresolved-tag/tree/txt
1256−/* typ-401 %txt /tests/golden/types-partial-unresolved-tag/types/txt
1139+/* src-373 %jibb /tests/golden/prelude-1c-structural/source/jibb
1140+/* tok-373 %txt /tests/golden/prelude-1c-structural/tokens/txt
1141+/* tre-373 %txt /tests/golden/prelude-1c-structural/tree/txt
1142+/* typ-373 %txt /tests/golden/prelude-1c-structural/types/txt
1143+/* src-374 %jibb /tests/golden/prelude-3g-basic/source/jibb
1144+/* tok-374 %txt /tests/golden/prelude-3g-basic/tokens/txt
1145+/* tre-374 %txt /tests/golden/prelude-3g-basic/tree/txt
1146+/* typ-374 %txt /tests/golden/prelude-3g-basic/types/txt
1147+/* src-375 %jibb /tests/golden/prelude-3g-like/source/jibb
1148+/* tok-375 %txt /tests/golden/prelude-3g-like/tokens/txt
1149+/* tre-375 %txt /tests/golden/prelude-3g-like/tree/txt
1150+/* typ-375 %txt /tests/golden/prelude-3g-like/types/txt
1151+/* src-376 %jibb /tests/golden/prelude-3g-structural/source/jibb
1152+/* tok-376 %txt /tests/golden/prelude-3g-structural/tokens/txt
1153+/* tre-376 %txt /tests/golden/prelude-3g-structural/tree/txt
1154+/* typ-376 %txt /tests/golden/prelude-3g-structural/types/txt
1155+/* src-377 %jibb /tests/golden/prelude-core-functions/source/jibb
1156+/* tok-377 %txt /tests/golden/prelude-core-functions/tokens/txt
1157+/* tre-377 %txt /tests/golden/prelude-core-functions/tree/txt
1158+/* typ-377 %txt /tests/golden/prelude-core-functions/types/txt
1159+/* src-378 %jibb /tests/golden/prelude-list-unit/source/jibb
1160+/* tok-378 %txt /tests/golden/prelude-list-unit/tokens/txt
1161+/* tre-378 %txt /tests/golden/prelude-list-unit/tree/txt
1162+/* typ-378 %txt /tests/golden/prelude-list-unit/types/txt
1163+/* src-379 %jibb /tests/golden/types-import-sur/source/jibb
1164+/* tok-379 %txt /tests/golden/types-import-sur/tokens/txt
1165+/* tre-379 %txt /tests/golden/types-import-sur/tree/txt
1166+/* typ-379 %txt /tests/golden/types-import-sur/types/txt
1167+/* imp-379-1 %txt /tests/golden/types-import-sur/sur/fixture/txt
1168+/* imp-379-2 %txt /tests/golden/types-import-sur/sur/fixture/txt
1169+/* src-380 %jibb /tests/golden/types-partial-apply/source/jibb
1170+/* tok-380 %txt /tests/golden/types-partial-apply/tokens/txt
1171+/* tre-380 %txt /tests/golden/types-partial-apply/tree/txt
1172+/* typ-380 %txt /tests/golden/types-partial-apply/types/txt
1173+/* src-381 %jibb /tests/golden/types-partial-atom-constraint/source/jibb
1174+/* tok-381 %txt /tests/golden/types-partial-atom-constraint/tokens/txt
1175+/* tre-381 %txt /tests/golden/types-partial-atom-constraint/tree/txt
1176+/* typ-381 %txt /tests/golden/types-partial-atom-constraint/types/txt
1177+/* src-382 %jibb /tests/golden/types-partial-atom-widening/source/jibb
1178+/* tok-382 %txt /tests/golden/types-partial-atom-widening/tokens/txt
1179+/* tre-382 %txt /tests/golden/types-partial-atom-widening/tree/txt
1180+/* typ-382 %txt /tests/golden/types-partial-atom-widening/types/txt
1181+/* src-383 %jibb /tests/golden/types-partial-aura/source/jibb
1182+/* tok-383 %txt /tests/golden/types-partial-aura/tokens/txt
1183+/* tre-383 %txt /tests/golden/types-partial-aura/tree/txt
1184+/* typ-383 %txt /tests/golden/types-partial-aura/types/txt
1185+/* src-384 %jibb /tests/golden/types-partial-aura-generalization/source/jibb
1186+/* tok-384 %txt /tests/golden/types-partial-aura-generalization/tokens/txt
1187+/* tre-384 %txt /tests/golden/types-partial-aura-generalization/tree/txt
1188+/* typ-384 %txt /tests/golden/types-partial-aura-generalization/types/txt
1189+/* src-385 %jibb /tests/golden/types-partial-bare-atom/source/jibb
1190+/* tok-385 %txt /tests/golden/types-partial-bare-atom/tokens/txt
1191+/* tre-385 %txt /tests/golden/types-partial-bare-atom/tree/txt
1192+/* typ-385 %txt /tests/golden/types-partial-bare-atom/types/txt
1193+/* src-386 %jibb /tests/golden/types-partial-dependency-chain/source/jibb
1194+/* tok-386 %txt /tests/golden/types-partial-dependency-chain/tokens/txt
1195+/* tre-386 %txt /tests/golden/types-partial-dependency-chain/tree/txt
1196+/* typ-386 %txt /tests/golden/types-partial-dependency-chain/types/txt
1197+/* src-387 %jibb /tests/golden/types-partial-explicit-capital/source/jibb
1198+/* tok-387 %txt /tests/golden/types-partial-explicit-capital/tokens/txt
1199+/* tre-387 %txt /tests/golden/types-partial-explicit-capital/tree/txt
1200+/* typ-387 %txt /tests/golden/types-partial-explicit-capital/types/txt
1201+/* src-388 %jibb /tests/golden/types-partial-forward/source/jibb
1202+/* tok-388 %txt /tests/golden/types-partial-forward/tokens/txt
1203+/* tre-388 %txt /tests/golden/types-partial-forward/tree/txt
1204+/* typ-388 %txt /tests/golden/types-partial-forward/types/txt
1205+/* src-389 %jibb /tests/golden/types-partial-generalization/source/jibb
1206+/* tok-389 %txt /tests/golden/types-partial-generalization/tokens/txt
1207+/* tre-389 %txt /tests/golden/types-partial-generalization/tree/txt
1208+/* typ-389 %txt /tests/golden/types-partial-generalization/types/txt
1209+/* src-390 %jibb /tests/golden/types-partial-identity/source/jibb
1210+/* tok-390 %txt /tests/golden/types-partial-identity/tokens/txt
1211+/* tre-390 %txt /tests/golden/types-partial-identity/tree/txt
1212+/* typ-390 %txt /tests/golden/types-partial-identity/types/txt
1213+/* src-391 %jibb /tests/golden/types-partial-independent-atoms/source/jibb
1214+/* tok-391 %txt /tests/golden/types-partial-independent-atoms/tokens/txt
1215+/* tre-391 %txt /tests/golden/types-partial-independent-atoms/tree/txt
1216+/* typ-391 %txt /tests/golden/types-partial-independent-atoms/types/txt
1217+/* src-392 %jibb /tests/golden/types-partial-many-atom-constraints/source/jibb
1218+/* tok-392 %txt /tests/golden/types-partial-many-atom-constraints/tokens/txt
1219+/* tre-392 %txt /tests/golden/types-partial-many-atom-constraints/tree/txt
1220+/* typ-392 %txt /tests/golden/types-partial-many-atom-constraints/types/txt
1221+/* src-393 %jibb /tests/golden/types-partial-mold-bare-aura/source/jibb
1222+/* tok-393 %txt /tests/golden/types-partial-mold-bare-aura/tokens/txt
1223+/* tre-393 %txt /tests/golden/types-partial-mold-bare-aura/tree/txt
1224+/* typ-393 %txt /tests/golden/types-partial-mold-bare-aura/types/txt
1225+/* src-394 %jibb /tests/golden/types-partial-mold-composite/source/jibb
1226+/* tok-394 %txt /tests/golden/types-partial-mold-composite/tokens/txt
1227+/* tre-394 %txt /tests/golden/types-partial-mold-composite/tree/txt
1228+/* typ-394 %txt /tests/golden/types-partial-mold-composite/types/txt
1229+/* src-395 %jibb /tests/golden/types-partial-mold-forward/source/jibb
1230+/* tok-395 %txt /tests/golden/types-partial-mold-forward/tokens/txt
1231+/* tre-395 %txt /tests/golden/types-partial-mold-forward/tree/txt
1232+/* typ-395 %txt /tests/golden/types-partial-mold-forward/types/txt
1233+/* src-396 %jibb /tests/golden/types-partial-mold-recursive/source/jibb
1234+/* tok-396 %txt /tests/golden/types-partial-mold-recursive/tokens/txt
1235+/* tre-396 %txt /tests/golden/types-partial-mold-recursive/tree/txt
1236+/* typ-396 %txt /tests/golden/types-partial-mold-recursive/types/txt
1237+/* src-397 %jibb /tests/golden/types-partial-occurs/source/jibb
1238+/* tok-397 %txt /tests/golden/types-partial-occurs/tokens/txt
1239+/* tre-397 %txt /tests/golden/types-partial-occurs/tree/txt
1240+/* typ-397 %txt /tests/golden/types-partial-occurs/types/txt
1241+/* src-398 %jibb /tests/golden/types-partial-projection/source/jibb
1242+/* tok-398 %txt /tests/golden/types-partial-projection/tokens/txt
1243+/* tre-398 %txt /tests/golden/types-partial-projection/tree/txt
1244+/* typ-398 %txt /tests/golden/types-partial-projection/types/txt
1245+/* src-399 %jibb /tests/golden/types-partial-shadow-global/source/jibb
1246+/* tok-399 %txt /tests/golden/types-partial-shadow-global/tokens/txt
1247+/* tre-399 %txt /tests/golden/types-partial-shadow-global/tree/txt
1248+/* typ-399 %txt /tests/golden/types-partial-shadow-global/types/txt
1249+/* src-400 %jibb /tests/golden/types-partial-shared-tvar/source/jibb
1250+/* tok-400 %txt /tests/golden/types-partial-shared-tvar/tokens/txt
1251+/* tre-400 %txt /tests/golden/types-partial-shared-tvar/tree/txt
1252+/* typ-400 %txt /tests/golden/types-partial-shared-tvar/types/txt
1253+/* src-401 %jibb /tests/golden/types-partial-union-cases/source/jibb
1254+/* tok-401 %txt /tests/golden/types-partial-union-cases/tokens/txt
1255+/* tre-401 %txt /tests/golden/types-partial-union-cases/tree/txt
1256+/* typ-401 %txt /tests/golden/types-partial-union-cases/types/txt
1257+/* src-402 %jibb /tests/golden/types-partial-union-edges/source/jibb
1258+/* tok-402 %txt /tests/golden/types-partial-union-edges/tokens/txt
1259+/* tre-402 %txt /tests/golden/types-partial-union-edges/tree/txt
1260+/* typ-402 %txt /tests/golden/types-partial-union-edges/types/txt
1261+/* src-403 %jibb /tests/golden/types-partial-unresolved-tag/source/jibb
1262+/* tok-403 %txt /tests/golden/types-partial-unresolved-tag/tokens/txt
1263+/* tre-403 %txt /tests/golden/types-partial-unresolved-tag/tree/txt
1264+/* typ-403 %txt /tests/golden/types-partial-unresolved-tag/types/txt
12571265|%
12581266:: one arm per case
12591267::
@@ -2001,64 +2009,68 @@
20012009 (check ~.lex-tight-wing-bad-1 src-371 `tok-371 `tre-371)
20022010++ test-lex-tight-wing-ok-1
20032011 (check ~.lex-tight-wing-ok-1 src-372 `tok-372 `tre-372)
2012+++ test-prelude-1c-structural
2013+ (weld (check ~.prelude-1c-structural src-373 `tok-373 `tre-373) (check-types ~.prelude-1c-structural ~[%tests %golden ~.prelude-1c-structural %source %jibb] src-373 `typ-373))
20042014++ test-prelude-3g-basic
2005− (weld (check ~.prelude-3g-basic src-373 `tok-373 `tre-373) (check-types ~.prelude-3g-basic ~[%tests %golden ~.prelude-3g-basic %source %jibb] src-373 `typ-373))
2015+ (weld (check ~.prelude-3g-basic src-374 `tok-374 `tre-374) (check-types ~.prelude-3g-basic ~[%tests %golden ~.prelude-3g-basic %source %jibb] src-374 `typ-374))
20062016++ test-prelude-3g-like
2007− (weld (check ~.prelude-3g-like src-374 `tok-374 `tre-374) (check-types ~.prelude-3g-like ~[%tests %golden ~.prelude-3g-like %source %jibb] src-374 `typ-374))
2017+ (weld (check ~.prelude-3g-like src-375 `tok-375 `tre-375) (check-types ~.prelude-3g-like ~[%tests %golden ~.prelude-3g-like %source %jibb] src-375 `typ-375))
20082018++ test-prelude-3g-structural
2009− (weld (check ~.prelude-3g-structural src-375 `tok-375 `tre-375) (check-types ~.prelude-3g-structural ~[%tests %golden ~.prelude-3g-structural %source %jibb] src-375 `typ-375))
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))
20102020++ test-prelude-core-functions
2011− (weld (check ~.prelude-core-functions src-376 `tok-376 `tre-376) (check-types ~.prelude-core-functions ~[%tests %golden ~.prelude-core-functions %source %jibb] src-376 `typ-376))
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))
20122022++ test-prelude-list-unit
2013− (weld (check ~.prelude-list-unit src-377 `tok-377 `tre-377) (check-types ~.prelude-list-unit ~[%tests %golden ~.prelude-list-unit %source %jibb] src-377 `typ-377))
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))
20142024++ test-types-import-sur
2015− (weld (check ~.types-import-sur src-378 `tok-378 `tre-378) (check-import-types ~.types-import-sur ~[%tests %golden ~.types-import-sur %source %jibb] src-378 `typ-378 ~[[%fixture %title imp-378-1] [%fixture %pair imp-378-2]]))
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]]))
20162026++ test-types-partial-apply
2017− (weld (check ~.types-partial-apply src-379 `tok-379 `tre-379) (check-types ~.types-partial-apply ~[%tests %golden ~.types-partial-apply %source %jibb] src-379 `typ-379))
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))
20182028++ test-types-partial-atom-constraint
2019− (weld (check ~.types-partial-atom-constraint src-380 `tok-380 `tre-380) (check-types ~.types-partial-atom-constraint ~[%tests %golden ~.types-partial-atom-constraint %source %jibb] src-380 `typ-380))
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))
20202030++ test-types-partial-atom-widening
2021− (weld (check ~.types-partial-atom-widening src-381 `tok-381 `tre-381) (check-types ~.types-partial-atom-widening ~[%tests %golden ~.types-partial-atom-widening %source %jibb] src-381 `typ-381))
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))
20222032++ test-types-partial-aura
2023− (weld (check ~.types-partial-aura src-382 `tok-382 `tre-382) (check-types ~.types-partial-aura ~[%tests %golden ~.types-partial-aura %source %jibb] src-382 `typ-382))
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))
20242034++ test-types-partial-aura-generalization
2025− (weld (check ~.types-partial-aura-generalization src-383 `tok-383 `tre-383) (check-types ~.types-partial-aura-generalization ~[%tests %golden ~.types-partial-aura-generalization %source %jibb] src-383 `typ-383))
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))
20262036++ test-types-partial-bare-atom
2027− (weld (check ~.types-partial-bare-atom src-384 `tok-384 `tre-384) (check-types ~.types-partial-bare-atom ~[%tests %golden ~.types-partial-bare-atom %source %jibb] src-384 `typ-384))
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))
20282038++ test-types-partial-dependency-chain
2029− (weld (check ~.types-partial-dependency-chain src-385 `tok-385 `tre-385) (check-types ~.types-partial-dependency-chain ~[%tests %golden ~.types-partial-dependency-chain %source %jibb] src-385 `typ-385))
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))
20302040++ test-types-partial-explicit-capital
2031− (weld (check ~.types-partial-explicit-capital src-386 `tok-386 `tre-386) (check-types ~.types-partial-explicit-capital ~[%tests %golden ~.types-partial-explicit-capital %source %jibb] src-386 `typ-386))
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))
20322042++ test-types-partial-forward
2033− (weld (check ~.types-partial-forward src-387 `tok-387 `tre-387) (check-types ~.types-partial-forward ~[%tests %golden ~.types-partial-forward %source %jibb] src-387 `typ-387))
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))
20342044++ test-types-partial-generalization
2035− (weld (check ~.types-partial-generalization src-388 `tok-388 `tre-388) (check-types ~.types-partial-generalization ~[%tests %golden ~.types-partial-generalization %source %jibb] src-388 `typ-388))
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))
20362046++ test-types-partial-identity
2037− (weld (check ~.types-partial-identity src-389 `tok-389 `tre-389) (check-types ~.types-partial-identity ~[%tests %golden ~.types-partial-identity %source %jibb] src-389 `typ-389))
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))
20382048++ test-types-partial-independent-atoms
2039− (weld (check ~.types-partial-independent-atoms src-390 `tok-390 `tre-390) (check-types ~.types-partial-independent-atoms ~[%tests %golden ~.types-partial-independent-atoms %source %jibb] src-390 `typ-390))
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))
2050+++ 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))
20402052++ test-types-partial-mold-bare-aura
2041− (weld (check ~.types-partial-mold-bare-aura src-391 `tok-391 `tre-391) (check-types ~.types-partial-mold-bare-aura ~[%tests %golden ~.types-partial-mold-bare-aura %source %jibb] src-391 `typ-391))
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))
20422054++ test-types-partial-mold-composite
2043− (weld (check ~.types-partial-mold-composite src-392 `tok-392 `tre-392) (check-types ~.types-partial-mold-composite ~[%tests %golden ~.types-partial-mold-composite %source %jibb] src-392 `typ-392))
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))
20442056++ test-types-partial-mold-forward
2045− (weld (check ~.types-partial-mold-forward src-393 `tok-393 `tre-393) (check-types ~.types-partial-mold-forward ~[%tests %golden ~.types-partial-mold-forward %source %jibb] src-393 `typ-393))
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))
20462058++ test-types-partial-mold-recursive
2047− (weld (check ~.types-partial-mold-recursive src-394 `tok-394 `tre-394) (check-types ~.types-partial-mold-recursive ~[%tests %golden ~.types-partial-mold-recursive %source %jibb] src-394 `typ-394))
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))
20482060++ test-types-partial-occurs
2049− (weld (check ~.types-partial-occurs src-395 `tok-395 `tre-395) (check-types ~.types-partial-occurs ~[%tests %golden ~.types-partial-occurs %source %jibb] src-395 `typ-395))
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))
20502062++ test-types-partial-projection
2051− (weld (check ~.types-partial-projection src-396 `tok-396 `tre-396) (check-types ~.types-partial-projection ~[%tests %golden ~.types-partial-projection %source %jibb] src-396 `typ-396))
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))
20522064++ test-types-partial-shadow-global
2053− (weld (check ~.types-partial-shadow-global src-397 `tok-397 `tre-397) (check-types ~.types-partial-shadow-global ~[%tests %golden ~.types-partial-shadow-global %source %jibb] src-397 `typ-397))
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))
20542066++ test-types-partial-shared-tvar
2055− (weld (check ~.types-partial-shared-tvar src-398 `tok-398 `tre-398) (check-types ~.types-partial-shared-tvar ~[%tests %golden ~.types-partial-shared-tvar %source %jibb] src-398 `typ-398))
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))
20562068++ test-types-partial-union-cases
2057− (weld (check ~.types-partial-union-cases src-399 `tok-399 `tre-399) (check-types ~.types-partial-union-cases ~[%tests %golden ~.types-partial-union-cases %source %jibb] src-399 `typ-399))
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))
20582070++ test-types-partial-union-edges
2059− (weld (check ~.types-partial-union-edges src-400 `tok-400 `tre-400) (check-types ~.types-partial-union-edges ~[%tests %golden ~.types-partial-union-edges %source %jibb] src-400 `typ-400))
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))
20602072++ test-types-partial-unresolved-tag
2061− (weld (check ~.types-partial-unresolved-tag src-401 `tok-401 `tre-401) (check-types ~.types-partial-unresolved-tag ~[%tests %golden ~.types-partial-unresolved-tag %source %jibb] src-401 `typ-401))
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))
20622074::
20632075:: +check: run golden:jibb on a case and compare both outputs
20642076::
tools/clay-fixtures+16−1
@@ -45,4 +45,19 @@ if result.stdout != expected:
4545 print('expected:', expected.decode().rstrip(), file=sys.stderr)
4646 print('actual: ', result.stdout.decode().rstrip(), file=sys.stderr)
4747 sys.exit(1)
48−print('Clay importer golden: 3 projections passed')
48+print('Clay importer golden: 4 projections passed')
49+
50+# This second report uses Clay-built library cores as well as a Clay-built
51+# /sur, then passes the selected reader result into the partial checker.
52+try:
53+ result = subprocess.run([str(ship), 'run', str(fixtures / 'bridge.txt')],
54+ stdout=subprocess.PIPE, check=True)
55+except subprocess.CalledProcessError as error:
56+ sys.exit(error.returncode)
57+expected = (fixtures / 'bridge-expected.txt').read_bytes()
58+if result.stdout != expected:
59+ print('Clay bridge differs from tests/clay-fixtures/bridge-expected.txt', file=sys.stderr)
60+ print('expected:', expected.decode().rstrip(), file=sys.stderr)
61+ print('actual: ', result.stdout.decode().rstrip(), file=sys.stderr)
62+ sys.exit(1)
63+print('Clay importer/checker bridge golden passed')
tools/importer-test+3−2
@@ -13,7 +13,8 @@ command = [str(root / 'tools' / 'hoon'), '--lib', str(root / 'jibb-dev' / 'lib'
1313 '--cord', 'presence=' + str(fixture / 'tlon-presence.txt'),
1414 '--cord', 'docs=' + str(fixture / 'tlon-docs.txt'),
1515 '--cord', 'shadow=' + str(fixture / 'shadow.txt'),
16− '(fixture-output small epic presence docs shadow)']
16+ '--cord', 'shadow-static=' + str(fixture / 'shadow-static.txt'),
17+ '(fixture-output small epic presence docs shadow shadow-static)']
1718result = subprocess.run(command, stdout=subprocess.PIPE)
1819if result.returncode:
1920 sys.exit(result.returncode)
@@ -25,4 +26,4 @@ if result.stdout != expected:
2526 result.stdout.decode().splitlines(keepends=True),
2627 fromfile='expected tree.txt', tofile='actual types'))
2728 sys.exit(1)
28−print('importer golden: 45 projections passed')
29+print('importer golden: 49 projections passed')