on master help sign in
446 files changed+25798−6422
since splitsnapshots
unifiedsplit
README.md+1−1 docs/compiler.md+24−6 docs/development.md+12−2 docs/open-questions.md+7−1 docs/prelude-inventory.md+5−3 docs/prompts/milestone-2.md+2−2 docs/spec/decisions.md+3−2 docs/spec/grammar.md+3−2 docs/spec/overview.md+2−2 docs/status.md+33−8 jibb-dev/lib/jibb-import.hoon+444−16 jibb-dev/lib/jibb.hoon+1859−90 jibb-dev/lib/jibb/internal.jibb+6 jibb-dev/lib/jibb/prelude.jibb+56−48 tests/clay-fixtures/mark-update-import-expected.txt+1 tests/clay-fixtures/mark-update-import.txt+9 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/prelude-1c-structural/source.jibb+4−3 tests/golden/prelude-1c-structural/tokens.txt+453−446 tests/golden/prelude-1c-structural/tree.txt+168−165 tests/golden/prelude-3g-basic/source.jibb+4−3 tests/golden/prelude-3g-basic/tokens.txt+101−94 tests/golden/prelude-3g-basic/tree.txt+41−38 tests/golden/prelude-3g-like/source.jibb+4−3 tests/golden/prelude-3g-like/tokens.txt+339−332 tests/golden/prelude-3g-like/tree.txt+127−124 tests/golden/prelude-3g-structural/source.jibb+4−3 tests/golden/prelude-3g-structural/tokens.txt+290−283 tests/golden/prelude-3g-structural/tree.txt+107−104 tests/golden/prelude-list-helpers/source.jibb+4−3 tests/golden/prelude-list-helpers/tokens.txt+575−568 tests/golden/prelude-list-helpers/tree.txt+224−221 tests/golden/prelude-list-helpers/types.txt+1−1 tests/golden/prelude-list-unit/source.jibb+4−3 tests/golden/prelude-list-unit/tokens.txt+32−25 tests/golden/prelude-list-unit/tree.txt+13−10 tests/golden/prelude-unit-list-transforms/source.jibb+56−48 tests/golden/prelude-unit-list-transforms/tokens.txt+1764−1675 tests/golden/prelude-unit-list-transforms/tree.txt+773−740 tests/golden/prelude-unit-list-transforms/types.txt+9−8 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-union-errors/types.txt+3−3 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-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-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-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/types.txt+1−1 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-prelude-direct/about.txt+1−1 tests/golden/types-prelude-direct/source.jibb+1−1 tests/golden/types-prelude-direct/tokens.txt+11−11 tests/golden/types-prelude-direct/tree.txt+7−7 tests/golden/types-prelude-direct/types.txt+1−1 tests/golden/types-prelude-interface/about.txt+1−1 tests/golden/types-prelude-interface/source.jibb+1−1 tests/golden/types-prelude-interface/tokens.txt+11−11 tests/golden/types-prelude-interface/tree.txt+7−7 tests/golden/types-prelude-interface/types.txt+1−1 tests/golden/types-prelude-list-functions/about.txt+1−1 tests/golden/types-prelude-list-functions/module-trees.txt+7−1 tests/golden/types-prelude-list-functions/modules/ui/lib.jibb+1 tests/golden/types-prelude-list-functions/source.jibb+7 tests/golden/types-prelude-list-functions/tokens.txt+102−3 tests/golden/types-prelude-list-functions/tree.txt+48−1 tests/golden/types-prelude-list-functions/types.txt+13 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-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-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-gate/about.txt+1−1 tests/golden/types-recursive-gate/types.txt+3−3 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-branch-context/types.txt+4−4 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-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-tags/types.txt+3−3 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+2−2 tests/golden/types-unit-context/modules.txt+1 tests/golden/types-unit-context/source.jibb+44−68 tests/golden/types-unit-context/tokens.txt+458−343 tests/golden/types-unit-context/tree.txt+218−180 tests/golden/types-unit-context/types.txt+90−22 tests/golden/types-unit-patterns/types.txt+4−1 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+13−2 tests/importer/shadow-static.txt+4 tests/importer/small.txt+35 tests/importer/tree.txt+60−19 tests/lib/jibb-api-paths.hoon+104 tests/lib/jibb-bridge.hoon+41−1 tests/lib/jibb-import-diagnostic.hoon+59 tests/lib/jibb-module-scope.hoon+28−3 tests/lib/jibb-poke-bridge.hoon+88 tests/lib/jibb-tlon-bridge.hoon+29 tests/lib/jibb.hoon+921−606 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+13−2 tests/type-import/expected.txt+39−9 tests/type-import/source.txt+21 tests/type-import/sur.txt+3 tests/type-module-scope/expected.txt+17 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+13 tools/golden+12−2 tools/importer-test+1−1 tools/ship+3−2 tools/testdata/selftest+10−10 tools/testdata/ship-selftest+3−2 tools/type-api-paths-test+52 tools/type-import-diagnostic-test+43 tools/type-module-scope-test+2−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+24−6
@@ -56,29 +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, faced and unfaced cells, cell sample binders, known record field reads, a two-binder cell pattern, 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. Mutual groups, local recursive gates, polymorphic recursion and value cycles remain unsupported. 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. 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 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. The reporting path repeats inference of a recursive gate rather than instantiating its generalized interface inside its own body. This adds work, and the current dependency pass can take quadratic time on long forward chains; the milestone's speed target remains unverified. A separate conservative pass reports unions whose cases are provably disjoint or overlapping and leaves other cases unresolved; it does not claim the mold is checked. Unsupported forms are reported as such, and the partial output says the module has not been checked.
59+The inference fragment supports fixed auras, unrestricted `@`, one-way widening into it and toward aura-family ancestors, generic variables and gates, faced and unfaced cells, cell sample binders, known record field reads, a cell pattern of two or more binders, a complete two-arm loobean branch, a complete two-arm unit-shaped branch, closed local mold aliases and acyclic forward value references. For a supported single syntactic top-level recursive gate, the checker infers the sample first and uses that exact sample, including its field faces, in a monomorphic self placeholder. The completed body must unify with the placeholder before the gate is generalized; incompatible recursive arguments can report the call and argument sites. Uses of generalized top-level definitions instantiate their schemes independently. For a complete loobean branch with one direct self-call arm, the checker can infer the other arm independently and use its closed, fully resolved type to seed the recursive result; it then checks the whole body. Open or pending base types do not seed the result, and other branch shapes still depend on the existing partial inference. A supported single local recursive gate also uses a monomorphic self reference while its body is checked, then generalizes variables free of its enclosing environment; captured variables remain shared. Acyclic local value definitions can refer forward. The checker collects written capitals per `++` before inference, excluding nested definitions: a capital used in an enclosing definition is shared with its locals, even when written later, while a capital introduced only in a local definition is generalized there. Sibling locals can introduce independent capitals with the same spelling; generic mold parameters keep their own scope. Top-level groups of syntactic gates are inferred together with monomorphic placeholders and shared substitutions, then generalized only after the whole group checks; downstream uses and library interfaces instantiate those schemes independently. A dependency graph identifies groups with two iterative depth-first passes; its conservative local-reference edges can reject otherwise valid programs. Supported local mutually recursive gate groups also use shared monomorphic placeholders and generalize only after the group checks, preserving captured outer variables. 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.
60+
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.
62+
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.
64+
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.
6070
6171For 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.
6272
6373Multi-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.
6474
65−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. Faced or longer cells, uncontextualized construction, 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.
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.
6678
6779A 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.
6880
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+
6983A 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.
7084
71−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. The reader checks explicit Hoon `$%`, `$?` and `$^` unions against the Grammar’s disjointness rule, as @iko confirmed on 2026-10-30. 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, 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/clay-fixtures` also passes Clay-built `/sur` molds and mark samples through the Clay-built importer and partial checker.
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.
7286
7387Self-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.
7488
75−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. 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.
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.
7694
7795`+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.
7896
79−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` and `snoc`; unsupported entries, such as most list helpers, remain unavailable. The validated `list` is injected while the prelude’s gates are inferred; `weld` uses an ordinary explicit result cast. 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. Prelude imports, including the planned private internal module, are not supported by preparation. 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.
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.
8098
81−`+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, duplicate-name or import-bearing prelude sources fail closed. `+golden-types-with-prelude` remains the source-taking wrapper. 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.
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.
82100
83101And the design notes:
84102
docs/development.md+12−2
@@ -61,7 +61,12 @@ 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 |
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 |
6570| `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 |
@@ -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
@@ -104,7 +114,7 @@ A case is a folder `tests/golden/<name>/` holding:
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.
105115- 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.
106116
107−The runners prepare the trusted vendored prelude once for their generated test core and share its partial interface. Preparation reserves all names present in that source and supplies the molds and values the fragment can infer; an unsupported declaration remains reserved but unavailable. The source and the 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` accepts source directly; callers using `+golden-types-with-prepared-prelude` must pass the unchanged result of `+prepare-prelude`. Missing, malformed or conflicting source fails closed, and prelude imports are not supported yet.
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.
108118
109119A 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.
110120
docs/open-questions.md+7−1
@@ -18,7 +18,7 @@ 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), checking it against the doc's examples, and building the checker. The numbering is retained so existing references stay valid. Questions 3 and 18 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.
@@ -44,6 +44,12 @@ Found while writing [prompts/milestone-2.md](prompts/milestone-2.md), checking i
444422. **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.
454523. **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.
4646
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.
52+
4753## Grammar questions never put to the doc's author
4854
4955In milestone 1 the parser met about thirty places where the doc could be read more than one way. Twelve went to @iko on 2026-10-30 and are rows of the Decisions tab. These were not asked. For each, the parser follows the reading below, and some are marked "(doc question)" in the library's notes. None changes what a valid program means, except where a reading makes something an error.
docs/prelude-inventory.md+5−3
@@ -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 partial checker infers `fall` and `need`; the remaining written implementations have been parsed, but complete checker validation remains outstanding. Backend validation remains outstanding for all of 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| --- | --- | --- |
@@ -30,7 +32,7 @@ The following is an audit of the Hoon 135 bodies, not a completed Jibb interface
3032| `both` | Returns a unit of both values when both units are present. | Written |
3133| `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 |
35+| `drop` | Converts an absent unit to an empty list and a present unit to a singleton. | Written; inferred by the partial checker |
3436| `fall` | Returns the value of a present unit or the supplied fallback. | Written; inferred by the partial checker |
3537| `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 |
@@ -43,7 +45,7 @@ The following is an audit of the Hoon 135 bodies, not a completed Jibb interface
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`, `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` and `weld` using the validated prelude `list` mold; most other list helpers remain unsupported by that fragment. Backend validation remains outstanding for all of them.
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+2−2
@@ -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.
@@ -68,7 +68,7 @@ The rules are scattered across the tabs. This is a map of them, not a replacemen
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)
docs/spec/decisions.md+3−2
@@ -31,7 +31,8 @@ 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 |
@@ -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 |
docs/spec/grammar.md+3−2
@@ -129,7 +129,8 @@ A mold is only a type: never called on a noun, and with no default. Types are in
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+2−2
@@ -78,7 +78,7 @@ Unused molds are skipped, so unsupported constructs elsewhere in a `/sur` file a
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| --- | --- | --- |
@@ -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+33−8
@@ -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,9 +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, term singletons, 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, 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. 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. 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. 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, selected single self-recursive top-level 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. Mutual groups, local recursive gates, polymorphic recursion and value cycles remain unsupported. Reporting repeats inference for a recursive gate, so its performance cost remains unmeasured. 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. 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. Uncontextualized list construction, 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 local groups and 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.
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.
2323
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` and `snoc`. The validated standard `list` mold is injected when the prelude’s own gates are inferred; `weld` has an ordinary explicit result cast. 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.
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.
2525
2626## Milestone 1: parser and mark
2727
@@ -39,8 +39,8 @@ What the plan asks for, and where it is:
3939
4040Besides the plan's list:
4141
42−- 512 golden cases: 296 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 512-case corpus passed under `urbit eval` in 58.7 s. The fake ship passed all 517 tests, including the importer, importer/checker and mark/checker bridges, module scope and unification checks, with 29.3 s for sync and 33.5 s for tests. The importer golden compares 141 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.
4444- `tools/testdata/selftest` (22 checks) and `tools/testdata/ship-selftest` test the tools themselves.
4545- 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.
4646- 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).
@@ -88,24 +88,49 @@ Besides the plan's list:
8888| d782b45 | 2026-10-30 | Propagate list context and apply settled type decisions |
8989| c7082e0 | 2026-10-30 | Infer multi-argument calls |
9090| 918acbd | 2026-10-30 | Infer recursive gates from their samples first |
91−| This change | 2026-10-30 | Infer selected prelude list helpers |
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 |
92114
93115## Checking it
94116
95117On a machine set up as [development.md](development.md) says:
96118
97119```
98−tools/golden # 512 cases under urbit eval
120+tools/golden # 561 cases under urbit eval
99121tools/importer-test # the Hoon importer fixture projection
100122tools/type-import-test # the importer/checker bridge fixture
123+tools/type-tlon-test # the real Tlon reader/checker fixture
101124tools/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
102127tools/type-module-scope-test # module and prelude scope fixture
103128tools/hoon check-spans-test # prints <<>> when the span checker works
104129tools/testdata/selftest # the tools themselves
105130tools/doc-blocks docs/spec # the doc's examples are golden cases
106131tools/ship start
107132tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
108−tools/ship test # the same 512 cases as -test arms on the ship
133+tools/ship test # the same 561 cases as -test arms on the ship
109134tools/testdata/ship-selftest
110135tools/ship check-commit # |commit stores .jibb files
111136tools/clay-fixtures # example /sur files and marks build through Clay
jibb-dev/lib/jibb-import.hoon+444−16
@@ -24,9 +24,10 @@
2424:: the other fields are fixed atoms or collections of static atoms;
2525:: other source shapes fail closed.
2626::
27−:: The checker has a small bridge for successful unfaced atom and cell
28−:: results; it rejects other importer shapes. Failures return %|; no
29−:: 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.
3031::
3132|%
3233+$ imported
@@ -40,6 +41,12 @@
4041 [%apply name=term args=(list imported)]
4142 [%ref module=term name=term]
4243 [%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]
4350 ==
4451+$ signatures (list [name=term code=hoon])
4552+$ visiting (list [typ=type name=(unit term)])
@@ -70,6 +77,201 @@
7077 ^- (each imported @t)
7178 (read-with module name typ ~)
7279::
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+::
73275:: +read-mold-in: accept the /sur core as provenance. The core must be
74276:: built against zuse or validated Ford imports, and its selected arm
75277:: must be this type. Unknown subject shapes fail closed.
@@ -85,8 +287,12 @@
85287 ?. =(typ (~(play ut cor) (ream (cat 3 '*' name))))
86288 [%| 'Hoon module provenance does not match the selected mold']
87289 =/ result (read-with module name typ [~ cor])
88− ?. ?=([%& *] result) result
89− 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
90296::
91297:: +read-named is the source-aware entry point for callers that have
92298:: not selected a Hoon type yet. Check the core and the local arm
@@ -115,6 +321,40 @@
115321:: A mark door's payload is [sample build-subject]. Its outer sample
116322:: face names the door sample, not the imported mark type. Collection
117323:: 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+::
118358++ read-mark
119359 |= [name=term cor=type]
120360 ^- (each imported @t)
@@ -125,8 +365,48 @@
125365 =/ sample=type p.p.cor
126366 =/ raw=type ?:(?=([%face *] sample) q.sample sample)
127367 =/ result (read-with name name raw [~ q.p.cor])
128− ?. ?=([%& *] result) result
129− 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
130410::
131411++ read-with
132412 |= [module=term name=term typ=type context=(unit type)]
@@ -545,8 +825,8 @@
545825 ?. |(=(p.h [%dtwt [%$ (mul 2 axis)]]) (fits-union-at p.h axis))
546826 [%| 'a Hoon union needs a source-level disjointness check']
547827 ?. (disjoint a b)
548− ?: ?=([%fits *] p.h) [%| 'a Hoon union has overlapping cases']
549− [%| 'a Hoon $^ union has overlapping cases']
828+ ?: ?=([%fits *] p.h) [%| 'Hoon union disjointness could not be verified']
829+ [%| 'Hoon $^ union disjointness could not be verified']
550830 [%& [%fork (sort (weld (union-cases a) (union-cases b)) |=(pair=[imported imported] (dor -.pair +.pair)))]]
551831 ==
552832++ union-cases
@@ -621,6 +901,32 @@
621901 ?. (arm-map-valid +.chapter) ~
622902 [~ (arm-map-has +.chapter target)]
623903::
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+::
624930++ chapter-unsafe
625931 |= [chapter=* target=term]
626932 ^- ?
@@ -870,7 +1176,7 @@
8701176 =/ err (first-bads cases)
8711177 ?^ err [%bad u.err]
8721178 ?. (all-disjoint cases)
873− [%bad ?:(is-cell 'a Hoon $^ union has overlapping cases' 'a Hoon union has overlapping cases')]
1179+ [%bad ?:(is-cell 'Hoon $^ union disjointness could not be verified' 'Hoon union disjointness could not be verified')]
8741180 =/ rewritten=hoon original(q.p body(q.q.p args.u.split))
8751181 =/ attempt=(each type tang) (mule |.((~(play ut p.typ) rewritten)))
8761182 ?. ?=([%& *] attempt) [%bad unsupported]
@@ -891,10 +1197,10 @@
8911197 %void [%void ~]
8921198 [%atom *]
8931199 ?: |(=('s' (cut 3 [0 1] p.typ)) =('r' (cut 3 [0 1] p.typ)))
894− [%bad 'signed and float auras cannot be imported']
1200+ [%invalid %aura 'signed and float auras cannot be imported']
8951201 [%atom p.typ q.typ]
8961202 [%cell *] [%cell $(typ p.typ) $(typ q.typ)]
897− [%core *] [%bad 'cores and gates cannot be imported']
1203+ [%core *] [%invalid %core 'cores and gates cannot be imported']
8981204 [%face *]
8991205 ?@ p.typ [%face p.typ $(typ q.typ)]
9001206 [%bad 'a complex Hoon face needs translation']
@@ -903,7 +1209,7 @@
9031209 (turn ~(tap in:..zuse p.typ) |=(t=type ^$(typ t)))
9041210 =/ err (first-bads cases)
9051211 ?^ err [%bad u.err]
906− ?. (all-disjoint cases) [%bad 'a Hoon union has overlapping cases']
1212+ ?. (all-disjoint cases) [%bad 'Hoon union disjointness could not be verified']
9071213 [%fork (sort cases |=(pair=[imported imported] (dor -.pair +.pair)))]
9081214 [%hint *] $(typ q.typ)
9091215 [%hold *]
@@ -930,7 +1236,7 @@
9301236 ?~ origin [%bad 'a recursive Hoon mold needs unambiguous source provenance']
9311237 [%ref u.origin u.u.prior]
9321238 =/ nm (hold-name q.typ)
933− ?: =(nm [~ %vase]) [%bad 'vases cannot be imported']
1239+ ?: =(nm [~ %vase]) [%bad 'a Hoon type named vase needs source provenance']
9341240 ?: &((source-uses q.typ %jar) !(alias-safe context %jar))
9351241 [%bad 'Hoon collection provenance is unavailable or shadowed']
9361242 ?: &((source-uses q.typ %jug) !(alias-safe context %jug))
@@ -974,7 +1280,7 @@
9741280 ?^ err [%bad u.err]
9751281 ?: (disjoint first second)
9761282 [%fork (sort ~[first second] |=(pair=[imported imported] (dor -.pair +.pair)))]
977− [%bad 'a Hoon $^ union has overlapping cases']
1283+ [%bad 'Hoon $^ union disjointness could not be verified']
9781284 ?: |((has-cell-union q.typ) (has-fits-union q.typ))
9791285 =/ cannot=@t
9801286 ?: (has-fits-union q.typ) 'a Hoon union needs a source-level disjointness check'
@@ -1031,6 +1337,7 @@
10311337 [%atom *] ~
10321338 [%ref *] ~
10331339 [%bad *] [~ reason.out]
1340+ [%invalid *] [~ reason.out]
10341341 [%face *] $(out body.out)
10351342 [%cell *]
10361343 =/ err $(out head.out)
@@ -1047,6 +1354,34 @@
10471354 =/ err (first-bad i.xs)
10481355 ?~ err $(xs t.xs)
10491356 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+::
10501385:: +fixture-test: shared golden expectations for eval and the ship.
10511386:: A synthetic hold whose first $^ branch cannot be evaluated. It tests
10521387:: that a failed branch probe is reported rather than crashing the host.
@@ -1142,7 +1477,7 @@
11421477 [%fork ~[[%cell [%face %x [%atom %ud ~]] [%face %y [%atom %ud ~]]] [%atom %ud ~]]]
11431478 =/ errors ?: =((sample %valid-cell) [%& expect-valid]) errors
11441479 ['disjoint cell union' errors]
1145− =/ errors ?: =((sample %invalid-cell) [%| 'a Hoon $^ union has overlapping cases']) errors
1480+ =/ errors ?: =((sample %invalid-cell) [%| 'Hoon $^ union disjointness could not be verified']) errors
11461481 ['overlapping cell union is rejected' errors]
11471482 =/ errors ?: =((shad %mn) [%| 'Hoon collection provenance is unavailable or shadowed']) errors
11481483 ['local mop shadow in a field is rejected' errors]
@@ -1186,6 +1521,7 @@
11861521 [%apply *] "({(trip name.out)} {(show-imports args.out)})"
11871522 [%ref *] "{(trip name.out)}.{(trip module.out)}"
11881523 [%bad *] "error: {(trip reason.out)}"
1524+ [%invalid *] "error: {(trip reason.out)}"
11891525 ==
11901526::
11911527++ show-imports
@@ -1203,6 +1539,15 @@
12031539 [%| *] "error: {(trip p.result)}"
12041540 ==
12051541::
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+::
12061551:: Clay includes debug spans around source nodes. Reproduce that
12071552:: shape without Clay so the same regression runs under eval and -test.
12081553++ decorate-union-source
@@ -1226,6 +1571,24 @@
12261571 =/ source=hoon original(q.p (decorate-union-source q.p.original))
12271572 (read-mold %small name typ(q source))
12281573::
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+::
12291592:: Synthetic nodes test each part of the direct collection-call proof.
12301593++ collection-wrapper-fixture
12311594 ^- tape
@@ -1271,6 +1634,23 @@
12711634 =/ mark-rec-core=type -:(ride fp mark-rec)
12721635 =/ mark-gate-core=type -:(ride -:!>(..zuse) mark-gate)
12731636 =/ 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)
12741654 =/ mark-shadow-core=type -:(ride sp mark-basic)
12751655 =/ tshp=type [%cell [%face %intermediate shc] -:!>(..zuse)]
12761656 =/ tshc=type -:(ride tshp only-list)
@@ -1281,6 +1661,13 @@
12811661 =/ distinct=type -:(ride distinct-parent origin-first)
12821662 =/ trans-amb-parent=type [%cell [%face %intermediate fc] [%cell [%face %second sc] -:!>(..zuse)]]
12831663 =/ 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)
12841671 =/ sample
12851672 |= name=term
12861673 (read-mold-in %small name (~(play ut sc) (ream (cat 3 '*' name))) sc)
@@ -1318,6 +1705,15 @@
13181705 (crip "nested-static-mop: {(show-result (sample %nested-static-mop))}")
13191706 (crip "collection-siblings: {(show-result (sample %collection-siblings))}")
13201707 (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")}")
13211717 (crip "mark-record: {(show-result (read-mark %todo-item mark-core))}")
13221718 (crip "mark-recursive: {(show-result (read-mark %recursive mark-rec-core))}")
13231719 (crip "mark-gate: {(show-result (read-mark %bad mark-gate-core))}")
@@ -1347,6 +1743,7 @@
13471743 (crip "gate: {(show-result (sample %gate-test))}")
13481744 (crip "vase: {(show-result vase)}")
13491745 (crip "failed-branch: {(show-result (read-mold %external %bad bad-branch-fixture))}")
1746+ (crip "debug-spec: {debug-spec-fixture}")
13501747 (crip "debug-union: {(show-result (debug-union-fixture sc %action))}")
13511748 (crip "debug-union-overlap: {(show-result (debug-union-fixture sc %explicit-wut-overlap))}")
13521749 (crip "debug-nested-cell: {(show-result (debug-union-fixture sc %nested-valid-cell))}")
@@ -1430,9 +1827,40 @@
14301827 (crip "named-missing: {(show-result (read-named %small %missing sc))}")
14311828 (crip "named-invalid-core: {(show-result (read-named %small %items [%atom %ud ~]))}")
14321829 (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)}")
14331838 (crip "missing-arm: {(show-result (read-mold-in %small %missing [%atom %ud ~] sc))}")
14341839 (crip "wrong-provenance: {(show-result (read-mold-in %small %action (~(play ut sc) (ream '*items')) sc))}")
14351840 (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))}")
14361864 (crip "presence-topic: {(show-result (present %topic))}")
14371865 (crip "presence-timing: {(show-result (present %timing))}")
14381866 (crip "presence-places: {(show-result (present %places))}")
jibb-dev/lib/jibb.hoon+1859−90
@@ -4608,6 +4608,7 @@
46084608 [%atom aura=@ta]
46094609 [%any-atom ~]
46104610 [%flag ~]
4611+ [%noun ~]
46114612 [%tag id=@ud literal=lit constructor=?]
46124613 [%const literal=lit]
46134614 [%collection name=term args=(list itype)]
@@ -4661,6 +4662,7 @@
46614662 %atom |
46624663 %any-atom |
46634664 %flag |
4665+ %noun |
46644666 %tag =(n id.t)
46654667 %const |
46664668 %union |((lien cases.t |=(c=itype (itype-occurs n c sub))) (lien args.t |=(c=itype (itype-occurs n c sub))))
@@ -4757,6 +4759,7 @@
47574759 %atom |
47584760 %any-atom &
47594761 %flag |
4762+ %noun |
47604763 %tag |
47614764 %const |
47624765 %union |((lien cases.t |=(c=itype (itype-has-any-atom c sub))) (lien args.t |=(c=itype (itype-has-any-atom c sub))))
@@ -4827,6 +4830,7 @@
48274830 %atom &
48284831 %any-atom &
48294832 %flag &
4833+ %noun |
48304834 %tag &
48314835 %const &
48324836 %union |((lien cases.typ |=(c=itype (itype-has-fixed-atom c))) (lien args.typ |=(c=itype (itype-has-fixed-atom c))))
@@ -4916,6 +4920,7 @@
49164920 %cell &
49174921 %union &
49184922 %recursive &
4923+ %noun &
49194924 %collection &
49204925 %face $(t body.t)
49214926 %fn |($(t sample.t) $(t product.t))
@@ -5055,6 +5060,15 @@
50555060 =. actual (itype-walk actual sub)
50565061 =. expected (itype-walk expected sub)
50575062 ?: =(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 ~]
50585072 ?: &(?=(%recursive -.actual) ?=(%recursive -.expected))
50595073 ?:(&(=(module.actual module.expected) =(name.actual name.expected)) [%ok sub next] [%bad ~])
50605074 ?: &(|(?=(%recursive -.actual) ?=(%recursive -.expected)) !|(?=(%var -.actual) ?=(%var -.expected))) [%unknown ~]
@@ -5066,6 +5080,10 @@
50665080 =/ unified=(unit isub) (itype-unify-args args.actual args.expected sub)
50675081 ?^ unified [%ok u.unified next]
50685082 [%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)
50695087 ?: ?=(%union -.actual) [%unknown ~]
50705088 ?: &(?=(%union -.expected) |(?=(%avar -.actual) ?=(%nvar -.actual))) [%unknown ~]
50715089 ?: &(?=(%union -.expected) !?=(%var -.actual))
@@ -5084,6 +5102,10 @@
50845102 =/ trial=ifit (itype-fit-ctor-cases literal.actual sample.expected cases sub next)
50855103 ?. ?=(%ok -.trial) trial
50865104 [%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 ~]
50875109 ?: ?=(%const -.expected)
50885110 ?:(=(val.literal.actual val.literal.expected) [%ok [[id.actual expected] sub] next] [%bad ~])
50895111 ?: ?=(%atom -.expected)
@@ -5101,6 +5123,8 @@
51015123 [%ok u.u next]
51025124 ?: |(?=(%avar -.expected) ?=(%nvar -.expected)) [%unknown ~]
51035125 ?: ?=(%face -.expected) $(expected body.expected)
5126+ ?: &(?=(%collection -.expected) =(%list name.expected) =(0 val.literal.actual))
5127+ [%unknown ~]
51045128 ?: ?=(%const -.expected)
51055129 ?:(=(val.literal.actual val.literal.expected) [%ok sub next] [%bad ~])
51065130 ?: ?=(%atom -.expected)
@@ -5226,13 +5250,14 @@
52265250 problems
52275251::
52285252:: The expression inference below is deliberately a fragment: bindings,
5229−:: simple gates, calls, fixed-aura literals, and plain strings. The
5253+:: simple gates, calls, fixed-aura literals, and some interpolated strings. The
52305254:: result for unsupported syntax is a diagnostic, never a checked module.
52315255::
52325256+$ ischeme [typ=itype vars=(list @ud)]
52335257+$ ienv (list [name=term scheme=ischeme])
52345258+$ imold-types (list [name=term template=ischeme])
5235−+$ ifile [values=ienv molds=imold-types at=path]
5259++$ iderived [name=term agent=term mark=term]
5260++$ ifile [values=ienv molds=imold-types at=path derived=(list iderived)]
52365261+$ ijimports (list [face=term interface=ifile])
52375262+$ icap [name=@t id=@ud at=span]
52385263+$ icaps (list icap)
@@ -5278,6 +5303,8 @@
52785303:: generalize an aura from its sample, which requires constraint analysis
52795304:: beyond this fragment; leave those cases unresolved.
52805305::
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.
52815308++ itype-has-gate
52825309 |= t=itype
52835310 ^- ?
@@ -5296,6 +5323,7 @@
52965323 %atom |
52975324 %any-atom |
52985325 %flag |
5326+ %noun |
52995327 ==
53005328::
53015329++ default-decimals
@@ -5320,6 +5348,7 @@
53205348 %atom ~
53215349 %any-atom ~
53225350 %flag ~
5351+ %noun ~
53235352 %tag ~
53245353 %const ~
53255354 %union (zing (turn (weld args.t cases.t) |=(c=itype (itype-vars c))))
@@ -5358,6 +5387,7 @@
53585387 %atom t
53595388 %any-atom t
53605389 %flag t
5390+ %noun t
53615391 %tag t
53625392 %const t
53635393 %union [%union (turn cases.t |=(c=itype (itype-rename c ren))) origin.t label.t (turn args.t |=(c=itype (itype-rename c ren)))]
@@ -5381,6 +5411,7 @@
53815411 %atom |
53825412 %any-atom |
53835413 %flag |
5414+ %noun |
53845415 %tag |
53855416 %const |
53865417 %union |((lien cases.t |=(c=itype (itype-var-is-atom n c))) (lien args.t |=(c=itype (itype-var-is-atom n c))))
@@ -5572,7 +5603,19 @@
55725603 ^- (unit itype)
55735604 ?@ node ~
55745605 ?+ -.node ~
5606+ %noun ?:(=(node [%noun ~]) `[%noun ~] ~)
55755607 %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 '~']]
55765619 ?: ?=([%atom %tas [~ @]] node)
55775620 =/ value=@ +>+.node
55785621 ?. |(=(value 0) (jibb-face-name value)) ~
@@ -5595,10 +5638,15 @@
55955638 ?. =(arity (lent u.args)) ~
55965639 `[%collection name u.args]
55975640 %fork
5598− =/ cases=(unit (list itype)) (import-to-itypes +.node)
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)
55995646 ?~ cases ~
56005647 ?~ u.cases ~
56015648 ?~ t.u.cases ~
5649+ ?: (import-has-loobean-singleton u.cases) ~
56025650 ?. (import-cases-disjoint u.cases) ~
56035651 `[%union u.cases ~ ~ ~]
56045652 %face
@@ -5617,6 +5665,20 @@
56175665 `[%cell u.left u.right]
56185666 ==
56195667::
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+::
56205682++ import-to-itypes
56215683 |= nodes=*
56225684 ^- (unit (list itype))
@@ -5631,7 +5693,9 @@
56315693 |= typ=itype
56325694 ^- upat
56335695 ?- -.typ
5696+ %noun [%all ~]
56345697 %atom [%atom ~]
5698+ %flag [%or ~[[%atom `0] [%atom `1]]]
56355699 %const [%atom `val.literal.typ]
56365700 %face $(typ body.typ)
56375701 %cell [%cell $(typ hed.typ) $(typ tal.typ)]
@@ -5726,25 +5790,41 @@
57265790 ?:(=(`origin origin.typ.template) `name.i.molds $(molds t.molds))
57275791 $(molds t.molds)
57285792::
5729−:: Only names exported by this directly imported module are visible through
5730−:: its face. Other origins retain identity but print as unnamed unions.
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.
57315807::
57325808++ itype-in-import
5733− |= [t=itype iface=ifile face=term]
5809+ |= [t=itype iface=ifile face=term prelude=(unit ifile)]
57345810 ^- itype
57355811 ?- -.t
57365812 %union
57375813 =/ label=(unit @t)
57385814 ?~ origin.t ~
57395815 ?: =(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
57405820 =/ alias=(unit term) ~
57415821 =? alias &(=(at.u.origin.t at.iface) ?=(^ (find-jibb-mold name.u.origin.t iface))) `name.u.origin.t
57425822 =? alias ?=(~ alias) (imported-union-alias u.origin.t molds.iface)
57435823 ?~ alias ~
57445824 `(crip "{(trip u.alias)}.{(trip face)}")
5745− [%union (turn cases.t |=(c=itype (itype-in-import c iface face))) origin.t label (turn args.t |=(c=itype (itype-in-import c iface 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)))]
57465826 %recursive [%recursive module.t name.t ~]
5747− %collection [%collection name.t (turn args.t |=(c=itype (itype-in-import c iface face)))]
5827+ %collection [%collection name.t (turn args.t |=(c=itype (itype-in-import c iface face prelude)))]
57485828 %face [%face name.t $(t body.t)]
57495829 %fn [%fn $(t sample.t) $(t product.t)]
57505830 %cell [%cell $(t hed.t) $(t tal.t)]
@@ -5839,6 +5919,103 @@
58395919 ?: ?=(^ (itype-vars typ.u.out)) ~
58405920 `[[typ.u.out ~] state.u.out(params params.state, in-mold in-mold.state)]
58415921::
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+::
58426019++ infer-simple-shape
58436020 |= [sh=shape state=istate]
58446021 ^- (unit [typ=itype state=istate])
@@ -5847,6 +6024,7 @@
58476024 ?: =(0 aura.sh) `[[%any-atom ~] state]
58486025 `[[%atom aura.sh] state]
58496026 %flag `[[%flag ~] state]
6027+ %noun `[[%noun ~] state]
58506028 %const
58516029 ?. |(=(%term form.lit.sh) =(%null form.lit.sh)) ~
58526030 `[[%const lit.sh] state]
@@ -5873,7 +6051,7 @@
58736051 =/ found=(unit ischeme) (find-jibb-mold n u.iface)
58746052 ?~ found ~
58756053 ?^ vars.u.found ~
5876− `[(itype-in-import typ.u.found u.iface i.t.names.sh) state]
6054+ `[(itype-in-import typ.u.found u.iface i.t.names.sh prelude.state) state]
58776055 =/ found=(unit itype)
58786056 (find-imported-mold i.t.names.sh n externals.state surs.state)
58796057 ?~ found ~
@@ -5910,7 +6088,7 @@
59106088 ?~ vars.u.template ~
59116089 =/ applied=(unit itype) (template-apply u.template types.u.args)
59126090 ?~ applied ~
5913− `[(itype-in-import u.applied u.iface i.t.ref.sh) state.u.args]
6091+ `[(itype-in-import u.applied u.iface i.t.ref.sh prelude.state.u.args) state.u.args]
59146092 ?: (lien active.state.u.args |=(x=term =(x n))) ~
59156093 =/ found=(unit shape) (find-simple-mold n molds.state.u.args)
59166094 ?~ found
@@ -6016,8 +6194,8 @@
60166194 [%& [%cell ht typ.p.tail] env.p.tail state.p.tail]
60176195::
60186196:: Local definitions generalize only variables outside their enclosing
6019−:: environment and explicit-capital scope. Unresolved groups stay
6020−:: 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.
60216199::
60226200+$ ilocal-result (each [env=ienv state=istate] idiag)
60236201++ free-env-vars
@@ -6086,6 +6264,145 @@
60866264 ?~ inferred |
60876265 $(locals t.locals)
60886266::
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+::
60896406++ infer-local-defs
60906407 |= [ds=(list def) env=ienv state=istate]
60916408 ^- ilocal-result
@@ -6094,22 +6411,58 @@
60946411 |-
60956412 ?~ ds
60966413 ?~ remaining [%& env state]
6097− ?. 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 |)
60986421 $(ds (flop remaining), remaining ~, progressed |)
60996422 =/ d=def i.ds
61006423 ?> ?=(%value -.d)
6101− =/ 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)
61026428 ?: ?=(%| -.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" ~]]
61036435 =/ typ=itype (itype-normalize typ.p.inferred sub.state.p.inferred)
61046436 ?: |((pending-tags tags.state.p.inferred sub.state.p.inferred) (itype-has-tag typ))
61056437 $(ds t.ds, remaining [d remaining])
61066438 ?: (unsupported-atom-vars typ caps.state.p.inferred binders.state.p.inferred sub.state.p.inferred)
61076439 $(ds t.ds, remaining [d remaining])
61086440 =/ free=(list @ud)
6109− (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))
61106442 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
61116443 =. vars (skim vars |=(n=@ud !(lien free |=(f=@ud =(f n)))))
6112− $(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]
61136466::
61146467:: Read only fields of a known record. Unresolved field constraints and
61156468:: ambiguous repeated faces are outside this fragment. Imported record
@@ -6181,6 +6534,9 @@
61816534 [%| ["branch does not cover both loobeans" ~]]
61826535 =/ subject=iresult (infer-fragment subject.e env state)
61836536 ?: ?=(%| -.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" ~]]
61846540 =/ su=(unit isub) (itype-unify typ.p.subject [%flag ~] sub.state.p.subject)
61856541 ?~ su [%| ["loobean branch subject does not unify with ?" ~]]
61866542 =/ left=iresult $(e val.x, state state.p.subject(sub u.su))
@@ -6196,6 +6552,10 @@
61966552 [%| ["branch list constraint is not supported by partial inference" ~]]
61976553 [%| ["branch union constraint is not supported by partial inference" ~]]
61986554 ?: ?=(%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]
61996559 ?: &(?=(%collection -.expected) =(%list name.expected))
62006560 [%| ["branch arm does not fit its expected list" ~[[context "expected list"] [(span-of e) "branch arm"]]]]
62016561 [%| ["branch arm does not fit its expected union" ~[[context "expected union"] [(span-of e) "branch arm"]]]]
@@ -6262,23 +6622,37 @@
62626622 [%| ["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)]]]]
62636623 [%& target state.p.tail(sub sub.fit, next next.fit)]
62646624::
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+::
62656642++ infer-list-items
62666643 |= [items=(list expr) expected=itype env=ienv state=istate context=span]
62676644 ^- iresult
62686645 ?~ items [%& expected state]
62696646 =/ target=itype (itype-walk expected sub.state)
6270− =/ value=iresult
6271− ?: &(?=(%union -.target) (context-union-branch i.items))
6272− (infer-union-context i.items target env state context)
6273− ?: &(?=(%collection -.target) =(%list name.target) (context-union-branch i.items))
6274− (infer-union-context i.items target env state context)
6275− ?: &(?=(%collection -.target) =(%list name.target) (context-list-expression i.items))
6276− (infer-list-context i.items target env state context)
6277− (infer-fragment i.items env state)
6647+ =/ value=iresult (infer-call-context-arg i.items target env state context)
62786648 ?: ?=(%| -.value) value
62796649 =/ fit=ifit (itype-fit typ.p.value target sub.state.p.value next.state.p.value)
62806650 ?: ?=(%unknown -.fit) [%| ["list item constraint is not supported by partial inference" ~]]
62816651 ?: ?=(%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]
62826656 [%| ["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)]]]]
62836657 $(items t.items, state state.p.value(sub sub.fit, next next.fit))
62846658::
@@ -6426,6 +6800,433 @@
64266800 ?~ joined [%| ["unit branch results need unsupported inference" ~]]
64276801 [%& typ.p.left state.p.right(sub u.joined)]
64286802::
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+::
64297230++ infer-fragment
64307231 |= [e=expr env=ienv state=istate]
64317232 ^- iresult
@@ -6443,10 +7244,30 @@
64437244 %term [%& [%tag next.state lit.e |] state(next +(next.state), tags [[next.state lit.e] tags.state])]
64447245 %null [%& [%tag next.state lit.e |] state(next +(next.state), tags [[next.state lit.e] tags.state])]
64457246 ==
6446− %str
6447− =/ interpolated=? (lien pieces.e |=(p=piece ?=(%expr -.p)))
6448− ?: interpolated [%| ["interpolation is not supported by partial inference" ~]]
6449− [%& [%atom %t] state]
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)
64507271 %wing
64517272 ?~ names.e [%| ["empty wing" ~]]
64527273 ?^ t.names.e
@@ -6455,7 +7276,7 @@
64557276 ?~ iface (infer-field-wing names.e env state)
64567277 =/ member=(unit ischeme) (ienv-lookup i.names.e values.u.iface)
64577278 ?~ member [%| ["module member is not available to partial inference" ~]]
6458− =. typ.u.member (itype-in-import typ.u.member u.iface i.t.names.e)
7279+ =. typ.u.member (itype-in-import typ.u.member u.iface i.t.names.e prelude.state)
64597280 =/ instance=[typ=itype state=istate] (instantiate-scheme u.member state)
64607281 [%& typ.instance state.instance]
64617282 =/ scheme=(unit ischeme) (ienv-lookup i.names.e env)
@@ -6468,6 +7289,11 @@
64687289 =/ instance=[typ=itype state=istate] (instantiate-scheme u.scheme state)
64697290 [%& typ.instance state.instance]
64707291 %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 ~)
64717297 %ctor [%& [%tag next.state tag.e &] state(next +(next.state), tags [[next.state tag.e] tags.state])]
64727298 %trace
64737299 =/ traced=iresult $(e val.e)
@@ -6495,19 +7321,26 @@
64957321 %branch
64967322 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
64977323 ?~ t.arms.e (infer-cell-branch e env state)
6498− ?^ 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)
64997328 =/ x=arm i.arms.e
65007329 =/ y=arm i.t.arms.e
65017330 ?: |((unit-empty-pattern pat.x) (unit-empty-pattern pat.y))
65027331 (infer-unit-branch e env state ~)
6503− ?. ?=(%lit -.pat.x) [%| ["branch pattern is not supported by partial inference" ~]]
6504− ?. ?=(%lit -.pat.y) [%| ["branch pattern is not supported by partial inference" ~]]
7332+ ?. ?=(%lit -.pat.x) (infer-known-union-branch e env state)
7333+ ?. ?=(%lit -.pat.y) (infer-known-union-branch e env state)
65057334 ?. &(=(%loobean form.lit.pat.x) =(%loobean form.lit.pat.y))
6506− [%| ["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)
65077337 ?: =(val.lit.pat.x val.lit.pat.y)
65087338 [%| ["branch does not cover both loobeans" ~]]
65097339 =/ subject=iresult $(e subject.e)
65107340 ?: ?=(%| -.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" ~]]
65117344 =/ su=(unit isub) (itype-unify typ.p.subject [%flag ~] sub.state.p.subject)
65127345 ?~ su [%| ["loobean branch subject does not unify with ?" ~]]
65137346 =/ left=iresult $(e val.x, state state.p.subject(sub u.su))
@@ -6534,32 +7367,39 @@
65347367 [%& typ.p.left state.p.right(sub u.joined)]
65357368 %cast
65367369 =/ target=(unit [typ=itype state=istate]) (infer-simple-shape shape.e state)
6537− ?~ target [%| ["cast mold is not supported by partial inference" ~]]
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" ~]]
65387374 =/ value=iresult
6539− ?: &(?=(%union -.typ.u.target) (context-union-branch val.e))
6540− (infer-union-context val.e typ.u.target env state.u.target at.shape.e)
6541− ?: &(?=(%collection -.typ.u.target) =(%list name.typ.u.target) (context-union-branch val.e))
6542− (infer-union-context val.e typ.u.target env state.u.target at.shape.e)
6543− ?: &(?=(%collection -.typ.u.target) =(%list name.typ.u.target) (context-list-expression val.e))
6544− (infer-list-context val.e typ.u.target env state.u.target at.shape.e)
6545− $(e val.e, state state.u.target)
7375+ (infer-call-context-arg val.e typ.u.target env state.u.target at.shape.e)
65467376 ?: ?=(%| -.value) value
65477377 =/ fit=ifit (itype-fit typ.p.value typ.u.target sub.state.p.value next.state.p.value)
65487378 ?: ?=(%unknown -.fit) [%| ["cast constraint is not supported by partial inference" ~]]
65497379 ?: ?=(%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]
65507384 [%| ["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)]]]]
65517385 =/ merged=itype (itype-merge-faces typ.p.value typ.u.target sub.fit)
65527386 [%& merged state.p.value(sub sub.fit, next next.fit)]
65537387 %crash [%& [%var next.state] state(next +(next.state))]
65547388 %gate
65557389 =/ sam=isample-result (infer-sample sample.e env state)
6556− ?: ?=(%| -.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 ~]]
65577394 =/ body=iresult $(e body.e, env env.p.sam, state state.p.sam)
65587395 ?: ?=(%| -.body) body
65597396 [%& [%fn typ.p.sam typ.p.body] state.p.body]
65607397 %gate-wide
65617398 =/ sam=isample-result (infer-sample sample.e env state)
6562− ?: ?=(%| -.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 ~]]
65637403 =/ body=iresult $(e body.e, env env.p.sam, state state.p.sam)
65647404 ?: ?=(%| -.body) body
65657405 [%& [%fn typ.p.sam typ.p.body] state.p.body]
@@ -6573,12 +7413,8 @@
65737413 ?: ?=(%fn -.head-type)
65747414 (infer-call-context-args args.e sample.head-type env state.p.head (span-of head.e))
65757415 (infer-simple-items (turn args.e |=(a=expr [(span-of a) ~ a])) env state.p.head)
6576− ?: &(?=(%fn -.head-type) ?=(%union -.sample.head-type) (context-union-branch i.args.e))
6577− (infer-union-context i.args.e sample.head-type env state.p.head (span-of head.e))
6578− ?: &(?=(%fn -.head-type) ?=(%collection -.sample.head-type) =(%list name.sample.head-type) (context-union-branch i.args.e))
6579− (infer-union-context i.args.e sample.head-type env state.p.head (span-of head.e))
6580− ?: &(?=(%fn -.head-type) ?=(%collection -.sample.head-type) =(%list name.sample.head-type) (context-list-expression i.args.e))
6581− (infer-list-context i.args.e sample.head-type env state.p.head (span-of head.e))
7416+ ?: ?=(%fn -.head-type)
7417+ (infer-call-context-arg i.args.e sample.head-type env state.p.head (span-of head.e))
65827418 $(e i.args.e, state state.p.head)
65837419 ?: ?=(%| -.arg) arg
65847420 =/ st=istate state.p.arg
@@ -6587,10 +7423,16 @@
65877423 =/ fit=ifit (itype-fit typ.p.arg sample.ht sub.st next.st)
65887424 ?: ?=(%unknown -.fit) [%| ["call constraint is not supported by partial inference" ~]]
65897425 ?: ?=(%bad -.fit)
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)]]]]
65907432 =/ bad=(unit [at=span typ=itype])
6591− ?~(t.args.e ~ (call-error-site args.e typ.p.arg sample.ht sub.st next.st))
7433+ (call-error-site args.e typ.p.arg sample.ht sub.st next.st)
65927434 =/ whole-args=span
6593− ?~(t.args.e (span-of i.args.e) [beg:(span-of i.args.e) end:(span-of (rear args.e))])
7435+ [beg:(span-of i.args.e) end:(span-of (rear args.e))]
65947436 =/ arg-at=span ?~(bad whole-args at.u.bad)
65957437 =/ arg-type=itype ?~(bad typ.p.arg typ.u.bad)
65967438 [%| ["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)]]]]
@@ -6629,23 +7471,102 @@
66297471 ?: ?=(%unknown -.first) ~
66307472 $(args t.args, actual tal.actual, expected tal.expected, sub sub.first, next next.first)
66317473::
6632−:: Context can help each argument while the final fit still checks the
6633−:: complete right-nested sample, including any faces on its positions.
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)]
66347508::
66357509++ infer-call-context-arg
66367510 |= [e=expr expected=itype env=ienv state=istate context=span]
66377511 ^- 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)
66387518 =/ target=itype (itype-walk expected sub.state)
66397519 |-
66407520 ?: ?=(%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)
66417537 ?: &(?=(%union -.target) (context-union-branch e))
66427538 (infer-union-context e target env state context)
66437539 ?: &(?=(%collection -.target) =(%list name.target) (context-union-branch e))
66447540 (infer-union-context e target env state context)
66457541 ?: &(?=(%collection -.target) =(%list name.target) (context-list-expression e))
66467542 (infer-list-context e target env state context)
7543+ ?: &(?=(%cell -.target) ?=(%tuple -.e))
7544+ (infer-call-context-items items.e target env state context)
66477545 (infer-fragment e env state)
66487546::
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+::
66497570++ infer-call-context-args
66507571 |= [args=(list expr) expected=itype env=ienv state=istate context=span]
66517572 ^- iresult
@@ -6677,8 +7598,43 @@
66777598 ?: ?=(%| -.tail) tail
66787599 [%& [%cell ht typ.p.tail] state.p.tail]
66797600::
6680−:: A single two-binder cell pattern covers every value of a cell type.
6681−:: No other pattern matrix is implemented here.
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))
66827638::
66837639++ infer-cell-branch
66847640 |= [e=expr env=ienv state=istate]
@@ -6690,25 +7646,22 @@
66907646 =/ pats=(list pattern) items.pat.arm
66917647 ?~ pats [%| ["branch pattern is not supported by partial inference" ~]]
66927648 ?~ t.pats [%| ["branch pattern is not supported by partial inference" ~]]
6693− ?^ t.t.pats [%| ["branch pattern is not supported by partial inference" ~]]
6694− ?. ?=(%bind -.i.pats) [%| ["branch pattern is not supported by partial inference" ~]]
6695− ?. ?=(%bind -.i.t.pats) [%| ["branch pattern is not supported by partial inference" ~]]
6696− =/ one=term name.i.pats
6697− =/ two=term name.i.t.pats
6698− ?: |(=(one two) ?=(^ (ienv-lookup one env)) ?=(^ (ienv-lookup two env)) (lien globals.state |=(x=term |(=(x one) =(x two)))))
6699− [%| ["pattern shadows a name" ~]]
7649+ =/ names=(each (list term) @t) (cell-pattern-names pats env globals.state ~)
7650+ ?: ?=(%| -.names) [%| [(trip p.names) ~]]
67007651 =/ subject=iresult (infer-fragment subject.e env state)
67017652 ?: ?=(%| -.subject) subject
67027653 =/ st=istate state.p.subject
6703− ?: (itype-has-recursive (itype-normalize typ.p.subject sub.st))
7654+ =/ subject-type=itype (itype-normalize typ.p.subject sub.st)
7655+ ?: (itype-has-recursive subject-type)
67047656 [%| ["recursive pattern is not supported by partial inference" ~]]
67057657 ?: (itype-has-face typ.p.subject sub.st)
67067658 [%| ["record patterns are not supported by partial inference" ~]]
6707− =/ head=itype [%var next.st]
6708− =/ tail=itype [%var +(next.st)]
6709− =/ sub=(unit isub) (itype-unify typ.p.subject [%cell head tail] sub.st)
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)
67107663 ?~ sub [%| ["cell pattern does not match the subject type" ~]]
6711− (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))
67127665::
67137666++ show-itype
67147667 |= [t=itype sub=isub]
@@ -6727,6 +7680,7 @@
67277680 %atom "@{(trip aura.t)}"
67287681 %any-atom "@"
67297682 %flag "?"
7683+ %noun "*"
67307684 %tag (trip txt.literal.t)
67317685 %const (trip txt.literal.t)
67327686 %union
@@ -6774,6 +7728,7 @@
67747728 %atom |
67757729 %any-atom |
67767730 %flag |
7731+ %noun |
67777732 %tag |
67787733 %const |
67797734 %union |((lien cases.typ |=(c=itype (itype-has-nvar c))) (lien args.typ |=(c=itype (itype-has-nvar c))))
@@ -6882,6 +7837,7 @@
68827837 %atom |
68837838 %any-atom |
68847839 %flag |
7840+ %noun |
68857841 %tag |
68867842 %const |
68877843 %union |((lien cases.t |=(c=itype (has-atom-var n c))) (lien args.t |=(c=itype (has-atom-var n c))))
@@ -6933,9 +7889,9 @@
69337889::
69347890:: Build the supported part of the value environment in dependency order.
69357891:: Each pass adds successful definitions. Forward references become
6936−:: available on a later pass; mutually recursive groups and unsupported
6937−:: syntax do not enter the environment. Generalized definitions are closed, so a
6938−:: 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.
69397895::
69407896++ global-value-names
69417897 |= ds=(list def)
@@ -7036,7 +7992,15 @@
70367992 %gate-wide (infer-sample sample.gate env state)
70377993 * !!
70387994 ==
7039− ?: ?=(%| -.sam) [%| [p.sam ~]]
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 ~]]
70408004 =/ id=@ud next.state.p.sam
70418005 =/ product=itype ?~(result [%var id] u.result)
70428006 =/ st=istate state.p.sam(next +(id))
@@ -7054,6 +8018,208 @@
70548018 ?~ uni [%| ["recursive gate constraint is not supported by partial inference" ~]]
70558019 [%& [%fn typ.p.sam typ.p.out] state.p.out(sub u.uni)]
70568020::
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+::
70578223++ add-supported-defs
70588224 |= [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)]
70598225 ^- ienv
@@ -7064,6 +8230,7 @@
70648230 ?^ (ienv-lookup name.d env) $(ds t.ds)
70658231 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
70668232 =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude]
8233+ =. initial (reserve-def-caps val.d initial)
70678234 =/ result=iresult (infer-fragment val.d env initial)
70688235 =? result ?=(%| -.result) (infer-recursive-gate d env initial)
70698236 ?: ?=(%| -.result) $(ds t.ds)
@@ -7075,14 +8242,254 @@
70758242 ?: (gth (lent vars) 26) $(ds t.ds)
70768243 $(ds t.ds, env [[name.d [typ vars]] env])
70778244::
7078−++ resolve-supported-defs
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
70798356 |= [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)]
7080− ^- ienv
8357+ ^- iresolved
70818358 =/ 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))
70828365 |-
70838366 =/ next=ienv (add-supported-defs ds env molds globals externals surs mark-externals marks jimports reserved-molds at prelude)
7084− ?: =(next env) env
7085− $(env next)
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+::
8372+++ resolve-supported-defs
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)]
8374+ ^- 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) ~
8484+ |-
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))
70868493::
70878494+| %union-analysis
70888495::
@@ -7305,6 +8712,22 @@
73058712 ?. (levy vals |=(n=term &((unique-value-name n vals) !(lien prelude-values |=(v=term =(n v)))))) |
73068713 (levy mold-names |=(n=term &((unique-value-name n mold-names) !(lien prelude-molds |=(m=term =(n m))))))
73078714::
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+::
73088731++ module-mold-types
73098732 |= [molds=imolds state=istate]
73108733 ^- (each imold-types @t)
@@ -7320,9 +8743,9 @@
73208743::
73218744:: Prepare a provisional interface from the trusted vendored source.
73228745:: Every declared name remains reserved, but only molds and values this
7323−:: fragment can infer are usable. Unsupported bodies are not validated,
7324−:: and imports into the prelude are not supported yet. The fixed origin
7325−:: gives its named unions the same identity in every importing module.
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.
73268749::
73278750:: Recognize only the complete standard prelude list shape. Its recursive
73288751:: tail uses the same parameter and the unqualified list name. The reader
@@ -7362,6 +8785,13 @@
73628785 ?. ?=(%tvar -.i.args.tail) |
73638786 =(var name.i.args.tail)
73648787::
8788+++ prelude-label
8789+ |= [typ=itype name=term]
8790+ ^- itype
8791+ ?. ?=(%union -.typ) typ
8792+ ?^ args.typ typ
8793+ typ(label `name)
8794+::
73658795++ partial-prelude-molds
73668796 |= [molds=imolds state=istate]
73678797 ^- imold-types
@@ -7374,22 +8804,32 @@
73748804 (infer-mold-template body.m state(active [name.m active.state], in-mold &))
73758805 ?~ out $(molds t.molds)
73768806 =. 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)
73778808 [[name.m template.u.out] $(molds t.molds)]
73788809::
7379−++ partial-prelude-interface
7380− |= src=@t
8810+++ partial-prelude-interface-with-internal
8811+ |= [src=@t internal-source=(unit @t)]
73818812 ^- (unit ifile)
73828813 ?: =(0 src) ~
73838814 =/ at=path /lib/jibb/prelude/jibb
73848815 =/ parsed (parse at src)
73858816 ?: ?=(%| -.parsed) ~
7386− ?^ imports.p.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 ~
73878827 ?~ defs.p.parsed ~
73888828 ?. (module-scope-valid p.parsed ~ ~) ~
73898829 =/ ds=(list def) defs.p.parsed
73908830 =/ molds=imolds (collect-simple-molds ds)
73918831 =/ names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
7392− =/ globals=(list term) (global-value-names ds)
8832+ =/ globals=(list term) (weld (import-binding-names imports.p.parsed) (global-value-names ds))
73938833 :: Remove raw list before inferring any template, so an altered list
73948834 :: cannot leak through an alias. Its name remains reserved either way.
73958835 =/ declared=? (lien names |=(name=term =(%list name)))
@@ -7397,11 +8837,26 @@
73978837 =? env-molds declared
73988838 (skim molds |=(m=[name=term body=shape] !=(%list name.m)))
73998839 =/ reserved=(list term) ?:(declared ~[%list] ~)
7400− =/ state=istate [0 ~ ~ ~ env-molds globals ~ ~ ~ ~ ~ reserved ~ ~ ~ | at names ~]
8840+ =/ state=istate [0 ~ ~ ~ env-molds globals ~ ~ ~ ~ u.private reserved ~ ~ ~ | at names ~]
74018841 =/ mt=imold-types (partial-prelude-molds molds state)
7402− =/ partial=ifile [~ mt at]
7403− =/ env=ienv (resolve-supported-defs ds env-molds globals ~ ~ ~ ~ ~ reserved at `partial)
7404− `[env mt at]
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 ~)
74058860::
74068861+$ iprelude [iface=ifile values=(list term) molds=(list term)]
74078862::
@@ -7416,6 +8871,17 @@
74168871 =/ ms=(list term) (turn (collect-simple-molds defs.p.parsed) |=(m=[name=term body=shape] name.m))
74178872 `[u.iface vals ms]
74188873::
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]
8884+::
74198885++ module-values-complete
74208886 |= [ds=(list def) env=ienv]
74218887 ^- ?
@@ -7442,6 +8908,8 @@
74428908 ?~ imports [%& [~ cache]]
74438909 ?. ?=(%jibb -.i.imports) $(imports t.imports)
74448910 =/ at=path (weld path.i.imports `path`~[%jibb])
8911+ ?: =(at /lib/jibb/internal/jibb)
8912+ [%| 'the prelude internal module is private']
74458913 ?: (lien active |=(p=path =(p at)))
74468914 [%| (crip "import cycle at {(spud at)}")]
74478915 =/ found=jbundle (skim modules |=(m=jsource =(at at.m)))
@@ -7456,14 +8924,277 @@
74568924 ?: ?=(%| -.rest) rest
74578925 [%& [[[face.i.imports iface.p.iface] resolved.p.rest] cache.p.rest]]
74588926::
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]]]
9183+::
74599184++ infer-jibb-file
74609185 |= [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)]
74619186 ^- jfile-result
7462− ?: ?=([%ui %api *] at) [%| (crip "API module needs unsupported inference: {(spud at)}")]
74639187 =/ parsed (parse at src)
74649188 ?: ?=(%| -.parsed) [%| (crip "module source does not parse: {(spud at)}")]
74659189 =/ mod=module p.parsed
7466− ?. (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)}")]
74679198 =/ vals=(list term) (global-value-names defs.mod)
74689199 ?: (lien vals |=(n=term =(n %main)))
74699200 [%| (crip "module kind needs unsupported inference: {(spud at)}")]
@@ -7481,7 +9212,7 @@
74819212 =/ env=ienv (resolve-supported-defs defs.mod molds globals externals surs mark-externals marks resolved.p.js reserved at prelude)
74829213 ?. (module-values-complete defs.mod env)
74839214 [%| (crip "module definitions need unsupported inference: {(spud at)}")]
7484− [%& [[env p.mts at] [[at [env p.mts at]] cache.p.js]]]
9215+ [%& [[env p.mts at ~] [[at [env p.mts at ~]] cache.p.js]]]
74859216::
74869217:: +golden-types-with-modules fails closed for imports without prelude
74879218:: scope. +golden-types-with-prelude resolves supported library graphs;
@@ -7513,6 +9244,12 @@
75139244 ?~ prepared 'partial inference; module not checked\0aprelude interface is not supported'
75149245 (golden-types-with-prepared-prelude file src externals mark-externals modules prepared)
75159246::
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+::
75169253++ golden-types-with-prepared-prelude
75179254 |= [file=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle prepared=(unit iprelude)]
75189255 ^- @t
@@ -7523,6 +9260,8 @@
75239260 =/ prelude-molds=(list term) molds.u.prepared
75249261 =/ iface=(unit ifile) `iface.u.prepared
75259262 ?. (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'
75269265 'partial inference; module not checked\0amodule has conflicting names'
75279266 =/ js=jimports-result
75289267 (resolve-jibb-imports imports.p.parsed externals mark-externals modules ~[file] prelude-values prelude-molds ~ iface)
@@ -7535,6 +9274,23 @@
75359274:: entries, as [mark result] with the result from +read-mark:jibb-import.
75369275:: Unknown, duplicated, failed and undeclared entries never resolve a mold.
75379276::
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+::
75389294++ golden-types-with-marks
75399295 |= [file=path src=@t externals=iexternals mark-externals=imark-externals]
75409296 ^- @t
@@ -7551,7 +9307,9 @@
75519307 =/ globals=(list term) (weld prelude-values (weld (turn jimports |=(j=[face=term interface=ifile] face.j)) (global-value-names ds)))
75529308 =/ surs=(list term) (collect-sur-imports imports.p.parsed)
75539309 =/ marks=(list term) (collect-mark-imports imports.p.parsed)
7554− =/ env=ienv (resolve-supported-defs ds molds globals externals surs mark-externals marks jimports reserved-molds file prelude)
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
75559313 =/ lines=(list @t) ~
75569314 |-
75579315 ?~ ds (of-wain:format ['partial inference; module not checked' (flop lines)])
@@ -7560,8 +9318,19 @@
75609318 $(ds t.ds, lines [(show-partial-mold file src d molds) lines])
75619319 ?. (unique-value-name name.d globals)
75629320 $(ds t.ds, lines [(crip "++ {(trip name.d)}: name already in scope") lines])
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])
75639331 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
75649332 =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | file top prelude]
9333+ =. initial (reserve-def-caps val.d initial)
75659334 =/ result=iresult
75669335 ?: |(?=(%gate -.val.d) ?=(%gate-wide -.val.d))
75679336 (infer-recursive-gate d env initial)
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+56−48
@@ -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]
@@ -45,9 +49,10 @@
4549++ turn |= args=[(list A) $-(A B)]
4650 ?- args
4751 [xs f]
48− ?- xs
49− ~ ~
50− [item rest] [(f item) (turn rest f)]
52+ ^- (list B)
53+ ?- xs
54+ ~ ~
55+ [item rest] [(f item) (turn rest f)]
5156
5257+$ dime [p=@ta q=@]
5358
@@ -139,27 +144,28 @@
139144 (reverse-into xs ~)
140145
141146++ drop |= maybe=(unit A)
142− ?- maybe
143− ~ ~
144− [~ value] [value ~]
147+ ^- (list A)
148+ ?- maybe
149+ ~ ~
150+ [~ value] [value ~]
145151
146152++ bind |= args=[(unit A) $-(A B)]
147153 ?- args
148− [maybe f]
154+ [maybe f] ^- (unit B)
149155 ?- maybe
150156 ~ ~
151157 [~ value] `(f value)
152158
153159++ biff |= args=[(unit A) $-(A (unit B))]
154160 ?- args
155− [maybe f]
161+ [maybe f] ^- (unit B)
156162 ?- maybe
157163 ~ ~
158164 [~ value] (f value)
159165
160166++ both |= args=[(unit A) (unit B)]
161167 ?- args
162− [first second]
168+ [first second] ^- (unit [A B])
163169 ?- first
164170 ~ ~
165171 [~ a]
@@ -169,7 +175,7 @@
169175
170176++ clap |= args=[(unit A) (unit A) $-([A A] A)]
171177 ?- args
172− [first second combine]
178+ [first second combine] ^- (unit A)
173179 ?- first
174180 ~ second
175181 [~ a]
@@ -179,7 +185,7 @@
179185
180186++ clef |= args=[(unit A) (unit B) $-([A B] (unit C))]
181187 ?- args
182− [first second combine]
188+ [first second combine] ^- (unit C)
183189 ?- first
184190 ~ ~
185191 [~ a]
@@ -189,23 +195,23 @@
189195
190196++ skim |= args=[(list A) $-(A ?)]
191197 ?- args
192− [xs predicate]
193− ?- xs
194− ~ ~
195− [item rest]
196− ?- (predicate item)
197− %.y [item (skim rest predicate)]
198− %.n (skim rest predicate)
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)
199205
200206++ skip |= args=[(list A) $-(A ?)]
201207 ?- args
202− [xs predicate]
203− ?- xs
204− ~ ~
205− [item rest]
206− ?- (predicate item)
207− %.y (skip rest predicate)
208− %.n [item (skip rest predicate)]
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)]
209215
210216++ levy |= args=[(list A) $-(A ?)]
211217 ?- args
@@ -243,37 +249,39 @@
243249
244250++ flit |= predicate=$-(A ?)
245251 |= value=A
246− ?- (predicate value)
247− %.y `value
248− %.n ~
252+ ^- (unit A)
253+ ?- (predicate value)
254+ %.y `value
255+ %.n ~
249256
250257++ murn |= args=[(list A) $-(A (unit B))]
251258 ?- args
252− [xs f]
253− ?- xs
254− ~ ~
255− [item rest]
256− ?- (f item)
257− ~ (murn rest f)
258− [~ value] [value (murn rest f)]
259+ [xs f] ^- (list B)
260+ ?- xs
261+ ~ ~
262+ [item rest]
263+ ?- (f item)
264+ ~ (murn rest f)
265+ [~ value] [value (murn rest f)]
259266
260267++ join |= args=[A (list A)]
261268 ?- args
262− [separator xs]
263− ?- xs
264− ~ ~
265− [item rest]
266− ?- rest
267− ~ [item ~]
268− [next more] [item [separator (join separator rest)]]
269+ [separator xs] ^- (list A)
270+ ?- xs
271+ ~ ~
272+ [item rest]
273+ ?- rest
274+ ~ [item ~]
275+ [next more] [item [separator (join separator rest)]]
269276
270277++ snip |= xs=(list A)
271− ?- xs
272− ~ ~
273− [item rest]
274− ?- rest
275− ~ ~
276− [next more] [item (snip rest)]
278+ ^- (list A)
279+ ?- xs
280+ ~ ~
281+ [item rest]
282+ ?- rest
283+ ~ ~
284+ [next more] [item (snip rest)]
277285
278286++ rear |= xs=(list A)
279287 ?- xs
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/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/prelude-1c-structural/source.jibb+4−3
@@ -45,9 +45,10 @@
4545++ turn |= args=[(list A) $-(A B)]
4646 ?- args
4747 [xs f]
48− ?- xs
49− ~ ~
50− [item rest] [(f item) (turn rest f)]
48+ ^- (list B)
49+ ?- xs
50+ ~ ~
51+ [item rest] [(f item) (turn rest f)]
5152
5253+$ dime [p=@ta q=@]
5354
tests/golden/prelude-1c-structural/tokens.txt+453−446
@@ -244,481 +244,488 @@
24424447:9 name f
24524547:10 tight glyph ]
24624648:7 INDENT
247−48:7 glyph ?-
248−48:10 name xs
247+48:7 glyph ^-
248+48:10 glyph (
249+48:11 tight name list
250+48:16 tvar B
251+48:17 tight glyph )
24925249:9 INDENT
250−49:9 lit ~
251−49:11 lit ~
252−50:9 NEWLINE
253−50:9 glyph [
254−50:10 tight name item
255−50:15 name rest
256−50:19 tight glyph ]
257−50:21 glyph [
258−50:22 tight glyph (
259−50:23 tight name f
260−50:25 name item
261−50:29 tight glyph )
262−50:31 glyph (
263−50:32 tight name turn
264−50:37 name rest
265−50:42 name f
266−50:43 tight glyph )
267−50:44 tight glyph ]
268−52:1 DEDENT
269−52:1 DEDENT
270−52:1 DEDENT
271−52:1 DEDENT
272−52:1 NEWLINE
273−52:1 glyph +$
274−52:4 name dime
275−52:9 glyph [
276−52:10 tight name p
277−52:11 tight glyph =
278−52:12 tight aura @ta
279−52:16 name q
280−52:17 tight glyph =
281−52:18 tight aura @
282−52:19 tight glyph ]
283−54:1 NEWLINE
284−54:1 glyph +$
285−54:4 name hair
286−54:9 glyph [
287−54:10 tight name p
288−54:11 tight glyph =
289−54:12 tight aura @ud
290−54:16 name q
291−54:17 tight glyph =
292−54:18 tight aura @ud
293−54:21 tight glyph ]
294−56:1 NEWLINE
295−56:1 glyph +$
296−56:4 name pint
297−56:9 glyph [
298−56:10 tight name p
299−56:11 tight glyph =
300−56:12 tight glyph [
301−56:13 tight name p
302−56:14 tight glyph =
303−56:15 tight aura @
304−56:17 name q
305−56:18 tight glyph =
306−56:19 tight aura @
307−56:20 tight glyph ]
308−56:22 name q
309−56:23 tight glyph =
310−56:24 tight glyph [
311−56:25 tight name p
312−56:26 tight glyph =
313−56:27 tight aura @
314−56:29 name q
315−56:30 tight glyph =
316−56:31 tight aura @
317−56:32 tight glyph ]
318−56:33 tight glyph ]
319−58:1 NEWLINE
320−58:1 glyph +$
321−58:4 name coin
322−59:3 INDENT
323−59:3 glyph [
324−59:4 tight lit %$
325−59:7 name p
326−59:8 tight glyph =
327−59:9 tight name dime
328−59:13 tight glyph ]
329−60:3 NEWLINE
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
279+53:1 NEWLINE
280+53:1 glyph +$
281+53:4 name dime
282+53:9 glyph [
283+53:10 tight name p
284+53:11 tight glyph =
285+53:12 tight aura @ta
286+53:16 name q
287+53:17 tight glyph =
288+53:18 tight aura @
289+53:19 tight glyph ]
290+55:1 NEWLINE
291+55:1 glyph +$
292+55:4 name hair
293+55:9 glyph [
294+55:10 tight name p
295+55:11 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 ]
301+57:1 NEWLINE
302+57:1 glyph +$
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 %blob
332−60:10 name p
333−60:11 tight glyph =
334−60:12 tight glyph *
331+60:4 tight lit %$
332+60:7 name p
333+60:8 tight glyph =
334+60:9 tight name dime
33533560:13 tight glyph ]
33633661:3 NEWLINE
33733761:3 glyph [
338−61:4 tight lit %many
338+61:4 tight lit %blob
33933961:10 name p
34034061:11 tight glyph =
341−61:12 tight glyph (
342−61:13 tight name list
343−61:18 name coin
344−61:22 tight glyph )
345−61:23 tight glyph ]
346−63:1 DEDENT
347−63:1 NEWLINE
348−63:1 glyph +$
349−63:4 name pair
350−63:9 glyph |$
351−63:12 glyph [
352−63:13 tight tvar A
353−63:15 tvar B
354−63:16 tight glyph ]
355−63:18 glyph [
356−63:19 tight name p
357−63:20 tight glyph =
358−63:21 tight tvar A
359−63:23 name q
360−63:24 tight glyph =
361−63:25 tight tvar B
362−63:26 tight glyph ]
363−65:1 NEWLINE
364−65:1 glyph +$
365−65:4 name trel
366−65:9 glyph |$
367−65:12 glyph [
368−65:13 tight tvar A
369−65:15 tvar B
370−65:17 tvar C
371−65:18 tight glyph ]
372−65:20 glyph [
373−65:21 tight name p
374−65:22 tight glyph =
375−65:23 tight tvar A
376−65:25 name q
377−65:26 tight glyph =
378−65:27 tight tvar B
379−65:29 name r
380−65:30 tight glyph =
381−65:31 tight tvar C
382−65:32 tight glyph ]
383−67:1 NEWLINE
384−67:1 glyph +$
385−67:4 name qual
386−67:9 glyph |$
387−67:12 glyph [
388−67:13 tight tvar A
389−67:15 tvar B
390−67:17 tvar C
391−67:19 tvar D
392−67:20 tight glyph ]
393−67:22 glyph [
394−67:23 tight name p
395−67:24 tight glyph =
396−67:25 tight tvar A
397−67:27 name q
398−67:28 tight glyph =
399−67:29 tight tvar B
400−67:31 name r
401−67:32 tight glyph =
402−67:33 tight tvar C
403−67:35 name s
404−67:36 tight glyph =
405−67:37 tight tvar D
406−67:38 tight glyph ]
407−69:1 NEWLINE
408−69:1 glyph +$
409−69:4 name cord
410−69:9 aura @t
411−71:1 NEWLINE
412−71:1 glyph +$
413−71:4 name knot
414−71:9 aura @ta
415−73:1 NEWLINE
416−73:1 glyph +$
417−73:4 name tape
418−73:9 glyph (
419−73:10 tight name list
420−73:15 aura @tD
421−73:18 tight glyph )
422−75:1 NEWLINE
423−75:1 glyph +$
424−75:4 name path
425−75:9 glyph (
426−75:10 tight name list
427−75:15 name knot
428−75:19 tight glyph )
429−77:1 NEWLINE
430−77:1 glyph +$
431−77:4 name tank
432−78:3 INDENT
433−78:3 name cord
434−79:3 NEWLINE
435−79:3 glyph [
436−79:4 tight lit %leaf
437−79:10 name p
438−79:11 tight glyph =
439−79:12 tight name tape
440−79:16 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
354+64:1 NEWLINE
355+64:1 glyph +$
356+64:4 name pair
357+64:9 glyph |$
358+64:12 glyph [
359+64:13 tight tvar A
360+64:15 tvar B
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 ]
370+66:1 NEWLINE
371+66:1 glyph +$
372+66:4 name trel
373+66:9 glyph |$
374+66:12 glyph [
375+66:13 tight tvar A
376+66:15 tvar B
377+66:17 tvar C
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 ]
390+68:1 NEWLINE
391+68:1 glyph +$
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 ]
414+70:1 NEWLINE
415+70:1 glyph +$
416+70:4 name cord
417+70:9 aura @t
418+72:1 NEWLINE
419+72:1 glyph +$
420+72:4 name knot
421+72:9 aura @ta
422+74:1 NEWLINE
423+74:1 glyph +$
424+74:4 name tape
425+74:9 glyph (
426+74:10 tight name list
427+74:15 aura @tD
428+74:18 tight glyph )
429+76:1 NEWLINE
430+76:1 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
44144180:3 NEWLINE
44244280:3 glyph [
443−80:4 tight lit %palm
443+80:4 tight lit %leaf
44444480:10 name p
44544580:11 tight glyph =
446−80:12 tight glyph (
447−80:13 tight name qual
448−80:18 name tape
449−80:23 name tape
450−80:28 name tape
451−80:33 name tape
452−80:37 tight glyph )
453−80:39 name q
454−80:40 tight glyph =
455−80:41 tight glyph (
456−80:42 tight name list
457−80:47 name tank
458−80:51 tight glyph )
459−80:52 tight glyph ]
446+80:12 tight name tape
447+80:16 tight glyph ]
46044881:3 NEWLINE
46144981:3 glyph [
462−81:4 tight lit %rose
450+81:4 tight lit %palm
46345181:10 name p
46445281:11 tight glyph =
46545381:12 tight glyph (
466−81:13 tight name trel
454+81:13 tight name qual
46745581:18 name tape
46845681:23 name tape
46945781:28 name tape
470−81:32 tight glyph )
471−81:34 name q
472−81:35 tight glyph =
473−81:36 tight glyph (
474−81:37 tight name list
475−81:42 name tank
476−81:46 tight glyph )
477−81:47 tight glyph ]
478−83:1 DEDENT
479−83:1 NEWLINE
480−83:1 glyph +$
481−83:4 name nail
482−83:9 glyph [
483−83:10 tight name p
484−83:11 tight glyph =
485−83:12 tight name hair
486−83:17 name q
487−83:18 tight glyph =
488−83:19 tight name tape
489−83:23 tight glyph ]
490−85:1 NEWLINE
491−85:1 glyph +$
492−85:4 name edge
493−85:9 glyph [
494−85:10 tight name p
495−85:11 tight glyph =
496−85:12 tight name hair
497−85:17 name q
498−85:18 tight glyph =
499−85:19 tight glyph (
500−85:20 tight name unit
501−85:25 glyph [
502−85:26 tight name p
503−85:27 tight glyph =
504−85:28 tight glyph *
505−85:30 name q
506−85:31 tight glyph =
507−85:32 tight name nail
508−85:36 tight glyph ]
509−85:37 tight glyph )
510−85:38 tight glyph ]
511−87:1 NEWLINE
512−87:1 glyph +$
513−87:4 name rule
514−87:9 glyph $-(
515−87:12 tight name nail
516−87:17 name edge
517−87:21 tight glyph )
518−89:1 NEWLINE
519−89:1 glyph +$
520−89:4 name spot
521−89:9 glyph [
522−89:10 tight name p
523−89:11 tight glyph =
524−89:12 tight name path
525−89:17 name q
526−89:18 tight glyph =
527−89:19 tight name pint
528−89:23 tight glyph ]
529−91:1 NEWLINE
530−91:1 glyph +$
531−91:4 name toon
532−92:3 INDENT
533−92:3 glyph [
534−92:4 tight lit %0
535−92:7 name p
536−92:8 tight glyph =
537−92:9 tight glyph *
538−92:10 tight glyph ]
539−93:3 NEWLINE
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
471+82:11 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
486+84:1 NEWLINE
487+84:1 glyph +$
488+84:4 name nail
489+84:9 glyph [
490+84:10 tight name p
491+84:11 tight glyph =
492+84:12 tight name hair
493+84:17 name q
494+84:18 tight glyph =
495+84:19 tight name tape
496+84:23 tight glyph ]
497+86:1 NEWLINE
498+86:1 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 ]
518+88:1 NEWLINE
519+88:1 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 )
525+90:1 NEWLINE
526+90:1 glyph +$
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 %1
541+93:4 tight lit %0
54254293:7 name p
54354393:8 tight glyph =
54454493:9 tight glyph *
54554593:10 tight glyph ]
54654694:3 NEWLINE
54754794:3 glyph [
548−94:4 tight lit %2
548+94:4 tight lit %1
54954994:7 name p
55055094:8 tight glyph =
551−94:9 tight glyph (
552−94:10 tight name list
553−94:15 name tank
554−94:19 tight glyph )
555−94:20 tight glyph ]
556−96:1 DEDENT
557−96:1 NEWLINE
558−96:1 glyph +$
559−96:4 name like
560−96:9 glyph |$
561−96:12 glyph [
562−96:13 tight tvar A
563−96:14 tight glyph ]
564−96:16 glyph [
565−96:17 tight name p
566−96:18 tight glyph =
567−96:19 tight name hair
568−96:24 name q
569−96:25 tight glyph =
570−96:26 tight glyph (
571−96:27 tight name unit
572−96:32 glyph [
573−96:33 tight name p
574−96:34 tight glyph =
575−96:35 tight tvar A
576−96:37 name q
577−96:38 tight glyph =
578−96:39 tight name nail
579−96:43 tight glyph ]
580−96:44 tight glyph )
581−96:45 tight glyph ]
582−98:1 NEWLINE
583−98:1 glyph ++
584−98:4 name wonk
585−98:9 glyph |=
586−98:12 name veq
587−98:15 tight glyph =
588−98:16 tight glyph (
589−98:17 tight name like
590−98:22 tvar A
591−98:23 tight glyph )
592−99:3 INDENT
593−99:3 glyph ?-
594−99:6 wing q.veq
595−100:5 INDENT
596−100:5 lit ~
597−100:7 glyph !!
598−101:5 NEWLINE
599−101:5 glyph [
600−101:6 tight lit ~
601−101:8 name product
602−101:15 tight glyph ]
603−101:17 wing p.product
604−103:1 DEDENT
605−103:1 DEDENT
606−103:1 NEWLINE
607−103:1 glyph +$
608−103:4 name lone
609−103:9 glyph |$
610−103:12 glyph [
611−103:13 tight tvar A
612−103:14 tight glyph ]
613−103:16 glyph [
614−103:17 tight name p
615−103:18 tight glyph =
616−103:19 tight tvar A
617−103:20 tight glyph ]
618−105:1 NEWLINE
619−105:1 glyph +$
620−105:4 name lest
621−105:9 glyph |$
622−105:12 glyph [
623−105:13 tight tvar A
624−105:14 tight glyph ]
625−105:16 glyph [
626−105:17 tight name i
627−105:18 tight glyph =
628−105:19 tight tvar A
629−105:21 name t
630−105:22 tight glyph =
631−105:23 tight glyph (
632−105:24 tight name list
633−105:29 tvar A
634−105:30 tight glyph )
635−105:31 tight glyph ]
636−107:1 NEWLINE
637−107:1 glyph +$
638−107:4 name pole
639−107:9 glyph |$
640−107:12 glyph [
641−107:13 tight tvar A
642−107:14 tight glyph ]
643−108:3 INDENT
644−108:3 lit ~
645−109:3 NEWLINE
646−109:3 glyph [
647−109:4 tight tvar A
648−109:6 glyph (
649−109:7 tight name pole
650−109:12 tvar A
651−109:13 tight glyph )
652−109:14 tight glyph ]
653−111:1 DEDENT
654−111:1 NEWLINE
655−111:1 glyph +$
656−111:4 name quip
657−111:9 glyph |$
658−111:12 glyph [
659−111:13 tight tvar A
660−111:15 tvar B
661−111:16 tight glyph ]
662−111:18 glyph [
663−111:19 tight glyph (
664−111:20 tight name list
665−111:25 tvar A
666−111:26 tight glyph )
667−111:28 tvar B
668−111:29 tight glyph ]
669−113:1 NEWLINE
670−113:1 glyph +$
671−113:4 name tree
672−113:9 glyph |$
673−113:12 glyph [
674−113:13 tight tvar A
675−113:14 tight glyph ]
676−114:3 INDENT
677−114:3 lit ~
678−115:3 NEWLINE
679−115:3 glyph [
680−115:4 tight name n
681−115:5 tight glyph =
682−115:6 tight tvar A
683−115:8 name l
684−115:9 tight glyph =
685−115:10 tight glyph (
686−115:11 tight name tree
687−115:16 tvar A
688−115:17 tight glyph )
689−115:19 name r
690−115:20 tight glyph =
691−115:21 tight glyph (
692−115:22 tight name tree
693−115:27 tvar A
694−115:28 tight glyph )
695−115:29 tight glyph ]
696−117:1 DEDENT
697−117:1 NEWLINE
698−117:1 glyph +$
699−117:4 name each
700−117:9 glyph |$
701−117:12 glyph [
702−117:13 tight tvar A
703−117:15 tvar B
704−117:16 tight glyph ]
705−118:3 INDENT
706−118:3 glyph [
707−118:4 tight lit %|
708−118:7 name p
709−118:8 tight glyph =
710−118:9 tight tvar B
711−118:10 tight glyph ]
712−119:3 NEWLINE
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
564+97:1 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+104:1 DEDENT
612+104:1 DEDENT
613+104:1 NEWLINE
614+104:1 glyph +$
615+104:4 name lone
616+104:9 glyph |$
617+104:12 glyph [
618+104:13 tight tvar A
619+104:14 tight glyph ]
620+104:16 glyph [
621+104:17 tight name p
622+104:18 tight glyph =
623+104:19 tight tvar A
624+104:20 tight glyph ]
625+106:1 NEWLINE
626+106:1 glyph +$
627+106:4 name lest
628+106:9 glyph |$
629+106:12 glyph [
630+106:13 tight tvar A
631+106:14 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
649+108:14 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
661+112:1 NEWLINE
662+112:1 glyph +$
663+112:4 name quip
664+112:9 glyph |$
665+112:12 glyph [
666+112:13 tight tvar A
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
713713119:3 glyph [
714−119:4 tight lit %&
714+119:4 tight lit %|
715715119:7 name p
716716119:8 tight glyph =
717−119:9 tight tvar A
717+119:9 tight tvar B
718718119:10 tight glyph ]
719−121:1 DEDENT
720−121:1 NEWLINE
721−121:1 glyph +$
722−121:4 name bloq
723−121:9 aura @
724−121:10 NEWLINE
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+168−165
@@ -111,177 +111,180 @@
111111 (arm 47:5
112112 (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
113113 (body 48:7
114− (branch 48:7
115− (wing 48:10 xs)
116− (arm 49:9 (lit 49:9 ~) (lit 49:11 ~))
117− (arm 50:9
118− (cell 50:9 (bind 50:10 item) (bind 50:15 rest))
119− (tuple 50:21
120− (group 50:22
121− (call 50:23 (wing 50:23 f) (wing 50:25 item)))
122− (group 50:31
123− (call 50:32 (wing 50:32 turn) (wing 50:37 rest) (wing 50:42 f))))))))))))
124− (mold 52:1 dime
125− (cell 52:9
126− (face 52:10 p (aura 52:12 @ta))
127− (face 52:16 q (aura 52:18 @))))
128− (mold 54:1 hair
129− (cell 54:9
130− (face 54:10 p (aura 54:12 @ud))
131− (face 54:16 q (aura 54:18 @ud))))
132− (mold 56:1 pint
133− (cell 56:9
134− (face 56:10 p
135− (cell 56:12
136− (face 56:13 p (aura 56:15 @))
137− (face 56:17 q (aura 56:19 @))))
138− (face 56:22 q
139− (cell 56:24
140− (face 56:25 p (aura 56:27 @))
141− (face 56:29 q (aura 56:31 @))))))
142− (mold 58:1 coin
143− (union 59:3
144− (cell 59:3
145− (const 59:4 %$)
146− (face 59:7 p (ref 59:9 dime)))
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
128+ (cell 53:9
129+ (face 53:10 p (aura 53:12 @ta))
130+ (face 53:16 q (aura 53:18 @))))
131+ (mold 55:1 hair
132+ (cell 55:9
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 %blob)
149− (face 60:10 p (noun 60:12)))
148+ (const 60:4 %$)
149+ (face 60:7 p (ref 60:9 dime)))
150150 (cell 61:3
151− (const 61:4 %many)
152− (face 61:10 p
153− (apply 61:12 list (ref 61:18 coin))))))
154− (mold 63:1 pair
155− (generic 63:9 A B
156− (cell 63:18
157− (face 63:19 p (tvar 63:21 A))
158− (face 63:23 q (tvar 63:25 B)))))
159− (mold 65:1 trel
160− (generic 65:9 A B C
161− (cell 65:20
162− (face 65:21 p (tvar 65:23 A))
163− (face 65:25 q (tvar 65:27 B))
164− (face 65:29 r (tvar 65:31 C)))))
165− (mold 67:1 qual
166− (generic 67:9 A B C D
167− (cell 67:22
168− (face 67:23 p (tvar 67:25 A))
169− (face 67:27 q (tvar 67:29 B))
170− (face 67:31 r (tvar 67:33 C))
171− (face 67:35 s (tvar 67:37 D)))))
172− (mold 69:1 cord (aura 69:9 @t))
173− (mold 71:1 knot (aura 71:9 @ta))
174− (mold 73:1 tape
175− (apply 73:9 list (aura 73:15 @tD)))
176− (mold 75:1 path
177− (apply 75:9 list (ref 75:15 knot)))
178− (mold 77:1 tank
179− (union 78:3
180− (ref 78:3 cord)
181− (cell 79:3
182− (const 79:4 %leaf)
183− (face 79:10 p (ref 79:12 tape)))
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)
184184 (cell 80:3
185− (const 80:4 %palm)
186− (face 80:10 p
187− (apply 80:12 qual (ref 80:18 tape) (ref 80:23 tape) (ref 80:28 tape) (ref 80:33 tape)))
188− (face 80:39 q
189− (apply 80:41 list (ref 80:47 tank))))
185+ (const 80:4 %leaf)
186+ (face 80:10 p (ref 80:12 tape)))
190187 (cell 81:3
191− (const 81:4 %rose)
188+ (const 81:4 %palm)
192189 (face 81:10 p
193− (apply 81:12 trel (ref 81:18 tape) (ref 81:23 tape) (ref 81:28 tape)))
194− (face 81:34 q
195− (apply 81:36 list (ref 81:42 tank))))))
196− (mold 83:1 nail
197− (cell 83:9
198− (face 83:10 p (ref 83:12 hair))
199− (face 83:17 q (ref 83:19 tape))))
200− (mold 85:1 edge
201− (cell 85:9
202− (face 85:10 p (ref 85:12 hair))
203− (face 85:17 q
204− (apply 85:19 unit
205− (cell 85:25
206− (face 85:26 p (noun 85:28))
207− (face 85:30 q (ref 85:32 nail)))))))
208− (mold 87:1 rule
209− (fn 87:9 (ref 87:12 nail) (ref 87:17 edge)))
210− (mold 89:1 spot
211− (cell 89:9
212− (face 89:10 p (ref 89:12 path))
213− (face 89:17 q (ref 89:19 pint))))
214− (mold 91:1 toon
215− (union 92:3
216− (cell 92:3
217− (const 92:4 %0)
218− (face 92:7 p (noun 92:9)))
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
200+ (cell 84:9
201+ (face 84:10 p (ref 84:12 hair))
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 %1)
220+ (const 93:4 %0)
221221 (face 93:7 p (noun 93:9)))
222222 (cell 94:3
223− (const 94:4 %2)
224− (face 94:7 p
225− (apply 94:9 list (ref 94:15 tank))))))
226− (mold 96:1 like
227− (generic 96:9 A
228− (cell 96:16
229− (face 96:17 p (ref 96:19 hair))
230− (face 96:24 q
231− (apply 96:26 unit
232− (cell 96:32
233− (face 96:33 p (tvar 96:35 A))
234− (face 96:37 q (ref 96:39 nail))))))))
235− (value 98:1 wonk
236− (gate 98:9
237− (face 98:12 veq
238− (apply 98:16 like (tvar 98:22 A)))
239− (body 99:3
240− (branch 99:3
241− (wing 99:6 q.veq)
242− (arm 100:5 (lit 100:5 ~) (crash 100:7))
243− (arm 101:5
244− (cell 101:5 (lit 101:6 ~) (bind 101:8 product))
245− (wing 101:17 p.product))))))
246− (mold 103:1 lone
247− (generic 103:9 A
248− (cell 103:16
249− (face 103:17 p (tvar 103:19 A)))))
250− (mold 105:1 lest
251− (generic 105:9 A
252− (cell 105:16
253− (face 105:17 i (tvar 105:19 A))
254− (face 105:21 t
255− (apply 105:23 list (tvar 105:29 A))))))
256− (mold 107:1 pole
257− (generic 107:9 A
258− (union 108:3
259− (const 108:3 ~)
260− (cell 109:3
261− (tvar 109:4 A)
262− (apply 109:6 pole (tvar 109:12 A))))))
263− (mold 111:1 quip
264− (generic 111:9 A B
265− (cell 111:18
266− (apply 111:19 list (tvar 111:25 A))
267− (tvar 111:28 B))))
268− (mold 113:1 tree
269− (generic 113:9 A
270− (union 114:3
271− (const 114:3 ~)
272− (cell 115:3
273− (face 115:4 n (tvar 115:6 A))
274− (face 115:8 l
275− (apply 115:10 tree (tvar 115:16 A)))
276− (face 115:19 r
277− (apply 115:21 tree (tvar 115:27 A)))))))
278− (mold 117:1 each
279− (generic 117:9 A B
280− (union 118:3
281− (cell 118:3
282− (const 118:4 %|)
283− (face 118:7 p (tvar 118:9 B)))
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
250+ (generic 104:9 A
251+ (cell 104:16
252+ (face 104:17 p (tvar 104:19 A)))))
253+ (mold 106:1 lest
254+ (generic 106:9 A
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
284284 (cell 119:3
285− (const 119:4 %&)
286− (face 119:7 p (tvar 119:9 A))))))
287− (mold 121:1 bloq (aura 121:9 @)))
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-3g-basic/source.jibb+4−3
@@ -45,9 +45,10 @@
4545++ turn |= args=[(list A) $-(A B)]
4646 ?- args
4747 [xs f]
48− ?- xs
49− ~ ~
50− [item rest] [(f item) (turn rest f)]
48+ ^- (list B)
49+ ?- xs
50+ ~ ~
51+ [item rest] [(f item) (turn rest f)]
5152
5253+$ dime [p=@ta q=@]
5354
tests/golden/prelude-3g-basic/tokens.txt+101−94
@@ -244,104 +244,111 @@
24424447:9 name f
24524547:10 tight glyph ]
24624648:7 INDENT
247−48:7 glyph ?-
248−48:10 name xs
247+48:7 glyph ^-
248+48:10 glyph (
249+48:11 tight name list
250+48:16 tvar B
251+48:17 tight glyph )
24925249:9 INDENT
250−49:9 lit ~
251−49:11 lit ~
252−50:9 NEWLINE
253−50:9 glyph [
254−50:10 tight name item
255−50:15 name rest
256−50:19 tight glyph ]
257−50:21 glyph [
258−50:22 tight glyph (
259−50:23 tight name f
260−50:25 name item
261−50:29 tight glyph )
262−50:31 glyph (
263−50:32 tight name turn
264−50:37 name rest
265−50:42 name f
266−50:43 tight glyph )
267−50:44 tight glyph ]
268−52:1 DEDENT
269−52:1 DEDENT
270−52:1 DEDENT
271−52:1 DEDENT
272−52:1 NEWLINE
273−52:1 glyph +$
274−52:4 name dime
275−52:9 glyph [
276−52:10 tight name p
277−52:11 tight glyph =
278−52:12 tight aura @ta
279−52:16 name q
280−52:17 tight glyph =
281−52:18 tight aura @
282−52:19 tight glyph ]
283−54:1 NEWLINE
284−54:1 glyph +$
285−54:4 name hair
286−54:9 glyph [
287−54:10 tight name p
288−54:11 tight glyph =
289−54:12 tight aura @ud
290−54:16 name q
291−54:17 tight glyph =
292−54:18 tight aura @ud
293−54:21 tight glyph ]
294−56:1 NEWLINE
295−56:1 glyph +$
296−56:4 name pint
297−56:9 glyph [
298−56:10 tight name p
299−56:11 tight glyph =
300−56:12 tight glyph [
301−56:13 tight name p
302−56:14 tight glyph =
303−56:15 tight aura @
304−56:17 name q
305−56:18 tight glyph =
306−56:19 tight aura @
307−56:20 tight glyph ]
308−56:22 name q
309−56:23 tight glyph =
310−56:24 tight glyph [
311−56:25 tight name p
312−56:26 tight glyph =
313−56:27 tight aura @
314−56:29 name q
315−56:30 tight glyph =
316−56:31 tight aura @
317−56:32 tight glyph ]
318−56:33 tight glyph ]
319−58:1 NEWLINE
320−58:1 glyph +$
321−58:4 name coin
322−59:3 INDENT
323−59:3 glyph [
324−59:4 tight lit %$
325−59:7 name p
326−59:8 tight glyph =
327−59:9 tight name dime
328−59:13 tight glyph ]
329−60:3 NEWLINE
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
279+53:1 NEWLINE
280+53:1 glyph +$
281+53:4 name dime
282+53:9 glyph [
283+53:10 tight name p
284+53:11 tight glyph =
285+53:12 tight aura @ta
286+53:16 name q
287+53:17 tight glyph =
288+53:18 tight aura @
289+53:19 tight glyph ]
290+55:1 NEWLINE
291+55:1 glyph +$
292+55:4 name hair
293+55:9 glyph [
294+55:10 tight name p
295+55:11 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 ]
301+57:1 NEWLINE
302+57:1 glyph +$
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 %blob
332−60:10 name p
333−60:11 tight glyph =
334−60:12 tight glyph *
331+60:4 tight lit %$
332+60:7 name p
333+60:8 tight glyph =
334+60:9 tight name dime
33533560:13 tight glyph ]
33633661:3 NEWLINE
33733761:3 glyph [
338−61:4 tight lit %many
338+61:4 tight lit %blob
33933961:10 name p
34034061:11 tight glyph =
341−61:12 tight glyph (
342−61:13 tight name list
343−61:18 name coin
344−61:22 tight glyph )
345−61:23 tight glyph ]
346−61:24 DEDENT
347−61:24 NEWLINE
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+41−38
@@ -111,43 +111,46 @@
111111 (arm 47:5
112112 (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
113113 (body 48:7
114− (branch 48:7
115− (wing 48:10 xs)
116− (arm 49:9 (lit 49:9 ~) (lit 49:11 ~))
117− (arm 50:9
118− (cell 50:9 (bind 50:10 item) (bind 50:15 rest))
119− (tuple 50:21
120− (group 50:22
121− (call 50:23 (wing 50:23 f) (wing 50:25 item)))
122− (group 50:31
123− (call 50:32 (wing 50:32 turn) (wing 50:37 rest) (wing 50:42 f))))))))))))
124− (mold 52:1 dime
125− (cell 52:9
126− (face 52:10 p (aura 52:12 @ta))
127− (face 52:16 q (aura 52:18 @))))
128− (mold 54:1 hair
129− (cell 54:9
130− (face 54:10 p (aura 54:12 @ud))
131− (face 54:16 q (aura 54:18 @ud))))
132− (mold 56:1 pint
133− (cell 56:9
134− (face 56:10 p
135− (cell 56:12
136− (face 56:13 p (aura 56:15 @))
137− (face 56:17 q (aura 56:19 @))))
138− (face 56:22 q
139− (cell 56:24
140− (face 56:25 p (aura 56:27 @))
141− (face 56:29 q (aura 56:31 @))))))
142− (mold 58:1 coin
143− (union 59:3
144− (cell 59:3
145− (const 59:4 %$)
146− (face 59:7 p (ref 59:9 dime)))
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
128+ (cell 53:9
129+ (face 53:10 p (aura 53:12 @ta))
130+ (face 53:16 q (aura 53:18 @))))
131+ (mold 55:1 hair
132+ (cell 55:9
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 %blob)
149− (face 60:10 p (noun 60:12)))
148+ (const 60:4 %$)
149+ (face 60:7 p (ref 60:9 dime)))
150150 (cell 61:3
151− (const 61:4 %many)
152− (face 61:10 p
153− (apply 61:12 list (ref 61:18 coin)))))))
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-like/source.jibb+4−3
@@ -45,9 +45,10 @@
4545++ turn |= args=[(list A) $-(A B)]
4646 ?- args
4747 [xs f]
48− ?- xs
49− ~ ~
50− [item rest] [(f item) (turn rest f)]
48+ ^- (list B)
49+ ?- xs
50+ ~ ~
51+ [item rest] [(f item) (turn rest f)]
5152
5253+$ dime [p=@ta q=@]
5354
tests/golden/prelude-3g-like/tokens.txt+339−332
@@ -244,363 +244,370 @@
24424447:9 name f
24524547:10 tight glyph ]
24624648:7 INDENT
247−48:7 glyph ?-
248−48:10 name xs
247+48:7 glyph ^-
248+48:10 glyph (
249+48:11 tight name list
250+48:16 tvar B
251+48:17 tight glyph )
24925249:9 INDENT
250−49:9 lit ~
251−49:11 lit ~
252−50:9 NEWLINE
253−50:9 glyph [
254−50:10 tight name item
255−50:15 name rest
256−50:19 tight glyph ]
257−50:21 glyph [
258−50:22 tight glyph (
259−50:23 tight name f
260−50:25 name item
261−50:29 tight glyph )
262−50:31 glyph (
263−50:32 tight name turn
264−50:37 name rest
265−50:42 name f
266−50:43 tight glyph )
267−50:44 tight glyph ]
268−52:1 DEDENT
269−52:1 DEDENT
270−52:1 DEDENT
271−52:1 DEDENT
272−52:1 NEWLINE
273−52:1 glyph +$
274−52:4 name dime
275−52:9 glyph [
276−52:10 tight name p
277−52:11 tight glyph =
278−52:12 tight aura @ta
279−52:16 name q
280−52:17 tight glyph =
281−52:18 tight aura @
282−52:19 tight glyph ]
283−54:1 NEWLINE
284−54:1 glyph +$
285−54:4 name hair
286−54:9 glyph [
287−54:10 tight name p
288−54:11 tight glyph =
289−54:12 tight aura @ud
290−54:16 name q
291−54:17 tight glyph =
292−54:18 tight aura @ud
293−54:21 tight glyph ]
294−56:1 NEWLINE
295−56:1 glyph +$
296−56:4 name pint
297−56:9 glyph [
298−56:10 tight name p
299−56:11 tight glyph =
300−56:12 tight glyph [
301−56:13 tight name p
302−56:14 tight glyph =
303−56:15 tight aura @
304−56:17 name q
305−56:18 tight glyph =
306−56:19 tight aura @
307−56:20 tight glyph ]
308−56:22 name q
309−56:23 tight glyph =
310−56:24 tight glyph [
311−56:25 tight name p
312−56:26 tight glyph =
313−56:27 tight aura @
314−56:29 name q
315−56:30 tight glyph =
316−56:31 tight aura @
317−56:32 tight glyph ]
318−56:33 tight glyph ]
319−58:1 NEWLINE
320−58:1 glyph +$
321−58:4 name coin
322−59:3 INDENT
323−59:3 glyph [
324−59:4 tight lit %$
325−59:7 name p
326−59:8 tight glyph =
327−59:9 tight name dime
328−59:13 tight glyph ]
329−60:3 NEWLINE
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
279+53:1 NEWLINE
280+53:1 glyph +$
281+53:4 name dime
282+53:9 glyph [
283+53:10 tight name p
284+53:11 tight glyph =
285+53:12 tight aura @ta
286+53:16 name q
287+53:17 tight glyph =
288+53:18 tight aura @
289+53:19 tight glyph ]
290+55:1 NEWLINE
291+55:1 glyph +$
292+55:4 name hair
293+55:9 glyph [
294+55:10 tight name p
295+55:11 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 ]
301+57:1 NEWLINE
302+57:1 glyph +$
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 %blob
332−60:10 name p
333−60:11 tight glyph =
334−60:12 tight glyph *
331+60:4 tight lit %$
332+60:7 name p
333+60:8 tight glyph =
334+60:9 tight name dime
33533560:13 tight glyph ]
33633661:3 NEWLINE
33733761:3 glyph [
338−61:4 tight lit %many
338+61:4 tight lit %blob
33933961:10 name p
34034061:11 tight glyph =
341−61:12 tight glyph (
342−61:13 tight name list
343−61:18 name coin
344−61:22 tight glyph )
345−61:23 tight glyph ]
346−63:1 DEDENT
347−63:1 NEWLINE
348−63:1 glyph +$
349−63:4 name pair
350−63:9 glyph |$
351−63:12 glyph [
352−63:13 tight tvar A
353−63:15 tvar B
354−63:16 tight glyph ]
355−63:18 glyph [
356−63:19 tight name p
357−63:20 tight glyph =
358−63:21 tight tvar A
359−63:23 name q
360−63:24 tight glyph =
361−63:25 tight tvar B
362−63:26 tight glyph ]
363−65:1 NEWLINE
364−65:1 glyph +$
365−65:4 name trel
366−65:9 glyph |$
367−65:12 glyph [
368−65:13 tight tvar A
369−65:15 tvar B
370−65:17 tvar C
371−65:18 tight glyph ]
372−65:20 glyph [
373−65:21 tight name p
374−65:22 tight glyph =
375−65:23 tight tvar A
376−65:25 name q
377−65:26 tight glyph =
378−65:27 tight tvar B
379−65:29 name r
380−65:30 tight glyph =
381−65:31 tight tvar C
382−65:32 tight glyph ]
383−67:1 NEWLINE
384−67:1 glyph +$
385−67:4 name qual
386−67:9 glyph |$
387−67:12 glyph [
388−67:13 tight tvar A
389−67:15 tvar B
390−67:17 tvar C
391−67:19 tvar D
392−67:20 tight glyph ]
393−67:22 glyph [
394−67:23 tight name p
395−67:24 tight glyph =
396−67:25 tight tvar A
397−67:27 name q
398−67:28 tight glyph =
399−67:29 tight tvar B
400−67:31 name r
401−67:32 tight glyph =
402−67:33 tight tvar C
403−67:35 name s
404−67:36 tight glyph =
405−67:37 tight tvar D
406−67:38 tight glyph ]
407−69:1 NEWLINE
408−69:1 glyph +$
409−69:4 name cord
410−69:9 aura @t
411−71:1 NEWLINE
412−71:1 glyph +$
413−71:4 name knot
414−71:9 aura @ta
415−73:1 NEWLINE
416−73:1 glyph +$
417−73:4 name tape
418−73:9 glyph (
419−73:10 tight name list
420−73:15 aura @tD
421−73:18 tight glyph )
422−75:1 NEWLINE
423−75:1 glyph +$
424−75:4 name path
425−75:9 glyph (
426−75:10 tight name list
427−75:15 name knot
428−75:19 tight glyph )
429−77:1 NEWLINE
430−77:1 glyph +$
431−77:4 name tank
432−78:3 INDENT
433−78:3 name cord
434−79:3 NEWLINE
435−79:3 glyph [
436−79:4 tight lit %leaf
437−79:10 name p
438−79:11 tight glyph =
439−79:12 tight name tape
440−79:16 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
354+64:1 NEWLINE
355+64:1 glyph +$
356+64:4 name pair
357+64:9 glyph |$
358+64:12 glyph [
359+64:13 tight tvar A
360+64:15 tvar B
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 ]
370+66:1 NEWLINE
371+66:1 glyph +$
372+66:4 name trel
373+66:9 glyph |$
374+66:12 glyph [
375+66:13 tight tvar A
376+66:15 tvar B
377+66:17 tvar C
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 ]
390+68:1 NEWLINE
391+68:1 glyph +$
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 ]
414+70:1 NEWLINE
415+70:1 glyph +$
416+70:4 name cord
417+70:9 aura @t
418+72:1 NEWLINE
419+72:1 glyph +$
420+72:4 name knot
421+72:9 aura @ta
422+74:1 NEWLINE
423+74:1 glyph +$
424+74:4 name tape
425+74:9 glyph (
426+74:10 tight name list
427+74:15 aura @tD
428+74:18 tight glyph )
429+76:1 NEWLINE
430+76:1 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
44144180:3 NEWLINE
44244280:3 glyph [
443−80:4 tight lit %palm
443+80:4 tight lit %leaf
44444480:10 name p
44544580:11 tight glyph =
446−80:12 tight glyph (
447−80:13 tight name qual
448−80:18 name tape
449−80:23 name tape
450−80:28 name tape
451−80:33 name tape
452−80:37 tight glyph )
453−80:39 name q
454−80:40 tight glyph =
455−80:41 tight glyph (
456−80:42 tight name list
457−80:47 name tank
458−80:51 tight glyph )
459−80:52 tight glyph ]
446+80:12 tight name tape
447+80:16 tight glyph ]
46044881:3 NEWLINE
46144981:3 glyph [
462−81:4 tight lit %rose
450+81:4 tight lit %palm
46345181:10 name p
46445281:11 tight glyph =
46545381:12 tight glyph (
466−81:13 tight name trel
454+81:13 tight name qual
46745581:18 name tape
46845681:23 name tape
46945781:28 name tape
470−81:32 tight glyph )
471−81:34 name q
472−81:35 tight glyph =
473−81:36 tight glyph (
474−81:37 tight name list
475−81:42 name tank
476−81:46 tight glyph )
477−81:47 tight glyph ]
478−83:1 DEDENT
479−83:1 NEWLINE
480−83:1 glyph +$
481−83:4 name nail
482−83:9 glyph [
483−83:10 tight name p
484−83:11 tight glyph =
485−83:12 tight name hair
486−83:17 name q
487−83:18 tight glyph =
488−83:19 tight name tape
489−83:23 tight glyph ]
490−85:1 NEWLINE
491−85:1 glyph +$
492−85:4 name edge
493−85:9 glyph [
494−85:10 tight name p
495−85:11 tight glyph =
496−85:12 tight name hair
497−85:17 name q
498−85:18 tight glyph =
499−85:19 tight glyph (
500−85:20 tight name unit
501−85:25 glyph [
502−85:26 tight name p
503−85:27 tight glyph =
504−85:28 tight glyph *
505−85:30 name q
506−85:31 tight glyph =
507−85:32 tight name nail
508−85:36 tight glyph ]
509−85:37 tight glyph )
510−85:38 tight glyph ]
511−87:1 NEWLINE
512−87:1 glyph +$
513−87:4 name rule
514−87:9 glyph $-(
515−87:12 tight name nail
516−87:17 name edge
517−87:21 tight glyph )
518−89:1 NEWLINE
519−89:1 glyph +$
520−89:4 name spot
521−89:9 glyph [
522−89:10 tight name p
523−89:11 tight glyph =
524−89:12 tight name path
525−89:17 name q
526−89:18 tight glyph =
527−89:19 tight name pint
528−89:23 tight glyph ]
529−91:1 NEWLINE
530−91:1 glyph +$
531−91:4 name toon
532−92:3 INDENT
533−92:3 glyph [
534−92:4 tight lit %0
535−92:7 name p
536−92:8 tight glyph =
537−92:9 tight glyph *
538−92:10 tight glyph ]
539−93:3 NEWLINE
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
471+82:11 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
486+84:1 NEWLINE
487+84:1 glyph +$
488+84:4 name nail
489+84:9 glyph [
490+84:10 tight name p
491+84:11 tight glyph =
492+84:12 tight name hair
493+84:17 name q
494+84:18 tight glyph =
495+84:19 tight name tape
496+84:23 tight glyph ]
497+86:1 NEWLINE
498+86:1 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 ]
518+88:1 NEWLINE
519+88:1 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 )
525+90:1 NEWLINE
526+90:1 glyph +$
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 %1
541+93:4 tight lit %0
54254293:7 name p
54354393:8 tight glyph =
54454493:9 tight glyph *
54554593:10 tight glyph ]
54654694:3 NEWLINE
54754794:3 glyph [
548−94:4 tight lit %2
548+94:4 tight lit %1
54954994:7 name p
55055094:8 tight glyph =
551−94:9 tight glyph (
552−94:10 tight name list
553−94:15 name tank
554−94:19 tight glyph )
555−94:20 tight glyph ]
556−96:1 DEDENT
557−96:1 NEWLINE
558−96:1 glyph +$
559−96:4 name like
560−96:9 glyph |$
561−96:12 glyph [
562−96:13 tight tvar A
563−96:14 tight glyph ]
564−96:16 glyph [
565−96:17 tight name p
566−96:18 tight glyph =
567−96:19 tight name hair
568−96:24 name q
569−96:25 tight glyph =
570−96:26 tight glyph (
571−96:27 tight name unit
572−96:32 glyph [
573−96:33 tight name p
574−96:34 tight glyph =
575−96:35 tight tvar A
576−96:37 name q
577−96:38 tight glyph =
578−96:39 tight name nail
579−96:43 tight glyph ]
580−96:44 tight glyph )
581−96:45 tight glyph ]
582−98:1 NEWLINE
583−98:1 glyph ++
584−98:4 name wonk
585−98:9 glyph |=
586−98:12 name veq
587−98:15 tight glyph =
588−98:16 tight glyph (
589−98:17 tight name like
590−98:22 tvar A
591−98:23 tight glyph )
592−99:3 INDENT
593−99:3 glyph ?-
594−99:6 wing q.veq
595−100:5 INDENT
596−100:5 lit ~
597−100:7 glyph !!
598−101:5 NEWLINE
599−101:5 glyph [
600−101:6 tight lit ~
601−101:8 name product
602−101:15 tight glyph ]
603−101:17 wing p.product
604−101:26 DEDENT
605−101:26 DEDENT
606−101:26 NEWLINE
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
564+97:1 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+127−124
@@ -111,135 +111,138 @@
111111 (arm 47:5
112112 (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
113113 (body 48:7
114− (branch 48:7
115− (wing 48:10 xs)
116− (arm 49:9 (lit 49:9 ~) (lit 49:11 ~))
117− (arm 50:9
118− (cell 50:9 (bind 50:10 item) (bind 50:15 rest))
119− (tuple 50:21
120− (group 50:22
121− (call 50:23 (wing 50:23 f) (wing 50:25 item)))
122− (group 50:31
123− (call 50:32 (wing 50:32 turn) (wing 50:37 rest) (wing 50:42 f))))))))))))
124− (mold 52:1 dime
125− (cell 52:9
126− (face 52:10 p (aura 52:12 @ta))
127− (face 52:16 q (aura 52:18 @))))
128− (mold 54:1 hair
129− (cell 54:9
130− (face 54:10 p (aura 54:12 @ud))
131− (face 54:16 q (aura 54:18 @ud))))
132− (mold 56:1 pint
133− (cell 56:9
134− (face 56:10 p
135− (cell 56:12
136− (face 56:13 p (aura 56:15 @))
137− (face 56:17 q (aura 56:19 @))))
138− (face 56:22 q
139− (cell 56:24
140− (face 56:25 p (aura 56:27 @))
141− (face 56:29 q (aura 56:31 @))))))
142− (mold 58:1 coin
143− (union 59:3
144− (cell 59:3
145− (const 59:4 %$)
146− (face 59:7 p (ref 59:9 dime)))
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
128+ (cell 53:9
129+ (face 53:10 p (aura 53:12 @ta))
130+ (face 53:16 q (aura 53:18 @))))
131+ (mold 55:1 hair
132+ (cell 55:9
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 %blob)
149− (face 60:10 p (noun 60:12)))
148+ (const 60:4 %$)
149+ (face 60:7 p (ref 60:9 dime)))
150150 (cell 61:3
151− (const 61:4 %many)
152− (face 61:10 p
153− (apply 61:12 list (ref 61:18 coin))))))
154− (mold 63:1 pair
155− (generic 63:9 A B
156− (cell 63:18
157− (face 63:19 p (tvar 63:21 A))
158− (face 63:23 q (tvar 63:25 B)))))
159− (mold 65:1 trel
160− (generic 65:9 A B C
161− (cell 65:20
162− (face 65:21 p (tvar 65:23 A))
163− (face 65:25 q (tvar 65:27 B))
164− (face 65:29 r (tvar 65:31 C)))))
165− (mold 67:1 qual
166− (generic 67:9 A B C D
167− (cell 67:22
168− (face 67:23 p (tvar 67:25 A))
169− (face 67:27 q (tvar 67:29 B))
170− (face 67:31 r (tvar 67:33 C))
171− (face 67:35 s (tvar 67:37 D)))))
172− (mold 69:1 cord (aura 69:9 @t))
173− (mold 71:1 knot (aura 71:9 @ta))
174− (mold 73:1 tape
175− (apply 73:9 list (aura 73:15 @tD)))
176− (mold 75:1 path
177− (apply 75:9 list (ref 75:15 knot)))
178− (mold 77:1 tank
179− (union 78:3
180− (ref 78:3 cord)
181− (cell 79:3
182− (const 79:4 %leaf)
183− (face 79:10 p (ref 79:12 tape)))
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)
184184 (cell 80:3
185− (const 80:4 %palm)
186− (face 80:10 p
187− (apply 80:12 qual (ref 80:18 tape) (ref 80:23 tape) (ref 80:28 tape) (ref 80:33 tape)))
188− (face 80:39 q
189− (apply 80:41 list (ref 80:47 tank))))
185+ (const 80:4 %leaf)
186+ (face 80:10 p (ref 80:12 tape)))
190187 (cell 81:3
191− (const 81:4 %rose)
188+ (const 81:4 %palm)
192189 (face 81:10 p
193− (apply 81:12 trel (ref 81:18 tape) (ref 81:23 tape) (ref 81:28 tape)))
194− (face 81:34 q
195− (apply 81:36 list (ref 81:42 tank))))))
196− (mold 83:1 nail
197− (cell 83:9
198− (face 83:10 p (ref 83:12 hair))
199− (face 83:17 q (ref 83:19 tape))))
200− (mold 85:1 edge
201− (cell 85:9
202− (face 85:10 p (ref 85:12 hair))
203− (face 85:17 q
204− (apply 85:19 unit
205− (cell 85:25
206− (face 85:26 p (noun 85:28))
207− (face 85:30 q (ref 85:32 nail)))))))
208− (mold 87:1 rule
209− (fn 87:9 (ref 87:12 nail) (ref 87:17 edge)))
210− (mold 89:1 spot
211− (cell 89:9
212− (face 89:10 p (ref 89:12 path))
213− (face 89:17 q (ref 89:19 pint))))
214− (mold 91:1 toon
215− (union 92:3
216− (cell 92:3
217− (const 92:4 %0)
218− (face 92:7 p (noun 92:9)))
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
200+ (cell 84:9
201+ (face 84:10 p (ref 84:12 hair))
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 %1)
220+ (const 93:4 %0)
221221 (face 93:7 p (noun 93:9)))
222222 (cell 94:3
223− (const 94:4 %2)
224− (face 94:7 p
225− (apply 94:9 list (ref 94:15 tank))))))
226− (mold 96:1 like
227− (generic 96:9 A
228− (cell 96:16
229− (face 96:17 p (ref 96:19 hair))
230− (face 96:24 q
231− (apply 96:26 unit
232− (cell 96:32
233− (face 96:33 p (tvar 96:35 A))
234− (face 96:37 q (ref 96:39 nail))))))))
235− (value 98:1 wonk
236− (gate 98:9
237− (face 98:12 veq
238− (apply 98:16 like (tvar 98:22 A)))
239− (body 99:3
240− (branch 99:3
241− (wing 99:6 q.veq)
242− (arm 100:5 (lit 100:5 ~) (crash 100:7))
243− (arm 101:5
244− (cell 101:5 (lit 101:6 ~) (bind 101:8 product))
245− (wing 101:17 p.product)))))))
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-structural/source.jibb+4−3
@@ -45,9 +45,10 @@
4545++ turn |= args=[(list A) $-(A B)]
4646 ?- args
4747 [xs f]
48− ?- xs
49− ~ ~
50− [item rest] [(f item) (turn rest f)]
48+ ^- (list B)
49+ ?- xs
50+ ~ ~
51+ [item rest] [(f item) (turn rest f)]
5152
5253+$ dime [p=@ta q=@]
5354
tests/golden/prelude-3g-structural/tokens.txt+290−283
@@ -244,314 +244,321 @@
24424447:9 name f
24524547:10 tight glyph ]
24624648:7 INDENT
247−48:7 glyph ?-
248−48:10 name xs
247+48:7 glyph ^-
248+48:10 glyph (
249+48:11 tight name list
250+48:16 tvar B
251+48:17 tight glyph )
24925249:9 INDENT
250−49:9 lit ~
251−49:11 lit ~
252−50:9 NEWLINE
253−50:9 glyph [
254−50:10 tight name item
255−50:15 name rest
256−50:19 tight glyph ]
257−50:21 glyph [
258−50:22 tight glyph (
259−50:23 tight name f
260−50:25 name item
261−50:29 tight glyph )
262−50:31 glyph (
263−50:32 tight name turn
264−50:37 name rest
265−50:42 name f
266−50:43 tight glyph )
267−50:44 tight glyph ]
268−52:1 DEDENT
269−52:1 DEDENT
270−52:1 DEDENT
271−52:1 DEDENT
272−52:1 NEWLINE
273−52:1 glyph +$
274−52:4 name dime
275−52:9 glyph [
276−52:10 tight name p
277−52:11 tight glyph =
278−52:12 tight aura @ta
279−52:16 name q
280−52:17 tight glyph =
281−52:18 tight aura @
282−52:19 tight glyph ]
283−54:1 NEWLINE
284−54:1 glyph +$
285−54:4 name hair
286−54:9 glyph [
287−54:10 tight name p
288−54:11 tight glyph =
289−54:12 tight aura @ud
290−54:16 name q
291−54:17 tight glyph =
292−54:18 tight aura @ud
293−54:21 tight glyph ]
294−56:1 NEWLINE
295−56:1 glyph +$
296−56:4 name pint
297−56:9 glyph [
298−56:10 tight name p
299−56:11 tight glyph =
300−56:12 tight glyph [
301−56:13 tight name p
302−56:14 tight glyph =
303−56:15 tight aura @
304−56:17 name q
305−56:18 tight glyph =
306−56:19 tight aura @
307−56:20 tight glyph ]
308−56:22 name q
309−56:23 tight glyph =
310−56:24 tight glyph [
311−56:25 tight name p
312−56:26 tight glyph =
313−56:27 tight aura @
314−56:29 name q
315−56:30 tight glyph =
316−56:31 tight aura @
317−56:32 tight glyph ]
318−56:33 tight glyph ]
319−58:1 NEWLINE
320−58:1 glyph +$
321−58:4 name coin
322−59:3 INDENT
323−59:3 glyph [
324−59:4 tight lit %$
325−59:7 name p
326−59:8 tight glyph =
327−59:9 tight name dime
328−59:13 tight glyph ]
329−60:3 NEWLINE
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
279+53:1 NEWLINE
280+53:1 glyph +$
281+53:4 name dime
282+53:9 glyph [
283+53:10 tight name p
284+53:11 tight glyph =
285+53:12 tight aura @ta
286+53:16 name q
287+53:17 tight glyph =
288+53:18 tight aura @
289+53:19 tight glyph ]
290+55:1 NEWLINE
291+55:1 glyph +$
292+55:4 name hair
293+55:9 glyph [
294+55:10 tight name p
295+55:11 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 ]
301+57:1 NEWLINE
302+57:1 glyph +$
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 %blob
332−60:10 name p
333−60:11 tight glyph =
334−60:12 tight glyph *
331+60:4 tight lit %$
332+60:7 name p
333+60:8 tight glyph =
334+60:9 tight name dime
33533560:13 tight glyph ]
33633661:3 NEWLINE
33733761:3 glyph [
338−61:4 tight lit %many
338+61:4 tight lit %blob
33933961:10 name p
34034061:11 tight glyph =
341−61:12 tight glyph (
342−61:13 tight name list
343−61:18 name coin
344−61:22 tight glyph )
345−61:23 tight glyph ]
346−63:1 DEDENT
347−63:1 NEWLINE
348−63:1 glyph +$
349−63:4 name pair
350−63:9 glyph |$
351−63:12 glyph [
352−63:13 tight tvar A
353−63:15 tvar B
354−63:16 tight glyph ]
355−63:18 glyph [
356−63:19 tight name p
357−63:20 tight glyph =
358−63:21 tight tvar A
359−63:23 name q
360−63:24 tight glyph =
361−63:25 tight tvar B
362−63:26 tight glyph ]
363−65:1 NEWLINE
364−65:1 glyph +$
365−65:4 name trel
366−65:9 glyph |$
367−65:12 glyph [
368−65:13 tight tvar A
369−65:15 tvar B
370−65:17 tvar C
371−65:18 tight glyph ]
372−65:20 glyph [
373−65:21 tight name p
374−65:22 tight glyph =
375−65:23 tight tvar A
376−65:25 name q
377−65:26 tight glyph =
378−65:27 tight tvar B
379−65:29 name r
380−65:30 tight glyph =
381−65:31 tight tvar C
382−65:32 tight glyph ]
383−67:1 NEWLINE
384−67:1 glyph +$
385−67:4 name qual
386−67:9 glyph |$
387−67:12 glyph [
388−67:13 tight tvar A
389−67:15 tvar B
390−67:17 tvar C
391−67:19 tvar D
392−67:20 tight glyph ]
393−67:22 glyph [
394−67:23 tight name p
395−67:24 tight glyph =
396−67:25 tight tvar A
397−67:27 name q
398−67:28 tight glyph =
399−67:29 tight tvar B
400−67:31 name r
401−67:32 tight glyph =
402−67:33 tight tvar C
403−67:35 name s
404−67:36 tight glyph =
405−67:37 tight tvar D
406−67:38 tight glyph ]
407−69:1 NEWLINE
408−69:1 glyph +$
409−69:4 name cord
410−69:9 aura @t
411−71:1 NEWLINE
412−71:1 glyph +$
413−71:4 name knot
414−71:9 aura @ta
415−73:1 NEWLINE
416−73:1 glyph +$
417−73:4 name tape
418−73:9 glyph (
419−73:10 tight name list
420−73:15 aura @tD
421−73:18 tight glyph )
422−75:1 NEWLINE
423−75:1 glyph +$
424−75:4 name path
425−75:9 glyph (
426−75:10 tight name list
427−75:15 name knot
428−75:19 tight glyph )
429−77:1 NEWLINE
430−77:1 glyph +$
431−77:4 name tank
432−78:3 INDENT
433−78:3 name cord
434−79:3 NEWLINE
435−79:3 glyph [
436−79:4 tight lit %leaf
437−79:10 name p
438−79:11 tight glyph =
439−79:12 tight name tape
440−79:16 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
354+64:1 NEWLINE
355+64:1 glyph +$
356+64:4 name pair
357+64:9 glyph |$
358+64:12 glyph [
359+64:13 tight tvar A
360+64:15 tvar B
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 ]
370+66:1 NEWLINE
371+66:1 glyph +$
372+66:4 name trel
373+66:9 glyph |$
374+66:12 glyph [
375+66:13 tight tvar A
376+66:15 tvar B
377+66:17 tvar C
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 ]
390+68:1 NEWLINE
391+68:1 glyph +$
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 ]
414+70:1 NEWLINE
415+70:1 glyph +$
416+70:4 name cord
417+70:9 aura @t
418+72:1 NEWLINE
419+72:1 glyph +$
420+72:4 name knot
421+72:9 aura @ta
422+74:1 NEWLINE
423+74:1 glyph +$
424+74:4 name tape
425+74:9 glyph (
426+74:10 tight name list
427+74:15 aura @tD
428+74:18 tight glyph )
429+76:1 NEWLINE
430+76:1 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
44144180:3 NEWLINE
44244280:3 glyph [
443−80:4 tight lit %palm
443+80:4 tight lit %leaf
44444480:10 name p
44544580:11 tight glyph =
446−80:12 tight glyph (
447−80:13 tight name qual
448−80:18 name tape
449−80:23 name tape
450−80:28 name tape
451−80:33 name tape
452−80:37 tight glyph )
453−80:39 name q
454−80:40 tight glyph =
455−80:41 tight glyph (
456−80:42 tight name list
457−80:47 name tank
458−80:51 tight glyph )
459−80:52 tight glyph ]
446+80:12 tight name tape
447+80:16 tight glyph ]
46044881:3 NEWLINE
46144981:3 glyph [
462−81:4 tight lit %rose
450+81:4 tight lit %palm
46345181:10 name p
46445281:11 tight glyph =
46545381:12 tight glyph (
466−81:13 tight name trel
454+81:13 tight name qual
46745581:18 name tape
46845681:23 name tape
46945781:28 name tape
470−81:32 tight glyph )
471−81:34 name q
472−81:35 tight glyph =
473−81:36 tight glyph (
474−81:37 tight name list
475−81:42 name tank
476−81:46 tight glyph )
477−81:47 tight glyph ]
478−83:1 DEDENT
479−83:1 NEWLINE
480−83:1 glyph +$
481−83:4 name nail
482−83:9 glyph [
483−83:10 tight name p
484−83:11 tight glyph =
485−83:12 tight name hair
486−83:17 name q
487−83:18 tight glyph =
488−83:19 tight name tape
489−83:23 tight glyph ]
490−85:1 NEWLINE
491−85:1 glyph +$
492−85:4 name edge
493−85:9 glyph [
494−85:10 tight name p
495−85:11 tight glyph =
496−85:12 tight name hair
497−85:17 name q
498−85:18 tight glyph =
499−85:19 tight glyph (
500−85:20 tight name unit
501−85:25 glyph [
502−85:26 tight name p
503−85:27 tight glyph =
504−85:28 tight glyph *
505−85:30 name q
506−85:31 tight glyph =
507−85:32 tight name nail
508−85:36 tight glyph ]
509−85:37 tight glyph )
510−85:38 tight glyph ]
511−87:1 NEWLINE
512−87:1 glyph +$
513−87:4 name rule
514−87:9 glyph $-(
515−87:12 tight name nail
516−87:17 name edge
517−87:21 tight glyph )
518−89:1 NEWLINE
519−89:1 glyph +$
520−89:4 name spot
521−89:9 glyph [
522−89:10 tight name p
523−89:11 tight glyph =
524−89:12 tight name path
525−89:17 name q
526−89:18 tight glyph =
527−89:19 tight name pint
528−89:23 tight glyph ]
529−91:1 NEWLINE
530−91:1 glyph +$
531−91:4 name toon
532−92:3 INDENT
533−92:3 glyph [
534−92:4 tight lit %0
535−92:7 name p
536−92:8 tight glyph =
537−92:9 tight glyph *
538−92:10 tight glyph ]
539−93:3 NEWLINE
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
471+82:11 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
486+84:1 NEWLINE
487+84:1 glyph +$
488+84:4 name nail
489+84:9 glyph [
490+84:10 tight name p
491+84:11 tight glyph =
492+84:12 tight name hair
493+84:17 name q
494+84:18 tight glyph =
495+84:19 tight name tape
496+84:23 tight glyph ]
497+86:1 NEWLINE
498+86:1 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 ]
518+88:1 NEWLINE
519+88:1 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 )
525+90:1 NEWLINE
526+90:1 glyph +$
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 %1
541+93:4 tight lit %0
54254293:7 name p
54354393:8 tight glyph =
54454493:9 tight glyph *
54554593:10 tight glyph ]
54654694:3 NEWLINE
54754794:3 glyph [
548−94:4 tight lit %2
548+94:4 tight lit %1
54954994:7 name p
55055094:8 tight glyph =
551−94:9 tight glyph (
552−94:10 tight name list
553−94:15 name tank
554−94:19 tight glyph )
555−94:20 tight glyph ]
556−94:21 DEDENT
557−94:21 NEWLINE
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+107−104
@@ -111,115 +111,118 @@
111111 (arm 47:5
112112 (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
113113 (body 48:7
114− (branch 48:7
115− (wing 48:10 xs)
116− (arm 49:9 (lit 49:9 ~) (lit 49:11 ~))
117− (arm 50:9
118− (cell 50:9 (bind 50:10 item) (bind 50:15 rest))
119− (tuple 50:21
120− (group 50:22
121− (call 50:23 (wing 50:23 f) (wing 50:25 item)))
122− (group 50:31
123− (call 50:32 (wing 50:32 turn) (wing 50:37 rest) (wing 50:42 f))))))))))))
124− (mold 52:1 dime
125− (cell 52:9
126− (face 52:10 p (aura 52:12 @ta))
127− (face 52:16 q (aura 52:18 @))))
128− (mold 54:1 hair
129− (cell 54:9
130− (face 54:10 p (aura 54:12 @ud))
131− (face 54:16 q (aura 54:18 @ud))))
132− (mold 56:1 pint
133− (cell 56:9
134− (face 56:10 p
135− (cell 56:12
136− (face 56:13 p (aura 56:15 @))
137− (face 56:17 q (aura 56:19 @))))
138− (face 56:22 q
139− (cell 56:24
140− (face 56:25 p (aura 56:27 @))
141− (face 56:29 q (aura 56:31 @))))))
142− (mold 58:1 coin
143− (union 59:3
144− (cell 59:3
145− (const 59:4 %$)
146− (face 59:7 p (ref 59:9 dime)))
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
128+ (cell 53:9
129+ (face 53:10 p (aura 53:12 @ta))
130+ (face 53:16 q (aura 53:18 @))))
131+ (mold 55:1 hair
132+ (cell 55:9
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 %blob)
149− (face 60:10 p (noun 60:12)))
148+ (const 60:4 %$)
149+ (face 60:7 p (ref 60:9 dime)))
150150 (cell 61:3
151− (const 61:4 %many)
152− (face 61:10 p
153− (apply 61:12 list (ref 61:18 coin))))))
154− (mold 63:1 pair
155− (generic 63:9 A B
156− (cell 63:18
157− (face 63:19 p (tvar 63:21 A))
158− (face 63:23 q (tvar 63:25 B)))))
159− (mold 65:1 trel
160− (generic 65:9 A B C
161− (cell 65:20
162− (face 65:21 p (tvar 65:23 A))
163− (face 65:25 q (tvar 65:27 B))
164− (face 65:29 r (tvar 65:31 C)))))
165− (mold 67:1 qual
166− (generic 67:9 A B C D
167− (cell 67:22
168− (face 67:23 p (tvar 67:25 A))
169− (face 67:27 q (tvar 67:29 B))
170− (face 67:31 r (tvar 67:33 C))
171− (face 67:35 s (tvar 67:37 D)))))
172− (mold 69:1 cord (aura 69:9 @t))
173− (mold 71:1 knot (aura 71:9 @ta))
174− (mold 73:1 tape
175− (apply 73:9 list (aura 73:15 @tD)))
176− (mold 75:1 path
177− (apply 75:9 list (ref 75:15 knot)))
178− (mold 77:1 tank
179− (union 78:3
180− (ref 78:3 cord)
181− (cell 79:3
182− (const 79:4 %leaf)
183− (face 79:10 p (ref 79:12 tape)))
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)
184184 (cell 80:3
185− (const 80:4 %palm)
186− (face 80:10 p
187− (apply 80:12 qual (ref 80:18 tape) (ref 80:23 tape) (ref 80:28 tape) (ref 80:33 tape)))
188− (face 80:39 q
189− (apply 80:41 list (ref 80:47 tank))))
185+ (const 80:4 %leaf)
186+ (face 80:10 p (ref 80:12 tape)))
190187 (cell 81:3
191− (const 81:4 %rose)
188+ (const 81:4 %palm)
192189 (face 81:10 p
193− (apply 81:12 trel (ref 81:18 tape) (ref 81:23 tape) (ref 81:28 tape)))
194− (face 81:34 q
195− (apply 81:36 list (ref 81:42 tank))))))
196− (mold 83:1 nail
197− (cell 83:9
198− (face 83:10 p (ref 83:12 hair))
199− (face 83:17 q (ref 83:19 tape))))
200− (mold 85:1 edge
201− (cell 85:9
202− (face 85:10 p (ref 85:12 hair))
203− (face 85:17 q
204− (apply 85:19 unit
205− (cell 85:25
206− (face 85:26 p (noun 85:28))
207− (face 85:30 q (ref 85:32 nail)))))))
208− (mold 87:1 rule
209− (fn 87:9 (ref 87:12 nail) (ref 87:17 edge)))
210− (mold 89:1 spot
211− (cell 89:9
212− (face 89:10 p (ref 89:12 path))
213− (face 89:17 q (ref 89:19 pint))))
214− (mold 91:1 toon
215− (union 92:3
216− (cell 92:3
217− (const 92:4 %0)
218− (face 92:7 p (noun 92:9)))
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
200+ (cell 84:9
201+ (face 84:10 p (ref 84:12 hair))
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 %1)
220+ (const 93:4 %0)
221221 (face 93:7 p (noun 93:9)))
222222 (cell 94:3
223− (const 94:4 %2)
224− (face 94:7 p
225− (apply 94:9 list (ref 94:15 tank)))))))
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-list-helpers/source.jibb+4−3
@@ -45,9 +45,10 @@
4545++ turn |= args=[(list A) $-(A B)]
4646 ?- args
4747 [xs f]
48− ?- xs
49− ~ ~
50− [item rest] [(f item) (turn rest f)]
48+ ^- (list B)
49+ ?- xs
50+ ~ ~
51+ [item rest] [(f item) (turn rest f)]
5152
5253+$ dime [p=@ta q=@]
5354
tests/golden/prelude-list-helpers/tokens.txt+575−568
@@ -244,603 +244,610 @@
24424447:9 name f
24524547:10 tight glyph ]
24624648:7 INDENT
247−48:7 glyph ?-
248−48:10 name xs
247+48:7 glyph ^-
248+48:10 glyph (
249+48:11 tight name list
250+48:16 tvar B
251+48:17 tight glyph )
24925249:9 INDENT
250−49:9 lit ~
251−49:11 lit ~
252−50:9 NEWLINE
253−50:9 glyph [
254−50:10 tight name item
255−50:15 name rest
256−50:19 tight glyph ]
257−50:21 glyph [
258−50:22 tight glyph (
259−50:23 tight name f
260−50:25 name item
261−50:29 tight glyph )
262−50:31 glyph (
263−50:32 tight name turn
264−50:37 name rest
265−50:42 name f
266−50:43 tight glyph )
267−50:44 tight glyph ]
268−52:1 DEDENT
269−52:1 DEDENT
270−52:1 DEDENT
271−52:1 DEDENT
272−52:1 NEWLINE
273−52:1 glyph +$
274−52:4 name dime
275−52:9 glyph [
276−52:10 tight name p
277−52:11 tight glyph =
278−52:12 tight aura @ta
279−52:16 name q
280−52:17 tight glyph =
281−52:18 tight aura @
282−52:19 tight glyph ]
283−54:1 NEWLINE
284−54:1 glyph +$
285−54:4 name hair
286−54:9 glyph [
287−54:10 tight name p
288−54:11 tight glyph =
289−54:12 tight aura @ud
290−54:16 name q
291−54:17 tight glyph =
292−54:18 tight aura @ud
293−54:21 tight glyph ]
294−56:1 NEWLINE
295−56:1 glyph +$
296−56:4 name pint
297−56:9 glyph [
298−56:10 tight name p
299−56:11 tight glyph =
300−56:12 tight glyph [
301−56:13 tight name p
302−56:14 tight glyph =
303−56:15 tight aura @
304−56:17 name q
305−56:18 tight glyph =
306−56:19 tight aura @
307−56:20 tight glyph ]
308−56:22 name q
309−56:23 tight glyph =
310−56:24 tight glyph [
311−56:25 tight name p
312−56:26 tight glyph =
313−56:27 tight aura @
314−56:29 name q
315−56:30 tight glyph =
316−56:31 tight aura @
317−56:32 tight glyph ]
318−56:33 tight glyph ]
319−58:1 NEWLINE
320−58:1 glyph +$
321−58:4 name coin
322−59:3 INDENT
323−59:3 glyph [
324−59:4 tight lit %$
325−59:7 name p
326−59:8 tight glyph =
327−59:9 tight name dime
328−59:13 tight glyph ]
329−60:3 NEWLINE
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
279+53:1 NEWLINE
280+53:1 glyph +$
281+53:4 name dime
282+53:9 glyph [
283+53:10 tight name p
284+53:11 tight glyph =
285+53:12 tight aura @ta
286+53:16 name q
287+53:17 tight glyph =
288+53:18 tight aura @
289+53:19 tight glyph ]
290+55:1 NEWLINE
291+55:1 glyph +$
292+55:4 name hair
293+55:9 glyph [
294+55:10 tight name p
295+55:11 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 ]
301+57:1 NEWLINE
302+57:1 glyph +$
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 %blob
332−60:10 name p
333−60:11 tight glyph =
334−60:12 tight glyph *
331+60:4 tight lit %$
332+60:7 name p
333+60:8 tight glyph =
334+60:9 tight name dime
33533560:13 tight glyph ]
33633661:3 NEWLINE
33733761:3 glyph [
338−61:4 tight lit %many
338+61:4 tight lit %blob
33933961:10 name p
34034061:11 tight glyph =
341−61:12 tight glyph (
342−61:13 tight name list
343−61:18 name coin
344−61:22 tight glyph )
345−61:23 tight glyph ]
346−63:1 DEDENT
347−63:1 NEWLINE
348−63:1 glyph +$
349−63:4 name pair
350−63:9 glyph |$
351−63:12 glyph [
352−63:13 tight tvar A
353−63:15 tvar B
354−63:16 tight glyph ]
355−63:18 glyph [
356−63:19 tight name p
357−63:20 tight glyph =
358−63:21 tight tvar A
359−63:23 name q
360−63:24 tight glyph =
361−63:25 tight tvar B
362−63:26 tight glyph ]
363−65:1 NEWLINE
364−65:1 glyph +$
365−65:4 name trel
366−65:9 glyph |$
367−65:12 glyph [
368−65:13 tight tvar A
369−65:15 tvar B
370−65:17 tvar C
371−65:18 tight glyph ]
372−65:20 glyph [
373−65:21 tight name p
374−65:22 tight glyph =
375−65:23 tight tvar A
376−65:25 name q
377−65:26 tight glyph =
378−65:27 tight tvar B
379−65:29 name r
380−65:30 tight glyph =
381−65:31 tight tvar C
382−65:32 tight glyph ]
383−67:1 NEWLINE
384−67:1 glyph +$
385−67:4 name qual
386−67:9 glyph |$
387−67:12 glyph [
388−67:13 tight tvar A
389−67:15 tvar B
390−67:17 tvar C
391−67:19 tvar D
392−67:20 tight glyph ]
393−67:22 glyph [
394−67:23 tight name p
395−67:24 tight glyph =
396−67:25 tight tvar A
397−67:27 name q
398−67:28 tight glyph =
399−67:29 tight tvar B
400−67:31 name r
401−67:32 tight glyph =
402−67:33 tight tvar C
403−67:35 name s
404−67:36 tight glyph =
405−67:37 tight tvar D
406−67:38 tight glyph ]
407−69:1 NEWLINE
408−69:1 glyph +$
409−69:4 name cord
410−69:9 aura @t
411−71:1 NEWLINE
412−71:1 glyph +$
413−71:4 name knot
414−71:9 aura @ta
415−73:1 NEWLINE
416−73:1 glyph +$
417−73:4 name tape
418−73:9 glyph (
419−73:10 tight name list
420−73:15 aura @tD
421−73:18 tight glyph )
422−75:1 NEWLINE
423−75:1 glyph +$
424−75:4 name path
425−75:9 glyph (
426−75:10 tight name list
427−75:15 name knot
428−75:19 tight glyph )
429−77:1 NEWLINE
430−77:1 glyph +$
431−77:4 name tank
432−78:3 INDENT
433−78:3 name cord
434−79:3 NEWLINE
435−79:3 glyph [
436−79:4 tight lit %leaf
437−79:10 name p
438−79:11 tight glyph =
439−79:12 tight name tape
440−79:16 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
354+64:1 NEWLINE
355+64:1 glyph +$
356+64:4 name pair
357+64:9 glyph |$
358+64:12 glyph [
359+64:13 tight tvar A
360+64:15 tvar B
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 ]
370+66:1 NEWLINE
371+66:1 glyph +$
372+66:4 name trel
373+66:9 glyph |$
374+66:12 glyph [
375+66:13 tight tvar A
376+66:15 tvar B
377+66:17 tvar C
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 ]
390+68:1 NEWLINE
391+68:1 glyph +$
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 ]
414+70:1 NEWLINE
415+70:1 glyph +$
416+70:4 name cord
417+70:9 aura @t
418+72:1 NEWLINE
419+72:1 glyph +$
420+72:4 name knot
421+72:9 aura @ta
422+74:1 NEWLINE
423+74:1 glyph +$
424+74:4 name tape
425+74:9 glyph (
426+74:10 tight name list
427+74:15 aura @tD
428+74:18 tight glyph )
429+76:1 NEWLINE
430+76:1 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
44144180:3 NEWLINE
44244280:3 glyph [
443−80:4 tight lit %palm
443+80:4 tight lit %leaf
44444480:10 name p
44544580:11 tight glyph =
446−80:12 tight glyph (
447−80:13 tight name qual
448−80:18 name tape
449−80:23 name tape
450−80:28 name tape
451−80:33 name tape
452−80:37 tight glyph )
453−80:39 name q
454−80:40 tight glyph =
455−80:41 tight glyph (
456−80:42 tight name list
457−80:47 name tank
458−80:51 tight glyph )
459−80:52 tight glyph ]
446+80:12 tight name tape
447+80:16 tight glyph ]
46044881:3 NEWLINE
46144981:3 glyph [
462−81:4 tight lit %rose
450+81:4 tight lit %palm
46345181:10 name p
46445281:11 tight glyph =
46545381:12 tight glyph (
466−81:13 tight name trel
454+81:13 tight name qual
46745581:18 name tape
46845681:23 name tape
46945781:28 name tape
470−81:32 tight glyph )
471−81:34 name q
472−81:35 tight glyph =
473−81:36 tight glyph (
474−81:37 tight name list
475−81:42 name tank
476−81:46 tight glyph )
477−81:47 tight glyph ]
478−83:1 DEDENT
479−83:1 NEWLINE
480−83:1 glyph +$
481−83:4 name nail
482−83:9 glyph [
483−83:10 tight name p
484−83:11 tight glyph =
485−83:12 tight name hair
486−83:17 name q
487−83:18 tight glyph =
488−83:19 tight name tape
489−83:23 tight glyph ]
490−85:1 NEWLINE
491−85:1 glyph +$
492−85:4 name edge
493−85:9 glyph [
494−85:10 tight name p
495−85:11 tight glyph =
496−85:12 tight name hair
497−85:17 name q
498−85:18 tight glyph =
499−85:19 tight glyph (
500−85:20 tight name unit
501−85:25 glyph [
502−85:26 tight name p
503−85:27 tight glyph =
504−85:28 tight glyph *
505−85:30 name q
506−85:31 tight glyph =
507−85:32 tight name nail
508−85:36 tight glyph ]
509−85:37 tight glyph )
510−85:38 tight glyph ]
511−87:1 NEWLINE
512−87:1 glyph +$
513−87:4 name rule
514−87:9 glyph $-(
515−87:12 tight name nail
516−87:17 name edge
517−87:21 tight glyph )
518−89:1 NEWLINE
519−89:1 glyph +$
520−89:4 name spot
521−89:9 glyph [
522−89:10 tight name p
523−89:11 tight glyph =
524−89:12 tight name path
525−89:17 name q
526−89:18 tight glyph =
527−89:19 tight name pint
528−89:23 tight glyph ]
529−91:1 NEWLINE
530−91:1 glyph +$
531−91:4 name toon
532−92:3 INDENT
533−92:3 glyph [
534−92:4 tight lit %0
535−92:7 name p
536−92:8 tight glyph =
537−92:9 tight glyph *
538−92:10 tight glyph ]
539−93:3 NEWLINE
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
471+82:11 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
486+84:1 NEWLINE
487+84:1 glyph +$
488+84:4 name nail
489+84:9 glyph [
490+84:10 tight name p
491+84:11 tight glyph =
492+84:12 tight name hair
493+84:17 name q
494+84:18 tight glyph =
495+84:19 tight name tape
496+84:23 tight glyph ]
497+86:1 NEWLINE
498+86:1 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 ]
518+88:1 NEWLINE
519+88:1 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 )
525+90:1 NEWLINE
526+90:1 glyph +$
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 %1
541+93:4 tight lit %0
54254293:7 name p
54354393:8 tight glyph =
54454493:9 tight glyph *
54554593:10 tight glyph ]
54654694:3 NEWLINE
54754794:3 glyph [
548−94:4 tight lit %2
548+94:4 tight lit %1
54954994:7 name p
55055094:8 tight glyph =
551−94:9 tight glyph (
552−94:10 tight name list
553−94:15 name tank
554−94:19 tight glyph )
555−94:20 tight glyph ]
556−96:1 DEDENT
557−96:1 NEWLINE
558−96:1 glyph +$
559−96:4 name like
560−96:9 glyph |$
561−96:12 glyph [
562−96:13 tight tvar A
563−96:14 tight glyph ]
564−96:16 glyph [
565−96:17 tight name p
566−96:18 tight glyph =
567−96:19 tight name hair
568−96:24 name q
569−96:25 tight glyph =
570−96:26 tight glyph (
571−96:27 tight name unit
572−96:32 glyph [
573−96:33 tight name p
574−96:34 tight glyph =
575−96:35 tight tvar A
576−96:37 name q
577−96:38 tight glyph =
578−96:39 tight name nail
579−96:43 tight glyph ]
580−96:44 tight glyph )
581−96:45 tight glyph ]
582−98:1 NEWLINE
583−98:1 glyph ++
584−98:4 name wonk
585−98:9 glyph |=
586−98:12 name veq
587−98:15 tight glyph =
588−98:16 tight glyph (
589−98:17 tight name like
590−98:22 tvar A
591−98:23 tight glyph )
592−99:3 INDENT
593−99:3 glyph ?-
594−99:6 wing q.veq
595−100:5 INDENT
596−100:5 lit ~
597−100:7 glyph !!
598−101:5 NEWLINE
599−101:5 glyph [
600−101:6 tight lit ~
601−101:8 name product
602−101:15 tight glyph ]
603−101:17 wing p.product
604−103:1 DEDENT
605−103:1 DEDENT
606−103:1 NEWLINE
607−103:1 glyph +$
608−103:4 name lone
609−103:9 glyph |$
610−103:12 glyph [
611−103:13 tight tvar A
612−103:14 tight glyph ]
613−103:16 glyph [
614−103:17 tight name p
615−103:18 tight glyph =
616−103:19 tight tvar A
617−103:20 tight glyph ]
618−105:1 NEWLINE
619−105:1 glyph +$
620−105:4 name lest
621−105:9 glyph |$
622−105:12 glyph [
623−105:13 tight tvar A
624−105:14 tight glyph ]
625−105:16 glyph [
626−105:17 tight name i
627−105:18 tight glyph =
628−105:19 tight tvar A
629−105:21 name t
630−105:22 tight glyph =
631−105:23 tight glyph (
632−105:24 tight name list
633−105:29 tvar A
634−105:30 tight glyph )
635−105:31 tight glyph ]
636−107:1 NEWLINE
637−107:1 glyph +$
638−107:4 name pole
639−107:9 glyph |$
640−107:12 glyph [
641−107:13 tight tvar A
642−107:14 tight glyph ]
643−108:3 INDENT
644−108:3 lit ~
645−109:3 NEWLINE
646−109:3 glyph [
647−109:4 tight tvar A
648−109:6 glyph (
649−109:7 tight name pole
650−109:12 tvar A
651−109:13 tight glyph )
652−109:14 tight glyph ]
653−111:1 DEDENT
654−111:1 NEWLINE
655−111:1 glyph +$
656−111:4 name quip
657−111:9 glyph |$
658−111:12 glyph [
659−111:13 tight tvar A
660−111:15 tvar B
661−111:16 tight glyph ]
662−111:18 glyph [
663−111:19 tight glyph (
664−111:20 tight name list
665−111:25 tvar A
666−111:26 tight glyph )
667−111:28 tvar B
668−111:29 tight glyph ]
669−113:1 NEWLINE
670−113:1 glyph +$
671−113:4 name tree
672−113:9 glyph |$
673−113:12 glyph [
674−113:13 tight tvar A
675−113:14 tight glyph ]
676−114:3 INDENT
677−114:3 lit ~
678−115:3 NEWLINE
679−115:3 glyph [
680−115:4 tight name n
681−115:5 tight glyph =
682−115:6 tight tvar A
683−115:8 name l
684−115:9 tight glyph =
685−115:10 tight glyph (
686−115:11 tight name tree
687−115:16 tvar A
688−115:17 tight glyph )
689−115:19 name r
690−115:20 tight glyph =
691−115:21 tight glyph (
692−115:22 tight name tree
693−115:27 tvar A
694−115:28 tight glyph )
695−115:29 tight glyph ]
696−117:1 DEDENT
697−117:1 NEWLINE
698−117:1 glyph +$
699−117:4 name each
700−117:9 glyph |$
701−117:12 glyph [
702−117:13 tight tvar A
703−117:15 tvar B
704−117:16 tight glyph ]
705−118:3 INDENT
706−118:3 glyph [
707−118:4 tight lit %|
708−118:7 name p
709−118:8 tight glyph =
710−118:9 tight tvar B
711−118:10 tight glyph ]
712−119:3 NEWLINE
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
564+97:1 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+104:1 DEDENT
612+104:1 DEDENT
613+104:1 NEWLINE
614+104:1 glyph +$
615+104:4 name lone
616+104:9 glyph |$
617+104:12 glyph [
618+104:13 tight tvar A
619+104:14 tight glyph ]
620+104:16 glyph [
621+104:17 tight name p
622+104:18 tight glyph =
623+104:19 tight tvar A
624+104:20 tight glyph ]
625+106:1 NEWLINE
626+106:1 glyph +$
627+106:4 name lest
628+106:9 glyph |$
629+106:12 glyph [
630+106:13 tight tvar A
631+106:14 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
649+108:14 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
661+112:1 NEWLINE
662+112:1 glyph +$
663+112:4 name quip
664+112:9 glyph |$
665+112:12 glyph [
666+112:13 tight tvar A
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
713713119:3 glyph [
714−119:4 tight lit %&
714+119:4 tight lit %|
715715119:7 name p
716716119:8 tight glyph =
717−119:9 tight tvar A
717+119:9 tight tvar B
718718119:10 tight glyph ]
719−121:1 DEDENT
720−121:1 NEWLINE
721−121:1 glyph +$
722−121:4 name bloq
723−121:9 aura @
724−123:1 NEWLINE
725−123:1 glyph ++
726−123:4 name some
727−123:9 glyph |=
728−123:12 name item
729−123:16 tight glyph =
730−123:17 tight tvar A
731−123:19 glyph `
732−123:20 tight name item
733−125:1 NEWLINE
734−125:1 glyph ++
735−125:4 name lure
736−125:9 glyph |=
737−125:12 name item
738−125:16 tight glyph =
739−125:17 tight tvar A
740−126:3 INDENT
741−126:3 glyph ^-
742−126:6 glyph (
743−126:7 tight name list
744−126:12 tvar A
745−126:13 tight glyph )
746−126:15 glyph [
747−126:16 tight name item
748−126:21 lit ~
749−126:22 tight glyph ]
750−128:1 DEDENT
751−128:1 NEWLINE
752−128:1 glyph ++
753−128:4 name snoc
754−128:9 glyph |=
755−128:12 name args
756−128:16 tight glyph =
757−128:17 tight glyph [
758−128:18 tight glyph (
759−128:19 tight name list
760−128:24 tvar A
761−128:25 tight glyph )
762−128:27 tvar A
763−128:28 tight glyph ]
764−129:3 INDENT
765−129:3 glyph ?-
766−129:6 name args
767−130:5 INDENT
768−130:5 glyph [
769−130:6 tight name xs
770−130:9 name item
771−130:13 tight glyph ]
772−130:15 glyph (
773−130:16 tight name weld
774−130:21 name xs
775−130:24 glyph [
776−130:25 tight name item
777−130:30 lit ~
778−130:31 tight glyph ]
779−130:32 tight glyph )
780−132:1 DEDENT
781−132:1 DEDENT
782−132:1 NEWLINE
783−132:1 glyph ++
784−132:4 name flop
785−132:9 glyph |=
786−132:12 name xs
787−132:14 tight glyph =
788−132:15 tight glyph (
789−132:16 tight name list
790−132:21 tvar A
791−132:22 tight glyph )
792−133:3 INDENT
793−133:3 glyph ++
794−133:6 name reverse-into
795−133:19 glyph |=
796−133:22 name args
797−133:26 tight glyph =
798−133:27 tight glyph [
799−133:28 tight glyph (
800−133:29 tight name list
801−133:34 tvar A
802−133:35 tight glyph )
803−133:37 glyph (
804−133:38 tight name list
805−133:43 tvar A
806−133:44 tight glyph )
807−133:45 tight glyph ]
808−134:5 INDENT
809−134:5 glyph ?-
810−134:8 name args
811−135:7 INDENT
812−135:7 glyph [
813−135:8 tight name rest
814−135:13 name acc
815−135:16 tight glyph ]
816−136:9 INDENT
817−136:9 glyph ?-
818−136:12 name rest
819−137:11 INDENT
820−137:11 lit ~
821−137:13 name acc
822−138:11 NEWLINE
823−138:11 glyph [
824−138:12 tight name item
825−138:17 name more
826−138:21 tight glyph ]
827−138:23 glyph (
828−138:24 tight name reverse-into
829−138:37 name more
830−138:42 glyph [
831−138:43 tight name item
832−138:48 name acc
833−138:51 tight glyph ]
834−138:52 tight glyph )
835−139:3 DEDENT
836−139:3 DEDENT
837−139:3 DEDENT
838−139:3 DEDENT
839−139:3 NEWLINE
840−139:3 glyph (
841−139:4 tight name reverse-into
842−139:17 name xs
843−139:20 lit ~
844−139:21 tight glyph )
845−139:22 DEDENT
846−139:22 NEWLINE
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+124:1 NEWLINE
732+124:1 glyph ++
733+124:4 name some
734+124:9 glyph |=
735+124:12 name item
736+124:16 tight glyph =
737+124:17 tight tvar A
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
821+136:13 name acc
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+224−221
@@ -111,233 +111,236 @@
111111 (arm 47:5
112112 (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
113113 (body 48:7
114− (branch 48:7
115− (wing 48:10 xs)
116− (arm 49:9 (lit 49:9 ~) (lit 49:11 ~))
117− (arm 50:9
118− (cell 50:9 (bind 50:10 item) (bind 50:15 rest))
119− (tuple 50:21
120− (group 50:22
121− (call 50:23 (wing 50:23 f) (wing 50:25 item)))
122− (group 50:31
123− (call 50:32 (wing 50:32 turn) (wing 50:37 rest) (wing 50:42 f))))))))))))
124− (mold 52:1 dime
125− (cell 52:9
126− (face 52:10 p (aura 52:12 @ta))
127− (face 52:16 q (aura 52:18 @))))
128− (mold 54:1 hair
129− (cell 54:9
130− (face 54:10 p (aura 54:12 @ud))
131− (face 54:16 q (aura 54:18 @ud))))
132− (mold 56:1 pint
133− (cell 56:9
134− (face 56:10 p
135− (cell 56:12
136− (face 56:13 p (aura 56:15 @))
137− (face 56:17 q (aura 56:19 @))))
138− (face 56:22 q
139− (cell 56:24
140− (face 56:25 p (aura 56:27 @))
141− (face 56:29 q (aura 56:31 @))))))
142− (mold 58:1 coin
143− (union 59:3
144− (cell 59:3
145− (const 59:4 %$)
146− (face 59:7 p (ref 59:9 dime)))
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
128+ (cell 53:9
129+ (face 53:10 p (aura 53:12 @ta))
130+ (face 53:16 q (aura 53:18 @))))
131+ (mold 55:1 hair
132+ (cell 55:9
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 %blob)
149− (face 60:10 p (noun 60:12)))
148+ (const 60:4 %$)
149+ (face 60:7 p (ref 60:9 dime)))
150150 (cell 61:3
151− (const 61:4 %many)
152− (face 61:10 p
153− (apply 61:12 list (ref 61:18 coin))))))
154− (mold 63:1 pair
155− (generic 63:9 A B
156− (cell 63:18
157− (face 63:19 p (tvar 63:21 A))
158− (face 63:23 q (tvar 63:25 B)))))
159− (mold 65:1 trel
160− (generic 65:9 A B C
161− (cell 65:20
162− (face 65:21 p (tvar 65:23 A))
163− (face 65:25 q (tvar 65:27 B))
164− (face 65:29 r (tvar 65:31 C)))))
165− (mold 67:1 qual
166− (generic 67:9 A B C D
167− (cell 67:22
168− (face 67:23 p (tvar 67:25 A))
169− (face 67:27 q (tvar 67:29 B))
170− (face 67:31 r (tvar 67:33 C))
171− (face 67:35 s (tvar 67:37 D)))))
172− (mold 69:1 cord (aura 69:9 @t))
173− (mold 71:1 knot (aura 71:9 @ta))
174− (mold 73:1 tape
175− (apply 73:9 list (aura 73:15 @tD)))
176− (mold 75:1 path
177− (apply 75:9 list (ref 75:15 knot)))
178− (mold 77:1 tank
179− (union 78:3
180− (ref 78:3 cord)
181− (cell 79:3
182− (const 79:4 %leaf)
183− (face 79:10 p (ref 79:12 tape)))
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)
184184 (cell 80:3
185− (const 80:4 %palm)
186− (face 80:10 p
187− (apply 80:12 qual (ref 80:18 tape) (ref 80:23 tape) (ref 80:28 tape) (ref 80:33 tape)))
188− (face 80:39 q
189− (apply 80:41 list (ref 80:47 tank))))
185+ (const 80:4 %leaf)
186+ (face 80:10 p (ref 80:12 tape)))
190187 (cell 81:3
191− (const 81:4 %rose)
188+ (const 81:4 %palm)
192189 (face 81:10 p
193− (apply 81:12 trel (ref 81:18 tape) (ref 81:23 tape) (ref 81:28 tape)))
194− (face 81:34 q
195− (apply 81:36 list (ref 81:42 tank))))))
196− (mold 83:1 nail
197− (cell 83:9
198− (face 83:10 p (ref 83:12 hair))
199− (face 83:17 q (ref 83:19 tape))))
200− (mold 85:1 edge
201− (cell 85:9
202− (face 85:10 p (ref 85:12 hair))
203− (face 85:17 q
204− (apply 85:19 unit
205− (cell 85:25
206− (face 85:26 p (noun 85:28))
207− (face 85:30 q (ref 85:32 nail)))))))
208− (mold 87:1 rule
209− (fn 87:9 (ref 87:12 nail) (ref 87:17 edge)))
210− (mold 89:1 spot
211− (cell 89:9
212− (face 89:10 p (ref 89:12 path))
213− (face 89:17 q (ref 89:19 pint))))
214− (mold 91:1 toon
215− (union 92:3
216− (cell 92:3
217− (const 92:4 %0)
218− (face 92:7 p (noun 92:9)))
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
200+ (cell 84:9
201+ (face 84:10 p (ref 84:12 hair))
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 %1)
220+ (const 93:4 %0)
221221 (face 93:7 p (noun 93:9)))
222222 (cell 94:3
223− (const 94:4 %2)
224− (face 94:7 p
225− (apply 94:9 list (ref 94:15 tank))))))
226− (mold 96:1 like
227− (generic 96:9 A
228− (cell 96:16
229− (face 96:17 p (ref 96:19 hair))
230− (face 96:24 q
231− (apply 96:26 unit
232− (cell 96:32
233− (face 96:33 p (tvar 96:35 A))
234− (face 96:37 q (ref 96:39 nail))))))))
235− (value 98:1 wonk
236− (gate 98:9
237− (face 98:12 veq
238− (apply 98:16 like (tvar 98:22 A)))
239− (body 99:3
240− (branch 99:3
241− (wing 99:6 q.veq)
242− (arm 100:5 (lit 100:5 ~) (crash 100:7))
243− (arm 101:5
244− (cell 101:5 (lit 101:6 ~) (bind 101:8 product))
245− (wing 101:17 p.product))))))
246− (mold 103:1 lone
247− (generic 103:9 A
248− (cell 103:16
249− (face 103:17 p (tvar 103:19 A)))))
250− (mold 105:1 lest
251− (generic 105:9 A
252− (cell 105:16
253− (face 105:17 i (tvar 105:19 A))
254− (face 105:21 t
255− (apply 105:23 list (tvar 105:29 A))))))
256− (mold 107:1 pole
257− (generic 107:9 A
258− (union 108:3
259− (const 108:3 ~)
260− (cell 109:3
261− (tvar 109:4 A)
262− (apply 109:6 pole (tvar 109:12 A))))))
263− (mold 111:1 quip
264− (generic 111:9 A B
265− (cell 111:18
266− (apply 111:19 list (tvar 111:25 A))
267− (tvar 111:28 B))))
268− (mold 113:1 tree
269− (generic 113:9 A
270− (union 114:3
271− (const 114:3 ~)
272− (cell 115:3
273− (face 115:4 n (tvar 115:6 A))
274− (face 115:8 l
275− (apply 115:10 tree (tvar 115:16 A)))
276− (face 115:19 r
277− (apply 115:21 tree (tvar 115:27 A)))))))
278− (mold 117:1 each
279− (generic 117:9 A B
280− (union 118:3
281− (cell 118:3
282− (const 118:4 %|)
283− (face 118:7 p (tvar 118:9 B)))
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
250+ (generic 104:9 A
251+ (cell 104:16
252+ (face 104:17 p (tvar 104:19 A)))))
253+ (mold 106:1 lest
254+ (generic 106:9 A
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
284284 (cell 119:3
285− (const 119:4 %&)
286− (face 119:7 p (tvar 119:9 A))))))
287− (mold 121:1 bloq (aura 121:9 @))
288− (value 123:1 some
289− (gate 123:9
290− (face 123:12 item (tvar 123:17 A))
291− (unit 123:19 (wing 123:20 item))))
292− (value 125:1 lure
293− (gate 125:9
294− (face 125:12 item (tvar 125:17 A))
295− (body 126:3
296− (cast 126:3
297− (apply 126:6 list (tvar 126:12 A))
298− (tuple 126:15 (wing 126:16 item) (lit 126:21 ~))))))
299− (value 128:1 snoc
300− (gate 128:9
301− (face 128:12 args
302− (cell 128:17
303− (apply 128:18 list (tvar 128:24 A))
304− (tvar 128:27 A)))
305− (body 129:3
306− (branch 129:3
307− (wing 129:6 args)
308− (arm 130:5
309− (cell 130:5 (bind 130:6 xs) (bind 130:9 item))
310− (group 130:15
311− (call 130:16
312− (wing 130:16 weld)
313− (wing 130:21 xs)
314− (tuple 130:24 (wing 130:25 item) (lit 130:30 ~)))))))))
315− (value 132:1 flop
316− (gate 132:9
317− (face 132:12 xs
318− (apply 132:15 list (tvar 132:21 A)))
319− (body 133:3
320− (value 133:3 reverse-into
321− (gate 133:19
322− (face 133:22 args
323− (cell 133:27
324− (apply 133:28 list (tvar 133:34 A))
325− (apply 133:37 list (tvar 133:43 A))))
326− (body 134:5
327− (branch 134:5
328− (wing 134:8 args)
329− (arm 135:7
330− (cell 135:7 (bind 135:8 rest) (bind 135:13 acc))
331− (body 136:9
332− (branch 136:9
333− (wing 136:12 rest)
334− (arm 137:11 (lit 137:11 ~) (wing 137:13 acc))
335− (arm 138:11
336− (cell 138:11 (bind 138:12 item) (bind 138:17 more))
337− (group 138:23
338− (call 138:24
339− (wing 138:24 reverse-into)
340− (wing 138:37 more)
341− (tuple 138:42 (wing 138:43 item) (wing 138:48 acc))))))))))))
342− (group 139:3
343− (call 139:4 (wing 139:4 reverse-into) (wing 139:17 xs) (lit 139:20 ~)))))))
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
292+ (gate 124:9
293+ (face 124:12 item (tvar 124:17 A))
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+1−1
@@ -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+4−3
@@ -45,6 +45,7 @@
4545++ turn |= args=[(list A) $-(A B)]
4646 ?- args
4747 [xs f]
48− ?- xs
49− ~ ~
50− [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+32−25
@@ -244,29 +244,36 @@
24424447:9 name f
24524547:10 tight glyph ]
24624648:7 INDENT
247−48:7 glyph ?-
248−48:10 name xs
247+48:7 glyph ^-
248+48:10 glyph (
249+48:11 tight name list
250+48:16 tvar B
251+48:17 tight glyph )
24925249:9 INDENT
250−49:9 lit ~
251−49:11 lit ~
252−50:9 NEWLINE
253−50:9 glyph [
254−50:10 tight name item
255−50:15 name rest
256−50:19 tight glyph ]
257−50:21 glyph [
258−50:22 tight glyph (
259−50:23 tight name f
260−50:25 name item
261−50:29 tight glyph )
262−50:31 glyph (
263−50:32 tight name turn
264−50:37 name rest
265−50:42 name f
266−50:43 tight glyph )
267−50:44 tight glyph ]
268−50:45 DEDENT
269−50:45 DEDENT
270−50:45 DEDENT
271−50:45 DEDENT
272−50:45 NEWLINE
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+13−10
@@ -111,13 +111,16 @@
111111 (arm 47:5
112112 (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
113113 (body 48:7
114− (branch 48:7
115− (wing 48:10 xs)
116− (arm 49:9 (lit 49:9 ~) (lit 49:11 ~))
117− (arm 50:9
118− (cell 50:9 (bind 50:10 item) (bind 50:15 rest))
119− (tuple 50:21
120− (group 50:22
121− (call 50:23 (wing 50:23 f) (wing 50:25 item)))
122− (group 50:31
123− (call 50:32 (wing 50:32 turn) (wing 50:37 rest) (wing 50:42 f)))))))))))))
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-unit-list-transforms/source.jibb+56−48
@@ -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]
@@ -45,9 +49,10 @@
4549++ turn |= args=[(list A) $-(A B)]
4650 ?- args
4751 [xs f]
48− ?- xs
49− ~ ~
50− [item rest] [(f item) (turn rest f)]
52+ ^- (list B)
53+ ?- xs
54+ ~ ~
55+ [item rest] [(f item) (turn rest f)]
5156
5257+$ dime [p=@ta q=@]
5358
@@ -139,27 +144,28 @@
139144 (reverse-into xs ~)
140145
141146++ drop |= maybe=(unit A)
142− ?- maybe
143− ~ ~
144− [~ value] [value ~]
147+ ^- (list A)
148+ ?- maybe
149+ ~ ~
150+ [~ value] [value ~]
145151
146152++ bind |= args=[(unit A) $-(A B)]
147153 ?- args
148− [maybe f]
154+ [maybe f] ^- (unit B)
149155 ?- maybe
150156 ~ ~
151157 [~ value] `(f value)
152158
153159++ biff |= args=[(unit A) $-(A (unit B))]
154160 ?- args
155− [maybe f]
161+ [maybe f] ^- (unit B)
156162 ?- maybe
157163 ~ ~
158164 [~ value] (f value)
159165
160166++ both |= args=[(unit A) (unit B)]
161167 ?- args
162− [first second]
168+ [first second] ^- (unit [A B])
163169 ?- first
164170 ~ ~
165171 [~ a]
@@ -169,7 +175,7 @@
169175
170176++ clap |= args=[(unit A) (unit A) $-([A A] A)]
171177 ?- args
172− [first second combine]
178+ [first second combine] ^- (unit A)
173179 ?- first
174180 ~ second
175181 [~ a]
@@ -179,7 +185,7 @@
179185
180186++ clef |= args=[(unit A) (unit B) $-([A B] (unit C))]
181187 ?- args
182− [first second combine]
188+ [first second combine] ^- (unit C)
183189 ?- first
184190 ~ ~
185191 [~ a]
@@ -189,23 +195,23 @@
189195
190196++ skim |= args=[(list A) $-(A ?)]
191197 ?- args
192− [xs predicate]
193− ?- xs
194− ~ ~
195− [item rest]
196− ?- (predicate item)
197− %.y [item (skim rest predicate)]
198− %.n (skim rest predicate)
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)
199205
200206++ skip |= args=[(list A) $-(A ?)]
201207 ?- args
202− [xs predicate]
203− ?- xs
204− ~ ~
205− [item rest]
206− ?- (predicate item)
207− %.y (skip rest predicate)
208− %.n [item (skip rest predicate)]
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)]
209215
210216++ levy |= args=[(list A) $-(A ?)]
211217 ?- args
@@ -243,37 +249,39 @@
243249
244250++ flit |= predicate=$-(A ?)
245251 |= value=A
246− ?- (predicate value)
247− %.y `value
248− %.n ~
252+ ^- (unit A)
253+ ?- (predicate value)
254+ %.y `value
255+ %.n ~
249256
250257++ murn |= args=[(list A) $-(A (unit B))]
251258 ?- args
252− [xs f]
253− ?- xs
254− ~ ~
255− [item rest]
256− ?- (f item)
257− ~ (murn rest f)
258− [~ value] [value (murn rest f)]
259+ [xs f] ^- (list B)
260+ ?- xs
261+ ~ ~
262+ [item rest]
263+ ?- (f item)
264+ ~ (murn rest f)
265+ [~ value] [value (murn rest f)]
259266
260267++ join |= args=[A (list A)]
261268 ?- args
262− [separator xs]
263− ?- xs
264− ~ ~
265− [item rest]
266− ?- rest
267− ~ [item ~]
268− [next more] [item [separator (join separator rest)]]
269+ [separator xs] ^- (list A)
270+ ?- xs
271+ ~ ~
272+ [item rest]
273+ ?- rest
274+ ~ [item ~]
275+ [next more] [item [separator (join separator rest)]]
269276
270277++ snip |= xs=(list A)
271− ?- xs
272− ~ ~
273− [item rest]
274− ?- rest
275− ~ ~
276− [next more] [item (snip rest)]
278+ ^- (list A)
279+ ?- xs
280+ ~ ~
281+ [item rest]
282+ ?- rest
283+ ~ ~
284+ [next more] [item (snip rest)]
277285
278286++ rear |= xs=(list A)
279287 ?- xs
tests/golden/prelude-unit-list-transforms/tokens.txt+1764−1675
@@ -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,1654 +89,1752 @@
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 glyph (
195−40:11 tight name list
196−40:16 tvar A
197−40:17 tight glyph )
198−41:9 INDENT
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 name xs
249−49:9 INDENT
250−49:9 lit ~
251−49:11 lit ~
252−50:9 NEWLINE
253−50:9 glyph [
254−50:10 tight name item
255−50:15 name rest
256−50:19 tight glyph ]
257−50:21 glyph [
258−50:22 tight glyph (
259−50:23 tight name f
260−50:25 name item
261−50:29 tight glyph )
262−50:31 glyph (
263−50:32 tight name turn
264−50:37 name rest
265−50:42 name f
266−50:43 tight glyph )
267−50:44 tight glyph ]
268−52:1 DEDENT
269−52:1 DEDENT
270−52:1 DEDENT
271−52:1 DEDENT
272−52:1 NEWLINE
273−52:1 glyph +$
274−52:4 name dime
275−52:9 glyph [
276−52:10 tight name p
277−52:11 tight glyph =
278−52:12 tight aura @ta
279−52:16 name q
280−52:17 tight glyph =
281−52:18 tight aura @
282−52:19 tight glyph ]
283−54:1 NEWLINE
284−54:1 glyph +$
285−54:4 name hair
286−54:9 glyph [
287−54:10 tight name p
288−54:11 tight glyph =
289−54:12 tight aura @ud
290−54:16 name q
291−54:17 tight glyph =
292−54:18 tight aura @ud
293−54:21 tight glyph ]
294−56:1 NEWLINE
295−56:1 glyph +$
296−56:4 name pint
297−56:9 glyph [
298−56:10 tight name p
299−56:11 tight glyph =
300−56:12 tight glyph [
301−56:13 tight name p
302−56:14 tight glyph =
303−56:15 tight aura @
304−56:17 name q
305−56:18 tight glyph =
306−56:19 tight aura @
307−56:20 tight glyph ]
308−56:22 name q
309−56:23 tight glyph =
310−56:24 tight glyph [
311−56:25 tight name p
312−56:26 tight glyph =
313−56:27 tight aura @
314−56:29 name q
315−56:30 tight glyph =
316−56:31 tight aura @
317−56:32 tight glyph ]
318−56:33 tight glyph ]
319−58:1 NEWLINE
320−58:1 glyph +$
321−58:4 name coin
322−59:3 INDENT
323−59:3 glyph [
324−59:4 tight lit %$
325−59:7 name p
326−59:8 tight glyph =
327−59:9 tight name dime
328−59:13 tight glyph ]
329−60:3 NEWLINE
330−60:3 glyph [
331−60:4 tight lit %blob
332−60:10 name p
333−60:11 tight glyph =
334−60:12 tight glyph *
335−60:13 tight glyph ]
336−61:3 NEWLINE
337−61:3 glyph [
338−61:4 tight lit %many
339−61:10 name p
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
292+57:1 NEWLINE
293+57:1 glyph +$
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
308+59:11 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
34031961:11 tight glyph =
341−61:12 tight glyph (
342−61:13 tight name list
343−61:18 name coin
344−61:22 tight glyph )
345−61:23 tight glyph ]
346−63:1 DEDENT
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 ]
34733963:1 NEWLINE
34834063:1 glyph +$
349−63:4 name pair
350−63:9 glyph |$
351−63:12 glyph [
352−63:13 tight tvar A
353−63:15 tvar B
354−63:16 tight glyph ]
355−63:18 glyph [
356−63:19 tight name p
357−63:20 tight glyph =
358−63:21 tight tvar A
359−63:23 name q
360−63:24 tight glyph =
361−63:25 tight tvar B
362−63:26 tight glyph ]
363−65:1 NEWLINE
364−65:1 glyph +$
365−65:4 name trel
366−65:9 glyph |$
367−65:12 glyph [
368−65:13 tight tvar A
369−65:15 tvar B
370−65:17 tvar C
371−65:18 tight glyph ]
372−65:20 glyph [
373−65:21 tight name p
374−65:22 tight glyph =
375−65:23 tight tvar A
376−65:25 name q
377−65:26 tight glyph =
378−65:27 tight tvar B
379−65:29 name r
380−65:30 tight glyph =
381−65:31 tight tvar C
382−65:32 tight glyph ]
383−67:1 NEWLINE
384−67:1 glyph +$
385−67:4 name qual
386−67:9 glyph |$
387−67:12 glyph [
388−67:13 tight tvar A
389−67:15 tvar B
390−67:17 tvar C
391−67:19 tvar D
392−67:20 tight glyph ]
393−67:22 glyph [
394−67:23 tight name p
395−67:24 tight glyph =
396−67:25 tight tvar A
397−67:27 name q
398−67:28 tight glyph =
399−67:29 tight tvar B
400−67:31 name r
401−67:32 tight glyph =
402−67:33 tight tvar C
403−67:35 name s
404−67:36 tight glyph =
405−67:37 tight tvar D
406−67:38 tight glyph ]
407−69:1 NEWLINE
408−69:1 glyph +$
409−69:4 name cord
410−69:9 aura @t
411−71:1 NEWLINE
412−71:1 glyph +$
413−71:4 name knot
414−71:9 aura @ta
415−73:1 NEWLINE
416−73:1 glyph +$
417−73:4 name tape
418−73:9 glyph (
419−73:10 tight name list
420−73:15 aura @tD
421−73:18 tight glyph )
422−75:1 NEWLINE
423−75:1 glyph +$
424−75:4 name path
425−75:9 glyph (
426−75:10 tight name list
427−75:15 name knot
428−75:19 tight glyph )
429−77:1 NEWLINE
430−77:1 glyph +$
431−77:4 name tank
432−78:3 INDENT
433−78:3 name cord
434−79:3 NEWLINE
435−79:3 glyph [
436−79:4 tight lit %leaf
437−79:10 name p
438−79:11 tight glyph =
439−79:12 tight name tape
440−79:16 tight glyph ]
441−80:3 NEWLINE
442−80:3 glyph [
443−80:4 tight lit %palm
444−80:10 name p
445−80:11 tight glyph =
446−80:12 tight glyph (
447−80:13 tight name qual
448−80:18 name tape
449−80:23 name tape
450−80:28 name tape
451−80:33 name tape
452−80:37 tight glyph )
453−80:39 name q
454−80:40 tight glyph =
455−80:41 tight glyph (
456−80:42 tight name list
457−80:47 name tank
458−80:51 tight glyph )
459−80:52 tight glyph ]
460−81:3 NEWLINE
461−81:3 glyph [
462−81:4 tight lit %rose
463−81:10 name p
464−81:11 tight glyph =
465−81:12 tight glyph (
466−81:13 tight name trel
467−81:18 name tape
468−81:23 name tape
469−81:28 name tape
470−81:32 tight glyph )
471−81:34 name q
472−81:35 tight glyph =
473−81:36 tight glyph (
474−81:37 tight name list
475−81:42 name tank
476−81:46 tight glyph )
477−81:47 tight glyph ]
478−83:1 DEDENT
479−83:1 NEWLINE
480−83:1 glyph +$
481−83:4 name nail
482−83:9 glyph [
483−83:10 tight name p
484−83:11 tight glyph =
485−83:12 tight name hair
486−83:17 name q
487−83:18 tight glyph =
488−83:19 tight name tape
489−83:23 tight glyph ]
490−85:1 NEWLINE
491−85:1 glyph +$
492−85:4 name edge
493−85:9 glyph [
494−85:10 tight name p
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
367+68:1 NEWLINE
368+68:1 glyph +$
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 ]
383+70:1 NEWLINE
384+70:1 glyph +$
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 ]
403+72:1 NEWLINE
404+72:1 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 ]
427+74:1 NEWLINE
428+74:1 glyph +$
429+74:4 name cord
430+74:9 aura @t
431+76:1 NEWLINE
432+76:1 glyph +$
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 )
449+82:1 NEWLINE
450+82:1 glyph +$
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
458+84:11 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
49546585:11 tight glyph =
496−85:12 tight name hair
497−85:17 name q
498−85:18 tight glyph =
499−85:19 tight glyph (
500−85:20 tight name unit
501−85:25 glyph [
502−85:26 tight name p
503−85:27 tight glyph =
504−85:28 tight glyph *
505−85:30 name q
506−85:31 tight glyph =
507−85:32 tight name nail
508−85:36 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
50947285:37 tight glyph )
510−85:38 tight glyph ]
511−87:1 NEWLINE
512−87:1 glyph +$
513−87:4 name rule
514−87:9 glyph $-(
515−87:12 tight name nail
516−87:17 name edge
517−87:21 tight glyph )
518−89:1 NEWLINE
519−89:1 glyph +$
520−89:4 name spot
521−89:9 glyph [
522−89:10 tight name p
523−89:11 tight glyph =
524−89:12 tight name path
525−89:17 name q
526−89:18 tight glyph =
527−89:19 tight name pint
528−89:23 tight glyph ]
529−91:1 NEWLINE
530−91:1 glyph +$
531−91:4 name toon
532−92:3 INDENT
533−92:3 glyph [
534−92:4 tight lit %0
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 %1
542−93:7 name p
543−93:8 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 %2
549−94:7 name p
550−94:8 tight glyph =
551−94:9 tight glyph (
552−94:10 tight name list
553−94:15 name tank
554−94:19 tight glyph )
555−94:20 tight glyph ]
556−96:1 DEDENT
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
499+88:1 NEWLINE
500+88:1 glyph +$
501+88:4 name nail
502+88:9 glyph [
503+88:10 tight name p
504+88:11 tight glyph =
505+88:12 tight name hair
506+88:17 name q
507+88:18 tight glyph =
508+88:19 tight name tape
509+88:23 tight glyph ]
510+90:1 NEWLINE
511+90:1 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 ]
55754996:1 NEWLINE
55855096:1 glyph +$
559−96:4 name like
560−96:9 glyph |$
561−96:12 glyph [
562−96:13 tight tvar A
563−96:14 tight glyph ]
564−96:16 glyph [
565−96:17 tight name p
566−96:18 tight glyph =
567−96:19 tight name hair
568−96:24 name q
569−96:25 tight glyph =
570−96:26 tight glyph (
571−96:27 tight name unit
572−96:32 glyph [
573−96:33 tight name p
574−96:34 tight glyph =
575−96:35 tight tvar A
576−96:37 name q
577−96:38 tight glyph =
578−96:39 tight name nail
579−96:43 tight glyph ]
580−96:44 tight glyph )
581−96:45 tight glyph ]
582−98:1 NEWLINE
583−98:1 glyph ++
584−98:4 name wonk
585−98:9 glyph |=
586−98:12 name veq
587−98:15 tight glyph =
588−98:16 tight glyph (
589−98:17 tight name like
590−98:22 tvar A
591−98:23 tight glyph )
592−99:3 INDENT
593−99:3 glyph ?-
594−99:6 wing q.veq
595−100:5 INDENT
596−100:5 lit ~
597−100:7 glyph !!
598−101:5 NEWLINE
599−101:5 glyph [
600−101:6 tight lit ~
601−101:8 name product
602−101:15 tight glyph ]
603−101:17 wing p.product
604−103:1 DEDENT
605−103:1 DEDENT
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 ]
606602103:1 NEWLINE
607−103:1 glyph +$
608−103:4 name lone
609−103:9 glyph |$
610−103:12 glyph [
611−103:13 tight tvar A
612−103:14 tight glyph ]
613−103:16 glyph [
614−103:17 tight name p
615−103:18 tight glyph =
616−103:19 tight tvar A
617−103:20 tight glyph ]
618−105:1 NEWLINE
619−105:1 glyph +$
620−105:4 name lest
621−105:9 glyph |$
622−105:12 glyph [
623−105:13 tight tvar A
624−105:14 tight glyph ]
625−105:16 glyph [
626−105:17 tight name i
627−105:18 tight glyph =
628−105:19 tight tvar A
629−105:21 name t
630−105:22 tight glyph =
631−105:23 tight glyph (
632−105:24 tight name list
633−105:29 tvar A
634−105:30 tight glyph )
635−105:31 tight glyph ]
636−107:1 NEWLINE
637−107:1 glyph +$
638−107:4 name pole
639−107:9 glyph |$
640−107:12 glyph [
641−107:13 tight tvar A
642−107:14 tight glyph ]
643−108:3 INDENT
644−108:3 lit ~
645−109:3 NEWLINE
646−109:3 glyph [
647−109:4 tight tvar A
648−109:6 glyph (
649−109:7 tight name pole
650−109:12 tvar A
651−109:13 tight glyph )
652−109:14 tight glyph ]
653−111:1 DEDENT
654−111:1 NEWLINE
655−111:1 glyph +$
656−111:4 name quip
657−111:9 glyph |$
658−111:12 glyph [
659−111:13 tight tvar A
660−111:15 tvar B
661−111:16 tight glyph ]
662−111:18 glyph [
663−111:19 tight glyph (
664−111:20 tight name list
665−111:25 tvar A
666−111:26 tight glyph )
667−111:28 tvar B
668−111:29 tight glyph ]
669−113:1 NEWLINE
670−113:1 glyph +$
671−113:4 name tree
672−113:9 glyph |$
673−113:12 glyph [
674−113:13 tight tvar A
675−113:14 tight glyph ]
676−114:3 INDENT
677−114:3 lit ~
678−115:3 NEWLINE
679−115:3 glyph [
680−115:4 tight name n
681−115:5 tight glyph =
682−115:6 tight tvar A
683−115:8 name l
684−115:9 tight glyph =
685−115:10 tight glyph (
686−115:11 tight name tree
687−115:16 tvar A
688−115:17 tight glyph )
689−115:19 name r
690−115:20 tight glyph =
691−115:21 tight glyph (
692−115:22 tight name tree
693−115:27 tvar A
694−115:28 tight glyph )
695−115:29 tight glyph ]
696−117:1 DEDENT
697−117:1 NEWLINE
698−117:1 glyph +$
699−117:4 name each
700−117:9 glyph |$
701−117:12 glyph [
702−117:13 tight tvar A
703−117:15 tvar B
704−117:16 tight glyph ]
705−118:3 INDENT
706−118:3 glyph [
707−118:4 tight lit %|
708−118:7 name p
709−118:8 tight glyph =
710−118:9 tight tvar B
711−118:10 tight glyph ]
712−119:3 NEWLINE
713−119:3 glyph [
714−119:4 tight lit %&
715−119:7 name p
716−119:8 tight glyph =
717−119:9 tight tvar A
718−119:10 tight glyph ]
719−121:1 DEDENT
720−121:1 NEWLINE
721−121:1 glyph +$
722−121:4 name bloq
723−121:9 aura @
724−123:1 NEWLINE
725−123:1 glyph ++
726−123:4 name some
727−123:9 glyph |=
728−123:12 name item
729−123:16 tight glyph =
730−123:17 tight tvar A
731−123:19 glyph `
732−123:20 tight name item
733−125:1 NEWLINE
734−125:1 glyph ++
735−125:4 name lure
736−125:9 glyph |=
737−125:12 name item
738−125:16 tight glyph =
739−125:17 tight tvar A
740−126:3 INDENT
741−126:3 glyph ^-
742−126:6 glyph (
743−126:7 tight name list
744−126:12 tvar A
745−126:13 tight glyph )
746−126:15 glyph [
747−126:16 tight name item
748−126:21 lit ~
749−126:22 tight glyph ]
750−128:1 DEDENT
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
632+108:14 tight glyph ]
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 ]
638+110:1 NEWLINE
639+110:1 glyph +$
640+110:4 name lest
641+110:9 glyph |$
642+110:12 glyph [
643+110:13 tight tvar A
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 ]
656+112:1 NEWLINE
657+112:1 glyph +$
658+112:4 name pole
659+112:9 glyph |$
660+112:12 glyph [
661+112:13 tight tvar A
662+112:14 tight glyph ]
663+113:3 INDENT
664+113:3 lit ~
665+114:3 NEWLINE
666+114:3 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 ]
673+116:1 DEDENT
674+116:1 NEWLINE
675+116:1 glyph +$
676+116:4 name quip
677+116:9 glyph |$
678+116:12 glyph [
679+116:13 tight tvar A
680+116:15 tvar B
681+116:16 tight glyph ]
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
717+122:1 NEWLINE
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 @
751744128:1 NEWLINE
752745128:1 glyph ++
753−128:4 name snoc
746+128:4 name some
754747128:9 glyph |=
755−128:12 name args
748+128:12 name item
756749128:16 tight glyph =
757−128:17 tight glyph [
758−128:18 tight glyph (
759−128:19 tight name list
760−128:24 tvar A
761−128:25 tight glyph )
762−128:27 tvar A
763−128:28 tight glyph ]
764−129:3 INDENT
765−129:3 glyph ?-
766−129:6 name args
767−130:5 INDENT
768−130:5 glyph [
769−130:6 tight name xs
770−130:9 name item
771−130:13 tight glyph ]
772−130:15 glyph (
773−130:16 tight name weld
774−130:21 name xs
775−130:24 glyph [
776−130:25 tight name item
777−130:30 lit ~
778−130:31 tight glyph ]
779−130:32 tight glyph )
780−132:1 DEDENT
781−132:1 DEDENT
782−132:1 NEWLINE
783−132:1 glyph ++
784−132:4 name flop
785−132:9 glyph |=
786−132:12 name xs
787−132:14 tight glyph =
788−132:15 tight glyph (
789−132:16 tight name list
790−132:21 tvar A
791−132:22 tight glyph )
792−133:3 INDENT
793−133:3 glyph ++
794−133:6 name reverse-into
795−133:19 glyph |=
796−133:22 name args
797−133:26 tight glyph =
798−133:27 tight glyph [
799−133:28 tight glyph (
800−133:29 tight name list
801−133:34 tvar A
802−133:35 tight glyph )
803−133:37 glyph (
804−133:38 tight name list
805−133:43 tvar A
806−133:44 tight glyph )
807−133:45 tight glyph ]
808−134:5 INDENT
809−134:5 glyph ?-
810−134:8 name args
811−135:7 INDENT
812−135:7 glyph [
813−135:8 tight name rest
814−135:13 name acc
815−135:16 tight glyph ]
816−136:9 INDENT
817−136:9 glyph ?-
818−136:12 name rest
819−137:11 INDENT
820−137:11 lit ~
821−137:13 name acc
822−138:11 NEWLINE
823−138:11 glyph [
824−138:12 tight name item
825−138:17 name more
826−138:21 tight glyph ]
827−138:23 glyph (
828−138:24 tight name reverse-into
829−138:37 name more
830−138:42 glyph [
831−138:43 tight name item
832−138:48 name acc
833−138:51 tight glyph ]
834−138:52 tight glyph )
835−139:3 DEDENT
836−139:3 DEDENT
837−139:3 DEDENT
838−139:3 DEDENT
839−139:3 NEWLINE
840−139:3 glyph (
841−139:4 tight name reverse-into
842−139:17 name xs
843−139:20 lit ~
844−139:21 tight glyph )
845−141:1 DEDENT
846−141:1 NEWLINE
847−141:1 glyph ++
848−141:4 name drop
849−141:9 glyph |=
850−141:12 name maybe
851−141:17 tight glyph =
852−141:18 tight glyph (
853−141:19 tight name unit
854−141:24 tvar A
855−141:25 tight glyph )
856−142:3 INDENT
857−142:3 glyph ?-
858−142:6 name maybe
859−143:5 INDENT
860−143:5 lit ~
861−143:7 lit ~
862−144:5 NEWLINE
863−144:5 glyph [
864−144:6 tight lit ~
865−144:8 name value
866−144:13 tight glyph ]
867−144:15 glyph [
868−144:16 tight name value
869−144:22 lit ~
870−144:23 tight glyph ]
871−146:1 DEDENT
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 )
872865146:1 DEDENT
873866146:1 NEWLINE
874867146:1 glyph ++
875−146:4 name bind
868+146:4 name drop
876869146:9 glyph |=
877−146:12 name args
878−146:16 tight glyph =
879−146:17 tight glyph [
870+146:12 name maybe
871+146:17 tight glyph =
880872146:18 tight glyph (
881873146:19 tight name unit
882874146:24 tvar A
883875146:25 tight glyph )
884−146:27 glyph $-(
885−146:30 tight tvar A
886−146:32 tvar B
887−146:33 tight glyph )
888−146:34 tight glyph ]
889876147:3 INDENT
890−147:3 glyph ?-
891−147:6 name args
877+147:3 glyph ^-
878+147:6 glyph (
879+147:7 tight name list
880+147:12 tvar A
881+147:13 tight glyph )
892882148:5 INDENT
893−148:5 glyph [
894−148:6 tight name maybe
895−148:12 name f
896−148:13 tight glyph ]
883+148:5 glyph ?-
884+148:8 name maybe
897885149:7 INDENT
898−149:7 glyph ?-
899−149:10 name maybe
900−150:9 INDENT
901−150:9 lit ~
902−150:11 lit ~
903−151:9 NEWLINE
904−151:9 glyph [
905−151:10 tight lit ~
906−151:12 name value
907−151:17 tight glyph ]
908−151:19 glyph `
909−151:20 tight glyph (
910−151:21 tight name f
911−151:23 name value
912−151:28 tight glyph )
913−153:1 DEDENT
914−153:1 DEDENT
915−153:1 DEDENT
916−153:1 DEDENT
917−153:1 NEWLINE
918−153:1 glyph ++
919−153:4 name biff
920−153:9 glyph |=
921−153:12 name args
922−153:16 tight glyph =
923−153:17 tight glyph [
924−153:18 tight glyph (
925−153:19 tight name unit
926−153:24 tvar A
927−153:25 tight glyph )
928−153:27 glyph $-(
929−153:30 tight tvar A
930−153:32 glyph (
931−153:33 tight name unit
932−153:38 tvar B
933−153:39 tight glyph )
934−153:40 tight glyph )
935−153:41 tight glyph ]
936−154:3 INDENT
937−154:3 glyph ?-
938−154:6 name args
939−155:5 INDENT
940−155:5 glyph [
941−155:6 tight name maybe
942−155:12 name f
943−155:13 tight glyph ]
944−156:7 INDENT
945−156:7 glyph ?-
946−156:10 name maybe
947−157:9 INDENT
948−157:9 lit ~
949−157:11 lit ~
950−158:9 NEWLINE
951−158:9 glyph [
952−158:10 tight lit ~
953−158:12 name value
954−158:17 tight glyph ]
955−158:19 glyph (
956−158:20 tight name f
957−158:22 name value
958−158:27 tight glyph )
959−160:1 DEDENT
960−160:1 DEDENT
961−160:1 DEDENT
962−160:1 DEDENT
963−160:1 NEWLINE
964−160:1 glyph ++
965−160:4 name both
966−160:9 glyph |=
967−160:12 name args
968−160:16 tight glyph =
969−160:17 tight glyph [
970−160:18 tight glyph (
971−160:19 tight name unit
972−160:24 tvar A
973−160:25 tight glyph )
974−160:27 glyph (
975−160:28 tight name unit
976−160:33 tvar B
977−160:34 tight glyph )
978−160:35 tight glyph ]
979−161:3 INDENT
980−161:3 glyph ?-
981−161:6 name args
982−162:5 INDENT
983−162:5 glyph [
984−162:6 tight name first
985−162:12 name second
986−162:18 tight glyph ]
987−163:7 INDENT
988−163:7 glyph ?-
989−163:10 name first
990−164:9 INDENT
991−164:9 lit ~
992−164:11 lit ~
993−165:9 NEWLINE
994−165:9 glyph [
995−165:10 tight lit ~
996−165:12 name a
997−165:13 tight glyph ]
998−166:11 INDENT
999−166:11 glyph ?-
1000−166:14 name second
1001−167:13 INDENT
1002−167:13 lit ~
1003−167:15 lit ~
1004−168:13 NEWLINE
1005−168:13 glyph [
1006−168:14 tight lit ~
1007−168:16 name b
1008−168:17 tight glyph ]
1009−168:19 glyph `
1010−168:20 tight glyph [
1011−168:21 tight name a
1012−168:23 name b
1013−168:24 tight glyph ]
1014−170:1 DEDENT
1015−170:1 DEDENT
1016−170:1 DEDENT
1017−170:1 DEDENT
1018−170:1 DEDENT
1019−170:1 DEDENT
1020−170:1 NEWLINE
1021−170:1 glyph ++
1022−170:4 name clap
1023−170:9 glyph |=
1024−170:12 name args
1025−170:16 tight glyph =
1026−170:17 tight glyph [
1027−170:18 tight glyph (
1028−170:19 tight name unit
1029−170:24 tvar A
1030−170:25 tight glyph )
1031−170:27 glyph (
1032−170:28 tight name unit
1033−170:33 tvar A
1034−170:34 tight glyph )
1035−170:36 glyph $-(
1036−170:39 tight glyph [
1037−170:40 tight tvar A
1038−170:42 tvar A
1039−170:43 tight glyph ]
1040−170:45 tvar A
1041−170:46 tight glyph )
1042−170:47 tight glyph ]
1043−171:3 INDENT
1044−171:3 glyph ?-
1045−171:6 name args
1046−172:5 INDENT
1047−172:5 glyph [
1048−172:6 tight name first
1049−172:12 name second
1050−172:19 name combine
1051−172:26 tight glyph ]
1052−173:7 INDENT
1053−173:7 glyph ?-
1054−173:10 name first
1055−174:9 INDENT
1056−174:9 lit ~
1057−174:11 name second
1058−175:9 NEWLINE
1059−175:9 glyph [
1060−175:10 tight lit ~
1061−175:12 name a
1062−175:13 tight glyph ]
1063−176:11 INDENT
1064−176:11 glyph ?-
1065−176:14 name second
1066−177:13 INDENT
1067−177:13 lit ~
1068−177:15 name first
1069−178:13 NEWLINE
1070−178:13 glyph [
1071−178:14 tight lit ~
1072−178:16 name b
1073−178:17 tight glyph ]
1074−178:19 glyph `
1075−178:20 tight glyph (
1076−178:21 tight name combine
1077−178:29 name a
1078−178:31 name b
1079−178:32 tight glyph )
1080−180:1 DEDENT
1081−180:1 DEDENT
1082−180:1 DEDENT
1083−180:1 DEDENT
1084−180:1 DEDENT
1085−180:1 DEDENT
1086−180:1 NEWLINE
1087−180:1 glyph ++
1088−180:4 name clef
1089−180:9 glyph |=
1090−180:12 name args
1091−180:16 tight glyph =
1092−180:17 tight glyph [
1093−180:18 tight glyph (
1094−180:19 tight name unit
1095−180:24 tvar A
1096−180:25 tight glyph )
1097−180:27 glyph (
1098−180:28 tight name unit
1099−180:33 tvar B
1100−180:34 tight glyph )
1101−180:36 glyph $-(
1102−180:39 tight glyph [
1103−180:40 tight tvar A
1104−180:42 tvar B
1105−180:43 tight glyph ]
1106−180:45 glyph (
1107−180:46 tight name unit
1108−180:51 tvar C
1109−180:52 tight glyph )
1110−180:53 tight glyph )
1111−180:54 tight glyph ]
1112−181:3 INDENT
1113−181:3 glyph ?-
1114−181:6 name args
1115−182:5 INDENT
1116−182:5 glyph [
1117−182:6 tight name first
1118−182:12 name second
1119−182:19 name combine
1120−182:26 tight glyph ]
1121−183:7 INDENT
1122−183:7 glyph ?-
1123−183:10 name first
1124−184:9 INDENT
1125−184:9 lit ~
1126−184:11 lit ~
1127−185:9 NEWLINE
1128−185:9 glyph [
1129−185:10 tight lit ~
1130−185:12 name a
1131−185:13 tight glyph ]
1132−186:11 INDENT
1133−186:11 glyph ?-
1134−186:14 name second
1135−187:13 INDENT
1136−187:13 lit ~
1137−187:15 lit ~
1138−188:13 NEWLINE
1139−188:13 glyph [
1140−188:14 tight lit ~
1141−188:16 name b
1142−188:17 tight glyph ]
1143−188:19 glyph (
1144−188:20 tight name combine
1145−188:28 name a
1146−188:30 name b
1147−188:31 tight glyph )
1148−190:1 DEDENT
1149−190:1 DEDENT
1150−190:1 DEDENT
1151−190:1 DEDENT
1152−190:1 DEDENT
1153−190:1 DEDENT
1154−190:1 NEWLINE
1155−190:1 glyph ++
1156−190:4 name skim
1157−190:9 glyph |=
1158−190:12 name args
1159−190:16 tight glyph =
1160−190:17 tight glyph [
1161−190:18 tight glyph (
1162−190:19 tight name list
1163−190:24 tvar A
1164−190:25 tight glyph )
1165−190:27 glyph $-(
1166−190:30 tight tvar A
1167−190:32 glyph ?
1168−190:33 tight glyph )
1169−190:34 tight glyph ]
1170−191:3 INDENT
1171−191:3 glyph ?-
1172−191:6 name args
1173−192:5 INDENT
1174−192:5 glyph [
1175−192:6 tight name xs
1176−192:9 name predicate
1177−192:18 tight glyph ]
1178−193:7 INDENT
1179−193:7 glyph ?-
1180−193:10 name xs
1181−194:9 INDENT
1182−194:9 lit ~
1183−194:11 lit ~
1184−195:9 NEWLINE
1185−195:9 glyph [
1186−195:10 tight name item
1187−195:15 name rest
1188−195:19 tight glyph ]
1189−196:11 INDENT
1190−196:11 glyph ?-
1191−196:14 glyph (
1192−196:15 tight name predicate
1193−196:25 name item
1194−196:29 tight glyph )
1195−197:13 INDENT
1196−197:13 lit %.y
1197−197:17 glyph [
1198−197:18 tight name item
1199−197:23 glyph (
1200−197:24 tight name skim
1201−197:29 name rest
1202−197:34 name predicate
1203−197:43 tight glyph )
1204−197:44 tight glyph ]
1205−198:13 NEWLINE
1206−198:13 lit %.n
1207−198:17 glyph (
1208−198:18 tight name skim
1209−198:23 name rest
1210−198:28 name predicate
1211−198:37 tight glyph )
1212−200:1 DEDENT
1213−200:1 DEDENT
1214−200:1 DEDENT
1215−200:1 DEDENT
1216−200:1 DEDENT
1217−200:1 DEDENT
1218−200:1 NEWLINE
1219−200:1 glyph ++
1220−200:4 name skip
1221−200:9 glyph |=
1222−200:12 name args
1223−200:16 tight glyph =
1224−200:17 tight glyph [
1225−200:18 tight glyph (
1226−200:19 tight name list
1227−200:24 tvar A
1228−200:25 tight glyph )
1229−200:27 glyph $-(
1230−200:30 tight tvar A
1231−200:32 glyph ?
1232−200:33 tight glyph )
1233−200:34 tight glyph ]
1234−201:3 INDENT
1235−201:3 glyph ?-
1236−201:6 name args
1237−202:5 INDENT
1238−202:5 glyph [
1239−202:6 tight name xs
1240−202:9 name predicate
1241−202:18 tight glyph ]
1242−203:7 INDENT
1243−203:7 glyph ?-
1244−203:10 name xs
1245−204:9 INDENT
1246−204:9 lit ~
1247−204:11 lit ~
1248−205:9 NEWLINE
1249−205:9 glyph [
1250−205:10 tight name item
1251−205:15 name rest
1252−205:19 tight glyph ]
1253−206:11 INDENT
1254−206:11 glyph ?-
1255−206:14 glyph (
1256−206:15 tight name predicate
1257−206:25 name item
1258−206:29 tight glyph )
1259−207:13 INDENT
1260−207:13 lit %.y
1261−207:17 glyph (
1262−207:18 tight name skip
1263−207:23 name rest
1264−207:28 name predicate
1265−207:37 tight glyph )
1266−208:13 NEWLINE
1267−208:13 lit %.n
1268−208:17 glyph [
1269−208:18 tight name item
886+149:7 lit ~
887+149:9 lit ~
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 ]
897+152:1 DEDENT
898+152:1 DEDENT
899+152:1 DEDENT
900+152:1 NEWLINE
901+152:1 glyph ++
902+152:4 name bind
903+152:9 glyph |=
904+152:12 name args
905+152:16 tight glyph =
906+152:17 tight glyph [
907+152:18 tight glyph (
908+152:19 tight name unit
909+152:24 tvar A
910+152:25 tight glyph )
911+152:27 glyph $-(
912+152:30 tight tvar A
913+152:32 tvar B
914+152:33 tight glyph )
915+152:34 tight glyph ]
916+153:3 INDENT
917+153:3 glyph ?-
918+153:6 name args
919+154:5 INDENT
920+154:5 glyph [
921+154:6 tight name maybe
922+154:12 name f
923+154: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 )
929+155:7 INDENT
930+155:7 glyph ?-
931+155:10 name maybe
932+156:9 INDENT
933+156:9 lit ~
934+156:11 lit ~
935+157:9 NEWLINE
936+157:9 glyph [
937+157:10 tight lit ~
938+157:12 name value
939+157:17 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 )
945+159:1 DEDENT
946+159:1 DEDENT
947+159:1 DEDENT
948+159:1 DEDENT
949+159:1 NEWLINE
950+159:1 glyph ++
951+159:4 name biff
952+159:9 glyph |=
953+159:12 name args
954+159:16 tight glyph =
955+159:17 tight glyph [
956+159:18 tight glyph (
957+159:19 tight name unit
958+159:24 tvar A
959+159:25 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 ]
968+160:3 INDENT
969+160:3 glyph ?-
970+160:6 name args
971+161:5 INDENT
972+161:5 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 )
981+162:7 INDENT
982+162:7 glyph ?-
983+162:10 name maybe
984+163:9 INDENT
985+163:9 lit ~
986+163:11 lit ~
987+164:9 NEWLINE
988+164:9 glyph [
989+164:10 tight lit ~
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
1274+206:1 DEDENT
1275+206:1 DEDENT
1276+206:1 DEDENT
1277+206:1 DEDENT
1278+206:1 NEWLINE
1279+206:1 glyph ++
1280+206:4 name skip
1281+206:9 glyph |=
1282+206:12 name args
1283+206:16 tight glyph =
1284+206:17 tight glyph [
1285+206:18 tight glyph (
1286+206:19 tight name list
1287+206:24 tvar A
1288+206:25 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 ]
1294+207:3 INDENT
1295+207:3 glyph ?-
1296+207:6 name args
1297+208:5 INDENT
1298+208:5 glyph [
1299+208:6 tight name xs
1300+208:9 name predicate
1301+208:18 tight glyph ]
1302+208:20 glyph ^-
12701303208:23 glyph (
1271−208:24 tight name skip
1272−208:29 name rest
1273−208:34 name predicate
1274−208:43 tight glyph )
1275−208:44 tight glyph ]
1276−210:1 DEDENT
1277−210:1 DEDENT
1278−210:1 DEDENT
1279−210:1 DEDENT
1280−210:1 DEDENT
1281−210:1 DEDENT
1282−210:1 NEWLINE
1283−210:1 glyph ++
1284−210:4 name levy
1285−210:9 glyph |=
1286−210:12 name args
1287−210:16 tight glyph =
1288−210:17 tight glyph [
1289−210:18 tight glyph (
1290−210:19 tight name list
1291−210:24 tvar A
1292−210:25 tight glyph )
1293−210:27 glyph $-(
1294−210:30 tight tvar A
1295−210:32 glyph ?
1296−210:33 tight glyph )
1297−210:34 tight glyph ]
1298−211:3 INDENT
1299−211:3 glyph ?-
1300−211:6 name args
1301−212:5 INDENT
1302−212:5 glyph [
1303−212:6 tight name xs
1304−212:9 name predicate
1305−212:18 tight glyph ]
1306−213:7 INDENT
1307−213:7 glyph ?-
1308−213:10 name xs
1309−214:9 INDENT
1310−214:9 lit ~
1311−214:11 lit %.y
1312−215:9 NEWLINE
1313−215:9 glyph [
1314−215:10 tight name item
1315−215:15 name rest
1316−215:19 tight glyph ]
1317−216:11 INDENT
1318−216:11 glyph ?-
1319−216:14 glyph (
1320−216:15 tight name predicate
1321−216:25 name item
1322−216:29 tight glyph )
1323−217:13 INDENT
1324−217:13 lit %.y
1325−217:17 glyph (
1326−217:18 tight name levy
1327−217:23 name rest
1328−217:28 name predicate
1329−217:37 tight glyph )
1330−218:13 NEWLINE
1331−218:13 lit %.n
1332−218:17 lit %.n
1333−220:1 DEDENT
1334−220:1 DEDENT
1335−220:1 DEDENT
1336−220:1 DEDENT
1337−220:1 DEDENT
1338−220:1 DEDENT
1339−220:1 NEWLINE
1340−220:1 glyph ++
1341−220:4 name lien
1342−220:9 glyph |=
1343−220:12 name args
1344−220:16 tight glyph =
1345−220:17 tight glyph [
1346−220:18 tight glyph (
1347−220:19 tight name list
1348−220:24 tvar A
1349−220:25 tight glyph )
1350−220:27 glyph $-(
1351−220:30 tight tvar A
1352−220:32 glyph ?
1353−220:33 tight glyph )
1354−220:34 tight glyph ]
1355−221:3 INDENT
1356−221:3 glyph ?-
1357−221:6 name args
1358−222:5 INDENT
1359−222:5 glyph [
1360−222:6 tight name xs
1361−222:9 name predicate
1362−222:18 tight glyph ]
1363−223:7 INDENT
1364−223:7 glyph ?-
1365−223:10 name xs
1366−224:9 INDENT
1367−224:9 lit ~
1368−224:11 lit %.n
1369−225:9 NEWLINE
1370−225:9 glyph [
1371−225:10 tight name item
1372−225:15 name rest
1373−225:19 tight glyph ]
1374−226:11 INDENT
1375−226:11 glyph ?-
1376−226:14 glyph (
1377−226:15 tight name predicate
1378−226:25 name item
1379−226:29 tight glyph )
1380−227:13 INDENT
1381−227:13 lit %.y
1382−227:17 lit %.y
1383−228:13 NEWLINE
1384−228:13 lit %.n
1385−228:17 glyph (
1386−228:18 tight name lien
1387−228:23 name rest
1388−228:28 name predicate
1389−228:37 tight glyph )
1390−230:1 DEDENT
1391−230:1 DEDENT
1392−230:1 DEDENT
1393−230:1 DEDENT
1394−230:1 DEDENT
1395−230:1 DEDENT
1396−230:1 NEWLINE
1397−230:1 glyph ++
1398−230:4 name roll
1399−230:9 glyph |=
1400−230:12 name args
1401−230:16 tight glyph =
1402−230:17 tight glyph [
1403−230:18 tight glyph (
1404−230:19 tight name list
1405−230:24 tvar A
1406−230:25 tight glyph )
1407−230:27 tvar B
1408−230:29 glyph $-(
1409−230:32 tight glyph [
1410−230:33 tight tvar A
1411−230:35 tvar B
1412−230:36 tight glyph ]
1413−230:38 tvar B
1414−230:39 tight glyph )
1415−230:40 tight glyph ]
1416−231:3 INDENT
1417−231:3 glyph ?-
1418−231:6 name args
1419−232:5 INDENT
1420−232:5 glyph [
1421−232:6 tight name xs
1422−232:9 name start
1423−232:15 name combine
1424−232:22 tight glyph ]
1425−233:7 INDENT
1426−233:7 glyph ?-
1427−233:10 name xs
1428−234:9 INDENT
1429−234:9 lit ~
1430−234:11 name start
1431−235:9 NEWLINE
1432−235:9 glyph [
1433−235:10 tight name item
1434−235:15 name rest
1435−235:19 tight glyph ]
1436−235:21 glyph (
1437−235:22 tight name roll
1438−235:27 name rest
1439−235:32 glyph (
1440−235:33 tight name combine
1441−235:41 name item
1442−235:46 name start
1443−235:51 tight glyph )
1444−235:53 name combine
1445−235:60 tight glyph )
1446−237:1 DEDENT
1447−237:1 DEDENT
1448−237:1 DEDENT
1449−237:1 DEDENT
1450−237:1 NEWLINE
1451−237:1 glyph ++
1452−237:4 name reel
1453−237:9 glyph |=
1454−237:12 name args
1455−237:16 tight glyph =
1456−237:17 tight glyph [
1457−237:18 tight glyph (
1458−237:19 tight name list
1459−237:24 tvar A
1460−237:25 tight glyph )
1461−237:27 tvar B
1462−237:29 glyph $-(
1463−237:32 tight glyph [
1464−237:33 tight tvar A
1465−237:35 tvar B
1466−237:36 tight glyph ]
1467−237:38 tvar B
1468−237:39 tight glyph )
1469−237:40 tight glyph ]
1470−238:3 INDENT
1471−238:3 glyph ?-
1472−238:6 name args
1473−239:5 INDENT
1474−239:5 glyph [
1475−239:6 tight name xs
1476−239:9 name start
1477−239:15 name combine
1478−239:22 tight glyph ]
1479−240:7 INDENT
1480−240:7 glyph ?-
1481−240:10 name xs
1482−241:9 INDENT
1483−241:9 lit ~
1484−241:11 name start
1485−242:9 NEWLINE
1486−242:9 glyph [
1487−242:10 tight name item
1488−242:15 name rest
1489−242:19 tight glyph ]
1490−242:21 glyph (
1491−242:22 tight name combine
1492−242:30 name item
1493−242:35 glyph (
1494−242:36 tight name reel
1495−242:41 name rest
1496−242:46 name start
1497−242:52 name combine
1498−242:59 tight glyph )
1499−242:60 tight glyph )
1500−244:1 DEDENT
1501−244:1 DEDENT
1502−244:1 DEDENT
1503−244:1 DEDENT
1504−244:1 NEWLINE
1505−244:1 glyph ++
1506−244:4 name flit
1507−244:9 glyph |=
1508−244:12 name predicate
1509−244:21 tight glyph =
1510−244:22 tight glyph $-(
1511−244:25 tight tvar A
1512−244:27 glyph ?
1513−244:28 tight glyph )
1514−245:3 INDENT
1515−245:3 glyph |=
1516−245:6 name value
1517−245:11 tight glyph =
1518−245:12 tight tvar A
1519−246:5 INDENT
1520−246:5 glyph ?-
1521−246:8 glyph (
1522−246:9 tight name predicate
1523−246:19 name value
1524−246:24 tight glyph )
1525−247:7 INDENT
1526−247:7 lit %.y
1527−247:11 glyph `
1528−247:12 tight name value
1529−248:7 NEWLINE
1530−248:7 lit %.n
1531−248:11 lit ~
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
15321566250:1 DEDENT
15331567250:1 DEDENT
15341568250:1 DEDENT
15351569250:1 NEWLINE
15361570250:1 glyph ++
1537−250:4 name murn
1571+250:4 name flit
15381572250:9 glyph |=
1539−250:12 name args
1540−250:16 tight glyph =
1541−250:17 tight glyph [
1542−250:18 tight glyph (
1543−250:19 tight name list
1544−250:24 tvar A
1545−250:25 tight glyph )
1546−250:27 glyph $-(
1547−250:30 tight tvar A
1548−250:32 glyph (
1549−250:33 tight name unit
1550−250:38 tvar B
1551−250:39 tight glyph )
1552−250:40 tight glyph )
1553−250:41 tight 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 )
15541579251:3 INDENT
1555−251:3 glyph ?-
1556−251:6 name args
1580+251:3 glyph |=
1581+251:6 name value
1582+251:11 tight glyph =
1583+251:12 tight tvar A
15571584252:5 INDENT
1558−252:5 glyph [
1559−252:6 tight name xs
1560−252:9 name f
1561−252:10 tight glyph ]
1585+252:5 glyph ^-
1586+252:8 glyph (
1587+252:9 tight name unit
1588+252:14 tvar A
1589+252:15 tight glyph )
15621590253:7 INDENT
15631591253:7 glyph ?-
1564−253:10 name xs
1592+253:10 glyph (
1593+253:11 tight name predicate
1594+253:21 name value
1595+253:26 tight glyph )
15651596254:9 INDENT
1566−254:9 lit ~
1567−254:11 lit ~
1597+254:9 lit %.y
1598+254:13 glyph `
1599+254:14 tight name value
15681600255:9 NEWLINE
1569−255:9 glyph [
1570−255:10 tight name item
1571−255:15 name rest
1572−255:19 tight glyph ]
1573−256:11 INDENT
1574−256:11 glyph ?-
1575−256:14 glyph (
1576−256:15 tight name f
1577−256:17 name item
1578−256:21 tight glyph )
1579−257:13 INDENT
1580−257:13 lit ~
1581−257:15 glyph (
1582−257:16 tight name murn
1583−257:21 name rest
1584−257:26 name f
1585−257:27 tight glyph )
1586−258:13 NEWLINE
1587−258:13 glyph [
1588−258:14 tight lit ~
1589−258:16 name value
1590−258:21 tight glyph ]
1591−258:23 glyph [
1592−258:24 tight name value
1593−258:30 glyph (
1594−258:31 tight name murn
1595−258:36 name rest
1596−258:41 name f
1597−258:42 tight glyph )
1598−258:43 tight glyph ]
1599−260:1 DEDENT
1600−260:1 DEDENT
1601−260:1 DEDENT
1602−260:1 DEDENT
1603−260:1 DEDENT
1604−260:1 DEDENT
1605−260:1 NEWLINE
1606−260:1 glyph ++
1607−260:4 name join
1608−260:9 glyph |=
1609−260:12 name args
1610−260:16 tight glyph =
1611−260:17 tight glyph [
1612−260:18 tight tvar A
1613−260:20 glyph (
1614−260:21 tight name list
1615−260:26 tvar A
1616−260:27 tight glyph )
1617−260:28 tight glyph ]
1618−261:3 INDENT
1619−261:3 glyph ?-
1620−261:6 name args
1621−262:5 INDENT
1622−262:5 glyph [
1623−262:6 tight name separator
1624−262:16 name xs
1625−262:18 tight glyph ]
1626−263:7 INDENT
1627−263:7 glyph ?-
1628−263:10 name xs
1629−264:9 INDENT
1630−264:9 lit ~
1631−264:11 lit ~
1632−265:9 NEWLINE
1633−265:9 glyph [
1634−265:10 tight name item
1635−265:15 name rest
1636−265:19 tight glyph ]
1637−266:11 INDENT
1638−266:11 glyph ?-
1639−266:14 name rest
1640−267:13 INDENT
1641−267:13 lit ~
1642−267:15 glyph [
1643−267:16 tight name item
1644−267:21 lit ~
1645−267:22 tight glyph ]
1646−268:13 NEWLINE
1647−268:13 glyph [
1648−268:14 tight name next
1649−268:19 name more
1650−268:23 tight glyph ]
1651−268:25 glyph [
1652−268:26 tight name item
1653−268:31 glyph [
1654−268:32 tight name separator
1655−268:42 glyph (
1656−268:43 tight name join
1657−268:48 name separator
1658−268:58 name rest
1659−268:62 tight glyph )
1660−268:63 tight glyph ]
1661−268:64 tight glyph ]
1662−270:1 DEDENT
1663−270:1 DEDENT
1664−270:1 DEDENT
1665−270:1 DEDENT
1666−270:1 DEDENT
1667−270:1 DEDENT
1668−270:1 NEWLINE
1669−270:1 glyph ++
1670−270:4 name snip
1671−270:9 glyph |=
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 ?-
16721710270:12 name xs
1673−270:14 tight glyph =
1674−270:15 tight glyph (
1675−270:16 tight name list
1676−270:21 tvar A
1677−270:22 tight glyph )
1678−271:3 INDENT
1679−271:3 glyph ?-
1680−271:6 name xs
1681−272:5 INDENT
1682−272:5 lit ~
1683−272:7 lit ~
1684−273:5 NEWLINE
1685−273:5 glyph [
1686−273:6 tight name item
1687−273:11 name rest
1688−273:15 tight glyph ]
1689−274:7 INDENT
1690−274:7 glyph ?-
1691−274:10 name rest
1692−275:9 INDENT
1693−275:9 lit ~
1694−275:11 lit ~
1695−276:9 NEWLINE
1696−276:9 glyph [
1697−276:10 tight name next
1698−276:15 name more
1699−276:19 tight glyph ]
1700−276:21 glyph [
1701−276:22 tight name item
1702−276:27 glyph (
1703−276:28 tight name snip
1704−276:33 name rest
1705−276:37 tight glyph )
1706−276:38 tight glyph ]
1707−278:1 DEDENT
1708−278:1 DEDENT
1709−278:1 DEDENT
1710−278:1 DEDENT
1711−278:1 NEWLINE
1712−278:1 glyph ++
1713−278:4 name rear
1714−278:9 glyph |=
1715−278:12 name xs
1716−278:14 tight glyph =
1717−278:15 tight glyph (
1718−278:16 tight name list
1719−278:21 tvar A
1720−278:22 tight glyph )
1721−279:3 INDENT
1722−279:3 glyph ?-
1723−279:6 name xs
1724−280:5 INDENT
1725−280:5 lit ~
1726−280:7 glyph !!
1727−281:5 NEWLINE
1728−281:5 glyph [
1729−281:6 tight name item
1730−281:11 name rest
1731−281:15 tight glyph ]
1732−282:7 INDENT
1733−282:7 glyph ?-
1734−282:10 name rest
1735−283:9 INDENT
1736−283:9 lit ~
1737−283:11 name item
1738−284:9 NEWLINE
1739−284:9 glyph [
1740−284:10 tight name next
1741−284:15 name more
1742−284:19 tight glyph ]
1743−284:21 glyph (
1744−284:22 tight name rear
1745−284:27 name rest
1746−284:31 tight glyph )
1747−284:32 DEDENT
1748−284:32 DEDENT
1749−284:32 DEDENT
1750−284:32 DEDENT
1751−284:32 NEWLINE
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+773−740
@@ -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,740 +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− (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− (branch 48:7
115− (wing 48:10 xs)
116− (arm 49:9 (lit 49:9 ~) (lit 49:11 ~))
117− (arm 50:9
118− (cell 50:9 (bind 50:10 item) (bind 50:15 rest))
119− (tuple 50:21
120− (group 50:22
121− (call 50:23 (wing 50:23 f) (wing 50:25 item)))
122− (group 50:31
123− (call 50:32 (wing 50:32 turn) (wing 50:37 rest) (wing 50:42 f))))))))))))
124− (mold 52:1 dime
125− (cell 52:9
126− (face 52:10 p (aura 52:12 @ta))
127− (face 52:16 q (aura 52:18 @))))
128− (mold 54:1 hair
129− (cell 54:9
130− (face 54:10 p (aura 54:12 @ud))
131− (face 54:16 q (aura 54:18 @ud))))
132− (mold 56:1 pint
133− (cell 56:9
134− (face 56:10 p
135− (cell 56:12
136− (face 56:13 p (aura 56:15 @))
137− (face 56:17 q (aura 56:19 @))))
138− (face 56:22 q
139− (cell 56:24
140− (face 56:25 p (aura 56:27 @))
141− (face 56:29 q (aura 56:31 @))))))
142− (mold 58:1 coin
143− (union 59:3
144− (cell 59:3
145− (const 59:4 %$)
146− (face 59:7 p (ref 59:9 dime)))
147− (cell 60:3
148− (const 60:4 %blob)
149− (face 60:10 p (noun 60:12)))
150− (cell 61:3
151− (const 61:4 %many)
152− (face 61:10 p
153− (apply 61:12 list (ref 61:18 coin))))))
154− (mold 63:1 pair
155− (generic 63:9 A B
156− (cell 63:18
157− (face 63:19 p (tvar 63:21 A))
158− (face 63:23 q (tvar 63:25 B)))))
159− (mold 65:1 trel
160− (generic 65:9 A B C
161− (cell 65:20
162− (face 65:21 p (tvar 65:23 A))
163− (face 65:25 q (tvar 65:27 B))
164− (face 65:29 r (tvar 65:31 C)))))
165− (mold 67:1 qual
166− (generic 67:9 A B C D
167− (cell 67:22
168− (face 67:23 p (tvar 67:25 A))
169− (face 67:27 q (tvar 67:29 B))
170− (face 67:31 r (tvar 67:33 C))
171− (face 67:35 s (tvar 67:37 D)))))
172− (mold 69:1 cord (aura 69:9 @t))
173− (mold 71:1 knot (aura 71:9 @ta))
174− (mold 73:1 tape
175− (apply 73:9 list (aura 73:15 @tD)))
176− (mold 75:1 path
177− (apply 75:9 list (ref 75:15 knot)))
178− (mold 77:1 tank
179− (union 78:3
180− (ref 78:3 cord)
181− (cell 79:3
182− (const 79:4 %leaf)
183− (face 79:10 p (ref 79:12 tape)))
184− (cell 80:3
185− (const 80:4 %palm)
186− (face 80:10 p
187− (apply 80:12 qual (ref 80:18 tape) (ref 80:23 tape) (ref 80:28 tape) (ref 80:33 tape)))
188− (face 80:39 q
189− (apply 80:41 list (ref 80:47 tank))))
190− (cell 81:3
191− (const 81:4 %rose)
192− (face 81:10 p
193− (apply 81:12 trel (ref 81:18 tape) (ref 81:23 tape) (ref 81:28 tape)))
194− (face 81:34 q
195− (apply 81:36 list (ref 81:42 tank))))))
196− (mold 83:1 nail
197− (cell 83:9
198− (face 83:10 p (ref 83:12 hair))
199− (face 83:17 q (ref 83:19 tape))))
200− (mold 85:1 edge
201− (cell 85:9
202− (face 85:10 p (ref 85:12 hair))
203− (face 85:17 q
204− (apply 85:19 unit
205− (cell 85:25
206− (face 85:26 p (noun 85:28))
207− (face 85:30 q (ref 85:32 nail)))))))
208− (mold 87:1 rule
209− (fn 87:9 (ref 87:12 nail) (ref 87:17 edge)))
210− (mold 89:1 spot
211− (cell 89:9
212− (face 89:10 p (ref 89:12 path))
213− (face 89:17 q (ref 89:19 pint))))
214− (mold 91:1 toon
215− (union 92:3
216− (cell 92:3
217− (const 92:4 %0)
218− (face 92:7 p (noun 92:9)))
219− (cell 93:3
220− (const 93:4 %1)
221− (face 93:7 p (noun 93:9)))
222− (cell 94:3
223− (const 94:4 %2)
224− (face 94:7 p
225− (apply 94:9 list (ref 94:15 tank))))))
226− (mold 96:1 like
227− (generic 96:9 A
228− (cell 96:16
229− (face 96:17 p (ref 96:19 hair))
230− (face 96:24 q
231− (apply 96:26 unit
232− (cell 96:32
233− (face 96:33 p (tvar 96:35 A))
234− (face 96:37 q (ref 96:39 nail))))))))
235− (value 98:1 wonk
236− (gate 98:9
237− (face 98:12 veq
238− (apply 98:16 like (tvar 98:22 A)))
239− (body 99:3
240− (branch 99:3
241− (wing 99:6 q.veq)
242− (arm 100:5 (lit 100:5 ~) (crash 100:7))
243− (arm 101:5
244− (cell 101:5 (lit 101:6 ~) (bind 101:8 product))
245− (wing 101:17 p.product))))))
246− (mold 103:1 lone
247− (generic 103:9 A
248− (cell 103:16
249− (face 103:17 p (tvar 103:19 A)))))
250− (mold 105:1 lest
251− (generic 105:9 A
252− (cell 105:16
253− (face 105:17 i (tvar 105:19 A))
254− (face 105:21 t
255− (apply 105:23 list (tvar 105:29 A))))))
256− (mold 107:1 pole
257− (generic 107:9 A
258− (union 108:3
259− (const 108:3 ~)
260− (cell 109:3
261− (tvar 109:4 A)
262− (apply 109:6 pole (tvar 109:12 A))))))
263− (mold 111:1 quip
264− (generic 111:9 A B
265− (cell 111:18
266− (apply 111:19 list (tvar 111:25 A))
267− (tvar 111:28 B))))
268− (mold 113:1 tree
269− (generic 113:9 A
270− (union 114:3
271− (const 114:3 ~)
272− (cell 115:3
273− (face 115:4 n (tvar 115:6 A))
274− (face 115:8 l
275− (apply 115:10 tree (tvar 115:16 A)))
276− (face 115:19 r
277− (apply 115:21 tree (tvar 115:27 A)))))))
278− (mold 117:1 each
279− (generic 117:9 A B
280− (union 118:3
281− (cell 118:3
282− (const 118:4 %|)
283− (face 118:7 p (tvar 118:9 B)))
284− (cell 119:3
285− (const 119:4 %&)
286− (face 119:7 p (tvar 119:9 A))))))
287− (mold 121:1 bloq (aura 121:9 @))
288− (value 123:1 some
289− (gate 123:9
290− (face 123:12 item (tvar 123:17 A))
291− (unit 123:19 (wing 123:20 item))))
292− (value 125:1 lure
293− (gate 125:9
294− (face 125:12 item (tvar 125:17 A))
295− (body 126:3
296− (cast 126:3
297− (apply 126:6 list (tvar 126:12 A))
298− (tuple 126:15 (wing 126:16 item) (lit 126:21 ~))))))
299− (value 128:1 snoc
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
202+ (cell 88:9
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
262+ (generic 112:9 A
263+ (union 113:3
264+ (const 113:3 ~)
265+ (cell 114:3
266+ (tvar 114:4 A)
267+ (apply 114:6 pole (tvar 114:12 A))))))
268+ (mold 116:1 quip
269+ (generic 116:9 A B
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
300294 (gate 128:9
301− (face 128:12 args
302− (cell 128:17
303− (apply 128:18 list (tvar 128:24 A))
304− (tvar 128:27 A)))
305− (body 129:3
306− (branch 129:3
307− (wing 129:6 args)
308− (arm 130:5
309− (cell 130:5 (bind 130:6 xs) (bind 130:9 item))
310− (group 130:15
311− (call 130:16
312− (wing 130:16 weld)
313− (wing 130:21 xs)
314− (tuple 130:24 (wing 130:25 item) (lit 130:30 ~)))))))))
315− (value 132:1 flop
316− (gate 132:9
317− (face 132:12 xs
318− (apply 132:15 list (tvar 132:21 A)))
319− (body 133:3
320− (value 133:3 reverse-into
321− (gate 133:19
322− (face 133:22 args
323− (cell 133:27
324− (apply 133:28 list (tvar 133:34 A))
325− (apply 133:37 list (tvar 133:43 A))))
326− (body 134:5
327− (branch 134:5
328− (wing 134:8 args)
329− (arm 135:7
330− (cell 135:7 (bind 135:8 rest) (bind 135:13 acc))
331− (body 136:9
332− (branch 136:9
333− (wing 136:12 rest)
334− (arm 137:11 (lit 137:11 ~) (wing 137:13 acc))
335− (arm 138:11
336− (cell 138:11 (bind 138:12 item) (bind 138:17 more))
337− (group 138:23
338− (call 138:24
339− (wing 138:24 reverse-into)
340− (wing 138:37 more)
341− (tuple 138:42 (wing 138:43 item) (wing 138:48 acc))))))))))))
342− (group 139:3
343− (call 139:4 (wing 139:4 reverse-into) (wing 139:17 xs) (lit 139:20 ~))))))
344− (value 141:1 drop
345− (gate 141:9
346− (face 141:12 maybe
347− (apply 141:18 unit (tvar 141:24 A)))
348− (body 142:3
349− (branch 142:3
350− (wing 142:6 maybe)
351− (arm 143:5 (lit 143:5 ~) (lit 143:7 ~))
352− (arm 144:5
353− (cell 144:5 (lit 144:6 ~) (bind 144:8 value))
354− (tuple 144:15 (wing 144:16 value) (lit 144:22 ~)))))))
355− (value 146:1 bind
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
356350 (gate 146:9
357− (face 146:12 args
358− (cell 146:17
359− (apply 146:18 unit (tvar 146:24 A))
360− (fn 146:27 (tvar 146:30 A) (tvar 146:32 B))))
351+ (face 146:12 maybe
352+ (apply 146:18 unit (tvar 146:24 A)))
361353 (body 147:3
362− (branch 147:3
363− (wing 147:6 args)
364− (arm 148:5
365− (cell 148:5 (bind 148:6 maybe) (bind 148:12 f))
366− (body 149:7
367− (branch 149:7
368− (wing 149:10 maybe)
369− (arm 150:9 (lit 150:9 ~) (lit 150:11 ~))
370− (arm 151:9
371− (cell 151:9 (lit 151:10 ~) (bind 151:12 value))
372− (unit 151:19
373− (group 151:20
374− (call 151:21 (wing 151:21 f) (wing 151:23 value))))))))))))
375− (value 153:1 biff
376− (gate 153:9
377− (face 153:12 args
378− (cell 153:17
379− (apply 153:18 unit (tvar 153:24 A))
380− (fn 153:27
381− (tvar 153:30 A)
382− (apply 153:32 unit (tvar 153:38 B)))))
383− (body 154:3
384− (branch 154:3
385− (wing 154:6 args)
386− (arm 155:5
387− (cell 155:5 (bind 155:6 maybe) (bind 155:12 f))
388− (body 156:7
389− (branch 156:7
390− (wing 156:10 maybe)
391− (arm 157:9 (lit 157:9 ~) (lit 157:11 ~))
392− (arm 158:9
393− (cell 158:9 (lit 158:10 ~) (bind 158:12 value))
394− (group 158:19
395− (call 158:20 (wing 158:20 f) (wing 158:22 value)))))))))))
396− (value 160:1 both
397− (gate 160:9
398− (face 160:12 args
399− (cell 160:17
400− (apply 160:18 unit (tvar 160:24 A))
401− (apply 160:27 unit (tvar 160:33 B))))
402− (body 161:3
403− (branch 161:3
404− (wing 161:6 args)
405− (arm 162:5
406− (cell 162:5 (bind 162:6 first) (bind 162:12 second))
407− (body 163:7
408− (branch 163:7
409− (wing 163:10 first)
410− (arm 164:9 (lit 164:9 ~) (lit 164:11 ~))
411− (arm 165:9
412− (cell 165:9 (lit 165:10 ~) (bind 165:12 a))
413− (body 166:11
414− (branch 166:11
415− (wing 166:14 second)
416− (arm 167:13 (lit 167:13 ~) (lit 167:15 ~))
417− (arm 168:13
418− (cell 168:13 (lit 168:14 ~) (bind 168:16 b))
419− (unit 168:19
420− (tuple 168:20 (wing 168:21 a) (wing 168:23 b))))))))))))))
421− (value 170:1 clap
422− (gate 170:9
423− (face 170:12 args
424− (cell 170:17
425− (apply 170:18 unit (tvar 170:24 A))
426− (apply 170:27 unit (tvar 170:33 A))
427− (fn 170:36
428− (cell 170:39 (tvar 170:40 A) (tvar 170:42 A))
429− (tvar 170:45 A))))
430− (body 171:3
431− (branch 171:3
432− (wing 171:6 args)
433− (arm 172:5
434− (cell 172:5 (bind 172:6 first) (bind 172:12 second) (bind 172:19 combine))
435− (body 173:7
436− (branch 173:7
437− (wing 173:10 first)
438− (arm 174:9 (lit 174:9 ~) (wing 174:11 second))
439− (arm 175:9
440− (cell 175:9 (lit 175:10 ~) (bind 175:12 a))
441− (body 176:11
442− (branch 176:11
443− (wing 176:14 second)
444− (arm 177:13 (lit 177:13 ~) (wing 177:15 first))
445− (arm 178:13
446− (cell 178:13 (lit 178:14 ~) (bind 178:16 b))
447− (unit 178:19
448− (group 178:20
449− (call 178:21 (wing 178:21 combine) (wing 178:29 a) (wing 178:31 b)))))))))))))))
450− (value 180:1 clef
451− (gate 180:9
452− (face 180:12 args
453− (cell 180:17
454− (apply 180:18 unit (tvar 180:24 A))
455− (apply 180:27 unit (tvar 180:33 B))
456− (fn 180:36
457− (cell 180:39 (tvar 180:40 A) (tvar 180:42 B))
458− (apply 180:45 unit (tvar 180:51 C)))))
459− (body 181:3
460− (branch 181:3
461− (wing 181:6 args)
462− (arm 182:5
463− (cell 182:5 (bind 182:6 first) (bind 182:12 second) (bind 182:19 combine))
464− (body 183:7
465− (branch 183:7
466− (wing 183:10 first)
467− (arm 184:9 (lit 184:9 ~) (lit 184:11 ~))
468− (arm 185:9
469− (cell 185:9 (lit 185:10 ~) (bind 185:12 a))
470− (body 186:11
471− (branch 186:11
472− (wing 186:14 second)
473− (arm 187:13 (lit 187:13 ~) (lit 187:15 ~))
474− (arm 188:13
475− (cell 188:13 (lit 188:14 ~) (bind 188:16 b))
476− (group 188:19
477− (call 188:20 (wing 188:20 combine) (wing 188:28 a) (wing 188:30 b))))))))))))))
478− (value 190:1 skim
479− (gate 190:9
480− (face 190:12 args
481− (cell 190:17
482− (apply 190:18 list (tvar 190:24 A))
483− (fn 190:27 (tvar 190:30 A) (flag 190:32))))
484− (body 191:3
485− (branch 191:3
486− (wing 191:6 args)
487− (arm 192:5
488− (cell 192:5 (bind 192:6 xs) (bind 192:9 predicate))
489− (body 193:7
490− (branch 193:7
491− (wing 193:10 xs)
492− (arm 194:9 (lit 194:9 ~) (lit 194:11 ~))
493− (arm 195:9
494− (cell 195:9 (bind 195:10 item) (bind 195:15 rest))
495− (body 196:11
496− (branch 196:11
497− (group 196:14
498− (call 196:15 (wing 196:15 predicate) (wing 196:25 item)))
499− (arm 197:13
500− (lit 197:13 %.y)
501− (tuple 197:17
502− (wing 197:18 item)
503− (group 197:23
504− (call 197:24 (wing 197:24 skim) (wing 197:29 rest) (wing 197:34 predicate)))))
505− (arm 198:13
506− (lit 198:13 %.n)
507− (group 198:17
508− (call 198:18 (wing 198:18 skim) (wing 198:23 rest) (wing 198:28 predicate))))))))))))))
509− (value 200:1 skip
510− (gate 200:9
511− (face 200:12 args
512− (cell 200:17
513− (apply 200:18 list (tvar 200:24 A))
514− (fn 200:27 (tvar 200:30 A) (flag 200:32))))
515− (body 201:3
516− (branch 201:3
517− (wing 201:6 args)
518− (arm 202:5
519− (cell 202:5 (bind 202:6 xs) (bind 202:9 predicate))
520− (body 203:7
521− (branch 203:7
522− (wing 203:10 xs)
523− (arm 204:9 (lit 204:9 ~) (lit 204:11 ~))
524− (arm 205:9
525− (cell 205:9 (bind 205:10 item) (bind 205:15 rest))
526− (body 206:11
527− (branch 206:11
528− (group 206:14
529− (call 206:15 (wing 206:15 predicate) (wing 206:25 item)))
530− (arm 207:13
531− (lit 207:13 %.y)
532− (group 207:17
533− (call 207:18 (wing 207:18 skip) (wing 207:23 rest) (wing 207:28 predicate))))
534− (arm 208:13
535− (lit 208:13 %.n)
536− (tuple 208:17
537− (wing 208:18 item)
538− (group 208:23
539− (call 208:24 (wing 208:24 skip) (wing 208:29 rest) (wing 208:34 predicate)))))))))))))))
540− (value 210:1 levy
541− (gate 210:9
542− (face 210:12 args
543− (cell 210:17
544− (apply 210:18 list (tvar 210:24 A))
545− (fn 210:27 (tvar 210:30 A) (flag 210:32))))
546− (body 211:3
547− (branch 211:3
548− (wing 211:6 args)
549− (arm 212:5
550− (cell 212:5 (bind 212:6 xs) (bind 212:9 predicate))
551− (body 213:7
552− (branch 213:7
553− (wing 213:10 xs)
554− (arm 214:9 (lit 214:9 ~) (lit 214:11 %.y))
555− (arm 215:9
556− (cell 215:9 (bind 215:10 item) (bind 215:15 rest))
557− (body 216:11
558− (branch 216:11
559− (group 216:14
560− (call 216:15 (wing 216:15 predicate) (wing 216:25 item)))
561− (arm 217:13
562− (lit 217:13 %.y)
563− (group 217:17
564− (call 217:18 (wing 217:18 levy) (wing 217:23 rest) (wing 217:28 predicate))))
565− (arm 218:13 (lit 218:13 %.n) (lit 218:17 %.n))))))))))))
566− (value 220:1 lien
567− (gate 220:9
568− (face 220:12 args
569− (cell 220:17
570− (apply 220:18 list (tvar 220:24 A))
571− (fn 220:27 (tvar 220:30 A) (flag 220:32))))
572− (body 221:3
573− (branch 221:3
574− (wing 221:6 args)
575− (arm 222:5
576− (cell 222:5 (bind 222:6 xs) (bind 222:9 predicate))
577− (body 223:7
578− (branch 223:7
579− (wing 223:10 xs)
580− (arm 224:9 (lit 224:9 ~) (lit 224:11 %.n))
581− (arm 225:9
582− (cell 225:9 (bind 225:10 item) (bind 225:15 rest))
583− (body 226:11
584− (branch 226:11
585− (group 226:14
586− (call 226:15 (wing 226:15 predicate) (wing 226:25 item)))
587− (arm 227:13 (lit 227:13 %.y) (lit 227:17 %.y))
588− (arm 228:13
589− (lit 228:13 %.n)
590− (group 228:17
591− (call 228:18 (wing 228:18 lien) (wing 228:23 rest) (wing 228:28 predicate))))))))))))))
592− (value 230:1 roll
593− (gate 230:9
594− (face 230:12 args
595− (cell 230:17
596− (apply 230:18 list (tvar 230:24 A))
597− (tvar 230:27 B)
598− (fn 230:29
599− (cell 230:32 (tvar 230:33 A) (tvar 230:35 B))
600− (tvar 230:38 B))))
601− (body 231:3
602− (branch 231:3
603− (wing 231:6 args)
604− (arm 232:5
605− (cell 232:5 (bind 232:6 xs) (bind 232:9 start) (bind 232:15 combine))
606− (body 233:7
607− (branch 233:7
608− (wing 233:10 xs)
609− (arm 234:9 (lit 234:9 ~) (wing 234:11 start))
610− (arm 235:9
611− (cell 235:9 (bind 235:10 item) (bind 235:15 rest))
612− (group 235:21
613− (call 235:22
614− (wing 235:22 roll)
615− (wing 235:27 rest)
616− (group 235:32
617− (call 235:33 (wing 235:33 combine) (wing 235:41 item) (wing 235:46 start)))
618− (wing 235:53 combine)))))))))))
619− (value 237:1 reel
620− (gate 237:9
621− (face 237:12 args
622− (cell 237:17
623− (apply 237:18 list (tvar 237:24 A))
624− (tvar 237:27 B)
625− (fn 237:29
626− (cell 237:32 (tvar 237:33 A) (tvar 237:35 B))
627− (tvar 237:38 B))))
628− (body 238:3
629− (branch 238:3
630− (wing 238:6 args)
631− (arm 239:5
632− (cell 239:5 (bind 239:6 xs) (bind 239:9 start) (bind 239:15 combine))
633− (body 240:7
634− (branch 240:7
635− (wing 240:10 xs)
636− (arm 241:9 (lit 241:9 ~) (wing 241:11 start))
637− (arm 242:9
638− (cell 242:9 (bind 242:10 item) (bind 242:15 rest))
639− (group 242:21
640− (call 242:22
641− (wing 242:22 combine)
642− (wing 242:30 item)
643− (group 242:35
644− (call 242:36 (wing 242:36 reel) (wing 242:41 rest) (wing 242:46 start) (wing 242:52 combine)))))))))))))
645− (value 244:1 flit
646− (gate 244:9
647− (face 244:12 predicate
648− (fn 244:22 (tvar 244:25 A) (flag 244:27)))
649− (body 245:3
650− (gate 245:3
651− (face 245:6 value (tvar 245:12 A))
652− (body 246:5
653− (branch 246:5
654− (group 246:8
655− (call 246:9 (wing 246:9 predicate) (wing 246:19 value)))
656− (arm 247:7
657− (lit 247:7 %.y)
658− (unit 247:11 (wing 247:12 value)))
659− (arm 248:7 (lit 248:7 %.n) (lit 248:11 ~))))))))
660− (value 250:1 murn
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
364+ (gate 152:9
365+ (face 152:12 args
366+ (cell 152:17
367+ (apply 152:18 unit (tvar 152:24 A))
368+ (fn 152:27 (tvar 152:30 A) (tvar 152:32 B))))
369+ (body 153:3
370+ (branch 153:3
371+ (wing 153:6 args)
372+ (arm 154:5
373+ (cell 154:5 (bind 154:6 maybe) (bind 154:12 f))
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
386+ (gate 159:9
387+ (face 159:12 args
388+ (cell 159:17
389+ (apply 159:18 unit (tvar 159:24 A))
390+ (fn 159:27
391+ (tvar 159:30 A)
392+ (apply 159:32 unit (tvar 159:38 B)))))
393+ (body 160:3
394+ (branch 160:3
395+ (wing 160:6 args)
396+ (arm 161:5
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
531+ (gate 206:9
532+ (face 206:12 args
533+ (cell 206:17
534+ (apply 206:18 list (tvar 206:24 A))
535+ (fn 206:27 (tvar 206:30 A) (flag 206:32))))
536+ (body 207:3
537+ (branch 207:3
538+ (wing 207:6 args)
539+ (arm 208:5
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
661669 (gate 250:9
662− (face 250:12 args
663− (cell 250:17
664− (apply 250:18 list (tvar 250:24 A))
665− (fn 250:27
666− (tvar 250:30 A)
667− (apply 250:32 unit (tvar 250:38 B)))))
670+ (face 250:12 predicate
671+ (fn 250:22 (tvar 250:25 A) (flag 250:27)))
668672 (body 251:3
669− (branch 251:3
670− (wing 251:6 args)
671− (arm 252:5
672− (cell 252:5 (bind 252:6 xs) (bind 252:9 f))
673− (body 253:7
674− (branch 253:7
675− (wing 253:10 xs)
676− (arm 254:9 (lit 254:9 ~) (lit 254:11 ~))
677− (arm 255:9
678− (cell 255:9 (bind 255:10 item) (bind 255:15 rest))
679− (body 256:11
680− (branch 256:11
681− (group 256:14
682− (call 256:15 (wing 256:15 f) (wing 256:17 item)))
683− (arm 257:13
684− (lit 257:13 ~)
685− (group 257:15
686− (call 257:16 (wing 257:16 murn) (wing 257:21 rest) (wing 257:26 f))))
687− (arm 258:13
688− (cell 258:13 (lit 258:14 ~) (bind 258:16 value))
689− (tuple 258:23
690− (wing 258:24 value)
691− (group 258:30
692− (call 258:31 (wing 258:31 murn) (wing 258:36 rest) (wing 258:41 f)))))))))))))))
693− (value 260:1 join
694− (gate 260:9
695− (face 260:12 args
696− (cell 260:17
697− (tvar 260:18 A)
698− (apply 260:20 list (tvar 260:26 A))))
699− (body 261:3
700− (branch 261:3
701− (wing 261:6 args)
702− (arm 262:5
703− (cell 262:5 (bind 262:6 separator) (bind 262:16 xs))
704− (body 263:7
705− (branch 263:7
706− (wing 263:10 xs)
707− (arm 264:9 (lit 264:9 ~) (lit 264:11 ~))
708− (arm 265:9
709− (cell 265:9 (bind 265:10 item) (bind 265:15 rest))
710− (body 266:11
711− (branch 266:11
712− (wing 266:14 rest)
713− (arm 267:13
714− (lit 267:13 ~)
715− (tuple 267:15 (wing 267:16 item) (lit 267:21 ~)))
716− (arm 268:13
717− (cell 268:13 (bind 268:14 next) (bind 268:19 more))
718− (tuple 268:25
719− (wing 268:26 item)
720− (tuple 268:31
721− (wing 268:32 separator)
722− (group 268:42
723− (call 268:43 (wing 268:43 join) (wing 268:48 separator) (wing 268:58 rest))))))))))))))))
724− (value 270:1 snip
725− (gate 270:9
726− (face 270:12 xs
727− (apply 270:15 list (tvar 270:21 A)))
728− (body 271:3
729− (branch 271:3
730− (wing 271:6 xs)
731− (arm 272:5 (lit 272:5 ~) (lit 272:7 ~))
732− (arm 273:5
733− (cell 273:5 (bind 273:6 item) (bind 273:11 rest))
734− (body 274:7
735− (branch 274:7
736− (wing 274:10 rest)
737− (arm 275:9 (lit 275:9 ~) (lit 275:11 ~))
738− (arm 276:9
739− (cell 276:9 (bind 276:10 next) (bind 276:15 more))
740− (tuple 276:21
741− (wing 276:22 item)
742− (group 276:27
743− (call 276:28 (wing 276:28 snip) (wing 276:33 rest))))))))))))
744− (value 278:1 rear
745− (gate 278:9
746− (face 278:12 xs
747− (apply 278:15 list (tvar 278:21 A)))
748− (body 279:3
749− (branch 279:3
750− (wing 279:6 xs)
751− (arm 280:5 (lit 280:5 ~) (crash 280:7))
752− (arm 281:5
753− (cell 281:5 (bind 281:6 item) (bind 281:11 rest))
754− (body 282:7
755− (branch 282:7
756− (wing 282:10 rest)
757− (arm 283:9 (lit 283:9 ~) (wing 283:11 item))
758− (arm 284:9
759− (cell 284:9 (bind 284:10 next) (bind 284:15 more))
760− (group 284:21
761− (call 284:22 (wing 284:22 rear) (wing 284:27 rest))))))))))))
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+9−8
@@ -1,4 +1,5 @@
11partial inference; module not checked
2++$ poke: not checked
23++ same: $-(A A)
34++ head: $-([A B] A)
45++ tail: $-([A B] B)
@@ -35,23 +36,23 @@ 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: unit branch results need unsupported inference
43−++ bind: expression is not supported by partial inference
44−++ biff: unit branch results need unsupported inference
45−++ both: expression is not supported by partial inference
46−++ clap: branch pattern is not supported by partial inference
47−++ clef: branch pattern 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))
4849++ skim: sample mold is not supported by partial inference
4950++ skip: sample mold is not supported by partial inference
5051++ levy: sample mold is not supported by partial inference
5152++ lien: sample mold is not supported by partial inference
5253++ roll: sample mold is not supported by partial inference
5354++ reel: sample mold is not supported by partial inference
54−++ flit: expression is not supported by partial inference
55+++ flit: unit construction needs the standard prelude in partial inference
5556++ murn: sample mold is not supported by partial inference
5657++ join: sample mold is not supported by partial inference
5758++ snip: sample mold is 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-union-errors/types.txt+3−3
@@ -9,11 +9,11 @@ partial inference; module not checked
99 ^
1010++ few: sample mold is not supported by partial inference
1111++ many: sample mold is not supported by partial inference
12−++ bad-tag: cast mold and expression type do not unify
13−/tests/golden/types-generic-union-errors/source.jibb:9:15: cast mold
12+++ bad-tag: (choice @t @p) has no case `%missing`
13+/tests/golden/types-generic-union-errors/source.jibb:9:15: expected union
1414++ bad-tag ^- (choice @t @p) %missing
1515 ^
16−/tests/golden/types-generic-union-errors/source.jibb:9:30: expression
16+/tests/golden/types-generic-union-errors/source.jibb:9:30: tag
1717++ bad-tag ^- (choice @t @p) %missing
1818 ^
1919++ bad-payload: cast mold and expression type do not unify
tests/golden/types-import-hoon-flags/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Literals: loobeans `%.y`, `%.n` have type `?`; Patterns: `?-` is exhaustive. Overview, Importing Hoon types: `/-` translates each mold a module uses.
2+tests: A real compiled `/sur` provides `?`, its two singleton values and nested faced fields. The partial checker matches the imported flag exhaustively, accepts each matching singleton and reports incompatible singleton casts; nested field types remain available.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-import-hoon-flags/imports.txtnew file+4
@@ -0,0 +1,4 @@
1+flags flag
2+flags yes
3+flags no
4+flags record
tests/golden/types-import-hoon-flags/source.jibbnew file+14
@@ -0,0 +1,14 @@
1+/- flags
2+++ flag |= b=flag.flags ?- b
3+ %.y "yes"
4+ %.n "no"
5+++ yes |= x=yes.flags x
6+++ no |= x=no.flags x
7+++ nested |= x=record.flags x
8+++ use-yes ^- yes.flags %.y
9+++ bad-yes ^- yes.flags %.n
10+++ use-no ^- no.flags %.n
11+++ bad-no ^- no.flags %.y
12+++ read-flag |= x=record.flags on.x
13+++ read-yes |= x=record.flags yes.x
14+++ read-no |= x=record.flags no.x
tests/golden/types-import-hoon-flags/sur/flags.txtnew file+7
@@ -0,0 +1,7 @@
1+|%
2++$ flag ?
3++$ yes %.y
4++$ no %.n
5++$ record [on=? yes=%.y no=%.n]
6++$ either $?(%.y [%x @t])
7+--
tests/golden/types-import-hoon-flags/tokens.txtnew file+91
@@ -0,0 +1,91 @@
1+1:1 glyph /-
2+1:4 name flags
3+2:1 NEWLINE
4+2:1 glyph ++
5+2:4 name flag
6+2:9 glyph |=
7+2:12 name b
8+2:13 tight glyph =
9+2:14 tight wing flag.flags
10+2:25 glyph ?-
11+2:28 name b
12+3:3 INDENT
13+3:3 lit %.y
14+3:7 str "yes"
15+4:3 NEWLINE
16+4:3 lit %.n
17+4:7 str "no"
18+5:1 DEDENT
19+5:1 NEWLINE
20+5:1 glyph ++
21+5:4 name yes
22+5:8 glyph |=
23+5:11 name x
24+5:12 tight glyph =
25+5:13 tight wing yes.flags
26+5:23 name x
27+6:1 NEWLINE
28+6:1 glyph ++
29+6:4 name no
30+6:7 glyph |=
31+6:10 name x
32+6:11 tight glyph =
33+6:12 tight wing no.flags
34+6:21 name x
35+7:1 NEWLINE
36+7:1 glyph ++
37+7:4 name nested
38+7:11 glyph |=
39+7:14 name x
40+7:15 tight glyph =
41+7:16 tight wing record.flags
42+7:29 name x
43+8:1 NEWLINE
44+8:1 glyph ++
45+8:4 name use-yes
46+8:12 glyph ^-
47+8:15 wing yes.flags
48+8:25 lit %.y
49+9:1 NEWLINE
50+9:1 glyph ++
51+9:4 name bad-yes
52+9:12 glyph ^-
53+9:15 wing yes.flags
54+9:25 lit %.n
55+10:1 NEWLINE
56+10:1 glyph ++
57+10:4 name use-no
58+10:11 glyph ^-
59+10:14 wing no.flags
60+10:23 lit %.n
61+11:1 NEWLINE
62+11:1 glyph ++
63+11:4 name bad-no
64+11:11 glyph ^-
65+11:14 wing no.flags
66+11:23 lit %.y
67+12:1 NEWLINE
68+12:1 glyph ++
69+12:4 name read-flag
70+12:14 glyph |=
71+12:17 name x
72+12:18 tight glyph =
73+12:19 tight wing record.flags
74+12:32 wing on.x
75+13:1 NEWLINE
76+13:1 glyph ++
77+13:4 name read-yes
78+13:13 glyph |=
79+13:16 name x
80+13:17 tight glyph =
81+13:18 tight wing record.flags
82+13:31 wing yes.x
83+14:1 NEWLINE
84+14:1 glyph ++
85+14:4 name read-no
86+14:12 glyph |=
87+14:15 name x
88+14:16 tight glyph =
89+14:17 tight wing record.flags
90+14:30 wing no.x
91+14:34 NEWLINE
tests/golden/types-import-hoon-flags/tree.txtnew file+41
@@ -0,0 +1,41 @@
1+(module
2+ (sur 1:1 flags)
3+ (value 2:1 flag
4+ (gate 2:9
5+ (face 2:12 b (ref 2:14 flag.flags))
6+ (branch 2:25
7+ (wing 2:28 b)
8+ (arm 3:3 (lit 3:3 %.y) (str 3:7 "yes"))
9+ (arm 4:3 (lit 4:3 %.n) (str 4:7 "no")))))
10+ (value 5:1 yes
11+ (gate 5:8
12+ (face 5:11 x (ref 5:13 yes.flags))
13+ (wing 5:23 x)))
14+ (value 6:1 no
15+ (gate 6:7
16+ (face 6:10 x (ref 6:12 no.flags))
17+ (wing 6:21 x)))
18+ (value 7:1 nested
19+ (gate 7:11
20+ (face 7:14 x (ref 7:16 record.flags))
21+ (wing 7:29 x)))
22+ (value 8:1 use-yes
23+ (cast 8:12 (ref 8:15 yes.flags) (lit 8:25 %.y)))
24+ (value 9:1 bad-yes
25+ (cast 9:12 (ref 9:15 yes.flags) (lit 9:25 %.n)))
26+ (value 10:1 use-no
27+ (cast 10:11 (ref 10:14 no.flags) (lit 10:23 %.n)))
28+ (value 11:1 bad-no
29+ (cast 11:11 (ref 11:14 no.flags) (lit 11:23 %.y)))
30+ (value 12:1 read-flag
31+ (gate 12:14
32+ (face 12:17 x (ref 12:19 record.flags))
33+ (wing 12:32 on.x)))
34+ (value 13:1 read-yes
35+ (gate 13:13
36+ (face 13:16 x (ref 13:18 record.flags))
37+ (wing 13:31 yes.x)))
38+ (value 14:1 read-no
39+ (gate 14:12
40+ (face 14:15 x (ref 14:17 record.flags))
41+ (wing 14:30 no.x))))
tests/golden/types-import-hoon-flags/types.txtnew file+24
@@ -0,0 +1,24 @@
1+partial inference; module not checked
2+++ flag: $-(? @t)
3+++ yes: $-(%.y %.y)
4+++ no: $-(%.n %.n)
5+++ nested: $-([on=? [yes=%.y no=%.n]] [on=? [yes=%.y no=%.n]])
6+++ use-yes: %.y
7+++ bad-yes: cast mold and expression type do not unify
8+/tests/golden/types-import-hoon-flags/source.jibb:9:15: cast mold has type %.y
9+++ bad-yes ^- yes.flags %.n
10+ ^
11+/tests/golden/types-import-hoon-flags/source.jibb:9:25: expression has type %.n
12+++ bad-yes ^- yes.flags %.n
13+ ^
14+++ use-no: %.n
15+++ bad-no: cast mold and expression type do not unify
16+/tests/golden/types-import-hoon-flags/source.jibb:11:14: cast mold has type %.n
17+++ bad-no ^- no.flags %.y
18+ ^
19+/tests/golden/types-import-hoon-flags/source.jibb:11:23: expression has type %.y
20+++ bad-no ^- no.flags %.y
21+ ^
22+++ read-flag: $-([on=? [yes=%.y no=%.n]] ?)
23+++ read-yes: $-([on=? [yes=%.y no=%.n]] %.y)
24+++ read-no: $-([on=? [yes=%.y no=%.n]] %.n)
tests/golden/types-import-hoon-noun/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Overview, Importing Hoon types: `*` imports as any noun; Grammar, Molds: a typed value fits `*` but the reverse requires a check.
2+tests: A real compiled `/sur` imports `*` directly and in a faced record; typed values widen; narrowing a noun to a cord remains unsupported. An imported tagged union with a noun payload and an overlapping noun union remain unsupported in the partial bridge.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-import-hoon-noun/imports.txtnew file+4
@@ -0,0 +1,4 @@
1+fixture any
2+fixture payload
3+fixture option
4+fixture overlap
tests/golden/types-import-hoon-noun/source.jibbnew file+8
@@ -0,0 +1,8 @@
1+/- fixture
2+++ direct |= x=any.fixture x
3+++ payload |= x=payload.fixture x
4+++ widen ^- any.fixture "hello"
5+++ nested ^- payload.fixture ["hello" 7]
6+++ narrow |= x=any.fixture ^- @t x
7+++ option |= x=option.fixture x
8+++ overlap |= x=overlap.fixture x
tests/golden/types-import-hoon-noun/sur/fixture.txtnew file+6
@@ -0,0 +1,6 @@
1+|%
2++$ any *
3++$ payload [value=* count=@ud]
4++$ option $%([%left *] [%right @t])
5++$ overlap $?(* @ud)
6+--
tests/golden/types-import-hoon-noun/tokens.txtnew file+60
@@ -0,0 +1,60 @@
1+1:1 glyph /-
2+1:4 name fixture
3+2:1 NEWLINE
4+2:1 glyph ++
5+2:4 name direct
6+2:11 glyph |=
7+2:14 name x
8+2:15 tight glyph =
9+2:16 tight wing any.fixture
10+2:28 name x
11+3:1 NEWLINE
12+3:1 glyph ++
13+3:4 name payload
14+3:12 glyph |=
15+3:15 name x
16+3:16 tight glyph =
17+3:17 tight wing payload.fixture
18+3:33 name x
19+4:1 NEWLINE
20+4:1 glyph ++
21+4:4 name widen
22+4:10 glyph ^-
23+4:13 wing any.fixture
24+4:25 str "hello"
25+5:1 NEWLINE
26+5:1 glyph ++
27+5:4 name nested
28+5:11 glyph ^-
29+5:14 wing payload.fixture
30+5:30 glyph [
31+5:31 tight str "hello"
32+5:39 lit 7
33+5:40 tight glyph ]
34+6:1 NEWLINE
35+6:1 glyph ++
36+6:4 name narrow
37+6:11 glyph |=
38+6:14 name x
39+6:15 tight glyph =
40+6:16 tight wing any.fixture
41+6:28 glyph ^-
42+6:31 aura @t
43+6:34 name x
44+7:1 NEWLINE
45+7:1 glyph ++
46+7:4 name option
47+7:11 glyph |=
48+7:14 name x
49+7:15 tight glyph =
50+7:16 tight wing option.fixture
51+7:31 name x
52+8:1 NEWLINE
53+8:1 glyph ++
54+8:4 name overlap
55+8:12 glyph |=
56+8:15 name x
57+8:16 tight glyph =
58+8:17 tight wing overlap.fixture
59+8:33 name x
60+8:34 NEWLINE
tests/golden/types-import-hoon-noun/tree.txtnew file+28
@@ -0,0 +1,28 @@
1+(module
2+ (sur 1:1 fixture)
3+ (value 2:1 direct
4+ (gate 2:11
5+ (face 2:14 x (ref 2:16 any.fixture))
6+ (wing 2:28 x)))
7+ (value 3:1 payload
8+ (gate 3:12
9+ (face 3:15 x (ref 3:17 payload.fixture))
10+ (wing 3:33 x)))
11+ (value 4:1 widen
12+ (cast 4:10 (ref 4:13 any.fixture) (str 4:25 "hello")))
13+ (value 5:1 nested
14+ (cast 5:11
15+ (ref 5:14 payload.fixture)
16+ (tuple 5:30 (str 5:31 "hello") (lit 5:39 7))))
17+ (value 6:1 narrow
18+ (gate 6:11
19+ (face 6:14 x (ref 6:16 any.fixture))
20+ (cast 6:28 (aura 6:31 @t) (wing 6:34 x))))
21+ (value 7:1 option
22+ (gate 7:11
23+ (face 7:14 x (ref 7:16 option.fixture))
24+ (wing 7:31 x)))
25+ (value 8:1 overlap
26+ (gate 8:12
27+ (face 8:15 x (ref 8:17 overlap.fixture))
28+ (wing 8:33 x))))
tests/golden/types-import-hoon-noun/types.txtnew file+8
@@ -0,0 +1,8 @@
1+partial inference; module not checked
2+++ direct: $-(* *)
3+++ payload: $-([value=* count=@ud] [value=* count=@ud])
4+++ widen: *
5+++ nested: [value=* count=@ud]
6+++ narrow: cast constraint is not supported by partial inference
7+++ option: sample mold is not supported by partial inference
8+++ overlap: sample mold is not supported by partial inference
tests/golden/types-import-tlon-notes/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Overview, Importing Hoon types: Hoon `$%` imports as a union if its cases differ as nouns; unused molds are skipped. Grammar, Literals: `~` is null.
2+tests: The unmodified Tlon `desk/sur/notes.hoon` at tloncorp/tlon-apps commit 38f9328f4580000a37a7fdc3ab820fcd65069487 (MIT license in `tests/importer/tlon-license.txt`) has tagged unions with null cases. Both real imported molds reach partial inference without assuming unsupported sibling molds are valid.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-import-tlon-notes/imports.txtnew file+2
@@ -0,0 +1,2 @@
1+notes u-note
2+notes a-note
tests/golden/types-import-tlon-notes/source.jibbnew file+3
@@ -0,0 +1,3 @@
1+/- notes
2+++ update |= x=u-note.notes x
3+++ action |= x=a-note.notes x
tests/golden/types-import-tlon-notes/sur/notes.txtnew file+433
@@ -0,0 +1,433 @@
1+:: notes: shared notebook surface types
2+::
3+|%
4++$ role
5+ ?(%owner %editor %viewer)
6+:: notebook visibility: private (default) rejects joins from non-members;
7+:: public allows anyone to join.
8+::
9++$ visibility
10+ ?(%public %private)
11+:: $flag: global notebook identity (ship + slug term)
12+::
13++$ flag [=ship name=@tas]
14+:: $notebook: top-level container
15+::
16++$ notebook
17+ $: id=@ud
18+ title=@t
19+ created-by=ship
20+ created-at=@da
21+ updated-at=@da
22+ updated-by=ship
23+ ==
24+:: $nest: channel identifier shared with %groups. Structurally identical
25+:: to groups' nest (kind term + host + name); for %notes channels the
26+:: kind is always %notes and [host name] is the notebook flag. Used by the
27+:: %group-channel-join / %group-channel-leave channel-host pokes from %groups.
28+::
29++$ nest [kind=@tas host=@p name=@tas]
30+:: channel-host poke payloads. %groups pokes %group-channel-join /
31+:: %group-channel-leave to auto-join/leave a notes channel as the group
32+:: fleet changes. join carries the group flag so the host can record
33+:: affiliation; leave just identifies the nest.
34+::
35++$ channel-join [=nest group=flag]
36++$ channel-leave [=nest]
37+::
38++$ group-channel
39+ $: meta=[title=@t description=@t image=@t cover=@t]
40+ created=@da
41+ section=@tas
42+ readers=(set @tas)
43+ join=?
44+ ==
45++$ group-create
46+ $: %group
47+ =flag
48+ %channel
49+ =nest
50+ %add
51+ channel=group-channel
52+ ==
53+:: %group action to remove the notes channel from a group (mirror of
54+:: group-create's %add), sent when a group-mode notebook is deleted.
55+::
56++$ group-channel-del
57+ $: %group
58+ =flag
59+ %channel
60+ =nest
61+ %del
62+ ~
63+ ==
64+:: $folder: directory node inside a notebook
65+::
66++$ folder
67+ $: id=@ud
68+ notebook-id=@ud
69+ name=@t
70+ parent-folder-id=(unit @ud)
71+ created-by=ship
72+ created-at=@da
73+ updated-at=@da
74+ updated-by=ship
75+ ==
76+:: $note: leaf document node
77+::
78++$ note
79+ $: id=@ud
80+ notebook-id=@ud
81+ folder-id=@ud
82+ title=@t
83+ slug=(unit @t)
84+ body-md=@t
85+ created-by=ship
86+ created-at=@da
87+ updated-by=ship
88+ updated-at=@da
89+ revision=@ud
90+ ==
91+::
92++$ members (map ship role)
93++$ notebook-members members :: legacy alias for v0 migration types
94+:: $note-revision: an archived prior version of a note
95+::
96++$ note-revision
97+ $: rev=@ud
98+ at=@da
99+ author=ship
100+ title=@t
101+ body-md=@t
102+ ==
103+:: $invite-info: pending invite we've received
104+::
105++$ invite-info [from=ship sent-at=@da title=@t]
106+::
107++$ import-node
108+ $% [%folder name=@t children=(list import-node)]
109+ [%note title=@t body-md=@t]
110+ ==
111+:: $notebook-state: all data for a single notebook (state-14+).
112+:: group: optional Tlon group affiliation. When set, the notebook is a group
113+:: channel — read permission defers to the group's can-read. Set once at
114+:: create (host) and propagated to subscribers via the %snapshot. Lives on
115+:: notebook-state (not $notebook) so it stays out of the on-disk log, which
116+:: embeds $notebook via u-notebook.
117+::
118++$ notebook-state
119+ $: =notebook
120+ =members
121+ =visibility
122+ folders=(map @ud folder)
123+ notes=(map @ud note)
124+ history=(map note-id=@ud (list note-revision))
125+ group=(unit flag)
126+ ==
127+:: Actions (client → agent)
128+::
129+:: $a-notes: top-level client actions.
130+:: notebook-scoped actions are routed via [%notebook =flag =a-notebook].
131+::
132++$ a-notes
133+ $% [%create-notebook title=@t]
134+ :: %create-group-notebook: born inside a group. defers read perms to
135+ :: the group; readers are the group role-ids the channel is restricted
136+ :: to (empty = open). forwarded opaquely to %groups on registration.
137+ [%create-group-notebook title=@t group=flag readers=(set @tas)]
138+ [%join =flag]
139+ [%leave =flag]
140+ [%accept-invite =flag]
141+ [%decline-invite =flag]
142+ [%notebook =flag =a-notebook]
143+ :: api-key management — local-only (?> =(our.bowl src.bowl) at the
144+ :: poke handler). Regenerate replaces the stored key; clear erases
145+ :: it (disabling the X-Api-Key bypass).
146+ [%regenerate-api-key ~]
147+ [%clear-api-key ~]
148+ :: %register-mcp: register %notes as an openapi upstream with the
149+ :: local %mcp-proxy. base-url defaults to 'http://localhost:8080'
150+ :: if ~. The api-key is minted on demand if missing. Local-only.
151+ [%register-mcp base-url=(unit @t)]
152+ ==
153+:: $a-notebook: actions scoped to a specific notebook.
154+:: Outer tag carries flag so inner tags drop the subject prefix.
155+::
156++$ a-notebook
157+ $% [%rename title=@t]
158+ [%delete ~]
159+ [%visibility =visibility]
160+ [%invite who=ship]
161+ [%create-folder parent=@ud name=@t]
162+ [%folder id=@ud =a-folder]
163+ [%create-note folder=@ud title=@t body=@t]
164+ [%note id=@ud =a-note]
165+ [%batch-import folder=@ud notes=(list [title=@t body=@t])]
166+ [%batch-import-tree parent=@ud tree=(list import-node)]
167+ ==
168+:: $a-folder: actions scoped to a specific folder
169+::
170++$ a-folder
171+ $% [%rename name=@t]
172+ [%move new-parent=@ud]
173+ [%delete recursive=?]
174+ :: %update: REST-friendly combined rename+move. Either or both
175+ :: fields may be set; the handler is a no-op for fields left ~.
176+ [%update name=(unit @t) parent=(unit @ud)]
177+ ==
178+:: $a-note: actions scoped to a specific note
179+::
180++$ a-note
181+ $% [%rename title=@t]
182+ [%move folder=@ud]
183+ [%delete ~]
184+ [%update body=@t expected-revision=@ud]
185+ :: %modify: REST-friendly combined rename+move. Either or both
186+ :: fields may be set; body updates stay on %update so the
187+ :: revision-check semantics don't get tangled with metadata edits.
188+ [%modify title=(unit @t) folder=(unit @ud)]
189+ [%publish html=@t]
190+ [%unpublish ~]
191+ [%restore rev=@ud]
192+ ==
193+:: Commands (poke surface — actor authenticated via src.bowl)
194+::
195+:: $c-notes: tagged union of cross-ship messages.
196+:: %notify-invite — host pokes invitee with a pending invite (carries title
197+:: for inbox rendering pre-join). src.bowl must equal the host of `flag`.
198+:: %notebook — subscriber forwards a notebook-scoped command to the host.
199+:: src.bowl is the actor; permission checks happen in se-core.
200+::
201++$ c-notes
202+ $% [%notify-invite =flag title=@t]
203+ [%notebook =flag =c-notebook]
204+ ==
205+:: $c-cmd: `command for a specific notebook` — the flag carries routing
206+:: context, c-notebook carries the verb. Not a wire type; c-notes
207+:: %notebook arm peels into this on the way in. se-core's arms now take
208+:: the flag from door context (se-abed) and the c-notebook payload
209+:: directly, so this shape isn't threaded through se-poke anymore —
210+:: kept here in case other code still wants the combined shape.
211+::
212++$ c-cmd [=flag =c-notebook]
213+:: $c-notebook: notebook-scoped commands. Mirrors a-notebook minus
214+:: client-only verbs (%restore is purely client-side restatement of %update).
215+:: Adds %member-join/%member-leave for peer join/leave signals.
216+::
217++$ c-notebook
218+ $% [%rename title=@t]
219+ [%delete ~]
220+ [%visibility =visibility]
221+ [%invite who=ship]
222+ [%create-folder parent=@ud name=@t]
223+ [%folder id=@ud =a-folder]
224+ [%create-note folder=@ud title=@t body=@t]
225+ [%note id=@ud =a-note]
226+ [%batch-import folder=@ud notes=(list [title=@t body=@t])]
227+ [%batch-import-tree parent=@ud tree=(list import-node)]
228+ [%member-join ~]
229+ [%member-leave ~]
230+ ==
231+:: Updates (agent → subscriber)
232+::
233++$ u-notebook
234+ $% [%created =notebook =visibility]
235+ [%updated =notebook]
236+ [%deleted ~]
237+ [%visibility =visibility]
238+ [%member-joined who=ship =role]
239+ [%member-left who=ship]
240+ [%invite-received from=ship title=@t]
241+ [%invite-removed ~]
242+ [%folder id=@ud =u-folder]
243+ [%note id=@ud =u-note]
244+ ==
245+::
246++$ u-folder
247+ $% [%created =folder]
248+ [%updated =folder]
249+ [%deleted ~]
250+ ==
251+::
252++$ u-note
253+ $% [%created =note]
254+ [%updated =note]
255+ [%deleted ~]
256+ [%published html=@t]
257+ [%unpublished ~]
258+ [%history-archived =note-revision]
259+ ==
260+:: $update: single log entry — time-keyed u-notebook
261+::
262++$ update [=time =u-notebook]
263+:: $u-notes: wire/stream shape — carries flag so listeners know which notebook
264+::
265++$ u-notes [=flag =u-notebook]
266+:: $u-inbox: events pushed on /v0/inbox/stream for cross-cutting UI signals
267+:: (pending invites + a "notebooks changed, please re-scry" ping).
268+::
269++$ u-inbox
270+ $% [%invite-received =flag from=ship sent-at=@da title=@t]
271+ [%invite-removed =flag]
272+ [%notebooks-changed ~]
273+ ==
274+:: Responses (subscription facts)
275+::
276+:: $r-notes: facts pushed to subscribers on /v0/notes/~ship/name/stream
277+:: %snapshot carries visibility so subscribers can seed their local cache.
278+::
279++$ r-notes
280+ $% [%snapshot =flag =visibility =notebook-state]
281+ [%update =flag =update]
282+ ==
283+:: $log: time-ordered append-only update log (one per notebook, u-notebook entries)
284+::
285++$ log ((mop time u-notebook) lte)
286+++ log-on ((on time u-notebook) lte)
287+:: $net: host vs subscriber discriminator
288+::
289++$ net
290+ $~ [%pub *log]
291+ $% [%pub =log]
292+ [%sub =time init=_|]
293+ ==
294+:: Scry response types — typed marks for peek endpoints
295+::
296+:: $notebook-summary: one item from /v0/notebooks (carries flag + visibility)
297+::
298++$ notebook-summary [=flag =notebook =visibility]
299+:: $notebook-detail: one item from /v0/notebook/~ship/name
300+::
301++$ notebook-detail [=flag =notebook =visibility]
302+:: $member-record: one item from /v0/members list
303+::
304++$ member-record [=ship =role]
305+:: $invite-record: one item from /v0/invites list
306+::
307++$ invite-record [=flag =invite-info]
308+:: $published-record: one item from /v0/published list — metadata only.
309+:: HTML body is served via /notes/pub/~host/name/note-id, not this list.
310+::
311++$ published-record [=flag note-id=@ud]
312+:: $note-preview: trimmed note view served on /v0/said
313+::
314+:: .snippet is the leading slice of $note's body-md
315+::
316++$ note-preview
317+ $: id=@ud
318+ title=@t
319+ snippet=@t
320+ author=ship
321+ updated-at=@da
322+ notebook-title=@t
323+ ==
324+:: $said: single-shot /v0/said response
325+::
326++$ said [=flag =note-preview]
327+:: $scam: bounded search results
328+::
329++$ scam
330+ $: last=@ud :: last note-id that was searched, 0 for end
331+ scan=(list note) :: search results
332+ ==
333+:: Type aliases
334+::
335++$ action a-notes
336++$ command c-notes
337++$ response r-notes
338+:: v1: HTTP / request-id surface
339+::
340+:: Wraps a-notes / c-notes / r-notes / update with a correlating
341+:: request-id so the client gets a typed terminal response keyed to
342+:: its action. Consumed by the HTTP API mount (/notes/~/v1) and the
343+:: per-request SSE paths (/v1/notes/~ship/name/request/...).
344+::
345+++ v1
346+ |%
347+ +$ request-id @uv
348+ +$ poke-status ?(%sending %acked %nacked)
349+ :: $action-error: enumerated failure modes returned in response-body.
350+ :: %conflict — expected-revision mismatch (drives editor conflict banner).
351+ +$ action-error
352+ $? %not-authorized
353+ %not-found
354+ %invalid-name
355+ %conflict
356+ %request-too-large
357+ %unknown
358+ ==
359+ +$ action [=request-id =a-notes]
360+ +$ command [=request-id =c-notes]
361+ +$ response [id=request-id body=response-body]
362+ +$ response-update [id=request-id body=response-update-body]
363+ :: $response-body: subscriber → client.
364+ :: %ok — a notebook mutation (snapshot/update); carries flag inline
365+ :: %notebook — a freshly-created notebook's summary (flag + metadata +
366+ :: visibility). Returned by %create-notebook so the caller
367+ :: learns the slugified flag without re-scrying.
368+ :: %api-key — the current api-key after a regenerate/clear. ~ = cleared.
369+ :: %error — typed failure
370+ :: %pending — cross-ship request still in flight; poll / sub the path
371+ +$ response-body
372+ $% [%no-change ~]
373+ [%ok =r-notes]
374+ [%notebook summary=notebook-summary]
375+ [%api-key key=(unit @t)]
376+ [%error type=action-error message=tang]
377+ [%pending status=poke-status]
378+ ==
379+ :: $response-update-body: host → subscriber. Carries the host's
380+ :: applied update (or error); subscriber wraps it as a response
381+ :: using the request-path flag for client delivery.
382+ +$ response-update-body
383+ $% [%no-change ~]
384+ [%ok =update]
385+ [%error type=action-error message=tang]
386+ ==
387+ :: $incoming-request: subscriber-side tracking record for a single
388+ :: in-flight action. http-id non-null means an Eyre POST is being
389+ :: held open waiting for the terminal response. final-at is set
390+ :: when result is %ok / %error / %no-change; cleanup uses it to
391+ :: evict the entry after a grace window.
392+ +$ incoming-request
393+ $: id=request-id
394+ http-id=(unit @ta)
395+ =poke-status
396+ result=(unit response-body)
397+ final-at=(unit @da)
398+ fetched=?
399+ ==
400+ +$ requests (map request-id incoming-request)
401+ --
402+:: Versioned state — newest first
403+::
404+:: state-15: drops the vestigial rid-counter — request-ids are minted
405+:: directly from bowl.eny (unique per event), so the counter is dead weight.
406+::
407++$ state-15
408+ $: %15
409+ books=(map flag [=net =notebook-state])
410+ next-id=@ud
411+ published=(map [=flag note-id=@ud] @t)
412+ invites=(map flag invite-info)
413+ requests=requests:v1
414+ api-key=(unit @t)
415+ ==
416+:: state-14: notebook-state gains optional `group` for group-channel mode.
417+:: Carried rid-counter (dropped in state-15). Deployed, so a real migration
418+:: target — ships that took the 14 transition load through +state-14-to-15.
419+::
420++$ state-14
421+ $: %14
422+ books=(map flag [=net =notebook-state])
423+ next-id=@ud
424+ published=(map [=flag note-id=@ud] @t)
425+ invites=(map flag invite-info)
426+ requests=requests:v1
427+ api-key=(unit @t)
428+ rid-counter=@ud
429+ ==
430+::
431++$ state state-15
432+::
433+--
tests/golden/types-import-tlon-notes/tokens.txtnew file+19
@@ -0,0 +1,19 @@
1+1:1 glyph /-
2+1:4 name notes
3+2:1 NEWLINE
4+2:1 glyph ++
5+2:4 name update
6+2:11 glyph |=
7+2:14 name x
8+2:15 tight glyph =
9+2:16 tight wing u-note.notes
10+2:29 name x
11+3:1 NEWLINE
12+3:1 glyph ++
13+3:4 name action
14+3:11 glyph |=
15+3:14 name x
16+3:15 tight glyph =
17+3:16 tight wing a-note.notes
18+3:29 name x
19+3:30 NEWLINE
tests/golden/types-import-tlon-notes/tree.txtnew file+10
@@ -0,0 +1,10 @@
1+(module
2+ (sur 1:1 notes)
3+ (value 2:1 update
4+ (gate 2:11
5+ (face 2:14 x (ref 2:16 u-note.notes))
6+ (wing 2:29 x)))
7+ (value 3:1 action
8+ (gate 3:11
9+ (face 3:14 x (ref 3:16 a-note.notes))
10+ (wing 3:29 x))))
tests/golden/types-import-tlon-notes/types.txtnew file+3
@@ -0,0 +1,3 @@
1+partial inference; module not checked
2+++ update: $-(([%updated note=[id=@ud [notebook-id=@ud [folder-id=@ud [title=@t [slug=(unit @t) [body-md=@t [created-by=@p [created-at=@da [updated-by=@p [updated-at=@da revision=@ud]]]]]]]]]]] [%created note=[id=@ud [notebook-id=@ud [folder-id=@ud [title=@t [slug=(unit @t) [body-md=@t [created-by=@p [created-at=@da [updated-by=@p [updated-at=@da revision=@ud]]]]]]]]]]] [%deleted ~] [%published html=@t] [%unpublished ~] [%history-archived note-revision=[rev=@ud [at=@da [author=@p [title=@t body-md=@t]]]]]) ([%updated note=[id=@ud [notebook-id=@ud [folder-id=@ud [title=@t [slug=(unit @t) [body-md=@t [created-by=@p [created-at=@da [updated-by=@p [updated-at=@da revision=@ud]]]]]]]]]]] [%created note=[id=@ud [notebook-id=@ud [folder-id=@ud [title=@t [slug=(unit @t) [body-md=@t [created-by=@p [created-at=@da [updated-by=@p [updated-at=@da revision=@ud]]]]]]]]]]] [%deleted ~] [%published html=@t] [%unpublished ~] [%history-archived note-revision=[rev=@ud [at=@da [author=@p [title=@t body-md=@t]]]]]))
3+++ action: $-(([%move folder=@ud] [%rename title=@t] [%update [body=@t expected-revision=@ud]] [%delete ~] [%modify [title=(unit @t) folder=(unit @ud)]] [%restore rev=@ud] [%publish html=@t] [%unpublish ~]) ([%move folder=@ud] [%rename title=@t] [%update [body=@t expected-revision=@ud]] [%delete ~] [%modify [title=(unit @t) folder=(unit @ud)]] [%restore rev=@ud] [%publish html=@t] [%unpublish ~]))
tests/golden/types-list-open-constraints/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Literals: a list literal has type `(list A)`; Tag resolution: tags and `~` take their type from context.
2+tests: Uncontextualized lists use a fresh, independently generalizable element type and a validated prelude list. Nested and homogeneous lists infer; uncertain widening and unresolved tags fail closed, and unrelated pending literals stay pending.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-list-open-constraints/modules.txtnew file+1
@@ -0,0 +1 @@
1+# Use prepared prelude.
tests/golden/types-list-open-constraints/source.jibbnew file+19
@@ -0,0 +1,19 @@
1+++ widen |= [a=@tD b=@t] ~[a b]
2+++ reverse |= [a=@tD b=@t] ~[b a]
3+++ abstract |= x=@ ~[x ~zod]
4+++ generic |= [a=A b=B] ~[a b]
5+++ explicit |= [a=A b=A] ~[a b]
6+++ num ~[1 0x1f]
7+++ all-num ~[1 2]
8+++ ctor ~[|=%go]
9+++ payload ~[`%go]
10+++ empty ~[]
11+++ texts ^- (list @t) empty
12+++ ships ^- (list @p) empty
13+++ discarded
14+ ~& %unused
15+ ~["hi"]
16+++ repeated |= [a=A b=A] ~[a b]
17+++ call-text (repeated "hi" "there")
18+++ call-ship (repeated ~zod ~bus)
19+++ call-wrong (repeated "hi" ~zod)
tests/golden/types-list-open-constraints/tokens.txtnew file+178
@@ -0,0 +1,178 @@
1+1:1 glyph ++
2+1:4 name widen
3+1:10 glyph |=
4+1:13 glyph [
5+1:14 tight name a
6+1:15 tight glyph =
7+1:16 tight aura @tD
8+1:20 name b
9+1:21 tight glyph =
10+1:22 tight aura @t
11+1:24 tight glyph ]
12+1:26 glyph ~[
13+1:28 tight name a
14+1:30 name b
15+1:31 tight glyph ]
16+2:1 NEWLINE
17+2:1 glyph ++
18+2:4 name reverse
19+2:12 glyph |=
20+2:15 glyph [
21+2:16 tight name a
22+2:17 tight glyph =
23+2:18 tight aura @tD
24+2:22 name b
25+2:23 tight glyph =
26+2:24 tight aura @t
27+2:26 tight glyph ]
28+2:28 glyph ~[
29+2:30 tight name b
30+2:32 name a
31+2:33 tight glyph ]
32+3:1 NEWLINE
33+3:1 glyph ++
34+3:4 name abstract
35+3:13 glyph |=
36+3:16 name x
37+3:17 tight glyph =
38+3:18 tight aura @
39+3:20 glyph ~[
40+3:22 tight name x
41+3:24 lit ~zod
42+3:28 tight glyph ]
43+4:1 NEWLINE
44+4:1 glyph ++
45+4:4 name generic
46+4:12 glyph |=
47+4:15 glyph [
48+4:16 tight name a
49+4:17 tight glyph =
50+4:18 tight tvar A
51+4:20 name b
52+4:21 tight glyph =
53+4:22 tight tvar B
54+4:23 tight glyph ]
55+4:25 glyph ~[
56+4:27 tight name a
57+4:29 name b
58+4:30 tight glyph ]
59+5:1 NEWLINE
60+5:1 glyph ++
61+5:4 name explicit
62+5:13 glyph |=
63+5:16 glyph [
64+5:17 tight name a
65+5:18 tight glyph =
66+5:19 tight tvar A
67+5:21 name b
68+5:22 tight glyph =
69+5:23 tight tvar A
70+5:24 tight glyph ]
71+5:26 glyph ~[
72+5:28 tight name a
73+5:30 name b
74+5:31 tight glyph ]
75+6:1 NEWLINE
76+6:1 glyph ++
77+6:4 name num
78+6:8 glyph ~[
79+6:10 tight lit 1
80+6:12 lit 0x1f
81+6:16 tight glyph ]
82+7:1 NEWLINE
83+7:1 glyph ++
84+7:4 name all-num
85+7:12 glyph ~[
86+7:14 tight lit 1
87+7:16 lit 2
88+7:17 tight glyph ]
89+8:1 NEWLINE
90+8:1 glyph ++
91+8:4 name ctor
92+8:9 glyph ~[
93+8:11 tight glyph |=
94+8:13 tight lit %go
95+8:16 tight glyph ]
96+9:1 NEWLINE
97+9:1 glyph ++
98+9:4 name payload
99+9:12 glyph ~[
100+9:14 tight glyph `
101+9:15 tight lit %go
102+9:18 tight glyph ]
103+10:1 NEWLINE
104+10:1 glyph ++
105+10:4 name empty
106+10:10 glyph ~[
107+10:12 tight glyph ]
108+11:1 NEWLINE
109+11:1 glyph ++
110+11:4 name texts
111+11:10 glyph ^-
112+11:13 glyph (
113+11:14 tight name list
114+11:19 aura @t
115+11:21 tight glyph )
116+11:23 name empty
117+12:1 NEWLINE
118+12:1 glyph ++
119+12:4 name ships
120+12:10 glyph ^-
121+12:13 glyph (
122+12:14 tight name list
123+12:19 aura @p
124+12:21 tight glyph )
125+12:23 name empty
126+13:1 NEWLINE
127+13:1 glyph ++
128+13:4 name discarded
129+14:3 INDENT
130+14:3 glyph ~&
131+14:6 lit %unused
132+15:5 INDENT
133+15:5 glyph ~[
134+15:7 tight str "hi"
135+15:11 tight glyph ]
136+16:1 DEDENT
137+16:1 DEDENT
138+16:1 NEWLINE
139+16:1 glyph ++
140+16:4 name repeated
141+16:13 glyph |=
142+16:16 glyph [
143+16:17 tight name a
144+16:18 tight glyph =
145+16:19 tight tvar A
146+16:21 name b
147+16:22 tight glyph =
148+16:23 tight tvar A
149+16:24 tight glyph ]
150+16:26 glyph ~[
151+16:28 tight name a
152+16:30 name b
153+16:31 tight glyph ]
154+17:1 NEWLINE
155+17:1 glyph ++
156+17:4 name call-text
157+17:14 glyph (
158+17:15 tight name repeated
159+17:24 str "hi"
160+17:29 str "there"
161+17:36 tight glyph )
162+18:1 NEWLINE
163+18:1 glyph ++
164+18:4 name call-ship
165+18:14 glyph (
166+18:15 tight name repeated
167+18:24 lit ~zod
168+18:29 lit ~bus
169+18:33 tight glyph )
170+19:1 NEWLINE
171+19:1 glyph ++
172+19:4 name call-wrong
173+19:15 glyph (
174+19:16 tight name repeated
175+19:25 str "hi"
176+19:30 lit ~zod
177+19:34 tight glyph )
178+19:35 NEWLINE
tests/golden/types-list-open-constraints/tree.txtnew file+68
@@ -0,0 +1,68 @@
1+(module
2+ (value 1:1 widen
3+ (gate 1:10
4+ (cell 1:13
5+ (face 1:14 a (aura 1:16 @tD))
6+ (face 1:20 b (aura 1:22 @t)))
7+ (list 1:26 (wing 1:28 a) (wing 1:30 b))))
8+ (value 2:1 reverse
9+ (gate 2:12
10+ (cell 2:15
11+ (face 2:16 a (aura 2:18 @tD))
12+ (face 2:22 b (aura 2:24 @t)))
13+ (list 2:28 (wing 2:30 b) (wing 2:32 a))))
14+ (value 3:1 abstract
15+ (gate 3:13
16+ (face 3:16 x (aura 3:18 @))
17+ (list 3:20 (wing 3:22 x) (lit 3:24 ~zod))))
18+ (value 4:1 generic
19+ (gate 4:12
20+ (cell 4:15
21+ (face 4:16 a (tvar 4:18 A))
22+ (face 4:20 b (tvar 4:22 B)))
23+ (list 4:25 (wing 4:27 a) (wing 4:29 b))))
24+ (value 5:1 explicit
25+ (gate 5:13
26+ (cell 5:16
27+ (face 5:17 a (tvar 5:19 A))
28+ (face 5:21 b (tvar 5:23 A)))
29+ (list 5:26 (wing 5:28 a) (wing 5:30 b))))
30+ (value 6:1 num
31+ (list 6:8 (lit 6:10 1) (lit 6:12 0x1f)))
32+ (value 7:1 all-num
33+ (list 7:12 (lit 7:14 1) (lit 7:16 2)))
34+ (value 8:1 ctor
35+ (list 8:9 (ctor 8:11 %go)))
36+ (value 9:1 payload
37+ (list 9:12
38+ (unit 9:14 (lit 9:15 %go))))
39+ (value 10:1 empty (list 10:10))
40+ (value 11:1 texts
41+ (cast 11:10
42+ (apply 11:13 list (aura 11:19 @t))
43+ (wing 11:23 empty)))
44+ (value 12:1 ships
45+ (cast 12:10
46+ (apply 12:13 list (aura 12:19 @p))
47+ (wing 12:23 empty)))
48+ (value 13:1 discarded
49+ (body 14:3
50+ (trace 14:3
51+ (lit 14:6 %unused)
52+ (body 15:5
53+ (list 15:5 (str 15:7 "hi"))))))
54+ (value 16:1 repeated
55+ (gate 16:13
56+ (cell 16:16
57+ (face 16:17 a (tvar 16:19 A))
58+ (face 16:21 b (tvar 16:23 A)))
59+ (list 16:26 (wing 16:28 a) (wing 16:30 b))))
60+ (value 17:1 call-text
61+ (group 17:14
62+ (call 17:15 (wing 17:15 repeated) (str 17:24 "hi") (str 17:29 "there"))))
63+ (value 18:1 call-ship
64+ (group 18:14
65+ (call 18:15 (wing 18:15 repeated) (lit 18:24 ~zod) (lit 18:29 ~bus))))
66+ (value 19:1 call-wrong
67+ (group 19:15
68+ (call 19:16 (wing 19:16 repeated) (str 19:25 "hi") (lit 19:30 ~zod)))))
tests/golden/types-list-open-constraints/types.txtnew file+30
@@ -0,0 +1,30 @@
1+partial inference; module not checked
2+++ widen: list item widening is not supported by partial inference
3+++ reverse: $-([a=@tD b=@t] (list @t))
4+++ abstract: $-(@ (list @))
5+++ generic: distinct type variables `A` and `B` must not be forced equal; use the same capital for a shared type
6+/tests/golden/types-list-open-constraints/source.jibb:4:18: first type variable
7+++ generic |= [a=A b=B] ~[a b]
8+ ^
9+/tests/golden/types-list-open-constraints/source.jibb:4:22: second type variable
10+++ generic |= [a=A b=B] ~[a b]
11+ ^
12+++ explicit: $-([a=A b=A] (list A))
13+++ num: (list @ux)
14+++ all-num: (list @ud)
15+++ ctor: list item needs context in partial inference
16+++ payload: list item constraint is not supported by partial inference
17+++ empty: (list A)
18+++ texts: (list @t)
19+++ ships: (list @p)
20+++ discarded: tag needs context in partial inference
21+++ repeated: $-([a=A b=A] (list A))
22+++ call-text: (list @t)
23+++ call-ship: (list @p)
24+++ call-wrong: call's sample and argument types do not unify
25+/tests/golden/types-list-open-constraints/source.jibb:19:16: called gate has type $-([a=A b=A] (list A))
26+++ call-wrong (repeated "hi" ~zod)
27+ ^
28+/tests/golden/types-list-open-constraints/source.jibb:19:25: argument has type [@t @p]
29+++ call-wrong (repeated "hi" ~zod)
30+ ^
tests/golden/types-list-open/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Literals: a list literal has type `(list A)`; Tag resolution: tags and `~` take their type from context.
2+tests: Uncontextualized lists use a fresh, independently generalizable element type and a validated prelude list. Nested and homogeneous lists infer; uncertain widening and unresolved tags fail closed, and unrelated pending literals stay pending.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-list-open/modules.txtnew file+1
@@ -0,0 +1 @@
1+# Use prepared prelude.
tests/golden/types-list-open/source.jibbnew file+13
@@ -0,0 +1,13 @@
1+++ empty ~[]
2+++ cords ~["hi" "there"]
3+++ ships ~[~zod ~bus]
4+++ nested ~[~["a"] ~["b"]]
5+++ id |= x ~[x]
6+++ independent [(id "hi") (id ~zod)]
7+++ mixed ~["hi" ~zod]
8+++ loose ~[%yes %no]
9+++ loose-null ~[~]
10+++ result ^- (list @t) ~["x"]
11+++ pending
12+ ~& %unrelated
13+ ~["x"]
tests/golden/types-list-open/tokens.txtnew file+94
@@ -0,0 +1,94 @@
1+1:1 glyph ++
2+1:4 name empty
3+1:10 glyph ~[
4+1:12 tight glyph ]
5+2:1 NEWLINE
6+2:1 glyph ++
7+2:4 name cords
8+2:10 glyph ~[
9+2:12 tight str "hi"
10+2:17 str "there"
11+2:24 tight glyph ]
12+3:1 NEWLINE
13+3:1 glyph ++
14+3:4 name ships
15+3:10 glyph ~[
16+3:12 tight lit ~zod
17+3:17 lit ~bus
18+3:21 tight glyph ]
19+4:1 NEWLINE
20+4:1 glyph ++
21+4:4 name nested
22+4:11 glyph ~[
23+4:13 tight glyph ~[
24+4:15 tight str "a"
25+4:18 tight glyph ]
26+4:20 glyph ~[
27+4:22 tight str "b"
28+4:25 tight glyph ]
29+4:26 tight glyph ]
30+5:1 NEWLINE
31+5:1 glyph ++
32+5:4 name id
33+5:7 glyph |=
34+5:10 name x
35+5:12 glyph ~[
36+5:14 tight name x
37+5:15 tight glyph ]
38+6:1 NEWLINE
39+6:1 glyph ++
40+6:4 name independent
41+6:16 glyph [
42+6:17 tight glyph (
43+6:18 tight name id
44+6:21 str "hi"
45+6:25 tight glyph )
46+6:27 glyph (
47+6:28 tight name id
48+6:31 lit ~zod
49+6:35 tight glyph )
50+6:36 tight glyph ]
51+7:1 NEWLINE
52+7:1 glyph ++
53+7:4 name mixed
54+7:10 glyph ~[
55+7:12 tight str "hi"
56+7:17 lit ~zod
57+7:21 tight glyph ]
58+8:1 NEWLINE
59+8:1 glyph ++
60+8:4 name loose
61+8:10 glyph ~[
62+8:12 tight lit %yes
63+8:17 lit %no
64+8:20 tight glyph ]
65+9:1 NEWLINE
66+9:1 glyph ++
67+9:4 name loose-null
68+9:15 glyph ~[
69+9:17 tight lit ~
70+9:18 tight glyph ]
71+10:1 NEWLINE
72+10:1 glyph ++
73+10:4 name result
74+10:11 glyph ^-
75+10:14 glyph (
76+10:15 tight name list
77+10:20 aura @t
78+10:22 tight glyph )
79+10:24 glyph ~[
80+10:26 tight str "x"
81+10:29 tight glyph ]
82+11:1 NEWLINE
83+11:1 glyph ++
84+11:4 name pending
85+12:3 INDENT
86+12:3 glyph ~&
87+12:6 lit %unrelated
88+13:5 INDENT
89+13:5 glyph ~[
90+13:7 tight str "x"
91+13:10 tight glyph ]
92+13:11 DEDENT
93+13:11 DEDENT
94+13:11 NEWLINE
tests/golden/types-list-open/tree.txtnew file+36
@@ -0,0 +1,36 @@
1+(module
2+ (value 1:1 empty (list 1:10))
3+ (value 2:1 cords
4+ (list 2:10 (str 2:12 "hi") (str 2:17 "there")))
5+ (value 3:1 ships
6+ (list 3:10 (lit 3:12 ~zod) (lit 3:17 ~bus)))
7+ (value 4:1 nested
8+ (list 4:11
9+ (list 4:13 (str 4:15 "a"))
10+ (list 4:20 (str 4:22 "b"))))
11+ (value 5:1 id
12+ (gate 5:7
13+ (bind 5:10 x)
14+ (list 5:12 (wing 5:14 x))))
15+ (value 6:1 independent
16+ (tuple 6:16
17+ (group 6:17
18+ (call 6:18 (wing 6:18 id) (str 6:21 "hi")))
19+ (group 6:27
20+ (call 6:28 (wing 6:28 id) (lit 6:31 ~zod)))))
21+ (value 7:1 mixed
22+ (list 7:10 (str 7:12 "hi") (lit 7:17 ~zod)))
23+ (value 8:1 loose
24+ (list 8:10 (lit 8:12 %yes) (lit 8:17 %no)))
25+ (value 9:1 loose-null
26+ (list 9:15 (lit 9:17 ~)))
27+ (value 10:1 result
28+ (cast 10:11
29+ (apply 10:14 list (aura 10:20 @t))
30+ (list 10:24 (str 10:26 "x"))))
31+ (value 11:1 pending
32+ (body 12:3
33+ (trace 12:3
34+ (lit 12:6 %unrelated)
35+ (body 13:5
36+ (list 13:5 (str 13:7 "x")))))))
tests/golden/types-list-open/types.txtnew file+18
@@ -0,0 +1,18 @@
1+partial inference; module not checked
2+++ empty: (list A)
3+++ cords: (list @t)
4+++ ships: (list @p)
5+++ nested: (list (list @t))
6+++ id: $-(A (list A))
7+++ independent: [(list @t) (list @p)]
8+++ mixed: list items do not have compatible types
9+/tests/golden/types-list-open/source.jibb:7:10: expected item has type @t
10+++ mixed ~["hi" ~zod]
11+ ^
12+/tests/golden/types-list-open/source.jibb:7:17: list item has type @p
13+++ mixed ~["hi" ~zod]
14+ ^
15+++ loose: list item needs context in partial inference
16+++ loose-null: list item needs context in partial inference
17+++ result: (list @t)
18+++ pending: tag needs context in partial inference
tests/golden/types-list-zero-fit/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Literals: `~` is "A constant: the `~` case of any union with one, such as `(unit A)`, `(list A)`, `(map K V)` or `(set A)`".
2+tests: Zero-valued literals nested in a tuple supplied to a list sample receive list context; a bound zero constant remains unsupported rather than a definite mismatch. Nonzero atoms and passing an arbitrary list where the zero constant is required remain definite mismatches. Separate call arguments receive list context, and the prelude `turn` tuple infers.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-list-zero-fit/modules.txtnew file+1
@@ -0,0 +1 @@
1+# no module fixtures
tests/golden/types-list-zero-fit/source.jibbnew file+8
@@ -0,0 +1,8 @@
1+++ nil-arg |= f=$-([(list @t) @t] @t) (f [~ "ok"])
2+++ zero-arg |= f=$-([(list @t) @t] @t) (f [%$ "ok"])
3+++ zero-one-arg |= f=$-([(list @t) @t] @t) (f [%1 "ok"])
4+++ multi-arg |= f=$-([(list @t) @t] @t) (f ~ "ok")
5+++ constant |= [f=$-([(list @t) @t] @t) z=~] (f [z "ok"])
6+++ nonzero-constant |= [f=$-([(list @t) @t] @t) z=%1] (f [z "ok"])
7+++ reverse |= [f=$-(%$ @t) xs=(list @t)] (f xs)
8+++ turn-tuple (turn [~ |=(x x)])
tests/golden/types-list-zero-fit/tokens.txtnew file+181
@@ -0,0 +1,181 @@
1+1:1 glyph ++
2+1:4 name nil-arg
3+1:12 glyph |=
4+1:15 name f
5+1:16 tight glyph =
6+1:17 tight glyph $-(
7+1:20 tight glyph [
8+1:21 tight glyph (
9+1:22 tight name list
10+1:27 aura @t
11+1:29 tight glyph )
12+1:31 aura @t
13+1:33 tight glyph ]
14+1:35 aura @t
15+1:37 tight glyph )
16+1:39 glyph (
17+1:40 tight name f
18+1:42 glyph [
19+1:43 tight lit ~
20+1:45 str "ok"
21+1:49 tight glyph ]
22+1:50 tight glyph )
23+2:1 NEWLINE
24+2:1 glyph ++
25+2:4 name zero-arg
26+2:13 glyph |=
27+2:16 name f
28+2:17 tight glyph =
29+2:18 tight glyph $-(
30+2:21 tight glyph [
31+2:22 tight glyph (
32+2:23 tight name list
33+2:28 aura @t
34+2:30 tight glyph )
35+2:32 aura @t
36+2:34 tight glyph ]
37+2:36 aura @t
38+2:38 tight glyph )
39+2:40 glyph (
40+2:41 tight name f
41+2:43 glyph [
42+2:44 tight lit %$
43+2:47 str "ok"
44+2:51 tight glyph ]
45+2:52 tight glyph )
46+3:1 NEWLINE
47+3:1 glyph ++
48+3:4 name zero-one-arg
49+3:17 glyph |=
50+3:20 name f
51+3:21 tight glyph =
52+3:22 tight glyph $-(
53+3:25 tight glyph [
54+3:26 tight glyph (
55+3:27 tight name list
56+3:32 aura @t
57+3:34 tight glyph )
58+3:36 aura @t
59+3:38 tight glyph ]
60+3:40 aura @t
61+3:42 tight glyph )
62+3:44 glyph (
63+3:45 tight name f
64+3:47 glyph [
65+3:48 tight lit %1
66+3:51 str "ok"
67+3:55 tight glyph ]
68+3:56 tight glyph )
69+4:1 NEWLINE
70+4:1 glyph ++
71+4:4 name multi-arg
72+4:14 glyph |=
73+4:17 name f
74+4:18 tight glyph =
75+4:19 tight glyph $-(
76+4:22 tight glyph [
77+4:23 tight glyph (
78+4:24 tight name list
79+4:29 aura @t
80+4:31 tight glyph )
81+4:33 aura @t
82+4:35 tight glyph ]
83+4:37 aura @t
84+4:39 tight glyph )
85+4:41 glyph (
86+4:42 tight name f
87+4:44 lit ~
88+4:46 str "ok"
89+4:50 tight glyph )
90+5:1 NEWLINE
91+5:1 glyph ++
92+5:4 name constant
93+5:13 glyph |=
94+5:16 glyph [
95+5:17 tight name f
96+5:18 tight glyph =
97+5:19 tight glyph $-(
98+5:22 tight glyph [
99+5:23 tight glyph (
100+5:24 tight name list
101+5:29 aura @t
102+5:31 tight glyph )
103+5:33 aura @t
104+5:35 tight glyph ]
105+5:37 aura @t
106+5:39 tight glyph )
107+5:41 name z
108+5:42 tight glyph =
109+5:43 tight lit ~
110+5:44 tight glyph ]
111+5:46 glyph (
112+5:47 tight name f
113+5:49 glyph [
114+5:50 tight name z
115+5:52 str "ok"
116+5:56 tight glyph ]
117+5:57 tight glyph )
118+6:1 NEWLINE
119+6:1 glyph ++
120+6:4 name nonzero-constant
121+6:21 glyph |=
122+6:24 glyph [
123+6:25 tight name f
124+6:26 tight glyph =
125+6:27 tight glyph $-(
126+6:30 tight glyph [
127+6:31 tight glyph (
128+6:32 tight name list
129+6:37 aura @t
130+6:39 tight glyph )
131+6:41 aura @t
132+6:43 tight glyph ]
133+6:45 aura @t
134+6:47 tight glyph )
135+6:49 name z
136+6:50 tight glyph =
137+6:51 tight lit %1
138+6:53 tight glyph ]
139+6:55 glyph (
140+6:56 tight name f
141+6:58 glyph [
142+6:59 tight name z
143+6:61 str "ok"
144+6:65 tight glyph ]
145+6:66 tight glyph )
146+7:1 NEWLINE
147+7:1 glyph ++
148+7:4 name reverse
149+7:12 glyph |=
150+7:15 glyph [
151+7:16 tight name f
152+7:17 tight glyph =
153+7:18 tight glyph $-(
154+7:21 tight lit %$
155+7:24 aura @t
156+7:26 tight glyph )
157+7:28 name xs
158+7:30 tight glyph =
159+7:31 tight glyph (
160+7:32 tight name list
161+7:37 aura @t
162+7:39 tight glyph )
163+7:40 tight glyph ]
164+7:42 glyph (
165+7:43 tight name f
166+7:45 name xs
167+7:47 tight glyph )
168+8:1 NEWLINE
169+8:1 glyph ++
170+8:4 name turn-tuple
171+8:15 glyph (
172+8:16 tight name turn
173+8:21 glyph [
174+8:22 tight lit ~
175+8:24 glyph |=(
176+8:27 tight name x
177+8:29 name x
178+8:30 tight glyph )
179+8:31 tight glyph ]
180+8:32 tight glyph )
181+8:33 NEWLINE
tests/golden/types-list-zero-fit/tree.txtnew file+91
@@ -0,0 +1,91 @@
1+(module
2+ (value 1:1 nil-arg
3+ (gate 1:12
4+ (face 1:15 f
5+ (fn 1:17
6+ (cell 1:20
7+ (apply 1:21 list (aura 1:27 @t))
8+ (aura 1:31 @t))
9+ (aura 1:35 @t)))
10+ (group 1:39
11+ (call 1:40
12+ (wing 1:40 f)
13+ (tuple 1:42 (lit 1:43 ~) (str 1:45 "ok"))))))
14+ (value 2:1 zero-arg
15+ (gate 2:13
16+ (face 2:16 f
17+ (fn 2:18
18+ (cell 2:21
19+ (apply 2:22 list (aura 2:28 @t))
20+ (aura 2:32 @t))
21+ (aura 2:36 @t)))
22+ (group 2:40
23+ (call 2:41
24+ (wing 2:41 f)
25+ (tuple 2:43 (lit 2:44 %$) (str 2:47 "ok"))))))
26+ (value 3:1 zero-one-arg
27+ (gate 3:17
28+ (face 3:20 f
29+ (fn 3:22
30+ (cell 3:25
31+ (apply 3:26 list (aura 3:32 @t))
32+ (aura 3:36 @t))
33+ (aura 3:40 @t)))
34+ (group 3:44
35+ (call 3:45
36+ (wing 3:45 f)
37+ (tuple 3:47 (lit 3:48 %1) (str 3:51 "ok"))))))
38+ (value 4:1 multi-arg
39+ (gate 4:14
40+ (face 4:17 f
41+ (fn 4:19
42+ (cell 4:22
43+ (apply 4:23 list (aura 4:29 @t))
44+ (aura 4:33 @t))
45+ (aura 4:37 @t)))
46+ (group 4:41
47+ (call 4:42 (wing 4:42 f) (lit 4:44 ~) (str 4:46 "ok")))))
48+ (value 5:1 constant
49+ (gate 5:13
50+ (cell 5:16
51+ (face 5:17 f
52+ (fn 5:19
53+ (cell 5:22
54+ (apply 5:23 list (aura 5:29 @t))
55+ (aura 5:33 @t))
56+ (aura 5:37 @t)))
57+ (face 5:41 z (const 5:43 ~)))
58+ (group 5:46
59+ (call 5:47
60+ (wing 5:47 f)
61+ (tuple 5:49 (wing 5:50 z) (str 5:52 "ok"))))))
62+ (value 6:1 nonzero-constant
63+ (gate 6:21
64+ (cell 6:24
65+ (face 6:25 f
66+ (fn 6:27
67+ (cell 6:30
68+ (apply 6:31 list (aura 6:37 @t))
69+ (aura 6:41 @t))
70+ (aura 6:45 @t)))
71+ (face 6:49 z (const 6:51 %1)))
72+ (group 6:55
73+ (call 6:56
74+ (wing 6:56 f)
75+ (tuple 6:58 (wing 6:59 z) (str 6:61 "ok"))))))
76+ (value 7:1 reverse
77+ (gate 7:12
78+ (cell 7:15
79+ (face 7:16 f
80+ (fn 7:18 (const 7:21 %$) (aura 7:24 @t)))
81+ (face 7:28 xs
82+ (apply 7:31 list (aura 7:37 @t))))
83+ (group 7:42
84+ (call 7:43 (wing 7:43 f) (wing 7:45 xs)))))
85+ (value 8:1 turn-tuple
86+ (group 8:15
87+ (call 8:16
88+ (wing 8:16 turn)
89+ (tuple 8:21
90+ (lit 8:22 ~)
91+ (gate-wide 8:24 (bind 8:27 x) (wing 8:29 x)))))))
tests/golden/types-list-zero-fit/types.txtnew file+27
@@ -0,0 +1,27 @@
1+partial inference; module not checked
2+++ nil-arg: $-($-([(list @t) @t] @t) @t)
3+++ zero-arg: $-($-([(list @t) @t] @t) @t)
4+++ zero-one-arg: call's sample and argument types do not unify
5+/tests/golden/types-list-zero-fit/source.jibb:3:45: called gate has type $-([(list @t) @t] @t)
6+++ zero-one-arg |= f=$-([(list @t) @t] @t) (f [%1 "ok"])
7+ ^
8+/tests/golden/types-list-zero-fit/source.jibb:3:47: argument
9+++ zero-one-arg |= f=$-([(list @t) @t] @t) (f [%1 "ok"])
10+ ^
11+++ multi-arg: $-($-([(list @t) @t] @t) @t)
12+++ constant: call constraint is not supported by partial inference
13+++ nonzero-constant: call's sample and argument types do not unify
14+/tests/golden/types-list-zero-fit/source.jibb:6:56: called gate has type $-([(list @t) @t] @t)
15+++ nonzero-constant |= [f=$-([(list @t) @t] @t) z=%1] (f [z "ok"])
16+ ^
17+/tests/golden/types-list-zero-fit/source.jibb:6:58: argument has type [%1 @t]
18+++ nonzero-constant |= [f=$-([(list @t) @t] @t) z=%1] (f [z "ok"])
19+ ^
20+++ reverse: call's sample and argument types do not unify
21+/tests/golden/types-list-zero-fit/source.jibb:7:43: called gate has type $-(%$ @t)
22+++ reverse |= [f=$-(%$ @t) xs=(list @t)] (f xs)
23+ ^
24+/tests/golden/types-list-zero-fit/source.jibb:7:45: argument has type (list @t)
25+++ reverse |= [f=$-(%$ @t) xs=(list @t)] (f xs)
26+ ^
27+++ turn-tuple: (list A)
tests/golden/types-local-capitals/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Molds: "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."
2+tests: A recursive local gate captures a capital in its enclosing sample; a bare local binder generalizes independently. Local-only capitals generalize independently, including across sibling and nested definitions; a capital used later in the enclosing body is shared. Generic mold parameters keep their own scope. Atom constraints and distinct-capital errors retain their source sites. Recursive self aliases remain monomorphic and unresolved tags remain pending.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-local-capitals/modules.txtnew file+1
@@ -0,0 +1 @@
1+# empty bundle
tests/golden/types-local-capitals/source.jibbnew file+73
@@ -0,0 +1,73 @@
1+++ siblings |= x=@t
2+ ++ first |= y=A y
3+ ++ second |= z=A z
4+ ~& (first x)
5+ (second ~zod)
6+++ later |= x
7+ ++ inner |= y=A y
8+ ~& (inner "hi")
9+ ^- A x
10+++ captured |= x=A
11+ ++ inner |= y=A
12+ ?- %.y
13+ %.y x
14+ %.n (inner y)
15+ (inner x)
16+++ implicit |= x
17+ ++ inner |= y
18+ ?- %.y
19+ %.y y
20+ %.n (inner y)
21+ ~& (inner "hi")
22+ (inner ~zod)
23+++ local-mono |= x=A
24+ ++ inner |= y=A
25+ ++ alias inner
26+ ~& (alias "hi")
27+ (alias ~zod)
28+ (inner x)
29+++ fresh |= x=@t
30+ ++ inner |= y=A y
31+ (inner x)
32+++ captured-acyclic |= x=A
33+ ++ inner |= y=A y
34+ (inner x)
35+++ implicit-capture |= x
36+ ++ inner |= flag=?
37+ ?- flag
38+ %.y x
39+ %.n (inner %.y)
40+ ~& ^- @t x
41+ (inner %.y)
42+++ nested |= x=@t
43+ ++ first |= y=A
44+ ++ inner |= z=B z
45+ ~& (inner ~zod)
46+ y
47+ (first x)
48+++ atom |= x=@t
49+ ++ inner |= y=A
50+ ~& ^- @ y
51+ y
52+ ~& (inner x)
53+ (inner ~zod)
54+++ force-equal |= x=@t
55+ ++ inner |= [a=A b=B] ^- A b
56+ (inner x ~zod)
57+++ pending |= x=@t
58+ ++ inner |= y=A
59+ ~& %orphan
60+ y
61+ (inner x)
62+++ mold-param |= x=A
63+ +$ box |$ [A] [value=A count=@ud]
64+ ^- (box @t) [value="hi" count=1]
65+++ later-share |= x
66+ ++ inner |= y=A y
67+ ~& (inner x)
68+ ^- A x
69+++ atom-bad |= x=@t
70+ ++ inner |= y=A
71+ ~& ^- @ y
72+ y
73+ (inner [x ~zod])
tests/golden/types-local-capitals/tokens.txtnew file+473
@@ -0,0 +1,473 @@
1+1:1 glyph ++
2+1:4 name siblings
3+1:13 glyph |=
4+1:16 name x
5+1:17 tight glyph =
6+1:18 tight aura @t
7+2:3 INDENT
8+2:3 glyph ++
9+2:6 name first
10+2:12 glyph |=
11+2:15 name y
12+2:16 tight glyph =
13+2:17 tight tvar A
14+2:19 name y
15+3:3 NEWLINE
16+3:3 glyph ++
17+3:6 name second
18+3:13 glyph |=
19+3:16 name z
20+3:17 tight glyph =
21+3:18 tight tvar A
22+3:20 name z
23+4:3 NEWLINE
24+4:3 glyph ~&
25+4:6 glyph (
26+4:7 tight name first
27+4:13 name x
28+4:14 tight glyph )
29+5:5 INDENT
30+5:5 glyph (
31+5:6 tight name second
32+5:13 lit ~zod
33+5:17 tight glyph )
34+6:1 DEDENT
35+6:1 DEDENT
36+6:1 NEWLINE
37+6:1 glyph ++
38+6:4 name later
39+6:10 glyph |=
40+6:13 name x
41+7:3 INDENT
42+7:3 glyph ++
43+7:6 name inner
44+7:12 glyph |=
45+7:15 name y
46+7:16 tight glyph =
47+7:17 tight tvar A
48+7:19 name y
49+8:3 NEWLINE
50+8:3 glyph ~&
51+8:6 glyph (
52+8:7 tight name inner
53+8:13 str "hi"
54+8:17 tight glyph )
55+9:5 INDENT
56+9:5 glyph ^-
57+9:8 tvar A
58+9:10 name x
59+10:1 DEDENT
60+10:1 DEDENT
61+10:1 NEWLINE
62+10:1 glyph ++
63+10:4 name captured
64+10:13 glyph |=
65+10:16 name x
66+10:17 tight glyph =
67+10:18 tight tvar A
68+11:3 INDENT
69+11:3 glyph ++
70+11:6 name inner
71+11:12 glyph |=
72+11:15 name y
73+11:16 tight glyph =
74+11:17 tight tvar A
75+12:5 INDENT
76+12:5 glyph ?-
77+12:8 lit %.y
78+13:7 INDENT
79+13:7 lit %.y
80+13:11 name x
81+14:7 NEWLINE
82+14:7 lit %.n
83+14:11 glyph (
84+14:12 tight name inner
85+14:18 name y
86+14:19 tight glyph )
87+15:3 DEDENT
88+15:3 DEDENT
89+15:3 NEWLINE
90+15:3 glyph (
91+15:4 tight name inner
92+15:10 name x
93+15:11 tight glyph )
94+16:1 DEDENT
95+16:1 NEWLINE
96+16:1 glyph ++
97+16:4 name implicit
98+16:13 glyph |=
99+16:16 name x
100+17:3 INDENT
101+17:3 glyph ++
102+17:6 name inner
103+17:12 glyph |=
104+17:15 name y
105+18:5 INDENT
106+18:5 glyph ?-
107+18:8 lit %.y
108+19:7 INDENT
109+19:7 lit %.y
110+19:11 name y
111+20:7 NEWLINE
112+20:7 lit %.n
113+20:11 glyph (
114+20:12 tight name inner
115+20:18 name y
116+20:19 tight glyph )
117+21:3 DEDENT
118+21:3 DEDENT
119+21:3 NEWLINE
120+21:3 glyph ~&
121+21:6 glyph (
122+21:7 tight name inner
123+21:13 str "hi"
124+21:17 tight glyph )
125+22:5 INDENT
126+22:5 glyph (
127+22:6 tight name inner
128+22:12 lit ~zod
129+22:16 tight glyph )
130+23:1 DEDENT
131+23:1 DEDENT
132+23:1 NEWLINE
133+23:1 glyph ++
134+23:4 name local-mono
135+23:15 glyph |=
136+23:18 name x
137+23:19 tight glyph =
138+23:20 tight tvar A
139+24:3 INDENT
140+24:3 glyph ++
141+24:6 name inner
142+24:12 glyph |=
143+24:15 name y
144+24:16 tight glyph =
145+24:17 tight tvar A
146+25:5 INDENT
147+25:5 glyph ++
148+25:8 name alias
149+25:14 name inner
150+26:5 NEWLINE
151+26:5 glyph ~&
152+26:8 glyph (
153+26:9 tight name alias
154+26:15 str "hi"
155+26:19 tight glyph )
156+27:7 INDENT
157+27:7 glyph (
158+27:8 tight name alias
159+27:14 lit ~zod
160+27:18 tight glyph )
161+28:3 DEDENT
162+28:3 DEDENT
163+28:3 NEWLINE
164+28:3 glyph (
165+28:4 tight name inner
166+28:10 name x
167+28:11 tight glyph )
168+29:1 DEDENT
169+29:1 NEWLINE
170+29:1 glyph ++
171+29:4 name fresh
172+29:10 glyph |=
173+29:13 name x
174+29:14 tight glyph =
175+29:15 tight aura @t
176+30:3 INDENT
177+30:3 glyph ++
178+30:6 name inner
179+30:12 glyph |=
180+30:15 name y
181+30:16 tight glyph =
182+30:17 tight tvar A
183+30:19 name y
184+31:3 NEWLINE
185+31:3 glyph (
186+31:4 tight name inner
187+31:10 name x
188+31:11 tight glyph )
189+32:1 DEDENT
190+32:1 NEWLINE
191+32:1 glyph ++
192+32:4 name captured-acyclic
193+32:21 glyph |=
194+32:24 name x
195+32:25 tight glyph =
196+32:26 tight tvar A
197+33:3 INDENT
198+33:3 glyph ++
199+33:6 name inner
200+33:12 glyph |=
201+33:15 name y
202+33:16 tight glyph =
203+33:17 tight tvar A
204+33:19 name y
205+34:3 NEWLINE
206+34:3 glyph (
207+34:4 tight name inner
208+34:10 name x
209+34:11 tight glyph )
210+35:1 DEDENT
211+35:1 NEWLINE
212+35:1 glyph ++
213+35:4 name implicit-capture
214+35:21 glyph |=
215+35:24 name x
216+36:3 INDENT
217+36:3 glyph ++
218+36:6 name inner
219+36:12 glyph |=
220+36:15 name flag
221+36:19 tight glyph =
222+36:20 tight glyph ?
223+37:5 INDENT
224+37:5 glyph ?-
225+37:8 name flag
226+38:7 INDENT
227+38:7 lit %.y
228+38:11 name x
229+39:7 NEWLINE
230+39:7 lit %.n
231+39:11 glyph (
232+39:12 tight name inner
233+39:18 lit %.y
234+39:21 tight glyph )
235+40:3 DEDENT
236+40:3 DEDENT
237+40:3 NEWLINE
238+40:3 glyph ~&
239+40:6 glyph ^-
240+40:9 aura @t
241+40:12 name x
242+41:5 INDENT
243+41:5 glyph (
244+41:6 tight name inner
245+41:12 lit %.y
246+41:15 tight glyph )
247+42:1 DEDENT
248+42:1 DEDENT
249+42:1 NEWLINE
250+42:1 glyph ++
251+42:4 name nested
252+42:11 glyph |=
253+42:14 name x
254+42:15 tight glyph =
255+42:16 tight aura @t
256+43:3 INDENT
257+43:3 glyph ++
258+43:6 name first
259+43:12 glyph |=
260+43:15 name y
261+43:16 tight glyph =
262+43:17 tight tvar A
263+44:5 INDENT
264+44:5 glyph ++
265+44:8 name inner
266+44:14 glyph |=
267+44:17 name z
268+44:18 tight glyph =
269+44:19 tight tvar B
270+44:21 name z
271+45:5 NEWLINE
272+45:5 glyph ~&
273+45:8 glyph (
274+45:9 tight name inner
275+45:15 lit ~zod
276+45:19 tight glyph )
277+46:7 INDENT
278+46:7 name y
279+47:3 DEDENT
280+47:3 DEDENT
281+47:3 NEWLINE
282+47:3 glyph (
283+47:4 tight name first
284+47:10 name x
285+47:11 tight glyph )
286+48:1 DEDENT
287+48:1 NEWLINE
288+48:1 glyph ++
289+48:4 name atom
290+48:9 glyph |=
291+48:12 name x
292+48:13 tight glyph =
293+48:14 tight aura @t
294+49:3 INDENT
295+49:3 glyph ++
296+49:6 name inner
297+49:12 glyph |=
298+49:15 name y
299+49:16 tight glyph =
300+49:17 tight tvar A
301+50:5 INDENT
302+50:5 glyph ~&
303+50:8 glyph ^-
304+50:11 aura @
305+50:13 name y
306+51:7 INDENT
307+51:7 name y
308+52:3 DEDENT
309+52:3 DEDENT
310+52:3 NEWLINE
311+52:3 glyph ~&
312+52:6 glyph (
313+52:7 tight name inner
314+52:13 name x
315+52:14 tight glyph )
316+53:5 INDENT
317+53:5 glyph (
318+53:6 tight name inner
319+53:12 lit ~zod
320+53:16 tight glyph )
321+54:1 DEDENT
322+54:1 DEDENT
323+54:1 NEWLINE
324+54:1 glyph ++
325+54:4 name force-equal
326+54:16 glyph |=
327+54:19 name x
328+54:20 tight glyph =
329+54:21 tight aura @t
330+55:3 INDENT
331+55:3 glyph ++
332+55:6 name inner
333+55:12 glyph |=
334+55:15 glyph [
335+55:16 tight name a
336+55:17 tight glyph =
337+55:18 tight tvar A
338+55:20 name b
339+55:21 tight glyph =
340+55:22 tight tvar B
341+55:23 tight glyph ]
342+55:25 glyph ^-
343+55:28 tvar A
344+55:30 name b
345+56:3 NEWLINE
346+56:3 glyph (
347+56:4 tight name inner
348+56:10 name x
349+56:12 lit ~zod
350+56:16 tight glyph )
351+57:1 DEDENT
352+57:1 NEWLINE
353+57:1 glyph ++
354+57:4 name pending
355+57:12 glyph |=
356+57:15 name x
357+57:16 tight glyph =
358+57:17 tight aura @t
359+58:3 INDENT
360+58:3 glyph ++
361+58:6 name inner
362+58:12 glyph |=
363+58:15 name y
364+58:16 tight glyph =
365+58:17 tight tvar A
366+59:5 INDENT
367+59:5 glyph ~&
368+59:8 lit %orphan
369+60:7 INDENT
370+60:7 name y
371+61:3 DEDENT
372+61:3 DEDENT
373+61:3 NEWLINE
374+61:3 glyph (
375+61:4 tight name inner
376+61:10 name x
377+61:11 tight glyph )
378+62:1 DEDENT
379+62:1 NEWLINE
380+62:1 glyph ++
381+62:4 name mold-param
382+62:15 glyph |=
383+62:18 name x
384+62:19 tight glyph =
385+62:20 tight tvar A
386+63:3 INDENT
387+63:3 glyph +$
388+63:6 name box
389+63:10 glyph |$
390+63:13 glyph [
391+63:14 tight tvar A
392+63:15 tight glyph ]
393+63:17 glyph [
394+63:18 tight name value
395+63:23 tight glyph =
396+63:24 tight tvar A
397+63:26 name count
398+63:31 tight glyph =
399+63:32 tight aura @ud
400+63:35 tight glyph ]
401+64:3 NEWLINE
402+64:3 glyph ^-
403+64:6 glyph (
404+64:7 tight name box
405+64:11 aura @t
406+64:13 tight glyph )
407+64:15 glyph [
408+64:16 tight name value
409+64:21 tight glyph =
410+64:22 tight str "hi"
411+64:27 name count
412+64:32 tight glyph =
413+64:33 tight lit 1
414+64:34 tight glyph ]
415+65:1 DEDENT
416+65:1 NEWLINE
417+65:1 glyph ++
418+65:4 name later-share
419+65:16 glyph |=
420+65:19 name x
421+66:3 INDENT
422+66:3 glyph ++
423+66:6 name inner
424+66:12 glyph |=
425+66:15 name y
426+66:16 tight glyph =
427+66:17 tight tvar A
428+66:19 name y
429+67:3 NEWLINE
430+67:3 glyph ~&
431+67:6 glyph (
432+67:7 tight name inner
433+67:13 name x
434+67:14 tight glyph )
435+68:5 INDENT
436+68:5 glyph ^-
437+68:8 tvar A
438+68:10 name x
439+69:1 DEDENT
440+69:1 DEDENT
441+69:1 NEWLINE
442+69:1 glyph ++
443+69:4 name atom-bad
444+69:13 glyph |=
445+69:16 name x
446+69:17 tight glyph =
447+69:18 tight aura @t
448+70:3 INDENT
449+70:3 glyph ++
450+70:6 name inner
451+70:12 glyph |=
452+70:15 name y
453+70:16 tight glyph =
454+70:17 tight tvar A
455+71:5 INDENT
456+71:5 glyph ~&
457+71:8 glyph ^-
458+71:11 aura @
459+71:13 name y
460+72:7 INDENT
461+72:7 name y
462+73:3 DEDENT
463+73:3 DEDENT
464+73:3 NEWLINE
465+73:3 glyph (
466+73:4 tight name inner
467+73:10 glyph [
468+73:11 tight name x
469+73:13 lit ~zod
470+73:17 tight glyph ]
471+73:18 tight glyph )
472+73:19 DEDENT
473+73:19 NEWLINE
tests/golden/types-local-capitals/tree.txtnew file+229
@@ -0,0 +1,229 @@
1+(module
2+ (value 1:1 siblings
3+ (gate 1:13
4+ (face 1:16 x (aura 1:18 @t))
5+ (body 2:3
6+ (value 2:3 first
7+ (gate 2:12
8+ (face 2:15 y (tvar 2:17 A))
9+ (wing 2:19 y)))
10+ (value 3:3 second
11+ (gate 3:13
12+ (face 3:16 z (tvar 3:18 A))
13+ (wing 3:20 z)))
14+ (trace 4:3
15+ (group 4:6
16+ (call 4:7 (wing 4:7 first) (wing 4:13 x)))
17+ (body 5:5
18+ (group 5:5
19+ (call 5:6 (wing 5:6 second) (lit 5:13 ~zod))))))))
20+ (value 6:1 later
21+ (gate 6:10
22+ (bind 6:13 x)
23+ (body 7:3
24+ (value 7:3 inner
25+ (gate 7:12
26+ (face 7:15 y (tvar 7:17 A))
27+ (wing 7:19 y)))
28+ (trace 8:3
29+ (group 8:6
30+ (call 8:7 (wing 8:7 inner) (str 8:13 "hi")))
31+ (body 9:5
32+ (cast 9:5 (tvar 9:8 A) (wing 9:10 x)))))))
33+ (value 10:1 captured
34+ (gate 10:13
35+ (face 10:16 x (tvar 10:18 A))
36+ (body 11:3
37+ (value 11:3 inner
38+ (gate 11:12
39+ (face 11:15 y (tvar 11:17 A))
40+ (body 12:5
41+ (branch 12:5
42+ (lit 12:8 %.y)
43+ (arm 13:7 (lit 13:7 %.y) (wing 13:11 x))
44+ (arm 14:7
45+ (lit 14:7 %.n)
46+ (group 14:11
47+ (call 14:12 (wing 14:12 inner) (wing 14:18 y))))))))
48+ (group 15:3
49+ (call 15:4 (wing 15:4 inner) (wing 15:10 x))))))
50+ (value 16:1 implicit
51+ (gate 16:13
52+ (bind 16:16 x)
53+ (body 17:3
54+ (value 17:3 inner
55+ (gate 17:12
56+ (bind 17:15 y)
57+ (body 18:5
58+ (branch 18:5
59+ (lit 18:8 %.y)
60+ (arm 19:7 (lit 19:7 %.y) (wing 19:11 y))
61+ (arm 20:7
62+ (lit 20:7 %.n)
63+ (group 20:11
64+ (call 20:12 (wing 20:12 inner) (wing 20:18 y))))))))
65+ (trace 21:3
66+ (group 21:6
67+ (call 21:7 (wing 21:7 inner) (str 21:13 "hi")))
68+ (body 22:5
69+ (group 22:5
70+ (call 22:6 (wing 22:6 inner) (lit 22:12 ~zod))))))))
71+ (value 23:1 local-mono
72+ (gate 23:15
73+ (face 23:18 x (tvar 23:20 A))
74+ (body 24:3
75+ (value 24:3 inner
76+ (gate 24:12
77+ (face 24:15 y (tvar 24:17 A))
78+ (body 25:5
79+ (value 25:5 alias (wing 25:14 inner))
80+ (trace 26:5
81+ (group 26:8
82+ (call 26:9 (wing 26:9 alias) (str 26:15 "hi")))
83+ (body 27:7
84+ (group 27:7
85+ (call 27:8 (wing 27:8 alias) (lit 27:14 ~zod))))))))
86+ (group 28:3
87+ (call 28:4 (wing 28:4 inner) (wing 28:10 x))))))
88+ (value 29:1 fresh
89+ (gate 29:10
90+ (face 29:13 x (aura 29:15 @t))
91+ (body 30:3
92+ (value 30:3 inner
93+ (gate 30:12
94+ (face 30:15 y (tvar 30:17 A))
95+ (wing 30:19 y)))
96+ (group 31:3
97+ (call 31:4 (wing 31:4 inner) (wing 31:10 x))))))
98+ (value 32:1 captured-acyclic
99+ (gate 32:21
100+ (face 32:24 x (tvar 32:26 A))
101+ (body 33:3
102+ (value 33:3 inner
103+ (gate 33:12
104+ (face 33:15 y (tvar 33:17 A))
105+ (wing 33:19 y)))
106+ (group 34:3
107+ (call 34:4 (wing 34:4 inner) (wing 34:10 x))))))
108+ (value 35:1 implicit-capture
109+ (gate 35:21
110+ (bind 35:24 x)
111+ (body 36:3
112+ (value 36:3 inner
113+ (gate 36:12
114+ (face 36:15 flag (flag 36:20))
115+ (body 37:5
116+ (branch 37:5
117+ (wing 37:8 flag)
118+ (arm 38:7 (lit 38:7 %.y) (wing 38:11 x))
119+ (arm 39:7
120+ (lit 39:7 %.n)
121+ (group 39:11
122+ (call 39:12 (wing 39:12 inner) (lit 39:18 %.y))))))))
123+ (trace 40:3
124+ (cast 40:6 (aura 40:9 @t) (wing 40:12 x))
125+ (body 41:5
126+ (group 41:5
127+ (call 41:6 (wing 41:6 inner) (lit 41:12 %.y))))))))
128+ (value 42:1 nested
129+ (gate 42:11
130+ (face 42:14 x (aura 42:16 @t))
131+ (body 43:3
132+ (value 43:3 first
133+ (gate 43:12
134+ (face 43:15 y (tvar 43:17 A))
135+ (body 44:5
136+ (value 44:5 inner
137+ (gate 44:14
138+ (face 44:17 z (tvar 44:19 B))
139+ (wing 44:21 z)))
140+ (trace 45:5
141+ (group 45:8
142+ (call 45:9 (wing 45:9 inner) (lit 45:15 ~zod)))
143+ (body 46:7 (wing 46:7 y))))))
144+ (group 47:3
145+ (call 47:4 (wing 47:4 first) (wing 47:10 x))))))
146+ (value 48:1 atom
147+ (gate 48:9
148+ (face 48:12 x (aura 48:14 @t))
149+ (body 49:3
150+ (value 49:3 inner
151+ (gate 49:12
152+ (face 49:15 y (tvar 49:17 A))
153+ (body 50:5
154+ (trace 50:5
155+ (cast 50:8 (aura 50:11 @) (wing 50:13 y))
156+ (body 51:7 (wing 51:7 y))))))
157+ (trace 52:3
158+ (group 52:6
159+ (call 52:7 (wing 52:7 inner) (wing 52:13 x)))
160+ (body 53:5
161+ (group 53:5
162+ (call 53:6 (wing 53:6 inner) (lit 53:12 ~zod))))))))
163+ (value 54:1 force-equal
164+ (gate 54:16
165+ (face 54:19 x (aura 54:21 @t))
166+ (body 55:3
167+ (value 55:3 inner
168+ (gate 55:12
169+ (cell 55:15
170+ (face 55:16 a (tvar 55:18 A))
171+ (face 55:20 b (tvar 55:22 B)))
172+ (cast 55:25 (tvar 55:28 A) (wing 55:30 b))))
173+ (group 56:3
174+ (call 56:4 (wing 56:4 inner) (wing 56:10 x) (lit 56:12 ~zod))))))
175+ (value 57:1 pending
176+ (gate 57:12
177+ (face 57:15 x (aura 57:17 @t))
178+ (body 58:3
179+ (value 58:3 inner
180+ (gate 58:12
181+ (face 58:15 y (tvar 58:17 A))
182+ (body 59:5
183+ (trace 59:5
184+ (lit 59:8 %orphan)
185+ (body 60:7 (wing 60:7 y))))))
186+ (group 61:3
187+ (call 61:4 (wing 61:4 inner) (wing 61:10 x))))))
188+ (value 62:1 mold-param
189+ (gate 62:15
190+ (face 62:18 x (tvar 62:20 A))
191+ (body 63:3
192+ (mold 63:3 box
193+ (generic 63:10 A
194+ (cell 63:17
195+ (face 63:18 value (tvar 63:24 A))
196+ (face 63:26 count (aura 63:32 @ud)))))
197+ (cast 64:3
198+ (apply 64:6 box (aura 64:11 @t))
199+ (tuple 64:15
200+ (face 64:16 value (str 64:22 "hi"))
201+ (face 64:27 count (lit 64:33 1)))))))
202+ (value 65:1 later-share
203+ (gate 65:16
204+ (bind 65:19 x)
205+ (body 66:3
206+ (value 66:3 inner
207+ (gate 66:12
208+ (face 66:15 y (tvar 66:17 A))
209+ (wing 66:19 y)))
210+ (trace 67:3
211+ (group 67:6
212+ (call 67:7 (wing 67:7 inner) (wing 67:13 x)))
213+ (body 68:5
214+ (cast 68:5 (tvar 68:8 A) (wing 68:10 x)))))))
215+ (value 69:1 atom-bad
216+ (gate 69:13
217+ (face 69:16 x (aura 69:18 @t))
218+ (body 70:3
219+ (value 70:3 inner
220+ (gate 70:12
221+ (face 70:15 y (tvar 70:17 A))
222+ (body 71:5
223+ (trace 71:5
224+ (cast 71:8 (aura 71:11 @) (wing 71:13 y))
225+ (body 72:7 (wing 72:7 y))))))
226+ (group 73:3
227+ (call 73:4
228+ (wing 73:4 inner)
229+ (tuple 73:10 (wing 73:11 x) (lit 73:13 ~zod))))))))
tests/golden/types-local-capitals/types.txtnew file+28
@@ -0,0 +1,28 @@
1+partial inference; module not checked
2+++ siblings: $-(@t @p)
3+++ later: explicit capital constraints are not supported by partial inference
4+++ captured: $-(A A)
5+++ implicit: $-(A @p)
6+++ local-mono: local definitions need unsupported inference
7+++ fresh: $-(@t @t)
8+++ captured-acyclic: $-(A A)
9+++ implicit-capture: $-(@t @t)
10+++ nested: $-(@t @t)
11+++ atom: $-(@t @p)
12+++ force-equal: distinct type variables `A` and `B` must not be forced equal; use the same capital for a shared type
13+/tests/golden/types-local-capitals/source.jibb:55:18: first type variable
14+ ++ inner |= [a=A b=B] ^- A b
15+ ^
16+/tests/golden/types-local-capitals/source.jibb:55:22: second type variable
17+ ++ inner |= [a=A b=B] ^- A b
18+ ^
19+++ pending: local definitions need unsupported inference
20+++ mold-param: $-(A [value=@t count=@ud])
21+++ later-share: $-(A A)
22+++ atom-bad: call's sample and argument types do not unify
23+/tests/golden/types-local-capitals/source.jibb:73:4: called gate has type $-(A A) where A is an atom
24+ (inner [x ~zod])
25+ ^
26+/tests/golden/types-local-capitals/source.jibb:73:10: argument has type [@t @p]
27+ (inner [x ~zod])
28+ ^
tests/golden/types-local-recursive/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Modules: "Gates may call themselves and their siblings; other values can't depend on themselves, even through a gate"; Molds: "Type variables are capitals, generalized per `++`."
2+tests: A body-local recursive gate uses a monomorphic self reference and generalizes independently where allowed. Recursive list copy, capture, bare-binder polymorphism and a mutual gate cycle infer; name collisions, value cycles, unresolved tags, incompatible recursive aliases, self-application and explicit-capital forcing remain unsupported in this fragment.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-local-recursive/modules.txtnew file+1
@@ -0,0 +1 @@
1+# empty bundle
tests/golden/types-local-recursive/source.jibbnew file+54
@@ -0,0 +1,54 @@
1+++ copy |= xs=(list @t)
2+ ++ recur |= ys=(list @t)
3+ ^- (list @t) ?- ys
4+ ~ ~
5+ [item rest] [item (recur rest)]
6+ (recur xs)
7+++ generic |= x=A
8+ ++ recur |= y=A
9+ ?- %.y
10+ %.y x
11+ %.n (recur y)
12+ (recur x)
13+++ independently |= x=@t
14+ ++ recur |= y
15+ ?- %.y
16+ %.y y
17+ %.n (recur y)
18+ ~& (recur x)
19+ (recur ~zod)
20+++ collide |= x=@t
21+ ++ recur |= recur=@t (recur recur)
22+ (recur x)
23+++ cycle |= x=@t
24+ ++ y z
25+ ++ z y
26+ y
27+++ mutual |= x=@t
28+ ++ a |= y=@t (b y)
29+ ++ b |= y=@t (a y)
30+ (a x)
31+++ pending |= x=@t
32+ ++ recur |= y=@t
33+ ~& %orphan
34+ (recur y)
35+ (recur x)
36+++ alias-mono |= x=@t
37+ ++ recur |= y=A
38+ ++ alias recur
39+ ~& (alias "hi")
40+ (alias ~zod)
41+ (recur x)
42+++ occurs |= x=@t
43+ ++ recur |= y (recur recur)
44+ (recur x)
45+++ captures |= x=A
46+ ++ recur |= flag=?
47+ ?- flag
48+ %.y ^- @t x
49+ %.n (recur %.y)
50+ (recur %.y)
51+++ via-gate |= x=@t
52+ ++ value (gate x)
53+ ++ gate |= y=@t value
54+ value
tests/golden/types-local-recursive/tokens.txtnew file+351
@@ -0,0 +1,351 @@
1+1:1 glyph ++
2+1:4 name copy
3+1:9 glyph |=
4+1:12 name xs
5+1:14 tight glyph =
6+1:15 tight glyph (
7+1:16 tight name list
8+1:21 aura @t
9+1:23 tight glyph )
10+2:3 INDENT
11+2:3 glyph ++
12+2:6 name recur
13+2:12 glyph |=
14+2:15 name ys
15+2:17 tight glyph =
16+2:18 tight glyph (
17+2:19 tight name list
18+2:24 aura @t
19+2:26 tight glyph )
20+3:5 INDENT
21+3:5 glyph ^-
22+3:8 glyph (
23+3:9 tight name list
24+3:14 aura @t
25+3:16 tight glyph )
26+3:18 glyph ?-
27+3:21 name ys
28+4:7 INDENT
29+4:7 lit ~
30+4:9 lit ~
31+5:7 NEWLINE
32+5:7 glyph [
33+5:8 tight name item
34+5:13 name rest
35+5:17 tight glyph ]
36+5:19 glyph [
37+5:20 tight name item
38+5:25 glyph (
39+5:26 tight name recur
40+5:32 name rest
41+5:36 tight glyph )
42+5:37 tight glyph ]
43+6:3 DEDENT
44+6:3 DEDENT
45+6:3 NEWLINE
46+6:3 glyph (
47+6:4 tight name recur
48+6:10 name xs
49+6:12 tight glyph )
50+7:1 DEDENT
51+7:1 NEWLINE
52+7:1 glyph ++
53+7:4 name generic
54+7:12 glyph |=
55+7:15 name x
56+7:16 tight glyph =
57+7:17 tight tvar A
58+8:3 INDENT
59+8:3 glyph ++
60+8:6 name recur
61+8:12 glyph |=
62+8:15 name y
63+8:16 tight glyph =
64+8:17 tight tvar A
65+9:5 INDENT
66+9:5 glyph ?-
67+9:8 lit %.y
68+10:7 INDENT
69+10:7 lit %.y
70+10:11 name x
71+11:7 NEWLINE
72+11:7 lit %.n
73+11:11 glyph (
74+11:12 tight name recur
75+11:18 name y
76+11:19 tight glyph )
77+12:3 DEDENT
78+12:3 DEDENT
79+12:3 NEWLINE
80+12:3 glyph (
81+12:4 tight name recur
82+12:10 name x
83+12:11 tight glyph )
84+13:1 DEDENT
85+13:1 NEWLINE
86+13:1 glyph ++
87+13:4 name independently
88+13:18 glyph |=
89+13:21 name x
90+13:22 tight glyph =
91+13:23 tight aura @t
92+14:3 INDENT
93+14:3 glyph ++
94+14:6 name recur
95+14:12 glyph |=
96+14:15 name y
97+15:5 INDENT
98+15:5 glyph ?-
99+15:8 lit %.y
100+16:7 INDENT
101+16:7 lit %.y
102+16:11 name y
103+17:7 NEWLINE
104+17:7 lit %.n
105+17:11 glyph (
106+17:12 tight name recur
107+17:18 name y
108+17:19 tight glyph )
109+18:3 DEDENT
110+18:3 DEDENT
111+18:3 NEWLINE
112+18:3 glyph ~&
113+18:6 glyph (
114+18:7 tight name recur
115+18:13 name x
116+18:14 tight glyph )
117+19:5 INDENT
118+19:5 glyph (
119+19:6 tight name recur
120+19:12 lit ~zod
121+19:16 tight glyph )
122+20:1 DEDENT
123+20:1 DEDENT
124+20:1 NEWLINE
125+20:1 glyph ++
126+20:4 name collide
127+20:12 glyph |=
128+20:15 name x
129+20:16 tight glyph =
130+20:17 tight aura @t
131+21:3 INDENT
132+21:3 glyph ++
133+21:6 name recur
134+21:12 glyph |=
135+21:15 name recur
136+21:20 tight glyph =
137+21:21 tight aura @t
138+21:24 glyph (
139+21:25 tight name recur
140+21:31 name recur
141+21:36 tight glyph )
142+22:3 NEWLINE
143+22:3 glyph (
144+22:4 tight name recur
145+22:10 name x
146+22:11 tight glyph )
147+23:1 DEDENT
148+23:1 NEWLINE
149+23:1 glyph ++
150+23:4 name cycle
151+23:10 glyph |=
152+23:13 name x
153+23:14 tight glyph =
154+23:15 tight aura @t
155+24:3 INDENT
156+24:3 glyph ++
157+24:6 name y
158+24:8 name z
159+25:3 NEWLINE
160+25:3 glyph ++
161+25:6 name z
162+25:8 name y
163+26:3 NEWLINE
164+26:3 name y
165+27:1 DEDENT
166+27:1 NEWLINE
167+27:1 glyph ++
168+27:4 name mutual
169+27:11 glyph |=
170+27:14 name x
171+27:15 tight glyph =
172+27:16 tight aura @t
173+28:3 INDENT
174+28:3 glyph ++
175+28:6 name a
176+28:8 glyph |=
177+28:11 name y
178+28:12 tight glyph =
179+28:13 tight aura @t
180+28:16 glyph (
181+28:17 tight name b
182+28:19 name y
183+28:20 tight glyph )
184+29:3 NEWLINE
185+29:3 glyph ++
186+29:6 name b
187+29:8 glyph |=
188+29:11 name y
189+29:12 tight glyph =
190+29:13 tight aura @t
191+29:16 glyph (
192+29:17 tight name a
193+29:19 name y
194+29:20 tight glyph )
195+30:3 NEWLINE
196+30:3 glyph (
197+30:4 tight name a
198+30:6 name x
199+30:7 tight glyph )
200+31:1 DEDENT
201+31:1 NEWLINE
202+31:1 glyph ++
203+31:4 name pending
204+31:12 glyph |=
205+31:15 name x
206+31:16 tight glyph =
207+31:17 tight aura @t
208+32:3 INDENT
209+32:3 glyph ++
210+32:6 name recur
211+32:12 glyph |=
212+32:15 name y
213+32:16 tight glyph =
214+32:17 tight aura @t
215+33:5 INDENT
216+33:5 glyph ~&
217+33:8 lit %orphan
218+34:7 INDENT
219+34:7 glyph (
220+34:8 tight name recur
221+34:14 name y
222+34:15 tight glyph )
223+35:3 DEDENT
224+35:3 DEDENT
225+35:3 NEWLINE
226+35:3 glyph (
227+35:4 tight name recur
228+35:10 name x
229+35:11 tight glyph )
230+36:1 DEDENT
231+36:1 NEWLINE
232+36:1 glyph ++
233+36:4 name alias-mono
234+36:15 glyph |=
235+36:18 name x
236+36:19 tight glyph =
237+36:20 tight aura @t
238+37:3 INDENT
239+37:3 glyph ++
240+37:6 name recur
241+37:12 glyph |=
242+37:15 name y
243+37:16 tight glyph =
244+37:17 tight tvar A
245+38:5 INDENT
246+38:5 glyph ++
247+38:8 name alias
248+38:14 name recur
249+39:5 NEWLINE
250+39:5 glyph ~&
251+39:8 glyph (
252+39:9 tight name alias
253+39:15 str "hi"
254+39:19 tight glyph )
255+40:7 INDENT
256+40:7 glyph (
257+40:8 tight name alias
258+40:14 lit ~zod
259+40:18 tight glyph )
260+41:3 DEDENT
261+41:3 DEDENT
262+41:3 NEWLINE
263+41:3 glyph (
264+41:4 tight name recur
265+41:10 name x
266+41:11 tight glyph )
267+42:1 DEDENT
268+42:1 NEWLINE
269+42:1 glyph ++
270+42:4 name occurs
271+42:11 glyph |=
272+42:14 name x
273+42:15 tight glyph =
274+42:16 tight aura @t
275+43:3 INDENT
276+43:3 glyph ++
277+43:6 name recur
278+43:12 glyph |=
279+43:15 name y
280+43:17 glyph (
281+43:18 tight name recur
282+43:24 name recur
283+43:29 tight glyph )
284+44:3 NEWLINE
285+44:3 glyph (
286+44:4 tight name recur
287+44:10 name x
288+44:11 tight glyph )
289+45:1 DEDENT
290+45:1 NEWLINE
291+45:1 glyph ++
292+45:4 name captures
293+45:13 glyph |=
294+45:16 name x
295+45:17 tight glyph =
296+45:18 tight tvar A
297+46:3 INDENT
298+46:3 glyph ++
299+46:6 name recur
300+46:12 glyph |=
301+46:15 name flag
302+46:19 tight glyph =
303+46:20 tight glyph ?
304+47:5 INDENT
305+47:5 glyph ?-
306+47:8 name flag
307+48:7 INDENT
308+48:7 lit %.y
309+48:11 glyph ^-
310+48:14 aura @t
311+48:17 name x
312+49:7 NEWLINE
313+49:7 lit %.n
314+49:11 glyph (
315+49:12 tight name recur
316+49:18 lit %.y
317+49:21 tight glyph )
318+50:3 DEDENT
319+50:3 DEDENT
320+50:3 NEWLINE
321+50:3 glyph (
322+50:4 tight name recur
323+50:10 lit %.y
324+50:13 tight glyph )
325+51:1 DEDENT
326+51:1 NEWLINE
327+51:1 glyph ++
328+51:4 name via-gate
329+51:13 glyph |=
330+51:16 name x
331+51:17 tight glyph =
332+51:18 tight aura @t
333+52:3 INDENT
334+52:3 glyph ++
335+52:6 name value
336+52:12 glyph (
337+52:13 tight name gate
338+52:18 name x
339+52:19 tight glyph )
340+53:3 NEWLINE
341+53:3 glyph ++
342+53:6 name gate
343+53:11 glyph |=
344+53:14 name y
345+53:15 tight glyph =
346+53:16 tight aura @t
347+53:19 name value
348+54:3 NEWLINE
349+54:3 name value
350+54:8 DEDENT
351+54:8 NEWLINE
tests/golden/types-local-recursive/tree.txtnew file+170
@@ -0,0 +1,170 @@
1+(module
2+ (value 1:1 copy
3+ (gate 1:9
4+ (face 1:12 xs
5+ (apply 1:15 list (aura 1:21 @t)))
6+ (body 2:3
7+ (value 2:3 recur
8+ (gate 2:12
9+ (face 2:15 ys
10+ (apply 2:18 list (aura 2:24 @t)))
11+ (body 3:5
12+ (cast 3:5
13+ (apply 3:8 list (aura 3:14 @t))
14+ (branch 3:18
15+ (wing 3:21 ys)
16+ (arm 4:7 (lit 4:7 ~) (lit 4:9 ~))
17+ (arm 5:7
18+ (cell 5:7 (bind 5:8 item) (bind 5:13 rest))
19+ (tuple 5:19
20+ (wing 5:20 item)
21+ (group 5:25
22+ (call 5:26 (wing 5:26 recur) (wing 5:32 rest))))))))))
23+ (group 6:3
24+ (call 6:4 (wing 6:4 recur) (wing 6:10 xs))))))
25+ (value 7:1 generic
26+ (gate 7:12
27+ (face 7:15 x (tvar 7:17 A))
28+ (body 8:3
29+ (value 8:3 recur
30+ (gate 8:12
31+ (face 8:15 y (tvar 8:17 A))
32+ (body 9:5
33+ (branch 9:5
34+ (lit 9:8 %.y)
35+ (arm 10:7 (lit 10:7 %.y) (wing 10:11 x))
36+ (arm 11:7
37+ (lit 11:7 %.n)
38+ (group 11:11
39+ (call 11:12 (wing 11:12 recur) (wing 11:18 y))))))))
40+ (group 12:3
41+ (call 12:4 (wing 12:4 recur) (wing 12:10 x))))))
42+ (value 13:1 independently
43+ (gate 13:18
44+ (face 13:21 x (aura 13:23 @t))
45+ (body 14:3
46+ (value 14:3 recur
47+ (gate 14:12
48+ (bind 14:15 y)
49+ (body 15:5
50+ (branch 15:5
51+ (lit 15:8 %.y)
52+ (arm 16:7 (lit 16:7 %.y) (wing 16:11 y))
53+ (arm 17:7
54+ (lit 17:7 %.n)
55+ (group 17:11
56+ (call 17:12 (wing 17:12 recur) (wing 17:18 y))))))))
57+ (trace 18:3
58+ (group 18:6
59+ (call 18:7 (wing 18:7 recur) (wing 18:13 x)))
60+ (body 19:5
61+ (group 19:5
62+ (call 19:6 (wing 19:6 recur) (lit 19:12 ~zod))))))))
63+ (value 20:1 collide
64+ (gate 20:12
65+ (face 20:15 x (aura 20:17 @t))
66+ (body 21:3
67+ (value 21:3 recur
68+ (gate 21:12
69+ (face 21:15 recur (aura 21:21 @t))
70+ (group 21:24
71+ (call 21:25 (wing 21:25 recur) (wing 21:31 recur)))))
72+ (group 22:3
73+ (call 22:4 (wing 22:4 recur) (wing 22:10 x))))))
74+ (value 23:1 cycle
75+ (gate 23:10
76+ (face 23:13 x (aura 23:15 @t))
77+ (body 24:3
78+ (value 24:3 y (wing 24:8 z))
79+ (value 25:3 z (wing 25:8 y))
80+ (wing 26:3 y))))
81+ (value 27:1 mutual
82+ (gate 27:11
83+ (face 27:14 x (aura 27:16 @t))
84+ (body 28:3
85+ (value 28:3 a
86+ (gate 28:8
87+ (face 28:11 y (aura 28:13 @t))
88+ (group 28:16
89+ (call 28:17 (wing 28:17 b) (wing 28:19 y)))))
90+ (value 29:3 b
91+ (gate 29:8
92+ (face 29:11 y (aura 29:13 @t))
93+ (group 29:16
94+ (call 29:17 (wing 29:17 a) (wing 29:19 y)))))
95+ (group 30:3
96+ (call 30:4 (wing 30:4 a) (wing 30:6 x))))))
97+ (value 31:1 pending
98+ (gate 31:12
99+ (face 31:15 x (aura 31:17 @t))
100+ (body 32:3
101+ (value 32:3 recur
102+ (gate 32:12
103+ (face 32:15 y (aura 32:17 @t))
104+ (body 33:5
105+ (trace 33:5
106+ (lit 33:8 %orphan)
107+ (body 34:7
108+ (group 34:7
109+ (call 34:8 (wing 34:8 recur) (wing 34:14 y))))))))
110+ (group 35:3
111+ (call 35:4 (wing 35:4 recur) (wing 35:10 x))))))
112+ (value 36:1 alias-mono
113+ (gate 36:15
114+ (face 36:18 x (aura 36:20 @t))
115+ (body 37:3
116+ (value 37:3 recur
117+ (gate 37:12
118+ (face 37:15 y (tvar 37:17 A))
119+ (body 38:5
120+ (value 38:5 alias (wing 38:14 recur))
121+ (trace 39:5
122+ (group 39:8
123+ (call 39:9 (wing 39:9 alias) (str 39:15 "hi")))
124+ (body 40:7
125+ (group 40:7
126+ (call 40:8 (wing 40:8 alias) (lit 40:14 ~zod))))))))
127+ (group 41:3
128+ (call 41:4 (wing 41:4 recur) (wing 41:10 x))))))
129+ (value 42:1 occurs
130+ (gate 42:11
131+ (face 42:14 x (aura 42:16 @t))
132+ (body 43:3
133+ (value 43:3 recur
134+ (gate 43:12
135+ (bind 43:15 y)
136+ (group 43:17
137+ (call 43:18 (wing 43:18 recur) (wing 43:24 recur)))))
138+ (group 44:3
139+ (call 44:4 (wing 44:4 recur) (wing 44:10 x))))))
140+ (value 45:1 captures
141+ (gate 45:13
142+ (face 45:16 x (tvar 45:18 A))
143+ (body 46:3
144+ (value 46:3 recur
145+ (gate 46:12
146+ (face 46:15 flag (flag 46:20))
147+ (body 47:5
148+ (branch 47:5
149+ (wing 47:8 flag)
150+ (arm 48:7
151+ (lit 48:7 %.y)
152+ (cast 48:11 (aura 48:14 @t) (wing 48:17 x)))
153+ (arm 49:7
154+ (lit 49:7 %.n)
155+ (group 49:11
156+ (call 49:12 (wing 49:12 recur) (lit 49:18 %.y))))))))
157+ (group 50:3
158+ (call 50:4 (wing 50:4 recur) (lit 50:10 %.y))))))
159+ (value 51:1 via-gate
160+ (gate 51:13
161+ (face 51:16 x (aura 51:18 @t))
162+ (body 52:3
163+ (value 52:3 value
164+ (group 52:12
165+ (call 52:13 (wing 52:13 gate) (wing 52:18 x))))
166+ (value 53:3 gate
167+ (gate 53:11
168+ (face 53:14 y (aura 53:16 @t))
169+ (wing 53:19 value)))
170+ (wing 54:3 value)))))
tests/golden/types-local-recursive/types.txtnew file+12
@@ -0,0 +1,12 @@
1+partial inference; module not checked
2+++ copy: $-((list @t) (list @t))
3+++ generic: $-(A A)
4+++ independently: $-(@t @p)
5+++ collide: local definitions need unsupported inference
6+++ cycle: local definitions need unsupported inference
7+++ mutual: $-(@t A)
8+++ pending: local definitions need unsupported inference
9+++ alias-mono: local definitions need unsupported inference
10+++ occurs: local definitions need unsupported inference
11+++ captures: local definitions need unsupported inference
12+++ via-gate: local definitions need unsupported inference
tests/golden/types-local-scc-adversarial/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Modules: gates may call themselves and siblings; type variables generalize per definition, with shared enclosing capitals and no shadowing.
2+tests: Local mutual recursion handles independent local capitals, enclosing captures, dependency ordering and nested groups. Explicitly distinct captured capitals and unresolved tags fail closed; monomorphic recursive aliases do not admit conflicting calls.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-local-scc-adversarial/modules.txtnew file+1
@@ -0,0 +1 @@
1+# Use prepared prelude.
tests/golden/types-local-scc-adversarial/source.jibbnew file+54
@@ -0,0 +1,54 @@
1+++ siblings |= input=@t
2+ ++ first |= x=A (second x)
3+ ++ second |= x=A (first x)
4+ (first input)
5+++ introduced |= input=@t
6+ ++ first |= x=A (second x)
7+ ++ second |= x=B (first x)
8+ (first input)
9+++ outer-later |= input
10+ ++ first |= x=A (second x)
11+ ++ second |= y=A (first y)
12+ ~& ^- A input
13+ (first input)
14+++ captured |= input
15+ ++ first |= x
16+ ~& ^- @t input
17+ (second x)
18+ ++ second |= y (first y)
19+ input
20+++ alias-mono |= input=@t
21+ ++ first |= x
22+ ++ alias second
23+ ~& (alias x)
24+ (alias ~zod)
25+ ++ second |= y (first y)
26+ (first input)
27+++ chain |= input=@t
28+ ++ top |= x (one x)
29+ ++ one |= x (two x)
30+ ++ two |= x (one x)
31+ (top input)
32+++ nested-capture |= input=@t
33+ ++ outer-one |= x
34+ ++ inner-one |= y (inner-two y)
35+ ++ inner-two |= y
36+ ~& input
37+ (inner-one y)
38+ (outer-two (inner-one x))
39+ ++ outer-two |= z (outer-one z)
40+ (outer-one input)
41+++ unresolved |= input=@t
42+ ++ first |= x
43+ ~& %pending
44+ (second x)
45+ ++ second |= x (first x)
46+ (first input)
47+++ forced-captures |= [a=A b=B]
48+ ++ first |= x=A (second x)
49+ ++ second |= y=B (first y)
50+ (first a)
51+++ same-capture |= [a=A b=A]
52+ ++ first |= x=A (second x)
53+ ++ second |= y=A (first y)
54+ (first a)
tests/golden/types-local-scc-adversarial/tokens.txtnew file+404
@@ -0,0 +1,404 @@
1+1:1 glyph ++
2+1:4 name siblings
3+1:13 glyph |=
4+1:16 name input
5+1:21 tight glyph =
6+1:22 tight aura @t
7+2:3 INDENT
8+2:3 glyph ++
9+2:6 name first
10+2:12 glyph |=
11+2:15 name x
12+2:16 tight glyph =
13+2:17 tight tvar A
14+2:19 glyph (
15+2:20 tight name second
16+2:27 name x
17+2:28 tight glyph )
18+3:3 NEWLINE
19+3:3 glyph ++
20+3:6 name second
21+3:13 glyph |=
22+3:16 name x
23+3:17 tight glyph =
24+3:18 tight tvar A
25+3:20 glyph (
26+3:21 tight name first
27+3:27 name x
28+3:28 tight glyph )
29+4:3 NEWLINE
30+4:3 glyph (
31+4:4 tight name first
32+4:10 name input
33+4:15 tight glyph )
34+5:1 DEDENT
35+5:1 NEWLINE
36+5:1 glyph ++
37+5:4 name introduced
38+5:15 glyph |=
39+5:18 name input
40+5:23 tight glyph =
41+5:24 tight aura @t
42+6:3 INDENT
43+6:3 glyph ++
44+6:6 name first
45+6:12 glyph |=
46+6:15 name x
47+6:16 tight glyph =
48+6:17 tight tvar A
49+6:19 glyph (
50+6:20 tight name second
51+6:27 name x
52+6:28 tight glyph )
53+7:3 NEWLINE
54+7:3 glyph ++
55+7:6 name second
56+7:13 glyph |=
57+7:16 name x
58+7:17 tight glyph =
59+7:18 tight tvar B
60+7:20 glyph (
61+7:21 tight name first
62+7:27 name x
63+7:28 tight glyph )
64+8:3 NEWLINE
65+8:3 glyph (
66+8:4 tight name first
67+8:10 name input
68+8:15 tight glyph )
69+9:1 DEDENT
70+9:1 NEWLINE
71+9:1 glyph ++
72+9:4 name outer-later
73+9:16 glyph |=
74+9:19 name input
75+10:3 INDENT
76+10:3 glyph ++
77+10:6 name first
78+10:12 glyph |=
79+10:15 name x
80+10:16 tight glyph =
81+10:17 tight tvar A
82+10:19 glyph (
83+10:20 tight name second
84+10:27 name x
85+10:28 tight glyph )
86+11:3 NEWLINE
87+11:3 glyph ++
88+11:6 name second
89+11:13 glyph |=
90+11:16 name y
91+11:17 tight glyph =
92+11:18 tight tvar A
93+11:20 glyph (
94+11:21 tight name first
95+11:27 name y
96+11:28 tight glyph )
97+12:3 NEWLINE
98+12:3 glyph ~&
99+12:6 glyph ^-
100+12:9 tvar A
101+12:11 name input
102+13:5 INDENT
103+13:5 glyph (
104+13:6 tight name first
105+13:12 name input
106+13:17 tight glyph )
107+14:1 DEDENT
108+14:1 DEDENT
109+14:1 NEWLINE
110+14:1 glyph ++
111+14:4 name captured
112+14:13 glyph |=
113+14:16 name input
114+15:3 INDENT
115+15:3 glyph ++
116+15:6 name first
117+15:12 glyph |=
118+15:15 name x
119+16:5 INDENT
120+16:5 glyph ~&
121+16:8 glyph ^-
122+16:11 aura @t
123+16:14 name input
124+17:7 INDENT
125+17:7 glyph (
126+17:8 tight name second
127+17:15 name x
128+17:16 tight glyph )
129+18:3 DEDENT
130+18:3 DEDENT
131+18:3 NEWLINE
132+18:3 glyph ++
133+18:6 name second
134+18:13 glyph |=
135+18:16 name y
136+18:18 glyph (
137+18:19 tight name first
138+18:25 name y
139+18:26 tight glyph )
140+19:3 NEWLINE
141+19:3 name input
142+20:1 DEDENT
143+20:1 NEWLINE
144+20:1 glyph ++
145+20:4 name alias-mono
146+20:15 glyph |=
147+20:18 name input
148+20:23 tight glyph =
149+20:24 tight aura @t
150+21:3 INDENT
151+21:3 glyph ++
152+21:6 name first
153+21:12 glyph |=
154+21:15 name x
155+22:5 INDENT
156+22:5 glyph ++
157+22:8 name alias
158+22:14 name second
159+23:5 NEWLINE
160+23:5 glyph ~&
161+23:8 glyph (
162+23:9 tight name alias
163+23:15 name x
164+23:16 tight glyph )
165+24:7 INDENT
166+24:7 glyph (
167+24:8 tight name alias
168+24:14 lit ~zod
169+24:18 tight glyph )
170+25:3 DEDENT
171+25:3 DEDENT
172+25:3 NEWLINE
173+25:3 glyph ++
174+25:6 name second
175+25:13 glyph |=
176+25:16 name y
177+25:18 glyph (
178+25:19 tight name first
179+25:25 name y
180+25:26 tight glyph )
181+26:3 NEWLINE
182+26:3 glyph (
183+26:4 tight name first
184+26:10 name input
185+26:15 tight glyph )
186+27:1 DEDENT
187+27:1 NEWLINE
188+27:1 glyph ++
189+27:4 name chain
190+27:10 glyph |=
191+27:13 name input
192+27:18 tight glyph =
193+27:19 tight aura @t
194+28:3 INDENT
195+28:3 glyph ++
196+28:6 name top
197+28:10 glyph |=
198+28:13 name x
199+28:15 glyph (
200+28:16 tight name one
201+28:20 name x
202+28:21 tight glyph )
203+29:3 NEWLINE
204+29:3 glyph ++
205+29:6 name one
206+29:10 glyph |=
207+29:13 name x
208+29:15 glyph (
209+29:16 tight name two
210+29:20 name x
211+29:21 tight glyph )
212+30:3 NEWLINE
213+30:3 glyph ++
214+30:6 name two
215+30:10 glyph |=
216+30:13 name x
217+30:15 glyph (
218+30:16 tight name one
219+30:20 name x
220+30:21 tight glyph )
221+31:3 NEWLINE
222+31:3 glyph (
223+31:4 tight name top
224+31:8 name input
225+31:13 tight glyph )
226+32:1 DEDENT
227+32:1 NEWLINE
228+32:1 glyph ++
229+32:4 name nested-capture
230+32:19 glyph |=
231+32:22 name input
232+32:27 tight glyph =
233+32:28 tight aura @t
234+33:3 INDENT
235+33:3 glyph ++
236+33:6 name outer-one
237+33:16 glyph |=
238+33:19 name x
239+34:5 INDENT
240+34:5 glyph ++
241+34:8 name inner-one
242+34:18 glyph |=
243+34:21 name y
244+34:23 glyph (
245+34:24 tight name inner-two
246+34:34 name y
247+34:35 tight glyph )
248+35:5 NEWLINE
249+35:5 glyph ++
250+35:8 name inner-two
251+35:18 glyph |=
252+35:21 name y
253+36:7 INDENT
254+36:7 glyph ~&
255+36:10 name input
256+37:9 INDENT
257+37:9 glyph (
258+37:10 tight name inner-one
259+37:20 name y
260+37:21 tight glyph )
261+38:5 DEDENT
262+38:5 DEDENT
263+38:5 NEWLINE
264+38:5 glyph (
265+38:6 tight name outer-two
266+38:16 glyph (
267+38:17 tight name inner-one
268+38:27 name x
269+38:28 tight glyph )
270+38:29 tight glyph )
271+39:3 DEDENT
272+39:3 NEWLINE
273+39:3 glyph ++
274+39:6 name outer-two
275+39:16 glyph |=
276+39:19 name z
277+39:21 glyph (
278+39:22 tight name outer-one
279+39:32 name z
280+39:33 tight glyph )
281+40:3 NEWLINE
282+40:3 glyph (
283+40:4 tight name outer-one
284+40:14 name input
285+40:19 tight glyph )
286+41:1 DEDENT
287+41:1 NEWLINE
288+41:1 glyph ++
289+41:4 name unresolved
290+41:15 glyph |=
291+41:18 name input
292+41:23 tight glyph =
293+41:24 tight aura @t
294+42:3 INDENT
295+42:3 glyph ++
296+42:6 name first
297+42:12 glyph |=
298+42:15 name x
299+43:5 INDENT
300+43:5 glyph ~&
301+43:8 lit %pending
302+44:7 INDENT
303+44:7 glyph (
304+44:8 tight name second
305+44:15 name x
306+44:16 tight glyph )
307+45:3 DEDENT
308+45:3 DEDENT
309+45:3 NEWLINE
310+45:3 glyph ++
311+45:6 name second
312+45:13 glyph |=
313+45:16 name x
314+45:18 glyph (
315+45:19 tight name first
316+45:25 name x
317+45:26 tight glyph )
318+46:3 NEWLINE
319+46:3 glyph (
320+46:4 tight name first
321+46:10 name input
322+46:15 tight glyph )
323+47:1 DEDENT
324+47:1 NEWLINE
325+47:1 glyph ++
326+47:4 name forced-captures
327+47:20 glyph |=
328+47:23 glyph [
329+47:24 tight name a
330+47:25 tight glyph =
331+47:26 tight tvar A
332+47:28 name b
333+47:29 tight glyph =
334+47:30 tight tvar B
335+47:31 tight glyph ]
336+48:3 INDENT
337+48:3 glyph ++
338+48:6 name first
339+48:12 glyph |=
340+48:15 name x
341+48:16 tight glyph =
342+48:17 tight tvar A
343+48:19 glyph (
344+48:20 tight name second
345+48:27 name x
346+48:28 tight glyph )
347+49:3 NEWLINE
348+49:3 glyph ++
349+49:6 name second
350+49:13 glyph |=
351+49:16 name y
352+49:17 tight glyph =
353+49:18 tight tvar B
354+49:20 glyph (
355+49:21 tight name first
356+49:27 name y
357+49:28 tight glyph )
358+50:3 NEWLINE
359+50:3 glyph (
360+50:4 tight name first
361+50:10 name a
362+50:11 tight glyph )
363+51:1 DEDENT
364+51:1 NEWLINE
365+51:1 glyph ++
366+51:4 name same-capture
367+51:17 glyph |=
368+51:20 glyph [
369+51:21 tight name a
370+51:22 tight glyph =
371+51:23 tight tvar A
372+51:25 name b
373+51:26 tight glyph =
374+51:27 tight tvar A
375+51:28 tight glyph ]
376+52:3 INDENT
377+52:3 glyph ++
378+52:6 name first
379+52:12 glyph |=
380+52:15 name x
381+52:16 tight glyph =
382+52:17 tight tvar A
383+52:19 glyph (
384+52:20 tight name second
385+52:27 name x
386+52:28 tight glyph )
387+53:3 NEWLINE
388+53:3 glyph ++
389+53:6 name second
390+53:13 glyph |=
391+53:16 name y
392+53:17 tight glyph =
393+53:18 tight tvar A
394+53:20 glyph (
395+53:21 tight name first
396+53:27 name y
397+53:28 tight glyph )
398+54:3 NEWLINE
399+54:3 glyph (
400+54:4 tight name first
401+54:10 name a
402+54:11 tight glyph )
403+54:12 DEDENT
404+54:12 NEWLINE
tests/golden/types-local-scc-adversarial/tree.txtnew file+204
@@ -0,0 +1,204 @@
1+(module
2+ (value 1:1 siblings
3+ (gate 1:13
4+ (face 1:16 input (aura 1:22 @t))
5+ (body 2:3
6+ (value 2:3 first
7+ (gate 2:12
8+ (face 2:15 x (tvar 2:17 A))
9+ (group 2:19
10+ (call 2:20 (wing 2:20 second) (wing 2:27 x)))))
11+ (value 3:3 second
12+ (gate 3:13
13+ (face 3:16 x (tvar 3:18 A))
14+ (group 3:20
15+ (call 3:21 (wing 3:21 first) (wing 3:27 x)))))
16+ (group 4:3
17+ (call 4:4 (wing 4:4 first) (wing 4:10 input))))))
18+ (value 5:1 introduced
19+ (gate 5:15
20+ (face 5:18 input (aura 5:24 @t))
21+ (body 6:3
22+ (value 6:3 first
23+ (gate 6:12
24+ (face 6:15 x (tvar 6:17 A))
25+ (group 6:19
26+ (call 6:20 (wing 6:20 second) (wing 6:27 x)))))
27+ (value 7:3 second
28+ (gate 7:13
29+ (face 7:16 x (tvar 7:18 B))
30+ (group 7:20
31+ (call 7:21 (wing 7:21 first) (wing 7:27 x)))))
32+ (group 8:3
33+ (call 8:4 (wing 8:4 first) (wing 8:10 input))))))
34+ (value 9:1 outer-later
35+ (gate 9:16
36+ (bind 9:19 input)
37+ (body 10:3
38+ (value 10:3 first
39+ (gate 10:12
40+ (face 10:15 x (tvar 10:17 A))
41+ (group 10:19
42+ (call 10:20 (wing 10:20 second) (wing 10:27 x)))))
43+ (value 11:3 second
44+ (gate 11:13
45+ (face 11:16 y (tvar 11:18 A))
46+ (group 11:20
47+ (call 11:21 (wing 11:21 first) (wing 11:27 y)))))
48+ (trace 12:3
49+ (cast 12:6 (tvar 12:9 A) (wing 12:11 input))
50+ (body 13:5
51+ (group 13:5
52+ (call 13:6 (wing 13:6 first) (wing 13:12 input))))))))
53+ (value 14:1 captured
54+ (gate 14:13
55+ (bind 14:16 input)
56+ (body 15:3
57+ (value 15:3 first
58+ (gate 15:12
59+ (bind 15:15 x)
60+ (body 16:5
61+ (trace 16:5
62+ (cast 16:8 (aura 16:11 @t) (wing 16:14 input))
63+ (body 17:7
64+ (group 17:7
65+ (call 17:8 (wing 17:8 second) (wing 17:15 x))))))))
66+ (value 18:3 second
67+ (gate 18:13
68+ (bind 18:16 y)
69+ (group 18:18
70+ (call 18:19 (wing 18:19 first) (wing 18:25 y)))))
71+ (wing 19:3 input))))
72+ (value 20:1 alias-mono
73+ (gate 20:15
74+ (face 20:18 input (aura 20:24 @t))
75+ (body 21:3
76+ (value 21:3 first
77+ (gate 21:12
78+ (bind 21:15 x)
79+ (body 22:5
80+ (value 22:5 alias (wing 22:14 second))
81+ (trace 23:5
82+ (group 23:8
83+ (call 23:9 (wing 23:9 alias) (wing 23:15 x)))
84+ (body 24:7
85+ (group 24:7
86+ (call 24:8 (wing 24:8 alias) (lit 24:14 ~zod))))))))
87+ (value 25:3 second
88+ (gate 25:13
89+ (bind 25:16 y)
90+ (group 25:18
91+ (call 25:19 (wing 25:19 first) (wing 25:25 y)))))
92+ (group 26:3
93+ (call 26:4 (wing 26:4 first) (wing 26:10 input))))))
94+ (value 27:1 chain
95+ (gate 27:10
96+ (face 27:13 input (aura 27:19 @t))
97+ (body 28:3
98+ (value 28:3 top
99+ (gate 28:10
100+ (bind 28:13 x)
101+ (group 28:15
102+ (call 28:16 (wing 28:16 one) (wing 28:20 x)))))
103+ (value 29:3 one
104+ (gate 29:10
105+ (bind 29:13 x)
106+ (group 29:15
107+ (call 29:16 (wing 29:16 two) (wing 29:20 x)))))
108+ (value 30:3 two
109+ (gate 30:10
110+ (bind 30:13 x)
111+ (group 30:15
112+ (call 30:16 (wing 30:16 one) (wing 30:20 x)))))
113+ (group 31:3
114+ (call 31:4 (wing 31:4 top) (wing 31:8 input))))))
115+ (value 32:1 nested-capture
116+ (gate 32:19
117+ (face 32:22 input (aura 32:28 @t))
118+ (body 33:3
119+ (value 33:3 outer-one
120+ (gate 33:16
121+ (bind 33:19 x)
122+ (body 34:5
123+ (value 34:5 inner-one
124+ (gate 34:18
125+ (bind 34:21 y)
126+ (group 34:23
127+ (call 34:24 (wing 34:24 inner-two) (wing 34:34 y)))))
128+ (value 35:5 inner-two
129+ (gate 35:18
130+ (bind 35:21 y)
131+ (body 36:7
132+ (trace 36:7
133+ (wing 36:10 input)
134+ (body 37:9
135+ (group 37:9
136+ (call 37:10 (wing 37:10 inner-one) (wing 37:20 y))))))))
137+ (group 38:5
138+ (call 38:6
139+ (wing 38:6 outer-two)
140+ (group 38:16
141+ (call 38:17 (wing 38:17 inner-one) (wing 38:27 x))))))))
142+ (value 39:3 outer-two
143+ (gate 39:16
144+ (bind 39:19 z)
145+ (group 39:21
146+ (call 39:22 (wing 39:22 outer-one) (wing 39:32 z)))))
147+ (group 40:3
148+ (call 40:4 (wing 40:4 outer-one) (wing 40:14 input))))))
149+ (value 41:1 unresolved
150+ (gate 41:15
151+ (face 41:18 input (aura 41:24 @t))
152+ (body 42:3
153+ (value 42:3 first
154+ (gate 42:12
155+ (bind 42:15 x)
156+ (body 43:5
157+ (trace 43:5
158+ (lit 43:8 %pending)
159+ (body 44:7
160+ (group 44:7
161+ (call 44:8 (wing 44:8 second) (wing 44:15 x))))))))
162+ (value 45:3 second
163+ (gate 45:13
164+ (bind 45:16 x)
165+ (group 45:18
166+ (call 45:19 (wing 45:19 first) (wing 45:25 x)))))
167+ (group 46:3
168+ (call 46:4 (wing 46:4 first) (wing 46:10 input))))))
169+ (value 47:1 forced-captures
170+ (gate 47:20
171+ (cell 47:23
172+ (face 47:24 a (tvar 47:26 A))
173+ (face 47:28 b (tvar 47:30 B)))
174+ (body 48:3
175+ (value 48:3 first
176+ (gate 48:12
177+ (face 48:15 x (tvar 48:17 A))
178+ (group 48:19
179+ (call 48:20 (wing 48:20 second) (wing 48:27 x)))))
180+ (value 49:3 second
181+ (gate 49:13
182+ (face 49:16 y (tvar 49:18 B))
183+ (group 49:20
184+ (call 49:21 (wing 49:21 first) (wing 49:27 y)))))
185+ (group 50:3
186+ (call 50:4 (wing 50:4 first) (wing 50:10 a))))))
187+ (value 51:1 same-capture
188+ (gate 51:17
189+ (cell 51:20
190+ (face 51:21 a (tvar 51:23 A))
191+ (face 51:25 b (tvar 51:27 A)))
192+ (body 52:3
193+ (value 52:3 first
194+ (gate 52:12
195+ (face 52:15 x (tvar 52:17 A))
196+ (group 52:19
197+ (call 52:20 (wing 52:20 second) (wing 52:27 x)))))
198+ (value 53:3 second
199+ (gate 53:13
200+ (face 53:16 y (tvar 53:18 A))
201+ (group 53:20
202+ (call 53:21 (wing 53:21 first) (wing 53:27 y)))))
203+ (group 54:3
204+ (call 54:4 (wing 54:4 first) (wing 54:10 a)))))))
tests/golden/types-local-scc-adversarial/types.txtnew file+17
@@ -0,0 +1,17 @@
1+partial inference; module not checked
2+++ siblings: $-(@t A)
3+++ introduced: $-(@t A)
4+++ outer-later: $-(A B)
5+++ captured: $-(@t @t)
6+++ alias-mono: call's sample and argument types do not unify
7+/tests/golden/types-local-scc-adversarial/source.jibb:26:4: called gate has type $-(@p A)
8+ (first input)
9+ ^
10+/tests/golden/types-local-scc-adversarial/source.jibb:26:10: argument has type @t
11+ (first input)
12+ ^
13+++ chain: $-(@t A)
14+++ nested-capture: $-(@t A)
15+++ unresolved: local definitions need unsupported inference
16+++ forced-captures: local definitions need unsupported inference
17+++ same-capture: $-([a=A b=A] B)
tests/golden/types-local-scc/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Modules: gates may call their siblings; other values cannot depend on themselves, even through a gate. Type variables are generalized per definition, with enclosing captures shared.
2+tests: Local mutually recursive gates share monomorphic seeds while checking and generalize after the complete group. Includes independent instantiations, captured variables, nested groups and a local mold. Shadowing, mixed gate/value cycles, unresolved tags and forcing distinct captured capitals remain unavailable to partial inference.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-local-scc/modules.txtnew file+1
@@ -0,0 +1 @@
1+# Use the prepared prelude.
tests/golden/types-local-scc/source.jibbnew file+58
@@ -0,0 +1,58 @@
1+++ simple |= x=@t
2+ ++ left |= y=@t (right y)
3+ ++ right |= y=@t (left y)
4+ (left x)
5+++ polymorphic |= x=@t
6+ ++ left |= y (right y)
7+ ++ right |= y (left y)
8+ ~& (left x)
9+ (right ~zod)
10+++ capture |= x=A
11+ ++ left |= y (right y)
12+ ++ right |= y
13+ ~& x
14+ (left y)
15+ (left x)
16+++ bad-shadow |= x=@t
17+ ++ left |= right=@t right
18+ ++ right |= y=@t (left y)
19+ (left x)
20+++ bad-value |= x=@t
21+ ++ left |= y=@t (right y)
22+ ++ right left
23+ (left x)
24+++ pending |= x=@t
25+ ++ left |= y=@t
26+ ~& %unresolved
27+ (right y)
28+ ++ right |= y=@t (left y)
29+ (left x)
30+++ atom-capture |= x
31+ ++ first |= y
32+ ~& ^- @ x
33+ (second y)
34+ ++ second |= z (first z)
35+ ~& (first x)
36+ ^- @t x
37+++ linked |= x
38+ ++ first |= y (second y)
39+ ++ second |= z
40+ ~& ^- @t x
41+ (first z)
42+ x
43+++ distinct |= x=A
44+ ++ first |= y=B (second y)
45+ ++ second |= z=A (first z)
46+ (first x)
47+++ local-mold |= x=@t
48+ +$ packet [a=@t b=@p]
49+ ++ first |= y=packet (second y)
50+ ++ second |= z=packet (first z)
51+ (first [x ~zod])
52+++ nested-groups |= x=@t
53+ ++ first |= y=@t
54+ ++ inner-a |= p=@t (inner-b p)
55+ ++ inner-b |= p=@t (inner-a p)
56+ (inner-a (second y))
57+ ++ second |= z=@t (first z)
58+ (first x)
tests/golden/types-local-scc/tokens.txtnew file+434
@@ -0,0 +1,434 @@
1+1:1 glyph ++
2+1:4 name simple
3+1:11 glyph |=
4+1:14 name x
5+1:15 tight glyph =
6+1:16 tight aura @t
7+2:3 INDENT
8+2:3 glyph ++
9+2:6 name left
10+2:11 glyph |=
11+2:14 name y
12+2:15 tight glyph =
13+2:16 tight aura @t
14+2:19 glyph (
15+2:20 tight name right
16+2:26 name y
17+2:27 tight glyph )
18+3:3 NEWLINE
19+3:3 glyph ++
20+3:6 name right
21+3:12 glyph |=
22+3:15 name y
23+3:16 tight glyph =
24+3:17 tight aura @t
25+3:20 glyph (
26+3:21 tight name left
27+3:26 name y
28+3:27 tight glyph )
29+4:3 NEWLINE
30+4:3 glyph (
31+4:4 tight name left
32+4:9 name x
33+4:10 tight glyph )
34+5:1 DEDENT
35+5:1 NEWLINE
36+5:1 glyph ++
37+5:4 name polymorphic
38+5:16 glyph |=
39+5:19 name x
40+5:20 tight glyph =
41+5:21 tight aura @t
42+6:3 INDENT
43+6:3 glyph ++
44+6:6 name left
45+6:11 glyph |=
46+6:14 name y
47+6:16 glyph (
48+6:17 tight name right
49+6:23 name y
50+6:24 tight glyph )
51+7:3 NEWLINE
52+7:3 glyph ++
53+7:6 name right
54+7:12 glyph |=
55+7:15 name y
56+7:17 glyph (
57+7:18 tight name left
58+7:23 name y
59+7:24 tight glyph )
60+8:3 NEWLINE
61+8:3 glyph ~&
62+8:6 glyph (
63+8:7 tight name left
64+8:12 name x
65+8:13 tight glyph )
66+9:5 INDENT
67+9:5 glyph (
68+9:6 tight name right
69+9:12 lit ~zod
70+9:16 tight glyph )
71+10:1 DEDENT
72+10:1 DEDENT
73+10:1 NEWLINE
74+10:1 glyph ++
75+10:4 name capture
76+10:12 glyph |=
77+10:15 name x
78+10:16 tight glyph =
79+10:17 tight tvar A
80+11:3 INDENT
81+11:3 glyph ++
82+11:6 name left
83+11:11 glyph |=
84+11:14 name y
85+11:16 glyph (
86+11:17 tight name right
87+11:23 name y
88+11:24 tight glyph )
89+12:3 NEWLINE
90+12:3 glyph ++
91+12:6 name right
92+12:12 glyph |=
93+12:15 name y
94+13:5 INDENT
95+13:5 glyph ~&
96+13:8 name x
97+14:7 INDENT
98+14:7 glyph (
99+14:8 tight name left
100+14:13 name y
101+14:14 tight glyph )
102+15:3 DEDENT
103+15:3 DEDENT
104+15:3 NEWLINE
105+15:3 glyph (
106+15:4 tight name left
107+15:9 name x
108+15:10 tight glyph )
109+16:1 DEDENT
110+16:1 NEWLINE
111+16:1 glyph ++
112+16:4 name bad-shadow
113+16:15 glyph |=
114+16:18 name x
115+16:19 tight glyph =
116+16:20 tight aura @t
117+17:3 INDENT
118+17:3 glyph ++
119+17:6 name left
120+17:11 glyph |=
121+17:14 name right
122+17:19 tight glyph =
123+17:20 tight aura @t
124+17:23 name right
125+18:3 NEWLINE
126+18:3 glyph ++
127+18:6 name right
128+18:12 glyph |=
129+18:15 name y
130+18:16 tight glyph =
131+18:17 tight aura @t
132+18:20 glyph (
133+18:21 tight name left
134+18:26 name y
135+18:27 tight glyph )
136+19:3 NEWLINE
137+19:3 glyph (
138+19:4 tight name left
139+19:9 name x
140+19:10 tight glyph )
141+20:1 DEDENT
142+20:1 NEWLINE
143+20:1 glyph ++
144+20:4 name bad-value
145+20:14 glyph |=
146+20:17 name x
147+20:18 tight glyph =
148+20:19 tight aura @t
149+21:3 INDENT
150+21:3 glyph ++
151+21:6 name left
152+21:11 glyph |=
153+21:14 name y
154+21:15 tight glyph =
155+21:16 tight aura @t
156+21:19 glyph (
157+21:20 tight name right
158+21:26 name y
159+21:27 tight glyph )
160+22:3 NEWLINE
161+22:3 glyph ++
162+22:6 name right
163+22:12 name left
164+23:3 NEWLINE
165+23:3 glyph (
166+23:4 tight name left
167+23:9 name x
168+23:10 tight glyph )
169+24:1 DEDENT
170+24:1 NEWLINE
171+24:1 glyph ++
172+24:4 name pending
173+24:12 glyph |=
174+24:15 name x
175+24:16 tight glyph =
176+24:17 tight aura @t
177+25:3 INDENT
178+25:3 glyph ++
179+25:6 name left
180+25:11 glyph |=
181+25:14 name y
182+25:15 tight glyph =
183+25:16 tight aura @t
184+26:5 INDENT
185+26:5 glyph ~&
186+26:8 lit %unresolved
187+27:7 INDENT
188+27:7 glyph (
189+27:8 tight name right
190+27:14 name y
191+27:15 tight glyph )
192+28:3 DEDENT
193+28:3 DEDENT
194+28:3 NEWLINE
195+28:3 glyph ++
196+28:6 name right
197+28:12 glyph |=
198+28:15 name y
199+28:16 tight glyph =
200+28:17 tight aura @t
201+28:20 glyph (
202+28:21 tight name left
203+28:26 name y
204+28:27 tight glyph )
205+29:3 NEWLINE
206+29:3 glyph (
207+29:4 tight name left
208+29:9 name x
209+29:10 tight glyph )
210+30:1 DEDENT
211+30:1 NEWLINE
212+30:1 glyph ++
213+30:4 name atom-capture
214+30:17 glyph |=
215+30:20 name x
216+31:3 INDENT
217+31:3 glyph ++
218+31:6 name first
219+31:12 glyph |=
220+31:15 name y
221+32:5 INDENT
222+32:5 glyph ~&
223+32:8 glyph ^-
224+32:11 aura @
225+32:13 name x
226+33:7 INDENT
227+33:7 glyph (
228+33:8 tight name second
229+33:15 name y
230+33:16 tight glyph )
231+34:3 DEDENT
232+34:3 DEDENT
233+34:3 NEWLINE
234+34:3 glyph ++
235+34:6 name second
236+34:13 glyph |=
237+34:16 name z
238+34:18 glyph (
239+34:19 tight name first
240+34:25 name z
241+34:26 tight glyph )
242+35:3 NEWLINE
243+35:3 glyph ~&
244+35:6 glyph (
245+35:7 tight name first
246+35:13 name x
247+35:14 tight glyph )
248+36:5 INDENT
249+36:5 glyph ^-
250+36:8 aura @t
251+36:11 name x
252+37:1 DEDENT
253+37:1 DEDENT
254+37:1 NEWLINE
255+37:1 glyph ++
256+37:4 name linked
257+37:11 glyph |=
258+37:14 name x
259+38:3 INDENT
260+38:3 glyph ++
261+38:6 name first
262+38:12 glyph |=
263+38:15 name y
264+38:17 glyph (
265+38:18 tight name second
266+38:25 name y
267+38:26 tight glyph )
268+39:3 NEWLINE
269+39:3 glyph ++
270+39:6 name second
271+39:13 glyph |=
272+39:16 name z
273+40:5 INDENT
274+40:5 glyph ~&
275+40:8 glyph ^-
276+40:11 aura @t
277+40:14 name x
278+41:7 INDENT
279+41:7 glyph (
280+41:8 tight name first
281+41:14 name z
282+41:15 tight glyph )
283+42:3 DEDENT
284+42:3 DEDENT
285+42:3 NEWLINE
286+42:3 name x
287+43:1 DEDENT
288+43:1 NEWLINE
289+43:1 glyph ++
290+43:4 name distinct
291+43:13 glyph |=
292+43:16 name x
293+43:17 tight glyph =
294+43:18 tight tvar A
295+44:3 INDENT
296+44:3 glyph ++
297+44:6 name first
298+44:12 glyph |=
299+44:15 name y
300+44:16 tight glyph =
301+44:17 tight tvar B
302+44:19 glyph (
303+44:20 tight name second
304+44:27 name y
305+44:28 tight glyph )
306+45:3 NEWLINE
307+45:3 glyph ++
308+45:6 name second
309+45:13 glyph |=
310+45:16 name z
311+45:17 tight glyph =
312+45:18 tight tvar A
313+45:20 glyph (
314+45:21 tight name first
315+45:27 name z
316+45:28 tight glyph )
317+46:3 NEWLINE
318+46:3 glyph (
319+46:4 tight name first
320+46:10 name x
321+46:11 tight glyph )
322+47:1 DEDENT
323+47:1 NEWLINE
324+47:1 glyph ++
325+47:4 name local-mold
326+47:15 glyph |=
327+47:18 name x
328+47:19 tight glyph =
329+47:20 tight aura @t
330+48:3 INDENT
331+48:3 glyph +$
332+48:6 name packet
333+48:13 glyph [
334+48:14 tight name a
335+48:15 tight glyph =
336+48:16 tight aura @t
337+48:19 name b
338+48:20 tight glyph =
339+48:21 tight aura @p
340+48:23 tight glyph ]
341+49:3 NEWLINE
342+49:3 glyph ++
343+49:6 name first
344+49:12 glyph |=
345+49:15 name y
346+49:16 tight glyph =
347+49:17 tight name packet
348+49:24 glyph (
349+49:25 tight name second
350+49:32 name y
351+49:33 tight glyph )
352+50:3 NEWLINE
353+50:3 glyph ++
354+50:6 name second
355+50:13 glyph |=
356+50:16 name z
357+50:17 tight glyph =
358+50:18 tight name packet
359+50:25 glyph (
360+50:26 tight name first
361+50:32 name z
362+50:33 tight glyph )
363+51:3 NEWLINE
364+51:3 glyph (
365+51:4 tight name first
366+51:10 glyph [
367+51:11 tight name x
368+51:13 lit ~zod
369+51:17 tight glyph ]
370+51:18 tight glyph )
371+52:1 DEDENT
372+52:1 NEWLINE
373+52:1 glyph ++
374+52:4 name nested-groups
375+52:18 glyph |=
376+52:21 name x
377+52:22 tight glyph =
378+52:23 tight aura @t
379+53:3 INDENT
380+53:3 glyph ++
381+53:6 name first
382+53:12 glyph |=
383+53:15 name y
384+53:16 tight glyph =
385+53:17 tight aura @t
386+54:5 INDENT
387+54:5 glyph ++
388+54:8 name inner-a
389+54:16 glyph |=
390+54:19 name p
391+54:20 tight glyph =
392+54:21 tight aura @t
393+54:24 glyph (
394+54:25 tight name inner-b
395+54:33 name p
396+54:34 tight glyph )
397+55:5 NEWLINE
398+55:5 glyph ++
399+55:8 name inner-b
400+55:16 glyph |=
401+55:19 name p
402+55:20 tight glyph =
403+55:21 tight aura @t
404+55:24 glyph (
405+55:25 tight name inner-a
406+55:33 name p
407+55:34 tight glyph )
408+56:5 NEWLINE
409+56:5 glyph (
410+56:6 tight name inner-a
411+56:14 glyph (
412+56:15 tight name second
413+56:22 name y
414+56:23 tight glyph )
415+56:24 tight glyph )
416+57:3 DEDENT
417+57:3 NEWLINE
418+57:3 glyph ++
419+57:6 name second
420+57:13 glyph |=
421+57:16 name z
422+57:17 tight glyph =
423+57:18 tight aura @t
424+57:21 glyph (
425+57:22 tight name first
426+57:28 name z
427+57:29 tight glyph )
428+58:3 NEWLINE
429+58:3 glyph (
430+58:4 tight name first
431+58:10 name x
432+58:11 tight glyph )
433+58:12 DEDENT
434+58:12 NEWLINE
tests/golden/types-local-scc/tree.txtnew file+214
@@ -0,0 +1,214 @@
1+(module
2+ (value 1:1 simple
3+ (gate 1:11
4+ (face 1:14 x (aura 1:16 @t))
5+ (body 2:3
6+ (value 2:3 left
7+ (gate 2:11
8+ (face 2:14 y (aura 2:16 @t))
9+ (group 2:19
10+ (call 2:20 (wing 2:20 right) (wing 2:26 y)))))
11+ (value 3:3 right
12+ (gate 3:12
13+ (face 3:15 y (aura 3:17 @t))
14+ (group 3:20
15+ (call 3:21 (wing 3:21 left) (wing 3:26 y)))))
16+ (group 4:3
17+ (call 4:4 (wing 4:4 left) (wing 4:9 x))))))
18+ (value 5:1 polymorphic
19+ (gate 5:16
20+ (face 5:19 x (aura 5:21 @t))
21+ (body 6:3
22+ (value 6:3 left
23+ (gate 6:11
24+ (bind 6:14 y)
25+ (group 6:16
26+ (call 6:17 (wing 6:17 right) (wing 6:23 y)))))
27+ (value 7:3 right
28+ (gate 7:12
29+ (bind 7:15 y)
30+ (group 7:17
31+ (call 7:18 (wing 7:18 left) (wing 7:23 y)))))
32+ (trace 8:3
33+ (group 8:6
34+ (call 8:7 (wing 8:7 left) (wing 8:12 x)))
35+ (body 9:5
36+ (group 9:5
37+ (call 9:6 (wing 9:6 right) (lit 9:12 ~zod))))))))
38+ (value 10:1 capture
39+ (gate 10:12
40+ (face 10:15 x (tvar 10:17 A))
41+ (body 11:3
42+ (value 11:3 left
43+ (gate 11:11
44+ (bind 11:14 y)
45+ (group 11:16
46+ (call 11:17 (wing 11:17 right) (wing 11:23 y)))))
47+ (value 12:3 right
48+ (gate 12:12
49+ (bind 12:15 y)
50+ (body 13:5
51+ (trace 13:5
52+ (wing 13:8 x)
53+ (body 14:7
54+ (group 14:7
55+ (call 14:8 (wing 14:8 left) (wing 14:13 y))))))))
56+ (group 15:3
57+ (call 15:4 (wing 15:4 left) (wing 15:9 x))))))
58+ (value 16:1 bad-shadow
59+ (gate 16:15
60+ (face 16:18 x (aura 16:20 @t))
61+ (body 17:3
62+ (value 17:3 left
63+ (gate 17:11
64+ (face 17:14 right (aura 17:20 @t))
65+ (wing 17:23 right)))
66+ (value 18:3 right
67+ (gate 18:12
68+ (face 18:15 y (aura 18:17 @t))
69+ (group 18:20
70+ (call 18:21 (wing 18:21 left) (wing 18:26 y)))))
71+ (group 19:3
72+ (call 19:4 (wing 19:4 left) (wing 19:9 x))))))
73+ (value 20:1 bad-value
74+ (gate 20:14
75+ (face 20:17 x (aura 20:19 @t))
76+ (body 21:3
77+ (value 21:3 left
78+ (gate 21:11
79+ (face 21:14 y (aura 21:16 @t))
80+ (group 21:19
81+ (call 21:20 (wing 21:20 right) (wing 21:26 y)))))
82+ (value 22:3 right (wing 22:12 left))
83+ (group 23:3
84+ (call 23:4 (wing 23:4 left) (wing 23:9 x))))))
85+ (value 24:1 pending
86+ (gate 24:12
87+ (face 24:15 x (aura 24:17 @t))
88+ (body 25:3
89+ (value 25:3 left
90+ (gate 25:11
91+ (face 25:14 y (aura 25:16 @t))
92+ (body 26:5
93+ (trace 26:5
94+ (lit 26:8 %unresolved)
95+ (body 27:7
96+ (group 27:7
97+ (call 27:8 (wing 27:8 right) (wing 27:14 y))))))))
98+ (value 28:3 right
99+ (gate 28:12
100+ (face 28:15 y (aura 28:17 @t))
101+ (group 28:20
102+ (call 28:21 (wing 28:21 left) (wing 28:26 y)))))
103+ (group 29:3
104+ (call 29:4 (wing 29:4 left) (wing 29:9 x))))))
105+ (value 30:1 atom-capture
106+ (gate 30:17
107+ (bind 30:20 x)
108+ (body 31:3
109+ (value 31:3 first
110+ (gate 31:12
111+ (bind 31:15 y)
112+ (body 32:5
113+ (trace 32:5
114+ (cast 32:8 (aura 32:11 @) (wing 32:13 x))
115+ (body 33:7
116+ (group 33:7
117+ (call 33:8 (wing 33:8 second) (wing 33:15 y))))))))
118+ (value 34:3 second
119+ (gate 34:13
120+ (bind 34:16 z)
121+ (group 34:18
122+ (call 34:19 (wing 34:19 first) (wing 34:25 z)))))
123+ (trace 35:3
124+ (group 35:6
125+ (call 35:7 (wing 35:7 first) (wing 35:13 x)))
126+ (body 36:5
127+ (cast 36:5 (aura 36:8 @t) (wing 36:11 x)))))))
128+ (value 37:1 linked
129+ (gate 37:11
130+ (bind 37:14 x)
131+ (body 38:3
132+ (value 38:3 first
133+ (gate 38:12
134+ (bind 38:15 y)
135+ (group 38:17
136+ (call 38:18 (wing 38:18 second) (wing 38:25 y)))))
137+ (value 39:3 second
138+ (gate 39:13
139+ (bind 39:16 z)
140+ (body 40:5
141+ (trace 40:5
142+ (cast 40:8 (aura 40:11 @t) (wing 40:14 x))
143+ (body 41:7
144+ (group 41:7
145+ (call 41:8 (wing 41:8 first) (wing 41:14 z))))))))
146+ (wing 42:3 x))))
147+ (value 43:1 distinct
148+ (gate 43:13
149+ (face 43:16 x (tvar 43:18 A))
150+ (body 44:3
151+ (value 44:3 first
152+ (gate 44:12
153+ (face 44:15 y (tvar 44:17 B))
154+ (group 44:19
155+ (call 44:20 (wing 44:20 second) (wing 44:27 y)))))
156+ (value 45:3 second
157+ (gate 45:13
158+ (face 45:16 z (tvar 45:18 A))
159+ (group 45:20
160+ (call 45:21 (wing 45:21 first) (wing 45:27 z)))))
161+ (group 46:3
162+ (call 46:4 (wing 46:4 first) (wing 46:10 x))))))
163+ (value 47:1 local-mold
164+ (gate 47:15
165+ (face 47:18 x (aura 47:20 @t))
166+ (body 48:3
167+ (mold 48:3 packet
168+ (cell 48:13
169+ (face 48:14 a (aura 48:16 @t))
170+ (face 48:19 b (aura 48:21 @p))))
171+ (value 49:3 first
172+ (gate 49:12
173+ (face 49:15 y (ref 49:17 packet))
174+ (group 49:24
175+ (call 49:25 (wing 49:25 second) (wing 49:32 y)))))
176+ (value 50:3 second
177+ (gate 50:13
178+ (face 50:16 z (ref 50:18 packet))
179+ (group 50:25
180+ (call 50:26 (wing 50:26 first) (wing 50:32 z)))))
181+ (group 51:3
182+ (call 51:4
183+ (wing 51:4 first)
184+ (tuple 51:10 (wing 51:11 x) (lit 51:13 ~zod)))))))
185+ (value 52:1 nested-groups
186+ (gate 52:18
187+ (face 52:21 x (aura 52:23 @t))
188+ (body 53:3
189+ (value 53:3 first
190+ (gate 53:12
191+ (face 53:15 y (aura 53:17 @t))
192+ (body 54:5
193+ (value 54:5 inner-a
194+ (gate 54:16
195+ (face 54:19 p (aura 54:21 @t))
196+ (group 54:24
197+ (call 54:25 (wing 54:25 inner-b) (wing 54:33 p)))))
198+ (value 55:5 inner-b
199+ (gate 55:16
200+ (face 55:19 p (aura 55:21 @t))
201+ (group 55:24
202+ (call 55:25 (wing 55:25 inner-a) (wing 55:33 p)))))
203+ (group 56:5
204+ (call 56:6
205+ (wing 56:6 inner-a)
206+ (group 56:14
207+ (call 56:15 (wing 56:15 second) (wing 56:22 y))))))))
208+ (value 57:3 second
209+ (gate 57:13
210+ (face 57:16 z (aura 57:18 @t))
211+ (group 57:21
212+ (call 57:22 (wing 57:22 first) (wing 57:28 z)))))
213+ (group 58:3
214+ (call 58:4 (wing 58:4 first) (wing 58:10 x)))))))
tests/golden/types-local-scc/types.txtnew file+12
@@ -0,0 +1,12 @@
1+partial inference; module not checked
2+++ simple: $-(@t A)
3+++ polymorphic: $-(@t A)
4+++ capture: $-(A B)
5+++ bad-shadow: local definitions need unsupported inference
6+++ bad-value: local definitions need unsupported inference
7+++ pending: local definitions need unsupported inference
8+++ atom-capture: $-(@t @t)
9+++ linked: $-(@t @t)
10+++ distinct: local definitions need unsupported inference
11+++ local-mold: $-(@t A)
12+++ nested-groups: $-(@t @t)
tests/golden/types-missing-tag-context/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Tag resolution: an unmatched literal is an error naming its union, such as "msg has no case %submitt".
2+tests: A definitely absent tag names the known union and both sites. Existing tags with incompatible shape retain the usual mismatch; unconstrained or discarded tags remain pending. Partial inference stays conservative for unproven shapes.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-missing-tag-context/modules.txtnew file+1
@@ -0,0 +1 @@
1+# Use prepared prelude.
tests/golden/types-missing-tag-context/source.jibbnew file+17
@@ -0,0 +1,17 @@
1++$ msg
2+ %go
3+ [%typed text=@t]
4+++ items ^- (list msg) ~[%go %missing]
5+++ existing ^- (list msg) ~[%typed]
6+++ arm |= x=? ^- msg
7+ ?- x
8+ %.y %go
9+ %.n %missing
10+++ existing-arm |= x=? ^- msg
11+ ?- x
12+ %.y %go
13+ %.n %typed
14+++ unrelated
15+ ~& %other
16+ ^- msg %go
17+++ unit ^- (unit msg) `%missing
tests/golden/types-missing-tag-context/tokens.txtnew file+98
@@ -0,0 +1,98 @@
1+1:1 glyph +$
2+1:4 name msg
3+2:3 INDENT
4+2:3 lit %go
5+3:3 NEWLINE
6+3:3 glyph [
7+3:4 tight lit %typed
8+3:11 name text
9+3:15 tight glyph =
10+3:16 tight aura @t
11+3:18 tight glyph ]
12+4:1 DEDENT
13+4:1 NEWLINE
14+4:1 glyph ++
15+4:4 name items
16+4:10 glyph ^-
17+4:13 glyph (
18+4:14 tight name list
19+4:19 name msg
20+4:22 tight glyph )
21+4:24 glyph ~[
22+4:26 tight lit %go
23+4:30 lit %missing
24+4:38 tight glyph ]
25+5:1 NEWLINE
26+5:1 glyph ++
27+5:4 name existing
28+5:13 glyph ^-
29+5:16 glyph (
30+5:17 tight name list
31+5:22 name msg
32+5:25 tight glyph )
33+5:27 glyph ~[
34+5:29 tight lit %typed
35+5:35 tight glyph ]
36+6:1 NEWLINE
37+6:1 glyph ++
38+6:4 name arm
39+6:8 glyph |=
40+6:11 name x
41+6:12 tight glyph =
42+6:13 tight glyph ?
43+6:15 glyph ^-
44+6:18 name msg
45+7:3 INDENT
46+7:3 glyph ?-
47+7:6 name x
48+8:5 INDENT
49+8:5 lit %.y
50+8:9 lit %go
51+9:5 NEWLINE
52+9:5 lit %.n
53+9:9 lit %missing
54+10:1 DEDENT
55+10:1 DEDENT
56+10:1 NEWLINE
57+10:1 glyph ++
58+10:4 name existing-arm
59+10:17 glyph |=
60+10:20 name x
61+10:21 tight glyph =
62+10:22 tight glyph ?
63+10:24 glyph ^-
64+10:27 name msg
65+11:3 INDENT
66+11:3 glyph ?-
67+11:6 name x
68+12:5 INDENT
69+12:5 lit %.y
70+12:9 lit %go
71+13:5 NEWLINE
72+13:5 lit %.n
73+13:9 lit %typed
74+14:1 DEDENT
75+14:1 DEDENT
76+14:1 NEWLINE
77+14:1 glyph ++
78+14:4 name unrelated
79+15:3 INDENT
80+15:3 glyph ~&
81+15:6 lit %other
82+16:5 INDENT
83+16:5 glyph ^-
84+16:8 name msg
85+16:12 lit %go
86+17:1 DEDENT
87+17:1 DEDENT
88+17:1 NEWLINE
89+17:1 glyph ++
90+17:4 name unit
91+17:9 glyph ^-
92+17:12 glyph (
93+17:13 tight name unit
94+17:18 name msg
95+17:21 tight glyph )
96+17:23 glyph `
97+17:24 tight lit %missing
98+17:32 NEWLINE
tests/golden/types-missing-tag-context/tree.txtnew file+45
@@ -0,0 +1,45 @@
1+(module
2+ (mold 1:1 msg
3+ (union 2:3
4+ (const 2:3 %go)
5+ (cell 3:3
6+ (const 3:4 %typed)
7+ (face 3:11 text (aura 3:16 @t)))))
8+ (value 4:1 items
9+ (cast 4:10
10+ (apply 4:13 list (ref 4:19 msg))
11+ (list 4:24 (lit 4:26 %go) (lit 4:30 %missing))))
12+ (value 5:1 existing
13+ (cast 5:13
14+ (apply 5:16 list (ref 5:22 msg))
15+ (list 5:27 (lit 5:29 %typed))))
16+ (value 6:1 arm
17+ (gate 6:8
18+ (face 6:11 x (flag 6:13))
19+ (cast 6:15
20+ (ref 6:18 msg)
21+ (body 7:3
22+ (branch 7:3
23+ (wing 7:6 x)
24+ (arm 8:5 (lit 8:5 %.y) (lit 8:9 %go))
25+ (arm 9:5 (lit 9:5 %.n) (lit 9:9 %missing)))))))
26+ (value 10:1 existing-arm
27+ (gate 10:17
28+ (face 10:20 x (flag 10:22))
29+ (cast 10:24
30+ (ref 10:27 msg)
31+ (body 11:3
32+ (branch 11:3
33+ (wing 11:6 x)
34+ (arm 12:5 (lit 12:5 %.y) (lit 12:9 %go))
35+ (arm 13:5 (lit 13:5 %.n) (lit 13:9 %typed)))))))
36+ (value 14:1 unrelated
37+ (body 15:3
38+ (trace 15:3
39+ (lit 15:6 %other)
40+ (body 16:5
41+ (cast 16:5 (ref 16:8 msg) (lit 16:12 %go))))))
42+ (value 17:1 unit
43+ (cast 17:9
44+ (apply 17:12 unit (ref 17:18 msg))
45+ (unit 17:23 (lit 17:24 %missing)))))
tests/golden/types-missing-tag-context/types.txtnew file+38
@@ -0,0 +1,38 @@
1+partial inference; module not checked
2++$ msg: cases proven disjoint; mold not checked
3+++ items: msg has no case `%missing`
4+/tests/golden/types-missing-tag-context/source.jibb:4:13: expected union
5+++ items ^- (list msg) ~[%go %missing]
6+ ^
7+/tests/golden/types-missing-tag-context/source.jibb:4:30: tag
8+++ items ^- (list msg) ~[%go %missing]
9+ ^
10+++ existing: list item does not fit its expected type
11+/tests/golden/types-missing-tag-context/source.jibb:5:16: expected item
12+++ existing ^- (list msg) ~[%typed]
13+ ^
14+/tests/golden/types-missing-tag-context/source.jibb:5:29: list item
15+++ existing ^- (list msg) ~[%typed]
16+ ^
17+++ arm: msg has no case `%missing`
18+/tests/golden/types-missing-tag-context/source.jibb:6:18: expected union
19+++ arm |= x=? ^- msg
20+ ^
21+/tests/golden/types-missing-tag-context/source.jibb:9:9: tag
22+ %.n %missing
23+ ^
24+++ existing-arm: branch arm does not fit its expected union
25+/tests/golden/types-missing-tag-context/source.jibb:10:27: expected union
26+++ existing-arm |= x=? ^- msg
27+ ^
28+/tests/golden/types-missing-tag-context/source.jibb:13:9: branch arm
29+ %.n %typed
30+ ^
31+++ unrelated: tag needs context in partial inference
32+++ unit: msg has no case `%missing`
33+/tests/golden/types-missing-tag-context/source.jibb:17:12: expected union
34+++ unit ^- (unit msg) `%missing
35+ ^
36+/tests/golden/types-missing-tag-context/source.jibb:17:24: tag
37+++ unit ^- (unit msg) `%missing
38+ ^
tests/golden/types-missing-tag-imported/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Tag resolution: an unmatched literal names the union; Overview, Importing Hoon types: Hoon unions can import without a Jibb name.
2+tests: A real imported Hoon union prints its cases in the missing-tag diagnostic, and a nested unnamed union retains its field context. Unsupported conversions remain partial.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-missing-tag-imported/imports.txtnew file+2
@@ -0,0 +1,2 @@
1+fixture choice
2+fixture nested-choice
tests/golden/types-missing-tag-imported/source.jibbnew file+6
@@ -0,0 +1,6 @@
1+/- fixture
2+++ good ^- choice.fixture %yes
3+++ bad ^- choice.fixture %other
4+++ nested |= x=nested-choice.fixture ^- @t text.x
5+++ get-status |= x=nested-choice.fixture status.x
6+++ via-field |= x=nested-choice.fixture ^- choice.fixture status.x
tests/golden/types-missing-tag-imported/sur/fixture.txtnew file+21
@@ -0,0 +1,21 @@
1+|%
2++$ title @t
3++$ pair [@ud @t]
4++$ faced [name=@t age=@ud]
5++$ nested [entry=faced number=@ud]
6++$ constant %yes
7++$ choice ?(%yes %no)
8++$ nested-choice [status=?(%approve %deny) text=@t]
9++$ collapsed $?([%x @ud] [%x @ud])
10++$ dollar %$
11++$ dollar-choice ?(%$ %yes)
12++$ texts (list @t)
13++$ numbers (list @ud)
14++$ maybe (unit @t)
15++$ tagged-list (list $?([%x @ud] [%y @t]))
16++$ buckets (map @ud @t)
17++$ collection-rec [items=(list @t) slots=(unit @ud)]
18++$ chain $@(~ [value=@ud next=chain])
19++$ other $@(~ [value=@ud next=other])
20++$ alias chain
21+--
tests/golden/types-missing-tag-imported/tokens.txtnew file+43
@@ -0,0 +1,43 @@
1+1:1 glyph /-
2+1:4 name fixture
3+2:1 NEWLINE
4+2:1 glyph ++
5+2:4 name good
6+2:9 glyph ^-
7+2:12 wing choice.fixture
8+2:27 lit %yes
9+3:1 NEWLINE
10+3:1 glyph ++
11+3:4 name bad
12+3:8 glyph ^-
13+3:11 wing choice.fixture
14+3:26 lit %other
15+4:1 NEWLINE
16+4:1 glyph ++
17+4:4 name nested
18+4:11 glyph |=
19+4:14 name x
20+4:15 tight glyph =
21+4:16 tight wing nested-choice.fixture
22+4:38 glyph ^-
23+4:41 aura @t
24+4:44 wing text.x
25+5:1 NEWLINE
26+5:1 glyph ++
27+5:4 name get-status
28+5:15 glyph |=
29+5:18 name x
30+5:19 tight glyph =
31+5:20 tight wing nested-choice.fixture
32+5:42 wing status.x
33+6:1 NEWLINE
34+6:1 glyph ++
35+6:4 name via-field
36+6:14 glyph |=
37+6:17 name x
38+6:18 tight glyph =
39+6:19 tight wing nested-choice.fixture
40+6:41 glyph ^-
41+6:44 wing choice.fixture
42+6:59 wing status.x
43+6:67 NEWLINE
tests/golden/types-missing-tag-imported/tree.txtnew file+18
@@ -0,0 +1,18 @@
1+(module
2+ (sur 1:1 fixture)
3+ (value 2:1 good
4+ (cast 2:9 (ref 2:12 choice.fixture) (lit 2:27 %yes)))
5+ (value 3:1 bad
6+ (cast 3:8 (ref 3:11 choice.fixture) (lit 3:26 %other)))
7+ (value 4:1 nested
8+ (gate 4:11
9+ (face 4:14 x (ref 4:16 nested-choice.fixture))
10+ (cast 4:38 (aura 4:41 @t) (wing 4:44 text.x))))
11+ (value 5:1 get-status
12+ (gate 5:15
13+ (face 5:18 x (ref 5:20 nested-choice.fixture))
14+ (wing 5:42 status.x)))
15+ (value 6:1 via-field
16+ (gate 6:14
17+ (face 6:17 x (ref 6:19 nested-choice.fixture))
18+ (cast 6:41 (ref 6:44 choice.fixture) (wing 6:59 status.x)))))
tests/golden/types-missing-tag-imported/types.txtnew file+12
@@ -0,0 +1,12 @@
1+partial inference; module not checked
2+++ good: %no %yes
3+++ bad: union %no %yes has no case `%other`
4+/tests/golden/types-missing-tag-imported/source.jibb:3:11: expected union
5+++ bad ^- choice.fixture %other
6+ ^
7+/tests/golden/types-missing-tag-imported/source.jibb:3:26: tag
8+++ bad ^- choice.fixture %other
9+ ^
10+++ nested: $-([status=(%deny %approve) text=@t] @t)
11+++ get-status: $-([status=(%deny %approve) text=@t] (%deny %approve))
12+++ via-field: cast constraint is not supported by partial inference
tests/golden/types-missing-tag-named/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Tag resolution: an unmatched literal is an error naming its union, such as "msg has no case %submitt".
2+tests: A definitely absent tag names the known union and both sites. Existing tags with incompatible shape retain the usual mismatch; unconstrained or discarded tags remain pending. Partial inference stays conservative for unproven shapes.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-missing-tag-named/modules.txtnew file+1
@@ -0,0 +1 @@
1+# Use prepared prelude.
tests/golden/types-missing-tag-named/source.jibbnew file+23
@@ -0,0 +1,23 @@
1++$ msg
2+ [%typed text=@t]
3+ %add
4++$ choice |$ [A]
5+ [%some value=A]
6+ %none
7++$ wrapped [%wrapper payload=msg]
8+++ good ^- msg %add
9+++ bad ^- msg %submitt
10+++ good-head ^- msg [%typed "ok"]
11+++ bad-head ^- msg [%other "ok"]
12+++ payload ^- msg [%typed ~zod]
13+++ tag-only ^- msg %typed
14+++ nested ^- wrapped [%wrapper %submitt]
15+++ generic ^- (choice @t) %missing
16+++ generic-payload ^- (choice @t) [%some ~zod]
17+++ take |= x=msg "ok"
18+++ call (take %submitt)
19+++ absent %submitt
20+++ discarded
21+ ~& %submitt
22+ ^- msg %add
23+++ generic-unknown |= x=A ^- A %submitt
tests/golden/types-missing-tag-named/tokens.txtnew file+155
@@ -0,0 +1,155 @@
1+1:1 glyph +$
2+1:4 name msg
3+2:3 INDENT
4+2:3 glyph [
5+2:4 tight lit %typed
6+2:11 name text
7+2:15 tight glyph =
8+2:16 tight aura @t
9+2:18 tight glyph ]
10+3:3 NEWLINE
11+3:3 lit %add
12+4:1 DEDENT
13+4:1 NEWLINE
14+4:1 glyph +$
15+4:4 name choice
16+4:11 glyph |$
17+4:14 glyph [
18+4:15 tight tvar A
19+4:16 tight glyph ]
20+5:3 INDENT
21+5:3 glyph [
22+5:4 tight lit %some
23+5:10 name value
24+5:15 tight glyph =
25+5:16 tight tvar A
26+5:17 tight glyph ]
27+6:3 NEWLINE
28+6:3 lit %none
29+7:1 DEDENT
30+7:1 NEWLINE
31+7:1 glyph +$
32+7:4 name wrapped
33+7:12 glyph [
34+7:13 tight lit %wrapper
35+7:22 name payload
36+7:29 tight glyph =
37+7:30 tight name msg
38+7:33 tight glyph ]
39+8:1 NEWLINE
40+8:1 glyph ++
41+8:4 name good
42+8:9 glyph ^-
43+8:12 name msg
44+8:16 lit %add
45+9:1 NEWLINE
46+9:1 glyph ++
47+9:4 name bad
48+9:8 glyph ^-
49+9:11 name msg
50+9:15 lit %submitt
51+10:1 NEWLINE
52+10:1 glyph ++
53+10:4 name good-head
54+10:14 glyph ^-
55+10:17 name msg
56+10:21 glyph [
57+10:22 tight lit %typed
58+10:29 str "ok"
59+10:33 tight glyph ]
60+11:1 NEWLINE
61+11:1 glyph ++
62+11:4 name bad-head
63+11:13 glyph ^-
64+11:16 name msg
65+11:20 glyph [
66+11:21 tight lit %other
67+11:28 str "ok"
68+11:32 tight glyph ]
69+12:1 NEWLINE
70+12:1 glyph ++
71+12:4 name payload
72+12:12 glyph ^-
73+12:15 name msg
74+12:19 glyph [
75+12:20 tight lit %typed
76+12:27 lit ~zod
77+12:31 tight glyph ]
78+13:1 NEWLINE
79+13:1 glyph ++
80+13:4 name tag-only
81+13:13 glyph ^-
82+13:16 name msg
83+13:20 lit %typed
84+14:1 NEWLINE
85+14:1 glyph ++
86+14:4 name nested
87+14:11 glyph ^-
88+14:14 name wrapped
89+14:22 glyph [
90+14:23 tight lit %wrapper
91+14:32 lit %submitt
92+14:40 tight glyph ]
93+15:1 NEWLINE
94+15:1 glyph ++
95+15:4 name generic
96+15:12 glyph ^-
97+15:15 glyph (
98+15:16 tight name choice
99+15:23 aura @t
100+15:25 tight glyph )
101+15:27 lit %missing
102+16:1 NEWLINE
103+16:1 glyph ++
104+16:4 name generic-payload
105+16:20 glyph ^-
106+16:23 glyph (
107+16:24 tight name choice
108+16:31 aura @t
109+16:33 tight glyph )
110+16:35 glyph [
111+16:36 tight lit %some
112+16:42 lit ~zod
113+16:46 tight glyph ]
114+17:1 NEWLINE
115+17:1 glyph ++
116+17:4 name take
117+17:9 glyph |=
118+17:12 name x
119+17:13 tight glyph =
120+17:14 tight name msg
121+17:18 str "ok"
122+18:1 NEWLINE
123+18:1 glyph ++
124+18:4 name call
125+18:9 glyph (
126+18:10 tight name take
127+18:15 lit %submitt
128+18:23 tight glyph )
129+19:1 NEWLINE
130+19:1 glyph ++
131+19:4 name absent
132+19:11 lit %submitt
133+20:1 NEWLINE
134+20:1 glyph ++
135+20:4 name discarded
136+21:3 INDENT
137+21:3 glyph ~&
138+21:6 lit %submitt
139+22:5 INDENT
140+22:5 glyph ^-
141+22:8 name msg
142+22:12 lit %add
143+23:1 DEDENT
144+23:1 DEDENT
145+23:1 NEWLINE
146+23:1 glyph ++
147+23:4 name generic-unknown
148+23:20 glyph |=
149+23:23 name x
150+23:24 tight glyph =
151+23:25 tight tvar A
152+23:27 glyph ^-
153+23:30 tvar A
154+23:32 lit %submitt
155+23:40 NEWLINE
tests/golden/types-missing-tag-named/tree.txtnew file+66
@@ -0,0 +1,66 @@
1+(module
2+ (mold 1:1 msg
3+ (union 2:3
4+ (cell 2:3
5+ (const 2:4 %typed)
6+ (face 2:11 text (aura 2:16 @t)))
7+ (const 3:3 %add)))
8+ (mold 4:1 choice
9+ (generic 4:11 A
10+ (union 5:3
11+ (cell 5:3
12+ (const 5:4 %some)
13+ (face 5:10 value (tvar 5:16 A)))
14+ (const 6:3 %none))))
15+ (mold 7:1 wrapped
16+ (cell 7:12
17+ (const 7:13 %wrapper)
18+ (face 7:22 payload (ref 7:30 msg))))
19+ (value 8:1 good
20+ (cast 8:9 (ref 8:12 msg) (lit 8:16 %add)))
21+ (value 9:1 bad
22+ (cast 9:8 (ref 9:11 msg) (lit 9:15 %submitt)))
23+ (value 10:1 good-head
24+ (cast 10:14
25+ (ref 10:17 msg)
26+ (tuple 10:21 (lit 10:22 %typed) (str 10:29 "ok"))))
27+ (value 11:1 bad-head
28+ (cast 11:13
29+ (ref 11:16 msg)
30+ (tuple 11:20 (lit 11:21 %other) (str 11:28 "ok"))))
31+ (value 12:1 payload
32+ (cast 12:12
33+ (ref 12:15 msg)
34+ (tuple 12:19 (lit 12:20 %typed) (lit 12:27 ~zod))))
35+ (value 13:1 tag-only
36+ (cast 13:13 (ref 13:16 msg) (lit 13:20 %typed)))
37+ (value 14:1 nested
38+ (cast 14:11
39+ (ref 14:14 wrapped)
40+ (tuple 14:22 (lit 14:23 %wrapper) (lit 14:32 %submitt))))
41+ (value 15:1 generic
42+ (cast 15:12
43+ (apply 15:15 choice (aura 15:23 @t))
44+ (lit 15:27 %missing)))
45+ (value 16:1 generic-payload
46+ (cast 16:20
47+ (apply 16:23 choice (aura 16:31 @t))
48+ (tuple 16:35 (lit 16:36 %some) (lit 16:42 ~zod))))
49+ (value 17:1 take
50+ (gate 17:9
51+ (face 17:12 x (ref 17:14 msg))
52+ (str 17:18 "ok")))
53+ (value 18:1 call
54+ (group 18:9
55+ (call 18:10 (wing 18:10 take) (lit 18:15 %submitt))))
56+ (value 19:1 absent (lit 19:11 %submitt))
57+ (value 20:1 discarded
58+ (body 21:3
59+ (trace 21:3
60+ (lit 21:6 %submitt)
61+ (body 22:5
62+ (cast 22:5 (ref 22:8 msg) (lit 22:12 %add))))))
63+ (value 23:1 generic-unknown
64+ (gate 23:20
65+ (face 23:23 x (tvar 23:25 A))
66+ (cast 23:27 (tvar 23:30 A) (lit 23:32 %submitt)))))
tests/golden/types-missing-tag-named/types.txtnew file+66
@@ -0,0 +1,66 @@
1+partial inference; module not checked
2++$ msg: cases proven disjoint; mold not checked
3++$ choice: cases proven disjoint; mold not checked
4++$ wrapped: not checked
5+++ good: msg
6+++ bad: msg has no case `%submitt`
7+/tests/golden/types-missing-tag-named/source.jibb:9:11: expected union
8+++ bad ^- msg %submitt
9+ ^
10+/tests/golden/types-missing-tag-named/source.jibb:9:15: tag
11+++ bad ^- msg %submitt
12+ ^
13+++ good-head: msg
14+++ bad-head: cast mold and expression type do not unify
15+/tests/golden/types-missing-tag-named/source.jibb:11:16: cast mold
16+++ bad-head ^- msg [%other "ok"]
17+ ^
18+/tests/golden/types-missing-tag-named/source.jibb:11:20: expression
19+++ bad-head ^- msg [%other "ok"]
20+ ^
21+++ payload: cast mold and expression type do not unify
22+/tests/golden/types-missing-tag-named/source.jibb:12:15: cast mold
23+++ payload ^- msg [%typed ~zod]
24+ ^
25+/tests/golden/types-missing-tag-named/source.jibb:12:19: expression
26+++ payload ^- msg [%typed ~zod]
27+ ^
28+++ tag-only: cast mold and expression type do not unify
29+/tests/golden/types-missing-tag-named/source.jibb:13:16: cast mold
30+++ tag-only ^- msg %typed
31+ ^
32+/tests/golden/types-missing-tag-named/source.jibb:13:20: expression
33+++ tag-only ^- msg %typed
34+ ^
35+++ nested: msg has no case `%submitt`
36+/tests/golden/types-missing-tag-named/source.jibb:14:14: expected union
37+++ nested ^- wrapped [%wrapper %submitt]
38+ ^
39+/tests/golden/types-missing-tag-named/source.jibb:14:32: tag
40+++ nested ^- wrapped [%wrapper %submitt]
41+ ^
42+++ generic: (choice @t) has no case `%missing`
43+/tests/golden/types-missing-tag-named/source.jibb:15:15: expected union
44+++ generic ^- (choice @t) %missing
45+ ^
46+/tests/golden/types-missing-tag-named/source.jibb:15:27: tag
47+++ generic ^- (choice @t) %missing
48+ ^
49+++ generic-payload: cast mold and expression type do not unify
50+/tests/golden/types-missing-tag-named/source.jibb:16:23: cast mold
51+++ generic-payload ^- (choice @t) [%some ~zod]
52+ ^
53+/tests/golden/types-missing-tag-named/source.jibb:16:35: expression
54+++ generic-payload ^- (choice @t) [%some ~zod]
55+ ^
56+++ take: $-(msg @t)
57+++ call: msg has no case `%submitt`
58+/tests/golden/types-missing-tag-named/source.jibb:18:10: expected union
59+++ call (take %submitt)
60+ ^
61+/tests/golden/types-missing-tag-named/source.jibb:18:15: tag
62+++ call (take %submitt)
63+ ^
64+++ absent: tag needs context in partial inference
65+++ discarded: tag needs context in partial inference
66+++ generic-unknown: explicit capital constraints are not supported by partial inference
tests/golden/types-multi-call/types.txt+1−1
@@ -68,7 +68,7 @@ partial inference; module not checked
6868++ recurse: $-([@t @p] [@t @p])
6969++ pending: tag needs context in partial inference
7070++ pending-null: `~` needs context in partial inference
71−++ unknown-context: expression is not supported by partial inference
71+++ unknown-context: tag needs context in partial inference
7272++ named-mismatch: call's sample and argument types do not unify
7373/tests/golden/types-multi-call/source.jibb:38:20: called gate has type $-([label=@t ship=@p] [@t @p])
7474++ named-mismatch (named [other="hi" ship=~zod])
tests/golden/types-nested-missing-tag/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Tag resolution: "A literal that matches nothing is an error naming the union, such as `msg has no case %submitt`." Type errors name both conflicting sites.
2+tests: A missing tag inside a tuple or record names its union and tag site in casts, calls, unit payloads and list items. An earlier incompatible field or a wrong written face keeps the original mismatch; nested tuples work too. An unconstrained tag remains pending, and a written capital is not forced by diagnostic replay.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-nested-missing-tag/modules.txtnew file+1
@@ -0,0 +1 @@
1+# Use the prepared prelude.
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-prelude-direct/about.txt+1−1

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-prelude-direct/tokens.txt+11−11

This diff is too big to show here.

tests/golden/types-prelude-direct/tree.txt+7−7

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-prelude-interface/tokens.txt+11−11

This diff is too big to show here.

tests/golden/types-prelude-interface/tree.txt+7−7

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-prelude-list-functions/module-trees.txt+7−1

This diff is too big to show here.

tests/golden/types-prelude-list-functions/modules/ui/lib.jibb+1

This diff is too big to show here.

tests/golden/types-prelude-list-functions/source.jibb+7

This diff is too big to show here.

tests/golden/types-prelude-list-functions/tokens.txt+102−3

This diff is too big to show here.

tests/golden/types-prelude-list-functions/tree.txt+48−1

This diff is too big to show here.

tests/golden/types-prelude-list-functions/types.txt+13

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-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-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-gate/about.txt+1−1

This diff is too big to show here.

tests/golden/types-recursive-gate/types.txt+3−3

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-branch-context/types.txt+4−4

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-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-tags/types.txt+3−3

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.txt+2−2

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.jibb+44−68

This diff is too big to show here.

tests/golden/types-unit-context/tokens.txt+458−343

This diff is too big to show here.

tests/golden/types-unit-context/tree.txt+218−180

This diff is too big to show here.

tests/golden/types-unit-context/types.txt+90−22

This diff is too big to show here.

tests/golden/types-unit-patterns/types.txt+4−1

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+13−2

This diff is too big to show here.

tests/importer/shadow-static.txt+4

This diff is too big to show here.

tests/importer/small.txt+35

This diff is too big to show here.

tests/importer/tree.txt+60−19

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+41−1

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-module-scope.hoon+28−3

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+921−606

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+13−2

This diff is too big to show here.

tests/type-import/expected.txt+39−9

This diff is too big to show here.

tests/type-import/source.txt+21

This diff is too big to show here.

tests/type-import/sur.txt+3

This diff is too big to show here.

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

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+13

This diff is too big to show here.

tools/golden+12−2

This diff is too big to show here.

tools/importer-test+1−1

This diff is too big to show here.

tools/ship+3−2

This diff is too big to show here.

tools/testdata/selftest+10−10

This diff is too big to show here.

tools/testdata/ship-selftest+3−2

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+2−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.