on master help sign in
1133 files changed+53689−5397
since splitsnapshots
unifiedsplit
README.md+1−1 docs/compiler.md+47−5 docs/development.md+24−3 docs/open-questions.md+26−5 docs/prelude-inventory.md+16−8 docs/prompts/milestone-2.md+9−7 docs/spec/core-language.md+2−1 docs/spec/decisions.md+11−6 docs/spec/grammar.md+14−12 docs/spec/overview.md+5−5 docs/status.md+77−8 jibb-dev/lib/jibb-import.hoon+854−36 jibb-dev/lib/jibb.hoon+4252−205 jibb-dev/lib/jibb/internal.jibb+16 jibb-dev/lib/jibb/prelude.jibb+138−43 tests/clay-fixtures/ford-nested-union-bridge-expected.txt+1 tests/clay-fixtures/ford-nested-union-bridge.txt+14 tests/clay-fixtures/mark-update-import-expected.txt+1 tests/clay-fixtures/mark-update-import.txt+9 tests/clay-fixtures/tlon-mop-expected.txt+1 tests/clay-fixtures/tlon-mop.txt+20 tests/golden/doc-grammar-04-step/about.txt+1 tests/golden/doc-grammar-04-step/modules.txt+1 tests/golden/doc-grammar-04-step/source.jibb+1−1 tests/golden/doc-grammar-04-step/tokens.txt+2−2 tests/golden/doc-grammar-04-step/tree.txt+1−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/inline-mold-opaque/about.txt+2−2 tests/golden/module-cache-incomplete/about.txt+1−1 tests/golden/module-cache-incomplete/module-trees.txt+6−9 tests/golden/module-cache-incomplete/modules/ui/bad.jibb+1−3 tests/golden/parser-hole-parameter-rejected/about.txt+3 tests/golden/parser-hole-parameter-rejected/source.jibb+1 tests/golden/parser-hole-parameter-rejected/tokens.txt+8 tests/golden/parser-hole-parameter-rejected/tree.txt+3 tests/golden/parser-hole-path-space/about.txt+3 tests/golden/parser-hole-path-space/source.jibb+1 tests/golden/parser-hole-path-space/tokens.txt+9 tests/golden/parser-hole-path-space/tree.txt+3 tests/golden/parser-hole-path/about.txt+3 tests/golden/parser-hole-path/source.jibb+4 tests/golden/parser-hole-path/tokens.txt+28 tests/golden/parser-hole-path/tree.txt+5 tests/golden/parser-hole-pattern-rejected/about.txt+3 tests/golden/parser-hole-pattern-rejected/source.jibb+3 tests/golden/parser-hole-pattern-rejected/tokens.txt+15 tests/golden/parser-hole-pattern-rejected/tree.txt+3 tests/golden/parser-hole-shapes/about.txt+3 tests/golden/parser-hole-shapes/source.jibb+11 tests/golden/parser-hole-shapes/tokens.txt+121 tests/golden/parser-hole-shapes/tree.txt+47 tests/golden/parser-hole-value-rejected/about.txt+3 tests/golden/parser-hole-value-rejected/source.jibb+1 tests/golden/parser-hole-value-rejected/tokens.txt+4 tests/golden/parser-hole-value-rejected/tree.txt+3 tests/golden/prelude-1c-structural/source.jibb+8−6 tests/golden/prelude-1c-structural/tokens.txt+454−440 tests/golden/prelude-1c-structural/tree.txt+191−185 tests/golden/prelude-1c-structural/types.txt+2−2 tests/golden/prelude-3g-basic/source.jibb+8−6 tests/golden/prelude-3g-basic/tokens.txt+146−132 tests/golden/prelude-3g-basic/tree.txt+64−58 tests/golden/prelude-3g-basic/types.txt+2−2 tests/golden/prelude-3g-like/source.jibb+8−6 tests/golden/prelude-3g-like/tokens.txt+357−343 tests/golden/prelude-3g-like/tree.txt+152−146 tests/golden/prelude-3g-like/types.txt+2−2 tests/golden/prelude-3g-structural/source.jibb+8−6 tests/golden/prelude-3g-structural/tokens.txt+309−295 tests/golden/prelude-3g-structural/tree.txt+132−126 tests/golden/prelude-3g-structural/types.txt+2−2 tests/golden/prelude-list-helpers/source.jibb+8−6 tests/golden/prelude-list-helpers/tokens.txt+568−554 tests/golden/prelude-list-helpers/tree.txt+245−239 tests/golden/prelude-list-helpers/types.txt+3−3 tests/golden/prelude-list-unit/source.jibb+8−6 tests/golden/prelude-list-unit/tokens.txt+86−72 tests/golden/prelude-list-unit/tree.txt+37−31 tests/golden/prelude-list-unit/types.txt+2−2 tests/golden/prelude-unit-list-transforms/about.txt+2−2 tests/golden/prelude-unit-list-transforms/source.jibb+131−43 tests/golden/prelude-unit-list-transforms/tokens.txt+1915−1279 tests/golden/prelude-unit-list-transforms/tree.txt+862−573 tests/golden/prelude-unit-list-transforms/types.txt+21−8 tests/golden/types-capital-distinct/about.txt+4 tests/golden/types-capital-distinct/source.jibb+6 tests/golden/types-capital-distinct/tokens.txt+73 tests/golden/types-capital-distinct/tree.txt+33 tests/golden/types-capital-distinct/types.txt+19 tests/golden/types-cell-pattern-many/about.txt+4 tests/golden/types-cell-pattern-many/modules.txt+1 tests/golden/types-cell-pattern-many/source.jibb+41 tests/golden/types-cell-pattern-many/tokens.txt+315 tests/golden/types-cell-pattern-many/tree.txt+144 tests/golden/types-cell-pattern-many/types.txt+14 tests/golden/types-cell-pattern-schemes/about.txt+4 tests/golden/types-cell-pattern-schemes/modules.txt+1 tests/golden/types-cell-pattern-schemes/source.jibb+23 tests/golden/types-cell-pattern-schemes/tokens.txt+168 tests/golden/types-cell-pattern-schemes/tree.txt+70 tests/golden/types-cell-pattern-schemes/types.txt+16 tests/golden/types-cell-pattern-tail/about.txt+4 tests/golden/types-cell-pattern-tail/modules.txt+1 tests/golden/types-cell-pattern-tail/source.jibb+18 tests/golden/types-cell-pattern-tail/tokens.txt+126 tests/golden/types-cell-pattern-tail/tree.txt+59 tests/golden/types-cell-pattern-tail/types.txt+7 tests/golden/types-deferred-call-context/about.txt+4 tests/golden/types-deferred-call-context/modules.txt+1 tests/golden/types-deferred-call-context/source.jibb+56 tests/golden/types-deferred-call-context/tokens.txt+557 tests/golden/types-deferred-call-context/tree.txt+272 tests/golden/types-deferred-call-context/types.txt+82 tests/golden/types-flag-branch-context/about.txt+4 tests/golden/types-flag-branch-context/modules.txt+1 tests/golden/types-flag-branch-context/source.jibb+83 tests/golden/types-flag-branch-context/tokens.txt+496 tests/golden/types-flag-branch-context/tree.txt+244 tests/golden/types-flag-branch-context/types.txt+33 tests/golden/types-generic-face-inference/about.txt+4 tests/golden/types-generic-face-inference/source.jibb+8 tests/golden/types-generic-face-inference/tokens.txt+134 tests/golden/types-generic-face-inference/tree.txt+56 tests/golden/types-generic-face-inference/types.txt+13 tests/golden/types-generic-union-alias-face/about.txt+4 tests/golden/types-generic-union-alias-face/module-trees.txt+11 tests/golden/types-generic-union-alias-face/modules.txt+1 tests/golden/types-generic-union-alias-face/modules/ui/base.jibb+3 tests/golden/types-generic-union-alias-face/source.jibb+6 tests/golden/types-generic-union-alias-face/tokens.txt+75 tests/golden/types-generic-union-alias-face/tree.txt+24 tests/golden/types-generic-union-alias-face/types.txt+12 tests/golden/types-generic-union-alias/about.txt+4 tests/golden/types-generic-union-alias/source.jibb+23 tests/golden/types-generic-union-alias/tokens.txt+248 tests/golden/types-generic-union-alias/tree.txt+86 tests/golden/types-generic-union-alias/types.txt+22 tests/golden/types-generic-union-capitals/about.txt+4 tests/golden/types-generic-union-capitals/source.jibb+17 tests/golden/types-generic-union-capitals/tokens.txt+162 tests/golden/types-generic-union-capitals/tree.txt+68 tests/golden/types-generic-union-capitals/types.txt+34 tests/golden/types-generic-union-errors/about.txt+4 tests/golden/types-generic-union-errors/source.jibb+11 tests/golden/types-generic-union-errors/tokens.txt+93 tests/golden/types-generic-union-errors/tree.txt+36 tests/golden/types-generic-union-errors/types.txt+26 tests/golden/types-generic-union-escaping/about.txt+4 tests/golden/types-generic-union-escaping/module-trees.txt+16 tests/golden/types-generic-union-escaping/modules.txt+2 tests/golden/types-generic-union-escaping/modules/ui/base.jibb+3 tests/golden/types-generic-union-escaping/modules/ui/mid.jibb+3 tests/golden/types-generic-union-escaping/source.jibb+3 tests/golden/types-generic-union-escaping/tokens.txt+15 tests/golden/types-generic-union-escaping/tree.txt+4 tests/golden/types-generic-union-escaping/types.txt+3 tests/golden/types-generic-union-import/about.txt+4 tests/golden/types-generic-union-import/module-trees.txt+32 tests/golden/types-generic-union-import/modules.txt+2 tests/golden/types-generic-union-import/modules/ui/shared.jibb+4 tests/golden/types-generic-union-import/modules/ui/twin.jibb+4 tests/golden/types-generic-union-import/source.jibb+9 tests/golden/types-generic-union-import/tokens.txt+79 tests/golden/types-generic-union-import/tree.txt+27 tests/golden/types-generic-union-import/types.txt+7 tests/golden/types-generic-union-local/about.txt+4 tests/golden/types-generic-union-local/source.jibb+34 tests/golden/types-generic-union-local/tokens.txt+297 tests/golden/types-generic-union-local/tree.txt+120 tests/golden/types-generic-union-local/types.txt+22 tests/golden/types-generic-union-transitive/about.txt+4 tests/golden/types-generic-union-transitive/module-trees.txt+27 tests/golden/types-generic-union-transitive/modules.txt+2 tests/golden/types-generic-union-transitive/modules/ui/base.jibb+3 tests/golden/types-generic-union-transitive/modules/ui/mid.jibb+4 tests/golden/types-generic-union-transitive/source.jibb+5 tests/golden/types-generic-union-transitive/tokens.txt+43 tests/golden/types-generic-union-transitive/tree.txt+15 tests/golden/types-generic-union-transitive/types.txt+5 tests/golden/types-hole-concrete/about.txt+4 tests/golden/types-hole-concrete/source.jibb+6 tests/golden/types-hole-concrete/tokens.txt+54 tests/golden/types-hole-concrete/tree.txt+22 tests/golden/types-hole-concrete/types.txt+10 tests/golden/types-hole-generic-mold/about.txt+4 tests/golden/types-hole-generic-mold/source.jibb+2 tests/golden/types-hole-generic-mold/tokens.txt+26 tests/golden/types-hole-generic-mold/tree.txt+11 tests/golden/types-hole-generic-mold/types.txt+6 tests/golden/types-hole-local-boundary/about.txt+4 tests/golden/types-hole-local-boundary/source.jibb+16 tests/golden/types-hole-local-boundary/tokens.txt+118 tests/golden/types-hole-local-boundary/tree.txt+55 tests/golden/types-hole-local-boundary/types.txt+17 tests/golden/types-hole-module-boundary/about.txt+4 tests/golden/types-hole-module-boundary/module-trees.txt+6 tests/golden/types-hole-module-boundary/modules.txt+1 tests/golden/types-hole-module-boundary/modules/ui/lib.jibb+1 tests/golden/types-hole-module-boundary/source.jibb+2 tests/golden/types-hole-module-boundary/tokens.txt+14 tests/golden/types-hole-module-boundary/tree.txt+5 tests/golden/types-hole-module-boundary/types.txt+2 tests/golden/types-hole-named-complex/about.txt+4 tests/golden/types-hole-named-complex/source.jibb+2 tests/golden/types-hole-named-complex/tokens.txt+20 tests/golden/types-hole-named-complex/tree.txt+9 tests/golden/types-hole-named-complex/types.txt+3 tests/golden/types-hole-numeric-capture/about.txt+4 tests/golden/types-hole-numeric-capture/source.jibb+19 tests/golden/types-hole-numeric-capture/tokens.txt+127 tests/golden/types-hole-numeric-capture/tree.txt+62 tests/golden/types-hole-numeric-capture/types.txt+10 tests/golden/types-hole-unbound-mold/about.txt+4 tests/golden/types-hole-unbound-mold/source.jibb+2 tests/golden/types-hole-unbound-mold/tokens.txt+19 tests/golden/types-hole-unbound-mold/tree.txt+9 tests/golden/types-hole-unbound-mold/types.txt+3 tests/golden/types-hole-unsupported/about.txt+4 tests/golden/types-hole-unsupported/source.jibb+2 tests/golden/types-hole-unsupported/tokens.txt+14 tests/golden/types-hole-unsupported/tree.txt+7 tests/golden/types-hole-unsupported/types.txt+6 tests/golden/types-hole-user-generic/about.txt+4 tests/golden/types-hole-user-generic/source.jibb+6 tests/golden/types-hole-user-generic/tokens.txt+71 tests/golden/types-hole-user-generic/tree.txt+31 tests/golden/types-hole-user-generic/types.txt+10 tests/golden/types-hole-user-named/about.txt+4 tests/golden/types-hole-user-named/source.jibb+2 tests/golden/types-hole-user-named/tokens.txt+22 tests/golden/types-hole-user-named/tree.txt+11 tests/golden/types-hole-user-named/types.txt+6 tests/golden/types-hole-user-value/about.txt+4 tests/golden/types-hole-user-value/source.jibb+3 tests/golden/types-hole-user-value/tokens.txt+21 tests/golden/types-hole-user-value/tree.txt+10 tests/golden/types-hole-user-value/types.txt+7 tests/golden/types-import-duplicate-mark/about.txt+4 tests/golden/types-import-duplicate-mark/mar/duplicate.txt+5 tests/golden/types-import-duplicate-mark/marks.txt+1 tests/golden/types-import-duplicate-mark/source.jibb+2 tests/golden/types-import-duplicate-mark/tokens.txt+11 tests/golden/types-import-duplicate-mark/tree.txt+6 tests/golden/types-import-duplicate-mark/types.txt+2 tests/golden/types-import-duplicate-sur/about.txt+4 tests/golden/types-import-duplicate-sur/imports.txt+3 tests/golden/types-import-duplicate-sur/source.jibb+5 tests/golden/types-import-duplicate-sur/sur/fixture.txt+6 tests/golden/types-import-duplicate-sur/tokens.txt+35 tests/golden/types-import-duplicate-sur/tree.txt+18 tests/golden/types-import-duplicate-sur/types.txt+5 tests/golden/types-import-hoon-flags/about.txt+4 tests/golden/types-import-hoon-flags/imports.txt+4 tests/golden/types-import-hoon-flags/source.jibb+14 tests/golden/types-import-hoon-flags/sur/flags.txt+7 tests/golden/types-import-hoon-flags/tokens.txt+91 tests/golden/types-import-hoon-flags/tree.txt+41 tests/golden/types-import-hoon-flags/types.txt+24 tests/golden/types-import-hoon-noun/about.txt+4 tests/golden/types-import-hoon-noun/imports.txt+4 tests/golden/types-import-hoon-noun/source.jibb+8 tests/golden/types-import-hoon-noun/sur/fixture.txt+6 tests/golden/types-import-hoon-noun/tokens.txt+60 tests/golden/types-import-hoon-noun/tree.txt+28 tests/golden/types-import-hoon-noun/types.txt+8 tests/golden/types-import-mark-record/about.txt+2−2 tests/golden/types-import-mark-record/source.jibb+1−1 tests/golden/types-import-mark-record/tokens.txt+1−1 tests/golden/types-import-mark-record/tree.txt+1−1 tests/golden/types-import-mark-record/types.txt+1−1 tests/golden/types-import-tlon-notes/about.txt+4 tests/golden/types-import-tlon-notes/imports.txt+7 tests/golden/types-import-tlon-notes/source.jibb+8 tests/golden/types-import-tlon-notes/sur/notes.txt+433 tests/golden/types-import-tlon-notes/tokens.txt+59 tests/golden/types-import-tlon-notes/tree.txt+30 tests/golden/types-import-tlon-notes/types.txt+8 tests/golden/types-list-branch/about.txt+4 tests/golden/types-list-branch/modules.txt+1 tests/golden/types-list-branch/source.jibb+81 tests/golden/types-list-branch/tokens.txt+521 tests/golden/types-list-branch/tree.txt+237 tests/golden/types-list-branch/types.txt+41 tests/golden/types-list-cons/about.txt+4 tests/golden/types-list-cons/modules.txt+1 tests/golden/types-list-cons/source.jibb+20 tests/golden/types-list-cons/tokens.txt+217 tests/golden/types-list-cons/tree.txt+85 tests/golden/types-list-cons/types.txt+29 tests/golden/types-list-context/about.txt+4 tests/golden/types-list-context/modules.txt+1 tests/golden/types-list-context/source.jibb+17 tests/golden/types-list-context/tokens.txt+143 tests/golden/types-list-context/tree.txt+59 tests/golden/types-list-context/types.txt+18 tests/golden/types-list-imported/about.txt+4 tests/golden/types-list-imported/imports.txt+2 tests/golden/types-list-imported/modules.txt+1 tests/golden/types-list-imported/source.jibb+14 tests/golden/types-list-imported/sur/fixture.txt+4 tests/golden/types-list-imported/tokens.txt+109 tests/golden/types-list-imported/tree.txt+52 tests/golden/types-list-imported/types.txt+22 tests/golden/types-list-open-constraints/about.txt+4 tests/golden/types-list-open-constraints/modules.txt+1 tests/golden/types-list-open-constraints/source.jibb+19 tests/golden/types-list-open-constraints/tokens.txt+178 tests/golden/types-list-open-constraints/tree.txt+68 tests/golden/types-list-open-constraints/types.txt+30 tests/golden/types-list-open/about.txt+4 tests/golden/types-list-open/modules.txt+1 tests/golden/types-list-open/source.jibb+13 tests/golden/types-list-open/tokens.txt+94 tests/golden/types-list-open/tree.txt+36 tests/golden/types-list-open/types.txt+18 tests/golden/types-list-pattern-imported/about.txt+4 tests/golden/types-list-pattern-imported/imports.txt+2 tests/golden/types-list-pattern-imported/modules.txt+1 tests/golden/types-list-pattern-imported/source.jibb+13 tests/golden/types-list-pattern-imported/sur/fixture.txt+5 tests/golden/types-list-pattern-imported/tokens.txt+66 tests/golden/types-list-pattern-imported/tree.txt+32 tests/golden/types-list-pattern-imported/types.txt+4 tests/golden/types-list-patterns/about.txt+4 tests/golden/types-list-patterns/modules.txt+1 tests/golden/types-list-patterns/source.jibb+64 tests/golden/types-list-patterns/tokens.txt+359 tests/golden/types-list-patterns/tree.txt+168 tests/golden/types-list-patterns/types.txt+17 tests/golden/types-list-zero-fit/about.txt+4 tests/golden/types-list-zero-fit/modules.txt+1 tests/golden/types-list-zero-fit/source.jibb+8 tests/golden/types-list-zero-fit/tokens.txt+181 tests/golden/types-list-zero-fit/tree.txt+91 tests/golden/types-list-zero-fit/types.txt+27 tests/golden/types-local-capitals/about.txt+4 tests/golden/types-local-capitals/modules.txt+1 tests/golden/types-local-capitals/source.jibb+73 tests/golden/types-local-capitals/tokens.txt+473 tests/golden/types-local-capitals/tree.txt+229 tests/golden/types-local-capitals/types.txt+28 tests/golden/types-local-recursive/about.txt+4 tests/golden/types-local-recursive/modules.txt+1 tests/golden/types-local-recursive/source.jibb+54 tests/golden/types-local-recursive/tokens.txt+351 tests/golden/types-local-recursive/tree.txt+170 tests/golden/types-local-recursive/types.txt+12 tests/golden/types-local-scc-adversarial/about.txt+4 tests/golden/types-local-scc-adversarial/modules.txt+1 tests/golden/types-local-scc-adversarial/source.jibb+54 tests/golden/types-local-scc-adversarial/tokens.txt+404 tests/golden/types-local-scc-adversarial/tree.txt+204 tests/golden/types-local-scc-adversarial/types.txt+17 tests/golden/types-local-scc/about.txt+4 tests/golden/types-local-scc/modules.txt+1 tests/golden/types-local-scc/source.jibb+58 tests/golden/types-local-scc/tokens.txt+434 tests/golden/types-local-scc/tree.txt+214 tests/golden/types-local-scc/types.txt+12 tests/golden/types-missing-tag-context/about.txt+4 tests/golden/types-missing-tag-context/modules.txt+1 tests/golden/types-missing-tag-context/source.jibb+17 tests/golden/types-missing-tag-context/tokens.txt+98 tests/golden/types-missing-tag-context/tree.txt+45 tests/golden/types-missing-tag-context/types.txt+38 tests/golden/types-missing-tag-imported/about.txt+4 tests/golden/types-missing-tag-imported/imports.txt+2 tests/golden/types-missing-tag-imported/source.jibb+6 tests/golden/types-missing-tag-imported/sur/fixture.txt+21 tests/golden/types-missing-tag-imported/tokens.txt+43 tests/golden/types-missing-tag-imported/tree.txt+18 tests/golden/types-missing-tag-imported/types.txt+12 tests/golden/types-missing-tag-named/about.txt+4 tests/golden/types-missing-tag-named/modules.txt+1 tests/golden/types-missing-tag-named/source.jibb+23 tests/golden/types-missing-tag-named/tokens.txt+155 tests/golden/types-missing-tag-named/tree.txt+66 tests/golden/types-missing-tag-named/types.txt+66 tests/golden/types-module-field-duplicate/about.txt+4 tests/golden/types-module-field-duplicate/module-trees.txt+6 tests/golden/types-module-field-duplicate/modules.txt+1 tests/golden/types-module-field-duplicate/modules/ui/lib.jibb+1 tests/golden/types-module-field-duplicate/source.jibb+2 tests/golden/types-module-field-duplicate/tokens.txt+11 tests/golden/types-module-field-duplicate/tree.txt+3 tests/golden/types-module-field-duplicate/types.txt+8 tests/golden/types-module-field-nonrecord/about.txt+4 tests/golden/types-module-field-nonrecord/module-trees.txt+12 tests/golden/types-module-field-nonrecord/modules.txt+1 tests/golden/types-module-field-nonrecord/modules/ui/lib.jibb+2 tests/golden/types-module-field-nonrecord/source.jibb+2 tests/golden/types-module-field-nonrecord/tokens.txt+11 tests/golden/types-module-field-nonrecord/tree.txt+3 tests/golden/types-module-field-nonrecord/types.txt+2 tests/golden/types-module-field-path/about.txt+4 tests/golden/types-module-field-path/module-trees.txt+12 tests/golden/types-module-field-path/modules.txt+1 tests/golden/types-module-field-path/modules/ui/lib.jibb+2 tests/golden/types-module-field-path/source.jibb+9 tests/golden/types-module-field-path/tokens.txt+45 tests/golden/types-module-field-path/tree.txt+14 tests/golden/types-module-field-path/types.txt+9 tests/golden/types-module-field-shadow/about.txt+4 tests/golden/types-module-field-shadow/module-trees.txt+12 tests/golden/types-module-field-shadow/modules.txt+1 tests/golden/types-module-field-shadow/modules/ui/lib.jibb+2 tests/golden/types-module-field-shadow/source.jibb+2 tests/golden/types-module-field-shadow/tokens.txt+15 tests/golden/types-module-field-shadow/tree.txt+6 tests/golden/types-module-field-shadow/types.txt+2 tests/golden/types-multi-call/about.txt+4 tests/golden/types-multi-call/modules.txt+1 tests/golden/types-multi-call/source.jibb+42 tests/golden/types-multi-call/tokens.txt+370 tests/golden/types-multi-call/tree.txt+169 tests/golden/types-multi-call/types.txt+100 tests/golden/types-multi-import/about.txt+4 tests/golden/types-multi-import/module-trees.txt+16 tests/golden/types-multi-import/modules.txt+1 tests/golden/types-multi-import/modules/ui/lib.jibb+5 tests/golden/types-multi-import/source.jibb+5 tests/golden/types-multi-import/tokens.txt+43 tests/golden/types-multi-import/tree.txt+20 tests/golden/types-multi-import/types.txt+17 tests/golden/types-nested-missing-tag/about.txt+4 tests/golden/types-nested-missing-tag/modules.txt+1 tests/golden/types-nested-missing-tag/source.jibb+18 tests/golden/types-nested-missing-tag/tokens.txt+184 tests/golden/types-nested-missing-tag/tree.txt+79 tests/golden/types-nested-missing-tag/types.txt+71 tests/golden/types-null-context/about.txt+4 tests/golden/types-null-context/source.jibb+8 tests/golden/types-null-context/tokens.txt+57 tests/golden/types-null-context/tree.txt+25 tests/golden/types-null-context/types.txt+13 tests/golden/types-null-overlap/about.txt+4 tests/golden/types-null-overlap/source.jibb+3 tests/golden/types-null-overlap/tokens.txt+8 tests/golden/types-null-overlap/tree.txt+3 tests/golden/types-null-overlap/types.txt+8 tests/golden/types-null-unresolved/about.txt+4 tests/golden/types-null-unresolved/source.jibb+18 tests/golden/types-null-unresolved/tokens.txt+79 tests/golden/types-null-unresolved/tree.txt+34 tests/golden/types-null-unresolved/types.txt+9 tests/golden/types-pair-context/about.txt+4 tests/golden/types-pair-context/modules.txt+1 tests/golden/types-pair-context/source.jibb+32 tests/golden/types-pair-context/tokens.txt+217 tests/golden/types-pair-context/tree.txt+86 tests/golden/types-pair-context/types.txt+43 tests/golden/types-prelude-arithmetic/about.txt+4 tests/golden/types-prelude-arithmetic/modules.txt+1 tests/golden/types-prelude-arithmetic/source.jibb+23 tests/golden/types-prelude-arithmetic/tokens.txt+201 tests/golden/types-prelude-arithmetic/tree.txt+85 tests/golden/types-prelude-arithmetic/types.txt+32 tests/golden/types-prelude-bond/about.txt+4 tests/golden/types-prelude-bond/modules.txt+1 tests/golden/types-prelude-bond/source.jibb+6 tests/golden/types-prelude-bond/tokens.txt+57 tests/golden/types-prelude-bond/tree.txt+30 tests/golden/types-prelude-bond/types.txt+7 tests/golden/types-prelude-cmd/about.txt+4 tests/golden/types-prelude-cmd/modules.txt+1 tests/golden/types-prelude-cmd/source.jibb+21 tests/golden/types-prelude-cmd/tokens.txt+285 tests/golden/types-prelude-cmd/tree.txt+122 tests/golden/types-prelude-cmd/types.txt+50 tests/golden/types-prelude-direct/about.txt+4 tests/golden/types-prelude-direct/modules.txt+1 tests/golden/types-prelude-direct/source.jibb+5 tests/golden/types-prelude-direct/tokens.txt+53 tests/golden/types-prelude-direct/tree.txt+25 tests/golden/types-prelude-direct/types.txt+6 tests/golden/types-prelude-functional/about.txt+4 tests/golden/types-prelude-functional/modules.txt+1 tests/golden/types-prelude-functional/source.jibb+18 tests/golden/types-prelude-functional/tokens.txt+145 tests/golden/types-prelude-functional/tree.txt+65 tests/golden/types-prelude-functional/types.txt+23 tests/golden/types-prelude-interface/about.txt+4 tests/golden/types-prelude-interface/module-trees.txt+13 tests/golden/types-prelude-interface/modules.txt+2 tests/golden/types-prelude-interface/modules/ui/left.jibb+1 tests/golden/types-prelude-interface/modules/ui/right.jibb+1 tests/golden/types-prelude-interface/source.jibb+10 tests/golden/types-prelude-interface/tokens.txt+81 tests/golden/types-prelude-interface/tree.txt+33 tests/golden/types-prelude-interface/types.txt+9 tests/golden/types-prelude-list-alias/about.txt+4 tests/golden/types-prelude-list-alias/modules.txt+1 tests/golden/types-prelude-list-alias/source.jibb+7 tests/golden/types-prelude-list-alias/tokens.txt+68 tests/golden/types-prelude-list-alias/tree.txt+30 tests/golden/types-prelude-list-alias/types.txt+14 tests/golden/types-prelude-list-functions/about.txt+4 tests/golden/types-prelude-list-functions/module-trees.txt+11 tests/golden/types-prelude-list-functions/modules.txt+1 tests/golden/types-prelude-list-functions/modules/ui/lib.jibb+2 tests/golden/types-prelude-list-functions/source.jibb+18 tests/golden/types-prelude-list-functions/tokens.txt+183 tests/golden/types-prelude-list-functions/tree.txt+87 tests/golden/types-prelude-list-functions/types.txt+28 tests/golden/types-prelude-list-helpers/about.txt+4 tests/golden/types-prelude-list-helpers/modules.txt+1 tests/golden/types-prelude-list-helpers/source.jibb+15 tests/golden/types-prelude-list-helpers/tokens.txt+182 tests/golden/types-prelude-list-helpers/tree.txt+98 tests/golden/types-prelude-list-helpers/types.txt+34 tests/golden/types-prelude-predicates/about.txt+4 tests/golden/types-prelude-predicates/modules.txt+1 tests/golden/types-prelude-predicates/source.jibb+6 tests/golden/types-prelude-predicates/tokens.txt+91 tests/golden/types-prelude-predicates/tree.txt+49 tests/golden/types-prelude-predicates/types.txt+19 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-proj-explicit-context/about.txt+4 tests/golden/types-proj-explicit-context/modules.txt+1 tests/golden/types-proj-explicit-context/source.jibb+35 tests/golden/types-proj-explicit-context/tokens.txt+626 tests/golden/types-proj-explicit-context/tree.txt+287 tests/golden/types-proj-explicit-context/types.txt+31 tests/golden/types-proj-nested-no-implicit/about.txt+4 tests/golden/types-proj-nested-no-implicit/modules.txt+1 tests/golden/types-proj-nested-no-implicit/source.jibb+6 tests/golden/types-proj-nested-no-implicit/tokens.txt+119 tests/golden/types-proj-nested-no-implicit/tree.txt+56 tests/golden/types-proj-nested-no-implicit/types.txt+7 tests/golden/types-proj-reserved-imported-definition/about.txt+4 tests/golden/types-proj-reserved-imported-definition/module-trees.txt+10 tests/golden/types-proj-reserved-imported-definition/modules.txt+1 tests/golden/types-proj-reserved-imported-definition/modules/ui/lib.jibb+2 tests/golden/types-proj-reserved-imported-definition/source.jibb+2 tests/golden/types-proj-reserved-imported-definition/tokens.txt+11 tests/golden/types-proj-reserved-imported-definition/tree.txt+3 tests/golden/types-proj-reserved-imported-definition/types.txt+2 tests/golden/types-proj-reserved-jibb-import/about.txt+4 tests/golden/types-proj-reserved-jibb-import/module-trees.txt+6 tests/golden/types-proj-reserved-jibb-import/modules.txt+1 tests/golden/types-proj-reserved-jibb-import/modules/ui/lib.jibb+1 tests/golden/types-proj-reserved-jibb-import/source.jibb+2 tests/golden/types-proj-reserved-jibb-import/tokens.txt+11 tests/golden/types-proj-reserved-jibb-import/tree.txt+3 tests/golden/types-proj-reserved-jibb-import/types.txt+2 tests/golden/types-proj-reserved-local-mold/about.txt+4 tests/golden/types-proj-reserved-local-mold/modules.txt+1 tests/golden/types-proj-reserved-local-mold/source.jibb+3 tests/golden/types-proj-reserved-local-mold/tokens.txt+10 tests/golden/types-proj-reserved-local-mold/tree.txt+5 tests/golden/types-proj-reserved-local-mold/types.txt+2 tests/golden/types-proj-reserved-local/about.txt+4 tests/golden/types-proj-reserved-local/modules.txt+1 tests/golden/types-proj-reserved-local/source.jibb+3 tests/golden/types-proj-reserved-local/tokens.txt+14 tests/golden/types-proj-reserved-local/tree.txt+8 tests/golden/types-proj-reserved-local/types.txt+2 tests/golden/types-proj-reserved-mark-import/about.txt+4 tests/golden/types-proj-reserved-mark-import/modules.txt+1 tests/golden/types-proj-reserved-mark-import/source.jibb+2 tests/golden/types-proj-reserved-mark-import/tokens.txt+7 tests/golden/types-proj-reserved-mark-import/tree.txt+3 tests/golden/types-proj-reserved-mark-import/types.txt+2 tests/golden/types-proj-reserved-mold/about.txt+4 tests/golden/types-proj-reserved-mold/modules.txt+1 tests/golden/types-proj-reserved-mold/source.jibb+2 tests/golden/types-proj-reserved-mold/tokens.txt+8 tests/golden/types-proj-reserved-mold/tree.txt+3 tests/golden/types-proj-reserved-mold/types.txt+2 tests/golden/types-proj-reserved-pattern/about.txt+4 tests/golden/types-proj-reserved-pattern/modules.txt+1 tests/golden/types-proj-reserved-pattern/source.jibb+3 tests/golden/types-proj-reserved-pattern/tokens.txt+21 tests/golden/types-proj-reserved-pattern/tree.txt+11 tests/golden/types-proj-reserved-pattern/types.txt+2 tests/golden/types-proj-reserved-positive/about.txt+4 tests/golden/types-proj-reserved-positive/modules.txt+1 tests/golden/types-proj-reserved-positive/source.jibb+8 tests/golden/types-proj-reserved-positive/tokens.txt+70 tests/golden/types-proj-reserved-positive/tree.txt+31 tests/golden/types-proj-reserved-positive/types.txt+7 tests/golden/types-proj-reserved-sample/about.txt+4 tests/golden/types-proj-reserved-sample/modules.txt+1 tests/golden/types-proj-reserved-sample/source.jibb+1 tests/golden/types-proj-reserved-sample/tokens.txt+8 tests/golden/types-proj-reserved-sample/tree.txt+5 tests/golden/types-proj-reserved-sample/types.txt+2 tests/golden/types-proj-reserved-sur-import/about.txt+4 tests/golden/types-proj-reserved-sur-import/modules.txt+1 tests/golden/types-proj-reserved-sur-import/source.jibb+2 tests/golden/types-proj-reserved-sur-import/tokens.txt+7 tests/golden/types-proj-reserved-sur-import/tree.txt+3 tests/golden/types-proj-reserved-sur-import/types.txt+2 tests/golden/types-proj-reserved-unused-pattern/about.txt+4 tests/golden/types-proj-reserved-unused-pattern/modules.txt+1 tests/golden/types-proj-reserved-unused-pattern/source.jibb+6 tests/golden/types-proj-reserved-unused-pattern/tokens.txt+38 tests/golden/types-proj-reserved-unused-pattern/tree.txt+18 tests/golden/types-proj-reserved-unused-pattern/types.txt+2 tests/golden/types-proj-reserved-unused-sample/about.txt+4 tests/golden/types-proj-reserved-unused-sample/modules.txt+1 tests/golden/types-proj-reserved-unused-sample/source.jibb+4 tests/golden/types-proj-reserved-unused-sample/tokens.txt+25 tests/golden/types-proj-reserved-unused-sample/tree.txt+12 tests/golden/types-proj-reserved-unused-sample/types.txt+2 tests/golden/types-proj-reserved-unused-value/about.txt+4 tests/golden/types-proj-reserved-unused-value/modules.txt+1 tests/golden/types-proj-reserved-unused-value/source.jibb+6 tests/golden/types-proj-reserved-unused-value/tokens.txt+31 tests/golden/types-proj-reserved-unused-value/tree.txt+15 tests/golden/types-proj-reserved-unused-value/types.txt+2 tests/golden/types-proj-reserved-value/about.txt+4 tests/golden/types-proj-reserved-value/modules.txt+1 tests/golden/types-proj-reserved-value/source.jibb+2 tests/golden/types-proj-reserved-value/tokens.txt+12 tests/golden/types-proj-reserved-value/tree.txt+6 tests/golden/types-proj-reserved-value/types.txt+2 tests/golden/types-proj-single-duplicate/about.txt+4 tests/golden/types-proj-single-duplicate/modules.txt+1 tests/golden/types-proj-single-duplicate/source.jibb+1 tests/golden/types-proj-single-duplicate/tokens.txt+23 tests/golden/types-proj-single-duplicate/tree.txt+12 tests/golden/types-proj-single-duplicate/types.txt+8 tests/golden/types-proj-single-field/about.txt+4 tests/golden/types-proj-single-field/modules.txt+1 tests/golden/types-proj-single-field/source.jibb+25 tests/golden/types-proj-single-field/tokens.txt+499 tests/golden/types-proj-single-field/tree.txt+243 tests/golden/types-proj-single-field/types.txt+31 tests/golden/types-proj-single-sample-face/about.txt+4 tests/golden/types-proj-single-sample-face/modules.txt+1 tests/golden/types-proj-single-sample-face/source.jibb+22 tests/golden/types-proj-single-sample-face/tokens.txt+210 tests/golden/types-proj-single-sample-face/tree.txt+117 tests/golden/types-proj-single-sample-face/types.txt+9 tests/golden/types-proj-single-wrapped/about.txt+4 tests/golden/types-proj-single-wrapped/modules.txt+1 tests/golden/types-proj-single-wrapped/source.jibb+26 tests/golden/types-proj-single-wrapped/tokens.txt+208 tests/golden/types-proj-single-wrapped/tree.txt+107 tests/golden/types-proj-single-wrapped/types.txt+5 tests/golden/types-qath-faces/about.txt+4 tests/golden/types-qath-faces/modules.txt+1 tests/golden/types-qath-faces/source.jibb+8 tests/golden/types-qath-faces/tokens.txt+130 tests/golden/types-qath-faces/tree.txt+59 tests/golden/types-qath-faces/types.txt+18 tests/golden/types-qath-holes/about.txt+4 tests/golden/types-qath-holes/modules.txt+1 tests/golden/types-qath-holes/source.jibb+18 tests/golden/types-qath-holes/tokens.txt+178 tests/golden/types-qath-holes/tree.txt+78 tests/golden/types-qath-holes/types.txt+22 tests/golden/types-qath-module-identity/about.txt+4 tests/golden/types-qath-module-identity/module-trees.txt+44 tests/golden/types-qath-module-identity/modules.txt+3 tests/golden/types-qath-module-identity/modules/ui/mid.jibb+4 tests/golden/types-qath-module-identity/modules/ui/one.jibb+7 tests/golden/types-qath-module-identity/modules/ui/two.jibb+4 tests/golden/types-qath-module-identity/source.jibb+15 tests/golden/types-qath-module-identity/tokens.txt+171 tests/golden/types-qath-module-identity/tree.txt+70 tests/golden/types-qath-module-identity/types.txt+18 tests/golden/types-qath-recursive/about.txt+4 tests/golden/types-qath-recursive/modules.txt+1 tests/golden/types-qath-recursive/source.jibb+19 tests/golden/types-qath-recursive/tokens.txt+145 tests/golden/types-qath-recursive/tree.txt+63 tests/golden/types-qath-recursive/types.txt+14 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+9 tests/golden/types-record-change-generic/tokens.txt+145 tests/golden/types-record-change-generic/tree.txt+57 tests/golden/types-record-change-generic/types.txt+14 tests/golden/types-record-change/about.txt+4 tests/golden/types-record-change/modules.txt+1 tests/golden/types-record-change/source.jibb+19 tests/golden/types-record-change/tokens.txt+254 tests/golden/types-record-change/tree.txt+99 tests/golden/types-record-change/types.txt+42 tests/golden/types-record-field-edit-separate/about.txt+4 tests/golden/types-record-field-edit-separate/source.jibb+1 tests/golden/types-record-field-edit-separate/tokens.txt+51 tests/golden/types-record-field-edit-separate/tree.txt+22 tests/golden/types-record-field-edit-separate/types.txt+2 tests/golden/types-record-field-expr-duplicate/about.txt+4 tests/golden/types-record-field-expr-duplicate/source.jibb+2 tests/golden/types-record-field-expr-duplicate/tokens.txt+22 tests/golden/types-record-field-expr-duplicate/tree.txt+9 tests/golden/types-record-field-expr-duplicate/types.txt+8 tests/golden/types-record-field-expr-separate/about.txt+4 tests/golden/types-record-field-expr-separate/source.jibb+1 tests/golden/types-record-field-expr-separate/tokens.txt+25 tests/golden/types-record-field-expr-separate/tree.txt+11 tests/golden/types-record-field-expr-separate/types.txt+2 tests/golden/types-record-field-module-reachable/about.txt+4 tests/golden/types-record-field-module-reachable/module-trees.txt+7 tests/golden/types-record-field-module-reachable/modules.txt+1 tests/golden/types-record-field-module-reachable/modules/ui/lib.jibb+2 tests/golden/types-record-field-module-reachable/source.jibb+2 tests/golden/types-record-field-module-reachable/tokens.txt+11 tests/golden/types-record-field-module-reachable/tree.txt+3 tests/golden/types-record-field-module-reachable/types.txt+8 tests/golden/types-record-field-module-unused/about.txt+4 tests/golden/types-record-field-module-unused/module-trees.txt+10 tests/golden/types-record-field-module-unused/modules.txt+2 tests/golden/types-record-field-module-unused/modules/ui/good.jibb+1 tests/golden/types-record-field-module-unused/modules/ui/unused.jibb+2 tests/golden/types-record-field-module-unused/source.jibb+2 tests/golden/types-record-field-module-unused/tokens.txt+11 tests/golden/types-record-field-module-unused/tree.txt+3 tests/golden/types-record-field-module-unused/types.txt+2 tests/golden/types-record-field-nested-mold/about.txt+4 tests/golden/types-record-field-nested-mold/source.jibb+2 tests/golden/types-record-field-nested-mold/tokens.txt+22 tests/golden/types-record-field-nested-mold/tree.txt+9 tests/golden/types-record-field-nested-mold/types.txt+8 tests/golden/types-record-field-outer-inner/about.txt+4 tests/golden/types-record-field-outer-inner/source.jibb+2 tests/golden/types-record-field-outer-inner/tokens.txt+26 tests/golden/types-record-field-outer-inner/tree.txt+12 tests/golden/types-record-field-outer-inner/types.txt+3 tests/golden/types-record-field-sample-duplicate/about.txt+4 tests/golden/types-record-field-sample-duplicate/source.jibb+1 tests/golden/types-record-field-sample-duplicate/tokens.txt+13 tests/golden/types-record-field-sample-duplicate/tree.txt+7 tests/golden/types-record-field-sample-duplicate/types.txt+8 tests/golden/types-record-field-separate-molds/about.txt+4 tests/golden/types-record-field-separate-molds/source.jibb+2 tests/golden/types-record-field-separate-molds/tokens.txt+33 tests/golden/types-record-field-separate-molds/tree.txt+15 tests/golden/types-record-field-separate-molds/types.txt+3 tests/golden/types-record-field-unused-mold/about.txt+4 tests/golden/types-record-field-unused-mold/source.jibb+2 tests/golden/types-record-field-unused-mold/tokens.txt+15 tests/golden/types-record-field-unused-mold/tree.txt+6 tests/golden/types-record-field-unused-mold/types.txt+8 tests/golden/types-recursion-scc-failures/about.txt+4 tests/golden/types-recursion-scc-failures/modules.txt+1 tests/golden/types-recursion-scc-failures/source.jibb+11 tests/golden/types-recursion-scc-failures/tokens.txt+90 tests/golden/types-recursion-scc-failures/tree.txt+45 tests/golden/types-recursion-scc-failures/types.txt+10 tests/golden/types-recursion-scc-groups/about.txt+4 tests/golden/types-recursion-scc-groups/modules.txt+1 tests/golden/types-recursion-scc-groups/source.jibb+9 tests/golden/types-recursion-scc-groups/tokens.txt+91 tests/golden/types-recursion-scc-groups/tree.txt+42 tests/golden/types-recursion-scc-groups/types.txt+10 tests/golden/types-recursion-scc-import-bad/about.txt+4 tests/golden/types-recursion-scc-import-bad/module-trees.txt+16 tests/golden/types-recursion-scc-import-bad/modules.txt+1 tests/golden/types-recursion-scc-import-bad/modules/ui/lib.jibb+3 tests/golden/types-recursion-scc-import-bad/source.jibb+2 tests/golden/types-recursion-scc-import-bad/tokens.txt+14 tests/golden/types-recursion-scc-import-bad/tree.txt+5 tests/golden/types-recursion-scc-import-bad/types.txt+2 tests/golden/types-recursion-scc-import/about.txt+4 tests/golden/types-recursion-scc-import/module-trees.txt+12 tests/golden/types-recursion-scc-import/modules.txt+1 tests/golden/types-recursion-scc-import/modules/ui/lib.jibb+2 tests/golden/types-recursion-scc-import/source.jibb+3 tests/golden/types-recursion-scc-import/tokens.txt+25 tests/golden/types-recursion-scc-import/tree.txt+12 tests/golden/types-recursion-scc-import/types.txt+3 tests/golden/types-recursion-scc-local/about.txt+4 tests/golden/types-recursion-scc-local/modules.txt+1 tests/golden/types-recursion-scc-local/source.jibb+11 tests/golden/types-recursion-scc-local/tokens.txt+80 tests/golden/types-recursion-scc-local/tree.txt+39 tests/golden/types-recursion-scc-local/types.txt+4 tests/golden/types-recursion-scc-order/about.txt+4 tests/golden/types-recursion-scc-order/modules.txt+1 tests/golden/types-recursion-scc-order/source.jibb+4 tests/golden/types-recursion-scc-order/tokens.txt+33 tests/golden/types-recursion-scc-order/tree.txt+15 tests/golden/types-recursion-scc-order/types.txt+5 tests/golden/types-recursion-scc-shadow/about.txt+4 tests/golden/types-recursion-scc-shadow/modules.txt+1 tests/golden/types-recursion-scc-shadow/source.jibb+3 tests/golden/types-recursion-scc-shadow/tokens.txt+30 tests/golden/types-recursion-scc-shadow/tree.txt+15 tests/golden/types-recursion-scc-shadow/types.txt+4 tests/golden/types-recursive-branch/about.txt+4 tests/golden/types-recursive-branch/modules.txt+1 tests/golden/types-recursive-branch/source.jibb+103 tests/golden/types-recursive-branch/tokens.txt+573 tests/golden/types-recursive-branch/tree.txt+306 tests/golden/types-recursive-branch/types.txt+50 tests/golden/types-recursive-gate/about.txt+4 tests/golden/types-recursive-gate/source.jibb+55 tests/golden/types-recursive-gate/tokens.txt+355 tests/golden/types-recursive-gate/tree.txt+176 tests/golden/types-recursive-gate/types.txt+42 tests/golden/types-recursive-sample/about.txt+4 tests/golden/types-recursive-sample/source.jibb+40 tests/golden/types-recursive-sample/tokens.txt+344 tests/golden/types-recursive-sample/tree.txt+161 tests/golden/types-recursive-sample/types.txt+40 tests/golden/types-scope-library-poke/about.txt+4 tests/golden/types-scope-library-poke/modules.txt+1 tests/golden/types-scope-library-poke/path.txt+1 tests/golden/types-scope-library-poke/source.jibb+2 tests/golden/types-scope-library-poke/tokens.txt+8 tests/golden/types-scope-library-poke/tree.txt+3 tests/golden/types-scope-library-poke/types.txt+2 tests/golden/types-scope-root-api/about.txt+4 tests/golden/types-scope-root-api/modules.txt+1 tests/golden/types-scope-root-api/path.txt+1 tests/golden/types-scope-root-api/source.jibb+2 tests/golden/types-scope-root-api/tokens.txt+7 tests/golden/types-scope-root-api/tree.txt+3 tests/golden/types-scope-root-api/types.txt+2 tests/golden/types-scope-store-duplicate/about.txt+4 tests/golden/types-scope-store-duplicate/modules.txt+1 tests/golden/types-scope-store-duplicate/path.txt+1 tests/golden/types-scope-store-duplicate/source.jibb+3 tests/golden/types-scope-store-duplicate/tokens.txt+16 tests/golden/types-scope-store-duplicate/tree.txt+6 tests/golden/types-scope-store-duplicate/types.txt+2 tests/golden/types-scope-store-shadow/about.txt+4 tests/golden/types-scope-store-shadow/modules.txt+1 tests/golden/types-scope-store-shadow/path.txt+1 tests/golden/types-scope-store-shadow/source.jibb+3 tests/golden/types-scope-store-shadow/tokens.txt+16 tests/golden/types-scope-store-shadow/tree.txt+6 tests/golden/types-scope-store-shadow/types.txt+2 tests/golden/types-single-case-pattern/about.txt+4 tests/golden/types-single-case-pattern/modules.txt+1 tests/golden/types-single-case-pattern/source.jibb+59 tests/golden/types-single-case-pattern/tokens.txt+364 tests/golden/types-single-case-pattern/tree.txt+182 tests/golden/types-single-case-pattern/types.txt+32 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+49 tests/golden/types-tuple-context/about.txt+4 tests/golden/types-tuple-context/modules.txt+1 tests/golden/types-tuple-context/source.jibb+7 tests/golden/types-tuple-context/tokens.txt+109 tests/golden/types-tuple-context/tree.txt+55 tests/golden/types-tuple-context/types.txt+14 tests/golden/types-union-alias/types.txt+1−1 tests/golden/types-union-branch-context/about.txt+4 tests/golden/types-union-branch-context/source.jibb+54 tests/golden/types-union-branch-context/tokens.txt+237 tests/golden/types-union-branch-context/tree.txt+120 tests/golden/types-union-branch-context/types.txt+24 tests/golden/types-union-branch-pending/about.txt+4 tests/golden/types-union-branch-pending/source.jibb+24 tests/golden/types-union-branch-pending/tokens.txt+102 tests/golden/types-union-branch-pending/tree.txt+48 tests/golden/types-union-branch-pending/types.txt+6 tests/golden/types-union-constructor-shape/about.txt+4 tests/golden/types-union-constructor-shape/source.jibb+5 tests/golden/types-union-constructor-shape/tokens.txt+58 tests/golden/types-union-constructor-shape/tree.txt+24 tests/golden/types-union-constructor-shape/types.txt+12 tests/golden/types-union-context-flow/types.txt+2−2 tests/golden/types-union-finite-context/about.txt+4 tests/golden/types-union-finite-context/modules.txt+1 tests/golden/types-union-finite-context/source.jibb+76 tests/golden/types-union-finite-context/tokens.txt+529 tests/golden/types-union-finite-context/tree.txt+234 tests/golden/types-union-finite-context/types.txt+27 tests/golden/types-union-finite-generic/about.txt+4 tests/golden/types-union-finite-generic/modules.txt+1 tests/golden/types-union-finite-generic/source.jibb+48 tests/golden/types-union-finite-generic/tokens.txt+336 tests/golden/types-union-finite-generic/tree.txt+143 tests/golden/types-union-finite-generic/types.txt+11 tests/golden/types-union-finite-limit/about.txt+4 tests/golden/types-union-finite-limit/modules.txt+1 tests/golden/types-union-finite-limit/source.jibb+35 tests/golden/types-union-finite-limit/tokens.txt+233 tests/golden/types-union-finite-limit/tree.txt+89 tests/golden/types-union-finite-limit/types.txt+10 tests/golden/types-union-finite/about.txt+4 tests/golden/types-union-finite/modules.txt+1 tests/golden/types-union-finite/source.jibb+45 tests/golden/types-union-finite/tokens.txt+238 tests/golden/types-union-finite/tree.txt+110 tests/golden/types-union-finite/types.txt+17 tests/golden/types-union-import/types.txt+1−1 tests/golden/types-union-local-pending/about.txt+4 tests/golden/types-union-local-pending/source.jibb+3 tests/golden/types-union-local-pending/tokens.txt+10 tests/golden/types-union-local-pending/tree.txt+5 tests/golden/types-union-local-pending/types.txt+2 tests/golden/types-union-nonwing-subject/about.txt+4 tests/golden/types-union-nonwing-subject/modules.txt+1 tests/golden/types-union-nonwing-subject/source.jibb+82 tests/golden/types-union-nonwing-subject/tokens.txt+593 tests/golden/types-union-nonwing-subject/tree.txt+257 tests/golden/types-union-nonwing-subject/types.txt+45 tests/golden/types-union-overlap-nested/about.txt+4 tests/golden/types-union-overlap-nested/source.jibb+4 tests/golden/types-union-overlap-nested/tokens.txt+21 tests/golden/types-union-overlap-nested/tree.txt+7 tests/golden/types-union-overlap-nested/types.txt+9 tests/golden/types-union-pattern-result-context/about.txt+4 tests/golden/types-union-pattern-result-context/modules.txt+1 tests/golden/types-union-pattern-result-context/source.jibb+25 tests/golden/types-union-pattern-result-context/tokens.txt+205 tests/golden/types-union-pattern-result-context/tree.txt+96 tests/golden/types-union-pattern-result-context/types.txt+13 tests/golden/types-union-pattern-result-controls/about.txt+4 tests/golden/types-union-pattern-result-controls/modules.txt+1 tests/golden/types-union-pattern-result-controls/source.jibb+55 tests/golden/types-union-pattern-result-controls/tokens.txt+357 tests/golden/types-union-pattern-result-controls/tree.txt+161 tests/golden/types-union-pattern-result-controls/types.txt+30 tests/golden/types-union-patterns-generic/about.txt+4 tests/golden/types-union-patterns-generic/modules.txt+1 tests/golden/types-union-patterns-generic/source.jibb+36 tests/golden/types-union-patterns-generic/tokens.txt+255 tests/golden/types-union-patterns-generic/tree.txt+117 tests/golden/types-union-patterns-generic/types.txt+13 tests/golden/types-union-patterns-import/about.txt+4 tests/golden/types-union-patterns-import/module-trees.txt+8 tests/golden/types-union-patterns-import/modules.txt+1 tests/golden/types-union-patterns-import/modules/ui/lib.jibb+3 tests/golden/types-union-patterns-import/source.jibb+5 tests/golden/types-union-patterns-import/tokens.txt+28 tests/golden/types-union-patterns-import/tree.txt+12 tests/golden/types-union-patterns-import/types.txt+2 tests/golden/types-union-patterns/about.txt+4 tests/golden/types-union-patterns/modules.txt+1 tests/golden/types-union-patterns/source.jibb+74 tests/golden/types-union-patterns/tokens.txt+336 tests/golden/types-union-patterns/tree.txt+152 tests/golden/types-union-patterns/types.txt+25 tests/golden/types-union-phantom-generic/about.txt+4 tests/golden/types-union-phantom-generic/source.jibb+4 tests/golden/types-union-phantom-generic/tokens.txt+21 tests/golden/types-union-phantom-generic/tree.txt+8 tests/golden/types-union-phantom-generic/types.txt+3 tests/golden/types-union-polymorphic-identity/about.txt+4 tests/golden/types-union-polymorphic-identity/module-trees.txt+16 tests/golden/types-union-polymorphic-identity/modules.txt+2 tests/golden/types-union-polymorphic-identity/modules/ui/one.jibb+4 tests/golden/types-union-polymorphic-identity/modules/ui/two.jibb+4 tests/golden/types-union-polymorphic-identity/source.jibb+33 tests/golden/types-union-polymorphic-identity/tokens.txt+368 tests/golden/types-union-polymorphic-identity/tree.txt+152 tests/golden/types-union-polymorphic-identity/types.txt+36 tests/golden/types-union-print-cross-namespace/about.txt+4 tests/golden/types-union-print-cross-namespace/module-trees.txt+6 tests/golden/types-union-print-cross-namespace/modules.txt+1 tests/golden/types-union-print-cross-namespace/modules/ui/lib.jibb+4 tests/golden/types-union-print-cross-namespace/source.jibb+3 tests/golden/types-union-print-cross-namespace/tokens.txt+22 tests/golden/types-union-print-cross-namespace/tree.txt+9 tests/golden/types-union-print-cross-namespace/types.txt+3 tests/golden/types-union-print-distinct/about.txt+4 tests/golden/types-union-print-distinct/module-trees.txt+12 tests/golden/types-union-print-distinct/modules.txt+3 tests/golden/types-union-print-distinct/modules/ui/left.jibb+3 tests/golden/types-union-print-distinct/modules/ui/right.jibb+3 tests/golden/types-union-print-distinct/modules/ui/twin.jibb+3 tests/golden/types-union-print-distinct/source.jibb+11 tests/golden/types-union-print-distinct/tokens.txt+87 tests/golden/types-union-print-distinct/tree.txt+34 tests/golden/types-union-print-distinct/types.txt+9 tests/golden/types-union-print-escape/about.txt+4 tests/golden/types-union-print-escape/source.jibb+5 tests/golden/types-union-print-escape/tokens.txt+20 tests/golden/types-union-print-escape/tree.txt+8 tests/golden/types-union-print-escape/types.txt+2 tests/golden/types-union-print-local/about.txt+4 tests/golden/types-union-print-local/source.jibb+6 tests/golden/types-union-print-local/tokens.txt+28 tests/golden/types-union-print-local/tree.txt+12 tests/golden/types-union-print-local/types.txt+5 tests/golden/types-union-print-nested/about.txt+4 tests/golden/types-union-print-nested/source.jibb+7 tests/golden/types-union-print-nested/tokens.txt+42 tests/golden/types-union-print-nested/tree.txt+17 tests/golden/types-union-print-nested/types.txt+6 tests/golden/types-union-print-same-origin/about.txt+4 tests/golden/types-union-print-same-origin/module-trees.txt+4 tests/golden/types-union-print-same-origin/modules.txt+1 tests/golden/types-union-print-same-origin/modules/ui/shared.jibb+3 tests/golden/types-union-print-same-origin/source.jibb+5 tests/golden/types-union-print-same-origin/tokens.txt+35 tests/golden/types-union-print-same-origin/tree.txt+12 tests/golden/types-union-print-same-origin/types.txt+4 tests/golden/types-union-print-transitive/about.txt+4 tests/golden/types-union-print-transitive/module-trees.txt+8 tests/golden/types-union-print-transitive/modules.txt+2 tests/golden/types-union-print-transitive/modules/ui/base.jibb+3 tests/golden/types-union-print-transitive/modules/ui/mid.jibb+2 tests/golden/types-union-print-transitive/source.jibb+2 tests/golden/types-union-print-transitive/tokens.txt+15 tests/golden/types-union-print-transitive/tree.txt+6 tests/golden/types-union-print-transitive/types.txt+2 tests/golden/types-union-singleton/types.txt+1−1 tests/golden/types-union-tags/types.txt+5−5 tests/golden/types-unit-construction/about.txt+4 tests/golden/types-unit-construction/modules.txt+1 tests/golden/types-unit-construction/source.jibb+29 tests/golden/types-unit-construction/tokens.txt+168 tests/golden/types-unit-construction/tree.txt+71 tests/golden/types-unit-construction/types.txt+32 tests/golden/types-unit-context/about.txt+4 tests/golden/types-unit-context/modules.txt+1 tests/golden/types-unit-context/source.jibb+46 tests/golden/types-unit-context/tokens.txt+489 tests/golden/types-unit-context/tree.txt+220 tests/golden/types-unit-context/types.txt+95 tests/golden/types-unit-patterns/about.txt+4 tests/golden/types-unit-patterns/source.jibb+36 tests/golden/types-unit-patterns/tokens.txt+180 tests/golden/types-unit-patterns/tree.txt+88 tests/golden/types-unit-patterns/types.txt+13 tests/golden/types-value-cycle-shadow/about.txt+4 tests/golden/types-value-cycle-shadow/modules.txt+1 tests/golden/types-value-cycle-shadow/source.jibb+6 tests/golden/types-value-cycle-shadow/tokens.txt+68 tests/golden/types-value-cycle-shadow/tree.txt+32 tests/golden/types-value-cycle-shadow/types.txt+7 tests/golden/types-value-cycle-unsupported/about.txt+4 tests/golden/types-value-cycle-unsupported/modules.txt+1 tests/golden/types-value-cycle-unsupported/source.jibb+11 tests/golden/types-value-cycle-unsupported/tokens.txt+45 tests/golden/types-value-cycle-unsupported/tree.txt+17 tests/golden/types-value-cycle-unsupported/types.txt+8 tests/golden/types-value-cycles/about.txt+4 tests/golden/types-value-cycles/modules.txt+1 tests/golden/types-value-cycles/source.jibb+13 tests/golden/types-value-cycles/tokens.txt+87 tests/golden/types-value-cycles/tree.txt+39 tests/golden/types-value-cycles/types.txt+44 tests/importer/about.txt+41−4 tests/importer/shadow-static.txt+7 tests/importer/shadow.txt+3 tests/importer/small.txt+91 tests/importer/tree.txt+109−18 tests/lib/jibb-api-paths.hoon+104 tests/lib/jibb-bridge.hoon+127−2 tests/lib/jibb-hole-guards.hoon+77 tests/lib/jibb-import-diagnostic.hoon+59 tests/lib/jibb-list-alias-guards.hoon+27 tests/lib/jibb-module-scope.hoon+100−1 tests/lib/jibb-poke-bridge.hoon+88 tests/lib/jibb-proj-guards.hoon+124 tests/lib/jibb-qath-fuel.hoon+52 tests/lib/jibb-qath-source.hoon+34 tests/lib/jibb-tlon-bridge.hoon+29 tests/lib/jibb.hoon+1439−393 tests/type-api-paths/about.txt+3 tests/type-api-paths/api.txt+13 tests/type-api-paths/expected.txt+18 tests/type-api-paths/missing-decl.txt+12 tests/type-api-paths/poke-clash.txt+12 tests/type-api-paths/scry-bad.txt+13 tests/type-api-paths/scry.txt+13 tests/type-api-paths/todo-action.txt+6 tests/type-api-paths/todo-item.txt+6 tests/type-api-paths/todo-sur.txt+12 tests/type-api-paths/todo-update.txt+6 tests/type-api-paths/todos.txt+6 tests/type-api-paths/value-clash.txt+15 tests/type-import-diagnostic/about.txt+15 tests/type-import-diagnostic/expected.txt+112 tests/type-import-diagnostic/mark.txt+5 tests/type-import-diagnostic/nested.txt+11 tests/type-import-diagnostic/source.txt+13 tests/type-import-diagnostic/sur.txt+5 tests/type-import/about.txt+29−7 tests/type-import/expected.txt+130−2 tests/type-import/source.txt+67 tests/type-import/sur.txt+16 tests/type-list-alias/expected.txt+36 tests/type-module-scope/about.txt+9 tests/type-module-scope/expected.txt+54 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+69 tools/golden+18−2 tools/importer-test+1−1 tools/ship+49−7 tools/testdata/clay-fixtures-selftest+109 tools/testdata/selftest+35−3 tools/testdata/ship-selftest+74−1 tools/type-api-paths-test+52 tools/type-hole-guards-test+32 tools/type-import-diagnostic-test+43 tools/type-list-alias-test+33 tools/type-module-scope-test+10−1 tools/type-poke-test+50 tools/type-proj-guards-test+32 tools/type-qath-guards-test+31 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+47−5
@@ -56,13 +56,51 @@ 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, closed local mold aliases and acyclic forward value references. It instantiates generalized top-level definitions when they are used. Acyclic local value definitions can refer forward and generalize variables that are free of their enclosing environment; captured variables and explicit capitals remain shared. Acyclic simple local mold aliases can also refer forward, and are scoped to the body, not its gate's sample. 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; unresolved tags remain pending. Recursive local groups, recursive molds and generic unions remain unsupported. It can infer and generalize atom constraints arising from explicit capitals or bare sample binders, preserve those constraints through aliases, instantiate them independently, and print multiple constraints. Unresolved decimal variables default to `@ud` for inferred types without gates; defaulting inside gate types and other constraint cases remain incomplete. It does not yet check a module, 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, while variable-dependent face merges, tag context across branches, union type printing and ambiguous call-result propagation remain unsupported; function compatibility involving nested `@` and variable-dependent joins remain unsupported except for equal types. The current dependency pass can take quadratic time on long forward chains; the milestone's speed target remains unverified. A separate conservative pass reports unions whose cases are provably disjoint or overlapping and leaves other cases unresolved; it does not claim the mold is checked. Unsupported forms are reported as such, and the partial output says the module has not been checked.
59+The inference fragment supports fixed auras, unrestricted `@`, one-way widening into it and toward aura-family ancestors, generic variables and gates, faced and unfaced cells, cell sample binders, known record field reads, a cell pattern of two or more binders, a complete two-arm loobean branch, a complete two-arm unit-shaped branch, closed local mold aliases and acyclic forward value references. For a supported single syntactic top-level recursive gate, the checker infers the sample first and uses that exact sample, including its field faces, in a monomorphic self placeholder. The completed body must unify with the placeholder before the gate is generalized; incompatible recursive arguments can report the call and argument sites. Uses of generalized top-level definitions instantiate their schemes independently. For a complete loobean branch with one direct self-call arm, the checker can infer the other arm independently and use its closed, fully resolved type to seed the recursive result; it then checks the whole body. Open or pending base types do not seed the result, and other branch shapes still depend on the existing partial inference. A supported single local recursive gate also uses a monomorphic self reference while its body is checked, then generalizes variables free of its enclosing environment; captured variables remain shared. Acyclic local value definitions can refer forward. The checker collects written capitals per `++` before inference, excluding nested definitions: a capital used in an enclosing definition is shared with its locals, even when written later, while a capital introduced only in a local definition is generalized there. Sibling locals can introduce independent capitals with the same spelling; generic mold parameters keep their own scope. Top-level groups of syntactic gates are inferred together with monomorphic placeholders and shared substitutions, then generalized only after the whole group checks; downstream uses and library interfaces instantiate those schemes independently. A dependency graph identifies groups with two iterative depth-first passes; its conservative local-reference edges can reject otherwise valid programs. Supported local mutually recursive gate groups also use shared monomorphic placeholders and generalize only after the group checks, preserving captured outer variables. Some proven non-gate value cycles are diagnosed; other 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 and recursive molds remain unsupported. A directly known named union can instantiate an unconstrained generic gate sample while retaining its origin, generic arguments and faces. Unnamed, pending-tag, recursive, unknown-atom and variable-bound union origins 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. A differing-variable face constraint remains unsupported. When inference forces two distinct explicitly written capitals equal, it reports both source sites; forcing a capital to a concrete type remains unsupported in this fragment. It can infer and generalize atom constraints arising from explicit capitals or bare sample binders, preserve those constraints through aliases, instantiate them independently, and print multiple constraints. Unresolved decimal variables default to `@ud` for inferred types without gates; defaulting inside gate types and other constraint cases remain incomplete. It does not yet check a module, complete imports, general patterns, general deferred constraints, recursive molds, dependency cycles or most errors with both conflicting excerpts. Definite cast and call mismatches, incompatible branches and overlapping union cases report both sites and excerpts. Concrete branch results can join at an explicitly present parent aura or `@`. Some known tuple and record positions acquire matching faces; other variable-dependent face merges, general branch tag context and ambiguous call-result propagation remain unsupported; function compatibility involving nested `@` and variable-dependent joins remain unsupported except for equal types. For a single recursive gate outside a group, the reporting path repeats inference rather than instantiating its generalized interface inside its own body; a group report uses its stored schemes. This adds work, and the current dependency pass can take quadratic time on long forward chains; the milestone's speed target remains unverified. A separate conservative pass reports unions whose cases are provably disjoint or overlapping and leaves other cases unresolved; it does not claim the mold is checked. Unsupported forms are reported as such, and the partial output says the module has not been checked.
6060
61−The separate `jibb-dev/lib/jibb-import.hoon` is an unfinished reader for selected Hoon type graphs. It handles named recursion, nested map, set, queue, list, unit, jar and jug arguments, direct ordered maps, and direct `$^` unions whose source branches can be proved disjoint. It also reads ordered map fields in records when the map arguments are syntactically fixed atom molds and other fields are fixed atom molds or standard collections of static atom molds. Collection names must not be shadowed. The reader can also import a mark door sample, removing its outer sample face and validating its build subject. The reader checks explicit Hoon `$%`, `$?` and `$^` unions against the Grammar’s disjointness rule (doc question 22). 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. Explicit unions in collection arguments remain unsupported; other nested ordered maps, general source-level disjointness and complete integration with the checker remain unfinished. `+golden-types-imports` can consume fixed-aura atoms and nested faced or unfaced cells with valid Jibb face names from caller-supplied reader results for declared `/-` imports; `+golden-types-with-marks` accepts those same shapes from declared mark imports in a separate list. Other forms remain unsupported. Its disjointness proof is conservative and can reject a valid union it cannot prove disjoint. Collection recognition requires the originating `/sur` core. The reader validates direct zuse subjects and Ford subjects consisting of faced imported cores and a validated tail, checking imported cores transitively; it rejects shadowed names, inconsistent core subjects and other subject shapes. For a recursive reference, the reader matches the exact Hoon hold against named arms in validated cores, including transitive Ford imports; it rejects missing, unlabelled or ambiguous origins. Its fixtures include three real Tlon files; `tools/importer-test` compares the internal projection under eval, and the ship test compares the same golden output. `tools/type-import-test` and `tools/type-mark-test` compare bridge reports under eval and on the ship. `tools/clay-fixtures` also passes Clay-built `/sur` molds and mark samples through the Clay-built importer and partial checker.
61+A single-arm cell pattern can bind two or more positions, with its last binder capturing the remaining tail. Duplicate and shadowed names are rejected. A definite non-cell spine fails; an intermediate union or collection that might contain a cell remains unsupported. For a known non-union cell, a separate one-arm rule also accepts structured patterns, including nested literal and wildcard positions, when the existing coverage proof establishes the whole pattern. It binds payloads with their original types and checks result context; unknown, partially covered, union or recursive spines stay unsupported.
6262
63−Callers that have a `/sur` core and a name can use `+read-named`: it checks for a locally declared arm before asking Hoon to evaluate the mold, and reports evaluation failures with the final Hoon trace line. `+read-mold-in` remains available when the caller already has the selected type. The checker currently treats a failed import as unsupported rather than rendering the importer's error.
63+String interpolation infers its pieces in order and preserves substitutions and pending constraints. A piece with a known atom aura, unrestricted `@`, or a tape `(list @tD)` is accepted; an isolated decimal literal takes its normal `@ud` default. A known cell reports that it needs a printer, and an explicitly generic atom asks for an aura at its use site. Loobeans, term singletons, non-tape collections, open types and a type fixed only later remain unsupported in this fragment.
6464
65−`+golden-types-with-prelude` accepts case-local Jibb module sources alongside `/sur` and mark results and the vendored prelude source. It resolves reachable ordinary library modules in dependency order, caching completed interfaces per invocation and exporting supported closed value schemes and simple or nonrecursive generic mold aliases. It reserves names from the supplied prelude, detects missing sources and cycles, and rejects a dependency if its interface cannot be inferred by the fragment. API files, modules with `main`, unsupported definitions and many other features remain outside this subset; the prelude inventory itself is incomplete. The older `+golden-types-with-modules` entry point fails closed for imports because it has no prelude scope. Neither entry point claims the module has been checked.
65+The Hoon bridge translates imported `*` as the any-noun type, directly or within supported nonrecursive cells. The reader may still decline a disjoint tagged union with a noun payload, and recursive imports containing `*` remain unsupported. It accepts an exact fork of the two loobean singletons as `?`, and each singleton separately as `%.y` or `%.n`, including inside supported faced cells. Contextual literals specialize against a loobean singleton. Open `%f`, other values, and other forks containing loobean singletons remain unsupported; recursive Hoon molds containing flags can also fail closed.
66+
67+A bare tag that provably matches no case of a known union reports the union and tag sites. This covers casts, single-argument calls, contextual unit payloads, list items and supported branch arms, including unnamed imported unions. For syntactic tuples, ordered fit replay can identify a missing tag in a nested position; an earlier mismatch or uncertainty stops the replay instead of guessing. Existing tags whose shape or payload does not fit retain the ordinary mismatch; unresolved tags stay pending.
68+
69+A change can replace uniquely named fields on a fully known, faced record spine, including through a nested wing. Replacements receive the field type as context, substitutions and pending constraints are retained, and the resulting type remains the original record. Missing fields, empty changes and definite replacement mismatches report sites; the expected-type site is the edit, since the original field declaration location is not retained. Unknown or partly unfaced spines, ambiguous fields and repeated edits remain unsupported. A cast to a known record also supplies field context to a tuple or record initializer, including nested list and union fields. The expected-type site is the cast mold; the original field declaration location is not retained. Isolated cart-style `init` and `update` expressions infer in this fragment. The complete cart-store source fails closed because store kind and declaration scope are not yet checked.
70+
71+For supported closed unions, the type printer keeps the union’s origin separate from its displayed name. It prints an in-scope name such as `msg` or `msg.lib`, including in records and gates; an accessible imported nongeneric alias may name a transitive union. A nongeneric body-local union that escapes its scope, or an origin without an accessible name, prints its cases separated by spaces, parenthesized when nested. That case-list form is print-only. A supported generic union prints its name and all arguments, including unused arguments; when its name is unavailable, the partial printer reports that limitation instead of dropping its arguments. Two faces for the same imported origin remain compatible; compatibility between distinct union origins, including in gate types, remains unsupported. Some comparisons of generic union arguments also remain unsupported rather than deciding equality or mismatch. The Hoon bridge also translates some imported unnamed unions into this representation; unsupported cases remain errors.
72+
73+Multi-argument calls form one right-nested sample: `f a b c` supplies `[a [b c]]`, with the last argument able to be a cell itself. The fragment fits the complete sample, preserving known faces and shared variables. Known sample positions can provide list or union context to arguments; unknown sample shapes use ordinary inference and some contextual forms remain unsupported. For a definite mismatch, the diagnostic points to a specific argument when it can establish which one failed; otherwise it reports the combined sample.
74+
75+A list literal can be inferred when a cast or known gate sample supplies a list type and the supplied prelude has the validated standard list definition. Empty, nonempty and nested literals work, including contextual union tags in elements; mismatched elements report the item and expected type. Imported Hoon lists share this representation. Under the same known context, `~` and zero-valued term literals fit an empty list, and a two-item unfaced cell `[head tail]` is a cons; cons cells and list literals can be nested. Mismatched heads or tails report both sites. A known list result also supplies context through complete loobean, unit-shaped and list-shaped branches, including recursive and nested branches. Known loobean result context can propagate through supported complete branches and binder-only cell arms, with a final directional fit; a binder-only arm over a union subject remains unsupported. A known gate with an unresolved result variable can also receive an enclosing result type before its argument is inferred, for example allowing `^- (list @t) (id ~)`; unknown callees and unresolved targets retain the conservative path. A known gate sample 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 term-headed pair such as `gap+%s2` follows the same contextual inference as `[%gap %s2]`; its synthetic head uses the pair’s span in diagnostics.
78+
79+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.
80+
81+A known union of `~` and a null-headed cell can be matched by `~` and `[~ value]` arms in either order. The payload binder is checked for shadowing. Unknown subjects, missing or duplicate arms, and unresolved branch results remain unsupported; this fragment infers the prelude’s `fall` and `need` signatures.
82+
83+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, a grouped wing or a supported shallow call can propagate that context through whole-case arms and supported finite loobean refinements, including nested cell and list positions. Other partial-pattern contexts and subject forms remain unsupported. The Grammar’s `step` block infers in this fragment, but its module is not yet checked.
84+
85+A known closed union can also provide context to each arm of a complete loobean or unit-shaped branch in a cast or a call with a known union sample. Nested branches and transparent groups work; a mismatch reports the expected union and the offending arm. General patterns and context through bodies with local definitions remain unsupported, and unrelated unresolved tags stay pending.
86+
87+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 recognizes a direct ordered-map call with two simple named mold operands, as in Tlon `notes.log`, after validating provenance and operand source; revisiting the same map hold fails closed. 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. A bounded fallback also recovers one level of local named tagged unions inside such a union, including Tlon `notes.u-notebook` and `notes.u-notes`. A source-proved nested self-recursive union retains its named owner, including Tlon `notes.import-node`; deeper, mutually recursive or unproven cases stay unsupported. The nested source proof has a 256-visit semantic-node budget, and source-location wrapper peeling is limited to four per node; Hoon evaluation and source scans are not metered. 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.
88+
89+Self-recursive `/sur` molds can cross the bridge as opaque module-and-name identities when their supported source-aware graph passes validation, including one-argument lists containing same-origin recursive references. The real Tlon `notes.import-node` reaches this bridge; it does not unfold or construct the recursive type. Aliases, foreign references, recursive marks, unfolding, construction and field access remain unsupported; the partial printer declines recursive names that are not in scope.
90+
91+The partial checker also recognizes a source-proven Jibb recursive mold consisting of `~` and one faced cell with a fixed-aura head and direct self tail. Its identity includes the defining path and name. It unfolds this shape for supported null and cell construction and for a two-arm null/cell match; static application-path literals use the verified public `qath` alias. The internal prelude defines `qath` as a transparent knot sequence and the public prelude re-exports it. Each inference attempt has 256 unfolding and static-segment steps; parsing and separate retries are not bounded by that limit. Dynamic application-path segments, broader patterns and other recursive shapes remain unsupported. Route and static-file existence checks remain milestone 4.
92+
93+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.
94+
95+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.
96+
97+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.
98+
99+`+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. Qualified wings can also read nested fields of an imported value, instantiating that value’s scheme independently at each use; missing, ambiguous and non-record fields remain unsupported.
100+
101+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`, the doc-exact generic `cmd` union, `same`, `fall`, `need`, `bond`, `lure`, `weld`, `snoc`, `turn`, `flop`, `rear`, `drop`, `skim`, `skip`, `murn`, `join`, `snip`, `levy`, `lien`, `cork`, `corl`, `cury` and `curr`; 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. The same validated template is available when prelude mold aliases are prepared, so supported direct and transitive aliases can use it. 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. A dedicated trusted internal-prelude preparation path also supplies an atom-constrained private comparison scheme for a Jibb-written `gth` wrapper. Ordinary module resolution rejects that primitive path even if a caller supplies a spoofed root or bundle. The low-level prepared interface is still trusted host input; the host must select the vendored sources and canonicalize paths. Primitive execution and shape-based jet recognition are not implemented. Addition, decrement and length remain unavailable until arithmetic constraints distinguish their results from loobeans. 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.
102+
103+`+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.
66104
67105And the design notes:
68106
@@ -73,16 +111,20 @@ And the design notes:
73111| 3. The parser | Why recursive descent (the grammar is LL(2) after the layout pass), the EBNF rule by rule with the node each gives, what the EBNF leaves out and how it's filled in, spacing, and where each error points, with its message |
74112| 4. Printed formats | The token, tree and error formats the golden files hold |
75113
114+The partial checker reserves `proj` in module, local, sample, pattern and import bindings, including bindings inside unsupported source; a field, tag or path segment may still have that spelling. With a known expected record type, it checks selected explicit `(proj record)` calls over closed, uniquely faced records, preserving the source expression, its type, the result type and field axes in the checked interface. Imported and private-prelude dependencies retain the source needed to lower those plans. The checker does not yet lower or execute them. It supports selecting one or more fields in their original order; a single selected field keeps its face and uses one source axis. Reordered fields, unknown or open record spines, some nested contexts and recursive groups with projections remain unsupported. A directional fit of a wider faced record fails closed instead of inserting a projection, including within supported list, unit and record positions. To limit repeated work, record-spine proofs are reused along the same closed spine and stop at 1,024 fields; field boundaries and the special handling of positional calls reset the appropriate proof. Prepared interfaces and their source remain trusted host inputs.
115+
76116## The tree
77117
78118Every node is `[%tag at=span …]`, so `+span-of` finds its span in one place; the few that aren't say so in the `%tree` chapter. The kinds of node:
79119
80120- **Module**: imports (`%sur` for `/-`, `%mark` for `/%`, `%jibb` for `/=`), then definitions (`%mold` for `+$`, `%value` for `++`).
81121- **Expressions** (`expr`): `%lit`, `%str`, `%path`, `%qath`, `%wing`, `%change`, `%pair`, `%unit`, `%group`, `%list`, `%tuple`, `%gate-wide`, `%ctor`, `%call`, `%gate`, `%cast`, `%trace`, `%branch`, `%crash`, and `%body` for an indented body, with its local definitions if it has any.
82−- **Molds as written** (`shape`): `%aura`, `%noun`, `%void`, `%flag`, `%const`, `%ref`, `%tvar`, `%path`, `%apply`, `%cell`, `%union`, `%fn`, `%generic`. A `%union` spans its first through last case and has no lead token; a single case is its own mold. `%generic` spans from the `|$` after a `+$` name through its body.
122+- **Molds as written** (`shape`): `%aura`, `%hole`, `%noun`, `%void`, `%flag`, `%const`, `%ref`, `%tvar`, `%path`, `%apply`, `%cell`, `%union`, `%fn`, `%generic`. A `%hole` retains the span of `_`; an inferred typed path segment retains that span separately from its enclosing segment. A `%union` spans its first through last case and has no lead token; a single case is its own mold. `%generic` spans from the `|$` after a `+$` name through its body.
83123- **Samples, fields and patterns**: a sample is `%bind`, `%face`, `%pun`, `%cell` or `%bare`, since a bare name binds anywhere in a sample; a pattern is `%lit`, `%str`, `%any`, `%bind` or `%cell`.
84124- **Literals** (`lit`) keep the form they matched, their aura and value, and their text as written, which the printers show.
85125
126+The parser accepts type holes. The partial checker records each ordinary hole with its span and validates the obligations created in a value or local definition before generalization. A solved concrete type or an explicitly written in-scope capital resolves a hole; a later use cannot repair it. Independent decimal holes may default to `@ud` when the surrounding inferred type is gate-free; variables reachable from the environment or written capitals are protected from premature defaulting. Structural named-mold holes are diagnosed at their source, while complex named molds, inferred path segments, recursive groups with holes and unresolved constraints remain unsupported. Partial prelude and API interfaces cannot silently export unchecked holes. A separate syntax-tree pass reports duplicate names within a written record at both field sites, including in unused definitions; nested and separate records have independent scopes.
127+
86128The tree keeps everything the checker needs to report an error at the code as written: open and closed brackets give the same node, but every node keeps its span.
87129
88130## Positions and errors
docs/development.md+24−3
@@ -61,7 +61,15 @@ 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-hole-guards-test` | Runs the shared hole-defaulting and API interface guards under eval; the same checks run on the ship |
70+| `tools/type-list-alias-test` | Runs the shared prelude list-alias and provenance guards under eval and on the ship |
71+| `tools/type-qath-guards-test` | Runs source-provenance, recursive unfolding and face guards under eval and on the ship |
72+| `tools/type-proj-guards-test` | Runs projection evidence, name-scope and dependency guards under eval and on the ship |
6573| `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 |
6674| `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 |
6775| `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 |
@@ -69,6 +77,7 @@ git clone https://github.com/urbit/tools /root/src/tools
6977| `tools/ship` | Runs the fake ship: `start`, `stop`, `status`, `log`, `sync <desk>`, `test`, `gen-tests`, `check-commit`, `scry`, `hoon`, `run`, `poke`, `commit`, `mount`, `unmount` |
7078| `tools/testdata/selftest` | Tests `tools/golden` and `tools/hoon` against a stub library, and `tools/doc-blocks` against Markdown it writes |
7179| `tools/testdata/ship-selftest` | Tests `tools/ship`'s test generator and runner against a stub library on the ship |
80+| `tools/testdata/clay-fixtures-selftest` | Tests temporary Clay fixture cleanup and signal handling without a ship |
7281
7382`tools/golden` starts `urbit eval` once and builds the library, which takes about 8 s, then runs every case under `mule`, so a crash fails only its own case.
7483
@@ -78,19 +87,29 @@ git clone https://github.com/urbit/tools /root/src/tools
7887tools/golden # all cases pass
7988tools/importer-test # Hoon importer fixture projections match
8089tools/type-import-test # importer/checker bridge golden report matches
90+tools/type-tlon-test # real Tlon importer/checker report matches
91+tools/type-import-diagnostic-test # direct structured reader diagnostics match
8192tools/type-mark-test # mark/checker bridge golden report matches
93+tools/type-poke-test # source-backed poke/API bridge report matches
94+tools/type-api-paths-test # partial API path analysis report matches
95+tools/type-hole-guards-test # hole defaulting and API guards pass
96+tools/type-list-alias-test # prelude list-alias guards pass
97+tools/type-qath-guards-test # qath source and unfolding guards pass
98+tools/type-proj-guards-test # projection evidence and scope guards pass
8299tools/type-module-scope-test # module/prelude scope golden report matches
83100tools/hoon check-spans-test # prints <<>>
101+tools/hoon itype-unify-test # type-unification controls pass
84102tools/testdata/selftest # 22 checks, 0 failed
85103tools/doc-blocks docs/spec # every jibb block has its case
86104tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
87105tools/ship test # the cases pass as -test arms on the ship
88106tools/testdata/ship-selftest # when tools/ship changed
107+tools/testdata/clay-fixtures-selftest # scratch fixture cleanup without a ship
89108tools/ship check-commit # when the mark or the desks changed
90−tools/clay-fixtures # when the my-app Hoon fixtures or importer changed
109+tools/clay-fixtures # builds example fixtures and real Tlon notes through Clay
91110```
92111
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.
112+`tools/ship test` regenerates `tests/lib/jibb.hoon` and syncs the `jibb-dev` desk before it runs, so commit the regenerated file. Sync preflights and splits large deletion lists into bounded click requests, waiting for each Clay revision; a failure stops later batches. The ship self-test exercises this when switching from the full desk to a smaller fixture desk. 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.
94113
95114## Golden cases
96115
@@ -102,7 +121,9 @@ A case is a folder `tests/golden/<name>/` holding:
102121- optionally, `path.txt`, the logical `/ui/.../*.jibb` path to pass to the compiler; the source remains `source.jibb`.
103122- optionally, an `expect-types:` line in `about.txt` opts the case into `+golden-types`; `types.txt` holds its output plus one newline and `--update` creates it. A `types.txt` also opts in when the line is absent. This interface is provisional while the checker is under construction.
104123- optionally, `imports.txt` selects Hoon `/sur` molds, one `module mold` pair per line. Each module's source goes in `sur/<module>.txt` and is compiled against zuse by both runners. `marks.txt` selects marks, one name per line, with source in `mar/<name>.txt`; both kinds may be supplied together. The reader results go to the partial checker, and a type output is required. Both runners reconstruct fixture text from `%txt` lines and identify the fixture if its compilation crashes; a crash fails the case without discarding its successful parse output. These fixtures currently handle only sources without Ford imports.
105−- optionally, `modules.txt` lists logical `/ui/.../*.jibb` paths, one per line. The corresponding sources live below the case's `modules/ui/` directory. Both runners parse each source at its logical path and compare the combined `module-trees.txt`; `--update` writes that output. A case with type output also supplies these sources and the vendored prelude source to the partial module checker, so it can reserve prelude names. The file opts in even when it lists no sources; use a comment such as `# no module fixtures` for an empty bundle, since zero-byte `%txt` fixtures do not sync reliably on the ship. Blank lines and comment lines are ignored. The checker is partial; its output says what it did and did not check.
124+- 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.
125+
126+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.
106127
107128A 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.
108129
docs/open-questions.md+26−5
@@ -18,12 +18,12 @@ On 2026-10-30, @iko adopted gate-free `eq` arguments and map and set keys, treat
1818
1919## Questions milestone 2 raises
2020
21−Found while writing [prompts/milestone-2.md](prompts/milestone-2.md) and checking it against the doc's examples. The numbering is retained so existing references stay valid. Questions 3, 18, 20, 21 and 22 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 and 33 remain open; the field-order detail in question 32 is being clarified. The other questions are settled.
2222
23231. **Settled: how the prelude identifies jetted functions.** On 2026-10-30, @iko said the prelude functions have working Jibb implementations, and the compiler recognizes their shapes and uses the Hoon versions so jets can fire.
24242. **Settled: how the prelude keeps helpers private.** On 2026-10-30, @iko chose a separate internal prelude module imported by the prelude, without exposing the imported helpers.
25253. **The prelude's inventory.** On 2026-10-30, @iko chose to include all names from the listed Hoon library sections, excluding groups the spec explicitly leaves out. All of 3g is included; its Hoon `tone` is exposed as `tone.hoon`, distinct from the styling type. Hoon 1c `step` is exposed as `step.hoon`, leaving the Grammar example's `step` name available. On 2026-10-30, @iko also approved `%$` as a term literal and pattern, so Jibb can write the `%$` case of Hoon `coin`. For parsing sections 4j and 4l, only the explicitly listed `slav` and `slaw` are included; other parser helpers are left out. Jibb's `not` negates a loobean, and Hoon's bitwise `not` is exposed as `not.bit`. @iko also agreed to specifying the complete exported inventory in the doc, building its types and gates needed by the examples in milestone 2, and doing native implementations in milestone 3. Prelude unions such as spaces, roles and tones need names that other modules cannot shadow. The actual inventory and signatures still need to be specified.
26−4. **Settled: a capital in a local `++`.** On 2026-10-30, @iko said it shares the enclosing `++`'s variable of that name; a different type uses a different capital. The Grammar and Decisions record this alongside the earlier aura rules.
26+4. **Settled: a capital in a local `++`.** On 2026-10-30, @iko said it shares the enclosing `++`'s variable of that name if the enclosing `++` also uses it; otherwise the local `++` introduces and generalizes its own variable. For example, `++ inner |= y=A y` shares `A` with an enclosing gate whose sample is `x=A`, but generalizes its own `A` if the enclosing `++` does not use `A`. A different type uses a different capital. The Grammar and Decisions record this alongside the earlier aura rules.
27275. **Settled: cells of no items or one.** On 2026-10-30, @iko said a single-item cell is the value and `[]` is an error. The theme's `dark=[tones=[…]]`, a record of one field, must still check.
28286. **Settled: a change with no items.** On 2026-10-30, @iko said `m()` is an error. The parser still accepts it; the checker needs to reject it and add a golden case.
29297. **Settled: the doc's blocks that aren't whole modules.** On 2026-10-30, @iko agreed to check each in its intended context: the `cmd` and `sub` definitions as prelude source, the Core language tab's `update` inside the todo island, and the Grammar's imports example against fixture files.
@@ -39,9 +39,30 @@ Found while writing [prompts/milestone-2.md](prompts/milestone-2.md) and checkin
393917. **Settled: empty cases in union disjointness.** On 2026-10-30, @iko said `!!` is disjoint from every case. A cell containing an empty position at any depth is itself empty and is also disjoint from every case.
404018. **The two uses of Hoon `like`.** Hoon `+like` is a wet mold builder, but the gate it returns is callable and applies its supplied gate to the product. In a verified Hoon 135 example, applying `(like f)` to `[[1 2] [7 8 ~]]` produces an edge whose product is `8` when `f` is identity and `42` when `f` returns `42`; the resulting nail is the original input. Jibb molds are types, not callable values. The prelude now declares a generic `(like A)` mold and a `wonk` extractor; both parse, but their full type and backend validation remain outstanding. Should it also expose a value gate under `like`? If so, should the value preserve Hoon's input shape and behavior, or instead map the product of an already constructed edge? @iko is reviewing these alternatives; the exact public signature is not yet decided.
414119. **Settled: Hoon aura families and `step.hoon`.** On 2026-10-30, @iko chose `step.hoon` for Hoon 1c `step`, avoiding a clash with the Grammar example's `step`, and chose one-way widening across Hoon aura families: for example, `@ud` and `@ux` fit `@u`, and `@tD` fits `@t`. The reverse needs a check. The `step.hoon` group representation is not implemented yet.
42−20. **The type of Hoon `clap`.** Hoon allows its two input units and combining gate's result to have different types. If only one unit is present it returns that unit; when both are present it returns the combining gate's result. Jibb branches normally need a common type, while every union written in Jibb has a name. Should the Jibb gate require a shared type, infer an unnamed union of the possible values, or wait for a different typing design? Asked @iko on 2026-10-30. `clap` is not implemented while this is open.
43−21. **Duplicate faces in imported Hoon records.** Hoon permits `[a=@ud a=@t]`, and its lookup picks the first `a`. Should Jibb reject the imported type where it is used, use the first field, or permit the type but reject access to the ambiguous field? Asked @iko on 2026-10-30. The inference fragment currently permits the type but declines ambiguous field access (doc question).
44−22. **Overlapping imported `$%` and `$?` cases.** The Grammar says a union whose cases don't all differ as nouns is rejected, while the import table explicitly mentions that condition only for `$^`; its `$%` and `$?` row says they become a union. Does the general disjointness rule reject imported `$%` and `$?` cases such as `[%x @ud]` and `[%x @t]` where the type is used? Asked @iko on 2026-10-30. The general rule is the provisional reading (doc question); the importer rejects recognizable overlaps and fails closed when it cannot verify them.
42+20. **Settled: the type of `clap`.** On 2026-10-30, @iko chose one shared value type for both units and the combining gate. If either unit is absent, `clap` returns the other; if both are present, it applies the gate to their values and wraps the result.
43+21. **Settled: duplicate faces in imported Hoon records.** On 2026-10-30, @iko chose to reject an imported Hoon record with duplicate field names where its type is used. Hoon permits `[a=@ud a=@t]` and picks the first `a`; Jibb rejects it.
44+22. **Settled: overlapping imported `$%` and `$?` cases.** On 2026-10-30, @iko confirmed that the general union disjointness rule rejects imported `$%` and `$?` cases that overlap as nouns where the type is used, as it does for `$^`. The importer rejects recognizable overlaps and fails closed when it cannot verify them.
45+23. **Settled: converging explicit capitals.** On 2026-10-30, @iko chose that a body cannot force two separately written capitals to be equal. For `++ repeated |= x=(choice A A) x`, `++ f |= x=(choice A B) (repeated x)` is an error; use `A` in both positions when the type must be shared. This also applies across local captures and within generic mold applications.
46+
47+24. **Settled: how the internal prelude provides `poke`.** On 2026-10-31, @iko chose to define `poke` in the source-backed private internal prelude module and re-export it through the public prelude as an ordinary transparent type. Ordinary modules can construct and inspect its values. This settles `poke`; it does not decide the representation of `ask` or `qath`.
48+
49+25. **Settled: how the prelude provides `ask` and `qath`.** On 2026-10-31, @iko chose ordinary transparent types defined in the internal prelude and re-exported normally, as for `poke`. Callers may construct and inspect their values.
50+
51+26. **Settled: the `step` example's `at` binder.** On 2026-10-31, @iko chose to rename the `describe` pattern binder to `sent-at`, keeping Hoon's `at` in the prelude and the no-shadowing rule.
52+
53+27. **Settled: duplicate fields in a Jibb-written record.** On 2026-10-31, @iko chose to reject duplicate field names, as for imported Hoon records.
54+
55+28. **Settled: arithmetic on loobeans.** On 2026-10-31, @iko chose to reject loobean operands for arithmetic. Comparison may still accept loobeans and returns `?`. The checker needs to retain this constraint through inference, generalization and instantiation before it exports `add` or `dec`.
56+
57+29. **Settled: printing the arithmetic atom constraint.** On 2026-10-31, @iko chose `where A is an atom other than ?` for a generic arithmetic type whose atom variable excludes loobeans.
58+
59+30. **Settled: a hole inferred as a generic variable.** On 2026-10-31, @iko said a hole resolved to an explicitly written type variable counts as inferred: in `++ id |= x=A ^- _ x`, the result hole is `A`. Named molds must determine their own holes without constraints from later uses; an unconstrained hole is an error.
60+
61+31. **Settled: uses of a value with a hole.** On 2026-10-31, @iko said a value definition must determine its own holes; another definition's use cannot fix an otherwise unresolved hole. For example, `++ id |= x=_ x` remains an error even if a later definition calls `id` with a cord.
62+
63+32. **Partly settled: type-directed record projection.** On 2026-10-31, @iko chose an explicit `(proj record)` whose expected result type selects the fields. There is no automatic projection, and `proj` is reserved against definitions and imports. The result contains exactly the fields of its expected type. Whether the result may reorder fields from the source remains open.
64+
65+33. **Watching a request with unknown provenance.** An island cannot watch an API case that needs a separate scry path, but `ask` is transparent and a request can be constructed, selected or passed through a gate. If the checker cannot prove whether a request is watchable, must it reject the watch, or can a runtime check decide? Asked @iko on 2026-10-31; proposed: require proof at compile time, so the stated island restriction holds before execution.
4566
4667## Grammar questions never put to the doc's author
4768
docs/prelude-inventory.md+16−8
@@ -4,12 +4,18 @@ 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. `qath` is defined there as a transparent recursive knot sequence and re-exported by the public prelude; the partial checker supports its named identity, selected construction and matching, and static application-path literals. `ask` is not yet defined there.
8+
9+The prelude also declares the generic `cmd` mold exactly as in Overview, Effects. The partial checker infers its five cases and independent message types in the supported examples; complete module checking and backend validation remain outstanding. The related `sub` declaration awaits the source representation and checking of `ask`.
10+
711Hoon `+$` 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.
812
913## 1a
1014
1115`add`, `dec`, `div`, `dvr`, `gte`, `gth`, `lte`, `lth`, `max`, `min`, `mod`, `mul`, `sub`.
1216
17+The source-backed `gth` gate calls a compiler-supplied private comparison interface. The partial checker accepts supported equal-aura atom arguments, including loobeans, and returns `?`; lowering, jet recognition and execution remain unfinished. `add` and `dec` are not yet exposed: treating every atom-constrained type as closed under arithmetic would incorrectly infer loobean results for operations that can produce other atoms.
18+
1319## 1c
1420
1521`bite` (mold), `bloq` (mold), `each`, `gate` (mold), `list`, `lone`, `lest`, `mold` (mold), `pair`, `pole`, `qual`, `quip`, `step`, `trap`, `tree`, `trel`, `unit`.
@@ -20,30 +26,30 @@ Hoon `+$` arms are marked **mold** below; `++` arms can be gates, doors or mold
2026
2127`biff`, `bind`, `bond`, `both`, `clap`, `clef`, `drop`, `fall`, `flit`, `hunt`, `lift`, `mate`, `need`, `some`.
2228
23−The following is an audit of the Hoon 135 bodies, not a completed Jibb interface. The current Jibb implementations have only been parsed; the checker and backend do not yet validate or run them.
29+The following is an audit of the Hoon 135 bodies, not a completed Jibb interface. The partial checker infers `fall`, `need`, `some`, `bind`, `biff`, `bond`, `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.
2430
2531| Name | Hoon behavior | Jibb status |
2632| --- | --- | --- |
2733| `biff` | Applies a gate returning a unit to a present value; absent stays absent. | Written |
2834| `bind` | Applies a gate to a present value and wraps the result; absent stays absent. | Written |
29−| `bond` | Calls a fallback trap for an absent unit, otherwise returns its value. | Missing |
35+| `bond` | Calls a fallback trap for an absent unit, otherwise returns its value. | Written and inferred as a curried gate; backend validation remains outstanding |
3036| `both` | Returns a unit of both values when both units are present. | Written |
31−| `clap` | Returns the present unit if only one is present; combines both values with a gate if both are present. | Missing; Hoon permits different input and output types |
37+| `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 |
3238| `clef` | Applies a gate returning a unit when both inputs are present; otherwise returns an absent unit. | Written |
33−| `drop` | Converts an absent unit to an empty list and a present unit to a singleton. | Written |
34−| `fall` | Returns the value of a present unit or the supplied fallback. | Written |
35−| `flit` | Returns a gate that wraps a value only if it satisfies the predicate. | Missing |
39+| `drop` | Converts an absent unit to an empty list and a present unit to a singleton. | Written; inferred by the partial checker |
40+| `fall` | Returns the value of a present unit or the supplied fallback. | Written; inferred by the partial checker |
41+| `flit` | Returns a gate that wraps a value only if it satisfies the predicate. | Written |
3642| `hunt` | Returns the only present unit or chooses between two present values with an ordering gate. | Missing |
3743| `lift` | Takes a mold and a unit, then applies the mold to a present value as `bind` does. | Missing; Jibb molds are not callable values |
3844| `mate` | Returns the present unit if only one is present; when both are present it returns one if their values are equal and crashes otherwise. | Missing |
39−| `need` | Extracts a present value and crashes on an absent unit. | Written |
45+| `need` | Extracts a present value and crashes on an absent unit. | Written; inferred by the partial checker |
4046| `some` | Wraps a value in a present unit. | Written |
4147
4248## 2b
4349
4450`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`.
4551
46−The current prelude writes `snoc`, `lure`, `flop`, `levy`, `lien`, `reel`, `roll`, `skim`, `skip`, `turn` and `weld`. The folds take an explicit initial value as the Prelude table specifies. These implementations still need checker and backend validation.
52+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`, `snip`, `levy` and `lien` using the validated prelude `list` mold; other list helpers remain limited by that fragment. The result casts on `drop`, `skim`, `skip`, `murn`, `join`, `snip`, `levy` and `lien` state their existing result types without changing their bodies. Backend validation remains outstanding for all of them.
4753
4854## 2c
4955
@@ -93,6 +99,8 @@ The current prelude writes `snoc`, `lure`, `flop`, `levy`, `lien`, `reel`, `roll
9399
94100`aftr`, `cork`, `corl`, `cury`, `curr`, `fore`, `head`, `same`, `succ`, `tail`, `test`, `lead`, `late`.
95101
102+The source-backed `cork` and `corl` compose gates forward and backward, respectively; `cury` and `curr` bind the first and second item of an unfaced pair. The partial checker infers their polymorphic types. Their runtime implementations remain to be validated by a backend.
103+
96104## 2o
97105
98106`jar`, `jug`, `map`, `qeu`, `set`.
docs/prompts/milestone-2.md+9−7
@@ -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.
@@ -59,16 +59,18 @@ And from the plan's Risks:
5959The rules are scattered across the tabs. This is a map of them, not a replacement: read each in place, and where this summary and the doc differ, the doc is right.
6060
6161**Types and inference** (Grammar: Molds, Modules, Runes, Expressions; Decisions: Inference, Type variables, Sample names, Inline gates)
62−- Hindley–Milner with aura variables: "every expression has a principal type, and there is no general subtyping". A specific atom fits `@`, a specific noun fits `*`, and a more specific aura fits an ancestor in its Hoon aura family, each only in that direction; the reverse needs a check.
62+- Hindley–Milner with aura variables: "every expression has a principal type, and there is no general subtyping". A specific atom fits `@`, a specific noun fits `*`, and a more specific aura fits an ancestor in its Hoon aura family, each only in that direction; the reverse needs a check. Explicit `proj` is a type-directed operation.
6363- `@` means any atom, independently at each occurrence. A specific atom such as `@ud` fits where `@` is expected; an `@` value needs a check to fit `@ud`. `@ud` and `@ux` also fit `@u`, and `@tD` fits `@t`, following Hoon aura families; the reverse needs a check. Distinct specific auras remain distinct. `add` takes `[A A]` and returns `A`, with an atom constraint inferred for the shared type variable.
64+- The reserved, explicit `(proj record)` selects fields according to its expected result type. The checker records the projection and lowering evaluates the source once and builds that layout. A direct call does not insert a projection, and a module cannot define or import another `proj`.
6465- Faces are part of record types: `[a=@ b=@]` and `[x=@ y=@]` don't unify. An unnamed position can unify with a faced one and take its face, so `[0 0]` fits `[x=@ud y=@ud]`. A single-item cell `[a]` is `a`; an empty `[]` is an error.
65−- Type variables are capitals, "generalized per `++`". A capital in a local `++` shares the enclosing `++`'s variable of that name; a different type takes a different capital. "A type variable used where an atom is required gains an atom constraint", so `++ clamp |= [lo=A hi=A n=A]`, calling `gth` and `max`, works on any one aura; "It can become nothing more specific: a body that makes `A` a `@ud` or a list is an error." Names "may refer to each other in any order", so infer `++` definitions in dependency order, a group of mutually recursive ones together.
66+- Type variables are capitals, "generalized per `++`". A capital in a local `++` shares the enclosing `++`'s variable of that name if the enclosing `++` also uses it; otherwise the local `++` introduces and generalizes its own variable. For example, `++ inner |= y=A y` shares `A` with an enclosing gate whose sample is `x=A`, but generalizes its own `A` if the enclosing `++` does not use `A`. A different type takes a different capital. A body cannot force two distinct capitals to be equal; use the same capital where a type is shared. "A type variable used where an atom is required gains an atom constraint", so `++ clamp |= [lo=A hi=A n=A]`, calling `gth` and `max`, works on any one aura; "It can become nothing more specific: a body that makes `A` a `@ud` or a list is an error." Names "may refer to each other in any order", so infer `++` definitions in dependency order, a group of mutually recursive ones together.
6667- The checker infers a gate-free constraint for `eq` arguments and map and set keys and retains it when a type variable is generalized. The requirement applies recursively to nested values; union-case matching treats gates as opaque. Print a gate-free constraint as `$-([A A] ?) where A contains no gates` and an atom constraint as `$-([A A] A) where A is an atom`; separate multiple clauses with commas, as `where A is an atom, B contains no gates`.
6768- Gates may call themselves and their siblings; a non-gate value that depends on itself, even through a gate, is an error. Molds may be recursive, and "recursive molds go by name and module".
6869- 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 ~)`.
6970- 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]`.
7071- `!!` 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.
72+- `_` is an inferable hole wherever a mold can appear, including an inferred path-segment aura. A hole resolved to an explicitly named generic variable is resolved; an unconstrained hole is an error. A named mold or value definition must determine its own holes without constraints from later uses.
73+- `poke`, `ask` and `qath` are transparent types defined in the internal prelude and re-exported normally. Derived gates and `pure` also construct requests; application-path literals have type `qath`.
7274- 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`.
7375
7476**Tags, `~`, numbers and cells wait for their context** (Grammar: Tag resolution, Literals by context)
@@ -98,7 +100,7 @@ The rules are scattered across the tabs. This is a map of them, not a replacemen
98100- `main`'s type decides a module's kind: `(element !!)` a page, `(page R D)` a page with data, `(program D X M)` an island, `(store S)` a store; no `main`, a library.
99101
100102**Importing Hoon types** (overview: Importing Hoon types; Decisions: Hoon types)
101−- The table: `$%` and `$?` become a union; `$@` a union with an atom case; `$^` a union if its cases differ as nouns, else an error where used; `$~` dropped; `map`, `set`, `qeu`, `jar`, `jug` the same, by name; `mop` as `(mop K V)`, read with `on`; other `$|` their base type; `%0`, `%&` and `%|` tags; recursive molds recursive, matched by name; cores, gates, vases, signed and float auras an error where used.
103+- The table: `$%`, `$?` and `$^` become unions only if their cases differ as nouns, else an error where used; `$@` a union with an atom case; `$~` dropped; `map`, `set`, `qeu`, `jar`, `jug` the same, by name; `mop` as `(mop K V)`, read with `on`; other `$|` their base type; `%0`, `%&` and `%|` tags; recursive molds recursive, matched by name; imported records with duplicate field names, cores, gates, vases, signed and float auras are errors where used.
102104- "Unused molds are skipped, so unsupported constructs elsewhere in a `/sur` file are fine." A field's unnamed union imports too, although Jibb cannot write one.
103105
104106**Islands, pages and stores** (overview: The Elm architecture on Urbit; Grammar: Modules and the store example)
@@ -113,13 +115,13 @@ The rules are scattered across the tabs. This is a map of them, not a replacemen
113115
114116**The prelude** (overview: Prelude, Layout and styling, Links and URLs, Effects)
115117- Hoon's standard library regrouped, "written in Jibb and vendored as `/lib/jibb/prelude`", plus `eq`, `not`, `page`, `program`, `store`, `pure`, `island`, the layout elements and molds, `attr`, `theme`, and `cmd` and `sub` as the overview's Effects block writes them.
116−- Signatures change where the Prelude table says: maps and sets are plain gates over Hoon's trees, as `(get.by m k)`; folds take a start, as `(roll xs init f)`, `rep.by` and `rep.in`; ordered maps go through lull's `on`, as `(get.on lte m k)`.
118+- Signatures change where the Prelude table says: `clap` takes two units of one value type and a combining gate over that type; maps and sets are plain gates over Hoon's trees, as `(get.by m k)`; folds take a start, as `(roll xs init f)`, `rep.by` and `rep.in`; ordered maps go through lull's `on`, as `(get.on lte m k)`.
117119- Left out: signed and float gates, parser helpers outside 3g other than the explicitly listed `slav` and `slaw`, and the table's "The rest" (1b, 2p, 3d, 3f, 4c, 4n, 4o, 5a–5f); "`jam`, `cue` and `fein` run inside the runtime".
118120- Write the prelude in Jibb, enough to give every name its type. Foundational gates use private low-level primitives from the internal prelude module. Jetted functions have working Jibb implementations; the compiler recognizes their shapes and uses the Hoon versions so jets can fire. They may take gates as arguments; the Nock backend comes in milestone 3.
119121- Element signatures are in the Layout and styling table. Paths and unchecked cords have separate declarations, with `link-unsafe`, `image-unsafe` and `go-unsafe` for the unchecked forms. Both navigation declarations produce `[%go url=@t]`; `go` converts its application path to a cord including the app's base path. "The same attribute twice in a literal list is an error."
120122
121123**Errors**
122−- Each one the Grammar tab describes needs a golden case with its message. A start on the list: an aura mismatch; mismatched faces; "msg has no case %submitt"; an unresolved tag, as the Grammar's `add-button` ("nothing fixes the union of %add"); an open constraint at the end of a module; a `|=%tag` whose union has no such case tagged at its head; a union whose cases overlap; a missing `?-` case, named; an arm that earlier arms cover; a value that refers to itself; a shadowed name, including a prelude or imported one; a cell in `{…}` with no printer; an atom of a generic aura in `{…}` or a path's `(…)`; a capital that a body makes a `@ud` or a list; `~[text "hi"]`, where the checker suggests `~[(text "hi")]`; clashing derived names; an import cycle; from an import, a signed or float aura, a core, gate or vase, or a `$^` whose cases don't differ as nouns, each where used; a `(facts …)` outside an API file's `paths`; a gate in island data or a model, naming the field; a repeated attribute in a literal list. Read the Grammar tab, and the other tabs' mentions of "error" and "the checker", and make the list complete.
124+- Each one the Grammar tab describes needs a golden case with its message. A start on the list: an aura mismatch; mismatched faces; "msg has no case %submitt"; an unresolved tag, as the Grammar's `add-button` ("nothing fixes the union of %add"); an open constraint at the end of a module; a `|=%tag` whose union has no such case tagged at its head; a union whose cases overlap; a missing `?-` case, named; an arm that earlier arms cover; a value that refers to itself; a shadowed name, including a prelude or imported one; a cell in `{…}` with no printer; an atom of a generic aura in `{…}` or a path's `(…)`; a capital that a body makes a `@ud` or a list; `~[text "hi"]`, where the checker suggests `~[(text "hi")]`; clashing derived names; an import cycle; from an import, a signed or float aura, a core, gate or vase, or a `$%`, `$?` or `$^` whose cases don't differ as nouns, or a record with duplicate field names, each where used; a `(facts …)` outside an API file's `paths`; a gate in island data or a model, naming the field; a repeated attribute in a literal list. Read the Grammar tab, and the other tabs' mentions of "error" and "the checker", and make the list complete.
123125- For a `+$` whose cases overlap or do not fit, suggest that a record or tuple leaves its `[` open on the `+$` line. `+$ pt` above `@t` and `[@ud @ud]` is a valid union.
124126- "Each error names both conflicting sites, with excerpts." Today's `error` is `[file line col msg]`, a start only; spans keep each node's end so that a type error can underline both sites.
125127- Messages name things in the doc's words and quote the code they're about in backticks, as milestone 1's do. Their wording is fixed by the golden tests once written.
docs/spec/core-language.md+2−1
@@ -71,7 +71,7 @@ axis = digit { digit } ; (* at least 1 *)
7171
7272## Lowering from Jibb
7373
74−Types, faces and casts leave nothing behind; everything else lowers by these rules.
74+Types, faces and casts leave nothing behind. Everything else lowers by these rules.
7575
7676| Jibb | Core language |
7777| --- | --- |
@@ -82,6 +82,7 @@ Types, faces and casts leave nothing behind; everything else lowers by these rul
8282| `gap+%s2` | `(cons %gap %s2)` |
8383| `/posts/~zod`, `%/blog/(slug)` | A list of knots, typed segments printed by their aura's native; the runtime adds the base path to an application path |
8484| `title.p`, `space.theme.theme` | `slot` at the field's axis, nested for longer wings |
85+| `(proj record)` | Apply a `lam` to the source once; its body constructs the expected record from the required fields using `slot` and `cons`, discarding extra fields |
8586| `card.card`, an import | The qualified name `components/card:card` |
8687| `m(draft=t error=~)` | One `edit` per item, in order: `(edit 7 (edit 6 m t) ~)` |
8788| `f a b c` | `(app f (cons a (cons b c)))`: the arguments are the sample |
docs/spec/decisions.md+11−6
@@ -26,23 +26,27 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
2626| Definitions | `++` for values, `+$` for molds; no `=/` | Decided |
2727| Unions | No `$?`: a `+$` with its cases on the lines below is a union, so every union written in Jibb has a name; one case is just that mold; a mold that isn't a union counts as a union of one case for tags and `\|=%tag`; a generic's `\|$` comes right after the `+$`'s name; tags anywhere; cases differ as nouns, with `?` treated as the two atoms `%.y` and `%.n`, disjoint from cells and overlapping constants 0 and 1, and `!!` or any cell with an empty position disjoint from every case; a tag literal or `~` waits for its union, and an unresolved one is an error | Decided 2026-10-30 |
2828| Printed unnamed unions | Print the cases separated by spaces, as `%approve %deny`; this is print-only, not Jibb syntax | Decided 2026-10-30 |
29−| Printed type constraints | Print an atom constraint as `$-([A A] A) where A is an atom` and a gate-free constraint as `$-([A A] ?) where A contains no gates`; separate multiple clauses with commas, as `where A is an atom, B contains no gates` | Decided 2026-10-30 |
29+| Printed type constraints | Print an atom constraint as `$-([A A] A) where A is an atom`, an arithmetic atom constraint as `where A is an atom other than ?`, and a gate-free constraint as `$-([A A] ?) where A contains no gates`; separate multiple clauses with commas, as `where A is an atom, B contains no gates` | Decided 2026-10-31 |
3030| Branching | `?-` only, loobeans included; exhaustive, with explicit catch-alls; covered arms are errors; failures say `!!` | Decided 2026-10-29 |
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`, `ask` and `qath` are transparent types defined in the internal prelude and re-exported normally; derived gates and `pure` also construct requests; islands read agents only by watching; replies get full state, and diffs take a fold; timers carry the time; `%who` gives the owner's `@p`; nacks reach replies as text | Decided 2026-10-31 |
35+| Poke representation | The source-backed private internal prelude module defines `poke`, and the public prelude re-exports it as an ordinary transparent type. Ordinary modules can construct and inspect its values | Decided 2026-10-31 |
3536| Agent APIs | `/ui/api/<agent>.jibb` with `+$ poke` and `+$ paths`, over the agent's mark types; a case is a name, a path and a type, with `(facts full diff …)` for diffs, told apart by mark; an optional scry path, for pages; an island watching such a request has a type error; typed segments by aura | Decided 2026-10-30 |
3637| Mark names | Any name: `/%` names types after marks, and constructors poke with their type's mark; no alias marks | Decided 2026-10-26 |
3738| Derived gates | API files and stores give a constructor per poke type and a checked request per path or store state; clashing names are errors, including a derived name that clashes with an import face | Decided 2026-10-30 |
38−| Hoon types | A fixed translation table; `map`, `set`, `qeu`, `jar`, `jug` by name; `mop` as `(mop K V)`, read with `on`; unused molds skipped | Decided 2026-10-29 |
39+| Hoon types | A fixed translation table; `map`, `set`, `qeu`, `jar`, `jug` by name; `mop` as `(mop K V)`, read with `on`; imported `$%`, `$?` and `$^` cases must differ as nouns, and records with duplicate field names are errors where used; unused molds skipped | Decided 2026-10-30 |
40+| Record fields | Duplicate field names in a Jibb-written record are an error, as they are in an imported Hoon record | Decided 2026-10-31 |
41+| Record projection | The explicit type-directed operation `proj` takes a record and uses its expected result type to select its fields; no projection is inserted automatically. `proj` is reserved and cannot be defined or imported under that name. The result has exactly the fields declared by its type | Decided 2026-10-31 |
3942| Layout | Indentation; juxtaposed calls; a bracket open at line end takes one item per line, with no closer | Decided |
4043| Elements | Ordinary gates; containers take attribute lists; `stack` switches at `wide`; `el` adds attributes and wins; headings 1 to 6; `form` sends on Enter, the innermost when nested; `image` from an application path, sized from the file, or a sized URL; no focus control for now | Decided 2026-10-29 |
4144| Long calls | One argument per line inside parentheses | Decided |
4245| Inline gates | Hoon's wide form; the mold may be inferred; a bare sample name binds; `\|=%got` is a case's constructor, typed by the gate expected; a bare tag is always a value | Decided 2026-10-29 |
4346| Empty mold | `!!`, with no values; the expression has any type; pages are `(element !!)`, which keeps islands out of islands | Decided 2026-10-29 |
4447| Noun mold | `*` is the noun type, not a type variable; use a capital for a generic type; a value of a more specific noun type can be used where `*` is expected | Decided 2026-10-30 |
45−| Type variables | Capitals, generalized per `++`; a capital in a local `++` shares the enclosing `++`'s variable of that name, and a different type takes a different capital; one used where an atom is required gains an inferred atom constraint, and cannot be fixed to a more specific type in its body | Decided 2026-10-30 |
48+| Type variables | Capitals, generalized per `++`; a capital in a local `++` shares the enclosing `++`'s variable of that name if the enclosing `++` also uses it; otherwise it is introduced and generalized locally; a different type takes a different capital; a body cannot force distinct capitals to be equal, so a shared type uses the same capital; one used where an atom is required gains an inferred atom constraint, and cannot be fixed to a more specific type in its body | Decided 2026-10-30 |
49+| Partial type annotations | `_` may appear wherever a mold may appear and marks that part of the type for inference; a hole inferred as a named type variable is resolved; an unconstrained hole is an error, and a named mold or value definition must determine its own holes without constraints from later uses | Decided 2026-10-31 |
4650| Loobean mold | `?`, switched with `?-` | Decided 2026-10-26 |
4751| Defaults | None | Decided |
4852| Modules | Records, not cores | Decided |
@@ -51,6 +55,7 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
5155| Binding patterns | In `?-` arms; the last position binds the rest | Decided 2026-10-29 |
5256| Text | Strings are written only as `"…"` and are always cords; tapes come from `trip`; `{…}` prints by aura, a bare `@` as `@ud`, and an atom whose aura its `++` is generic over is an error; `print-date` prints Urbit-style to the minute in the theme's zone, from jibb-dev's zone table; numbers keep Hoon's form | Decided 2026-10-30 |
5357| Auras | Specific auras stay distinct; `@` is any atom, a more specific aura fits an ancestor in its Hoon aura family one way, with the reverse requiring a check, and shared atom-constrained type variables preserve the same aura | Decided 2026-10-30 |
58+| Loobean arithmetic | Arithmetic rejects loobean operands; comparison may accept them and returns `?` | Decided 2026-10-31 |
5459| Crashes | As in Hoon; an island keeps its model and shows the standard notice; a failing page, or one rendering a control outside an island, gets Jibb's error page; no render limit, so an endless render stalls the ship | Decided 2026-10-29 |
5560| Refinement types | None | Decided |
5661| Imports | `/-`, `/%` (a mark's type, with no face) and `/=`; no `/+`; cycles are errors | Decided 2026-10-29 |
@@ -67,7 +72,7 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
6772| 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 |
6873| Transactions | None; one poke per command | Decided |
6974| 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 |
75+| 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 |
7176| 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 |
7277| 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 |
7378| Layout vocabulary | Jibb's elements and theme tokens; the stylesheet comes from the theme alone; chars and fill are inline; `[%fill n]` below 1 counts as 1 | Decided 2026-10-29 |
@@ -76,7 +81,7 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
7681| Dark mode | Hand-written dark tones under `dark`, used when the reader prefers dark | Decided 2026-10-27 |
7782| Links | All text escaped; in-app links are application paths, as `%/blog/(slug)`, with no query or fragment, checked at compile time against routes and static files; paths and unchecked `https`, `mailto` and `tel` URLs and root-relative cords such as `"/apps/groups"` have separate declarations; `link-unsafe`, `image-unsafe` and `go-unsafe` are the unchecked forms; both navigation declarations produce `[%go url=@t]`, with `go` converting the path to a cord including the app's base path; other cords render as text; a CSP on every page | Decided 2026-10-30 |
7883| Data layer | Hoon's nouns: units, treaps, loobeans | Decided |
79−| Prelude | Hoon's standard library regrouped: all names from the listed sections except explicitly excluded groups, including all of 3g, with Hoon's `tone` exposed as `tone.hoon` and Hoon's 1c `step` as `step.hoon`; arithmetic over aura variables, units, lists, maps, sets, queues, ordered maps, function helpers, text, atom printing, a zoned date printer, time and data molds; folds take a start; jetted functions have working Jibb implementations, whose shapes the compiler recognizes to use the Hoon versions, and may take gates; private helpers and low-level primitives live in a separate internal module imported without exposing them, with public foundational gates implemented in Jibb on those primitives; no signed or float gates, or parser gates outside 3g except `slav` and `slaw`; signed or float auras are errors | Decided 2026-10-30 |
84+| Prelude | Hoon's standard library regrouped: all names from the listed sections except explicitly excluded groups, including all of 3g, with Hoon's `tone` exposed as `tone.hoon` and Hoon's 1c `step` as `step.hoon`; arithmetic over aura variables, units, lists, maps, sets, queues, ordered maps, function helpers, text, atom printing, a zoned date printer, time and data molds; folds take a start; jetted functions have working Jibb implementations, whose shapes the compiler recognizes to use the Hoon versions, and may take gates; private helpers and low-level primitives live in a separate internal module imported without exposing them, with public foundational gates implemented in Jibb on those primitives; `clap` takes two units of the same type and a combining gate over that type; no signed or float gates, or parser gates outside 3g except `slav` and `slaw`; signed or float auras are errors | Decided 2026-10-30 |
8085| Wire format | Noun channels; Jibb's own noun codec in the browser | Decided 2026-10-29 |
8186| Hosting | One thin host agent on `%jibb` binds, caches and serves every Jibb desk; each desk vendors jibb-dev, names its base path in docket's `site+`, and builds and renders with its own copy through fixed entry points; install `%jibb` first; app agents stay plain Hoon; pokes only from the ship | Decided 2026-10-29 |
8287| Private pages | Served by the host per request and never cached; non-owners go to the login page | Decided 2026-10-29 |
docs/spec/grammar.md+14−12
@@ -91,7 +91,7 @@ Imports come first:
9191/= card /ui/components/card :: a Jibb module
9292```
9393
94−`/%` names a type after its mark, so it takes no face, and any mark name works; Hoon's `/%` binds the mark's core instead. Derived constructors such as `todo-action.todo` supply the agent and mark, so code never writes one. API modules re-export their `/%` types, not `/-` faces or `/=` modules. Import cycles are errors.
94+An imported Hoon record with duplicate field names is an error where used; imported union cases must differ as nouns. `/%` names a type after its mark, so it takes no face, and any mark name works; Hoon's `/%` binds the mark's core instead. Derived constructors such as `todo-action.todo` supply the agent and mark, so callers need not write those details. API modules re-export their `/%` types, not `/-` faces or `/=` modules. Import cycles are errors.
9595
9696## Modules
9797
@@ -118,21 +118,23 @@ Every other name is free.
118118
119119## Molds
120120
121−A mold is only a type: never called on a noun, and with no default. Types are inferred, Hindley–Milner with aura variables: every expression has a principal type, and there is no general subtyping. These one-way widenings are allowed: a value of a specific atom type fits `@`, a value of a specific noun type fits `*`, and a more specific aura fits an ancestor in its Hoon aura family; the reverse of each widening needs a check.
121+A mold is only a type: never called on a noun, and with no default. Types are inferred, Hindley–Milner with aura variables: every expression has a principal type, and there is no general subtyping. These one-way widenings are allowed: a value of a specific atom type fits `@`, a value of a specific noun type fits `*`, and a more specific aura fits an ancestor in its Hoon aura family; the reverse of each widening needs a check. Records can also be projected explicitly, as described below.
122122
123−- **Atoms**: `@` is any atom, regardless of aura; auras such as `@ud`, `@t`, `@p` and `@da` are specific atom types. An `@ud` value fits where `@` is expected, but an `@` value needs a check to fit `@ud`. A more specific aura also fits an ancestor in its Hoon aura family: `@ud` and `@ux` fit `@u`, and `@tD` fits `@t`. The reverse needs a check. Distinct specific auras remain distinct; sharing an ancestor does not make them unify. Each bare `@` independently accepts any atom: it is not an aura variable. Atoms that must share a type take one capital, as `[lo=A hi=A]`, with the atom constraint inferred from the body. `add` takes `[A A]` and returns `A`, with `A` constrained to atoms, so `(add n 1)` with `n=@ud` is a `@ud`. `?` is a loobean.
123+- **Partial annotations**: `_` may appear wherever a mold may appear. It marks a part of the type for the checker to infer, so a type annotation can specify only the parts it needs to. A hole inferred to be a named type variable is resolved: in `++ id |= x=A ^- _ x`, the result hole is `A`. An unconstrained hole is an error. A named mold or value definition must determine its own holes: `+$ box [item=_]` and `++ id |= x=_ x` do not determine their holes, and later uses cannot fix them.
124+- **Atoms**: `@` is any atom, regardless of aura; auras such as `@ud`, `@t`, `@p` and `@da` are specific atom types. An `@ud` value fits where `@` is expected, but an `@` value needs a check to fit `@ud`. A more specific aura also fits an ancestor in its Hoon aura family: `@ud` and `@ux` fit `@u`, and `@tD` fits `@t`. The reverse needs a check. Distinct specific auras remain distinct; sharing an ancestor does not make them unify. Each bare `@` independently accepts any atom: it is not an aura variable. Atoms that must share a type take one capital, as `[lo=A hi=A]`, with the atom constraint inferred from the body. `add` takes `[A A]` and returns `A`, with `A` constrained to atoms, so `(add n 1)` with `n=@ud` is a `@ud`. Arithmetic rejects loobean operands: `?` contains only 0 and 1, while an arithmetic result need not. Comparison may take loobeans and returns `?`.
124125- **Constants**: `%add`, `~` and the loobeans have one value each.
125−- **Records and tuples**: `[text=@t done=?]`, `[@t ?]`. An empty `[]` is an error. Faces are part of the type, so `[a=@ b=@]` and `[x=@ y=@]` don't unify. An unnamed position can unify with a faced position and take its face, so `[0 0]` fits `[x=@ud y=@ud]`; two different faces don't unify. A record too long for one line can leave its `[` open, with one field per deeper line, as an expression's bracket does.
126+- **Records and tuples**: `[text=@t done=?]`, `[@t ?]`. An empty `[]` is an error. Duplicate field names in a record are an error. Faces are part of the type, so `[a=@ b=@]` and `[x=@ y=@]` don't unify. An unnamed position can unify with a faced position and take its face, so `[0 0]` fits `[x=@ud y=@ud]`; two different faces don't unify. The explicit type-directed operation `(proj record)` selects fields from its argument according to the expected result type: `^- [x=@ud y=@ud] (proj wider)`, or `(f (proj wider))` when `f` expects that record. The source is evaluated once, and the result contains exactly the fields in the expected layout. No projection is inserted for a direct call. `proj` is reserved: a module cannot define or import another name `proj`. A record too long for one line can leave its `[` open, with one field per deeper line, as an expression's bracket does.
126127- **Unions**: a `+$` with several cases below it. Every union written in Jibb has a name, so one used in a field, a sample, a cast, a gate's mold or an argument gets its own `+$`; only imports bring in unions without one. Tags take their union from context, as Tag resolution describes. Cases must differ as nouns: inhabited cases must differ at some position of their right-nested cells, where one is an atom and the other a cell, or both are different constants. `*`, type variables and molds that can be either, such as `(list A)`, can overlap atoms and cells. `?` counts as the two atoms `%.y` and `%.n`: it is disjoint from cells and overlaps the constants 0 and 1. The empty mold `!!` is disjoint from every case; a cell with an empty position at any depth is itself empty and is also disjoint from every case. A union whose cases don't all differ is rejected.
127128- **Containers**: `(list A)`, `(unit A)`, `(set A)`, `(map K V)`, `(mop K V)`, `(qeu A)`, `(jar K V)`, `(jug K V)`.
128−- **Gates**: `$-(A B)`. Type variables are capitals, generalized per `++`. A capital in a local `++` shares the enclosing `++`'s variable of the same name; use another capital for a different type. A type variable used where an atom is required gains an atom constraint, so `++ clamp |= [lo=A hi=A n=A]`, whose body calls `gth` and `max`, works on any one aura. It can become nothing more specific: a body that makes `A` a `@ud` or a list is an error.
129−- **Paths**: `/todos` is constant, `/` empty, and `/todo/[id=@ud]` typed by aura. `%/blog/(slug)` is an `qath`, checked against routes and static files.
129+- **Gates**: `$-(A B)`. Type variables are capitals, generalized per `++`. A capital in a local `++` shares the enclosing `++`'s variable of the same name if the enclosing `++` also uses it; otherwise the local `++` introduces and generalizes its own variable. For example, `++ inner |= y=A y` uses the enclosing `A` when its enclosing gate has a sample `x=A`; if the enclosing `++` does not use `A`, `inner` generalizes its own `A`. Use another capital for a different type. A body can't force two distinct capitals to be equal; use the same capital wherever a type must be shared. A type variable used where an atom is required gains an atom constraint, so `++ clamp |= [lo=A hi=A n=A]`, whose body calls `gth` and `max`, works on any one aura. It can become nothing more specific: a body that makes `A` a `@ud` or a list is an error.
130+- **Paths**: `/todos` is constant, `/` empty, and `/todo/[id=@ud]` typed by aura. A typed segment may use `_` for an inferred aura; it still must resolve to an aura that the path rules can print and parse. `%/blog/(slug)` is an `qath`, checked against routes and static files.
130131- **Generic molds**: `+$ result |$ [V E]` with cases below; `|$` goes only right after a `+$`'s name.
131132- **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`.
133+- **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.
134+- **Effect and application-path types**: `poke`, `ask` and `qath` are transparent types, defined in the internal prelude and re-exported normally; callers can construct and inspect their values. Derived gates and `pure` also construct requests, and application-path literals have type `qath`. `(facts full diff …)` appears only in an API file's `paths`.
133135- **Identity**: recursive molds go by name and module.
134136
135−`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.
137+`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`; an arithmetic atom constraint that excludes loobeans prints as `where A is an atom other than ?`. 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.
136138
137139## Tag resolution
138140
@@ -210,7 +212,7 @@ Tags can sit anywhere in a case, and a case can carry several:
210212 [%move %left n] "left {n}"
211213 [%move %right n] "right {n}"
212214 [t %draft] t
213− [t %sent at] t
215+ [t %sent sent-at] t
214216 %stop "stop"
215217```
216218
@@ -260,7 +262,7 @@ rune = "|=" field ( expr | body )
260262 | "?-" expr INDENT arm { NEWLINE arm } DEDENT ;
261263arm = pattern ( expr | body ) ; (* every case covered; see Patterns *)
262264
263−mold = aura | "*" | "!!" | "?" | "~" | term | loobean | ref | typevar
265+mold = aura | "_" | "*" | "!!" | "?" | "~" | term | loobean | ref | typevar
264266 | pathmold
265267 | "(" ref mold { mold } ")" | "(" ref { mold } mlines
266268 | "[" field { field } "]" | "[" { field } flines
@@ -269,7 +271,7 @@ field = [ name "=" ] mold | "=" name ; (* =msg is msg=msg *)
269271mlines = INDENT mold { NEWLINE mold } DEDENT ; (* a mold's ( left open *)
270272flines = INDENT field { NEWLINE field } DEDENT ; (* a mold's [ left open *)
271273pathmold = "/" [ segment { "/" segment } ] ;
272−segment = knot | "[" name "=" aura "]" ;
274+segment = knot | "[" name "=" ( aura | "_" ) "]" ;
273275
274276pattern = term | number | string | ship | loobean | "~" | "*" | name
275277 | "[" pattern { pattern } "]" ;
@@ -339,4 +341,4 @@ knot = { lower | digit | "-" | "." | "~" | "_" } ;
339341 button "Add" %add
340342```
341343
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.
344+A store is written like an API file: `state`, `+$ poke` and `(store init update)`. Islands can poke it with derived constructors and watch it with `(state.cart |=%got)`, whose first fact is the current state and each later fact the next. It runs in the browser, shared by the page's islands.
docs/spec/overview.md+5−5
@@ -63,7 +63,7 @@ Hoon's runes and literals in an indentation layout, over Hoon's nouns and molds,
6363
6464| Hoon | Jibb |
6565| --- | --- |
66−| `$%`, `$?` | A union |
66+| `$%`, `$?` | A union if its cases differ as nouns, else an error where used |
6767| `$@` | A union with an atom case |
6868| `$^` | A union if its cases differ as nouns, else an error where used |
6969| `$~` | Dropped |
@@ -72,18 +72,18 @@ Hoon's runes and literals in an indentation layout, over Hoon's nouns and molds,
7272| Other `$\|` | Its base type |
7373| `%0`, `%&`, `%\|` | Tags |
7474| Recursive molds, such as `json` | Recursive, matched by name |
75−| Cores, gates, vases, signed and float auras | An error where used |
75+| Records with duplicate field names; cores, gates, vases, signed and float auras | An error where used |
7676
7777Unused molds are skipped, so unsupported constructs elsewhere in a `/sur` file are fine. A union without a name, as a field's `?(%approve %deny)`, imports too, though Jibb can't write one. Messages and printed types show its cases separated by spaces, as `%approve %deny`; this notation is print-only.
7878
7979## Prelude
8080
81−Hoon's standard library regrouped, written in Jibb and vendored as `/lib/jibb/prelude`; an island's bundle carries only what it uses. The exported inventory includes all names from the Hoon library sections listed below, excluding the groups explicitly left out. Jetted prelude functions have working Jibb implementations; the compiler recognizes their shapes and uses the Hoon versions so jets can fire. They may take gates as arguments (Core language). Private helpers and low-level primitives live in a separate internal prelude module, imported without exposing them; foundational public gates are implemented in Jibb on top of those primitives. The prelude also holds `eq`, `not`, `page`, `program`, `store`, `pure`, `island`, and the layout elements and molds.
81+Hoon's standard library regrouped, written in Jibb and vendored as `/lib/jibb/prelude`; an island's bundle carries only what it uses. The exported inventory includes all names from the Hoon library sections listed below, excluding the groups explicitly left out. Jetted prelude functions have working Jibb implementations; the compiler recognizes their shapes and uses the Hoon versions so jets can fire. They may take gates as arguments (Core language). Private helpers and low-level primitives live in a separate internal prelude module, imported without exposing them; foundational public gates are implemented in Jibb on top of those primitives. This source-backed internal module defines `poke`; the public prelude re-exports it as an ordinary transparent type, so ordinary modules can construct and inspect its values. The prelude also holds `eq`, `not`, `page`, `program`, `store`, `pure`, `island`, and the layout elements and molds.
8282
8383| Group | Hoon | Jibb |
8484| --- | --- | --- |
8585| Arithmetic | [1a](https://docs.urbit.org/hoon/stdlib/1a), [2g](https://docs.urbit.org/hoon/stdlib/2g) | Jibb gates over shared atom-constrained type variables, using private low-level primitives: `add`, `sub`, `div`, `mod`, `gth`, `max`, `pow` |
86−| Units | [2a](https://docs.urbit.org/hoon/stdlib/2a) | `fall`, `need`, `bind`, `biff` |
86+| Units | [2a](https://docs.urbit.org/hoon/stdlib/2a) | `fall`, `need`, `bind`, `biff`, `clap`; `clap` takes two units of the same type and a gate combining two values of that type into one of that type |
8787| Lists | [2b](https://docs.urbit.org/hoon/stdlib/2b) | `turn`, `weld`, `snag`, `lent`, `sort`, `skim`; `(roll xs init f)` takes a start |
8888| Maps, sets, queues | [2h](https://docs.urbit.org/hoon/stdlib/2h)–[2m](https://docs.urbit.org/hoon/stdlib/2m), [2o](https://docs.urbit.org/hoon/stdlib/2o) | Plain gates over Hoon's trees, such as `(get.by m k)`; `rep.by` and `rep.in` take a start; ordered maps through lull's `on`, as `(get.on lte m k)` |
8989| Function helpers | [2n](https://docs.urbit.org/hoon/stdlib/2n) | `same`, `head`, `tail`, `cork`, `cury` |
@@ -150,7 +150,7 @@ Loads and renders run in Nock.
150150 [%url reply=$-(path M)]
151151```
152152
153−- `poke` and `ask` are opaque, built only by derived gates and `pure`. A constructor such as `(todo-action.todo [%add draft.m])` checks its value and supplies the agent and mark, so one island can poke several agents. The agent's mark rechecks on the ship; a nack's `tang` reaches the reply as text. Store constructors poke the store in the browser.
153+- `poke`, `ask` and `qath` are transparent types defined in the internal prelude and re-exported normally. Derived gates and `pure` also construct requests. 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+77−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,7 +19,15 @@ On 2026-10-30, @iko decided that Jibb drops `$?`, so a `+$` takes a union's case
1919
2020## Milestone 2: in progress
2121
22−The repository spec records the subsequent type-system and prelude decisions; those changes also need synchronization to the Claude document. An initial inference fragment and a standalone Hoon type reader are being tested. The fragment explicitly reports that it does not check a module; partial bridges pass selected Hoon atoms and nested faced or unfaced cells from `/sur` molds and marks into inference. The reader handles mark samples, recursive molds whose origins can be verified through Ford imports, nested collections, direct ordered maps, certain ordered-map fields, and direct `$^` unions whose cases can be proved disjoint. Ambiguous recursive origins fail closed; recognizable explicit unions are checked from source before Hoon can collapse their cases (doc question 22), 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 the current prelude names, 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, simple and nonrecursive generic mold aliases, selected faced record casts and field reads, and contextual tags and constructors for closed disjoint unions. Variable-dependent face merges remain unsupported. Unfixed decimal literals default to `@ud` in gate-free inferred types; recursive local groups, recursive and union generic molds, branch tag context, union type printing, other constraint cases and defaulting inside gate types still need work. Collection recognition checks the originating core and fails closed on shadows or unsupported Ford subject shapes; its golden fixtures include three real Tlon files. The prelude currently has only a few functions, and [prelude-inventory.md](prelude-inventory.md) is a source audit, not the complete inventory or signatures. The milestone remains unfinished.
22+The parser accepts `_` in mold positions and typed path segments, retaining each hole’s span. The partial checker tracks ordinary annotation holes through inference and requires each value or local definition to resolve its own holes before generalization. A hole can resolve to a concrete type or an explicitly written in-scope type variable; later uses cannot fix an unresolved definition. Independent decimal holes can default, but captured variables are not defaulted prematurely. Structural named molds with an unresolved hole report its site. Complex mold forms, inferred path segments, mutual recursive groups and other unsupported constraints still fail closed, and the fragment does not claim the module is checked. A syntax-tree pass rejects duplicate field names within each written record and reports both sites. The repository spec now records that `ask` and `qath` are transparent; `ask` remains outstanding.
23+
24+On 2026-10-31, @iko chose explicit, result-directed `(proj record)` to construct a record with exactly the expected fields, and reserved `proj` against definitions and imports. The partial checker handles selected explicit calls with known, closed record types, records field-selection evidence for later lowering, and reserves the name across source bindings. Reordered fields, some nested contexts and several open or recursive cases remain unsupported; lowering and execution are not implemented yet. The field-order question remains open.
25+
26+The internal prelude also defines `qath` as a transparent recursive knot sequence, re-exported by the public prelude. The partial checker recognizes its source identity, supports selected null/cell construction and matching, and types static application-path literals. Other recursive shapes, broader patterns and dynamic application-path segments remain unsupported. A 256-step limit applies per inference attempt, not to parsing or retries; checking routes and static files remains milestone 4. `ask` is still unfinished.
27+
28+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, including Tlon `notes.import-node` with list-wrapped self references, 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, including source-validated named operands such as Tlon `notes.log`, 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, bare `~` fields and one level of local named tagged unions, as in real Tlon `notes`, with 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, detects missing sources and cycles, and resolves nested fields of imported values with independent scheme instantiation. The source-backed internal prelude defines `poke` and the public prelude re-exports it as a transparent type. A dedicated trusted preparation path supplies a private comparison scheme to the Jibb-written `gth` wrapper; ordinary imports cannot access them. Primitive execution and jet recognition are unfinished, and addition, decrement and length remain unavailable until arithmetic constraints distinguish their results from loobeans. 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 includes the doc-exact generic `cmd` union; 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. Known loobean result context also propagates through supported complete branches and binder-only cell arms; binder-only arms over union subjects remain unsupported. A directly known named union can instantiate an unconstrained generic gate sample with its origin, generic arguments and faces preserved; unnamed, pending, recursive and variable-bound cases remain unsupported. A known gate with an unresolved result variable can receive a known enclosing result type before its arguments are inferred; unknown calls and unresolved targets remain conservative. 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. A structured single-arm pattern also works for a known non-union cell when coverage is proven, including nested literal and wildcard positions. 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, a grouped wing or a supported shallow call, including nested cell and list positions; other partial-pattern contexts and subject forms 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.
29+
30+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`, `bond`, `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. The same validated template is available when prelude mold aliases are prepared, so supported direct and transitive aliases can use it. 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.
2331
2432## Milestone 1: parser and mark
2533
@@ -37,9 +45,9 @@ What the plan asks for, and where it is:
3745
3846Besides the plan's list:
3947
40−- 468 golden cases: 252 that parse and 216 that fail, each failure at a stated line and column. One failing case has an unclear expectation (corpus question 3). The newer type-output cases exercise only the partial inference fragment. Each case's `about.txt` quotes the doc's words it tests.
41−- The 468-case corpus passed under `urbit eval` in 31.7 s. The fake ship passed all 473 tests, including the importer, importer/checker and mark/checker bridges, module scope and unification checks, with 27.0 s for sync and 18.8 s for tests. The importer golden compares 130 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−- `tools/testdata/selftest` (22 checks) and `tools/testdata/ship-selftest` test the tools themselves.
48+- 628 golden cases: 408 that parse and 220 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.
49+- The 628-case corpus passed under `urbit eval` in 82.9 s while other checks were running. The fake ship passed all 642 tests, including the importer, importer/checker and mark/checker bridges, module scope, unification, hole, qath and projection guards, with 57.8 s for sync and 66.3 s for tests. The importer golden compares 221 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.
50+- `tools/testdata/selftest` (22 checks), `tools/testdata/ship-selftest` and `tools/testdata/clay-fixtures-selftest` test the tools themselves; the last checks temporary Clay fixture cleanup and signal handling without a ship.
4351- 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.
4452- 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).
4553
@@ -68,25 +76,86 @@ Besides the plan's list:
6876| 8bf1b12 | 2026-10-30 | Infer selected record faces and check nested `$^` in static Hoon records |
6977| d8ac47d | 2026-10-30 | Cache library interfaces, preserve imported Hoon record faces, and check nested tagged unions |
7078| edd9277 | 2026-10-30 | Infer nonrecursive generic mold aliases with lexical parameters |
71−| This change | 2026-10-30 | Resolve selected contextual tags and check explicit imported unions |
79+| 4406f6f | 2026-10-30 | Resolve selected contextual tags and check explicit imported unions |
80+| 5c73614 | 2026-10-30 | Print supported named and escaping union types |
81+| 0070584 | 2026-10-30 | Propagate union context through loobean branches, read selected unions in Hoon collections, and add `flit` |
82+| 250564c | 2026-10-30 | Infer selected named generic unions, test Hoon collection wrappers, and add list helpers |
83+| e95ef8f | 2026-10-30 | Bridge selected Hoon unions into partial inference and support generic union aliases |
84+| 56a899f | 2026-10-30 | Infer matching variable types in faced fields and bridge opaque Hoon collections |
85+| 4d45d2f | 2026-10-30 | Resolve selected contextual null literals |
86+| e878edc | 2026-10-30 | Infer complete unit-shaped branches and bridge selected recursive Hoon molds |
87+| 743dfd8 | 2026-10-30 | Propagate union context through unit-shaped branches |
88+| 3f90fa8 | 2026-10-30 | Share a partial prelude interface across module inference |
89+| 29bd39f | 2026-10-30 | Infer contextual list literals and validate prelude parity |
90+| a2a6ef5 | 2026-10-30 | Infer complete list-shaped branches |
91+| 671fe72 | 2026-10-30 | Infer contextual list nulls and cons cells |
92+| 7e69436 | 2026-10-30 | Infer selected self-recursive gates |
93+| 9ab52e8 | 2026-10-30 | Infer recursive branches with closed base types |
94+| d782b45 | 2026-10-30 | Propagate list context and apply settled type decisions |
95+| c7082e0 | 2026-10-30 | Infer multi-argument calls |
96+| 918acbd | 2026-10-30 | Infer recursive gates from their samples first |
97+| 1470d18 | 2026-10-30 | Infer selected prelude list helpers |
98+| 10cbf9c | 2026-10-30 | Infer selected local recursive gates and distinguish reader diagnostics |
99+| 45afb13 | 2026-10-30 | Infer local capital scopes and report direct reader diagnostics |
100+| 054e651 | 2026-10-30 | Report nested reader diagnostics |
101+| 98c19cd | 2026-10-30 | Infer known-aura string interpolation |
102+| ddba633 | 2026-10-30 | Infer top-level mutually recursive gates |
103+| 9f1517e | 2026-10-30 | Infer whole-case union patterns and prelude `turn` |
104+| 9dd35c8 | 2026-10-31 | Match finite boolean refinements of union cases |
105+| 54852d4 | 2026-10-31 | Contextualize tuple calls and infer known record changes |
106+| 0bc5113 | 2026-10-31 | Contextualize record initializers and infer unit construction |
107+| 264a436 | 2026-10-31 | Contextualize unit payloads in casts, calls and nested values |
108+| a140383 | 2026-10-31 | Report missing union tags and infer prelude unit helpers |
109+| d69cc52 | 2026-10-31 | Infer longer cell binder patterns and prelude unit helpers |
110+| ae35005 | 2026-10-31 | Import source-verified tagged Hoon unions |
111+| c8f894a | 2026-10-31 | Report nested missing tags and contextualize union branch results |
112+| ef2ea71 | 2026-10-31 | Import Hoon null singleton cases |
113+| 67f900e | 2026-10-31 | Infer local mutual gates and uncontextualized lists |
114+| 7ff15f1 | 2026-10-31 | Contextualize finite union patterns and record the initial poke decision |
115+| c790a9f | 2026-10-31 | Expose transparent `poke` from the internal prelude |
116+| ef4772a | 2026-10-31 | Bridge imported loobeans and loobean singletons |
117+| ad46655 | 2026-10-31 | Bridge selected imported any-noun molds |
118+| beada10 | 2026-10-31 | Import source-proved Ford mark unions, analyze API paths and infer list helpers |
119+| e28f7be | 2026-10-31 | Diagnose proven non-gate cycles and import Tlon null-payload union cases |
120+| fd2f288 | 2026-10-31 | Infer qualified fields of imported values |
121+| ed9291e | 2026-10-31 | Infer term-headed pairs and function helpers, and import nested named unions |
122+| ad0265e | 2026-10-31 | Infer proven single-case patterns and the prelude command union |
123+| 413b12b | 2026-10-31 | Propagate known result context into generic calls and batch ship deletions |
124+| c690076 | 2026-10-31 | Propagate loobean context, infer predicate helpers, and import named ordered-map operands |
125+| 0bf6178 | 2026-10-31 | Bridge recursive Tlon lists and prepare a private comparison interface |
126+| 4e472b5 | 2026-10-31 | Pass known named unions through polymorphic gates |
127+| e3e184f | 2026-10-31 | Parse type holes, reject duplicate written record fields, and extend partial union inference and imports |
128+| 80e221a | 2026-10-31 | Infer supported annotation holes and prelude list aliases |
129+| ba1fec4 | 2026-10-31 | Add the curried `bond` prelude gate |
130+| 0ea700d | 2026-10-31 | Infer a source-defined recursive `qath` subset and record the explicit `proj` decision |
131+| 75f5952 | 2026-10-31 | Check a subset of explicit `proj` calls and retain their lowering evidence |
132+| This change | 2026-10-31 | Infer supported single-field projections |
72133
73134## Checking it
74135
75136On a machine set up as [development.md](development.md) says:
76137
77138```
78−tools/golden # 468 cases under urbit eval
139+tools/golden # 628 cases under urbit eval
79140tools/importer-test # the Hoon importer fixture projection
80141tools/type-import-test # the importer/checker bridge fixture
142+tools/type-tlon-test # the real Tlon reader/checker fixture
81143tools/type-mark-test # the mark/checker bridge fixture
144+tools/type-poke-test # the source-backed poke/API fixture
145+tools/type-api-paths-test # partial API path metadata fixture
146+tools/type-hole-guards-test # hole defaulting and API interface guards
147+tools/type-list-alias-test # prelude list-alias guards
148+tools/type-qath-guards-test # qath source and unfolding guards
149+tools/type-proj-guards-test # projection evidence and scope guards
82150tools/type-module-scope-test # module and prelude scope fixture
83151tools/hoon check-spans-test # prints <<>> when the span checker works
84152tools/testdata/selftest # the tools themselves
85153tools/doc-blocks docs/spec # the doc's examples are golden cases
86154tools/ship start
87155tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
88−tools/ship test # the same 468 cases as -test arms on the ship
156+tools/ship test # the same 628 cases as -test arms on the ship
89157tools/testdata/ship-selftest
158+tools/testdata/clay-fixtures-selftest # scratch fixture cleanup without a ship
90159tools/ship check-commit # |commit stores .jibb files
91160tools/clay-fixtures # example /sur files and marks build through Clay
92161```
jibb-dev/lib/jibb-import.hoon+854−36
@@ -8,7 +8,8 @@
88:: Hoon's %hold nodes retain the generator's Hoon and its bound arguments.
99:: Comparing that Hoon to the standard generators identifies collections
1010:: before they expand into trees. Recursive holds are tracked by identity;
11−:: a repeated named hold becomes a module-qualified reference.
11+:: a repeated named hold becomes a module-qualified reference. A proven
12+:: nested self-recursive tagged union retains its own named boundary.
1213::
1314:: A direct $^ is read from its original branches and accepted only when
1415:: their imported shapes prove disjoint. A single nested $^ in a
@@ -16,14 +17,18 @@
1617:: other nested forms and unprovably disjoint cases remain unsupported. Source-level overlap in
1718:: other unions, general nested ordered maps, broader Ford subject
1819:: shapes, ambiguous recursive origins and full error locations still
19−:: need work. A nested ordered map is recovered only when its key and
20+:: need work. One direct union argument to a standard collection is
21+:: recovered only from its exact call wrapper, static independent cases,
22+:: proven disjoint branches and unshadowed standard names. Other source
23+:: shapes fail closed. A nested ordered map is recovered only when its key and
2024:: value are fixed atom molds and
2125:: the other fields are fixed atoms or collections of static atoms;
2226:: other source shapes fail closed.
2327::
24−:: The checker has a small bridge for successful unfaced atom and cell
25−:: results; it rejects other importer shapes. Failures return %|; no
26−:: partial tree is returned as success.
28+:: The partial checker bridges supported nouns, atoms, cells, faces,
29+:: proven forks and collections, and keeps proven recursive roots nominal.
30+:: Unsupported shapes fail closed. Reader failures return %|; no partial
31+:: tree is returned as success.
2732::
2833|%
2934+$ imported
@@ -34,9 +39,16 @@
3439 [%cell head=imported tail=imported]
3540 [%face name=term body=imported]
3641 [%fork cases=(list imported)]
42+ [%named module=term name=term body=imported]
3743 [%apply name=term args=(list imported)]
3844 [%ref module=term name=term]
3945 [%bad reason=@t]
46+ [%invalid code=?(%aura %core) reason=@t]
47+ ==
48++$ import-diagnostic
49+ $% [%ok value=imported]
50+ [%invalid code=?(%aura %core) message=@t]
51+ [%unsupported message=@t]
4052 ==
4153+$ signatures (list [name=term code=hoon])
4254+$ visiting (list [typ=type name=(unit term)])
@@ -67,6 +79,262 @@
6779 ^- (each imported @t)
6880 (read-with module name typ ~)
6981::
82+:: When Hoon's expanded type has lost source cases, inspect the exact
83+:: selected local arm. Restrict this fallback to distinct literal head tags
84+:: and proven-safe dependencies, then verify each projected branch again.
85++$ tagged-case [tag=@ branch=spec]
86+:: Clay and eval expose different versions of the spec union. Inspect help
87+:: and source-location wrappers as nouns before checking their contained spec.
88+++ source-gist-tail
89+ |= raw=*
90+ ^- (unit *)
91+ ?: ?=([%gist [%help *] *] raw) `+.+.raw
92+ ?: ?=([%dbug * *] raw) `+.+.raw
93+ ~
94+::
95+:: Bound metadata work separately from semantic source-node visits.
96+++ source-unwrap
97+ |= [raw=* left=@ud]
98+ ^- (unit *)
99+ =/ wrapper=(unit *) (source-gist-tail raw)
100+ ?~ wrapper `raw
101+ ?: =(left 0) ~
102+ $(raw u.wrapper, left (dec left))
103+::
104+++ tagged-term
105+ |= leaf=spec
106+ ^- (unit @)
107+ =/ plain=(unit *) (source-unwrap leaf 4)
108+ ?~ plain ~
109+ ?. ?=([%leaf %tas @] u.plain) ~
110+ `+.+.u.plain
111+::
112+++ tagged-head
113+ |= branch=spec
114+ ^- (unit @)
115+ =/ plain=(unit *) (source-unwrap branch 4)
116+ ?~ plain ~
117+ =. branch ;;(spec u.plain)
118+ ?+ branch ~
119+ [%bccl *]
120+ ?~ t.p.branch ~
121+ (tagged-term i.p.branch)
122+ ==
123+::
124+++ tagged-cases
125+ |= [cases=(list spec) tags=(list @)]
126+ ^- (unit (list tagged-case))
127+ ?~ cases `~
128+ ?: |((has-spec-cell-union i.cases) (has-spec-general-union i.cases)) ~
129+ =/ tag=(unit @) (tagged-head i.cases)
130+ ?~ tag ~
131+ ?: (lien tags |=(x=@ =(x u.tag))) ~
132+ =/ rest $(cases t.cases, tags [u.tag tags])
133+ ?~ rest ~
134+ `[[u.tag i.cases] u.rest]
135+::
136+:: Benign source annotations have different typed representations on
137+:: Clay and under eval. Inspect the wrapper as a noun, and validate the
138+:: contained Hoon before examining an arm.
139+++ source-note-tail
140+ |= raw=*
141+ ^- (unit *)
142+ ?: ?=([%note [%help *] *] raw) `+.+.raw
143+ ?: ?=([%dbug * *] raw) `+.+.raw
144+ ~
145+::
146+++ source-note-unwrap
147+ |= [raw=* left=@ud]
148+ ^- (unit *)
149+ =/ wrapper=(unit *) (source-note-tail raw)
150+ ?~ wrapper `raw
151+ ?: =(left 0) ~
152+ $(raw u.wrapper, left (dec left))
153+::
154+++ tagged-source-code
155+ |= [code=hoon name=term]
156+ ^- (unit (list tagged-case))
157+ =/ found=(unit spec) (local-mold-spec code name)
158+ ?~ found ~
159+ =/ plain=(unit *) (source-unwrap u.found 4)
160+ ?~ plain ~
161+ =/ body=spec ;;(spec u.plain)
162+ ?. ?=([%bccn *] body) ~
163+ =/ cases=(list spec) p.body
164+ ?~ cases ~
165+ ?~ t.cases ~
166+ (tagged-cases cases ~)
167+::
168+:: Source proof for dependencies of an explicitly tagged union. Only
169+:: simple local molds, standard collections and distinct term enums are
170+:: accepted; computed molds, nested cell unions and cycles fail closed.
171+:: One shared fuel budget bounds repeated visits through acyclic aliases;
172+:: exhaustion or an inherited same-name arm leaves the result unsupported.
173+++ local-arm-source
174+ |= [cor=type name=term]
175+ ^- (unit hoon)
176+ ?. ?=([%core *] cor) ~
177+ =/ chapters=(map term tome) q.r.q.cor
178+ =/ all=(list [term tome]) ~(tap by chapters)
179+ ?: (lien all |=(e=[term tome] &(!=(-.e %$) (chapter-unsafe +.e name)))) ~
180+ =/ chapter=(unit tome) (~(get by chapters) %$)
181+ ?~ chapter ~
182+ (chapter-source u.chapter name)
183+::
184+++ local-mold-spec
185+ |= [code=hoon name=term]
186+ ^- (unit spec)
187+ =/ plain=(unit *) (source-note-unwrap code 4)
188+ ?~ plain ~
189+ =. code ;;(hoon u.plain)
190+ ?+ code ~
191+ [%ktcl *]
192+ ?. ?=([%name * *] p.code) ~
193+ ?. =(name p.p.code) ~
194+ `q.p.code
195+ ==
196+::
197+++ safe-source-enum
198+ |= [cases=(list spec) seen=(list @) fuel=@ud]
199+ ^- (unit @ud)
200+ ?~ cases `fuel
201+ ?: =(fuel 0) ~
202+ =/ tag=(unit @) (tagged-term i.cases)
203+ ?~ tag ~
204+ ?: (lien seen |=(n=@ =(n u.tag))) ~
205+ $(cases t.cases, seen [u.tag seen], fuel (dec fuel))
206+::
207+++ safe-source-specs-mode
208+ |= [xs=(list spec) cor=type seen=(list term) fuel=@ud allow-nested=?]
209+ ^- (unit @ud)
210+ ?~ xs `fuel
211+ =/ left=(unit @ud) (safe-source-spec-mode i.xs cor seen fuel allow-nested)
212+ ?~ left ~
213+ $(xs t.xs, fuel u.left)
214+::
215+++ safe-source-name-mode
216+ |= [name=term cor=type seen=(list term) fuel=@ud allow-nested=?]
217+ ^- (unit @ud)
218+ :: Permit a direct root revisit or one proven nested self-revisit.
219+ :: Mutual cycles and inherited same-name bindings remain unavailable.
220+ ?: (lien seen |=(x=term =(name x)))
221+ ?. ?=([%core *] cor) ~
222+ ?. (scope-safe p.cor name) ~
223+ ?: =(seen ~[name]) `fuel
224+ ?. allow-nested ~
225+ ?. ?=([* [* ~]] seen) ~
226+ ?. =(i.seen name) ~
227+ =/ selected=(unit hoon) (local-arm-source cor name)
228+ ?~ selected ~
229+ =/ cases=(unit (list tagged-case)) (tagged-source-code u.selected name)
230+ ?~ cases ~
231+ `fuel
232+ =/ arm=(unit hoon) (local-arm-source cor name)
233+ ?~ arm
234+ ?. &(|(=(name %ship) =(name %path)) (scope-safe cor name)) ~
235+ `fuel
236+ ?. ?=([%core *] cor) ~
237+ ?. (scope-safe p.cor name) ~
238+ =/ body=(unit spec) (local-mold-spec u.arm name)
239+ ?~ body ~
240+ (safe-source-spec-mode u.body cor [name seen] fuel allow-nested)
241+::
242+++ safe-source-spec-mode
243+ |= [shape=spec cor=type seen=(list term) fuel=@ud allow-nested=?]
244+ ^- (unit @ud)
245+ =/ plain=(unit *) (source-unwrap shape 4)
246+ ?~ plain ~
247+ =. shape ;;(spec u.plain)
248+ ?: =(fuel 0) ~
249+ =. fuel (dec fuel)
250+ ?+ shape ~
251+ [%base *] ?:(|(?=([%atom *] p.shape) =(%flag p.shape) =(%null p.shape)) `fuel ~)
252+ [%leaf *] `fuel
253+ [%bcts *] ?@ p.shape $(shape q.shape)
254+ ~
255+ [%bccl *] (safe-source-specs-mode p.shape cor seen fuel allow-nested)
256+ [%bccn *]
257+ :: A source proof may cross one named union dependency. Deeper
258+ :: named unions stay unsupported to bound recursive reprojection.
259+ ?. allow-nested ~
260+ ?. ?=([* [* ~]] seen) ~
261+ =/ cases=(unit (list tagged-case)) (tagged-cases p.shape ~)
262+ ?~ cases ~
263+ ?~ u.cases ~
264+ ?~ t.u.cases ~
265+ (safe-source-tagged-fuel-mode u.cases cor seen fuel allow-nested)
266+ [%bcwt *] (safe-source-enum p.shape ~ fuel)
267+ [%like *]
268+ ?. ?=([@ ~] p.shape) ~
269+ ?. ?=(~ q.shape) ~
270+ (safe-source-name-mode i.p.shape cor seen fuel allow-nested)
271+ [%make *]
272+ =/ wing=(unit term) (source-single-wing p.shape)
273+ ?~ wing ~
274+ =/ n=term u.wing
275+ ?. (lien `(list term)`~[%map %set %qeu %list %unit %jar %jug] |=(x=term =(x n))) ~
276+ ?. (scope-safe cor n) ~
277+ (safe-source-specs-mode q.shape cor seen fuel allow-nested)
278+ ==
279+::
280+++ safe-source-tagged-fuel-mode
281+ |= [cases=(list tagged-case) cor=type seen=(list term) fuel=@ud allow-nested=?]
282+ ^- (unit @ud)
283+ ?~ cases `fuel
284+ =/ left=(unit @ud) (safe-source-spec-mode branch.i.cases cor seen fuel allow-nested)
285+ ?~ left ~
286+ $(cases t.cases, fuel u.left)
287+::
288+++ safe-source-name
289+ |= [name=term cor=type seen=(list term) fuel=@ud]
290+ ^- (unit @ud)
291+ (safe-source-name-mode name cor seen fuel &)
292+::
293+++ safe-source-tagged
294+ |= [cases=(list tagged-case) cor=type seen=(list term) fuel=@ud]
295+ ^- ?
296+ ?=(^ (safe-source-tagged-fuel-mode cases cor seen fuel &))
297+::
298+++ tagged-union-fallback
299+ |= [module=term name=term cor=type]
300+ ^- (unit (each imported @t))
301+ ?. ?=([%core *] cor) ~
302+ =/ chapters=(map term tome) q.r.q.cor
303+ =/ other=(list [term tome]) ~(tap by chapters)
304+ ?: (lien other |=(e=[term tome] &(!=(-.e %$) (chapter-unsafe +.e name)))) ~
305+ =/ chapter=(unit tome) (~(get by chapters) %$)
306+ ?~ chapter ~
307+ =/ selected=(unit hoon) (chapter-source u.chapter name)
308+ ?~ selected ~
309+ =/ cases (tagged-source-code u.selected name)
310+ ?~ cases ~
311+ :: Preserve the original budget when no nested union recovery is needed.
312+ =/ plain=? ?=(^ (safe-source-tagged-fuel-mode u.cases cor ~[name] 4.096 |))
313+ ?. |(plain (safe-source-tagged u.cases cor ~[name] 256)) ~
314+ =/ tried=(each (list type) tang)
315+ (mule |.((turn u.cases |=(c=tagged-case (~(play ut cor) [%kttr branch.c])))))
316+ ?. ?=([%& *] tried) ~
317+ :: Record the selected hold before projecting branches so an exact
318+ :: recursive revisit can retain its independently verified origin.
319+ =/ selected-type=(each type tang)
320+ (mule |.((~(play ut cor) (ream (cat 3 '*' name)))))
321+ ?. ?=([%& *] selected-type) ~
322+ =/ projected=(each (list imported) tang)
323+ (mule |.((turn p.tried |=(t=type (walk module t catalog ~[[p.selected-type [~ name]]] `cor)))))
324+ ?. ?=([%& *] projected) ~
325+ ?^ (first-bads p.projected) ~
326+ ?. (all-disjoint p.projected) ~
327+ =/ xs=(list tagged-case) u.cases
328+ =/ ys=(list imported) p.projected
329+ |-
330+ ?~ xs
331+ ?^ ys ~
332+ `[%& [%fork (sort p.projected |=(pair=[imported imported] (dor -.pair +.pair)))]]
333+ ?~ ys ~
334+ ?. ?=([%cell [%atom %tas [~ @]] *] i.ys) ~
335+ ?. =(tag.i.xs u.value.head.i.ys) ~
336+ $(xs t.xs, ys t.ys)
337+::
70338:: +read-mold-in: accept the /sur core as provenance. The core must be
71339:: built against zuse or validated Ford imports, and its selected arm
72340:: must be this type. Unknown subject shapes fail closed.
@@ -82,8 +350,12 @@
82350 ?. =(typ (~(play ut cor) (ream (cat 3 '*' name))))
83351 [%| 'Hoon module provenance does not match the selected mold']
84352 =/ result (read-with module name typ [~ cor])
85− ?. ?=([%& *] result) result
86− result
353+ ?: ?=([%& *] result) result
354+ =/ fallback=(each (unit (each imported @t)) tang)
355+ (mule |.((tagged-union-fallback module name cor)))
356+ ?: ?=(%| -.fallback) result
357+ ?~ p.fallback result
358+ u.p.fallback
87359::
88360:: +read-named is the source-aware entry point for callers that have
89361:: not selected a Hoon type yet. Check the core and the local arm
@@ -112,6 +384,41 @@
112384:: A mark door's payload is [sample build-subject]. Its outer sample
113385:: face names the door sample, not the imported mark type. Collection
114386:: lookup for the sample happened against the pre-door build subject.
387+:: Fallback for a mark whose sample is exactly one arm of its only
388+:: Ford-imported /sur core. Source validation remains in read-mold-in.
389+:: Recursive results need a separate mark-origin/interface design.
390+++ mark-has-ref
391+ |= node=imported
392+ ^- ?
393+ ?- node
394+ [%ref *] &
395+ [%named *] $(node body.node)
396+ [%face *] $(node body.node)
397+ [%cell *] |($(node head.node) $(node tail.node))
398+ [%fork *] (lien cases.node |=(child=imported (mark-has-ref child)))
399+ [%apply *] (lien args.node |=(child=imported (mark-has-ref child)))
400+ * |
401+ ==
402+::
403+++ mark-union-fallback
404+ |= [raw=type context=type]
405+ ^- (unit (each imported @t))
406+ ?. ?=([%cell [%face @ [%core *]] *] context) ~
407+ ?. =(q.context -:!>(..zuse)) ~
408+ =/ alias=term p.p.context
409+ =/ core=type q.p.context
410+ ?. ?=([%hold *] raw) ~
411+ =/ name=(unit term) (hold-name q.raw)
412+ ?~ name ~
413+ =/ selected=(each type tang)
414+ (mule |.((~(play ut core) (ream (cat 3 '*' u.name)))))
415+ ?. ?=([%& *] selected) ~
416+ ?. =(p.selected raw) ~
417+ =/ result=(each imported @t) (read-mold-in alias u.name raw core)
418+ ?. ?=([%& [%fork *]] result) ~
419+ ?: (mark-has-ref p.result) ~
420+ `result
421+::
115422++ read-mark
116423 |= [name=term cor=type]
117424 ^- (each imported @t)
@@ -122,8 +429,48 @@
122429 =/ sample=type p.p.cor
123430 =/ raw=type ?:(?=([%face *] sample) q.sample sample)
124431 =/ result (read-with name name raw [~ q.p.cor])
125− ?. ?=([%& *] result) result
126− result
432+ ?: ?=([%& *] result) result
433+ =/ fallback=(each (unit (each imported @t)) tang)
434+ (mule |.((mark-union-fallback raw q.p.cor)))
435+ ?: ?=(%| -.fallback) result
436+ ?~ p.fallback result
437+ u.p.fallback
438+::
439+++ read-named-diagnostic
440+ |= [module=term name=term cor=type]
441+ ^- import-diagnostic
442+ =/ result=(each imported @t) (read-named module name cor)
443+ ?: ?=(%& -.result) [%ok p.result]
444+ ?. ?=([%core *] cor) [%unsupported p.result]
445+ ?: =(cor -:!>(..zuse)) [%unsupported p.result]
446+ ?. (scope-safe cor %$) [%unsupported p.result]
447+ =/ chapters=(map term tome) q.r.q.cor
448+ ?. (lien ~(tap by chapters) |=(entry=[term tome] =((chapter-has +.entry name) [~ &])))
449+ [%unsupported p.result]
450+ =/ selected=(each type tang) (mule |.((~(play ut cor) (ream (cat 3 '*' name)))))
451+ ?. ?=(%& -.selected) [%unsupported p.result]
452+ =/ again=(each imported tang) (mule |.((walk module p.selected catalog ~ [~ cor])))
453+ ?. ?=(%& -.again) [%unsupported p.result]
454+ =/ evidence=(unit import-diagnostic) (first-invalid p.again)
455+ ?~ evidence [%unsupported p.result]
456+ u.evidence
457+::
458+++ read-mark-diagnostic
459+ |= [name=term cor=type]
460+ ^- import-diagnostic
461+ =/ result=(each imported @t) (read-mark name cor)
462+ ?: ?=(%& -.result) [%ok p.result]
463+ ?. ?=([%core *] cor) [%unsupported p.result]
464+ ?. ?=([%cell *] p.cor) [%unsupported p.result]
465+ ?. =(p.cor q.q.cor) [%unsupported p.result]
466+ ?. (scope-safe q.p.cor %$) [%unsupported p.result]
467+ =/ sample=type p.p.cor
468+ =/ raw=type ?:(?=([%face *] sample) q.sample sample)
469+ =/ again=(each imported tang) (mule |.((walk name raw catalog ~ [~ q.p.cor])))
470+ ?. ?=(%& -.again) [%unsupported p.result]
471+ =/ evidence=(unit import-diagnostic) (first-invalid p.again)
472+ ?~ evidence [%unsupported p.result]
473+ u.evidence
127474::
128475++ read-with
129476 |= [module=term name=term typ=type context=(unit type)]
@@ -383,9 +730,8 @@
383730 ?: ?=([%bckt ^ ^] h) &
384731 |($(h -.h) $(h +.h))
385732::
386−:: (doc question 22) The Grammar's disjointness rule is applied to
387−:: imported $% and $? too. The import table singles out $^, so @iko
388−:: has been asked whether that general rule also covers those unions.
733+:: The Grammar's disjointness rule applies to imported $% and $? too;
734+:: @iko confirmed the rule for imported unions on 2026-10-30.
389735++ has-spec-general-union
390736 |= h=*
391737 ^- ?
@@ -543,8 +889,8 @@
543889 ?. |(=(p.h [%dtwt [%$ (mul 2 axis)]]) (fits-union-at p.h axis))
544890 [%| 'a Hoon union needs a source-level disjointness check']
545891 ?. (disjoint a b)
546− ?: ?=([%fits *] p.h) [%| 'a Hoon union has overlapping cases']
547− [%| 'a Hoon $^ union has overlapping cases']
892+ ?: ?=([%fits *] p.h) [%| 'Hoon union disjointness could not be verified']
893+ [%| 'Hoon $^ union disjointness could not be verified']
548894 [%& [%fork (sort (weld (union-cases a) (union-cases b)) |=(pair=[imported imported] (dor -.pair +.pair)))]]
549895 ==
550896++ union-cases
@@ -565,6 +911,8 @@
565911 ^- ?
566912 ?: ?=([%face *] a) $(a body.a)
567913 ?: ?=([%face *] b) $(b body.b)
914+ ?: ?=([%named *] a) $(a body.a)
915+ ?: ?=([%named *] b) $(b body.b)
568916 ?: ?=([%fork *] a)
569917 (levy cases.a |=(item=imported (disjoint item b)))
570918 ?: ?=([%fork *] b)
@@ -619,6 +967,32 @@
619967 ?. (arm-map-valid +.chapter) ~
620968 [~ (arm-map-has +.chapter target)]
621969::
970+:: Return a unique source arm from either validated tome wrapper. Walk
971+:: the noun map rather than relying on fields that differ on Clay.
972+++ arm-map-sources
973+ |= [m=* target=term]
974+ ^- (list hoon)
975+ ?@ m ~
976+ =/ kv=* -.m
977+ =/ children=* +.m
978+ =/ found=(list hoon) ?:(=(-.kv target) ~[;;(hoon +.kv)] ~)
979+ (weld found (weld $(m -.children) $(m +.children)))
980+::
981+++ chapter-source
982+ |= [chapter=* target=term]
983+ ^- (unit hoon)
984+ ?: (arm-map-valid chapter) (unique-arm-source chapter target)
985+ ?@ chapter ~
986+ ?. (arm-map-valid +.chapter) ~
987+ (unique-arm-source +.chapter target)
988+::
989+++ unique-arm-source
990+ |= [arms=* target=term]
991+ ^- (unit hoon)
992+ =/ sources=(list hoon) (arm-map-sources arms target)
993+ ?. ?=([* ~] sources) ~
994+ `i.sources
995+::
622996++ chapter-unsafe
623997 |= [chapter=* target=term]
624998 ^- ?
@@ -661,17 +1035,46 @@
6611035 ?@ src |
6621036 |($(src -.src) $(src +.src))
6631037::
1038+:: Clay can wrap each call component in source-location metadata.
1039+:: Peel only those wrappers; malformed casts are trapped by +mop-specs.
1040+++ mop-source-code
1041+ |= code=hoon
1042+ ^- hoon
1043+ =/ plain=(unit *) (source-unwrap code 4)
1044+ ?~ plain !!
1045+ ;;(hoon u.plain)
1046+::
1047+++ source-single-wing
1048+ |= raw=*
1049+ ^- (unit term)
1050+ =/ plain=(unit *) (source-unwrap raw 4)
1051+ ?~ plain ~
1052+ ?. ?=([%wing [@ ~]] u.plain) ~
1053+ `;;(term -.+.u.plain)
1054+::
6641055++ mop-specs-raw
6651056 |= body=hoon
6661057 ^- (unit [key=spec value=spec])
1058+ =. body (mop-source-code body)
6671059 ?. ?=([%cncl *] body) ~
6681060 ?. ?=([%tsgr *] p.body) ~
669− =/ b=hoon q.p.body
1061+ =/ b=hoon (mop-source-code q.p.body)
6701062 ?. ?=([%cncl *] b) ~
671− ?. ?=([%cncl *] p.b) ~
672− ?. ?=([%wing *] p.p.b) ~
673− ?. =(p.p.p.b ~[%mop]) ~
674− =/ specs=(list spec) ;;((list spec) q.p.b)
1063+ =/ call=hoon (mop-source-code p.b)
1064+ ?. ?=([%cncl *] call) ~
1065+ =/ w=(unit term) (source-single-wing p.call)
1066+ ?~ w ~
1067+ ?. =(u.w %mop) ~
1068+ =/ raw=* q.call
1069+ =/ wings=(unit [key=spec value=spec])
1070+ ?. ?=([* [* ~]] raw) ~
1071+ =/ a=(unit term) (source-single-wing -.raw)
1072+ =/ b=(unit term) (source-single-wing -.+.raw)
1073+ ?~ a ~
1074+ ?~ b ~
1075+ [~ [[%like ~[u.a] ~] [%like ~[u.b] ~]]]
1076+ ?^ wings wings
1077+ =/ specs=(list spec) ;;((list spec) raw)
6751078 ?. ?=([* [* ~]] specs) ~
6761079 [~ [i.specs i.t.specs]]
6771080::
@@ -764,6 +1167,166 @@
7641167 ?. (levy t.found same) ~
7651168 [~ choice]
7661169::
1170+::
1171+:: A collection case is independent of the subject only when its
1172+:: original spec uses literal atoms, tags and finite record structure.
1173+++ static-union-spec
1174+ |= s=spec
1175+ ^- ?
1176+ ?+ s |
1177+ [%base *] ?=([%atom *] p.s)
1178+ [%leaf *] &
1179+ [%bcts *] ?@ p.s $(s q.s)
1180+ |
1181+ [%bccl *] (static-union-specs p.s)
1182+ ==
1183+::
1184+++ static-union-specs
1185+ |= parts=(list spec)
1186+ ^- ?
1187+ ?~ parts &
1188+ &((static-union-spec i.parts) $(parts t.parts))
1189+::
1190+++ union-spec-parts
1191+ |= s=spec
1192+ ^- (unit (list spec))
1193+ ?+ s ~
1194+ [%bcwt *] [~ p.s]
1195+ [%bccn *] [~ p.s]
1196+ [%bckt *] [~ ~[p.s q.s]]
1197+ ==
1198+::
1199+:: Select one direct union argument, replacing exactly that spec with
1200+:: @t. The other arguments must be static and cannot contain unions.
1201+++ safe-union-parts
1202+ |= cases=(list spec)
1203+ ^- ?
1204+ ?~ cases |
1205+ ?~ t.cases |
1206+ =/ rest=(list spec) t.cases
1207+ &((static-union-spec i.cases) (levy rest |=(part=spec (static-union-spec part))))
1208+::
1209+++ split-union-arguments
1210+ |= [args=(list hoon) index=@ud]
1211+ ^- (unit [args=(list hoon) cases=(list spec) index=@ud])
1212+ ?~ args ~
1213+ ?. ?=([%ktcl *] i.args) ~
1214+ =/ cases (union-spec-parts p.i.args)
1215+ ?^ cases
1216+ ?. (safe-union-parts u.cases) ~
1217+ ?. (static-arguments t.args) ~
1218+ [~ [[[%ktcl [%base [%atom %t]]] t.args] u.cases index]]
1219+ ?. (static-spec p.i.args) ~
1220+ =/ rest $(args t.args, index +(index))
1221+ ?~ rest ~
1222+ [~ [[i.args args.u.rest] cases.u.rest index.u.rest]]
1223+::
1224+++ replace-union-argument
1225+ |= [args=(list imported) index=@ud union=imported]
1226+ ^- (unit (list imported))
1227+ ?~ args ~
1228+ ?: =(index 0)
1229+ ?. =([%atom %t ~] i.args) ~
1230+ [~ [union t.args]]
1231+ =/ rest $(args t.args, index (dec index))
1232+ ?~ rest ~
1233+ [~ [i.args u.rest]]
1234+::
1235+:: Accept only the compiler's direct collection call wrapper.
1236+++ direct-collection-source
1237+ |= [body=hoon original=hoon]
1238+ ^- ?
1239+ ?. ?=([%cncl [%tsgr * [%cncl *]] *] body) |
1240+ ?. =(p.p.body [%wing ~[[%.y 7]]]) |
1241+ ?. =(q.body ~[[%$ 6]]) |
1242+ ?. ?=([%tsls * *] original) |
1243+ =(q.original [%tsls [%dtts [%$ 14] [%$ 2]] [%$ 6]])
1244+::
1245+++ collection-union
1246+ |= [typ=type module=term sig=signatures seen=visiting context=(unit type)]
1247+ ^- imported
1248+ ?. ?=([%hold *] typ) [%bad 'a Hoon union needs a source-level disjointness check']
1249+ =/ is-cell=? (has-spec-cell-union q.typ)
1250+ =/ unsupported=@t
1251+ ?: is-cell 'a Hoon $^ union needs a source-level disjointness check'
1252+ 'a Hoon union needs a source-level disjointness check'
1253+ =/ original=hoon q.typ
1254+ ?. ?=([%tsls [%note * *] *] original) [%bad unsupported]
1255+ =/ body=hoon q.p.original
1256+ =/ alias (source-alias body)
1257+ ?~ alias [%bad unsupported]
1258+ ?. (alias-safe context u.alias) [%bad 'Hoon collection provenance is unavailable or shadowed']
1259+ =/ names=(list term) ~[%map %set %qeu %list %unit %jar %jug]
1260+ ?: (lien names |=(n=term &((source-uses body n) !(alias-safe context n))))
1261+ [%bad 'Hoon collection provenance is unavailable or shadowed']
1262+ ?. (direct-collection-source body original) [%bad unsupported]
1263+ ?> ?=([%cncl [%tsgr * [%cncl *]] *] body)
1264+ =/ split (split-union-arguments q.q.p.body 0)
1265+ ?~ split [%bad unsupported]
1266+ =/ tried=(each (list type) tang)
1267+ (mule |.((turn cases.u.split |=(s=spec (~(play ut p.typ) [%kttr s])))))
1268+ ?. ?=([%& *] tried) [%bad unsupported]
1269+ =/ cases=(list imported)
1270+ (turn p.tried |=(t=type (walk module t sig seen context)))
1271+ =/ err (first-bads cases)
1272+ ?^ err [%bad u.err]
1273+ ?. (all-disjoint cases)
1274+ [%bad ?:(is-cell 'Hoon $^ union disjointness could not be verified' 'Hoon union disjointness could not be verified')]
1275+ =/ rewritten=hoon original(q.p body(q.q.p args.u.split))
1276+ =/ attempt=(each type tang) (mule |.((~(play ut p.typ) rewritten)))
1277+ ?. ?=([%& *] attempt) [%bad unsupported]
1278+ =/ out=imported (walk module p.attempt sig seen context)
1279+ ?. ?=([%apply *] out) [%bad unsupported]
1280+ ?. =(name.out u.alias) [%bad unsupported]
1281+ =/ replacement=imported
1282+ [%fork (sort cases |=(pair=[imported imported] (dor -.pair +.pair)))]
1283+ =/ args (replace-union-argument args.out index.u.split replacement)
1284+ ?~ args [%bad unsupported]
1285+ [%apply name.out u.args]
1286+::
1287+:: A nested named tagged union may be recovered only if its hold is
1288+:: exactly the selected arm of this core. Provenance and all original
1289+:: source cases are checked by the same fallback as a top-level arm.
1290+++ nested-tagged-union
1291+ |= [module=term typ=type context=(unit type)]
1292+ ^- (unit imported)
1293+ ?~ context ~
1294+ ?. ?=([%core *] u.context) ~
1295+ ?. ?=([%hold *] typ) ~
1296+ =/ n=(unit term) (hold-name q.typ)
1297+ ?~ n ~
1298+ :: The outer proof has a shared budget. Bound each nested re-proof as
1299+ :: well, so rebuilding a shared source DAG cannot grow without limit.
1300+ =/ source=(unit hoon) (local-arm-source u.context u.n)
1301+ ?~ source ~
1302+ =/ cases=(unit (list tagged-case)) (tagged-source-code u.source u.n)
1303+ ?~ cases ~
1304+ ?. (safe-source-tagged u.cases u.context ~[u.n] 256) ~
1305+ =/ selected=(each type tang)
1306+ (mule |.((~(play ut u.context) (ream (cat 3 '*' u.n)))))
1307+ ?. ?=([%& *] selected) ~
1308+ ?. =(p.selected typ) ~
1309+ =/ attempt=(each (unit (each imported @t)) tang)
1310+ (mule |.((tagged-union-fallback module u.n u.context)))
1311+ ?. ?=([%& *] attempt) ~
1312+ ?~ p.attempt ~
1313+ ?. ?=([%& [%fork *]] u.p.attempt) ~
1314+ `p.u.p.attempt
1315+::
1316+:: Keep the proven owner boundary when a nested union refers to itself.
1317+++ contains-named-ref
1318+ |= [node=imported module=term name=term]
1319+ ^- ?
1320+ ?- node
1321+ [%ref *] &(=(module module.node) =(name name.node))
1322+ [%named *] |
1323+ [%face *] $(node body.node)
1324+ [%cell *] |($(node head.node) $(node tail.node))
1325+ [%fork *] (lien cases.node |=(child=imported (contains-named-ref child module name)))
1326+ [%apply *] (lien args.node |=(child=imported (contains-named-ref child module name)))
1327+ * |
1328+ ==
1329+::
7671330++ walk
7681331 |= [module=term typ=type sig=signatures seen=visiting context=(unit type)]
7691332 ^- imported
@@ -772,10 +1335,10 @@
7721335 %void [%void ~]
7731336 [%atom *]
7741337 ?: |(=('s' (cut 3 [0 1] p.typ)) =('r' (cut 3 [0 1] p.typ)))
775− [%bad 'signed and float auras cannot be imported']
1338+ [%invalid %aura 'signed and float auras cannot be imported']
7761339 [%atom p.typ q.typ]
7771340 [%cell *] [%cell $(typ p.typ) $(typ q.typ)]
778− [%core *] [%bad 'cores and gates cannot be imported']
1341+ [%core *] [%invalid %core 'cores and gates cannot be imported']
7791342 [%face *]
7801343 ?@ p.typ [%face p.typ $(typ q.typ)]
7811344 [%bad 'a complex Hoon face needs translation']
@@ -784,14 +1347,26 @@
7841347 (turn ~(tap in:..zuse p.typ) |=(t=type ^$(typ t)))
7851348 =/ err (first-bads cases)
7861349 ?^ err [%bad u.err]
787− ?. (all-disjoint cases) [%bad 'a Hoon union has overlapping cases']
1350+ ?. (all-disjoint cases) [%bad 'Hoon union disjointness could not be verified']
7881351 [%fork (sort cases |=(pair=[imported imported] (dor -.pair +.pair)))]
7891352 [%hint *] $(typ q.typ)
7901353 [%hold *]
791− ?: &(?=([%tsls [%note * *] *] q.typ) (has-spec-cell-union q.typ))
792− [%bad 'a Hoon $^ union needs a source-level disjointness check']
793− ?: &(?=([%tsls [%note * *] *] q.typ) (has-spec-general-union q.typ))
794− [%bad 'a Hoon union needs a source-level disjointness check']
1354+ =/ prior=(unit (unit term)) (find-seen typ seen)
1355+ ?^ prior
1356+ ?~ u.prior [%bad 'an anonymous recursive Hoon mold cannot be named']
1357+ =/ origin (ref-origin module u.u.prior typ context)
1358+ ?~ origin [%bad 'a recursive Hoon mold needs unambiguous source provenance']
1359+ [%ref u.origin u.u.prior]
1360+ =/ nested=(unit imported) (nested-tagged-union module typ context)
1361+ ?^ nested
1362+ ?: ?=(~ seen) u.nested
1363+ =/ name=(unit term) (hold-name q.typ)
1364+ ?~ name u.nested
1365+ ?. (contains-named-ref u.nested module u.name) u.nested
1366+ [%named module u.name u.nested]
1367+ ?: &(?=([%tsls [%note * *] *] q.typ) |((has-spec-cell-union q.typ) (has-spec-general-union q.typ)))
1368+ =/ nm (hold-name q.typ)
1369+ (collection-union typ module sig [[typ nm] seen] context)
7951370 =/ named=(unit term) (match-signature q.typ sig)
7961371 ?^ named
7971372 =/ name u.named
@@ -805,14 +1380,8 @@
8051380 =/ second=type (~(play ut p.typ) (ream '*value'))
8061381 [%apply name ~[first-import $(typ second)]]
8071382 [%apply name ~[first-import]]
808− =/ prior=(unit (unit term)) (find-seen typ seen)
809− ?^ prior
810− ?~ u.prior [%bad 'an anonymous recursive Hoon mold cannot be named']
811− =/ origin (ref-origin module u.u.prior typ context)
812− ?~ origin [%bad 'a recursive Hoon mold needs unambiguous source provenance']
813− [%ref u.origin u.u.prior]
8141383 =/ nm (hold-name q.typ)
815− ?: =(nm [~ %vase]) [%bad 'vases cannot be imported']
1384+ ?: =(nm [~ %vase]) [%bad 'a Hoon type named vase needs source provenance']
8161385 ?: &((source-uses q.typ %jar) !(alias-safe context %jar))
8171386 [%bad 'Hoon collection provenance is unavailable or shadowed']
8181387 ?: &((source-uses q.typ %jug) !(alias-safe context %jug))
@@ -821,7 +1390,8 @@
8211390 [%bad 'Hoon collection provenance is unavailable or shadowed']
8221391 =/ mop (mop-arguments typ)
8231392 ?^ mop
824− [%apply %mop ~[$(typ key.u.mop) $(typ value.u.mop)]]
1393+ :: An exact revisit fails closed without guessing a name.
1394+ [%apply %mop ~[$(typ key.u.mop, seen [[typ ~] seen]) $(typ value.u.mop, seen [[typ ~] seen])]]
8251395 ?: (source-uses q.typ %mop)
8261396 =/ checked-names=(list term) ~[%map %set %qeu %list %unit]
8271397 ?: (lien checked-names |=(n=term &((source-uses q.typ n) !(alias-safe context n))))
@@ -856,7 +1426,7 @@
8561426 ?^ err [%bad u.err]
8571427 ?: (disjoint first second)
8581428 [%fork (sort ~[first second] |=(pair=[imported imported] (dor -.pair +.pair)))]
859− [%bad 'a Hoon $^ union has overlapping cases']
1429+ [%bad 'Hoon $^ union disjointness could not be verified']
8601430 ?: |((has-cell-union q.typ) (has-fits-union q.typ))
8611431 =/ cannot=@t
8621432 ?: (has-fits-union q.typ) 'a Hoon union needs a source-level disjointness check'
@@ -913,7 +1483,9 @@
9131483 [%atom *] ~
9141484 [%ref *] ~
9151485 [%bad *] [~ reason.out]
1486+ [%invalid *] [~ reason.out]
9161487 [%face *] $(out body.out)
1488+ [%named *] $(out body.out)
9171489 [%cell *]
9181490 =/ err $(out head.out)
9191491 ?~ err $(out tail.out)
@@ -929,6 +1501,35 @@
9291501 =/ err (first-bad i.xs)
9301502 ?~ err $(xs t.xs)
9311503 err
1504+::
1505+++ first-invalid
1506+ |= out=imported
1507+ ^- (unit import-diagnostic)
1508+ ?- out
1509+ [%noun *] ~
1510+ [%void *] ~
1511+ [%atom *] ~
1512+ [%ref *] ~
1513+ [%bad *] `[%unsupported reason.out]
1514+ [%invalid *] `[%invalid code.out reason.out]
1515+ [%face *] $(out body.out)
1516+ [%named *] $(out body.out)
1517+ [%cell *]
1518+ =/ first $(out head.out)
1519+ ?~ first $(out tail.out)
1520+ first
1521+ [%fork *] (first-invalids cases.out)
1522+ [%apply *] (first-invalids args.out)
1523+ ==
1524+::
1525+++ first-invalids
1526+ |= xs=(list imported)
1527+ ^- (unit import-diagnostic)
1528+ ?~ xs ~
1529+ =/ first (first-invalid i.xs)
1530+ ?~ first $(xs t.xs)
1531+ first
1532+::
9321533:: +fixture-test: shared golden expectations for eval and the ship.
9331534:: A synthetic hold whose first $^ branch cannot be evaluated. It tests
9341535:: that a failed branch probe is reported rather than crashing the host.
@@ -1024,7 +1625,7 @@
10241625 [%fork ~[[%cell [%face %x [%atom %ud ~]] [%face %y [%atom %ud ~]]] [%atom %ud ~]]]
10251626 =/ errors ?: =((sample %valid-cell) [%& expect-valid]) errors
10261627 ['disjoint cell union' errors]
1027− =/ errors ?: =((sample %invalid-cell) [%| 'a Hoon $^ union has overlapping cases']) errors
1628+ =/ errors ?: =((sample %invalid-cell) [%| 'Hoon $^ union disjointness could not be verified']) errors
10281629 ['overlapping cell union is rejected' errors]
10291630 =/ errors ?: =((shad %mn) [%| 'Hoon collection provenance is unavailable or shadowed']) errors
10301631 ['local mop shadow in a field is rejected' errors]
@@ -1065,9 +1666,11 @@
10651666 [%cell *] "[{(show-import head.out)} {(show-import tail.out)}]"
10661667 [%face *] "{(trip name.out)}={(show-import body.out)}"
10671668 [%fork *] "(union {(show-imports cases.out)})"
1669+ [%named *] "(named {(trip name.out)}.{(trip module.out)} {(show-import body.out)})"
10681670 [%apply *] "({(trip name.out)} {(show-imports args.out)})"
10691671 [%ref *] "{(trip name.out)}.{(trip module.out)}"
10701672 [%bad *] "error: {(trip reason.out)}"
1673+ [%invalid *] "error: {(trip reason.out)}"
10711674 ==
10721675::
10731676++ show-imports
@@ -1085,6 +1688,15 @@
10851688 [%| *] "error: {(trip p.result)}"
10861689 ==
10871690::
1691+++ show-import-diagnostic
1692+ |= result=import-diagnostic
1693+ ^- tape
1694+ ?- result
1695+ [%ok *] (show-import value.result)
1696+ [%invalid *] "invalid/{(trip code.result)}: {(trip message.result)}"
1697+ [%unsupported *] "unsupported: {(trip message.result)}"
1698+ ==
1699+::
10881700:: Clay includes debug spans around source nodes. Reproduce that
10891701:: shape without Clay so the same regression runs under eval and -test.
10901702++ decorate-union-source
@@ -1108,6 +1720,80 @@
11081720 =/ source=hoon original(q.p (decorate-union-source q.p.original))
11091721 (read-mold %small name typ(q source))
11101722::
1723+:: Test debug metadata at the spec boundary without assuming that the
1724+:: eval version of Hoon's spec mold itself includes Clay's %dbug tag.
1725+++ debug-spec-fixture
1726+ ^- tape
1727+ =/ location=* [/tests/importer/synthetic/hoon [[1 1] [1 2]]]
1728+ =/ wrapped=* [%dbug location [%leaf %tas %x]]
1729+ =/ got=(unit *) (source-gist-tail wrapped)
1730+ ?~ got "debug wrapper missing"
1731+ =/ leaf=(each spec tang) (mule |.(;;(spec u.got)))
1732+ ?. ?=([%& [%leaf %tas %x]] leaf) "debug leaf not recovered"
1733+ =/ branch=spec [%bccl ~[p.leaf [%base [%atom %t]]]]
1734+ ?^ (tagged-cases ~[branch branch] ~) "duplicate tags accepted"
1735+ =/ broken=(unit *) (source-gist-tail [%dbug location 42])
1736+ ?~ broken "debug wrapper missing"
1737+ =/ invalid=(each spec tang) (mule |.(;;(spec u.broken)))
1738+ ?: ?=(%& -.invalid) "malformed spec accepted"
1739+ "valid wrapper; duplicate and malformed rejected"
1740+::
1741+:: The same named-operand call with Clay-style source-location wrappers.
1742+++ debug-mop-fixture
1743+ |= cor=type
1744+ ^- tape
1745+ =/ typ=type (~(play ut cor) (ream '*mop-wing-valid'))
1746+ ?> ?=([%hold *] typ)
1747+ =/ original=hoon q.typ
1748+ ?> ?=([%tsls [%note * *] *] original)
1749+ =/ body=hoon q.p.original
1750+ ?> ?=([%cncl *] body)
1751+ ?> ?=([%tsgr *] p.body)
1752+ =/ b=hoon q.p.body
1753+ ?> ?=([%cncl *] b)
1754+ =/ call=hoon p.b
1755+ ?> ?=([%cncl *] call)
1756+ ?> ?=([* [* ~]] q.call)
1757+ =/ at=spot [/tests/importer/synthetic/hoon [[1 1] [1 2]]]
1758+ =/ inner=hoon call(p [%dbug at p.call], q ~[[%dbug at i.q.call] [%dbug at i.t.q.call]])
1759+ =/ outer=hoon body(p p.body(q b(p [%dbug at inner])))
1760+ =/ mixed=hoon body(p p.body(q b(p inner)))
1761+ =/ multi=hoon body(p p.body(q b(p call(p [%dbug at [%wing ~[%one %two]]]))))
1762+ =/ plain=(unit [key=spec value=spec]) (mop-specs body)
1763+ ?~ plain "unwrapped mop not recognized"
1764+ ?. =((mop-specs [%dbug at outer]) plain) "wrapped mop not recognized"
1765+ ?. =((mop-specs mixed) plain) "mixed mop not recognized"
1766+ ?^ (mop-specs multi) "multi-segment callee accepted"
1767+ ?^ (mop-specs [%dbug at [%sand %ud 42]]) "malformed call accepted"
1768+ ?^ (source-single-wing [%dbug at 42]) "malformed wing accepted"
1769+ ?^ (source-single-wing [%dbug at [%wing ~[%one %two]]]) "multi-segment operand accepted"
1770+ =/ four=* [%dbug at [%dbug at [%dbug at [%dbug at [%wing ~[%mop]]]]]]
1771+ =/ five=* [%dbug at four]
1772+ ?~ (source-single-wing four) "four wrappers rejected"
1773+ ?^ (source-single-wing five) "wrapper limit exceeded"
1774+ ?~ (source-note-unwrap four 4) "four note wrappers rejected"
1775+ ?^ (source-note-unwrap five 4) "note wrapper limit exceeded"
1776+ =/ selected=(unit hoon) (local-arm-source cor %tag-valid)
1777+ ?~ selected "selected union not found"
1778+ =/ arm-four=hoon [%dbug at [%dbug at [%dbug at [%dbug at u.selected]]]]
1779+ =/ arm-five=hoon [%dbug at arm-four]
1780+ ?~ (tagged-source-code arm-four %tag-valid) "four wrapped selected arms rejected"
1781+ ?^ (tagged-source-code arm-five %tag-valid) "selected arm wrapper limit exceeded"
1782+ "wrapped and mixed calls accepted; malformed, multi-segment and excessive wrappers rejected"
1783+::
1784+:: Synthetic nodes test each part of the direct collection-call proof.
1785+++ collection-wrapper-fixture
1786+ ^- tape
1787+ =/ call=hoon [%cncl [%tsgr [%wing ~[[%.y 7]]] [%cncl [%wing ~[%list]] ~]] ~[[%$ 6]]]
1788+ =/ subject=hoon [%cncl [%tsgr [%wing ~[[%.y 8]]] [%cncl [%wing ~[%list]] ~]] ~[[%$ 6]]]
1789+ =/ sample=hoon [%cncl [%tsgr [%wing ~[[%.y 7]]] [%cncl [%wing ~[%list]] ~]] ~[[%$ 2]]]
1790+ =/ good=hoon [%tsls [%note [%made %x ~] call] [%tsls [%dtts [%$ 14] [%$ 2]] [%$ 6]]]
1791+ =/ tail=hoon [%tsls [%note [%made %x ~] call] [%$ 6]]
1792+ =/ args=(list [hoon hoon]) ~[[call good] [subject good] [sample good] [call tail]]
1793+ =/ flags=(list ?) (turn args |=(pair=[hoon hoon] (direct-collection-source -.pair +.pair)))
1794+ ?: =(flags ~[& | | |]) "valid; forged subject, sample and tail rejected"
1795+ "wrapper guard failed"
1796+::
11111797++ overlap-fork-fixture
11121798 ^- type
11131799 =/ nodes=(list type) ~[[%atom %ud ~] [%atom %t ~]]
@@ -1140,6 +1826,23 @@
11401826 =/ mark-rec-core=type -:(ride fp mark-rec)
11411827 =/ mark-gate-core=type -:(ride -:!>(..zuse) mark-gate)
11421828 =/ mark-basic-core=type -:(ride -:!>(..zuse) mark-basic)
1829+ =/ make-mark
1830+ |= [field=@t scope=type]
1831+ ^- type
1832+ -:(ride scope (crip "|_ a={(trip field)}\0a++ grab |% ++ noun a --\0a++ grow |% ++ noun a --\0a++ grad %noun\0a--\0a"))
1833+ =/ mark-union-core=type (make-mark 'mark-flag-valid:small' fp)
1834+ =/ mark-overlap-core=type (make-mark 'mark-flag-overlap:small' fp)
1835+ =/ mark-hidden-core=type (make-mark 'mark-flag-hidden:small' fp)
1836+ =/ mark-signed-core=type (make-mark 'signed:small' fp)
1837+ =/ mark-callable-core=type (make-mark 'gate-test:small' fp)
1838+ =/ extra-subject=type [%cell [%face %other other] fp]
1839+ =/ mark-extra-core=type (make-mark 'mark-flag-valid:small' extra-subject)
1840+ =/ other-hold=type (~(play ut other) (ream '*chain'))
1841+ =/ recursive-hold=type (~(play ut sc) (ream '*chain'))
1842+ =/ fake-vase=type -:(ride -:!>(..zuse) '|%\0a+$ vase @ud\0a--\0a')
1843+ =/ spoof=(unit import-diagnostic)
1844+ (first-invalid [%bad 'signed and float auras cannot be imported'])
1845+ ?> ?=(^ spoof)
11431846 =/ mark-shadow-core=type -:(ride sp mark-basic)
11441847 =/ tshp=type [%cell [%face %intermediate shc] -:!>(..zuse)]
11451848 =/ tshc=type -:(ride tshp only-list)
@@ -1150,6 +1853,30 @@
11501853 =/ distinct=type -:(ride distinct-parent origin-first)
11511854 =/ trans-amb-parent=type [%cell [%face %intermediate fc] [%cell [%face %second sc] -:!>(..zuse)]]
11521855 =/ trans-amb=type -:(ride trans-amb-parent origin-trans)
1856+ =/ tag-child=@t
1857+ '|%\0a+$ tag-invalid-cell @t\0a+$ choice $%([%ok a=tag-invalid-cell] [%err a=@ud])\0a--\0a'
1858+ =/ tag-collision=type -:(ride [%cell [%face %base sc] -:!>(..zuse)] tag-child)
1859+ =/ tag-clean=type -:(ride [%cell [%face %base other] -:!>(..zuse)] tag-child)
1860+ =/ tag-zuse=@t
1861+ '|%\0a+$ ship @t\0a+$ path @ud\0a+$ choice $%([%ok who=ship] [%err where=path])\0a--\0a'
1862+ =/ tag-zuse-core=type -:(ride -:!>(..zuse) tag-zuse)
1863+ =/ nest-parent-src=@t
1864+ '|%\0a+$ tag-nest-inner $%([%foreign @t] [%foreign @t])\0a--\0a'
1865+ =/ nest-parent=type -:(ride -:!>(..zuse) nest-parent-src)
1866+ =/ nest-child-src=@t
1867+ '|%\0a+$ tag-nest-inner $%([%left @t] [%right @ud])\0a+$ tag-nest-middle $%([%one x=tag-nest-inner] [%two ~])\0a--\0a'
1868+ =/ nest-collision=type -:(ride [%cell [%face %base nest-parent] -:!>(..zuse)] nest-child-src)
1869+ =/ self-parent=type
1870+ -:(ride -:!>(..zuse) '|%\0a+$ tag-self ?(%same %same)\0a--\0a')
1871+ =/ self-child=@t
1872+ '|%\0a+$ tag-self $%([%branch children=(list tag-self)] [%leaf value=@t])\0a--\0a'
1873+ =/ self-collision=type -:(ride [%cell [%face %tag-self self-parent] -:!>(..zuse)] self-child)
1874+ =/ self-other=type
1875+ -:(ride -:!>(..zuse) '|%\0a+$ tag-self $%([%branch children=(list tag-self)] [%leaf value=@ud])\0a--\0a')
1876+ =/ mop-ford-parent=type
1877+ -:(ride -:!>(..zuse) '|%\0a+$ value ?(%same %same)\0a--\0a')
1878+ =/ mop-ford-child=type
1879+ -:(ride [%cell [%face %value mop-ford-parent] -:!>(..zuse)] '|%\0a+$ key @ud\0a+$ value @t\0a+$ mm ((mop key value) lte)\0a--\0a')
11531880 =/ sample
11541881 |= name=term
11551882 (read-mold-in %small name (~(play ut sc) (ream (cat 3 '*' name))) sc)
@@ -1187,6 +1914,15 @@
11871914 (crip "nested-static-mop: {(show-result (sample %nested-static-mop))}")
11881915 (crip "collection-siblings: {(show-result (sample %collection-siblings))}")
11891916 (crip "dynamic-sibling-mop: {(show-result (sample %dynamic-sibling-mop))}")
1917+ (crip "mark-flag-source: {(show-result (read-named %small %mark-flag-valid sc))}")
1918+ (crip "mark-flag-union: {(show-result (read-mark %flag-union mark-union-core))}")
1919+ (crip "mark-flag-overlap: {(show-result (read-mark %flag-overlap mark-overlap-core))}")
1920+ (crip "mark-flag-hidden: {(show-result (read-mark %flag-hidden mark-hidden-core))}")
1921+ (crip "mark-flag-signed: {(show-result (read-mark %flag-signed mark-signed-core))}")
1922+ (crip "mark-flag-callable: {(show-result (read-mark %flag-callable mark-callable-core))}")
1923+ (crip "mark-flag-extra: {(show-result (read-mark %flag-extra mark-extra-core))}")
1924+ (crip "mark-flag-other-hold: {?~((mark-union-fallback other-hold fp) "unsupported" "BAD")}")
1925+ (crip "mark-flag-recursive-fallback: {?~((mark-union-fallback recursive-hold fp) "unsupported" "BAD")}")
11901926 (crip "mark-record: {(show-result (read-mark %todo-item mark-core))}")
11911927 (crip "mark-recursive: {(show-result (read-mark %recursive mark-rec-core))}")
11921928 (crip "mark-gate: {(show-result (read-mark %bad mark-gate-core))}")
@@ -1211,11 +1947,22 @@
12111947 (crip "shadow-list-mop: {(show-result (read-mold-in %shadow-static %bad (~(play ut xc) (ream '*bad')) xc))}")
12121948 (crip "named-mop: {(show-result (sample %named-mop))}")
12131949 (crip "mop-list: {(show-result (sample %mop-list))}")
1950+ (crip "mop-wing-valid: {(show-result (sample %mop-wing-valid))}")
1951+ (crip "mop-wing-invalid-key: {(show-result (sample %mop-wing-invalid-key))}")
1952+ (crip "mop-wing-invalid-key-alias: {(show-result (sample %mop-wing-invalid-key-alias))}")
1953+ (crip "mop-wing-invalid-value: {(show-result (sample %mop-wing-invalid-value))}")
1954+ (crip "mop-wing-invalid-value-alias: {(show-result (sample %mop-wing-invalid-value-alias))}")
1955+ (crip "mop-wing-rec-key: {(show-result (sample %mop-wing-rec-key))}")
1956+ (crip "mop-wing-rec-value: {(show-result (sample %mop-wing-rec-value))}")
1957+ (crip "mop-wing-shadow: {(show-result (read-named %shadow %mmw hc))}")
1958+ (crip "mop-wing-ford-collision: {(show-result (read-named %child %mm mop-ford-child))}")
1959+ (crip "mop-wing-debug: {(debug-mop-fixture sc)}")
12141960 (crip "signed: {(show-result (sample %signed))}")
12151961 (crip "float: {(show-result (sample %float))}")
12161962 (crip "gate: {(show-result (sample %gate-test))}")
12171963 (crip "vase: {(show-result vase)}")
12181964 (crip "failed-branch: {(show-result (read-mold %external %bad bad-branch-fixture))}")
1965+ (crip "debug-spec: {debug-spec-fixture}")
12191966 (crip "debug-union: {(show-result (debug-union-fixture sc %action))}")
12201967 (crip "debug-union-overlap: {(show-result (debug-union-fixture sc %explicit-wut-overlap))}")
12211968 (crip "debug-nested-cell: {(show-result (debug-union-fixture sc %nested-valid-cell))}")
@@ -1230,6 +1977,17 @@
12301977 (crip "explicit-three: {(show-result (sample %explicit-three))}")
12311978 (crip "explicit-unknown: {(show-result (sample %explicit-unknown))}")
12321979 (crip "explicit-nested: {(show-result (sample %explicit-nested))}")
1980+ (crip "collection-union-wrapper: {collection-wrapper-fixture}")
1981+ (crip "collection-union-list: {(show-result (sample %collection-union-list))}")
1982+ (crip "collection-union-set: {(show-result (sample %collection-union-set))}")
1983+ (crip "collection-union-map-key: {(show-result (sample %collection-union-map-key))}")
1984+ (crip "collection-union-map-value: {(show-result (sample %collection-union-map-value))}")
1985+ (crip "collection-union-unit: {(show-result (sample %collection-union-unit))}")
1986+ (crip "collection-union-collapsed: {(show-result (sample %collection-union-collapsed))}")
1987+ (crip "collection-union-multiple: {(show-result (sample %collection-union-multiple))}")
1988+ (crip "collection-union-nested: {(show-result (sample %collection-union-nested))}")
1989+ (crip "collection-union-dependent: {(show-result (sample %collection-union-dependent))}")
1990+ (crip "collection-union-shadow: {(show-result (read-named %shadow %collection-union-shadow xc))}")
12331991 (crip "explicit-list: {(show-result (sample %explicit-list))}")
12341992 (crip "explicit-set: {(show-result (sample %explicit-set))}")
12351993 (crip "explicit-faces: {(show-result (sample %explicit-faces))}")
@@ -1288,9 +2046,69 @@
12882046 (crip "named-missing: {(show-result (read-named %small %missing sc))}")
12892047 (crip "named-invalid-core: {(show-result (read-named %small %items [%atom %ud ~]))}")
12902048 (crip "named-ford-recursive: {(show-result (read-named %ford %recursive fc))}")
2049+ (crip "diagnostic-items: {(show-import-diagnostic (read-named-diagnostic %small %items sc))}")
2050+ (crip "diagnostic-signed: {(show-import-diagnostic (read-named-diagnostic %small %signed sc))}")
2051+ (crip "diagnostic-float: {(show-import-diagnostic (read-named-diagnostic %small %float sc))}")
2052+ (crip "diagnostic-overlap: {(show-import-diagnostic (read-named-diagnostic %small %explicit-percent-overlap sc))}")
2053+ (crip "diagnostic-unproved: {(show-import-diagnostic (read-named-diagnostic %small %list-nested-invalid-cell sc))}")
2054+ (crip "diagnostic-mark-gate: {(show-import-diagnostic (read-mark-diagnostic %bad mark-gate-core))}")
2055+ (crip "diagnostic-shadow-vase: {(show-import-diagnostic (read-named-diagnostic %fake %vase fake-vase))}")
2056+ (crip "diagnostic-spoof: {(show-import-diagnostic u.spoof)}")
12912057 (crip "missing-arm: {(show-result (read-mold-in %small %missing [%atom %ud ~] sc))}")
12922058 (crip "wrong-provenance: {(show-result (read-mold-in %small %action (~(play ut sc) (ream '*items')) sc))}")
12932059 (crip "unverified-subject: {(show-result (read-mold-in %std %jar (~(play ut -:!>(..zuse)) (ream '*(jar @ud @t)')) -:!>(..zuse)))}")
2060+ (crip "tag-ford-collision: {(show-result (read-named %child %choice tag-collision))}")
2061+ (crip "tag-ford-clean: {(show-result (read-named %child %choice tag-clean))}")
2062+ (crip "tag-zuse-local: {(show-result (read-named %child %choice tag-zuse-core))}")
2063+ (crip "tag-nest-inner: {(show-result (sample %tag-nest-inner))}")
2064+ (crip "tag-nest-middle: {(show-result (sample %tag-nest-middle))}")
2065+ (crip "tag-nest-diamond: {(show-result (sample %tag-nest-diamond))}")
2066+ (crip "tag-nest-deep: {(show-result (sample %tag-nest-deep))}")
2067+ (crip "tag-nest-hidden: {(show-result (sample %tag-nest-hidden))}")
2068+ (crip "tag-nest-overlap: {(show-result (sample %tag-nest-overlap))}")
2069+ (crip "tag-nest-recursive: {(show-result (sample %tag-nest-recursive-outer))}")
2070+ (crip "tag-nest-rec-list: {(show-result (sample %tag-nest-rec-list-outer))}")
2071+ (crip "tag-nest-rec-repeat: {(show-result (sample %tag-nest-rec-repeat))}")
2072+ (crip "tag-nest-rec-duplicate: {(show-result (sample %tag-nest-rec-bad-outer))}")
2073+ (crip "tag-nest-rec-hidden: {(show-result (sample %tag-nest-rec-hidden-outer))}")
2074+ (crip "tag-nest-rec-mutual: {(show-result (sample %tag-nest-rec-mutual-outer))}")
2075+ (crip "tag-nest-rec-outer-overlap: {(show-result (sample %tag-nest-rec-outer-overlap))}")
2076+ (crip "tag-nest-rec-owner: {?:(&((contains-named-ref [%ref %small %tag-self] %small %tag-self) !(contains-named-ref [%named %small %other [%ref %small %tag-self]] %small %tag-self)) "yes" "wrong")}")
2077+ (crip "tag-nest-many: {(show-result (sample %tag-nest-many))}")
2078+ (crip "tag-nest-shadow: {(show-result (read-named %shadow-static %tag-nest-shadow xc))}")
2079+ (crip "tag-nest-wrong-hold: {?~((nested-tagged-union %small (~(play ut other) (ream '*chain')) `sc) "unsupported" "BAD")}")
2080+ (crip "tag-nest-ford-collision: {(show-result (read-named %outer %tag-nest-middle nest-collision))}")
2081+ (crip "tag-self: {(show-result (sample %tag-self))}")
2082+ (crip "tag-self-tail: {(show-result (sample %tag-self-tail))}")
2083+ (crip "tag-self-duplicate: {(show-result (sample %tag-self-duplicate))}")
2084+ (crip "tag-self-hidden: {(show-result (sample %tag-self-hidden))}")
2085+ (crip "tag-self-indirect: {(show-result (sample %tag-self-indirect))}")
2086+ (crip "tag-mutual-a: {(show-result (sample %tag-mutual-a))}")
2087+ (crip "tag-mutual-b: {(show-result (sample %tag-mutual-b))}")
2088+ (crip "tag-self-pair: {(show-result (sample %tag-self-pair))}")
2089+ (crip "tag-self-ford-collision: {(show-result (read-named %child %tag-self self-collision))}")
2090+ (crip "tag-self-wrong-core: {(show-result (read-mold-in %other %tag-self (~(play ut sc) (ream '*tag-self')) self-other))}")
2091+ (crip "tag-flat-large: {?:(&(?=(~ (safe-source-name-mode %tag-fuel-7 sc ~ 256 |)) ?=(^ (safe-source-name-mode %tag-fuel-7 sc ~ 4.096 |)) ?=([%& *] (sample %tag-flat-large))) "supported above 256" "BAD")}")
2092+ (crip "tag-null-good: {(show-result (sample %tag-null-good))}")
2093+ (crip "tag-null-duplicate: {(show-result (sample %tag-null-duplicate))}")
2094+ (crip "tag-null-hidden: {(show-result (sample %tag-null-hidden))}")
2095+ (crip "tag-valid: {(show-result (sample %tag-valid))}")
2096+ (crip "tag-duplicate: {(show-result (sample %tag-duplicate))}")
2097+ (crip "tag-collapsed: {(show-result (sample %tag-collapsed))}")
2098+ (crip "tag-invalid-direct: {(show-result (sample %tag-invalid-direct))}")
2099+ (crip "tag-invalid-alias: {(show-result (sample %tag-invalid-alias))}")
2100+ (crip "tag-invalid-list: {(show-result (sample %tag-invalid-list))}")
2101+ (crip "tag-enum-good: {(show-result (sample %tag-enum-good))}")
2102+ (crip "tag-enum-bad: {(show-result (sample %tag-enum-bad))}")
2103+ (crip "tag-nested-good: {(show-result (sample %tag-nested-good))}")
2104+ (crip "tag-shadow-jar: {(show-result (read-named %shadow-static %tag-shadow-jar xc))}")
2105+ (crip "tag-shadow-jug: {(show-result (read-named %shadow-static %tag-shadow-jug xc))}")
2106+ (crip "tag-fuel-small: {?:(?=(^ (safe-source-name %tag-fuel-2 sc ~ 64)) "yes" "no")}")
2107+ (crip "tag-fuel-large: {?:(?=(~ (safe-source-name %tag-fuel-11 sc ~ 64)) "rejected" "wrong")}")
2108+ (crip "presence-action-1: {(show-result (present %action-1))}")
2109+ (crip "presence-command-1: {(show-result (present %command-1))}")
2110+ (crip "presence-update-1: {(show-result (present %update-1))}")
2111+ (crip "presence-response-1: {(show-result (present %response-1))}")
12942112 (crip "presence-topic: {(show-result (present %topic))}")
12952113 (crip "presence-timing: {(show-result (present %timing))}")
12962114 (crip "presence-places: {(show-result (present %places))}")
jibb-dev/lib/jibb.hoon+4252−205
@@ -874,7 +874,7 @@
874874 %'~[' %'|=(' %'$-(' :: openers
875875 %'%/' %'/' :: paths
876876 %'+' %'`' %'=' :: pair, unit, face
877− %'*' %'?' :: noun, loobean mold
877+ %'*' %'?' %'_' :: noun, loobean, type hole
878878 %'++' %'+$' %'|=' %'|$' :: runes
879879 %'^-' %'~&' %'?-' %'!!' :: runes
880880 %'/-' %'/%' %'/=' :: imports
@@ -1016,6 +1016,7 @@
10161016 [%const at=span =lit] :: ~ %add %.y
10171017 [%ref at=span names=(list term)] :: state item.todo
10181018 [%tvar at=span name=@t] :: M
1019+ [%hole at=span ~] :: _
10191020 [%path at=span segs=(list pseg)] :: / /todos /todo/[id=@ud]
10201021 [%apply at=span ref=(list term) args=(list shape)] :: (list @t)
10211022 [%cell at=span fields=(list field)] :: [text=@t done=?]
@@ -1024,9 +1025,9 @@
10241025 [%generic at=span vars=(list @t) body=shape] :: +$ name |$ [M] …
10251026 ==
10261027::
1027−:: +pseg: a path mold's segment, a knot or [name=aura]
1028+:: +pseg: a path mold's segment, a knot, [name=aura], or [name=_]
10281029::
1029−+$ pseg $%([%knot p=@ta] [%typed at=span name=term aura=@ta])
1030++$ pseg $%([%knot p=@ta] [%typed at=span name=term aura=@ta] [%inferred at=span name=term hole-at=span])
10301031::
10311032+| %api
10321033::
@@ -1295,6 +1296,7 @@
12951296 (emit 1 %'=')
12961297 ?: =('`' a) (emit 1 %'`')
12971298 ?: =('*' a) (emit 1 %'*')
1299+ ?: =('_' a) (emit 1 %'_')
12981300 ?: =('~' a)
12991301 ?: =('[' b) (emit 2 %'~[')
13001302 ?: =('&' b) (emit 2 %'~&')
@@ -1670,14 +1672,14 @@
16701672:: What may begin each place the parser reads (section 3, Errors):
16711673:: an expression a-z 0-9 " ( [ ~ % / ` | ^ ? !
16721674:: an operand a-z 0-9 " ( [ ~ % / ` | !
1673−:: a mold a-z A-Z @ * ! ? ~ % / ( [ $
1675+:: a mold a-z A-Z @ * ! ? ~ % / ( [ $ _
16741676:: a pattern a-z 0-9 " ~ % * [
16751677:: and what may go tight after an operand: . ( + = after a name, a
16761678:: closer ) ] }, or the : of a comment
16771679::
16781680++ expr-mask 0x57ff.ffff.4800.0000.83ff.8126.0000.0000
16791681++ operand-mask 0x57ff.ffff.0800.0000.03ff.8126.0000.0000
1680−++ mold-mask 0x47ff.fffe.0fff.ffff.8000.8532.0000.0000
1682+++ mold-mask 0x47ff.fffe.8fff.ffff.8000.8532.0000.0000
16811683++ bar-mask 0x1000.0000.0000.0000.0000.0000.0000.0000
16821684++ pattern-mask 0x47ff.fffe.0800.0000.03ff.0424.0000.0000
16831685++ after-mask 0x2000.0000.2000.0000.2400.4b00.0000.0000
@@ -2107,6 +2109,7 @@
21072109 ?- -.s
21082110 %knot (weld "/" (trip p.s))
21092111 %typed "/[{(trip name.s)}=@{(trip aura.s)}]"
2112+ %inferred "/[{(trip name.s)}=_]"
21102113 ==
21112114::
21122115++ show-tvars
@@ -2318,6 +2321,7 @@
23182321 %const (nod "const" at.s (show-lit lit.s) ~)
23192322 %ref (nod "ref" at.s (show-names names.s) ~)
23202323 %tvar (nod "tvar" at.s (trip name.s) ~)
2324+ %hole (nod "hole" at.s "" ~)
23212325 %path (nod "path" at.s (show-psegs segs.s) ~)
23222326 %apply (nod "apply" at.s (show-names ref.s) (turn args.s sexp-shape))
23232327 %cell (nod "cell" at.s "" (turn fields.s sexp-field))
@@ -3842,6 +3846,7 @@
38423846 %'*' [%& [%noun at.t ~] t.ts]
38433847 %'!!' [%& [%void at.t ~] t.ts]
38443848 %'?' [%& [%flag at.t ~] t.ts]
3849+ %'_' [%& [%hole at.t ~] t.ts]
38453850 [%name *] [%& [%ref at.t ~[p.lex.t]] t.ts]
38463851 [%wing *] [%& [%ref at.t p.lex.t] t.ts]
38473852 [%tvar *] [%& [%tvar at.t p.lex.t] t.ts]
@@ -4058,7 +4063,7 @@
40584063 ?: &(?=(^ nex) tight.i.nex) (bad nex "a path segment")
40594064 (bad-space i.after nex "a path segment")
40604065 ::
4061− :: +read-pseg: a path mold's segment, a knot or [name=aura] with no
4066+ :: +read-pseg: a path mold's knot, [name=aura], or [name=_] with no
40624067 :: spaces, and where it ends
40634068 ::
40644069 ++ read-pseg
@@ -4075,13 +4080,16 @@
40754080 ?: |(?=(~ r2) !tight.i.r2) (bad-space i.r1 r2 "`=`")
40764081 ?. ?=([[* * %'='] *] r2) (bad-in r2 "`=`" tis-mask)
40774082 =/ r3=(list token) t.r2
4078− ?: |(?=(~ r3) !tight.i.r3) (bad-space i.r2 r3 "an aura")
4079− ?. ?=([[* * [%aura *]] *] r3) (bad-in r3 "an aura" pat-mask)
4083+ ?: |(?=(~ r3) !tight.i.r3) (bad-space i.r2 r3 "an aura or type hole")
4084+ ?. ?=([[* * ?([%aura *] %'_')] *] r3) (bad-in r3 "an aura or type hole" (con pat-mask (bex 95)))
40804085 =/ r4=(list token) t.r3
40814086 ?: |(?=(~ r4) !tight.i.r4) (bad-space i.r3 r4 "`]`")
40824087 ?. ?=([[* * %']'] *] r4) (bad-in r4 "`]`" ser-mask)
40834088 =/ at=span [beg.at.op end.at.i.r4]
4084− [%& [[%typed at p.lex.i.r1 p.lex.i.r3] end.at.i.r4] t.r4]
4089+ =/ seg=pseg
4090+ ?: ?=(%'_' lex.i.r3) [%inferred at p.lex.i.r1 at.i.r3]
4091+ [%typed at p.lex.i.r1 p.lex.i.r3]
4092+ [%& [seg end.at.i.r4] t.r4]
40854093 --
40864094::
40874095+| %span-check
@@ -4465,6 +4473,7 @@
44654473 %const [%const at.s ~[%lit] %one ~]
44664474 %ref [%ref at.s ~[%name %wing] %one ~]
44674475 %tvar [%tvar at.s ~[%tvar] %one ~]
4476+ %hole [%hole at.s ~[%'_'] %one ~]
44684477 %apply [%apply at.s ~[%'('] %shut (turn args.s outline-shape)]
44694478 %cell [%cell at.s ~[%'['] %shut (turn fields.s outline-sample)]
44704479 ::
@@ -4473,8 +4482,11 @@
44734482 %+ murn segs.s
44744483 |= g=pseg
44754484 ^- (unit outline)
4476− ?. ?=(%typed -.g) ~
4477− `[%typed at.g ~[%'['] %shut ~]
4485+ ?- -.g
4486+ %knot ~
4487+ %typed `[%typed at.g ~[%'['] %shut ~]
4488+ %inferred `[%typed at.g ~[%'['] %shut ~[[%hole hole-at.g ~[%'_'] %one ~]]]
4489+ ==
44784490 [%path at.s ~[%'/'] %run ks]
44794491 ::
44804492 %union
@@ -4534,6 +4546,8 @@
45344546 [%path [1 9] [1 9] [1 21]]
45354547 [%face [1 7] [1 7] [1 21]]
45364548 ==
4549+ :: an inferred path aura's hole spanning its = as well
4550+ ['+$ x /a/[id=_]' ~[[%hole [1 13] [1 12] [1 14]]]]
45374551 :: an import's path cut short
45384552 ['/= c /ui/c' ~[[%jibb [1 1] [1 1] [1 11]]]]
45394553 :: brackets that close with the deeper lines, cut at their line's
@@ -4595,8 +4609,24 @@
45954609:: their defaulting and inferred generalization are implemented.
45964610:: Bare @ is a separate unrestricted atom type. A directional fit check
45974611:: permits concrete atoms to widen to it, never the reverse. A fit that
4598−:: needs a not-yet-implemented constraint remains unsupported. Only
4599−:: unfaced cells are represented here.
4612+:: needs a not-yet-implemented constraint remains unsupported. Named unions
4613+:: retain origin and ordered arguments, including phantom arguments, apart
4614+:: from their display name. Generic cases must be disjoint for all arguments.
4615+:: Unnamed union printing is informational; it is not Jibb syntax.
4616+::
4617+:: `proj` is a reserved, type-directed operation, not an ordinary gate.
4618+:: The supported fragment selects uniquely faced fields from a known record
4619+:: in source order (reordering is a doc question). It records the original
4620+:: call, source and target types, and source axes with its definition;
4621+:: A single selected field keeps its face and uses one source axis.
4622+:: Checked module interfaces retain that evidence and their source, including
4623+:: the private prelude dependency. A later lowerer must replace the call by
4624+:: an inline gate applied to the operand once; no lowering is implemented yet.
4625+:: Ordinary fits never insert a projection. Unknown or variable-origin record
4626+:: spines, implicit narrowing inside selected fields, and projections in
4627+:: recursive groups remain unsupported. Directional fits bound faced-spine
4628+:: proofs to fewer than 1,024 cells; the projection planner has a separate
4629+:: 4,096-step bound. These are inference limits, not language limits.
46004630::
46014631+$ itype
46024632 $~ [%var 0]
@@ -4606,15 +4636,20 @@
46064636 [%atom aura=@ta]
46074637 [%any-atom ~]
46084638 [%flag ~]
4639+ [%noun ~]
46094640 [%tag id=@ud literal=lit constructor=?]
46104641 [%const literal=lit]
4611− [%union cases=(list itype)]
4642+ [%collection name=term args=(list itype)]
4643+ [%recursive module=term name=term label=(unit @t)]
4644+ [%jrec at=path name=term label=(unit @t) head=term aura=@ta tail=term]
4645+ [%union cases=(list itype) origin=(unit [at=path name=term]) label=(unit @t) args=(list itype)]
46124646 [%face name=term body=itype]
46134647 [%fn sample=itype product=itype]
46144648 [%cell hed=itype tal=itype]
46154649 ==
46164650+$ ibinding [id=@ud val=itype]
46174651+$ isub (list ibinding)
4652++$ ipending [id=@ud literal=lit]
46184653::
46194654++ itype-lookup
46204655 |= [n=@ud sub=isub]
@@ -4656,9 +4691,13 @@
46564691 %atom |
46574692 %any-atom |
46584693 %flag |
4694+ %noun |
46594695 %tag =(n id.t)
46604696 %const |
4661− %union (lien cases.t |=(c=itype (itype-occurs n c sub)))
4697+ %union |((lien cases.t |=(c=itype (itype-occurs n c sub))) (lien args.t |=(c=itype (itype-occurs n c sub))))
4698+ %recursive |
4699+ %jrec |
4700+ %collection (lien args.t |=(c=itype (itype-occurs n c sub)))
46624701 %face $(t body.t)
46634702 %fn |($(t sample.t) $(t product.t))
46644703 %cell |($(t hed.t) $(t tal.t))
@@ -4676,6 +4715,18 @@
46764715 =. a (itype-walk a sub)
46774716 =. b (itype-walk b sub)
46784717 ?: =(a b) `sub
4718+ ?: &(?=(%jrec -.a) ?=(%jrec -.b))
4719+ ?:(&(=(at.a at.b) =(name.a name.b) =(head.a head.b) =(aura.a aura.b) =(tail.a tail.b)) `sub ~)
4720+ ?: &(?=(%recursive -.a) ?=(%recursive -.b))
4721+ ?:(&(=(module.a module.b) =(name.a name.b)) `sub ~)
4722+ ?: &(?=(%union -.a) ?=(%union -.b))
4723+ ?. =(origin.a origin.b) ~
4724+ ?: &(?=(~ args.a) ?=(~ args.b)) ?:(=(cases.a cases.b) `sub ~)
4725+ ?~ origin.a ~
4726+ (itype-unify-args args.a args.b sub)
4727+ ?: &(?=(%collection -.a) ?=(%collection -.b))
4728+ ?. =(name.a name.b) ~
4729+ (itype-unify-args args.a args.b sub)
46794730 ?: ?=(%var -.a)
46804731 ?: (itype-occurs id.a b sub) ~
46814732 `[[id.a b] sub]
@@ -4714,6 +4765,15 @@
47144765 $(a tal.a, b tal.b, sub u.first)
47154766 ~
47164767::
4768+++ itype-unify-args
4769+ |= [as=(list itype) bs=(list itype) sub=isub]
4770+ ^- (unit isub)
4771+ ?~ as ?~(bs `sub ~)
4772+ ?~ bs ~
4773+ =/ next=(unit isub) (itype-unify i.as i.bs sub)
4774+ ?~ next ~
4775+ $(as t.as, bs t.bs, sub u.next)
4776+::
47174777:: +itype-fit: one-way widening from an actual type to an expected type
47184778::
47194779:: An unknown variable used where @ is expected gains a fresh atom
@@ -4731,9 +4791,13 @@
47314791 %atom |
47324792 %any-atom &
47334793 %flag |
4794+ %noun |
47344795 %tag |
47354796 %const |
4736− %union (lien cases.t |=(c=itype (itype-has-any-atom c sub)))
4797+ %union |((lien cases.t |=(c=itype (itype-has-any-atom c sub))) (lien args.t |=(c=itype (itype-has-any-atom c sub))))
4798+ %recursive |
4799+ %jrec |
4800+ %collection (lien args.t |=(c=itype (itype-has-any-atom c sub)))
47374801 %face $(t body.t)
47384802 %fn |($(t sample.t) $(t product.t))
47394803 %cell |($(t hed.t) $(t tal.t))
@@ -4757,6 +4821,14 @@
47574821:: Related auras in a structural unification need a common-type rule;
47584822:: until that rule is implemented, report an unknown rather than error.
47594823::
4824+++ itype-family-related-collection-args
4825+ |= [as=(list itype) bs=(list itype) sub=isub]
4826+ ^- ?
4827+ ?~ as |
4828+ ?~ bs |
4829+ ?: (itype-family-related i.as i.bs sub) &
4830+ $(as t.as, bs t.bs)
4831+::
47604832++ itype-family-related
47614833 |= [a=itype b=itype sub=isub]
47624834 ^- ?
@@ -4765,6 +4837,9 @@
47654837 ?: &(?=(%atom -.a) ?=(%atom -.b))
47664838 ?. !=(aura.a aura.b) |
47674839 |((aura-prefix aura.a aura.b) (aura-prefix aura.b aura.a))
4840+ ?: &(?=(%collection -.a) ?=(%collection -.b))
4841+ ?. =(name.a name.b) |
4842+ (itype-family-related-collection-args args.a args.b sub)
47684843 ?: &(?=(%face -.a) ?=(%face -.b))
47694844 ?. =(name.a name.b) |
47704845 $(a body.a, b body.b)
@@ -4788,9 +4863,13 @@
47884863 %atom &
47894864 %any-atom &
47904865 %flag &
4866+ %noun |
47914867 %tag &
47924868 %const &
4793− %union (lien cases.typ |=(c=itype (itype-has-fixed-atom c)))
4869+ %union |((lien cases.typ |=(c=itype (itype-has-fixed-atom c))) (lien args.typ |=(c=itype (itype-has-fixed-atom c))))
4870+ %recursive |
4871+ %jrec |
4872+ %collection (lien args.typ |=(c=itype (itype-has-fixed-atom c)))
47944873 %face $(typ body.typ)
47954874 %fn |($(typ sample.typ) $(typ product.typ))
47964875 %cell |($(typ hed.typ) $(typ tal.typ))
@@ -4818,17 +4897,29 @@
48184897 ^- ?
48194898 =. t (itype-walk t sub)
48204899 ?- -.t
4900+ %collection (lien args.t |=(c=itype (itype-has-face c sub)))
48214901 %face &
48224902 %cell |($(t hed.t) $(t tal.t))
48234903 %fn |($(t sample.t) $(t product.t))
48244904 * |
48254905 ==
48264906::
4907+++ itype-face-asym-collection-args
4908+ |= [as=(list itype) bs=(list itype) sub=isub]
4909+ ^- ?
4910+ ?~ as |
4911+ ?~ bs |
4912+ ?: (itype-face-asym i.as i.bs sub) &
4913+ $(as t.as, bs t.bs)
4914+::
48274915++ itype-face-asym
48284916 |= [a=itype b=itype sub=isub]
48294917 ^- ?
48304918 =. a (itype-walk a sub)
48314919 =. b (itype-walk b sub)
4920+ ?: &(?=(%collection -.a) ?=(%collection -.b))
4921+ ?. =(name.a name.b) |
4922+ (itype-face-asym-collection-args args.a args.b sub)
48324923 ?: &(?=(%face -.a) ?=(%face -.b)) $(a body.a, b body.b)
48334924 ?: ?=(%face -.a) !|(?=(%var -.b) ?=(%avar -.b) ?=(%nvar -.b))
48344925 ?: ?=(%face -.b) !|(?=(%var -.a) ?=(%avar -.a) ?=(%nvar -.a))
@@ -4862,16 +4953,27 @@
48624953 %var &
48634954 %cell &
48644955 %union &
4956+ %recursive &
4957+ %jrec &
4958+ %noun &
4959+ %collection &
48654960 %face $(t body.t)
48664961 %fn |($(t sample.t) $(t product.t))
48674962 * |
48684963 ==
48694964::
48704965++ pending-tags
4871− |= [tags=(list @ud) sub=isub]
4966+ |= [tags=(list ipending) sub=isub]
4967+ ^- ?
4968+ ?~ tags |
4969+ ?~ (itype-lookup id.i.tags sub) &
4970+ $(tags t.tags)
4971+::
4972+++ pending-null
4973+ |= [tags=(list ipending) sub=isub]
48724974 ^- ?
48734975 ?~ tags |
4874− ?~ (itype-lookup i.tags sub) &
4976+ ?: &(?=(%null form.literal.i.tags) ?=(~ (itype-lookup id.i.tags sub))) &
48754977 $(tags t.tags)
48764978::
48774979:: Tags remain constrained until a mold selects a case or permitted atom
@@ -4882,10 +4984,11 @@
48824984 ^- ?
48834985 ?- -.t
48844986 %tag &
4987+ %collection (lien args.t |=(c=itype (itype-has-tag c)))
48854988 %face $(t body.t)
48864989 %fn |($(t sample.t) $(t product.t))
48874990 %cell |($(t hed.t) $(t tal.t))
4888− %union (lien cases.t |=(c=itype (itype-has-tag c)))
4991+ %union |((lien cases.t |=(c=itype (itype-has-tag c))) (lien args.t |=(c=itype (itype-has-tag c))))
48894992 * |
48904993 ==
48914994::
@@ -4894,12 +4997,59 @@
48944997 ^- ?
48954998 ?- -.t
48964999 %union &
5000+ %collection (lien args.t |=(c=itype (itype-has-union c)))
48975001 %face $(t body.t)
48985002 %fn |($(t sample.t) $(t product.t))
48995003 %cell |($(t hed.t) $(t tal.t))
49005004 * |
49015005 ==
49025006::
5007+:: Until a visible generic alias can be selected, expanding a named
5008+:: generic union would hide phantom arguments and its origin. This is a
5009+:: limitation of partial inference, not the unnamed-union print notation.
5010+::
5011+++ itype-has-hidden-generic
5012+ |= t=itype
5013+ ^- ?
5014+ ?- -.t
5015+ %union
5016+ ?: &(?=(~ label.t) ?=(^ args.t)) &
5017+ (lien (weld args.t cases.t) |=(c=itype (itype-has-hidden-generic c)))
5018+ %collection (lien args.t |=(c=itype (itype-has-hidden-generic c)))
5019+ %face $(t body.t)
5020+ %fn |($(t sample.t) $(t product.t))
5021+ %cell |($(t hed.t) $(t tal.t))
5022+ * |
5023+ ==
5024+::
5025+++ itype-has-recursive
5026+ |= t=itype
5027+ ^- ?
5028+ ?- -.t
5029+ %recursive &
5030+ %jrec &
5031+ %collection (lien args.t |=(c=itype (itype-has-recursive c)))
5032+ %union (lien (weld args.t cases.t) |=(c=itype (itype-has-recursive c)))
5033+ %face $(t body.t)
5034+ %cell |($(t hed.t) $(t tal.t))
5035+ %fn |($(t sample.t) $(t product.t))
5036+ * |
5037+ ==
5038+::
5039+++ itype-has-hidden-recursive
5040+ |= t=itype
5041+ ^- ?
5042+ ?- -.t
5043+ %recursive ?=(~ label.t)
5044+ %jrec ?=(~ label.t)
5045+ %collection (lien args.t |=(c=itype (itype-has-hidden-recursive c)))
5046+ %union (lien (weld args.t cases.t) |=(c=itype (itype-has-hidden-recursive c)))
5047+ %face $(t body.t)
5048+ %cell |($(t hed.t) $(t tal.t))
5049+ %fn |($(t sample.t) $(t product.t))
5050+ * |
5051+ ==
5052+::
49035053++ itype-fit-cases
49045054 |= [actual=itype cases=(list itype) sub=isub next=@ud]
49055055 ^- ifit
@@ -4933,6 +5083,7 @@
49335083 ?. ?=(%cell -.c) $(cases t.cases)
49345084 =/ head=itype (itype-walk hed.c sub)
49355085 ?. ?=(%const -.head) $(cases t.cases)
5086+ ?. =(%term form.literal.head) $(cases t.cases)
49365087 ?. =(val.literal.head val.tag) $(cases t.cases)
49375088 ?^ found [%unknown ~]
49385089 =/ trial=ifit (itype-fit sample tal.c sub next)
@@ -4941,12 +5092,63 @@
49415092++ itype-fit
49425093 |= [actual=itype expected=itype sub=isub next=@ud]
49435094 ^- ifit
5095+ (itype-fit-inner actual expected sub next | |)
5096+++ itype-fit-inner
5097+ |= [actual=itype expected=itype sub=isub next=@ud skip-width=? spine-proof=?]
5098+ ^- ifit
5099+ ?: &(!skip-width ?=(%cell -.actual) ?=(%cell -.expected) |((width-spine-exhausted actual 1.024) (width-spine-exhausted expected 1.024)))
5100+ [%unknown ~]
5101+ =/ known=(unit [source=iwfields target=iwfields])
5102+ ?: skip-width ~
5103+ (width-known-shape actual expected sub)
5104+ =/ too-wide=? ?~(known | (gth (lent order.source.u.known) (lent order.target.u.known)))
5105+ ?: too-wide [%unknown ~]
5106+ =/ spine-checked=? |(spine-proof ?=(^ known))
49445107 =/ uncertain=?
49455108 |(?=(%var -.actual) ?=(%avar -.actual) ?=(%nvar -.actual) ?=(%var -.expected) ?=(%avar -.expected) ?=(%nvar -.expected))
5109+ =/ actual-open=?
5110+ |(?=(%var -.actual) ?=(%avar -.actual) ?=(%nvar -.actual))
49465111 =. actual (itype-walk actual sub)
49475112 =. expected (itype-walk expected sub)
49485113 ?: =(actual expected) [%ok sub next]
4949− ?: &(?=(%union -.actual) ?=(%union -.expected)) [%unknown ~]
5114+ :: Any value can be used where a noun is expected. An unresolved
5115+ :: bare tag is fixed as a constant; a constructor still needs a gate.
5116+ ?: ?=(%noun -.expected)
5117+ ?: ?=(%tag -.actual)
5118+ ?: constructor.actual [%unknown ~]
5119+ [%ok [[id.actual expected] sub] next]
5120+ [%ok sub next]
5121+ :: An arbitrary noun is not known to fit a narrower type.
5122+ ?: &(?=(%noun -.actual) !?=(%var -.expected)) [%unknown ~]
5123+ ?: &(!uncertain ?=(%jrec -.actual) ?=(%face -.expected)) $(expected body.expected)
5124+ ?: &(!uncertain ?=(%face -.actual) ?=(%jrec -.expected)) $(actual body.actual)
5125+ ?: &(?=(%jrec -.actual) ?=(%jrec -.expected))
5126+ ?:(&(=(at.actual at.expected) =(name.actual name.expected) =(head.actual head.expected) =(aura.actual aura.expected) =(tail.actual tail.expected)) [%ok sub next] [%bad ~])
5127+ ?: &(|(?=(%jrec -.actual) ?=(%jrec -.expected)) !|(?=(%var -.actual) ?=(%var -.expected))) [%unknown ~]
5128+ ?: &(?=(%recursive -.actual) ?=(%recursive -.expected))
5129+ ?:(&(=(module.actual module.expected) =(name.actual name.expected)) [%ok sub next] [%bad ~])
5130+ ?: &(|(?=(%recursive -.actual) ?=(%recursive -.expected)) !|(?=(%var -.actual) ?=(%var -.expected))) [%unknown ~]
5131+ ?: &(?=(%union -.actual) ?=(%union -.expected))
5132+ ?. =(origin.actual origin.expected) [%unknown ~]
5133+ ?: &(?=(~ args.actual) ?=(~ args.expected))
5134+ ?:(=(cases.actual cases.expected) [%ok sub next] [%unknown ~])
5135+ ?~ origin.actual [%unknown ~]
5136+ =/ unified=(unit isub) (itype-unify-args args.actual args.expected sub)
5137+ ?^ unified [%ok u.unified next]
5138+ [%unknown ~]
5139+ :: A known union can instantiate an unconstrained sample directly;
5140+ :: preserve unknown results for variable-bound union origins.
5141+ ?: &(!actual-open ?=(%union -.actual) ?=(%var -.expected))
5142+ ?~ origin.actual [%unknown ~]
5143+ =/ normalized=itype (itype-normalize actual sub)
5144+ ?: |((itype-has-tag normalized) (itype-has-recursive normalized) (itype-has-any-atom actual sub)) [%unknown ~]
5145+ =/ unified=(unit isub) (itype-unify actual expected sub)
5146+ ?~ unified [%unknown ~]
5147+ [%ok u.unified next]
5148+ :: A concrete union value in a tuple may acquire the expected field's
5149+ :: face. A variable-bound union still needs face propagation support.
5150+ ?: &(!uncertain ?=(%union -.actual) ?=(%face -.expected))
5151+ $(expected body.expected)
49505152 ?: ?=(%union -.actual) [%unknown ~]
49515153 ?: &(?=(%union -.expected) |(?=(%avar -.actual) ?=(%nvar -.actual))) [%unknown ~]
49525154 ?: &(?=(%union -.expected) !?=(%var -.actual))
@@ -4965,6 +5167,10 @@
49655167 =/ trial=ifit (itype-fit-ctor-cases literal.actual sample.expected cases sub next)
49665168 ?. ?=(%ok -.trial) trial
49675169 [%ok [[id.actual expected] sub.trial] next.trial]
5170+ :: Zero may be the empty list. A nested cell fit lacks the context
5171+ :: needed to resolve it here, so do not report a definite mismatch.
5172+ ?: &(?=(%collection -.expected) =(%list name.expected) =(0 val.literal.actual))
5173+ [%unknown ~]
49685174 ?: ?=(%const -.expected)
49695175 ?:(=(val.literal.actual val.literal.expected) [%ok [[id.actual expected] sub] next] [%bad ~])
49705176 ?: ?=(%atom -.expected)
@@ -4982,6 +5188,8 @@
49825188 [%ok u.u next]
49835189 ?: |(?=(%avar -.expected) ?=(%nvar -.expected)) [%unknown ~]
49845190 ?: ?=(%face -.expected) $(expected body.expected)
5191+ ?: &(?=(%collection -.expected) =(%list name.expected) =(0 val.literal.actual))
5192+ [%unknown ~]
49855193 ?: ?=(%const -.expected)
49865194 ?:(=(val.literal.actual val.literal.expected) [%ok sub next] [%bad ~])
49875195 ?: ?=(%atom -.expected)
@@ -5011,27 +5219,40 @@
50115219 ?: &((aura-prefix aura.actual aura.expected) uncertain) [%unknown ~]
50125220 [%bad ~]
50135221 ?: &(?=(%cell -.actual) ?=(%cell -.expected))
5014− =/ first=ifit $(actual hed.actual, expected hed.expected)
5222+ =/ first=ifit $(actual hed.actual, expected hed.expected, skip-width |, spine-proof |)
50155223 ?. ?=(%ok -.first) first
5016− $(actual tal.actual, expected tal.expected, sub sub.first, next next.first)
5224+ $(actual tal.actual, expected tal.expected, sub sub.first, next next.first, skip-width spine-checked, spine-proof spine-checked)
5225+ :: A field may add a face to an occurrence of the very same type
5226+ :: variable. Binding that variable to a face around itself would fail
5227+ :: the occurs check, but its underlying type has already matched.
5228+ ?: &(?=(%var -.actual) ?=(%face -.expected) =(actual (itype-walk body.expected sub)))
5229+ [%ok sub next]
5230+ :: Differing variables and faces need propagation that is not yet
5231+ :: represented. Binding one to the face can create a false mismatch.
5232+ ?: &(?=(%var -.actual) ?=(%face -.expected)) [%unknown ~]
5233+ ?: &(?=(%face -.actual) ?=(%var -.expected)) [%unknown ~]
50175234 ?: &(?=(%var -.actual) (itype-has-any-atom expected sub))
50185235 [%unknown ~]
50195236 ?: |(?=(%var -.actual) ?=(%var -.expected))
50205237 =/ unified=(unit isub) (itype-unify actual expected sub)
50215238 ?~ unified
5239+ ?: |(?=(%face -.actual) ?=(%face -.expected)) [%unknown ~]
5240+ ?: |((itype-has-recursive (itype-normalize actual sub)) (itype-has-recursive (itype-normalize expected sub))) [%unknown ~]
50225241 ?: (itype-family-related actual expected sub) [%unknown ~]
50235242 [%bad ~]
50245243 [%ok u.unified next]
50255244 ?: &(?=(%face -.actual) ?=(%face -.expected))
50265245 ?. =(name.actual name.expected) [%bad ~]
5027− $(actual body.actual, expected body.expected)
5028− ?: ?=(%face -.actual) $(actual body.actual)
5029− ?: ?=(%face -.expected) $(expected body.expected)
5246+ $(actual body.actual, expected body.expected, skip-width |, spine-proof |)
5247+ ?: ?=(%face -.actual) $(actual body.actual, skip-width |, spine-proof |)
5248+ ?: ?=(%face -.expected) $(expected body.expected, skip-width |, spine-proof |)
50305249 ?: (itype-face-asym actual expected sub) [%unknown ~]
50315250 ?: |((itype-has-any-atom actual sub) (itype-has-any-atom expected sub))
50325251 [%unknown ~]
50335252 =/ unified=(unit isub) (itype-unify actual expected sub)
50345253 ?~ unified
5254+ ?: |((itype-has-union (itype-normalize actual sub)) (itype-has-union (itype-normalize expected sub))) [%unknown ~]
5255+ ?: |((itype-has-recursive (itype-normalize actual sub)) (itype-has-recursive (itype-normalize expected sub))) [%unknown ~]
50355256 ?: (itype-family-related actual expected sub) [%unknown ~]
50365257 [%bad ~]
50375258 [%ok u.unified next]
@@ -5060,25 +5281,153 @@
50605281 ["a shared type variable should reject incompatible arguments" problems]
50615282 =? problems ?=(~ (itype-unify same fine ~))
50625283 ["a shared type variable should accept equal arguments" problems]
5284+ =/ list-a=itype [%collection %list ~[a]]
5285+ =/ list-t=itype [%collection %list ~[txt]]
5286+ =/ list-n=itype [%collection %list ~[num]]
5287+ =? problems ?=(^ (itype-unify a list-a ~))
5288+ ["occurs check should look through collection arguments" problems]
5289+ =? problems !=((itype-vars list-a) ~[0])
5290+ ["generalization should see collection argument variables" problems]
5291+ =? problems !=((itype-rename list-a ~[[0 num]]) list-n)
5292+ ["instantiation should rename collection argument variables" problems]
5293+ =? problems ?=(^ (itype-unify list-t list-n ~))
5294+ ["collection arguments with different auras should conflict" problems]
5295+ =? problems ?=(^ (itype-unify list-t [%collection %unit ~[txt]] ~))
5296+ ["different collection names should conflict" problems]
5297+ =? problems !(itype-family-related list-t [%collection %list ~[[%atom 'tD']]] ~)
5298+ ["collection arguments should preserve aura-family uncertainty" problems]
5299+ =? problems !(itype-face-asym [%collection %list ~[[%face %x txt]]] list-t ~)
5300+ ["collection arguments should preserve face uncertainty" problems]
5301+ =/ recursive=itype [%recursive %fixture %chain `'chain.fixture']
5302+ =/ same-recursive=itype [%recursive %fixture %chain ~]
5303+ =/ other-recursive=itype [%recursive %other %chain `'chain.other']
5304+ =? problems ?=(~ (itype-unify recursive same-recursive ~))
5305+ ["recursive identity should not depend on its visible name" problems]
5306+ =? problems ?=(^ (itype-unify recursive other-recursive ~))
5307+ ["recursive identity should include the source module" problems]
5308+ =/ recursive-fit=ifit (itype-fit recursive txt ~ 0)
5309+ =? problems !?=(%unknown -.recursive-fit)
5310+ ["opaque recursive types should not be unfolded by a fit" problems]
5311+ =/ nested-fit=ifit
5312+ (itype-fit [%collection %list ~[a]] list-t ~[[0 recursive]] 1)
5313+ =? problems !?=(%unknown -.nested-fit)
5314+ ["recursive types behind substitutions should remain uncertain" problems]
50635315 problems
50645316::
50655317:: The expression inference below is deliberately a fragment: bindings,
5066−:: simple gates, unary calls, fixed-aura literals, and plain strings. The
5318+:: simple gates, calls, fixed-aura literals, and some interpolated strings. The
50675319:: result for unsupported syntax is a diagnostic, never a checked module.
50685320::
50695321+$ ischeme [typ=itype vars=(list @ud)]
50705322+$ ienv (list [name=term scheme=ischeme])
50715323+$ imold-types (list [name=term template=ischeme])
5072−+$ ifile [values=ienv molds=imold-types]
5324++$ iderived [name=term agent=term mark=term]
5325++$ iwidth-definition [name=term original=expr typ=itype sub=isub projections=(list iwprojection)]
5326++$ iwidth-dependency [at=path source=(unit @t) definitions=(list iwidth-definition)]
5327++$ ifile [values=ienv molds=imold-types at=path derived=(list iderived) elaborations=(list iwidth-definition) dependencies=(list iwidth-dependency) source=(unit @t)]
50735328+$ ijimports (list [face=term interface=ifile])
5074−+$ icaps (list [name=@t id=@ud])
5329++$ icap [name=@t id=@ud at=span]
5330++$ icaps (list icap)
50755331+$ iparams (list [name=@t typ=itype])
50765332+$ imolds (list [name=term body=shape])
50775333:: A caller supplies the exact noun returned by +read-mold:jibb-import.
50785334:: This core has no Ford dependencies; unrecognized payloads fail closed.
50795335+$ iexternals (list [module=term name=term result=*])
50805336+$ imark-externals (list [mark=term result=*])
5081−+$ istate [next=@ud sub=isub caps=icaps binders=(list @ud) molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) params=iparams active=(list term) tags=(list @ud) in-mold=?]
5337+:: Hole obligations survive discarded expressions until their owning
5338+:: definition has inferred; their source spans support unresolved reports.
5339++$ ihole [id=@ud at=span]
5340+:: Recursive-mold unfolding spends fuel in the threaded inference state.
5341+:: Retries can restart from an earlier state, so this bounds an attempt,
5342+:: not all parsing or module-checking work.
5343+:: Experimental: only closed, uniquely faced records have known axes.
5344++$ iwfield [name=term axis=@ud typ=itype]
5345++$ iwfields [order=(list iwfield) index=(map term iwfield)]
5346++$ iwstep [name=term axis=@ud]
5347++$ iwidth-result [steps=(list iwstep) sub=isub next=@ud]
5348++$ iwprojection [at=span original=expr source=itype target=itype steps=(list iwstep)]
5349+++ width-scan
5350+ |= [typ=itype sub=isub axis=@ud fuel=@ud]
5351+ ^- (unit iwfields)
5352+ =/ order=(list iwfield) ~
5353+ =/ index=(map term iwfield) *(map term iwfield)
5354+ |-
5355+ ?: =(0 fuel) ~
5356+ ?: |(?=(%var -.typ) ?=(%avar -.typ) ?=(%nvar -.typ)) ~
5357+ ?: ?=(%face -.typ)
5358+ =/ entry=iwfield [name.typ axis body.typ]
5359+ ?: ?=(^ (~(get by index) name.entry)) ~
5360+ `[(flop [entry order]) (~(put by index) name.entry entry)]
5361+ ?. ?=(%cell -.typ) ~
5362+ =/ head=itype hed.typ
5363+ ?: |(?=(%var -.head) ?=(%avar -.head) ?=(%nvar -.head)) ~
5364+ ?. ?=(%face -.head) ~
5365+ =/ entry=iwfield [name.head (mul 2 axis) body.head]
5366+ ?: ?=(^ (~(get by index) name.entry)) ~
5367+ $(typ tal.typ, axis +((mul 2 axis)), fuel (dec fuel), order [entry order], index (~(put by index) name.entry entry))
5368+++ width-in-order
5369+ |= [source=(list iwfield) target=(list iwfield)]
5370+ ^- ?
5371+ ?~ target &
5372+ ?~ source |
5373+ ?: =(name.i.source name.i.target) $(source t.source, target t.target)
5374+ $(source t.source)
5375+++ width-fit-fields
5376+ |= [source=(map term iwfield) target=(list iwfield) sub=isub next=@ud]
5377+ ^- (unit iwidth-result)
5378+ ?~ target `[~ sub next]
5379+ =/ found=(unit iwfield) (~(get by source) name.i.target)
5380+ ?~ found ~
5381+ =/ fit=ifit (itype-fit typ.u.found typ.i.target sub next)
5382+ ?. ?=(%ok -.fit) ~
5383+ =/ rest=(unit iwidth-result) $(target t.target, sub sub.fit, next next.fit)
5384+ ?~ rest ~
5385+ `[[[name.i.target axis.u.found] steps.u.rest] sub.u.rest next.u.rest]
5386+++ width-spine-exhausted
5387+ |= [t=itype fuel=@ud]
5388+ ^- ?
5389+ ?: =(0 fuel) &
5390+ ?. ?=(%cell -.t) |
5391+ ?. ?=(%face -.hed.t) |
5392+ $(t tal.t, fuel (dec fuel))
5393+++ width-known-shape
5394+ |= [actual=itype expected=itype sub=isub]
5395+ ^- (unit [source=iwfields target=iwfields])
5396+ ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
5397+ =/ source=(unit iwfields) (width-scan actual sub 1 1.024)
5398+ =/ target=(unit iwfields) (width-scan expected sub 1 1.024)
5399+ ?~ source ~
5400+ ?~ target ~
5401+ `[u.source u.target]
5402+::
5403+++ width-shape
5404+ |= [actual=itype expected=itype sub=isub]
5405+ ^- (unit [source=iwfields target=iwfields])
5406+ ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
5407+ =/ source=(unit iwfields) (width-scan actual sub 1 4.096)
5408+ =/ target=(unit iwfields) (width-scan expected sub 1 4.096)
5409+ ?~ source ~
5410+ ?~ target ~
5411+ ?. (gth (lent order.u.source) (lent order.u.target)) ~
5412+ `[u.source u.target]
5413+++ width-proj-shape
5414+ |= [actual=itype expected=itype sub=isub]
5415+ ^- (unit [source=iwfields target=iwfields])
5416+ ?. &(|(?=(%cell -.actual) ?=(%face -.actual)) |(?=(%cell -.expected) ?=(%face -.expected))) ~
5417+ =/ source=(unit iwfields) (width-scan actual sub 1 4.096)
5418+ =/ target=(unit iwfields) (width-scan expected sub 1 4.096)
5419+ ?~ source ~
5420+ ?~ target ~
5421+ ?: (lth (lent order.u.source) (lent order.u.target)) ~
5422+ `[u.source u.target]
5423+::
5424+++ width-project
5425+ |= [shape=[source=iwfields target=iwfields] sub=isub next=@ud]
5426+ ^- (unit iwidth-result)
5427+ ?. (width-in-order order.source.shape order.target.shape) ~
5428+ (width-fit-fields index.source.shape order.target.shape sub next)
5429+::
5430++$ istate [next=@ud sub=isub caps=icaps binders=(list @ud) molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) params=iparams active=(list term) tags=(list ipending) in-mold=? at=path top-molds=(list term) prelude=(unit ifile) holes=(list ihole) jrec-fuel=@ud projections=(list iwprojection)]
50825431+$ idiag [msg=tape sites=(list [at=span note=tape])]
50835432+$ iresult (each [typ=itype state=istate] idiag)
50845433+$ isample-result (each [typ=itype env=ienv state=istate] tape)
@@ -5098,8 +5447,9 @@
50985447 |= [t=itype sub=isub]
50995448 ^- itype
51005449 =. t (itype-walk t sub)
5450+ ?: ?=(%collection -.t) [%collection name.t (turn args.t |=(c=itype (itype-normalize c sub)))]
51015451 ?: ?=(%union -.t)
5102− [%union (turn cases.t |=(c=itype (itype-normalize c sub)))]
5452+ [%union (turn cases.t |=(c=itype (itype-normalize c sub))) origin.t label.t (turn args.t |=(c=itype (itype-normalize c sub)))]
51035453 ?: ?=(%face -.t)
51045454 [%face name.t $(t body.t)]
51055455 ?: ?=(%fn -.t)
@@ -5113,12 +5463,17 @@
51135463:: generalize an aura from its sample, which requires constraint analysis
51145464:: beyond this fragment; leave those cases unresolved.
51155465::
5466+:: This helper only controls decimal defaulting in visible types. A noun
5467+:: may contain gates and is not proof of a gate-free value.
51165468++ itype-has-gate
51175469 |= t=itype
51185470 ^- ?
51195471 ?- -.t
51205472 %fn &
51215473 %cell |($(t hed.t) $(t tal.t))
5474+ %recursive |
5475+ %jrec |
5476+ %collection (lien args.t |=(c=itype (itype-has-gate c)))
51225477 %face $(t body.t)
51235478 %union (lien cases.t |=(c=itype (itype-has-gate c)))
51245479 %tag |
@@ -5129,6 +5484,7 @@
51295484 %atom |
51305485 %any-atom |
51315486 %flag |
5487+ %noun |
51325488 ==
51335489::
51345490++ default-decimals
@@ -5137,11 +5493,96 @@
51375493 ?: (itype-has-gate t) t
51385494 ?- -.t
51395495 %nvar [%atom %ud]
5496+ %collection [%collection name.t (turn args.t |=(c=itype (default-decimals c)))]
51405497 %face [%face name.t $(t body.t)]
51415498 %cell [%cell $(t hed.t) $(t tal.t)]
51425499 * t
51435500 ==
51445501::
5502+:: A hole is solved only by a fully determined type or a written
5503+:: in-scope type variable. Ordinary fresh variables are not evidence.
5504+:: Compare representatives after substitution, since unification can
5505+:: orient a written capital toward the hole rather than the reverse.
5506+++ hole-variable-id
5507+ |= t=itype
5508+ ^- (unit @ud)
5509+ ?- -.t
5510+ %var `id.t
5511+ %avar `id.t
5512+ %nvar `id.t
5513+ %tag `id.t
5514+ * ~
5515+ ==
5516+++ hole-same-variable
5517+ |= [a=itype b=itype]
5518+ ^- ?
5519+ =/ x=(unit @ud) (hole-variable-id a)
5520+ ?~ x |
5521+ =/ y=(unit @ud) (hole-variable-id b)
5522+ ?~ y |
5523+ =(u.x u.y)
5524+++ hole-known
5525+ |= [t=itype state=istate]
5526+ ^- ?
5527+ =. t (itype-walk t sub.state)
5528+ ?- -.t
5529+ ?(%var %avar %nvar)
5530+ ?: (lien caps.state |=(c=icap (hole-same-variable t (itype-walk [%var id.c] sub.state)))) &
5531+ (lien params.state |=(p=[name=@t typ=itype] (hole-same-variable t (itype-walk typ.p sub.state))))
5532+ %tag |
5533+ %any-atom &
5534+ %union &((levy cases.t |=(c=itype (hole-known c state))) (levy args.t |=(c=itype (hole-known c state))))
5535+ %collection (levy args.t |=(c=itype (hole-known c state)))
5536+ %face $(t body.t)
5537+ %fn &($(t sample.t) $(t product.t))
5538+ %cell &($(t hed.t) $(t tal.t))
5539+ * &
5540+ ==
5541+++ default-hole-numbers
5542+ |= [all=(list ihole) prior=(list ihole) state=istate env=ienv permit=?]
5543+ ^- istate
5544+ :: Do not default a named capital or a variable captured from env.
5545+ ?. permit state
5546+ ?: =(all prior) state
5547+ ?~ all state
5548+ =/ t=itype (itype-walk [%var id.i.all] sub.state)
5549+ =/ free=(list @ud) (free-env-vars env sub.state)
5550+ =? state &(?=(%nvar -.t) !(hole-known t state) !(lien free |=(id=@ud =(id id.t))))
5551+ state(sub [[id.t [%atom %ud]] sub.state])
5552+ $(all t.all)
5553+::
5554+:: Only obligations created inside this definition belong to it.
5555+++ holes-created
5556+ |= [all=(list ihole) prior=(list ihole)]
5557+ ^- (list ihole)
5558+ ?: =(all prior) ~
5559+ ?~ all ~
5560+ [i.all $(all t.all)]
5561+++ hole-uncertain
5562+ |= [t=itype state=istate]
5563+ ^- ?
5564+ =. t (itype-walk t sub.state)
5565+ ?- -.t
5566+ ?(%tag %nvar %avar) !(hole-known t state)
5567+ %union |((lien cases.t |=(c=itype (hole-uncertain c state))) (lien args.t |=(c=itype (hole-uncertain c state))))
5568+ %collection (lien args.t |=(c=itype (hole-uncertain c state)))
5569+ %face $(t body.t)
5570+ %fn |($(t sample.t) $(t product.t))
5571+ %cell |($(t hed.t) $(t tal.t))
5572+ * |
5573+ ==
5574+::
5575+++ unresolved-hole
5576+ |= [all=(list ihole) prior=(list ihole) state=istate]
5577+ ^- (unit idiag)
5578+ =/ work=(list ihole) (flop (holes-created all prior))
5579+ |-
5580+ ?~ work ~
5581+ ?: (hole-known [%var id.i.work] state) $(work t.work)
5582+ ?: (hole-uncertain [%var id.i.work] state)
5583+ `["type hole needs unsupported inference" ~[[at.i.work "type hole"]]]
5584+ `["type hole needs a determined type" ~[[at.i.work "unresolved type hole"]]]
5585+::
51455586++ itype-vars
51465587 |= t=itype
51475588 ^- (list @ud)
@@ -5152,9 +5593,13 @@
51525593 %atom ~
51535594 %any-atom ~
51545595 %flag ~
5596+ %noun ~
51555597 %tag ~
51565598 %const ~
5157− %union (zing (turn cases.t |=(c=itype (itype-vars c))))
5599+ %union (zing (turn (weld args.t cases.t) |=(c=itype (itype-vars c))))
5600+ %recursive ~
5601+ %jrec ~
5602+ %collection (zing (turn args.t |=(c=itype (itype-vars c))))
51585603 %face $(t body.t)
51595604 %fn (weld $(t sample.t) $(t product.t))
51605605 %cell (weld $(t hed.t) $(t tal.t))
@@ -5188,9 +5633,13 @@
51885633 %atom t
51895634 %any-atom t
51905635 %flag t
5636+ %noun t
51915637 %tag t
51925638 %const t
5193− %union [%union (turn cases.t |=(c=itype (itype-rename c ren)))]
5639+ %union [%union (turn cases.t |=(c=itype (itype-rename c ren))) origin.t label.t (turn args.t |=(c=itype (itype-rename c ren)))]
5640+ %recursive t
5641+ %jrec t
5642+ %collection [%collection name.t (turn args.t |=(c=itype (itype-rename c ren)))]
51945643 %face [%face name.t $(t body.t)]
51955644 %fn [%fn $(t sample.t) $(t product.t)]
51965645 %cell [%cell $(t hed.t) $(t tal.t)]
@@ -5209,9 +5658,13 @@
52095658 %atom |
52105659 %any-atom |
52115660 %flag |
5661+ %noun |
52125662 %tag |
52135663 %const |
5214− %union (lien cases.t |=(c=itype (itype-var-is-atom n c)))
5664+ %union |((lien cases.t |=(c=itype (itype-var-is-atom n c))) (lien args.t |=(c=itype (itype-var-is-atom n c))))
5665+ %recursive |
5666+ %jrec |
5667+ %collection (lien args.t |=(c=itype (itype-var-is-atom n c)))
52155668 %face $(t body.t)
52165669 %fn |($(t sample.t) $(t product.t))
52175670 %cell |($(t hed.t) $(t tal.t))
@@ -5273,9 +5726,12 @@
52735726 $(ds t.ds)
52745727::
52755728::
5276−:: The importer owns its algebra. Fixed atoms, cells and Jibb-named faces
5277−:: are decoded recursively. Singletons, unions, collections, recursive
5278−:: references and invalid face names remain unsupported, never widened.
5729+:: The caller supplies unchanged results from the source-aware importer.
5730+:: That boundary is trusted for source provenance: a fork alone cannot
5731+:: reveal cases Hoon collapsed before it was constructed. Validate the
5732+:: supplied graph independently, including pairwise disjointness. Fixed
5733+:: atoms, term singletons, cells, faces and proven forks are decoded;
5734+:: unsupported singletons, collections and recursive references fail.
52795735::
52805736++ jibb-face-name
52815737 |= name=@
@@ -5285,16 +5741,180 @@
52855741 ?. (is-lower i.chars) |
52865742 (levy t.chars |=(c=@tD (in c name-mask)))
52875743::
5744+:: A source-aware reader result is trusted for origin. Validate every
5745+:: supplied branch and keep the recursive mold opaque: unfolding its
5746+:: root while naming only its tail would change its type identity.
5747++$ irec-pattern [pat=upat has=?]
5748+++ rec-pattern
5749+ |= [node=* module=term name=term]
5750+ ^- (unit irec-pattern)
5751+ ?@ node ~
5752+ ?+ -.node ~
5753+ %atom
5754+ ?: ?=([%atom %n [~ @]] node)
5755+ ?. =(0 +>+.node) ~
5756+ `[[%atom `0] |]
5757+ ?: ?=([%atom %tas [~ @]] node)
5758+ =/ value=@ +>+.node
5759+ ?. |(=(value 0) (jibb-face-name value)) ~
5760+ `[[%atom `value] |]
5761+ ?. ?=([%atom @ ~] node) ~
5762+ =/ aura=@ta (@ta +<.node)
5763+ ?. |(?=(?(%u %ud %ux %uv %t %ta %tas %p %da %dr) aura) =('tD' aura)) ~
5764+ `[[%atom ~] |]
5765+ %ref
5766+ ?. ?=([%ref @ @] node) ~
5767+ ?. &(=(module +<.node) =(name +>.node)) ~
5768+ `[[%unknown ~] &]
5769+ %apply
5770+ ?. ?=([%apply %list [* ~]] node) ~
5771+ =/ item $(node -.+>.node)
5772+ ?~ item ~
5773+ `[[%or ~[[%atom `0] [%cell pat.u.item [%unknown ~]]]] has.u.item]
5774+ %face
5775+ ?. ?=([%face @ *] node) ~
5776+ ?. (jibb-face-name +<.node) ~
5777+ $(node +>.node)
5778+ %cell
5779+ ?. ?=([%cell * *] node) ~
5780+ =/ left $(node +<.node)
5781+ ?~ left ~
5782+ =/ right $(node +>.node)
5783+ ?~ right ~
5784+ `[[%cell pat.u.left pat.u.right] |(has.u.left has.u.right)]
5785+ %fork
5786+ =/ cases (rec-patterns +.node module name)
5787+ ?~ cases ~
5788+ ?~ pats.u.cases ~
5789+ ?~ t.pats.u.cases ~
5790+ ?. (rec-patterns-disjoint pats.u.cases) ~
5791+ `[[%or pats.u.cases] has.u.cases]
5792+ ==
5793+::
5794+++ rec-patterns
5795+ |= [nodes=* module=term name=term]
5796+ ^- (unit [pats=(list upat) has=?])
5797+ ?@ nodes ?:(=(nodes 0) `[~ |] ~)
5798+ =/ first (rec-pattern -.nodes module name)
5799+ ?~ first ~
5800+ =/ rest $(nodes +.nodes)
5801+ ?~ rest ~
5802+ `[[pat.u.first pats.u.rest] |(has.u.first has.u.rest)]
5803+::
5804+++ rec-patterns-disjoint
5805+ |= pats=(list upat)
5806+ ^- ?
5807+ ?~ pats &
5808+ ?. (levy t.pats |=(p=upat =(%disjoint (union-relate i.pats p)))) |
5809+ $(pats t.pats)
5810+::
5811+::
5812+::
5813+:: Repeated faces along an imported record spine fail closed. Hoon's type
5814+:: graph can erase unfaced nested-cell boundaries, so that alone does not
5815+:: prove the original source repeated a name within one record. A faced
5816+:: body and each union alternative have separate scopes. Check recursive
5817+:: roots before making them opaque; unused molds are never inspected.
5818+::
5819+++ imported-faces-valid
5820+ |= node=*
5821+ ^- ?
5822+ ?@ node &
5823+ ?+ -.node &
5824+ %face ?:(?=([%face @ *] node) $(node +>.node) |)
5825+ %cell ?:(?=([%cell * *] node) (imported-record-faces-valid node ~) |)
5826+ %fork (imported-faces-valid-list +.node)
5827+ %apply ?:(?=([%apply @ *] node) (imported-faces-valid-list +>.node) |)
5828+ %named
5829+ ?. ?=([%named @ @ *] node) |
5830+ =/ n=[%named module=@ name=@ body=*] ;;([%named module=@ name=@ body=*] node)
5831+ (imported-faces-valid body.n)
5832+ ==
5833+::
5834+++ imported-faces-valid-list
5835+ |= nodes=*
5836+ ^- ?
5837+ ?@ nodes =(nodes 0)
5838+ ?. (imported-faces-valid -.nodes) |
5839+ $(nodes +.nodes)
5840+::
5841+++ imported-record-faces-valid
5842+ |= [node=* names=(list @)]
5843+ ^- ?
5844+ ?: ?=([%cell * *] node)
5845+ =/ head=* +<.node
5846+ =/ rest=* +>.node
5847+ ?: ?=([%face @ *] head)
5848+ ?: (lien names |=(n=@ =(n +<.head))) |
5849+ ?. (imported-faces-valid +>.head) |
5850+ $(node rest, names [+<.head names])
5851+ ?. (imported-faces-valid head) |
5852+ $(node rest)
5853+ ?: ?=([%face @ *] node)
5854+ ?: (lien names |=(n=@ =(n +<.node))) |
5855+ (imported-faces-valid +>.node)
5856+ (imported-faces-valid node)
5857+::
52885858++ import-to-itype
52895859 |= node=*
52905860 ^- (unit itype)
52915861 ?@ node ~
52925862 ?+ -.node ~
5863+ %noun ?:(=(node [%noun ~]) `[%noun ~] ~)
52935864 %atom
5865+ :: A Hoon loobean singleton is one of the two Jibb loobeans.
5866+ ?: ?=([%atom %f [~ @]] node)
5867+ =/ value=@ +>+.node
5868+ ?. |(=(value 0) =(value 1)) ~
5869+ =/ printed=@t ?:(=(value 0) '%.y' '%.n')
5870+ `[%const [%loobean %f value printed]]
5871+ :: Hoon's null singleton is the same noun as Jibb's `~` mold.
5872+ :: Other non-term singleton atoms remain unsupported here.
5873+ ?: ?=([%atom %n [~ @]] node)
5874+ ?. =(0 +>+.node) ~
5875+ `[%const [%null %n 0 '~']]
5876+ ?: ?=([%atom %tas [~ @]] node)
5877+ =/ value=@ +>+.node
5878+ ?. |(=(value 0) (jibb-face-name value)) ~
5879+ =/ printed=@t ?:(=(value 0) '%$' (cat 3 '%' value))
5880+ `[%const [%term %tas value printed]]
52945881 ?. ?=([%atom @ ~] node) ~
52955882 =/ aura=@ta (@ta +<.node)
52965883 ?. |(?=(?(%u %ud %ux %uv %t %ta %tas %p %da %dr) aura) =('tD' aura)) ~
52975884 `[%atom aura]
5885+ %named
5886+ ?. ?=([%named @ @ *] node) ~
5887+ =/ n=[%named module=@ name=@ body=*] ;;([%named module=@ name=@ body=*] node)
5888+ ?. &((jibb-face-name module.n) (jibb-face-name name.n)) ~
5889+ ?. ?=([%fork *] body.n) ~
5890+ =/ proof=(unit irec-pattern) (rec-pattern body.n (@tas module.n) (@tas name.n))
5891+ ?~ proof ~
5892+ ?. has.u.proof ~
5893+ `[%recursive (@tas module.n) (@tas name.n) `(crip "{(trip name.n)}.{(trip module.n)}")]
5894+ %apply
5895+ ?. ?=([%apply @ *] node) ~
5896+ =/ name=term (@tas +<.node)
5897+ =/ arity=@ud
5898+ ?: |(=(%list name) =(%unit name) =(%set name) =(%qeu name)) 1
5899+ ?: |(=(%map name) =(%mop name) =(%jar name) =(%jug name)) 2
5900+ 0
5901+ ?: =(arity 0) ~
5902+ =/ args=(unit (list itype)) (import-to-itypes +>.node)
5903+ ?~ args ~
5904+ ?. =(arity (lent u.args)) ~
5905+ `[%collection name u.args]
5906+ %fork
5907+ :: Hoon's ordinary ? mold is the fork of its two %f singletons.
5908+ =/ raw=* +.node
5909+ ?: |(=(raw ~[[%atom %f `0] [%atom %f `1]]) =(raw ~[[%atom %f `1] [%atom %f `0]]))
5910+ `[%flag ~]
5911+ =/ cases=(unit (list itype)) (import-to-itypes raw)
5912+ ?~ cases ~
5913+ ?~ u.cases ~
5914+ ?~ t.u.cases ~
5915+ ?: (import-has-loobean-singleton u.cases) ~
5916+ ?. (import-cases-disjoint u.cases) ~
5917+ `[%union u.cases ~ ~ ~]
52985918 %face
52995919 ?. ?=([%face @ *] node) ~
53005920 =/ name=@ +<.node
@@ -5311,6 +5931,52 @@
53115931 `[%cell u.left u.right]
53125932 ==
53135933::
5934+++ import-direct-loobean
5935+ |= t=itype
5936+ ^- ?
5937+ ?: ?=(%face -.t) $(t body.t)
5938+ ?: ?=(%union -.t) (import-has-loobean-singleton cases.t)
5939+ ?=([%const [%loobean *]] t)
5940+::
5941+++ import-has-loobean-singleton
5942+ |= cases=(list itype)
5943+ ^- ?
5944+ ?~ cases |
5945+ ?: (import-direct-loobean i.cases) &
5946+ $(cases t.cases)
5947+::
5948+++ import-to-itypes
5949+ |= nodes=*
5950+ ^- (unit (list itype))
5951+ ?@ nodes ?:(=(nodes 0) `~ ~)
5952+ =/ first (import-to-itype -.nodes)
5953+ ?~ first ~
5954+ =/ rest $(nodes +.nodes)
5955+ ?~ rest ~
5956+ `[u.first u.rest]
5957+::
5958+++ import-type-pattern
5959+ |= typ=itype
5960+ ^- upat
5961+ ?- -.typ
5962+ %noun [%all ~]
5963+ %atom [%atom ~]
5964+ %flag [%or ~[[%atom `0] [%atom `1]]]
5965+ %const [%atom `val.literal.typ]
5966+ %face $(typ body.typ)
5967+ %cell [%cell $(typ hed.typ) $(typ tal.typ)]
5968+ %union [%or (turn cases.typ |=(t=itype (import-type-pattern t)))]
5969+ * [%unknown ~]
5970+ ==
5971+::
5972+++ import-cases-disjoint
5973+ |= cases=(list itype)
5974+ ^- ?
5975+ ?~ cases &
5976+ =/ first=upat (import-type-pattern i.cases)
5977+ ?. (levy t.cases |=(t=itype =(%disjoint (union-relate first (import-type-pattern t))))) |
5978+ $(cases t.cases)
5979+::
53145980++ find-imported-mold
53155981 |= [module=term name=term externals=iexternals surs=(list term)]
53165982 ^- (unit itype)
@@ -5322,7 +5988,15 @@
53225988 =/ result=* result.i.found
53235989 ?@ result ~
53245990 ?. ?=(%& -.result) ~
5325− (import-to-itype +.result)
5991+ =/ node=* +.result
5992+ ?. (imported-faces-valid node) ~
5993+ ?@ node (import-to-itype node)
5994+ ?: ?=(%ref -.node) (import-to-itype node)
5995+ =/ pattern=(unit irec-pattern) (rec-pattern node module name)
5996+ ?~ pattern (import-to-itype node)
5997+ ?. has.u.pattern (import-to-itype node)
5998+ `[%recursive module name `(crip "{(trip name)}.{(trip module)}")]
5999+
53266000::
53276001++ collect-sur-imports
53286002 |= imports=(list import)
@@ -5351,6 +6025,7 @@
53516025 =/ result=* result.i.found
53526026 ?@ result ~
53536027 ?. ?=(%& -.result) ~
6028+ ?. (imported-faces-valid +.result) ~
53546029 (import-to-itype +.result)
53556030::
53566031++ find-jibb-interface
@@ -5369,9 +6044,88 @@
53696044 ?: =(name name.i.ms) `template.i.ms
53706045 $(ms t.ms)
53716046::
6047+:: An exported alias may name a union from another module. Only a
6048+:: nongeneric alias of the same origin is usable through this import face.
6049+::
6050+++ imported-union-alias
6051+ |= [origin=[at=path name=term] molds=imold-types]
6052+ ^- (unit term)
6053+ ?~ molds ~
6054+ =/ template=ischeme template.i.molds
6055+ ?: &(?=(~ vars.template) ?=(%union -.typ.template))
6056+ ?:(=(`origin origin.typ.template) `name.i.molds $(molds t.molds))
6057+ $(molds t.molds)
6058+::
6059+:: A public non-generic alias names exactly its origin and arguments.
6060+:: Reusing only an origin could print a different generic instantiation.
6061+++ prelude-union-alias
6062+ |= [origin=[at=path name=term] args=(list itype) molds=imold-types]
6063+ ^- (unit term)
6064+ ?^ args ~
6065+ ?~ molds ~
6066+ =/ template=ischeme template.i.molds
6067+ ?: &(?=(~ vars.template) ?=(%union -.typ.template))
6068+ ?:(&(=(`origin origin.typ.template) =(args args.typ.template)) `name.i.molds $(molds t.molds))
6069+ $(molds t.molds)
6070+::
6071+:: Names exported by the directly imported module are visible through its
6072+:: face; a matching prelude alias is also visible without a qualifier.
6073+::
6074+++ jrec-alias
6075+ |= [origin=path name=term molds=imold-types]
6076+ ^- (unit term)
6077+ ?~ molds ~
6078+ =/ template=ischeme template.i.molds
6079+ ?: &(?=(~ vars.template) ?=(%jrec -.typ.template) =(at.typ.template origin) =(name.typ.template name)) `name.i.molds
6080+ $(molds t.molds)
6081+::
6082+++ itype-in-import
6083+ |= [t=itype iface=ifile face=term prelude=(unit ifile)]
6084+ ^- itype
6085+ ?- -.t
6086+ %union
6087+ =/ label=(unit @t)
6088+ ?~ origin.t ~
6089+ ?: =(at.u.origin.t /lib/jibb/prelude/jibb) `name.u.origin.t
6090+ =/ public=(unit term)
6091+ ?~ prelude ~
6092+ (prelude-union-alias u.origin.t args.t molds.u.prelude)
6093+ ?^ public `u.public
6094+ =/ alias=(unit term) ~
6095+ =? alias &(=(at.u.origin.t at.iface) ?=(^ (find-jibb-mold name.u.origin.t iface))) `name.u.origin.t
6096+ =? alias ?=(~ alias) (imported-union-alias u.origin.t molds.iface)
6097+ ?~ alias ~
6098+ `(crip "{(trip u.alias)}.{(trip face)}")
6099+ [%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)))]
6100+ %recursive [%recursive module.t name.t ~]
6101+ %jrec
6102+ =/ public=(unit term) ?~(prelude ~ (jrec-alias at.t name.t molds.u.prelude))
6103+ ?^ public t(label `u.public)
6104+ =/ alias=(unit term) (jrec-alias at.t name.t molds.iface)
6105+ ?~ alias t(label ~)
6106+ t(label `(crip "{(trip u.alias)}.{(trip face)}"))
6107+ %collection [%collection name.t (turn args.t |=(c=itype (itype-in-import c iface face prelude)))]
6108+ %face [%face name.t $(t body.t)]
6109+ %fn [%fn $(t sample.t) $(t product.t)]
6110+ %cell [%cell $(t hed.t) $(t tal.t)]
6111+ * t
6112+ ==
6113+::
6114+++ label-direct-union
6115+ |= [typ=itype body=shape name=term state=istate]
6116+ ^- itype
6117+ ?. ?=(%union -.typ) typ
6118+ =/ direct=? ?=(%union -.body)
6119+ =? direct ?=(%generic -.body) ?=(%union -.body.body)
6120+ ?. direct typ
6121+ ?. (lien top-molds.state |=(n=term =(n name))) typ
6122+ [%union cases.typ `[at.state name] `name args.typ]
6123+::
53726124:: Generic mold parameters are lexical and distinct from the enclosing
53736125:: value's capital variables. Arguments are substituted only once, so
53746126:: an argument's variable ID cannot be captured by a template ID.
6127+:: A generic alias of a named union keeps the underlying union's origin
6128+:: and substituted argument order; an originless union stays unsupported.
53756129::
53766130++ iparam-lookup
53776131 |= [name=@t params=iparams]
@@ -5423,9 +6177,46 @@
54236177 =/ rest=[params=iparams vars=(list @ud) next=@ud] $(names t.names, next +(next))
54246178 [[[i.names [%var next]] params.rest] [next vars.rest] next.rest]
54256179::
6180+:: Recognize a unique top-level source mold with exactly a null case and a
6181+:: faced atom-headed cell whose faced tail names that same mold. Its Jibb
6182+:: path and name provide nominal identity. Other recursive shapes fail closed;
6183+:: construction and matching expose the proven shape one layer at a time.
6184+++ simple-source-recursive
6185+ |= [name=term sh=shape state=istate]
6186+ ^- (unit itype)
6187+ ?. (lien top-molds.state |=(n=term =(n name))) ~
6188+ =/ original=(unit shape) (find-simple-mold name molds.state)
6189+ ?~ original ~
6190+ ?. =(u.original sh) ~
6191+ ?. ?=(%union -.sh) ~
6192+ =/ cs=(list shape) cases.sh
6193+ ?~ cs ~
6194+ ?~ t.cs ~
6195+ ?^ t.t.cs ~
6196+ ?. ?=(%const -.i.cs) ~
6197+ ?. =(%null form.lit.i.cs) ~
6198+ ?. ?=(%cell -.i.t.cs) ~
6199+ =/ fs=(list field) fields.i.t.cs
6200+ ?~ fs ~
6201+ ?~ t.fs ~
6202+ ?^ t.t.fs ~
6203+ ?. ?=(%face -.i.fs) ~
6204+ ?. ?=(%aura -.shape.i.fs) ~
6205+ ?. !=(0 aura.shape.i.fs) ~
6206+ ?. ?=(%face -.i.t.fs) ~
6207+ ?. !=(name.i.fs name.i.t.fs) ~
6208+ =/ tail=shape shape.i.t.fs
6209+ ?. ?=(%ref -.tail) ~
6210+ ?. =(names.tail ~[name]) ~
6211+ `[%jrec at.state name `name name.i.fs aura.shape.i.fs name.i.t.fs]
6212+::
54266213++ infer-mold-template
54276214 |= [sh=shape state=istate]
54286215 ^- (unit [template=ischeme state=istate])
6216+ =/ direct=(unit itype)
6217+ ?. ?=([@ ~] active.state) ~
6218+ (simple-source-recursive i.active.state sh state)
6219+ ?^ direct `[[u.direct ~] state]
54296220 ?: ?=(%generic -.sh)
54306221 ?~ vars.sh ~
54316222 ?. (distinct-params vars.sh) ~
@@ -5433,33 +6224,136 @@
54336224 =/ out=(unit [typ=itype state=istate])
54346225 (infer-simple-shape body.sh state(next next.fresh, params params.fresh, in-mold &))
54356226 ?~ out ~
6227+ ?^ (unresolved-hole holes.state.u.out holes.state state.u.out) ~
6228+ ?: &(?=(%union -.typ.u.out) !?=(%union -.body.sh) ?=(~ origin.typ.u.out)) ~
6229+ =? typ.u.out &(?=(%union -.typ.u.out) ?=(%union -.body.sh))
6230+ typ.u.out(args (turn vars.fresh |=(n=@ud `itype`[%var n])))
54366231 =/ used=(list @ud) (itype-vars typ.u.out)
54376232 ?. (levy used |=(n=@ud (lien vars.fresh |=(p=@ud =(p n))))) ~
5438− `[[typ.u.out vars.fresh] state.u.out(params params.state, in-mold in-mold.state)]
6233+ `[[typ.u.out vars.fresh] state.u.out(params params.state, in-mold in-mold.state, holes holes.state)]
54396234 =/ out=(unit [typ=itype state=istate])
54406235 (infer-simple-shape sh state(params ~, in-mold &))
54416236 ?~ out ~
6237+ ?^ (unresolved-hole holes.state.u.out holes.state state.u.out) ~
54426238 ?: ?=(^ (itype-vars typ.u.out)) ~
5443− `[[typ.u.out ~] state.u.out(params params.state, in-mold in-mold.state)]
6239+ `[[typ.u.out ~] state.u.out(params params.state, in-mold in-mold.state, holes holes.state)]
6240+::
6241+:: A direct imported reference may carry definite reader evidence. Only
6242+:: uniquely supplied, declared inputs are used; unsupported data stay generic.
6243+++ direct-import-invalid
6244+ |= [sh=shape state=istate]
6245+ ^- (unit idiag)
6246+ ?. ?=(%ref -.sh) ~
6247+ ?~ names.sh ~
6248+ =/ n=term i.names.sh
6249+ =/ raw=*
6250+ ?~ t.names.sh
6251+ ?. (unique-value-name n marks.state) ~
6252+ ?: (lien surs.state |=(x=term =(x n))) ~
6253+ ?: ?=(^ (find-jibb-interface n jimports.state)) ~
6254+ ?: (lien globals.state |=(x=term =(x n))) ~
6255+ ?: (lien reserved-molds.state |=(x=term =(x n))) ~
6256+ ?: (lien molds.state |=(m=[name=term body=shape] =(n name.m))) ~
6257+ =/ found=imark-externals (skim mark-externals.state |=(e=[mark=term result=*] =(mark.e n)))
6258+ ?~ found ~
6259+ ?^ t.found ~
6260+ result.i.found
6261+ ?^ t.t.names.sh ~
6262+ =/ mod=term i.t.names.sh
6263+ ?: ?=(^ (find-jibb-interface mod jimports.state)) ~
6264+ ?. (unique-value-name mod surs.state) ~
6265+ ?: (lien marks.state |=(x=term =(x mod))) ~
6266+ ?: (lien globals.state |=(x=term =(x mod))) ~
6267+ ?: (lien reserved-molds.state |=(x=term =(x mod))) ~
6268+ ?: (lien molds.state |=(m=[name=term body=shape] =(mod name.m))) ~
6269+ =/ found=iexternals (skim externals.state |=(e=[module=term name=term result=*] &(=(module.e mod) =(name.e n))))
6270+ ?~ found ~
6271+ ?^ t.found ~
6272+ result.i.found
6273+ ?. ?=([%invalid ?(%aura %core) @] raw) ~
6274+ `["{(trip +>.raw)}" ~[[at.sh "invalid imported mold"]]]
6275+::
6276+:: Replay only the shape branches whose evaluation order we can prove.
6277+:: Successful prefixes must be checked before descending to a failure.
6278+++ nested-import-invalid
6279+ |= [sh=shape state=istate]
6280+ ^- (unit idiag)
6281+ ?: ?=(^ (infer-simple-shape sh state)) ~
6282+ ?- -.sh
6283+ %ref
6284+ =/ direct=(unit idiag) (direct-import-invalid sh state)
6285+ ?^ direct direct
6286+ ?~ names.sh ~
6287+ ?^ t.names.sh ~
6288+ =/ n=term i.names.sh
6289+ ?: (lien marks.state |=(x=term =(x n))) ~
6290+ ?: (lien active.state |=(x=term =(x n))) ~
6291+ =/ found=(unit shape) (find-simple-mold n molds.state)
6292+ ?~ found ~
6293+ $(sh u.found, state state(active [n active.state], in-mold &, params ~))
6294+ %fn
6295+ =/ first=(unit [typ=itype state=istate]) (infer-simple-shape sample.sh state)
6296+ ?~ first $(sh sample.sh)
6297+ $(sh product.sh, state state.u.first)
6298+ %cell (nested-field-invalid fields.sh state)
6299+ * ~
6300+ ==
6301+::
6302+++ nested-field-invalid
6303+ |= [fields=(list field) state=istate]
6304+ ^- (unit idiag)
6305+ ?~ fields ~
6306+ =/ sh=shape
6307+ ?- -.i.fields
6308+ %bare shape.i.fields
6309+ %face shape.i.fields
6310+ %pun [%ref at.i.fields ~[name.i.fields]]
6311+ ==
6312+ =/ out=(unit [typ=itype state=istate]) (infer-simple-shape sh state)
6313+ ?~ out (nested-import-invalid sh state)
6314+ $(fields t.fields, state state.u.out)
6315+::
6316+++ sample-import-invalid
6317+ |= [s=sample env=ienv state=istate]
6318+ ^- (unit idiag)
6319+ =/ result=isample-result (infer-sample s env state)
6320+ ?: ?=(%& -.result) ~
6321+ ?. =(p.result "sample mold is not supported by partial inference") ~
6322+ ?- s
6323+ [%face *] (nested-import-invalid shape.s state)
6324+ [%bare *] (nested-import-invalid shape.s state)
6325+ [%pun *] (nested-import-invalid [%ref at.s ~[name.s]] state)
6326+ [%cell *] (nested-samples-invalid items.s env state)
6327+ * ~
6328+ ==
6329+::
6330+++ nested-samples-invalid
6331+ |= [items=(list sample) env=ienv state=istate]
6332+ ^- (unit idiag)
6333+ ?~ items ~
6334+ =/ head=isample-result (infer-sample i.items env state)
6335+ ?: ?=(%| -.head) (sample-import-invalid i.items env state)
6336+ $(items t.items, env env.p.head, state state.p.head)
54446337::
54456338++ infer-simple-shape
54466339 |= [sh=shape state=istate]
54476340 ^- (unit [typ=itype state=istate])
54486341 ?- -.sh
6342+ %hole `[[%var next.state] state(next +(next.state), holes [[next.state at.sh] holes.state])]
54496343 %aura
54506344 ?: =(0 aura.sh) `[[%any-atom ~] state]
54516345 `[[%atom aura.sh] state]
54526346 %flag `[[%flag ~] state]
6347+ %noun `[[%noun ~] state]
54536348 %const
5454− ?. =(%term form.lit.sh) ~
6349+ ?. |(=(%term form.lit.sh) =(%null form.lit.sh)) ~
54556350 `[[%const lit.sh] state]
54566351 %union
54576352 =/ pairs=(list upair) (union-pairs cases.sh molds.state)
54586353 ?. (levy pairs |=(p=upair =(%disjoint relation.p))) ~
54596354 =/ cs=(unit [types=(list itype) state=istate]) (infer-shape-args cases.sh state)
54606355 ?~ cs ~
5461− ?: (lien types.u.cs |=(t=itype ?=(^ (itype-vars t)))) ~
5462− `[[%union types.u.cs] state.u.cs]
6356+ `[[%union types.u.cs ~ ~ ~] state.u.cs]
54636357 %cell (infer-simple-fields fields.sh state)
54646358 %fn
54656359 =/ arg=(unit [typ=itype state=istate]) $(sh sample.sh)
@@ -5477,7 +6371,7 @@
54776371 =/ found=(unit ischeme) (find-jibb-mold n u.iface)
54786372 ?~ found ~
54796373 ?^ vars.u.found ~
5480− `[typ.u.found state]
6374+ `[(itype-in-import typ.u.found u.iface i.t.names.sh prelude.state) state]
54816375 =/ found=(unit itype)
54826376 (find-imported-mold i.t.names.sh n externals.state surs.state)
54836377 ?~ found ~
@@ -5489,11 +6383,20 @@
54896383 `[u.imported state]
54906384 ?: (lien active.state |=(x=term =(x n))) ~
54916385 =/ found=(unit shape) (find-simple-mold n molds.state)
5492− ?~ found ~
6386+ ?~ found
6387+ ?: (lien molds.state |=(m=[name=term body=shape] =(name.m n))) ~
6388+ ?~ prelude.state ~
6389+ =/ prelude-entry=(unit ischeme) (find-jibb-mold n u.prelude.state)
6390+ ?~ prelude-entry ~
6391+ ?^ vars.u.prelude-entry ~
6392+ `[typ.u.prelude-entry state]
6393+ =/ direct=(unit itype) (simple-source-recursive n u.found state)
6394+ ?^ direct `[u.direct state]
54936395 =/ out=(unit [typ=itype state=istate])
54946396 $(sh u.found, state state(active [n active.state], in-mold &, params ~))
54956397 ?~ out ~
5496− `[typ.u.out state.u.out(active active.state, in-mold in-mold.state, params params.state)]
6398+ ?^ (unresolved-hole holes.state.u.out holes.state state.u.out) ~
6399+ `[(label-direct-union typ.u.out u.found n state) state.u.out(active active.state, in-mold in-mold.state, params params.state, holes holes.state)]
54976400 %apply
54986401 ?~ ref.sh ~
54996402 =/ args=(unit [types=(list itype) state=istate]) (infer-shape-args args.sh state)
@@ -5508,10 +6411,18 @@
55086411 ?~ vars.u.template ~
55096412 =/ applied=(unit itype) (template-apply u.template types.u.args)
55106413 ?~ applied ~
5511− `[u.applied state.u.args]
6414+ `[(itype-in-import u.applied u.iface i.t.ref.sh prelude.state.u.args) state.u.args]
55126415 ?: (lien active.state.u.args |=(x=term =(x n))) ~
55136416 =/ found=(unit shape) (find-simple-mold n molds.state.u.args)
5514− ?~ found ~
6417+ ?~ found
6418+ ?: (lien molds.state.u.args |=(m=[name=term body=shape] =(name.m n))) ~
6419+ ?~ prelude.state.u.args ~
6420+ =/ prelude-entry=(unit ischeme) (find-jibb-mold n u.prelude.state.u.args)
6421+ ?~ prelude-entry ~
6422+ ?~ vars.u.prelude-entry ~
6423+ =/ applied=(unit itype) (template-apply u.prelude-entry types.u.args)
6424+ ?~ applied ~
6425+ `[u.applied state.u.args]
55156426 ?. ?=(%generic -.u.found) ~
55166427 ?. (distinct-params vars.u.found) ~
55176428 =/ params=(unit iparams) (bind-params vars.u.found types.u.args)
@@ -5519,14 +6430,19 @@
55196430 =/ out=(unit [typ=itype state=istate])
55206431 $(sh body.u.found, state state.u.args(active [n active.state.u.args], in-mold &, params u.params))
55216432 ?~ out ~
5522− `[typ.u.out state.u.out(active active.state.u.args, in-mold in-mold.state.u.args, params params.state.u.args)]
6433+ ?^ (unresolved-hole holes.state.u.out holes.state.u.args state.u.out) ~
6434+ ?: &(?=(%union -.typ.u.out) !?=(%union -.body.u.found) ?=(~ origin.typ.u.out)) ~
6435+ ?: &(?=(%union -.typ.u.out) ?=(%union -.body.u.found) !(lien top-molds.state.u.args |=(x=term =(x n)))) ~
6436+ =? typ.u.out &(?=(%union -.typ.u.out) ?=(%union -.body.u.found))
6437+ (label-direct-union typ.u.out(args types.u.args) u.found n state.u.args)
6438+ `[typ.u.out state.u.out(active active.state.u.args, in-mold in-mold.state.u.args, params params.state.u.args, holes holes.state.u.args)]
55236439 %tvar
55246440 =/ param=(unit itype) (iparam-lookup name.sh params.state)
55256441 ?^ param `[u.param state]
55266442 ?: in-mold.state ~
55276443 =/ n=(unit @ud) (icap-lookup name.sh caps.state)
55286444 ?^ n `[[%var u.n] state]
5529− `[[%var next.state] state(next +(next.state), caps [[name.sh next.state] caps.state])]
6445+ `[[%var next.state] state(next +(next.state), caps [[name.sh next.state at.sh] caps.state])]
55306446 * ~
55316447 ==
55326448::
@@ -5559,12 +6475,12 @@
55596475 ^- isample-result
55606476 ?- -.s
55616477 %bind
5562− ?: |(?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
6478+ ?: |(=(name.s %proj) ?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
55636479 [%| "sample shadows a name"]
55646480 =/ t=itype [%var next.state]
55656481 [%& t [[name.s [t ~]] env] state(next +(next.state), binders [next.state binders.state])]
55666482 %face
5567− ?: |(?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
6483+ ?: |(=(name.s %proj) ?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
55686484 [%| "sample shadows a name"]
55696485 =/ t=(unit [typ=itype state=istate]) (infer-simple-shape shape.s state)
55706486 ?~ t [%| "sample mold is not supported by partial inference"]
@@ -5602,8 +6518,8 @@
56026518 [%& [%cell ht typ.p.tail] env.p.tail state.p.tail]
56036519::
56046520:: Local definitions generalize only variables outside their enclosing
5605−:: environment and explicit-capital scope. Unresolved groups stay
5606−:: unsupported: this fragment does not infer recursive definitions.
6521+:: environment and explicit-capital scope. Recursive gate groups use
6522+:: monomorphic placeholders while their bodies are checked.
56076523::
56086524+$ ilocal-result (each [env=ienv state=istate] idiag)
56096525++ free-env-vars
@@ -5632,6 +6548,7 @@
56326548 |-
56336549 ?~ ds &
56346550 ?: ?=(%mold -.i.ds) $(ds t.ds)
6551+ ?: =(name.i.ds %proj) |
56356552 ?. (unique-value-name name.i.ds names) |
56366553 ?: ?=(^ (ienv-lookup name.i.ds env)) |
56376554 ?: (lien globals.state |=(n=term =(n name.i.ds))) |
@@ -5655,6 +6572,7 @@
56556572 |-
56566573 ?~ locals &
56576574 =/ n=term name.i.locals
6575+ ?: =(n %proj) |
56586576 ?. (unique-value-name n names) |
56596577 ?: (lien molds.state |=(m=[name=term body=shape] =(n name.m))) |
56606578 ?: (lien marks.state |=(m=term =(n m))) |
@@ -5672,6 +6590,145 @@
56726590 ?~ inferred |
56736591 $(locals t.locals)
56746592::
6593+:: Gather written capitals belonging to one ++. Nested local definitions
6594+:: establish their own scopes; inline gates remain in the enclosing scope.
6595++$ icap-site [name=@t at=span]
6596+++ scope-shape
6597+ |= s=shape
6598+ ^- (list icap-site)
6599+ ?- -.s
6600+ %tvar ~[[name.s at.s]]
6601+ %apply (zing (turn args.s scope-shape))
6602+ %cell (zing (turn fields.s scope-field))
6603+ %union (zing (turn cases.s scope-shape))
6604+ %fn (weld (scope-shape sample.s) (scope-shape product.s))
6605+ %generic
6606+ =/ inside=(list icap-site) (scope-shape body.s)
6607+ (skim inside |=(site=icap-site !(lien vars.s |=(v=@t =(v name.site)))))
6608+ * ~
6609+ ==
6610+::
6611+++ scope-field
6612+ |= f=field
6613+ ^- (list icap-site)
6614+ ?- -.f
6615+ %face (scope-shape shape.f)
6616+ %bare (scope-shape shape.f)
6617+ %pun ~
6618+ ==
6619+::
6620+++ scope-sample
6621+ |= s=sample
6622+ ^- (list icap-site)
6623+ ?- -.s
6624+ %face (scope-shape shape.s)
6625+ %bare (scope-shape shape.s)
6626+ %cell (zing (turn items.s scope-sample))
6627+ * ~
6628+ ==
6629+::
6630+++ scope-pieces
6631+ |= ps=(list piece)
6632+ ^- (list icap-site)
6633+ ?~ ps ~
6634+ =/ first=(list icap-site)
6635+ ?- -.i.ps
6636+ %expr (scope-expr p.i.ps)
6637+ %text ~
6638+ ==
6639+ (weld first $(ps t.ps))
6640+::
6641+++ scope-qsegs
6642+ |= ps=(list qseg)
6643+ ^- (list icap-site)
6644+ ?~ ps ~
6645+ =/ first=(list icap-site)
6646+ ?- -.i.ps
6647+ %expr (scope-expr p.i.ps)
6648+ %knot ~
6649+ ==
6650+ (weld first $(ps t.ps))
6651+::
6652+++ scope-edits
6653+ |= xs=(list edit)
6654+ ^- (list icap-site)
6655+ ?~ xs ~
6656+ =/ first=(list icap-site) (scope-expr val.i.xs)
6657+ (weld first $(xs t.xs))
6658+::
6659+++ scope-items
6660+ |= xs=(list item)
6661+ ^- (list icap-site)
6662+ ?~ xs ~
6663+ =/ first=(list icap-site) (scope-expr val.i.xs)
6664+ (weld first $(xs t.xs))
6665+::
6666+++ scope-arms
6667+ |= xs=(list arm)
6668+ ^- (list icap-site)
6669+ ?~ xs ~
6670+ =/ first=(list icap-site) (scope-expr val.i.xs)
6671+ (weld first $(xs t.xs))
6672+::
6673+++ scope-exprs
6674+ |= xs=(list expr)
6675+ ^- (list icap-site)
6676+ ?~ xs ~
6677+ =/ first=(list icap-site) (scope-expr i.xs)
6678+ (weld first $(xs t.xs))
6679+::
6680+++ scope-expr
6681+ |= e=expr
6682+ ^- (list icap-site)
6683+ ?- -.e
6684+ %str (scope-pieces pieces.e)
6685+ %qath (scope-qsegs segs.e)
6686+ %change (scope-edits edits.e)
6687+ %pair (scope-expr val.e)
6688+ %unit (scope-expr val.e)
6689+ %group (scope-expr inner.e)
6690+ %list (scope-exprs items.e)
6691+ %tuple (scope-items items.e)
6692+ %gate
6693+ =/ first=(list icap-site) (scope-sample sample.e)
6694+ =/ last=(list icap-site) (scope-expr body.e)
6695+ (weld first last)
6696+ %gate-wide
6697+ =/ first=(list icap-site) (scope-sample sample.e)
6698+ =/ last=(list icap-site) (scope-expr body.e)
6699+ (weld first last)
6700+ %call
6701+ =/ first=(list icap-site) (scope-expr head.e)
6702+ =/ last=(list icap-site) (scope-exprs args.e)
6703+ (weld first last)
6704+ %cast
6705+ =/ first=(list icap-site) (scope-shape shape.e)
6706+ =/ last=(list icap-site) (scope-expr val.e)
6707+ (weld first last)
6708+ %trace
6709+ =/ first=(list icap-site) (scope-expr val.e)
6710+ =/ last=(list icap-site) (scope-expr then.e)
6711+ (weld first last)
6712+ %branch
6713+ =/ first=(list icap-site) (scope-expr subject.e)
6714+ =/ last=(list icap-site) (scope-arms arms.e)
6715+ (weld first last)
6716+ %body (scope-expr final.e)
6717+ * ~
6718+ ==
6719+::
6720+++ reserve-cap-sites
6721+ |= [sites=(list icap-site) state=istate]
6722+ ^- istate
6723+ ?~ sites state
6724+ ?: ?=(^ (icap-lookup name.i.sites caps.state)) $(sites t.sites)
6725+ $(sites t.sites, state state(next +(next.state), caps [[name.i.sites next.state at.i.sites] caps.state]))
6726+::
6727+++ reserve-def-caps
6728+ |= [e=expr state=istate]
6729+ ^- istate
6730+ (reserve-cap-sites (scope-expr e) state)
6731+::
56756732++ infer-local-defs
56766733 |= [ds=(list def) env=ienv state=istate]
56776734 ^- ilocal-result
@@ -5680,26 +6737,65 @@
56806737 |-
56816738 ?~ ds
56826739 ?~ remaining [%& env state]
5683− ?. progressed [%| ["local definitions need unsupported inference" ~]]
6740+ ?. progressed
6741+ =/ pending=(list def) (flop remaining)
6742+ =/ groups=icomponents (graph-components pending (global-value-names pending))
6743+ =/ grouped=(unit [rest=(list def) env=ienv state=istate])
6744+ (try-local-group pending groups env state)
6745+ ?~ grouped [%| ["local definitions need unsupported inference" ~]]
6746+ $(ds rest.u.grouped, remaining ~, env env.u.grouped, state state.u.grouped, progressed |)
56846747 $(ds (flop remaining), remaining ~, progressed |)
56856748 =/ d=def i.ds
56866749 ?> ?=(%value -.d)
5687− =/ inferred=iresult (infer-fragment val.d env state)
6750+ =/ local-state=istate (reserve-def-caps val.d state)
6751+ =/ inferred=iresult (infer-fragment val.d env local-state)
6752+ =/ retried=? ?=(%| -.inferred)
6753+ =? inferred retried (infer-recursive-gate d env local-state)
56886754 ?: ?=(%| -.inferred) $(ds t.ds, remaining [d remaining])
6755+ =. state.p.inferred (default-hole-numbers holes.state.p.inferred holes.state state.p.inferred env !(itype-has-gate (itype-normalize typ.p.inferred sub.state.p.inferred)))
6756+ =/ hole=(unit idiag) (unresolved-hole holes.state.p.inferred holes.state state.p.inferred)
6757+ ?^ hole [%| u.hole]
6758+ =/ merged=(unit [first=icap second=icap])
6759+ (merged-capitals caps.state.p.inferred sub.state.p.inferred)
6760+ ?^ merged
6761+ [%| ["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"]]]]
6762+ ?: (constrained-capitals caps.state.p.inferred sub.state.p.inferred)
6763+ [%| ["explicit capital constraints are not supported by partial inference" ~]]
56896764 =/ typ=itype (itype-normalize typ.p.inferred sub.state.p.inferred)
56906765 ?: |((pending-tags tags.state.p.inferred sub.state.p.inferred) (itype-has-tag typ))
56916766 $(ds t.ds, remaining [d remaining])
56926767 ?: (unsupported-atom-vars typ caps.state.p.inferred binders.state.p.inferred sub.state.p.inferred)
56936768 $(ds t.ds, remaining [d remaining])
56946769 =/ free=(list @ud)
5695− (weld (free-env-vars env sub.state.p.inferred) (free-cap-vars caps.state.p.inferred sub.state.p.inferred))
6770+ (weld (free-env-vars env sub.state.p.inferred) (free-cap-vars caps.state sub.state.p.inferred))
56966771 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
56976772 =. vars (skim vars |=(n=@ud !(lien free |=(f=@ud =(f n)))))
5698− $(ds t.ds, env [[name.d [typ vars]] env], state state.p.inferred, progressed &)
6773+ $(ds t.ds, env [[name.d [typ vars]] env], state state.p.inferred(caps caps.state, holes holes.state), progressed &)
6774+::
6775+:: Try complete cyclic local groups after individual definitions stall.
6776+:: Components with non-gates or unresolved constraints stay unavailable.
6777+::
6778+++ try-local-group
6779+ |= [ds=(list def) groups=icomponents env=ienv state=istate]
6780+ ^- (unit [rest=(list def) env=ienv state=istate])
6781+ ?~ groups ~
6782+ =/ names=(list term) i.groups
6783+ ?. (gth (lent names) 1) $(groups t.groups)
6784+ =/ members=(list def)
6785+ (skim ds |=(d=def &(?=(%value -.d) (lien names |=(n=term =(n name.d))))))
6786+ ?. =((lent members) (lent names)) $(groups t.groups)
6787+ =/ result=ilocal-result (infer-gate-group members env state)
6788+ ?: ?=(%| -.result) $(groups t.groups)
6789+ =/ rest=(list def)
6790+ (skim ds |=(d=def !(lien names |=(n=term =(n name.d)))))
6791+ =/ more=(unit [rest=(list def) env=ienv state=istate])
6792+ $(ds rest, groups t.groups, env env.p.result, state state.p.result)
6793+ ?^ more more
6794+ `[rest env.p.result state.p.result]
56996795::
57006796:: Read only fields of a known record. Unresolved field constraints and
5701−:: ambiguous repeated faces are outside this fragment (doc question:
5702−:: whether duplicate imported Hoon faces are valid or select a field).
6797+:: ambiguous repeated faces are outside this fragment. Imported record
6798+:: spines with repeated names are unavailable when used.
57036799::
57046800++ record-fields-named
57056801 |= [name=term t=itype sub=isub]
@@ -5718,92 +6814,1038 @@
57186814 ^- iresult
57196815 =/ reverse=(list term) (flop names)
57206816 ?~ reverse [%| ["empty wing" ~]]
5721− =/ scheme=(unit ischeme) (ienv-lookup i.reverse env)
5722− ?~ scheme [%| ["field access is not supported by partial inference" ~]]
5723− =/ inst=[typ=itype state=istate] (instantiate-scheme u.scheme state)
6817+ =/ iface=(unit ifile) (find-jibb-interface i.reverse jimports.state)
57246818 =/ fields=(list term) t.reverse
6819+ ?~ fields [%| ["field access is not supported by partial inference" ~]]
6820+ =/ scheme=(unit ischeme)
6821+ ?~ iface
6822+ (ienv-lookup i.reverse env)
6823+ (ienv-lookup i.fields values.u.iface)
6824+ ?~ scheme
6825+ ?^ iface [%| ["module member is not available to partial inference" ~]]
6826+ [%| ["field access is not supported by partial inference" ~]]
6827+ =/ inst=[typ=itype state=istate]
6828+ ?~ iface (instantiate-scheme u.scheme state)
6829+ =/ imported=ischeme u.scheme
6830+ =. typ.imported (itype-in-import typ.imported u.iface i.reverse prelude.state)
6831+ (instantiate-scheme imported state)
6832+ =/ remaining=(list term) ?~(iface fields t.fields)
57256833 =/ typ=itype typ.inst
57266834 |-
5727− ?~ fields [%& typ state.inst]
5728− =/ found=(list itype) (record-fields-named i.fields typ sub.state.inst)
6835+ ?~ remaining [%& typ state.inst]
6836+ =/ found=(list itype) (record-fields-named i.remaining typ sub.state.inst)
57296837 ?~ found [%| ["field is not available to partial inference" ~]]
57306838 ?^ t.found [%| ["field name is ambiguous in partial inference" ~]]
5731− $(fields t.fields, typ i.found)
6839+ $(remaining t.remaining, typ i.found)
57326840::
5733−++ infer-fragment
5734− |= [e=expr env=ienv state=istate]
6841+:: Propagate a known union or list through supported loobean, unit and list
6842+:: branches. Empty bodies and groups are transparent; bodies with definitions
6843+:: keep their normal scoping and wait for general bidirectional inference.
6844+::
6845+++ context-union-branch
6846+ |= e=expr
6847+ ^- ?
6848+ ?- -.e
6849+ %branch &
6850+ %group $(e inner.e)
6851+ %body ?~(defs.e $(e final.e) |)
6852+ * |
6853+ ==
6854+::
6855+++ infer-union-context
6856+ |= [e=expr expected=itype env=ienv state=istate context=span]
57356857 ^- iresult
6858+ ?: ?=(%group -.e) $(e inner.e)
6859+ ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
6860+ ?: &(?=(%collection -.expected) =(%list name.expected) (context-list-expression e))
6861+ (infer-list-context e expected env state context)
6862+ ?: ?=(%branch -.e)
6863+ ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
6864+ ?~ t.arms.e [%| ["branch pattern is not supported by partial inference" ~]]
6865+ ?^ t.t.arms.e [%| ["branch is not supported by partial inference" ~]]
6866+ =/ x=arm i.arms.e
6867+ =/ y=arm i.t.arms.e
6868+ ?: |((unit-empty-pattern pat.x) (unit-empty-pattern pat.y))
6869+ (infer-unit-branch e env state `[expected context])
6870+ ?. &(?=(%lit -.pat.x) ?=(%lit -.pat.y))
6871+ [%| ["branch pattern is not supported by partial inference" ~]]
6872+ ?. &(=(%loobean form.lit.pat.x) =(%loobean form.lit.pat.y))
6873+ [%| ["branch pattern is not supported by partial inference" ~]]
6874+ ?: =(val.lit.pat.x val.lit.pat.y)
6875+ [%| ["branch does not cover both loobeans" ~]]
6876+ =/ subject=iresult (infer-fragment subject.e env state)
6877+ ?: ?=(%| -.subject) subject
6878+ =/ subject-type=itype (itype-normalize typ.p.subject sub.state.p.subject)
6879+ ?: ?=(%union -.subject-type)
6880+ [%| ["contextual union-pattern branch is not supported by partial inference" ~]]
6881+ =/ su=(unit isub) (itype-unify typ.p.subject [%flag ~] sub.state.p.subject)
6882+ ?~ su [%| ["loobean branch subject does not unify with ?" ~]]
6883+ =/ left=iresult $(e val.x, state state.p.subject(sub u.su))
6884+ ?: ?=(%| -.left) left
6885+ =/ right=iresult $(e val.y, state state.p.left)
6886+ ?: ?=(%| -.right) right
6887+ [%& expected state.p.right]
6888+ =/ value=iresult (infer-fragment e env state)
6889+ ?: ?=(%| -.value) value
6890+ =/ fit=ifit (itype-fit typ.p.value expected sub.state.p.value next.state.p.value)
6891+ ?: ?=(%unknown -.fit)
6892+ ?: &(?=(%collection -.expected) =(%list name.expected))
6893+ [%| ["branch list constraint is not supported by partial inference" ~]]
6894+ ?: ?=(%flag -.expected) [%| ["branch loobean constraint is not supported by partial inference" ~]]
6895+ [%| ["branch union constraint is not supported by partial inference" ~]]
6896+ ?: ?=(%bad -.fit)
6897+ =/ missing=(unit idiag) (missing-union-tag e expected sub.state.p.value context)
6898+ ?^ missing [%| u.missing]
6899+ =/ nested=(unit idiag) (nested-missing-tag e typ.p.value expected sub.state.p.value next.state.p.value context)
6900+ ?^ nested [%| u.nested]
6901+ ?: &(?=(%collection -.expected) =(%list name.expected))
6902+ [%| ["branch arm does not fit its expected list" ~[[context "expected list"] [(span-of e) "branch arm"]]]]
6903+ ?: ?=(%flag -.expected)
6904+ [%| ["branch arm does not fit its expected loobean" ~[[context "expected loobean"] [(span-of e) "branch arm"]]]]
6905+ [%| ["branch arm does not fit its expected union" ~[[context "expected union"] [(span-of e) "branch arm"]]]]
6906+ [%& expected state.p.value(sub sub.fit, next next.fit)]
6907+::
6908+:: A list expression needs a known list target and the validated prelude list.
6909+:: Literal items and unfaced two-item cons cells receive that target one by
6910+:: one; pending constraints elsewhere stay in the threaded state.
6911+::
6912+++ context-list-expression
6913+ |= e=expr
6914+ ^- ?
57366915 ?- -.e
5737− %lit
5738− ?- form.lit.e
5739− %number ?: =(%ud aura.lit.e)
5740− [%& [%nvar next.state] state(next +(next.state))]
5741− [%& [%atom aura.lit.e] state]
5742− %ship [%& [%atom %p] state]
5743− %date [%& [%atom %da] state]
5744− %duration [%& [%atom %dr] state]
5745− %knot [%& [%atom %ta] state]
5746− %loobean [%& [%flag ~] state]
5747− %term [%& [%tag next.state lit.e |] state(next +(next.state), tags [next.state tags.state])]
5748− * [%| ["literal needs contextual inference" ~]]
5749− ==
5750− %str
5751− =/ interpolated=? (lien pieces.e |=(p=piece ?=(%expr -.p)))
5752− ?: interpolated [%| ["interpolation is not supported by partial inference" ~]]
5753− [%& [%atom %t] state]
5754− %wing
5755− ?~ names.e [%| ["empty wing" ~]]
5756− ?^ t.names.e
5757− ?^ t.t.names.e (infer-field-wing names.e env state)
5758− =/ iface=(unit ifile) (find-jibb-interface i.t.names.e jimports.state)
5759− ?~ iface (infer-field-wing names.e env state)
5760− =/ member=(unit ischeme) (ienv-lookup i.names.e values.u.iface)
5761− ?~ member [%| ["module member is not available to partial inference" ~]]
5762− =/ instance=[typ=itype state=istate] (instantiate-scheme u.member state)
5763− [%& typ.instance state.instance]
5764− =/ scheme=(unit ischeme) (ienv-lookup i.names.e env)
5765− ?~ scheme [%| ["name is not available to partial inference" ~]]
5766− =/ instance=[typ=itype state=istate] (instantiate-scheme u.scheme state)
5767− [%& typ.instance state.instance]
6916+ %list &
6917+ %tuple &
6918+ %lit |(=(%null form.lit.e) &(=(%term form.lit.e) =(0 val.lit.e)))
57686919 %group $(e inner.e)
5769− %ctor [%& [%tag next.state tag.e &] state(next +(next.state), tags [next.state tags.state])]
5770− %trace
5771− =/ traced=iresult $(e val.e)
5772− ?: ?=(%| -.traced) traced
5773− $(e then.e, state state.p.traced)
5774− %tuple (infer-simple-items items.e env state)
5775− %body
5776− ?~ defs.e $(e final.e)
5777− =/ local-names=(list term) (global-value-names defs.e)
5778− ?. (local-names-valid defs.e env state)
5779− [%| ["local definitions shadow a name" ~]]
5780− =/ local-molds=imolds (collect-simple-molds defs.e)
5781− ?. (local-mold-names-valid local-molds state)
5782− [%| ["local molds shadow a name" ~]]
5783− =/ local-state=istate
5784− state(globals (weld local-names globals.state), molds (weld local-molds molds.state))
5785− ?. (local-molds-supported local-molds local-state)
5786− [%| ["local molds need unsupported inference" ~]]
5787− =/ values=(list def) (local-value-defs defs.e)
5788− =/ locals=ilocal-result (infer-local-defs values env local-state)
5789− ?: ?=(%| -.locals) locals
5790− =/ result=iresult $(e final.e, env env.p.locals, state state.p.locals)
6920+ %body ?~(defs.e $(e final.e) |)
6921+ * |
6922+ ==
6923+::
6924+++ infer-list-context
6925+ |= [e=expr expected=itype env=ienv state=istate context=span]
6926+ ^- iresult
6927+ ?: ?=(%group -.e) $(e inner.e)
6928+ ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
6929+ ?~ prelude.state [%| ["list literal needs the standard prelude in partial inference" ~]]
6930+ ?. =(at.u.prelude.state /lib/jibb/prelude/jibb)
6931+ [%| ["list literal needs the standard prelude in partial inference" ~]]
6932+ =/ standard=(unit ischeme) (find-jibb-mold %list u.prelude.state)
6933+ ?~ standard [%| ["list literal needs the standard prelude in partial inference" ~]]
6934+ ?. =(u.standard [[%collection %list ~[[%var 0]]] ~[0]])
6935+ [%| ["list literal needs the standard prelude in partial inference" ~]]
6936+ =/ target=itype (itype-walk expected sub.state)
6937+ ?. ?=(%collection -.target) [%| ["list context is not supported by partial inference" ~]]
6938+ ?. =(%list name.target) [%| ["list context is not supported by partial inference" ~]]
6939+ ?~ args.target [%| ["list context is not supported by partial inference" ~]]
6940+ ?^ t.args.target [%| ["list context is not supported by partial inference" ~]]
6941+ ?: ?=(%lit -.e)
6942+ ?. |(=(%null form.lit.e) &(=(%term form.lit.e) =(0 val.lit.e)))
6943+ [%| ["list expression is not supported by partial inference" ~]]
6944+ [%& target state]
6945+ ?: ?=(%list -.e)
6946+ =/ result=iresult (infer-list-items items.e i.args.target env state context)
6947+ ?: ?=(%| -.result) result
6948+ [%& target state.p.result]
6949+ ?. ?=(%tuple -.e) [%| ["list expression is not supported by partial inference" ~]]
6950+ ?~ items.e [%| ["cons shape is not supported by partial inference" ~]]
6951+ ?~ t.items.e [%| ["cons shape is not supported by partial inference" ~]]
6952+ ?^ t.t.items.e [%| ["cons shape is not supported by partial inference" ~]]
6953+ ?^ face.i.items.e [%| ["faced cons is not supported by partial inference" ~]]
6954+ ?^ face.i.t.items.e [%| ["faced cons is not supported by partial inference" ~]]
6955+ =/ head=iresult (infer-list-items ~[val.i.items.e] i.args.target env state context)
6956+ ?: ?=(%| -.head) head
6957+ =/ target=itype (itype-walk target sub.state.p.head)
6958+ =/ tail=iresult
6959+ ?: (context-list-expression val.i.t.items.e)
6960+ (infer-list-context val.i.t.items.e target env state.p.head context)
6961+ (infer-fragment val.i.t.items.e env state.p.head)
6962+ ?: ?=(%| -.tail) tail
6963+ =/ fit=ifit (itype-fit typ.p.tail target sub.state.p.tail next.state.p.tail)
6964+ ?: ?=(%unknown -.fit) [%| ["list tail constraint is not supported by partial inference" ~]]
6965+ ?: ?=(%bad -.fit)
6966+ [%| ["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)]]]]
6967+ [%& target state.p.tail(sub sub.fit, next next.fit)]
6968+::
6969+++ infer-open-list-items
6970+ |= [items=(list expr) expected=itype env=ienv state=istate context=span]
6971+ ^- iresult
6972+ ?~ items [%& expected state]
6973+ =/ target=itype (itype-walk expected sub.state)
6974+ =/ value=iresult (infer-call-context-arg i.items target env state context)
6975+ ?: ?=(%| -.value) value
6976+ =/ fit=ifit (itype-fit typ.p.value target sub.state.p.value next.state.p.value)
6977+ ?: ?=(%unknown -.fit) [%| ["list item constraint is not supported by partial inference" ~]]
6978+ ?: ?=(%bad -.fit)
6979+ ?: |((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))
6980+ [%| ["list item widening is not supported by partial inference" ~]]
6981+ [%| ["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)]]]]
6982+ ?: (itype-has-tag (itype-normalize expected sub.fit))
6983+ [%| ["list item needs context in partial inference" ~]]
6984+ $(items t.items, state state.p.value(sub sub.fit, next next.fit))
6985+::
6986+++ infer-list-items
6987+ |= [items=(list expr) expected=itype env=ienv state=istate context=span]
6988+ ^- iresult
6989+ ?~ items [%& expected state]
6990+ =/ target=itype (itype-walk expected sub.state)
6991+ =/ value=iresult (infer-call-context-arg i.items target env state context)
6992+ ?: ?=(%| -.value) value
6993+ =/ fit=ifit (itype-fit typ.p.value target sub.state.p.value next.state.p.value)
6994+ ?: ?=(%unknown -.fit) [%| ["list item constraint is not supported by partial inference" ~]]
6995+ ?: ?=(%bad -.fit)
6996+ =/ missing=(unit idiag) (missing-union-tag i.items target sub.state.p.value context)
6997+ ?^ missing [%| u.missing]
6998+ =/ nested=(unit idiag) (nested-missing-tag i.items typ.p.value target sub.state.p.value next.state.p.value context)
6999+ ?^ nested [%| u.nested]
7000+ [%| ["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)]]]]
7001+ $(items t.items, state state.p.value(sub sub.fit, next next.fit))
7002+::
7003+:: The supported unit pattern covers exactly an atom zero and a cell
7004+:: headed by zero, with a single binder for its payload. Unresolved
7005+:: subjects and all other pattern matrices stay outside this fragment.
7006+::
7007+++ unit-empty-pattern
7008+ |= p=pattern
7009+ ^- ?
7010+ ?. ?=(%lit -.p) |
7011+ =(%null form.lit.p)
7012+::
7013+++ unit-payload-pattern
7014+ |= p=pattern
7015+ ^- (unit term)
7016+ ?. ?=(%cell -.p) ~
7017+ ?~ items.p ~
7018+ ?~ t.items.p ~
7019+ ?^ t.t.items.p ~
7020+ ?. (unit-empty-pattern i.items.p) ~
7021+ ?. ?=(%bind -.i.t.items.p) ~
7022+ `name.i.t.items.p
7023+::
7024+++ unit-empty-case
7025+ |= t=itype
7026+ ^- ?
7027+ ?. ?=(%const -.t) |
7028+ =(0 val.literal.t)
7029+::
7030+++ unit-payload-case
7031+ |= t=itype
7032+ ^- (unit itype)
7033+ ?. ?=(%cell -.t) ~
7034+ ?. (unit-empty-case hed.t) ~
7035+ =/ payload=itype tal.t
7036+ =? payload ?=(%face -.payload) body.payload
7037+ `payload
7038+::
7039+++ unit-union-payload
7040+ |= t=itype
7041+ ^- (unit itype)
7042+ ?. ?=(%union -.t) ~
7043+ ?~ cases.t ~
7044+ ?~ t.cases.t ~
7045+ ?^ t.t.cases.t ~
7046+ ?: (unit-empty-case i.cases.t) (unit-payload-case i.t.cases.t)
7047+ ?: (unit-empty-case i.t.cases.t) (unit-payload-case i.cases.t)
7048+ ~
7049+::
7050+:: List matching currently covers exactly null and a cell of two binders.
7051+:: The head has the element type and the tail has the whole list type.
7052+:: Other patterns and lists whose element mold is empty remain unsupported.
7053+::
7054+++ list-payload-pattern
7055+ |= p=pattern
7056+ ^- (unit [head=term tail=term])
7057+ ?. ?=(%cell -.p) ~
7058+ ?~ items.p ~
7059+ ?~ t.items.p ~
7060+ ?^ t.t.items.p ~
7061+ ?. ?=(%bind -.i.items.p) ~
7062+ ?. ?=(%bind -.i.t.items.p) ~
7063+ `[name.i.items.p name.i.t.items.p]
7064+::
7065+++ infer-list-branch
7066+ |= [e=expr env=ienv state=istate expected=(unit [typ=itype context=span]) typ=itype]
7067+ ^- iresult
7068+ ?> ?=(%branch -.e)
7069+ ?> ?=(%collection -.typ)
7070+ ?. =(%list name.typ) [%| ["list pattern is not supported by partial inference" ~]]
7071+ ?~ prelude.state [%| ["list pattern needs the standard prelude in partial inference" ~]]
7072+ ?. =(at.u.prelude.state /lib/jibb/prelude/jibb)
7073+ [%| ["list pattern needs the standard prelude in partial inference" ~]]
7074+ =/ standard=(unit ischeme) (find-jibb-mold %list u.prelude.state)
7075+ ?~ standard [%| ["list pattern needs the standard prelude in partial inference" ~]]
7076+ ?. =(u.standard [[%collection %list ~[[%var 0]]] ~[0]])
7077+ [%| ["list pattern needs the standard prelude in partial inference" ~]]
7078+ ?~ args.typ [%| ["list pattern is not supported by partial inference" ~]]
7079+ ?^ t.args.typ [%| ["list pattern is not supported by partial inference" ~]]
7080+ ?~ arms.e [%| ["list branch is not supported by partial inference" ~]]
7081+ ?~ t.arms.e [%| ["list branch is not supported by partial inference" ~]]
7082+ ?^ t.t.arms.e [%| ["list branch is not supported by partial inference" ~]]
7083+ =/ x=arm i.arms.e
7084+ =/ y=arm i.t.arms.e
7085+ =/ first-empty=? (unit-empty-pattern pat.x)
7086+ =/ first-name=(unit [head=term tail=term]) (list-payload-pattern pat.x)
7087+ =/ second-name=(unit [head=term tail=term]) (list-payload-pattern pat.y)
7088+ ?. |(&(first-empty ?=(^ second-name)) &((unit-empty-pattern pat.y) ?=(^ first-name)))
7089+ [%| ["list branch pattern is not supported by partial inference" ~]]
7090+ =/ binder=(unit [head=term tail=term]) ?:(first-empty second-name first-name)
7091+ ?~ binder [%| ["list branch pattern is not supported by partial inference" ~]]
7092+ ?: |(=(head.u.binder %proj) =(tail.u.binder %proj) =(head.u.binder tail.u.binder) ?=(^ (ienv-lookup head.u.binder env)) ?=(^ (ienv-lookup tail.u.binder env)) (lien globals.state |=(n=term |(=(n head.u.binder) =(n tail.u.binder)))))
7093+ [%| ["pattern binder shadows a name" ~]]
7094+ =/ extended=ienv [[head.u.binder [i.args.typ ~]] [tail.u.binder [typ ~]] env]
7095+ =/ left=iresult
7096+ ?~ expected (infer-fragment val.x ?:(first-empty env extended) state)
7097+ (infer-union-context val.x typ.u.expected ?:(first-empty env extended) state context.u.expected)
7098+ ?: ?=(%| -.left) left
7099+ =/ right=iresult
7100+ ?~ expected (infer-fragment val.y ?:(first-empty extended env) state.p.left)
7101+ (infer-union-context val.y typ.u.expected ?:(first-empty extended env) state.p.left context.u.expected)
7102+ ?: ?=(%| -.right) right
7103+ ?^ expected [%& typ.u.expected state.p.right]
7104+ =/ joined=(unit isub) (itype-unify typ.p.left typ.p.right sub.state.p.right)
7105+ ?~ joined [%| ["list branch results need unsupported inference" ~]]
7106+ [%& typ.p.left state.p.right(sub u.joined)]
7107+::
7108+++ infer-unit-branch
7109+ |= [e=expr env=ienv state=istate expected=(unit [typ=itype context=span])]
7110+ ^- iresult
7111+ ?> ?=(%branch -.e)
7112+ ?~ arms.e [%| ["unit branch is not supported by partial inference" ~]]
7113+ ?~ t.arms.e [%| ["unit branch is not supported by partial inference" ~]]
7114+ ?^ t.t.arms.e [%| ["unit branch is not supported by partial inference" ~]]
7115+ =/ subject=iresult (infer-fragment subject.e env state)
7116+ ?: ?=(%| -.subject) subject
7117+ =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7118+ ?: &(?=(%collection -.typ) =(%list name.typ))
7119+ (infer-list-branch e env state.p.subject expected typ)
7120+ =/ x=arm i.arms.e
7121+ =/ y=arm i.t.arms.e
7122+ =/ first-empty=? (unit-empty-pattern pat.x)
7123+ =/ first-name=(unit term) (unit-payload-pattern pat.x)
7124+ =/ second-name=(unit term) (unit-payload-pattern pat.y)
7125+ ?. |(&(first-empty ?=(^ second-name)) &((unit-empty-pattern pat.y) ?=(^ first-name)))
7126+ [%| ["unit branch pattern is not supported by partial inference" ~]]
7127+ =/ binder=(unit term) ?:(first-empty second-name first-name)
7128+ ?~ binder [%| ["unit branch pattern is not supported by partial inference" ~]]
7129+ ?: |(=(u.binder %proj) ?=(^ (ienv-lookup u.binder env)) (lien globals.state |=(n=term =(n u.binder))))
7130+ [%| ["pattern binder shadows a name" ~]]
7131+ =/ payload=(unit itype) (unit-union-payload typ)
7132+ ?~ payload [%| ["unit branch subject is not supported by partial inference" ~]]
7133+ =/ extended=ienv [[u.binder [u.payload ~]] env]
7134+ =/ left=iresult
7135+ ?~ expected (infer-fragment val.x ?:(first-empty env extended) state.p.subject)
7136+ (infer-union-context val.x typ.u.expected ?:(first-empty env extended) state.p.subject context.u.expected)
7137+ ?: ?=(%| -.left) left
7138+ =/ right=iresult
7139+ ?~ expected (infer-fragment val.y ?:(first-empty extended env) state.p.left)
7140+ (infer-union-context val.y typ.u.expected ?:(first-empty extended env) state.p.left context.u.expected)
7141+ ?: ?=(%| -.right) right
7142+ ?^ expected [%& typ.u.expected state.p.right]
7143+ =/ joined=(unit isub) (itype-unify typ.p.left typ.p.right sub.state.p.right)
7144+ ?~ joined [%| ["unit branch results need unsupported inference" ~]]
7145+ [%& typ.p.left state.p.right(sub u.joined)]
7146+::
7147+:: Infer pieces in order, retaining their substitutions and pending tags.
7148+:: A bare decimal literal has no outside type constraint, so it takes its
7149+:: normal @ud default here. Other open numeric and aura variables wait for
7150+:: deferred constraints, which this fragment does not implement yet.
7151+++ infer-string-pieces
7152+ |= [ps=(list piece) env=ienv state=istate]
7153+ ^- iresult
7154+ ?~ ps [%& [%atom %t] state]
7155+ ?: ?=(%text -.i.ps) $(ps t.ps)
7156+ =/ item=iresult (infer-fragment p.i.ps env state)
7157+ ?: ?=(%| -.item) item
7158+ =/ t=itype (itype-normalize typ.p.item sub.state.p.item)
7159+ ?: |(?=(%atom -.t) ?=(%any-atom -.t))
7160+ $(ps t.ps, state state.p.item)
7161+ ?: &(?=(%nvar -.t) ?=(%lit -.p.i.ps) =(%number form.lit.p.i.ps))
7162+ $(ps t.ps, state state.p.item)
7163+ ?: &(?=(%collection -.t) =(%list name.t) =(~[[%atom 'tD']] args.t))
7164+ $(ps t.ps, state state.p.item)
7165+ ?: &(?=(%avar -.t) (atom-var-from-cap id.t caps.state.p.item sub.state.p.item))
7166+ [%| ["a generic atom in interpolation needs an aura" ~[[(span-of p.i.ps) "atom with a generic aura"]]]]
7167+ ?: ?=(%cell -.t)
7168+ [%| ["a cell in interpolation needs a printer" ~[[(span-of p.i.ps) "cell without a printer"]]]]
7169+ [%| ["interpolation type needs unsupported inference" ~]]
7170+::
7171+:: Whole-case coverage for a known union. When a pattern may cover only
7172+:: part of a case, finite loobean refinements are tried below; other
7173+:: partial coverage stays unsupported until the general pattern matrix.
7174++$ imatch ?(%full %none %unknown)
7175+++ union-pattern-items
7176+ |= [ps=(list pattern) t=itype]
7177+ ^- imatch
7178+ ?~ ps %unknown
7179+ ?~ t.ps (union-pattern i.ps t)
7180+ =. t ?:(?=(%face -.t) body.t t)
7181+ ?. ?=(%cell -.t)
7182+ ?: |(?=(%atom -.t) ?=(%any-atom -.t) ?=(%flag -.t) ?=(%const -.t)) %none
7183+ %unknown
7184+ =/ a=imatch (union-pattern i.ps hed.t)
7185+ =/ b=imatch $(ps t.ps, t tal.t)
7186+ ?: |(=(%none a) =(%none b)) %none
7187+ ?:(&(=(%full a) =(%full b)) %full %unknown)
7188+::
7189+++ union-pattern
7190+ |= [p=pattern t=itype]
7191+ ^- imatch
7192+ =. t ?:(?=(%face -.t) body.t t)
7193+ ?- -.p
7194+ %any %full
7195+ %bind %full
7196+ %lit
7197+ ?: ?=(%const -.t) ?:(=(val.literal.t val.lit.p) %full %none)
7198+ ?: ?=(%cell -.t) %none
7199+ ?: ?=(%flag -.t)
7200+ ?:(|(=(0 val.lit.p) =(1 val.lit.p)) %unknown %none)
7201+ %unknown
7202+ %str ?:(?=(%cell -.t) %none %unknown)
7203+ %cell (union-pattern-items items.p t)
7204+ ==
7205+::
7206+++ union-pattern-has-bind
7207+ |= p=pattern
7208+ ^- ?
7209+ ?: ?=(%bind -.p) &
7210+ ?. ?=(%cell -.p) |
7211+ (lien items.p union-pattern-has-bind)
7212+::
7213+++ union-pattern-bind-items
7214+ |= [ps=(list pattern) t=itype env=ienv globals=(list term)]
7215+ ^- (unit ienv)
7216+ ?~ ps ~
7217+ ?~ t.ps (union-pattern-bind i.ps t env globals)
7218+ =. t ?:(?=(%face -.t) body.t t)
7219+ ?. ?=(%cell -.t) ~
7220+ =/ first=(unit ienv) (union-pattern-bind i.ps hed.t env globals)
7221+ ?~ first ~
7222+ $(ps t.ps, t tal.t, env u.first)
7223+::
7224+++ union-pattern-bind
7225+ |= [p=pattern t=itype env=ienv globals=(list term)]
7226+ ^- (unit ienv)
7227+ =. t ?:(?=(%face -.t) body.t t)
7228+ ?: ?=(%bind -.p)
7229+ ?: |(=(name.p %proj) ?=(^ (ienv-lookup name.p env)) (lien globals |=(n=term =(n name.p)))) ~
7230+ `[[name.p [t ~]] env]
7231+ ?: ?=(%cell -.p) (union-pattern-bind-items items.p t env globals)
7232+ `env
7233+::
7234+:: Split loobean fields into finite refinements for partial patterns.
7235+:: Keep original cases for binder types and preserve whole-case matching
7236+:: before trying refinements. Cap products at 64; unknown, empty or opaque
7237+:: shapes stay unsupported rather than implying complete pattern checking.
7238++$ ifinite [origin=@ud base=itype part=itype]
7239+++ finite-product
7240+ |= [hs=(list itype) ts=(list itype) out=(list itype)]
7241+ ^- (list itype)
7242+ ?~ hs out
7243+ =/ rows=(list itype) (turn ts |=(t=itype [%cell i.hs t]))
7244+ $(hs t.hs, out (weld rows out))
7245+::
7246+++ finite-type
7247+ |= t=itype
7248+ ^- (unit (list itype))
7249+ ?- -.t
7250+ %flag
7251+ `~[[%const [%loobean %f 0 '%.y']] [%const [%loobean %f 1 '%.n']]]
7252+ %face
7253+ =/ body=(unit (list itype)) $(t body.t)
7254+ ?~ body ~
7255+ `(turn u.body |=(x=itype [%face name.t x]))
7256+ %cell
7257+ =/ hed=(unit (list itype)) $(t hed.t)
7258+ ?~ hed ~
7259+ =/ tal=(unit (list itype)) $(t tal.t)
7260+ ?~ tal ~
7261+ ?: (gth (mul (lent u.hed) (lent u.tal)) 64) ~
7262+ `(finite-product u.hed u.tal ~)
7263+ * `~[t]
7264+ ==
7265+::
7266+++ finite-cases
7267+ |= [xs=(list itype) out=(list ifinite) origin=@ud]
7268+ ^- (unit (list ifinite))
7269+ ?~ xs `out
7270+ =/ parts=(unit (list itype)) (finite-type i.xs)
7271+ ?~ parts ~
7272+ ?: (gth (add (lent out) (lent u.parts)) 64) ~
7273+ =/ rows=(list ifinite) (turn u.parts |=(t=itype [origin i.xs t]))
7274+ $(xs t.xs, out (weld out rows), origin +(origin))
7275+::
7276+++ infer-known-union-whole
7277+ |= [e=expr env=ienv subject=iresult]
7278+ ^- (unit iresult)
7279+ ?> ?=(%branch -.e)
7280+ ?: ?=(%| -.subject) `subject
7281+ =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7282+ ?. ?=(%union -.typ) `[%| ["branch is not supported by partial inference" ~]]
7283+ =/ cases=(list itype) cases.typ
7284+ =/ remaining=(list itype) cases
7285+ =/ arms=(list arm) arms.e
7286+ =/ st=istate state.p.subject
7287+ =/ answer=(unit itype) ~
7288+ |-
7289+ ?~ arms
7290+ ?^ remaining
7291+ `[%| ["missing union case {(show-itype i.remaining sub.st)}" ~]]
7292+ ?~ answer `[%| ["empty union branch is not supported by partial inference" ~]]
7293+ `[%& u.answer st]
7294+ =/ a=arm i.arms
7295+ ?: (lien remaining |=(c=itype =(%unknown (union-pattern pat.a c))))
7296+ ~
7297+ =/ matching=(list itype) (skim remaining |=(c=itype =(%full (union-pattern pat.a c))))
7298+ ?~ matching
7299+ ?: (lien cases |=(c=itype =(%full (union-pattern pat.a c))))
7300+ `[%| ["branch arm is covered by earlier arms" ~[[at.pat.a "covered arm"]]]]
7301+ `[%| ["union pattern is not supported by partial inference" ~]]
7302+ ?: &(?=(^ t.matching) (union-pattern-has-bind pat.a))
7303+ `[%| ["a union pattern binding several cases is not supported by partial inference" ~]]
7304+ =/ bound=(unit ienv) (union-pattern-bind pat.a i.matching env globals.st)
7305+ ?~ bound `[%| ["pattern binder shadows a name" ~]]
7306+ =/ body=iresult (infer-fragment val.a u.bound st)
7307+ ?: ?=(%| -.body) `body
7308+ =/ result=itype (itype-normalize typ.p.body sub.state.p.body)
7309+ =/ mismatch=? ?~(answer | !=((itype-normalize u.answer sub.state.p.body) result))
7310+ ?: mismatch `[%| ["union branch result matching needs unsupported inference" ~]]
7311+ $(arms t.arms, remaining (skim remaining |=(c=itype !=(%full (union-pattern pat.a c)))), st state.p.body, answer `result)
7312+::
7313+++ infer-known-union-context-whole
7314+ |= [e=expr expected=itype env=ienv subject=iresult context=span]
7315+ ^- (unit iresult)
7316+ ?> ?=(%branch -.e)
7317+ ?: ?=(%| -.subject) `subject
7318+ =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7319+ ?. ?=(%union -.typ) `[%| ["branch is not supported by partial inference" ~]]
7320+ =/ cases=(list itype) cases.typ
7321+ =/ remaining=(list itype) cases
7322+ =/ arms=(list arm) arms.e
7323+ =/ st=istate state.p.subject
7324+ =/ answer=(unit itype) ~
7325+ |-
7326+ ?~ arms
7327+ ?^ remaining
7328+ `[%| ["missing union case {(show-itype i.remaining sub.st)}" ~]]
7329+ ?~ answer `[%| ["empty union branch is not supported by partial inference" ~]]
7330+ `[%& expected st]
7331+ =/ a=arm i.arms
7332+ ?: (lien remaining |=(c=itype =(%unknown (union-pattern pat.a c))))
7333+ ~
7334+ =/ matching=(list itype) (skim remaining |=(c=itype =(%full (union-pattern pat.a c))))
7335+ ?~ matching
7336+ ?: (lien cases |=(c=itype =(%full (union-pattern pat.a c))))
7337+ `[%| ["branch arm is covered by earlier arms" ~[[at.pat.a "covered arm"]]]]
7338+ `[%| ["union pattern is not supported by partial inference" ~]]
7339+ ?: &(?=(^ t.matching) (union-pattern-has-bind pat.a))
7340+ `[%| ["a union pattern binding several cases is not supported by partial inference" ~]]
7341+ =/ bound=(unit ienv) (union-pattern-bind pat.a i.matching env globals.st)
7342+ ?~ bound `[%| ["pattern binder shadows a name" ~]]
7343+ =/ body=iresult (infer-call-context-arg val.a expected u.bound st context)
7344+ ?: ?=(%| -.body) `body
7345+ =/ fit=ifit (itype-fit typ.p.body expected sub.state.p.body next.state.p.body)
7346+ ?: ?=(%unknown -.fit) `[%| ["union branch result constraint is not supported by partial inference" ~]]
7347+ ?: ?=(%bad -.fit)
7348+ =/ missing=(unit idiag) (missing-union-tag val.a expected sub.state.p.body context)
7349+ ?^ missing `[%| u.missing]
7350+ =/ nested=(unit idiag) (nested-missing-tag val.a typ.p.body expected sub.state.p.body next.state.p.body context)
7351+ ?^ nested `[%| u.nested]
7352+ `[%| ["union branch arm does not fit its expected type" ~[[context "expected type"] [(span-of val.a) "branch arm"]]]]
7353+ ?: (itype-has-tag (itype-normalize expected sub.fit))
7354+ `[%| ["union branch result needs context in partial inference" ~]]
7355+ $(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)
7356+::
7357+++ infer-known-union-finite
7358+ |= [e=expr env=ienv subject=iresult expected=(unit [typ=itype context=span])]
7359+ ^- iresult
7360+ ?> ?=(%branch -.e)
7361+ ?: ?=(%| -.subject) subject
7362+ =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7363+ ?. ?=(%union -.typ) [%| ["branch is not supported by partial inference" ~]]
7364+ =/ expanded=(unit (list ifinite)) (finite-cases cases.typ ~ 0)
7365+ ?~ expanded [%| ["union pattern expansion needs unsupported inference" ~]]
7366+ =/ cases=(list ifinite) u.expanded
7367+ =/ remaining=(list ifinite) cases
7368+ =/ arms=(list arm) arms.e
7369+ =/ st=istate state.p.subject
7370+ =/ answer=(unit itype) ~
7371+ |-
7372+ ?~ arms
7373+ ?^ remaining
7374+ [%| ["missing union case {(show-itype part.i.remaining sub.st)}" ~]]
7375+ ?~ answer [%| ["empty union branch is not supported by partial inference" ~]]
7376+ ?~ expected [%& u.answer st]
7377+ [%& typ.u.expected st]
7378+ =/ a=arm i.arms
7379+ ?: (lien remaining |=(c=ifinite =(%unknown (union-pattern pat.a part.c))))
7380+ [%| ["partial union pattern is not supported by partial inference" ~]]
7381+ =/ matching=(list ifinite) (skim remaining |=(c=ifinite =(%full (union-pattern pat.a part.c))))
7382+ ?~ matching
7383+ ?: (lien cases |=(c=ifinite =(%full (union-pattern pat.a part.c))))
7384+ [%| ["branch arm is covered by earlier arms" ~[[at.pat.a "covered arm"]]]]
7385+ [%| ["union pattern is not supported by partial inference" ~]]
7386+ ?: &((union-pattern-has-bind pat.a) (lien t.matching |=(c=ifinite !=(origin.c origin.i.matching))))
7387+ [%| ["a union pattern binding several cases is not supported by partial inference" ~]]
7388+ =/ bound=(unit ienv) (union-pattern-bind pat.a base.i.matching env globals.st)
7389+ ?~ bound [%| ["pattern binder shadows a name" ~]]
7390+ =/ body=iresult
7391+ ?~ expected (infer-fragment val.a u.bound st)
7392+ (infer-call-context-arg val.a typ.u.expected u.bound st context.u.expected)
7393+ ?: ?=(%| -.body) body
7394+ ?^ expected
7395+ =/ fit=ifit (itype-fit typ.p.body typ.u.expected sub.state.p.body next.state.p.body)
7396+ ?: ?=(%unknown -.fit) [%| ["union branch result constraint is not supported by partial inference" ~]]
7397+ ?: ?=(%bad -.fit)
7398+ =/ missing=(unit idiag) (missing-union-tag val.a typ.u.expected sub.state.p.body context.u.expected)
7399+ ?^ missing [%| u.missing]
7400+ =/ 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)
7401+ ?^ nested [%| u.nested]
7402+ [%| ["union branch arm does not fit its expected type" ~[[context.u.expected "expected type"] [(span-of val.a) "branch arm"]]]]
7403+ ?: (itype-has-tag (itype-normalize typ.u.expected sub.fit))
7404+ [%| ["union branch result needs context in partial inference" ~]]
7405+ $(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)
7406+ =/ result=itype (itype-normalize typ.p.body sub.state.p.body)
7407+ =/ mismatch=? ?~(answer | !=((itype-normalize u.answer sub.state.p.body) result))
7408+ ?: mismatch [%| ["union branch result matching needs unsupported inference" ~]]
7409+ $(arms t.arms, remaining (skim remaining |=(c=ifinite !=(%full (union-pattern pat.a part.c)))), st state.p.body, answer `result)
7410+::
7411+:: Prove a one-arm record pattern covers a known, non-union subject.
7412+:: Variable or partial matches stay unsupported; binding uses the same
7413+:: scope and original payload types as the existing union matcher.
7414+++ single-structured-pattern
7415+ |= e=expr
7416+ ^- ?
7417+ ?. ?=(%branch -.e) |
7418+ ?~ arms.e |
7419+ ?^ t.arms.e |
7420+ =/ p=pattern pat.i.arms.e
7421+ ?. ?=(%cell -.p) |
7422+ !(levy items.p |=(x=pattern ?=(%bind -.x)))
7423+::
7424+++ infer-single-case-branch
7425+ |= [e=expr env=ienv state=istate expected=(unit [typ=itype context=span])]
7426+ ^- iresult
7427+ ?> (single-structured-pattern e)
7428+ ?> ?=(%branch -.e)
7429+ ?> ?=(^ arms.e)
7430+ =/ a=arm i.arms.e
7431+ =/ subject=iresult (infer-fragment subject.e env state)
7432+ ?: ?=(%| -.subject) subject
7433+ =/ st=istate state.p.subject
7434+ =/ typ=itype (itype-normalize typ.p.subject sub.st)
7435+ ?: ?=(%union -.typ) [%| ["single-case pattern needs unsupported inference" ~]]
7436+ ?. =(%full (union-pattern pat.a typ))
7437+ [%| ["single-case pattern needs unsupported inference" ~]]
7438+ =/ bound=(unit ienv) (union-pattern-bind pat.a typ env globals.st)
7439+ ?~ bound [%| ["pattern binder shadows a name" ~]]
7440+ ?~ expected (infer-fragment val.a u.bound st)
7441+ =/ body=iresult (infer-call-context-arg val.a typ.u.expected u.bound st context.u.expected)
7442+ ?: ?=(%| -.body) body
7443+ =/ fit=ifit (itype-fit typ.p.body typ.u.expected sub.state.p.body next.state.p.body)
7444+ ?: ?=(%unknown -.fit) [%| ["single-case branch result constraint is not supported by partial inference" ~]]
7445+ ?: ?=(%bad -.fit)
7446+ =/ missing=(unit idiag) (missing-union-tag val.a typ.u.expected sub.state.p.body context.u.expected)
7447+ ?^ missing [%| u.missing]
7448+ =/ 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)
7449+ ?^ nested [%| u.nested]
7450+ [%| ["single-case branch arm does not fit its expected type" ~[[context.u.expected "expected type"] [(span-of val.a) "branch arm"]]]]
7451+ ?: (itype-has-tag (itype-normalize typ.u.expected sub.fit))
7452+ [%| ["single-case branch result needs context in partial inference" ~]]
7453+ [%& typ.u.expected state.p.body(sub sub.fit, next next.fit)]
7454+::
7455+:: This view is used only by pattern analysis, never exported or bound as
7456+:: the subject. Only null plus a two-binder/wildcard cell is supported; its
7457+:: tail keeps the original recursive type. Other patterns fail closed.
7458+++ jrec-match-view
7459+ |= [e=expr subject=iresult]
7460+ ^- iresult
7461+ ?: ?=(%| -.subject) subject
7462+ ?. ?=(%branch -.e) subject
7463+ =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7464+ ?. ?=(%jrec -.typ) subject
7465+ ?~ arms.e subject
7466+ ?~ t.arms.e subject
7467+ ?^ t.t.arms.e subject
7468+ =/ x=pattern pat.i.arms.e
7469+ =/ y=pattern pat.i.t.arms.e
7470+ =/ empty=? &(?=(%lit -.x) =(%null form.lit.x))
7471+ =/ full=pattern ?:(empty y x)
7472+ ?. |(empty &(?=(%lit -.y) =(%null form.lit.y))) subject
7473+ ?. ?=(%cell -.full) subject
7474+ ?~ items.full subject
7475+ ?~ t.items.full subject
7476+ ?^ t.t.items.full subject
7477+ ?. |(?=(%bind -.i.items.full) ?=(%any -.i.items.full)) subject
7478+ ?. |(?=(%bind -.i.t.items.full) ?=(%any -.i.t.items.full)) subject
7479+ ?: =(0 jrec-fuel.state.p.subject)
7480+ [%| ["recursive mold unfolding needs unsupported inference" ~]]
7481+ =/ nil=itype [%const [%null %n 0 '~']]
7482+ =/ cell=itype [%cell [%face head.typ [%atom aura.typ]] [%face tail.typ typ]]
7483+ [%& [%union ~[nil cell] ~ ~ ~] state.p.subject(jrec-fuel (dec jrec-fuel.state.p.subject))]
7484+::
7485+++ infer-known-union-branch-subject
7486+ |= [e=expr env=ienv subject=iresult]
7487+ ^- iresult
7488+ =. subject (jrec-match-view e subject)
7489+ =/ whole=(unit iresult) (infer-known-union-whole e env subject)
7490+ ?~ whole (infer-known-union-finite e env subject ~)
7491+ u.whole
7492+::
7493+++ infer-known-union-branch
7494+ |= [e=expr env=ienv state=istate]
7495+ ^- iresult
7496+ ?> ?=(%branch -.e)
7497+ (infer-known-union-branch-subject e env (infer-fragment subject.e env state))
7498+::
7499+++ infer-known-union-context-subject
7500+ |= [e=expr expected=itype env=ienv subject=iresult context=span]
7501+ ^- iresult
7502+ =. subject (jrec-match-view e subject)
7503+ =/ whole=(unit iresult) (infer-known-union-context-whole e expected env subject context)
7504+ ?~ whole (infer-known-union-finite e env subject `[expected context])
7505+ u.whole
7506+::
7507+:: Limit speculative subject inference to wings and shallow calls;
7508+:: grouping is peeled linearly and cannot introduce a nested branch.
7509+++ simple-union-subject-arg
7510+ |= e=expr
7511+ ^- ?
7512+ ?- -.e
7513+ %wing &
7514+ %lit &
7515+ %str !(lien pieces.e |=(p=piece ?=(%expr -.p)))
7516+ * |
7517+ ==
7518+::
7519+++ safe-union-subject
7520+ |= e=expr
7521+ ^- ?
7522+ ?: ?=(%group -.e) $(e inner.e)
7523+ ?: ?=(%wing -.e) &
7524+ ?. ?=(%call -.e) |
7525+ ?. ?=(%wing -.head.e) |
7526+ (levy args.e simple-union-subject-arg)
7527+::
7528+++ duplicate-loobean-arms
7529+ |= e=expr
7530+ ^- ?
7531+ ?. ?=(%branch -.e) |
7532+ ?~ arms.e |
7533+ ?~ t.arms.e |
7534+ ?^ t.t.arms.e |
7535+ =/ x=pattern pat.i.arms.e
7536+ =/ y=pattern pat.i.t.arms.e
7537+ ?. &(?=(%lit -.x) ?=(%lit -.y)) |
7538+ ?. &(=(%loobean form.lit.x) =(%loobean form.lit.y)) |
7539+ =(val.lit.x val.lit.y)
7540+::
7541+++ union-subject-call
7542+ |= e=expr
7543+ ^- ?
7544+ ?: ?=(%group -.e) $(e inner.e)
7545+ ?=(%call -.e)
7546+::
7547+++ known-union-subject
7548+ |= [e=expr env=ienv state=istate]
7549+ ^- (unit iresult)
7550+ ?. (safe-union-subject e) ~
7551+ =/ subject=iresult (infer-fragment e env state)
7552+ ?: ?=(%| -.subject) ?:((union-subject-call e) `subject ~)
7553+ =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7554+ ?. |(?=(%union -.typ) ?=(%jrec -.typ)) ~
7555+ `subject
7556+::
7557+::
7558+:: Infer changes only against a fully known record spine. Retain the
7559+:: target type; unknown spines and repeated edits remain unsupported.
7560+++ change-spine-known
7561+ |= [t=itype sub=isub]
7562+ ^- ?
7563+ =. t (itype-walk t sub)
7564+ ?: ?=(%face -.t) &
7565+ ?. ?=(%cell -.t) |
7566+ =/ first=itype (itype-walk hed.t sub)
7567+ ?. ?=(%face -.first) |
7568+ $(t tal.t)
7569+::
7570+++ infer-change-edits
7571+ |= [edits=(list edit) target=itype env=ienv state=istate seen=(list term)]
7572+ ^- iresult
7573+ ?~ edits [%& target state]
7574+ =/ entry=edit i.edits
7575+ ?: (lien seen |=(name=term =(name name.entry)))
7576+ [%| ["repeated change fields are not supported by partial inference" ~]]
7577+ ?. (change-spine-known target sub.state)
7578+ [%| ["change target needs a known record in partial inference" ~]]
7579+ =/ found=(list itype) (record-fields-named name.entry target sub.state)
7580+ ?~ found
7581+ [%| ["record has no field `{(trip name.entry)}`" ~[[at.entry "unknown field"]]]]
7582+ ?^ t.found [%| ["change field is ambiguous in partial inference" ~]]
7583+ =/ expected=itype i.found
7584+ =/ value=iresult (infer-call-context-arg val.entry expected env state at.entry)
7585+ ?: ?=(%| -.value) value
7586+ =/ fit=ifit (itype-fit typ.p.value expected sub.state.p.value next.state.p.value)
7587+ ?: ?=(%unknown -.fit) [%| ["change field constraint is not supported by partial inference" ~]]
7588+ ?: ?=(%bad -.fit)
7589+ [%| ["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)]]]]
7590+ $(edits t.edits, state state.p.value(sub sub.fit, next next.fit), seen [name.entry seen])
7591+::
7592+:: Backtick constructs the canonical prelude unit, after checking its
7593+:: prepared template has the standard null and [~ u=A] cases.
7594+++ standard-unit-template
7595+ |= [template=ischeme at=path]
7596+ ^- ?
7597+ ?. =(at /lib/jibb/prelude/jibb) |
7598+ ?~ vars.template |
7599+ ?^ t.vars.template |
7600+ =/ v=@ud i.vars.template
7601+ =/ nil=itype [%const [%null %n 0 '~']]
7602+ =/ expected=itype
7603+ [%union ~[nil [%cell nil [%face %u [%var v]]]] `[at %unit] `%unit ~[[%var v]]]
7604+ =(typ.template expected)
7605+::
7606+:: A named missing-case diagnostic needs more than a failed fit: a case
7607+:: with that tag but the wrong payload is not a missing case. Unknown
7608+:: shapes and atom types that accept terms keep the proof conservative.
7609++$ itag-presence ?(%yes %no %maybe)
7610+++ tag-presence-cases
7611+ |= [cases=(list itype) value=@ sub=isub]
7612+ ^- itag-presence
7613+ ?~ cases %no
7614+ =/ first=itag-presence (tag-presence i.cases value sub)
7615+ ?: =(%yes first) %yes
7616+ =/ rest=itag-presence $(cases t.cases)
7617+ ?: =(%yes rest) %yes
7618+ ?: |(=(%maybe first) =(%maybe rest)) %maybe
7619+ %no
7620+::
7621+++ tag-presence
7622+ |= [t=itype value=@ sub=isub]
7623+ ^- itag-presence
7624+ =. t (itype-walk t sub)
7625+ ?- -.t
7626+ %const ?:(=(value val.literal.t) %yes %no)
7627+ %flag ?:(|(=(value 0) =(value 1)) %yes %no)
7628+ %atom ?:(|(=(%tas aura.t) =(%ta aura.t)) %maybe %no)
7629+ %face $(t body.t)
7630+ %cell
7631+ =/ first=itag-presence $(t hed.t)
7632+ ?: =(%yes first) %yes
7633+ =/ rest=itag-presence $(t tal.t)
7634+ ?: =(%yes rest) %yes
7635+ ?: |(=(%maybe first) =(%maybe rest)) %maybe
7636+ %no
7637+ %union (tag-presence-cases cases.t value sub)
7638+ * %maybe
7639+ ==
7640+::
7641+++ missing-union-tag
7642+ |= [e=expr expected=itype sub=isub context=span]
7643+ ^- (unit idiag)
7644+ ?. ?=(%lit -.e) ~
7645+ ?. =(%term form.lit.e) ~
7646+ =. expected (itype-walk expected sub)
7647+ |-
7648+ ?: ?=(%face -.expected) $(expected (itype-walk body.expected sub))
7649+ ?. ?=(%union -.expected) ~
7650+ ?. =(%no (tag-presence-cases cases.expected val.lit.e sub)) ~
7651+ =/ label=tape
7652+ ?~ label.expected "union {(show-itype expected sub)}"
7653+ (show-itype expected sub)
7654+ `["{label} has no case `{(trip txt.lit.e)}`" ~[[context "expected union"] [(span-of e) "tag"]]]
7655+::
7656+:: Locate a missing tag inside a syntactic tuple only by replaying the
7657+:: directional fit in source order. Uncertain or earlier failures stop
7658+:: the walk, preserving the generic diagnostic rather than guessing.
7659+++ nested-missing-tag
7660+ |= [e=expr actual=itype expected=itype sub=isub next=@ud context=span]
7661+ ^- (unit idiag)
7662+ =/ original=[left=itype right=itype] [actual expected]
7663+ ?: |(?=(%var -.left.original) ?=(%avar -.left.original) ?=(%nvar -.left.original) ?=(%var -.right.original) ?=(%avar -.right.original) ?=(%nvar -.right.original)) ~
7664+ =/ fit=ifit (itype-fit actual expected sub next)
7665+ ?. ?=(%bad -.fit) ~
7666+ =. actual (itype-walk actual sub)
7667+ =. expected (itype-walk expected sub)
7668+ ?: &(?=(%face -.actual) ?=(%face -.expected))
7669+ ?. =(name.actual name.expected) ~
7670+ $(actual body.actual, expected body.expected)
7671+ ?: ?=(%face -.actual) $(actual body.actual)
7672+ ?: ?=(%face -.expected) $(expected body.expected)
7673+ =/ direct=(unit idiag) (missing-union-tag e expected sub context)
7674+ ?^ direct direct
7675+ ?. ?=(%tuple -.e) ~
7676+ (nested-missing-items items.e actual expected sub next context)
7677+::
7678+++ nested-missing-items
7679+ |= [items=(list item) actual=itype expected=itype sub=isub next=@ud context=span]
7680+ ^- (unit idiag)
7681+ ?~ items ~
7682+ ?~ t.items (nested-missing-tag val.i.items actual expected sub next context)
7683+ =/ original=[left=itype right=itype] [actual expected]
7684+ ?: |(?=(%var -.left.original) ?=(%avar -.left.original) ?=(%nvar -.left.original) ?=(%var -.right.original) ?=(%avar -.right.original) ?=(%nvar -.right.original)) ~
7685+ =. actual (itype-walk actual sub)
7686+ =. expected (itype-walk expected sub)
7687+ ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
7688+ =/ first=ifit (itype-fit hed.actual hed.expected sub next)
7689+ ?: ?=(%bad -.first)
7690+ (nested-missing-tag val.i.items hed.actual hed.expected sub next context)
7691+ ?. ?=(%ok -.first) ~
7692+ $(items t.items, actual tal.actual, expected tal.expected, sub sub.first, next next.first)
7693+::
7694+:: A term-headed pair is the same noun as a two-item cell. Preserve the
7695+:: whole pair span for the synthetic head and the value's own span for
7696+:: the payload; unresolved term constraints follow ordinary cell inference.
7697+++ pair-as-cell
7698+ |= e=expr
7699+ ^- expr
7700+ ?> ?=(%pair -.e)
7701+ =/ head=expr [%lit at.e [%term %tas tag.e (crip ['%' (trip tag.e)])]]
7702+ [%tuple at.e ~[[at.e ~ head] [(span-of val.e) ~ val.e]]]
7703+::
7704+:: A segment costs one shared step; dynamic segments are not handled yet.
7705+++ qath-static-fuel
7706+ |= [segs=(list qseg) fuel=@ud]
7707+ ^- (unit @ud)
7708+ ?~ segs `fuel
7709+ ?: =(0 fuel) ~
7710+ ?. ?=(%knot -.i.segs) ~
7711+ $(segs t.segs, fuel (dec fuel))
7712+::
7713+++ infer-fragment
7714+ |= [e=expr env=ienv state=istate]
7715+ ^- iresult
7716+ ?- -.e
7717+ %pair $(e (pair-as-cell e))
7718+ %lit
7719+ ?- form.lit.e
7720+ %number ?: =(%ud aura.lit.e)
7721+ [%& [%nvar next.state] state(next +(next.state))]
7722+ [%& [%atom aura.lit.e] state]
7723+ %ship [%& [%atom %p] state]
7724+ %date [%& [%atom %da] state]
7725+ %duration [%& [%atom %dr] state]
7726+ %knot [%& [%atom %ta] state]
7727+ %loobean [%& [%flag ~] state]
7728+ %term [%& [%tag next.state lit.e |] state(next +(next.state), tags [[next.state lit.e] tags.state])]
7729+ %null [%& [%tag next.state lit.e |] state(next +(next.state), tags [[next.state lit.e] tags.state])]
7730+ ==
7731+ %unit
7732+ ?~ prelude.state [%| ["unit construction needs the standard prelude in partial inference" ~]]
7733+ =/ standard=(unit ischeme) (find-jibb-mold %unit u.prelude.state)
7734+ ?~ standard [%| ["unit construction needs the standard prelude in partial inference" ~]]
7735+ ?. (standard-unit-template u.standard at.u.prelude.state)
7736+ [%| ["unit construction needs the standard prelude in partial inference" ~]]
7737+ =/ value=iresult $(e val.e)
7738+ ?: ?=(%| -.value) value
7739+ =/ result=(unit itype) (template-apply u.standard ~[typ.p.value])
7740+ ?~ result [%| ["unit construction is not supported by partial inference" ~]]
7741+ [%& u.result state.p.value]
7742+ %list
7743+ ?~ prelude.state [%| ["list literal needs the standard prelude in partial inference" ~]]
7744+ ?. =(at.u.prelude.state /lib/jibb/prelude/jibb)
7745+ [%| ["list literal needs the standard prelude in partial inference" ~]]
7746+ =/ standard=(unit ischeme) (find-jibb-mold %list u.prelude.state)
7747+ ?~ standard [%| ["list literal needs the standard prelude in partial inference" ~]]
7748+ ?. =(u.standard [[%collection %list ~[[%var 0]]] ~[0]])
7749+ [%| ["list literal needs the standard prelude in partial inference" ~]]
7750+ =/ element=itype [%var next.state]
7751+ =/ result=iresult (infer-open-list-items items.e element env state(next +(next.state)) at.e)
7752+ ?: ?=(%| -.result) result
7753+ [%& [%collection %list ~[element]] state.p.result]
7754+ %str (infer-string-pieces pieces.e env state)
7755+ %qath
7756+ ?~ prelude.state [%| ["application path needs the standard prelude in partial inference" ~]]
7757+ ?. =(at.u.prelude.state /lib/jibb/prelude/jibb)
7758+ [%| ["application path needs the standard prelude in partial inference" ~]]
7759+ =/ standard=(unit ischeme) (find-jibb-mold %qath u.prelude.state)
7760+ ?~ standard [%| ["application path needs the standard prelude in partial inference" ~]]
7761+ ?. ?=(~ vars.u.standard) [%| ["application path mold needs unsupported inference" ~]]
7762+ =/ typ=itype typ.u.standard
7763+ ?. ?=(%jrec -.typ) [%| ["application path mold needs unsupported inference" ~]]
7764+ ?. &(=(at.typ /lib/jibb/internal/jibb) =(%qath name.typ) =(%i head.typ) =(%ta aura.typ) =(%t tail.typ))
7765+ [%| ["application path mold needs unsupported inference" ~]]
7766+ ?: =(0 jrec-fuel.state) [%| ["recursive mold unfolding needs unsupported inference" ~]]
7767+ =/ remain=(unit @ud) (qath-static-fuel segs.e (dec jrec-fuel.state))
7768+ ?~ remain [%| ["application path segments need unsupported inference" ~]]
7769+ [%& typ state(jrec-fuel u.remain)]
7770+ %wing
7771+ ?~ names.e [%| ["empty wing" ~]]
7772+ ?^ t.names.e
7773+ ?^ t.t.names.e (infer-field-wing names.e env state)
7774+ =/ iface=(unit ifile) (find-jibb-interface i.t.names.e jimports.state)
7775+ ?~ iface (infer-field-wing names.e env state)
7776+ =/ member=(unit ischeme) (ienv-lookup i.names.e values.u.iface)
7777+ ?~ member [%| ["module member is not available to partial inference" ~]]
7778+ =. typ.u.member (itype-in-import typ.u.member u.iface i.t.names.e prelude.state)
7779+ =/ instance=[typ=itype state=istate] (instantiate-scheme u.member state)
7780+ [%& typ.instance state.instance]
7781+ =/ scheme=(unit ischeme) (ienv-lookup i.names.e env)
7782+ ?~ scheme
7783+ ?~ prelude.state [%| ["name is not available to partial inference" ~]]
7784+ =/ prelude-entry=(unit ischeme) (ienv-lookup i.names.e values.u.prelude.state)
7785+ ?~ prelude-entry [%| ["name is not available to partial inference" ~]]
7786+ =/ inst=[typ=itype state=istate] (instantiate-scheme u.prelude-entry state)
7787+ [%& typ.inst state.inst]
7788+ =/ instance=[typ=itype state=istate] (instantiate-scheme u.scheme state)
7789+ [%& typ.instance state.instance]
7790+ %group $(e inner.e)
7791+ %change
7792+ ?~ edits.e [%| ["a change takes at least one field" ~[[at.e "empty change"]]]]
7793+ =/ target=iresult $(e [%wing at.e target.e])
7794+ ?: ?=(%| -.target) target
7795+ (infer-change-edits edits.e typ.p.target env state.p.target ~)
7796+ %ctor [%& [%tag next.state tag.e &] state(next +(next.state), tags [[next.state tag.e] tags.state])]
7797+ %trace
7798+ =/ traced=iresult $(e val.e)
7799+ ?: ?=(%| -.traced) traced
7800+ $(e then.e, state state.p.traced)
7801+ %tuple (infer-simple-items items.e env state)
7802+ %body
7803+ ?~ defs.e $(e final.e)
7804+ =/ local-names=(list term) (global-value-names defs.e)
7805+ ?. (local-names-valid defs.e env state)
7806+ [%| ["local definitions shadow a name" ~]]
7807+ =/ local-molds=imolds (collect-simple-molds defs.e)
7808+ ?. (local-mold-names-valid local-molds state)
7809+ [%| ["local molds shadow a name" ~]]
7810+ =/ local-state=istate
7811+ state(globals (weld local-names globals.state), molds (weld local-molds molds.state))
7812+ =/ mold-hole=(unit span) (simple-local-mold-hole defs.e)
7813+ ?^ mold-hole
7814+ [%| ["type hole needs a determined type" ~[[u.mold-hole "unresolved type hole"]]]]
7815+ ?. (local-molds-supported local-molds local-state)
7816+ [%| ["local molds need unsupported inference" ~]]
7817+ =/ values=(list def) (local-value-defs defs.e)
7818+ =/ locals=ilocal-result (infer-local-defs values env local-state)
7819+ ?: ?=(%| -.locals) locals
7820+ =/ result=iresult $(e final.e, env env.p.locals, state state.p.locals)
57917821 ?: ?=(%| -.result) result
57927822 [%& typ.p.result state.p.result(globals globals.state, molds molds.state)]
57937823 %branch
57947824 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
5795− ?~ t.arms.e (infer-cell-branch e env state)
5796− ?^ t.t.arms.e [%| ["branch is not supported by partial inference" ~]]
7825+ ?~ t.arms.e
7826+ ?: (single-structured-pattern e) (infer-single-case-branch e env state ~)
7827+ (infer-cell-branch e env state ~)
7828+ ?^ t.t.arms.e (infer-known-union-branch e env state)
7829+ =/ known=(unit iresult) (known-union-subject subject.e env state)
7830+ ?: &(?=(^ known) ?=(%| -.u.known) !(duplicate-loobean-arms e)) u.known
7831+ ?: &(?=(^ known) ?=(%& -.u.known) ?=(~ (unit-union-payload (itype-normalize typ.p.u.known sub.state.p.u.known))))
7832+ (infer-known-union-branch-subject e env u.known)
57977833 =/ x=arm i.arms.e
57987834 =/ y=arm i.t.arms.e
5799− ?. ?=(%lit -.pat.x) [%| ["branch pattern is not supported by partial inference" ~]]
5800− ?. ?=(%lit -.pat.y) [%| ["branch pattern is not supported by partial inference" ~]]
7835+ ?: |((unit-empty-pattern pat.x) (unit-empty-pattern pat.y))
7836+ (infer-unit-branch e env state ~)
7837+ ?. ?=(%lit -.pat.x) (infer-known-union-branch e env state)
7838+ ?. ?=(%lit -.pat.y) (infer-known-union-branch e env state)
58017839 ?. &(=(%loobean form.lit.pat.x) =(%loobean form.lit.pat.y))
5802− [%| ["branch pattern is not supported by partial inference" ~]]
7840+ (infer-known-union-branch e env state)
7841+ ?: &(?=(^ known) ?=(%& -.u.known)) (infer-known-union-branch-subject e env u.known)
58037842 ?: =(val.lit.pat.x val.lit.pat.y)
58047843 [%| ["branch does not cover both loobeans" ~]]
58057844 =/ subject=iresult $(e subject.e)
58067845 ?: ?=(%| -.subject) subject
7846+ =/ subject-type=itype (itype-normalize typ.p.subject sub.state.p.subject)
7847+ ?: ?=(%union -.subject-type)
7848+ [%| ["union-pattern branch subject is not supported by partial inference" ~]]
58077849 =/ su=(unit isub) (itype-unify typ.p.subject [%flag ~] sub.state.p.subject)
58087850 ?~ su [%| ["loobean branch subject does not unify with ?" ~]]
58097851 =/ left=iresult $(e val.x, state state.p.subject(sub u.su))
@@ -5816,6 +7858,8 @@
58167858 [%| ["branch widening is not supported by partial inference" ~]]
58177859 =/ joined=(unit isub) (itype-unify typ.p.left typ.p.right sub.state.p.right)
58187860 ?~ joined
7861+ ?: |((itype-has-recursive ltype) (itype-has-recursive rtype))
7862+ [%| ["recursive branch matching is not supported by partial inference" ~]]
58197863 ?: |((itype-has-tag ltype) (itype-has-tag rtype) (itype-has-union ltype) (itype-has-union rtype))
58207864 [%| ["branch tag or union context is not supported by partial inference" ~]]
58217865 =/ common=(unit itype) (itype-concrete-join typ.p.left typ.p.right sub.state.p.right)
@@ -5828,53 +7872,391 @@
58287872 [%& typ.p.left state.p.right(sub u.joined)]
58297873 %cast
58307874 =/ target=(unit [typ=itype state=istate]) (infer-simple-shape shape.e state)
5831− ?~ target [%| ["cast mold is not supported by partial inference" ~]]
5832− =/ value=iresult $(e val.e, state state.u.target)
7875+ ?~ target
7876+ =/ diag=(unit idiag) (nested-import-invalid shape.e state)
7877+ ?^ diag [%| u.diag]
7878+ [%| ["cast mold is not supported by partial inference" ~]]
7879+ =/ value=iresult
7880+ (infer-call-context-arg val.e typ.u.target env state.u.target at.shape.e)
58337881 ?: ?=(%| -.value) value
7882+ =/ shape=(unit [source=iwfields target=iwfields])
7883+ (width-shape typ.p.value typ.u.target sub.state.p.value)
7884+ ?^ shape [%| ["record width constraint needs unsupported inference" ~]]
58347885 =/ fit=ifit (itype-fit typ.p.value typ.u.target sub.state.p.value next.state.p.value)
58357886 ?: ?=(%unknown -.fit) [%| ["cast constraint is not supported by partial inference" ~]]
58367887 ?: ?=(%bad -.fit)
7888+ =/ missing=(unit idiag) (missing-union-tag val.e typ.u.target sub.state.p.value at.shape.e)
7889+ ?^ missing [%| u.missing]
7890+ =/ 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)
7891+ ?^ nested [%| u.nested]
58377892 [%| ["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)]]]]
58387893 =/ merged=itype (itype-merge-faces typ.p.value typ.u.target sub.fit)
58397894 [%& merged state.p.value(sub sub.fit, next next.fit)]
58407895 %crash [%& [%var next.state] state(next +(next.state))]
58417896 %gate
58427897 =/ sam=isample-result (infer-sample sample.e env state)
5843− ?: ?=(%| -.sam) [%| [p.sam ~]]
7898+ ?: ?=(%| -.sam)
7899+ =/ diag=(unit idiag) (sample-import-invalid sample.e env state)
7900+ ?: &(=(p.sam "sample mold is not supported by partial inference") ?=(^ diag)) [%| u.diag]
7901+ [%| [p.sam ~]]
58447902 =/ body=iresult $(e body.e, env env.p.sam, state state.p.sam)
58457903 ?: ?=(%| -.body) body
58467904 [%& [%fn typ.p.sam typ.p.body] state.p.body]
58477905 %gate-wide
58487906 =/ sam=isample-result (infer-sample sample.e env state)
5849− ?: ?=(%| -.sam) [%| [p.sam ~]]
7907+ ?: ?=(%| -.sam)
7908+ =/ diag=(unit idiag) (sample-import-invalid sample.e env state)
7909+ ?: &(=(p.sam "sample mold is not supported by partial inference") ?=(^ diag)) [%| u.diag]
7910+ [%| [p.sam ~]]
58507911 =/ body=iresult $(e body.e, env env.p.sam, state state.p.sam)
58517912 ?: ?=(%| -.body) body
58527913 [%& [%fn typ.p.sam typ.p.body] state.p.body]
58537914 %call
58547915 ?~ args.e [%| ["call has no argument" ~]]
5855− ?^ t.args.e [%| ["multiple arguments are not supported by partial inference" ~]]
5856− =/ head=iresult $(e head.e)
5857− ?: ?=(%| -.head) head
5858− =/ arg=iresult $(e i.args.e, state state.p.head)
5859− ?: ?=(%| -.arg) arg
5860− =/ st=istate state.p.arg
5861− =/ ht=itype (itype-walk typ.p.head sub.st)
5862− ?: ?=(%fn -.ht)
5863− =/ fit=ifit (itype-fit typ.p.arg sample.ht sub.st next.st)
5864− ?: ?=(%unknown -.fit) [%| ["call constraint is not supported by partial inference" ~]]
5865− ?: ?=(%bad -.fit)
5866− [%| ["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)]]]]
5867− ?: &((itype-has-face typ.p.arg sub.fit) (itype-face-asym typ.p.arg sample.ht sub.fit) (itype-output-may-be-cell product.ht sub.fit))
5868− [%| ["call result face propagation is not supported by partial inference" ~]]
5869− [%& product.ht st(sub sub.fit, next next.fit)]
5870− =/ result=itype [%var next.st]
5871− =/ uni=(unit isub) (itype-unify ht [%fn typ.p.arg result] sub.st)
5872− ?~ uni
5873− [%| ["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)]]]]
5874− [%& result st(next +(next.st), sub u.uni)]
7916+ ?: (explicit-proj-call e env state)
7917+ [%| ["proj needs an expected record type" ~]]
7918+ (infer-call-with-head e env state (infer-fragment head.e env state))
58757919 * [%| ["expression is not supported by partial inference" ~]]
58767920 ==
58777921::
7922+:: Locate a definite failing argument after the complete sample fit has
7923+:: failed. If an intermediate fit is uncertain, retain the whole argument
7924+:: span rather than assigning blame to a particular argument.
7925+::
7926+:: Check a call using the head already inferred in this state. Keeping
7927+:: this shared avoids evaluating or instantiating a contextual head twice.
7928+++ width-has-projections
7929+ |= ps=(list iwprojection)
7930+ ^- ?
7931+ ?~ ps |
7932+ &
7933+::
7934++$ iwidth-elaboration [original=expr typ=itype sub=isub projections=(list iwprojection)]
7935+++ infer-width-elaboration
7936+ |= [e=expr env=ienv state=istate]
7937+ ^- (each iwidth-elaboration idiag)
7938+ =/ out=iresult (infer-fragment e env state)
7939+ ?: ?=(%| -.out) [%| p.out]
7940+ [%& [e typ.p.out sub.state.p.out (flop projections.state.p.out)]]
7941+::
7942+++ infer-call-with-head
7943+ |= [e=expr env=ienv state=istate head=iresult]
7944+ ^- iresult
7945+ ?> ?=(%call -.e)
7946+ ?~ args.e [%| ["call has no argument" ~]]
7947+ ?: ?=(%| -.head) head
7948+ =/ head-type=itype (itype-walk typ.p.head sub.state.p.head)
7949+ =/ arg=iresult
7950+ ?^ t.args.e
7951+ ?: ?=(%fn -.head-type)
7952+ (infer-call-context-args args.e sample.head-type env state.p.head (span-of head.e))
7953+ (infer-simple-items (turn args.e |=(a=expr [(span-of a) ~ a])) env state.p.head)
7954+ ?: ?=(%fn -.head-type)
7955+ (infer-call-context-arg i.args.e sample.head-type env state.p.head (span-of head.e))
7956+ (infer-fragment i.args.e env state.p.head)
7957+ ?: ?=(%| -.arg) arg
7958+ =/ st=istate state.p.arg
7959+ =/ ht=itype (itype-walk typ.p.head sub.st)
7960+ ?: ?=(%fn -.ht)
7961+ =/ shape=(unit [source=iwfields target=iwfields])
7962+ ?^ t.args.e ~
7963+ (width-shape typ.p.arg sample.ht sub.st)
7964+ ?^ shape [%| ["record width constraint needs unsupported inference" ~]]
7965+ =/ fit=ifit
7966+ ?^ t.args.e (itype-fit-inner typ.p.arg sample.ht sub.st next.st & |)
7967+ (itype-fit typ.p.arg sample.ht sub.st next.st)
7968+ ?: ?=(%unknown -.fit) [%| ["call constraint is not supported by partial inference" ~]]
7969+ ?: ?=(%bad -.fit)
7970+ ?~ t.args.e
7971+ =/ missing=(unit idiag) (missing-union-tag i.args.e sample.ht sub.st (span-of head.e))
7972+ ?^ missing [%| u.missing]
7973+ =/ nested=(unit idiag) (nested-missing-tag i.args.e typ.p.arg sample.ht sub.st next.st (span-of head.e))
7974+ ?^ nested [%| u.nested]
7975+ [%| ["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)]]]]
7976+ =/ bad=(unit [at=span typ=itype])
7977+ (call-error-site args.e typ.p.arg sample.ht sub.st next.st)
7978+ =/ whole-args=span
7979+ [beg:(span-of i.args.e) end:(span-of (rear args.e))]
7980+ =/ arg-at=span ?~(bad whole-args at.u.bad)
7981+ =/ arg-type=itype ?~(bad typ.p.arg typ.u.bad)
7982+ [%| ["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)]]]]
7983+ ?: &((itype-has-face typ.p.arg sub.fit) (itype-face-asym typ.p.arg sample.ht sub.fit) (itype-output-may-be-cell product.ht sub.fit))
7984+ [%| ["call result face propagation is not supported by partial inference" ~]]
7985+ [%& product.ht st(sub sub.fit, next next.fit)]
7986+ =/ result=itype [%var next.st]
7987+ =/ uni=(unit isub) (itype-unify ht [%fn typ.p.arg result] sub.st)
7988+ ?~ uni
7989+ [%| ["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)]]]]
7990+ [%& result st(next +(next.st), sub u.uni)]
7991+::
7992+++ call-error-site
7993+ |= [args=(list expr) actual=itype expected=itype sub=isub next=@ud]
7994+ ^- (unit [at=span typ=itype])
7995+ ?~ args ~
7996+ =/ original=[left=itype right=itype] [actual expected]
7997+ ?: |(?=(%var -.left.original) ?=(%avar -.left.original) ?=(%nvar -.left.original) ?=(%var -.right.original) ?=(%avar -.right.original) ?=(%nvar -.right.original)) ~
7998+ =. actual (itype-walk actual sub)
7999+ =. expected (itype-walk expected sub)
8000+ ?: &(?=(%face -.expected) !?=(%face -.actual))
8001+ $(expected body.expected)
8002+ ?~ t.args
8003+ =/ fit=ifit (itype-fit actual expected sub next)
8004+ ?. ?=(%bad -.fit) ~
8005+ `[(span-of i.args) (itype-normalize actual sub)]
8006+ ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
8007+ =/ first=ifit (itype-fit hed.actual hed.expected sub next)
8008+ ?: ?=(%bad -.first) `[(span-of i.args) (itype-normalize hed.actual sub)]
8009+ ?: ?=(%unknown -.first) ~
8010+ $(args t.args, actual tal.actual, expected tal.expected, sub sub.first, next next.first)
8011+::
8012+:: Context can help a call argument or cast value while the final fit
8013+:: checks the complete right-nested type, including any written faces.
8014+::
8015+:: Context can resolve the payload of a canonical prelude unit, but an
8016+:: unrelated union with a similar noun shape is not the same mold.
8017+++ infer-unit-context
8018+ |= [e=expr expected=itype env=ienv state=istate context=span]
8019+ ^- iresult
8020+ ?> ?=(%unit -.e)
8021+ ?> ?=(%union -.expected)
8022+ ?~ prelude.state (infer-fragment e env state)
8023+ =/ standard=(unit ischeme) (find-jibb-mold %unit u.prelude.state)
8024+ ?~ standard (infer-fragment e env state)
8025+ ?. (standard-unit-template u.standard at.u.prelude.state) (infer-fragment e env state)
8026+ ?. =(origin.expected `[at.u.prelude.state %unit]) (infer-fragment e env state)
8027+ ?~ args.expected (infer-fragment e env state)
8028+ ?^ t.args.expected (infer-fragment e env state)
8029+ =/ payload=itype i.args.expected
8030+ =/ canonical=(unit itype) (template-apply u.standard ~[payload])
8031+ ?~ canonical (infer-fragment e env state)
8032+ ?> ?=(%union -.u.canonical)
8033+ ?. =((itype-normalize expected(label ~) sub.state) (itype-normalize u.canonical(label ~) sub.state))
8034+ (infer-fragment e env state)
8035+ =/ value=iresult (infer-call-context-arg val.e payload env state context)
8036+ ?: ?=(%| -.value) value
8037+ =/ fit=ifit (itype-fit typ.p.value payload sub.state.p.value next.state.p.value)
8038+ ?: ?=(%unknown -.fit) [%| ["unit payload constraint is not supported by partial inference" ~]]
8039+ ?: ?=(%bad -.fit)
8040+ =/ missing=(unit idiag) (missing-union-tag val.e payload sub.state.p.value context)
8041+ ?^ missing [%| u.missing]
8042+ =/ nested=(unit idiag) (nested-missing-tag val.e typ.p.value payload sub.state.p.value next.state.p.value context)
8043+ ?^ nested [%| u.nested]
8044+ [%| ["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)]]]]
8045+ [%& expected state.p.value(sub sub.fit, next next.fit)]
8046+::
8047+:: A known gate whose result is still an inference variable can receive
8048+:: an enclosing target before its argument is inferred. Other products
8049+:: and unresolved calls use the existing directional path unchanged.
8050+++ infer-contextual-call
8051+ |= [e=expr expected=itype env=ienv state=istate]
8052+ ^- iresult
8053+ ?> ?=(%call -.e)
8054+ ?~ args.e [%| ["call has no argument" ~]]
8055+ =/ head=iresult (infer-fragment head.e env state)
8056+ ?: ?=(%| -.head) head
8057+ =/ ht=itype (itype-walk typ.p.head sub.state.p.head)
8058+ ?. ?=(%fn -.ht) (infer-call-with-head e env state head)
8059+ =/ result=itype (itype-walk product.ht sub.state.p.head)
8060+ ?. ?=(%var -.result) (infer-call-with-head e env state head)
8061+ ?: |(?=(%var -.expected) ?=(%avar -.expected) ?=(%nvar -.expected) (itype-has-tag (itype-normalize expected sub.state.p.head)))
8062+ (infer-call-with-head e env state head)
8063+ =/ sub=(unit isub) (itype-unify result expected sub.state.p.head)
8064+ ?~ sub (infer-call-with-head e env state head)
8065+ (infer-call-with-head e env state [%& typ.p.head state.p.head(sub u.sub)])
8066+::
8067+:: An eligible fully faced literal receives context by name, in source order.
8068+++ width-literal-fields
8069+ |= [items=(list item) axis=@ud fuel=@ud]
8070+ ^- (unit iwfields)
8071+ =/ order=(list iwfield) ~
8072+ =/ index=(map term iwfield) *(map term iwfield)
8073+ |-
8074+ ?~ items ~
8075+ ?: =(0 fuel) ~
8076+ ?~ face.i.items ~
8077+ =/ at-axis=@ud ?~(t.items axis (mul 2 axis))
8078+ =/ entry=iwfield [u.face.i.items at-axis [%noun ~]]
8079+ ?: ?=(^ (~(get by index) name.entry)) ~
8080+ =. index (~(put by index) name.entry entry)
8081+ =. order [entry order]
8082+ ?~ t.items `[(flop order) index]
8083+ $(items t.items, axis +((mul 2 axis)), fuel (dec fuel))
8084+++ width-infer-items
8085+ |= [items=(list item) expected=(map term iwfield) env=ienv state=istate context=span]
8086+ ^- iresult
8087+ ?~ items [%| ["empty record is not supported" ~]]
8088+ ?~ face.i.items [%| ["record face needs unsupported inference" ~]]
8089+ =/ field=(unit iwfield) (~(get by expected) u.face.i.items)
8090+ =/ head=iresult
8091+ ?~ field (infer-fragment val.i.items env state)
8092+ (infer-call-context-arg val.i.items typ.u.field env state context)
8093+ ?: ?=(%| -.head) head
8094+ =/ typ=itype [%face u.face.i.items typ.p.head]
8095+ ?~ t.items [%& typ state.p.head]
8096+ =/ tail=iresult $(items t.items, state state.p.head)
8097+ ?: ?=(%| -.tail) tail
8098+ [%& [%cell typ typ.p.tail] state.p.tail]
8099+++ width-infer-literal
8100+ |= [e=expr expected=itype env=ienv state=istate context=span]
8101+ ^- (unit iresult)
8102+ ?. ?=(%tuple -.e) ~
8103+ ?. |(?=(%cell -.expected) ?=(%face -.expected)) ~
8104+ =/ source=(unit iwfields) (width-literal-fields items.e 1 4.096)
8105+ =/ target=(unit iwfields) (width-scan expected sub.state 1 4.096)
8106+ ?~ source ~
8107+ ?~ target ~
8108+ ?: (lth (lent order.u.source) (lent order.u.target)) ~
8109+ ?. (width-in-order order.u.source order.u.target)
8110+ `(infer-simple-items items.e env state)
8111+ `(width-infer-items items.e index.u.target env state context)
8112+::
8113+:: Recognize only the reserved unqualified, one-argument operation.
8114+++ explicit-proj-call
8115+ |= [e=expr env=ienv state=istate]
8116+ ^- ?
8117+ ?. ?=(%call -.e) |
8118+ ?. ?=([* ~] args.e) |
8119+ ?. ?=(%wing -.head.e) |
8120+ ?. =(names.head.e ~[%proj]) |
8121+ ?: ?=(^ (ienv-lookup %proj env)) |
8122+ ?: (lien globals.state |=(n=term =(n %proj))) |
8123+ ?~ prelude.state &
8124+ ?:(?=(^ (ienv-lookup %proj values.u.prelude.state)) | &)
8125+++ infer-proj-source
8126+ |= [e=expr expected=itype env=ienv state=istate context=span]
8127+ ^- iresult
8128+ ?: ?=(%group -.e) $(e inner.e)
8129+ =/ literal=(unit iresult) (width-infer-literal e expected env state context)
8130+ ?^ literal u.literal
8131+ (infer-fragment e env state)
8132+++ infer-proj-context
8133+ |= [e=expr expected=itype env=ienv state=istate context=span]
8134+ ^- iresult
8135+ ?> ?=(%call -.e)
8136+ ?~ args.e [%| ["proj needs one record" ~]]
8137+ ?. |(?=(%cell -.expected) ?=(%face -.expected)) [%| ["proj needs an expected record type" ~]]
8138+ =/ value=iresult (infer-proj-source i.args.e expected env state context)
8139+ ?: ?=(%| -.value) value
8140+ =/ shape=(unit [source=iwfields target=iwfields])
8141+ (width-proj-shape typ.p.value expected sub.state.p.value)
8142+ ?~ shape [%| ["proj needs a known record containing its expected fields" ~]]
8143+ =/ project=(unit iwidth-result) (width-project u.shape sub.state.p.value next.state.p.value)
8144+ ?~ project [%| ["proj constraint needs unsupported inference" ~]]
8145+ =/ st=istate state.p.value(sub sub.u.project, next next.u.project)
8146+ [%& expected st(projections [[at.e e typ.p.value expected steps.u.project] projections.st])]
8147+::
8148+++ infer-call-context-arg
8149+ |= [e=expr expected=itype env=ienv state=istate context=span]
8150+ ^- iresult
8151+ ?: ?=(%pair -.e) $(e (pair-as-cell e))
8152+ ?: ?=(%group -.e) $(e inner.e)
8153+ ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
8154+ ?: ?=(%trace -.e)
8155+ =/ traced=iresult (infer-fragment val.e env state)
8156+ ?: ?=(%| -.traced) traced
8157+ $(e then.e, state state.p.traced)
8158+ =/ target=itype (itype-walk expected sub.state)
8159+ |-
8160+ ?: ?=(%face -.target) $(target (itype-walk body.target sub.state))
8161+ ?: (explicit-proj-call e env state)
8162+ (infer-proj-context e expected env state context)
8163+ :: Only the source-proven one-layer cell is exposed. Each recursive
8164+ :: descent consumes one written tuple; named values use ordinary fit.
8165+ ?: &(?=(%jrec -.target) ?=(%lit -.e) =(%null form.lit.e))
8166+ ?: =(0 jrec-fuel.state) [%| ["recursive mold unfolding needs unsupported inference" ~]]
8167+ [%& target state(jrec-fuel (dec jrec-fuel.state))]
8168+ ?: &(?=(%jrec -.target) ?=(%tuple -.e))
8169+ ?: =(0 jrec-fuel.state) [%| ["recursive mold unfolding needs unsupported inference" ~]]
8170+ =. state state(jrec-fuel (dec jrec-fuel.state))
8171+ =/ shape=itype
8172+ [%cell [%face head.target [%atom aura.target]] [%face tail.target target]]
8173+ =/ value=iresult (infer-call-context-items items.e shape env state context)
8174+ ?: ?=(%| -.value) value
8175+ =/ fit=ifit (itype-fit typ.p.value shape sub.state.p.value next.state.p.value)
8176+ ?: ?=(%unknown -.fit) [%| ["recursive mold cell constraint needs unsupported inference" ~]]
8177+ ?: ?=(%bad -.fit) [%| ["recursive mold cell does not fit its source shape" ~]]
8178+ [%& target state.p.value(sub sub.fit, next next.fit)]
8179+ ?: ?=(%call -.e) (infer-contextual-call e target env state)
8180+ ?: (single-structured-pattern e)
8181+ (infer-single-case-branch e env state `[target context])
8182+ ?: (cell-binder-pattern e)
8183+ (infer-cell-branch e env state `[target context])
8184+ :: In a loobean-singleton context retain the written loobean noun;
8185+ :: the usual final fit decides whether that value is permitted.
8186+ =/ singleton=(unit itype)
8187+ ?. ?=(%lit -.e) ~
8188+ ?. =(%loobean form.lit.e) ~
8189+ ?. ?=(%const -.target) ~
8190+ ?. =(%loobean form.literal.target) ~
8191+ `[%const lit.e]
8192+ ?^ singleton [%& u.singleton state]
8193+ =/ known=(unit iresult)
8194+ ?: ?=(%branch -.e) (known-union-subject subject.e env state)
8195+ ~
8196+ ?: &(?=(^ known) ?=(%| -.u.known) !(duplicate-loobean-arms e)) u.known
8197+ ?: &(?=(^ known) ?=(%& -.u.known) ?=(~ (unit-union-payload (itype-normalize typ.p.u.known sub.state.p.u.known))))
8198+ (infer-known-union-context-subject e target env u.known context)
8199+ ?: &(?=(%union -.target) ?=(%unit -.e))
8200+ (infer-unit-context e target env state context)
8201+ ?: &(?=(%flag -.target) (context-union-branch e))
8202+ (infer-union-context e target env state context)
8203+ ?: &(?=(%union -.target) (context-union-branch e))
8204+ (infer-union-context e target env state context)
8205+ ?: &(?=(%collection -.target) =(%list name.target) (context-union-branch e))
8206+ (infer-union-context e target env state context)
8207+ ?: &(?=(%collection -.target) =(%list name.target) (context-list-expression e))
8208+ (infer-list-context e target env state context)
8209+ ?: &(?=(%cell -.target) ?=(%tuple -.e))
8210+ (infer-call-context-items items.e target env state context)
8211+ (infer-fragment e env state)
8212+::
8213+:: Preserve each written face; the final complete sample fit checks faces.
8214+:: A tuple or positional field face belongs to the enclosing sample,
8215+:: not to the expression at that position. A second face, if present,
8216+:: is part of the value's own expected type.
8217+++ projection-field-target
8218+ |= expected=itype
8219+ ^- itype
8220+ ?:(?=(%face -.expected) body.expected expected)
8221+::
8222+++ infer-call-context-items
8223+ |= [items=(list item) expected=itype env=ienv state=istate context=span]
8224+ ^- iresult
8225+ ?~ items [%| ["empty cell is not supported by partial inference" ~]]
8226+ ?~ t.items
8227+ =/ last=iresult (infer-call-context-arg val.i.items (projection-field-target expected) env state context)
8228+ ?: ?=(%| -.last) last
8229+ =/ typ=itype typ.p.last
8230+ =. typ ?~(face.i.items typ [%face u.face.i.items typ])
8231+ [%& typ state.p.last]
8232+ =/ target=itype (itype-walk expected sub.state)
8233+ |-
8234+ ?: ?=(%face -.target) $(target (itype-walk body.target sub.state))
8235+ ?. ?=(%cell -.target) (infer-simple-items items env state)
8236+ =/ head=iresult (infer-call-context-arg val.i.items (projection-field-target hed.target) env state context)
8237+ ?: ?=(%| -.head) head
8238+ =/ typ=itype typ.p.head
8239+ =. typ ?~(face.i.items typ [%face u.face.i.items typ])
8240+ =/ tail=iresult (infer-call-context-items t.items tal.target env state.p.head context)
8241+ ?: ?=(%| -.tail) tail
8242+ [%& [%cell typ typ.p.tail] state.p.tail]
8243+::
8244+++ infer-call-context-args
8245+ |= [args=(list expr) expected=itype env=ienv state=istate context=span]
8246+ ^- iresult
8247+ ?~ args [%| ["call has no argument" ~]]
8248+ ?~ t.args (infer-call-context-arg i.args (projection-field-target expected) env state context)
8249+ =/ target=itype (itype-walk expected sub.state)
8250+ |-
8251+ ?: ?=(%face -.target) $(target (itype-walk body.target sub.state))
8252+ ?. ?=(%cell -.target)
8253+ (infer-simple-items (turn args |=(a=expr [(span-of a) ~ a])) env state)
8254+ =/ head=iresult (infer-call-context-arg i.args (projection-field-target hed.target) env state context)
8255+ ?: ?=(%| -.head) head
8256+ =/ tail=iresult (infer-call-context-args t.args tal.target env state.p.head context)
8257+ ?: ?=(%| -.tail) tail
8258+ [%& [%cell typ.p.head typ.p.tail] state.p.tail]
8259+::
58788260:: Tuple and record expressions preserve their explicitly written faces.
58798261::
58808262++ infer-simple-items
@@ -5890,11 +8272,55 @@
58908272 ?: ?=(%| -.tail) tail
58918273 [%& [%cell ht typ.p.tail] state.p.tail]
58928274::
5893−:: A single two-binder cell pattern covers every value of a cell type.
5894−:: No other pattern matrix is implemented here.
8275+:: A single all-binder cell pattern covers a known cell spine; the final
8276+:: binder captures the remaining noun. Other pattern matrices stay partial.
8277+::
8278+:: Validate binders before reading the subject, preserving shadow-error
8279+:: precedence. The last binder receives the entire remaining tail.
8280+++ cell-pattern-names
8281+ |= [pats=(list pattern) env=ienv globals=(list term) seen=(list term)]
8282+ ^- (each (list term) @t)
8283+ ?~ pats [%& ~]
8284+ ?. ?=(%bind -.i.pats) [%| 'branch pattern is not supported by partial inference']
8285+ =/ name=term name.i.pats
8286+ ?: |(=(name %proj) ?=(^ (ienv-lookup name env)) (lien globals |=(n=term =(n name))) (lien seen |=(n=term =(n name))))
8287+ [%| 'pattern shadows a name']
8288+ =/ rest=(each (list term) @t) $(pats t.pats, seen [name seen])
8289+ ?: ?=(%| -.rest) rest
8290+ [%& [name p.rest]]
8291+::
8292+++ cell-pattern-types
8293+ |= [names=(list term) env=ienv next=@ud]
8294+ ^- [typ=itype env=ienv next=@ud]
8295+ ?~ names !!
8296+ =/ head=itype [%var next]
8297+ =/ scope=ienv [[i.names [head ~]] env]
8298+ ?~ t.names [head scope +(next)]
8299+ =/ tail=[typ=itype env=ienv next=@ud] $(names t.names, env scope, next +(next))
8300+ [[%cell head typ.tail] env.tail next.tail]
8301+::
8302+:: At every position that must be a cell, opaque or sum types may still
8303+:: contain cells. Do not report a definite mismatch without unfolding them.
8304+++ cell-pattern-spine-unknown
8305+ |= [typ=itype names=(list term) sub=isub]
8306+ ^- ?
8307+ ?~ names |
8308+ ?~ t.names |
8309+ =. typ (itype-walk typ sub)
8310+ ?: ?=(%cell -.typ) $(typ tal.typ, names t.names)
8311+ |(?=(%union -.typ) ?=(%collection -.typ) ?=(%recursive -.typ) ?=(%jrec -.typ) ?=(%noun -.typ) ?=(%fn -.typ) ?=(%tag -.typ))
8312+::
8313+++ cell-binder-pattern
8314+ |= e=expr
8315+ ^- ?
8316+ ?. ?=(%branch -.e) |
8317+ ?~ arms.e |
8318+ ?^ t.arms.e |
8319+ ?. ?=(%cell -.pat.i.arms.e) |
8320+ !(single-structured-pattern e)
58958321::
58968322++ infer-cell-branch
5897− |= [e=expr env=ienv state=istate]
8323+ |= [e=expr env=ienv state=istate expected=(unit [typ=itype context=span])]
58988324 ^- iresult
58998325 ?> ?=(%branch -.e)
59008326 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
@@ -5903,23 +8329,31 @@
59038329 =/ pats=(list pattern) items.pat.arm
59048330 ?~ pats [%| ["branch pattern is not supported by partial inference" ~]]
59058331 ?~ t.pats [%| ["branch pattern is not supported by partial inference" ~]]
5906− ?^ t.t.pats [%| ["branch pattern is not supported by partial inference" ~]]
5907− ?. ?=(%bind -.i.pats) [%| ["branch pattern is not supported by partial inference" ~]]
5908− ?. ?=(%bind -.i.t.pats) [%| ["branch pattern is not supported by partial inference" ~]]
5909− =/ one=term name.i.pats
5910− =/ two=term name.i.t.pats
5911− ?: |(=(one two) ?=(^ (ienv-lookup one env)) ?=(^ (ienv-lookup two env)) (lien globals.state |=(x=term |(=(x one) =(x two)))))
5912− [%| ["pattern shadows a name" ~]]
8332+ =/ names=(each (list term) @t) (cell-pattern-names pats env globals.state ~)
8333+ ?: ?=(%| -.names) [%| [(trip p.names) ~]]
59138334 =/ subject=iresult (infer-fragment subject.e env state)
59148335 ?: ?=(%| -.subject) subject
59158336 =/ st=istate state.p.subject
8337+ =/ subject-type=itype (itype-normalize typ.p.subject sub.st)
8338+ ?: (itype-has-recursive subject-type)
8339+ [%| ["recursive pattern is not supported by partial inference" ~]]
59168340 ?: (itype-has-face typ.p.subject sub.st)
59178341 [%| ["record patterns are not supported by partial inference" ~]]
5918− =/ head=itype [%var next.st]
5919− =/ tail=itype [%var +(next.st)]
5920− =/ sub=(unit isub) (itype-unify typ.p.subject [%cell head tail] sub.st)
8342+ ?: (cell-pattern-spine-unknown subject-type p.names sub.st)
8343+ [%| ["cell pattern subject is not supported by partial inference" ~]]
8344+ =/ binders=[typ=itype env=ienv next=@ud] (cell-pattern-types p.names env next.st)
8345+ =/ sub=(unit isub) (itype-unify typ.p.subject typ.binders sub.st)
59218346 ?~ sub [%| ["cell pattern does not match the subject type" ~]]
5922− (infer-fragment val.arm [[one [head ~]] [two [tail ~]] env] st(next (add 2 next.st), sub u.sub))
8347+ =. st st(next next.binders, sub u.sub)
8348+ ?~ expected (infer-fragment val.arm env.binders st)
8349+ =/ body=iresult (infer-call-context-arg val.arm typ.u.expected env.binders st context.u.expected)
8350+ ?: ?=(%| -.body) body
8351+ =/ fit=ifit (itype-fit typ.p.body typ.u.expected sub.state.p.body next.state.p.body)
8352+ ?: ?=(%unknown -.fit) [%| ["cell branch result constraint is not supported by partial inference" ~]]
8353+ ?: ?=(%bad -.fit) [%| ["cell branch arm does not fit its expected type" ~[[context.u.expected "expected type"] [(span-of val.arm) "branch arm"]]]]
8354+ ?: (itype-has-tag (itype-normalize typ.u.expected sub.fit))
8355+ [%| ["cell branch result needs context in partial inference" ~]]
8356+ [%& typ.u.expected state.p.body(sub sub.fit, next next.fit)]
59238357::
59248358++ show-itype
59258359 |= [t=itype sub=isub]
@@ -5938,11 +8372,18 @@
59388372 %atom "@{(trip aura.t)}"
59398373 %any-atom "@"
59408374 %flag "?"
8375+ %noun "*"
59418376 %tag (trip txt.literal.t)
59428377 %const (trip txt.literal.t)
5943− %union "<union>"
5944− %face "[{(trip name.t)}={$(t body.t)}]"
5945− %fn "$-({$(t sample.t)} {$(t product.t)})"
8378+ %union
8379+ ?~ label.t (show-itype-cases cases.t sub)
8380+ ?~ args.t (trip u.label.t)
8381+ "({(trip u.label.t)} {(show-itype-cases args.t sub)})"
8382+ %recursive ?~(label.t "recursive mold" (trip u.label.t))
8383+ %jrec ?~(label.t "recursive mold" (trip u.label.t))
8384+ %collection "({(trip name.t)} {(show-itype-cases args.t sub)})"
8385+ %face "[{(trip name.t)}={(show-itype-context body.t sub)}]"
8386+ %fn "$-({(show-itype-context sample.t sub)} {(show-itype-context product.t sub)})"
59468387 %cell "[{(show-itype-item hed.t sub)} {(show-itype-item tal.t sub)}]"
59478388 ==
59488389::
@@ -5950,9 +8391,23 @@
59508391 |= [t=itype sub=isub]
59518392 ^- tape
59528393 =. t (itype-walk t sub)
5953− ?: ?=(%face -.t) "{(trip name.t)}={(show-itype body.t sub)}"
8394+ ?: ?=(%face -.t) "{(trip name.t)}={(show-itype-context body.t sub)}"
8395+ (show-itype-context t sub)
8396+::
8397+++ show-itype-context
8398+ |= [t=itype sub=isub]
8399+ ^- tape
8400+ =. t (itype-walk t sub)
8401+ ?: &(?=(%union -.t) ?=(~ label.t)) "({(show-itype t sub)})"
59548402 (show-itype t sub)
59558403::
8404+++ show-itype-cases
8405+ |= [cases=(list itype) sub=isub]
8406+ ^- tape
8407+ ?~ cases ""
8408+ ?~ t.cases (show-itype-context i.cases sub)
8409+ "{(show-itype-context i.cases sub)} {$(cases t.cases)}"
8410+::
59568411:: Include the type at a conflicting site where it can be printed.
59578412:: A lone unresolved variable or decimal variable keeps the neutral label.
59588413::
@@ -5966,9 +8421,13 @@
59668421 %atom |
59678422 %any-atom |
59688423 %flag |
8424+ %noun |
59698425 %tag |
59708426 %const |
5971− %union (lien cases.typ |=(c=itype (itype-has-nvar c)))
8427+ %union |((lien cases.typ |=(c=itype (itype-has-nvar c))) (lien args.typ |=(c=itype (itype-has-nvar c))))
8428+ %recursive |
8429+ %jrec |
8430+ %collection (lien args.typ |=(c=itype (itype-has-nvar c)))
59728431 %face $(typ body.typ)
59738432 %fn |($(typ sample.typ) $(typ product.typ))
59748433 %cell |($(typ hed.typ) $(typ tal.typ))
@@ -5979,6 +8438,7 @@
59798438 ^- tape
59808439 =/ normalized=itype (itype-normalize typ sub)
59818440 ?: |(?=(%var -.normalized) ?=(%avar -.normalized) (itype-has-nvar normalized) (itype-has-tag normalized) (itype-has-union normalized)) label
8441+ ?: (itype-has-hidden-recursive normalized) label
59828442 =/ vars=(list @ud) (unique-type-vars (itype-vars normalized))
59838443 ?: (gth (lent vars) 26) label
59848444 =/ printable=itype (canonical-itype normalized vars)
@@ -5987,13 +8447,64 @@
59878447:: A capital in a written mold is generalized with its enclosing ++.
59888448:: Atom constraints may remain generic; until full rigidity checking
59898449:: is implemented, do not report a type if one became more specific.
8450+:: Distinct written capitals cannot be forced equal; use the same
8451+:: capital where a type must be shared (Decisions 2026-10-30).
8452+::
8453+++ cap-id-in
8454+ |= [n=@ud caps=icaps sub=isub]
8455+ ^- ?
8456+ ?~ caps |
8457+ =/ resolved=itype (itype-walk [%var id.i.caps] sub)
8458+ =/ ident=(unit @ud)
8459+ ?+ -.resolved ~
8460+ %var `id.resolved
8461+ %avar `id.resolved
8462+ ==
8463+ ?~ ident $(caps t.caps)
8464+ ?: =(n u.ident) &
8465+ $(caps t.caps)
8466+::
8467+++ cap-with-id
8468+ |= [n=@ud caps=icaps sub=isub]
8469+ ^- (unit icap)
8470+ ?~ caps ~
8471+ =/ resolved=itype (itype-walk [%var id.i.caps] sub)
8472+ =/ ident=(unit @ud)
8473+ ?+ -.resolved ~
8474+ %var `id.resolved
8475+ %avar `id.resolved
8476+ ==
8477+ ?~ ident $(caps t.caps)
8478+ ?: =(n u.ident) `i.caps
8479+ $(caps t.caps)
8480+::
8481+++ merged-capitals
8482+ |= [caps=icaps sub=isub]
8483+ ^- (unit [first=icap second=icap])
8484+ ?~ caps ~
8485+ =/ resolved=itype (itype-walk [%var id.i.caps] sub)
8486+ =/ ident=(unit @ud)
8487+ ?+ -.resolved ~
8488+ %var `id.resolved
8489+ %avar `id.resolved
8490+ ==
8491+ ?~ ident $(caps t.caps)
8492+ =/ found=(unit icap) (cap-with-id u.ident t.caps sub)
8493+ ?^ found `[u.found i.caps]
8494+ $(caps t.caps)
59908495::
59918496++ constrained-capitals
59928497 |= [caps=icaps sub=isub]
59938498 ^- ?
59948499 ?~ caps |
59958500 =/ resolved=itype (itype-walk [%var id.i.caps] sub)
5996− ?. |(?=(%var -.resolved) ?=(%avar -.resolved)) &
8501+ =/ ident=(unit @ud)
8502+ ?+ -.resolved ~
8503+ %var `id.resolved
8504+ %avar `id.resolved
8505+ ==
8506+ ?~ ident &
8507+ ?: (cap-id-in u.ident t.caps sub) &
59978508 $(caps t.caps)
59988509::
59998510:: An atom variable may be generalized when an explicit capital, sample
@@ -6020,9 +8531,13 @@
60208531 %atom |
60218532 %any-atom |
60228533 %flag |
8534+ %noun |
60238535 %tag |
60248536 %const |
6025− %union (lien cases.t |=(c=itype (has-atom-var n c)))
8537+ %union |((lien cases.t |=(c=itype (has-atom-var n c))) (lien args.t |=(c=itype (has-atom-var n c))))
8538+ %recursive |
8539+ %jrec |
8540+ %collection (lien args.t |=(c=itype (has-atom-var n c)))
60268541 %face $(t body.t)
60278542 %fn |($(t sample.t) $(t product.t))
60288543 %cell |($(t hed.t) $(t tal.t))
@@ -6069,9 +8584,9 @@
60698584::
60708585:: Build the supported part of the value environment in dependency order.
60718586:: Each pass adds successful definitions. Forward references become
6072−:: available on a later pass; recursive groups and unsupported syntax do
6073−:: not enter the environment. Generalized definitions are closed, so a
6074−:: use instantiates its variables afresh.
8587+:: available on a later pass; unsupported syntax does not enter the
8588+:: environment. Generalized definitions are closed, so a use instantiates
8589+:: its variables afresh.
60758590::
60768591++ global-value-names
60778592 |= ds=(list def)
@@ -6089,32 +8604,617 @@
60898604 ?~ t.hits &
60908605 |
60918606::
6092−++ add-supported-defs
6093− |= [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)]
8607+:: A top-level gate may refer to itself through one monomorphic placeholder.
8608+:: Its declared sample is inferred first and preserves its field faces.
8609+:: Unify the completed body with that placeholder before generalization;
8610+:: reporting repeats the same check instead of instantiating the gate's
8611+:: generalized interface inside its own body. Mutual groups stay unsupported.
8612+::
8613+++ direct-self-call
8614+ |= [e=expr name=term]
8615+ ^- ?
8616+ ?: ?=(%group -.e) $(e inner.e)
8617+ ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
8618+ ?. ?=(%call -.e) |
8619+ ?. ?=(%wing -.head.e) |
8620+ =(names.head.e ~[name])
8621+::
8622+++ branch-base-arm
8623+ |= [e=expr name=term]
8624+ ^- (unit expr)
8625+ ?: ?=(%group -.e) $(e inner.e)
8626+ ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
8627+ ?. ?=(%branch -.e) ~
8628+ ?~ arms.e ~
8629+ ?~ t.arms.e ~
8630+ ?^ t.t.arms.e ~
8631+ =/ x=arm i.arms.e
8632+ =/ y=arm i.t.arms.e
8633+ ?. &(?=(%lit -.pat.x) ?=(%lit -.pat.y)) ~
8634+ ?. &(=(%loobean form.lit.pat.x) =(%loobean form.lit.pat.y)) ~
8635+ ?: =(val.lit.pat.x val.lit.pat.y) ~
8636+ =/ first=? (direct-self-call val.x name)
8637+ =/ second=? (direct-self-call val.y name)
8638+ ?: =(first second) ~
8639+ `?:(first val.y val.x)
8640+::
8641+:: Infer the base arm independently, with the self binding removed. Only
8642+:: a closed type whose constraints resolved can seed the recursive result.
8643+:: The regular body inference then checks both arms with shared state.
8644+::
8645+++ recursive-branch-seed
8646+ |= [d=def env=ienv state=istate]
8647+ ^- (unit itype)
8648+ ?. ?=(%value -.d) ~
8649+ ?. |(?=(%gate -.val.d) ?=(%gate-wide -.val.d)) ~
8650+ =/ gate=expr val.d
8651+ =/ body=expr
8652+ ?- -.gate
8653+ %gate body.gate
8654+ %gate-wide body.gate
8655+ * !!
8656+ ==
8657+ =/ base=(unit expr) (branch-base-arm body name.d)
8658+ ?~ base ~
8659+ =/ outer=ienv (skim env |=(entry=[name=term scheme=ischeme] !=(name.entry name.d)))
8660+ =/ sam=isample-result
8661+ ?- -.gate
8662+ %gate (infer-sample sample.gate outer state)
8663+ %gate-wide (infer-sample sample.gate outer state)
8664+ * !!
8665+ ==
8666+ ?: ?=(%| -.sam) ~
8667+ =/ inferred=iresult (infer-fragment u.base env.p.sam state.p.sam)
8668+ ?: ?=(%| -.inferred) ~
8669+ ?: (pending-tags tags.state.p.inferred sub.state.p.inferred) ~
8670+ ?: (constrained-capitals caps.state.p.inferred sub.state.p.inferred) ~
8671+ =/ typ=itype (itype-normalize typ.p.inferred sub.state.p.inferred)
8672+ ?: ?=(^ (itype-vars typ)) ~
8673+ ?: (itype-has-tag typ) ~
8674+ `typ
8675+::
8676+++ infer-recursive-gate
8677+ |= [d=def env=ienv state=istate]
8678+ ^- iresult
8679+ ?. ?=(%value -.d) [%| ["recursive definition is not a gate" ~]]
8680+ ?. |(?=(%gate -.val.d) ?=(%gate-wide -.val.d))
8681+ [%| ["recursive definition is not a gate" ~]]
8682+ =/ result=(unit itype) (recursive-branch-seed d env state)
8683+ =/ gate=expr val.d
8684+ =/ sam=isample-result
8685+ ?- -.gate
8686+ %gate (infer-sample sample.gate env state)
8687+ %gate-wide (infer-sample sample.gate env state)
8688+ * !!
8689+ ==
8690+ ?: ?=(%| -.sam)
8691+ =/ diag=(unit idiag)
8692+ ?- -.gate
8693+ %gate (sample-import-invalid sample.gate env state)
8694+ %gate-wide (sample-import-invalid sample.gate env state)
8695+ * ~
8696+ ==
8697+ ?: &(=(p.sam "sample mold is not supported by partial inference") ?=(^ diag)) [%| u.diag]
8698+ [%| [p.sam ~]]
8699+ =/ id=@ud next.state.p.sam
8700+ =/ product=itype ?~(result [%var id] u.result)
8701+ =/ st=istate state.p.sam(next +(id))
8702+ =/ seed=itype [%fn typ.p.sam product]
8703+ =/ seeded=ienv [[name.d [seed ~]] env.p.sam]
8704+ =/ body=expr
8705+ ?- -.gate
8706+ %gate body.gate
8707+ %gate-wide body.gate
8708+ * !!
8709+ ==
8710+ =/ out=iresult (infer-fragment body seeded st)
8711+ ?: ?=(%| -.out) out
8712+ =/ uni=(unit isub) (itype-unify product typ.p.out sub.state.p.out)
8713+ ?~ uni [%| ["recursive gate constraint is not supported by partial inference" ~]]
8714+ [%& [%fn typ.p.sam typ.p.out] state.p.out(sub u.uni)]
8715+::
8716+++ dependency-root
8717+ |= names=(list term)
8718+ ^- (list term)
8719+ ?~ names ~
8720+ ~[(rear names)]
8721+::
8722+++ dependency-exprs
8723+ |= xs=(list expr)
8724+ ^- (list term)
8725+ ?~ xs ~
8726+ =/ first=(list term) (dependency-expr i.xs)
8727+ (weld first $(xs t.xs))
8728+::
8729+++ dependency-pieces
8730+ |= xs=(list piece)
8731+ ^- (list term)
8732+ ?~ xs ~
8733+ =/ first=(list term)
8734+ ?- -.i.xs
8735+ %expr (dependency-expr p.i.xs)
8736+ %text ~
8737+ ==
8738+ (weld first $(xs t.xs))
8739+::
8740+++ dependency-qsegs
8741+ |= xs=(list qseg)
8742+ ^- (list term)
8743+ ?~ xs ~
8744+ =/ first=(list term)
8745+ ?- -.i.xs
8746+ %expr (dependency-expr p.i.xs)
8747+ %knot ~
8748+ ==
8749+ (weld first $(xs t.xs))
8750+::
8751+++ dependency-items
8752+ |= xs=(list item)
8753+ ^- (list term)
8754+ ?~ xs ~
8755+ =/ first=(list term) (dependency-expr val.i.xs)
8756+ (weld first $(xs t.xs))
8757+::
8758+++ dependency-edits
8759+ |= xs=(list edit)
8760+ ^- (list term)
8761+ ?~ xs ~
8762+ =/ first=(list term) (dependency-expr val.i.xs)
8763+ (weld first $(xs t.xs))
8764+::
8765+++ dependency-arms
8766+ |= xs=(list arm)
8767+ ^- (list term)
8768+ ?~ xs ~
8769+ =/ first=(list term) (dependency-expr val.i.xs)
8770+ (weld first $(xs t.xs))
8771+::
8772+++ dependency-defs
8773+ |= xs=(list def)
8774+ ^- (list term)
8775+ ?~ xs ~
8776+ =/ first=(list term)
8777+ ?: ?=(%value -.i.xs) (dependency-expr val.i.xs)
8778+ ~
8779+ (weld first $(xs t.xs))
8780+::
8781+++ dependency-expr
8782+ |= e=expr
8783+ ^- (list term)
8784+ ?- -.e
8785+ %str (dependency-pieces pieces.e)
8786+ %qath (dependency-qsegs segs.e)
8787+ %wing (dependency-root names.e)
8788+ %change
8789+ =/ first=(list term) (dependency-root target.e)
8790+ =/ last=(list term) (dependency-edits edits.e)
8791+ (weld first last)
8792+ %pair (dependency-expr val.e)
8793+ %unit (dependency-expr val.e)
8794+ %group (dependency-expr inner.e)
8795+ %list (dependency-exprs items.e)
8796+ %tuple (dependency-items items.e)
8797+ %gate (dependency-expr body.e)
8798+ %gate-wide (dependency-expr body.e)
8799+ %call
8800+ =/ first=(list term) (dependency-expr head.e)
8801+ =/ last=(list term) (dependency-exprs args.e)
8802+ (weld first last)
8803+ %cast (dependency-expr val.e)
8804+ %trace
8805+ =/ first=(list term) (dependency-expr val.e)
8806+ =/ last=(list term) (dependency-expr then.e)
8807+ (weld first last)
8808+ %branch
8809+ =/ first=(list term) (dependency-expr subject.e)
8810+ =/ last=(list term) (dependency-arms arms.e)
8811+ (weld first last)
8812+ %body
8813+ =/ first=(list term) (dependency-defs defs.e)
8814+ =/ last=(list term) (dependency-expr final.e)
8815+ (weld first last)
8816+ * ~
8817+ ==
8818+::
8819+:: Infer a cyclic component with one monomorphic seed per gate. All members
8820+:: must succeed before any scheme is available; pending constraints and
8821+:: unresolved branch joins remain partial.
8822++$ igate-entry [name=term typ=itype body=expr env=ienv caps=icaps]
8823++$ igate-seeds (each [entries=(list igate-entry) state=istate] idiag)
8824+++ seed-gate-group
8825+ |= [ds=(list def) env=ienv state=istate]
8826+ ^- igate-seeds
8827+ ?~ ds [%& [~ state]]
8828+ =/ d=def i.ds
8829+ ?. ?=(%value -.d) [%| ["recursive group contains a non-gate" ~]]
8830+ =/ gate=expr val.d
8831+ ?. |(?=(%gate -.gate) ?=(%gate-wide -.gate))
8832+ [%| ["recursive group contains a non-gate" ~]]
8833+ =/ initial=istate (reserve-def-caps gate state)
8834+ =/ sam=isample-result
8835+ ?- -.gate
8836+ %gate (infer-sample sample.gate env initial)
8837+ %gate-wide (infer-sample sample.gate env initial)
8838+ * !!
8839+ ==
8840+ ?: ?=(%| -.sam) [%| [p.sam ~]]
8841+ =/ body=expr
8842+ ?- -.gate
8843+ %gate body.gate
8844+ %gate-wide body.gate
8845+ * !!
8846+ ==
8847+ =/ seed=itype [%fn typ.p.sam [%var next.state.p.sam]]
8848+ =/ entry=igate-entry [name.d seed body env.p.sam caps.state.p.sam]
8849+ =/ after=istate state.p.sam(next +(next.state.p.sam), caps caps.state)
8850+ =/ rest=igate-seeds $(ds t.ds, state after)
8851+ ?: ?=(%| -.rest) rest
8852+ [%& [[entry entries.p.rest] state.p.rest]]
8853+::
8854+++ group-seed-env
8855+ |= [entries=(list igate-entry) env=ienv]
60948856 ^- ienv
6095− ?~ ds env
8857+ ?~ entries env
8858+ [[name.i.entries [typ.i.entries ~]] $(entries t.entries)]
8859+::
8860+++ infer-gate-group-bodies
8861+ |= [entries=(list igate-entry) seeds=ienv state=istate]
8862+ ^- igate-seeds
8863+ ?~ entries [%& [~ state]]
8864+ =/ entry=igate-entry i.entries
8865+ ?> ?=(%fn -.typ.entry)
8866+ =/ scope=ienv (weld seeds env.entry)
8867+ =/ out=iresult (infer-fragment body.entry scope state(caps caps.entry))
8868+ ?: ?=(%| -.out) out
8869+ =/ uni=(unit isub) (itype-unify product.typ.entry typ.p.out sub.state.p.out)
8870+ ?~ uni [%| ["recursive group constraint is not supported by partial inference" ~]]
8871+ =. caps.entry caps.state.p.out
8872+ =/ after=istate state.p.out(sub u.uni, caps caps.state)
8873+ =/ rest=igate-seeds $(entries t.entries, state after)
8874+ ?: ?=(%| -.rest) rest
8875+ [%& [[entry entries.p.rest] state.p.rest]]
8876+::
8877+++ group-schemes
8878+ |= [entries=(list igate-entry) env=ienv outer=istate state=istate]
8879+ ^- (each ienv idiag)
8880+ ?~ entries [%& ~]
8881+ =/ entry=igate-entry i.entries
8882+ =/ merged=(unit [first=icap second=icap]) (merged-capitals caps.entry sub.state)
8883+ ?^ merged
8884+ [%| ["distinct type variables must not be forced equal" ~[[at.first.u.merged "first type variable"] [at.second.u.merged "second type variable"]]]]
8885+ ?: (constrained-capitals caps.entry sub.state)
8886+ [%| ["explicit capital constraints are not supported by partial inference" ~]]
8887+ =/ typ=itype (itype-normalize typ.entry sub.state)
8888+ ?: |((itype-has-tag typ) (itype-has-hidden-generic typ) (itype-has-hidden-recursive typ) (unsupported-atom-vars typ caps.entry binders.state sub.state))
8889+ [%| ["recursive group needs unsupported inference" ~]]
8890+ =/ free=(list @ud) (weld (free-env-vars env sub.state) (free-cap-vars caps.outer sub.state))
8891+ =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
8892+ =. vars (skim vars |=(n=@ud !(lien free |=(f=@ud =(f n)))))
8893+ ?: (gth (lent vars) 26) [%| ["recursive group needs too many type variables" ~]]
8894+ =/ rest=(each ienv idiag) $(entries t.entries)
8895+ ?: ?=(%| -.rest) rest
8896+ [%& [[name.entry [typ vars]] p.rest]]
8897+::
8898+++ infer-gate-group
8899+ |= [ds=(list def) env=ienv state=istate]
8900+ ^- ilocal-result
8901+ =/ names=(list term) (global-value-names ds)
8902+ ?. (levy names |=(n=term (unique-value-name n names)))
8903+ [%| ["recursive group contains duplicate names" ~]]
8904+ ?: (lien names |=(n=term ?=(^ (ienv-lookup n env))))
8905+ [%| ["recursive group shadows a name" ~]]
8906+ =/ scoped=istate state(globals (weld names globals.state))
8907+ =/ seeded=igate-seeds (seed-gate-group ds env scoped)
8908+ ?: ?=(%| -.seeded) seeded
8909+ =/ seeds=ienv (group-seed-env entries.p.seeded ~)
8910+ =/ body=igate-seeds (infer-gate-group-bodies entries.p.seeded seeds state.p.seeded)
8911+ ?: ?=(%| -.body) body
8912+ :: Per-member ownership through mutual recursion is not implemented.
8913+ ?: !=(projections.state.p.body projections.state)
8914+ [%| ["record projection in recursive groups needs unsupported inference" ~]]
8915+ ?: !=(holes.state.p.body holes.state)
8916+ [%| ["holes in recursive groups need unsupported inference" ~]]
8917+ ?: (pending-tags tags.state.p.body sub.state.p.body)
8918+ [%| ["recursive group has unresolved literal constraints" ~]]
8919+ =/ schemes=(each ienv idiag) (group-schemes entries.p.body env state state.p.body)
8920+ ?: ?=(%| -.schemes) schemes
8921+ [%& [(weld p.schemes env) state.p.body(globals globals.state)]]
8922+::
8923+++ width-finalize
8924+ |= [ps=(list iwprojection) sub=isub visible=(list @ud)]
8925+ ^- (unit (list iwprojection))
8926+ ?~ ps `~
8927+ ?: (lien t.ps |=(p=iwprojection =(at.p at.i.ps))) ~
8928+ =/ src=itype (default-decimals (itype-normalize source.i.ps sub))
8929+ =/ dst=itype (default-decimals (itype-normalize target.i.ps sub))
8930+ ?: |((itype-has-nvar src) (itype-has-nvar dst) (itype-has-tag src) (itype-has-tag dst)) ~
8931+ =/ vars=(list @ud) (weld (itype-vars src) (itype-vars dst))
8932+ ?. (levy vars |=(n=@ud (lien visible |=(v=@ud =(n v))))) ~
8933+ =/ rest=(unit (list iwprojection)) $(ps t.ps)
8934+ ?~ rest ~
8935+ =/ entry=iwprojection i.ps
8936+ =. entry entry(source src, target dst)
8937+ `[entry u.rest]
8938+::
8939+++ add-supported-defs
8940+ |= [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) artifacts=(list iwidth-definition)]
8941+ ^- [env=ienv artifacts=(list iwidth-definition)]
8942+ ?~ ds [env artifacts]
60968943 =/ d=def i.ds
60978944 ?: ?=(%mold -.d) $(ds t.ds)
60988945 ?. (unique-value-name name.d globals) $(ds t.ds)
60998946 ?^ (ienv-lookup name.d env) $(ds t.ds)
6100− =/ result=iresult (infer-fragment val.d env [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ |])
8947+ =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
8948+ =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude ~ 256 ~]
8949+ =. initial (reserve-def-caps val.d initial)
8950+ =/ result=iresult (infer-fragment val.d env initial)
8951+ =? result ?=(%| -.result) (infer-recursive-gate d env initial)
61018952 ?: ?=(%| -.result) $(ds t.ds)
8953+ =. state.p.result (default-hole-numbers holes.state.p.result holes.initial state.p.result env !(itype-has-gate (itype-normalize typ.p.result sub.state.p.result)))
8954+ ?^ (unresolved-hole holes.state.p.result holes.initial state.p.result) $(ds t.ds)
61028955 ?: (constrained-capitals caps.state.p.result sub.state.p.result) $(ds t.ds)
61038956 =/ typ=itype (default-decimals (itype-normalize typ.p.result sub.state.p.result))
61048957 ?: |((pending-tags tags.state.p.result sub.state.p.result) (itype-has-tag typ)) $(ds t.ds)
61058958 ?: (unsupported-atom-vars typ caps.state.p.result binders.state.p.result sub.state.p.result) $(ds t.ds)
61068959 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
61078960 ?: (gth (lent vars) 26) $(ds t.ds)
8961+ =/ finalized=(unit (list iwprojection))
8962+ (width-finalize projections.state.p.result sub.state.p.result vars)
8963+ ?~ finalized $(ds t.ds)
8964+ =? artifacts ?=(^ u.finalized)
8965+ [[name.d val.d typ sub.state.p.result (flop u.finalized)] artifacts]
61088966 $(ds t.ds, env [[name.d [typ vars]] env])
61098967::
8968++$ iresolved [env=ienv grouped=(list term) artifacts=(list iwidth-definition)]
8969++$ iadj (map term (list term))
8970++$ ivisited (map term ?)
8971++$ iwork (list [name=term done=?])
8972++$ iwresult [seen=ivisited order=(list term)]
8973++$ icresult [seen=ivisited component=(list term)]
8974++$ icomponents (list (list term))
8975+++ graph-nameset
8976+ |= [names=(list term) seen=ivisited]
8977+ ^- ivisited
8978+ ?~ names seen
8979+ $(names t.names, seen (~(put by seen) i.names &))
8980+::
8981+++ graph-edges
8982+ |= [name=term graph=iadj]
8983+ ^- (list term)
8984+ =/ found=(unit (list term)) (~(get by graph) name)
8985+ ?~ found ~
8986+ u.found
8987+::
8988+++ graph-make-forward
8989+ |= [ds=(list def) names=ivisited graph=iadj]
8990+ ^- iadj
8991+ ?~ ds graph
8992+ ?. ?=(%value -.i.ds) $(ds t.ds)
8993+ =/ deps=(list term) (dependency-expr val.i.ds)
8994+ =. deps (skim deps |=(n=term ?=(^ (~(get by names) n))))
8995+ $(ds t.ds, graph (~(put by graph) name.i.ds deps))
8996+::
8997+++ graph-add-reverse
8998+ |= [name=term edges=(list term) reverse=iadj]
8999+ ^- iadj
9000+ ?~ edges reverse
9001+ =/ prior=(list term) (graph-edges i.edges reverse)
9002+ $(edges t.edges, reverse (~(put by reverse) i.edges [name prior]))
9003+::
9004+++ graph-reverse
9005+ |= [names=(list term) graph=iadj reverse=iadj]
9006+ ^- iadj
9007+ ?~ names reverse
9008+ =. reverse (graph-add-reverse i.names (graph-edges i.names graph) reverse)
9009+ $(names t.names)
9010+::
9011+++ graph-order
9012+ |= [todo=iwork seen=ivisited order=(list term) graph=iadj]
9013+ ^- iwresult
9014+ ?~ todo [seen order]
9015+ =/ event=[name=term done=?] i.todo
9016+ ?: done.event $(todo t.todo, order [name.event order])
9017+ ?: ?=(^ (~(get by seen) name.event)) $(todo t.todo)
9018+ =. seen (~(put by seen) name.event &)
9019+ =/ children=iwork (turn (graph-edges name.event graph) |=(n=term [n |]))
9020+ $(todo (weld children [[name.event &] t.todo]))
9021+::
9022+++ graph-collect
9023+ |= [todo=(list term) seen=ivisited component=(list term) graph=iadj]
9024+ ^- icresult
9025+ ?~ todo [seen component]
9026+ ?: ?=(^ (~(get by seen) i.todo)) $(todo t.todo)
9027+ =. seen (~(put by seen) i.todo &)
9028+ $(todo (weld (graph-edges i.todo graph) t.todo), component [i.todo component])
9029+::
9030+++ graph-collect-all
9031+ |= [order=(list term) seen=ivisited graph=iadj comps=icomponents]
9032+ ^- icomponents
9033+ ?~ order comps
9034+ ?: ?=(^ (~(get by seen) i.order)) $(order t.order)
9035+ =/ found=icresult (graph-collect ~[i.order] seen ~ graph)
9036+ $(order t.order, seen seen.found, comps [component.found comps])
9037+::
9038+:: Two depth-first passes find components before group inference. Maps
9039+:: preserve the graph identity; duplicate global names fail closed.
9040+++ graph-components
9041+ |= [ds=(list def) names=(list term)]
9042+ ^- icomponents
9043+ =/ nameset=ivisited ~
9044+ =/ pending=(list term) names
9045+ |-
9046+ ?^ pending
9047+ ?: ?=(^ (~(get by nameset) i.pending)) ~
9048+ $(pending t.pending, nameset (~(put by nameset) i.pending &))
9049+ =/ graph=iadj (graph-make-forward ds nameset ~)
9050+ =/ reverse=iadj (graph-reverse names graph ~)
9051+ =/ order=iwresult (graph-order (turn names |=(n=term [n |])) ~ ~ graph)
9052+ (graph-collect-all order.order ~ reverse ~)
9053+::
9054+++ graph-cycle
9055+ |= [component=(list term) graph=iadj]
9056+ ^- ?
9057+ ?~ component |
9058+ ?^ t.component &
9059+ (lien (graph-edges i.component graph) |=(x=term =(x i.component)))
9060+::
9061+++ add-groups
9062+ |= [ds=(list def) components=icomponents graph=iadj env=ienv grouped=(list term) artifacts=(list iwidth-definition) state=istate]
9063+ ^- iresolved
9064+ ?~ components [env grouped artifacts]
9065+ =/ component=(list term) i.components
9066+ ?. (graph-cycle component graph) $(components t.components)
9067+ ?: (lien component |=(n=term ?=(^ (ienv-lookup n env)))) $(components t.components)
9068+ =/ members=(list def)
9069+ %+ skim ds
9070+ |= d=def
9071+ &(?=(%value -.d) (lien component |=(n=term =(n name.d))))
9072+ ?. =((lent members) (lent component)) $(components t.components)
9073+ ?. (levy component |=(n=term (unique-value-name n globals.state))) $(components t.components)
9074+ =/ result=ilocal-result (infer-gate-group members env state)
9075+ ?: ?=(%| -.result) $(components t.components)
9076+ $(components t.components, env env.p.result, grouped (weld component grouped))
9077+::
9078+++ resolve-groups
9079+ |= [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)]
9080+ ^- iresolved
9081+ =/ env=ienv ~
9082+ =/ grouped=(list term) ~
9083+ =/ artifacts=(list iwidth-definition) ~
9084+ =/ names=(list term) (global-value-names ds)
9085+ =/ nameset=ivisited (graph-nameset names ~)
9086+ =/ graph=iadj (graph-make-forward ds nameset ~)
9087+ =/ components=icomponents (graph-components ds names)
9088+ =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
9089+ |-
9090+ =/ next=[env=ienv artifacts=(list iwidth-definition)]
9091+ (add-supported-defs ds env molds globals externals surs mark-externals marks jimports reserved-molds at prelude artifacts)
9092+ =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude ~ 256 ~]
9093+ =/ out=iresolved (add-groups ds components graph env.next grouped artifacts.next initial)
9094+ ?: =(env env.out) out
9095+ $(env env.out, grouped grouped.out, artifacts artifacts.out)
9096+::
61109097++ resolve-supported-defs
6111− |= [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)]
9098+ |= [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)]
61129099 ^- ienv
6113− =/ env=ienv ~
9100+ env:(resolve-groups ds molds globals externals surs mark-externals marks jimports reserved-molds at prelude)
9101+::
9102+:: A diagnostic-only proof for a narrow syntactic value cycle. Every
9103+:: edge is an unqualified wing in a supported expression, and samples
9104+:: may not shadow global bindings. Unknown forms yield no conclusion.
9105++$ icyclesite [name=term at=span]
9106++$ icycle [name=term first=span next=span]
9107+++ cycle-sites-list
9108+ |= [xs=(list expr) globals=(list term) locals=(list term)]
9109+ ^- (unit (list icyclesite))
9110+ ?~ xs `~
9111+ =/ first=(unit (list icyclesite)) (cycle-sites i.xs globals locals)
9112+ ?~ first ~
9113+ =/ tail=(unit (list icyclesite)) $(xs t.xs)
9114+ ?~ tail ~
9115+ `(weld u.first u.tail)
9116+::
9117+++ cycle-sample-name
9118+ |= [sam=sample globals=(list term) locals=(list term)]
9119+ ^- (unit (unit term))
9120+ ?- -.sam
9121+ %bind
9122+ ?: (lien (weld globals locals) |=(n=term =(n name.sam))) ~
9123+ ``name.sam
9124+ %face
9125+ ?: (lien (weld globals locals) |=(n=term =(n name.sam))) ~
9126+ ``name.sam
9127+ %bare `~
9128+ * ~
9129+ ==
9130+::
9131+++ cycle-sites
9132+ |= [e=expr globals=(list term) locals=(list term)]
9133+ ^- (unit (list icyclesite))
9134+ ?- -.e
9135+ %wing
9136+ ?. ?=([@ ~] names.e) ~
9137+ `~[[i.names.e at.e]]
9138+ %lit `~
9139+ %str
9140+ ?: (lien pieces.e |=(p=piece ?=(%expr -.p))) ~
9141+ `~
9142+ %group $(e inner.e)
9143+ %body ?~(defs.e $(e final.e) ~)
9144+ %cast $(e val.e)
9145+ %gate
9146+ =/ binder=(unit (unit term)) (cycle-sample-name sample.e globals locals)
9147+ ?~ binder ~
9148+ =/ nested=(list term) ?~(u.binder locals [u.u.binder locals])
9149+ $(e body.e, locals nested)
9150+ %gate-wide
9151+ =/ binder=(unit (unit term)) (cycle-sample-name sample.e globals locals)
9152+ ?~ binder ~
9153+ =/ nested=(list term) ?~(u.binder locals [u.u.binder locals])
9154+ $(e body.e, locals nested)
9155+ %call
9156+ =/ first=(unit (list icyclesite)) $(e head.e)
9157+ ?~ first ~
9158+ =/ tail=(unit (list icyclesite)) (cycle-sites-list args.e globals locals)
9159+ ?~ tail ~
9160+ `(weld u.first u.tail)
9161+ * ~
9162+ ==
9163+::
9164+++ cycle-definitely-atom
9165+ |= e=expr
9166+ ^- ?
9167+ ?: ?=(%group -.e) $(e inner.e)
9168+ ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
9169+ ?. ?=(%cast -.e) |
9170+ |(?=(%aura -.shape.e) ?=(%flag -.shape.e))
9171+::
9172+++ cycle-proof-group
9173+ |= [members=(list def) globals=(list term)]
9174+ ^- ?
9175+ ?~ members &
9176+ ?. ?=(%value -.i.members) |
9177+ ?. (unique-value-name name.i.members globals) |
9178+ ?. ?=(^ (cycle-sites val.i.members globals ~)) |
9179+ $(members t.members)
9180+::
9181+++ cycle-find-site
9182+ |= [sites=(list icyclesite) component=(list term)]
9183+ ^- (unit span)
9184+ ?~ sites ~
9185+ ?: (lien component |=(n=term =(n name.i.sites))) `at.i.sites
9186+ $(sites t.sites)
9187+::
9188+++ cycle-group-errors
9189+ |= [members=(list def) component=(list term) globals=(list term)]
9190+ ^- (list icycle)
9191+ ?~ members ~
9192+ =/ d=def i.members
9193+ ?> ?=(%value -.d)
9194+ =/ tail=(list icycle) $(members t.members)
9195+ ?. (cycle-definitely-atom val.d) tail
9196+ =/ sites=(unit (list icyclesite)) (cycle-sites val.d globals ~)
9197+ ?~ sites tail
9198+ =/ found=(unit span) (cycle-find-site u.sites component)
9199+ ?~ found tail
9200+ [[name.d at.d u.found] tail]
9201+::
9202+++ definite-value-cycles
9203+ |= [ds=(list def) globals=(list term)]
9204+ ^- (list icycle)
9205+ =/ names=(list term) (global-value-names ds)
9206+ =/ graph=iadj (graph-make-forward ds (graph-nameset names ~) ~)
9207+ =/ components=icomponents (graph-components ds names)
9208+ =/ out=(list icycle) ~
61149209 |-
6115− =/ next=ienv (add-supported-defs ds env molds globals externals surs mark-externals marks jimports reserved-molds)
6116− ?: =(next env) env
6117− $(env next)
9210+ ?~ components out
9211+ =/ component=(list term) i.components
9212+ ?. (graph-cycle component graph) $(components t.components)
9213+ =/ members=(list def)
9214+ (skim ds |=(d=def &(?=(%value -.d) (lien component |=(n=term =(n name.d))))))
9215+ ?. =((lent members) (lent component)) $(components t.components)
9216+ ?. (cycle-proof-group members globals) $(components t.components)
9217+ $(components t.components, out (weld (cycle-group-errors members component globals) out))
61189218::
61199219+| %union-analysis
61209220::
@@ -6251,11 +9351,142 @@
62519351 [at.first at.second (union-relate a (project-union-mold second molds ~))]
62529352 (weld pairs $(cases t.cases))
62539353::
9354+:: A closed structural mold supplies no equation to determine a hole.
9355+:: Applications, references, unbound capitals and unions are unproved.
9356+++ simple-mold-hole
9357+ |= sh=shape
9358+ ^- (unit (unit span))
9359+ ?: ?=(%generic -.sh)
9360+ ?~ vars.sh ~
9361+ ?. (distinct-params vars.sh) ~
9362+ (simple-mold-hole-in body.sh vars.sh)
9363+ (simple-mold-hole-in sh ~)
9364+++ simple-mold-hole-in
9365+ |= [sh=shape vars=(list @t)]
9366+ ^- (unit (unit span))
9367+ ?- -.sh
9368+ %hole ``at.sh
9369+ ?(%aura %noun %void %flag %const) `~
9370+ %tvar ?:((lien vars |=(v=@t =(v name.sh))) `~ ~)
9371+ %cell (simple-mold-field-holes fields.sh vars)
9372+ %fn
9373+ =/ a=(unit (unit span)) $(sh sample.sh)
9374+ ?~ a ~
9375+ =/ b=(unit (unit span)) $(sh product.sh)
9376+ ?~ b ~
9377+ `?~(u.a u.b u.a)
9378+ %generic ~
9379+ * ~
9380+ ==
9381+++ simple-mold-field-holes
9382+ |= [fields=(list field) vars=(list @t)]
9383+ ^- (unit (unit span))
9384+ ?~ fields `~
9385+ =/ f=field i.fields
9386+ =/ first=(unit (unit span))
9387+ ?- -.f
9388+ %face (simple-mold-hole-in shape.f vars)
9389+ %bare (simple-mold-hole-in shape.f vars)
9390+ %pun ~
9391+ ==
9392+ ?~ first ~
9393+ =/ rest=(unit (unit span)) $(fields t.fields)
9394+ ?~ rest ~
9395+ `?~(u.first u.rest u.first)
9396+++ simple-local-mold-hole
9397+ |= defs=(list def)
9398+ ^- (unit span)
9399+ ?~ defs ~
9400+ ?. ?=(%mold -.i.defs) $(defs t.defs)
9401+ =/ found=(unit (unit span)) (simple-mold-hole shape.i.defs)
9402+ ?~ found $(defs t.defs)
9403+ ?^ u.found u.found
9404+ $(defs t.defs)
9405+::
9406+:: A partial prelude may omit unsupported declarations, but may not
9407+:: publish an interface while a named mold's hole remains unchecked.
9408+++ shape-has-hole
9409+ |= sh=shape
9410+ ^- ?
9411+ ?- -.sh
9412+ %hole &
9413+ %path (lien segs.sh |=(s=pseg ?=(%inferred -.s)))
9414+ %apply (lien args.sh shape-has-hole)
9415+ %union (lien cases.sh shape-has-hole)
9416+ %cell (lien fields.sh field-has-hole)
9417+ %fn |($(sh sample.sh) $(sh product.sh))
9418+ %generic $(sh body.sh)
9419+ * |
9420+ ==
9421+++ field-has-hole
9422+ |= f=field
9423+ ^- ?
9424+ ?- -.f
9425+ %face (shape-has-hole shape.f)
9426+ %bare (shape-has-hole shape.f)
9427+ %pun |
9428+ ==
9429+++ named-mold-has-hole
9430+ |= ds=(list def)
9431+ ^- ?
9432+ ?~ ds |
9433+ ?: &(?=(%mold -.i.ds) (shape-has-hole shape.i.ds)) &
9434+ $(ds t.ds)
9435+::
9436+++ sample-has-hole
9437+ |= sam=sample
9438+ ^- ?
9439+ ?- -.sam
9440+ %face (shape-has-hole shape.sam)
9441+ %bare (shape-has-hole shape.sam)
9442+ %cell (lien items.sam sample-has-hole)
9443+ * |
9444+ ==
9445+++ def-has-hole
9446+ |= d=def
9447+ ^- ?
9448+ ?- -.d
9449+ %mold (shape-has-hole shape.d)
9450+ %value (expr-has-hole val.d)
9451+ ==
9452+++ expr-has-hole
9453+ |= e=expr
9454+ ^- ?
9455+ ?- -.e
9456+ %str (lien pieces.e |=(p=piece ?:(?=(%expr -.p) (expr-has-hole p.p) |)))
9457+ %qath (lien segs.e |=(p=qseg ?:(?=(%expr -.p) (expr-has-hole p.p) |)))
9458+ %change (lien edits.e |=(p=edit (expr-has-hole val.p)))
9459+ %pair $(e val.e)
9460+ %unit $(e val.e)
9461+ %group $(e inner.e)
9462+ %list (lien items.e expr-has-hole)
9463+ %tuple (lien items.e |=(i=item (expr-has-hole val.i)))
9464+ ?(%gate %gate-wide) |((sample-has-hole sample.e) $(e body.e))
9465+ %cast |((shape-has-hole shape.e) $(e val.e))
9466+ %call |($(e head.e) (lien args.e expr-has-hole))
9467+ %trace |($(e val.e) $(e then.e))
9468+ %branch |($(e subject.e) (lien arms.e |=(a=arm (expr-has-hole val.a))))
9469+ %body |((lien defs.e def-has-hole) $(e final.e))
9470+ * |
9471+ ==
9472+++ hole-values-present
9473+ |= [ds=(list def) env=ienv]
9474+ ^- ?
9475+ ?~ ds &
9476+ ?. ?=(%value -.i.ds) $(ds t.ds)
9477+ ?: (expr-has-hole val.i.ds)
9478+ ?. ?=(^ (ienv-lookup name.i.ds env)) |
9479+ $(ds t.ds)
9480+ $(ds t.ds)
62549481++ show-partial-mold
62559482 |= [file=path src=@t d=def molds=imolds]
62569483 ^- @t
62579484 ?> ?=(%mold -.d)
62589485 =/ sh=shape shape.d
9486+ =/ hole=(unit (unit span)) (simple-mold-hole sh)
9487+ ?: &(?=(^ hole) ?=(^ u.hole))
9488+ =/ text=@t (show-error src [file line.beg.u.u.hole col.beg.u.u.hole "unresolved type hole"])
9489+ (of-wain:format ~[(crip "+$ {(trip name.d)}: type hole needs a determined type") text])
62599490 =? sh ?=(%generic -.sh) body.sh
62609491 ?. ?=(%union -.sh) (crip "+$ {(trip name.d)}: not checked")
62619492 =/ pairs=(list upair) (union-pairs cases.sh molds)
@@ -6282,6 +9513,21 @@
62829513 (show-error src [file line.beg.at.site col.beg.at.site note.site])
62839514 (of-wain:format [summary excerpts])
62849515::
9516+:: Both written field sites are shown in the source that declares them.
9517+++ show-duplicate-fields
9518+ |= [file=path src=@t diagnostic=idiag]
9519+ ^- @t
9520+ =/ excerpts=(list @t)
9521+ %+ turn sites.diagnostic
9522+ |= site=[at=span note=tape]
9523+ (show-error src [file line.beg.at.site col.beg.at.site note.site])
9524+ (of-wain:format [(crip msg.diagnostic) excerpts])
9525+::
9526+++ duplicate-fields-report
9527+ |= [file=path src=@t diagnostic=idiag]
9528+ ^- @t
9529+ (of-wain:format ~['partial inference; module not checked' (show-duplicate-fields file src diagnostic)])
9530+::
62859531:: +golden-types: a partial report; it does not claim the module checks
62869532::
62879533++ golden-types
@@ -6311,6 +9557,180 @@
63119557+$ jfile-result (each [iface=ifile cache=jcache] @t)
63129558+$ jimports-result (each [resolved=ijimports cache=jcache] @t)
63139559::
9560+:: Written record fields each have their own lexical record scope.
9561++$ written-fields (map term span)
9562+++ duplicate-written-field
9563+ |= [name=term at=span seen=written-fields]
9564+ ^- (unit idiag)
9565+ =/ prior=(unit span) (~(get by seen) name)
9566+ ?~ prior ~
9567+ `["record field `{(trip name)}` is repeated" ~[[u.prior "first field"] [at "repeated field"]]]
9568+++ duplicate-shapes
9569+ |= xs=(list shape)
9570+ ^- (unit idiag)
9571+ ?~ xs ~
9572+ =/ first (duplicate-shape i.xs)
9573+ ?^ first first
9574+ $(xs t.xs)
9575+++ duplicate-fields
9576+ |= [fields=(list field) seen=written-fields]
9577+ ^- (unit idiag)
9578+ ?~ fields ~
9579+ =/ f=field i.fields
9580+ =/ n=(unit term)
9581+ ?- -.f
9582+ %face `name.f
9583+ %pun `name.f
9584+ %bare ~
9585+ ==
9586+ =/ dup=(unit idiag) ?~(n ~ (duplicate-written-field u.n at.f seen))
9587+ ?^ dup dup
9588+ =/ inner=(unit idiag)
9589+ ?- -.f
9590+ %face (duplicate-shape shape.f)
9591+ %pun ~
9592+ %bare (duplicate-shape shape.f)
9593+ ==
9594+ ?^ inner inner
9595+ $(fields t.fields, seen ?~(n seen (~(put by seen) u.n at.f)))
9596+++ duplicate-shape
9597+ |= s=shape
9598+ ^- (unit idiag)
9599+ ?- -.s
9600+ %cell (duplicate-fields fields.s ~)
9601+ %apply (duplicate-shapes args.s)
9602+ %union (duplicate-shapes cases.s)
9603+ %fn
9604+ =/ left (duplicate-shape sample.s)
9605+ ?^ left left
9606+ (duplicate-shape product.s)
9607+ %generic (duplicate-shape body.s)
9608+ * ~
9609+ ==
9610+++ duplicate-samples
9611+ |= [items=(list sample) seen=written-fields]
9612+ ^- (unit idiag)
9613+ ?~ items ~
9614+ =/ a=sample i.items
9615+ =/ n=(unit term)
9616+ ?- -.a
9617+ %bind `name.a
9618+ %face `name.a
9619+ %pun `name.a
9620+ * ~
9621+ ==
9622+ =/ dup=(unit idiag) ?~(n ~ (duplicate-written-field u.n at.a seen))
9623+ ?^ dup dup
9624+ =/ inner (duplicate-sample a)
9625+ ?^ inner inner
9626+ $(items t.items, seen ?~(n seen (~(put by seen) u.n at.a)))
9627+++ duplicate-sample
9628+ |= s=sample
9629+ ^- (unit idiag)
9630+ ?- -.s
9631+ %cell (duplicate-samples items.s ~)
9632+ %face (duplicate-shape shape.s)
9633+ %bare (duplicate-shape shape.s)
9634+ * ~
9635+ ==
9636+++ duplicate-exprs
9637+ |= xs=(list expr)
9638+ ^- (unit idiag)
9639+ ?~ xs ~
9640+ =/ first (duplicate-expr i.xs)
9641+ ?^ first first
9642+ $(xs t.xs)
9643+++ duplicate-items
9644+ |= [items=(list item) seen=written-fields]
9645+ ^- (unit idiag)
9646+ ?~ items ~
9647+ =/ a=item i.items
9648+ =/ dup=(unit idiag) ?~(face.a ~ (duplicate-written-field u.face.a at.a seen))
9649+ ?^ dup dup
9650+ =/ inner (duplicate-expr val.a)
9651+ ?^ inner inner
9652+ $(items t.items, seen ?~(face.a seen (~(put by seen) u.face.a at.a)))
9653+++ duplicate-pieces
9654+ |= pieces=(list piece)
9655+ ^- (unit idiag)
9656+ ?~ pieces ~
9657+ =/ first=(unit idiag) ?:(?=(%expr -.i.pieces) (duplicate-expr p.i.pieces) ~)
9658+ ?^ first first
9659+ $(pieces t.pieces)
9660+++ duplicate-qsegs
9661+ |= segs=(list qseg)
9662+ ^- (unit idiag)
9663+ ?~ segs ~
9664+ =/ first=(unit idiag) ?:(?=(%expr -.i.segs) (duplicate-expr p.i.segs) ~)
9665+ ?^ first first
9666+ $(segs t.segs)
9667+++ duplicate-edits
9668+ |= edits=(list edit)
9669+ ^- (unit idiag)
9670+ ?~ edits ~
9671+ =/ first (duplicate-expr val.i.edits)
9672+ ?^ first first
9673+ $(edits t.edits)
9674+++ duplicate-arms
9675+ |= arms=(list arm)
9676+ ^- (unit idiag)
9677+ ?~ arms ~
9678+ =/ first (duplicate-expr val.i.arms)
9679+ ?^ first first
9680+ $(arms t.arms)
9681+++ duplicate-defs
9682+ |= defs=(list def)
9683+ ^- (unit idiag)
9684+ ?~ defs ~
9685+ =/ first=(unit idiag)
9686+ ?- -.i.defs
9687+ %mold (duplicate-shape shape.i.defs)
9688+ %value (duplicate-expr val.i.defs)
9689+ ==
9690+ ?^ first first
9691+ $(defs t.defs)
9692+++ duplicate-expr
9693+ |= e=expr
9694+ ^- (unit idiag)
9695+ ?- -.e
9696+ %str (duplicate-pieces pieces.e)
9697+ %qath (duplicate-qsegs segs.e)
9698+ %change (duplicate-edits edits.e)
9699+ %pair (duplicate-expr val.e)
9700+ %unit (duplicate-expr val.e)
9701+ %group (duplicate-expr inner.e)
9702+ %list (duplicate-exprs items.e)
9703+ %tuple (duplicate-items items.e ~)
9704+ %gate-wide
9705+ =/ first (duplicate-sample sample.e)
9706+ ?^ first first
9707+ (duplicate-expr body.e)
9708+ %gate
9709+ =/ first (duplicate-sample sample.e)
9710+ ?^ first first
9711+ (duplicate-expr body.e)
9712+ %cast
9713+ =/ first (duplicate-shape shape.e)
9714+ ?^ first first
9715+ (duplicate-expr val.e)
9716+ %call
9717+ =/ first (duplicate-expr head.e)
9718+ ?^ first first
9719+ (duplicate-exprs args.e)
9720+ %trace
9721+ =/ first (duplicate-expr val.e)
9722+ ?^ first first
9723+ (duplicate-expr then.e)
9724+ %branch
9725+ =/ first (duplicate-expr subject.e)
9726+ ?^ first first
9727+ (duplicate-arms arms.e)
9728+ %body
9729+ =/ first (duplicate-defs defs.e)
9730+ ?^ first first
9731+ (duplicate-expr final.e)
9732+ * ~
9733+ ==
63149734++ import-binding-names
63159735 |= imports=(list import)
63169736 ^- (list term)
@@ -6323,6 +9743,60 @@
63239743 ==
63249744 [n $(imports t.imports)]
63259745::
9746+++ reserved-proj-sample
9747+ |= sam=sample
9748+ ^- ?
9749+ ?- -.sam
9750+ %bind =(name.sam %proj)
9751+ %face =(name.sam %proj)
9752+ %pun =(name.sam %proj)
9753+ %cell (lien items.sam reserved-proj-sample)
9754+ * |
9755+ ==
9756+++ reserved-proj-pattern
9757+ |= p=pattern
9758+ ^- ?
9759+ ?- -.p
9760+ %bind =(name.p %proj)
9761+ %cell (lien items.p reserved-proj-pattern)
9762+ * |
9763+ ==
9764+++ reserved-proj-def
9765+ |= d=def
9766+ ^- ?
9767+ ?: =(name.d %proj) &
9768+ ?: ?=(%value -.d) (reserved-proj-expr val.d)
9769+ |
9770+++ reserved-proj-expr
9771+ |= e=expr
9772+ ^- ?
9773+ ?- -.e
9774+ %str (lien pieces.e |=(p=piece ?:(?=(%expr -.p) (reserved-proj-expr p.p) |)))
9775+ %qath (lien segs.e |=(p=qseg ?:(?=(%expr -.p) (reserved-proj-expr p.p) |)))
9776+ %change (lien edits.e |=(p=edit (reserved-proj-expr val.p)))
9777+ %pair $(e val.e)
9778+ %unit $(e val.e)
9779+ %group $(e inner.e)
9780+ %list (lien items.e reserved-proj-expr)
9781+ %tuple (lien items.e |=(i=item (reserved-proj-expr val.i)))
9782+ ?(%gate %gate-wide) |((reserved-proj-sample sample.e) $(e body.e))
9783+ %cast $(e val.e)
9784+ %call |($(e head.e) (lien args.e reserved-proj-expr))
9785+ %trace |($(e val.e) $(e then.e))
9786+ %branch |($(e subject.e) (lien arms.e |=(a=arm |((reserved-proj-pattern pat.a) (reserved-proj-expr val.a)))))
9787+ %body |((lien defs.e reserved-proj-def) $(e final.e))
9788+ * |
9789+ ==
9790+::
9791+++ module-has-reserved-proj
9792+ |= mod=module
9793+ ^- ?
9794+ =/ imported=(list term) (import-binding-names imports.mod)
9795+ =/ vals=(list term) (global-value-names defs.mod)
9796+ =/ molds=imolds (collect-simple-molds defs.mod)
9797+ =/ mold-names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
9798+ |((lien (weld imported (weld vals mold-names)) |=(n=term =(n %proj))) (lien defs.mod reserved-proj-def))
9799+::
63269800++ module-scope-valid
63279801 |= [mod=module prelude-values=(list term) prelude-molds=(list term)]
63289802 ^- ?
@@ -6330,6 +9804,7 @@
63309804 =/ vals=(list term) (global-value-names defs.mod)
63319805 =/ molds=imolds (collect-simple-molds defs.mod)
63329806 =/ mold-names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
9807+ ?: (module-has-reserved-proj mod) |
63339808 ?. %+ levy imported
63349809 |= n=term
63359810 &((unique-value-name n imported) !(lien vals |=(v=term =(n v))) !(lien mold-names |=(m=term =(n m))) !(lien prelude-values |=(v=term =(n v))) !(lien prelude-molds |=(m=term =(n m))))
@@ -6337,6 +9812,22 @@
63379812 ?. (levy vals |=(n=term &((unique-value-name n vals) !(lien prelude-values |=(v=term =(n v)))))) |
63389813 (levy mold-names |=(n=term &((unique-value-name n mold-names) !(lien prelude-molds |=(m=term =(n m))))))
63399814::
9815+:: In an API file or before main's kind is known, a lone `+$ poke`
9816+:: may be a declaration rather than a mold that shadows the prelude. Do not call
9817+:: that one collision definite, and do not hide unrelated scope errors.
9818+++ pending-declared-poke
9819+ |= [at=path mod=module prelude-values=(list term) prelude-molds=(list term)]
9820+ ^- ?
9821+ ?. (lien prelude-molds |=(n=term =(%poke n))) |
9822+ ?. |(?=([%ui %api @ %jibb ~] at) (lien defs.mod |=(d=def &(?=(%value -.d) =(%main name.d))))) |
9823+ =/ pokes=(list def)
9824+ (skim defs.mod |=(d=def &(?=(%mold -.d) =(%poke name.d))))
9825+ ?~ pokes |
9826+ ?^ t.pokes |
9827+ =/ remaining=(list def)
9828+ (skim defs.mod |=(d=def !&(?=(%mold -.d) =(%poke name.d))))
9829+ (module-scope-valid mod(defs remaining) prelude-values prelude-molds)
9830+::
63409831++ module-mold-types
63419832 |= [molds=imolds state=istate]
63429833 ^- (each imold-types @t)
@@ -6345,10 +9836,205 @@
63459836 =/ t=(unit [template=ischeme state=istate])
63469837 (infer-mold-template body.m state(active [name.m active.state], in-mold &))
63479838 ?~ t [%| 'module mold needs unsupported inference']
9839+ =. typ.template.u.t (label-direct-union typ.template.u.t body.m name.m state)
63489840 =/ rest=(each imold-types @t) $(molds t.molds)
63499841 ?: ?=(%| -.rest) rest
63509842 [%& [[name.m template.u.t] p.rest]]
63519843::
9844+:: Prepare a provisional interface from the trusted vendored source.
9845+:: Every declared name remains reserved, but only molds and values this
9846+:: fragment can infer are usable. Unsupported bodies are not validated.
9847+:: An optional internal source supplies the prelude's one supported import;
9848+:: clients cannot import that path directly. Named unions retain their origin.
9849+::
9850+:: Recognize only the complete standard prelude list shape. Its recursive
9851+:: tail uses the same parameter and the unqualified list name. The reader
9852+:: verifies Hoon's list provenance before producing the same collection type.
9853+:: The prelude source and reader output are trusted caller inputs.
9854+::
9855+++ standard-prelude-list
9856+ |= sh=shape
9857+ ^- ?
9858+ ?. ?=(%generic -.sh) |
9859+ ?~ vars.sh |
9860+ ?^ t.vars.sh |
9861+ =/ var=@t i.vars.sh
9862+ ?. ?=(%union -.body.sh) |
9863+ =/ cs=(list shape) cases.body.sh
9864+ ?~ cs |
9865+ ?~ t.cs |
9866+ ?^ t.t.cs |
9867+ ?. ?=(%const -.i.cs) |
9868+ ?. =(%null form.lit.i.cs) |
9869+ ?. ?=(%cell -.i.t.cs) |
9870+ =/ fs=(list field) fields.i.t.cs
9871+ ?~ fs |
9872+ ?~ t.fs |
9873+ ?^ t.t.fs |
9874+ ?. ?=(%face -.i.fs) |
9875+ ?. =(%i name.i.fs) |
9876+ ?. ?=(%tvar -.shape.i.fs) |
9877+ ?. =(var name.shape.i.fs) |
9878+ ?. ?=(%face -.i.t.fs) |
9879+ ?. =(%t name.i.t.fs) |
9880+ =/ tail=shape shape.i.t.fs
9881+ ?. ?=(%apply -.tail) |
9882+ ?. =(~[%list] ref.tail) |
9883+ ?~ args.tail |
9884+ ?^ t.args.tail |
9885+ ?. ?=(%tvar -.i.args.tail) |
9886+ =(var name.i.args.tail)
9887+::
9888+++ prelude-label
9889+ |= [typ=itype name=term]
9890+ ^- itype
9891+ ?: ?=(%jrec -.typ) typ(label `name)
9892+ ?. ?=(%union -.typ) typ
9893+ ?^ args.typ typ
9894+ typ(label `name)
9895+::
9896+++ partial-prelude-molds
9897+ |= [molds=imolds state=istate]
9898+ ^- imold-types
9899+ ?~ molds ~
9900+ =/ m=[name=term body=shape] i.molds
9901+ ?: &(=(at.state /lib/jibb/prelude/jibb) =(%list name.m))
9902+ ?. (standard-prelude-list body.m) $(molds t.molds)
9903+ [[%list [[%collection %list ~[[%var 0]]] ~[0]]] $(molds t.molds)]
9904+ =/ out=(unit [template=ischeme state=istate])
9905+ (infer-mold-template body.m state(active [name.m active.state], in-mold &))
9906+ ?~ out $(molds t.molds)
9907+ =. typ.template.u.out (label-direct-union typ.template.u.out body.m name.m state)
9908+ =. typ.template.u.out (prelude-label typ.template.u.out name.m)
9909+ [[name.m template.u.out] $(molds t.molds)]
9910+::
9911+:: A compiler-owned interface available only to the dedicated
9912+:: internal-prelude preparation path, never the ordinary module resolver.
9913+++ private-primitive-interface
9914+ ^- ifile
9915+ =/ a=itype [%avar 0]
9916+ =/ pair=itype [%cell a a]
9917+ =/ greater=ischeme [[%fn pair [%flag ~]] ~[0]]
9918+ [~[[%raw-gth greater]] ~ /lib/jibb/primitives/jibb ~ ~ ~ ~]
9919+::
9920+++ infer-private-internal
9921+ |= src=@t
9922+ ^- (unit ifile)
9923+ =/ at=path /lib/jibb/internal/jibb
9924+ =/ parsed (parse at src)
9925+ ?: ?=(%| -.parsed) ~
9926+ =/ mod=module p.parsed
9927+ ?^ (duplicate-defs defs.mod) ~
9928+ ?~ imports.mod
9929+ =/ built=jfile-result (infer-jibb-file at src ~ ~ ~ ~[at] ~ ~ ~ ~)
9930+ ?: ?=(%| -.built) ~
9931+ `iface.p.built
9932+ ?. ?=([[%jibb *] ~] imports.mod) ~
9933+ ?. =(path.i.imports.mod /lib/jibb/primitives) ~
9934+ ?. (module-scope-valid mod ~ ~) ~
9935+ =/ vals=(list term) (global-value-names defs.mod)
9936+ ?: (lien vals |=(n=term =(n %main))) ~
9937+ =/ molds=imolds (collect-simple-molds defs.mod)
9938+ =/ globals=(list term) (weld (import-binding-names imports.mod) vals)
9939+ =/ js=ijimports ~[[face.i.imports.mod private-primitive-interface]]
9940+ =/ reserved=(list term) ~[face.i.imports.mod]
9941+ =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
9942+ =/ state=istate [0 ~ ~ ~ molds globals ~ ~ ~ ~ js reserved ~ ~ ~ | at top ~ ~ 256 ~]
9943+ =/ mts=(each imold-types @t) (module-mold-types molds state)
9944+ ?: ?=(%| -.mts) ~
9945+ =/ resolution=iresolved (resolve-groups defs.mod molds globals ~ ~ ~ ~ js reserved at ~)
9946+ =/ env=ienv env.resolution
9947+ ?. (module-values-complete defs.mod env) ~
9948+ `[env p.mts at ~ artifacts.resolution ~ `src]
9949+::
9950+++ partial-prelude-interface-with-internal
9951+ |= [src=@t internal-source=(unit @t)]
9952+ ^- (unit ifile)
9953+ ?: =(0 src) ~
9954+ =/ at=path /lib/jibb/prelude/jibb
9955+ =/ parsed (parse at src)
9956+ ?: ?=(%| -.parsed) ~
9957+ ?: (named-mold-has-hole defs.p.parsed) ~
9958+ ?^ (duplicate-defs defs.p.parsed) ~
9959+ =/ private=(unit ijimports)
9960+ ?~ imports.p.parsed `~
9961+ ?. ?=([[%jibb *] ~] imports.p.parsed) ~
9962+ ?. =(path.i.imports.p.parsed /lib/jibb/internal) ~
9963+ ?~ internal-source ~
9964+ =/ built=(unit ifile) (infer-private-internal u.internal-source)
9965+ ?~ built ~
9966+ `~[[face.i.imports.p.parsed u.built]]
9967+ ?~ private ~
9968+ ?~ defs.p.parsed ~
9969+ ?. (module-scope-valid p.parsed ~ ~) ~
9970+ =/ ds=(list def) defs.p.parsed
9971+ =/ molds=imolds (collect-simple-molds ds)
9972+ =/ names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
9973+ =/ globals=(list term) (weld (import-binding-names imports.p.parsed) (global-value-names ds))
9974+ :: Remove raw list before inferring any template, so an altered list
9975+ :: cannot leak through an alias. Its name remains reserved either way.
9976+ =/ declared=? (lien names |=(name=term =(%list name)))
9977+ =/ env-molds=imolds molds
9978+ =? env-molds declared
9979+ (skim molds |=(m=[name=term body=shape] !=(%list name.m)))
9980+ =/ reserved=(list term) ?:(declared ~[%list] ~)
9981+ =/ state=istate [0 ~ ~ ~ env-molds globals ~ ~ ~ ~ u.private reserved ~ ~ ~ | at names ~ ~ 256 ~]
9982+ :: Other prelude molds may use list only after its source has passed
9983+ :: the standard-list check. The raw declaration remains removed.
9984+ =/ declared-list=(unit shape) (find-simple-mold %list molds)
9985+ =/ mold-prelude=(unit ifile)
9986+ ?~ declared-list ~
9987+ ?. (standard-prelude-list u.declared-list) ~
9988+ `[~ ~[[%list [[%collection %list ~[[%var 0]]] ~[0]]]] at ~ ~ ~ ~]
9989+ =/ mt=imold-types (partial-prelude-molds molds state(prelude mold-prelude))
9990+ =/ partial=ifile [~ mt at ~ ~ ~ ~]
9991+ :: An explicitly qualified re-export must resolve. Other unsupported
9992+ :: prelude declarations remain reserved but absent from the interface.
9993+ =/ required=imolds
9994+ %+ skim molds
9995+ |= m=[name=term body=shape]
9996+ =/ sh=shape body.m
9997+ ?. ?=(%ref -.sh) |
9998+ ?~ names.sh |
9999+ ?=(^ t.names.sh)
10000+ ?. (levy required |=(m=[name=term body=shape] ?=(^ (find-jibb-mold name.m partial)))) ~
10001+ =/ resolution=iresolved (resolve-groups ds env-molds globals ~ ~ ~ ~ u.private reserved at `partial)
10002+ =/ env=ienv env.resolution
10003+ ?. (hole-values-present ds env) ~
10004+ =/ deps=(list iwidth-dependency)
10005+ ?~ u.private ~
10006+ ~[[at.interface.i.u.private source.interface.i.u.private elaborations.interface.i.u.private]]
10007+ `[env mt at ~ artifacts.resolution deps `src]
10008+::
10009+++ partial-prelude-interface
10010+ |= src=@t
10011+ ^- (unit ifile)
10012+ (partial-prelude-interface-with-internal src ~)
10013+::
10014++$ iprelude [iface=ifile values=(list term) molds=(list term)]
10015+::
10016+++ prepare-prelude
10017+ |= src=@t
10018+ ^- (unit iprelude)
10019+ =/ iface=(unit ifile) (partial-prelude-interface src)
10020+ ?~ iface ~
10021+ =/ parsed (parse /lib/jibb/prelude/jibb src)
10022+ ?: ?=(%| -.parsed) ~
10023+ =/ vals=(list term) (global-value-names defs.p.parsed)
10024+ =/ ms=(list term) (turn (collect-simple-molds defs.p.parsed) |=(m=[name=term body=shape] name.m))
10025+ `[u.iface vals ms]
10026+::
10027+++ prepare-prelude-with-internal
10028+ |= [src=@t internal-source=@t]
10029+ ^- (unit iprelude)
10030+ =/ iface=(unit ifile) (partial-prelude-interface-with-internal src `internal-source)
10031+ ?~ iface ~
10032+ =/ parsed (parse /lib/jibb/prelude/jibb src)
10033+ ?: ?=(%| -.parsed) ~
10034+ =/ vals=(list term) (global-value-names defs.p.parsed)
10035+ =/ ms=(list term) (turn (collect-simple-molds defs.p.parsed) |=(m=[name=term body=shape] name.m))
10036+ `[u.iface vals ms]
10037+::
635210038++ module-values-complete
635310039 |= [ds=(list def) env=ienv]
635410040 ^- ?
@@ -6370,11 +10056,15 @@
637010056 $(cache t.cache)
637110057::
637210058++ resolve-jibb-imports
6373− |= [imports=(list import) externals=iexternals mark-externals=imark-externals modules=jbundle active=(list path) prelude-values=(list term) prelude-molds=(list term) cache=jcache]
10059+ |= [imports=(list import) externals=iexternals mark-externals=imark-externals modules=jbundle active=(list path) prelude-values=(list term) prelude-molds=(list term) cache=jcache prelude=(unit ifile)]
637410060 ^- jimports-result
637510061 ?~ imports [%& [~ cache]]
637610062 ?. ?=(%jibb -.i.imports) $(imports t.imports)
637710063 =/ at=path (weld path.i.imports `path`~[%jibb])
10064+ ?: =(at /lib/jibb/internal/jibb)
10065+ [%| 'the prelude internal module is private']
10066+ ?: =(at /lib/jibb/primitives/jibb)
10067+ [%| 'the prelude primitive interface is private']
637810068 ?: (lien active |=(p=path =(p at)))
637910069 [%| (crip "import cycle at {(spud at)}")]
638010070 =/ found=jbundle (skim modules |=(m=jsource =(at at.m)))
@@ -6383,37 +10073,313 @@
638310073 =/ cached=(unit ifile) (find-jibb-cache at cache)
638410074 =/ iface=jfile-result
638510075 ?^ cached [%& [u.cached cache]]
6386− (infer-jibb-file at source.i.found externals mark-externals modules [at active] prelude-values prelude-molds cache)
10076+ (infer-jibb-file at source.i.found externals mark-externals modules [at active] prelude-values prelude-molds cache prelude)
638710077 ?: ?=(%| -.iface) [%| p.iface]
638810078 =/ rest=jimports-result $(imports t.imports, cache cache.p.iface)
638910079 ?: ?=(%| -.rest) rest
639010080 [%& [[[face.i.imports iface.p.iface] resolved.p.rest] cache.p.rest]]
639110081::
10082+:: Provisional declaration extraction only; this does not derive asks,
10083+:: validate imported types, or claim that an API module has checked.
10084++$ iapi-path [at=span name=term segments=(list pseg) full=term diffs=(list term) scry=(unit (list pseg))]
10085+++ api-path-mark
10086+ |= [sh=shape marks=(list term)]
10087+ ^- (unit term)
10088+ ?. ?=(%ref -.sh) ~
10089+ ?. ?=([@ ~] names.sh) ~
10090+ ?. (unique-value-name i.names.sh marks) ~
10091+ `i.names.sh
10092+::
10093+++ api-path-diffs
10094+ |= [shapes=(list shape) marks=(list term) used=(list term)]
10095+ ^- (unit (list term))
10096+ ?~ shapes `~
10097+ =/ n=(unit term) (api-path-mark i.shapes marks)
10098+ ?~ n ~
10099+ ?: (lien used |=(x=term =(x u.n))) ~
10100+ =/ rest=(unit (list term)) $(shapes t.shapes, used [u.n used])
10101+ ?~ rest ~
10102+ `[u.n u.rest]
10103+::
10104+++ api-path-payload
10105+ |= [sh=shape marks=(list term)]
10106+ ^- (unit [full=term diffs=(list term)])
10107+ =/ direct=(unit term) (api-path-mark sh marks)
10108+ ?^ direct `[u.direct ~]
10109+ ?. ?=(%apply -.sh) ~
10110+ ?. =(~[%facts] ref.sh) ~
10111+ ?~ args.sh ~
10112+ ?~ t.args.sh ~
10113+ =/ full=(unit term) (api-path-mark i.args.sh marks)
10114+ ?~ full ~
10115+ =/ diffs=(unit (list term)) (api-path-diffs t.args.sh marks ~[u.full])
10116+ ?~ diffs ~
10117+ `[u.full u.diffs]
10118+::
10119++$ iapi-parameter [name=term aura=@ta at=span]
10120+++ api-path-parameters
10121+ |= [segments=(list pseg) seen=(list term)]
10122+ ^- (unit (list iapi-parameter))
10123+ ?~ segments `~
10124+ ?: ?=(%knot -.i.segments) $(segments t.segments)
10125+ =/ seg=pseg i.segments
10126+ ?. ?=(%typed -.seg) ~
10127+ ?: =(0 aura.seg) ~
10128+ ?: (lien seen |=(n=term =(n name.seg))) ~
10129+ =/ rest=(unit (list iapi-parameter)) $(segments t.segments, seen [name.seg seen])
10130+ ?~ rest ~
10131+ `[[name.seg aura.seg at.seg] u.rest]
10132+::
10133+++ api-scry-parameters-compatible
10134+ |= [scry=(list iapi-parameter) watch=(list iapi-parameter)]
10135+ ^- ?
10136+ ?~ scry &
10137+ ?. (lien watch |=(p=iapi-parameter &(=(name.p name.i.scry) =(aura.p aura.i.scry)))) |
10138+ $(scry t.scry)
10139+::
10140+++ api-path-one
10141+ |= [sh=shape marks=(list term)]
10142+ ^- (unit iapi-path)
10143+ ?. ?=(%cell -.sh) ~
10144+ =/ fs=(list field) fields.sh
10145+ ?~ fs ~
10146+ ?~ t.fs ~
10147+ ?~ t.t.fs ~
10148+ ?: (gth (lent fs) 4) ~
10149+ ?. ?=(%bare -.i.fs) ~
10150+ =/ tag=shape shape.i.fs
10151+ ?. ?=(%const -.tag) ~
10152+ ?. =(%term form.lit.tag) ~
10153+ =/ name=term val.lit.tag
10154+ ?. (jibb-face-name name) ~
10155+ ?. ?=(%bare -.i.t.fs) ~
10156+ =/ path-shape=shape shape.i.t.fs
10157+ ?. ?=(%path -.path-shape) ~
10158+ ?. ?=(%bare -.i.t.t.fs) ~
10159+ =/ payload=(unit [full=term diffs=(list term)]) (api-path-payload shape.i.t.t.fs marks)
10160+ ?~ payload ~
10161+ =/ scry=(unit (unit (list pseg)))
10162+ ?~ t.t.t.fs `~
10163+ =/ entry=field i.t.t.t.fs
10164+ ?. ?=(%face -.entry) ~
10165+ ?. =(%scry name.entry) ~
10166+ ?. ?=(%path -.shape.entry) ~
10167+ ``segs.shape.entry
10168+ ?~ scry ~
10169+ =/ params=(unit (list iapi-parameter)) (api-path-parameters segs.path-shape ~)
10170+ ?~ params ~
10171+ ?^ u.scry
10172+ =/ scry-params=(unit (list iapi-parameter)) (api-path-parameters u.u.scry ~)
10173+ ?~ scry-params ~
10174+ ?. (api-scry-parameters-compatible u.scry-params u.params) ~
10175+ `[at.sh name segs.path-shape full.u.payload diffs.u.payload u.scry]
10176+ `[at.sh name segs.path-shape full.u.payload diffs.u.payload u.scry]
10177+::
10178+++ api-path-many
10179+ |= [shapes=(list shape) marks=(list term) seen=(list term)]
10180+ ^- (unit (list iapi-path))
10181+ ?~ shapes `~
10182+ =/ one=(unit iapi-path) (api-path-one i.shapes marks)
10183+ ?~ one ~
10184+ ?: (lien seen |=(n=term =(n name.u.one))) ~
10185+ =/ rest=(unit (list iapi-path)) $(shapes t.shapes, seen [name.u.one seen])
10186+ ?~ rest ~
10187+ `[u.one u.rest]
10188+::
10189+++ api-path-declaration
10190+ |= [sh=shape marks=(list term)]
10191+ ^- (unit (list iapi-path))
10192+ ?: ?=(%union -.sh) (api-path-many cases.sh marks ~)
10193+ (api-path-many ~[sh] marks ~)
10194+::
10195+:: Derived gates share the value namespace. /% marks name molds; /- and
10196+:: /= also introduce faces that cannot be shadowed by a derived value.
10197+++ api-import-faces
10198+ |= imports=(list import)
10199+ ^- (list term)
10200+ ?~ imports ~
10201+ ?- -.i.imports
10202+ %mark $(imports t.imports)
10203+ %sur [name.i.imports $(imports t.imports)]
10204+ %jibb [face.i.imports $(imports t.imports)]
10205+ ==
10206+::
10207+++ api-derived-names-valid
10208+ |= [paths=(list iapi-path) poke-names=(list term) mod=module prelude-values=(list term)]
10209+ ^- ?
10210+ =/ path-names=(list term) (turn paths |=(p=iapi-path name.p))
10211+ =/ derived=(list term) (weld path-names poke-names)
10212+ ?: (lien derived |=(n=term =(n %proj))) |
10213+ =/ outer=(list term) (weld prelude-values (weld (global-value-names defs.mod) (api-import-faces imports.mod)))
10214+ (levy derived |=(n=term &((unique-value-name n derived) !(lien outer |=(x=term =(n x))))))
10215+::
10216+:: Analysis only. Successful external entries must be unchanged results
10217+:: produced for the declared marks; no request interface is produced.
10218++$ iapi-mark-type [name=term typ=itype]
10219++$ iapi-path-typed [path=iapi-path full=itype diffs=(list iapi-mark-type)]
10220+++ api-diff-types
10221+ |= [names=(list term) externals=imark-externals declared=(list term)]
10222+ ^- (unit (list iapi-mark-type))
10223+ ?~ names `~
10224+ =/ typ=(unit itype) (find-imported-mark i.names externals declared)
10225+ ?~ typ ~
10226+ =/ tail=(unit (list iapi-mark-type)) $(names t.names)
10227+ ?~ tail ~
10228+ `[[i.names u.typ] u.tail]
10229+::
10230+++ api-path-types
10231+ |= [paths=(list iapi-path) externals=imark-externals declared=(list term)]
10232+ ^- (unit (list iapi-path-typed))
10233+ ?~ paths `~
10234+ =/ full=(unit itype) (find-imported-mark full.i.paths externals declared)
10235+ ?~ full ~
10236+ =/ diffs=(unit (list iapi-mark-type)) (api-diff-types diffs.i.paths externals declared)
10237+ ?~ diffs ~
10238+ =/ tail=(unit (list iapi-path-typed)) $(paths t.paths)
10239+ ?~ tail ~
10240+ `[[i.paths u.full u.diffs] u.tail]
10241+::
10242+++ api-poke-mark-names
10243+ |= [pokes=(list def) declared=(list term)]
10244+ ^- (unit (list term))
10245+ ?~ pokes `~
10246+ ?^ t.pokes ~
10247+ =/ d=def i.pokes
10248+ ?. ?=(%mold -.d) ~
10249+ =/ sh=shape shape.d
10250+ ?: ?=(%union -.sh) (api-path-diffs cases.sh declared ~)
10251+ =/ name=(unit term) (api-path-mark sh declared)
10252+ ?~ name ~
10253+ `~[u.name]
10254+::
10255+++ api-path-analysis
10256+ |= [mod=module externals=imark-externals prelude-values=(list term) prelude-molds=(list term)]
10257+ ^- (unit (list iapi-path-typed))
10258+ ?: (lien defs.mod def-has-hole) ~
10259+ ?^ (duplicate-defs defs.mod) ~
10260+ =/ ds=(list def) defs.mod
10261+ =/ declarations=(list def)
10262+ (skim ds |=(d=def &(?=(%mold -.d) =(%paths name.d))))
10263+ ?. ?=([* ~] declarations) ~
10264+ =/ pokes=(list def)
10265+ (skim ds |=(d=def &(?=(%mold -.d) =(%poke name.d))))
10266+ ?: (gth (lent pokes) 1) ~
10267+ =/ ordinary=(list def)
10268+ (skim ds |=(d=def !&(?=(%mold -.d) |(=(%paths name.d) =(%poke name.d)))))
10269+ ?. (module-scope-valid mod(defs ordinary) prelude-values prelude-molds) ~
10270+ =/ declared=(list term) (collect-mark-imports imports.mod)
10271+ =/ poke-names=(unit (list term)) (api-poke-mark-names pokes declared)
10272+ ?~ poke-names ~
10273+ =/ decl=def i.declarations
10274+ ?> ?=(%mold -.decl)
10275+ =/ paths=(unit (list iapi-path)) (api-path-declaration shape.decl declared)
10276+ ?~ paths ~
10277+ ?. (api-derived-names-valid u.paths u.poke-names mod prelude-values) ~
10278+ (api-path-types u.paths externals declared)
10279+::
10280+:: Source/graph entry for path analysis only. The returned paths retain
10281+:: reader-derived mark types and import resolution has checked reachable
10282+:: Jibb dependencies. This is not an API interface or a module check.
10283+++ api-path-analysis-source
10284+ |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle prepared=(unit iprelude)]
10285+ ^- (each (list iapi-path-typed) @t)
10286+ ?. ?=([%ui %api @ %jibb ~] file) [%| 'API path analysis requires /ui/api/<agent>.jibb']
10287+ =/ parsed (parse file src)
10288+ ?: ?=(%| -.parsed) [%| 'API path source does not parse']
10289+ =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
10290+ ?^ duplicate [%| (show-duplicate-fields file src u.duplicate)]
10291+ ?~ prepared [%| 'API path analysis needs the prepared prelude']
10292+ =/ prelude=(unit ifile) `iface.u.prepared
10293+ =/ deps=jimports-result
10294+ (resolve-jibb-imports imports.p.parsed externals marks modules ~[file] values.u.prepared molds.u.prepared ~ prelude)
10295+ ?: ?=(%| -.deps) [%| p.deps]
10296+ =/ paths=(unit (list iapi-path-typed))
10297+ (api-path-analysis p.parsed marks values.u.prepared molds.u.prepared)
10298+ ?~ paths [%| 'API path declaration needs unsupported analysis']
10299+ [%& u.paths]
10300+::
10301+++ api-mark-exports
10302+ |= [marks=(list term) all=(list term) externals=imark-externals]
10303+ ^- imold-types
10304+ ?~ marks ~
10305+ =/ t=(unit itype) (find-imported-mark i.marks externals all)
10306+ ?~ t $(marks t.marks)
10307+ [[i.marks [u.t ~]] $(marks t.marks)]
10308+::
10309+:: Experimental direct poke-only API. Unsupported API declarations fail
10310+:: as a whole; supplied mark reader results retain their existing boundary.
10311+++ api-poke-interface
10312+ |= [at=path mod=module mark-externals=imark-externals prelude-values=(list term) prelude-molds=(list term) prelude=(unit ifile)]
10313+ ^- (unit ifile)
10314+ ?: (lien defs.mod def-has-hole) ~
10315+ ?. ?=([%ui %api @ %jibb ~] at) ~
10316+ ?^ (duplicate-defs defs.mod) ~
10317+ ?~ prelude ~
10318+ ?. =(at.u.prelude /lib/jibb/prelude/jibb) ~
10319+ =/ poke=(unit ischeme) (find-jibb-mold %poke u.prelude)
10320+ ?~ poke ~
10321+ ?. ?=(%union -.typ.u.poke) ~
10322+ ?^ vars.u.poke ~
10323+ =/ compatible=?
10324+ %+ lien cases.typ.u.poke
10325+ |= c=itype
10326+ ?=([%cell [%const [%term %tas %agent *]] [%cell [%face %agent [%atom %tas]] [%cell [%face %mark [%atom %tas]] [%face %payload [%noun ~]]]]] c)
10327+ ?. compatible ~
10328+ ?. (module-scope-valid mod(defs ~) prelude-values prelude-molds) ~
10329+ ?. (levy imports.mod |=(i=import ?=(%mark -.i))) ~
10330+ =/ marks=(list term) (collect-mark-imports imports.mod)
10331+ ?. ?=([@ ~] marks) ~
10332+ =/ ds=(list def) defs.mod
10333+ ?. ?=([[%mold *] ~] ds) ~
10334+ ?. =(%poke name.i.ds) ~
10335+ =/ sh=shape shape.i.ds
10336+ ?. ?=([%ref *] sh) ~
10337+ ?. ?=([@ ~] names.sh) ~
10338+ =/ n=term i.names.sh
10339+ ?. (unique-value-name n marks) ~
10340+ ?: |((lien prelude-values |=(x=term =(n x))) (lien prelude-molds |=(x=term =(n x)))) ~
10341+ =/ mark=(unit itype) (find-imported-mark n mark-externals marks)
10342+ ?~ mark ~
10343+ =/ sc=ischeme [[%fn u.mark typ.u.poke] ~]
10344+ `[~[[n sc]] (api-mark-exports marks marks mark-externals) at ~[[n i.t.t.at n]] ~ ~ ~]
10345+::
639210346++ infer-jibb-file
6393− |= [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]
10347+ |= [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)]
639410348 ^- jfile-result
6395− ?: ?=([%ui %api *] at) [%| (crip "API module needs unsupported inference: {(spud at)}")]
639610349 =/ parsed (parse at src)
639710350 ?: ?=(%| -.parsed) [%| (crip "module source does not parse: {(spud at)}")]
639810351 =/ mod=module p.parsed
6399− ?. (module-scope-valid mod prelude-values prelude-molds) [%| (crip "module has conflicting names: {(spud at)}")]
10352+ =/ duplicate=(unit idiag) (duplicate-defs defs.mod)
10353+ ?^ duplicate [%| (show-duplicate-fields at src u.duplicate)]
10354+ ?: ?=([%ui %api *] at)
10355+ =/ iface=(unit ifile) (api-poke-interface at mod mark-externals prelude-values prelude-molds prelude)
10356+ ?~ iface [%| (crip "API module needs unsupported inference: {(spud at)}")]
10357+ =/ checked=ifile u.iface(source `src)
10358+ [%& [checked [[at checked] cache]]]
10359+ ?. (module-scope-valid mod prelude-values prelude-molds)
10360+ ?: (pending-declared-poke at mod prelude-values prelude-molds)
10361+ [%| (crip "module kind or scope needs unsupported inference: {(spud at)}")]
10362+ [%| (crip "module has conflicting names: {(spud at)}")]
640010363 =/ vals=(list term) (global-value-names defs.mod)
640110364 ?: (lien vals |=(n=term =(n %main)))
640210365 [%| (crip "module kind needs unsupported inference: {(spud at)}")]
6403− =/ js=jimports-result (resolve-jibb-imports imports.mod externals mark-externals modules active prelude-values prelude-molds cache)
10366+ =/ js=jimports-result (resolve-jibb-imports imports.mod externals mark-externals modules active prelude-values prelude-molds cache prelude)
640410367 ?: ?=(%| -.js) [%| p.js]
640510368 =/ molds=imolds (collect-simple-molds defs.mod)
640610369 =/ globals=(list term) (weld prelude-values (weld (import-binding-names imports.mod) vals))
640710370 =/ surs=(list term) (collect-sur-imports imports.mod)
640810371 =/ marks=(list term) (collect-mark-imports imports.mod)
640910372 =/ reserved=(list term) (weld prelude-molds (turn resolved.p.js |=(j=[face=term interface=ifile] face.j)))
6410− =/ state=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks resolved.p.js reserved ~ ~ ~ |]
10373+ =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
10374+ =/ state=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks resolved.p.js reserved ~ ~ ~ | at top prelude ~ 256 ~]
641110375 =/ mts=(each imold-types @t) (module-mold-types molds state)
641210376 ?: ?=(%| -.mts) [%| (crip "{(trip p.mts)}: {(spud at)}")]
6413− =/ env=ienv (resolve-supported-defs defs.mod molds globals externals surs mark-externals marks resolved.p.js reserved)
10377+ =/ resolution=iresolved (resolve-groups defs.mod molds globals externals surs mark-externals marks resolved.p.js reserved at prelude)
10378+ =/ env=ienv env.resolution
641410379 ?. (module-values-complete defs.mod env)
641510380 [%| (crip "module definitions need unsupported inference: {(spud at)}")]
6416− [%& [[env p.mts] [[at [env p.mts]] cache.p.js]]]
10381+ =/ iface=ifile [env p.mts at ~ artifacts.resolution ~ `src]
10382+ [%& [iface [[at iface] cache.p.js]]]
641710383::
641810384:: +golden-types-with-modules fails closed for imports without prelude
641910385:: scope. +golden-types-with-prelude resolves supported library graphs;
@@ -6424,54 +10390,103 @@
642410390 ^- @t
642510391 =/ parsed (parse file src)
642610392 ?: ?=(%| -.parsed) (show-error src p.parsed)
10393+ =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
10394+ ?^ duplicate (duplicate-fields-report file src u.duplicate)
642710395 ?: (lien imports.p.parsed |=(i=import ?=(%jibb -.i)))
642810396 'partial inference; module not checked\0aprelude source missing; module import inference unsupported'
642910397 (golden-types-with-marks file src externals mark-externals)
643010398::
6431−:: The caller supplies the actual prelude source. Its current names are
6432−:: reserved, but its incomplete inventory and types are not checked here.
10399+:: The caller supplies the actual prelude source. Its declared names are
10400+:: reserved, and supported inferred types are made available. The inventory
10401+:: and the checker are incomplete, so this never claims a checked module.
10402+:: Hosts may prepare the same trusted source once and reuse its interface.
643310403::
643410404++ golden-types-with-prelude
643510405 |= [file=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle prelude-source=@t]
643610406 ^- @t
643710407 =/ parsed (parse file src)
643810408 ?: ?=(%| -.parsed) (show-error src p.parsed)
10409+ =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
10410+ ?^ duplicate (duplicate-fields-report file src u.duplicate)
643910411 ?: =(0 prelude-source) 'partial inference; module not checked\0aprelude source missing; module import inference unsupported'
644010412 =/ prelude (parse /lib/jibb/prelude/jibb prelude-source)
644110413 ?: ?=(%| -.prelude) 'partial inference; module not checked\0aprelude source does not parse; module import inference unsupported'
6442− =/ prelude-values=(list term) (global-value-names defs.p.prelude)
6443− =/ prelude-molds=(list term)
6444− (turn (collect-simple-molds defs.p.prelude) |=(m=[name=term body=shape] name.m))
10414+ =/ prepared=(unit iprelude) (prepare-prelude prelude-source)
10415+ ?~ prepared 'partial inference; module not checked\0aprelude interface is not supported'
10416+ (golden-types-with-prepared-prelude file src externals mark-externals modules prepared)
10417+::
10418+++ golden-types-with-prelude-and-internal
10419+ |= [file=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle prelude-source=@t internal-source=@t]
10420+ ^- @t
10421+ =/ prepared=(unit iprelude) (prepare-prelude-with-internal prelude-source internal-source)
10422+ (golden-types-with-prepared-prelude file src externals mark-externals modules prepared)
10423+::
10424+++ golden-types-with-prepared-prelude
10425+ |= [file=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle prepared=(unit iprelude)]
10426+ ^- @t
10427+ =/ parsed (parse file src)
10428+ ?: ?=(%| -.parsed) (show-error src p.parsed)
10429+ =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
10430+ ?^ duplicate (duplicate-fields-report file src u.duplicate)
10431+ ?~ prepared 'partial inference; module not checked\0aprelude interface is not supported'
10432+ =/ prelude-values=(list term) values.u.prepared
10433+ =/ prelude-molds=(list term) molds.u.prepared
10434+ =/ iface=(unit ifile) `iface.u.prepared
644510435 ?. (module-scope-valid p.parsed prelude-values prelude-molds)
10436+ ?: (pending-declared-poke file p.parsed prelude-values prelude-molds)
10437+ 'partial inference; module not checked\0amodule kind or scope needs unsupported inference'
644610438 'partial inference; module not checked\0amodule has conflicting names'
644710439 =/ js=jimports-result
6448− (resolve-jibb-imports imports.p.parsed externals mark-externals modules ~[file] prelude-values prelude-molds ~)
10440+ (resolve-jibb-imports imports.p.parsed externals mark-externals modules ~[file] prelude-values prelude-molds ~ iface)
644910441 ?: ?=(%| -.js) (of-wain:format ~['partial inference; module not checked' p.js])
645010442 =/ scope-values=(list term)
645110443 (weld prelude-values (weld (collect-sur-imports imports.p.parsed) (collect-mark-imports imports.p.parsed)))
6452− (golden-types-in-context file src externals mark-externals resolved.p.js scope-values prelude-molds)
10444+ (golden-types-in-context file src externals mark-externals resolved.p.js scope-values prelude-molds iface)
645310445::
645410446:: +golden-types-with-marks: supply declared mark types separately from /sur
645510447:: entries, as [mark result] with the result from +read-mark:jibb-import.
645610448:: Unknown, duplicated, failed and undeclared entries never resolve a mold.
645710449::
10450+:: Callers pass unchanged structured reader results; graph validation
10451+:: remains in the existing bridge, and failures stay available lazily.
10452+++ reader-result-for-checker
10453+ |= result=*
10454+ ^- *
10455+ ?: ?=([%ok *] result) [%& +.result]
10456+ result
10457+::
10458+++ golden-types-with-reader-diagnostics
10459+ |= [file=path src=@t externals=iexternals mark-externals=imark-externals]
10460+ ^- @t
10461+ =/ ex=iexternals
10462+ (turn externals |=(e=[module=term name=term result=*] [module.e name.e (reader-result-for-checker result.e)]))
10463+ =/ mx=imark-externals
10464+ (turn mark-externals |=(e=[mark=term result=*] [mark.e (reader-result-for-checker result.e)]))
10465+ (golden-types-with-marks file src ex mx)
10466+::
645810467++ golden-types-with-marks
645910468 |= [file=path src=@t externals=iexternals mark-externals=imark-externals]
646010469 ^- @t
6461− (golden-types-in-context file src externals mark-externals ~ ~ ~)
10470+ (golden-types-in-context file src externals mark-externals ~ ~ ~ ~)
646210471::
646310472++ golden-types-in-context
6464− |= [file=path src=@t externals=iexternals mark-externals=imark-externals jimports=ijimports prelude-values=(list term) reserved-molds=(list term)]
10473+ |= [file=path src=@t externals=iexternals mark-externals=imark-externals jimports=ijimports prelude-values=(list term) reserved-molds=(list term) prelude=(unit ifile)]
646510474 ^- @t
646610475 =. reserved-molds (weld reserved-molds (turn jimports |=(j=[face=term interface=ifile] face.j)))
646710476 =/ parsed (parse file src)
646810477 ?: ?=(%| -.parsed) (show-error src p.parsed)
10478+ =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
10479+ ?^ duplicate (duplicate-fields-report file src u.duplicate)
10480+ ?: (module-has-reserved-proj p.parsed)
10481+ 'module has reserved proj name'
646910482 =/ ds=(list def) defs.p.parsed
647010483 =/ molds=imolds (collect-simple-molds ds)
647110484 =/ globals=(list term) (weld prelude-values (weld (turn jimports |=(j=[face=term interface=ifile] face.j)) (global-value-names ds)))
647210485 =/ surs=(list term) (collect-sur-imports imports.p.parsed)
647310486 =/ marks=(list term) (collect-mark-imports imports.p.parsed)
6474− =/ env=ienv (resolve-supported-defs ds molds globals externals surs mark-externals marks jimports reserved-molds)
10487+ =/ resolution=iresolved (resolve-groups ds molds globals externals surs mark-externals marks jimports reserved-molds file prelude)
10488+ =/ cycles=(list icycle) (definite-value-cycles ds globals)
10489+ =/ env=ienv env.resolution
647510490 =/ lines=(list @t) ~
647610491 |-
647710492 ?~ ds (of-wain:format ['partial inference; module not checked' (flop lines)])
@@ -6480,21 +10495,53 @@
648010495 $(ds t.ds, lines [(show-partial-mold file src d molds) lines])
648110496 ?. (unique-value-name name.d globals)
648210497 $(ds t.ds, lines [(crip "++ {(trip name.d)}: name already in scope") lines])
6483− =/ result=iresult (infer-fragment val.d env [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ |])
10498+ =/ cycle=(list icycle) (skim cycles |=(c=icycle =(name.c name.d)))
10499+ ?^ cycle
10500+ =/ diag=idiag ["non-gate value depends on itself through a cycle" ~[[first.i.cycle "value in cycle"] [next.i.cycle "dependency in cycle"]]]
10501+ $(ds t.ds, lines [(show-inference-diagnostic file src name.d diag) lines])
10502+ ?: (lien grouped.resolution |=(n=term =(n name.d)))
10503+ =/ found=(unit ischeme) (ienv-lookup name.d env)
10504+ ?~ found $(ds t.ds, lines [(crip "++ {(trip name.d)}: recursive group unavailable") lines])
10505+ =/ typ=itype (canonical-itype typ.u.found vars.u.found)
10506+ =/ line=@t (crip "++ {(trip name.d)}: {(show-itype typ ~)}{(show-atom-constraint typ)}")
10507+ $(ds t.ds, lines [line lines])
10508+ =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
10509+ =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | file top prelude ~ 256 ~]
10510+ =. initial (reserve-def-caps val.d initial)
10511+ =/ result=iresult
10512+ ?: |(?=(%gate -.val.d) ?=(%gate-wide -.val.d))
10513+ (infer-recursive-gate d env initial)
10514+ (infer-fragment val.d env initial)
648410515 ?: ?=(%| -.result)
648510516 $(ds t.ds, lines [(show-inference-diagnostic file src name.d p.result) lines])
10517+ =. state.p.result (default-hole-numbers holes.state.p.result holes.initial state.p.result env !(itype-has-gate (itype-normalize typ.p.result sub.state.p.result)))
10518+ =/ hole=(unit idiag) (unresolved-hole holes.state.p.result holes.initial state.p.result)
10519+ ?^ hole
10520+ $(ds t.ds, lines [(show-inference-diagnostic file src name.d u.hole) lines])
10521+ =/ merged=(unit [first=icap second=icap])
10522+ (merged-capitals caps.state.p.result sub.state.p.result)
10523+ ?^ merged
10524+ =/ diag=idiag
10525+ ["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"]]]
10526+ $(ds t.ds, lines [(show-inference-diagnostic file src name.d diag) lines])
648610527 ?: (constrained-capitals caps.state.p.result sub.state.p.result)
648710528 $(ds t.ds, lines [(crip "++ {(trip name.d)}: explicit capital constraints are not supported by partial inference") lines])
648810529 =/ typ=itype (default-decimals (itype-normalize typ.p.result sub.state.p.result))
10530+ ?: (pending-null tags.state.p.result sub.state.p.result)
10531+ $(ds t.ds, lines [(crip "++ {(trip name.d)}: `~` needs context in partial inference") lines])
648910532 ?: |((pending-tags tags.state.p.result sub.state.p.result) (itype-has-tag typ))
649010533 $(ds t.ds, lines [(crip "++ {(trip name.d)}: tag needs context in partial inference") lines])
6491− ?: (itype-has-union typ)
6492− $(ds t.ds, lines [(crip "++ {(trip name.d)}: union type printing is not supported by partial inference") lines])
10534+ ?: (itype-has-hidden-recursive typ)
10535+ $(ds t.ds, lines [(crip "++ {(trip name.d)}: recursive mold name is not available in this scope") lines])
10536+ ?: (itype-has-hidden-generic typ)
10537+ $(ds t.ds, lines [(crip "++ {(trip name.d)}: generic union name is not available in this scope") lines])
649310538 ?: (unsupported-atom-vars typ caps.state.p.result binders.state.p.result sub.state.p.result)
649410539 $(ds t.ds, lines [(crip "++ {(trip name.d)}: unresolved aura-variable inference") lines])
649510540 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
649610541 ?: (gth (lent vars) 26)
649710542 $(ds t.ds, lines [(crip "++ {(trip name.d)}: too many variables for partial printer") lines])
10543+ ?~ (width-finalize projections.state.p.result sub.state.p.result vars)
10544+ $(ds t.ds, lines [(crip "++ {(trip name.d)}: record projection elaboration needs unsupported inference") lines])
649810545 =/ printable=itype (canonical-itype typ vars)
649910546 =/ line=@t (crip "++ {(trip name.d)}: {(show-itype printable ~)}{(show-atom-constraint printable)}")
650010547 $(ds t.ds, lines [line lines])
jibb-dev/lib/jibb/internal.jibbnew file+16
@@ -0,0 +1,16 @@
1+/= core /lib/jibb/primitives
2+
3+:: Representation for agent and in-process store pokes.
4+:: The prelude re-exports this mold; effect lowering and the runtime must
5+:: agree on these cells when effect execution is implemented.
6++$ poke
7+ [%agent agent=@tas mark=@tas payload=*]
8+ [%store module=@t action=@tas payload=*]
9+
10+:: The compiler supplies this private interface; execution is not yet implemented.
11+++ gth-atom |= args=[A A] (raw-gth.core args)
12+
13+:: Application paths are knot sequences.
14++$ qath
15+ ~
16+ [i=@ta t=qath]
jibb-dev/lib/jibb/prelude.jibb+138−43
@@ -1,4 +1,9 @@
1+/= internal /lib/jibb/internal
2++$ poke poke.internal
3++$ qath qath.internal
4+
15:: Initial prelude functions. The rest of the inventory is still to come.
6+
27++ same |= x=A x
38
49++ head |= p=[A B]
@@ -37,16 +42,18 @@
3742++ weld |= args=[(list A) (list A)]
3843 ?- args
3944 [xs ys]
40− ?- xs
41− ~ ys
42− [item rest] [item (weld rest ys)]
45+ ^- (list A)
46+ ?- xs
47+ ~ ys
48+ [item rest] [item (weld rest ys)]
4349
4450++ turn |= args=[(list A) $-(A B)]
4551 ?- args
4652 [xs f]
47− ?- xs
48− ~ ~
49− [item rest] [(f item) (turn rest f)]
53+ ^- (list B)
54+ ?- xs
55+ ~ ~
56+ [item rest] [(f item) (turn rest f)]
5057
5158+$ dime [p=@ta q=@]
5259
@@ -138,27 +145,34 @@
138145 (reverse-into xs ~)
139146
140147++ drop |= maybe=(unit A)
141− ?- maybe
142− ~ ~
143− [~ value] [value ~]
148+ ^- (list A)
149+ ?- maybe
150+ ~ ~
151+ [~ value] [value ~]
152+
153+++ bond |= fallback=$-(~ A)
154+ |= maybe=(unit A)
155+ ?- maybe
156+ ~ (fallback ~)
157+ [~ value] value
144158
145159++ bind |= args=[(unit A) $-(A B)]
146160 ?- args
147− [maybe f]
161+ [maybe f] ^- (unit B)
148162 ?- maybe
149163 ~ ~
150164 [~ value] `(f value)
151165
152166++ biff |= args=[(unit A) $-(A (unit B))]
153167 ?- args
154− [maybe f]
168+ [maybe f] ^- (unit B)
155169 ?- maybe
156170 ~ ~
157171 [~ value] (f value)
158172
159173++ both |= args=[(unit A) (unit B)]
160174 ?- args
161− [first second]
175+ [first second] ^- (unit [A B])
162176 ?- first
163177 ~ ~
164178 [~ a]
@@ -166,9 +180,19 @@
166180 ~ ~
167181 [~ b] `[a b]
168182
183+++ clap |= args=[(unit A) (unit A) $-([A A] A)]
184+ ?- args
185+ [first second combine] ^- (unit A)
186+ ?- first
187+ ~ second
188+ [~ a]
189+ ?- second
190+ ~ first
191+ [~ b] `(combine a b)
192+
169193++ clef |= args=[(unit A) (unit B) $-([A B] (unit C))]
170194 ?- args
171− [first second combine]
195+ [first second combine] ^- (unit C)
172196 ?- first
173197 ~ ~
174198 [~ a]
@@ -178,43 +202,45 @@
178202
179203++ skim |= args=[(list A) $-(A ?)]
180204 ?- args
181− [xs predicate]
182− ?- xs
183− ~ ~
184− [item rest]
185− ?- (predicate item)
186− %.y [item (skim rest predicate)]
187− %.n (skim rest predicate)
205+ [xs predicate] ^- (list A)
206+ ?- xs
207+ ~ ~
208+ [item rest]
209+ ?- (predicate item)
210+ %.y [item (skim rest predicate)]
211+ %.n (skim rest predicate)
188212
189213++ skip |= args=[(list A) $-(A ?)]
190214 ?- args
191− [xs predicate]
192− ?- xs
193− ~ ~
194− [item rest]
195− ?- (predicate item)
196− %.y (skip rest predicate)
197− %.n [item (skip rest predicate)]
215+ [xs predicate] ^- (list A)
216+ ?- xs
217+ ~ ~
218+ [item rest]
219+ ?- (predicate item)
220+ %.y (skip rest predicate)
221+ %.n [item (skip rest predicate)]
198222
199223++ levy |= args=[(list A) $-(A ?)]
200− ?- args
201− [xs predicate]
202− ?- xs
203− ~ %.y
204− [item rest]
205− ?- (predicate item)
206− %.y (levy rest predicate)
207− %.n %.n
224+ ^- ?
225+ ?- args
226+ [xs predicate]
227+ ?- xs
228+ ~ %.y
229+ [item rest]
230+ ?- (predicate item)
231+ %.y (levy rest predicate)
232+ %.n %.n
208233
209234++ lien |= args=[(list A) $-(A ?)]
210− ?- args
211− [xs predicate]
212− ?- xs
213− ~ %.n
214− [item rest]
215− ?- (predicate item)
216− %.y %.y
217− %.n (lien rest predicate)
235+ ^- ?
236+ ?- args
237+ [xs predicate]
238+ ?- xs
239+ ~ %.n
240+ [item rest]
241+ ?- (predicate item)
242+ %.y %.y
243+ %.n (lien rest predicate)
218244
219245++ roll |= args=[(list A) B $-([A B] B)]
220246 ?- args
@@ -229,3 +255,72 @@
229255 ?- xs
230256 ~ start
231257 [item rest] (combine item (reel rest start combine))
258+
259+++ flit |= predicate=$-(A ?)
260+ |= value=A
261+ ^- (unit A)
262+ ?- (predicate value)
263+ %.y `value
264+ %.n ~
265+
266+++ murn |= args=[(list A) $-(A (unit B))]
267+ ?- args
268+ [xs f] ^- (list B)
269+ ?- xs
270+ ~ ~
271+ [item rest]
272+ ?- (f item)
273+ ~ (murn rest f)
274+ [~ value] [value (murn rest f)]
275+
276+++ join |= args=[A (list A)]
277+ ?- args
278+ [separator xs] ^- (list A)
279+ ?- xs
280+ ~ ~
281+ [item rest]
282+ ?- rest
283+ ~ [item ~]
284+ [next more] [item [separator (join separator rest)]]
285+
286+++ snip |= xs=(list A)
287+ ^- (list A)
288+ ?- xs
289+ ~ ~
290+ [item rest]
291+ ?- rest
292+ ~ ~
293+ [next more] [item (snip rest)]
294+
295+++ rear |= xs=(list A)
296+ ?- xs
297+ ~ !!
298+ [item rest]
299+ ?- rest
300+ ~ item
301+ [next more] (rear rest)
302+
303+++ cork |= gates=[$-(A B) $-(B C)]
304+ ?- gates
305+ [f g] |= x=A (g (f x))
306+
307+++ corl |= gates=[$-(B C) $-(A B)]
308+ ?- gates
309+ [f g] |= x=A (f (g x))
310+
311+++ cury |= args=[$-([A B] C) A]
312+ ?- args
313+ [f a] |= b=B (f a b)
314+
315+++ curr |= args=[$-([A B] C) B]
316+ ?- args
317+ [f b] |= a=A (f a b)
318+
319++$ cmd |$ [M]
320+ [%poke p=poke reply=$-((unit @t) M)]
321+ [%go url=@t]
322+ [%wait gap=@dr msg=M]
323+ [%now reply=$-(@da M)]
324+ [%who reply=$-(@p M)]
325+
326+++ gth |= args=[A A] (gth-atom.internal args)
tests/clay-fixtures/ford-nested-union-bridge-expected.txtnew file+1
@@ -0,0 +1 @@
1+'partial inference; module not checked\0a++ value: $-([id=@ud value=([a=@ud b=@t] @ud)] ([a=@ud b=@t] @ud))\0a++ values: $-([title=@t values=(list @ud)] (list @ud))\0a++ chain: $-(chain.blog chain.blog)'
tests/clay-fixtures/ford-nested-union-bridge.txtnew file+14
@@ -0,0 +1,14 @@
1+=/ m (strand ,vase)
2+;< =bowl:spider bind:m get-bowl
3+=/ now=@da now.bowl
4+=/ src=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/sur/import-fixture/hoon)
5+=/ blog=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/sur/blog/hoon)
6+=/ reader=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/lib/jibb-import/hoon)
7+=/ jibb=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/lib/jibb/hoon)
8+=/ read-gate=vase (slap reader (ream 'read-named'))
9+=/ result=vase (slym read-gate [%import-fixture %nested -.src])
10+=/ sample-result=vase (slym read-gate [%import-fixture %sample -.src])
11+=/ chain-result=vase (slym read-gate [%blog %chain -.blog])
12+=/ check-gate=vase (slap jibb (ream 'golden-types-imports'))
13+=/ text=@t '/- import-fixture\0a/- blog\0a++ value |= x=nested.import-fixture value.x\0a++ values |= x=sample.import-fixture values.x\0a++ chain |= x=chain.blog x\0a'
14+(pure:m (slym check-gate [/ui/test/jibb text ~[[%import-fixture %nested +.result] [%import-fixture %sample +.sample-result] [%blog %chain +.chain-result]]]))
tests/clay-fixtures/mark-update-import-expected.txtnew file+1
@@ -0,0 +1 @@
1+"(union [added item=[id=@ud [done=(union @f:0 @f:1) text=@t]]] [toggled id=@ud])"
tests/clay-fixtures/mark-update-import.txtnew file+9
@@ -0,0 +1,9 @@
1+=/ m (strand ,vase)
2+;< =bowl:spider bind:m get-bowl
3+=/ now=@da now.bowl
4+=/ mark=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/mar/todo-update/hoon)
5+=/ reader=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/lib/jibb-import/hoon)
6+=/ read-gate=vase (slap reader (ream 'read-mark'))
7+=/ got=vase (slym read-gate [%todo-update -.mark])
8+=/ show-gate=vase (slap reader (ream 'show-result'))
9+(pure:m (slym show-gate +.got))
tests/clay-fixtures/tlon-mop-expected.txtnew file+1
@@ -0,0 +1 @@
1+[%.y %.y %.y]
tests/clay-fixtures/tlon-mop.txtnew file+20
@@ -0,0 +1,20 @@
1+=/ m (strand ,vase)
2+;< =bowl:spider bind:m get-bowl
3+=/ now=@da now.bowl
4+=/ src=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/sur/mop-tlon-probe/hoon)
5+=/ reader=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/lib/jibb-import/hoon)
6+=/ read-gate=vase (slap reader (ream 'read-named'))
7+=/ result=vase (slym read-gate [%notes %log -.src])
8+=/ recursive=vase (slym read-gate [%notes %import-node -.src])
9+=/ nested=vase (slym read-gate [%notes %a-notebook -.src])
10+=/ contains-ref
11+ |= node=*
12+ ?: =(node [%ref %notes %import-node]) &
13+ ?@ node |
14+ |($(node -.node) $(node +.node))
15+=/ contains-named
16+ |= node=*
17+ ?: ?=([%named %notes %import-node [%fork *]] node) (contains-ref node)
18+ ?@ node |
19+ |($(node -.node) $(node +.node))
20+(pure:m !>([?=([%& [%apply %mop [[%atom %da ~] [%fork *] ~]]] +.result) &(?=([%& [%fork *]] +.recursive) (contains-ref +.recursive)) &(?=([%& [%fork *]] +.nested) (contains-named +.nested))]))
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/source.jibb+1−1
@@ -10,5 +10,5 @@
1010 [%move %left n] "left {n}"
1111 [%move %right n] "right {n}"
1212 [t %draft] t
13− [t %sent at] t
13+ [t %sent sent-at] t
1414 %stop "stop"
tests/golden/doc-grammar-04-step/tokens.txt+2−2
@@ -74,8 +74,8 @@
747413:5 glyph [
757513:6 tight name t
767613:8 lit %sent
77−13:14 name at
78−13:16 tight glyph ]
77+13:14 name sent-at
78+13:21 tight glyph ]
797913:23 name t
808014:5 NEWLINE
818114:5 lit %stop
tests/golden/doc-grammar-04-step/tree.txt+1−1
@@ -33,6 +33,6 @@
3333 (cell 12:5 (bind 12:6 t) (lit 12:8 %draft))
3434 (wing 12:23 t))
3535 (arm 13:5
36− (cell 13:5 (bind 13:6 t) (lit 13:8 %sent) (bind 13:14 at))
36+ (cell 13:5 (bind 13:6 t) (lit 13:8 %sent) (bind 13:14 sent-at))
3737 (wing 13:23 t))
3838 (arm 14:5 (lit 14:5 %stop) (str 14:23 "stop")))))))
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/inline-mold-opaque/about.txt+2−2
@@ -1,3 +1,3 @@
1−source: Grammar tab, Molds: "Opaque: `poke`, `ask` and `qath`, built only by derived gates, `pure` and application-path literals."
2−tests: the opaque molds by name
1+source: Grammar tab, Molds: "`poke`, `ask` and `qath` are transparent types, defined in the internal prelude and re-exported normally; callers can construct and inspect their values."
2+tests: the effect and application-path types by name
33expect: parses
tests/golden/module-cache-incomplete/about.txt+1−1
@@ -1,4 +1,4 @@
11source: Grammar, Modules: "Everything is exported and read through the import's face"; Imports: "Import cycles are errors".
2−tests: A shared library with a generic union mold, which partial inference does not yet support, yields no interface even though one value could be inferred.
2+tests: A shared library with a recursive mold, which partial inference does not yet support, yields no interface even though one value could be inferred.
33expect: parses
44expect-types: a partial inference report
tests/golden/module-cache-incomplete/module-trees.txt+6−9
@@ -1,11 +1,8 @@
11/ui/bad.jibb
22(module
3− (mold 1:1 choice
4− (generic 1:11 A
5− (union 2:3
6− (cell 2:3
7− (const 2:4 %some)
8− (face 2:10 value (tvar 2:16 A)))
9− (const 3:3 %none))))
10− (value 4:1 id
11− (gate-wide 4:7 (bind 4:10 x) (wing 4:12 x))))
3+ (mold 1:1 recursive
4+ (cell 1:14
5+ (face 1:15 next (ref 1:20 recursive))
6+ (face 1:30 value (aura 1:36 @t))))
7+ (value 2:1 id
8+ (gate-wide 2:7 (bind 2:10 x) (wing 2:12 x))))
tests/golden/module-cache-incomplete/modules/ui/bad.jibb+1−3
@@ -1,4 +1,2 @@
1−+$ choice |$ [A]
2− [%some value=A]
3− %none
1++$ recursive [next=recursive value=@t]
42++ id |=(x x)
tests/golden/parser-hole-parameter-rejected/about.txtnew file+3
@@ -0,0 +1,3 @@
1+source: Grammar, Types and molds: `_` is an inferred type hole.
2+tests: An anonymous hole is not a named generic parameter.
3+expect: error at 1:12
tests/golden/parser-hole-parameter-rejected/source.jibbnew file+1
@@ -0,0 +1 @@
1++$ bad |$ [_] @t
tests/golden/parser-hole-parameter-rejected/tokens.txtnew file+8
@@ -0,0 +1,8 @@
1+1:1 glyph +$
2+1:4 name bad
3+1:8 glyph |$
4+1:11 glyph [
5+1:12 tight glyph _
6+1:13 tight glyph ]
7+1:15 aura @t
8+1:17 NEWLINE
tests/golden/parser-hole-parameter-rejected/tree.txtnew file+3
@@ -0,0 +1,3 @@
1+/tests/golden/parser-hole-parameter-rejected/source.jibb:1:12: expected a type variable, found `_`
2++$ bad |$ [_] @t
3+ ^
tests/golden/parser-hole-path-space/about.txtnew file+3
@@ -0,0 +1,3 @@
1+source: Grammar, Types and molds: `_` is an inferred type hole.
2+tests: A path-segment type hole must remain tight after the field's `=`.
3+expect: error at 1:14
tests/golden/parser-hole-path-space/source.jibbnew file+1
@@ -0,0 +1 @@
1++$ path /[id= _]
tests/golden/parser-hole-path-space/tokens.txtnew file+9
@@ -0,0 +1,9 @@
1+1:1 glyph +$
2+1:4 name path
3+1:9 glyph /
4+1:10 tight glyph [
5+1:11 tight name id
6+1:13 tight glyph =
7+1:15 glyph _
8+1:16 tight glyph ]
9+1:17 NEWLINE
tests/golden/parser-hole-path-space/tree.txtnew file+3
@@ -0,0 +1,3 @@
1+/tests/golden/parser-hole-path-space/source.jibb:1:14: expected an aura or type hole right after `=`, found a space
2++$ path /[id= _]
3+ ^
tests/golden/parser-hole-path/about.txtnew file+3
@@ -0,0 +1,3 @@
1+source: Grammar, Types and molds: `_` is an inferred type hole.
2+tests: Underscores in `/_` and `%/_` remain literal path knots, while `[id=_]` is a typed-segment hole.
3+expect: parses
tests/golden/parser-hole-path/source.jibbnew file+4
@@ -0,0 +1,4 @@
1++$ root /_
2++$ child /item/_x
3+++ show %/_
4++$ inferred /items/[id=_]
tests/golden/parser-hole-path/tokens.txtnew file+28
@@ -0,0 +1,28 @@
1+1:1 glyph +$
2+1:4 name root
3+1:9 glyph /
4+1:10 tight knot _
5+2:1 NEWLINE
6+2:1 glyph +$
7+2:4 name child
8+2:10 glyph /
9+2:11 tight knot item
10+2:15 tight glyph /
11+2:16 tight knot _x
12+3:1 NEWLINE
13+3:1 glyph ++
14+3:4 name show
15+3:9 glyph %/
16+3:11 tight knot _
17+4:1 NEWLINE
18+4:1 glyph +$
19+4:4 name inferred
20+4:13 glyph /
21+4:14 tight knot items
22+4:19 tight glyph /
23+4:20 tight glyph [
24+4:21 tight name id
25+4:23 tight glyph =
26+4:24 tight glyph _
27+4:25 tight glyph ]
28+4:26 NEWLINE
tests/golden/parser-hole-path/tree.txtnew file+5
@@ -0,0 +1,5 @@
1+(module
2+ (mold 1:1 root (path 1:9 /_))
3+ (mold 2:1 child (path 2:10 /item/_x))
4+ (value 3:1 show (qath 3:9 _))
5+ (mold 4:1 inferred (path 4:13 /items/[id=_])))
tests/golden/parser-hole-pattern-rejected/about.txtnew file+3
@@ -0,0 +1,3 @@
1+source: Grammar, Types and molds: `_` is an inferred type hole.
2+tests: A type hole is not a branch-pattern wildcard.
3+expect: error at 3:5
tests/golden/parser-hole-pattern-rejected/source.jibbnew file+3
@@ -0,0 +1,3 @@
1+++ bad |= x=@t
2+ ?- x
3+ _ "no"
tests/golden/parser-hole-pattern-rejected/tokens.txtnew file+15
@@ -0,0 +1,15 @@
1+1:1 glyph ++
2+1:4 name bad
3+1:8 glyph |=
4+1:11 name x
5+1:12 tight glyph =
6+1:13 tight aura @t
7+2:3 INDENT
8+2:3 glyph ?-
9+2:6 name x
10+3:5 INDENT
11+3:5 glyph _
12+3:7 str "no"
13+3:11 DEDENT
14+3:11 DEDENT
15+3:11 NEWLINE
tests/golden/parser-hole-pattern-rejected/tree.txtnew file+3
@@ -0,0 +1,3 @@
1+/tests/golden/parser-hole-pattern-rejected/source.jibb:3:5: expected a pattern, found `_`
2+ _ "no"
3+ ^
tests/golden/parser-hole-shapes/about.txtnew file+3
@@ -0,0 +1,3 @@
1+source: Grammar, Types and molds: `_` is an inferred type hole.
2+tests: Holes in samples, casts, nested records, gate molds and generic mold arguments have their own source spans.
3+expect: parses
tests/golden/parser-hole-shapes/source.jibbnew file+11
@@ -0,0 +1,11 @@
1++$ unused _
2++$ nested [a=_ b=$-(_ (list _))]
3++$ alias |$ [A] (pair A _)
4+++ identity |= x=_ x
5+++ inferred ^- _ "hello"
6+++ cast-nested |= x=[$-(_ _) (list _)] ^- [first=_ second=_] [x x]
7+++ bare-sample |= _ "hello"
8+++ cell-sample |= [a=_ b=_] [a b]
9+++ local |= x=@t
10+ ++ inside |= y=_ ^- _ y
11+ (inside x)
tests/golden/parser-hole-shapes/tokens.txtnew file+121
@@ -0,0 +1,121 @@
1+1:1 glyph +$
2+1:4 name unused
3+1:11 glyph _
4+2:1 NEWLINE
5+2:1 glyph +$
6+2:4 name nested
7+2:11 glyph [
8+2:12 tight name a
9+2:13 tight glyph =
10+2:14 tight glyph _
11+2:16 name b
12+2:17 tight glyph =
13+2:18 tight glyph $-(
14+2:21 tight glyph _
15+2:23 glyph (
16+2:24 tight name list
17+2:29 glyph _
18+2:30 tight glyph )
19+2:31 tight glyph )
20+2:32 tight glyph ]
21+3:1 NEWLINE
22+3:1 glyph +$
23+3:4 name alias
24+3:10 glyph |$
25+3:13 glyph [
26+3:14 tight tvar A
27+3:15 tight glyph ]
28+3:17 glyph (
29+3:18 tight name pair
30+3:23 tvar A
31+3:25 glyph _
32+3:26 tight glyph )
33+4:1 NEWLINE
34+4:1 glyph ++
35+4:4 name identity
36+4:13 glyph |=
37+4:16 name x
38+4:17 tight glyph =
39+4:18 tight glyph _
40+4:20 name x
41+5:1 NEWLINE
42+5:1 glyph ++
43+5:4 name inferred
44+5:13 glyph ^-
45+5:16 glyph _
46+5:18 str "hello"
47+6:1 NEWLINE
48+6:1 glyph ++
49+6:4 name cast-nested
50+6:16 glyph |=
51+6:19 name x
52+6:20 tight glyph =
53+6:21 tight glyph [
54+6:22 tight glyph $-(
55+6:25 tight glyph _
56+6:27 glyph _
57+6:28 tight glyph )
58+6:30 glyph (
59+6:31 tight name list
60+6:36 glyph _
61+6:37 tight glyph )
62+6:38 tight glyph ]
63+6:40 glyph ^-
64+6:43 glyph [
65+6:44 tight name first
66+6:49 tight glyph =
67+6:50 tight glyph _
68+6:52 name second
69+6:58 tight glyph =
70+6:59 tight glyph _
71+6:60 tight glyph ]
72+6:62 glyph [
73+6:63 tight name x
74+6:65 name x
75+6:66 tight glyph ]
76+7:1 NEWLINE
77+7:1 glyph ++
78+7:4 name bare-sample
79+7:16 glyph |=
80+7:19 glyph _
81+7:21 str "hello"
82+8:1 NEWLINE
83+8:1 glyph ++
84+8:4 name cell-sample
85+8:16 glyph |=
86+8:19 glyph [
87+8:20 tight name a
88+8:21 tight glyph =
89+8:22 tight glyph _
90+8:24 name b
91+8:25 tight glyph =
92+8:26 tight glyph _
93+8:27 tight glyph ]
94+8:29 glyph [
95+8:30 tight name a
96+8:32 name b
97+8:33 tight glyph ]
98+9:1 NEWLINE
99+9:1 glyph ++
100+9:4 name local
101+9:10 glyph |=
102+9:13 name x
103+9:14 tight glyph =
104+9:15 tight aura @t
105+10:3 INDENT
106+10:3 glyph ++
107+10:6 name inside
108+10:13 glyph |=
109+10:16 name y
110+10:17 tight glyph =
111+10:18 tight glyph _
112+10:20 glyph ^-
113+10:23 glyph _
114+10:25 name y
115+11:3 NEWLINE
116+11:3 glyph (
117+11:4 tight name inside
118+11:11 name x
119+11:12 tight glyph )
120+11:13 DEDENT
121+11:13 NEWLINE
tests/golden/parser-hole-shapes/tree.txtnew file+47
@@ -0,0 +1,47 @@
1+(module
2+ (mold 1:1 unused (hole 1:11))
3+ (mold 2:1 nested
4+ (cell 2:11
5+ (face 2:12 a (hole 2:14))
6+ (face 2:16 b
7+ (fn 2:18
8+ (hole 2:21)
9+ (apply 2:23 list (hole 2:29))))))
10+ (mold 3:1 alias
11+ (generic 3:10 A
12+ (apply 3:17 pair (tvar 3:23 A) (hole 3:25))))
13+ (value 4:1 identity
14+ (gate 4:13
15+ (face 4:16 x (hole 4:18))
16+ (wing 4:20 x)))
17+ (value 5:1 inferred
18+ (cast 5:13 (hole 5:16) (str 5:18 "hello")))
19+ (value 6:1 cast-nested
20+ (gate 6:16
21+ (face 6:19 x
22+ (cell 6:21
23+ (fn 6:22 (hole 6:25) (hole 6:27))
24+ (apply 6:30 list (hole 6:36))))
25+ (cast 6:40
26+ (cell 6:43
27+ (face 6:44 first (hole 6:50))
28+ (face 6:52 second (hole 6:59)))
29+ (tuple 6:62 (wing 6:63 x) (wing 6:65 x)))))
30+ (value 7:1 bare-sample
31+ (gate 7:16 (hole 7:19) (str 7:21 "hello")))
32+ (value 8:1 cell-sample
33+ (gate 8:16
34+ (cell 8:19
35+ (face 8:20 a (hole 8:22))
36+ (face 8:24 b (hole 8:26)))
37+ (tuple 8:29 (wing 8:30 a) (wing 8:32 b))))
38+ (value 9:1 local
39+ (gate 9:10
40+ (face 9:13 x (aura 9:15 @t))
41+ (body 10:3
42+ (value 10:3 inside
43+ (gate 10:13
44+ (face 10:16 y (hole 10:18))
45+ (cast 10:20 (hole 10:23) (wing 10:25 y))))
46+ (group 11:3
47+ (call 11:4 (wing 11:4 inside) (wing 11:11 x)))))))
tests/golden/parser-hole-value-rejected/about.txtnew file+3
@@ -0,0 +1,3 @@
1+source: Grammar, Types and molds: `_` is an inferred type hole.
2+tests: A type hole is not a value expression.
3+expect: error at 1:8
tests/golden/parser-hole-value-rejected/source.jibbnew file+1
@@ -0,0 +1 @@
1+++ bad _
tests/golden/parser-hole-value-rejected/tokens.txtnew file+4
@@ -0,0 +1,4 @@
1+1:1 glyph ++
2+1:4 name bad
3+1:8 glyph _
4+1:9 NEWLINE
tests/golden/parser-hole-value-rejected/tree.txtnew file+3
@@ -0,0 +1,3 @@
1+/tests/golden/parser-hole-value-rejected/source.jibb:1:8: expected an expression, found `_`
2+++ bad _
3+ ^
tests/golden/prelude-1c-structural/source.jibb+8−6
@@ -37,16 +37,18 @@
3737++ weld |= args=[(list A) (list A)]
3838 ?- args
3939 [xs ys]
40− ?- xs
41− ~ ys
42− [item rest] [item (weld rest ys)]
40+ ^- (list A)
41+ ?- xs
42+ ~ ys
43+ [item rest] [item (weld rest ys)]
4344
4445++ turn |= args=[(list A) $-(A B)]
4546 ?- args
4647 [xs f]
47− ?- xs
48− ~ ~
49− [item rest] [(f item) (turn rest f)]
48+ ^- (list B)
49+ ?- xs
50+ ~ ~
51+ [item rest] [(f item) (turn rest f)]
5052
5153+$ dime [p=@ta q=@]
5254
tests/golden/prelude-1c-structural/tokens.txt+454−440
@@ -190,528 +190,542 @@
19019039:9 name ys
19119139:11 tight glyph ]
19219240:7 INDENT
193−40:7 glyph ?-
194−40:10 name xs
193+40:7 glyph ^-
194+40:10 glyph (
195+40:11 tight name list
196+40:16 tvar A
197+40:17 tight glyph )
19519841:9 INDENT
196−41:9 lit ~
197−41:11 name ys
198−42:9 NEWLINE
199−42:9 glyph [
200−42:10 tight name item
201−42:15 name rest
202−42:19 tight glyph ]
203−42:21 glyph [
204−42:22 tight name item
205−42:27 glyph (
206−42:28 tight name weld
207−42:33 name rest
208−42:38 name ys
209−42:40 tight glyph )
210−42:41 tight glyph ]
211−44:1 DEDENT
212−44:1 DEDENT
213−44:1 DEDENT
214−44:1 DEDENT
215−44:1 NEWLINE
216−44:1 glyph ++
217−44:4 name turn
218−44:9 glyph |=
219−44:12 name args
220−44:16 tight glyph =
221−44:17 tight glyph [
222−44:18 tight glyph (
223−44:19 tight name list
224−44:24 tvar A
225−44:25 tight glyph )
226−44:27 glyph $-(
227−44:30 tight tvar A
228−44:32 tvar B
229−44:33 tight glyph )
230−44:34 tight glyph ]
231−45:3 INDENT
232−45:3 glyph ?-
233−45:6 name args
234−46:5 INDENT
235−46:5 glyph [
236−46:6 tight name xs
237−46:9 name f
238−46:10 tight glyph ]
239−47:7 INDENT
240−47:7 glyph ?-
241−47:10 name xs
242−48:9 INDENT
243−48:9 lit ~
244−48:11 lit ~
245−49:9 NEWLINE
246−49:9 glyph [
247−49:10 tight name item
248−49:15 name rest
249−49:19 tight glyph ]
250−49:21 glyph [
251−49:22 tight glyph (
252−49:23 tight name f
253−49:25 name item
254−49:29 tight glyph )
255−49:31 glyph (
256−49:32 tight name turn
257−49:37 name rest
258−49:42 name f
259−49:43 tight glyph )
260−49:44 tight glyph ]
261−51:1 DEDENT
262−51:1 DEDENT
263−51:1 DEDENT
264−51:1 DEDENT
265−51:1 NEWLINE
266−51:1 glyph +$
267−51:4 name dime
268−51:9 glyph [
269−51:10 tight name p
270−51:11 tight glyph =
271−51:12 tight aura @ta
272−51:16 name q
273−51:17 tight glyph =
274−51:18 tight aura @
275−51:19 tight glyph ]
199+41:9 glyph ?-
200+41:12 name xs
201+42:11 INDENT
202+42:11 lit ~
203+42:13 name ys
204+43:11 NEWLINE
205+43:11 glyph [
206+43:12 tight name item
207+43:17 name rest
208+43:21 tight glyph ]
209+43:23 glyph [
210+43:24 tight name item
211+43:29 glyph (
212+43:30 tight name weld
213+43:35 name rest
214+43:40 name ys
215+43:42 tight glyph )
216+43:43 tight glyph ]
217+45:1 DEDENT
218+45:1 DEDENT
219+45:1 DEDENT
220+45:1 DEDENT
221+45:1 DEDENT
222+45:1 NEWLINE
223+45:1 glyph ++
224+45:4 name turn
225+45:9 glyph |=
226+45:12 name args
227+45:16 tight glyph =
228+45:17 tight glyph [
229+45:18 tight glyph (
230+45:19 tight name list
231+45:24 tvar A
232+45:25 tight glyph )
233+45:27 glyph $-(
234+45:30 tight tvar A
235+45:32 tvar B
236+45:33 tight glyph )
237+45:34 tight glyph ]
238+46:3 INDENT
239+46:3 glyph ?-
240+46:6 name args
241+47:5 INDENT
242+47:5 glyph [
243+47:6 tight name xs
244+47:9 name f
245+47:10 tight glyph ]
246+48:7 INDENT
247+48:7 glyph ^-
248+48:10 glyph (
249+48:11 tight name list
250+48:16 tvar B
251+48:17 tight glyph )
252+49:9 INDENT
253+49:9 glyph ?-
254+49:12 name xs
255+50:11 INDENT
256+50:11 lit ~
257+50:13 lit ~
258+51:11 NEWLINE
259+51:11 glyph [
260+51:12 tight name item
261+51:17 name rest
262+51:21 tight glyph ]
263+51:23 glyph [
264+51:24 tight glyph (
265+51:25 tight name f
266+51:27 name item
267+51:31 tight glyph )
268+51:33 glyph (
269+51:34 tight name turn
270+51:39 name rest
271+51:44 name f
272+51:45 tight glyph )
273+51:46 tight glyph ]
274+53:1 DEDENT
275+53:1 DEDENT
276+53:1 DEDENT
277+53:1 DEDENT
278+53:1 DEDENT
27627953:1 NEWLINE
27728053:1 glyph +$
278−53:4 name hair
281+53:4 name dime
27928253:9 glyph [
28028353:10 tight name p
28128453:11 tight glyph =
282−53:12 tight aura @ud
285+53:12 tight aura @ta
28328653:16 name q
28428753:17 tight glyph =
285−53:18 tight aura @ud
286−53:21 tight glyph ]
288+53:18 tight aura @
289+53:19 tight glyph ]
28729055:1 NEWLINE
28829155:1 glyph +$
289−55:4 name pint
292+55:4 name hair
29029355:9 glyph [
29129455:10 tight name p
29229555:11 tight glyph =
293−55:12 tight glyph [
294−55:13 tight name p
295−55:14 tight glyph =
296−55:15 tight aura @
297−55:17 name q
298−55:18 tight glyph =
299−55:19 tight aura @
300−55:20 tight glyph ]
301−55:22 name q
302−55:23 tight glyph =
303−55:24 tight glyph [
304−55:25 tight name p
305−55:26 tight glyph =
306−55:27 tight aura @
307−55:29 name q
308−55:30 tight glyph =
309−55:31 tight aura @
310−55:32 tight glyph ]
311−55:33 tight glyph ]
296+55:12 tight aura @ud
297+55:16 name q
298+55:17 tight glyph =
299+55:18 tight aura @ud
300+55:21 tight glyph ]
31230157:1 NEWLINE
31330257:1 glyph +$
314−57:4 name coin
315−58:3 INDENT
316−58:3 glyph [
317−58:4 tight lit %$
318−58:7 name p
319−58:8 tight glyph =
320−58:9 tight name dime
321−58:13 tight glyph ]
322−59:3 NEWLINE
323−59:3 glyph [
324−59:4 tight lit %blob
325−59:10 name p
326−59:11 tight glyph =
327−59:12 tight glyph *
328−59:13 tight glyph ]
329−60:3 NEWLINE
303+57:4 name pint
304+57:9 glyph [
305+57:10 tight name p
306+57:11 tight glyph =
307+57:12 tight glyph [
308+57:13 tight name p
309+57:14 tight glyph =
310+57:15 tight aura @
311+57:17 name q
312+57:18 tight glyph =
313+57:19 tight aura @
314+57:20 tight glyph ]
315+57:22 name q
316+57:23 tight glyph =
317+57:24 tight glyph [
318+57:25 tight name p
319+57:26 tight glyph =
320+57:27 tight aura @
321+57:29 name q
322+57:30 tight glyph =
323+57:31 tight aura @
324+57:32 tight glyph ]
325+57:33 tight glyph ]
326+59:1 NEWLINE
327+59:1 glyph +$
328+59:4 name coin
329+60:3 INDENT
33033060:3 glyph [
331−60:4 tight lit %many
332−60:10 name p
333−60:11 tight glyph =
334−60:12 tight glyph (
335−60:13 tight name list
336−60:18 name coin
337−60:22 tight glyph )
338−60:23 tight glyph ]
339−62:1 DEDENT
340−62:1 NEWLINE
341−62:1 glyph +$
342−62:4 name pair
343−62:9 glyph |$
344−62:12 glyph [
345−62:13 tight tvar A
346−62:15 tvar B
347−62:16 tight glyph ]
348−62:18 glyph [
349−62:19 tight name p
350−62:20 tight glyph =
351−62:21 tight tvar A
352−62:23 name q
353−62:24 tight glyph =
354−62:25 tight tvar B
355−62:26 tight glyph ]
331+60:4 tight lit %$
332+60:7 name p
333+60:8 tight glyph =
334+60:9 tight name dime
335+60:13 tight glyph ]
336+61:3 NEWLINE
337+61:3 glyph [
338+61:4 tight lit %blob
339+61:10 name p
340+61:11 tight glyph =
341+61:12 tight glyph *
342+61:13 tight glyph ]
343+62:3 NEWLINE
344+62:3 glyph [
345+62:4 tight lit %many
346+62:10 name p
347+62:11 tight glyph =
348+62:12 tight glyph (
349+62:13 tight name list
350+62:18 name coin
351+62:22 tight glyph )
352+62:23 tight glyph ]
353+64:1 DEDENT
35635464:1 NEWLINE
35735564:1 glyph +$
358−64:4 name trel
356+64:4 name pair
35935764:9 glyph |$
36035864:12 glyph [
36135964:13 tight tvar A
36236064:15 tvar B
363−64:17 tvar C
364−64:18 tight glyph ]
365−64:20 glyph [
366−64:21 tight name p
367−64:22 tight glyph =
368−64:23 tight tvar A
369−64:25 name q
370−64:26 tight glyph =
371−64:27 tight tvar B
372−64:29 name r
373−64:30 tight glyph =
374−64:31 tight tvar C
375−64:32 tight glyph ]
361+64:16 tight glyph ]
362+64:18 glyph [
363+64:19 tight name p
364+64:20 tight glyph =
365+64:21 tight tvar A
366+64:23 name q
367+64:24 tight glyph =
368+64:25 tight tvar B
369+64:26 tight glyph ]
37637066:1 NEWLINE
37737166:1 glyph +$
378−66:4 name qual
372+66:4 name trel
37937366:9 glyph |$
38037466:12 glyph [
38137566:13 tight tvar A
38237666:15 tvar B
38337766:17 tvar C
384−66:19 tvar D
385−66:20 tight glyph ]
386−66:22 glyph [
387−66:23 tight name p
388−66:24 tight glyph =
389−66:25 tight tvar A
390−66:27 name q
391−66:28 tight glyph =
392−66:29 tight tvar B
393−66:31 name r
394−66:32 tight glyph =
395−66:33 tight tvar C
396−66:35 name s
397−66:36 tight glyph =
398−66:37 tight tvar D
399−66:38 tight glyph ]
378+66:18 tight glyph ]
379+66:20 glyph [
380+66:21 tight name p
381+66:22 tight glyph =
382+66:23 tight tvar A
383+66:25 name q
384+66:26 tight glyph =
385+66:27 tight tvar B
386+66:29 name r
387+66:30 tight glyph =
388+66:31 tight tvar C
389+66:32 tight glyph ]
40039068:1 NEWLINE
40139168:1 glyph +$
402−68:4 name cord
403−68:9 aura @t
392+68:4 name qual
393+68:9 glyph |$
394+68:12 glyph [
395+68:13 tight tvar A
396+68:15 tvar B
397+68:17 tvar C
398+68:19 tvar D
399+68:20 tight glyph ]
400+68:22 glyph [
401+68:23 tight name p
402+68:24 tight glyph =
403+68:25 tight tvar A
404+68:27 name q
405+68:28 tight glyph =
406+68:29 tight tvar B
407+68:31 name r
408+68:32 tight glyph =
409+68:33 tight tvar C
410+68:35 name s
411+68:36 tight glyph =
412+68:37 tight tvar D
413+68:38 tight glyph ]
40441470:1 NEWLINE
40541570:1 glyph +$
406−70:4 name knot
407−70:9 aura @ta
416+70:4 name cord
417+70:9 aura @t
40841872:1 NEWLINE
40941972:1 glyph +$
410−72:4 name tape
411−72:9 glyph (
412−72:10 tight name list
413−72:15 aura @tD
414−72:18 tight glyph )
420+72:4 name knot
421+72:9 aura @ta
41542274:1 NEWLINE
41642374:1 glyph +$
417−74:4 name path
424+74:4 name tape
41842574:9 glyph (
41942674:10 tight name list
420−74:15 name knot
421−74:19 tight glyph )
427+74:15 aura @tD
428+74:18 tight glyph )
42242976:1 NEWLINE
42343076:1 glyph +$
424−76:4 name tank
425−77:3 INDENT
426−77:3 name cord
427−78:3 NEWLINE
428−78:3 glyph [
429−78:4 tight lit %leaf
430−78:10 name p
431−78:11 tight glyph =
432−78:12 tight name tape
433−78:16 tight glyph ]
434−79:3 NEWLINE
435−79:3 glyph [
436−79:4 tight lit %palm
437−79:10 name p
438−79:11 tight glyph =
439−79:12 tight glyph (
440−79:13 tight name qual
441−79:18 name tape
442−79:23 name tape
443−79:28 name tape
444−79:33 name tape
445−79:37 tight glyph )
446−79:39 name q
447−79:40 tight glyph =
448−79:41 tight glyph (
449−79:42 tight name list
450−79:47 name tank
451−79:51 tight glyph )
452−79:52 tight glyph ]
431+76:4 name path
432+76:9 glyph (
433+76:10 tight name list
434+76:15 name knot
435+76:19 tight glyph )
436+78:1 NEWLINE
437+78:1 glyph +$
438+78:4 name tank
439+79:3 INDENT
440+79:3 name cord
45344180:3 NEWLINE
45444280:3 glyph [
455−80:4 tight lit %rose
443+80:4 tight lit %leaf
45644480:10 name p
45744580:11 tight glyph =
458−80:12 tight glyph (
459−80:13 tight name trel
460−80:18 name tape
461−80:23 name tape
462−80:28 name tape
463−80:32 tight glyph )
464−80:34 name q
465−80:35 tight glyph =
466−80:36 tight glyph (
467−80:37 tight name list
468−80:42 name tank
469−80:46 tight glyph )
470−80:47 tight glyph ]
471−82:1 DEDENT
472−82:1 NEWLINE
473−82:1 glyph +$
474−82:4 name nail
475−82:9 glyph [
476−82:10 tight name p
446+80:12 tight name tape
447+80:16 tight glyph ]
448+81:3 NEWLINE
449+81:3 glyph [
450+81:4 tight lit %palm
451+81:10 name p
452+81:11 tight glyph =
453+81:12 tight glyph (
454+81:13 tight name qual
455+81:18 name tape
456+81:23 name tape
457+81:28 name tape
458+81:33 name tape
459+81:37 tight glyph )
460+81:39 name q
461+81:40 tight glyph =
462+81:41 tight glyph (
463+81:42 tight name list
464+81:47 name tank
465+81:51 tight glyph )
466+81:52 tight glyph ]
467+82:3 NEWLINE
468+82:3 glyph [
469+82:4 tight lit %rose
470+82:10 name p
47747182:11 tight glyph =
478−82:12 tight name hair
479−82:17 name q
480−82:18 tight glyph =
481−82:19 tight name tape
482−82:23 tight glyph ]
472+82:12 tight glyph (
473+82:13 tight name trel
474+82:18 name tape
475+82:23 name tape
476+82:28 name tape
477+82:32 tight glyph )
478+82:34 name q
479+82:35 tight glyph =
480+82:36 tight glyph (
481+82:37 tight name list
482+82:42 name tank
483+82:46 tight glyph )
484+82:47 tight glyph ]
485+84:1 DEDENT
48348684:1 NEWLINE
48448784:1 glyph +$
485−84:4 name edge
488+84:4 name nail
48648984:9 glyph [
48749084:10 tight name p
48849184:11 tight glyph =
48949284:12 tight name hair
49049384:17 name q
49149484:18 tight glyph =
492−84:19 tight glyph (
493−84:20 tight name unit
494−84:25 glyph [
495−84:26 tight name p
496−84:27 tight glyph =
497−84:28 tight glyph *
498−84:30 name q
499−84:31 tight glyph =
500−84:32 tight name nail
501−84:36 tight glyph ]
502−84:37 tight glyph )
503−84:38 tight glyph ]
495+84:19 tight name tape
496+84:23 tight glyph ]
50449786:1 NEWLINE
50549886:1 glyph +$
506−86:4 name rule
507−86:9 glyph $-(
508−86:12 tight name nail
509−86:17 name edge
510−86:21 tight glyph )
499+86:4 name edge
500+86:9 glyph [
501+86:10 tight name p
502+86:11 tight glyph =
503+86:12 tight name hair
504+86:17 name q
505+86:18 tight glyph =
506+86:19 tight glyph (
507+86:20 tight name unit
508+86:25 glyph [
509+86:26 tight name p
510+86:27 tight glyph =
511+86:28 tight glyph *
512+86:30 name q
513+86:31 tight glyph =
514+86:32 tight name nail
515+86:36 tight glyph ]
516+86:37 tight glyph )
517+86:38 tight glyph ]
51151888:1 NEWLINE
51251988:1 glyph +$
513−88:4 name spot
514−88:9 glyph [
515−88:10 tight name p
516−88:11 tight glyph =
517−88:12 tight name path
518−88:17 name q
519−88:18 tight glyph =
520−88:19 tight name pint
521−88:23 tight glyph ]
520+88:4 name rule
521+88:9 glyph $-(
522+88:12 tight name nail
523+88:17 name edge
524+88:21 tight glyph )
52252590:1 NEWLINE
52352690:1 glyph +$
524−90:4 name toon
525−91:3 INDENT
526−91:3 glyph [
527−91:4 tight lit %0
528−91:7 name p
529−91:8 tight glyph =
530−91:9 tight glyph *
531−91:10 tight glyph ]
532−92:3 NEWLINE
533−92:3 glyph [
534−92:4 tight lit %1
535−92:7 name p
536−92:8 tight glyph =
537−92:9 tight glyph *
538−92:10 tight glyph ]
539−93:3 NEWLINE
527+90:4 name spot
528+90:9 glyph [
529+90:10 tight name p
530+90:11 tight glyph =
531+90:12 tight name path
532+90:17 name q
533+90:18 tight glyph =
534+90:19 tight name pint
535+90:23 tight glyph ]
536+92:1 NEWLINE
537+92:1 glyph +$
538+92:4 name toon
539+93:3 INDENT
54054093:3 glyph [
541−93:4 tight lit %2
541+93:4 tight lit %0
54254293:7 name p
54354393:8 tight glyph =
544−93:9 tight glyph (
545−93:10 tight name list
546−93:15 name tank
547−93:19 tight glyph )
548−93:20 tight glyph ]
549−95:1 DEDENT
550−95:1 NEWLINE
551−95:1 glyph +$
552−95:4 name like
553−95:9 glyph |$
554−95:12 glyph [
555−95:13 tight tvar A
556−95:14 tight glyph ]
557−95:16 glyph [
558−95:17 tight name p
559−95:18 tight glyph =
560−95:19 tight name hair
561−95:24 name q
562−95:25 tight glyph =
563−95:26 tight glyph (
564−95:27 tight name unit
565−95:32 glyph [
566−95:33 tight name p
567−95:34 tight glyph =
568−95:35 tight tvar A
569−95:37 name q
570−95:38 tight glyph =
571−95:39 tight name nail
572−95:43 tight glyph ]
573−95:44 tight glyph )
574−95:45 tight glyph ]
544+93:9 tight glyph *
545+93:10 tight glyph ]
546+94:3 NEWLINE
547+94:3 glyph [
548+94:4 tight lit %1
549+94:7 name p
550+94:8 tight glyph =
551+94:9 tight glyph *
552+94:10 tight glyph ]
553+95:3 NEWLINE
554+95:3 glyph [
555+95:4 tight lit %2
556+95:7 name p
557+95:8 tight glyph =
558+95:9 tight glyph (
559+95:10 tight name list
560+95:15 name tank
561+95:19 tight glyph )
562+95:20 tight glyph ]
563+97:1 DEDENT
57556497:1 NEWLINE
576−97:1 glyph ++
577−97:4 name wonk
578−97:9 glyph |=
579−97:12 name veq
580−97:15 tight glyph =
581−97:16 tight glyph (
582−97:17 tight name like
583−97:22 tvar A
584−97:23 tight glyph )
585−98:3 INDENT
586−98:3 glyph ?-
587−98:6 wing q.veq
588−99:5 INDENT
589−99:5 lit ~
590−99:7 glyph !!
591−100:5 NEWLINE
592−100:5 glyph [
593−100:6 tight lit ~
594−100:8 name product
595−100:15 tight glyph ]
596−100:17 wing p.product
597−102:1 DEDENT
598−102:1 DEDENT
599−102:1 NEWLINE
600−102:1 glyph +$
601−102:4 name lone
602−102:9 glyph |$
603−102:12 glyph [
604−102:13 tight tvar A
605−102:14 tight glyph ]
606−102:16 glyph [
607−102:17 tight name p
608−102:18 tight glyph =
609−102:19 tight tvar A
610−102:20 tight glyph ]
565+97:1 glyph +$
566+97:4 name like
567+97:9 glyph |$
568+97:12 glyph [
569+97:13 tight tvar A
570+97:14 tight glyph ]
571+97:16 glyph [
572+97:17 tight name p
573+97:18 tight glyph =
574+97:19 tight name hair
575+97:24 name q
576+97:25 tight glyph =
577+97:26 tight glyph (
578+97:27 tight name unit
579+97:32 glyph [
580+97:33 tight name p
581+97:34 tight glyph =
582+97:35 tight tvar A
583+97:37 name q
584+97:38 tight glyph =
585+97:39 tight name nail
586+97:43 tight glyph ]
587+97:44 tight glyph )
588+97:45 tight glyph ]
589+99:1 NEWLINE
590+99:1 glyph ++
591+99:4 name wonk
592+99:9 glyph |=
593+99:12 name veq
594+99:15 tight glyph =
595+99:16 tight glyph (
596+99:17 tight name like
597+99:22 tvar A
598+99:23 tight glyph )
599+100:3 INDENT
600+100:3 glyph ?-
601+100:6 wing q.veq
602+101:5 INDENT
603+101:5 lit ~
604+101:7 glyph !!
605+102:5 NEWLINE
606+102:5 glyph [
607+102:6 tight lit ~
608+102:8 name product
609+102:15 tight glyph ]
610+102:17 wing p.product
611+104:1 DEDENT
612+104:1 DEDENT
611613104:1 NEWLINE
612614104:1 glyph +$
613−104:4 name lest
615+104:4 name lone
614616104:9 glyph |$
615617104:12 glyph [
616618104:13 tight tvar A
617619104:14 tight glyph ]
618620104:16 glyph [
619−104:17 tight name i
621+104:17 tight name p
620622104:18 tight glyph =
621623104:19 tight tvar A
622−104:21 name t
623−104:22 tight glyph =
624−104:23 tight glyph (
625−104:24 tight name list
626−104:29 tvar A
627−104:30 tight glyph )
628−104:31 tight glyph ]
624+104:20 tight glyph ]
629625106:1 NEWLINE
630626106:1 glyph +$
631−106:4 name pole
627+106:4 name lest
632628106:9 glyph |$
633629106:12 glyph [
634630106:13 tight tvar A
635631106:14 tight glyph ]
636−107:3 INDENT
637−107:3 lit ~
638−108:3 NEWLINE
639−108:3 glyph [
640−108:4 tight tvar A
641−108:6 glyph (
642−108:7 tight name pole
643−108:12 tvar A
644−108:13 tight glyph )
632+106:16 glyph [
633+106:17 tight name i
634+106:18 tight glyph =
635+106:19 tight tvar A
636+106:21 name t
637+106:22 tight glyph =
638+106:23 tight glyph (
639+106:24 tight name list
640+106:29 tvar A
641+106:30 tight glyph )
642+106:31 tight glyph ]
643+108:1 NEWLINE
644+108:1 glyph +$
645+108:4 name pole
646+108:9 glyph |$
647+108:12 glyph [
648+108:13 tight tvar A
645649108:14 tight glyph ]
646−110:1 DEDENT
647−110:1 NEWLINE
648−110:1 glyph +$
649−110:4 name quip
650−110:9 glyph |$
651−110:12 glyph [
652−110:13 tight tvar A
653−110:15 tvar B
654−110:16 tight glyph ]
655−110:18 glyph [
656−110:19 tight glyph (
657−110:20 tight name list
658−110:25 tvar A
659−110:26 tight glyph )
660−110:28 tvar B
661−110:29 tight glyph ]
650+109:3 INDENT
651+109:3 lit ~
652+110:3 NEWLINE
653+110:3 glyph [
654+110:4 tight tvar A
655+110:6 glyph (
656+110:7 tight name pole
657+110:12 tvar A
658+110:13 tight glyph )
659+110:14 tight glyph ]
660+112:1 DEDENT
662661112:1 NEWLINE
663662112:1 glyph +$
664−112:4 name tree
663+112:4 name quip
665664112:9 glyph |$
666665112:12 glyph [
667666112:13 tight tvar A
668−112:14 tight glyph ]
669−113:3 INDENT
670−113:3 lit ~
671−114:3 NEWLINE
672−114:3 glyph [
673−114:4 tight name n
674−114:5 tight glyph =
675−114:6 tight tvar A
676−114:8 name l
677−114:9 tight glyph =
678−114:10 tight glyph (
679−114:11 tight name tree
680−114:16 tvar A
681−114:17 tight glyph )
682−114:19 name r
683−114:20 tight glyph =
684−114:21 tight glyph (
685−114:22 tight name tree
686−114:27 tvar A
687−114:28 tight glyph )
688−114:29 tight glyph ]
689−116:1 DEDENT
690−116:1 NEWLINE
691−116:1 glyph +$
692−116:4 name each
693−116:9 glyph |$
694−116:12 glyph [
695−116:13 tight tvar A
696−116:15 tvar B
697−116:16 tight glyph ]
698−117:3 INDENT
699−117:3 glyph [
700−117:4 tight lit %|
701−117:7 name p
702−117:8 tight glyph =
703−117:9 tight tvar B
704−117:10 tight glyph ]
705−118:3 NEWLINE
706−118:3 glyph [
707−118:4 tight lit %&
708−118:7 name p
709−118:8 tight glyph =
710−118:9 tight tvar A
711−118:10 tight glyph ]
712−120:1 DEDENT
713−120:1 NEWLINE
714−120:1 glyph +$
715−120:4 name bloq
716−120:9 aura @
717−120:10 NEWLINE
667+112:15 tvar B
668+112:16 tight glyph ]
669+112:18 glyph [
670+112:19 tight glyph (
671+112:20 tight name list
672+112:25 tvar A
673+112:26 tight glyph )
674+112:28 tvar B
675+112:29 tight glyph ]
676+114:1 NEWLINE
677+114:1 glyph +$
678+114:4 name tree
679+114:9 glyph |$
680+114:12 glyph [
681+114:13 tight tvar A
682+114:14 tight glyph ]
683+115:3 INDENT
684+115:3 lit ~
685+116:3 NEWLINE
686+116:3 glyph [
687+116:4 tight name n
688+116:5 tight glyph =
689+116:6 tight tvar A
690+116:8 name l
691+116:9 tight glyph =
692+116:10 tight glyph (
693+116:11 tight name tree
694+116:16 tvar A
695+116:17 tight glyph )
696+116:19 name r
697+116:20 tight glyph =
698+116:21 tight glyph (
699+116:22 tight name tree
700+116:27 tvar A
701+116:28 tight glyph )
702+116:29 tight glyph ]
703+118:1 DEDENT
704+118:1 NEWLINE
705+118:1 glyph +$
706+118:4 name each
707+118:9 glyph |$
708+118:12 glyph [
709+118:13 tight tvar A
710+118:15 tvar B
711+118:16 tight glyph ]
712+119:3 INDENT
713+119:3 glyph [
714+119:4 tight lit %|
715+119:7 name p
716+119:8 tight glyph =
717+119:9 tight tvar B
718+119:10 tight glyph ]
719+120:3 NEWLINE
720+120:3 glyph [
721+120:4 tight lit %&
722+120:7 name p
723+120:8 tight glyph =
724+120:9 tight tvar A
725+120:10 tight glyph ]
726+122:1 DEDENT
727+122:1 NEWLINE
728+122:1 glyph +$
729+122:4 name bloq
730+122:9 aura @
731+122:10 NEWLINE
tests/golden/prelude-1c-structural/tree.txt+191−185
@@ -87,198 +87,204 @@
8787 (arm 39:5
8888 (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
8989 (body 40:7
90− (branch 40:7
91− (wing 40:10 xs)
92− (arm 41:9 (lit 41:9 ~) (wing 41:11 ys))
93− (arm 42:9
94− (cell 42:9 (bind 42:10 item) (bind 42:15 rest))
95− (tuple 42:21
96− (wing 42:22 item)
97− (group 42:27
98− (call 42:28 (wing 42:28 weld) (wing 42:33 rest) (wing 42:38 ys))))))))))))
99− (value 44:1 turn
100− (gate 44:9
101− (face 44:12 args
102− (cell 44:17
103− (apply 44:18 list (tvar 44:24 A))
104− (fn 44:27 (tvar 44:30 A) (tvar 44:32 B))))
105− (body 45:3
106− (branch 45:3
107− (wing 45:6 args)
108− (arm 46:5
109− (cell 46:5 (bind 46:6 xs) (bind 46:9 f))
110− (body 47:7
111− (branch 47:7
112− (wing 47:10 xs)
113− (arm 48:9 (lit 48:9 ~) (lit 48:11 ~))
114− (arm 49:9
115− (cell 49:9 (bind 49:10 item) (bind 49:15 rest))
116− (tuple 49:21
117− (group 49:22
118− (call 49:23 (wing 49:23 f) (wing 49:25 item)))
119− (group 49:31
120− (call 49:32 (wing 49:32 turn) (wing 49:37 rest) (wing 49:42 f))))))))))))
121− (mold 51:1 dime
122− (cell 51:9
123− (face 51:10 p (aura 51:12 @ta))
124− (face 51:16 q (aura 51:18 @))))
125− (mold 53:1 hair
90+ (cast 40:7
91+ (apply 40:10 list (tvar 40:16 A))
92+ (body 41:9
93+ (branch 41:9
94+ (wing 41:12 xs)
95+ (arm 42:11 (lit 42:11 ~) (wing 42:13 ys))
96+ (arm 43:11
97+ (cell 43:11 (bind 43:12 item) (bind 43:17 rest))
98+ (tuple 43:23
99+ (wing 43:24 item)
100+ (group 43:29
101+ (call 43:30 (wing 43:30 weld) (wing 43:35 rest) (wing 43:40 ys))))))))))))))
102+ (value 45:1 turn
103+ (gate 45:9
104+ (face 45:12 args
105+ (cell 45:17
106+ (apply 45:18 list (tvar 45:24 A))
107+ (fn 45:27 (tvar 45:30 A) (tvar 45:32 B))))
108+ (body 46:3
109+ (branch 46:3
110+ (wing 46:6 args)
111+ (arm 47:5
112+ (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
113+ (body 48:7
114+ (cast 48:7
115+ (apply 48:10 list (tvar 48:16 B))
116+ (body 49:9
117+ (branch 49:9
118+ (wing 49:12 xs)
119+ (arm 50:11 (lit 50:11 ~) (lit 50:13 ~))
120+ (arm 51:11
121+ (cell 51:11 (bind 51:12 item) (bind 51:17 rest))
122+ (tuple 51:23
123+ (group 51:24
124+ (call 51:25 (wing 51:25 f) (wing 51:27 item)))
125+ (group 51:33
126+ (call 51:34 (wing 51:34 turn) (wing 51:39 rest) (wing 51:44 f))))))))))))))
127+ (mold 53:1 dime
126128 (cell 53:9
127− (face 53:10 p (aura 53:12 @ud))
128− (face 53:16 q (aura 53:18 @ud))))
129− (mold 55:1 pint
129+ (face 53:10 p (aura 53:12 @ta))
130+ (face 53:16 q (aura 53:18 @))))
131+ (mold 55:1 hair
130132 (cell 55:9
131− (face 55:10 p
132− (cell 55:12
133− (face 55:13 p (aura 55:15 @))
134− (face 55:17 q (aura 55:19 @))))
135− (face 55:22 q
136− (cell 55:24
137− (face 55:25 p (aura 55:27 @))
138− (face 55:29 q (aura 55:31 @))))))
139− (mold 57:1 coin
140− (union 58:3
141− (cell 58:3
142− (const 58:4 %$)
143− (face 58:7 p (ref 58:9 dime)))
144− (cell 59:3
145− (const 59:4 %blob)
146− (face 59:10 p (noun 59:12)))
133+ (face 55:10 p (aura 55:12 @ud))
134+ (face 55:16 q (aura 55:18 @ud))))
135+ (mold 57:1 pint
136+ (cell 57:9
137+ (face 57:10 p
138+ (cell 57:12
139+ (face 57:13 p (aura 57:15 @))
140+ (face 57:17 q (aura 57:19 @))))
141+ (face 57:22 q
142+ (cell 57:24
143+ (face 57:25 p (aura 57:27 @))
144+ (face 57:29 q (aura 57:31 @))))))
145+ (mold 59:1 coin
146+ (union 60:3
147147 (cell 60:3
148− (const 60:4 %many)
149− (face 60:10 p
150− (apply 60:12 list (ref 60:18 coin))))))
151− (mold 62:1 pair
152− (generic 62:9 A B
153− (cell 62:18
154− (face 62:19 p (tvar 62:21 A))
155− (face 62:23 q (tvar 62:25 B)))))
156− (mold 64:1 trel
157− (generic 64:9 A B C
158− (cell 64:20
159− (face 64:21 p (tvar 64:23 A))
160− (face 64:25 q (tvar 64:27 B))
161− (face 64:29 r (tvar 64:31 C)))))
162− (mold 66:1 qual
163− (generic 66:9 A B C D
164− (cell 66:22
165− (face 66:23 p (tvar 66:25 A))
166− (face 66:27 q (tvar 66:29 B))
167− (face 66:31 r (tvar 66:33 C))
168− (face 66:35 s (tvar 66:37 D)))))
169− (mold 68:1 cord (aura 68:9 @t))
170− (mold 70:1 knot (aura 70:9 @ta))
171− (mold 72:1 tape
172− (apply 72:9 list (aura 72:15 @tD)))
173− (mold 74:1 path
174− (apply 74:9 list (ref 74:15 knot)))
175− (mold 76:1 tank
176− (union 77:3
177− (ref 77:3 cord)
178− (cell 78:3
179− (const 78:4 %leaf)
180− (face 78:10 p (ref 78:12 tape)))
181− (cell 79:3
182− (const 79:4 %palm)
183− (face 79:10 p
184− (apply 79:12 qual (ref 79:18 tape) (ref 79:23 tape) (ref 79:28 tape) (ref 79:33 tape)))
185− (face 79:39 q
186− (apply 79:41 list (ref 79:47 tank))))
148+ (const 60:4 %$)
149+ (face 60:7 p (ref 60:9 dime)))
150+ (cell 61:3
151+ (const 61:4 %blob)
152+ (face 61:10 p (noun 61:12)))
153+ (cell 62:3
154+ (const 62:4 %many)
155+ (face 62:10 p
156+ (apply 62:12 list (ref 62:18 coin))))))
157+ (mold 64:1 pair
158+ (generic 64:9 A B
159+ (cell 64:18
160+ (face 64:19 p (tvar 64:21 A))
161+ (face 64:23 q (tvar 64:25 B)))))
162+ (mold 66:1 trel
163+ (generic 66:9 A B C
164+ (cell 66:20
165+ (face 66:21 p (tvar 66:23 A))
166+ (face 66:25 q (tvar 66:27 B))
167+ (face 66:29 r (tvar 66:31 C)))))
168+ (mold 68:1 qual
169+ (generic 68:9 A B C D
170+ (cell 68:22
171+ (face 68:23 p (tvar 68:25 A))
172+ (face 68:27 q (tvar 68:29 B))
173+ (face 68:31 r (tvar 68:33 C))
174+ (face 68:35 s (tvar 68:37 D)))))
175+ (mold 70:1 cord (aura 70:9 @t))
176+ (mold 72:1 knot (aura 72:9 @ta))
177+ (mold 74:1 tape
178+ (apply 74:9 list (aura 74:15 @tD)))
179+ (mold 76:1 path
180+ (apply 76:9 list (ref 76:15 knot)))
181+ (mold 78:1 tank
182+ (union 79:3
183+ (ref 79:3 cord)
187184 (cell 80:3
188− (const 80:4 %rose)
189− (face 80:10 p
190− (apply 80:12 trel (ref 80:18 tape) (ref 80:23 tape) (ref 80:28 tape)))
191− (face 80:34 q
192− (apply 80:36 list (ref 80:42 tank))))))
193− (mold 82:1 nail
194− (cell 82:9
195− (face 82:10 p (ref 82:12 hair))
196− (face 82:17 q (ref 82:19 tape))))
197− (mold 84:1 edge
185+ (const 80:4 %leaf)
186+ (face 80:10 p (ref 80:12 tape)))
187+ (cell 81:3
188+ (const 81:4 %palm)
189+ (face 81:10 p
190+ (apply 81:12 qual (ref 81:18 tape) (ref 81:23 tape) (ref 81:28 tape) (ref 81:33 tape)))
191+ (face 81:39 q
192+ (apply 81:41 list (ref 81:47 tank))))
193+ (cell 82:3
194+ (const 82:4 %rose)
195+ (face 82:10 p
196+ (apply 82:12 trel (ref 82:18 tape) (ref 82:23 tape) (ref 82:28 tape)))
197+ (face 82:34 q
198+ (apply 82:36 list (ref 82:42 tank))))))
199+ (mold 84:1 nail
198200 (cell 84:9
199201 (face 84:10 p (ref 84:12 hair))
200− (face 84:17 q
201− (apply 84:19 unit
202− (cell 84:25
203− (face 84:26 p (noun 84:28))
204− (face 84:30 q (ref 84:32 nail)))))))
205− (mold 86:1 rule
206− (fn 86:9 (ref 86:12 nail) (ref 86:17 edge)))
207− (mold 88:1 spot
208− (cell 88:9
209− (face 88:10 p (ref 88:12 path))
210− (face 88:17 q (ref 88:19 pint))))
211− (mold 90:1 toon
212− (union 91:3
213− (cell 91:3
214− (const 91:4 %0)
215− (face 91:7 p (noun 91:9)))
216− (cell 92:3
217− (const 92:4 %1)
218− (face 92:7 p (noun 92:9)))
202+ (face 84:17 q (ref 84:19 tape))))
203+ (mold 86:1 edge
204+ (cell 86:9
205+ (face 86:10 p (ref 86:12 hair))
206+ (face 86:17 q
207+ (apply 86:19 unit
208+ (cell 86:25
209+ (face 86:26 p (noun 86:28))
210+ (face 86:30 q (ref 86:32 nail)))))))
211+ (mold 88:1 rule
212+ (fn 88:9 (ref 88:12 nail) (ref 88:17 edge)))
213+ (mold 90:1 spot
214+ (cell 90:9
215+ (face 90:10 p (ref 90:12 path))
216+ (face 90:17 q (ref 90:19 pint))))
217+ (mold 92:1 toon
218+ (union 93:3
219219 (cell 93:3
220− (const 93:4 %2)
221− (face 93:7 p
222− (apply 93:9 list (ref 93:15 tank))))))
223− (mold 95:1 like
224− (generic 95:9 A
225− (cell 95:16
226− (face 95:17 p (ref 95:19 hair))
227− (face 95:24 q
228− (apply 95:26 unit
229− (cell 95:32
230− (face 95:33 p (tvar 95:35 A))
231− (face 95:37 q (ref 95:39 nail))))))))
232− (value 97:1 wonk
233− (gate 97:9
234− (face 97:12 veq
235− (apply 97:16 like (tvar 97:22 A)))
236− (body 98:3
237− (branch 98:3
238− (wing 98:6 q.veq)
239− (arm 99:5 (lit 99:5 ~) (crash 99:7))
240− (arm 100:5
241− (cell 100:5 (lit 100:6 ~) (bind 100:8 product))
242− (wing 100:17 p.product))))))
243− (mold 102:1 lone
244− (generic 102:9 A
245− (cell 102:16
246− (face 102:17 p (tvar 102:19 A)))))
247− (mold 104:1 lest
220+ (const 93:4 %0)
221+ (face 93:7 p (noun 93:9)))
222+ (cell 94:3
223+ (const 94:4 %1)
224+ (face 94:7 p (noun 94:9)))
225+ (cell 95:3
226+ (const 95:4 %2)
227+ (face 95:7 p
228+ (apply 95:9 list (ref 95:15 tank))))))
229+ (mold 97:1 like
230+ (generic 97:9 A
231+ (cell 97:16
232+ (face 97:17 p (ref 97:19 hair))
233+ (face 97:24 q
234+ (apply 97:26 unit
235+ (cell 97:32
236+ (face 97:33 p (tvar 97:35 A))
237+ (face 97:37 q (ref 97:39 nail))))))))
238+ (value 99:1 wonk
239+ (gate 99:9
240+ (face 99:12 veq
241+ (apply 99:16 like (tvar 99:22 A)))
242+ (body 100:3
243+ (branch 100:3
244+ (wing 100:6 q.veq)
245+ (arm 101:5 (lit 101:5 ~) (crash 101:7))
246+ (arm 102:5
247+ (cell 102:5 (lit 102:6 ~) (bind 102:8 product))
248+ (wing 102:17 p.product))))))
249+ (mold 104:1 lone
248250 (generic 104:9 A
249251 (cell 104:16
250− (face 104:17 i (tvar 104:19 A))
251− (face 104:21 t
252− (apply 104:23 list (tvar 104:29 A))))))
253− (mold 106:1 pole
252+ (face 104:17 p (tvar 104:19 A)))))
253+ (mold 106:1 lest
254254 (generic 106:9 A
255− (union 107:3
256− (const 107:3 ~)
257− (cell 108:3
258− (tvar 108:4 A)
259− (apply 108:6 pole (tvar 108:12 A))))))
260− (mold 110:1 quip
261− (generic 110:9 A B
262− (cell 110:18
263− (apply 110:19 list (tvar 110:25 A))
264− (tvar 110:28 B))))
265− (mold 112:1 tree
266− (generic 112:9 A
267− (union 113:3
268− (const 113:3 ~)
269− (cell 114:3
270− (face 114:4 n (tvar 114:6 A))
271− (face 114:8 l
272− (apply 114:10 tree (tvar 114:16 A)))
273− (face 114:19 r
274− (apply 114:21 tree (tvar 114:27 A)))))))
275− (mold 116:1 each
276− (generic 116:9 A B
277− (union 117:3
278− (cell 117:3
279− (const 117:4 %|)
280− (face 117:7 p (tvar 117:9 B)))
281− (cell 118:3
282− (const 118:4 %&)
283− (face 118:7 p (tvar 118:9 A))))))
284− (mold 120:1 bloq (aura 120:9 @)))
255+ (cell 106:16
256+ (face 106:17 i (tvar 106:19 A))
257+ (face 106:21 t
258+ (apply 106:23 list (tvar 106:29 A))))))
259+ (mold 108:1 pole
260+ (generic 108:9 A
261+ (union 109:3
262+ (const 109:3 ~)
263+ (cell 110:3
264+ (tvar 110:4 A)
265+ (apply 110:6 pole (tvar 110:12 A))))))
266+ (mold 112:1 quip
267+ (generic 112:9 A B
268+ (cell 112:18
269+ (apply 112:19 list (tvar 112:25 A))
270+ (tvar 112:28 B))))
271+ (mold 114:1 tree
272+ (generic 114:9 A
273+ (union 115:3
274+ (const 115:3 ~)
275+ (cell 116:3
276+ (face 116:4 n (tvar 116:6 A))
277+ (face 116:8 l
278+ (apply 116:10 tree (tvar 116:16 A)))
279+ (face 116:19 r
280+ (apply 116:21 tree (tvar 116:27 A)))))))
281+ (mold 118:1 each
282+ (generic 118:9 A B
283+ (union 119:3
284+ (cell 119:3
285+ (const 119:4 %|)
286+ (face 119:7 p (tvar 119:9 B)))
287+ (cell 120:3
288+ (const 120:4 %&)
289+ (face 120:7 p (tvar 120:9 A))))))
290+ (mold 122:1 bloq (aura 122:9 @)))
tests/golden/prelude-1c-structural/types.txt+2−2
@@ -5,8 +5,8 @@ partial inference; module not checked
55++ not: $-(? ?)
66+$ list: cases proven disjoint; mold not checked
77+$ unit: cases proven disjoint; mold not checked
8−++ fall: sample mold is not supported by partial inference
9−++ need: sample mold is not supported by partial inference
8+++ fall: $-([(unit A) A] A)
9+++ need: $-((unit A) A)
1010++ weld: sample mold is not supported by partial inference
1111++ turn: sample mold is not supported by partial inference
1212+$ dime: not checked
tests/golden/prelude-3g-basic/source.jibb+8−6
@@ -37,16 +37,18 @@
3737++ weld |= args=[(list A) (list A)]
3838 ?- args
3939 [xs ys]
40− ?- xs
41− ~ ys
42− [item rest] [item (weld rest ys)]
40+ ^- (list A)
41+ ?- xs
42+ ~ ys
43+ [item rest] [item (weld rest ys)]
4344
4445++ turn |= args=[(list A) $-(A B)]
4546 ?- args
4647 [xs f]
47− ?- xs
48− ~ ~
49− [item rest] [(f item) (turn rest f)]
48+ ^- (list B)
49+ ?- xs
50+ ~ ~
51+ [item rest] [(f item) (turn rest f)]
5052
5153+$ dime [p=@ta q=@]
5254
tests/golden/prelude-3g-basic/tokens.txt+146−132
@@ -190,151 +190,165 @@
19019039:9 name ys
19119139:11 tight glyph ]
19219240:7 INDENT
193−40:7 glyph ?-
194−40:10 name xs
193+40:7 glyph ^-
194+40:10 glyph (
195+40:11 tight name list
196+40:16 tvar A
197+40:17 tight glyph )
19519841:9 INDENT
196−41:9 lit ~
197−41:11 name ys
198−42:9 NEWLINE
199−42:9 glyph [
200−42:10 tight name item
201−42:15 name rest
202−42:19 tight glyph ]
203−42:21 glyph [
204−42:22 tight name item
205−42:27 glyph (
206−42:28 tight name weld
207−42:33 name rest
208−42:38 name ys
209−42:40 tight glyph )
210−42:41 tight glyph ]
211−44:1 DEDENT
212−44:1 DEDENT
213−44:1 DEDENT
214−44:1 DEDENT
215−44:1 NEWLINE
216−44:1 glyph ++
217−44:4 name turn
218−44:9 glyph |=
219−44:12 name args
220−44:16 tight glyph =
221−44:17 tight glyph [
222−44:18 tight glyph (
223−44:19 tight name list
224−44:24 tvar A
225−44:25 tight glyph )
226−44:27 glyph $-(
227−44:30 tight tvar A
228−44:32 tvar B
229−44:33 tight glyph )
230−44:34 tight glyph ]
231−45:3 INDENT
232−45:3 glyph ?-
233−45:6 name args
234−46:5 INDENT
235−46:5 glyph [
236−46:6 tight name xs
237−46:9 name f
238−46:10 tight glyph ]
239−47:7 INDENT
240−47:7 glyph ?-
241−47:10 name xs
242−48:9 INDENT
243−48:9 lit ~
244−48:11 lit ~
245−49:9 NEWLINE
246−49:9 glyph [
247−49:10 tight name item
248−49:15 name rest
249−49:19 tight glyph ]
250−49:21 glyph [
251−49:22 tight glyph (
252−49:23 tight name f
253−49:25 name item
254−49:29 tight glyph )
255−49:31 glyph (
256−49:32 tight name turn
257−49:37 name rest
258−49:42 name f
259−49:43 tight glyph )
260−49:44 tight glyph ]
261−51:1 DEDENT
262−51:1 DEDENT
263−51:1 DEDENT
264−51:1 DEDENT
265−51:1 NEWLINE
266−51:1 glyph +$
267−51:4 name dime
268−51:9 glyph [
269−51:10 tight name p
270−51:11 tight glyph =
271−51:12 tight aura @ta
272−51:16 name q
273−51:17 tight glyph =
274−51:18 tight aura @
275−51:19 tight glyph ]
199+41:9 glyph ?-
200+41:12 name xs
201+42:11 INDENT
202+42:11 lit ~
203+42:13 name ys
204+43:11 NEWLINE
205+43:11 glyph [
206+43:12 tight name item
207+43:17 name rest
208+43:21 tight glyph ]
209+43:23 glyph [
210+43:24 tight name item
211+43:29 glyph (
212+43:30 tight name weld
213+43:35 name rest
214+43:40 name ys
215+43:42 tight glyph )
216+43:43 tight glyph ]
217+45:1 DEDENT
218+45:1 DEDENT
219+45:1 DEDENT
220+45:1 DEDENT
221+45:1 DEDENT
222+45:1 NEWLINE
223+45:1 glyph ++
224+45:4 name turn
225+45:9 glyph |=
226+45:12 name args
227+45:16 tight glyph =
228+45:17 tight glyph [
229+45:18 tight glyph (
230+45:19 tight name list
231+45:24 tvar A
232+45:25 tight glyph )
233+45:27 glyph $-(
234+45:30 tight tvar A
235+45:32 tvar B
236+45:33 tight glyph )
237+45:34 tight glyph ]
238+46:3 INDENT
239+46:3 glyph ?-
240+46:6 name args
241+47:5 INDENT
242+47:5 glyph [
243+47:6 tight name xs
244+47:9 name f
245+47:10 tight glyph ]
246+48:7 INDENT
247+48:7 glyph ^-
248+48:10 glyph (
249+48:11 tight name list
250+48:16 tvar B
251+48:17 tight glyph )
252+49:9 INDENT
253+49:9 glyph ?-
254+49:12 name xs
255+50:11 INDENT
256+50:11 lit ~
257+50:13 lit ~
258+51:11 NEWLINE
259+51:11 glyph [
260+51:12 tight name item
261+51:17 name rest
262+51:21 tight glyph ]
263+51:23 glyph [
264+51:24 tight glyph (
265+51:25 tight name f
266+51:27 name item
267+51:31 tight glyph )
268+51:33 glyph (
269+51:34 tight name turn
270+51:39 name rest
271+51:44 name f
272+51:45 tight glyph )
273+51:46 tight glyph ]
274+53:1 DEDENT
275+53:1 DEDENT
276+53:1 DEDENT
277+53:1 DEDENT
278+53:1 DEDENT
27627953:1 NEWLINE
27728053:1 glyph +$
278−53:4 name hair
281+53:4 name dime
27928253:9 glyph [
28028353:10 tight name p
28128453:11 tight glyph =
282−53:12 tight aura @ud
285+53:12 tight aura @ta
28328653:16 name q
28428753:17 tight glyph =
285−53:18 tight aura @ud
286−53:21 tight glyph ]
288+53:18 tight aura @
289+53:19 tight glyph ]
28729055:1 NEWLINE
28829155:1 glyph +$
289−55:4 name pint
292+55:4 name hair
29029355:9 glyph [
29129455:10 tight name p
29229555:11 tight glyph =
293−55:12 tight glyph [
294−55:13 tight name p
295−55:14 tight glyph =
296−55:15 tight aura @
297−55:17 name q
298−55:18 tight glyph =
299−55:19 tight aura @
300−55:20 tight glyph ]
301−55:22 name q
302−55:23 tight glyph =
303−55:24 tight glyph [
304−55:25 tight name p
305−55:26 tight glyph =
306−55:27 tight aura @
307−55:29 name q
308−55:30 tight glyph =
309−55:31 tight aura @
310−55:32 tight glyph ]
311−55:33 tight glyph ]
296+55:12 tight aura @ud
297+55:16 name q
298+55:17 tight glyph =
299+55:18 tight aura @ud
300+55:21 tight glyph ]
31230157:1 NEWLINE
31330257:1 glyph +$
314−57:4 name coin
315−58:3 INDENT
316−58:3 glyph [
317−58:4 tight lit %$
318−58:7 name p
319−58:8 tight glyph =
320−58:9 tight name dime
321−58:13 tight glyph ]
322−59:3 NEWLINE
323−59:3 glyph [
324−59:4 tight lit %blob
325−59:10 name p
326−59:11 tight glyph =
327−59:12 tight glyph *
328−59:13 tight glyph ]
329−60:3 NEWLINE
303+57:4 name pint
304+57:9 glyph [
305+57:10 tight name p
306+57:11 tight glyph =
307+57:12 tight glyph [
308+57:13 tight name p
309+57:14 tight glyph =
310+57:15 tight aura @
311+57:17 name q
312+57:18 tight glyph =
313+57:19 tight aura @
314+57:20 tight glyph ]
315+57:22 name q
316+57:23 tight glyph =
317+57:24 tight glyph [
318+57:25 tight name p
319+57:26 tight glyph =
320+57:27 tight aura @
321+57:29 name q
322+57:30 tight glyph =
323+57:31 tight aura @
324+57:32 tight glyph ]
325+57:33 tight glyph ]
326+59:1 NEWLINE
327+59:1 glyph +$
328+59:4 name coin
329+60:3 INDENT
33033060:3 glyph [
331−60:4 tight lit %many
332−60:10 name p
333−60:11 tight glyph =
334−60:12 tight glyph (
335−60:13 tight name list
336−60:18 name coin
337−60:22 tight glyph )
338−60:23 tight glyph ]
339−60:24 DEDENT
340−60:24 NEWLINE
331+60:4 tight lit %$
332+60:7 name p
333+60:8 tight glyph =
334+60:9 tight name dime
335+60:13 tight glyph ]
336+61:3 NEWLINE
337+61:3 glyph [
338+61:4 tight lit %blob
339+61:10 name p
340+61:11 tight glyph =
341+61:12 tight glyph *
342+61:13 tight glyph ]
343+62:3 NEWLINE
344+62:3 glyph [
345+62:4 tight lit %many
346+62:10 name p
347+62:11 tight glyph =
348+62:12 tight glyph (
349+62:13 tight name list
350+62:18 name coin
351+62:22 tight glyph )
352+62:23 tight glyph ]
353+62:24 DEDENT
354+62:24 NEWLINE
tests/golden/prelude-3g-basic/tree.txt+64−58
@@ -87,64 +87,70 @@
8787 (arm 39:5
8888 (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
8989 (body 40:7
90− (branch 40:7
91− (wing 40:10 xs)
92− (arm 41:9 (lit 41:9 ~) (wing 41:11 ys))
93− (arm 42:9
94− (cell 42:9 (bind 42:10 item) (bind 42:15 rest))
95− (tuple 42:21
96− (wing 42:22 item)
97− (group 42:27
98− (call 42:28 (wing 42:28 weld) (wing 42:33 rest) (wing 42:38 ys))))))))))))
99− (value 44:1 turn
100− (gate 44:9
101− (face 44:12 args
102− (cell 44:17
103− (apply 44:18 list (tvar 44:24 A))
104− (fn 44:27 (tvar 44:30 A) (tvar 44:32 B))))
105− (body 45:3
106− (branch 45:3
107− (wing 45:6 args)
108− (arm 46:5
109− (cell 46:5 (bind 46:6 xs) (bind 46:9 f))
110− (body 47:7
111− (branch 47:7
112− (wing 47:10 xs)
113− (arm 48:9 (lit 48:9 ~) (lit 48:11 ~))
114− (arm 49:9
115− (cell 49:9 (bind 49:10 item) (bind 49:15 rest))
116− (tuple 49:21
117− (group 49:22
118− (call 49:23 (wing 49:23 f) (wing 49:25 item)))
119− (group 49:31
120− (call 49:32 (wing 49:32 turn) (wing 49:37 rest) (wing 49:42 f))))))))))))
121− (mold 51:1 dime
122− (cell 51:9
123− (face 51:10 p (aura 51:12 @ta))
124− (face 51:16 q (aura 51:18 @))))
125− (mold 53:1 hair
90+ (cast 40:7
91+ (apply 40:10 list (tvar 40:16 A))
92+ (body 41:9
93+ (branch 41:9
94+ (wing 41:12 xs)
95+ (arm 42:11 (lit 42:11 ~) (wing 42:13 ys))
96+ (arm 43:11
97+ (cell 43:11 (bind 43:12 item) (bind 43:17 rest))
98+ (tuple 43:23
99+ (wing 43:24 item)
100+ (group 43:29
101+ (call 43:30 (wing 43:30 weld) (wing 43:35 rest) (wing 43:40 ys))))))))))))))
102+ (value 45:1 turn
103+ (gate 45:9
104+ (face 45:12 args
105+ (cell 45:17
106+ (apply 45:18 list (tvar 45:24 A))
107+ (fn 45:27 (tvar 45:30 A) (tvar 45:32 B))))
108+ (body 46:3
109+ (branch 46:3
110+ (wing 46:6 args)
111+ (arm 47:5
112+ (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
113+ (body 48:7
114+ (cast 48:7
115+ (apply 48:10 list (tvar 48:16 B))
116+ (body 49:9
117+ (branch 49:9
118+ (wing 49:12 xs)
119+ (arm 50:11 (lit 50:11 ~) (lit 50:13 ~))
120+ (arm 51:11
121+ (cell 51:11 (bind 51:12 item) (bind 51:17 rest))
122+ (tuple 51:23
123+ (group 51:24
124+ (call 51:25 (wing 51:25 f) (wing 51:27 item)))
125+ (group 51:33
126+ (call 51:34 (wing 51:34 turn) (wing 51:39 rest) (wing 51:44 f))))))))))))))
127+ (mold 53:1 dime
126128 (cell 53:9
127− (face 53:10 p (aura 53:12 @ud))
128− (face 53:16 q (aura 53:18 @ud))))
129− (mold 55:1 pint
129+ (face 53:10 p (aura 53:12 @ta))
130+ (face 53:16 q (aura 53:18 @))))
131+ (mold 55:1 hair
130132 (cell 55:9
131− (face 55:10 p
132− (cell 55:12
133− (face 55:13 p (aura 55:15 @))
134− (face 55:17 q (aura 55:19 @))))
135− (face 55:22 q
136− (cell 55:24
137− (face 55:25 p (aura 55:27 @))
138− (face 55:29 q (aura 55:31 @))))))
139− (mold 57:1 coin
140− (union 58:3
141− (cell 58:3
142− (const 58:4 %$)
143− (face 58:7 p (ref 58:9 dime)))
144− (cell 59:3
145− (const 59:4 %blob)
146− (face 59:10 p (noun 59:12)))
133+ (face 55:10 p (aura 55:12 @ud))
134+ (face 55:16 q (aura 55:18 @ud))))
135+ (mold 57:1 pint
136+ (cell 57:9
137+ (face 57:10 p
138+ (cell 57:12
139+ (face 57:13 p (aura 57:15 @))
140+ (face 57:17 q (aura 57:19 @))))
141+ (face 57:22 q
142+ (cell 57:24
143+ (face 57:25 p (aura 57:27 @))
144+ (face 57:29 q (aura 57:31 @))))))
145+ (mold 59:1 coin
146+ (union 60:3
147147 (cell 60:3
148− (const 60:4 %many)
149− (face 60:10 p
150− (apply 60:12 list (ref 60:18 coin)))))))
148+ (const 60:4 %$)
149+ (face 60:7 p (ref 60:9 dime)))
150+ (cell 61:3
151+ (const 61:4 %blob)
152+ (face 61:10 p (noun 61:12)))
153+ (cell 62:3
154+ (const 62:4 %many)
155+ (face 62:10 p
156+ (apply 62:12 list (ref 62:18 coin)))))))
tests/golden/prelude-3g-basic/types.txt+2−2
@@ -5,8 +5,8 @@ partial inference; module not checked
55++ not: $-(? ?)
66+$ list: cases proven disjoint; mold not checked
77+$ unit: cases proven disjoint; mold not checked
8−++ fall: sample mold is not supported by partial inference
9−++ need: sample mold is not supported by partial inference
8+++ fall: $-([(unit A) A] A)
9+++ need: $-((unit A) A)
1010++ weld: sample mold is not supported by partial inference
1111++ turn: sample mold is not supported by partial inference
1212+$ dime: not checked
tests/golden/prelude-3g-like/source.jibb+8−6
@@ -37,16 +37,18 @@
3737++ weld |= args=[(list A) (list A)]
3838 ?- args
3939 [xs ys]
40− ?- xs
41− ~ ys
42− [item rest] [item (weld rest ys)]
40+ ^- (list A)
41+ ?- xs
42+ ~ ys
43+ [item rest] [item (weld rest ys)]
4344
4445++ turn |= args=[(list A) $-(A B)]
4546 ?- args
4647 [xs f]
47− ?- xs
48− ~ ~
49− [item rest] [(f item) (turn rest f)]
48+ ^- (list B)
49+ ?- xs
50+ ~ ~
51+ [item rest] [(f item) (turn rest f)]
5052
5153+$ dime [p=@ta q=@]
5254
tests/golden/prelude-3g-like/tokens.txt+357−343
@@ -190,410 +190,424 @@
19019039:9 name ys
19119139:11 tight glyph ]
19219240:7 INDENT
193−40:7 glyph ?-
194−40:10 name xs
193+40:7 glyph ^-
194+40:10 glyph (
195+40:11 tight name list
196+40:16 tvar A
197+40:17 tight glyph )
19519841:9 INDENT
196−41:9 lit ~
197−41:11 name ys
198−42:9 NEWLINE
199−42:9 glyph [
200−42:10 tight name item
201−42:15 name rest
202−42:19 tight glyph ]
203−42:21 glyph [
204−42:22 tight name item
205−42:27 glyph (
206−42:28 tight name weld
207−42:33 name rest
208−42:38 name ys
209−42:40 tight glyph )
210−42:41 tight glyph ]
211−44:1 DEDENT
212−44:1 DEDENT
213−44:1 DEDENT
214−44:1 DEDENT
215−44:1 NEWLINE
216−44:1 glyph ++
217−44:4 name turn
218−44:9 glyph |=
219−44:12 name args
220−44:16 tight glyph =
221−44:17 tight glyph [
222−44:18 tight glyph (
223−44:19 tight name list
224−44:24 tvar A
225−44:25 tight glyph )
226−44:27 glyph $-(
227−44:30 tight tvar A
228−44:32 tvar B
229−44:33 tight glyph )
230−44:34 tight glyph ]
231−45:3 INDENT
232−45:3 glyph ?-
233−45:6 name args
234−46:5 INDENT
235−46:5 glyph [
236−46:6 tight name xs
237−46:9 name f
238−46:10 tight glyph ]
239−47:7 INDENT
240−47:7 glyph ?-
241−47:10 name xs
242−48:9 INDENT
243−48:9 lit ~
244−48:11 lit ~
245−49:9 NEWLINE
246−49:9 glyph [
247−49:10 tight name item
248−49:15 name rest
249−49:19 tight glyph ]
250−49:21 glyph [
251−49:22 tight glyph (
252−49:23 tight name f
253−49:25 name item
254−49:29 tight glyph )
255−49:31 glyph (
256−49:32 tight name turn
257−49:37 name rest
258−49:42 name f
259−49:43 tight glyph )
260−49:44 tight glyph ]
261−51:1 DEDENT
262−51:1 DEDENT
263−51:1 DEDENT
264−51:1 DEDENT
265−51:1 NEWLINE
266−51:1 glyph +$
267−51:4 name dime
268−51:9 glyph [
269−51:10 tight name p
270−51:11 tight glyph =
271−51:12 tight aura @ta
272−51:16 name q
273−51:17 tight glyph =
274−51:18 tight aura @
275−51:19 tight glyph ]
199+41:9 glyph ?-
200+41:12 name xs
201+42:11 INDENT
202+42:11 lit ~
203+42:13 name ys
204+43:11 NEWLINE
205+43:11 glyph [
206+43:12 tight name item
207+43:17 name rest
208+43:21 tight glyph ]
209+43:23 glyph [
210+43:24 tight name item
211+43:29 glyph (
212+43:30 tight name weld
213+43:35 name rest
214+43:40 name ys
215+43:42 tight glyph )
216+43:43 tight glyph ]
217+45:1 DEDENT
218+45:1 DEDENT
219+45:1 DEDENT
220+45:1 DEDENT
221+45:1 DEDENT
222+45:1 NEWLINE
223+45:1 glyph ++
224+45:4 name turn
225+45:9 glyph |=
226+45:12 name args
227+45:16 tight glyph =
228+45:17 tight glyph [
229+45:18 tight glyph (
230+45:19 tight name list
231+45:24 tvar A
232+45:25 tight glyph )
233+45:27 glyph $-(
234+45:30 tight tvar A
235+45:32 tvar B
236+45:33 tight glyph )
237+45:34 tight glyph ]
238+46:3 INDENT
239+46:3 glyph ?-
240+46:6 name args
241+47:5 INDENT
242+47:5 glyph [
243+47:6 tight name xs
244+47:9 name f
245+47:10 tight glyph ]
246+48:7 INDENT
247+48:7 glyph ^-
248+48:10 glyph (
249+48:11 tight name list
250+48:16 tvar B
251+48:17 tight glyph )
252+49:9 INDENT
253+49:9 glyph ?-
254+49:12 name xs
255+50:11 INDENT
256+50:11 lit ~
257+50:13 lit ~
258+51:11 NEWLINE
259+51:11 glyph [
260+51:12 tight name item
261+51:17 name rest
262+51:21 tight glyph ]
263+51:23 glyph [
264+51:24 tight glyph (
265+51:25 tight name f
266+51:27 name item
267+51:31 tight glyph )
268+51:33 glyph (
269+51:34 tight name turn
270+51:39 name rest
271+51:44 name f
272+51:45 tight glyph )
273+51:46 tight glyph ]
274+53:1 DEDENT
275+53:1 DEDENT
276+53:1 DEDENT
277+53:1 DEDENT
278+53:1 DEDENT
27627953:1 NEWLINE
27728053:1 glyph +$
278−53:4 name hair
281+53:4 name dime
27928253:9 glyph [
28028353:10 tight name p
28128453:11 tight glyph =
282−53:12 tight aura @ud
285+53:12 tight aura @ta
28328653:16 name q
28428753:17 tight glyph =
285−53:18 tight aura @ud
286−53:21 tight glyph ]
288+53:18 tight aura @
289+53:19 tight glyph ]
28729055:1 NEWLINE
28829155:1 glyph +$
289−55:4 name pint
292+55:4 name hair
29029355:9 glyph [
29129455:10 tight name p
29229555:11 tight glyph =
293−55:12 tight glyph [
294−55:13 tight name p
295−55:14 tight glyph =
296−55:15 tight aura @
297−55:17 name q
298−55:18 tight glyph =
299−55:19 tight aura @
300−55:20 tight glyph ]
301−55:22 name q
302−55:23 tight glyph =
303−55:24 tight glyph [
304−55:25 tight name p
305−55:26 tight glyph =
306−55:27 tight aura @
307−55:29 name q
308−55:30 tight glyph =
309−55:31 tight aura @
310−55:32 tight glyph ]
311−55:33 tight glyph ]
296+55:12 tight aura @ud
297+55:16 name q
298+55:17 tight glyph =
299+55:18 tight aura @ud
300+55:21 tight glyph ]
31230157:1 NEWLINE
31330257:1 glyph +$
314−57:4 name coin
315−58:3 INDENT
316−58:3 glyph [
317−58:4 tight lit %$
318−58:7 name p
319−58:8 tight glyph =
320−58:9 tight name dime
321−58:13 tight glyph ]
322−59:3 NEWLINE
323−59:3 glyph [
324−59:4 tight lit %blob
325−59:10 name p
326−59:11 tight glyph =
327−59:12 tight glyph *
328−59:13 tight glyph ]
329−60:3 NEWLINE
303+57:4 name pint
304+57:9 glyph [
305+57:10 tight name p
306+57:11 tight glyph =
307+57:12 tight glyph [
308+57:13 tight name p
309+57:14 tight glyph =
310+57:15 tight aura @
311+57:17 name q
312+57:18 tight glyph =
313+57:19 tight aura @
314+57:20 tight glyph ]
315+57:22 name q
316+57:23 tight glyph =
317+57:24 tight glyph [
318+57:25 tight name p
319+57:26 tight glyph =
320+57:27 tight aura @
321+57:29 name q
322+57:30 tight glyph =
323+57:31 tight aura @
324+57:32 tight glyph ]
325+57:33 tight glyph ]
326+59:1 NEWLINE
327+59:1 glyph +$
328+59:4 name coin
329+60:3 INDENT
33033060:3 glyph [
331−60:4 tight lit %many
332−60:10 name p
333−60:11 tight glyph =
334−60:12 tight glyph (
335−60:13 tight name list
336−60:18 name coin
337−60:22 tight glyph )
338−60:23 tight glyph ]
339−62:1 DEDENT
340−62:1 NEWLINE
341−62:1 glyph +$
342−62:4 name pair
343−62:9 glyph |$
344−62:12 glyph [
345−62:13 tight tvar A
346−62:15 tvar B
347−62:16 tight glyph ]
348−62:18 glyph [
349−62:19 tight name p
350−62:20 tight glyph =
351−62:21 tight tvar A
352−62:23 name q
353−62:24 tight glyph =
354−62:25 tight tvar B
355−62:26 tight glyph ]
331+60:4 tight lit %$
332+60:7 name p
333+60:8 tight glyph =
334+60:9 tight name dime
335+60:13 tight glyph ]
336+61:3 NEWLINE
337+61:3 glyph [
338+61:4 tight lit %blob
339+61:10 name p
340+61:11 tight glyph =
341+61:12 tight glyph *
342+61:13 tight glyph ]
343+62:3 NEWLINE
344+62:3 glyph [
345+62:4 tight lit %many
346+62:10 name p
347+62:11 tight glyph =
348+62:12 tight glyph (
349+62:13 tight name list
350+62:18 name coin
351+62:22 tight glyph )
352+62:23 tight glyph ]
353+64:1 DEDENT
35635464:1 NEWLINE
35735564:1 glyph +$
358−64:4 name trel
356+64:4 name pair
35935764:9 glyph |$
36035864:12 glyph [
36135964:13 tight tvar A
36236064:15 tvar B
363−64:17 tvar C
364−64:18 tight glyph ]
365−64:20 glyph [
366−64:21 tight name p
367−64:22 tight glyph =
368−64:23 tight tvar A
369−64:25 name q
370−64:26 tight glyph =
371−64:27 tight tvar B
372−64:29 name r
373−64:30 tight glyph =
374−64:31 tight tvar C
375−64:32 tight glyph ]
361+64:16 tight glyph ]
362+64:18 glyph [
363+64:19 tight name p
364+64:20 tight glyph =
365+64:21 tight tvar A
366+64:23 name q
367+64:24 tight glyph =
368+64:25 tight tvar B
369+64:26 tight glyph ]
37637066:1 NEWLINE
37737166:1 glyph +$
378−66:4 name qual
372+66:4 name trel
37937366:9 glyph |$
38037466:12 glyph [
38137566:13 tight tvar A
38237666:15 tvar B
38337766:17 tvar C
384−66:19 tvar D
385−66:20 tight glyph ]
386−66:22 glyph [
387−66:23 tight name p
388−66:24 tight glyph =
389−66:25 tight tvar A
390−66:27 name q
391−66:28 tight glyph =
392−66:29 tight tvar B
393−66:31 name r
394−66:32 tight glyph =
395−66:33 tight tvar C
396−66:35 name s
397−66:36 tight glyph =
398−66:37 tight tvar D
399−66:38 tight glyph ]
378+66:18 tight glyph ]
379+66:20 glyph [
380+66:21 tight name p
381+66:22 tight glyph =
382+66:23 tight tvar A
383+66:25 name q
384+66:26 tight glyph =
385+66:27 tight tvar B
386+66:29 name r
387+66:30 tight glyph =
388+66:31 tight tvar C
389+66:32 tight glyph ]
40039068:1 NEWLINE
40139168:1 glyph +$
402−68:4 name cord
403−68:9 aura @t
392+68:4 name qual
393+68:9 glyph |$
394+68:12 glyph [
395+68:13 tight tvar A
396+68:15 tvar B
397+68:17 tvar C
398+68:19 tvar D
399+68:20 tight glyph ]
400+68:22 glyph [
401+68:23 tight name p
402+68:24 tight glyph =
403+68:25 tight tvar A
404+68:27 name q
405+68:28 tight glyph =
406+68:29 tight tvar B
407+68:31 name r
408+68:32 tight glyph =
409+68:33 tight tvar C
410+68:35 name s
411+68:36 tight glyph =
412+68:37 tight tvar D
413+68:38 tight glyph ]
40441470:1 NEWLINE
40541570:1 glyph +$
406−70:4 name knot
407−70:9 aura @ta
416+70:4 name cord
417+70:9 aura @t
40841872:1 NEWLINE
40941972:1 glyph +$
410−72:4 name tape
411−72:9 glyph (
412−72:10 tight name list
413−72:15 aura @tD
414−72:18 tight glyph )
420+72:4 name knot
421+72:9 aura @ta
41542274:1 NEWLINE
41642374:1 glyph +$
417−74:4 name path
424+74:4 name tape
41842574:9 glyph (
41942674:10 tight name list
420−74:15 name knot
421−74:19 tight glyph )
427+74:15 aura @tD
428+74:18 tight glyph )
42242976:1 NEWLINE
42343076:1 glyph +$
424−76:4 name tank
425−77:3 INDENT
426−77:3 name cord
427−78:3 NEWLINE
428−78:3 glyph [
429−78:4 tight lit %leaf
430−78:10 name p
431−78:11 tight glyph =
432−78:12 tight name tape
433−78:16 tight glyph ]
434−79:3 NEWLINE
435−79:3 glyph [
436−79:4 tight lit %palm
437−79:10 name p
438−79:11 tight glyph =
439−79:12 tight glyph (
440−79:13 tight name qual
441−79:18 name tape
442−79:23 name tape
443−79:28 name tape
444−79:33 name tape
445−79:37 tight glyph )
446−79:39 name q
447−79:40 tight glyph =
448−79:41 tight glyph (
449−79:42 tight name list
450−79:47 name tank
451−79:51 tight glyph )
452−79:52 tight glyph ]
431+76:4 name path
432+76:9 glyph (
433+76:10 tight name list
434+76:15 name knot
435+76:19 tight glyph )
436+78:1 NEWLINE
437+78:1 glyph +$
438+78:4 name tank
439+79:3 INDENT
440+79:3 name cord
45344180:3 NEWLINE
45444280:3 glyph [
455−80:4 tight lit %rose
443+80:4 tight lit %leaf
45644480:10 name p
45744580:11 tight glyph =
458−80:12 tight glyph (
459−80:13 tight name trel
460−80:18 name tape
461−80:23 name tape
462−80:28 name tape
463−80:32 tight glyph )
464−80:34 name q
465−80:35 tight glyph =
466−80:36 tight glyph (
467−80:37 tight name list
468−80:42 name tank
469−80:46 tight glyph )
470−80:47 tight glyph ]
471−82:1 DEDENT
472−82:1 NEWLINE
473−82:1 glyph +$
474−82:4 name nail
475−82:9 glyph [
476−82:10 tight name p
446+80:12 tight name tape
447+80:16 tight glyph ]
448+81:3 NEWLINE
449+81:3 glyph [
450+81:4 tight lit %palm
451+81:10 name p
452+81:11 tight glyph =
453+81:12 tight glyph (
454+81:13 tight name qual
455+81:18 name tape
456+81:23 name tape
457+81:28 name tape
458+81:33 name tape
459+81:37 tight glyph )
460+81:39 name q
461+81:40 tight glyph =
462+81:41 tight glyph (
463+81:42 tight name list
464+81:47 name tank
465+81:51 tight glyph )
466+81:52 tight glyph ]
467+82:3 NEWLINE
468+82:3 glyph [
469+82:4 tight lit %rose
470+82:10 name p
47747182:11 tight glyph =
478−82:12 tight name hair
479−82:17 name q
480−82:18 tight glyph =
481−82:19 tight name tape
482−82:23 tight glyph ]
472+82:12 tight glyph (
473+82:13 tight name trel
474+82:18 name tape
475+82:23 name tape
476+82:28 name tape
477+82:32 tight glyph )
478+82:34 name q
479+82:35 tight glyph =
480+82:36 tight glyph (
481+82:37 tight name list
482+82:42 name tank
483+82:46 tight glyph )
484+82:47 tight glyph ]
485+84:1 DEDENT
48348684:1 NEWLINE
48448784:1 glyph +$
485−84:4 name edge
488+84:4 name nail
48648984:9 glyph [
48749084:10 tight name p
48849184:11 tight glyph =
48949284:12 tight name hair
49049384:17 name q
49149484:18 tight glyph =
492−84:19 tight glyph (
493−84:20 tight name unit
494−84:25 glyph [
495−84:26 tight name p
496−84:27 tight glyph =
497−84:28 tight glyph *
498−84:30 name q
499−84:31 tight glyph =
500−84:32 tight name nail
501−84:36 tight glyph ]
502−84:37 tight glyph )
503−84:38 tight glyph ]
495+84:19 tight name tape
496+84:23 tight glyph ]
50449786:1 NEWLINE
50549886:1 glyph +$
506−86:4 name rule
507−86:9 glyph $-(
508−86:12 tight name nail
509−86:17 name edge
510−86:21 tight glyph )
499+86:4 name edge
500+86:9 glyph [
501+86:10 tight name p
502+86:11 tight glyph =
503+86:12 tight name hair
504+86:17 name q
505+86:18 tight glyph =
506+86:19 tight glyph (
507+86:20 tight name unit
508+86:25 glyph [
509+86:26 tight name p
510+86:27 tight glyph =
511+86:28 tight glyph *
512+86:30 name q
513+86:31 tight glyph =
514+86:32 tight name nail
515+86:36 tight glyph ]
516+86:37 tight glyph )
517+86:38 tight glyph ]
51151888:1 NEWLINE
51251988:1 glyph +$
513−88:4 name spot
514−88:9 glyph [
515−88:10 tight name p
516−88:11 tight glyph =
517−88:12 tight name path
518−88:17 name q
519−88:18 tight glyph =
520−88:19 tight name pint
521−88:23 tight glyph ]
520+88:4 name rule
521+88:9 glyph $-(
522+88:12 tight name nail
523+88:17 name edge
524+88:21 tight glyph )
52252590:1 NEWLINE
52352690:1 glyph +$
524−90:4 name toon
525−91:3 INDENT
526−91:3 glyph [
527−91:4 tight lit %0
528−91:7 name p
529−91:8 tight glyph =
530−91:9 tight glyph *
531−91:10 tight glyph ]
532−92:3 NEWLINE
533−92:3 glyph [
534−92:4 tight lit %1
535−92:7 name p
536−92:8 tight glyph =
537−92:9 tight glyph *
538−92:10 tight glyph ]
539−93:3 NEWLINE
527+90:4 name spot
528+90:9 glyph [
529+90:10 tight name p
530+90:11 tight glyph =
531+90:12 tight name path
532+90:17 name q
533+90:18 tight glyph =
534+90:19 tight name pint
535+90:23 tight glyph ]
536+92:1 NEWLINE
537+92:1 glyph +$
538+92:4 name toon
539+93:3 INDENT
54054093:3 glyph [
541−93:4 tight lit %2
541+93:4 tight lit %0
54254293:7 name p
54354393:8 tight glyph =
544−93:9 tight glyph (
545−93:10 tight name list
546−93:15 name tank
547−93:19 tight glyph )
548−93:20 tight glyph ]
549−95:1 DEDENT
550−95:1 NEWLINE
551−95:1 glyph +$
552−95:4 name like
553−95:9 glyph |$
554−95:12 glyph [
555−95:13 tight tvar A
556−95:14 tight glyph ]
557−95:16 glyph [
558−95:17 tight name p
559−95:18 tight glyph =
560−95:19 tight name hair
561−95:24 name q
562−95:25 tight glyph =
563−95:26 tight glyph (
564−95:27 tight name unit
565−95:32 glyph [
566−95:33 tight name p
567−95:34 tight glyph =
568−95:35 tight tvar A
569−95:37 name q
570−95:38 tight glyph =
571−95:39 tight name nail
572−95:43 tight glyph ]
573−95:44 tight glyph )
574−95:45 tight glyph ]
544+93:9 tight glyph *
545+93:10 tight glyph ]
546+94:3 NEWLINE
547+94:3 glyph [
548+94:4 tight lit %1
549+94:7 name p
550+94:8 tight glyph =
551+94:9 tight glyph *
552+94:10 tight glyph ]
553+95:3 NEWLINE
554+95:3 glyph [
555+95:4 tight lit %2
556+95:7 name p
557+95:8 tight glyph =
558+95:9 tight glyph (
559+95:10 tight name list
560+95:15 name tank
561+95:19 tight glyph )
562+95:20 tight glyph ]
563+97:1 DEDENT
57556497:1 NEWLINE
576−97:1 glyph ++
577−97:4 name wonk
578−97:9 glyph |=
579−97:12 name veq
580−97:15 tight glyph =
581−97:16 tight glyph (
582−97:17 tight name like
583−97:22 tvar A
584−97:23 tight glyph )
585−98:3 INDENT
586−98:3 glyph ?-
587−98:6 wing q.veq
588−99:5 INDENT
589−99:5 lit ~
590−99:7 glyph !!
591−100:5 NEWLINE
592−100:5 glyph [
593−100:6 tight lit ~
594−100:8 name product
595−100:15 tight glyph ]
596−100:17 wing p.product
597−100:26 DEDENT
598−100:26 DEDENT
599−100:26 NEWLINE
565+97:1 glyph +$
566+97:4 name like
567+97:9 glyph |$
568+97:12 glyph [
569+97:13 tight tvar A
570+97:14 tight glyph ]
571+97:16 glyph [
572+97:17 tight name p
573+97:18 tight glyph =
574+97:19 tight name hair
575+97:24 name q
576+97:25 tight glyph =
577+97:26 tight glyph (
578+97:27 tight name unit
579+97:32 glyph [
580+97:33 tight name p
581+97:34 tight glyph =
582+97:35 tight tvar A
583+97:37 name q
584+97:38 tight glyph =
585+97:39 tight name nail
586+97:43 tight glyph ]
587+97:44 tight glyph )
588+97:45 tight glyph ]
589+99:1 NEWLINE
590+99:1 glyph ++
591+99:4 name wonk
592+99:9 glyph |=
593+99:12 name veq
594+99:15 tight glyph =
595+99:16 tight glyph (
596+99:17 tight name like
597+99:22 tvar A
598+99:23 tight glyph )
599+100:3 INDENT
600+100:3 glyph ?-
601+100:6 wing q.veq
602+101:5 INDENT
603+101:5 lit ~
604+101:7 glyph !!
605+102:5 NEWLINE
606+102:5 glyph [
607+102:6 tight lit ~
608+102:8 name product
609+102:15 tight glyph ]
610+102:17 wing p.product
611+102:26 DEDENT
612+102:26 DEDENT
613+102:26 NEWLINE
tests/golden/prelude-3g-like/tree.txt+152−146
@@ -87,156 +87,162 @@
8787 (arm 39:5
8888 (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
8989 (body 40:7
90− (branch 40:7
91− (wing 40:10 xs)
92− (arm 41:9 (lit 41:9 ~) (wing 41:11 ys))
93− (arm 42:9
94− (cell 42:9 (bind 42:10 item) (bind 42:15 rest))
95− (tuple 42:21
96− (wing 42:22 item)
97− (group 42:27
98− (call 42:28 (wing 42:28 weld) (wing 42:33 rest) (wing 42:38 ys))))))))))))
99− (value 44:1 turn
100− (gate 44:9
101− (face 44:12 args
102− (cell 44:17
103− (apply 44:18 list (tvar 44:24 A))
104− (fn 44:27 (tvar 44:30 A) (tvar 44:32 B))))
105− (body 45:3
106− (branch 45:3
107− (wing 45:6 args)
108− (arm 46:5
109− (cell 46:5 (bind 46:6 xs) (bind 46:9 f))
110− (body 47:7
111− (branch 47:7
112− (wing 47:10 xs)
113− (arm 48:9 (lit 48:9 ~) (lit 48:11 ~))
114− (arm 49:9
115− (cell 49:9 (bind 49:10 item) (bind 49:15 rest))
116− (tuple 49:21
117− (group 49:22
118− (call 49:23 (wing 49:23 f) (wing 49:25 item)))
119− (group 49:31
120− (call 49:32 (wing 49:32 turn) (wing 49:37 rest) (wing 49:42 f))))))))))))
121− (mold 51:1 dime
122− (cell 51:9
123− (face 51:10 p (aura 51:12 @ta))
124− (face 51:16 q (aura 51:18 @))))
125− (mold 53:1 hair
90+ (cast 40:7
91+ (apply 40:10 list (tvar 40:16 A))
92+ (body 41:9
93+ (branch 41:9
94+ (wing 41:12 xs)
95+ (arm 42:11 (lit 42:11 ~) (wing 42:13 ys))
96+ (arm 43:11
97+ (cell 43:11 (bind 43:12 item) (bind 43:17 rest))
98+ (tuple 43:23
99+ (wing 43:24 item)
100+ (group 43:29
101+ (call 43:30 (wing 43:30 weld) (wing 43:35 rest) (wing 43:40 ys))))))))))))))
102+ (value 45:1 turn
103+ (gate 45:9
104+ (face 45:12 args
105+ (cell 45:17
106+ (apply 45:18 list (tvar 45:24 A))
107+ (fn 45:27 (tvar 45:30 A) (tvar 45:32 B))))
108+ (body 46:3
109+ (branch 46:3
110+ (wing 46:6 args)
111+ (arm 47:5
112+ (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
113+ (body 48:7
114+ (cast 48:7
115+ (apply 48:10 list (tvar 48:16 B))
116+ (body 49:9
117+ (branch 49:9
118+ (wing 49:12 xs)
119+ (arm 50:11 (lit 50:11 ~) (lit 50:13 ~))
120+ (arm 51:11
121+ (cell 51:11 (bind 51:12 item) (bind 51:17 rest))
122+ (tuple 51:23
123+ (group 51:24
124+ (call 51:25 (wing 51:25 f) (wing 51:27 item)))
125+ (group 51:33
126+ (call 51:34 (wing 51:34 turn) (wing 51:39 rest) (wing 51:44 f))))))))))))))
127+ (mold 53:1 dime
126128 (cell 53:9
127− (face 53:10 p (aura 53:12 @ud))
128− (face 53:16 q (aura 53:18 @ud))))
129− (mold 55:1 pint
129+ (face 53:10 p (aura 53:12 @ta))
130+ (face 53:16 q (aura 53:18 @))))
131+ (mold 55:1 hair
130132 (cell 55:9
131− (face 55:10 p
132− (cell 55:12
133− (face 55:13 p (aura 55:15 @))
134− (face 55:17 q (aura 55:19 @))))
135− (face 55:22 q
136− (cell 55:24
137− (face 55:25 p (aura 55:27 @))
138− (face 55:29 q (aura 55:31 @))))))
139− (mold 57:1 coin
140− (union 58:3
141− (cell 58:3
142− (const 58:4 %$)
143− (face 58:7 p (ref 58:9 dime)))
144− (cell 59:3
145− (const 59:4 %blob)
146− (face 59:10 p (noun 59:12)))
133+ (face 55:10 p (aura 55:12 @ud))
134+ (face 55:16 q (aura 55:18 @ud))))
135+ (mold 57:1 pint
136+ (cell 57:9
137+ (face 57:10 p
138+ (cell 57:12
139+ (face 57:13 p (aura 57:15 @))
140+ (face 57:17 q (aura 57:19 @))))
141+ (face 57:22 q
142+ (cell 57:24
143+ (face 57:25 p (aura 57:27 @))
144+ (face 57:29 q (aura 57:31 @))))))
145+ (mold 59:1 coin
146+ (union 60:3
147147 (cell 60:3
148− (const 60:4 %many)
149− (face 60:10 p
150− (apply 60:12 list (ref 60:18 coin))))))
151− (mold 62:1 pair
152− (generic 62:9 A B
153− (cell 62:18
154− (face 62:19 p (tvar 62:21 A))
155− (face 62:23 q (tvar 62:25 B)))))
156− (mold 64:1 trel
157− (generic 64:9 A B C
158− (cell 64:20
159− (face 64:21 p (tvar 64:23 A))
160− (face 64:25 q (tvar 64:27 B))
161− (face 64:29 r (tvar 64:31 C)))))
162− (mold 66:1 qual
163− (generic 66:9 A B C D
164− (cell 66:22
165− (face 66:23 p (tvar 66:25 A))
166− (face 66:27 q (tvar 66:29 B))
167− (face 66:31 r (tvar 66:33 C))
168− (face 66:35 s (tvar 66:37 D)))))
169− (mold 68:1 cord (aura 68:9 @t))
170− (mold 70:1 knot (aura 70:9 @ta))
171− (mold 72:1 tape
172− (apply 72:9 list (aura 72:15 @tD)))
173− (mold 74:1 path
174− (apply 74:9 list (ref 74:15 knot)))
175− (mold 76:1 tank
176− (union 77:3
177− (ref 77:3 cord)
178− (cell 78:3
179− (const 78:4 %leaf)
180− (face 78:10 p (ref 78:12 tape)))
181− (cell 79:3
182− (const 79:4 %palm)
183− (face 79:10 p
184− (apply 79:12 qual (ref 79:18 tape) (ref 79:23 tape) (ref 79:28 tape) (ref 79:33 tape)))
185− (face 79:39 q
186− (apply 79:41 list (ref 79:47 tank))))
148+ (const 60:4 %$)
149+ (face 60:7 p (ref 60:9 dime)))
150+ (cell 61:3
151+ (const 61:4 %blob)
152+ (face 61:10 p (noun 61:12)))
153+ (cell 62:3
154+ (const 62:4 %many)
155+ (face 62:10 p
156+ (apply 62:12 list (ref 62:18 coin))))))
157+ (mold 64:1 pair
158+ (generic 64:9 A B
159+ (cell 64:18
160+ (face 64:19 p (tvar 64:21 A))
161+ (face 64:23 q (tvar 64:25 B)))))
162+ (mold 66:1 trel
163+ (generic 66:9 A B C
164+ (cell 66:20
165+ (face 66:21 p (tvar 66:23 A))
166+ (face 66:25 q (tvar 66:27 B))
167+ (face 66:29 r (tvar 66:31 C)))))
168+ (mold 68:1 qual
169+ (generic 68:9 A B C D
170+ (cell 68:22
171+ (face 68:23 p (tvar 68:25 A))
172+ (face 68:27 q (tvar 68:29 B))
173+ (face 68:31 r (tvar 68:33 C))
174+ (face 68:35 s (tvar 68:37 D)))))
175+ (mold 70:1 cord (aura 70:9 @t))
176+ (mold 72:1 knot (aura 72:9 @ta))
177+ (mold 74:1 tape
178+ (apply 74:9 list (aura 74:15 @tD)))
179+ (mold 76:1 path
180+ (apply 76:9 list (ref 76:15 knot)))
181+ (mold 78:1 tank
182+ (union 79:3
183+ (ref 79:3 cord)
187184 (cell 80:3
188− (const 80:4 %rose)
189− (face 80:10 p
190− (apply 80:12 trel (ref 80:18 tape) (ref 80:23 tape) (ref 80:28 tape)))
191− (face 80:34 q
192− (apply 80:36 list (ref 80:42 tank))))))
193− (mold 82:1 nail
194− (cell 82:9
195− (face 82:10 p (ref 82:12 hair))
196− (face 82:17 q (ref 82:19 tape))))
197− (mold 84:1 edge
185+ (const 80:4 %leaf)
186+ (face 80:10 p (ref 80:12 tape)))
187+ (cell 81:3
188+ (const 81:4 %palm)
189+ (face 81:10 p
190+ (apply 81:12 qual (ref 81:18 tape) (ref 81:23 tape) (ref 81:28 tape) (ref 81:33 tape)))
191+ (face 81:39 q
192+ (apply 81:41 list (ref 81:47 tank))))
193+ (cell 82:3
194+ (const 82:4 %rose)
195+ (face 82:10 p
196+ (apply 82:12 trel (ref 82:18 tape) (ref 82:23 tape) (ref 82:28 tape)))
197+ (face 82:34 q
198+ (apply 82:36 list (ref 82:42 tank))))))
199+ (mold 84:1 nail
198200 (cell 84:9
199201 (face 84:10 p (ref 84:12 hair))
200− (face 84:17 q
201− (apply 84:19 unit
202− (cell 84:25
203− (face 84:26 p (noun 84:28))
204− (face 84:30 q (ref 84:32 nail)))))))
205− (mold 86:1 rule
206− (fn 86:9 (ref 86:12 nail) (ref 86:17 edge)))
207− (mold 88:1 spot
208− (cell 88:9
209− (face 88:10 p (ref 88:12 path))
210− (face 88:17 q (ref 88:19 pint))))
211− (mold 90:1 toon
212− (union 91:3
213− (cell 91:3
214− (const 91:4 %0)
215− (face 91:7 p (noun 91:9)))
216− (cell 92:3
217− (const 92:4 %1)
218− (face 92:7 p (noun 92:9)))
202+ (face 84:17 q (ref 84:19 tape))))
203+ (mold 86:1 edge
204+ (cell 86:9
205+ (face 86:10 p (ref 86:12 hair))
206+ (face 86:17 q
207+ (apply 86:19 unit
208+ (cell 86:25
209+ (face 86:26 p (noun 86:28))
210+ (face 86:30 q (ref 86:32 nail)))))))
211+ (mold 88:1 rule
212+ (fn 88:9 (ref 88:12 nail) (ref 88:17 edge)))
213+ (mold 90:1 spot
214+ (cell 90:9
215+ (face 90:10 p (ref 90:12 path))
216+ (face 90:17 q (ref 90:19 pint))))
217+ (mold 92:1 toon
218+ (union 93:3
219219 (cell 93:3
220− (const 93:4 %2)
221− (face 93:7 p
222− (apply 93:9 list (ref 93:15 tank))))))
223− (mold 95:1 like
224− (generic 95:9 A
225− (cell 95:16
226− (face 95:17 p (ref 95:19 hair))
227− (face 95:24 q
228− (apply 95:26 unit
229− (cell 95:32
230− (face 95:33 p (tvar 95:35 A))
231− (face 95:37 q (ref 95:39 nail))))))))
232− (value 97:1 wonk
233− (gate 97:9
234− (face 97:12 veq
235− (apply 97:16 like (tvar 97:22 A)))
236− (body 98:3
237− (branch 98:3
238− (wing 98:6 q.veq)
239− (arm 99:5 (lit 99:5 ~) (crash 99:7))
240− (arm 100:5
241− (cell 100:5 (lit 100:6 ~) (bind 100:8 product))
242− (wing 100:17 p.product)))))))
220+ (const 93:4 %0)
221+ (face 93:7 p (noun 93:9)))
222+ (cell 94:3
223+ (const 94:4 %1)
224+ (face 94:7 p (noun 94:9)))
225+ (cell 95:3
226+ (const 95:4 %2)
227+ (face 95:7 p
228+ (apply 95:9 list (ref 95:15 tank))))))
229+ (mold 97:1 like
230+ (generic 97:9 A
231+ (cell 97:16
232+ (face 97:17 p (ref 97:19 hair))
233+ (face 97:24 q
234+ (apply 97:26 unit
235+ (cell 97:32
236+ (face 97:33 p (tvar 97:35 A))
237+ (face 97:37 q (ref 97:39 nail))))))))
238+ (value 99:1 wonk
239+ (gate 99:9
240+ (face 99:12 veq
241+ (apply 99:16 like (tvar 99:22 A)))
242+ (body 100:3
243+ (branch 100:3
244+ (wing 100:6 q.veq)
245+ (arm 101:5 (lit 101:5 ~) (crash 101:7))
246+ (arm 102:5
247+ (cell 102:5 (lit 102:6 ~) (bind 102:8 product))
248+ (wing 102:17 p.product)))))))
tests/golden/prelude-3g-like/types.txt+2−2
@@ -5,8 +5,8 @@ partial inference; module not checked
55++ not: $-(? ?)
66+$ list: cases proven disjoint; mold not checked
77+$ unit: cases proven disjoint; mold not checked
8−++ fall: sample mold is not supported by partial inference
9−++ need: sample mold is not supported by partial inference
8+++ fall: $-([(unit A) A] A)
9+++ need: $-((unit A) A)
1010++ weld: sample mold is not supported by partial inference
1111++ turn: sample mold is not supported by partial inference
1212+$ dime: not checked
tests/golden/prelude-3g-structural/source.jibb+8−6
@@ -37,16 +37,18 @@
3737++ weld |= args=[(list A) (list A)]
3838 ?- args
3939 [xs ys]
40− ?- xs
41− ~ ys
42− [item rest] [item (weld rest ys)]
40+ ^- (list A)
41+ ?- xs
42+ ~ ys
43+ [item rest] [item (weld rest ys)]
4344
4445++ turn |= args=[(list A) $-(A B)]
4546 ?- args
4647 [xs f]
47− ?- xs
48− ~ ~
49− [item rest] [(f item) (turn rest f)]
48+ ^- (list B)
49+ ?- xs
50+ ~ ~
51+ [item rest] [(f item) (turn rest f)]
5052
5153+$ dime [p=@ta q=@]
5254
tests/golden/prelude-3g-structural/tokens.txt+309−295
@@ -190,361 +190,375 @@
19019039:9 name ys
19119139:11 tight glyph ]
19219240:7 INDENT
193−40:7 glyph ?-
194−40:10 name xs
193+40:7 glyph ^-
194+40:10 glyph (
195+40:11 tight name list
196+40:16 tvar A
197+40:17 tight glyph )
19519841:9 INDENT
196−41:9 lit ~
197−41:11 name ys
198−42:9 NEWLINE
199−42:9 glyph [
200−42:10 tight name item
201−42:15 name rest
202−42:19 tight glyph ]
203−42:21 glyph [
204−42:22 tight name item
205−42:27 glyph (
206−42:28 tight name weld
207−42:33 name rest
208−42:38 name ys
209−42:40 tight glyph )
210−42:41 tight glyph ]
211−44:1 DEDENT
212−44:1 DEDENT
213−44:1 DEDENT
214−44:1 DEDENT
215−44:1 NEWLINE
216−44:1 glyph ++
217−44:4 name turn
218−44:9 glyph |=
219−44:12 name args
220−44:16 tight glyph =
221−44:17 tight glyph [
222−44:18 tight glyph (
223−44:19 tight name list
224−44:24 tvar A
225−44:25 tight glyph )
226−44:27 glyph $-(
227−44:30 tight tvar A
228−44:32 tvar B
229−44:33 tight glyph )
230−44:34 tight glyph ]
231−45:3 INDENT
232−45:3 glyph ?-
233−45:6 name args
234−46:5 INDENT
235−46:5 glyph [
236−46:6 tight name xs
237−46:9 name f
238−46:10 tight glyph ]
239−47:7 INDENT
240−47:7 glyph ?-
241−47:10 name xs
242−48:9 INDENT
243−48:9 lit ~
244−48:11 lit ~
245−49:9 NEWLINE
246−49:9 glyph [
247−49:10 tight name item
248−49:15 name rest
249−49:19 tight glyph ]
250−49:21 glyph [
251−49:22 tight glyph (
252−49:23 tight name f
253−49:25 name item
254−49:29 tight glyph )
255−49:31 glyph (
256−49:32 tight name turn
257−49:37 name rest
258−49:42 name f
259−49:43 tight glyph )
260−49:44 tight glyph ]
261−51:1 DEDENT
262−51:1 DEDENT
263−51:1 DEDENT
264−51:1 DEDENT
265−51:1 NEWLINE
266−51:1 glyph +$
267−51:4 name dime
268−51:9 glyph [
269−51:10 tight name p
270−51:11 tight glyph =
271−51:12 tight aura @ta
272−51:16 name q
273−51:17 tight glyph =
274−51:18 tight aura @
275−51:19 tight glyph ]
199+41:9 glyph ?-
200+41:12 name xs
201+42:11 INDENT
202+42:11 lit ~
203+42:13 name ys
204+43:11 NEWLINE
205+43:11 glyph [
206+43:12 tight name item
207+43:17 name rest
208+43:21 tight glyph ]
209+43:23 glyph [
210+43:24 tight name item
211+43:29 glyph (
212+43:30 tight name weld
213+43:35 name rest
214+43:40 name ys
215+43:42 tight glyph )
216+43:43 tight glyph ]
217+45:1 DEDENT
218+45:1 DEDENT
219+45:1 DEDENT
220+45:1 DEDENT
221+45:1 DEDENT
222+45:1 NEWLINE
223+45:1 glyph ++
224+45:4 name turn
225+45:9 glyph |=
226+45:12 name args
227+45:16 tight glyph =
228+45:17 tight glyph [
229+45:18 tight glyph (
230+45:19 tight name list
231+45:24 tvar A
232+45:25 tight glyph )
233+45:27 glyph $-(
234+45:30 tight tvar A
235+45:32 tvar B
236+45:33 tight glyph )
237+45:34 tight glyph ]
238+46:3 INDENT
239+46:3 glyph ?-
240+46:6 name args
241+47:5 INDENT
242+47:5 glyph [
243+47:6 tight name xs
244+47:9 name f
245+47:10 tight glyph ]
246+48:7 INDENT
247+48:7 glyph ^-
248+48:10 glyph (
249+48:11 tight name list
250+48:16 tvar B
251+48:17 tight glyph )
252+49:9 INDENT
253+49:9 glyph ?-
254+49:12 name xs
255+50:11 INDENT
256+50:11 lit ~
257+50:13 lit ~
258+51:11 NEWLINE
259+51:11 glyph [
260+51:12 tight name item
261+51:17 name rest
262+51:21 tight glyph ]
263+51:23 glyph [
264+51:24 tight glyph (
265+51:25 tight name f
266+51:27 name item
267+51:31 tight glyph )
268+51:33 glyph (
269+51:34 tight name turn
270+51:39 name rest
271+51:44 name f
272+51:45 tight glyph )
273+51:46 tight glyph ]
274+53:1 DEDENT
275+53:1 DEDENT
276+53:1 DEDENT
277+53:1 DEDENT
278+53:1 DEDENT
27627953:1 NEWLINE
27728053:1 glyph +$
278−53:4 name hair
281+53:4 name dime
27928253:9 glyph [
28028353:10 tight name p
28128453:11 tight glyph =
282−53:12 tight aura @ud
285+53:12 tight aura @ta
28328653:16 name q
28428753:17 tight glyph =
285−53:18 tight aura @ud
286−53:21 tight glyph ]
288+53:18 tight aura @
289+53:19 tight glyph ]
28729055:1 NEWLINE
28829155:1 glyph +$
289−55:4 name pint
292+55:4 name hair
29029355:9 glyph [
29129455:10 tight name p
29229555:11 tight glyph =
293−55:12 tight glyph [
294−55:13 tight name p
295−55:14 tight glyph =
296−55:15 tight aura @
297−55:17 name q
298−55:18 tight glyph =
299−55:19 tight aura @
300−55:20 tight glyph ]
301−55:22 name q
302−55:23 tight glyph =
303−55:24 tight glyph [
304−55:25 tight name p
305−55:26 tight glyph =
306−55:27 tight aura @
307−55:29 name q
308−55:30 tight glyph =
309−55:31 tight aura @
310−55:32 tight glyph ]
311−55:33 tight glyph ]
296+55:12 tight aura @ud
297+55:16 name q
298+55:17 tight glyph =
299+55:18 tight aura @ud
300+55:21 tight glyph ]
31230157:1 NEWLINE
31330257:1 glyph +$
314−57:4 name coin
315−58:3 INDENT
316−58:3 glyph [
317−58:4 tight lit %$
318−58:7 name p
319−58:8 tight glyph =
320−58:9 tight name dime
321−58:13 tight glyph ]
322−59:3 NEWLINE
323−59:3 glyph [
324−59:4 tight lit %blob
325−59:10 name p
326−59:11 tight glyph =
327−59:12 tight glyph *
328−59:13 tight glyph ]
329−60:3 NEWLINE
303+57:4 name pint
304+57:9 glyph [
305+57:10 tight name p
306+57:11 tight glyph =
307+57:12 tight glyph [
308+57:13 tight name p
309+57:14 tight glyph =
310+57:15 tight aura @
311+57:17 name q
312+57:18 tight glyph =
313+57:19 tight aura @
314+57:20 tight glyph ]
315+57:22 name q
316+57:23 tight glyph =
317+57:24 tight glyph [
318+57:25 tight name p
319+57:26 tight glyph =
320+57:27 tight aura @
321+57:29 name q
322+57:30 tight glyph =
323+57:31 tight aura @
324+57:32 tight glyph ]
325+57:33 tight glyph ]
326+59:1 NEWLINE
327+59:1 glyph +$
328+59:4 name coin
329+60:3 INDENT
33033060:3 glyph [
331−60:4 tight lit %many
332−60:10 name p
333−60:11 tight glyph =
334−60:12 tight glyph (
335−60:13 tight name list
336−60:18 name coin
337−60:22 tight glyph )
338−60:23 tight glyph ]
339−62:1 DEDENT
340−62:1 NEWLINE
341−62:1 glyph +$
342−62:4 name pair
343−62:9 glyph |$
344−62:12 glyph [
345−62:13 tight tvar A
346−62:15 tvar B
347−62:16 tight glyph ]
348−62:18 glyph [
349−62:19 tight name p
350−62:20 tight glyph =
351−62:21 tight tvar A
352−62:23 name q
353−62:24 tight glyph =
354−62:25 tight tvar B
355−62:26 tight glyph ]
331+60:4 tight lit %$
332+60:7 name p
333+60:8 tight glyph =
334+60:9 tight name dime
335+60:13 tight glyph ]
336+61:3 NEWLINE
337+61:3 glyph [
338+61:4 tight lit %blob
339+61:10 name p
340+61:11 tight glyph =
341+61:12 tight glyph *
342+61:13 tight glyph ]
343+62:3 NEWLINE
344+62:3 glyph [
345+62:4 tight lit %many
346+62:10 name p
347+62:11 tight glyph =
348+62:12 tight glyph (
349+62:13 tight name list
350+62:18 name coin
351+62:22 tight glyph )
352+62:23 tight glyph ]
353+64:1 DEDENT
35635464:1 NEWLINE
35735564:1 glyph +$
358−64:4 name trel
356+64:4 name pair
35935764:9 glyph |$
36035864:12 glyph [
36135964:13 tight tvar A
36236064:15 tvar B
363−64:17 tvar C
364−64:18 tight glyph ]
365−64:20 glyph [
366−64:21 tight name p
367−64:22 tight glyph =
368−64:23 tight tvar A
369−64:25 name q
370−64:26 tight glyph =
371−64:27 tight tvar B
372−64:29 name r
373−64:30 tight glyph =
374−64:31 tight tvar C
375−64:32 tight glyph ]
361+64:16 tight glyph ]
362+64:18 glyph [
363+64:19 tight name p
364+64:20 tight glyph =
365+64:21 tight tvar A
366+64:23 name q
367+64:24 tight glyph =
368+64:25 tight tvar B
369+64:26 tight glyph ]
37637066:1 NEWLINE
37737166:1 glyph +$
378−66:4 name qual
372+66:4 name trel
37937366:9 glyph |$
38037466:12 glyph [
38137566:13 tight tvar A
38237666:15 tvar B
38337766:17 tvar C
384−66:19 tvar D
385−66:20 tight glyph ]
386−66:22 glyph [
387−66:23 tight name p
388−66:24 tight glyph =
389−66:25 tight tvar A
390−66:27 name q
391−66:28 tight glyph =
392−66:29 tight tvar B
393−66:31 name r
394−66:32 tight glyph =
395−66:33 tight tvar C
396−66:35 name s
397−66:36 tight glyph =
398−66:37 tight tvar D
399−66:38 tight glyph ]
378+66:18 tight glyph ]
379+66:20 glyph [
380+66:21 tight name p
381+66:22 tight glyph =
382+66:23 tight tvar A
383+66:25 name q
384+66:26 tight glyph =
385+66:27 tight tvar B
386+66:29 name r
387+66:30 tight glyph =
388+66:31 tight tvar C
389+66:32 tight glyph ]
40039068:1 NEWLINE
40139168:1 glyph +$
402−68:4 name cord
403−68:9 aura @t
392+68:4 name qual
393+68:9 glyph |$
394+68:12 glyph [
395+68:13 tight tvar A
396+68:15 tvar B
397+68:17 tvar C
398+68:19 tvar D
399+68:20 tight glyph ]
400+68:22 glyph [
401+68:23 tight name p
402+68:24 tight glyph =
403+68:25 tight tvar A
404+68:27 name q
405+68:28 tight glyph =
406+68:29 tight tvar B
407+68:31 name r
408+68:32 tight glyph =
409+68:33 tight tvar C
410+68:35 name s
411+68:36 tight glyph =
412+68:37 tight tvar D
413+68:38 tight glyph ]
40441470:1 NEWLINE
40541570:1 glyph +$
406−70:4 name knot
407−70:9 aura @ta
416+70:4 name cord
417+70:9 aura @t
40841872:1 NEWLINE
40941972:1 glyph +$
410−72:4 name tape
411−72:9 glyph (
412−72:10 tight name list
413−72:15 aura @tD
414−72:18 tight glyph )
420+72:4 name knot
421+72:9 aura @ta
41542274:1 NEWLINE
41642374:1 glyph +$
417−74:4 name path
424+74:4 name tape
41842574:9 glyph (
41942674:10 tight name list
420−74:15 name knot
421−74:19 tight glyph )
427+74:15 aura @tD
428+74:18 tight glyph )
42242976:1 NEWLINE
42343076:1 glyph +$
424−76:4 name tank
425−77:3 INDENT
426−77:3 name cord
427−78:3 NEWLINE
428−78:3 glyph [
429−78:4 tight lit %leaf
430−78:10 name p
431−78:11 tight glyph =
432−78:12 tight name tape
433−78:16 tight glyph ]
434−79:3 NEWLINE
435−79:3 glyph [
436−79:4 tight lit %palm
437−79:10 name p
438−79:11 tight glyph =
439−79:12 tight glyph (
440−79:13 tight name qual
441−79:18 name tape
442−79:23 name tape
443−79:28 name tape
444−79:33 name tape
445−79:37 tight glyph )
446−79:39 name q
447−79:40 tight glyph =
448−79:41 tight glyph (
449−79:42 tight name list
450−79:47 name tank
451−79:51 tight glyph )
452−79:52 tight glyph ]
431+76:4 name path
432+76:9 glyph (
433+76:10 tight name list
434+76:15 name knot
435+76:19 tight glyph )
436+78:1 NEWLINE
437+78:1 glyph +$
438+78:4 name tank
439+79:3 INDENT
440+79:3 name cord
45344180:3 NEWLINE
45444280:3 glyph [
455−80:4 tight lit %rose
443+80:4 tight lit %leaf
45644480:10 name p
45744580:11 tight glyph =
458−80:12 tight glyph (
459−80:13 tight name trel
460−80:18 name tape
461−80:23 name tape
462−80:28 name tape
463−80:32 tight glyph )
464−80:34 name q
465−80:35 tight glyph =
466−80:36 tight glyph (
467−80:37 tight name list
468−80:42 name tank
469−80:46 tight glyph )
470−80:47 tight glyph ]
471−82:1 DEDENT
472−82:1 NEWLINE
473−82:1 glyph +$
474−82:4 name nail
475−82:9 glyph [
476−82:10 tight name p
446+80:12 tight name tape
447+80:16 tight glyph ]
448+81:3 NEWLINE
449+81:3 glyph [
450+81:4 tight lit %palm
451+81:10 name p
452+81:11 tight glyph =
453+81:12 tight glyph (
454+81:13 tight name qual
455+81:18 name tape
456+81:23 name tape
457+81:28 name tape
458+81:33 name tape
459+81:37 tight glyph )
460+81:39 name q
461+81:40 tight glyph =
462+81:41 tight glyph (
463+81:42 tight name list
464+81:47 name tank
465+81:51 tight glyph )
466+81:52 tight glyph ]
467+82:3 NEWLINE
468+82:3 glyph [
469+82:4 tight lit %rose
470+82:10 name p
47747182:11 tight glyph =
478−82:12 tight name hair
479−82:17 name q
480−82:18 tight glyph =
481−82:19 tight name tape
482−82:23 tight glyph ]
472+82:12 tight glyph (
473+82:13 tight name trel
474+82:18 name tape
475+82:23 name tape
476+82:28 name tape
477+82:32 tight glyph )
478+82:34 name q
479+82:35 tight glyph =
480+82:36 tight glyph (
481+82:37 tight name list
482+82:42 name tank
483+82:46 tight glyph )
484+82:47 tight glyph ]
485+84:1 DEDENT
48348684:1 NEWLINE
48448784:1 glyph +$
485−84:4 name edge
488+84:4 name nail
48648984:9 glyph [
48749084:10 tight name p
48849184:11 tight glyph =
48949284:12 tight name hair
49049384:17 name q
49149484:18 tight glyph =
492−84:19 tight glyph (
493−84:20 tight name unit
494−84:25 glyph [
495−84:26 tight name p
496−84:27 tight glyph =
497−84:28 tight glyph *
498−84:30 name q
499−84:31 tight glyph =
500−84:32 tight name nail
501−84:36 tight glyph ]
502−84:37 tight glyph )
503−84:38 tight glyph ]
495+84:19 tight name tape
496+84:23 tight glyph ]
50449786:1 NEWLINE
50549886:1 glyph +$
506−86:4 name rule
507−86:9 glyph $-(
508−86:12 tight name nail
509−86:17 name edge
510−86:21 tight glyph )
499+86:4 name edge
500+86:9 glyph [
501+86:10 tight name p
502+86:11 tight glyph =
503+86:12 tight name hair
504+86:17 name q
505+86:18 tight glyph =
506+86:19 tight glyph (
507+86:20 tight name unit
508+86:25 glyph [
509+86:26 tight name p
510+86:27 tight glyph =
511+86:28 tight glyph *
512+86:30 name q
513+86:31 tight glyph =
514+86:32 tight name nail
515+86:36 tight glyph ]
516+86:37 tight glyph )
517+86:38 tight glyph ]
51151888:1 NEWLINE
51251988:1 glyph +$
513−88:4 name spot
514−88:9 glyph [
515−88:10 tight name p
516−88:11 tight glyph =
517−88:12 tight name path
518−88:17 name q
519−88:18 tight glyph =
520−88:19 tight name pint
521−88:23 tight glyph ]
520+88:4 name rule
521+88:9 glyph $-(
522+88:12 tight name nail
523+88:17 name edge
524+88:21 tight glyph )
52252590:1 NEWLINE
52352690:1 glyph +$
524−90:4 name toon
525−91:3 INDENT
526−91:3 glyph [
527−91:4 tight lit %0
528−91:7 name p
529−91:8 tight glyph =
530−91:9 tight glyph *
531−91:10 tight glyph ]
532−92:3 NEWLINE
533−92:3 glyph [
534−92:4 tight lit %1
535−92:7 name p
536−92:8 tight glyph =
537−92:9 tight glyph *
538−92:10 tight glyph ]
539−93:3 NEWLINE
527+90:4 name spot
528+90:9 glyph [
529+90:10 tight name p
530+90:11 tight glyph =
531+90:12 tight name path
532+90:17 name q
533+90:18 tight glyph =
534+90:19 tight name pint
535+90:23 tight glyph ]
536+92:1 NEWLINE
537+92:1 glyph +$
538+92:4 name toon
539+93:3 INDENT
54054093:3 glyph [
541−93:4 tight lit %2
541+93:4 tight lit %0
54254293:7 name p
54354393:8 tight glyph =
544−93:9 tight glyph (
545−93:10 tight name list
546−93:15 name tank
547−93:19 tight glyph )
548−93:20 tight glyph ]
549−93:21 DEDENT
550−93:21 NEWLINE
544+93:9 tight glyph *
545+93:10 tight glyph ]
546+94:3 NEWLINE
547+94:3 glyph [
548+94:4 tight lit %1
549+94:7 name p
550+94:8 tight glyph =
551+94:9 tight glyph *
552+94:10 tight glyph ]
553+95:3 NEWLINE
554+95:3 glyph [
555+95:4 tight lit %2
556+95:7 name p
557+95:8 tight glyph =
558+95:9 tight glyph (
559+95:10 tight name list
560+95:15 name tank
561+95:19 tight glyph )
562+95:20 tight glyph ]
563+95:21 DEDENT
564+95:21 NEWLINE
tests/golden/prelude-3g-structural/tree.txt+132−126
@@ -87,136 +87,142 @@
8787 (arm 39:5
8888 (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
8989 (body 40:7
90− (branch 40:7
91− (wing 40:10 xs)
92− (arm 41:9 (lit 41:9 ~) (wing 41:11 ys))
93− (arm 42:9
94− (cell 42:9 (bind 42:10 item) (bind 42:15 rest))
95− (tuple 42:21
96− (wing 42:22 item)
97− (group 42:27
98− (call 42:28 (wing 42:28 weld) (wing 42:33 rest) (wing 42:38 ys))))))))))))
99− (value 44:1 turn
100− (gate 44:9
101− (face 44:12 args
102− (cell 44:17
103− (apply 44:18 list (tvar 44:24 A))
104− (fn 44:27 (tvar 44:30 A) (tvar 44:32 B))))
105− (body 45:3
106− (branch 45:3
107− (wing 45:6 args)
108− (arm 46:5
109− (cell 46:5 (bind 46:6 xs) (bind 46:9 f))
110− (body 47:7
111− (branch 47:7
112− (wing 47:10 xs)
113− (arm 48:9 (lit 48:9 ~) (lit 48:11 ~))
114− (arm 49:9
115− (cell 49:9 (bind 49:10 item) (bind 49:15 rest))
116− (tuple 49:21
117− (group 49:22
118− (call 49:23 (wing 49:23 f) (wing 49:25 item)))
119− (group 49:31
120− (call 49:32 (wing 49:32 turn) (wing 49:37 rest) (wing 49:42 f))))))))))))
121− (mold 51:1 dime
122− (cell 51:9
123− (face 51:10 p (aura 51:12 @ta))
124− (face 51:16 q (aura 51:18 @))))
125− (mold 53:1 hair
90+ (cast 40:7
91+ (apply 40:10 list (tvar 40:16 A))
92+ (body 41:9
93+ (branch 41:9
94+ (wing 41:12 xs)
95+ (arm 42:11 (lit 42:11 ~) (wing 42:13 ys))
96+ (arm 43:11
97+ (cell 43:11 (bind 43:12 item) (bind 43:17 rest))
98+ (tuple 43:23
99+ (wing 43:24 item)
100+ (group 43:29
101+ (call 43:30 (wing 43:30 weld) (wing 43:35 rest) (wing 43:40 ys))))))))))))))
102+ (value 45:1 turn
103+ (gate 45:9
104+ (face 45:12 args
105+ (cell 45:17
106+ (apply 45:18 list (tvar 45:24 A))
107+ (fn 45:27 (tvar 45:30 A) (tvar 45:32 B))))
108+ (body 46:3
109+ (branch 46:3
110+ (wing 46:6 args)
111+ (arm 47:5
112+ (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
113+ (body 48:7
114+ (cast 48:7
115+ (apply 48:10 list (tvar 48:16 B))
116+ (body 49:9
117+ (branch 49:9
118+ (wing 49:12 xs)
119+ (arm 50:11 (lit 50:11 ~) (lit 50:13 ~))
120+ (arm 51:11
121+ (cell 51:11 (bind 51:12 item) (bind 51:17 rest))
122+ (tuple 51:23
123+ (group 51:24
124+ (call 51:25 (wing 51:25 f) (wing 51:27 item)))
125+ (group 51:33
126+ (call 51:34 (wing 51:34 turn) (wing 51:39 rest) (wing 51:44 f))))))))))))))
127+ (mold 53:1 dime
126128 (cell 53:9
127− (face 53:10 p (aura 53:12 @ud))
128− (face 53:16 q (aura 53:18 @ud))))
129− (mold 55:1 pint
129+ (face 53:10 p (aura 53:12 @ta))
130+ (face 53:16 q (aura 53:18 @))))
131+ (mold 55:1 hair
130132 (cell 55:9
131− (face 55:10 p
132− (cell 55:12
133− (face 55:13 p (aura 55:15 @))
134− (face 55:17 q (aura 55:19 @))))
135− (face 55:22 q
136− (cell 55:24
137− (face 55:25 p (aura 55:27 @))
138− (face 55:29 q (aura 55:31 @))))))
139− (mold 57:1 coin
140− (union 58:3
141− (cell 58:3
142− (const 58:4 %$)
143− (face 58:7 p (ref 58:9 dime)))
144− (cell 59:3
145− (const 59:4 %blob)
146− (face 59:10 p (noun 59:12)))
133+ (face 55:10 p (aura 55:12 @ud))
134+ (face 55:16 q (aura 55:18 @ud))))
135+ (mold 57:1 pint
136+ (cell 57:9
137+ (face 57:10 p
138+ (cell 57:12
139+ (face 57:13 p (aura 57:15 @))
140+ (face 57:17 q (aura 57:19 @))))
141+ (face 57:22 q
142+ (cell 57:24
143+ (face 57:25 p (aura 57:27 @))
144+ (face 57:29 q (aura 57:31 @))))))
145+ (mold 59:1 coin
146+ (union 60:3
147147 (cell 60:3
148− (const 60:4 %many)
149− (face 60:10 p
150− (apply 60:12 list (ref 60:18 coin))))))
151− (mold 62:1 pair
152− (generic 62:9 A B
153− (cell 62:18
154− (face 62:19 p (tvar 62:21 A))
155− (face 62:23 q (tvar 62:25 B)))))
156− (mold 64:1 trel
157− (generic 64:9 A B C
158− (cell 64:20
159− (face 64:21 p (tvar 64:23 A))
160− (face 64:25 q (tvar 64:27 B))
161− (face 64:29 r (tvar 64:31 C)))))
162− (mold 66:1 qual
163− (generic 66:9 A B C D
164− (cell 66:22
165− (face 66:23 p (tvar 66:25 A))
166− (face 66:27 q (tvar 66:29 B))
167− (face 66:31 r (tvar 66:33 C))
168− (face 66:35 s (tvar 66:37 D)))))
169− (mold 68:1 cord (aura 68:9 @t))
170− (mold 70:1 knot (aura 70:9 @ta))
171− (mold 72:1 tape
172− (apply 72:9 list (aura 72:15 @tD)))
173− (mold 74:1 path
174− (apply 74:9 list (ref 74:15 knot)))
175− (mold 76:1 tank
176− (union 77:3
177− (ref 77:3 cord)
178− (cell 78:3
179− (const 78:4 %leaf)
180− (face 78:10 p (ref 78:12 tape)))
181− (cell 79:3
182− (const 79:4 %palm)
183− (face 79:10 p
184− (apply 79:12 qual (ref 79:18 tape) (ref 79:23 tape) (ref 79:28 tape) (ref 79:33 tape)))
185− (face 79:39 q
186− (apply 79:41 list (ref 79:47 tank))))
148+ (const 60:4 %$)
149+ (face 60:7 p (ref 60:9 dime)))
150+ (cell 61:3
151+ (const 61:4 %blob)
152+ (face 61:10 p (noun 61:12)))
153+ (cell 62:3
154+ (const 62:4 %many)
155+ (face 62:10 p
156+ (apply 62:12 list (ref 62:18 coin))))))
157+ (mold 64:1 pair
158+ (generic 64:9 A B
159+ (cell 64:18
160+ (face 64:19 p (tvar 64:21 A))
161+ (face 64:23 q (tvar 64:25 B)))))
162+ (mold 66:1 trel
163+ (generic 66:9 A B C
164+ (cell 66:20
165+ (face 66:21 p (tvar 66:23 A))
166+ (face 66:25 q (tvar 66:27 B))
167+ (face 66:29 r (tvar 66:31 C)))))
168+ (mold 68:1 qual
169+ (generic 68:9 A B C D
170+ (cell 68:22
171+ (face 68:23 p (tvar 68:25 A))
172+ (face 68:27 q (tvar 68:29 B))
173+ (face 68:31 r (tvar 68:33 C))
174+ (face 68:35 s (tvar 68:37 D)))))
175+ (mold 70:1 cord (aura 70:9 @t))
176+ (mold 72:1 knot (aura 72:9 @ta))
177+ (mold 74:1 tape
178+ (apply 74:9 list (aura 74:15 @tD)))
179+ (mold 76:1 path
180+ (apply 76:9 list (ref 76:15 knot)))
181+ (mold 78:1 tank
182+ (union 79:3
183+ (ref 79:3 cord)
187184 (cell 80:3
188− (const 80:4 %rose)
189− (face 80:10 p
190− (apply 80:12 trel (ref 80:18 tape) (ref 80:23 tape) (ref 80:28 tape)))
191− (face 80:34 q
192− (apply 80:36 list (ref 80:42 tank))))))
193− (mold 82:1 nail
194− (cell 82:9
195− (face 82:10 p (ref 82:12 hair))
196− (face 82:17 q (ref 82:19 tape))))
197− (mold 84:1 edge
185+ (const 80:4 %leaf)
186+ (face 80:10 p (ref 80:12 tape)))
187+ (cell 81:3
188+ (const 81:4 %palm)
189+ (face 81:10 p
190+ (apply 81:12 qual (ref 81:18 tape) (ref 81:23 tape) (ref 81:28 tape) (ref 81:33 tape)))
191+ (face 81:39 q
192+ (apply 81:41 list (ref 81:47 tank))))
193+ (cell 82:3
194+ (const 82:4 %rose)
195+ (face 82:10 p
196+ (apply 82:12 trel (ref 82:18 tape) (ref 82:23 tape) (ref 82:28 tape)))
197+ (face 82:34 q
198+ (apply 82:36 list (ref 82:42 tank))))))
199+ (mold 84:1 nail
198200 (cell 84:9
199201 (face 84:10 p (ref 84:12 hair))
200− (face 84:17 q
201− (apply 84:19 unit
202− (cell 84:25
203− (face 84:26 p (noun 84:28))
204− (face 84:30 q (ref 84:32 nail)))))))
205− (mold 86:1 rule
206− (fn 86:9 (ref 86:12 nail) (ref 86:17 edge)))
207− (mold 88:1 spot
208− (cell 88:9
209− (face 88:10 p (ref 88:12 path))
210− (face 88:17 q (ref 88:19 pint))))
211− (mold 90:1 toon
212− (union 91:3
213− (cell 91:3
214− (const 91:4 %0)
215− (face 91:7 p (noun 91:9)))
216− (cell 92:3
217− (const 92:4 %1)
218− (face 92:7 p (noun 92:9)))
202+ (face 84:17 q (ref 84:19 tape))))
203+ (mold 86:1 edge
204+ (cell 86:9
205+ (face 86:10 p (ref 86:12 hair))
206+ (face 86:17 q
207+ (apply 86:19 unit
208+ (cell 86:25
209+ (face 86:26 p (noun 86:28))
210+ (face 86:30 q (ref 86:32 nail)))))))
211+ (mold 88:1 rule
212+ (fn 88:9 (ref 88:12 nail) (ref 88:17 edge)))
213+ (mold 90:1 spot
214+ (cell 90:9
215+ (face 90:10 p (ref 90:12 path))
216+ (face 90:17 q (ref 90:19 pint))))
217+ (mold 92:1 toon
218+ (union 93:3
219219 (cell 93:3
220− (const 93:4 %2)
221− (face 93:7 p
222− (apply 93:9 list (ref 93:15 tank)))))))
220+ (const 93:4 %0)
221+ (face 93:7 p (noun 93:9)))
222+ (cell 94:3
223+ (const 94:4 %1)
224+ (face 94:7 p (noun 94:9)))
225+ (cell 95:3
226+ (const 95:4 %2)
227+ (face 95:7 p
228+ (apply 95:9 list (ref 95:15 tank)))))))
tests/golden/prelude-3g-structural/types.txt+2−2
@@ -5,8 +5,8 @@ partial inference; module not checked
55++ not: $-(? ?)
66+$ list: cases proven disjoint; mold not checked
77+$ unit: cases proven disjoint; mold not checked
8−++ fall: sample mold is not supported by partial inference
9−++ need: sample mold is not supported by partial inference
8+++ fall: $-([(unit A) A] A)
9+++ need: $-((unit A) A)
1010++ weld: sample mold is not supported by partial inference
1111++ turn: sample mold is not supported by partial inference
1212+$ dime: not checked
tests/golden/prelude-list-helpers/source.jibb+8−6
@@ -37,16 +37,18 @@
3737++ weld |= args=[(list A) (list A)]
3838 ?- args
3939 [xs ys]
40− ?- xs
41− ~ ys
42− [item rest] [item (weld rest ys)]
40+ ^- (list A)
41+ ?- xs
42+ ~ ys
43+ [item rest] [item (weld rest ys)]
4344
4445++ turn |= args=[(list A) $-(A B)]
4546 ?- args
4647 [xs f]
47− ?- xs
48− ~ ~
49− [item rest] [(f item) (turn rest f)]
48+ ^- (list B)
49+ ?- xs
50+ ~ ~
51+ [item rest] [(f item) (turn rest f)]
5052
5153+$ dime [p=@ta q=@]
5254
tests/golden/prelude-list-helpers/tokens.txt+568−554
@@ -190,650 +190,664 @@
19019039:9 name ys
19119139:11 tight glyph ]
19219240:7 INDENT
193−40:7 glyph ?-
194−40:10 name xs
193+40:7 glyph ^-
194+40:10 glyph (
195+40:11 tight name list
196+40:16 tvar A
197+40:17 tight glyph )
19519841:9 INDENT
196−41:9 lit ~
197−41:11 name ys
198−42:9 NEWLINE
199−42:9 glyph [
200−42:10 tight name item
201−42:15 name rest
202−42:19 tight glyph ]
203−42:21 glyph [
204−42:22 tight name item
205−42:27 glyph (
206−42:28 tight name weld
207−42:33 name rest
208−42:38 name ys
209−42:40 tight glyph )
210−42:41 tight glyph ]
211−44:1 DEDENT
212−44:1 DEDENT
213−44:1 DEDENT
214−44:1 DEDENT
215−44:1 NEWLINE
216−44:1 glyph ++
217−44:4 name turn
218−44:9 glyph |=
219−44:12 name args
220−44:16 tight glyph =
221−44:17 tight glyph [
222−44:18 tight glyph (
223−44:19 tight name list
224−44:24 tvar A
225−44:25 tight glyph )
226−44:27 glyph $-(
227−44:30 tight tvar A
228−44:32 tvar B
229−44:33 tight glyph )
230−44:34 tight glyph ]
231−45:3 INDENT
232−45:3 glyph ?-
233−45:6 name args
234−46:5 INDENT
235−46:5 glyph [
236−46:6 tight name xs
237−46:9 name f
238−46:10 tight glyph ]
239−47:7 INDENT
240−47:7 glyph ?-
241−47:10 name xs
242−48:9 INDENT
243−48:9 lit ~
244−48:11 lit ~
245−49:9 NEWLINE
246−49:9 glyph [
247−49:10 tight name item
248−49:15 name rest
249−49:19 tight glyph ]
250−49:21 glyph [
251−49:22 tight glyph (
252−49:23 tight name f
253−49:25 name item
254−49:29 tight glyph )
255−49:31 glyph (
256−49:32 tight name turn
257−49:37 name rest
258−49:42 name f
259−49:43 tight glyph )
260−49:44 tight glyph ]
261−51:1 DEDENT
262−51:1 DEDENT
263−51:1 DEDENT
264−51:1 DEDENT
265−51:1 NEWLINE
266−51:1 glyph +$
267−51:4 name dime
268−51:9 glyph [
269−51:10 tight name p
270−51:11 tight glyph =
271−51:12 tight aura @ta
272−51:16 name q
273−51:17 tight glyph =
274−51:18 tight aura @
275−51:19 tight glyph ]
199+41:9 glyph ?-
200+41:12 name xs
201+42:11 INDENT
202+42:11 lit ~
203+42:13 name ys
204+43:11 NEWLINE
205+43:11 glyph [
206+43:12 tight name item
207+43:17 name rest
208+43:21 tight glyph ]
209+43:23 glyph [
210+43:24 tight name item
211+43:29 glyph (
212+43:30 tight name weld
213+43:35 name rest
214+43:40 name ys
215+43:42 tight glyph )
216+43:43 tight glyph ]
217+45:1 DEDENT
218+45:1 DEDENT
219+45:1 DEDENT
220+45:1 DEDENT
221+45:1 DEDENT
222+45:1 NEWLINE
223+45:1 glyph ++
224+45:4 name turn
225+45:9 glyph |=
226+45:12 name args
227+45:16 tight glyph =
228+45:17 tight glyph [
229+45:18 tight glyph (
230+45:19 tight name list
231+45:24 tvar A
232+45:25 tight glyph )
233+45:27 glyph $-(
234+45:30 tight tvar A
235+45:32 tvar B
236+45:33 tight glyph )
237+45:34 tight glyph ]
238+46:3 INDENT
239+46:3 glyph ?-
240+46:6 name args
241+47:5 INDENT
242+47:5 glyph [
243+47:6 tight name xs
244+47:9 name f
245+47:10 tight glyph ]
246+48:7 INDENT
247+48:7 glyph ^-
248+48:10 glyph (
249+48:11 tight name list
250+48:16 tvar B
251+48:17 tight glyph )
252+49:9 INDENT
253+49:9 glyph ?-
254+49:12 name xs
255+50:11 INDENT
256+50:11 lit ~
257+50:13 lit ~
258+51:11 NEWLINE
259+51:11 glyph [
260+51:12 tight name item
261+51:17 name rest
262+51:21 tight glyph ]
263+51:23 glyph [
264+51:24 tight glyph (
265+51:25 tight name f
266+51:27 name item
267+51:31 tight glyph )
268+51:33 glyph (
269+51:34 tight name turn
270+51:39 name rest
271+51:44 name f
272+51:45 tight glyph )
273+51:46 tight glyph ]
274+53:1 DEDENT
275+53:1 DEDENT
276+53:1 DEDENT
277+53:1 DEDENT
278+53:1 DEDENT
27627953:1 NEWLINE
27728053:1 glyph +$
278−53:4 name hair
281+53:4 name dime
27928253:9 glyph [
28028353:10 tight name p
28128453:11 tight glyph =
282−53:12 tight aura @ud
285+53:12 tight aura @ta
28328653:16 name q
28428753:17 tight glyph =
285−53:18 tight aura @ud
286−53:21 tight glyph ]
288+53:18 tight aura @
289+53:19 tight glyph ]
28729055:1 NEWLINE
28829155:1 glyph +$
289−55:4 name pint
292+55:4 name hair
29029355:9 glyph [
29129455:10 tight name p
29229555:11 tight glyph =
293−55:12 tight glyph [
294−55:13 tight name p
295−55:14 tight glyph =
296−55:15 tight aura @
297−55:17 name q
298−55:18 tight glyph =
299−55:19 tight aura @
300−55:20 tight glyph ]
301−55:22 name q
302−55:23 tight glyph =
303−55:24 tight glyph [
304−55:25 tight name p
305−55:26 tight glyph =
306−55:27 tight aura @
307−55:29 name q
308−55:30 tight glyph =
309−55:31 tight aura @
310−55:32 tight glyph ]
311−55:33 tight glyph ]
296+55:12 tight aura @ud
297+55:16 name q
298+55:17 tight glyph =
299+55:18 tight aura @ud
300+55:21 tight glyph ]
31230157:1 NEWLINE
31330257:1 glyph +$
314−57:4 name coin
315−58:3 INDENT
316−58:3 glyph [
317−58:4 tight lit %$
318−58:7 name p
319−58:8 tight glyph =
320−58:9 tight name dime
321−58:13 tight glyph ]
322−59:3 NEWLINE
323−59:3 glyph [
324−59:4 tight lit %blob
325−59:10 name p
326−59:11 tight glyph =
327−59:12 tight glyph *
328−59:13 tight glyph ]
329−60:3 NEWLINE
303+57:4 name pint
304+57:9 glyph [
305+57:10 tight name p
306+57:11 tight glyph =
307+57:12 tight glyph [
308+57:13 tight name p
309+57:14 tight glyph =
310+57:15 tight aura @
311+57:17 name q
312+57:18 tight glyph =
313+57:19 tight aura @
314+57:20 tight glyph ]
315+57:22 name q
316+57:23 tight glyph =
317+57:24 tight glyph [
318+57:25 tight name p
319+57:26 tight glyph =
320+57:27 tight aura @
321+57:29 name q
322+57:30 tight glyph =
323+57:31 tight aura @
324+57:32 tight glyph ]
325+57:33 tight glyph ]
326+59:1 NEWLINE
327+59:1 glyph +$
328+59:4 name coin
329+60:3 INDENT
33033060:3 glyph [
331−60:4 tight lit %many
332−60:10 name p
333−60:11 tight glyph =
334−60:12 tight glyph (
335−60:13 tight name list
336−60:18 name coin
337−60:22 tight glyph )
338−60:23 tight glyph ]
339−62:1 DEDENT
340−62:1 NEWLINE
341−62:1 glyph +$
342−62:4 name pair
343−62:9 glyph |$
344−62:12 glyph [
345−62:13 tight tvar A
346−62:15 tvar B
347−62:16 tight glyph ]
348−62:18 glyph [
349−62:19 tight name p
350−62:20 tight glyph =
351−62:21 tight tvar A
352−62:23 name q
353−62:24 tight glyph =
354−62:25 tight tvar B
355−62:26 tight glyph ]
331+60:4 tight lit %$
332+60:7 name p
333+60:8 tight glyph =
334+60:9 tight name dime
335+60:13 tight glyph ]
336+61:3 NEWLINE
337+61:3 glyph [
338+61:4 tight lit %blob
339+61:10 name p
340+61:11 tight glyph =
341+61:12 tight glyph *
342+61:13 tight glyph ]
343+62:3 NEWLINE
344+62:3 glyph [
345+62:4 tight lit %many
346+62:10 name p
347+62:11 tight glyph =
348+62:12 tight glyph (
349+62:13 tight name list
350+62:18 name coin
351+62:22 tight glyph )
352+62:23 tight glyph ]
353+64:1 DEDENT
35635464:1 NEWLINE
35735564:1 glyph +$
358−64:4 name trel
356+64:4 name pair
35935764:9 glyph |$
36035864:12 glyph [
36135964:13 tight tvar A
36236064:15 tvar B
363−64:17 tvar C
364−64:18 tight glyph ]
365−64:20 glyph [
366−64:21 tight name p
367−64:22 tight glyph =
368−64:23 tight tvar A
369−64:25 name q
370−64:26 tight glyph =
371−64:27 tight tvar B
372−64:29 name r
373−64:30 tight glyph =
374−64:31 tight tvar C
375−64:32 tight glyph ]
361+64:16 tight glyph ]
362+64:18 glyph [
363+64:19 tight name p
364+64:20 tight glyph =
365+64:21 tight tvar A
366+64:23 name q
367+64:24 tight glyph =
368+64:25 tight tvar B
369+64:26 tight glyph ]
37637066:1 NEWLINE
37737166:1 glyph +$
378−66:4 name qual
372+66:4 name trel
37937366:9 glyph |$
38037466:12 glyph [
38137566:13 tight tvar A
38237666:15 tvar B
38337766:17 tvar C
384−66:19 tvar D
385−66:20 tight glyph ]
386−66:22 glyph [
387−66:23 tight name p
388−66:24 tight glyph =
389−66:25 tight tvar A
390−66:27 name q
391−66:28 tight glyph =
392−66:29 tight tvar B
393−66:31 name r
394−66:32 tight glyph =
395−66:33 tight tvar C
396−66:35 name s
397−66:36 tight glyph =
398−66:37 tight tvar D
399−66:38 tight glyph ]
378+66:18 tight glyph ]
379+66:20 glyph [
380+66:21 tight name p
381+66:22 tight glyph =
382+66:23 tight tvar A
383+66:25 name q
384+66:26 tight glyph =
385+66:27 tight tvar B
386+66:29 name r
387+66:30 tight glyph =
388+66:31 tight tvar C
389+66:32 tight glyph ]
40039068:1 NEWLINE
40139168:1 glyph +$
402−68:4 name cord
403−68:9 aura @t
392+68:4 name qual
393+68:9 glyph |$
394+68:12 glyph [
395+68:13 tight tvar A
396+68:15 tvar B
397+68:17 tvar C
398+68:19 tvar D
399+68:20 tight glyph ]
400+68:22 glyph [
401+68:23 tight name p
402+68:24 tight glyph =
403+68:25 tight tvar A
404+68:27 name q
405+68:28 tight glyph =
406+68:29 tight tvar B
407+68:31 name r
408+68:32 tight glyph =
409+68:33 tight tvar C
410+68:35 name s
411+68:36 tight glyph =
412+68:37 tight tvar D
413+68:38 tight glyph ]
40441470:1 NEWLINE
40541570:1 glyph +$
406−70:4 name knot
407−70:9 aura @ta
416+70:4 name cord
417+70:9 aura @t
40841872:1 NEWLINE
40941972:1 glyph +$
410−72:4 name tape
411−72:9 glyph (
412−72:10 tight name list
413−72:15 aura @tD
414−72:18 tight glyph )
420+72:4 name knot
421+72:9 aura @ta
41542274:1 NEWLINE
41642374:1 glyph +$
417−74:4 name path
424+74:4 name tape
41842574:9 glyph (
41942674:10 tight name list
420−74:15 name knot
421−74:19 tight glyph )
427+74:15 aura @tD
428+74:18 tight glyph )
42242976:1 NEWLINE
42343076:1 glyph +$
424−76:4 name tank
425−77:3 INDENT
426−77:3 name cord
427−78:3 NEWLINE
428−78:3 glyph [
429−78:4 tight lit %leaf
430−78:10 name p
431−78:11 tight glyph =
432−78:12 tight name tape
433−78:16 tight glyph ]
434−79:3 NEWLINE
435−79:3 glyph [
436−79:4 tight lit %palm
437−79:10 name p
438−79:11 tight glyph =
439−79:12 tight glyph (
440−79:13 tight name qual
441−79:18 name tape
442−79:23 name tape
443−79:28 name tape
444−79:33 name tape
445−79:37 tight glyph )
446−79:39 name q
447−79:40 tight glyph =
448−79:41 tight glyph (
449−79:42 tight name list
450−79:47 name tank
451−79:51 tight glyph )
452−79:52 tight glyph ]
431+76:4 name path
432+76:9 glyph (
433+76:10 tight name list
434+76:15 name knot
435+76:19 tight glyph )
436+78:1 NEWLINE
437+78:1 glyph +$
438+78:4 name tank
439+79:3 INDENT
440+79:3 name cord
45344180:3 NEWLINE
45444280:3 glyph [
455−80:4 tight lit %rose
443+80:4 tight lit %leaf
45644480:10 name p
45744580:11 tight glyph =
458−80:12 tight glyph (
459−80:13 tight name trel
460−80:18 name tape
461−80:23 name tape
462−80:28 name tape
463−80:32 tight glyph )
464−80:34 name q
465−80:35 tight glyph =
466−80:36 tight glyph (
467−80:37 tight name list
468−80:42 name tank
469−80:46 tight glyph )
470−80:47 tight glyph ]
471−82:1 DEDENT
472−82:1 NEWLINE
473−82:1 glyph +$
474−82:4 name nail
475−82:9 glyph [
476−82:10 tight name p
446+80:12 tight name tape
447+80:16 tight glyph ]
448+81:3 NEWLINE
449+81:3 glyph [
450+81:4 tight lit %palm
451+81:10 name p
452+81:11 tight glyph =
453+81:12 tight glyph (
454+81:13 tight name qual
455+81:18 name tape
456+81:23 name tape
457+81:28 name tape
458+81:33 name tape
459+81:37 tight glyph )
460+81:39 name q
461+81:40 tight glyph =
462+81:41 tight glyph (
463+81:42 tight name list
464+81:47 name tank
465+81:51 tight glyph )
466+81:52 tight glyph ]
467+82:3 NEWLINE
468+82:3 glyph [
469+82:4 tight lit %rose
470+82:10 name p
47747182:11 tight glyph =
478−82:12 tight name hair
479−82:17 name q
480−82:18 tight glyph =
481−82:19 tight name tape
482−82:23 tight glyph ]
472+82:12 tight glyph (
473+82:13 tight name trel
474+82:18 name tape
475+82:23 name tape
476+82:28 name tape
477+82:32 tight glyph )
478+82:34 name q
479+82:35 tight glyph =
480+82:36 tight glyph (
481+82:37 tight name list
482+82:42 name tank
483+82:46 tight glyph )
484+82:47 tight glyph ]
485+84:1 DEDENT
48348684:1 NEWLINE
48448784:1 glyph +$
485−84:4 name edge
488+84:4 name nail
48648984:9 glyph [
48749084:10 tight name p
48849184:11 tight glyph =
48949284:12 tight name hair
49049384:17 name q
49149484:18 tight glyph =
492−84:19 tight glyph (
493−84:20 tight name unit
494−84:25 glyph [
495−84:26 tight name p
496−84:27 tight glyph =
497−84:28 tight glyph *
498−84:30 name q
499−84:31 tight glyph =
500−84:32 tight name nail
501−84:36 tight glyph ]
502−84:37 tight glyph )
503−84:38 tight glyph ]
495+84:19 tight name tape
496+84:23 tight glyph ]
50449786:1 NEWLINE
50549886:1 glyph +$
506−86:4 name rule
507−86:9 glyph $-(
508−86:12 tight name nail
509−86:17 name edge
510−86:21 tight glyph )
499+86:4 name edge
500+86:9 glyph [
501+86:10 tight name p
502+86:11 tight glyph =
503+86:12 tight name hair
504+86:17 name q
505+86:18 tight glyph =
506+86:19 tight glyph (
507+86:20 tight name unit
508+86:25 glyph [
509+86:26 tight name p
510+86:27 tight glyph =
511+86:28 tight glyph *
512+86:30 name q
513+86:31 tight glyph =
514+86:32 tight name nail
515+86:36 tight glyph ]
516+86:37 tight glyph )
517+86:38 tight glyph ]
51151888:1 NEWLINE
51251988:1 glyph +$
513−88:4 name spot
514−88:9 glyph [
515−88:10 tight name p
516−88:11 tight glyph =
517−88:12 tight name path
518−88:17 name q
519−88:18 tight glyph =
520−88:19 tight name pint
521−88:23 tight glyph ]
520+88:4 name rule
521+88:9 glyph $-(
522+88:12 tight name nail
523+88:17 name edge
524+88:21 tight glyph )
52252590:1 NEWLINE
52352690:1 glyph +$
524−90:4 name toon
525−91:3 INDENT
526−91:3 glyph [
527−91:4 tight lit %0
528−91:7 name p
529−91:8 tight glyph =
530−91:9 tight glyph *
531−91:10 tight glyph ]
532−92:3 NEWLINE
533−92:3 glyph [
534−92:4 tight lit %1
535−92:7 name p
536−92:8 tight glyph =
537−92:9 tight glyph *
538−92:10 tight glyph ]
539−93:3 NEWLINE
527+90:4 name spot
528+90:9 glyph [
529+90:10 tight name p
530+90:11 tight glyph =
531+90:12 tight name path
532+90:17 name q
533+90:18 tight glyph =
534+90:19 tight name pint
535+90:23 tight glyph ]
536+92:1 NEWLINE
537+92:1 glyph +$
538+92:4 name toon
539+93:3 INDENT
54054093:3 glyph [
541−93:4 tight lit %2
541+93:4 tight lit %0
54254293:7 name p
54354393:8 tight glyph =
544−93:9 tight glyph (
545−93:10 tight name list
546−93:15 name tank
547−93:19 tight glyph )
548−93:20 tight glyph ]
549−95:1 DEDENT
550−95:1 NEWLINE
551−95:1 glyph +$
552−95:4 name like
553−95:9 glyph |$
554−95:12 glyph [
555−95:13 tight tvar A
556−95:14 tight glyph ]
557−95:16 glyph [
558−95:17 tight name p
559−95:18 tight glyph =
560−95:19 tight name hair
561−95:24 name q
562−95:25 tight glyph =
563−95:26 tight glyph (
564−95:27 tight name unit
565−95:32 glyph [
566−95:33 tight name p
567−95:34 tight glyph =
568−95:35 tight tvar A
569−95:37 name q
570−95:38 tight glyph =
571−95:39 tight name nail
572−95:43 tight glyph ]
573−95:44 tight glyph )
574−95:45 tight glyph ]
544+93:9 tight glyph *
545+93:10 tight glyph ]
546+94:3 NEWLINE
547+94:3 glyph [
548+94:4 tight lit %1
549+94:7 name p
550+94:8 tight glyph =
551+94:9 tight glyph *
552+94:10 tight glyph ]
553+95:3 NEWLINE
554+95:3 glyph [
555+95:4 tight lit %2
556+95:7 name p
557+95:8 tight glyph =
558+95:9 tight glyph (
559+95:10 tight name list
560+95:15 name tank
561+95:19 tight glyph )
562+95:20 tight glyph ]
563+97:1 DEDENT
57556497:1 NEWLINE
576−97:1 glyph ++
577−97:4 name wonk
578−97:9 glyph |=
579−97:12 name veq
580−97:15 tight glyph =
581−97:16 tight glyph (
582−97:17 tight name like
583−97:22 tvar A
584−97:23 tight glyph )
585−98:3 INDENT
586−98:3 glyph ?-
587−98:6 wing q.veq
588−99:5 INDENT
589−99:5 lit ~
590−99:7 glyph !!
591−100:5 NEWLINE
592−100:5 glyph [
593−100:6 tight lit ~
594−100:8 name product
595−100:15 tight glyph ]
596−100:17 wing p.product
597−102:1 DEDENT
598−102:1 DEDENT
599−102:1 NEWLINE
600−102:1 glyph +$
601−102:4 name lone
602−102:9 glyph |$
603−102:12 glyph [
604−102:13 tight tvar A
605−102:14 tight glyph ]
606−102:16 glyph [
607−102:17 tight name p
608−102:18 tight glyph =
609−102:19 tight tvar A
610−102:20 tight glyph ]
565+97:1 glyph +$
566+97:4 name like
567+97:9 glyph |$
568+97:12 glyph [
569+97:13 tight tvar A
570+97:14 tight glyph ]
571+97:16 glyph [
572+97:17 tight name p
573+97:18 tight glyph =
574+97:19 tight name hair
575+97:24 name q
576+97:25 tight glyph =
577+97:26 tight glyph (
578+97:27 tight name unit
579+97:32 glyph [
580+97:33 tight name p
581+97:34 tight glyph =
582+97:35 tight tvar A
583+97:37 name q
584+97:38 tight glyph =
585+97:39 tight name nail
586+97:43 tight glyph ]
587+97:44 tight glyph )
588+97:45 tight glyph ]
589+99:1 NEWLINE
590+99:1 glyph ++
591+99:4 name wonk
592+99:9 glyph |=
593+99:12 name veq
594+99:15 tight glyph =
595+99:16 tight glyph (
596+99:17 tight name like
597+99:22 tvar A
598+99:23 tight glyph )
599+100:3 INDENT
600+100:3 glyph ?-
601+100:6 wing q.veq
602+101:5 INDENT
603+101:5 lit ~
604+101:7 glyph !!
605+102:5 NEWLINE
606+102:5 glyph [
607+102:6 tight lit ~
608+102:8 name product
609+102:15 tight glyph ]
610+102:17 wing p.product
611+104:1 DEDENT
612+104:1 DEDENT
611613104:1 NEWLINE
612614104:1 glyph +$
613−104:4 name lest
615+104:4 name lone
614616104:9 glyph |$
615617104:12 glyph [
616618104:13 tight tvar A
617619104:14 tight glyph ]
618620104:16 glyph [
619−104:17 tight name i
621+104:17 tight name p
620622104:18 tight glyph =
621623104:19 tight tvar A
622−104:21 name t
623−104:22 tight glyph =
624−104:23 tight glyph (
625−104:24 tight name list
626−104:29 tvar A
627−104:30 tight glyph )
628−104:31 tight glyph ]
624+104:20 tight glyph ]
629625106:1 NEWLINE
630626106:1 glyph +$
631−106:4 name pole
627+106:4 name lest
632628106:9 glyph |$
633629106:12 glyph [
634630106:13 tight tvar A
635631106:14 tight glyph ]
636−107:3 INDENT
637−107:3 lit ~
638−108:3 NEWLINE
639−108:3 glyph [
640−108:4 tight tvar A
641−108:6 glyph (
642−108:7 tight name pole
643−108:12 tvar A
644−108:13 tight glyph )
632+106:16 glyph [
633+106:17 tight name i
634+106:18 tight glyph =
635+106:19 tight tvar A
636+106:21 name t
637+106:22 tight glyph =
638+106:23 tight glyph (
639+106:24 tight name list
640+106:29 tvar A
641+106:30 tight glyph )
642+106:31 tight glyph ]
643+108:1 NEWLINE
644+108:1 glyph +$
645+108:4 name pole
646+108:9 glyph |$
647+108:12 glyph [
648+108:13 tight tvar A
645649108:14 tight glyph ]
646−110:1 DEDENT
647−110:1 NEWLINE
648−110:1 glyph +$
649−110:4 name quip
650−110:9 glyph |$
651−110:12 glyph [
652−110:13 tight tvar A
653−110:15 tvar B
654−110:16 tight glyph ]
655−110:18 glyph [
656−110:19 tight glyph (
657−110:20 tight name list
658−110:25 tvar A
659−110:26 tight glyph )
660−110:28 tvar B
661−110:29 tight glyph ]
650+109:3 INDENT
651+109:3 lit ~
652+110:3 NEWLINE
653+110:3 glyph [
654+110:4 tight tvar A
655+110:6 glyph (
656+110:7 tight name pole
657+110:12 tvar A
658+110:13 tight glyph )
659+110:14 tight glyph ]
660+112:1 DEDENT
662661112:1 NEWLINE
663662112:1 glyph +$
664−112:4 name tree
663+112:4 name quip
665664112:9 glyph |$
666665112:12 glyph [
667666112:13 tight tvar A
668−112:14 tight glyph ]
669−113:3 INDENT
670−113:3 lit ~
671−114:3 NEWLINE
672−114:3 glyph [
673−114:4 tight name n
674−114:5 tight glyph =
675−114:6 tight tvar A
676−114:8 name l
677−114:9 tight glyph =
678−114:10 tight glyph (
679−114:11 tight name tree
680−114:16 tvar A
681−114:17 tight glyph )
682−114:19 name r
683−114:20 tight glyph =
684−114:21 tight glyph (
685−114:22 tight name tree
686−114:27 tvar A
687−114:28 tight glyph )
688−114:29 tight glyph ]
689−116:1 DEDENT
690−116:1 NEWLINE
691−116:1 glyph +$
692−116:4 name each
693−116:9 glyph |$
694−116:12 glyph [
695−116:13 tight tvar A
696−116:15 tvar B
697−116:16 tight glyph ]
698−117:3 INDENT
699−117:3 glyph [
700−117:4 tight lit %|
701−117:7 name p
702−117:8 tight glyph =
703−117:9 tight tvar B
704−117:10 tight glyph ]
705−118:3 NEWLINE
706−118:3 glyph [
707−118:4 tight lit %&
708−118:7 name p
709−118:8 tight glyph =
710−118:9 tight tvar A
711−118:10 tight glyph ]
712−120:1 DEDENT
713−120:1 NEWLINE
714−120:1 glyph +$
715−120:4 name bloq
716−120:9 aura @
667+112:15 tvar B
668+112:16 tight glyph ]
669+112:18 glyph [
670+112:19 tight glyph (
671+112:20 tight name list
672+112:25 tvar A
673+112:26 tight glyph )
674+112:28 tvar B
675+112:29 tight glyph ]
676+114:1 NEWLINE
677+114:1 glyph +$
678+114:4 name tree
679+114:9 glyph |$
680+114:12 glyph [
681+114:13 tight tvar A
682+114:14 tight glyph ]
683+115:3 INDENT
684+115:3 lit ~
685+116:3 NEWLINE
686+116:3 glyph [
687+116:4 tight name n
688+116:5 tight glyph =
689+116:6 tight tvar A
690+116:8 name l
691+116:9 tight glyph =
692+116:10 tight glyph (
693+116:11 tight name tree
694+116:16 tvar A
695+116:17 tight glyph )
696+116:19 name r
697+116:20 tight glyph =
698+116:21 tight glyph (
699+116:22 tight name tree
700+116:27 tvar A
701+116:28 tight glyph )
702+116:29 tight glyph ]
703+118:1 DEDENT
704+118:1 NEWLINE
705+118:1 glyph +$
706+118:4 name each
707+118:9 glyph |$
708+118:12 glyph [
709+118:13 tight tvar A
710+118:15 tvar B
711+118:16 tight glyph ]
712+119:3 INDENT
713+119:3 glyph [
714+119:4 tight lit %|
715+119:7 name p
716+119:8 tight glyph =
717+119:9 tight tvar B
718+119:10 tight glyph ]
719+120:3 NEWLINE
720+120:3 glyph [
721+120:4 tight lit %&
722+120:7 name p
723+120:8 tight glyph =
724+120:9 tight tvar A
725+120:10 tight glyph ]
726+122:1 DEDENT
717727122:1 NEWLINE
718−122:1 glyph ++
719−122:4 name some
720−122:9 glyph |=
721−122:12 name item
722−122:16 tight glyph =
723−122:17 tight tvar A
724−122:19 glyph `
725−122:20 tight name item
728+122:1 glyph +$
729+122:4 name bloq
730+122:9 aura @
726731124:1 NEWLINE
727732124:1 glyph ++
728−124:4 name lure
733+124:4 name some
729734124:9 glyph |=
730735124:12 name item
731736124:16 tight glyph =
732737124:17 tight tvar A
733−125:3 INDENT
734−125:3 glyph ^-
735−125:6 glyph (
736−125:7 tight name list
737−125:12 tvar A
738−125:13 tight glyph )
739−125:15 glyph [
740−125:16 tight name item
741−125:21 lit ~
742−125:22 tight glyph ]
743−127:1 DEDENT
744−127:1 NEWLINE
745−127:1 glyph ++
746−127:4 name snoc
747−127:9 glyph |=
748−127:12 name args
749−127:16 tight glyph =
750−127:17 tight glyph [
751−127:18 tight glyph (
752−127:19 tight name list
753−127:24 tvar A
754−127:25 tight glyph )
755−127:27 tvar A
756−127:28 tight glyph ]
757−128:3 INDENT
758−128:3 glyph ?-
759−128:6 name args
760−129:5 INDENT
761−129:5 glyph [
762−129:6 tight name xs
763−129:9 name item
764−129:13 tight glyph ]
765−129:15 glyph (
766−129:16 tight name weld
767−129:21 name xs
768−129:24 glyph [
769−129:25 tight name item
770−129:30 lit ~
771−129:31 tight glyph ]
772−129:32 tight glyph )
773−131:1 DEDENT
774−131:1 DEDENT
775−131:1 NEWLINE
776−131:1 glyph ++
777−131:4 name flop
778−131:9 glyph |=
779−131:12 name xs
780−131:14 tight glyph =
781−131:15 tight glyph (
782−131:16 tight name list
783−131:21 tvar A
784−131:22 tight glyph )
785−132:3 INDENT
786−132:3 glyph ++
787−132:6 name reverse-into
788−132:19 glyph |=
789−132:22 name args
790−132:26 tight glyph =
791−132:27 tight glyph [
792−132:28 tight glyph (
793−132:29 tight name list
794−132:34 tvar A
795−132:35 tight glyph )
796−132:37 glyph (
797−132:38 tight name list
798−132:43 tvar A
799−132:44 tight glyph )
800−132:45 tight glyph ]
801−133:5 INDENT
802−133:5 glyph ?-
803−133:8 name args
804−134:7 INDENT
805−134:7 glyph [
806−134:8 tight name rest
807−134:13 name acc
808−134:16 tight glyph ]
809−135:9 INDENT
810−135:9 glyph ?-
811−135:12 name rest
812−136:11 INDENT
813−136:11 lit ~
738+124:19 glyph `
739+124:20 tight name item
740+126:1 NEWLINE
741+126:1 glyph ++
742+126:4 name lure
743+126:9 glyph |=
744+126:12 name item
745+126:16 tight glyph =
746+126:17 tight tvar A
747+127:3 INDENT
748+127:3 glyph ^-
749+127:6 glyph (
750+127:7 tight name list
751+127:12 tvar A
752+127:13 tight glyph )
753+127:15 glyph [
754+127:16 tight name item
755+127:21 lit ~
756+127:22 tight glyph ]
757+129:1 DEDENT
758+129:1 NEWLINE
759+129:1 glyph ++
760+129:4 name snoc
761+129:9 glyph |=
762+129:12 name args
763+129:16 tight glyph =
764+129:17 tight glyph [
765+129:18 tight glyph (
766+129:19 tight name list
767+129:24 tvar A
768+129:25 tight glyph )
769+129:27 tvar A
770+129:28 tight glyph ]
771+130:3 INDENT
772+130:3 glyph ?-
773+130:6 name args
774+131:5 INDENT
775+131:5 glyph [
776+131:6 tight name xs
777+131:9 name item
778+131:13 tight glyph ]
779+131:15 glyph (
780+131:16 tight name weld
781+131:21 name xs
782+131:24 glyph [
783+131:25 tight name item
784+131:30 lit ~
785+131:31 tight glyph ]
786+131:32 tight glyph )
787+133:1 DEDENT
788+133:1 DEDENT
789+133:1 NEWLINE
790+133:1 glyph ++
791+133:4 name flop
792+133:9 glyph |=
793+133:12 name xs
794+133:14 tight glyph =
795+133:15 tight glyph (
796+133:16 tight name list
797+133:21 tvar A
798+133:22 tight glyph )
799+134:3 INDENT
800+134:3 glyph ++
801+134:6 name reverse-into
802+134:19 glyph |=
803+134:22 name args
804+134:26 tight glyph =
805+134:27 tight glyph [
806+134:28 tight glyph (
807+134:29 tight name list
808+134:34 tvar A
809+134:35 tight glyph )
810+134:37 glyph (
811+134:38 tight name list
812+134:43 tvar A
813+134:44 tight glyph )
814+134:45 tight glyph ]
815+135:5 INDENT
816+135:5 glyph ?-
817+135:8 name args
818+136:7 INDENT
819+136:7 glyph [
820+136:8 tight name rest
814821136:13 name acc
815−137:11 NEWLINE
816−137:11 glyph [
817−137:12 tight name item
818−137:17 name more
819−137:21 tight glyph ]
820−137:23 glyph (
821−137:24 tight name reverse-into
822−137:37 name more
823−137:42 glyph [
824−137:43 tight name item
825−137:48 name acc
826−137:51 tight glyph ]
827−137:52 tight glyph )
828−138:3 DEDENT
829−138:3 DEDENT
830−138:3 DEDENT
831−138:3 DEDENT
832−138:3 NEWLINE
833−138:3 glyph (
834−138:4 tight name reverse-into
835−138:17 name xs
836−138:20 lit ~
837−138:21 tight glyph )
838−138:22 DEDENT
839−138:22 NEWLINE
822+136:16 tight glyph ]
823+137:9 INDENT
824+137:9 glyph ?-
825+137:12 name rest
826+138:11 INDENT
827+138:11 lit ~
828+138:13 name acc
829+139:11 NEWLINE
830+139:11 glyph [
831+139:12 tight name item
832+139:17 name more
833+139:21 tight glyph ]
834+139:23 glyph (
835+139:24 tight name reverse-into
836+139:37 name more
837+139:42 glyph [
838+139:43 tight name item
839+139:48 name acc
840+139:51 tight glyph ]
841+139:52 tight glyph )
842+140:3 DEDENT
843+140:3 DEDENT
844+140:3 DEDENT
845+140:3 DEDENT
846+140:3 NEWLINE
847+140:3 glyph (
848+140:4 tight name reverse-into
849+140:17 name xs
850+140:20 lit ~
851+140:21 tight glyph )
852+140:22 DEDENT
853+140:22 NEWLINE
tests/golden/prelude-list-helpers/tree.txt+245−239
@@ -87,254 +87,260 @@
8787 (arm 39:5
8888 (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
8989 (body 40:7
90− (branch 40:7
91− (wing 40:10 xs)
92− (arm 41:9 (lit 41:9 ~) (wing 41:11 ys))
93− (arm 42:9
94− (cell 42:9 (bind 42:10 item) (bind 42:15 rest))
95− (tuple 42:21
96− (wing 42:22 item)
97− (group 42:27
98− (call 42:28 (wing 42:28 weld) (wing 42:33 rest) (wing 42:38 ys))))))))))))
99− (value 44:1 turn
100− (gate 44:9
101− (face 44:12 args
102− (cell 44:17
103− (apply 44:18 list (tvar 44:24 A))
104− (fn 44:27 (tvar 44:30 A) (tvar 44:32 B))))
105− (body 45:3
106− (branch 45:3
107− (wing 45:6 args)
108− (arm 46:5
109− (cell 46:5 (bind 46:6 xs) (bind 46:9 f))
110− (body 47:7
111− (branch 47:7
112− (wing 47:10 xs)
113− (arm 48:9 (lit 48:9 ~) (lit 48:11 ~))
114− (arm 49:9
115− (cell 49:9 (bind 49:10 item) (bind 49:15 rest))
116− (tuple 49:21
117− (group 49:22
118− (call 49:23 (wing 49:23 f) (wing 49:25 item)))
119− (group 49:31
120− (call 49:32 (wing 49:32 turn) (wing 49:37 rest) (wing 49:42 f))))))))))))
121− (mold 51:1 dime
122− (cell 51:9
123− (face 51:10 p (aura 51:12 @ta))
124− (face 51:16 q (aura 51:18 @))))
125− (mold 53:1 hair
90+ (cast 40:7
91+ (apply 40:10 list (tvar 40:16 A))
92+ (body 41:9
93+ (branch 41:9
94+ (wing 41:12 xs)
95+ (arm 42:11 (lit 42:11 ~) (wing 42:13 ys))
96+ (arm 43:11
97+ (cell 43:11 (bind 43:12 item) (bind 43:17 rest))
98+ (tuple 43:23
99+ (wing 43:24 item)
100+ (group 43:29
101+ (call 43:30 (wing 43:30 weld) (wing 43:35 rest) (wing 43:40 ys))))))))))))))
102+ (value 45:1 turn
103+ (gate 45:9
104+ (face 45:12 args
105+ (cell 45:17
106+ (apply 45:18 list (tvar 45:24 A))
107+ (fn 45:27 (tvar 45:30 A) (tvar 45:32 B))))
108+ (body 46:3
109+ (branch 46:3
110+ (wing 46:6 args)
111+ (arm 47:5
112+ (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
113+ (body 48:7
114+ (cast 48:7
115+ (apply 48:10 list (tvar 48:16 B))
116+ (body 49:9
117+ (branch 49:9
118+ (wing 49:12 xs)
119+ (arm 50:11 (lit 50:11 ~) (lit 50:13 ~))
120+ (arm 51:11
121+ (cell 51:11 (bind 51:12 item) (bind 51:17 rest))
122+ (tuple 51:23
123+ (group 51:24
124+ (call 51:25 (wing 51:25 f) (wing 51:27 item)))
125+ (group 51:33
126+ (call 51:34 (wing 51:34 turn) (wing 51:39 rest) (wing 51:44 f))))))))))))))
127+ (mold 53:1 dime
126128 (cell 53:9
127− (face 53:10 p (aura 53:12 @ud))
128− (face 53:16 q (aura 53:18 @ud))))
129− (mold 55:1 pint
129+ (face 53:10 p (aura 53:12 @ta))
130+ (face 53:16 q (aura 53:18 @))))
131+ (mold 55:1 hair
130132 (cell 55:9
131− (face 55:10 p
132− (cell 55:12
133− (face 55:13 p (aura 55:15 @))
134− (face 55:17 q (aura 55:19 @))))
135− (face 55:22 q
136− (cell 55:24
137− (face 55:25 p (aura 55:27 @))
138− (face 55:29 q (aura 55:31 @))))))
139− (mold 57:1 coin
140− (union 58:3
141− (cell 58:3
142− (const 58:4 %$)
143− (face 58:7 p (ref 58:9 dime)))
144− (cell 59:3
145− (const 59:4 %blob)
146− (face 59:10 p (noun 59:12)))
133+ (face 55:10 p (aura 55:12 @ud))
134+ (face 55:16 q (aura 55:18 @ud))))
135+ (mold 57:1 pint
136+ (cell 57:9
137+ (face 57:10 p
138+ (cell 57:12
139+ (face 57:13 p (aura 57:15 @))
140+ (face 57:17 q (aura 57:19 @))))
141+ (face 57:22 q
142+ (cell 57:24
143+ (face 57:25 p (aura 57:27 @))
144+ (face 57:29 q (aura 57:31 @))))))
145+ (mold 59:1 coin
146+ (union 60:3
147147 (cell 60:3
148− (const 60:4 %many)
149− (face 60:10 p
150− (apply 60:12 list (ref 60:18 coin))))))
151− (mold 62:1 pair
152− (generic 62:9 A B
153− (cell 62:18
154− (face 62:19 p (tvar 62:21 A))
155− (face 62:23 q (tvar 62:25 B)))))
156− (mold 64:1 trel
157− (generic 64:9 A B C
158− (cell 64:20
159− (face 64:21 p (tvar 64:23 A))
160− (face 64:25 q (tvar 64:27 B))
161− (face 64:29 r (tvar 64:31 C)))))
162− (mold 66:1 qual
163− (generic 66:9 A B C D
164− (cell 66:22
165− (face 66:23 p (tvar 66:25 A))
166− (face 66:27 q (tvar 66:29 B))
167− (face 66:31 r (tvar 66:33 C))
168− (face 66:35 s (tvar 66:37 D)))))
169− (mold 68:1 cord (aura 68:9 @t))
170− (mold 70:1 knot (aura 70:9 @ta))
171− (mold 72:1 tape
172− (apply 72:9 list (aura 72:15 @tD)))
173− (mold 74:1 path
174− (apply 74:9 list (ref 74:15 knot)))
175− (mold 76:1 tank
176− (union 77:3
177− (ref 77:3 cord)
178− (cell 78:3
179− (const 78:4 %leaf)
180− (face 78:10 p (ref 78:12 tape)))
181− (cell 79:3
182− (const 79:4 %palm)
183− (face 79:10 p
184− (apply 79:12 qual (ref 79:18 tape) (ref 79:23 tape) (ref 79:28 tape) (ref 79:33 tape)))
185− (face 79:39 q
186− (apply 79:41 list (ref 79:47 tank))))
148+ (const 60:4 %$)
149+ (face 60:7 p (ref 60:9 dime)))
150+ (cell 61:3
151+ (const 61:4 %blob)
152+ (face 61:10 p (noun 61:12)))
153+ (cell 62:3
154+ (const 62:4 %many)
155+ (face 62:10 p
156+ (apply 62:12 list (ref 62:18 coin))))))
157+ (mold 64:1 pair
158+ (generic 64:9 A B
159+ (cell 64:18
160+ (face 64:19 p (tvar 64:21 A))
161+ (face 64:23 q (tvar 64:25 B)))))
162+ (mold 66:1 trel
163+ (generic 66:9 A B C
164+ (cell 66:20
165+ (face 66:21 p (tvar 66:23 A))
166+ (face 66:25 q (tvar 66:27 B))
167+ (face 66:29 r (tvar 66:31 C)))))
168+ (mold 68:1 qual
169+ (generic 68:9 A B C D
170+ (cell 68:22
171+ (face 68:23 p (tvar 68:25 A))
172+ (face 68:27 q (tvar 68:29 B))
173+ (face 68:31 r (tvar 68:33 C))
174+ (face 68:35 s (tvar 68:37 D)))))
175+ (mold 70:1 cord (aura 70:9 @t))
176+ (mold 72:1 knot (aura 72:9 @ta))
177+ (mold 74:1 tape
178+ (apply 74:9 list (aura 74:15 @tD)))
179+ (mold 76:1 path
180+ (apply 76:9 list (ref 76:15 knot)))
181+ (mold 78:1 tank
182+ (union 79:3
183+ (ref 79:3 cord)
187184 (cell 80:3
188− (const 80:4 %rose)
189− (face 80:10 p
190− (apply 80:12 trel (ref 80:18 tape) (ref 80:23 tape) (ref 80:28 tape)))
191− (face 80:34 q
192− (apply 80:36 list (ref 80:42 tank))))))
193− (mold 82:1 nail
194− (cell 82:9
195− (face 82:10 p (ref 82:12 hair))
196− (face 82:17 q (ref 82:19 tape))))
197− (mold 84:1 edge
185+ (const 80:4 %leaf)
186+ (face 80:10 p (ref 80:12 tape)))
187+ (cell 81:3
188+ (const 81:4 %palm)
189+ (face 81:10 p
190+ (apply 81:12 qual (ref 81:18 tape) (ref 81:23 tape) (ref 81:28 tape) (ref 81:33 tape)))
191+ (face 81:39 q
192+ (apply 81:41 list (ref 81:47 tank))))
193+ (cell 82:3
194+ (const 82:4 %rose)
195+ (face 82:10 p
196+ (apply 82:12 trel (ref 82:18 tape) (ref 82:23 tape) (ref 82:28 tape)))
197+ (face 82:34 q
198+ (apply 82:36 list (ref 82:42 tank))))))
199+ (mold 84:1 nail
198200 (cell 84:9
199201 (face 84:10 p (ref 84:12 hair))
200− (face 84:17 q
201− (apply 84:19 unit
202− (cell 84:25
203− (face 84:26 p (noun 84:28))
204− (face 84:30 q (ref 84:32 nail)))))))
205− (mold 86:1 rule
206− (fn 86:9 (ref 86:12 nail) (ref 86:17 edge)))
207− (mold 88:1 spot
208− (cell 88:9
209− (face 88:10 p (ref 88:12 path))
210− (face 88:17 q (ref 88:19 pint))))
211− (mold 90:1 toon
212− (union 91:3
213− (cell 91:3
214− (const 91:4 %0)
215− (face 91:7 p (noun 91:9)))
216− (cell 92:3
217− (const 92:4 %1)
218− (face 92:7 p (noun 92:9)))
202+ (face 84:17 q (ref 84:19 tape))))
203+ (mold 86:1 edge
204+ (cell 86:9
205+ (face 86:10 p (ref 86:12 hair))
206+ (face 86:17 q
207+ (apply 86:19 unit
208+ (cell 86:25
209+ (face 86:26 p (noun 86:28))
210+ (face 86:30 q (ref 86:32 nail)))))))
211+ (mold 88:1 rule
212+ (fn 88:9 (ref 88:12 nail) (ref 88:17 edge)))
213+ (mold 90:1 spot
214+ (cell 90:9
215+ (face 90:10 p (ref 90:12 path))
216+ (face 90:17 q (ref 90:19 pint))))
217+ (mold 92:1 toon
218+ (union 93:3
219219 (cell 93:3
220− (const 93:4 %2)
221− (face 93:7 p
222− (apply 93:9 list (ref 93:15 tank))))))
223− (mold 95:1 like
224− (generic 95:9 A
225− (cell 95:16
226− (face 95:17 p (ref 95:19 hair))
227− (face 95:24 q
228− (apply 95:26 unit
229− (cell 95:32
230− (face 95:33 p (tvar 95:35 A))
231− (face 95:37 q (ref 95:39 nail))))))))
232− (value 97:1 wonk
233− (gate 97:9
234− (face 97:12 veq
235− (apply 97:16 like (tvar 97:22 A)))
236− (body 98:3
237− (branch 98:3
238− (wing 98:6 q.veq)
239− (arm 99:5 (lit 99:5 ~) (crash 99:7))
240− (arm 100:5
241− (cell 100:5 (lit 100:6 ~) (bind 100:8 product))
242− (wing 100:17 p.product))))))
243− (mold 102:1 lone
244− (generic 102:9 A
245− (cell 102:16
246− (face 102:17 p (tvar 102:19 A)))))
247− (mold 104:1 lest
220+ (const 93:4 %0)
221+ (face 93:7 p (noun 93:9)))
222+ (cell 94:3
223+ (const 94:4 %1)
224+ (face 94:7 p (noun 94:9)))
225+ (cell 95:3
226+ (const 95:4 %2)
227+ (face 95:7 p
228+ (apply 95:9 list (ref 95:15 tank))))))
229+ (mold 97:1 like
230+ (generic 97:9 A
231+ (cell 97:16
232+ (face 97:17 p (ref 97:19 hair))
233+ (face 97:24 q
234+ (apply 97:26 unit
235+ (cell 97:32
236+ (face 97:33 p (tvar 97:35 A))
237+ (face 97:37 q (ref 97:39 nail))))))))
238+ (value 99:1 wonk
239+ (gate 99:9
240+ (face 99:12 veq
241+ (apply 99:16 like (tvar 99:22 A)))
242+ (body 100:3
243+ (branch 100:3
244+ (wing 100:6 q.veq)
245+ (arm 101:5 (lit 101:5 ~) (crash 101:7))
246+ (arm 102:5
247+ (cell 102:5 (lit 102:6 ~) (bind 102:8 product))
248+ (wing 102:17 p.product))))))
249+ (mold 104:1 lone
248250 (generic 104:9 A
249251 (cell 104:16
250− (face 104:17 i (tvar 104:19 A))
251− (face 104:21 t
252− (apply 104:23 list (tvar 104:29 A))))))
253− (mold 106:1 pole
252+ (face 104:17 p (tvar 104:19 A)))))
253+ (mold 106:1 lest
254254 (generic 106:9 A
255− (union 107:3
256− (const 107:3 ~)
257− (cell 108:3
258− (tvar 108:4 A)
259− (apply 108:6 pole (tvar 108:12 A))))))
260− (mold 110:1 quip
261− (generic 110:9 A B
262− (cell 110:18
263− (apply 110:19 list (tvar 110:25 A))
264− (tvar 110:28 B))))
265− (mold 112:1 tree
266− (generic 112:9 A
267− (union 113:3
268− (const 113:3 ~)
269− (cell 114:3
270− (face 114:4 n (tvar 114:6 A))
271− (face 114:8 l
272− (apply 114:10 tree (tvar 114:16 A)))
273− (face 114:19 r
274− (apply 114:21 tree (tvar 114:27 A)))))))
275− (mold 116:1 each
276− (generic 116:9 A B
277− (union 117:3
278− (cell 117:3
279− (const 117:4 %|)
280− (face 117:7 p (tvar 117:9 B)))
281− (cell 118:3
282− (const 118:4 %&)
283− (face 118:7 p (tvar 118:9 A))))))
284− (mold 120:1 bloq (aura 120:9 @))
285− (value 122:1 some
286− (gate 122:9
287− (face 122:12 item (tvar 122:17 A))
288− (unit 122:19 (wing 122:20 item))))
289− (value 124:1 lure
255+ (cell 106:16
256+ (face 106:17 i (tvar 106:19 A))
257+ (face 106:21 t
258+ (apply 106:23 list (tvar 106:29 A))))))
259+ (mold 108:1 pole
260+ (generic 108:9 A
261+ (union 109:3
262+ (const 109:3 ~)
263+ (cell 110:3
264+ (tvar 110:4 A)
265+ (apply 110:6 pole (tvar 110:12 A))))))
266+ (mold 112:1 quip
267+ (generic 112:9 A B
268+ (cell 112:18
269+ (apply 112:19 list (tvar 112:25 A))
270+ (tvar 112:28 B))))
271+ (mold 114:1 tree
272+ (generic 114:9 A
273+ (union 115:3
274+ (const 115:3 ~)
275+ (cell 116:3
276+ (face 116:4 n (tvar 116:6 A))
277+ (face 116:8 l
278+ (apply 116:10 tree (tvar 116:16 A)))
279+ (face 116:19 r
280+ (apply 116:21 tree (tvar 116:27 A)))))))
281+ (mold 118:1 each
282+ (generic 118:9 A B
283+ (union 119:3
284+ (cell 119:3
285+ (const 119:4 %|)
286+ (face 119:7 p (tvar 119:9 B)))
287+ (cell 120:3
288+ (const 120:4 %&)
289+ (face 120:7 p (tvar 120:9 A))))))
290+ (mold 122:1 bloq (aura 122:9 @))
291+ (value 124:1 some
290292 (gate 124:9
291293 (face 124:12 item (tvar 124:17 A))
292− (body 125:3
293− (cast 125:3
294− (apply 125:6 list (tvar 125:12 A))
295− (tuple 125:15 (wing 125:16 item) (lit 125:21 ~))))))
296− (value 127:1 snoc
297− (gate 127:9
298− (face 127:12 args
299− (cell 127:17
300− (apply 127:18 list (tvar 127:24 A))
301− (tvar 127:27 A)))
302− (body 128:3
303− (branch 128:3
304− (wing 128:6 args)
305− (arm 129:5
306− (cell 129:5 (bind 129:6 xs) (bind 129:9 item))
307− (group 129:15
308− (call 129:16
309− (wing 129:16 weld)
310− (wing 129:21 xs)
311− (tuple 129:24 (wing 129:25 item) (lit 129:30 ~)))))))))
312− (value 131:1 flop
313− (gate 131:9
314− (face 131:12 xs
315− (apply 131:15 list (tvar 131:21 A)))
316− (body 132:3
317− (value 132:3 reverse-into
318− (gate 132:19
319− (face 132:22 args
320− (cell 132:27
321− (apply 132:28 list (tvar 132:34 A))
322− (apply 132:37 list (tvar 132:43 A))))
323− (body 133:5
324− (branch 133:5
325− (wing 133:8 args)
326− (arm 134:7
327− (cell 134:7 (bind 134:8 rest) (bind 134:13 acc))
328− (body 135:9
329− (branch 135:9
330− (wing 135:12 rest)
331− (arm 136:11 (lit 136:11 ~) (wing 136:13 acc))
332− (arm 137:11
333− (cell 137:11 (bind 137:12 item) (bind 137:17 more))
334− (group 137:23
335− (call 137:24
336− (wing 137:24 reverse-into)
337− (wing 137:37 more)
338− (tuple 137:42 (wing 137:43 item) (wing 137:48 acc))))))))))))
339− (group 138:3
340− (call 138:4 (wing 138:4 reverse-into) (wing 138:17 xs) (lit 138:20 ~)))))))
294+ (unit 124:19 (wing 124:20 item))))
295+ (value 126:1 lure
296+ (gate 126:9
297+ (face 126:12 item (tvar 126:17 A))
298+ (body 127:3
299+ (cast 127:3
300+ (apply 127:6 list (tvar 127:12 A))
301+ (tuple 127:15 (wing 127:16 item) (lit 127:21 ~))))))
302+ (value 129:1 snoc
303+ (gate 129:9
304+ (face 129:12 args
305+ (cell 129:17
306+ (apply 129:18 list (tvar 129:24 A))
307+ (tvar 129:27 A)))
308+ (body 130:3
309+ (branch 130:3
310+ (wing 130:6 args)
311+ (arm 131:5
312+ (cell 131:5 (bind 131:6 xs) (bind 131:9 item))
313+ (group 131:15
314+ (call 131:16
315+ (wing 131:16 weld)
316+ (wing 131:21 xs)
317+ (tuple 131:24 (wing 131:25 item) (lit 131:30 ~)))))))))
318+ (value 133:1 flop
319+ (gate 133:9
320+ (face 133:12 xs
321+ (apply 133:15 list (tvar 133:21 A)))
322+ (body 134:3
323+ (value 134:3 reverse-into
324+ (gate 134:19
325+ (face 134:22 args
326+ (cell 134:27
327+ (apply 134:28 list (tvar 134:34 A))
328+ (apply 134:37 list (tvar 134:43 A))))
329+ (body 135:5
330+ (branch 135:5
331+ (wing 135:8 args)
332+ (arm 136:7
333+ (cell 136:7 (bind 136:8 rest) (bind 136:13 acc))
334+ (body 137:9
335+ (branch 137:9
336+ (wing 137:12 rest)
337+ (arm 138:11 (lit 138:11 ~) (wing 138:13 acc))
338+ (arm 139:11
339+ (cell 139:11 (bind 139:12 item) (bind 139:17 more))
340+ (group 139:23
341+ (call 139:24
342+ (wing 139:24 reverse-into)
343+ (wing 139:37 more)
344+ (tuple 139:42 (wing 139:43 item) (wing 139:48 acc))))))))))))
345+ (group 140:3
346+ (call 140:4 (wing 140:4 reverse-into) (wing 140:17 xs) (lit 140:20 ~)))))))
tests/golden/prelude-list-helpers/types.txt+3−3
@@ -5,8 +5,8 @@ partial inference; module not checked
55++ not: $-(? ?)
66+$ list: cases proven disjoint; mold not checked
77+$ unit: cases proven disjoint; mold not checked
8−++ fall: sample mold is not supported by partial inference
9−++ need: sample mold is not supported by partial inference
8+++ fall: $-([(unit A) A] A)
9+++ need: $-((unit A) A)
1010++ weld: sample mold is not supported by partial inference
1111++ turn: sample mold is not supported by partial inference
1212+$ dime: not checked
@@ -35,7 +35,7 @@ partial inference; module not checked
3535+$ tree: cases proven disjoint; mold not checked
3636+$ each: cases proven disjoint; mold not checked
3737+$ bloq: not checked
38−++ some: expression is not supported by partial inference
38+++ some: unit construction needs the standard prelude in partial inference
3939++ lure: cast mold is not supported by partial inference
4040++ snoc: sample mold is not supported by partial inference
4141++ flop: sample mold is not supported by partial inference
tests/golden/prelude-list-unit/source.jibb+8−6
@@ -37,13 +37,15 @@
3737++ weld |= args=[(list A) (list A)]
3838 ?- args
3939 [xs ys]
40− ?- xs
41− ~ ys
42− [item rest] [item (weld rest ys)]
40+ ^- (list A)
41+ ?- xs
42+ ~ ys
43+ [item rest] [item (weld rest ys)]
4344
4445++ turn |= args=[(list A) $-(A B)]
4546 ?- args
4647 [xs f]
47− ?- xs
48− ~ ~
49− [item rest] [(f item) (turn rest f)]
48+ ^- (list B)
49+ ?- xs
50+ ~ ~
51+ [item rest] [(f item) (turn rest f)]
tests/golden/prelude-list-unit/tokens.txt+86−72
@@ -190,76 +190,90 @@
19019039:9 name ys
19119139:11 tight glyph ]
19219240:7 INDENT
193−40:7 glyph ?-
194−40:10 name xs
193+40:7 glyph ^-
194+40:10 glyph (
195+40:11 tight name list
196+40:16 tvar A
197+40:17 tight glyph )
19519841:9 INDENT
196−41:9 lit ~
197−41:11 name ys
198−42:9 NEWLINE
199−42:9 glyph [
200−42:10 tight name item
201−42:15 name rest
202−42:19 tight glyph ]
203−42:21 glyph [
204−42:22 tight name item
205−42:27 glyph (
206−42:28 tight name weld
207−42:33 name rest
208−42:38 name ys
209−42:40 tight glyph )
210−42:41 tight glyph ]
211−44:1 DEDENT
212−44:1 DEDENT
213−44:1 DEDENT
214−44:1 DEDENT
215−44:1 NEWLINE
216−44:1 glyph ++
217−44:4 name turn
218−44:9 glyph |=
219−44:12 name args
220−44:16 tight glyph =
221−44:17 tight glyph [
222−44:18 tight glyph (
223−44:19 tight name list
224−44:24 tvar A
225−44:25 tight glyph )
226−44:27 glyph $-(
227−44:30 tight tvar A
228−44:32 tvar B
229−44:33 tight glyph )
230−44:34 tight glyph ]
231−45:3 INDENT
232−45:3 glyph ?-
233−45:6 name args
234−46:5 INDENT
235−46:5 glyph [
236−46:6 tight name xs
237−46:9 name f
238−46:10 tight glyph ]
239−47:7 INDENT
240−47:7 glyph ?-
241−47:10 name xs
242−48:9 INDENT
243−48:9 lit ~
244−48:11 lit ~
245−49:9 NEWLINE
246−49:9 glyph [
247−49:10 tight name item
248−49:15 name rest
249−49:19 tight glyph ]
250−49:21 glyph [
251−49:22 tight glyph (
252−49:23 tight name f
253−49:25 name item
254−49:29 tight glyph )
255−49:31 glyph (
256−49:32 tight name turn
257−49:37 name rest
258−49:42 name f
259−49:43 tight glyph )
260−49:44 tight glyph ]
261−49:45 DEDENT
262−49:45 DEDENT
263−49:45 DEDENT
264−49:45 DEDENT
265−49:45 NEWLINE
199+41:9 glyph ?-
200+41:12 name xs
201+42:11 INDENT
202+42:11 lit ~
203+42:13 name ys
204+43:11 NEWLINE
205+43:11 glyph [
206+43:12 tight name item
207+43:17 name rest
208+43:21 tight glyph ]
209+43:23 glyph [
210+43:24 tight name item
211+43:29 glyph (
212+43:30 tight name weld
213+43:35 name rest
214+43:40 name ys
215+43:42 tight glyph )
216+43:43 tight glyph ]
217+45:1 DEDENT
218+45:1 DEDENT
219+45:1 DEDENT
220+45:1 DEDENT
221+45:1 DEDENT
222+45:1 NEWLINE
223+45:1 glyph ++
224+45:4 name turn
225+45:9 glyph |=
226+45:12 name args
227+45:16 tight glyph =
228+45:17 tight glyph [
229+45:18 tight glyph (
230+45:19 tight name list
231+45:24 tvar A
232+45:25 tight glyph )
233+45:27 glyph $-(
234+45:30 tight tvar A
235+45:32 tvar B
236+45:33 tight glyph )
237+45:34 tight glyph ]
238+46:3 INDENT
239+46:3 glyph ?-
240+46:6 name args
241+47:5 INDENT
242+47:5 glyph [
243+47:6 tight name xs
244+47:9 name f
245+47:10 tight glyph ]
246+48:7 INDENT
247+48:7 glyph ^-
248+48:10 glyph (
249+48:11 tight name list
250+48:16 tvar B
251+48:17 tight glyph )
252+49:9 INDENT
253+49:9 glyph ?-
254+49:12 name xs
255+50:11 INDENT
256+50:11 lit ~
257+50:13 lit ~
258+51:11 NEWLINE
259+51:11 glyph [
260+51:12 tight name item
261+51:17 name rest
262+51:21 tight glyph ]
263+51:23 glyph [
264+51:24 tight glyph (
265+51:25 tight name f
266+51:27 name item
267+51:31 tight glyph )
268+51:33 glyph (
269+51:34 tight name turn
270+51:39 name rest
271+51:44 name f
272+51:45 tight glyph )
273+51:46 tight glyph ]
274+51:47 DEDENT
275+51:47 DEDENT
276+51:47 DEDENT
277+51:47 DEDENT
278+51:47 DEDENT
279+51:47 NEWLINE
tests/golden/prelude-list-unit/tree.txt+37−31
@@ -87,34 +87,40 @@
8787 (arm 39:5
8888 (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
8989 (body 40:7
90− (branch 40:7
91− (wing 40:10 xs)
92− (arm 41:9 (lit 41:9 ~) (wing 41:11 ys))
93− (arm 42:9
94− (cell 42:9 (bind 42:10 item) (bind 42:15 rest))
95− (tuple 42:21
96− (wing 42:22 item)
97− (group 42:27
98− (call 42:28 (wing 42:28 weld) (wing 42:33 rest) (wing 42:38 ys))))))))))))
99− (value 44:1 turn
100− (gate 44:9
101− (face 44:12 args
102− (cell 44:17
103− (apply 44:18 list (tvar 44:24 A))
104− (fn 44:27 (tvar 44:30 A) (tvar 44:32 B))))
105− (body 45:3
106− (branch 45:3
107− (wing 45:6 args)
108− (arm 46:5
109− (cell 46:5 (bind 46:6 xs) (bind 46:9 f))
110− (body 47:7
111− (branch 47:7
112− (wing 47:10 xs)
113− (arm 48:9 (lit 48:9 ~) (lit 48:11 ~))
114− (arm 49:9
115− (cell 49:9 (bind 49:10 item) (bind 49:15 rest))
116− (tuple 49:21
117− (group 49:22
118− (call 49:23 (wing 49:23 f) (wing 49:25 item)))
119− (group 49:31
120− (call 49:32 (wing 49:32 turn) (wing 49:37 rest) (wing 49:42 f)))))))))))))
90+ (cast 40:7
91+ (apply 40:10 list (tvar 40:16 A))
92+ (body 41:9
93+ (branch 41:9
94+ (wing 41:12 xs)
95+ (arm 42:11 (lit 42:11 ~) (wing 42:13 ys))
96+ (arm 43:11
97+ (cell 43:11 (bind 43:12 item) (bind 43:17 rest))
98+ (tuple 43:23
99+ (wing 43:24 item)
100+ (group 43:29
101+ (call 43:30 (wing 43:30 weld) (wing 43:35 rest) (wing 43:40 ys))))))))))))))
102+ (value 45:1 turn
103+ (gate 45:9
104+ (face 45:12 args
105+ (cell 45:17
106+ (apply 45:18 list (tvar 45:24 A))
107+ (fn 45:27 (tvar 45:30 A) (tvar 45:32 B))))
108+ (body 46:3
109+ (branch 46:3
110+ (wing 46:6 args)
111+ (arm 47:5
112+ (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
113+ (body 48:7
114+ (cast 48:7
115+ (apply 48:10 list (tvar 48:16 B))
116+ (body 49:9
117+ (branch 49:9
118+ (wing 49:12 xs)
119+ (arm 50:11 (lit 50:11 ~) (lit 50:13 ~))
120+ (arm 51:11
121+ (cell 51:11 (bind 51:12 item) (bind 51:17 rest))
122+ (tuple 51:23
123+ (group 51:24
124+ (call 51:25 (wing 51:25 f) (wing 51:27 item)))
125+ (group 51:33
126+ (call 51:34 (wing 51:34 turn) (wing 51:39 rest) (wing 51:44 f)))))))))))))))
tests/golden/prelude-list-unit/types.txt+2−2
@@ -5,7 +5,7 @@ partial inference; module not checked
55++ not: $-(? ?)
66+$ list: cases proven disjoint; mold not checked
77+$ unit: cases proven disjoint; mold not checked
8−++ fall: sample mold is not supported by partial inference
9−++ need: sample mold is not supported by partial inference
8+++ fall: $-([(unit A) A] A)
9+++ need: $-((unit A) A)
1010++ weld: sample mold is not supported by partial inference
1111++ turn: sample mold is not supported by partial inference
tests/golden/prelude-unit-list-transforms/about.txt+2−2
@@ -1,4 +1,4 @@
1−source: Overview, Prelude: "The exported inventory includes all names from the Hoon library sections listed below, excluding the groups explicitly left out"; Hoon 2a includes `drop`, `bind`, `biff`, `both` and `clef`, and 2b includes `skim`, `skip`, `levy`, `lien`, `roll` and `reel`. Folds take an explicit start.
2−tests: The complete current prelude parses, including unit-to-list conversion, unit mapping and flat mapping, two ways to combine units, complementary list filters, all/any predicates, and left and right folds. The filters retain the order of their selected items.
1+source: Overview, Prelude: "The exported inventory includes all names from the Hoon library sections listed below, excluding the groups explicitly left out"; Hoon 2a includes `drop`, `bind`, `biff`, `flit`, `both`, `clap` and `clef`, and 2b includes `join`, `murn`, `rear`, `snip`, `skim`, `skip`, `levy`, `lien`, `roll` and `reel`. Folds take an explicit start.
2+tests: The complete current prelude parses, including unit-to-list conversion, unit mapping and flat mapping, a curried unit-producing filter, three ways to combine units, including `clap` with one shared value type, complementary list filters, present-product mapping, joining, last-item operations, all/any predicates, and left and right folds. The filters retain the order of their selected items.
33expect: parses
44expect-types: a partial inference report, not a checked module; unit and list gate typing is not complete
tests/golden/prelude-unit-list-transforms/source.jibb+131−43
@@ -1,4 +1,8 @@
1+/= internal /lib/jibb/internal
2++$ poke poke.internal
3+
14:: Initial prelude functions. The rest of the inventory is still to come.
5+
26++ same |= x=A x
37
48++ head |= p=[A B]
@@ -37,16 +41,18 @@
3741++ weld |= args=[(list A) (list A)]
3842 ?- args
3943 [xs ys]
40− ?- xs
41− ~ ys
42− [item rest] [item (weld rest ys)]
44+ ^- (list A)
45+ ?- xs
46+ ~ ys
47+ [item rest] [item (weld rest ys)]
4348
4449++ turn |= args=[(list A) $-(A B)]
4550 ?- args
4651 [xs f]
47− ?- xs
48− ~ ~
49− [item rest] [(f item) (turn rest f)]
52+ ^- (list B)
53+ ?- xs
54+ ~ ~
55+ [item rest] [(f item) (turn rest f)]
5056
5157+$ dime [p=@ta q=@]
5258
@@ -138,27 +144,28 @@
138144 (reverse-into xs ~)
139145
140146++ drop |= maybe=(unit A)
141− ?- maybe
142− ~ ~
143− [~ value] [value ~]
147+ ^- (list A)
148+ ?- maybe
149+ ~ ~
150+ [~ value] [value ~]
144151
145152++ bind |= args=[(unit A) $-(A B)]
146153 ?- args
147− [maybe f]
154+ [maybe f] ^- (unit B)
148155 ?- maybe
149156 ~ ~
150157 [~ value] `(f value)
151158
152159++ biff |= args=[(unit A) $-(A (unit B))]
153160 ?- args
154− [maybe f]
161+ [maybe f] ^- (unit B)
155162 ?- maybe
156163 ~ ~
157164 [~ value] (f value)
158165
159166++ both |= args=[(unit A) (unit B)]
160167 ?- args
161− [first second]
168+ [first second] ^- (unit [A B])
162169 ?- first
163170 ~ ~
164171 [~ a]
@@ -166,9 +173,19 @@
166173 ~ ~
167174 [~ b] `[a b]
168175
176+++ clap |= args=[(unit A) (unit A) $-([A A] A)]
177+ ?- args
178+ [first second combine] ^- (unit A)
179+ ?- first
180+ ~ second
181+ [~ a]
182+ ?- second
183+ ~ first
184+ [~ b] `(combine a b)
185+
169186++ clef |= args=[(unit A) (unit B) $-([A B] (unit C))]
170187 ?- args
171− [first second combine]
188+ [first second combine] ^- (unit C)
172189 ?- first
173190 ~ ~
174191 [~ a]
@@ -178,43 +195,45 @@
178195
179196++ skim |= args=[(list A) $-(A ?)]
180197 ?- args
181− [xs predicate]
182− ?- xs
183− ~ ~
184− [item rest]
185− ?- (predicate item)
186− %.y [item (skim rest predicate)]
187− %.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)
188205
189206++ skip |= args=[(list A) $-(A ?)]
190207 ?- args
191− [xs predicate]
192− ?- xs
193− ~ ~
194− [item rest]
195− ?- (predicate item)
196− %.y (skip rest predicate)
197− %.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)]
198215
199216++ levy |= args=[(list A) $-(A ?)]
200− ?- args
201− [xs predicate]
202− ?- xs
203− ~ %.y
204− [item rest]
205− ?- (predicate item)
206− %.y (levy rest predicate)
207− %.n %.n
217+ ^- ?
218+ ?- args
219+ [xs predicate]
220+ ?- xs
221+ ~ %.y
222+ [item rest]
223+ ?- (predicate item)
224+ %.y (levy rest predicate)
225+ %.n %.n
208226
209227++ lien |= args=[(list A) $-(A ?)]
210− ?- args
211− [xs predicate]
212− ?- xs
213− ~ %.n
214− [item rest]
215− ?- (predicate item)
216− %.y %.y
217− %.n (lien rest predicate)
228+ ^- ?
229+ ?- args
230+ [xs predicate]
231+ ?- xs
232+ ~ %.n
233+ [item rest]
234+ ?- (predicate item)
235+ %.y %.y
236+ %.n (lien rest predicate)
218237
219238++ roll |= args=[(list A) B $-([A B] B)]
220239 ?- args
@@ -229,3 +248,72 @@
229248 ?- xs
230249 ~ start
231250 [item rest] (combine item (reel rest start combine))
251+
252+++ flit |= predicate=$-(A ?)
253+ |= value=A
254+ ^- (unit A)
255+ ?- (predicate value)
256+ %.y `value
257+ %.n ~
258+
259+++ murn |= args=[(list A) $-(A (unit B))]
260+ ?- args
261+ [xs f] ^- (list B)
262+ ?- xs
263+ ~ ~
264+ [item rest]
265+ ?- (f item)
266+ ~ (murn rest f)
267+ [~ value] [value (murn rest f)]
268+
269+++ join |= args=[A (list A)]
270+ ?- args
271+ [separator xs] ^- (list A)
272+ ?- xs
273+ ~ ~
274+ [item rest]
275+ ?- rest
276+ ~ [item ~]
277+ [next more] [item [separator (join separator rest)]]
278+
279+++ snip |= xs=(list A)
280+ ^- (list A)
281+ ?- xs
282+ ~ ~
283+ [item rest]
284+ ?- rest
285+ ~ ~
286+ [next more] [item (snip rest)]
287+
288+++ rear |= xs=(list A)
289+ ?- xs
290+ ~ !!
291+ [item rest]
292+ ?- rest
293+ ~ item
294+ [next more] (rear rest)
295+
296+++ cork |= gates=[$-(A B) $-(B C)]
297+ ?- gates
298+ [f g] |= x=A (g (f x))
299+
300+++ corl |= gates=[$-(B C) $-(A B)]
301+ ?- gates
302+ [f g] |= x=A (f (g x))
303+
304+++ cury |= args=[$-([A B] C) A]
305+ ?- args
306+ [f a] |= b=B (f a b)
307+
308+++ curr |= args=[$-([A B] C) B]
309+ ?- args
310+ [f b] |= a=A (f a b)
311+
312++$ cmd |$ [M]
313+ [%poke p=poke reply=$-((unit @t) M)]
314+ [%go url=@t]
315+ [%wait gap=@dr msg=M]
316+ [%now reply=$-(@da M)]
317+ [%who reply=$-(@p M)]
318+
319+++ gth |= args=[A A] (gth-atom.internal args)
tests/golden/prelude-unit-list-transforms/tokens.txt+1915−1279
@@ -1,34 +1,26 @@
1−2:1 glyph ++
2−2:4 name same
3−2:9 glyph |=
4−2:12 name x
5−2:13 tight glyph =
6−2:14 tight tvar A
7−2:16 name x
8−4:1 NEWLINE
9−4:1 glyph ++
10−4:4 name head
11−4:9 glyph |=
12−4:12 name p
13−4:13 tight glyph =
14−4:14 tight glyph [
15−4:15 tight tvar A
16−4:17 tvar B
17−4:18 tight glyph ]
18−5:3 INDENT
19−5:3 glyph ?-
20−5:6 name p
21−6:5 INDENT
22−6:5 glyph [
23−6:6 tight name a
24−6:8 name b
25−6:9 tight glyph ]
26−6:11 name a
27−8:1 DEDENT
28−8:1 DEDENT
1+1:1 glyph /=
2+1:4 name internal
3+1:13 glyph /
4+1:14 tight knot lib
5+1:17 tight glyph /
6+1:18 tight knot jibb
7+1:22 tight glyph /
8+1:23 tight knot internal
9+2:1 NEWLINE
10+2:1 glyph +$
11+2:4 name poke
12+2:9 wing poke.internal
13+6:1 NEWLINE
14+6:1 glyph ++
15+6:4 name same
16+6:9 glyph |=
17+6:12 name x
18+6:13 tight glyph =
19+6:14 tight tvar A
20+6:16 name x
29218:1 NEWLINE
30228:1 glyph ++
31−8:4 name tail
23+8:4 name head
32248:9 glyph |=
33258:12 name p
34268:13 tight glyph =
@@ -44,52 +36,51 @@
443610:6 tight name a
453710:8 name b
463810:9 tight glyph ]
47−10:11 name b
39+10:11 name a
484012:1 DEDENT
494112:1 DEDENT
504212:1 NEWLINE
514312:1 glyph ++
52−12:4 name not
53−12:8 glyph |=
54−12:11 name b
55−12:12 tight glyph =
56−12:13 tight glyph ?
44+12:4 name tail
45+12:9 glyph |=
46+12:12 name p
47+12:13 tight glyph =
48+12:14 tight glyph [
49+12:15 tight tvar A
50+12:17 tvar B
51+12:18 tight glyph ]
575213:3 INDENT
585313:3 glyph ?-
59−13:6 name b
54+13:6 name p
605514:5 INDENT
61−14:5 lit %.y
62−14:9 lit %.n
63−15:5 NEWLINE
64−15:5 lit %.n
65−15:9 lit %.y
66−17:1 DEDENT
67−17:1 DEDENT
68−17:1 NEWLINE
69−17:1 glyph +$
70−17:4 name list
71−17:9 glyph |$
72−17:12 glyph [
73−17:13 tight tvar A
74−17:14 tight glyph ]
75−18:3 INDENT
76−18:3 lit ~
77−19:3 NEWLINE
78−19:3 glyph [
79−19:4 tight name i
80−19:5 tight glyph =
81−19:6 tight tvar A
82−19:8 name t
83−19:9 tight glyph =
84−19:10 tight glyph (
85−19:11 tight name list
86−19:16 tvar A
87−19:17 tight glyph )
88−19:18 tight glyph ]
56+14:5 glyph [
57+14:6 tight name a
58+14:8 name b
59+14:9 tight glyph ]
60+14:11 name b
61+16:1 DEDENT
62+16:1 DEDENT
63+16:1 NEWLINE
64+16:1 glyph ++
65+16:4 name not
66+16:8 glyph |=
67+16:11 name b
68+16:12 tight glyph =
69+16:13 tight glyph ?
70+17:3 INDENT
71+17:3 glyph ?-
72+17:6 name b
73+18:5 INDENT
74+18:5 lit %.y
75+18:9 lit %.n
76+19:5 NEWLINE
77+19:5 lit %.n
78+19:9 lit %.y
79+21:1 DEDENT
898021:1 DEDENT
908121:1 NEWLINE
918221:1 glyph +$
92−21:4 name unit
83+21:4 name list
938421:9 glyph |$
948521:12 glyph [
958621:13 tight tvar A
@@ -98,570 +89,573 @@
988922:3 lit ~
999023:3 NEWLINE
1009123:3 glyph [
101−23:4 tight lit ~
102−23:6 name u
103−23:7 tight glyph =
104−23:8 tight tvar A
105−23:9 tight glyph ]
92+23:4 tight name i
93+23:5 tight glyph =
94+23:6 tight tvar A
95+23:8 name t
96+23:9 tight glyph =
97+23:10 tight glyph (
98+23:11 tight name list
99+23:16 tvar A
100+23:17 tight glyph )
101+23:18 tight glyph ]
10610225:1 DEDENT
10710325:1 NEWLINE
108−25:1 glyph ++
109−25:4 name fall
110−25:9 glyph |=
111−25:12 name args
112−25:16 tight glyph =
113−25:17 tight glyph [
114−25:18 tight glyph (
115−25:19 tight name unit
116−25:24 tvar A
117−25:25 tight glyph )
118−25:27 tvar A
119−25:28 tight glyph ]
104+25:1 glyph +$
105+25:4 name unit
106+25:9 glyph |$
107+25:12 glyph [
108+25:13 tight tvar A
109+25:14 tight glyph ]
12011026:3 INDENT
121−26:3 glyph ?-
122−26:6 name args
123−27:5 INDENT
124−27:5 glyph [
125−27:6 tight name maybe
126−27:12 name fallback
127−27:20 tight glyph ]
128−28:7 INDENT
129−28:7 glyph ?-
130−28:10 name maybe
131−29:9 INDENT
132−29:9 lit ~
133−29:11 name fallback
134−30:9 NEWLINE
135−30:9 glyph [
136−30:10 tight lit ~
137−30:12 name value
138−30:17 tight glyph ]
139−30:19 name value
140−32:1 DEDENT
141−32:1 DEDENT
142−32:1 DEDENT
143−32:1 DEDENT
144−32:1 NEWLINE
145−32:1 glyph ++
146−32:4 name need
147−32:9 glyph |=
148−32:12 name maybe
149−32:17 tight glyph =
150−32:18 tight glyph (
151−32:19 tight name unit
152−32:24 tvar A
153−32:25 tight glyph )
154−33:3 INDENT
155−33:3 glyph ?-
156−33:6 name maybe
157−34:5 INDENT
158−34:5 lit ~
159−34:7 glyph !!
160−35:5 NEWLINE
161−35:5 glyph [
162−35:6 tight lit ~
163−35:8 name value
164−35:13 tight glyph ]
165−35:15 name value
166−37:1 DEDENT
167−37:1 DEDENT
168−37:1 NEWLINE
169−37:1 glyph ++
170−37:4 name weld
171−37:9 glyph |=
172−37:12 name args
173−37:16 tight glyph =
174−37:17 tight glyph [
175−37:18 tight glyph (
176−37:19 tight name list
177−37:24 tvar A
178−37:25 tight glyph )
179−37:27 glyph (
180−37:28 tight name list
181−37:33 tvar A
182−37:34 tight glyph )
183−37:35 tight glyph ]
184−38:3 INDENT
185−38:3 glyph ?-
186−38:6 name args
187−39:5 INDENT
111+26:3 lit ~
112+27:3 NEWLINE
113+27:3 glyph [
114+27:4 tight lit ~
115+27:6 name u
116+27:7 tight glyph =
117+27:8 tight tvar A
118+27:9 tight glyph ]
119+29:1 DEDENT
120+29:1 NEWLINE
121+29:1 glyph ++
122+29:4 name fall
123+29:9 glyph |=
124+29:12 name args
125+29:16 tight glyph =
126+29:17 tight glyph [
127+29:18 tight glyph (
128+29:19 tight name unit
129+29:24 tvar A
130+29:25 tight glyph )
131+29:27 tvar A
132+29:28 tight glyph ]
133+30:3 INDENT
134+30:3 glyph ?-
135+30:6 name args
136+31:5 INDENT
137+31:5 glyph [
138+31:6 tight name maybe
139+31:12 name fallback
140+31:20 tight glyph ]
141+32:7 INDENT
142+32:7 glyph ?-
143+32:10 name maybe
144+33:9 INDENT
145+33:9 lit ~
146+33:11 name fallback
147+34:9 NEWLINE
148+34:9 glyph [
149+34:10 tight lit ~
150+34:12 name value
151+34:17 tight glyph ]
152+34:19 name value
153+36:1 DEDENT
154+36:1 DEDENT
155+36:1 DEDENT
156+36:1 DEDENT
157+36:1 NEWLINE
158+36:1 glyph ++
159+36:4 name need
160+36:9 glyph |=
161+36:12 name maybe
162+36:17 tight glyph =
163+36:18 tight glyph (
164+36:19 tight name unit
165+36:24 tvar A
166+36:25 tight glyph )
167+37:3 INDENT
168+37:3 glyph ?-
169+37:6 name maybe
170+38:5 INDENT
171+38:5 lit ~
172+38:7 glyph !!
173+39:5 NEWLINE
18817439:5 glyph [
189−39:6 tight name xs
190−39:9 name ys
191−39:11 tight glyph ]
192−40:7 INDENT
193−40:7 glyph ?-
194−40:10 name xs
195−41:9 INDENT
196−41:9 lit ~
197−41:11 name ys
198−42:9 NEWLINE
199−42:9 glyph [
200−42:10 tight name item
201−42:15 name rest
202−42:19 tight glyph ]
203−42:21 glyph [
204−42:22 tight name item
205−42:27 glyph (
206−42:28 tight name weld
207−42:33 name rest
208−42:38 name ys
209−42:40 tight glyph )
210−42:41 tight glyph ]
211−44:1 DEDENT
212−44:1 DEDENT
213−44:1 DEDENT
214−44:1 DEDENT
215−44:1 NEWLINE
216−44:1 glyph ++
217−44:4 name turn
218−44:9 glyph |=
219−44:12 name args
220−44:16 tight glyph =
221−44:17 tight glyph [
222−44:18 tight glyph (
223−44:19 tight name list
224−44:24 tvar A
225−44:25 tight glyph )
226−44:27 glyph $-(
227−44:30 tight tvar A
228−44:32 tvar B
229−44:33 tight glyph )
230−44:34 tight glyph ]
231−45:3 INDENT
232−45:3 glyph ?-
233−45:6 name args
234−46:5 INDENT
235−46:5 glyph [
236−46:6 tight name xs
237−46:9 name f
238−46:10 tight glyph ]
239−47:7 INDENT
240−47:7 glyph ?-
241−47:10 name xs
242−48:9 INDENT
243−48:9 lit ~
244−48:11 lit ~
245−49:9 NEWLINE
246−49:9 glyph [
247−49:10 tight name item
248−49:15 name rest
249−49:19 tight glyph ]
250−49:21 glyph [
251−49:22 tight glyph (
252−49:23 tight name f
253−49:25 name item
254−49:29 tight glyph )
255−49:31 glyph (
256−49:32 tight name turn
257−49:37 name rest
258−49:42 name f
259−49:43 tight glyph )
260−49:44 tight glyph ]
261−51:1 DEDENT
262−51:1 DEDENT
263−51:1 DEDENT
264−51:1 DEDENT
265−51:1 NEWLINE
266−51:1 glyph +$
267−51:4 name dime
268−51:9 glyph [
269−51:10 tight name p
270−51:11 tight glyph =
271−51:12 tight aura @ta
272−51:16 name q
273−51:17 tight glyph =
274−51:18 tight aura @
275−51:19 tight glyph ]
276−53:1 NEWLINE
277−53:1 glyph +$
278−53:4 name hair
279−53:9 glyph [
280−53:10 tight name p
281−53:11 tight glyph =
282−53:12 tight aura @ud
283−53:16 name q
284−53:17 tight glyph =
285−53:18 tight aura @ud
286−53:21 tight glyph ]
287−55:1 NEWLINE
288−55:1 glyph +$
289−55:4 name pint
290−55:9 glyph [
291−55:10 tight name p
292−55:11 tight glyph =
293−55:12 tight glyph [
294−55:13 tight name p
295−55:14 tight glyph =
296−55:15 tight aura @
297−55:17 name q
298−55:18 tight glyph =
299−55:19 tight aura @
300−55:20 tight glyph ]
301−55:22 name q
302−55:23 tight glyph =
303−55:24 tight glyph [
304−55:25 tight name p
305−55:26 tight glyph =
306−55:27 tight aura @
307−55:29 name q
308−55:30 tight glyph =
309−55:31 tight aura @
310−55:32 tight glyph ]
311−55:33 tight glyph ]
175+39:6 tight lit ~
176+39:8 name value
177+39:13 tight glyph ]
178+39:15 name value
179+41:1 DEDENT
180+41:1 DEDENT
181+41:1 NEWLINE
182+41:1 glyph ++
183+41:4 name weld
184+41:9 glyph |=
185+41:12 name args
186+41:16 tight glyph =
187+41:17 tight glyph [
188+41:18 tight glyph (
189+41:19 tight name list
190+41:24 tvar A
191+41:25 tight glyph )
192+41:27 glyph (
193+41:28 tight name list
194+41:33 tvar A
195+41:34 tight glyph )
196+41:35 tight glyph ]
197+42:3 INDENT
198+42:3 glyph ?-
199+42:6 name args
200+43:5 INDENT
201+43:5 glyph [
202+43:6 tight name xs
203+43:9 name ys
204+43:11 tight glyph ]
205+44:7 INDENT
206+44:7 glyph ^-
207+44:10 glyph (
208+44:11 tight name list
209+44:16 tvar A
210+44:17 tight glyph )
211+45:9 INDENT
212+45:9 glyph ?-
213+45:12 name xs
214+46:11 INDENT
215+46:11 lit ~
216+46:13 name ys
217+47:11 NEWLINE
218+47:11 glyph [
219+47:12 tight name item
220+47:17 name rest
221+47:21 tight glyph ]
222+47:23 glyph [
223+47:24 tight name item
224+47:29 glyph (
225+47:30 tight name weld
226+47:35 name rest
227+47:40 name ys
228+47:42 tight glyph )
229+47:43 tight glyph ]
230+49:1 DEDENT
231+49:1 DEDENT
232+49:1 DEDENT
233+49:1 DEDENT
234+49:1 DEDENT
235+49:1 NEWLINE
236+49:1 glyph ++
237+49:4 name turn
238+49:9 glyph |=
239+49:12 name args
240+49:16 tight glyph =
241+49:17 tight glyph [
242+49:18 tight glyph (
243+49:19 tight name list
244+49:24 tvar A
245+49:25 tight glyph )
246+49:27 glyph $-(
247+49:30 tight tvar A
248+49:32 tvar B
249+49:33 tight glyph )
250+49:34 tight glyph ]
251+50:3 INDENT
252+50:3 glyph ?-
253+50:6 name args
254+51:5 INDENT
255+51:5 glyph [
256+51:6 tight name xs
257+51:9 name f
258+51:10 tight glyph ]
259+52:7 INDENT
260+52:7 glyph ^-
261+52:10 glyph (
262+52:11 tight name list
263+52:16 tvar B
264+52:17 tight glyph )
265+53:9 INDENT
266+53:9 glyph ?-
267+53:12 name xs
268+54:11 INDENT
269+54:11 lit ~
270+54:13 lit ~
271+55:11 NEWLINE
272+55:11 glyph [
273+55:12 tight name item
274+55:17 name rest
275+55:21 tight glyph ]
276+55:23 glyph [
277+55:24 tight glyph (
278+55:25 tight name f
279+55:27 name item
280+55:31 tight glyph )
281+55:33 glyph (
282+55:34 tight name turn
283+55:39 name rest
284+55:44 name f
285+55:45 tight glyph )
286+55:46 tight glyph ]
287+57:1 DEDENT
288+57:1 DEDENT
289+57:1 DEDENT
290+57:1 DEDENT
291+57:1 DEDENT
31229257:1 NEWLINE
31329357:1 glyph +$
314−57:4 name coin
315−58:3 INDENT
316−58:3 glyph [
317−58:4 tight lit %$
318−58:7 name p
319−58:8 tight glyph =
320−58:9 tight name dime
321−58:13 tight glyph ]
322−59:3 NEWLINE
323−59:3 glyph [
324−59:4 tight lit %blob
325−59:10 name p
294+57:4 name dime
295+57:9 glyph [
296+57:10 tight name p
297+57:11 tight glyph =
298+57:12 tight aura @ta
299+57:16 name q
300+57:17 tight glyph =
301+57:18 tight aura @
302+57:19 tight glyph ]
303+59:1 NEWLINE
304+59:1 glyph +$
305+59:4 name hair
306+59:9 glyph [
307+59:10 tight name p
32630859:11 tight glyph =
327−59:12 tight glyph *
328−59:13 tight glyph ]
329−60:3 NEWLINE
330−60:3 glyph [
331−60:4 tight lit %many
332−60:10 name p
333−60:11 tight glyph =
334−60:12 tight glyph (
335−60:13 tight name list
336−60:18 name coin
337−60:22 tight glyph )
338−60:23 tight glyph ]
339−62:1 DEDENT
340−62:1 NEWLINE
341−62:1 glyph +$
342−62:4 name pair
343−62:9 glyph |$
344−62:12 glyph [
345−62:13 tight tvar A
346−62:15 tvar B
347−62:16 tight glyph ]
348−62:18 glyph [
349−62:19 tight name p
350−62:20 tight glyph =
351−62:21 tight tvar A
352−62:23 name q
353−62:24 tight glyph =
354−62:25 tight tvar B
355−62:26 tight glyph ]
356−64:1 NEWLINE
357−64:1 glyph +$
358−64:4 name trel
359−64:9 glyph |$
360−64:12 glyph [
361−64:13 tight tvar A
362−64:15 tvar B
363−64:17 tvar C
364−64:18 tight glyph ]
365−64:20 glyph [
366−64:21 tight name p
367−64:22 tight glyph =
368−64:23 tight tvar A
369−64:25 name q
370−64:26 tight glyph =
371−64:27 tight tvar B
372−64:29 name r
373−64:30 tight glyph =
374−64:31 tight tvar C
375−64:32 tight glyph ]
376−66:1 NEWLINE
377−66:1 glyph +$
378−66:4 name qual
379−66:9 glyph |$
380−66:12 glyph [
381−66:13 tight tvar A
382−66:15 tvar B
383−66:17 tvar C
384−66:19 tvar D
385−66:20 tight glyph ]
386−66:22 glyph [
387−66:23 tight name p
388−66:24 tight glyph =
389−66:25 tight tvar A
390−66:27 name q
391−66:28 tight glyph =
392−66:29 tight tvar B
393−66:31 name r
394−66:32 tight glyph =
395−66:33 tight tvar C
396−66:35 name s
397−66:36 tight glyph =
398−66:37 tight tvar D
399−66:38 tight glyph ]
309+59:12 tight aura @ud
310+59:16 name q
311+59:17 tight glyph =
312+59:18 tight aura @ud
313+59:21 tight glyph ]
314+61:1 NEWLINE
315+61:1 glyph +$
316+61:4 name pint
317+61:9 glyph [
318+61:10 tight name p
319+61:11 tight glyph =
320+61:12 tight glyph [
321+61:13 tight name p
322+61:14 tight glyph =
323+61:15 tight aura @
324+61:17 name q
325+61:18 tight glyph =
326+61:19 tight aura @
327+61:20 tight glyph ]
328+61:22 name q
329+61:23 tight glyph =
330+61:24 tight glyph [
331+61:25 tight name p
332+61:26 tight glyph =
333+61:27 tight aura @
334+61:29 name q
335+61:30 tight glyph =
336+61:31 tight aura @
337+61:32 tight glyph ]
338+61:33 tight glyph ]
339+63:1 NEWLINE
340+63:1 glyph +$
341+63:4 name coin
342+64:3 INDENT
343+64:3 glyph [
344+64:4 tight lit %$
345+64:7 name p
346+64:8 tight glyph =
347+64:9 tight name dime
348+64:13 tight glyph ]
349+65:3 NEWLINE
350+65:3 glyph [
351+65:4 tight lit %blob
352+65:10 name p
353+65:11 tight glyph =
354+65:12 tight glyph *
355+65:13 tight glyph ]
356+66:3 NEWLINE
357+66:3 glyph [
358+66:4 tight lit %many
359+66:10 name p
360+66:11 tight glyph =
361+66:12 tight glyph (
362+66:13 tight name list
363+66:18 name coin
364+66:22 tight glyph )
365+66:23 tight glyph ]
366+68:1 DEDENT
40036768:1 NEWLINE
40136868:1 glyph +$
402−68:4 name cord
403−68:9 aura @t
369+68:4 name pair
370+68:9 glyph |$
371+68:12 glyph [
372+68:13 tight tvar A
373+68:15 tvar B
374+68:16 tight glyph ]
375+68:18 glyph [
376+68:19 tight name p
377+68:20 tight glyph =
378+68:21 tight tvar A
379+68:23 name q
380+68:24 tight glyph =
381+68:25 tight tvar B
382+68:26 tight glyph ]
40438370:1 NEWLINE
40538470:1 glyph +$
406−70:4 name knot
407−70:9 aura @ta
385+70:4 name trel
386+70:9 glyph |$
387+70:12 glyph [
388+70:13 tight tvar A
389+70:15 tvar B
390+70:17 tvar C
391+70:18 tight glyph ]
392+70:20 glyph [
393+70:21 tight name p
394+70:22 tight glyph =
395+70:23 tight tvar A
396+70:25 name q
397+70:26 tight glyph =
398+70:27 tight tvar B
399+70:29 name r
400+70:30 tight glyph =
401+70:31 tight tvar C
402+70:32 tight glyph ]
40840372:1 NEWLINE
40940472:1 glyph +$
410−72:4 name tape
411−72:9 glyph (
412−72:10 tight name list
413−72:15 aura @tD
414−72:18 tight glyph )
405+72:4 name qual
406+72:9 glyph |$
407+72:12 glyph [
408+72:13 tight tvar A
409+72:15 tvar B
410+72:17 tvar C
411+72:19 tvar D
412+72:20 tight glyph ]
413+72:22 glyph [
414+72:23 tight name p
415+72:24 tight glyph =
416+72:25 tight tvar A
417+72:27 name q
418+72:28 tight glyph =
419+72:29 tight tvar B
420+72:31 name r
421+72:32 tight glyph =
422+72:33 tight tvar C
423+72:35 name s
424+72:36 tight glyph =
425+72:37 tight tvar D
426+72:38 tight glyph ]
41542774:1 NEWLINE
41642874:1 glyph +$
417−74:4 name path
418−74:9 glyph (
419−74:10 tight name list
420−74:15 name knot
421−74:19 tight glyph )
429+74:4 name cord
430+74:9 aura @t
42243176:1 NEWLINE
42343276:1 glyph +$
424−76:4 name tank
425−77:3 INDENT
426−77:3 name cord
427−78:3 NEWLINE
428−78:3 glyph [
429−78:4 tight lit %leaf
430−78:10 name p
431−78:11 tight glyph =
432−78:12 tight name tape
433−78:16 tight glyph ]
434−79:3 NEWLINE
435−79:3 glyph [
436−79:4 tight lit %palm
437−79:10 name p
438−79:11 tight glyph =
439−79:12 tight glyph (
440−79:13 tight name qual
441−79:18 name tape
442−79:23 name tape
443−79:28 name tape
444−79:33 name tape
445−79:37 tight glyph )
446−79:39 name q
447−79:40 tight glyph =
448−79:41 tight glyph (
449−79:42 tight name list
450−79:47 name tank
451−79:51 tight glyph )
452−79:52 tight glyph ]
453−80:3 NEWLINE
454−80:3 glyph [
455−80:4 tight lit %rose
456−80:10 name p
457−80:11 tight glyph =
458−80:12 tight glyph (
459−80:13 tight name trel
460−80:18 name tape
461−80:23 name tape
462−80:28 name tape
463−80:32 tight glyph )
464−80:34 name q
465−80:35 tight glyph =
466−80:36 tight glyph (
467−80:37 tight name list
468−80:42 name tank
469−80:46 tight glyph )
470−80:47 tight glyph ]
471−82:1 DEDENT
433+76:4 name knot
434+76:9 aura @ta
435+78:1 NEWLINE
436+78:1 glyph +$
437+78:4 name tape
438+78:9 glyph (
439+78:10 tight name list
440+78:15 aura @tD
441+78:18 tight glyph )
442+80:1 NEWLINE
443+80:1 glyph +$
444+80:4 name path
445+80:9 glyph (
446+80:10 tight name list
447+80:15 name knot
448+80:19 tight glyph )
47244982:1 NEWLINE
47345082:1 glyph +$
474−82:4 name nail
475−82:9 glyph [
476−82:10 tight name p
477−82:11 tight glyph =
478−82:12 tight name hair
479−82:17 name q
480−82:18 tight glyph =
481−82:19 tight name tape
482−82:23 tight glyph ]
483−84:1 NEWLINE
484−84:1 glyph +$
485−84:4 name edge
486−84:9 glyph [
487−84:10 tight name p
451+82:4 name tank
452+83:3 INDENT
453+83:3 name cord
454+84:3 NEWLINE
455+84:3 glyph [
456+84:4 tight lit %leaf
457+84:10 name p
48845884:11 tight glyph =
489−84:12 tight name hair
490−84:17 name q
491−84:18 tight glyph =
492−84:19 tight glyph (
493−84:20 tight name unit
494−84:25 glyph [
495−84:26 tight name p
496−84:27 tight glyph =
497−84:28 tight glyph *
498−84:30 name q
499−84:31 tight glyph =
500−84:32 tight name nail
501−84:36 tight glyph ]
502−84:37 tight glyph )
503−84:38 tight glyph ]
504−86:1 NEWLINE
505−86:1 glyph +$
506−86:4 name rule
507−86:9 glyph $-(
508−86:12 tight name nail
509−86:17 name edge
510−86:21 tight glyph )
459+84:12 tight name tape
460+84:16 tight glyph ]
461+85:3 NEWLINE
462+85:3 glyph [
463+85:4 tight lit %palm
464+85:10 name p
465+85:11 tight glyph =
466+85:12 tight glyph (
467+85:13 tight name qual
468+85:18 name tape
469+85:23 name tape
470+85:28 name tape
471+85:33 name tape
472+85:37 tight glyph )
473+85:39 name q
474+85:40 tight glyph =
475+85:41 tight glyph (
476+85:42 tight name list
477+85:47 name tank
478+85:51 tight glyph )
479+85:52 tight glyph ]
480+86:3 NEWLINE
481+86:3 glyph [
482+86:4 tight lit %rose
483+86:10 name p
484+86:11 tight glyph =
485+86:12 tight glyph (
486+86:13 tight name trel
487+86:18 name tape
488+86:23 name tape
489+86:28 name tape
490+86:32 tight glyph )
491+86:34 name q
492+86:35 tight glyph =
493+86:36 tight glyph (
494+86:37 tight name list
495+86:42 name tank
496+86:46 tight glyph )
497+86:47 tight glyph ]
498+88:1 DEDENT
51149988:1 NEWLINE
51250088:1 glyph +$
513−88:4 name spot
501+88:4 name nail
51450288:9 glyph [
51550388:10 tight name p
51650488:11 tight glyph =
517−88:12 tight name path
505+88:12 tight name hair
51850688:17 name q
51950788:18 tight glyph =
520−88:19 tight name pint
508+88:19 tight name tape
52150988:23 tight glyph ]
52251090:1 NEWLINE
52351190:1 glyph +$
524−90:4 name toon
525−91:3 INDENT
526−91:3 glyph [
527−91:4 tight lit %0
528−91:7 name p
529−91:8 tight glyph =
530−91:9 tight glyph *
531−91:10 tight glyph ]
532−92:3 NEWLINE
533−92:3 glyph [
534−92:4 tight lit %1
535−92:7 name p
536−92:8 tight glyph =
537−92:9 tight glyph *
538−92:10 tight glyph ]
539−93:3 NEWLINE
540−93:3 glyph [
541−93:4 tight lit %2
542−93:7 name p
543−93:8 tight glyph =
544−93:9 tight glyph (
545−93:10 tight name list
546−93:15 name tank
547−93:19 tight glyph )
548−93:20 tight glyph ]
549−95:1 DEDENT
550−95:1 NEWLINE
551−95:1 glyph +$
552−95:4 name like
553−95:9 glyph |$
554−95:12 glyph [
555−95:13 tight tvar A
556−95:14 tight glyph ]
557−95:16 glyph [
558−95:17 tight name p
559−95:18 tight glyph =
560−95:19 tight name hair
561−95:24 name q
562−95:25 tight glyph =
563−95:26 tight glyph (
564−95:27 tight name unit
565−95:32 glyph [
566−95:33 tight name p
567−95:34 tight glyph =
568−95:35 tight tvar A
569−95:37 name q
570−95:38 tight glyph =
571−95:39 tight name nail
572−95:43 tight glyph ]
573−95:44 tight glyph )
574−95:45 tight glyph ]
575−97:1 NEWLINE
576−97:1 glyph ++
577−97:4 name wonk
578−97:9 glyph |=
579−97:12 name veq
580−97:15 tight glyph =
581−97:16 tight glyph (
582−97:17 tight name like
583−97:22 tvar A
584−97:23 tight glyph )
585−98:3 INDENT
586−98:3 glyph ?-
587−98:6 wing q.veq
588−99:5 INDENT
589−99:5 lit ~
590−99:7 glyph !!
591−100:5 NEWLINE
592−100:5 glyph [
593−100:6 tight lit ~
594−100:8 name product
595−100:15 tight glyph ]
596−100:17 wing p.product
597−102:1 DEDENT
598−102:1 DEDENT
599−102:1 NEWLINE
600−102:1 glyph +$
601−102:4 name lone
602−102:9 glyph |$
603−102:12 glyph [
604−102:13 tight tvar A
605−102:14 tight glyph ]
606−102:16 glyph [
607−102:17 tight name p
608−102:18 tight glyph =
609−102:19 tight tvar A
610−102:20 tight glyph ]
611−104:1 NEWLINE
612−104:1 glyph +$
613−104:4 name lest
614−104:9 glyph |$
615−104:12 glyph [
616−104:13 tight tvar A
617−104:14 tight glyph ]
618−104:16 glyph [
619−104:17 tight name i
620−104:18 tight glyph =
621−104:19 tight tvar A
622−104:21 name t
623−104:22 tight glyph =
624−104:23 tight glyph (
625−104:24 tight name list
626−104:29 tvar A
627−104:30 tight glyph )
628−104:31 tight glyph ]
629−106:1 NEWLINE
630−106:1 glyph +$
631−106:4 name pole
632−106:9 glyph |$
633−106:12 glyph [
634−106:13 tight tvar A
635−106:14 tight glyph ]
636−107:3 INDENT
637−107:3 lit ~
638−108:3 NEWLINE
639−108:3 glyph [
640−108:4 tight tvar A
641−108:6 glyph (
642−108:7 tight name pole
643−108:12 tvar A
644−108:13 tight glyph )
512+90:4 name edge
513+90:9 glyph [
514+90:10 tight name p
515+90:11 tight glyph =
516+90:12 tight name hair
517+90:17 name q
518+90:18 tight glyph =
519+90:19 tight glyph (
520+90:20 tight name unit
521+90:25 glyph [
522+90:26 tight name p
523+90:27 tight glyph =
524+90:28 tight glyph *
525+90:30 name q
526+90:31 tight glyph =
527+90:32 tight name nail
528+90:36 tight glyph ]
529+90:37 tight glyph )
530+90:38 tight glyph ]
531+92:1 NEWLINE
532+92:1 glyph +$
533+92:4 name rule
534+92:9 glyph $-(
535+92:12 tight name nail
536+92:17 name edge
537+92:21 tight glyph )
538+94:1 NEWLINE
539+94:1 glyph +$
540+94:4 name spot
541+94:9 glyph [
542+94:10 tight name p
543+94:11 tight glyph =
544+94:12 tight name path
545+94:17 name q
546+94:18 tight glyph =
547+94:19 tight name pint
548+94:23 tight glyph ]
549+96:1 NEWLINE
550+96:1 glyph +$
551+96:4 name toon
552+97:3 INDENT
553+97:3 glyph [
554+97:4 tight lit %0
555+97:7 name p
556+97:8 tight glyph =
557+97:9 tight glyph *
558+97:10 tight glyph ]
559+98:3 NEWLINE
560+98:3 glyph [
561+98:4 tight lit %1
562+98:7 name p
563+98:8 tight glyph =
564+98:9 tight glyph *
565+98:10 tight glyph ]
566+99:3 NEWLINE
567+99:3 glyph [
568+99:4 tight lit %2
569+99:7 name p
570+99:8 tight glyph =
571+99:9 tight glyph (
572+99:10 tight name list
573+99:15 name tank
574+99:19 tight glyph )
575+99:20 tight glyph ]
576+101:1 DEDENT
577+101:1 NEWLINE
578+101:1 glyph +$
579+101:4 name like
580+101:9 glyph |$
581+101:12 glyph [
582+101:13 tight tvar A
583+101:14 tight glyph ]
584+101:16 glyph [
585+101:17 tight name p
586+101:18 tight glyph =
587+101:19 tight name hair
588+101:24 name q
589+101:25 tight glyph =
590+101:26 tight glyph (
591+101:27 tight name unit
592+101:32 glyph [
593+101:33 tight name p
594+101:34 tight glyph =
595+101:35 tight tvar A
596+101:37 name q
597+101:38 tight glyph =
598+101:39 tight name nail
599+101:43 tight glyph ]
600+101:44 tight glyph )
601+101:45 tight glyph ]
602+103:1 NEWLINE
603+103:1 glyph ++
604+103:4 name wonk
605+103:9 glyph |=
606+103:12 name veq
607+103:15 tight glyph =
608+103:16 tight glyph (
609+103:17 tight name like
610+103:22 tvar A
611+103:23 tight glyph )
612+104:3 INDENT
613+104:3 glyph ?-
614+104:6 wing q.veq
615+105:5 INDENT
616+105:5 lit ~
617+105:7 glyph !!
618+106:5 NEWLINE
619+106:5 glyph [
620+106:6 tight lit ~
621+106:8 name product
622+106:15 tight glyph ]
623+106:17 wing p.product
624+108:1 DEDENT
625+108:1 DEDENT
626+108:1 NEWLINE
627+108:1 glyph +$
628+108:4 name lone
629+108:9 glyph |$
630+108:12 glyph [
631+108:13 tight tvar A
645632108:14 tight glyph ]
646−110:1 DEDENT
633+108:16 glyph [
634+108:17 tight name p
635+108:18 tight glyph =
636+108:19 tight tvar A
637+108:20 tight glyph ]
647638110:1 NEWLINE
648639110:1 glyph +$
649−110:4 name quip
640+110:4 name lest
650641110:9 glyph |$
651642110:12 glyph [
652643110:13 tight tvar A
653−110:15 tvar B
654−110:16 tight glyph ]
655−110:18 glyph [
656−110:19 tight glyph (
657−110:20 tight name list
658−110:25 tvar A
659−110:26 tight glyph )
660−110:28 tvar B
661−110:29 tight glyph ]
644+110:14 tight glyph ]
645+110:16 glyph [
646+110:17 tight name i
647+110:18 tight glyph =
648+110:19 tight tvar A
649+110:21 name t
650+110:22 tight glyph =
651+110:23 tight glyph (
652+110:24 tight name list
653+110:29 tvar A
654+110:30 tight glyph )
655+110:31 tight glyph ]
662656112:1 NEWLINE
663657112:1 glyph +$
664−112:4 name tree
658+112:4 name pole
665659112:9 glyph |$
666660112:12 glyph [
667661112:13 tight tvar A
@@ -670,246 +664,242 @@
670664113:3 lit ~
671665114:3 NEWLINE
672666114:3 glyph [
673−114:4 tight name n
674−114:5 tight glyph =
675−114:6 tight tvar A
676−114:8 name l
677−114:9 tight glyph =
678−114:10 tight glyph (
679−114:11 tight name tree
680−114:16 tvar A
681−114:17 tight glyph )
682−114:19 name r
683−114:20 tight glyph =
684−114:21 tight glyph (
685−114:22 tight name tree
686−114:27 tvar A
687−114:28 tight glyph )
688−114:29 tight glyph ]
667+114:4 tight tvar A
668+114:6 glyph (
669+114:7 tight name pole
670+114:12 tvar A
671+114:13 tight glyph )
672+114:14 tight glyph ]
689673116:1 DEDENT
690674116:1 NEWLINE
691675116:1 glyph +$
692−116:4 name each
676+116:4 name quip
693677116:9 glyph |$
694678116:12 glyph [
695679116:13 tight tvar A
696680116:15 tvar B
697681116:16 tight glyph ]
698−117:3 INDENT
699−117:3 glyph [
700−117:4 tight lit %|
701−117:7 name p
702−117:8 tight glyph =
703−117:9 tight tvar B
704−117:10 tight glyph ]
705−118:3 NEWLINE
706−118:3 glyph [
707−118:4 tight lit %&
708−118:7 name p
709−118:8 tight glyph =
710−118:9 tight tvar A
711−118:10 tight glyph ]
712−120:1 DEDENT
713−120:1 NEWLINE
714−120:1 glyph +$
715−120:4 name bloq
716−120:9 aura @
682+116:18 glyph [
683+116:19 tight glyph (
684+116:20 tight name list
685+116:25 tvar A
686+116:26 tight glyph )
687+116:28 tvar B
688+116:29 tight glyph ]
689+118:1 NEWLINE
690+118:1 glyph +$
691+118:4 name tree
692+118:9 glyph |$
693+118:12 glyph [
694+118:13 tight tvar A
695+118:14 tight glyph ]
696+119:3 INDENT
697+119:3 lit ~
698+120:3 NEWLINE
699+120:3 glyph [
700+120:4 tight name n
701+120:5 tight glyph =
702+120:6 tight tvar A
703+120:8 name l
704+120:9 tight glyph =
705+120:10 tight glyph (
706+120:11 tight name tree
707+120:16 tvar A
708+120:17 tight glyph )
709+120:19 name r
710+120:20 tight glyph =
711+120:21 tight glyph (
712+120:22 tight name tree
713+120:27 tvar A
714+120:28 tight glyph )
715+120:29 tight glyph ]
716+122:1 DEDENT
717717122:1 NEWLINE
718−122:1 glyph ++
719−122:4 name some
720−122:9 glyph |=
721−122:12 name item
722−122:16 tight glyph =
723−122:17 tight tvar A
724−122:19 glyph `
725−122:20 tight name item
726−124:1 NEWLINE
727−124:1 glyph ++
728−124:4 name lure
729−124:9 glyph |=
730−124:12 name item
731−124:16 tight glyph =
732−124:17 tight tvar A
733−125:3 INDENT
734−125:3 glyph ^-
735−125:6 glyph (
736−125:7 tight name list
737−125:12 tvar A
738−125:13 tight glyph )
739−125:15 glyph [
740−125:16 tight name item
741−125:21 lit ~
742−125:22 tight glyph ]
743−127:1 DEDENT
744−127:1 NEWLINE
745−127:1 glyph ++
746−127:4 name snoc
747−127:9 glyph |=
748−127:12 name args
749−127:16 tight glyph =
750−127:17 tight glyph [
751−127:18 tight glyph (
752−127:19 tight name list
753−127:24 tvar A
754−127:25 tight glyph )
755−127:27 tvar A
756−127:28 tight glyph ]
757−128:3 INDENT
758−128:3 glyph ?-
759−128:6 name args
760−129:5 INDENT
761−129:5 glyph [
762−129:6 tight name xs
763−129:9 name item
764−129:13 tight glyph ]
765−129:15 glyph (
766−129:16 tight name weld
767−129:21 name xs
768−129:24 glyph [
769−129:25 tight name item
770−129:30 lit ~
771−129:31 tight glyph ]
772−129:32 tight glyph )
773−131:1 DEDENT
774−131:1 DEDENT
775−131:1 NEWLINE
776−131:1 glyph ++
777−131:4 name flop
778−131:9 glyph |=
779−131:12 name xs
780−131:14 tight glyph =
781−131:15 tight glyph (
782−131:16 tight name list
783−131:21 tvar A
784−131:22 tight glyph )
785−132:3 INDENT
786−132:3 glyph ++
787−132:6 name reverse-into
788−132:19 glyph |=
789−132:22 name args
790−132:26 tight glyph =
791−132:27 tight glyph [
792−132:28 tight glyph (
793−132:29 tight name list
794−132:34 tvar A
795−132:35 tight glyph )
796−132:37 glyph (
797−132:38 tight name list
798−132:43 tvar A
799−132:44 tight glyph )
800−132:45 tight glyph ]
801−133:5 INDENT
802−133:5 glyph ?-
803−133:8 name args
804−134:7 INDENT
805−134:7 glyph [
806−134:8 tight name rest
807−134:13 name acc
808−134:16 tight glyph ]
809−135:9 INDENT
810−135:9 glyph ?-
811−135:12 name rest
812−136:11 INDENT
813−136:11 lit ~
814−136:13 name acc
815−137:11 NEWLINE
816−137:11 glyph [
817−137:12 tight name item
818−137:17 name more
819−137:21 tight glyph ]
820−137:23 glyph (
821−137:24 tight name reverse-into
822−137:37 name more
823−137:42 glyph [
824−137:43 tight name item
825−137:48 name acc
826−137:51 tight glyph ]
827−137:52 tight glyph )
828−138:3 DEDENT
829−138:3 DEDENT
830−138:3 DEDENT
831−138:3 DEDENT
832−138:3 NEWLINE
833−138:3 glyph (
834−138:4 tight name reverse-into
835−138:17 name xs
836−138:20 lit ~
837−138:21 tight glyph )
838−140:1 DEDENT
839−140:1 NEWLINE
840−140:1 glyph ++
841−140:4 name drop
842−140:9 glyph |=
843−140:12 name maybe
844−140:17 tight glyph =
845−140:18 tight glyph (
846−140:19 tight name unit
847−140:24 tvar A
848−140:25 tight glyph )
849−141:3 INDENT
850−141:3 glyph ?-
851−141:6 name maybe
852−142:5 INDENT
853−142:5 lit ~
854−142:7 lit ~
855−143:5 NEWLINE
856−143:5 glyph [
857−143:6 tight lit ~
858−143:8 name value
859−143:13 tight glyph ]
860−143:15 glyph [
861−143:16 tight name value
862−143:22 lit ~
863−143:23 tight glyph ]
864−145:1 DEDENT
865−145:1 DEDENT
866−145:1 NEWLINE
867−145:1 glyph ++
868−145:4 name bind
869−145:9 glyph |=
870−145:12 name args
871−145:16 tight glyph =
872−145:17 tight glyph [
873−145:18 tight glyph (
874−145:19 tight name unit
875−145:24 tvar A
876−145:25 tight glyph )
877−145:27 glyph $-(
878−145:30 tight tvar A
879−145:32 tvar B
880−145:33 tight glyph )
881−145:34 tight glyph ]
882−146:3 INDENT
883−146:3 glyph ?-
884−146:6 name args
885−147:5 INDENT
886−147:5 glyph [
887−147:6 tight name maybe
888−147:12 name f
889−147:13 tight glyph ]
890−148:7 INDENT
891−148:7 glyph ?-
892−148:10 name maybe
893−149:9 INDENT
718+122:1 glyph +$
719+122:4 name each
720+122:9 glyph |$
721+122:12 glyph [
722+122:13 tight tvar A
723+122:15 tvar B
724+122:16 tight glyph ]
725+123:3 INDENT
726+123:3 glyph [
727+123:4 tight lit %|
728+123:7 name p
729+123:8 tight glyph =
730+123:9 tight tvar B
731+123:10 tight glyph ]
732+124:3 NEWLINE
733+124:3 glyph [
734+124:4 tight lit %&
735+124:7 name p
736+124:8 tight glyph =
737+124:9 tight tvar A
738+124:10 tight glyph ]
739+126:1 DEDENT
740+126:1 NEWLINE
741+126:1 glyph +$
742+126:4 name bloq
743+126:9 aura @
744+128:1 NEWLINE
745+128:1 glyph ++
746+128:4 name some
747+128:9 glyph |=
748+128:12 name item
749+128:16 tight glyph =
750+128:17 tight tvar A
751+128:19 glyph `
752+128:20 tight name item
753+130:1 NEWLINE
754+130:1 glyph ++
755+130:4 name lure
756+130:9 glyph |=
757+130:12 name item
758+130:16 tight glyph =
759+130:17 tight tvar A
760+131:3 INDENT
761+131:3 glyph ^-
762+131:6 glyph (
763+131:7 tight name list
764+131:12 tvar A
765+131:13 tight glyph )
766+131:15 glyph [
767+131:16 tight name item
768+131:21 lit ~
769+131:22 tight glyph ]
770+133:1 DEDENT
771+133:1 NEWLINE
772+133:1 glyph ++
773+133:4 name snoc
774+133:9 glyph |=
775+133:12 name args
776+133:16 tight glyph =
777+133:17 tight glyph [
778+133:18 tight glyph (
779+133:19 tight name list
780+133:24 tvar A
781+133:25 tight glyph )
782+133:27 tvar A
783+133:28 tight glyph ]
784+134:3 INDENT
785+134:3 glyph ?-
786+134:6 name args
787+135:5 INDENT
788+135:5 glyph [
789+135:6 tight name xs
790+135:9 name item
791+135:13 tight glyph ]
792+135:15 glyph (
793+135:16 tight name weld
794+135:21 name xs
795+135:24 glyph [
796+135:25 tight name item
797+135:30 lit ~
798+135:31 tight glyph ]
799+135:32 tight glyph )
800+137:1 DEDENT
801+137:1 DEDENT
802+137:1 NEWLINE
803+137:1 glyph ++
804+137:4 name flop
805+137:9 glyph |=
806+137:12 name xs
807+137:14 tight glyph =
808+137:15 tight glyph (
809+137:16 tight name list
810+137:21 tvar A
811+137:22 tight glyph )
812+138:3 INDENT
813+138:3 glyph ++
814+138:6 name reverse-into
815+138:19 glyph |=
816+138:22 name args
817+138:26 tight glyph =
818+138:27 tight glyph [
819+138:28 tight glyph (
820+138:29 tight name list
821+138:34 tvar A
822+138:35 tight glyph )
823+138:37 glyph (
824+138:38 tight name list
825+138:43 tvar A
826+138:44 tight glyph )
827+138:45 tight glyph ]
828+139:5 INDENT
829+139:5 glyph ?-
830+139:8 name args
831+140:7 INDENT
832+140:7 glyph [
833+140:8 tight name rest
834+140:13 name acc
835+140:16 tight glyph ]
836+141:9 INDENT
837+141:9 glyph ?-
838+141:12 name rest
839+142:11 INDENT
840+142:11 lit ~
841+142:13 name acc
842+143:11 NEWLINE
843+143:11 glyph [
844+143:12 tight name item
845+143:17 name more
846+143:21 tight glyph ]
847+143:23 glyph (
848+143:24 tight name reverse-into
849+143:37 name more
850+143:42 glyph [
851+143:43 tight name item
852+143:48 name acc
853+143:51 tight glyph ]
854+143:52 tight glyph )
855+144:3 DEDENT
856+144:3 DEDENT
857+144:3 DEDENT
858+144:3 DEDENT
859+144:3 NEWLINE
860+144:3 glyph (
861+144:4 tight name reverse-into
862+144:17 name xs
863+144:20 lit ~
864+144:21 tight glyph )
865+146:1 DEDENT
866+146:1 NEWLINE
867+146:1 glyph ++
868+146:4 name drop
869+146:9 glyph |=
870+146:12 name maybe
871+146:17 tight glyph =
872+146:18 tight glyph (
873+146:19 tight name unit
874+146:24 tvar A
875+146:25 tight glyph )
876+147:3 INDENT
877+147:3 glyph ^-
878+147:6 glyph (
879+147:7 tight name list
880+147:12 tvar A
881+147:13 tight glyph )
882+148:5 INDENT
883+148:5 glyph ?-
884+148:8 name maybe
885+149:7 INDENT
886+149:7 lit ~
894887149:9 lit ~
895−149:11 lit ~
896−150:9 NEWLINE
897−150:9 glyph [
898−150:10 tight lit ~
899−150:12 name value
900−150:17 tight glyph ]
901−150:19 glyph `
902−150:20 tight glyph (
903−150:21 tight name f
904−150:23 name value
905−150:28 tight glyph )
906−152:1 DEDENT
888+150:7 NEWLINE
889+150:7 glyph [
890+150:8 tight lit ~
891+150:10 name value
892+150:15 tight glyph ]
893+150:17 glyph [
894+150:18 tight name value
895+150:24 lit ~
896+150:25 tight glyph ]
907897152:1 DEDENT
908898152:1 DEDENT
909899152:1 DEDENT
910900152:1 NEWLINE
911901152:1 glyph ++
912−152:4 name biff
902+152:4 name bind
913903152:9 glyph |=
914904152:12 name args
915905152:16 tight glyph =
@@ -920,12 +910,9 @@
920910152:25 tight glyph )
921911152:27 glyph $-(
922912152:30 tight tvar A
923−152:32 glyph (
924−152:33 tight name unit
925−152:38 tvar B
926−152:39 tight glyph )
927−152:40 tight glyph )
928−152:41 tight glyph ]
913+152:32 tvar B
914+152:33 tight glyph )
915+152:34 tight glyph ]
929916153:3 INDENT
930917153:3 glyph ?-
931918153:6 name args
@@ -934,6 +921,11 @@
934921154:6 tight name maybe
935922154:12 name f
936923154:13 tight glyph ]
924+154:15 glyph ^-
925+154:18 glyph (
926+154:19 tight name unit
927+154:24 tvar B
928+154:25 tight glyph )
937929155:7 INDENT
938930155:7 glyph ?-
939931155:10 name maybe
@@ -945,17 +937,18 @@
945937157:10 tight lit ~
946938157:12 name value
947939157:17 tight glyph ]
948−157:19 glyph (
949−157:20 tight name f
950−157:22 name value
951−157:27 tight glyph )
940+157:19 glyph `
941+157:20 tight glyph (
942+157:21 tight name f
943+157:23 name value
944+157:28 tight glyph )
952945159:1 DEDENT
953946159:1 DEDENT
954947159:1 DEDENT
955948159:1 DEDENT
956949159:1 NEWLINE
957950159:1 glyph ++
958−159:4 name both
951+159:4 name biff
959952159:9 glyph |=
960953159:12 name args
961954159:16 tight glyph =
@@ -964,468 +957,1111 @@
964957159:19 tight name unit
965958159:24 tvar A
966959159:25 tight glyph )
967−159:27 glyph (
968−159:28 tight name unit
969−159:33 tvar B
970−159:34 tight glyph )
971−159:35 tight glyph ]
960+159:27 glyph $-(
961+159:30 tight tvar A
962+159:32 glyph (
963+159:33 tight name unit
964+159:38 tvar B
965+159:39 tight glyph )
966+159:40 tight glyph )
967+159:41 tight glyph ]
972968160:3 INDENT
973969160:3 glyph ?-
974970160:6 name args
975971161:5 INDENT
976972161:5 glyph [
977−161:6 tight name first
978−161:12 name second
979−161:18 tight glyph ]
973+161:6 tight name maybe
974+161:12 name f
975+161:13 tight glyph ]
976+161:15 glyph ^-
977+161:18 glyph (
978+161:19 tight name unit
979+161:24 tvar B
980+161:25 tight glyph )
980981162:7 INDENT
981982162:7 glyph ?-
982−162:10 name first
983+162:10 name maybe
983984163:9 INDENT
984985163:9 lit ~
985986163:11 lit ~
986987164:9 NEWLINE
987988164:9 glyph [
988989164:10 tight lit ~
989−164:12 name a
990−164:13 tight glyph ]
991−165:11 INDENT
992−165:11 glyph ?-
993−165:14 name second
994−166:13 INDENT
995−166:13 lit ~
996−166:15 lit ~
997−167:13 NEWLINE
998−167:13 glyph [
999−167:14 tight lit ~
1000−167:16 name b
1001−167:17 tight glyph ]
1002−167:19 glyph `
1003−167:20 tight glyph [
1004−167:21 tight name a
1005−167:23 name b
1006−167:24 tight glyph ]
1007−169:1 DEDENT
1008−169:1 DEDENT
1009−169:1 DEDENT
1010−169:1 DEDENT
1011−169:1 DEDENT
1012−169:1 DEDENT
1013−169:1 NEWLINE
1014−169:1 glyph ++
1015−169:4 name clef
1016−169:9 glyph |=
1017−169:12 name args
1018−169:16 tight glyph =
1019−169:17 tight glyph [
1020−169:18 tight glyph (
1021−169:19 tight name unit
1022−169:24 tvar A
1023−169:25 tight glyph )
1024−169:27 glyph (
1025−169:28 tight name unit
1026−169:33 tvar B
1027−169:34 tight glyph )
1028−169:36 glyph $-(
1029−169:39 tight glyph [
1030−169:40 tight tvar A
1031−169:42 tvar B
1032−169:43 tight glyph ]
1033−169:45 glyph (
1034−169:46 tight name unit
1035−169:51 tvar C
1036−169:52 tight glyph )
1037−169:53 tight glyph )
1038−169:54 tight glyph ]
1039−170:3 INDENT
1040−170:3 glyph ?-
1041−170:6 name args
1042−171:5 INDENT
1043−171:5 glyph [
1044−171:6 tight name first
1045−171:12 name second
1046−171:19 name combine
1047−171:26 tight glyph ]
1048−172:7 INDENT
1049−172:7 glyph ?-
1050−172:10 name first
1051−173:9 INDENT
1052−173:9 lit ~
1053−173:11 lit ~
1054−174:9 NEWLINE
1055−174:9 glyph [
1056−174:10 tight lit ~
1057−174:12 name a
1058−174:13 tight glyph ]
1059−175:11 INDENT
1060−175:11 glyph ?-
1061−175:14 name second
1062−176:13 INDENT
1063−176:13 lit ~
1064−176:15 lit ~
1065−177:13 NEWLINE
1066−177:13 glyph [
1067−177:14 tight lit ~
1068−177:16 name b
1069−177:17 tight glyph ]
1070−177:19 glyph (
1071−177:20 tight name combine
1072−177:28 name a
1073−177:30 name b
1074−177:31 tight glyph )
1075−179:1 DEDENT
1076−179:1 DEDENT
1077−179:1 DEDENT
1078−179:1 DEDENT
1079−179:1 DEDENT
1080−179:1 DEDENT
1081−179:1 NEWLINE
1082−179:1 glyph ++
1083−179:4 name skim
1084−179:9 glyph |=
1085−179:12 name args
1086−179:16 tight glyph =
1087−179:17 tight glyph [
1088−179:18 tight glyph (
1089−179:19 tight name list
1090−179:24 tvar A
1091−179:25 tight glyph )
1092−179:27 glyph $-(
1093−179:30 tight tvar A
1094−179:32 glyph ?
1095−179:33 tight glyph )
1096−179:34 tight glyph ]
1097−180:3 INDENT
1098−180:3 glyph ?-
1099−180:6 name args
1100−181:5 INDENT
1101−181:5 glyph [
1102−181:6 tight name xs
1103−181:9 name predicate
1104−181:18 tight glyph ]
1105−182:7 INDENT
1106−182:7 glyph ?-
1107−182:10 name xs
1108−183:9 INDENT
1109−183:9 lit ~
1110−183:11 lit ~
1111−184:9 NEWLINE
1112−184:9 glyph [
1113−184:10 tight name item
1114−184:15 name rest
1115−184:19 tight glyph ]
1116−185:11 INDENT
1117−185:11 glyph ?-
1118−185:14 glyph (
1119−185:15 tight name predicate
1120−185:25 name item
1121−185:29 tight glyph )
1122−186:13 INDENT
1123−186:13 lit %.y
1124−186:17 glyph [
1125−186:18 tight name item
1126−186:23 glyph (
1127−186:24 tight name skim
1128−186:29 name rest
1129−186:34 name predicate
1130−186:43 tight glyph )
1131−186:44 tight glyph ]
1132−187:13 NEWLINE
1133−187:13 lit %.n
1134−187:17 glyph (
1135−187:18 tight name skim
1136−187:23 name rest
1137−187:28 name predicate
1138−187:37 tight glyph )
1139−189:1 DEDENT
1140−189:1 DEDENT
1141−189:1 DEDENT
1142−189:1 DEDENT
1143−189:1 DEDENT
1144−189:1 DEDENT
1145−189:1 NEWLINE
1146−189:1 glyph ++
1147−189:4 name skip
1148−189:9 glyph |=
1149−189:12 name args
1150−189:16 tight glyph =
1151−189:17 tight glyph [
1152−189:18 tight glyph (
1153−189:19 tight name list
1154−189:24 tvar A
1155−189:25 tight glyph )
1156−189:27 glyph $-(
1157−189:30 tight tvar A
1158−189:32 glyph ?
1159−189:33 tight glyph )
1160−189:34 tight glyph ]
1161−190:3 INDENT
1162−190:3 glyph ?-
1163−190:6 name args
1164−191:5 INDENT
1165−191:5 glyph [
1166−191:6 tight name xs
1167−191:9 name predicate
1168−191:18 tight glyph ]
1169−192:7 INDENT
1170−192:7 glyph ?-
1171−192:10 name xs
1172−193:9 INDENT
1173−193:9 lit ~
1174−193:11 lit ~
1175−194:9 NEWLINE
1176−194:9 glyph [
1177−194:10 tight name item
1178−194:15 name rest
1179−194:19 tight glyph ]
1180−195:11 INDENT
1181−195:11 glyph ?-
1182−195:14 glyph (
1183−195:15 tight name predicate
1184−195:25 name item
1185−195:29 tight glyph )
1186−196:13 INDENT
1187−196:13 lit %.y
1188−196:17 glyph (
1189−196:18 tight name skip
1190−196:23 name rest
1191−196:28 name predicate
1192−196:37 tight glyph )
1193−197:13 NEWLINE
1194−197:13 lit %.n
1195−197:17 glyph [
1196−197:18 tight name item
1197−197:23 glyph (
1198−197:24 tight name skip
1199−197:29 name rest
1200−197:34 name predicate
1201−197:43 tight glyph )
1202−197:44 tight glyph ]
1203−199:1 DEDENT
1204−199:1 DEDENT
1205−199:1 DEDENT
1206−199:1 DEDENT
1207−199:1 DEDENT
1208−199:1 DEDENT
1209−199:1 NEWLINE
1210−199:1 glyph ++
1211−199:4 name levy
1212−199:9 glyph |=
1213−199:12 name args
1214−199:16 tight glyph =
1215−199:17 tight glyph [
1216−199:18 tight glyph (
1217−199:19 tight name list
1218−199:24 tvar A
1219−199:25 tight glyph )
1220−199:27 glyph $-(
1221−199:30 tight tvar A
1222−199:32 glyph ?
1223−199:33 tight glyph )
1224−199:34 tight glyph ]
1225−200:3 INDENT
1226−200:3 glyph ?-
1227−200:6 name args
1228−201:5 INDENT
1229−201:5 glyph [
1230−201:6 tight name xs
1231−201:9 name predicate
1232−201:18 tight glyph ]
1233−202:7 INDENT
1234−202:7 glyph ?-
1235−202:10 name xs
1236−203:9 INDENT
1237−203:9 lit ~
1238−203:11 lit %.y
1239−204:9 NEWLINE
1240−204:9 glyph [
1241−204:10 tight name item
1242−204:15 name rest
1243−204:19 tight glyph ]
1244−205:11 INDENT
1245−205:11 glyph ?-
1246−205:14 glyph (
1247−205:15 tight name predicate
1248−205:25 name item
1249−205:29 tight glyph )
1250−206:13 INDENT
1251−206:13 lit %.y
1252−206:17 glyph (
1253−206:18 tight name levy
1254−206:23 name rest
1255−206:28 name predicate
1256−206:37 tight glyph )
1257−207:13 NEWLINE
1258−207:13 lit %.n
1259−207:17 lit %.n
1260−209:1 DEDENT
1261−209:1 DEDENT
1262−209:1 DEDENT
1263−209:1 DEDENT
1264−209:1 DEDENT
1265−209:1 DEDENT
1266−209:1 NEWLINE
1267−209:1 glyph ++
1268−209:4 name lien
1269−209:9 glyph |=
1270−209:12 name args
1271−209:16 tight glyph =
1272−209:17 tight glyph [
1273−209:18 tight glyph (
1274−209:19 tight name list
1275−209:24 tvar A
1276−209:25 tight glyph )
1277−209:27 glyph $-(
1278−209:30 tight tvar A
1279−209:32 glyph ?
1280−209:33 tight glyph )
1281−209:34 tight glyph ]
1282−210:3 INDENT
1283−210:3 glyph ?-
1284−210:6 name args
1285−211:5 INDENT
1286−211:5 glyph [
1287−211:6 tight name xs
1288−211:9 name predicate
1289−211:18 tight glyph ]
1290−212:7 INDENT
1291−212:7 glyph ?-
1292−212:10 name xs
1293−213:9 INDENT
1294−213:9 lit ~
1295−213:11 lit %.n
1296−214:9 NEWLINE
1297−214:9 glyph [
1298−214:10 tight name item
1299−214:15 name rest
1300−214:19 tight glyph ]
1301−215:11 INDENT
1302−215:11 glyph ?-
1303−215:14 glyph (
1304−215:15 tight name predicate
1305−215:25 name item
1306−215:29 tight glyph )
1307−216:13 INDENT
1308−216:13 lit %.y
1309−216:17 lit %.y
1310−217:13 NEWLINE
1311−217:13 lit %.n
1312−217:17 glyph (
1313−217:18 tight name lien
1314−217:23 name rest
1315−217:28 name predicate
1316−217:37 tight glyph )
1317−219:1 DEDENT
1318−219:1 DEDENT
1319−219:1 DEDENT
1320−219:1 DEDENT
1321−219:1 DEDENT
1322−219:1 DEDENT
1323−219:1 NEWLINE
1324−219:1 glyph ++
1325−219:4 name roll
1326−219:9 glyph |=
1327−219:12 name args
1328−219:16 tight glyph =
1329−219:17 tight glyph [
1330−219:18 tight glyph (
1331−219:19 tight name list
1332−219:24 tvar A
1333−219:25 tight glyph )
1334−219:27 tvar B
1335−219:29 glyph $-(
1336−219:32 tight glyph [
1337−219:33 tight tvar A
1338−219:35 tvar B
1339−219:36 tight glyph ]
1340−219:38 tvar B
1341−219:39 tight glyph )
1342−219:40 tight glyph ]
1343−220:3 INDENT
1344−220:3 glyph ?-
1345−220:6 name args
1346−221:5 INDENT
1347−221:5 glyph [
1348−221:6 tight name xs
1349−221:9 name start
1350−221:15 name combine
1351−221:22 tight glyph ]
1352−222:7 INDENT
1353−222:7 glyph ?-
1354−222:10 name xs
1355−223:9 INDENT
1356−223:9 lit ~
1357−223:11 name start
1358−224:9 NEWLINE
1359−224:9 glyph [
1360−224:10 tight name item
1361−224:15 name rest
1362−224:19 tight glyph ]
1363−224:21 glyph (
1364−224:22 tight name roll
1365−224:27 name rest
1366−224:32 glyph (
1367−224:33 tight name combine
1368−224:41 name item
1369−224:46 name start
1370−224:51 tight glyph )
1371−224:53 name combine
1372−224:60 tight glyph )
1373−226:1 DEDENT
1374−226:1 DEDENT
1375−226:1 DEDENT
1376−226:1 DEDENT
1377−226:1 NEWLINE
1378−226:1 glyph ++
1379−226:4 name reel
1380−226:9 glyph |=
1381−226:12 name args
1382−226:16 tight glyph =
1383−226:17 tight glyph [
1384−226:18 tight glyph (
1385−226:19 tight name list
1386−226:24 tvar A
1387−226:25 tight glyph )
1388−226:27 tvar B
1389−226:29 glyph $-(
1390−226:32 tight glyph [
1391−226:33 tight tvar A
1392−226:35 tvar B
1393−226:36 tight glyph ]
1394−226:38 tvar B
1395−226:39 tight glyph )
1396−226:40 tight glyph ]
1397−227:3 INDENT
1398−227:3 glyph ?-
1399−227:6 name args
1400−228:5 INDENT
1401−228:5 glyph [
1402−228:6 tight name xs
1403−228:9 name start
1404−228:15 name combine
1405−228:22 tight glyph ]
1406−229:7 INDENT
1407−229:7 glyph ?-
1408−229:10 name xs
1409−230:9 INDENT
1410−230:9 lit ~
1411−230:11 name start
1412−231:9 NEWLINE
1413−231:9 glyph [
1414−231:10 tight name item
1415−231:15 name rest
1416−231:19 tight glyph ]
1417−231:21 glyph (
1418−231:22 tight name combine
1419−231:30 name item
1420−231:35 glyph (
1421−231:36 tight name reel
1422−231:41 name rest
1423−231:46 name start
1424−231:52 name combine
1425−231:59 tight glyph )
1426−231:60 tight glyph )
1427−231:61 DEDENT
1428−231:61 DEDENT
1429−231:61 DEDENT
1430−231:61 DEDENT
1431−231:61 NEWLINE
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 ^-
1303+208:23 glyph (
1304+208:24 tight name list
1305+208:29 tvar A
1306+208:30 tight glyph )
1307+209:9 INDENT
1308+209:9 glyph ?-
1309+209:12 name xs
1310+210:11 INDENT
1311+210:11 lit ~
1312+210:13 lit ~
1313+211:11 NEWLINE
1314+211:11 glyph [
1315+211:12 tight name item
1316+211:17 name rest
1317+211:21 tight glyph ]
1318+212:13 INDENT
1319+212:13 glyph ?-
1320+212:16 glyph (
1321+212:17 tight name predicate
1322+212:27 name item
1323+212:31 tight glyph )
1324+213:15 INDENT
1325+213:15 lit %.y
1326+213:19 glyph (
1327+213:20 tight name skip
1328+213:25 name rest
1329+213:30 name predicate
1330+213:39 tight glyph )
1331+214:15 NEWLINE
1332+214:15 lit %.n
1333+214:19 glyph [
1334+214:20 tight name item
1335+214:25 glyph (
1336+214:26 tight name skip
1337+214:31 name rest
1338+214:36 name predicate
1339+214:45 tight glyph )
1340+214:46 tight glyph ]
1341+216:1 DEDENT
1342+216:1 DEDENT
1343+216:1 DEDENT
1344+216:1 DEDENT
1345+216:1 DEDENT
1346+216:1 DEDENT
1347+216:1 NEWLINE
1348+216:1 glyph ++
1349+216:4 name levy
1350+216:9 glyph |=
1351+216:12 name args
1352+216:16 tight glyph =
1353+216:17 tight glyph [
1354+216:18 tight glyph (
1355+216:19 tight name list
1356+216:24 tvar A
1357+216:25 tight glyph )
1358+216:27 glyph $-(
1359+216:30 tight tvar A
1360+216:32 glyph ?
1361+216:33 tight glyph )
1362+216:34 tight glyph ]
1363+217:3 INDENT
1364+217:3 glyph ^-
1365+217:6 glyph ?
1366+218:5 INDENT
1367+218:5 glyph ?-
1368+218:8 name args
1369+219:7 INDENT
1370+219:7 glyph [
1371+219:8 tight name xs
1372+219:11 name predicate
1373+219:20 tight glyph ]
1374+220:9 INDENT
1375+220:9 glyph ?-
1376+220:12 name xs
1377+221:11 INDENT
1378+221:11 lit ~
1379+221:13 lit %.y
1380+222:11 NEWLINE
1381+222:11 glyph [
1382+222:12 tight name item
1383+222:17 name rest
1384+222:21 tight glyph ]
1385+223:13 INDENT
1386+223:13 glyph ?-
1387+223:16 glyph (
1388+223:17 tight name predicate
1389+223:27 name item
1390+223:31 tight glyph )
1391+224:15 INDENT
1392+224:15 lit %.y
1393+224:19 glyph (
1394+224:20 tight name levy
1395+224:25 name rest
1396+224:30 name predicate
1397+224:39 tight glyph )
1398+225:15 NEWLINE
1399+225:15 lit %.n
1400+225:19 lit %.n
1401+227:1 DEDENT
1402+227:1 DEDENT
1403+227:1 DEDENT
1404+227:1 DEDENT
1405+227:1 DEDENT
1406+227:1 DEDENT
1407+227:1 DEDENT
1408+227:1 NEWLINE
1409+227:1 glyph ++
1410+227:4 name lien
1411+227:9 glyph |=
1412+227:12 name args
1413+227:16 tight glyph =
1414+227:17 tight glyph [
1415+227:18 tight glyph (
1416+227:19 tight name list
1417+227:24 tvar A
1418+227:25 tight glyph )
1419+227:27 glyph $-(
1420+227:30 tight tvar A
1421+227:32 glyph ?
1422+227:33 tight glyph )
1423+227:34 tight glyph ]
1424+228:3 INDENT
1425+228:3 glyph ^-
1426+228:6 glyph ?
1427+229:5 INDENT
1428+229:5 glyph ?-
1429+229:8 name args
1430+230:7 INDENT
1431+230:7 glyph [
1432+230:8 tight name xs
1433+230:11 name predicate
1434+230:20 tight glyph ]
1435+231:9 INDENT
1436+231:9 glyph ?-
1437+231:12 name xs
1438+232:11 INDENT
1439+232:11 lit ~
1440+232:13 lit %.n
1441+233:11 NEWLINE
1442+233:11 glyph [
1443+233:12 tight name item
1444+233:17 name rest
1445+233:21 tight glyph ]
1446+234:13 INDENT
1447+234:13 glyph ?-
1448+234:16 glyph (
1449+234:17 tight name predicate
1450+234:27 name item
1451+234:31 tight glyph )
1452+235:15 INDENT
1453+235:15 lit %.y
1454+235:19 lit %.y
1455+236:15 NEWLINE
1456+236:15 lit %.n
1457+236:19 glyph (
1458+236:20 tight name lien
1459+236:25 name rest
1460+236:30 name predicate
1461+236:39 tight glyph )
1462+238:1 DEDENT
1463+238:1 DEDENT
1464+238:1 DEDENT
1465+238:1 DEDENT
1466+238:1 DEDENT
1467+238:1 DEDENT
1468+238:1 DEDENT
1469+238:1 NEWLINE
1470+238:1 glyph ++
1471+238:4 name roll
1472+238:9 glyph |=
1473+238:12 name args
1474+238:16 tight glyph =
1475+238:17 tight glyph [
1476+238:18 tight glyph (
1477+238:19 tight name list
1478+238:24 tvar A
1479+238:25 tight glyph )
1480+238:27 tvar B
1481+238:29 glyph $-(
1482+238:32 tight glyph [
1483+238:33 tight tvar A
1484+238:35 tvar B
1485+238:36 tight glyph ]
1486+238:38 tvar B
1487+238:39 tight glyph )
1488+238:40 tight glyph ]
1489+239:3 INDENT
1490+239:3 glyph ?-
1491+239:6 name args
1492+240:5 INDENT
1493+240:5 glyph [
1494+240:6 tight name xs
1495+240:9 name start
1496+240:15 name combine
1497+240:22 tight glyph ]
1498+241:7 INDENT
1499+241:7 glyph ?-
1500+241:10 name xs
1501+242:9 INDENT
1502+242:9 lit ~
1503+242:11 name start
1504+243:9 NEWLINE
1505+243:9 glyph [
1506+243:10 tight name item
1507+243:15 name rest
1508+243:19 tight glyph ]
1509+243:21 glyph (
1510+243:22 tight name roll
1511+243:27 name rest
1512+243:32 glyph (
1513+243:33 tight name combine
1514+243:41 name item
1515+243:46 name start
1516+243:51 tight glyph )
1517+243:53 name combine
1518+243:60 tight glyph )
1519+245:1 DEDENT
1520+245:1 DEDENT
1521+245:1 DEDENT
1522+245:1 DEDENT
1523+245:1 NEWLINE
1524+245:1 glyph ++
1525+245:4 name reel
1526+245:9 glyph |=
1527+245:12 name args
1528+245:16 tight glyph =
1529+245:17 tight glyph [
1530+245:18 tight glyph (
1531+245:19 tight name list
1532+245:24 tvar A
1533+245:25 tight glyph )
1534+245:27 tvar B
1535+245:29 glyph $-(
1536+245:32 tight glyph [
1537+245:33 tight tvar A
1538+245:35 tvar B
1539+245:36 tight glyph ]
1540+245:38 tvar B
1541+245:39 tight glyph )
1542+245:40 tight glyph ]
1543+246:3 INDENT
1544+246:3 glyph ?-
1545+246:6 name args
1546+247:5 INDENT
1547+247:5 glyph [
1548+247:6 tight name xs
1549+247:9 name start
1550+247:15 name combine
1551+247:22 tight glyph ]
1552+248:7 INDENT
1553+248:7 glyph ?-
1554+248:10 name xs
1555+249:9 INDENT
1556+249:9 lit ~
1557+249:11 name start
1558+250:9 NEWLINE
1559+250:9 glyph [
1560+250:10 tight name item
1561+250:15 name rest
1562+250:19 tight glyph ]
1563+250:21 glyph (
1564+250:22 tight name combine
1565+250:30 name item
1566+250:35 glyph (
1567+250:36 tight name reel
1568+250:41 name rest
1569+250:46 name start
1570+250:52 name combine
1571+250:59 tight glyph )
1572+250:60 tight glyph )
1573+252:1 DEDENT
1574+252:1 DEDENT
1575+252:1 DEDENT
1576+252:1 DEDENT
1577+252:1 NEWLINE
1578+252:1 glyph ++
1579+252:4 name flit
1580+252:9 glyph |=
1581+252:12 name predicate
1582+252:21 tight glyph =
1583+252:22 tight glyph $-(
1584+252:25 tight tvar A
1585+252:27 glyph ?
1586+252:28 tight glyph )
1587+253:3 INDENT
1588+253:3 glyph |=
1589+253:6 name value
1590+253:11 tight glyph =
1591+253:12 tight tvar A
1592+254:5 INDENT
1593+254:5 glyph ^-
1594+254:8 glyph (
1595+254:9 tight name unit
1596+254:14 tvar A
1597+254:15 tight glyph )
1598+255:7 INDENT
1599+255:7 glyph ?-
1600+255:10 glyph (
1601+255:11 tight name predicate
1602+255:21 name value
1603+255:26 tight glyph )
1604+256:9 INDENT
1605+256:9 lit %.y
1606+256:13 glyph `
1607+256:14 tight name value
1608+257:9 NEWLINE
1609+257:9 lit %.n
1610+257:13 lit ~
1611+259:1 DEDENT
1612+259:1 DEDENT
1613+259:1 DEDENT
1614+259:1 DEDENT
1615+259:1 NEWLINE
1616+259:1 glyph ++
1617+259:4 name murn
1618+259:9 glyph |=
1619+259:12 name args
1620+259:16 tight glyph =
1621+259:17 tight glyph [
1622+259:18 tight glyph (
1623+259:19 tight name list
1624+259:24 tvar A
1625+259:25 tight glyph )
1626+259:27 glyph $-(
1627+259:30 tight tvar A
1628+259:32 glyph (
1629+259:33 tight name unit
1630+259:38 tvar B
1631+259:39 tight glyph )
1632+259:40 tight glyph )
1633+259:41 tight glyph ]
1634+260:3 INDENT
1635+260:3 glyph ?-
1636+260:6 name args
1637+261:5 INDENT
1638+261:5 glyph [
1639+261:6 tight name xs
1640+261:9 name f
1641+261:10 tight glyph ]
1642+261:12 glyph ^-
1643+261:15 glyph (
1644+261:16 tight name list
1645+261:21 tvar B
1646+261:22 tight glyph )
1647+262:9 INDENT
1648+262:9 glyph ?-
1649+262:12 name xs
1650+263:11 INDENT
1651+263:11 lit ~
1652+263:13 lit ~
1653+264:11 NEWLINE
1654+264:11 glyph [
1655+264:12 tight name item
1656+264:17 name rest
1657+264:21 tight glyph ]
1658+265:13 INDENT
1659+265:13 glyph ?-
1660+265:16 glyph (
1661+265:17 tight name f
1662+265:19 name item
1663+265:23 tight glyph )
1664+266:15 INDENT
1665+266:15 lit ~
1666+266:17 glyph (
1667+266:18 tight name murn
1668+266:23 name rest
1669+266:28 name f
1670+266:29 tight glyph )
1671+267:15 NEWLINE
1672+267:15 glyph [
1673+267:16 tight lit ~
1674+267:18 name value
1675+267:23 tight glyph ]
1676+267:25 glyph [
1677+267:26 tight name value
1678+267:32 glyph (
1679+267:33 tight name murn
1680+267:38 name rest
1681+267:43 name f
1682+267:44 tight glyph )
1683+267:45 tight glyph ]
1684+269:1 DEDENT
1685+269:1 DEDENT
1686+269:1 DEDENT
1687+269:1 DEDENT
1688+269:1 DEDENT
1689+269:1 DEDENT
1690+269:1 NEWLINE
1691+269:1 glyph ++
1692+269:4 name join
1693+269:9 glyph |=
1694+269:12 name args
1695+269:16 tight glyph =
1696+269:17 tight glyph [
1697+269:18 tight tvar A
1698+269:20 glyph (
1699+269:21 tight name list
1700+269:26 tvar A
1701+269:27 tight glyph )
1702+269:28 tight glyph ]
1703+270:3 INDENT
1704+270:3 glyph ?-
1705+270:6 name args
1706+271:5 INDENT
1707+271:5 glyph [
1708+271:6 tight name separator
1709+271:16 name xs
1710+271:18 tight glyph ]
1711+271:20 glyph ^-
1712+271:23 glyph (
1713+271:24 tight name list
1714+271:29 tvar A
1715+271:30 tight glyph )
1716+272:9 INDENT
1717+272:9 glyph ?-
1718+272:12 name xs
1719+273:11 INDENT
1720+273:11 lit ~
1721+273:13 lit ~
1722+274:11 NEWLINE
1723+274:11 glyph [
1724+274:12 tight name item
1725+274:17 name rest
1726+274:21 tight glyph ]
1727+275:13 INDENT
1728+275:13 glyph ?-
1729+275:16 name rest
1730+276:15 INDENT
1731+276:15 lit ~
1732+276:17 glyph [
1733+276:18 tight name item
1734+276:23 lit ~
1735+276:24 tight glyph ]
1736+277:15 NEWLINE
1737+277:15 glyph [
1738+277:16 tight name next
1739+277:21 name more
1740+277:25 tight glyph ]
1741+277:27 glyph [
1742+277:28 tight name item
1743+277:33 glyph [
1744+277:34 tight name separator
1745+277:44 glyph (
1746+277:45 tight name join
1747+277:50 name separator
1748+277:60 name rest
1749+277:64 tight glyph )
1750+277:65 tight glyph ]
1751+277:66 tight glyph ]
1752+279:1 DEDENT
1753+279:1 DEDENT
1754+279:1 DEDENT
1755+279:1 DEDENT
1756+279:1 DEDENT
1757+279:1 DEDENT
1758+279:1 NEWLINE
1759+279:1 glyph ++
1760+279:4 name snip
1761+279:9 glyph |=
1762+279:12 name xs
1763+279:14 tight glyph =
1764+279:15 tight glyph (
1765+279:16 tight name list
1766+279:21 tvar A
1767+279:22 tight glyph )
1768+280:3 INDENT
1769+280:3 glyph ^-
1770+280:6 glyph (
1771+280:7 tight name list
1772+280:12 tvar A
1773+280:13 tight glyph )
1774+281:5 INDENT
1775+281:5 glyph ?-
1776+281:8 name xs
1777+282:7 INDENT
1778+282:7 lit ~
1779+282:9 lit ~
1780+283:7 NEWLINE
1781+283:7 glyph [
1782+283:8 tight name item
1783+283:13 name rest
1784+283:17 tight glyph ]
1785+284:9 INDENT
1786+284:9 glyph ?-
1787+284:12 name rest
1788+285:11 INDENT
1789+285:11 lit ~
1790+285:13 lit ~
1791+286:11 NEWLINE
1792+286:11 glyph [
1793+286:12 tight name next
1794+286:17 name more
1795+286:21 tight glyph ]
1796+286:23 glyph [
1797+286:24 tight name item
1798+286:29 glyph (
1799+286:30 tight name snip
1800+286:35 name rest
1801+286:39 tight glyph )
1802+286:40 tight glyph ]
1803+288:1 DEDENT
1804+288:1 DEDENT
1805+288:1 DEDENT
1806+288:1 DEDENT
1807+288:1 DEDENT
1808+288:1 NEWLINE
1809+288:1 glyph ++
1810+288:4 name rear
1811+288:9 glyph |=
1812+288:12 name xs
1813+288:14 tight glyph =
1814+288:15 tight glyph (
1815+288:16 tight name list
1816+288:21 tvar A
1817+288:22 tight glyph )
1818+289:3 INDENT
1819+289:3 glyph ?-
1820+289:6 name xs
1821+290:5 INDENT
1822+290:5 lit ~
1823+290:7 glyph !!
1824+291:5 NEWLINE
1825+291:5 glyph [
1826+291:6 tight name item
1827+291:11 name rest
1828+291:15 tight glyph ]
1829+292:7 INDENT
1830+292:7 glyph ?-
1831+292:10 name rest
1832+293:9 INDENT
1833+293:9 lit ~
1834+293:11 name item
1835+294:9 NEWLINE
1836+294:9 glyph [
1837+294:10 tight name next
1838+294:15 name more
1839+294:19 tight glyph ]
1840+294:21 glyph (
1841+294:22 tight name rear
1842+294:27 name rest
1843+294:31 tight glyph )
1844+296:1 DEDENT
1845+296:1 DEDENT
1846+296:1 DEDENT
1847+296:1 DEDENT
1848+296:1 NEWLINE
1849+296:1 glyph ++
1850+296:4 name cork
1851+296:9 glyph |=
1852+296:12 name gates
1853+296:17 tight glyph =
1854+296:18 tight glyph [
1855+296:19 tight glyph $-(
1856+296:22 tight tvar A
1857+296:24 tvar B
1858+296:25 tight glyph )
1859+296:27 glyph $-(
1860+296:30 tight tvar B
1861+296:32 tvar C
1862+296:33 tight glyph )
1863+296:34 tight glyph ]
1864+297:3 INDENT
1865+297:3 glyph ?-
1866+297:6 name gates
1867+298:5 INDENT
1868+298:5 glyph [
1869+298:6 tight name f
1870+298:8 name g
1871+298:9 tight glyph ]
1872+298:11 glyph |=
1873+298:14 name x
1874+298:15 tight glyph =
1875+298:16 tight tvar A
1876+298:18 glyph (
1877+298:19 tight name g
1878+298:21 glyph (
1879+298:22 tight name f
1880+298:24 name x
1881+298:25 tight glyph )
1882+298:26 tight glyph )
1883+300:1 DEDENT
1884+300:1 DEDENT
1885+300:1 NEWLINE
1886+300:1 glyph ++
1887+300:4 name corl
1888+300:9 glyph |=
1889+300:12 name gates
1890+300:17 tight glyph =
1891+300:18 tight glyph [
1892+300:19 tight glyph $-(
1893+300:22 tight tvar B
1894+300:24 tvar C
1895+300:25 tight glyph )
1896+300:27 glyph $-(
1897+300:30 tight tvar A
1898+300:32 tvar B
1899+300:33 tight glyph )
1900+300:34 tight glyph ]
1901+301:3 INDENT
1902+301:3 glyph ?-
1903+301:6 name gates
1904+302:5 INDENT
1905+302:5 glyph [
1906+302:6 tight name f
1907+302:8 name g
1908+302:9 tight glyph ]
1909+302:11 glyph |=
1910+302:14 name x
1911+302:15 tight glyph =
1912+302:16 tight tvar A
1913+302:18 glyph (
1914+302:19 tight name f
1915+302:21 glyph (
1916+302:22 tight name g
1917+302:24 name x
1918+302:25 tight glyph )
1919+302:26 tight glyph )
1920+304:1 DEDENT
1921+304:1 DEDENT
1922+304:1 NEWLINE
1923+304:1 glyph ++
1924+304:4 name cury
1925+304:9 glyph |=
1926+304:12 name args
1927+304:16 tight glyph =
1928+304:17 tight glyph [
1929+304:18 tight glyph $-(
1930+304:21 tight glyph [
1931+304:22 tight tvar A
1932+304:24 tvar B
1933+304:25 tight glyph ]
1934+304:27 tvar C
1935+304:28 tight glyph )
1936+304:30 tvar A
1937+304:31 tight glyph ]
1938+305:3 INDENT
1939+305:3 glyph ?-
1940+305:6 name args
1941+306:5 INDENT
1942+306:5 glyph [
1943+306:6 tight name f
1944+306:8 name a
1945+306:9 tight glyph ]
1946+306:11 glyph |=
1947+306:14 name b
1948+306:15 tight glyph =
1949+306:16 tight tvar B
1950+306:18 glyph (
1951+306:19 tight name f
1952+306:21 name a
1953+306:23 name b
1954+306:24 tight glyph )
1955+308:1 DEDENT
1956+308:1 DEDENT
1957+308:1 NEWLINE
1958+308:1 glyph ++
1959+308:4 name curr
1960+308:9 glyph |=
1961+308:12 name args
1962+308:16 tight glyph =
1963+308:17 tight glyph [
1964+308:18 tight glyph $-(
1965+308:21 tight glyph [
1966+308:22 tight tvar A
1967+308:24 tvar B
1968+308:25 tight glyph ]
1969+308:27 tvar C
1970+308:28 tight glyph )
1971+308:30 tvar B
1972+308:31 tight glyph ]
1973+309:3 INDENT
1974+309:3 glyph ?-
1975+309:6 name args
1976+310:5 INDENT
1977+310:5 glyph [
1978+310:6 tight name f
1979+310:8 name b
1980+310:9 tight glyph ]
1981+310:11 glyph |=
1982+310:14 name a
1983+310:15 tight glyph =
1984+310:16 tight tvar A
1985+310:18 glyph (
1986+310:19 tight name f
1987+310:21 name a
1988+310:23 name b
1989+310:24 tight glyph )
1990+312:1 DEDENT
1991+312:1 DEDENT
1992+312:1 NEWLINE
1993+312:1 glyph +$
1994+312:4 name cmd
1995+312:8 glyph |$
1996+312:11 glyph [
1997+312:12 tight tvar M
1998+312:13 tight glyph ]
1999+313:3 INDENT
2000+313:3 glyph [
2001+313:4 tight lit %poke
2002+313:10 name p
2003+313:11 tight glyph =
2004+313:12 tight name poke
2005+313:17 name reply
2006+313:22 tight glyph =
2007+313:23 tight glyph $-(
2008+313:26 tight glyph (
2009+313:27 tight name unit
2010+313:32 aura @t
2011+313:34 tight glyph )
2012+313:36 tvar M
2013+313:37 tight glyph )
2014+313:38 tight glyph ]
2015+314:3 NEWLINE
2016+314:3 glyph [
2017+314:4 tight lit %go
2018+314:8 name url
2019+314:11 tight glyph =
2020+314:12 tight aura @t
2021+314:14 tight glyph ]
2022+315:3 NEWLINE
2023+315:3 glyph [
2024+315:4 tight lit %wait
2025+315:10 name gap
2026+315:13 tight glyph =
2027+315:14 tight aura @dr
2028+315:18 name msg
2029+315:21 tight glyph =
2030+315:22 tight tvar M
2031+315:23 tight glyph ]
2032+316:3 NEWLINE
2033+316:3 glyph [
2034+316:4 tight lit %now
2035+316:9 name reply
2036+316:14 tight glyph =
2037+316:15 tight glyph $-(
2038+316:18 tight aura @da
2039+316:22 tvar M
2040+316:23 tight glyph )
2041+316:24 tight glyph ]
2042+317:3 NEWLINE
2043+317:3 glyph [
2044+317:4 tight lit %who
2045+317:9 name reply
2046+317:14 tight glyph =
2047+317:15 tight glyph $-(
2048+317:18 tight aura @p
2049+317:21 tvar M
2050+317:22 tight glyph )
2051+317:23 tight glyph ]
2052+319:1 DEDENT
2053+319:1 NEWLINE
2054+319:1 glyph ++
2055+319:4 name gth
2056+319:8 glyph |=
2057+319:11 name args
2058+319:15 tight glyph =
2059+319:16 tight glyph [
2060+319:17 tight tvar A
2061+319:19 tvar A
2062+319:20 tight glyph ]
2063+319:22 glyph (
2064+319:23 tight wing gth-atom.internal
2065+319:41 name args
2066+319:45 tight glyph )
2067+319:46 NEWLINE
tests/golden/prelude-unit-list-transforms/tree.txt+862−573
@@ -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,591 +14,888 @@
2214 (wing 9:6 p)
2315 (arm 10:5
2416 (cell 10:5 (bind 10:6 a) (bind 10:8 b))
25− (wing 10:11 b))))))
26− (value 12:1 not
27− (gate 12:8
28− (face 12:11 b (flag 12:13))
17+ (wing 10:11 a))))))
18+ (value 12:1 tail
19+ (gate 12:9
20+ (face 12:12 p
21+ (cell 12:14 (tvar 12:15 A) (tvar 12:17 B)))
2922 (body 13:3
3023 (branch 13:3
31− (wing 13:6 b)
32− (arm 14:5 (lit 14:5 %.y) (lit 14:9 %.n))
33− (arm 15:5 (lit 15:5 %.n) (lit 15:9 %.y))))))
34− (mold 17:1 list
35− (generic 17:9 A
36− (union 18:3
37− (const 18:3 ~)
38− (cell 19:3
39− (face 19:4 i (tvar 19:6 A))
40− (face 19:8 t
41− (apply 19:10 list (tvar 19:16 A)))))))
42− (mold 21:1 unit
24+ (wing 13:6 p)
25+ (arm 14:5
26+ (cell 14:5 (bind 14:6 a) (bind 14:8 b))
27+ (wing 14:11 b))))))
28+ (value 16:1 not
29+ (gate 16:8
30+ (face 16:11 b (flag 16:13))
31+ (body 17:3
32+ (branch 17:3
33+ (wing 17:6 b)
34+ (arm 18:5 (lit 18:5 %.y) (lit 18:9 %.n))
35+ (arm 19:5 (lit 19:5 %.n) (lit 19:9 %.y))))))
36+ (mold 21:1 list
4337 (generic 21:9 A
4438 (union 22:3
4539 (const 22:3 ~)
4640 (cell 23:3
47− (const 23:4 ~)
48− (face 23:6 u (tvar 23:8 A))))))
49− (value 25:1 fall
50− (gate 25:9
51− (face 25:12 args
52− (cell 25:17
53− (apply 25:18 unit (tvar 25:24 A))
54− (tvar 25:27 A)))
55− (body 26:3
56− (branch 26:3
57− (wing 26:6 args)
58− (arm 27:5
59− (cell 27:5 (bind 27:6 maybe) (bind 27:12 fallback))
60− (body 28:7
61− (branch 28:7
62− (wing 28:10 maybe)
63− (arm 29:9 (lit 29:9 ~) (wing 29:11 fallback))
64− (arm 30:9
65− (cell 30:9 (lit 30:10 ~) (bind 30:12 value))
66− (wing 30:19 value)))))))))
67− (value 32:1 need
68− (gate 32:9
69− (face 32:12 maybe
70− (apply 32:18 unit (tvar 32:24 A)))
71− (body 33:3
72− (branch 33:3
73− (wing 33:6 maybe)
74− (arm 34:5 (lit 34:5 ~) (crash 34:7))
75− (arm 35:5
76− (cell 35:5 (lit 35:6 ~) (bind 35:8 value))
77− (wing 35:15 value))))))
78− (value 37:1 weld
79− (gate 37:9
80− (face 37:12 args
81− (cell 37:17
82− (apply 37:18 list (tvar 37:24 A))
83− (apply 37:27 list (tvar 37:33 A))))
84− (body 38:3
85− (branch 38:3
86− (wing 38:6 args)
41+ (face 23:4 i (tvar 23:6 A))
42+ (face 23:8 t
43+ (apply 23:10 list (tvar 23:16 A)))))))
44+ (mold 25:1 unit
45+ (generic 25:9 A
46+ (union 26:3
47+ (const 26:3 ~)
48+ (cell 27:3
49+ (const 27:4 ~)
50+ (face 27:6 u (tvar 27:8 A))))))
51+ (value 29:1 fall
52+ (gate 29:9
53+ (face 29:12 args
54+ (cell 29:17
55+ (apply 29:18 unit (tvar 29:24 A))
56+ (tvar 29:27 A)))
57+ (body 30:3
58+ (branch 30:3
59+ (wing 30:6 args)
60+ (arm 31:5
61+ (cell 31:5 (bind 31:6 maybe) (bind 31:12 fallback))
62+ (body 32:7
63+ (branch 32:7
64+ (wing 32:10 maybe)
65+ (arm 33:9 (lit 33:9 ~) (wing 33:11 fallback))
66+ (arm 34:9
67+ (cell 34:9 (lit 34:10 ~) (bind 34:12 value))
68+ (wing 34:19 value)))))))))
69+ (value 36:1 need
70+ (gate 36:9
71+ (face 36:12 maybe
72+ (apply 36:18 unit (tvar 36:24 A)))
73+ (body 37:3
74+ (branch 37:3
75+ (wing 37:6 maybe)
76+ (arm 38:5 (lit 38:5 ~) (crash 38:7))
8777 (arm 39:5
88− (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
89− (body 40:7
90− (branch 40:7
91− (wing 40:10 xs)
92− (arm 41:9 (lit 41:9 ~) (wing 41:11 ys))
93− (arm 42:9
94− (cell 42:9 (bind 42:10 item) (bind 42:15 rest))
95− (tuple 42:21
96− (wing 42:22 item)
97− (group 42:27
98− (call 42:28 (wing 42:28 weld) (wing 42:33 rest) (wing 42:38 ys))))))))))))
99− (value 44:1 turn
100− (gate 44:9
101− (face 44:12 args
102− (cell 44:17
103− (apply 44:18 list (tvar 44:24 A))
104− (fn 44:27 (tvar 44:30 A) (tvar 44:32 B))))
105− (body 45:3
106− (branch 45:3
107− (wing 45:6 args)
108− (arm 46:5
109− (cell 46:5 (bind 46:6 xs) (bind 46:9 f))
110− (body 47:7
111− (branch 47:7
112− (wing 47:10 xs)
113− (arm 48:9 (lit 48:9 ~) (lit 48:11 ~))
114− (arm 49:9
115− (cell 49:9 (bind 49:10 item) (bind 49:15 rest))
116− (tuple 49:21
117− (group 49:22
118− (call 49:23 (wing 49:23 f) (wing 49:25 item)))
119− (group 49:31
120− (call 49:32 (wing 49:32 turn) (wing 49:37 rest) (wing 49:42 f))))))))))))
121− (mold 51:1 dime
122− (cell 51:9
123− (face 51:10 p (aura 51:12 @ta))
124− (face 51:16 q (aura 51:18 @))))
125− (mold 53:1 hair
126− (cell 53:9
127− (face 53:10 p (aura 53:12 @ud))
128− (face 53:16 q (aura 53:18 @ud))))
129− (mold 55:1 pint
130− (cell 55:9
131− (face 55:10 p
132− (cell 55:12
133− (face 55:13 p (aura 55:15 @))
134− (face 55:17 q (aura 55:19 @))))
135− (face 55:22 q
136− (cell 55:24
137− (face 55:25 p (aura 55:27 @))
138− (face 55:29 q (aura 55:31 @))))))
139− (mold 57:1 coin
140− (union 58:3
141− (cell 58:3
142− (const 58:4 %$)
143− (face 58:7 p (ref 58:9 dime)))
144− (cell 59:3
145− (const 59:4 %blob)
146− (face 59:10 p (noun 59:12)))
147− (cell 60:3
148− (const 60:4 %many)
149− (face 60:10 p
150− (apply 60:12 list (ref 60:18 coin))))))
151− (mold 62:1 pair
152− (generic 62:9 A B
153− (cell 62:18
154− (face 62:19 p (tvar 62:21 A))
155− (face 62:23 q (tvar 62:25 B)))))
156− (mold 64:1 trel
157− (generic 64:9 A B C
158− (cell 64:20
159− (face 64:21 p (tvar 64:23 A))
160− (face 64:25 q (tvar 64:27 B))
161− (face 64:29 r (tvar 64:31 C)))))
162− (mold 66:1 qual
163− (generic 66:9 A B C D
164− (cell 66:22
165− (face 66:23 p (tvar 66:25 A))
166− (face 66:27 q (tvar 66:29 B))
167− (face 66:31 r (tvar 66:33 C))
168− (face 66:35 s (tvar 66:37 D)))))
169− (mold 68:1 cord (aura 68:9 @t))
170− (mold 70:1 knot (aura 70:9 @ta))
171− (mold 72:1 tape
172− (apply 72:9 list (aura 72:15 @tD)))
173− (mold 74:1 path
174− (apply 74:9 list (ref 74:15 knot)))
175− (mold 76:1 tank
176− (union 77:3
177− (ref 77:3 cord)
178− (cell 78:3
179− (const 78:4 %leaf)
180− (face 78:10 p (ref 78:12 tape)))
181− (cell 79:3
182− (const 79:4 %palm)
183− (face 79:10 p
184− (apply 79:12 qual (ref 79:18 tape) (ref 79:23 tape) (ref 79:28 tape) (ref 79:33 tape)))
185− (face 79:39 q
186− (apply 79:41 list (ref 79:47 tank))))
187− (cell 80:3
188− (const 80:4 %rose)
189− (face 80:10 p
190− (apply 80:12 trel (ref 80:18 tape) (ref 80:23 tape) (ref 80:28 tape)))
191− (face 80:34 q
192− (apply 80:36 list (ref 80:42 tank))))))
193− (mold 82:1 nail
194− (cell 82:9
195− (face 82:10 p (ref 82:12 hair))
196− (face 82:17 q (ref 82:19 tape))))
197− (mold 84:1 edge
198− (cell 84:9
199− (face 84:10 p (ref 84:12 hair))
200− (face 84:17 q
201− (apply 84:19 unit
202− (cell 84:25
203− (face 84:26 p (noun 84:28))
204− (face 84:30 q (ref 84:32 nail)))))))
205− (mold 86:1 rule
206− (fn 86:9 (ref 86:12 nail) (ref 86:17 edge)))
207− (mold 88:1 spot
78+ (cell 39:5 (lit 39:6 ~) (bind 39:8 value))
79+ (wing 39:15 value))))))
80+ (value 41:1 weld
81+ (gate 41:9
82+ (face 41:12 args
83+ (cell 41:17
84+ (apply 41:18 list (tvar 41:24 A))
85+ (apply 41:27 list (tvar 41:33 A))))
86+ (body 42:3
87+ (branch 42:3
88+ (wing 42:6 args)
89+ (arm 43:5
90+ (cell 43:5 (bind 43:6 xs) (bind 43:9 ys))
91+ (body 44:7
92+ (cast 44:7
93+ (apply 44:10 list (tvar 44:16 A))
94+ (body 45:9
95+ (branch 45:9
96+ (wing 45:12 xs)
97+ (arm 46:11 (lit 46:11 ~) (wing 46:13 ys))
98+ (arm 47:11
99+ (cell 47:11 (bind 47:12 item) (bind 47:17 rest))
100+ (tuple 47:23
101+ (wing 47:24 item)
102+ (group 47:29
103+ (call 47:30 (wing 47:30 weld) (wing 47:35 rest) (wing 47:40 ys))))))))))))))
104+ (value 49:1 turn
105+ (gate 49:9
106+ (face 49:12 args
107+ (cell 49:17
108+ (apply 49:18 list (tvar 49:24 A))
109+ (fn 49:27 (tvar 49:30 A) (tvar 49:32 B))))
110+ (body 50:3
111+ (branch 50:3
112+ (wing 50:6 args)
113+ (arm 51:5
114+ (cell 51:5 (bind 51:6 xs) (bind 51:9 f))
115+ (body 52:7
116+ (cast 52:7
117+ (apply 52:10 list (tvar 52:16 B))
118+ (body 53:9
119+ (branch 53:9
120+ (wing 53:12 xs)
121+ (arm 54:11 (lit 54:11 ~) (lit 54:13 ~))
122+ (arm 55:11
123+ (cell 55:11 (bind 55:12 item) (bind 55:17 rest))
124+ (tuple 55:23
125+ (group 55:24
126+ (call 55:25 (wing 55:25 f) (wing 55:27 item)))
127+ (group 55:33
128+ (call 55:34 (wing 55:34 turn) (wing 55:39 rest) (wing 55:44 f))))))))))))))
129+ (mold 57:1 dime
130+ (cell 57:9
131+ (face 57:10 p (aura 57:12 @ta))
132+ (face 57:16 q (aura 57:18 @))))
133+ (mold 59:1 hair
134+ (cell 59:9
135+ (face 59:10 p (aura 59:12 @ud))
136+ (face 59:16 q (aura 59:18 @ud))))
137+ (mold 61:1 pint
138+ (cell 61:9
139+ (face 61:10 p
140+ (cell 61:12
141+ (face 61:13 p (aura 61:15 @))
142+ (face 61:17 q (aura 61:19 @))))
143+ (face 61:22 q
144+ (cell 61:24
145+ (face 61:25 p (aura 61:27 @))
146+ (face 61:29 q (aura 61:31 @))))))
147+ (mold 63:1 coin
148+ (union 64:3
149+ (cell 64:3
150+ (const 64:4 %$)
151+ (face 64:7 p (ref 64:9 dime)))
152+ (cell 65:3
153+ (const 65:4 %blob)
154+ (face 65:10 p (noun 65:12)))
155+ (cell 66:3
156+ (const 66:4 %many)
157+ (face 66:10 p
158+ (apply 66:12 list (ref 66:18 coin))))))
159+ (mold 68:1 pair
160+ (generic 68:9 A B
161+ (cell 68:18
162+ (face 68:19 p (tvar 68:21 A))
163+ (face 68:23 q (tvar 68:25 B)))))
164+ (mold 70:1 trel
165+ (generic 70:9 A B C
166+ (cell 70:20
167+ (face 70:21 p (tvar 70:23 A))
168+ (face 70:25 q (tvar 70:27 B))
169+ (face 70:29 r (tvar 70:31 C)))))
170+ (mold 72:1 qual
171+ (generic 72:9 A B C D
172+ (cell 72:22
173+ (face 72:23 p (tvar 72:25 A))
174+ (face 72:27 q (tvar 72:29 B))
175+ (face 72:31 r (tvar 72:33 C))
176+ (face 72:35 s (tvar 72:37 D)))))
177+ (mold 74:1 cord (aura 74:9 @t))
178+ (mold 76:1 knot (aura 76:9 @ta))
179+ (mold 78:1 tape
180+ (apply 78:9 list (aura 78:15 @tD)))
181+ (mold 80:1 path
182+ (apply 80:9 list (ref 80:15 knot)))
183+ (mold 82:1 tank
184+ (union 83:3
185+ (ref 83:3 cord)
186+ (cell 84:3
187+ (const 84:4 %leaf)
188+ (face 84:10 p (ref 84:12 tape)))
189+ (cell 85:3
190+ (const 85:4 %palm)
191+ (face 85:10 p
192+ (apply 85:12 qual (ref 85:18 tape) (ref 85:23 tape) (ref 85:28 tape) (ref 85:33 tape)))
193+ (face 85:39 q
194+ (apply 85:41 list (ref 85:47 tank))))
195+ (cell 86:3
196+ (const 86:4 %rose)
197+ (face 86:10 p
198+ (apply 86:12 trel (ref 86:18 tape) (ref 86:23 tape) (ref 86:28 tape)))
199+ (face 86:34 q
200+ (apply 86:36 list (ref 86:42 tank))))))
201+ (mold 88:1 nail
208202 (cell 88:9
209− (face 88:10 p (ref 88:12 path))
210− (face 88:17 q (ref 88:19 pint))))
211− (mold 90:1 toon
212− (union 91:3
213− (cell 91:3
214− (const 91:4 %0)
215− (face 91:7 p (noun 91:9)))
216− (cell 92:3
217− (const 92:4 %1)
218− (face 92:7 p (noun 92:9)))
219− (cell 93:3
220− (const 93:4 %2)
221− (face 93:7 p
222− (apply 93:9 list (ref 93:15 tank))))))
223− (mold 95:1 like
224− (generic 95:9 A
225− (cell 95:16
226− (face 95:17 p (ref 95:19 hair))
227− (face 95:24 q
228− (apply 95:26 unit
229− (cell 95:32
230− (face 95:33 p (tvar 95:35 A))
231− (face 95:37 q (ref 95:39 nail))))))))
232− (value 97:1 wonk
233− (gate 97:9
234− (face 97:12 veq
235− (apply 97:16 like (tvar 97:22 A)))
236− (body 98:3
237− (branch 98:3
238− (wing 98:6 q.veq)
239− (arm 99:5 (lit 99:5 ~) (crash 99:7))
240− (arm 100:5
241− (cell 100:5 (lit 100:6 ~) (bind 100:8 product))
242− (wing 100:17 p.product))))))
243− (mold 102:1 lone
244− (generic 102:9 A
245− (cell 102:16
246− (face 102:17 p (tvar 102:19 A)))))
247− (mold 104:1 lest
248− (generic 104:9 A
249− (cell 104:16
250− (face 104:17 i (tvar 104:19 A))
251− (face 104:21 t
252− (apply 104:23 list (tvar 104:29 A))))))
253− (mold 106:1 pole
254− (generic 106:9 A
255− (union 107:3
256− (const 107:3 ~)
257− (cell 108:3
258− (tvar 108:4 A)
259− (apply 108:6 pole (tvar 108:12 A))))))
260− (mold 110:1 quip
261− (generic 110:9 A B
262− (cell 110:18
263− (apply 110:19 list (tvar 110:25 A))
264− (tvar 110:28 B))))
265− (mold 112:1 tree
203+ (face 88:10 p (ref 88:12 hair))
204+ (face 88:17 q (ref 88:19 tape))))
205+ (mold 90:1 edge
206+ (cell 90:9
207+ (face 90:10 p (ref 90:12 hair))
208+ (face 90:17 q
209+ (apply 90:19 unit
210+ (cell 90:25
211+ (face 90:26 p (noun 90:28))
212+ (face 90:30 q (ref 90:32 nail)))))))
213+ (mold 92:1 rule
214+ (fn 92:9 (ref 92:12 nail) (ref 92:17 edge)))
215+ (mold 94:1 spot
216+ (cell 94:9
217+ (face 94:10 p (ref 94:12 path))
218+ (face 94:17 q (ref 94:19 pint))))
219+ (mold 96:1 toon
220+ (union 97:3
221+ (cell 97:3
222+ (const 97:4 %0)
223+ (face 97:7 p (noun 97:9)))
224+ (cell 98:3
225+ (const 98:4 %1)
226+ (face 98:7 p (noun 98:9)))
227+ (cell 99:3
228+ (const 99:4 %2)
229+ (face 99:7 p
230+ (apply 99:9 list (ref 99:15 tank))))))
231+ (mold 101:1 like
232+ (generic 101:9 A
233+ (cell 101:16
234+ (face 101:17 p (ref 101:19 hair))
235+ (face 101:24 q
236+ (apply 101:26 unit
237+ (cell 101:32
238+ (face 101:33 p (tvar 101:35 A))
239+ (face 101:37 q (ref 101:39 nail))))))))
240+ (value 103:1 wonk
241+ (gate 103:9
242+ (face 103:12 veq
243+ (apply 103:16 like (tvar 103:22 A)))
244+ (body 104:3
245+ (branch 104:3
246+ (wing 104:6 q.veq)
247+ (arm 105:5 (lit 105:5 ~) (crash 105:7))
248+ (arm 106:5
249+ (cell 106:5 (lit 106:6 ~) (bind 106:8 product))
250+ (wing 106:17 p.product))))))
251+ (mold 108:1 lone
252+ (generic 108:9 A
253+ (cell 108:16
254+ (face 108:17 p (tvar 108:19 A)))))
255+ (mold 110:1 lest
256+ (generic 110:9 A
257+ (cell 110:16
258+ (face 110:17 i (tvar 110:19 A))
259+ (face 110:21 t
260+ (apply 110:23 list (tvar 110:29 A))))))
261+ (mold 112:1 pole
266262 (generic 112:9 A
267263 (union 113:3
268264 (const 113:3 ~)
269265 (cell 114:3
270− (face 114:4 n (tvar 114:6 A))
271− (face 114:8 l
272− (apply 114:10 tree (tvar 114:16 A)))
273− (face 114:19 r
274− (apply 114:21 tree (tvar 114:27 A)))))))
275− (mold 116:1 each
266+ (tvar 114:4 A)
267+ (apply 114:6 pole (tvar 114:12 A))))))
268+ (mold 116:1 quip
276269 (generic 116:9 A B
277− (union 117:3
278− (cell 117:3
279− (const 117:4 %|)
280− (face 117:7 p (tvar 117:9 B)))
281− (cell 118:3
282− (const 118:4 %&)
283− (face 118:7 p (tvar 118:9 A))))))
284− (mold 120:1 bloq (aura 120:9 @))
285− (value 122:1 some
286− (gate 122:9
287− (face 122:12 item (tvar 122:17 A))
288− (unit 122:19 (wing 122:20 item))))
289− (value 124:1 lure
290− (gate 124:9
291− (face 124:12 item (tvar 124:17 A))
292− (body 125:3
293− (cast 125:3
294− (apply 125:6 list (tvar 125:12 A))
295− (tuple 125:15 (wing 125:16 item) (lit 125:21 ~))))))
296− (value 127:1 snoc
297− (gate 127:9
298− (face 127:12 args
299− (cell 127:17
300− (apply 127:18 list (tvar 127:24 A))
301− (tvar 127:27 A)))
302− (body 128:3
303− (branch 128:3
304− (wing 128:6 args)
305− (arm 129:5
306− (cell 129:5 (bind 129:6 xs) (bind 129:9 item))
307− (group 129:15
308− (call 129:16
309− (wing 129:16 weld)
310− (wing 129:21 xs)
311− (tuple 129:24 (wing 129:25 item) (lit 129:30 ~)))))))))
312− (value 131:1 flop
313− (gate 131:9
314− (face 131:12 xs
315− (apply 131:15 list (tvar 131:21 A)))
316− (body 132:3
317− (value 132:3 reverse-into
318− (gate 132:19
319− (face 132:22 args
320− (cell 132:27
321− (apply 132:28 list (tvar 132:34 A))
322− (apply 132:37 list (tvar 132:43 A))))
323− (body 133:5
324− (branch 133:5
325− (wing 133:8 args)
326− (arm 134:7
327− (cell 134:7 (bind 134:8 rest) (bind 134:13 acc))
328− (body 135:9
329− (branch 135:9
330− (wing 135:12 rest)
331− (arm 136:11 (lit 136:11 ~) (wing 136:13 acc))
332− (arm 137:11
333− (cell 137:11 (bind 137:12 item) (bind 137:17 more))
334− (group 137:23
335− (call 137:24
336− (wing 137:24 reverse-into)
337− (wing 137:37 more)
338− (tuple 137:42 (wing 137:43 item) (wing 137:48 acc))))))))))))
339− (group 138:3
340− (call 138:4 (wing 138:4 reverse-into) (wing 138:17 xs) (lit 138:20 ~))))))
341− (value 140:1 drop
342− (gate 140:9
343− (face 140:12 maybe
344− (apply 140:18 unit (tvar 140:24 A)))
345− (body 141:3
346− (branch 141:3
347− (wing 141:6 maybe)
348− (arm 142:5 (lit 142:5 ~) (lit 142:7 ~))
349− (arm 143:5
350− (cell 143:5 (lit 143:6 ~) (bind 143:8 value))
351− (tuple 143:15 (wing 143:16 value) (lit 143:22 ~)))))))
352− (value 145:1 bind
353− (gate 145:9
354− (face 145:12 args
355− (cell 145:17
356− (apply 145:18 unit (tvar 145:24 A))
357− (fn 145:27 (tvar 145:30 A) (tvar 145:32 B))))
358− (body 146:3
359− (branch 146:3
360− (wing 146:6 args)
361− (arm 147:5
362− (cell 147:5 (bind 147:6 maybe) (bind 147:12 f))
363− (body 148:7
364− (branch 148:7
365− (wing 148:10 maybe)
366− (arm 149:9 (lit 149:9 ~) (lit 149:11 ~))
367− (arm 150:9
368− (cell 150:9 (lit 150:10 ~) (bind 150:12 value))
369− (unit 150:19
370− (group 150:20
371− (call 150:21 (wing 150:21 f) (wing 150:23 value))))))))))))
372− (value 152:1 biff
270+ (cell 116:18
271+ (apply 116:19 list (tvar 116:25 A))
272+ (tvar 116:28 B))))
273+ (mold 118:1 tree
274+ (generic 118:9 A
275+ (union 119:3
276+ (const 119:3 ~)
277+ (cell 120:3
278+ (face 120:4 n (tvar 120:6 A))
279+ (face 120:8 l
280+ (apply 120:10 tree (tvar 120:16 A)))
281+ (face 120:19 r
282+ (apply 120:21 tree (tvar 120:27 A)))))))
283+ (mold 122:1 each
284+ (generic 122:9 A B
285+ (union 123:3
286+ (cell 123:3
287+ (const 123:4 %|)
288+ (face 123:7 p (tvar 123:9 B)))
289+ (cell 124:3
290+ (const 124:4 %&)
291+ (face 124:7 p (tvar 124:9 A))))))
292+ (mold 126:1 bloq (aura 126:9 @))
293+ (value 128:1 some
294+ (gate 128:9
295+ (face 128:12 item (tvar 128:17 A))
296+ (unit 128:19 (wing 128:20 item))))
297+ (value 130:1 lure
298+ (gate 130:9
299+ (face 130:12 item (tvar 130:17 A))
300+ (body 131:3
301+ (cast 131:3
302+ (apply 131:6 list (tvar 131:12 A))
303+ (tuple 131:15 (wing 131:16 item) (lit 131:21 ~))))))
304+ (value 133:1 snoc
305+ (gate 133:9
306+ (face 133:12 args
307+ (cell 133:17
308+ (apply 133:18 list (tvar 133:24 A))
309+ (tvar 133:27 A)))
310+ (body 134:3
311+ (branch 134:3
312+ (wing 134:6 args)
313+ (arm 135:5
314+ (cell 135:5 (bind 135:6 xs) (bind 135:9 item))
315+ (group 135:15
316+ (call 135:16
317+ (wing 135:16 weld)
318+ (wing 135:21 xs)
319+ (tuple 135:24 (wing 135:25 item) (lit 135:30 ~)))))))))
320+ (value 137:1 flop
321+ (gate 137:9
322+ (face 137:12 xs
323+ (apply 137:15 list (tvar 137:21 A)))
324+ (body 138:3
325+ (value 138:3 reverse-into
326+ (gate 138:19
327+ (face 138:22 args
328+ (cell 138:27
329+ (apply 138:28 list (tvar 138:34 A))
330+ (apply 138:37 list (tvar 138:43 A))))
331+ (body 139:5
332+ (branch 139:5
333+ (wing 139:8 args)
334+ (arm 140:7
335+ (cell 140:7 (bind 140:8 rest) (bind 140:13 acc))
336+ (body 141:9
337+ (branch 141:9
338+ (wing 141:12 rest)
339+ (arm 142:11 (lit 142:11 ~) (wing 142:13 acc))
340+ (arm 143:11
341+ (cell 143:11 (bind 143:12 item) (bind 143:17 more))
342+ (group 143:23
343+ (call 143:24
344+ (wing 143:24 reverse-into)
345+ (wing 143:37 more)
346+ (tuple 143:42 (wing 143:43 item) (wing 143:48 acc))))))))))))
347+ (group 144:3
348+ (call 144:4 (wing 144:4 reverse-into) (wing 144:17 xs) (lit 144:20 ~))))))
349+ (value 146:1 drop
350+ (gate 146:9
351+ (face 146:12 maybe
352+ (apply 146:18 unit (tvar 146:24 A)))
353+ (body 147:3
354+ (cast 147:3
355+ (apply 147:6 list (tvar 147:12 A))
356+ (body 148:5
357+ (branch 148:5
358+ (wing 148:8 maybe)
359+ (arm 149:7 (lit 149:7 ~) (lit 149:9 ~))
360+ (arm 150:7
361+ (cell 150:7 (lit 150:8 ~) (bind 150:10 value))
362+ (tuple 150:17 (wing 150:18 value) (lit 150:24 ~)))))))))
363+ (value 152:1 bind
373364 (gate 152:9
374365 (face 152:12 args
375366 (cell 152:17
376367 (apply 152:18 unit (tvar 152:24 A))
377− (fn 152:27
378− (tvar 152:30 A)
379− (apply 152:32 unit (tvar 152:38 B)))))
368+ (fn 152:27 (tvar 152:30 A) (tvar 152:32 B))))
380369 (body 153:3
381370 (branch 153:3
382371 (wing 153:6 args)
383372 (arm 154:5
384373 (cell 154:5 (bind 154:6 maybe) (bind 154:12 f))
385− (body 155:7
386− (branch 155:7
387− (wing 155:10 maybe)
388− (arm 156:9 (lit 156:9 ~) (lit 156:11 ~))
389− (arm 157:9
390− (cell 157:9 (lit 157:10 ~) (bind 157:12 value))
391− (group 157:19
392− (call 157:20 (wing 157:20 f) (wing 157:22 value)))))))))))
393− (value 159:1 both
374+ (cast 154:15
375+ (apply 154:18 unit (tvar 154:24 B))
376+ (body 155:7
377+ (branch 155:7
378+ (wing 155:10 maybe)
379+ (arm 156:9 (lit 156:9 ~) (lit 156:11 ~))
380+ (arm 157:9
381+ (cell 157:9 (lit 157:10 ~) (bind 157:12 value))
382+ (unit 157:19
383+ (group 157:20
384+ (call 157:21 (wing 157:21 f) (wing 157:23 value)))))))))))))
385+ (value 159:1 biff
394386 (gate 159:9
395387 (face 159:12 args
396388 (cell 159:17
397389 (apply 159:18 unit (tvar 159:24 A))
398− (apply 159:27 unit (tvar 159:33 B))))
390+ (fn 159:27
391+ (tvar 159:30 A)
392+ (apply 159:32 unit (tvar 159:38 B)))))
399393 (body 160:3
400394 (branch 160:3
401395 (wing 160:6 args)
402396 (arm 161:5
403− (cell 161:5 (bind 161:6 first) (bind 161:12 second))
404− (body 162:7
405− (branch 162:7
406− (wing 162:10 first)
407− (arm 163:9 (lit 163:9 ~) (lit 163:11 ~))
408− (arm 164:9
409− (cell 164:9 (lit 164:10 ~) (bind 164:12 a))
410− (body 165:11
411− (branch 165:11
412− (wing 165:14 second)
413− (arm 166:13 (lit 166:13 ~) (lit 166:15 ~))
414− (arm 167:13
415− (cell 167:13 (lit 167:14 ~) (bind 167:16 b))
416− (unit 167:19
417− (tuple 167:20 (wing 167:21 a) (wing 167:23 b))))))))))))))
418− (value 169:1 clef
419− (gate 169:9
420− (face 169:12 args
421− (cell 169:17
422− (apply 169:18 unit (tvar 169:24 A))
423− (apply 169:27 unit (tvar 169:33 B))
424− (fn 169:36
425− (cell 169:39 (tvar 169:40 A) (tvar 169:42 B))
426− (apply 169:45 unit (tvar 169:51 C)))))
427− (body 170:3
428− (branch 170:3
429− (wing 170:6 args)
430− (arm 171:5
431− (cell 171:5 (bind 171:6 first) (bind 171:12 second) (bind 171:19 combine))
432− (body 172:7
433− (branch 172:7
434− (wing 172:10 first)
435− (arm 173:9 (lit 173:9 ~) (lit 173:11 ~))
436− (arm 174:9
437− (cell 174:9 (lit 174:10 ~) (bind 174:12 a))
438− (body 175:11
439− (branch 175:11
440− (wing 175:14 second)
441− (arm 176:13 (lit 176:13 ~) (lit 176:15 ~))
442− (arm 177:13
443− (cell 177:13 (lit 177:14 ~) (bind 177:16 b))
444− (group 177:19
445− (call 177:20 (wing 177:20 combine) (wing 177:28 a) (wing 177:30 b))))))))))))))
446− (value 179:1 skim
447− (gate 179:9
448− (face 179:12 args
449− (cell 179:17
450− (apply 179:18 list (tvar 179:24 A))
451− (fn 179:27 (tvar 179:30 A) (flag 179:32))))
452− (body 180:3
453− (branch 180:3
454− (wing 180:6 args)
455− (arm 181:5
456− (cell 181:5 (bind 181:6 xs) (bind 181:9 predicate))
457− (body 182:7
458− (branch 182:7
459− (wing 182:10 xs)
460− (arm 183:9 (lit 183:9 ~) (lit 183:11 ~))
461− (arm 184:9
462− (cell 184:9 (bind 184:10 item) (bind 184:15 rest))
463− (body 185:11
464− (branch 185:11
465− (group 185:14
466− (call 185:15 (wing 185:15 predicate) (wing 185:25 item)))
467− (arm 186:13
468− (lit 186:13 %.y)
469− (tuple 186:17
470− (wing 186:18 item)
471− (group 186:23
472− (call 186:24 (wing 186:24 skim) (wing 186:29 rest) (wing 186:34 predicate)))))
473− (arm 187:13
474− (lit 187:13 %.n)
475− (group 187:17
476− (call 187:18 (wing 187:18 skim) (wing 187:23 rest) (wing 187:28 predicate))))))))))))))
477− (value 189:1 skip
478− (gate 189:9
479− (face 189:12 args
480− (cell 189:17
481− (apply 189:18 list (tvar 189:24 A))
482− (fn 189:27 (tvar 189:30 A) (flag 189:32))))
483− (body 190:3
484− (branch 190:3
485− (wing 190:6 args)
486− (arm 191:5
487− (cell 191:5 (bind 191:6 xs) (bind 191:9 predicate))
488− (body 192:7
489− (branch 192:7
490− (wing 192:10 xs)
491− (arm 193:9 (lit 193:9 ~) (lit 193:11 ~))
492− (arm 194:9
493− (cell 194:9 (bind 194:10 item) (bind 194:15 rest))
494− (body 195:11
495− (branch 195:11
496− (group 195:14
497− (call 195:15 (wing 195:15 predicate) (wing 195:25 item)))
498− (arm 196:13
499− (lit 196:13 %.y)
500− (group 196:17
501− (call 196:18 (wing 196:18 skip) (wing 196:23 rest) (wing 196:28 predicate))))
502− (arm 197:13
503− (lit 197:13 %.n)
504− (tuple 197:17
505− (wing 197:18 item)
506− (group 197:23
507− (call 197:24 (wing 197:24 skip) (wing 197:29 rest) (wing 197:34 predicate)))))))))))))))
508− (value 199:1 levy
509− (gate 199:9
510− (face 199:12 args
511− (cell 199:17
512− (apply 199:18 list (tvar 199:24 A))
513− (fn 199:27 (tvar 199:30 A) (flag 199:32))))
514− (body 200:3
515− (branch 200:3
516− (wing 200:6 args)
517− (arm 201:5
518− (cell 201:5 (bind 201:6 xs) (bind 201:9 predicate))
519− (body 202:7
520− (branch 202:7
521− (wing 202:10 xs)
522− (arm 203:9 (lit 203:9 ~) (lit 203:11 %.y))
523− (arm 204:9
524− (cell 204:9 (bind 204:10 item) (bind 204:15 rest))
525− (body 205:11
526− (branch 205:11
527− (group 205:14
528− (call 205:15 (wing 205:15 predicate) (wing 205:25 item)))
529− (arm 206:13
530− (lit 206:13 %.y)
531− (group 206:17
532− (call 206:18 (wing 206:18 levy) (wing 206:23 rest) (wing 206:28 predicate))))
533− (arm 207:13 (lit 207:13 %.n) (lit 207:17 %.n))))))))))))
534− (value 209:1 lien
535− (gate 209:9
536− (face 209:12 args
537− (cell 209:17
538− (apply 209:18 list (tvar 209:24 A))
539− (fn 209:27 (tvar 209:30 A) (flag 209:32))))
540− (body 210:3
541− (branch 210:3
542− (wing 210:6 args)
543− (arm 211:5
544− (cell 211:5 (bind 211:6 xs) (bind 211:9 predicate))
545− (body 212:7
546− (branch 212:7
547− (wing 212:10 xs)
548− (arm 213:9 (lit 213:9 ~) (lit 213:11 %.n))
549− (arm 214:9
550− (cell 214:9 (bind 214:10 item) (bind 214:15 rest))
551− (body 215:11
552− (branch 215:11
553− (group 215:14
554− (call 215:15 (wing 215:15 predicate) (wing 215:25 item)))
555− (arm 216:13 (lit 216:13 %.y) (lit 216:17 %.y))
556− (arm 217:13
557− (lit 217:13 %.n)
558− (group 217:17
559− (call 217:18 (wing 217:18 lien) (wing 217:23 rest) (wing 217:28 predicate))))))))))))))
560− (value 219:1 roll
561− (gate 219:9
562− (face 219:12 args
563− (cell 219:17
564− (apply 219:18 list (tvar 219:24 A))
565− (tvar 219:27 B)
566− (fn 219:29
567− (cell 219:32 (tvar 219:33 A) (tvar 219:35 B))
568− (tvar 219:38 B))))
569− (body 220:3
570− (branch 220:3
571− (wing 220:6 args)
572− (arm 221:5
573− (cell 221:5 (bind 221:6 xs) (bind 221:9 start) (bind 221:15 combine))
574− (body 222:7
575− (branch 222:7
576− (wing 222:10 xs)
577− (arm 223:9 (lit 223:9 ~) (wing 223:11 start))
578− (arm 224:9
579− (cell 224:9 (bind 224:10 item) (bind 224:15 rest))
580− (group 224:21
581− (call 224:22
582− (wing 224:22 roll)
583− (wing 224:27 rest)
584− (group 224:32
585− (call 224:33 (wing 224:33 combine) (wing 224:41 item) (wing 224:46 start)))
586− (wing 224:53 combine)))))))))))
587− (value 226:1 reel
588− (gate 226:9
589− (face 226:12 args
590− (cell 226:17
591− (apply 226:18 list (tvar 226:24 A))
592− (tvar 226:27 B)
593− (fn 226:29
594− (cell 226:32 (tvar 226:33 A) (tvar 226:35 B))
595− (tvar 226:38 B))))
596− (body 227:3
597− (branch 227:3
598− (wing 227:6 args)
599− (arm 228:5
600− (cell 228:5 (bind 228:6 xs) (bind 228:9 start) (bind 228:15 combine))
601− (body 229:7
602− (branch 229:7
603− (wing 229:10 xs)
604− (arm 230:9 (lit 230:9 ~) (wing 230:11 start))
605− (arm 231:9
606− (cell 231:9 (bind 231:10 item) (bind 231:15 rest))
607− (group 231:21
608− (call 231:22
609− (wing 231:22 combine)
610− (wing 231:30 item)
611− (group 231:35
612− (call 231:36 (wing 231:36 reel) (wing 231:41 rest) (wing 231:46 start) (wing 231:52 combine))))))))))))))
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+ (cast 217:3
571+ (flag 217:6)
572+ (body 218:5
573+ (branch 218:5
574+ (wing 218:8 args)
575+ (arm 219:7
576+ (cell 219:7 (bind 219:8 xs) (bind 219:11 predicate))
577+ (body 220:9
578+ (branch 220:9
579+ (wing 220:12 xs)
580+ (arm 221:11 (lit 221:11 ~) (lit 221:13 %.y))
581+ (arm 222:11
582+ (cell 222:11 (bind 222:12 item) (bind 222:17 rest))
583+ (body 223:13
584+ (branch 223:13
585+ (group 223:16
586+ (call 223:17 (wing 223:17 predicate) (wing 223:27 item)))
587+ (arm 224:15
588+ (lit 224:15 %.y)
589+ (group 224:19
590+ (call 224:20 (wing 224:20 levy) (wing 224:25 rest) (wing 224:30 predicate))))
591+ (arm 225:15 (lit 225:15 %.n) (lit 225:19 %.n))))))))))))))
592+ (value 227:1 lien
593+ (gate 227:9
594+ (face 227:12 args
595+ (cell 227:17
596+ (apply 227:18 list (tvar 227:24 A))
597+ (fn 227:27 (tvar 227:30 A) (flag 227:32))))
598+ (body 228:3
599+ (cast 228:3
600+ (flag 228:6)
601+ (body 229:5
602+ (branch 229:5
603+ (wing 229:8 args)
604+ (arm 230:7
605+ (cell 230:7 (bind 230:8 xs) (bind 230:11 predicate))
606+ (body 231:9
607+ (branch 231:9
608+ (wing 231:12 xs)
609+ (arm 232:11 (lit 232:11 ~) (lit 232:13 %.n))
610+ (arm 233:11
611+ (cell 233:11 (bind 233:12 item) (bind 233:17 rest))
612+ (body 234:13
613+ (branch 234:13
614+ (group 234:16
615+ (call 234:17 (wing 234:17 predicate) (wing 234:27 item)))
616+ (arm 235:15 (lit 235:15 %.y) (lit 235:19 %.y))
617+ (arm 236:15
618+ (lit 236:15 %.n)
619+ (group 236:19
620+ (call 236:20 (wing 236:20 lien) (wing 236:25 rest) (wing 236:30 predicate))))))))))))))))
621+ (value 238:1 roll
622+ (gate 238:9
623+ (face 238:12 args
624+ (cell 238:17
625+ (apply 238:18 list (tvar 238:24 A))
626+ (tvar 238:27 B)
627+ (fn 238:29
628+ (cell 238:32 (tvar 238:33 A) (tvar 238:35 B))
629+ (tvar 238:38 B))))
630+ (body 239:3
631+ (branch 239:3
632+ (wing 239:6 args)
633+ (arm 240:5
634+ (cell 240:5 (bind 240:6 xs) (bind 240:9 start) (bind 240:15 combine))
635+ (body 241:7
636+ (branch 241:7
637+ (wing 241:10 xs)
638+ (arm 242:9 (lit 242:9 ~) (wing 242:11 start))
639+ (arm 243:9
640+ (cell 243:9 (bind 243:10 item) (bind 243:15 rest))
641+ (group 243:21
642+ (call 243:22
643+ (wing 243:22 roll)
644+ (wing 243:27 rest)
645+ (group 243:32
646+ (call 243:33 (wing 243:33 combine) (wing 243:41 item) (wing 243:46 start)))
647+ (wing 243:53 combine)))))))))))
648+ (value 245:1 reel
649+ (gate 245:9
650+ (face 245:12 args
651+ (cell 245:17
652+ (apply 245:18 list (tvar 245:24 A))
653+ (tvar 245:27 B)
654+ (fn 245:29
655+ (cell 245:32 (tvar 245:33 A) (tvar 245:35 B))
656+ (tvar 245:38 B))))
657+ (body 246:3
658+ (branch 246:3
659+ (wing 246:6 args)
660+ (arm 247:5
661+ (cell 247:5 (bind 247:6 xs) (bind 247:9 start) (bind 247:15 combine))
662+ (body 248:7
663+ (branch 248:7
664+ (wing 248:10 xs)
665+ (arm 249:9 (lit 249:9 ~) (wing 249:11 start))
666+ (arm 250:9
667+ (cell 250:9 (bind 250:10 item) (bind 250:15 rest))
668+ (group 250:21
669+ (call 250:22
670+ (wing 250:22 combine)
671+ (wing 250:30 item)
672+ (group 250:35
673+ (call 250:36 (wing 250:36 reel) (wing 250:41 rest) (wing 250:46 start) (wing 250:52 combine)))))))))))))
674+ (value 252:1 flit
675+ (gate 252:9
676+ (face 252:12 predicate
677+ (fn 252:22 (tvar 252:25 A) (flag 252:27)))
678+ (body 253:3
679+ (gate 253:3
680+ (face 253:6 value (tvar 253:12 A))
681+ (body 254:5
682+ (cast 254:5
683+ (apply 254:8 unit (tvar 254:14 A))
684+ (body 255:7
685+ (branch 255:7
686+ (group 255:10
687+ (call 255:11 (wing 255:11 predicate) (wing 255:21 value)))
688+ (arm 256:9
689+ (lit 256:9 %.y)
690+ (unit 256:13 (wing 256:14 value)))
691+ (arm 257:9 (lit 257:9 %.n) (lit 257:13 ~))))))))))
692+ (value 259:1 murn
693+ (gate 259:9
694+ (face 259:12 args
695+ (cell 259:17
696+ (apply 259:18 list (tvar 259:24 A))
697+ (fn 259:27
698+ (tvar 259:30 A)
699+ (apply 259:32 unit (tvar 259:38 B)))))
700+ (body 260:3
701+ (branch 260:3
702+ (wing 260:6 args)
703+ (arm 261:5
704+ (cell 261:5 (bind 261:6 xs) (bind 261:9 f))
705+ (cast 261:12
706+ (apply 261:15 list (tvar 261:21 B))
707+ (body 262:9
708+ (branch 262:9
709+ (wing 262:12 xs)
710+ (arm 263:11 (lit 263:11 ~) (lit 263:13 ~))
711+ (arm 264:11
712+ (cell 264:11 (bind 264:12 item) (bind 264:17 rest))
713+ (body 265:13
714+ (branch 265:13
715+ (group 265:16
716+ (call 265:17 (wing 265:17 f) (wing 265:19 item)))
717+ (arm 266:15
718+ (lit 266:15 ~)
719+ (group 266:17
720+ (call 266:18 (wing 266:18 murn) (wing 266:23 rest) (wing 266:28 f))))
721+ (arm 267:15
722+ (cell 267:15 (lit 267:16 ~) (bind 267:18 value))
723+ (tuple 267:25
724+ (wing 267:26 value)
725+ (group 267:32
726+ (call 267:33 (wing 267:33 murn) (wing 267:38 rest) (wing 267:43 f))))))))))))))))
727+ (value 269:1 join
728+ (gate 269:9
729+ (face 269:12 args
730+ (cell 269:17
731+ (tvar 269:18 A)
732+ (apply 269:20 list (tvar 269:26 A))))
733+ (body 270:3
734+ (branch 270:3
735+ (wing 270:6 args)
736+ (arm 271:5
737+ (cell 271:5 (bind 271:6 separator) (bind 271:16 xs))
738+ (cast 271:20
739+ (apply 271:23 list (tvar 271:29 A))
740+ (body 272:9
741+ (branch 272:9
742+ (wing 272:12 xs)
743+ (arm 273:11 (lit 273:11 ~) (lit 273:13 ~))
744+ (arm 274:11
745+ (cell 274:11 (bind 274:12 item) (bind 274:17 rest))
746+ (body 275:13
747+ (branch 275:13
748+ (wing 275:16 rest)
749+ (arm 276:15
750+ (lit 276:15 ~)
751+ (tuple 276:17 (wing 276:18 item) (lit 276:23 ~)))
752+ (arm 277:15
753+ (cell 277:15 (bind 277:16 next) (bind 277:21 more))
754+ (tuple 277:27
755+ (wing 277:28 item)
756+ (tuple 277:33
757+ (wing 277:34 separator)
758+ (group 277:44
759+ (call 277:45 (wing 277:45 join) (wing 277:50 separator) (wing 277:60 rest)))))))))))))))))
760+ (value 279:1 snip
761+ (gate 279:9
762+ (face 279:12 xs
763+ (apply 279:15 list (tvar 279:21 A)))
764+ (body 280:3
765+ (cast 280:3
766+ (apply 280:6 list (tvar 280:12 A))
767+ (body 281:5
768+ (branch 281:5
769+ (wing 281:8 xs)
770+ (arm 282:7 (lit 282:7 ~) (lit 282:9 ~))
771+ (arm 283:7
772+ (cell 283:7 (bind 283:8 item) (bind 283:13 rest))
773+ (body 284:9
774+ (branch 284:9
775+ (wing 284:12 rest)
776+ (arm 285:11 (lit 285:11 ~) (lit 285:13 ~))
777+ (arm 286:11
778+ (cell 286:11 (bind 286:12 next) (bind 286:17 more))
779+ (tuple 286:23
780+ (wing 286:24 item)
781+ (group 286:29
782+ (call 286:30 (wing 286:30 snip) (wing 286:35 rest))))))))))))))
783+ (value 288:1 rear
784+ (gate 288:9
785+ (face 288:12 xs
786+ (apply 288:15 list (tvar 288:21 A)))
787+ (body 289:3
788+ (branch 289:3
789+ (wing 289:6 xs)
790+ (arm 290:5 (lit 290:5 ~) (crash 290:7))
791+ (arm 291:5
792+ (cell 291:5 (bind 291:6 item) (bind 291:11 rest))
793+ (body 292:7
794+ (branch 292:7
795+ (wing 292:10 rest)
796+ (arm 293:9 (lit 293:9 ~) (wing 293:11 item))
797+ (arm 294:9
798+ (cell 294:9 (bind 294:10 next) (bind 294:15 more))
799+ (group 294:21
800+ (call 294:22 (wing 294:22 rear) (wing 294:27 rest)))))))))))
801+ (value 296:1 cork
802+ (gate 296:9
803+ (face 296:12 gates
804+ (cell 296:18
805+ (fn 296:19 (tvar 296:22 A) (tvar 296:24 B))
806+ (fn 296:27 (tvar 296:30 B) (tvar 296:32 C))))
807+ (body 297:3
808+ (branch 297:3
809+ (wing 297:6 gates)
810+ (arm 298:5
811+ (cell 298:5 (bind 298:6 f) (bind 298:8 g))
812+ (gate 298:11
813+ (face 298:14 x (tvar 298:16 A))
814+ (group 298:18
815+ (call 298:19
816+ (wing 298:19 g)
817+ (group 298:21
818+ (call 298:22 (wing 298:22 f) (wing 298:24 x)))))))))))
819+ (value 300:1 corl
820+ (gate 300:9
821+ (face 300:12 gates
822+ (cell 300:18
823+ (fn 300:19 (tvar 300:22 B) (tvar 300:24 C))
824+ (fn 300:27 (tvar 300:30 A) (tvar 300:32 B))))
825+ (body 301:3
826+ (branch 301:3
827+ (wing 301:6 gates)
828+ (arm 302:5
829+ (cell 302:5 (bind 302:6 f) (bind 302:8 g))
830+ (gate 302:11
831+ (face 302:14 x (tvar 302:16 A))
832+ (group 302:18
833+ (call 302:19
834+ (wing 302:19 f)
835+ (group 302:21
836+ (call 302:22 (wing 302:22 g) (wing 302:24 x)))))))))))
837+ (value 304:1 cury
838+ (gate 304:9
839+ (face 304:12 args
840+ (cell 304:17
841+ (fn 304:18
842+ (cell 304:21 (tvar 304:22 A) (tvar 304:24 B))
843+ (tvar 304:27 C))
844+ (tvar 304:30 A)))
845+ (body 305:3
846+ (branch 305:3
847+ (wing 305:6 args)
848+ (arm 306:5
849+ (cell 306:5 (bind 306:6 f) (bind 306:8 a))
850+ (gate 306:11
851+ (face 306:14 b (tvar 306:16 B))
852+ (group 306:18
853+ (call 306:19 (wing 306:19 f) (wing 306:21 a) (wing 306:23 b)))))))))
854+ (value 308:1 curr
855+ (gate 308:9
856+ (face 308:12 args
857+ (cell 308:17
858+ (fn 308:18
859+ (cell 308:21 (tvar 308:22 A) (tvar 308:24 B))
860+ (tvar 308:27 C))
861+ (tvar 308:30 B)))
862+ (body 309:3
863+ (branch 309:3
864+ (wing 309:6 args)
865+ (arm 310:5
866+ (cell 310:5 (bind 310:6 f) (bind 310:8 b))
867+ (gate 310:11
868+ (face 310:14 a (tvar 310:16 A))
869+ (group 310:18
870+ (call 310:19 (wing 310:19 f) (wing 310:21 a) (wing 310:23 b)))))))))
871+ (mold 312:1 cmd
872+ (generic 312:8 M
873+ (union 313:3
874+ (cell 313:3
875+ (const 313:4 %poke)
876+ (face 313:10 p (ref 313:12 poke))
877+ (face 313:17 reply
878+ (fn 313:23
879+ (apply 313:26 unit (aura 313:32 @t))
880+ (tvar 313:36 M))))
881+ (cell 314:3
882+ (const 314:4 %go)
883+ (face 314:8 url (aura 314:12 @t)))
884+ (cell 315:3
885+ (const 315:4 %wait)
886+ (face 315:10 gap (aura 315:14 @dr))
887+ (face 315:18 msg (tvar 315:22 M)))
888+ (cell 316:3
889+ (const 316:4 %now)
890+ (face 316:9 reply
891+ (fn 316:15 (aura 316:18 @da) (tvar 316:22 M))))
892+ (cell 317:3
893+ (const 317:4 %who)
894+ (face 317:9 reply
895+ (fn 317:15 (aura 317:18 @p) (tvar 317:21 M)))))))
896+ (value 319:1 gth
897+ (gate 319:8
898+ (face 319:11 args
899+ (cell 319:16 (tvar 319:17 A) (tvar 319:19 A)))
900+ (group 319:22
901+ (call 319:23 (wing 319:23 gth-atom.internal) (wing 319:41 args))))))
tests/golden/prelude-unit-list-transforms/types.txt+21−8
@@ -1,12 +1,13 @@
11partial inference; module not checked
2++$ poke: not checked
23++ same: $-(A A)
34++ head: $-([A B] A)
45++ tail: $-([A B] B)
56++ not: $-(? ?)
67+$ list: cases proven disjoint; mold not checked
78+$ unit: cases proven disjoint; mold not checked
8−++ fall: sample mold is not supported by partial inference
9−++ need: sample mold is not supported by partial inference
9+++ fall: $-([(unit A) A] A)
10+++ need: $-((unit A) A)
1011++ weld: sample mold is not supported by partial inference
1112++ turn: sample mold is not supported by partial inference
1213+$ dime: not checked
@@ -35,18 +36,30 @@ partial inference; module not checked
3536+$ tree: cases proven disjoint; mold not checked
3637+$ each: cases proven disjoint; mold not checked
3738+$ bloq: not checked
38−++ some: expression is not supported by partial inference
39+++ some: unit construction needs the standard prelude in partial inference
3940++ lure: cast mold is not supported by partial inference
4041++ snoc: sample mold is not supported by partial inference
4142++ flop: sample mold is not supported by partial inference
42−++ drop: sample mold is not supported by partial inference
43−++ bind: sample mold is not supported by partial inference
44−++ biff: sample mold is not supported by partial inference
45−++ both: sample mold is not supported by partial inference
46−++ clef: sample mold is not supported by partial inference
43+++ drop: cast mold is not supported by partial inference
44+++ bind: unit construction needs the standard prelude in partial inference
45+++ biff: $-([(unit A) $-(A (unit B))] (unit B))
46+++ both: unit construction needs the standard prelude in partial inference
47+++ clap: unit construction needs the standard prelude in partial inference
48+++ clef: $-([(unit A) [(unit B) $-([A B] (unit C))]] (unit C))
4749++ skim: sample mold is not supported by partial inference
4850++ skip: sample mold is not supported by partial inference
4951++ levy: sample mold is not supported by partial inference
5052++ lien: sample mold is not supported by partial inference
5153++ roll: sample mold is not supported by partial inference
5254++ reel: sample mold is not supported by partial inference
55+++ flit: unit construction needs the standard prelude in partial inference
56+++ murn: sample mold is not supported by partial inference
57+++ join: sample mold is not supported by partial inference
58+++ snip: sample mold is not supported by partial inference
59+++ rear: sample mold is not supported by partial inference
60+++ cork: $-([$-(A B) $-(B C)] $-(A C))
61+++ corl: $-([$-(A B) $-(C A)] $-(C B))
62+++ cury: $-([$-([A B] C) A] $-(B C))
63+++ curr: $-([$-([A B] C) B] $-(A C))
64++$ cmd: cases proven disjoint; mold not checked
65+++ gth: field access is not supported by partial inference
tests/golden/types-capital-distinct/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Decisions, Type variables: "Capitals, generalized per `++`"; "a different type takes a different capital".
2+tests: Different explicitly written capitals cannot be forced equal via a call or cast; their source sites are reported. Repeated spelling, independent capitals and concrete-forcing controls retain their intended behavior.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-capital-distinct/source.jibbnew file+6
@@ -0,0 +1,6 @@
1+++ repeat |= p=[A A] p
2+++ same |= p=[A A] p
3+++ independent |= p=[A B] p
4+++ bad-call |= p=[A B] (repeat p)
5+++ bad-cast |= p=[A B] ^- [A A] p
6+++ concrete |= x=A ^- @t x
tests/golden/types-capital-distinct/tokens.txtnew file+73
@@ -0,0 +1,73 @@
1+1:1 glyph ++
2+1:4 name repeat
3+1:11 glyph |=
4+1:14 name p
5+1:15 tight glyph =
6+1:16 tight glyph [
7+1:17 tight tvar A
8+1:19 tvar A
9+1:20 tight glyph ]
10+1:22 name p
11+2:1 NEWLINE
12+2:1 glyph ++
13+2:4 name same
14+2:9 glyph |=
15+2:12 name p
16+2:13 tight glyph =
17+2:14 tight glyph [
18+2:15 tight tvar A
19+2:17 tvar A
20+2:18 tight glyph ]
21+2:20 name p
22+3:1 NEWLINE
23+3:1 glyph ++
24+3:4 name independent
25+3:16 glyph |=
26+3:19 name p
27+3:20 tight glyph =
28+3:21 tight glyph [
29+3:22 tight tvar A
30+3:24 tvar B
31+3:25 tight glyph ]
32+3:27 name p
33+4:1 NEWLINE
34+4:1 glyph ++
35+4:4 name bad-call
36+4:13 glyph |=
37+4:16 name p
38+4:17 tight glyph =
39+4:18 tight glyph [
40+4:19 tight tvar A
41+4:21 tvar B
42+4:22 tight glyph ]
43+4:24 glyph (
44+4:25 tight name repeat
45+4:32 name p
46+4:33 tight glyph )
47+5:1 NEWLINE
48+5:1 glyph ++
49+5:4 name bad-cast
50+5:13 glyph |=
51+5:16 name p
52+5:17 tight glyph =
53+5:18 tight glyph [
54+5:19 tight tvar A
55+5:21 tvar B
56+5:22 tight glyph ]
57+5:24 glyph ^-
58+5:27 glyph [
59+5:28 tight tvar A
60+5:30 tvar A
61+5:31 tight glyph ]
62+5:33 name p
63+6:1 NEWLINE
64+6:1 glyph ++
65+6:4 name concrete
66+6:13 glyph |=
67+6:16 name x
68+6:17 tight glyph =
69+6:18 tight tvar A
70+6:20 glyph ^-
71+6:23 aura @t
72+6:26 name x
73+6:27 NEWLINE
tests/golden/types-capital-distinct/tree.txtnew file+33
@@ -0,0 +1,33 @@
1+(module
2+ (value 1:1 repeat
3+ (gate 1:11
4+ (face 1:14 p
5+ (cell 1:16 (tvar 1:17 A) (tvar 1:19 A)))
6+ (wing 1:22 p)))
7+ (value 2:1 same
8+ (gate 2:9
9+ (face 2:12 p
10+ (cell 2:14 (tvar 2:15 A) (tvar 2:17 A)))
11+ (wing 2:20 p)))
12+ (value 3:1 independent
13+ (gate 3:16
14+ (face 3:19 p
15+ (cell 3:21 (tvar 3:22 A) (tvar 3:24 B)))
16+ (wing 3:27 p)))
17+ (value 4:1 bad-call
18+ (gate 4:13
19+ (face 4:16 p
20+ (cell 4:18 (tvar 4:19 A) (tvar 4:21 B)))
21+ (group 4:24
22+ (call 4:25 (wing 4:25 repeat) (wing 4:32 p)))))
23+ (value 5:1 bad-cast
24+ (gate 5:13
25+ (face 5:16 p
26+ (cell 5:18 (tvar 5:19 A) (tvar 5:21 B)))
27+ (cast 5:24
28+ (cell 5:27 (tvar 5:28 A) (tvar 5:30 A))
29+ (wing 5:33 p))))
30+ (value 6:1 concrete
31+ (gate 6:13
32+ (face 6:16 x (tvar 6:18 A))
33+ (cast 6:20 (aura 6:23 @t) (wing 6:26 x)))))
tests/golden/types-capital-distinct/types.txtnew file+19
@@ -0,0 +1,19 @@
1+partial inference; module not checked
2+++ repeat: $-([A A] [A A])
3+++ same: $-([A A] [A A])
4+++ independent: $-([A B] [A B])
5+++ bad-call: distinct type variables `A` and `B` must not be forced equal; use the same capital for a shared type
6+/tests/golden/types-capital-distinct/source.jibb:4:19: first type variable
7+++ bad-call |= p=[A B] (repeat p)
8+ ^
9+/tests/golden/types-capital-distinct/source.jibb:4:21: second type variable
10+++ bad-call |= p=[A B] (repeat p)
11+ ^
12+++ bad-cast: distinct type variables `A` and `B` must not be forced equal; use the same capital for a shared type
13+/tests/golden/types-capital-distinct/source.jibb:5:19: first type variable
14+++ bad-cast |= p=[A B] ^- [A A] p
15+ ^
16+/tests/golden/types-capital-distinct/source.jibb:5:21: second type variable
17+++ bad-cast |= p=[A B] ^- [A A] p
18+ ^
19+++ concrete: explicit capital constraints are not supported by partial inference
tests/golden/types-cell-pattern-many/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Patterns: a name binds anew and the last position of a cell pattern binds the rest; Modules: no name may shadow one already in scope.
2+tests: A complete single-arm cell pattern of binders follows the right-nested cell spine, preserving polymorphism and the final tail. Duplicate or shadowed binders and definite non-cell subjects fail; uncertain union/collection spines and other patterns stay unsupported.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-cell-pattern-many/modules.txtnew file+1
@@ -0,0 +1 @@
1+# Use the prepared prelude.
tests/golden/types-cell-pattern-many/source.jibbnew file+41
@@ -0,0 +1,41 @@
1+++ three |= args=[@t @p ?]
2+ ?- args
3+ [a b c] c
4+++ four |= args=[@t @p ? @ux]
5+ ?- args
6+ [a b c d] d
7+++ rest |= args=[@t @p [? @ux]]
8+ ?- args
9+ [a b c] c
10+++ infer |= x
11+ ?- x
12+ [a b c] [c b a]
13+++ duplicate |= args=[@t @p ?]
14+ ?- args
15+ [a b a] a
16+++ shadow |= args=[@t @p ?]
17+ ?- args
18+ [args b c] b
19+++ prelude-shadow |= args=[@t @p ?]
20+ ?- args
21+ [a not c] c
22+++ atom |= args=@t
23+ ?- args
24+ [a b c] a
25+++ too-many |= args=[@t @p]
26+ ?- args
27+ [a b c] a
28+++ record |= args=[a=@t b=@p c=?]
29+ ?- args
30+ [a b c] a
31+++ nested |= args=[@t [@p ?] @ux]
32+ ?- args
33+ [a [b c] d] d
34+++ wildcard |= args=[@t @p ?]
35+ ?- args
36+ [a * c] c
37+++ pending |= args=[@t @p ?]
38+ ?- args
39+ [a b c]
40+ ~& %unused
41+ c
tests/golden/types-cell-pattern-many/tokens.txtnew file+315
@@ -0,0 +1,315 @@
1+1:1 glyph ++
2+1:4 name three
3+1:10 glyph |=
4+1:13 name args
5+1:17 tight glyph =
6+1:18 tight glyph [
7+1:19 tight aura @t
8+1:22 aura @p
9+1:25 glyph ?
10+1:26 tight glyph ]
11+2:3 INDENT
12+2:3 glyph ?-
13+2:6 name args
14+3:5 INDENT
15+3:5 glyph [
16+3:6 tight name a
17+3:8 name b
18+3:10 name c
19+3:11 tight glyph ]
20+3:13 name c
21+4:1 DEDENT
22+4:1 DEDENT
23+4:1 NEWLINE
24+4:1 glyph ++
25+4:4 name four
26+4:9 glyph |=
27+4:12 name args
28+4:16 tight glyph =
29+4:17 tight glyph [
30+4:18 tight aura @t
31+4:21 aura @p
32+4:24 glyph ?
33+4:26 aura @ux
34+4:29 tight glyph ]
35+5:3 INDENT
36+5:3 glyph ?-
37+5:6 name args
38+6:5 INDENT
39+6:5 glyph [
40+6:6 tight name a
41+6:8 name b
42+6:10 name c
43+6:12 name d
44+6:13 tight glyph ]
45+6:15 name d
46+7:1 DEDENT
47+7:1 DEDENT
48+7:1 NEWLINE
49+7:1 glyph ++
50+7:4 name rest
51+7:9 glyph |=
52+7:12 name args
53+7:16 tight glyph =
54+7:17 tight glyph [
55+7:18 tight aura @t
56+7:21 aura @p
57+7:24 glyph [
58+7:25 tight glyph ?
59+7:27 aura @ux
60+7:30 tight glyph ]
61+7:31 tight glyph ]
62+8:3 INDENT
63+8:3 glyph ?-
64+8:6 name args
65+9:5 INDENT
66+9:5 glyph [
67+9:6 tight name a
68+9:8 name b
69+9:10 name c
70+9:11 tight glyph ]
71+9:13 name c
72+10:1 DEDENT
73+10:1 DEDENT
74+10:1 NEWLINE
75+10:1 glyph ++
76+10:4 name infer
77+10:10 glyph |=
78+10:13 name x
79+11:3 INDENT
80+11:3 glyph ?-
81+11:6 name x
82+12:5 INDENT
83+12:5 glyph [
84+12:6 tight name a
85+12:8 name b
86+12:10 name c
87+12:11 tight glyph ]
88+12:13 glyph [
89+12:14 tight name c
90+12:16 name b
91+12:18 name a
92+12:19 tight glyph ]
93+13:1 DEDENT
94+13:1 DEDENT
95+13:1 NEWLINE
96+13:1 glyph ++
97+13:4 name duplicate
98+13:14 glyph |=
99+13:17 name args
100+13:21 tight glyph =
101+13:22 tight glyph [
102+13:23 tight aura @t
103+13:26 aura @p
104+13:29 glyph ?
105+13:30 tight glyph ]
106+14:3 INDENT
107+14:3 glyph ?-
108+14:6 name args
109+15:5 INDENT
110+15:5 glyph [
111+15:6 tight name a
112+15:8 name b
113+15:10 name a
114+15:11 tight glyph ]
115+15:13 name a
116+16:1 DEDENT
117+16:1 DEDENT
118+16:1 NEWLINE
119+16:1 glyph ++
120+16:4 name shadow
121+16:11 glyph |=
122+16:14 name args
123+16:18 tight glyph =
124+16:19 tight glyph [
125+16:20 tight aura @t
126+16:23 aura @p
127+16:26 glyph ?
128+16:27 tight glyph ]
129+17:3 INDENT
130+17:3 glyph ?-
131+17:6 name args
132+18:5 INDENT
133+18:5 glyph [
134+18:6 tight name args
135+18:11 name b
136+18:13 name c
137+18:14 tight glyph ]
138+18:16 name b
139+19:1 DEDENT
140+19:1 DEDENT
141+19:1 NEWLINE
142+19:1 glyph ++
143+19:4 name prelude-shadow
144+19:19 glyph |=
145+19:22 name args
146+19:26 tight glyph =
147+19:27 tight glyph [
148+19:28 tight aura @t
149+19:31 aura @p
150+19:34 glyph ?
151+19:35 tight glyph ]
152+20:3 INDENT
153+20:3 glyph ?-
154+20:6 name args
155+21:5 INDENT
156+21:5 glyph [
157+21:6 tight name a
158+21:8 name not
159+21:12 name c
160+21:13 tight glyph ]
161+21:15 name c
162+22:1 DEDENT
163+22:1 DEDENT
164+22:1 NEWLINE
165+22:1 glyph ++
166+22:4 name atom
167+22:9 glyph |=
168+22:12 name args
169+22:16 tight glyph =
170+22:17 tight aura @t
171+23:3 INDENT
172+23:3 glyph ?-
173+23:6 name args
174+24:5 INDENT
175+24:5 glyph [
176+24:6 tight name a
177+24:8 name b
178+24:10 name c
179+24:11 tight glyph ]
180+24:13 name a
181+25:1 DEDENT
182+25:1 DEDENT
183+25:1 NEWLINE
184+25:1 glyph ++
185+25:4 name too-many
186+25:13 glyph |=
187+25:16 name args
188+25:20 tight glyph =
189+25:21 tight glyph [
190+25:22 tight aura @t
191+25:25 aura @p
192+25:27 tight glyph ]
193+26:3 INDENT
194+26:3 glyph ?-
195+26:6 name args
196+27:5 INDENT
197+27:5 glyph [
198+27:6 tight name a
199+27:8 name b
200+27:10 name c
201+27:11 tight glyph ]
202+27:13 name a
203+28:1 DEDENT
204+28:1 DEDENT
205+28:1 NEWLINE
206+28:1 glyph ++
207+28:4 name record
208+28:11 glyph |=
209+28:14 name args
210+28:18 tight glyph =
211+28:19 tight glyph [
212+28:20 tight name a
213+28:21 tight glyph =
214+28:22 tight aura @t
215+28:25 name b
216+28:26 tight glyph =
217+28:27 tight aura @p
218+28:30 name c
219+28:31 tight glyph =
220+28:32 tight glyph ?
221+28:33 tight glyph ]
222+29:3 INDENT
223+29:3 glyph ?-
224+29:6 name args
225+30:5 INDENT
226+30:5 glyph [
227+30:6 tight name a
228+30:8 name b
229+30:10 name c
230+30:11 tight glyph ]
231+30:13 name a
232+31:1 DEDENT
233+31:1 DEDENT
234+31:1 NEWLINE
235+31:1 glyph ++
236+31:4 name nested
237+31:11 glyph |=
238+31:14 name args
239+31:18 tight glyph =
240+31:19 tight glyph [
241+31:20 tight aura @t
242+31:23 glyph [
243+31:24 tight aura @p
244+31:27 glyph ?
245+31:28 tight glyph ]
246+31:30 aura @ux
247+31:33 tight glyph ]
248+32:3 INDENT
249+32:3 glyph ?-
250+32:6 name args
251+33:5 INDENT
252+33:5 glyph [
253+33:6 tight name a
254+33:8 glyph [
255+33:9 tight name b
256+33:11 name c
257+33:12 tight glyph ]
258+33:14 name d
259+33:15 tight glyph ]
260+33:17 name d
261+34:1 DEDENT
262+34:1 DEDENT
263+34:1 NEWLINE
264+34:1 glyph ++
265+34:4 name wildcard
266+34:13 glyph |=
267+34:16 name args
268+34:20 tight glyph =
269+34:21 tight glyph [
270+34:22 tight aura @t
271+34:25 aura @p
272+34:28 glyph ?
273+34:29 tight glyph ]
274+35:3 INDENT
275+35:3 glyph ?-
276+35:6 name args
277+36:5 INDENT
278+36:5 glyph [
279+36:6 tight name a
280+36:8 glyph *
281+36:10 name c
282+36:11 tight glyph ]
283+36:13 name c
284+37:1 DEDENT
285+37:1 DEDENT
286+37:1 NEWLINE
287+37:1 glyph ++
288+37:4 name pending
289+37:12 glyph |=
290+37:15 name args
291+37:19 tight glyph =
292+37:20 tight glyph [
293+37:21 tight aura @t
294+37:24 aura @p
295+37:27 glyph ?
296+37:28 tight glyph ]
297+38:3 INDENT
298+38:3 glyph ?-
299+38:6 name args
300+39:5 INDENT
301+39:5 glyph [
302+39:6 tight name a
303+39:8 name b
304+39:10 name c
305+39:11 tight glyph ]
306+40:7 INDENT
307+40:7 glyph ~&
308+40:10 lit %unused
309+41:9 INDENT
310+41:9 name c
311+41:10 DEDENT
312+41:10 DEDENT
313+41:10 DEDENT
314+41:10 DEDENT
315+41:10 NEWLINE
tests/golden/types-cell-pattern-many/tree.txtnew file+144
@@ -0,0 +1,144 @@
1+(module
2+ (value 1:1 three
3+ (gate 1:10
4+ (face 1:13 args
5+ (cell 1:18 (aura 1:19 @t) (aura 1:22 @p) (flag 1:25)))
6+ (body 2:3
7+ (branch 2:3
8+ (wing 2:6 args)
9+ (arm 3:5
10+ (cell 3:5 (bind 3:6 a) (bind 3:8 b) (bind 3:10 c))
11+ (wing 3:13 c))))))
12+ (value 4:1 four
13+ (gate 4:9
14+ (face 4:12 args
15+ (cell 4:17 (aura 4:18 @t) (aura 4:21 @p) (flag 4:24) (aura 4:26 @ux)))
16+ (body 5:3
17+ (branch 5:3
18+ (wing 5:6 args)
19+ (arm 6:5
20+ (cell 6:5 (bind 6:6 a) (bind 6:8 b) (bind 6:10 c) (bind 6:12 d))
21+ (wing 6:15 d))))))
22+ (value 7:1 rest
23+ (gate 7:9
24+ (face 7:12 args
25+ (cell 7:17
26+ (aura 7:18 @t)
27+ (aura 7:21 @p)
28+ (cell 7:24 (flag 7:25) (aura 7:27 @ux))))
29+ (body 8:3
30+ (branch 8:3
31+ (wing 8:6 args)
32+ (arm 9:5
33+ (cell 9:5 (bind 9:6 a) (bind 9:8 b) (bind 9:10 c))
34+ (wing 9:13 c))))))
35+ (value 10:1 infer
36+ (gate 10:10
37+ (bind 10:13 x)
38+ (body 11:3
39+ (branch 11:3
40+ (wing 11:6 x)
41+ (arm 12:5
42+ (cell 12:5 (bind 12:6 a) (bind 12:8 b) (bind 12:10 c))
43+ (tuple 12:13 (wing 12:14 c) (wing 12:16 b) (wing 12:18 a)))))))
44+ (value 13:1 duplicate
45+ (gate 13:14
46+ (face 13:17 args
47+ (cell 13:22 (aura 13:23 @t) (aura 13:26 @p) (flag 13:29)))
48+ (body 14:3
49+ (branch 14:3
50+ (wing 14:6 args)
51+ (arm 15:5
52+ (cell 15:5 (bind 15:6 a) (bind 15:8 b) (bind 15:10 a))
53+ (wing 15:13 a))))))
54+ (value 16:1 shadow
55+ (gate 16:11
56+ (face 16:14 args
57+ (cell 16:19 (aura 16:20 @t) (aura 16:23 @p) (flag 16:26)))
58+ (body 17:3
59+ (branch 17:3
60+ (wing 17:6 args)
61+ (arm 18:5
62+ (cell 18:5 (bind 18:6 args) (bind 18:11 b) (bind 18:13 c))
63+ (wing 18:16 b))))))
64+ (value 19:1 prelude-shadow
65+ (gate 19:19
66+ (face 19:22 args
67+ (cell 19:27 (aura 19:28 @t) (aura 19:31 @p) (flag 19:34)))
68+ (body 20:3
69+ (branch 20:3
70+ (wing 20:6 args)
71+ (arm 21:5
72+ (cell 21:5 (bind 21:6 a) (bind 21:8 not) (bind 21:12 c))
73+ (wing 21:15 c))))))
74+ (value 22:1 atom
75+ (gate 22:9
76+ (face 22:12 args (aura 22:17 @t))
77+ (body 23:3
78+ (branch 23:3
79+ (wing 23:6 args)
80+ (arm 24:5
81+ (cell 24:5 (bind 24:6 a) (bind 24:8 b) (bind 24:10 c))
82+ (wing 24:13 a))))))
83+ (value 25:1 too-many
84+ (gate 25:13
85+ (face 25:16 args
86+ (cell 25:21 (aura 25:22 @t) (aura 25:25 @p)))
87+ (body 26:3
88+ (branch 26:3
89+ (wing 26:6 args)
90+ (arm 27:5
91+ (cell 27:5 (bind 27:6 a) (bind 27:8 b) (bind 27:10 c))
92+ (wing 27:13 a))))))
93+ (value 28:1 record
94+ (gate 28:11
95+ (face 28:14 args
96+ (cell 28:19
97+ (face 28:20 a (aura 28:22 @t))
98+ (face 28:25 b (aura 28:27 @p))
99+ (face 28:30 c (flag 28:32))))
100+ (body 29:3
101+ (branch 29:3
102+ (wing 29:6 args)
103+ (arm 30:5
104+ (cell 30:5 (bind 30:6 a) (bind 30:8 b) (bind 30:10 c))
105+ (wing 30:13 a))))))
106+ (value 31:1 nested
107+ (gate 31:11
108+ (face 31:14 args
109+ (cell 31:19
110+ (aura 31:20 @t)
111+ (cell 31:23 (aura 31:24 @p) (flag 31:27))
112+ (aura 31:30 @ux)))
113+ (body 32:3
114+ (branch 32:3
115+ (wing 32:6 args)
116+ (arm 33:5
117+ (cell 33:5
118+ (bind 33:6 a)
119+ (cell 33:8 (bind 33:9 b) (bind 33:11 c))
120+ (bind 33:14 d))
121+ (wing 33:17 d))))))
122+ (value 34:1 wildcard
123+ (gate 34:13
124+ (face 34:16 args
125+ (cell 34:21 (aura 34:22 @t) (aura 34:25 @p) (flag 34:28)))
126+ (body 35:3
127+ (branch 35:3
128+ (wing 35:6 args)
129+ (arm 36:5
130+ (cell 36:5 (bind 36:6 a) (any 36:8) (bind 36:10 c))
131+ (wing 36:13 c))))))
132+ (value 37:1 pending
133+ (gate 37:12
134+ (face 37:15 args
135+ (cell 37:20 (aura 37:21 @t) (aura 37:24 @p) (flag 37:27)))
136+ (body 38:3
137+ (branch 38:3
138+ (wing 38:6 args)
139+ (arm 39:5
140+ (cell 39:5 (bind 39:6 a) (bind 39:8 b) (bind 39:10 c))
141+ (body 40:7
142+ (trace 40:7
143+ (lit 40:10 %unused)
144+ (body 41:9 (wing 41:9 c))))))))))
tests/golden/types-cell-pattern-many/types.txtnew file+14
@@ -0,0 +1,14 @@
1+partial inference; module not checked
2+++ three: $-([@t [@p ?]] ?)
3+++ four: $-([@t [@p [? @ux]]] @ux)
4+++ rest: $-([@t [@p [? @ux]]] [? @ux])
5+++ infer: $-([A [B C]] [C [B A]])
6+++ duplicate: pattern shadows a name
7+++ shadow: pattern shadows a name
8+++ prelude-shadow: pattern shadows a name
9+++ atom: cell pattern does not match the subject type
10+++ too-many: cell pattern does not match the subject type
11+++ record: record patterns are not supported by partial inference
12+++ nested: $-([@t [[@p ?] @ux]] @ux)
13+++ wildcard: $-([@t [@p ?]] ?)
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-deferred-call-context/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, literals by context and type variables: calls can receive expected result types while preserving shared type variables and pending constraints.
2+tests: A known identity-like gate receives list, null, unit, union and nested record contexts. Incorrect items, tags, auras and repeated arguments report errors; unrelated pending literals and explicit capital restrictions remain. Generic list and union results instantiate independently, captured variables retain their scope, and unsupported recursive inference fails closed. The module report remains partial.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-deferred-call-context/modules.txtnew file+1
@@ -0,0 +1 @@
1+# no module fixtures
tests/golden/types-deferred-call-context/source.jibbnew file+56
@@ -0,0 +1,56 @@
1++$ msg
2+ %good
3+ %other
4+++ local-id |= x x
5+++ empty-list ^- (list @t) (local-id ~)
6+++ filled-list ^- (list @t) (local-id ~["hi"])
7+++ wrong-list ^- (list @t) (local-id ~[~zod])
8+++ unit-value ^- (unit msg) (local-id `%good)
9+++ union-value ^- msg (local-id %good)
10+++ union-bad ^- msg (local-id %wrong)
11+++ nested ^- (list (unit msg)) (local-id ~[`%good])
12+++ rec-value ^- [field=(list @t)] (local-id [field=~])
13+++ already |= x=@ud ^- @u (local-id x)
14+++ bad-aura |= x=@p ^- @t (local-id x)
15+++ capital |= x=A ^- A (local-id "text")
16+++ trace-tag ^- (list @t)
17+ ~& %dangling
18+ (local-id ~)
19+++ trace-null ^- (list @t)
20+ ~& ~
21+ (local-id ~)
22+++ unresolved (local-id %dangling)
23+++ no-context (local-id ~)
24+++ local-keep |= [a=A b=A] a
25+++ repeated-good ^- @t (local-keep "hi" "bye")
26+++ repeated-bad ^- @t (local-keep "hi" ~zod)
27+++ rec-good ^- [field=(list @t) flag=?] (local-id [field=~ flag=%.y])
28+++ rec-bad ^- [field=(list @t) flag=?] (local-id [field=~[~zod] flag=%.y])
29+++ wrap-identity |= x=A ^- A (local-id x)
30+++ wrap-forced |= x=A ^- @t (local-id x)
31+++ retain |= x=@t (local-id x)
32+++ result-later |= x ^- (list @t) (local-id x)
33+++ result-repeated ^- (list @t) (local-keep ~ ~)
34+++ result-repeated-bad ^- (list @t) (local-keep ~ ~[~zod])
35+++ recursive |= [flag=? value]
36+ ^- (list @t)
37+ ?- flag
38+ %.y (local-id value)
39+ %.n (recursive flag value)
40+++ captured |= sample
41+ ++ local |= ignored sample
42+ ^- (list @t) (local ~zod)
43+++ captured-bad |= sample
44+ ++ local |= ignored sample
45+ ~& ^- @t sample
46+ ^- @p (local ~zod)
47++$ choice |$ [A]
48+ [%one value=A]
49+ %none
50+++ param-list |= x=(list A) ^- (list A) (local-id ~)
51+++ param-list-text (param-list ~["hi"])
52+++ param-list-ship (param-list ~[~zod])
53+++ param-union |= x=A ^- (choice A) (local-id [%one x])
54+++ param-union-text (param-union "hi")
55+++ param-union-ship (param-union ~zod)
56+++ nested-tag-unknown (local-id [%one %dangling])
tests/golden/types-deferred-call-context/tokens.txtnew file+557

This diff is too big to show here.

tests/golden/types-deferred-call-context/tree.txtnew file+272

This diff is too big to show here.

tests/golden/types-deferred-call-context/types.txtnew file+82

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-flag-branch-context/source.jibbnew file+83

This diff is too big to show here.

tests/golden/types-flag-branch-context/tokens.txtnew file+496

This diff is too big to show here.

tests/golden/types-flag-branch-context/tree.txtnew file+244

This diff is too big to show here.

tests/golden/types-flag-branch-context/types.txtnew file+33

This diff is too big to show here.

tests/golden/types-generic-face-inference/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-generic-face-inference/source.jibbnew file+8

This diff is too big to show here.

tests/golden/types-generic-face-inference/tokens.txtnew file+134

This diff is too big to show here.

tests/golden/types-generic-face-inference/tree.txtnew file+56

This diff is too big to show here.

tests/golden/types-generic-face-inference/types.txtnew file+13

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-generic-union-alias-face/module-trees.txtnew file+11

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-generic-union-alias-face/source.jibbnew file+6

This diff is too big to show here.

tests/golden/types-generic-union-alias-face/tokens.txtnew file+75

This diff is too big to show here.

tests/golden/types-generic-union-alias-face/tree.txtnew file+24

This diff is too big to show here.

tests/golden/types-generic-union-alias-face/types.txtnew file+12

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-generic-union-capitals/source.jibbnew file+17

This diff is too big to show here.

tests/golden/types-generic-union-capitals/tokens.txtnew file+162

This diff is too big to show here.

tests/golden/types-generic-union-capitals/tree.txtnew file+68

This diff is too big to show here.

tests/golden/types-generic-union-capitals/types.txtnew file+34

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-generic-union-errors/source.jibbnew file+11

This diff is too big to show here.

tests/golden/types-generic-union-errors/tokens.txtnew file+93

This diff is too big to show here.

tests/golden/types-generic-union-errors/tree.txtnew file+36

This diff is too big to show here.

tests/golden/types-generic-union-errors/types.txtnew file+26

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-generic-union-escaping/module-trees.txtnew file+16

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-generic-union-escaping/modules/ui/mid.jibbnew file+3

This diff is too big to show here.

tests/golden/types-generic-union-escaping/source.jibbnew file+3

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-generic-union-import/modules/ui/shared.jibbnew file+4

This diff is too big to show here.

tests/golden/types-generic-union-import/modules/ui/twin.jibbnew file+4

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-hole-concrete/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-hole-concrete/source.jibbnew file+6

This diff is too big to show here.

tests/golden/types-hole-concrete/tokens.txtnew file+54

This diff is too big to show here.

tests/golden/types-hole-concrete/tree.txtnew file+22

This diff is too big to show here.

tests/golden/types-hole-concrete/types.txtnew file+10

This diff is too big to show here.

tests/golden/types-hole-generic-mold/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-hole-generic-mold/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-hole-generic-mold/tokens.txtnew file+26

This diff is too big to show here.

tests/golden/types-hole-generic-mold/tree.txtnew file+11

This diff is too big to show here.

tests/golden/types-hole-generic-mold/types.txtnew file+6

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-hole-local-boundary/source.jibbnew file+16

This diff is too big to show here.

tests/golden/types-hole-local-boundary/tokens.txtnew file+118

This diff is too big to show here.

tests/golden/types-hole-local-boundary/tree.txtnew file+55

This diff is too big to show here.

tests/golden/types-hole-local-boundary/types.txtnew file+17

This diff is too big to show here.

tests/golden/types-hole-module-boundary/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-hole-module-boundary/module-trees.txtnew file+6

This diff is too big to show here.

tests/golden/types-hole-module-boundary/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-hole-module-boundary/modules/ui/lib.jibbnew file+1

This diff is too big to show here.

tests/golden/types-hole-module-boundary/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-hole-module-boundary/tokens.txtnew file+14

This diff is too big to show here.

tests/golden/types-hole-module-boundary/tree.txtnew file+5

This diff is too big to show here.

tests/golden/types-hole-module-boundary/types.txtnew file+2

This diff is too big to show here.

tests/golden/types-hole-named-complex/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-hole-named-complex/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-hole-named-complex/tokens.txtnew file+20

This diff is too big to show here.

tests/golden/types-hole-named-complex/tree.txtnew file+9

This diff is too big to show here.

tests/golden/types-hole-named-complex/types.txtnew file+3

This diff is too big to show here.

tests/golden/types-hole-numeric-capture/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-hole-numeric-capture/source.jibbnew file+19

This diff is too big to show here.

tests/golden/types-hole-numeric-capture/tokens.txtnew file+127

This diff is too big to show here.

tests/golden/types-hole-numeric-capture/tree.txtnew file+62

This diff is too big to show here.

tests/golden/types-hole-numeric-capture/types.txtnew file+10

This diff is too big to show here.

tests/golden/types-hole-unbound-mold/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-hole-unbound-mold/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-hole-unbound-mold/tokens.txtnew file+19

This diff is too big to show here.

tests/golden/types-hole-unbound-mold/tree.txtnew file+9

This diff is too big to show here.

tests/golden/types-hole-unbound-mold/types.txtnew file+3

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-hole-unsupported/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-hole-unsupported/tokens.txtnew file+14

This diff is too big to show here.

tests/golden/types-hole-unsupported/tree.txtnew file+7

This diff is too big to show here.

tests/golden/types-hole-unsupported/types.txtnew file+6

This diff is too big to show here.

tests/golden/types-hole-user-generic/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-hole-user-generic/source.jibbnew file+6

This diff is too big to show here.

tests/golden/types-hole-user-generic/tokens.txtnew file+71

This diff is too big to show here.

tests/golden/types-hole-user-generic/tree.txtnew file+31

This diff is too big to show here.

tests/golden/types-hole-user-generic/types.txtnew file+10

This diff is too big to show here.

tests/golden/types-hole-user-named/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-hole-user-named/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-hole-user-named/tokens.txtnew file+22

This diff is too big to show here.

tests/golden/types-hole-user-named/tree.txtnew file+11

This diff is too big to show here.

tests/golden/types-hole-user-named/types.txtnew file+6

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-hole-user-value/source.jibbnew file+3

This diff is too big to show here.

tests/golden/types-hole-user-value/tokens.txtnew file+21

This diff is too big to show here.

tests/golden/types-hole-user-value/tree.txtnew file+10

This diff is too big to show here.

tests/golden/types-hole-user-value/types.txtnew file+7

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-import-mark-record/about.txt+2−2

This diff is too big to show here.

tests/golden/types-import-mark-record/source.jibb+1−1

This diff is too big to show here.

tests/golden/types-import-mark-record/tokens.txt+1−1

This diff is too big to show here.

tests/golden/types-import-mark-record/tree.txt+1−1

This diff is too big to show here.

tests/golden/types-import-mark-record/types.txt+1−1

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-module-field-duplicate/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-module-field-duplicate/module-trees.txtnew file+6

This diff is too big to show here.

tests/golden/types-module-field-duplicate/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-module-field-duplicate/modules/ui/lib.jibbnew file+1

This diff is too big to show here.

tests/golden/types-module-field-duplicate/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-module-field-duplicate/tokens.txtnew file+11

This diff is too big to show here.

tests/golden/types-module-field-duplicate/tree.txtnew file+3

This diff is too big to show here.

tests/golden/types-module-field-duplicate/types.txtnew file+8

This diff is too big to show here.

tests/golden/types-module-field-nonrecord/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-module-field-nonrecord/module-trees.txtnew file+12

This diff is too big to show here.

tests/golden/types-module-field-nonrecord/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-module-field-nonrecord/modules/ui/lib.jibbnew file+2

This diff is too big to show here.

tests/golden/types-module-field-nonrecord/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-module-field-nonrecord/tokens.txtnew file+11

This diff is too big to show here.

tests/golden/types-module-field-nonrecord/tree.txtnew file+3

This diff is too big to show here.

tests/golden/types-module-field-nonrecord/types.txtnew file+2

This diff is too big to show here.

tests/golden/types-module-field-path/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-module-field-path/module-trees.txtnew file+12

This diff is too big to show here.

tests/golden/types-module-field-path/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-module-field-path/modules/ui/lib.jibbnew file+2

This diff is too big to show here.

tests/golden/types-module-field-path/source.jibbnew file+9

This diff is too big to show here.

tests/golden/types-module-field-path/tokens.txtnew file+45

This diff is too big to show here.

tests/golden/types-module-field-path/tree.txtnew file+14

This diff is too big to show here.

tests/golden/types-module-field-path/types.txtnew file+9

This diff is too big to show here.

tests/golden/types-module-field-shadow/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-module-field-shadow/module-trees.txtnew file+12

This diff is too big to show here.

tests/golden/types-module-field-shadow/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-module-field-shadow/modules/ui/lib.jibbnew file+2

This diff is too big to show here.

tests/golden/types-module-field-shadow/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-module-field-shadow/tokens.txtnew file+15

This diff is too big to show here.

tests/golden/types-module-field-shadow/tree.txtnew file+6

This diff is too big to show here.

tests/golden/types-module-field-shadow/types.txtnew file+2

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-pair-context/source.jibbnew file+32

This diff is too big to show here.

tests/golden/types-pair-context/tokens.txtnew file+217

This diff is too big to show here.

tests/golden/types-pair-context/tree.txtnew file+86

This diff is too big to show here.

tests/golden/types-pair-context/types.txtnew file+43

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-prelude-arithmetic/source.jibbnew file+23

This diff is too big to show here.

tests/golden/types-prelude-arithmetic/tokens.txtnew file+201

This diff is too big to show here.

tests/golden/types-prelude-arithmetic/tree.txtnew file+85

This diff is too big to show here.

tests/golden/types-prelude-arithmetic/types.txtnew file+32

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-prelude-bond/source.jibbnew file+6

This diff is too big to show here.

tests/golden/types-prelude-bond/tokens.txtnew file+57

This diff is too big to show here.

tests/golden/types-prelude-bond/tree.txtnew file+30

This diff is too big to show here.

tests/golden/types-prelude-bond/types.txtnew file+7

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-prelude-cmd/source.jibbnew file+21

This diff is too big to show here.

tests/golden/types-prelude-cmd/tokens.txtnew file+285

This diff is too big to show here.

tests/golden/types-prelude-cmd/tree.txtnew file+122

This diff is too big to show here.

tests/golden/types-prelude-cmd/types.txtnew file+50

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-prelude-functional/tokens.txtnew file+145

This diff is too big to show here.

tests/golden/types-prelude-functional/tree.txtnew file+65

This diff is too big to show here.

tests/golden/types-prelude-functional/types.txtnew file+23

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-prelude-list-alias/source.jibbnew file+7

This diff is too big to show here.

tests/golden/types-prelude-list-alias/tokens.txtnew file+68

This diff is too big to show here.

tests/golden/types-prelude-list-alias/tree.txtnew file+30

This diff is too big to show here.

tests/golden/types-prelude-list-alias/types.txtnew file+14

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-prelude-predicates/source.jibbnew file+6

This diff is too big to show here.

tests/golden/types-prelude-predicates/tokens.txtnew file+91

This diff is too big to show here.

tests/golden/types-prelude-predicates/tree.txtnew file+49

This diff is too big to show here.

tests/golden/types-prelude-predicates/types.txtnew file+19

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-proj-explicit-context/about.txtnew file+4

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-proj-explicit-context/source.jibbnew file+35

This diff is too big to show here.

tests/golden/types-proj-explicit-context/tokens.txtnew file+626

This diff is too big to show here.

tests/golden/types-proj-explicit-context/tree.txtnew file+287

This diff is too big to show here.

tests/golden/types-proj-explicit-context/types.txtnew file+31

This diff is too big to show here.

tests/golden/types-proj-nested-no-implicit/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-proj-nested-no-implicit/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-proj-nested-no-implicit/source.jibbnew file+6

This diff is too big to show here.

tests/golden/types-proj-nested-no-implicit/tokens.txtnew file+119

This diff is too big to show here.

tests/golden/types-proj-nested-no-implicit/tree.txtnew file+56

This diff is too big to show here.

tests/golden/types-proj-nested-no-implicit/types.txtnew file+7

This diff is too big to show here.

tests/golden/types-proj-reserved-imported-definition/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-proj-reserved-imported-definition/module-trees.txtnew file+10

This diff is too big to show here.

tests/golden/types-proj-reserved-imported-definition/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-proj-reserved-imported-definition/modules/ui/lib.jibbnew file+2

This diff is too big to show here.

tests/golden/types-proj-reserved-imported-definition/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-proj-reserved-imported-definition/tokens.txtnew file+11

This diff is too big to show here.

tests/golden/types-proj-reserved-imported-definition/tree.txtnew file+3

This diff is too big to show here.

tests/golden/types-proj-reserved-imported-definition/types.txtnew file+2

This diff is too big to show here.

tests/golden/types-proj-reserved-jibb-import/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-proj-reserved-jibb-import/module-trees.txtnew file+6

This diff is too big to show here.

tests/golden/types-proj-reserved-jibb-import/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-proj-reserved-jibb-import/modules/ui/lib.jibbnew file+1

This diff is too big to show here.

tests/golden/types-proj-reserved-jibb-import/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-proj-reserved-jibb-import/tokens.txtnew file+11

This diff is too big to show here.

tests/golden/types-proj-reserved-jibb-import/tree.txtnew file+3

This diff is too big to show here.

tests/golden/types-proj-reserved-jibb-import/types.txtnew file+2

This diff is too big to show here.

tests/golden/types-proj-reserved-local-mold/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-proj-reserved-local-mold/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-proj-reserved-local-mold/source.jibbnew file+3

This diff is too big to show here.

tests/golden/types-proj-reserved-local-mold/tokens.txtnew file+10

This diff is too big to show here.

tests/golden/types-proj-reserved-local-mold/tree.txtnew file+5

This diff is too big to show here.

tests/golden/types-proj-reserved-local-mold/types.txtnew file+2

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-proj-reserved-local/source.jibbnew file+3

This diff is too big to show here.

tests/golden/types-proj-reserved-local/tokens.txtnew file+14

This diff is too big to show here.

tests/golden/types-proj-reserved-local/tree.txtnew file+8

This diff is too big to show here.

tests/golden/types-proj-reserved-local/types.txtnew file+2

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-proj-reserved-mark-import/modules.txtnew file+1

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-proj-reserved-mark-import/tokens.txtnew file+7

This diff is too big to show here.

tests/golden/types-proj-reserved-mark-import/tree.txtnew file+3

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-proj-reserved-mold/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-proj-reserved-mold/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-proj-reserved-mold/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-proj-reserved-mold/tokens.txtnew file+8

This diff is too big to show here.

tests/golden/types-proj-reserved-mold/tree.txtnew file+3

This diff is too big to show here.

tests/golden/types-proj-reserved-mold/types.txtnew file+2

This diff is too big to show here.

tests/golden/types-proj-reserved-pattern/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-proj-reserved-pattern/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-proj-reserved-pattern/source.jibbnew file+3

This diff is too big to show here.

tests/golden/types-proj-reserved-pattern/tokens.txtnew file+21

This diff is too big to show here.

tests/golden/types-proj-reserved-pattern/tree.txtnew file+11

This diff is too big to show here.

tests/golden/types-proj-reserved-pattern/types.txtnew file+2

This diff is too big to show here.

tests/golden/types-proj-reserved-positive/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-proj-reserved-positive/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-proj-reserved-positive/source.jibbnew file+8

This diff is too big to show here.

tests/golden/types-proj-reserved-positive/tokens.txtnew file+70

This diff is too big to show here.

tests/golden/types-proj-reserved-positive/tree.txtnew file+31

This diff is too big to show here.

tests/golden/types-proj-reserved-positive/types.txtnew file+7

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-proj-reserved-sample/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-proj-reserved-sample/source.jibbnew file+1

This diff is too big to show here.

tests/golden/types-proj-reserved-sample/tokens.txtnew file+8

This diff is too big to show here.

tests/golden/types-proj-reserved-sample/tree.txtnew file+5

This diff is too big to show here.

tests/golden/types-proj-reserved-sample/types.txtnew file+2

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-proj-reserved-sur-import/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-proj-reserved-sur-import/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-proj-reserved-sur-import/tokens.txtnew file+7

This diff is too big to show here.

tests/golden/types-proj-reserved-sur-import/tree.txtnew file+3

This diff is too big to show here.

tests/golden/types-proj-reserved-sur-import/types.txtnew file+2

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-pattern/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-pattern/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-pattern/source.jibbnew file+6

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-pattern/tokens.txtnew file+38

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-pattern/tree.txtnew file+18

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-pattern/types.txtnew file+2

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-sample/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-sample/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-sample/source.jibbnew file+4

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-sample/tokens.txtnew file+25

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-sample/tree.txtnew file+12

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-sample/types.txtnew file+2

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-value/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-value/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-value/source.jibbnew file+6

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-value/tokens.txtnew file+31

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-value/tree.txtnew file+15

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-value/types.txtnew file+2

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-proj-reserved-value/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-proj-reserved-value/tokens.txtnew file+12

This diff is too big to show here.

tests/golden/types-proj-reserved-value/tree.txtnew file+6

This diff is too big to show here.

tests/golden/types-proj-reserved-value/types.txtnew file+2

This diff is too big to show here.

tests/golden/types-proj-single-duplicate/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-proj-single-duplicate/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-proj-single-duplicate/source.jibbnew file+1

This diff is too big to show here.

tests/golden/types-proj-single-duplicate/tokens.txtnew file+23

This diff is too big to show here.

tests/golden/types-proj-single-duplicate/tree.txtnew file+12

This diff is too big to show here.

tests/golden/types-proj-single-duplicate/types.txtnew file+8

This diff is too big to show here.

tests/golden/types-proj-single-field/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-proj-single-field/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-proj-single-field/source.jibbnew file+25

This diff is too big to show here.

tests/golden/types-proj-single-field/tokens.txtnew file+499

This diff is too big to show here.

tests/golden/types-proj-single-field/tree.txtnew file+243

This diff is too big to show here.

tests/golden/types-proj-single-field/types.txtnew file+31

This diff is too big to show here.

tests/golden/types-proj-single-sample-face/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-proj-single-sample-face/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-proj-single-sample-face/source.jibbnew file+22

This diff is too big to show here.

tests/golden/types-proj-single-sample-face/tokens.txtnew file+210

This diff is too big to show here.

tests/golden/types-proj-single-sample-face/tree.txtnew file+117

This diff is too big to show here.

tests/golden/types-proj-single-sample-face/types.txtnew file+9

This diff is too big to show here.

tests/golden/types-proj-single-wrapped/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-proj-single-wrapped/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-proj-single-wrapped/source.jibbnew file+26

This diff is too big to show here.

tests/golden/types-proj-single-wrapped/tokens.txtnew file+208

This diff is too big to show here.

tests/golden/types-proj-single-wrapped/tree.txtnew file+107

This diff is too big to show here.

tests/golden/types-proj-single-wrapped/types.txtnew file+5

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-qath-faces/modules.txtnew file+1

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-qath-faces/tokens.txtnew file+130

This diff is too big to show here.

tests/golden/types-qath-faces/tree.txtnew file+59

This diff is too big to show here.

tests/golden/types-qath-faces/types.txtnew file+18

This diff is too big to show here.

tests/golden/types-qath-holes/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-qath-holes/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-qath-holes/source.jibbnew file+18

This diff is too big to show here.

tests/golden/types-qath-holes/tokens.txtnew file+178

This diff is too big to show here.

tests/golden/types-qath-holes/tree.txtnew file+78

This diff is too big to show here.

tests/golden/types-qath-holes/types.txtnew file+22

This diff is too big to show here.

tests/golden/types-qath-module-identity/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-qath-module-identity/module-trees.txtnew file+44

This diff is too big to show here.

tests/golden/types-qath-module-identity/modules.txtnew file+3

This diff is too big to show here.

tests/golden/types-qath-module-identity/modules/ui/mid.jibbnew file+4

This diff is too big to show here.

tests/golden/types-qath-module-identity/modules/ui/one.jibbnew file+7

This diff is too big to show here.

tests/golden/types-qath-module-identity/modules/ui/two.jibbnew file+4

This diff is too big to show here.

tests/golden/types-qath-module-identity/source.jibbnew file+15

This diff is too big to show here.

tests/golden/types-qath-module-identity/tokens.txtnew file+171

This diff is too big to show here.

tests/golden/types-qath-module-identity/tree.txtnew file+70

This diff is too big to show here.

tests/golden/types-qath-module-identity/types.txtnew file+18

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-qath-recursive/source.jibbnew file+19

This diff is too big to show here.

tests/golden/types-qath-recursive/tokens.txtnew file+145

This diff is too big to show here.

tests/golden/types-qath-recursive/tree.txtnew file+63

This diff is too big to show here.

tests/golden/types-qath-recursive/types.txtnew file+14

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-record-field-edit-separate/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-record-field-edit-separate/source.jibbnew file+1

This diff is too big to show here.

tests/golden/types-record-field-edit-separate/tokens.txtnew file+51

This diff is too big to show here.

tests/golden/types-record-field-edit-separate/tree.txtnew file+22

This diff is too big to show here.

tests/golden/types-record-field-edit-separate/types.txtnew file+2

This diff is too big to show here.

tests/golden/types-record-field-expr-duplicate/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-record-field-expr-duplicate/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-record-field-expr-duplicate/tokens.txtnew file+22

This diff is too big to show here.

tests/golden/types-record-field-expr-duplicate/tree.txtnew file+9

This diff is too big to show here.

tests/golden/types-record-field-expr-duplicate/types.txtnew file+8

This diff is too big to show here.

tests/golden/types-record-field-expr-separate/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-record-field-expr-separate/source.jibbnew file+1

This diff is too big to show here.

tests/golden/types-record-field-expr-separate/tokens.txtnew file+25

This diff is too big to show here.

tests/golden/types-record-field-expr-separate/tree.txtnew file+11

This diff is too big to show here.

tests/golden/types-record-field-expr-separate/types.txtnew file+2

This diff is too big to show here.

tests/golden/types-record-field-module-reachable/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-record-field-module-reachable/module-trees.txtnew file+7

This diff is too big to show here.

tests/golden/types-record-field-module-reachable/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-record-field-module-reachable/modules/ui/lib.jibbnew file+2

This diff is too big to show here.

tests/golden/types-record-field-module-reachable/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-record-field-module-reachable/tokens.txtnew file+11

This diff is too big to show here.

tests/golden/types-record-field-module-reachable/tree.txtnew file+3

This diff is too big to show here.

tests/golden/types-record-field-module-reachable/types.txtnew file+8

This diff is too big to show here.

tests/golden/types-record-field-module-unused/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-record-field-module-unused/module-trees.txtnew file+10

This diff is too big to show here.

tests/golden/types-record-field-module-unused/modules.txtnew file+2

This diff is too big to show here.

tests/golden/types-record-field-module-unused/modules/ui/good.jibbnew file+1

This diff is too big to show here.

tests/golden/types-record-field-module-unused/modules/ui/unused.jibbnew file+2

This diff is too big to show here.

tests/golden/types-record-field-module-unused/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-record-field-module-unused/tokens.txtnew file+11

This diff is too big to show here.

tests/golden/types-record-field-module-unused/tree.txtnew file+3

This diff is too big to show here.

tests/golden/types-record-field-module-unused/types.txtnew file+2

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-record-field-nested-mold/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-record-field-nested-mold/tokens.txtnew file+22

This diff is too big to show here.

tests/golden/types-record-field-nested-mold/tree.txtnew file+9

This diff is too big to show here.

tests/golden/types-record-field-nested-mold/types.txtnew file+8

This diff is too big to show here.

tests/golden/types-record-field-outer-inner/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-record-field-outer-inner/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-record-field-outer-inner/tokens.txtnew file+26

This diff is too big to show here.

tests/golden/types-record-field-outer-inner/tree.txtnew file+12

This diff is too big to show here.

tests/golden/types-record-field-outer-inner/types.txtnew file+3

This diff is too big to show here.

tests/golden/types-record-field-sample-duplicate/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-record-field-sample-duplicate/source.jibbnew file+1

This diff is too big to show here.

tests/golden/types-record-field-sample-duplicate/tokens.txtnew file+13

This diff is too big to show here.

tests/golden/types-record-field-sample-duplicate/tree.txtnew file+7

This diff is too big to show here.

tests/golden/types-record-field-sample-duplicate/types.txtnew file+8

This diff is too big to show here.

tests/golden/types-record-field-separate-molds/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-record-field-separate-molds/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-record-field-separate-molds/tokens.txtnew file+33

This diff is too big to show here.

tests/golden/types-record-field-separate-molds/tree.txtnew file+15

This diff is too big to show here.

tests/golden/types-record-field-separate-molds/types.txtnew file+3

This diff is too big to show here.

tests/golden/types-record-field-unused-mold/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-record-field-unused-mold/source.jibbnew file+2

This diff is too big to show here.

tests/golden/types-record-field-unused-mold/tokens.txtnew file+15

This diff is too big to show here.

tests/golden/types-record-field-unused-mold/tree.txtnew file+6

This diff is too big to show here.

tests/golden/types-record-field-unused-mold/types.txtnew file+8

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-single-case-pattern/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-single-case-pattern/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-single-case-pattern/source.jibbnew file+59

This diff is too big to show here.

tests/golden/types-single-case-pattern/tokens.txtnew file+364

This diff is too big to show here.

tests/golden/types-single-case-pattern/tree.txtnew file+182

This diff is too big to show here.

tests/golden/types-single-case-pattern/types.txtnew file+32

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-union-alias/types.txt+1−1

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-union-context-flow/types.txt+2−2

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-union-import/types.txt+1−1

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-union-nonwing-subject/source.jibbnew file+82

This diff is too big to show here.

tests/golden/types-union-nonwing-subject/tokens.txtnew file+593

This diff is too big to show here.

tests/golden/types-union-nonwing-subject/tree.txtnew file+257

This diff is too big to show here.

tests/golden/types-union-nonwing-subject/types.txtnew file+45

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-union-polymorphic-identity/module-trees.txtnew file+16

This diff is too big to show here.

tests/golden/types-union-polymorphic-identity/modules.txtnew file+2

This diff is too big to show here.

tests/golden/types-union-polymorphic-identity/modules/ui/one.jibbnew file+4

This diff is too big to show here.

tests/golden/types-union-polymorphic-identity/modules/ui/two.jibbnew file+4

This diff is too big to show here.

tests/golden/types-union-polymorphic-identity/source.jibbnew file+33

This diff is too big to show here.

tests/golden/types-union-polymorphic-identity/tokens.txtnew file+368

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-union-polymorphic-identity/types.txtnew file+36

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-union-singleton/types.txt+1−1

This diff is too big to show here.

tests/golden/types-union-tags/types.txt+5−5

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/importer/about.txt+41−4

This diff is too big to show here.

tests/importer/shadow-static.txt+7

This diff is too big to show here.

tests/importer/shadow.txt+3

This diff is too big to show here.

tests/importer/small.txt+91

This diff is too big to show here.

tests/importer/tree.txt+109−18

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

This diff is too big to show here.

tests/lib/jibb-hole-guards.hoonnew file+77

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-list-alias-guards.hoonnew file+27

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/lib/jibb-proj-guards.hoonnew file+124

This diff is too big to show here.

tests/lib/jibb-qath-fuel.hoonnew file+52

This diff is too big to show here.

tests/lib/jibb-qath-source.hoonnew file+34

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+1439−393

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/type-import/expected.txt+130−2

This diff is too big to show here.

tests/type-import/source.txt+67

This diff is too big to show here.

tests/type-import/sur.txt+16

This diff is too big to show here.

tests/type-list-alias/expected.txtnew file+36

This diff is too big to show here.

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

This diff is too big to show here.

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

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

This diff is too big to show here.

tools/golden+18−2

This diff is too big to show here.

tools/importer-test+1−1

This diff is too big to show here.

tools/ship+49−7

This diff is too big to show here.

tools/testdata/clay-fixtures-selftestnew file+109

This diff is too big to show here.

tools/testdata/selftest+35−3

This diff is too big to show here.

tools/testdata/ship-selftest+74−1

This diff is too big to show here.

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

This diff is too big to show here.

tools/type-hole-guards-testnew file+32

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-list-alias-testnew file+33

This diff is too big to show here.

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

This diff is too big to show here.

tools/type-poke-testnew file+50

This diff is too big to show here.

tools/type-proj-guards-testnew file+32

This diff is too big to show here.

tools/type-qath-guards-testnew file+31

This diff is too big to show here.

tools/type-tlon-testnew file+39

This diff is too big to show here.