on master help sign in
923 files changed+41614−4980
since splitsnapshots
unifiedsplit
README.md+1−1 docs/compiler.md+38−4 docs/development.md+15−3 docs/open-questions.md+12−3 docs/prelude-inventory.md+9−7 docs/prompts/milestone-2.md+6−6 docs/spec/decisions.md+6−5 docs/spec/grammar.md+5−4 docs/spec/overview.md+5−5 docs/status.md+56−7 jibb-dev/lib/jibb-import.hoon+823−19 jibb-dev/lib/jibb.hoon+3477−133 jibb-dev/lib/jibb/internal.jibb+6 jibb-dev/lib/jibb/prelude.jibb+101−20 my-app/sur/import-fixture.hoon+1 tests/clay-fixtures/ford-nested-union-bridge-expected.txt+1 tests/clay-fixtures/ford-nested-union-bridge.txt+14 tests/clay-fixtures/ford-nested-union-expected.txt+1 tests/clay-fixtures/ford-nested-union.txt+9 tests/clay-fixtures/mark-update-import-expected.txt+1 tests/clay-fixtures/mark-update-import.txt+9 tests/clay-fixtures/record-bridge-expected.txt+1 tests/clay-fixtures/record-bridge.txt+11 tests/golden/doc-grammar-04-step/about.txt+1 tests/golden/doc-grammar-04-step/modules.txt+1 tests/golden/doc-grammar-04-step/types.txt+3 tests/golden/doc-grammar-06-cart-store/about.txt+1 tests/golden/doc-grammar-06-cart-store/modules.txt+1 tests/golden/doc-grammar-06-cart-store/types.txt+2 tests/golden/module-cache-dag/about.txt+4 tests/golden/module-cache-dag/module-trees.txt+46 tests/golden/module-cache-dag/modules.txt+8 tests/golden/module-cache-dag/modules/ui/n0.jibb+3 tests/golden/module-cache-dag/modules/ui/n1.jibb+3 tests/golden/module-cache-dag/modules/ui/n2.jibb+3 tests/golden/module-cache-dag/modules/ui/n3.jibb+3 tests/golden/module-cache-dag/modules/ui/n4.jibb+3 tests/golden/module-cache-dag/modules/ui/n5.jibb+3 tests/golden/module-cache-dag/modules/ui/n6.jibb+3 tests/golden/module-cache-dag/modules/ui/n7.jibb+1 tests/golden/module-cache-dag/source.jibb+2 tests/golden/module-cache-dag/tokens.txt+14 tests/golden/module-cache-dag/tree.txt+5 tests/golden/module-cache-dag/types.txt+2 tests/golden/module-cache-faces/about.txt+4 tests/golden/module-cache-faces/module-trees.txt+4 tests/golden/module-cache-faces/modules.txt+1 tests/golden/module-cache-faces/modules/ui/shared.jibb+1 tests/golden/module-cache-faces/source.jibb+4 tests/golden/module-cache-faces/tokens.txt+28 tests/golden/module-cache-faces/tree.txt+9 tests/golden/module-cache-faces/types.txt+3 tests/golden/module-cache-incomplete/about.txt+4 tests/golden/module-cache-incomplete/module-trees.txt+8 tests/golden/module-cache-incomplete/modules.txt+1 tests/golden/module-cache-incomplete/modules/ui/bad.jibb+2 tests/golden/module-cache-incomplete/source.jibb+3 tests/golden/module-cache-incomplete/tokens.txt+21 tests/golden/module-cache-incomplete/tree.txt+6 tests/golden/module-cache-incomplete/types.txt+2 tests/golden/module-cache-sibling-cycle/about.txt+4 tests/golden/module-cache-sibling-cycle/module-trees.txt+15 tests/golden/module-cache-sibling-cycle/modules.txt+3 tests/golden/module-cache-sibling-cycle/modules/ui/a.jibb+3 tests/golden/module-cache-sibling-cycle/modules/ui/b.jibb+2 tests/golden/module-cache-sibling-cycle/modules/ui/safe.jibb+1 tests/golden/module-cache-sibling-cycle/source.jibb+3 tests/golden/module-cache-sibling-cycle/tokens.txt+18 tests/golden/module-cache-sibling-cycle/tree.txt+4 tests/golden/module-cache-sibling-cycle/types.txt+2 tests/golden/prelude-1c-structural/source.jibb+8−6 tests/golden/prelude-1c-structural/tokens.txt+454−440 tests/golden/prelude-1c-structural/tree.txt+191−185 tests/golden/prelude-1c-structural/types.txt+2−2 tests/golden/prelude-3g-basic/source.jibb+8−6 tests/golden/prelude-3g-basic/tokens.txt+146−132 tests/golden/prelude-3g-basic/tree.txt+64−58 tests/golden/prelude-3g-basic/types.txt+2−2 tests/golden/prelude-3g-like/source.jibb+8−6 tests/golden/prelude-3g-like/tokens.txt+357−343 tests/golden/prelude-3g-like/tree.txt+152−146 tests/golden/prelude-3g-like/types.txt+2−2 tests/golden/prelude-3g-structural/source.jibb+8−6 tests/golden/prelude-3g-structural/tokens.txt+309−295 tests/golden/prelude-3g-structural/tree.txt+132−126 tests/golden/prelude-3g-structural/types.txt+2−2 tests/golden/prelude-list-helpers/source.jibb+8−6 tests/golden/prelude-list-helpers/tokens.txt+568−554 tests/golden/prelude-list-helpers/tree.txt+245−239 tests/golden/prelude-list-helpers/types.txt+3−3 tests/golden/prelude-list-unit/source.jibb+8−6 tests/golden/prelude-list-unit/tokens.txt+86−72 tests/golden/prelude-list-unit/tree.txt+37−31 tests/golden/prelude-list-unit/types.txt+2−2 tests/golden/prelude-unit-list-transforms/about.txt+2−2 tests/golden/prelude-unit-list-transforms/source.jibb+101−20 tests/golden/prelude-unit-list-transforms/tokens.txt+1668−1145 tests/golden/prelude-unit-list-transforms/tree.txt+747−513 tests/golden/prelude-unit-list-transforms/types.txt+17−8 tests/golden/types-capital-distinct/about.txt+4 tests/golden/types-capital-distinct/source.jibb+6 tests/golden/types-capital-distinct/tokens.txt+73 tests/golden/types-capital-distinct/tree.txt+33 tests/golden/types-capital-distinct/types.txt+19 tests/golden/types-cell-pattern-many/about.txt+4 tests/golden/types-cell-pattern-many/modules.txt+1 tests/golden/types-cell-pattern-many/source.jibb+41 tests/golden/types-cell-pattern-many/tokens.txt+315 tests/golden/types-cell-pattern-many/tree.txt+144 tests/golden/types-cell-pattern-many/types.txt+14 tests/golden/types-cell-pattern-schemes/about.txt+4 tests/golden/types-cell-pattern-schemes/modules.txt+1 tests/golden/types-cell-pattern-schemes/source.jibb+23 tests/golden/types-cell-pattern-schemes/tokens.txt+168 tests/golden/types-cell-pattern-schemes/tree.txt+70 tests/golden/types-cell-pattern-schemes/types.txt+16 tests/golden/types-cell-pattern-tail/about.txt+4 tests/golden/types-cell-pattern-tail/modules.txt+1 tests/golden/types-cell-pattern-tail/source.jibb+18 tests/golden/types-cell-pattern-tail/tokens.txt+126 tests/golden/types-cell-pattern-tail/tree.txt+59 tests/golden/types-cell-pattern-tail/types.txt+7 tests/golden/types-generic-arity/about.txt+4 tests/golden/types-generic-arity/source.jibb+4 tests/golden/types-generic-arity/tokens.txt+64 tests/golden/types-generic-arity/tree.txt+23 tests/golden/types-generic-arity/types.txt+5 tests/golden/types-generic-face-inference/about.txt+4 tests/golden/types-generic-face-inference/source.jibb+8 tests/golden/types-generic-face-inference/tokens.txt+134 tests/golden/types-generic-face-inference/tree.txt+56 tests/golden/types-generic-face-inference/types.txt+13 tests/golden/types-generic-gates/about.txt+4 tests/golden/types-generic-gates/source.jibb+4 tests/golden/types-generic-gates/tokens.txt+59 tests/golden/types-generic-gates/tree.txt+21 tests/golden/types-generic-gates/types.txt+5 tests/golden/types-generic-import-reverse/about.txt+4 tests/golden/types-generic-import-reverse/module-trees.txt+7 tests/golden/types-generic-import-reverse/modules.txt+1 tests/golden/types-generic-import-reverse/modules/ui/lib.jibb+1 tests/golden/types-generic-import-reverse/source.jibb+3 tests/golden/types-generic-import-reverse/tokens.txt+50 tests/golden/types-generic-import-reverse/tree.txt+18 tests/golden/types-generic-import-reverse/types.txt+3 tests/golden/types-generic-lexical-alias/about.txt+4 tests/golden/types-generic-lexical-alias/source.jibb+3 tests/golden/types-generic-lexical-alias/tokens.txt+35 tests/golden/types-generic-lexical-alias/tree.txt+13 tests/golden/types-generic-lexical-alias/types.txt+4 tests/golden/types-generic-local-parameter/about.txt+4 tests/golden/types-generic-local-parameter/source.jibb+3 tests/golden/types-generic-local-parameter/tokens.txt+37 tests/golden/types-generic-local-parameter/tree.txt+15 tests/golden/types-generic-local-parameter/types.txt+2 tests/golden/types-generic-local-scope/about.txt+4 tests/golden/types-generic-local-scope/source.jibb+3 tests/golden/types-generic-local-scope/tokens.txt+37 tests/golden/types-generic-local-scope/tree.txt+15 tests/golden/types-generic-local-scope/types.txt+2 tests/golden/types-generic-module/about.txt+4 tests/golden/types-generic-module/module-trees.txt+7 tests/golden/types-generic-module/modules.txt+1 tests/golden/types-generic-module/modules/ui/lib.jibb+1 tests/golden/types-generic-module/source.jibb+3 tests/golden/types-generic-module/tokens.txt+39 tests/golden/types-generic-module/tree.txt+14 tests/golden/types-generic-module/types.txt+3 tests/golden/types-generic-nested-scope/about.txt+4 tests/golden/types-generic-nested-scope/source.jibb+3 tests/golden/types-generic-nested-scope/tokens.txt+56 tests/golden/types-generic-nested-scope/tree.txt+21 tests/golden/types-generic-nested-scope/types.txt+4 tests/golden/types-generic-parameters/about.txt+4 tests/golden/types-generic-parameters/source.jibb+4 tests/golden/types-generic-parameters/tokens.txt+64 tests/golden/types-generic-parameters/tree.txt+23 tests/golden/types-generic-parameters/types.txt+5 tests/golden/types-generic-record/about.txt+4 tests/golden/types-generic-record/source.jibb+3 tests/golden/types-generic-record/tokens.txt+47 tests/golden/types-generic-record/tree.txt+18 tests/golden/types-generic-record/types.txt+4 tests/golden/types-generic-recursive-union/about.txt+4 tests/golden/types-generic-recursive-union/source.jibb+6 tests/golden/types-generic-recursive-union/tokens.txt+58 tests/golden/types-generic-recursive-union/tree.txt+24 tests/golden/types-generic-recursive-union/types.txt+5 tests/golden/types-generic-repeated/about.txt+4 tests/golden/types-generic-repeated/source.jibb+3 tests/golden/types-generic-repeated/tokens.txt+47 tests/golden/types-generic-repeated/tree.txt+18 tests/golden/types-generic-repeated/types.txt+10 tests/golden/types-generic-union-alias-face/about.txt+4 tests/golden/types-generic-union-alias-face/module-trees.txt+11 tests/golden/types-generic-union-alias-face/modules.txt+1 tests/golden/types-generic-union-alias-face/modules/ui/base.jibb+3 tests/golden/types-generic-union-alias-face/source.jibb+6 tests/golden/types-generic-union-alias-face/tokens.txt+75 tests/golden/types-generic-union-alias-face/tree.txt+24 tests/golden/types-generic-union-alias-face/types.txt+12 tests/golden/types-generic-union-alias/about.txt+4 tests/golden/types-generic-union-alias/source.jibb+23 tests/golden/types-generic-union-alias/tokens.txt+248 tests/golden/types-generic-union-alias/tree.txt+86 tests/golden/types-generic-union-alias/types.txt+22 tests/golden/types-generic-union-capitals/about.txt+4 tests/golden/types-generic-union-capitals/source.jibb+17 tests/golden/types-generic-union-capitals/tokens.txt+162 tests/golden/types-generic-union-capitals/tree.txt+68 tests/golden/types-generic-union-capitals/types.txt+34 tests/golden/types-generic-union-errors/about.txt+4 tests/golden/types-generic-union-errors/source.jibb+11 tests/golden/types-generic-union-errors/tokens.txt+93 tests/golden/types-generic-union-errors/tree.txt+36 tests/golden/types-generic-union-errors/types.txt+26 tests/golden/types-generic-union-escaping/about.txt+4 tests/golden/types-generic-union-escaping/module-trees.txt+16 tests/golden/types-generic-union-escaping/modules.txt+2 tests/golden/types-generic-union-escaping/modules/ui/base.jibb+3 tests/golden/types-generic-union-escaping/modules/ui/mid.jibb+3 tests/golden/types-generic-union-escaping/source.jibb+3 tests/golden/types-generic-union-escaping/tokens.txt+15 tests/golden/types-generic-union-escaping/tree.txt+4 tests/golden/types-generic-union-escaping/types.txt+3 tests/golden/types-generic-union-import/about.txt+4 tests/golden/types-generic-union-import/module-trees.txt+32 tests/golden/types-generic-union-import/modules.txt+2 tests/golden/types-generic-union-import/modules/ui/shared.jibb+4 tests/golden/types-generic-union-import/modules/ui/twin.jibb+4 tests/golden/types-generic-union-import/source.jibb+9 tests/golden/types-generic-union-import/tokens.txt+79 tests/golden/types-generic-union-import/tree.txt+27 tests/golden/types-generic-union-import/types.txt+7 tests/golden/types-generic-union-local/about.txt+4 tests/golden/types-generic-union-local/source.jibb+34 tests/golden/types-generic-union-local/tokens.txt+297 tests/golden/types-generic-union-local/tree.txt+120 tests/golden/types-generic-union-local/types.txt+22 tests/golden/types-generic-union-transitive/about.txt+4 tests/golden/types-generic-union-transitive/module-trees.txt+27 tests/golden/types-generic-union-transitive/modules.txt+2 tests/golden/types-generic-union-transitive/modules/ui/base.jibb+3 tests/golden/types-generic-union-transitive/modules/ui/mid.jibb+4 tests/golden/types-generic-union-transitive/source.jibb+5 tests/golden/types-generic-union-transitive/tokens.txt+43 tests/golden/types-generic-union-transitive/tree.txt+15 tests/golden/types-generic-union-transitive/types.txt+5 tests/golden/types-import-duplicate-mark/about.txt+4 tests/golden/types-import-duplicate-mark/mar/duplicate.txt+5 tests/golden/types-import-duplicate-mark/marks.txt+1 tests/golden/types-import-duplicate-mark/source.jibb+2 tests/golden/types-import-duplicate-mark/tokens.txt+11 tests/golden/types-import-duplicate-mark/tree.txt+6 tests/golden/types-import-duplicate-mark/types.txt+2 tests/golden/types-import-duplicate-sur/about.txt+4 tests/golden/types-import-duplicate-sur/imports.txt+3 tests/golden/types-import-duplicate-sur/source.jibb+5 tests/golden/types-import-duplicate-sur/sur/fixture.txt+6 tests/golden/types-import-duplicate-sur/tokens.txt+35 tests/golden/types-import-duplicate-sur/tree.txt+18 tests/golden/types-import-duplicate-sur/types.txt+5 tests/golden/types-import-hoon-flags/about.txt+4 tests/golden/types-import-hoon-flags/imports.txt+4 tests/golden/types-import-hoon-flags/source.jibb+14 tests/golden/types-import-hoon-flags/sur/flags.txt+7 tests/golden/types-import-hoon-flags/tokens.txt+91 tests/golden/types-import-hoon-flags/tree.txt+41 tests/golden/types-import-hoon-flags/types.txt+24 tests/golden/types-import-hoon-noun/about.txt+4 tests/golden/types-import-hoon-noun/imports.txt+4 tests/golden/types-import-hoon-noun/source.jibb+8 tests/golden/types-import-hoon-noun/sur/fixture.txt+6 tests/golden/types-import-hoon-noun/tokens.txt+60 tests/golden/types-import-hoon-noun/tree.txt+28 tests/golden/types-import-hoon-noun/types.txt+8 tests/golden/types-import-mark-record/about.txt+4 tests/golden/types-import-mark-record/mar/choice.txt+5 tests/golden/types-import-mark-record/mar/note.txt+5 tests/golden/types-import-mark-record/marks.txt+2 tests/golden/types-import-mark-record/source.jibb+5 tests/golden/types-import-mark-record/tokens.txt+30 tests/golden/types-import-mark-record/tree.txt+15 tests/golden/types-import-mark-record/types.txt+4 tests/golden/types-import-sur-record-graph/about.txt+4 tests/golden/types-import-sur-record-graph/imports.txt+1 tests/golden/types-import-sur-record-graph/module-trees.txt+7 tests/golden/types-import-sur-record-graph/modules.txt+1 tests/golden/types-import-sur-record-graph/modules/ui/lib.jibb+2 tests/golden/types-import-sur-record-graph/source.jibb+2 tests/golden/types-import-sur-record-graph/sur/fixture.txt+3 tests/golden/types-import-sur-record-graph/tokens.txt+32 tests/golden/types-import-sur-record-graph/tree.txt+13 tests/golden/types-import-sur-record-graph/types.txt+2 tests/golden/types-import-tlon-notes/about.txt+4 tests/golden/types-import-tlon-notes/imports.txt+2 tests/golden/types-import-tlon-notes/source.jibb+3 tests/golden/types-import-tlon-notes/sur/notes.txt+433 tests/golden/types-import-tlon-notes/tokens.txt+19 tests/golden/types-import-tlon-notes/tree.txt+10 tests/golden/types-import-tlon-notes/types.txt+3 tests/golden/types-list-branch/about.txt+4 tests/golden/types-list-branch/modules.txt+1 tests/golden/types-list-branch/source.jibb+81 tests/golden/types-list-branch/tokens.txt+521 tests/golden/types-list-branch/tree.txt+237 tests/golden/types-list-branch/types.txt+41 tests/golden/types-list-cons/about.txt+4 tests/golden/types-list-cons/modules.txt+1 tests/golden/types-list-cons/source.jibb+20 tests/golden/types-list-cons/tokens.txt+217 tests/golden/types-list-cons/tree.txt+85 tests/golden/types-list-cons/types.txt+29 tests/golden/types-list-context/about.txt+4 tests/golden/types-list-context/modules.txt+1 tests/golden/types-list-context/source.jibb+17 tests/golden/types-list-context/tokens.txt+143 tests/golden/types-list-context/tree.txt+59 tests/golden/types-list-context/types.txt+18 tests/golden/types-list-imported/about.txt+4 tests/golden/types-list-imported/imports.txt+2 tests/golden/types-list-imported/modules.txt+1 tests/golden/types-list-imported/source.jibb+14 tests/golden/types-list-imported/sur/fixture.txt+4 tests/golden/types-list-imported/tokens.txt+109 tests/golden/types-list-imported/tree.txt+52 tests/golden/types-list-imported/types.txt+22 tests/golden/types-list-open-constraints/about.txt+4 tests/golden/types-list-open-constraints/modules.txt+1 tests/golden/types-list-open-constraints/source.jibb+19 tests/golden/types-list-open-constraints/tokens.txt+178 tests/golden/types-list-open-constraints/tree.txt+68 tests/golden/types-list-open-constraints/types.txt+30 tests/golden/types-list-open/about.txt+4 tests/golden/types-list-open/modules.txt+1 tests/golden/types-list-open/source.jibb+13 tests/golden/types-list-open/tokens.txt+94 tests/golden/types-list-open/tree.txt+36 tests/golden/types-list-open/types.txt+18 tests/golden/types-list-pattern-imported/about.txt+4 tests/golden/types-list-pattern-imported/imports.txt+2 tests/golden/types-list-pattern-imported/modules.txt+1 tests/golden/types-list-pattern-imported/source.jibb+13 tests/golden/types-list-pattern-imported/sur/fixture.txt+5 tests/golden/types-list-pattern-imported/tokens.txt+66 tests/golden/types-list-pattern-imported/tree.txt+32 tests/golden/types-list-pattern-imported/types.txt+4 tests/golden/types-list-patterns/about.txt+4 tests/golden/types-list-patterns/modules.txt+1 tests/golden/types-list-patterns/source.jibb+64 tests/golden/types-list-patterns/tokens.txt+359 tests/golden/types-list-patterns/tree.txt+168 tests/golden/types-list-patterns/types.txt+17 tests/golden/types-list-zero-fit/about.txt+4 tests/golden/types-list-zero-fit/modules.txt+1 tests/golden/types-list-zero-fit/source.jibb+8 tests/golden/types-list-zero-fit/tokens.txt+181 tests/golden/types-list-zero-fit/tree.txt+91 tests/golden/types-list-zero-fit/types.txt+27 tests/golden/types-local-capitals/about.txt+4 tests/golden/types-local-capitals/modules.txt+1 tests/golden/types-local-capitals/source.jibb+73 tests/golden/types-local-capitals/tokens.txt+473 tests/golden/types-local-capitals/tree.txt+229 tests/golden/types-local-capitals/types.txt+28 tests/golden/types-local-recursive/about.txt+4 tests/golden/types-local-recursive/modules.txt+1 tests/golden/types-local-recursive/source.jibb+54 tests/golden/types-local-recursive/tokens.txt+351 tests/golden/types-local-recursive/tree.txt+170 tests/golden/types-local-recursive/types.txt+12 tests/golden/types-local-scc-adversarial/about.txt+4 tests/golden/types-local-scc-adversarial/modules.txt+1 tests/golden/types-local-scc-adversarial/source.jibb+54 tests/golden/types-local-scc-adversarial/tokens.txt+404 tests/golden/types-local-scc-adversarial/tree.txt+204 tests/golden/types-local-scc-adversarial/types.txt+17 tests/golden/types-local-scc/about.txt+4 tests/golden/types-local-scc/modules.txt+1 tests/golden/types-local-scc/source.jibb+58 tests/golden/types-local-scc/tokens.txt+434 tests/golden/types-local-scc/tree.txt+214 tests/golden/types-local-scc/types.txt+12 tests/golden/types-missing-tag-context/about.txt+4 tests/golden/types-missing-tag-context/modules.txt+1 tests/golden/types-missing-tag-context/source.jibb+17 tests/golden/types-missing-tag-context/tokens.txt+98 tests/golden/types-missing-tag-context/tree.txt+45 tests/golden/types-missing-tag-context/types.txt+38 tests/golden/types-missing-tag-imported/about.txt+4 tests/golden/types-missing-tag-imported/imports.txt+2 tests/golden/types-missing-tag-imported/source.jibb+6 tests/golden/types-missing-tag-imported/sur/fixture.txt+21 tests/golden/types-missing-tag-imported/tokens.txt+43 tests/golden/types-missing-tag-imported/tree.txt+18 tests/golden/types-missing-tag-imported/types.txt+12 tests/golden/types-missing-tag-named/about.txt+4 tests/golden/types-missing-tag-named/modules.txt+1 tests/golden/types-missing-tag-named/source.jibb+23 tests/golden/types-missing-tag-named/tokens.txt+155 tests/golden/types-missing-tag-named/tree.txt+66 tests/golden/types-missing-tag-named/types.txt+66 tests/golden/types-multi-call/about.txt+4 tests/golden/types-multi-call/modules.txt+1 tests/golden/types-multi-call/source.jibb+42 tests/golden/types-multi-call/tokens.txt+370 tests/golden/types-multi-call/tree.txt+169 tests/golden/types-multi-call/types.txt+100 tests/golden/types-multi-import/about.txt+4 tests/golden/types-multi-import/module-trees.txt+16 tests/golden/types-multi-import/modules.txt+1 tests/golden/types-multi-import/modules/ui/lib.jibb+5 tests/golden/types-multi-import/source.jibb+5 tests/golden/types-multi-import/tokens.txt+43 tests/golden/types-multi-import/tree.txt+20 tests/golden/types-multi-import/types.txt+17 tests/golden/types-nested-missing-tag/about.txt+4 tests/golden/types-nested-missing-tag/modules.txt+1 tests/golden/types-nested-missing-tag/source.jibb+18 tests/golden/types-nested-missing-tag/tokens.txt+184 tests/golden/types-nested-missing-tag/tree.txt+79 tests/golden/types-nested-missing-tag/types.txt+71 tests/golden/types-null-context/about.txt+4 tests/golden/types-null-context/source.jibb+8 tests/golden/types-null-context/tokens.txt+57 tests/golden/types-null-context/tree.txt+25 tests/golden/types-null-context/types.txt+13 tests/golden/types-null-overlap/about.txt+4 tests/golden/types-null-overlap/source.jibb+3 tests/golden/types-null-overlap/tokens.txt+8 tests/golden/types-null-overlap/tree.txt+3 tests/golden/types-null-overlap/types.txt+8 tests/golden/types-null-unresolved/about.txt+4 tests/golden/types-null-unresolved/source.jibb+18 tests/golden/types-null-unresolved/tokens.txt+79 tests/golden/types-null-unresolved/tree.txt+34 tests/golden/types-null-unresolved/types.txt+9 tests/golden/types-partial-local-molds/about.txt+2−1 tests/golden/types-partial-local-molds/types.txt+1−1 tests/golden/types-partial-unresolved-tag/about.txt+1−1 tests/golden/types-partial-unresolved-tag/types.txt+1−1 tests/golden/types-prelude-direct/about.txt+4 tests/golden/types-prelude-direct/modules.txt+1 tests/golden/types-prelude-direct/source.jibb+5 tests/golden/types-prelude-direct/tokens.txt+53 tests/golden/types-prelude-direct/tree.txt+25 tests/golden/types-prelude-direct/types.txt+6 tests/golden/types-prelude-interface/about.txt+4 tests/golden/types-prelude-interface/module-trees.txt+13 tests/golden/types-prelude-interface/modules.txt+2 tests/golden/types-prelude-interface/modules/ui/left.jibb+1 tests/golden/types-prelude-interface/modules/ui/right.jibb+1 tests/golden/types-prelude-interface/source.jibb+10 tests/golden/types-prelude-interface/tokens.txt+81 tests/golden/types-prelude-interface/tree.txt+33 tests/golden/types-prelude-interface/types.txt+9 tests/golden/types-prelude-list-functions/about.txt+4 tests/golden/types-prelude-list-functions/module-trees.txt+11 tests/golden/types-prelude-list-functions/modules.txt+1 tests/golden/types-prelude-list-functions/modules/ui/lib.jibb+2 tests/golden/types-prelude-list-functions/source.jibb+18 tests/golden/types-prelude-list-functions/tokens.txt+183 tests/golden/types-prelude-list-functions/tree.txt+87 tests/golden/types-prelude-list-functions/types.txt+28 tests/golden/types-prelude-list-helpers/about.txt+4 tests/golden/types-prelude-list-helpers/modules.txt+1 tests/golden/types-prelude-list-helpers/source.jibb+15 tests/golden/types-prelude-list-helpers/tokens.txt+182 tests/golden/types-prelude-list-helpers/tree.txt+98 tests/golden/types-prelude-list-helpers/types.txt+34 tests/golden/types-prelude-unit-helpers/about.txt+4 tests/golden/types-prelude-unit-helpers/modules.txt+1 tests/golden/types-prelude-unit-helpers/source.jibb+15 tests/golden/types-prelude-unit-helpers/tokens.txt+209 tests/golden/types-prelude-unit-helpers/tree.txt+115 tests/golden/types-prelude-unit-helpers/types.txt+26 tests/golden/types-record-bound-variable/about.txt+4 tests/golden/types-record-bound-variable/source.jibb+6 tests/golden/types-record-bound-variable/tokens.txt+65 tests/golden/types-record-bound-variable/tree.txt+33 tests/golden/types-record-bound-variable/types.txt+5 tests/golden/types-record-cast-context/about.txt+4 tests/golden/types-record-cast-context/modules.txt+1 tests/golden/types-record-cast-context/source.jibb+24 tests/golden/types-record-cast-context/tokens.txt+234 tests/golden/types-record-cast-context/tree.txt+105 tests/golden/types-record-cast-context/types.txt+49 tests/golden/types-record-change-generic/about.txt+4 tests/golden/types-record-change-generic/modules.txt+1 tests/golden/types-record-change-generic/source.jibb+11 tests/golden/types-record-change-generic/tokens.txt+169 tests/golden/types-record-change-generic/tree.txt+66 tests/golden/types-record-change-generic/types.txt+16 tests/golden/types-record-change/about.txt+4 tests/golden/types-record-change/modules.txt+1 tests/golden/types-record-change/source.jibb+19 tests/golden/types-record-change/tokens.txt+254 tests/golden/types-record-change/tree.txt+99 tests/golden/types-record-change/types.txt+42 tests/golden/types-record-faces/about.txt+4 tests/golden/types-record-faces/source.jibb+8 tests/golden/types-record-faces/tokens.txt+90 tests/golden/types-record-faces/tree.txt+41 tests/golden/types-record-faces/types.txt+15 tests/golden/types-record-import/about.txt+4 tests/golden/types-record-import/module-trees.txt+9 tests/golden/types-record-import/modules.txt+1 tests/golden/types-record-import/modules/ui/lib.jibb+1 tests/golden/types-record-import/source.jibb+3 tests/golden/types-record-import/tokens.txt+36 tests/golden/types-record-import/tree.txt+16 tests/golden/types-record-import/types.txt+3 tests/golden/types-record-local-scheme/about.txt+4 tests/golden/types-record-local-scheme/source.jibb+5 tests/golden/types-record-local-scheme/tokens.txt+44 tests/golden/types-record-local-scheme/tree.txt+20 tests/golden/types-record-local-scheme/types.txt+4 tests/golden/types-record-nested/about.txt+4 tests/golden/types-record-nested/source.jibb+4 tests/golden/types-record-nested/tokens.txt+54 tests/golden/types-record-nested/tree.txt+24 tests/golden/types-record-nested/types.txt+5 tests/golden/types-record-to-tuple/about.txt+4 tests/golden/types-record-to-tuple/source.jibb+4 tests/golden/types-record-to-tuple/tokens.txt+38 tests/golden/types-record-to-tuple/tree.txt+17 tests/golden/types-record-to-tuple/types.txt+5 tests/golden/types-recursion-scc-failures/about.txt+4 tests/golden/types-recursion-scc-failures/modules.txt+1 tests/golden/types-recursion-scc-failures/source.jibb+11 tests/golden/types-recursion-scc-failures/tokens.txt+90 tests/golden/types-recursion-scc-failures/tree.txt+45 tests/golden/types-recursion-scc-failures/types.txt+10 tests/golden/types-recursion-scc-groups/about.txt+4 tests/golden/types-recursion-scc-groups/modules.txt+1 tests/golden/types-recursion-scc-groups/source.jibb+9 tests/golden/types-recursion-scc-groups/tokens.txt+91 tests/golden/types-recursion-scc-groups/tree.txt+42 tests/golden/types-recursion-scc-groups/types.txt+10 tests/golden/types-recursion-scc-import-bad/about.txt+4 tests/golden/types-recursion-scc-import-bad/module-trees.txt+16 tests/golden/types-recursion-scc-import-bad/modules.txt+1 tests/golden/types-recursion-scc-import-bad/modules/ui/lib.jibb+3 tests/golden/types-recursion-scc-import-bad/source.jibb+2 tests/golden/types-recursion-scc-import-bad/tokens.txt+14 tests/golden/types-recursion-scc-import-bad/tree.txt+5 tests/golden/types-recursion-scc-import-bad/types.txt+2 tests/golden/types-recursion-scc-import/about.txt+4 tests/golden/types-recursion-scc-import/module-trees.txt+12 tests/golden/types-recursion-scc-import/modules.txt+1 tests/golden/types-recursion-scc-import/modules/ui/lib.jibb+2 tests/golden/types-recursion-scc-import/source.jibb+3 tests/golden/types-recursion-scc-import/tokens.txt+25 tests/golden/types-recursion-scc-import/tree.txt+12 tests/golden/types-recursion-scc-import/types.txt+3 tests/golden/types-recursion-scc-local/about.txt+4 tests/golden/types-recursion-scc-local/modules.txt+1 tests/golden/types-recursion-scc-local/source.jibb+11 tests/golden/types-recursion-scc-local/tokens.txt+80 tests/golden/types-recursion-scc-local/tree.txt+39 tests/golden/types-recursion-scc-local/types.txt+4 tests/golden/types-recursion-scc-order/about.txt+4 tests/golden/types-recursion-scc-order/modules.txt+1 tests/golden/types-recursion-scc-order/source.jibb+4 tests/golden/types-recursion-scc-order/tokens.txt+33 tests/golden/types-recursion-scc-order/tree.txt+15 tests/golden/types-recursion-scc-order/types.txt+5 tests/golden/types-recursion-scc-shadow/about.txt+4 tests/golden/types-recursion-scc-shadow/modules.txt+1 tests/golden/types-recursion-scc-shadow/source.jibb+3 tests/golden/types-recursion-scc-shadow/tokens.txt+30 tests/golden/types-recursion-scc-shadow/tree.txt+15 tests/golden/types-recursion-scc-shadow/types.txt+4 tests/golden/types-recursive-branch/about.txt+4 tests/golden/types-recursive-branch/modules.txt+1 tests/golden/types-recursive-branch/source.jibb+103 tests/golden/types-recursive-branch/tokens.txt+573 tests/golden/types-recursive-branch/tree.txt+306 tests/golden/types-recursive-branch/types.txt+50 tests/golden/types-recursive-gate/about.txt+4 tests/golden/types-recursive-gate/source.jibb+55 tests/golden/types-recursive-gate/tokens.txt+355 tests/golden/types-recursive-gate/tree.txt+176 tests/golden/types-recursive-gate/types.txt+42 tests/golden/types-recursive-sample/about.txt+4 tests/golden/types-recursive-sample/source.jibb+40 tests/golden/types-recursive-sample/tokens.txt+344 tests/golden/types-recursive-sample/tree.txt+161 tests/golden/types-recursive-sample/types.txt+40 tests/golden/types-scope-library-poke/about.txt+4 tests/golden/types-scope-library-poke/modules.txt+1 tests/golden/types-scope-library-poke/path.txt+1 tests/golden/types-scope-library-poke/source.jibb+2 tests/golden/types-scope-library-poke/tokens.txt+8 tests/golden/types-scope-library-poke/tree.txt+3 tests/golden/types-scope-library-poke/types.txt+2 tests/golden/types-scope-root-api/about.txt+4 tests/golden/types-scope-root-api/modules.txt+1 tests/golden/types-scope-root-api/path.txt+1 tests/golden/types-scope-root-api/source.jibb+2 tests/golden/types-scope-root-api/tokens.txt+7 tests/golden/types-scope-root-api/tree.txt+3 tests/golden/types-scope-root-api/types.txt+2 tests/golden/types-scope-store-duplicate/about.txt+4 tests/golden/types-scope-store-duplicate/modules.txt+1 tests/golden/types-scope-store-duplicate/path.txt+1 tests/golden/types-scope-store-duplicate/source.jibb+3 tests/golden/types-scope-store-duplicate/tokens.txt+16 tests/golden/types-scope-store-duplicate/tree.txt+6 tests/golden/types-scope-store-duplicate/types.txt+2 tests/golden/types-scope-store-shadow/about.txt+4 tests/golden/types-scope-store-shadow/modules.txt+1 tests/golden/types-scope-store-shadow/path.txt+1 tests/golden/types-scope-store-shadow/source.jibb+3 tests/golden/types-scope-store-shadow/tokens.txt+16 tests/golden/types-scope-store-shadow/tree.txt+6 tests/golden/types-scope-store-shadow/types.txt+2 tests/golden/types-string-interpolation/about.txt+4 tests/golden/types-string-interpolation/modules.txt+1 tests/golden/types-string-interpolation/source.jibb+28 tests/golden/types-string-interpolation/tokens.txt+259 tests/golden/types-string-interpolation/tree.txt+109 tests/golden/types-string-interpolation/types.txt+33 tests/golden/types-tuple-context-nested/about.txt+4 tests/golden/types-tuple-context-nested/modules.txt+1 tests/golden/types-tuple-context-nested/source.jibb+24 tests/golden/types-tuple-context-nested/tokens.txt+289 tests/golden/types-tuple-context-nested/tree.txt+140 tests/golden/types-tuple-context-nested/types.txt+55 tests/golden/types-tuple-context/about.txt+4 tests/golden/types-tuple-context/modules.txt+1 tests/golden/types-tuple-context/source.jibb+7 tests/golden/types-tuple-context/tokens.txt+109 tests/golden/types-tuple-context/tree.txt+55 tests/golden/types-tuple-context/types.txt+14 tests/golden/types-union-alias/about.txt+4 tests/golden/types-union-alias/source.jibb+5 tests/golden/types-union-alias/tokens.txt+23 tests/golden/types-union-alias/tree.txt+10 tests/golden/types-union-alias/types.txt+4 tests/golden/types-union-branch-context/about.txt+4 tests/golden/types-union-branch-context/source.jibb+54 tests/golden/types-union-branch-context/tokens.txt+237 tests/golden/types-union-branch-context/tree.txt+120 tests/golden/types-union-branch-context/types.txt+24 tests/golden/types-union-branch-pending/about.txt+4 tests/golden/types-union-branch-pending/source.jibb+24 tests/golden/types-union-branch-pending/tokens.txt+102 tests/golden/types-union-branch-pending/tree.txt+48 tests/golden/types-union-branch-pending/types.txt+6 tests/golden/types-union-constructor-shape/about.txt+4 tests/golden/types-union-constructor-shape/source.jibb+5 tests/golden/types-union-constructor-shape/tokens.txt+58 tests/golden/types-union-constructor-shape/tree.txt+24 tests/golden/types-union-constructor-shape/types.txt+12 tests/golden/types-union-context-flow/about.txt+4 tests/golden/types-union-context-flow/source.jibb+13 tests/golden/types-union-context-flow/tokens.txt+58 tests/golden/types-union-context-flow/tree.txt+26 tests/golden/types-union-context-flow/types.txt+6 tests/golden/types-union-finite-context/about.txt+4 tests/golden/types-union-finite-context/modules.txt+1 tests/golden/types-union-finite-context/source.jibb+76 tests/golden/types-union-finite-context/tokens.txt+529 tests/golden/types-union-finite-context/tree.txt+234 tests/golden/types-union-finite-context/types.txt+27 tests/golden/types-union-finite-generic/about.txt+4 tests/golden/types-union-finite-generic/modules.txt+1 tests/golden/types-union-finite-generic/source.jibb+48 tests/golden/types-union-finite-generic/tokens.txt+336 tests/golden/types-union-finite-generic/tree.txt+143 tests/golden/types-union-finite-generic/types.txt+11 tests/golden/types-union-finite-limit/about.txt+4 tests/golden/types-union-finite-limit/modules.txt+1 tests/golden/types-union-finite-limit/source.jibb+35 tests/golden/types-union-finite-limit/tokens.txt+233 tests/golden/types-union-finite-limit/tree.txt+89 tests/golden/types-union-finite-limit/types.txt+10 tests/golden/types-union-finite/about.txt+4 tests/golden/types-union-finite/modules.txt+1 tests/golden/types-union-finite/source.jibb+45 tests/golden/types-union-finite/tokens.txt+238 tests/golden/types-union-finite/tree.txt+110 tests/golden/types-union-finite/types.txt+17 tests/golden/types-union-import/about.txt+4 tests/golden/types-union-import/module-trees.txt+8 tests/golden/types-union-import/modules.txt+1 tests/golden/types-union-import/modules/ui/lib.jibb+3 tests/golden/types-union-import/source.jibb+2 tests/golden/types-union-import/tokens.txt+13 tests/golden/types-union-import/tree.txt+4 tests/golden/types-union-import/types.txt+2 tests/golden/types-union-local-pending/about.txt+4 tests/golden/types-union-local-pending/source.jibb+3 tests/golden/types-union-local-pending/tokens.txt+10 tests/golden/types-union-local-pending/tree.txt+5 tests/golden/types-union-local-pending/types.txt+2 tests/golden/types-union-overlap-nested/about.txt+4 tests/golden/types-union-overlap-nested/source.jibb+4 tests/golden/types-union-overlap-nested/tokens.txt+21 tests/golden/types-union-overlap-nested/tree.txt+7 tests/golden/types-union-overlap-nested/types.txt+9 tests/golden/types-union-overlap/about.txt+4 tests/golden/types-union-overlap/source.jibb+4 tests/golden/types-union-overlap/tokens.txt+15 tests/golden/types-union-overlap/tree.txt+5 tests/golden/types-union-overlap/types.txt+9 tests/golden/types-union-pattern-result-context/about.txt+4 tests/golden/types-union-pattern-result-context/modules.txt+1 tests/golden/types-union-pattern-result-context/source.jibb+25 tests/golden/types-union-pattern-result-context/tokens.txt+205 tests/golden/types-union-pattern-result-context/tree.txt+96 tests/golden/types-union-pattern-result-context/types.txt+13 tests/golden/types-union-pattern-result-controls/about.txt+4 tests/golden/types-union-pattern-result-controls/modules.txt+1 tests/golden/types-union-pattern-result-controls/source.jibb+55 tests/golden/types-union-pattern-result-controls/tokens.txt+357 tests/golden/types-union-pattern-result-controls/tree.txt+161 tests/golden/types-union-pattern-result-controls/types.txt+30 tests/golden/types-union-patterns-generic/about.txt+4 tests/golden/types-union-patterns-generic/modules.txt+1 tests/golden/types-union-patterns-generic/source.jibb+36 tests/golden/types-union-patterns-generic/tokens.txt+255 tests/golden/types-union-patterns-generic/tree.txt+117 tests/golden/types-union-patterns-generic/types.txt+13 tests/golden/types-union-patterns-import/about.txt+4 tests/golden/types-union-patterns-import/module-trees.txt+8 tests/golden/types-union-patterns-import/modules.txt+1 tests/golden/types-union-patterns-import/modules/ui/lib.jibb+3 tests/golden/types-union-patterns-import/source.jibb+5 tests/golden/types-union-patterns-import/tokens.txt+28 tests/golden/types-union-patterns-import/tree.txt+12 tests/golden/types-union-patterns-import/types.txt+2 tests/golden/types-union-patterns/about.txt+4 tests/golden/types-union-patterns/modules.txt+1 tests/golden/types-union-patterns/source.jibb+74 tests/golden/types-union-patterns/tokens.txt+336 tests/golden/types-union-patterns/tree.txt+152 tests/golden/types-union-patterns/types.txt+25 tests/golden/types-union-phantom-generic/about.txt+4 tests/golden/types-union-phantom-generic/source.jibb+4 tests/golden/types-union-phantom-generic/tokens.txt+21 tests/golden/types-union-phantom-generic/tree.txt+8 tests/golden/types-union-phantom-generic/types.txt+3 tests/golden/types-union-print-cross-namespace/about.txt+4 tests/golden/types-union-print-cross-namespace/module-trees.txt+6 tests/golden/types-union-print-cross-namespace/modules.txt+1 tests/golden/types-union-print-cross-namespace/modules/ui/lib.jibb+4 tests/golden/types-union-print-cross-namespace/source.jibb+3 tests/golden/types-union-print-cross-namespace/tokens.txt+22 tests/golden/types-union-print-cross-namespace/tree.txt+9 tests/golden/types-union-print-cross-namespace/types.txt+3 tests/golden/types-union-print-distinct/about.txt+4 tests/golden/types-union-print-distinct/module-trees.txt+12 tests/golden/types-union-print-distinct/modules.txt+3 tests/golden/types-union-print-distinct/modules/ui/left.jibb+3 tests/golden/types-union-print-distinct/modules/ui/right.jibb+3 tests/golden/types-union-print-distinct/modules/ui/twin.jibb+3 tests/golden/types-union-print-distinct/source.jibb+11 tests/golden/types-union-print-distinct/tokens.txt+87 tests/golden/types-union-print-distinct/tree.txt+34 tests/golden/types-union-print-distinct/types.txt+9 tests/golden/types-union-print-escape/about.txt+4 tests/golden/types-union-print-escape/source.jibb+5 tests/golden/types-union-print-escape/tokens.txt+20 tests/golden/types-union-print-escape/tree.txt+8 tests/golden/types-union-print-escape/types.txt+2 tests/golden/types-union-print-local/about.txt+4 tests/golden/types-union-print-local/source.jibb+6 tests/golden/types-union-print-local/tokens.txt+28 tests/golden/types-union-print-local/tree.txt+12 tests/golden/types-union-print-local/types.txt+5 tests/golden/types-union-print-nested/about.txt+4 tests/golden/types-union-print-nested/source.jibb+7 tests/golden/types-union-print-nested/tokens.txt+42 tests/golden/types-union-print-nested/tree.txt+17 tests/golden/types-union-print-nested/types.txt+6 tests/golden/types-union-print-same-origin/about.txt+4 tests/golden/types-union-print-same-origin/module-trees.txt+4 tests/golden/types-union-print-same-origin/modules.txt+1 tests/golden/types-union-print-same-origin/modules/ui/shared.jibb+3 tests/golden/types-union-print-same-origin/source.jibb+5 tests/golden/types-union-print-same-origin/tokens.txt+35 tests/golden/types-union-print-same-origin/tree.txt+12 tests/golden/types-union-print-same-origin/types.txt+4 tests/golden/types-union-print-transitive/about.txt+4 tests/golden/types-union-print-transitive/module-trees.txt+8 tests/golden/types-union-print-transitive/modules.txt+2 tests/golden/types-union-print-transitive/modules/ui/base.jibb+3 tests/golden/types-union-print-transitive/modules/ui/mid.jibb+2 tests/golden/types-union-print-transitive/source.jibb+2 tests/golden/types-union-print-transitive/tokens.txt+15 tests/golden/types-union-print-transitive/tree.txt+6 tests/golden/types-union-print-transitive/types.txt+2 tests/golden/types-union-singleton/about.txt+4 tests/golden/types-union-singleton/source.jibb+16 tests/golden/types-union-singleton/tokens.txt+130 tests/golden/types-union-singleton/tree.txt+53 tests/golden/types-union-singleton/types.txt+33 tests/golden/types-union-tag-atoms/about.txt+4 tests/golden/types-union-tag-atoms/source.jibb+5 tests/golden/types-union-tag-atoms/tokens.txt+30 tests/golden/types-union-tag-atoms/tree.txt+11 tests/golden/types-union-tag-atoms/types.txt+12 tests/golden/types-union-tags/about.txt+4 tests/golden/types-union-tags/source.jibb+6 tests/golden/types-union-tags/tokens.txt+34 tests/golden/types-union-tags/tree.txt+15 tests/golden/types-union-tags/types.txt+11 tests/golden/types-union-unresolved-flow/about.txt+4 tests/golden/types-union-unresolved-flow/source.jibb+7 tests/golden/types-union-unresolved-flow/tokens.txt+31 tests/golden/types-union-unresolved-flow/tree.txt+12 tests/golden/types-union-unresolved-flow/types.txt+6 tests/golden/types-union-unresolved/about.txt+4 tests/golden/types-union-unresolved/source.jibb+1 tests/golden/types-union-unresolved/tokens.txt+4 tests/golden/types-union-unresolved/tree.txt+2 tests/golden/types-union-unresolved/types.txt+2 tests/golden/types-unit-construction/about.txt+4 tests/golden/types-unit-construction/modules.txt+1 tests/golden/types-unit-construction/source.jibb+29 tests/golden/types-unit-construction/tokens.txt+168 tests/golden/types-unit-construction/tree.txt+71 tests/golden/types-unit-construction/types.txt+32 tests/golden/types-unit-context/about.txt+4 tests/golden/types-unit-context/modules.txt+1 tests/golden/types-unit-context/source.jibb+46 tests/golden/types-unit-context/tokens.txt+489 tests/golden/types-unit-context/tree.txt+220 tests/golden/types-unit-context/types.txt+95 tests/golden/types-unit-patterns/about.txt+4 tests/golden/types-unit-patterns/source.jibb+36 tests/golden/types-unit-patterns/tokens.txt+180 tests/golden/types-unit-patterns/tree.txt+88 tests/golden/types-unit-patterns/types.txt+13 tests/golden/types-value-cycle-shadow/about.txt+4 tests/golden/types-value-cycle-shadow/modules.txt+1 tests/golden/types-value-cycle-shadow/source.jibb+6 tests/golden/types-value-cycle-shadow/tokens.txt+68 tests/golden/types-value-cycle-shadow/tree.txt+32 tests/golden/types-value-cycle-shadow/types.txt+7 tests/golden/types-value-cycle-unsupported/about.txt+4 tests/golden/types-value-cycle-unsupported/modules.txt+1 tests/golden/types-value-cycle-unsupported/source.jibb+11 tests/golden/types-value-cycle-unsupported/tokens.txt+45 tests/golden/types-value-cycle-unsupported/tree.txt+17 tests/golden/types-value-cycle-unsupported/types.txt+8 tests/golden/types-value-cycles/about.txt+4 tests/golden/types-value-cycles/modules.txt+1 tests/golden/types-value-cycles/source.jibb+13 tests/golden/types-value-cycles/tokens.txt+87 tests/golden/types-value-cycles/tree.txt+39 tests/golden/types-value-cycles/types.txt+44 tests/importer/about.txt+20−4 tests/importer/ford.txt+3 tests/importer/origin-transitive.txt+3 tests/importer/shadow-static.txt+7 tests/importer/small.txt+70 tests/importer/tree.txt+97−5 tests/lib/jibb-api-paths.hoon+104 tests/lib/jibb-bridge.hoon+76−2 tests/lib/jibb-import-diagnostic.hoon+59 tests/lib/jibb-mark-bridge.hoon+1−1 tests/lib/jibb-module-scope.hoon+85−1 tests/lib/jibb-poke-bridge.hoon+88 tests/lib/jibb-tlon-bridge.hoon+29 tests/lib/jibb.hoon+1214−367 tests/type-api-paths/about.txt+3 tests/type-api-paths/api.txt+13 tests/type-api-paths/expected.txt+18 tests/type-api-paths/missing-decl.txt+12 tests/type-api-paths/poke-clash.txt+12 tests/type-api-paths/scry-bad.txt+13 tests/type-api-paths/scry.txt+13 tests/type-api-paths/todo-action.txt+6 tests/type-api-paths/todo-item.txt+6 tests/type-api-paths/todo-sur.txt+12 tests/type-api-paths/todo-update.txt+6 tests/type-api-paths/todos.txt+6 tests/type-api-paths/value-clash.txt+15 tests/type-import-diagnostic/about.txt+15 tests/type-import-diagnostic/expected.txt+112 tests/type-import-diagnostic/mark.txt+5 tests/type-import-diagnostic/nested.txt+11 tests/type-import-diagnostic/source.txt+13 tests/type-import-diagnostic/sur.txt+5 tests/type-import/about.txt+29−7 tests/type-import/expected.txt+114−3 tests/type-import/source.txt+69 tests/type-import/sur.txt+18−1 tests/type-mark/about.txt+2−1 tests/type-mark/expected.txt+4 tests/type-module-scope/about.txt+11 tests/type-module-scope/expected.txt+57 tests/type-poke/about.txt+7 tests/type-poke/alias.txt+2 tests/type-poke/api.txt+2 tests/type-poke/client.txt+23 tests/type-poke/direct.txt+2 tests/type-poke/expected.txt+66 tests/type-poke/exported.txt+9 tests/type-poke/fake.txt+4 tests/type-poke/impostor-client.txt+2 tests/type-poke/impostor.txt+1 tests/type-poke/inner.txt+2 tests/type-poke/mark.txt+5 tests/type-poke/public.txt+2 tests/type-poke/transitive.txt+2 tests/type-tlon/about.txt+6 tests/type-tlon/expected.txt+6 tests/type-tlon/source.txt+6 tools/clay-fixtures+52 tools/golden+18−2 tools/importer-test+1−1 tools/ship+6−1 tools/testdata/selftest+35−3 tools/testdata/ship-selftest+4−1 tools/type-api-paths-test+52 tools/type-import-diagnostic-test+43 tools/type-module-scope-test+10−1 tools/type-poke-test+50 tools/type-tlon-test+39
README.md+1−1
@@ -42,7 +42,7 @@ tools/hoon '(golden /a/b/jibb (crip "++ main view"))'
4242tools/hoon --raw --cord src=tests/golden/foo/source.jibb 'tree:(golden /a/b/jibb src)'
4343```
4444
45−`tools/testdata/selftest` tests both tools against a stub library, and `tools/doc-blocks` against Markdown it writes. `tools/importer-test` compares the partial Hoon importer's fixture projections against their golden file. `tools/type-import-test` and `tools/type-mark-test` check the importer/checker bridges under eval; the ship suite runs the same fixtures.
45+`tools/testdata/selftest` tests both tools against a stub library, and `tools/doc-blocks` against Markdown it writes. `tools/importer-test` compares the partial Hoon importer's fixture projections against their golden file. `tools/type-import-test`, `tools/type-tlon-test`, `tools/type-mark-test`, `tools/type-poke-test` and `tools/type-api-paths-test` check importer/checker, prelude and partial API path analysis boundaries under eval; the ship suite runs the same fixtures.
4646
4747### The doc's examples
4848
docs/compiler.md+38−4
@@ -56,13 +56,47 @@ The core is split into chapters, `+| %name`, in this order:
5656| `%span-check` | `+check-spans`, which `+golden` runs on every tree, and `+check-spans-test` |
5757| `%type-inference` | The initial inference fragment and its unification helpers; not yet a module type checker |
5858
59−The inference fragment supports fixed auras, unrestricted `@`, one-way widening into it and toward aura-family ancestors, generic variables and gates, unfaced cells, a two-binder cell pattern, a complete two-arm loobean branch, closed local mold aliases and acyclic forward value references. It instantiates generalized top-level definitions when they are used. Acyclic local value definitions can refer forward and generalize variables that are free of their enclosing environment; captured variables and explicit capitals remain shared. Acyclic simple local mold aliases can also refer forward, and are scoped to the body, not its gate's sample. Recursive local groups, and recursive, generic, union or faced local molds remain unsupported. It can infer and generalize atom constraints arising from explicit capitals or bare sample binders, preserve those constraints through aliases, instantiate them independently, and print multiple constraints. Unresolved decimal variables default to `@ud` for inferred types without gates; defaulting inside gate types and other constraint cases remain incomplete. It does not yet check a module, its imports, faces, general patterns, deferred constraints, recursive or generic molds, dependency cycles or most errors with both conflicting excerpts. Definite cast and call mismatches, incompatible branches and overlapping union cases report both sites and excerpts. Concrete branch results can join at an explicitly present parent aura or `@`; function compatibility involving nested `@` and variable-dependent joins remain unsupported except for equal types. The current dependency pass can take quadratic time on long forward chains; the milestone's speed target remains unverified. A separate conservative pass reports unions whose cases are provably disjoint or overlapping and leaves other cases unresolved; it does not claim the mold is checked. Unsupported forms are reported as such, and the partial output says the module has not been checked.
59+The inference fragment supports fixed auras, unrestricted `@`, one-way widening into it and toward aura-family ancestors, generic variables and gates, faced and unfaced cells, cell sample binders, known record field reads, a cell pattern of two or more binders, a complete two-arm loobean branch, a complete two-arm unit-shaped branch, closed local mold aliases and acyclic forward value references. For a supported single syntactic top-level recursive gate, the checker infers the sample first and uses that exact sample, including its field faces, in a monomorphic self placeholder. The completed body must unify with the placeholder before the gate is generalized; incompatible recursive arguments can report the call and argument sites. Uses of generalized top-level definitions instantiate their schemes independently. For a complete loobean branch with one direct self-call arm, the checker can infer the other arm independently and use its closed, fully resolved type to seed the recursive result; it then checks the whole body. Open or pending base types do not seed the result, and other branch shapes still depend on the existing partial inference. A supported single local recursive gate also uses a monomorphic self reference while its body is checked, then generalizes variables free of its enclosing environment; captured variables remain shared. Acyclic local value definitions can refer forward. The checker collects written capitals per `++` before inference, excluding nested definitions: a capital used in an enclosing definition is shared with its locals, even when written later, while a capital introduced only in a local definition is generalized there. Sibling locals can introduce independent capitals with the same spelling; generic mold parameters keep their own scope. Top-level groups of syntactic gates are inferred together with monomorphic placeholders and shared substitutions, then generalized only after the whole group checks; downstream uses and library interfaces instantiate those schemes independently. A dependency graph identifies groups with two iterative depth-first passes; its conservative local-reference edges can reject otherwise valid programs. Supported local mutually recursive gate groups also use shared monomorphic placeholders and generalize only after the group checks, preserving captured outer variables. Mixed gate/value cycles, polymorphic recursion, unresolved literal constraints and unresolved branch joins remain unsupported. Acyclic simple local mold aliases can also refer forward, and are scoped to the body, not its gate's sample. Nonrecursive generic aliases of supported molds can be applied at exact arity, including locally and through library interfaces; their parameters are lexical. Closed, provably disjoint nonrecursive unions and tagged single-case molds support contextual term values, `~` and `|=%tag` constructors. A null-headed cell can match a union case but does not supply a `|=%$` constructor; unresolved tags and nulls remain pending, with distinct partial-inference diagnostics. Nonrecursive top-level generic union molds with provably disjoint cases also support contextual tags and constructors at exact arity; their arguments are retained through generalization and supported library interfaces. Nonrecursive generic aliases can reorder, repeat or omit parameters while preserving a supported union’s origin, including through local scopes and library interfaces. A generic union declared directly inside a body remains unsupported, as do mutually recursive local groups and recursive molds. A value with type variable `A` can fit a field whose type is that same `A`, including in generic union payloads and nested or repeated record fields. A differing-variable face constraint remains unsupported. When inference forces two distinct explicitly written capitals equal, it reports both source sites; forcing a capital to a concrete type remains unsupported in this fragment. It can infer and generalize atom constraints arising from explicit capitals or bare sample binders, preserve those constraints through aliases, instantiate them independently, and print multiple constraints. Unresolved decimal variables default to `@ud` for inferred types without gates; defaulting inside gate types and other constraint cases remain incomplete. It does not yet check a module, complete imports, general patterns, general deferred constraints, recursive molds, dependency cycles or most errors with both conflicting excerpts. Definite cast and call mismatches, incompatible branches and overlapping union cases report both sites and excerpts. Concrete branch results can join at an explicitly present parent aura or `@`. Some known tuple and record positions acquire matching faces; other variable-dependent face merges, general branch tag context and ambiguous call-result propagation remain unsupported; function compatibility involving nested `@` and variable-dependent joins remain unsupported except for equal types. For a single recursive gate outside a group, the reporting path repeats inference rather than instantiating its generalized interface inside its own body; a group report uses its stored schemes. This adds work, and the current dependency pass can take quadratic time on long forward chains; the milestone's speed target remains unverified. A separate conservative pass reports unions whose cases are provably disjoint or overlapping and leaves other cases unresolved; it does not claim the mold is checked. Unsupported forms are reported as such, and the partial output says the module has not been checked.
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 are syntactically fixed atom molds and other fields are fixed atom molds or standard collections of static atom molds. Collection names must not be shadowed. The reader can also import a mark door sample, removing its outer sample face and validating its build subject. Nested `$^`, including `$^` in collection arguments, is rejected until its source branches can be checked; other nested ordered maps, general source-level disjointness and complete integration with the checker remain unfinished. `+golden-types-imports` can consume fixed-aura atoms and unfaced cells from caller-supplied reader results for declared `/-` imports; `+golden-types-with-marks` accepts those same shapes from declared mark imports in a separate list. Other forms remain unsupported. Its disjointness proof is conservative and can reject a valid union it cannot prove disjoint. Collection recognition requires the originating `/sur` core. The reader validates direct zuse subjects and Ford subjects consisting of faced imported cores and a validated tail, checking imported cores transitively; it rejects shadowed names, inconsistent core subjects and other subject shapes. For a recursive reference, the reader matches the exact Hoon hold against named arms in validated cores, including transitive Ford imports; it rejects missing, unlabelled or ambiguous origins. Its fixtures include three real Tlon files; `tools/importer-test` compares the internal projection under eval, and the ship test compares the same golden output. `tools/type-import-test` and `tools/type-mark-test` compare bridge reports under eval and on the ship. `tools/clay-fixtures` also passes Clay-built `/sur` molds and mark samples through the Clay-built importer and partial checker.
61+A single-arm cell pattern can bind two or more positions, with its last binder capturing the remaining tail. Duplicate and shadowed names are rejected. A definite non-cell spine fails; an intermediate union or collection that might contain a cell remains unsupported. Nested patterns, wildcard patterns and faced records are not covered by this rule.
6262
63−Callers that have a `/sur` core and a name can use `+read-named`: it checks for a locally declared arm before asking Hoon to evaluate the mold, and reports evaluation failures with the final Hoon trace line. `+read-mold-in` remains available when the caller already has the selected type. The checker currently treats a failed import as unsupported rather than rendering the importer's error.
63+String interpolation infers its pieces in order and preserves substitutions and pending constraints. A piece with a known atom aura, unrestricted `@`, or a tape `(list @tD)` is accepted; an isolated decimal literal takes its normal `@ud` default. A known cell reports that it needs a printer, and an explicitly generic atom asks for an aura at its use site. Loobeans, term singletons, non-tape collections, open types and a type fixed only later remain unsupported in this fragment.
6464
65−`+golden-types-with-prelude` accepts case-local Jibb module sources alongside `/sur` and mark results and the vendored prelude source. It resolves reachable ordinary library modules in dependency order, exporting supported closed value schemes and simple mold aliases. It reserves names from the supplied prelude, detects missing sources and cycles, and rejects a dependency if its interface cannot be inferred by the fragment. API files, modules with `main`, unsupported definitions and many other features remain outside this subset; the prelude inventory itself is incomplete. The older `+golden-types-with-modules` entry point fails closed for imports because it has no prelude scope. Neither entry point claims the module has been checked.
65+The Hoon bridge translates imported `*` as the any-noun type, directly or within supported nonrecursive cells. The reader may still decline a disjoint tagged union with a noun payload, and recursive imports containing `*` remain unsupported. It accepts an exact fork of the two loobean singletons as `?`, and each singleton separately as `%.y` or `%.n`, including inside supported faced cells. Contextual literals specialize against a loobean singleton. Open `%f`, other values, and other forks containing loobean singletons remain unsupported; recursive Hoon molds containing flags can also fail closed.
66+
67+A bare tag that provably matches no case of a known union reports the union and tag sites. This covers casts, single-argument calls, contextual unit payloads, list items and supported branch arms, including unnamed imported unions. For syntactic tuples, ordered fit replay can identify a missing tag in a nested position; an earlier mismatch or uncertainty stops the replay instead of guessing. Existing tags whose shape or payload does not fit retain the ordinary mismatch; unresolved tags stay pending.
68+
69+A change can replace uniquely named fields on a fully known, faced record spine, including through a nested wing. Replacements receive the field type as context, substitutions and pending constraints are retained, and the resulting type remains the original record. Missing fields, empty changes and definite replacement mismatches report sites; the expected-type site is the edit, since the original field declaration location is not retained. Unknown or partly unfaced spines, ambiguous fields and repeated edits remain unsupported. A cast to a known record also supplies field context to a tuple or record initializer, including nested list and union fields. The expected-type site is the cast mold; the original field declaration location is not retained. Isolated cart-style `init` and `update` expressions infer in this fragment. The complete cart-store source fails closed because store kind and declaration scope are not yet checked.
70+
71+For supported closed unions, the type printer keeps the union’s origin separate from its displayed name. It prints an in-scope name such as `msg` or `msg.lib`, including in records and gates; an accessible imported nongeneric alias may name a transitive union. A nongeneric body-local union that escapes its scope, or an origin without an accessible name, prints its cases separated by spaces, parenthesized when nested. That case-list form is print-only. A supported generic union prints its name and all arguments, including unused arguments; when its name is unavailable, the partial printer reports that limitation instead of dropping its arguments. Two faces for the same imported origin remain compatible; compatibility between distinct union origins, including in gate types, remains unsupported. Some comparisons of generic union arguments also remain unsupported rather than deciding equality or mismatch. The Hoon bridge also translates some imported unnamed unions into this representation; unsupported cases remain errors.
72+
73+Multi-argument calls form one right-nested sample: `f a b c` supplies `[a [b c]]`, with the last argument able to be a cell itself. The fragment fits the complete sample, preserving known faces and shared variables. Known sample positions can provide list or union context to arguments; unknown sample shapes use ordinary inference and some contextual forms remain unsupported. For a definite mismatch, the diagnostic points to a specific argument when it can establish which one failed; otherwise it reports the combined sample.
74+
75+A list literal can be inferred when a cast or known gate sample supplies a list type and the supplied prelude has the validated standard list definition. Empty, nonempty and nested literals work, including contextual union tags in elements; mismatched elements report the item and expected type. Imported Hoon lists share this representation. Under the same known context, `~` and zero-valued term literals fit an empty list, and a two-item unfaced cell `[head tail]` is a cons; cons cells and list literals can be nested. Mismatched heads or tails report both sites. A known list result also supplies context through complete loobean, unit-shaped and list-shaped branches, including recursive and nested branches. A known gate sample also supplies context to corresponding positions of a single tuple or record argument, including nested cells; a zero literal can therefore fit a list position. A bound zero constant still remains unsupported rather than a definite mismatch, and an unknown callee does not supply context. Uncontextualized list literals also infer with a fresh element variable, including empty and nested lists; the resulting variable can generalize. Unresolved item tags and uncertain widening remain unsupported. Faced or longer cons cells, and a missing or altered prelude list remain unsupported. For a known standard list with a supported element type, it also infers a complete two-arm branch using `~` and `[item rest]`, in either order. The binders have the element and list types and cannot shadow or duplicate names. Unknown subjects, unsupported element types, other patterns and incomplete arms remain unsupported.
76+
77+A backtick constructs a unit when the supplied prelude has the validated standard `unit` template. Its payload is inferred normally, retaining pending literals and generic variables; nested units work and the prelude’s `some` becomes available. With ordinary result annotations, its `bind`, `biff`, `both`, `clap`, `clef` and `flit` also infer. A known unit in a cast, call, list item or record field supplies its payload context, including nested units and lists; definite mismatches identify the payload and context. Unrelated union identities, some variable-dependent fits, and missing or altered prelude templates remain unsupported.
78+
79+A known union of `~` and a null-headed cell can be matched by `~` and `[~ value]` arms in either order. The payload binder is checked for shadowing. Unknown subjects, missing or duplicate arms, and unresolved branch results remain unsupported; this fragment infers the prelude’s `fall` and `need` signatures.
80+
81+A known closed union with two or more arms can be matched when each arm provably covers or excludes each remaining case. The checker first tries whole cases; when a pattern splits a case, it can expand known `?` positions into their two noun values, up to 64 alternatives across the union. Binders retain the original case type, and one arm may bind several refinements of that case. It reports missing alternatives and arms already covered, checks tags by noun value, and supports imported and generic union cases. Other partial patterns, expansions above the limit, binders spanning distinct cases, differing arm result types and some complex two-arm subjects remain unsupported. When a cast or known call sample supplies a result type, a known union subject accessed by a wing can propagate that context through whole-case arms and supported finite loobean refinements, including nested cell and list positions. Other partial-pattern context and non-wing subjects remain unsupported. The Grammar’s `step` block infers in this fragment, but its module is not yet checked.
82+
83+A known closed union can also provide context to each arm of a complete loobean or unit-shaped branch in a cast or a call with a known union sample. Nested branches and transparent groups work; a mismatch reports the expected union and the offending arm. General patterns and context through bodies with local definitions remain unsupported, and unrelated unresolved tags stay pending.
84+
85+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. The reader can also import a mark door sample, removing its outer sample face and validating its build subject. For a mark whose sample is exactly a named arm of its single Ford-imported `/sur` core, it can recover a source-proved nonrecursive union, including source-location wrappers around fields; recursive or unverified fallback results remain unsupported. The reader checks explicit Hoon `$%`, `$?` and `$^` unions against the Grammar’s disjointness rule, as @iko confirmed on 2026-10-30. For an explicit `$%` with distinct literal head tags, it can also prove restricted local named payload dependencies, including bare `~` fields, re-evaluate and validate each source branch, and recover the union before Hoon collapses it. The real Tlon `notes.u-note` exercises its `[%deleted ~]` case. It rejects recursive or computed dependencies, inherited same-name collisions, unsupported nested unions and proofs exceeding a shared 4,096-node budget. It re-evaluates statically recognizable source branches before Hoon can collapse them, checks materialized fork cases, and rejects shapes it cannot prove disjoint. Static records may also have verified standard-collection and `path` siblings. One direct explicit union argument in a standard list, set, map or unit is accepted when its call wrapper and collection provenance are verified and its static cases are pairwise disjoint. A synthetic regression checks that forged wrapper subjects, samples and tails are rejected. Other collection-union forms, nested ordered maps, general source-level disjointness and complete integration with the checker remain unfinished. `+golden-types-imports` can consume fixed-aura atoms, valid term singletons, Hoon's `%n` zero singleton as Jibb `~`, nested faced or unfaced cells, unions of supported, pairwise-disjoint cases, and opaque standard collections with supported arguments from caller-supplied reader results for declared `/-` imports; `+golden-types-with-marks` accepts the same shapes for declared marks. The caller must pass unchanged results from the source-aware reader: the bridge validates the supplied graph but cannot detect source cases Hoon collapsed before that graph was built. The opaque collection types retain their names and arguments for identity, unification and printing. The validated standard prelude `list` mold shares the imported list representation; other Jibb-written collection molds and most prelude collection operations remain unsupported. Other forms remain unsupported. Its disjointness proof is conservative and can reject a valid union it cannot prove disjoint. Collection recognition requires the originating `/sur` core. The reader validates direct zuse subjects and Ford subjects consisting of faced imported cores and a validated tail, checking imported cores transitively; it rejects shadowed names, inconsistent core subjects and other subject shapes. For a recursive reference, the reader matches the exact Hoon hold against named arms in validated cores, including transitive Ford imports; it rejects missing, unlabelled or ambiguous origins. Its fixtures include three real Tlon files; `tools/importer-test` compares the internal projection under eval, and the ship test compares the same golden output. `tools/type-import-test` and `tools/type-mark-test` compare bridge reports under eval and on the ship. `tools/type-tlon-test` and its ship counterpart exercise four real Tlon presence unions and a field read through the source-aware reader and partial checker. `tools/clay-fixtures` also passes Clay-built `/sur` molds and mark samples through the Clay-built importer and partial checker.
86+
87+Self-recursive `/sur` molds can cross the bridge as opaque module-and-name identities when their supported source-aware graph passes validation. Aliases, foreign references, recursive marks, unfolding, construction and field access remain unsupported; the partial printer declines recursive names that are not in scope.
88+
89+Callers that have a `/sur` core and a name can use `+read-named`: it checks for a locally declared arm before asking Hoon to evaluate the mold, and reports evaluation failures with the final Hoon trace line. `+read-mold-in` remains available when the caller already has the selected type. The opt-in `+read-named-diagnostic` and `+read-mark-diagnostic` preserve successful graphs and distinguish definite `%invalid` aura and core evidence emitted directly by the reader from `%unsupported` failures. Other failures, including unverified union disjointness and vase recognition based only on a name, remain unsupported. These entry points revalidate and re-walk failed types; the opt-in `+golden-types-with-reader-diagnostics` accepts unchanged structured reader results and reports definite aura or core errors at their imported mold use sites, when the import and supplied input are unique. Ordered replay covers direct and nested cell samples, record and function casts, and non-generic same-module aliases; it stops at an unsupported prefix, cycle or shadowing failure. Union molds, generic applications, transitive modules and unsupported reader outcomes still report generic limitations. Replay repeats inference and may add work; this entry point remains partial. Existing checker entry points continue treating failed imports as unsupported. It also fails closed on repeated field faces along an imported record spine, including recursive roots; the diagnostic remains generic. Hoon type graphs can erase unfaced nested-cell boundaries, so the check may conservatively reject a valid source with equal names in distinct erased scopes. Faced nested records and union alternatives keep separate scopes.
90+
91+The partial report can diagnose certain non-gate value dependency cycles, including cycles through gates. It requires an explicit atom or loobean result cast and a syntactically proven dependency group with unshadowed simple samples; it identifies the value and a dependency site. Untyped results, branches, nested definitions, qualified wings and complex samples remain unsupported. The proof constructs an additional dependency graph. One 24-case recursive/generic eval run took 19.7 s with it and 18.6 s before it, including startup; these single runs do not isolate the graph cost.
92+
93+The source-backed `+api-path-analysis-source` is a separate partial analysis, not an API check: it resolves reachable Jibb imports and declared mark graphs and returns path and scry segments, full and diff mark identities and their types. It also checks derived-name collisions. Full and diff payloads must be direct declared mark names; typed scry parameters must be a same-name, same-aura subset of the watch parameters, and unknown or duplicate segment binders fail closed. It creates no request gates. The caller must pass a trusted prepared prelude and unchanged source-aware reader results.
94+
95+`+golden-types-with-prelude` accepts case-local Jibb module sources alongside `/sur` and mark results and the vendored prelude source. It resolves reachable ordinary library modules in dependency order, caching completed interfaces per invocation and exporting supported closed value schemes, direct generic unions, and simple or nonrecursive generic mold aliases whose bodies the fragment supports. It detects missing sources and cycles and rejects a dependency if its interface cannot be inferred by the fragment.
96+
97+The supplied prelude is parsed into a **partial interface**: all names actually declared in the source are reserved, while only the molds and values this fragment can infer are available. These include the validated standard `list` mold, `unit`, `same`, `fall`, `need`, `lure`, `weld`, `snoc`, `turn`, `flop`, `rear`, `drop`, `skim`, `skip`, `murn`, `join` and `snip`; unsupported entries remain unavailable. The validated `list` is injected while the prelude’s gates are inferred; `weld` and `turn` use ordinary explicit result casts. An absent or altered `list` is not injected, and an altered declaration cannot leak through a direct or transitive mold alias. List-dependent prelude mold aliases remain unsupported because their templates are prepared before this injection. A named prelude union keeps the fixed `/lib/jibb/prelude/jibb` origin in every module, and its name remains unqualified when a library exports a type containing it. The prelude inventory is incomplete, so reserving the names in this source does not establish complete shadowing coverage. The source-backed internal prelude defines `poke`, which the public prelude re-exports as an ordinary transparent type. The partial checker resolves its supported source shape, preserves its public name, and rejects ordinary imports of the private internal path. An imported API with one mark and a matching direct `+$ poke` declaration can export a derived constructor and retain agent/mark metadata when the source representation has the supported agent case. Other API shapes, complete private module checking, root API and kind checking, stores, `ask`, `pure`, lowering and runtime effects remain unfinished. A possible store or root API declaring `+$ poke` reports that kind or scope needs unsupported inference; definite duplicate declarations and unrelated shadowing still report conflicts. Prepared interfaces and caches are trusted caller inputs; the future host and linker must ensure the private source validated during preparation is the same version used to lower derived constructors. A `*` payload may contain gates, so the fragment treats it conservatively; full gate-free checks are unfinished. The shared module-scope fixture compares the prepared and source-taking paths against the real prelude and a two-module golden under eval and on the ship.
98+
99+`+prepare-prelude` derives the interface and declared-name inventory from the trusted vendored source. Hosts can reuse its result with `+golden-types-with-prepared-prelude`; they must pass the unchanged result of preparation, not an independently constructed value. Empty, malformed and duplicate-name prelude sources fail closed. The source-taking `+prepare-prelude` and `+golden-types-with-prelude` do not supply the internal module; their `-and-internal` or `-with-internal` variants accept its source for the supported private import. API files, modules with `main`, unsupported definitions and many other features remain outside this subset. The older `+golden-types-with-modules` entry point fails closed for imports because it has no prelude scope. None of these partial reports claims the module has been checked.
66100
67101And the design notes:
68102
docs/development.md+15−3
@@ -61,8 +61,13 @@ git clone https://github.com/urbit/tools /root/src/tools
6161| `tools/golden` | Runs the golden cases under `urbit eval`: every case, or those matching `--case`; `--update` rewrites the expected outputs; `--show` prints them |
6262| `tools/importer-test` | Compares the partial Hoon importer's diagnostic trees and errors with `tests/importer/tree.txt` under `urbit eval` |
6363| `tools/type-import-test` | Composes the Hoon importer with the partial checker and compares `tests/type-import/expected.txt` under eval |
64+| `tools/type-tlon-test` | Runs the real Tlon presence source through the importer and partial checker, comparing `tests/type-tlon/expected.txt` under eval |
65+| `tools/type-import-diagnostic-test` | Compares the structured reader diagnostic bridge report under eval |
6466| `tools/type-mark-test` | Checks the partial checker’s mark import boundary against `tests/type-mark/expected.txt` under eval |
65−| `tools/type-module-scope-test` | Checks the partial module checker’s prelude boundary against `tests/type-module-scope/expected.txt` under eval |
67+| `tools/type-poke-test` | Checks source-backed prelude and poke-only API reports against `tests/type-poke/expected.txt` under eval |
68+| `tools/type-api-paths-test` | Checks partial API path analysis with real todo mark samples against `tests/type-api-paths/expected.txt` under eval |
69+| `tools/type-api-paths-test` | Compares partial API path analysis, including real todo marks, with its golden report under eval |
70+| `tools/type-module-scope-test` | Checks the partial module checker’s prelude boundary and duplicate-source rejection against `tests/type-module-scope/expected.txt` under eval |
6671| `tools/clay-fixtures` | Syncs `my-app`, builds its example `/sur` files and marks through Clay, checks selected mold and mark projections and the partial checker, and records Ford and mark subject shapes on the fake ship |
6772| `tools/hoon` | Evaluates Hoon with the library in scope, as `tools/hoon '(golden /a/b/jibb (crip "++ main view"))'`; `--cord name=file` binds a file's text, `-f` reads the expression from a file |
6873| `tools/doc-blocks` | Checks the doc's `jibb` blocks against the `doc-*` golden cases: `tools/doc-blocks docs/spec` |
@@ -78,7 +83,12 @@ git clone https://github.com/urbit/tools /root/src/tools
7883tools/golden # all cases pass
7984tools/importer-test # Hoon importer fixture projections match
8085tools/type-import-test # importer/checker bridge golden report matches
86+tools/type-tlon-test # real Tlon importer/checker report matches
87+tools/type-import-diagnostic-test # direct structured reader diagnostics match
8188tools/type-mark-test # mark/checker bridge golden report matches
89+tools/type-poke-test # source-backed poke/API bridge report matches
90+tools/type-api-paths-test # partial API path analysis report matches
91+tools/type-api-paths-test # partial API path analysis report matches
8292tools/type-module-scope-test # module/prelude scope golden report matches
8393tools/hoon check-spans-test # prints <<>>
8494tools/testdata/selftest # 22 checks, 0 failed
@@ -90,7 +100,7 @@ tools/ship check-commit # when the mark or the desks changed
90100tools/clay-fixtures # when the my-app Hoon fixtures or importer changed
91101```
92102
93−`tools/ship test` regenerates `tests/lib/jibb.hoon` and syncs the `jibb-dev` desk before it runs, so commit the regenerated file. A run with `--stub`, `--lib`, or a custom `--golden` isolates its generated golden tests from the repository's other test programs; run the default command afterward to restore and test those programs. It also runs the independent `tests/lib/jibb-import.hoon` test against the same importer fixtures and expected diagnostic projection as `tools/importer-test`. The projection is an internal tree, not the Jibb type printer. `tests/lib/jibb-bridge.hoon` also runs the importer/checker bridge fixture on the ship; `tools/type-import-test` runs the same report under eval. The mark bridge has its own `tests/lib/jibb-mark-bridge.hoon` ship test and `tools/type-mark-test` eval test; both compare the same fixture report. `tests/lib/jibb-module-scope.hoon` and `tools/type-module-scope-test` compare the prelude scope report on the ship and under eval.
103+`tools/ship test` regenerates `tests/lib/jibb.hoon` and syncs the `jibb-dev` desk before it runs, so commit the regenerated file. A run with `--stub`, `--lib`, or a custom `--golden` isolates its generated golden tests from the repository's other test programs; run the default command afterward to restore and test those programs. It also runs the independent `tests/lib/jibb-import.hoon` test against the same importer fixtures and expected diagnostic projection as `tools/importer-test`. The projection is an internal tree, not the Jibb type printer. `tests/lib/jibb-bridge.hoon` also runs the importer/checker bridge fixture on the ship; `tools/type-import-test` runs the same report under eval. `tests/lib/jibb-tlon-bridge.hoon` and `tools/type-tlon-test` run the real Tlon presence reader/checker fixture on both. The structured reader diagnostics have their own `tests/lib/jibb-import-diagnostic.hoon` ship test and `tools/type-import-diagnostic-test` eval test. The mark bridge has its own `tests/lib/jibb-mark-bridge.hoon` ship test and `tools/type-mark-test` eval test; both compare the same fixture report. `tests/lib/jibb-poke-bridge.hoon` and `tools/type-poke-test` share the source-backed prelude and poke-only API fixture. `tests/lib/jibb-api-paths.hoon` and `tools/type-api-paths-test` share partial path analysis over the real todo marks; this does not generate request interfaces. `tests/lib/jibb-module-scope.hoon` and `tools/type-module-scope-test` compare the prelude scope report on the ship and under eval.
94104
95105## Golden cases
96106
@@ -102,7 +112,9 @@ A case is a folder `tests/golden/<name>/` holding:
102112- optionally, `path.txt`, the logical `/ui/.../*.jibb` path to pass to the compiler; the source remains `source.jibb`.
103113- optionally, an `expect-types:` line in `about.txt` opts the case into `+golden-types`; `types.txt` holds its output plus one newline and `--update` creates it. A `types.txt` also opts in when the line is absent. This interface is provisional while the checker is under construction.
104114- optionally, `imports.txt` selects Hoon `/sur` molds, one `module mold` pair per line. Each module's source goes in `sur/<module>.txt` and is compiled against zuse by both runners. `marks.txt` selects marks, one name per line, with source in `mar/<name>.txt`; both kinds may be supplied together. The reader results go to the partial checker, and a type output is required. Both runners reconstruct fixture text from `%txt` lines and identify the fixture if its compilation crashes; a crash fails the case without discarding its successful parse output. These fixtures currently handle only sources without Ford imports.
105−- optionally, `modules.txt` lists logical `/ui/.../*.jibb` paths, one per line. The corresponding sources live below the case's `modules/ui/` directory. Both runners parse each source at its logical path and compare the combined `module-trees.txt`; `--update` writes that output. A case with type output also supplies these sources and the vendored prelude source to the partial module checker, so it can reserve prelude names. The file opts in even when it lists no sources; use a comment such as `# no module fixtures` for an empty bundle, since zero-byte `%txt` fixtures do not sync reliably on the ship. Blank lines and comment lines are ignored. The checker is partial; its output says what it did and did not check.
115+- optionally, `modules.txt` lists logical `/ui/.../*.jibb` paths, one per line. The corresponding sources live below the case's `modules/ui/` directory. Both runners parse each source at its logical path and compare the combined `module-trees.txt`; `--update` writes that output. A case with type output also supplies these sources and the vendored prelude to the partial module checker. The file opts in even when it lists no sources; use a comment such as `# no module fixtures` for an empty bundle, since zero-byte `%txt` fixtures do not sync reliably on the ship. Blank lines and comment lines are ignored. Cases without `modules.txt` keep their existing no-prelude type interface.
116+
117+The runners prepare the trusted vendored public and internal prelude sources once for their generated test core and share the partial interface. Preparation reserves all names present in the public source and supplies the molds and values the fragment can infer; an unsupported declaration remains reserved but unavailable. The source and checker are incomplete, so the output still says the module has not been checked and does not claim complete shadowing coverage. `+golden-types-with-prelude-and-internal` accepts both sources directly; callers using `+golden-types-with-prepared-prelude` pass the unchanged result of `+prepare-prelude-with-internal`. The older source-only entry points remain available for preludes without imports. Missing or malformed sources fail closed.
106118
107119A zero-byte mark fixture currently fails ship synchronization validation after commit. Use a newline-only fixture to test an empty Hoon source on the ship.
108120
docs/open-questions.md+12−3
@@ -18,12 +18,12 @@ On 2026-10-30, @iko adopted gate-free `eq` arguments and map and set keys, treat
1818
1919## Questions milestone 2 raises
2020
21−Found while writing [prompts/milestone-2.md](prompts/milestone-2.md) and checking it against the doc's examples. The numbering is retained so existing references stay valid. The prelude inventory in question 3, the `like` representation in question 18, and the type of `clap` in question 20 remain open; the other questions are settled.
21+Found while writing [prompts/milestone-2.md](prompts/milestone-2.md), checking it against the doc's examples, and building the checker. The numbering is retained so existing references stay valid. Questions 3, 18, 25 and 26 remain open; the other questions are settled.
2222
23231. **Settled: how the prelude identifies jetted functions.** On 2026-10-30, @iko said the prelude functions have working Jibb implementations, and the compiler recognizes their shapes and uses the Hoon versions so jets can fire.
24242. **Settled: how the prelude keeps helpers private.** On 2026-10-30, @iko chose a separate internal prelude module imported by the prelude, without exposing the imported helpers.
25253. **The prelude's inventory.** On 2026-10-30, @iko chose to include all names from the listed Hoon library sections, excluding groups the spec explicitly leaves out. All of 3g is included; its Hoon `tone` is exposed as `tone.hoon`, distinct from the styling type. Hoon 1c `step` is exposed as `step.hoon`, leaving the Grammar example's `step` name available. On 2026-10-30, @iko also approved `%$` as a term literal and pattern, so Jibb can write the `%$` case of Hoon `coin`. For parsing sections 4j and 4l, only the explicitly listed `slav` and `slaw` are included; other parser helpers are left out. Jibb's `not` negates a loobean, and Hoon's bitwise `not` is exposed as `not.bit`. @iko also agreed to specifying the complete exported inventory in the doc, building its types and gates needed by the examples in milestone 2, and doing native implementations in milestone 3. Prelude unions such as spaces, roles and tones need names that other modules cannot shadow. The actual inventory and signatures still need to be specified.
26−4. **Settled: a capital in a local `++`.** On 2026-10-30, @iko said it shares the enclosing `++`'s variable of that name; a different type uses a different capital. The Grammar and Decisions record this alongside the earlier aura rules.
26+4. **Settled: a capital in a local `++`.** On 2026-10-30, @iko said it shares the enclosing `++`'s variable of that name if the enclosing `++` also uses it; otherwise the local `++` introduces and generalizes its own variable. For example, `++ inner |= y=A y` shares `A` with an enclosing gate whose sample is `x=A`, but generalizes its own `A` if the enclosing `++` does not use `A`. A different type uses a different capital. The Grammar and Decisions record this alongside the earlier aura rules.
27275. **Settled: cells of no items or one.** On 2026-10-30, @iko said a single-item cell is the value and `[]` is an error. The theme's `dark=[tones=[…]]`, a record of one field, must still check.
28286. **Settled: a change with no items.** On 2026-10-30, @iko said `m()` is an error. The parser still accepts it; the checker needs to reject it and add a golden case.
29297. **Settled: the doc's blocks that aren't whole modules.** On 2026-10-30, @iko agreed to check each in its intended context: the `cmd` and `sub` definitions as prelude source, the Core language tab's `update` inside the todo island, and the Grammar's imports example against fixture files.
@@ -39,7 +39,16 @@ Found while writing [prompts/milestone-2.md](prompts/milestone-2.md) and checkin
393917. **Settled: empty cases in union disjointness.** On 2026-10-30, @iko said `!!` is disjoint from every case. A cell containing an empty position at any depth is itself empty and is also disjoint from every case.
404018. **The two uses of Hoon `like`.** Hoon `+like` is a wet mold builder, but the gate it returns is callable and applies its supplied gate to the product. In a verified Hoon 135 example, applying `(like f)` to `[[1 2] [7 8 ~]]` produces an edge whose product is `8` when `f` is identity and `42` when `f` returns `42`; the resulting nail is the original input. Jibb molds are types, not callable values. The prelude now declares a generic `(like A)` mold and a `wonk` extractor; both parse, but their full type and backend validation remain outstanding. Should it also expose a value gate under `like`? If so, should the value preserve Hoon's input shape and behavior, or instead map the product of an already constructed edge? @iko is reviewing these alternatives; the exact public signature is not yet decided.
414119. **Settled: Hoon aura families and `step.hoon`.** On 2026-10-30, @iko chose `step.hoon` for Hoon 1c `step`, avoiding a clash with the Grammar example's `step`, and chose one-way widening across Hoon aura families: for example, `@ud` and `@ux` fit `@u`, and `@tD` fits `@t`. The reverse needs a check. The `step.hoon` group representation is not implemented yet.
42−20. **The type of Hoon `clap`.** Hoon allows its two input units and combining gate's result to have different types. If only one unit is present it returns that unit; when both are present it returns the combining gate's result. Jibb branches normally need a common type, while every union written in Jibb has a name. Should the Jibb gate require a shared type, infer an unnamed union of the possible values, or wait for a different typing design? Asked @iko on 2026-10-30. `clap` is not implemented while this is open.
42+20. **Settled: the type of `clap`.** On 2026-10-30, @iko chose one shared value type for both units and the combining gate. If either unit is absent, `clap` returns the other; if both are present, it applies the gate to their values and wraps the result.
43+21. **Settled: duplicate faces in imported Hoon records.** On 2026-10-30, @iko chose to reject an imported Hoon record with duplicate field names where its type is used. Hoon permits `[a=@ud a=@t]` and picks the first `a`; Jibb rejects it.
44+22. **Settled: overlapping imported `$%` and `$?` cases.** On 2026-10-30, @iko confirmed that the general union disjointness rule rejects imported `$%` and `$?` cases that overlap as nouns where the type is used, as it does for `$^`. The importer rejects recognizable overlaps and fails closed when it cannot verify them.
45+23. **Settled: converging explicit capitals.** On 2026-10-30, @iko chose that a body cannot force two separately written capitals to be equal. For `++ repeated |= x=(choice A A) x`, `++ f |= x=(choice A B) (repeated x)` is an error; use `A` in both positions when the type must be shared. This also applies across local captures and within generic mold applications.
46+
47+24. **Settled: how the internal prelude provides `poke`.** On 2026-10-31, @iko chose to define `poke` in the source-backed private internal prelude module and re-export it through the public prelude as an ordinary transparent type. Ordinary modules can construct and inspect its values. This settles `poke`; it does not decide the representation of `ask` or `qath`.
48+
49+25. **How the prelude provides `ask` and `qath`.** The spec calls both opaque, but Jibb has no syntax for a sealed type export. Following the decision for `poke`, @iko has been asked whether these should also be ordinary transparent types defined in the internal prelude, or whether they should retain opacity through a compiler mechanism. Their representations remain undecided.
50+
51+26. **The `step` example's `at` binder.** The Grammar's `describe` pattern `[t %sent at]` binds `at`, but the agreed prelude inventory includes Hoon's `at` from section 4b, and names may not shadow the prelude. The current incomplete prelude omits `at`, so its partial inference does not reveal this conflict. @iko has been asked whether to rename the binder, rename the prelude gate, or change the shadowing rule.
4352
4453## Grammar questions never put to the doc's author
4554
docs/prelude-inventory.md+9−7
@@ -4,6 +4,8 @@ This is a working inventory, not a completed prelude interface. It lists top-lev
44
55The source is the fake ship's `%base` `/sys/hoon.hoon` (Hoon version 135), read through Clay with `tools/ship scry /cx/=base=/sys/hoon/hoon --raw`. SHA-256: `ef538ced0877230f02ff86f9fb7a0abc6833bb1cf0e8675742b4d6ce478fcc92`. It differs in bytes from [upstream Hoon at the inspected commit](https://github.com/urbit/urbit/blob/5a187fededc4582a34fcd6055c67bb63e0917b94/pkg/arvo/sys/hoon.hoon); verify against the actual target ship when updating this inventory.
66
7+The vendored prelude defines `poke` in its private internal module and re-exports it as a transparent type. The partial checker resolves its supported source shape and a narrow imported API constructor; complete checking of the private body, other API shapes, effect lowering and runtime execution remain unfinished. `ask` and `qath` are not yet defined there.
8+
79Hoon `+$` arms are marked **mold** below; `++` arms can be gates, doors or mold generators, and need individual inspection. Jibb's loobean `not` and Hoon's bitwise `not.bit` are distinct. Parser helpers outside 3g are excluded from the intended prelude except the specifically listed `slav` and `slaw`; the raw candidates below still need to be classified.
810
911## 1a
@@ -20,7 +22,7 @@ Hoon `+$` arms are marked **mold** below; `++` arms can be gates, doors or mold
2022
2123`biff`, `bind`, `bond`, `both`, `clap`, `clef`, `drop`, `fall`, `flit`, `hunt`, `lift`, `mate`, `need`, `some`.
2224
23−The following is an audit of the Hoon 135 bodies, not a completed Jibb interface. The current Jibb implementations have only been parsed; the checker and backend do not yet validate or run them.
25+The following is an audit of the Hoon 135 bodies, not a completed Jibb interface. The partial checker infers `fall`, `need`, `some`, `bind`, `biff`, `both`, `clap`, `clef`, `drop` and `flit`; the remaining written implementations have been parsed, but complete checker validation remains outstanding. Backend validation remains outstanding for all of them.
2426
2527| Name | Hoon behavior | Jibb status |
2628| --- | --- | --- |
@@ -28,22 +30,22 @@ The following is an audit of the Hoon 135 bodies, not a completed Jibb interface
2830| `bind` | Applies a gate to a present value and wraps the result; absent stays absent. | Written |
2931| `bond` | Calls a fallback trap for an absent unit, otherwise returns its value. | Missing |
3032| `both` | Returns a unit of both values when both units are present. | Written |
31−| `clap` | Returns the present unit if only one is present; combines both values with a gate if both are present. | Missing; Hoon permits different input and output types |
33+| `clap` | Returns the present unit if only one is present; combines both values with a gate if both are present. | Written with one shared type for both units and the combining gate, as @iko chose |
3234| `clef` | Applies a gate returning a unit when both inputs are present; otherwise returns an absent unit. | Written |
33−| `drop` | Converts an absent unit to an empty list and a present unit to a singleton. | Written |
34−| `fall` | Returns the value of a present unit or the supplied fallback. | Written |
35−| `flit` | Returns a gate that wraps a value only if it satisfies the predicate. | Missing |
35+| `drop` | Converts an absent unit to an empty list and a present unit to a singleton. | Written; inferred by the partial checker |
36+| `fall` | Returns the value of a present unit or the supplied fallback. | Written; inferred by the partial checker |
37+| `flit` | Returns a gate that wraps a value only if it satisfies the predicate. | Written |
3638| `hunt` | Returns the only present unit or chooses between two present values with an ordering gate. | Missing |
3739| `lift` | Takes a mold and a unit, then applies the mold to a present value as `bind` does. | Missing; Jibb molds are not callable values |
3840| `mate` | Returns the present unit if only one is present; when both are present it returns one if their values are equal and crashes otherwise. | Missing |
39−| `need` | Extracts a present value and crashes on an absent unit. | Written |
41+| `need` | Extracts a present value and crashes on an absent unit. | Written; inferred by the partial checker |
4042| `some` | Wraps a value in a present unit. | Written |
4143
4244## 2b
4345
4446`snoc`, `lure`, `fand`, `find`, `flop`, `gulf`, `homo`, `join`, `bake`, `lent`, `levy`, `lien`, `limo`, `murn`, `oust`, `reap`, `rear`, `reel`, `roll`, `scag`, `skid`, `skim`, `skip`, `slag`, `snag`, `snip`, `sort`, `spin`, `spun`, `swag`, `turn`, `weld`, `snap`, `into`, `welp`, `zing`.
4547
46−The current prelude writes `snoc`, `lure`, `flop`, `reel`, `roll`, `skim`, `skip`, `turn` and `weld`. The folds take an explicit initial value as the Prelude table specifies. These implementations still need checker and backend validation.
48+The current prelude writes `snoc`, `lure`, `flop`, `join`, `levy`, `lien`, `murn`, `rear`, `reel`, `roll`, `skim`, `skip`, `snip`, `turn` and `weld`. `murn` keeps the present products of its gate in order; `join` inserts a separator between items; `snip` drops the last item, and `rear` returns it or crashes on an empty list. The folds take an explicit initial value as the Prelude table specifies. The partial checker infers `snoc`, `lure`, `weld`, `turn`, `flop`, `rear`, `skim`, `skip`, `murn`, `join` and `snip` using the validated prelude `list` mold; other list helpers remain limited by that fragment. The result casts on `drop`, `skim`, `skip`, `murn`, `join` and `snip` state their existing result types without changing their bodies. Backend validation remains outstanding for all of them.
4749
4850## 2c
4951
docs/prompts/milestone-2.md+6−6
@@ -49,7 +49,7 @@ And from the plan's Risks:
4949
5050## First steps
5151
52−1. **Specify the prelude inventory.** The checker needs the prelude's complete exported inventory and signatures; include all names from the listed Hoon library sections except explicitly excluded groups, as `docs/open-questions.md` question 3 records. The prelude imports private helpers and low-level primitives from a separate internal module without exposing them; its public foundational gates are implemented in Jibb on those primitives.
52+1. **Specify the prelude inventory.** The checker needs the prelude's complete exported inventory and signatures; include all names from the listed Hoon library sections except explicitly excluded groups, as `docs/open-questions.md` question 3 records. The prelude imports private helpers and low-level primitives from a separate internal module without exposing them; its public foundational gates are implemented in Jibb on those primitives. The source-backed internal module defines `poke`; the public prelude re-exports it as an ordinary transparent type that modules can construct and inspect, as question 24 records. This decision does not specify the representation of `ask` or `qath`.
5353
5454 The plan's three core-language rules were adopted: gate-free `eq` arguments and map and set keys, with gates opaque for union matching; jetted prelude functions taking gates; and rejection of a non-gate value that depends on itself even through a gate.
55552. **Start the importer early**, as the plan's Risks ask: first on a small `/sur` file, then on Tlon's. "Suggested design" below has a way in.
@@ -62,13 +62,13 @@ The rules are scattered across the tabs. This is a map of them, not a replacemen
6262- Hindley–Milner with aura variables: "every expression has a principal type, and there is no general subtyping". A specific atom fits `@`, a specific noun fits `*`, and a more specific aura fits an ancestor in its Hoon aura family, each only in that direction; the reverse needs a check.
6363- `@` means any atom, independently at each occurrence. A specific atom such as `@ud` fits where `@` is expected; an `@` value needs a check to fit `@ud`. `@ud` and `@ux` also fit `@u`, and `@tD` fits `@t`, following Hoon aura families; the reverse needs a check. Distinct specific auras remain distinct. `add` takes `[A A]` and returns `A`, with an atom constraint inferred for the shared type variable.
6464- Faces are part of record types: `[a=@ b=@]` and `[x=@ y=@]` don't unify. An unnamed position can unify with a faced one and take its face, so `[0 0]` fits `[x=@ud y=@ud]`. A single-item cell `[a]` is `a`; an empty `[]` is an error.
65−- Type variables are capitals, "generalized per `++`". A capital in a local `++` shares the enclosing `++`'s variable of that name; a different type takes a different capital. "A type variable used where an atom is required gains an atom constraint", so `++ clamp |= [lo=A hi=A n=A]`, calling `gth` and `max`, works on any one aura; "It can become nothing more specific: a body that makes `A` a `@ud` or a list is an error." Names "may refer to each other in any order", so infer `++` definitions in dependency order, a group of mutually recursive ones together.
65+- Type variables are capitals, "generalized per `++`". A capital in a local `++` shares the enclosing `++`'s variable of that name if the enclosing `++` also uses it; otherwise the local `++` introduces and generalizes its own variable. For example, `++ inner |= y=A y` shares `A` with an enclosing gate whose sample is `x=A`, but generalizes its own `A` if the enclosing `++` does not use `A`. A different type takes a different capital. A body cannot force two distinct capitals to be equal; use the same capital where a type is shared. "A type variable used where an atom is required gains an atom constraint", so `++ clamp |= [lo=A hi=A n=A]`, calling `gth` and `max`, works on any one aura; "It can become nothing more specific: a body that makes `A` a `@ud` or a list is an error." Names "may refer to each other in any order", so infer `++` definitions in dependency order, a group of mutually recursive ones together.
6666- The checker infers a gate-free constraint for `eq` arguments and map and set keys and retains it when a type variable is generalized. The requirement applies recursively to nested values; union-case matching treats gates as opaque. Print a gate-free constraint as `$-([A A] ?) where A contains no gates` and an atom constraint as `$-([A A] A) where A is an atom`; separate multiple clauses with commas, as `where A is an atom, B contains no gates`.
6767- Gates may call themselves and their siblings; a non-gate value that depends on itself, even through a gate, is an error. Molds may be recursive, and "recursive molds go by name and module".
6868- A sample's mold may be left out: every bare name in a sample binds, at any depth, as in `|=(p title.p)` "when the call fixes the type", `|= [a=@ b]` and `|=(m ~)`.
6969- Generic molds: `+$ result |$ [V E]` with cases below, applied as `(result V E)`; `|$` goes right after a `+$`'s name, and the prelude's `cmd` and `sub` use `|$ [M]`.
7070- `!!` is the empty mold, and as an expression it has any type. `*` is the noun type, not a type variable; generic positions such as the keys in `each` and `table` use a capital. A value of a more specific noun type can be used where `*` is expected.
71−- `poke`, `ask` and `qath` are opaque, built only by derived gates, `pure` and application-path literals.
71+- `poke` is transparent and re-exported from the source-backed internal prelude. `ask` and `qath` are opaque, built only by derived gates, `pure` and application-path literals.
7272- The Literals table gives every other literal its type: `0x1f` a `@ux`, ships `@p`, dates `@da`, durations `@dr`, `~.knot` a `@ta`, strings `@t`, `` `x `` a `(unit A)`, `~[…]` a `(list A)`, `gap+%s2` the pair `[%gap %s2]`, `/posts/~zod` a `path`, `%/blog` a `qath`.
7373
7474**Tags, `~`, numbers and cells wait for their context** (Grammar: Tag resolution, Literals by context)
@@ -98,7 +98,7 @@ The rules are scattered across the tabs. This is a map of them, not a replacemen
9898- `main`'s type decides a module's kind: `(element !!)` a page, `(page R D)` a page with data, `(program D X M)` an island, `(store S)` a store; no `main`, a library.
9999
100100**Importing Hoon types** (overview: Importing Hoon types; Decisions: Hoon types)
101−- The table: `$%` and `$?` become a union; `$@` a union with an atom case; `$^` a union if its cases differ as nouns, else an error where used; `$~` dropped; `map`, `set`, `qeu`, `jar`, `jug` the same, by name; `mop` as `(mop K V)`, read with `on`; other `$|` their base type; `%0`, `%&` and `%|` tags; recursive molds recursive, matched by name; cores, gates, vases, signed and float auras an error where used.
101+- The table: `$%`, `$?` and `$^` become unions only if their cases differ as nouns, else an error where used; `$@` a union with an atom case; `$~` dropped; `map`, `set`, `qeu`, `jar`, `jug` the same, by name; `mop` as `(mop K V)`, read with `on`; other `$|` their base type; `%0`, `%&` and `%|` tags; recursive molds recursive, matched by name; imported records with duplicate field names, cores, gates, vases, signed and float auras are errors where used.
102102- "Unused molds are skipped, so unsupported constructs elsewhere in a `/sur` file are fine." A field's unnamed union imports too, although Jibb cannot write one.
103103
104104**Islands, pages and stores** (overview: The Elm architecture on Urbit; Grammar: Modules and the store example)
@@ -113,13 +113,13 @@ The rules are scattered across the tabs. This is a map of them, not a replacemen
113113
114114**The prelude** (overview: Prelude, Layout and styling, Links and URLs, Effects)
115115- Hoon's standard library regrouped, "written in Jibb and vendored as `/lib/jibb/prelude`", plus `eq`, `not`, `page`, `program`, `store`, `pure`, `island`, the layout elements and molds, `attr`, `theme`, and `cmd` and `sub` as the overview's Effects block writes them.
116−- Signatures change where the Prelude table says: maps and sets are plain gates over Hoon's trees, as `(get.by m k)`; folds take a start, as `(roll xs init f)`, `rep.by` and `rep.in`; ordered maps go through lull's `on`, as `(get.on lte m k)`.
116+- Signatures change where the Prelude table says: `clap` takes two units of one value type and a combining gate over that type; maps and sets are plain gates over Hoon's trees, as `(get.by m k)`; folds take a start, as `(roll xs init f)`, `rep.by` and `rep.in`; ordered maps go through lull's `on`, as `(get.on lte m k)`.
117117- Left out: signed and float gates, parser helpers outside 3g other than the explicitly listed `slav` and `slaw`, and the table's "The rest" (1b, 2p, 3d, 3f, 4c, 4n, 4o, 5a–5f); "`jam`, `cue` and `fein` run inside the runtime".
118118- Write the prelude in Jibb, enough to give every name its type. Foundational gates use private low-level primitives from the internal prelude module. Jetted functions have working Jibb implementations; the compiler recognizes their shapes and uses the Hoon versions so jets can fire. They may take gates as arguments; the Nock backend comes in milestone 3.
119119- Element signatures are in the Layout and styling table. Paths and unchecked cords have separate declarations, with `link-unsafe`, `image-unsafe` and `go-unsafe` for the unchecked forms. Both navigation declarations produce `[%go url=@t]`; `go` converts its application path to a cord including the app's base path. "The same attribute twice in a literal list is an error."
120120
121121**Errors**
122−- Each one the Grammar tab describes needs a golden case with its message. A start on the list: an aura mismatch; mismatched faces; "msg has no case %submitt"; an unresolved tag, as the Grammar's `add-button` ("nothing fixes the union of %add"); an open constraint at the end of a module; a `|=%tag` whose union has no such case tagged at its head; a union whose cases overlap; a missing `?-` case, named; an arm that earlier arms cover; a value that refers to itself; a shadowed name, including a prelude or imported one; a cell in `{…}` with no printer; an atom of a generic aura in `{…}` or a path's `(…)`; a capital that a body makes a `@ud` or a list; `~[text "hi"]`, where the checker suggests `~[(text "hi")]`; clashing derived names; an import cycle; from an import, a signed or float aura, a core, gate or vase, or a `$^` whose cases don't differ as nouns, each where used; a `(facts …)` outside an API file's `paths`; a gate in island data or a model, naming the field; a repeated attribute in a literal list. Read the Grammar tab, and the other tabs' mentions of "error" and "the checker", and make the list complete.
122+- Each one the Grammar tab describes needs a golden case with its message. A start on the list: an aura mismatch; mismatched faces; "msg has no case %submitt"; an unresolved tag, as the Grammar's `add-button` ("nothing fixes the union of %add"); an open constraint at the end of a module; a `|=%tag` whose union has no such case tagged at its head; a union whose cases overlap; a missing `?-` case, named; an arm that earlier arms cover; a value that refers to itself; a shadowed name, including a prelude or imported one; a cell in `{…}` with no printer; an atom of a generic aura in `{…}` or a path's `(…)`; a capital that a body makes a `@ud` or a list; `~[text "hi"]`, where the checker suggests `~[(text "hi")]`; clashing derived names; an import cycle; from an import, a signed or float aura, a core, gate or vase, or a `$%`, `$?` or `$^` whose cases don't differ as nouns, or a record with duplicate field names, each where used; a `(facts …)` outside an API file's `paths`; a gate in island data or a model, naming the field; a repeated attribute in a literal list. Read the Grammar tab, and the other tabs' mentions of "error" and "the checker", and make the list complete.
123123- For a `+$` whose cases overlap or do not fit, suggest that a record or tuple leaves its `[` open on the `+$` line. `+$ pt` above `@t` and `[@ud @ud]` is a valid union.
124124- "Each error names both conflicting sites, with excerpts." Today's `error` is `[file line col msg]`, a start only; spans keep each node's end so that a type error can underline both sites.
125125- Messages name things in the doc's words and quote the code they're about in backticks, as milestone 1's do. Their wording is fixed by the golden tests once written.
docs/spec/decisions.md+6−5
@@ -31,18 +31,19 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
3131| Equality and negation | The gates `eq` and `not`, with Hoon's bitwise `not` exposed as `not.bit`; `eq`'s arguments and map and set keys contain no gates, even nested; the checker infers and generalizes that constraint; union matching never inspects a gate to distinguish cases | Decided 2026-10-30 |
3232| Special rules | No built-ins; type-directed rules are welcome, each listed in the Grammar tab | Decided 2026-10-29 |
3333| Inference | Hindley–Milner with aura variables; `@` is any atom, a specific atom fits `@` and a more specific aura fits an ancestor in its Hoon aura family, but each reverse needs a check, and repeated atom-constrained capitals give the same type; a number takes `@ud` only where its `++` isn't generic over its aura; distinct specific auras remain distinct; faces are part of record types, and an unnamed position can take a face but two different faces don't unify; principal types | Decided 2026-10-30 |
34−| Effects | The library unions `cmd` and `sub`; pokes and requests are opaque, from derived gates and `pure`; islands read agents only by watching; replies get full state, and diffs take a fold; timers carry the time; `%who` gives the owner's `@p`; nacks reach replies as text | Decided 2026-10-29 |
34+| Effects | The library unions `cmd` and `sub`; `poke` is a transparent type, and requests are opaque, from derived gates and `pure`; islands read agents only by watching; replies get full state, and diffs take a fold; timers carry the time; `%who` gives the owner's `@p`; nacks reach replies as text | Decided 2026-10-31 |
35+| Poke representation | The source-backed private internal prelude module defines `poke`, and the public prelude re-exports it as an ordinary transparent type. Ordinary modules can construct and inspect its values | Decided 2026-10-31 |
3536| Agent APIs | `/ui/api/<agent>.jibb` with `+$ poke` and `+$ paths`, over the agent's mark types; a case is a name, a path and a type, with `(facts full diff …)` for diffs, told apart by mark; an optional scry path, for pages; an island watching such a request has a type error; typed segments by aura | Decided 2026-10-30 |
3637| Mark names | Any name: `/%` names types after marks, and constructors poke with their type's mark; no alias marks | Decided 2026-10-26 |
3738| Derived gates | API files and stores give a constructor per poke type and a checked request per path or store state; clashing names are errors, including a derived name that clashes with an import face | Decided 2026-10-30 |
38−| Hoon types | A fixed translation table; `map`, `set`, `qeu`, `jar`, `jug` by name; `mop` as `(mop K V)`, read with `on`; unused molds skipped | Decided 2026-10-29 |
39+| Hoon types | A fixed translation table; `map`, `set`, `qeu`, `jar`, `jug` by name; `mop` as `(mop K V)`, read with `on`; imported `$%`, `$?` and `$^` cases must differ as nouns, and records with duplicate field names are errors where used; unused molds skipped | Decided 2026-10-30 |
3940| Layout | Indentation; juxtaposed calls; a bracket open at line end takes one item per line, with no closer | Decided |
4041| Elements | Ordinary gates; containers take attribute lists; `stack` switches at `wide`; `el` adds attributes and wins; headings 1 to 6; `form` sends on Enter, the innermost when nested; `image` from an application path, sized from the file, or a sized URL; no focus control for now | Decided 2026-10-29 |
4142| Long calls | One argument per line inside parentheses | Decided |
4243| Inline gates | Hoon's wide form; the mold may be inferred; a bare sample name binds; `\|=%got` is a case's constructor, typed by the gate expected; a bare tag is always a value | Decided 2026-10-29 |
4344| Empty mold | `!!`, with no values; the expression has any type; pages are `(element !!)`, which keeps islands out of islands | Decided 2026-10-29 |
4445| Noun mold | `*` is the noun type, not a type variable; use a capital for a generic type; a value of a more specific noun type can be used where `*` is expected | Decided 2026-10-30 |
45−| Type variables | Capitals, generalized per `++`; a capital in a local `++` shares the enclosing `++`'s variable of that name, and a different type takes a different capital; one used where an atom is required gains an inferred atom constraint, and cannot be fixed to a more specific type in its body | Decided 2026-10-30 |
46+| Type variables | Capitals, generalized per `++`; a capital in a local `++` shares the enclosing `++`'s variable of that name if the enclosing `++` also uses it; otherwise it is introduced and generalized locally; a different type takes a different capital; a body cannot force distinct capitals to be equal, so a shared type uses the same capital; one used where an atom is required gains an inferred atom constraint, and cannot be fixed to a more specific type in its body | Decided 2026-10-30 |
4647| Loobean mold | `?`, switched with `?-` | Decided 2026-10-26 |
4748| Defaults | None | Decided |
4849| Modules | Records, not cores | Decided |
@@ -67,7 +68,7 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
6768| Inputs | A message per input event, none mid-composition; controls reset to the latest view after every event; fields read-only until the island starts | Decided 2026-10-29 |
6869| Transactions | None; one poke per command | Decided |
6970| Reloads | Restart from the model the page is served with | Decided 2026-10-29 |
70−| Shared state | Stores: browser agents written like API files, with `state`, `+$ poke` and `(store init update)`; the store's `+$ poke` is a declaration, not a mold; poked and watched through derived gates; one per page | Decided 2026-10-30 |
71+| Shared state | Stores: browser agents written like API files, with `state`, `+$ poke` and `(store init update)`; the store's `+$ poke` is a declaration, not a mold; derived gates provide poke constructors and state requests; one per page | Decided 2026-10-31 |
7172| Subscriptions | By agent and path, shared per page; the first fact is full state, so no paths that need a scry path | Decided 2026-10-29 |
7273| Apps | One island under a catch-all route, given the path by `pure`; `%url` delivers the path on every change; in-section links act as `go`; focus moves to the first heading | Decided 2026-10-29 |
7374| Layout vocabulary | Jibb's elements and theme tokens; the stylesheet comes from the theme alone; chars and fill are inline; `[%fill n]` below 1 counts as 1 | Decided 2026-10-29 |
@@ -76,7 +77,7 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
7677| Dark mode | Hand-written dark tones under `dark`, used when the reader prefers dark | Decided 2026-10-27 |
7778| Links | All text escaped; in-app links are application paths, as `%/blog/(slug)`, with no query or fragment, checked at compile time against routes and static files; paths and unchecked `https`, `mailto` and `tel` URLs and root-relative cords such as `"/apps/groups"` have separate declarations; `link-unsafe`, `image-unsafe` and `go-unsafe` are the unchecked forms; both navigation declarations produce `[%go url=@t]`, with `go` converting the path to a cord including the app's base path; other cords render as text; a CSP on every page | Decided 2026-10-30 |
7879| Data layer | Hoon's nouns: units, treaps, loobeans | Decided |
79−| Prelude | Hoon's standard library regrouped: all names from the listed sections except explicitly excluded groups, including all of 3g, with Hoon's `tone` exposed as `tone.hoon` and Hoon's 1c `step` as `step.hoon`; arithmetic over aura variables, units, lists, maps, sets, queues, ordered maps, function helpers, text, atom printing, a zoned date printer, time and data molds; folds take a start; jetted functions have working Jibb implementations, whose shapes the compiler recognizes to use the Hoon versions, and may take gates; private helpers and low-level primitives live in a separate internal module imported without exposing them, with public foundational gates implemented in Jibb on those primitives; no signed or float gates, or parser gates outside 3g except `slav` and `slaw`; signed or float auras are errors | Decided 2026-10-30 |
80+| Prelude | Hoon's standard library regrouped: all names from the listed sections except explicitly excluded groups, including all of 3g, with Hoon's `tone` exposed as `tone.hoon` and Hoon's 1c `step` as `step.hoon`; arithmetic over aura variables, units, lists, maps, sets, queues, ordered maps, function helpers, text, atom printing, a zoned date printer, time and data molds; folds take a start; jetted functions have working Jibb implementations, whose shapes the compiler recognizes to use the Hoon versions, and may take gates; private helpers and low-level primitives live in a separate internal module imported without exposing them, with public foundational gates implemented in Jibb on those primitives; `clap` takes two units of the same type and a combining gate over that type; no signed or float gates, or parser gates outside 3g except `slav` and `slaw`; signed or float auras are errors | Decided 2026-10-30 |
8081| Wire format | Noun channels; Jibb's own noun codec in the browser | Decided 2026-10-29 |
8182| Hosting | One thin host agent on `%jibb` binds, caches and serves every Jibb desk; each desk vendors jibb-dev, names its base path in docket's `site+`, and builds and renders with its own copy through fixed entry points; install `%jibb` first; app agents stay plain Hoon; pokes only from the ship | Decided 2026-10-29 |
8283| Private pages | Served by the host per request and never cached; non-owners go to the login page | Decided 2026-10-29 |
docs/spec/grammar.md+5−4
@@ -91,7 +91,7 @@ Imports come first:
9191/= card /ui/components/card :: a Jibb module
9292```
9393
94−`/%` names a type after its mark, so it takes no face, and any mark name works; Hoon's `/%` binds the mark's core instead. Derived constructors such as `todo-action.todo` supply the agent and mark, so code never writes one. API modules re-export their `/%` types, not `/-` faces or `/=` modules. Import cycles are errors.
94+An imported Hoon record with duplicate field names is an error where used; imported union cases must differ as nouns. `/%` names a type after its mark, so it takes no face, and any mark name works; Hoon's `/%` binds the mark's core instead. Derived constructors such as `todo-action.todo` supply the agent and mark, so code never writes one. API modules re-export their `/%` types, not `/-` faces or `/=` modules. Import cycles are errors.
9595
9696## Modules
9797
@@ -125,11 +125,12 @@ A mold is only a type: never called on a noun, and with no default. Types are in
125125- **Records and tuples**: `[text=@t done=?]`, `[@t ?]`. An empty `[]` is an error. Faces are part of the type, so `[a=@ b=@]` and `[x=@ y=@]` don't unify. An unnamed position can unify with a faced position and take its face, so `[0 0]` fits `[x=@ud y=@ud]`; two different faces don't unify. A record too long for one line can leave its `[` open, with one field per deeper line, as an expression's bracket does.
126126- **Unions**: a `+$` with several cases below it. Every union written in Jibb has a name, so one used in a field, a sample, a cast, a gate's mold or an argument gets its own `+$`; only imports bring in unions without one. Tags take their union from context, as Tag resolution describes. Cases must differ as nouns: inhabited cases must differ at some position of their right-nested cells, where one is an atom and the other a cell, or both are different constants. `*`, type variables and molds that can be either, such as `(list A)`, can overlap atoms and cells. `?` counts as the two atoms `%.y` and `%.n`: it is disjoint from cells and overlaps the constants 0 and 1. The empty mold `!!` is disjoint from every case; a cell with an empty position at any depth is itself empty and is also disjoint from every case. A union whose cases don't all differ is rejected.
127127- **Containers**: `(list A)`, `(unit A)`, `(set A)`, `(map K V)`, `(mop K V)`, `(qeu A)`, `(jar K V)`, `(jug K V)`.
128−- **Gates**: `$-(A B)`. Type variables are capitals, generalized per `++`. A capital in a local `++` shares the enclosing `++`'s variable of the same name; use another capital for a different type. A type variable used where an atom is required gains an atom constraint, so `++ clamp |= [lo=A hi=A n=A]`, whose body calls `gth` and `max`, works on any one aura. It can become nothing more specific: a body that makes `A` a `@ud` or a list is an error.
128+- **Gates**: `$-(A B)`. Type variables are capitals, generalized per `++`. A capital in a local `++` shares the enclosing `++`'s variable of the same name if the enclosing `++` also uses it; otherwise the local `++` introduces and generalizes its own variable. For example, `++ inner |= y=A y` uses the enclosing `A` when its enclosing gate has a sample `x=A`; if the enclosing `++` does not use `A`, `inner` generalizes its own `A`. Use another capital for a different type. A body can't force two distinct capitals to be equal; use the same capital wherever a type must be shared. A type variable used where an atom is required gains an atom constraint, so `++ clamp |= [lo=A hi=A n=A]`, whose body calls `gth` and `max`, works on any one aura. It can become nothing more specific: a body that makes `A` a `@ud` or a list is an error.
129129- **Paths**: `/todos` is constant, `/` empty, and `/todo/[id=@ud]` typed by aura. `%/blog/(slug)` is an `qath`, checked against routes and static files.
130130- **Generic molds**: `+$ result |$ [V E]` with cases below; `|$` goes only right after a `+$`'s name.
131131- **Noun**: `*`, not a type variable; use a capital for a generic type. A value already known to have a more specific noun type, such as `@ud`, can be used where `*` is expected. **Empty**: `!!`.
132−- **Opaque**: `poke`, `ask` and `qath`, built only by derived gates, `pure` and application-path literals. `(facts full diff …)` appears only in an API file's `paths`.
132+- **Pokes**: `poke` is defined in the source-backed private internal prelude module and re-exported by the public prelude as an ordinary transparent type. Ordinary modules can construct and inspect its values.
133+- **Opaque**: `ask` and `qath`, built only by derived gates, `pure` and application-path literals. `(facts full diff …)` appears only in an API file's `paths`.
133134- **Identity**: recursive molds go by name and module.
134135
135136`eq`'s arguments and map and set keys must contain no gates, even nested inside another value. The checker infers this gate-free constraint on type variables and retains it when generalizing a `++`, so a generic helper that calls `eq` stays generic over gate-free types. Printed types show the constraint as `$-([A A] ?) where A contains no gates`. An inferred atom constraint prints as `$-([A A] A) where A is an atom`. Multiple clauses are comma-separated, as `where A is an atom, B contains no gates`. Union-case matching treats gates as opaque and never inspects a gate to distinguish cases.
@@ -339,4 +340,4 @@ knot = { lower | digit | "-" | "." | "~" | "_" } ;
339340 button "Add" %add
340341```
341342
342−A store is written like an API file: `state`, `+$ poke` and `(store init update)`. Islands poke it with derived constructors and watch it with `(state.cart |=%got)`, whose first fact is the current state and each later fact the next. It runs in the browser, shared by the page's islands.
343+A store is written like an API file: `state`, `+$ poke` and `(store init update)`. Islands can poke it with derived constructors and watch it with `(state.cart |=%got)`, whose first fact is the current state and each later fact the next. It runs in the browser, shared by the page's islands.
docs/spec/overview.md+5−5
@@ -63,7 +63,7 @@ Hoon's runes and literals in an indentation layout, over Hoon's nouns and molds,
6363
6464| Hoon | Jibb |
6565| --- | --- |
66−| `$%`, `$?` | A union |
66+| `$%`, `$?` | A union if its cases differ as nouns, else an error where used |
6767| `$@` | A union with an atom case |
6868| `$^` | A union if its cases differ as nouns, else an error where used |
6969| `$~` | Dropped |
@@ -72,18 +72,18 @@ Hoon's runes and literals in an indentation layout, over Hoon's nouns and molds,
7272| Other `$\|` | Its base type |
7373| `%0`, `%&`, `%\|` | Tags |
7474| Recursive molds, such as `json` | Recursive, matched by name |
75−| Cores, gates, vases, signed and float auras | An error where used |
75+| Records with duplicate field names; cores, gates, vases, signed and float auras | An error where used |
7676
7777Unused molds are skipped, so unsupported constructs elsewhere in a `/sur` file are fine. A union without a name, as a field's `?(%approve %deny)`, imports too, though Jibb can't write one. Messages and printed types show its cases separated by spaces, as `%approve %deny`; this notation is print-only.
7878
7979## Prelude
8080
81−Hoon's standard library regrouped, written in Jibb and vendored as `/lib/jibb/prelude`; an island's bundle carries only what it uses. The exported inventory includes all names from the Hoon library sections listed below, excluding the groups explicitly left out. Jetted prelude functions have working Jibb implementations; the compiler recognizes their shapes and uses the Hoon versions so jets can fire. They may take gates as arguments (Core language). Private helpers and low-level primitives live in a separate internal prelude module, imported without exposing them; foundational public gates are implemented in Jibb on top of those primitives. The prelude also holds `eq`, `not`, `page`, `program`, `store`, `pure`, `island`, and the layout elements and molds.
81+Hoon's standard library regrouped, written in Jibb and vendored as `/lib/jibb/prelude`; an island's bundle carries only what it uses. The exported inventory includes all names from the Hoon library sections listed below, excluding the groups explicitly left out. Jetted prelude functions have working Jibb implementations; the compiler recognizes their shapes and uses the Hoon versions so jets can fire. They may take gates as arguments (Core language). Private helpers and low-level primitives live in a separate internal prelude module, imported without exposing them; foundational public gates are implemented in Jibb on top of those primitives. This source-backed internal module defines `poke`; the public prelude re-exports it as an ordinary transparent type, so ordinary modules can construct and inspect its values. The prelude also holds `eq`, `not`, `page`, `program`, `store`, `pure`, `island`, and the layout elements and molds.
8282
8383| Group | Hoon | Jibb |
8484| --- | --- | --- |
8585| Arithmetic | [1a](https://docs.urbit.org/hoon/stdlib/1a), [2g](https://docs.urbit.org/hoon/stdlib/2g) | Jibb gates over shared atom-constrained type variables, using private low-level primitives: `add`, `sub`, `div`, `mod`, `gth`, `max`, `pow` |
86−| Units | [2a](https://docs.urbit.org/hoon/stdlib/2a) | `fall`, `need`, `bind`, `biff` |
86+| Units | [2a](https://docs.urbit.org/hoon/stdlib/2a) | `fall`, `need`, `bind`, `biff`, `clap`; `clap` takes two units of the same type and a gate combining two values of that type into one of that type |
8787| Lists | [2b](https://docs.urbit.org/hoon/stdlib/2b) | `turn`, `weld`, `snag`, `lent`, `sort`, `skim`; `(roll xs init f)` takes a start |
8888| Maps, sets, queues | [2h](https://docs.urbit.org/hoon/stdlib/2h)–[2m](https://docs.urbit.org/hoon/stdlib/2m), [2o](https://docs.urbit.org/hoon/stdlib/2o) | Plain gates over Hoon's trees, such as `(get.by m k)`; `rep.by` and `rep.in` take a start; ordered maps through lull's `on`, as `(get.on lte m k)` |
8989| Function helpers | [2n](https://docs.urbit.org/hoon/stdlib/2n) | `same`, `head`, `tail`, `cork`, `cury` |
@@ -150,7 +150,7 @@ Loads and renders run in Nock.
150150 [%url reply=$-(path M)]
151151```
152152
153−- `poke` and `ask` are opaque, built only by derived gates and `pure`. A constructor such as `(todo-action.todo [%add draft.m])` checks its value and supplies the agent and mark, so one island can poke several agents. The agent's mark rechecks on the ship; a nack's `tang` reaches the reply as text. Store constructors poke the store in the browser.
153+- `poke` is a transparent type; `ask` is opaque, built only by derived gates and `pure`. A derived poke constructor such as `(todo-action.todo [%add draft.m])` checks its value and supplies the agent and mark, so one island can poke several agents. The agent's mark rechecks on the ship; a nack's `tang` reaches the reply as text. Store constructors poke the store in the browser.
154154- A request such as `(todos.todo |=%got)` comes from a declared path or a store's `state`; its reply always gets full state. A path with diffs also takes a fold, `(changes.todo |=%got apply)`, which the runtime applies first. Facts are checked; a bad one crashes the reply, which counts as a crashed `update`.
155155- Islands read agents only by watching. A watch's first fact must be full state, so watching a request whose path case has a separate `scry=` path is a type error in an island. The runtime acks facts, rewatches after a kick or a dropped connection and reseeds from the first fact; a refused watch shows the crash notice.
156156- Watches match by agent and path, timers by gap, and the newest reply is always used. After each `update`, `subs` is diffed to start and stop watches and timers. `%now` and `%every` give the time, `%who` the owner's `@p` from `/~/name`; `%wait` is a one-shot delay.
docs/status.md+56−7
@@ -1,6 +1,6 @@
11# Status
22
3−As of 2026-10-30. The plan is [spec/implementation-plan.md](spec/implementation-plan.md); each milestone ends with its checks passing on a fake ship.
3+As of 2026-10-31. The plan is [spec/implementation-plan.md](spec/implementation-plan.md); each milestone ends with its checks passing on a fake ship.
44
55| # | Milestone | Status |
66| --- | --- | --- |
@@ -19,7 +19,9 @@ On 2026-10-30, @iko decided that Jibb drops `$?`, so a `+$` takes a union's case
1919
2020## Milestone 2: in progress
2121
22−The repository spec records the subsequent type-system and prelude decisions; those changes also need synchronization to the Claude document. An initial inference fragment and a standalone Hoon type reader are being tested. The fragment explicitly reports that it does not check a module; partial bridges pass selected Hoon atoms and unfaced cells from `/sur` molds and marks into inference. The reader handles mark samples, recursive molds whose origins can be verified through Ford imports, nested collections, direct ordered maps, certain ordered-map fields, and direct `$^` unions whose cases can be proved disjoint. Ambiguous recursive origins fail closed; nested `$^`, other nested ordered maps, general union disjointness and complete import integration remain unfinished. The partial checker resolves a subset of ordinary library imports in dependency order using supplied Jibb sources and the current prelude names, and detects missing sources and cycles. It does not yet check API or kind semantics, and the prelude inventory is incomplete. The inference fragment supports unrestricted `@`, selected one-way widenings including aura-family ancestors, generalized atom constraints arising from explicit capitals or bare sample binders, acyclic local value definitions with captures, and simple acyclic local mold aliases. Unfixed decimal literals default to `@ud` in gate-free inferred types; recursive local groups, more complex local molds, other constraint cases and defaulting inside gate types still need work. Collection recognition checks the originating core and fails closed on shadows or unsupported Ford subject shapes; its golden fixtures include three real Tlon files. The prelude currently has only a few functions, and [prelude-inventory.md](prelude-inventory.md) is a source audit, not the complete inventory or signatures. The milestone remains unfinished.
22+The repository spec records the subsequent type-system and prelude decisions; those changes also need synchronization to the Claude document. An initial inference fragment and a standalone Hoon type reader are being tested. The fragment explicitly reports that it does not check a module; partial bridges pass Hoon `*` in supported nonrecursive molds, selected Hoon atoms, term singletons, the null singleton, the two loobean singletons and their exact fork, nested faced or unfaced cells, supported disjoint unions and opaque standard collections from `/sur` molds and marks into inference. Collections retain their names and supported arguments for printing and unification; nested supported union arguments are retained too. The bridge trusts unchanged results from the source-aware reader; a materialized type graph alone cannot reveal cases Hoon already collapsed. The source-validated standard prelude `list` mold shares this representation with imported lists; other Jibb-written collection molds and most prelude collection operations remain unsupported; malformed names and arities fail closed. Selected self-recursive `/sur` molds cross as opaque module-and-name identities; aliases, foreign references, recursive marks, unfolding and construction remain unsupported. The reader handles mark samples, including a source-proved nonrecursive union from a single Ford-imported `/sur` core, recursive molds whose origins can be verified through Ford imports, nested collections, direct ordered maps, certain ordered-map fields, direct `$^` unions whose cases can be proved disjoint, and one verified explicit union argument in a list, set, map or unit. Tagged `$%` cases can additionally use restricted local named payload molds and bare `~` fields, as in the real Tlon `notes.u-note`, with a bounded source proof; unsupported or ambiguous dependencies fail closed. Ambiguous recursive origins fail closed; recognizable explicit unions are checked from source before Hoon can collapse their cases, as @iko confirmed for imported `$%`, `$?` and `$^`, while other nested unions, nested ordered maps, general union disjointness and complete import integration remain unfinished. Opt-in structured reader APIs preserve successful graphs and distinguish definite unsupported-aura and core evidence from failures the reader cannot prove; unverified union disjointness and name-only vase recognition remain unsupported. They revalidate and re-walk failed types. An opt-in partial checker entry point consumes unchanged reader results and reports definite aura or core errors at imported mold use sites when their inputs are unique. Ordered replay covers nested cell samples, record and function casts, and non-generic same-module aliases; unsupported prefixes, cycles and shadowing stop it. Union molds, generic applications, transitive modules and unsupported reader outcomes remain generic. Replay repeats inference and may add work. The partial checker resolves a subset of ordinary library imports in dependency order using supplied Jibb sources and a source-derived partial prelude interface, caches completed interfaces per run, and detects missing sources and cycles. The source-backed internal prelude defines `poke` and the public prelude re-exports it as a transparent type. The partial checker resolves its supported source shape and rejects ordinary imports of the private path. An imported API with one mark and a matching direct `+$ poke` declaration can export a constructor and retain agent/mark metadata when the representation has the supported agent case. A separate partial analysis resolves supported API path declarations and their full and diff mark types, including the todo paths; it does not create requests or check an API module. Complete private module checking, other API shapes, request gates, root API and kind checking, stores, `ask`, `pure`, lowering and runtime effects remain unfinished. A possible store or root API with `+$ poke` reports unsupported kind or scope, while definite duplicates and unrelated shadowing still report conflicts. The prelude inventory is incomplete. The inference fragment supports unrestricted `@`, selected one-way widenings including aura-family ancestors, generalized atom constraints arising from explicit capitals or bare sample binders, acyclic local value definitions with captures, selected single self-recursive top-level and local gates, simple and nonrecursive generic mold aliases, selected faced record casts and field reads, and contextual tags, `~` and constructors for closed disjoint unions, including direct nonrecursive generic unions and propagation through complete loobean and unit-shaped branches in casts and known union-sample calls, including nested branches. Multi-argument calls form a right-nested sample, retain known faces and shared type variables, and can use known sample positions to contextualize list and union arguments. A definite mismatch points to the failing argument when the fragment can establish it, otherwise to the combined sample; unsupported contextual forms still fail closed. For a supported recursive gate, the checker infers the sample first and uses its exact type, including field faces, for one monomorphic self reference. It generalizes after the body is checked; subsequent uses instantiate it independently. Incompatible recursive arguments can report the gate and argument sites. For a complete loobean branch with one direct self-call arm, a separately inferred closed base type can seed the recursive result before the whole body is checked. Open or pending base types do not seed it; other branch shapes remain subject to the fragment’s existing limits. A supported single local recursive gate also uses a monomorphic self reference and generalizes variables free of the enclosing environment after checking its body; captured variables remain shared. The checker collects written capitals per `++` before inference, excluding nested definitions: a capital used in an enclosing definition is shared with its locals even when written later, while a capital introduced only in a local definition is generalized there. Sibling locals can introduce independent capitals with the same spelling; generic mold parameters keep their own scope. Top-level groups of syntactic gates are inferred together with monomorphic placeholders and shared substitutions, then generalized only after the whole group checks; downstream uses and library interfaces instantiate those schemes independently. A dependency graph identifies groups with two iterative depth-first passes; its conservative local-reference edges can reject otherwise valid programs. Supported local mutually recursive gate groups also use shared monomorphic placeholders and generalize only after the group checks, preserving captured outer variables. A bounded dependency proof reports certain non-gate cycles through values and gates when an explicit atom or loobean result cast and simple unshadowed expressions establish the cycle. Other mixed gate/value cycles, polymorphic recursion, unresolved literal constraints and unresolved branch joins remain unsupported. Reporting repeats inference for a single recursive gate outside a group; grouped reports use the stored schemes. Its performance cost remains unmeasured. A single-arm cell pattern accepts two or more binders, the last capturing the remaining tail; duplicate and shadowed binders are rejected. Intermediate union or collection tails, nested patterns, wildcards and faced records remain unsupported. String interpolation accepts known atom auras, unrestricted `@`, tapes and isolated decimal literals; a known cell asks for a printer, and an explicitly generic atom asks for an aura. Loobeans, term singletons, non-tape collections, open types and a type fixed only later remain unsupported. A known closed union with two or more arms supports patterns that provably cover or exclude each remaining case, including payload binders, imported and generic cases, and binder-free catch-alls. Partial boolean patterns can split known `?` positions into their two noun values, up to 64 alternatives across the union; binders retain their original case type. Missing alternatives and covered arms are reported. Other partial patterns, expansions above the limit, binders spanning distinct cases, differing arm result types and some complex two-arm subjects remain unsupported. A cast or known call sample can supply result context through whole-case arms and supported finite loobean refinements for a known union accessed by a wing, including nested cell and list positions; other partial-pattern context and non-wing subjects remain unsupported. The Grammar’s `step` block infers in this fragment, but its module is not yet checked. A bare tag proved absent from a known union reports the union and tag sites in casts, single-argument calls, unit payloads, list items and supported branch arms; imported unnamed unions print their cases. Ordered fit replay can identify a missing tag nested in a syntactic tuple, stopping at an earlier mismatch or uncertainty. Known faced records support uniquely named field changes, including nested wings, with field context passed to replacements and the original record type retained. Missing fields, empty changes and definite mismatches report sites; the expected-type site is the edit because the original field declaration location is not retained. Unknown or partly unfaced spines, ambiguous fields and repeated edits remain unsupported. A known record cast supplies field context to its tuple or record initializer, including nested list and union fields; mismatch diagnostics use the cast mold because the original field declaration location is not retained. Isolated cart-style `init` and `update` expressions infer, while the complete cart-store fails closed because its kind and declaration scope remain unchecked. Uncontextualized list literals infer a fresh element type, including empty and nested lists, with independently generalized uses. Unresolved item tags and uncertain widening remain unsupported. Backtick unit construction uses the validated standard prelude unit template, infers its payload without losing pending constraints, and makes the prelude’s `some` available. Ordinary result annotations also let its `bind`, `biff`, `both`, `clap`, `clef` and `flit` infer. A known unit in a cast, call, list item or record field supplies context to its payload, including nested units and lists; mismatches identify the payload and context. Unrelated union identities, some variable-dependent fits, and missing or altered prelude unit templates remain unsupported. Contextual null-headed cells fit their cases, but do not supply a `|=%$` constructor; unresolved nulls remain pending and are reported separately from tags. A known union of `~` and a null-headed cell supports a complete `~` / `[~ value]` branch in either order, including shadow checks; unknown subjects, missing or duplicate arms, and unresolved branch results remain unsupported. This fragment infers the prelude’s `fall` and `need` signatures. With the validated prelude list and a known cast or gate sample, empty, nonempty and nested list literals infer their element types, including contextual union tags; a mismatched element names both sites. In that context `~` and zero-valued terms fit an empty list, and two-item unfaced cells form cons lists, including nested cons and imported-list contexts; invalid heads or tails name both sites. A known gate sample also supplies context to matching positions in a single tuple or record argument, including nested cells; zero literals can fit list positions. A bound zero constant remains unsupported rather than a definite mismatch, and an unknown callee does not supply context. Faced or longer cells and a missing or altered prelude list fail closed. A known list result also supplies context through complete loobean, unit-shaped and list-shaped branches, including recursive and nested branches. For a known standard list with a supported element type, a complete `~` / `[item rest]` branch infers the element and tail types in either arm order and checks binders for shadowing. Unknown subjects, unsupported element types and other or incomplete list patterns remain unsupported. A value with type variable `A` can fit a field whose type is that same `A`, including in generic union payloads and nested or repeated record fields. Other variable-dependent face merges remain unsupported. Forced equality of distinct written capitals now reports both source sites, following @iko’s decision; forcing one to a concrete type remains unsupported. Imported record spines with repeated faces fail closed where used, but only with a generic unsupported diagnostic. Hoon may erase unfaced nested-cell boundaries, so the check can conservatively reject valid names in distinct erased scopes. Supported closed unions print using an in-scope name or imported alias; an unnamed nongeneric union prints its cases, parenthesized when nested. The latter is print-only. Generic union types retain all arguments in their printed name; if that name is unavailable, the partial printer reports the limitation. Different import faces for the same origin remain compatible; compatibility across distinct union origins and some generic-argument comparisons remain unsupported. Nonrecursive generic aliases can reorder, repeat or omit parameters while retaining a union’s origin, including through local scopes and library interfaces. A generic union declared directly inside a body remains unsupported, as do differing-variable face constraints in a union payload. A transitive generic union whose name is unavailable is reported as unsupported instead of hiding its arguments. Unfixed decimal literals default to `@ud` in gate-free inferred types; recursive molds, general branch tag context, other constraint cases and defaulting inside gate types still need work. Collection recognition checks the originating core and fails closed on shadows or unsupported Ford subject shapes; a wrapper regression also rejects forged subjects, samples and tails. Its golden fixtures include three real Tlon files. A Clay test passes a Ford-built nested union through the reader into partial inference. The partial prelude includes `murn`, `join`, `snip`, `rear` and the newly agreed shared-type `clap`, parsed but still awaiting checker and backend validation, and [prelude-inventory.md](prelude-inventory.md) is a source audit, not the complete inventory or signatures. The milestone remains unfinished.
23+
24+The shared prelude interface reserves every name present in the supplied vendored source and makes only supported inferred entries available, including `list`, `unit`, `same`, `fall`, `need`, `lure`, `weld`, `snoc` and `turn`. The validated standard `list` mold is injected when the prelude’s own gates are inferred; `weld` and `turn` have ordinary explicit result casts. An absent or altered `list` is not injected, and an altered declaration cannot leak through direct or transitive mold aliases. List-dependent prelude mold aliases remain unsupported because their templates are prepared before injection. Unsupported entries such as most list helpers remain reserved but unavailable; backend validation of the helpers remains outstanding. All callers use the same prelude origin, so a library can export a type containing unqualified `(unit A)` to another module. Preparation rejects empty, malformed, conflicting or import-bearing source; the prepared value is trusted and must come unchanged from `+prepare-prelude`. The module-scope fixture compares the prepared and source-taking paths against the real prelude and a two-module golden under eval and on the ship. The source and checker remain incomplete, so this does not establish complete shadowing coverage or a checked module.
2325
2426## Milestone 1: parser and mark
2527
@@ -37,8 +39,8 @@ What the plan asks for, and where it is:
3739
3840Besides the plan's list:
3941
40−- 435 golden cases: 219 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 435-case corpus passed under `urbit eval` in 25.7 s. The fake ship passed all 440 tests, including the importer, importer/checker and mark/checker bridges, module scope and unification checks, with 20.3 s for sync and 27.3 s for tests. The importer golden compares 90 projections; `tools/clay-fixtures` builds the example Hoon fixtures through Clay, checks a recursive Ford import's origin, and passes Clay-built types through the Clay-built importer and partial checker.
42+- 561 golden cases: 345 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.
43+- The 561-case corpus passed under `urbit eval` in 67.4 s. The fake ship passed all 570 tests, including the importer, importer/checker and mark/checker bridges, module scope and unification checks, with 39.7 s for sync and 83.3 s for tests. The importer golden compares 182 projections; `tools/clay-fixtures` builds the example Hoon fixtures through Clay, checks a recursive Ford import's origin, and passes Clay-built types through the Clay-built importer and partial checker.
4244- `tools/testdata/selftest` (22 checks) and `tools/testdata/ship-selftest` test the tools themselves.
4345- 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.
4446- 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).
@@ -64,24 +66,71 @@ Besides the plan's list:
6466| 2d5deb2 | 2026-10-30 | Default gate-free decimal types, validate named Hoon mold lookup, and isolate fixture failures |
6567| 1b7dbae | 2026-10-30 | Infer acyclic local definitions and parse case-local Jibb module fixtures |
6668| 8b9c9ac | 2026-10-30 | Preserve recursive import origins, infer simple local molds, and supply Jibb module sources to the partial checker |
67−| This change | 2026-10-30 | Infer supported library import graphs and guard nested Hoon `$^` in collections |
69+| 529736a | 2026-10-30 | Infer supported library import graphs and guard nested Hoon `$^` in collections |
70+| 8bf1b12 | 2026-10-30 | Infer selected record faces and check nested `$^` in static Hoon records |
71+| d8ac47d | 2026-10-30 | Cache library interfaces, preserve imported Hoon record faces, and check nested tagged unions |
72+| edd9277 | 2026-10-30 | Infer nonrecursive generic mold aliases with lexical parameters |
73+| 4406f6f | 2026-10-30 | Resolve selected contextual tags and check explicit imported unions |
74+| 5c73614 | 2026-10-30 | Print supported named and escaping union types |
75+| 0070584 | 2026-10-30 | Propagate union context through loobean branches, read selected unions in Hoon collections, and add `flit` |
76+| 250564c | 2026-10-30 | Infer selected named generic unions, test Hoon collection wrappers, and add list helpers |
77+| e95ef8f | 2026-10-30 | Bridge selected Hoon unions into partial inference and support generic union aliases |
78+| 56a899f | 2026-10-30 | Infer matching variable types in faced fields and bridge opaque Hoon collections |
79+| 4d45d2f | 2026-10-30 | Resolve selected contextual null literals |
80+| e878edc | 2026-10-30 | Infer complete unit-shaped branches and bridge selected recursive Hoon molds |
81+| 743dfd8 | 2026-10-30 | Propagate union context through unit-shaped branches |
82+| 3f90fa8 | 2026-10-30 | Share a partial prelude interface across module inference |
83+| 29bd39f | 2026-10-30 | Infer contextual list literals and validate prelude parity |
84+| a2a6ef5 | 2026-10-30 | Infer complete list-shaped branches |
85+| 671fe72 | 2026-10-30 | Infer contextual list nulls and cons cells |
86+| 7e69436 | 2026-10-30 | Infer selected self-recursive gates |
87+| 9ab52e8 | 2026-10-30 | Infer recursive branches with closed base types |
88+| d782b45 | 2026-10-30 | Propagate list context and apply settled type decisions |
89+| c7082e0 | 2026-10-30 | Infer multi-argument calls |
90+| 918acbd | 2026-10-30 | Infer recursive gates from their samples first |
91+| 1470d18 | 2026-10-30 | Infer selected prelude list helpers |
92+| 10cbf9c | 2026-10-30 | Infer selected local recursive gates and distinguish reader diagnostics |
93+| 45afb13 | 2026-10-30 | Infer local capital scopes and report direct reader diagnostics |
94+| 054e651 | 2026-10-30 | Report nested reader diagnostics |
95+| 98c19cd | 2026-10-30 | Infer known-aura string interpolation |
96+| ddba633 | 2026-10-30 | Infer top-level mutually recursive gates |
97+| 9f1517e | 2026-10-30 | Infer whole-case union patterns and prelude `turn` |
98+| 9dd35c8 | 2026-10-31 | Match finite boolean refinements of union cases |
99+| 54852d4 | 2026-10-31 | Contextualize tuple calls and infer known record changes |
100+| 0bc5113 | 2026-10-31 | Contextualize record initializers and infer unit construction |
101+| 264a436 | 2026-10-31 | Contextualize unit payloads in casts, calls and nested values |
102+| a140383 | 2026-10-31 | Report missing union tags and infer prelude unit helpers |
103+| d69cc52 | 2026-10-31 | Infer longer cell binder patterns and prelude unit helpers |
104+| ae35005 | 2026-10-31 | Import source-verified tagged Hoon unions |
105+| c8f894a | 2026-10-31 | Report nested missing tags and contextualize union branch results |
106+| ef2ea71 | 2026-10-31 | Import Hoon null singleton cases |
107+| 67f900e | 2026-10-31 | Infer local mutual gates and uncontextualized lists |
108+| 7ff15f1 | 2026-10-31 | Contextualize finite union patterns and record the initial poke decision |
109+| c790a9f | 2026-10-31 | Expose transparent `poke` from the internal prelude |
110+| ef4772a | 2026-10-31 | Bridge imported loobeans and loobean singletons |
111+| ad46655 | 2026-10-31 | Bridge selected imported any-noun molds |
112+| beada10 | 2026-10-31 | Import source-proved Ford mark unions, analyze API paths and infer list helpers |
113+| This change | 2026-10-31 | Diagnose proven non-gate cycles and import Tlon null-payload union cases |
68114
69115## Checking it
70116
71117On a machine set up as [development.md](development.md) says:
72118
73119```
74−tools/golden # 435 cases under urbit eval
120+tools/golden # 561 cases under urbit eval
75121tools/importer-test # the Hoon importer fixture projection
76122tools/type-import-test # the importer/checker bridge fixture
123+tools/type-tlon-test # the real Tlon reader/checker fixture
77124tools/type-mark-test # the mark/checker bridge fixture
125+tools/type-poke-test # the source-backed poke/API fixture
126+tools/type-api-paths-test # partial API path metadata fixture
78127tools/type-module-scope-test # module and prelude scope fixture
79128tools/hoon check-spans-test # prints <<>> when the span checker works
80129tools/testdata/selftest # the tools themselves
81130tools/doc-blocks docs/spec # the doc's examples are golden cases
82131tools/ship start
83132tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
84−tools/ship test # the same 435 cases as -test arms on the ship
133+tools/ship test # the same 561 cases as -test arms on the ship
85134tools/testdata/ship-selftest
86135tools/ship check-commit # |commit stores .jibb files
87136tools/clay-fixtures # example /sur files and marks build through Clay
jibb-dev/lib/jibb-import.hoon+823−19
@@ -11,18 +11,23 @@
1111:: a repeated named hold becomes a module-qualified reference.
1212::
1313:: A direct $^ is read from its original branches and accepted only when
14−:: their imported shapes prove disjoint. Nested $^ and some valid but
15−:: unprovably disjoint cases remain unsupported. Source-level overlap in
14+:: their imported shapes prove disjoint. A single nested $^ in a
15+:: static record is checked by splitting and reassembling its branches;
16+:: other nested forms and unprovably disjoint cases remain unsupported. Source-level overlap in
1617:: other unions, general nested ordered maps, broader Ford subject
1718:: shapes, ambiguous recursive origins and full error locations still
18−:: need work. A nested ordered map is recovered only when its key and
19+:: need work. One direct union argument to a standard collection is
20+:: recovered only from its exact call wrapper, static independent cases,
21+:: proven disjoint branches and unshadowed standard names. Other source
22+:: shapes fail closed. A nested ordered map is recovered only when its key and
1923:: value are fixed atom molds and
2024:: the other fields are fixed atoms or collections of static atoms;
2125:: other source shapes fail closed.
2226::
23−:: The checker has a small bridge for successful unfaced atom and cell
24−:: results; it rejects other importer shapes. Failures return %|; no
25−:: partial tree is returned as success.
27+:: The partial checker bridges supported nouns, atoms, cells, faces,
28+:: proven forks and collections, and keeps proven recursive roots nominal.
29+:: Unsupported shapes fail closed. Reader failures return %|; no partial
30+:: tree is returned as success.
2631::
2732|%
2833+$ imported
@@ -36,6 +41,12 @@
3641 [%apply name=term args=(list imported)]
3742 [%ref module=term name=term]
3843 [%bad reason=@t]
44+ [%invalid code=?(%aura %core) reason=@t]
45+ ==
46++$ import-diagnostic
47+ $% [%ok value=imported]
48+ [%invalid code=?(%aura %core) message=@t]
49+ [%unsupported message=@t]
3950 ==
4051+$ signatures (list [name=term code=hoon])
4152+$ visiting (list [typ=type name=(unit term)])
@@ -66,6 +77,201 @@
6677 ^- (each imported @t)
6778 (read-with module name typ ~)
6879::
80+:: When Hoon's expanded type has lost source cases, inspect the exact
81+:: selected local arm. Restrict this fallback to distinct literal head tags
82+:: and proven-safe dependencies, then verify each projected branch again.
83++$ tagged-case [tag=@ branch=spec]
84+:: Clay and eval expose different versions of the spec union. Inspect help
85+:: and source-location wrappers as nouns before checking their contained spec.
86+++ source-gist-tail
87+ |= raw=*
88+ ^- (unit *)
89+ ?: ?=([%gist [%help *] *] raw) `+.+.raw
90+ ?: ?=([%dbug * *] raw) `+.+.raw
91+ ~
92+::
93+++ tagged-term
94+ |= leaf=spec
95+ ^- (unit @)
96+ =/ gist=(unit *) (source-gist-tail leaf)
97+ ?^ gist $(leaf ;;(spec u.gist))
98+ ?. ?=([%leaf %tas @] leaf) ~
99+ `q.leaf
100+::
101+++ tagged-head
102+ |= branch=spec
103+ ^- (unit @)
104+ =/ gist=(unit *) (source-gist-tail branch)
105+ ?^ gist $(branch ;;(spec u.gist))
106+ ?+ branch ~
107+ [%bccl *]
108+ ?~ t.p.branch ~
109+ (tagged-term i.p.branch)
110+ ==
111+::
112+++ tagged-cases
113+ |= [cases=(list spec) tags=(list @)]
114+ ^- (unit (list tagged-case))
115+ ?~ cases `~
116+ ?: |((has-spec-cell-union i.cases) (has-spec-general-union i.cases)) ~
117+ =/ tag=(unit @) (tagged-head i.cases)
118+ ?~ tag ~
119+ ?: (lien tags |=(x=@ =(x u.tag))) ~
120+ =/ rest $(cases t.cases, tags [u.tag tags])
121+ ?~ rest ~
122+ `[[u.tag i.cases] u.rest]
123+::
124+:: Benign source annotations have different typed representations on
125+:: Clay and under eval. Inspect the wrapper as a noun, and validate the
126+:: contained Hoon before examining an arm.
127+++ source-note-tail
128+ |= raw=*
129+ ^- (unit *)
130+ ?: ?=([%note [%help *] *] raw) `+.+.raw
131+ ?: ?=([%dbug * *] raw) `+.+.raw
132+ ~
133+::
134+++ tagged-source-code
135+ |= [code=hoon name=term]
136+ ^- (unit (list tagged-case))
137+ =/ found=(unit spec) (local-mold-spec code name)
138+ ?~ found ~
139+ =/ body=spec u.found
140+ |-
141+ =/ gist=(unit *) (source-gist-tail body)
142+ ?^ gist $(body ;;(spec u.gist))
143+ ?. ?=([%bccn *] body) ~
144+ =/ cases=(list spec) p.body
145+ ?~ cases ~
146+ ?~ t.cases ~
147+ (tagged-cases cases ~)
148+::
149+:: Source proof for dependencies of an explicitly tagged union. Only
150+:: simple local molds, standard collections and distinct term enums are
151+:: accepted; computed molds, nested cell unions and cycles fail closed.
152+:: One shared fuel budget bounds repeated visits through acyclic aliases;
153+:: exhaustion or an inherited same-name arm leaves the result unsupported.
154+++ local-arm-source
155+ |= [cor=type name=term]
156+ ^- (unit hoon)
157+ ?. ?=([%core *] cor) ~
158+ =/ chapters=(map term tome) q.r.q.cor
159+ =/ all=(list [term tome]) ~(tap by chapters)
160+ ?: (lien all |=(e=[term tome] &(!=(-.e %$) (chapter-unsafe +.e name)))) ~
161+ =/ chapter=(unit tome) (~(get by chapters) %$)
162+ ?~ chapter ~
163+ (chapter-source u.chapter name)
164+::
165+++ local-mold-spec
166+ |= [code=hoon name=term]
167+ ^- (unit spec)
168+ =/ note=(unit *) (source-note-tail code)
169+ ?^ note $(code ;;(hoon u.note))
170+ ?+ code ~
171+ [%ktcl *]
172+ ?. ?=([%name * *] p.code) ~
173+ ?. =(name p.p.code) ~
174+ `q.p.code
175+ ==
176+::
177+++ safe-source-enum
178+ |= [cases=(list spec) seen=(list @) fuel=@ud]
179+ ^- (unit @ud)
180+ ?~ cases `fuel
181+ ?: =(fuel 0) ~
182+ ?. ?=([%leaf %tas @] i.cases) ~
183+ ?: (lien seen |=(n=@ =(n q.i.cases))) ~
184+ $(cases t.cases, seen [q.i.cases seen], fuel (dec fuel))
185+::
186+++ safe-source-specs
187+ |= [xs=(list spec) cor=type seen=(list term) fuel=@ud]
188+ ^- (unit @ud)
189+ ?~ xs `fuel
190+ =/ left=(unit @ud) (safe-source-spec i.xs cor seen fuel)
191+ ?~ left ~
192+ $(xs t.xs, fuel u.left)
193+::
194+++ safe-source-name
195+ |= [name=term cor=type seen=(list term) fuel=@ud]
196+ ^- (unit @ud)
197+ ?: (lien seen |=(x=term =(name x))) ~
198+ =/ arm=(unit hoon) (local-arm-source cor name)
199+ ?~ arm
200+ ?. &(|(=(name %ship) =(name %path)) (scope-safe cor name)) ~
201+ `fuel
202+ ?. ?=([%core *] cor) ~
203+ ?. (scope-safe p.cor name) ~
204+ =/ body=(unit spec) (local-mold-spec u.arm name)
205+ ?~ body ~
206+ (safe-source-spec u.body cor [name seen] fuel)
207+::
208+++ safe-source-spec
209+ |= [shape=spec cor=type seen=(list term) fuel=@ud]
210+ ^- (unit @ud)
211+ ?: =(fuel 0) ~
212+ =. fuel (dec fuel)
213+ =/ gist=(unit *) (source-gist-tail shape)
214+ ?^ gist $(shape ;;(spec u.gist))
215+ ?+ shape ~
216+ [%base *] ?:(|(?=([%atom *] p.shape) =(%flag p.shape) =(%null p.shape)) `fuel ~)
217+ [%leaf *] `fuel
218+ [%bcts *] ?@ p.shape $(shape q.shape)
219+ ~
220+ [%bccl *] (safe-source-specs p.shape cor seen fuel)
221+ [%bcwt *] (safe-source-enum p.shape ~ fuel)
222+ [%like *]
223+ ?. ?=([@ ~] p.shape) ~
224+ ?. ?=(~ q.shape) ~
225+ (safe-source-name i.p.shape cor seen fuel)
226+ [%make *]
227+ ?. ?=([%wing [@ ~]] p.shape) ~
228+ =/ n=term i.p.p.shape
229+ ?. (lien `(list term)`~[%map %set %qeu %list %unit %jar %jug] |=(x=term =(x n))) ~
230+ ?. (scope-safe cor n) ~
231+ (safe-source-specs q.shape cor seen fuel)
232+ ==
233+::
234+++ safe-source-tagged
235+ |= [cases=(list tagged-case) cor=type seen=(list term) fuel=@ud]
236+ ^- ?
237+ ?~ cases &
238+ =/ left=(unit @ud) (safe-source-spec branch.i.cases cor seen fuel)
239+ ?~ left |
240+ $(cases t.cases, fuel u.left)
241+::
242+++ tagged-union-fallback
243+ |= [module=term name=term cor=type]
244+ ^- (unit (each imported @t))
245+ ?. ?=([%core *] cor) ~
246+ =/ chapters=(map term tome) q.r.q.cor
247+ =/ other=(list [term tome]) ~(tap by chapters)
248+ ?: (lien other |=(e=[term tome] &(!=(-.e %$) (chapter-unsafe +.e name)))) ~
249+ =/ chapter=(unit tome) (~(get by chapters) %$)
250+ ?~ chapter ~
251+ =/ selected=(unit hoon) (chapter-source u.chapter name)
252+ ?~ selected ~
253+ =/ cases (tagged-source-code u.selected name)
254+ ?~ cases ~
255+ ?. (safe-source-tagged u.cases cor ~[name] 4.096) ~
256+ =/ tried=(each (list type) tang)
257+ (mule |.((turn u.cases |=(c=tagged-case (~(play ut cor) [%kttr branch.c])))))
258+ ?. ?=([%& *] tried) ~
259+ =/ projected=(each (list imported) tang)
260+ (mule |.((turn p.tried |=(t=type (walk module t catalog ~ `cor)))))
261+ ?. ?=([%& *] projected) ~
262+ ?^ (first-bads p.projected) ~
263+ ?. (all-disjoint p.projected) ~
264+ =/ xs=(list tagged-case) u.cases
265+ =/ ys=(list imported) p.projected
266+ |-
267+ ?~ xs
268+ ?^ ys ~
269+ `[%& [%fork (sort p.projected |=(pair=[imported imported] (dor -.pair +.pair)))]]
270+ ?~ ys ~
271+ ?. ?=([%cell [%atom %tas [~ @]] *] i.ys) ~
272+ ?. =(tag.i.xs u.value.head.i.ys) ~
273+ $(xs t.xs, ys t.ys)
274+::
69275:: +read-mold-in: accept the /sur core as provenance. The core must be
70276:: built against zuse or validated Ford imports, and its selected arm
71277:: must be this type. Unknown subject shapes fail closed.
@@ -81,8 +287,12 @@
81287 ?. =(typ (~(play ut cor) (ream (cat 3 '*' name))))
82288 [%| 'Hoon module provenance does not match the selected mold']
83289 =/ result (read-with module name typ [~ cor])
84− ?. ?=([%& *] result) result
85− result
290+ ?: ?=([%& *] result) result
291+ =/ fallback=(each (unit (each imported @t)) tang)
292+ (mule |.((tagged-union-fallback module name cor)))
293+ ?: ?=(%| -.fallback) result
294+ ?~ p.fallback result
295+ u.p.fallback
86296::
87297:: +read-named is the source-aware entry point for callers that have
88298:: not selected a Hoon type yet. Check the core and the local arm
@@ -111,6 +321,40 @@
111321:: A mark door's payload is [sample build-subject]. Its outer sample
112322:: face names the door sample, not the imported mark type. Collection
113323:: lookup for the sample happened against the pre-door build subject.
324+:: Fallback for a mark whose sample is exactly one arm of its only
325+:: Ford-imported /sur core. Source validation remains in read-mold-in.
326+:: Recursive results need a separate mark-origin/interface design.
327+++ mark-has-ref
328+ |= node=imported
329+ ^- ?
330+ ?- node
331+ [%ref *] &
332+ [%face *] $(node body.node)
333+ [%cell *] |($(node head.node) $(node tail.node))
334+ [%fork *] (lien cases.node |=(child=imported (mark-has-ref child)))
335+ [%apply *] (lien args.node |=(child=imported (mark-has-ref child)))
336+ * |
337+ ==
338+::
339+++ mark-union-fallback
340+ |= [raw=type context=type]
341+ ^- (unit (each imported @t))
342+ ?. ?=([%cell [%face @ [%core *]] *] context) ~
343+ ?. =(q.context -:!>(..zuse)) ~
344+ =/ alias=term p.p.context
345+ =/ core=type q.p.context
346+ ?. ?=([%hold *] raw) ~
347+ =/ name=(unit term) (hold-name q.raw)
348+ ?~ name ~
349+ =/ selected=(each type tang)
350+ (mule |.((~(play ut core) (ream (cat 3 '*' u.name)))))
351+ ?. ?=([%& *] selected) ~
352+ ?. =(p.selected raw) ~
353+ =/ result=(each imported @t) (read-mold-in alias u.name raw core)
354+ ?. ?=([%& [%fork *]] result) ~
355+ ?: (mark-has-ref p.result) ~
356+ `result
357+::
114358++ read-mark
115359 |= [name=term cor=type]
116360 ^- (each imported @t)
@@ -121,8 +365,48 @@
121365 =/ sample=type p.p.cor
122366 =/ raw=type ?:(?=([%face *] sample) q.sample sample)
123367 =/ result (read-with name name raw [~ q.p.cor])
124− ?. ?=([%& *] result) result
125− result
368+ ?: ?=([%& *] result) result
369+ =/ fallback=(each (unit (each imported @t)) tang)
370+ (mule |.((mark-union-fallback raw q.p.cor)))
371+ ?: ?=(%| -.fallback) result
372+ ?~ p.fallback result
373+ u.p.fallback
374+::
375+++ read-named-diagnostic
376+ |= [module=term name=term cor=type]
377+ ^- import-diagnostic
378+ =/ result=(each imported @t) (read-named module name cor)
379+ ?: ?=(%& -.result) [%ok p.result]
380+ ?. ?=([%core *] cor) [%unsupported p.result]
381+ ?: =(cor -:!>(..zuse)) [%unsupported p.result]
382+ ?. (scope-safe cor %$) [%unsupported p.result]
383+ =/ chapters=(map term tome) q.r.q.cor
384+ ?. (lien ~(tap by chapters) |=(entry=[term tome] =((chapter-has +.entry name) [~ &])))
385+ [%unsupported p.result]
386+ =/ selected=(each type tang) (mule |.((~(play ut cor) (ream (cat 3 '*' name)))))
387+ ?. ?=(%& -.selected) [%unsupported p.result]
388+ =/ again=(each imported tang) (mule |.((walk module p.selected catalog ~ [~ cor])))
389+ ?. ?=(%& -.again) [%unsupported p.result]
390+ =/ evidence=(unit import-diagnostic) (first-invalid p.again)
391+ ?~ evidence [%unsupported p.result]
392+ u.evidence
393+::
394+++ read-mark-diagnostic
395+ |= [name=term cor=type]
396+ ^- import-diagnostic
397+ =/ result=(each imported @t) (read-mark name cor)
398+ ?: ?=(%& -.result) [%ok p.result]
399+ ?. ?=([%core *] cor) [%unsupported p.result]
400+ ?. ?=([%cell *] p.cor) [%unsupported p.result]
401+ ?. =(p.cor q.q.cor) [%unsupported p.result]
402+ ?. (scope-safe q.p.cor %$) [%unsupported p.result]
403+ =/ sample=type p.p.cor
404+ =/ raw=type ?:(?=([%face *] sample) q.sample sample)
405+ =/ again=(each imported tang) (mule |.((walk name raw catalog ~ [~ q.p.cor])))
406+ ?. ?=(%& -.again) [%unsupported p.result]
407+ =/ evidence=(unit import-diagnostic) (first-invalid p.again)
408+ ?~ evidence [%unsupported p.result]
409+ u.evidence
126410::
127411++ read-with
128412 |= [module=term name=term typ=type context=(unit type)]
@@ -382,6 +666,29 @@
382666 ?: ?=([%bckt ^ ^] h) &
383667 |($(h -.h) $(h +.h))
384668::
669+:: The Grammar's disjointness rule applies to imported $% and $? too;
670+:: @iko confirmed the rule for imported unions on 2026-10-30.
671+++ has-spec-general-union
672+ |= h=*
673+ ^- ?
674+ ?@ h |
675+ ?: ?=([%bcwt [^ [^ *]]] h) &
676+ ?: ?=([%bccn [^ [^ *]]] h) &
677+ |($(h -.h) $(h +.h))
678+::
679+++ has-fits-union
680+ |= h=*
681+ ^- ?
682+ ?@ h |
683+ ?: ?=([%wtcl [%fits *] * *] h) &
684+ |($(h -.h) $(h +.h))
685+::
686+++ fits-union-at
687+ |= [h=hoon axis=@ud]
688+ ^- ?
689+ ?. ?=([%fits *] h) |
690+ |(=(q.h ~[[%.y axis]]) =(q.h ~[[%.y (mul 2 axis)]]))
691+::
385692++ has-cell-union
386693 |= h=hoon
387694 ^- ?
@@ -402,6 +709,7 @@
402709 |($(h -.h, axis (mul 2 axis)) $(h +.h, axis (add 1 (mul 2 axis))))
403710 ?+ h (has-cell-union-any h)
404711 [%note *] $(h q.h)
712+ [%dbug *] $(h q.h)
405713 [%ktts *] $(h q.h)
406714 [%wtcl *]
407715 ?: =(p.h [%dtwt [%$ (mul 2 axis)]]) &
@@ -428,6 +736,112 @@
428736 [%| *] ~
429737 ==
430738::
739+:: A static branch contains atom molds, exact tag constants and cells.
740+:: A tag shape must compare the current axis to the same atom it returns.
741+++ fixed-cell-mold
742+ |= [h=hoon axis=@ud]
743+ ^- ?
744+ ?^ -.h
745+ &($(h -.h, axis (mul 2 axis)) $(h +.h, axis (add 1 (mul 2 axis))))
746+ ?+ h |
747+ [%note *] $(h q.h)
748+ [%dbug *] $(h q.h)
749+ [%ktts *] $(h q.h)
750+ [%ktls *] ?=([%sand *] p.h)
751+ [%cncl *]
752+ ?: =(h [%cncl [%tsgr [%wing ~[[%.y 7]]] [%wing ~[%path]]] ~[[%$ axis]]]) &
753+ (static-collection h)
754+ [%wtcl *]
755+ ?. (fits-union-at p.h axis) |
756+ &($(h q.h) $(h r.h))
757+ [%wtgr *]
758+ ?: =(h [%wtgr [%dtts [%bust %noun] [%$ axis]] [%rock %n 0]]) &
759+ ?. ?=([%dtts [%$ *] [%rock %$ *]] p.h) |
760+ ?. ?=([%rock %tas *] q.h) |
761+ ?^ q.q.h |
762+ &(=(p.p.p.h axis) =(q.q.p.h q.q.h))
763+ ==
764+::
765+:: Return two source records with a single $^ replaced by each branch.
766+++ split-cell-record
767+ |= [h=hoon axis=@ud]
768+ ^- (unit [one=hoon two=hoon])
769+ ?^ -.h
770+ =/ left $(h -.h, axis (mul 2 axis))
771+ =/ right $(h +.h, axis (add 1 (mul 2 axis)))
772+ ?^ left
773+ ?^ right ~
774+ ?. (fixed-cell-mold +.h (add 1 (mul 2 axis))) ~
775+ [~ [[one.u.left +.h] [two.u.left +.h]]]
776+ ?~ right ~
777+ ?. (fixed-cell-mold -.h (mul 2 axis)) ~
778+ [~ [[-.h one.u.right] [-.h two.u.right]]]
779+ ?+ h ~
780+ [%note *]
781+ =/ out $(h q.h)
782+ ?~ out ~
783+ [~ [h(q one.u.out) h(q two.u.out)]]
784+ [%dbug *]
785+ =/ out $(h q.h)
786+ ?~ out ~
787+ [~ [h(q one.u.out) h(q two.u.out)]]
788+ [%ktts *]
789+ =/ out $(h q.h)
790+ ?~ out ~
791+ [~ [h(q one.u.out) h(q two.u.out)]]
792+ [%wtcl *]
793+ ?. |(=(p.h [%dtwt [%$ (mul 2 axis)]]) (fits-union-at p.h axis)) ~
794+ ?. &((fixed-cell-mold q.h axis) (fixed-cell-mold r.h axis)) ~
795+ [~ [q.h r.h]]
796+ ==
797+::
798+:: Reassemble a split source record. Non-union fields must have remained
799+:: unchanged; the replaced field must have provably disjoint branches.
800+++ merge-cell-record
801+ |= [h=hoon axis=@ud a=imported b=imported]
802+ ^- (each imported @t)
803+ ?^ -.h
804+ ?. &(?=([%cell *] a) ?=([%cell *] b))
805+ [%| 'a nested Hoon $^ union needs a source-level disjointness check']
806+ =/ left $(h -.h, axis (mul 2 axis), a head.a, b head.b)
807+ ?. ?=([%& *] left) left
808+ =/ right $(h +.h, axis (add 1 (mul 2 axis)), a tail.a, b tail.b)
809+ ?. ?=([%& *] right) right
810+ [%& [%cell p.left p.right]]
811+ ?+ h
812+ ?: =(a b) [%& a]
813+ [%| 'a nested Hoon $^ union needs a source-level disjointness check']
814+ [%note *] $(h q.h)
815+ [%dbug *] $(h q.h)
816+ [%ktts *]
817+ ?. &(?=([%face *] a) ?=([%face *] b))
818+ [%| 'a nested Hoon $^ union needs a source-level disjointness check']
819+ ?. &(=(p.h name.a) =(p.h name.b))
820+ [%| 'a nested Hoon $^ union needs a source-level disjointness check']
821+ =/ child $(h q.h, a body.a, b body.b)
822+ ?. ?=([%& *] child) child
823+ [%& [%face name.a p.child]]
824+ [%wtcl *]
825+ ?. |(=(p.h [%dtwt [%$ (mul 2 axis)]]) (fits-union-at p.h axis))
826+ [%| 'a Hoon union needs a source-level disjointness check']
827+ ?. (disjoint a b)
828+ ?: ?=([%fits *] p.h) [%| 'Hoon union disjointness could not be verified']
829+ [%| 'Hoon $^ union disjointness could not be verified']
830+ [%& [%fork (sort (weld (union-cases a) (union-cases b)) |=(pair=[imported imported] (dor -.pair +.pair)))]]
831+ ==
832+++ union-cases
833+ |= a=imported
834+ ^- (list imported)
835+ ?. ?=([%fork *] a) ~[a]
836+ (zing (turn cases.a |=(item=imported (union-cases item))))
837+::
838+++ all-disjoint
839+ |= cases=(list imported)
840+ ^- ?
841+ ?~ cases &
842+ ?. (levy t.cases |=(item=imported (disjoint i.cases item))) |
843+ $(cases t.cases)
844+::
431845++ disjoint
432846 |= [a=imported b=imported]
433847 ^- ?
@@ -487,6 +901,32 @@
487901 ?. (arm-map-valid +.chapter) ~
488902 [~ (arm-map-has +.chapter target)]
489903::
904+:: Return a unique source arm from either validated tome wrapper. Walk
905+:: the noun map rather than relying on fields that differ on Clay.
906+++ arm-map-sources
907+ |= [m=* target=term]
908+ ^- (list hoon)
909+ ?@ m ~
910+ =/ kv=* -.m
911+ =/ children=* +.m
912+ =/ found=(list hoon) ?:(=(-.kv target) ~[;;(hoon +.kv)] ~)
913+ (weld found (weld $(m -.children) $(m +.children)))
914+::
915+++ chapter-source
916+ |= [chapter=* target=term]
917+ ^- (unit hoon)
918+ ?: (arm-map-valid chapter) (unique-arm-source chapter target)
919+ ?@ chapter ~
920+ ?. (arm-map-valid +.chapter) ~
921+ (unique-arm-source +.chapter target)
922+::
923+++ unique-arm-source
924+ |= [arms=* target=term]
925+ ^- (unit hoon)
926+ =/ sources=(list hoon) (arm-map-sources arms target)
927+ ?. ?=([* ~] sources) ~
928+ `i.sources
929+::
490930++ chapter-unsafe
491931 |= [chapter=* target=term]
492932 ^- ?
@@ -632,6 +1072,123 @@
6321072 ?. (levy t.found same) ~
6331073 [~ choice]
6341074::
1075+::
1076+:: A collection case is independent of the subject only when its
1077+:: original spec uses literal atoms, tags and finite record structure.
1078+++ static-union-spec
1079+ |= s=spec
1080+ ^- ?
1081+ ?+ s |
1082+ [%base *] ?=([%atom *] p.s)
1083+ [%leaf *] &
1084+ [%bcts *] ?@ p.s $(s q.s)
1085+ |
1086+ [%bccl *] (static-union-specs p.s)
1087+ ==
1088+::
1089+++ static-union-specs
1090+ |= parts=(list spec)
1091+ ^- ?
1092+ ?~ parts &
1093+ &((static-union-spec i.parts) $(parts t.parts))
1094+::
1095+++ union-spec-parts
1096+ |= s=spec
1097+ ^- (unit (list spec))
1098+ ?+ s ~
1099+ [%bcwt *] [~ p.s]
1100+ [%bccn *] [~ p.s]
1101+ [%bckt *] [~ ~[p.s q.s]]
1102+ ==
1103+::
1104+:: Select one direct union argument, replacing exactly that spec with
1105+:: @t. The other arguments must be static and cannot contain unions.
1106+++ safe-union-parts
1107+ |= cases=(list spec)
1108+ ^- ?
1109+ ?~ cases |
1110+ ?~ t.cases |
1111+ =/ rest=(list spec) t.cases
1112+ &((static-union-spec i.cases) (levy rest |=(part=spec (static-union-spec part))))
1113+::
1114+++ split-union-arguments
1115+ |= [args=(list hoon) index=@ud]
1116+ ^- (unit [args=(list hoon) cases=(list spec) index=@ud])
1117+ ?~ args ~
1118+ ?. ?=([%ktcl *] i.args) ~
1119+ =/ cases (union-spec-parts p.i.args)
1120+ ?^ cases
1121+ ?. (safe-union-parts u.cases) ~
1122+ ?. (static-arguments t.args) ~
1123+ [~ [[[%ktcl [%base [%atom %t]]] t.args] u.cases index]]
1124+ ?. (static-spec p.i.args) ~
1125+ =/ rest $(args t.args, index +(index))
1126+ ?~ rest ~
1127+ [~ [[i.args args.u.rest] cases.u.rest index.u.rest]]
1128+::
1129+++ replace-union-argument
1130+ |= [args=(list imported) index=@ud union=imported]
1131+ ^- (unit (list imported))
1132+ ?~ args ~
1133+ ?: =(index 0)
1134+ ?. =([%atom %t ~] i.args) ~
1135+ [~ [union t.args]]
1136+ =/ rest $(args t.args, index (dec index))
1137+ ?~ rest ~
1138+ [~ [i.args u.rest]]
1139+::
1140+:: Accept only the compiler's direct collection call wrapper.
1141+++ direct-collection-source
1142+ |= [body=hoon original=hoon]
1143+ ^- ?
1144+ ?. ?=([%cncl [%tsgr * [%cncl *]] *] body) |
1145+ ?. =(p.p.body [%wing ~[[%.y 7]]]) |
1146+ ?. =(q.body ~[[%$ 6]]) |
1147+ ?. ?=([%tsls * *] original) |
1148+ =(q.original [%tsls [%dtts [%$ 14] [%$ 2]] [%$ 6]])
1149+::
1150+++ collection-union
1151+ |= [typ=type module=term sig=signatures seen=visiting context=(unit type)]
1152+ ^- imported
1153+ ?. ?=([%hold *] typ) [%bad 'a Hoon union needs a source-level disjointness check']
1154+ =/ is-cell=? (has-spec-cell-union q.typ)
1155+ =/ unsupported=@t
1156+ ?: is-cell 'a Hoon $^ union needs a source-level disjointness check'
1157+ 'a Hoon union needs a source-level disjointness check'
1158+ =/ original=hoon q.typ
1159+ ?. ?=([%tsls [%note * *] *] original) [%bad unsupported]
1160+ =/ body=hoon q.p.original
1161+ =/ alias (source-alias body)
1162+ ?~ alias [%bad unsupported]
1163+ ?. (alias-safe context u.alias) [%bad 'Hoon collection provenance is unavailable or shadowed']
1164+ =/ names=(list term) ~[%map %set %qeu %list %unit %jar %jug]
1165+ ?: (lien names |=(n=term &((source-uses body n) !(alias-safe context n))))
1166+ [%bad 'Hoon collection provenance is unavailable or shadowed']
1167+ ?. (direct-collection-source body original) [%bad unsupported]
1168+ ?> ?=([%cncl [%tsgr * [%cncl *]] *] body)
1169+ =/ split (split-union-arguments q.q.p.body 0)
1170+ ?~ split [%bad unsupported]
1171+ =/ tried=(each (list type) tang)
1172+ (mule |.((turn cases.u.split |=(s=spec (~(play ut p.typ) [%kttr s])))))
1173+ ?. ?=([%& *] tried) [%bad unsupported]
1174+ =/ cases=(list imported)
1175+ (turn p.tried |=(t=type (walk module t sig seen context)))
1176+ =/ err (first-bads cases)
1177+ ?^ err [%bad u.err]
1178+ ?. (all-disjoint cases)
1179+ [%bad ?:(is-cell 'Hoon $^ union disjointness could not be verified' 'Hoon union disjointness could not be verified')]
1180+ =/ rewritten=hoon original(q.p body(q.q.p args.u.split))
1181+ =/ attempt=(each type tang) (mule |.((~(play ut p.typ) rewritten)))
1182+ ?. ?=([%& *] attempt) [%bad unsupported]
1183+ =/ out=imported (walk module p.attempt sig seen context)
1184+ ?. ?=([%apply *] out) [%bad unsupported]
1185+ ?. =(name.out u.alias) [%bad unsupported]
1186+ =/ replacement=imported
1187+ [%fork (sort cases |=(pair=[imported imported] (dor -.pair +.pair)))]
1188+ =/ args (replace-union-argument args.out index.u.split replacement)
1189+ ?~ args [%bad unsupported]
1190+ [%apply name.out u.args]
1191+::
6351192++ walk
6361193 |= [module=term typ=type sig=signatures seen=visiting context=(unit type)]
6371194 ^- imported
@@ -640,21 +1197,25 @@
6401197 %void [%void ~]
6411198 [%atom *]
6421199 ?: |(=('s' (cut 3 [0 1] p.typ)) =('r' (cut 3 [0 1] p.typ)))
643− [%bad 'signed and float auras cannot be imported']
1200+ [%invalid %aura 'signed and float auras cannot be imported']
6441201 [%atom p.typ q.typ]
6451202 [%cell *] [%cell $(typ p.typ) $(typ q.typ)]
646− [%core *] [%bad 'cores and gates cannot be imported']
1203+ [%core *] [%invalid %core 'cores and gates cannot be imported']
6471204 [%face *]
6481205 ?@ p.typ [%face p.typ $(typ q.typ)]
6491206 [%bad 'a complex Hoon face needs translation']
6501207 [%fork *]
6511208 =/ cases=(list imported)
6521209 (turn ~(tap in:..zuse p.typ) |=(t=type ^$(typ t)))
1210+ =/ err (first-bads cases)
1211+ ?^ err [%bad u.err]
1212+ ?. (all-disjoint cases) [%bad 'Hoon union disjointness could not be verified']
6531213 [%fork (sort cases |=(pair=[imported imported] (dor -.pair +.pair)))]
6541214 [%hint *] $(typ q.typ)
6551215 [%hold *]
656− ?: &(?=([%tsls [%note * *] *] q.typ) (has-spec-cell-union q.typ))
657− [%bad 'a Hoon $^ union needs a source-level disjointness check']
1216+ ?: &(?=([%tsls [%note * *] *] q.typ) |((has-spec-cell-union q.typ) (has-spec-general-union q.typ)))
1217+ =/ nm (hold-name q.typ)
1218+ (collection-union typ module sig [[typ nm] seen] context)
6581219 =/ named=(unit term) (match-signature q.typ sig)
6591220 ?^ named
6601221 =/ name u.named
@@ -675,7 +1236,7 @@
6751236 ?~ origin [%bad 'a recursive Hoon mold needs unambiguous source provenance']
6761237 [%ref u.origin u.u.prior]
6771238 =/ nm (hold-name q.typ)
678− ?: =(nm [~ %vase]) [%bad 'vases cannot be imported']
1239+ ?: =(nm [~ %vase]) [%bad 'a Hoon type named vase needs source provenance']
6791240 ?: &((source-uses q.typ %jar) !(alias-safe context %jar))
6801241 [%bad 'Hoon collection provenance is unavailable or shadowed']
6811242 ?: &((source-uses q.typ %jug) !(alias-safe context %jug))
@@ -719,9 +1280,33 @@
7191280 ?^ err [%bad u.err]
7201281 ?: (disjoint first second)
7211282 [%fork (sort ~[first second] |=(pair=[imported imported] (dor -.pair +.pair)))]
722− [%bad 'a Hoon $^ union has overlapping cases']
723− ?: (has-cell-union q.typ)
724− [%bad 'a Hoon $^ union needs a source-level disjointness check']
1283+ [%bad 'Hoon $^ union disjointness could not be verified']
1284+ ?: |((has-cell-union q.typ) (has-fits-union q.typ))
1285+ =/ cannot=@t
1286+ ?: (has-fits-union q.typ) 'a Hoon union needs a source-level disjointness check'
1287+ 'a Hoon $^ union needs a source-level disjointness check'
1288+ =/ checked-names=(list term) ~[%map %set %qeu %list %unit %jar %jug %path]
1289+ ?: (lien checked-names |=(n=term &((source-uses q.typ n) !(alias-safe context n))))
1290+ [%bad 'Hoon collection provenance is unavailable or shadowed']
1291+ ?. ?=([%tsls [%note * *] *] q.typ)
1292+ [%bad cannot]
1293+ =/ original=hoon q.typ
1294+ ?> ?=([%tsls [%note * *] *] original)
1295+ =/ body=hoon q.p.original
1296+ =/ split (split-cell-record body 6)
1297+ ?~ split [%bad cannot]
1298+ =/ try=(each [type type] tang)
1299+ (mule |.([(~(play ut p.typ) original(q.p one.u.split)) (~(play ut p.typ) original(q.p two.u.split))]))
1300+ ?. ?=([%& *] try) [%bad cannot]
1301+ =/ first $(typ -.p.try, seen [[typ nm] seen])
1302+ =/ second $(typ +.p.try, seen [[typ nm] seen])
1303+ =/ err (first-bads ~[first second])
1304+ ?^ err [%bad u.err]
1305+ =/ combined (merge-cell-record body 6 first second)
1306+ ?- combined
1307+ [%& *] p.combined
1308+ [%| *] [%bad p.combined]
1309+ ==
7251310 =/ alias (hold-alias q.typ)
7261311 =/ hidden (has-hidden-alias q.typ)
7271312 =/ body $(typ ~(repo ut typ), seen [[typ nm] seen])
@@ -752,6 +1337,7 @@
7521337 [%atom *] ~
7531338 [%ref *] ~
7541339 [%bad *] [~ reason.out]
1340+ [%invalid *] [~ reason.out]
7551341 [%face *] $(out body.out)
7561342 [%cell *]
7571343 =/ err $(out head.out)
@@ -768,6 +1354,34 @@
7681354 =/ err (first-bad i.xs)
7691355 ?~ err $(xs t.xs)
7701356 err
1357+::
1358+++ first-invalid
1359+ |= out=imported
1360+ ^- (unit import-diagnostic)
1361+ ?- out
1362+ [%noun *] ~
1363+ [%void *] ~
1364+ [%atom *] ~
1365+ [%ref *] ~
1366+ [%bad *] `[%unsupported reason.out]
1367+ [%invalid *] `[%invalid code.out reason.out]
1368+ [%face *] $(out body.out)
1369+ [%cell *]
1370+ =/ first $(out head.out)
1371+ ?~ first $(out tail.out)
1372+ first
1373+ [%fork *] (first-invalids cases.out)
1374+ [%apply *] (first-invalids args.out)
1375+ ==
1376+::
1377+++ first-invalids
1378+ |= xs=(list imported)
1379+ ^- (unit import-diagnostic)
1380+ ?~ xs ~
1381+ =/ first (first-invalid i.xs)
1382+ ?~ first $(xs t.xs)
1383+ first
1384+::
7711385:: +fixture-test: shared golden expectations for eval and the ship.
7721386:: A synthetic hold whose first $^ branch cannot be evaluated. It tests
7731387:: that a failed branch probe is reported rather than crashing the host.
@@ -863,7 +1477,7 @@
8631477 [%fork ~[[%cell [%face %x [%atom %ud ~]] [%face %y [%atom %ud ~]]] [%atom %ud ~]]]
8641478 =/ errors ?: =((sample %valid-cell) [%& expect-valid]) errors
8651479 ['disjoint cell union' errors]
866− =/ errors ?: =((sample %invalid-cell) [%| 'a Hoon $^ union has overlapping cases']) errors
1480+ =/ errors ?: =((sample %invalid-cell) [%| 'Hoon $^ union disjointness could not be verified']) errors
8671481 ['overlapping cell union is rejected' errors]
8681482 =/ errors ?: =((shad %mn) [%| 'Hoon collection provenance is unavailable or shadowed']) errors
8691483 ['local mop shadow in a field is rejected' errors]
@@ -907,6 +1521,7 @@
9071521 [%apply *] "({(trip name.out)} {(show-imports args.out)})"
9081522 [%ref *] "{(trip name.out)}.{(trip module.out)}"
9091523 [%bad *] "error: {(trip reason.out)}"
1524+ [%invalid *] "error: {(trip reason.out)}"
9101525 ==
9111526::
9121527++ show-imports
@@ -924,6 +1539,79 @@
9241539 [%| *] "error: {(trip p.result)}"
9251540 ==
9261541::
1542+++ show-import-diagnostic
1543+ |= result=import-diagnostic
1544+ ^- tape
1545+ ?- result
1546+ [%ok *] (show-import value.result)
1547+ [%invalid *] "invalid/{(trip code.result)}: {(trip message.result)}"
1548+ [%unsupported *] "unsupported: {(trip message.result)}"
1549+ ==
1550+::
1551+:: Clay includes debug spans around source nodes. Reproduce that
1552+:: shape without Clay so the same regression runs under eval and -test.
1553+++ decorate-union-source
1554+ |= h=hoon
1555+ ^- hoon
1556+ =/ at=spot [/tests/importer/synthetic/hoon [[1 1] [1 2]]]
1557+ ?^ -.h [%dbug at [$(h -.h) $(h +.h)]]
1558+ ?+ h [%dbug at h]
1559+ [%note *] [%dbug at h(q $(h q.h))]
1560+ [%ktts *] [%dbug at h(q $(h q.h))]
1561+ [%wtcl *] [%dbug at h(q $(h q.h), r $(h r.h))]
1562+ ==
1563+::
1564+++ debug-union-fixture
1565+ |= [cor=type name=term]
1566+ ^- (each imported @t)
1567+ =/ typ=type (~(play ut cor) (ream (cat 3 '*' name)))
1568+ ?. ?=([%hold *] typ) [%| 'synthetic union is not a hold']
1569+ =/ original=hoon q.typ
1570+ ?. ?=([%tsls [%note * *] *] original) [%| 'synthetic union source is unavailable']
1571+ =/ source=hoon original(q.p (decorate-union-source q.p.original))
1572+ (read-mold %small name typ(q source))
1573+::
1574+:: Test debug metadata at the spec boundary without assuming that the
1575+:: eval version of Hoon's spec mold itself includes Clay's %dbug tag.
1576+++ debug-spec-fixture
1577+ ^- tape
1578+ =/ location=* [/tests/importer/synthetic/hoon [[1 1] [1 2]]]
1579+ =/ wrapped=* [%dbug location [%leaf %tas %x]]
1580+ =/ got=(unit *) (source-gist-tail wrapped)
1581+ ?~ got "debug wrapper missing"
1582+ =/ leaf=(each spec tang) (mule |.(;;(spec u.got)))
1583+ ?. ?=([%& [%leaf %tas %x]] leaf) "debug leaf not recovered"
1584+ =/ branch=spec [%bccl ~[p.leaf [%base [%atom %t]]]]
1585+ ?^ (tagged-cases ~[branch branch] ~) "duplicate tags accepted"
1586+ =/ broken=(unit *) (source-gist-tail [%dbug location 42])
1587+ ?~ broken "debug wrapper missing"
1588+ =/ invalid=(each spec tang) (mule |.(;;(spec u.broken)))
1589+ ?: ?=(%& -.invalid) "malformed spec accepted"
1590+ "valid wrapper; duplicate and malformed rejected"
1591+::
1592+:: Synthetic nodes test each part of the direct collection-call proof.
1593+++ collection-wrapper-fixture
1594+ ^- tape
1595+ =/ call=hoon [%cncl [%tsgr [%wing ~[[%.y 7]]] [%cncl [%wing ~[%list]] ~]] ~[[%$ 6]]]
1596+ =/ subject=hoon [%cncl [%tsgr [%wing ~[[%.y 8]]] [%cncl [%wing ~[%list]] ~]] ~[[%$ 6]]]
1597+ =/ sample=hoon [%cncl [%tsgr [%wing ~[[%.y 7]]] [%cncl [%wing ~[%list]] ~]] ~[[%$ 2]]]
1598+ =/ good=hoon [%tsls [%note [%made %x ~] call] [%tsls [%dtts [%$ 14] [%$ 2]] [%$ 6]]]
1599+ =/ tail=hoon [%tsls [%note [%made %x ~] call] [%$ 6]]
1600+ =/ args=(list [hoon hoon]) ~[[call good] [subject good] [sample good] [call tail]]
1601+ =/ flags=(list ?) (turn args |=(pair=[hoon hoon] (direct-collection-source -.pair +.pair)))
1602+ ?: =(flags ~[& | | |]) "valid; forged subject, sample and tail rejected"
1603+ "wrapper guard failed"
1604+::
1605+++ overlap-fork-fixture
1606+ ^- type
1607+ =/ nodes=(list type) ~[[%atom %ud ~] [%atom %t ~]]
1608+ [%fork (silt nodes)]
1609+::
1610+++ invalid-fork-fixture
1611+ ^- type
1612+ =/ nodes=(list type) ~[[%atom %ud ~] [%atom %sd ~]]
1613+ [%fork (silt nodes)]
1614+::
9271615++ fixture-output
9281616 |= [small=@t epic=@t presence=@t docs=@t shadow=@t shadow-static=@t ford=@t mark=@t mark-rec=@t mark-gate=@t mark-basic=@t origin-trans=@t origin-first=@t origin-other=@t]
9291617 ^- wain
@@ -946,6 +1634,23 @@
9461634 =/ mark-rec-core=type -:(ride fp mark-rec)
9471635 =/ mark-gate-core=type -:(ride -:!>(..zuse) mark-gate)
9481636 =/ mark-basic-core=type -:(ride -:!>(..zuse) mark-basic)
1637+ =/ make-mark
1638+ |= [field=@t scope=type]
1639+ ^- type
1640+ -:(ride scope (crip "|_ a={(trip field)}\0a++ grab |% ++ noun a --\0a++ grow |% ++ noun a --\0a++ grad %noun\0a--\0a"))
1641+ =/ mark-union-core=type (make-mark 'mark-flag-valid:small' fp)
1642+ =/ mark-overlap-core=type (make-mark 'mark-flag-overlap:small' fp)
1643+ =/ mark-hidden-core=type (make-mark 'mark-flag-hidden:small' fp)
1644+ =/ mark-signed-core=type (make-mark 'signed:small' fp)
1645+ =/ mark-callable-core=type (make-mark 'gate-test:small' fp)
1646+ =/ extra-subject=type [%cell [%face %other other] fp]
1647+ =/ mark-extra-core=type (make-mark 'mark-flag-valid:small' extra-subject)
1648+ =/ other-hold=type (~(play ut other) (ream '*chain'))
1649+ =/ recursive-hold=type (~(play ut sc) (ream '*chain'))
1650+ =/ fake-vase=type -:(ride -:!>(..zuse) '|%\0a+$ vase @ud\0a--\0a')
1651+ =/ spoof=(unit import-diagnostic)
1652+ (first-invalid [%bad 'signed and float auras cannot be imported'])
1653+ ?> ?=(^ spoof)
9491654 =/ mark-shadow-core=type -:(ride sp mark-basic)
9501655 =/ tshp=type [%cell [%face %intermediate shc] -:!>(..zuse)]
9511656 =/ tshc=type -:(ride tshp only-list)
@@ -956,6 +1661,13 @@
9561661 =/ distinct=type -:(ride distinct-parent origin-first)
9571662 =/ trans-amb-parent=type [%cell [%face %intermediate fc] [%cell [%face %second sc] -:!>(..zuse)]]
9581663 =/ trans-amb=type -:(ride trans-amb-parent origin-trans)
1664+ =/ tag-child=@t
1665+ '|%\0a+$ tag-invalid-cell @t\0a+$ choice $%([%ok a=tag-invalid-cell] [%err a=@ud])\0a--\0a'
1666+ =/ tag-collision=type -:(ride [%cell [%face %base sc] -:!>(..zuse)] tag-child)
1667+ =/ tag-clean=type -:(ride [%cell [%face %base other] -:!>(..zuse)] tag-child)
1668+ =/ tag-zuse=@t
1669+ '|%\0a+$ ship @t\0a+$ path @ud\0a+$ choice $%([%ok who=ship] [%err where=path])\0a--\0a'
1670+ =/ tag-zuse-core=type -:(ride -:!>(..zuse) tag-zuse)
9591671 =/ sample
9601672 |= name=term
9611673 (read-mold-in %small name (~(play ut sc) (ream (cat 3 '*' name))) sc)
@@ -993,6 +1705,15 @@
9931705 (crip "nested-static-mop: {(show-result (sample %nested-static-mop))}")
9941706 (crip "collection-siblings: {(show-result (sample %collection-siblings))}")
9951707 (crip "dynamic-sibling-mop: {(show-result (sample %dynamic-sibling-mop))}")
1708+ (crip "mark-flag-source: {(show-result (read-named %small %mark-flag-valid sc))}")
1709+ (crip "mark-flag-union: {(show-result (read-mark %flag-union mark-union-core))}")
1710+ (crip "mark-flag-overlap: {(show-result (read-mark %flag-overlap mark-overlap-core))}")
1711+ (crip "mark-flag-hidden: {(show-result (read-mark %flag-hidden mark-hidden-core))}")
1712+ (crip "mark-flag-signed: {(show-result (read-mark %flag-signed mark-signed-core))}")
1713+ (crip "mark-flag-callable: {(show-result (read-mark %flag-callable mark-callable-core))}")
1714+ (crip "mark-flag-extra: {(show-result (read-mark %flag-extra mark-extra-core))}")
1715+ (crip "mark-flag-other-hold: {?~((mark-union-fallback other-hold fp) "unsupported" "BAD")}")
1716+ (crip "mark-flag-recursive-fallback: {?~((mark-union-fallback recursive-hold fp) "unsupported" "BAD")}")
9961717 (crip "mark-record: {(show-result (read-mark %todo-item mark-core))}")
9971718 (crip "mark-recursive: {(show-result (read-mark %recursive mark-rec-core))}")
9981719 (crip "mark-gate: {(show-result (read-mark %bad mark-gate-core))}")
@@ -1022,6 +1743,38 @@
10221743 (crip "gate: {(show-result (sample %gate-test))}")
10231744 (crip "vase: {(show-result vase)}")
10241745 (crip "failed-branch: {(show-result (read-mold %external %bad bad-branch-fixture))}")
1746+ (crip "debug-spec: {debug-spec-fixture}")
1747+ (crip "debug-union: {(show-result (debug-union-fixture sc %action))}")
1748+ (crip "debug-union-overlap: {(show-result (debug-union-fixture sc %explicit-wut-overlap))}")
1749+ (crip "debug-nested-cell: {(show-result (debug-union-fixture sc %nested-valid-cell))}")
1750+ (crip "debug-nested-cell-overlap: {(show-result (debug-union-fixture sc %nested-invalid-cell))}")
1751+ (crip "explicit-graph: {(show-result (read-mold %raw %raw overlap-fork-fixture))}")
1752+ (crip "explicit-graph-unsupported: {(show-result (read-mold %raw %raw invalid-fork-fixture))}")
1753+ (crip "explicit-wut-safe: {(show-result (sample %explicit-wut-safe))}")
1754+ (crip "explicit-percent-overlap: {(show-result (sample %explicit-percent-overlap))}")
1755+ (crip "explicit-wut-overlap: {(show-result (sample %explicit-wut-overlap))}")
1756+ (crip "explicit-collapsed: {(show-result (sample %explicit-collapsed))}")
1757+ (crip "explicit-subsumed: {(show-result (sample %explicit-subsumed))}")
1758+ (crip "explicit-three: {(show-result (sample %explicit-three))}")
1759+ (crip "explicit-unknown: {(show-result (sample %explicit-unknown))}")
1760+ (crip "explicit-nested: {(show-result (sample %explicit-nested))}")
1761+ (crip "collection-union-wrapper: {collection-wrapper-fixture}")
1762+ (crip "collection-union-list: {(show-result (sample %collection-union-list))}")
1763+ (crip "collection-union-set: {(show-result (sample %collection-union-set))}")
1764+ (crip "collection-union-map-key: {(show-result (sample %collection-union-map-key))}")
1765+ (crip "collection-union-map-value: {(show-result (sample %collection-union-map-value))}")
1766+ (crip "collection-union-unit: {(show-result (sample %collection-union-unit))}")
1767+ (crip "collection-union-collapsed: {(show-result (sample %collection-union-collapsed))}")
1768+ (crip "collection-union-multiple: {(show-result (sample %collection-union-multiple))}")
1769+ (crip "collection-union-nested: {(show-result (sample %collection-union-nested))}")
1770+ (crip "collection-union-dependent: {(show-result (sample %collection-union-dependent))}")
1771+ (crip "collection-union-shadow: {(show-result (read-named %shadow %collection-union-shadow xc))}")
1772+ (crip "explicit-list: {(show-result (sample %explicit-list))}")
1773+ (crip "explicit-set: {(show-result (sample %explicit-set))}")
1774+ (crip "explicit-faces: {(show-result (sample %explicit-faces))}")
1775+ (crip "explicit-alias: {(show-result (sample %explicit-alias))}")
1776+ (crip "explicit-ford: {(show-result (read-named %outer %bad-union trans))}")
1777+ (crip "explicit-shadow-path: {(show-result (read-named %shadow %path-shadow xc))}")
10251778 (crip "list-bckt-field: {(show-result (sample %list-bckt-field))}")
10261779 (crip "list-noun-overlap: {(show-result (sample %list-noun-overlap))}")
10271780 (crip "list-null-overlap: {(show-result (sample %list-null-overlap))}")
@@ -1032,6 +1785,26 @@
10321785 (crip "set-direct-invalid-cell: {(show-result (sample %set-direct-invalid-cell))}")
10331786 (crip "map-key-invalid-cell: {(show-result (sample %map-key-invalid-cell))}")
10341787 (crip "nested-atom-cell: {(show-result (sample %nested-atom-cell))}")
1788+ (crip "nested-tags: {(show-result (sample %nested-tags))}")
1789+ (crip "nested-tags-overlap: {(show-result (sample %nested-tags-overlap))}")
1790+ (crip "nested-tagged: {(show-result (sample %nested-tagged))}")
1791+ (crip "nested-tagged-bckt: {(show-result (sample %nested-tagged-bckt))}")
1792+ (crip "nested-tagged-overlap: {(show-result (sample %nested-tagged-overlap))}")
1793+ (crip "nested-tagged-alias: {(show-result (sample %nested-tagged-alias))}")
1794+ (crip "nested-tagged-ford: {(show-result (read-named %outer %tagged trans))}")
1795+ (crip "tag-static-valid: {?:((fixed-cell-mold [%wtgr [%dtts [%$ 13] [%rock %$ %foo]] [%rock %tas %foo]] 13) "yes" "no")}")
1796+ (crip "tag-static-wrong-axis: {?:((fixed-cell-mold [%wtgr [%dtts [%$ 12] [%rock %$ %foo]] [%rock %tas %foo]] 13) "wrong" "no")}")
1797+ (crip "tag-static-nonconstant: {?:((fixed-cell-mold [%wtgr [%dtts [%$ 13] [%rock %$ %foo]] [%$ 13]] 13) "wrong" "no")}")
1798+ (crip "tag-static-wrong-value: {?:((fixed-cell-mold [%wtgr [%dtts [%$ 13] [%rock %$ %foo]] [%rock %tas %bar]] 13) "wrong" "no")}")
1799+ (crip "nested-first-cell: {(show-result (sample %nested-first-cell))}")
1800+ (crip "nested-alias-cell: {(show-result (sample %nested-alias-cell))}")
1801+ (crip "nested-multiple-cell: {(show-result (sample %nested-multiple-cell))}")
1802+ (crip "nested-named-sibling: {(show-result (sample %nested-named-sibling))}")
1803+ (crip "nested-list-sibling: {(show-result (sample %nested-list-sibling))}")
1804+ (crip "nested-validated-sibling: {(show-result (sample %nested-validated-sibling))}")
1805+ (crip "nested-validated-branch: {(show-result (sample %nested-validated-branch))}")
1806+ (crip "nested-named-branch: {(show-result (sample %nested-named-branch))}")
1807+ (crip "nested-ford-cell: {(show-result (read-named %outer %nested trans))}")
10351808 (crip "nested-valid-cell: {(show-result (sample %nested-valid-cell))}")
10361809 (crip "nested-invalid-cell: {(show-result (sample %nested-invalid-cell))}")
10371810 (crip "valid-cell: {(show-result (sample %valid-cell))}")
@@ -1054,9 +1827,40 @@
10541827 (crip "named-missing: {(show-result (read-named %small %missing sc))}")
10551828 (crip "named-invalid-core: {(show-result (read-named %small %items [%atom %ud ~]))}")
10561829 (crip "named-ford-recursive: {(show-result (read-named %ford %recursive fc))}")
1830+ (crip "diagnostic-items: {(show-import-diagnostic (read-named-diagnostic %small %items sc))}")
1831+ (crip "diagnostic-signed: {(show-import-diagnostic (read-named-diagnostic %small %signed sc))}")
1832+ (crip "diagnostic-float: {(show-import-diagnostic (read-named-diagnostic %small %float sc))}")
1833+ (crip "diagnostic-overlap: {(show-import-diagnostic (read-named-diagnostic %small %explicit-percent-overlap sc))}")
1834+ (crip "diagnostic-unproved: {(show-import-diagnostic (read-named-diagnostic %small %list-nested-invalid-cell sc))}")
1835+ (crip "diagnostic-mark-gate: {(show-import-diagnostic (read-mark-diagnostic %bad mark-gate-core))}")
1836+ (crip "diagnostic-shadow-vase: {(show-import-diagnostic (read-named-diagnostic %fake %vase fake-vase))}")
1837+ (crip "diagnostic-spoof: {(show-import-diagnostic u.spoof)}")
10571838 (crip "missing-arm: {(show-result (read-mold-in %small %missing [%atom %ud ~] sc))}")
10581839 (crip "wrong-provenance: {(show-result (read-mold-in %small %action (~(play ut sc) (ream '*items')) sc))}")
10591840 (crip "unverified-subject: {(show-result (read-mold-in %std %jar (~(play ut -:!>(..zuse)) (ream '*(jar @ud @t)')) -:!>(..zuse)))}")
1841+ (crip "tag-ford-collision: {(show-result (read-named %child %choice tag-collision))}")
1842+ (crip "tag-ford-clean: {(show-result (read-named %child %choice tag-clean))}")
1843+ (crip "tag-zuse-local: {(show-result (read-named %child %choice tag-zuse-core))}")
1844+ (crip "tag-null-good: {(show-result (sample %tag-null-good))}")
1845+ (crip "tag-null-duplicate: {(show-result (sample %tag-null-duplicate))}")
1846+ (crip "tag-null-hidden: {(show-result (sample %tag-null-hidden))}")
1847+ (crip "tag-valid: {(show-result (sample %tag-valid))}")
1848+ (crip "tag-duplicate: {(show-result (sample %tag-duplicate))}")
1849+ (crip "tag-collapsed: {(show-result (sample %tag-collapsed))}")
1850+ (crip "tag-invalid-direct: {(show-result (sample %tag-invalid-direct))}")
1851+ (crip "tag-invalid-alias: {(show-result (sample %tag-invalid-alias))}")
1852+ (crip "tag-invalid-list: {(show-result (sample %tag-invalid-list))}")
1853+ (crip "tag-enum-good: {(show-result (sample %tag-enum-good))}")
1854+ (crip "tag-enum-bad: {(show-result (sample %tag-enum-bad))}")
1855+ (crip "tag-nested-good: {(show-result (sample %tag-nested-good))}")
1856+ (crip "tag-shadow-jar: {(show-result (read-named %shadow-static %tag-shadow-jar xc))}")
1857+ (crip "tag-shadow-jug: {(show-result (read-named %shadow-static %tag-shadow-jug xc))}")
1858+ (crip "tag-fuel-small: {?:(?=(^ (safe-source-name %tag-fuel-2 sc ~ 64)) "yes" "no")}")
1859+ (crip "tag-fuel-large: {?:(?=(~ (safe-source-name %tag-fuel-11 sc ~ 64)) "rejected" "wrong")}")
1860+ (crip "presence-action-1: {(show-result (present %action-1))}")
1861+ (crip "presence-command-1: {(show-result (present %command-1))}")
1862+ (crip "presence-update-1: {(show-result (present %update-1))}")
1863+ (crip "presence-response-1: {(show-result (present %response-1))}")
10601864 (crip "presence-topic: {(show-result (present %topic))}")
10611865 (crip "presence-timing: {(show-result (present %timing))}")
10621866 (crip "presence-places: {(show-result (present %places))}")
jibb-dev/lib/jibb.hoon+3477−133
@@ -4595,8 +4595,10 @@
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
4598−:: needs a not-yet-implemented constraint remains unsupported. Only
4599−:: unfaced cells are represented here.
4598+:: needs a not-yet-implemented constraint remains unsupported. Named unions
4599+:: retain origin and ordered arguments, including phantom arguments, apart
4600+:: from their display name. Generic cases must be disjoint for all arguments.
4601+:: Unnamed union printing is informational; it is not Jibb syntax.
46004602::
46014603+$ itype
46024604 $~ [%var 0]
@@ -4606,11 +4608,19 @@
46064608 [%atom aura=@ta]
46074609 [%any-atom ~]
46084610 [%flag ~]
4611+ [%noun ~]
4612+ [%tag id=@ud literal=lit constructor=?]
4613+ [%const literal=lit]
4614+ [%collection name=term args=(list itype)]
4615+ [%recursive module=term name=term label=(unit @t)]
4616+ [%union cases=(list itype) origin=(unit [at=path name=term]) label=(unit @t) args=(list itype)]
4617+ [%face name=term body=itype]
46094618 [%fn sample=itype product=itype]
46104619 [%cell hed=itype tal=itype]
46114620 ==
46124621+$ ibinding [id=@ud val=itype]
46134622+$ isub (list ibinding)
4623++$ ipending [id=@ud literal=lit]
46144624::
46154625++ itype-lookup
46164626 |= [n=@ud sub=isub]
@@ -4635,6 +4645,10 @@
46354645 =/ found=(unit itype) (itype-lookup id.t sub)
46364646 ?~ found t
46374647 $(t u.found)
4648+ %tag
4649+ =/ found=(unit itype) (itype-lookup id.t sub)
4650+ ?~ found t
4651+ $(t u.found)
46384652 ==
46394653::
46404654++ itype-occurs
@@ -4648,6 +4662,13 @@
46484662 %atom |
46494663 %any-atom |
46504664 %flag |
4665+ %noun |
4666+ %tag =(n id.t)
4667+ %const |
4668+ %union |((lien cases.t |=(c=itype (itype-occurs n c sub))) (lien args.t |=(c=itype (itype-occurs n c sub))))
4669+ %recursive |
4670+ %collection (lien args.t |=(c=itype (itype-occurs n c sub)))
4671+ %face $(t body.t)
46514672 %fn |($(t sample.t) $(t product.t))
46524673 %cell |($(t hed.t) $(t tal.t))
46534674 ==
@@ -4664,6 +4685,16 @@
46644685 =. a (itype-walk a sub)
46654686 =. b (itype-walk b sub)
46664687 ?: =(a b) `sub
4688+ ?: &(?=(%recursive -.a) ?=(%recursive -.b))
4689+ ?:(&(=(module.a module.b) =(name.a name.b)) `sub ~)
4690+ ?: &(?=(%union -.a) ?=(%union -.b))
4691+ ?. =(origin.a origin.b) ~
4692+ ?: &(?=(~ args.a) ?=(~ args.b)) ?:(=(cases.a cases.b) `sub ~)
4693+ ?~ origin.a ~
4694+ (itype-unify-args args.a args.b sub)
4695+ ?: &(?=(%collection -.a) ?=(%collection -.b))
4696+ ?. =(name.a name.b) ~
4697+ (itype-unify-args args.a args.b sub)
46674698 ?: ?=(%var -.a)
46684699 ?: (itype-occurs id.a b sub) ~
46694700 `[[id.a b] sub]
@@ -4686,7 +4717,12 @@
46864717 ?: ?=(%avar -.b)
46874718 ?. |(?=(%atom -.a) ?=(%any-atom -.a) ?=(%flag -.a)) ~
46884719 `[[id.b a] sub]
4720+ ?: &(?=(%const -.a) ?=(%const -.b))
4721+ ?:(=(val.literal.a val.literal.b) `sub ~)
46894722 ?: &(?=(%atom -.a) ?=(%atom -.b)) ~
4723+ ?: &(?=(%face -.a) ?=(%face -.b))
4724+ ?. =(name.a name.b) ~
4725+ $(a body.a, b body.b)
46904726 ?: &(?=(%fn -.a) ?=(%fn -.b))
46914727 =/ first=(unit isub) $(a sample.a, b sample.b)
46924728 ?~ first ~
@@ -4697,6 +4733,15 @@
46974733 $(a tal.a, b tal.b, sub u.first)
46984734 ~
46994735::
4736+++ itype-unify-args
4737+ |= [as=(list itype) bs=(list itype) sub=isub]
4738+ ^- (unit isub)
4739+ ?~ as ?~(bs `sub ~)
4740+ ?~ bs ~
4741+ =/ next=(unit isub) (itype-unify i.as i.bs sub)
4742+ ?~ next ~
4743+ $(as t.as, bs t.bs, sub u.next)
4744+::
47004745:: +itype-fit: one-way widening from an actual type to an expected type
47014746::
47024747:: An unknown variable used where @ is expected gains a fresh atom
@@ -4714,6 +4759,13 @@
47144759 %atom |
47154760 %any-atom &
47164761 %flag |
4762+ %noun |
4763+ %tag |
4764+ %const |
4765+ %union |((lien cases.t |=(c=itype (itype-has-any-atom c sub))) (lien args.t |=(c=itype (itype-has-any-atom c sub))))
4766+ %recursive |
4767+ %collection (lien args.t |=(c=itype (itype-has-any-atom c sub)))
4768+ %face $(t body.t)
47174769 %fn |($(t sample.t) $(t product.t))
47184770 %cell |($(t hed.t) $(t tal.t))
47194771 ==
@@ -4736,6 +4788,14 @@
47364788:: Related auras in a structural unification need a common-type rule;
47374789:: until that rule is implemented, report an unknown rather than error.
47384790::
4791+++ itype-family-related-collection-args
4792+ |= [as=(list itype) bs=(list itype) sub=isub]
4793+ ^- ?
4794+ ?~ as |
4795+ ?~ bs |
4796+ ?: (itype-family-related i.as i.bs sub) &
4797+ $(as t.as, bs t.bs)
4798+::
47394799++ itype-family-related
47404800 |= [a=itype b=itype sub=isub]
47414801 ^- ?
@@ -4744,6 +4804,12 @@
47444804 ?: &(?=(%atom -.a) ?=(%atom -.b))
47454805 ?. !=(aura.a aura.b) |
47464806 |((aura-prefix aura.a aura.b) (aura-prefix aura.b aura.a))
4807+ ?: &(?=(%collection -.a) ?=(%collection -.b))
4808+ ?. =(name.a name.b) |
4809+ (itype-family-related-collection-args args.a args.b sub)
4810+ ?: &(?=(%face -.a) ?=(%face -.b))
4811+ ?. =(name.a name.b) |
4812+ $(a body.a, b body.b)
47474813 ?: &(?=(%cell -.a) ?=(%cell -.b))
47484814 |($(a hed.a, b hed.b) $(a tal.a, b tal.b))
47494815 ?: &(?=(%fn -.a) ?=(%fn -.b))
@@ -4764,6 +4830,13 @@
47644830 %atom &
47654831 %any-atom &
47664832 %flag &
4833+ %noun |
4834+ %tag &
4835+ %const &
4836+ %union |((lien cases.typ |=(c=itype (itype-has-fixed-atom c))) (lien args.typ |=(c=itype (itype-has-fixed-atom c))))
4837+ %recursive |
4838+ %collection (lien args.typ |=(c=itype (itype-has-fixed-atom c)))
4839+ %face $(typ body.typ)
47674840 %fn |($(typ sample.typ) $(typ product.typ))
47684841 %cell |($(typ hed.typ) $(typ tal.typ))
47694842 ==
@@ -4781,6 +4854,204 @@
47814854 ?: &(?=(%any-atom -.b) |(?=(%atom -.a) ?=(%flag -.a))) `b
47824855 ~
47834856::
4857+:: Unifying an already-bound tuple with a faced position would need to
4858+:: update the bound type. Until substitutions can retain that information,
4859+:: variable-dependent face merges stay unresolved.
4860+::
4861+++ itype-has-face
4862+ |= [t=itype sub=isub]
4863+ ^- ?
4864+ =. t (itype-walk t sub)
4865+ ?- -.t
4866+ %collection (lien args.t |=(c=itype (itype-has-face c sub)))
4867+ %face &
4868+ %cell |($(t hed.t) $(t tal.t))
4869+ %fn |($(t sample.t) $(t product.t))
4870+ * |
4871+ ==
4872+::
4873+++ itype-face-asym-collection-args
4874+ |= [as=(list itype) bs=(list itype) sub=isub]
4875+ ^- ?
4876+ ?~ as |
4877+ ?~ bs |
4878+ ?: (itype-face-asym i.as i.bs sub) &
4879+ $(as t.as, bs t.bs)
4880+::
4881+++ itype-face-asym
4882+ |= [a=itype b=itype sub=isub]
4883+ ^- ?
4884+ =. a (itype-walk a sub)
4885+ =. b (itype-walk b sub)
4886+ ?: &(?=(%collection -.a) ?=(%collection -.b))
4887+ ?. =(name.a name.b) |
4888+ (itype-face-asym-collection-args args.a args.b sub)
4889+ ?: &(?=(%face -.a) ?=(%face -.b)) $(a body.a, b body.b)
4890+ ?: ?=(%face -.a) !|(?=(%var -.b) ?=(%avar -.b) ?=(%nvar -.b))
4891+ ?: ?=(%face -.b) !|(?=(%var -.a) ?=(%avar -.a) ?=(%nvar -.a))
4892+ ?: &(?=(%cell -.a) ?=(%cell -.b)) |($(a hed.a, b hed.b) $(a tal.a, b tal.b))
4893+ ?: &(?=(%fn -.a) ?=(%fn -.b)) |($(a sample.a, b sample.b) $(a product.a, b product.b))
4894+ |
4895+::
4896+:: A successful cast keeps any explicit faces from either side while
4897+:: retaining the target's aura choices. Both faces have already matched.
4898+::
4899+++ itype-merge-faces
4900+ |= [actual=itype expected=itype sub=isub]
4901+ ^- itype
4902+ =. actual (itype-walk actual sub)
4903+ =. expected (itype-walk expected sub)
4904+ ?: &(?=(%face -.actual) ?=(%face -.expected))
4905+ [%face name.expected $(actual body.actual, expected body.expected)]
4906+ ?: ?=(%face -.actual)
4907+ [%face name.actual $(actual body.actual)]
4908+ ?: ?=(%face -.expected)
4909+ [%face name.expected $(expected body.expected)]
4910+ ?: &(?=(%cell -.actual) ?=(%cell -.expected))
4911+ [%cell $(actual hed.actual, expected hed.expected) $(actual tal.actual, expected tal.expected)]
4912+ expected
4913+::
4914+++ itype-output-may-be-cell
4915+ |= [t=itype sub=isub]
4916+ ^- ?
4917+ =. t (itype-walk t sub)
4918+ ?- -.t
4919+ %var &
4920+ %cell &
4921+ %union &
4922+ %recursive &
4923+ %noun &
4924+ %collection &
4925+ %face $(t body.t)
4926+ %fn |($(t sample.t) $(t product.t))
4927+ * |
4928+ ==
4929+::
4930+++ pending-tags
4931+ |= [tags=(list ipending) sub=isub]
4932+ ^- ?
4933+ ?~ tags |
4934+ ?~ (itype-lookup id.i.tags sub) &
4935+ $(tags t.tags)
4936+::
4937+++ pending-null
4938+ |= [tags=(list ipending) sub=isub]
4939+ ^- ?
4940+ ?~ tags |
4941+ ?: &(?=(%null form.literal.i.tags) ?=(~ (itype-lookup id.i.tags sub))) &
4942+ $(tags t.tags)
4943+::
4944+:: Tags remain constrained until a mold selects a case or permitted atom
4945+:: type. Never generalize an unresolved tag through aliases or cells.
4946+::
4947+++ itype-has-tag
4948+ |= t=itype
4949+ ^- ?
4950+ ?- -.t
4951+ %tag &
4952+ %collection (lien args.t |=(c=itype (itype-has-tag c)))
4953+ %face $(t body.t)
4954+ %fn |($(t sample.t) $(t product.t))
4955+ %cell |($(t hed.t) $(t tal.t))
4956+ %union |((lien cases.t |=(c=itype (itype-has-tag c))) (lien args.t |=(c=itype (itype-has-tag c))))
4957+ * |
4958+ ==
4959+::
4960+++ itype-has-union
4961+ |= t=itype
4962+ ^- ?
4963+ ?- -.t
4964+ %union &
4965+ %collection (lien args.t |=(c=itype (itype-has-union c)))
4966+ %face $(t body.t)
4967+ %fn |($(t sample.t) $(t product.t))
4968+ %cell |($(t hed.t) $(t tal.t))
4969+ * |
4970+ ==
4971+::
4972+:: Until a visible generic alias can be selected, expanding a named
4973+:: generic union would hide phantom arguments and its origin. This is a
4974+:: limitation of partial inference, not the unnamed-union print notation.
4975+::
4976+++ itype-has-hidden-generic
4977+ |= t=itype
4978+ ^- ?
4979+ ?- -.t
4980+ %union
4981+ ?: &(?=(~ label.t) ?=(^ args.t)) &
4982+ (lien (weld args.t cases.t) |=(c=itype (itype-has-hidden-generic c)))
4983+ %collection (lien args.t |=(c=itype (itype-has-hidden-generic c)))
4984+ %face $(t body.t)
4985+ %fn |($(t sample.t) $(t product.t))
4986+ %cell |($(t hed.t) $(t tal.t))
4987+ * |
4988+ ==
4989+::
4990+++ itype-has-recursive
4991+ |= t=itype
4992+ ^- ?
4993+ ?- -.t
4994+ %recursive &
4995+ %collection (lien args.t |=(c=itype (itype-has-recursive c)))
4996+ %union (lien (weld args.t cases.t) |=(c=itype (itype-has-recursive c)))
4997+ %face $(t body.t)
4998+ %cell |($(t hed.t) $(t tal.t))
4999+ %fn |($(t sample.t) $(t product.t))
5000+ * |
5001+ ==
5002+::
5003+++ itype-has-hidden-recursive
5004+ |= t=itype
5005+ ^- ?
5006+ ?- -.t
5007+ %recursive ?=(~ label.t)
5008+ %collection (lien args.t |=(c=itype (itype-has-hidden-recursive c)))
5009+ %union (lien (weld args.t cases.t) |=(c=itype (itype-has-hidden-recursive c)))
5010+ %face $(t body.t)
5011+ %cell |($(t hed.t) $(t tal.t))
5012+ %fn |($(t sample.t) $(t product.t))
5013+ * |
5014+ ==
5015+::
5016+++ itype-fit-cases
5017+ |= [actual=itype cases=(list itype) sub=isub next=@ud]
5018+ ^- ifit
5019+ =/ good=(unit ifit) ~
5020+ =/ pending=? |
5021+ |-
5022+ ?~ cases
5023+ ?: pending [%unknown ~]
5024+ ?~ good [%bad ~]
5025+ u.good
5026+ =/ trial=ifit (itype-fit actual i.cases sub next)
5027+ ?- -.trial
5028+ %unknown $(cases t.cases, pending &)
5029+ %bad $(cases t.cases)
5030+ %ok
5031+ ?^ good [%unknown ~]
5032+ $(cases t.cases, good `trial)
5033+ ==
5034+::
5035+:: A constructor needs a case with its tag at the head and a payload
5036+:: compatible with the expected gate sample. Other case forms do not
5037+:: identify a constructor.
5038+::
5039+++ itype-fit-ctor-cases
5040+ |= [tag=lit sample=itype cases=(list itype) sub=isub next=@ud]
5041+ ^- ifit
5042+ =/ found=(unit ifit) ~
5043+ |-
5044+ ?~ cases ?~(found [%bad ~] u.found)
5045+ =/ c=itype (itype-walk i.cases sub)
5046+ ?. ?=(%cell -.c) $(cases t.cases)
5047+ =/ head=itype (itype-walk hed.c sub)
5048+ ?. ?=(%const -.head) $(cases t.cases)
5049+ ?. =(%term form.literal.head) $(cases t.cases)
5050+ ?. =(val.literal.head val.tag) $(cases t.cases)
5051+ ?^ found [%unknown ~]
5052+ =/ trial=ifit (itype-fit sample tal.c sub next)
5053+ $(cases t.cases, found `trial)
5054+::
47845055++ itype-fit
47855056 |= [actual=itype expected=itype sub=isub next=@ud]
47865057 ^- ifit
@@ -4789,6 +5060,81 @@
47895060 =. actual (itype-walk actual sub)
47905061 =. expected (itype-walk expected sub)
47915062 ?: =(actual expected) [%ok sub next]
5063+ :: Any value can be used where a noun is expected. An unresolved
5064+ :: bare tag is fixed as a constant; a constructor still needs a gate.
5065+ ?: ?=(%noun -.expected)
5066+ ?: ?=(%tag -.actual)
5067+ ?: constructor.actual [%unknown ~]
5068+ [%ok [[id.actual expected] sub] next]
5069+ [%ok sub next]
5070+ :: An arbitrary noun is not known to fit a narrower type.
5071+ ?: &(?=(%noun -.actual) !?=(%var -.expected)) [%unknown ~]
5072+ ?: &(?=(%recursive -.actual) ?=(%recursive -.expected))
5073+ ?:(&(=(module.actual module.expected) =(name.actual name.expected)) [%ok sub next] [%bad ~])
5074+ ?: &(|(?=(%recursive -.actual) ?=(%recursive -.expected)) !|(?=(%var -.actual) ?=(%var -.expected))) [%unknown ~]
5075+ ?: &(?=(%union -.actual) ?=(%union -.expected))
5076+ ?. =(origin.actual origin.expected) [%unknown ~]
5077+ ?: &(?=(~ args.actual) ?=(~ args.expected))
5078+ ?:(=(cases.actual cases.expected) [%ok sub next] [%unknown ~])
5079+ ?~ origin.actual [%unknown ~]
5080+ =/ unified=(unit isub) (itype-unify-args args.actual args.expected sub)
5081+ ?^ unified [%ok u.unified next]
5082+ [%unknown ~]
5083+ :: A concrete union value in a tuple may acquire the expected field's
5084+ :: face. A variable-bound union still needs face propagation support.
5085+ ?: &(!uncertain ?=(%union -.actual) ?=(%face -.expected))
5086+ $(expected body.expected)
5087+ ?: ?=(%union -.actual) [%unknown ~]
5088+ ?: &(?=(%union -.expected) |(?=(%avar -.actual) ?=(%nvar -.actual))) [%unknown ~]
5089+ ?: &(?=(%union -.expected) !?=(%var -.actual))
5090+ (itype-fit-cases actual cases.expected sub next)
5091+ ?: ?=(%tag -.actual)
5092+ ?: ?=(%var -.expected)
5093+ =/ u=(unit isub) (itype-unify actual expected sub)
5094+ ?~ u [%bad ~]
5095+ [%ok u.u next]
5096+ ?: |(?=(%avar -.expected) ?=(%nvar -.expected)) [%unknown ~]
5097+ ?: ?=(%face -.expected) $(expected body.expected)
5098+ ?: constructor.actual
5099+ ?. ?=(%fn -.expected) [%bad ~]
5100+ =/ product=itype (itype-walk product.expected sub)
5101+ =/ cases=(list itype) ?:(?=(%union -.product) cases.product ~[product])
5102+ =/ trial=ifit (itype-fit-ctor-cases literal.actual sample.expected cases sub next)
5103+ ?. ?=(%ok -.trial) trial
5104+ [%ok [[id.actual expected] sub.trial] next.trial]
5105+ :: Zero may be the empty list. A nested cell fit lacks the context
5106+ :: needed to resolve it here, so do not report a definite mismatch.
5107+ ?: &(?=(%collection -.expected) =(%list name.expected) =(0 val.literal.actual))
5108+ [%unknown ~]
5109+ ?: ?=(%const -.expected)
5110+ ?:(=(val.literal.actual val.literal.expected) [%ok [[id.actual expected] sub] next] [%bad ~])
5111+ ?: ?=(%atom -.expected)
5112+ ?: |(=(%tas aura.expected) =(%ta aura.expected))
5113+ [%ok [[id.actual expected] sub] next]
5114+ [%bad ~]
5115+ ?: ?=(%flag -.expected)
5116+ ?:(|(=(0 val.literal.actual) =(1 val.literal.actual)) [%ok [[id.actual expected] sub] next] [%bad ~])
5117+ ?: ?=(%any-atom -.expected) [%ok [[id.actual expected] sub] next]
5118+ [%bad ~]
5119+ ?: ?=(%const -.actual)
5120+ ?: ?=(%var -.expected)
5121+ =/ u=(unit isub) (itype-unify actual expected sub)
5122+ ?~ u [%bad ~]
5123+ [%ok u.u next]
5124+ ?: |(?=(%avar -.expected) ?=(%nvar -.expected)) [%unknown ~]
5125+ ?: ?=(%face -.expected) $(expected body.expected)
5126+ ?: &(?=(%collection -.expected) =(%list name.expected) =(0 val.literal.actual))
5127+ [%unknown ~]
5128+ ?: ?=(%const -.expected)
5129+ ?:(=(val.literal.actual val.literal.expected) [%ok sub next] [%bad ~])
5130+ ?: ?=(%atom -.expected)
5131+ ?: |(=(%tas aura.expected) =(%ta aura.expected)) [%ok sub next]
5132+ [%bad ~]
5133+ ?: ?=(%flag -.expected)
5134+ ?:(|(=(0 val.literal.actual) =(1 val.literal.actual)) [%ok sub next] [%bad ~])
5135+ ?: ?=(%any-atom -.expected) [%ok sub next]
5136+ [%bad ~]
5137+ ?: &(uncertain (itype-face-asym actual expected sub)) [%unknown ~]
47925138 ?: ?=(%any-atom -.expected)
47935139 ?: |(?=(%atom -.actual) ?=(%avar -.actual) ?=(%nvar -.actual) ?=(%flag -.actual)) [%ok sub next]
47945140 ?: ?=(%var -.actual)
@@ -4811,18 +5157,37 @@
48115157 =/ first=ifit $(actual hed.actual, expected hed.expected)
48125158 ?. ?=(%ok -.first) first
48135159 $(actual tal.actual, expected tal.expected, sub sub.first, next next.first)
5160+ :: A field may add a face to an occurrence of the very same type
5161+ :: variable. Binding that variable to a face around itself would fail
5162+ :: the occurs check, but its underlying type has already matched.
5163+ ?: &(?=(%var -.actual) ?=(%face -.expected) =(actual (itype-walk body.expected sub)))
5164+ [%ok sub next]
5165+ :: Differing variables and faces need propagation that is not yet
5166+ :: represented. Binding one to the face can create a false mismatch.
5167+ ?: &(?=(%var -.actual) ?=(%face -.expected)) [%unknown ~]
5168+ ?: &(?=(%face -.actual) ?=(%var -.expected)) [%unknown ~]
48145169 ?: &(?=(%var -.actual) (itype-has-any-atom expected sub))
48155170 [%unknown ~]
48165171 ?: |(?=(%var -.actual) ?=(%var -.expected))
48175172 =/ unified=(unit isub) (itype-unify actual expected sub)
48185173 ?~ unified
5174+ ?: |(?=(%face -.actual) ?=(%face -.expected)) [%unknown ~]
5175+ ?: |((itype-has-recursive (itype-normalize actual sub)) (itype-has-recursive (itype-normalize expected sub))) [%unknown ~]
48195176 ?: (itype-family-related actual expected sub) [%unknown ~]
48205177 [%bad ~]
48215178 [%ok u.unified next]
5179+ ?: &(?=(%face -.actual) ?=(%face -.expected))
5180+ ?. =(name.actual name.expected) [%bad ~]
5181+ $(actual body.actual, expected body.expected)
5182+ ?: ?=(%face -.actual) $(actual body.actual)
5183+ ?: ?=(%face -.expected) $(expected body.expected)
5184+ ?: (itype-face-asym actual expected sub) [%unknown ~]
48225185 ?: |((itype-has-any-atom actual sub) (itype-has-any-atom expected sub))
48235186 [%unknown ~]
48245187 =/ unified=(unit isub) (itype-unify actual expected sub)
48255188 ?~ unified
5189+ ?: |((itype-has-union (itype-normalize actual sub)) (itype-has-union (itype-normalize expected sub))) [%unknown ~]
5190+ ?: |((itype-has-recursive (itype-normalize actual sub)) (itype-has-recursive (itype-normalize expected sub))) [%unknown ~]
48265191 ?: (itype-family-related actual expected sub) [%unknown ~]
48275192 [%bad ~]
48285193 [%ok u.unified next]
@@ -4851,24 +5216,58 @@
48515216 ["a shared type variable should reject incompatible arguments" problems]
48525217 =? problems ?=(~ (itype-unify same fine ~))
48535218 ["a shared type variable should accept equal arguments" problems]
5219+ =/ list-a=itype [%collection %list ~[a]]
5220+ =/ list-t=itype [%collection %list ~[txt]]
5221+ =/ list-n=itype [%collection %list ~[num]]
5222+ =? problems ?=(^ (itype-unify a list-a ~))
5223+ ["occurs check should look through collection arguments" problems]
5224+ =? problems !=((itype-vars list-a) ~[0])
5225+ ["generalization should see collection argument variables" problems]
5226+ =? problems !=((itype-rename list-a ~[[0 num]]) list-n)
5227+ ["instantiation should rename collection argument variables" problems]
5228+ =? problems ?=(^ (itype-unify list-t list-n ~))
5229+ ["collection arguments with different auras should conflict" problems]
5230+ =? problems ?=(^ (itype-unify list-t [%collection %unit ~[txt]] ~))
5231+ ["different collection names should conflict" problems]
5232+ =? problems !(itype-family-related list-t [%collection %list ~[[%atom 'tD']]] ~)
5233+ ["collection arguments should preserve aura-family uncertainty" problems]
5234+ =? problems !(itype-face-asym [%collection %list ~[[%face %x txt]]] list-t ~)
5235+ ["collection arguments should preserve face uncertainty" problems]
5236+ =/ recursive=itype [%recursive %fixture %chain `'chain.fixture']
5237+ =/ same-recursive=itype [%recursive %fixture %chain ~]
5238+ =/ other-recursive=itype [%recursive %other %chain `'chain.other']
5239+ =? problems ?=(~ (itype-unify recursive same-recursive ~))
5240+ ["recursive identity should not depend on its visible name" problems]
5241+ =? problems ?=(^ (itype-unify recursive other-recursive ~))
5242+ ["recursive identity should include the source module" problems]
5243+ =/ recursive-fit=ifit (itype-fit recursive txt ~ 0)
5244+ =? problems !?=(%unknown -.recursive-fit)
5245+ ["opaque recursive types should not be unfolded by a fit" problems]
5246+ =/ nested-fit=ifit
5247+ (itype-fit [%collection %list ~[a]] list-t ~[[0 recursive]] 1)
5248+ =? problems !?=(%unknown -.nested-fit)
5249+ ["recursive types behind substitutions should remain uncertain" problems]
48545250 problems
48555251::
48565252:: The expression inference below is deliberately a fragment: bindings,
4857−:: simple gates, unary calls, fixed-aura literals, and plain strings. The
5253+:: simple gates, calls, fixed-aura literals, and some interpolated strings. The
48585254:: result for unsupported syntax is a diagnostic, never a checked module.
48595255::
48605256+$ ischeme [typ=itype vars=(list @ud)]
48615257+$ ienv (list [name=term scheme=ischeme])
4862−+$ imold-types (list [name=term typ=itype])
4863−+$ ifile [values=ienv molds=imold-types]
5258++$ imold-types (list [name=term template=ischeme])
5259++$ iderived [name=term agent=term mark=term]
5260++$ ifile [values=ienv molds=imold-types at=path derived=(list iderived)]
48645261+$ ijimports (list [face=term interface=ifile])
4865−+$ icaps (list [name=@t id=@ud])
5262++$ icap [name=@t id=@ud at=span]
5263++$ icaps (list icap)
5264++$ iparams (list [name=@t typ=itype])
48665265+$ imolds (list [name=term body=shape])
48675266:: A caller supplies the exact noun returned by +read-mold:jibb-import.
48685267:: This core has no Ford dependencies; unrecognized payloads fail closed.
48695268+$ iexternals (list [module=term name=term result=*])
48705269+$ imark-externals (list [mark=term result=*])
4871−+$ istate [next=@ud sub=isub caps=icaps binders=(list @ud) molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) active=(list term) in-mold=?]
5270++$ istate [next=@ud sub=isub caps=icaps binders=(list @ud) molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) params=iparams active=(list term) tags=(list ipending) in-mold=? at=path top-molds=(list term) prelude=(unit ifile)]
48725271+$ idiag [msg=tape sites=(list [at=span note=tape])]
48735272+$ iresult (each [typ=itype state=istate] idiag)
48745273+$ isample-result (each [typ=itype env=ienv state=istate] tape)
@@ -4888,6 +5287,11 @@
48885287 |= [t=itype sub=isub]
48895288 ^- itype
48905289 =. t (itype-walk t sub)
5290+ ?: ?=(%collection -.t) [%collection name.t (turn args.t |=(c=itype (itype-normalize c sub)))]
5291+ ?: ?=(%union -.t)
5292+ [%union (turn cases.t |=(c=itype (itype-normalize c sub))) origin.t label.t (turn args.t |=(c=itype (itype-normalize c sub)))]
5293+ ?: ?=(%face -.t)
5294+ [%face name.t $(t body.t)]
48915295 ?: ?=(%fn -.t)
48925296 [%fn $(t sample.t) $(t product.t)]
48935297 ?: ?=(%cell -.t)
@@ -4899,18 +5303,27 @@
48995303:: generalize an aura from its sample, which requires constraint analysis
49005304:: beyond this fragment; leave those cases unresolved.
49015305::
5306+:: This helper only controls decimal defaulting in visible types. A noun
5307+:: may contain gates and is not proof of a gate-free value.
49025308++ itype-has-gate
49035309 |= t=itype
49045310 ^- ?
49055311 ?- -.t
49065312 %fn &
49075313 %cell |($(t hed.t) $(t tal.t))
5314+ %recursive |
5315+ %collection (lien args.t |=(c=itype (itype-has-gate c)))
5316+ %face $(t body.t)
5317+ %union (lien cases.t |=(c=itype (itype-has-gate c)))
5318+ %tag |
5319+ %const |
49085320 %var |
49095321 %avar |
49105322 %nvar |
49115323 %atom |
49125324 %any-atom |
49135325 %flag |
5326+ %noun |
49145327 ==
49155328::
49165329++ default-decimals
@@ -4919,6 +5332,8 @@
49195332 ?: (itype-has-gate t) t
49205333 ?- -.t
49215334 %nvar [%atom %ud]
5335+ %collection [%collection name.t (turn args.t |=(c=itype (default-decimals c)))]
5336+ %face [%face name.t $(t body.t)]
49225337 %cell [%cell $(t hed.t) $(t tal.t)]
49235338 * t
49245339 ==
@@ -4933,6 +5348,13 @@
49335348 %atom ~
49345349 %any-atom ~
49355350 %flag ~
5351+ %noun ~
5352+ %tag ~
5353+ %const ~
5354+ %union (zing (turn (weld args.t cases.t) |=(c=itype (itype-vars c))))
5355+ %recursive ~
5356+ %collection (zing (turn args.t |=(c=itype (itype-vars c))))
5357+ %face $(t body.t)
49365358 %fn (weld $(t sample.t) $(t product.t))
49375359 %cell (weld $(t hed.t) $(t tal.t))
49385360 ==
@@ -4965,6 +5387,13 @@
49655387 %atom t
49665388 %any-atom t
49675389 %flag t
5390+ %noun t
5391+ %tag t
5392+ %const t
5393+ %union [%union (turn cases.t |=(c=itype (itype-rename c ren))) origin.t label.t (turn args.t |=(c=itype (itype-rename c ren)))]
5394+ %recursive t
5395+ %collection [%collection name.t (turn args.t |=(c=itype (itype-rename c ren)))]
5396+ %face [%face name.t $(t body.t)]
49685397 %fn [%fn $(t sample.t) $(t product.t)]
49695398 %cell [%cell $(t hed.t) $(t tal.t)]
49705399 ==
@@ -4982,6 +5411,13 @@
49825411 %atom |
49835412 %any-atom |
49845413 %flag |
5414+ %noun |
5415+ %tag |
5416+ %const |
5417+ %union |((lien cases.t |=(c=itype (itype-var-is-atom n c))) (lien args.t |=(c=itype (itype-var-is-atom n c))))
5418+ %recursive |
5419+ %collection (lien args.t |=(c=itype (itype-var-is-atom n c)))
5420+ %face $(t body.t)
49855421 %fn |($(t sample.t) $(t product.t))
49865422 %cell |($(t hed.t) $(t tal.t))
49875423 ==
@@ -5042,20 +5478,184 @@
50425478 $(ds t.ds)
50435479::
50445480::
5045−:: The importer owns its algebra. Only successful %atom and %cell nouns
5046−:: in the supported subset are decoded here. In particular a singleton,
5047−:: face, union, collection or recursive reference must not be widened.
5481+:: The caller supplies unchanged results from the source-aware importer.
5482+:: That boundary is trusted for source provenance: a fork alone cannot
5483+:: reveal cases Hoon collapsed before it was constructed. Validate the
5484+:: supplied graph independently, including pairwise disjointness. Fixed
5485+:: atoms, term singletons, cells, faces and proven forks are decoded;
5486+:: unsupported singletons, collections and recursive references fail.
5487+::
5488+++ jibb-face-name
5489+ |= name=@
5490+ ^- ?
5491+ =/ chars=tape (trip (@t name))
5492+ ?~ chars |
5493+ ?. (is-lower i.chars) |
5494+ (levy t.chars |=(c=@tD (in c name-mask)))
5495+::
5496+:: A source-aware reader result is trusted for origin. Validate every
5497+:: supplied branch and keep the recursive mold opaque: unfolding its
5498+:: root while naming only its tail would change its type identity.
5499++$ irec-pattern [pat=upat has=?]
5500+++ rec-pattern
5501+ |= [node=* module=term name=term]
5502+ ^- (unit irec-pattern)
5503+ ?@ node ~
5504+ ?+ -.node ~
5505+ %atom
5506+ ?: ?=([%atom %n [~ @]] node)
5507+ ?. =(0 +>+.node) ~
5508+ `[[%atom `0] |]
5509+ ?: ?=([%atom %tas [~ @]] node)
5510+ =/ value=@ +>+.node
5511+ ?. |(=(value 0) (jibb-face-name value)) ~
5512+ `[[%atom `value] |]
5513+ ?. ?=([%atom @ ~] node) ~
5514+ =/ aura=@ta (@ta +<.node)
5515+ ?. |(?=(?(%u %ud %ux %uv %t %ta %tas %p %da %dr) aura) =('tD' aura)) ~
5516+ `[[%atom ~] |]
5517+ %ref
5518+ ?. ?=([%ref @ @] node) ~
5519+ ?. &(=(module +<.node) =(name +>.node)) ~
5520+ `[[%unknown ~] &]
5521+ %face
5522+ ?. ?=([%face @ *] node) ~
5523+ ?. (jibb-face-name +<.node) ~
5524+ $(node +>.node)
5525+ %cell
5526+ ?. ?=([%cell * *] node) ~
5527+ =/ left $(node +<.node)
5528+ ?~ left ~
5529+ =/ right $(node +>.node)
5530+ ?~ right ~
5531+ `[[%cell pat.u.left pat.u.right] |(has.u.left has.u.right)]
5532+ %fork
5533+ =/ cases (rec-patterns +.node module name)
5534+ ?~ cases ~
5535+ ?~ pats.u.cases ~
5536+ ?~ t.pats.u.cases ~
5537+ ?. (rec-patterns-disjoint pats.u.cases) ~
5538+ `[[%or pats.u.cases] has.u.cases]
5539+ ==
5540+::
5541+++ rec-patterns
5542+ |= [nodes=* module=term name=term]
5543+ ^- (unit [pats=(list upat) has=?])
5544+ ?@ nodes ?:(=(nodes 0) `[~ |] ~)
5545+ =/ first (rec-pattern -.nodes module name)
5546+ ?~ first ~
5547+ =/ rest $(nodes +.nodes)
5548+ ?~ rest ~
5549+ `[[pat.u.first pats.u.rest] |(has.u.first has.u.rest)]
5550+::
5551+++ rec-patterns-disjoint
5552+ |= pats=(list upat)
5553+ ^- ?
5554+ ?~ pats &
5555+ ?. (levy t.pats |=(p=upat =(%disjoint (union-relate i.pats p)))) |
5556+ $(pats t.pats)
5557+::
5558+::
5559+::
5560+:: Repeated faces along an imported record spine fail closed. Hoon's type
5561+:: graph can erase unfaced nested-cell boundaries, so that alone does not
5562+:: prove the original source repeated a name within one record. A faced
5563+:: body and each union alternative have separate scopes. Check recursive
5564+:: roots before making them opaque; unused molds are never inspected.
5565+::
5566+++ imported-faces-valid
5567+ |= node=*
5568+ ^- ?
5569+ ?@ node &
5570+ ?+ -.node &
5571+ %face ?:(?=([%face @ *] node) $(node +>.node) |)
5572+ %cell ?:(?=([%cell * *] node) (imported-record-faces-valid node ~) |)
5573+ %fork (imported-faces-valid-list +.node)
5574+ %apply ?:(?=([%apply @ *] node) (imported-faces-valid-list +>.node) |)
5575+ ==
5576+::
5577+++ imported-faces-valid-list
5578+ |= nodes=*
5579+ ^- ?
5580+ ?@ nodes =(nodes 0)
5581+ ?. (imported-faces-valid -.nodes) |
5582+ $(nodes +.nodes)
5583+::
5584+++ imported-record-faces-valid
5585+ |= [node=* names=(list @)]
5586+ ^- ?
5587+ ?: ?=([%cell * *] node)
5588+ =/ head=* +<.node
5589+ =/ rest=* +>.node
5590+ ?: ?=([%face @ *] head)
5591+ ?: (lien names |=(n=@ =(n +<.head))) |
5592+ ?. (imported-faces-valid +>.head) |
5593+ $(node rest, names [+<.head names])
5594+ ?. (imported-faces-valid head) |
5595+ $(node rest)
5596+ ?: ?=([%face @ *] node)
5597+ ?: (lien names |=(n=@ =(n +<.node))) |
5598+ (imported-faces-valid +>.node)
5599+ (imported-faces-valid node)
50485600::
50495601++ import-to-itype
50505602 |= node=*
50515603 ^- (unit itype)
50525604 ?@ node ~
50535605 ?+ -.node ~
5606+ %noun ?:(=(node [%noun ~]) `[%noun ~] ~)
50545607 %atom
5608+ :: A Hoon loobean singleton is one of the two Jibb loobeans.
5609+ ?: ?=([%atom %f [~ @]] node)
5610+ =/ value=@ +>+.node
5611+ ?. |(=(value 0) =(value 1)) ~
5612+ =/ printed=@t ?:(=(value 0) '%.y' '%.n')
5613+ `[%const [%loobean %f value printed]]
5614+ :: Hoon's null singleton is the same noun as Jibb's `~` mold.
5615+ :: Other non-term singleton atoms remain unsupported here.
5616+ ?: ?=([%atom %n [~ @]] node)
5617+ ?. =(0 +>+.node) ~
5618+ `[%const [%null %n 0 '~']]
5619+ ?: ?=([%atom %tas [~ @]] node)
5620+ =/ value=@ +>+.node
5621+ ?. |(=(value 0) (jibb-face-name value)) ~
5622+ =/ printed=@t ?:(=(value 0) '%$' (cat 3 '%' value))
5623+ `[%const [%term %tas value printed]]
50555624 ?. ?=([%atom @ ~] node) ~
50565625 =/ aura=@ta (@ta +<.node)
50575626 ?. |(?=(?(%u %ud %ux %uv %t %ta %tas %p %da %dr) aura) =('tD' aura)) ~
50585627 `[%atom aura]
5628+ %apply
5629+ ?. ?=([%apply @ *] node) ~
5630+ =/ name=term (@tas +<.node)
5631+ =/ arity=@ud
5632+ ?: |(=(%list name) =(%unit name) =(%set name) =(%qeu name)) 1
5633+ ?: |(=(%map name) =(%mop name) =(%jar name) =(%jug name)) 2
5634+ 0
5635+ ?: =(arity 0) ~
5636+ =/ args=(unit (list itype)) (import-to-itypes +>.node)
5637+ ?~ args ~
5638+ ?. =(arity (lent u.args)) ~
5639+ `[%collection name u.args]
5640+ %fork
5641+ :: Hoon's ordinary ? mold is the fork of its two %f singletons.
5642+ =/ raw=* +.node
5643+ ?: |(=(raw ~[[%atom %f `0] [%atom %f `1]]) =(raw ~[[%atom %f `1] [%atom %f `0]]))
5644+ `[%flag ~]
5645+ =/ cases=(unit (list itype)) (import-to-itypes raw)
5646+ ?~ cases ~
5647+ ?~ u.cases ~
5648+ ?~ t.u.cases ~
5649+ ?: (import-has-loobean-singleton u.cases) ~
5650+ ?. (import-cases-disjoint u.cases) ~
5651+ `[%union u.cases ~ ~ ~]
5652+ %face
5653+ ?. ?=([%face @ *] node) ~
5654+ =/ name=@ +<.node
5655+ ?. (jibb-face-name name) ~
5656+ =/ body=(unit itype) $(node +>.node)
5657+ ?~ body ~
5658+ `[%face (@tas name) u.body]
50595659 %cell
50605660 ?. ?=([%cell * *] node) ~
50615661 =/ left=(unit itype) $(node +<.node)
@@ -5065,6 +5665,52 @@
50655665 `[%cell u.left u.right]
50665666 ==
50675667::
5668+++ import-direct-loobean
5669+ |= t=itype
5670+ ^- ?
5671+ ?: ?=(%face -.t) $(t body.t)
5672+ ?: ?=(%union -.t) (import-has-loobean-singleton cases.t)
5673+ ?=([%const [%loobean *]] t)
5674+::
5675+++ import-has-loobean-singleton
5676+ |= cases=(list itype)
5677+ ^- ?
5678+ ?~ cases |
5679+ ?: (import-direct-loobean i.cases) &
5680+ $(cases t.cases)
5681+::
5682+++ import-to-itypes
5683+ |= nodes=*
5684+ ^- (unit (list itype))
5685+ ?@ nodes ?:(=(nodes 0) `~ ~)
5686+ =/ first (import-to-itype -.nodes)
5687+ ?~ first ~
5688+ =/ rest $(nodes +.nodes)
5689+ ?~ rest ~
5690+ `[u.first u.rest]
5691+::
5692+++ import-type-pattern
5693+ |= typ=itype
5694+ ^- upat
5695+ ?- -.typ
5696+ %noun [%all ~]
5697+ %atom [%atom ~]
5698+ %flag [%or ~[[%atom `0] [%atom `1]]]
5699+ %const [%atom `val.literal.typ]
5700+ %face $(typ body.typ)
5701+ %cell [%cell $(typ hed.typ) $(typ tal.typ)]
5702+ %union [%or (turn cases.typ |=(t=itype (import-type-pattern t)))]
5703+ * [%unknown ~]
5704+ ==
5705+::
5706+++ import-cases-disjoint
5707+ |= cases=(list itype)
5708+ ^- ?
5709+ ?~ cases &
5710+ =/ first=upat (import-type-pattern i.cases)
5711+ ?. (levy t.cases |=(t=itype =(%disjoint (union-relate first (import-type-pattern t))))) |
5712+ $(cases t.cases)
5713+::
50685714++ find-imported-mold
50695715 |= [module=term name=term externals=iexternals surs=(list term)]
50705716 ^- (unit itype)
@@ -5076,7 +5722,15 @@
50765722 =/ result=* result.i.found
50775723 ?@ result ~
50785724 ?. ?=(%& -.result) ~
5079− (import-to-itype +.result)
5725+ =/ node=* +.result
5726+ ?. (imported-faces-valid node) ~
5727+ ?@ node (import-to-itype node)
5728+ ?: ?=(%ref -.node) (import-to-itype node)
5729+ =/ pattern=(unit irec-pattern) (rec-pattern node module name)
5730+ ?~ pattern (import-to-itype node)
5731+ ?. has.u.pattern (import-to-itype node)
5732+ `[%recursive module name `(crip "{(trip name)}.{(trip module)}")]
5733+
50805734::
50815735++ collect-sur-imports
50825736 |= imports=(list import)
@@ -5105,6 +5759,7 @@
51055759 =/ result=* result.i.found
51065760 ?@ result ~
51075761 ?. ?=(%& -.result) ~
5762+ ?. (imported-faces-valid +.result) ~
51085763 (import-to-itype +.result)
51095764::
51105765++ find-jibb-interface
@@ -5116,13 +5771,251 @@
51165771::
51175772++ find-jibb-mold
51185773 |= [name=term iface=ifile]
5119− ^- (unit itype)
5774+ ^- (unit ischeme)
51205775 =/ ms=imold-types molds.iface
51215776 |-
51225777 ?~ ms ~
5123− ?: =(name name.i.ms) `typ.i.ms
5778+ ?: =(name name.i.ms) `template.i.ms
51245779 $(ms t.ms)
51255780::
5781+:: An exported alias may name a union from another module. Only a
5782+:: nongeneric alias of the same origin is usable through this import face.
5783+::
5784+++ imported-union-alias
5785+ |= [origin=[at=path name=term] molds=imold-types]
5786+ ^- (unit term)
5787+ ?~ molds ~
5788+ =/ template=ischeme template.i.molds
5789+ ?: &(?=(~ vars.template) ?=(%union -.typ.template))
5790+ ?:(=(`origin origin.typ.template) `name.i.molds $(molds t.molds))
5791+ $(molds t.molds)
5792+::
5793+:: A public non-generic alias names exactly its origin and arguments.
5794+:: Reusing only an origin could print a different generic instantiation.
5795+++ prelude-union-alias
5796+ |= [origin=[at=path name=term] args=(list itype) molds=imold-types]
5797+ ^- (unit term)
5798+ ?^ args ~
5799+ ?~ molds ~
5800+ =/ template=ischeme template.i.molds
5801+ ?: &(?=(~ vars.template) ?=(%union -.typ.template))
5802+ ?:(&(=(`origin origin.typ.template) =(args args.typ.template)) `name.i.molds $(molds t.molds))
5803+ $(molds t.molds)
5804+::
5805+:: Names exported by the directly imported module are visible through its
5806+:: face; a matching prelude alias is also visible without a qualifier.
5807+::
5808+++ itype-in-import
5809+ |= [t=itype iface=ifile face=term prelude=(unit ifile)]
5810+ ^- itype
5811+ ?- -.t
5812+ %union
5813+ =/ label=(unit @t)
5814+ ?~ origin.t ~
5815+ ?: =(at.u.origin.t /lib/jibb/prelude/jibb) `name.u.origin.t
5816+ =/ public=(unit term)
5817+ ?~ prelude ~
5818+ (prelude-union-alias u.origin.t args.t molds.u.prelude)
5819+ ?^ public `u.public
5820+ =/ alias=(unit term) ~
5821+ =? alias &(=(at.u.origin.t at.iface) ?=(^ (find-jibb-mold name.u.origin.t iface))) `name.u.origin.t
5822+ =? alias ?=(~ alias) (imported-union-alias u.origin.t molds.iface)
5823+ ?~ alias ~
5824+ `(crip "{(trip u.alias)}.{(trip face)}")
5825+ [%union (turn cases.t |=(c=itype (itype-in-import c iface face prelude))) origin.t label (turn args.t |=(c=itype (itype-in-import c iface face prelude)))]
5826+ %recursive [%recursive module.t name.t ~]
5827+ %collection [%collection name.t (turn args.t |=(c=itype (itype-in-import c iface face prelude)))]
5828+ %face [%face name.t $(t body.t)]
5829+ %fn [%fn $(t sample.t) $(t product.t)]
5830+ %cell [%cell $(t hed.t) $(t tal.t)]
5831+ * t
5832+ ==
5833+::
5834+++ label-direct-union
5835+ |= [typ=itype body=shape name=term state=istate]
5836+ ^- itype
5837+ ?. ?=(%union -.typ) typ
5838+ =/ direct=? ?=(%union -.body)
5839+ =? direct ?=(%generic -.body) ?=(%union -.body.body)
5840+ ?. direct typ
5841+ ?. (lien top-molds.state |=(n=term =(n name))) typ
5842+ [%union cases.typ `[at.state name] `name args.typ]
5843+::
5844+:: Generic mold parameters are lexical and distinct from the enclosing
5845+:: value's capital variables. Arguments are substituted only once, so
5846+:: an argument's variable ID cannot be captured by a template ID.
5847+:: A generic alias of a named union keeps the underlying union's origin
5848+:: and substituted argument order; an originless union stays unsupported.
5849+::
5850+++ iparam-lookup
5851+ |= [name=@t params=iparams]
5852+ ^- (unit itype)
5853+ ?~ params ~
5854+ ?: =(name name.i.params) `typ.i.params
5855+ $(params t.params)
5856+::
5857+++ distinct-params
5858+ |= names=(list @t)
5859+ ^- ?
5860+ ?~ names &
5861+ ?: (lien t.names |=(n=@t =(n i.names))) |
5862+ $(names t.names)
5863+::
5864+++ bind-params
5865+ |= [names=(list @t) args=(list itype)]
5866+ ^- (unit iparams)
5867+ ?~ names ?~(args `~ ~)
5868+ ?~ args ~
5869+ =/ rest=(unit iparams) $(names t.names, args t.args)
5870+ ?~ rest ~
5871+ `[[i.names i.args] u.rest]
5872+::
5873+++ template-apply
5874+ |= [template=ischeme args=(list itype)]
5875+ ^- (unit itype)
5876+ =/ vars=(list @ud) vars.template
5877+ =/ ren=isub ~
5878+ |-
5879+ ?~ vars ?~(args `(itype-rename typ.template ren) ~)
5880+ ?~ args ~
5881+ $(vars t.vars, args t.args, ren [[i.vars i.args] ren])
5882+::
5883+++ infer-shape-args
5884+ |= [args=(list shape) state=istate]
5885+ ^- (unit [types=(list itype) state=istate])
5886+ ?~ args `[~ state]
5887+ =/ head=(unit [typ=itype state=istate]) (infer-simple-shape i.args state)
5888+ ?~ head ~
5889+ =/ tail=(unit [types=(list itype) state=istate]) $(args t.args, state state.u.head)
5890+ ?~ tail ~
5891+ `[[typ.u.head types.u.tail] state.u.tail]
5892+::
5893+++ fresh-mold-params
5894+ |= [names=(list @t) next=@ud]
5895+ ^- [params=iparams vars=(list @ud) next=@ud]
5896+ ?~ names [~ ~ next]
5897+ =/ rest=[params=iparams vars=(list @ud) next=@ud] $(names t.names, next +(next))
5898+ [[[i.names [%var next]] params.rest] [next vars.rest] next.rest]
5899+::
5900+++ infer-mold-template
5901+ |= [sh=shape state=istate]
5902+ ^- (unit [template=ischeme state=istate])
5903+ ?: ?=(%generic -.sh)
5904+ ?~ vars.sh ~
5905+ ?. (distinct-params vars.sh) ~
5906+ =/ fresh=[params=iparams vars=(list @ud) next=@ud] (fresh-mold-params vars.sh next.state)
5907+ =/ out=(unit [typ=itype state=istate])
5908+ (infer-simple-shape body.sh state(next next.fresh, params params.fresh, in-mold &))
5909+ ?~ out ~
5910+ ?: &(?=(%union -.typ.u.out) !?=(%union -.body.sh) ?=(~ origin.typ.u.out)) ~
5911+ =? typ.u.out &(?=(%union -.typ.u.out) ?=(%union -.body.sh))
5912+ typ.u.out(args (turn vars.fresh |=(n=@ud `itype`[%var n])))
5913+ =/ used=(list @ud) (itype-vars typ.u.out)
5914+ ?. (levy used |=(n=@ud (lien vars.fresh |=(p=@ud =(p n))))) ~
5915+ `[[typ.u.out vars.fresh] state.u.out(params params.state, in-mold in-mold.state)]
5916+ =/ out=(unit [typ=itype state=istate])
5917+ (infer-simple-shape sh state(params ~, in-mold &))
5918+ ?~ out ~
5919+ ?: ?=(^ (itype-vars typ.u.out)) ~
5920+ `[[typ.u.out ~] state.u.out(params params.state, in-mold in-mold.state)]
5921+::
5922+:: A direct imported reference may carry definite reader evidence. Only
5923+:: uniquely supplied, declared inputs are used; unsupported data stay generic.
5924+++ direct-import-invalid
5925+ |= [sh=shape state=istate]
5926+ ^- (unit idiag)
5927+ ?. ?=(%ref -.sh) ~
5928+ ?~ names.sh ~
5929+ =/ n=term i.names.sh
5930+ =/ raw=*
5931+ ?~ t.names.sh
5932+ ?. (unique-value-name n marks.state) ~
5933+ ?: (lien surs.state |=(x=term =(x n))) ~
5934+ ?: ?=(^ (find-jibb-interface n jimports.state)) ~
5935+ ?: (lien globals.state |=(x=term =(x n))) ~
5936+ ?: (lien reserved-molds.state |=(x=term =(x n))) ~
5937+ ?: (lien molds.state |=(m=[name=term body=shape] =(n name.m))) ~
5938+ =/ found=imark-externals (skim mark-externals.state |=(e=[mark=term result=*] =(mark.e n)))
5939+ ?~ found ~
5940+ ?^ t.found ~
5941+ result.i.found
5942+ ?^ t.t.names.sh ~
5943+ =/ mod=term i.t.names.sh
5944+ ?: ?=(^ (find-jibb-interface mod jimports.state)) ~
5945+ ?. (unique-value-name mod surs.state) ~
5946+ ?: (lien marks.state |=(x=term =(x mod))) ~
5947+ ?: (lien globals.state |=(x=term =(x mod))) ~
5948+ ?: (lien reserved-molds.state |=(x=term =(x mod))) ~
5949+ ?: (lien molds.state |=(m=[name=term body=shape] =(mod name.m))) ~
5950+ =/ found=iexternals (skim externals.state |=(e=[module=term name=term result=*] &(=(module.e mod) =(name.e n))))
5951+ ?~ found ~
5952+ ?^ t.found ~
5953+ result.i.found
5954+ ?. ?=([%invalid ?(%aura %core) @] raw) ~
5955+ `["{(trip +>.raw)}" ~[[at.sh "invalid imported mold"]]]
5956+::
5957+:: Replay only the shape branches whose evaluation order we can prove.
5958+:: Successful prefixes must be checked before descending to a failure.
5959+++ nested-import-invalid
5960+ |= [sh=shape state=istate]
5961+ ^- (unit idiag)
5962+ ?: ?=(^ (infer-simple-shape sh state)) ~
5963+ ?- -.sh
5964+ %ref
5965+ =/ direct=(unit idiag) (direct-import-invalid sh state)
5966+ ?^ direct direct
5967+ ?~ names.sh ~
5968+ ?^ t.names.sh ~
5969+ =/ n=term i.names.sh
5970+ ?: (lien marks.state |=(x=term =(x n))) ~
5971+ ?: (lien active.state |=(x=term =(x n))) ~
5972+ =/ found=(unit shape) (find-simple-mold n molds.state)
5973+ ?~ found ~
5974+ $(sh u.found, state state(active [n active.state], in-mold &, params ~))
5975+ %fn
5976+ =/ first=(unit [typ=itype state=istate]) (infer-simple-shape sample.sh state)
5977+ ?~ first $(sh sample.sh)
5978+ $(sh product.sh, state state.u.first)
5979+ %cell (nested-field-invalid fields.sh state)
5980+ * ~
5981+ ==
5982+::
5983+++ nested-field-invalid
5984+ |= [fields=(list field) state=istate]
5985+ ^- (unit idiag)
5986+ ?~ fields ~
5987+ =/ sh=shape
5988+ ?- -.i.fields
5989+ %bare shape.i.fields
5990+ %face shape.i.fields
5991+ %pun [%ref at.i.fields ~[name.i.fields]]
5992+ ==
5993+ =/ out=(unit [typ=itype state=istate]) (infer-simple-shape sh state)
5994+ ?~ out (nested-import-invalid sh state)
5995+ $(fields t.fields, state state.u.out)
5996+::
5997+++ sample-import-invalid
5998+ |= [s=sample env=ienv state=istate]
5999+ ^- (unit idiag)
6000+ =/ result=isample-result (infer-sample s env state)
6001+ ?: ?=(%& -.result) ~
6002+ ?. =(p.result "sample mold is not supported by partial inference") ~
6003+ ?- s
6004+ [%face *] (nested-import-invalid shape.s state)
6005+ [%bare *] (nested-import-invalid shape.s state)
6006+ [%pun *] (nested-import-invalid [%ref at.s ~[name.s]] state)
6007+ [%cell *] (nested-samples-invalid items.s env state)
6008+ * ~
6009+ ==
6010+::
6011+++ nested-samples-invalid
6012+ |= [items=(list sample) env=ienv state=istate]
6013+ ^- (unit idiag)
6014+ ?~ items ~
6015+ =/ head=isample-result (infer-sample i.items env state)
6016+ ?: ?=(%| -.head) (sample-import-invalid i.items env state)
6017+ $(items t.items, env env.p.head, state state.p.head)
6018+::
51266019++ infer-simple-shape
51276020 |= [sh=shape state=istate]
51286021 ^- (unit [typ=itype state=istate])
@@ -5131,6 +6024,16 @@
51316024 ?: =(0 aura.sh) `[[%any-atom ~] state]
51326025 `[[%atom aura.sh] state]
51336026 %flag `[[%flag ~] state]
6027+ %noun `[[%noun ~] state]
6028+ %const
6029+ ?. |(=(%term form.lit.sh) =(%null form.lit.sh)) ~
6030+ `[[%const lit.sh] state]
6031+ %union
6032+ =/ pairs=(list upair) (union-pairs cases.sh molds.state)
6033+ ?. (levy pairs |=(p=upair =(%disjoint relation.p))) ~
6034+ =/ cs=(unit [types=(list itype) state=istate]) (infer-shape-args cases.sh state)
6035+ ?~ cs ~
6036+ `[[%union types.u.cs ~ ~ ~] state.u.cs]
51346037 %cell (infer-simple-fields fields.sh state)
51356038 %fn
51366039 =/ arg=(unit [typ=itype state=istate]) $(sh sample.sh)
@@ -5145,9 +6048,10 @@
51456048 ?^ t.t.names.sh ~
51466049 =/ iface=(unit ifile) (find-jibb-interface i.t.names.sh jimports.state)
51476050 ?^ iface
5148− =/ found=(unit itype) (find-jibb-mold n u.iface)
6051+ =/ found=(unit ischeme) (find-jibb-mold n u.iface)
51496052 ?~ found ~
5150− `[u.found state]
6053+ ?^ vars.u.found ~
6054+ `[(itype-in-import typ.u.found u.iface i.t.names.sh prelude.state) state]
51516055 =/ found=(unit itype)
51526056 (find-imported-mold i.t.names.sh n externals.state surs.state)
51536057 ?~ found ~
@@ -5159,16 +6063,62 @@
51596063 `[u.imported state]
51606064 ?: (lien active.state |=(x=term =(x n))) ~
51616065 =/ found=(unit shape) (find-simple-mold n molds.state)
5162− ?~ found ~
6066+ ?~ found
6067+ ?: (lien molds.state |=(m=[name=term body=shape] =(name.m n))) ~
6068+ ?~ prelude.state ~
6069+ =/ prelude-entry=(unit ischeme) (find-jibb-mold n u.prelude.state)
6070+ ?~ prelude-entry ~
6071+ ?^ vars.u.prelude-entry ~
6072+ `[typ.u.prelude-entry state]
51636073 =/ out=(unit [typ=itype state=istate])
5164− $(sh u.found, state state(active [n active.state], in-mold &))
6074+ $(sh u.found, state state(active [n active.state], in-mold &, params ~))
51656075 ?~ out ~
5166− `[typ.u.out state.u.out(active active.state, in-mold in-mold.state)]
6076+ `[(label-direct-union typ.u.out u.found n state) state.u.out(active active.state, in-mold in-mold.state, params params.state)]
6077+ %apply
6078+ ?~ ref.sh ~
6079+ =/ args=(unit [types=(list itype) state=istate]) (infer-shape-args args.sh state)
6080+ ?~ args ~
6081+ =/ n=term i.ref.sh
6082+ ?^ t.ref.sh
6083+ ?^ t.t.ref.sh ~
6084+ =/ iface=(unit ifile) (find-jibb-interface i.t.ref.sh jimports.state.u.args)
6085+ ?~ iface ~
6086+ =/ template=(unit ischeme) (find-jibb-mold n u.iface)
6087+ ?~ template ~
6088+ ?~ vars.u.template ~
6089+ =/ applied=(unit itype) (template-apply u.template types.u.args)
6090+ ?~ applied ~
6091+ `[(itype-in-import u.applied u.iface i.t.ref.sh prelude.state.u.args) state.u.args]
6092+ ?: (lien active.state.u.args |=(x=term =(x n))) ~
6093+ =/ found=(unit shape) (find-simple-mold n molds.state.u.args)
6094+ ?~ found
6095+ ?: (lien molds.state.u.args |=(m=[name=term body=shape] =(name.m n))) ~
6096+ ?~ prelude.state.u.args ~
6097+ =/ prelude-entry=(unit ischeme) (find-jibb-mold n u.prelude.state.u.args)
6098+ ?~ prelude-entry ~
6099+ ?~ vars.u.prelude-entry ~
6100+ =/ applied=(unit itype) (template-apply u.prelude-entry types.u.args)
6101+ ?~ applied ~
6102+ `[u.applied state.u.args]
6103+ ?. ?=(%generic -.u.found) ~
6104+ ?. (distinct-params vars.u.found) ~
6105+ =/ params=(unit iparams) (bind-params vars.u.found types.u.args)
6106+ ?~ params ~
6107+ =/ out=(unit [typ=itype state=istate])
6108+ $(sh body.u.found, state state.u.args(active [n active.state.u.args], in-mold &, params u.params))
6109+ ?~ out ~
6110+ ?: &(?=(%union -.typ.u.out) !?=(%union -.body.u.found) ?=(~ origin.typ.u.out)) ~
6111+ ?: &(?=(%union -.typ.u.out) ?=(%union -.body.u.found) !(lien top-molds.state.u.args |=(x=term =(x n)))) ~
6112+ =? typ.u.out &(?=(%union -.typ.u.out) ?=(%union -.body.u.found))
6113+ (label-direct-union typ.u.out(args types.u.args) u.found n state.u.args)
6114+ `[typ.u.out state.u.out(active active.state.u.args, in-mold in-mold.state.u.args, params params.state.u.args)]
51676115 %tvar
6116+ =/ param=(unit itype) (iparam-lookup name.sh params.state)
6117+ ?^ param `[u.param state]
51686118 ?: in-mold.state ~
51696119 =/ n=(unit @ud) (icap-lookup name.sh caps.state)
51706120 ?^ n `[[%var u.n] state]
5171− `[[%var next.state] state(next +(next.state), caps [[name.sh next.state] caps.state])]
6121+ `[[%var next.state] state(next +(next.state), caps [[name.sh next.state at.sh] caps.state])]
51726122 * ~
51736123 ==
51746124::
@@ -5176,13 +6126,25 @@
51766126 |= [fields=(list field) state=istate]
51776127 ^- (unit [typ=itype state=istate])
51786128 ?~ fields ~
5179− ?. ?=(%bare -.i.fields) ~
5180− =/ head=(unit [typ=itype state=istate]) (infer-simple-shape shape.i.fields state)
6129+ =/ field-shape=shape
6130+ ?- -.i.fields
6131+ %bare shape.i.fields
6132+ %face shape.i.fields
6133+ %pun [%ref at.i.fields ~[name.i.fields]]
6134+ ==
6135+ =/ head=(unit [typ=itype state=istate]) (infer-simple-shape field-shape state)
51816136 ?~ head ~
5182− ?~ t.fields head
6137+ =/ t=itype typ.u.head
6138+ =. t
6139+ ?- -.i.fields
6140+ %bare t
6141+ %face [%face name.i.fields t]
6142+ %pun [%face name.i.fields t]
6143+ ==
6144+ ?~ t.fields `[t state.u.head]
51836145 =/ tail=(unit [typ=itype state=istate]) $(fields t.fields, state state.u.head)
51846146 ?~ tail ~
5185− `[[%cell typ.u.head typ.u.tail] state.u.tail]
6147+ `[[%cell t typ.u.tail] state.u.tail]
51866148::
51876149++ infer-sample
51886150 |= [s=sample env=ienv state=istate]
@@ -5203,12 +6165,37 @@
52036165 =/ t=(unit [typ=itype state=istate]) (infer-simple-shape shape.s state)
52046166 ?~ t [%| "sample mold is not supported by partial inference"]
52056167 [%& typ.u.t env state.u.t]
5206− * [%| "sample is not supported by partial inference"]
6168+ %pun
6169+ $(s [%face at.s name.s [%ref at.s ~[name.s]]])
6170+ %cell
6171+ (infer-sample-items items.s env state)
52076172 ==
52086173::
6174+:: Cell-sample binders are faces on their positions; at the top of a
6175+:: sample a binder only supplies a name for the whole sample.
6176+::
6177+++ infer-sample-items
6178+ |= [items=(list sample) env=ienv state=istate]
6179+ ^- isample-result
6180+ ?~ items [%| "empty sample is not supported by partial inference"]
6181+ =/ head=isample-result (infer-sample i.items env state)
6182+ ?: ?=(%| -.head) head
6183+ =/ ht=itype typ.p.head
6184+ =. ht
6185+ ?- -.i.items
6186+ %bind [%face name.i.items ht]
6187+ %face [%face name.i.items ht]
6188+ %pun [%face name.i.items ht]
6189+ * ht
6190+ ==
6191+ ?~ t.items [%& ht env.p.head state.p.head]
6192+ =/ tail=isample-result $(items t.items, env env.p.head, state state.p.head)
6193+ ?: ?=(%| -.tail) tail
6194+ [%& [%cell ht typ.p.tail] env.p.tail state.p.tail]
6195+::
52096196:: Local definitions generalize only variables outside their enclosing
5210−:: environment and explicit-capital scope. Unresolved groups stay
5211−:: unsupported: this fragment does not infer recursive definitions.
6197+:: environment and explicit-capital scope. Recursive gate groups use
6198+:: monomorphic placeholders while their bodies are checked.
52126199::
52136200+$ ilocal-result (each [env=ienv state=istate] idiag)
52146201++ free-env-vars
@@ -5272,11 +6259,150 @@
52726259 ^- ?
52736260 ?~ locals &
52746261 =/ m=[name=term body=shape] i.locals
5275− =/ inferred=(unit [typ=itype state=istate])
5276− (infer-simple-shape body.m state(active [name.m active.state], in-mold &))
6262+ =/ inferred=(unit [template=ischeme state=istate])
6263+ (infer-mold-template body.m state(active [name.m active.state], in-mold &))
52776264 ?~ inferred |
52786265 $(locals t.locals)
52796266::
6267+:: Gather written capitals belonging to one ++. Nested local definitions
6268+:: establish their own scopes; inline gates remain in the enclosing scope.
6269++$ icap-site [name=@t at=span]
6270+++ scope-shape
6271+ |= s=shape
6272+ ^- (list icap-site)
6273+ ?- -.s
6274+ %tvar ~[[name.s at.s]]
6275+ %apply (zing (turn args.s scope-shape))
6276+ %cell (zing (turn fields.s scope-field))
6277+ %union (zing (turn cases.s scope-shape))
6278+ %fn (weld (scope-shape sample.s) (scope-shape product.s))
6279+ %generic
6280+ =/ inside=(list icap-site) (scope-shape body.s)
6281+ (skim inside |=(site=icap-site !(lien vars.s |=(v=@t =(v name.site)))))
6282+ * ~
6283+ ==
6284+::
6285+++ scope-field
6286+ |= f=field
6287+ ^- (list icap-site)
6288+ ?- -.f
6289+ %face (scope-shape shape.f)
6290+ %bare (scope-shape shape.f)
6291+ %pun ~
6292+ ==
6293+::
6294+++ scope-sample
6295+ |= s=sample
6296+ ^- (list icap-site)
6297+ ?- -.s
6298+ %face (scope-shape shape.s)
6299+ %bare (scope-shape shape.s)
6300+ %cell (zing (turn items.s scope-sample))
6301+ * ~
6302+ ==
6303+::
6304+++ scope-pieces
6305+ |= ps=(list piece)
6306+ ^- (list icap-site)
6307+ ?~ ps ~
6308+ =/ first=(list icap-site)
6309+ ?- -.i.ps
6310+ %expr (scope-expr p.i.ps)
6311+ %text ~
6312+ ==
6313+ (weld first $(ps t.ps))
6314+::
6315+++ scope-qsegs
6316+ |= ps=(list qseg)
6317+ ^- (list icap-site)
6318+ ?~ ps ~
6319+ =/ first=(list icap-site)
6320+ ?- -.i.ps
6321+ %expr (scope-expr p.i.ps)
6322+ %knot ~
6323+ ==
6324+ (weld first $(ps t.ps))
6325+::
6326+++ scope-edits
6327+ |= xs=(list edit)
6328+ ^- (list icap-site)
6329+ ?~ xs ~
6330+ =/ first=(list icap-site) (scope-expr val.i.xs)
6331+ (weld first $(xs t.xs))
6332+::
6333+++ scope-items
6334+ |= xs=(list item)
6335+ ^- (list icap-site)
6336+ ?~ xs ~
6337+ =/ first=(list icap-site) (scope-expr val.i.xs)
6338+ (weld first $(xs t.xs))
6339+::
6340+++ scope-arms
6341+ |= xs=(list arm)
6342+ ^- (list icap-site)
6343+ ?~ xs ~
6344+ =/ first=(list icap-site) (scope-expr val.i.xs)
6345+ (weld first $(xs t.xs))
6346+::
6347+++ scope-exprs
6348+ |= xs=(list expr)
6349+ ^- (list icap-site)
6350+ ?~ xs ~
6351+ =/ first=(list icap-site) (scope-expr i.xs)
6352+ (weld first $(xs t.xs))
6353+::
6354+++ scope-expr
6355+ |= e=expr
6356+ ^- (list icap-site)
6357+ ?- -.e
6358+ %str (scope-pieces pieces.e)
6359+ %qath (scope-qsegs segs.e)
6360+ %change (scope-edits edits.e)
6361+ %pair (scope-expr val.e)
6362+ %unit (scope-expr val.e)
6363+ %group (scope-expr inner.e)
6364+ %list (scope-exprs items.e)
6365+ %tuple (scope-items items.e)
6366+ %gate
6367+ =/ first=(list icap-site) (scope-sample sample.e)
6368+ =/ last=(list icap-site) (scope-expr body.e)
6369+ (weld first last)
6370+ %gate-wide
6371+ =/ first=(list icap-site) (scope-sample sample.e)
6372+ =/ last=(list icap-site) (scope-expr body.e)
6373+ (weld first last)
6374+ %call
6375+ =/ first=(list icap-site) (scope-expr head.e)
6376+ =/ last=(list icap-site) (scope-exprs args.e)
6377+ (weld first last)
6378+ %cast
6379+ =/ first=(list icap-site) (scope-shape shape.e)
6380+ =/ last=(list icap-site) (scope-expr val.e)
6381+ (weld first last)
6382+ %trace
6383+ =/ first=(list icap-site) (scope-expr val.e)
6384+ =/ last=(list icap-site) (scope-expr then.e)
6385+ (weld first last)
6386+ %branch
6387+ =/ first=(list icap-site) (scope-expr subject.e)
6388+ =/ last=(list icap-site) (scope-arms arms.e)
6389+ (weld first last)
6390+ %body (scope-expr final.e)
6391+ * ~
6392+ ==
6393+::
6394+++ reserve-cap-sites
6395+ |= [sites=(list icap-site) state=istate]
6396+ ^- istate
6397+ ?~ sites state
6398+ ?: ?=(^ (icap-lookup name.i.sites caps.state)) $(sites t.sites)
6399+ $(sites t.sites, state state(next +(next.state), caps [[name.i.sites next.state at.i.sites] caps.state]))
6400+::
6401+++ reserve-def-caps
6402+ |= [e=expr state=istate]
6403+ ^- istate
6404+ (reserve-cap-sites (scope-expr e) state)
6405+::
52806406++ infer-local-defs
52816407 |= [ds=(list def) env=ienv state=istate]
52826408 ^- ilocal-result
@@ -5285,56 +6411,890 @@
52856411 |-
52866412 ?~ ds
52876413 ?~ remaining [%& env state]
5288− ?. progressed [%| ["local definitions need unsupported inference" ~]]
6414+ ?. progressed
6415+ =/ pending=(list def) (flop remaining)
6416+ =/ groups=icomponents (graph-components pending (global-value-names pending))
6417+ =/ grouped=(unit [rest=(list def) env=ienv state=istate])
6418+ (try-local-group pending groups env state)
6419+ ?~ grouped [%| ["local definitions need unsupported inference" ~]]
6420+ $(ds rest.u.grouped, remaining ~, env env.u.grouped, state state.u.grouped, progressed |)
52896421 $(ds (flop remaining), remaining ~, progressed |)
52906422 =/ d=def i.ds
52916423 ?> ?=(%value -.d)
5292− =/ inferred=iresult (infer-fragment val.d env state)
6424+ =/ local-state=istate (reserve-def-caps val.d state)
6425+ =/ inferred=iresult (infer-fragment val.d env local-state)
6426+ =/ retried=? ?=(%| -.inferred)
6427+ =? inferred retried (infer-recursive-gate d env local-state)
52936428 ?: ?=(%| -.inferred) $(ds t.ds, remaining [d remaining])
6429+ =/ merged=(unit [first=icap second=icap])
6430+ (merged-capitals caps.state.p.inferred sub.state.p.inferred)
6431+ ?^ merged
6432+ [%| ["distinct type variables `{(trip name.first.u.merged)}` and `{(trip name.second.u.merged)}` must not be forced equal; use the same capital for a shared type" ~[[at.first.u.merged "first type variable"] [at.second.u.merged "second type variable"]]]]
6433+ ?: (constrained-capitals caps.state.p.inferred sub.state.p.inferred)
6434+ [%| ["explicit capital constraints are not supported by partial inference" ~]]
52946435 =/ typ=itype (itype-normalize typ.p.inferred sub.state.p.inferred)
6436+ ?: |((pending-tags tags.state.p.inferred sub.state.p.inferred) (itype-has-tag typ))
6437+ $(ds t.ds, remaining [d remaining])
52956438 ?: (unsupported-atom-vars typ caps.state.p.inferred binders.state.p.inferred sub.state.p.inferred)
52966439 $(ds t.ds, remaining [d remaining])
52976440 =/ free=(list @ud)
5298− (weld (free-env-vars env sub.state.p.inferred) (free-cap-vars caps.state.p.inferred sub.state.p.inferred))
6441+ (weld (free-env-vars env sub.state.p.inferred) (free-cap-vars caps.state sub.state.p.inferred))
52996442 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
53006443 =. vars (skim vars |=(n=@ud !(lien free |=(f=@ud =(f n)))))
5301− $(ds t.ds, env [[name.d [typ vars]] env], state state.p.inferred, progressed &)
6444+ $(ds t.ds, env [[name.d [typ vars]] env], state state.p.inferred(caps caps.state), progressed &)
6445+::
6446+:: Try complete cyclic local groups after individual definitions stall.
6447+:: Components with non-gates or unresolved constraints stay unavailable.
6448+::
6449+++ try-local-group
6450+ |= [ds=(list def) groups=icomponents env=ienv state=istate]
6451+ ^- (unit [rest=(list def) env=ienv state=istate])
6452+ ?~ groups ~
6453+ =/ names=(list term) i.groups
6454+ ?. (gth (lent names) 1) $(groups t.groups)
6455+ =/ members=(list def)
6456+ (skim ds |=(d=def &(?=(%value -.d) (lien names |=(n=term =(n name.d))))))
6457+ ?. =((lent members) (lent names)) $(groups t.groups)
6458+ =/ result=ilocal-result (infer-gate-group members env state)
6459+ ?: ?=(%| -.result) $(groups t.groups)
6460+ =/ rest=(list def)
6461+ (skim ds |=(d=def !(lien names |=(n=term =(n name.d)))))
6462+ =/ more=(unit [rest=(list def) env=ienv state=istate])
6463+ $(ds rest, groups t.groups, env env.p.result, state state.p.result)
6464+ ?^ more more
6465+ `[rest env.p.result state.p.result]
6466+::
6467+:: Read only fields of a known record. Unresolved field constraints and
6468+:: ambiguous repeated faces are outside this fragment. Imported record
6469+:: spines with repeated names are unavailable when used.
6470+::
6471+++ record-fields-named
6472+ |= [name=term t=itype sub=isub]
6473+ ^- (list itype)
6474+ =. t (itype-walk t sub)
6475+ ?: ?=(%face -.t)
6476+ ?:(=(name name.t) ~[body.t] ~)
6477+ ?. ?=(%cell -.t) ~
6478+ =/ first=(list itype) ~
6479+ =/ head=itype (itype-walk hed.t sub)
6480+ =? first ?=(%face -.head) ?:(=(name name.head) ~[body.head] ~)
6481+ (weld first $(t tal.t))
6482+::
6483+++ infer-field-wing
6484+ |= [names=(list term) env=ienv state=istate]
6485+ ^- iresult
6486+ =/ reverse=(list term) (flop names)
6487+ ?~ reverse [%| ["empty wing" ~]]
6488+ =/ scheme=(unit ischeme) (ienv-lookup i.reverse env)
6489+ ?~ scheme [%| ["field access is not supported by partial inference" ~]]
6490+ =/ inst=[typ=itype state=istate] (instantiate-scheme u.scheme state)
6491+ =/ fields=(list term) t.reverse
6492+ =/ typ=itype typ.inst
6493+ |-
6494+ ?~ fields [%& typ state.inst]
6495+ =/ found=(list itype) (record-fields-named i.fields typ sub.state.inst)
6496+ ?~ found [%| ["field is not available to partial inference" ~]]
6497+ ?^ t.found [%| ["field name is ambiguous in partial inference" ~]]
6498+ $(fields t.fields, typ i.found)
53026499::
5303−++ infer-fragment
5304− |= [e=expr env=ienv state=istate]
6500+:: Propagate a known union or list through supported loobean, unit and list
6501+:: branches. Empty bodies and groups are transparent; bodies with definitions
6502+:: keep their normal scoping and wait for general bidirectional inference.
6503+::
6504+++ context-union-branch
6505+ |= e=expr
6506+ ^- ?
6507+ ?- -.e
6508+ %branch &
6509+ %group $(e inner.e)
6510+ %body ?~(defs.e $(e final.e) |)
6511+ * |
6512+ ==
6513+::
6514+++ infer-union-context
6515+ |= [e=expr expected=itype env=ienv state=istate context=span]
53056516 ^- iresult
6517+ ?: ?=(%group -.e) $(e inner.e)
6518+ ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
6519+ ?: &(?=(%collection -.expected) =(%list name.expected) (context-list-expression e))
6520+ (infer-list-context e expected env state context)
6521+ ?: ?=(%branch -.e)
6522+ ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
6523+ ?~ t.arms.e [%| ["branch pattern is not supported by partial inference" ~]]
6524+ ?^ t.t.arms.e [%| ["branch is not supported by partial inference" ~]]
6525+ =/ x=arm i.arms.e
6526+ =/ y=arm i.t.arms.e
6527+ ?: |((unit-empty-pattern pat.x) (unit-empty-pattern pat.y))
6528+ (infer-unit-branch e env state `[expected context])
6529+ ?. &(?=(%lit -.pat.x) ?=(%lit -.pat.y))
6530+ [%| ["branch pattern is not supported by partial inference" ~]]
6531+ ?. &(=(%loobean form.lit.pat.x) =(%loobean form.lit.pat.y))
6532+ [%| ["branch pattern is not supported by partial inference" ~]]
6533+ ?: =(val.lit.pat.x val.lit.pat.y)
6534+ [%| ["branch does not cover both loobeans" ~]]
6535+ =/ subject=iresult (infer-fragment subject.e env state)
6536+ ?: ?=(%| -.subject) subject
6537+ =/ subject-type=itype (itype-normalize typ.p.subject sub.state.p.subject)
6538+ ?: ?=(%union -.subject-type)
6539+ [%| ["contextual union-pattern branch is not supported by partial inference" ~]]
6540+ =/ su=(unit isub) (itype-unify typ.p.subject [%flag ~] sub.state.p.subject)
6541+ ?~ su [%| ["loobean branch subject does not unify with ?" ~]]
6542+ =/ left=iresult $(e val.x, state state.p.subject(sub u.su))
6543+ ?: ?=(%| -.left) left
6544+ =/ right=iresult $(e val.y, state state.p.left)
6545+ ?: ?=(%| -.right) right
6546+ [%& expected state.p.right]
6547+ =/ value=iresult (infer-fragment e env state)
6548+ ?: ?=(%| -.value) value
6549+ =/ fit=ifit (itype-fit typ.p.value expected sub.state.p.value next.state.p.value)
6550+ ?: ?=(%unknown -.fit)
6551+ ?: &(?=(%collection -.expected) =(%list name.expected))
6552+ [%| ["branch list constraint is not supported by partial inference" ~]]
6553+ [%| ["branch union constraint is not supported by partial inference" ~]]
6554+ ?: ?=(%bad -.fit)
6555+ =/ missing=(unit idiag) (missing-union-tag e expected sub.state.p.value context)
6556+ ?^ missing [%| u.missing]
6557+ =/ nested=(unit idiag) (nested-missing-tag e typ.p.value expected sub.state.p.value next.state.p.value context)
6558+ ?^ nested [%| u.nested]
6559+ ?: &(?=(%collection -.expected) =(%list name.expected))
6560+ [%| ["branch arm does not fit its expected list" ~[[context "expected list"] [(span-of e) "branch arm"]]]]
6561+ [%| ["branch arm does not fit its expected union" ~[[context "expected union"] [(span-of e) "branch arm"]]]]
6562+ [%& expected state.p.value(sub sub.fit, next next.fit)]
6563+::
6564+:: A list expression needs a known list target and the validated prelude list.
6565+:: Literal items and unfaced two-item cons cells receive that target one by
6566+:: one; pending constraints elsewhere stay in the threaded state.
6567+::
6568+++ context-list-expression
6569+ |= e=expr
6570+ ^- ?
53066571 ?- -.e
5307− %lit
5308− ?- form.lit.e
5309− %number ?: =(%ud aura.lit.e)
5310− [%& [%nvar next.state] state(next +(next.state))]
5311− [%& [%atom aura.lit.e] state]
5312− %ship [%& [%atom %p] state]
5313− %date [%& [%atom %da] state]
5314− %duration [%& [%atom %dr] state]
5315− %knot [%& [%atom %ta] state]
5316− %loobean [%& [%flag ~] state]
5317− * [%| ["literal needs contextual inference" ~]]
5318− ==
5319− %str
5320− =/ interpolated=? (lien pieces.e |=(p=piece ?=(%expr -.p)))
5321− ?: interpolated [%| ["interpolation is not supported by partial inference" ~]]
5322− [%& [%atom %t] state]
5323− %wing
5324− ?~ names.e [%| ["empty wing" ~]]
5325− ?^ t.names.e
5326− ?^ t.t.names.e [%| ["field access is not supported by partial inference" ~]]
5327− =/ iface=(unit ifile) (find-jibb-interface i.t.names.e jimports.state)
5328− ?~ iface [%| ["field access is not supported by partial inference" ~]]
5329− =/ member=(unit ischeme) (ienv-lookup i.names.e values.u.iface)
6572+ %list &
6573+ %tuple &
6574+ %lit |(=(%null form.lit.e) &(=(%term form.lit.e) =(0 val.lit.e)))
6575+ %group $(e inner.e)
6576+ %body ?~(defs.e $(e final.e) |)
6577+ * |
6578+ ==
6579+::
6580+++ infer-list-context
6581+ |= [e=expr expected=itype env=ienv state=istate context=span]
6582+ ^- iresult
6583+ ?: ?=(%group -.e) $(e inner.e)
6584+ ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
6585+ ?~ prelude.state [%| ["list literal needs the standard prelude in partial inference" ~]]
6586+ ?. =(at.u.prelude.state /lib/jibb/prelude/jibb)
6587+ [%| ["list literal needs the standard prelude in partial inference" ~]]
6588+ =/ standard=(unit ischeme) (find-jibb-mold %list u.prelude.state)
6589+ ?~ standard [%| ["list literal needs the standard prelude in partial inference" ~]]
6590+ ?. =(u.standard [[%collection %list ~[[%var 0]]] ~[0]])
6591+ [%| ["list literal needs the standard prelude in partial inference" ~]]
6592+ =/ target=itype (itype-walk expected sub.state)
6593+ ?. ?=(%collection -.target) [%| ["list context is not supported by partial inference" ~]]
6594+ ?. =(%list name.target) [%| ["list context is not supported by partial inference" ~]]
6595+ ?~ args.target [%| ["list context is not supported by partial inference" ~]]
6596+ ?^ t.args.target [%| ["list context is not supported by partial inference" ~]]
6597+ ?: ?=(%lit -.e)
6598+ ?. |(=(%null form.lit.e) &(=(%term form.lit.e) =(0 val.lit.e)))
6599+ [%| ["list expression is not supported by partial inference" ~]]
6600+ [%& target state]
6601+ ?: ?=(%list -.e)
6602+ =/ result=iresult (infer-list-items items.e i.args.target env state context)
6603+ ?: ?=(%| -.result) result
6604+ [%& target state.p.result]
6605+ ?. ?=(%tuple -.e) [%| ["list expression is not supported by partial inference" ~]]
6606+ ?~ items.e [%| ["cons shape is not supported by partial inference" ~]]
6607+ ?~ t.items.e [%| ["cons shape is not supported by partial inference" ~]]
6608+ ?^ t.t.items.e [%| ["cons shape is not supported by partial inference" ~]]
6609+ ?^ face.i.items.e [%| ["faced cons is not supported by partial inference" ~]]
6610+ ?^ face.i.t.items.e [%| ["faced cons is not supported by partial inference" ~]]
6611+ =/ head=iresult (infer-list-items ~[val.i.items.e] i.args.target env state context)
6612+ ?: ?=(%| -.head) head
6613+ =/ target=itype (itype-walk target sub.state.p.head)
6614+ =/ tail=iresult
6615+ ?: (context-list-expression val.i.t.items.e)
6616+ (infer-list-context val.i.t.items.e target env state.p.head context)
6617+ (infer-fragment val.i.t.items.e env state.p.head)
6618+ ?: ?=(%| -.tail) tail
6619+ =/ fit=ifit (itype-fit typ.p.tail target sub.state.p.tail next.state.p.tail)
6620+ ?: ?=(%unknown -.fit) [%| ["list tail constraint is not supported by partial inference" ~]]
6621+ ?: ?=(%bad -.fit)
6622+ [%| ["list tail does not fit its expected type" ~[[context (site-type-note "expected list" target sub.state.p.tail)] [(span-of val.i.t.items.e) (site-type-note "list tail" typ.p.tail sub.state.p.tail)]]]]
6623+ [%& target state.p.tail(sub sub.fit, next next.fit)]
6624+::
6625+++ infer-open-list-items
6626+ |= [items=(list expr) expected=itype env=ienv state=istate context=span]
6627+ ^- iresult
6628+ ?~ items [%& expected state]
6629+ =/ target=itype (itype-walk expected sub.state)
6630+ =/ value=iresult (infer-call-context-arg i.items target env state context)
6631+ ?: ?=(%| -.value) value
6632+ =/ fit=ifit (itype-fit typ.p.value target sub.state.p.value next.state.p.value)
6633+ ?: ?=(%unknown -.fit) [%| ["list item constraint is not supported by partial inference" ~]]
6634+ ?: ?=(%bad -.fit)
6635+ ?: |((itype-family-related typ.p.value target sub.state.p.value) (itype-has-any-atom typ.p.value sub.state.p.value) (itype-has-any-atom target sub.state.p.value))
6636+ [%| ["list item widening is not supported by partial inference" ~]]
6637+ [%| ["list items do not have compatible types" ~[[context (site-type-note "expected item" target sub.state.p.value)] [(span-of i.items) (site-type-note "list item" typ.p.value sub.state.p.value)]]]]
6638+ ?: (itype-has-tag (itype-normalize expected sub.fit))
6639+ [%| ["list item needs context in partial inference" ~]]
6640+ $(items t.items, state state.p.value(sub sub.fit, next next.fit))
6641+::
6642+++ infer-list-items
6643+ |= [items=(list expr) expected=itype env=ienv state=istate context=span]
6644+ ^- iresult
6645+ ?~ items [%& expected state]
6646+ =/ target=itype (itype-walk expected sub.state)
6647+ =/ value=iresult (infer-call-context-arg i.items target env state context)
6648+ ?: ?=(%| -.value) value
6649+ =/ fit=ifit (itype-fit typ.p.value target sub.state.p.value next.state.p.value)
6650+ ?: ?=(%unknown -.fit) [%| ["list item constraint is not supported by partial inference" ~]]
6651+ ?: ?=(%bad -.fit)
6652+ =/ missing=(unit idiag) (missing-union-tag i.items target sub.state.p.value context)
6653+ ?^ missing [%| u.missing]
6654+ =/ nested=(unit idiag) (nested-missing-tag i.items typ.p.value target sub.state.p.value next.state.p.value context)
6655+ ?^ nested [%| u.nested]
6656+ [%| ["list item does not fit its expected type" ~[[context (site-type-note "expected item" target sub.state.p.value)] [(span-of i.items) (site-type-note "list item" typ.p.value sub.state.p.value)]]]]
6657+ $(items t.items, state state.p.value(sub sub.fit, next next.fit))
6658+::
6659+:: The supported unit pattern covers exactly an atom zero and a cell
6660+:: headed by zero, with a single binder for its payload. Unresolved
6661+:: subjects and all other pattern matrices stay outside this fragment.
6662+::
6663+++ unit-empty-pattern
6664+ |= p=pattern
6665+ ^- ?
6666+ ?. ?=(%lit -.p) |
6667+ =(%null form.lit.p)
6668+::
6669+++ unit-payload-pattern
6670+ |= p=pattern
6671+ ^- (unit term)
6672+ ?. ?=(%cell -.p) ~
6673+ ?~ items.p ~
6674+ ?~ t.items.p ~
6675+ ?^ t.t.items.p ~
6676+ ?. (unit-empty-pattern i.items.p) ~
6677+ ?. ?=(%bind -.i.t.items.p) ~
6678+ `name.i.t.items.p
6679+::
6680+++ unit-empty-case
6681+ |= t=itype
6682+ ^- ?
6683+ ?. ?=(%const -.t) |
6684+ =(0 val.literal.t)
6685+::
6686+++ unit-payload-case
6687+ |= t=itype
6688+ ^- (unit itype)
6689+ ?. ?=(%cell -.t) ~
6690+ ?. (unit-empty-case hed.t) ~
6691+ =/ payload=itype tal.t
6692+ =? payload ?=(%face -.payload) body.payload
6693+ `payload
6694+::
6695+++ unit-union-payload
6696+ |= t=itype
6697+ ^- (unit itype)
6698+ ?. ?=(%union -.t) ~
6699+ ?~ cases.t ~
6700+ ?~ t.cases.t ~
6701+ ?^ t.t.cases.t ~
6702+ ?: (unit-empty-case i.cases.t) (unit-payload-case i.t.cases.t)
6703+ ?: (unit-empty-case i.t.cases.t) (unit-payload-case i.cases.t)
6704+ ~
6705+::
6706+:: List matching currently covers exactly null and a cell of two binders.
6707+:: The head has the element type and the tail has the whole list type.
6708+:: Other patterns and lists whose element mold is empty remain unsupported.
6709+::
6710+++ list-payload-pattern
6711+ |= p=pattern
6712+ ^- (unit [head=term tail=term])
6713+ ?. ?=(%cell -.p) ~
6714+ ?~ items.p ~
6715+ ?~ t.items.p ~
6716+ ?^ t.t.items.p ~
6717+ ?. ?=(%bind -.i.items.p) ~
6718+ ?. ?=(%bind -.i.t.items.p) ~
6719+ `[name.i.items.p name.i.t.items.p]
6720+::
6721+++ infer-list-branch
6722+ |= [e=expr env=ienv state=istate expected=(unit [typ=itype context=span]) typ=itype]
6723+ ^- iresult
6724+ ?> ?=(%branch -.e)
6725+ ?> ?=(%collection -.typ)
6726+ ?. =(%list name.typ) [%| ["list pattern is not supported by partial inference" ~]]
6727+ ?~ prelude.state [%| ["list pattern needs the standard prelude in partial inference" ~]]
6728+ ?. =(at.u.prelude.state /lib/jibb/prelude/jibb)
6729+ [%| ["list pattern needs the standard prelude in partial inference" ~]]
6730+ =/ standard=(unit ischeme) (find-jibb-mold %list u.prelude.state)
6731+ ?~ standard [%| ["list pattern needs the standard prelude in partial inference" ~]]
6732+ ?. =(u.standard [[%collection %list ~[[%var 0]]] ~[0]])
6733+ [%| ["list pattern needs the standard prelude in partial inference" ~]]
6734+ ?~ args.typ [%| ["list pattern is not supported by partial inference" ~]]
6735+ ?^ t.args.typ [%| ["list pattern is not supported by partial inference" ~]]
6736+ ?~ arms.e [%| ["list branch is not supported by partial inference" ~]]
6737+ ?~ t.arms.e [%| ["list branch is not supported by partial inference" ~]]
6738+ ?^ t.t.arms.e [%| ["list branch is not supported by partial inference" ~]]
6739+ =/ x=arm i.arms.e
6740+ =/ y=arm i.t.arms.e
6741+ =/ first-empty=? (unit-empty-pattern pat.x)
6742+ =/ first-name=(unit [head=term tail=term]) (list-payload-pattern pat.x)
6743+ =/ second-name=(unit [head=term tail=term]) (list-payload-pattern pat.y)
6744+ ?. |(&(first-empty ?=(^ second-name)) &((unit-empty-pattern pat.y) ?=(^ first-name)))
6745+ [%| ["list branch pattern is not supported by partial inference" ~]]
6746+ =/ binder=(unit [head=term tail=term]) ?:(first-empty second-name first-name)
6747+ ?~ binder [%| ["list branch pattern is not supported by partial inference" ~]]
6748+ ?: |(=(head.u.binder tail.u.binder) ?=(^ (ienv-lookup head.u.binder env)) ?=(^ (ienv-lookup tail.u.binder env)) (lien globals.state |=(n=term |(=(n head.u.binder) =(n tail.u.binder)))))
6749+ [%| ["pattern binder shadows a name" ~]]
6750+ =/ extended=ienv [[head.u.binder [i.args.typ ~]] [tail.u.binder [typ ~]] env]
6751+ =/ left=iresult
6752+ ?~ expected (infer-fragment val.x ?:(first-empty env extended) state)
6753+ (infer-union-context val.x typ.u.expected ?:(first-empty env extended) state context.u.expected)
6754+ ?: ?=(%| -.left) left
6755+ =/ right=iresult
6756+ ?~ expected (infer-fragment val.y ?:(first-empty extended env) state.p.left)
6757+ (infer-union-context val.y typ.u.expected ?:(first-empty extended env) state.p.left context.u.expected)
6758+ ?: ?=(%| -.right) right
6759+ ?^ expected [%& typ.u.expected state.p.right]
6760+ =/ joined=(unit isub) (itype-unify typ.p.left typ.p.right sub.state.p.right)
6761+ ?~ joined [%| ["list branch results need unsupported inference" ~]]
6762+ [%& typ.p.left state.p.right(sub u.joined)]
6763+::
6764+++ infer-unit-branch
6765+ |= [e=expr env=ienv state=istate expected=(unit [typ=itype context=span])]
6766+ ^- iresult
6767+ ?> ?=(%branch -.e)
6768+ ?~ arms.e [%| ["unit branch is not supported by partial inference" ~]]
6769+ ?~ t.arms.e [%| ["unit branch is not supported by partial inference" ~]]
6770+ ?^ t.t.arms.e [%| ["unit branch is not supported by partial inference" ~]]
6771+ =/ subject=iresult (infer-fragment subject.e env state)
6772+ ?: ?=(%| -.subject) subject
6773+ =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
6774+ ?: &(?=(%collection -.typ) =(%list name.typ))
6775+ (infer-list-branch e env state.p.subject expected typ)
6776+ =/ x=arm i.arms.e
6777+ =/ y=arm i.t.arms.e
6778+ =/ first-empty=? (unit-empty-pattern pat.x)
6779+ =/ first-name=(unit term) (unit-payload-pattern pat.x)
6780+ =/ second-name=(unit term) (unit-payload-pattern pat.y)
6781+ ?. |(&(first-empty ?=(^ second-name)) &((unit-empty-pattern pat.y) ?=(^ first-name)))
6782+ [%| ["unit branch pattern is not supported by partial inference" ~]]
6783+ =/ binder=(unit term) ?:(first-empty second-name first-name)
6784+ ?~ binder [%| ["unit branch pattern is not supported by partial inference" ~]]
6785+ ?: |(?=(^ (ienv-lookup u.binder env)) (lien globals.state |=(n=term =(n u.binder))))
6786+ [%| ["pattern binder shadows a name" ~]]
6787+ =/ payload=(unit itype) (unit-union-payload typ)
6788+ ?~ payload [%| ["unit branch subject is not supported by partial inference" ~]]
6789+ =/ extended=ienv [[u.binder [u.payload ~]] env]
6790+ =/ left=iresult
6791+ ?~ expected (infer-fragment val.x ?:(first-empty env extended) state.p.subject)
6792+ (infer-union-context val.x typ.u.expected ?:(first-empty env extended) state.p.subject context.u.expected)
6793+ ?: ?=(%| -.left) left
6794+ =/ right=iresult
6795+ ?~ expected (infer-fragment val.y ?:(first-empty extended env) state.p.left)
6796+ (infer-union-context val.y typ.u.expected ?:(first-empty extended env) state.p.left context.u.expected)
6797+ ?: ?=(%| -.right) right
6798+ ?^ expected [%& typ.u.expected state.p.right]
6799+ =/ joined=(unit isub) (itype-unify typ.p.left typ.p.right sub.state.p.right)
6800+ ?~ joined [%| ["unit branch results need unsupported inference" ~]]
6801+ [%& typ.p.left state.p.right(sub u.joined)]
6802+::
6803+:: Infer pieces in order, retaining their substitutions and pending tags.
6804+:: A bare decimal literal has no outside type constraint, so it takes its
6805+:: normal @ud default here. Other open numeric and aura variables wait for
6806+:: deferred constraints, which this fragment does not implement yet.
6807+++ infer-string-pieces
6808+ |= [ps=(list piece) env=ienv state=istate]
6809+ ^- iresult
6810+ ?~ ps [%& [%atom %t] state]
6811+ ?: ?=(%text -.i.ps) $(ps t.ps)
6812+ =/ item=iresult (infer-fragment p.i.ps env state)
6813+ ?: ?=(%| -.item) item
6814+ =/ t=itype (itype-normalize typ.p.item sub.state.p.item)
6815+ ?: |(?=(%atom -.t) ?=(%any-atom -.t))
6816+ $(ps t.ps, state state.p.item)
6817+ ?: &(?=(%nvar -.t) ?=(%lit -.p.i.ps) =(%number form.lit.p.i.ps))
6818+ $(ps t.ps, state state.p.item)
6819+ ?: &(?=(%collection -.t) =(%list name.t) =(~[[%atom 'tD']] args.t))
6820+ $(ps t.ps, state state.p.item)
6821+ ?: &(?=(%avar -.t) (atom-var-from-cap id.t caps.state.p.item sub.state.p.item))
6822+ [%| ["a generic atom in interpolation needs an aura" ~[[(span-of p.i.ps) "atom with a generic aura"]]]]
6823+ ?: ?=(%cell -.t)
6824+ [%| ["a cell in interpolation needs a printer" ~[[(span-of p.i.ps) "cell without a printer"]]]]
6825+ [%| ["interpolation type needs unsupported inference" ~]]
6826+::
6827+:: Whole-case coverage for a known union. When a pattern may cover only
6828+:: part of a case, finite loobean refinements are tried below; other
6829+:: partial coverage stays unsupported until the general pattern matrix.
6830++$ imatch ?(%full %none %unknown)
6831+++ union-pattern-items
6832+ |= [ps=(list pattern) t=itype]
6833+ ^- imatch
6834+ ?~ ps %unknown
6835+ ?~ t.ps (union-pattern i.ps t)
6836+ =. t ?:(?=(%face -.t) body.t t)
6837+ ?. ?=(%cell -.t)
6838+ ?: |(?=(%atom -.t) ?=(%any-atom -.t) ?=(%flag -.t) ?=(%const -.t)) %none
6839+ %unknown
6840+ =/ a=imatch (union-pattern i.ps hed.t)
6841+ =/ b=imatch $(ps t.ps, t tal.t)
6842+ ?: |(=(%none a) =(%none b)) %none
6843+ ?:(&(=(%full a) =(%full b)) %full %unknown)
6844+::
6845+++ union-pattern
6846+ |= [p=pattern t=itype]
6847+ ^- imatch
6848+ =. t ?:(?=(%face -.t) body.t t)
6849+ ?- -.p
6850+ %any %full
6851+ %bind %full
6852+ %lit
6853+ ?: ?=(%const -.t) ?:(=(val.literal.t val.lit.p) %full %none)
6854+ ?: ?=(%cell -.t) %none
6855+ ?: ?=(%flag -.t)
6856+ ?:(|(=(0 val.lit.p) =(1 val.lit.p)) %unknown %none)
6857+ %unknown
6858+ %str ?:(?=(%cell -.t) %none %unknown)
6859+ %cell (union-pattern-items items.p t)
6860+ ==
6861+::
6862+++ union-pattern-has-bind
6863+ |= p=pattern
6864+ ^- ?
6865+ ?: ?=(%bind -.p) &
6866+ ?. ?=(%cell -.p) |
6867+ (lien items.p union-pattern-has-bind)
6868+::
6869+++ union-pattern-bind-items
6870+ |= [ps=(list pattern) t=itype env=ienv globals=(list term)]
6871+ ^- (unit ienv)
6872+ ?~ ps ~
6873+ ?~ t.ps (union-pattern-bind i.ps t env globals)
6874+ =. t ?:(?=(%face -.t) body.t t)
6875+ ?. ?=(%cell -.t) ~
6876+ =/ first=(unit ienv) (union-pattern-bind i.ps hed.t env globals)
6877+ ?~ first ~
6878+ $(ps t.ps, t tal.t, env u.first)
6879+::
6880+++ union-pattern-bind
6881+ |= [p=pattern t=itype env=ienv globals=(list term)]
6882+ ^- (unit ienv)
6883+ =. t ?:(?=(%face -.t) body.t t)
6884+ ?: ?=(%bind -.p)
6885+ ?: |(?=(^ (ienv-lookup name.p env)) (lien globals |=(n=term =(n name.p)))) ~
6886+ `[[name.p [t ~]] env]
6887+ ?: ?=(%cell -.p) (union-pattern-bind-items items.p t env globals)
6888+ `env
6889+::
6890+:: Split loobean fields into finite refinements for partial patterns.
6891+:: Keep original cases for binder types and preserve whole-case matching
6892+:: before trying refinements. Cap products at 64; unknown, empty or opaque
6893+:: shapes stay unsupported rather than implying complete pattern checking.
6894++$ ifinite [origin=@ud base=itype part=itype]
6895+++ finite-product
6896+ |= [hs=(list itype) ts=(list itype) out=(list itype)]
6897+ ^- (list itype)
6898+ ?~ hs out
6899+ =/ rows=(list itype) (turn ts |=(t=itype [%cell i.hs t]))
6900+ $(hs t.hs, out (weld rows out))
6901+::
6902+++ finite-type
6903+ |= t=itype
6904+ ^- (unit (list itype))
6905+ ?- -.t
6906+ %flag
6907+ `~[[%const [%loobean %f 0 '%.y']] [%const [%loobean %f 1 '%.n']]]
6908+ %face
6909+ =/ body=(unit (list itype)) $(t body.t)
6910+ ?~ body ~
6911+ `(turn u.body |=(x=itype [%face name.t x]))
6912+ %cell
6913+ =/ hed=(unit (list itype)) $(t hed.t)
6914+ ?~ hed ~
6915+ =/ tal=(unit (list itype)) $(t tal.t)
6916+ ?~ tal ~
6917+ ?: (gth (mul (lent u.hed) (lent u.tal)) 64) ~
6918+ `(finite-product u.hed u.tal ~)
6919+ * `~[t]
6920+ ==
6921+::
6922+++ finite-cases
6923+ |= [xs=(list itype) out=(list ifinite) origin=@ud]
6924+ ^- (unit (list ifinite))
6925+ ?~ xs `out
6926+ =/ parts=(unit (list itype)) (finite-type i.xs)
6927+ ?~ parts ~
6928+ ?: (gth (add (lent out) (lent u.parts)) 64) ~
6929+ =/ rows=(list ifinite) (turn u.parts |=(t=itype [origin i.xs t]))
6930+ $(xs t.xs, out (weld out rows), origin +(origin))
6931+::
6932+++ infer-known-union-whole
6933+ |= [e=expr env=ienv state=istate]
6934+ ^- (unit iresult)
6935+ ?> ?=(%branch -.e)
6936+ =/ subject=iresult (infer-fragment subject.e env state)
6937+ ?: ?=(%| -.subject) `subject
6938+ =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
6939+ ?. ?=(%union -.typ) `[%| ["branch is not supported by partial inference" ~]]
6940+ =/ cases=(list itype) cases.typ
6941+ =/ remaining=(list itype) cases
6942+ =/ arms=(list arm) arms.e
6943+ =/ st=istate state.p.subject
6944+ =/ answer=(unit itype) ~
6945+ |-
6946+ ?~ arms
6947+ ?^ remaining
6948+ `[%| ["missing union case {(show-itype i.remaining sub.st)}" ~]]
6949+ ?~ answer `[%| ["empty union branch is not supported by partial inference" ~]]
6950+ `[%& u.answer st]
6951+ =/ a=arm i.arms
6952+ ?: (lien remaining |=(c=itype =(%unknown (union-pattern pat.a c))))
6953+ ~
6954+ =/ matching=(list itype) (skim remaining |=(c=itype =(%full (union-pattern pat.a c))))
6955+ ?~ matching
6956+ ?: (lien cases |=(c=itype =(%full (union-pattern pat.a c))))
6957+ `[%| ["branch arm is covered by earlier arms" ~[[at.pat.a "covered arm"]]]]
6958+ `[%| ["union pattern is not supported by partial inference" ~]]
6959+ ?: &(?=(^ t.matching) (union-pattern-has-bind pat.a))
6960+ `[%| ["a union pattern binding several cases is not supported by partial inference" ~]]
6961+ =/ bound=(unit ienv) (union-pattern-bind pat.a i.matching env globals.st)
6962+ ?~ bound `[%| ["pattern binder shadows a name" ~]]
6963+ =/ body=iresult (infer-fragment val.a u.bound st)
6964+ ?: ?=(%| -.body) `body
6965+ =/ result=itype (itype-normalize typ.p.body sub.state.p.body)
6966+ =/ mismatch=? ?~(answer | !=((itype-normalize u.answer sub.state.p.body) result))
6967+ ?: mismatch `[%| ["union branch result matching needs unsupported inference" ~]]
6968+ $(arms t.arms, remaining (skim remaining |=(c=itype !=(%full (union-pattern pat.a c)))), st state.p.body, answer `result)
6969+::
6970+++ infer-known-union-context-whole
6971+ |= [e=expr expected=itype env=ienv state=istate context=span]
6972+ ^- (unit iresult)
6973+ ?> ?=(%branch -.e)
6974+ =/ subject=iresult (infer-fragment subject.e env state)
6975+ ?: ?=(%| -.subject) `subject
6976+ =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
6977+ ?. ?=(%union -.typ) `[%| ["branch is not supported by partial inference" ~]]
6978+ =/ cases=(list itype) cases.typ
6979+ =/ remaining=(list itype) cases
6980+ =/ arms=(list arm) arms.e
6981+ =/ st=istate state.p.subject
6982+ =/ answer=(unit itype) ~
6983+ |-
6984+ ?~ arms
6985+ ?^ remaining
6986+ `[%| ["missing union case {(show-itype i.remaining sub.st)}" ~]]
6987+ ?~ answer `[%| ["empty union branch is not supported by partial inference" ~]]
6988+ `[%& expected st]
6989+ =/ a=arm i.arms
6990+ ?: (lien remaining |=(c=itype =(%unknown (union-pattern pat.a c))))
6991+ ~
6992+ =/ matching=(list itype) (skim remaining |=(c=itype =(%full (union-pattern pat.a c))))
6993+ ?~ matching
6994+ ?: (lien cases |=(c=itype =(%full (union-pattern pat.a c))))
6995+ `[%| ["branch arm is covered by earlier arms" ~[[at.pat.a "covered arm"]]]]
6996+ `[%| ["union pattern is not supported by partial inference" ~]]
6997+ ?: &(?=(^ t.matching) (union-pattern-has-bind pat.a))
6998+ `[%| ["a union pattern binding several cases is not supported by partial inference" ~]]
6999+ =/ bound=(unit ienv) (union-pattern-bind pat.a i.matching env globals.st)
7000+ ?~ bound `[%| ["pattern binder shadows a name" ~]]
7001+ =/ body=iresult (infer-call-context-arg val.a expected u.bound st context)
7002+ ?: ?=(%| -.body) `body
7003+ =/ fit=ifit (itype-fit typ.p.body expected sub.state.p.body next.state.p.body)
7004+ ?: ?=(%unknown -.fit) `[%| ["union branch result constraint is not supported by partial inference" ~]]
7005+ ?: ?=(%bad -.fit)
7006+ =/ missing=(unit idiag) (missing-union-tag val.a expected sub.state.p.body context)
7007+ ?^ missing `[%| u.missing]
7008+ =/ nested=(unit idiag) (nested-missing-tag val.a typ.p.body expected sub.state.p.body next.state.p.body context)
7009+ ?^ nested `[%| u.nested]
7010+ `[%| ["union branch arm does not fit its expected type" ~[[context "expected type"] [(span-of val.a) "branch arm"]]]]
7011+ ?: (itype-has-tag (itype-normalize expected sub.fit))
7012+ `[%| ["union branch result needs context in partial inference" ~]]
7013+ $(arms t.arms, remaining (skim remaining |=(c=itype !=(%full (union-pattern pat.a c)))), st state.p.body(sub sub.fit, next next.fit), answer `expected)
7014+::
7015+++ infer-known-union-finite
7016+ |= [e=expr env=ienv state=istate expected=(unit [typ=itype context=span])]
7017+ ^- iresult
7018+ ?> ?=(%branch -.e)
7019+ =/ subject=iresult (infer-fragment subject.e env state)
7020+ ?: ?=(%| -.subject) subject
7021+ =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7022+ ?. ?=(%union -.typ) [%| ["branch is not supported by partial inference" ~]]
7023+ =/ expanded=(unit (list ifinite)) (finite-cases cases.typ ~ 0)
7024+ ?~ expanded [%| ["union pattern expansion needs unsupported inference" ~]]
7025+ =/ cases=(list ifinite) u.expanded
7026+ =/ remaining=(list ifinite) cases
7027+ =/ arms=(list arm) arms.e
7028+ =/ st=istate state.p.subject
7029+ =/ answer=(unit itype) ~
7030+ |-
7031+ ?~ arms
7032+ ?^ remaining
7033+ [%| ["missing union case {(show-itype part.i.remaining sub.st)}" ~]]
7034+ ?~ answer [%| ["empty union branch is not supported by partial inference" ~]]
7035+ ?~ expected [%& u.answer st]
7036+ [%& typ.u.expected st]
7037+ =/ a=arm i.arms
7038+ ?: (lien remaining |=(c=ifinite =(%unknown (union-pattern pat.a part.c))))
7039+ [%| ["partial union pattern is not supported by partial inference" ~]]
7040+ =/ matching=(list ifinite) (skim remaining |=(c=ifinite =(%full (union-pattern pat.a part.c))))
7041+ ?~ matching
7042+ ?: (lien cases |=(c=ifinite =(%full (union-pattern pat.a part.c))))
7043+ [%| ["branch arm is covered by earlier arms" ~[[at.pat.a "covered arm"]]]]
7044+ [%| ["union pattern is not supported by partial inference" ~]]
7045+ ?: &((union-pattern-has-bind pat.a) (lien t.matching |=(c=ifinite !=(origin.c origin.i.matching))))
7046+ [%| ["a union pattern binding several cases is not supported by partial inference" ~]]
7047+ =/ bound=(unit ienv) (union-pattern-bind pat.a base.i.matching env globals.st)
7048+ ?~ bound [%| ["pattern binder shadows a name" ~]]
7049+ =/ body=iresult
7050+ ?~ expected (infer-fragment val.a u.bound st)
7051+ (infer-call-context-arg val.a typ.u.expected u.bound st context.u.expected)
7052+ ?: ?=(%| -.body) body
7053+ ?^ expected
7054+ =/ fit=ifit (itype-fit typ.p.body typ.u.expected sub.state.p.body next.state.p.body)
7055+ ?: ?=(%unknown -.fit) [%| ["union branch result constraint is not supported by partial inference" ~]]
7056+ ?: ?=(%bad -.fit)
7057+ =/ missing=(unit idiag) (missing-union-tag val.a typ.u.expected sub.state.p.body context.u.expected)
7058+ ?^ missing [%| u.missing]
7059+ =/ nested=(unit idiag) (nested-missing-tag val.a typ.p.body typ.u.expected sub.state.p.body next.state.p.body context.u.expected)
7060+ ?^ nested [%| u.nested]
7061+ [%| ["union branch arm does not fit its expected type" ~[[context.u.expected "expected type"] [(span-of val.a) "branch arm"]]]]
7062+ ?: (itype-has-tag (itype-normalize typ.u.expected sub.fit))
7063+ [%| ["union branch result needs context in partial inference" ~]]
7064+ $(arms t.arms, remaining (skim remaining |=(c=ifinite !=(%full (union-pattern pat.a part.c)))), st state.p.body(sub sub.fit, next next.fit), answer `typ.u.expected)
7065+ =/ result=itype (itype-normalize typ.p.body sub.state.p.body)
7066+ =/ mismatch=? ?~(answer | !=((itype-normalize u.answer sub.state.p.body) result))
7067+ ?: mismatch [%| ["union branch result matching needs unsupported inference" ~]]
7068+ $(arms t.arms, remaining (skim remaining |=(c=ifinite !=(%full (union-pattern pat.a part.c)))), st state.p.body, answer `result)
7069+::
7070+++ infer-known-union-branch
7071+ |= [e=expr env=ienv state=istate]
7072+ ^- iresult
7073+ =/ whole=(unit iresult) (infer-known-union-whole e env state)
7074+ ?~ whole (infer-known-union-finite e env state ~)
7075+ u.whole
7076+::
7077+++ infer-known-union-context
7078+ |= [e=expr expected=itype env=ienv state=istate context=span]
7079+ ^- iresult
7080+ =/ whole=(unit iresult) (infer-known-union-context-whole e expected env state context)
7081+ ?~ whole (infer-known-union-finite e env state `[expected context])
7082+ u.whole
7083+::
7084+++ known-union-subject
7085+ |= [e=expr env=ienv state=istate]
7086+ ^- (unit itype)
7087+ ?. ?=(%wing -.e) ~
7088+ =/ subject=iresult (infer-fragment e env state)
7089+ ?: ?=(%| -.subject) ~
7090+ =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7091+ ?. ?=(%union -.typ) ~
7092+ `typ
7093+::
7094+:: Infer changes only against a fully known record spine. Retain the
7095+:: target type; unknown spines and repeated edits remain unsupported.
7096+++ change-spine-known
7097+ |= [t=itype sub=isub]
7098+ ^- ?
7099+ =. t (itype-walk t sub)
7100+ ?: ?=(%face -.t) &
7101+ ?. ?=(%cell -.t) |
7102+ =/ first=itype (itype-walk hed.t sub)
7103+ ?. ?=(%face -.first) |
7104+ $(t tal.t)
7105+::
7106+++ infer-change-edits
7107+ |= [edits=(list edit) target=itype env=ienv state=istate seen=(list term)]
7108+ ^- iresult
7109+ ?~ edits [%& target state]
7110+ =/ entry=edit i.edits
7111+ ?: (lien seen |=(name=term =(name name.entry)))
7112+ [%| ["repeated change fields are not supported by partial inference" ~]]
7113+ ?. (change-spine-known target sub.state)
7114+ [%| ["change target needs a known record in partial inference" ~]]
7115+ =/ found=(list itype) (record-fields-named name.entry target sub.state)
7116+ ?~ found
7117+ [%| ["record has no field `{(trip name.entry)}`" ~[[at.entry "unknown field"]]]]
7118+ ?^ t.found [%| ["change field is ambiguous in partial inference" ~]]
7119+ =/ expected=itype i.found
7120+ =/ value=iresult (infer-call-context-arg val.entry expected env state at.entry)
7121+ ?: ?=(%| -.value) value
7122+ =/ fit=ifit (itype-fit typ.p.value expected sub.state.p.value next.state.p.value)
7123+ ?: ?=(%unknown -.fit) [%| ["change field constraint is not supported by partial inference" ~]]
7124+ ?: ?=(%bad -.fit)
7125+ [%| ["change field and replacement do not unify" ~[[at.entry (site-type-note "expected replacement" expected sub.state.p.value)] [(span-of val.entry) (site-type-note "replacement" typ.p.value sub.state.p.value)]]]]
7126+ $(edits t.edits, state state.p.value(sub sub.fit, next next.fit), seen [name.entry seen])
7127+::
7128+:: Backtick constructs the canonical prelude unit, after checking its
7129+:: prepared template has the standard null and [~ u=A] cases.
7130+++ standard-unit-template
7131+ |= [template=ischeme at=path]
7132+ ^- ?
7133+ ?. =(at /lib/jibb/prelude/jibb) |
7134+ ?~ vars.template |
7135+ ?^ t.vars.template |
7136+ =/ v=@ud i.vars.template
7137+ =/ nil=itype [%const [%null %n 0 '~']]
7138+ =/ expected=itype
7139+ [%union ~[nil [%cell nil [%face %u [%var v]]]] `[at %unit] `%unit ~[[%var v]]]
7140+ =(typ.template expected)
7141+::
7142+:: A named missing-case diagnostic needs more than a failed fit: a case
7143+:: with that tag but the wrong payload is not a missing case. Unknown
7144+:: shapes and atom types that accept terms keep the proof conservative.
7145++$ itag-presence ?(%yes %no %maybe)
7146+++ tag-presence-cases
7147+ |= [cases=(list itype) value=@ sub=isub]
7148+ ^- itag-presence
7149+ ?~ cases %no
7150+ =/ first=itag-presence (tag-presence i.cases value sub)
7151+ ?: =(%yes first) %yes
7152+ =/ rest=itag-presence $(cases t.cases)
7153+ ?: =(%yes rest) %yes
7154+ ?: |(=(%maybe first) =(%maybe rest)) %maybe
7155+ %no
7156+::
7157+++ tag-presence
7158+ |= [t=itype value=@ sub=isub]
7159+ ^- itag-presence
7160+ =. t (itype-walk t sub)
7161+ ?- -.t
7162+ %const ?:(=(value val.literal.t) %yes %no)
7163+ %flag ?:(|(=(value 0) =(value 1)) %yes %no)
7164+ %atom ?:(|(=(%tas aura.t) =(%ta aura.t)) %maybe %no)
7165+ %face $(t body.t)
7166+ %cell
7167+ =/ first=itag-presence $(t hed.t)
7168+ ?: =(%yes first) %yes
7169+ =/ rest=itag-presence $(t tal.t)
7170+ ?: =(%yes rest) %yes
7171+ ?: |(=(%maybe first) =(%maybe rest)) %maybe
7172+ %no
7173+ %union (tag-presence-cases cases.t value sub)
7174+ * %maybe
7175+ ==
7176+::
7177+++ missing-union-tag
7178+ |= [e=expr expected=itype sub=isub context=span]
7179+ ^- (unit idiag)
7180+ ?. ?=(%lit -.e) ~
7181+ ?. =(%term form.lit.e) ~
7182+ =. expected (itype-walk expected sub)
7183+ |-
7184+ ?: ?=(%face -.expected) $(expected (itype-walk body.expected sub))
7185+ ?. ?=(%union -.expected) ~
7186+ ?. =(%no (tag-presence-cases cases.expected val.lit.e sub)) ~
7187+ =/ label=tape
7188+ ?~ label.expected "union {(show-itype expected sub)}"
7189+ (show-itype expected sub)
7190+ `["{label} has no case `{(trip txt.lit.e)}`" ~[[context "expected union"] [(span-of e) "tag"]]]
7191+::
7192+:: Locate a missing tag inside a syntactic tuple only by replaying the
7193+:: directional fit in source order. Uncertain or earlier failures stop
7194+:: the walk, preserving the generic diagnostic rather than guessing.
7195+++ nested-missing-tag
7196+ |= [e=expr actual=itype expected=itype sub=isub next=@ud context=span]
7197+ ^- (unit idiag)
7198+ =/ original=[left=itype right=itype] [actual expected]
7199+ ?: |(?=(%var -.left.original) ?=(%avar -.left.original) ?=(%nvar -.left.original) ?=(%var -.right.original) ?=(%avar -.right.original) ?=(%nvar -.right.original)) ~
7200+ =/ fit=ifit (itype-fit actual expected sub next)
7201+ ?. ?=(%bad -.fit) ~
7202+ =. actual (itype-walk actual sub)
7203+ =. expected (itype-walk expected sub)
7204+ ?: &(?=(%face -.actual) ?=(%face -.expected))
7205+ ?. =(name.actual name.expected) ~
7206+ $(actual body.actual, expected body.expected)
7207+ ?: ?=(%face -.actual) $(actual body.actual)
7208+ ?: ?=(%face -.expected) $(expected body.expected)
7209+ =/ direct=(unit idiag) (missing-union-tag e expected sub context)
7210+ ?^ direct direct
7211+ ?. ?=(%tuple -.e) ~
7212+ (nested-missing-items items.e actual expected sub next context)
7213+::
7214+++ nested-missing-items
7215+ |= [items=(list item) actual=itype expected=itype sub=isub next=@ud context=span]
7216+ ^- (unit idiag)
7217+ ?~ items ~
7218+ ?~ t.items (nested-missing-tag val.i.items actual expected sub next context)
7219+ =/ original=[left=itype right=itype] [actual expected]
7220+ ?: |(?=(%var -.left.original) ?=(%avar -.left.original) ?=(%nvar -.left.original) ?=(%var -.right.original) ?=(%avar -.right.original) ?=(%nvar -.right.original)) ~
7221+ =. actual (itype-walk actual sub)
7222+ =. expected (itype-walk expected sub)
7223+ ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
7224+ =/ first=ifit (itype-fit hed.actual hed.expected sub next)
7225+ ?: ?=(%bad -.first)
7226+ (nested-missing-tag val.i.items hed.actual hed.expected sub next context)
7227+ ?. ?=(%ok -.first) ~
7228+ $(items t.items, actual tal.actual, expected tal.expected, sub sub.first, next next.first)
7229+::
7230+++ infer-fragment
7231+ |= [e=expr env=ienv state=istate]
7232+ ^- iresult
7233+ ?- -.e
7234+ %lit
7235+ ?- form.lit.e
7236+ %number ?: =(%ud aura.lit.e)
7237+ [%& [%nvar next.state] state(next +(next.state))]
7238+ [%& [%atom aura.lit.e] state]
7239+ %ship [%& [%atom %p] state]
7240+ %date [%& [%atom %da] state]
7241+ %duration [%& [%atom %dr] state]
7242+ %knot [%& [%atom %ta] state]
7243+ %loobean [%& [%flag ~] state]
7244+ %term [%& [%tag next.state lit.e |] state(next +(next.state), tags [[next.state lit.e] tags.state])]
7245+ %null [%& [%tag next.state lit.e |] state(next +(next.state), tags [[next.state lit.e] tags.state])]
7246+ ==
7247+ %unit
7248+ ?~ prelude.state [%| ["unit construction needs the standard prelude in partial inference" ~]]
7249+ =/ standard=(unit ischeme) (find-jibb-mold %unit u.prelude.state)
7250+ ?~ standard [%| ["unit construction needs the standard prelude in partial inference" ~]]
7251+ ?. (standard-unit-template u.standard at.u.prelude.state)
7252+ [%| ["unit construction needs the standard prelude in partial inference" ~]]
7253+ =/ value=iresult $(e val.e)
7254+ ?: ?=(%| -.value) value
7255+ =/ result=(unit itype) (template-apply u.standard ~[typ.p.value])
7256+ ?~ result [%| ["unit construction is not supported by partial inference" ~]]
7257+ [%& u.result state.p.value]
7258+ %list
7259+ ?~ prelude.state [%| ["list literal needs the standard prelude in partial inference" ~]]
7260+ ?. =(at.u.prelude.state /lib/jibb/prelude/jibb)
7261+ [%| ["list literal needs the standard prelude in partial inference" ~]]
7262+ =/ standard=(unit ischeme) (find-jibb-mold %list u.prelude.state)
7263+ ?~ standard [%| ["list literal needs the standard prelude in partial inference" ~]]
7264+ ?. =(u.standard [[%collection %list ~[[%var 0]]] ~[0]])
7265+ [%| ["list literal needs the standard prelude in partial inference" ~]]
7266+ =/ element=itype [%var next.state]
7267+ =/ result=iresult (infer-open-list-items items.e element env state(next +(next.state)) at.e)
7268+ ?: ?=(%| -.result) result
7269+ [%& [%collection %list ~[element]] state.p.result]
7270+ %str (infer-string-pieces pieces.e env state)
7271+ %wing
7272+ ?~ names.e [%| ["empty wing" ~]]
7273+ ?^ t.names.e
7274+ ?^ t.t.names.e (infer-field-wing names.e env state)
7275+ =/ iface=(unit ifile) (find-jibb-interface i.t.names.e jimports.state)
7276+ ?~ iface (infer-field-wing names.e env state)
7277+ =/ member=(unit ischeme) (ienv-lookup i.names.e values.u.iface)
53307278 ?~ member [%| ["module member is not available to partial inference" ~]]
7279+ =. typ.u.member (itype-in-import typ.u.member u.iface i.t.names.e prelude.state)
53317280 =/ instance=[typ=itype state=istate] (instantiate-scheme u.member state)
53327281 [%& typ.instance state.instance]
53337282 =/ scheme=(unit ischeme) (ienv-lookup i.names.e env)
5334− ?~ scheme [%| ["name is not available to partial inference" ~]]
7283+ ?~ scheme
7284+ ?~ prelude.state [%| ["name is not available to partial inference" ~]]
7285+ =/ prelude-entry=(unit ischeme) (ienv-lookup i.names.e values.u.prelude.state)
7286+ ?~ prelude-entry [%| ["name is not available to partial inference" ~]]
7287+ =/ inst=[typ=itype state=istate] (instantiate-scheme u.prelude-entry state)
7288+ [%& typ.inst state.inst]
53357289 =/ instance=[typ=itype state=istate] (instantiate-scheme u.scheme state)
53367290 [%& typ.instance state.instance]
53377291 %group $(e inner.e)
7292+ %change
7293+ ?~ edits.e [%| ["a change takes at least one field" ~[[at.e "empty change"]]]]
7294+ =/ target=iresult $(e [%wing at.e target.e])
7295+ ?: ?=(%| -.target) target
7296+ (infer-change-edits edits.e typ.p.target env state.p.target ~)
7297+ %ctor [%& [%tag next.state tag.e &] state(next +(next.state), tags [[next.state tag.e] tags.state])]
53387298 %trace
53397299 =/ traced=iresult $(e val.e)
53407300 ?: ?=(%| -.traced) traced
@@ -5361,17 +7321,26 @@
53617321 %branch
53627322 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
53637323 ?~ t.arms.e (infer-cell-branch e env state)
5364− ?^ t.t.arms.e [%| ["branch is not supported by partial inference" ~]]
7324+ ?^ t.t.arms.e (infer-known-union-branch e env state)
7325+ =/ known=(unit itype) (known-union-subject subject.e env state)
7326+ ?: &(?=(^ known) ?=(~ (unit-union-payload u.known)))
7327+ (infer-known-union-branch e env state)
53657328 =/ x=arm i.arms.e
53667329 =/ y=arm i.t.arms.e
5367− ?. ?=(%lit -.pat.x) [%| ["branch pattern is not supported by partial inference" ~]]
5368− ?. ?=(%lit -.pat.y) [%| ["branch pattern is not supported by partial inference" ~]]
7330+ ?: |((unit-empty-pattern pat.x) (unit-empty-pattern pat.y))
7331+ (infer-unit-branch e env state ~)
7332+ ?. ?=(%lit -.pat.x) (infer-known-union-branch e env state)
7333+ ?. ?=(%lit -.pat.y) (infer-known-union-branch e env state)
53697334 ?. &(=(%loobean form.lit.pat.x) =(%loobean form.lit.pat.y))
5370− [%| ["branch pattern is not supported by partial inference" ~]]
7335+ (infer-known-union-branch e env state)
7336+ ?^ known (infer-known-union-branch e env state)
53717337 ?: =(val.lit.pat.x val.lit.pat.y)
53727338 [%| ["branch does not cover both loobeans" ~]]
53737339 =/ subject=iresult $(e subject.e)
53747340 ?: ?=(%| -.subject) subject
7341+ =/ subject-type=itype (itype-normalize typ.p.subject sub.state.p.subject)
7342+ ?: ?=(%union -.subject-type)
7343+ [%| ["union-pattern branch subject is not supported by partial inference" ~]]
53757344 =/ su=(unit isub) (itype-unify typ.p.subject [%flag ~] sub.state.p.subject)
53767345 ?~ su [%| ["loobean branch subject does not unify with ?" ~]]
53777346 =/ left=iresult $(e val.x, state state.p.subject(sub u.su))
@@ -5384,41 +7353,69 @@
53847353 [%| ["branch widening is not supported by partial inference" ~]]
53857354 =/ joined=(unit isub) (itype-unify typ.p.left typ.p.right sub.state.p.right)
53867355 ?~ joined
7356+ ?: |((itype-has-recursive ltype) (itype-has-recursive rtype))
7357+ [%| ["recursive branch matching is not supported by partial inference" ~]]
7358+ ?: |((itype-has-tag ltype) (itype-has-tag rtype) (itype-has-union ltype) (itype-has-union rtype))
7359+ [%| ["branch tag or union context is not supported by partial inference" ~]]
53877360 =/ common=(unit itype) (itype-concrete-join typ.p.left typ.p.right sub.state.p.right)
53887361 ?^ common [%& u.common state.p.right]
7362+ ?: |((itype-has-face typ.p.left sub.state.p.right) (itype-has-face typ.p.right sub.state.p.right))
7363+ [%| ["record branch matching is not supported by partial inference" ~]]
53897364 ?: |((itype-has-any-atom typ.p.left sub.state.p.right) (itype-has-any-atom typ.p.right sub.state.p.right) (itype-family-related typ.p.left typ.p.right sub.state.p.right))
53907365 [%| ["branch widening is not supported by partial inference" ~]]
53917366 [%| ["branch arms have incompatible types" ~[[(span-of val.x) (site-type-note "first arm" typ.p.left sub.state.p.right)] [(span-of val.y) (site-type-note "second arm" typ.p.right sub.state.p.right)]]]]
53927367 [%& typ.p.left state.p.right(sub u.joined)]
53937368 %cast
53947369 =/ target=(unit [typ=itype state=istate]) (infer-simple-shape shape.e state)
5395− ?~ target [%| ["cast mold is not supported by partial inference" ~]]
5396− =/ value=iresult $(e val.e, state state.u.target)
7370+ ?~ target
7371+ =/ diag=(unit idiag) (nested-import-invalid shape.e state)
7372+ ?^ diag [%| u.diag]
7373+ [%| ["cast mold is not supported by partial inference" ~]]
7374+ =/ value=iresult
7375+ (infer-call-context-arg val.e typ.u.target env state.u.target at.shape.e)
53977376 ?: ?=(%| -.value) value
53987377 =/ fit=ifit (itype-fit typ.p.value typ.u.target sub.state.p.value next.state.p.value)
53997378 ?: ?=(%unknown -.fit) [%| ["cast constraint is not supported by partial inference" ~]]
54007379 ?: ?=(%bad -.fit)
7380+ =/ missing=(unit idiag) (missing-union-tag val.e typ.u.target sub.state.p.value at.shape.e)
7381+ ?^ missing [%| u.missing]
7382+ =/ nested=(unit idiag) (nested-missing-tag val.e typ.p.value typ.u.target sub.state.p.value next.state.p.value at.shape.e)
7383+ ?^ nested [%| u.nested]
54017384 [%| ["cast mold and expression type do not unify" ~[[at.shape.e (site-type-note "cast mold" typ.u.target sub.state.p.value)] [(span-of val.e) (site-type-note "expression" typ.p.value sub.state.p.value)]]]]
5402− [%& typ.u.target state.p.value(sub sub.fit, next next.fit)]
7385+ =/ merged=itype (itype-merge-faces typ.p.value typ.u.target sub.fit)
7386+ [%& merged state.p.value(sub sub.fit, next next.fit)]
54037387 %crash [%& [%var next.state] state(next +(next.state))]
54047388 %gate
54057389 =/ sam=isample-result (infer-sample sample.e env state)
5406− ?: ?=(%| -.sam) [%| [p.sam ~]]
7390+ ?: ?=(%| -.sam)
7391+ =/ diag=(unit idiag) (sample-import-invalid sample.e env state)
7392+ ?: &(=(p.sam "sample mold is not supported by partial inference") ?=(^ diag)) [%| u.diag]
7393+ [%| [p.sam ~]]
54077394 =/ body=iresult $(e body.e, env env.p.sam, state state.p.sam)
54087395 ?: ?=(%| -.body) body
54097396 [%& [%fn typ.p.sam typ.p.body] state.p.body]
54107397 %gate-wide
54117398 =/ sam=isample-result (infer-sample sample.e env state)
5412− ?: ?=(%| -.sam) [%| [p.sam ~]]
7399+ ?: ?=(%| -.sam)
7400+ =/ diag=(unit idiag) (sample-import-invalid sample.e env state)
7401+ ?: &(=(p.sam "sample mold is not supported by partial inference") ?=(^ diag)) [%| u.diag]
7402+ [%| [p.sam ~]]
54137403 =/ body=iresult $(e body.e, env env.p.sam, state state.p.sam)
54147404 ?: ?=(%| -.body) body
54157405 [%& [%fn typ.p.sam typ.p.body] state.p.body]
54167406 %call
54177407 ?~ args.e [%| ["call has no argument" ~]]
5418− ?^ t.args.e [%| ["multiple arguments are not supported by partial inference" ~]]
54197408 =/ head=iresult $(e head.e)
54207409 ?: ?=(%| -.head) head
5421− =/ arg=iresult $(e i.args.e, state state.p.head)
7410+ =/ head-type=itype (itype-walk typ.p.head sub.state.p.head)
7411+ =/ arg=iresult
7412+ ?^ t.args.e
7413+ ?: ?=(%fn -.head-type)
7414+ (infer-call-context-args args.e sample.head-type env state.p.head (span-of head.e))
7415+ (infer-simple-items (turn args.e |=(a=expr [(span-of a) ~ a])) env state.p.head)
7416+ ?: ?=(%fn -.head-type)
7417+ (infer-call-context-arg i.args.e sample.head-type env state.p.head (span-of head.e))
7418+ $(e i.args.e, state state.p.head)
54227419 ?: ?=(%| -.arg) arg
54237420 =/ st=istate state.p.arg
54247421 =/ ht=itype (itype-walk typ.p.head sub.st)
@@ -5426,7 +7423,21 @@
54267423 =/ fit=ifit (itype-fit typ.p.arg sample.ht sub.st next.st)
54277424 ?: ?=(%unknown -.fit) [%| ["call constraint is not supported by partial inference" ~]]
54287425 ?: ?=(%bad -.fit)
5429− [%| ["call's sample and argument types do not unify" ~[[(span-of head.e) (site-type-note "called gate" ht sub.st)] [(span-of i.args.e) (site-type-note "argument" typ.p.arg sub.st)]]]]
7426+ ?~ t.args.e
7427+ =/ missing=(unit idiag) (missing-union-tag i.args.e sample.ht sub.st (span-of head.e))
7428+ ?^ missing [%| u.missing]
7429+ =/ nested=(unit idiag) (nested-missing-tag i.args.e typ.p.arg sample.ht sub.st next.st (span-of head.e))
7430+ ?^ nested [%| u.nested]
7431+ [%| ["call's sample and argument types do not unify" ~[[(span-of head.e) (site-type-note "called gate" ht sub.st)] [(span-of i.args.e) (site-type-note "argument" typ.p.arg sub.st)]]]]
7432+ =/ bad=(unit [at=span typ=itype])
7433+ (call-error-site args.e typ.p.arg sample.ht sub.st next.st)
7434+ =/ whole-args=span
7435+ [beg:(span-of i.args.e) end:(span-of (rear args.e))]
7436+ =/ arg-at=span ?~(bad whole-args at.u.bad)
7437+ =/ arg-type=itype ?~(bad typ.p.arg typ.u.bad)
7438+ [%| ["call's sample and argument types do not unify" ~[[(span-of head.e) (site-type-note "called gate" ht sub.st)] [arg-at (site-type-note "argument" arg-type sub.st)]]]]
7439+ ?: &((itype-has-face typ.p.arg sub.fit) (itype-face-asym typ.p.arg sample.ht sub.fit) (itype-output-may-be-cell product.ht sub.fit))
7440+ [%| ["call result face propagation is not supported by partial inference" ~]]
54307441 [%& product.ht st(sub sub.fit, next next.fit)]
54317442 =/ result=itype [%var next.st]
54327443 =/ uni=(unit isub) (itype-unify ht [%fn typ.p.arg result] sub.st)
@@ -5436,23 +7447,194 @@
54367447 * [%| ["expression is not supported by partial inference" ~]]
54377448 ==
54387449::
5439−:: Unfaced tuple expressions are the one supported cell construction.
5440−:: Faced cells wait for the representation to preserve record faces.
7450+:: Locate a definite failing argument after the complete sample fit has
7451+:: failed. If an intermediate fit is uncertain, retain the whole argument
7452+:: span rather than assigning blame to a particular argument.
7453+::
7454+++ call-error-site
7455+ |= [args=(list expr) actual=itype expected=itype sub=isub next=@ud]
7456+ ^- (unit [at=span typ=itype])
7457+ ?~ args ~
7458+ =/ original=[left=itype right=itype] [actual expected]
7459+ ?: |(?=(%var -.left.original) ?=(%avar -.left.original) ?=(%nvar -.left.original) ?=(%var -.right.original) ?=(%avar -.right.original) ?=(%nvar -.right.original)) ~
7460+ =. actual (itype-walk actual sub)
7461+ =. expected (itype-walk expected sub)
7462+ ?: &(?=(%face -.expected) !?=(%face -.actual))
7463+ $(expected body.expected)
7464+ ?~ t.args
7465+ =/ fit=ifit (itype-fit actual expected sub next)
7466+ ?. ?=(%bad -.fit) ~
7467+ `[(span-of i.args) (itype-normalize actual sub)]
7468+ ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
7469+ =/ first=ifit (itype-fit hed.actual hed.expected sub next)
7470+ ?: ?=(%bad -.first) `[(span-of i.args) (itype-normalize hed.actual sub)]
7471+ ?: ?=(%unknown -.first) ~
7472+ $(args t.args, actual tal.actual, expected tal.expected, sub sub.first, next next.first)
7473+::
7474+:: Context can help a call argument or cast value while the final fit
7475+:: checks the complete right-nested type, including any written faces.
7476+::
7477+:: Context can resolve the payload of a canonical prelude unit, but an
7478+:: unrelated union with a similar noun shape is not the same mold.
7479+++ infer-unit-context
7480+ |= [e=expr expected=itype env=ienv state=istate context=span]
7481+ ^- iresult
7482+ ?> ?=(%unit -.e)
7483+ ?> ?=(%union -.expected)
7484+ ?~ prelude.state (infer-fragment e env state)
7485+ =/ standard=(unit ischeme) (find-jibb-mold %unit u.prelude.state)
7486+ ?~ standard (infer-fragment e env state)
7487+ ?. (standard-unit-template u.standard at.u.prelude.state) (infer-fragment e env state)
7488+ ?. =(origin.expected `[at.u.prelude.state %unit]) (infer-fragment e env state)
7489+ ?~ args.expected (infer-fragment e env state)
7490+ ?^ t.args.expected (infer-fragment e env state)
7491+ =/ payload=itype i.args.expected
7492+ =/ canonical=(unit itype) (template-apply u.standard ~[payload])
7493+ ?~ canonical (infer-fragment e env state)
7494+ ?> ?=(%union -.u.canonical)
7495+ ?. =((itype-normalize expected(label ~) sub.state) (itype-normalize u.canonical(label ~) sub.state))
7496+ (infer-fragment e env state)
7497+ =/ value=iresult (infer-call-context-arg val.e payload env state context)
7498+ ?: ?=(%| -.value) value
7499+ =/ fit=ifit (itype-fit typ.p.value payload sub.state.p.value next.state.p.value)
7500+ ?: ?=(%unknown -.fit) [%| ["unit payload constraint is not supported by partial inference" ~]]
7501+ ?: ?=(%bad -.fit)
7502+ =/ missing=(unit idiag) (missing-union-tag val.e payload sub.state.p.value context)
7503+ ?^ missing [%| u.missing]
7504+ =/ nested=(unit idiag) (nested-missing-tag val.e typ.p.value payload sub.state.p.value next.state.p.value context)
7505+ ?^ nested [%| u.nested]
7506+ [%| ["unit payload does not fit its expected type" ~[[context (site-type-note "expected unit payload" payload sub.state.p.value)] [(span-of val.e) (site-type-note "payload" typ.p.value sub.state.p.value)]]]]
7507+ [%& expected state.p.value(sub sub.fit, next next.fit)]
7508+::
7509+++ infer-call-context-arg
7510+ |= [e=expr expected=itype env=ienv state=istate context=span]
7511+ ^- iresult
7512+ ?: ?=(%group -.e) $(e inner.e)
7513+ ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
7514+ ?: ?=(%trace -.e)
7515+ =/ traced=iresult (infer-fragment val.e env state)
7516+ ?: ?=(%| -.traced) traced
7517+ $(e then.e, state state.p.traced)
7518+ =/ target=itype (itype-walk expected sub.state)
7519+ |-
7520+ ?: ?=(%face -.target) $(target (itype-walk body.target sub.state))
7521+ :: In a loobean-singleton context retain the written loobean noun;
7522+ :: the usual final fit decides whether that value is permitted.
7523+ =/ singleton=(unit itype)
7524+ ?. ?=(%lit -.e) ~
7525+ ?. =(%loobean form.lit.e) ~
7526+ ?. ?=(%const -.target) ~
7527+ ?. =(%loobean form.literal.target) ~
7528+ `[%const lit.e]
7529+ ?^ singleton [%& u.singleton state]
7530+ =/ known=(unit itype)
7531+ ?: ?=(%branch -.e) (known-union-subject subject.e env state)
7532+ ~
7533+ ?: &(?=(^ known) ?=(~ (unit-union-payload u.known)))
7534+ (infer-known-union-context e target env state context)
7535+ ?: &(?=(%union -.target) ?=(%unit -.e))
7536+ (infer-unit-context e target env state context)
7537+ ?: &(?=(%union -.target) (context-union-branch e))
7538+ (infer-union-context e target env state context)
7539+ ?: &(?=(%collection -.target) =(%list name.target) (context-union-branch e))
7540+ (infer-union-context e target env state context)
7541+ ?: &(?=(%collection -.target) =(%list name.target) (context-list-expression e))
7542+ (infer-list-context e target env state context)
7543+ ?: &(?=(%cell -.target) ?=(%tuple -.e))
7544+ (infer-call-context-items items.e target env state context)
7545+ (infer-fragment e env state)
7546+::
7547+:: Preserve each written face; the final complete sample fit checks faces.
7548+++ infer-call-context-items
7549+ |= [items=(list item) expected=itype env=ienv state=istate context=span]
7550+ ^- iresult
7551+ ?~ items [%| ["empty cell is not supported by partial inference" ~]]
7552+ ?~ t.items
7553+ =/ last=iresult (infer-call-context-arg val.i.items expected env state context)
7554+ ?: ?=(%| -.last) last
7555+ =/ typ=itype typ.p.last
7556+ =. typ ?~(face.i.items typ [%face u.face.i.items typ])
7557+ [%& typ state.p.last]
7558+ =/ target=itype (itype-walk expected sub.state)
7559+ |-
7560+ ?: ?=(%face -.target) $(target (itype-walk body.target sub.state))
7561+ ?. ?=(%cell -.target) (infer-simple-items items env state)
7562+ =/ head=iresult (infer-call-context-arg val.i.items hed.target env state context)
7563+ ?: ?=(%| -.head) head
7564+ =/ typ=itype typ.p.head
7565+ =. typ ?~(face.i.items typ [%face u.face.i.items typ])
7566+ =/ tail=iresult (infer-call-context-items t.items tal.target env state.p.head context)
7567+ ?: ?=(%| -.tail) tail
7568+ [%& [%cell typ typ.p.tail] state.p.tail]
7569+::
7570+++ infer-call-context-args
7571+ |= [args=(list expr) expected=itype env=ienv state=istate context=span]
7572+ ^- iresult
7573+ ?~ args [%| ["call has no argument" ~]]
7574+ ?~ t.args (infer-call-context-arg i.args expected env state context)
7575+ =/ target=itype (itype-walk expected sub.state)
7576+ |-
7577+ ?: ?=(%face -.target) $(target (itype-walk body.target sub.state))
7578+ ?. ?=(%cell -.target)
7579+ (infer-simple-items (turn args |=(a=expr [(span-of a) ~ a])) env state)
7580+ =/ head=iresult (infer-call-context-arg i.args hed.target env state context)
7581+ ?: ?=(%| -.head) head
7582+ =/ tail=iresult (infer-call-context-args t.args tal.target env state.p.head context)
7583+ ?: ?=(%| -.tail) tail
7584+ [%& [%cell typ.p.head typ.p.tail] state.p.tail]
7585+::
7586+:: Tuple and record expressions preserve their explicitly written faces.
54417587::
54427588++ infer-simple-items
54437589 |= [items=(list item) env=ienv state=istate]
54447590 ^- iresult
54457591 ?~ items [%| ["empty cell is not supported by partial inference" ~]]
5446− ?^ face.i.items [%| ["record faces are not supported by partial inference" ~]]
54477592 =/ head=iresult (infer-fragment val.i.items env state)
54487593 ?: ?=(%| -.head) head
5449− ?~ t.items head
7594+ =/ ht=itype typ.p.head
7595+ =. ht ?~(face.i.items ht [%face u.face.i.items ht])
7596+ ?~ t.items [%& ht state.p.head]
54507597 =/ tail=iresult $(items t.items, state state.p.head)
54517598 ?: ?=(%| -.tail) tail
5452− [%& [%cell typ.p.head typ.p.tail] state.p.tail]
5453−::
5454−:: A single two-binder cell pattern covers every value of a cell type.
5455−:: No other pattern matrix is implemented here.
7599+ [%& [%cell ht typ.p.tail] state.p.tail]
7600+::
7601+:: A single all-binder cell pattern covers a known cell spine; the final
7602+:: binder captures the remaining noun. Other pattern matrices stay partial.
7603+::
7604+:: Validate binders before reading the subject, preserving shadow-error
7605+:: precedence. The last binder receives the entire remaining tail.
7606+++ cell-pattern-names
7607+ |= [pats=(list pattern) env=ienv globals=(list term) seen=(list term)]
7608+ ^- (each (list term) @t)
7609+ ?~ pats [%& ~]
7610+ ?. ?=(%bind -.i.pats) [%| 'branch pattern is not supported by partial inference']
7611+ =/ name=term name.i.pats
7612+ ?: |(?=(^ (ienv-lookup name env)) (lien globals |=(n=term =(n name))) (lien seen |=(n=term =(n name))))
7613+ [%| 'pattern shadows a name']
7614+ =/ rest=(each (list term) @t) $(pats t.pats, seen [name seen])
7615+ ?: ?=(%| -.rest) rest
7616+ [%& [name p.rest]]
7617+::
7618+++ cell-pattern-types
7619+ |= [names=(list term) env=ienv next=@ud]
7620+ ^- [typ=itype env=ienv next=@ud]
7621+ ?~ names !!
7622+ =/ head=itype [%var next]
7623+ =/ scope=ienv [[i.names [head ~]] env]
7624+ ?~ t.names [head scope +(next)]
7625+ =/ tail=[typ=itype env=ienv next=@ud] $(names t.names, env scope, next +(next))
7626+ [[%cell head typ.tail] env.tail next.tail]
7627+::
7628+:: At every position that must be a cell, opaque or sum types may still
7629+:: contain cells. Do not report a definite mismatch without unfolding them.
7630+++ cell-pattern-spine-unknown
7631+ |= [typ=itype names=(list term) sub=isub]
7632+ ^- ?
7633+ ?~ names |
7634+ ?~ t.names |
7635+ =. typ (itype-walk typ sub)
7636+ ?: ?=(%cell -.typ) $(typ tal.typ, names t.names)
7637+ |(?=(%union -.typ) ?=(%collection -.typ) ?=(%recursive -.typ) ?=(%noun -.typ) ?=(%fn -.typ) ?=(%tag -.typ))
54567638::
54577639++ infer-cell-branch
54587640 |= [e=expr env=ienv state=istate]
@@ -5464,21 +7646,22 @@
54647646 =/ pats=(list pattern) items.pat.arm
54657647 ?~ pats [%| ["branch pattern is not supported by partial inference" ~]]
54667648 ?~ t.pats [%| ["branch pattern is not supported by partial inference" ~]]
5467− ?^ t.t.pats [%| ["branch pattern is not supported by partial inference" ~]]
5468− ?. ?=(%bind -.i.pats) [%| ["branch pattern is not supported by partial inference" ~]]
5469− ?. ?=(%bind -.i.t.pats) [%| ["branch pattern is not supported by partial inference" ~]]
5470− =/ one=term name.i.pats
5471− =/ two=term name.i.t.pats
5472− ?: |(=(one two) ?=(^ (ienv-lookup one env)) ?=(^ (ienv-lookup two env)) (lien globals.state |=(x=term |(=(x one) =(x two)))))
5473− [%| ["pattern shadows a name" ~]]
7649+ =/ names=(each (list term) @t) (cell-pattern-names pats env globals.state ~)
7650+ ?: ?=(%| -.names) [%| [(trip p.names) ~]]
54747651 =/ subject=iresult (infer-fragment subject.e env state)
54757652 ?: ?=(%| -.subject) subject
54767653 =/ st=istate state.p.subject
5477− =/ head=itype [%var next.st]
5478− =/ tail=itype [%var +(next.st)]
5479− =/ sub=(unit isub) (itype-unify typ.p.subject [%cell head tail] sub.st)
7654+ =/ subject-type=itype (itype-normalize typ.p.subject sub.st)
7655+ ?: (itype-has-recursive subject-type)
7656+ [%| ["recursive pattern is not supported by partial inference" ~]]
7657+ ?: (itype-has-face typ.p.subject sub.st)
7658+ [%| ["record patterns are not supported by partial inference" ~]]
7659+ ?: (cell-pattern-spine-unknown subject-type p.names sub.st)
7660+ [%| ["cell pattern subject is not supported by partial inference" ~]]
7661+ =/ binders=[typ=itype env=ienv next=@ud] (cell-pattern-types p.names env next.st)
7662+ =/ sub=(unit isub) (itype-unify typ.p.subject typ.binders sub.st)
54807663 ?~ sub [%| ["cell pattern does not match the subject type" ~]]
5481− (infer-fragment val.arm [[one [head ~]] [two [tail ~]] env] st(next (add 2 next.st), sub u.sub))
7664+ (infer-fragment val.arm env.binders st(next next.binders, sub u.sub))
54827665::
54837666++ show-itype
54847667 |= [t=itype sub=isub]
@@ -5497,10 +7680,41 @@
54977680 %atom "@{(trip aura.t)}"
54987681 %any-atom "@"
54997682 %flag "?"
5500− %fn "$-({$(t sample.t)} {$(t product.t)})"
5501− %cell "[{$(t hed.t)} {$(t tal.t)}]"
7683+ %noun "*"
7684+ %tag (trip txt.literal.t)
7685+ %const (trip txt.literal.t)
7686+ %union
7687+ ?~ label.t (show-itype-cases cases.t sub)
7688+ ?~ args.t (trip u.label.t)
7689+ "({(trip u.label.t)} {(show-itype-cases args.t sub)})"
7690+ %recursive ?~(label.t "recursive mold" (trip u.label.t))
7691+ %collection "({(trip name.t)} {(show-itype-cases args.t sub)})"
7692+ %face "[{(trip name.t)}={(show-itype-context body.t sub)}]"
7693+ %fn "$-({(show-itype-context sample.t sub)} {(show-itype-context product.t sub)})"
7694+ %cell "[{(show-itype-item hed.t sub)} {(show-itype-item tal.t sub)}]"
55027695 ==
55037696::
7697+++ show-itype-item
7698+ |= [t=itype sub=isub]
7699+ ^- tape
7700+ =. t (itype-walk t sub)
7701+ ?: ?=(%face -.t) "{(trip name.t)}={(show-itype-context body.t sub)}"
7702+ (show-itype-context t sub)
7703+::
7704+++ show-itype-context
7705+ |= [t=itype sub=isub]
7706+ ^- tape
7707+ =. t (itype-walk t sub)
7708+ ?: &(?=(%union -.t) ?=(~ label.t)) "({(show-itype t sub)})"
7709+ (show-itype t sub)
7710+::
7711+++ show-itype-cases
7712+ |= [cases=(list itype) sub=isub]
7713+ ^- tape
7714+ ?~ cases ""
7715+ ?~ t.cases (show-itype-context i.cases sub)
7716+ "{(show-itype-context i.cases sub)} {$(cases t.cases)}"
7717+::
55047718:: Include the type at a conflicting site where it can be printed.
55057719:: A lone unresolved variable or decimal variable keeps the neutral label.
55067720::
@@ -5514,6 +7728,13 @@
55147728 %atom |
55157729 %any-atom |
55167730 %flag |
7731+ %noun |
7732+ %tag |
7733+ %const |
7734+ %union |((lien cases.typ |=(c=itype (itype-has-nvar c))) (lien args.typ |=(c=itype (itype-has-nvar c))))
7735+ %recursive |
7736+ %collection (lien args.typ |=(c=itype (itype-has-nvar c)))
7737+ %face $(typ body.typ)
55177738 %fn |($(typ sample.typ) $(typ product.typ))
55187739 %cell |($(typ hed.typ) $(typ tal.typ))
55197740 ==
@@ -5522,7 +7743,8 @@
55227743 |= [label=tape typ=itype sub=isub]
55237744 ^- tape
55247745 =/ normalized=itype (itype-normalize typ sub)
5525− ?: |(?=(%var -.normalized) ?=(%avar -.normalized) (itype-has-nvar normalized)) label
7746+ ?: |(?=(%var -.normalized) ?=(%avar -.normalized) (itype-has-nvar normalized) (itype-has-tag normalized) (itype-has-union normalized)) label
7747+ ?: (itype-has-hidden-recursive normalized) label
55267748 =/ vars=(list @ud) (unique-type-vars (itype-vars normalized))
55277749 ?: (gth (lent vars) 26) label
55287750 =/ printable=itype (canonical-itype normalized vars)
@@ -5531,13 +7753,64 @@
55317753:: A capital in a written mold is generalized with its enclosing ++.
55327754:: Atom constraints may remain generic; until full rigidity checking
55337755:: is implemented, do not report a type if one became more specific.
7756+:: Distinct written capitals cannot be forced equal; use the same
7757+:: capital where a type must be shared (Decisions 2026-10-30).
7758+::
7759+++ cap-id-in
7760+ |= [n=@ud caps=icaps sub=isub]
7761+ ^- ?
7762+ ?~ caps |
7763+ =/ resolved=itype (itype-walk [%var id.i.caps] sub)
7764+ =/ ident=(unit @ud)
7765+ ?+ -.resolved ~
7766+ %var `id.resolved
7767+ %avar `id.resolved
7768+ ==
7769+ ?~ ident $(caps t.caps)
7770+ ?: =(n u.ident) &
7771+ $(caps t.caps)
7772+::
7773+++ cap-with-id
7774+ |= [n=@ud caps=icaps sub=isub]
7775+ ^- (unit icap)
7776+ ?~ caps ~
7777+ =/ resolved=itype (itype-walk [%var id.i.caps] sub)
7778+ =/ ident=(unit @ud)
7779+ ?+ -.resolved ~
7780+ %var `id.resolved
7781+ %avar `id.resolved
7782+ ==
7783+ ?~ ident $(caps t.caps)
7784+ ?: =(n u.ident) `i.caps
7785+ $(caps t.caps)
7786+::
7787+++ merged-capitals
7788+ |= [caps=icaps sub=isub]
7789+ ^- (unit [first=icap second=icap])
7790+ ?~ caps ~
7791+ =/ resolved=itype (itype-walk [%var id.i.caps] sub)
7792+ =/ ident=(unit @ud)
7793+ ?+ -.resolved ~
7794+ %var `id.resolved
7795+ %avar `id.resolved
7796+ ==
7797+ ?~ ident $(caps t.caps)
7798+ =/ found=(unit icap) (cap-with-id u.ident t.caps sub)
7799+ ?^ found `[u.found i.caps]
7800+ $(caps t.caps)
55347801::
55357802++ constrained-capitals
55367803 |= [caps=icaps sub=isub]
55377804 ^- ?
55387805 ?~ caps |
55397806 =/ resolved=itype (itype-walk [%var id.i.caps] sub)
5540− ?. |(?=(%var -.resolved) ?=(%avar -.resolved)) &
7807+ =/ ident=(unit @ud)
7808+ ?+ -.resolved ~
7809+ %var `id.resolved
7810+ %avar `id.resolved
7811+ ==
7812+ ?~ ident &
7813+ ?: (cap-id-in u.ident t.caps sub) &
55417814 $(caps t.caps)
55427815::
55437816:: An atom variable may be generalized when an explicit capital, sample
@@ -5564,6 +7837,13 @@
55647837 %atom |
55657838 %any-atom |
55667839 %flag |
7840+ %noun |
7841+ %tag |
7842+ %const |
7843+ %union |((lien cases.t |=(c=itype (has-atom-var n c))) (lien args.t |=(c=itype (has-atom-var n c))))
7844+ %recursive |
7845+ %collection (lien args.t |=(c=itype (has-atom-var n c)))
7846+ %face $(t body.t)
55677847 %fn |($(t sample.t) $(t product.t))
55687848 %cell |($(t hed.t) $(t tal.t))
55697849 ==
@@ -5609,9 +7889,9 @@
56097889::
56107890:: Build the supported part of the value environment in dependency order.
56117891:: Each pass adds successful definitions. Forward references become
5612−:: available on a later pass; recursive groups and unsupported syntax do
5613−:: not enter the environment. Generalized definitions are closed, so a
5614−:: use instantiates its variables afresh.
7892+:: available on a later pass; unsupported syntax does not enter the
7893+:: environment. Generalized definitions are closed, so a use instantiates
7894+:: its variables afresh.
56157895::
56167896++ global-value-names
56177897 |= ds=(list def)
@@ -5629,31 +7909,587 @@
56297909 ?~ t.hits &
56307910 |
56317911::
7912+:: A top-level gate may refer to itself through one monomorphic placeholder.
7913+:: Its declared sample is inferred first and preserves its field faces.
7914+:: Unify the completed body with that placeholder before generalization;
7915+:: reporting repeats the same check instead of instantiating the gate's
7916+:: generalized interface inside its own body. Mutual groups stay unsupported.
7917+::
7918+++ direct-self-call
7919+ |= [e=expr name=term]
7920+ ^- ?
7921+ ?: ?=(%group -.e) $(e inner.e)
7922+ ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
7923+ ?. ?=(%call -.e) |
7924+ ?. ?=(%wing -.head.e) |
7925+ =(names.head.e ~[name])
7926+::
7927+++ branch-base-arm
7928+ |= [e=expr name=term]
7929+ ^- (unit expr)
7930+ ?: ?=(%group -.e) $(e inner.e)
7931+ ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
7932+ ?. ?=(%branch -.e) ~
7933+ ?~ arms.e ~
7934+ ?~ t.arms.e ~
7935+ ?^ t.t.arms.e ~
7936+ =/ x=arm i.arms.e
7937+ =/ y=arm i.t.arms.e
7938+ ?. &(?=(%lit -.pat.x) ?=(%lit -.pat.y)) ~
7939+ ?. &(=(%loobean form.lit.pat.x) =(%loobean form.lit.pat.y)) ~
7940+ ?: =(val.lit.pat.x val.lit.pat.y) ~
7941+ =/ first=? (direct-self-call val.x name)
7942+ =/ second=? (direct-self-call val.y name)
7943+ ?: =(first second) ~
7944+ `?:(first val.y val.x)
7945+::
7946+:: Infer the base arm independently, with the self binding removed. Only
7947+:: a closed type whose constraints resolved can seed the recursive result.
7948+:: The regular body inference then checks both arms with shared state.
7949+::
7950+++ recursive-branch-seed
7951+ |= [d=def env=ienv state=istate]
7952+ ^- (unit itype)
7953+ ?. ?=(%value -.d) ~
7954+ ?. |(?=(%gate -.val.d) ?=(%gate-wide -.val.d)) ~
7955+ =/ gate=expr val.d
7956+ =/ body=expr
7957+ ?- -.gate
7958+ %gate body.gate
7959+ %gate-wide body.gate
7960+ * !!
7961+ ==
7962+ =/ base=(unit expr) (branch-base-arm body name.d)
7963+ ?~ base ~
7964+ =/ outer=ienv (skim env |=(entry=[name=term scheme=ischeme] !=(name.entry name.d)))
7965+ =/ sam=isample-result
7966+ ?- -.gate
7967+ %gate (infer-sample sample.gate outer state)
7968+ %gate-wide (infer-sample sample.gate outer state)
7969+ * !!
7970+ ==
7971+ ?: ?=(%| -.sam) ~
7972+ =/ inferred=iresult (infer-fragment u.base env.p.sam state.p.sam)
7973+ ?: ?=(%| -.inferred) ~
7974+ ?: (pending-tags tags.state.p.inferred sub.state.p.inferred) ~
7975+ ?: (constrained-capitals caps.state.p.inferred sub.state.p.inferred) ~
7976+ =/ typ=itype (itype-normalize typ.p.inferred sub.state.p.inferred)
7977+ ?: ?=(^ (itype-vars typ)) ~
7978+ ?: (itype-has-tag typ) ~
7979+ `typ
7980+::
7981+++ infer-recursive-gate
7982+ |= [d=def env=ienv state=istate]
7983+ ^- iresult
7984+ ?. ?=(%value -.d) [%| ["recursive definition is not a gate" ~]]
7985+ ?. |(?=(%gate -.val.d) ?=(%gate-wide -.val.d))
7986+ [%| ["recursive definition is not a gate" ~]]
7987+ =/ result=(unit itype) (recursive-branch-seed d env state)
7988+ =/ gate=expr val.d
7989+ =/ sam=isample-result
7990+ ?- -.gate
7991+ %gate (infer-sample sample.gate env state)
7992+ %gate-wide (infer-sample sample.gate env state)
7993+ * !!
7994+ ==
7995+ ?: ?=(%| -.sam)
7996+ =/ diag=(unit idiag)
7997+ ?- -.gate
7998+ %gate (sample-import-invalid sample.gate env state)
7999+ %gate-wide (sample-import-invalid sample.gate env state)
8000+ * ~
8001+ ==
8002+ ?: &(=(p.sam "sample mold is not supported by partial inference") ?=(^ diag)) [%| u.diag]
8003+ [%| [p.sam ~]]
8004+ =/ id=@ud next.state.p.sam
8005+ =/ product=itype ?~(result [%var id] u.result)
8006+ =/ st=istate state.p.sam(next +(id))
8007+ =/ seed=itype [%fn typ.p.sam product]
8008+ =/ seeded=ienv [[name.d [seed ~]] env.p.sam]
8009+ =/ body=expr
8010+ ?- -.gate
8011+ %gate body.gate
8012+ %gate-wide body.gate
8013+ * !!
8014+ ==
8015+ =/ out=iresult (infer-fragment body seeded st)
8016+ ?: ?=(%| -.out) out
8017+ =/ uni=(unit isub) (itype-unify product typ.p.out sub.state.p.out)
8018+ ?~ uni [%| ["recursive gate constraint is not supported by partial inference" ~]]
8019+ [%& [%fn typ.p.sam typ.p.out] state.p.out(sub u.uni)]
8020+::
8021+++ dependency-root
8022+ |= names=(list term)
8023+ ^- (list term)
8024+ ?~ names ~
8025+ ~[(rear names)]
8026+::
8027+++ dependency-exprs
8028+ |= xs=(list expr)
8029+ ^- (list term)
8030+ ?~ xs ~
8031+ =/ first=(list term) (dependency-expr i.xs)
8032+ (weld first $(xs t.xs))
8033+::
8034+++ dependency-pieces
8035+ |= xs=(list piece)
8036+ ^- (list term)
8037+ ?~ xs ~
8038+ =/ first=(list term)
8039+ ?- -.i.xs
8040+ %expr (dependency-expr p.i.xs)
8041+ %text ~
8042+ ==
8043+ (weld first $(xs t.xs))
8044+::
8045+++ dependency-qsegs
8046+ |= xs=(list qseg)
8047+ ^- (list term)
8048+ ?~ xs ~
8049+ =/ first=(list term)
8050+ ?- -.i.xs
8051+ %expr (dependency-expr p.i.xs)
8052+ %knot ~
8053+ ==
8054+ (weld first $(xs t.xs))
8055+::
8056+++ dependency-items
8057+ |= xs=(list item)
8058+ ^- (list term)
8059+ ?~ xs ~
8060+ =/ first=(list term) (dependency-expr val.i.xs)
8061+ (weld first $(xs t.xs))
8062+::
8063+++ dependency-edits
8064+ |= xs=(list edit)
8065+ ^- (list term)
8066+ ?~ xs ~
8067+ =/ first=(list term) (dependency-expr val.i.xs)
8068+ (weld first $(xs t.xs))
8069+::
8070+++ dependency-arms
8071+ |= xs=(list arm)
8072+ ^- (list term)
8073+ ?~ xs ~
8074+ =/ first=(list term) (dependency-expr val.i.xs)
8075+ (weld first $(xs t.xs))
8076+::
8077+++ dependency-defs
8078+ |= xs=(list def)
8079+ ^- (list term)
8080+ ?~ xs ~
8081+ =/ first=(list term)
8082+ ?: ?=(%value -.i.xs) (dependency-expr val.i.xs)
8083+ ~
8084+ (weld first $(xs t.xs))
8085+::
8086+++ dependency-expr
8087+ |= e=expr
8088+ ^- (list term)
8089+ ?- -.e
8090+ %str (dependency-pieces pieces.e)
8091+ %qath (dependency-qsegs segs.e)
8092+ %wing (dependency-root names.e)
8093+ %change
8094+ =/ first=(list term) (dependency-root target.e)
8095+ =/ last=(list term) (dependency-edits edits.e)
8096+ (weld first last)
8097+ %pair (dependency-expr val.e)
8098+ %unit (dependency-expr val.e)
8099+ %group (dependency-expr inner.e)
8100+ %list (dependency-exprs items.e)
8101+ %tuple (dependency-items items.e)
8102+ %gate (dependency-expr body.e)
8103+ %gate-wide (dependency-expr body.e)
8104+ %call
8105+ =/ first=(list term) (dependency-expr head.e)
8106+ =/ last=(list term) (dependency-exprs args.e)
8107+ (weld first last)
8108+ %cast (dependency-expr val.e)
8109+ %trace
8110+ =/ first=(list term) (dependency-expr val.e)
8111+ =/ last=(list term) (dependency-expr then.e)
8112+ (weld first last)
8113+ %branch
8114+ =/ first=(list term) (dependency-expr subject.e)
8115+ =/ last=(list term) (dependency-arms arms.e)
8116+ (weld first last)
8117+ %body
8118+ =/ first=(list term) (dependency-defs defs.e)
8119+ =/ last=(list term) (dependency-expr final.e)
8120+ (weld first last)
8121+ * ~
8122+ ==
8123+::
8124+:: Infer a cyclic component with one monomorphic seed per gate. All members
8125+:: must succeed before any scheme is available; pending constraints and
8126+:: unresolved branch joins remain partial.
8127++$ igate-entry [name=term typ=itype body=expr env=ienv caps=icaps]
8128++$ igate-seeds (each [entries=(list igate-entry) state=istate] idiag)
8129+++ seed-gate-group
8130+ |= [ds=(list def) env=ienv state=istate]
8131+ ^- igate-seeds
8132+ ?~ ds [%& [~ state]]
8133+ =/ d=def i.ds
8134+ ?. ?=(%value -.d) [%| ["recursive group contains a non-gate" ~]]
8135+ =/ gate=expr val.d
8136+ ?. |(?=(%gate -.gate) ?=(%gate-wide -.gate))
8137+ [%| ["recursive group contains a non-gate" ~]]
8138+ =/ initial=istate (reserve-def-caps gate state)
8139+ =/ sam=isample-result
8140+ ?- -.gate
8141+ %gate (infer-sample sample.gate env initial)
8142+ %gate-wide (infer-sample sample.gate env initial)
8143+ * !!
8144+ ==
8145+ ?: ?=(%| -.sam) [%| [p.sam ~]]
8146+ =/ body=expr
8147+ ?- -.gate
8148+ %gate body.gate
8149+ %gate-wide body.gate
8150+ * !!
8151+ ==
8152+ =/ seed=itype [%fn typ.p.sam [%var next.state.p.sam]]
8153+ =/ entry=igate-entry [name.d seed body env.p.sam caps.state.p.sam]
8154+ =/ after=istate state.p.sam(next +(next.state.p.sam), caps caps.state)
8155+ =/ rest=igate-seeds $(ds t.ds, state after)
8156+ ?: ?=(%| -.rest) rest
8157+ [%& [[entry entries.p.rest] state.p.rest]]
8158+::
8159+++ group-seed-env
8160+ |= [entries=(list igate-entry) env=ienv]
8161+ ^- ienv
8162+ ?~ entries env
8163+ [[name.i.entries [typ.i.entries ~]] $(entries t.entries)]
8164+::
8165+++ infer-gate-group-bodies
8166+ |= [entries=(list igate-entry) seeds=ienv state=istate]
8167+ ^- igate-seeds
8168+ ?~ entries [%& [~ state]]
8169+ =/ entry=igate-entry i.entries
8170+ ?> ?=(%fn -.typ.entry)
8171+ =/ scope=ienv (weld seeds env.entry)
8172+ =/ out=iresult (infer-fragment body.entry scope state(caps caps.entry))
8173+ ?: ?=(%| -.out) out
8174+ =/ uni=(unit isub) (itype-unify product.typ.entry typ.p.out sub.state.p.out)
8175+ ?~ uni [%| ["recursive group constraint is not supported by partial inference" ~]]
8176+ =. caps.entry caps.state.p.out
8177+ =/ after=istate state.p.out(sub u.uni, caps caps.state)
8178+ =/ rest=igate-seeds $(entries t.entries, state after)
8179+ ?: ?=(%| -.rest) rest
8180+ [%& [[entry entries.p.rest] state.p.rest]]
8181+::
8182+++ group-schemes
8183+ |= [entries=(list igate-entry) env=ienv outer=istate state=istate]
8184+ ^- (each ienv idiag)
8185+ ?~ entries [%& ~]
8186+ =/ entry=igate-entry i.entries
8187+ =/ merged=(unit [first=icap second=icap]) (merged-capitals caps.entry sub.state)
8188+ ?^ merged
8189+ [%| ["distinct type variables must not be forced equal" ~[[at.first.u.merged "first type variable"] [at.second.u.merged "second type variable"]]]]
8190+ ?: (constrained-capitals caps.entry sub.state)
8191+ [%| ["explicit capital constraints are not supported by partial inference" ~]]
8192+ =/ typ=itype (itype-normalize typ.entry sub.state)
8193+ ?: |((itype-has-tag typ) (itype-has-hidden-generic typ) (itype-has-hidden-recursive typ) (unsupported-atom-vars typ caps.entry binders.state sub.state))
8194+ [%| ["recursive group needs unsupported inference" ~]]
8195+ =/ free=(list @ud) (weld (free-env-vars env sub.state) (free-cap-vars caps.outer sub.state))
8196+ =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
8197+ =. vars (skim vars |=(n=@ud !(lien free |=(f=@ud =(f n)))))
8198+ ?: (gth (lent vars) 26) [%| ["recursive group needs too many type variables" ~]]
8199+ =/ rest=(each ienv idiag) $(entries t.entries)
8200+ ?: ?=(%| -.rest) rest
8201+ [%& [[name.entry [typ vars]] p.rest]]
8202+::
8203+++ infer-gate-group
8204+ |= [ds=(list def) env=ienv state=istate]
8205+ ^- ilocal-result
8206+ =/ names=(list term) (global-value-names ds)
8207+ ?. (levy names |=(n=term (unique-value-name n names)))
8208+ [%| ["recursive group contains duplicate names" ~]]
8209+ ?: (lien names |=(n=term ?=(^ (ienv-lookup n env))))
8210+ [%| ["recursive group shadows a name" ~]]
8211+ =/ scoped=istate state(globals (weld names globals.state))
8212+ =/ seeded=igate-seeds (seed-gate-group ds env scoped)
8213+ ?: ?=(%| -.seeded) seeded
8214+ =/ seeds=ienv (group-seed-env entries.p.seeded ~)
8215+ =/ body=igate-seeds (infer-gate-group-bodies entries.p.seeded seeds state.p.seeded)
8216+ ?: ?=(%| -.body) body
8217+ ?: (pending-tags tags.state.p.body sub.state.p.body)
8218+ [%| ["recursive group has unresolved literal constraints" ~]]
8219+ =/ schemes=(each ienv idiag) (group-schemes entries.p.body env state state.p.body)
8220+ ?: ?=(%| -.schemes) schemes
8221+ [%& [(weld p.schemes env) state.p.body(globals globals.state)]]
8222+::
56328223++ add-supported-defs
5633− |= [ds=(list def) env=ienv molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term)]
8224+ |= [ds=(list def) env=ienv molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) at=path prelude=(unit ifile)]
56348225 ^- ienv
56358226 ?~ ds env
56368227 =/ d=def i.ds
56378228 ?: ?=(%mold -.d) $(ds t.ds)
56388229 ?. (unique-value-name name.d globals) $(ds t.ds)
56398230 ?^ (ienv-lookup name.d env) $(ds t.ds)
5640− =/ result=iresult (infer-fragment val.d env [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ |])
8231+ =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
8232+ =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude]
8233+ =. initial (reserve-def-caps val.d initial)
8234+ =/ result=iresult (infer-fragment val.d env initial)
8235+ =? result ?=(%| -.result) (infer-recursive-gate d env initial)
56418236 ?: ?=(%| -.result) $(ds t.ds)
56428237 ?: (constrained-capitals caps.state.p.result sub.state.p.result) $(ds t.ds)
56438238 =/ typ=itype (default-decimals (itype-normalize typ.p.result sub.state.p.result))
8239+ ?: |((pending-tags tags.state.p.result sub.state.p.result) (itype-has-tag typ)) $(ds t.ds)
56448240 ?: (unsupported-atom-vars typ caps.state.p.result binders.state.p.result sub.state.p.result) $(ds t.ds)
56458241 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
56468242 ?: (gth (lent vars) 26) $(ds t.ds)
56478243 $(ds t.ds, env [[name.d [typ vars]] env])
56488244::
8245++$ iresolved [env=ienv grouped=(list term)]
8246++$ iadj (map term (list term))
8247++$ ivisited (map term ?)
8248++$ iwork (list [name=term done=?])
8249++$ iwresult [seen=ivisited order=(list term)]
8250++$ icresult [seen=ivisited component=(list term)]
8251++$ icomponents (list (list term))
8252+++ graph-nameset
8253+ |= [names=(list term) seen=ivisited]
8254+ ^- ivisited
8255+ ?~ names seen
8256+ $(names t.names, seen (~(put by seen) i.names &))
8257+::
8258+++ graph-edges
8259+ |= [name=term graph=iadj]
8260+ ^- (list term)
8261+ =/ found=(unit (list term)) (~(get by graph) name)
8262+ ?~ found ~
8263+ u.found
8264+::
8265+++ graph-make-forward
8266+ |= [ds=(list def) names=ivisited graph=iadj]
8267+ ^- iadj
8268+ ?~ ds graph
8269+ ?. ?=(%value -.i.ds) $(ds t.ds)
8270+ =/ deps=(list term) (dependency-expr val.i.ds)
8271+ =. deps (skim deps |=(n=term ?=(^ (~(get by names) n))))
8272+ $(ds t.ds, graph (~(put by graph) name.i.ds deps))
8273+::
8274+++ graph-add-reverse
8275+ |= [name=term edges=(list term) reverse=iadj]
8276+ ^- iadj
8277+ ?~ edges reverse
8278+ =/ prior=(list term) (graph-edges i.edges reverse)
8279+ $(edges t.edges, reverse (~(put by reverse) i.edges [name prior]))
8280+::
8281+++ graph-reverse
8282+ |= [names=(list term) graph=iadj reverse=iadj]
8283+ ^- iadj
8284+ ?~ names reverse
8285+ =. reverse (graph-add-reverse i.names (graph-edges i.names graph) reverse)
8286+ $(names t.names)
8287+::
8288+++ graph-order
8289+ |= [todo=iwork seen=ivisited order=(list term) graph=iadj]
8290+ ^- iwresult
8291+ ?~ todo [seen order]
8292+ =/ event=[name=term done=?] i.todo
8293+ ?: done.event $(todo t.todo, order [name.event order])
8294+ ?: ?=(^ (~(get by seen) name.event)) $(todo t.todo)
8295+ =. seen (~(put by seen) name.event &)
8296+ =/ children=iwork (turn (graph-edges name.event graph) |=(n=term [n |]))
8297+ $(todo (weld children [[name.event &] t.todo]))
8298+::
8299+++ graph-collect
8300+ |= [todo=(list term) seen=ivisited component=(list term) graph=iadj]
8301+ ^- icresult
8302+ ?~ todo [seen component]
8303+ ?: ?=(^ (~(get by seen) i.todo)) $(todo t.todo)
8304+ =. seen (~(put by seen) i.todo &)
8305+ $(todo (weld (graph-edges i.todo graph) t.todo), component [i.todo component])
8306+::
8307+++ graph-collect-all
8308+ |= [order=(list term) seen=ivisited graph=iadj comps=icomponents]
8309+ ^- icomponents
8310+ ?~ order comps
8311+ ?: ?=(^ (~(get by seen) i.order)) $(order t.order)
8312+ =/ found=icresult (graph-collect ~[i.order] seen ~ graph)
8313+ $(order t.order, seen seen.found, comps [component.found comps])
8314+::
8315+:: Two depth-first passes find components before group inference. Maps
8316+:: preserve the graph identity; duplicate global names fail closed.
8317+++ graph-components
8318+ |= [ds=(list def) names=(list term)]
8319+ ^- icomponents
8320+ =/ nameset=ivisited ~
8321+ =/ pending=(list term) names
8322+ |-
8323+ ?^ pending
8324+ ?: ?=(^ (~(get by nameset) i.pending)) ~
8325+ $(pending t.pending, nameset (~(put by nameset) i.pending &))
8326+ =/ graph=iadj (graph-make-forward ds nameset ~)
8327+ =/ reverse=iadj (graph-reverse names graph ~)
8328+ =/ order=iwresult (graph-order (turn names |=(n=term [n |])) ~ ~ graph)
8329+ (graph-collect-all order.order ~ reverse ~)
8330+::
8331+++ graph-cycle
8332+ |= [component=(list term) graph=iadj]
8333+ ^- ?
8334+ ?~ component |
8335+ ?^ t.component &
8336+ (lien (graph-edges i.component graph) |=(x=term =(x i.component)))
8337+::
8338+++ add-groups
8339+ |= [ds=(list def) components=icomponents graph=iadj env=ienv grouped=(list term) state=istate]
8340+ ^- iresolved
8341+ ?~ components [env grouped]
8342+ =/ component=(list term) i.components
8343+ ?. (graph-cycle component graph) $(components t.components)
8344+ ?: (lien component |=(n=term ?=(^ (ienv-lookup n env)))) $(components t.components)
8345+ =/ members=(list def)
8346+ %+ skim ds
8347+ |= d=def
8348+ &(?=(%value -.d) (lien component |=(n=term =(n name.d))))
8349+ ?. =((lent members) (lent component)) $(components t.components)
8350+ ?. (levy component |=(n=term (unique-value-name n globals.state))) $(components t.components)
8351+ =/ result=ilocal-result (infer-gate-group members env state)
8352+ ?: ?=(%| -.result) $(components t.components)
8353+ $(components t.components, env env.p.result, grouped (weld component grouped))
8354+::
8355+++ resolve-groups
8356+ |= [ds=(list def) molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) at=path prelude=(unit ifile)]
8357+ ^- iresolved
8358+ =/ env=ienv ~
8359+ =/ grouped=(list term) ~
8360+ =/ names=(list term) (global-value-names ds)
8361+ =/ nameset=ivisited (graph-nameset names ~)
8362+ =/ graph=iadj (graph-make-forward ds nameset ~)
8363+ =/ components=icomponents (graph-components ds names)
8364+ =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
8365+ |-
8366+ =/ next=ienv (add-supported-defs ds env molds globals externals surs mark-externals marks jimports reserved-molds at prelude)
8367+ =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude]
8368+ =/ out=iresolved (add-groups ds components graph next grouped initial)
8369+ ?: =(env env.out) out
8370+ $(env env.out, grouped grouped.out)
8371+::
56498372++ resolve-supported-defs
5650− |= [ds=(list def) molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term)]
8373+ |= [ds=(list def) molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) at=path prelude=(unit ifile)]
56518374 ^- ienv
5652− =/ env=ienv ~
8375+ env:(resolve-groups ds molds globals externals surs mark-externals marks jimports reserved-molds at prelude)
8376+::
8377+:: A diagnostic-only proof for a narrow syntactic value cycle. Every
8378+:: edge is an unqualified wing in a supported expression, and samples
8379+:: may not shadow global bindings. Unknown forms yield no conclusion.
8380++$ icyclesite [name=term at=span]
8381++$ icycle [name=term first=span next=span]
8382+++ cycle-sites-list
8383+ |= [xs=(list expr) globals=(list term) locals=(list term)]
8384+ ^- (unit (list icyclesite))
8385+ ?~ xs `~
8386+ =/ first=(unit (list icyclesite)) (cycle-sites i.xs globals locals)
8387+ ?~ first ~
8388+ =/ tail=(unit (list icyclesite)) $(xs t.xs)
8389+ ?~ tail ~
8390+ `(weld u.first u.tail)
8391+::
8392+++ cycle-sample-name
8393+ |= [sam=sample globals=(list term) locals=(list term)]
8394+ ^- (unit (unit term))
8395+ ?- -.sam
8396+ %bind
8397+ ?: (lien (weld globals locals) |=(n=term =(n name.sam))) ~
8398+ ``name.sam
8399+ %face
8400+ ?: (lien (weld globals locals) |=(n=term =(n name.sam))) ~
8401+ ``name.sam
8402+ %bare `~
8403+ * ~
8404+ ==
8405+::
8406+++ cycle-sites
8407+ |= [e=expr globals=(list term) locals=(list term)]
8408+ ^- (unit (list icyclesite))
8409+ ?- -.e
8410+ %wing
8411+ ?. ?=([@ ~] names.e) ~
8412+ `~[[i.names.e at.e]]
8413+ %lit `~
8414+ %str
8415+ ?: (lien pieces.e |=(p=piece ?=(%expr -.p))) ~
8416+ `~
8417+ %group $(e inner.e)
8418+ %body ?~(defs.e $(e final.e) ~)
8419+ %cast $(e val.e)
8420+ %gate
8421+ =/ binder=(unit (unit term)) (cycle-sample-name sample.e globals locals)
8422+ ?~ binder ~
8423+ =/ nested=(list term) ?~(u.binder locals [u.u.binder locals])
8424+ $(e body.e, locals nested)
8425+ %gate-wide
8426+ =/ binder=(unit (unit term)) (cycle-sample-name sample.e globals locals)
8427+ ?~ binder ~
8428+ =/ nested=(list term) ?~(u.binder locals [u.u.binder locals])
8429+ $(e body.e, locals nested)
8430+ %call
8431+ =/ first=(unit (list icyclesite)) $(e head.e)
8432+ ?~ first ~
8433+ =/ tail=(unit (list icyclesite)) (cycle-sites-list args.e globals locals)
8434+ ?~ tail ~
8435+ `(weld u.first u.tail)
8436+ * ~
8437+ ==
8438+::
8439+++ cycle-definitely-atom
8440+ |= e=expr
8441+ ^- ?
8442+ ?: ?=(%group -.e) $(e inner.e)
8443+ ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
8444+ ?. ?=(%cast -.e) |
8445+ |(?=(%aura -.shape.e) ?=(%flag -.shape.e))
8446+::
8447+++ cycle-proof-group
8448+ |= [members=(list def) globals=(list term)]
8449+ ^- ?
8450+ ?~ members &
8451+ ?. ?=(%value -.i.members) |
8452+ ?. (unique-value-name name.i.members globals) |
8453+ ?. ?=(^ (cycle-sites val.i.members globals ~)) |
8454+ $(members t.members)
8455+::
8456+++ cycle-find-site
8457+ |= [sites=(list icyclesite) component=(list term)]
8458+ ^- (unit span)
8459+ ?~ sites ~
8460+ ?: (lien component |=(n=term =(n name.i.sites))) `at.i.sites
8461+ $(sites t.sites)
8462+::
8463+++ cycle-group-errors
8464+ |= [members=(list def) component=(list term) globals=(list term)]
8465+ ^- (list icycle)
8466+ ?~ members ~
8467+ =/ d=def i.members
8468+ ?> ?=(%value -.d)
8469+ =/ tail=(list icycle) $(members t.members)
8470+ ?. (cycle-definitely-atom val.d) tail
8471+ =/ sites=(unit (list icyclesite)) (cycle-sites val.d globals ~)
8472+ ?~ sites tail
8473+ =/ found=(unit span) (cycle-find-site u.sites component)
8474+ ?~ found tail
8475+ [[name.d at.d u.found] tail]
8476+::
8477+++ definite-value-cycles
8478+ |= [ds=(list def) globals=(list term)]
8479+ ^- (list icycle)
8480+ =/ names=(list term) (global-value-names ds)
8481+ =/ graph=iadj (graph-make-forward ds (graph-nameset names ~) ~)
8482+ =/ components=icomponents (graph-components ds names)
8483+ =/ out=(list icycle) ~
56538484 |-
5654− =/ next=ienv (add-supported-defs ds env molds globals externals surs mark-externals marks jimports reserved-molds)
5655− ?: =(next env) env
5656− $(env next)
8485+ ?~ components out
8486+ =/ component=(list term) i.components
8487+ ?. (graph-cycle component graph) $(components t.components)
8488+ =/ members=(list def)
8489+ (skim ds |=(d=def &(?=(%value -.d) (lien component |=(n=term =(n name.d))))))
8490+ ?. =((lent members) (lent component)) $(components t.components)
8491+ ?. (cycle-proof-group members globals) $(components t.components)
8492+ $(components t.components, out (weld (cycle-group-errors members component globals) out))
56578493::
56588494+| %union-analysis
56598495::
@@ -5846,8 +8682,9 @@
58468682::
58478683+$ jsource [at=path source=@t]
58488684+$ jbundle (list jsource)
5849−+$ jfile-result (each ifile @t)
5850−+$ jimports-result (each ijimports @t)
8685++$ jcache (list [at=path iface=ifile])
8686++$ jfile-result (each [iface=ifile cache=jcache] @t)
8687++$ jimports-result (each [resolved=ijimports cache=jcache] @t)
58518688::
58528689++ import-binding-names
58538690 |= imports=(list import)
@@ -5875,18 +8712,175 @@
58758712 ?. (levy vals |=(n=term &((unique-value-name n vals) !(lien prelude-values |=(v=term =(n v)))))) |
58768713 (levy mold-names |=(n=term &((unique-value-name n mold-names) !(lien prelude-molds |=(m=term =(n m))))))
58778714::
8715+:: In an API file or before main's kind is known, a lone `+$ poke`
8716+:: may be a declaration rather than a mold that shadows the prelude. Do not call
8717+:: that one collision definite, and do not hide unrelated scope errors.
8718+++ pending-declared-poke
8719+ |= [at=path mod=module prelude-values=(list term) prelude-molds=(list term)]
8720+ ^- ?
8721+ ?. (lien prelude-molds |=(n=term =(%poke n))) |
8722+ ?. |(?=([%ui %api @ %jibb ~] at) (lien defs.mod |=(d=def &(?=(%value -.d) =(%main name.d))))) |
8723+ =/ pokes=(list def)
8724+ (skim defs.mod |=(d=def &(?=(%mold -.d) =(%poke name.d))))
8725+ ?~ pokes |
8726+ ?^ t.pokes |
8727+ =/ remaining=(list def)
8728+ (skim defs.mod |=(d=def !&(?=(%mold -.d) =(%poke name.d))))
8729+ (module-scope-valid mod(defs remaining) prelude-values prelude-molds)
8730+::
58788731++ module-mold-types
58798732 |= [molds=imolds state=istate]
58808733 ^- (each imold-types @t)
58818734 ?~ molds [%& ~]
58828735 =/ m=[name=term body=shape] i.molds
5883− =/ t=(unit [typ=itype state=istate])
5884− (infer-simple-shape body.m state(active [name.m active.state], in-mold &))
8736+ =/ t=(unit [template=ischeme state=istate])
8737+ (infer-mold-template body.m state(active [name.m active.state], in-mold &))
58858738 ?~ t [%| 'module mold needs unsupported inference']
5886− ?: ?=(^ (itype-vars typ.u.t)) [%| 'module mold has unsupported variables']
8739+ =. typ.template.u.t (label-direct-union typ.template.u.t body.m name.m state)
58878740 =/ rest=(each imold-types @t) $(molds t.molds)
58888741 ?: ?=(%| -.rest) rest
5889− [%& [[name.m typ.u.t] p.rest]]
8742+ [%& [[name.m template.u.t] p.rest]]
8743+::
8744+:: Prepare a provisional interface from the trusted vendored source.
8745+:: Every declared name remains reserved, but only molds and values this
8746+:: fragment can infer are usable. Unsupported bodies are not validated.
8747+:: An optional internal source supplies the prelude's one supported import;
8748+:: clients cannot import that path directly. Named unions retain their origin.
8749+::
8750+:: Recognize only the complete standard prelude list shape. Its recursive
8751+:: tail uses the same parameter and the unqualified list name. The reader
8752+:: verifies Hoon's list provenance before producing the same collection type.
8753+:: The prelude source and reader output are trusted caller inputs.
8754+::
8755+++ standard-prelude-list
8756+ |= sh=shape
8757+ ^- ?
8758+ ?. ?=(%generic -.sh) |
8759+ ?~ vars.sh |
8760+ ?^ t.vars.sh |
8761+ =/ var=@t i.vars.sh
8762+ ?. ?=(%union -.body.sh) |
8763+ =/ cs=(list shape) cases.body.sh
8764+ ?~ cs |
8765+ ?~ t.cs |
8766+ ?^ t.t.cs |
8767+ ?. ?=(%const -.i.cs) |
8768+ ?. =(%null form.lit.i.cs) |
8769+ ?. ?=(%cell -.i.t.cs) |
8770+ =/ fs=(list field) fields.i.t.cs
8771+ ?~ fs |
8772+ ?~ t.fs |
8773+ ?^ t.t.fs |
8774+ ?. ?=(%face -.i.fs) |
8775+ ?. =(%i name.i.fs) |
8776+ ?. ?=(%tvar -.shape.i.fs) |
8777+ ?. =(var name.shape.i.fs) |
8778+ ?. ?=(%face -.i.t.fs) |
8779+ ?. =(%t name.i.t.fs) |
8780+ =/ tail=shape shape.i.t.fs
8781+ ?. ?=(%apply -.tail) |
8782+ ?. =(~[%list] ref.tail) |
8783+ ?~ args.tail |
8784+ ?^ t.args.tail |
8785+ ?. ?=(%tvar -.i.args.tail) |
8786+ =(var name.i.args.tail)
8787+::
8788+++ prelude-label
8789+ |= [typ=itype name=term]
8790+ ^- itype
8791+ ?. ?=(%union -.typ) typ
8792+ ?^ args.typ typ
8793+ typ(label `name)
8794+::
8795+++ partial-prelude-molds
8796+ |= [molds=imolds state=istate]
8797+ ^- imold-types
8798+ ?~ molds ~
8799+ =/ m=[name=term body=shape] i.molds
8800+ ?: &(=(at.state /lib/jibb/prelude/jibb) =(%list name.m))
8801+ ?. (standard-prelude-list body.m) $(molds t.molds)
8802+ [[%list [[%collection %list ~[[%var 0]]] ~[0]]] $(molds t.molds)]
8803+ =/ out=(unit [template=ischeme state=istate])
8804+ (infer-mold-template body.m state(active [name.m active.state], in-mold &))
8805+ ?~ out $(molds t.molds)
8806+ =. typ.template.u.out (label-direct-union typ.template.u.out body.m name.m state)
8807+ =. typ.template.u.out (prelude-label typ.template.u.out name.m)
8808+ [[name.m template.u.out] $(molds t.molds)]
8809+::
8810+++ partial-prelude-interface-with-internal
8811+ |= [src=@t internal-source=(unit @t)]
8812+ ^- (unit ifile)
8813+ ?: =(0 src) ~
8814+ =/ at=path /lib/jibb/prelude/jibb
8815+ =/ parsed (parse at src)
8816+ ?: ?=(%| -.parsed) ~
8817+ =/ private=(unit ijimports)
8818+ ?~ imports.p.parsed `~
8819+ ?. ?=([[%jibb *] ~] imports.p.parsed) ~
8820+ ?. =(path.i.imports.p.parsed /lib/jibb/internal) ~
8821+ ?~ internal-source ~
8822+ =/ built=jfile-result
8823+ (infer-jibb-file /lib/jibb/internal/jibb u.internal-source ~ ~ ~ ~[/lib/jibb/internal/jibb] ~ ~ ~ ~)
8824+ ?: ?=(%| -.built) ~
8825+ `~[[face.i.imports.p.parsed iface.p.built]]
8826+ ?~ private ~
8827+ ?~ defs.p.parsed ~
8828+ ?. (module-scope-valid p.parsed ~ ~) ~
8829+ =/ ds=(list def) defs.p.parsed
8830+ =/ molds=imolds (collect-simple-molds ds)
8831+ =/ names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
8832+ =/ globals=(list term) (weld (import-binding-names imports.p.parsed) (global-value-names ds))
8833+ :: Remove raw list before inferring any template, so an altered list
8834+ :: cannot leak through an alias. Its name remains reserved either way.
8835+ =/ declared=? (lien names |=(name=term =(%list name)))
8836+ =/ env-molds=imolds molds
8837+ =? env-molds declared
8838+ (skim molds |=(m=[name=term body=shape] !=(%list name.m)))
8839+ =/ reserved=(list term) ?:(declared ~[%list] ~)
8840+ =/ state=istate [0 ~ ~ ~ env-molds globals ~ ~ ~ ~ u.private reserved ~ ~ ~ | at names ~]
8841+ =/ mt=imold-types (partial-prelude-molds molds state)
8842+ =/ partial=ifile [~ mt at ~]
8843+ :: An explicitly qualified re-export must resolve. Other unsupported
8844+ :: prelude declarations remain reserved but absent from the interface.
8845+ =/ required=imolds
8846+ %+ skim molds
8847+ |= m=[name=term body=shape]
8848+ =/ sh=shape body.m
8849+ ?. ?=(%ref -.sh) |
8850+ ?~ names.sh |
8851+ ?=(^ t.names.sh)
8852+ ?. (levy required |=(m=[name=term body=shape] ?=(^ (find-jibb-mold name.m partial)))) ~
8853+ =/ env=ienv (resolve-supported-defs ds env-molds globals ~ ~ ~ ~ u.private reserved at `partial)
8854+ `[env mt at ~]
8855+::
8856+++ partial-prelude-interface
8857+ |= src=@t
8858+ ^- (unit ifile)
8859+ (partial-prelude-interface-with-internal src ~)
8860+::
8861++$ iprelude [iface=ifile values=(list term) molds=(list term)]
8862+::
8863+++ prepare-prelude
8864+ |= src=@t
8865+ ^- (unit iprelude)
8866+ =/ iface=(unit ifile) (partial-prelude-interface src)
8867+ ?~ iface ~
8868+ =/ parsed (parse /lib/jibb/prelude/jibb src)
8869+ ?: ?=(%| -.parsed) ~
8870+ =/ vals=(list term) (global-value-names defs.p.parsed)
8871+ =/ ms=(list term) (turn (collect-simple-molds defs.p.parsed) |=(m=[name=term body=shape] name.m))
8872+ `[u.iface vals ms]
8873+::
8874+++ prepare-prelude-with-internal
8875+ |= [src=@t internal-source=@t]
8876+ ^- (unit iprelude)
8877+ =/ iface=(unit ifile) (partial-prelude-interface-with-internal src `internal-source)
8878+ ?~ iface ~
8879+ =/ parsed (parse /lib/jibb/prelude/jibb src)
8880+ ?: ?=(%| -.parsed) ~
8881+ =/ vals=(list term) (global-value-names defs.p.parsed)
8882+ =/ ms=(list term) (turn (collect-simple-molds defs.p.parsed) |=(m=[name=term body=shape] name.m))
8883+ `[u.iface vals ms]
58908884::
58918885++ module-values-complete
58928886 |= [ds=(list def) env=ienv]
@@ -5896,48 +8890,329 @@
58968890 ?~ (ienv-lookup name.i.ds env) |
58978891 $(ds t.ds)
58988892::
8893+:: Cache only completed interfaces for this invocation. The source bundle,
8894+:: imported Hoon types and prelude are fixed for the whole graph. Check the
8895+:: active path and duplicate sources before consulting it, so a cache hit
8896+:: cannot hide a cycle or ambiguous source.
8897+::
8898+++ find-jibb-cache
8899+ |= [at=path cache=jcache]
8900+ ^- (unit ifile)
8901+ ?~ cache ~
8902+ ?: =(at at.i.cache) `iface.i.cache
8903+ $(cache t.cache)
8904+::
58998905++ resolve-jibb-imports
5900− |= [imports=(list import) externals=iexternals mark-externals=imark-externals modules=jbundle active=(list path) prelude-values=(list term) prelude-molds=(list term)]
8906+ |= [imports=(list import) externals=iexternals mark-externals=imark-externals modules=jbundle active=(list path) prelude-values=(list term) prelude-molds=(list term) cache=jcache prelude=(unit ifile)]
59018907 ^- jimports-result
5902− ?~ imports [%& ~]
8908+ ?~ imports [%& [~ cache]]
59038909 ?. ?=(%jibb -.i.imports) $(imports t.imports)
59048910 =/ at=path (weld path.i.imports `path`~[%jibb])
8911+ ?: =(at /lib/jibb/internal/jibb)
8912+ [%| 'the prelude internal module is private']
59058913 ?: (lien active |=(p=path =(p at)))
59068914 [%| (crip "import cycle at {(spud at)}")]
59078915 =/ found=jbundle (skim modules |=(m=jsource =(at at.m)))
59088916 ?~ found [%| (crip "module source missing: {(spud at)}")]
59098917 ?^ t.found [%| (crip "duplicate module sources: {(spud at)}")]
5910− =/ iface=jfile-result (infer-jibb-file at source.i.found externals mark-externals modules [at active] prelude-values prelude-molds)
8918+ =/ cached=(unit ifile) (find-jibb-cache at cache)
8919+ =/ iface=jfile-result
8920+ ?^ cached [%& [u.cached cache]]
8921+ (infer-jibb-file at source.i.found externals mark-externals modules [at active] prelude-values prelude-molds cache prelude)
59118922 ?: ?=(%| -.iface) [%| p.iface]
5912− =/ rest=jimports-result $(imports t.imports)
8923+ =/ rest=jimports-result $(imports t.imports, cache cache.p.iface)
59138924 ?: ?=(%| -.rest) rest
5914− [%& [[face.i.imports p.iface] p.rest]]
8925+ [%& [[[face.i.imports iface.p.iface] resolved.p.rest] cache.p.rest]]
8926+::
8927+:: Provisional declaration extraction only; this does not derive asks,
8928+:: validate imported types, or claim that an API module has checked.
8929++$ iapi-path [at=span name=term segments=(list pseg) full=term diffs=(list term) scry=(unit (list pseg))]
8930+++ api-path-mark
8931+ |= [sh=shape marks=(list term)]
8932+ ^- (unit term)
8933+ ?. ?=(%ref -.sh) ~
8934+ ?. ?=([@ ~] names.sh) ~
8935+ ?. (unique-value-name i.names.sh marks) ~
8936+ `i.names.sh
8937+::
8938+++ api-path-diffs
8939+ |= [shapes=(list shape) marks=(list term) used=(list term)]
8940+ ^- (unit (list term))
8941+ ?~ shapes `~
8942+ =/ n=(unit term) (api-path-mark i.shapes marks)
8943+ ?~ n ~
8944+ ?: (lien used |=(x=term =(x u.n))) ~
8945+ =/ rest=(unit (list term)) $(shapes t.shapes, used [u.n used])
8946+ ?~ rest ~
8947+ `[u.n u.rest]
8948+::
8949+++ api-path-payload
8950+ |= [sh=shape marks=(list term)]
8951+ ^- (unit [full=term diffs=(list term)])
8952+ =/ direct=(unit term) (api-path-mark sh marks)
8953+ ?^ direct `[u.direct ~]
8954+ ?. ?=(%apply -.sh) ~
8955+ ?. =(~[%facts] ref.sh) ~
8956+ ?~ args.sh ~
8957+ ?~ t.args.sh ~
8958+ =/ full=(unit term) (api-path-mark i.args.sh marks)
8959+ ?~ full ~
8960+ =/ diffs=(unit (list term)) (api-path-diffs t.args.sh marks ~[u.full])
8961+ ?~ diffs ~
8962+ `[u.full u.diffs]
8963+::
8964++$ iapi-parameter [name=term aura=@ta at=span]
8965+++ api-path-parameters
8966+ |= [segments=(list pseg) seen=(list term)]
8967+ ^- (unit (list iapi-parameter))
8968+ ?~ segments `~
8969+ ?: ?=(%knot -.i.segments) $(segments t.segments)
8970+ =/ seg=pseg i.segments
8971+ ?> ?=(%typed -.seg)
8972+ ?: =(0 aura.seg) ~
8973+ ?: (lien seen |=(n=term =(n name.seg))) ~
8974+ =/ rest=(unit (list iapi-parameter)) $(segments t.segments, seen [name.seg seen])
8975+ ?~ rest ~
8976+ `[[name.seg aura.seg at.seg] u.rest]
8977+::
8978+++ api-scry-parameters-compatible
8979+ |= [scry=(list iapi-parameter) watch=(list iapi-parameter)]
8980+ ^- ?
8981+ ?~ scry &
8982+ ?. (lien watch |=(p=iapi-parameter &(=(name.p name.i.scry) =(aura.p aura.i.scry)))) |
8983+ $(scry t.scry)
8984+::
8985+++ api-path-one
8986+ |= [sh=shape marks=(list term)]
8987+ ^- (unit iapi-path)
8988+ ?. ?=(%cell -.sh) ~
8989+ =/ fs=(list field) fields.sh
8990+ ?~ fs ~
8991+ ?~ t.fs ~
8992+ ?~ t.t.fs ~
8993+ ?: (gth (lent fs) 4) ~
8994+ ?. ?=(%bare -.i.fs) ~
8995+ =/ tag=shape shape.i.fs
8996+ ?. ?=(%const -.tag) ~
8997+ ?. =(%term form.lit.tag) ~
8998+ =/ name=term val.lit.tag
8999+ ?. (jibb-face-name name) ~
9000+ ?. ?=(%bare -.i.t.fs) ~
9001+ =/ path-shape=shape shape.i.t.fs
9002+ ?. ?=(%path -.path-shape) ~
9003+ ?. ?=(%bare -.i.t.t.fs) ~
9004+ =/ payload=(unit [full=term diffs=(list term)]) (api-path-payload shape.i.t.t.fs marks)
9005+ ?~ payload ~
9006+ =/ scry=(unit (unit (list pseg)))
9007+ ?~ t.t.t.fs `~
9008+ =/ entry=field i.t.t.t.fs
9009+ ?. ?=(%face -.entry) ~
9010+ ?. =(%scry name.entry) ~
9011+ ?. ?=(%path -.shape.entry) ~
9012+ ``segs.shape.entry
9013+ ?~ scry ~
9014+ =/ params=(unit (list iapi-parameter)) (api-path-parameters segs.path-shape ~)
9015+ ?~ params ~
9016+ ?^ u.scry
9017+ =/ scry-params=(unit (list iapi-parameter)) (api-path-parameters u.u.scry ~)
9018+ ?~ scry-params ~
9019+ ?. (api-scry-parameters-compatible u.scry-params u.params) ~
9020+ `[at.sh name segs.path-shape full.u.payload diffs.u.payload u.scry]
9021+ `[at.sh name segs.path-shape full.u.payload diffs.u.payload u.scry]
9022+::
9023+++ api-path-many
9024+ |= [shapes=(list shape) marks=(list term) seen=(list term)]
9025+ ^- (unit (list iapi-path))
9026+ ?~ shapes `~
9027+ =/ one=(unit iapi-path) (api-path-one i.shapes marks)
9028+ ?~ one ~
9029+ ?: (lien seen |=(n=term =(n name.u.one))) ~
9030+ =/ rest=(unit (list iapi-path)) $(shapes t.shapes, seen [name.u.one seen])
9031+ ?~ rest ~
9032+ `[u.one u.rest]
9033+::
9034+++ api-path-declaration
9035+ |= [sh=shape marks=(list term)]
9036+ ^- (unit (list iapi-path))
9037+ ?: ?=(%union -.sh) (api-path-many cases.sh marks ~)
9038+ (api-path-many ~[sh] marks ~)
9039+::
9040+:: Derived gates share the value namespace. /% marks name molds; /- and
9041+:: /= also introduce faces that cannot be shadowed by a derived value.
9042+++ api-import-faces
9043+ |= imports=(list import)
9044+ ^- (list term)
9045+ ?~ imports ~
9046+ ?- -.i.imports
9047+ %mark $(imports t.imports)
9048+ %sur [name.i.imports $(imports t.imports)]
9049+ %jibb [face.i.imports $(imports t.imports)]
9050+ ==
9051+::
9052+++ api-derived-names-valid
9053+ |= [paths=(list iapi-path) poke-names=(list term) mod=module prelude-values=(list term)]
9054+ ^- ?
9055+ =/ path-names=(list term) (turn paths |=(p=iapi-path name.p))
9056+ =/ derived=(list term) (weld path-names poke-names)
9057+ =/ outer=(list term) (weld prelude-values (weld (global-value-names defs.mod) (api-import-faces imports.mod)))
9058+ (levy derived |=(n=term &((unique-value-name n derived) !(lien outer |=(x=term =(n x))))))
9059+::
9060+:: Analysis only. Successful external entries must be unchanged results
9061+:: produced for the declared marks; no request interface is produced.
9062++$ iapi-mark-type [name=term typ=itype]
9063++$ iapi-path-typed [path=iapi-path full=itype diffs=(list iapi-mark-type)]
9064+++ api-diff-types
9065+ |= [names=(list term) externals=imark-externals declared=(list term)]
9066+ ^- (unit (list iapi-mark-type))
9067+ ?~ names `~
9068+ =/ typ=(unit itype) (find-imported-mark i.names externals declared)
9069+ ?~ typ ~
9070+ =/ tail=(unit (list iapi-mark-type)) $(names t.names)
9071+ ?~ tail ~
9072+ `[[i.names u.typ] u.tail]
9073+::
9074+++ api-path-types
9075+ |= [paths=(list iapi-path) externals=imark-externals declared=(list term)]
9076+ ^- (unit (list iapi-path-typed))
9077+ ?~ paths `~
9078+ =/ full=(unit itype) (find-imported-mark full.i.paths externals declared)
9079+ ?~ full ~
9080+ =/ diffs=(unit (list iapi-mark-type)) (api-diff-types diffs.i.paths externals declared)
9081+ ?~ diffs ~
9082+ =/ tail=(unit (list iapi-path-typed)) $(paths t.paths)
9083+ ?~ tail ~
9084+ `[[i.paths u.full u.diffs] u.tail]
9085+::
9086+++ api-poke-mark-names
9087+ |= [pokes=(list def) declared=(list term)]
9088+ ^- (unit (list term))
9089+ ?~ pokes `~
9090+ ?^ t.pokes ~
9091+ =/ d=def i.pokes
9092+ ?. ?=(%mold -.d) ~
9093+ =/ sh=shape shape.d
9094+ ?: ?=(%union -.sh) (api-path-diffs cases.sh declared ~)
9095+ =/ name=(unit term) (api-path-mark sh declared)
9096+ ?~ name ~
9097+ `~[u.name]
9098+::
9099+++ api-path-analysis
9100+ |= [mod=module externals=imark-externals prelude-values=(list term) prelude-molds=(list term)]
9101+ ^- (unit (list iapi-path-typed))
9102+ =/ ds=(list def) defs.mod
9103+ =/ declarations=(list def)
9104+ (skim ds |=(d=def &(?=(%mold -.d) =(%paths name.d))))
9105+ ?. ?=([* ~] declarations) ~
9106+ =/ pokes=(list def)
9107+ (skim ds |=(d=def &(?=(%mold -.d) =(%poke name.d))))
9108+ ?: (gth (lent pokes) 1) ~
9109+ =/ ordinary=(list def)
9110+ (skim ds |=(d=def !&(?=(%mold -.d) |(=(%paths name.d) =(%poke name.d)))))
9111+ ?. (module-scope-valid mod(defs ordinary) prelude-values prelude-molds) ~
9112+ =/ declared=(list term) (collect-mark-imports imports.mod)
9113+ =/ poke-names=(unit (list term)) (api-poke-mark-names pokes declared)
9114+ ?~ poke-names ~
9115+ =/ decl=def i.declarations
9116+ ?> ?=(%mold -.decl)
9117+ =/ paths=(unit (list iapi-path)) (api-path-declaration shape.decl declared)
9118+ ?~ paths ~
9119+ ?. (api-derived-names-valid u.paths u.poke-names mod prelude-values) ~
9120+ (api-path-types u.paths externals declared)
9121+::
9122+:: Source/graph entry for path analysis only. The returned paths retain
9123+:: reader-derived mark types and import resolution has checked reachable
9124+:: Jibb dependencies. This is not an API interface or a module check.
9125+++ api-path-analysis-source
9126+ |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle prepared=(unit iprelude)]
9127+ ^- (each (list iapi-path-typed) @t)
9128+ ?. ?=([%ui %api @ %jibb ~] file) [%| 'API path analysis requires /ui/api/<agent>.jibb']
9129+ ?~ prepared [%| 'API path analysis needs the prepared prelude']
9130+ =/ parsed (parse file src)
9131+ ?: ?=(%| -.parsed) [%| 'API path source does not parse']
9132+ =/ prelude=(unit ifile) `iface.u.prepared
9133+ =/ deps=jimports-result
9134+ (resolve-jibb-imports imports.p.parsed externals marks modules ~[file] values.u.prepared molds.u.prepared ~ prelude)
9135+ ?: ?=(%| -.deps) [%| p.deps]
9136+ =/ paths=(unit (list iapi-path-typed))
9137+ (api-path-analysis p.parsed marks values.u.prepared molds.u.prepared)
9138+ ?~ paths [%| 'API path declaration needs unsupported analysis']
9139+ [%& u.paths]
9140+::
9141+++ api-mark-exports
9142+ |= [marks=(list term) all=(list term) externals=imark-externals]
9143+ ^- imold-types
9144+ ?~ marks ~
9145+ =/ t=(unit itype) (find-imported-mark i.marks externals all)
9146+ ?~ t $(marks t.marks)
9147+ [[i.marks [u.t ~]] $(marks t.marks)]
9148+::
9149+:: Experimental direct poke-only API. Unsupported API declarations fail
9150+:: as a whole; supplied mark reader results retain their existing boundary.
9151+++ api-poke-interface
9152+ |= [at=path mod=module mark-externals=imark-externals prelude-values=(list term) prelude-molds=(list term) prelude=(unit ifile)]
9153+ ^- (unit ifile)
9154+ ?. ?=([%ui %api @ %jibb ~] at) ~
9155+ ?~ prelude ~
9156+ ?. =(at.u.prelude /lib/jibb/prelude/jibb) ~
9157+ =/ poke=(unit ischeme) (find-jibb-mold %poke u.prelude)
9158+ ?~ poke ~
9159+ ?. ?=(%union -.typ.u.poke) ~
9160+ ?^ vars.u.poke ~
9161+ =/ compatible=?
9162+ %+ lien cases.typ.u.poke
9163+ |= c=itype
9164+ ?=([%cell [%const [%term %tas %agent *]] [%cell [%face %agent [%atom %tas]] [%cell [%face %mark [%atom %tas]] [%face %payload [%noun ~]]]]] c)
9165+ ?. compatible ~
9166+ ?. (module-scope-valid mod(defs ~) prelude-values prelude-molds) ~
9167+ ?. (levy imports.mod |=(i=import ?=(%mark -.i))) ~
9168+ =/ marks=(list term) (collect-mark-imports imports.mod)
9169+ ?. ?=([@ ~] marks) ~
9170+ =/ ds=(list def) defs.mod
9171+ ?. ?=([[%mold *] ~] ds) ~
9172+ ?. =(%poke name.i.ds) ~
9173+ =/ sh=shape shape.i.ds
9174+ ?. ?=([%ref *] sh) ~
9175+ ?. ?=([@ ~] names.sh) ~
9176+ =/ n=term i.names.sh
9177+ ?. (unique-value-name n marks) ~
9178+ ?: |((lien prelude-values |=(x=term =(n x))) (lien prelude-molds |=(x=term =(n x)))) ~
9179+ =/ mark=(unit itype) (find-imported-mark n mark-externals marks)
9180+ ?~ mark ~
9181+ =/ sc=ischeme [[%fn u.mark typ.u.poke] ~]
9182+ `[~[[n sc]] (api-mark-exports marks marks mark-externals) at ~[[n i.t.t.at n]]]
59159183::
59169184++ infer-jibb-file
5917− |= [at=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle active=(list path) prelude-values=(list term) prelude-molds=(list term)]
9185+ |= [at=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle active=(list path) prelude-values=(list term) prelude-molds=(list term) cache=jcache prelude=(unit ifile)]
59189186 ^- jfile-result
5919− ?: ?=([%ui %api *] at) [%| (crip "API module needs unsupported inference: {(spud at)}")]
59209187 =/ parsed (parse at src)
59219188 ?: ?=(%| -.parsed) [%| (crip "module source does not parse: {(spud at)}")]
59229189 =/ mod=module p.parsed
5923− ?. (module-scope-valid mod prelude-values prelude-molds) [%| (crip "module has conflicting names: {(spud at)}")]
9190+ ?: ?=([%ui %api *] at)
9191+ =/ iface=(unit ifile) (api-poke-interface at mod mark-externals prelude-values prelude-molds prelude)
9192+ ?~ iface [%| (crip "API module needs unsupported inference: {(spud at)}")]
9193+ [%& [u.iface [[at u.iface] cache]]]
9194+ ?. (module-scope-valid mod prelude-values prelude-molds)
9195+ ?: (pending-declared-poke at mod prelude-values prelude-molds)
9196+ [%| (crip "module kind or scope needs unsupported inference: {(spud at)}")]
9197+ [%| (crip "module has conflicting names: {(spud at)}")]
59249198 =/ vals=(list term) (global-value-names defs.mod)
59259199 ?: (lien vals |=(n=term =(n %main)))
59269200 [%| (crip "module kind needs unsupported inference: {(spud at)}")]
5927− =/ js=jimports-result (resolve-jibb-imports imports.mod externals mark-externals modules active prelude-values prelude-molds)
9201+ =/ js=jimports-result (resolve-jibb-imports imports.mod externals mark-externals modules active prelude-values prelude-molds cache prelude)
59289202 ?: ?=(%| -.js) [%| p.js]
59299203 =/ molds=imolds (collect-simple-molds defs.mod)
59309204 =/ globals=(list term) (weld prelude-values (weld (import-binding-names imports.mod) vals))
59319205 =/ surs=(list term) (collect-sur-imports imports.mod)
59329206 =/ marks=(list term) (collect-mark-imports imports.mod)
5933− =/ reserved=(list term) (weld prelude-molds (turn p.js |=(j=[face=term interface=ifile] face.j)))
5934− =/ state=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks p.js reserved ~ |]
9207+ =/ reserved=(list term) (weld prelude-molds (turn resolved.p.js |=(j=[face=term interface=ifile] face.j)))
9208+ =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
9209+ =/ state=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks resolved.p.js reserved ~ ~ ~ | at top prelude]
59359210 =/ mts=(each imold-types @t) (module-mold-types molds state)
59369211 ?: ?=(%| -.mts) [%| (crip "{(trip p.mts)}: {(spud at)}")]
5937− =/ env=ienv (resolve-supported-defs defs.mod molds globals externals surs mark-externals marks p.js reserved)
9212+ =/ env=ienv (resolve-supported-defs defs.mod molds globals externals surs mark-externals marks resolved.p.js reserved at prelude)
59389213 ?. (module-values-complete defs.mod env)
59399214 [%| (crip "module definitions need unsupported inference: {(spud at)}")]
5940− [%& [env p.mts]]
9215+ [%& [[env p.mts at ~] [[at [env p.mts at ~]] cache.p.js]]]
59419216::
59429217:: +golden-types-with-modules fails closed for imports without prelude
59439218:: scope. +golden-types-with-prelude resolves supported library graphs;
@@ -5952,8 +9227,10 @@
59529227 'partial inference; module not checked\0aprelude source missing; module import inference unsupported'
59539228 (golden-types-with-marks file src externals mark-externals)
59549229::
5955−:: The caller supplies the actual prelude source. Its current names are
5956−:: reserved, but its incomplete inventory and types are not checked here.
9230+:: The caller supplies the actual prelude source. Its declared names are
9231+:: reserved, and supported inferred types are made available. The inventory
9232+:: and the checker are incomplete, so this never claims a checked module.
9233+:: Hosts may prepare the same trusted source once and reuse its interface.
59579234::
59589235++ golden-types-with-prelude
59599236 |= [file=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle prelude-source=@t]
@@ -5963,29 +9240,64 @@
59639240 ?: =(0 prelude-source) 'partial inference; module not checked\0aprelude source missing; module import inference unsupported'
59649241 =/ prelude (parse /lib/jibb/prelude/jibb prelude-source)
59659242 ?: ?=(%| -.prelude) 'partial inference; module not checked\0aprelude source does not parse; module import inference unsupported'
5966− =/ prelude-values=(list term) (global-value-names defs.p.prelude)
5967− =/ prelude-molds=(list term)
5968− (turn (collect-simple-molds defs.p.prelude) |=(m=[name=term body=shape] name.m))
9243+ =/ prepared=(unit iprelude) (prepare-prelude prelude-source)
9244+ ?~ prepared 'partial inference; module not checked\0aprelude interface is not supported'
9245+ (golden-types-with-prepared-prelude file src externals mark-externals modules prepared)
9246+::
9247+++ golden-types-with-prelude-and-internal
9248+ |= [file=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle prelude-source=@t internal-source=@t]
9249+ ^- @t
9250+ =/ prepared=(unit iprelude) (prepare-prelude-with-internal prelude-source internal-source)
9251+ (golden-types-with-prepared-prelude file src externals mark-externals modules prepared)
9252+::
9253+++ golden-types-with-prepared-prelude
9254+ |= [file=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle prepared=(unit iprelude)]
9255+ ^- @t
9256+ =/ parsed (parse file src)
9257+ ?: ?=(%| -.parsed) (show-error src p.parsed)
9258+ ?~ prepared 'partial inference; module not checked\0aprelude interface is not supported'
9259+ =/ prelude-values=(list term) values.u.prepared
9260+ =/ prelude-molds=(list term) molds.u.prepared
9261+ =/ iface=(unit ifile) `iface.u.prepared
59699262 ?. (module-scope-valid p.parsed prelude-values prelude-molds)
9263+ ?: (pending-declared-poke file p.parsed prelude-values prelude-molds)
9264+ 'partial inference; module not checked\0amodule kind or scope needs unsupported inference'
59709265 'partial inference; module not checked\0amodule has conflicting names'
59719266 =/ js=jimports-result
5972− (resolve-jibb-imports imports.p.parsed externals mark-externals modules ~[file] prelude-values prelude-molds)
9267+ (resolve-jibb-imports imports.p.parsed externals mark-externals modules ~[file] prelude-values prelude-molds ~ iface)
59739268 ?: ?=(%| -.js) (of-wain:format ~['partial inference; module not checked' p.js])
59749269 =/ scope-values=(list term)
59759270 (weld prelude-values (weld (collect-sur-imports imports.p.parsed) (collect-mark-imports imports.p.parsed)))
5976− (golden-types-in-context file src externals mark-externals p.js scope-values prelude-molds)
9271+ (golden-types-in-context file src externals mark-externals resolved.p.js scope-values prelude-molds iface)
59779272::
59789273:: +golden-types-with-marks: supply declared mark types separately from /sur
59799274:: entries, as [mark result] with the result from +read-mark:jibb-import.
59809275:: Unknown, duplicated, failed and undeclared entries never resolve a mold.
59819276::
9277+:: Callers pass unchanged structured reader results; graph validation
9278+:: remains in the existing bridge, and failures stay available lazily.
9279+++ reader-result-for-checker
9280+ |= result=*
9281+ ^- *
9282+ ?: ?=([%ok *] result) [%& +.result]
9283+ result
9284+::
9285+++ golden-types-with-reader-diagnostics
9286+ |= [file=path src=@t externals=iexternals mark-externals=imark-externals]
9287+ ^- @t
9288+ =/ ex=iexternals
9289+ (turn externals |=(e=[module=term name=term result=*] [module.e name.e (reader-result-for-checker result.e)]))
9290+ =/ mx=imark-externals
9291+ (turn mark-externals |=(e=[mark=term result=*] [mark.e (reader-result-for-checker result.e)]))
9292+ (golden-types-with-marks file src ex mx)
9293+::
59829294++ golden-types-with-marks
59839295 |= [file=path src=@t externals=iexternals mark-externals=imark-externals]
59849296 ^- @t
5985− (golden-types-in-context file src externals mark-externals ~ ~ ~)
9297+ (golden-types-in-context file src externals mark-externals ~ ~ ~ ~)
59869298::
59879299++ golden-types-in-context
5988− |= [file=path src=@t externals=iexternals mark-externals=imark-externals jimports=ijimports prelude-values=(list term) reserved-molds=(list term)]
9300+ |= [file=path src=@t externals=iexternals mark-externals=imark-externals jimports=ijimports prelude-values=(list term) reserved-molds=(list term) prelude=(unit ifile)]
59899301 ^- @t
59909302 =. reserved-molds (weld reserved-molds (turn jimports |=(j=[face=term interface=ifile] face.j)))
59919303 =/ parsed (parse file src)
@@ -5995,7 +9307,9 @@
59959307 =/ globals=(list term) (weld prelude-values (weld (turn jimports |=(j=[face=term interface=ifile] face.j)) (global-value-names ds)))
59969308 =/ surs=(list term) (collect-sur-imports imports.p.parsed)
59979309 =/ marks=(list term) (collect-mark-imports imports.p.parsed)
5998− =/ env=ienv (resolve-supported-defs ds molds globals externals surs mark-externals marks jimports reserved-molds)
9310+ =/ resolution=iresolved (resolve-groups ds molds globals externals surs mark-externals marks jimports reserved-molds file prelude)
9311+ =/ cycles=(list icycle) (definite-value-cycles ds globals)
9312+ =/ env=ienv env.resolution
59999313 =/ lines=(list @t) ~
60009314 |-
60019315 ?~ ds (of-wain:format ['partial inference; module not checked' (flop lines)])
@@ -6004,12 +9318,42 @@
60049318 $(ds t.ds, lines [(show-partial-mold file src d molds) lines])
60059319 ?. (unique-value-name name.d globals)
60069320 $(ds t.ds, lines [(crip "++ {(trip name.d)}: name already in scope") lines])
6007− =/ result=iresult (infer-fragment val.d env [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ |])
9321+ =/ cycle=(list icycle) (skim cycles |=(c=icycle =(name.c name.d)))
9322+ ?^ cycle
9323+ =/ diag=idiag ["non-gate value depends on itself through a cycle" ~[[first.i.cycle "value in cycle"] [next.i.cycle "dependency in cycle"]]]
9324+ $(ds t.ds, lines [(show-inference-diagnostic file src name.d diag) lines])
9325+ ?: (lien grouped.resolution |=(n=term =(n name.d)))
9326+ =/ found=(unit ischeme) (ienv-lookup name.d env)
9327+ ?~ found $(ds t.ds, lines [(crip "++ {(trip name.d)}: recursive group unavailable") lines])
9328+ =/ typ=itype (canonical-itype typ.u.found vars.u.found)
9329+ =/ line=@t (crip "++ {(trip name.d)}: {(show-itype typ ~)}{(show-atom-constraint typ)}")
9330+ $(ds t.ds, lines [line lines])
9331+ =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
9332+ =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | file top prelude]
9333+ =. initial (reserve-def-caps val.d initial)
9334+ =/ result=iresult
9335+ ?: |(?=(%gate -.val.d) ?=(%gate-wide -.val.d))
9336+ (infer-recursive-gate d env initial)
9337+ (infer-fragment val.d env initial)
60089338 ?: ?=(%| -.result)
60099339 $(ds t.ds, lines [(show-inference-diagnostic file src name.d p.result) lines])
9340+ =/ merged=(unit [first=icap second=icap])
9341+ (merged-capitals caps.state.p.result sub.state.p.result)
9342+ ?^ merged
9343+ =/ diag=idiag
9344+ ["distinct type variables `{(trip name.first.u.merged)}` and `{(trip name.second.u.merged)}` must not be forced equal; use the same capital for a shared type" ~[[at.first.u.merged "first type variable"] [at.second.u.merged "second type variable"]]]
9345+ $(ds t.ds, lines [(show-inference-diagnostic file src name.d diag) lines])
60109346 ?: (constrained-capitals caps.state.p.result sub.state.p.result)
60119347 $(ds t.ds, lines [(crip "++ {(trip name.d)}: explicit capital constraints are not supported by partial inference") lines])
60129348 =/ typ=itype (default-decimals (itype-normalize typ.p.result sub.state.p.result))
9349+ ?: (pending-null tags.state.p.result sub.state.p.result)
9350+ $(ds t.ds, lines [(crip "++ {(trip name.d)}: `~` needs context in partial inference") lines])
9351+ ?: |((pending-tags tags.state.p.result sub.state.p.result) (itype-has-tag typ))
9352+ $(ds t.ds, lines [(crip "++ {(trip name.d)}: tag needs context in partial inference") lines])
9353+ ?: (itype-has-hidden-recursive typ)
9354+ $(ds t.ds, lines [(crip "++ {(trip name.d)}: recursive mold name is not available in this scope") lines])
9355+ ?: (itype-has-hidden-generic typ)
9356+ $(ds t.ds, lines [(crip "++ {(trip name.d)}: generic union name is not available in this scope") lines])
60139357 ?: (unsupported-atom-vars typ caps.state.p.result binders.state.p.result sub.state.p.result)
60149358 $(ds t.ds, lines [(crip "++ {(trip name.d)}: unresolved aura-variable inference") lines])
60159359 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
jibb-dev/lib/jibb/internal.jibbnew file+6
@@ -0,0 +1,6 @@
1+:: Representation for agent and in-process store pokes.
2+:: The prelude re-exports this mold; effect lowering and the runtime must
3+:: agree on these cells when effect execution is implemented.
4++$ poke
5+ [%agent agent=@tas mark=@tas payload=*]
6+ [%store module=@t action=@tas payload=*]
jibb-dev/lib/jibb/prelude.jibb+101−20
@@ -1,4 +1,8 @@
1+/= internal /lib/jibb/internal
2++$ poke poke.internal
3+
14:: Initial prelude functions. The rest of the inventory is still to come.
5+
26++ same |= x=A x
37
48++ head |= p=[A B]
@@ -37,16 +41,18 @@
3741++ weld |= args=[(list A) (list A)]
3842 ?- args
3943 [xs ys]
40− ?- xs
41− ~ ys
42− [item rest] [item (weld rest ys)]
44+ ^- (list A)
45+ ?- xs
46+ ~ ys
47+ [item rest] [item (weld rest ys)]
4348
4449++ turn |= args=[(list A) $-(A B)]
4550 ?- args
4651 [xs f]
47− ?- xs
48− ~ ~
49− [item rest] [(f item) (turn rest f)]
52+ ^- (list B)
53+ ?- xs
54+ ~ ~
55+ [item rest] [(f item) (turn rest f)]
5056
5157+$ dime [p=@ta q=@]
5258
@@ -138,27 +144,28 @@
138144 (reverse-into xs ~)
139145
140146++ drop |= maybe=(unit A)
141− ?- maybe
142− ~ ~
143− [~ value] [value ~]
147+ ^- (list A)
148+ ?- maybe
149+ ~ ~
150+ [~ value] [value ~]
144151
145152++ bind |= args=[(unit A) $-(A B)]
146153 ?- args
147− [maybe f]
154+ [maybe f] ^- (unit B)
148155 ?- maybe
149156 ~ ~
150157 [~ value] `(f value)
151158
152159++ biff |= args=[(unit A) $-(A (unit B))]
153160 ?- args
154− [maybe f]
161+ [maybe f] ^- (unit B)
155162 ?- maybe
156163 ~ ~
157164 [~ value] (f value)
158165
159166++ both |= args=[(unit A) (unit B)]
160167 ?- args
161− [first second]
168+ [first second] ^- (unit [A B])
162169 ?- first
163170 ~ ~
164171 [~ a]
@@ -166,9 +173,19 @@
166173 ~ ~
167174 [~ b] `[a b]
168175
176+++ clap |= args=[(unit A) (unit A) $-([A A] A)]
177+ ?- args
178+ [first second combine] ^- (unit A)
179+ ?- first
180+ ~ second
181+ [~ a]
182+ ?- second
183+ ~ first
184+ [~ b] `(combine a b)
185+
169186++ clef |= args=[(unit A) (unit B) $-([A B] (unit C))]
170187 ?- args
171− [first second combine]
188+ [first second combine] ^- (unit C)
172189 ?- first
173190 ~ ~
174191 [~ a]
@@ -177,24 +194,44 @@
177194 [~ b] (combine a b)
178195
179196++ skim |= args=[(list A) $-(A ?)]
197+ ?- args
198+ [xs predicate] ^- (list A)
199+ ?- xs
200+ ~ ~
201+ [item rest]
202+ ?- (predicate item)
203+ %.y [item (skim rest predicate)]
204+ %.n (skim rest predicate)
205+
206+++ skip |= args=[(list A) $-(A ?)]
207+ ?- args
208+ [xs predicate] ^- (list A)
209+ ?- xs
210+ ~ ~
211+ [item rest]
212+ ?- (predicate item)
213+ %.y (skip rest predicate)
214+ %.n [item (skip rest predicate)]
215+
216+++ levy |= args=[(list A) $-(A ?)]
180217 ?- args
181218 [xs predicate]
182219 ?- xs
183− ~ ~
220+ ~ %.y
184221 [item rest]
185222 ?- (predicate item)
186− %.y [item (skim rest predicate)]
187− %.n (skim rest predicate)
223+ %.y (levy rest predicate)
224+ %.n %.n
188225
189−++ skip |= args=[(list A) $-(A ?)]
226+++ lien |= args=[(list A) $-(A ?)]
190227 ?- args
191228 [xs predicate]
192229 ?- xs
193− ~ ~
230+ ~ %.n
194231 [item rest]
195232 ?- (predicate item)
196− %.y (skip rest predicate)
197− %.n [item (skip rest predicate)]
233+ %.y %.y
234+ %.n (lien rest predicate)
198235
199236++ roll |= args=[(list A) B $-([A B] B)]
200237 ?- args
@@ -209,3 +246,47 @@
209246 ?- xs
210247 ~ start
211248 [item rest] (combine item (reel rest start combine))
249+
250+++ flit |= predicate=$-(A ?)
251+ |= value=A
252+ ^- (unit A)
253+ ?- (predicate value)
254+ %.y `value
255+ %.n ~
256+
257+++ murn |= args=[(list A) $-(A (unit B))]
258+ ?- args
259+ [xs f] ^- (list B)
260+ ?- xs
261+ ~ ~
262+ [item rest]
263+ ?- (f item)
264+ ~ (murn rest f)
265+ [~ value] [value (murn rest f)]
266+
267+++ join |= args=[A (list A)]
268+ ?- args
269+ [separator xs] ^- (list A)
270+ ?- xs
271+ ~ ~
272+ [item rest]
273+ ?- rest
274+ ~ [item ~]
275+ [next more] [item [separator (join separator rest)]]
276+
277+++ snip |= xs=(list A)
278+ ^- (list A)
279+ ?- xs
280+ ~ ~
281+ [item rest]
282+ ?- rest
283+ ~ ~
284+ [next more] [item (snip rest)]
285+
286+++ rear |= xs=(list A)
287+ ?- xs
288+ ~ !!
289+ [item rest]
290+ ?- rest
291+ ~ item
292+ [next more] (rear rest)
my-app/sur/import-fixture.hoon+1
@@ -3,4 +3,5 @@
33|%
44+$ sample [title=title:blog values=(list @ud)]
55+$ recursive chain:blog
6++$ nested [id=@ud value=$^(@ud [a=@ud b=@t])]
67--
tests/clay-fixtures/ford-nested-union-bridge-expected.txtnew file+1
@@ -0,0 +1 @@
1+'partial inference; module not checked\0a++ value: $-([id=@ud value=([a=@ud b=@t] @ud)] ([a=@ud b=@t] @ud))\0a++ values: $-([title=@t values=(list @ud)] (list @ud))\0a++ chain: $-(chain.blog chain.blog)'
tests/clay-fixtures/ford-nested-union-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+=/ src=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/sur/import-fixture/hoon)
5+=/ blog=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/sur/blog/hoon)
6+=/ reader=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/lib/jibb-import/hoon)
7+=/ jibb=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/lib/jibb/hoon)
8+=/ read-gate=vase (slap reader (ream 'read-named'))
9+=/ result=vase (slym read-gate [%import-fixture %nested -.src])
10+=/ sample-result=vase (slym read-gate [%import-fixture %sample -.src])
11+=/ chain-result=vase (slym read-gate [%blog %chain -.blog])
12+=/ check-gate=vase (slap jibb (ream 'golden-types-imports'))
13+=/ text=@t '/- import-fixture\0a/- blog\0a++ value |= x=nested.import-fixture value.x\0a++ values |= x=sample.import-fixture values.x\0a++ chain |= x=chain.blog x\0a'
14+(pure:m (slym check-gate [/ui/test/jibb text ~[[%import-fixture %nested +.result] [%import-fixture %sample +.sample-result] [%blog %chain +.chain-result]]]))
tests/clay-fixtures/ford-nested-union-expected.txtnew file+1
@@ -0,0 +1 @@
1+"[id=@ud value=(union [a=@ud b=@t] @ud)]"
tests/clay-fixtures/ford-nested-union.txtnew file+9
@@ -0,0 +1,9 @@
1+=/ m (strand ,vase)
2+;< =bowl:spider bind:m get-bowl
3+=/ now=@da now.bowl
4+=/ src=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/sur/import-fixture/hoon)
5+=/ reader=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/lib/jibb-import/hoon)
6+=/ read-gate=vase (slap reader (ream 'read-named'))
7+=/ got=vase (slym read-gate [%import-fixture %nested -.src])
8+=/ show-gate=vase (slap reader (ream 'show-result'))
9+(pure:m (slym show-gate +.got))
tests/clay-fixtures/mark-update-import-expected.txtnew file+1
@@ -0,0 +1 @@
1+"(union [added item=[id=@ud [done=(union @f:0 @f:1) text=@t]]] [toggled id=@ud])"
tests/clay-fixtures/mark-update-import.txtnew file+9
@@ -0,0 +1,9 @@
1+=/ m (strand ,vase)
2+;< =bowl:spider bind:m get-bowl
3+=/ now=@da now.bowl
4+=/ mark=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/mar/todo-update/hoon)
5+=/ reader=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/lib/jibb-import/hoon)
6+=/ read-gate=vase (slap reader (ream 'read-mark'))
7+=/ got=vase (slym read-gate [%todo-update -.mark])
8+=/ show-gate=vase (slap reader (ream 'show-result'))
9+(pure:m (slym show-gate +.got))
tests/clay-fixtures/record-bridge-expected.txtnew file+1
@@ -0,0 +1 @@
1+'partial inference; module not checked\0a++ title: $-([title=@t slug=@ta] @t)'
tests/clay-fixtures/record-bridge.txtnew file+11
@@ -0,0 +1,11 @@
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+=/ read-gate=vase (slap reader (ream 'read-named'))
8+=/ post-result=vase (slym read-gate [%blog %post -.blog])
9+=/ check-gate=vase (slap jibb (ream 'golden-types-imports'))
10+=/ src=@t '/- blog\0a++ title |= x=post.blog title.x\0a'
11+(pure:m (slym check-gate [/ui/test/jibb src ~[[%blog %post +.post-result]]]))
tests/golden/doc-grammar-04-step/about.txt+1
@@ -1,3 +1,4 @@
11source: Grammar tab, section "Patterns", code block 4 of the tab
22tests: a union `+$ step` with one case per deeper line: cells with tags at the head, in the middle and at the end, faced fields, and a bare term; a blank line between definitions; a `?-` whose arms are cell patterns mixing tags and binding names, and a bare term, with their expressions aligned by extra spaces; interpolated strings and a name as arm expressions
33expect: parses
4+expect-types: a partial inference report
tests/golden/doc-grammar-04-step/modules.txtnew file+1
@@ -0,0 +1 @@
1+# no module fixtures
tests/golden/doc-grammar-04-step/types.txtnew file+3
@@ -0,0 +1,3 @@
1+partial inference; module not checked
2++$ step: cases proven disjoint; mold not checked
3+++ describe: $-(step @t)
tests/golden/doc-grammar-06-cart-store/about.txt+1
@@ -1,3 +1,4 @@
11source: Grammar tab, section "Example: a store and an island", code block 6 of the tab (block 5 is the EBNF)
22tests: a store module: a record mold with a mold application and the loobean mold `?`; a union with its cases below; a mold that is a name; a blank line; `++ main (store init update)`; a cast with its mold and expression on one line, `^- state [~ %.n]`; a gate with a cell sample; `?-` arms whose expressions are changes, `s(items=[item items.s])` and `s(open=(not open.s))`
33expect: parses
4+expect-types: a partial inference report; store kind and declaration scope remain unresolved
tests/golden/doc-grammar-06-cart-store/modules.txtnew file+1
@@ -0,0 +1 @@
1+# no module fixtures
tests/golden/doc-grammar-06-cart-store/types.txtnew file+2
@@ -0,0 +1,2 @@
1+partial inference; module not checked
2+module kind or scope needs unsupported inference
tests/golden/module-cache-dag/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Imports: `/=` imports a Jibb module and import cycles are errors.
2+tests: A shared acyclic graph imports each library twice under distinct faces; the reachable identity still infers.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/module-cache-dag/module-trees.txtnew file+46
@@ -0,0 +1,46 @@
1+/ui/n0.jibb
2+(module
3+ (jibb 1:1 left /ui/n1)
4+ (jibb 2:1 right /ui/n1)
5+ (value 3:1 id
6+ (gate-wide 3:7 (bind 3:10 x) (wing 3:12 x))))
7+/ui/n1.jibb
8+(module
9+ (jibb 1:1 left /ui/n2)
10+ (jibb 2:1 right /ui/n2)
11+ (value 3:1 id
12+ (gate-wide 3:7 (bind 3:10 x) (wing 3:12 x))))
13+/ui/n2.jibb
14+(module
15+ (jibb 1:1 left /ui/n3)
16+ (jibb 2:1 right /ui/n3)
17+ (value 3:1 id
18+ (gate-wide 3:7 (bind 3:10 x) (wing 3:12 x))))
19+/ui/n3.jibb
20+(module
21+ (jibb 1:1 left /ui/n4)
22+ (jibb 2:1 right /ui/n4)
23+ (value 3:1 id
24+ (gate-wide 3:7 (bind 3:10 x) (wing 3:12 x))))
25+/ui/n4.jibb
26+(module
27+ (jibb 1:1 left /ui/n5)
28+ (jibb 2:1 right /ui/n5)
29+ (value 3:1 id
30+ (gate-wide 3:7 (bind 3:10 x) (wing 3:12 x))))
31+/ui/n5.jibb
32+(module
33+ (jibb 1:1 left /ui/n6)
34+ (jibb 2:1 right /ui/n6)
35+ (value 3:1 id
36+ (gate-wide 3:7 (bind 3:10 x) (wing 3:12 x))))
37+/ui/n6.jibb
38+(module
39+ (jibb 1:1 left /ui/n7)
40+ (jibb 2:1 right /ui/n7)
41+ (value 3:1 id
42+ (gate-wide 3:7 (bind 3:10 x) (wing 3:12 x))))
43+/ui/n7.jibb
44+(module
45+ (value 1:1 id
46+ (gate-wide 1:7 (bind 1:10 x) (wing 1:12 x))))
tests/golden/module-cache-dag/modules.txtnew file+8
@@ -0,0 +1,8 @@
1+/ui/n0.jibb
2+/ui/n1.jibb
3+/ui/n2.jibb
4+/ui/n3.jibb
5+/ui/n4.jibb
6+/ui/n5.jibb
7+/ui/n6.jibb
8+/ui/n7.jibb
tests/golden/module-cache-dag/modules/ui/n0.jibbnew file+3
@@ -0,0 +1,3 @@
1+/= left /ui/n1
2+/= right /ui/n1
3+++ id |=(x x)
tests/golden/module-cache-dag/modules/ui/n1.jibbnew file+3
@@ -0,0 +1,3 @@
1+/= left /ui/n2
2+/= right /ui/n2
3+++ id |=(x x)
tests/golden/module-cache-dag/modules/ui/n2.jibbnew file+3
@@ -0,0 +1,3 @@
1+/= left /ui/n3
2+/= right /ui/n3
3+++ id |=(x x)
tests/golden/module-cache-dag/modules/ui/n3.jibbnew file+3
@@ -0,0 +1,3 @@
1+/= left /ui/n4
2+/= right /ui/n4
3+++ id |=(x x)
tests/golden/module-cache-dag/modules/ui/n4.jibbnew file+3
@@ -0,0 +1,3 @@
1+/= left /ui/n5
2+/= right /ui/n5
3+++ id |=(x x)
tests/golden/module-cache-dag/modules/ui/n5.jibbnew file+3
@@ -0,0 +1,3 @@
1+/= left /ui/n6
2+/= right /ui/n6
3+++ id |=(x x)
tests/golden/module-cache-dag/modules/ui/n6.jibbnew file+3
@@ -0,0 +1,3 @@
1+/= left /ui/n7
2+/= right /ui/n7
3+++ id |=(x x)
tests/golden/module-cache-dag/modules/ui/n7.jibbnew file+1
@@ -0,0 +1 @@
1+++ id |=(x x)
tests/golden/module-cache-dag/source.jibbnew file+2
@@ -0,0 +1,2 @@
1+/= a /ui/n0
2+++ value (id.a "hi")
tests/golden/module-cache-dag/tokens.txtnew file+14
@@ -0,0 +1,14 @@
1+1:1 glyph /=
2+1:5 name a
3+1:7 glyph /
4+1:8 tight knot ui
5+1:10 tight glyph /
6+1:11 tight knot n0
7+2:1 NEWLINE
8+2:1 glyph ++
9+2:4 name value
10+2:10 glyph (
11+2:11 tight wing id.a
12+2:16 str "hi"
13+2:20 tight glyph )
14+2:21 NEWLINE
tests/golden/module-cache-dag/tree.txtnew file+5
@@ -0,0 +1,5 @@
1+(module
2+ (jibb 1:1 a /ui/n0)
3+ (value 2:1 value
4+ (group 2:10
5+ (call 2:11 (wing 2:11 id.a) (str 2:16 "hi")))))
tests/golden/module-cache-dag/types.txtnew file+2
@@ -0,0 +1,2 @@
1+partial inference; module not checked
2+++ value: @t
tests/golden/module-cache-faces/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Modules: "Everything is exported and read through the import's face"; Imports: "Import cycles are errors".
2+tests: The same library reached under two faces has independently instantiated identity schemes.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/module-cache-faces/module-trees.txtnew file+4
@@ -0,0 +1,4 @@
1+/ui/shared.jibb
2+(module
3+ (value 1:1 id
4+ (gate-wide 1:7 (bind 1:10 x) (wing 1:12 x))))
tests/golden/module-cache-faces/modules.txtnew file+1
@@ -0,0 +1 @@
1+/ui/shared.jibb
tests/golden/module-cache-faces/modules/ui/shared.jibbnew file+1
@@ -0,0 +1 @@
1+++ id |=(x x)
tests/golden/module-cache-faces/source.jibbnew file+4
@@ -0,0 +1,4 @@
1+/= first /ui/shared
2+/= second /ui/shared
3+++ ship (id.first ~zod)
4+++ text-value (id.second "hi")
tests/golden/module-cache-faces/tokens.txtnew file+28
@@ -0,0 +1,28 @@
1+1:1 glyph /=
2+1:5 name first
3+1:11 glyph /
4+1:12 tight knot ui
5+1:14 tight glyph /
6+1:15 tight knot shared
7+2:1 NEWLINE
8+2:1 glyph /=
9+2:5 name second
10+2:12 glyph /
11+2:13 tight knot ui
12+2:15 tight glyph /
13+2:16 tight knot shared
14+3:1 NEWLINE
15+3:1 glyph ++
16+3:4 name ship
17+3:9 glyph (
18+3:10 tight wing id.first
19+3:19 lit ~zod
20+3:23 tight glyph )
21+4:1 NEWLINE
22+4:1 glyph ++
23+4:4 name text-value
24+4:15 glyph (
25+4:16 tight wing id.second
26+4:26 str "hi"
27+4:30 tight glyph )
28+4:31 NEWLINE
tests/golden/module-cache-faces/tree.txtnew file+9
@@ -0,0 +1,9 @@
1+(module
2+ (jibb 1:1 first /ui/shared)
3+ (jibb 2:1 second /ui/shared)
4+ (value 3:1 ship
5+ (group 3:9
6+ (call 3:10 (wing 3:10 id.first) (lit 3:19 ~zod))))
7+ (value 4:1 text-value
8+ (group 4:15
9+ (call 4:16 (wing 4:16 id.second) (str 4:26 "hi")))))
tests/golden/module-cache-faces/types.txtnew file+3
@@ -0,0 +1,3 @@
1+partial inference; module not checked
2+++ ship: @p
3+++ text-value: @t
tests/golden/module-cache-incomplete/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Modules: "Everything is exported and read through the import's face"; Imports: "Import cycles are errors".
2+tests: A shared library with a recursive mold, which partial inference does not yet support, yields no interface even though one value could be inferred.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/module-cache-incomplete/module-trees.txtnew file+8
@@ -0,0 +1,8 @@
1+/ui/bad.jibb
2+(module
3+ (mold 1:1 recursive
4+ (cell 1:14
5+ (face 1:15 next (ref 1:20 recursive))
6+ (face 1:30 value (aura 1:36 @t))))
7+ (value 2:1 id
8+ (gate-wide 2:7 (bind 2:10 x) (wing 2:12 x))))
tests/golden/module-cache-incomplete/modules.txtnew file+1
@@ -0,0 +1 @@
1+/ui/bad.jibb
tests/golden/module-cache-incomplete/modules/ui/bad.jibbnew file+2
@@ -0,0 +1,2 @@
1++$ recursive [next=recursive value=@t]
2+++ id |=(x x)
tests/golden/module-cache-incomplete/source.jibbnew file+3
@@ -0,0 +1,3 @@
1+/= first /ui/bad
2+/= second /ui/bad
3+++ result (id.first "hi")
tests/golden/module-cache-incomplete/tokens.txtnew file+21
@@ -0,0 +1,21 @@
1+1:1 glyph /=
2+1:5 name first
3+1:11 glyph /
4+1:12 tight knot ui
5+1:14 tight glyph /
6+1:15 tight knot bad
7+2:1 NEWLINE
8+2:1 glyph /=
9+2:5 name second
10+2:12 glyph /
11+2:13 tight knot ui
12+2:15 tight glyph /
13+2:16 tight knot bad
14+3:1 NEWLINE
15+3:1 glyph ++
16+3:4 name result
17+3:11 glyph (
18+3:12 tight wing id.first
19+3:21 str "hi"
20+3:25 tight glyph )
21+3:26 NEWLINE
tests/golden/module-cache-incomplete/tree.txtnew file+6
@@ -0,0 +1,6 @@
1+(module
2+ (jibb 1:1 first /ui/bad)
3+ (jibb 2:1 second /ui/bad)
4+ (value 3:1 result
5+ (group 3:11
6+ (call 3:12 (wing 3:12 id.first) (str 3:21 "hi")))))
tests/golden/module-cache-incomplete/types.txtnew file+2
@@ -0,0 +1,2 @@
1+partial inference; module not checked
2+module mold needs unsupported inference: /ui/bad/jibb
tests/golden/module-cache-sibling-cycle/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Modules: "Everything is exported and read through the import's face"; Imports: "Import cycles are errors".
2+tests: A cycle reached after a previously checked sibling dependency is still reported.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/module-cache-sibling-cycle/module-trees.txtnew file+15
@@ -0,0 +1,15 @@
1+/ui/safe.jibb
2+(module
3+ (value 1:1 id
4+ (gate-wide 1:7 (bind 1:10 x) (wing 1:12 x))))
5+/ui/a.jibb
6+(module
7+ (jibb 1:1 shared /ui/safe)
8+ (jibb 2:1 next /ui/b)
9+ (value 3:1 id
10+ (gate-wide 3:7 (bind 3:10 x) (wing 3:12 x))))
11+/ui/b.jibb
12+(module
13+ (jibb 1:1 back /ui/a)
14+ (value 2:1 id
15+ (gate-wide 2:7 (bind 2:10 x) (wing 2:12 x))))
tests/golden/module-cache-sibling-cycle/modules.txtnew file+3
@@ -0,0 +1,3 @@
1+/ui/safe.jibb
2+/ui/a.jibb
3+/ui/b.jibb
tests/golden/module-cache-sibling-cycle/modules/ui/a.jibbnew file+3
@@ -0,0 +1,3 @@
1+/= shared /ui/safe
2+/= next /ui/b
3+++ id |=(x x)
tests/golden/module-cache-sibling-cycle/modules/ui/b.jibbnew file+2
@@ -0,0 +1,2 @@
1+/= back /ui/a
2+++ id |=(x x)
tests/golden/module-cache-sibling-cycle/modules/ui/safe.jibbnew file+1
@@ -0,0 +1 @@
1+++ id |=(x x)
tests/golden/module-cache-sibling-cycle/source.jibbnew file+3
@@ -0,0 +1,3 @@
1+/= first /ui/safe
2+/= second /ui/a
3+++ result 1
tests/golden/module-cache-sibling-cycle/tokens.txtnew file+18
@@ -0,0 +1,18 @@
1+1:1 glyph /=
2+1:5 name first
3+1:11 glyph /
4+1:12 tight knot ui
5+1:14 tight glyph /
6+1:15 tight knot safe
7+2:1 NEWLINE
8+2:1 glyph /=
9+2:5 name second
10+2:12 glyph /
11+2:13 tight knot ui
12+2:15 tight glyph /
13+2:16 tight knot a
14+3:1 NEWLINE
15+3:1 glyph ++
16+3:4 name result
17+3:11 lit 1
18+3:12 NEWLINE
tests/golden/module-cache-sibling-cycle/tree.txtnew file+4
@@ -0,0 +1,4 @@
1+(module
2+ (jibb 1:1 first /ui/safe)
3+ (jibb 2:1 second /ui/a)
4+ (value 3:1 result (lit 3:11 1)))
tests/golden/module-cache-sibling-cycle/types.txtnew file+2
@@ -0,0 +1,2 @@
1+partial inference; module not checked
2+import cycle at /ui/a/jibb
tests/golden/prelude-1c-structural/source.jibb+8−6
@@ -37,16 +37,18 @@
3737++ weld |= args=[(list A) (list A)]
3838 ?- args
3939 [xs ys]
40− ?- xs
41− ~ ys
42− [item rest] [item (weld rest ys)]
40+ ^- (list A)
41+ ?- xs
42+ ~ ys
43+ [item rest] [item (weld rest ys)]
4344
4445++ turn |= args=[(list A) $-(A B)]
4546 ?- args
4647 [xs f]
47− ?- xs
48− ~ ~
49− [item rest] [(f item) (turn rest f)]
48+ ^- (list B)
49+ ?- xs
50+ ~ ~
51+ [item rest] [(f item) (turn rest f)]
5052
5153+$ dime [p=@ta q=@]
5254
tests/golden/prelude-1c-structural/tokens.txt+454−440
@@ -190,528 +190,542 @@
19019039:9 name ys
19119139:11 tight glyph ]
19219240:7 INDENT
193−40:7 glyph ?-
194−40:10 name xs
193+40:7 glyph ^-
194+40:10 glyph (
195+40:11 tight name list
196+40:16 tvar A
197+40:17 tight glyph )
19519841: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 ]
199+41:9 glyph ?-
200+41:12 name xs
201+42:11 INDENT
202+42:11 lit ~
203+42:13 name ys
204+43:11 NEWLINE
205+43:11 glyph [
206+43:12 tight name item
207+43:17 name rest
208+43:21 tight glyph ]
209+43:23 glyph [
210+43:24 tight name item
211+43:29 glyph (
212+43:30 tight name weld
213+43:35 name rest
214+43:40 name ys
215+43:42 tight glyph )
216+43:43 tight glyph ]
217+45:1 DEDENT
218+45:1 DEDENT
219+45:1 DEDENT
220+45:1 DEDENT
221+45:1 DEDENT
222+45:1 NEWLINE
223+45:1 glyph ++
224+45:4 name turn
225+45:9 glyph |=
226+45:12 name args
227+45:16 tight glyph =
228+45:17 tight glyph [
229+45:18 tight glyph (
230+45:19 tight name list
231+45:24 tvar A
232+45:25 tight glyph )
233+45:27 glyph $-(
234+45:30 tight tvar A
235+45:32 tvar B
236+45:33 tight glyph )
237+45:34 tight glyph ]
238+46:3 INDENT
239+46:3 glyph ?-
240+46:6 name args
241+47:5 INDENT
242+47:5 glyph [
243+47:6 tight name xs
244+47:9 name f
245+47:10 tight glyph ]
246+48:7 INDENT
247+48:7 glyph ^-
248+48:10 glyph (
249+48:11 tight name list
250+48:16 tvar B
251+48:17 tight glyph )
252+49:9 INDENT
253+49:9 glyph ?-
254+49:12 name xs
255+50:11 INDENT
256+50:11 lit ~
257+50:13 lit ~
258+51:11 NEWLINE
259+51:11 glyph [
260+51:12 tight name item
261+51:17 name rest
262+51:21 tight glyph ]
263+51:23 glyph [
264+51:24 tight glyph (
265+51:25 tight name f
266+51:27 name item
267+51:31 tight glyph )
268+51:33 glyph (
269+51:34 tight name turn
270+51:39 name rest
271+51:44 name f
272+51:45 tight glyph )
273+51:46 tight glyph ]
274+53:1 DEDENT
275+53:1 DEDENT
276+53:1 DEDENT
277+53:1 DEDENT
278+53:1 DEDENT
27627953:1 NEWLINE
27728053:1 glyph +$
278−53:4 name hair
281+53:4 name dime
27928253:9 glyph [
28028353:10 tight name p
28128453:11 tight glyph =
282−53:12 tight aura @ud
285+53:12 tight aura @ta
28328653:16 name q
28428753:17 tight glyph =
285−53:18 tight aura @ud
286−53:21 tight glyph ]
288+53:18 tight aura @
289+53:19 tight glyph ]
28729055:1 NEWLINE
28829155:1 glyph +$
289−55:4 name pint
292+55:4 name hair
29029355:9 glyph [
29129455:10 tight name p
29229555: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 ]
296+55:12 tight aura @ud
297+55:16 name q
298+55:17 tight glyph =
299+55:18 tight aura @ud
300+55:21 tight glyph ]
31230157:1 NEWLINE
31330257: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
303+57:4 name pint
304+57:9 glyph [
305+57:10 tight name p
306+57:11 tight glyph =
307+57:12 tight glyph [
308+57:13 tight name p
309+57:14 tight glyph =
310+57:15 tight aura @
311+57:17 name q
312+57:18 tight glyph =
313+57:19 tight aura @
314+57:20 tight glyph ]
315+57:22 name q
316+57:23 tight glyph =
317+57:24 tight glyph [
318+57:25 tight name p
319+57:26 tight glyph =
320+57:27 tight aura @
321+57:29 name q
322+57:30 tight glyph =
323+57:31 tight aura @
324+57:32 tight glyph ]
325+57:33 tight glyph ]
326+59:1 NEWLINE
327+59:1 glyph +$
328+59:4 name coin
329+60:3 INDENT
33033060: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 ]
331+60:4 tight lit %$
332+60:7 name p
333+60:8 tight glyph =
334+60:9 tight name dime
335+60:13 tight glyph ]
336+61:3 NEWLINE
337+61:3 glyph [
338+61:4 tight lit %blob
339+61:10 name p
340+61:11 tight glyph =
341+61:12 tight glyph *
342+61:13 tight glyph ]
343+62:3 NEWLINE
344+62:3 glyph [
345+62:4 tight lit %many
346+62:10 name p
347+62:11 tight glyph =
348+62:12 tight glyph (
349+62:13 tight name list
350+62:18 name coin
351+62:22 tight glyph )
352+62:23 tight glyph ]
353+64:1 DEDENT
35635464:1 NEWLINE
35735564:1 glyph +$
358−64:4 name trel
356+64:4 name pair
35935764:9 glyph |$
36035864:12 glyph [
36135964:13 tight tvar A
36236064: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 ]
361+64:16 tight glyph ]
362+64:18 glyph [
363+64:19 tight name p
364+64:20 tight glyph =
365+64:21 tight tvar A
366+64:23 name q
367+64:24 tight glyph =
368+64:25 tight tvar B
369+64:26 tight glyph ]
37637066:1 NEWLINE
37737166:1 glyph +$
378−66:4 name qual
372+66:4 name trel
37937366:9 glyph |$
38037466:12 glyph [
38137566:13 tight tvar A
38237666:15 tvar B
38337766: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 ]
378+66:18 tight glyph ]
379+66:20 glyph [
380+66:21 tight name p
381+66:22 tight glyph =
382+66:23 tight tvar A
383+66:25 name q
384+66:26 tight glyph =
385+66:27 tight tvar B
386+66:29 name r
387+66:30 tight glyph =
388+66:31 tight tvar C
389+66:32 tight glyph ]
40039068:1 NEWLINE
40139168:1 glyph +$
402−68:4 name cord
403−68:9 aura @t
392+68:4 name qual
393+68:9 glyph |$
394+68:12 glyph [
395+68:13 tight tvar A
396+68:15 tvar B
397+68:17 tvar C
398+68:19 tvar D
399+68:20 tight glyph ]
400+68:22 glyph [
401+68:23 tight name p
402+68:24 tight glyph =
403+68:25 tight tvar A
404+68:27 name q
405+68:28 tight glyph =
406+68:29 tight tvar B
407+68:31 name r
408+68:32 tight glyph =
409+68:33 tight tvar C
410+68:35 name s
411+68:36 tight glyph =
412+68:37 tight tvar D
413+68:38 tight glyph ]
40441470:1 NEWLINE
40541570:1 glyph +$
406−70:4 name knot
407−70:9 aura @ta
416+70:4 name cord
417+70:9 aura @t
40841872:1 NEWLINE
40941972: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 )
420+72:4 name knot
421+72:9 aura @ta
41542274:1 NEWLINE
41642374:1 glyph +$
417−74:4 name path
424+74:4 name tape
41842574:9 glyph (
41942674:10 tight name list
420−74:15 name knot
421−74:19 tight glyph )
427+74:15 aura @tD
428+74:18 tight glyph )
42242976:1 NEWLINE
42343076: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 ]
431+76:4 name path
432+76:9 glyph (
433+76:10 tight name list
434+76:15 name knot
435+76:19 tight glyph )
436+78:1 NEWLINE
437+78:1 glyph +$
438+78:4 name tank
439+79:3 INDENT
440+79:3 name cord
45344180:3 NEWLINE
45444280:3 glyph [
455−80:4 tight lit %rose
443+80:4 tight lit %leaf
45644480:10 name p
45744580: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
446+80:12 tight name tape
447+80:16 tight glyph ]
448+81:3 NEWLINE
449+81:3 glyph [
450+81:4 tight lit %palm
451+81:10 name p
452+81:11 tight glyph =
453+81:12 tight glyph (
454+81:13 tight name qual
455+81:18 name tape
456+81:23 name tape
457+81:28 name tape
458+81:33 name tape
459+81:37 tight glyph )
460+81:39 name q
461+81:40 tight glyph =
462+81:41 tight glyph (
463+81:42 tight name list
464+81:47 name tank
465+81:51 tight glyph )
466+81:52 tight glyph ]
467+82:3 NEWLINE
468+82:3 glyph [
469+82:4 tight lit %rose
470+82:10 name p
47747182: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 ]
472+82:12 tight glyph (
473+82:13 tight name trel
474+82:18 name tape
475+82:23 name tape
476+82:28 name tape
477+82:32 tight glyph )
478+82:34 name q
479+82:35 tight glyph =
480+82:36 tight glyph (
481+82:37 tight name list
482+82:42 name tank
483+82:46 tight glyph )
484+82:47 tight glyph ]
485+84:1 DEDENT
48348684:1 NEWLINE
48448784:1 glyph +$
485−84:4 name edge
488+84:4 name nail
48648984:9 glyph [
48749084:10 tight name p
48849184:11 tight glyph =
48949284:12 tight name hair
49049384:17 name q
49149484: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 ]
495+84:19 tight name tape
496+84:23 tight glyph ]
50449786:1 NEWLINE
50549886: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 )
499+86:4 name edge
500+86:9 glyph [
501+86:10 tight name p
502+86:11 tight glyph =
503+86:12 tight name hair
504+86:17 name q
505+86:18 tight glyph =
506+86:19 tight glyph (
507+86:20 tight name unit
508+86:25 glyph [
509+86:26 tight name p
510+86:27 tight glyph =
511+86:28 tight glyph *
512+86:30 name q
513+86:31 tight glyph =
514+86:32 tight name nail
515+86:36 tight glyph ]
516+86:37 tight glyph )
517+86:38 tight glyph ]
51151888:1 NEWLINE
51251988: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 ]
520+88:4 name rule
521+88:9 glyph $-(
522+88:12 tight name nail
523+88:17 name edge
524+88:21 tight glyph )
52252590:1 NEWLINE
52352690: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
527+90:4 name spot
528+90:9 glyph [
529+90:10 tight name p
530+90:11 tight glyph =
531+90:12 tight name path
532+90:17 name q
533+90:18 tight glyph =
534+90:19 tight name pint
535+90:23 tight glyph ]
536+92:1 NEWLINE
537+92:1 glyph +$
538+92:4 name toon
539+93:3 INDENT
54054093:3 glyph [
541−93:4 tight lit %2
541+93:4 tight lit %0
54254293:7 name p
54354393: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 ]
544+93:9 tight glyph *
545+93:10 tight glyph ]
546+94:3 NEWLINE
547+94:3 glyph [
548+94:4 tight lit %1
549+94:7 name p
550+94:8 tight glyph =
551+94:9 tight glyph *
552+94:10 tight glyph ]
553+95:3 NEWLINE
554+95:3 glyph [
555+95:4 tight lit %2
556+95:7 name p
557+95:8 tight glyph =
558+95:9 tight glyph (
559+95:10 tight name list
560+95:15 name tank
561+95:19 tight glyph )
562+95:20 tight glyph ]
563+97:1 DEDENT
57556497: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 ]
565+97:1 glyph +$
566+97:4 name like
567+97:9 glyph |$
568+97:12 glyph [
569+97:13 tight tvar A
570+97:14 tight glyph ]
571+97:16 glyph [
572+97:17 tight name p
573+97:18 tight glyph =
574+97:19 tight name hair
575+97:24 name q
576+97:25 tight glyph =
577+97:26 tight glyph (
578+97:27 tight name unit
579+97:32 glyph [
580+97:33 tight name p
581+97:34 tight glyph =
582+97:35 tight tvar A
583+97:37 name q
584+97:38 tight glyph =
585+97:39 tight name nail
586+97:43 tight glyph ]
587+97:44 tight glyph )
588+97:45 tight glyph ]
589+99:1 NEWLINE
590+99:1 glyph ++
591+99:4 name wonk
592+99:9 glyph |=
593+99:12 name veq
594+99:15 tight glyph =
595+99:16 tight glyph (
596+99:17 tight name like
597+99:22 tvar A
598+99:23 tight glyph )
599+100:3 INDENT
600+100:3 glyph ?-
601+100:6 wing q.veq
602+101:5 INDENT
603+101:5 lit ~
604+101:7 glyph !!
605+102:5 NEWLINE
606+102:5 glyph [
607+102:6 tight lit ~
608+102:8 name product
609+102:15 tight glyph ]
610+102:17 wing p.product
611+104:1 DEDENT
612+104:1 DEDENT
611613104:1 NEWLINE
612614104:1 glyph +$
613−104:4 name lest
615+104:4 name lone
614616104:9 glyph |$
615617104:12 glyph [
616618104:13 tight tvar A
617619104:14 tight glyph ]
618620104:16 glyph [
619−104:17 tight name i
621+104:17 tight name p
620622104:18 tight glyph =
621623104: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 ]
624+104:20 tight glyph ]
629625106:1 NEWLINE
630626106:1 glyph +$
631−106:4 name pole
627+106:4 name lest
632628106:9 glyph |$
633629106:12 glyph [
634630106:13 tight tvar A
635631106: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 )
632+106:16 glyph [
633+106:17 tight name i
634+106:18 tight glyph =
635+106:19 tight tvar A
636+106:21 name t
637+106:22 tight glyph =
638+106:23 tight glyph (
639+106:24 tight name list
640+106:29 tvar A
641+106:30 tight glyph )
642+106:31 tight glyph ]
643+108:1 NEWLINE
644+108:1 glyph +$
645+108:4 name pole
646+108:9 glyph |$
647+108:12 glyph [
648+108:13 tight tvar A
645649108: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 ]
650+109:3 INDENT
651+109:3 lit ~
652+110:3 NEWLINE
653+110:3 glyph [
654+110:4 tight tvar A
655+110:6 glyph (
656+110:7 tight name pole
657+110:12 tvar A
658+110:13 tight glyph )
659+110:14 tight glyph ]
660+112:1 DEDENT
662661112:1 NEWLINE
663662112:1 glyph +$
664−112:4 name tree
663+112:4 name quip
665664112:9 glyph |$
666665112:12 glyph [
667666112: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
667+112:15 tvar B
668+112:16 tight glyph ]
669+112:18 glyph [
670+112:19 tight glyph (
671+112:20 tight name list
672+112:25 tvar A
673+112:26 tight glyph )
674+112:28 tvar B
675+112:29 tight glyph ]
676+114:1 NEWLINE
677+114:1 glyph +$
678+114:4 name tree
679+114:9 glyph |$
680+114:12 glyph [
681+114:13 tight tvar A
682+114:14 tight glyph ]
683+115:3 INDENT
684+115:3 lit ~
685+116:3 NEWLINE
686+116:3 glyph [
687+116:4 tight name n
688+116:5 tight glyph =
689+116:6 tight tvar A
690+116:8 name l
691+116:9 tight glyph =
692+116:10 tight glyph (
693+116:11 tight name tree
694+116:16 tvar A
695+116:17 tight glyph )
696+116:19 name r
697+116:20 tight glyph =
698+116:21 tight glyph (
699+116:22 tight name tree
700+116:27 tvar A
701+116:28 tight glyph )
702+116:29 tight glyph ]
703+118:1 DEDENT
704+118:1 NEWLINE
705+118:1 glyph +$
706+118:4 name each
707+118:9 glyph |$
708+118:12 glyph [
709+118:13 tight tvar A
710+118:15 tvar B
711+118:16 tight glyph ]
712+119:3 INDENT
713+119:3 glyph [
714+119:4 tight lit %|
715+119:7 name p
716+119:8 tight glyph =
717+119:9 tight tvar B
718+119:10 tight glyph ]
719+120:3 NEWLINE
720+120:3 glyph [
721+120:4 tight lit %&
722+120:7 name p
723+120:8 tight glyph =
724+120:9 tight tvar A
725+120:10 tight glyph ]
726+122:1 DEDENT
727+122:1 NEWLINE
728+122:1 glyph +$
729+122:4 name bloq
730+122:9 aura @
731+122:10 NEWLINE
tests/golden/prelude-1c-structural/tree.txt+191−185
@@ -87,198 +87,204 @@
8787 (arm 39:5
8888 (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
8989 (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
90+ (cast 40:7
91+ (apply 40:10 list (tvar 40:16 A))
92+ (body 41:9
93+ (branch 41:9
94+ (wing 41:12 xs)
95+ (arm 42:11 (lit 42:11 ~) (wing 42:13 ys))
96+ (arm 43:11
97+ (cell 43:11 (bind 43:12 item) (bind 43:17 rest))
98+ (tuple 43:23
99+ (wing 43:24 item)
100+ (group 43:29
101+ (call 43:30 (wing 43:30 weld) (wing 43:35 rest) (wing 43:40 ys))))))))))))))
102+ (value 45:1 turn
103+ (gate 45:9
104+ (face 45:12 args
105+ (cell 45:17
106+ (apply 45:18 list (tvar 45:24 A))
107+ (fn 45:27 (tvar 45:30 A) (tvar 45:32 B))))
108+ (body 46:3
109+ (branch 46:3
110+ (wing 46:6 args)
111+ (arm 47:5
112+ (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
113+ (body 48:7
114+ (cast 48:7
115+ (apply 48:10 list (tvar 48:16 B))
116+ (body 49:9
117+ (branch 49:9
118+ (wing 49:12 xs)
119+ (arm 50:11 (lit 50:11 ~) (lit 50:13 ~))
120+ (arm 51:11
121+ (cell 51:11 (bind 51:12 item) (bind 51:17 rest))
122+ (tuple 51:23
123+ (group 51:24
124+ (call 51:25 (wing 51:25 f) (wing 51:27 item)))
125+ (group 51:33
126+ (call 51:34 (wing 51:34 turn) (wing 51:39 rest) (wing 51:44 f))))))))))))))
127+ (mold 53:1 dime
126128 (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
129+ (face 53:10 p (aura 53:12 @ta))
130+ (face 53:16 q (aura 53:18 @))))
131+ (mold 55:1 hair
130132 (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)))
133+ (face 55:10 p (aura 55:12 @ud))
134+ (face 55:16 q (aura 55:18 @ud))))
135+ (mold 57:1 pint
136+ (cell 57:9
137+ (face 57:10 p
138+ (cell 57:12
139+ (face 57:13 p (aura 57:15 @))
140+ (face 57:17 q (aura 57:19 @))))
141+ (face 57:22 q
142+ (cell 57:24
143+ (face 57:25 p (aura 57:27 @))
144+ (face 57:29 q (aura 57:31 @))))))
145+ (mold 59:1 coin
146+ (union 60:3
147147 (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))))
148+ (const 60:4 %$)
149+ (face 60:7 p (ref 60:9 dime)))
150+ (cell 61:3
151+ (const 61:4 %blob)
152+ (face 61:10 p (noun 61:12)))
153+ (cell 62:3
154+ (const 62:4 %many)
155+ (face 62:10 p
156+ (apply 62:12 list (ref 62:18 coin))))))
157+ (mold 64:1 pair
158+ (generic 64:9 A B
159+ (cell 64:18
160+ (face 64:19 p (tvar 64:21 A))
161+ (face 64:23 q (tvar 64:25 B)))))
162+ (mold 66:1 trel
163+ (generic 66:9 A B C
164+ (cell 66:20
165+ (face 66:21 p (tvar 66:23 A))
166+ (face 66:25 q (tvar 66:27 B))
167+ (face 66:29 r (tvar 66:31 C)))))
168+ (mold 68:1 qual
169+ (generic 68:9 A B C D
170+ (cell 68:22
171+ (face 68:23 p (tvar 68:25 A))
172+ (face 68:27 q (tvar 68:29 B))
173+ (face 68:31 r (tvar 68:33 C))
174+ (face 68:35 s (tvar 68:37 D)))))
175+ (mold 70:1 cord (aura 70:9 @t))
176+ (mold 72:1 knot (aura 72:9 @ta))
177+ (mold 74:1 tape
178+ (apply 74:9 list (aura 74:15 @tD)))
179+ (mold 76:1 path
180+ (apply 76:9 list (ref 76:15 knot)))
181+ (mold 78:1 tank
182+ (union 79:3
183+ (ref 79:3 cord)
187184 (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
185+ (const 80:4 %leaf)
186+ (face 80:10 p (ref 80:12 tape)))
187+ (cell 81:3
188+ (const 81:4 %palm)
189+ (face 81:10 p
190+ (apply 81:12 qual (ref 81:18 tape) (ref 81:23 tape) (ref 81:28 tape) (ref 81:33 tape)))
191+ (face 81:39 q
192+ (apply 81:41 list (ref 81:47 tank))))
193+ (cell 82:3
194+ (const 82:4 %rose)
195+ (face 82:10 p
196+ (apply 82:12 trel (ref 82:18 tape) (ref 82:23 tape) (ref 82:28 tape)))
197+ (face 82:34 q
198+ (apply 82:36 list (ref 82:42 tank))))))
199+ (mold 84:1 nail
198200 (cell 84:9
199201 (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)))
202+ (face 84:17 q (ref 84:19 tape))))
203+ (mold 86:1 edge
204+ (cell 86:9
205+ (face 86:10 p (ref 86:12 hair))
206+ (face 86:17 q
207+ (apply 86:19 unit
208+ (cell 86:25
209+ (face 86:26 p (noun 86:28))
210+ (face 86:30 q (ref 86:32 nail)))))))
211+ (mold 88:1 rule
212+ (fn 88:9 (ref 88:12 nail) (ref 88:17 edge)))
213+ (mold 90:1 spot
214+ (cell 90:9
215+ (face 90:10 p (ref 90:12 path))
216+ (face 90:17 q (ref 90:19 pint))))
217+ (mold 92:1 toon
218+ (union 93:3
219219 (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
220+ (const 93:4 %0)
221+ (face 93:7 p (noun 93:9)))
222+ (cell 94:3
223+ (const 94:4 %1)
224+ (face 94:7 p (noun 94:9)))
225+ (cell 95:3
226+ (const 95:4 %2)
227+ (face 95:7 p
228+ (apply 95:9 list (ref 95:15 tank))))))
229+ (mold 97:1 like
230+ (generic 97:9 A
231+ (cell 97:16
232+ (face 97:17 p (ref 97:19 hair))
233+ (face 97:24 q
234+ (apply 97:26 unit
235+ (cell 97:32
236+ (face 97:33 p (tvar 97:35 A))
237+ (face 97:37 q (ref 97:39 nail))))))))
238+ (value 99:1 wonk
239+ (gate 99:9
240+ (face 99:12 veq
241+ (apply 99:16 like (tvar 99:22 A)))
242+ (body 100:3
243+ (branch 100:3
244+ (wing 100:6 q.veq)
245+ (arm 101:5 (lit 101:5 ~) (crash 101:7))
246+ (arm 102:5
247+ (cell 102:5 (lit 102:6 ~) (bind 102:8 product))
248+ (wing 102:17 p.product))))))
249+ (mold 104:1 lone
248250 (generic 104:9 A
249251 (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
252+ (face 104:17 p (tvar 104:19 A)))))
253+ (mold 106:1 lest
254254 (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 @)))
255+ (cell 106:16
256+ (face 106:17 i (tvar 106:19 A))
257+ (face 106:21 t
258+ (apply 106:23 list (tvar 106:29 A))))))
259+ (mold 108:1 pole
260+ (generic 108:9 A
261+ (union 109:3
262+ (const 109:3 ~)
263+ (cell 110:3
264+ (tvar 110:4 A)
265+ (apply 110:6 pole (tvar 110:12 A))))))
266+ (mold 112:1 quip
267+ (generic 112:9 A B
268+ (cell 112:18
269+ (apply 112:19 list (tvar 112:25 A))
270+ (tvar 112:28 B))))
271+ (mold 114:1 tree
272+ (generic 114:9 A
273+ (union 115:3
274+ (const 115:3 ~)
275+ (cell 116:3
276+ (face 116:4 n (tvar 116:6 A))
277+ (face 116:8 l
278+ (apply 116:10 tree (tvar 116:16 A)))
279+ (face 116:19 r
280+ (apply 116:21 tree (tvar 116:27 A)))))))
281+ (mold 118:1 each
282+ (generic 118:9 A B
283+ (union 119:3
284+ (cell 119:3
285+ (const 119:4 %|)
286+ (face 119:7 p (tvar 119:9 B)))
287+ (cell 120:3
288+ (const 120:4 %&)
289+ (face 120:7 p (tvar 120:9 A))))))
290+ (mold 122:1 bloq (aura 122:9 @)))
tests/golden/prelude-1c-structural/types.txt+2−2
@@ -5,8 +5,8 @@ partial inference; module not checked
55++ not: $-(? ?)
66+$ list: cases proven disjoint; mold not checked
77+$ 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
8+++ fall: $-([(unit A) A] A)
9+++ need: $-((unit A) A)
1010++ weld: sample mold is not supported by partial inference
1111++ turn: sample mold is not supported by partial inference
1212+$ dime: not checked
tests/golden/prelude-3g-basic/source.jibb+8−6
@@ -37,16 +37,18 @@
3737++ weld |= args=[(list A) (list A)]
3838 ?- args
3939 [xs ys]
40− ?- xs
41− ~ ys
42− [item rest] [item (weld rest ys)]
40+ ^- (list A)
41+ ?- xs
42+ ~ ys
43+ [item rest] [item (weld rest ys)]
4344
4445++ turn |= args=[(list A) $-(A B)]
4546 ?- args
4647 [xs f]
47− ?- xs
48− ~ ~
49− [item rest] [(f item) (turn rest f)]
48+ ^- (list B)
49+ ?- xs
50+ ~ ~
51+ [item rest] [(f item) (turn rest f)]
5052
5153+$ dime [p=@ta q=@]
5254
tests/golden/prelude-3g-basic/tokens.txt+146−132
@@ -190,151 +190,165 @@
19019039:9 name ys
19119139:11 tight glyph ]
19219240:7 INDENT
193−40:7 glyph ?-
194−40:10 name xs
193+40:7 glyph ^-
194+40:10 glyph (
195+40:11 tight name list
196+40:16 tvar A
197+40:17 tight glyph )
19519841: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 ]
199+41:9 glyph ?-
200+41:12 name xs
201+42:11 INDENT
202+42:11 lit ~
203+42:13 name ys
204+43:11 NEWLINE
205+43:11 glyph [
206+43:12 tight name item
207+43:17 name rest
208+43:21 tight glyph ]
209+43:23 glyph [
210+43:24 tight name item
211+43:29 glyph (
212+43:30 tight name weld
213+43:35 name rest
214+43:40 name ys
215+43:42 tight glyph )
216+43:43 tight glyph ]
217+45:1 DEDENT
218+45:1 DEDENT
219+45:1 DEDENT
220+45:1 DEDENT
221+45:1 DEDENT
222+45:1 NEWLINE
223+45:1 glyph ++
224+45:4 name turn
225+45:9 glyph |=
226+45:12 name args
227+45:16 tight glyph =
228+45:17 tight glyph [
229+45:18 tight glyph (
230+45:19 tight name list
231+45:24 tvar A
232+45:25 tight glyph )
233+45:27 glyph $-(
234+45:30 tight tvar A
235+45:32 tvar B
236+45:33 tight glyph )
237+45:34 tight glyph ]
238+46:3 INDENT
239+46:3 glyph ?-
240+46:6 name args
241+47:5 INDENT
242+47:5 glyph [
243+47:6 tight name xs
244+47:9 name f
245+47:10 tight glyph ]
246+48:7 INDENT
247+48:7 glyph ^-
248+48:10 glyph (
249+48:11 tight name list
250+48:16 tvar B
251+48:17 tight glyph )
252+49:9 INDENT
253+49:9 glyph ?-
254+49:12 name xs
255+50:11 INDENT
256+50:11 lit ~
257+50:13 lit ~
258+51:11 NEWLINE
259+51:11 glyph [
260+51:12 tight name item
261+51:17 name rest
262+51:21 tight glyph ]
263+51:23 glyph [
264+51:24 tight glyph (
265+51:25 tight name f
266+51:27 name item
267+51:31 tight glyph )
268+51:33 glyph (
269+51:34 tight name turn
270+51:39 name rest
271+51:44 name f
272+51:45 tight glyph )
273+51:46 tight glyph ]
274+53:1 DEDENT
275+53:1 DEDENT
276+53:1 DEDENT
277+53:1 DEDENT
278+53:1 DEDENT
27627953:1 NEWLINE
27728053:1 glyph +$
278−53:4 name hair
281+53:4 name dime
27928253:9 glyph [
28028353:10 tight name p
28128453:11 tight glyph =
282−53:12 tight aura @ud
285+53:12 tight aura @ta
28328653:16 name q
28428753:17 tight glyph =
285−53:18 tight aura @ud
286−53:21 tight glyph ]
288+53:18 tight aura @
289+53:19 tight glyph ]
28729055:1 NEWLINE
28829155:1 glyph +$
289−55:4 name pint
292+55:4 name hair
29029355:9 glyph [
29129455:10 tight name p
29229555: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 ]
296+55:12 tight aura @ud
297+55:16 name q
298+55:17 tight glyph =
299+55:18 tight aura @ud
300+55:21 tight glyph ]
31230157:1 NEWLINE
31330257: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
303+57:4 name pint
304+57:9 glyph [
305+57:10 tight name p
306+57:11 tight glyph =
307+57:12 tight glyph [
308+57:13 tight name p
309+57:14 tight glyph =
310+57:15 tight aura @
311+57:17 name q
312+57:18 tight glyph =
313+57:19 tight aura @
314+57:20 tight glyph ]
315+57:22 name q
316+57:23 tight glyph =
317+57:24 tight glyph [
318+57:25 tight name p
319+57:26 tight glyph =
320+57:27 tight aura @
321+57:29 name q
322+57:30 tight glyph =
323+57:31 tight aura @
324+57:32 tight glyph ]
325+57:33 tight glyph ]
326+59:1 NEWLINE
327+59:1 glyph +$
328+59:4 name coin
329+60:3 INDENT
33033060: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−60:24 DEDENT
340−60:24 NEWLINE
331+60:4 tight lit %$
332+60:7 name p
333+60:8 tight glyph =
334+60:9 tight name dime
335+60:13 tight glyph ]
336+61:3 NEWLINE
337+61:3 glyph [
338+61:4 tight lit %blob
339+61:10 name p
340+61:11 tight glyph =
341+61:12 tight glyph *
342+61:13 tight glyph ]
343+62:3 NEWLINE
344+62:3 glyph [
345+62:4 tight lit %many
346+62:10 name p
347+62:11 tight glyph =
348+62:12 tight glyph (
349+62:13 tight name list
350+62:18 name coin
351+62:22 tight glyph )
352+62:23 tight glyph ]
353+62:24 DEDENT
354+62:24 NEWLINE
tests/golden/prelude-3g-basic/tree.txt+64−58
@@ -87,64 +87,70 @@
8787 (arm 39:5
8888 (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
8989 (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
90+ (cast 40:7
91+ (apply 40:10 list (tvar 40:16 A))
92+ (body 41:9
93+ (branch 41:9
94+ (wing 41:12 xs)
95+ (arm 42:11 (lit 42:11 ~) (wing 42:13 ys))
96+ (arm 43:11
97+ (cell 43:11 (bind 43:12 item) (bind 43:17 rest))
98+ (tuple 43:23
99+ (wing 43:24 item)
100+ (group 43:29
101+ (call 43:30 (wing 43:30 weld) (wing 43:35 rest) (wing 43:40 ys))))))))))))))
102+ (value 45:1 turn
103+ (gate 45:9
104+ (face 45:12 args
105+ (cell 45:17
106+ (apply 45:18 list (tvar 45:24 A))
107+ (fn 45:27 (tvar 45:30 A) (tvar 45:32 B))))
108+ (body 46:3
109+ (branch 46:3
110+ (wing 46:6 args)
111+ (arm 47:5
112+ (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
113+ (body 48:7
114+ (cast 48:7
115+ (apply 48:10 list (tvar 48:16 B))
116+ (body 49:9
117+ (branch 49:9
118+ (wing 49:12 xs)
119+ (arm 50:11 (lit 50:11 ~) (lit 50:13 ~))
120+ (arm 51:11
121+ (cell 51:11 (bind 51:12 item) (bind 51:17 rest))
122+ (tuple 51:23
123+ (group 51:24
124+ (call 51:25 (wing 51:25 f) (wing 51:27 item)))
125+ (group 51:33
126+ (call 51:34 (wing 51:34 turn) (wing 51:39 rest) (wing 51:44 f))))))))))))))
127+ (mold 53:1 dime
126128 (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
129+ (face 53:10 p (aura 53:12 @ta))
130+ (face 53:16 q (aura 53:18 @))))
131+ (mold 55:1 hair
130132 (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)))
133+ (face 55:10 p (aura 55:12 @ud))
134+ (face 55:16 q (aura 55:18 @ud))))
135+ (mold 57:1 pint
136+ (cell 57:9
137+ (face 57:10 p
138+ (cell 57:12
139+ (face 57:13 p (aura 57:15 @))
140+ (face 57:17 q (aura 57:19 @))))
141+ (face 57:22 q
142+ (cell 57:24
143+ (face 57:25 p (aura 57:27 @))
144+ (face 57:29 q (aura 57:31 @))))))
145+ (mold 59:1 coin
146+ (union 60:3
147147 (cell 60:3
148− (const 60:4 %many)
149− (face 60:10 p
150− (apply 60:12 list (ref 60:18 coin)))))))
148+ (const 60:4 %$)
149+ (face 60:7 p (ref 60:9 dime)))
150+ (cell 61:3
151+ (const 61:4 %blob)
152+ (face 61:10 p (noun 61:12)))
153+ (cell 62:3
154+ (const 62:4 %many)
155+ (face 62:10 p
156+ (apply 62:12 list (ref 62:18 coin)))))))
tests/golden/prelude-3g-basic/types.txt+2−2
@@ -5,8 +5,8 @@ partial inference; module not checked
55++ not: $-(? ?)
66+$ list: cases proven disjoint; mold not checked
77+$ 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
8+++ fall: $-([(unit A) A] A)
9+++ need: $-((unit A) A)
1010++ weld: sample mold is not supported by partial inference
1111++ turn: sample mold is not supported by partial inference
1212+$ dime: not checked
tests/golden/prelude-3g-like/source.jibb+8−6
@@ -37,16 +37,18 @@
3737++ weld |= args=[(list A) (list A)]
3838 ?- args
3939 [xs ys]
40− ?- xs
41− ~ ys
42− [item rest] [item (weld rest ys)]
40+ ^- (list A)
41+ ?- xs
42+ ~ ys
43+ [item rest] [item (weld rest ys)]
4344
4445++ turn |= args=[(list A) $-(A B)]
4546 ?- args
4647 [xs f]
47− ?- xs
48− ~ ~
49− [item rest] [(f item) (turn rest f)]
48+ ^- (list B)
49+ ?- xs
50+ ~ ~
51+ [item rest] [(f item) (turn rest f)]
5052
5153+$ dime [p=@ta q=@]
5254
tests/golden/prelude-3g-like/tokens.txt+357−343
@@ -190,410 +190,424 @@
19019039:9 name ys
19119139:11 tight glyph ]
19219240:7 INDENT
193−40:7 glyph ?-
194−40:10 name xs
193+40:7 glyph ^-
194+40:10 glyph (
195+40:11 tight name list
196+40:16 tvar A
197+40:17 tight glyph )
19519841: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 ]
199+41:9 glyph ?-
200+41:12 name xs
201+42:11 INDENT
202+42:11 lit ~
203+42:13 name ys
204+43:11 NEWLINE
205+43:11 glyph [
206+43:12 tight name item
207+43:17 name rest
208+43:21 tight glyph ]
209+43:23 glyph [
210+43:24 tight name item
211+43:29 glyph (
212+43:30 tight name weld
213+43:35 name rest
214+43:40 name ys
215+43:42 tight glyph )
216+43:43 tight glyph ]
217+45:1 DEDENT
218+45:1 DEDENT
219+45:1 DEDENT
220+45:1 DEDENT
221+45:1 DEDENT
222+45:1 NEWLINE
223+45:1 glyph ++
224+45:4 name turn
225+45:9 glyph |=
226+45:12 name args
227+45:16 tight glyph =
228+45:17 tight glyph [
229+45:18 tight glyph (
230+45:19 tight name list
231+45:24 tvar A
232+45:25 tight glyph )
233+45:27 glyph $-(
234+45:30 tight tvar A
235+45:32 tvar B
236+45:33 tight glyph )
237+45:34 tight glyph ]
238+46:3 INDENT
239+46:3 glyph ?-
240+46:6 name args
241+47:5 INDENT
242+47:5 glyph [
243+47:6 tight name xs
244+47:9 name f
245+47:10 tight glyph ]
246+48:7 INDENT
247+48:7 glyph ^-
248+48:10 glyph (
249+48:11 tight name list
250+48:16 tvar B
251+48:17 tight glyph )
252+49:9 INDENT
253+49:9 glyph ?-
254+49:12 name xs
255+50:11 INDENT
256+50:11 lit ~
257+50:13 lit ~
258+51:11 NEWLINE
259+51:11 glyph [
260+51:12 tight name item
261+51:17 name rest
262+51:21 tight glyph ]
263+51:23 glyph [
264+51:24 tight glyph (
265+51:25 tight name f
266+51:27 name item
267+51:31 tight glyph )
268+51:33 glyph (
269+51:34 tight name turn
270+51:39 name rest
271+51:44 name f
272+51:45 tight glyph )
273+51:46 tight glyph ]
274+53:1 DEDENT
275+53:1 DEDENT
276+53:1 DEDENT
277+53:1 DEDENT
278+53:1 DEDENT
27627953:1 NEWLINE
27728053:1 glyph +$
278−53:4 name hair
281+53:4 name dime
27928253:9 glyph [
28028353:10 tight name p
28128453:11 tight glyph =
282−53:12 tight aura @ud
285+53:12 tight aura @ta
28328653:16 name q
28428753:17 tight glyph =
285−53:18 tight aura @ud
286−53:21 tight glyph ]
288+53:18 tight aura @
289+53:19 tight glyph ]
28729055:1 NEWLINE
28829155:1 glyph +$
289−55:4 name pint
292+55:4 name hair
29029355:9 glyph [
29129455:10 tight name p
29229555: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 ]
296+55:12 tight aura @ud
297+55:16 name q
298+55:17 tight glyph =
299+55:18 tight aura @ud
300+55:21 tight glyph ]
31230157:1 NEWLINE
31330257: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
303+57:4 name pint
304+57:9 glyph [
305+57:10 tight name p
306+57:11 tight glyph =
307+57:12 tight glyph [
308+57:13 tight name p
309+57:14 tight glyph =
310+57:15 tight aura @
311+57:17 name q
312+57:18 tight glyph =
313+57:19 tight aura @
314+57:20 tight glyph ]
315+57:22 name q
316+57:23 tight glyph =
317+57:24 tight glyph [
318+57:25 tight name p
319+57:26 tight glyph =
320+57:27 tight aura @
321+57:29 name q
322+57:30 tight glyph =
323+57:31 tight aura @
324+57:32 tight glyph ]
325+57:33 tight glyph ]
326+59:1 NEWLINE
327+59:1 glyph +$
328+59:4 name coin
329+60:3 INDENT
33033060: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 ]
331+60:4 tight lit %$
332+60:7 name p
333+60:8 tight glyph =
334+60:9 tight name dime
335+60:13 tight glyph ]
336+61:3 NEWLINE
337+61:3 glyph [
338+61:4 tight lit %blob
339+61:10 name p
340+61:11 tight glyph =
341+61:12 tight glyph *
342+61:13 tight glyph ]
343+62:3 NEWLINE
344+62:3 glyph [
345+62:4 tight lit %many
346+62:10 name p
347+62:11 tight glyph =
348+62:12 tight glyph (
349+62:13 tight name list
350+62:18 name coin
351+62:22 tight glyph )
352+62:23 tight glyph ]
353+64:1 DEDENT
35635464:1 NEWLINE
35735564:1 glyph +$
358−64:4 name trel
356+64:4 name pair
35935764:9 glyph |$
36035864:12 glyph [
36135964:13 tight tvar A
36236064: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 ]
361+64:16 tight glyph ]
362+64:18 glyph [
363+64:19 tight name p
364+64:20 tight glyph =
365+64:21 tight tvar A
366+64:23 name q
367+64:24 tight glyph =
368+64:25 tight tvar B
369+64:26 tight glyph ]
37637066:1 NEWLINE
37737166:1 glyph +$
378−66:4 name qual
372+66:4 name trel
37937366:9 glyph |$
38037466:12 glyph [
38137566:13 tight tvar A
38237666:15 tvar B
38337766: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 ]
378+66:18 tight glyph ]
379+66:20 glyph [
380+66:21 tight name p
381+66:22 tight glyph =
382+66:23 tight tvar A
383+66:25 name q
384+66:26 tight glyph =
385+66:27 tight tvar B
386+66:29 name r
387+66:30 tight glyph =
388+66:31 tight tvar C
389+66:32 tight glyph ]
40039068:1 NEWLINE
40139168:1 glyph +$
402−68:4 name cord
403−68:9 aura @t
392+68:4 name qual
393+68:9 glyph |$
394+68:12 glyph [
395+68:13 tight tvar A
396+68:15 tvar B
397+68:17 tvar C
398+68:19 tvar D
399+68:20 tight glyph ]
400+68:22 glyph [
401+68:23 tight name p
402+68:24 tight glyph =
403+68:25 tight tvar A
404+68:27 name q
405+68:28 tight glyph =
406+68:29 tight tvar B
407+68:31 name r
408+68:32 tight glyph =
409+68:33 tight tvar C
410+68:35 name s
411+68:36 tight glyph =
412+68:37 tight tvar D
413+68:38 tight glyph ]
40441470:1 NEWLINE
40541570:1 glyph +$
406−70:4 name knot
407−70:9 aura @ta
416+70:4 name cord
417+70:9 aura @t
40841872:1 NEWLINE
40941972: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 )
420+72:4 name knot
421+72:9 aura @ta
41542274:1 NEWLINE
41642374:1 glyph +$
417−74:4 name path
424+74:4 name tape
41842574:9 glyph (
41942674:10 tight name list
420−74:15 name knot
421−74:19 tight glyph )
427+74:15 aura @tD
428+74:18 tight glyph )
42242976:1 NEWLINE
42343076: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 ]
431+76:4 name path
432+76:9 glyph (
433+76:10 tight name list
434+76:15 name knot
435+76:19 tight glyph )
436+78:1 NEWLINE
437+78:1 glyph +$
438+78:4 name tank
439+79:3 INDENT
440+79:3 name cord
45344180:3 NEWLINE
45444280:3 glyph [
455−80:4 tight lit %rose
443+80:4 tight lit %leaf
45644480:10 name p
45744580: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
446+80:12 tight name tape
447+80:16 tight glyph ]
448+81:3 NEWLINE
449+81:3 glyph [
450+81:4 tight lit %palm
451+81:10 name p
452+81:11 tight glyph =
453+81:12 tight glyph (
454+81:13 tight name qual
455+81:18 name tape
456+81:23 name tape
457+81:28 name tape
458+81:33 name tape
459+81:37 tight glyph )
460+81:39 name q
461+81:40 tight glyph =
462+81:41 tight glyph (
463+81:42 tight name list
464+81:47 name tank
465+81:51 tight glyph )
466+81:52 tight glyph ]
467+82:3 NEWLINE
468+82:3 glyph [
469+82:4 tight lit %rose
470+82:10 name p
47747182: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 ]
472+82:12 tight glyph (
473+82:13 tight name trel
474+82:18 name tape
475+82:23 name tape
476+82:28 name tape
477+82:32 tight glyph )
478+82:34 name q
479+82:35 tight glyph =
480+82:36 tight glyph (
481+82:37 tight name list
482+82:42 name tank
483+82:46 tight glyph )
484+82:47 tight glyph ]
485+84:1 DEDENT
48348684:1 NEWLINE
48448784:1 glyph +$
485−84:4 name edge
488+84:4 name nail
48648984:9 glyph [
48749084:10 tight name p
48849184:11 tight glyph =
48949284:12 tight name hair
49049384:17 name q
49149484: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 ]
495+84:19 tight name tape
496+84:23 tight glyph ]
50449786:1 NEWLINE
50549886: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 )
499+86:4 name edge
500+86:9 glyph [
501+86:10 tight name p
502+86:11 tight glyph =
503+86:12 tight name hair
504+86:17 name q
505+86:18 tight glyph =
506+86:19 tight glyph (
507+86:20 tight name unit
508+86:25 glyph [
509+86:26 tight name p
510+86:27 tight glyph =
511+86:28 tight glyph *
512+86:30 name q
513+86:31 tight glyph =
514+86:32 tight name nail
515+86:36 tight glyph ]
516+86:37 tight glyph )
517+86:38 tight glyph ]
51151888:1 NEWLINE
51251988: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 ]
520+88:4 name rule
521+88:9 glyph $-(
522+88:12 tight name nail
523+88:17 name edge
524+88:21 tight glyph )
52252590:1 NEWLINE
52352690: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
527+90:4 name spot
528+90:9 glyph [
529+90:10 tight name p
530+90:11 tight glyph =
531+90:12 tight name path
532+90:17 name q
533+90:18 tight glyph =
534+90:19 tight name pint
535+90:23 tight glyph ]
536+92:1 NEWLINE
537+92:1 glyph +$
538+92:4 name toon
539+93:3 INDENT
54054093:3 glyph [
541−93:4 tight lit %2
541+93:4 tight lit %0
54254293:7 name p
54354393: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 ]
544+93:9 tight glyph *
545+93:10 tight glyph ]
546+94:3 NEWLINE
547+94:3 glyph [
548+94:4 tight lit %1
549+94:7 name p
550+94:8 tight glyph =
551+94:9 tight glyph *
552+94:10 tight glyph ]
553+95:3 NEWLINE
554+95:3 glyph [
555+95:4 tight lit %2
556+95:7 name p
557+95:8 tight glyph =
558+95:9 tight glyph (
559+95:10 tight name list
560+95:15 name tank
561+95:19 tight glyph )
562+95:20 tight glyph ]
563+97:1 DEDENT
57556497: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−100:26 DEDENT
598−100:26 DEDENT
599−100:26 NEWLINE
565+97:1 glyph +$
566+97:4 name like
567+97:9 glyph |$
568+97:12 glyph [
569+97:13 tight tvar A
570+97:14 tight glyph ]
571+97:16 glyph [
572+97:17 tight name p
573+97:18 tight glyph =
574+97:19 tight name hair
575+97:24 name q
576+97:25 tight glyph =
577+97:26 tight glyph (
578+97:27 tight name unit
579+97:32 glyph [
580+97:33 tight name p
581+97:34 tight glyph =
582+97:35 tight tvar A
583+97:37 name q
584+97:38 tight glyph =
585+97:39 tight name nail
586+97:43 tight glyph ]
587+97:44 tight glyph )
588+97:45 tight glyph ]
589+99:1 NEWLINE
590+99:1 glyph ++
591+99:4 name wonk
592+99:9 glyph |=
593+99:12 name veq
594+99:15 tight glyph =
595+99:16 tight glyph (
596+99:17 tight name like
597+99:22 tvar A
598+99:23 tight glyph )
599+100:3 INDENT
600+100:3 glyph ?-
601+100:6 wing q.veq
602+101:5 INDENT
603+101:5 lit ~
604+101:7 glyph !!
605+102:5 NEWLINE
606+102:5 glyph [
607+102:6 tight lit ~
608+102:8 name product
609+102:15 tight glyph ]
610+102:17 wing p.product
611+102:26 DEDENT
612+102:26 DEDENT
613+102:26 NEWLINE
tests/golden/prelude-3g-like/tree.txt+152−146
@@ -87,156 +87,162 @@
8787 (arm 39:5
8888 (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
8989 (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
90+ (cast 40:7
91+ (apply 40:10 list (tvar 40:16 A))
92+ (body 41:9
93+ (branch 41:9
94+ (wing 41:12 xs)
95+ (arm 42:11 (lit 42:11 ~) (wing 42:13 ys))
96+ (arm 43:11
97+ (cell 43:11 (bind 43:12 item) (bind 43:17 rest))
98+ (tuple 43:23
99+ (wing 43:24 item)
100+ (group 43:29
101+ (call 43:30 (wing 43:30 weld) (wing 43:35 rest) (wing 43:40 ys))))))))))))))
102+ (value 45:1 turn
103+ (gate 45:9
104+ (face 45:12 args
105+ (cell 45:17
106+ (apply 45:18 list (tvar 45:24 A))
107+ (fn 45:27 (tvar 45:30 A) (tvar 45:32 B))))
108+ (body 46:3
109+ (branch 46:3
110+ (wing 46:6 args)
111+ (arm 47:5
112+ (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
113+ (body 48:7
114+ (cast 48:7
115+ (apply 48:10 list (tvar 48:16 B))
116+ (body 49:9
117+ (branch 49:9
118+ (wing 49:12 xs)
119+ (arm 50:11 (lit 50:11 ~) (lit 50:13 ~))
120+ (arm 51:11
121+ (cell 51:11 (bind 51:12 item) (bind 51:17 rest))
122+ (tuple 51:23
123+ (group 51:24
124+ (call 51:25 (wing 51:25 f) (wing 51:27 item)))
125+ (group 51:33
126+ (call 51:34 (wing 51:34 turn) (wing 51:39 rest) (wing 51:44 f))))))))))))))
127+ (mold 53:1 dime
126128 (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
129+ (face 53:10 p (aura 53:12 @ta))
130+ (face 53:16 q (aura 53:18 @))))
131+ (mold 55:1 hair
130132 (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)))
133+ (face 55:10 p (aura 55:12 @ud))
134+ (face 55:16 q (aura 55:18 @ud))))
135+ (mold 57:1 pint
136+ (cell 57:9
137+ (face 57:10 p
138+ (cell 57:12
139+ (face 57:13 p (aura 57:15 @))
140+ (face 57:17 q (aura 57:19 @))))
141+ (face 57:22 q
142+ (cell 57:24
143+ (face 57:25 p (aura 57:27 @))
144+ (face 57:29 q (aura 57:31 @))))))
145+ (mold 59:1 coin
146+ (union 60:3
147147 (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))))
148+ (const 60:4 %$)
149+ (face 60:7 p (ref 60:9 dime)))
150+ (cell 61:3
151+ (const 61:4 %blob)
152+ (face 61:10 p (noun 61:12)))
153+ (cell 62:3
154+ (const 62:4 %many)
155+ (face 62:10 p
156+ (apply 62:12 list (ref 62:18 coin))))))
157+ (mold 64:1 pair
158+ (generic 64:9 A B
159+ (cell 64:18
160+ (face 64:19 p (tvar 64:21 A))
161+ (face 64:23 q (tvar 64:25 B)))))
162+ (mold 66:1 trel
163+ (generic 66:9 A B C
164+ (cell 66:20
165+ (face 66:21 p (tvar 66:23 A))
166+ (face 66:25 q (tvar 66:27 B))
167+ (face 66:29 r (tvar 66:31 C)))))
168+ (mold 68:1 qual
169+ (generic 68:9 A B C D
170+ (cell 68:22
171+ (face 68:23 p (tvar 68:25 A))
172+ (face 68:27 q (tvar 68:29 B))
173+ (face 68:31 r (tvar 68:33 C))
174+ (face 68:35 s (tvar 68:37 D)))))
175+ (mold 70:1 cord (aura 70:9 @t))
176+ (mold 72:1 knot (aura 72:9 @ta))
177+ (mold 74:1 tape
178+ (apply 74:9 list (aura 74:15 @tD)))
179+ (mold 76:1 path
180+ (apply 76:9 list (ref 76:15 knot)))
181+ (mold 78:1 tank
182+ (union 79:3
183+ (ref 79:3 cord)
187184 (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
185+ (const 80:4 %leaf)
186+ (face 80:10 p (ref 80:12 tape)))
187+ (cell 81:3
188+ (const 81:4 %palm)
189+ (face 81:10 p
190+ (apply 81:12 qual (ref 81:18 tape) (ref 81:23 tape) (ref 81:28 tape) (ref 81:33 tape)))
191+ (face 81:39 q
192+ (apply 81:41 list (ref 81:47 tank))))
193+ (cell 82:3
194+ (const 82:4 %rose)
195+ (face 82:10 p
196+ (apply 82:12 trel (ref 82:18 tape) (ref 82:23 tape) (ref 82:28 tape)))
197+ (face 82:34 q
198+ (apply 82:36 list (ref 82:42 tank))))))
199+ (mold 84:1 nail
198200 (cell 84:9
199201 (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)))
202+ (face 84:17 q (ref 84:19 tape))))
203+ (mold 86:1 edge
204+ (cell 86:9
205+ (face 86:10 p (ref 86:12 hair))
206+ (face 86:17 q
207+ (apply 86:19 unit
208+ (cell 86:25
209+ (face 86:26 p (noun 86:28))
210+ (face 86:30 q (ref 86:32 nail)))))))
211+ (mold 88:1 rule
212+ (fn 88:9 (ref 88:12 nail) (ref 88:17 edge)))
213+ (mold 90:1 spot
214+ (cell 90:9
215+ (face 90:10 p (ref 90:12 path))
216+ (face 90:17 q (ref 90:19 pint))))
217+ (mold 92:1 toon
218+ (union 93:3
219219 (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)))))))
220+ (const 93:4 %0)
221+ (face 93:7 p (noun 93:9)))
222+ (cell 94:3
223+ (const 94:4 %1)
224+ (face 94:7 p (noun 94:9)))
225+ (cell 95:3
226+ (const 95:4 %2)
227+ (face 95:7 p
228+ (apply 95:9 list (ref 95:15 tank))))))
229+ (mold 97:1 like
230+ (generic 97:9 A
231+ (cell 97:16
232+ (face 97:17 p (ref 97:19 hair))
233+ (face 97:24 q
234+ (apply 97:26 unit
235+ (cell 97:32
236+ (face 97:33 p (tvar 97:35 A))
237+ (face 97:37 q (ref 97:39 nail))))))))
238+ (value 99:1 wonk
239+ (gate 99:9
240+ (face 99:12 veq
241+ (apply 99:16 like (tvar 99:22 A)))
242+ (body 100:3
243+ (branch 100:3
244+ (wing 100:6 q.veq)
245+ (arm 101:5 (lit 101:5 ~) (crash 101:7))
246+ (arm 102:5
247+ (cell 102:5 (lit 102:6 ~) (bind 102:8 product))
248+ (wing 102:17 p.product)))))))
tests/golden/prelude-3g-like/types.txt+2−2
@@ -5,8 +5,8 @@ partial inference; module not checked
55++ not: $-(? ?)
66+$ list: cases proven disjoint; mold not checked
77+$ 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
8+++ fall: $-([(unit A) A] A)
9+++ need: $-((unit A) A)
1010++ weld: sample mold is not supported by partial inference
1111++ turn: sample mold is not supported by partial inference
1212+$ dime: not checked
tests/golden/prelude-3g-structural/source.jibb+8−6
@@ -37,16 +37,18 @@
3737++ weld |= args=[(list A) (list A)]
3838 ?- args
3939 [xs ys]
40− ?- xs
41− ~ ys
42− [item rest] [item (weld rest ys)]
40+ ^- (list A)
41+ ?- xs
42+ ~ ys
43+ [item rest] [item (weld rest ys)]
4344
4445++ turn |= args=[(list A) $-(A B)]
4546 ?- args
4647 [xs f]
47− ?- xs
48− ~ ~
49− [item rest] [(f item) (turn rest f)]
48+ ^- (list B)
49+ ?- xs
50+ ~ ~
51+ [item rest] [(f item) (turn rest f)]
5052
5153+$ dime [p=@ta q=@]
5254
tests/golden/prelude-3g-structural/tokens.txt+309−295
@@ -190,361 +190,375 @@
19019039:9 name ys
19119139:11 tight glyph ]
19219240:7 INDENT
193−40:7 glyph ?-
194−40:10 name xs
193+40:7 glyph ^-
194+40:10 glyph (
195+40:11 tight name list
196+40:16 tvar A
197+40:17 tight glyph )
19519841: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 ]
199+41:9 glyph ?-
200+41:12 name xs
201+42:11 INDENT
202+42:11 lit ~
203+42:13 name ys
204+43:11 NEWLINE
205+43:11 glyph [
206+43:12 tight name item
207+43:17 name rest
208+43:21 tight glyph ]
209+43:23 glyph [
210+43:24 tight name item
211+43:29 glyph (
212+43:30 tight name weld
213+43:35 name rest
214+43:40 name ys
215+43:42 tight glyph )
216+43:43 tight glyph ]
217+45:1 DEDENT
218+45:1 DEDENT
219+45:1 DEDENT
220+45:1 DEDENT
221+45:1 DEDENT
222+45:1 NEWLINE
223+45:1 glyph ++
224+45:4 name turn
225+45:9 glyph |=
226+45:12 name args
227+45:16 tight glyph =
228+45:17 tight glyph [
229+45:18 tight glyph (
230+45:19 tight name list
231+45:24 tvar A
232+45:25 tight glyph )
233+45:27 glyph $-(
234+45:30 tight tvar A
235+45:32 tvar B
236+45:33 tight glyph )
237+45:34 tight glyph ]
238+46:3 INDENT
239+46:3 glyph ?-
240+46:6 name args
241+47:5 INDENT
242+47:5 glyph [
243+47:6 tight name xs
244+47:9 name f
245+47:10 tight glyph ]
246+48:7 INDENT
247+48:7 glyph ^-
248+48:10 glyph (
249+48:11 tight name list
250+48:16 tvar B
251+48:17 tight glyph )
252+49:9 INDENT
253+49:9 glyph ?-
254+49:12 name xs
255+50:11 INDENT
256+50:11 lit ~
257+50:13 lit ~
258+51:11 NEWLINE
259+51:11 glyph [
260+51:12 tight name item
261+51:17 name rest
262+51:21 tight glyph ]
263+51:23 glyph [
264+51:24 tight glyph (
265+51:25 tight name f
266+51:27 name item
267+51:31 tight glyph )
268+51:33 glyph (
269+51:34 tight name turn
270+51:39 name rest
271+51:44 name f
272+51:45 tight glyph )
273+51:46 tight glyph ]
274+53:1 DEDENT
275+53:1 DEDENT
276+53:1 DEDENT
277+53:1 DEDENT
278+53:1 DEDENT
27627953:1 NEWLINE
27728053:1 glyph +$
278−53:4 name hair
281+53:4 name dime
27928253:9 glyph [
28028353:10 tight name p
28128453:11 tight glyph =
282−53:12 tight aura @ud
285+53:12 tight aura @ta
28328653:16 name q
28428753:17 tight glyph =
285−53:18 tight aura @ud
286−53:21 tight glyph ]
288+53:18 tight aura @
289+53:19 tight glyph ]
28729055:1 NEWLINE
28829155:1 glyph +$
289−55:4 name pint
292+55:4 name hair
29029355:9 glyph [
29129455:10 tight name p
29229555: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 ]
296+55:12 tight aura @ud
297+55:16 name q
298+55:17 tight glyph =
299+55:18 tight aura @ud
300+55:21 tight glyph ]
31230157:1 NEWLINE
31330257: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
303+57:4 name pint
304+57:9 glyph [
305+57:10 tight name p
306+57:11 tight glyph =
307+57:12 tight glyph [
308+57:13 tight name p
309+57:14 tight glyph =
310+57:15 tight aura @
311+57:17 name q
312+57:18 tight glyph =
313+57:19 tight aura @
314+57:20 tight glyph ]
315+57:22 name q
316+57:23 tight glyph =
317+57:24 tight glyph [
318+57:25 tight name p
319+57:26 tight glyph =
320+57:27 tight aura @
321+57:29 name q
322+57:30 tight glyph =
323+57:31 tight aura @
324+57:32 tight glyph ]
325+57:33 tight glyph ]
326+59:1 NEWLINE
327+59:1 glyph +$
328+59:4 name coin
329+60:3 INDENT
33033060: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 ]
331+60:4 tight lit %$
332+60:7 name p
333+60:8 tight glyph =
334+60:9 tight name dime
335+60:13 tight glyph ]
336+61:3 NEWLINE
337+61:3 glyph [
338+61:4 tight lit %blob
339+61:10 name p
340+61:11 tight glyph =
341+61:12 tight glyph *
342+61:13 tight glyph ]
343+62:3 NEWLINE
344+62:3 glyph [
345+62:4 tight lit %many
346+62:10 name p
347+62:11 tight glyph =
348+62:12 tight glyph (
349+62:13 tight name list
350+62:18 name coin
351+62:22 tight glyph )
352+62:23 tight glyph ]
353+64:1 DEDENT
35635464:1 NEWLINE
35735564:1 glyph +$
358−64:4 name trel
356+64:4 name pair
35935764:9 glyph |$
36035864:12 glyph [
36135964:13 tight tvar A
36236064: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 ]
361+64:16 tight glyph ]
362+64:18 glyph [
363+64:19 tight name p
364+64:20 tight glyph =
365+64:21 tight tvar A
366+64:23 name q
367+64:24 tight glyph =
368+64:25 tight tvar B
369+64:26 tight glyph ]
37637066:1 NEWLINE
37737166:1 glyph +$
378−66:4 name qual
372+66:4 name trel
37937366:9 glyph |$
38037466:12 glyph [
38137566:13 tight tvar A
38237666:15 tvar B
38337766: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 ]
378+66:18 tight glyph ]
379+66:20 glyph [
380+66:21 tight name p
381+66:22 tight glyph =
382+66:23 tight tvar A
383+66:25 name q
384+66:26 tight glyph =
385+66:27 tight tvar B
386+66:29 name r
387+66:30 tight glyph =
388+66:31 tight tvar C
389+66:32 tight glyph ]
40039068:1 NEWLINE
40139168:1 glyph +$
402−68:4 name cord
403−68:9 aura @t
392+68:4 name qual
393+68:9 glyph |$
394+68:12 glyph [
395+68:13 tight tvar A
396+68:15 tvar B
397+68:17 tvar C
398+68:19 tvar D
399+68:20 tight glyph ]
400+68:22 glyph [
401+68:23 tight name p
402+68:24 tight glyph =
403+68:25 tight tvar A
404+68:27 name q
405+68:28 tight glyph =
406+68:29 tight tvar B
407+68:31 name r
408+68:32 tight glyph =
409+68:33 tight tvar C
410+68:35 name s
411+68:36 tight glyph =
412+68:37 tight tvar D
413+68:38 tight glyph ]
40441470:1 NEWLINE
40541570:1 glyph +$
406−70:4 name knot
407−70:9 aura @ta
416+70:4 name cord
417+70:9 aura @t
40841872:1 NEWLINE
40941972: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 )
420+72:4 name knot
421+72:9 aura @ta
41542274:1 NEWLINE
41642374:1 glyph +$
417−74:4 name path
424+74:4 name tape
41842574:9 glyph (
41942674:10 tight name list
420−74:15 name knot
421−74:19 tight glyph )
427+74:15 aura @tD
428+74:18 tight glyph )
42242976:1 NEWLINE
42343076: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 ]
431+76:4 name path
432+76:9 glyph (
433+76:10 tight name list
434+76:15 name knot
435+76:19 tight glyph )
436+78:1 NEWLINE
437+78:1 glyph +$
438+78:4 name tank
439+79:3 INDENT
440+79:3 name cord
45344180:3 NEWLINE
45444280:3 glyph [
455−80:4 tight lit %rose
443+80:4 tight lit %leaf
45644480:10 name p
45744580: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
446+80:12 tight name tape
447+80:16 tight glyph ]
448+81:3 NEWLINE
449+81:3 glyph [
450+81:4 tight lit %palm
451+81:10 name p
452+81:11 tight glyph =
453+81:12 tight glyph (
454+81:13 tight name qual
455+81:18 name tape
456+81:23 name tape
457+81:28 name tape
458+81:33 name tape
459+81:37 tight glyph )
460+81:39 name q
461+81:40 tight glyph =
462+81:41 tight glyph (
463+81:42 tight name list
464+81:47 name tank
465+81:51 tight glyph )
466+81:52 tight glyph ]
467+82:3 NEWLINE
468+82:3 glyph [
469+82:4 tight lit %rose
470+82:10 name p
47747182: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 ]
472+82:12 tight glyph (
473+82:13 tight name trel
474+82:18 name tape
475+82:23 name tape
476+82:28 name tape
477+82:32 tight glyph )
478+82:34 name q
479+82:35 tight glyph =
480+82:36 tight glyph (
481+82:37 tight name list
482+82:42 name tank
483+82:46 tight glyph )
484+82:47 tight glyph ]
485+84:1 DEDENT
48348684:1 NEWLINE
48448784:1 glyph +$
485−84:4 name edge
488+84:4 name nail
48648984:9 glyph [
48749084:10 tight name p
48849184:11 tight glyph =
48949284:12 tight name hair
49049384:17 name q
49149484: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 ]
495+84:19 tight name tape
496+84:23 tight glyph ]
50449786:1 NEWLINE
50549886: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 )
499+86:4 name edge
500+86:9 glyph [
501+86:10 tight name p
502+86:11 tight glyph =
503+86:12 tight name hair
504+86:17 name q
505+86:18 tight glyph =
506+86:19 tight glyph (
507+86:20 tight name unit
508+86:25 glyph [
509+86:26 tight name p
510+86:27 tight glyph =
511+86:28 tight glyph *
512+86:30 name q
513+86:31 tight glyph =
514+86:32 tight name nail
515+86:36 tight glyph ]
516+86:37 tight glyph )
517+86:38 tight glyph ]
51151888:1 NEWLINE
51251988: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 ]
520+88:4 name rule
521+88:9 glyph $-(
522+88:12 tight name nail
523+88:17 name edge
524+88:21 tight glyph )
52252590:1 NEWLINE
52352690: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
527+90:4 name spot
528+90:9 glyph [
529+90:10 tight name p
530+90:11 tight glyph =
531+90:12 tight name path
532+90:17 name q
533+90:18 tight glyph =
534+90:19 tight name pint
535+90:23 tight glyph ]
536+92:1 NEWLINE
537+92:1 glyph +$
538+92:4 name toon
539+93:3 INDENT
54054093:3 glyph [
541−93:4 tight lit %2
541+93:4 tight lit %0
54254293:7 name p
54354393: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−93:21 DEDENT
550−93:21 NEWLINE
544+93:9 tight glyph *
545+93:10 tight glyph ]
546+94:3 NEWLINE
547+94:3 glyph [
548+94:4 tight lit %1
549+94:7 name p
550+94:8 tight glyph =
551+94:9 tight glyph *
552+94:10 tight glyph ]
553+95:3 NEWLINE
554+95:3 glyph [
555+95:4 tight lit %2
556+95:7 name p
557+95:8 tight glyph =
558+95:9 tight glyph (
559+95:10 tight name list
560+95:15 name tank
561+95:19 tight glyph )
562+95:20 tight glyph ]
563+95:21 DEDENT
564+95:21 NEWLINE
tests/golden/prelude-3g-structural/tree.txt+132−126
@@ -87,136 +87,142 @@
8787 (arm 39:5
8888 (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
8989 (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
90+ (cast 40:7
91+ (apply 40:10 list (tvar 40:16 A))
92+ (body 41:9
93+ (branch 41:9
94+ (wing 41:12 xs)
95+ (arm 42:11 (lit 42:11 ~) (wing 42:13 ys))
96+ (arm 43:11
97+ (cell 43:11 (bind 43:12 item) (bind 43:17 rest))
98+ (tuple 43:23
99+ (wing 43:24 item)
100+ (group 43:29
101+ (call 43:30 (wing 43:30 weld) (wing 43:35 rest) (wing 43:40 ys))))))))))))))
102+ (value 45:1 turn
103+ (gate 45:9
104+ (face 45:12 args
105+ (cell 45:17
106+ (apply 45:18 list (tvar 45:24 A))
107+ (fn 45:27 (tvar 45:30 A) (tvar 45:32 B))))
108+ (body 46:3
109+ (branch 46:3
110+ (wing 46:6 args)
111+ (arm 47:5
112+ (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
113+ (body 48:7
114+ (cast 48:7
115+ (apply 48:10 list (tvar 48:16 B))
116+ (body 49:9
117+ (branch 49:9
118+ (wing 49:12 xs)
119+ (arm 50:11 (lit 50:11 ~) (lit 50:13 ~))
120+ (arm 51:11
121+ (cell 51:11 (bind 51:12 item) (bind 51:17 rest))
122+ (tuple 51:23
123+ (group 51:24
124+ (call 51:25 (wing 51:25 f) (wing 51:27 item)))
125+ (group 51:33
126+ (call 51:34 (wing 51:34 turn) (wing 51:39 rest) (wing 51:44 f))))))))))))))
127+ (mold 53:1 dime
126128 (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
129+ (face 53:10 p (aura 53:12 @ta))
130+ (face 53:16 q (aura 53:18 @))))
131+ (mold 55:1 hair
130132 (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)))
133+ (face 55:10 p (aura 55:12 @ud))
134+ (face 55:16 q (aura 55:18 @ud))))
135+ (mold 57:1 pint
136+ (cell 57:9
137+ (face 57:10 p
138+ (cell 57:12
139+ (face 57:13 p (aura 57:15 @))
140+ (face 57:17 q (aura 57:19 @))))
141+ (face 57:22 q
142+ (cell 57:24
143+ (face 57:25 p (aura 57:27 @))
144+ (face 57:29 q (aura 57:31 @))))))
145+ (mold 59:1 coin
146+ (union 60:3
147147 (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))))
148+ (const 60:4 %$)
149+ (face 60:7 p (ref 60:9 dime)))
150+ (cell 61:3
151+ (const 61:4 %blob)
152+ (face 61:10 p (noun 61:12)))
153+ (cell 62:3
154+ (const 62:4 %many)
155+ (face 62:10 p
156+ (apply 62:12 list (ref 62:18 coin))))))
157+ (mold 64:1 pair
158+ (generic 64:9 A B
159+ (cell 64:18
160+ (face 64:19 p (tvar 64:21 A))
161+ (face 64:23 q (tvar 64:25 B)))))
162+ (mold 66:1 trel
163+ (generic 66:9 A B C
164+ (cell 66:20
165+ (face 66:21 p (tvar 66:23 A))
166+ (face 66:25 q (tvar 66:27 B))
167+ (face 66:29 r (tvar 66:31 C)))))
168+ (mold 68:1 qual
169+ (generic 68:9 A B C D
170+ (cell 68:22
171+ (face 68:23 p (tvar 68:25 A))
172+ (face 68:27 q (tvar 68:29 B))
173+ (face 68:31 r (tvar 68:33 C))
174+ (face 68:35 s (tvar 68:37 D)))))
175+ (mold 70:1 cord (aura 70:9 @t))
176+ (mold 72:1 knot (aura 72:9 @ta))
177+ (mold 74:1 tape
178+ (apply 74:9 list (aura 74:15 @tD)))
179+ (mold 76:1 path
180+ (apply 76:9 list (ref 76:15 knot)))
181+ (mold 78:1 tank
182+ (union 79:3
183+ (ref 79:3 cord)
187184 (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
185+ (const 80:4 %leaf)
186+ (face 80:10 p (ref 80:12 tape)))
187+ (cell 81:3
188+ (const 81:4 %palm)
189+ (face 81:10 p
190+ (apply 81:12 qual (ref 81:18 tape) (ref 81:23 tape) (ref 81:28 tape) (ref 81:33 tape)))
191+ (face 81:39 q
192+ (apply 81:41 list (ref 81:47 tank))))
193+ (cell 82:3
194+ (const 82:4 %rose)
195+ (face 82:10 p
196+ (apply 82:12 trel (ref 82:18 tape) (ref 82:23 tape) (ref 82:28 tape)))
197+ (face 82:34 q
198+ (apply 82:36 list (ref 82:42 tank))))))
199+ (mold 84:1 nail
198200 (cell 84:9
199201 (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)))
202+ (face 84:17 q (ref 84:19 tape))))
203+ (mold 86:1 edge
204+ (cell 86:9
205+ (face 86:10 p (ref 86:12 hair))
206+ (face 86:17 q
207+ (apply 86:19 unit
208+ (cell 86:25
209+ (face 86:26 p (noun 86:28))
210+ (face 86:30 q (ref 86:32 nail)))))))
211+ (mold 88:1 rule
212+ (fn 88:9 (ref 88:12 nail) (ref 88:17 edge)))
213+ (mold 90:1 spot
214+ (cell 90:9
215+ (face 90:10 p (ref 90:12 path))
216+ (face 90:17 q (ref 90:19 pint))))
217+ (mold 92:1 toon
218+ (union 93:3
219219 (cell 93:3
220− (const 93:4 %2)
221− (face 93:7 p
222− (apply 93:9 list (ref 93:15 tank)))))))
220+ (const 93:4 %0)
221+ (face 93:7 p (noun 93:9)))
222+ (cell 94:3
223+ (const 94:4 %1)
224+ (face 94:7 p (noun 94:9)))
225+ (cell 95:3
226+ (const 95:4 %2)
227+ (face 95:7 p
228+ (apply 95:9 list (ref 95:15 tank)))))))
tests/golden/prelude-3g-structural/types.txt+2−2
@@ -5,8 +5,8 @@ partial inference; module not checked
55++ not: $-(? ?)
66+$ list: cases proven disjoint; mold not checked
77+$ 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
8+++ fall: $-([(unit A) A] A)
9+++ need: $-((unit A) A)
1010++ weld: sample mold is not supported by partial inference
1111++ turn: sample mold is not supported by partial inference
1212+$ dime: not checked
tests/golden/prelude-list-helpers/source.jibb+8−6
@@ -37,16 +37,18 @@
3737++ weld |= args=[(list A) (list A)]
3838 ?- args
3939 [xs ys]
40− ?- xs
41− ~ ys
42− [item rest] [item (weld rest ys)]
40+ ^- (list A)
41+ ?- xs
42+ ~ ys
43+ [item rest] [item (weld rest ys)]
4344
4445++ turn |= args=[(list A) $-(A B)]
4546 ?- args
4647 [xs f]
47− ?- xs
48− ~ ~
49− [item rest] [(f item) (turn rest f)]
48+ ^- (list B)
49+ ?- xs
50+ ~ ~
51+ [item rest] [(f item) (turn rest f)]
5052
5153+$ dime [p=@ta q=@]
5254
tests/golden/prelude-list-helpers/tokens.txt+568−554
@@ -190,650 +190,664 @@
19019039:9 name ys
19119139:11 tight glyph ]
19219240:7 INDENT
193−40:7 glyph ?-
194−40:10 name xs
193+40:7 glyph ^-
194+40:10 glyph (
195+40:11 tight name list
196+40:16 tvar A
197+40:17 tight glyph )
19519841: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 ]
199+41:9 glyph ?-
200+41:12 name xs
201+42:11 INDENT
202+42:11 lit ~
203+42:13 name ys
204+43:11 NEWLINE
205+43:11 glyph [
206+43:12 tight name item
207+43:17 name rest
208+43:21 tight glyph ]
209+43:23 glyph [
210+43:24 tight name item
211+43:29 glyph (
212+43:30 tight name weld
213+43:35 name rest
214+43:40 name ys
215+43:42 tight glyph )
216+43:43 tight glyph ]
217+45:1 DEDENT
218+45:1 DEDENT
219+45:1 DEDENT
220+45:1 DEDENT
221+45:1 DEDENT
222+45:1 NEWLINE
223+45:1 glyph ++
224+45:4 name turn
225+45:9 glyph |=
226+45:12 name args
227+45:16 tight glyph =
228+45:17 tight glyph [
229+45:18 tight glyph (
230+45:19 tight name list
231+45:24 tvar A
232+45:25 tight glyph )
233+45:27 glyph $-(
234+45:30 tight tvar A
235+45:32 tvar B
236+45:33 tight glyph )
237+45:34 tight glyph ]
238+46:3 INDENT
239+46:3 glyph ?-
240+46:6 name args
241+47:5 INDENT
242+47:5 glyph [
243+47:6 tight name xs
244+47:9 name f
245+47:10 tight glyph ]
246+48:7 INDENT
247+48:7 glyph ^-
248+48:10 glyph (
249+48:11 tight name list
250+48:16 tvar B
251+48:17 tight glyph )
252+49:9 INDENT
253+49:9 glyph ?-
254+49:12 name xs
255+50:11 INDENT
256+50:11 lit ~
257+50:13 lit ~
258+51:11 NEWLINE
259+51:11 glyph [
260+51:12 tight name item
261+51:17 name rest
262+51:21 tight glyph ]
263+51:23 glyph [
264+51:24 tight glyph (
265+51:25 tight name f
266+51:27 name item
267+51:31 tight glyph )
268+51:33 glyph (
269+51:34 tight name turn
270+51:39 name rest
271+51:44 name f
272+51:45 tight glyph )
273+51:46 tight glyph ]
274+53:1 DEDENT
275+53:1 DEDENT
276+53:1 DEDENT
277+53:1 DEDENT
278+53:1 DEDENT
27627953:1 NEWLINE
27728053:1 glyph +$
278−53:4 name hair
281+53:4 name dime
27928253:9 glyph [
28028353:10 tight name p
28128453:11 tight glyph =
282−53:12 tight aura @ud
285+53:12 tight aura @ta
28328653:16 name q
28428753:17 tight glyph =
285−53:18 tight aura @ud
286−53:21 tight glyph ]
288+53:18 tight aura @
289+53:19 tight glyph ]
28729055:1 NEWLINE
28829155:1 glyph +$
289−55:4 name pint
292+55:4 name hair
29029355:9 glyph [
29129455:10 tight name p
29229555: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 ]
296+55:12 tight aura @ud
297+55:16 name q
298+55:17 tight glyph =
299+55:18 tight aura @ud
300+55:21 tight glyph ]
31230157:1 NEWLINE
31330257: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
303+57:4 name pint
304+57:9 glyph [
305+57:10 tight name p
306+57:11 tight glyph =
307+57:12 tight glyph [
308+57:13 tight name p
309+57:14 tight glyph =
310+57:15 tight aura @
311+57:17 name q
312+57:18 tight glyph =
313+57:19 tight aura @
314+57:20 tight glyph ]
315+57:22 name q
316+57:23 tight glyph =
317+57:24 tight glyph [
318+57:25 tight name p
319+57:26 tight glyph =
320+57:27 tight aura @
321+57:29 name q
322+57:30 tight glyph =
323+57:31 tight aura @
324+57:32 tight glyph ]
325+57:33 tight glyph ]
326+59:1 NEWLINE
327+59:1 glyph +$
328+59:4 name coin
329+60:3 INDENT
33033060: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 ]
331+60:4 tight lit %$
332+60:7 name p
333+60:8 tight glyph =
334+60:9 tight name dime
335+60:13 tight glyph ]
336+61:3 NEWLINE
337+61:3 glyph [
338+61:4 tight lit %blob
339+61:10 name p
340+61:11 tight glyph =
341+61:12 tight glyph *
342+61:13 tight glyph ]
343+62:3 NEWLINE
344+62:3 glyph [
345+62:4 tight lit %many
346+62:10 name p
347+62:11 tight glyph =
348+62:12 tight glyph (
349+62:13 tight name list
350+62:18 name coin
351+62:22 tight glyph )
352+62:23 tight glyph ]
353+64:1 DEDENT
35635464:1 NEWLINE
35735564:1 glyph +$
358−64:4 name trel
356+64:4 name pair
35935764:9 glyph |$
36035864:12 glyph [
36135964:13 tight tvar A
36236064: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 ]
361+64:16 tight glyph ]
362+64:18 glyph [
363+64:19 tight name p
364+64:20 tight glyph =
365+64:21 tight tvar A
366+64:23 name q
367+64:24 tight glyph =
368+64:25 tight tvar B
369+64:26 tight glyph ]
37637066:1 NEWLINE
37737166:1 glyph +$
378−66:4 name qual
372+66:4 name trel
37937366:9 glyph |$
38037466:12 glyph [
38137566:13 tight tvar A
38237666:15 tvar B
38337766: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 ]
378+66:18 tight glyph ]
379+66:20 glyph [
380+66:21 tight name p
381+66:22 tight glyph =
382+66:23 tight tvar A
383+66:25 name q
384+66:26 tight glyph =
385+66:27 tight tvar B
386+66:29 name r
387+66:30 tight glyph =
388+66:31 tight tvar C
389+66:32 tight glyph ]
40039068:1 NEWLINE
40139168:1 glyph +$
402−68:4 name cord
403−68:9 aura @t
392+68:4 name qual
393+68:9 glyph |$
394+68:12 glyph [
395+68:13 tight tvar A
396+68:15 tvar B
397+68:17 tvar C
398+68:19 tvar D
399+68:20 tight glyph ]
400+68:22 glyph [
401+68:23 tight name p
402+68:24 tight glyph =
403+68:25 tight tvar A
404+68:27 name q
405+68:28 tight glyph =
406+68:29 tight tvar B
407+68:31 name r
408+68:32 tight glyph =
409+68:33 tight tvar C
410+68:35 name s
411+68:36 tight glyph =
412+68:37 tight tvar D
413+68:38 tight glyph ]
40441470:1 NEWLINE
40541570:1 glyph +$
406−70:4 name knot
407−70:9 aura @ta
416+70:4 name cord
417+70:9 aura @t
40841872:1 NEWLINE
40941972: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 )
420+72:4 name knot
421+72:9 aura @ta
41542274:1 NEWLINE
41642374:1 glyph +$
417−74:4 name path
424+74:4 name tape
41842574:9 glyph (
41942674:10 tight name list
420−74:15 name knot
421−74:19 tight glyph )
427+74:15 aura @tD
428+74:18 tight glyph )
42242976:1 NEWLINE
42343076: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 ]
431+76:4 name path
432+76:9 glyph (
433+76:10 tight name list
434+76:15 name knot
435+76:19 tight glyph )
436+78:1 NEWLINE
437+78:1 glyph +$
438+78:4 name tank
439+79:3 INDENT
440+79:3 name cord
45344180:3 NEWLINE
45444280:3 glyph [
455−80:4 tight lit %rose
443+80:4 tight lit %leaf
45644480:10 name p
45744580: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
446+80:12 tight name tape
447+80:16 tight glyph ]
448+81:3 NEWLINE
449+81:3 glyph [
450+81:4 tight lit %palm
451+81:10 name p
452+81:11 tight glyph =
453+81:12 tight glyph (
454+81:13 tight name qual
455+81:18 name tape
456+81:23 name tape
457+81:28 name tape
458+81:33 name tape
459+81:37 tight glyph )
460+81:39 name q
461+81:40 tight glyph =
462+81:41 tight glyph (
463+81:42 tight name list
464+81:47 name tank
465+81:51 tight glyph )
466+81:52 tight glyph ]
467+82:3 NEWLINE
468+82:3 glyph [
469+82:4 tight lit %rose
470+82:10 name p
47747182: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 ]
472+82:12 tight glyph (
473+82:13 tight name trel
474+82:18 name tape
475+82:23 name tape
476+82:28 name tape
477+82:32 tight glyph )
478+82:34 name q
479+82:35 tight glyph =
480+82:36 tight glyph (
481+82:37 tight name list
482+82:42 name tank
483+82:46 tight glyph )
484+82:47 tight glyph ]
485+84:1 DEDENT
48348684:1 NEWLINE
48448784:1 glyph +$
485−84:4 name edge
488+84:4 name nail
48648984:9 glyph [
48749084:10 tight name p
48849184:11 tight glyph =
48949284:12 tight name hair
49049384:17 name q
49149484: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 ]
495+84:19 tight name tape
496+84:23 tight glyph ]
50449786:1 NEWLINE
50549886: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 )
499+86:4 name edge
500+86:9 glyph [
501+86:10 tight name p
502+86:11 tight glyph =
503+86:12 tight name hair
504+86:17 name q
505+86:18 tight glyph =
506+86:19 tight glyph (
507+86:20 tight name unit
508+86:25 glyph [
509+86:26 tight name p
510+86:27 tight glyph =
511+86:28 tight glyph *
512+86:30 name q
513+86:31 tight glyph =
514+86:32 tight name nail
515+86:36 tight glyph ]
516+86:37 tight glyph )
517+86:38 tight glyph ]
51151888:1 NEWLINE
51251988: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 ]
520+88:4 name rule
521+88:9 glyph $-(
522+88:12 tight name nail
523+88:17 name edge
524+88:21 tight glyph )
52252590:1 NEWLINE
52352690: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
527+90:4 name spot
528+90:9 glyph [
529+90:10 tight name p
530+90:11 tight glyph =
531+90:12 tight name path
532+90:17 name q
533+90:18 tight glyph =
534+90:19 tight name pint
535+90:23 tight glyph ]
536+92:1 NEWLINE
537+92:1 glyph +$
538+92:4 name toon
539+93:3 INDENT
54054093:3 glyph [
541−93:4 tight lit %2
541+93:4 tight lit %0
54254293:7 name p
54354393: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 ]
544+93:9 tight glyph *
545+93:10 tight glyph ]
546+94:3 NEWLINE
547+94:3 glyph [
548+94:4 tight lit %1
549+94:7 name p
550+94:8 tight glyph =
551+94:9 tight glyph *
552+94:10 tight glyph ]
553+95:3 NEWLINE
554+95:3 glyph [
555+95:4 tight lit %2
556+95:7 name p
557+95:8 tight glyph =
558+95:9 tight glyph (
559+95:10 tight name list
560+95:15 name tank
561+95:19 tight glyph )
562+95:20 tight glyph ]
563+97:1 DEDENT
57556497: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 ]
565+97:1 glyph +$
566+97:4 name like
567+97:9 glyph |$
568+97:12 glyph [
569+97:13 tight tvar A
570+97:14 tight glyph ]
571+97:16 glyph [
572+97:17 tight name p
573+97:18 tight glyph =
574+97:19 tight name hair
575+97:24 name q
576+97:25 tight glyph =
577+97:26 tight glyph (
578+97:27 tight name unit
579+97:32 glyph [
580+97:33 tight name p
581+97:34 tight glyph =
582+97:35 tight tvar A
583+97:37 name q
584+97:38 tight glyph =
585+97:39 tight name nail
586+97:43 tight glyph ]
587+97:44 tight glyph )
588+97:45 tight glyph ]
589+99:1 NEWLINE
590+99:1 glyph ++
591+99:4 name wonk
592+99:9 glyph |=
593+99:12 name veq
594+99:15 tight glyph =
595+99:16 tight glyph (
596+99:17 tight name like
597+99:22 tvar A
598+99:23 tight glyph )
599+100:3 INDENT
600+100:3 glyph ?-
601+100:6 wing q.veq
602+101:5 INDENT
603+101:5 lit ~
604+101:7 glyph !!
605+102:5 NEWLINE
606+102:5 glyph [
607+102:6 tight lit ~
608+102:8 name product
609+102:15 tight glyph ]
610+102:17 wing p.product
611+104:1 DEDENT
612+104:1 DEDENT
611613104:1 NEWLINE
612614104:1 glyph +$
613−104:4 name lest
615+104:4 name lone
614616104:9 glyph |$
615617104:12 glyph [
616618104:13 tight tvar A
617619104:14 tight glyph ]
618620104:16 glyph [
619−104:17 tight name i
621+104:17 tight name p
620622104:18 tight glyph =
621623104: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 ]
624+104:20 tight glyph ]
629625106:1 NEWLINE
630626106:1 glyph +$
631−106:4 name pole
627+106:4 name lest
632628106:9 glyph |$
633629106:12 glyph [
634630106:13 tight tvar A
635631106: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 )
632+106:16 glyph [
633+106:17 tight name i
634+106:18 tight glyph =
635+106:19 tight tvar A
636+106:21 name t
637+106:22 tight glyph =
638+106:23 tight glyph (
639+106:24 tight name list
640+106:29 tvar A
641+106:30 tight glyph )
642+106:31 tight glyph ]
643+108:1 NEWLINE
644+108:1 glyph +$
645+108:4 name pole
646+108:9 glyph |$
647+108:12 glyph [
648+108:13 tight tvar A
645649108: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 ]
650+109:3 INDENT
651+109:3 lit ~
652+110:3 NEWLINE
653+110:3 glyph [
654+110:4 tight tvar A
655+110:6 glyph (
656+110:7 tight name pole
657+110:12 tvar A
658+110:13 tight glyph )
659+110:14 tight glyph ]
660+112:1 DEDENT
662661112:1 NEWLINE
663662112:1 glyph +$
664−112:4 name tree
663+112:4 name quip
665664112:9 glyph |$
666665112:12 glyph [
667666112: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 @
667+112:15 tvar B
668+112:16 tight glyph ]
669+112:18 glyph [
670+112:19 tight glyph (
671+112:20 tight name list
672+112:25 tvar A
673+112:26 tight glyph )
674+112:28 tvar B
675+112:29 tight glyph ]
676+114:1 NEWLINE
677+114:1 glyph +$
678+114:4 name tree
679+114:9 glyph |$
680+114:12 glyph [
681+114:13 tight tvar A
682+114:14 tight glyph ]
683+115:3 INDENT
684+115:3 lit ~
685+116:3 NEWLINE
686+116:3 glyph [
687+116:4 tight name n
688+116:5 tight glyph =
689+116:6 tight tvar A
690+116:8 name l
691+116:9 tight glyph =
692+116:10 tight glyph (
693+116:11 tight name tree
694+116:16 tvar A
695+116:17 tight glyph )
696+116:19 name r
697+116:20 tight glyph =
698+116:21 tight glyph (
699+116:22 tight name tree
700+116:27 tvar A
701+116:28 tight glyph )
702+116:29 tight glyph ]
703+118:1 DEDENT
704+118:1 NEWLINE
705+118:1 glyph +$
706+118:4 name each
707+118:9 glyph |$
708+118:12 glyph [
709+118:13 tight tvar A
710+118:15 tvar B
711+118:16 tight glyph ]
712+119:3 INDENT
713+119:3 glyph [
714+119:4 tight lit %|
715+119:7 name p
716+119:8 tight glyph =
717+119:9 tight tvar B
718+119:10 tight glyph ]
719+120:3 NEWLINE
720+120:3 glyph [
721+120:4 tight lit %&
722+120:7 name p
723+120:8 tight glyph =
724+120:9 tight tvar A
725+120:10 tight glyph ]
726+122:1 DEDENT
717727122:1 NEWLINE
718−122:1 glyph ++
719−122:4 name some
720−122:9 glyph |=
721−122:12 name item
722−122:16 tight glyph =
723−122:17 tight tvar A
724−122:19 glyph `
725−122:20 tight name item
728+122:1 glyph +$
729+122:4 name bloq
730+122:9 aura @
726731124:1 NEWLINE
727732124:1 glyph ++
728−124:4 name lure
733+124:4 name some
729734124:9 glyph |=
730735124:12 name item
731736124:16 tight glyph =
732737124:17 tight tvar A
733−125:3 INDENT
734−125:3 glyph ^-
735−125:6 glyph (
736−125:7 tight name list
737−125:12 tvar A
738−125:13 tight glyph )
739−125:15 glyph [
740−125:16 tight name item
741−125:21 lit ~
742−125:22 tight glyph ]
743−127:1 DEDENT
744−127:1 NEWLINE
745−127:1 glyph ++
746−127:4 name snoc
747−127:9 glyph |=
748−127:12 name args
749−127:16 tight glyph =
750−127:17 tight glyph [
751−127:18 tight glyph (
752−127:19 tight name list
753−127:24 tvar A
754−127:25 tight glyph )
755−127:27 tvar A
756−127:28 tight glyph ]
757−128:3 INDENT
758−128:3 glyph ?-
759−128:6 name args
760−129:5 INDENT
761−129:5 glyph [
762−129:6 tight name xs
763−129:9 name item
764−129:13 tight glyph ]
765−129:15 glyph (
766−129:16 tight name weld
767−129:21 name xs
768−129:24 glyph [
769−129:25 tight name item
770−129:30 lit ~
771−129:31 tight glyph ]
772−129:32 tight glyph )
773−131:1 DEDENT
774−131:1 DEDENT
775−131:1 NEWLINE
776−131:1 glyph ++
777−131:4 name flop
778−131:9 glyph |=
779−131:12 name xs
780−131:14 tight glyph =
781−131:15 tight glyph (
782−131:16 tight name list
783−131:21 tvar A
784−131:22 tight glyph )
785−132:3 INDENT
786−132:3 glyph ++
787−132:6 name reverse-into
788−132:19 glyph |=
789−132:22 name args
790−132:26 tight glyph =
791−132:27 tight glyph [
792−132:28 tight glyph (
793−132:29 tight name list
794−132:34 tvar A
795−132:35 tight glyph )
796−132:37 glyph (
797−132:38 tight name list
798−132:43 tvar A
799−132:44 tight glyph )
800−132:45 tight glyph ]
801−133:5 INDENT
802−133:5 glyph ?-
803−133:8 name args
804−134:7 INDENT
805−134:7 glyph [
806−134:8 tight name rest
807−134:13 name acc
808−134:16 tight glyph ]
809−135:9 INDENT
810−135:9 glyph ?-
811−135:12 name rest
812−136:11 INDENT
813−136:11 lit ~
738+124:19 glyph `
739+124:20 tight name item
740+126:1 NEWLINE
741+126:1 glyph ++
742+126:4 name lure
743+126:9 glyph |=
744+126:12 name item
745+126:16 tight glyph =
746+126:17 tight tvar A
747+127:3 INDENT
748+127:3 glyph ^-
749+127:6 glyph (
750+127:7 tight name list
751+127:12 tvar A
752+127:13 tight glyph )
753+127:15 glyph [
754+127:16 tight name item
755+127:21 lit ~
756+127:22 tight glyph ]
757+129:1 DEDENT
758+129:1 NEWLINE
759+129:1 glyph ++
760+129:4 name snoc
761+129:9 glyph |=
762+129:12 name args
763+129:16 tight glyph =
764+129:17 tight glyph [
765+129:18 tight glyph (
766+129:19 tight name list
767+129:24 tvar A
768+129:25 tight glyph )
769+129:27 tvar A
770+129:28 tight glyph ]
771+130:3 INDENT
772+130:3 glyph ?-
773+130:6 name args
774+131:5 INDENT
775+131:5 glyph [
776+131:6 tight name xs
777+131:9 name item
778+131:13 tight glyph ]
779+131:15 glyph (
780+131:16 tight name weld
781+131:21 name xs
782+131:24 glyph [
783+131:25 tight name item
784+131:30 lit ~
785+131:31 tight glyph ]
786+131:32 tight glyph )
787+133:1 DEDENT
788+133:1 DEDENT
789+133:1 NEWLINE
790+133:1 glyph ++
791+133:4 name flop
792+133:9 glyph |=
793+133:12 name xs
794+133:14 tight glyph =
795+133:15 tight glyph (
796+133:16 tight name list
797+133:21 tvar A
798+133:22 tight glyph )
799+134:3 INDENT
800+134:3 glyph ++
801+134:6 name reverse-into
802+134:19 glyph |=
803+134:22 name args
804+134:26 tight glyph =
805+134:27 tight glyph [
806+134:28 tight glyph (
807+134:29 tight name list
808+134:34 tvar A
809+134:35 tight glyph )
810+134:37 glyph (
811+134:38 tight name list
812+134:43 tvar A
813+134:44 tight glyph )
814+134:45 tight glyph ]
815+135:5 INDENT
816+135:5 glyph ?-
817+135:8 name args
818+136:7 INDENT
819+136:7 glyph [
820+136:8 tight name rest
814821136:13 name acc
815−137:11 NEWLINE
816−137:11 glyph [
817−137:12 tight name item
818−137:17 name more
819−137:21 tight glyph ]
820−137:23 glyph (
821−137:24 tight name reverse-into
822−137:37 name more
823−137:42 glyph [
824−137:43 tight name item
825−137:48 name acc
826−137:51 tight glyph ]
827−137:52 tight glyph )
828−138:3 DEDENT
829−138:3 DEDENT
830−138:3 DEDENT
831−138:3 DEDENT
832−138:3 NEWLINE
833−138:3 glyph (
834−138:4 tight name reverse-into
835−138:17 name xs
836−138:20 lit ~
837−138:21 tight glyph )
838−138:22 DEDENT
839−138:22 NEWLINE
822+136:16 tight glyph ]
823+137:9 INDENT
824+137:9 glyph ?-
825+137:12 name rest
826+138:11 INDENT
827+138:11 lit ~
828+138:13 name acc
829+139:11 NEWLINE
830+139:11 glyph [
831+139:12 tight name item
832+139:17 name more
833+139:21 tight glyph ]
834+139:23 glyph (
835+139:24 tight name reverse-into
836+139:37 name more
837+139:42 glyph [
838+139:43 tight name item
839+139:48 name acc
840+139:51 tight glyph ]
841+139:52 tight glyph )
842+140:3 DEDENT
843+140:3 DEDENT
844+140:3 DEDENT
845+140:3 DEDENT
846+140:3 NEWLINE
847+140:3 glyph (
848+140:4 tight name reverse-into
849+140:17 name xs
850+140:20 lit ~
851+140:21 tight glyph )
852+140:22 DEDENT
853+140:22 NEWLINE
tests/golden/prelude-list-helpers/tree.txt+245−239
@@ -87,254 +87,260 @@
8787 (arm 39:5
8888 (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
8989 (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
90+ (cast 40:7
91+ (apply 40:10 list (tvar 40:16 A))
92+ (body 41:9
93+ (branch 41:9
94+ (wing 41:12 xs)
95+ (arm 42:11 (lit 42:11 ~) (wing 42:13 ys))
96+ (arm 43:11
97+ (cell 43:11 (bind 43:12 item) (bind 43:17 rest))
98+ (tuple 43:23
99+ (wing 43:24 item)
100+ (group 43:29
101+ (call 43:30 (wing 43:30 weld) (wing 43:35 rest) (wing 43:40 ys))))))))))))))
102+ (value 45:1 turn
103+ (gate 45:9
104+ (face 45:12 args
105+ (cell 45:17
106+ (apply 45:18 list (tvar 45:24 A))
107+ (fn 45:27 (tvar 45:30 A) (tvar 45:32 B))))
108+ (body 46:3
109+ (branch 46:3
110+ (wing 46:6 args)
111+ (arm 47:5
112+ (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
113+ (body 48:7
114+ (cast 48:7
115+ (apply 48:10 list (tvar 48:16 B))
116+ (body 49:9
117+ (branch 49:9
118+ (wing 49:12 xs)
119+ (arm 50:11 (lit 50:11 ~) (lit 50:13 ~))
120+ (arm 51:11
121+ (cell 51:11 (bind 51:12 item) (bind 51:17 rest))
122+ (tuple 51:23
123+ (group 51:24
124+ (call 51:25 (wing 51:25 f) (wing 51:27 item)))
125+ (group 51:33
126+ (call 51:34 (wing 51:34 turn) (wing 51:39 rest) (wing 51:44 f))))))))))))))
127+ (mold 53:1 dime
126128 (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
129+ (face 53:10 p (aura 53:12 @ta))
130+ (face 53:16 q (aura 53:18 @))))
131+ (mold 55:1 hair
130132 (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)))
133+ (face 55:10 p (aura 55:12 @ud))
134+ (face 55:16 q (aura 55:18 @ud))))
135+ (mold 57:1 pint
136+ (cell 57:9
137+ (face 57:10 p
138+ (cell 57:12
139+ (face 57:13 p (aura 57:15 @))
140+ (face 57:17 q (aura 57:19 @))))
141+ (face 57:22 q
142+ (cell 57:24
143+ (face 57:25 p (aura 57:27 @))
144+ (face 57:29 q (aura 57:31 @))))))
145+ (mold 59:1 coin
146+ (union 60:3
147147 (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))))
148+ (const 60:4 %$)
149+ (face 60:7 p (ref 60:9 dime)))
150+ (cell 61:3
151+ (const 61:4 %blob)
152+ (face 61:10 p (noun 61:12)))
153+ (cell 62:3
154+ (const 62:4 %many)
155+ (face 62:10 p
156+ (apply 62:12 list (ref 62:18 coin))))))
157+ (mold 64:1 pair
158+ (generic 64:9 A B
159+ (cell 64:18
160+ (face 64:19 p (tvar 64:21 A))
161+ (face 64:23 q (tvar 64:25 B)))))
162+ (mold 66:1 trel
163+ (generic 66:9 A B C
164+ (cell 66:20
165+ (face 66:21 p (tvar 66:23 A))
166+ (face 66:25 q (tvar 66:27 B))
167+ (face 66:29 r (tvar 66:31 C)))))
168+ (mold 68:1 qual
169+ (generic 68:9 A B C D
170+ (cell 68:22
171+ (face 68:23 p (tvar 68:25 A))
172+ (face 68:27 q (tvar 68:29 B))
173+ (face 68:31 r (tvar 68:33 C))
174+ (face 68:35 s (tvar 68:37 D)))))
175+ (mold 70:1 cord (aura 70:9 @t))
176+ (mold 72:1 knot (aura 72:9 @ta))
177+ (mold 74:1 tape
178+ (apply 74:9 list (aura 74:15 @tD)))
179+ (mold 76:1 path
180+ (apply 76:9 list (ref 76:15 knot)))
181+ (mold 78:1 tank
182+ (union 79:3
183+ (ref 79:3 cord)
187184 (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
185+ (const 80:4 %leaf)
186+ (face 80:10 p (ref 80:12 tape)))
187+ (cell 81:3
188+ (const 81:4 %palm)
189+ (face 81:10 p
190+ (apply 81:12 qual (ref 81:18 tape) (ref 81:23 tape) (ref 81:28 tape) (ref 81:33 tape)))
191+ (face 81:39 q
192+ (apply 81:41 list (ref 81:47 tank))))
193+ (cell 82:3
194+ (const 82:4 %rose)
195+ (face 82:10 p
196+ (apply 82:12 trel (ref 82:18 tape) (ref 82:23 tape) (ref 82:28 tape)))
197+ (face 82:34 q
198+ (apply 82:36 list (ref 82:42 tank))))))
199+ (mold 84:1 nail
198200 (cell 84:9
199201 (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)))
202+ (face 84:17 q (ref 84:19 tape))))
203+ (mold 86:1 edge
204+ (cell 86:9
205+ (face 86:10 p (ref 86:12 hair))
206+ (face 86:17 q
207+ (apply 86:19 unit
208+ (cell 86:25
209+ (face 86:26 p (noun 86:28))
210+ (face 86:30 q (ref 86:32 nail)))))))
211+ (mold 88:1 rule
212+ (fn 88:9 (ref 88:12 nail) (ref 88:17 edge)))
213+ (mold 90:1 spot
214+ (cell 90:9
215+ (face 90:10 p (ref 90:12 path))
216+ (face 90:17 q (ref 90:19 pint))))
217+ (mold 92:1 toon
218+ (union 93:3
219219 (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
220+ (const 93:4 %0)
221+ (face 93:7 p (noun 93:9)))
222+ (cell 94:3
223+ (const 94:4 %1)
224+ (face 94:7 p (noun 94:9)))
225+ (cell 95:3
226+ (const 95:4 %2)
227+ (face 95:7 p
228+ (apply 95:9 list (ref 95:15 tank))))))
229+ (mold 97:1 like
230+ (generic 97:9 A
231+ (cell 97:16
232+ (face 97:17 p (ref 97:19 hair))
233+ (face 97:24 q
234+ (apply 97:26 unit
235+ (cell 97:32
236+ (face 97:33 p (tvar 97:35 A))
237+ (face 97:37 q (ref 97:39 nail))))))))
238+ (value 99:1 wonk
239+ (gate 99:9
240+ (face 99:12 veq
241+ (apply 99:16 like (tvar 99:22 A)))
242+ (body 100:3
243+ (branch 100:3
244+ (wing 100:6 q.veq)
245+ (arm 101:5 (lit 101:5 ~) (crash 101:7))
246+ (arm 102:5
247+ (cell 102:5 (lit 102:6 ~) (bind 102:8 product))
248+ (wing 102:17 p.product))))))
249+ (mold 104:1 lone
248250 (generic 104:9 A
249251 (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
252+ (face 104:17 p (tvar 104:19 A)))))
253+ (mold 106:1 lest
254254 (generic 106:9 A
255− (union 107:3
256− (const 107:3 ~)
257− (cell 108:3
258− (tvar 108:4 A)
259− (apply 108:6 pole (tvar 108:12 A))))))
260− (mold 110:1 quip
261− (generic 110:9 A B
262− (cell 110:18
263− (apply 110:19 list (tvar 110:25 A))
264− (tvar 110:28 B))))
265− (mold 112:1 tree
266− (generic 112:9 A
267− (union 113:3
268− (const 113:3 ~)
269− (cell 114:3
270− (face 114:4 n (tvar 114:6 A))
271− (face 114:8 l
272− (apply 114:10 tree (tvar 114:16 A)))
273− (face 114:19 r
274− (apply 114:21 tree (tvar 114:27 A)))))))
275− (mold 116:1 each
276− (generic 116:9 A B
277− (union 117:3
278− (cell 117:3
279− (const 117:4 %|)
280− (face 117:7 p (tvar 117:9 B)))
281− (cell 118:3
282− (const 118:4 %&)
283− (face 118:7 p (tvar 118:9 A))))))
284− (mold 120:1 bloq (aura 120:9 @))
285− (value 122:1 some
286− (gate 122:9
287− (face 122:12 item (tvar 122:17 A))
288− (unit 122:19 (wing 122:20 item))))
289− (value 124:1 lure
255+ (cell 106:16
256+ (face 106:17 i (tvar 106:19 A))
257+ (face 106:21 t
258+ (apply 106:23 list (tvar 106:29 A))))))
259+ (mold 108:1 pole
260+ (generic 108:9 A
261+ (union 109:3
262+ (const 109:3 ~)
263+ (cell 110:3
264+ (tvar 110:4 A)
265+ (apply 110:6 pole (tvar 110:12 A))))))
266+ (mold 112:1 quip
267+ (generic 112:9 A B
268+ (cell 112:18
269+ (apply 112:19 list (tvar 112:25 A))
270+ (tvar 112:28 B))))
271+ (mold 114:1 tree
272+ (generic 114:9 A
273+ (union 115:3
274+ (const 115:3 ~)
275+ (cell 116:3
276+ (face 116:4 n (tvar 116:6 A))
277+ (face 116:8 l
278+ (apply 116:10 tree (tvar 116:16 A)))
279+ (face 116:19 r
280+ (apply 116:21 tree (tvar 116:27 A)))))))
281+ (mold 118:1 each
282+ (generic 118:9 A B
283+ (union 119:3
284+ (cell 119:3
285+ (const 119:4 %|)
286+ (face 119:7 p (tvar 119:9 B)))
287+ (cell 120:3
288+ (const 120:4 %&)
289+ (face 120:7 p (tvar 120:9 A))))))
290+ (mold 122:1 bloq (aura 122:9 @))
291+ (value 124:1 some
290292 (gate 124:9
291293 (face 124:12 item (tvar 124:17 A))
292− (body 125:3
293− (cast 125:3
294− (apply 125:6 list (tvar 125:12 A))
295− (tuple 125:15 (wing 125:16 item) (lit 125:21 ~))))))
296− (value 127:1 snoc
297− (gate 127:9
298− (face 127:12 args
299− (cell 127:17
300− (apply 127:18 list (tvar 127:24 A))
301− (tvar 127:27 A)))
302− (body 128:3
303− (branch 128:3
304− (wing 128:6 args)
305− (arm 129:5
306− (cell 129:5 (bind 129:6 xs) (bind 129:9 item))
307− (group 129:15
308− (call 129:16
309− (wing 129:16 weld)
310− (wing 129:21 xs)
311− (tuple 129:24 (wing 129:25 item) (lit 129:30 ~)))))))))
312− (value 131:1 flop
313− (gate 131:9
314− (face 131:12 xs
315− (apply 131:15 list (tvar 131:21 A)))
316− (body 132:3
317− (value 132:3 reverse-into
318− (gate 132:19
319− (face 132:22 args
320− (cell 132:27
321− (apply 132:28 list (tvar 132:34 A))
322− (apply 132:37 list (tvar 132:43 A))))
323− (body 133:5
324− (branch 133:5
325− (wing 133:8 args)
326− (arm 134:7
327− (cell 134:7 (bind 134:8 rest) (bind 134:13 acc))
328− (body 135:9
329− (branch 135:9
330− (wing 135:12 rest)
331− (arm 136:11 (lit 136:11 ~) (wing 136:13 acc))
332− (arm 137:11
333− (cell 137:11 (bind 137:12 item) (bind 137:17 more))
334− (group 137:23
335− (call 137:24
336− (wing 137:24 reverse-into)
337− (wing 137:37 more)
338− (tuple 137:42 (wing 137:43 item) (wing 137:48 acc))))))))))))
339− (group 138:3
340− (call 138:4 (wing 138:4 reverse-into) (wing 138:17 xs) (lit 138:20 ~)))))))
294+ (unit 124:19 (wing 124:20 item))))
295+ (value 126:1 lure
296+ (gate 126:9
297+ (face 126:12 item (tvar 126:17 A))
298+ (body 127:3
299+ (cast 127:3
300+ (apply 127:6 list (tvar 127:12 A))
301+ (tuple 127:15 (wing 127:16 item) (lit 127:21 ~))))))
302+ (value 129:1 snoc
303+ (gate 129:9
304+ (face 129:12 args
305+ (cell 129:17
306+ (apply 129:18 list (tvar 129:24 A))
307+ (tvar 129:27 A)))
308+ (body 130:3
309+ (branch 130:3
310+ (wing 130:6 args)
311+ (arm 131:5
312+ (cell 131:5 (bind 131:6 xs) (bind 131:9 item))
313+ (group 131:15
314+ (call 131:16
315+ (wing 131:16 weld)
316+ (wing 131:21 xs)
317+ (tuple 131:24 (wing 131:25 item) (lit 131:30 ~)))))))))
318+ (value 133:1 flop
319+ (gate 133:9
320+ (face 133:12 xs
321+ (apply 133:15 list (tvar 133:21 A)))
322+ (body 134:3
323+ (value 134:3 reverse-into
324+ (gate 134:19
325+ (face 134:22 args
326+ (cell 134:27
327+ (apply 134:28 list (tvar 134:34 A))
328+ (apply 134:37 list (tvar 134:43 A))))
329+ (body 135:5
330+ (branch 135:5
331+ (wing 135:8 args)
332+ (arm 136:7
333+ (cell 136:7 (bind 136:8 rest) (bind 136:13 acc))
334+ (body 137:9
335+ (branch 137:9
336+ (wing 137:12 rest)
337+ (arm 138:11 (lit 138:11 ~) (wing 138:13 acc))
338+ (arm 139:11
339+ (cell 139:11 (bind 139:12 item) (bind 139:17 more))
340+ (group 139:23
341+ (call 139:24
342+ (wing 139:24 reverse-into)
343+ (wing 139:37 more)
344+ (tuple 139:42 (wing 139:43 item) (wing 139:48 acc))))))))))))
345+ (group 140:3
346+ (call 140:4 (wing 140:4 reverse-into) (wing 140:17 xs) (lit 140:20 ~)))))))
tests/golden/prelude-list-helpers/types.txt+3−3
@@ -5,8 +5,8 @@ partial inference; module not checked
55++ not: $-(? ?)
66+$ list: cases proven disjoint; mold not checked
77+$ 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
8+++ fall: $-([(unit A) A] A)
9+++ need: $-((unit A) A)
1010++ weld: sample mold is not supported by partial inference
1111++ turn: sample mold is not supported by partial inference
1212+$ dime: not checked
@@ -35,7 +35,7 @@ partial inference; module not checked
3535+$ tree: cases proven disjoint; mold not checked
3636+$ each: cases proven disjoint; mold not checked
3737+$ bloq: not checked
38−++ some: expression is not supported by partial inference
38+++ some: unit construction needs the standard prelude in partial inference
3939++ lure: cast mold is not supported by partial inference
4040++ snoc: sample mold is not supported by partial inference
4141++ flop: sample mold is not supported by partial inference
tests/golden/prelude-list-unit/source.jibb+8−6
@@ -37,13 +37,15 @@
3737++ weld |= args=[(list A) (list A)]
3838 ?- args
3939 [xs ys]
40− ?- xs
41− ~ ys
42− [item rest] [item (weld rest ys)]
40+ ^- (list A)
41+ ?- xs
42+ ~ ys
43+ [item rest] [item (weld rest ys)]
4344
4445++ turn |= args=[(list A) $-(A B)]
4546 ?- args
4647 [xs f]
47− ?- xs
48− ~ ~
49− [item rest] [(f item) (turn rest f)]
48+ ^- (list B)
49+ ?- xs
50+ ~ ~
51+ [item rest] [(f item) (turn rest f)]
tests/golden/prelude-list-unit/tokens.txt+86−72
@@ -190,76 +190,90 @@
19019039:9 name ys
19119139:11 tight glyph ]
19219240:7 INDENT
193−40:7 glyph ?-
194−40:10 name xs
193+40:7 glyph ^-
194+40:10 glyph (
195+40:11 tight name list
196+40:16 tvar A
197+40:17 tight glyph )
19519841: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−49:45 DEDENT
262−49:45 DEDENT
263−49:45 DEDENT
264−49:45 DEDENT
265−49:45 NEWLINE
199+41:9 glyph ?-
200+41:12 name xs
201+42:11 INDENT
202+42:11 lit ~
203+42:13 name ys
204+43:11 NEWLINE
205+43:11 glyph [
206+43:12 tight name item
207+43:17 name rest
208+43:21 tight glyph ]
209+43:23 glyph [
210+43:24 tight name item
211+43:29 glyph (
212+43:30 tight name weld
213+43:35 name rest
214+43:40 name ys
215+43:42 tight glyph )
216+43:43 tight glyph ]
217+45:1 DEDENT
218+45:1 DEDENT
219+45:1 DEDENT
220+45:1 DEDENT
221+45:1 DEDENT
222+45:1 NEWLINE
223+45:1 glyph ++
224+45:4 name turn
225+45:9 glyph |=
226+45:12 name args
227+45:16 tight glyph =
228+45:17 tight glyph [
229+45:18 tight glyph (
230+45:19 tight name list
231+45:24 tvar A
232+45:25 tight glyph )
233+45:27 glyph $-(
234+45:30 tight tvar A
235+45:32 tvar B
236+45:33 tight glyph )
237+45:34 tight glyph ]
238+46:3 INDENT
239+46:3 glyph ?-
240+46:6 name args
241+47:5 INDENT
242+47:5 glyph [
243+47:6 tight name xs
244+47:9 name f
245+47:10 tight glyph ]
246+48:7 INDENT
247+48:7 glyph ^-
248+48:10 glyph (
249+48:11 tight name list
250+48:16 tvar B
251+48:17 tight glyph )
252+49:9 INDENT
253+49:9 glyph ?-
254+49:12 name xs
255+50:11 INDENT
256+50:11 lit ~
257+50:13 lit ~
258+51:11 NEWLINE
259+51:11 glyph [
260+51:12 tight name item
261+51:17 name rest
262+51:21 tight glyph ]
263+51:23 glyph [
264+51:24 tight glyph (
265+51:25 tight name f
266+51:27 name item
267+51:31 tight glyph )
268+51:33 glyph (
269+51:34 tight name turn
270+51:39 name rest
271+51:44 name f
272+51:45 tight glyph )
273+51:46 tight glyph ]
274+51:47 DEDENT
275+51:47 DEDENT
276+51:47 DEDENT
277+51:47 DEDENT
278+51:47 DEDENT
279+51:47 NEWLINE
tests/golden/prelude-list-unit/tree.txt+37−31
@@ -87,34 +87,40 @@
8787 (arm 39:5
8888 (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
8989 (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)))))))))))))
90+ (cast 40:7
91+ (apply 40:10 list (tvar 40:16 A))
92+ (body 41:9
93+ (branch 41:9
94+ (wing 41:12 xs)
95+ (arm 42:11 (lit 42:11 ~) (wing 42:13 ys))
96+ (arm 43:11
97+ (cell 43:11 (bind 43:12 item) (bind 43:17 rest))
98+ (tuple 43:23
99+ (wing 43:24 item)
100+ (group 43:29
101+ (call 43:30 (wing 43:30 weld) (wing 43:35 rest) (wing 43:40 ys))))))))))))))
102+ (value 45:1 turn
103+ (gate 45:9
104+ (face 45:12 args
105+ (cell 45:17
106+ (apply 45:18 list (tvar 45:24 A))
107+ (fn 45:27 (tvar 45:30 A) (tvar 45:32 B))))
108+ (body 46:3
109+ (branch 46:3
110+ (wing 46:6 args)
111+ (arm 47:5
112+ (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
113+ (body 48:7
114+ (cast 48:7
115+ (apply 48:10 list (tvar 48:16 B))
116+ (body 49:9
117+ (branch 49:9
118+ (wing 49:12 xs)
119+ (arm 50:11 (lit 50:11 ~) (lit 50:13 ~))
120+ (arm 51:11
121+ (cell 51:11 (bind 51:12 item) (bind 51:17 rest))
122+ (tuple 51:23
123+ (group 51:24
124+ (call 51:25 (wing 51:25 f) (wing 51:27 item)))
125+ (group 51:33
126+ (call 51:34 (wing 51:34 turn) (wing 51:39 rest) (wing 51:44 f)))))))))))))))
tests/golden/prelude-list-unit/types.txt+2−2
@@ -5,7 +5,7 @@ partial inference; module not checked
55++ not: $-(? ?)
66+$ list: cases proven disjoint; mold not checked
77+$ 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
8+++ fall: $-([(unit A) A] A)
9+++ need: $-((unit A) A)
1010++ weld: sample mold is not supported by partial inference
1111++ turn: sample mold is not supported by partial inference
tests/golden/prelude-unit-list-transforms/about.txt+2−2
@@ -1,4 +1,4 @@
1−source: Overview, Prelude: "The exported inventory includes all names from the Hoon library sections listed below, excluding the groups explicitly left out"; Hoon 2a includes `drop`, `bind`, `biff`, `both` and `clef`, and 2b includes `skim`, `skip`, `roll` and `reel`. Folds take an explicit start.
2−tests: The complete current prelude parses, including unit-to-list conversion, unit mapping and flat mapping, two ways to combine units, complementary list filters, and left and right folds. The filters retain the order of their selected items.
1+source: Overview, Prelude: "The exported inventory includes all names from the Hoon library sections listed below, excluding the groups explicitly left out"; Hoon 2a includes `drop`, `bind`, `biff`, `flit`, `both`, `clap` and `clef`, and 2b includes `join`, `murn`, `rear`, `snip`, `skim`, `skip`, `levy`, `lien`, `roll` and `reel`. Folds take an explicit start.
2+tests: The complete current prelude parses, including unit-to-list conversion, unit mapping and flat mapping, a curried unit-producing filter, three ways to combine units, including `clap` with one shared value type, complementary list filters, present-product mapping, joining, last-item operations, all/any predicates, and left and right folds. The filters retain the order of their selected items.
33expect: parses
44expect-types: a partial inference report, not a checked module; unit and list gate typing is not complete
tests/golden/prelude-unit-list-transforms/source.jibb+101−20
@@ -1,4 +1,8 @@
1+/= internal /lib/jibb/internal
2++$ poke poke.internal
3+
14:: Initial prelude functions. The rest of the inventory is still to come.
5+
26++ same |= x=A x
37
48++ head |= p=[A B]
@@ -37,16 +41,18 @@
3741++ weld |= args=[(list A) (list A)]
3842 ?- args
3943 [xs ys]
40− ?- xs
41− ~ ys
42− [item rest] [item (weld rest ys)]
44+ ^- (list A)
45+ ?- xs
46+ ~ ys
47+ [item rest] [item (weld rest ys)]
4348
4449++ turn |= args=[(list A) $-(A B)]
4550 ?- args
4651 [xs f]
47− ?- xs
48− ~ ~
49− [item rest] [(f item) (turn rest f)]
52+ ^- (list B)
53+ ?- xs
54+ ~ ~
55+ [item rest] [(f item) (turn rest f)]
5056
5157+$ dime [p=@ta q=@]
5258
@@ -138,27 +144,28 @@
138144 (reverse-into xs ~)
139145
140146++ drop |= maybe=(unit A)
141− ?- maybe
142− ~ ~
143− [~ value] [value ~]
147+ ^- (list A)
148+ ?- maybe
149+ ~ ~
150+ [~ value] [value ~]
144151
145152++ bind |= args=[(unit A) $-(A B)]
146153 ?- args
147− [maybe f]
154+ [maybe f] ^- (unit B)
148155 ?- maybe
149156 ~ ~
150157 [~ value] `(f value)
151158
152159++ biff |= args=[(unit A) $-(A (unit B))]
153160 ?- args
154− [maybe f]
161+ [maybe f] ^- (unit B)
155162 ?- maybe
156163 ~ ~
157164 [~ value] (f value)
158165
159166++ both |= args=[(unit A) (unit B)]
160167 ?- args
161− [first second]
168+ [first second] ^- (unit [A B])
162169 ?- first
163170 ~ ~
164171 [~ a]
@@ -166,9 +173,19 @@
166173 ~ ~
167174 [~ b] `[a b]
168175
176+++ clap |= args=[(unit A) (unit A) $-([A A] A)]
177+ ?- args
178+ [first second combine] ^- (unit A)
179+ ?- first
180+ ~ second
181+ [~ a]
182+ ?- second
183+ ~ first
184+ [~ b] `(combine a b)
185+
169186++ clef |= args=[(unit A) (unit B) $-([A B] (unit C))]
170187 ?- args
171− [first second combine]
188+ [first second combine] ^- (unit C)
172189 ?- first
173190 ~ ~
174191 [~ a]
@@ -177,24 +194,44 @@
177194 [~ b] (combine a b)
178195
179196++ skim |= args=[(list A) $-(A ?)]
197+ ?- args
198+ [xs predicate] ^- (list A)
199+ ?- xs
200+ ~ ~
201+ [item rest]
202+ ?- (predicate item)
203+ %.y [item (skim rest predicate)]
204+ %.n (skim rest predicate)
205+
206+++ skip |= args=[(list A) $-(A ?)]
207+ ?- args
208+ [xs predicate] ^- (list A)
209+ ?- xs
210+ ~ ~
211+ [item rest]
212+ ?- (predicate item)
213+ %.y (skip rest predicate)
214+ %.n [item (skip rest predicate)]
215+
216+++ levy |= args=[(list A) $-(A ?)]
180217 ?- args
181218 [xs predicate]
182219 ?- xs
183− ~ ~
220+ ~ %.y
184221 [item rest]
185222 ?- (predicate item)
186− %.y [item (skim rest predicate)]
187− %.n (skim rest predicate)
223+ %.y (levy rest predicate)
224+ %.n %.n
188225
189−++ skip |= args=[(list A) $-(A ?)]
226+++ lien |= args=[(list A) $-(A ?)]
190227 ?- args
191228 [xs predicate]
192229 ?- xs
193− ~ ~
230+ ~ %.n
194231 [item rest]
195232 ?- (predicate item)
196− %.y (skip rest predicate)
197− %.n [item (skip rest predicate)]
233+ %.y %.y
234+ %.n (lien rest predicate)
198235
199236++ roll |= args=[(list A) B $-([A B] B)]
200237 ?- args
@@ -209,3 +246,47 @@
209246 ?- xs
210247 ~ start
211248 [item rest] (combine item (reel rest start combine))
249+
250+++ flit |= predicate=$-(A ?)
251+ |= value=A
252+ ^- (unit A)
253+ ?- (predicate value)
254+ %.y `value
255+ %.n ~
256+
257+++ murn |= args=[(list A) $-(A (unit B))]
258+ ?- args
259+ [xs f] ^- (list B)
260+ ?- xs
261+ ~ ~
262+ [item rest]
263+ ?- (f item)
264+ ~ (murn rest f)
265+ [~ value] [value (murn rest f)]
266+
267+++ join |= args=[A (list A)]
268+ ?- args
269+ [separator xs] ^- (list A)
270+ ?- xs
271+ ~ ~
272+ [item rest]
273+ ?- rest
274+ ~ [item ~]
275+ [next more] [item [separator (join separator rest)]]
276+
277+++ snip |= xs=(list A)
278+ ^- (list A)
279+ ?- xs
280+ ~ ~
281+ [item rest]
282+ ?- rest
283+ ~ ~
284+ [next more] [item (snip rest)]
285+
286+++ rear |= xs=(list A)
287+ ?- xs
288+ ~ !!
289+ [item rest]
290+ ?- rest
291+ ~ item
292+ [next more] (rear rest)
tests/golden/prelude-unit-list-transforms/tokens.txt+1668−1145
@@ -1,34 +1,26 @@
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
1+1:1 glyph /=
2+1:4 name internal
3+1:13 glyph /
4+1:14 tight knot lib
5+1:17 tight glyph /
6+1:18 tight knot jibb
7+1:22 tight glyph /
8+1:23 tight knot internal
9+2:1 NEWLINE
10+2:1 glyph +$
11+2:4 name poke
12+2:9 wing poke.internal
13+6:1 NEWLINE
14+6:1 glyph ++
15+6:4 name same
16+6:9 glyph |=
17+6:12 name x
18+6:13 tight glyph =
19+6:14 tight tvar A
20+6:16 name x
29218:1 NEWLINE
30228:1 glyph ++
31−8:4 name tail
23+8:4 name head
32248:9 glyph |=
33258:12 name p
34268:13 tight glyph =
@@ -44,52 +36,51 @@
443610:6 tight name a
453710:8 name b
463810:9 tight glyph ]
47−10:11 name b
39+10:11 name a
484012:1 DEDENT
494112:1 DEDENT
504212:1 NEWLINE
514312: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 ?
44+12:4 name tail
45+12:9 glyph |=
46+12:12 name p
47+12:13 tight glyph =
48+12:14 tight glyph [
49+12:15 tight tvar A
50+12:17 tvar B
51+12:18 tight glyph ]
575213:3 INDENT
585313:3 glyph ?-
59−13:6 name b
54+13:6 name p
605514: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 ]
56+14:5 glyph [
57+14:6 tight name a
58+14:8 name b
59+14:9 tight glyph ]
60+14:11 name b
61+16:1 DEDENT
62+16:1 DEDENT
63+16:1 NEWLINE
64+16:1 glyph ++
65+16:4 name not
66+16:8 glyph |=
67+16:11 name b
68+16:12 tight glyph =
69+16:13 tight glyph ?
70+17:3 INDENT
71+17:3 glyph ?-
72+17:6 name b
73+18:5 INDENT
74+18:5 lit %.y
75+18:9 lit %.n
76+19:5 NEWLINE
77+19:5 lit %.n
78+19:9 lit %.y
79+21:1 DEDENT
898021:1 DEDENT
908121:1 NEWLINE
918221:1 glyph +$
92−21:4 name unit
83+21:4 name list
938421:9 glyph |$
948521:12 glyph [
958621:13 tight tvar A
@@ -98,570 +89,573 @@
988922:3 lit ~
999023:3 NEWLINE
1009123: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 ]
92+23:4 tight name i
93+23:5 tight glyph =
94+23:6 tight tvar A
95+23:8 name t
96+23:9 tight glyph =
97+23:10 tight glyph (
98+23:11 tight name list
99+23:16 tvar A
100+23:17 tight glyph )
101+23:18 tight glyph ]
10610225:1 DEDENT
10710325: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 ]
104+25:1 glyph +$
105+25:4 name unit
106+25:9 glyph |$
107+25:12 glyph [
108+25:13 tight tvar A
109+25:14 tight glyph ]
12011026: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
111+26:3 lit ~
112+27:3 NEWLINE
113+27:3 glyph [
114+27:4 tight lit ~
115+27:6 name u
116+27:7 tight glyph =
117+27:8 tight tvar A
118+27:9 tight glyph ]
119+29:1 DEDENT
120+29:1 NEWLINE
121+29:1 glyph ++
122+29:4 name fall
123+29:9 glyph |=
124+29:12 name args
125+29:16 tight glyph =
126+29:17 tight glyph [
127+29:18 tight glyph (
128+29:19 tight name unit
129+29:24 tvar A
130+29:25 tight glyph )
131+29:27 tvar A
132+29:28 tight glyph ]
133+30:3 INDENT
134+30:3 glyph ?-
135+30:6 name args
136+31:5 INDENT
137+31:5 glyph [
138+31:6 tight name maybe
139+31:12 name fallback
140+31:20 tight glyph ]
141+32:7 INDENT
142+32:7 glyph ?-
143+32:10 name maybe
144+33:9 INDENT
145+33:9 lit ~
146+33:11 name fallback
147+34:9 NEWLINE
148+34:9 glyph [
149+34:10 tight lit ~
150+34:12 name value
151+34:17 tight glyph ]
152+34:19 name value
153+36:1 DEDENT
154+36:1 DEDENT
155+36:1 DEDENT
156+36:1 DEDENT
157+36:1 NEWLINE
158+36:1 glyph ++
159+36:4 name need
160+36:9 glyph |=
161+36:12 name maybe
162+36:17 tight glyph =
163+36:18 tight glyph (
164+36:19 tight name unit
165+36:24 tvar A
166+36:25 tight glyph )
167+37:3 INDENT
168+37:3 glyph ?-
169+37:6 name maybe
170+38:5 INDENT
171+38:5 lit ~
172+38:7 glyph !!
173+39:5 NEWLINE
18817439: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 ]
175+39:6 tight lit ~
176+39:8 name value
177+39:13 tight glyph ]
178+39:15 name value
179+41:1 DEDENT
180+41:1 DEDENT
181+41:1 NEWLINE
182+41:1 glyph ++
183+41:4 name weld
184+41:9 glyph |=
185+41:12 name args
186+41:16 tight glyph =
187+41:17 tight glyph [
188+41:18 tight glyph (
189+41:19 tight name list
190+41:24 tvar A
191+41:25 tight glyph )
192+41:27 glyph (
193+41:28 tight name list
194+41:33 tvar A
195+41:34 tight glyph )
196+41:35 tight glyph ]
197+42:3 INDENT
198+42:3 glyph ?-
199+42:6 name args
200+43:5 INDENT
201+43:5 glyph [
202+43:6 tight name xs
203+43:9 name ys
204+43:11 tight glyph ]
205+44:7 INDENT
206+44:7 glyph ^-
207+44:10 glyph (
208+44:11 tight name list
209+44:16 tvar A
210+44:17 tight glyph )
211+45:9 INDENT
212+45:9 glyph ?-
213+45:12 name xs
214+46:11 INDENT
215+46:11 lit ~
216+46:13 name ys
217+47:11 NEWLINE
218+47:11 glyph [
219+47:12 tight name item
220+47:17 name rest
221+47:21 tight glyph ]
222+47:23 glyph [
223+47:24 tight name item
224+47:29 glyph (
225+47:30 tight name weld
226+47:35 name rest
227+47:40 name ys
228+47:42 tight glyph )
229+47:43 tight glyph ]
230+49:1 DEDENT
231+49:1 DEDENT
232+49:1 DEDENT
233+49:1 DEDENT
234+49:1 DEDENT
235+49:1 NEWLINE
236+49:1 glyph ++
237+49:4 name turn
238+49:9 glyph |=
239+49:12 name args
240+49:16 tight glyph =
241+49:17 tight glyph [
242+49:18 tight glyph (
243+49:19 tight name list
244+49:24 tvar A
245+49:25 tight glyph )
246+49:27 glyph $-(
247+49:30 tight tvar A
248+49:32 tvar B
249+49:33 tight glyph )
250+49:34 tight glyph ]
251+50:3 INDENT
252+50:3 glyph ?-
253+50:6 name args
254+51:5 INDENT
255+51:5 glyph [
256+51:6 tight name xs
257+51:9 name f
258+51:10 tight glyph ]
259+52:7 INDENT
260+52:7 glyph ^-
261+52:10 glyph (
262+52:11 tight name list
263+52:16 tvar B
264+52:17 tight glyph )
265+53:9 INDENT
266+53:9 glyph ?-
267+53:12 name xs
268+54:11 INDENT
269+54:11 lit ~
270+54:13 lit ~
271+55:11 NEWLINE
272+55:11 glyph [
273+55:12 tight name item
274+55:17 name rest
275+55:21 tight glyph ]
276+55:23 glyph [
277+55:24 tight glyph (
278+55:25 tight name f
279+55:27 name item
280+55:31 tight glyph )
281+55:33 glyph (
282+55:34 tight name turn
283+55:39 name rest
284+55:44 name f
285+55:45 tight glyph )
286+55:46 tight glyph ]
287+57:1 DEDENT
288+57:1 DEDENT
289+57:1 DEDENT
290+57:1 DEDENT
291+57:1 DEDENT
31229257:1 NEWLINE
31329357: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
294+57:4 name dime
295+57:9 glyph [
296+57:10 tight name p
297+57:11 tight glyph =
298+57:12 tight aura @ta
299+57:16 name q
300+57:17 tight glyph =
301+57:18 tight aura @
302+57:19 tight glyph ]
303+59:1 NEWLINE
304+59:1 glyph +$
305+59:4 name hair
306+59:9 glyph [
307+59:10 tight name p
32630859: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 ]
309+59:12 tight aura @ud
310+59:16 name q
311+59:17 tight glyph =
312+59:18 tight aura @ud
313+59:21 tight glyph ]
314+61:1 NEWLINE
315+61:1 glyph +$
316+61:4 name pint
317+61:9 glyph [
318+61:10 tight name p
319+61:11 tight glyph =
320+61:12 tight glyph [
321+61:13 tight name p
322+61:14 tight glyph =
323+61:15 tight aura @
324+61:17 name q
325+61:18 tight glyph =
326+61:19 tight aura @
327+61:20 tight glyph ]
328+61:22 name q
329+61:23 tight glyph =
330+61:24 tight glyph [
331+61:25 tight name p
332+61:26 tight glyph =
333+61:27 tight aura @
334+61:29 name q
335+61:30 tight glyph =
336+61:31 tight aura @
337+61:32 tight glyph ]
338+61:33 tight glyph ]
339+63:1 NEWLINE
340+63:1 glyph +$
341+63:4 name coin
342+64:3 INDENT
343+64:3 glyph [
344+64:4 tight lit %$
345+64:7 name p
346+64:8 tight glyph =
347+64:9 tight name dime
348+64:13 tight glyph ]
349+65:3 NEWLINE
350+65:3 glyph [
351+65:4 tight lit %blob
352+65:10 name p
353+65:11 tight glyph =
354+65:12 tight glyph *
355+65:13 tight glyph ]
356+66:3 NEWLINE
357+66:3 glyph [
358+66:4 tight lit %many
359+66:10 name p
360+66:11 tight glyph =
361+66:12 tight glyph (
362+66:13 tight name list
363+66:18 name coin
364+66:22 tight glyph )
365+66:23 tight glyph ]
366+68:1 DEDENT
40036768:1 NEWLINE
40136868:1 glyph +$
402−68:4 name cord
403−68:9 aura @t
369+68:4 name pair
370+68:9 glyph |$
371+68:12 glyph [
372+68:13 tight tvar A
373+68:15 tvar B
374+68:16 tight glyph ]
375+68:18 glyph [
376+68:19 tight name p
377+68:20 tight glyph =
378+68:21 tight tvar A
379+68:23 name q
380+68:24 tight glyph =
381+68:25 tight tvar B
382+68:26 tight glyph ]
40438370:1 NEWLINE
40538470:1 glyph +$
406−70:4 name knot
407−70:9 aura @ta
385+70:4 name trel
386+70:9 glyph |$
387+70:12 glyph [
388+70:13 tight tvar A
389+70:15 tvar B
390+70:17 tvar C
391+70:18 tight glyph ]
392+70:20 glyph [
393+70:21 tight name p
394+70:22 tight glyph =
395+70:23 tight tvar A
396+70:25 name q
397+70:26 tight glyph =
398+70:27 tight tvar B
399+70:29 name r
400+70:30 tight glyph =
401+70:31 tight tvar C
402+70:32 tight glyph ]
40840372:1 NEWLINE
40940472: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 )
405+72:4 name qual
406+72:9 glyph |$
407+72:12 glyph [
408+72:13 tight tvar A
409+72:15 tvar B
410+72:17 tvar C
411+72:19 tvar D
412+72:20 tight glyph ]
413+72:22 glyph [
414+72:23 tight name p
415+72:24 tight glyph =
416+72:25 tight tvar A
417+72:27 name q
418+72:28 tight glyph =
419+72:29 tight tvar B
420+72:31 name r
421+72:32 tight glyph =
422+72:33 tight tvar C
423+72:35 name s
424+72:36 tight glyph =
425+72:37 tight tvar D
426+72:38 tight glyph ]
41542774:1 NEWLINE
41642874: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 )
429+74:4 name cord
430+74:9 aura @t
42243176:1 NEWLINE
42343276: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
433+76:4 name knot
434+76:9 aura @ta
435+78:1 NEWLINE
436+78:1 glyph +$
437+78:4 name tape
438+78:9 glyph (
439+78:10 tight name list
440+78:15 aura @tD
441+78:18 tight glyph )
442+80:1 NEWLINE
443+80:1 glyph +$
444+80:4 name path
445+80:9 glyph (
446+80:10 tight name list
447+80:15 name knot
448+80:19 tight glyph )
47244982:1 NEWLINE
47345082: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
451+82:4 name tank
452+83:3 INDENT
453+83:3 name cord
454+84:3 NEWLINE
455+84:3 glyph [
456+84:4 tight lit %leaf
457+84:10 name p
48845884: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 )
459+84:12 tight name tape
460+84:16 tight glyph ]
461+85:3 NEWLINE
462+85:3 glyph [
463+85:4 tight lit %palm
464+85:10 name p
465+85:11 tight glyph =
466+85:12 tight glyph (
467+85:13 tight name qual
468+85:18 name tape
469+85:23 name tape
470+85:28 name tape
471+85:33 name tape
472+85:37 tight glyph )
473+85:39 name q
474+85:40 tight glyph =
475+85:41 tight glyph (
476+85:42 tight name list
477+85:47 name tank
478+85:51 tight glyph )
479+85:52 tight glyph ]
480+86:3 NEWLINE
481+86:3 glyph [
482+86:4 tight lit %rose
483+86:10 name p
484+86:11 tight glyph =
485+86:12 tight glyph (
486+86:13 tight name trel
487+86:18 name tape
488+86:23 name tape
489+86:28 name tape
490+86:32 tight glyph )
491+86:34 name q
492+86:35 tight glyph =
493+86:36 tight glyph (
494+86:37 tight name list
495+86:42 name tank
496+86:46 tight glyph )
497+86:47 tight glyph ]
498+88:1 DEDENT
51149988:1 NEWLINE
51250088:1 glyph +$
513−88:4 name spot
501+88:4 name nail
51450288:9 glyph [
51550388:10 tight name p
51650488:11 tight glyph =
517−88:12 tight name path
505+88:12 tight name hair
51850688:17 name q
51950788:18 tight glyph =
520−88:19 tight name pint
508+88:19 tight name tape
52150988:23 tight glyph ]
52251090:1 NEWLINE
52351190: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 )
512+90:4 name edge
513+90:9 glyph [
514+90:10 tight name p
515+90:11 tight glyph =
516+90:12 tight name hair
517+90:17 name q
518+90:18 tight glyph =
519+90:19 tight glyph (
520+90:20 tight name unit
521+90:25 glyph [
522+90:26 tight name p
523+90:27 tight glyph =
524+90:28 tight glyph *
525+90:30 name q
526+90:31 tight glyph =
527+90:32 tight name nail
528+90:36 tight glyph ]
529+90:37 tight glyph )
530+90:38 tight glyph ]
531+92:1 NEWLINE
532+92:1 glyph +$
533+92:4 name rule
534+92:9 glyph $-(
535+92:12 tight name nail
536+92:17 name edge
537+92:21 tight glyph )
538+94:1 NEWLINE
539+94:1 glyph +$
540+94:4 name spot
541+94:9 glyph [
542+94:10 tight name p
543+94:11 tight glyph =
544+94:12 tight name path
545+94:17 name q
546+94:18 tight glyph =
547+94:19 tight name pint
548+94:23 tight glyph ]
549+96:1 NEWLINE
550+96:1 glyph +$
551+96:4 name toon
552+97:3 INDENT
553+97:3 glyph [
554+97:4 tight lit %0
555+97:7 name p
556+97:8 tight glyph =
557+97:9 tight glyph *
558+97:10 tight glyph ]
559+98:3 NEWLINE
560+98:3 glyph [
561+98:4 tight lit %1
562+98:7 name p
563+98:8 tight glyph =
564+98:9 tight glyph *
565+98:10 tight glyph ]
566+99:3 NEWLINE
567+99:3 glyph [
568+99:4 tight lit %2
569+99:7 name p
570+99:8 tight glyph =
571+99:9 tight glyph (
572+99:10 tight name list
573+99:15 name tank
574+99:19 tight glyph )
575+99:20 tight glyph ]
576+101:1 DEDENT
577+101:1 NEWLINE
578+101:1 glyph +$
579+101:4 name like
580+101:9 glyph |$
581+101:12 glyph [
582+101:13 tight tvar A
583+101:14 tight glyph ]
584+101:16 glyph [
585+101:17 tight name p
586+101:18 tight glyph =
587+101:19 tight name hair
588+101:24 name q
589+101:25 tight glyph =
590+101:26 tight glyph (
591+101:27 tight name unit
592+101:32 glyph [
593+101:33 tight name p
594+101:34 tight glyph =
595+101:35 tight tvar A
596+101:37 name q
597+101:38 tight glyph =
598+101:39 tight name nail
599+101:43 tight glyph ]
600+101:44 tight glyph )
601+101:45 tight glyph ]
602+103:1 NEWLINE
603+103:1 glyph ++
604+103:4 name wonk
605+103:9 glyph |=
606+103:12 name veq
607+103:15 tight glyph =
608+103:16 tight glyph (
609+103:17 tight name like
610+103:22 tvar A
611+103:23 tight glyph )
612+104:3 INDENT
613+104:3 glyph ?-
614+104:6 wing q.veq
615+105:5 INDENT
616+105:5 lit ~
617+105:7 glyph !!
618+106:5 NEWLINE
619+106:5 glyph [
620+106:6 tight lit ~
621+106:8 name product
622+106:15 tight glyph ]
623+106:17 wing p.product
624+108:1 DEDENT
625+108:1 DEDENT
626+108:1 NEWLINE
627+108:1 glyph +$
628+108:4 name lone
629+108:9 glyph |$
630+108:12 glyph [
631+108:13 tight tvar A
645632108:14 tight glyph ]
646−110:1 DEDENT
633+108:16 glyph [
634+108:17 tight name p
635+108:18 tight glyph =
636+108:19 tight tvar A
637+108:20 tight glyph ]
647638110:1 NEWLINE
648639110:1 glyph +$
649−110:4 name quip
640+110:4 name lest
650641110:9 glyph |$
651642110:12 glyph [
652643110: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 ]
644+110:14 tight glyph ]
645+110:16 glyph [
646+110:17 tight name i
647+110:18 tight glyph =
648+110:19 tight tvar A
649+110:21 name t
650+110:22 tight glyph =
651+110:23 tight glyph (
652+110:24 tight name list
653+110:29 tvar A
654+110:30 tight glyph )
655+110:31 tight glyph ]
662656112:1 NEWLINE
663657112:1 glyph +$
664−112:4 name tree
658+112:4 name pole
665659112:9 glyph |$
666660112:12 glyph [
667661112:13 tight tvar A
@@ -670,246 +664,242 @@
670664113:3 lit ~
671665114:3 NEWLINE
672666114: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 ]
667+114:4 tight tvar A
668+114:6 glyph (
669+114:7 tight name pole
670+114:12 tvar A
671+114:13 tight glyph )
672+114:14 tight glyph ]
689673116:1 DEDENT
690674116:1 NEWLINE
691675116:1 glyph +$
692−116:4 name each
676+116:4 name quip
693677116:9 glyph |$
694678116:12 glyph [
695679116:13 tight tvar A
696680116:15 tvar B
697681116: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 @
682+116:18 glyph [
683+116:19 tight glyph (
684+116:20 tight name list
685+116:25 tvar A
686+116:26 tight glyph )
687+116:28 tvar B
688+116:29 tight glyph ]
689+118:1 NEWLINE
690+118:1 glyph +$
691+118:4 name tree
692+118:9 glyph |$
693+118:12 glyph [
694+118:13 tight tvar A
695+118:14 tight glyph ]
696+119:3 INDENT
697+119:3 lit ~
698+120:3 NEWLINE
699+120:3 glyph [
700+120:4 tight name n
701+120:5 tight glyph =
702+120:6 tight tvar A
703+120:8 name l
704+120:9 tight glyph =
705+120:10 tight glyph (
706+120:11 tight name tree
707+120:16 tvar A
708+120:17 tight glyph )
709+120:19 name r
710+120:20 tight glyph =
711+120:21 tight glyph (
712+120:22 tight name tree
713+120:27 tvar A
714+120:28 tight glyph )
715+120:29 tight glyph ]
716+122:1 DEDENT
717717122:1 NEWLINE
718−122:1 glyph ++
719−122:4 name some
720−122:9 glyph |=
721−122:12 name item
722−122:16 tight glyph =
723−122:17 tight tvar A
724−122:19 glyph `
725−122:20 tight name item
726−124:1 NEWLINE
727−124:1 glyph ++
728−124:4 name lure
729−124:9 glyph |=
730−124:12 name item
731−124:16 tight glyph =
732−124:17 tight tvar A
733−125:3 INDENT
734−125:3 glyph ^-
735−125:6 glyph (
736−125:7 tight name list
737−125:12 tvar A
738−125:13 tight glyph )
739−125:15 glyph [
740−125:16 tight name item
741−125:21 lit ~
742−125:22 tight glyph ]
743−127:1 DEDENT
744−127:1 NEWLINE
745−127:1 glyph ++
746−127:4 name snoc
747−127:9 glyph |=
748−127:12 name args
749−127:16 tight glyph =
750−127:17 tight glyph [
751−127:18 tight glyph (
752−127:19 tight name list
753−127:24 tvar A
754−127:25 tight glyph )
755−127:27 tvar A
756−127:28 tight glyph ]
757−128:3 INDENT
758−128:3 glyph ?-
759−128:6 name args
760−129:5 INDENT
761−129:5 glyph [
762−129:6 tight name xs
763−129:9 name item
764−129:13 tight glyph ]
765−129:15 glyph (
766−129:16 tight name weld
767−129:21 name xs
768−129:24 glyph [
769−129:25 tight name item
770−129:30 lit ~
771−129:31 tight glyph ]
772−129:32 tight glyph )
773−131:1 DEDENT
774−131:1 DEDENT
775−131:1 NEWLINE
776−131:1 glyph ++
777−131:4 name flop
778−131:9 glyph |=
779−131:12 name xs
780−131:14 tight glyph =
781−131:15 tight glyph (
782−131:16 tight name list
783−131:21 tvar A
784−131:22 tight glyph )
785−132:3 INDENT
786−132:3 glyph ++
787−132:6 name reverse-into
788−132:19 glyph |=
789−132:22 name args
790−132:26 tight glyph =
791−132:27 tight glyph [
792−132:28 tight glyph (
793−132:29 tight name list
794−132:34 tvar A
795−132:35 tight glyph )
796−132:37 glyph (
797−132:38 tight name list
798−132:43 tvar A
799−132:44 tight glyph )
800−132:45 tight glyph ]
801−133:5 INDENT
802−133:5 glyph ?-
803−133:8 name args
804−134:7 INDENT
805−134:7 glyph [
806−134:8 tight name rest
807−134:13 name acc
808−134:16 tight glyph ]
809−135:9 INDENT
810−135:9 glyph ?-
811−135:12 name rest
812−136:11 INDENT
813−136:11 lit ~
814−136:13 name acc
815−137:11 NEWLINE
816−137:11 glyph [
817−137:12 tight name item
818−137:17 name more
819−137:21 tight glyph ]
820−137:23 glyph (
821−137:24 tight name reverse-into
822−137:37 name more
823−137:42 glyph [
824−137:43 tight name item
825−137:48 name acc
826−137:51 tight glyph ]
827−137:52 tight glyph )
828−138:3 DEDENT
829−138:3 DEDENT
830−138:3 DEDENT
831−138:3 DEDENT
832−138:3 NEWLINE
833−138:3 glyph (
834−138:4 tight name reverse-into
835−138:17 name xs
836−138:20 lit ~
837−138:21 tight glyph )
838−140:1 DEDENT
839−140:1 NEWLINE
840−140:1 glyph ++
841−140:4 name drop
842−140:9 glyph |=
843−140:12 name maybe
844−140:17 tight glyph =
845−140:18 tight glyph (
846−140:19 tight name unit
847−140:24 tvar A
848−140:25 tight glyph )
849−141:3 INDENT
850−141:3 glyph ?-
851−141:6 name maybe
852−142:5 INDENT
853−142:5 lit ~
854−142:7 lit ~
855−143:5 NEWLINE
856−143:5 glyph [
857−143:6 tight lit ~
858−143:8 name value
859−143:13 tight glyph ]
860−143:15 glyph [
861−143:16 tight name value
862−143:22 lit ~
863−143:23 tight glyph ]
864−145:1 DEDENT
865−145:1 DEDENT
866−145:1 NEWLINE
867−145:1 glyph ++
868−145:4 name bind
869−145:9 glyph |=
870−145:12 name args
871−145:16 tight glyph =
872−145:17 tight glyph [
873−145:18 tight glyph (
874−145:19 tight name unit
875−145:24 tvar A
876−145:25 tight glyph )
877−145:27 glyph $-(
878−145:30 tight tvar A
879−145:32 tvar B
880−145:33 tight glyph )
881−145:34 tight glyph ]
882−146:3 INDENT
883−146:3 glyph ?-
884−146:6 name args
885−147:5 INDENT
886−147:5 glyph [
887−147:6 tight name maybe
888−147:12 name f
889−147:13 tight glyph ]
890−148:7 INDENT
891−148:7 glyph ?-
892−148:10 name maybe
893−149:9 INDENT
718+122:1 glyph +$
719+122:4 name each
720+122:9 glyph |$
721+122:12 glyph [
722+122:13 tight tvar A
723+122:15 tvar B
724+122:16 tight glyph ]
725+123:3 INDENT
726+123:3 glyph [
727+123:4 tight lit %|
728+123:7 name p
729+123:8 tight glyph =
730+123:9 tight tvar B
731+123:10 tight glyph ]
732+124:3 NEWLINE
733+124:3 glyph [
734+124:4 tight lit %&
735+124:7 name p
736+124:8 tight glyph =
737+124:9 tight tvar A
738+124:10 tight glyph ]
739+126:1 DEDENT
740+126:1 NEWLINE
741+126:1 glyph +$
742+126:4 name bloq
743+126:9 aura @
744+128:1 NEWLINE
745+128:1 glyph ++
746+128:4 name some
747+128:9 glyph |=
748+128:12 name item
749+128:16 tight glyph =
750+128:17 tight tvar A
751+128:19 glyph `
752+128:20 tight name item
753+130:1 NEWLINE
754+130:1 glyph ++
755+130:4 name lure
756+130:9 glyph |=
757+130:12 name item
758+130:16 tight glyph =
759+130:17 tight tvar A
760+131:3 INDENT
761+131:3 glyph ^-
762+131:6 glyph (
763+131:7 tight name list
764+131:12 tvar A
765+131:13 tight glyph )
766+131:15 glyph [
767+131:16 tight name item
768+131:21 lit ~
769+131:22 tight glyph ]
770+133:1 DEDENT
771+133:1 NEWLINE
772+133:1 glyph ++
773+133:4 name snoc
774+133:9 glyph |=
775+133:12 name args
776+133:16 tight glyph =
777+133:17 tight glyph [
778+133:18 tight glyph (
779+133:19 tight name list
780+133:24 tvar A
781+133:25 tight glyph )
782+133:27 tvar A
783+133:28 tight glyph ]
784+134:3 INDENT
785+134:3 glyph ?-
786+134:6 name args
787+135:5 INDENT
788+135:5 glyph [
789+135:6 tight name xs
790+135:9 name item
791+135:13 tight glyph ]
792+135:15 glyph (
793+135:16 tight name weld
794+135:21 name xs
795+135:24 glyph [
796+135:25 tight name item
797+135:30 lit ~
798+135:31 tight glyph ]
799+135:32 tight glyph )
800+137:1 DEDENT
801+137:1 DEDENT
802+137:1 NEWLINE
803+137:1 glyph ++
804+137:4 name flop
805+137:9 glyph |=
806+137:12 name xs
807+137:14 tight glyph =
808+137:15 tight glyph (
809+137:16 tight name list
810+137:21 tvar A
811+137:22 tight glyph )
812+138:3 INDENT
813+138:3 glyph ++
814+138:6 name reverse-into
815+138:19 glyph |=
816+138:22 name args
817+138:26 tight glyph =
818+138:27 tight glyph [
819+138:28 tight glyph (
820+138:29 tight name list
821+138:34 tvar A
822+138:35 tight glyph )
823+138:37 glyph (
824+138:38 tight name list
825+138:43 tvar A
826+138:44 tight glyph )
827+138:45 tight glyph ]
828+139:5 INDENT
829+139:5 glyph ?-
830+139:8 name args
831+140:7 INDENT
832+140:7 glyph [
833+140:8 tight name rest
834+140:13 name acc
835+140:16 tight glyph ]
836+141:9 INDENT
837+141:9 glyph ?-
838+141:12 name rest
839+142:11 INDENT
840+142:11 lit ~
841+142:13 name acc
842+143:11 NEWLINE
843+143:11 glyph [
844+143:12 tight name item
845+143:17 name more
846+143:21 tight glyph ]
847+143:23 glyph (
848+143:24 tight name reverse-into
849+143:37 name more
850+143:42 glyph [
851+143:43 tight name item
852+143:48 name acc
853+143:51 tight glyph ]
854+143:52 tight glyph )
855+144:3 DEDENT
856+144:3 DEDENT
857+144:3 DEDENT
858+144:3 DEDENT
859+144:3 NEWLINE
860+144:3 glyph (
861+144:4 tight name reverse-into
862+144:17 name xs
863+144:20 lit ~
864+144:21 tight glyph )
865+146:1 DEDENT
866+146:1 NEWLINE
867+146:1 glyph ++
868+146:4 name drop
869+146:9 glyph |=
870+146:12 name maybe
871+146:17 tight glyph =
872+146:18 tight glyph (
873+146:19 tight name unit
874+146:24 tvar A
875+146:25 tight glyph )
876+147:3 INDENT
877+147:3 glyph ^-
878+147:6 glyph (
879+147:7 tight name list
880+147:12 tvar A
881+147:13 tight glyph )
882+148:5 INDENT
883+148:5 glyph ?-
884+148:8 name maybe
885+149:7 INDENT
886+149:7 lit ~
894887149:9 lit ~
895−149:11 lit ~
896−150:9 NEWLINE
897−150:9 glyph [
898−150:10 tight lit ~
899−150:12 name value
900−150:17 tight glyph ]
901−150:19 glyph `
902−150:20 tight glyph (
903−150:21 tight name f
904−150:23 name value
905−150:28 tight glyph )
906−152:1 DEDENT
888+150:7 NEWLINE
889+150:7 glyph [
890+150:8 tight lit ~
891+150:10 name value
892+150:15 tight glyph ]
893+150:17 glyph [
894+150:18 tight name value
895+150:24 lit ~
896+150:25 tight glyph ]
907897152:1 DEDENT
908898152:1 DEDENT
909899152:1 DEDENT
910900152:1 NEWLINE
911901152:1 glyph ++
912−152:4 name biff
902+152:4 name bind
913903152:9 glyph |=
914904152:12 name args
915905152:16 tight glyph =
@@ -920,12 +910,9 @@
920910152:25 tight glyph )
921911152:27 glyph $-(
922912152:30 tight tvar A
923−152:32 glyph (
924−152:33 tight name unit
925−152:38 tvar B
926−152:39 tight glyph )
927−152:40 tight glyph )
928−152:41 tight glyph ]
913+152:32 tvar B
914+152:33 tight glyph )
915+152:34 tight glyph ]
929916153:3 INDENT
930917153:3 glyph ?-
931918153:6 name args
@@ -934,6 +921,11 @@
934921154:6 tight name maybe
935922154:12 name f
936923154:13 tight glyph ]
924+154:15 glyph ^-
925+154:18 glyph (
926+154:19 tight name unit
927+154:24 tvar B
928+154:25 tight glyph )
937929155:7 INDENT
938930155:7 glyph ?-
939931155:10 name maybe
@@ -945,17 +937,18 @@
945937157:10 tight lit ~
946938157:12 name value
947939157:17 tight glyph ]
948−157:19 glyph (
949−157:20 tight name f
950−157:22 name value
951−157:27 tight glyph )
940+157:19 glyph `
941+157:20 tight glyph (
942+157:21 tight name f
943+157:23 name value
944+157:28 tight glyph )
952945159:1 DEDENT
953946159:1 DEDENT
954947159:1 DEDENT
955948159:1 DEDENT
956949159:1 NEWLINE
957950159:1 glyph ++
958−159:4 name both
951+159:4 name biff
959952159:9 glyph |=
960953159:12 name args
961954159:16 tight glyph =
@@ -964,305 +957,327 @@
964957159:19 tight name unit
965958159:24 tvar A
966959159:25 tight glyph )
967−159:27 glyph (
968−159:28 tight name unit
969−159:33 tvar B
970−159:34 tight glyph )
971−159:35 tight glyph ]
960+159:27 glyph $-(
961+159:30 tight tvar A
962+159:32 glyph (
963+159:33 tight name unit
964+159:38 tvar B
965+159:39 tight glyph )
966+159:40 tight glyph )
967+159:41 tight glyph ]
972968160:3 INDENT
973969160:3 glyph ?-
974970160:6 name args
975971161:5 INDENT
976972161:5 glyph [
977−161:6 tight name first
978−161:12 name second
979−161:18 tight glyph ]
973+161:6 tight name maybe
974+161:12 name f
975+161:13 tight glyph ]
976+161:15 glyph ^-
977+161:18 glyph (
978+161:19 tight name unit
979+161:24 tvar B
980+161:25 tight glyph )
980981162:7 INDENT
981982162:7 glyph ?-
982−162:10 name first
983+162:10 name maybe
983984163:9 INDENT
984985163:9 lit ~
985986163:11 lit ~
986987164:9 NEWLINE
987988164:9 glyph [
988989164:10 tight lit ~
989−164:12 name a
990−164:13 tight glyph ]
991−165:11 INDENT
992−165:11 glyph ?-
993−165:14 name second
994−166:13 INDENT
995−166:13 lit ~
996−166:15 lit ~
997−167:13 NEWLINE
998−167:13 glyph [
999−167:14 tight lit ~
1000−167:16 name b
1001−167:17 tight glyph ]
1002−167:19 glyph `
1003−167:20 tight glyph [
1004−167:21 tight name a
1005−167:23 name b
1006−167:24 tight glyph ]
1007−169:1 DEDENT
1008−169:1 DEDENT
1009−169:1 DEDENT
1010−169:1 DEDENT
1011−169:1 DEDENT
1012−169:1 DEDENT
1013−169:1 NEWLINE
1014−169:1 glyph ++
1015−169:4 name clef
1016−169:9 glyph |=
1017−169:12 name args
1018−169:16 tight glyph =
1019−169:17 tight glyph [
1020−169:18 tight glyph (
1021−169:19 tight name unit
1022−169:24 tvar A
1023−169:25 tight glyph )
1024−169:27 glyph (
1025−169:28 tight name unit
1026−169:33 tvar B
1027−169:34 tight glyph )
1028−169:36 glyph $-(
1029−169:39 tight glyph [
1030−169:40 tight tvar A
1031−169:42 tvar B
1032−169:43 tight glyph ]
1033−169:45 glyph (
1034−169:46 tight name unit
1035−169:51 tvar C
1036−169:52 tight glyph )
1037−169:53 tight glyph )
1038−169:54 tight glyph ]
1039−170:3 INDENT
1040−170:3 glyph ?-
1041−170:6 name args
1042−171:5 INDENT
1043−171:5 glyph [
1044−171:6 tight name first
1045−171:12 name second
1046−171:19 name combine
1047−171:26 tight glyph ]
1048−172:7 INDENT
1049−172:7 glyph ?-
1050−172:10 name first
1051−173:9 INDENT
1052−173:9 lit ~
1053−173:11 lit ~
1054−174:9 NEWLINE
1055−174:9 glyph [
1056−174:10 tight lit ~
1057−174:12 name a
1058−174:13 tight glyph ]
1059−175:11 INDENT
1060−175:11 glyph ?-
1061−175:14 name second
1062−176:13 INDENT
1063−176:13 lit ~
1064−176:15 lit ~
1065−177:13 NEWLINE
1066−177:13 glyph [
1067−177:14 tight lit ~
1068−177:16 name b
1069−177:17 tight glyph ]
1070−177:19 glyph (
1071−177:20 tight name combine
1072−177:28 name a
1073−177:30 name b
1074−177:31 tight glyph )
1075−179:1 DEDENT
1076−179:1 DEDENT
1077−179:1 DEDENT
1078−179:1 DEDENT
1079−179:1 DEDENT
1080−179:1 DEDENT
1081−179:1 NEWLINE
1082−179:1 glyph ++
1083−179:4 name skim
1084−179:9 glyph |=
1085−179:12 name args
1086−179:16 tight glyph =
1087−179:17 tight glyph [
1088−179:18 tight glyph (
1089−179:19 tight name list
1090−179:24 tvar A
1091−179:25 tight glyph )
1092−179:27 glyph $-(
1093−179:30 tight tvar A
1094−179:32 glyph ?
1095−179:33 tight glyph )
1096−179:34 tight glyph ]
1097−180:3 INDENT
1098−180:3 glyph ?-
1099−180:6 name args
1100−181:5 INDENT
1101−181:5 glyph [
1102−181:6 tight name xs
1103−181:9 name predicate
1104−181:18 tight glyph ]
1105−182:7 INDENT
1106−182:7 glyph ?-
1107−182:10 name xs
1108−183:9 INDENT
1109−183:9 lit ~
1110−183:11 lit ~
1111−184:9 NEWLINE
1112−184:9 glyph [
1113−184:10 tight name item
1114−184:15 name rest
1115−184:19 tight glyph ]
1116−185:11 INDENT
1117−185:11 glyph ?-
1118−185:14 glyph (
1119−185:15 tight name predicate
1120−185:25 name item
1121−185:29 tight glyph )
1122−186:13 INDENT
1123−186:13 lit %.y
1124−186:17 glyph [
1125−186:18 tight name item
1126−186:23 glyph (
1127−186:24 tight name skim
1128−186:29 name rest
1129−186:34 name predicate
1130−186:43 tight glyph )
1131−186:44 tight glyph ]
1132−187:13 NEWLINE
1133−187:13 lit %.n
1134−187:17 glyph (
1135−187:18 tight name skim
1136−187:23 name rest
1137−187:28 name predicate
1138−187:37 tight glyph )
1139−189:1 DEDENT
1140−189:1 DEDENT
1141−189:1 DEDENT
1142−189:1 DEDENT
1143−189:1 DEDENT
1144−189:1 DEDENT
1145−189:1 NEWLINE
1146−189:1 glyph ++
1147−189:4 name skip
1148−189:9 glyph |=
1149−189:12 name args
1150−189:16 tight glyph =
1151−189:17 tight glyph [
1152−189:18 tight glyph (
1153−189:19 tight name list
1154−189:24 tvar A
1155−189:25 tight glyph )
1156−189:27 glyph $-(
1157−189:30 tight tvar A
1158−189:32 glyph ?
1159−189:33 tight glyph )
1160−189:34 tight glyph ]
1161−190:3 INDENT
1162−190:3 glyph ?-
1163−190:6 name args
1164−191:5 INDENT
1165−191:5 glyph [
1166−191:6 tight name xs
1167−191:9 name predicate
1168−191:18 tight glyph ]
1169−192:7 INDENT
1170−192:7 glyph ?-
1171−192:10 name xs
1172−193:9 INDENT
1173−193:9 lit ~
1174−193:11 lit ~
1175−194:9 NEWLINE
1176−194:9 glyph [
1177−194:10 tight name item
1178−194:15 name rest
1179−194:19 tight glyph ]
1180−195:11 INDENT
1181−195:11 glyph ?-
1182−195:14 glyph (
1183−195:15 tight name predicate
1184−195:25 name item
1185−195:29 tight glyph )
1186−196:13 INDENT
1187−196:13 lit %.y
1188−196:17 glyph (
1189−196:18 tight name skip
1190−196:23 name rest
1191−196:28 name predicate
1192−196:37 tight glyph )
1193−197:13 NEWLINE
1194−197:13 lit %.n
1195−197:17 glyph [
1196−197:18 tight name item
1197−197:23 glyph (
1198−197:24 tight name skip
1199−197:29 name rest
1200−197:34 name predicate
1201−197:43 tight glyph )
1202−197:44 tight glyph ]
1203−199:1 DEDENT
1204−199:1 DEDENT
1205−199:1 DEDENT
1206−199:1 DEDENT
1207−199:1 DEDENT
1208−199:1 DEDENT
1209−199:1 NEWLINE
1210−199:1 glyph ++
1211−199:4 name roll
1212−199:9 glyph |=
1213−199:12 name args
1214−199:16 tight glyph =
1215−199:17 tight glyph [
1216−199:18 tight glyph (
1217−199:19 tight name list
1218−199:24 tvar A
1219−199:25 tight glyph )
1220−199:27 tvar B
1221−199:29 glyph $-(
1222−199:32 tight glyph [
1223−199:33 tight tvar A
1224−199:35 tvar B
1225−199:36 tight glyph ]
1226−199:38 tvar B
1227−199:39 tight glyph )
1228−199:40 tight glyph ]
1229−200:3 INDENT
1230−200:3 glyph ?-
1231−200:6 name args
1232−201:5 INDENT
1233−201:5 glyph [
1234−201:6 tight name xs
1235−201:9 name start
1236−201:15 name combine
1237−201:22 tight glyph ]
1238−202:7 INDENT
1239−202:7 glyph ?-
1240−202:10 name xs
1241−203:9 INDENT
1242−203:9 lit ~
1243−203:11 name start
1244−204:9 NEWLINE
1245−204:9 glyph [
1246−204:10 tight name item
1247−204:15 name rest
1248−204:19 tight glyph ]
1249−204:21 glyph (
1250−204:22 tight name roll
1251−204:27 name rest
1252−204:32 glyph (
1253−204:33 tight name combine
1254−204:41 name item
1255−204:46 name start
1256−204:51 tight glyph )
1257−204:53 name combine
1258−204:60 tight glyph )
990+164:12 name value
991+164:17 tight glyph ]
992+164:19 glyph (
993+164:20 tight name f
994+164:22 name value
995+164:27 tight glyph )
996+166:1 DEDENT
997+166:1 DEDENT
998+166:1 DEDENT
999+166:1 DEDENT
1000+166:1 NEWLINE
1001+166:1 glyph ++
1002+166:4 name both
1003+166:9 glyph |=
1004+166:12 name args
1005+166:16 tight glyph =
1006+166:17 tight glyph [
1007+166:18 tight glyph (
1008+166:19 tight name unit
1009+166:24 tvar A
1010+166:25 tight glyph )
1011+166:27 glyph (
1012+166:28 tight name unit
1013+166:33 tvar B
1014+166:34 tight glyph )
1015+166:35 tight glyph ]
1016+167:3 INDENT
1017+167:3 glyph ?-
1018+167:6 name args
1019+168:5 INDENT
1020+168:5 glyph [
1021+168:6 tight name first
1022+168:12 name second
1023+168:18 tight glyph ]
1024+168:20 glyph ^-
1025+168:23 glyph (
1026+168:24 tight name unit
1027+168:29 glyph [
1028+168:30 tight tvar A
1029+168:32 tvar B
1030+168:33 tight glyph ]
1031+168:34 tight glyph )
1032+169:7 INDENT
1033+169:7 glyph ?-
1034+169:10 name first
1035+170:9 INDENT
1036+170:9 lit ~
1037+170:11 lit ~
1038+171:9 NEWLINE
1039+171:9 glyph [
1040+171:10 tight lit ~
1041+171:12 name a
1042+171:13 tight glyph ]
1043+172:11 INDENT
1044+172:11 glyph ?-
1045+172:14 name second
1046+173:13 INDENT
1047+173:13 lit ~
1048+173:15 lit ~
1049+174:13 NEWLINE
1050+174:13 glyph [
1051+174:14 tight lit ~
1052+174:16 name b
1053+174:17 tight glyph ]
1054+174:19 glyph `
1055+174:20 tight glyph [
1056+174:21 tight name a
1057+174:23 name b
1058+174:24 tight glyph ]
1059+176:1 DEDENT
1060+176:1 DEDENT
1061+176:1 DEDENT
1062+176:1 DEDENT
1063+176:1 DEDENT
1064+176:1 DEDENT
1065+176:1 NEWLINE
1066+176:1 glyph ++
1067+176:4 name clap
1068+176:9 glyph |=
1069+176:12 name args
1070+176:16 tight glyph =
1071+176:17 tight glyph [
1072+176:18 tight glyph (
1073+176:19 tight name unit
1074+176:24 tvar A
1075+176:25 tight glyph )
1076+176:27 glyph (
1077+176:28 tight name unit
1078+176:33 tvar A
1079+176:34 tight glyph )
1080+176:36 glyph $-(
1081+176:39 tight glyph [
1082+176:40 tight tvar A
1083+176:42 tvar A
1084+176:43 tight glyph ]
1085+176:45 tvar A
1086+176:46 tight glyph )
1087+176:47 tight glyph ]
1088+177:3 INDENT
1089+177:3 glyph ?-
1090+177:6 name args
1091+178:5 INDENT
1092+178:5 glyph [
1093+178:6 tight name first
1094+178:12 name second
1095+178:19 name combine
1096+178:26 tight glyph ]
1097+178:28 glyph ^-
1098+178:31 glyph (
1099+178:32 tight name unit
1100+178:37 tvar A
1101+178:38 tight glyph )
1102+179:7 INDENT
1103+179:7 glyph ?-
1104+179:10 name first
1105+180:9 INDENT
1106+180:9 lit ~
1107+180:11 name second
1108+181:9 NEWLINE
1109+181:9 glyph [
1110+181:10 tight lit ~
1111+181:12 name a
1112+181:13 tight glyph ]
1113+182:11 INDENT
1114+182:11 glyph ?-
1115+182:14 name second
1116+183:13 INDENT
1117+183:13 lit ~
1118+183:15 name first
1119+184:13 NEWLINE
1120+184:13 glyph [
1121+184:14 tight lit ~
1122+184:16 name b
1123+184:17 tight glyph ]
1124+184:19 glyph `
1125+184:20 tight glyph (
1126+184:21 tight name combine
1127+184:29 name a
1128+184:31 name b
1129+184:32 tight glyph )
1130+186:1 DEDENT
1131+186:1 DEDENT
1132+186:1 DEDENT
1133+186:1 DEDENT
1134+186:1 DEDENT
1135+186:1 DEDENT
1136+186:1 NEWLINE
1137+186:1 glyph ++
1138+186:4 name clef
1139+186:9 glyph |=
1140+186:12 name args
1141+186:16 tight glyph =
1142+186:17 tight glyph [
1143+186:18 tight glyph (
1144+186:19 tight name unit
1145+186:24 tvar A
1146+186:25 tight glyph )
1147+186:27 glyph (
1148+186:28 tight name unit
1149+186:33 tvar B
1150+186:34 tight glyph )
1151+186:36 glyph $-(
1152+186:39 tight glyph [
1153+186:40 tight tvar A
1154+186:42 tvar B
1155+186:43 tight glyph ]
1156+186:45 glyph (
1157+186:46 tight name unit
1158+186:51 tvar C
1159+186:52 tight glyph )
1160+186:53 tight glyph )
1161+186:54 tight glyph ]
1162+187:3 INDENT
1163+187:3 glyph ?-
1164+187:6 name args
1165+188:5 INDENT
1166+188:5 glyph [
1167+188:6 tight name first
1168+188:12 name second
1169+188:19 name combine
1170+188:26 tight glyph ]
1171+188:28 glyph ^-
1172+188:31 glyph (
1173+188:32 tight name unit
1174+188:37 tvar C
1175+188:38 tight glyph )
1176+189:7 INDENT
1177+189:7 glyph ?-
1178+189:10 name first
1179+190:9 INDENT
1180+190:9 lit ~
1181+190:11 lit ~
1182+191:9 NEWLINE
1183+191:9 glyph [
1184+191:10 tight lit ~
1185+191:12 name a
1186+191:13 tight glyph ]
1187+192:11 INDENT
1188+192:11 glyph ?-
1189+192:14 name second
1190+193:13 INDENT
1191+193:13 lit ~
1192+193:15 lit ~
1193+194:13 NEWLINE
1194+194:13 glyph [
1195+194:14 tight lit ~
1196+194:16 name b
1197+194:17 tight glyph ]
1198+194:19 glyph (
1199+194:20 tight name combine
1200+194:28 name a
1201+194:30 name b
1202+194:31 tight glyph )
1203+196:1 DEDENT
1204+196:1 DEDENT
1205+196:1 DEDENT
1206+196:1 DEDENT
1207+196:1 DEDENT
1208+196:1 DEDENT
1209+196:1 NEWLINE
1210+196:1 glyph ++
1211+196:4 name skim
1212+196:9 glyph |=
1213+196:12 name args
1214+196:16 tight glyph =
1215+196:17 tight glyph [
1216+196:18 tight glyph (
1217+196:19 tight name list
1218+196:24 tvar A
1219+196:25 tight glyph )
1220+196:27 glyph $-(
1221+196:30 tight tvar A
1222+196:32 glyph ?
1223+196:33 tight glyph )
1224+196:34 tight glyph ]
1225+197:3 INDENT
1226+197:3 glyph ?-
1227+197:6 name args
1228+198:5 INDENT
1229+198:5 glyph [
1230+198:6 tight name xs
1231+198:9 name predicate
1232+198:18 tight glyph ]
1233+198:20 glyph ^-
1234+198:23 glyph (
1235+198:24 tight name list
1236+198:29 tvar A
1237+198:30 tight glyph )
1238+199:9 INDENT
1239+199:9 glyph ?-
1240+199:12 name xs
1241+200:11 INDENT
1242+200:11 lit ~
1243+200:13 lit ~
1244+201:11 NEWLINE
1245+201:11 glyph [
1246+201:12 tight name item
1247+201:17 name rest
1248+201:21 tight glyph ]
1249+202:13 INDENT
1250+202:13 glyph ?-
1251+202:16 glyph (
1252+202:17 tight name predicate
1253+202:27 name item
1254+202:31 tight glyph )
1255+203:15 INDENT
1256+203:15 lit %.y
1257+203:19 glyph [
1258+203:20 tight name item
1259+203:25 glyph (
1260+203:26 tight name skim
1261+203:31 name rest
1262+203:36 name predicate
1263+203:45 tight glyph )
1264+203:46 tight glyph ]
1265+204:15 NEWLINE
1266+204:15 lit %.n
1267+204:19 glyph (
1268+204:20 tight name skim
1269+204:25 name rest
1270+204:30 name predicate
1271+204:39 tight glyph )
1272+206:1 DEDENT
1273+206:1 DEDENT
12591274206:1 DEDENT
12601275206:1 DEDENT
12611276206:1 DEDENT
12621277206:1 DEDENT
12631278206:1 NEWLINE
12641279206:1 glyph ++
1265−206:4 name reel
1280+206:4 name skip
12661281206:9 glyph |=
12671282206:12 name args
12681283206:16 tight glyph =
@@ -1271,47 +1286,555 @@
12711286206:19 tight name list
12721287206:24 tvar A
12731288206:25 tight glyph )
1274−206:27 tvar B
1275−206:29 glyph $-(
1276−206:32 tight glyph [
1277−206:33 tight tvar A
1278−206:35 tvar B
1279−206:36 tight glyph ]
1280−206:38 tvar B
1281−206:39 tight glyph )
1282−206:40 tight glyph ]
1289+206:27 glyph $-(
1290+206:30 tight tvar A
1291+206:32 glyph ?
1292+206:33 tight glyph )
1293+206:34 tight glyph ]
12831294207:3 INDENT
12841295207:3 glyph ?-
12851296207:6 name args
12861297208:5 INDENT
12871298208:5 glyph [
12881299208:6 tight name xs
1289−208:9 name start
1290−208:15 name combine
1291−208:22 tight glyph ]
1292−209:7 INDENT
1293−209:7 glyph ?-
1294−209:10 name xs
1295−210:9 INDENT
1296−210:9 lit ~
1297−210:11 name start
1298−211:9 NEWLINE
1299−211:9 glyph [
1300−211:10 tight name item
1301−211:15 name rest
1302−211:19 tight glyph ]
1303−211:21 glyph (
1304−211:22 tight name combine
1305−211:30 name item
1306−211:35 glyph (
1307−211:36 tight name reel
1308−211:41 name rest
1309−211:46 name start
1310−211:52 name combine
1311−211:59 tight glyph )
1312−211:60 tight glyph )
1313−211:61 DEDENT
1314−211:61 DEDENT
1315−211:61 DEDENT
1316−211:61 DEDENT
1317−211:61 NEWLINE
1300+208:9 name predicate
1301+208:18 tight glyph ]
1302+208:20 glyph ^-
1303+208:23 glyph (
1304+208:24 tight name list
1305+208:29 tvar A
1306+208:30 tight glyph )
1307+209:9 INDENT
1308+209:9 glyph ?-
1309+209:12 name xs
1310+210:11 INDENT
1311+210:11 lit ~
1312+210:13 lit ~
1313+211:11 NEWLINE
1314+211:11 glyph [
1315+211:12 tight name item
1316+211:17 name rest
1317+211:21 tight glyph ]
1318+212:13 INDENT
1319+212:13 glyph ?-
1320+212:16 glyph (
1321+212:17 tight name predicate
1322+212:27 name item
1323+212:31 tight glyph )
1324+213:15 INDENT
1325+213:15 lit %.y
1326+213:19 glyph (
1327+213:20 tight name skip
1328+213:25 name rest
1329+213:30 name predicate
1330+213:39 tight glyph )
1331+214:15 NEWLINE
1332+214:15 lit %.n
1333+214:19 glyph [
1334+214:20 tight name item
1335+214:25 glyph (
1336+214:26 tight name skip
1337+214:31 name rest
1338+214:36 name predicate
1339+214:45 tight glyph )
1340+214:46 tight glyph ]
1341+216:1 DEDENT
1342+216:1 DEDENT
1343+216:1 DEDENT
1344+216:1 DEDENT
1345+216:1 DEDENT
1346+216:1 DEDENT
1347+216:1 NEWLINE
1348+216:1 glyph ++
1349+216:4 name levy
1350+216:9 glyph |=
1351+216:12 name args
1352+216:16 tight glyph =
1353+216:17 tight glyph [
1354+216:18 tight glyph (
1355+216:19 tight name list
1356+216:24 tvar A
1357+216:25 tight glyph )
1358+216:27 glyph $-(
1359+216:30 tight tvar A
1360+216:32 glyph ?
1361+216:33 tight glyph )
1362+216:34 tight glyph ]
1363+217:3 INDENT
1364+217:3 glyph ?-
1365+217:6 name args
1366+218:5 INDENT
1367+218:5 glyph [
1368+218:6 tight name xs
1369+218:9 name predicate
1370+218:18 tight glyph ]
1371+219:7 INDENT
1372+219:7 glyph ?-
1373+219:10 name xs
1374+220:9 INDENT
1375+220:9 lit ~
1376+220:11 lit %.y
1377+221:9 NEWLINE
1378+221:9 glyph [
1379+221:10 tight name item
1380+221:15 name rest
1381+221:19 tight glyph ]
1382+222:11 INDENT
1383+222:11 glyph ?-
1384+222:14 glyph (
1385+222:15 tight name predicate
1386+222:25 name item
1387+222:29 tight glyph )
1388+223:13 INDENT
1389+223:13 lit %.y
1390+223:17 glyph (
1391+223:18 tight name levy
1392+223:23 name rest
1393+223:28 name predicate
1394+223:37 tight glyph )
1395+224:13 NEWLINE
1396+224:13 lit %.n
1397+224:17 lit %.n
1398+226:1 DEDENT
1399+226:1 DEDENT
1400+226:1 DEDENT
1401+226:1 DEDENT
1402+226:1 DEDENT
1403+226:1 DEDENT
1404+226:1 NEWLINE
1405+226:1 glyph ++
1406+226:4 name lien
1407+226:9 glyph |=
1408+226:12 name args
1409+226:16 tight glyph =
1410+226:17 tight glyph [
1411+226:18 tight glyph (
1412+226:19 tight name list
1413+226:24 tvar A
1414+226:25 tight glyph )
1415+226:27 glyph $-(
1416+226:30 tight tvar A
1417+226:32 glyph ?
1418+226:33 tight glyph )
1419+226:34 tight glyph ]
1420+227:3 INDENT
1421+227:3 glyph ?-
1422+227:6 name args
1423+228:5 INDENT
1424+228:5 glyph [
1425+228:6 tight name xs
1426+228:9 name predicate
1427+228:18 tight glyph ]
1428+229:7 INDENT
1429+229:7 glyph ?-
1430+229:10 name xs
1431+230:9 INDENT
1432+230:9 lit ~
1433+230:11 lit %.n
1434+231:9 NEWLINE
1435+231:9 glyph [
1436+231:10 tight name item
1437+231:15 name rest
1438+231:19 tight glyph ]
1439+232:11 INDENT
1440+232:11 glyph ?-
1441+232:14 glyph (
1442+232:15 tight name predicate
1443+232:25 name item
1444+232:29 tight glyph )
1445+233:13 INDENT
1446+233:13 lit %.y
1447+233:17 lit %.y
1448+234:13 NEWLINE
1449+234:13 lit %.n
1450+234:17 glyph (
1451+234:18 tight name lien
1452+234:23 name rest
1453+234:28 name predicate
1454+234:37 tight glyph )
1455+236:1 DEDENT
1456+236:1 DEDENT
1457+236:1 DEDENT
1458+236:1 DEDENT
1459+236:1 DEDENT
1460+236:1 DEDENT
1461+236:1 NEWLINE
1462+236:1 glyph ++
1463+236:4 name roll
1464+236:9 glyph |=
1465+236:12 name args
1466+236:16 tight glyph =
1467+236:17 tight glyph [
1468+236:18 tight glyph (
1469+236:19 tight name list
1470+236:24 tvar A
1471+236:25 tight glyph )
1472+236:27 tvar B
1473+236:29 glyph $-(
1474+236:32 tight glyph [
1475+236:33 tight tvar A
1476+236:35 tvar B
1477+236:36 tight glyph ]
1478+236:38 tvar B
1479+236:39 tight glyph )
1480+236:40 tight glyph ]
1481+237:3 INDENT
1482+237:3 glyph ?-
1483+237:6 name args
1484+238:5 INDENT
1485+238:5 glyph [
1486+238:6 tight name xs
1487+238:9 name start
1488+238:15 name combine
1489+238:22 tight glyph ]
1490+239:7 INDENT
1491+239:7 glyph ?-
1492+239:10 name xs
1493+240:9 INDENT
1494+240:9 lit ~
1495+240:11 name start
1496+241:9 NEWLINE
1497+241:9 glyph [
1498+241:10 tight name item
1499+241:15 name rest
1500+241:19 tight glyph ]
1501+241:21 glyph (
1502+241:22 tight name roll
1503+241:27 name rest
1504+241:32 glyph (
1505+241:33 tight name combine
1506+241:41 name item
1507+241:46 name start
1508+241:51 tight glyph )
1509+241:53 name combine
1510+241:60 tight glyph )
1511+243:1 DEDENT
1512+243:1 DEDENT
1513+243:1 DEDENT
1514+243:1 DEDENT
1515+243:1 NEWLINE
1516+243:1 glyph ++
1517+243:4 name reel
1518+243:9 glyph |=
1519+243:12 name args
1520+243:16 tight glyph =
1521+243:17 tight glyph [
1522+243:18 tight glyph (
1523+243:19 tight name list
1524+243:24 tvar A
1525+243:25 tight glyph )
1526+243:27 tvar B
1527+243:29 glyph $-(
1528+243:32 tight glyph [
1529+243:33 tight tvar A
1530+243:35 tvar B
1531+243:36 tight glyph ]
1532+243:38 tvar B
1533+243:39 tight glyph )
1534+243:40 tight glyph ]
1535+244:3 INDENT
1536+244:3 glyph ?-
1537+244:6 name args
1538+245:5 INDENT
1539+245:5 glyph [
1540+245:6 tight name xs
1541+245:9 name start
1542+245:15 name combine
1543+245:22 tight glyph ]
1544+246:7 INDENT
1545+246:7 glyph ?-
1546+246:10 name xs
1547+247:9 INDENT
1548+247:9 lit ~
1549+247:11 name start
1550+248:9 NEWLINE
1551+248:9 glyph [
1552+248:10 tight name item
1553+248:15 name rest
1554+248:19 tight glyph ]
1555+248:21 glyph (
1556+248:22 tight name combine
1557+248:30 name item
1558+248:35 glyph (
1559+248:36 tight name reel
1560+248:41 name rest
1561+248:46 name start
1562+248:52 name combine
1563+248:59 tight glyph )
1564+248:60 tight glyph )
1565+250:1 DEDENT
1566+250:1 DEDENT
1567+250:1 DEDENT
1568+250:1 DEDENT
1569+250:1 NEWLINE
1570+250:1 glyph ++
1571+250:4 name flit
1572+250:9 glyph |=
1573+250:12 name predicate
1574+250:21 tight glyph =
1575+250:22 tight glyph $-(
1576+250:25 tight tvar A
1577+250:27 glyph ?
1578+250:28 tight glyph )
1579+251:3 INDENT
1580+251:3 glyph |=
1581+251:6 name value
1582+251:11 tight glyph =
1583+251:12 tight tvar A
1584+252:5 INDENT
1585+252:5 glyph ^-
1586+252:8 glyph (
1587+252:9 tight name unit
1588+252:14 tvar A
1589+252:15 tight glyph )
1590+253:7 INDENT
1591+253:7 glyph ?-
1592+253:10 glyph (
1593+253:11 tight name predicate
1594+253:21 name value
1595+253:26 tight glyph )
1596+254:9 INDENT
1597+254:9 lit %.y
1598+254:13 glyph `
1599+254:14 tight name value
1600+255:9 NEWLINE
1601+255:9 lit %.n
1602+255:13 lit ~
1603+257:1 DEDENT
1604+257:1 DEDENT
1605+257:1 DEDENT
1606+257:1 DEDENT
1607+257:1 NEWLINE
1608+257:1 glyph ++
1609+257:4 name murn
1610+257:9 glyph |=
1611+257:12 name args
1612+257:16 tight glyph =
1613+257:17 tight glyph [
1614+257:18 tight glyph (
1615+257:19 tight name list
1616+257:24 tvar A
1617+257:25 tight glyph )
1618+257:27 glyph $-(
1619+257:30 tight tvar A
1620+257:32 glyph (
1621+257:33 tight name unit
1622+257:38 tvar B
1623+257:39 tight glyph )
1624+257:40 tight glyph )
1625+257:41 tight glyph ]
1626+258:3 INDENT
1627+258:3 glyph ?-
1628+258:6 name args
1629+259:5 INDENT
1630+259:5 glyph [
1631+259:6 tight name xs
1632+259:9 name f
1633+259:10 tight glyph ]
1634+259:12 glyph ^-
1635+259:15 glyph (
1636+259:16 tight name list
1637+259:21 tvar B
1638+259:22 tight glyph )
1639+260:9 INDENT
1640+260:9 glyph ?-
1641+260:12 name xs
1642+261:11 INDENT
1643+261:11 lit ~
1644+261:13 lit ~
1645+262:11 NEWLINE
1646+262:11 glyph [
1647+262:12 tight name item
1648+262:17 name rest
1649+262:21 tight glyph ]
1650+263:13 INDENT
1651+263:13 glyph ?-
1652+263:16 glyph (
1653+263:17 tight name f
1654+263:19 name item
1655+263:23 tight glyph )
1656+264:15 INDENT
1657+264:15 lit ~
1658+264:17 glyph (
1659+264:18 tight name murn
1660+264:23 name rest
1661+264:28 name f
1662+264:29 tight glyph )
1663+265:15 NEWLINE
1664+265:15 glyph [
1665+265:16 tight lit ~
1666+265:18 name value
1667+265:23 tight glyph ]
1668+265:25 glyph [
1669+265:26 tight name value
1670+265:32 glyph (
1671+265:33 tight name murn
1672+265:38 name rest
1673+265:43 name f
1674+265:44 tight glyph )
1675+265:45 tight glyph ]
1676+267:1 DEDENT
1677+267:1 DEDENT
1678+267:1 DEDENT
1679+267:1 DEDENT
1680+267:1 DEDENT
1681+267:1 DEDENT
1682+267:1 NEWLINE
1683+267:1 glyph ++
1684+267:4 name join
1685+267:9 glyph |=
1686+267:12 name args
1687+267:16 tight glyph =
1688+267:17 tight glyph [
1689+267:18 tight tvar A
1690+267:20 glyph (
1691+267:21 tight name list
1692+267:26 tvar A
1693+267:27 tight glyph )
1694+267:28 tight glyph ]
1695+268:3 INDENT
1696+268:3 glyph ?-
1697+268:6 name args
1698+269:5 INDENT
1699+269:5 glyph [
1700+269:6 tight name separator
1701+269:16 name xs
1702+269:18 tight glyph ]
1703+269:20 glyph ^-
1704+269:23 glyph (
1705+269:24 tight name list
1706+269:29 tvar A
1707+269:30 tight glyph )
1708+270:9 INDENT
1709+270:9 glyph ?-
1710+270:12 name xs
1711+271:11 INDENT
1712+271:11 lit ~
1713+271:13 lit ~
1714+272:11 NEWLINE
1715+272:11 glyph [
1716+272:12 tight name item
1717+272:17 name rest
1718+272:21 tight glyph ]
1719+273:13 INDENT
1720+273:13 glyph ?-
1721+273:16 name rest
1722+274:15 INDENT
1723+274:15 lit ~
1724+274:17 glyph [
1725+274:18 tight name item
1726+274:23 lit ~
1727+274:24 tight glyph ]
1728+275:15 NEWLINE
1729+275:15 glyph [
1730+275:16 tight name next
1731+275:21 name more
1732+275:25 tight glyph ]
1733+275:27 glyph [
1734+275:28 tight name item
1735+275:33 glyph [
1736+275:34 tight name separator
1737+275:44 glyph (
1738+275:45 tight name join
1739+275:50 name separator
1740+275:60 name rest
1741+275:64 tight glyph )
1742+275:65 tight glyph ]
1743+275:66 tight glyph ]
1744+277:1 DEDENT
1745+277:1 DEDENT
1746+277:1 DEDENT
1747+277:1 DEDENT
1748+277:1 DEDENT
1749+277:1 DEDENT
1750+277:1 NEWLINE
1751+277:1 glyph ++
1752+277:4 name snip
1753+277:9 glyph |=
1754+277:12 name xs
1755+277:14 tight glyph =
1756+277:15 tight glyph (
1757+277:16 tight name list
1758+277:21 tvar A
1759+277:22 tight glyph )
1760+278:3 INDENT
1761+278:3 glyph ^-
1762+278:6 glyph (
1763+278:7 tight name list
1764+278:12 tvar A
1765+278:13 tight glyph )
1766+279:5 INDENT
1767+279:5 glyph ?-
1768+279:8 name xs
1769+280:7 INDENT
1770+280:7 lit ~
1771+280:9 lit ~
1772+281:7 NEWLINE
1773+281:7 glyph [
1774+281:8 tight name item
1775+281:13 name rest
1776+281:17 tight glyph ]
1777+282:9 INDENT
1778+282:9 glyph ?-
1779+282:12 name rest
1780+283:11 INDENT
1781+283:11 lit ~
1782+283:13 lit ~
1783+284:11 NEWLINE
1784+284:11 glyph [
1785+284:12 tight name next
1786+284:17 name more
1787+284:21 tight glyph ]
1788+284:23 glyph [
1789+284:24 tight name item
1790+284:29 glyph (
1791+284:30 tight name snip
1792+284:35 name rest
1793+284:39 tight glyph )
1794+284:40 tight glyph ]
1795+286:1 DEDENT
1796+286:1 DEDENT
1797+286:1 DEDENT
1798+286:1 DEDENT
1799+286:1 DEDENT
1800+286:1 NEWLINE
1801+286:1 glyph ++
1802+286:4 name rear
1803+286:9 glyph |=
1804+286:12 name xs
1805+286:14 tight glyph =
1806+286:15 tight glyph (
1807+286:16 tight name list
1808+286:21 tvar A
1809+286:22 tight glyph )
1810+287:3 INDENT
1811+287:3 glyph ?-
1812+287:6 name xs
1813+288:5 INDENT
1814+288:5 lit ~
1815+288:7 glyph !!
1816+289:5 NEWLINE
1817+289:5 glyph [
1818+289:6 tight name item
1819+289:11 name rest
1820+289:15 tight glyph ]
1821+290:7 INDENT
1822+290:7 glyph ?-
1823+290:10 name rest
1824+291:9 INDENT
1825+291:9 lit ~
1826+291:11 name item
1827+292:9 NEWLINE
1828+292:9 glyph [
1829+292:10 tight name next
1830+292:15 name more
1831+292:19 tight glyph ]
1832+292:21 glyph (
1833+292:22 tight name rear
1834+292:27 name rest
1835+292:31 tight glyph )
1836+292:32 DEDENT
1837+292:32 DEDENT
1838+292:32 DEDENT
1839+292:32 DEDENT
1840+292:32 NEWLINE
tests/golden/prelude-unit-list-transforms/tree.txt+747−513
@@ -1,19 +1,11 @@
11(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
2+ (jibb 1:1 internal /lib/jibb/internal)
3+ (mold 2:1 poke (ref 2:9 poke.internal))
4+ (value 6:1 same
5+ (gate 6:9
6+ (face 6:12 x (tvar 6:14 A))
7+ (wing 6:16 x)))
8+ (value 8:1 head
179 (gate 8:9
1810 (face 8:12 p
1911 (cell 8:14 (tvar 8:15 A) (tvar 8:17 B)))
@@ -22,539 +14,781 @@
2214 (wing 9:6 p)
2315 (arm 10:5
2416 (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))
17+ (wing 10:11 a))))))
18+ (value 12:1 tail
19+ (gate 12:9
20+ (face 12:12 p
21+ (cell 12:14 (tvar 12:15 A) (tvar 12:17 B)))
2922 (body 13:3
3023 (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
24+ (wing 13:6 p)
25+ (arm 14:5
26+ (cell 14:5 (bind 14:6 a) (bind 14:8 b))
27+ (wing 14:11 b))))))
28+ (value 16:1 not
29+ (gate 16:8
30+ (face 16:11 b (flag 16:13))
31+ (body 17:3
32+ (branch 17:3
33+ (wing 17:6 b)
34+ (arm 18:5 (lit 18:5 %.y) (lit 18:9 %.n))
35+ (arm 19:5 (lit 19:5 %.n) (lit 19:9 %.y))))))
36+ (mold 21:1 list
4337 (generic 21:9 A
4438 (union 22:3
4539 (const 22:3 ~)
4640 (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)
41+ (face 23:4 i (tvar 23:6 A))
42+ (face 23:8 t
43+ (apply 23:10 list (tvar 23:16 A)))))))
44+ (mold 25:1 unit
45+ (generic 25:9 A
46+ (union 26:3
47+ (const 26:3 ~)
48+ (cell 27:3
49+ (const 27:4 ~)
50+ (face 27:6 u (tvar 27:8 A))))))
51+ (value 29:1 fall
52+ (gate 29:9
53+ (face 29:12 args
54+ (cell 29:17
55+ (apply 29:18 unit (tvar 29:24 A))
56+ (tvar 29:27 A)))
57+ (body 30:3
58+ (branch 30:3
59+ (wing 30:6 args)
60+ (arm 31:5
61+ (cell 31:5 (bind 31:6 maybe) (bind 31:12 fallback))
62+ (body 32:7
63+ (branch 32:7
64+ (wing 32:10 maybe)
65+ (arm 33:9 (lit 33:9 ~) (wing 33:11 fallback))
66+ (arm 34:9
67+ (cell 34:9 (lit 34:10 ~) (bind 34:12 value))
68+ (wing 34:19 value)))))))))
69+ (value 36:1 need
70+ (gate 36:9
71+ (face 36:12 maybe
72+ (apply 36:18 unit (tvar 36:24 A)))
73+ (body 37:3
74+ (branch 37:3
75+ (wing 37:6 maybe)
76+ (arm 38:5 (lit 38:5 ~) (crash 38:7))
8777 (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
78+ (cell 39:5 (lit 39:6 ~) (bind 39:8 value))
79+ (wing 39:15 value))))))
80+ (value 41:1 weld
81+ (gate 41:9
82+ (face 41:12 args
83+ (cell 41:17
84+ (apply 41:18 list (tvar 41:24 A))
85+ (apply 41:27 list (tvar 41:33 A))))
86+ (body 42:3
87+ (branch 42:3
88+ (wing 42:6 args)
89+ (arm 43:5
90+ (cell 43:5 (bind 43:6 xs) (bind 43:9 ys))
91+ (body 44:7
92+ (cast 44:7
93+ (apply 44:10 list (tvar 44:16 A))
94+ (body 45:9
95+ (branch 45:9
96+ (wing 45:12 xs)
97+ (arm 46:11 (lit 46:11 ~) (wing 46:13 ys))
98+ (arm 47:11
99+ (cell 47:11 (bind 47:12 item) (bind 47:17 rest))
100+ (tuple 47:23
101+ (wing 47:24 item)
102+ (group 47:29
103+ (call 47:30 (wing 47:30 weld) (wing 47:35 rest) (wing 47:40 ys))))))))))))))
104+ (value 49:1 turn
105+ (gate 49:9
106+ (face 49:12 args
107+ (cell 49:17
108+ (apply 49:18 list (tvar 49:24 A))
109+ (fn 49:27 (tvar 49:30 A) (tvar 49:32 B))))
110+ (body 50:3
111+ (branch 50:3
112+ (wing 50:6 args)
113+ (arm 51:5
114+ (cell 51:5 (bind 51:6 xs) (bind 51:9 f))
115+ (body 52:7
116+ (cast 52:7
117+ (apply 52:10 list (tvar 52:16 B))
118+ (body 53:9
119+ (branch 53:9
120+ (wing 53:12 xs)
121+ (arm 54:11 (lit 54:11 ~) (lit 54:13 ~))
122+ (arm 55:11
123+ (cell 55:11 (bind 55:12 item) (bind 55:17 rest))
124+ (tuple 55:23
125+ (group 55:24
126+ (call 55:25 (wing 55:25 f) (wing 55:27 item)))
127+ (group 55:33
128+ (call 55:34 (wing 55:34 turn) (wing 55:39 rest) (wing 55:44 f))))))))))))))
129+ (mold 57:1 dime
130+ (cell 57:9
131+ (face 57:10 p (aura 57:12 @ta))
132+ (face 57:16 q (aura 57:18 @))))
133+ (mold 59:1 hair
134+ (cell 59:9
135+ (face 59:10 p (aura 59:12 @ud))
136+ (face 59:16 q (aura 59:18 @ud))))
137+ (mold 61:1 pint
138+ (cell 61:9
139+ (face 61:10 p
140+ (cell 61:12
141+ (face 61:13 p (aura 61:15 @))
142+ (face 61:17 q (aura 61:19 @))))
143+ (face 61:22 q
144+ (cell 61:24
145+ (face 61:25 p (aura 61:27 @))
146+ (face 61:29 q (aura 61:31 @))))))
147+ (mold 63:1 coin
148+ (union 64:3
149+ (cell 64:3
150+ (const 64:4 %$)
151+ (face 64:7 p (ref 64:9 dime)))
152+ (cell 65:3
153+ (const 65:4 %blob)
154+ (face 65:10 p (noun 65:12)))
155+ (cell 66:3
156+ (const 66:4 %many)
157+ (face 66:10 p
158+ (apply 66:12 list (ref 66:18 coin))))))
159+ (mold 68:1 pair
160+ (generic 68:9 A B
161+ (cell 68:18
162+ (face 68:19 p (tvar 68:21 A))
163+ (face 68:23 q (tvar 68:25 B)))))
164+ (mold 70:1 trel
165+ (generic 70:9 A B C
166+ (cell 70:20
167+ (face 70:21 p (tvar 70:23 A))
168+ (face 70:25 q (tvar 70:27 B))
169+ (face 70:29 r (tvar 70:31 C)))))
170+ (mold 72:1 qual
171+ (generic 72:9 A B C D
172+ (cell 72:22
173+ (face 72:23 p (tvar 72:25 A))
174+ (face 72:27 q (tvar 72:29 B))
175+ (face 72:31 r (tvar 72:33 C))
176+ (face 72:35 s (tvar 72:37 D)))))
177+ (mold 74:1 cord (aura 74:9 @t))
178+ (mold 76:1 knot (aura 76:9 @ta))
179+ (mold 78:1 tape
180+ (apply 78:9 list (aura 78:15 @tD)))
181+ (mold 80:1 path
182+ (apply 80:9 list (ref 80:15 knot)))
183+ (mold 82:1 tank
184+ (union 83:3
185+ (ref 83:3 cord)
186+ (cell 84:3
187+ (const 84:4 %leaf)
188+ (face 84:10 p (ref 84:12 tape)))
189+ (cell 85:3
190+ (const 85:4 %palm)
191+ (face 85:10 p
192+ (apply 85:12 qual (ref 85:18 tape) (ref 85:23 tape) (ref 85:28 tape) (ref 85:33 tape)))
193+ (face 85:39 q
194+ (apply 85:41 list (ref 85:47 tank))))
195+ (cell 86:3
196+ (const 86:4 %rose)
197+ (face 86:10 p
198+ (apply 86:12 trel (ref 86:18 tape) (ref 86:23 tape) (ref 86:28 tape)))
199+ (face 86:34 q
200+ (apply 86:36 list (ref 86:42 tank))))))
201+ (mold 88:1 nail
208202 (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
203+ (face 88:10 p (ref 88:12 hair))
204+ (face 88:17 q (ref 88:19 tape))))
205+ (mold 90:1 edge
206+ (cell 90:9
207+ (face 90:10 p (ref 90:12 hair))
208+ (face 90:17 q
209+ (apply 90:19 unit
210+ (cell 90:25
211+ (face 90:26 p (noun 90:28))
212+ (face 90:30 q (ref 90:32 nail)))))))
213+ (mold 92:1 rule
214+ (fn 92:9 (ref 92:12 nail) (ref 92:17 edge)))
215+ (mold 94:1 spot
216+ (cell 94:9
217+ (face 94:10 p (ref 94:12 path))
218+ (face 94:17 q (ref 94:19 pint))))
219+ (mold 96:1 toon
220+ (union 97:3
221+ (cell 97:3
222+ (const 97:4 %0)
223+ (face 97:7 p (noun 97:9)))
224+ (cell 98:3
225+ (const 98:4 %1)
226+ (face 98:7 p (noun 98:9)))
227+ (cell 99:3
228+ (const 99:4 %2)
229+ (face 99:7 p
230+ (apply 99:9 list (ref 99:15 tank))))))
231+ (mold 101:1 like
232+ (generic 101:9 A
233+ (cell 101:16
234+ (face 101:17 p (ref 101:19 hair))
235+ (face 101:24 q
236+ (apply 101:26 unit
237+ (cell 101:32
238+ (face 101:33 p (tvar 101:35 A))
239+ (face 101:37 q (ref 101:39 nail))))))))
240+ (value 103:1 wonk
241+ (gate 103:9
242+ (face 103:12 veq
243+ (apply 103:16 like (tvar 103:22 A)))
244+ (body 104:3
245+ (branch 104:3
246+ (wing 104:6 q.veq)
247+ (arm 105:5 (lit 105:5 ~) (crash 105:7))
248+ (arm 106:5
249+ (cell 106:5 (lit 106:6 ~) (bind 106:8 product))
250+ (wing 106:17 p.product))))))
251+ (mold 108:1 lone
252+ (generic 108:9 A
253+ (cell 108:16
254+ (face 108:17 p (tvar 108:19 A)))))
255+ (mold 110:1 lest
256+ (generic 110:9 A
257+ (cell 110:16
258+ (face 110:17 i (tvar 110:19 A))
259+ (face 110:21 t
260+ (apply 110:23 list (tvar 110:29 A))))))
261+ (mold 112:1 pole
266262 (generic 112:9 A
267263 (union 113:3
268264 (const 113:3 ~)
269265 (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
266+ (tvar 114:4 A)
267+ (apply 114:6 pole (tvar 114:12 A))))))
268+ (mold 116:1 quip
276269 (generic 116:9 A B
277− (union 117:3
278− (cell 117:3
279− (const 117:4 %|)
280− (face 117:7 p (tvar 117:9 B)))
281− (cell 118:3
282− (const 118:4 %&)
283− (face 118:7 p (tvar 118:9 A))))))
284− (mold 120:1 bloq (aura 120:9 @))
285− (value 122:1 some
286− (gate 122:9
287− (face 122:12 item (tvar 122:17 A))
288− (unit 122:19 (wing 122:20 item))))
289− (value 124:1 lure
290− (gate 124:9
291− (face 124:12 item (tvar 124:17 A))
292− (body 125:3
293− (cast 125:3
294− (apply 125:6 list (tvar 125:12 A))
295− (tuple 125:15 (wing 125:16 item) (lit 125:21 ~))))))
296− (value 127:1 snoc
297− (gate 127:9
298− (face 127:12 args
299− (cell 127:17
300− (apply 127:18 list (tvar 127:24 A))
301− (tvar 127:27 A)))
302− (body 128:3
303− (branch 128:3
304− (wing 128:6 args)
305− (arm 129:5
306− (cell 129:5 (bind 129:6 xs) (bind 129:9 item))
307− (group 129:15
308− (call 129:16
309− (wing 129:16 weld)
310− (wing 129:21 xs)
311− (tuple 129:24 (wing 129:25 item) (lit 129:30 ~)))))))))
312− (value 131:1 flop
313− (gate 131:9
314− (face 131:12 xs
315− (apply 131:15 list (tvar 131:21 A)))
316− (body 132:3
317− (value 132:3 reverse-into
318− (gate 132:19
319− (face 132:22 args
320− (cell 132:27
321− (apply 132:28 list (tvar 132:34 A))
322− (apply 132:37 list (tvar 132:43 A))))
323− (body 133:5
324− (branch 133:5
325− (wing 133:8 args)
326− (arm 134:7
327− (cell 134:7 (bind 134:8 rest) (bind 134:13 acc))
328− (body 135:9
329− (branch 135:9
330− (wing 135:12 rest)
331− (arm 136:11 (lit 136:11 ~) (wing 136:13 acc))
332− (arm 137:11
333− (cell 137:11 (bind 137:12 item) (bind 137:17 more))
334− (group 137:23
335− (call 137:24
336− (wing 137:24 reverse-into)
337− (wing 137:37 more)
338− (tuple 137:42 (wing 137:43 item) (wing 137:48 acc))))))))))))
339− (group 138:3
340− (call 138:4 (wing 138:4 reverse-into) (wing 138:17 xs) (lit 138:20 ~))))))
341− (value 140:1 drop
342− (gate 140:9
343− (face 140:12 maybe
344− (apply 140:18 unit (tvar 140:24 A)))
345− (body 141:3
346− (branch 141:3
347− (wing 141:6 maybe)
348− (arm 142:5 (lit 142:5 ~) (lit 142:7 ~))
349− (arm 143:5
350− (cell 143:5 (lit 143:6 ~) (bind 143:8 value))
351− (tuple 143:15 (wing 143:16 value) (lit 143:22 ~)))))))
352− (value 145:1 bind
353− (gate 145:9
354− (face 145:12 args
355− (cell 145:17
356− (apply 145:18 unit (tvar 145:24 A))
357− (fn 145:27 (tvar 145:30 A) (tvar 145:32 B))))
358− (body 146:3
359− (branch 146:3
360− (wing 146:6 args)
361− (arm 147:5
362− (cell 147:5 (bind 147:6 maybe) (bind 147:12 f))
363− (body 148:7
364− (branch 148:7
365− (wing 148:10 maybe)
366− (arm 149:9 (lit 149:9 ~) (lit 149:11 ~))
367− (arm 150:9
368− (cell 150:9 (lit 150:10 ~) (bind 150:12 value))
369− (unit 150:19
370− (group 150:20
371− (call 150:21 (wing 150:21 f) (wing 150:23 value))))))))))))
372− (value 152:1 biff
270+ (cell 116:18
271+ (apply 116:19 list (tvar 116:25 A))
272+ (tvar 116:28 B))))
273+ (mold 118:1 tree
274+ (generic 118:9 A
275+ (union 119:3
276+ (const 119:3 ~)
277+ (cell 120:3
278+ (face 120:4 n (tvar 120:6 A))
279+ (face 120:8 l
280+ (apply 120:10 tree (tvar 120:16 A)))
281+ (face 120:19 r
282+ (apply 120:21 tree (tvar 120:27 A)))))))
283+ (mold 122:1 each
284+ (generic 122:9 A B
285+ (union 123:3
286+ (cell 123:3
287+ (const 123:4 %|)
288+ (face 123:7 p (tvar 123:9 B)))
289+ (cell 124:3
290+ (const 124:4 %&)
291+ (face 124:7 p (tvar 124:9 A))))))
292+ (mold 126:1 bloq (aura 126:9 @))
293+ (value 128:1 some
294+ (gate 128:9
295+ (face 128:12 item (tvar 128:17 A))
296+ (unit 128:19 (wing 128:20 item))))
297+ (value 130:1 lure
298+ (gate 130:9
299+ (face 130:12 item (tvar 130:17 A))
300+ (body 131:3
301+ (cast 131:3
302+ (apply 131:6 list (tvar 131:12 A))
303+ (tuple 131:15 (wing 131:16 item) (lit 131:21 ~))))))
304+ (value 133:1 snoc
305+ (gate 133:9
306+ (face 133:12 args
307+ (cell 133:17
308+ (apply 133:18 list (tvar 133:24 A))
309+ (tvar 133:27 A)))
310+ (body 134:3
311+ (branch 134:3
312+ (wing 134:6 args)
313+ (arm 135:5
314+ (cell 135:5 (bind 135:6 xs) (bind 135:9 item))
315+ (group 135:15
316+ (call 135:16
317+ (wing 135:16 weld)
318+ (wing 135:21 xs)
319+ (tuple 135:24 (wing 135:25 item) (lit 135:30 ~)))))))))
320+ (value 137:1 flop
321+ (gate 137:9
322+ (face 137:12 xs
323+ (apply 137:15 list (tvar 137:21 A)))
324+ (body 138:3
325+ (value 138:3 reverse-into
326+ (gate 138:19
327+ (face 138:22 args
328+ (cell 138:27
329+ (apply 138:28 list (tvar 138:34 A))
330+ (apply 138:37 list (tvar 138:43 A))))
331+ (body 139:5
332+ (branch 139:5
333+ (wing 139:8 args)
334+ (arm 140:7
335+ (cell 140:7 (bind 140:8 rest) (bind 140:13 acc))
336+ (body 141:9
337+ (branch 141:9
338+ (wing 141:12 rest)
339+ (arm 142:11 (lit 142:11 ~) (wing 142:13 acc))
340+ (arm 143:11
341+ (cell 143:11 (bind 143:12 item) (bind 143:17 more))
342+ (group 143:23
343+ (call 143:24
344+ (wing 143:24 reverse-into)
345+ (wing 143:37 more)
346+ (tuple 143:42 (wing 143:43 item) (wing 143:48 acc))))))))))))
347+ (group 144:3
348+ (call 144:4 (wing 144:4 reverse-into) (wing 144:17 xs) (lit 144:20 ~))))))
349+ (value 146:1 drop
350+ (gate 146:9
351+ (face 146:12 maybe
352+ (apply 146:18 unit (tvar 146:24 A)))
353+ (body 147:3
354+ (cast 147:3
355+ (apply 147:6 list (tvar 147:12 A))
356+ (body 148:5
357+ (branch 148:5
358+ (wing 148:8 maybe)
359+ (arm 149:7 (lit 149:7 ~) (lit 149:9 ~))
360+ (arm 150:7
361+ (cell 150:7 (lit 150:8 ~) (bind 150:10 value))
362+ (tuple 150:17 (wing 150:18 value) (lit 150:24 ~)))))))))
363+ (value 152:1 bind
373364 (gate 152:9
374365 (face 152:12 args
375366 (cell 152:17
376367 (apply 152:18 unit (tvar 152:24 A))
377− (fn 152:27
378− (tvar 152:30 A)
379− (apply 152:32 unit (tvar 152:38 B)))))
368+ (fn 152:27 (tvar 152:30 A) (tvar 152:32 B))))
380369 (body 153:3
381370 (branch 153:3
382371 (wing 153:6 args)
383372 (arm 154:5
384373 (cell 154:5 (bind 154:6 maybe) (bind 154:12 f))
385− (body 155:7
386− (branch 155:7
387− (wing 155:10 maybe)
388− (arm 156:9 (lit 156:9 ~) (lit 156:11 ~))
389− (arm 157:9
390− (cell 157:9 (lit 157:10 ~) (bind 157:12 value))
391− (group 157:19
392− (call 157:20 (wing 157:20 f) (wing 157:22 value)))))))))))
393− (value 159:1 both
374+ (cast 154:15
375+ (apply 154:18 unit (tvar 154:24 B))
376+ (body 155:7
377+ (branch 155:7
378+ (wing 155:10 maybe)
379+ (arm 156:9 (lit 156:9 ~) (lit 156:11 ~))
380+ (arm 157:9
381+ (cell 157:9 (lit 157:10 ~) (bind 157:12 value))
382+ (unit 157:19
383+ (group 157:20
384+ (call 157:21 (wing 157:21 f) (wing 157:23 value)))))))))))))
385+ (value 159:1 biff
394386 (gate 159:9
395387 (face 159:12 args
396388 (cell 159:17
397389 (apply 159:18 unit (tvar 159:24 A))
398− (apply 159:27 unit (tvar 159:33 B))))
390+ (fn 159:27
391+ (tvar 159:30 A)
392+ (apply 159:32 unit (tvar 159:38 B)))))
399393 (body 160:3
400394 (branch 160:3
401395 (wing 160:6 args)
402396 (arm 161:5
403− (cell 161:5 (bind 161:6 first) (bind 161:12 second))
404− (body 162:7
405− (branch 162:7
406− (wing 162:10 first)
407− (arm 163:9 (lit 163:9 ~) (lit 163:11 ~))
408− (arm 164:9
409− (cell 164:9 (lit 164:10 ~) (bind 164:12 a))
410− (body 165:11
411− (branch 165:11
412− (wing 165:14 second)
413− (arm 166:13 (lit 166:13 ~) (lit 166:15 ~))
414− (arm 167:13
415− (cell 167:13 (lit 167:14 ~) (bind 167:16 b))
416− (unit 167:19
417− (tuple 167:20 (wing 167:21 a) (wing 167:23 b))))))))))))))
418− (value 169:1 clef
419− (gate 169:9
420− (face 169:12 args
421− (cell 169:17
422− (apply 169:18 unit (tvar 169:24 A))
423− (apply 169:27 unit (tvar 169:33 B))
424− (fn 169:36
425− (cell 169:39 (tvar 169:40 A) (tvar 169:42 B))
426− (apply 169:45 unit (tvar 169:51 C)))))
427− (body 170:3
428− (branch 170:3
429− (wing 170:6 args)
430− (arm 171:5
431− (cell 171:5 (bind 171:6 first) (bind 171:12 second) (bind 171:19 combine))
432− (body 172:7
433− (branch 172:7
434− (wing 172:10 first)
435− (arm 173:9 (lit 173:9 ~) (lit 173:11 ~))
436− (arm 174:9
437− (cell 174:9 (lit 174:10 ~) (bind 174:12 a))
438− (body 175:11
439− (branch 175:11
440− (wing 175:14 second)
441− (arm 176:13 (lit 176:13 ~) (lit 176:15 ~))
442− (arm 177:13
443− (cell 177:13 (lit 177:14 ~) (bind 177:16 b))
444− (group 177:19
445− (call 177:20 (wing 177:20 combine) (wing 177:28 a) (wing 177:30 b))))))))))))))
446− (value 179:1 skim
447− (gate 179:9
448− (face 179:12 args
449− (cell 179:17
450− (apply 179:18 list (tvar 179:24 A))
451− (fn 179:27 (tvar 179:30 A) (flag 179:32))))
452− (body 180:3
453− (branch 180:3
454− (wing 180:6 args)
455− (arm 181:5
456− (cell 181:5 (bind 181:6 xs) (bind 181:9 predicate))
457− (body 182:7
458− (branch 182:7
459− (wing 182:10 xs)
460− (arm 183:9 (lit 183:9 ~) (lit 183:11 ~))
461− (arm 184:9
462− (cell 184:9 (bind 184:10 item) (bind 184:15 rest))
463− (body 185:11
464− (branch 185:11
465− (group 185:14
466− (call 185:15 (wing 185:15 predicate) (wing 185:25 item)))
467− (arm 186:13
468− (lit 186:13 %.y)
469− (tuple 186:17
470− (wing 186:18 item)
471− (group 186:23
472− (call 186:24 (wing 186:24 skim) (wing 186:29 rest) (wing 186:34 predicate)))))
473− (arm 187:13
474− (lit 187:13 %.n)
475− (group 187:17
476− (call 187:18 (wing 187:18 skim) (wing 187:23 rest) (wing 187:28 predicate))))))))))))))
477− (value 189:1 skip
478− (gate 189:9
479− (face 189:12 args
480− (cell 189:17
481− (apply 189:18 list (tvar 189:24 A))
482− (fn 189:27 (tvar 189:30 A) (flag 189:32))))
483− (body 190:3
484− (branch 190:3
485− (wing 190:6 args)
486− (arm 191:5
487− (cell 191:5 (bind 191:6 xs) (bind 191:9 predicate))
488− (body 192:7
489− (branch 192:7
490− (wing 192:10 xs)
491− (arm 193:9 (lit 193:9 ~) (lit 193:11 ~))
492− (arm 194:9
493− (cell 194:9 (bind 194:10 item) (bind 194:15 rest))
494− (body 195:11
495− (branch 195:11
496− (group 195:14
497− (call 195:15 (wing 195:15 predicate) (wing 195:25 item)))
498− (arm 196:13
499− (lit 196:13 %.y)
500− (group 196:17
501− (call 196:18 (wing 196:18 skip) (wing 196:23 rest) (wing 196:28 predicate))))
502− (arm 197:13
503− (lit 197:13 %.n)
504− (tuple 197:17
505− (wing 197:18 item)
506− (group 197:23
507− (call 197:24 (wing 197:24 skip) (wing 197:29 rest) (wing 197:34 predicate)))))))))))))))
508− (value 199:1 roll
509− (gate 199:9
510− (face 199:12 args
511− (cell 199:17
512− (apply 199:18 list (tvar 199:24 A))
513− (tvar 199:27 B)
514− (fn 199:29
515− (cell 199:32 (tvar 199:33 A) (tvar 199:35 B))
516− (tvar 199:38 B))))
517− (body 200:3
518− (branch 200:3
519− (wing 200:6 args)
520− (arm 201:5
521− (cell 201:5 (bind 201:6 xs) (bind 201:9 start) (bind 201:15 combine))
522− (body 202:7
523− (branch 202:7
524− (wing 202:10 xs)
525− (arm 203:9 (lit 203:9 ~) (wing 203:11 start))
526− (arm 204:9
527− (cell 204:9 (bind 204:10 item) (bind 204:15 rest))
528− (group 204:21
529− (call 204:22
530− (wing 204:22 roll)
531− (wing 204:27 rest)
532− (group 204:32
533− (call 204:33 (wing 204:33 combine) (wing 204:41 item) (wing 204:46 start)))
534− (wing 204:53 combine)))))))))))
535− (value 206:1 reel
397+ (cell 161:5 (bind 161:6 maybe) (bind 161:12 f))
398+ (cast 161:15
399+ (apply 161:18 unit (tvar 161:24 B))
400+ (body 162:7
401+ (branch 162:7
402+ (wing 162:10 maybe)
403+ (arm 163:9 (lit 163:9 ~) (lit 163:11 ~))
404+ (arm 164:9
405+ (cell 164:9 (lit 164:10 ~) (bind 164:12 value))
406+ (group 164:19
407+ (call 164:20 (wing 164:20 f) (wing 164:22 value))))))))))))
408+ (value 166:1 both
409+ (gate 166:9
410+ (face 166:12 args
411+ (cell 166:17
412+ (apply 166:18 unit (tvar 166:24 A))
413+ (apply 166:27 unit (tvar 166:33 B))))
414+ (body 167:3
415+ (branch 167:3
416+ (wing 167:6 args)
417+ (arm 168:5
418+ (cell 168:5 (bind 168:6 first) (bind 168:12 second))
419+ (cast 168:20
420+ (apply 168:23 unit
421+ (cell 168:29 (tvar 168:30 A) (tvar 168:32 B)))
422+ (body 169:7
423+ (branch 169:7
424+ (wing 169:10 first)
425+ (arm 170:9 (lit 170:9 ~) (lit 170:11 ~))
426+ (arm 171:9
427+ (cell 171:9 (lit 171:10 ~) (bind 171:12 a))
428+ (body 172:11
429+ (branch 172:11
430+ (wing 172:14 second)
431+ (arm 173:13 (lit 173:13 ~) (lit 173:15 ~))
432+ (arm 174:13
433+ (cell 174:13 (lit 174:14 ~) (bind 174:16 b))
434+ (unit 174:19
435+ (tuple 174:20 (wing 174:21 a) (wing 174:23 b)))))))))))))))
436+ (value 176:1 clap
437+ (gate 176:9
438+ (face 176:12 args
439+ (cell 176:17
440+ (apply 176:18 unit (tvar 176:24 A))
441+ (apply 176:27 unit (tvar 176:33 A))
442+ (fn 176:36
443+ (cell 176:39 (tvar 176:40 A) (tvar 176:42 A))
444+ (tvar 176:45 A))))
445+ (body 177:3
446+ (branch 177:3
447+ (wing 177:6 args)
448+ (arm 178:5
449+ (cell 178:5 (bind 178:6 first) (bind 178:12 second) (bind 178:19 combine))
450+ (cast 178:28
451+ (apply 178:31 unit (tvar 178:37 A))
452+ (body 179:7
453+ (branch 179:7
454+ (wing 179:10 first)
455+ (arm 180:9 (lit 180:9 ~) (wing 180:11 second))
456+ (arm 181:9
457+ (cell 181:9 (lit 181:10 ~) (bind 181:12 a))
458+ (body 182:11
459+ (branch 182:11
460+ (wing 182:14 second)
461+ (arm 183:13 (lit 183:13 ~) (wing 183:15 first))
462+ (arm 184:13
463+ (cell 184:13 (lit 184:14 ~) (bind 184:16 b))
464+ (unit 184:19
465+ (group 184:20
466+ (call 184:21 (wing 184:21 combine) (wing 184:29 a) (wing 184:31 b))))))))))))))))
467+ (value 186:1 clef
468+ (gate 186:9
469+ (face 186:12 args
470+ (cell 186:17
471+ (apply 186:18 unit (tvar 186:24 A))
472+ (apply 186:27 unit (tvar 186:33 B))
473+ (fn 186:36
474+ (cell 186:39 (tvar 186:40 A) (tvar 186:42 B))
475+ (apply 186:45 unit (tvar 186:51 C)))))
476+ (body 187:3
477+ (branch 187:3
478+ (wing 187:6 args)
479+ (arm 188:5
480+ (cell 188:5 (bind 188:6 first) (bind 188:12 second) (bind 188:19 combine))
481+ (cast 188:28
482+ (apply 188:31 unit (tvar 188:37 C))
483+ (body 189:7
484+ (branch 189:7
485+ (wing 189:10 first)
486+ (arm 190:9 (lit 190:9 ~) (lit 190:11 ~))
487+ (arm 191:9
488+ (cell 191:9 (lit 191:10 ~) (bind 191:12 a))
489+ (body 192:11
490+ (branch 192:11
491+ (wing 192:14 second)
492+ (arm 193:13 (lit 193:13 ~) (lit 193:15 ~))
493+ (arm 194:13
494+ (cell 194:13 (lit 194:14 ~) (bind 194:16 b))
495+ (group 194:19
496+ (call 194:20 (wing 194:20 combine) (wing 194:28 a) (wing 194:30 b)))))))))))))))
497+ (value 196:1 skim
498+ (gate 196:9
499+ (face 196:12 args
500+ (cell 196:17
501+ (apply 196:18 list (tvar 196:24 A))
502+ (fn 196:27 (tvar 196:30 A) (flag 196:32))))
503+ (body 197:3
504+ (branch 197:3
505+ (wing 197:6 args)
506+ (arm 198:5
507+ (cell 198:5 (bind 198:6 xs) (bind 198:9 predicate))
508+ (cast 198:20
509+ (apply 198:23 list (tvar 198:29 A))
510+ (body 199:9
511+ (branch 199:9
512+ (wing 199:12 xs)
513+ (arm 200:11 (lit 200:11 ~) (lit 200:13 ~))
514+ (arm 201:11
515+ (cell 201:11 (bind 201:12 item) (bind 201:17 rest))
516+ (body 202:13
517+ (branch 202:13
518+ (group 202:16
519+ (call 202:17 (wing 202:17 predicate) (wing 202:27 item)))
520+ (arm 203:15
521+ (lit 203:15 %.y)
522+ (tuple 203:19
523+ (wing 203:20 item)
524+ (group 203:25
525+ (call 203:26 (wing 203:26 skim) (wing 203:31 rest) (wing 203:36 predicate)))))
526+ (arm 204:15
527+ (lit 204:15 %.n)
528+ (group 204:19
529+ (call 204:20 (wing 204:20 skim) (wing 204:25 rest) (wing 204:30 predicate)))))))))))))))
530+ (value 206:1 skip
536531 (gate 206:9
537532 (face 206:12 args
538533 (cell 206:17
539534 (apply 206:18 list (tvar 206:24 A))
540− (tvar 206:27 B)
541− (fn 206:29
542− (cell 206:32 (tvar 206:33 A) (tvar 206:35 B))
543− (tvar 206:38 B))))
535+ (fn 206:27 (tvar 206:30 A) (flag 206:32))))
544536 (body 207:3
545537 (branch 207:3
546538 (wing 207:6 args)
547539 (arm 208:5
548− (cell 208:5 (bind 208:6 xs) (bind 208:9 start) (bind 208:15 combine))
549− (body 209:7
550− (branch 209:7
551− (wing 209:10 xs)
552− (arm 210:9 (lit 210:9 ~) (wing 210:11 start))
553− (arm 211:9
554− (cell 211:9 (bind 211:10 item) (bind 211:15 rest))
555− (group 211:21
556− (call 211:22
557− (wing 211:22 combine)
558− (wing 211:30 item)
559− (group 211:35
560− (call 211:36 (wing 211:36 reel) (wing 211:41 rest) (wing 211:46 start) (wing 211:52 combine))))))))))))))
540+ (cell 208:5 (bind 208:6 xs) (bind 208:9 predicate))
541+ (cast 208:20
542+ (apply 208:23 list (tvar 208:29 A))
543+ (body 209:9
544+ (branch 209:9
545+ (wing 209:12 xs)
546+ (arm 210:11 (lit 210:11 ~) (lit 210:13 ~))
547+ (arm 211:11
548+ (cell 211:11 (bind 211:12 item) (bind 211:17 rest))
549+ (body 212:13
550+ (branch 212:13
551+ (group 212:16
552+ (call 212:17 (wing 212:17 predicate) (wing 212:27 item)))
553+ (arm 213:15
554+ (lit 213:15 %.y)
555+ (group 213:19
556+ (call 213:20 (wing 213:20 skip) (wing 213:25 rest) (wing 213:30 predicate))))
557+ (arm 214:15
558+ (lit 214:15 %.n)
559+ (tuple 214:19
560+ (wing 214:20 item)
561+ (group 214:25
562+ (call 214:26 (wing 214:26 skip) (wing 214:31 rest) (wing 214:36 predicate))))))))))))))))
563+ (value 216:1 levy
564+ (gate 216:9
565+ (face 216:12 args
566+ (cell 216:17
567+ (apply 216:18 list (tvar 216:24 A))
568+ (fn 216:27 (tvar 216:30 A) (flag 216:32))))
569+ (body 217:3
570+ (branch 217:3
571+ (wing 217:6 args)
572+ (arm 218:5
573+ (cell 218:5 (bind 218:6 xs) (bind 218:9 predicate))
574+ (body 219:7
575+ (branch 219:7
576+ (wing 219:10 xs)
577+ (arm 220:9 (lit 220:9 ~) (lit 220:11 %.y))
578+ (arm 221:9
579+ (cell 221:9 (bind 221:10 item) (bind 221:15 rest))
580+ (body 222:11
581+ (branch 222:11
582+ (group 222:14
583+ (call 222:15 (wing 222:15 predicate) (wing 222:25 item)))
584+ (arm 223:13
585+ (lit 223:13 %.y)
586+ (group 223:17
587+ (call 223:18 (wing 223:18 levy) (wing 223:23 rest) (wing 223:28 predicate))))
588+ (arm 224:13 (lit 224:13 %.n) (lit 224:17 %.n))))))))))))
589+ (value 226:1 lien
590+ (gate 226:9
591+ (face 226:12 args
592+ (cell 226:17
593+ (apply 226:18 list (tvar 226:24 A))
594+ (fn 226:27 (tvar 226:30 A) (flag 226:32))))
595+ (body 227:3
596+ (branch 227:3
597+ (wing 227:6 args)
598+ (arm 228:5
599+ (cell 228:5 (bind 228:6 xs) (bind 228:9 predicate))
600+ (body 229:7
601+ (branch 229:7
602+ (wing 229:10 xs)
603+ (arm 230:9 (lit 230:9 ~) (lit 230:11 %.n))
604+ (arm 231:9
605+ (cell 231:9 (bind 231:10 item) (bind 231:15 rest))
606+ (body 232:11
607+ (branch 232:11
608+ (group 232:14
609+ (call 232:15 (wing 232:15 predicate) (wing 232:25 item)))
610+ (arm 233:13 (lit 233:13 %.y) (lit 233:17 %.y))
611+ (arm 234:13
612+ (lit 234:13 %.n)
613+ (group 234:17
614+ (call 234:18 (wing 234:18 lien) (wing 234:23 rest) (wing 234:28 predicate))))))))))))))
615+ (value 236:1 roll
616+ (gate 236:9
617+ (face 236:12 args
618+ (cell 236:17
619+ (apply 236:18 list (tvar 236:24 A))
620+ (tvar 236:27 B)
621+ (fn 236:29
622+ (cell 236:32 (tvar 236:33 A) (tvar 236:35 B))
623+ (tvar 236:38 B))))
624+ (body 237:3
625+ (branch 237:3
626+ (wing 237:6 args)
627+ (arm 238:5
628+ (cell 238:5 (bind 238:6 xs) (bind 238:9 start) (bind 238:15 combine))
629+ (body 239:7
630+ (branch 239:7
631+ (wing 239:10 xs)
632+ (arm 240:9 (lit 240:9 ~) (wing 240:11 start))
633+ (arm 241:9
634+ (cell 241:9 (bind 241:10 item) (bind 241:15 rest))
635+ (group 241:21
636+ (call 241:22
637+ (wing 241:22 roll)
638+ (wing 241:27 rest)
639+ (group 241:32
640+ (call 241:33 (wing 241:33 combine) (wing 241:41 item) (wing 241:46 start)))
641+ (wing 241:53 combine)))))))))))
642+ (value 243:1 reel
643+ (gate 243:9
644+ (face 243:12 args
645+ (cell 243:17
646+ (apply 243:18 list (tvar 243:24 A))
647+ (tvar 243:27 B)
648+ (fn 243:29
649+ (cell 243:32 (tvar 243:33 A) (tvar 243:35 B))
650+ (tvar 243:38 B))))
651+ (body 244:3
652+ (branch 244:3
653+ (wing 244:6 args)
654+ (arm 245:5
655+ (cell 245:5 (bind 245:6 xs) (bind 245:9 start) (bind 245:15 combine))
656+ (body 246:7
657+ (branch 246:7
658+ (wing 246:10 xs)
659+ (arm 247:9 (lit 247:9 ~) (wing 247:11 start))
660+ (arm 248:9
661+ (cell 248:9 (bind 248:10 item) (bind 248:15 rest))
662+ (group 248:21
663+ (call 248:22
664+ (wing 248:22 combine)
665+ (wing 248:30 item)
666+ (group 248:35
667+ (call 248:36 (wing 248:36 reel) (wing 248:41 rest) (wing 248:46 start) (wing 248:52 combine)))))))))))))
668+ (value 250:1 flit
669+ (gate 250:9
670+ (face 250:12 predicate
671+ (fn 250:22 (tvar 250:25 A) (flag 250:27)))
672+ (body 251:3
673+ (gate 251:3
674+ (face 251:6 value (tvar 251:12 A))
675+ (body 252:5
676+ (cast 252:5
677+ (apply 252:8 unit (tvar 252:14 A))
678+ (body 253:7
679+ (branch 253:7
680+ (group 253:10
681+ (call 253:11 (wing 253:11 predicate) (wing 253:21 value)))
682+ (arm 254:9
683+ (lit 254:9 %.y)
684+ (unit 254:13 (wing 254:14 value)))
685+ (arm 255:9 (lit 255:9 %.n) (lit 255:13 ~))))))))))
686+ (value 257:1 murn
687+ (gate 257:9
688+ (face 257:12 args
689+ (cell 257:17
690+ (apply 257:18 list (tvar 257:24 A))
691+ (fn 257:27
692+ (tvar 257:30 A)
693+ (apply 257:32 unit (tvar 257:38 B)))))
694+ (body 258:3
695+ (branch 258:3
696+ (wing 258:6 args)
697+ (arm 259:5
698+ (cell 259:5 (bind 259:6 xs) (bind 259:9 f))
699+ (cast 259:12
700+ (apply 259:15 list (tvar 259:21 B))
701+ (body 260:9
702+ (branch 260:9
703+ (wing 260:12 xs)
704+ (arm 261:11 (lit 261:11 ~) (lit 261:13 ~))
705+ (arm 262:11
706+ (cell 262:11 (bind 262:12 item) (bind 262:17 rest))
707+ (body 263:13
708+ (branch 263:13
709+ (group 263:16
710+ (call 263:17 (wing 263:17 f) (wing 263:19 item)))
711+ (arm 264:15
712+ (lit 264:15 ~)
713+ (group 264:17
714+ (call 264:18 (wing 264:18 murn) (wing 264:23 rest) (wing 264:28 f))))
715+ (arm 265:15
716+ (cell 265:15 (lit 265:16 ~) (bind 265:18 value))
717+ (tuple 265:25
718+ (wing 265:26 value)
719+ (group 265:32
720+ (call 265:33 (wing 265:33 murn) (wing 265:38 rest) (wing 265:43 f))))))))))))))))
721+ (value 267:1 join
722+ (gate 267:9
723+ (face 267:12 args
724+ (cell 267:17
725+ (tvar 267:18 A)
726+ (apply 267:20 list (tvar 267:26 A))))
727+ (body 268:3
728+ (branch 268:3
729+ (wing 268:6 args)
730+ (arm 269:5
731+ (cell 269:5 (bind 269:6 separator) (bind 269:16 xs))
732+ (cast 269:20
733+ (apply 269:23 list (tvar 269:29 A))
734+ (body 270:9
735+ (branch 270:9
736+ (wing 270:12 xs)
737+ (arm 271:11 (lit 271:11 ~) (lit 271:13 ~))
738+ (arm 272:11
739+ (cell 272:11 (bind 272:12 item) (bind 272:17 rest))
740+ (body 273:13
741+ (branch 273:13
742+ (wing 273:16 rest)
743+ (arm 274:15
744+ (lit 274:15 ~)
745+ (tuple 274:17 (wing 274:18 item) (lit 274:23 ~)))
746+ (arm 275:15
747+ (cell 275:15 (bind 275:16 next) (bind 275:21 more))
748+ (tuple 275:27
749+ (wing 275:28 item)
750+ (tuple 275:33
751+ (wing 275:34 separator)
752+ (group 275:44
753+ (call 275:45 (wing 275:45 join) (wing 275:50 separator) (wing 275:60 rest)))))))))))))))))
754+ (value 277:1 snip
755+ (gate 277:9
756+ (face 277:12 xs
757+ (apply 277:15 list (tvar 277:21 A)))
758+ (body 278:3
759+ (cast 278:3
760+ (apply 278:6 list (tvar 278:12 A))
761+ (body 279:5
762+ (branch 279:5
763+ (wing 279:8 xs)
764+ (arm 280:7 (lit 280:7 ~) (lit 280:9 ~))
765+ (arm 281:7
766+ (cell 281:7 (bind 281:8 item) (bind 281:13 rest))
767+ (body 282:9
768+ (branch 282:9
769+ (wing 282:12 rest)
770+ (arm 283:11 (lit 283:11 ~) (lit 283:13 ~))
771+ (arm 284:11
772+ (cell 284:11 (bind 284:12 next) (bind 284:17 more))
773+ (tuple 284:23
774+ (wing 284:24 item)
775+ (group 284:29
776+ (call 284:30 (wing 284:30 snip) (wing 284:35 rest))))))))))))))
777+ (value 286:1 rear
778+ (gate 286:9
779+ (face 286:12 xs
780+ (apply 286:15 list (tvar 286:21 A)))
781+ (body 287:3
782+ (branch 287:3
783+ (wing 287:6 xs)
784+ (arm 288:5 (lit 288:5 ~) (crash 288:7))
785+ (arm 289:5
786+ (cell 289:5 (bind 289:6 item) (bind 289:11 rest))
787+ (body 290:7
788+ (branch 290:7
789+ (wing 290:10 rest)
790+ (arm 291:9 (lit 291:9 ~) (wing 291:11 item))
791+ (arm 292:9
792+ (cell 292:9 (bind 292:10 next) (bind 292:15 more))
793+ (group 292:21
794+ (call 292:22 (wing 292:22 rear) (wing 292:27 rest))))))))))))
tests/golden/prelude-unit-list-transforms/types.txt+17−8
@@ -1,12 +1,13 @@
11partial inference; module not checked
2++$ poke: not checked
23++ same: $-(A A)
34++ head: $-([A B] A)
45++ tail: $-([A B] B)
56++ not: $-(? ?)
67+$ list: cases proven disjoint; mold not checked
78+$ 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
9+++ fall: $-([(unit A) A] A)
10+++ need: $-((unit A) A)
1011++ weld: sample mold is not supported by partial inference
1112++ turn: sample mold is not supported by partial inference
1213+$ dime: not checked
@@ -35,16 +36,24 @@ partial inference; module not checked
3536+$ tree: cases proven disjoint; mold not checked
3637+$ each: cases proven disjoint; mold not checked
3738+$ bloq: not checked
38−++ some: expression is not supported by partial inference
39+++ some: unit construction needs the standard prelude in partial inference
3940++ lure: cast mold is not supported by partial inference
4041++ snoc: sample mold is not supported by partial inference
4142++ flop: sample mold is not supported by partial inference
42−++ drop: sample mold is not supported by partial inference
43−++ bind: sample mold is not supported by partial inference
44−++ biff: sample mold is not supported by partial inference
45−++ both: sample mold is not supported by partial inference
46−++ clef: sample mold is not supported by partial inference
43+++ drop: cast mold is not supported by partial inference
44+++ bind: unit construction needs the standard prelude in partial inference
45+++ biff: $-([(unit A) $-(A (unit B))] (unit B))
46+++ both: unit construction needs the standard prelude in partial inference
47+++ clap: unit construction needs the standard prelude in partial inference
48+++ clef: $-([(unit A) [(unit B) $-([A B] (unit C))]] (unit C))
4749++ skim: sample mold is not supported by partial inference
4850++ skip: sample mold is not supported by partial inference
51+++ levy: sample mold is not supported by partial inference
52+++ lien: sample mold is not supported by partial inference
4953++ roll: sample mold is not supported by partial inference
5054++ reel: sample mold is not supported by partial inference
55+++ flit: unit construction needs the standard prelude in partial inference
56+++ murn: sample mold is not supported by partial inference
57+++ join: sample mold is not supported by partial inference
58+++ snip: sample mold is not supported by partial inference
59+++ rear: sample mold is not supported by partial inference
tests/golden/types-capital-distinct/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Decisions, Type variables: "Capitals, generalized per `++`"; "a different type takes a different capital".
2+tests: Different explicitly written capitals cannot be forced equal via a call or cast; their source sites are reported. Repeated spelling, independent capitals and concrete-forcing controls retain their intended behavior.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-capital-distinct/source.jibbnew file+6
@@ -0,0 +1,6 @@
1+++ repeat |= p=[A A] p
2+++ same |= p=[A A] p
3+++ independent |= p=[A B] p
4+++ bad-call |= p=[A B] (repeat p)
5+++ bad-cast |= p=[A B] ^- [A A] p
6+++ concrete |= x=A ^- @t x
tests/golden/types-capital-distinct/tokens.txtnew file+73
@@ -0,0 +1,73 @@
1+1:1 glyph ++
2+1:4 name repeat
3+1:11 glyph |=
4+1:14 name p
5+1:15 tight glyph =
6+1:16 tight glyph [
7+1:17 tight tvar A
8+1:19 tvar A
9+1:20 tight glyph ]
10+1:22 name p
11+2:1 NEWLINE
12+2:1 glyph ++
13+2:4 name same
14+2:9 glyph |=
15+2:12 name p
16+2:13 tight glyph =
17+2:14 tight glyph [
18+2:15 tight tvar A
19+2:17 tvar A
20+2:18 tight glyph ]
21+2:20 name p
22+3:1 NEWLINE
23+3:1 glyph ++
24+3:4 name independent
25+3:16 glyph |=
26+3:19 name p
27+3:20 tight glyph =
28+3:21 tight glyph [
29+3:22 tight tvar A
30+3:24 tvar B
31+3:25 tight glyph ]
32+3:27 name p
33+4:1 NEWLINE
34+4:1 glyph ++
35+4:4 name bad-call
36+4:13 glyph |=
37+4:16 name p
38+4:17 tight glyph =
39+4:18 tight glyph [
40+4:19 tight tvar A
41+4:21 tvar B
42+4:22 tight glyph ]
43+4:24 glyph (
44+4:25 tight name repeat
45+4:32 name p
46+4:33 tight glyph )
47+5:1 NEWLINE
48+5:1 glyph ++
49+5:4 name bad-cast
50+5:13 glyph |=
51+5:16 name p
52+5:17 tight glyph =
53+5:18 tight glyph [
54+5:19 tight tvar A
55+5:21 tvar B
56+5:22 tight glyph ]
57+5:24 glyph ^-
58+5:27 glyph [
59+5:28 tight tvar A
60+5:30 tvar A
61+5:31 tight glyph ]
62+5:33 name p
63+6:1 NEWLINE
64+6:1 glyph ++
65+6:4 name concrete
66+6:13 glyph |=
67+6:16 name x
68+6:17 tight glyph =
69+6:18 tight tvar A
70+6:20 glyph ^-
71+6:23 aura @t
72+6:26 name x
73+6:27 NEWLINE
tests/golden/types-capital-distinct/tree.txtnew file+33
@@ -0,0 +1,33 @@
1+(module
2+ (value 1:1 repeat
3+ (gate 1:11
4+ (face 1:14 p
5+ (cell 1:16 (tvar 1:17 A) (tvar 1:19 A)))
6+ (wing 1:22 p)))
7+ (value 2:1 same
8+ (gate 2:9
9+ (face 2:12 p
10+ (cell 2:14 (tvar 2:15 A) (tvar 2:17 A)))
11+ (wing 2:20 p)))
12+ (value 3:1 independent
13+ (gate 3:16
14+ (face 3:19 p
15+ (cell 3:21 (tvar 3:22 A) (tvar 3:24 B)))
16+ (wing 3:27 p)))
17+ (value 4:1 bad-call
18+ (gate 4:13
19+ (face 4:16 p
20+ (cell 4:18 (tvar 4:19 A) (tvar 4:21 B)))
21+ (group 4:24
22+ (call 4:25 (wing 4:25 repeat) (wing 4:32 p)))))
23+ (value 5:1 bad-cast
24+ (gate 5:13
25+ (face 5:16 p
26+ (cell 5:18 (tvar 5:19 A) (tvar 5:21 B)))
27+ (cast 5:24
28+ (cell 5:27 (tvar 5:28 A) (tvar 5:30 A))
29+ (wing 5:33 p))))
30+ (value 6:1 concrete
31+ (gate 6:13
32+ (face 6:16 x (tvar 6:18 A))
33+ (cast 6:20 (aura 6:23 @t) (wing 6:26 x)))))
tests/golden/types-capital-distinct/types.txtnew file+19
@@ -0,0 +1,19 @@
1+partial inference; module not checked
2+++ repeat: $-([A A] [A A])
3+++ same: $-([A A] [A A])
4+++ independent: $-([A B] [A B])
5+++ bad-call: distinct type variables `A` and `B` must not be forced equal; use the same capital for a shared type
6+/tests/golden/types-capital-distinct/source.jibb:4:19: first type variable
7+++ bad-call |= p=[A B] (repeat p)
8+ ^
9+/tests/golden/types-capital-distinct/source.jibb:4:21: second type variable
10+++ bad-call |= p=[A B] (repeat p)
11+ ^
12+++ bad-cast: distinct type variables `A` and `B` must not be forced equal; use the same capital for a shared type
13+/tests/golden/types-capital-distinct/source.jibb:5:19: first type variable
14+++ bad-cast |= p=[A B] ^- [A A] p
15+ ^
16+/tests/golden/types-capital-distinct/source.jibb:5:21: second type variable
17+++ bad-cast |= p=[A B] ^- [A A] p
18+ ^
19+++ concrete: explicit capital constraints are not supported by partial inference
tests/golden/types-cell-pattern-many/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Patterns: a name binds anew and the last position of a cell pattern binds the rest; Modules: no name may shadow one already in scope.
2+tests: A complete single-arm cell pattern of binders follows the right-nested cell spine, preserving polymorphism and the final tail. Duplicate or shadowed binders and definite non-cell subjects fail; uncertain union/collection spines and other patterns stay unsupported.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-cell-pattern-many/modules.txtnew file+1
@@ -0,0 +1 @@
1+# Use the prepared prelude.
tests/golden/types-cell-pattern-many/source.jibbnew file+41
@@ -0,0 +1,41 @@
1+++ three |= args=[@t @p ?]
2+ ?- args
3+ [a b c] c
4+++ four |= args=[@t @p ? @ux]
5+ ?- args
6+ [a b c d] d
7+++ rest |= args=[@t @p [? @ux]]
8+ ?- args
9+ [a b c] c
10+++ infer |= x
11+ ?- x
12+ [a b c] [c b a]
13+++ duplicate |= args=[@t @p ?]
14+ ?- args
15+ [a b a] a
16+++ shadow |= args=[@t @p ?]
17+ ?- args
18+ [args b c] b
19+++ prelude-shadow |= args=[@t @p ?]
20+ ?- args
21+ [a not c] c
22+++ atom |= args=@t
23+ ?- args
24+ [a b c] a
25+++ too-many |= args=[@t @p]
26+ ?- args
27+ [a b c] a
28+++ record |= args=[a=@t b=@p c=?]
29+ ?- args
30+ [a b c] a
31+++ nested |= args=[@t [@p ?] @ux]
32+ ?- args
33+ [a [b c] d] d
34+++ wildcard |= args=[@t @p ?]
35+ ?- args
36+ [a * c] c
37+++ pending |= args=[@t @p ?]
38+ ?- args
39+ [a b c]
40+ ~& %unused
41+ c
tests/golden/types-cell-pattern-many/tokens.txtnew file+315
@@ -0,0 +1,315 @@
1+1:1 glyph ++
2+1:4 name three
3+1:10 glyph |=
4+1:13 name args
5+1:17 tight glyph =
6+1:18 tight glyph [
7+1:19 tight aura @t
8+1:22 aura @p
9+1:25 glyph ?
10+1:26 tight glyph ]
11+2:3 INDENT
12+2:3 glyph ?-
13+2:6 name args
14+3:5 INDENT
15+3:5 glyph [
16+3:6 tight name a
17+3:8 name b
18+3:10 name c
19+3:11 tight glyph ]
20+3:13 name c
21+4:1 DEDENT
22+4:1 DEDENT
23+4:1 NEWLINE
24+4:1 glyph ++
25+4:4 name four
26+4:9 glyph |=
27+4:12 name args
28+4:16 tight glyph =
29+4:17 tight glyph [
30+4:18 tight aura @t
31+4:21 aura @p
32+4:24 glyph ?
33+4:26 aura @ux
34+4:29 tight glyph ]
35+5:3 INDENT
36+5:3 glyph ?-
37+5:6 name args
38+6:5 INDENT
39+6:5 glyph [
40+6:6 tight name a
41+6:8 name b
42+6:10 name c
43+6:12 name d
44+6:13 tight glyph ]
45+6:15 name d
46+7:1 DEDENT
47+7:1 DEDENT
48+7:1 NEWLINE
49+7:1 glyph ++
50+7:4 name rest
51+7:9 glyph |=
52+7:12 name args
53+7:16 tight glyph =
54+7:17 tight glyph [
55+7:18 tight aura @t
56+7:21 aura @p
57+7:24 glyph [
58+7:25 tight glyph ?
59+7:27 aura @ux
60+7:30 tight glyph ]
61+7:31 tight glyph ]
62+8:3 INDENT
63+8:3 glyph ?-
64+8:6 name args
65+9:5 INDENT
66+9:5 glyph [
67+9:6 tight name a
68+9:8 name b
69+9:10 name c
70+9:11 tight glyph ]
71+9:13 name c
72+10:1 DEDENT
73+10:1 DEDENT
74+10:1 NEWLINE
75+10:1 glyph ++
76+10:4 name infer
77+10:10 glyph |=
78+10:13 name x
79+11:3 INDENT
80+11:3 glyph ?-
81+11:6 name x
82+12:5 INDENT
83+12:5 glyph [
84+12:6 tight name a
85+12:8 name b
86+12:10 name c
87+12:11 tight glyph ]
88+12:13 glyph [
89+12:14 tight name c
90+12:16 name b
91+12:18 name a
92+12:19 tight glyph ]
93+13:1 DEDENT
94+13:1 DEDENT
95+13:1 NEWLINE
96+13:1 glyph ++
97+13:4 name duplicate
98+13:14 glyph |=
99+13:17 name args
100+13:21 tight glyph =
101+13:22 tight glyph [
102+13:23 tight aura @t
103+13:26 aura @p
104+13:29 glyph ?
105+13:30 tight glyph ]
106+14:3 INDENT
107+14:3 glyph ?-
108+14:6 name args
109+15:5 INDENT
110+15:5 glyph [
111+15:6 tight name a
112+15:8 name b
113+15:10 name a
114+15:11 tight glyph ]
115+15:13 name a
116+16:1 DEDENT
117+16:1 DEDENT
118+16:1 NEWLINE
119+16:1 glyph ++
120+16:4 name shadow
121+16:11 glyph |=
122+16:14 name args
123+16:18 tight glyph =
124+16:19 tight glyph [
125+16:20 tight aura @t
126+16:23 aura @p
127+16:26 glyph ?
128+16:27 tight glyph ]
129+17:3 INDENT
130+17:3 glyph ?-
131+17:6 name args
132+18:5 INDENT
133+18:5 glyph [
134+18:6 tight name args
135+18:11 name b
136+18:13 name c
137+18:14 tight glyph ]
138+18:16 name b
139+19:1 DEDENT
140+19:1 DEDENT
141+19:1 NEWLINE
142+19:1 glyph ++
143+19:4 name prelude-shadow
144+19:19 glyph |=
145+19:22 name args
146+19:26 tight glyph =
147+19:27 tight glyph [
148+19:28 tight aura @t
149+19:31 aura @p
150+19:34 glyph ?
151+19:35 tight glyph ]
152+20:3 INDENT
153+20:3 glyph ?-
154+20:6 name args
155+21:5 INDENT
156+21:5 glyph [
157+21:6 tight name a
158+21:8 name not
159+21:12 name c
160+21:13 tight glyph ]
161+21:15 name c
162+22:1 DEDENT
163+22:1 DEDENT
164+22:1 NEWLINE
165+22:1 glyph ++
166+22:4 name atom
167+22:9 glyph |=
168+22:12 name args
169+22:16 tight glyph =
170+22:17 tight aura @t
171+23:3 INDENT
172+23:3 glyph ?-
173+23:6 name args
174+24:5 INDENT
175+24:5 glyph [
176+24:6 tight name a
177+24:8 name b
178+24:10 name c
179+24:11 tight glyph ]
180+24:13 name a
181+25:1 DEDENT
182+25:1 DEDENT
183+25:1 NEWLINE
184+25:1 glyph ++
185+25:4 name too-many
186+25:13 glyph |=
187+25:16 name args
188+25:20 tight glyph =
189+25:21 tight glyph [
190+25:22 tight aura @t
191+25:25 aura @p
192+25:27 tight glyph ]
193+26:3 INDENT
194+26:3 glyph ?-
195+26:6 name args
196+27:5 INDENT
197+27:5 glyph [
198+27:6 tight name a
199+27:8 name b
200+27:10 name c
201+27:11 tight glyph ]
202+27:13 name a
203+28:1 DEDENT
204+28:1 DEDENT
205+28:1 NEWLINE
206+28:1 glyph ++
207+28:4 name record
208+28:11 glyph |=
209+28:14 name args
210+28:18 tight glyph =
211+28:19 tight glyph [
212+28:20 tight name a
213+28:21 tight glyph =
214+28:22 tight aura @t
215+28:25 name b
216+28:26 tight glyph =
217+28:27 tight aura @p
218+28:30 name c
219+28:31 tight glyph =
220+28:32 tight glyph ?
221+28:33 tight glyph ]
222+29:3 INDENT
223+29:3 glyph ?-
224+29:6 name args
225+30:5 INDENT
226+30:5 glyph [
227+30:6 tight name a
228+30:8 name b
229+30:10 name c
230+30:11 tight glyph ]
231+30:13 name a
232+31:1 DEDENT
233+31:1 DEDENT
234+31:1 NEWLINE
235+31:1 glyph ++
236+31:4 name nested
237+31:11 glyph |=
238+31:14 name args
239+31:18 tight glyph =
240+31:19 tight glyph [
241+31:20 tight aura @t
242+31:23 glyph [
243+31:24 tight aura @p
244+31:27 glyph ?
245+31:28 tight glyph ]
246+31:30 aura @ux
247+31:33 tight glyph ]
248+32:3 INDENT
249+32:3 glyph ?-
250+32:6 name args
251+33:5 INDENT
252+33:5 glyph [
253+33:6 tight name a
254+33:8 glyph [
255+33:9 tight name b
256+33:11 name c
257+33:12 tight glyph ]
258+33:14 name d
259+33:15 tight glyph ]
260+33:17 name d
261+34:1 DEDENT
262+34:1 DEDENT
263+34:1 NEWLINE
264+34:1 glyph ++
265+34:4 name wildcard
266+34:13 glyph |=
267+34:16 name args
268+34:20 tight glyph =
269+34:21 tight glyph [
270+34:22 tight aura @t
271+34:25 aura @p
272+34:28 glyph ?
273+34:29 tight glyph ]
274+35:3 INDENT
275+35:3 glyph ?-
276+35:6 name args
277+36:5 INDENT
278+36:5 glyph [
279+36:6 tight name a
280+36:8 glyph *
281+36:10 name c
282+36:11 tight glyph ]
283+36:13 name c
284+37:1 DEDENT
285+37:1 DEDENT
286+37:1 NEWLINE
287+37:1 glyph ++
288+37:4 name pending
289+37:12 glyph |=
290+37:15 name args
291+37:19 tight glyph =
292+37:20 tight glyph [
293+37:21 tight aura @t
294+37:24 aura @p
295+37:27 glyph ?
296+37:28 tight glyph ]
297+38:3 INDENT
298+38:3 glyph ?-
299+38:6 name args
300+39:5 INDENT
301+39:5 glyph [
302+39:6 tight name a
303+39:8 name b
304+39:10 name c
305+39:11 tight glyph ]
306+40:7 INDENT
307+40:7 glyph ~&
308+40:10 lit %unused
309+41:9 INDENT
310+41:9 name c
311+41:10 DEDENT
312+41:10 DEDENT
313+41:10 DEDENT
314+41:10 DEDENT
315+41:10 NEWLINE
tests/golden/types-cell-pattern-many/tree.txtnew file+144
@@ -0,0 +1,144 @@
1+(module
2+ (value 1:1 three
3+ (gate 1:10
4+ (face 1:13 args
5+ (cell 1:18 (aura 1:19 @t) (aura 1:22 @p) (flag 1:25)))
6+ (body 2:3
7+ (branch 2:3
8+ (wing 2:6 args)
9+ (arm 3:5
10+ (cell 3:5 (bind 3:6 a) (bind 3:8 b) (bind 3:10 c))
11+ (wing 3:13 c))))))
12+ (value 4:1 four
13+ (gate 4:9
14+ (face 4:12 args
15+ (cell 4:17 (aura 4:18 @t) (aura 4:21 @p) (flag 4:24) (aura 4:26 @ux)))
16+ (body 5:3
17+ (branch 5:3
18+ (wing 5:6 args)
19+ (arm 6:5
20+ (cell 6:5 (bind 6:6 a) (bind 6:8 b) (bind 6:10 c) (bind 6:12 d))
21+ (wing 6:15 d))))))
22+ (value 7:1 rest
23+ (gate 7:9
24+ (face 7:12 args
25+ (cell 7:17
26+ (aura 7:18 @t)
27+ (aura 7:21 @p)
28+ (cell 7:24 (flag 7:25) (aura 7:27 @ux))))
29+ (body 8:3
30+ (branch 8:3
31+ (wing 8:6 args)
32+ (arm 9:5
33+ (cell 9:5 (bind 9:6 a) (bind 9:8 b) (bind 9:10 c))
34+ (wing 9:13 c))))))
35+ (value 10:1 infer
36+ (gate 10:10
37+ (bind 10:13 x)
38+ (body 11:3
39+ (branch 11:3
40+ (wing 11:6 x)
41+ (arm 12:5
42+ (cell 12:5 (bind 12:6 a) (bind 12:8 b) (bind 12:10 c))
43+ (tuple 12:13 (wing 12:14 c) (wing 12:16 b) (wing 12:18 a)))))))
44+ (value 13:1 duplicate
45+ (gate 13:14
46+ (face 13:17 args
47+ (cell 13:22 (aura 13:23 @t) (aura 13:26 @p) (flag 13:29)))
48+ (body 14:3
49+ (branch 14:3
50+ (wing 14:6 args)
51+ (arm 15:5
52+ (cell 15:5 (bind 15:6 a) (bind 15:8 b) (bind 15:10 a))
53+ (wing 15:13 a))))))
54+ (value 16:1 shadow
55+ (gate 16:11
56+ (face 16:14 args
57+ (cell 16:19 (aura 16:20 @t) (aura 16:23 @p) (flag 16:26)))
58+ (body 17:3
59+ (branch 17:3
60+ (wing 17:6 args)
61+ (arm 18:5
62+ (cell 18:5 (bind 18:6 args) (bind 18:11 b) (bind 18:13 c))
63+ (wing 18:16 b))))))
64+ (value 19:1 prelude-shadow
65+ (gate 19:19
66+ (face 19:22 args
67+ (cell 19:27 (aura 19:28 @t) (aura 19:31 @p) (flag 19:34)))
68+ (body 20:3
69+ (branch 20:3
70+ (wing 20:6 args)
71+ (arm 21:5
72+ (cell 21:5 (bind 21:6 a) (bind 21:8 not) (bind 21:12 c))
73+ (wing 21:15 c))))))
74+ (value 22:1 atom
75+ (gate 22:9
76+ (face 22:12 args (aura 22:17 @t))
77+ (body 23:3
78+ (branch 23:3
79+ (wing 23:6 args)
80+ (arm 24:5
81+ (cell 24:5 (bind 24:6 a) (bind 24:8 b) (bind 24:10 c))
82+ (wing 24:13 a))))))
83+ (value 25:1 too-many
84+ (gate 25:13
85+ (face 25:16 args
86+ (cell 25:21 (aura 25:22 @t) (aura 25:25 @p)))
87+ (body 26:3
88+ (branch 26:3
89+ (wing 26:6 args)
90+ (arm 27:5
91+ (cell 27:5 (bind 27:6 a) (bind 27:8 b) (bind 27:10 c))
92+ (wing 27:13 a))))))
93+ (value 28:1 record
94+ (gate 28:11
95+ (face 28:14 args
96+ (cell 28:19
97+ (face 28:20 a (aura 28:22 @t))
98+ (face 28:25 b (aura 28:27 @p))
99+ (face 28:30 c (flag 28:32))))
100+ (body 29:3
101+ (branch 29:3
102+ (wing 29:6 args)
103+ (arm 30:5
104+ (cell 30:5 (bind 30:6 a) (bind 30:8 b) (bind 30:10 c))
105+ (wing 30:13 a))))))
106+ (value 31:1 nested
107+ (gate 31:11
108+ (face 31:14 args
109+ (cell 31:19
110+ (aura 31:20 @t)
111+ (cell 31:23 (aura 31:24 @p) (flag 31:27))
112+ (aura 31:30 @ux)))
113+ (body 32:3
114+ (branch 32:3
115+ (wing 32:6 args)
116+ (arm 33:5
117+ (cell 33:5
118+ (bind 33:6 a)
119+ (cell 33:8 (bind 33:9 b) (bind 33:11 c))
120+ (bind 33:14 d))
121+ (wing 33:17 d))))))
122+ (value 34:1 wildcard
123+ (gate 34:13
124+ (face 34:16 args
125+ (cell 34:21 (aura 34:22 @t) (aura 34:25 @p) (flag 34:28)))
126+ (body 35:3
127+ (branch 35:3
128+ (wing 35:6 args)
129+ (arm 36:5
130+ (cell 36:5 (bind 36:6 a) (any 36:8) (bind 36:10 c))
131+ (wing 36:13 c))))))
132+ (value 37:1 pending
133+ (gate 37:12
134+ (face 37:15 args
135+ (cell 37:20 (aura 37:21 @t) (aura 37:24 @p) (flag 37:27)))
136+ (body 38:3
137+ (branch 38:3
138+ (wing 38:6 args)
139+ (arm 39:5
140+ (cell 39:5 (bind 39:6 a) (bind 39:8 b) (bind 39:10 c))
141+ (body 40:7
142+ (trace 40:7
143+ (lit 40:10 %unused)
144+ (body 41:9 (wing 41:9 c))))))))))
tests/golden/types-cell-pattern-many/types.txtnew file+14
@@ -0,0 +1,14 @@
1+partial inference; module not checked
2+++ three: $-([@t [@p ?]] ?)
3+++ four: $-([@t [@p [? @ux]]] @ux)
4+++ rest: $-([@t [@p [? @ux]]] [? @ux])
5+++ infer: $-([A [B C]] [C [B A]])
6+++ duplicate: pattern shadows a name
7+++ shadow: pattern shadows a name
8+++ prelude-shadow: pattern shadows a name
9+++ atom: cell pattern does not match the subject type
10+++ too-many: cell pattern does not match the subject type
11+++ record: record patterns are not supported by partial inference
12+++ nested: branch pattern is not supported by partial inference
13+++ wildcard: branch pattern is not supported by partial inference
14+++ pending: tag needs context in partial inference
tests/golden/types-cell-pattern-schemes/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Patterns: a name binds anew and the last position of a cell pattern binds the rest; Modules: no name may shadow one already in scope.
2+tests: A complete single-arm cell pattern of binders follows the right-nested cell spine, preserving polymorphism and the final tail. Duplicate or shadowed binders and definite non-cell subjects fail; uncertain union/collection spines and other patterns stay unsupported.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-cell-pattern-schemes/modules.txtnew file+1
@@ -0,0 +1 @@
1+# Use the prepared prelude.
tests/golden/types-cell-pattern-schemes/source.jibbnew file+23
@@ -0,0 +1,23 @@
1++$ union
2+ [%go @t @p]
3+ %stop
4+++ maybe-union |= x=union
5+ ?- x
6+ [a b c] a
7+++ maybe-list |= x=(list @t)
8+ ?- x
9+ [a b c] a
10+++ identity |= x
11+ ?- x
12+ [a b c] [a b c]
13+++ text (identity "hi" ~zod %.y)
14+++ ship (identity ~zod "hi" %.n)
15+++ shared |= x=[A A A]
16+ ?- x
17+ [a b c] [a b c]
18+++ wrong (shared "hi" ~zod "ok")
19+++ local-shadow |= outer=@t
20+ ++ local |= x=[@t @p ?]
21+ ?- x
22+ [a outer c] c
23+ (local ["x" ~zod %.n])
tests/golden/types-cell-pattern-schemes/tokens.txtnew file+168
@@ -0,0 +1,168 @@
1+1:1 glyph +$
2+1:4 name union
3+2:3 INDENT
4+2:3 glyph [
5+2:4 tight lit %go
6+2:8 aura @t
7+2:11 aura @p
8+2:13 tight glyph ]
9+3:3 NEWLINE
10+3:3 lit %stop
11+4:1 DEDENT
12+4:1 NEWLINE
13+4:1 glyph ++
14+4:4 name maybe-union
15+4:16 glyph |=
16+4:19 name x
17+4:20 tight glyph =
18+4:21 tight name union
19+5:3 INDENT
20+5:3 glyph ?-
21+5:6 name x
22+6:5 INDENT
23+6:5 glyph [
24+6:6 tight name a
25+6:8 name b
26+6:10 name c
27+6:11 tight glyph ]
28+6:13 name a
29+7:1 DEDENT
30+7:1 DEDENT
31+7:1 NEWLINE
32+7:1 glyph ++
33+7:4 name maybe-list
34+7:15 glyph |=
35+7:18 name x
36+7:19 tight glyph =
37+7:20 tight glyph (
38+7:21 tight name list
39+7:26 aura @t
40+7:28 tight glyph )
41+8:3 INDENT
42+8:3 glyph ?-
43+8:6 name x
44+9:5 INDENT
45+9:5 glyph [
46+9:6 tight name a
47+9:8 name b
48+9:10 name c
49+9:11 tight glyph ]
50+9:13 name a
51+10:1 DEDENT
52+10:1 DEDENT
53+10:1 NEWLINE
54+10:1 glyph ++
55+10:4 name identity
56+10:13 glyph |=
57+10:16 name x
58+11:3 INDENT
59+11:3 glyph ?-
60+11:6 name x
61+12:5 INDENT
62+12:5 glyph [
63+12:6 tight name a
64+12:8 name b
65+12:10 name c
66+12:11 tight glyph ]
67+12:13 glyph [
68+12:14 tight name a
69+12:16 name b
70+12:18 name c
71+12:19 tight glyph ]
72+13:1 DEDENT
73+13:1 DEDENT
74+13:1 NEWLINE
75+13:1 glyph ++
76+13:4 name text
77+13:9 glyph (
78+13:10 tight name identity
79+13:19 str "hi"
80+13:24 lit ~zod
81+13:29 lit %.y
82+13:32 tight glyph )
83+14:1 NEWLINE
84+14:1 glyph ++
85+14:4 name ship
86+14:9 glyph (
87+14:10 tight name identity
88+14:19 lit ~zod
89+14:24 str "hi"
90+14:29 lit %.n
91+14:32 tight glyph )
92+15:1 NEWLINE
93+15:1 glyph ++
94+15:4 name shared
95+15:11 glyph |=
96+15:14 name x
97+15:15 tight glyph =
98+15:16 tight glyph [
99+15:17 tight tvar A
100+15:19 tvar A
101+15:21 tvar A
102+15:22 tight glyph ]
103+16:3 INDENT
104+16:3 glyph ?-
105+16:6 name x
106+17:5 INDENT
107+17:5 glyph [
108+17:6 tight name a
109+17:8 name b
110+17:10 name c
111+17:11 tight glyph ]
112+17:13 glyph [
113+17:14 tight name a
114+17:16 name b
115+17:18 name c
116+17:19 tight glyph ]
117+18:1 DEDENT
118+18:1 DEDENT
119+18:1 NEWLINE
120+18:1 glyph ++
121+18:4 name wrong
122+18:10 glyph (
123+18:11 tight name shared
124+18:18 str "hi"
125+18:23 lit ~zod
126+18:28 str "ok"
127+18:32 tight glyph )
128+19:1 NEWLINE
129+19:1 glyph ++
130+19:4 name local-shadow
131+19:17 glyph |=
132+19:20 name outer
133+19:25 tight glyph =
134+19:26 tight aura @t
135+20:3 INDENT
136+20:3 glyph ++
137+20:6 name local
138+20:12 glyph |=
139+20:15 name x
140+20:16 tight glyph =
141+20:17 tight glyph [
142+20:18 tight aura @t
143+20:21 aura @p
144+20:24 glyph ?
145+20:25 tight glyph ]
146+21:5 INDENT
147+21:5 glyph ?-
148+21:8 name x
149+22:7 INDENT
150+22:7 glyph [
151+22:8 tight name a
152+22:10 name outer
153+22:16 name c
154+22:17 tight glyph ]
155+22:19 name c
156+23:3 DEDENT
157+23:3 DEDENT
158+23:3 NEWLINE
159+23:3 glyph (
160+23:4 tight name local
161+23:10 glyph [
162+23:11 tight str "x"
163+23:15 lit ~zod
164+23:20 lit %.n
165+23:23 tight glyph ]
166+23:24 tight glyph )
167+23:25 DEDENT
168+23:25 NEWLINE
tests/golden/types-cell-pattern-schemes/tree.txtnew file+70
@@ -0,0 +1,70 @@
1+(module
2+ (mold 1:1 union
3+ (union 2:3
4+ (cell 2:3 (const 2:4 %go) (aura 2:8 @t) (aura 2:11 @p))
5+ (const 3:3 %stop)))
6+ (value 4:1 maybe-union
7+ (gate 4:16
8+ (face 4:19 x (ref 4:21 union))
9+ (body 5:3
10+ (branch 5:3
11+ (wing 5:6 x)
12+ (arm 6:5
13+ (cell 6:5 (bind 6:6 a) (bind 6:8 b) (bind 6:10 c))
14+ (wing 6:13 a))))))
15+ (value 7:1 maybe-list
16+ (gate 7:15
17+ (face 7:18 x
18+ (apply 7:20 list (aura 7:26 @t)))
19+ (body 8:3
20+ (branch 8:3
21+ (wing 8:6 x)
22+ (arm 9:5
23+ (cell 9:5 (bind 9:6 a) (bind 9:8 b) (bind 9:10 c))
24+ (wing 9:13 a))))))
25+ (value 10:1 identity
26+ (gate 10:13
27+ (bind 10:16 x)
28+ (body 11:3
29+ (branch 11:3
30+ (wing 11:6 x)
31+ (arm 12:5
32+ (cell 12:5 (bind 12:6 a) (bind 12:8 b) (bind 12:10 c))
33+ (tuple 12:13 (wing 12:14 a) (wing 12:16 b) (wing 12:18 c)))))))
34+ (value 13:1 text
35+ (group 13:9
36+ (call 13:10 (wing 13:10 identity) (str 13:19 "hi") (lit 13:24 ~zod) (lit 13:29 %.y))))
37+ (value 14:1 ship
38+ (group 14:9
39+ (call 14:10 (wing 14:10 identity) (lit 14:19 ~zod) (str 14:24 "hi") (lit 14:29 %.n))))
40+ (value 15:1 shared
41+ (gate 15:11
42+ (face 15:14 x
43+ (cell 15:16 (tvar 15:17 A) (tvar 15:19 A) (tvar 15:21 A)))
44+ (body 16:3
45+ (branch 16:3
46+ (wing 16:6 x)
47+ (arm 17:5
48+ (cell 17:5 (bind 17:6 a) (bind 17:8 b) (bind 17:10 c))
49+ (tuple 17:13 (wing 17:14 a) (wing 17:16 b) (wing 17:18 c)))))))
50+ (value 18:1 wrong
51+ (group 18:10
52+ (call 18:11 (wing 18:11 shared) (str 18:18 "hi") (lit 18:23 ~zod) (str 18:28 "ok"))))
53+ (value 19:1 local-shadow
54+ (gate 19:17
55+ (face 19:20 outer (aura 19:26 @t))
56+ (body 20:3
57+ (value 20:3 local
58+ (gate 20:12
59+ (face 20:15 x
60+ (cell 20:17 (aura 20:18 @t) (aura 20:21 @p) (flag 20:24)))
61+ (body 21:5
62+ (branch 21:5
63+ (wing 21:8 x)
64+ (arm 22:7
65+ (cell 22:7 (bind 22:8 a) (bind 22:10 outer) (bind 22:16 c))
66+ (wing 22:19 c))))))
67+ (group 23:3
68+ (call 23:4
69+ (wing 23:4 local)
70+ (tuple 23:10 (str 23:11 "x") (lit 23:15 ~zod) (lit 23:20 %.n))))))))
tests/golden/types-cell-pattern-schemes/types.txtnew file+16
@@ -0,0 +1,16 @@
1+partial inference; module not checked
2++$ union: cases proven disjoint; mold not checked
3+++ maybe-union: cell pattern subject is not supported by partial inference
4+++ maybe-list: cell pattern subject is not supported by partial inference
5+++ identity: $-([A [B C]] [A [B C]])
6+++ text: [@t [@p ?]]
7+++ ship: [@p [@t ?]]
8+++ shared: $-([A [A A]] [A [A A]])
9+++ wrong: call's sample and argument types do not unify
10+/tests/golden/types-cell-pattern-schemes/source.jibb:18:11: called gate has type $-([A [A A]] [A [A A]])
11+++ wrong (shared "hi" ~zod "ok")
12+ ^
13+/tests/golden/types-cell-pattern-schemes/source.jibb:18:23: argument has type @p
14+++ wrong (shared "hi" ~zod "ok")
15+ ^
16+++ local-shadow: local definitions need unsupported inference
tests/golden/types-cell-pattern-tail/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Patterns: a name binds anew and the last position of a cell pattern binds the rest; Modules: no name may shadow one already in scope.
2+tests: A complete single-arm cell pattern of binders follows the right-nested cell spine, preserving polymorphism and the final tail. Duplicate or shadowed binders and definite non-cell subjects fail; uncertain union/collection spines and other patterns stay unsupported.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-cell-pattern-tail/modules.txtnew file+1
@@ -0,0 +1 @@
1+# Use the prepared prelude.
tests/golden/types-cell-pattern-tail/source.jibbnew file+18
@@ -0,0 +1,18 @@
1+++ pair |= x=[@t (list @p)]
2+ ?- x
3+ [first rest] rest
4+++ split |= x=[@t (list @p)]
5+ ?- x
6+ [first second third] third
7++$ either
8+ [%go @p @t]
9+ %stop
10+++ pair-union |= x=[@t either]
11+ ?- x
12+ [first rest] rest
13+++ split-union |= x=[@t either]
14+ ?- x
15+ [first second third] third
16+++ malformed |= x=[@t @p]
17+ ?- x
18+ [first second third] third
tests/golden/types-cell-pattern-tail/tokens.txtnew file+126
@@ -0,0 +1,126 @@
1+1:1 glyph ++
2+1:4 name pair
3+1:9 glyph |=
4+1:12 name x
5+1:13 tight glyph =
6+1:14 tight glyph [
7+1:15 tight aura @t
8+1:18 glyph (
9+1:19 tight name list
10+1:24 aura @p
11+1:26 tight glyph )
12+1:27 tight glyph ]
13+2:3 INDENT
14+2:3 glyph ?-
15+2:6 name x
16+3:5 INDENT
17+3:5 glyph [
18+3:6 tight name first
19+3:12 name rest
20+3:16 tight glyph ]
21+3:18 name rest
22+4:1 DEDENT
23+4:1 DEDENT
24+4:1 NEWLINE
25+4:1 glyph ++
26+4:4 name split
27+4:10 glyph |=
28+4:13 name x
29+4:14 tight glyph =
30+4:15 tight glyph [
31+4:16 tight aura @t
32+4:19 glyph (
33+4:20 tight name list
34+4:25 aura @p
35+4:27 tight glyph )
36+4:28 tight glyph ]
37+5:3 INDENT
38+5:3 glyph ?-
39+5:6 name x
40+6:5 INDENT
41+6:5 glyph [
42+6:6 tight name first
43+6:12 name second
44+6:19 name third
45+6:24 tight glyph ]
46+6:26 name third
47+7:1 DEDENT
48+7:1 DEDENT
49+7:1 NEWLINE
50+7:1 glyph +$
51+7:4 name either
52+8:3 INDENT
53+8:3 glyph [
54+8:4 tight lit %go
55+8:8 aura @p
56+8:11 aura @t
57+8:13 tight glyph ]
58+9:3 NEWLINE
59+9:3 lit %stop
60+10:1 DEDENT
61+10:1 NEWLINE
62+10:1 glyph ++
63+10:4 name pair-union
64+10:15 glyph |=
65+10:18 name x
66+10:19 tight glyph =
67+10:20 tight glyph [
68+10:21 tight aura @t
69+10:24 name either
70+10:30 tight glyph ]
71+11:3 INDENT
72+11:3 glyph ?-
73+11:6 name x
74+12:5 INDENT
75+12:5 glyph [
76+12:6 tight name first
77+12:12 name rest
78+12:16 tight glyph ]
79+12:18 name rest
80+13:1 DEDENT
81+13:1 DEDENT
82+13:1 NEWLINE
83+13:1 glyph ++
84+13:4 name split-union
85+13:16 glyph |=
86+13:19 name x
87+13:20 tight glyph =
88+13:21 tight glyph [
89+13:22 tight aura @t
90+13:25 name either
91+13:31 tight glyph ]
92+14:3 INDENT
93+14:3 glyph ?-
94+14:6 name x
95+15:5 INDENT
96+15:5 glyph [
97+15:6 tight name first
98+15:12 name second
99+15:19 name third
100+15:24 tight glyph ]
101+15:26 name third
102+16:1 DEDENT
103+16:1 DEDENT
104+16:1 NEWLINE
105+16:1 glyph ++
106+16:4 name malformed
107+16:14 glyph |=
108+16:17 name x
109+16:18 tight glyph =
110+16:19 tight glyph [
111+16:20 tight aura @t
112+16:23 aura @p
113+16:25 tight glyph ]
114+17:3 INDENT
115+17:3 glyph ?-
116+17:6 name x
117+18:5 INDENT
118+18:5 glyph [
119+18:6 tight name first
120+18:12 name second
121+18:19 name third
122+18:24 tight glyph ]
123+18:26 name third
124+18:31 DEDENT
125+18:31 DEDENT
126+18:31 NEWLINE
tests/golden/types-cell-pattern-tail/tree.txtnew file+59
@@ -0,0 +1,59 @@
1+(module
2+ (value 1:1 pair
3+ (gate 1:9
4+ (face 1:12 x
5+ (cell 1:14
6+ (aura 1:15 @t)
7+ (apply 1:18 list (aura 1:24 @p))))
8+ (body 2:3
9+ (branch 2:3
10+ (wing 2:6 x)
11+ (arm 3:5
12+ (cell 3:5 (bind 3:6 first) (bind 3:12 rest))
13+ (wing 3:18 rest))))))
14+ (value 4:1 split
15+ (gate 4:10
16+ (face 4:13 x
17+ (cell 4:15
18+ (aura 4:16 @t)
19+ (apply 4:19 list (aura 4:25 @p))))
20+ (body 5:3
21+ (branch 5:3
22+ (wing 5:6 x)
23+ (arm 6:5
24+ (cell 6:5 (bind 6:6 first) (bind 6:12 second) (bind 6:19 third))
25+ (wing 6:26 third))))))
26+ (mold 7:1 either
27+ (union 8:3
28+ (cell 8:3 (const 8:4 %go) (aura 8:8 @p) (aura 8:11 @t))
29+ (const 9:3 %stop)))
30+ (value 10:1 pair-union
31+ (gate 10:15
32+ (face 10:18 x
33+ (cell 10:20 (aura 10:21 @t) (ref 10:24 either)))
34+ (body 11:3
35+ (branch 11:3
36+ (wing 11:6 x)
37+ (arm 12:5
38+ (cell 12:5 (bind 12:6 first) (bind 12:12 rest))
39+ (wing 12:18 rest))))))
40+ (value 13:1 split-union
41+ (gate 13:16
42+ (face 13:19 x
43+ (cell 13:21 (aura 13:22 @t) (ref 13:25 either)))
44+ (body 14:3
45+ (branch 14:3
46+ (wing 14:6 x)
47+ (arm 15:5
48+ (cell 15:5 (bind 15:6 first) (bind 15:12 second) (bind 15:19 third))
49+ (wing 15:26 third))))))
50+ (value 16:1 malformed
51+ (gate 16:14
52+ (face 16:17 x
53+ (cell 16:19 (aura 16:20 @t) (aura 16:23 @p)))
54+ (body 17:3
55+ (branch 17:3
56+ (wing 17:6 x)
57+ (arm 18:5
58+ (cell 18:5 (bind 18:6 first) (bind 18:12 second) (bind 18:19 third))
59+ (wing 18:26 third)))))))
tests/golden/types-cell-pattern-tail/types.txtnew file+7
@@ -0,0 +1,7 @@
1+partial inference; module not checked
2+++ pair: $-([@t (list @p)] (list @p))
3+++ split: cell pattern subject is not supported by partial inference
4++$ either: cases proven disjoint; mold not checked
5+++ pair-union: $-([@t either] either)
6+++ split-union: cell pattern subject is not supported by partial inference
7+++ malformed: cell pattern does not match the subject type
tests/golden/types-generic-arity/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Molds: "Generic molds" are defined with `|$` after a `+$` name; type variables are capitals.
2+tests: Generic applications with too many or too few arguments fail closed.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-generic-arity/source.jibbnew file+4
@@ -0,0 +1,4 @@
1++$ carrier |$ [A] [payload=A count=@ud]
2++$ duo |$ [A B] [left=A right=B]
3+++ too-many ^- (carrier @t @p) [payload="hi" count=1]
4+++ too-few ^- (duo @t) [left="hi" right=~zod]
tests/golden/types-generic-arity/tokens.txtnew file+64
@@ -0,0 +1,64 @@
1+1:1 glyph +$
2+1:4 name carrier
3+1:12 glyph |$
4+1:15 glyph [
5+1:16 tight tvar A
6+1:17 tight glyph ]
7+1:19 glyph [
8+1:20 tight name payload
9+1:27 tight glyph =
10+1:28 tight tvar A
11+1:30 name count
12+1:35 tight glyph =
13+1:36 tight aura @ud
14+1:39 tight glyph ]
15+2:1 NEWLINE
16+2:1 glyph +$
17+2:4 name duo
18+2:8 glyph |$
19+2:11 glyph [
20+2:12 tight tvar A
21+2:14 tvar B
22+2:15 tight glyph ]
23+2:17 glyph [
24+2:18 tight name left
25+2:22 tight glyph =
26+2:23 tight tvar A
27+2:25 name right
28+2:30 tight glyph =
29+2:31 tight tvar B
30+2:32 tight glyph ]
31+3:1 NEWLINE
32+3:1 glyph ++
33+3:4 name too-many
34+3:13 glyph ^-
35+3:16 glyph (
36+3:17 tight name carrier
37+3:25 aura @t
38+3:28 aura @p
39+3:30 tight glyph )
40+3:32 glyph [
41+3:33 tight name payload
42+3:40 tight glyph =
43+3:41 tight str "hi"
44+3:46 name count
45+3:51 tight glyph =
46+3:52 tight lit 1
47+3:53 tight glyph ]
48+4:1 NEWLINE
49+4:1 glyph ++
50+4:4 name too-few
51+4:12 glyph ^-
52+4:15 glyph (
53+4:16 tight name duo
54+4:20 aura @t
55+4:22 tight glyph )
56+4:24 glyph [
57+4:25 tight name left
58+4:29 tight glyph =
59+4:30 tight str "hi"
60+4:35 name right
61+4:40 tight glyph =
62+4:41 tight lit ~zod
63+4:45 tight glyph ]
64+4:46 NEWLINE
tests/golden/types-generic-arity/tree.txtnew file+23
@@ -0,0 +1,23 @@
1+(module
2+ (mold 1:1 carrier
3+ (generic 1:12 A
4+ (cell 1:19
5+ (face 1:20 payload (tvar 1:28 A))
6+ (face 1:30 count (aura 1:36 @ud)))))
7+ (mold 2:1 duo
8+ (generic 2:8 A B
9+ (cell 2:17
10+ (face 2:18 left (tvar 2:23 A))
11+ (face 2:25 right (tvar 2:31 B)))))
12+ (value 3:1 too-many
13+ (cast 3:13
14+ (apply 3:16 carrier (aura 3:25 @t) (aura 3:28 @p))
15+ (tuple 3:32
16+ (face 3:33 payload (str 3:41 "hi"))
17+ (face 3:46 count (lit 3:52 1)))))
18+ (value 4:1 too-few
19+ (cast 4:12
20+ (apply 4:15 duo (aura 4:20 @t))
21+ (tuple 4:24
22+ (face 4:25 left (str 4:30 "hi"))
23+ (face 4:35 right (lit 4:41 ~zod))))))
tests/golden/types-generic-arity/types.txtnew file+5
@@ -0,0 +1,5 @@
1+partial inference; module not checked
2++$ carrier: not checked
3++$ duo: not checked
4+++ too-many: cast mold is not supported by partial inference
5+++ too-few: cast mold is not supported by partial inference
tests/golden/types-generic-face-inference/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Molds: "Faces are part of record types"; unnamed positions can take faces but two different explicit faces don't unify.
2+tests: A generic value fits a faced field with the same type variable, including union payloads and nested or repeated fields. Explicitly mismatched faces remain errors and differing-variable face propagation remains unsupported.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-generic-face-inference/source.jibbnew file+8
@@ -0,0 +1,8 @@
1++$ choice |$ [A B]
2+ [%one value=A]
3+ [%two value=B]
4+++ make |= x=A ^- (choice A B) [%one x]
5+++ record |= x=A ^- [first=A second=A] [x x]
6+++ nested |= x=A ^- [outer=[first=A second=A] rest=A] [[x x] x]
7+++ mismatch |= x=[left=@t rest=@ud] ^- [right=@t rest=@ud] x
8+++ uncertain |= x=A ^- [first=B rest=@t] [x "hi"]
tests/golden/types-generic-face-inference/tokens.txtnew file+134
@@ -0,0 +1,134 @@
1+1:1 glyph +$
2+1:4 name choice
3+1:11 glyph |$
4+1:14 glyph [
5+1:15 tight tvar A
6+1:17 tvar B
7+1:18 tight glyph ]
8+2:3 INDENT
9+2:3 glyph [
10+2:4 tight lit %one
11+2:9 name value
12+2:14 tight glyph =
13+2:15 tight tvar A
14+2:16 tight glyph ]
15+3:3 NEWLINE
16+3:3 glyph [
17+3:4 tight lit %two
18+3:9 name value
19+3:14 tight glyph =
20+3:15 tight tvar B
21+3:16 tight glyph ]
22+4:1 DEDENT
23+4:1 NEWLINE
24+4:1 glyph ++
25+4:4 name make
26+4:9 glyph |=
27+4:12 name x
28+4:13 tight glyph =
29+4:14 tight tvar A
30+4:16 glyph ^-
31+4:19 glyph (
32+4:20 tight name choice
33+4:27 tvar A
34+4:29 tvar B
35+4:30 tight glyph )
36+4:32 glyph [
37+4:33 tight lit %one
38+4:38 name x
39+4:39 tight glyph ]
40+5:1 NEWLINE
41+5:1 glyph ++
42+5:4 name record
43+5:11 glyph |=
44+5:14 name x
45+5:15 tight glyph =
46+5:16 tight tvar A
47+5:18 glyph ^-
48+5:21 glyph [
49+5:22 tight name first
50+5:27 tight glyph =
51+5:28 tight tvar A
52+5:30 name second
53+5:36 tight glyph =
54+5:37 tight tvar A
55+5:38 tight glyph ]
56+5:40 glyph [
57+5:41 tight name x
58+5:43 name x
59+5:44 tight glyph ]
60+6:1 NEWLINE
61+6:1 glyph ++
62+6:4 name nested
63+6:11 glyph |=
64+6:14 name x
65+6:15 tight glyph =
66+6:16 tight tvar A
67+6:18 glyph ^-
68+6:21 glyph [
69+6:22 tight name outer
70+6:27 tight glyph =
71+6:28 tight glyph [
72+6:29 tight name first
73+6:34 tight glyph =
74+6:35 tight tvar A
75+6:37 name second
76+6:43 tight glyph =
77+6:44 tight tvar A
78+6:45 tight glyph ]
79+6:47 name rest
80+6:51 tight glyph =
81+6:52 tight tvar A
82+6:53 tight glyph ]
83+6:55 glyph [
84+6:56 tight glyph [
85+6:57 tight name x
86+6:59 name x
87+6:60 tight glyph ]
88+6:62 name x
89+6:63 tight glyph ]
90+7:1 NEWLINE
91+7:1 glyph ++
92+7:4 name mismatch
93+7:13 glyph |=
94+7:16 name x
95+7:17 tight glyph =
96+7:18 tight glyph [
97+7:19 tight name left
98+7:23 tight glyph =
99+7:24 tight aura @t
100+7:27 name rest
101+7:31 tight glyph =
102+7:32 tight aura @ud
103+7:35 tight glyph ]
104+7:37 glyph ^-
105+7:40 glyph [
106+7:41 tight name right
107+7:46 tight glyph =
108+7:47 tight aura @t
109+7:50 name rest
110+7:54 tight glyph =
111+7:55 tight aura @ud
112+7:58 tight glyph ]
113+7:60 name x
114+8:1 NEWLINE
115+8:1 glyph ++
116+8:4 name uncertain
117+8:14 glyph |=
118+8:17 name x
119+8:18 tight glyph =
120+8:19 tight tvar A
121+8:21 glyph ^-
122+8:24 glyph [
123+8:25 tight name first
124+8:30 tight glyph =
125+8:31 tight tvar B
126+8:33 name rest
127+8:37 tight glyph =
128+8:38 tight aura @t
129+8:40 tight glyph ]
130+8:42 glyph [
131+8:43 tight name x
132+8:45 str "hi"
133+8:49 tight glyph ]
134+8:50 NEWLINE
tests/golden/types-generic-face-inference/tree.txtnew file+56
@@ -0,0 +1,56 @@
1+(module
2+ (mold 1:1 choice
3+ (generic 1:11 A B
4+ (union 2:3
5+ (cell 2:3
6+ (const 2:4 %one)
7+ (face 2:9 value (tvar 2:15 A)))
8+ (cell 3:3
9+ (const 3:4 %two)
10+ (face 3:9 value (tvar 3:15 B))))))
11+ (value 4:1 make
12+ (gate 4:9
13+ (face 4:12 x (tvar 4:14 A))
14+ (cast 4:16
15+ (apply 4:19 choice (tvar 4:27 A) (tvar 4:29 B))
16+ (tuple 4:32 (lit 4:33 %one) (wing 4:38 x)))))
17+ (value 5:1 record
18+ (gate 5:11
19+ (face 5:14 x (tvar 5:16 A))
20+ (cast 5:18
21+ (cell 5:21
22+ (face 5:22 first (tvar 5:28 A))
23+ (face 5:30 second (tvar 5:37 A)))
24+ (tuple 5:40 (wing 5:41 x) (wing 5:43 x)))))
25+ (value 6:1 nested
26+ (gate 6:11
27+ (face 6:14 x (tvar 6:16 A))
28+ (cast 6:18
29+ (cell 6:21
30+ (face 6:22 outer
31+ (cell 6:28
32+ (face 6:29 first (tvar 6:35 A))
33+ (face 6:37 second (tvar 6:44 A))))
34+ (face 6:47 rest (tvar 6:52 A)))
35+ (tuple 6:55
36+ (tuple 6:56 (wing 6:57 x) (wing 6:59 x))
37+ (wing 6:62 x)))))
38+ (value 7:1 mismatch
39+ (gate 7:13
40+ (face 7:16 x
41+ (cell 7:18
42+ (face 7:19 left (aura 7:24 @t))
43+ (face 7:27 rest (aura 7:32 @ud))))
44+ (cast 7:37
45+ (cell 7:40
46+ (face 7:41 right (aura 7:47 @t))
47+ (face 7:50 rest (aura 7:55 @ud)))
48+ (wing 7:60 x))))
49+ (value 8:1 uncertain
50+ (gate 8:14
51+ (face 8:17 x (tvar 8:19 A))
52+ (cast 8:21
53+ (cell 8:24
54+ (face 8:25 first (tvar 8:31 B))
55+ (face 8:33 rest (aura 8:38 @t)))
56+ (tuple 8:42 (wing 8:43 x) (str 8:45 "hi"))))))
tests/golden/types-generic-face-inference/types.txtnew file+13
@@ -0,0 +1,13 @@
1+partial inference; module not checked
2++$ choice: cases proven disjoint; mold not checked
3+++ make: $-(A (choice A B))
4+++ record: $-(A [first=A second=A])
5+++ nested: $-(A [outer=[first=A second=A] rest=A])
6+++ mismatch: cast mold and expression type do not unify
7+/tests/golden/types-generic-face-inference/source.jibb:7:40: cast mold has type [right=@t rest=@ud]
8+++ mismatch |= x=[left=@t rest=@ud] ^- [right=@t rest=@ud] x
9+ ^
10+/tests/golden/types-generic-face-inference/source.jibb:7:60: expression has type [left=@t rest=@ud]
11+++ mismatch |= x=[left=@t rest=@ud] ^- [right=@t rest=@ud] x
12+ ^
13+++ uncertain: cast constraint is not supported by partial inference
tests/golden/types-generic-gates/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Molds: "Generic molds" are defined with `|$` after a `+$` name; type variables are capitals.
2+tests: Nonrecursive generic gate and two-parameter record molds retain independent parameter types.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-generic-gates/source.jibbnew file+4
@@ -0,0 +1,4 @@
1++$ mapper |$ [A B] $-(A B)
2++$ duo |$ [A B] [left=A right=B]
3+++ gate ^- (mapper @t @t) |= x=@t x
4+++ pair ^- (duo @t @p) [left="hi" right=~zod]
tests/golden/types-generic-gates/tokens.txtnew file+59
@@ -0,0 +1,59 @@
1+1:1 glyph +$
2+1:4 name mapper
3+1:11 glyph |$
4+1:14 glyph [
5+1:15 tight tvar A
6+1:17 tvar B
7+1:18 tight glyph ]
8+1:20 glyph $-(
9+1:23 tight tvar A
10+1:25 tvar B
11+1:26 tight glyph )
12+2:1 NEWLINE
13+2:1 glyph +$
14+2:4 name duo
15+2:8 glyph |$
16+2:11 glyph [
17+2:12 tight tvar A
18+2:14 tvar B
19+2:15 tight glyph ]
20+2:17 glyph [
21+2:18 tight name left
22+2:22 tight glyph =
23+2:23 tight tvar A
24+2:25 name right
25+2:30 tight glyph =
26+2:31 tight tvar B
27+2:32 tight glyph ]
28+3:1 NEWLINE
29+3:1 glyph ++
30+3:4 name gate
31+3:9 glyph ^-
32+3:12 glyph (
33+3:13 tight name mapper
34+3:20 aura @t
35+3:23 aura @t
36+3:25 tight glyph )
37+3:27 glyph |=
38+3:30 name x
39+3:31 tight glyph =
40+3:32 tight aura @t
41+3:35 name x
42+4:1 NEWLINE
43+4:1 glyph ++
44+4:4 name pair
45+4:9 glyph ^-
46+4:12 glyph (
47+4:13 tight name duo
48+4:17 aura @t
49+4:20 aura @p
50+4:22 tight glyph )
51+4:24 glyph [
52+4:25 tight name left
53+4:29 tight glyph =
54+4:30 tight str "hi"
55+4:35 name right
56+4:40 tight glyph =
57+4:41 tight lit ~zod
58+4:45 tight glyph ]
59+4:46 NEWLINE
tests/golden/types-generic-gates/tree.txtnew file+21
@@ -0,0 +1,21 @@
1+(module
2+ (mold 1:1 mapper
3+ (generic 1:11 A B
4+ (fn 1:20 (tvar 1:23 A) (tvar 1:25 B))))
5+ (mold 2:1 duo
6+ (generic 2:8 A B
7+ (cell 2:17
8+ (face 2:18 left (tvar 2:23 A))
9+ (face 2:25 right (tvar 2:31 B)))))
10+ (value 3:1 gate
11+ (cast 3:9
12+ (apply 3:12 mapper (aura 3:20 @t) (aura 3:23 @t))
13+ (gate 3:27
14+ (face 3:30 x (aura 3:32 @t))
15+ (wing 3:35 x))))
16+ (value 4:1 pair
17+ (cast 4:9
18+ (apply 4:12 duo (aura 4:17 @t) (aura 4:20 @p))
19+ (tuple 4:24
20+ (face 4:25 left (str 4:30 "hi"))
21+ (face 4:35 right (lit 4:41 ~zod))))))
tests/golden/types-generic-gates/types.txtnew file+5
@@ -0,0 +1,5 @@
1+partial inference; module not checked
2++$ mapper: not checked
3++$ duo: not checked
4+++ gate: $-(@t @t)
5+++ pair: [left=@t right=@p]
tests/golden/types-generic-import-reverse/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Modules: "Everything is exported and read through the import's face"; Molds: generic molds.
2+tests: An imported two-parameter generic reverses its parameters for caller capitals and for concrete @t/@p arguments, without capturing either variable.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-generic-import-reverse/module-trees.txtnew file+7
@@ -0,0 +1,7 @@
1+/ui/lib.jibb
2+(module
3+ (mold 1:1 reverse
4+ (generic 1:12 A B
5+ (cell 1:21
6+ (face 1:22 left (tvar 1:27 B))
7+ (face 1:29 right (tvar 1:35 A))))))
tests/golden/types-generic-import-reverse/modules.txtnew file+1
@@ -0,0 +1 @@
1+/ui/lib.jibb
tests/golden/types-generic-import-reverse/modules/ui/lib.jibbnew file+1
@@ -0,0 +1 @@
1++$ reverse |$ [A B] [left=B right=A]
tests/golden/types-generic-import-reverse/source.jibbnew file+3
@@ -0,0 +1,3 @@
1+/= lib /ui/lib
2+++ make |= [x=A y=B] ^- (reverse.lib A B) [left=y right=x]
3+++ concrete ^- (reverse.lib @t @p) [left=~zod right="hi"]
tests/golden/types-generic-import-reverse/tokens.txtnew file+50
@@ -0,0 +1,50 @@
1+1:1 glyph /=
2+1:5 name lib
3+1:9 glyph /
4+1:10 tight knot ui
5+1:12 tight glyph /
6+1:13 tight knot lib
7+2:1 NEWLINE
8+2:1 glyph ++
9+2:4 name make
10+2:9 glyph |=
11+2:12 glyph [
12+2:13 tight name x
13+2:14 tight glyph =
14+2:15 tight tvar A
15+2:17 name y
16+2:18 tight glyph =
17+2:19 tight tvar B
18+2:20 tight glyph ]
19+2:22 glyph ^-
20+2:25 glyph (
21+2:26 tight wing reverse.lib
22+2:38 tvar A
23+2:40 tvar B
24+2:41 tight glyph )
25+2:43 glyph [
26+2:44 tight name left
27+2:48 tight glyph =
28+2:49 tight name y
29+2:51 name right
30+2:56 tight glyph =
31+2:57 tight name x
32+2:58 tight glyph ]
33+3:1 NEWLINE
34+3:1 glyph ++
35+3:4 name concrete
36+3:13 glyph ^-
37+3:16 glyph (
38+3:17 tight wing reverse.lib
39+3:29 aura @t
40+3:32 aura @p
41+3:34 tight glyph )
42+3:36 glyph [
43+3:37 tight name left
44+3:41 tight glyph =
45+3:42 tight lit ~zod
46+3:47 name right
47+3:52 tight glyph =
48+3:53 tight str "hi"
49+3:57 tight glyph ]
50+3:58 NEWLINE
tests/golden/types-generic-import-reverse/tree.txtnew file+18
@@ -0,0 +1,18 @@
1+(module
2+ (jibb 1:1 lib /ui/lib)
3+ (value 2:1 make
4+ (gate 2:9
5+ (cell 2:12
6+ (face 2:13 x (tvar 2:15 A))
7+ (face 2:17 y (tvar 2:19 B)))
8+ (cast 2:22
9+ (apply 2:25 reverse.lib (tvar 2:38 A) (tvar 2:40 B))
10+ (tuple 2:43
11+ (face 2:44 left (wing 2:49 y))
12+ (face 2:51 right (wing 2:57 x))))))
13+ (value 3:1 concrete
14+ (cast 3:13
15+ (apply 3:16 reverse.lib (aura 3:29 @t) (aura 3:32 @p))
16+ (tuple 3:36
17+ (face 3:37 left (lit 3:42 ~zod))
18+ (face 3:47 right (str 3:53 "hi"))))))
tests/golden/types-generic-import-reverse/types.txtnew file+3
@@ -0,0 +1,3 @@
1+partial inference; module not checked
2+++ make: $-([x=A y=B] [left=B right=A])
3+++ concrete: [left=@p right=@t]
tests/golden/types-generic-lexical-alias/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Molds: generic molds declare parameters after `|$`.
2+tests: A non-generic alias cannot silently capture a generic caller's parameter with the same spelling; this partial checker leaves the use unsupported.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-generic-lexical-alias/source.jibbnew file+3
@@ -0,0 +1,3 @@
1++$ stray [field=A count=@ud]
2++$ box |$ [A] stray
3+++ example ^- (box @t) [field="hi" count=1]
tests/golden/types-generic-lexical-alias/tokens.txtnew file+35
@@ -0,0 +1,35 @@
1+1:1 glyph +$
2+1:4 name stray
3+1:10 glyph [
4+1:11 tight name field
5+1:16 tight glyph =
6+1:17 tight tvar A
7+1:19 name count
8+1:24 tight glyph =
9+1:25 tight aura @ud
10+1:28 tight glyph ]
11+2:1 NEWLINE
12+2:1 glyph +$
13+2:4 name box
14+2:8 glyph |$
15+2:11 glyph [
16+2:12 tight tvar A
17+2:13 tight glyph ]
18+2:15 name stray
19+3:1 NEWLINE
20+3:1 glyph ++
21+3:4 name example
22+3:12 glyph ^-
23+3:15 glyph (
24+3:16 tight name box
25+3:20 aura @t
26+3:22 tight glyph )
27+3:24 glyph [
28+3:25 tight name field
29+3:30 tight glyph =
30+3:31 tight str "hi"
31+3:36 name count
32+3:41 tight glyph =
33+3:42 tight lit 1
34+3:43 tight glyph ]
35+3:44 NEWLINE
tests/golden/types-generic-lexical-alias/tree.txtnew file+13
@@ -0,0 +1,13 @@
1+(module
2+ (mold 1:1 stray
3+ (cell 1:10
4+ (face 1:11 field (tvar 1:17 A))
5+ (face 1:19 count (aura 1:25 @ud))))
6+ (mold 2:1 box
7+ (generic 2:8 A (ref 2:15 stray)))
8+ (value 3:1 example
9+ (cast 3:12
10+ (apply 3:15 box (aura 3:20 @t))
11+ (tuple 3:24
12+ (face 3:25 field (str 3:31 "hi"))
13+ (face 3:36 count (lit 3:42 1))))))
tests/golden/types-generic-lexical-alias/types.txtnew file+4
@@ -0,0 +1,4 @@
1+partial inference; module not checked
2++$ stray: not checked
3++$ box: not checked
4+++ example: cast mold is not supported by partial inference
tests/golden/types-generic-local-parameter/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Molds: generic molds name their own parameters after `|$`; gates generalize capitals per `++`.
2+tests: A body-local generic parameter spelled A stays distinct from the enclosing gate's A when the generic is instantiated at @t.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-generic-local-parameter/source.jibbnew file+3
@@ -0,0 +1,3 @@
1+++ make |= x=A
2+ +$ box |$ [A] [value=A count=@ud]
3+ ^- (box @t) [value="hi" count=1]
tests/golden/types-generic-local-parameter/tokens.txtnew file+37
@@ -0,0 +1,37 @@
1+1:1 glyph ++
2+1:4 name make
3+1:9 glyph |=
4+1:12 name x
5+1:13 tight glyph =
6+1:14 tight tvar A
7+2:3 INDENT
8+2:3 glyph +$
9+2:6 name box
10+2:10 glyph |$
11+2:13 glyph [
12+2:14 tight tvar A
13+2:15 tight glyph ]
14+2:17 glyph [
15+2:18 tight name value
16+2:23 tight glyph =
17+2:24 tight tvar A
18+2:26 name count
19+2:31 tight glyph =
20+2:32 tight aura @ud
21+2:35 tight glyph ]
22+3:3 NEWLINE
23+3:3 glyph ^-
24+3:6 glyph (
25+3:7 tight name box
26+3:11 aura @t
27+3:13 tight glyph )
28+3:15 glyph [
29+3:16 tight name value
30+3:21 tight glyph =
31+3:22 tight str "hi"
32+3:27 name count
33+3:32 tight glyph =
34+3:33 tight lit 1
35+3:34 tight glyph ]
36+3:35 DEDENT
37+3:35 NEWLINE
tests/golden/types-generic-local-parameter/tree.txtnew file+15
@@ -0,0 +1,15 @@
1+(module
2+ (value 1:1 make
3+ (gate 1:9
4+ (face 1:12 x (tvar 1:14 A))
5+ (body 2:3
6+ (mold 2:3 box
7+ (generic 2:10 A
8+ (cell 2:17
9+ (face 2:18 value (tvar 2:24 A))
10+ (face 2:26 count (aura 2:32 @ud)))))
11+ (cast 3:3
12+ (apply 3:6 box (aura 3:11 @t))
13+ (tuple 3:15
14+ (face 3:16 value (str 3:22 "hi"))
15+ (face 3:27 count (lit 3:33 1))))))))
tests/golden/types-generic-local-parameter/types.txtnew file+2
@@ -0,0 +1,2 @@
1+partial inference; module not checked
2+++ make: $-(A [value=@t count=@ud])
tests/golden/types-generic-local-scope/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Molds: "Generic molds" are defined with `|$` after a `+$` name; type variables are capitals.
2+tests: A local generic mold body mentioning an enclosing capital is not silently captured or conflated with its own parameter.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-generic-local-scope/source.jibbnew file+3
@@ -0,0 +1,3 @@
1+++ make |= x=A
2+ +$ box |$ [B] [outer=A inner=B]
3+ ^- (box @t) [outer=x inner="hi"]
tests/golden/types-generic-local-scope/tokens.txtnew file+37
@@ -0,0 +1,37 @@
1+1:1 glyph ++
2+1:4 name make
3+1:9 glyph |=
4+1:12 name x
5+1:13 tight glyph =
6+1:14 tight tvar A
7+2:3 INDENT
8+2:3 glyph +$
9+2:6 name box
10+2:10 glyph |$
11+2:13 glyph [
12+2:14 tight tvar B
13+2:15 tight glyph ]
14+2:17 glyph [
15+2:18 tight name outer
16+2:23 tight glyph =
17+2:24 tight tvar A
18+2:26 name inner
19+2:31 tight glyph =
20+2:32 tight tvar B
21+2:33 tight glyph ]
22+3:3 NEWLINE
23+3:3 glyph ^-
24+3:6 glyph (
25+3:7 tight name box
26+3:11 aura @t
27+3:13 tight glyph )
28+3:15 glyph [
29+3:16 tight name outer
30+3:21 tight glyph =
31+3:22 tight name x
32+3:24 name inner
33+3:29 tight glyph =
34+3:30 tight str "hi"
35+3:34 tight glyph ]
36+3:35 DEDENT
37+3:35 NEWLINE
tests/golden/types-generic-local-scope/tree.txtnew file+15
@@ -0,0 +1,15 @@
1+(module
2+ (value 1:1 make
3+ (gate 1:9
4+ (face 1:12 x (tvar 1:14 A))
5+ (body 2:3
6+ (mold 2:3 box
7+ (generic 2:10 B
8+ (cell 2:17
9+ (face 2:18 outer (tvar 2:24 A))
10+ (face 2:26 inner (tvar 2:32 B)))))
11+ (cast 3:3
12+ (apply 3:6 box (aura 3:11 @t))
13+ (tuple 3:15
14+ (face 3:16 outer (wing 3:22 x))
15+ (face 3:24 inner (str 3:30 "hi"))))))))
tests/golden/types-generic-local-scope/types.txtnew file+2
@@ -0,0 +1,2 @@
1+partial inference; module not checked
2+++ make: local molds need unsupported inference
tests/golden/types-generic-module/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Modules: "Everything is exported and read through the import's face"; Molds: generic molds.
2+tests: A generic record mold exported by a Jibb library is independently instantiated in its caller.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-generic-module/module-trees.txtnew file+7
@@ -0,0 +1,7 @@
1+/ui/lib.jibb
2+(module
3+ (mold 1:1 carrier
4+ (generic 1:12 A
5+ (cell 1:19
6+ (face 1:20 payload (tvar 1:28 A))
7+ (face 1:30 count (aura 1:36 @ud))))))
tests/golden/types-generic-module/modules.txtnew file+1
@@ -0,0 +1 @@
1+/ui/lib.jibb
tests/golden/types-generic-module/modules/ui/lib.jibbnew file+1
@@ -0,0 +1 @@
1++$ carrier |$ [A] [payload=A count=@ud]
tests/golden/types-generic-module/source.jibbnew file+3
@@ -0,0 +1,3 @@
1+/= lib /ui/lib
2+++ cord ^- (carrier.lib @t) [payload="hi" count=1]
3+++ ship ^- (carrier.lib @p) [payload=~zod count=2]
tests/golden/types-generic-module/tokens.txtnew file+39
@@ -0,0 +1,39 @@
1+1:1 glyph /=
2+1:5 name lib
3+1:9 glyph /
4+1:10 tight knot ui
5+1:12 tight glyph /
6+1:13 tight knot lib
7+2:1 NEWLINE
8+2:1 glyph ++
9+2:4 name cord
10+2:9 glyph ^-
11+2:12 glyph (
12+2:13 tight wing carrier.lib
13+2:25 aura @t
14+2:27 tight glyph )
15+2:29 glyph [
16+2:30 tight name payload
17+2:37 tight glyph =
18+2:38 tight str "hi"
19+2:43 name count
20+2:48 tight glyph =
21+2:49 tight lit 1
22+2:50 tight glyph ]
23+3:1 NEWLINE
24+3:1 glyph ++
25+3:4 name ship
26+3:9 glyph ^-
27+3:12 glyph (
28+3:13 tight wing carrier.lib
29+3:25 aura @p
30+3:27 tight glyph )
31+3:29 glyph [
32+3:30 tight name payload
33+3:37 tight glyph =
34+3:38 tight lit ~zod
35+3:43 name count
36+3:48 tight glyph =
37+3:49 tight lit 2
38+3:50 tight glyph ]
39+3:51 NEWLINE
tests/golden/types-generic-module/tree.txtnew file+14
@@ -0,0 +1,14 @@
1+(module
2+ (jibb 1:1 lib /ui/lib)
3+ (value 2:1 cord
4+ (cast 2:9
5+ (apply 2:12 carrier.lib (aura 2:25 @t))
6+ (tuple 2:29
7+ (face 2:30 payload (str 2:38 "hi"))
8+ (face 2:43 count (lit 2:49 1)))))
9+ (value 3:1 ship
10+ (cast 3:9
11+ (apply 3:12 carrier.lib (aura 3:25 @p))
12+ (tuple 3:29
13+ (face 3:30 payload (lit 3:38 ~zod))
14+ (face 3:43 count (lit 3:49 2))))))
tests/golden/types-generic-module/types.txtnew file+3
@@ -0,0 +1,3 @@
1+partial inference; module not checked
2+++ cord: [payload=@t count=@ud]
3+++ ship: [payload=@p count=@ud]
tests/golden/types-generic-nested-scope/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Molds: generic mold parameters are declared by `|$`.
2+tests: A nested generic's parameter named A is local to it and does not capture the caller's A; the fixed inner type stays @t while the outer type is @p.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-generic-nested-scope/source.jibbnew file+3
@@ -0,0 +1,3 @@
1++$ inner |$ [A] [payload=A count=@ud]
2++$ outer |$ [A] [fixed=(inner @t) bound=A]
3+++ ship ^- (outer @p) [fixed=[payload="hi" count=1] bound=~zod]
tests/golden/types-generic-nested-scope/tokens.txtnew file+56
@@ -0,0 +1,56 @@
1+1:1 glyph +$
2+1:4 name inner
3+1:10 glyph |$
4+1:13 glyph [
5+1:14 tight tvar A
6+1:15 tight glyph ]
7+1:17 glyph [
8+1:18 tight name payload
9+1:25 tight glyph =
10+1:26 tight tvar A
11+1:28 name count
12+1:33 tight glyph =
13+1:34 tight aura @ud
14+1:37 tight glyph ]
15+2:1 NEWLINE
16+2:1 glyph +$
17+2:4 name outer
18+2:10 glyph |$
19+2:13 glyph [
20+2:14 tight tvar A
21+2:15 tight glyph ]
22+2:17 glyph [
23+2:18 tight name fixed
24+2:23 tight glyph =
25+2:24 tight glyph (
26+2:25 tight name inner
27+2:31 aura @t
28+2:33 tight glyph )
29+2:35 name bound
30+2:40 tight glyph =
31+2:41 tight tvar A
32+2:42 tight glyph ]
33+3:1 NEWLINE
34+3:1 glyph ++
35+3:4 name ship
36+3:9 glyph ^-
37+3:12 glyph (
38+3:13 tight name outer
39+3:19 aura @p
40+3:21 tight glyph )
41+3:23 glyph [
42+3:24 tight name fixed
43+3:29 tight glyph =
44+3:30 tight glyph [
45+3:31 tight name payload
46+3:38 tight glyph =
47+3:39 tight str "hi"
48+3:44 name count
49+3:49 tight glyph =
50+3:50 tight lit 1
51+3:51 tight glyph ]
52+3:53 name bound
53+3:58 tight glyph =
54+3:59 tight lit ~zod
55+3:63 tight glyph ]
56+3:64 NEWLINE
tests/golden/types-generic-nested-scope/tree.txtnew file+21
@@ -0,0 +1,21 @@
1+(module
2+ (mold 1:1 inner
3+ (generic 1:10 A
4+ (cell 1:17
5+ (face 1:18 payload (tvar 1:26 A))
6+ (face 1:28 count (aura 1:34 @ud)))))
7+ (mold 2:1 outer
8+ (generic 2:10 A
9+ (cell 2:17
10+ (face 2:18 fixed
11+ (apply 2:24 inner (aura 2:31 @t)))
12+ (face 2:35 bound (tvar 2:41 A)))))
13+ (value 3:1 ship
14+ (cast 3:9
15+ (apply 3:12 outer (aura 3:19 @p))
16+ (tuple 3:23
17+ (face 3:24 fixed
18+ (tuple 3:30
19+ (face 3:31 payload (str 3:39 "hi"))
20+ (face 3:44 count (lit 3:50 1))))
21+ (face 3:53 bound (lit 3:59 ~zod))))))
tests/golden/types-generic-nested-scope/types.txtnew file+4
@@ -0,0 +1,4 @@
1+partial inference; module not checked
2++$ inner: not checked
3++$ outer: not checked
4+++ ship: [fixed=[payload=@t count=@ud] bound=@p]
tests/golden/types-generic-parameters/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Molds: "Generic molds" are defined with `|$` after a `+$` name; type variables are capitals.
2+tests: Duplicate declared parameters and an undeclared capital do not produce a valid generic type.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-generic-parameters/source.jibbnew file+4
@@ -0,0 +1,4 @@
1++$ duplicate |$ [A A] [left=A right=A]
2++$ undeclared |$ [A] [left=A right=B]
3+++ a ^- (duplicate @t @p) [left="hi" right=~zod]
4+++ b ^- (undeclared @t) [left="hi" right=~zod]
tests/golden/types-generic-parameters/tokens.txtnew file+64
@@ -0,0 +1,64 @@
1+1:1 glyph +$
2+1:4 name duplicate
3+1:14 glyph |$
4+1:17 glyph [
5+1:18 tight tvar A
6+1:20 tvar A
7+1:21 tight glyph ]
8+1:23 glyph [
9+1:24 tight name left
10+1:28 tight glyph =
11+1:29 tight tvar A
12+1:31 name right
13+1:36 tight glyph =
14+1:37 tight tvar A
15+1:38 tight glyph ]
16+2:1 NEWLINE
17+2:1 glyph +$
18+2:4 name undeclared
19+2:15 glyph |$
20+2:18 glyph [
21+2:19 tight tvar A
22+2:20 tight glyph ]
23+2:22 glyph [
24+2:23 tight name left
25+2:27 tight glyph =
26+2:28 tight tvar A
27+2:30 name right
28+2:35 tight glyph =
29+2:36 tight tvar B
30+2:37 tight glyph ]
31+3:1 NEWLINE
32+3:1 glyph ++
33+3:4 name a
34+3:6 glyph ^-
35+3:9 glyph (
36+3:10 tight name duplicate
37+3:20 aura @t
38+3:23 aura @p
39+3:25 tight glyph )
40+3:27 glyph [
41+3:28 tight name left
42+3:32 tight glyph =
43+3:33 tight str "hi"
44+3:38 name right
45+3:43 tight glyph =
46+3:44 tight lit ~zod
47+3:48 tight glyph ]
48+4:1 NEWLINE
49+4:1 glyph ++
50+4:4 name b
51+4:6 glyph ^-
52+4:9 glyph (
53+4:10 tight name undeclared
54+4:21 aura @t
55+4:23 tight glyph )
56+4:25 glyph [
57+4:26 tight name left
58+4:30 tight glyph =
59+4:31 tight str "hi"
60+4:36 name right
61+4:41 tight glyph =
62+4:42 tight lit ~zod
63+4:46 tight glyph ]
64+4:47 NEWLINE
tests/golden/types-generic-parameters/tree.txtnew file+23
@@ -0,0 +1,23 @@
1+(module
2+ (mold 1:1 duplicate
3+ (generic 1:14 A A
4+ (cell 1:23
5+ (face 1:24 left (tvar 1:29 A))
6+ (face 1:31 right (tvar 1:37 A)))))
7+ (mold 2:1 undeclared
8+ (generic 2:15 A
9+ (cell 2:22
10+ (face 2:23 left (tvar 2:28 A))
11+ (face 2:30 right (tvar 2:36 B)))))
12+ (value 3:1 a
13+ (cast 3:6
14+ (apply 3:9 duplicate (aura 3:20 @t) (aura 3:23 @p))
15+ (tuple 3:27
16+ (face 3:28 left (str 3:33 "hi"))
17+ (face 3:38 right (lit 3:44 ~zod)))))
18+ (value 4:1 b
19+ (cast 4:6
20+ (apply 4:9 undeclared (aura 4:21 @t))
21+ (tuple 4:25
22+ (face 4:26 left (str 4:31 "hi"))
23+ (face 4:36 right (lit 4:42 ~zod))))))
tests/golden/types-generic-parameters/types.txtnew file+5
@@ -0,0 +1,5 @@
1+partial inference; module not checked
2++$ duplicate: not checked
3++$ undeclared: not checked
4+++ a: cast mold is not supported by partial inference
5+++ b: cast mold is not supported by partial inference
tests/golden/types-generic-record/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Molds: "Generic molds" are defined with `|$` after a `+$` name; type variables are capitals.
2+tests: A named generic record is independently instantiated at cord and ship types.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-generic-record/source.jibbnew file+3
@@ -0,0 +1,3 @@
1++$ carrier |$ [A] [payload=A count=@ud]
2+++ cord ^- (carrier @t) [payload="hi" count=1]
3+++ ship ^- (carrier @p) [payload=~zod count=2]
tests/golden/types-generic-record/tokens.txtnew file+47
@@ -0,0 +1,47 @@
1+1:1 glyph +$
2+1:4 name carrier
3+1:12 glyph |$
4+1:15 glyph [
5+1:16 tight tvar A
6+1:17 tight glyph ]
7+1:19 glyph [
8+1:20 tight name payload
9+1:27 tight glyph =
10+1:28 tight tvar A
11+1:30 name count
12+1:35 tight glyph =
13+1:36 tight aura @ud
14+1:39 tight glyph ]
15+2:1 NEWLINE
16+2:1 glyph ++
17+2:4 name cord
18+2:9 glyph ^-
19+2:12 glyph (
20+2:13 tight name carrier
21+2:21 aura @t
22+2:23 tight glyph )
23+2:25 glyph [
24+2:26 tight name payload
25+2:33 tight glyph =
26+2:34 tight str "hi"
27+2:39 name count
28+2:44 tight glyph =
29+2:45 tight lit 1
30+2:46 tight glyph ]
31+3:1 NEWLINE
32+3:1 glyph ++
33+3:4 name ship
34+3:9 glyph ^-
35+3:12 glyph (
36+3:13 tight name carrier
37+3:21 aura @p
38+3:23 tight glyph )
39+3:25 glyph [
40+3:26 tight name payload
41+3:33 tight glyph =
42+3:34 tight lit ~zod
43+3:39 name count
44+3:44 tight glyph =
45+3:45 tight lit 2
46+3:46 tight glyph ]
47+3:47 NEWLINE
tests/golden/types-generic-record/tree.txtnew file+18
@@ -0,0 +1,18 @@
1+(module
2+ (mold 1:1 carrier
3+ (generic 1:12 A
4+ (cell 1:19
5+ (face 1:20 payload (tvar 1:28 A))
6+ (face 1:30 count (aura 1:36 @ud)))))
7+ (value 2:1 cord
8+ (cast 2:9
9+ (apply 2:12 carrier (aura 2:21 @t))
10+ (tuple 2:25
11+ (face 2:26 payload (str 2:34 "hi"))
12+ (face 2:39 count (lit 2:45 1)))))
13+ (value 3:1 ship
14+ (cast 3:9
15+ (apply 3:12 carrier (aura 3:21 @p))
16+ (tuple 3:25
17+ (face 3:26 payload (lit 3:34 ~zod))
18+ (face 3:39 count (lit 3:45 2))))))
tests/golden/types-generic-record/types.txtnew file+4
@@ -0,0 +1,4 @@
1+partial inference; module not checked
2++$ carrier: not checked
3+++ cord: [payload=@t count=@ud]
4+++ ship: [payload=@p count=@ud]
tests/golden/types-generic-recursive-union/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Molds: "Generic molds" are defined with `|$` after a `+$` name; type variables are capitals.
2+tests: Recursive generic and union bodies are explicitly unsupported by this bounded inference slice.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-generic-recursive-union/source.jibbnew file+6
@@ -0,0 +1,6 @@
1++$ chain |$ [A]
2+ ~
3+ [A (chain A)]
4++$ loop |$ [A] [value=A rest=(loop A)]
5+++ a |= x=(chain @t) x
6+++ b |= x=(loop @t) x
tests/golden/types-generic-recursive-union/tokens.txtnew file+58
@@ -0,0 +1,58 @@
1+1:1 glyph +$
2+1:4 name chain
3+1:10 glyph |$
4+1:13 glyph [
5+1:14 tight tvar A
6+1:15 tight glyph ]
7+2:3 INDENT
8+2:3 lit ~
9+3:3 NEWLINE
10+3:3 glyph [
11+3:4 tight tvar A
12+3:6 glyph (
13+3:7 tight name chain
14+3:13 tvar A
15+3:14 tight glyph )
16+3:15 tight glyph ]
17+4:1 DEDENT
18+4:1 NEWLINE
19+4:1 glyph +$
20+4:4 name loop
21+4:9 glyph |$
22+4:12 glyph [
23+4:13 tight tvar A
24+4:14 tight glyph ]
25+4:16 glyph [
26+4:17 tight name value
27+4:22 tight glyph =
28+4:23 tight tvar A
29+4:25 name rest
30+4:29 tight glyph =
31+4:30 tight glyph (
32+4:31 tight name loop
33+4:36 tvar A
34+4:37 tight glyph )
35+4:38 tight glyph ]
36+5:1 NEWLINE
37+5:1 glyph ++
38+5:4 name a
39+5:6 glyph |=
40+5:9 name x
41+5:10 tight glyph =
42+5:11 tight glyph (
43+5:12 tight name chain
44+5:18 aura @t
45+5:20 tight glyph )
46+5:22 name x
47+6:1 NEWLINE
48+6:1 glyph ++
49+6:4 name b
50+6:6 glyph |=
51+6:9 name x
52+6:10 tight glyph =
53+6:11 tight glyph (
54+6:12 tight name loop
55+6:17 aura @t
56+6:19 tight glyph )
57+6:21 name x
58+6:22 NEWLINE
tests/golden/types-generic-recursive-union/tree.txtnew file+24
@@ -0,0 +1,24 @@
1+(module
2+ (mold 1:1 chain
3+ (generic 1:10 A
4+ (union 2:3
5+ (const 2:3 ~)
6+ (cell 3:3
7+ (tvar 3:4 A)
8+ (apply 3:6 chain (tvar 3:13 A))))))
9+ (mold 4:1 loop
10+ (generic 4:9 A
11+ (cell 4:16
12+ (face 4:17 value (tvar 4:23 A))
13+ (face 4:25 rest
14+ (apply 4:30 loop (tvar 4:36 A))))))
15+ (value 5:1 a
16+ (gate 5:6
17+ (face 5:9 x
18+ (apply 5:11 chain (aura 5:18 @t)))
19+ (wing 5:22 x)))
20+ (value 6:1 b
21+ (gate 6:6
22+ (face 6:9 x
23+ (apply 6:11 loop (aura 6:17 @t)))
24+ (wing 6:21 x))))
tests/golden/types-generic-recursive-union/types.txtnew file+5
@@ -0,0 +1,5 @@
1+partial inference; module not checked
2++$ chain: cases proven disjoint; mold not checked
3++$ loop: not checked
4+++ a: sample mold is not supported by partial inference
5+++ b: sample mold is not supported by partial inference
tests/golden/types-generic-repeated/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Molds: type variables are capitals; a generic mold names its parameters after `|$`.
2+tests: Repeated occurrences of one generic parameter retain the same type, accepting two cords and rejecting a cord paired with a ship.
3+expect: parses
4+expect-types: a partial inference report with the conflicting sites
tests/golden/types-generic-repeated/source.jibbnew file+3
@@ -0,0 +1,3 @@
1++$ twin |$ [A] [left=A right=A]
2+++ good ^- (twin @t) [left="hi" right="bye"]
3+++ bad ^- (twin @t) [left="hi" right=~zod]
tests/golden/types-generic-repeated/tokens.txtnew file+47
@@ -0,0 +1,47 @@
1+1:1 glyph +$
2+1:4 name twin
3+1:9 glyph |$
4+1:12 glyph [
5+1:13 tight tvar A
6+1:14 tight glyph ]
7+1:16 glyph [
8+1:17 tight name left
9+1:21 tight glyph =
10+1:22 tight tvar A
11+1:24 name right
12+1:29 tight glyph =
13+1:30 tight tvar A
14+1:31 tight glyph ]
15+2:1 NEWLINE
16+2:1 glyph ++
17+2:4 name good
18+2:9 glyph ^-
19+2:12 glyph (
20+2:13 tight name twin
21+2:18 aura @t
22+2:20 tight glyph )
23+2:22 glyph [
24+2:23 tight name left
25+2:27 tight glyph =
26+2:28 tight str "hi"
27+2:33 name right
28+2:38 tight glyph =
29+2:39 tight str "bye"
30+2:44 tight glyph ]
31+3:1 NEWLINE
32+3:1 glyph ++
33+3:4 name bad
34+3:8 glyph ^-
35+3:11 glyph (
36+3:12 tight name twin
37+3:17 aura @t
38+3:19 tight glyph )
39+3:21 glyph [
40+3:22 tight name left
41+3:26 tight glyph =
42+3:27 tight str "hi"
43+3:32 name right
44+3:37 tight glyph =
45+3:38 tight lit ~zod
46+3:42 tight glyph ]
47+3:43 NEWLINE
tests/golden/types-generic-repeated/tree.txtnew file+18
@@ -0,0 +1,18 @@
1+(module
2+ (mold 1:1 twin
3+ (generic 1:9 A
4+ (cell 1:16
5+ (face 1:17 left (tvar 1:22 A))
6+ (face 1:24 right (tvar 1:30 A)))))
7+ (value 2:1 good
8+ (cast 2:9
9+ (apply 2:12 twin (aura 2:18 @t))
10+ (tuple 2:22
11+ (face 2:23 left (str 2:28 "hi"))
12+ (face 2:33 right (str 2:39 "bye")))))
13+ (value 3:1 bad
14+ (cast 3:8
15+ (apply 3:11 twin (aura 3:17 @t))
16+ (tuple 3:21
17+ (face 3:22 left (str 3:27 "hi"))
18+ (face 3:32 right (lit 3:38 ~zod))))))
tests/golden/types-generic-repeated/types.txtnew file+10
@@ -0,0 +1,10 @@
1+partial inference; module not checked
2++$ twin: not checked
3+++ good: [left=@t right=@t]
4+++ bad: cast mold and expression type do not unify
5+/tests/golden/types-generic-repeated/source.jibb:3:11: cast mold has type [left=@t right=@t]
6+++ bad ^- (twin @t) [left="hi" right=~zod]
7+ ^
8+/tests/golden/types-generic-repeated/source.jibb:3:21: expression has type [left=@t right=@p]
9+++ bad ^- (twin @t) [left="hi" right=~zod]
10+ ^
tests/golden/types-generic-union-alias-face/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Molds: generic molds are applied with their arguments and faces are part of record types.
2+tests: A swapped imported alias handles concrete tagged payloads; a generic payload with the same explicit variable receives its field face; an incompatible concrete payload fails.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-generic-union-alias-face/module-trees.txtnew file+11
@@ -0,0 +1,11 @@
1+/ui/base.jibb
2+(module
3+ (mold 1:1 choice
4+ (generic 1:11 V E
5+ (union 2:3
6+ (cell 2:3
7+ (const 2:4 %ok)
8+ (face 2:8 value (tvar 2:14 V)))
9+ (cell 3:3
10+ (const 3:4 %err)
11+ (face 3:9 error (tvar 3:15 E)))))))
tests/golden/types-generic-union-alias-face/modules.txtnew file+1
@@ -0,0 +1 @@
1+/ui/base.jibb
tests/golden/types-generic-union-alias-face/modules/ui/base.jibbnew file+3
@@ -0,0 +1,3 @@
1++$ choice |$ [V E]
2+ [%ok value=V]
3+ [%err error=E]
tests/golden/types-generic-union-alias-face/source.jibbnew file+6
@@ -0,0 +1,6 @@
1+/= base /ui/base
2++$ relay |$ [A B] (choice.base B A)
3+++ make |= x=A ^- (relay A B) [%err x]
4+++ reveal |= v=(relay A B) v
5+++ with-text ^- (relay @t @p) [%err "hi"]
6+++ with-ship ^- (relay @t @p) [%err ~zod]
tests/golden/types-generic-union-alias-face/tokens.txtnew file+75
@@ -0,0 +1,75 @@
1+1:1 glyph /=
2+1:5 name base
3+1:10 glyph /
4+1:11 tight knot ui
5+1:13 tight glyph /
6+1:14 tight knot base
7+2:1 NEWLINE
8+2:1 glyph +$
9+2:4 name relay
10+2:10 glyph |$
11+2:13 glyph [
12+2:14 tight tvar A
13+2:16 tvar B
14+2:17 tight glyph ]
15+2:19 glyph (
16+2:20 tight wing choice.base
17+2:32 tvar B
18+2:34 tvar A
19+2:35 tight glyph )
20+3:1 NEWLINE
21+3:1 glyph ++
22+3:4 name make
23+3:9 glyph |=
24+3:12 name x
25+3:13 tight glyph =
26+3:14 tight tvar A
27+3:16 glyph ^-
28+3:19 glyph (
29+3:20 tight name relay
30+3:26 tvar A
31+3:28 tvar B
32+3:29 tight glyph )
33+3:31 glyph [
34+3:32 tight lit %err
35+3:37 name x
36+3:38 tight glyph ]
37+4:1 NEWLINE
38+4:1 glyph ++
39+4:4 name reveal
40+4:11 glyph |=
41+4:14 name v
42+4:15 tight glyph =
43+4:16 tight glyph (
44+4:17 tight name relay
45+4:23 tvar A
46+4:25 tvar B
47+4:26 tight glyph )
48+4:28 name v
49+5:1 NEWLINE
50+5:1 glyph ++
51+5:4 name with-text
52+5:14 glyph ^-
53+5:17 glyph (
54+5:18 tight name relay
55+5:24 aura @t
56+5:27 aura @p
57+5:29 tight glyph )
58+5:31 glyph [
59+5:32 tight lit %err
60+5:37 str "hi"
61+5:41 tight glyph ]
62+6:1 NEWLINE
63+6:1 glyph ++
64+6:4 name with-ship
65+6:14 glyph ^-
66+6:17 glyph (
67+6:18 tight name relay
68+6:24 aura @t
69+6:27 aura @p
70+6:29 tight glyph )
71+6:31 glyph [
72+6:32 tight lit %err
73+6:37 lit ~zod
74+6:41 tight glyph ]
75+6:42 NEWLINE
tests/golden/types-generic-union-alias-face/tree.txtnew file+24
@@ -0,0 +1,24 @@
1+(module
2+ (jibb 1:1 base /ui/base)
3+ (mold 2:1 relay
4+ (generic 2:10 A B
5+ (apply 2:19 choice.base (tvar 2:32 B) (tvar 2:34 A))))
6+ (value 3:1 make
7+ (gate 3:9
8+ (face 3:12 x (tvar 3:14 A))
9+ (cast 3:16
10+ (apply 3:19 relay (tvar 3:26 A) (tvar 3:28 B))
11+ (tuple 3:31 (lit 3:32 %err) (wing 3:37 x)))))
12+ (value 4:1 reveal
13+ (gate 4:11
14+ (face 4:14 v
15+ (apply 4:16 relay (tvar 4:23 A) (tvar 4:25 B)))
16+ (wing 4:28 v)))
17+ (value 5:1 with-text
18+ (cast 5:14
19+ (apply 5:17 relay (aura 5:24 @t) (aura 5:27 @p))
20+ (tuple 5:31 (lit 5:32 %err) (str 5:37 "hi"))))
21+ (value 6:1 with-ship
22+ (cast 6:14
23+ (apply 6:17 relay (aura 6:24 @t) (aura 6:27 @p))
24+ (tuple 6:31 (lit 6:32 %err) (lit 6:37 ~zod)))))
tests/golden/types-generic-union-alias-face/types.txtnew file+12
@@ -0,0 +1,12 @@
1+partial inference; module not checked
2++$ relay: not checked
3+++ make: $-(A (choice.base B A))
4+++ reveal: $-((choice.base A B) (choice.base A B))
5+++ with-text: (choice.base @p @t)
6+++ with-ship: cast mold and expression type do not unify
7+/tests/golden/types-generic-union-alias-face/source.jibb:6:17: cast mold
8+++ with-ship ^- (relay @t @p) [%err ~zod]
9+ ^
10+/tests/golden/types-generic-union-alias-face/source.jibb:6:31: expression
11+++ with-ship ^- (relay @t @p) [%err ~zod]
12+ ^
tests/golden/types-generic-union-alias/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Molds: generic molds are applied with their arguments; Modules: "Everything is exported and read through the import's face".
2+tests: Generic aliases swap or repeat a union's arguments, ignore an alias parameter, and keep the original union identity; local aliases retain their scope; a forced merge of distinct capitals is reported at both sites.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-generic-union-alias/source.jibbnew file+23
@@ -0,0 +1,23 @@
1++$ choice |$ [A B]
2+ [%one value=A]
3+ [%two value=B]
4++$ reverse |$ [A B] (choice B A)
5++$ repeat |$ [A] (choice A A)
6++$ extra |$ [A B] (choice A @p)
7+++ reverse-value ^- (reverse @t @p) [%one ~zod]
8+++ reverse-gate |= x=(reverse A B) x
9+++ repeat-gate |= x=(repeat A) x
10+++ repeated-call |= x=(choice A B) (repeat-gate x)
11+++ ghost-a ^- (extra @t @p) [%one "hi"]
12+++ ghost-b ^- (extra @t @ud) [%one "hi"]
13+++ use-ghost |= x=(extra @t @p) x
14+++ interchange (use-ghost ghost-b)
15+++ local |= x=A
16+ +$ alias |$ [B] (choice B @p)
17+ ^- (alias A) [%one x]
18+++ local-pass |= x=(choice A @p)
19+ +$ alias |$ [B] (choice B @p)
20+ ^- (alias A) x
21+++ local-shadow |= x=A
22+ +$ alias |$ [A] (choice A @p)
23+ ^- (alias @t) [%one "hi"]
tests/golden/types-generic-union-alias/tokens.txtnew file+248
@@ -0,0 +1,248 @@
1+1:1 glyph +$
2+1:4 name choice
3+1:11 glyph |$
4+1:14 glyph [
5+1:15 tight tvar A
6+1:17 tvar B
7+1:18 tight glyph ]
8+2:3 INDENT
9+2:3 glyph [
10+2:4 tight lit %one
11+2:9 name value
12+2:14 tight glyph =
13+2:15 tight tvar A
14+2:16 tight glyph ]
15+3:3 NEWLINE
16+3:3 glyph [
17+3:4 tight lit %two
18+3:9 name value
19+3:14 tight glyph =
20+3:15 tight tvar B
21+3:16 tight glyph ]
22+4:1 DEDENT
23+4:1 NEWLINE
24+4:1 glyph +$
25+4:4 name reverse
26+4:12 glyph |$
27+4:15 glyph [
28+4:16 tight tvar A
29+4:18 tvar B
30+4:19 tight glyph ]
31+4:21 glyph (
32+4:22 tight name choice
33+4:29 tvar B
34+4:31 tvar A
35+4:32 tight glyph )
36+5:1 NEWLINE
37+5:1 glyph +$
38+5:4 name repeat
39+5:11 glyph |$
40+5:14 glyph [
41+5:15 tight tvar A
42+5:16 tight glyph ]
43+5:18 glyph (
44+5:19 tight name choice
45+5:26 tvar A
46+5:28 tvar A
47+5:29 tight glyph )
48+6:1 NEWLINE
49+6:1 glyph +$
50+6:4 name extra
51+6:10 glyph |$
52+6:13 glyph [
53+6:14 tight tvar A
54+6:16 tvar B
55+6:17 tight glyph ]
56+6:19 glyph (
57+6:20 tight name choice
58+6:27 tvar A
59+6:29 aura @p
60+6:31 tight glyph )
61+7:1 NEWLINE
62+7:1 glyph ++
63+7:4 name reverse-value
64+7:18 glyph ^-
65+7:21 glyph (
66+7:22 tight name reverse
67+7:30 aura @t
68+7:33 aura @p
69+7:35 tight glyph )
70+7:37 glyph [
71+7:38 tight lit %one
72+7:43 lit ~zod
73+7:47 tight glyph ]
74+8:1 NEWLINE
75+8:1 glyph ++
76+8:4 name reverse-gate
77+8:17 glyph |=
78+8:20 name x
79+8:21 tight glyph =
80+8:22 tight glyph (
81+8:23 tight name reverse
82+8:31 tvar A
83+8:33 tvar B
84+8:34 tight glyph )
85+8:36 name x
86+9:1 NEWLINE
87+9:1 glyph ++
88+9:4 name repeat-gate
89+9:16 glyph |=
90+9:19 name x
91+9:20 tight glyph =
92+9:21 tight glyph (
93+9:22 tight name repeat
94+9:29 tvar A
95+9:30 tight glyph )
96+9:32 name x
97+10:1 NEWLINE
98+10:1 glyph ++
99+10:4 name repeated-call
100+10:18 glyph |=
101+10:21 name x
102+10:22 tight glyph =
103+10:23 tight glyph (
104+10:24 tight name choice
105+10:31 tvar A
106+10:33 tvar B
107+10:34 tight glyph )
108+10:36 glyph (
109+10:37 tight name repeat-gate
110+10:49 name x
111+10:50 tight glyph )
112+11:1 NEWLINE
113+11:1 glyph ++
114+11:4 name ghost-a
115+11:12 glyph ^-
116+11:15 glyph (
117+11:16 tight name extra
118+11:22 aura @t
119+11:25 aura @p
120+11:27 tight glyph )
121+11:29 glyph [
122+11:30 tight lit %one
123+11:35 str "hi"
124+11:39 tight glyph ]
125+12:1 NEWLINE
126+12:1 glyph ++
127+12:4 name ghost-b
128+12:12 glyph ^-
129+12:15 glyph (
130+12:16 tight name extra
131+12:22 aura @t
132+12:25 aura @ud
133+12:28 tight glyph )
134+12:30 glyph [
135+12:31 tight lit %one
136+12:36 str "hi"
137+12:40 tight glyph ]
138+13:1 NEWLINE
139+13:1 glyph ++
140+13:4 name use-ghost
141+13:14 glyph |=
142+13:17 name x
143+13:18 tight glyph =
144+13:19 tight glyph (
145+13:20 tight name extra
146+13:26 aura @t
147+13:29 aura @p
148+13:31 tight glyph )
149+13:33 name x
150+14:1 NEWLINE
151+14:1 glyph ++
152+14:4 name interchange
153+14:16 glyph (
154+14:17 tight name use-ghost
155+14:27 name ghost-b
156+14:34 tight glyph )
157+15:1 NEWLINE
158+15:1 glyph ++
159+15:4 name local
160+15:10 glyph |=
161+15:13 name x
162+15:14 tight glyph =
163+15:15 tight tvar A
164+16:3 INDENT
165+16:3 glyph +$
166+16:6 name alias
167+16:12 glyph |$
168+16:15 glyph [
169+16:16 tight tvar B
170+16:17 tight glyph ]
171+16:19 glyph (
172+16:20 tight name choice
173+16:27 tvar B
174+16:29 aura @p
175+16:31 tight glyph )
176+17:3 NEWLINE
177+17:3 glyph ^-
178+17:6 glyph (
179+17:7 tight name alias
180+17:13 tvar A
181+17:14 tight glyph )
182+17:16 glyph [
183+17:17 tight lit %one
184+17:22 name x
185+17:23 tight glyph ]
186+18:1 DEDENT
187+18:1 NEWLINE
188+18:1 glyph ++
189+18:4 name local-pass
190+18:15 glyph |=
191+18:18 name x
192+18:19 tight glyph =
193+18:20 tight glyph (
194+18:21 tight name choice
195+18:28 tvar A
196+18:30 aura @p
197+18:32 tight glyph )
198+19:3 INDENT
199+19:3 glyph +$
200+19:6 name alias
201+19:12 glyph |$
202+19:15 glyph [
203+19:16 tight tvar B
204+19:17 tight glyph ]
205+19:19 glyph (
206+19:20 tight name choice
207+19:27 tvar B
208+19:29 aura @p
209+19:31 tight glyph )
210+20:3 NEWLINE
211+20:3 glyph ^-
212+20:6 glyph (
213+20:7 tight name alias
214+20:13 tvar A
215+20:14 tight glyph )
216+20:16 name x
217+21:1 DEDENT
218+21:1 NEWLINE
219+21:1 glyph ++
220+21:4 name local-shadow
221+21:17 glyph |=
222+21:20 name x
223+21:21 tight glyph =
224+21:22 tight tvar A
225+22:3 INDENT
226+22:3 glyph +$
227+22:6 name alias
228+22:12 glyph |$
229+22:15 glyph [
230+22:16 tight tvar A
231+22:17 tight glyph ]
232+22:19 glyph (
233+22:20 tight name choice
234+22:27 tvar A
235+22:29 aura @p
236+22:31 tight glyph )
237+23:3 NEWLINE
238+23:3 glyph ^-
239+23:6 glyph (
240+23:7 tight name alias
241+23:13 aura @t
242+23:15 tight glyph )
243+23:17 glyph [
244+23:18 tight lit %one
245+23:23 str "hi"
246+23:27 tight glyph ]
247+23:28 DEDENT
248+23:28 NEWLINE
tests/golden/types-generic-union-alias/tree.txtnew file+86
@@ -0,0 +1,86 @@
1+(module
2+ (mold 1:1 choice
3+ (generic 1:11 A B
4+ (union 2:3
5+ (cell 2:3
6+ (const 2:4 %one)
7+ (face 2:9 value (tvar 2:15 A)))
8+ (cell 3:3
9+ (const 3:4 %two)
10+ (face 3:9 value (tvar 3:15 B))))))
11+ (mold 4:1 reverse
12+ (generic 4:12 A B
13+ (apply 4:21 choice (tvar 4:29 B) (tvar 4:31 A))))
14+ (mold 5:1 repeat
15+ (generic 5:11 A
16+ (apply 5:18 choice (tvar 5:26 A) (tvar 5:28 A))))
17+ (mold 6:1 extra
18+ (generic 6:10 A B
19+ (apply 6:19 choice (tvar 6:27 A) (aura 6:29 @p))))
20+ (value 7:1 reverse-value
21+ (cast 7:18
22+ (apply 7:21 reverse (aura 7:30 @t) (aura 7:33 @p))
23+ (tuple 7:37 (lit 7:38 %one) (lit 7:43 ~zod))))
24+ (value 8:1 reverse-gate
25+ (gate 8:17
26+ (face 8:20 x
27+ (apply 8:22 reverse (tvar 8:31 A) (tvar 8:33 B)))
28+ (wing 8:36 x)))
29+ (value 9:1 repeat-gate
30+ (gate 9:16
31+ (face 9:19 x
32+ (apply 9:21 repeat (tvar 9:29 A)))
33+ (wing 9:32 x)))
34+ (value 10:1 repeated-call
35+ (gate 10:18
36+ (face 10:21 x
37+ (apply 10:23 choice (tvar 10:31 A) (tvar 10:33 B)))
38+ (group 10:36
39+ (call 10:37 (wing 10:37 repeat-gate) (wing 10:49 x)))))
40+ (value 11:1 ghost-a
41+ (cast 11:12
42+ (apply 11:15 extra (aura 11:22 @t) (aura 11:25 @p))
43+ (tuple 11:29 (lit 11:30 %one) (str 11:35 "hi"))))
44+ (value 12:1 ghost-b
45+ (cast 12:12
46+ (apply 12:15 extra (aura 12:22 @t) (aura 12:25 @ud))
47+ (tuple 12:30 (lit 12:31 %one) (str 12:36 "hi"))))
48+ (value 13:1 use-ghost
49+ (gate 13:14
50+ (face 13:17 x
51+ (apply 13:19 extra (aura 13:26 @t) (aura 13:29 @p)))
52+ (wing 13:33 x)))
53+ (value 14:1 interchange
54+ (group 14:16
55+ (call 14:17 (wing 14:17 use-ghost) (wing 14:27 ghost-b))))
56+ (value 15:1 local
57+ (gate 15:10
58+ (face 15:13 x (tvar 15:15 A))
59+ (body 16:3
60+ (mold 16:3 alias
61+ (generic 16:12 B
62+ (apply 16:19 choice (tvar 16:27 B) (aura 16:29 @p))))
63+ (cast 17:3
64+ (apply 17:6 alias (tvar 17:13 A))
65+ (tuple 17:16 (lit 17:17 %one) (wing 17:22 x))))))
66+ (value 18:1 local-pass
67+ (gate 18:15
68+ (face 18:18 x
69+ (apply 18:20 choice (tvar 18:28 A) (aura 18:30 @p)))
70+ (body 19:3
71+ (mold 19:3 alias
72+ (generic 19:12 B
73+ (apply 19:19 choice (tvar 19:27 B) (aura 19:29 @p))))
74+ (cast 20:3
75+ (apply 20:6 alias (tvar 20:13 A))
76+ (wing 20:16 x)))))
77+ (value 21:1 local-shadow
78+ (gate 21:17
79+ (face 21:20 x (tvar 21:22 A))
80+ (body 22:3
81+ (mold 22:3 alias
82+ (generic 22:12 A
83+ (apply 22:19 choice (tvar 22:27 A) (aura 22:29 @p))))
84+ (cast 23:3
85+ (apply 23:6 alias (aura 23:13 @t))
86+ (tuple 23:17 (lit 23:18 %one) (str 23:23 "hi")))))))
tests/golden/types-generic-union-alias/types.txtnew file+22
@@ -0,0 +1,22 @@
1+partial inference; module not checked
2++$ choice: cases proven disjoint; mold not checked
3++$ reverse: not checked
4++$ repeat: not checked
5++$ extra: not checked
6+++ reverse-value: (choice @p @t)
7+++ reverse-gate: $-((choice A B) (choice A B))
8+++ repeat-gate: $-((choice A A) (choice A A))
9+++ repeated-call: distinct type variables `A` and `B` must not be forced equal; use the same capital for a shared type
10+/tests/golden/types-generic-union-alias/source.jibb:10:31: first type variable
11+++ repeated-call |= x=(choice A B) (repeat-gate x)
12+ ^
13+/tests/golden/types-generic-union-alias/source.jibb:10:33: second type variable
14+++ repeated-call |= x=(choice A B) (repeat-gate x)
15+ ^
16+++ ghost-a: (choice @t @p)
17+++ ghost-b: (choice @t @p)
18+++ use-ghost: $-((choice @t @p) (choice @t @p))
19+++ interchange: (choice @t @p)
20+++ local: $-(A (choice A @p))
21+++ local-pass: $-((choice A @p) (choice A @p))
22+++ local-shadow: $-(A (choice @t @p))
tests/golden/types-generic-union-capitals/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Decisions, Type variables: "Capitals, generalized per `++`; a capital in a local `++` shares the enclosing `++`'s variable of that name, and a different type takes a different capital".
2+tests: Distinct explicit capitals, repeated capitals, and local captures in generic-union molds. The checker rejects a forced merge of distinct capitals with both source sites; the same repeated capital remains usable.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-generic-union-capitals/source.jibbnew file+17
@@ -0,0 +1,17 @@
1++$ choice |$ [A B]
2+ [%one value=A]
3+ [%two value=B]
4++$ phantom |$ [A]
5+ %yes
6+ %no
7+++ repeated |= x=(choice A A) x
8+++ independent |= x=(choice A B) x
9+++ already-same |= x=(choice A A) (repeated x)
10+++ merge-call |= x=(choice A B) (repeated x)
11+++ phantom-cast |= x=(phantom A) ^- (phantom B) x
12+++ local-merge |= x=(choice A B)
13+ ++ local |= y=(choice A A) y
14+ (local x)
15+++ captured-merge |= x=(choice A B)
16+ ++ captured |= flag=? x
17+ (repeated (captured %.y))
tests/golden/types-generic-union-capitals/tokens.txtnew file+162
@@ -0,0 +1,162 @@
1+1:1 glyph +$
2+1:4 name choice
3+1:11 glyph |$
4+1:14 glyph [
5+1:15 tight tvar A
6+1:17 tvar B
7+1:18 tight glyph ]
8+2:3 INDENT
9+2:3 glyph [
10+2:4 tight lit %one
11+2:9 name value
12+2:14 tight glyph =
13+2:15 tight tvar A
14+2:16 tight glyph ]
15+3:3 NEWLINE
16+3:3 glyph [
17+3:4 tight lit %two
18+3:9 name value
19+3:14 tight glyph =
20+3:15 tight tvar B
21+3:16 tight glyph ]
22+4:1 DEDENT
23+4:1 NEWLINE
24+4:1 glyph +$
25+4:4 name phantom
26+4:12 glyph |$
27+4:15 glyph [
28+4:16 tight tvar A
29+4:17 tight glyph ]
30+5:3 INDENT
31+5:3 lit %yes
32+6:3 NEWLINE
33+6:3 lit %no
34+7:1 DEDENT
35+7:1 NEWLINE
36+7:1 glyph ++
37+7:4 name repeated
38+7:13 glyph |=
39+7:16 name x
40+7:17 tight glyph =
41+7:18 tight glyph (
42+7:19 tight name choice
43+7:26 tvar A
44+7:28 tvar A
45+7:29 tight glyph )
46+7:31 name x
47+8:1 NEWLINE
48+8:1 glyph ++
49+8:4 name independent
50+8:16 glyph |=
51+8:19 name x
52+8:20 tight glyph =
53+8:21 tight glyph (
54+8:22 tight name choice
55+8:29 tvar A
56+8:31 tvar B
57+8:32 tight glyph )
58+8:34 name x
59+9:1 NEWLINE
60+9:1 glyph ++
61+9:4 name already-same
62+9:17 glyph |=
63+9:20 name x
64+9:21 tight glyph =
65+9:22 tight glyph (
66+9:23 tight name choice
67+9:30 tvar A
68+9:32 tvar A
69+9:33 tight glyph )
70+9:35 glyph (
71+9:36 tight name repeated
72+9:45 name x
73+9:46 tight glyph )
74+10:1 NEWLINE
75+10:1 glyph ++
76+10:4 name merge-call
77+10:15 glyph |=
78+10:18 name x
79+10:19 tight glyph =
80+10:20 tight glyph (
81+10:21 tight name choice
82+10:28 tvar A
83+10:30 tvar B
84+10:31 tight glyph )
85+10:33 glyph (
86+10:34 tight name repeated
87+10:43 name x
88+10:44 tight glyph )
89+11:1 NEWLINE
90+11:1 glyph ++
91+11:4 name phantom-cast
92+11:17 glyph |=
93+11:20 name x
94+11:21 tight glyph =
95+11:22 tight glyph (
96+11:23 tight name phantom
97+11:31 tvar A
98+11:32 tight glyph )
99+11:34 glyph ^-
100+11:37 glyph (
101+11:38 tight name phantom
102+11:46 tvar B
103+11:47 tight glyph )
104+11:49 name x
105+12:1 NEWLINE
106+12:1 glyph ++
107+12:4 name local-merge
108+12:16 glyph |=
109+12:19 name x
110+12:20 tight glyph =
111+12:21 tight glyph (
112+12:22 tight name choice
113+12:29 tvar A
114+12:31 tvar B
115+12:32 tight glyph )
116+13:3 INDENT
117+13:3 glyph ++
118+13:6 name local
119+13:12 glyph |=
120+13:15 name y
121+13:16 tight glyph =
122+13:17 tight glyph (
123+13:18 tight name choice
124+13:25 tvar A
125+13:27 tvar A
126+13:28 tight glyph )
127+13:30 name y
128+14:3 NEWLINE
129+14:3 glyph (
130+14:4 tight name local
131+14:10 name x
132+14:11 tight glyph )
133+15:1 DEDENT
134+15:1 NEWLINE
135+15:1 glyph ++
136+15:4 name captured-merge
137+15:19 glyph |=
138+15:22 name x
139+15:23 tight glyph =
140+15:24 tight glyph (
141+15:25 tight name choice
142+15:32 tvar A
143+15:34 tvar B
144+15:35 tight glyph )
145+16:3 INDENT
146+16:3 glyph ++
147+16:6 name captured
148+16:15 glyph |=
149+16:18 name flag
150+16:22 tight glyph =
151+16:23 tight glyph ?
152+16:25 name x
153+17:3 NEWLINE
154+17:3 glyph (
155+17:4 tight name repeated
156+17:13 glyph (
157+17:14 tight name captured
158+17:23 lit %.y
159+17:26 tight glyph )
160+17:27 tight glyph )
161+17:28 DEDENT
162+17:28 NEWLINE
tests/golden/types-generic-union-capitals/tree.txtnew file+68
@@ -0,0 +1,68 @@
1+(module
2+ (mold 1:1 choice
3+ (generic 1:11 A B
4+ (union 2:3
5+ (cell 2:3
6+ (const 2:4 %one)
7+ (face 2:9 value (tvar 2:15 A)))
8+ (cell 3:3
9+ (const 3:4 %two)
10+ (face 3:9 value (tvar 3:15 B))))))
11+ (mold 4:1 phantom
12+ (generic 4:12 A
13+ (union 5:3 (const 5:3 %yes) (const 6:3 %no))))
14+ (value 7:1 repeated
15+ (gate 7:13
16+ (face 7:16 x
17+ (apply 7:18 choice (tvar 7:26 A) (tvar 7:28 A)))
18+ (wing 7:31 x)))
19+ (value 8:1 independent
20+ (gate 8:16
21+ (face 8:19 x
22+ (apply 8:21 choice (tvar 8:29 A) (tvar 8:31 B)))
23+ (wing 8:34 x)))
24+ (value 9:1 already-same
25+ (gate 9:17
26+ (face 9:20 x
27+ (apply 9:22 choice (tvar 9:30 A) (tvar 9:32 A)))
28+ (group 9:35
29+ (call 9:36 (wing 9:36 repeated) (wing 9:45 x)))))
30+ (value 10:1 merge-call
31+ (gate 10:15
32+ (face 10:18 x
33+ (apply 10:20 choice (tvar 10:28 A) (tvar 10:30 B)))
34+ (group 10:33
35+ (call 10:34 (wing 10:34 repeated) (wing 10:43 x)))))
36+ (value 11:1 phantom-cast
37+ (gate 11:17
38+ (face 11:20 x
39+ (apply 11:22 phantom (tvar 11:31 A)))
40+ (cast 11:34
41+ (apply 11:37 phantom (tvar 11:46 B))
42+ (wing 11:49 x))))
43+ (value 12:1 local-merge
44+ (gate 12:16
45+ (face 12:19 x
46+ (apply 12:21 choice (tvar 12:29 A) (tvar 12:31 B)))
47+ (body 13:3
48+ (value 13:3 local
49+ (gate 13:12
50+ (face 13:15 y
51+ (apply 13:17 choice (tvar 13:25 A) (tvar 13:27 A)))
52+ (wing 13:30 y)))
53+ (group 14:3
54+ (call 14:4 (wing 14:4 local) (wing 14:10 x))))))
55+ (value 15:1 captured-merge
56+ (gate 15:19
57+ (face 15:22 x
58+ (apply 15:24 choice (tvar 15:32 A) (tvar 15:34 B)))
59+ (body 16:3
60+ (value 16:3 captured
61+ (gate 16:15
62+ (face 16:18 flag (flag 16:23))
63+ (wing 16:25 x)))
64+ (group 17:3
65+ (call 17:4
66+ (wing 17:4 repeated)
67+ (group 17:13
68+ (call 17:14 (wing 17:14 captured) (lit 17:23 %.y)))))))))
tests/golden/types-generic-union-capitals/types.txtnew file+34
@@ -0,0 +1,34 @@
1+partial inference; module not checked
2++$ choice: cases proven disjoint; mold not checked
3++$ phantom: cases proven disjoint; mold not checked
4+++ repeated: $-((choice A A) (choice A A))
5+++ independent: $-((choice A B) (choice A B))
6+++ already-same: $-((choice A A) (choice A A))
7+++ merge-call: distinct type variables `A` and `B` must not be forced equal; use the same capital for a shared type
8+/tests/golden/types-generic-union-capitals/source.jibb:10:28: first type variable
9+++ merge-call |= x=(choice A B) (repeated x)
10+ ^
11+/tests/golden/types-generic-union-capitals/source.jibb:10:30: second type variable
12+++ merge-call |= x=(choice A B) (repeated x)
13+ ^
14+++ phantom-cast: distinct type variables `A` and `B` must not be forced equal; use the same capital for a shared type
15+/tests/golden/types-generic-union-capitals/source.jibb:11:31: first type variable
16+++ phantom-cast |= x=(phantom A) ^- (phantom B) x
17+ ^
18+/tests/golden/types-generic-union-capitals/source.jibb:11:46: second type variable
19+++ phantom-cast |= x=(phantom A) ^- (phantom B) x
20+ ^
21+++ local-merge: distinct type variables `A` and `B` must not be forced equal; use the same capital for a shared type
22+/tests/golden/types-generic-union-capitals/source.jibb:12:29: first type variable
23+++ local-merge |= x=(choice A B)
24+ ^
25+/tests/golden/types-generic-union-capitals/source.jibb:12:31: second type variable
26+++ local-merge |= x=(choice A B)
27+ ^
28+++ captured-merge: distinct type variables `A` and `B` must not be forced equal; use the same capital for a shared type
29+/tests/golden/types-generic-union-capitals/source.jibb:15:32: first type variable
30+++ captured-merge |= x=(choice A B)
31+ ^
32+/tests/golden/types-generic-union-capitals/source.jibb:15:34: second type variable
33+++ captured-merge |= x=(choice A B)
34+ ^
tests/golden/types-generic-union-errors/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Molds: union cases "must differ as nouns"; Tag resolution: "Tags take their union from context".
2+tests: Generic union arity, an unknown tag, mismatched payload and an overlapping instantiation do not silently succeed.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-generic-union-errors/source.jibbnew file+11
@@ -0,0 +1,11 @@
1++$ choice |$ [V E]
2+ [%ok value=V]
3+ [%err error=E]
4++$ overlap |$ [A]
5+ A
6+ @t
7+++ few |= x=(choice @t) x
8+++ many |= x=(choice @t @p @ud) x
9+++ bad-tag ^- (choice @t @p) %missing
10+++ bad-payload ^- (choice @t @p) [%ok ~zod]
11+++ overlap-use |= x=(overlap @t) x
tests/golden/types-generic-union-errors/tokens.txtnew file+93
@@ -0,0 +1,93 @@
1+1:1 glyph +$
2+1:4 name choice
3+1:11 glyph |$
4+1:14 glyph [
5+1:15 tight tvar V
6+1:17 tvar E
7+1:18 tight glyph ]
8+2:3 INDENT
9+2:3 glyph [
10+2:4 tight lit %ok
11+2:8 name value
12+2:13 tight glyph =
13+2:14 tight tvar V
14+2:15 tight glyph ]
15+3:3 NEWLINE
16+3:3 glyph [
17+3:4 tight lit %err
18+3:9 name error
19+3:14 tight glyph =
20+3:15 tight tvar E
21+3:16 tight glyph ]
22+4:1 DEDENT
23+4:1 NEWLINE
24+4:1 glyph +$
25+4:4 name overlap
26+4:12 glyph |$
27+4:15 glyph [
28+4:16 tight tvar A
29+4:17 tight glyph ]
30+5:3 INDENT
31+5:3 tvar A
32+6:3 NEWLINE
33+6:3 aura @t
34+7:1 DEDENT
35+7:1 NEWLINE
36+7:1 glyph ++
37+7:4 name few
38+7:8 glyph |=
39+7:11 name x
40+7:12 tight glyph =
41+7:13 tight glyph (
42+7:14 tight name choice
43+7:21 aura @t
44+7:23 tight glyph )
45+7:25 name x
46+8:1 NEWLINE
47+8:1 glyph ++
48+8:4 name many
49+8:9 glyph |=
50+8:12 name x
51+8:13 tight glyph =
52+8:14 tight glyph (
53+8:15 tight name choice
54+8:22 aura @t
55+8:25 aura @p
56+8:28 aura @ud
57+8:31 tight glyph )
58+8:33 name x
59+9:1 NEWLINE
60+9:1 glyph ++
61+9:4 name bad-tag
62+9:12 glyph ^-
63+9:15 glyph (
64+9:16 tight name choice
65+9:23 aura @t
66+9:26 aura @p
67+9:28 tight glyph )
68+9:30 lit %missing
69+10:1 NEWLINE
70+10:1 glyph ++
71+10:4 name bad-payload
72+10:16 glyph ^-
73+10:19 glyph (
74+10:20 tight name choice
75+10:27 aura @t
76+10:30 aura @p
77+10:32 tight glyph )
78+10:34 glyph [
79+10:35 tight lit %ok
80+10:39 lit ~zod
81+10:43 tight glyph ]
82+11:1 NEWLINE
83+11:1 glyph ++
84+11:4 name overlap-use
85+11:16 glyph |=
86+11:19 name x
87+11:20 tight glyph =
88+11:21 tight glyph (
89+11:22 tight name overlap
90+11:30 aura @t
91+11:32 tight glyph )
92+11:34 name x
93+11:35 NEWLINE
tests/golden/types-generic-union-errors/tree.txtnew file+36
@@ -0,0 +1,36 @@
1+(module
2+ (mold 1:1 choice
3+ (generic 1:11 V E
4+ (union 2:3
5+ (cell 2:3
6+ (const 2:4 %ok)
7+ (face 2:8 value (tvar 2:14 V)))
8+ (cell 3:3
9+ (const 3:4 %err)
10+ (face 3:9 error (tvar 3:15 E))))))
11+ (mold 4:1 overlap
12+ (generic 4:12 A
13+ (union 5:3 (tvar 5:3 A) (aura 6:3 @t))))
14+ (value 7:1 few
15+ (gate 7:8
16+ (face 7:11 x
17+ (apply 7:13 choice (aura 7:21 @t)))
18+ (wing 7:25 x)))
19+ (value 8:1 many
20+ (gate 8:9
21+ (face 8:12 x
22+ (apply 8:14 choice (aura 8:22 @t) (aura 8:25 @p) (aura 8:28 @ud)))
23+ (wing 8:33 x)))
24+ (value 9:1 bad-tag
25+ (cast 9:12
26+ (apply 9:15 choice (aura 9:23 @t) (aura 9:26 @p))
27+ (lit 9:30 %missing)))
28+ (value 10:1 bad-payload
29+ (cast 10:16
30+ (apply 10:19 choice (aura 10:27 @t) (aura 10:30 @p))
31+ (tuple 10:34 (lit 10:35 %ok) (lit 10:39 ~zod))))
32+ (value 11:1 overlap-use
33+ (gate 11:16
34+ (face 11:19 x
35+ (apply 11:21 overlap (aura 11:30 @t)))
36+ (wing 11:34 x))))
tests/golden/types-generic-union-errors/types.txtnew file+26
@@ -0,0 +1,26 @@
1+partial inference; module not checked
2++$ choice: cases proven disjoint; mold not checked
3++$ overlap: overlapping cases; mold not checked
4+/tests/golden/types-generic-union-errors/source.jibb:5:3: first union case
5+ A
6+ ^
7+/tests/golden/types-generic-union-errors/source.jibb:6:3: overlapping case
8+ @t
9+ ^
10+++ few: sample mold is not supported by partial inference
11+++ many: sample mold is not supported by partial inference
12+++ bad-tag: (choice @t @p) has no case `%missing`
13+/tests/golden/types-generic-union-errors/source.jibb:9:15: expected union
14+++ bad-tag ^- (choice @t @p) %missing
15+ ^
16+/tests/golden/types-generic-union-errors/source.jibb:9:30: tag
17+++ bad-tag ^- (choice @t @p) %missing
18+ ^
19+++ bad-payload: cast mold and expression type do not unify
20+/tests/golden/types-generic-union-errors/source.jibb:10:19: cast mold
21+++ bad-payload ^- (choice @t @p) [%ok ~zod]
22+ ^
23+/tests/golden/types-generic-union-errors/source.jibb:10:34: expression
24+++ bad-payload ^- (choice @t @p) [%ok ~zod]
25+ ^
26+++ overlap-use: sample mold is not supported by partial inference
tests/golden/types-generic-union-escaping/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Modules: "Everything is exported and read through the import's face"; Molds: a generic mold declares its parameters after `|$`.
2+tests: A transitive value carries a generic union whose defining module is not directly visible. Its phantom arguments must not be lost to an unnamed printout; the partial printer declines this case.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-generic-union-escaping/module-trees.txtnew file+16
@@ -0,0 +1,16 @@
1+/ui/base.jibb
2+(module
3+ (mold 1:1 phantom
4+ (generic 1:12 A
5+ (union 2:3 (const 2:3 %yes) (const 3:3 %no)))))
6+/ui/mid.jibb
7+(module
8+ (jibb 1:1 base /ui/base)
9+ (value 2:1 text
10+ (cast 2:9
11+ (apply 2:12 phantom.base (aura 2:26 @t))
12+ (lit 2:30 %yes)))
13+ (value 3:1 ship
14+ (cast 3:9
15+ (apply 3:12 phantom.base (aura 3:26 @p))
16+ (lit 3:30 %yes))))
tests/golden/types-generic-union-escaping/modules.txtnew file+2
@@ -0,0 +1,2 @@
1+/ui/base.jibb
2+/ui/mid.jibb
tests/golden/types-generic-union-escaping/modules/ui/base.jibbnew file+3
@@ -0,0 +1,3 @@
1++$ phantom |$ [A]
2+ %yes
3+ %no
tests/golden/types-generic-union-escaping/modules/ui/mid.jibbnew file+3
@@ -0,0 +1,3 @@
1+/= base /ui/base
2+++ text ^- (phantom.base @t) %yes
3+++ ship ^- (phantom.base @p) %yes
tests/golden/types-generic-union-escaping/source.jibbnew file+3
@@ -0,0 +1,3 @@
1+/= mid /ui/mid
2+++ text-value text.mid
3+++ ship-value ship.mid
tests/golden/types-generic-union-escaping/tokens.txtnew file+15
@@ -0,0 +1,15 @@
1+1:1 glyph /=
2+1:5 name mid
3+1:9 glyph /
4+1:10 tight knot ui
5+1:12 tight glyph /
6+1:13 tight knot mid
7+2:1 NEWLINE
8+2:1 glyph ++
9+2:4 name text-value
10+2:15 wing text.mid
11+3:1 NEWLINE
12+3:1 glyph ++
13+3:4 name ship-value
14+3:15 wing ship.mid
15+3:23 NEWLINE
tests/golden/types-generic-union-escaping/tree.txtnew file+4
@@ -0,0 +1,4 @@
1+(module
2+ (jibb 1:1 mid /ui/mid)
3+ (value 2:1 text-value (wing 2:15 text.mid))
4+ (value 3:1 ship-value (wing 3:15 ship.mid)))
tests/golden/types-generic-union-escaping/types.txtnew file+3
@@ -0,0 +1,3 @@
1+partial inference; module not checked
2+++ text-value: generic union name is not available in this scope
3+++ ship-value: generic union name is not available in this scope
tests/golden/types-generic-union-import/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Modules: "Everything is exported and read through the import's face"; Molds: recursive molds go by name and module.
2+tests: A generic union shared through two faces retains one origin and instantiated arguments, while an identically shaped mold from another module has a different origin.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-generic-union-import/module-trees.txtnew file+32
@@ -0,0 +1,32 @@
1+/ui/shared.jibb
2+(module
3+ (mold 1:1 choice
4+ (generic 1:11 V E
5+ (union 2:3
6+ (cell 2:3
7+ (const 2:4 %ok)
8+ (face 2:8 value (tvar 2:14 V)))
9+ (cell 3:3
10+ (const 3:4 %err)
11+ (face 3:9 error (tvar 3:15 E))))))
12+ (value 4:1 identity
13+ (gate 4:13
14+ (face 4:16 x
15+ (apply 4:18 choice (tvar 4:26 A) (tvar 4:28 B)))
16+ (wing 4:31 x))))
17+/ui/twin.jibb
18+(module
19+ (mold 1:1 choice
20+ (generic 1:11 V E
21+ (union 2:3
22+ (cell 2:3
23+ (const 2:4 %ok)
24+ (face 2:8 value (tvar 2:14 V)))
25+ (cell 3:3
26+ (const 3:4 %err)
27+ (face 3:9 error (tvar 3:15 E))))))
28+ (value 4:1 identity
29+ (gate 4:13
30+ (face 4:16 x
31+ (apply 4:18 choice (tvar 4:26 A) (tvar 4:28 B)))
32+ (wing 4:31 x))))
tests/golden/types-generic-union-import/modules.txtnew file+2
@@ -0,0 +1,2 @@
1+/ui/shared.jibb
2+/ui/twin.jibb
tests/golden/types-generic-union-import/modules/ui/shared.jibbnew file+4
@@ -0,0 +1,4 @@
1++$ choice |$ [V E]
2+ [%ok value=V]
3+ [%err error=E]
4+++ identity |= x=(choice A B) x
tests/golden/types-generic-union-import/modules/ui/twin.jibbnew file+4
@@ -0,0 +1,4 @@
1++$ choice |$ [V E]
2+ [%ok value=V]
3+ [%err error=E]
4+++ identity |= x=(choice A B) x
tests/golden/types-generic-union-import/source.jibbnew file+9
@@ -0,0 +1,9 @@
1+/= left /ui/shared
2+/= right /ui/shared
3+/= twin /ui/twin
4+++ from-left ^- (choice.left @t @p) [%ok "hi"]
5+++ consume |= x=(choice.right @t @p) x
6+++ same-origin (consume from-left)
7+++ different |= x=(choice.twin @t @p) x
8+++ cross-origin (different from-left)
9+++ polymorphic (identity.right from-left)
tests/golden/types-generic-union-import/tokens.txtnew file+79

This diff is too big to show here.

tests/golden/types-generic-union-import/tree.txtnew file+27

This diff is too big to show here.

tests/golden/types-generic-union-import/types.txtnew file+7

This diff is too big to show here.

tests/golden/types-generic-union-local/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-generic-union-local/source.jibbnew file+34

This diff is too big to show here.

tests/golden/types-generic-union-local/tokens.txtnew file+297

This diff is too big to show here.

tests/golden/types-generic-union-local/tree.txtnew file+120

This diff is too big to show here.

tests/golden/types-generic-union-local/types.txtnew file+22

This diff is too big to show here.

tests/golden/types-generic-union-transitive/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-generic-union-transitive/module-trees.txtnew file+27

This diff is too big to show here.

tests/golden/types-generic-union-transitive/modules.txtnew file+2

This diff is too big to show here.

tests/golden/types-generic-union-transitive/modules/ui/base.jibbnew file+3

This diff is too big to show here.

tests/golden/types-generic-union-transitive/modules/ui/mid.jibbnew file+4

This diff is too big to show here.

tests/golden/types-generic-union-transitive/source.jibbnew file+5

This diff is too big to show here.

tests/golden/types-generic-union-transitive/tokens.txtnew file+43

This diff is too big to show here.

tests/golden/types-generic-union-transitive/tree.txtnew file+15

This diff is too big to show here.

tests/golden/types-generic-union-transitive/types.txtnew file+5

This diff is too big to show here.

tests/golden/types-import-duplicate-mark/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-import-duplicate-mark/mar/duplicate.txtnew file+5

This diff is too big to show here.

tests/golden/types-import-duplicate-mark/marks.txtnew file+1

This diff is too big to show here.

tests/golden/types-import-duplicate-mark/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-import-duplicate-mark/tokens.txtnew file+11

This diff is too big to show here.

tests/golden/types-import-duplicate-mark/tree.txtnew file+6

This diff is too big to show here.

tests/golden/types-import-duplicate-mark/types.txtnew file+2

This diff is too big to show here.

tests/golden/types-import-duplicate-sur/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-import-duplicate-sur/imports.txtnew file+3

This diff is too big to show here.

tests/golden/types-import-duplicate-sur/source.jibbnew file+5

This diff is too big to show here.

tests/golden/types-import-duplicate-sur/sur/fixture.txtnew file+6

This diff is too big to show here.

tests/golden/types-import-duplicate-sur/tokens.txtnew file+35

This diff is too big to show here.

tests/golden/types-import-duplicate-sur/tree.txtnew file+18

This diff is too big to show here.

tests/golden/types-import-duplicate-sur/types.txtnew file+5

This diff is too big to show here.

tests/golden/types-import-hoon-flags/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-import-hoon-flags/imports.txtnew file+4

This diff is too big to show here.

tests/golden/types-import-hoon-flags/source.jibbnew file+14

This diff is too big to show here.

tests/golden/types-import-hoon-flags/sur/flags.txtnew file+7

This diff is too big to show here.

tests/golden/types-import-hoon-flags/tokens.txtnew file+91

This diff is too big to show here.

tests/golden/types-import-hoon-flags/tree.txtnew file+41

This diff is too big to show here.

tests/golden/types-import-hoon-flags/types.txtnew file+24

This diff is too big to show here.

tests/golden/types-import-hoon-noun/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-import-hoon-noun/imports.txtnew file+4

This diff is too big to show here.

tests/golden/types-import-hoon-noun/source.jibbnew file+8

This diff is too big to show here.

tests/golden/types-import-hoon-noun/sur/fixture.txtnew file+6

This diff is too big to show here.

tests/golden/types-import-hoon-noun/tokens.txtnew file+60

This diff is too big to show here.

tests/golden/types-import-hoon-noun/tree.txtnew file+28

This diff is too big to show here.

tests/golden/types-import-hoon-noun/types.txtnew file+8

This diff is too big to show here.

tests/golden/types-import-mark-record/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-import-mark-record/mar/choice.txtnew file+5

This diff is too big to show here.

tests/golden/types-import-mark-record/mar/note.txtnew file+5

This diff is too big to show here.

tests/golden/types-import-mark-record/marks.txtnew file+2

This diff is too big to show here.

tests/golden/types-import-mark-record/source.jibbnew file+5

This diff is too big to show here.

tests/golden/types-import-mark-record/tokens.txtnew file+30

This diff is too big to show here.

tests/golden/types-import-mark-record/tree.txtnew file+15

This diff is too big to show here.

tests/golden/types-import-mark-record/types.txtnew file+4

This diff is too big to show here.

tests/golden/types-import-sur-record-graph/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-import-sur-record-graph/imports.txtnew file+1

This diff is too big to show here.

tests/golden/types-import-sur-record-graph/module-trees.txtnew file+7

This diff is too big to show here.

tests/golden/types-import-sur-record-graph/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-import-sur-record-graph/modules/ui/lib.jibbnew file+2

This diff is too big to show here.

tests/golden/types-import-sur-record-graph/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-import-sur-record-graph/sur/fixture.txtnew file+3

This diff is too big to show here.

tests/golden/types-import-sur-record-graph/tokens.txtnew file+32

This diff is too big to show here.

tests/golden/types-import-sur-record-graph/tree.txtnew file+13

This diff is too big to show here.

tests/golden/types-import-sur-record-graph/types.txtnew file+2

This diff is too big to show here.

tests/golden/types-import-tlon-notes/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-import-tlon-notes/imports.txtnew file+2

This diff is too big to show here.

tests/golden/types-import-tlon-notes/source.jibbnew file+3

This diff is too big to show here.

tests/golden/types-import-tlon-notes/sur/notes.txtnew file+433

This diff is too big to show here.

tests/golden/types-import-tlon-notes/tokens.txtnew file+19

This diff is too big to show here.

tests/golden/types-import-tlon-notes/tree.txtnew file+10

This diff is too big to show here.

tests/golden/types-import-tlon-notes/types.txtnew file+3

This diff is too big to show here.

tests/golden/types-list-branch/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-list-branch/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-list-branch/source.jibbnew file+81

This diff is too big to show here.

tests/golden/types-list-branch/tokens.txtnew file+521

This diff is too big to show here.

tests/golden/types-list-branch/tree.txtnew file+237

This diff is too big to show here.

tests/golden/types-list-branch/types.txtnew file+41

This diff is too big to show here.

tests/golden/types-list-cons/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-list-cons/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-list-cons/source.jibbnew file+20

This diff is too big to show here.

tests/golden/types-list-cons/tokens.txtnew file+217

This diff is too big to show here.

tests/golden/types-list-cons/tree.txtnew file+85

This diff is too big to show here.

tests/golden/types-list-cons/types.txtnew file+29

This diff is too big to show here.

tests/golden/types-list-context/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-list-context/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-list-context/source.jibbnew file+17

This diff is too big to show here.

tests/golden/types-list-context/tokens.txtnew file+143

This diff is too big to show here.

tests/golden/types-list-context/tree.txtnew file+59

This diff is too big to show here.

tests/golden/types-list-context/types.txtnew file+18

This diff is too big to show here.

tests/golden/types-list-imported/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-list-imported/imports.txtnew file+2

This diff is too big to show here.

tests/golden/types-list-imported/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-list-imported/source.jibbnew file+14

This diff is too big to show here.

tests/golden/types-list-imported/sur/fixture.txtnew file+4

This diff is too big to show here.

tests/golden/types-list-imported/tokens.txtnew file+109

This diff is too big to show here.

tests/golden/types-list-imported/tree.txtnew file+52

This diff is too big to show here.

tests/golden/types-list-imported/types.txtnew file+22

This diff is too big to show here.

tests/golden/types-list-open-constraints/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-list-open-constraints/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-list-open-constraints/source.jibbnew file+19

This diff is too big to show here.

tests/golden/types-list-open-constraints/tokens.txtnew file+178

This diff is too big to show here.

tests/golden/types-list-open-constraints/tree.txtnew file+68

This diff is too big to show here.

tests/golden/types-list-open-constraints/types.txtnew file+30

This diff is too big to show here.

tests/golden/types-list-open/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-list-open/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-list-open/source.jibbnew file+13

This diff is too big to show here.

tests/golden/types-list-open/tokens.txtnew file+94

This diff is too big to show here.

tests/golden/types-list-open/tree.txtnew file+36

This diff is too big to show here.

tests/golden/types-list-open/types.txtnew file+18

This diff is too big to show here.

tests/golden/types-list-pattern-imported/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-list-pattern-imported/imports.txtnew file+2

This diff is too big to show here.

tests/golden/types-list-pattern-imported/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-list-pattern-imported/source.jibbnew file+13

This diff is too big to show here.

tests/golden/types-list-pattern-imported/sur/fixture.txtnew file+5

This diff is too big to show here.

tests/golden/types-list-pattern-imported/tokens.txtnew file+66

This diff is too big to show here.

tests/golden/types-list-pattern-imported/tree.txtnew file+32

This diff is too big to show here.

tests/golden/types-list-pattern-imported/types.txtnew file+4

This diff is too big to show here.

tests/golden/types-list-patterns/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-list-patterns/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-list-patterns/source.jibbnew file+64

This diff is too big to show here.

tests/golden/types-list-patterns/tokens.txtnew file+359

This diff is too big to show here.

tests/golden/types-list-patterns/tree.txtnew file+168

This diff is too big to show here.

tests/golden/types-list-patterns/types.txtnew file+17

This diff is too big to show here.

tests/golden/types-list-zero-fit/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-list-zero-fit/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-list-zero-fit/source.jibbnew file+8

This diff is too big to show here.

tests/golden/types-list-zero-fit/tokens.txtnew file+181

This diff is too big to show here.

tests/golden/types-list-zero-fit/tree.txtnew file+91

This diff is too big to show here.

tests/golden/types-list-zero-fit/types.txtnew file+27

This diff is too big to show here.

tests/golden/types-local-capitals/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-local-capitals/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-local-capitals/source.jibbnew file+73

This diff is too big to show here.

tests/golden/types-local-capitals/tokens.txtnew file+473

This diff is too big to show here.

tests/golden/types-local-capitals/tree.txtnew file+229

This diff is too big to show here.

tests/golden/types-local-capitals/types.txtnew file+28

This diff is too big to show here.

tests/golden/types-local-recursive/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-local-recursive/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-local-recursive/source.jibbnew file+54

This diff is too big to show here.

tests/golden/types-local-recursive/tokens.txtnew file+351

This diff is too big to show here.

tests/golden/types-local-recursive/tree.txtnew file+170

This diff is too big to show here.

tests/golden/types-local-recursive/types.txtnew file+12

This diff is too big to show here.

tests/golden/types-local-scc-adversarial/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-local-scc-adversarial/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-local-scc-adversarial/source.jibbnew file+54

This diff is too big to show here.

tests/golden/types-local-scc-adversarial/tokens.txtnew file+404

This diff is too big to show here.

tests/golden/types-local-scc-adversarial/tree.txtnew file+204

This diff is too big to show here.

tests/golden/types-local-scc-adversarial/types.txtnew file+17

This diff is too big to show here.

tests/golden/types-local-scc/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-local-scc/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-local-scc/source.jibbnew file+58

This diff is too big to show here.

tests/golden/types-local-scc/tokens.txtnew file+434

This diff is too big to show here.

tests/golden/types-local-scc/tree.txtnew file+214

This diff is too big to show here.

tests/golden/types-local-scc/types.txtnew file+12

This diff is too big to show here.

tests/golden/types-missing-tag-context/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-missing-tag-context/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-missing-tag-context/source.jibbnew file+17

This diff is too big to show here.

tests/golden/types-missing-tag-context/tokens.txtnew file+98

This diff is too big to show here.

tests/golden/types-missing-tag-context/tree.txtnew file+45

This diff is too big to show here.

tests/golden/types-missing-tag-context/types.txtnew file+38

This diff is too big to show here.

tests/golden/types-missing-tag-imported/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-missing-tag-imported/imports.txtnew file+2

This diff is too big to show here.

tests/golden/types-missing-tag-imported/source.jibbnew file+6

This diff is too big to show here.

tests/golden/types-missing-tag-imported/sur/fixture.txtnew file+21

This diff is too big to show here.

tests/golden/types-missing-tag-imported/tokens.txtnew file+43

This diff is too big to show here.

tests/golden/types-missing-tag-imported/tree.txtnew file+18

This diff is too big to show here.

tests/golden/types-missing-tag-imported/types.txtnew file+12

This diff is too big to show here.

tests/golden/types-missing-tag-named/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-missing-tag-named/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-missing-tag-named/source.jibbnew file+23

This diff is too big to show here.

tests/golden/types-missing-tag-named/tokens.txtnew file+155

This diff is too big to show here.

tests/golden/types-missing-tag-named/tree.txtnew file+66

This diff is too big to show here.

tests/golden/types-missing-tag-named/types.txtnew file+66

This diff is too big to show here.

tests/golden/types-multi-call/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-multi-call/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-multi-call/source.jibbnew file+42

This diff is too big to show here.

tests/golden/types-multi-call/tokens.txtnew file+370

This diff is too big to show here.

tests/golden/types-multi-call/tree.txtnew file+169

This diff is too big to show here.

tests/golden/types-multi-call/types.txtnew file+100

This diff is too big to show here.

tests/golden/types-multi-import/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-multi-import/module-trees.txtnew file+16

This diff is too big to show here.

tests/golden/types-multi-import/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-multi-import/modules/ui/lib.jibbnew file+5

This diff is too big to show here.

tests/golden/types-multi-import/source.jibbnew file+5

This diff is too big to show here.

tests/golden/types-multi-import/tokens.txtnew file+43

This diff is too big to show here.

tests/golden/types-multi-import/tree.txtnew file+20

This diff is too big to show here.

tests/golden/types-multi-import/types.txtnew file+17

This diff is too big to show here.

tests/golden/types-nested-missing-tag/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-nested-missing-tag/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-nested-missing-tag/source.jibbnew file+18

This diff is too big to show here.

tests/golden/types-nested-missing-tag/tokens.txtnew file+184

This diff is too big to show here.

tests/golden/types-nested-missing-tag/tree.txtnew file+79

This diff is too big to show here.

tests/golden/types-nested-missing-tag/types.txtnew file+71

This diff is too big to show here.

tests/golden/types-null-context/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-null-context/source.jibbnew file+8

This diff is too big to show here.

tests/golden/types-null-context/tokens.txtnew file+57

This diff is too big to show here.

tests/golden/types-null-context/tree.txtnew file+25

This diff is too big to show here.

tests/golden/types-null-context/types.txtnew file+13

This diff is too big to show here.

tests/golden/types-null-overlap/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-null-overlap/source.jibbnew file+3

This diff is too big to show here.

tests/golden/types-null-overlap/tokens.txtnew file+8

This diff is too big to show here.

tests/golden/types-null-overlap/tree.txtnew file+3

This diff is too big to show here.

tests/golden/types-null-overlap/types.txtnew file+8

This diff is too big to show here.

tests/golden/types-null-unresolved/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-null-unresolved/source.jibbnew file+18

This diff is too big to show here.

tests/golden/types-null-unresolved/tokens.txtnew file+79

This diff is too big to show here.

tests/golden/types-null-unresolved/tree.txtnew file+34

This diff is too big to show here.

tests/golden/types-null-unresolved/types.txtnew file+9

This diff is too big to show here.

tests/golden/types-partial-local-molds/about.txt+2−1

This diff is too big to show here.

tests/golden/types-partial-local-molds/types.txt+1−1

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-partial-unresolved-tag/types.txt+1−1

This diff is too big to show here.

tests/golden/types-prelude-direct/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-prelude-direct/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-prelude-direct/source.jibbnew file+5

This diff is too big to show here.

tests/golden/types-prelude-direct/tokens.txtnew file+53

This diff is too big to show here.

tests/golden/types-prelude-direct/tree.txtnew file+25

This diff is too big to show here.

tests/golden/types-prelude-direct/types.txtnew file+6

This diff is too big to show here.

tests/golden/types-prelude-interface/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-prelude-interface/module-trees.txtnew file+13

This diff is too big to show here.

tests/golden/types-prelude-interface/modules.txtnew file+2

This diff is too big to show here.

tests/golden/types-prelude-interface/modules/ui/left.jibbnew file+1

This diff is too big to show here.

tests/golden/types-prelude-interface/modules/ui/right.jibbnew file+1

This diff is too big to show here.

tests/golden/types-prelude-interface/source.jibbnew file+10

This diff is too big to show here.

tests/golden/types-prelude-interface/tokens.txtnew file+81

This diff is too big to show here.

tests/golden/types-prelude-interface/tree.txtnew file+33

This diff is too big to show here.

tests/golden/types-prelude-interface/types.txtnew file+9

This diff is too big to show here.

tests/golden/types-prelude-list-functions/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-prelude-list-functions/module-trees.txtnew file+11

This diff is too big to show here.

tests/golden/types-prelude-list-functions/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-prelude-list-functions/modules/ui/lib.jibbnew file+2

This diff is too big to show here.

tests/golden/types-prelude-list-functions/source.jibbnew file+18

This diff is too big to show here.

tests/golden/types-prelude-list-functions/tokens.txtnew file+183

This diff is too big to show here.

tests/golden/types-prelude-list-functions/tree.txtnew file+87

This diff is too big to show here.

tests/golden/types-prelude-list-functions/types.txtnew file+28

This diff is too big to show here.

tests/golden/types-prelude-list-helpers/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-prelude-list-helpers/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-prelude-list-helpers/source.jibbnew file+15

This diff is too big to show here.

tests/golden/types-prelude-list-helpers/tokens.txtnew file+182

This diff is too big to show here.

tests/golden/types-prelude-list-helpers/tree.txtnew file+98

This diff is too big to show here.

tests/golden/types-prelude-list-helpers/types.txtnew file+34

This diff is too big to show here.

tests/golden/types-prelude-unit-helpers/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-prelude-unit-helpers/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-prelude-unit-helpers/source.jibbnew file+15

This diff is too big to show here.

tests/golden/types-prelude-unit-helpers/tokens.txtnew file+209

This diff is too big to show here.

tests/golden/types-prelude-unit-helpers/tree.txtnew file+115

This diff is too big to show here.

tests/golden/types-prelude-unit-helpers/types.txtnew file+26

This diff is too big to show here.

tests/golden/types-record-bound-variable/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-record-bound-variable/source.jibbnew file+6

This diff is too big to show here.

tests/golden/types-record-bound-variable/tokens.txtnew file+65

This diff is too big to show here.

tests/golden/types-record-bound-variable/tree.txtnew file+33

This diff is too big to show here.

tests/golden/types-record-bound-variable/types.txtnew file+5

This diff is too big to show here.

tests/golden/types-record-cast-context/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-record-cast-context/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-record-cast-context/source.jibbnew file+24

This diff is too big to show here.

tests/golden/types-record-cast-context/tokens.txtnew file+234

This diff is too big to show here.

tests/golden/types-record-cast-context/tree.txtnew file+105

This diff is too big to show here.

tests/golden/types-record-cast-context/types.txtnew file+49

This diff is too big to show here.

tests/golden/types-record-change-generic/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-record-change-generic/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-record-change-generic/source.jibbnew file+11

This diff is too big to show here.

tests/golden/types-record-change-generic/tokens.txtnew file+169

This diff is too big to show here.

tests/golden/types-record-change-generic/tree.txtnew file+66

This diff is too big to show here.

tests/golden/types-record-change-generic/types.txtnew file+16

This diff is too big to show here.

tests/golden/types-record-change/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-record-change/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-record-change/source.jibbnew file+19

This diff is too big to show here.

tests/golden/types-record-change/tokens.txtnew file+254

This diff is too big to show here.

tests/golden/types-record-change/tree.txtnew file+99

This diff is too big to show here.

tests/golden/types-record-change/types.txtnew file+42

This diff is too big to show here.

tests/golden/types-record-faces/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-record-faces/source.jibbnew file+8

This diff is too big to show here.

tests/golden/types-record-faces/tokens.txtnew file+90

This diff is too big to show here.

tests/golden/types-record-faces/tree.txtnew file+41

This diff is too big to show here.

tests/golden/types-record-faces/types.txtnew file+15

This diff is too big to show here.

tests/golden/types-record-import/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-record-import/module-trees.txtnew file+9

This diff is too big to show here.

tests/golden/types-record-import/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-record-import/modules/ui/lib.jibbnew file+1

This diff is too big to show here.

tests/golden/types-record-import/source.jibbnew file+3

This diff is too big to show here.

tests/golden/types-record-import/tokens.txtnew file+36

This diff is too big to show here.

tests/golden/types-record-import/tree.txtnew file+16

This diff is too big to show here.

tests/golden/types-record-import/types.txtnew file+3

This diff is too big to show here.

tests/golden/types-record-local-scheme/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-record-local-scheme/source.jibbnew file+5

This diff is too big to show here.

tests/golden/types-record-local-scheme/tokens.txtnew file+44

This diff is too big to show here.

tests/golden/types-record-local-scheme/tree.txtnew file+20

This diff is too big to show here.

tests/golden/types-record-local-scheme/types.txtnew file+4

This diff is too big to show here.

tests/golden/types-record-nested/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-record-nested/source.jibbnew file+4

This diff is too big to show here.

tests/golden/types-record-nested/tokens.txtnew file+54

This diff is too big to show here.

tests/golden/types-record-nested/tree.txtnew file+24

This diff is too big to show here.

tests/golden/types-record-nested/types.txtnew file+5

This diff is too big to show here.

tests/golden/types-record-to-tuple/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-record-to-tuple/source.jibbnew file+4

This diff is too big to show here.

tests/golden/types-record-to-tuple/tokens.txtnew file+38

This diff is too big to show here.

tests/golden/types-record-to-tuple/tree.txtnew file+17

This diff is too big to show here.

tests/golden/types-record-to-tuple/types.txtnew file+5

This diff is too big to show here.

tests/golden/types-recursion-scc-failures/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-recursion-scc-failures/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-recursion-scc-failures/source.jibbnew file+11

This diff is too big to show here.

tests/golden/types-recursion-scc-failures/tokens.txtnew file+90

This diff is too big to show here.

tests/golden/types-recursion-scc-failures/tree.txtnew file+45

This diff is too big to show here.

tests/golden/types-recursion-scc-failures/types.txtnew file+10

This diff is too big to show here.

tests/golden/types-recursion-scc-groups/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-recursion-scc-groups/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-recursion-scc-groups/source.jibbnew file+9

This diff is too big to show here.

tests/golden/types-recursion-scc-groups/tokens.txtnew file+91

This diff is too big to show here.

tests/golden/types-recursion-scc-groups/tree.txtnew file+42

This diff is too big to show here.

tests/golden/types-recursion-scc-groups/types.txtnew file+10

This diff is too big to show here.

tests/golden/types-recursion-scc-import-bad/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-recursion-scc-import-bad/module-trees.txtnew file+16

This diff is too big to show here.

tests/golden/types-recursion-scc-import-bad/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-recursion-scc-import-bad/modules/ui/lib.jibbnew file+3

This diff is too big to show here.

tests/golden/types-recursion-scc-import-bad/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-recursion-scc-import-bad/tokens.txtnew file+14

This diff is too big to show here.

tests/golden/types-recursion-scc-import-bad/tree.txtnew file+5

This diff is too big to show here.

tests/golden/types-recursion-scc-import-bad/types.txtnew file+2

This diff is too big to show here.

tests/golden/types-recursion-scc-import/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-recursion-scc-import/module-trees.txtnew file+12

This diff is too big to show here.

tests/golden/types-recursion-scc-import/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-recursion-scc-import/modules/ui/lib.jibbnew file+2

This diff is too big to show here.

tests/golden/types-recursion-scc-import/source.jibbnew file+3

This diff is too big to show here.

tests/golden/types-recursion-scc-import/tokens.txtnew file+25

This diff is too big to show here.

tests/golden/types-recursion-scc-import/tree.txtnew file+12

This diff is too big to show here.

tests/golden/types-recursion-scc-import/types.txtnew file+3

This diff is too big to show here.

tests/golden/types-recursion-scc-local/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-recursion-scc-local/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-recursion-scc-local/source.jibbnew file+11

This diff is too big to show here.

tests/golden/types-recursion-scc-local/tokens.txtnew file+80

This diff is too big to show here.

tests/golden/types-recursion-scc-local/tree.txtnew file+39

This diff is too big to show here.

tests/golden/types-recursion-scc-local/types.txtnew file+4

This diff is too big to show here.

tests/golden/types-recursion-scc-order/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-recursion-scc-order/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-recursion-scc-order/source.jibbnew file+4

This diff is too big to show here.

tests/golden/types-recursion-scc-order/tokens.txtnew file+33

This diff is too big to show here.

tests/golden/types-recursion-scc-order/tree.txtnew file+15

This diff is too big to show here.

tests/golden/types-recursion-scc-order/types.txtnew file+5

This diff is too big to show here.

tests/golden/types-recursion-scc-shadow/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-recursion-scc-shadow/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-recursion-scc-shadow/source.jibbnew file+3

This diff is too big to show here.

tests/golden/types-recursion-scc-shadow/tokens.txtnew file+30

This diff is too big to show here.

tests/golden/types-recursion-scc-shadow/tree.txtnew file+15

This diff is too big to show here.

tests/golden/types-recursion-scc-shadow/types.txtnew file+4

This diff is too big to show here.

tests/golden/types-recursive-branch/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-recursive-branch/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-recursive-branch/source.jibbnew file+103

This diff is too big to show here.

tests/golden/types-recursive-branch/tokens.txtnew file+573

This diff is too big to show here.

tests/golden/types-recursive-branch/tree.txtnew file+306

This diff is too big to show here.

tests/golden/types-recursive-branch/types.txtnew file+50

This diff is too big to show here.

tests/golden/types-recursive-gate/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-recursive-gate/source.jibbnew file+55

This diff is too big to show here.

tests/golden/types-recursive-gate/tokens.txtnew file+355

This diff is too big to show here.

tests/golden/types-recursive-gate/tree.txtnew file+176

This diff is too big to show here.

tests/golden/types-recursive-gate/types.txtnew file+42

This diff is too big to show here.

tests/golden/types-recursive-sample/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-recursive-sample/source.jibbnew file+40

This diff is too big to show here.

tests/golden/types-recursive-sample/tokens.txtnew file+344

This diff is too big to show here.

tests/golden/types-recursive-sample/tree.txtnew file+161

This diff is too big to show here.

tests/golden/types-recursive-sample/types.txtnew file+40

This diff is too big to show here.

tests/golden/types-scope-library-poke/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-scope-library-poke/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-scope-library-poke/path.txtnew file+1

This diff is too big to show here.

tests/golden/types-scope-library-poke/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-scope-library-poke/tokens.txtnew file+8

This diff is too big to show here.

tests/golden/types-scope-library-poke/tree.txtnew file+3

This diff is too big to show here.

tests/golden/types-scope-library-poke/types.txtnew file+2

This diff is too big to show here.

tests/golden/types-scope-root-api/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-scope-root-api/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-scope-root-api/path.txtnew file+1

This diff is too big to show here.

tests/golden/types-scope-root-api/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-scope-root-api/tokens.txtnew file+7

This diff is too big to show here.

tests/golden/types-scope-root-api/tree.txtnew file+3

This diff is too big to show here.

tests/golden/types-scope-root-api/types.txtnew file+2

This diff is too big to show here.

tests/golden/types-scope-store-duplicate/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-scope-store-duplicate/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-scope-store-duplicate/path.txtnew file+1

This diff is too big to show here.

tests/golden/types-scope-store-duplicate/source.jibbnew file+3

This diff is too big to show here.

tests/golden/types-scope-store-duplicate/tokens.txtnew file+16

This diff is too big to show here.

tests/golden/types-scope-store-duplicate/tree.txtnew file+6

This diff is too big to show here.

tests/golden/types-scope-store-duplicate/types.txtnew file+2

This diff is too big to show here.

tests/golden/types-scope-store-shadow/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-scope-store-shadow/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-scope-store-shadow/path.txtnew file+1

This diff is too big to show here.

tests/golden/types-scope-store-shadow/source.jibbnew file+3

This diff is too big to show here.

tests/golden/types-scope-store-shadow/tokens.txtnew file+16

This diff is too big to show here.

tests/golden/types-scope-store-shadow/tree.txtnew file+6

This diff is too big to show here.

tests/golden/types-scope-store-shadow/types.txtnew file+2

This diff is too big to show here.

tests/golden/types-string-interpolation/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-string-interpolation/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-string-interpolation/source.jibbnew file+28

This diff is too big to show here.

tests/golden/types-string-interpolation/tokens.txtnew file+259

This diff is too big to show here.

tests/golden/types-string-interpolation/tree.txtnew file+109

This diff is too big to show here.

tests/golden/types-string-interpolation/types.txtnew file+33

This diff is too big to show here.

tests/golden/types-tuple-context-nested/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-tuple-context-nested/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-tuple-context-nested/source.jibbnew file+24

This diff is too big to show here.

tests/golden/types-tuple-context-nested/tokens.txtnew file+289

This diff is too big to show here.

tests/golden/types-tuple-context-nested/tree.txtnew file+140

This diff is too big to show here.

tests/golden/types-tuple-context-nested/types.txtnew file+55

This diff is too big to show here.

tests/golden/types-tuple-context/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-tuple-context/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-tuple-context/source.jibbnew file+7

This diff is too big to show here.

tests/golden/types-tuple-context/tokens.txtnew file+109

This diff is too big to show here.

tests/golden/types-tuple-context/tree.txtnew file+55

This diff is too big to show here.

tests/golden/types-tuple-context/types.txtnew file+14

This diff is too big to show here.

tests/golden/types-union-alias/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-alias/source.jibbnew file+5

This diff is too big to show here.

tests/golden/types-union-alias/tokens.txtnew file+23

This diff is too big to show here.

tests/golden/types-union-alias/tree.txtnew file+10

This diff is too big to show here.

tests/golden/types-union-alias/types.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-branch-context/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-branch-context/source.jibbnew file+54

This diff is too big to show here.

tests/golden/types-union-branch-context/tokens.txtnew file+237

This diff is too big to show here.

tests/golden/types-union-branch-context/tree.txtnew file+120

This diff is too big to show here.

tests/golden/types-union-branch-context/types.txtnew file+24

This diff is too big to show here.

tests/golden/types-union-branch-pending/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-branch-pending/source.jibbnew file+24

This diff is too big to show here.

tests/golden/types-union-branch-pending/tokens.txtnew file+102

This diff is too big to show here.

tests/golden/types-union-branch-pending/tree.txtnew file+48

This diff is too big to show here.

tests/golden/types-union-branch-pending/types.txtnew file+6

This diff is too big to show here.

tests/golden/types-union-constructor-shape/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-constructor-shape/source.jibbnew file+5

This diff is too big to show here.

tests/golden/types-union-constructor-shape/tokens.txtnew file+58

This diff is too big to show here.

tests/golden/types-union-constructor-shape/tree.txtnew file+24

This diff is too big to show here.

tests/golden/types-union-constructor-shape/types.txtnew file+12

This diff is too big to show here.

tests/golden/types-union-context-flow/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-context-flow/source.jibbnew file+13

This diff is too big to show here.

tests/golden/types-union-context-flow/tokens.txtnew file+58

This diff is too big to show here.

tests/golden/types-union-context-flow/tree.txtnew file+26

This diff is too big to show here.

tests/golden/types-union-context-flow/types.txtnew file+6

This diff is too big to show here.

tests/golden/types-union-finite-context/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-finite-context/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-union-finite-context/source.jibbnew file+76

This diff is too big to show here.

tests/golden/types-union-finite-context/tokens.txtnew file+529

This diff is too big to show here.

tests/golden/types-union-finite-context/tree.txtnew file+234

This diff is too big to show here.

tests/golden/types-union-finite-context/types.txtnew file+27

This diff is too big to show here.

tests/golden/types-union-finite-generic/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-finite-generic/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-union-finite-generic/source.jibbnew file+48

This diff is too big to show here.

tests/golden/types-union-finite-generic/tokens.txtnew file+336

This diff is too big to show here.

tests/golden/types-union-finite-generic/tree.txtnew file+143

This diff is too big to show here.

tests/golden/types-union-finite-generic/types.txtnew file+11

This diff is too big to show here.

tests/golden/types-union-finite-limit/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-finite-limit/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-union-finite-limit/source.jibbnew file+35

This diff is too big to show here.

tests/golden/types-union-finite-limit/tokens.txtnew file+233

This diff is too big to show here.

tests/golden/types-union-finite-limit/tree.txtnew file+89

This diff is too big to show here.

tests/golden/types-union-finite-limit/types.txtnew file+10

This diff is too big to show here.

tests/golden/types-union-finite/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-finite/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-union-finite/source.jibbnew file+45

This diff is too big to show here.

tests/golden/types-union-finite/tokens.txtnew file+238

This diff is too big to show here.

tests/golden/types-union-finite/tree.txtnew file+110

This diff is too big to show here.

tests/golden/types-union-finite/types.txtnew file+17

This diff is too big to show here.

tests/golden/types-union-import/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-import/module-trees.txtnew file+8

This diff is too big to show here.

tests/golden/types-union-import/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-union-import/modules/ui/lib.jibbnew file+3

This diff is too big to show here.

tests/golden/types-union-import/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-union-import/tokens.txtnew file+13

This diff is too big to show here.

tests/golden/types-union-import/tree.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-import/types.txtnew file+2

This diff is too big to show here.

tests/golden/types-union-local-pending/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-local-pending/source.jibbnew file+3

This diff is too big to show here.

tests/golden/types-union-local-pending/tokens.txtnew file+10

This diff is too big to show here.

tests/golden/types-union-local-pending/tree.txtnew file+5

This diff is too big to show here.

tests/golden/types-union-local-pending/types.txtnew file+2

This diff is too big to show here.

tests/golden/types-union-overlap-nested/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-overlap-nested/source.jibbnew file+4

This diff is too big to show here.

tests/golden/types-union-overlap-nested/tokens.txtnew file+21

This diff is too big to show here.

tests/golden/types-union-overlap-nested/tree.txtnew file+7

This diff is too big to show here.

tests/golden/types-union-overlap-nested/types.txtnew file+9

This diff is too big to show here.

tests/golden/types-union-overlap/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-overlap/source.jibbnew file+4

This diff is too big to show here.

tests/golden/types-union-overlap/tokens.txtnew file+15

This diff is too big to show here.

tests/golden/types-union-overlap/tree.txtnew file+5

This diff is too big to show here.

tests/golden/types-union-overlap/types.txtnew file+9

This diff is too big to show here.

tests/golden/types-union-pattern-result-context/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-pattern-result-context/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-union-pattern-result-context/source.jibbnew file+25

This diff is too big to show here.

tests/golden/types-union-pattern-result-context/tokens.txtnew file+205

This diff is too big to show here.

tests/golden/types-union-pattern-result-context/tree.txtnew file+96

This diff is too big to show here.

tests/golden/types-union-pattern-result-context/types.txtnew file+13

This diff is too big to show here.

tests/golden/types-union-pattern-result-controls/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-pattern-result-controls/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-union-pattern-result-controls/source.jibbnew file+55

This diff is too big to show here.

tests/golden/types-union-pattern-result-controls/tokens.txtnew file+357

This diff is too big to show here.

tests/golden/types-union-pattern-result-controls/tree.txtnew file+161

This diff is too big to show here.

tests/golden/types-union-pattern-result-controls/types.txtnew file+30

This diff is too big to show here.

tests/golden/types-union-patterns-generic/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-patterns-generic/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-union-patterns-generic/source.jibbnew file+36

This diff is too big to show here.

tests/golden/types-union-patterns-generic/tokens.txtnew file+255

This diff is too big to show here.

tests/golden/types-union-patterns-generic/tree.txtnew file+117

This diff is too big to show here.

tests/golden/types-union-patterns-generic/types.txtnew file+13

This diff is too big to show here.

tests/golden/types-union-patterns-import/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-patterns-import/module-trees.txtnew file+8

This diff is too big to show here.

tests/golden/types-union-patterns-import/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-union-patterns-import/modules/ui/lib.jibbnew file+3

This diff is too big to show here.

tests/golden/types-union-patterns-import/source.jibbnew file+5

This diff is too big to show here.

tests/golden/types-union-patterns-import/tokens.txtnew file+28

This diff is too big to show here.

tests/golden/types-union-patterns-import/tree.txtnew file+12

This diff is too big to show here.

tests/golden/types-union-patterns-import/types.txtnew file+2

This diff is too big to show here.

tests/golden/types-union-patterns/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-patterns/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-union-patterns/source.jibbnew file+74

This diff is too big to show here.

tests/golden/types-union-patterns/tokens.txtnew file+336

This diff is too big to show here.

tests/golden/types-union-patterns/tree.txtnew file+152

This diff is too big to show here.

tests/golden/types-union-patterns/types.txtnew file+25

This diff is too big to show here.

tests/golden/types-union-phantom-generic/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-phantom-generic/source.jibbnew file+4

This diff is too big to show here.

tests/golden/types-union-phantom-generic/tokens.txtnew file+21

This diff is too big to show here.

tests/golden/types-union-phantom-generic/tree.txtnew file+8

This diff is too big to show here.

tests/golden/types-union-phantom-generic/types.txtnew file+3

This diff is too big to show here.

tests/golden/types-union-print-cross-namespace/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-print-cross-namespace/module-trees.txtnew file+6

This diff is too big to show here.

tests/golden/types-union-print-cross-namespace/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-union-print-cross-namespace/modules/ui/lib.jibbnew file+4

This diff is too big to show here.

tests/golden/types-union-print-cross-namespace/source.jibbnew file+3

This diff is too big to show here.

tests/golden/types-union-print-cross-namespace/tokens.txtnew file+22

This diff is too big to show here.

tests/golden/types-union-print-cross-namespace/tree.txtnew file+9

This diff is too big to show here.

tests/golden/types-union-print-cross-namespace/types.txtnew file+3

This diff is too big to show here.

tests/golden/types-union-print-distinct/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-print-distinct/module-trees.txtnew file+12

This diff is too big to show here.

tests/golden/types-union-print-distinct/modules.txtnew file+3

This diff is too big to show here.

tests/golden/types-union-print-distinct/modules/ui/left.jibbnew file+3

This diff is too big to show here.

tests/golden/types-union-print-distinct/modules/ui/right.jibbnew file+3

This diff is too big to show here.

tests/golden/types-union-print-distinct/modules/ui/twin.jibbnew file+3

This diff is too big to show here.

tests/golden/types-union-print-distinct/source.jibbnew file+11

This diff is too big to show here.

tests/golden/types-union-print-distinct/tokens.txtnew file+87

This diff is too big to show here.

tests/golden/types-union-print-distinct/tree.txtnew file+34

This diff is too big to show here.

tests/golden/types-union-print-distinct/types.txtnew file+9

This diff is too big to show here.

tests/golden/types-union-print-escape/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-print-escape/source.jibbnew file+5

This diff is too big to show here.

tests/golden/types-union-print-escape/tokens.txtnew file+20

This diff is too big to show here.

tests/golden/types-union-print-escape/tree.txtnew file+8

This diff is too big to show here.

tests/golden/types-union-print-escape/types.txtnew file+2

This diff is too big to show here.

tests/golden/types-union-print-local/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-print-local/source.jibbnew file+6

This diff is too big to show here.

tests/golden/types-union-print-local/tokens.txtnew file+28

This diff is too big to show here.

tests/golden/types-union-print-local/tree.txtnew file+12

This diff is too big to show here.

tests/golden/types-union-print-local/types.txtnew file+5

This diff is too big to show here.

tests/golden/types-union-print-nested/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-print-nested/source.jibbnew file+7

This diff is too big to show here.

tests/golden/types-union-print-nested/tokens.txtnew file+42

This diff is too big to show here.

tests/golden/types-union-print-nested/tree.txtnew file+17

This diff is too big to show here.

tests/golden/types-union-print-nested/types.txtnew file+6

This diff is too big to show here.

tests/golden/types-union-print-same-origin/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-print-same-origin/module-trees.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-print-same-origin/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-union-print-same-origin/modules/ui/shared.jibbnew file+3

This diff is too big to show here.

tests/golden/types-union-print-same-origin/source.jibbnew file+5

This diff is too big to show here.

tests/golden/types-union-print-same-origin/tokens.txtnew file+35

This diff is too big to show here.

tests/golden/types-union-print-same-origin/tree.txtnew file+12

This diff is too big to show here.

tests/golden/types-union-print-same-origin/types.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-print-transitive/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-print-transitive/module-trees.txtnew file+8

This diff is too big to show here.

tests/golden/types-union-print-transitive/modules.txtnew file+2

This diff is too big to show here.

tests/golden/types-union-print-transitive/modules/ui/base.jibbnew file+3

This diff is too big to show here.

tests/golden/types-union-print-transitive/modules/ui/mid.jibbnew file+2

This diff is too big to show here.

tests/golden/types-union-print-transitive/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-union-print-transitive/tokens.txtnew file+15

This diff is too big to show here.

tests/golden/types-union-print-transitive/tree.txtnew file+6

This diff is too big to show here.

tests/golden/types-union-print-transitive/types.txtnew file+2

This diff is too big to show here.

tests/golden/types-union-singleton/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-singleton/source.jibbnew file+16

This diff is too big to show here.

tests/golden/types-union-singleton/tokens.txtnew file+130

This diff is too big to show here.

tests/golden/types-union-singleton/tree.txtnew file+53

This diff is too big to show here.

tests/golden/types-union-singleton/types.txtnew file+33

This diff is too big to show here.

tests/golden/types-union-tag-atoms/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-tag-atoms/source.jibbnew file+5

This diff is too big to show here.

tests/golden/types-union-tag-atoms/tokens.txtnew file+30

This diff is too big to show here.

tests/golden/types-union-tag-atoms/tree.txtnew file+11

This diff is too big to show here.

tests/golden/types-union-tag-atoms/types.txtnew file+12

This diff is too big to show here.

tests/golden/types-union-tags/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-tags/source.jibbnew file+6

This diff is too big to show here.

tests/golden/types-union-tags/tokens.txtnew file+34

This diff is too big to show here.

tests/golden/types-union-tags/tree.txtnew file+15

This diff is too big to show here.

tests/golden/types-union-tags/types.txtnew file+11

This diff is too big to show here.

tests/golden/types-union-unresolved-flow/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-unresolved-flow/source.jibbnew file+7

This diff is too big to show here.

tests/golden/types-union-unresolved-flow/tokens.txtnew file+31

This diff is too big to show here.

tests/golden/types-union-unresolved-flow/tree.txtnew file+12

This diff is too big to show here.

tests/golden/types-union-unresolved-flow/types.txtnew file+6

This diff is too big to show here.

tests/golden/types-union-unresolved/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-unresolved/source.jibbnew file+1

This diff is too big to show here.

tests/golden/types-union-unresolved/tokens.txtnew file+4

This diff is too big to show here.

tests/golden/types-union-unresolved/tree.txtnew file+2

This diff is too big to show here.

tests/golden/types-union-unresolved/types.txtnew file+2

This diff is too big to show here.

tests/golden/types-unit-construction/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-unit-construction/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-unit-construction/source.jibbnew file+29

This diff is too big to show here.

tests/golden/types-unit-construction/tokens.txtnew file+168

This diff is too big to show here.

tests/golden/types-unit-construction/tree.txtnew file+71

This diff is too big to show here.

tests/golden/types-unit-construction/types.txtnew file+32

This diff is too big to show here.

tests/golden/types-unit-context/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-unit-context/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-unit-context/source.jibbnew file+46

This diff is too big to show here.

tests/golden/types-unit-context/tokens.txtnew file+489

This diff is too big to show here.

tests/golden/types-unit-context/tree.txtnew file+220

This diff is too big to show here.

tests/golden/types-unit-context/types.txtnew file+95

This diff is too big to show here.

tests/golden/types-unit-patterns/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-unit-patterns/source.jibbnew file+36

This diff is too big to show here.

tests/golden/types-unit-patterns/tokens.txtnew file+180

This diff is too big to show here.

tests/golden/types-unit-patterns/tree.txtnew file+88

This diff is too big to show here.

tests/golden/types-unit-patterns/types.txtnew file+13

This diff is too big to show here.

tests/golden/types-value-cycle-shadow/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-value-cycle-shadow/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-value-cycle-shadow/source.jibbnew file+6

This diff is too big to show here.

tests/golden/types-value-cycle-shadow/tokens.txtnew file+68

This diff is too big to show here.

tests/golden/types-value-cycle-shadow/tree.txtnew file+32

This diff is too big to show here.

tests/golden/types-value-cycle-shadow/types.txtnew file+7

This diff is too big to show here.

tests/golden/types-value-cycle-unsupported/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-value-cycle-unsupported/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-value-cycle-unsupported/source.jibbnew file+11

This diff is too big to show here.

tests/golden/types-value-cycle-unsupported/tokens.txtnew file+45

This diff is too big to show here.

tests/golden/types-value-cycle-unsupported/tree.txtnew file+17

This diff is too big to show here.

tests/golden/types-value-cycle-unsupported/types.txtnew file+8

This diff is too big to show here.

tests/golden/types-value-cycles/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-value-cycles/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-value-cycles/source.jibbnew file+13

This diff is too big to show here.

tests/golden/types-value-cycles/tokens.txtnew file+87

This diff is too big to show here.

tests/golden/types-value-cycles/tree.txtnew file+39

This diff is too big to show here.

tests/golden/types-value-cycles/types.txtnew file+44

This diff is too big to show here.

tests/importer/about.txt+20−4

This diff is too big to show here.

tests/importer/ford.txt+3

This diff is too big to show here.

tests/importer/origin-transitive.txt+3

This diff is too big to show here.

tests/importer/shadow-static.txt+7

This diff is too big to show here.

tests/importer/small.txt+70

This diff is too big to show here.

tests/importer/tree.txt+97−5

This diff is too big to show here.

tests/lib/jibb-api-paths.hoonnew file+104

This diff is too big to show here.

tests/lib/jibb-bridge.hoon+76−2

This diff is too big to show here.

tests/lib/jibb-import-diagnostic.hoonnew file+59

This diff is too big to show here.

tests/lib/jibb-mark-bridge.hoon+1−1

This diff is too big to show here.

tests/lib/jibb-module-scope.hoon+85−1

This diff is too big to show here.

tests/lib/jibb-poke-bridge.hoonnew file+88

This diff is too big to show here.

tests/lib/jibb-tlon-bridge.hoonnew file+29

This diff is too big to show here.

tests/lib/jibb.hoon+1214−367

This diff is too big to show here.

tests/type-api-paths/about.txtnew file+3

This diff is too big to show here.

tests/type-api-paths/api.txtnew file+13

This diff is too big to show here.

tests/type-api-paths/expected.txtnew file+18

This diff is too big to show here.

tests/type-api-paths/missing-decl.txtnew file+12

This diff is too big to show here.

tests/type-api-paths/poke-clash.txtnew file+12

This diff is too big to show here.

tests/type-api-paths/scry-bad.txtnew file+13

This diff is too big to show here.

tests/type-api-paths/scry.txtnew file+13

This diff is too big to show here.

tests/type-api-paths/todo-action.txtnew file+6

This diff is too big to show here.

tests/type-api-paths/todo-item.txtnew file+6

This diff is too big to show here.

tests/type-api-paths/todo-sur.txtnew file+12

This diff is too big to show here.

tests/type-api-paths/todo-update.txtnew file+6

This diff is too big to show here.

tests/type-api-paths/todos.txtnew file+6

This diff is too big to show here.

tests/type-api-paths/value-clash.txtnew file+15

This diff is too big to show here.

tests/type-import-diagnostic/about.txtnew file+15

This diff is too big to show here.

tests/type-import-diagnostic/expected.txtnew file+112

This diff is too big to show here.

tests/type-import-diagnostic/mark.txtnew file+5

This diff is too big to show here.

tests/type-import-diagnostic/nested.txtnew file+11

This diff is too big to show here.

tests/type-import-diagnostic/source.txtnew file+13

This diff is too big to show here.

tests/type-import-diagnostic/sur.txtnew file+5

This diff is too big to show here.

tests/type-import/about.txt+29−7

This diff is too big to show here.

tests/type-import/expected.txt+114−3

This diff is too big to show here.

tests/type-import/source.txt+69

This diff is too big to show here.

tests/type-import/sur.txt+18−1

This diff is too big to show here.

tests/type-mark/about.txt+2−1

This diff is too big to show here.

tests/type-mark/expected.txt+4

This diff is too big to show here.

tests/type-module-scope/about.txt+11

This diff is too big to show here.

tests/type-module-scope/expected.txt+57

This diff is too big to show here.

tests/type-poke/about.txtnew file+7

This diff is too big to show here.

tests/type-poke/alias.txtnew file+2

This diff is too big to show here.

tests/type-poke/api.txtnew file+2

This diff is too big to show here.

tests/type-poke/client.txtnew file+23

This diff is too big to show here.

tests/type-poke/direct.txtnew file+2

This diff is too big to show here.

tests/type-poke/expected.txtnew file+66

This diff is too big to show here.

tests/type-poke/exported.txtnew file+9

This diff is too big to show here.

tests/type-poke/fake.txtnew file+4

This diff is too big to show here.

tests/type-poke/impostor-client.txtnew file+2

This diff is too big to show here.

tests/type-poke/impostor.txtnew file+1

This diff is too big to show here.

tests/type-poke/inner.txtnew file+2

This diff is too big to show here.

tests/type-poke/mark.txtnew file+5

This diff is too big to show here.

tests/type-poke/public.txtnew file+2

This diff is too big to show here.

tests/type-poke/transitive.txtnew file+2

This diff is too big to show here.

tests/type-tlon/about.txtnew file+6

This diff is too big to show here.

tests/type-tlon/expected.txtnew file+6

This diff is too big to show here.

tests/type-tlon/source.txtnew file+6

This diff is too big to show here.

tools/clay-fixtures+52

This diff is too big to show here.

tools/golden+18−2

This diff is too big to show here.

tools/importer-test+1−1

This diff is too big to show here.

tools/ship+6−1

This diff is too big to show here.

tools/testdata/selftest+35−3

This diff is too big to show here.

tools/testdata/ship-selftest+4−1

This diff is too big to show here.

tools/type-api-paths-testnew file+52

This diff is too big to show here.

tools/type-import-diagnostic-testnew file+43

This diff is too big to show here.

tools/type-module-scope-test+10−1

This diff is too big to show here.

tools/type-poke-testnew file+50

This diff is too big to show here.

tools/type-tlon-testnew file+39

This diff is too big to show here.