on ae1ec26 help sign in
555 files changed+2049−24925
since splitsnapshots
unifiedsplit
README.md+1−9 docs/README.md−2 docs/compiler.md+5−65 docs/development.md−72 docs/open-questions.md−2 docs/prelude-inventory.md+5−13 docs/prompts/milestone-2.md+3−3 docs/spec/decisions.md+3−4 docs/spec/grammar.md+1−1 docs/spec/implementation-plan.md+1−1 docs/spec/overview.md+2−4 docs/status.md+12−114 jibb-dev/lib/jibb-import.hoon+6−181 jibb-dev/lib/jibb.hoon+138−4415 jibb-dev/lib/jibb/internal.jibb−2 jibb-dev/lib/jibb/prelude.jibb−182 my-app/ui/theme.jibb+1−1 tests/golden/doc-overview-02-theme/source.jibb+1−1 tests/golden/doc-overview-02-theme/tokens.txt+23−24 tests/golden/doc-overview-02-theme/tree.txt+8−9 tests/golden/module-import-cycle/source.jibb+1−1 tests/golden/module-import-cycle/tokens.txt+6−6 tests/golden/module-import-cycle/tree.txt+3−3 tests/golden/module-import-identity/source.jibb+1−1 tests/golden/module-import-identity/tokens.txt+5−5 tests/golden/module-import-identity/tree.txt+3−3 tests/golden/module-import-identity/types.txt+1−1 tests/golden/module-import-transitive/source.jibb+1−1 tests/golden/module-import-transitive/tokens.txt+6−6 tests/golden/module-import-transitive/tree.txt+3−3 tests/golden/module-import-transitive/types.txt+1−1 tests/golden/module-import-unused-invalid/source.jibb+1−1 tests/golden/module-import-unused-invalid/tokens.txt+6−6 tests/golden/module-import-unused-invalid/tree.txt+3−3 tests/golden/module-import-unused-invalid/types.txt+1−1 tests/golden/types-arithmetic-module/source.jibb+1−1 tests/golden/types-arithmetic-module/tokens.txt+8−8 tests/golden/types-arithmetic-module/tree.txt+5−5 tests/golden/types-arithmetic-module/types.txt+1−1 tests/golden/types-cell-branch-context/about.txt−4 tests/golden/types-cell-branch-context/modules.txt−1 tests/golden/types-cell-branch-context/source.jibb−37 tests/golden/types-cell-branch-context/tokens.txt−308 tests/golden/types-cell-branch-context/tree.txt−156 tests/golden/types-cell-branch-context/types.txt−11 tests/golden/types-cell-pattern-schemes/source.jibb+1−1 tests/golden/types-cell-pattern-schemes/tokens.txt+7−7 tests/golden/types-cell-pattern-schemes/tree.txt+3−3 tests/golden/types-cell-pattern-schemes/types.txt+1−1 tests/golden/types-constructor-context/about.txt−1 tests/golden/types-constructor-context/source.jibb−37 tests/golden/types-constructor-context/tokens.txt−289 tests/golden/types-constructor-context/tree.txt−130 tests/golden/types-constructor-context/types.txt−54 tests/golden/types-equal-head-disjoint/about.txt−2 tests/golden/types-equal-head-disjoint/source.jibb−25 tests/golden/types-equal-head-disjoint/tokens.txt−179 tests/golden/types-equal-head-disjoint/tree.txt−75 tests/golden/types-equal-head-disjoint/types.txt−34 tests/golden/types-generic-result-context/about.txt−1 tests/golden/types-generic-result-context/source.jibb−24 tests/golden/types-generic-result-context/tokens.txt−233 tests/golden/types-generic-result-context/tree.txt−86 tests/golden/types-generic-result-context/types.txt−22 tests/golden/types-generic-union-escaping/module-trees.txt+4−4 tests/golden/types-generic-union-escaping/modules/ui/mid.jibb+1−1 tests/golden/types-generic-union-escaping/source.jibb+1−1 tests/golden/types-generic-union-escaping/tokens.txt+1−1 tests/golden/types-generic-union-escaping/tree.txt+1−1 tests/golden/types-list-patterns/about.txt+1−1 tests/golden/types-list-patterns/types.txt+1−1 tests/golden/types-literal-constructor-nouns/about.txt−2 tests/golden/types-literal-constructor-nouns/source.jibb−25 tests/golden/types-literal-constructor-nouns/tokens.txt−177 tests/golden/types-literal-constructor-nouns/tree.txt−78 tests/golden/types-literal-constructor-nouns/types.txt−45 tests/golden/types-loobean-singleton-source/about.txt−2 tests/golden/types-loobean-singleton-source/source.jibb−22 tests/golden/types-loobean-singleton-source/tokens.txt−143 tests/golden/types-loobean-singleton-source/tree.txt−52 tests/golden/types-loobean-singleton-source/types.txt−65 tests/golden/types-loobean-union-context/about.txt−2 tests/golden/types-loobean-union-context/source.jibb−28 tests/golden/types-loobean-union-context/tokens.txt−136 tests/golden/types-loobean-union-context/tree.txt−55 tests/golden/types-loobean-union-context/types.txt−35 tests/golden/types-nested-noun-context/about.txt−4 tests/golden/types-nested-noun-context/source.jibb−35 tests/golden/types-nested-noun-context/tokens.txt−363 tests/golden/types-nested-noun-context/tree.txt−162 tests/golden/types-nested-noun-context/types.txt−34 tests/golden/types-nested-shallow-preserve/about.txt−4 tests/golden/types-nested-shallow-preserve/modules.txt−1 tests/golden/types-nested-shallow-preserve/source.jibb−30 tests/golden/types-nested-shallow-preserve/tokens.txt−271 tests/golden/types-nested-shallow-preserve/tree.txt−136 tests/golden/types-nested-shallow-preserve/types.txt−33 tests/golden/types-nested-union-context/about.txt−4 tests/golden/types-nested-union-context/source.jibb−59 tests/golden/types-nested-union-context/tokens.txt−660 tests/golden/types-nested-union-context/tree.txt−302 tests/golden/types-nested-union-context/types.txt−49 tests/golden/types-null-context/about.txt+1−1 tests/golden/types-null-context/source.jibb+1−1 tests/golden/types-null-context/tokens.txt+8−8 tests/golden/types-null-context/tree.txt+4−4 tests/golden/types-null-context/types.txt+7−1 tests/golden/types-pair-context/source.jibb+14−14 tests/golden/types-pair-context/tokens.txt+71−71 tests/golden/types-pair-context/tree.txt+34−34 tests/golden/types-pair-context/types.txt+19−19 tests/golden/types-partial-aura-family/source.jibb+1−1 tests/golden/types-partial-aura-family/tokens.txt+8−8 tests/golden/types-partial-aura-family/tree.txt+4−4 tests/golden/types-partial-aura-family/types.txt+1−1 tests/golden/types-partial-locals/source.jibb+2−2 tests/golden/types-partial-locals/tokens.txt+10−10 tests/golden/types-partial-locals/tree.txt+5−5 tests/golden/types-partial-locals/types.txt+1−1 tests/golden/types-partial-union-nested-nouns/about.txt−4 tests/golden/types-partial-union-nested-nouns/source.jibb−18 tests/golden/types-partial-union-nested-nouns/tokens.txt−108 tests/golden/types-partial-union-nested-nouns/tree.txt−47 tests/golden/types-partial-union-nested-nouns/types.txt−25 tests/golden/types-prelude-arithmetic/about.txt+1−1 tests/golden/types-prelude-arithmetic/source.jibb+1−1 tests/golden/types-prelude-arithmetic/tokens.txt+7−7 tests/golden/types-prelude-arithmetic/tree.txt+5−5 tests/golden/types-prelude-arithmetic/types.txt+1−1 tests/golden/types-prelude-ask/source.jibb+1−1 tests/golden/types-prelude-ask/tokens.txt+25−25 tests/golden/types-prelude-ask/tree.txt+11−11 tests/golden/types-prelude-ask/types.txt+1−1 tests/golden/types-prelude-bond/source.jibb+1−1 tests/golden/types-prelude-bond/tokens.txt+12−12 tests/golden/types-prelude-bond/tree.txt+6−6 tests/golden/types-prelude-bond/types.txt+1−1 tests/golden/types-prelude-cmd/about.txt+1−1 tests/golden/types-prelude-cmd/source.jibb+4−4 tests/golden/types-prelude-cmd/tokens.txt+30−30 tests/golden/types-prelude-cmd/tree.txt+13−13 tests/golden/types-prelude-cmd/types.txt+4−10 tests/golden/types-prelude-comparison/about.txt−4 tests/golden/types-prelude-comparison/modules.txt−1 tests/golden/types-prelude-comparison/source.jibb−18 tests/golden/types-prelude-comparison/tokens.txt−175 tests/golden/types-prelude-comparison/tree.txt−71 tests/golden/types-prelude-comparison/types.txt−31 tests/golden/types-prelude-lead-late/about.txt−4 tests/golden/types-prelude-lead-late/modules.txt−1 tests/golden/types-prelude-lead-late/source.jibb−10 tests/golden/types-prelude-lead-late/tokens.txt−151 tests/golden/types-prelude-lead-late/tree.txt−83 tests/golden/types-prelude-lead-late/types.txt−17 tests/golden/types-prelude-lent/about.txt−4 tests/golden/types-prelude-lent/modules.txt−1 tests/golden/types-prelude-lent/source.jibb−8 tests/golden/types-prelude-lent/tokens.txt−76 tests/golden/types-prelude-lent/tree.txt−38 tests/golden/types-prelude-lent/types.txt−15 tests/golden/types-prelude-list-alias/source.jibb+1−1 tests/golden/types-prelude-list-alias/tokens.txt+9−9 tests/golden/types-prelude-list-alias/tree.txt+5−5 tests/golden/types-prelude-list-alias/types.txt+1−1 tests/golden/types-prelude-sub-nested/about.txt−4 tests/golden/types-prelude-sub-nested/modules.txt−1 tests/golden/types-prelude-sub-nested/source.jibb−20 tests/golden/types-prelude-sub-nested/tokens.txt−211 tests/golden/types-prelude-sub-nested/tree.txt−100 tests/golden/types-prelude-sub-nested/types.txt−27 tests/golden/types-prelude-sub/about.txt−4 tests/golden/types-prelude-sub/modules.txt−1 tests/golden/types-prelude-sub/source.jibb−37 tests/golden/types-prelude-sub/tokens.txt−380 tests/golden/types-prelude-sub/tree.txt−164 tests/golden/types-prelude-sub/types.txt−32 tests/golden/types-prelude-succ/about.txt−4 tests/golden/types-prelude-succ/modules.txt−1 tests/golden/types-prelude-succ/source.jibb−4 tests/golden/types-prelude-succ/tokens.txt−32 tests/golden/types-prelude-succ/tree.txt−15 tests/golden/types-prelude-succ/types.txt−11 tests/golden/types-prelude-text/about.txt−4 tests/golden/types-prelude-text/modules.txt−1 tests/golden/types-prelude-text/source.jibb−8 tests/golden/types-prelude-text/tokens.txt−66 tests/golden/types-prelude-text/tree.txt−36 tests/golden/types-prelude-text/types.txt−26 tests/golden/types-prelude-ui/about.txt−4 tests/golden/types-prelude-ui/modules.txt−1 tests/golden/types-prelude-ui/source.jibb−78 tests/golden/types-prelude-ui/tokens.txt−728 tests/golden/types-prelude-ui/tree.txt−300 tests/golden/types-prelude-ui/types.txt−85 tests/golden/types-prelude-zing/about.txt−4 tests/golden/types-prelude-zing/modules.txt−1 tests/golden/types-prelude-zing/source.jibb−6 tests/golden/types-prelude-zing/tokens.txt−92 tests/golden/types-prelude-zing/tree.txt−43 tests/golden/types-prelude-zing/types.txt−13 tests/golden/types-recursion-scc-import/source.jibb+1−1 tests/golden/types-recursion-scc-import/tokens.txt+7−7 tests/golden/types-recursion-scc-import/tree.txt+5−5 tests/golden/types-recursion-scc-import/types.txt+1−1 tests/golden/types-request-normal/about.txt−4 tests/golden/types-request-normal/mar/full.txt−5 tests/golden/types-request-normal/marks.txt−1 tests/golden/types-request-normal/module-trees.txt−5 tests/golden/types-request-normal/modules.txt−1 tests/golden/types-request-normal/modules/ui/api/demo.jibb−2 tests/golden/types-request-normal/source.jibb−9 tests/golden/types-request-normal/tokens.txt−95 tests/golden/types-request-normal/tree.txt−50 tests/golden/types-request-normal/types.txt−26 tests/golden/types-union-finite-context/source.jibb+1−1 tests/golden/types-union-finite-context/tokens.txt+3−3 tests/golden/types-union-finite-context/tree.txt+2−2 tests/golden/types-union-finite-limit/about.txt+1−1 tests/golden/types-union-finite-limit/types.txt+1−1 tests/golden/types-union-nonwing-subject/source.jibb+13−13 tests/golden/types-union-nonwing-subject/tokens.txt+54−54 tests/golden/types-union-nonwing-subject/tree.txt+26−26 tests/golden/types-union-nonwing-subject/types.txt+3−3 tests/golden/types-union-runtime-equality/about.txt−3 tests/golden/types-union-runtime-equality/source.jibb−16 tests/golden/types-union-runtime-equality/tokens.txt−96 tests/golden/types-union-runtime-equality/tree.txt−37 tests/golden/types-union-runtime-equality/types.txt−25 tests/golden/types-union-source-alias/about.txt−4 tests/golden/types-union-source-alias/source.jibb−18 tests/golden/types-union-source-alias/tokens.txt−119 tests/golden/types-union-source-alias/tree.txt−41 tests/golden/types-union-source-alias/types.txt−23 tests/golden/types-unit-context/source.jibb+3−3 tests/golden/types-unit-context/tokens.txt+33−33 tests/golden/types-unit-context/tree.txt+21−21 tests/golden/types-unit-context/types.txt+15−15 tests/importer/about.txt+1−3 tests/importer/tree.txt+3−3 tests/lib/jibb-bridge.hoon+2−5 tests/lib/jibb-cell-branch.hoon−53 tests/lib/jibb-closed-gate-guards.hoon−60 tests/lib/jibb-constructor-fit-guards.hoon−128 tests/lib/jibb-deferred-context.hoon−83 tests/lib/jibb-deferred-prepared.hoon−114 tests/lib/jibb-deferred-resolver.hoon−113 tests/lib/jibb-deferred.hoon−244 tests/lib/jibb-direct-gate-guards.hoon−172 tests/lib/jibb-direct-gate-source.hoon−46 tests/lib/jibb-empty.hoon−174 tests/lib/jibb-full-overlap-basic.hoon−143 tests/lib/jibb-full-overlap-graph.hoon−126 tests/lib/jibb-gate-free-guards.hoon−79 tests/lib/jibb-gate-free-source.hoon−95 tests/lib/jibb-generic-construction.hoon−141 tests/lib/jibb-generic-pattern.hoon−165 tests/lib/jibb-generic-recursion.hoon−170 tests/lib/jibb-import-overlap.hoon−80 tests/lib/jibb-import-structural.hoon−82 tests/lib/jibb-list-alias-guards.hoon+1−1 tests/lib/jibb-nested-union-guards.hoon−67 tests/lib/jibb-page-main.hoon−168 tests/lib/jibb-program-init.hoon−134 tests/lib/jibb-program-main.hoon−141 tests/lib/jibb-program-update.hoon−139 tests/lib/jibb-program-watch.hoon−209 tests/lib/jibb-request-guards.hoon−149 tests/lib/jibb-store.hoon−261 tests/lib/jibb-sub-guards.hoon−37 tests/lib/jibb-theme.hoon−86 tests/lib/jibb-todo-api.hoon−85 tests/lib/jibb-todo-full.hoon−157 tests/lib/jibb-todo-partial.hoon−58 tests/lib/jibb-union-alias-overlap.hoon−107 tests/lib/jibb-union-source.hoon−152 tests/lib/jibb.hoon+1223−1364 tests/type-cell-branch/about.txt−2 tests/type-cell-branch/bad.txt−3 tests/type-cell-branch/good.txt−3 tests/type-deferred-context/about.txt−3 tests/type-deferred-context/collision-early.txt−27 tests/type-deferred-context/collision-late.txt−28 tests/type-deferred-context/dangling.txt−16 tests/type-deferred-context/duplicate.txt−14 tests/type-deferred-context/missing.txt−14 tests/type-deferred-context/plain.txt−11 tests/type-deferred-context/report.txt−15 tests/type-deferred-context/rich.txt−27 tests/type-deferred-context/simple.txt−10 tests/type-deferred-context/wrong.txt−14 tests/type-deferred-prepared/expected-control.txt−7 tests/type-deferred-prepared/expected-tuple-only.txt−4 tests/type-deferred-prepared/expected.txt−8 tests/type-deferred-prepared/good.txt−9 tests/type-deferred-prepared/imported.txt−11 tests/type-deferred-prepared/main.txt−10 tests/type-deferred-prepared/mold-collision.txt−9 tests/type-deferred-prepared/no-final-cast.txt−8 tests/type-deferred-prepared/no-prelude.txt−9 tests/type-deferred-prepared/tuple-only.txt−3 tests/type-deferred-prepared/unrelated-tag.txt−11 tests/type-deferred-prepared/wrong-draft.txt−9 tests/type-deferred-prepared/wrong-unit.txt−9 tests/type-deferred-resolver/about.txt−5 tests/type-deferred-resolver/conflict.txt−12 tests/type-deferred-resolver/duplicate.txt−12 tests/type-deferred-resolver/expected.txt−42 tests/type-deferred-resolver/face.txt−6 tests/type-deferred-resolver/good.txt−11 tests/type-deferred-resolver/hole.txt−12 tests/type-deferred-resolver/missing.txt−10 tests/type-deferred-resolver/stability-early.txt−6 tests/type-deferred-resolver/stability-late.txt−6 tests/type-deferred-resolver/stability-output-early.txt−9 tests/type-deferred-resolver/stability-output-late.txt−9 tests/type-deferred-resolver/stability-simple-early.txt−6 tests/type-deferred-resolver/stability-simple-late.txt−6 tests/type-deferred-resolver/stability-slot-early.txt−9 tests/type-deferred-resolver/stability-slot-late.txt−9 tests/type-deferred-resolver/store.txt−12 tests/type-deferred/about.txt−3 tests/type-deferred/conflict-src.txt−12 tests/type-deferred/duplicate-src.txt−12 tests/type-deferred/expected.txt−38 tests/type-deferred/face-bad-src.txt−6 tests/type-deferred/face-good-src.txt−6 tests/type-deferred/hole-src.txt−12 tests/type-deferred/local-src.txt−8 tests/type-deferred/missing-src.txt−10 tests/type-deferred/mold-hole-src.txt−12 tests/type-deferred/mutual-src.txt−7 tests/type-deferred/nested-src.txt−7 tests/type-deferred/principal-src.txt−11 tests/type-direct-gate/about.txt−4 tests/type-direct-gate/expected.txt−86 tests/type-direct-gate/source.txt−96 tests/type-empty/about.txt−3 tests/type-empty/dead.txt−7 tests/type-empty/expected.txt−59 tests/type-empty/face-source.txt−2 tests/type-empty/good.txt−11 tests/type-empty/late-cap.txt−16 tests/type-empty/list-dead.txt−4 tests/type-empty/list-live.txt−3 tests/type-empty/list-open.txt−3 tests/type-empty/missing.txt−6 tests/type-empty/overlap.txt−3 tests/type-empty/standard-good.txt−11 tests/type-empty/unit-dead.txt−4 tests/type-full-overlap/about.txt−3 tests/type-full-overlap/child.txt−4 tests/type-full-overlap/distinct.txt−5 tests/type-full-overlap/duplicate-generic.txt−4 tests/type-full-overlap/duplicate.txt−5 tests/type-full-overlap/expected-basic.txt−16 tests/type-full-overlap/expected-graph.txt−8 tests/type-full-overlap/generic.txt−4 tests/type-full-overlap/invalid.txt−4 tests/type-full-overlap/parent.txt−5 tests/type-full-overlap/precedence.txt−5 tests/type-full-overlap/same.txt−4 tests/type-full-overlap/unsupported.txt−4 tests/type-full-overlap/zero.txt−4 tests/type-gate-free/about.txt−1 tests/type-gate-free/expected.txt−9 tests/type-gate-free/todo-gate.txt−40 tests/type-gate-free/todo-noun.txt−40 tests/type-gate-free/todo.txt−40 tests/type-generic-construction/about.txt−9 tests/type-generic-construction/alias-client.txt−12 tests/type-generic-construction/alias.txt−3 tests/type-generic-construction/client.txt−24 tests/type-generic-construction/expected.txt−65 tests/type-generic-construction/no-event-client.txt−8 tests/type-generic-construction/owner-negative.txt−10 tests/type-generic-construction/owner-positive.txt−9 tests/type-generic-construction/sibling-values.txt−4 tests/type-generic-construction/tree-no-event.txt−4 tests/type-generic-construction/tree.txt−6 tests/type-generic-pattern/about.txt−10 tests/type-generic-pattern/client.txt−166 tests/type-generic-pattern/expected.txt−91 tests/type-generic-pattern/no-event.txt−17 tests/type-generic-pattern/owner-bad.txt−22 tests/type-generic-pattern/owner.txt−18 tests/type-generic-pattern/poly-values.txt−2 tests/type-generic-pattern/values.txt−18 tests/type-generic-recursion/about.txt−14 tests/type-generic-recursion/alias.txt−3 tests/type-generic-recursion/bad-constructor.txt−8 tests/type-generic-recursion/bad-match.txt−10 tests/type-generic-recursion/bad-mold.txt−8 tests/type-generic-recursion/bad-parameter.txt−6 tests/type-generic-recursion/chain.txt−3 tests/type-generic-recursion/client.txt−11 tests/type-generic-recursion/expected.txt−35 tests/type-generic-recursion/list-shadow.txt−4 tests/type-generic-recursion/local-distinct.txt−11 tests/type-generic-recursion/local-only.txt−11 tests/type-generic-recursion/local-shadow.txt−11 tests/type-generic-recursion/tree-changed.txt−6 tests/type-generic-recursion/tree.txt−6 tests/type-import-overlap/about.txt−24 tests/type-import-overlap/expected.txt−26 tests/type-import-overlap/source.txt−4 tests/type-import-overlap/sur.txt−17 tests/type-import-structural/about.txt−14 tests/type-import-structural/expected.txt−41 tests/type-import-structural/source.txt−5 tests/type-import-structural/sur.txt−12 tests/type-import/about.txt+2−10 tests/type-import/expected.txt+1−10 tests/type-import/source.txt−5 tests/type-import/sur.txt−3 tests/type-list-alias/expected.txt+4−4 tests/type-page-main/about.txt−3 tests/type-page-main/arbitrary-main.txt−1 tests/type-page-main/blog-api.txt−5 tests/type-page-main/blog-index.txt−9 tests/type-page-main/blog-sur.txt−6 tests/type-page-main/card.txt−5 tests/type-page-main/ctor-page.txt−10 tests/type-page-main/diff-load.txt−11 tests/type-page-main/hand-built-load.txt−14 tests/type-page-main/index.txt−10 tests/type-page-main/indirect-load.txt−11 tests/type-page-main/page-alias.txt−11 tests/type-page-main/posts-mark.txt−6 tests/type-page-main/pure-load.txt−10 tests/type-page-main/static.txt−7 tests/type-page-main/todo-api.txt−13 tests/type-page-main/todo-island.txt−40 tests/type-page-main/typed-load.txt−8 tests/type-page-main/wrong-static.txt−1 tests/type-program-main/about.txt−1 tests/type-program-main/alias-main.txt−11 tests/type-program-main/arbitrary-main.txt−10 tests/type-program-main/consumer.txt−2 tests/type-program-main/gate-data.txt−10 tests/type-program-main/gate-model.txt−11 tests/type-program-main/initializer-consumer.txt−2 tests/type-program-main/initializer-earlier.txt−10 tests/type-program-main/initializer-error.txt−10 tests/type-program-main/initializer-generic.txt−10 tests/type-program-main/initializer-message.txt−13 tests/type-program-main/initializer-missing.txt−9 tests/type-program-main/initializer-model.txt−11 tests/type-program-main/initializer-no-main.txt−10 tests/type-program-main/initializer-subs.txt−10 tests/type-program-main/initializer-tag.txt−13 tests/type-program-main/initializer-unfaced.txt−10 tests/type-program-main/initializer.txt−12 tests/type-program-main/mismatched-model.txt−10 tests/type-program-main/nonempty-subs.txt−12 tests/type-program-main/open-message.txt−7 tests/type-program-main/source.txt−12 tests/type-program-update/consumer.txt−2 tests/type-program-update/malformed-sample.txt−9 tests/type-program-update/missing-list.txt−15 tests/type-program-update/non-main.txt−14 tests/type-program-update/source.txt−15 tests/type-program-update/three-slot-sample.txt−9 tests/type-program-update/unrelated-tag.txt−16 tests/type-program-update/wrong-message.txt−10 tests/type-program-update/wrong-model.txt−12 tests/type-program-update/wrong-result.txt−12 tests/type-program-watch/about.txt−1 tests/type-store/basket.txt−32 tests/type-store/cart.txt−13 tests/type-theme/dark-absent.txt−8 tests/type-theme/missing-field.txt−7 tests/type-theme/source.txt−8 tests/type-theme/wrong-dark.txt−8 tests/type-theme/wrong-font.txt−8 tests/type-theme/wrong-nested-aura.txt−8 tests/type-todo-api/about.txt−1 tests/type-todo-api/expected.txt−17 tests/type-todo-api/negative-expected.txt−26 tests/type-todo-api/negative.txt−12 tests/type-todo-api/source.txt−21 tests/type-todo-api/unsupported.txt−13 tests/type-todo-full/about.txt−3 tests/type-todo-full/alias.txt−42 tests/type-todo-full/ambiguous-mapper.txt−41 tests/type-todo-full/expected.txt−2 tests/type-todo-full/non-gate-view.txt−33 tests/type-todo-full/open-key.txt−40 tests/type-todo-full/wrong-message.txt−40 tests/type-todo-full/wrong-model.txt−40 tests/type-todo-full/wrong-result.txt−40 tests/type-todo-full/wrong-watch.txt−40 tests/type-todo-partial/about.txt−4 tests/type-todo-partial/expected.txt−17 tests/type-union-alias-overlap/duplicate.txt−5 tests/type-union-alias-overlap/expected.txt−25 tests/type-union-alias-overlap/flag-source.txt−7 tests/type-union-alias-overlap/multi.txt−5 tests/type-union-alias-overlap/negative.txt−16 tests/type-union-alias-overlap/nonzero.txt−4 tests/type-union-alias-overlap/opaque.txt−4 tests/type-union-alias-overlap/positive.txt−8 tests/type-union-alias-overlap/qualified.txt−5 tests/type-union-alias-overlap/wrong.txt−5 tests/type-union-source/direct-source.txt−3 tests/type-union-source/duplicate-params.txt−4 tests/type-union-source/duplicate.txt−5 tests/type-union-source/expected.txt−36 tests/type-union-source/free-source.txt−4 tests/type-union-source/good.txt−9 tests/type-union-source/hidden-ref.txt−5 tests/type-union-source/late-source.txt−4 tests/type-union-source/mixed-source.txt−8 tests/type-union-source/nested.txt−4 tests/type-union-source/qualified.txt−4 tests/type-union-source/same.txt−5 tests/type-union-source/shadow-source.txt−7 tests/type-union-source/wide-source.txt−4 tests/type-union-source/wrong.txt−5 tests/type-union-source/zero.txt−5 tools/testdata/lead-late-hoon-reference.hoon−24 tools/testdata/ship-selftest+1−136 tools/testdata/succ-hoon-reference.hoon−9 tools/testdata/zing-hoon-reference.hoon−17 tools/type-cell-branch-test−43 tools/type-closed-gate-guards-test−29 tools/type-constructor-fit-guards-test−29 tools/type-deferred-context-test−31 tools/type-deferred-prepared-test−49 tools/type-deferred-resolver-test−33 tools/type-deferred-test−32 tools/type-direct-gate-test−64 tools/type-empty-test−55 tools/type-full-overlap-test−49 tools/type-gate-free-guards-test−29 tools/type-gate-free-source-test−50 tools/type-generic-construction-test−49 tools/type-generic-pattern-test−52 tools/type-generic-recursion-test−61 tools/type-import-overlap-test−33 tools/type-import-structural-test−36 tools/type-nested-union-guards-test−29 tools/type-page-main-test−86 tools/type-program-init-test−49 tools/type-program-main-test−46 tools/type-program-update-test−46 tools/type-program-watch-test−48 tools/type-request-guards-test−31 tools/type-store-test−41 tools/type-sub-guards-test−31 tools/type-theme-test−44 tools/type-todo-api-test−62 tools/type-todo-full-test−98 tools/type-todo-partial-test−55 tools/type-union-alias-overlap-test−52 tools/type-union-source-test−55
README.md+1−9
@@ -42,15 +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`, `tools/type-import-overlap-test`, `tools/type-import-structural-test`, `tools/type-union-source-test`, `tools/type-union-alias-overlap-test`, `tools/type-full-overlap-test`, `tools/type-generic-recursion-test`, `tools/type-generic-construction-test`, `tools/type-generic-pattern-test`, `tools/type-deferred-test`, `tools/type-deferred-prepared-test`, `tools/type-deferred-resolver-test`, `tools/type-deferred-context-test`, `tools/type-empty-test`, `tools/type-cell-branch-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.
46−
47−The focused `tools/type-page-main-test` fully checks the byte-identical static about page and direct blog/todo data pages through the real readers, with exact main types, downstream imports and fail-closed syntax/evidence controls; the same fixture runs on the fake ship. It does not render pages or execute requests.
48−
49−The focused `tools/type-theme-test` fully checks the byte-identical real theme against the exact prelude mold, including its exported type, structural downstream import, dark absent/present forms and malformed-field negatives under eval with a shared fake-ship arm. It does not check contrast, render themes or route fonts.
50−
51−The focused `tools/type-store-test` checks the byte-identical cart store and basket through detailed and legacy inference, exact main and derived schemes, structural imports, direct store watch evidence and rejection controls under eval with a shared fake-ship arm. It does not lower or execute stores, support multi-action declarations, or permit store requests in page loads.
52−
53−The focused `tools/type-program-main-test` checks the narrow closed, subscription-free `main` slice and its shared fake-ship fixture. `tools/type-program-init-test` checks transactional initializer recovery for a synthetic direct program, including exact exported and imported types and rejection boundaries. `tools/type-program-update-test` checks derived result context for an unannotated two-slot update, including a union/boolean branch, downstream types and fail-closed controls under eval with a shared fake-ship arm. `tools/type-program-watch-test` uses the real todo readers with synthetic program components to check one direct request value against merged API-source evidence and reject hand-built, indirect, parameterized, diff and ambiguous subscriptions. These are static checks only: they do not run an island or establish runtime watching. `tools/type-todo-full-test` additionally checks the byte-identical todo island through both full-module APIs, verifies its exact closed `main` type and structural downstream import, and runs rejection controls.
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.
5446
5547### The doc's examples
5648
docs/README.md−2
@@ -2,8 +2,6 @@
22
33Jibb's spec is a design doc by @iko, [Jibb — an Elm-architecture UI language for Urbit](https://claude.ai/artifact/DMBr48qzi5z8hcwn2ccPBv), and its repository copy in `spec/`. The repository copy records decisions made on 2026-10-30, including dropping `$?`, adding `%$` as a term literal and pattern, making `@` an unrestricted atom, treating `?` as two atoms for union disjointness, and the milestone 2 type and prelude decisions; the Claude document still needs to be synchronized. This folder also holds where the build stands, what is still open, and how to work on the code.
44
5−The current full-module checker also has a narrow static/data-page slice, documented in [compiler.md](compiler.md) and [status.md](status.md). Its shared eval/ship fixture checks the real about, blog index and todo index sources without claiming rendering or request execution. The shared theme fixture likewise full-checks the byte-identical real theme and its exact type without implementing theme behavior.
6−
75| File | What it holds |
86| --- | --- |
97| [spec/](spec/) | The doc's tabs, as Markdown |
docs/compiler.md+5−65
@@ -56,23 +56,13 @@ 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 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. Literal heads compare by their runtime noun, so `|=%$` can construct an explicit null-, loobean-zero- or term-zero-headed case. Equal heads with distinct payloads can be selected when exactly one payload fit is proven; unknown or ambiguous alternatives remain unsupported. 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. Generic unions declared directly inside a body and recursive molds outside the source-proven slices described below 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 and the source-bound gate-sample proof below. For a single recursive gate outside a group, the reporting path repeats inference rather than instantiating its generalized interface inside its own body; a group report uses its stored schemes. This adds work, and the current dependency pass can take quadratic time on long forward chains; the milestone's speed target remains unverified. A separate conservative pass reports unions whose cases are provably disjoint or overlapping and leaves other cases unresolved; it does not claim the mold is checked. Unsupported forms are reported as such, and the partial output says the module has not been checked.
60−
61−A direct unshadowed prelude call can use checked source layouts when a positional argument is a directly named, already inferred root gate. For two-slot function samples, the checker can match a named update against an unnamed generic gate sample without confusing a binder face with a nested record face. Both explicitly named slots must agree; source boundaries are evidence for this fit, not a call-arity rule. The source gate and prelude annotation must be available from their checked bindings. Local or dynamic gates, aliases without direct evidence, recursive or SCC placeholder bodies, other sample shapes and unresolved call-sample variables remain unsupported by this proof. Ordinary inference remains the fallback.
62−
63−The checker retains a per-analysis index of finalized root gates and a prelude source table bound to the entire trusted prepared interface. A dependency screen avoids building the table when the root cannot use it; changing the interface invalidates it. The host remains responsible for supplying a prepared interface paired with its source. The matcher checks each slot and product in both directions with a shared substitution. Before returning its tentative proof it requires both complete call samples to normalize to closed, tag-free types, then repeats every slot check and requires the substitution and fresh-ID counter to remain unchanged. This keeps later argument or enclosing constraints from invalidating an earlier face check, and preserves pending constraints, capital checks and projection evidence. These scans and the bounded second proof add work; they do not establish a global linear-time bound.
64−
65−Before the empty-capital optimization below, single sequential eval runs including startup showed that 2,000 ordinary gates used 70.20 seconds of user CPU at baseline and 70.64 seconds with the cached source table. Fifty unsupported eligible scalar-slot calls used 24.75 and 25.71 seconds, while fifty function-slot failures used 24.15 and 25.36 seconds. Fifty successful calls took 26.56 seconds before the final stability replay and 26.99 seconds with it. These are synthetic measurements, not production performance limits.
66−
67−Restricted-number promotion only applies to written capital variables. If none are present, it returns immediately instead of traversing the environment. In one startup-inclusive pair of runs on 2,000 independent gates, output was byte-identical and user CPU fell from 71.67 to 38.26 seconds; wall time was 72.80 versus 51.66 seconds while other checks were running. This does not establish a bound for dependent modules or a complete-checker benchmark.
68−
69−A bounded source proof can also establish distinct literal heads when a union case is a one-hop application of a uniquely resolved local generic mold. It compares literal runtime nouns and checks the original mold normally before publishing an interface. The same source proof improves the partial report, which still says the mold is not checked. The new proof declines nested or qualified applications, opaque references, recursive-index states, holes and deferred obligations; other valid unions can remain unsupported. A 256-node source budget and a separate 256-entry inherited-state budget apply per attempt. They do not bound the existing pairwise union pass, parsing, atom or name sizes, or downstream checking. Prepared interfaces and inference state remain trusted inputs. `tools/type-union-source-test` and the shared ship guard exercise source resolution, reporting, rollback and these bounds. A separate positive witness can identify overlap in two-field, literal-headed cases when a unique one-hop local, one-parameter generic alias is applied to a concrete primitive payload. It compares the literal noun values and proves the payloads have a shared noun, so an empty or unknown payload is not a witness. The partial report identifies both original case sites. `infer-jibb-file-detailed` returns structured overlap evidence for the first failed mold, including the originating path, exact source, mold name and both case spans. Ordinary Jibb imports preserve a child’s evidence through source and cache checks; the legacy `infer-jibb-file` API remains a text-result adapter and renders both excerpts. Specialized API and prepared-prelude paths retain their existing generic or text-only error boundaries. This witness uses a shared 256-node source/pair budget per attempt; generic-wrapper parameter validation has a separate 256-entry cap. An unsupported earlier case may hide a later overlap. Existing pairwise union analysis, parsing, atom and name sizes, source-excerpt rendering, and downstream checking remain outside these budgets. `tools/type-union-alias-overlap-test` checks the source proof and partial report; `tools/type-full-overlap-test` checks the detailed and legacy full-module paths, source attribution and cache behavior.
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.
7060
7161A 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.
7262
7363String 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.
7464
75−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 loobean literals specialize against a matching singleton by noun, including a proven singleton in a direct union; named loobean singletons do not silently widen to a distinct aura. Open `%f`, other values, and other forks containing loobean singletons remain unsupported; recursive Hoon molds containing flags can also fail closed.
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.
7666
7767A 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.
7868
@@ -90,25 +80,17 @@ A backtick constructs a unit when the supplied prelude has the validated standar
9080
9181A 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.
9282
93−The checked inference fragment represents the empty mold `!!` explicitly. A cell with a proven-empty field is empty, while a gate returning `!!` and the empty values of `(list !!)` and `(unit !!)` remain inhabited. Supported union matches discard proven-empty cases, reject unreachable list or unit payload arms, and require a proof of reachability for fixed opaque cases. A written capital may have an inhabited instance; the existing definition-boundary checks still reject forcing it to a concrete empty type. A directly known standard `(list !!)` permits a single null arm, including in a result context. Unknown and opaque types, other one-arm list subjects, and proofs exceeding their budgets fail closed. Emptiness checks use up to 256 type-node visits per fit or list/unit reachability proof and 4,096 visits when filtering union cases. These bounds do not cover substitution walking, parsing, normalization, source lookup or repeated attempts. This is a supported checking slice, not a proof of arbitrary recursive molds or runtime execution.
94−
9583A 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.
9684
9785A 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.
9886
9987The 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`. Source-proved tagged unions can also be wrapped in Hoon `$~` defaults, including a downstream union using Tlon `epic.saga`; the selected source and projected branches still undergo the same provenance and disjointness checks. The tagged-source helper peels up to four consecutive default wrappers, while default wrappers encountered inside dependency proofs consume the existing semantic-node budget. 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.
10088
101−An import-free Jibb library can export an opaque single-parameter recursive identity when its source has exactly two distinct term-tagged cases: a text leaf and a node containing `(list (name M))`, optionally with one `$-(@t M)` event field. A module-local index records the exact parsed source, defining path and prepared prelude interface; it is shared across that module's inference passes, and its canonical `list` must be source-backed. The normal resolver publishes an interface only after all ordinary mold and value checks succeed. Same-origin aliases retain the defining identity and independently instantiate type arguments; distinct origins remain unsupported. The opaque identity is conservatively treated as gate-bearing for numeric defaulting, and gate-freedom remains unknown. Explicit literal-headed construction uses a source-proven one-layer view: the event result receives the existing type argument and recursive children keep the defining identity. It consumes the existing shared 256-step recursive inference budget, and a per-view 4,096-visit guard bounds the new face and substitution scan; longer scans decline. These bounds do not cover parsing, existing inference, atom sizes or repeated attempts. One startup-inclusive, shared-load comparison of 100 valid and 100 invalid source definitions took 29.67 s wall / 25.14 s user CPU before this slice and 33.47 s / 26.99 s with it; the former declined all 200 while the latter inferred the valid definitions. These single runs are not a production benchmark. Matches over explicit source tags, flat binder or wildcard fields, and nonbinding catch-alls use that same one-layer view and existing binder, coverage and branch checks. Up to 128 arms are screened per attempt; longer matches decline. A single-arm match on a direct in-scope wing can report its missing case, and a contextual one-arm call subject can use a nonbinding catch-all. Recursive children retain their nominal type and arguments. Subject recognition and view validation can each scan substitutions, and the scan cap applies separately to each attempt. In one separate startup-inclusive comparison of 100 valid and 100 invalid source matches, the construction-only checker took 30.18 s wall / 29.31 s user CPU and declined all 200, while the pattern slice took 28.28 s / 27.69 s and inferred or diagnosed them. These single shared-load figures are not production benchmarks. General structural fits, whole-case binders, nested recursive patterns, uncontextualized single-arm call subjects, recursive source with imports and local recursive molds remain unsupported; the test tree does not prescribe the eventual `element` representation. Caller-supplied detached interfaces and caches retain the existing trusted-input contract.
102−
10389Self-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.
10490
10591The 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.
10692
107−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` 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, core or proven union-overlap 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.
108−
109−For supported source-aware Hoon `$?` unions, the reader can prove a definite overlap by independently evaluating and projecting the original cases, verifying each projected head against its source tag, and finding a shared runtime noun in a pair. Its positive witness traverses faces, named nodes, forks, cells, supported atom forms and `*`; `!!`, opaque references, applications and unproved aura intersections cannot themselves establish a witness. It compares singleton noun values independently of aura, and requires inhabited positions throughout a cell. Unknown or exhausted proof remains unsupported, while existing disjoint-source recovery still handles proven distinct cases. The source screen admits at most 128 cases and 4,096 raw noun nodes; dependency checking and the pair/type witness each have their own 4,096-node budget. Hoon evaluation, projected-graph validation, chapter lookup, atom byte sizes and other type-graph walks remain outside those budgets. The error points at the Jibb use; source case locations are unavailable. This is a partial named-reader analysis, not general imported-union checking or a mark-reader overlap diagnostic.
110−
111−In single startup-inclusive runs of eight Hoon reads, a benign three-case union used 37.78 seconds of user CPU with the earlier narrow witness and 39.99 seconds with the structural witness; a repeated-head union used 39.84 and 40.97 seconds. Other checks ran concurrently, so these measurements do not establish a production bound.
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.
11294
11395The 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.
11496
@@ -120,40 +102,12 @@ For a unique supported declaration, `+api-request-parts` retains that evidence w
120102
121103`+api-support-analysis-source` additionally infers supported ordinary API molds and values, resolves every declared mark, and retains their source, dependency and path evidence. Unsupported helpers or marks fail closed. An unused `/-` core is not independently validated, ordinary definitions that need derived gates remain unsupported, and this result is not a checked API interface or an exported request.
122104
123−The ordinary import resolver can infer derived request-gate types for multiple supported API paths. A case may take one typed path parameter before its reply gate, or one diff fold after the reply; a case with both, multiple parameters or diffs, or a separate scry path remains unsupported. Each reply maps the full mark type to a fresh `M` and the request result is `(ask M)`. Checked ordinary API values and molds, declared mark molds and a supported poke constructor are exported too. Every selected `/sur` core must have a directly used, successfully read mold; unselected core bindings are not independently validated, and Jibb module imports remain unsupported in this API fragment. The unchanged todo API fits this fragment.
124−
125−A call whose direct result is a known named generic union can receive a matching same-origin, same-arity result context before its arguments are inferred. This retains the ordered generic arguments and existing capital checks; pending tags, recursive or variable-bound origins and unrestricted atom cases remain conservative. Constructor fitting reports unsupported when an unresolved or opaque case could contain the requested tagged head. It keeps definite missing-case errors for proven nonmatching cases, including an explicitly atom-only faced head. The real todo callback `|=%got` can infer when an `(ask msg)` result context fixes its message union; the uncontextualized call remains unsupported.
126−
127−A two-item tuple with an explicit term, null or loobean head can receive payload context from a known union when every alternative is a literal-headed cell and its head noun is unique. The payload must be a direct wing-headed call, optionally grouped, with literal, wing or constructor arguments. The checker first retains the original inference if it already fits; otherwise it tries the contextual path once and fits the selected case and enclosing union. It declines this path if any substitution has a structural root, because a caller may have walked away variable provenance. Duplicate heads, opaque competitors and other shapes also stay conservative. The guard scans the substitution for each eligible tuple and may perform one extra shallow inference; it does not guarantee globally linear work. This lets an explicitly typed todo subscription body infer; it does not check an island or prove request watchability.
128−
129−`+gate-free-type` is a separate three-way proof over normalized checker types: it reports a gate-free result, a gate-bearing witness with its field path, or unknown. It tracks conservative inhabitance before reporting a gate in a cell, spends one shared node budget, and treats opaque recursion, open variables, unknown collection forms and `*` conservatively. Source-proven `qath` and the recognized list/unit representations have dedicated proofs. `+gate-free-mold-source` parses and resolves one named mold with a fresh active-root graph, retaining the complete prepared prelude, source bundle, trusted reader inputs, dependency cache and inferred mold. It caps classification at 256 nodes; parsing, import resolution and type inference are not covered by that cap. The host must canonicalize paths and bind trusted sources and reader results to their versions. API, store and private roots decline; other definitions and unused imported Hoon bindings are not fully checked. This is mold analysis, not a module, kind, island, watchability or runtime check, and it does not infer general gate-free constraints.
130−
131−A full ordinary module may export a narrow checked program `main` only as a direct, unqualified `(program init update view subs)` call with four simple wing arguments, modulo transparent grouping. The canonical prepared prelude must supply both the `program` value and mold. The ordinary source-backed program fit and all normal mold, value and request-graph checks complete first. The inferred `main` must be closed and invariantly match an instantiated `program` mold from that prelude. The initializer must have a closed gate scheme; its data and model contain no open variables and share the existing 256-node gate-free budget, with `%yes` required for both. The named subscription gate may syntactically return null through transparent casts, groups and definition-free bodies. Alternatively, after a successful request-graph merge, it may return one singleton list containing an unfaced `[%watch request]` pair whose request is a direct `case.face` call with one direct constructor callback. The face must resolve to an imported interface whose member has the exact plain derived-request scheme. Exactly one merged request evidence must match its API path and case, agree with the declaration's inner name, and appear in that interface's own graph; the interface source must equal the evidence's API source. The declaration must have no scry, diffs or path parameters. Pure or hand-built requests, helpers, aliases, re-exports, typed paths, folds, multiple subscriptions and missing or ambiguous evidence fail closed. Arbitrary or aliased mains, API/store kinds, and gates or unknowns in data/model also fail closed. This retains source and graph evidence and permits ordinary downstream imports; it neither executes the program nor implements runtime watching.
132−
133−The same post-inference, post-request-graph kind boundary accepts a static `main` by instantiating its ordinary scheme, fitting it to canonical `(element !!)`, requiring the specialized result closed, and publishing that closed canonical scheme. Thus `main view` works when `view` is generic only in its element message. A data page must instead be a direct `(page load view)` call with simple wing arguments and a closed main type invariant against the instantiated canonical `page` mold. Its named load must be a direct gate whose transparent body is exactly `case.face reply`, with a simple wing or direct constructor reply. Page loads and direct program watches share the exact plain derived-member/request-evidence check: unique evidence in the selected interface's own graph, matching API source and inner case name, no typed path segments, diffs or scry. Page aliases, indirect or hand-built/pure/unknown requests, other main types and store paths fail closed. These are interface checks only, not rendering or runtime request claims.
134−
135−A store `main` is recognized only as a direct, unqualified `(store init update)` call with two simple wing arguments, modulo grouping, independently of its directory. Its module must declare exactly one ordinary `state` mold and one `+$ poke` whose body is one unqualified reference to a local ordinary action mold. The declaration is removed before ordinary mold/value inference and is not exported. `+store-main-closed` checks the canonical closed store main, exact init/state equality, and an invariant `$-([action state] state)` update after erasing only the two outer binder faces. It deliberately performs no gate-free-state check. The direct form can recover a missing main from checked components; aliases and hand-built records cannot.
136−
137−The store interface adds a derived `$-(action poke)` constructor and a generic `$-($-(state M) (ask M))` state request after validating the exact internal `poke` and `ask` representations. Derived names must not collide with values, imports or other derived names. Store request certificates are distinct from API certificates and retain the exact store path, source, state and action identities across graph merges. `+derived-store-request-member` requires the selected interface's unique state member and action constructor to match freshly derived canonical schemes and the same certificate to occur in both interface and consumer graphs. Store state is watchable by definition only after those checks; page loads continue to accept API evidence alone. Multi-action declarations, lowering and execution are outside this slice.
138−
139−When only that program's initializer and `main` are unresolved, a bounded transactional retry can derive the initializer's expected gate from the resolved update, view and subscription components. It instantiates all schemes above the greatest variable ID in the module and prelude, reuses the source-backed positional fit and stable replay, and leaves only the initializer's data variable open. The named initializer must be a direct gate whose transparent body is a tuple ending in null. Its own sample fixes data; ordinary inference, product and whole-gate fits, pending-tag and finalization checks, and a fresh ordinary `main` inference must all succeed before the ordinary kind and graph checks publish anything. Aliases, non-main libraries, simultaneous unresolved subscriptions, nonempty subscriptions and unrelated pending tags decline.
140−
141−A component-local recovery sequence handles a recognized direct program whose context-dependent definitions cannot resolve ordinarily. Update first derives its result from its inferred two-slot sample and canonical `cmd`/`list` templates. Subscription recovery then checks the same message/model relation and the canonical fourth slot. A narrow keyed-view proof finds exactly one direct `each (turn xs mapper)` site, derives the mapper from the actual `each` and `turn` schemes, and recovers the view before the existing initializer and ordinary `main` retries. Every recovered scheme must be closed and freshly allocated above the current environment and prelude IDs. A source screen skips doomed ordinary attempts only for this keyed shape and never skips final `main` inference; non-gate views and aliases decline without crashing. Final publication still requires all module definitions, the program-mold and gate-free checks, and request-value watchability.
142−
143−Canonical `element` composition has two tightly scoped accommodations. Recursive result context is allowed only when every recursive side has the prepared prelude's `element` origin. When ordinary list-item fitting fails, an `element` target may instead prove its message argument invariantly or select one exact literal case with a full payload fit; a successful ordinary fit always takes precedence. This covers the unchanged todo's union controls and raw constructors without opening those paths to other unions. `tools/type-todo-full-test` checks the byte-identical island through both full APIs, the exact closed `main` type, structural downstream import, and model/message/mapper/watch rejection controls. It does not execute Jibb or implement runtime watching.
144−
145−Each case's canonical API identity and source-derived schema travel across imports in a nonrecursive graph certificate containing the exact source bundle, prelude, reserved scope and trusted reader results. Cached interfaces must match those inputs and cannot hide an active ancestor; unknown legacy entries are rebuilt from their unique supplied source. Request-bearing closures are limited to 256 paths and requests. Closed gate samples can also fit when an unnamed input slot corresponds to a named one, provided products are identical and nested value faces and ambiguous cell tails remain intact. This is type inference only: request lowering, runtime schema validation and value watchability proofs are not implemented.
146−
147105`+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.
148106
149−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`, `lent`, `zing`, `flop`, `rear`, `drop`, `skim`, `skip`, `murn`, `join`, `snip`, `levy`, `lien`, `cork`, `corl`, `cury`, `curr`, `lead`, `late`, `trip` and `tuba`; 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 private comparison, arithmetic and text-conversion schemes for the Jibb-written `gth`, `add`, `dec`, `trip` and `tuba` wrappers. 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. The Jibb-written `lth`, `gte` and `lte` gates compose the source-backed `gth` and `not` gates; supported calls infer a shared atom constraint and return `?`. Their execution and jet recognition await the backend. The source-backed `add` and `dec` wrappers use private arithmetic interfaces whose shared atom variable excludes loobeans; the partial checker preserves that constraint through supported inference and prints `where A is an atom other than ?`. The partial checker resolves the supported `poke` source shape, preserves its public name, and rejects ordinary imports of the private internal path. The Jibb-written `lent` recursively counts a list using `add`; the partial checker infers its generic list argument and `@ud` result. Its execution and jet recognition remain unverified until the backend exists. The Jibb-written `zing` concatenates homogeneous lists in order using `weld`; the checker infers `(list (list A))` to `(list A)`, including for gate elements. Hoon `zing` also accepts heterogeneous noun lists, which this type does not express. `tools/hoon --raw -f tools/testdata/zing-hoon-reference.hoon` compares an equivalent Hoon recursion with Hoon `zing` on selected finite inputs; it does not execute Jibb or verify lowering or jet recognition. The Jibb-written `lead` and `late` are curried pair constructors: `((lead a) b)` returns `[a b]`, while `((late a) b)` returns `[b a]`. The checker infers independent argument types and accepts gates as ordinary values; neither helper invokes an input gate. A Hoon translation is compared with Hoon’s helpers by `tools/hoon --raw -f tools/testdata/lead-late-hoon-reference.hoon`. This does not execute Jibb or verify lowering or jet recognition. 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, complete `ask` and `pure` checking, 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.
107+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 private comparison and arithmetic schemes for the Jibb-written `gth`, `add` and `dec` wrappers. 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. The source-backed `add` and `dec` wrappers use private arithmetic interfaces whose shared atom variable excludes loobeans; the partial checker preserves that constraint through supported inference and prints `where A is an atom other than ?`. Length and primitive execution remain unavailable. 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, complete `ask` and `pure` checking, 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.
150108
151109`+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.
152110
153−The prepared interface includes the source-backed UI molds and constructors, the full nonrecursive `element` union, and the exact `program` and `page` records and builders. Its element union erases nested child, keyed-item and table payloads to `*`, while public constructor schemes retain typed composition and independent key parameters. `types-prelude-ui` checks those schemes and selected valid and invalid compositions. A child-message mismatch currently fails closed as an unsupported list-item constraint rather than a definite mismatch diagnostic. Raw-constructor encapsulation, duplicate-attribute checks, rendering, navigation, storage and execution remain outside this slice.
154−
155−The prepared interface also includes the exact documented `theme` mold. Full checking covers the unchanged real `/ui/theme.jibb`, its exact exported record and a structural downstream import, with dark absent/present and field/type rejection controls. The documented present dark record uses explicit backtick unit syntax, as the Decisions tab records; there is no theme-specific inference exception. This is type checking only: contrast validation, theme rendering and routing remain unimplemented.
156−
157111And the design notes:
158112
159113| Note | Says |
@@ -165,7 +119,7 @@ And the design notes:
165119
166120Source-backed `like` maps the product of an existing `(like A)` result while retaining its position and remaining input. The partial checker infers supported positional calls by peeling only known sample-slot faces, retaining faces belonging to values; ambiguous variable-bound spines and nested face loss remain unsupported. Backend execution remains outstanding.
167121
168−The internal prelude defines transparent `(ask M)` cases for pure, agent and store requests; the public prelude re-exports it and defines `pure` in Jibb. Preparation supplies the private module with `list.core` and `unit.core` only from validated canonical public templates. If a template is unavailable, an isolated check validates the private molds, but only molds independently inferred against the actual available templates enter the interface. The partial checker infers supported constructors and exhaustive matches; absent versus present-zero state remains distinguishable. Agent and store receiver fields carry raw nouns and cannot prove schema validity or watchability. The public prelude also defines the documented `sub` union in Jibb; supported watch payloads retain the public `(ask M)` type. A `sub` value is not itself proof that its request is watchable. Generated decoders, source-bound runtime validation, request lowering, other derived request shapes and island watch checks remain unfinished. Public prelude preparation is partial: consumers must verify that `ask` was actually exported with its source origin.
122+The internal prelude defines transparent `(ask M)` cases for pure, agent and store requests; the public prelude re-exports it and defines `pure` in Jibb. Preparation supplies the private module with `list.core` and `unit.core` only from validated canonical public templates. If a template is unavailable, an isolated check validates the private molds, but only molds independently inferred against the actual available templates enter the interface. The partial checker infers supported constructors and exhaustive matches; absent versus present-zero state remains distinguishable. Agent and store receiver fields carry raw nouns and cannot prove schema validity or watchability. Generated decoders, source-bound runtime validation, derived request gates, `sub` and island watch checks remain unfinished. Public prelude preparation is partial: consumers must verify that `ask` was actually exported with its source origin.
169123
170124Public identity aliases of private generic unions retain their public name when the origin, arity and argument order match exactly, including through imported values. Fixed, reordered, repeated and phantom generic aliases remain unsupported where a safe public name cannot be recovered; a fixed nongeneric alias is not printed as though it accepted type arguments.
171125
@@ -207,17 +161,3 @@ Note 4 has examples of each.
207161## Speed
208162
209163Starting `urbit eval` and building the library takes about 8 s. A 2,000-line module of 400 definitions then parses in about a second. Loops over definitions, arms, lines and items are tail calls, so a long module grows no stack; nesting costs a few stack frames a level, and 100,000 nested brackets still parse (note 3).
210−
211−The experimental deferred constructor path can close a small import-free library transaction when ordinary resolution stalls. It retries definitions whose earlier attempts failed from their original states, retaining only successful attempts. A transaction with at most 64 definitions makes at most 4,096 attempts; it stops after a pass with no progress. This bounds the new attempt count, not each attempt's parsing, type walks or ordinary inference. Deferred definitions are restricted to simple one-component wings, literals, static strings, gates, transparent groups and empty bodies, calls, casts and a restricted boolean branch. Each successful call or cast fit must have exactly equal normalized operands so later substitutions cannot invalidate a face check. A multi-argument call also needs closed argument, sample and product types because positional face checks depend on slot boundaries and whether the result can be a cell. Other fits fail closed. A 512-node screen bounds visited expression nodes and a separate 512-node scan bounds each stability check; neither bounds mold shapes, string-piece checks, parsing, normalization, lookup, or total repeated inference. It accepts only a direct constructor callback with a closed input, records its pending fit under the source-owned inference state, and generalizes each definition against the live environment and pending constraints. Before publication it discharges and replays every edge, rejects unresolved tags or changed replay state, and checks that all molds and values are complete. The reporter reads the committed schemes for definitions added by the transaction. API and store paths, `main`, prepared-prelude recovery, imports, recursive groups, unresolved holes or written capitals, and new projection actions remain outside this full-module path. `%grec` in the constraint or freshness scan is conservatively unsupported. This is not an island-kind, runtime, or watchability check.
212−
213−An expected cell type can supply context to both arms of a loobean branch. This slice first retains any ordinary inference that already fits. Otherwise it retries from the original state only when a syntax screen excludes nested branches, casts, gates and local bodies, and a substitution screen excludes structural bindings. Both arms must fit, their normalized results and the expected type must be closed, their result types must match, and both fits must replay without changing the final substitution or fresh-ID counter. A successful retry retains the original arm type and its written faces; a failed retry returns the original inference result. The source and substitution screens each visit at most 512 entries. This permits at most one extra attempt for an eligible branch; the screens do not bound preexisting inference, type walks, list construction, or work across separate analyses.
214−
215−In an isolated diagnostic with the real todo API and reader inputs, this cell context allowed the original update body to infer when its result type was written explicitly and experimental source-defined text helpers were supplied. The unchanged island still needs those text helpers, an actual source-backed `program` and UI interface, context propagation across definitions, island-kind checking and watchability proof. This branch change itself provides no runtime implementation or watchability evidence.
216−
217−A deferred boolean branch must use both distinct literal loobean patterns. Its subject is unified with `?`; the arms are inferred in source order without contextual retry. Equal normalized arm types are retained directly. When both written arms are direct literals that each created their own unbound pending tag, the checker can instead retain two source-owned fit obligations to a shared, monomorphic result variable. A later definition may close that variable; replay uses the ordinary literal fit, requires a closed atomic target or a union of direct constant/cell cases, and rejects faced targets and faced union cases. It replays all edges under the final substitution without adding bindings or fresh IDs. This does not support deferred list literals, union-pattern reachability, arbitrary branch expressions or prepared-prelude/imported modules. It does not establish request watchability.
218−
219−With the caller's unchanged prepared prelude, the partial report can also recover a narrow import-free, non-main ordinary library initializer. A direct tuple literal may retain one source-owned fit obligation for each newly created pending literal until a later exact result cast closes them. A separate bounded candidate screen admits a direct tuple even without a constructor call. The prepared transaction requires exact agreement among the supplied interface, value inventory and reserved molds, and retains the API, store, import and `main` exclusions. It only adds recovered entries to the partial report: the ordinary full-module resolver does not publish them. Wrong unit or draft fields, unrelated pending tags and mold-name collisions fail closed; without the later final cast, the initializer remains not checked. This does not add list-literal deferral or import-aware recovery.
220−
221−Before the no-prepared-prelude fallback, the checker screens the already parsed source for a direct single-constructor call beneath groups, gates, casts or bodies without local definitions. The screen visits at most 64 AST nodes per definition and rejects sources with more than 64 definitions or 65,536 bytes. A transaction is attempted at most once per resolver or report invocation and holds at most 64 pending edges. These limits do not bound the initial parsing, ordinary resolution, normalization, or total work across separate analyses. On the pre-recursive-index snapshot, startup-inclusive synthetic 1,000-gate comparisons had baseline/candidate user times of 25.97/29.30 seconds and 26.30/27.46 seconds in reverse order. These are limited shared-load measurements, not production benchmarks. The trimmed source-backed and direct-guard fixture passed in 28.13 seconds wall and 27.53 seconds user on one run after screening; its cases include parse-success checks in the same transaction source pass. The outer resolver and reporter each parse independently, and a fallback currently parses the source again.
222−
223−A single sequential, startup-inclusive comparison against checkpoint `c96597d` measured user CPU for an unrelated stalled library at 25.04 seconds baseline and 26.32 seconds with the screened fallback; an incompatible constructor took 25.72 and 27.16 seconds; a direct constructor that the baseline declined and the candidate resolved took 24.46 and 26.79 seconds. These are small shared-load measurements, not a production benchmark. The screen was separately checked with a trapping fallback: the unrelated source skipped it, while the eligible conflicting source reached it.
docs/development.md−72
@@ -14,8 +14,6 @@ From the plan's Setup and ground rules, and from @iko:
1414- **Push straight to `master`.** @iko reviews work in the project's chat, not in pull requests, so there are none. Run the checks below first.
1515- **Keep docs/ current**: [status.md](status.md) when a milestone moves, [open-questions.md](open-questions.md) when a question is settled or found.
1616
17−The source-backed generic-union guard can be run under eval with `tools/type-union-source-test`; its `test-union-source` arm is also assembled for the fake ship. It checks a bounded partial inference slice, not general union completeness. `tools/type-union-alias-overlap-test` exercises the separate positive overlap witness and its shared ship test arm. `tools/type-full-overlap-test` checks structured full-module overlap evidence and the legacy error text under eval; both of its test arms are assembled for the fake ship.
18−
1917## Setting up a machine
2018
2119The tools need Python 3 and `urbit` (vere) on `PATH`; the ship tools also need a fake `~zod` and click. Everything so far ran with vere 4.6 on Linux.
@@ -64,11 +62,6 @@ git clone https://github.com/urbit/tools /root/src/tools
6462| `tools/importer-test` | Compares the partial Hoon importer's diagnostic trees and errors with `tests/importer/tree.txt` under `urbit eval` |
6563| `tools/type-import-default-test` | Compares default-wrapped union source proofs and adversarial cases under eval; the same golden runs on the ship |
6664| `tools/type-import-test` | Composes the Hoon importer with the partial checker and compares `tests/type-import/expected.txt` under eval |
67−| `tools/type-import-overlap-test` | Checks source-aware Hoon union overlap, provenance and proof-budget controls under eval; the same fixture runs on the ship |
68−| `tools/type-import-structural-test` | Checks multi-case and nested Hoon union overlap witnesses under eval and on the ship |
69−| `tools/type-union-source-test` | Checks bounded local generic-alias disjointness and state guards under eval and on the ship |
70−| `tools/type-union-alias-overlap-test` | Checks source-backed generic-alias overlap witnesses under eval and on the ship |
71−| `tools/type-full-overlap-test` | Checks structured full-module overlap evidence and imported-source attribution |
7265| `tools/type-tlon-test` | Runs the real Tlon presence source through the importer and partial checker, comparing `tests/type-tlon/expected.txt` under eval |
7366| `tools/type-import-diagnostic-test` | Compares the structured reader diagnostic bridge report under eval |
7467| `tools/type-mark-test` | Checks the partial checker’s mark import boundary against `tests/type-mark/expected.txt` under eval |
@@ -77,37 +70,10 @@ git clone https://github.com/urbit/tools /root/src/tools
7770| `tools/type-api-evidence-test` | Runs source, scope, reader-result and declaration-watchability evidence guards under eval and on the ship |
7871| `tools/type-hole-guards-test` | Runs the shared hole-defaulting and API interface guards under eval; the same checks run on the ship |
7972| `tools/type-list-alias-test` | Runs the shared prelude list-alias and provenance guards under eval and on the ship |
80−| `tools/type-generic-recursion-test` | Checks source-backed generic recursive identity and provenance under eval and on the ship |
81−| `tools/type-generic-construction-test` | Checks source-backed one-layer recursive construction, provenance and fuel under eval and on the ship |
82−| `tools/type-generic-pattern-test` | Checks source-backed recursive patterns, catch-all coverage, state and per-attempt fuel/arm limits under eval and on the ship |
83−| `tools/type-deferred-test` | Checks the bounded source-owned deferred inference transaction under eval and on the ship |
84−| `tools/type-deferred-resolver-test` | Checks deferred resolution, report consistency and atomic failure under eval and on the ship |
85−| `tools/type-deferred-context-test` | Checks deferred source order and literal branch contexts under eval and on the ship |
86−| `tools/type-deferred-prepared-test` | Checks prepared-prelude tuple initializer recovery, exact partial reports and fail-closed guards under eval and on the ship |
87−| `tools/type-cell-branch-test` | Checks closed-cell branch context, rollback and bounded retry screens under eval and on the ship |
8873| `tools/type-generic-alias-test` | Runs public/private generic union alias and provenance guards under eval and on the ship |
8974| `tools/type-positional-face-guards-test` | Runs positional-call and nested-face guards under eval and on the ship |
9075| `tools/type-qath-guards-test` | Runs source-provenance, recursive unfolding and face guards under eval and on the ship |
91−| `tools/type-todo-partial-test` | Reports partial inference of the unchanged todo island through the real API and readers under eval and on the ship |
92−| `tools/type-todo-api-test` | Exercises the actual todo API through the real Hoon readers and partial checker |
93−| `tools/type-direct-gate-test` | Checks a synthetic source-backed program report and direct gate provenance under eval and on the ship |
94−| `tools/type-page-main-test` | Fully checks byte-identical static and direct data pages through real readers, exact main types, downstream imports and rejection guards under eval and on the ship |
95−| `tools/type-theme-test` | Fully checks the byte-identical real theme, its exact exported type, structural downstream import, dark absent/present forms and rejection guards under eval and on the ship |
96−| `tools/type-program-main-test` | Checks the narrow closed subscription-free program-main interface, downstream import and rejection guards under eval and on the ship |
97−| `tools/type-program-init-test` | Checks transactional direct-program initializer recovery, exact exported/imported types and fail-closed boundaries under eval and on the ship |
98−| `tools/type-program-update-test` | Checks transactional direct-program update result recovery, union/boolean context, exact exported/imported types and fail-closed boundaries under eval and on the ship |
99−| `tools/type-program-watch-test` | Checks direct singleton request-value watchability against merged real-todo evidence, exact types/imports and rejection boundaries under eval and on the ship |
100−| `tools/type-store-test` | Checks the unchanged cart/basket through detailed and legacy inference, exact store/derived schemes, structural imports, source-bound state watch evidence and rejection guards under eval and on the ship |
101−| `tools/type-todo-full-test` | Fully checks the byte-identical todo island through real readers, exact main type, structural downstream import and rejection controls under eval and on the ship |
102−| `tools/type-closed-gate-guards-test` | Checks closed gate sample labels and face uncertainty under eval and on the ship |
103−| `tools/type-constructor-fit-guards-test` | Checks constructor-case uncertainty and known mismatches under eval and on the ship |
104−| `tools/type-nested-union-guards-test` | Checks nested tagged-union case selection and uncertainty under eval and on the ship |
105−| `tools/type-empty-test` | Checks source-backed empty molds, inhabitedness, coverage and proof budgets under eval and on the ship |
106−| `tools/type-gate-free-guards-test` | Checks bounded gate-free verdicts, inhabitation and witness paths under eval and on the ship |
107−| `tools/type-gate-free-source-test` | Checks source-backed todo mold analysis through the real readers under eval and on the ship |
108−| `tools/type-sub-guards-test` | Checks source-backed subscription mold dependencies under eval and on the ship |
10976| `tools/type-ask-guards-test` | Runs ask origin and canonical list/unit bootstrap guards under eval and on the ship |
110−| `tools/type-request-guards-test` | Runs request evidence, source consistency and cache provenance guards under eval and on the ship |
11177| `tools/type-proj-guards-test` | Runs projection evidence, name-scope and dependency guards under eval and on the ship |
11278| `tools/type-arithmetic-guards-test` | Runs restricted atom-variable, unification and projection guards under eval and on the ship |
11379| `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 |
@@ -125,15 +91,9 @@ git clone https://github.com/urbit/tools /root/src/tools
12591
12692```
12793tools/golden # all cases pass
128−tools/golden --case types-prelude-ui # exact UI/program/page schemes and composition
12994tools/importer-test # Hoon importer fixture projections match
13095tools/type-import-default-test # default-wrapped source proofs match
13196tools/type-import-test # importer/checker bridge golden report matches
132−tools/type-import-overlap-test # source-aware Hoon overlap and provenance controls
133−tools/type-import-structural-test # nested and multi-case Hoon overlap controls
134−tools/type-union-source-test # local generic-alias union guards
135−tools/type-union-alias-overlap-test # local generic-alias overlap diagnostics
136−tools/type-full-overlap-test # full-module overlap evidence
13797tools/type-tlon-test # real Tlon importer/checker report matches
13898tools/type-import-diagnostic-test # direct structured reader diagnostics match
13999tools/type-mark-test # mark/checker bridge golden report matches
@@ -145,42 +105,12 @@ tools/type-list-alias-test # prelude list-alias guards pass
145105tools/type-generic-alias-test # generic union alias guards pass
146106tools/type-positional-face-guards-test # positional sample face guards pass
147107tools/type-qath-guards-test # qath source and unfolding guards pass
148−tools/type-todo-partial-test # unchanged todo partial report and reader failure controls
149−tools/type-todo-api-test # real todo API partial inference and reader guards pass
150−tools/type-direct-gate-test # direct gate source and provenance guards pass
151−tools/type-page-main-test # static/data pages, exact types, imports and rejection guards pass
152−tools/type-theme-test # real theme, exact type, structural import and rejection guards pass
153−tools/type-program-main-test # closed program-main interface and rejection guards pass
154−tools/type-program-init-test # transactional direct-program initializer context guards pass
155−tools/type-program-update-test # transactional direct-program update context guards pass
156−tools/type-program-watch-test # direct request-value watchability guards pass
157−tools/type-store-test # unchanged cart/basket, store evidence and rejection guards pass
158−tools/type-todo-full-test # byte-identical full todo, downstream import and rejection guards pass
159−tools/type-generic-recursion-test # source-backed recursive identities and provenance
160−tools/type-generic-construction-test # source-backed recursive construction and bounds
161−tools/type-generic-pattern-test # source-backed recursive patterns and bounds
162−tools/type-deferred-test # source-owned deferred inference guards
163−tools/type-deferred-resolver-test # resolver consistency and failure guards
164−tools/type-deferred-context-test # deferred source-order and branch guards
165−tools/type-deferred-prepared-test # prepared initializer reports and failure guards
166−tools/type-cell-branch-test # contextual branch rollback and bounds
167−tools/type-closed-gate-guards-test # closed gate fit guards pass
168−tools/type-constructor-fit-guards-test # constructor fit guards pass
169−tools/type-nested-union-guards-test # nested union selector guards pass
170−tools/type-empty-test # empty mold and uninhabited-case guards pass
171−tools/type-gate-free-guards-test # bounded gate-free classifier guards pass
172−tools/type-gate-free-source-test # real todo mold analysis and source guards pass
173−tools/type-sub-guards-test # subscription source guards pass
174108tools/type-ask-guards-test # ask source and bootstrap guards pass
175−tools/type-request-guards-test # request evidence and cache guards pass
176109tools/type-proj-guards-test # projection evidence and scope guards pass
177110tools/type-arithmetic-guards-test # arithmetic constraint guards pass
178111tools/type-module-scope-test # module/prelude scope golden report matches
179112tools/hoon check-spans-test # prints <<>>
180113tools/hoon itype-unify-test # type-unification controls pass
181−tools/hoon -f tools/testdata/zing-hoon-reference.hoon # Hoon translation agrees on four inputs
182−tools/hoon -f tools/testdata/lead-late-hoon-reference.hoon # Hoon translation agrees on selected inputs
183−tools/hoon -f tools/testdata/succ-hoon-reference.hoon # Hoon translation agrees on selected inputs
184114tools/testdata/selftest # 22 checks, 0 failed
185115tools/doc-blocks docs/spec # every jibb block has its case
186116tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
@@ -232,5 +162,3 @@ Write `source.jibb` and `about.txt` by hand, run `tools/golden --update --case <
232162## Commits
233163
234164A short subject in the imperative, then a body that says what changed and why, wrapped at 72 columns, as in `git log`. Each commit leaves every check passing.
235−
236−`tools/type-deferred-test` exercises the bounded, source-owned constructor transaction and low-level freshness/replay guards. `tools/type-deferred-resolver-test` checks the experimental import-free library resolver, report consistency, atomic failure, and that both source orders of a late face constraint decline. `tools/type-deferred-prepared-test` checks the separate partial-report-only prepared-prelude route, direct tuple-literal obligations, exact report types and its wrong-field, unrelated-tag, mold-collision and no-final-cast controls. These checks do not establish island-kind or watchability support.
docs/open-questions.md−2
@@ -64,8 +64,6 @@ Found while writing [prompts/milestone-2.md](prompts/milestone-2.md), checking i
6464
656533. **Settled: watching a request with unknown provenance.** On 2026-10-31, @iko said an island may watch a request only if the checker proves it watchable at compile time. An unknown request, including one built or passed through a gate without sufficient evidence, is rejected rather than deferred to a runtime check.
6666
67−34. **Settled: constructors and equal noun literals.** On 2026-10-31, @iko said expressions with the same runtime representation count as equal, and cases that cannot be distinguished at runtime are rejected at compile time. Thus `|=%$` matches a case headed by `%$`, `%.y` or `~`: each is the noun 0. Cases with equal heads and overlapping payloads cannot coexist in a union.
68−
6967## Grammar questions never put to the doc's author
7068
7169In milestone 1 the parser met about thirty places where the doc could be read more than one way. Twelve went to @iko on 2026-10-30 and are rows of the Decisions tab. These were not asked. For each, the parser follows the reading below, and some are marked "(doc question)" in the library's notes. None changes what a valid program means, except where a reading makes something an error.
docs/prelude-inventory.md+5−13
@@ -6,13 +6,7 @@ The source is the fake ship's `%base` `/sys/hoon.hoon` (Hoon version 135), read
66
77The 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. The internal prelude also defines a transparent generic `ask` with pure, agent and store cases; the public prelude re-exports it and defines `pure`. Supported source construction and matching infer, while derived requests, source-schema validation and execution remain unfinished.
88
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 public prelude also declares `sub`; the partial checker infers supported constructions, while request watchability and execution remain outstanding.
10−
11−The public prelude now defines the UI `length`, `align`, `role`, `tone` and `attr` molds, a nonrecursive generic `element` union with one case per UI node, and the exact `program` and `page` records with their builders. Nested child, keyed-item and table payloads in the runtime union are erased to `*`; the public constructors retain typed children and independent key types, and `island` stores `[program data]` in its erased payload. The focused `types-prelude-ui` golden infers the complete union and constructor schemes, including static and message-bearing composition. Raw-constructor encapsulation, duplicate-attribute rejection, rendering, storage, navigation and execution are not established by this slice.
12−
13−The public prelude defines the approved generic `store` record `[init=S update=*]` and its builder, whose update argument is `$-([A S] S)` while the result exposes only `S`. Focused store coverage checks both exact schemes, the unchanged cart's closed main and derived state/action gates, and downstream structural imports. Store declaration checking and watch evidence are implemented; multi-action declarations, lowering and runtime execution are not.
14−
15−The public prelude also defines the exact `theme` mold: three space cords, five normal tone cords, `wide`, `lang` and `zone` cords, `(unit qath)` for `font`, and a unit containing the same five dark tone cords. The shared `type-theme` fixture fully checks the byte-identical real theme and its structural downstream import, including dark absent/present and malformed-field negatives. It does not implement contrast checking, rendering, routing or any other theme behavior.
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 checking and the remaining request support.
1610
1711Hoon `+$` 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.
1812
@@ -20,7 +14,7 @@ Hoon `+$` arms are marked **mold** below; `++` arms can be gates, doors or mold
2014
2115`add`, `dec`, `div`, `dvr`, `gte`, `gth`, `lte`, `lth`, `max`, `min`, `mod`, `mul`, `sub`.
2216
23−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. The public `add` and `dec` gates are written in Jibb over private primitive interfaces. The partial checker infers a shared atom type that excludes loobeans, including through supported generic calls. The Jibb-written `lth`, `gte` and `lte` gates compose `gth` and `not`; supported calls infer a shared atom constraint and return `?`. Primitive execution and jet recognition remain unfinished.
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. The public `add` and `dec` gates are written in Jibb over private primitive interfaces. The partial checker infers a shared atom type that excludes loobeans, including through supported generic calls. Primitive execution and jet recognition remain unfinished.
2418
2519## 1c
2620
@@ -32,7 +26,7 @@ The source-backed `gth` gate calls a compiler-supplied private comparison interf
3226
3327`biff`, `bind`, `bond`, `both`, `clap`, `clef`, `drop`, `fall`, `flit`, `hunt`, `lift`, `mate`, `need`, `some`.
3428
35−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 and jet recognition remain outstanding for all of 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.
3630
3731| Name | Hoon behavior | Jibb status |
3832| --- | --- | --- |
@@ -55,7 +49,7 @@ The following is an audit of the Hoon 135 bodies, not a completed Jibb interface
5549
5650`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`.
5751
58−The current prelude writes `snoc`, `lure`, `flop`, `join`, `lent`, `zing`, `levy`, `lien`, `murn`, `rear`, `reel`, `roll`, `skim`, `skip`, `snip`, `turn` and `weld`. `lent` counts items by recursion and `add`; `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`, `lent`, `zing`, `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. `zing` concatenates homogeneous lists in order; Hoon’s raw `zing` can also flatten heterogeneous noun lists, which this Jibb type does not express. A Hoon translation agrees with Hoon `zing` on selected finite inputs; this is not Jibb execution. Backend validation and jet recognition remain outstanding for all of them.
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.
5953
6054## 2c
6155
@@ -105,7 +99,7 @@ The current prelude writes `snoc`, `lure`, `flop`, `join`, `lent`, `zing`, `levy
10599
106100`aftr`, `cork`, `corl`, `cury`, `curr`, `fore`, `head`, `same`, `succ`, `tail`, `test`, `lead`, `late`.
107101
108−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. `succ` increments an atom through `add`; the partial checker infers a shared atom type excluding loobeans. A Hoon translation agrees with Hoon on ten selected inputs; Jibb execution and jet recognition remain unverified. `lead` and `late` are curried pair constructors: `((lead a) b)` returns `[a b]`, and `((late a) b)` returns `[b a]`. Their arguments may have independent types, including gate values, and neither constructor invokes a gate. The partial checker infers their polymorphic types. A Hoon translation agrees with Hoon’s helpers on selected inputs, but this is not Jibb execution; lowering and jet recognition remain to be validated by a backend.
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.
109103
110104## 2o
111105
@@ -168,8 +162,6 @@ The compiler-result `tone.hoon` has the three cases listed above; the qualified
168162
169163`at`, `cass`, `cuss`, `crip`, `mesc`, `runt`, `sand`, `sane`, `ruth`, `trim`, `trip`, `teff`, `taft`, `tuba`, `tufa`, `tuft`, `wack`, `wick`, `woad`, `wood`.
170164
171−The prelude writes `trip` and `tuba` over private primitives. Their inferred types are `$-(@t (list @tD))` and `$-((list @tD) (list @c))`, matching the target ship's Hoon 135 definitions. Composition with `lent` and invalid argument controls pass in the partial checker; primitive lowering, execution and jet recognition remain unfinished.
172−
173165## 4k
174166
175167`co`.
docs/prompts/milestone-2.md+3−3
@@ -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. The source-backed internal module defines `poke`, `ask` and `qath`; the public prelude re-exports them as ordinary transparent types that modules can construct and inspect, as questions 24 and 25 record. Their current representations and partial checker support are described in `docs/compiler.md`.
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.
@@ -75,7 +75,7 @@ The rules are scattered across the tabs. This is a map of them, not a replacemen
7575
7676**Tags, `~`, numbers and cells wait for their context** (Grammar: Tag resolution, Literals by context)
7777- A tag or `~` gets a fresh variable and a pending constraint, checked once unification fixes the variable: against a union's cases, by shape and shared tag positions, or as a constant atom for `@tas`, `@ta`, `@` or `*`. A literal that matches nothing is "an error naming the union, such as "msg has no case %submitt"".
78−- `|=%typed` is a case's constructor: "against `$-(@t M)` it is `|=(t [%typed t])`, requiring `M` to have a case `[%typed @t]`. A literal case head matches by noun value, so `|=%$` also matches `%.y` and `~` heads; a bare tag is always a value."
78+- `|=%typed` is a case's constructor: "against `$-(@t M)` it is `|=(t [%typed t])`, requiring `M` to have a case `[%typed @t]`. It works for cases tagged at their head; a bare tag is always a value."
7979- A variable constrained by tag resolution, and any it mentions, doesn't generalize; it stays open until something in the module fixes it. An island's `main` fixes its messages. A tag constraint still open when the module is checked is an error asking for a `^-`; the checker never guesses. Gate-free constraints are retained when generalized.
8080- "Wing access, changes and `?-` on a type not yet known wait the same way." A change with no items, `m()`, is an error; the parser still accepts it. Patterns don't wait: they're checked against the subject's type.
8181- Number and cell literals each "takes a default when its `++` is checked": a number `@ud`, a cell a tuple. But "A number takes `@ud` only if nothing fixes its aura and its `++` isn't generic over it", so `++ inc |= n=A (add n 1)` stays generic: unlike a tag's, a number's variable doesn't stop its `++` from generalizing. A cell can also become a record or, where a list is expected, a cons.
@@ -121,7 +121,7 @@ The rules are scattered across the tabs. This is a map of them, not a replacemen
121121- 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."
122122
123123**Errors**
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 case with an equal literal 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.
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.
125125- 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.
126126- "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.
127127- Messages name things in the doc's words and quote the code they're about in backticks, as milestone 1's do. Their wording is fixed by the golden tests once written.
docs/spec/decisions.md+3−4
@@ -24,7 +24,7 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
2424| Several open brackets | The deeper lines go to the last bracket, or the last rune's body, left open on a line, and the brackets before it close with it: `(column ~ ~[` needs no `)` | Decided 2026-10-30 |
2525| Jibb code blocks | Labelled `jibb` in this doc; each is a golden test | Decided 2026-10-30 |
2626| Definitions | `++` for values, `+$` for molds; no `=/` | Decided |
27−| 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; constructor heads and case disjointness compare literal noun values regardless of spelling, so `%$`, `%.y` and `~` are equal and overlapping cases are errors; 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-31 |
27+| 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 |
2929| 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 |
@@ -65,7 +65,7 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
6565| Page loading | `load` maps route parameters, `~` for none, to one `ask` or `pure`; pages render per request from a fresh scry of the path, or of its case's scry path; nothing is watched or kept | Decided 2026-10-29 |
6666| Compile targets | Nock on the ship, JavaScript in the browser | Decided |
6767| Optimizer | Basic lowering; holes later | Decided 2026-10-29 |
68−| Island `update` | In the browser; returns the model and a list of commands, which the runtime processes one at a time in list order | Decided 2026-11-02 |
68+| Island `update` | In the browser | Decided |
6969| Island `init` | Takes the page's data, returns the model | Decided 2026-10-29 |
7070| Island rendering | `view` re-runs on model changes; a keyed diff patches the DOM; holes later | Decided 2026-10-29 |
7171| Data crossing to the browser | No gates in island data or models | Decided 2026-10-29 |
@@ -73,12 +73,11 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
7373| Transactions | None; one poke per command | Decided |
7474| Reloads | Restart from the model the page is served with | Decided 2026-10-29 |
7575| 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 |
76−| Store builder | `+$ store |$ [S] [init=S update=*]`, with `++ store |= [init=S update=$-([A S] S)] ^- (store S) [init update]`: the builder checks action `A`, while `main` exposes only state `S`; the store kind check verifies `A` against the poke declaration | Decided 2026-11-01 |
7776| 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 |
7877| 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 |
7978| 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 |
8079| Responsive layout | `stack` switches at the theme's `wide` | Decided 2026-10-29 |
81−| Theme | A prelude mold with every token required: spaces, five tones with `normal` and `background`, language, zone, `wide`, and an optional static font; optional values such as dark tones use explicit backtick unit syntax; 4.5:1 contrast enforced | Decided 2026-11-01 |
80+| Theme | A prelude mold with every token required: spaces, five tones with `normal` and `background`, language, zone, `wide`, and an optional static font; 4.5:1 contrast enforced | Decided 2026-10-29 |
8281| Dark mode | Hand-written dark tones under `dark`, used when the reader prefers dark | Decided 2026-10-27 |
8382| 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 |
8483| Data layer | Hoon's nouns: units, treaps, loobeans | Decided |
docs/spec/grammar.md+1−1
@@ -141,7 +141,7 @@ A mold is only a type: never called on a noun, and with no default. Types are in
141141A tag literal or `~` gets a fresh type variable and a pending constraint: the variable must become a union with a matching case, or an atom type the term fits. A mold that isn't a union counts as a union of one case, for tags and for `|=%tag`: `[%go "x"]` fits `+$ go [%go url=@t]`, and `|=%typed` works against `$-(@t M)` when `M` is `[%typed text=@t]`. Once unification fixes the variable, each constraint is checked against the union's cases or, for `@tas`, `@ta`, `@` or `*`, makes the tag that constant atom. A literal that matches nothing is an error naming the union, such as "msg has no case %submitt".
142142
143143- A constraint records the literal's shape, such as `[@t %draft]`, and matches cases by shape and shared tag positions; a literal in a field position is checked against that field.
144−- `|=%typed` is a case's constructor: against `$-(@t M)` it is `|=(t [%typed t])`, requiring `M` to have a case `[%typed @t]`. It works for cases whose head is a literal with the same noun as the tag, regardless of how that literal is written: `|=%$` also constructs a case headed by `%.y` or `~`, since each is the noun 0. A bare tag is always a value.
144+- `|=%typed` is a case's constructor: against `$-(@t M)` it is `|=(t [%typed t])`, requiring `M` to have a case `[%typed @t]`. It works for cases tagged at their head; a bare tag is always a value.
145145- A variable constrained by tag resolution, and any it mentions, doesn't generalize; it stays open until something in the module fixes it. An island's `main` fixes its messages, so islands resolve their own tags. The inferred gate-free constraint is retained when a type variable is generalized.
146146- A constraint still open when its module is checked is an error asking for a `^-`; the checker never guesses. Library helpers can cast, as in `^- (list attr)`.
147147- Wing access, changes and `?-` on a type not yet known wait the same way.
docs/spec/implementation-plan.md+1−1
@@ -73,7 +73,7 @@ For milestone 6. An island is one loop over one model: events become messages, `
7373- **Messages** come from controls, command replies, facts, timers and `%url`. *Proposed*: an island handles them one at a time, in arrival order.
7474- **Rendering**: a message changes the model when `update` returns a different noun; `view` then re-runs and a keyed diff patches the DOM. An unchanged model renders nothing. *Proposed*: the patch lands before the next message, so a crash in `view` belongs to one message.
7575- **Controls**: after every event, the control that fired is reset to the latest view, even when the model didn't change. A field's text is rewritten only when it differs from the screen, which keeps the caret and any IME composition.
76−- **Commands**: an update may return several commands. The runtime processes them one at a time, in list order, after the patch. Each reply arrives later as a new message, never inside the `update` that sent it.
76+- **Commands**: each reply arrives later as a new message, never inside the `update` that sent it. *Proposed*: commands run in list order, after the patch.
7777
7878| Control | Sends | When |
7979| --- | --- | --- |
docs/spec/overview.md+2−4
@@ -152,8 +152,6 @@ Loads and renders run in Nock.
152152 [%url reply=$-(path M)]
153153```
154154
155−An island's `update` returns `[model (list (cmd M))]`, so one message may produce several commands. The runtime processes the returned commands one at a time, in list order. A store's `update` consumes exactly one poke with the current state and returns the next state.
156−
157155- `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.
158156- 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`.
159157- 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 checker must prove a request is watchable; unknown watchability is also a type error. 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.
@@ -165,7 +163,7 @@ Inputs send a message per `input` event, and one per IME composition, so validat
165163
166164- `init` runs on the ship with the page's data and returns only the model, jammed into the page; the browser resumes from it at start. A reload starts from the model the page is served with.
167165- A crash in `update` drops the message, keeps the model and shows the standard notice.
168−- Stores share state between a page's islands. A store module, written like an API file, has `state`, `+$ poke` and `++ main (store init update)`, where `update` applies a poke. The store's `+$ poke` is a declaration, not a mold. The builder is `+$ store |$ [S] [init=S update=*]` with `++ store |= [init=S update=$-([A S] S)] ^- (store S) [init update]`: it checks action `A`, while `main` exposes only state `S`; the store kind check verifies `A` against the declaration. Islands import it with `/=` and use its derived gates: a constructor per poke type, and `(state.cart |=%got)`, whose first fact is the current state and each later fact the next.
166+- Stores share state between a page's islands. A store module, written like an API file, has `state`, `+$ poke` and `++ main (store init update)`, where `update` applies a poke. The store's `+$ poke` is a declaration, not a mold. Islands import it with `/=` and use its derived gates: a constructor per poke type, and `(state.cart |=%got)`, whose first fact is the current state and each later fact the next.
169167- A store runs in the browser from its `init` when its first island starts, and lasts as long as the page. Islands keep what they watch in their own models.
170168- An app is a page whose view is one island under a catch-all route; its `load` passes the path with `pure`. The island's `%url` subscription delivers the path at start and after every change, back and forward included. `go` pushes history, and `go` or `link` within the section changes the island without a reload. Focus then moves to the new view's first heading, which screen readers announce.
171169
@@ -218,7 +216,7 @@ The theme, `++ theme` in `/ui/theme.jibb`, uses the prelude's `theme` mold, with
218216 lang="en"
219217 zone="UTC"
220218 font=`%/static/fonts/inter.woff2
221− dark=`[tones=[normal="#eee" background="#111" accent="#4c9" danger="#f28b82" muted="#aaa"]]
219+ dark=[tones=[normal="#eee" background="#111" accent="#4c9" danger="#f28b82" muted="#aaa"]]
222220```
223221
224222Style attributes compile to atomic classes in one stylesheet built from the theme, so islands can't compute a missing class. `[%chars n]` and `[%fill n]` become inline styles.
docs/status.md+12−114
@@ -1,6 +1,6 @@
11# Status
22
3−As of 2026-11-01. 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| --- | --- | --- |
@@ -23,71 +23,21 @@ The parser accepts `_` in mold positions and typed path segments, retaining each
2323
2424On 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.
2525
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. Construction and matching for 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.
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.
2727
28−The checker also recognizes a limited source-proven generic recursive tree in an import-free defining module. Its nominal identity retains the defining path, mold name and type arguments, including across supported imports and aliases. With a known expected type it can construct supported tagged cases by checking one source-proven layer at a time. Flat matches with explicit tags or nonbinding catch-alls also work for these source-proven trees, as does a missing-case diagnostic for a supported single-arm match. At most 128 arms are screened per attempt; whole-case binders and nested patterns remain unsupported. Broader pattern matching, general structural fits and gate-free proof remain unsupported; this is not yet the prelude's `element` implementation or island checking. The source index uses fixed-shape checks during mold collection. Each construction or supported pattern attempt has 256 unfolding steps and at most 4,096 face and substitution visits per scan; pattern subject recognition and view validation can each scan separately. Parsing, other inference and retries remain outside those limits. A single startup-inclusive comparison of 1,000 ordinary gates produced identical reports and used 29.12 seconds of user CPU before the shared-resolver refactor and 28.55 seconds after it, with other work running; it is not a general performance bound.
28+The internal prelude defines a transparent generic `ask` with pure, agent and store cases, re-exported alongside the Jibb-written `pure` gate. The partial checker infers supported constructors and exhaustive matches. Agent and store receivers operate on raw nouns; their fields do not prove schema validity or watchability. Derived requests, checked decoding, runtime validation, `sub` and island watch checking remain unimplemented.
2929
30−A bounded local source proof recognizes a narrow class of generic-alias union cases with different literal heads, then applies the ordinary mold checks. Nested or qualified aliases and several open states remain unsupported, including a valid alias used during the deferred transaction; the partial report states that the mold itself has not been checked. `tools/type-union-source-test` exercises the source and state bounds and failure paths under eval and on the ship. A separate bounded witness now reports proven collisions between supported literal-headed aliases, with both original case sites; unknown payload intersections still decline. The detailed full-module result now carries the first failed mold’s source-bound overlap evidence, including through ordinary Jibb imports; the legacy text result renders both case excerpts. Specialized API and prelude paths remain limited. The shared guards pass under eval and on the ship.
30+The API path analyzer can retain its source, complete prepared prelude, reader results and resolved dependencies as evidence, and classify a unique declaration as watchable, not watchable or unknown. It does not yet prove the provenance of request values or check island subscriptions. Prepared artifacts and reader results remain trusted host inputs.
3131
32−The checker can experimentally discharge a narrowly scoped direct-constructor constraint while resolving an import-free library without a prepared prelude. It preserves independent generalized schemes and publishes only after all source molds, values, and recorded constraints close. API/store paths, `main`, imports, prepared preludes, recursive groups, open constraints, projection actions, and `%grec` in the constraint graph remain unsupported by this route. The fallback also declines source shapes outside its bounded direct-call screen. It does not yet typecheck the unchanged todo island or establish watchability.
33−
34−A prepared-prelude partial report can recover a narrow import-free, non-main ordinary library initializer by deferring source-owned literals in a direct tuple until a later exact result cast. The prepared interface and declared-name inventories must agree exactly. API/store paths, `main` and imports remain excluded, and the ordinary full-module resolver does not publish the recovered interface. Wrong field types, unrelated tags and mold collisions fail closed; a no-final-cast control remains unchecked. `tools/type-deferred-prepared-test` checks the exact recovered types and unchanged `partial inference; module not checked` disclaimer under eval and on the ship. List-literal deferral and import-aware recovery remain unsupported.
35−
36−Closed cell context can now flow through a bounded loobean branch while preserving the inferred value faces and original failed-inference behavior. Open or structurally uncertain substitutions and nested retry shapes remain unsupported. This does not by itself provide the remaining cross-definition context or complete island-kind and watchability checks needed by the unchanged todo island.
37−
38−The internal prelude defines a transparent generic `ask` with pure, agent and store cases, re-exported alongside the Jibb-written `pure` gate. The partial checker infers supported constructors and exhaustive matches. Agent and store receivers operate on raw nouns; their fields do not prove schema validity or watchability. The public prelude now defines the documented source-backed `sub` union; supported `%watch` payloads retain the public `(ask M)` type. Constructing a `sub` does not prove that its request is watchable. Request lowering, checked decoding, runtime validation and general island watch checking remain unimplemented; the separate direct-program proof below covers only one narrow static value shape.
39−
40−The public prelude now contains the source-backed UI length/attribute molds, all element constructors, and exact program/page records and builders. The full 19-case generic `element` union is nonrecursive: nested child, keyed-item and table payloads are `*`, while public constructor schemes preserve typed composition and independent key types. `island` returns `(element !!)` with `[program data]` as its erased payload. The focused UI golden checks exact schemes, static and message-bearing composition, concrete programs/pages/islands, malformed inputs and selected mismatches. A child-message mismatch fails closed as an unsupported constraint. Raw-constructor encapsulation, duplicate-attribute checks, rendering, storage, navigation and execution are not claimed.
41−
42−The public prelude now defines the exact documented `theme` record, including required text tokens, an optional `qath` font and optional dark tones. A shared eval/ship fixture fully checks the byte-identical `my-app/ui/theme.jibb`, checks its exact exported type and structural downstream import, and covers absent dark tones plus wrong nested auras, missing fields and wrong font/dark types. On 2026-11-01, @iko chose explicit backtick syntax for present units, and the documented dark record now uses it. No contrast check, rendering, routing or other theme behavior is implemented.
43−
44−Known same-origin generic-union result context can now constrain a call before its arguments are inferred. An unresolved or opaque constructor target stays unsupported rather than producing a definite mismatch; proven missing tags still report errors. A todo request with explicit `(ask msg)` context can infer `|=%got`; its uncontextualized form remains unsupported. A two-item literal-headed tuple can receive payload context from a known union of uniquely headed literal cells when its payload is a shallow wing-headed call with literal, wing or constructor arguments. Existing inference takes precedence when it fits; otherwise the checker tries the contextual path once. It conservatively declines that path when any substitution has a structural root, as well as for duplicate or opaque competitors. The guard scans substitutions per eligible tuple and may add one shallow inference; no global linear-time bound is claimed. This allows an explicitly typed todo subscription body to infer, but does not check the island or prove request watchability.
45−
46−A separate source-backed analysis can prove one named mold gate-free, report a definite gate with a field path, or return unknown. It retains the prepared prelude, source bundle, reader results and resolved imports; the actual todo model proves gate-free, while a callback field reports its path and `*` remains unknown. Its classifier is capped at 256 nodes, not the surrounding parse and import work. API, store and private roots are unsupported, and the artifact does not check a module or island, infer generalized constraints, or prove watchability.
47−
48−The partial checker can also match a directly named, checked root gate against a generic gate sample in a direct, unshadowed source-backed prelude call. It uses the written two-slot sample layouts to preserve nested record faces, then requires the complete call samples to be closed and tag-free and repeats the fit under the final substitution. The proof falls back to existing inference for unavailable or ambiguous source layouts, local or dynamic gates, aliases, recursive placeholders and open generic caller types. It preserves written-capital checks and projection evidence; it does not add `program`, check islands or prove request watchability. Prepared prelude source and interface remain a trusted pair.
49−
50−A narrow full-module path now checks direct four-wing `(program init update view subs)` definitions named `main`. It requires the canonical prepared `program` value and mold, reuses ordinary source-backed program fitting, and publishes only after all ordinary module and request-graph checks. The inferred `main` must be closed and invariantly match the instantiated `program` mold. Initializer data and model must be closed and gate-free with `%yes` verdicts inside a shared 256-node budget. `subs` may syntactically return null through transparent forms, or one direct imported request watch after the request graph merges. The latter is only an unfaced two-item `[%watch (case.face |=%callback)]` singleton: the imported member must have the exact plain derived-request scheme, a unique merged request must match the API path and both case names and occur in the interface's own graph, the API source must be identical, and scry, diffs and parameters must be absent. Pure or hand-built values, helpers, aliases, re-exports, typed paths, folds, multiple watches and unknown or ambiguous evidence remain rejected. Checked interfaces retain source evidence and support ordinary downstream imports; no program execution or runtime watching is claimed. A transactional extension can recover a direct initializer whose transparent tuple body ends in null when update, view and subs are already resolved. It derives the expected gate through the ordinary positional program fit with fresh IDs and stable replay, then re-infers the actual initializer and `main` under all ordinary finalization and kind checks. Non-main libraries, aliases, nonempty or simultaneously unresolved subscriptions, and unrelated pending tags remain rejected.
51−
52−Static and direct data-page `main` checking now completes the unchanged about page, blog index and todo index through the real Hoon readers. Static generic element mains specialize to closed canonical `(element !!)`; direct pages require a closed invariant `page` type and a direct plain derived-request load. Page loads reuse the strict source/member/evidence identity checks used by program watches, rejecting aliases, indirect/hand-built/pure/unknown requests, typed paths, diffs and store paths. The shared eval and ship fixture asserts exact main types and structural downstream imports. Rendering, runtime loading and request execution remain unimplemented.
53−
54−The prelude now has the approved `store` mold and action-checking builder. Direct two-wing store mains infer after removing the single local `+$ poke` declaration from ordinary molds and values; the final kind check requires one closed state mold, a direct local action reference, exact init/state and update relations, and no gate-free-state restriction. Stores export their ordinary state/action molds plus derived poke and state-request gates, never the poke declaration. Separate source-bound store certificates prove only the actual imported state member watchable; API evidence checks and page-load rejection remain intact. The unchanged cart and basket pass detailed and legacy checking with exact mains, derived schemes and structural imports, including non-keyed view and null-sample initializer recovery. Multi-action declarations, lowering and runtime execution remain unsupported.
55−
56−The component-local program recovery now covers update, subscriptions, one direct keyed `each`/`turn` mapper and its view, then the existing initializer and ordinary `main` path. Each recovered scheme is closed and freshly allocated; a keyed source screen avoids repeated doomed ordinary attempts without skipping final `main`, and non-gate views decline safely. Canonical `element` recursion and exact singleton-case list fits are narrowly guarded, with successful ordinary fits taking precedence. The byte-identical unchanged todo now passes both detailed and legacy full-module checks with an exact closed `main` type and structural downstream import. Wrong models, messages, results, mappers, keys, aliases, non-gate views and watches fail closed. This is static checking only: no Jibb execution or runtime watching is claimed.
57−
58−The API path analyzer can retain its source, complete prepared prelude, reader results and resolved dependencies as evidence, and classify a unique declaration as watchable, not watchable or unknown. This remains declaration evidence rather than proof about an arbitrary request value. The narrow direct-program check above composes it with final value syntax, resolved imports and merged evidence for one plain request. Prepared artifacts and reader results remain trusted host inputs.
59−
60−For a unique supported path declaration, the request-parts analysis derives ordered typed path parameters, a full-state reply sample and a fold type for one diff mark. Multiple diffs and unsupported or ambiguous evidence fail closed. By itself it does not create request gates or establish watchability of values.
32+For a unique supported path declaration, the request-parts analysis derives ordered typed path parameters, a full-state reply sample and a fold type for one diff mark. Multiple diffs and unsupported or ambiguous evidence fail closed. It does not yet create callable request gates or establish watchability of values.
6133
6234A separate supporting-definition analysis infers supported ordinary API molds and values and resolves all declared marks, retaining their source and dependency evidence. It fails closed on unsupported helpers or marks; unused `/-` cores are not independently validated, and definitions depending on derived gates remain unsupported. This does not check or export the whole API.
6335
64−Ordinary imports can infer derived request-gate types for multiple supported API paths. A case may take one typed segment before the reply or one diff fold after it; the unchanged todo API's plain, typed and diff requests infer, including a named closed fold. Checked ordinary API definitions, mark molds and a supported poke constructor are exported. Each `/sur` core must have a directly used, successfully read mold; unselected bindings are not independently validated. Jibb module imports, scry paths, multiple parameters or diffs and a parameter together with a fold remain unsupported. Source-qualified request evidence and exact trusted graph inputs survive transitive imports and cached interfaces, while stale or ambiguous evidence fails closed. This is a type-only interface: request execution, schema validation and proof that a request value is watchable remain unimplemented. In one loaded-machine run, the real-todo eval took 195.83 s wall and 67.83 s user CPU; the prior prototype took 111.81 s wall and 64.60 s user. Both include Hoon compilation and reader setup and overlapped other work, so they are not isolated checker benchmarks.
65−
6636The Hoon reader's tagged-union source proof also handles `$~` default wrappers. A shared eval and ship golden exercises the unmodified Tlon `epic.saga` mold as a named payload in a labeled downstream extension, alongside overlap, recursive, shadow and malformed-wrapper controls. The tagged-source helper peels at most four consecutive defaults; defaults inside dependency proofs spend the existing semantic-node budget. Other unverified nested unions and dependencies remain unsupported.
6737
68−The repository spec records the subsequent type-system and prelude decisions, including the chosen `like` result-mapping gate; 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 private comparison and arithmetic schemes to the Jibb-written `gth`, `add` and `dec` wrappers; ordinary imports cannot access them. The public `add` and `dec` wrappers use private arithmetic interfaces; supported inference preserves the shared atom constraint that excludes loobeans. Primitive execution, jet recognition and length remain unfinished. 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 by itself create requests or check an API module. Ordinary imports additionally infer the supported multi-path request-gate types described above. Complete private module checking, other API shapes, request lowering, root API and kind checking, stores, complete `ask` and `pure` checking 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. Literal singleton heads compare by runtime noun, so `|=%$` also matches explicit null- and loobean-zero-headed cases. When equal heads have disjoint payloads, the constructor selects a uniquely proven compatible payload; unknown and ambiguous candidates remain unsupported. 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 agreed shared-type `clap`; supported calls infer, while backend validation remains outstanding, and [prelude-inventory.md](prelude-inventory.md) is a source audit, not the complete inventory or signatures. The milestone remains unfinished.
69−
70−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`, `turn` and `lent`. 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. The source-only `+prepare-prelude` rejects empty, malformed, conflicting or import-bearing source; `+prepare-prelude-with-internal` also accepts the supported private internal import. Prepared values are trusted and must come unchanged from the matching preparation arm. When canonical public list or unit templates are missing or altered, independently inferred private molds remain available, while molds that depend on those templates do not. 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.
71−
72−The prelude has a Jibb-written `succ` gate that increments through `add`; partial inference retains its arithmetic atom constraint. A Hoon translation agrees with Hoon on ten selected inputs. Jibb execution and jet recognition remain unverified.
73−
74−The prelude has Jibb-written curried `lead` and `late` pair constructors, inferred with independent argument types including gate values. Their focused golden passes under eval and on the ship, and a Hoon-reference comparison covers operand order. Jibb backend execution remains unverified.
75−
76−The prelude also has a Jibb-written `zing` that concatenates homogeneous lists via `weld`. Its focused golden infers empty, nested text, ship, generic and gate-element lists and reports a non-list error; the same golden passes on the ship. A Hoon translation agrees with Hoon `zing` on selected finite inputs, not on Jibb execution. Hoon’s raw helper additionally accepts heterogeneous noun lists, which the Jibb signature does not express. Backend lowering and jet recognition remain unverified.
77−
78−The experimental deferred constructor transaction conservatively declines general structural tuple fits, most branches, field reads, nonidentical successful call/cast fits, and multi-argument calls with open argument, sample or result types. This prevents a later substitution from invalidating an earlier face-propagation check; cases requiring deferred structural fits remain unsupported. It can retry source definitions after later dependencies become available, and a two-arm boolean branch can retain separately owned literal-result obligations until a later closed context resolves them. Faced targets or union cases, list literals and general union-pattern branches remain unsupported.
79−
80−The checked inference slice now represents `!!`, proves empty cell positions and filters proven-empty union cases. List and unit payload arms whose elements are empty are rejected as unreachable; fixed opaque cases fail closed when reachability is unknown. The new shared guard covers checked interfaces, partial diagnostics and proof budgets. Its shared guard runs under eval and on the ship.
81−
82−An eval and ship fixture now reports partial inference for the unchanged todo island with its real API and Hoon readers. It verifies that the source fixtures match `my-app` and exercises missing or duplicate imports; the report does not claim the module or island has been checked. The prelude also has a Jibb-written recursive `lent` whose supported generic calls infer `@ud`. Execution and shape-based jet recognition remain future backend work. Nested union tests check equal runtime nouns, different nested tags, empty fields and unknown inhabitation.
83−
84−The prelude now writes `lth`, `gte` and `lte` in Jibb using `gth` and `not`. Supported generic and concrete calls infer, including loobeans; mismatched explicit auras fail. Execution, jet recognition and complete import checking remain unfinished.
85−
86−The prelude also writes `trip` and `tuba` over private primitives, with inferred cord, tape and UTF-32 list types matching the target ship's Hoon 135 definitions. Their composition with `lent` and invalid argument controls pass under eval and on the ship; primitive lowering, execution and jet recognition remain unfinished. In the unchanged todo report, `update` now reaches its remaining branch-context limitation instead of failing on missing text names.
87−
88−The Hoon reader can prove overlaps among supported original `$?` source cases, including nested cells and unions with more than two cases, and report them at a Jibb use site. It evaluates each case independently and compares runtime noun values. Other overlaps, Hoon case locations and mark-reader overlap diagnostics remain unfinished. The source screen allows at most 128 cases and 4,096 source noun nodes; dependency checking and pairwise witness analysis each have a separate 4,096-node budget. These budgets do not bound chapter lookup, Hoon evaluation or graph walks.
38+The repository spec records the subsequent type-system and prelude decisions, including the chosen `like` result-mapping gate; 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 private comparison and arithmetic schemes to the Jibb-written `gth`, `add` and `dec` wrappers; ordinary imports cannot access them. The public `add` and `dec` wrappers use private arithmetic interfaces; supported inference preserves the shared atom constraint that excludes loobeans. Primitive execution, jet recognition and length remain unfinished. 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, complete `ask` and `pure` checking, 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 agreed shared-type `clap`; supported calls infer, while backend validation remains outstanding, and [prelude-inventory.md](prelude-inventory.md) is a source audit, not the complete inventory or signatures. The milestone remains unfinished.
8939
90−Restricted-number promotion now skips an environment scan when a definition has no written capitals. In a single startup-inclusive pair on 2,000 independent gates, output was identical and user CPU fell from 71.67 to 38.26 seconds; wall time was 72.80 versus 51.66 seconds with other checks running. This is a partial-inference measurement, not a complete checker or a bound on dependent modules.
40+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. The source-only `+prepare-prelude` rejects empty, malformed, conflicting or import-bearing source; `+prepare-prelude-with-internal` also accepts the supported private internal import. Prepared values are trusted and must come unchanged from the matching preparation arm. When canonical public list or unit templates are missing or altered, independently inferred private molds remain available, while molds that depend on those templates do not. 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.
9141
9242## Milestone 1: parser and mark
9343
@@ -105,8 +55,8 @@ What the plan asks for, and where it is:
10555
10656Besides the plan's list:
10757
108−- 660 golden cases: 440 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.
109−- The 660-case corpus passed under `urbit eval` in 101.8 s while other checks were running. The fake ship passed all 715 tests, including the source-overlap, structural-overlap, generic-union source and alias-overlap, full-module overlap, deferred-context, generic-recursion, generic-construction, generic-pattern, deferred-inference, empty-mold and cell-branch fixtures, importer, importer/checker and mark/checker bridges, module scope, unification, hole, qath, ask, default-wrapper importer, projection, arithmetic, generic-alias, positional-face, API-evidence, request, closed-gate, todo API, constructor, sub, nested-union, gate-free and direct-gate guards and the unchanged todo report. Desk sync took 104.1 s while other checks were running. 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.
58+- 637 golden cases: 417 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.
59+- The 637-case corpus passed under `urbit eval` in 89.7 s while other checks were running. The fake ship passed all 658 tests, including the importer, importer/checker and mark/checker bridges, module scope, unification, hole, qath, ask, default-wrapper importer, projection, arithmetic, generic-alias, positional-face and API-evidence guards, with 60.3 s for sync and 81.5 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.
11060- `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.
11161- 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.
11262- 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).
@@ -197,54 +147,17 @@ Besides the plan's list:
197147| f69493d | 2026-10-31 | Derive supported request components from API declarations |
198148| f0f6954 | 2026-10-31 | Analyze supported API helper definitions and declared marks |
199149| 3f55af7 | 2026-10-31 | Define source-backed transparent ask and pure |
200−| ae1ec26 | 2026-10-31 | Prove selected default-wrapped Hoon unions from source |
201−| dde791c | 2026-10-31 | Infer a source-backed request-gate type through ordinary imports |
202−| a1c5f35 | 2026-10-31 | Infer supported multi-path requests and named closed folds |
203−| 911ca0c | 2026-10-31 | Propagate union context, define subscriptions and match literal nouns |
204−| 72acdb3 | 2026-10-31 | Infer selected nested union payloads from context |
205−| 706035c | 2026-10-31 | Analyze gate-free source molds with field witnesses |
206−| 651b8ec | 2026-10-31 | Match source-proven gate samples in direct calls |
207−| cc8e389 | 2026-10-31 | Add source-backed list length and real todo regression |
208−| 4da6891 | 2026-10-31 | Add source-backed comparisons and nested Hoon union controls |
209−| 09db390 | 2026-10-31 | Skip unnecessary inference environment scans |
210−| 179d717 | 2026-10-31 | Diagnose source-proven Hoon union overlaps |
211−| 142f2e2 | 2026-10-31 | Prove structural overlaps across Hoon union cases |
212−| c96597d | 2026-10-31 | Track source-proven generic recursive identities |
213−| 190a9d5 | 2026-10-31 | Add source-backed list flattening |
214−| d9d51e6 | 2026-10-31 | Check source-proven recursive tree construction |
215−| 30b0a9e | 2026-10-31 | Match source-proven recursive tree cases |
216−| 72d85ab | 2026-10-31 | Add bounded deferred inference and expand runtime equality coverage |
217−| 22f3788 | 2026-10-31 | Check empty molds and propagate closed cell context into branches |
218−| 341bcb4 | 2026-10-31 | Keep deferred fits stable under later substitutions |
219−| b93a94b | 2026-10-31 | Prove local generic-alias union tags and add successor |
220−| 2826c93 | 2026-10-31 | Report generic-alias overlaps and retain deferred branch contexts |
221−| b5cdc80 | 2026-10-31 | Preserve full-module overlap source evidence |
222−| ab6fdc1 | 2026-10-31 | Add source-backed text conversion wrappers |
223−| aa277c9 | 2026-10-31 | Recover prepared tuple initializers in partial reports |
224−| b4703e7 | 2026-11-01 | Check narrow closed subscription-free program mains |
225−| 26bf7a7 | 2026-11-01 | Recover narrow direct-program initializer contexts |
226−| 642d2c0 | 2026-11-01 | Prove direct request-value watchability for program subscriptions |
227−| 2e4d582 | 2026-11-01 | Add the source-backed UI, program and page prelude slice |
228−| a163965 | 2026-11-01 | Recover direct-program update result contexts |
229−| 46748b0 | 2026-11-01 | Check the unchanged todo island through component recovery |
230−| 1e17d5f | 2026-11-01 | Check static and direct data-page mains |
231−| 0517053 | 2026-11-01 | Add the theme mold and require explicit unit syntax |
232−| This change | 2026-11-01 | Check the unchanged cart store and basket |
150+| This change | 2026-10-31 | Prove selected default-wrapped Hoon unions from source |
233151
234152## Checking it
235153
236154On a machine set up as [development.md](development.md) says:
237155
238156```
239−tools/golden # 660 cases under urbit eval
157+tools/golden # 637 cases under urbit eval
240158tools/importer-test # the Hoon importer fixture projection
241159tools/type-import-default-test # default-wrapped source proof golden
242160tools/type-import-test # the importer/checker bridge fixture
243−tools/type-import-overlap-test # source-aware Hoon overlap and provenance fixture
244−tools/type-import-structural-test # structural overlap and multi-case source fixture
245−tools/type-union-source-test # local generic-alias union guards
246−tools/type-union-alias-overlap-test # local generic-alias overlap diagnostics
247−tools/type-full-overlap-test # full-module overlap evidence
248161tools/type-tlon-test # the real Tlon reader/checker fixture
249162tools/type-mark-test # the mark/checker bridge fixture
250163tools/type-poke-test # the source-backed poke/API fixture
@@ -253,32 +166,17 @@ tools/type-api-paths-test # partial API path metadata fixture
253166tools/type-hole-guards-test # hole defaulting and API interface guards
254167tools/type-list-alias-test # prelude list-alias guards
255168tools/type-generic-alias-test # generic union alias guards
256−tools/type-generic-recursion-test # source-proven generic recursion guards
257−tools/type-generic-construction-test # source-proven recursive construction guards
258−tools/type-generic-pattern-test # source-proven recursive pattern guards
259−tools/type-deferred-test # source-owned deferred inference guards
260−tools/type-deferred-resolver-test # resolver consistency and failure guards
261−tools/type-deferred-context-test # deferred source-order and branch guards
262−tools/type-deferred-prepared-test # prepared initializer reports and failure guards
263−tools/type-empty-test # empty molds and coverage guards
264−tools/type-cell-branch-test # branch context and rollback guards
265169tools/type-positional-face-guards-test # positional sample face guards
266170tools/type-qath-guards-test # qath source and unfolding guards
267171tools/type-ask-guards-test # ask source and bootstrap guards
268172tools/type-proj-guards-test # projection evidence and scope guards
269−tools/type-theme-test # byte-identical real theme, exact type and rejection guards
270173tools/type-module-scope-test # module and prelude scope fixture
271−tools/type-program-main-test # closed program-main interface and rejection guards
272−tools/type-program-init-test # transactional direct-program initializer context guards
273−tools/type-program-update-test # transactional direct-program update context guards
274−tools/type-program-watch-test # direct request-value watchability guards
275−tools/type-todo-full-test # byte-identical full todo and rejection guards
276174tools/hoon check-spans-test # prints <<>> when the span checker works
277175tools/testdata/selftest # the tools themselves
278176tools/doc-blocks docs/spec # the doc's examples are golden cases
279177tools/ship start
280178tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
281−tools/ship test # the same 660 cases as -test arms on the ship
179+tools/ship test # the same 637 cases as -test arms on the ship
282180tools/testdata/ship-selftest
283181tools/testdata/clay-fixtures-selftest # scratch fixture cleanup without a ship
284182tools/ship check-commit # |commit stores .jibb files
jibb-dev/lib/jibb-import.hoon+6−181
@@ -47,7 +47,7 @@
4747 ==
4848+$ import-diagnostic
4949 $% [%ok value=imported]
50− [%invalid code=?(%aura %core %overlap) message=@t]
50+ [%invalid code=?(%aura %core) message=@t]
5151 [%unsupported message=@t]
5252 ==
5353+$ signatures (list [name=term code=hoon])
@@ -132,35 +132,6 @@
132132 =/ rest $(cases t.cases, tags [u.tag tags])
133133 ?~ rest ~
134134 `[[u.tag i.cases] u.rest]
135−
136−::
137−:: Bound the new $? branch screen independently of the existing $% path.
138−:: Count raw noun nodes across all cases, and cap pairwise tag comparisons.
139−++ bounded-no-spec-unions
140− |= [h=* fuel=@ud]
141− ^- (unit @ud)
142− ?: =(fuel 0) ~
143− =. fuel (dec fuel)
144− ?@ h `fuel
145− ?: ?=([%bckt ^ ^] h) ~
146− ?: ?=([%bcwt [^ [^ *]]] h) ~
147− ?: ?=([%bccn [^ [^ *]]] h) ~
148− =/ left=(unit @ud) $(h -.h)
149− ?~ left ~
150− $(h +.h, fuel u.left)
151−++ tagged-bounded-cases
152− |= [cases=(list spec) tags=(list @) fuel=@ud left=@ud]
153− ^- (unit (list tagged-case))
154− ?~ cases `~
155− ?: =(left 0) ~
156− =/ remaining=(unit @ud) (bounded-no-spec-unions i.cases fuel)
157− ?~ remaining ~
158− =/ tag=(unit @) (tagged-head i.cases)
159− ?~ tag ~
160− ?: (lien tags |=(x=@ =(x u.tag))) ~
161− =/ rest $(cases t.cases, tags [u.tag tags], fuel u.remaining, left (dec left))
162− ?~ rest ~
163− `[[u.tag i.cases] u.rest]
164135::
165136:: Benign source annotations have different typed representations on
166137:: Clay and under eval. Inspect the wrapper as a noun, and validate the
@@ -199,19 +170,11 @@
199170 ?~ found ~
200171 =/ body=(unit spec) (tagged-default-union u.found 4)
201172 ?~ body ~
202− ?- u.body
203− [%bccn *]
204− =/ cases=(list spec) p.u.body
205− ?~ cases ~
206− ?~ t.cases ~
207− (tagged-cases cases ~)
208− [%bcwt *]
209− =/ cases=(list spec) p.u.body
210− ?~ cases ~
211− ?~ t.cases ~
212− (tagged-bounded-cases cases ~ 4.096 128)
213− * ~
214− ==
173+ ?. ?=([%bccn *] u.body) ~
174+ =/ cases=(list spec) p.u.body
175+ ?~ cases ~
176+ ?~ t.cases ~
177+ (tagged-cases cases ~)
215178::
216179:: Source proof for dependencies of an explicitly tagged union. Only
217180:: simple local molds, standard collections and distinct term enums are
@@ -383,140 +346,6 @@
383346 ?. ?=([%cell [%atom %tas [~ @]] *] i.ys) ~
384347 ?. =(tag.i.xs u.value.head.i.ys) ~
385348 $(xs t.xs, ys t.ys)
386−
387−::
388−:: Unlike the disjoint-reader fallback, source overlap may have repeated
389−:: tags. Bound both raw case traversal and the number of pair attempts.
390−++ overlap-source-cases
391− |= [cases=(list spec) fuel=@ud left=@ud]
392− ^- (unit (list tagged-case))
393− ?~ cases `~
394− ?: =(left 0) ~
395− =/ remaining=(unit @ud) (bounded-no-spec-unions i.cases fuel)
396− ?~ remaining ~
397− =/ tag=(unit @) (tagged-head i.cases)
398− ?~ tag ~
399− =/ rest $(cases t.cases, fuel u.remaining, left (dec left))
400− ?~ rest ~
401− `[[u.tag i.cases] u.rest]
402−++ overlap-repeated-tag
403− |= cases=(list tagged-case)
404− ^- ?
405− ?~ cases |
406− ?: (lien t.cases |=(c=tagged-case =(tag.c tag.i.cases))) &
407− $(cases t.cases)
408−++ overlap-projections-match
409− |= [xs=(list tagged-case) ys=(list imported)]
410− ^- ?
411− ?~ xs ?=(~ ys)
412− ?~ ys |
413− ?. ?=([%cell [%atom %tas [~ @]] *] i.ys) |
414− ?. =(tag.i.xs u.value.head.i.ys) |
415− $(xs t.xs, ys t.ys)
416−++ overlap-source-witness
417− |= [module=term name=term cor=type]
418− ^- ?
419− ?. ?=([%core *] cor) |
420− =/ selected=(unit hoon) (local-arm-source cor name)
421− ?~ selected |
422− =/ shape=(unit spec) (local-mold-spec u.selected name)
423− ?~ shape |
424− =/ body=(unit spec) (tagged-default-union u.shape 4)
425− ?~ body |
426− ?. ?=([%bcwt *] u.body) |
427− =/ cases=(unit (list tagged-case)) (overlap-source-cases p.u.body 4.096 128)
428− ?~ cases |
429− ?. (overlap-repeated-tag u.cases) |
430− ?. ?=(^ (safe-source-tagged-fuel-mode u.cases cor ~[name] 4.096 |)) |
431− =/ tried=(each (list type) tang)
432− (mule |.((turn u.cases |=(c=tagged-case (~(play ut cor) [%kttr branch.c])))))
433− ?. ?=([%& *] tried) |
434− =/ projected=(each (list imported) tang)
435− (mule |.((turn p.tried |=(t=type (walk module t catalog ~ `cor)))))
436− ?. ?=([%& *] projected) |
437− ?^ (first-bads p.projected) |
438− ?. (overlap-projections-match u.cases p.projected) |
439− =/ witness=(unit overlap-proof-result) (overlap-case-pairs p.projected 4.096)
440− ?~ witness |
441− found.u.witness
442−::
443−:: Positive overlap evidence only: false means no proof, not disjointness.
444−:: Fuel is shared across all examined nodes and sibling alternatives.
445−+$ overlap-proof-result [found=? left=@ud]
446−++ overlap-known-atom
447− |= aura=term
448− ^- ?
449− (lien `(list term)`~[%t %tas %ud %f] |=(n=term =(n aura)))
450−++ overlap-inhabited-list
451− |= [xs=(list imported) fuel=@ud]
452− ^- (unit overlap-proof-result)
453− ?~ xs `[| fuel]
454− ?: =(0 fuel) ~
455− =/ one=(unit overlap-proof-result) (overlap-inhabited i.xs (dec fuel))
456− ?~ one ~
457− ?: found.u.one one
458− $(xs t.xs, fuel left.u.one)
459−++ overlap-inhabited
460− |= [x=imported fuel=@ud]
461− ^- (unit overlap-proof-result)
462− ?: =(0 fuel) ~
463− =. fuel (dec fuel)
464− ?- x
465− [%noun *] `[& fuel]
466− [%void *] `[| fuel]
467− [%atom *] `[|(?=(^ value.x) (overlap-known-atom aura.x)) fuel]
468− [%face *] $(x body.x)
469− [%named *] $(x body.x)
470− [%fork *] (overlap-inhabited-list cases.x fuel)
471− [%cell *]
472− =/ a=(unit overlap-proof-result) $(x head.x)
473− ?~ a ~
474− ?. found.u.a a
475− $(x tail.x, fuel left.u.a)
476− * `[| fuel]
477− ==
478−++ overlap-pair-list
479− |= [xs=(list imported) y=imported fuel=@ud]
480− ^- (unit overlap-proof-result)
481− ?~ xs `[| fuel]
482− ?: =(0 fuel) ~
483− =/ p=(unit overlap-proof-result) (overlap-pair i.xs y (dec fuel))
484− ?~ p ~
485− ?: found.u.p p
486− $(xs t.xs, fuel left.u.p)
487−++ overlap-pair
488− |= [a=imported b=imported fuel=@ud]
489− ^- (unit overlap-proof-result)
490− ?: =(0 fuel) ~
491− =. fuel (dec fuel)
492− ?: ?=([%face *] a) $(a body.a)
493− ?: ?=([%face *] b) $(b body.b)
494− ?: ?=([%named *] a) $(a body.a)
495− ?: ?=([%named *] b) $(b body.b)
496− ?: ?=([%fork *] a) (overlap-pair-list cases.a b fuel)
497− ?: ?=([%fork *] b) (overlap-pair-list cases.b a fuel)
498− ?: ?=([%noun *] a) (overlap-inhabited b fuel)
499− ?: ?=([%noun *] b) (overlap-inhabited a fuel)
500− ?: &(?=([%cell *] a) ?=([%cell *] b))
501− =/ p=(unit overlap-proof-result) $(a head.a, b head.b)
502− ?~ p ~
503− ?. found.u.p p
504− $(a tail.a, b tail.b, fuel left.u.p)
505− ?. &(?=([%atom *] a) ?=([%atom *] b)) `[| fuel]
506− ?^ value.a
507− ?^ value.b `[=(u.value.a u.value.b) fuel]
508− `[&(=(u.value.a 0) (overlap-known-atom aura.b)) fuel]
509− ?^ value.b `[&(=(u.value.b 0) (overlap-known-atom aura.a)) fuel]
510− `[&((overlap-known-atom aura.a) (overlap-known-atom aura.b)) fuel]
511−++ overlap-case-pairs
512− |= [xs=(list imported) fuel=@ud]
513− ^- (unit overlap-proof-result)
514− ?~ xs `[| fuel]
515− ?: =(0 fuel) ~
516− =/ p=(unit overlap-proof-result) (overlap-pair-list t.xs i.xs (dec fuel))
517− ?~ p ~
518− ?: found.u.p p
519− $(xs t.xs, fuel left.u.p)
520349::
521350:: +read-mold-in: accept the /sur core as provenance. The core must be
522351:: built against zuse or validated Ford imports, and its selected arm
@@ -532,8 +361,6 @@
532361 [%| (crip "Hoon mold `{(trip name)}` is not declared")]
533362 ?. =(typ (~(play ut cor) (ream (cat 3 '*' name))))
534363 [%| 'Hoon module provenance does not match the selected mold']
535− =/ overlap=(each ? tang) (mule |.((overlap-source-witness module name cor)))
536− ?: &(?=(%& -.overlap) p.overlap) [%| 'Hoon union cases overlap']
537364 =/ result (read-with module name typ [~ cor])
538365 ?: ?=([%& *] result) result
539366 =/ fallback=(each (unit (each imported @t)) tang)
@@ -634,8 +461,6 @@
634461 [%unsupported p.result]
635462 =/ selected=(each type tang) (mule |.((~(play ut cor) (ream (cat 3 '*' name)))))
636463 ?. ?=(%& -.selected) [%unsupported p.result]
637− =/ overlap=(each ? tang) (mule |.((overlap-source-witness module name cor)))
638− ?: &(?=(%& -.overlap) p.overlap) [%invalid %overlap 'Hoon union cases overlap']
639464 =/ again=(each imported tang) (mule |.((walk module p.selected catalog ~ [~ cor])))
640465 ?. ?=(%& -.again) [%unsupported p.result]
641466 =/ evidence=(unit import-diagnostic) (first-invalid p.again)
jibb-dev/lib/jibb.hoon+138−4415
@@ -4607,8 +4607,6 @@
46074607:: Atom constraints tied to an explicit capital or an inferred sample
46084608:: are generalized and printed. Other aura variables remain unsupported until
46094609:: their defaulting and inferred generalization are implemented.
4610−:: Restricted-number promotion considers written capitals only; if there
4611−:: are none, it skips the otherwise unnecessary environment traversal.
46124610:: Bare @ is a separate unrestricted atom type. A directional fit check
46134611:: permits concrete atoms to widen to it, never the reverse. A fit that
46144612:: needs a not-yet-implemented constraint remains unsupported. Named unions
@@ -4630,32 +4628,6 @@
46304628:: proofs to fewer than 1,024 cells; the projection planner has a separate
46314629:: 4,096-step bound. These are inference limits, not language limits.
46324630::
4633−:: Supported API imports derive request-gate types atomically for multiple
4634−:: paths, including one typed segment or one diff fold per case. Their checked
4635−:: ordinary definitions, mark molds and supported poke constructor are also
4636−:: exported. A selected /sur mold is checked through its trusted reader result;
4637−:: unused cores and other bindings are not independently validated. APIs
4638−:: with /= imports, separate scry paths, multiple parameters or diffs, or a
4639−:: parameter together with a fold remain unsupported. The unchanged todo API
4640−:: fits this fragment, including named closed fold gates.
4641−::
4642−:: Each case's source-derived schema and canonical API identity travel in a
4643−:: dependency closure bound to the exact supplied bundle, prelude, scope and
4644−:: trusted reader results. Unknown cached entries are rebuilt. Request-bearing
4645−:: closures are limited to 256 source paths and requests. This is type
4646−:: inference only: no request lowering, runtime schema validator or proof that
4647−:: an arbitrary ask value is watchable is supplied.
4648−::
4649−:: A closed gate sample may omit one outer face from a known input slot when
4650−:: its product is identical. Distinct written names, nested value faces,
4651−:: ambiguous cell tails and raw-variable-origin fits retain their prior rules.
4652−::
4653−:: In one synthetic eval of a 48-module deep and 48-module wide request-free
4654−:: graph, baseline versus certificate inference took 21.53 s versus 23.10 s
4655−:: elapsed (21.10 s versus 22.34 s CPU), including startup. The deep cache's
4656−:: jam grew from 2,402 to 4,209 bytes (+1,807 bytes). These single-run figures
4657−:: are not production memory or performance benchmarks.
4658−::
46594631+$ itype
46604632 $~ [%var 0]
46614633 $% [%var id=@ud]
@@ -4667,13 +4639,11 @@
46674639 [%any-atom ~]
46684640 [%flag ~]
46694641 [%noun ~]
4670− [%empty ~]
46714642 [%tag id=@ud literal=lit constructor=?]
46724643 [%const literal=lit]
46734644 [%collection name=term args=(list itype)]
46744645 [%recursive module=term name=term label=(unit @t)]
46754646 [%jrec at=path name=term label=(unit @t) head=term aura=@ta tail=term]
4676− [%grec at=path name=term label=(unit @t) proof=shape args=(list itype)]
46774647 [%union cases=(list itype) origin=(unit [at=path name=term]) label=(unit @t) args=(list itype)]
46784648 [%face name=term body=itype]
46794649 [%fn sample=itype product=itype]
@@ -4726,88 +4696,6 @@
47264696 $(t u.found)
47274697 ==
47284698::
4729−:: Prove only emptiness; unknown types are never treated as empty.
4730−:: A shared node budget bounds each proof attempt.
4731−++ itype-empty-cases
4732− |= [xs=(list itype) sub=isub fuel=@ud]
4733− ^- (unit [empty=? left=@ud])
4734− ?~ xs `[& fuel]
4735− =/ first=(unit [empty=? left=@ud]) (itype-empty-proof i.xs sub fuel)
4736− ?~ first ~
4737− ?. empty.u.first `[| left.u.first]
4738− $(xs t.xs, fuel left.u.first)
4739−++ itype-empty-proof
4740− |= [typ=itype sub=isub fuel=@ud]
4741− ^- (unit [empty=? left=@ud])
4742− ?: =(0 fuel) ~
4743− =. fuel (dec fuel)
4744− =. typ (itype-walk typ sub)
4745− ?- -.typ
4746− %empty `[& fuel]
4747− %face $(typ body.typ)
4748− %cell
4749− =/ left=(unit [empty=? left=@ud]) $(typ hed.typ)
4750− ?~ left ~
4751− ?: empty.u.left `[& left.u.left]
4752− $(typ tal.typ, fuel left.u.left)
4753− %union (itype-empty-cases cases.typ sub fuel)
4754− * `[| fuel]
4755− ==
4756−:: Prove reachability separately from emptiness. An unresolved fixed
4757−:: recursive type is not presumed inhabited. A written, still-unconstrained
4758−:: capital is existentially inhabited for pattern reachability; the normal
4759−:: definition-boundary checks reject subsequently constrained capitals.
4760−++ itype-inhabited-cases
4761− |= [xs=(list itype) sub=isub caps=icaps fuel=@ud pending=?]
4762− ^- (unit [result=?(%yes %no %unknown) left=@ud])
4763− ?~ xs `[?:(pending %unknown %no) fuel]
4764− =/ first=(unit [result=?(%yes %no %unknown) left=@ud])
4765− (itype-inhabited-proof i.xs sub caps fuel)
4766− ?~ first ~
4767− ?: =(%yes result.u.first) first
4768− $(xs t.xs, fuel left.u.first, pending |(pending =(%unknown result.u.first)))
4769−++ itype-inhabited-proof
4770− |= [typ=itype sub=isub caps=icaps fuel=@ud]
4771− ^- (unit [result=?(%yes %no %unknown) left=@ud])
4772− ?: =(0 fuel) ~
4773− =. fuel (dec fuel)
4774− =. typ (itype-walk typ sub)
4775− ?- -.typ
4776− %empty `[%no fuel]
4777− ?(%atom %any-atom %flag %const %noun %avar %rvar %nvar %rnvar %fn %jrec) `[%yes fuel]
4778− %var
4779− ?: (lien caps |=(c=icap (hole-same-variable typ (itype-walk [%var id.c] sub)))) `[%yes fuel]
4780− `[%unknown fuel]
4781− %face $(typ body.typ)
4782− %cell
4783− =/ head=(unit [result=?(%yes %no %unknown) left=@ud]) $(typ hed.typ)
4784− ?~ head ~
4785− ?: =(%no result.u.head) head
4786− =/ tail=(unit [result=?(%yes %no %unknown) left=@ud]) $(typ tal.typ, fuel left.u.head)
4787− ?~ tail ~
4788− ?: =(%no result.u.tail) tail
4789− ?: |(=(%unknown result.u.head) =(%unknown result.u.tail)) `[%unknown left.u.tail]
4790− `[%yes left.u.tail]
4791− %union (itype-inhabited-cases cases.typ sub caps fuel |)
4792− %collection
4793− ?. &(|(=(%list name.typ) =(%unit name.typ)) ?=([* ~] args.typ)) `[%unknown fuel]
4794− `[%yes fuel]
4795− %grec ?:((grec-tree-proof name.typ proof.typ) `[%yes fuel] `[%unknown fuel])
4796− * `[%unknown fuel]
4797− ==
4798−++ itype-live-cases
4799− |= [xs=(list itype) sub=isub caps=icaps fuel=@ud]
4800− ^- (unit (list itype))
4801− ?~ xs `~
4802− =/ first=(unit [result=?(%yes %no %unknown) left=@ud])
4803− (itype-inhabited-proof i.xs sub caps fuel)
4804− ?~ first ~
4805− ?: =(%unknown result.u.first) ~
4806− =/ rest=(unit (list itype)) $(xs t.xs, fuel left.u.first)
4807− ?~ rest ~
4808− ?: =(%no result.u.first) rest
4809− `[i.xs u.rest]
4810−::
48114699++ itype-occurs
48124700 |= [n=@ud t=itype sub=isub]
48134701 ^- ?
@@ -4822,13 +4710,11 @@
48224710 %any-atom |
48234711 %flag |
48244712 %noun |
4825− %empty |
48264713 %tag =(n id.t)
48274714 %const |
48284715 %union |((lien cases.t |=(c=itype (itype-occurs n c sub))) (lien args.t |=(c=itype (itype-occurs n c sub))))
48294716 %recursive |
48304717 %jrec |
4831− %grec (lien args.t |=(c=itype (itype-occurs n c sub)))
48324718 %collection (lien args.t |=(c=itype (itype-occurs n c sub)))
48334719 %face $(t body.t)
48344720 %fn |($(t sample.t) $(t product.t))
@@ -4847,9 +4733,6 @@
48474733 =. a (itype-walk a sub)
48484734 =. b (itype-walk b sub)
48494735 ?: =(a b) `sub
4850− ?: &(?=(%grec -.a) ?=(%grec -.b))
4851− ?. &(=(at.a at.b) =(name.a name.b)) ~
4852− (itype-unify-args args.a args.b sub)
48534736 ?: &(?=(%jrec -.a) ?=(%jrec -.b))
48544737 ?:(&(=(at.a at.b) =(name.a name.b) =(head.a head.b) =(aura.a aura.b) =(tail.a tail.b)) `sub ~)
48554738 ?: &(?=(%recursive -.a) ?=(%recursive -.b))
@@ -4955,13 +4838,11 @@
49554838 %any-atom &
49564839 %flag |
49574840 %noun |
4958− %empty |
49594841 %tag |
49604842 %const |
49614843 %union |((lien cases.t |=(c=itype (itype-has-any-atom c sub))) (lien args.t |=(c=itype (itype-has-any-atom c sub))))
49624844 %recursive |
49634845 %jrec |
4964− %grec (lien args.t |=(c=itype (itype-has-any-atom c sub)))
49654846 %collection (lien args.t |=(c=itype (itype-has-any-atom c sub)))
49664847 %face $(t body.t)
49674848 %fn |($(t sample.t) $(t product.t))
@@ -5031,13 +4912,11 @@
50314912 %any-atom &
50324913 %flag &
50334914 %noun |
5034− %empty |
50354915 %tag &
50364916 %const &
50374917 %union |((lien cases.typ |=(c=itype (itype-has-fixed-atom c))) (lien args.typ |=(c=itype (itype-has-fixed-atom c))))
50384918 %recursive |
50394919 %jrec |
5040− %grec (lien args.typ |=(c=itype (itype-has-fixed-atom c)))
50414920 %collection (lien args.typ |=(c=itype (itype-has-fixed-atom c)))
50424921 %face $(typ body.typ)
50434922 %fn |($(typ sample.typ) $(typ product.typ))
@@ -5066,7 +4945,6 @@
50664945 ^- ?
50674946 =. t (itype-walk t sub)
50684947 ?- -.t
5069− %grec (lien args.t |=(c=itype (itype-has-face c sub)))
50704948 %collection (lien args.t |=(c=itype (itype-has-face c sub)))
50714949 %face &
50724950 %cell |($(t hed.t) $(t tal.t))
@@ -5074,42 +4952,6 @@
50744952 * |
50754953 ==
50764954::
5077−:: Closed function samples may omit a slot face, but a known name must
5078−:: match another known name. Keep nested value faces and require exact
5079−:: invariant compatibility; a faced tail against a cell is ambiguous.
5080−++ itype-closed-slot-match
5081− |= [a=itype b=itype]
5082− ^- ?
5083− ?: &(?=(%face -.a) ?=(%face -.b))
5084− ?. =(name.a name.b) |
5085− ?=(^ (itype-unify body.a body.b ~))
5086− ?: ?=(%face -.a) ?=(^ (itype-unify body.a b ~))
5087− ?: ?=(%face -.b) ?=(^ (itype-unify a body.b ~))
5088− ?=(^ (itype-unify a b ~))
5089−++ itype-closed-sample-match
5090− |= [a=itype b=itype fuel=@ud]
5091− ^- ?
5092− ?: =(0 fuel) |
5093− ?. &(?=(%cell -.a) ?=(%cell -.b)) |
5094− ?. (itype-closed-slot-match hed.a hed.b) |
5095− =/ x=itype tal.a
5096− =/ y=itype tal.b
5097− ?: &(?=(%cell -.x) ?=(%cell -.y))
5098− ?=(^ (itype-unify x y ~))
5099− ?: |(&(?=(%face -.x) ?=(%cell -.y)) &(?=(%cell -.x) ?=(%face -.y))) |
5100− (itype-closed-slot-match x y)
5101−++ itype-closed-gates-match
5102− |= [a=itype b=itype]
5103− ^- ?
5104− ?. &(?=(%fn -.a) ?=(%fn -.b)) |
5105− ?. &(?=(%cell -.sample.a) ?=(%cell -.sample.b)) |
5106− ?. =(product.a product.b) |
5107− ?^ (itype-vars a) |
5108− ?^ (itype-vars b) |
5109− ?: |((itype-has-tag a) (itype-has-tag b)) |
5110− ?. (itype-closed-sample-match sample.a sample.b 1.024) |
5111− ?=(^ (itype-unify product.a product.b ~))
5112−::
51134955++ itype-face-asym-collection-args
51144956 |= [as=(list itype) bs=(list itype) sub=isub]
51154957 ^- ?
@@ -5123,9 +4965,6 @@
51234965 ^- ?
51244966 =. a (itype-walk a sub)
51254967 =. b (itype-walk b sub)
5126− ?: &(?=(%grec -.a) ?=(%grec -.b))
5127− ?. &(=(at.a at.b) =(name.a name.b)) |
5128− (itype-face-asym-collection-args args.a args.b sub)
51294968 ?: &(?=(%collection -.a) ?=(%collection -.b))
51304969 ?. =(name.a name.b) |
51314970 (itype-face-asym-collection-args args.a args.b sub)
@@ -5158,12 +4997,6 @@
51584997:: labels. Ignore one raw sample-slot face per written argument while
51594998:: checking value faces as usual. An unknown or variable-bound cell spine
51604999:: cannot justify this distinction, so keep the existing conservative guard.
5161−++ itype-positional-slot-face-asym
5162− |= [actual=itype expected=itype sub=isub]
5163− ^- ?
5164− ?: &(?=(%fn -.actual) ?=(%fn -.expected) (itype-closed-gates-match actual expected)) |
5165− (itype-face-asym actual expected sub)
5166−::
51675000++ itype-positional-face-asym
51685001 |= [args=(list expr) actual=itype expected=itype sub=isub]
51695002 ^- ?
@@ -5171,11 +5004,11 @@
51715004 ?~ t.args
51725005 =/ slot=itype expected
51735006 =? slot ?=(%face -.slot) body.slot
5174− (itype-positional-slot-face-asym actual slot sub)
5007+ (itype-face-asym actual slot sub)
51755008 ?. &(?=(%cell -.actual) ?=(%cell -.expected)) &
51765009 =/ slot=itype hed.expected
51775010 =? slot ?=(%face -.slot) body.slot
5178− ?: (itype-positional-slot-face-asym hed.actual slot sub) &
5011+ ?: (itype-face-asym hed.actual slot sub) &
51795012 $(args t.args, actual tal.actual, expected tal.expected)
51805013::
51815014++ itype-output-may-be-cell
@@ -5188,7 +5021,6 @@
51885021 %union &
51895022 %recursive &
51905023 %jrec &
5191− %grec &
51925024 %noun &
51935025 %collection &
51945026 %face $(t body.t)
@@ -5218,7 +5050,6 @@
52185050 ^- ?
52195051 ?- -.t
52205052 %tag &
5221− %grec (lien args.t |=(c=itype (itype-has-tag c)))
52225053 %collection (lien args.t |=(c=itype (itype-has-tag c)))
52235054 %face $(t body.t)
52245055 %fn |($(t sample.t) $(t product.t))
@@ -5232,7 +5063,6 @@
52325063 ^- ?
52335064 ?- -.t
52345065 %union &
5235− %grec (lien args.t |=(c=itype (itype-has-union c)))
52365066 %collection (lien args.t |=(c=itype (itype-has-union c)))
52375067 %face $(t body.t)
52385068 %fn |($(t sample.t) $(t product.t))
@@ -5251,7 +5081,6 @@
52515081 %union
52525082 ?: &(?=(~ label.t) ?=(^ args.t)) &
52535083 (lien (weld args.t cases.t) |=(c=itype (itype-has-hidden-generic c)))
5254− %grec |(?=(~ label.t) (lien args.t |=(c=itype (itype-has-hidden-generic c))))
52555084 %collection (lien args.t |=(c=itype (itype-has-hidden-generic c)))
52565085 %face $(t body.t)
52575086 %fn |($(t sample.t) $(t product.t))
@@ -5265,7 +5094,6 @@
52655094 ?- -.t
52665095 %recursive &
52675096 %jrec &
5268− %grec &
52695097 %collection (lien args.t |=(c=itype (itype-has-recursive c)))
52705098 %union (lien (weld args.t cases.t) |=(c=itype (itype-has-recursive c)))
52715099 %face $(t body.t)
@@ -5280,7 +5108,6 @@
52805108 ?- -.t
52815109 %recursive ?=(~ label.t)
52825110 %jrec ?=(~ label.t)
5283− %grec |(?=(~ label.t) (lien args.t |=(c=itype (itype-has-hidden-recursive c))))
52845111 %collection (lien args.t |=(c=itype (itype-has-hidden-recursive c)))
52855112 %union (lien (weld args.t cases.t) |=(c=itype (itype-has-hidden-recursive c)))
52865113 %face $(t body.t)
@@ -5308,63 +5135,30 @@
53085135 $(cases t.cases, good `trial)
53095136 ==
53105137::
5311−:: A constructor needs a case whose head has the same literal noun as its
5312−:: tag. An unresolved or opaque case may reveal one later, so it cannot
5313−:: prove a mismatch or a unique match. A broad atom mold is not a case.
5138+:: A constructor needs a case with its tag at the head and a payload
5139+:: compatible with the expected gate sample. Other case forms do not
5140+:: identify a constructor.
53145141::
53155142++ itype-fit-ctor-cases
53165143 |= [tag=lit sample=itype cases=(list itype) sub=isub next=@ud]
53175144 ^- ifit
53185145 =/ found=(unit ifit) ~
5319− =/ pending=? |
53205146 |-
5321− ?~ cases
5322− ?: pending [%unknown ~]
5323− ?~ found [%bad ~]
5324− u.found
5325− =/ raw=itype i.cases
5326− ?: ?=(%var -.raw)
5327− $(cases t.cases, pending &)
5328− =/ c=itype (itype-walk raw sub)
5329− ?: ?=(?(%var %tag %recursive %jrec %grec %union %face) -.c)
5330− $(cases t.cases, pending &)
5147+ ?~ cases ?~(found [%bad ~] u.found)
5148+ =/ c=itype (itype-walk i.cases sub)
53315149 ?. ?=(%cell -.c) $(cases t.cases)
5332− =/ raw-head=itype hed.c
5333− ?: ?=(%var -.raw-head)
5334− $(cases t.cases, pending &)
5335− =/ head=itype (itype-walk raw-head sub)
5336− :: A single faced, explicitly atom-only head cannot be the tag case.
5337− :: Do not follow variables or peel nested faces for this negative proof.
5338− ?: ?=(%face -.head)
5339− ?: ?=(?(%atom %any-atom %flag %avar %rvar %nvar %rnvar) -.body.head)
5340− $(cases t.cases)
5341− $(cases t.cases, pending &)
5342− ?: ?=(?(%var %tag %recursive %jrec %grec %union) -.head)
5343− $(cases t.cases, pending &)
5150+ =/ head=itype (itype-walk hed.c sub)
53445151 ?. ?=(%const -.head) $(cases t.cases)
5152+ ?. =(%term form.literal.head) $(cases t.cases)
53455153 ?. =(val.literal.head val.tag) $(cases t.cases)
5346− :: Equal heads can have disjoint payloads. Test each from the original
5347− :: substitution; a unique success is usable only with no unknown rival.
5154+ ?^ found [%unknown ~]
53485155 =/ trial=ifit (itype-fit sample tal.c sub next)
5349− ?- -.trial
5350− %bad $(cases t.cases)
5351− %unknown $(cases t.cases, pending &)
5352− %ok
5353− ?^ found [%unknown ~]
5354− $(cases t.cases, found `trial)
5355− ==
5156+ $(cases t.cases, found `trial)
53565157::
53575158++ itype-fit
53585159 |= [actual=itype expected=itype sub=isub next=@ud]
53595160 ^- ifit
5360− =/ result=ifit (itype-fit-inner actual expected sub next | |)
5361− ?: ?=(%ok -.result) result
5362− =/ source=itype (itype-walk actual sub)
5363− ?. ?=(?(%empty %face %cell %union) -.source) result
5364− =/ empty=(unit [empty=? left=@ud]) (itype-empty-proof actual sub 256)
5365− ?~ empty [%unknown ~]
5366− ?: empty.u.empty [%ok sub next]
5367− result
5161+ (itype-fit-inner actual expected sub next | |)
53685162++ itype-fit-inner
53695163 |= [actual=itype expected=itype sub=isub next=@ud skip-width=? spine-proof=?]
53705164 ^- ifit
@@ -5383,10 +5177,6 @@
53835177 =. actual (itype-walk actual sub)
53845178 =. expected (itype-walk expected sub)
53855179 ?: =(actual expected) [%ok sub next]
5386− ?: &(?=(%empty -.expected) |(?=(%cell -.actual) ?=(%face -.actual) ?=(%union -.actual) ?=(%grec -.actual) ?=(%recursive -.actual))) [%unknown ~]
5387− :: The relation of the source loobean mold to explicit @f is not yet
5388− :: established. Keep it unsupported rather than asserting a mismatch.
5389− ?: &(?=(%flag -.actual) ?=(%atom -.expected) =(%f aura.expected)) [%unknown ~]
53905180 :: Any value can be used where a noun is expected. An unresolved
53915181 :: bare tag is fixed as a constant; a constructor still needs a gate.
53925182 ?: ?=(%noun -.expected)
@@ -5396,14 +5186,6 @@
53965186 [%ok sub next]
53975187 :: An arbitrary noun is not known to fit a narrower type.
53985188 ?: &(?=(%noun -.actual) !?=(%var -.expected)) [%unknown ~]
5399− ?: &(!uncertain ?=(%grec -.actual) ?=(%face -.expected)) $(expected body.expected)
5400− ?: &(!uncertain ?=(%face -.actual) ?=(%grec -.expected)) $(actual body.actual)
5401− ?: &(?=(%grec -.actual) ?=(%grec -.expected))
5402− ?. &(=(at.actual at.expected) =(name.actual name.expected)) [%unknown ~]
5403− =/ matched=(unit isub) (itype-unify-args args.actual args.expected sub)
5404− ?~ matched [%unknown ~]
5405− [%ok u.matched next]
5406− ?: &(|(?=(%grec -.actual) ?=(%grec -.expected)) !|(?=(%var -.actual) ?=(%var -.expected))) [%unknown ~]
54075189 ?: &(!uncertain ?=(%jrec -.actual) ?=(%face -.expected)) $(expected body.expected)
54085190 ?: &(!uncertain ?=(%face -.actual) ?=(%jrec -.expected)) $(actual body.actual)
54095191 ?: &(?=(%jrec -.actual) ?=(%jrec -.expected))
@@ -5477,10 +5259,6 @@
54775259 ?: ?=(%const -.expected)
54785260 ?:(=(val.literal.actual val.literal.expected) [%ok sub next] [%bad ~])
54795261 ?: ?=(%atom -.expected)
5480− :: A loobean singleton must not silently widen into another aura.
5481− ?: =(%loobean form.literal.actual)
5482− ?: =(%f aura.expected) [%unknown ~]
5483− [%bad ~]
54845262 ?: |(=(%tas aura.expected) =(%ta aura.expected)) [%ok sub next]
54855263 [%bad ~]
54865264 ?: ?=(%flag -.expected)
@@ -5540,7 +5318,6 @@
55405318 $(actual body.actual, expected body.expected, skip-width |, spine-proof |)
55415319 ?: ?=(%face -.actual) $(actual body.actual, skip-width |, spine-proof |)
55425320 ?: ?=(%face -.expected) $(expected body.expected, skip-width |, spine-proof |)
5543− ?: &(!uncertain (itype-closed-gates-match actual expected)) [%ok sub next]
55445321 ?: (itype-face-asym actual expected sub) [%unknown ~]
55455322 ?: |((itype-has-any-atom actual sub) (itype-has-any-atom expected sub))
55465323 [%unknown ~]
@@ -5619,19 +5396,7 @@
56195396+$ iderived [name=term agent=term mark=term]
56205397+$ iwidth-definition [name=term original=expr typ=itype sub=isub projections=(list iwprojection)]
56215398+$ iwidth-dependency [at=path source=(unit @t) definitions=(list iwidth-definition)]
5622−:: Nonrecursive request evidence is compiler-owned metadata, not a property
5623−:: of an arbitrary ask value. Reader graphs and source inputs are trusted.
5624−+$ irequest-evidence
5625− [api-at=path name=term path=iapi-path-typed api-source=@t public-source=@t internal-source=@t prelude-values=(list term) prelude-molds=(list term) externals=iexternals marks=imark-externals]
5626−:: Store requests have their own source-bound evidence. In particular, an
5627−:: API path certificate cannot make a store state member watchable, or vice versa.
5628−+$ istore-request-evidence
5629− [store-at=path source=@t state=itype action-name=term action=itype]
5630−:: A unit distinguishes a verified empty closure from a detached legacy file.
5631−:: The opaque prelude is an exact trusted input, not a recursive interface mold.
5632−+$ irequest-graph
5633− [paths=(set path) requests=(list irequest-evidence) stores=(list istore-request-evidence) bundle-input=* prelude-input=* prelude-values=(list term) prelude-molds=(list term) externals=iexternals marks=imark-externals]
5634−+$ ifile [values=ienv molds=imold-types at=path derived=(list iderived) elaborations=(list iwidth-definition) dependencies=(list iwidth-dependency) source=(unit @t) graph=(unit irequest-graph)]
5399++$ ifile [values=ienv molds=imold-types at=path derived=(list iderived) elaborations=(list iwidth-definition) dependencies=(list iwidth-dependency) source=(unit @t)]
56355400+$ ijimports (list [face=term interface=ifile])
56365401+$ icap [name=@t id=@ud at=span]
56375402+$ icaps (list icap)
@@ -5734,77 +5499,7 @@
57345499 ?. (width-in-order order.source.shape order.target.shape) ~
57355500 (width-fit-fields index.source.shape order.target.shape sub next)
57365501::
5737−:: Provisional, globally budgeted gate-free proof. %no includes a
5738−:: gate-bearing witness; an uninhabited sibling could invalidate it.
5739−:: Input types must be resolved and normalized under valid substitutions,
5740−:: from trusted source-backed interfaces and reader results. Collection
5741−:: list/unit names rely on their existing identity invariant; this arm
5742−:: does not validate fabricated internal types.
5743−+$ igf-segment
5744− $% [%field name=term]
5745− [%head ~]
5746− [%tail ~]
5747− [%item ~]
5748− [%case index=@ud]
5749− ==
5750−+$ igate-free [verdict=?(%yes %no %unknown) inhabited=? left=@ud path=(unit (list igf-segment))]
5751−++ gate-free-types
5752− |= [types=(list itype) fuel=@ud path=(list igf-segment) index=@ud]
5753− ^- igate-free
5754− ?~ types [%yes | fuel ~]
5755− ?: =(0 fuel) [%unknown | 0 ~]
5756− =/ first=igate-free (gate-free-type i.types fuel [[%case index] path])
5757− ?: =(%no verdict.first) first
5758− =/ rest=igate-free $(types t.types, fuel left.first, index +(index))
5759− ?: =(%no verdict.rest) rest
5760− =/ inhabited=? |(inhabited.first inhabited.rest)
5761− ?: |(=(%unknown verdict.first) =(%unknown verdict.rest)) [%unknown inhabited left.rest ~]
5762− [%yes inhabited left.rest ~]
5763−++ gate-free-type
5764− |= [typ=itype fuel=@ud path=(list igf-segment)]
5765− ^- igate-free
5766− ?: =(0 fuel) [%unknown | 0 ~]
5767− =. fuel (dec fuel)
5768− ?- -.typ
5769− %fn [%no & fuel `(flop path)]
5770− %atom [%yes & fuel ~]
5771− %any-atom [%yes & fuel ~]
5772− %flag [%yes & fuel ~]
5773− %const [%yes & fuel ~]
5774− %face $(typ body.typ, path [[%field name.typ] path])
5775− %cell
5776− =/ head=igate-free $(typ hed.typ, path [[%head ~] path])
5777− =/ tail=igate-free $(typ tal.typ, fuel left.head, path [[%tail ~] path])
5778− =/ inhabited=? &(inhabited.head inhabited.tail)
5779− ?: |(&(=(%yes verdict.head) !inhabited.head) &(=(%yes verdict.tail) !inhabited.tail)) [%yes | left.tail ~]
5780− ?: &(=(%no verdict.head) inhabited.tail) head(left left.tail)
5781− ?: &(=(%no verdict.tail) inhabited.head) tail
5782− ?: |(!=(%yes verdict.head) !=(%yes verdict.tail)) [%unknown inhabited left.tail ~]
5783− [%yes inhabited left.tail ~]
5784− %collection
5785− ?. |(=(%list name.typ) =(%unit name.typ)) [%unknown | fuel ~]
5786− ?. ?=([* ~] args.typ) [%unknown | fuel ~]
5787− =/ item=igate-free $(typ i.args.typ, path [[%item ~] path])
5788− item(inhabited &)
5789− %union
5790− ?~ cases.typ [%unknown | fuel ~]
5791− (gate-free-types cases.typ fuel path 0)
5792− %noun [%unknown & fuel ~]
5793− %empty [%yes | fuel ~]
5794− %var [%unknown | fuel ~]
5795− %avar [%yes & fuel ~]
5796− %rvar [%yes & fuel ~]
5797− %nvar [%yes & fuel ~]
5798− %rnvar [%yes & fuel ~]
5799− %tag [%unknown | fuel ~]
5800− %recursive [%unknown | fuel ~]
5801− %jrec [%yes & fuel ~]
5802− %grec [%unknown | fuel ~]
5803− ==
5804−::
5805−+$ igate-prelude-evidence [iface=ifile gates=(map term def)]
5806−+$ dgo [left=itype right=itype at=span context=span]
5807−+$ 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) gate-defs=(map term def) head-evidence=(unit igate-prelude-evidence) grec-index=(unit [at=path source=@t prelude=ifile shapes=(map term shape)]) defer=(unit ~) obligations=(list dgo)]
5502++$ 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)]
58085503+$ idiag [msg=tape sites=(list [at=span note=tape])]
58095504+$ iresult (each [typ=itype state=istate] idiag)
58105505+$ isample-result (each [typ=itype env=ienv state=istate] tape)
@@ -5824,7 +5519,6 @@
58245519 |= [t=itype sub=isub]
58255520 ^- itype
58265521 =. t (itype-walk t sub)
5827− ?: ?=(%grec -.t) t(args (turn args.t |=(c=itype (itype-normalize c sub))))
58285522 ?: ?=(%collection -.t) [%collection name.t (turn args.t |=(c=itype (itype-normalize c sub)))]
58295523 ?: ?=(%union -.t)
58305524 [%union (turn cases.t |=(c=itype (itype-normalize c sub))) origin.t label.t (turn args.t |=(c=itype (itype-normalize c sub)))]
@@ -5851,7 +5545,6 @@
58515545 %cell |($(t hed.t) $(t tal.t))
58525546 %recursive |
58535547 %jrec |
5854− %grec &
58555548 %collection (lien args.t |=(c=itype (itype-has-gate c)))
58565549 %face $(t body.t)
58575550 %union (lien cases.t |=(c=itype (itype-has-gate c)))
@@ -5866,7 +5559,6 @@
58665559 %any-atom |
58675560 %flag |
58685561 %noun |
5869− %empty |
58705562 ==
58715563::
58725564++ default-decimals
@@ -5876,7 +5568,6 @@
58765568 ?- -.t
58775569 %nvar [%atom %ud]
58785570 %rnvar [%atom %ud]
5879− %grec t(args (turn args.t |=(c=itype (default-decimals c))))
58805571 %collection [%collection name.t (turn args.t |=(c=itype (default-decimals c)))]
58815572 %face [%face name.t $(t body.t)]
58825573 %cell [%cell $(t hed.t) $(t tal.t)]
@@ -5918,7 +5609,6 @@
59185609 %tag |
59195610 %any-atom &
59205611 %union &((levy cases.t |=(c=itype (hole-known c state))) (levy args.t |=(c=itype (hole-known c state))))
5921− %grec (levy args.t |=(c=itype (hole-known c state)))
59225612 %collection (levy args.t |=(c=itype (hole-known c state)))
59235613 %face $(t body.t)
59245614 %fn &($(t sample.t) $(t product.t))
@@ -5928,8 +5618,6 @@
59285618++ promote-restricted-numbers
59295619 |= [state=istate env=ienv]
59305620 ^- istate
5931− :: With no written capitals, there is nothing to promote.
5932− ?~ caps.state state
59335621 =/ ids=(list @ud) (turn caps.state |=(c=icap id.c))
59345622 =/ free=(list @ud) (free-env-vars env sub.state)
59355623 |-
@@ -5966,7 +5654,6 @@
59665654 ?- -.t
59675655 ?(%tag %nvar %rnvar %avar %rvar) !(hole-known t state)
59685656 %union |((lien cases.t |=(c=itype (hole-uncertain c state))) (lien args.t |=(c=itype (hole-uncertain c state))))
5969− %grec (lien args.t |=(c=itype (hole-uncertain c state)))
59705657 %collection (lien args.t |=(c=itype (hole-uncertain c state)))
59715658 %face $(t body.t)
59725659 %fn |($(t sample.t) $(t product.t))
@@ -5998,13 +5685,11 @@
59985685 %any-atom ~
59995686 %flag ~
60005687 %noun ~
6001− %empty ~
60025688 %tag ~
60035689 %const ~
60045690 %union (zing (turn (weld args.t cases.t) |=(c=itype (itype-vars c))))
60055691 %recursive ~
60065692 %jrec ~
6007− %grec (zing (turn args.t |=(c=itype (itype-vars c))))
60085693 %collection (zing (turn args.t |=(c=itype (itype-vars c))))
60095694 %face $(t body.t)
60105695 %fn (weld $(t sample.t) $(t product.t))
@@ -6048,13 +5733,11 @@
60485733 %any-atom t
60495734 %flag t
60505735 %noun t
6051− %empty t
60525736 %tag t
60535737 %const t
60545738 %union [%union (turn cases.t |=(c=itype (itype-rename c ren))) origin.t label.t (turn args.t |=(c=itype (itype-rename c ren)))]
60555739 %recursive t
60565740 %jrec t
6057− %grec t(args (turn args.t |=(c=itype (itype-rename c ren))))
60585741 %collection [%collection name.t (turn args.t |=(c=itype (itype-rename c ren)))]
60595742 %face [%face name.t $(t body.t)]
60605743 %fn [%fn $(t sample.t) $(t product.t)]
@@ -6077,13 +5760,11 @@
60775760 %any-atom |
60785761 %flag |
60795762 %noun |
6080− %empty |
60815763 %tag |
60825764 %const |
60835765 %union |((lien cases.t |=(c=itype (itype-var-is-atom n c))) (lien args.t |=(c=itype (itype-var-is-atom n c))))
60845766 %recursive |
60855767 %jrec |
6086− %grec (lien args.t |=(c=itype (itype-var-is-atom n c)))
60875768 %collection (lien args.t |=(c=itype (itype-var-is-atom n c)))
60885769 %face $(t body.t)
60895770 %fn |($(t sample.t) $(t product.t))
@@ -6102,13 +5783,11 @@
61025783 %any-atom |
61035784 %flag |
61045785 %noun |
6105− %empty |
61065786 %tag |
61075787 %const |
61085788 %union |((lien cases.t |=(c=itype (itype-var-is-restricted n c))) (lien args.t |=(c=itype (itype-var-is-restricted n c))))
61095789 %recursive |
61105790 %jrec |
6111− %grec (lien args.t |=(c=itype (itype-var-is-restricted n c)))
61125791 %collection (lien args.t |=(c=itype (itype-var-is-restricted n c)))
61135792 %face $(t body.t)
61145793 %fn |($(t sample.t) $(t product.t))
@@ -6405,7 +6084,6 @@
64056084 ^- upat
64066085 ?- -.typ
64076086 %noun [%all ~]
6408− %empty [%empty ~]
64096087 %atom [%atom ~]
64106088 %flag [%or ~[[%atom `0] [%atom `1]]]
64116089 %const [%atom `val.literal.typ]
@@ -6540,16 +6218,6 @@
65406218 ?: &(?=(~ vars.template) ?=(%jrec -.typ.template) =(at.typ.template origin) =(name.typ.template name)) `name.i.molds
65416219 $(molds t.molds)
65426220::
6543−++ grec-visible-alias
6544− |= [origin=path name=term proof=shape args=(list itype) molds=imold-types]
6545− ^- (unit term)
6546− ?~ molds ~
6547− =/ template=ischeme template.i.molds
6548− ?. ?=(%grec -.typ.template) $(molds t.molds)
6549− ?. &(=(at.typ.template origin) =(name.typ.template name) =(proof.typ.template proof)) $(molds t.molds)
6550− ?. &((identity-union-parameters vars.template args.typ.template) =((lent vars.template) (lent args))) $(molds t.molds)
6551− `name.i.molds
6552−::
65536221++ itype-in-import
65546222 |= [t=itype iface=ifile face=term prelude=(unit ifile)]
65556223 ^- itype
@@ -6569,11 +6237,6 @@
65696237 `(crip "{(trip u.alias)}.{(trip face)}")
65706238 [%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)))]
65716239 %recursive [%recursive module.t name.t ~]
6572− %grec
6573− =/ public=(unit term) ?~(prelude ~ (grec-visible-alias at.t name.t proof.t args.t molds.u.prelude))
6574− =/ alias=(unit term) ?~(public (grec-visible-alias at.t name.t proof.t args.t molds.iface) public)
6575− =/ label=(unit @t) ?~(alias ~ ?~(public `(crip "{(trip u.alias)}.{(trip face)}") `u.alias))
6576− t(label label, args (turn args.t |=(c=itype (itype-in-import c iface face prelude))))
65776240 %jrec
65786241 =/ public=(unit term) ?~(prelude ~ (jrec-alias at.t name.t molds.u.prelude))
65796242 ?^ public t(label `u.public)
@@ -6686,29 +6349,9 @@
66866349 ?. =(names.tail ~[name]) ~
66876350 `[%jrec at.state name `name name.i.fs aura.shape.i.fs name.i.t.fs]
66886351::
6689−++ simple-source-generic-recursive
6690− |= [name=term sh=shape args=(list itype) state=istate]
6691− ^- (unit itype)
6692− ?. ?=(%generic -.sh) ~
6693− ?. ?=([@ ~] vars.sh) ~
6694− ?. ?=([* ~] args) ~
6695− ?~ grec-index.state ~
6696− ?. =(at.u.grec-index.state at.state) ~
6697− ?~ prelude.state ~
6698− ?. =(prelude.u.grec-index.state u.prelude.state) ~
6699− =/ proof=(unit shape) (~(get by shapes.u.grec-index.state) name)
6700− ?~ proof ~
6701− ?. =(u.proof sh) ~
6702− `[%grec at.state name `name sh args]
6703−::
6704−
67056352++ infer-mold-template
67066353 |= [sh=shape state=istate]
67076354 ^- (unit [template=ischeme state=istate])
6708− =/ generic=(unit itype)
6709− ?. ?=([@ ~] active.state) ~
6710− (simple-source-generic-recursive i.active.state sh ~[[%var next.state]] state)
6711− ?^ generic `[[u.generic ~[next.state]] state(next +(next.state))]
67126355 =/ direct=(unit itype)
67136356 ?. ?=([@ ~] active.state) ~
67146357 (simple-source-recursive i.active.state sh state)
@@ -6766,7 +6409,7 @@
67666409 ?~ found ~
67676410 ?^ t.found ~
67686411 result.i.found
6769− ?. ?=([%invalid ?(%aura %core %overlap) @] raw) ~
6412+ ?. ?=([%invalid ?(%aura %core) @] raw) ~
67706413 `["{(trip +>.raw)}" ~[[at.sh "invalid imported mold"]]]
67716414::
67726415:: Replay only the shape branches whose evaluation order we can prove.
@@ -6841,18 +6484,12 @@
68416484 `[[%atom aura.sh] state]
68426485 %flag `[[%flag ~] state]
68436486 %noun `[[%noun ~] state]
6844− %void `[[%empty ~] state]
68456487 %const
6846− ?. |(=(%term form.lit.sh) =(%null form.lit.sh) =(%loobean form.lit.sh)) ~
6847− ?: &(=(%loobean form.lit.sh) !|(=(0 val.lit.sh) =(1 val.lit.sh))) ~
6488+ ?. |(=(%term form.lit.sh) =(%null form.lit.sh)) ~
68486489 `[[%const lit.sh] state]
68496490 %union
68506491 =/ pairs=(list upair) (union-pairs cases.sh molds.state)
6851− ?: (lien pairs |=(p=upair =(%overlap relation.p))) ~
6852− =/ source-proof=?
6853− ?: (levy pairs |=(p=upair =(%disjoint relation.p))) &
6854− &((union-source-state-safe state 256) (union-source-distinct-tags cases.sh molds.state 256))
6855− ?. source-proof ~
6492+ ?. (levy pairs |=(p=upair =(%disjoint relation.p))) ~
68566493 =/ cs=(unit [types=(list itype) state=istate]) (infer-shape-args cases.sh state)
68576494 ?~ cs ~
68586495 `[[%union types.u.cs ~ ~ ~] state.u.cs]
@@ -6926,8 +6563,6 @@
69266563 ?~ applied ~
69276564 `[u.applied state.u.args]
69286565 ?. ?=(%generic -.u.found) ~
6929− =/ grec=(unit itype) (simple-source-generic-recursive n u.found types.u.args state.u.args)
6930− ?^ grec `[u.grec state.u.args]
69316566 ?. (distinct-params vars.u.found) ~
69326567 =/ params=(unit iparams) (bind-params vars.u.found types.u.args)
69336568 ?~ params ~
@@ -7256,7 +6891,6 @@
72566891 =/ retried=? ?=(%| -.inferred)
72576892 =? inferred retried (infer-recursive-gate d env local-state)
72586893 ?: ?=(%| -.inferred) $(ds t.ds, remaining [d remaining])
7259− ?: !=(obligations.state.p.inferred obligations.state) [%| ["deferred local definition needs unsupported inference" ~]]
72606894 =. state.p.inferred (promote-restricted-numbers state.p.inferred env)
72616895 =. 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)))
72626896 =/ hole=(unit idiag) (unresolved-hole holes.state.p.inferred holes.state state.p.inferred)
@@ -7366,8 +7000,6 @@
73667000 ?: &(?=(%collection -.expected) =(%list name.expected) (context-list-expression e))
73677001 (infer-list-context e expected env state context)
73687002 ?: ?=(%branch -.e)
7369− =/ empty-list=(unit iresult) (empty-list-null-branch e env state `[expected context])
7370− ?^ empty-list u.empty-list
73717003 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
73727004 ?~ t.arms.e [%| ["branch pattern is not supported by partial inference" ~]]
73737005 ?^ t.t.arms.e [%| ["branch is not supported by partial inference" ~]]
@@ -7481,12 +7113,7 @@
74817113 =/ target=itype (itype-walk expected sub.state)
74827114 =/ value=iresult (infer-call-context-arg i.items target env state context)
74837115 ?: ?=(%| -.value) value
7484− =/ ordinary-fit=ifit (itype-fit typ.p.value target sub.state.p.value next.state.p.value)
7485− =/ fit=ifit
7486− ?: ?=(%ok -.ordinary-fit) ordinary-fit
7487− ?: ?&(?=(%union -.target) ?=(^ prelude.state) =(origin.target `[at.u.prelude.state %element]))
7488− (program-single-generic-fit typ.p.value target sub.state.p.value next.state.p.value)
7489− ordinary-fit
7116+ =/ fit=ifit (itype-fit typ.p.value target sub.state.p.value next.state.p.value)
74907117 ?: ?=(%unknown -.fit) [%| ["list item constraint is not supported by partial inference" ~]]
74917118 ?: ?=(%bad -.fit)
74927119 ?: |((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))
@@ -7503,12 +7130,7 @@
75037130 =/ target=itype (itype-walk expected sub.state)
75047131 =/ value=iresult (infer-call-context-arg i.items target env state context)
75057132 ?: ?=(%| -.value) value
7506− =/ ordinary-fit=ifit (itype-fit typ.p.value target sub.state.p.value next.state.p.value)
7507− =/ fit=ifit
7508− ?: ?=(%ok -.ordinary-fit) ordinary-fit
7509− ?: ?&(?=(%union -.target) ?=(^ prelude.state) =(origin.target `[at.u.prelude.state %element]))
7510− (program-single-generic-fit typ.p.value target sub.state.p.value next.state.p.value)
7511− ordinary-fit
7133+ =/ fit=ifit (itype-fit typ.p.value target sub.state.p.value next.state.p.value)
75127134 ?: ?=(%unknown -.fit) [%| ["list item constraint is not supported by partial inference" ~]]
75137135 ?: ?=(%bad -.fit)
75147136 =/ missing=(unit idiag) (missing-union-tag i.items target sub.state.p.value context)
@@ -7595,11 +7217,6 @@
75957217 [%| ["list pattern needs the standard prelude in partial inference" ~]]
75967218 ?~ args.typ [%| ["list pattern is not supported by partial inference" ~]]
75977219 ?^ t.args.typ [%| ["list pattern is not supported by partial inference" ~]]
7598− =/ item-live=(unit [result=?(%yes %no %unknown) left=@ud])
7599− (itype-inhabited-proof i.args.typ sub.state caps.state 256)
7600− ?~ item-live [%| ["list element reachability needs unsupported inference" ~]]
7601− ?: =(%unknown result.u.item-live) [%| ["list element reachability needs unsupported inference" ~]]
7602− ?: =(%no result.u.item-live) [%| ["list nonempty pattern is unreachable" ~]]
76037220 ?~ arms.e [%| ["list branch is not supported by partial inference" ~]]
76047221 ?~ t.arms.e [%| ["list branch is not supported by partial inference" ~]]
76057222 ?^ t.t.arms.e [%| ["list branch is not supported by partial inference" ~]]
@@ -7653,11 +7270,6 @@
76537270 [%| ["pattern binder shadows a name" ~]]
76547271 =/ payload=(unit itype) (unit-union-payload typ)
76557272 ?~ payload [%| ["unit branch subject is not supported by partial inference" ~]]
7656− =/ payload-live=(unit [result=?(%yes %no %unknown) left=@ud])
7657− (itype-inhabited-proof u.payload sub.state.p.subject caps.state.p.subject 256)
7658− ?~ payload-live [%| ["unit payload reachability needs unsupported inference" ~]]
7659− ?: =(%unknown result.u.payload-live) [%| ["unit payload reachability needs unsupported inference" ~]]
7660− ?: =(%no result.u.payload-live) [%| ["unit present pattern is unreachable" ~]]
76617273 =/ extended=ienv [[u.binder [u.payload ~]] env]
76627274 =/ left=iresult
76637275 ?~ expected (infer-fragment val.x ?:(first-empty env extended) state.p.subject)
@@ -7810,9 +7422,7 @@
78107422 ?: ?=(%| -.subject) `subject
78117423 =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
78127424 ?. ?=(%union -.typ) `[%| ["branch is not supported by partial inference" ~]]
7813− =/ live=(unit (list itype)) (itype-live-cases cases.typ sub.state.p.subject caps.state.p.subject 4.096)
7814− ?~ live ~
7815− =/ cases=(list itype) u.live
7425+ =/ cases=(list itype) cases.typ
78167426 =/ remaining=(list itype) cases
78177427 =/ arms=(list arm) arms.e
78187428 =/ st=istate state.p.subject
@@ -7849,9 +7459,7 @@
78497459 ?: ?=(%| -.subject) `subject
78507460 =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
78517461 ?. ?=(%union -.typ) `[%| ["branch is not supported by partial inference" ~]]
7852− =/ live=(unit (list itype)) (itype-live-cases cases.typ sub.state.p.subject caps.state.p.subject 4.096)
7853− ?~ live ~
7854− =/ cases=(list itype) u.live
7462+ =/ cases=(list itype) cases.typ
78557463 =/ remaining=(list itype) cases
78567464 =/ arms=(list arm) arms.e
78577465 =/ st=istate state.p.subject
@@ -7895,9 +7503,7 @@
78957503 ?: ?=(%| -.subject) subject
78967504 =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
78977505 ?. ?=(%union -.typ) [%| ["branch is not supported by partial inference" ~]]
7898− =/ live=(unit (list itype)) (itype-live-cases cases.typ sub.state.p.subject caps.state.p.subject 4.096)
7899− ?~ live [%| ["union emptiness needs unsupported inference" ~]]
7900− =/ expanded=(unit (list ifinite)) (finite-cases u.live ~ 0)
7506+ =/ expanded=(unit (list ifinite)) (finite-cases cases.typ ~ 0)
79017507 ?~ expanded [%| ["union pattern expansion needs unsupported inference" ~]]
79027508 =/ cases=(list ifinite) u.expanded
79037509 =/ remaining=(list ifinite) cases
@@ -8018,65 +7624,9 @@
80187624 =/ cell=itype [%cell [%face head.typ [%atom aura.typ]] [%face tail.typ typ]]
80197625 [%& [%union ~[nil cell] ~ ~ ~] state.p.subject(jrec-fuel (dec jrec-fuel.state.p.subject))]
80207626::
8021−:: A bounded source-proven tree match permits flat tag patterns and
8022−:: nonbinding catch-alls. Whole-case binders cannot consume the temporary
8023−:: structural view. Pattern count and field arity are checked first.
8024−++ grec-simple-pattern
8025− |= [pat=pattern view=itype]
8026− ^- ?
8027− ?. ?=(%cell -.pat) |
8028− ?~ items.pat |
8029− =/ first=pattern i.items.pat
8030− ?. ?=(%lit -.first) |
8031− ?. =(%term form.lit.first) |
8032− =/ chosen=(unit itype) (contextual-tagged-case view val.lit.first ~)
8033− ?~ chosen |
8034− ?> ?=(%cell -.u.chosen)
8035− =/ rest=(list pattern) t.items.pat
8036− =/ arity=? ?:(?=(%cell -.tal.u.chosen) ?=([* [* ~]] rest) ?=([* ~] rest))
8037− ?. arity |
8038− (levy rest |=(p=pattern |(?=(%bind -.p) ?=(%any -.p))))
8039−::
8040−:: A catch-all with no binder is safe even when it covers both cases.
8041−:: A bound whole case still declines to avoid exporting the analysis view.
8042−++ grec-patterns-eligible
8043− |= [arms=(list arm) view=itype left=@ud]
8044− ^- ?
8045− ?~ arms &
8046− ?: =(0 left) |
8047− =/ pat=pattern pat.i.arms
8048− ?. |(?=(%any -.pat) (grec-simple-pattern pat view)) |
8049− $(arms t.arms, left (dec left))
8050−++ grec-match-view
8051− |= [e=expr subject=iresult]
8052− ^- iresult
8053− ?: ?=(%| -.subject) subject
8054− ?. ?=(%branch -.e) subject
8055− ?. (grec-direct-context typ.p.subject sub.state.p.subject) subject
8056− =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
8057− ?. ?=(%grec -.typ) subject
8058− ?~ arms.e subject
8059− =/ view=(unit [view=itype left=@ud]) (grec-unfold-view typ jrec-fuel.state.p.subject)
8060− ?~ view [%| ["recursive mold unfolding needs unsupported inference" ~]]
8061− ?. (grec-patterns-eligible arms.e view.u.view 128) subject
8062− [%& view.u.view state.p.subject(jrec-fuel left.u.view)]
8063−::
8064−:: A single-arm diagnostic only probes a direct, source-typed in-scope wing;
8065−:: other subjects retain the prior single-pattern inference path.
8066−++ grec-single-wing-subject
8067− |= [e=expr env=ienv state=istate]
8068− ^- (unit iresult)
8069− ?. ?=(%wing -.e) ~
8070− ?. ?=([@ ~] names.e) ~
8071− =/ scheme=(unit ischeme) (ienv-lookup i.names.e env)
8072− ?~ scheme ~
8073− ?. (grec-direct-context typ.u.scheme sub.state) ~
8074− `(infer-fragment e env state)
8075−::
80767627++ infer-known-union-branch-subject
80777628 |= [e=expr env=ienv subject=iresult]
80787629 ^- iresult
8079− =. subject (grec-match-view e subject)
80807630 =. subject (jrec-match-view e subject)
80817631 =/ whole=(unit iresult) (infer-known-union-whole e env subject)
80827632 ?~ whole (infer-known-union-finite e env subject ~)
@@ -8091,7 +7641,6 @@
80917641++ infer-known-union-context-subject
80927642 |= [e=expr expected=itype env=ienv subject=iresult context=span]
80937643 ^- iresult
8094− =. subject (grec-match-view e subject)
80957644 =. subject (jrec-match-view e subject)
80967645 =/ whole=(unit iresult) (infer-known-union-context-whole e expected env subject context)
80977646 ?~ whole (infer-known-union-finite e env subject `[expected context])
@@ -8144,67 +7693,9 @@
81447693 =/ subject=iresult (infer-fragment e env state)
81457694 ?: ?=(%| -.subject) ?:((union-subject-call e) `subject ~)
81467695 =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
8147− ?. |(?=(%union -.typ) ?=(%jrec -.typ) &(?=(%grec -.typ) (grec-direct-context typ.p.subject sub.state.p.subject))) ~
7696+ ?. |(?=(%union -.typ) ?=(%jrec -.typ)) ~
81487697 `subject
81497698::
8150−:: A direct wing with an already-known union may skip genuinely empty cases
8151−:: when checking a one-arm match. Other subjects keep their existing path.
8152−:: A directly known canonical list of an empty element contains only null.
8153−:: This helper never refines an opaque or variable-bound subject.
8154−++ empty-list-null-branch
8155− |= [e=expr env=ienv state=istate expected=(unit [typ=itype context=span])]
8156− ^- (unit iresult)
8157− ?. ?=(%branch -.e) ~
8158− ?~ arms.e ~
8159− ?^ t.arms.e ~
8160− ?. (unit-empty-pattern pat.i.arms.e) ~
8161− ?. ?=(%wing -.subject.e) ~
8162− ?. ?=([@ ~] names.subject.e) ~
8163− =/ scheme=(unit ischeme) (ienv-lookup i.names.subject.e env)
8164− ?~ scheme ~
8165− ?. ?=(%collection -.typ.u.scheme) ~
8166− ?. =(%list name.typ.u.scheme) ~
8167− ?~ prelude.state ~
8168− ?. =(at.u.prelude.state /lib/jibb/prelude/jibb) ~
8169− =/ standard=(unit ischeme) (find-jibb-mold %list u.prelude.state)
8170− ?~ standard ~
8171− ?. =(u.standard [[%collection %list ~[[%var 0]]] ~[0]]) ~
8172− =/ subject=iresult (infer-fragment subject.e env state)
8173− ?: ?=(%| -.subject) ~
8174− =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
8175− ?. ?=(%collection -.typ) ~
8176− ?. =(%list name.typ) ~
8177− ?~ args.typ ~
8178− ?^ t.args.typ ~
8179− =/ proof=(unit [empty=? left=@ud]) (itype-empty-proof i.args.typ sub.state.p.subject 256)
8180− ?~ proof ~
8181− ?. empty.u.proof ~
8182− ?~ expected `(infer-fragment val.i.arms.e env state.p.subject)
8183− =/ body=iresult (infer-call-context-arg val.i.arms.e typ.u.expected env state.p.subject context.u.expected)
8184− ?: ?=(%| -.body) `body
8185− =/ fit=ifit (itype-fit typ.p.body typ.u.expected sub.state.p.body next.state.p.body)
8186− ?: ?=(%unknown -.fit) `[%| ["single-case branch result constraint is not supported by partial inference" ~]]
8187− ?: ?=(%bad -.fit) `[%| ["single-case branch arm does not fit its expected type" ~[[context.u.expected "expected type"] [(span-of val.i.arms.e) "branch arm"]]]]
8188− ?: (itype-has-tag (itype-normalize typ.u.expected sub.fit))
8189− `[%| ["single-case branch result needs context in partial inference" ~]]
8190− `[%& typ.p.body state.p.body(sub sub.fit, next next.fit)]
8191−::
8192−++ known-empty-union-wing
8193− |= [e=expr env=ienv state=istate]
8194− ^- (unit iresult)
8195− ?. ?=(%wing -.e) ~
8196− ?. ?=([@ ~] names.e) ~
8197− =/ scheme=(unit ischeme) (ienv-lookup i.names.e env)
8198− ?~ scheme ~
8199− ?. (contextual-direct-union typ.u.scheme) ~
8200− =/ subject=iresult (infer-fragment e env state)
8201− ?: ?=(%| -.subject) ~
8202− =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
8203− ?. ?=(%union -.typ) ~
8204− =/ live=(unit (list itype)) (itype-live-cases cases.typ sub.state.p.subject caps.state.p.subject 4.096)
8205− ?~ live ~
8206− ?: =(u.live cases.typ) ~
8207− `subject
82087699::
82097700:: Infer changes only against a fully known record spine. Retain the
82107701:: target type; unknown spines and repeated edits remain unsupported.
@@ -8449,10 +7940,7 @@
84497940 =/ traced=iresult $(e val.e)
84507941 ?: ?=(%| -.traced) traced
84517942 $(e then.e, state state.p.traced)
8452− %tuple
8453− ?: &(?=(^ defer.state) ?=(^ prelude.state))
8454− (dg-infer-tuple-items items.e env state)
8455− (infer-simple-items items.e env state)
7943+ %tuple (infer-simple-items items.e env state)
84567944 %body
84577945 ?~ defs.e $(e final.e)
84587946 =/ local-names=(list term) (global-value-names defs.e)
@@ -8475,15 +7963,8 @@
84757963 ?: ?=(%| -.result) result
84767964 [%& typ.p.result state.p.result(globals globals.state, molds molds.state)]
84777965 %branch
8478− ?^ defer.state (dg-boolean-branch e env state)
84797966 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
84807967 ?~ t.arms.e
8481− =/ empty-list=(unit iresult) (empty-list-null-branch e env state ~)
8482− ?^ empty-list u.empty-list
8483− =/ empty-union=(unit iresult) (known-empty-union-wing subject.e env state)
8484− ?^ empty-union (infer-known-union-branch-subject e env u.empty-union)
8485− =/ single=(unit iresult) (grec-single-wing-subject subject.e env state)
8486− ?^ single (infer-known-union-branch-subject e env u.single)
84877968 ?: (single-structured-pattern e) (infer-single-case-branch e env state ~)
84887969 (infer-cell-branch e env state ~)
84897970 ?^ t.t.arms.e (infer-known-union-branch e env state)
@@ -8551,8 +8032,6 @@
85518032 =/ 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)
85528033 ?^ nested [%| u.nested]
85538034 [%| ["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)]]]]
8554− ?: &(?=(^ defer.state.p.value) !(dg-stable-fit typ.p.value typ.u.target sub.fit))
8555− [%| ["deferred cast fit needs stable inference" ~]]
85568035 =/ merged=itype (itype-merge-faces typ.p.value typ.u.target sub.fit)
85578036 [%& merged state.p.value(sub sub.fit, next next.fit)]
85588037 %crash [%& [%var next.state] state(next +(next.state))]
@@ -8602,234 +8081,6 @@
86028081 ?: ?=(%| -.out) [%| p.out]
86038082 [%& [e typ.p.out sub.state.p.out (flop projections.state.p.out)]]
86048083::
8605−:: Source-bound gate-layout evidence, confined to checked root gate
8606−:: definitions and direct unshadowed prelude calls. The prepared prelude
8607−:: interface and its retained source are trusted as a matching artifact.
8608−:: Layouts identify sample binder faces; they do not change call arity or
8609−:: authorize stripping nested value faces. Unknown origins use ordinary fit.
8610−++ direct-written-gates
8611− |= [ds=(list def) out=ivisited]
8612− ^- ivisited
8613− ?~ ds out
8614− ?: ?=(%mold -.i.ds) $(ds t.ds)
8615− ?. |(?=(%gate -.val.i.ds) ?=(%gate-wide -.val.i.ds)) $(ds t.ds)
8616− $(ds t.ds, out (~(put by out) name.i.ds &))
8617−++ direct-may-use-prelude
8618− |= [ds=(list def) root=ivisited heads=ivisited]
8619− ^- ?
8620− ?~ ds |
8621− ?: ?=(%mold -.i.ds) $(ds t.ds)
8622− =/ refs=(list term) (dependency-expr val.i.ds)
8623− =/ has-root=? (lien refs |=(n=term ?=(^ (~(get by root) n))))
8624− =/ has-head=? (lien refs |=(n=term ?=(^ (~(get by heads) n))))
8625− ?: &(has-root has-head) &
8626− $(ds t.ds)
8627−++ direct-unique-names
8628− |= [names=(list term) seen=ivisited]
8629− ^- ?
8630− ?~ names &
8631− ?: ?=(^ (~(get by seen) i.names)) |
8632− $(names t.names, seen (~(put by seen) i.names &))
8633−++ direct-prelude-evidence
8634− |= [ds=(list def) prelude=(unit ifile)]
8635− ^- (unit igate-prelude-evidence)
8636− ?~ prelude ~
8637− ?~ source.u.prelude ~
8638− =/ root=ivisited (direct-written-gates ds ~)
8639− =/ names=(list term) (turn values.u.prelude |=(e=[name=term scheme=ischeme] name.e))
8640− =/ heads=ivisited (graph-nameset names ~)
8641− ?. (direct-may-use-prelude ds root heads) ~
8642− =/ parsed (parse at.u.prelude u.source.u.prelude)
8643− ?: ?=(%| -.parsed) ~
8644− ?^ (duplicate-defs defs.p.parsed) ~
8645− ?. (direct-unique-names (global-value-names defs.p.parsed) ~) ~
8646− =/ gates=(map term def) (direct-checked-gates defs.p.parsed values.u.prelude)
8647− `[u.prelude gates]
8648−++ direct-checked-gates
8649− |= [ds=(list def) env=ienv]
8650− ^- (map term def)
8651− =/ names=(list term) (turn env |=(e=[name=term scheme=ischeme] name.e))
8652− =/ known=ivisited (graph-nameset names ~)
8653− =/ out=(map term def) ~
8654− |-
8655− ?~ ds out
8656− =/ d=def i.ds
8657− ?: ?=(%mold -.d) $(ds t.ds)
8658− ?. ?=(^ (~(get by known) name.d)) $(ds t.ds)
8659− ?. |(?=(%gate -.val.d) ?=(%gate-wide -.val.d)) $(ds t.ds)
8660− $(ds t.ds, out (~(put by out) name.d d))
8661−++ direct-find-gate
8662− |= [n=term ds=(list def)]
8663− ^- (unit def)
8664− ?~ ds ~
8665− ?: &(?=(%value -.i.ds) =(n name.i.ds)) `i.ds
8666− $(ds t.ds)
8667−++ direct-gate-sample
8668− |= d=def
8669− ^- (unit sample)
8670− ?. ?=(%value -.d) ~
8671− ?- -.val.d
8672− %gate `sample.val.d
8673− %gate-wide `sample.val.d
8674− * ~
8675− ==
8676−++ direct-sample-name
8677− |= sam=sample
8678− ^- (unit term)
8679− ?- -.sam
8680− %bind `name.sam
8681− %face `name.sam
8682− %pun `name.sam
8683− * ~
8684− ==
8685−++ direct-field-name
8686− |= f=field
8687− ^- (unit term)
8688− ?- -.f
8689− %face `name.f
8690− %pun `name.f
8691− * ~
8692− ==
8693−++ direct-slot-body
8694− |= [typ=itype name=(unit term)]
8695− ^- (unit itype)
8696− ?~ name `typ
8697− ?. ?=(%face -.typ) ~
8698− ?. =(name.typ u.name) ~
8699− `body.typ
8700−++ direct-invariant
8701− |= [a=itype b=itype sub=isub next=@ud]
8702− ^- ifit
8703− ?: (itype-face-asym a b sub) [%unknown ~]
8704− =/ forward=ifit (itype-fit a b sub next)
8705− ?. ?=(%ok -.forward) [%unknown ~]
8706− ?: (itype-face-asym a b sub.forward) [%unknown ~]
8707− =/ reverse=ifit (itype-fit b a sub.forward next.forward)
8708− ?. ?=(%ok -.reverse) [%unknown ~]
8709− reverse
8710−++ direct-function-fit
8711− |= [a=itype b=itype sam=sample sh=shape sub=isub next=@ud]
8712− ^- ifit
8713− ?. &(?=(%fn -.a) ?=(%fn -.b) ?=(%cell -.sam) ?=(%fn -.sh)) [%unknown ~]
8714− ?. ?=(%cell -.sample.sh) [%unknown ~]
8715− =/ as=(list sample) items.sam
8716− =/ bs=(list field) fields.sample.sh
8717− ?~ as [%unknown ~]
8718− ?~ t.as [%unknown ~]
8719− ?^ t.t.as [%unknown ~]
8720− ?~ bs [%unknown ~]
8721− ?~ t.bs [%unknown ~]
8722− ?^ t.t.bs [%unknown ~]
8723− ?. &(?=(%cell -.sample.a) ?=(%cell -.sample.b)) [%unknown ~]
8724− =/ an=(unit term) (direct-sample-name i.as)
8725− =/ bn=(unit term) (direct-field-name i.bs)
8726− ?: &(?=(^ an) ?=(^ bn) !=(u.an u.bn)) [%unknown ~]
8727− =/ x=(unit itype) (direct-slot-body hed.sample.a an)
8728− =/ y=(unit itype) (direct-slot-body hed.sample.b bn)
8729− ?~ x [%unknown ~]
8730− ?~ y [%unknown ~]
8731− =/ first=ifit (direct-invariant u.x u.y sub next)
8732− ?. ?=(%ok -.first) [%unknown ~]
8733− =. an (direct-sample-name i.t.as)
8734− =. bn (direct-field-name i.t.bs)
8735− ?: &(?=(^ an) ?=(^ bn) !=(u.an u.bn)) [%unknown ~]
8736− =/ x2=(unit itype) (direct-slot-body tal.sample.a an)
8737− =/ y2=(unit itype) (direct-slot-body tal.sample.b bn)
8738− ?~ x2 [%unknown ~]
8739− ?~ y2 [%unknown ~]
8740− =/ second=ifit (direct-invariant u.x2 u.y2 sub.first next.first)
8741− ?. ?=(%ok -.second) [%unknown ~]
8742− (direct-invariant product.a product.b sub.second next.second)
8743−:: This is a tentative proof: its caller must require closed call samples
8744−:: and repeat every positional check under the stable final substitution.
8745−++ direct-positional-fit
8746− |= [args=(list expr) slots=(list sample) actual=itype expected=itype env=ienv state=istate sub=isub next=@ud]
8747− ^- ifit
8748− ?~ args [%unknown ~]
8749− ?~ slots [%unknown ~]
8750− =/ last=? ?=(~ t.args)
8751− ?: !=(last ?=(~ t.slots)) [%unknown ~]
8752− =/ split=(unit [left=itype right=itype])
8753− ?: last `[actual expected]
8754− ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
8755− `[hed.actual hed.expected]
8756− ?~ split [%unknown ~]
8757− =/ x=itype left.u.split
8758− =/ y=itype right.u.split
8759− =/ expected-name=(unit term) (direct-sample-name i.slots)
8760− =/ expected-body=(unit itype) (direct-slot-body y expected-name)
8761− ?~ expected-body [%unknown ~]
8762− =. y u.expected-body
8763− =/ fit=ifit (itype-fit x y sub next)
8764− =/ accepted=? &(?=(%ok -.fit) !(itype-positional-slot-face-asym x y sub.fit))
8765− =/ result=(unit ifit)
8766− ?: accepted `fit
8767− ?. &(?=(%face -.i.slots) ?=(%fn -.shape.i.slots)) ~
8768− ?. ?=(%wing -.i.args) ~
8769− ?. ?=([@ ~] names.i.args) ~
8770− ?. (unique-value-name i.names.i.args globals.state) ~
8771− =/ source=(unit def) (~(get by gate-defs.state) i.names.i.args)
8772− ?~ source ~
8773− =/ sample=(unit sample) (direct-gate-sample u.source)
8774− ?~ sample ~
8775− =/ trial=ifit (direct-function-fit x y u.sample shape.i.slots sub next)
8776− ?. ?=(%ok -.trial) ~
8777− `trial
8778− ?~ result [%unknown ~]
8779− =. fit u.result
8780− ?: last fit
8781− ?. &(?=(%cell -.actual) ?=(%cell -.expected)) [%unknown ~]
8782− ?. ?=(%ok -.fit) [%unknown ~]
8783− $(args t.args, slots t.slots, actual tal.actual, expected tal.expected, sub sub.fit, next next.fit)
8784−++ direct-any-gate-arg
8785− |= [args=(list expr) defs=(map term def)]
8786− ^- ?
8787− ?~ args |
8788− =/ found=?
8789− ?. ?=(%wing -.i.args) |
8790− ?. ?=([@ ~] names.i.args) |
8791− ?=(^ (~(get by defs) i.names.i.args))
8792− ?: found &
8793− $(args t.args)
8794−++ direct-gate-call-fit
8795− |= [e=expr actual=itype expected=itype env=ienv state=istate]
8796− ^- (unit ifit)
8797− ?. ?=(%call -.e) ~
8798− ?~ args.e ~
8799− ?~ t.args.e ~
8800− ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
8801− ?. ?=(%wing -.head.e) ~
8802− ?. ?=([@ ~] names.head.e) ~
8803− ?. ?=(~ (ienv-lookup i.names.head.e env)) ~
8804− ?. (unique-value-name i.names.head.e globals.state) ~
8805− ?. (direct-any-gate-arg args.e gate-defs.state) ~
8806− ?~ prelude.state ~
8807− ?~ source.u.prelude.state ~
8808− ?~ head-evidence.state ~
8809− ?. =(u.prelude.state iface.u.head-evidence.state) ~
8810− ?. ?=(^ (ienv-lookup i.names.head.e values.u.prelude.state)) ~
8811− =/ head=(unit def) (~(get by gates.u.head-evidence.state) i.names.head.e)
8812− ?~ head ~
8813− =/ sam=(unit sample) (direct-gate-sample u.head)
8814− ?~ sam ~
8815− ?. ?=(%cell -.u.sam) ~
8816− =/ fit=ifit (direct-positional-fit args.e items.u.sam actual expected env state sub.state next.state)
8817− ?. ?=(%ok -.fit) ~
8818− :: Enclosing inference may add constraints after this call. Only a
8819− :: closed call-sample proof can remain stable under those later bindings.
8820− =/ actual-final=itype (itype-normalize actual sub.fit)
8821− =/ expected-final=itype (itype-normalize expected sub.fit)
8822− ?^ (itype-vars actual-final) ~
8823− ?^ (itype-vars expected-final) ~
8824− ?: |((itype-has-tag actual-final) (itype-has-tag expected-final)) ~
8825− :: A later argument may resolve a variable used by an earlier slot.
8826− :: Recheck every fit and face against the completed substitution; no
8827− :: additional binding or fresh variable is permitted in the second pass.
8828− =/ verified=ifit (direct-positional-fit args.e items.u.sam actual expected env state sub.fit next.fit)
8829− ?. ?=(%ok -.verified) ~
8830− ?. &(=(sub.fit sub.verified) =(next.fit next.verified)) ~
8831− `fit
8832−::
88338084++ infer-call-with-head
88348085 |= [e=expr env=ienv state=istate head=iresult]
88358086 ^- iresult
@@ -8856,17 +8107,7 @@
88568107 =/ fit=ifit
88578108 ?^ t.args.e (itype-fit-inner typ.p.arg sample.ht sub.st next.st & |)
88588109 (itype-fit typ.p.arg sample.ht sub.st next.st)
8859− =/ direct=(unit ifit)
8860− ?: ?=(%ok -.fit) ~
8861− (direct-gate-call-fit e typ.p.arg sample.ht env st)
8862− =. fit ?~(direct fit u.direct)
8863− ?: ?=(%unknown -.fit)
8864− ?~ defer.st [%| ["call constraint is not supported by partial inference" ~]]
8865− =/ edge=(unit dgo) (dg-eligible-ctor e typ.p.head typ.p.arg sample.ht st)
8866− ?~ edge [%| ["call constraint is not supported by partial inference" ~]]
8867− ?: (gth (lent obligations.st) 63) [%| ["call constraint is not supported by partial inference" ~]]
8868− [%& product.ht st(obligations [u.edge obligations.st])]
8869−
8110+ ?: ?=(%unknown -.fit) [%| ["call constraint is not supported by partial inference" ~]]
88708111 ?: ?=(%bad -.fit)
88718112 ?~ t.args.e
88728113 =/ missing=(unit idiag) (missing-union-tag i.args.e sample.ht sub.st (span-of head.e))
@@ -8881,10 +8122,7 @@
88818122 =/ arg-at=span ?~(bad whole-args at.u.bad)
88828123 =/ arg-type=itype ?~(bad typ.p.arg typ.u.bad)
88838124 [%| ["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)]]]]
8884− ?: &(?=(^ defer.st) !(dg-stable-call-fit typ.p.arg sample.ht product.ht sub.fit ?=(^ t.args.e)))
8885− [%| ["deferred call fit needs stable inference" ~]]
88868125 =/ face-asym=?
8887− ?^ direct |
88888126 ?^ t.args.e (itype-positional-face-asym args.e typ.p.arg sample.ht sub.fit)
88898127 (itype-face-asym typ.p.arg sample.ht sub.fit)
88908128 ?: &((itype-has-face typ.p.arg sub.fit) face-asym (itype-output-may-be-cell product.ht sub.fit))
@@ -8951,10 +8189,9 @@
89518189 [%| ["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)]]]]
89528190 [%& expected state.p.value(sub sub.fit, next next.fit)]
89538191::
8954−:: A known gate may receive an enclosing target before its argument is
8955−:: inferred when its result is open or a direct, matching named generic
8956−:: union. Opaque, recursive, tag-constrained and variable-bound union
8957−:: results keep the existing directional path.
8192+:: A known gate whose result is still an inference variable can receive
8193+:: an enclosing target before its argument is inferred. Other products
8194+:: and unresolved calls use the existing directional path unchanged.
89588195++ infer-contextual-call
89598196 |= [e=expr expected=itype env=ienv state=istate]
89608197 ^- iresult
@@ -8965,31 +8202,7 @@
89658202 =/ ht=itype (itype-walk typ.p.head sub.state.p.head)
89668203 ?. ?=(%fn -.ht) (infer-call-with-head e env state head)
89678204 =/ result=itype (itype-walk product.ht sub.state.p.head)
8968− =/ eligible=?
8969− ?: ?=(%var -.result) &
8970− :: A direct known generic union may receive the same nominal result
8971− :: context before its arguments are checked. Variable-bound origins,
8972− :: pending tags, recursive identities and unknown atoms stay open.
8973− ?. &(?=(%union -.product.ht) ?=(%union -.result) ?=(%union -.expected)) |
8974− ?~ origin.result |
8975− ?. =(origin.result origin.expected) |
8976− ?~ args.result |
8977− ?. =((lent args.result) (lent args.expected)) |
8978− ?: |((itype-has-tag (itype-normalize result sub.state.p.head)) (itype-has-tag (itype-normalize expected sub.state.p.head))) |
8979− =/ result-recursive=? (itype-has-recursive (itype-normalize result sub.state.p.head))
8980− =/ expected-recursive=? (itype-has-recursive (itype-normalize expected sub.state.p.head))
8981− =/ result-ok=?
8982− ?. result-recursive &
8983− ?~ prelude.state |
8984− &(=(at.u.prelude.state /lib/jibb/prelude/jibb) =(origin.result `[at.u.prelude.state %element]))
8985− =/ expected-ok=?
8986− ?. expected-recursive &
8987− ?~ prelude.state |
8988− &(=(at.u.prelude.state /lib/jibb/prelude/jibb) =(origin.expected `[at.u.prelude.state %element]))
8989− ?. &(result-ok expected-ok) |
8990− ?: |((itype-has-any-atom result sub.state.p.head) (itype-has-any-atom expected sub.state.p.head)) |
8991− &
8992− ?. eligible (infer-call-with-head e env state head)
8205+ ?. ?=(%var -.result) (infer-call-with-head e env state head)
89938206 ?: |(?=(%var -.expected) ?=(%avar -.expected) ?=(%rvar -.expected) |(?=(%nvar -.expected) ?=(%rnvar -.expected)) (itype-has-tag (itype-normalize expected sub.state.p.head)))
89948207 (infer-call-with-head e env state head)
89958208 =/ sub=(unit isub) (itype-unify result expected sub.state.p.head)
@@ -9077,199 +8290,9 @@
90778290 =/ st=istate state.p.value(sub sub.u.project, next next.u.project)
90788291 [%& expected st(projections [[at.e e typ.p.value expected steps.u.project] projections.st])]
90798292::
9080−:: A known literal singleton in a direct union can contextualize a
9081−:: loobean literal of the same noun. Only explicit singleton and cell
9082−:: competitors are considered; opaque or variable cases stay unknown.
9083−++ explicit-singleton-in-union
9084− |= [t=itype noun=@]
9085− ^- ?
9086− ?. ?=(%union -.t) |
9087− =/ cases=(list itype) cases.t
9088− =/ found=? |
9089− |-
9090− ?~ cases found
9091− =/ c=itype i.cases
9092− ?: ?=(%cell -.c) $(cases t.cases)
9093− ?. ?=(%const -.c) |
9094− ?: =(noun val.literal.c)
9095− ?: found |
9096− $(cases t.cases, found &)
9097− $(cases t.cases)
9098−::
9099−:: Select a written literal-headed case only when every competing case is
9100−:: also an explicit singleton-headed cell and exactly one matches. Opaque,
9101−:: variable-bound and differently shaped cases keep inference unchanged.
9102−:: This first slice supplies context to a directly called payload. Plain
9103−:: literal data and other expressions retain their existing inference path.
9104−++ contextual-atomic-arguments
9105− |= args=(list expr)
9106− ^- ?
9107− ?~ args &
9108− ?. ?=(?(%lit %wing %ctor) -.i.args) |
9109− $(args t.args)
9110−++ contextual-direct-payload-call
9111− |= e=expr
9112− ^- ?
9113− ?: ?=(%group -.e) $(e inner.e)
9114− ?. ?=(%call -.e) |
9115− ?. ?=(%wing -.head.e) |
9116− ?~ args.e |
9117− (contextual-atomic-arguments args.e)
9118−::
9119−:: A walked variable may have concealed a union inside a substituted
9120−:: structure before this arm was called. Decline in that case rather than
9121−:: deriving provenance from the already-walked type.
9122−++ contextual-simple-sub
9123− |= sub=isub
9124− ^- ?
9125− ?~ sub &
9126− ?: ?=(?(%cell %face %fn %union %collection) -.val.i.sub) |
9127− $(sub t.sub)
9128−::
9129−:: Check the syntactic root before scanning; scan substitutions once.
9130−++ grec-direct-context
9131− |= [expected=itype sub=isub]
9132− ^- ?
9133− =/ left=@ud 4.096
9134− |-
9135− ?: ?=(%face -.expected)
9136− ?: =(0 left) |
9137− $(expected body.expected, left (dec left))
9138− ?. ?=(%grec -.expected) |
9139− ?~ sub &
9140− ?: =(0 left) |
9141− ?: ?=(?(%cell %face %fn %union %collection %grec) -.val.i.sub) |
9142− $(sub t.sub, left (dec left))
9143−++ contextual-direct-union
9144− |= target=itype
9145− ^- ?
9146− ?: ?=(%face -.target) $(target body.target)
9147− ?=(%union -.target)
9148−++ contextual-tagged-case
9149− |= [target=itype tag=@ sub=isub]
9150− ^- (unit itype)
9151− ?. ?=(%union -.target) ~
9152− =/ remaining=(list itype) cases.target
9153− =/ found=(unit itype) ~
9154− =/ seen=(set @) *(set @)
9155− |-
9156− ?~ remaining found
9157− =/ c=itype i.remaining
9158− ?. ?=(%cell -.c) ~
9159− =/ head=itype hed.c
9160− ?. ?=(%const -.head) ~
9161− ?: (~(has in:..zuse seen) val.literal.head) ~
9162− =. seen (~(put in:..zuse seen) val.literal.head)
9163− ?: =(tag val.literal.head)
9164− $(remaining t.remaining, found `c)
9165− $(remaining t.remaining)
9166−::
9167−:: A bounded syntactic screen: no nested branch, cast, gate or local body
9168−:: can re-enter cell-branch retry during either inference attempt.
9169−++ closed-cell-retry-safe
9170− |= [todo=(list expr) fuel=@ud]
9171− ^- ?
9172− ?~ todo &
9173− ?: =(0 fuel) |
9174− =/ e=expr i.todo
9175− =. fuel (dec fuel)
9176− ?+ -.e |
9177− %lit $(todo t.todo)
9178− %wing $(todo t.todo)
9179− %ctor $(todo t.todo)
9180− %path $(todo t.todo)
9181− %crash $(todo t.todo)
9182− %str
9183− ?. (levy pieces.e |=(p=piece ?=(%text -.p))) |
9184− $(todo t.todo)
9185− %group $(todo [inner.e t.todo])
9186− %pair $(todo [val.e t.todo])
9187− %unit $(todo [val.e t.todo])
9188− %list $(todo (weld items.e t.todo))
9189− %tuple $(todo (weld (turn items.e |=(i=item val.i)) t.todo))
9190− %change $(todo (weld (turn edits.e |=(ed=edit val.ed)) t.todo))
9191− %call $(todo [head.e (weld args.e t.todo)])
9192− %trace $(todo [val.e then.e t.todo])
9193− ==
9194−::
9195−++ closed-cell-sub-safe
9196− |= [sub=isub fuel=@ud]
9197− ^- ?
9198− ?~ sub &
9199− ?: =(0 fuel) |
9200− ?: ?=(?(%cell %face %fn %union %collection %grec %jrec %recursive) -.val.i.sub) |
9201− $(sub t.sub, fuel (dec fuel))
9202−::
9203−++ closed-cell-branch-eligible
9204− |= [e=expr expected=itype sub=isub]
9205− ^- ?
9206− ?. &(?=(%branch -.e) ?=(%cell -.expected) (closed-cell-sub-safe sub 512)) |
9207− ?~ arms.e |
9208− ?~ t.arms.e |
9209− ?^ t.t.arms.e |
9210− =/ x=arm i.arms.e
9211− =/ y=arm i.t.arms.e
9212− ?. &(?=(%lit -.pat.x) ?=(%lit -.pat.y)) |
9213− ?. &(=(%loobean form.lit.pat.x) =(%loobean form.lit.pat.y)) |
9214− ?: =(val.lit.pat.x val.lit.pat.y) |
9215− (closed-cell-retry-safe ~[subject.e val.x val.y] 512)
9216−::
9217−:: Attempt ordinary inference first; retry from the same state only for
9218−:: the bounded non-reentrant syntax above. Preserve original value faces.
9219−++ infer-closed-cell-branch
9220− |= [e=expr expected=itype env=ienv state=istate context=span]
9221− ^- iresult
9222− ?> (closed-cell-branch-eligible e expected sub.state)
9223− ?> ?=(%branch -.e)
9224− ?> ?=(^ arms.e)
9225− ?> ?=(^ t.arms.e)
9226− =/ ordinary=iresult (infer-fragment e env state)
9227− =/ ordinary-good=?
9228− ?: ?=(%| -.ordinary) |
9229− =/ fit=ifit (itype-fit typ.p.ordinary expected sub.state.p.ordinary next.state.p.ordinary)
9230− ?=(%ok -.fit)
9231− ?: ordinary-good ordinary
9232− =/ attempt=(unit iresult)
9233− =/ x=arm i.arms.e
9234− =/ y=arm i.t.arms.e
9235− =/ subject=iresult (infer-fragment subject.e env state)
9236− ?: ?=(%| -.subject) ~
9237− =/ subject-type=itype (itype-normalize typ.p.subject sub.state.p.subject)
9238− ?: ?=(%union -.subject-type) ~
9239− =/ su=(unit isub) (itype-unify typ.p.subject [%flag ~] sub.state.p.subject)
9240− ?~ su ~
9241− =/ left=iresult (infer-call-context-arg val.x expected env state.p.subject(sub u.su) context)
9242− ?: ?=(%| -.left) ~
9243− =/ lf=ifit (itype-fit typ.p.left expected sub.state.p.left next.state.p.left)
9244− ?. ?=(%ok -.lf) ~
9245− =/ right=iresult (infer-call-context-arg val.y expected env state.p.left(sub sub.lf, next next.lf) context)
9246− ?: ?=(%| -.right) ~
9247− =/ rf=ifit (itype-fit typ.p.right expected sub.state.p.right next.state.p.right)
9248− ?. ?=(%ok -.rf) ~
9249− =/ sub=isub sub.rf
9250− =/ next=@ud next.rf
9251− =/ lt=itype (itype-normalize typ.p.left sub)
9252− =/ rt=itype (itype-normalize typ.p.right sub)
9253− =/ et=itype (itype-normalize expected sub)
9254− ?. =(lt rt) ~
9255− ?: |(?=(^ (itype-vars lt)) ?=(^ (itype-vars rt)) ?=(^ (itype-vars et))) ~
9256− ?: |((itype-has-tag lt) (itype-has-tag rt) (itype-has-tag et)) ~
9257− =/ lcheck=ifit (itype-fit typ.p.left expected sub next)
9258− ?. ?=(%ok -.lcheck) ~
9259− ?. &(=(sub.lcheck sub) =(next.lcheck next)) ~
9260− =/ rcheck=ifit (itype-fit typ.p.right expected sub next)
9261− ?. ?=(%ok -.rcheck) ~
9262− ?. &(=(sub.rcheck sub) =(next.rcheck next)) ~
9263− `[%& typ.p.left state.p.right(sub sub, next next)]
9264− ?~ attempt ordinary
9265− u.attempt
9266−::
92678293++ infer-call-context-arg
92688294 |= [e=expr expected=itype env=ienv state=istate context=span]
92698295 ^- iresult
9270− ?: &(?=(^ defer.state) ?=(%branch -.e)) (infer-fragment e env state)
9271− ?: &(?=(^ defer.state) ?=(^ prelude.state) ?=(%tuple -.e))
9272− (infer-fragment e env state)
92738296 ?: ?=(%pair -.e) $(e (pair-as-cell e))
92748297 ?: ?=(%group -.e) $(e inner.e)
92758298 ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
@@ -9282,23 +8305,6 @@
92828305 ?: ?=(%face -.target) $(target (itype-walk body.target sub.state))
92838306 ?: (explicit-proj-call e env state)
92848307 (infer-proj-context e expected env state context)
9285− :: Experimental construction only for a source-proven direct target.
9286− :: Decline any walked structural binding to retain raw-variable provenance.
9287− ?: &(?=(%grec -.target) ?=(%tuple -.e) (grec-direct-context expected sub.state))
9288− =/ unfolded=(unit [view=itype left=@ud]) (grec-unfold-view target jrec-fuel.state)
9289− ?~ unfolded [%| ["recursive mold unfolding needs unsupported inference" ~]]
9290− ?~ items.e [%| ["recursive mold constructor needs unsupported inference" ~]]
9291− =/ first=item i.items.e
9292− ?. &(?=(~ face.first) ?=(%lit -.val.first) =(%term form.lit.val.first))
9293− [%| ["recursive mold constructor needs unsupported inference" ~]]
9294− =/ chosen=(unit itype) (contextual-tagged-case view.u.unfolded val.lit.val.first sub.state)
9295− ?~ chosen [%| ["recursive mold constructor has no matching case" ~]]
9296− =/ value=iresult (infer-call-context-items items.e u.chosen env state(jrec-fuel left.u.unfolded) context)
9297− ?: ?=(%| -.value) value
9298− =/ fit=ifit (itype-fit typ.p.value u.chosen sub.state.p.value next.state.p.value)
9299− ?: ?=(%unknown -.fit) [%| ["recursive mold case needs unsupported inference" ~]]
9300− ?: ?=(%bad -.fit) [%| ["recursive mold case does not fit its source shape" ~]]
9301− [%& target state.p.value(sub sub.fit, next next.fit)]
93028308 :: Only the source-proven one-layer cell is exposed. Each recursive
93038309 :: descent consumes one written tuple; named values use ordinary fit.
93048310 ?: &(?=(%jrec -.target) ?=(%lit -.e) =(%null form.lit.e))
@@ -9316,23 +8322,17 @@
93168322 ?: ?=(%bad -.fit) [%| ["recursive mold cell does not fit its source shape" ~]]
93178323 [%& target state.p.value(sub sub.fit, next next.fit)]
93188324 ?: ?=(%call -.e) (infer-contextual-call e target env state)
9319− =/ empty-list=(unit iresult) (empty-list-null-branch e env state `[target context])
9320− ?^ empty-list u.empty-list
93218325 ?: (single-structured-pattern e)
9322− ?> ?=(%branch -.e)
9323− =/ empty-union=(unit iresult) (known-empty-union-wing subject.e env state)
9324− ?^ empty-union (infer-known-union-context-subject e target env u.empty-union context)
9325− =/ single=(unit iresult) (grec-single-wing-subject subject.e env state)
9326− ?^ single (infer-known-union-context-subject e target env u.single context)
93278326 (infer-single-case-branch e env state `[target context])
93288327 ?: (cell-binder-pattern e)
93298328 (infer-cell-branch e env state `[target context])
9330− :: In an explicit singleton context retain the written loobean noun;
9331− :: the ordinary singleton fit compares its noun, not its spelling.
8329+ :: In a loobean-singleton context retain the written loobean noun;
8330+ :: the usual final fit decides whether that value is permitted.
93328331 =/ singleton=(unit itype)
93338332 ?. ?=(%lit -.e) ~
93348333 ?. =(%loobean form.lit.e) ~
9335− ?. |(?=(%const -.target) &(?=(%union -.expected) (explicit-singleton-in-union expected val.lit.e))) ~
8334+ ?. ?=(%const -.target) ~
8335+ ?. =(%loobean form.literal.target) ~
93368336 `[%const lit.e]
93378337 ?^ singleton [%& u.singleton state]
93388338 =/ known=(unit iresult)
@@ -9343,8 +8343,6 @@
93438343 (infer-known-union-context-subject e target env u.known context)
93448344 ?: &(?=(%union -.target) ?=(%unit -.e))
93458345 (infer-unit-context e target env state context)
9346− ?: (closed-cell-branch-eligible e expected sub.state)
9347− (infer-closed-cell-branch e expected env state context)
93488346 ?: &(?=(%flag -.target) (context-union-branch e))
93498347 (infer-union-context e target env state context)
93508348 ?: &(?=(%union -.target) (context-union-branch e))
@@ -9353,34 +8351,6 @@
93538351 (infer-union-context e target env state context)
93548352 ?: &(?=(%collection -.target) =(%list name.target) (context-list-expression e))
93558353 (infer-list-context e target env state context)
9356− :: A literal-headed tuple can receive the unique case's payload
9357− :: context. The ordinary final fit still checks the complete union.
9358− =/ selected=(unit itype)
9359− ?. &((contextual-simple-sub sub.state) (contextual-direct-union expected) ?=(%union -.target) ?=(%tuple -.e) ?=(^ items.e)) ~
9360− ?~ t.items.e ~
9361− ?^ t.t.items.e ~
9362− ?. (contextual-direct-payload-call val.i.t.items.e) ~
9363− =/ first=item i.items.e
9364− ?. &(?=(~ face.first) ?=(%lit -.val.first) |(=(%term form.lit.val.first) =(%null form.lit.val.first) =(%loobean form.lit.val.first))) ~
9365− (contextual-tagged-case target val.lit.val.first sub.state)
9366− ?^ selected
9367− ?> ?=(%tuple -.e)
9368− :: On this bounded shallow-call shape, preserve any inference that
9369− :: already fits before trying the new contextual path. Neither pass
9370− :: can recursively select a nested tuple from the atomic arguments.
9371− =/ ordinary=(unit iresult)
9372− =/ initial=iresult (infer-fragment e env state)
9373− ?: ?=(%| -.initial) ~
9374− =/ fit=ifit (itype-fit typ.p.initial target sub.state.p.initial next.state.p.initial)
9375− ?. ?=(%ok -.fit) ~
9376− `initial
9377− ?^ ordinary u.ordinary
9378− =/ value=iresult (infer-call-context-items items.e u.selected env state context)
9379− ?: ?=(%| -.value) value
9380− =/ fit=ifit (itype-fit typ.p.value u.selected sub.state.p.value next.state.p.value)
9381− ?: ?=(%unknown -.fit) [%| ["tagged case needs unsupported inference" ~]]
9382− ?: ?=(%bad -.fit) [%| ["tagged case does not fit its expected type" ~[[context "expected union case"] [(span-of e) "value"]]]]
9383− [%& typ.p.value state.p.value(sub sub.fit, next next.fit)]
93848354 ?: &(?=(%cell -.target) ?=(%tuple -.e))
93858355 (infer-call-context-items items.e target env state context)
93868356 (infer-fragment e env state)
@@ -9483,7 +8453,7 @@
94838453 ?~ t.names |
94848454 =. typ (itype-walk typ sub)
94858455 ?: ?=(%cell -.typ) $(typ tal.typ, names t.names)
9486− |(?=(%union -.typ) ?=(%collection -.typ) ?=(%recursive -.typ) ?=(%jrec -.typ) ?=(%grec -.typ) ?=(%noun -.typ) ?=(%fn -.typ) ?=(%tag -.typ))
8456+ |(?=(%union -.typ) ?=(%collection -.typ) ?=(%recursive -.typ) ?=(%jrec -.typ) ?=(%noun -.typ) ?=(%fn -.typ) ?=(%tag -.typ))
94878457::
94888458++ cell-binder-pattern
94898459 |= e=expr
@@ -9554,7 +8524,6 @@
95548524 %any-atom "@"
95558525 %flag "?"
95568526 %noun "*"
9557− %empty "!!"
95588527 %tag (trip txt.literal.t)
95598528 %const (trip txt.literal.t)
95608529 %union
@@ -9563,7 +8532,6 @@
95638532 "({(trip u.label.t)} {(show-itype-cases args.t sub)})"
95648533 %recursive ?~(label.t "recursive mold" (trip u.label.t))
95658534 %jrec ?~(label.t "recursive mold" (trip u.label.t))
9566− %grec ?~(label.t "recursive mold" "({(trip u.label.t)} {(show-itype-cases args.t sub)})")
95678535 %collection "({(trip name.t)} {(show-itype-cases args.t sub)})"
95688536 %face "[{(trip name.t)}={(show-itype-context body.t sub)}]"
95698537 %fn "$-({(show-itype-context sample.t sub)} {(show-itype-context product.t sub)})"
@@ -9607,13 +8575,11 @@
96078575 %any-atom |
96088576 %flag |
96098577 %noun |
9610− %empty |
96118578 %tag |
96128579 %const |
96138580 %union |((lien cases.typ |=(c=itype (itype-has-nvar c))) (lien args.typ |=(c=itype (itype-has-nvar c))))
96148581 %recursive |
96158582 %jrec |
9616− %grec (lien args.typ |=(c=itype (itype-has-nvar c)))
96178583 %collection (lien args.typ |=(c=itype (itype-has-nvar c)))
96188584 %face $(typ body.typ)
96198585 %fn |($(typ sample.typ) $(typ product.typ))
@@ -9725,13 +8691,11 @@
97258691 %any-atom |
97268692 %flag |
97278693 %noun |
9728− %empty |
97298694 %tag |
97308695 %const |
97318696 %union |((lien cases.t |=(c=itype (has-atom-var n c))) (lien args.t |=(c=itype (has-atom-var n c))))
97328697 %recursive |
97338698 %jrec |
9734− %grec (lien args.t |=(c=itype (has-atom-var n c)))
97358699 %collection (lien args.t |=(c=itype (has-atom-var n c)))
97368700 %face $(t body.t)
97378701 %fn |($(t sample.t) $(t product.t))
@@ -9875,8 +8839,6 @@
98758839++ infer-recursive-gate
98768840 |= [d=def env=ienv state=istate]
98778841 ^- iresult
9878− ?^ defer.state [%| ["deferred recursive inference is unsupported" ~]]
9879− =. gate-defs.state ~
98808842 ?. ?=(%value -.d) [%| ["recursive definition is not a gate" ~]]
98818843 ?. |(?=(%gate -.val.d) ?=(%gate-wide -.val.d))
98828844 [%| ["recursive definition is not a gate" ~]]
@@ -10100,13 +9062,12 @@
101009062++ infer-gate-group
101019063 |= [ds=(list def) env=ienv state=istate]
101029064 ^- ilocal-result
10103− ?^ defer.state [%| ["deferred recursive inference is unsupported" ~]]
101049065 =/ names=(list term) (global-value-names ds)
101059066 ?. (levy names |=(n=term (unique-value-name n names)))
101069067 [%| ["recursive group contains duplicate names" ~]]
101079068 ?: (lien names |=(n=term ?=(^ (ienv-lookup n env))))
101089069 [%| ["recursive group shadows a name" ~]]
10109− =/ scoped=istate state(globals (weld names globals.state), gate-defs ~)
9070+ =/ scoped=istate state(globals (weld names globals.state))
101109071 =/ seeded=igate-seeds (seed-gate-group ds env scoped)
101119072 ?: ?=(%| -.seeded) seeded
101129073 =/ seeds=ienv (group-seed-env entries.p.seeded ~)
@@ -10140,11 +9101,35 @@
101409101 `[entry u.rest]
101419102::
101429103++ add-supported-defs
10143− |= [ds=(list def) all-defs=(list def) checked=(map term def) heads=(unit igate-prelude-evidence) 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)]
9104+ |= [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)]
101449105 ^- [env=ienv artifacts=(list iwidth-definition)]
10145− (add-supported-defs-core ds all-defs checked heads env molds globals externals surs mark-externals marks jimports reserved-molds at prelude artifacts ~)
9106+ ?~ ds [env artifacts]
9107+ =/ d=def i.ds
9108+ ?: ?=(%mold -.d) $(ds t.ds)
9109+ ?. (unique-value-name name.d globals) $(ds t.ds)
9110+ ?^ (ienv-lookup name.d env) $(ds t.ds)
9111+ =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
9112+ =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude ~ 256 ~]
9113+ =. initial (reserve-def-caps val.d initial)
9114+ =/ result=iresult (infer-fragment val.d env initial)
9115+ =? result ?=(%| -.result) (infer-recursive-gate d env initial)
9116+ ?: ?=(%| -.result) $(ds t.ds)
9117+ =. state.p.result (promote-restricted-numbers state.p.result env)
9118+ =. 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)))
9119+ ?^ (unresolved-hole holes.state.p.result holes.initial state.p.result) $(ds t.ds)
9120+ ?: (constrained-capitals caps.state.p.result sub.state.p.result) $(ds t.ds)
9121+ =/ typ=itype (default-decimals (itype-normalize typ.p.result sub.state.p.result))
9122+ ?: |((pending-tags tags.state.p.result sub.state.p.result) (itype-has-tag typ)) $(ds t.ds)
9123+ ?: (unsupported-atom-vars typ caps.state.p.result binders.state.p.result sub.state.p.result) $(ds t.ds)
9124+ =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
9125+ ?: (gth (lent vars) 26) $(ds t.ds)
9126+ =/ finalized=(unit (list iwprojection))
9127+ (width-finalize projections.state.p.result sub.state.p.result vars)
9128+ ?~ finalized $(ds t.ds)
9129+ =? artifacts ?=(^ u.finalized)
9130+ [[name.d val.d typ sub.state.p.result (flop u.finalized)] artifacts]
9131+ $(ds t.ds, env [[name.d [typ vars]] env])
101469132::
10147−
101489133+$ iresolved [env=ienv grouped=(list term) artifacts=(list iwidth-definition)]
101499134+$ iadj (map term (list term))
101509135+$ ivisited (map term ?)
@@ -10258,57 +9243,6 @@
102589243++ resolve-groups
102599244 |= [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)]
102609245 ^- iresolved
10261− (resolve-groups-core ds molds globals externals surs mark-externals marks jimports reserved-molds at prelude ~)
10262−::
10263−
10264−+$ iadded-definition
10265− [env=ienv checked=(map term def) artifacts=(list iwidth-definition)]
10266−++ add-supported-result
10267− |= [d=def result=iresult initial=istate env=ienv checked=(map term def) artifacts=(list iwidth-definition)]
10268− ^- (unit iadded-definition)
10269− ?> ?=(%value -.d)
10270− ?: ?=(%| -.result) ~
10271− =. state.p.result (promote-restricted-numbers state.p.result env)
10272− =. 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)))
10273− ?^ (unresolved-hole holes.state.p.result holes.initial state.p.result) ~
10274− ?: (constrained-capitals caps.state.p.result sub.state.p.result) ~
10275− =/ typ=itype (default-decimals (itype-normalize typ.p.result sub.state.p.result))
10276− ?: |((pending-tags tags.state.p.result sub.state.p.result) (itype-has-tag typ)) ~
10277− ?: (unsupported-atom-vars typ caps.state.p.result binders.state.p.result sub.state.p.result) ~
10278− =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
10279− ?: (gth (lent vars) 26) ~
10280− =/ finalized=(unit (list iwprojection))
10281− (width-finalize projections.state.p.result sub.state.p.result vars)
10282− ?~ finalized ~
10283− =? artifacts ?=(^ u.finalized)
10284− [[name.d val.d typ sub.state.p.result (flop u.finalized)] artifacts]
10285− =? checked |(?=(%gate -.val.d) ?=(%gate-wide -.val.d)) (~(put by checked) name.d d)
10286− `[[[name.d [typ vars]] env] checked artifacts]
10287−++ add-supported-defs-core
10288− |= [ds=(list def) all-defs=(list def) checked=(map term def) heads=(unit igate-prelude-evidence) 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) index=(unit [at=path source=@t prelude=ifile shapes=(map term shape)])]
10289− ^- [env=ienv artifacts=(list iwidth-definition)]
10290− ?~ ds [env artifacts]
10291− =/ d=def i.ds
10292− ?: ?=(%mold -.d) $(ds t.ds)
10293− ?: (lien (program-recovery-names all-defs) |=(n=term =(n name.d))) $(ds t.ds)
10294− ?. (unique-value-name name.d globals) $(ds t.ds)
10295− ?^ (ienv-lookup name.d env) $(ds t.ds)
10296− =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
10297− =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude ~ 256 ~ ~ ~ ~ ~ ~]
10298− =. grec-index.initial index
10299− =. gate-defs.initial checked
10300− =. head-evidence.initial heads
10301− =. initial (reserve-def-caps val.d initial)
10302− =/ result=iresult (infer-fragment val.d env initial)
10303− =? result ?=(%| -.result) (infer-recursive-gate d env initial)
10304− =/ added=(unit iadded-definition)
10305− (add-supported-result d result initial env checked artifacts)
10306− ?~ added $(ds t.ds)
10307− $(ds t.ds, env env.u.added, checked checked.u.added, artifacts artifacts.u.added)
10308−::
10309−++ resolve-groups-core
10310− |= [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) index=(unit [at=path source=@t prelude=ifile shapes=(map term shape)])]
10311− ^- iresolved
103129246 =/ env=ienv ~
103139247 =/ grouped=(list term) ~
103149248 =/ artifacts=(list iwidth-definition) ~
@@ -10317,12 +9251,10 @@
103179251 =/ graph=iadj (graph-make-forward ds nameset ~)
103189252 =/ components=icomponents (graph-components ds names)
103199253 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
10320− =/ heads=(unit igate-prelude-evidence) (direct-prelude-evidence ds prelude)
103219254 |-
103229255 =/ next=[env=ienv artifacts=(list iwidth-definition)]
10323− (add-supported-defs-core ds ds (direct-checked-gates ds env) heads env molds globals externals surs mark-externals marks jimports reserved-molds at prelude artifacts index)
10324− =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude ~ 256 ~ ~ ~ ~ ~ ~]
10325− =. grec-index.initial index
9256+ (add-supported-defs ds env molds globals externals surs mark-externals marks jimports reserved-molds at prelude artifacts)
9257+ =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude ~ 256 ~]
103269258 =/ out=iresolved (add-groups ds components graph env.next grouped artifacts.next initial)
103279259 ?: =(env env.out) out
103289260 $(env env.out, grouped grouped.out, artifacts artifacts.out)
@@ -10571,288 +9503,37 @@
105719503 %overlap
105729504 %unknown
105739505::
10574−:: A source-only fallback for literal-tagged cells and one-hop local
10575−:: generic applications. It screens all work before ordinary inference.
10576−++ union-simple-shape-budget
10577− |= [s=shape fuel=@ud vars=(unit (list @t))]
10578− ^- (unit @ud)
10579− ?: =(0 fuel) ~
10580− =. fuel (dec fuel)
10581− ?- -.s
10582− ?(%aura %noun %void %flag) `fuel
10583− %tvar
10584− ?~ vars `fuel
10585− ?:((lien u.vars |=(n=@t =(n name.s))) `fuel ~)
10586− %const
10587− ?. |(=(%term form.lit.s) =(%null form.lit.s) =(%loobean form.lit.s)) ~
10588− ?: &(=(%loobean form.lit.s) !|(=(0 val.lit.s) =(1 val.lit.s))) ~
10589− `fuel
10590− %cell (union-simple-fields-budget fields.s fuel vars)
10591− %fn
10592− =/ left=(unit @ud) $(s sample.s, fuel fuel)
10593− ?~ left ~
10594− $(s product.s, fuel u.left)
10595− * ~
10596− ==
10597−++ union-simple-fields-budget
10598− |= [fields=(list field) fuel=@ud vars=(unit (list @t))]
10599− ^- (unit @ud)
10600− ?~ fields `fuel
10601− ?: =(0 fuel) ~
10602− =/ field-shape=shape
10603− ?- -.i.fields
10604− %bare shape.i.fields
10605− %face shape.i.fields
10606− %pun [%ref at.i.fields ~[name.i.fields]]
10607− ==
10608− =/ head=(unit @ud) (union-simple-shape-budget field-shape (dec fuel) vars)
10609− ?~ head ~
10610− $(fields t.fields, fuel u.head)
10611−++ union-source-find
10612− |= [n=term molds=imolds fuel=@ud]
10613− ^- (unit [body=shape left=@ud])
10614− =/ found=(unit shape) ~
10615− |-
10616− ?~ molds
10617− ?~ found ~
10618− `[u.found fuel]
10619− ?: =(0 fuel) ~
10620− ?: =(n name.i.molds)
10621− ?^ found ~
10622− $(molds t.molds, fuel (dec fuel), found `body.i.molds)
10623− $(molds t.molds, fuel (dec fuel))
10624−++ union-source-args-budget
10625− |= [vars=(list @t) args=(list shape) fuel=@ud]
10626− ^- (unit @ud)
10627− =/ seen=(set @t) *(set @t)
10628− |-
10629− ?~ vars ?~(args `fuel ~)
10630− ?~ args ~
10631− ?: =(0 fuel) ~
10632− ?: (~(has in:..zuse seen) i.vars) ~
10633− =/ arg=(unit @ud) (union-simple-shape-budget i.args (dec fuel) ~)
10634− ?~ arg ~
10635− $(vars t.vars, args t.args, fuel u.arg, seen (~(put in:..zuse seen) i.vars))
10636−++ union-source-cell-tag
10637− |= s=shape
10638− ^- (unit @)
10639− ?. ?=(%cell -.s) ~
10640− ?~ fields.s ~
10641− ?~ t.fields.s ~
10642− ?. ?=(%bare -.i.fields.s) ~
10643− =/ head=shape shape.i.fields.s
10644− ?. ?=(%const -.head) ~
10645− ?. |(=(%term form.lit.head) =(%null form.lit.head) =(%loobean form.lit.head)) ~
10646− ?: &(=(%loobean form.lit.head) !|(=(0 val.lit.head) =(1 val.lit.head))) ~
10647− `val.lit.head
10648−++ union-source-case-tag
10649− |= [s=shape molds=imolds fuel=@ud]
10650− ^- (unit [tag=@ left=@ud])
10651− ?: ?=(%cell -.s)
10652− =/ tag=(unit @) (union-source-cell-tag s)
10653− ?~ tag ~
10654− =/ left=(unit @ud) (union-simple-shape-budget s fuel ~)
10655− ?~ left ~
10656− `[u.tag u.left]
10657− ?. ?=(%apply -.s) ~
10658− ?. ?=([@ ~] ref.s) ~
10659− ?: =(0 fuel) ~
10660− =/ found=(unit [body=shape left=@ud]) (union-source-find i.ref.s molds (dec fuel))
10661− ?~ found ~
10662− ?. ?=(%generic -.body.u.found) ~
10663− ?~ vars.body.u.found ~
10664− =/ tag=(unit @) (union-source-cell-tag body.body.u.found)
10665− ?~ tag ~
10666− =/ args=(unit @ud) (union-source-args-budget vars.body.u.found args.s left.u.found)
10667− ?~ args ~
10668− =/ left=(unit @ud) (union-simple-shape-budget body.body.u.found u.args `vars.body.u.found)
10669− ?~ left ~
10670− `[u.tag u.left]
10671−++ union-source-distinct-tags
10672− |= [cases=(list shape) molds=imolds fuel=@ud]
10673− ^- ?
10674− =/ seen=(set @) *(set @)
10675− =/ has-application=? |
10676− |-
10677− ?~ cases has-application
10678− ?: =(0 fuel) |
10679− =/ item=(unit [tag=@ left=@ud]) (union-source-case-tag i.cases molds (dec fuel))
10680− ?~ item |
10681− ?: (~(has in:..zuse seen) tag.u.item) |
10682− $(cases t.cases, fuel left.u.item, seen (~(put in:..zuse seen) tag.u.item), has-application |(has-application ?=(%apply -.i.cases)))
10683−::
10684−:: This inference-only screen bounds inherited work that the small source
10685−:: slice may consult. It does not authenticate a caller-created state.
10686−++ union-state-leaf
10687− |= t=itype
10688− ^- ?
10689− ?=(?(%var %avar %rvar %nvar %rnvar %atom %any-atom %flag %noun %empty %const) -.t)
10690−++ union-state-params-budget
10691− |= [params=iparams fuel=@ud]
10692− ^- (unit @ud)
10693− ?~ params `fuel
10694− ?: =(0 fuel) ~
10695− ?. (union-state-leaf typ.i.params) ~
10696− $(params t.params, fuel (dec fuel))
10697−++ union-state-sub-budget
10698− |= [sub=isub fuel=@ud]
10699− ^- (unit @ud)
10700− ?~ sub `fuel
10701− ?: =(0 fuel) ~
10702− ?. (union-state-leaf val.i.sub) ~
10703− $(sub t.sub, fuel (dec fuel))
10704−++ union-state-caps-budget
10705− |= [caps=icaps fuel=@ud]
10706− ^- (unit @ud)
10707− ?~ caps `fuel
10708− ?: =(0 fuel) ~
10709− $(caps t.caps, fuel (dec fuel))
10710−++ union-state-active-budget
10711− |= [active=(list term) fuel=@ud]
10712− ^- (unit @ud)
10713− ?~ active `fuel
10714− ?: =(0 fuel) ~
10715− $(active t.active, fuel (dec fuel))
10716−++ union-state-tags-budget
10717− |= [tags=(list ipending) fuel=@ud]
10718− ^- (unit @ud)
10719− ?~ tags `fuel
10720− ?: =(0 fuel) ~
10721− $(tags t.tags, fuel (dec fuel))
10722−++ union-source-state-safe
10723− |= [state=istate fuel=@ud]
10724− ^- ?
10725− ?^ grec-index.state |
10726− ?^ holes.state |
10727− ?^ defer.state |
10728− ?^ obligations.state |
10729− =/ params=(unit @ud) (union-state-params-budget params.state fuel)
10730− ?~ params |
10731− =/ sub=(unit @ud) (union-state-sub-budget sub.state u.params)
10732− ?~ sub |
10733− =/ caps=(unit @ud) (union-state-caps-budget caps.state u.sub)
10734− ?~ caps |
10735− =/ active=(unit @ud) (union-state-active-budget active.state u.caps)
10736− ?~ active |
10737− ?=(^ (union-state-tags-budget tags.state u.active))
10738−::
10739−:: Positive overlap witnesses from parsed, one-hop local source only.
10740−:: Unknown or exhausted work returns no witness, never disjointness.
10741−+$ uow-case [at=span head=@ payload=upat]
10742−++ union-overlap-primitive
10743− |= s=shape
10744− ^- (unit upat)
10745− ?- -.s
10746− %aura `[%atom ~]
10747− %noun `[%all ~]
10748− %void `[%empty ~]
10749− %flag `[%flag ~]
10750− %const
10751− ?. |(=(%term form.lit.s) =(%null form.lit.s) =(%loobean form.lit.s)) ~
10752− ?: &(=(%loobean form.lit.s) !|(=(0 val.lit.s) =(1 val.lit.s))) ~
10753− `[%atom `val.lit.s]
10754− * ~
10755− ==
10756−++ union-overlap-case
10757− |= [s=shape molds=imolds fuel=@ud]
10758− ^- (unit [item=uow-case left=@ud])
10759− ?: =(0 fuel) ~
10760− =. fuel (dec fuel)
10761− :: Each body has exactly two fields; an application has exactly one
10762− :: parameter and one concrete primitive argument. The full mold table
10763− :: is scanned to establish unique ownership.
10764− =/ expanded=(unit [body=shape param=(unit [name=@t pat=upat]) left=@ud])
10765− ?: ?=(%cell -.s) `[s ~ fuel]
10766− ?. ?=(%apply -.s) ~
10767− ?. ?=([@ ~] ref.s) ~
10768− ?. ?=([* ~] args.s) ~
10769− ?: =(0 fuel) ~
10770− =/ found=(unit [body=shape left=@ud]) (union-source-find i.ref.s molds (dec fuel))
10771− ?~ found ~
10772− ?. ?=(%generic -.body.u.found) ~
10773− ?. ?=([@ ~] vars.body.u.found) ~
10774− ?: =(0 left.u.found) ~
10775− =/ argument=(unit upat) (union-overlap-primitive i.args.s)
10776− ?~ argument ~
10777− `[body.body.u.found `[i.vars.body.u.found u.argument] (dec left.u.found)]
10778− ?~ expanded ~
10779− =/ body=shape body.u.expanded
10780− ?. ?=(%cell -.body) ~
10781− ?. ?=([* * ~] fields.body) ~
10782− :: Charge the cell, two fields, and the head and payload nodes.
10783− ?: (lth left.u.expanded 5) ~
10784− =/ head=(unit @) (union-source-cell-tag body)
10785− ?~ head ~
10786− =/ field=field i.t.fields.body
10787− =/ payload=shape
10788− ?- -.field
10789− %bare shape.field
10790− %face shape.field
10791− %pun [%ref at.field ~[name.field]]
10792− ==
10793− =/ pattern=(unit upat)
10794− ?: ?=(%tvar -.payload)
10795− ?~ param.u.expanded ~
10796− ?. =(name.payload name.u.param.u.expanded) ~
10797− `pat.u.param.u.expanded
10798− (union-overlap-primitive payload)
10799− ?~ pattern ~
10800− `[[at.s u.head u.pattern] (sub left.u.expanded 5)]
10801−++ union-overlap-against
10802− |= [first=uow-case rest=(list shape) molds=imolds fuel=@ud]
10803− ^- (unit [witness=(unit upair) left=@ud])
10804− ?~ rest `[~ fuel]
10805− ?: =(0 fuel) ~
10806− =/ other=(unit [item=uow-case left=@ud]) (union-overlap-case i.rest molds (dec fuel))
10807− ?~ other ~
10808− ?: &(=(head.first head.item.u.other) =(%overlap (union-relate payload.first payload.item.u.other)))
10809− `[`[at.first at.item.u.other %overlap] left.u.other]
10810− $(rest t.rest, fuel left.u.other)
10811−++ union-source-overlap
10812− |= [cases=(list shape) molds=imolds fuel=@ud]
10813− ^- (unit upair)
10814− ?~ cases ~
10815− ?~ t.cases ~
10816− ?: =(0 fuel) ~
10817− =/ first=(unit [item=uow-case left=@ud]) (union-overlap-case i.cases molds (dec fuel))
10818− ?~ first ~
10819− =/ found=(unit [witness=(unit upair) left=@ud])
10820− (union-overlap-against item.u.first t.cases molds left.u.first)
10821− ?~ found ~
10822− ?^ witness.u.found witness.u.found
10823− $(cases t.cases, fuel left.u.found)
10824−::
10825−++ union-pairs
10826− |= [cases=(list shape) molds=imolds]
10827− ^- (list upair)
10828− ?~ cases ~
10829− =/ first=shape i.cases
10830− =/ a=upat (project-union-mold first molds ~)
10831− =/ pairs=(list upair)
10832− %+ turn t.cases
10833− |= second=shape
10834− ^- upair
10835− [at.first at.second (union-relate a (project-union-mold second molds ~))]
10836− (weld pairs $(cases t.cases))
10837−::
10838−:: A closed structural mold supplies no equation to determine a hole.
10839−:: Applications, references, unbound capitals and unions are unproved.
10840−++ simple-mold-hole
10841− |= sh=shape
10842− ^- (unit (unit span))
10843− ?: ?=(%generic -.sh)
10844− ?~ vars.sh ~
10845− ?. (distinct-params vars.sh) ~
10846− (simple-mold-hole-in body.sh vars.sh)
10847− (simple-mold-hole-in sh ~)
10848−++ simple-mold-hole-in
10849− |= [sh=shape vars=(list @t)]
10850− ^- (unit (unit span))
10851− ?- -.sh
10852− %hole ``at.sh
10853− ?(%aura %noun %void %flag %const) `~
10854− %tvar ?:((lien vars |=(v=@t =(v name.sh))) `~ ~)
10855− %cell (simple-mold-field-holes fields.sh vars)
9506+++ union-pairs
9507+ |= [cases=(list shape) molds=imolds]
9508+ ^- (list upair)
9509+ ?~ cases ~
9510+ =/ first=shape i.cases
9511+ =/ a=upat (project-union-mold first molds ~)
9512+ =/ pairs=(list upair)
9513+ %+ turn t.cases
9514+ |= second=shape
9515+ ^- upair
9516+ [at.first at.second (union-relate a (project-union-mold second molds ~))]
9517+ (weld pairs $(cases t.cases))
9518+::
9519+:: A closed structural mold supplies no equation to determine a hole.
9520+:: Applications, references, unbound capitals and unions are unproved.
9521+++ simple-mold-hole
9522+ |= sh=shape
9523+ ^- (unit (unit span))
9524+ ?: ?=(%generic -.sh)
9525+ ?~ vars.sh ~
9526+ ?. (distinct-params vars.sh) ~
9527+ (simple-mold-hole-in body.sh vars.sh)
9528+ (simple-mold-hole-in sh ~)
9529+++ simple-mold-hole-in
9530+ |= [sh=shape vars=(list @t)]
9531+ ^- (unit (unit span))
9532+ ?- -.sh
9533+ %hole ``at.sh
9534+ ?(%aura %noun %void %flag %const) `~
9535+ %tvar ?:((lien vars |=(v=@t =(v name.sh))) `~ ~)
9536+ %cell (simple-mold-field-holes fields.sh vars)
108569537 %fn
108579538 =/ a=(unit (unit span)) $(sh sample.sh)
108589539 ?~ a ~
@@ -10975,11 +9656,6 @@
109759656 ?. ?=(%union -.sh) (crip "+$ {(trip name.d)}: not checked")
109769657 =/ pairs=(list upair) (union-pairs cases.sh molds)
109779658 =/ overlapping=(list upair) (skim pairs |=(p=upair =(%overlap relation.p)))
10978− =. overlapping
10979− ?^ overlapping overlapping
10980− ?. (lien pairs |=(p=upair =(%unknown relation.p))) ~
10981− =/ witness=(unit upair) (union-source-overlap cases.sh molds 256)
10982− ?~(witness ~ ~[u.witness])
109839659 ?^ overlapping
109849660 =/ p=upair i.overlapping
109859661 =/ summary=@t (crip "+$ {(trip name.d)}: overlapping cases; mold not checked")
@@ -10987,9 +9663,7 @@
109879663 =/ second=@t (show-error src [file line.beg.second.p col.beg.second.p "overlapping case"])
109889664 (of-wain:format ~[summary first second])
109899665 ?: (lien pairs |=(p=upair =(%unknown relation.p)))
10990− ?. (union-source-distinct-tags cases.sh molds 256)
10991− (crip "+$ {(trip name.d)}: case disjointness unresolved; mold not checked")
10992− (crip "+$ {(trip name.d)}: cases proven disjoint; mold not checked")
9666+ (crip "+$ {(trip name.d)}: case disjointness unresolved; mold not checked")
109939667 (crip "+$ {(trip name.d)}: cases proven disjoint; mold not checked")
109949668::
109959669:: +show-inference-diagnostic: a partial report with both source sites
@@ -11046,14 +9720,7 @@
110469720+$ jbundle (list jsource)
110479721+$ jcache (list [at=path iface=ifile])
110489722+$ jfile-result (each [iface=ifile cache=jcache] @t)
11049−:: Overlap evidence retains the exact source that supplied its spans.
11050−:: Ordinary Jibb imports preserve this evidence through the resolver.
11051−+$ jfile-overlap [file=path source=@t name=term cases=upair]
11052−+$ jfile-failure [message=@t overlap=(unit jfile-overlap)]
11053−+$ jfile-detailed-result (each [iface=ifile cache=jcache] jfile-failure)
110549723+$ jimports-result (each [resolved=ijimports cache=jcache] @t)
11055−:: Preserve an imported overlap's original file and source across the graph.
11056−+$ jimports-detailed-result (each [resolved=ijimports cache=jcache] jfile-failure)
110579724::
110589725:: Written record fields each have their own lexical record scope.
110599726+$ written-fields (map term span)
@@ -11326,43 +9993,6 @@
113269993 (skim defs.mod |=(d=def !&(?=(%mold -.d) =(%poke name.d))))
113279994 (module-scope-valid mod(defs remaining) prelude-values prelude-molds)
113289995::
11329−:: A detailed failure is attached only to the first mold that actually
11330−:: failed in this check, using that module's checked source mold table.
11331−+$ imold-failure [message=@t overlap=(unit [name=term cases=upair])]
11332−:: Validate a generic wrapper without an unbounded duplicate-name pass.
11333−++ module-mold-params-valid
11334− |= [vars=(list @t) seen=(set @t) fuel=@ud]
11335− ^- ?
11336− ?~ vars &
11337− ?: =(0 fuel) |
11338− ?: (~(has in:..zuse seen) i.vars) |
11339− $(vars t.vars, seen (~(put in:..zuse seen) i.vars), fuel (dec fuel))
11340−++ module-mold-overlap
11341− |= [m=[name=term body=shape] molds=imolds]
11342− ^- (unit upair)
11343− =/ sh=shape body.m
11344− =/ valid=?
11345− ?. ?=(%generic -.sh) &
11346− ?~ vars.sh |
11347− (module-mold-params-valid vars.sh *(set @t) 256)
11348− ?. valid ~
11349− =? sh ?=(%generic -.sh) body.sh
11350− ?. ?=(%union -.sh) ~
11351− (union-source-overlap cases.sh molds 256)
11352−++ module-mold-types-detail
11353− |= [molds=imolds state=istate]
11354− ^- (each imold-types imold-failure)
11355− ?~ molds [%& ~]
11356− =/ m=[name=term body=shape] i.molds
11357− =/ t=(unit [template=ischeme state=istate])
11358− (infer-mold-template body.m state(active [name.m active.state], in-mold &))
11359− ?~ t
11360− =/ overlap=(unit upair) (module-mold-overlap m molds.state)
11361− [%| ['module mold needs unsupported inference' ?~(overlap ~ `[name.m u.overlap])]]
11362− =. typ.template.u.t (label-direct-union typ.template.u.t body.m name.m state)
11363− =/ rest=(each imold-types imold-failure) $(molds t.molds)
11364− ?: ?=(%| -.rest) rest
11365− [%& [[name.m template.u.t] p.rest]]
113669996++ module-mold-types
113679997 |= [molds=imolds state=istate]
113689998 ^- (each imold-types @t)
@@ -11424,9 +10054,6 @@
1142410054 |= [typ=itype name=term vars=(list @ud)]
1142510055 ^- itype
1142610056 ?: ?=(%jrec -.typ) typ(label `name)
11427− ?: ?=(%grec -.typ)
11428− ?. (identity-union-parameters vars args.typ) typ(label ~)
11429− typ(label `name)
1143010057 ?. ?=(%union -.typ) typ
1143110058 ?. (identity-union-parameters vars args.typ)
1143210059 ?~ origin.typ typ
@@ -11459,12 +10086,7 @@
1145910086 =/ plus=ischeme [[%fn [%cell b b] b] ~[0]]
1146010087 =/ minus=ischeme [[%fn b b] ~[0]]
1146110088 =/ greater=ischeme [[%fn pair [%flag ~]] ~[0]]
11462− =/ utf8=itype [%atom 'tD']
11463− =/ tape=itype [%collection %list ~[utf8]]
11464− =/ codepoints=itype [%collection %list ~[[%atom %c]]]
11465− =/ text-trip=ischeme [[%fn [%atom %t] tape] ~]
11466− =/ text-tuba=ischeme [[%fn tape codepoints] ~]
11467− [~[[%raw-add plus] [%raw-dec minus] [%raw-gth greater] [%raw-trip text-trip] [%raw-tuba text-tuba]] ~ /lib/jibb/primitives/jibb ~ ~ ~ ~ ~]
10089+ [~[[%raw-add plus] [%raw-dec minus] [%raw-gth greater]] ~ /lib/jibb/primitives/jibb ~ ~ ~ ~]
1146810090::
1146910091++ infer-private-internal
1147010092 |= [src=@t public-source=@t]
@@ -11505,9 +10127,9 @@
1150510127 =/ source-unit=(unit ischeme)
1150610128 ?~ unit-decl ~
1150710129 =/ unit-molds=imolds ~[[%unit u.unit-decl]]
11508− =/ unit-state=istate [0 ~ ~ ~ unit-molds ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | /lib/jibb/prelude/jibb ~[%unit] ~ ~ 256 ~ ~ ~ ~ ~ ~]
10130+ =/ unit-state=istate [0 ~ ~ ~ unit-molds ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | /lib/jibb/prelude/jibb ~[%unit] ~ ~ 256 ~]
1150910131 =/ unit-types=imold-types (partial-prelude-molds unit-molds unit-state)
11510− =/ unit-iface=ifile [~ unit-types /lib/jibb/prelude/jibb ~ ~ ~ ~ ~]
10132+ =/ unit-iface=ifile [~ unit-types /lib/jibb/prelude/jibb ~ ~ ~ ~]
1151110133 =/ found=(unit ischeme) (find-jibb-mold %unit unit-iface)
1151210134 ?~ found ~
1151310135 ?. (standard-unit-template u.found /lib/jibb/prelude/jibb) ~
@@ -11520,7 +10142,7 @@
1152010142 =/ js=ijimports ~[[face.i.imports.mod primitive]]
1152110143 =/ reserved=(list term) ~[face.i.imports.mod]
1152210144 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
11523− =/ state=istate [0 ~ ~ ~ molds globals ~ ~ ~ ~ js reserved ~ ~ ~ | at top ~ ~ 256 ~ ~ ~ ~ ~ ~]
10145+ =/ state=istate [0 ~ ~ ~ molds globals ~ ~ ~ ~ js reserved ~ ~ ~ | at top ~ ~ 256 ~]
1152410146 =/ mts=(each imold-types @t) (module-mold-types molds state)
1152510147 =/ usable=(unit imold-types)
1152610148 ?: ?=(%& -.mts) `p.mts
@@ -11543,7 +10165,7 @@
1154310165 =/ resolution=iresolved (resolve-groups defs.mod molds globals ~ ~ ~ ~ js reserved at ~)
1154410166 =/ env=ienv env.resolution
1154510167 ?. (module-values-complete defs.mod env) ~
11546− `[env u.usable at ~ artifacts.resolution ~ `src ~]
10168+ `[env u.usable at ~ artifacts.resolution ~ `src]
1154710169::
1154810170++ partial-prelude-interface-with-internal
1154910171 |= [src=@t internal-source=(unit @t)]
@@ -11576,16 +10198,16 @@
1157610198 =? env-molds declared
1157710199 (skim molds |=(m=[name=term body=shape] !=(%list name.m)))
1157810200 =/ reserved=(list term) ?:(declared ~[%list] ~)
11579− =/ state=istate [0 ~ ~ ~ env-molds globals ~ ~ ~ ~ u.private reserved ~ ~ ~ | at names ~ ~ 256 ~ ~ ~ ~ ~ ~]
10201+ =/ state=istate [0 ~ ~ ~ env-molds globals ~ ~ ~ ~ u.private reserved ~ ~ ~ | at names ~ ~ 256 ~]
1158010202 :: Other prelude molds may use list only after its source has passed
1158110203 :: the standard-list check. The raw declaration remains removed.
1158210204 =/ declared-list=(unit shape) (find-simple-mold %list molds)
1158310205 =/ mold-prelude=(unit ifile)
1158410206 ?~ declared-list ~
1158510207 ?. (standard-prelude-list u.declared-list) ~
11586− `[~ ~[[%list [[%collection %list ~[[%var 0]]] ~[0]]]] at ~ ~ ~ ~ ~]
10208+ `[~ ~[[%list [[%collection %list ~[[%var 0]]] ~[0]]]] at ~ ~ ~ ~]
1158710209 =/ mt=imold-types (partial-prelude-molds molds state(prelude mold-prelude))
11588− =/ partial=ifile [~ mt at ~ ~ ~ ~ ~]
10210+ =/ partial=ifile [~ mt at ~ ~ ~ ~]
1158910211 :: An explicitly qualified re-export must resolve. Other unsupported
1159010212 :: prelude declarations remain reserved but absent from the interface.
1159110213 =/ required=imolds
@@ -11602,7 +10224,7 @@
1160210224 =/ deps=(list iwidth-dependency)
1160310225 ?~ u.private ~
1160410226 ~[[at.interface.i.u.private source.interface.i.u.private elaborations.interface.i.u.private]]
11605− `[env mt at ~ artifacts.resolution deps `src ~]
10227+ `[env mt at ~ artifacts.resolution deps `src]
1160610228::
1160710229++ partial-prelude-interface
1160810230 |= src=@t
@@ -11653,127 +10275,27 @@
1165310275 ?: =(at at.i.cache) `iface.i.cache
1165410276 $(cache t.cache)
1165510277::
11656−:: These certificates retain the complete checked source closure. The
11657−:: trusted host must supply the identical prepared prelude and reader nouns.
11658−:: Exact bundle equality binds all source paths and versions; the set
11659−:: retains transitive paths for active-cycle checks. Request-bearing graphs
11660−:: alone have a size limit; incompatible diamond evidence fails closed.
11661−++ request-graph-requests-add
11662− |= [pending=(list irequest-evidence) acc=(list irequest-evidence) fuel=@ud]
11663− ^- (unit (list irequest-evidence))
11664− ?~ pending `acc
11665− ?: =(0 fuel) ~
11666− =/ hit=(list irequest-evidence)
11667− (skim acc |=(x=irequest-evidence &(=(api-at.x api-at.i.pending) =(name.x name.i.pending))))
11668− ?^ hit
11669− ?. ?=([* ~] hit) ~
11670− ?. =(i.hit i.pending) ~
11671− $(pending t.pending, fuel (dec fuel))
11672− $(pending t.pending, acc [i.pending acc], fuel (dec fuel))
11673−++ request-graph-inputs-match
11674− |= [g=irequest-graph externals=iexternals marks=imark-externals modules=jbundle values=(list term) molds=(list term) prelude=(unit ifile)]
11675− ^- ?
11676− ?& =(bundle-input.g modules)
11677− =(prelude-input.g prelude)
11678− =(prelude-values.g values)
11679− =(prelude-molds.g molds)
11680− =(externals.g externals)
11681− =(marks.g marks)
11682− ==
11683−++ request-graph-bounded
11684− |= g=irequest-graph
11685− ^- ?
11686− =/ total=@ud (add (lent requests.g) (lent stores.g))
11687− &((lte (lent ~(tap in:..zuse paths.g)) 256) (lte total 256))
11688−::
11689−++ store-graph-requests-add
11690− |= [pending=(list istore-request-evidence) acc=(list istore-request-evidence) fuel=@ud]
11691− ^- (unit (list istore-request-evidence))
11692− ?~ pending `acc
11693− ?: =(0 fuel) ~
11694− =/ hit=(list istore-request-evidence)
11695− (skim acc |=(x=istore-request-evidence =(store-at.x store-at.i.pending)))
11696− ?^ hit
11697− ?. ?=([* ~] hit) ~
11698− ?. =(i.hit i.pending) ~
11699− $(pending t.pending, fuel (dec fuel))
11700− $(pending t.pending, acc [i.pending acc], fuel (dec fuel))
11701−::
11702−++ request-graph-merge
11703− |= [imports=ijimports g=irequest-graph fuel=@ud]
11704− ^- (unit irequest-graph)
11705− ?~ imports `g
11706− ?: =(0 fuel) ~
11707− =/ child=ifile interface.i.imports
11708− ?~ graph.child ~
11709− =/ cg=irequest-graph u.graph.child
11710− ?. ?& =(bundle-input.g bundle-input.cg)
11711− =(prelude-input.g prelude-input.cg)
11712− =(prelude-values.g prelude-values.cg)
11713− =(prelude-molds.g prelude-molds.cg)
11714− =(externals.g externals.cg)
11715− =(marks.g marks.cg)
11716− ==
11717− ~
11718− =/ merged=(set path) (~(uni in:..zuse paths.g) paths.cg)
11719− =/ rs=(unit (list irequest-evidence))
11720− (request-graph-requests-add requests.cg requests.g (add 1 (lent requests.cg)))
11721− ?~ rs ~
11722− =/ ss=(unit (list istore-request-evidence))
11723− (store-graph-requests-add stores.cg stores.g (add 1 (lent stores.cg)))
11724− ?~ ss ~
11725− =/ total=@ud (add (lent u.rs) (lent u.ss))
11726− ?: &(?=(^ u.rs) |((gth (lent ~(tap in:..zuse merged)) 256) (gth total 256))) ~
11727− ?: &(?=(^ u.ss) |((gth (lent ~(tap in:..zuse merged)) 256) (gth total 256))) ~
11728− $(imports t.imports, g g(paths merged, requests u.rs, stores u.ss), fuel (dec fuel))
11729−++ request-graph-reusable
11730− |= [f=ifile src=@t externals=iexternals marks=imark-externals modules=jbundle active=(list path) values=(list term) molds=(list term) prelude=(unit ifile)]
11731− ^- ?
11732− ?~ source.f |
11733− ?. =(u.source.f src) |
11734− ?~ graph.f |
11735− =/ g=irequest-graph u.graph.f
11736− ?. (request-graph-inputs-match g externals marks modules values molds prelude) |
11737− ?. (~(has in:..zuse paths.g) at.f) |
11738− !(lien active |=(p=path (~(has in:..zuse paths.g) p)))
11739−::
1174010278++ resolve-jibb-imports
1174110279 |= [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)]
1174210280 ^- jimports-result
11743− =/ result=jimports-detailed-result
11744− (resolve-jibb-imports-detailed imports externals mark-externals modules active prelude-values prelude-molds cache prelude)
11745− ?: ?=(%| -.result) [%| message.p.result]
11746− [%& p.result]
11747−++ resolve-jibb-imports-detailed
11748− |= [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)]
11749− ^- jimports-detailed-result
1175010281 ?~ imports [%& [~ cache]]
1175110282 ?. ?=(%jibb -.i.imports) $(imports t.imports)
1175210283 =/ at=path (weld path.i.imports `path`~[%jibb])
1175310284 ?: =(at /lib/jibb/internal/jibb)
11754− [%| ['the prelude internal module is private' ~]]
10285+ [%| 'the prelude internal module is private']
1175510286 ?: =(at /lib/jibb/primitives/jibb)
11756− [%| ['the prelude primitive interface is private' ~]]
10287+ [%| 'the prelude primitive interface is private']
1175710288 ?: (lien active |=(p=path =(p at)))
11758− [%| [(crip "import cycle at {(spud at)}") ~]]
10289+ [%| (crip "import cycle at {(spud at)}")]
1175910290 =/ found=jbundle (skim modules |=(m=jsource =(at at.m)))
11760− ?~ found [%| [(crip "module source missing: {(spud at)}") ~]]
11761− ?^ t.found [%| [(crip "duplicate module sources: {(spud at)}") ~]]
10291+ ?~ found [%| (crip "module source missing: {(spud at)}")]
10292+ ?^ t.found [%| (crip "duplicate module sources: {(spud at)}")]
1176210293 =/ cached=(unit ifile) (find-jibb-cache at cache)
11763− =/ iface=jfile-detailed-result
11764− ?^ cached
11765− ?. =(at.u.cached at) [%| ['cached module identity needs unsupported inference' ~]]
11766− ?~ graph.u.cached
11767− :: A detached legacy interface has unknown evidence. Rebuild it
11768− :: against the current graph, without retaining any stale entry.
11769− =/ clean=jcache (skim cache |=(x=[at=path iface=ifile] !=(at.x at)))
11770− (infer-jibb-file-detailed at source.i.found externals mark-externals modules [at active] prelude-values prelude-molds clean prelude)
11771− ?. (request-graph-reusable u.cached source.i.found externals mark-externals modules active prelude-values prelude-molds prelude)
11772− [%| ['cached module evidence needs unsupported inference' ~]]
11773− [%& [u.cached cache]]
11774− (infer-jibb-file-detailed at source.i.found externals mark-externals modules [at active] prelude-values prelude-molds cache prelude)
10294+ =/ iface=jfile-result
10295+ ?^ cached [%& [u.cached cache]]
10296+ (infer-jibb-file at source.i.found externals mark-externals modules [at active] prelude-values prelude-molds cache prelude)
1177510297 ?: ?=(%| -.iface) [%| p.iface]
11776− =/ rest=jimports-detailed-result $(imports t.imports, cache cache.p.iface)
10298+ =/ rest=jimports-result $(imports t.imports, cache cache.p.iface)
1177710299 ?: ?=(%| -.rest) rest
1177810300 [%& [[[face.i.imports iface.p.iface] resolved.p.rest] cache.p.rest]]
1177910301::
@@ -12020,27 +10542,6 @@
1202010542 (api-path-analysis p.parsed marks values.u.prepared molds.u.prepared)
1202110543 ?~ paths [%| 'API path declaration needs unsupported analysis']
1202210544 [%& [file src u.prepared externals marks cache.p.deps u.paths]]
12023−:: Graph-aware variant preserves the caller active stack and cache.
12024−++ api-path-evidence-graph
12025− |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle active=(list path) cache=jcache prepared=(unit iprelude)]
12026− ^- (each iapi-path-evidence @t)
12027− ?~ active [%| 'API analysis needs an active graph']
12028− ?. =(i.active file) [%| 'API analysis active graph does not start at the source']
12029− ?: (lien t.active |=(p=path =(p file))) [%| 'API analysis active graph contains a cycle']
12030− ?. ?=([%ui %api @ %jibb ~] file) [%| 'API path evidence requires /ui/api/<agent>.jibb']
12031− =/ parsed (parse file src)
12032− ?: ?=(%| -.parsed) [%| 'API path evidence source does not parse']
12033− =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
12034− ?^ duplicate [%| (show-duplicate-fields file src u.duplicate)]
12035− ?~ prepared [%| 'API path evidence needs the prepared prelude']
12036− =/ public=ifile iface.u.prepared
12037− =/ deps=jimports-result
12038− (resolve-jibb-imports imports.p.parsed externals marks modules active values.u.prepared molds.u.prepared cache `public)
12039− ?: ?=(%| -.deps) [%| p.deps]
12040− =/ paths=(unit (list iapi-path-typed))
12041− (api-path-analysis p.parsed marks values.u.prepared molds.u.prepared)
12042− ?~ paths [%| 'API path declaration needs unsupported analysis']
12043− [%& [file src u.prepared externals marks cache.p.deps u.paths]]
1204410545::
1204510546:: This query classifies a unique path declaration only. Missing evidence
1204610547:: or a nonunique name is unknown; it proves nothing about an ask value.
@@ -12136,228 +10637,13 @@
1213610637 =/ surs=(list term) (collect-sur-imports imports.mod)
1213710638 =/ reserved=(list term) (weld molds.prep (turn resolved.p.deps |=(j=[face=term interface=ifile] face.j)))
1213810639 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
12139− =/ state=istate [0 ~ ~ ~ molds globals externals surs marks declared resolved.p.deps reserved ~ ~ ~ | file top prelude ~ 256 ~ ~ ~ ~ ~ ~]
12140− =/ mts=(each imold-types @t) (module-mold-types molds state)
12141− ?: ?=(%| -.mts) [%| p.mts]
12142− =/ resolution=iresolved (resolve-groups ordinary molds globals externals surs marks declared resolved.p.deps reserved file prelude)
12143− ?. (module-values-complete ordinary env.resolution) [%| 'API ordinary definitions need unsupported inference']
12144− [%& [evidence env.resolution p.mts u.mark-types artifacts.resolution]]
12145−:: Preserve the same graph context through supporting definitions.
12146−++ api-support-analysis-graph
12147− |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle active=(list path) cache=jcache prepared=(unit iprelude)]
12148− ^- (each iapi-support-evidence @t)
12149− =/ path-result (api-path-evidence-graph file src externals marks modules active cache prepared)
12150− ?: ?=(%| -.path-result) [%| p.path-result]
12151− =/ evidence=iapi-path-evidence p.path-result
12152− =/ parsed (parse file src)
12153− ?: ?=(%| -.parsed) [%| 'API source does not parse']
12154− =/ mod=module p.parsed
12155− =/ ordinary=(list def)
12156− (skim defs.mod |=(d=def !&(?=(%mold -.d) |(=(%paths name.d) =(%poke name.d)))))
12157− =/ prep=iprelude prepared.evidence
12158− ?. (module-scope-valid mod(defs ordinary) values.prep molds.prep) [%| 'API ordinary scope needs unsupported inference']
12159− =/ vals=(list term) (global-value-names ordinary)
12160− ?: (lien vals |=(n=term =(n %main))) [%| 'API module kind needs unsupported inference']
12161− =/ declared=(list term) (collect-mark-imports imports.mod)
12162− =/ mark-types=(unit (list iapi-mark-type)) (api-diff-types declared marks declared)
12163− ?~ mark-types [%| 'API declared marks need unsupported inference']
12164− =/ prelude=(unit ifile) `iface.prep
12165− =/ deps=jimports-result
12166− (resolve-jibb-imports imports.mod externals marks modules active values.prep molds.prep dependencies.evidence prelude)
12167− ?: ?=(%| -.deps) [%| p.deps]
12168− =/ molds=imolds (collect-simple-molds ordinary)
12169− =/ globals=(list term) (weld values.prep (weld (import-binding-names imports.mod) vals))
12170− =/ surs=(list term) (collect-sur-imports imports.mod)
12171− =/ reserved=(list term) (weld molds.prep (turn resolved.p.deps |=(j=[face=term interface=ifile] face.j)))
12172− =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
12173− =/ state=istate [0 ~ ~ ~ molds globals externals surs marks declared resolved.p.deps reserved ~ ~ ~ | file top prelude ~ 256 ~ ~ ~ ~ ~ ~]
10640+ =/ state=istate [0 ~ ~ ~ molds globals externals surs marks declared resolved.p.deps reserved ~ ~ ~ | file top prelude ~ 256 ~]
1217410641 =/ mts=(each imold-types @t) (module-mold-types molds state)
1217510642 ?: ?=(%| -.mts) [%| p.mts]
1217610643 =/ resolution=iresolved (resolve-groups ordinary molds globals externals surs marks declared resolved.p.deps reserved file prelude)
1217710644 ?. (module-values-complete ordinary env.resolution) [%| 'API ordinary definitions need unsupported inference']
1217810645 [%& [evidence env.resolution p.mts u.mark-types artifacts.resolution]]
1217910646::
12180−:: Type-analysis artifact for one plain request. The resolver may publish
12181−:: its interface only together with trusted source and reader evidence.
12182−:: No lowering or runtime validator exists.
12183−:: Value watchability remains unproved even for a watchable declaration.
12184−+$ ione-request-interface
12185− [support=iapi-support-evidence parts=iapi-request-parts iface=ifile]
12186−++ store-compatible-poke
12187− |= prelude=iprelude
12188− ^- (unit ischeme)
12189− =/ public=ifile iface.prelude
12190− ?. =(at.public /lib/jibb/prelude/jibb) ~
12191− =/ poke=(unit ischeme) (find-jibb-mold %poke public)
12192− ?~ poke ~
12193− ?. ?=(%union -.typ.u.poke) ~
12194− ?^ vars.u.poke ~
12195− ?. =(origin.typ.u.poke `[/lib/jibb/internal/jibb %poke]) ~
12196− ?: (itype-has-tag typ.u.poke) ~
12197− =/ private=(list iwidth-dependency)
12198− (skim dependencies.public |=(d=iwidth-dependency =(at.d /lib/jibb/internal/jibb)))
12199− ?. ?=([* ~] private) ~
12200− ?~ source.i.private ~
12201− =/ agent-case=itype
12202− [%cell [%const [%term %tas %agent '%agent']] [%cell [%face %agent [%atom %tas]] [%cell [%face %mark [%atom %tas]] [%face %payload [%noun ~]]]]]
12203− =/ store-case=itype
12204− [%cell [%const [%term %tas %store '%store']] [%cell [%face %module [%atom %t]] [%cell [%face %action [%atom %tas]] [%face %payload [%noun ~]]]]]
12205− ?. =(cases.typ.u.poke ~[agent-case store-case]) ~
12206− poke
12207−::
12208−++ request-compatible-ask
12209− |= prelude=iprelude
12210− ^- (unit ischeme)
12211− =/ public=ifile iface.prelude
12212− ?. =(at.public /lib/jibb/prelude/jibb) ~
12213− =/ ask=(unit ischeme) (find-jibb-mold %ask public)
12214− ?~ ask ~
12215− ?. ?=([@ ~] vars.u.ask) ~
12216− ?. ?=(%union -.typ.u.ask) ~
12217− ?. =(origin.typ.u.ask `[/lib/jibb/internal/jibb %ask]) ~
12218− ?. (identity-union-parameters vars.u.ask args.typ.u.ask) ~
12219− =/ m=@ud i.vars.u.ask
12220− ?: (itype-var-is-atom m typ.u.ask) ~
12221− ?. (levy (itype-vars typ.u.ask) |=(n=@ud =(n m))) ~
12222− ?: (itype-has-tag typ.u.ask) ~
12223− =/ private=(list iwidth-dependency)
12224− (skim dependencies.public |=(d=iwidth-dependency =(at.d /lib/jibb/internal/jibb)))
12225− ?. ?=([* ~] private) ~
12226− ?~ source.i.private ~
12227− =/ path=(unit ischeme) (find-jibb-mold %path public)
12228− ?~ path ~
12229− ?^ vars.u.path ~
12230− =/ path-type=itype [%collection %list ~[[%atom %ta]]]
12231− ?. =(typ.u.path path-type) ~
12232− =/ unit-template=(unit ischeme) (find-jibb-mold %unit public)
12233− ?~ unit-template ~
12234− ?. (standard-unit-template u.unit-template /lib/jibb/prelude/jibb) ~
12235− =/ state-unit=(unit itype) (template-apply u.unit-template ~[[%noun ~]])
12236− ?~ state-unit ~
12237− =/ path-unit=(unit itype) (template-apply u.unit-template ~[path-type])
12238− ?~ path-unit ~
12239− =/ output=itype [%cell [%face %state [%noun ~]] [%face %message [%var m]]]
12240− =/ agent-input=itype [%cell [%face %mark [%atom %tas]] [%cell [%face %state u.state-unit] [%face %fact [%noun ~]]]]
12241− =/ store-input=itype [%cell [%face %state u.state-unit] [%face %fact [%noun ~]]]
12242− =/ pure-case=itype [%cell [%const [%term %tas %pure '%pure']] [%face %value [%var m]]]
12243− =/ agent-case=itype
12244− [%cell [%const [%term %tas %agent '%agent']] [%cell [%face %api [%atom %t]] [%cell [%face %case [%atom %tas]] [%cell [%face %agent [%atom %tas]] [%cell [%face %path path-type] [%cell [%face %scry u.path-unit] [%face %receive [%fn agent-input output]]]]]]]]
12245− =/ store-case=itype
12246− [%cell [%const [%term %tas %store '%store']] [%cell [%face %module [%atom %t]] [%cell [%face %name [%atom %tas]] [%face %receive [%fn store-input output]]]]]
12247− ?. =(cases.typ.u.ask ~[pure-case agent-case store-case]) ~
12248− ask
12249−::
12250−:: The first supported standalone API has exactly one mark import and one
12251−:: plain path declaration, with no other definitions or imports. No partial
12252−:: success is published when source, schema, or a required mold is unknown.
12253−++ one-request-interface-source
12254− |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle prepared=(unit iprelude)]
12255− ^- (each ione-request-interface @t)
12256− =/ out (api-support-analysis-source file src externals marks modules prepared)
12257− ?: ?=(%| -.out) [%| p.out]
12258− =/ support=iapi-support-evidence p.out
12259− =/ ev=iapi-path-evidence paths.support
12260− =/ parsed (parse file src)
12261− ?: ?=(%| -.parsed) [%| 'request source does not parse']
12262− =/ mod=module p.parsed
12263− ?. ?=(?([[%mark *] ~] [[%mark *] [%mark *] ~]) imports.mod) [%| 'request imports need unsupported inference']
12264− ?. ?=([[%mold *] ~] defs.mod) [%| 'request definitions need unsupported inference']
12265− ?. =(%paths name.i.defs.mod) [%| 'request declaration needs unsupported inference']
12266− ?. ?=([* ~] paths.ev) [%| 'request count needs unsupported inference']
12267− =/ p=iapi-path-typed i.paths.ev
12268− =/ parts=(unit iapi-request-parts) (api-request-parts `ev name.path.p)
12269− ?~ parts [%| 'request components need unsupported inference']
12270− ?. ?=(?(~ [* ~]) parameters.u.parts) [%| 'request parameters need unsupported inference']
12271− ?: &(?=(^ fold.u.parts) ?=(^ parameters.u.parts)) [%| 'request parameter and fold need unsupported inference']
12272− ?^ scry.path.p [%| 'request scry needs unsupported inference']
12273− =/ valid-marks=?
12274− ?~ fold.u.parts ?=([* ~] marks.support)
12275− ?=([* [* ~]] marks.support)
12276− ?. valid-marks [%| 'request marks need unsupported inference']
12277− =/ fold-open=?
12278− ?~ fold.u.parts |
12279− |(?=(^ (itype-vars u.fold.u.parts)) (itype-has-tag u.fold.u.parts))
12280− ?: fold-open [%| 'request fold needs unsupported inference']
12281− ?^ (itype-vars reply-sample.u.parts) [%| 'request payload needs unsupported inference']
12282− ?: (itype-has-tag reply-sample.u.parts) [%| 'request payload needs unsupported inference']
12283− =/ ask=(unit ischeme) (request-compatible-ask prepared.ev)
12284− ?~ ask [%| 'request ask needs unsupported inference']
12285− =/ result=(unit itype) (template-apply u.ask ~[[%var 0]])
12286− ?~ result [%| 'request ask needs unsupported inference']
12287− =/ callback=itype [%fn reply-sample.u.parts [%var 0]]
12288− =/ sample=itype
12289− ?^ fold.u.parts [%cell callback u.fold.u.parts]
12290− ?~ parameters.u.parts callback
12291− [%cell typ.i.parameters.u.parts callback]
12292− =/ scheme=ischeme [[%fn sample u.result] ~[0]]
12293− =/ exports=imold-types
12294− (turn marks.support |=(m=iapi-mark-type [name.m [typ.m ~]]))
12295− =/ prelude=iprelude prepared.ev
12296− =/ public=ifile iface.prelude
12297− ?~ source.public [%| 'request prelude source needs unsupported inference']
12298− =/ private=(list iwidth-dependency)
12299− (skim dependencies.public |=(d=iwidth-dependency =(at.d /lib/jibb/internal/jibb)))
12300− ?. ?=([* ~] private) [%| 'request internal source needs unsupported inference']
12301− ?~ source.i.private [%| 'request internal source needs unsupported inference']
12302− =/ req=irequest-evidence
12303− [file name.path.p p src u.source.public u.source.i.private values.prelude molds.prelude externals marks]
12304− =/ interface=ifile [~[[name.path.p scheme]] exports file ~ ~ ~ `src `[(silt `(list path)`~[file]) ~[req] ~ modules `public values.prelude molds.prelude externals marks]]
12305− [%& [support u.parts interface]]
12306−:: Graph-aware request artifact; resolver use remains type-only.
12307−++ one-request-interface-graph
12308− |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle active=(list path) cache=jcache prepared=(unit iprelude)]
12309− ^- (each ione-request-interface @t)
12310− =/ out (api-support-analysis-graph file src externals marks modules active cache prepared)
12311− ?: ?=(%| -.out) [%| p.out]
12312− =/ support=iapi-support-evidence p.out
12313− =/ ev=iapi-path-evidence paths.support
12314− =/ parsed (parse file src)
12315− ?: ?=(%| -.parsed) [%| 'request source does not parse']
12316− =/ mod=module p.parsed
12317− ?. ?=(?([[%mark *] ~] [[%mark *] [%mark *] ~]) imports.mod) [%| 'request imports need unsupported inference']
12318− ?. ?=([[%mold *] ~] defs.mod) [%| 'request definitions need unsupported inference']
12319− ?. =(%paths name.i.defs.mod) [%| 'request declaration needs unsupported inference']
12320− ?. ?=([* ~] paths.ev) [%| 'request count needs unsupported inference']
12321− =/ p=iapi-path-typed i.paths.ev
12322− =/ parts=(unit iapi-request-parts) (api-request-parts `ev name.path.p)
12323− ?~ parts [%| 'request components need unsupported inference']
12324− ?. ?=(?(~ [* ~]) parameters.u.parts) [%| 'request parameters need unsupported inference']
12325− ?: &(?=(^ fold.u.parts) ?=(^ parameters.u.parts)) [%| 'request parameter and fold need unsupported inference']
12326− ?^ scry.path.p [%| 'request scry needs unsupported inference']
12327− =/ valid-marks=?
12328− ?~ fold.u.parts ?=([* ~] marks.support)
12329− ?=([* [* ~]] marks.support)
12330− ?. valid-marks [%| 'request marks need unsupported inference']
12331− =/ fold-open=?
12332− ?~ fold.u.parts |
12333− |(?=(^ (itype-vars u.fold.u.parts)) (itype-has-tag u.fold.u.parts))
12334− ?: fold-open [%| 'request fold needs unsupported inference']
12335− ?^ (itype-vars reply-sample.u.parts) [%| 'request payload needs unsupported inference']
12336− ?: (itype-has-tag reply-sample.u.parts) [%| 'request payload needs unsupported inference']
12337− =/ ask=(unit ischeme) (request-compatible-ask prepared.ev)
12338− ?~ ask [%| 'request ask needs unsupported inference']
12339− =/ result=(unit itype) (template-apply u.ask ~[[%var 0]])
12340− ?~ result [%| 'request ask needs unsupported inference']
12341− =/ callback=itype [%fn reply-sample.u.parts [%var 0]]
12342− =/ sample=itype
12343− ?^ fold.u.parts [%cell callback u.fold.u.parts]
12344− ?~ parameters.u.parts callback
12345− [%cell typ.i.parameters.u.parts callback]
12346− =/ scheme=ischeme [[%fn sample u.result] ~[0]]
12347− =/ exports=imold-types
12348− (turn marks.support |=(m=iapi-mark-type [name.m [typ.m ~]]))
12349− =/ prelude=iprelude prepared.ev
12350− =/ public=ifile iface.prelude
12351− ?~ source.public [%| 'request prelude source needs unsupported inference']
12352− =/ private=(list iwidth-dependency)
12353− (skim dependencies.public |=(d=iwidth-dependency =(at.d /lib/jibb/internal/jibb)))
12354− ?. ?=([* ~] private) [%| 'request internal source needs unsupported inference']
12355− ?~ source.i.private [%| 'request internal source needs unsupported inference']
12356− =/ req=irequest-evidence
12357− [file name.path.p p src u.source.public u.source.i.private values.prelude molds.prelude externals marks]
12358− =/ interface=ifile [~[[name.path.p scheme]] exports file ~ ~ ~ `src `[(silt `(list path)`~[file]) ~[req] ~ modules `public values.prelude molds.prelude externals marks]]
12359− [%& [support u.parts interface]]
12360−::
1236110647++ api-mark-exports
1236210648 |= [marks=(list term) all=(list term) externals=imark-externals]
1236310649 ^- imold-types
@@ -12401,1895 +10687,46 @@
1240110687 =/ mark=(unit itype) (find-imported-mark n mark-externals marks)
1240210688 ?~ mark ~
1240310689 =/ sc=ischeme [[%fn u.mark typ.u.poke] ~]
12404− `[~[[n sc]] (api-mark-exports marks marks mark-externals) at ~[[n i.t.t.at n]] ~ ~ ~ ~]
12405−::
12406−:: Source-proven ordinary helpers validate each selected /sur dependency.
12407−:: Unused or less direct cores remain unsupported by this first interface.
12408−++ api-sur-covered
12409− |= [surs=(list term) defs=(list def) externals=iexternals all=(list term)]
12410− ^- ?
12411− ?~ surs &
12412− =/ found=(list def)
12413− %+ skim defs
12414− |= d=def
12415− ?. ?=(%mold -.d) |
12416− ?. ?=(%ref -.shape.d) |
12417− ?. ?=([@ [@ ~]] names.shape.d) |
12418− =(i.t.names.shape.d i.surs)
12419− ?~ found |
12420− =/ selected=def i.found
12421− ?. ?=(%mold -.selected) |
12422− =/ sh=shape shape.selected
12423− ?. ?=(%ref -.sh) |
12424− ?. ?=([@ [@ ~]] names.sh) |
12425− =/ checked=(unit itype) (find-imported-mold i.surs i.names.sh externals all)
12426− ?~ checked |
12427− $(surs t.surs)
12428−::
12429−+$ imulti-request-gates [values=ienv requests=(list irequest-evidence)]
12430−++ api-request-gates
12431− |= [paths=(list iapi-path-typed) ev=iapi-path-evidence ask=ischeme file=path src=@t public=@t internal=@t externals=iexternals marks=imark-externals fuel=@ud]
12432− ^- (unit imulti-request-gates)
12433− ?~ paths `[~ ~]
12434− ?: =(0 fuel) ~
12435− =/ p=iapi-path-typed i.paths
12436− =/ parts=(unit iapi-request-parts) (api-request-parts `ev name.path.p)
12437− ?~ parts ~
12438− ?. ?=(?(~ [* ~]) parameters.u.parts) ~
12439− ?: &(?=(^ fold.u.parts) ?=(^ parameters.u.parts)) ~
12440− ?^ scry.path.p ~
12441− ?^ (itype-vars reply-sample.u.parts) ~
12442− ?: (itype-has-tag reply-sample.u.parts) ~
12443− =/ open-fold=?
12444− ?~ fold.u.parts |
12445− |(?=(^ (itype-vars u.fold.u.parts)) (itype-has-tag u.fold.u.parts))
12446− ?: open-fold ~
12447− =/ result=(unit itype) (template-apply ask ~[[%var 0]])
12448− ?~ result ~
12449− =/ callback=itype [%fn reply-sample.u.parts [%var 0]]
12450− =/ sample=itype
12451− ?^ fold.u.parts [%cell callback u.fold.u.parts]
12452− ?~ parameters.u.parts callback
12453− [%cell typ.i.parameters.u.parts callback]
12454− =/ scheme=ischeme [[%fn sample u.result] ~[0]]
12455− =/ prep=iprelude prepared.ev
12456− =/ req=irequest-evidence
12457− [file name.path.p p src public internal values.prep molds.prep externals marks]
12458− =/ rest=(unit imulti-request-gates)
12459− $(paths t.paths, fuel (dec fuel))
12460− ?~ rest ~
12461− `[[[name.path.p scheme] values.u.rest] [req requests.u.rest]]
12462−::
12463−++ api-poke-from-checked
12464− |= [file=path mod=module marks=imark-externals values=(list term) molds=(list term) prelude=(unit ifile)]
12465− ^- (unit [values=ienv derived=(list iderived)])
12466− =/ pokes=(list def)
12467− (skim defs.mod |=(d=def &(?=(%mold -.d) =(%poke name.d))))
12468− ?~ pokes `[~ ~]
12469− ?. ?=([* ~] pokes) ~
12470− =/ declared=(list term) (collect-mark-imports imports.mod)
12471− =/ ns=(unit (list term)) (api-poke-mark-names pokes declared)
12472− ?~ ns ~
12473− ?. ?=([@ ~] u.ns) ~
12474− =/ matching=(list import)
12475− %+ skim imports.mod
12476− |= i=import
12477− ?. ?=(%mark -.i) |
12478− =(mark.i i.u.ns)
12479− ?. ?=([* ~] matching) ~
12480− =/ checked=(unit ifile)
12481− (api-poke-interface file mod(defs pokes, imports matching) marks values molds prelude)
12482− ?~ checked ~
12483− `[values.u.checked derived.u.checked]
12484−::
12485−:: The partial interface is published atomically: all paths, ordinary
12486−:: source definitions, declared marks and the poke must check. Unselected
12487−:: /sur bindings, runtime validation and value watchability remain unproved.
12488−++ multi-request-interface-graph
12489− |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle active=(list path) cache=jcache prepared=(unit iprelude)]
12490− ^- (each [iface=ifile cache=jcache] @t)
12491− =/ out (api-support-analysis-graph file src externals marks modules active cache prepared)
12492− ?: ?=(%| -.out) [%| p.out]
12493− =/ support=iapi-support-evidence p.out
12494− =/ ev=iapi-path-evidence paths.support
12495− =/ parsed (parse file src)
12496− ?: ?=(%| -.parsed) [%| 'request source does not parse']
12497− =/ mod=module p.parsed
12498− ?. (levy imports.mod |=(i=import ?=(?(%mark %sur) -.i)))
12499− [%| 'request imports need unsupported inference']
12500− =/ surs=(list term) (collect-sur-imports imports.mod)
12501− ?. (api-sur-covered surs defs.mod externals surs)
12502− [%| 'API source dependency needs unsupported inference']
12503− ?~ paths.ev [%| 'request count needs unsupported inference']
12504− =/ ask=(unit ischeme) (request-compatible-ask prepared.ev)
12505− ?~ ask [%| 'request ask needs unsupported inference']
12506− =/ prep=iprelude prepared.ev
12507− =/ public=ifile iface.prep
12508− ?~ source.public [%| 'request prelude source needs unsupported inference']
12509− =/ private=(list iwidth-dependency)
12510− (skim dependencies.public |=(d=iwidth-dependency =(at.d /lib/jibb/internal/jibb)))
12511− ?. ?=([* ~] private) [%| 'request internal source needs unsupported inference']
12512− ?~ source.i.private [%| 'request internal source needs unsupported inference']
12513− =/ gates=(unit imulti-request-gates)
12514− (api-request-gates paths.ev ev u.ask file src u.source.public u.source.i.private externals marks 256)
12515− ?~ gates [%| 'request paths need unsupported inference']
12516− =/ poke=(unit [values=ienv derived=(list iderived)])
12517− (api-poke-from-checked file mod marks values.prep molds.prep `public)
12518− ?~ poke [%| 'API poke needs unsupported inference']
12519− =/ mark-molds=imold-types
12520− (turn marks.support |=(m=iapi-mark-type [name.m [typ.m ~]]))
12521− =/ exports=imold-types (weld mark-molds molds.support)
12522− =/ names=(list term) (turn exports |=(m=[name=term template=ischeme] name.m))
12523− ?. (levy names |=(n=term (unique-value-name n names)))
12524− [%| 'API exported molds need unsupported inference']
12525− =/ env=ienv (weld values.u.gates (weld values.u.poke values.support))
12526− =/ graph=irequest-graph
12527− [(silt `(list path)`~[file]) requests.u.gates ~ modules `public values.prep molds.prep externals marks]
12528− =/ iface=ifile
12529− [env exports file derived.u.poke elaborations.support ~ `src `graph]
12530− [%& [iface dependencies.ev]]
12531−::
12532−:: A checked program main is only the direct four-component source call.
12533−:: Grouping is transparent, but aliases, qualified wings and other module
12534−:: kinds remain outside this slice.
12535−++ program-main-def
12536− |= ds=(list def)
12537− ^- (unit def)
12538− ?~ ds ~
12539− ?: &(?=(%value -.i.ds) =(%main name.i.ds)) `i.ds
12540− $(ds t.ds)
12541−::
12542−++ program-main-wing
12543− |= e=expr
12544− ^- (unit term)
12545− ?: ?=(%group -.e) $(e inner.e)
12546− ?. ?=(%wing -.e) ~
12547− ?. ?=([@ ~] names.e) ~
12548− `i.names.e
12549−::
12550−++ program-main-args
12551− |= d=def
12552− ^- (unit (list expr))
12553− ?. ?=(%value -.d) ~
12554− |-
12555− ?: ?=(%group -.val.d) $(val.d inner.val.d)
12556− ?. ?=(%call -.val.d) ~
12557− =/ head=(unit term) (program-main-wing head.val.d)
12558− ?~ head ~
12559− ?. =(%program u.head) ~
12560− ?. ?=([* * * * ~] args.val.d) ~
12561− `args.val.d
12562−::
12563−++ program-main-parts
12564− |= d=def
12565− ^- (unit [init=term update=term view=term subs=term])
12566− ?. ?=(%value -.d) ~
12567− |-
12568− ?: ?=(%group -.val.d) $(val.d inner.val.d)
12569− ?. ?=(%call -.val.d) ~
12570− =/ head=(unit term) (program-main-wing head.val.d)
12571− ?~ head ~
12572− ?. =(%program u.head) ~
12573− ?. ?=([* * * * ~] args.val.d) ~
12574− =/ args=(list expr) args.val.d
12575− ?> ?=([* * * * ~] args)
12576− =/ init=(unit term) (program-main-wing i.args)
12577− =/ update=(unit term) (program-main-wing i.t.args)
12578− =/ view=(unit term) (program-main-wing i.t.t.args)
12579− =/ subs=(unit term) (program-main-wing i.t.t.t.args)
12580− ?~ init ~
12581− ?~ update ~
12582− ?~ view ~
12583− ?~ subs ~
12584− `[u.init u.update u.view u.subs]
12585−::
12586−:: A data page is only the direct two-component source call. Grouping is
12587−:: transparent, but page aliases, qualified wings and other kinds are not.
12588−++ page-main-parts
12589− |= d=def
12590− ^- (unit [load=term view=term])
12591− ?. ?=(%value -.d) ~
12592− |-
12593− ?: ?=(%group -.val.d) $(val.d inner.val.d)
12594− ?. ?=(%call -.val.d) ~
12595− =/ head=(unit term) (program-main-wing head.val.d)
12596− ?~ head ~
12597− ?. =(%page u.head) ~
12598− ?. ?=([* * ~] args.val.d) ~
12599− =/ args=(list expr) args.val.d
12600− ?> ?=([* * ~] args)
12601− =/ load=(unit term) (program-main-wing i.args)
12602− =/ view=(unit term) (program-main-wing i.t.args)
12603− ?~ load ~
12604− ?~ view ~
12605− `[u.load u.view]
12606−::
12607−:: A store main is only the direct two-wing source call. The poke declaration
12608−:: is checked here, then removed before every ordinary mold/value inference pass.
12609−++ store-main-parts
12610− |= d=def
12611− ^- (unit [init=term update=term])
12612− ?. ?=(%value -.d) ~
12613− |-
12614− ?: ?=(%group -.val.d) $(val.d inner.val.d)
12615− ?. ?=(%call -.val.d) ~
12616− =/ head=(unit term) (program-main-wing head.val.d)
12617− ?~ head ~
12618− ?. =(%store u.head) ~
12619− ?. ?=([* * ~] args.val.d) ~
12620− =/ args=(list expr) args.val.d
12621− ?> ?=([* * ~] args)
12622− =/ init=(unit term) (program-main-wing i.args)
12623− =/ update=(unit term) (program-main-wing i.t.args)
12624− ?~ init ~
12625− ?~ update ~
12626− `[u.init u.update]
12627−::
12628−+$ istore-declaration [action=term defs=(list def)]
12629−++ store-declaration
12630− |= [mod=module prelude-values=(list term) prelude-molds=(list term)]
12631− ^- (unit istore-declaration)
12632− =/ ds=(list def) defs.mod
12633− =/ pokes=(list def)
12634− (skim ds |=(d=def &(?=(%mold -.d) =(%poke name.d))))
12635− ?. ?=([* ~] pokes) ~
12636− =/ states=(list def)
12637− (skim ds |=(d=def &(?=(%mold -.d) =(%state name.d))))
12638− ?. ?=([* ~] states) ~
12639− =/ poke=def i.pokes
12640− =/ state=def i.states
12641− ?> &(?=(%mold -.poke) ?=(%mold -.state))
12642− ?: ?=(%generic -.shape.state) ~
12643− ?. ?=(%ref -.shape.poke) ~
12644− ?. ?=([@ ~] names.shape.poke) ~
12645− =/ action=term i.names.shape.poke
12646− =/ actions=(list def)
12647− (skim ds |=(d=def &(?=(%mold -.d) =(action name.d))))
12648− ?. ?=([* ~] actions) ~
12649− =/ action-def=def i.actions
12650− ?> ?=(%mold -.action-def)
12651− ?: ?=(%generic -.shape.action-def) ~
12652− =/ ordinary=(list def)
12653− (skim ds |=(d=def !&(?=(%mold -.d) =(%poke name.d))))
12654− ?. (module-scope-valid mod(defs ordinary) prelude-values prelude-molds) ~
12655− =/ derived=(list term) ~[%state action]
12656− ?: (lien derived |=(n=term =(n %proj))) ~
12657− =/ outer=(list term)
12658− (weld prelude-values (weld (global-value-names ordinary) (api-import-faces imports.mod)))
12659− ?. (levy derived |=(n=term &((unique-value-name n derived) !(lien outer |=(x=term =(n x)))))) ~
12660− `[action ordinary]
12661−::
12662−++ program-empty-null
12663− |= e=expr
12664− ^- ?
12665− ?- -.e
12666− %lit =(%null form.lit.e)
12667− %cast $(e val.e)
12668− %group $(e inner.e)
12669− %body ?~(defs.e $(e final.e) |)
12670− * |
12671− ==
12672−::
12673−++ program-subs-empty
12674− |= d=def
12675− ^- ?
12676− ?. ?=(%value -.d) |
12677− ?- -.val.d
12678− %gate (program-empty-null body.val.d)
12679− %gate-wide (program-empty-null body.val.d)
12680− * |
12681− ==
12682−::
12683−++ program-transparent
12684− |= e=expr
12685− ^- expr
12686− ?- -.e
12687− %group $(e inner.e)
12688− %cast $(e val.e)
12689− %body ?~(defs.e $(e final.e) e)
12690− * e
12691− ==
12692−++ program-init-tuple-null
12693− |= d=def
12694− ^- ?
12695− ?. ?=(%value -.d) |
12696− ?. |(?=(%gate -.val.d) ?=(%gate-wide -.val.d)) |
12697− =/ body=expr
12698− ?- -.val.d
12699− %gate body.val.d
12700− %gate-wide body.val.d
12701− * !!
12702− ==
12703− =. body (program-transparent body)
12704− ?. ?=(%tuple -.body) |
12705− ?~ items.body |
12706− (program-empty-null val:(rear items.body))
12707−::
12708−:: Recover only the update of an already recognized direct program main.
12709−:: Its written sample determines the message/model relationship; the canonical
12710−:: cmd, unit and update slot determine the result context. Publication is
12711−:: component-local so later subscription/view/initializer retries can accumulate.
12712−++ program-update-context
12713− |= [main=def parts=[init=term update=term view=term subs=term] ds=(list def) resolution=iresolved initial=istate]
12714− ^- (unit iresolved)
12715− =/ env=ienv env.resolution
12716− ?^ (ienv-lookup %main env) ~
12717− ?^ (ienv-lookup update.parts env) ~
12718− =/ updates=(list def)
12719− (skim ds |=(d=def &(?=(%value -.d) =(update.parts name.d))))
12720− ?. ?=([* ~] updates) ~
12721− =/ update-def=def i.updates
12722− ?> ?=(%value -.update-def)
12723− =/ written-update=(unit sample) (direct-gate-sample update-def)
12724− ?~ written-update ~
12725− ?. ?=(%cell -.u.written-update) ~
12726− ?. ?=([* * ~] items.u.written-update) ~
12727− ?~ prelude.initial ~
12728− =/ program=(unit ischeme) (ienv-lookup %program values.u.prelude.initial)
12729− ?~ program ~
12730− =/ command=(unit ischeme) (find-jibb-mold %cmd u.prelude.initial)
12731− =/ list-template=(unit ischeme) (find-jibb-mold %list u.prelude.initial)
12732− ?~ command ~
12733− ?~ list-template ~
12734− =/ heads=(unit igate-prelude-evidence) (direct-prelude-evidence ds prelude.initial)
12735− ?~ heads ~
12736− =/ written=(unit def) (~(get by gates.u.heads) %program)
12737− ?~ written ~
12738− =/ written-sample=(unit sample) (direct-gate-sample u.written)
12739− ?~ written-sample ~
12740− ?. ?=(%cell -.u.written-sample) ~
12741− ?. ?=([* * * * ~] items.u.written-sample) ~
12742− =/ checked=(map term def)
12743− (~(put by (direct-checked-gates ds env)) update.parts update-def)
12744− =/ templates=ienv
12745− (turn molds.u.prelude.initial |=(x=[name=term template=ischeme] [name.x template.x]))
12746− =/ scanned=(unit dgscan)
12747− (dg-all-env-ids (weld env (weld values.u.prelude.initial templates)) 32.768 ~)
12748− ?~ scanned ~
12749− =. next.initial (dg-next-id ids.u.scanned 0)
12750− =/ update-state=istate (reserve-def-caps val.update-def initial)
12751− =/ sam=isample-result (infer-sample u.written-update env update-state)
12752− ?: ?=(%| -.sam) ~
12753− =/ actual-sample=itype (itype-normalize typ.p.sam sub.state.p.sam)
12754− ?. ?=(%cell -.actual-sample) ~
12755− =/ message=(unit itype)
12756− (direct-slot-body hed.actual-sample (direct-sample-name i.items.u.written-update))
12757− =/ model=(unit itype)
12758− (direct-slot-body tal.actual-sample (direct-sample-name i.t.items.u.written-update))
12759− ?~ message ~
12760− ?~ model ~
12761− =/ cmd=(unit itype) (template-apply u.command ~[u.message])
12762− ?~ cmd ~
12763− =/ command-result=(unit itype) (template-apply u.list-template ~[u.cmd])
12764− ?~ command-result ~
12765− =/ product=itype [%cell u.model u.command-result]
12766− =/ instance=[typ=itype state=istate] (instantiate-scheme u.program state.p.sam)
12767− ?. ?=(%fn -.typ.instance) ~
12768− ?. ?=(%cell -.sample.typ.instance) ~
12769− ?. ?=(%cell -.tal.sample.typ.instance) ~
12770− =/ expected-update=(unit itype)
12771− (direct-slot-body hed.tal.sample.typ.instance (direct-sample-name i.t.items.u.written-sample))
12772− ?~ expected-update ~
12773− ?. ?=(%fn -.u.expected-update) ~
12774− :: Sample binders are not value faces. Strip only those two slot faces
12775− :: for the invariant canonical-gate proof; the source-faced gate is still
12776− :: used by the complete positional call and final ordinary result cast.
12777− =/ canonical-candidate=itype [%fn [%cell u.message u.model] product]
12778− =/ gate-fit=ifit
12779− (direct-invariant canonical-candidate u.expected-update sub.state.instance next.state.instance)
12780− ?. ?=(%ok -.gate-fit) ~
12781− =/ closed=itype
12782− (itype-normalize [%fn typ.p.sam product] sub.gate-fit)
12783− ?. ?=(%fn -.closed) ~
12784− :: The closed product no longer needs the canonical slot substitutions.
12785− :: Start the body at its ordinary sample state so existing branch retries
12786− :: keep their substitution guards, but retain the shared fresh-ID high water.
12787− =/ st=istate state.p.sam(next next.gate-fit, gate-defs checked, head-evidence heads)
12788− =/ body=expr
12789− ?- -.val.update-def
12790− %gate body.val.update-def
12791− %gate-wide body.val.update-def
12792− * !!
12793− ==
12794− =/ inferred=iresult
12795− (infer-call-context-arg body product.closed env.p.sam st (span-of body))
12796− ?: ?=(%| -.inferred) ~
12797− =/ product-fit=ifit
12798− (itype-fit typ.p.inferred product.closed sub.state.p.inferred next.state.p.inferred)
12799− ?. ?=(%ok -.product-fit) ~
12800− =/ merged-product=itype
12801− (itype-merge-faces typ.p.inferred product.closed sub.product-fit)
12802− =/ actual-cast=itype [%fn typ.p.sam merged-product]
12803− =/ cast=ifit
12804− (itype-fit actual-cast closed sub.product-fit next.product-fit)
12805− ?. ?=(%ok -.cast) ~
12806− =/ merged=itype (itype-merge-faces actual-cast closed sub.cast)
12807− =/ adjusted=iresult
12808− [%& merged state.p.inferred(sub sub.cast, next next.cast)]
12809− =/ added=(unit iadded-definition)
12810− (add-supported-result update-def adjusted update-state env checked artifacts.resolution)
12811− ?~ added ~
12812− =/ recovered=(unit ischeme) (ienv-lookup update.parts env.u.added)
12813− ?~ recovered ~
12814− ?. ?=(~ vars.u.recovered) ~
12815− ?. ?=(~ (itype-vars typ.u.recovered)) ~
12816− `[env.u.added grouped.resolution artifacts.u.added]
12817−::
12818−++ program-inferred-slot
12819− |= [typ=itype name=(unit term)]
12820− ^- itype
12821− ?~ name typ
12822− ?: &(?=(%face -.typ) =(name.typ u.name)) body.typ
12823− typ
12824−::
12825−++ program-inferred-sample
12826− |= [typ=itype sam=sample]
12827− ^- itype
12828− (program-inferred-slot typ (direct-sample-name sam))
12829−::
12830−++ program-two-slot-names
12831− |= sam=sample
12832− ^- (unit [first=(unit term) second=(unit term)])
12833− ?- -.sam
12834− %cell
12835− ?. ?=([* * ~] items.sam) ~
12836− `[(direct-sample-name i.items.sam) (direct-sample-name i.t.items.sam)]
12837− %face
12838− ?. ?=(%cell -.shape.sam) ~
12839− ?. ?=([* * ~] fields.shape.sam) ~
12840− `[(direct-field-name i.fields.shape.sam) (direct-field-name i.t.fields.shape.sam)]
12841− * ~
12842− ==
12843−::
12844−:: Read message/model from the checked update and its written source layout.
12845−:: The source names strip only top-level sample binder faces; nested value
12846−:: faces remain part of the canonical message and model.
12847−++ program-update-relation
12848− |= [name=term ds=(list def) env=ienv]
12849− ^- (unit [message=itype model=itype])
12850− =/ update=(unit ischeme) (ienv-lookup name env)
12851− ?~ update ~
12852− ?. ?=(~ vars.u.update) ~
12853− ?. ?=(~ (itype-vars typ.u.update)) ~
12854− ?. ?=(%fn -.typ.u.update) ~
12855− ?. ?=(%cell -.sample.typ.u.update) ~
12856− =/ defs=(list def)
12857− (skim ds |=(d=def &(?=(%value -.d) =(name name.d))))
12858− ?. ?=([* ~] defs) ~
12859− =/ written=(unit sample) (direct-gate-sample i.defs)
12860− ?~ written ~
12861− ?. ?=(%cell -.u.written) ~
12862− ?. ?=([* * ~] items.u.written) ~
12863− =/ message=(unit itype)
12864− (direct-slot-body hed.sample.typ.u.update (direct-sample-name i.items.u.written))
12865− =/ model=(unit itype)
12866− (direct-slot-body tal.sample.typ.u.update (direct-sample-name i.t.items.u.written))
12867− ?~ message ~
12868− ?~ model ~
12869− `[u.message u.model]
12870−::
12871−:: Recover an unannotated direct subscription component from the checked
12872−:: update relation and canonical fourth program slot. This establishes only
12873−:: the value type; the final program watch proof remains separate.
12874−++ program-subs-context
12875− |= [parts=[init=term update=term view=term subs=term] ds=(list def) resolution=iresolved initial=istate]
12876− ^- (unit iresolved)
12877− =/ env=ienv env.resolution
12878− ?^ (ienv-lookup %main env) ~
12879− ?^ (ienv-lookup subs.parts env) ~
12880− =/ relation=(unit [message=itype model=itype])
12881− (program-update-relation update.parts ds env)
12882− ?~ relation ~
12883− =/ subs=(list def)
12884− (skim ds |=(d=def &(?=(%value -.d) =(subs.parts name.d))))
12885− ?. ?=([* ~] subs) ~
12886− =/ subs-def=def i.subs
12887− ?> ?=(%value -.subs-def)
12888− =/ written-subs=(unit sample) (direct-gate-sample subs-def)
12889− ?~ written-subs ~
12890− ?~ prelude.initial ~
12891− =/ program=(unit ischeme) (ienv-lookup %program values.u.prelude.initial)
12892− =/ sub=(unit ischeme) (find-jibb-mold %sub u.prelude.initial)
12893− =/ list-template=(unit ischeme) (find-jibb-mold %list u.prelude.initial)
12894− ?~ program ~
12895− ?~ sub ~
12896− ?~ list-template ~
12897− =/ heads=(unit igate-prelude-evidence) (direct-prelude-evidence ds prelude.initial)
12898− ?~ heads ~
12899− =/ written=(unit def) (~(get by gates.u.heads) %program)
12900− ?~ written ~
12901− =/ written-sample=(unit sample) (direct-gate-sample u.written)
12902− ?~ written-sample ~
12903− ?. ?=(%cell -.u.written-sample) ~
12904− ?. ?=([* * * * ~] items.u.written-sample) ~
12905− =/ checked=(map term def) (direct-checked-gates ds env)
12906− =/ templates=ienv
12907− (turn molds.u.prelude.initial |=(x=[name=term template=ischeme] [name.x template.x]))
12908− =/ scanned=(unit dgscan)
12909− (dg-all-env-ids (weld env (weld values.u.prelude.initial templates)) 32.768 ~)
12910− ?~ scanned ~
12911− =. next.initial (dg-next-id ids.u.scanned 0)
12912− =/ subs-state=istate (reserve-def-caps val.subs-def initial)
12913− =/ sam=isample-result (infer-sample u.written-subs env subs-state)
12914− ?: ?=(%| -.sam) ~
12915− =/ actual-model=itype (program-inferred-sample typ.p.sam u.written-subs)
12916− ?. ?=(~ (itype-vars actual-model)) ~
12917− ?: (itype-has-tag actual-model) ~
12918− =/ model-fit=ifit
12919− (direct-invariant actual-model model.u.relation sub.state.p.sam next.state.p.sam)
12920− ?. ?=(%ok -.model-fit) ~
12921− =/ message-sub=(unit itype) (template-apply u.sub ~[message.u.relation])
12922− ?~ message-sub ~
12923− =/ product=(unit itype) (template-apply u.list-template ~[u.message-sub])
12924− ?~ product ~
12925− =/ instance=[typ=itype state=istate]
12926− (instantiate-scheme u.program state.p.sam(sub sub.model-fit, next next.model-fit))
12927− ?. ?=(%fn -.typ.instance) ~
12928− ?. ?=(%cell -.sample.typ.instance) ~
12929− ?. ?=(%cell -.tal.sample.typ.instance) ~
12930− ?. ?=(%cell -.tal.tal.sample.typ.instance) ~
12931− =/ expected-subs=(unit itype)
12932− (direct-slot-body tal.tal.tal.sample.typ.instance (direct-sample-name i.t.t.t.items.u.written-sample))
12933− ?~ expected-subs ~
12934− ?. ?=(%fn -.u.expected-subs) ~
12935− =/ canonical=itype [%fn model.u.relation u.product]
12936− =/ gate-fit=ifit
12937− (direct-invariant canonical u.expected-subs sub.state.instance next.state.instance)
12938− ?. ?=(%ok -.gate-fit) ~
12939− =/ closed=itype
12940− (itype-normalize [%fn typ.p.sam u.product] sub.gate-fit)
12941− ?. ?=(%fn -.closed) ~
12942− =/ body=expr
12943− ?- -.val.subs-def
12944− %gate body.val.subs-def
12945− %gate-wide body.val.subs-def
12946− * !!
12947− ==
12948− =/ st=istate
12949− state.p.sam(next next.gate-fit, gate-defs checked, head-evidence heads)
12950− =/ inferred=iresult
12951− (infer-call-context-arg body product.closed env.p.sam st (span-of body))
12952− ?: ?=(%| -.inferred) ~
12953− =/ product-fit=ifit
12954− (itype-fit typ.p.inferred product.closed sub.state.p.inferred next.state.p.inferred)
12955− ?. ?=(%ok -.product-fit) ~
12956− =/ merged-product=itype
12957− (itype-merge-faces typ.p.inferred product.closed sub.product-fit)
12958− =/ actual-cast=itype [%fn typ.p.sam merged-product]
12959− =/ cast=ifit
12960− (itype-fit actual-cast closed sub.product-fit next.product-fit)
12961− ?. ?=(%ok -.cast) ~
12962− =/ merged=itype (itype-merge-faces actual-cast closed sub.cast)
12963− =/ adjusted=iresult
12964− [%& merged state.p.inferred(sub sub.cast, next next.cast)]
12965− =/ added=(unit iadded-definition)
12966− (add-supported-result subs-def adjusted subs-state env checked artifacts.resolution)
12967− ?~ added ~
12968− =/ recovered=(unit ischeme) (ienv-lookup subs.parts env.u.added)
12969− ?~ recovered ~
12970− ?. ?=(~ vars.u.recovered) ~
12971− ?. ?=(~ (itype-vars typ.u.recovered)) ~
12972− `[env.u.added grouped.resolution artifacts.u.added]
12973−::
12974−+$ iview-site [xs=expr mapper=term]
12975−++ program-view-site
12976− |= e=expr
12977− ^- (unit iview-site)
12978− =. e (program-transparent e)
12979− ?. ?=(%call -.e) ~
12980− ?. ?=([* ~] args.e) ~
12981− =/ each=expr (program-transparent head.e)
12982− ?. ?=(%wing -.each) ~
12983− ?. ?=([%each ~] names.each) ~
12984− =/ turned=expr (program-transparent i.args.e)
12985− ?. ?=(%call -.turned) ~
12986− ?. ?=([* * ~] args.turned) ~
12987− =/ turn=expr (program-transparent head.turned)
12988− ?. ?=(%wing -.turn) ~
12989− ?. ?=([%turn ~] names.turn) ~
12990− =/ xs=expr (program-transparent i.args.turned)
12991− ?. ?=(%wing -.xs) ~
12992− ?~ names.xs ~
12993− =/ mapper=(unit term) (program-main-wing i.t.args.turned)
12994− ?~ mapper ~
12995− `[xs u.mapper]
12996−::
12997−++ program-recovery-names
12998− |= ds=(list def)
12999− ^- (list term)
13000− =/ main=(unit def) (program-main-def ds)
13001− ?~ main ~
13002− =/ parts=(unit [init=term update=term view=term subs=term])
13003− (program-main-parts u.main)
13004− ?~ parts ~
13005− =/ views=(list def)
13006− (skim ds |=(d=def &(?=(%value -.d) =(view.u.parts name.d))))
13007− ?. ?=([* ~] views) ~
13008− =/ view-def=def i.views
13009− ?> ?=(%value -.view-def)
13010− =/ written=(unit sample) (direct-gate-sample view-def)
13011− ?~ written ~
13012− =/ body=expr
13013− ?- -.val.view-def
13014− %gate body.val.view-def
13015− %gate-wide body.val.view-def
13016− * !!
13017− ==
13018− =/ sites=(unit (list iview-site)) (program-view-sites body ~)
13019− ?~ sites ~
13020− ?. ?=([* ~] u.sites) ~
13021− =/ mapper=term mapper.i.u.sites
13022− =/ components=(list term)
13023− :~ init.u.parts
13024− update.u.parts
13025− view.u.parts
13026− subs.u.parts
13027− ==
13028− ?: (lien components |=(n=term =(n mapper))) ~
13029− =/ mappers=(list def)
13030− (skim ds |=(d=def &(?=(%value -.d) =(mapper name.d))))
13031− ?. ?=([* ~] mappers) ~
13032− :~ init.u.parts
13033− update.u.parts
13034− view.u.parts
13035− subs.u.parts
13036− mapper
13037− ==
13038−::
13039−++ program-sample-binders
13040− |= sam=sample
13041− ^- (list term)
13042− ?- -.sam
13043− %bind ~[name.sam]
13044− %face ~[name.sam]
13045− %pun ~[name.sam]
13046− %cell (zing (turn items.sam |=(s=sample (program-sample-binders s))))
13047− * ~
13048− ==
13049−::
13050−++ program-pattern-binders
13051− |= pat=pattern
13052− ^- (list term)
13053− ?- -.pat
13054− %bind ~[name.pat]
13055− %cell (zing (turn items.pat |=(p=pattern (program-pattern-binders p))))
13056− * ~
13057− ==
13058−::
13059−++ program-view-sites-merge
13060− |= [a=(unit (list iview-site)) b=(unit (list iview-site))]
13061− ^- (unit (list iview-site))
13062− ?~ a ~
13063− ?~ b ~
13064− `(weld u.a u.b)
13065−::
13066−++ program-view-sites-exprs
13067− |= [xs=(list expr) locals=(list term)]
13068− ^- (unit (list iview-site))
13069− ?~ xs `~
13070− (program-view-sites-merge (program-view-sites i.xs locals) $(xs t.xs))
13071−::
13072−++ program-view-sites-items
13073− |= [xs=(list item) locals=(list term)]
13074− ^- (unit (list iview-site))
13075− ?~ xs `~
13076− (program-view-sites-merge (program-view-sites val.i.xs locals) $(xs t.xs))
13077−::
13078−++ program-view-sites-pieces
13079− |= [xs=(list piece) locals=(list term)]
13080− ^- (unit (list iview-site))
13081− ?~ xs `~
13082− =/ here=(unit (list iview-site))
13083− ?- -.i.xs
13084− %expr (program-view-sites p.i.xs locals)
13085− %text `~
13086− ==
13087− (program-view-sites-merge here $(xs t.xs))
13088−::
13089−++ program-view-sites-qsegs
13090− |= [xs=(list qseg) locals=(list term)]
13091− ^- (unit (list iview-site))
13092− ?~ xs `~
13093− =/ here=(unit (list iview-site))
13094− ?- -.i.xs
13095− %expr (program-view-sites p.i.xs locals)
13096− %knot `~
13097− ==
13098− (program-view-sites-merge here $(xs t.xs))
13099−::
13100−++ program-view-sites-edits
13101− |= [xs=(list edit) locals=(list term)]
13102− ^- (unit (list iview-site))
13103− ?~ xs `~
13104− (program-view-sites-merge (program-view-sites val.i.xs locals) $(xs t.xs))
13105−::
13106−++ program-view-sites-defs
13107− |= [xs=(list def) locals=(list term)]
13108− ^- (unit (list iview-site))
13109− ?~ xs `~
13110− =/ here=(unit (list iview-site))
13111− ?: ?=(%mold -.i.xs) `~
13112− (program-view-sites val.i.xs locals)
13113− (program-view-sites-merge here $(xs t.xs))
13114−::
13115−++ program-view-sites-arms
13116− |= [xs=(list arm) locals=(list term)]
13117− ^- (unit (list iview-site))
13118− ?~ xs `~
13119− =/ nested=(list term) (weld (program-pattern-binders pat.i.xs) locals)
13120− (program-view-sites-merge (program-view-sites val.i.xs nested) $(xs t.xs))
13121−::
13122−++ program-view-sites
13123− |= [e=expr locals=(list term)]
13124− ^- (unit (list iview-site))
13125− =/ site=(unit iview-site) (program-view-site e)
13126− ?^ site
13127− =/ names=(list term) ~[%each %turn mapper.u.site]
13128− ?> ?=(%wing -.xs.u.site)
13129− =/ root=term (rear names.xs.u.site)
13130− ?: |((lien names |=(n=term (lien locals |=(x=term =(n x))))) (lien locals |=(x=term =(root x))))
13131− ~
13132− `~[u.site]
13133− ?- -.e
13134− %str (program-view-sites-pieces pieces.e locals)
13135− %qath (program-view-sites-qsegs segs.e locals)
13136− %change (program-view-sites-edits edits.e locals)
13137− %pair (program-view-sites val.e locals)
13138− %unit (program-view-sites val.e locals)
13139− %group (program-view-sites inner.e locals)
13140− %list (program-view-sites-exprs items.e locals)
13141− %tuple (program-view-sites-items items.e locals)
13142− %gate
13143− (program-view-sites body.e (weld (program-sample-binders sample.e) locals))
13144− %gate-wide
13145− (program-view-sites body.e (weld (program-sample-binders sample.e) locals))
13146− %call
13147− (program-view-sites-merge (program-view-sites head.e locals) (program-view-sites-exprs args.e locals))
13148− %cast (program-view-sites val.e locals)
13149− %trace
13150− (program-view-sites-merge (program-view-sites val.e locals) (program-view-sites then.e locals))
13151− %branch
13152− (program-view-sites-merge (program-view-sites subject.e locals) (program-view-sites-arms arms.e locals))
13153− %body
13154− =/ nested=(list term) (weld (global-value-names defs.e) locals)
13155− (program-view-sites-merge (program-view-sites-defs defs.e nested) (program-view-sites final.e nested))
13156− * `~
13157− ==
13158−::
13159−++ program-union-tag-case
13160− |= [expected=itype tag=@]
13161− ^- (unit itype)
13162− ?. ?=(%union -.expected) ~
13163− =/ remaining=(list itype) cases.expected
13164− =/ found=(unit itype) ~
13165− =/ seen=(set @) *(set @)
13166− |-
13167− ?~ remaining found
13168− =/ case=itype i.remaining
13169− =/ head=(unit @)
13170− ?: ?=(%const -.case) `val.literal.case
13171− ?. ?=(%cell -.case) ~
13172− ?. ?=(%const -.hed.case) ~
13173− `val.literal.hed.case
13174− ?~ head ~
13175− ?: (~(has in:..zuse seen) u.head) ~
13176− =. seen (~(put in:..zuse seen) u.head)
13177− =? found =(tag u.head)
13178− ?^(found ~ `case)
13179− $(remaining t.remaining)
13180−::
13181−++ program-single-case-fit
13182− |= [actual=itype expected=itype sub=isub next=@ud]
13183− ^- ifit
13184− =. actual (itype-normalize actual sub)
13185− =. expected (itype-normalize expected sub)
13186− ?. ?=(%union -.expected) [%unknown ~]
13187− =/ found=(unit itype)
13188− ?: ?=(%const -.actual) `actual
13189− ?: ?=(%tag -.actual) `actual
13190− ?: ?=(%cell -.actual) `actual
13191− ?. ?=(%union -.actual) ~
13192− ?. ?=([* ~] cases.actual) ~
13193− `i.cases.actual
13194− ?~ found [%unknown ~]
13195− =/ case=itype u.found
13196− =/ tag=(unit lit)
13197− ?: ?=(%const -.case) `literal.case
13198− ?: ?=(%tag -.case) `literal.case
13199− ?. ?=(%cell -.case) ~
13200− =/ head=itype (projection-field-target hed.case)
13201− ?: ?=(%const -.head) `literal.head
13202− ?: ?=(%tag -.head) `literal.head
13203− ~
13204− ?~ tag [%unknown ~]
13205− =/ chosen=(unit itype) (program-union-tag-case expected val.u.tag)
13206− ?~ chosen [%unknown ~]
13207− ?: |(?=(%const -.case) ?=(%tag -.case))
13208− ?. ?=(%const -.u.chosen) [%unknown ~]
13209− (itype-fit case u.chosen sub next)
13210− ?. ?=(%cell -.case) [%unknown ~]
13211− ?. ?=(%cell -.u.chosen) [%unknown ~]
13212− =/ head-fit=ifit (itype-fit hed.case hed.u.chosen sub next)
13213− ?. ?=(%ok -.head-fit) head-fit
13214− (itype-fit tal.case tal.u.chosen sub.head-fit next.head-fit)
13215−::
13216−++ program-single-generic-fit
13217− |= [actual=itype expected=itype sub=isub next=@ud]
13218− ^- ifit
13219− =. actual (itype-normalize actual sub)
13220− =. expected (itype-normalize expected sub)
13221− ?. &(?=(%union -.actual) ?=(%union -.expected)) [%unknown ~]
13222− ?~ origin.actual [%unknown ~]
13223− ?. =(origin.actual origin.expected) [%unknown ~]
13224− ?. ?=([* ~] args.actual) [%unknown ~]
13225− ?. ?=([* ~] args.expected) [%unknown ~]
13226− =/ argument-fit=ifit (direct-invariant i.args.actual i.args.expected sub next)
13227− ?: ?=(%ok -.argument-fit) argument-fit
13228− (program-single-case-fit i.args.actual i.args.expected sub next)
13229−::
13230−++ program-keyed-product-fit
13231− |= [actual=itype expected=itype element=ischeme sub=isub next=@ud]
13232− ^- ifit
13233− =. actual (itype-normalize actual sub)
13234− =. expected (itype-normalize expected sub)
13235− ?. &(?=(%cell -.actual) ?=(%cell -.expected)) [%unknown ~]
13236− =/ key-fit=ifit
13237− (itype-fit (projection-field-target hed.actual) (projection-field-target hed.expected) sub next)
13238− ?. ?=(%ok -.key-fit) key-fit
13239− =/ actual-el=itype
13240− (itype-normalize (projection-field-target tal.actual) sub.key-fit)
13241− =/ expected-el=itype
13242− (itype-normalize (projection-field-target tal.expected) sub.key-fit)
13243− ?. &(?=(%union -.actual-el) ?=(%union -.expected-el)) [%unknown ~]
13244− ?. =(origin.actual-el origin.expected-el) [%unknown ~]
13245− ?. ?=([* ~] args.actual-el) [%unknown ~]
13246− ?. ?=([* ~] args.expected-el) [%unknown ~]
13247− =/ canonical-actual=(unit itype)
13248− (template-apply element ~[i.args.actual-el])
13249− =/ canonical-expected=(unit itype)
13250− (template-apply element ~[i.args.expected-el])
13251− ?~ canonical-actual [%unknown ~]
13252− ?~ canonical-expected [%unknown ~]
13253− =/ actual-check=ifit
13254− (direct-invariant actual-el u.canonical-actual sub.key-fit next.key-fit)
13255− ?. ?=(%ok -.actual-check) actual-check
13256− =/ expected-check=ifit
13257− (direct-invariant expected-el u.canonical-expected sub.actual-check next.actual-check)
13258− ?. ?=(%ok -.expected-check) expected-check
13259− =/ case-fit=ifit
13260− (program-single-case-fit i.args.actual-el i.args.expected-el sub.expected-check next.expected-check)
13261− case-fit
13262−::
13263−:: A direct view without a keyed each/turn site still needs the message type
13264−:: from the checked update. Recover only that closed component; final main
13265−:: checking remains the canonical program-kind boundary.
13266−++ program-plain-view-context
13267− |= [parts=[init=term update=term view=term subs=term] ds=(list def) resolution=iresolved initial=istate]
13268− ^- (unit iresolved)
13269− =/ env=ienv env.resolution
13270− ?^ (ienv-lookup %main env) ~
13271− ?^ (ienv-lookup view.parts env) ~
13272− =/ relation=(unit [message=itype model=itype])
13273− (program-update-relation update.parts ds env)
13274− ?~ relation ~
13275− =/ views=(list def)
13276− (skim ds |=(d=def &(?=(%value -.d) =(view.parts name.d))))
13277− ?. ?=([* ~] views) ~
13278− =/ view-def=def i.views
13279− ?> ?=(%value -.view-def)
13280− =/ written-view=(unit sample) (direct-gate-sample view-def)
13281− ?~ written-view ~
13282− =/ body=expr
13283− ?- -.val.view-def
13284− %gate body.val.view-def
13285− %gate-wide body.val.view-def
13286− * !!
13287− ==
13288− =/ sites=(unit (list iview-site)) (program-view-sites body ~)
13289− ?~ sites ~
13290− ?^ u.sites ~
13291− ?~ prelude.initial ~
13292− ?~ (ienv-lookup %program values.u.prelude.initial) ~
13293− =/ element=(unit ischeme) (find-jibb-mold %element u.prelude.initial)
13294− ?~ element ~
13295− =/ heads=(unit igate-prelude-evidence) (direct-prelude-evidence ds prelude.initial)
13296− ?~ heads ~
13297− ?~ (~(get by gates.u.heads) %program) ~
13298− =/ checked=(map term def) (direct-checked-gates ds env)
13299− =/ templates=ienv
13300− (turn molds.u.prelude.initial |=(x=[name=term template=ischeme] [name.x template.x]))
13301− =/ scanned=(unit dgscan)
13302− (dg-all-env-ids (weld env (weld values.u.prelude.initial templates)) 32.768 ~)
13303− ?~ scanned ~
13304− =. next.initial (dg-next-id ids.u.scanned 0)
13305− =/ view-state=istate (reserve-def-caps val.view-def initial)
13306− =/ sam=isample-result (infer-sample u.written-view env view-state)
13307− ?: ?=(%| -.sam) ~
13308− =/ actual-model=itype (program-inferred-sample typ.p.sam u.written-view)
13309− ?. ?=(~ (itype-vars actual-model)) ~
13310− ?: (itype-has-tag actual-model) ~
13311− =/ model-fit=ifit
13312− (direct-invariant actual-model model.u.relation sub.state.p.sam next.state.p.sam)
13313− ?. ?=(%ok -.model-fit) ~
13314− =/ product=(unit itype) (template-apply u.element ~[message.u.relation])
13315− ?~ product ~
13316− =/ st=istate
13317− state.p.sam(sub sub.model-fit, next next.model-fit, gate-defs checked, head-evidence heads)
13318− =/ inferred=iresult
13319− (infer-call-context-arg body u.product env.p.sam st (span-of body))
13320− ?: ?=(%| -.inferred) ~
13321− =/ product-fit=ifit
13322− (itype-fit typ.p.inferred u.product sub.state.p.inferred next.state.p.inferred)
13323− ?. ?=(%ok -.product-fit) ~
13324− =/ merged-product=itype
13325− (itype-merge-faces typ.p.inferred u.product sub.product-fit)
13326− =/ actual-cast=itype [%fn typ.p.sam merged-product]
13327− =/ closed=itype [%fn typ.p.sam u.product]
13328− =/ cast=ifit
13329− (itype-fit actual-cast closed sub.product-fit next.product-fit)
13330− ?. ?=(%ok -.cast) ~
13331− =/ merged=itype (itype-merge-faces actual-cast closed sub.cast)
13332− =/ adjusted=iresult
13333− [%& merged state.p.inferred(sub sub.cast, next next.cast)]
13334− =/ added=(unit iadded-definition)
13335− (add-supported-result view-def adjusted view-state env checked artifacts.resolution)
13336− ?~ added ~
13337− =/ recovered=(unit ischeme) (ienv-lookup view.parts env.u.added)
13338− ?~ recovered ~
13339− ?. ?=(~ vars.u.recovered) ~
13340− ?. ?=(~ (itype-vars typ.u.recovered)) ~
13341− `[env.u.added grouped.resolution artifacts.u.added]
13342−::
13343−:: Recover exactly one direct keyed each/turn row mapper, then its view.
13344−:: The prelude's own each and turn schemes determine the mapper gate: the
13345−:: key is inferred from the mapper body, never selected by this recovery.
13346−++ program-view-context
13347− |= [parts=[init=term update=term view=term subs=term] ds=(list def) resolution=iresolved initial=istate]
13348− ^- (unit iresolved)
13349− =/ env=ienv env.resolution
13350− ?^ (ienv-lookup %main env) ~
13351− ?^ (ienv-lookup view.parts env) ~
13352− =/ relation=(unit [message=itype model=itype])
13353− (program-update-relation update.parts ds env)
13354− ?~ relation ~
13355− =/ views=(list def)
13356− (skim ds |=(d=def &(?=(%value -.d) =(view.parts name.d))))
13357− ?. ?=([* ~] views) ~
13358− =/ view-def=def i.views
13359− ?> ?=(%value -.view-def)
13360− =/ written-view=(unit sample) (direct-gate-sample view-def)
13361− ?~ written-view ~
13362− =/ view-body=expr
13363− ?- -.val.view-def
13364− %gate body.val.view-def
13365− %gate-wide body.val.view-def
13366− * !!
13367− ==
13368− =/ sites=(unit (list iview-site)) (program-view-sites view-body ~)
13369− ?~ sites ~
13370− ?. ?=([* ~] u.sites) ~
13371− =/ site=iview-site i.u.sites
13372− =/ component-names=(list term) ~[init.parts update.parts view.parts subs.parts]
13373− ?: (lien component-names |=(n=term =(n mapper.site))) ~
13374− ?^ (ienv-lookup mapper.site env) ~
13375− =/ mappers=(list def)
13376− (skim ds |=(d=def &(?=(%value -.d) =(mapper.site name.d))))
13377− ?. ?=([* ~] mappers) ~
13378− =/ mapper-def=def i.mappers
13379− ?> ?=(%value -.mapper-def)
13380− =/ written-mapper=(unit sample) (direct-gate-sample mapper-def)
13381− ?~ written-mapper ~
13382− ?~ prelude.initial ~
13383− =/ program=(unit ischeme) (ienv-lookup %program values.u.prelude.initial)
13384− =/ each-scheme=(unit ischeme) (ienv-lookup %each values.u.prelude.initial)
13385− =/ turn-scheme=(unit ischeme) (ienv-lookup %turn values.u.prelude.initial)
13386− =/ element=(unit ischeme) (find-jibb-mold %element u.prelude.initial)
13387− =/ list-template=(unit ischeme) (find-jibb-mold %list u.prelude.initial)
13388− ?~ program ~
13389− ?~ each-scheme ~
13390− ?~ turn-scheme ~
13391− ?~ element ~
13392− ?~ list-template ~
13393− =/ heads=(unit igate-prelude-evidence) (direct-prelude-evidence ds prelude.initial)
13394− ?~ heads ~
13395− =/ written-program=(unit def) (~(get by gates.u.heads) %program)
13396− =/ written-each=(unit def) (~(get by gates.u.heads) %each)
13397− =/ written-turn=(unit def) (~(get by gates.u.heads) %turn)
13398− ?~ written-program ~
13399− ?~ written-each ~
13400− ?~ written-turn ~
13401− =/ program-sample=(unit sample) (direct-gate-sample u.written-program)
13402− =/ each-sample=(unit sample) (direct-gate-sample u.written-each)
13403− =/ turn-sample=(unit sample) (direct-gate-sample u.written-turn)
13404− ?~ program-sample ~
13405− ?~ each-sample ~
13406− ?~ turn-sample ~
13407− ?. ?=(%cell -.u.program-sample) ~
13408− ?. ?=([* * * * ~] items.u.program-sample) ~
13409− =/ turn-names=(unit [first=(unit term) second=(unit term)])
13410− (program-two-slot-names u.turn-sample)
13411− ?~ turn-names ~
13412− =/ checked=(map term def) (direct-checked-gates ds env)
13413− =/ templates=ienv
13414− (turn molds.u.prelude.initial |=(x=[name=term template=ischeme] [name.x template.x]))
13415− =/ scanned=(unit dgscan)
13416− (dg-all-env-ids (weld env (weld values.u.prelude.initial templates)) 32.768 ~)
13417− ?~ scanned ~
13418− =. next.initial (dg-next-id ids.u.scanned 0)
13419− =/ view-state=istate (reserve-def-caps val.view-def initial)
13420− =/ sam=isample-result (infer-sample u.written-view env view-state)
13421− ?: ?=(%| -.sam) ~
13422− =/ actual-model=itype (program-inferred-sample typ.p.sam u.written-view)
13423− =/ model-fit=ifit
13424− (direct-invariant actual-model model.u.relation sub.state.p.sam next.state.p.sam)
13425− ?. ?=(%ok -.model-fit) ~
13426− =/ xs-result=iresult
13427− (infer-fragment xs.site env.p.sam state.p.sam(sub sub.model-fit, next next.model-fit))
13428− ?: ?=(%| -.xs-result) ~
13429− =/ element-var=itype [%var next.state.p.xs-result]
13430− =/ list-a=(unit itype) (template-apply u.list-template ~[element-var])
13431− ?~ list-a ~
13432− =/ xs-fit=ifit
13433− (itype-fit typ.p.xs-result u.list-a sub.state.p.xs-result +(next.state.p.xs-result))
13434− ?. ?=(%ok -.xs-fit) ~
13435− =/ closed-xs=itype (itype-normalize u.list-a sub.xs-fit)
13436− ?^ (itype-vars closed-xs) ~
13437− ?: (itype-has-tag closed-xs) ~
13438− =/ each-instance=[typ=itype state=istate]
13439− (instantiate-scheme u.each-scheme state.p.xs-result(sub sub.xs-fit, next next.xs-fit))
13440− ?. ?=(%fn -.typ.each-instance) ~
13441− =/ turn-instance=[typ=itype state=istate]
13442− (instantiate-scheme u.turn-scheme state.each-instance)
13443− ?. ?=(%fn -.typ.turn-instance) ~
13444− ?. ?=(%cell -.sample.typ.turn-instance) ~
13445− =/ element-message=(unit itype)
13446− (template-apply u.element ~[message.u.relation])
13447− ?~ element-message ~
13448− =/ each-fit=ifit
13449− (itype-fit product.typ.each-instance u.element-message sub.state.turn-instance next.state.turn-instance)
13450− ?. ?=(%ok -.each-fit) ~
13451− =/ each-input=itype
13452− (program-inferred-sample sample.typ.each-instance u.each-sample)
13453− =/ turn-fit=ifit
13454− (itype-fit product.typ.turn-instance each-input sub.each-fit next.each-fit)
13455− ?. ?=(%ok -.turn-fit) ~
13456− =/ turn-list=itype
13457− (program-inferred-slot hed.sample.typ.turn-instance first.u.turn-names)
13458− =/ list-fit=ifit
13459− (itype-fit closed-xs turn-list sub.turn-fit next.turn-fit)
13460− ?. ?=(%ok -.list-fit) ~
13461− =/ mapper-type=itype
13462− (program-inferred-slot tal.sample.typ.turn-instance second.u.turn-names)
13463− =/ expected-mapper=itype (itype-normalize mapper-type sub.list-fit)
13464− ?. ?=(%fn -.expected-mapper) ~
13465− ?^ (itype-vars sample.expected-mapper) ~
13466− ?: (itype-has-tag sample.expected-mapper) ~
13467− :: These faces come from the source-backed each sample. Keeping them in
13468− :: the expected mapper product lets ordinary tuple inference supply key/el.
13469− ?. ?=(%cell -.product.expected-mapper) ~
13470− ?. ?=(%face -.hed.product.expected-mapper) ~
13471− ?. =(%key name.hed.product.expected-mapper) ~
13472− ?. ?=(%face -.tal.product.expected-mapper) ~
13473− ?. =(%el name.tal.product.expected-mapper) ~
13474− =/ mapper-state=istate
13475− (reserve-def-caps val.mapper-def initial(next next.list-fit))
13476− =/ mapper-sam=isample-result (infer-sample u.written-mapper env mapper-state)
13477− ?: ?=(%| -.mapper-sam) ~
13478− =/ mapper-input=itype (program-inferred-sample typ.p.mapper-sam u.written-mapper)
13479− =/ mapper-sample-fit=ifit
13480− (direct-invariant mapper-input sample.expected-mapper sub.state.p.mapper-sam next.state.p.mapper-sam)
13481− ?. ?=(%ok -.mapper-sample-fit) ~
13482− =/ mapper-product=itype
13483− (itype-normalize product.expected-mapper sub.mapper-sample-fit)
13484− =/ mapper-body=expr
13485− ?- -.val.mapper-def
13486− %gate body.val.mapper-def
13487− %gate-wide body.val.mapper-def
13488− * !!
13489− ==
13490− =/ mapper-inferred=iresult
13491− (infer-call-context-arg mapper-body mapper-product env.p.mapper-sam state.p.mapper-sam(sub sub.mapper-sample-fit, next next.mapper-sample-fit) (span-of mapper-body))
13492− ?: ?=(%| -.mapper-inferred) ~
13493− =/ ordinary-product-fit=ifit
13494− (itype-fit typ.p.mapper-inferred mapper-product sub.state.p.mapper-inferred next.state.p.mapper-inferred)
13495− =/ mapper-product-fit=ifit
13496− ?: ?=(%ok -.ordinary-product-fit) ordinary-product-fit
13497− (program-keyed-product-fit typ.p.mapper-inferred mapper-product u.element sub.state.p.mapper-inferred next.state.p.mapper-inferred)
13498− ?. ?=(%ok -.mapper-product-fit) ~
13499− =/ closed-mapper-product=itype
13500− (itype-normalize mapper-product sub.mapper-product-fit)
13501− ?^ (itype-vars closed-mapper-product) ~
13502− ?: (itype-has-tag closed-mapper-product) ~
13503− =/ merged-mapper-product=itype
13504− (itype-merge-faces typ.p.mapper-inferred closed-mapper-product sub.mapper-product-fit)
13505− =/ mapper-cast=itype [%fn typ.p.mapper-sam merged-mapper-product]
13506− =/ closed-mapper=itype [%fn typ.p.mapper-sam closed-mapper-product]
13507− =/ mapper-cast-fit=ifit
13508− (itype-fit mapper-cast closed-mapper sub.mapper-product-fit next.mapper-product-fit)
13509− ?. ?=(%ok -.mapper-cast-fit) ~
13510− =/ merged-mapper=itype
13511− (itype-merge-faces mapper-cast closed-mapper sub.mapper-cast-fit)
13512− =/ mapper-adjusted=iresult
13513− [%& merged-mapper state.p.mapper-inferred(sub sub.mapper-cast-fit, next next.mapper-cast-fit)]
13514− =/ mapper-added=(unit iadded-definition)
13515− (add-supported-result mapper-def mapper-adjusted mapper-state env checked artifacts.resolution)
13516− ?~ mapper-added ~
13517− =/ mapper-scheme=(unit ischeme) (ienv-lookup mapper.site env.u.mapper-added)
13518− ?~ mapper-scheme ~
13519− ?. ?=(~ vars.u.mapper-scheme) ~
13520− ?. ?=(~ (itype-vars typ.u.mapper-scheme)) ~
13521− =/ program-instance=[typ=itype state=istate]
13522− (instantiate-scheme u.program state.p.sam(next next.mapper-cast-fit))
13523− ?. ?=(%fn -.typ.program-instance) ~
13524− ?. ?=(%cell -.sample.typ.program-instance) ~
13525− ?. ?=(%cell -.tal.sample.typ.program-instance) ~
13526− ?. ?=(%cell -.tal.tal.sample.typ.program-instance) ~
13527− =/ expected-view=(unit itype)
13528− (direct-slot-body hed.tal.tal.sample.typ.program-instance (direct-sample-name i.t.t.items.u.program-sample))
13529− ?~ expected-view ~
13530− ?. ?=(%fn -.u.expected-view) ~
13531− =/ canonical-view=itype [%fn model.u.relation u.element-message]
13532− =/ view-fit=ifit
13533− (direct-invariant canonical-view u.expected-view sub.state.program-instance next.state.program-instance)
13534− ?. ?=(%ok -.view-fit) ~
13535− =/ closed-view=itype
13536− (itype-normalize [%fn typ.p.sam u.element-message] sub.view-fit)
13537− ?. ?=(%fn -.closed-view) ~
13538− =/ view-env=ienv [[mapper.site u.mapper-scheme] env.p.sam]
13539− =/ final-view-state=istate
13540− (reserve-def-caps val.view-def state.p.sam(next next.view-fit, gate-defs checked.u.mapper-added, head-evidence heads))
13541− =/ inferred=iresult
13542− (infer-call-context-arg view-body product.closed-view view-env final-view-state (span-of view-body))
13543− ?: ?=(%| -.inferred) ~
13544− =/ product-fit=ifit
13545− (itype-fit typ.p.inferred product.closed-view sub.state.p.inferred next.state.p.inferred)
13546− ?. ?=(%ok -.product-fit) ~
13547− =/ merged-product=itype
13548− (itype-merge-faces typ.p.inferred product.closed-view sub.product-fit)
13549− =/ actual-cast=itype [%fn typ.p.sam merged-product]
13550− =/ cast=ifit
13551− (itype-fit actual-cast closed-view sub.product-fit next.product-fit)
13552− ?. ?=(%ok -.cast) ~
13553− =/ merged=itype (itype-merge-faces actual-cast closed-view sub.cast)
13554− =/ adjusted=iresult
13555− [%& merged state.p.inferred(sub sub.cast, next next.cast)]
13556− =/ added=(unit iadded-definition)
13557− (add-supported-result view-def adjusted final-view-state env.u.mapper-added checked.u.mapper-added artifacts.u.mapper-added)
13558− ?~ added ~
13559− =/ recovered=(unit ischeme) (ienv-lookup view.parts env.u.added)
13560− ?~ recovered ~
13561− ?. ?=(~ vars.u.recovered) ~
13562− ?. ?=(~ (itype-vars typ.u.recovered)) ~
13563− `[env.u.added grouped.resolution artifacts.u.added]
13564−::
13565−++ program-init-null-sample
13566− |= d=def
13567− ^- ?
13568− =/ written=(unit sample) (direct-gate-sample d)
13569− ?~ written |
13570− ?. ?=(%bare -.u.written) |
13571− =/ sh=shape shape.u.written
13572− ?. ?=(%const -.sh) |
13573− =(%null form.lit.sh)
13574−::
13575−:: The tuple-ending-null initializer retry above intentionally keeps its own
13576−:: boundary. A direct null-sample initializer can instead receive the closed
13577−:: model already established by update, view and subscriptions.
13578−++ program-plain-init-context
13579− |= [parts=[init=term update=term view=term subs=term] ds=(list def) resolution=iresolved initial=istate]
13580− ^- (unit iresolved)
13581− =/ env=ienv env.resolution
13582− ?^ (ienv-lookup %main env) ~
13583− ?^ (ienv-lookup init.parts env) ~
13584− ?~ (ienv-lookup update.parts env) ~
13585− ?~ (ienv-lookup view.parts env) ~
13586− ?~ (ienv-lookup subs.parts env) ~
13587− =/ relation=(unit [message=itype model=itype])
13588− (program-update-relation update.parts ds env)
13589− ?~ relation ~
13590− =/ inits=(list def)
13591− (skim ds |=(d=def &(?=(%value -.d) =(init.parts name.d))))
13592− ?. ?=([* ~] inits) ~
13593− =/ init-def=def i.inits
13594− ?> ?=(%value -.init-def)
13595− ?. (program-init-null-sample init-def) ~
13596− =/ written=(unit sample) (direct-gate-sample init-def)
13597− ?~ written ~
13598− =/ body=expr
13599− ?- -.val.init-def
13600− %gate body.val.init-def
13601− %gate-wide body.val.init-def
13602− * !!
13603− ==
13604− ?~ prelude.initial ~
13605− ?~ (ienv-lookup %program values.u.prelude.initial) ~
13606− =/ heads=(unit igate-prelude-evidence) (direct-prelude-evidence ds prelude.initial)
13607− ?~ heads ~
13608− ?~ (~(get by gates.u.heads) %program) ~
13609− =/ checked=(map term def) (direct-checked-gates ds env)
13610− =/ templates=ienv
13611− (turn molds.u.prelude.initial |=(x=[name=term template=ischeme] [name.x template.x]))
13612− =/ scanned=(unit dgscan)
13613− (dg-all-env-ids (weld env (weld values.u.prelude.initial templates)) 32.768 ~)
13614− ?~ scanned ~
13615− =. next.initial (dg-next-id ids.u.scanned 0)
13616− =/ init-state=istate (reserve-def-caps val.init-def initial)
13617− =/ sam=isample-result (infer-sample u.written env init-state)
13618− ?: ?=(%| -.sam) ~
13619− ?. ?=(~ (itype-vars typ.p.sam)) ~
13620− ?: (itype-has-tag typ.p.sam) ~
13621− =/ st=istate state.p.sam(gate-defs checked, head-evidence heads)
13622− =/ inferred=iresult
13623− (infer-call-context-arg body model.u.relation env.p.sam st (span-of body))
13624− ?: ?=(%| -.inferred) ~
13625− =/ product-fit=ifit
13626− (itype-fit typ.p.inferred model.u.relation sub.state.p.inferred next.state.p.inferred)
13627− ?. ?=(%ok -.product-fit) ~
13628− =/ merged-product=itype
13629− (itype-merge-faces typ.p.inferred model.u.relation sub.product-fit)
13630− =/ actual-cast=itype [%fn typ.p.sam merged-product]
13631− =/ closed=itype [%fn typ.p.sam model.u.relation]
13632− =/ cast=ifit
13633− (itype-fit actual-cast closed sub.product-fit next.product-fit)
13634− ?. ?=(%ok -.cast) ~
13635− =/ merged=itype (itype-merge-faces actual-cast closed sub.cast)
13636− =/ adjusted=iresult
13637− [%& merged state.p.inferred(sub sub.cast, next next.cast)]
13638− =/ added=(unit iadded-definition)
13639− (add-supported-result init-def adjusted init-state env checked artifacts.resolution)
13640− ?~ added ~
13641− =/ recovered=(unit ischeme) (ienv-lookup init.parts env.u.added)
13642− ?~ recovered ~
13643− ?. ?=(~ vars.u.recovered) ~
13644− ?. ?=(~ (itype-vars typ.u.recovered)) ~
13645− `[env.u.added grouped.resolution artifacts.u.added]
13646−::
13647−:: Recover only the initializer of an already recognized direct program main.
13648−:: The derived call is evidence for an ordinary init/main retry, never an
13649−:: interface to publish on its own. Any failure returns the original resolution.
13650−++ program-init-context
13651− |= [main=def parts=[init=term update=term view=term subs=term] ds=(list def) resolution=iresolved initial=istate]
13652− ^- (unit iresolved)
13653− =/ env=ienv env.resolution
13654− ?^ (ienv-lookup %main env) ~
13655− ?^ (ienv-lookup init.parts env) ~
13656− =/ update=(unit ischeme) (ienv-lookup update.parts env)
13657− =/ view=(unit ischeme) (ienv-lookup view.parts env)
13658− =/ subs=(unit ischeme) (ienv-lookup subs.parts env)
13659− ?~ update ~
13660− ?~ view ~
13661− ?~ subs ~
13662− =/ inits=(list def)
13663− (skim ds |=(d=def &(?=(%value -.d) =(init.parts name.d))))
13664− ?. ?=([* ~] inits) ~
13665− =/ init-def=def i.inits
13666− ?> ?=(%value -.init-def)
13667− ?. (program-init-tuple-null init-def) ~
13668− =/ args=(unit (list expr)) (program-main-args main)
13669− ?~ args ~
13670− ?~ prelude.initial ~
13671− =/ program=(unit ischeme) (ienv-lookup %program values.u.prelude.initial)
13672− ?~ program ~
13673− =/ heads=(unit igate-prelude-evidence) (direct-prelude-evidence ds prelude.initial)
13674− ?~ heads ~
13675− =/ written=(unit def) (~(get by gates.u.heads) %program)
13676− ?~ written ~
13677− =/ written-sample=(unit sample) (direct-gate-sample u.written)
13678− ?~ written-sample ~
13679− ?. ?=(%cell -.u.written-sample) ~
13680− ?~ items.u.written-sample ~
13681− =/ checked=(map term def) (direct-checked-gates ds env)
13682− =/ templates=ienv
13683− (turn molds.u.prelude.initial |=(x=[name=term template=ischeme] [name.x template.x]))
13684− =/ scanned=(unit dgscan)
13685− (dg-all-env-ids (weld env (weld values.u.prelude.initial templates)) 32.768 ~)
13686− ?~ scanned ~
13687− =. next.initial (dg-next-id ids.u.scanned 0)
13688− =/ instance=[typ=itype state=istate] (instantiate-scheme u.program initial)
13689− ?. ?=(%fn -.typ.instance) ~
13690− ?. ?=(%cell -.sample.typ.instance) ~
13691− =/ expected-init=(unit itype)
13692− (direct-slot-body hed.sample.typ.instance (direct-sample-name i.items.u.written-sample))
13693− ?~ expected-init ~
13694− ?. ?=(%fn -.u.expected-init) ~
13695− ?. ?=(%var -.sample.u.expected-init) ~
13696− =/ data=@ud id.sample.u.expected-init
13697− =/ init-var=itype [%var next.state.instance]
13698− =/ st=istate state.instance(next +(next.state.instance))
13699− =/ up=[typ=itype state=istate] (instantiate-scheme u.update st)
13700− =/ vw=[typ=itype state=istate] (instantiate-scheme u.view state.up)
13701− =/ sb=[typ=itype state=istate] (instantiate-scheme u.subs state.vw)
13702− =. st state.sb(gate-defs checked, head-evidence heads)
13703− =/ actual=itype [%cell init-var [%cell typ.up [%cell typ.vw typ.sb]]]
13704− =/ fit=ifit
13705− (direct-positional-fit u.args items.u.written-sample actual sample.typ.instance env st sub.st next.st)
13706− ?. ?=(%ok -.fit) ~
13707− =/ actual-final=itype (itype-normalize actual sub.fit)
13708− =/ expected-final=itype (itype-normalize sample.typ.instance sub.fit)
13709− =/ open=(list @ud)
13710− (unique-type-vars (weld (itype-vars actual-final) (itype-vars expected-final)))
13711− ?. (levy open |=(n=@ud =(data n))) ~
13712− ?: |((itype-has-tag actual-final) (itype-has-tag expected-final)) ~
13713− =/ replay=ifit
13714− (direct-positional-fit u.args items.u.written-sample actual sample.typ.instance env st sub.fit next.fit)
13715− ?. ?=(%ok -.replay) ~
13716− ?. &(=(sub.fit sub.replay) =(next.fit next.replay)) ~
13717− =/ expected=itype (itype-normalize u.expected-init sub.fit)
13718− ?. ?=(%fn -.expected) ~
13719− =. st st(sub sub.fit, next next.fit)
13720− =/ init-state=istate (reserve-def-caps val.init-def st)
13721− =/ inferred=iresult (infer-fragment val.init-def env init-state)
13722− =? inferred ?=(%| -.inferred) (infer-recursive-gate init-def env init-state)
13723− ?: ?=(%| -.inferred) ~
13724− ?. ?=(%fn -.typ.p.inferred) ~
13725− =/ data-fit=ifit
13726− (itype-fit sample.typ.p.inferred sample.expected sub.state.p.inferred next.state.p.inferred)
13727− ?. ?=(%ok -.data-fit) ~
13728− =/ closed=itype (itype-normalize expected sub.data-fit)
13729− ?. ?=(%fn -.closed) ~
13730− :: Resolve the ordinary tuple cast first, then check the complete gate.
13731− :: General function fit remains unchanged; only this recovered candidate
13732− :: receives the derived result context before its whole-type cast fit.
13733− =/ product-fit=ifit
13734− (itype-fit product.typ.p.inferred product.closed sub.data-fit next.data-fit)
13735− ?. ?=(%ok -.product-fit) ~
13736− =/ product=itype
13737− (itype-merge-faces product.typ.p.inferred product.closed sub.product-fit)
13738− =/ actual-cast=itype [%fn sample.typ.p.inferred product]
13739− =/ cast=ifit
13740− (itype-fit actual-cast closed sub.product-fit next.product-fit)
13741− ?. ?=(%ok -.cast) ~
13742− =/ merged=itype (itype-merge-faces actual-cast closed sub.cast)
13743− =/ adjusted=iresult
13744− [%& merged state.p.inferred(sub sub.cast, next next.cast)]
13745− =/ added=(unit iadded-definition)
13746− (add-supported-result init-def adjusted init-state env checked artifacts.resolution)
13747− ?~ added ~
13748− =/ recovered=(unit ischeme) (ienv-lookup init.parts env.u.added)
13749− ?~ recovered ~
13750− ?. ?=(~ vars.u.recovered) ~
13751− ?. ?=(~ (itype-vars typ.u.recovered)) ~
13752− `[env.u.added grouped.resolution artifacts.u.added]
13753−::
13754−++ store-derived-schemes
13755− |= [prelude=ifile values=(list term) molds=(list term) state=itype action=itype]
13756− ^- (unit [state=ischeme action=ischeme])
13757− =/ prep=iprelude [prelude values molds]
13758− =/ ask=(unit ischeme) (request-compatible-ask prep)
13759− ?~ ask ~
13760− =/ poke=(unit ischeme) (store-compatible-poke prep)
13761− ?~ poke ~
13762− ?^ (itype-vars state) ~
13763− ?^ (itype-vars action) ~
13764− ?: |((itype-has-tag state) (itype-has-tag action)) ~
13765− =/ result=(unit itype) (template-apply u.ask ~[[%var 0]])
13766− ?~ result ~
13767− =/ request=ischeme [[%fn [%fn state [%var 0]] u.result] ~[0]]
13768− =/ constructor=ischeme [[%fn action typ.u.poke] ~]
13769− `[request constructor]
13770−::
13771−++ program-subs-watch
13772− |= [d=def imports=ijimports graph=irequest-graph prelude=ifile]
13773− ^- ?
13774− ?. ?=(%value -.d) |
13775− ?. |(?=(%gate -.val.d) ?=(%gate-wide -.val.d)) |
13776− =/ body=expr
13777− ?- -.val.d
13778− %gate body.val.d
13779− %gate-wide body.val.d
13780− * val.d
13781− ==
13782− =. body (program-transparent body)
13783− ?. ?=(%list -.body) |
13784− ?. ?=([* ~] items.body) |
13785− =/ watch=expr (program-transparent i.items.body)
13786− ?. ?=(%tuple -.watch) |
13787− ?. ?=([* * ~] items.watch) |
13788− =/ tag=item i.items.watch
13789− =/ payload=item i.t.items.watch
13790− ?. &(?=(~ face.tag) ?=(~ face.payload)) |
13791− =/ tag-expr=expr (program-transparent val.tag)
13792− ?. ?=(%lit -.tag-expr) |
13793− ?. &(?=(%term form.lit.tag-expr) =(%watch val.lit.tag-expr)) |
13794− =/ request=expr (program-transparent val.payload)
13795− ?. ?=(%call -.request) |
13796− ?. ?=([* ~] args.request) |
13797− =/ head=expr (program-transparent head.request)
13798− ?. ?=(%wing -.head) |
13799− ?. ?=([@ @ ~] names.head) |
13800− =/ case=term i.names.head
13801− =/ face=term i.t.names.head
13802− =/ callback=expr (program-transparent i.args.request)
13803− ?. ?=(%ctor -.callback) |
13804− ?. ?=(%term form.tag.callback) |
13805− ?| ?=(^ (derived-request-member case face imports graph prelude))
13806− ?=(^ (derived-store-request-member case face imports graph prelude))
13807− ==
13808−::
13809−:: Exact derived-member and request-evidence identity, shared by direct
13810−:: program watches and direct data-page loads. Only a plain request in the
13811−:: selected interface's own source-backed graph can establish this shape.
13812−++ derived-request-member
13813− |= [case=term face=term imports=ijimports graph=irequest-graph prelude=ifile]
13814− ^- (unit ischeme)
13815− =/ selected=(list [face=term interface=ifile])
13816− (skim imports |=(j=[face=term interface=ifile] =(face face.j)))
13817− ?. ?=([* ~] selected) ~
13818− =/ iface=ifile interface.i.selected
13819− =/ member=(unit ischeme) (ienv-lookup case values.iface)
13820− ?~ member ~
13821− ?~ source.iface ~
13822− =/ evidence=(list irequest-evidence)
13823− (skim requests.graph |=(r=irequest-evidence &(=(api-at.r at.iface) =(name.r case))))
13824− ?. ?=([* ~] evidence) ~
13825− =/ request-evidence=irequest-evidence i.evidence
13826− ?. =(u.source.iface api-source.request-evidence) ~
13827− ?. =(name.path.path.request-evidence case) ~
13828− ?~ graph.iface ~
13829− ?. (lien requests.u.graph.iface |=(r=irequest-evidence =(r request-evidence))) ~
13830− ?. ?=(~ scry.path.path.request-evidence) ~
13831− ?. &(?=(~ diffs.path.request-evidence) ?=(~ diffs.path.path.request-evidence)) ~
13832− ?: (lien segments.path.path.request-evidence |=(p=pseg !?=(%knot -.p))) ~
13833− ?. ?=([@ ~] vars.u.member) ~
13834− =/ message=@ud i.vars.u.member
13835− ?. ?=(%fn -.typ.u.member) ~
13836− ?. ?=(%fn -.sample.typ.u.member) ~
13837− ?. =(sample.sample.typ.u.member full.path.request-evidence) ~
13838− ?. =(product.sample.typ.u.member [%var message]) ~
13839− =/ prep=iprelude [prelude prelude-values.graph prelude-molds.graph]
13840− =/ ask=(unit ischeme) (request-compatible-ask prep)
13841− ?~ ask ~
13842− =/ result=(unit itype) (template-apply u.ask ~[[%var message]])
13843− ?~ result ~
13844− ?. =(product.typ.u.member u.result) ~
13845− member
13846−::
13847−:: Store state is watchable by definition, but only the actual derived member
13848−:: of the uniquely selected source-bound store interface proves that fact.
13849−++ derived-store-request-member
13850− |= [case=term face=term imports=ijimports graph=irequest-graph prelude=ifile]
13851− ^- (unit ischeme)
13852− ?. =(%state case) ~
13853− =/ selected=(list [face=term interface=ifile])
13854− (skim imports |=(j=[face=term interface=ifile] =(face face.j)))
13855− ?. ?=([* ~] selected) ~
13856− =/ iface=ifile interface.i.selected
13857− =/ member=(unit ischeme) (ienv-lookup %state values.iface)
13858− ?~ member ~
13859− ?~ source.iface ~
13860− =/ evidence=(list istore-request-evidence)
13861− (skim stores.graph |=(r=istore-request-evidence =(store-at.r at.iface)))
13862− ?. ?=([* ~] evidence) ~
13863− =/ request=istore-request-evidence i.evidence
13864− ?. =(u.source.iface source.request) ~
13865− ?~ graph.iface ~
13866− ?. (lien stores.u.graph.iface |=(r=istore-request-evidence =(r request))) ~
13867− =/ derived=(unit [state=ischeme action=ischeme])
13868− (store-derived-schemes prelude prelude-values.graph prelude-molds.graph state.request action.request)
13869− ?~ derived ~
13870− ?. =(u.member state.u.derived) ~
13871− =/ constructor=(unit ischeme) (ienv-lookup action-name.request values.iface)
13872− ?~ constructor ~
13873− ?. =(u.constructor action.u.derived) ~
13874− member
13875−::
13876−++ program-main-context
13877− |= [main=def ds=(list def) resolution=iresolved initial=istate]
13878− ^- iresolved
13879− ?^ (ienv-lookup %main env.resolution) resolution
13880− =/ heads=(unit igate-prelude-evidence)
13881− (direct-prelude-evidence ds prelude.initial)
13882− ?~ heads resolution
13883− =/ checked=(map term def) (direct-checked-gates ds env.resolution)
13884− =/ completed=[env=ienv artifacts=(list iwidth-definition)]
13885− (add-supported-defs-core ~[main] ds checked heads env.resolution molds.initial globals.initial externals.initial surs.initial mark-externals.initial marks.initial jimports.initial reserved-molds.initial at.initial prelude.initial artifacts.resolution grec-index.initial)
13886− [env.completed grouped.resolution artifacts.completed]
13887−::
13888−:: A static main may retain a generic element message in its ordinary
13889−:: scheme. Instantiate that scheme, specialize it to canonical element !!,
13890−:: and publish only the resulting closed scheme.
13891−++ static-main-specialized
13892− |= [env=ienv prelude=(unit ifile)]
13893− ^- (unit ischeme)
13894− ?~ prelude ~
13895− =/ element=(unit ischeme) (find-jibb-mold %element u.prelude)
13896− ?~ element ~
13897− =/ main=(unit ischeme) (ienv-lookup %main env)
13898− ?~ main ~
13899− =/ canonical=(unit itype) (template-apply u.element ~[[%empty ~]])
13900− ?~ canonical ~
13901− =/ instance=[typ=itype state=istate] (instantiate-scheme u.main *istate)
13902− =/ fit=ifit (itype-fit typ.instance u.canonical ~ next.state.instance)
13903− ?. ?=(%ok -.fit) ~
13904− =/ closed=itype (itype-normalize typ.instance sub.fit)
13905− ?^ (itype-vars closed) ~
13906− ?: (itype-has-tag closed) ~
13907− ?. ?=(%union -.closed) ~
13908− ?. ?=(%union -.u.canonical) ~
13909− ?. &(=(origin.closed origin.u.canonical) =(args.closed args.u.canonical)) ~
13910− =/ exact=ifit (direct-invariant closed u.canonical ~ next.fit)
13911− ?. ?=(%ok -.exact) ~
13912− `[u.canonical ~]
13913−::
13914−:: The load of a direct data page must itself be a direct gate whose
13915−:: transparent body is one plain derived request with a wing or ctor reply.
13916−++ page-load-derived
13917− |= [name=term ds=(list def) imports=ijimports graph=irequest-graph prelude=ifile]
13918− ^- ?
13919− =/ loads=(list def)
13920− (skim ds |=(d=def &(?=(%value -.d) =(name name.d))))
13921− ?. ?=([* ~] loads) |
13922− =/ load=def i.loads
13923− ?> ?=(%value -.load)
13924− ?. |(?=(%gate -.val.load) ?=(%gate-wide -.val.load)) |
13925− =/ body=expr
13926− ?- -.val.load
13927− %gate body.val.load
13928− %gate-wide body.val.load
13929− * !!
13930− ==
13931− =. body (program-transparent body)
13932− ?. ?=(%call -.body) |
13933− ?. ?=([* ~] args.body) |
13934− =/ head=expr (program-transparent head.body)
13935− ?. ?=(%wing -.head) |
13936− ?. ?=([@ @ ~] names.head) |
13937− =/ reply=expr (program-transparent i.args.body)
13938− ?. ?| &(?=(%wing -.reply) ?=([@ ~] names.reply))
13939− &(?=(%ctor -.reply) ?=(%term form.tag.reply))
13940− ==
13941− |
13942− ?=(^ (derived-request-member i.names.head i.t.names.head imports graph prelude))
13943−::
13944−++ page-main-closed
13945− |= [parts=[load=term view=term] ds=(list def) env=ienv prelude=(unit ifile) imports=ijimports graph=irequest-graph]
13946− ^- ?
13947− ?~ prelude |
13948− =/ page=(unit ischeme) (find-jibb-mold %page u.prelude)
13949− ?~ page |
13950− =/ main=(unit ischeme) (ienv-lookup %main env)
13951− ?~ main |
13952− ?. ?=(~ vars.u.main) |
13953− ?. ?=(~ (itype-vars typ.u.main)) |
13954− =/ instance=[typ=itype state=istate] (instantiate-scheme u.page *istate)
13955− =/ main-fit=ifit (direct-invariant typ.u.main typ.instance ~ next.state.instance)
13956− ?. ?=(%ok -.main-fit) |
13957− (page-load-derived load.parts ds imports graph u.prelude)
13958−::
13959−++ program-main-closed
13960− |= [parts=[init=term update=term view=term subs=term] ds=(list def) env=ienv prelude=(unit ifile) imports=ijimports graph=irequest-graph]
13961− ^- ?
13962− ?~ prelude |
13963− ?~ (ienv-lookup %program values.u.prelude) |
13964− =/ program=(unit ischeme) (find-jibb-mold %program u.prelude)
13965− ?~ program |
13966− =/ main=(unit ischeme) (ienv-lookup %main env)
13967− ?~ main |
13968− ?. ?=(~ vars.u.main) |
13969− ?. ?=(~ (itype-vars typ.u.main)) |
13970− =/ instance=[typ=itype state=istate] (instantiate-scheme u.program *istate)
13971− =/ main-fit=ifit (direct-invariant typ.u.main typ.instance ~ next.state.instance)
13972− ?. ?=(%ok -.main-fit) |
13973− =/ init=(unit ischeme) (ienv-lookup init.parts env)
13974− ?~ init |
13975− ?. ?=(~ vars.u.init) |
13976− ?. ?=(%fn -.typ.u.init) |
13977− ?. ?=(~ (itype-vars sample.typ.u.init)) |
13978− ?. ?=(~ (itype-vars product.typ.u.init)) |
13979− =/ data=igate-free (gate-free-type sample.typ.u.init 256 ~)
13980− ?. =(%yes verdict.data) |
13981− =/ model=igate-free (gate-free-type product.typ.u.init left.data ~)
13982− ?. =(%yes verdict.model) |
13983− =/ subs=(list def)
13984− (skim ds |=(d=def &(?=(%value -.d) =(subs.parts name.d))))
13985− ?. ?=([* ~] subs) |
13986− |((program-subs-empty i.subs) (program-subs-watch i.subs imports graph u.prelude))
13987−::
13988−:: The two outer sample faces are binder names, not part of the action/state
13989−:: relation. Leave every face inside either component untouched.
13990−++ store-update-unfaced
13991− |= typ=itype
13992− ^- itype
13993− ?. ?=(%fn -.typ) typ
13994− ?. ?=(%cell -.sample.typ) typ
13995− =/ head=itype hed.sample.typ
13996− =/ tail=itype tal.sample.typ
13997− =? head ?=(%face -.head) body.head
13998− =? tail ?=(%face -.tail) body.tail
13999− typ(sample [%cell head tail])
14000−::
14001−:: The builder erases the action from main. Recover it only from the direct
14002−:: local poke declaration and check both ordinary components invariantly.
14003−++ store-main-closed
14004− |= [parts=[init=term update=term] action=term env=ienv molds=imold-types prelude=(unit ifile)]
14005− ^- (unit ischeme)
14006− ?~ prelude ~
14007− =/ builder=(unit ischeme) (ienv-lookup %store values.u.prelude)
14008− ?~ builder ~
14009− ?. ?=([@ @ ~] vars.u.builder) ~
14010− =/ state-var=@ud i.vars.u.builder
14011− =/ action-var=@ud i.t.vars.u.builder
14012− ?: =(state-var action-var) ~
14013− =/ builder-sample=itype
14014− [%cell [%face %init [%var state-var]] [%face %update [%fn [%cell [%var action-var] [%var state-var]] [%var state-var]]]]
14015− =/ builder-product=itype [%cell [%face %init [%var state-var]] [%face %update [%noun ~]]]
14016− ?. =(typ.u.builder [%fn builder-sample builder-product]) ~
14017− =/ store=(unit ischeme) (find-jibb-mold %store u.prelude)
14018− ?~ store ~
14019− ?. ?=([@ ~] vars.u.store) ~
14020− ?. =(typ.u.store [%cell [%face %init [%var i.vars.u.store]] [%face %update [%noun ~]]]) ~
14021− =/ state=(unit ischeme) (find-jibb-mold %state [~ molds /tmp ~ ~ ~ ~ ~])
14022− ?~ state ~
14023− =/ action-mold=(unit ischeme) (find-jibb-mold action [~ molds /tmp ~ ~ ~ ~ ~])
14024− ?~ action-mold ~
14025− ?. &(?=(~ vars.u.state) ?=(~ (itype-vars typ.u.state))) ~
14026− ?. &(?=(~ vars.u.action-mold) ?=(~ (itype-vars typ.u.action-mold))) ~
14027− =/ canonical=(unit itype) (template-apply u.store ~[typ.u.state])
14028− ?~ canonical ~
14029− =/ main=(unit ischeme) (ienv-lookup %main env)
14030− =/ main-fit=(unit ifit)
14031− ?~(main ~ `(direct-invariant typ.u.main u.canonical ~ 0))
14032− =/ main-ok=?
14033− ?~ main &
14034− ?. ?=(~ vars.u.main) |
14035− ?. ?=(~ (itype-vars typ.u.main)) |
14036− ?~ main-fit |
14037− ?=(%ok -.u.main-fit)
14038− ?. main-ok ~
14039− =/ init=(unit ischeme) (ienv-lookup init.parts env)
14040− ?~ init ~
14041− ?. ?=(~ vars.u.init) ~
14042− ?. ?=(~ (itype-vars typ.u.init)) ~
14043− =/ init-fit=ifit (direct-invariant typ.u.init typ.u.state ~ 0)
14044− ?. ?=(%ok -.init-fit) ~
14045− =/ update=(unit ischeme) (ienv-lookup update.parts env)
14046− ?~ update ~
14047− ?. ?=(~ vars.u.update) ~
14048− ?. ?=(~ (itype-vars typ.u.update)) ~
14049− =/ expected=itype [%fn [%cell typ.u.action-mold typ.u.state] typ.u.state]
14050− =/ update-fit=ifit (direct-invariant (store-update-unfaced typ.u.update) expected ~ 0)
14051− ?. ?=(%ok -.update-fit) ~
14052− `[u.canonical ~]
10690+ `[~[[n sc]] (api-mark-exports marks marks mark-externals) at ~[[n i.t.t.at n]] ~ ~ ~]
1405310691::
1405410692++ infer-jibb-file
1405510693 |= [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)]
1405610694 ^- jfile-result
14057− =/ out=jfile-detailed-result
14058− (infer-jibb-file-detailed at src externals mark-externals modules active prelude-values prelude-molds cache prelude)
14059− ?: ?=(%| -.out) [%| message.p.out]
14060− [%& p.out]
14061−:: Returns structured root-source overlap evidence after the same full check.
14062−++ infer-jibb-file-detailed
14063− |= [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)]
14064− ^- jfile-detailed-result
1406510695 =/ parsed (parse at src)
14066− ?: ?=(%| -.parsed) [%| [(crip "module source does not parse: {(spud at)}") ~]]
10696+ ?: ?=(%| -.parsed) [%| (crip "module source does not parse: {(spud at)}")]
1406710697 =/ mod=module p.parsed
1406810698 =/ duplicate=(unit idiag) (duplicate-defs defs.mod)
14069− ?^ duplicate [%| [(show-duplicate-fields at src u.duplicate) ~]]
14070− ?: &(?=([%ui %api *] at) ?=(^ (program-main-def defs.mod)))
14071− [%| [(crip "module kind needs unsupported inference: {(spud at)}") ~]]
10699+ ?^ duplicate [%| (show-duplicate-fields at src u.duplicate)]
1407210700 ?: ?=([%ui %api *] at)
1407310701 =/ iface=(unit ifile) (api-poke-interface at mod mark-externals prelude-values prelude-molds prelude)
14074− ?^ iface
14075− =/ checked=ifile u.iface(source `src, graph `[(silt `(list path)`~[at]) ~ ~ modules prelude prelude-values prelude-molds externals mark-externals])
14076− [%& [checked [[at checked] cache]]]
14077− ?~ prelude [%| [(crip "API module needs unsupported inference: {(spud at)}") ~]]
14078− =/ prepared=iprelude [u.prelude prelude-values prelude-molds]
14079− =/ narrow=?
14080− ?. ?=([[%mark *] ~] imports.mod) |
14081− ?. ?=([[%mold *] ~] defs.mod) |
14082− ?. =(%paths name.i.defs.mod) |
14083− !?=(%union -.shape.i.defs.mod)
14084− ?: narrow
14085− =/ request=(each ione-request-interface @t)
14086− (one-request-interface-graph at src externals mark-externals modules active cache `prepared)
14087− ?: ?=(%| -.request) [%| [(crip "API module needs unsupported inference: {(spud at)}") ~]]
14088− =/ checked=ifile iface.p.request
14089− [%& [checked [[at checked] dependencies.paths.support.p.request]]]
14090− =/ multi=(each [iface=ifile cache=jcache] @t)
14091− (multi-request-interface-graph at src externals mark-externals modules active cache `prepared)
14092− ?: ?=(%| -.multi) [%| [(crip "API module needs unsupported inference: {(spud at)}") ~]]
14093− [%& [iface.p.multi [[at iface.p.multi] cache.p.multi]]]
14094− =/ main=(unit def) (program-main-def defs.mod)
14095− =/ main-parts=(unit [init=term update=term view=term subs=term])
14096− ?~(main ~ (program-main-parts u.main))
14097− =/ page-parts=(unit [load=term view=term])
14098− ?~(main ~ (page-main-parts u.main))
14099− =/ store-parts=(unit [init=term update=term])
14100− ?~(main ~ (store-main-parts u.main))
14101− =/ declared=(unit istore-declaration)
14102− ?~(store-parts ~ (store-declaration mod prelude-values prelude-molds))
14103− ?: &(?=(^ store-parts) ?=(~ declared))
14104− [%| [(crip "module kind or scope needs unsupported inference: {(spud at)}") ~]]
14105− ?: &(?=([%ui %stores *] at) ?=(^ main) ?=(~ store-parts))
14106− [%| [(crip "module kind needs unsupported inference: {(spud at)}") ~]]
14107− =/ ds=(list def) ?~(declared defs.mod defs.u.declared)
14108− =/ checking=module mod(defs ds)
14109− ?. (module-scope-valid checking prelude-values prelude-molds)
10702+ ?~ iface [%| (crip "API module needs unsupported inference: {(spud at)}")]
10703+ =/ checked=ifile u.iface(source `src)
10704+ [%& [checked [[at checked] cache]]]
10705+ ?. (module-scope-valid mod prelude-values prelude-molds)
1411010706 ?: (pending-declared-poke at mod prelude-values prelude-molds)
14111− [%| [(crip "module kind or scope needs unsupported inference: {(spud at)}") ~]]
14112− [%| [(crip "module has conflicting names: {(spud at)}") ~]]
14113− =/ vals=(list term) (global-value-names ds)
14114− =/ js=jimports-detailed-result (resolve-jibb-imports-detailed imports.mod externals mark-externals modules active prelude-values prelude-molds cache prelude)
10707+ [%| (crip "module kind or scope needs unsupported inference: {(spud at)}")]
10708+ [%| (crip "module has conflicting names: {(spud at)}")]
10709+ =/ vals=(list term) (global-value-names defs.mod)
10710+ ?: (lien vals |=(n=term =(n %main)))
10711+ [%| (crip "module kind needs unsupported inference: {(spud at)}")]
10712+ =/ js=jimports-result (resolve-jibb-imports imports.mod externals mark-externals modules active prelude-values prelude-molds cache prelude)
1411510713 ?: ?=(%| -.js) [%| p.js]
14116− =/ collected=grec-collected
14117− ?^ imports.mod [(collect-simple-molds ds) *(map term shape)]
14118− (grec-collect-molds ds)
14119− =/ molds=imolds molds.collected
10714+ =/ molds=imolds (collect-simple-molds defs.mod)
1412010715 =/ globals=(list term) (weld prelude-values (weld (import-binding-names imports.mod) vals))
1412110716 =/ surs=(list term) (collect-sur-imports imports.mod)
1412210717 =/ marks=(list term) (collect-mark-imports imports.mod)
1412310718 =/ reserved=(list term) (weld prelude-molds (turn resolved.p.js |=(j=[face=term interface=ifile] face.j)))
1412410719 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
14125− =/ state=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks resolved.p.js reserved ~ ~ ~ | at top prelude ~ 256 ~ ~ ~ ~ ~ ~]
14126− :: Source and scope were checked above; preserve that exact root and prelude.
14127− :: This first integration only indexes import-free library sources.
14128− =/ index=(unit [at=path source=@t prelude=ifile shapes=(map term shape)])
14129− ?^ imports.mod ~
14130− ?~ prelude ~
14131− =/ standard=(unit ischeme) (find-jibb-mold %list u.prelude)
14132− ?~ standard ~
14133− ?. =(u.standard [[%collection %list ~[[%var 0]]] ~[0]]) ~
14134− =/ index=(map term shape) proofs.collected
14135− ?. !=(index *(map term shape)) ~
14136− ?: (lien molds |=(m=[name=term body=shape] =(%list name.m))) ~
14137− `[at src u.prelude index]
14138− =. grec-index.state index
14139− =/ mts=(each imold-types imold-failure) (module-mold-types-detail molds state)
14140− ?: ?=(%| -.mts)
14141− ?~ overlap.p.mts [%| [(crip "{(trip message.p.mts)}: {(spud at)}") ~]]
14142− =/ witness=[name=term cases=upair] u.overlap.p.mts
14143− =/ first=@t (show-error src [at line.beg.first.cases.witness col.beg.first.cases.witness "first union case"])
14144− =/ second=@t (show-error src [at line.beg.second.cases.witness col.beg.second.cases.witness "overlapping case"])
14145− =/ msg=@t (of-wain:format ~[(crip "module mold {(trip name.witness)} has overlapping cases") first second])
14146− [%| [msg `[at src name.witness cases.witness]]]
14147− =/ resolution=iresolved
14148− ?~ index
14149− (resolve-groups ds molds globals externals surs mark-externals marks resolved.p.js reserved at prelude)
14150− (resolve-groups-core ds molds globals externals surs mark-externals marks resolved.p.js reserved at prelude index)
10720+ =/ state=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks resolved.p.js reserved ~ ~ ~ | at top prelude ~ 256 ~]
10721+ =/ mts=(each imold-types @t) (module-mold-types molds state)
10722+ ?: ?=(%| -.mts) [%| (crip "{(trip p.mts)}: {(spud at)}")]
10723+ =/ resolution=iresolved (resolve-groups defs.mod molds globals externals surs mark-externals marks resolved.p.js reserved at prelude)
1415110724 =/ env=ienv env.resolution
14152− =/ recovered=iresolved
14153− ?~ main resolution
14154− ?~ main-parts resolution
14155− =/ updated=(unit iresolved)
14156− (program-update-context u.main u.main-parts ds resolution state)
14157− =/ with-update=iresolved ?~(updated resolution u.updated)
14158− =/ subscribed=(unit iresolved)
14159− (program-subs-context u.main-parts ds with-update state)
14160− =/ with-subs=iresolved ?~(subscribed with-update u.subscribed)
14161− =/ viewed=(unit iresolved)
14162− (program-view-context u.main-parts ds with-subs state)
14163− =/ with-keyed-view=iresolved ?~(viewed with-subs u.viewed)
14164− =/ plain-view=(unit iresolved)
14165− ?^(viewed ~ (program-plain-view-context u.main-parts ds with-keyed-view state))
14166− =/ with-view=iresolved ?~(plain-view with-keyed-view u.plain-view)
14167− =/ initialized=(unit iresolved)
14168− (program-init-context u.main u.main-parts ds with-view state)
14169− =/ with-initialized=iresolved ?~(initialized with-view u.initialized)
14170− =/ plain-init=(unit iresolved)
14171− ?^(initialized ~ (program-plain-init-context u.main-parts ds with-initialized state))
14172− =/ components=iresolved ?~(plain-init with-initialized u.plain-init)
14173− (program-main-context u.main ds components state)
14174− =. env env.recovered
14175− =. artifacts.resolution artifacts.recovered
14176− =. env
14177− ?: (module-values-complete ds env) env
14178− ?: |(?=([%ui %stores *] at) ?=(^ imports.mod) ?=(^ prelude) ?=(^ prelude-values) ?=(^ prelude-molds)) env
14179− ?: (gth (met 3 src) 65.536) env
14180− ?: (gth (lent ds) 64) env
14181− ?. (dg-source-candidate ds 64) env
14182− =/ transaction=(unit dgcommit) (dg-root-source at src)
14183− ?~ transaction env
14184− ?: (dg-interface-safe env.u.transaction) env.u.transaction
14185− env
14186− =/ required=(list def)
14187− ?~ store-parts ds
14188− (skim ds |=(d=def !&(?=(%value -.d) =(%main name.d))))
14189− ?. (module-values-complete required env)
14190− [%| [(crip "module definitions need unsupported inference: {(spud at)}") ~]]
14191− =/ initial=irequest-graph [(silt `(list path)`~[at]) ~ ~ modules prelude prelude-values prelude-molds externals mark-externals]
14192− =/ graph=(unit irequest-graph) (request-graph-merge resolved.p.js initial (add 1 (lent resolved.p.js)))
14193− ?~ graph [%| ['module request evidence needs unsupported inference' ~]]
14194− =/ static-main=(unit ischeme)
14195− ?~ main ~
14196− ?^ main-parts ~
14197− ?^ page-parts ~
14198− ?^ store-parts ~
14199− (static-main-specialized env prelude)
14200− =? env ?=(^ static-main)
14201− [[%main u.static-main] (skim env |=(entry=[name=term scheme=ischeme] !=(%main name.entry)))]
14202− =/ store-main=(unit ischeme)
14203− ?~ store-parts ~
14204− ?~ declared ~
14205− (store-main-closed u.store-parts action.u.declared env p.mts prelude)
14206− =? env ?=(^ store-main)
14207− [[%main u.store-main] (skim env |=(entry=[name=term scheme=ischeme] !=(%main name.entry)))]
14208− =/ kind-ok=?
14209− ?~ main &
14210− ?^ main-parts (program-main-closed u.main-parts ds env prelude resolved.p.js u.graph)
14211− ?^ page-parts (page-main-closed u.page-parts ds env prelude resolved.p.js u.graph)
14212− ?^ store-parts ?=(^ store-main)
14213− ?=(^ static-main)
14214− ?. kind-ok
14215− [%| [(crip "module kind needs unsupported inference: {(spud at)}") ~]]
14216− =/ store-derived=(unit [values=ienv evidence=istore-request-evidence])
14217− ?~ declared ~
14218− ?~ prelude ~
14219− =/ state=(unit ischeme) (find-jibb-mold %state [~ p.mts at ~ ~ ~ ~ ~])
14220− ?~ state ~
14221− =/ action-mold=(unit ischeme) (find-jibb-mold action.u.declared [~ p.mts at ~ ~ ~ ~ ~])
14222− ?~ action-mold ~
14223− =/ schemes=(unit [state=ischeme action=ischeme])
14224− (store-derived-schemes u.prelude prelude-values prelude-molds typ.u.state typ.u.action-mold)
14225− ?~ schemes ~
14226− =/ evidence=istore-request-evidence
14227− [at src typ.u.state action.u.declared typ.u.action-mold]
14228− `[~[[%state state.u.schemes] [action.u.declared action.u.schemes]] evidence]
14229− ?: &(?=(^ declared) ?=(~ store-derived))
14230− [%| [(crip "store derived gates need unsupported inference: {(spud at)}") ~]]
14231− =? env ?=(^ store-derived) (weld values.u.store-derived env)
14232− =? graph ?=(^ store-derived)
14233− `u.graph(stores [evidence.u.store-derived stores.u.graph])
14234− ?. (request-graph-bounded u.graph)
14235− [%| ['module request evidence needs unsupported inference' ~]]
14236− =/ iface=ifile [env p.mts at ~ artifacts.resolution ~ `src graph]
10725+ ?. (module-values-complete defs.mod env)
10726+ [%| (crip "module definitions need unsupported inference: {(spud at)}")]
10727+ =/ iface=ifile [env p.mts at ~ artifacts.resolution ~ `src]
1423710728 [%& [iface [[at iface] cache.p.js]]]
1423810729::
14239−:: A source-bound analysis of one named mold, not a module, island,
14240−:: request, watchability or runtime check. The host owns the trusted
14241−:: prepared prelude, canonical paths and reader/source version identities.
14242−:: The 256-node cap covers only classification, not source/graph work.
14243−+$ igate-free-mold
14244− [at=path source=@t name=term prepared=iprelude externals=iexternals marks=imark-externals modules=jbundle dependencies=jcache mold=ischeme requested=@ud budget=@ud result=igate-free]
14245−++ gate-free-mold-source
14246− |= [file=path src=@t name=term externals=iexternals marks=imark-externals modules=jbundle prepared=(unit iprelude) fuel=@ud]
14247− ^- (each igate-free-mold @t)
14248− ?~ file [%| 'mold analysis needs a path ending in jibb']
14249− ?. =(%jibb (rear file)) [%| 'mold analysis needs a path ending in jibb']
14250− ?: |(=(file /lib/jibb/internal/jibb) =(file /lib/jibb/primitives/jibb))
14251− [%| 'the prelude internal modules are private']
14252− ?: ?=([%ui %api *] file) [%| 'API declarations need unsupported mold analysis']
14253− ?: ?=([%ui %stores *] file) [%| 'store declarations need unsupported mold analysis']
14254− =/ entries=jbundle (skim modules |=(m=jsource =(file at.m)))
14255− ?: (gth (lent entries) 1) [%| 'duplicate root module sources']
14256− =/ wrong-root=? ?~(entries | !=(source.i.entries src))
14257− ?: wrong-root [%| 'root module source does not match bundle']
14258− =/ parsed (parse file src)
14259− ?: ?=(%| -.parsed) [%| 'mold source does not parse']
14260− =/ mod=module p.parsed
14261− =/ duplicate=(unit idiag) (duplicate-defs defs.mod)
14262− ?^ duplicate [%| (show-duplicate-fields file src u.duplicate)]
14263− ?~ prepared [%| 'mold analysis needs the prepared prelude']
14264− ?. (module-scope-valid mod values.u.prepared molds.u.prepared)
14265− [%| 'mold source has conflicting or unsupported scope']
14266− =/ selected=(list def)
14267− (skim defs.mod |=(d=def &(?=(%mold -.d) =(name.d name))))
14268− ?~ selected [%| 'selected mold is not declared']
14269− ?^ t.selected [%| 'selected mold is not unique']
14270− ?> ?=(%mold -.i.selected)
14271− =/ public=ifile iface.u.prepared
14272− =/ js=jimports-result
14273− (resolve-jibb-imports imports.mod externals marks modules ~[file] values.u.prepared molds.u.prepared ~ `public)
14274− ?: ?=(%| -.js) [%| p.js]
14275− =/ ms=imolds (collect-simple-molds defs.mod)
14276− =/ vals=(list term) (global-value-names defs.mod)
14277− =/ globals=(list term) (weld values.u.prepared (weld (import-binding-names imports.mod) vals))
14278− =/ surs=(list term) (collect-sur-imports imports.mod)
14279− =/ declared=(list term) (collect-mark-imports imports.mod)
14280− =/ reserved=(list term) (weld molds.u.prepared (turn resolved.p.js |=(j=[face=term interface=ifile] face.j)))
14281− =/ top=(list term) (turn ms |=(m=[name=term body=shape] name.m))
14282− =/ state=istate [0 ~ ~ ~ ms globals externals surs marks declared resolved.p.js reserved ~ ~ ~ | file top `public ~ 256 ~ ~ ~ ~ ~ ~]
14283− =/ inferred=(unit [template=ischeme state=istate])
14284− (infer-mold-template shape.i.selected state(active ~[name], in-mold &))
14285− ?~ inferred [%| 'selected mold needs unsupported inference']
14286− =/ template=ischeme template.u.inferred
14287− =. typ.template (label-direct-union typ.template shape.i.selected name state)
14288− =. typ.template (itype-normalize typ.template sub.state.u.inferred)
14289− =/ cap=@ud (min fuel 256)
14290− =/ analysis=igate-free (gate-free-type typ.template cap ~)
14291− [%& [file src name u.prepared externals marks modules cache.p.js template fuel cap analysis]]
14292−::
1429310730:: +golden-types-with-modules fails closed for imports without prelude
1429410731:: scope. +golden-types-with-prelude resolves supported library graphs;
1429510732:: its report remains partial and unreachable sources are not examined.
@@ -14350,7 +10787,7 @@
1435010787 ?: ?=(%| -.js) (of-wain:format ~['partial inference; module not checked' p.js])
1435110788 =/ scope-values=(list term)
1435210789 (weld prelude-values (weld (collect-sur-imports imports.p.parsed) (collect-mark-imports imports.p.parsed)))
14353− (golden-types-in-context-core file src externals mark-externals resolved.p.js scope-values prelude-molds iface prepared)
10790+ (golden-types-in-context file src externals mark-externals resolved.p.js scope-values prelude-molds iface)
1435410791::
1435510792:: +golden-types-with-marks: supply declared mark types separately from /sur
1435610793:: entries, as [mark result] with the result from +read-mark:jibb-import.
@@ -14381,10 +10818,6 @@
1438110818++ golden-types-in-context
1438210819 |= [file=path src=@t externals=iexternals mark-externals=imark-externals jimports=ijimports prelude-values=(list term) reserved-molds=(list term) prelude=(unit ifile)]
1438310820 ^- @t
14384− (golden-types-in-context-core file src externals mark-externals jimports prelude-values reserved-molds prelude ~)
14385−++ golden-types-in-context-core
14386− |= [file=path src=@t externals=iexternals mark-externals=imark-externals jimports=ijimports prelude-values=(list term) reserved-molds=(list term) prelude=(unit ifile) prepared=(unit iprelude)]
14387− ^- @t
1438810821 =. reserved-molds (weld reserved-molds (turn jimports |=(j=[face=term interface=ifile] face.j)))
1438910822 =/ parsed (parse file src)
1439010823 ?: ?=(%| -.parsed) (show-error src p.parsed)
@@ -14400,41 +10833,6 @@
1440010833 =/ resolution=iresolved (resolve-groups ds molds globals externals surs mark-externals marks jimports reserved-molds file prelude)
1440110834 =/ cycles=(list icycle) (definite-value-cycles ds globals)
1440210835 =/ env=ienv env.resolution
14403− =/ recovered=(list term) ~
14404− =/ eligible=?
14405− ?& ?=(~ imports.p.parsed)
14406− ?=(~ jimports)
14407− !?=([%ui %api *] file)
14408− !?=([%ui %stores *] file)
14409− !(lien (global-value-names ds) |=(n=term =(n %main)))
14410− !(module-values-complete ds env)
14411− (lte (met 3 src) 65.536)
14412− (lte (lent ds) 64)
14413− ?| &(?=(~ prepared) ?=(~ prelude) ?=(~ prelude-values) ?=(~ reserved-molds) (module-scope-valid p.parsed ~ ~) (dg-source-candidate ds 64))
14414− ?& ?=(^ prepared)
14415− ?=(^ prelude)
14416− =(u.prelude iface.u.prepared)
14417− =(prelude-values values.u.prepared)
14418− =(reserved-molds molds.u.prepared)
14419− (module-scope-valid p.parsed values.u.prepared molds.u.prepared)
14420− (dg-prepared-candidate ds 64)
14421− ==
14422− ==
14423− ==
14424− =/ transaction=(unit dgcommit)
14425− ?. eligible ~
14426− ?~ prepared (dg-root-source file src)
14427− (dg-root-prepared file src u.prepared)
14428− =. recovered
14429− ?~ transaction ~
14430− ?. &((module-values-complete ds env.u.transaction) (dg-interface-safe env.u.transaction)) ~
14431− (turn (skim env.u.transaction |=(entry=[name=term scheme=ischeme] ?=(~ (ienv-lookup name.entry env)))) |=(entry=[name=term scheme=ischeme] name.entry))
14432− =. env
14433− ?~ transaction env
14434− ?: &((module-values-complete ds env.u.transaction) (dg-interface-safe env.u.transaction)) env.u.transaction
14435− env
14436− =/ source-defs=(map term def) (direct-checked-gates ds env)
14437− =/ heads=(unit igate-prelude-evidence) (direct-prelude-evidence ds prelude)
1443810836 =/ lines=(list @t) ~
1443910837 |-
1444010838 ?~ ds (of-wain:format ['partial inference; module not checked' (flop lines)])
@@ -14447,16 +10845,6 @@
1444710845 ?^ cycle
1444810846 =/ diag=idiag ["non-gate value depends on itself through a cycle" ~[[first.i.cycle "value in cycle"] [next.i.cycle "dependency in cycle"]]]
1444910847 $(ds t.ds, lines [(show-inference-diagnostic file src name.d diag) lines])
14450− ?: (lien recovered |=(n=term =(n name.d)))
14451− =/ found=(unit ischeme) (ienv-lookup name.d env)
14452− ?~ found $(ds t.ds, lines [(crip "++ {(trip name.d)}: committed definition unavailable") lines])
14453− ?: (itype-has-hidden-recursive typ.u.found)
14454− $(ds t.ds, lines [(crip "++ {(trip name.d)}: recursive mold name is not available in this scope") lines])
14455− ?: (itype-has-hidden-generic typ.u.found)
14456− $(ds t.ds, lines [(crip "++ {(trip name.d)}: generic union name is not available in this scope") lines])
14457− =/ typ=itype (canonical-itype typ.u.found vars.u.found)
14458− =/ line=@t (crip "++ {(trip name.d)}: {(show-itype typ ~)}{(show-atom-constraint typ)}")
14459− $(ds t.ds, lines [line lines])
1446010848 ?: (lien grouped.resolution |=(n=term =(n name.d)))
1446110849 =/ found=(unit ischeme) (ienv-lookup name.d env)
1446210850 ?~ found $(ds t.ds, lines [(crip "++ {(trip name.d)}: recursive group unavailable") lines])
@@ -14464,9 +10852,7 @@
1446410852 =/ line=@t (crip "++ {(trip name.d)}: {(show-itype typ ~)}{(show-atom-constraint typ)}")
1446510853 $(ds t.ds, lines [line lines])
1446610854 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
14467− =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | file top prelude ~ 256 ~ ~ ~ ~ ~ ~]
14468− =. gate-defs.initial source-defs
14469− =. head-evidence.initial heads
10855+ =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | file top prelude ~ 256 ~]
1447010856 =. initial (reserve-def-caps val.d initial)
1447110857 =/ result=iresult
1447210858 ?: |(?=(%gate -.val.d) ?=(%gate-wide -.val.d))
@@ -14506,667 +10892,4 @@
1450610892 =/ printable=itype (canonical-itype typ vars)
1450710893 =/ line=@t (crip "++ {(trip name.d)}: {(show-itype printable ~)}{(show-atom-constraint printable)}")
1450810894 $(ds t.ds, lines [line lines])
14509−:: Experimental module-owned pending-constraint generalization only.
14510−:: Inputs, IDs and substitution come from one checker-owned transaction.
14511−+$ dgscan [ids=(list @ud) fuel=@ud]
14512−++ dg-scan
14513− |= [todo=(list itype) sub=isub fuel=@ud ids=(list @ud)]
14514− ^- (unit dgscan)
14515− ?~ todo `[ids fuel]
14516− ?: =(0 fuel) ~
14517− =. fuel (dec fuel)
14518− =/ t=itype i.todo
14519− ?: ?=(?(%var %avar %rvar %nvar %rnvar %tag) -.t)
14520− =/ node-id=@ud ?:(?=(%tag -.t) id.t +.t)
14521− =/ found=(unit itype) (itype-lookup node-id sub)
14522− ?~ found $(todo t.todo, ids [node-id ids])
14523− ?: &(?=(?(%rvar %rnvar) -.u.found) =(node-id +.u.found))
14524− $(todo t.todo, ids [node-id ids])
14525− $(todo [u.found t.todo])
14526− ?: ?=(%jrec -.t) $(todo t.todo)
14527− ?+ -.t ~
14528− %collection $(todo (weld args.t t.todo))
14529− %union $(todo (weld args.t (weld cases.t t.todo)))
14530− %face $(todo [body.t t.todo])
14531− %fn $(todo [sample.t product.t t.todo])
14532− %cell $(todo [hed.t tal.t t.todo])
14533− %atom $(todo t.todo)
14534− %any-atom $(todo t.todo)
14535− %flag $(todo t.todo)
14536− %noun $(todo t.todo)
14537− %empty $(todo t.todo)
14538− %const $(todo t.todo)
14539− ==
14540−::
14541−++ dg-scan-ids
14542− |= [ids=(list @ud) sub=isub fuel=@ud blocked=(list @ud)]
14543− ^- (unit dgscan)
14544− ?~ ids `[blocked fuel]
14545− =/ one=(unit dgscan) (dg-scan ~[[%var i.ids]] sub fuel blocked)
14546− ?~ one ~
14547− $(ids t.ids, fuel fuel.u.one, blocked ids.u.one)
14548−::
14549−++ dg-env
14550− |= [env=ienv sub=isub fuel=@ud blocked=(list @ud)]
14551− ^- (unit dgscan)
14552− ?~ env `[blocked fuel]
14553− =/ sc=ischeme scheme.i.env
14554− :: Quantifiers are local to the scheme: first find raw free IDs, then
14555− :: follow those IDs in the module substitution without capturing them.
14556− =/ raw=(unit dgscan) (dg-scan ~[typ.sc] ~ fuel ~)
14557− ?~ raw ~
14558− =/ free=(list @ud) (skim ids.u.raw |=(n=@ud !(lien vars.sc |=(q=@ud =(q n)))))
14559− =/ resolved=(unit dgscan) (dg-scan-ids free sub fuel.u.raw blocked)
14560− ?~ resolved ~
14561− $(env t.env, fuel fuel.u.resolved, blocked ids.u.resolved)
14562−::
14563−++ dg-obligations
14564− |= [pending=(list dgo) sub=isub fuel=@ud blocked=(list @ud)]
14565− ^- (unit dgscan)
14566− ?~ pending `[blocked fuel]
14567− =/ found=(unit dgscan) (dg-scan ~[left.i.pending right.i.pending] sub fuel blocked)
14568− ?~ found ~
14569− $(pending t.pending, fuel fuel.u.found, blocked ids.u.found)
14570−::
14571−++ dg-tags
14572− |= [tags=(list ipending) sub=isub fuel=@ud blocked=(list @ud)]
14573− ^- (unit dgscan)
14574− ?~ tags `[blocked fuel]
14575− ?: =(0 fuel) ~
14576− =/ found=(unit itype) (itype-lookup id.i.tags sub)
14577− ?~ found $(tags t.tags, fuel (dec fuel), blocked [id.i.tags blocked])
14578− :: Until this entry is explicitly discharged, retain variables reachable
14579− :: through its binding; mere existence of a substitution is not proof.
14580− =/ reached=(unit dgscan) (dg-scan ~[u.found] sub (dec fuel) blocked)
14581− ?~ reached ~
14582− $(tags t.tags, fuel fuel.u.reached, blocked ids.u.reached)
14583−::
14584−++ dg-generalize
14585− |= [typ=itype env=ienv pending=(list dgo) tags=(list ipending) captured=(list @ud) state=istate fuel=@ud]
14586− ^- (unit ischeme)
14587− :: Bound the obligation list and all graph/substitution walks. The
14588− :: substitution is assumed checker-owned and occurs-checked.
14589− ?: (gth (lent pending) 64) ~
14590− =/ capt=(unit dgscan) (dg-scan-ids captured sub.state fuel ~)
14591− ?~ capt ~
14592− =/ env-free=(unit dgscan) (dg-env env sub.state fuel.u.capt ids.u.capt)
14593− ?~ env-free ~
14594− =/ obligations=(unit dgscan) (dg-obligations pending sub.state fuel.u.env-free ids.u.env-free)
14595− ?~ obligations ~
14596− =/ tagged=(unit dgscan) (dg-tags tags sub.state fuel.u.obligations ids.u.obligations)
14597− ?~ tagged ~
14598− =/ bounded=(unit dgscan) (dg-scan ~[typ] sub.state fuel.u.tagged ~)
14599− ?~ bounded ~
14600− =/ normalized=itype (itype-normalize typ sub.state)
14601− =/ vars=(list @ud) (unique-type-vars (itype-vars normalized))
14602− =/ quantified=(list @ud) (skim vars |=(n=@ud !(lien ids.u.tagged |=(b=@ud =(b n)))))
14603− `[[normalized quantified]]
14604−::
14605−+$ dgcommit [env=ienv state=istate]
14606−:: A branch literal must not acquire a value face through replay.
14607−++ dg-literal-target-safe
14608− |= target=itype
14609− ^- ?
14610− ?: ?=(%union -.target)
14611− (levy cases.target |=(c=itype ?=(?(%const %cell) -.c)))
14612− ?=(?(%const %atom %any-atom %flag %noun) -.target)
14613−::
14614−++ dg-replay-edges
14615− |= [edges=(list dgo) state=istate fuel=@ud]
14616− ^- (unit istate)
14617− ?~ edges `state
14618− ?: =(0 fuel) ~
14619− =/ trial=ifit (itype-fit left.i.edges right.i.edges sub.state next.state)
14620− ?. ?=(%ok -.trial) ~
14621− =/ valid=?
14622− ?: ?=(%tag -.left.i.edges)
14623− ?. constructor.left.i.edges
14624− =/ closed=(unit dgscan) (dg-scan ~[right.i.edges] sub.trial 512 ~)
14625− ?~ closed |
14626− ?^ ids.u.closed |
14627− (dg-literal-target-safe (itype-normalize right.i.edges sub.trial))
14628− =((itype-walk left.i.edges sub.trial) (itype-walk right.i.edges sub.trial))
14629− =((itype-walk left.i.edges sub.trial) (itype-walk right.i.edges sub.trial))
14630− ?. valid ~
14631− $(edges t.edges, state state(sub sub.trial, next next.trial), fuel (dec fuel))
14632−::
14633−++ dg-close-env
14634− |= [env=ienv sub=isub fuel=@ud]
14635− ^- (unit ienv)
14636− ?~ env `~
14637− ?: =(0 fuel) ~
14638− =/ s=ischeme scheme.i.env
14639− :: Quantified IDs are scheme-local and cannot be rewritten on publication.
14640− ?. (levy vars.s |=(n=@ud ?=(~ (itype-lookup n sub)))) ~
14641− =/ bounded=(unit dgscan) (dg-scan ~[typ.s] sub (dec fuel) ~)
14642− ?~ bounded ~
14643− =/ normalized=itype (itype-normalize typ.s sub)
14644− ?: (itype-has-tag normalized) ~
14645− =/ vars=(list @ud) (unique-type-vars (itype-vars normalized))
14646− ?. (levy vars |=(n=@ud (lien vars.s |=(v=@ud =(v n))))) ~
14647− =/ rest=(unit ienv) (dg-close-env t.env sub fuel.u.bounded)
14648− ?~ rest ~
14649− `[[name.i.env [normalized vars.s]] u.rest]
14650−::
14651−:: A deferred boolean branch has exactly the two literal flag patterns.
14652−:: Arms are inferred in order. Equal types are retained; two direct pending
14653−:: literals may instead retain source-owned obligations for later context.
14654−++ dg-boolean-patterns
14655− |= e=expr
14656− ^- ?
14657− ?. ?=(%branch -.e) |
14658− ?~ arms.e |
14659− ?~ t.arms.e |
14660− ?^ t.t.arms.e |
14661− =/ x=arm i.arms.e
14662− =/ y=arm i.t.arms.e
14663− ?. &(?=(%lit -.pat.x) ?=(%lit -.pat.y)) |
14664− ?. &(=(%loobean form.lit.pat.x) =(%loobean form.lit.pat.y)) |
14665− !=(val.lit.pat.x val.lit.pat.y)
14666−:: Only a direct source literal which created its own unbound pending tag
14667−:: may create a branch edge. The caller must retain the exact source and state.
14668−++ dg-owned-arm-literal
14669− |= [e=expr t=itype tags=(list ipending) sub=isub initial=@ud]
14670− ^- ?
14671− ?. ?=(%lit -.e) |
14672− ?. ?=(%tag -.t) |
14673− ?: constructor.t |
14674− ?. =(lit.e literal.t) |
14675− ?: (lth id.t initial) |
14676− ?^ (itype-lookup id.t sub) |
14677− (lien tags |=(x=ipending &(=(id.x id.t) =(literal.x literal.t))))
14678−++ dg-boolean-branch
14679− |= [e=expr env=ienv state=istate]
14680− ^- iresult
14681− ?. (dg-boolean-patterns e) [%| ["deferred branch patterns need unsupported inference" ~]]
14682− ?> ?=(%branch -.e)
14683− ?> ?=(^ arms.e)
14684− ?> ?=(^ t.arms.e)
14685− =/ x=arm i.arms.e
14686− =/ y=arm i.t.arms.e
14687− =/ subject=iresult (infer-fragment subject.e env state)
14688− ?: ?=(%| -.subject) subject
14689− =/ su=(unit isub) (itype-unify typ.p.subject [%flag ~] sub.state.p.subject)
14690− ?~ su [%| ["deferred branch subject does not unify with ?" ~]]
14691− =/ left=iresult (infer-fragment val.x env state.p.subject(sub u.su))
14692− ?: ?=(%| -.left) left
14693− =/ right=iresult (infer-fragment val.y env state.p.left)
14694− ?: ?=(%| -.right) right
14695− ?. (dg-stable-fit typ.p.left typ.p.right sub.state.p.right)
14696− =/ st=istate state.p.right
14697− ?. (dg-owned-arm-literal val.x typ.p.left tags.st sub.st next.state)
14698− [%| ["deferred branch arm context needs unsupported inference" ~]]
14699− ?. (dg-owned-arm-literal val.y typ.p.right tags.st sub.st next.state)
14700− [%| ["deferred branch arm context needs unsupported inference" ~]]
14701− ?> ?=(%tag -.typ.p.left)
14702− ?> ?=(%tag -.typ.p.right)
14703− ?: =(id.typ.p.left id.typ.p.right)
14704− [%| ["deferred branch arm context needs unsupported inference" ~]]
14705− ?: (gth (lent obligations.st) 62)
14706− [%| ["deferred branch arm context needs unsupported inference" ~]]
14707− =/ result=itype [%var next.st]
14708− =/ ex=dgo [typ.p.left result (span-of val.x) (span-of e)]
14709− =/ ey=dgo [typ.p.right result (span-of val.y) (span-of e)]
14710− [%& result st(next +(next.st), obligations [ex ey obligations.st])]
14711− [%& typ.p.left state.p.right]
14712−::
14713−:: A direct tuple literal may wait for a later exact result context.
14714−:: Each pending literal retains its source tag and its own fit obligation.
14715−++ dg-infer-tuple-items
14716− |= [items=(list item) env=ienv state=istate]
14717− ^- iresult
14718− ?~ items [%| ["empty cell is not supported by partial inference" ~]]
14719− =/ head=iresult (infer-fragment val.i.items env state)
14720− ?: ?=(%| -.head) head
14721− =/ typ=itype typ.p.head
14722− =/ st=istate state.p.head
14723− =/ adjusted=(unit [typ=itype state=istate])
14724− ?. (dg-owned-arm-literal val.i.items typ tags.st sub.st next.state) `[typ st]
14725− ?: (gth (lent obligations.st) 63) ~
14726− =/ pending=itype [%var next.st]
14727− =/ edge=dgo [typ pending (span-of val.i.items) at.i.items]
14728− `[pending st(next +(next.st), obligations [edge obligations.st])]
14729− ?~ adjusted [%| ["deferred tuple context needs unsupported inference" ~]]
14730− =. typ typ.u.adjusted
14731− =. st state.u.adjusted
14732− =. typ ?~(face.i.items typ [%face u.face.i.items typ])
14733− ?~ t.items [%& typ st]
14734− =/ tail=iresult $(items t.items, state st)
14735− ?: ?=(%| -.tail) tail
14736− [%& [%cell typ typ.p.tail] state.p.tail]
14737−::
14738−:: Deferred inference uses only source forms whose successful fit sites are
14739−:: guarded below; a shared source-node budget bounds this screen.
14740−++ dg-safe-expressions
14741− |= [todo=(list expr) fuel=@ud]
14742− ^- (unit @ud)
14743− ?~ todo `fuel
14744− =/ first=(unit @ud) (dg-safe-expression i.todo fuel)
14745− ?~ first ~
14746− $(todo t.todo, fuel u.first)
14747−++ dg-safe-items
14748− |= [items=(list item) fuel=@ud]
14749− ^- (unit @ud)
14750− ?~ items `fuel
14751− =/ first=(unit @ud) (dg-safe-expression val.i.items fuel)
14752− ?~ first ~
14753− $(items t.items, fuel u.first)
14754−++ dg-safe-expression
14755− |= [e=expr fuel=@ud]
14756− ^- (unit @ud)
14757− ?: =(0 fuel) ~
14758− =. fuel (dec fuel)
14759− ?+ -.e ~
14760− ?(%lit %ctor) `fuel
14761− %wing ?:(?=([@ ~] names.e) `fuel ~)
14762− %str
14763− ?. (levy pieces.e |=(p=piece ?=(%text -.p))) ~
14764− `fuel
14765− %group $(e inner.e, fuel fuel)
14766− %body
14767− ?^ defs.e ~
14768− $(e final.e, fuel fuel)
14769− %gate $(e body.e, fuel fuel)
14770− %gate-wide $(e body.e, fuel fuel)
14771− %tuple (dg-safe-items items.e fuel)
14772− %branch
14773− ?. (dg-boolean-patterns e) ~
14774− ?> ?=(^ arms.e)
14775− ?> ?=(^ t.arms.e)
14776− =/ subject=(unit @ud) $(e subject.e, fuel fuel)
14777− ?~ subject ~
14778− (dg-safe-expressions ~[val.i.arms.e val.i.t.arms.e] u.subject)
14779− %cast $(e val.e, fuel fuel)
14780− %call
14781− =/ head=(unit @ud) $(e head.e, fuel fuel)
14782− ?~ head ~
14783− (dg-safe-expressions args.e u.head)
14784− ==
14785−:: Exact normalized equality is preserved by all later substitutions.
14786−:: The bounded scan declines opaque types and oversized inputs.
14787−++ dg-stable-fit
14788− |= [actual=itype expected=itype sub=isub]
14789− ^- ?
14790− ?~ (dg-scan ~[actual expected] sub 512 ~) |
14791− =((itype-normalize actual sub) (itype-normalize expected sub))
14792−::
14793−:: A positional call peels sample-slot faces during its separate face check.
14794−:: Require its argument, sample and result closed so that check stays valid.
14795−++ dg-stable-call-fit
14796− |= [actual=itype expected=itype product=itype sub=isub positional=?]
14797− ^- ?
14798− =/ checked=(unit dgscan) (dg-scan ~[actual expected product] sub 512 ~)
14799− ?~ checked |
14800− ?: &(positional ?=(^ ids.u.checked)) |
14801− =((itype-normalize actual sub) (itype-normalize expected sub))
14802−::
14803−:: One definition attempt retains state only when inference succeeds.
14804−+$ dg-step [env=ienv state=istate pending=(list dgo)]
14805−++ dg-stage-one
14806− |= [d=def env=ienv state=istate]
14807− ^- (unit dg-step)
14808− ?> ?=(%value -.d)
14809− ?~ (dg-safe-expression val.d 512) ~
14810− =/ local=istate (reserve-def-caps val.d state)
14811− :: This first slice declines all written capitals and holes/projections.
14812− ?^ caps.local ~
14813− =/ ordinary=iresult (infer-fragment val.d env local)
14814− ?: ?=(%| -.ordinary) ~
14815− =/ typ=itype typ.p.ordinary
14816− =/ after=istate state.p.ordinary
14817− =/ edges=(list dgo) obligations.after
14818− ?. =(binders.after binders.state) ~
14819− ?. =(molds.after molds.state) ~
14820− ?. =(globals.after globals.state) ~
14821− ?. =(externals.after externals.state) ~
14822− ?. =(surs.after surs.state) ~
14823− ?. =(mark-externals.after mark-externals.state) ~
14824− ?. =(marks.after marks.state) ~
14825− ?. =(jimports.after jimports.state) ~
14826− ?. =(reserved-molds.after reserved-molds.state) ~
14827− ?. =(params.after params.state) ~
14828− ?. =(active.after active.state) ~
14829− ?. =(in-mold.after in-mold.state) ~
14830− ?. =(at.after at.state) ~
14831− ?. =(top-molds.after top-molds.state) ~
14832− ?. =(prelude.after prelude.state) ~
14833− ?. =(gate-defs.after gate-defs.state) ~
14834− ?. =(head-evidence.after head-evidence.state) ~
14835− ?. =(grec-index.after grec-index.state) ~
14836− ?. =(defer.after defer.state) ~
14837− ?. =(holes.after holes.state) ~
14838− ?. =(caps.after caps.state) ~
14839− ?. =(projections.after projections.state) ~
14840− ?: (unsupported-atom-vars (itype-normalize typ sub.after) caps.after binders.after sub.after) ~
14841− ?: (itype-has-nvar (itype-normalize typ sub.after)) ~
14842− =/ scheme=(unit ischeme) (dg-generalize typ env edges tags.after ~ after 32.768)
14843− ?~ scheme ~
14844− `[[[name.d u.scheme] env] after edges]
14845−:: Retry only definitions that did not infer. Successful definitions are
14846−:: committed into the local transaction, never published until all close.
14847−++ dg-stage
14848− |= [ds=(list def) base=ienv env=ienv state=istate pending=(list dgo) fuel=@ud]
14849− ^- (unit dgcommit)
14850− ?: (gth fuel 64) ~
14851− ?: (gth (lent ds) fuel) ~
14852− =/ remaining=(list def) ds
14853− =/ waiting=(list def) ~
14854− =/ progress=? |
14855− =/ attempts=@ud (mul fuel fuel)
14856− |-
14857− ?~ remaining
14858− ?^ waiting
14859− ?. progress ~
14860− $(remaining (flop waiting), waiting ~, progress |)
14861− =/ replayed=(unit istate) (dg-replay-edges pending state 64)
14862− ?~ replayed ~
14863− ?: (pending-tags tags.u.replayed sub.u.replayed) ~
14864− =/ closed-edges=(unit dgscan) (dg-obligations pending sub.u.replayed 32.768 ~)
14865− ?~ closed-edges ~
14866− ?^ ids.u.closed-edges ~
14867− =/ rechecked=(unit istate) (dg-replay-edges pending u.replayed 64)
14868− ?~ rechecked ~
14869− ?. =(sub.u.rechecked sub.u.replayed) ~
14870− ?. =(next.u.rechecked next.u.replayed) ~
14871− =/ closed=(unit ienv) (dg-close-env env sub.u.replayed 32.768)
14872− ?~ closed ~
14873− `[[u.closed u.replayed(defer ~, obligations ~)]]
14874− ?: =(0 attempts) ~
14875− =. attempts (dec attempts)
14876− =/ d=def i.remaining
14877− ?: ?=(%mold -.d) $(remaining t.remaining)
14878− ?^ (ienv-lookup name.d base) $(remaining t.remaining)
14879− ?^ (ienv-lookup name.d env) ~
14880− =/ done=(unit dg-step) (dg-stage-one d env state)
14881− ?~ done $(remaining t.remaining, waiting [d waiting])
14882− $(remaining t.remaining, env env.u.done, state state.u.done, pending pending.u.done, progress &)
14883−::
14884−:: Cheap bounded eligibility check on the already parsed source. This
14885−:: deliberately covers only direct constructor calls beneath transparent
14886−:: groups, gates, casts and definition-free bodies. Other shapes decline
14887−:: this fallback without a second parse or resolution pass.
14888−++ dg-direct-source
14889− |= [e=expr fuel=@ud]
14890− ^- ?
14891− ?: =(0 fuel) |
14892− ?+ -.e |
14893− %group $(e inner.e, fuel (dec fuel))
14894− %gate $(e body.e, fuel (dec fuel))
14895− %gate-wide $(e body.e, fuel (dec fuel))
14896− %cast $(e val.e, fuel (dec fuel))
14897− %body ?~(defs.e $(e final.e, fuel (dec fuel)) |)
14898− %call
14899− ?. ?=([* ~] args.e) |
14900− ?=(%ctor -.i.args.e)
14901− ==
14902−++ dg-source-candidate
14903− |= [ds=(list def) fuel=@ud]
14904− ^- ?
14905− ?~ ds |
14906− ?: =(0 fuel) |
14907− ?. ?=(%value -.i.ds) $(ds t.ds, fuel (dec fuel))
14908− ?: (dg-direct-source val.i.ds 64) &
14909− $(ds t.ds, fuel (dec fuel))
14910−::
14911−++ dg-prepared-source
14912− |= [e=expr fuel=@ud]
14913− ^- ?
14914− ?: (dg-direct-source e fuel) &
14915− ?: =(0 fuel) |
14916− ?+ -.e |
14917− %group $(e inner.e, fuel (dec fuel))
14918− %gate $(e body.e, fuel (dec fuel))
14919− %gate-wide $(e body.e, fuel (dec fuel))
14920− %cast $(e val.e, fuel (dec fuel))
14921− %body ?~(defs.e $(e final.e, fuel (dec fuel)) |)
14922− %tuple &
14923− ==
14924−++ dg-prepared-candidate
14925− |= [ds=(list def) fuel=@ud]
14926− ^- ?
14927− ?~ ds |
14928− ?: =(0 fuel) |
14929− ?. ?=(%value -.i.ds) $(ds t.ds, fuel (dec fuel))
14930− ?: (dg-prepared-source val.i.ds 64) &
14931− $(ds t.ds, fuel (dec fuel))
14932−::
14933−++ dg-interface-safe
14934− |= [env=ienv]
14935− ^- ?
14936− ?~ env &
14937− =/ sc=ischeme scheme.i.env
14938− ?: |((itype-has-hidden-recursive typ.sc) (itype-has-hidden-generic typ.sc)) |
14939− ?: (gth (lent vars.sc) 26) |
14940− $(env t.env)
14941−:: Parse status and the transaction result come from the same source parse.
14942−+$ dgparse [parsed=? result=(unit dgcommit)]
14943−++ dg-root-source
14944− |= [at=path src=@t]
14945− ^- (unit dgcommit)
14946− result:(dg-root-detail at src)
14947−++ dg-root-detail
14948− |= [at=path src=@t]
14949− ^- dgparse
14950− =/ parsed (parse at src)
14951− ?: ?=(%| -.parsed) [| ~]
14952− =/ transact
14953− |.
14954− ?^ imports.p.parsed ~
14955− ?. (module-scope-valid p.parsed ~ ~) ~
14956− ?^ (duplicate-defs defs.p.parsed) ~
14957− =/ defs=(list def) defs.p.parsed
14958− ?: (gth (lent defs) 64) ~
14959− =/ molds=imolds (collect-simple-molds defs)
14960− =/ globals=(list term) (global-value-names defs)
14961− =/ resolution=iresolved (resolve-groups defs molds globals ~ ~ ~ ~ ~ ~ at ~)
14962− ?^ grouped.resolution ~
14963− ?^ artifacts.resolution ~
14964− =/ base=ienv env.resolution
14965− =/ free=(unit dgscan) (dg-env base ~ 32.768 ~)
14966− ?~ free ~
14967− ?^ ids.u.free ~
14968− =/ all=(unit dgscan) (dg-all-env-ids base 32.768 ~)
14969− ?~ all ~
14970− =/ fresh=@ud (dg-next-id ids.u.all 0)
14971− =/ st=istate *istate
14972− =. st st(next fresh, defer `~, molds molds, globals globals, at at, top-molds (turn molds |=(m=[name=term body=shape] name.m)), in-mold |, jrec-fuel 256)
14973− =/ checked-molds=(each imold-types @t) (module-mold-types molds st)
14974− ?: ?=(%| -.checked-molds) ~
14975− (dg-stage defs base base st ~ 64)
14976− ::
14977− [& (transact)]
14978−:: The caller supplies the trusted prepared prelude. This transaction is
14979−:: only report evidence; the ordinary module resolver does not publish it.
14980−++ dg-root-prepared
14981− |= [at=path src=@t prepared=iprelude]
14982− ^- (unit dgcommit)
14983− ?: ?=([%ui %api *] at) ~
14984− ?: ?=([%ui %stores *] at) ~
14985− ?: (gth (met 3 src) 65.536) ~
14986− =/ parsed (parse at src)
14987− ?: ?=(%| -.parsed) ~
14988− ?^ imports.p.parsed ~
14989− ?. (module-scope-valid p.parsed values.prepared molds.prepared) ~
14990− ?^ (duplicate-defs defs.p.parsed) ~
14991− =/ defs=(list def) defs.p.parsed
14992− ?: (gth (lent defs) 64) ~
14993− ?: (lien (global-value-names defs) |=(n=term =(n %main))) ~
14994− ?. (dg-prepared-candidate defs 64) ~
14995− =/ local-molds=imolds (collect-simple-molds defs)
14996− =/ globals=(list term) (weld values.prepared (global-value-names defs))
14997− =/ iface=ifile iface.prepared
14998− =/ prelude=(unit ifile) `iface
14999− =/ resolution=iresolved
15000− (resolve-groups defs local-molds globals ~ ~ ~ ~ ~ molds.prepared at prelude)
15001− ?^ grouped.resolution ~
15002− ?^ artifacts.resolution ~
15003− =/ base=ienv env.resolution
15004− =/ templates=ienv
15005− (turn molds.iface |=(x=[name=term template=ischeme] [name.x template.x]))
15006− =/ all-env=ienv (weld base (weld values.iface templates))
15007− =/ free=(unit dgscan) (dg-env all-env ~ 32.768 ~)
15008− ?~ free ~
15009− ?^ ids.u.free ~
15010− =/ all=(unit dgscan) (dg-all-env-ids all-env 32.768 ~)
15011− ?~ all ~
15012− =/ fresh=@ud (dg-next-id ids.u.all 0)
15013− =/ st=istate *istate
15014− =. st st(next fresh, defer `~, molds local-molds, globals globals, at at, reserved-molds molds.prepared, prelude prelude, top-molds (turn local-molds |=(m=[name=term body=shape] name.m)), in-mold |, jrec-fuel 256)
15015− =/ checked-molds=(each imold-types @t) (module-mold-types local-molds st)
15016− ?: ?=(%| -.checked-molds) ~
15017− (dg-stage defs base base st ~ 64)
15018−::
15019−++ dg-all-env-ids
15020− |= [env=ienv fuel=@ud ids=(list @ud)]
15021− ^- (unit dgscan)
15022− ?~ env `[ids fuel]
15023− ?: =(0 fuel) ~
15024− =/ sc=ischeme scheme.i.env
15025− ?: (itype-has-tag typ.sc) ~
15026− =/ raw=(unit dgscan) (dg-scan ~[typ.sc] ~ (dec fuel) ids)
15027− ?~ raw ~
15028− =/ quant=(unit dgscan) (dg-scan-ids vars.sc ~ fuel.u.raw ids.u.raw)
15029− ?~ quant ~
15030− $(env t.env, fuel fuel.u.quant, ids ids.u.quant)
15031−::
15032−++ dg-next-id
15033− |= [ids=(list @ud) largest=@ud]
15034− ^- @ud
15035− ?~ ids +(largest)
15036− $(ids t.ids, largest (max largest i.ids))
15037−::
15038−++ dg-eligible-ctor
15039− |= [e=expr head=itype actual=itype expected=itype state=istate]
15040− ^- (unit dgo)
15041− ?. ?=(%call -.e) ~
15042− ?. ?=([* ~] args.e) ~
15043− ?. ?=(%ctor -.i.args.e) ~
15044− ?. ?=(%fn -.head) ~
15045− ?. ?=(%fn -.expected) ~
15046− ?. ?=(%tag -.actual) ~
15047− ?. constructor.actual ~
15048− ?. ?=(%var -.product.expected) ~
15049− ?^ (itype-lookup id.product.expected sub.state) ~
15050− =/ bounded=(unit dgscan) (dg-scan ~[sample.expected] sub.state 256 ~)
15051− ?~ bounded ~
15052− ?^ ids.u.bounded ~
15053− `[[actual expected (span-of i.args.e) (span-of head.e)]]
15054−::
15055−:: Experimental per-module, source-derived recursive tree index.
15056−:: The two tags and the exact children/list/self layout are fixed-shape
15057−:: checks, so ordinary definitions incur no type-tree or source scans.
15058−++ grec-tagged-fields
15059− |= sh=shape
15060− ^- (unit [tag=@ fields=(list field)])
15061− ?. ?=(%cell -.sh) ~
15062− ?~ fields.sh ~
15063− =/ head=field i.fields.sh
15064− ?. ?=(%bare -.head) ~
15065− ?. ?=(%const -.shape.head) ~
15066− ?. &(?=(%term form.lit.shape.head) =(%tas aura.lit.shape.head)) ~
15067− `[val.lit.shape.head t.fields.sh]
15068−++ grec-tree-children
15069− |= [fs=(list field) param=@t]
15070− ^- (unit field)
15071− ?~ fs ~
15072− ?~ t.fs `i.fs
15073− ?^ t.t.fs ~
15074− =/ event=field i.fs
15075− =/ kids=field i.t.fs
15076− ?. &(?=(%face -.event) ?=(%face -.kids)) ~
15077− ?. !=(name.event name.kids) ~
15078− ?. ?=(%fn -.shape.event) ~
15079− ?. ?=(%aura -.sample.shape.event) ~
15080− ?. =(%t aura.sample.shape.event) ~
15081− ?. ?=(%tvar -.product.shape.event) ~
15082− ?. =(param name.product.shape.event) ~
15083− `kids
15084−::
15085−++ grec-tree-proof
15086− |= [name=term sh=shape]
15087− ^- ?
15088− ?. ?=(%generic -.sh) |
15089− ?. ?=([@ ~] vars.sh) |
15090− =/ param=@t i.vars.sh
15091− ?. ?=(%union -.body.sh) |
15092− ?. ?=([* [* ~]] cases.body.sh) |
15093− =/ a=(unit [tag=@ fields=(list field)]) (grec-tagged-fields i.cases.body.sh)
15094− =/ b=(unit [tag=@ fields=(list field)]) (grec-tagged-fields i.t.cases.body.sh)
15095− ?~ a |
15096− ?~ b |
15097− ?. !=(tag.u.a tag.u.b) |
15098− ?. ?=([* ~] fields.u.a) |
15099− =/ value=field i.fields.u.a
15100− ?. ?=(%face -.value) |
15101− ?. ?=(%aura -.shape.value) |
15102− ?. =(%t aura.shape.value) |
15103− =/ selected=(unit field) (grec-tree-children fields.u.b param)
15104− ?~ selected |
15105− =/ kids=field u.selected
15106− ?. ?=(%face -.kids) |
15107− ?. ?=(%apply -.shape.kids) |
15108− ?. =(ref.shape.kids ~[%list]) |
15109− ?. ?=([* ~] args.shape.kids) |
15110− =/ self=shape i.args.shape.kids
15111− ?. ?=(%apply -.self) |
15112− ?. =(ref.self ~[name]) |
15113− ?. ?=([* ~] args.self) |
15114− ?. ?=(%tvar -.i.args.self) |
15115− =(name.i.args.self param)
15116−+$ grec-collected [molds=imolds proofs=(map term shape)]
15117−:: Experimental one-layer analysis view, never an exported mold identity.
15118−++ grec-unfold-view
15119− |= [typ=itype fuel=@ud]
15120− ^- (unit [view=itype left=@ud])
15121− ?. ?=(%grec -.typ) ~
15122− ?: =(fuel 0) ~
15123− ?. ?=([* ~] args.typ) ~
15124− =/ sh=shape proof.typ
15125− ?. (grec-tree-proof name.typ sh) ~
15126− ?> ?=(%generic -.sh)
15127− ?> ?=([@ ~] vars.sh)
15128− ?> ?=(%union -.body.sh)
15129− ?> ?=([* [* ~]] cases.body.sh)
15130− =/ ca=shape i.cases.body.sh
15131− =/ cb=shape i.t.cases.body.sh
15132− ?> ?=(%cell -.ca)
15133− ?> ?=(%cell -.cb)
15134− ?> ?=([* [* ~]] fields.ca)
15135− ?> ?=([* *] fields.cb)
15136− =/ tag-a=field i.fields.ca
15137− =/ tag-b=field i.fields.cb
15138− ?> ?=(%bare -.tag-a)
15139− ?> ?=(%bare -.tag-b)
15140− ?> ?=(%const -.shape.tag-a)
15141− ?> ?=(%const -.shape.tag-b)
15142− =/ text-field=field i.t.fields.ca
15143− ?> ?=(%face -.text-field)
15144− =/ branch=(list field) t.fields.cb
15145− =/ kids=(unit field) (grec-tree-children branch i.vars.sh)
15146− ?~ kids ~
15147− ?> ?=(%face -.u.kids)
15148− =/ children=itype [%face name.u.kids [%collection %list ~[typ]]]
15149− ?> ?=(^ branch)
15150− =/ payload=itype
15151− ?~ t.branch children
15152− =/ event=field i.branch
15153− ?> ?=(%face -.event)
15154− [%cell [%face name.event [%fn [%atom %t] i.args.typ]] children]
15155− =/ leaf=itype [%cell [%const lit.shape.tag-a] [%face name.text-field [%atom %t]]]
15156− =/ node=itype [%cell [%const lit.shape.tag-b] payload]
15157− `[[%union ~[leaf node] ~ ~ ~] (dec fuel)]
15158−::
15159−++ grec-collect-molds
15160− |= ds=(list def)
15161− ^- grec-collected
15162− ?~ ds [~ *(map term shape)]
15163− =/ rest=grec-collected $(ds t.ds)
15164− ?. ?=(%mold -.i.ds) rest
15165− =/ name=term name.i.ds
15166− =/ body=shape shape.i.ds
15167− =/ proofs=(map term shape) proofs.rest
15168− =? proofs (grec-tree-proof name body) (~(put by proofs) name body)
15169− [[[name body] molds.rest] proofs]
15170−::
15171−
1517210895--
jibb-dev/lib/jibb/internal.jibb−2
@@ -18,8 +18,6 @@
1818:: Private compiler primitive wrappers; execution is a later milestone.
1919++ add-atom |= args=[A A] (raw-add.core args)
2020++ dec-atom |= atom=A (raw-dec.core atom)
21−++ trip-text |= value=@t (raw-trip.core value)
22−++ tuba-text |= values (raw-tuba.core values)
2321
2422:: Transparent request data. Identity and path fields are writable and do not
2523:: prove a schema or watchability. A future executor must bind them to checked
jibb-dev/lib/jibb/prelude.jibb−182
@@ -337,185 +337,3 @@
337337
338338+$ ask |$ [M] (ask.internal M)
339339++ pure |= x=M ^- (ask M) [%pure x]
340−
341−:: This mold describes the value; island watchability needs separate proof.
342−+$ sub |$ [M]
343− [%watch a=(ask M)]
344− [%every gap=@dr reply=$-(@da M)]
345− [%url reply=$-(path M)]
346−
347−:: Count a finite list with the source-backed addition gate.
348−++ lent |= xs=(list A)
349− ^- @ud
350− ?- xs
351− ~ 0
352− [item rest] (add 1 (lent rest))
353−
354−++ lth |= args=[A A]
355− ?- args
356− [x y] (gth y x)
357−
358−++ gte |= args=[A A]
359− ?- args
360− [x y] (not (gth y x))
361−
362−++ lte |= args=[A A]
363− ?- args
364− [x y] (not (gth x y))
365−
366−++ zing |= xss=(list (list A))
367− ^- (list A)
368− ?- xss
369− ~ ~
370− [xs rest] (weld xs (zing rest))
371−
372−++ lead |= first=A |= second=B [first second]
373−++ late |= second=B |= first=A [first second]
374−
375−++ succ |= x=A (add x 1)
376−
377−++ trip |= value=@t (trip-text.internal value)
378−++ tuba |= values=(list @tD) (tuba-text.internal values)
379−
380−:: UI values are source-level descriptions only. Nested element payloads are
381−:: erased in the nonrecursive union; the public constructors below retain the
382−:: typed composition boundaries. Raw-constructor encapsulation, rendering and
383−:: execution are not established by this slice.
384−+$ length
385− [%chars n=@ud]
386− [%fill n=@ud]
387− %shrink
388−
389−+$ align
390− %start
391− %center
392− %end
393−
394−+$ role
395− %body
396− %caption
397− %label
398−
399−+$ tone
400− %normal
401− %muted
402− %accent
403− %danger
404−
405−+$ attr
406− [%pad %s0]
407− [%pad %s1]
408− [%pad %s2]
409− [%pad %s3]
410− [%gap %s0]
411− [%gap %s1]
412− [%gap %s2]
413− [%gap %s3]
414− [%width width=length]
415− [%align align=align]
416− [%role role=role]
417− [%tone tone=tone]
418−
419−+$ element |$ [M]
420− [%row attrs=(list attr) kids=*]
421− [%column attrs=(list attr) kids=*]
422− [%wrap attrs=(list attr) kids=*]
423− [%stack attrs=(list attr) kids=*]
424− [%el attrs=(list attr) kid=*]
425− [%para kids=*]
426− [%text words=@t]
427− [%heading level=@ud words=@t]
428− [%each items=*]
429− [%table columns=* rows=*]
430− [%image source=qath description=@t]
431− [%image-unsafe source=[url=@t width=@ud height=@ud] description=@t]
432− [%link target=qath label=@t]
433− [%link-unsafe target=@t label=@t]
434− [%button label=@t message=M]
435− [%toggle on=? label=@t message=M]
436− [%field label=@t value=@t reply=$-(@t M)]
437− [%form message=M kids=*]
438− [%island payload=*]
439−
440−++ row |= [attrs=(list attr) kids=(list (element M))]
441− ^- (element M) [%row attrs kids]
442−
443−++ column |= [attrs=(list attr) kids=(list (element M))]
444− ^- (element M) [%column attrs kids]
445−
446−++ wrap |= [attrs=(list attr) kids=(list (element M))]
447− ^- (element M) [%wrap attrs kids]
448−
449−++ stack |= [attrs=(list attr) kids=(list (element M))]
450− ^- (element M) [%stack attrs kids]
451−
452−++ el |= [attrs=(list attr) kid=(element M)]
453− ^- (element M) [%el attrs kid]
454−
455−++ para |= kids=(list (element M))
456− ^- (element M) [%para kids]
457−
458−++ text |= words=@t
459− ^- (element M) [%text words]
460−
461−++ heading |= [level=@ud words=@t]
462− ^- (element M) [%heading level words]
463−
464−++ each |= items=(list [key=K el=(element M)])
465− ^- (element M) [%each items]
466−
467−++ table |= [columns=(list [header=@t width=length align=align]) rows=(list [key=K cells=(list (element M))])]
468− ^- (element M) [%table columns rows]
469−
470−++ image |= [source=qath description=@t]
471− ^- (element M) [%image source description]
472−
473−++ image-unsafe |= [source=[url=@t width=@ud height=@ud] description=@t]
474− ^- (element M) [%image-unsafe source description]
475−
476−++ link |= [target=qath label=@t]
477− ^- (element M) [%link target label]
478−
479−++ link-unsafe |= [target=@t label=@t]
480− ^- (element M) [%link-unsafe target label]
481−
482−++ button |= [label=@t message=M]
483− ^- (element M) [%button label message]
484−
485−++ toggle |= [on=? label=@t message=M]
486− ^- (element M) [%toggle on label message]
487−
488−++ field |= [label=@t value=@t reply=$-(@t M)]
489− ^- (element M) [%field label value reply]
490−
491−++ form |= [message=M kids=(list (element M))]
492− ^- (element M) [%form message kids]
493−
494−+$ theme
495− [ space=[s1=@t s2=@t s3=@t]
496− tones=[normal=@t background=@t accent=@t danger=@t muted=@t]
497− wide=@t
498− lang=@t
499− zone=@t
500− font=(unit qath)
501− dark=(unit [tones=[normal=@t background=@t accent=@t danger=@t muted=@t]])
502−
503−+$ program |$ [D X M]
504− [init=$-(D X) update=$-([M X] [X (list (cmd M))]) view=$-(X (element M)) subs=$-(X (list (sub M)))]
505−
506−++ program |= [init=$-(D X) update=$-([M X] [X (list (cmd M))]) view=$-(X (element M)) subs=$-(X (list (sub M)))]
507− ^- (program D X M) [init update view subs]
508−
509−++ island |= [p=(program D X M) data=D]
510− ^- (element !!) [%island [p data]]
511−
512−+$ page |$ [R D]
513− [load=$-(R (ask D)) view=$-(D (element !!))]
514−
515−++ page |= [load=$-(R (ask D)) view=$-(D (element !!))]
516− ^- (page R D) [load view]
517−
518−+$ store |$ [S] [init=S update=*]
519−
520−++ store |= [init=S update=$-([A S] S)]
521− ^- (store S) [init update]
my-app/ui/theme.jibb+1−1
@@ -5,4 +5,4 @@
55 lang="en"
66 zone="UTC"
77 font=`%/static/fonts/inter.woff2
8− dark=`[tones=[normal="#eee" background="#111" accent="#4c9" danger="#f28b82" muted="#aaa"]]
8+ dark=[tones=[normal="#eee" background="#111" accent="#4c9" danger="#f28b82" muted="#aaa"]]
tests/golden/doc-overview-02-theme/source.jibb+1−1
@@ -5,4 +5,4 @@
55 lang="en"
66 zone="UTC"
77 font=`%/static/fonts/inter.woff2
8− dark=`[tones=[normal="#eee" background="#111" accent="#4c9" danger="#f28b82" muted="#aaa"]]
8+ dark=[tones=[normal="#eee" background="#111" accent="#4c9" danger="#f28b82" muted="#aaa"]]
tests/golden/doc-overview-02-theme/tokens.txt+23−24
@@ -62,28 +62,27 @@
62628:5 NEWLINE
63638:5 name dark
64648:9 tight glyph =
65−8:10 tight glyph `
66−8:11 tight glyph [
67−8:12 tight name tones
68−8:17 tight glyph =
69−8:18 tight glyph [
70−8:19 tight name normal
71−8:25 tight glyph =
72−8:26 tight str "#eee"
73−8:33 name background
74−8:43 tight glyph =
75−8:44 tight str "#111"
76−8:51 name accent
77−8:57 tight glyph =
78−8:58 tight str "#4c9"
79−8:65 name danger
80−8:71 tight glyph =
81−8:72 tight str "#f28b82"
82−8:82 name muted
83−8:87 tight glyph =
84−8:88 tight str "#aaa"
65+8:10 tight glyph [
66+8:11 tight name tones
67+8:16 tight glyph =
68+8:17 tight glyph [
69+8:18 tight name normal
70+8:24 tight glyph =
71+8:25 tight str "#eee"
72+8:32 name background
73+8:42 tight glyph =
74+8:43 tight str "#111"
75+8:50 name accent
76+8:56 tight glyph =
77+8:57 tight str "#4c9"
78+8:64 name danger
79+8:70 tight glyph =
80+8:71 tight str "#f28b82"
81+8:81 name muted
82+8:86 tight glyph =
83+8:87 tight str "#aaa"
84+8:93 tight glyph ]
85858:94 tight glyph ]
86−8:95 tight glyph ]
87−8:96 DEDENT
88−8:96 DEDENT
89−8:96 NEWLINE
86+8:95 DEDENT
87+8:95 DEDENT
88+8:95 NEWLINE
tests/golden/doc-overview-02-theme/tree.txt+8−9
@@ -22,12 +22,11 @@
2222 (face 7:5 font
2323 (unit 7:10 (qath 7:11 static fonts inter.woff2)))
2424 (face 8:5 dark
25− (unit 8:10
26− (tuple 8:11
27− (face 8:12 tones
28− (tuple 8:18
29− (face 8:19 normal (str 8:26 "#eee"))
30− (face 8:33 background (str 8:44 "#111"))
31− (face 8:51 accent (str 8:58 "#4c9"))
32− (face 8:65 danger (str 8:72 "#f28b82"))
33− (face 8:82 muted (str 8:88 "#aaa"))))))))))))
25+ (tuple 8:10
26+ (face 8:11 tones
27+ (tuple 8:17
28+ (face 8:18 normal (str 8:25 "#eee"))
29+ (face 8:32 background (str 8:43 "#111"))
30+ (face 8:50 accent (str 8:57 "#4c9"))
31+ (face 8:64 danger (str 8:71 "#f28b82"))
32+ (face 8:81 muted (str 8:87 "#aaa")))))))))))
tests/golden/module-import-cycle/source.jibb+1−1
@@ -1,2 +1,2 @@
11/= a /ui/a
2−++ text-value (identity.a "hi")
2+++ text (identity.a "hi")
tests/golden/module-import-cycle/tokens.txt+6−6
@@ -6,9 +6,9 @@
661:11 tight knot a
772:1 NEWLINE
882:1 glyph ++
9−2:4 name text-value
10−2:15 glyph (
11−2:16 tight wing identity.a
12−2:27 str "hi"
13−2:31 tight glyph )
14−2:32 NEWLINE
9+2:4 name text
10+2:9 glyph (
11+2:10 tight wing identity.a
12+2:21 str "hi"
13+2:25 tight glyph )
14+2:26 NEWLINE
tests/golden/module-import-cycle/tree.txt+3−3
@@ -1,5 +1,5 @@
11(module
22 (jibb 1:1 a /ui/a)
3− (value 2:1 text-value
4− (group 2:15
5− (call 2:16 (wing 2:16 identity.a) (str 2:27 "hi")))))
3+ (value 2:1 text
4+ (group 2:9
5+ (call 2:10 (wing 2:10 identity.a) (str 2:21 "hi")))))
tests/golden/module-import-identity/source.jibb+1−1
@@ -1,3 +1,3 @@
11/= lib /ui/lib
2−++ text-value (identity.lib "hi")
2+++ text (identity.lib "hi")
33++ ship (identity.lib ~zod)
tests/golden/module-import-identity/tokens.txt+5−5
@@ -6,11 +6,11 @@
661:13 tight knot lib
772:1 NEWLINE
882:1 glyph ++
9−2:4 name text-value
10−2:15 glyph (
11−2:16 tight wing identity.lib
12−2:29 str "hi"
13−2:33 tight glyph )
9+2:4 name text
10+2:9 glyph (
11+2:10 tight wing identity.lib
12+2:23 str "hi"
13+2:27 tight glyph )
14143:1 NEWLINE
15153:1 glyph ++
16163:4 name ship
tests/golden/module-import-identity/tree.txt+3−3
@@ -1,8 +1,8 @@
11(module
22 (jibb 1:1 lib /ui/lib)
3− (value 2:1 text-value
4− (group 2:15
5− (call 2:16 (wing 2:16 identity.lib) (str 2:29 "hi"))))
3+ (value 2:1 text
4+ (group 2:9
5+ (call 2:10 (wing 2:10 identity.lib) (str 2:23 "hi"))))
66 (value 3:1 ship
77 (group 3:9
88 (call 3:10 (wing 3:10 identity.lib) (lit 3:23 ~zod)))))
tests/golden/module-import-identity/types.txt+1−1
@@ -1,3 +1,3 @@
11partial inference; module not checked
2−++ text-value: @t
2+++ text: @t
33++ ship: @p
tests/golden/module-import-transitive/source.jibb+1−1
@@ -1,2 +1,2 @@
11/= a /ui/a
2−++ text-value (identity.a "hi")
2+++ text (identity.a "hi")
tests/golden/module-import-transitive/tokens.txt+6−6
@@ -6,9 +6,9 @@
661:11 tight knot a
772:1 NEWLINE
882:1 glyph ++
9−2:4 name text-value
10−2:15 glyph (
11−2:16 tight wing identity.a
12−2:27 str "hi"
13−2:31 tight glyph )
14−2:32 NEWLINE
9+2:4 name text
10+2:9 glyph (
11+2:10 tight wing identity.a
12+2:21 str "hi"
13+2:25 tight glyph )
14+2:26 NEWLINE
tests/golden/module-import-transitive/tree.txt+3−3
@@ -1,5 +1,5 @@
11(module
22 (jibb 1:1 a /ui/a)
3− (value 2:1 text-value
4− (group 2:15
5− (call 2:16 (wing 2:16 identity.a) (str 2:27 "hi")))))
3+ (value 2:1 text
4+ (group 2:9
5+ (call 2:10 (wing 2:10 identity.a) (str 2:21 "hi")))))
tests/golden/module-import-transitive/types.txt+1−1
@@ -1,2 +1,2 @@
11partial inference; module not checked
2−++ text-value: @t
2+++ text: @t
tests/golden/module-import-unused-invalid/source.jibb+1−1
@@ -1,2 +1,2 @@
11/= good /ui/good
2−++ text-value (identity.good "hi")
2+++ text (identity.good "hi")
tests/golden/module-import-unused-invalid/tokens.txt+6−6
@@ -6,9 +6,9 @@
661:14 tight knot good
772:1 NEWLINE
882:1 glyph ++
9−2:4 name text-value
10−2:15 glyph (
11−2:16 tight wing identity.good
12−2:30 str "hi"
13−2:34 tight glyph )
14−2:35 NEWLINE
9+2:4 name text
10+2:9 glyph (
11+2:10 tight wing identity.good
12+2:24 str "hi"
13+2:28 tight glyph )
14+2:29 NEWLINE
tests/golden/module-import-unused-invalid/tree.txt+3−3
@@ -1,5 +1,5 @@
11(module
22 (jibb 1:1 good /ui/good)
3− (value 2:1 text-value
4− (group 2:15
5− (call 2:16 (wing 2:16 identity.good) (str 2:30 "hi")))))
3+ (value 2:1 text
4+ (group 2:9
5+ (call 2:10 (wing 2:10 identity.good) (str 2:24 "hi")))))
tests/golden/module-import-unused-invalid/types.txt+1−1
@@ -1,2 +1,2 @@
11partial inference; module not checked
2−++ text-value: @t
2+++ text: @t
tests/golden/types-arithmetic-module/source.jibb+1−1
@@ -1,7 +1,7 @@
11/= math /ui/math
22++ decimal ^- @ud (sum.math 1 2)
33++ hex ^- @ux (sum.math 0x1 0x2)
4−++ text-value ^- @t (alias.math "a" "b")
4+++ text ^- @t (alias.math "a" "b")
55++ ship ^- @p (down.math ~zod)
66++ reject-bool (sum.math %.y %.n)
77++ reject-down (down.math %.y)
tests/golden/types-arithmetic-module/tokens.txt+8−8
@@ -26,14 +26,14 @@
26263:32 tight glyph )
27274:1 NEWLINE
28284:1 glyph ++
29−4:4 name text-value
30−4:15 glyph ^-
31−4:18 aura @t
32−4:21 glyph (
33−4:22 tight wing alias.math
34−4:33 str "a"
35−4:37 str "b"
36−4:40 tight glyph )
29+4:4 name text
30+4:9 glyph ^-
31+4:12 aura @t
32+4:15 glyph (
33+4:16 tight wing alias.math
34+4:27 str "a"
35+4:31 str "b"
36+4:34 tight glyph )
37375:1 NEWLINE
38385:1 glyph ++
39395:4 name ship
tests/golden/types-arithmetic-module/tree.txt+5−5
@@ -10,11 +10,11 @@
1010 (aura 3:11 @ux)
1111 (group 3:15
1212 (call 3:16 (wing 3:16 sum.math) (lit 3:25 0x1) (lit 3:29 0x2)))))
13− (value 4:1 text-value
14− (cast 4:15
15− (aura 4:18 @t)
16− (group 4:21
17− (call 4:22 (wing 4:22 alias.math) (str 4:33 "a") (str 4:37 "b")))))
13+ (value 4:1 text
14+ (cast 4:9
15+ (aura 4:12 @t)
16+ (group 4:15
17+ (call 4:16 (wing 4:16 alias.math) (str 4:27 "a") (str 4:31 "b")))))
1818 (value 5:1 ship
1919 (cast 5:9
2020 (aura 5:12 @p)
tests/golden/types-arithmetic-module/types.txt+1−1
@@ -1,7 +1,7 @@
11partial inference; module not checked
22++ decimal: @ud
33++ hex: @ux
4−++ text-value: @t
4+++ text: @t
55++ ship: @p
66++ reject-bool: call's sample and argument types do not unify
77/tests/golden/types-arithmetic-module/source.jibb:6:17: called gate has type $-([a=A b=A] A) where A is an atom other than ?
tests/golden/types-cell-branch-context/about.txtdeleted−4
@@ -1,4 +0,0 @@
1−source: Grammar, Branching and Molds — branch arms share the expected result type; unresolved tags need context; written record faces remain part of values.
2−tests: Closed cell result context flows into bounded loobean branches. The checker preserves previously inferred cases and faces, leaves wrong or inconsistent fields, unresolved tags, and open generic context unsupported.
3−expect: parses
4−expect-types: a partial inference report
tests/golden/types-cell-branch-context/modules.txtdeleted−1
@@ -1 +0,0 @@
1−# Use the actual source-backed prelude.
tests/golden/types-cell-branch-context/source.jibbdeleted−37
@@ -1,37 +0,0 @@
1−++ choose |= flag=?
2− ^- [@t (unit @t)] ?- flag
3− %.y ["yes" ~]
4− %.n ["no" ~]
5−++ bad |= flag=?
6− ^- [@t (unit @t)] ?- flag
7− %.y ["yes" ~]
8− %.n [~zod ~]
9−++ pending |= flag=?
10− ^- [@t (unit @t)] ?- flag
11− %.y ["yes" ~]
12− %.n [%waiting ~]
13−++ already |= flag=?
14− ^- [@t @t] ?- flag
15− %.y ["yes" "a"]
16− %.n ["no" "b"]
17−+$ rec [name=@t place=(unit @t)]
18−++ named |= flag=?
19− ^- rec ?- flag
20− %.y [name="yes" place=~]
21− %.n [name="no" place=~]
22−++ wrong |= flag=?
23− ^- rec ?- flag
24− %.y [name="yes" place=~]
25− %.n [other="no" place=~]
26−++ different |= flag=?
27− ^- rec ?- flag
28− %.y [name="yes" place=~]
29− %.n ["no" ~]
30−++ open |= [flag=? value=A]
31− ^- [A (unit A)] ?- flag
32− %.y [value ~]
33− %.n [value ~]
34−++ waiting |= flag=?
35− ^- rec ?- flag
36− %.y [name="yes" place=~]
37− %.n [name=%waiting place=~]
tests/golden/types-cell-branch-context/tokens.txtdeleted−308
@@ -1,308 +0,0 @@
1−1:1 glyph ++
2−1:4 name choose
3−1:11 glyph |=
4−1:14 name flag
5−1:18 tight glyph =
6−1:19 tight glyph ?
7−2:3 INDENT
8−2:3 glyph ^-
9−2:6 glyph [
10−2:7 tight aura @t
11−2:10 glyph (
12−2:11 tight name unit
13−2:16 aura @t
14−2:18 tight glyph )
15−2:19 tight glyph ]
16−2:21 glyph ?-
17−2:24 name flag
18−3:5 INDENT
19−3:5 lit %.y
20−3:9 glyph [
21−3:10 tight str "yes"
22−3:16 lit ~
23−3:17 tight glyph ]
24−4:5 NEWLINE
25−4:5 lit %.n
26−4:9 glyph [
27−4:10 tight str "no"
28−4:15 lit ~
29−4:16 tight glyph ]
30−5:1 DEDENT
31−5:1 DEDENT
32−5:1 NEWLINE
33−5:1 glyph ++
34−5:4 name bad
35−5:8 glyph |=
36−5:11 name flag
37−5:15 tight glyph =
38−5:16 tight glyph ?
39−6:3 INDENT
40−6:3 glyph ^-
41−6:6 glyph [
42−6:7 tight aura @t
43−6:10 glyph (
44−6:11 tight name unit
45−6:16 aura @t
46−6:18 tight glyph )
47−6:19 tight glyph ]
48−6:21 glyph ?-
49−6:24 name flag
50−7:5 INDENT
51−7:5 lit %.y
52−7:9 glyph [
53−7:10 tight str "yes"
54−7:16 lit ~
55−7:17 tight glyph ]
56−8:5 NEWLINE
57−8:5 lit %.n
58−8:9 glyph [
59−8:10 tight lit ~zod
60−8:15 lit ~
61−8:16 tight glyph ]
62−9:1 DEDENT
63−9:1 DEDENT
64−9:1 NEWLINE
65−9:1 glyph ++
66−9:4 name pending
67−9:12 glyph |=
68−9:15 name flag
69−9:19 tight glyph =
70−9:20 tight glyph ?
71−10:3 INDENT
72−10:3 glyph ^-
73−10:6 glyph [
74−10:7 tight aura @t
75−10:10 glyph (
76−10:11 tight name unit
77−10:16 aura @t
78−10:18 tight glyph )
79−10:19 tight glyph ]
80−10:21 glyph ?-
81−10:24 name flag
82−11:5 INDENT
83−11:5 lit %.y
84−11:9 glyph [
85−11:10 tight str "yes"
86−11:16 lit ~
87−11:17 tight glyph ]
88−12:5 NEWLINE
89−12:5 lit %.n
90−12:9 glyph [
91−12:10 tight lit %waiting
92−12:19 lit ~
93−12:20 tight glyph ]
94−13:1 DEDENT
95−13:1 DEDENT
96−13:1 NEWLINE
97−13:1 glyph ++
98−13:4 name already
99−13:12 glyph |=
100−13:15 name flag
101−13:19 tight glyph =
102−13:20 tight glyph ?
103−14:3 INDENT
104−14:3 glyph ^-
105−14:6 glyph [
106−14:7 tight aura @t
107−14:10 aura @t
108−14:12 tight glyph ]
109−14:14 glyph ?-
110−14:17 name flag
111−15:5 INDENT
112−15:5 lit %.y
113−15:9 glyph [
114−15:10 tight str "yes"
115−15:16 str "a"
116−15:19 tight glyph ]
117−16:5 NEWLINE
118−16:5 lit %.n
119−16:9 glyph [
120−16:10 tight str "no"
121−16:15 str "b"
122−16:18 tight glyph ]
123−17:1 DEDENT
124−17:1 DEDENT
125−17:1 NEWLINE
126−17:1 glyph +$
127−17:4 name rec
128−17:8 glyph [
129−17:9 tight name name
130−17:13 tight glyph =
131−17:14 tight aura @t
132−17:17 name place
133−17:22 tight glyph =
134−17:23 tight glyph (
135−17:24 tight name unit
136−17:29 aura @t
137−17:31 tight glyph )
138−17:32 tight glyph ]
139−18:1 NEWLINE
140−18:1 glyph ++
141−18:4 name named
142−18:10 glyph |=
143−18:13 name flag
144−18:17 tight glyph =
145−18:18 tight glyph ?
146−19:3 INDENT
147−19:3 glyph ^-
148−19:6 name rec
149−19:10 glyph ?-
150−19:13 name flag
151−20:5 INDENT
152−20:5 lit %.y
153−20:9 glyph [
154−20:10 tight name name
155−20:14 tight glyph =
156−20:15 tight str "yes"
157−20:21 name place
158−20:26 tight glyph =
159−20:27 tight lit ~
160−20:28 tight glyph ]
161−21:5 NEWLINE
162−21:5 lit %.n
163−21:9 glyph [
164−21:10 tight name name
165−21:14 tight glyph =
166−21:15 tight str "no"
167−21:20 name place
168−21:25 tight glyph =
169−21:26 tight lit ~
170−21:27 tight glyph ]
171−22:1 DEDENT
172−22:1 DEDENT
173−22:1 NEWLINE
174−22:1 glyph ++
175−22:4 name wrong
176−22:10 glyph |=
177−22:13 name flag
178−22:17 tight glyph =
179−22:18 tight glyph ?
180−23:3 INDENT
181−23:3 glyph ^-
182−23:6 name rec
183−23:10 glyph ?-
184−23:13 name flag
185−24:5 INDENT
186−24:5 lit %.y
187−24:9 glyph [
188−24:10 tight name name
189−24:14 tight glyph =
190−24:15 tight str "yes"
191−24:21 name place
192−24:26 tight glyph =
193−24:27 tight lit ~
194−24:28 tight glyph ]
195−25:5 NEWLINE
196−25:5 lit %.n
197−25:9 glyph [
198−25:10 tight name other
199−25:15 tight glyph =
200−25:16 tight str "no"
201−25:21 name place
202−25:26 tight glyph =
203−25:27 tight lit ~
204−25:28 tight glyph ]
205−26:1 DEDENT
206−26:1 DEDENT
207−26:1 NEWLINE
208−26:1 glyph ++
209−26:4 name different
210−26:14 glyph |=
211−26:17 name flag
212−26:21 tight glyph =
213−26:22 tight glyph ?
214−27:3 INDENT
215−27:3 glyph ^-
216−27:6 name rec
217−27:10 glyph ?-
218−27:13 name flag
219−28:5 INDENT
220−28:5 lit %.y
221−28:9 glyph [
222−28:10 tight name name
223−28:14 tight glyph =
224−28:15 tight str "yes"
225−28:21 name place
226−28:26 tight glyph =
227−28:27 tight lit ~
228−28:28 tight glyph ]
229−29:5 NEWLINE
230−29:5 lit %.n
231−29:9 glyph [
232−29:10 tight str "no"
233−29:15 lit ~
234−29:16 tight glyph ]
235−30:1 DEDENT
236−30:1 DEDENT
237−30:1 NEWLINE
238−30:1 glyph ++
239−30:4 name open
240−30:9 glyph |=
241−30:12 glyph [
242−30:13 tight name flag
243−30:17 tight glyph =
244−30:18 tight glyph ?
245−30:20 name value
246−30:25 tight glyph =
247−30:26 tight tvar A
248−30:27 tight glyph ]
249−31:3 INDENT
250−31:3 glyph ^-
251−31:6 glyph [
252−31:7 tight tvar A
253−31:9 glyph (
254−31:10 tight name unit
255−31:15 tvar A
256−31:16 tight glyph )
257−31:17 tight glyph ]
258−31:19 glyph ?-
259−31:22 name flag
260−32:5 INDENT
261−32:5 lit %.y
262−32:9 glyph [
263−32:10 tight name value
264−32:16 lit ~
265−32:17 tight glyph ]
266−33:5 NEWLINE
267−33:5 lit %.n
268−33:9 glyph [
269−33:10 tight name value
270−33:16 lit ~
271−33:17 tight glyph ]
272−34:1 DEDENT
273−34:1 DEDENT
274−34:1 NEWLINE
275−34:1 glyph ++
276−34:4 name waiting
277−34:12 glyph |=
278−34:15 name flag
279−34:19 tight glyph =
280−34:20 tight glyph ?
281−35:3 INDENT
282−35:3 glyph ^-
283−35:6 name rec
284−35:10 glyph ?-
285−35:13 name flag
286−36:5 INDENT
287−36:5 lit %.y
288−36:9 glyph [
289−36:10 tight name name
290−36:14 tight glyph =
291−36:15 tight str "yes"
292−36:21 name place
293−36:26 tight glyph =
294−36:27 tight lit ~
295−36:28 tight glyph ]
296−37:5 NEWLINE
297−37:5 lit %.n
298−37:9 glyph [
299−37:10 tight name name
300−37:14 tight glyph =
301−37:15 tight lit %waiting
302−37:24 name place
303−37:29 tight glyph =
304−37:30 tight lit ~
305−37:31 tight glyph ]
306−37:32 DEDENT
307−37:32 DEDENT
308−37:32 NEWLINE
tests/golden/types-cell-branch-context/tree.txtdeleted−156
@@ -1,156 +0,0 @@
1−(module
2− (value 1:1 choose
3− (gate 1:11
4− (face 1:14 flag (flag 1:19))
5− (body 2:3
6− (cast 2:3
7− (cell 2:6
8− (aura 2:7 @t)
9− (apply 2:10 unit (aura 2:16 @t)))
10− (branch 2:21
11− (wing 2:24 flag)
12− (arm 3:5
13− (lit 3:5 %.y)
14− (tuple 3:9 (str 3:10 "yes") (lit 3:16 ~)))
15− (arm 4:5
16− (lit 4:5 %.n)
17− (tuple 4:9 (str 4:10 "no") (lit 4:15 ~))))))))
18− (value 5:1 bad
19− (gate 5:8
20− (face 5:11 flag (flag 5:16))
21− (body 6:3
22− (cast 6:3
23− (cell 6:6
24− (aura 6:7 @t)
25− (apply 6:10 unit (aura 6:16 @t)))
26− (branch 6:21
27− (wing 6:24 flag)
28− (arm 7:5
29− (lit 7:5 %.y)
30− (tuple 7:9 (str 7:10 "yes") (lit 7:16 ~)))
31− (arm 8:5
32− (lit 8:5 %.n)
33− (tuple 8:9 (lit 8:10 ~zod) (lit 8:15 ~))))))))
34− (value 9:1 pending
35− (gate 9:12
36− (face 9:15 flag (flag 9:20))
37− (body 10:3
38− (cast 10:3
39− (cell 10:6
40− (aura 10:7 @t)
41− (apply 10:10 unit (aura 10:16 @t)))
42− (branch 10:21
43− (wing 10:24 flag)
44− (arm 11:5
45− (lit 11:5 %.y)
46− (tuple 11:9 (str 11:10 "yes") (lit 11:16 ~)))
47− (arm 12:5
48− (lit 12:5 %.n)
49− (tuple 12:9 (lit 12:10 %waiting) (lit 12:19 ~))))))))
50− (value 13:1 already
51− (gate 13:12
52− (face 13:15 flag (flag 13:20))
53− (body 14:3
54− (cast 14:3
55− (cell 14:6 (aura 14:7 @t) (aura 14:10 @t))
56− (branch 14:14
57− (wing 14:17 flag)
58− (arm 15:5
59− (lit 15:5 %.y)
60− (tuple 15:9 (str 15:10 "yes") (str 15:16 "a")))
61− (arm 16:5
62− (lit 16:5 %.n)
63− (tuple 16:9 (str 16:10 "no") (str 16:15 "b"))))))))
64− (mold 17:1 rec
65− (cell 17:8
66− (face 17:9 name (aura 17:14 @t))
67− (face 17:17 place
68− (apply 17:23 unit (aura 17:29 @t)))))
69− (value 18:1 named
70− (gate 18:10
71− (face 18:13 flag (flag 18:18))
72− (body 19:3
73− (cast 19:3
74− (ref 19:6 rec)
75− (branch 19:10
76− (wing 19:13 flag)
77− (arm 20:5
78− (lit 20:5 %.y)
79− (tuple 20:9
80− (face 20:10 name (str 20:15 "yes"))
81− (face 20:21 place (lit 20:27 ~))))
82− (arm 21:5
83− (lit 21:5 %.n)
84− (tuple 21:9
85− (face 21:10 name (str 21:15 "no"))
86− (face 21:20 place (lit 21:26 ~)))))))))
87− (value 22:1 wrong
88− (gate 22:10
89− (face 22:13 flag (flag 22:18))
90− (body 23:3
91− (cast 23:3
92− (ref 23:6 rec)
93− (branch 23:10
94− (wing 23:13 flag)
95− (arm 24:5
96− (lit 24:5 %.y)
97− (tuple 24:9
98− (face 24:10 name (str 24:15 "yes"))
99− (face 24:21 place (lit 24:27 ~))))
100− (arm 25:5
101− (lit 25:5 %.n)
102− (tuple 25:9
103− (face 25:10 other (str 25:16 "no"))
104− (face 25:21 place (lit 25:27 ~)))))))))
105− (value 26:1 different
106− (gate 26:14
107− (face 26:17 flag (flag 26:22))
108− (body 27:3
109− (cast 27:3
110− (ref 27:6 rec)
111− (branch 27:10
112− (wing 27:13 flag)
113− (arm 28:5
114− (lit 28:5 %.y)
115− (tuple 28:9
116− (face 28:10 name (str 28:15 "yes"))
117− (face 28:21 place (lit 28:27 ~))))
118− (arm 29:5
119− (lit 29:5 %.n)
120− (tuple 29:9 (str 29:10 "no") (lit 29:15 ~))))))))
121− (value 30:1 open
122− (gate 30:9
123− (cell 30:12
124− (face 30:13 flag (flag 30:18))
125− (face 30:20 value (tvar 30:26 A)))
126− (body 31:3
127− (cast 31:3
128− (cell 31:6
129− (tvar 31:7 A)
130− (apply 31:9 unit (tvar 31:15 A)))
131− (branch 31:19
132− (wing 31:22 flag)
133− (arm 32:5
134− (lit 32:5 %.y)
135− (tuple 32:9 (wing 32:10 value) (lit 32:16 ~)))
136− (arm 33:5
137− (lit 33:5 %.n)
138− (tuple 33:9 (wing 33:10 value) (lit 33:16 ~))))))))
139− (value 34:1 waiting
140− (gate 34:12
141− (face 34:15 flag (flag 34:20))
142− (body 35:3
143− (cast 35:3
144− (ref 35:6 rec)
145− (branch 35:10
146− (wing 35:13 flag)
147− (arm 36:5
148− (lit 36:5 %.y)
149− (tuple 36:9
150− (face 36:10 name (str 36:15 "yes"))
151− (face 36:21 place (lit 36:27 ~))))
152− (arm 37:5
153− (lit 37:5 %.n)
154− (tuple 37:9
155− (face 37:10 name (lit 37:15 %waiting))
156− (face 37:24 place (lit 37:30 ~))))))))))
tests/golden/types-cell-branch-context/types.txtdeleted−11
@@ -1,11 +0,0 @@
1−partial inference; module not checked
2−++ choose: $-(? [@t (unit @t)])
3−++ bad: branch tag or union context is not supported by partial inference
4−++ pending: branch tag or union context is not supported by partial inference
5−++ already: $-(? [@t @t])
6−+$ rec: not checked
7−++ named: $-(? [name=@t place=(unit @t)])
8−++ wrong: branch tag or union context is not supported by partial inference
9−++ different: branch tag or union context is not supported by partial inference
10−++ open: branch widening is not supported by partial inference
11−++ waiting: branch tag or union context is not supported by partial inference
tests/golden/types-cell-pattern-schemes/source.jibb+1−1
@@ -10,7 +10,7 @@
1010++ identity |= x
1111 ?- x
1212 [a b c] [a b c]
13−++ text-value (identity "hi" ~zod %.y)
13+++ text (identity "hi" ~zod %.y)
1414++ ship (identity ~zod "hi" %.n)
1515++ shared |= x=[A A A]
1616 ?- x
tests/golden/types-cell-pattern-schemes/tokens.txt+7−7
@@ -73,13 +73,13 @@
737313:1 DEDENT
747413:1 NEWLINE
757513:1 glyph ++
76−13:4 name text-value
77−13:15 glyph (
78−13:16 tight name identity
79−13:25 str "hi"
80−13:30 lit ~zod
81−13:35 lit %.y
82−13:38 tight 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 )
838314:1 NEWLINE
848414:1 glyph ++
858514:4 name ship
tests/golden/types-cell-pattern-schemes/tree.txt+3−3
@@ -31,9 +31,9 @@
3131 (arm 12:5
3232 (cell 12:5 (bind 12:6 a) (bind 12:8 b) (bind 12:10 c))
3333 (tuple 12:13 (wing 12:14 a) (wing 12:16 b) (wing 12:18 c)))))))
34− (value 13:1 text-value
35− (group 13:15
36− (call 13:16 (wing 13:16 identity) (str 13:25 "hi") (lit 13:30 ~zod) (lit 13:35 %.y))))
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))))
3737 (value 14:1 ship
3838 (group 14:9
3939 (call 14:10 (wing 14:10 identity) (lit 14:19 ~zod) (str 14:24 "hi") (lit 14:29 %.n))))
tests/golden/types-cell-pattern-schemes/types.txt+1−1
@@ -3,7 +3,7 @@ partial inference; module not checked
33++ maybe-union: cell pattern subject is not supported by partial inference
44++ maybe-list: cell pattern subject is not supported by partial inference
55++ identity: $-([A [B C]] [A [B C]])
6−++ text-value: [@t [@p ?]]
6+++ text: [@t [@p ?]]
77++ ship: [@p [@t ?]]
88++ shared: $-([A [A A]] [A [A A]])
99++ wrong: call's sample and argument types do not unify
tests/golden/types-constructor-context/about.txtdeleted−1
@@ -1 +0,0 @@
1−Constructor callback results require a known contextual union. This case checks unknown, matching, missing and wrong payload cases, aliases, written capitals and pending obligations.
tests/golden/types-constructor-context/source.jibbdeleted−37
@@ -1,37 +0,0 @@
1−+$ msg
2− [%got value=@t]
3− %other
4−+$ alias msg
5−+$ wrong-payload
6− [%got value=@p]
7− %other
8−+$ missing
9− [%different value=@t]
10− %other
11−+$ maybe |$ [A]
12− [%got value=A]
13− %other
14−++ call |= callback=$-(@t M) (callback "payload")
15−++ call-ship |= callback=$-(@p M) (callback ~zod)
16−++ unknown (call |=%got)
17−++ later-context ^- msg (call |=%got)
18−++ named-alias ^- alias (call |=%got)
19−++ wrong-context ^- wrong-payload (call |=%got)
20−++ missing-case ^- missing (call |=%got)
21−++ generic-context ^- (maybe @t) (call |=%got)
22−++ generic-wrong ^- (maybe @p) (call |=%got)
23−++ generic-right-ship ^- (maybe @p) (call-ship |=%got)
24−++ named-capital |= value=A
25− ^- (maybe A)
26− (|=(callback=$-(A M) (callback value)) |=%got)
27−++ discarded-pending
28− ~& %unrelated
29− ^- msg (call |=%got)
30−++ discarded-constructor
31− ~& |=%missing
32− ^- msg (call |=%got)
33−++ existing-no-context ^- $-(@t msg) |=%got
34−++ wrong-existing ^- $-(@p msg) |=%got
35−++ later-use ^- msg unknown
36−++ noun-context ^- * (call |=%got)
37−++ other-known-origin ^- (ask @t) (call |=%got)
tests/golden/types-constructor-context/tokens.txtdeleted−289
@@ -1,289 +0,0 @@
1−1:1 glyph +$
2−1:4 name msg
3−2:3 INDENT
4−2:3 glyph [
5−2:4 tight lit %got
6−2:9 name value
7−2:14 tight glyph =
8−2:15 tight aura @t
9−2:17 tight glyph ]
10−3:3 NEWLINE
11−3:3 lit %other
12−4:1 DEDENT
13−4:1 NEWLINE
14−4:1 glyph +$
15−4:4 name alias
16−4:10 name msg
17−5:1 NEWLINE
18−5:1 glyph +$
19−5:4 name wrong-payload
20−6:3 INDENT
21−6:3 glyph [
22−6:4 tight lit %got
23−6:9 name value
24−6:14 tight glyph =
25−6:15 tight aura @p
26−6:17 tight glyph ]
27−7:3 NEWLINE
28−7:3 lit %other
29−8:1 DEDENT
30−8:1 NEWLINE
31−8:1 glyph +$
32−8:4 name missing
33−9:3 INDENT
34−9:3 glyph [
35−9:4 tight lit %different
36−9:15 name value
37−9:20 tight glyph =
38−9:21 tight aura @t
39−9:23 tight glyph ]
40−10:3 NEWLINE
41−10:3 lit %other
42−11:1 DEDENT
43−11:1 NEWLINE
44−11:1 glyph +$
45−11:4 name maybe
46−11:10 glyph |$
47−11:13 glyph [
48−11:14 tight tvar A
49−11:15 tight glyph ]
50−12:3 INDENT
51−12:3 glyph [
52−12:4 tight lit %got
53−12:9 name value
54−12:14 tight glyph =
55−12:15 tight tvar A
56−12:16 tight glyph ]
57−13:3 NEWLINE
58−13:3 lit %other
59−14:1 DEDENT
60−14:1 NEWLINE
61−14:1 glyph ++
62−14:4 name call
63−14:9 glyph |=
64−14:12 name callback
65−14:20 tight glyph =
66−14:21 tight glyph $-(
67−14:24 tight aura @t
68−14:27 tvar M
69−14:28 tight glyph )
70−14:30 glyph (
71−14:31 tight name callback
72−14:40 str "payload"
73−14:49 tight glyph )
74−15:1 NEWLINE
75−15:1 glyph ++
76−15:4 name call-ship
77−15:14 glyph |=
78−15:17 name callback
79−15:25 tight glyph =
80−15:26 tight glyph $-(
81−15:29 tight aura @p
82−15:32 tvar M
83−15:33 tight glyph )
84−15:35 glyph (
85−15:36 tight name callback
86−15:45 lit ~zod
87−15:49 tight glyph )
88−16:1 NEWLINE
89−16:1 glyph ++
90−16:4 name unknown
91−16:12 glyph (
92−16:13 tight name call
93−16:18 glyph |=
94−16:20 tight lit %got
95−16:24 tight glyph )
96−17:1 NEWLINE
97−17:1 glyph ++
98−17:4 name later-context
99−17:18 glyph ^-
100−17:21 name msg
101−17:25 glyph (
102−17:26 tight name call
103−17:31 glyph |=
104−17:33 tight lit %got
105−17:37 tight glyph )
106−18:1 NEWLINE
107−18:1 glyph ++
108−18:4 name named-alias
109−18:16 glyph ^-
110−18:19 name alias
111−18:25 glyph (
112−18:26 tight name call
113−18:31 glyph |=
114−18:33 tight lit %got
115−18:37 tight glyph )
116−19:1 NEWLINE
117−19:1 glyph ++
118−19:4 name wrong-context
119−19:18 glyph ^-
120−19:21 name wrong-payload
121−19:35 glyph (
122−19:36 tight name call
123−19:41 glyph |=
124−19:43 tight lit %got
125−19:47 tight glyph )
126−20:1 NEWLINE
127−20:1 glyph ++
128−20:4 name missing-case
129−20:17 glyph ^-
130−20:20 name missing
131−20:28 glyph (
132−20:29 tight name call
133−20:34 glyph |=
134−20:36 tight lit %got
135−20:40 tight glyph )
136−21:1 NEWLINE
137−21:1 glyph ++
138−21:4 name generic-context
139−21:20 glyph ^-
140−21:23 glyph (
141−21:24 tight name maybe
142−21:30 aura @t
143−21:32 tight glyph )
144−21:34 glyph (
145−21:35 tight name call
146−21:40 glyph |=
147−21:42 tight lit %got
148−21:46 tight glyph )
149−22:1 NEWLINE
150−22:1 glyph ++
151−22:4 name generic-wrong
152−22:18 glyph ^-
153−22:21 glyph (
154−22:22 tight name maybe
155−22:28 aura @p
156−22:30 tight glyph )
157−22:32 glyph (
158−22:33 tight name call
159−22:38 glyph |=
160−22:40 tight lit %got
161−22:44 tight glyph )
162−23:1 NEWLINE
163−23:1 glyph ++
164−23:4 name generic-right-ship
165−23:23 glyph ^-
166−23:26 glyph (
167−23:27 tight name maybe
168−23:33 aura @p
169−23:35 tight glyph )
170−23:37 glyph (
171−23:38 tight name call-ship
172−23:48 glyph |=
173−23:50 tight lit %got
174−23:54 tight glyph )
175−24:1 NEWLINE
176−24:1 glyph ++
177−24:4 name named-capital
178−24:18 glyph |=
179−24:21 name value
180−24:26 tight glyph =
181−24:27 tight tvar A
182−25:3 INDENT
183−25:3 glyph ^-
184−25:6 glyph (
185−25:7 tight name maybe
186−25:13 tvar A
187−25:14 tight glyph )
188−26:5 INDENT
189−26:5 glyph (
190−26:6 tight glyph |=(
191−26:9 tight name callback
192−26:17 tight glyph =
193−26:18 tight glyph $-(
194−26:21 tight tvar A
195−26:23 tvar M
196−26:24 tight glyph )
197−26:26 glyph (
198−26:27 tight name callback
199−26:36 name value
200−26:41 tight glyph )
201−26:42 tight glyph )
202−26:44 glyph |=
203−26:46 tight lit %got
204−26:50 tight glyph )
205−27:1 DEDENT
206−27:1 DEDENT
207−27:1 NEWLINE
208−27:1 glyph ++
209−27:4 name discarded-pending
210−28:3 INDENT
211−28:3 glyph ~&
212−28:6 lit %unrelated
213−29:5 INDENT
214−29:5 glyph ^-
215−29:8 name msg
216−29:12 glyph (
217−29:13 tight name call
218−29:18 glyph |=
219−29:20 tight lit %got
220−29:24 tight glyph )
221−30:1 DEDENT
222−30:1 DEDENT
223−30:1 NEWLINE
224−30:1 glyph ++
225−30:4 name discarded-constructor
226−31:3 INDENT
227−31:3 glyph ~&
228−31:6 glyph |=
229−31:8 tight lit %missing
230−32:5 INDENT
231−32:5 glyph ^-
232−32:8 name msg
233−32:12 glyph (
234−32:13 tight name call
235−32:18 glyph |=
236−32:20 tight lit %got
237−32:24 tight glyph )
238−33:1 DEDENT
239−33:1 DEDENT
240−33:1 NEWLINE
241−33:1 glyph ++
242−33:4 name existing-no-context
243−33:24 glyph ^-
244−33:27 glyph $-(
245−33:30 tight aura @t
246−33:33 name msg
247−33:36 tight glyph )
248−33:38 glyph |=
249−33:40 tight lit %got
250−34:1 NEWLINE
251−34:1 glyph ++
252−34:4 name wrong-existing
253−34:19 glyph ^-
254−34:22 glyph $-(
255−34:25 tight aura @p
256−34:28 name msg
257−34:31 tight glyph )
258−34:33 glyph |=
259−34:35 tight lit %got
260−35:1 NEWLINE
261−35:1 glyph ++
262−35:4 name later-use
263−35:14 glyph ^-
264−35:17 name msg
265−35:21 name unknown
266−36:1 NEWLINE
267−36:1 glyph ++
268−36:4 name noun-context
269−36:17 glyph ^-
270−36:20 glyph *
271−36:22 glyph (
272−36:23 tight name call
273−36:28 glyph |=
274−36:30 tight lit %got
275−36:34 tight glyph )
276−37:1 NEWLINE
277−37:1 glyph ++
278−37:4 name other-known-origin
279−37:23 glyph ^-
280−37:26 glyph (
281−37:27 tight name ask
282−37:31 aura @t
283−37:33 tight glyph )
284−37:35 glyph (
285−37:36 tight name call
286−37:41 glyph |=
287−37:43 tight lit %got
288−37:47 tight glyph )
289−37:48 NEWLINE
tests/golden/types-constructor-context/tree.txtdeleted−130
@@ -1,130 +0,0 @@
1−(module
2− (mold 1:1 msg
3− (union 2:3
4− (cell 2:3
5− (const 2:4 %got)
6− (face 2:9 value (aura 2:15 @t)))
7− (const 3:3 %other)))
8− (mold 4:1 alias (ref 4:10 msg))
9− (mold 5:1 wrong-payload
10− (union 6:3
11− (cell 6:3
12− (const 6:4 %got)
13− (face 6:9 value (aura 6:15 @p)))
14− (const 7:3 %other)))
15− (mold 8:1 missing
16− (union 9:3
17− (cell 9:3
18− (const 9:4 %different)
19− (face 9:15 value (aura 9:21 @t)))
20− (const 10:3 %other)))
21− (mold 11:1 maybe
22− (generic 11:10 A
23− (union 12:3
24− (cell 12:3
25− (const 12:4 %got)
26− (face 12:9 value (tvar 12:15 A)))
27− (const 13:3 %other))))
28− (value 14:1 call
29− (gate 14:9
30− (face 14:12 callback
31− (fn 14:21 (aura 14:24 @t) (tvar 14:27 M)))
32− (group 14:30
33− (call 14:31 (wing 14:31 callback) (str 14:40 "payload")))))
34− (value 15:1 call-ship
35− (gate 15:14
36− (face 15:17 callback
37− (fn 15:26 (aura 15:29 @p) (tvar 15:32 M)))
38− (group 15:35
39− (call 15:36 (wing 15:36 callback) (lit 15:45 ~zod)))))
40− (value 16:1 unknown
41− (group 16:12
42− (call 16:13 (wing 16:13 call) (ctor 16:18 %got))))
43− (value 17:1 later-context
44− (cast 17:18
45− (ref 17:21 msg)
46− (group 17:25
47− (call 17:26 (wing 17:26 call) (ctor 17:31 %got)))))
48− (value 18:1 named-alias
49− (cast 18:16
50− (ref 18:19 alias)
51− (group 18:25
52− (call 18:26 (wing 18:26 call) (ctor 18:31 %got)))))
53− (value 19:1 wrong-context
54− (cast 19:18
55− (ref 19:21 wrong-payload)
56− (group 19:35
57− (call 19:36 (wing 19:36 call) (ctor 19:41 %got)))))
58− (value 20:1 missing-case
59− (cast 20:17
60− (ref 20:20 missing)
61− (group 20:28
62− (call 20:29 (wing 20:29 call) (ctor 20:34 %got)))))
63− (value 21:1 generic-context
64− (cast 21:20
65− (apply 21:23 maybe (aura 21:30 @t))
66− (group 21:34
67− (call 21:35 (wing 21:35 call) (ctor 21:40 %got)))))
68− (value 22:1 generic-wrong
69− (cast 22:18
70− (apply 22:21 maybe (aura 22:28 @p))
71− (group 22:32
72− (call 22:33 (wing 22:33 call) (ctor 22:38 %got)))))
73− (value 23:1 generic-right-ship
74− (cast 23:23
75− (apply 23:26 maybe (aura 23:33 @p))
76− (group 23:37
77− (call 23:38 (wing 23:38 call-ship) (ctor 23:48 %got)))))
78− (value 24:1 named-capital
79− (gate 24:18
80− (face 24:21 value (tvar 24:27 A))
81− (body 25:3
82− (cast 25:3
83− (apply 25:6 maybe (tvar 25:13 A))
84− (body 26:5
85− (group 26:5
86− (call 26:6
87− (gate-wide 26:6
88− (face 26:9 callback
89− (fn 26:18 (tvar 26:21 A) (tvar 26:23 M)))
90− (group 26:26
91− (call 26:27 (wing 26:27 callback) (wing 26:36 value))))
92− (ctor 26:44 %got))))))))
93− (value 27:1 discarded-pending
94− (body 28:3
95− (trace 28:3
96− (lit 28:6 %unrelated)
97− (body 29:5
98− (cast 29:5
99− (ref 29:8 msg)
100− (group 29:12
101− (call 29:13 (wing 29:13 call) (ctor 29:18 %got))))))))
102− (value 30:1 discarded-constructor
103− (body 31:3
104− (trace 31:3
105− (ctor 31:6 %missing)
106− (body 32:5
107− (cast 32:5
108− (ref 32:8 msg)
109− (group 32:12
110− (call 32:13 (wing 32:13 call) (ctor 32:18 %got))))))))
111− (value 33:1 existing-no-context
112− (cast 33:24
113− (fn 33:27 (aura 33:30 @t) (ref 33:33 msg))
114− (ctor 33:38 %got)))
115− (value 34:1 wrong-existing
116− (cast 34:19
117− (fn 34:22 (aura 34:25 @p) (ref 34:28 msg))
118− (ctor 34:33 %got)))
119− (value 35:1 later-use
120− (cast 35:14 (ref 35:17 msg) (wing 35:21 unknown)))
121− (value 36:1 noun-context
122− (cast 36:17
123− (noun 36:20)
124− (group 36:22
125− (call 36:23 (wing 36:23 call) (ctor 36:28 %got)))))
126− (value 37:1 other-known-origin
127− (cast 37:23
128− (apply 37:26 ask (aura 37:31 @t))
129− (group 37:35
130− (call 37:36 (wing 37:36 call) (ctor 37:41 %got))))))
tests/golden/types-constructor-context/types.txtdeleted−54
@@ -1,54 +0,0 @@
1−partial inference; module not checked
2−+$ msg: cases proven disjoint; mold not checked
3−+$ alias: not checked
4−+$ wrong-payload: cases proven disjoint; mold not checked
5−+$ missing: cases proven disjoint; mold not checked
6−+$ maybe: cases proven disjoint; mold not checked
7−++ call: $-($-(@t A) A)
8−++ call-ship: $-($-(@p A) A)
9−++ unknown: call constraint is not supported by partial inference
10−++ later-context: msg
11−++ named-alias: msg
12−++ wrong-context: call's sample and argument types do not unify
13−/tests/golden/types-constructor-context/source.jibb:19:36: called gate
14−++ wrong-context ^- wrong-payload (call |=%got)
15− ^
16−/tests/golden/types-constructor-context/source.jibb:19:41: argument
17−++ wrong-context ^- wrong-payload (call |=%got)
18− ^
19−++ missing-case: call's sample and argument types do not unify
20−/tests/golden/types-constructor-context/source.jibb:20:29: called gate
21−++ missing-case ^- missing (call |=%got)
22− ^
23−/tests/golden/types-constructor-context/source.jibb:20:34: argument
24−++ missing-case ^- missing (call |=%got)
25− ^
26−++ generic-context: (maybe @t)
27−++ generic-wrong: call's sample and argument types do not unify
28−/tests/golden/types-constructor-context/source.jibb:22:33: called gate
29−++ generic-wrong ^- (maybe @p) (call |=%got)
30− ^
31−/tests/golden/types-constructor-context/source.jibb:22:38: argument
32−++ generic-wrong ^- (maybe @p) (call |=%got)
33− ^
34−++ generic-right-ship: (maybe @p)
35−++ named-capital: explicit capital constraints are not supported by partial inference
36−++ discarded-pending: tag needs context in partial inference
37−++ discarded-constructor: tag needs context in partial inference
38−++ existing-no-context: $-(@t msg)
39−++ wrong-existing: cast mold and expression type do not unify
40−/tests/golden/types-constructor-context/source.jibb:34:22: cast mold
41−++ wrong-existing ^- $-(@p msg) |=%got
42− ^
43−/tests/golden/types-constructor-context/source.jibb:34:33: expression
44−++ wrong-existing ^- $-(@p msg) |=%got
45− ^
46−++ later-use: name is not available to partial inference
47−++ noun-context: call's sample and argument types do not unify
48−/tests/golden/types-constructor-context/source.jibb:36:23: called gate has type $-($-(@t *) *)
49−++ noun-context ^- * (call |=%got)
50− ^
51−/tests/golden/types-constructor-context/source.jibb:36:28: argument
52−++ noun-context ^- * (call |=%got)
53− ^
54−++ other-known-origin: cast mold is not supported by partial inference
tests/golden/types-equal-head-disjoint/about.txtdeleted−2
@@ -1,2 +0,0 @@
1−source: equal literal heads may have disjoint payloads and are compared by noun.
2−tests: Singleton payloads %alpha and %beta select distinct same-head cases; @t and @p cases overlap at zero. Incompatible samples and unrelated pending literals fail closed.
tests/golden/types-equal-head-disjoint/source.jibbdeleted−25
@@ -1,25 +0,0 @@
1−+$ split
2− [%one value=@t]
3− [%one value=@p]
4−+$ split-zero
5− [~ value=@t]
6− [%.y value=@p]
7−+$ nullable
8− ~
9− [~ value=@t]
10−++ cord ^- $-(@t split) |=%one
11−++ ship ^- $-(@p split) |=%one
12−++ neither ^- $-(@ud split) |=%one
13−++ zero-cord ^- $-(@t split-zero) |=%$
14−++ zero-ship ^- $-(@p split-zero) |=%$
15−++ zero-neither ^- $-(@ud split-zero) |=%$
16−++ contextual ^- $-(@t nullable) |=%$
17−++ pending
18− ~& %orphan
19− ^- $-(@t split) |=%one
20−+$ exact
21− [%same %alpha]
22− [%same %beta]
23−++ first ^- $-(%alpha exact) |=%same
24−++ second ^- $-(%beta exact) |=%same
25−++ no-case ^- $-(%other exact) |=%same
tests/golden/types-equal-head-disjoint/tokens.txtdeleted−179
@@ -1,179 +0,0 @@
1−1:1 glyph +$
2−1:4 name split
3−2:3 INDENT
4−2:3 glyph [
5−2:4 tight lit %one
6−2:9 name value
7−2:14 tight glyph =
8−2:15 tight aura @t
9−2:17 tight glyph ]
10−3:3 NEWLINE
11−3:3 glyph [
12−3:4 tight lit %one
13−3:9 name value
14−3:14 tight glyph =
15−3:15 tight aura @p
16−3:17 tight glyph ]
17−4:1 DEDENT
18−4:1 NEWLINE
19−4:1 glyph +$
20−4:4 name split-zero
21−5:3 INDENT
22−5:3 glyph [
23−5:4 tight lit ~
24−5:6 name value
25−5:11 tight glyph =
26−5:12 tight aura @t
27−5:14 tight glyph ]
28−6:3 NEWLINE
29−6:3 glyph [
30−6:4 tight lit %.y
31−6:8 name value
32−6:13 tight glyph =
33−6:14 tight aura @p
34−6:16 tight glyph ]
35−7:1 DEDENT
36−7:1 NEWLINE
37−7:1 glyph +$
38−7:4 name nullable
39−8:3 INDENT
40−8:3 lit ~
41−9:3 NEWLINE
42−9:3 glyph [
43−9:4 tight lit ~
44−9:6 name value
45−9:11 tight glyph =
46−9:12 tight aura @t
47−9:14 tight glyph ]
48−10:1 DEDENT
49−10:1 NEWLINE
50−10:1 glyph ++
51−10:4 name cord
52−10:9 glyph ^-
53−10:12 glyph $-(
54−10:15 tight aura @t
55−10:18 name split
56−10:23 tight glyph )
57−10:25 glyph |=
58−10:27 tight lit %one
59−11:1 NEWLINE
60−11:1 glyph ++
61−11:4 name ship
62−11:9 glyph ^-
63−11:12 glyph $-(
64−11:15 tight aura @p
65−11:18 name split
66−11:23 tight glyph )
67−11:25 glyph |=
68−11:27 tight lit %one
69−12:1 NEWLINE
70−12:1 glyph ++
71−12:4 name neither
72−12:12 glyph ^-
73−12:15 glyph $-(
74−12:18 tight aura @ud
75−12:22 name split
76−12:27 tight glyph )
77−12:29 glyph |=
78−12:31 tight lit %one
79−13:1 NEWLINE
80−13:1 glyph ++
81−13:4 name zero-cord
82−13:14 glyph ^-
83−13:17 glyph $-(
84−13:20 tight aura @t
85−13:23 name split-zero
86−13:33 tight glyph )
87−13:35 glyph |=
88−13:37 tight lit %$
89−14:1 NEWLINE
90−14:1 glyph ++
91−14:4 name zero-ship
92−14:14 glyph ^-
93−14:17 glyph $-(
94−14:20 tight aura @p
95−14:23 name split-zero
96−14:33 tight glyph )
97−14:35 glyph |=
98−14:37 tight lit %$
99−15:1 NEWLINE
100−15:1 glyph ++
101−15:4 name zero-neither
102−15:17 glyph ^-
103−15:20 glyph $-(
104−15:23 tight aura @ud
105−15:27 name split-zero
106−15:37 tight glyph )
107−15:39 glyph |=
108−15:41 tight lit %$
109−16:1 NEWLINE
110−16:1 glyph ++
111−16:4 name contextual
112−16:15 glyph ^-
113−16:18 glyph $-(
114−16:21 tight aura @t
115−16:24 name nullable
116−16:32 tight glyph )
117−16:34 glyph |=
118−16:36 tight lit %$
119−17:1 NEWLINE
120−17:1 glyph ++
121−17:4 name pending
122−18:3 INDENT
123−18:3 glyph ~&
124−18:6 lit %orphan
125−19:5 INDENT
126−19:5 glyph ^-
127−19:8 glyph $-(
128−19:11 tight aura @t
129−19:14 name split
130−19:19 tight glyph )
131−19:21 glyph |=
132−19:23 tight lit %one
133−20:1 DEDENT
134−20:1 DEDENT
135−20:1 NEWLINE
136−20:1 glyph +$
137−20:4 name exact
138−21:3 INDENT
139−21:3 glyph [
140−21:4 tight lit %same
141−21:10 lit %alpha
142−21:16 tight glyph ]
143−22:3 NEWLINE
144−22:3 glyph [
145−22:4 tight lit %same
146−22:10 lit %beta
147−22:15 tight glyph ]
148−23:1 DEDENT
149−23:1 NEWLINE
150−23:1 glyph ++
151−23:4 name first
152−23:10 glyph ^-
153−23:13 glyph $-(
154−23:16 tight lit %alpha
155−23:23 name exact
156−23:28 tight glyph )
157−23:30 glyph |=
158−23:32 tight lit %same
159−24:1 NEWLINE
160−24:1 glyph ++
161−24:4 name second
162−24:11 glyph ^-
163−24:14 glyph $-(
164−24:17 tight lit %beta
165−24:23 name exact
166−24:28 tight glyph )
167−24:30 glyph |=
168−24:32 tight lit %same
169−25:1 NEWLINE
170−25:1 glyph ++
171−25:4 name no-case
172−25:12 glyph ^-
173−25:15 glyph $-(
174−25:18 tight lit %other
175−25:25 name exact
176−25:30 tight glyph )
177−25:32 glyph |=
178−25:34 tight lit %same
179−25:39 NEWLINE
tests/golden/types-equal-head-disjoint/tree.txtdeleted−75
@@ -1,75 +0,0 @@
1−(module
2− (mold 1:1 split
3− (union 2:3
4− (cell 2:3
5− (const 2:4 %one)
6− (face 2:9 value (aura 2:15 @t)))
7− (cell 3:3
8− (const 3:4 %one)
9− (face 3:9 value (aura 3:15 @p)))))
10− (mold 4:1 split-zero
11− (union 5:3
12− (cell 5:3
13− (const 5:4 ~)
14− (face 5:6 value (aura 5:12 @t)))
15− (cell 6:3
16− (const 6:4 %.y)
17− (face 6:8 value (aura 6:14 @p)))))
18− (mold 7:1 nullable
19− (union 8:3
20− (const 8:3 ~)
21− (cell 9:3
22− (const 9:4 ~)
23− (face 9:6 value (aura 9:12 @t)))))
24− (value 10:1 cord
25− (cast 10:9
26− (fn 10:12 (aura 10:15 @t) (ref 10:18 split))
27− (ctor 10:25 %one)))
28− (value 11:1 ship
29− (cast 11:9
30− (fn 11:12 (aura 11:15 @p) (ref 11:18 split))
31− (ctor 11:25 %one)))
32− (value 12:1 neither
33− (cast 12:12
34− (fn 12:15 (aura 12:18 @ud) (ref 12:22 split))
35− (ctor 12:29 %one)))
36− (value 13:1 zero-cord
37− (cast 13:14
38− (fn 13:17 (aura 13:20 @t) (ref 13:23 split-zero))
39− (ctor 13:35 %$)))
40− (value 14:1 zero-ship
41− (cast 14:14
42− (fn 14:17 (aura 14:20 @p) (ref 14:23 split-zero))
43− (ctor 14:35 %$)))
44− (value 15:1 zero-neither
45− (cast 15:17
46− (fn 15:20 (aura 15:23 @ud) (ref 15:27 split-zero))
47− (ctor 15:39 %$)))
48− (value 16:1 contextual
49− (cast 16:15
50− (fn 16:18 (aura 16:21 @t) (ref 16:24 nullable))
51− (ctor 16:34 %$)))
52− (value 17:1 pending
53− (body 18:3
54− (trace 18:3
55− (lit 18:6 %orphan)
56− (body 19:5
57− (cast 19:5
58− (fn 19:8 (aura 19:11 @t) (ref 19:14 split))
59− (ctor 19:21 %one))))))
60− (mold 20:1 exact
61− (union 21:3
62− (cell 21:3 (const 21:4 %same) (const 21:10 %alpha))
63− (cell 22:3 (const 22:4 %same) (const 22:10 %beta))))
64− (value 23:1 first
65− (cast 23:10
66− (fn 23:13 (const 23:16 %alpha) (ref 23:23 exact))
67− (ctor 23:30 %same)))
68− (value 24:1 second
69− (cast 24:11
70− (fn 24:14 (const 24:17 %beta) (ref 24:23 exact))
71− (ctor 24:30 %same)))
72− (value 25:1 no-case
73− (cast 25:12
74− (fn 25:15 (const 25:18 %other) (ref 25:25 exact))
75− (ctor 25:32 %same))))
tests/golden/types-equal-head-disjoint/types.txtdeleted−34
@@ -1,34 +0,0 @@
1−partial inference; module not checked
2−+$ split: overlapping cases; mold not checked
3−/tests/golden/types-equal-head-disjoint/source.jibb:2:3: first union case
4− [%one value=@t]
5− ^
6−/tests/golden/types-equal-head-disjoint/source.jibb:3:3: overlapping case
7− [%one value=@p]
8− ^
9−+$ split-zero: overlapping cases; mold not checked
10−/tests/golden/types-equal-head-disjoint/source.jibb:5:3: first union case
11− [~ value=@t]
12− ^
13−/tests/golden/types-equal-head-disjoint/source.jibb:6:3: overlapping case
14− [%.y value=@p]
15− ^
16−+$ nullable: cases proven disjoint; mold not checked
17−++ cord: cast mold is not supported by partial inference
18−++ ship: cast mold is not supported by partial inference
19−++ neither: cast mold is not supported by partial inference
20−++ zero-cord: cast mold is not supported by partial inference
21−++ zero-ship: cast mold is not supported by partial inference
22−++ zero-neither: cast mold is not supported by partial inference
23−++ contextual: $-(@t nullable)
24−++ pending: cast mold is not supported by partial inference
25−+$ exact: cases proven disjoint; mold not checked
26−++ first: $-(%alpha exact)
27−++ second: $-(%beta exact)
28−++ no-case: cast mold and expression type do not unify
29−/tests/golden/types-equal-head-disjoint/source.jibb:25:15: cast mold
30−++ no-case ^- $-(%other exact) |=%same
31− ^
32−/tests/golden/types-equal-head-disjoint/source.jibb:25:32: expression
33−++ no-case ^- $-(%other exact) |=%same
34− ^
tests/golden/types-generic-result-context/about.txtdeleted−1
@@ -1 +0,0 @@
1−Context can reach a directly known generic union result, including reordered and repeated aliases, distinct nominal arguments, independent uses, pending tags and a missing case. These are partial inference reports.
tests/golden/types-generic-result-context/source.jibbdeleted−24
@@ -1,24 +0,0 @@
1−+$ msg
2− %idle
3− %busy
4−+$ other
5− %idle
6− %busy
7−+$ choice |$ [A B]
8− [%one value=A]
9− [%two value=B]
10−+$ swap |$ [A B] (choice B A)
11−+$ repeated |$ [A] (choice A A)
12−+$ phantom |$ [A B] (choice A @p)
13−++ wrap-value |= x=A ^- (choice A @p) [%one x]
14−++ wrap-value-repeat |= x=A ^- (repeated A) [%one x]
15−++ use-msg ^- (choice msg @p) (wrap-value %idle)
16−++ use-alias ^- (swap @p msg) (wrap-value %idle)
17−++ use-repeated ^- (repeated msg) (wrap-value-repeat %idle)
18−++ use-distinct ^- (choice other @p) (wrap-value %idle)
19−++ independent |= [m=msg n=other]
20− [(^- (choice msg @p) (wrap-value m)) (^- (choice other @p) (wrap-value n))]
21−++ pending
22− ~& %orphan
23− ^- (choice msg @p) (wrap-value %idle)
24−++ wrong-case ^- (choice msg @p) (wrap-value %absent)
tests/golden/types-generic-result-context/tokens.txtdeleted−233
@@ -1,233 +0,0 @@
1−1:1 glyph +$
2−1:4 name msg
3−2:3 INDENT
4−2:3 lit %idle
5−3:3 NEWLINE
6−3:3 lit %busy
7−4:1 DEDENT
8−4:1 NEWLINE
9−4:1 glyph +$
10−4:4 name other
11−5:3 INDENT
12−5:3 lit %idle
13−6:3 NEWLINE
14−6:3 lit %busy
15−7:1 DEDENT
16−7:1 NEWLINE
17−7:1 glyph +$
18−7:4 name choice
19−7:11 glyph |$
20−7:14 glyph [
21−7:15 tight tvar A
22−7:17 tvar B
23−7:18 tight glyph ]
24−8:3 INDENT
25−8:3 glyph [
26−8:4 tight lit %one
27−8:9 name value
28−8:14 tight glyph =
29−8:15 tight tvar A
30−8:16 tight glyph ]
31−9:3 NEWLINE
32−9:3 glyph [
33−9:4 tight lit %two
34−9:9 name value
35−9:14 tight glyph =
36−9:15 tight tvar B
37−9:16 tight glyph ]
38−10:1 DEDENT
39−10:1 NEWLINE
40−10:1 glyph +$
41−10:4 name swap
42−10:9 glyph |$
43−10:12 glyph [
44−10:13 tight tvar A
45−10:15 tvar B
46−10:16 tight glyph ]
47−10:18 glyph (
48−10:19 tight name choice
49−10:26 tvar B
50−10:28 tvar A
51−10:29 tight glyph )
52−11:1 NEWLINE
53−11:1 glyph +$
54−11:4 name repeated
55−11:13 glyph |$
56−11:16 glyph [
57−11:17 tight tvar A
58−11:18 tight glyph ]
59−11:20 glyph (
60−11:21 tight name choice
61−11:28 tvar A
62−11:30 tvar A
63−11:31 tight glyph )
64−12:1 NEWLINE
65−12:1 glyph +$
66−12:4 name phantom
67−12:12 glyph |$
68−12:15 glyph [
69−12:16 tight tvar A
70−12:18 tvar B
71−12:19 tight glyph ]
72−12:21 glyph (
73−12:22 tight name choice
74−12:29 tvar A
75−12:31 aura @p
76−12:33 tight glyph )
77−13:1 NEWLINE
78−13:1 glyph ++
79−13:4 name wrap-value
80−13:15 glyph |=
81−13:18 name x
82−13:19 tight glyph =
83−13:20 tight tvar A
84−13:22 glyph ^-
85−13:25 glyph (
86−13:26 tight name choice
87−13:33 tvar A
88−13:35 aura @p
89−13:37 tight glyph )
90−13:39 glyph [
91−13:40 tight lit %one
92−13:45 name x
93−13:46 tight glyph ]
94−14:1 NEWLINE
95−14:1 glyph ++
96−14:4 name wrap-value-repeat
97−14:22 glyph |=
98−14:25 name x
99−14:26 tight glyph =
100−14:27 tight tvar A
101−14:29 glyph ^-
102−14:32 glyph (
103−14:33 tight name repeated
104−14:42 tvar A
105−14:43 tight glyph )
106−14:45 glyph [
107−14:46 tight lit %one
108−14:51 name x
109−14:52 tight glyph ]
110−15:1 NEWLINE
111−15:1 glyph ++
112−15:4 name use-msg
113−15:12 glyph ^-
114−15:15 glyph (
115−15:16 tight name choice
116−15:23 name msg
117−15:27 aura @p
118−15:29 tight glyph )
119−15:31 glyph (
120−15:32 tight name wrap-value
121−15:43 lit %idle
122−15:48 tight glyph )
123−16:1 NEWLINE
124−16:1 glyph ++
125−16:4 name use-alias
126−16:14 glyph ^-
127−16:17 glyph (
128−16:18 tight name swap
129−16:23 aura @p
130−16:26 name msg
131−16:29 tight glyph )
132−16:31 glyph (
133−16:32 tight name wrap-value
134−16:43 lit %idle
135−16:48 tight glyph )
136−17:1 NEWLINE
137−17:1 glyph ++
138−17:4 name use-repeated
139−17:17 glyph ^-
140−17:20 glyph (
141−17:21 tight name repeated
142−17:30 name msg
143−17:33 tight glyph )
144−17:35 glyph (
145−17:36 tight name wrap-value-repeat
146−17:54 lit %idle
147−17:59 tight glyph )
148−18:1 NEWLINE
149−18:1 glyph ++
150−18:4 name use-distinct
151−18:17 glyph ^-
152−18:20 glyph (
153−18:21 tight name choice
154−18:28 name other
155−18:34 aura @p
156−18:36 tight glyph )
157−18:38 glyph (
158−18:39 tight name wrap-value
159−18:50 lit %idle
160−18:55 tight glyph )
161−19:1 NEWLINE
162−19:1 glyph ++
163−19:4 name independent
164−19:16 glyph |=
165−19:19 glyph [
166−19:20 tight name m
167−19:21 tight glyph =
168−19:22 tight name msg
169−19:26 name n
170−19:27 tight glyph =
171−19:28 tight name other
172−19:33 tight glyph ]
173−20:3 INDENT
174−20:3 glyph [
175−20:4 tight glyph (
176−20:5 tight glyph ^-
177−20:8 glyph (
178−20:9 tight name choice
179−20:16 name msg
180−20:20 aura @p
181−20:22 tight glyph )
182−20:24 glyph (
183−20:25 tight name wrap-value
184−20:36 name m
185−20:37 tight glyph )
186−20:38 tight glyph )
187−20:40 glyph (
188−20:41 tight glyph ^-
189−20:44 glyph (
190−20:45 tight name choice
191−20:52 name other
192−20:58 aura @p
193−20:60 tight glyph )
194−20:62 glyph (
195−20:63 tight name wrap-value
196−20:74 name n
197−20:75 tight glyph )
198−20:76 tight glyph )
199−20:77 tight glyph ]
200−21:1 DEDENT
201−21:1 NEWLINE
202−21:1 glyph ++
203−21:4 name pending
204−22:3 INDENT
205−22:3 glyph ~&
206−22:6 lit %orphan
207−23:5 INDENT
208−23:5 glyph ^-
209−23:8 glyph (
210−23:9 tight name choice
211−23:16 name msg
212−23:20 aura @p
213−23:22 tight glyph )
214−23:24 glyph (
215−23:25 tight name wrap-value
216−23:36 lit %idle
217−23:41 tight glyph )
218−24:1 DEDENT
219−24:1 DEDENT
220−24:1 NEWLINE
221−24:1 glyph ++
222−24:4 name wrong-case
223−24:15 glyph ^-
224−24:18 glyph (
225−24:19 tight name choice
226−24:26 name msg
227−24:30 aura @p
228−24:32 tight glyph )
229−24:34 glyph (
230−24:35 tight name wrap-value
231−24:46 lit %absent
232−24:53 tight glyph )
233−24:54 NEWLINE
tests/golden/types-generic-result-context/tree.txtdeleted−86
@@ -1,86 +0,0 @@
1−(module
2− (mold 1:1 msg
3− (union 2:3 (const 2:3 %idle) (const 3:3 %busy)))
4− (mold 4:1 other
5− (union 5:3 (const 5:3 %idle) (const 6:3 %busy)))
6− (mold 7:1 choice
7− (generic 7:11 A B
8− (union 8:3
9− (cell 8:3
10− (const 8:4 %one)
11− (face 8:9 value (tvar 8:15 A)))
12− (cell 9:3
13− (const 9:4 %two)
14− (face 9:9 value (tvar 9:15 B))))))
15− (mold 10:1 swap
16− (generic 10:9 A B
17− (apply 10:18 choice (tvar 10:26 B) (tvar 10:28 A))))
18− (mold 11:1 repeated
19− (generic 11:13 A
20− (apply 11:20 choice (tvar 11:28 A) (tvar 11:30 A))))
21− (mold 12:1 phantom
22− (generic 12:12 A B
23− (apply 12:21 choice (tvar 12:29 A) (aura 12:31 @p))))
24− (value 13:1 wrap-value
25− (gate 13:15
26− (face 13:18 x (tvar 13:20 A))
27− (cast 13:22
28− (apply 13:25 choice (tvar 13:33 A) (aura 13:35 @p))
29− (tuple 13:39 (lit 13:40 %one) (wing 13:45 x)))))
30− (value 14:1 wrap-value-repeat
31− (gate 14:22
32− (face 14:25 x (tvar 14:27 A))
33− (cast 14:29
34− (apply 14:32 repeated (tvar 14:42 A))
35− (tuple 14:45 (lit 14:46 %one) (wing 14:51 x)))))
36− (value 15:1 use-msg
37− (cast 15:12
38− (apply 15:15 choice (ref 15:23 msg) (aura 15:27 @p))
39− (group 15:31
40− (call 15:32 (wing 15:32 wrap-value) (lit 15:43 %idle)))))
41− (value 16:1 use-alias
42− (cast 16:14
43− (apply 16:17 swap (aura 16:23 @p) (ref 16:26 msg))
44− (group 16:31
45− (call 16:32 (wing 16:32 wrap-value) (lit 16:43 %idle)))))
46− (value 17:1 use-repeated
47− (cast 17:17
48− (apply 17:20 repeated (ref 17:30 msg))
49− (group 17:35
50− (call 17:36 (wing 17:36 wrap-value-repeat) (lit 17:54 %idle)))))
51− (value 18:1 use-distinct
52− (cast 18:17
53− (apply 18:20 choice (ref 18:28 other) (aura 18:34 @p))
54− (group 18:38
55− (call 18:39 (wing 18:39 wrap-value) (lit 18:50 %idle)))))
56− (value 19:1 independent
57− (gate 19:16
58− (cell 19:19
59− (face 19:20 m (ref 19:22 msg))
60− (face 19:26 n (ref 19:28 other)))
61− (body 20:3
62− (tuple 20:3
63− (group 20:4
64− (cast 20:5
65− (apply 20:8 choice (ref 20:16 msg) (aura 20:20 @p))
66− (group 20:24
67− (call 20:25 (wing 20:25 wrap-value) (wing 20:36 m)))))
68− (group 20:40
69− (cast 20:41
70− (apply 20:44 choice (ref 20:52 other) (aura 20:58 @p))
71− (group 20:62
72− (call 20:63 (wing 20:63 wrap-value) (wing 20:74 n)))))))))
73− (value 21:1 pending
74− (body 22:3
75− (trace 22:3
76− (lit 22:6 %orphan)
77− (body 23:5
78− (cast 23:5
79− (apply 23:8 choice (ref 23:16 msg) (aura 23:20 @p))
80− (group 23:24
81− (call 23:25 (wing 23:25 wrap-value) (lit 23:36 %idle))))))))
82− (value 24:1 wrong-case
83− (cast 24:15
84− (apply 24:18 choice (ref 24:26 msg) (aura 24:30 @p))
85− (group 24:34
86− (call 24:35 (wing 24:35 wrap-value) (lit 24:46 %absent))))))
tests/golden/types-generic-result-context/types.txtdeleted−22
@@ -1,22 +0,0 @@
1−partial inference; module not checked
2−+$ msg: cases proven disjoint; mold not checked
3−+$ other: cases proven disjoint; mold not checked
4−+$ choice: cases proven disjoint; mold not checked
5−+$ swap: not checked
6−+$ repeated: not checked
7−+$ phantom: not checked
8−++ wrap-value: $-(A (choice A @p))
9−++ wrap-value-repeat: $-(A (choice A A))
10−++ use-msg: (choice msg @p)
11−++ use-alias: (choice msg @p)
12−++ use-repeated: (choice msg msg)
13−++ use-distinct: (choice other @p)
14−++ independent: $-([m=msg n=other] [(choice msg @p) (choice other @p)])
15−++ pending: tag needs context in partial inference
16−++ wrong-case: msg has no case `%absent`
17−/tests/golden/types-generic-result-context/source.jibb:24:35: expected union
18−++ wrong-case ^- (choice msg @p) (wrap-value %absent)
19− ^
20−/tests/golden/types-generic-result-context/source.jibb:24:46: tag
21−++ wrong-case ^- (choice msg @p) (wrap-value %absent)
22− ^
tests/golden/types-generic-union-escaping/module-trees.txt+4−4
@@ -6,10 +6,10 @@
66/ui/mid.jibb
77(module
88 (jibb 1:1 base /ui/base)
9− (value 2:1 text-value
10− (cast 2:15
11− (apply 2:18 phantom.base (aura 2:32 @t))
12− (lit 2:36 %yes)))
9+ (value 2:1 text
10+ (cast 2:9
11+ (apply 2:12 phantom.base (aura 2:26 @t))
12+ (lit 2:30 %yes)))
1313 (value 3:1 ship
1414 (cast 3:9
1515 (apply 3:12 phantom.base (aura 3:26 @p))
tests/golden/types-generic-union-escaping/modules/ui/mid.jibb+1−1
@@ -1,3 +1,3 @@
11/= base /ui/base
2−++ text-value ^- (phantom.base @t) %yes
2+++ text ^- (phantom.base @t) %yes
33++ ship ^- (phantom.base @p) %yes
tests/golden/types-generic-union-escaping/source.jibb+1−1
@@ -1,3 +1,3 @@
11/= mid /ui/mid
2−++ text-value text-value.mid
2+++ text-value text.mid
33++ ship-value ship.mid
tests/golden/types-generic-union-escaping/tokens.txt+1−1
@@ -7,7 +7,7 @@
772:1 NEWLINE
882:1 glyph ++
992:4 name text-value
10−2:15 wing text-value.mid
10+2:15 wing text.mid
11113:1 NEWLINE
12123:1 glyph ++
13133:4 name ship-value
tests/golden/types-generic-union-escaping/tree.txt+1−1
@@ -1,4 +1,4 @@
11(module
22 (jibb 1:1 mid /ui/mid)
3− (value 2:1 text-value (wing 2:15 text-value.mid))
3+ (value 2:1 text-value (wing 2:15 text.mid))
44 (value 3:1 ship-value (wing 3:15 ship.mid)))
tests/golden/types-list-patterns/about.txt+1−1
@@ -1,4 +1,4 @@
11source: Grammar, Patterns: "Every case needs an arm or a catch-all"; "A name in a pattern always binds anew". Modules: no name may shadow an in-scope name.
2−tests: Both orders of an exhaustive list branch bind the head and tail with their respective types; unsupported subjects or patterns, conflicting binders, and unrelated unresolved tags fail closed; a nonempty arm of `(list !!)` is unreachable.
2+tests: Both orders of an exhaustive list branch bind the head and tail with their respective types; unsupported subjects or patterns, conflicting binders, and unrelated unresolved tags fail closed.
33expect: parses
44expect-types: a partial inference report
tests/golden/types-list-patterns/types.txt+1−1
@@ -12,6 +12,6 @@ partial inference; module not checked
1212++ unresolved: list branch results need unsupported inference
1313++ duplicate-arm: branch is not supported by partial inference
1414++ unrelated: tag needs context in partial inference
15−++ empty-elements: list nonempty pattern is unreachable
15+++ empty-elements: sample mold is not supported by partial inference
1616+$ maybe: cases proven disjoint; mold not checked
1717++ unit-shape: unit branch pattern is not supported by partial inference
tests/golden/types-literal-constructor-nouns/about.txtdeleted−2
@@ -1,2 +0,0 @@
1−source: equality of literal molds is based on their runtime nouns.
2−tests: The `%$` constructor matches null-, loobean-zero- and term-zero-headed cells. Overlapping same-noun cases are rejected. Wrong payload, absent tags and unrelated pending constraints remain checked. This is a partial inference report.
tests/golden/types-literal-constructor-nouns/source.jibbdeleted−25
@@ -1,25 +0,0 @@
1−+$ null-head [~ value=@t]
2−+$ flag-head [%.y value=@t]
3−+$ dollar-head [%$ value=@t]
4−+$ pair-null
5− ~
6− [~ value=@t]
7−+$ overlap-null
8− [~ value=@t]
9− [%$ value=@t]
10−+$ overlap-flag
11− [%.y value=@t]
12− [%$ value=@t]
13−+$ overlap-three
14− [~ value=@t]
15− [%.y value=@t]
16− [%$ value=@t]
17−++ null-ctor ^- $-(@t null-head) |=%$
18−++ flag-ctor ^- $-(@t flag-head) |=%$
19−++ dollar-ctor ^- $-(@t dollar-head) |=%$
20−++ unit-like-ctor ^- $-(@t pair-null) |=%$
21−++ wrong-payload ^- $-(@p null-head) |=%$
22−++ missing-tag ^- $-(@t null-head) |=%missing
23−++ pending
24− ~& %unrelated
25− ^- $-(@t null-head) |=%$
tests/golden/types-literal-constructor-nouns/tokens.txtdeleted−177
@@ -1,177 +0,0 @@
1−1:1 glyph +$
2−1:4 name null-head
3−1:14 glyph [
4−1:15 tight lit ~
5−1:17 name value
6−1:22 tight glyph =
7−1:23 tight aura @t
8−1:25 tight glyph ]
9−2:1 NEWLINE
10−2:1 glyph +$
11−2:4 name flag-head
12−2:14 glyph [
13−2:15 tight lit %.y
14−2:19 name value
15−2:24 tight glyph =
16−2:25 tight aura @t
17−2:27 tight glyph ]
18−3:1 NEWLINE
19−3:1 glyph +$
20−3:4 name dollar-head
21−3:16 glyph [
22−3:17 tight lit %$
23−3:20 name value
24−3:25 tight glyph =
25−3:26 tight aura @t
26−3:28 tight glyph ]
27−4:1 NEWLINE
28−4:1 glyph +$
29−4:4 name pair-null
30−5:3 INDENT
31−5:3 lit ~
32−6:3 NEWLINE
33−6:3 glyph [
34−6:4 tight lit ~
35−6:6 name value
36−6:11 tight glyph =
37−6:12 tight aura @t
38−6:14 tight glyph ]
39−7:1 DEDENT
40−7:1 NEWLINE
41−7:1 glyph +$
42−7:4 name overlap-null
43−8:3 INDENT
44−8:3 glyph [
45−8:4 tight lit ~
46−8:6 name value
47−8:11 tight glyph =
48−8:12 tight aura @t
49−8:14 tight glyph ]
50−9:3 NEWLINE
51−9:3 glyph [
52−9:4 tight lit %$
53−9:7 name value
54−9:12 tight glyph =
55−9:13 tight aura @t
56−9:15 tight glyph ]
57−10:1 DEDENT
58−10:1 NEWLINE
59−10:1 glyph +$
60−10:4 name overlap-flag
61−11:3 INDENT
62−11:3 glyph [
63−11:4 tight lit %.y
64−11:8 name value
65−11:13 tight glyph =
66−11:14 tight aura @t
67−11:16 tight glyph ]
68−12:3 NEWLINE
69−12:3 glyph [
70−12:4 tight lit %$
71−12:7 name value
72−12:12 tight glyph =
73−12:13 tight aura @t
74−12:15 tight glyph ]
75−13:1 DEDENT
76−13:1 NEWLINE
77−13:1 glyph +$
78−13:4 name overlap-three
79−14:3 INDENT
80−14:3 glyph [
81−14:4 tight lit ~
82−14:6 name value
83−14:11 tight glyph =
84−14:12 tight aura @t
85−14:14 tight glyph ]
86−15:3 NEWLINE
87−15:3 glyph [
88−15:4 tight lit %.y
89−15:8 name value
90−15:13 tight glyph =
91−15:14 tight aura @t
92−15:16 tight glyph ]
93−16:3 NEWLINE
94−16:3 glyph [
95−16:4 tight lit %$
96−16:7 name value
97−16:12 tight glyph =
98−16:13 tight aura @t
99−16:15 tight glyph ]
100−17:1 DEDENT
101−17:1 NEWLINE
102−17:1 glyph ++
103−17:4 name null-ctor
104−17:14 glyph ^-
105−17:17 glyph $-(
106−17:20 tight aura @t
107−17:23 name null-head
108−17:32 tight glyph )
109−17:34 glyph |=
110−17:36 tight lit %$
111−18:1 NEWLINE
112−18:1 glyph ++
113−18:4 name flag-ctor
114−18:14 glyph ^-
115−18:17 glyph $-(
116−18:20 tight aura @t
117−18:23 name flag-head
118−18:32 tight glyph )
119−18:34 glyph |=
120−18:36 tight lit %$
121−19:1 NEWLINE
122−19:1 glyph ++
123−19:4 name dollar-ctor
124−19:16 glyph ^-
125−19:19 glyph $-(
126−19:22 tight aura @t
127−19:25 name dollar-head
128−19:36 tight glyph )
129−19:38 glyph |=
130−19:40 tight lit %$
131−20:1 NEWLINE
132−20:1 glyph ++
133−20:4 name unit-like-ctor
134−20:19 glyph ^-
135−20:22 glyph $-(
136−20:25 tight aura @t
137−20:28 name pair-null
138−20:37 tight glyph )
139−20:39 glyph |=
140−20:41 tight lit %$
141−21:1 NEWLINE
142−21:1 glyph ++
143−21:4 name wrong-payload
144−21:18 glyph ^-
145−21:21 glyph $-(
146−21:24 tight aura @p
147−21:27 name null-head
148−21:36 tight glyph )
149−21:38 glyph |=
150−21:40 tight lit %$
151−22:1 NEWLINE
152−22:1 glyph ++
153−22:4 name missing-tag
154−22:16 glyph ^-
155−22:19 glyph $-(
156−22:22 tight aura @t
157−22:25 name null-head
158−22:34 tight glyph )
159−22:36 glyph |=
160−22:38 tight lit %missing
161−23:1 NEWLINE
162−23:1 glyph ++
163−23:4 name pending
164−24:3 INDENT
165−24:3 glyph ~&
166−24:6 lit %unrelated
167−25:5 INDENT
168−25:5 glyph ^-
169−25:8 glyph $-(
170−25:11 tight aura @t
171−25:14 name null-head
172−25:23 tight glyph )
173−25:25 glyph |=
174−25:27 tight lit %$
175−25:29 DEDENT
176−25:29 DEDENT
177−25:29 NEWLINE
tests/golden/types-literal-constructor-nouns/tree.txtdeleted−78
@@ -1,78 +0,0 @@
1−(module
2− (mold 1:1 null-head
3− (cell 1:14
4− (const 1:15 ~)
5− (face 1:17 value (aura 1:23 @t))))
6− (mold 2:1 flag-head
7− (cell 2:14
8− (const 2:15 %.y)
9− (face 2:19 value (aura 2:25 @t))))
10− (mold 3:1 dollar-head
11− (cell 3:16
12− (const 3:17 %$)
13− (face 3:20 value (aura 3:26 @t))))
14− (mold 4:1 pair-null
15− (union 5:3
16− (const 5:3 ~)
17− (cell 6:3
18− (const 6:4 ~)
19− (face 6:6 value (aura 6:12 @t)))))
20− (mold 7:1 overlap-null
21− (union 8:3
22− (cell 8:3
23− (const 8:4 ~)
24− (face 8:6 value (aura 8:12 @t)))
25− (cell 9:3
26− (const 9:4 %$)
27− (face 9:7 value (aura 9:13 @t)))))
28− (mold 10:1 overlap-flag
29− (union 11:3
30− (cell 11:3
31− (const 11:4 %.y)
32− (face 11:8 value (aura 11:14 @t)))
33− (cell 12:3
34− (const 12:4 %$)
35− (face 12:7 value (aura 12:13 @t)))))
36− (mold 13:1 overlap-three
37− (union 14:3
38− (cell 14:3
39− (const 14:4 ~)
40− (face 14:6 value (aura 14:12 @t)))
41− (cell 15:3
42− (const 15:4 %.y)
43− (face 15:8 value (aura 15:14 @t)))
44− (cell 16:3
45− (const 16:4 %$)
46− (face 16:7 value (aura 16:13 @t)))))
47− (value 17:1 null-ctor
48− (cast 17:14
49− (fn 17:17 (aura 17:20 @t) (ref 17:23 null-head))
50− (ctor 17:34 %$)))
51− (value 18:1 flag-ctor
52− (cast 18:14
53− (fn 18:17 (aura 18:20 @t) (ref 18:23 flag-head))
54− (ctor 18:34 %$)))
55− (value 19:1 dollar-ctor
56− (cast 19:16
57− (fn 19:19 (aura 19:22 @t) (ref 19:25 dollar-head))
58− (ctor 19:38 %$)))
59− (value 20:1 unit-like-ctor
60− (cast 20:19
61− (fn 20:22 (aura 20:25 @t) (ref 20:28 pair-null))
62− (ctor 20:39 %$)))
63− (value 21:1 wrong-payload
64− (cast 21:18
65− (fn 21:21 (aura 21:24 @p) (ref 21:27 null-head))
66− (ctor 21:38 %$)))
67− (value 22:1 missing-tag
68− (cast 22:16
69− (fn 22:19 (aura 22:22 @t) (ref 22:25 null-head))
70− (ctor 22:36 %missing)))
71− (value 23:1 pending
72− (body 24:3
73− (trace 24:3
74− (lit 24:6 %unrelated)
75− (body 25:5
76− (cast 25:5
77− (fn 25:8 (aura 25:11 @t) (ref 25:14 null-head))
78− (ctor 25:25 %$)))))))
tests/golden/types-literal-constructor-nouns/types.txtdeleted−45
@@ -1,45 +0,0 @@
1−partial inference; module not checked
2−+$ null-head: not checked
3−+$ flag-head: not checked
4−+$ dollar-head: not checked
5−+$ pair-null: cases proven disjoint; mold not checked
6−+$ overlap-null: overlapping cases; mold not checked
7−/tests/golden/types-literal-constructor-nouns/source.jibb:8:3: first union case
8− [~ value=@t]
9− ^
10−/tests/golden/types-literal-constructor-nouns/source.jibb:9:3: overlapping case
11− [%$ value=@t]
12− ^
13−+$ overlap-flag: overlapping cases; mold not checked
14−/tests/golden/types-literal-constructor-nouns/source.jibb:11:3: first union case
15− [%.y value=@t]
16− ^
17−/tests/golden/types-literal-constructor-nouns/source.jibb:12:3: overlapping case
18− [%$ value=@t]
19− ^
20−+$ overlap-three: overlapping cases; mold not checked
21−/tests/golden/types-literal-constructor-nouns/source.jibb:14:3: first union case
22− [~ value=@t]
23− ^
24−/tests/golden/types-literal-constructor-nouns/source.jibb:15:3: overlapping case
25− [%.y value=@t]
26− ^
27−++ null-ctor: $-(@t [~ value=@t])
28−++ flag-ctor: $-(@t [%.y value=@t])
29−++ dollar-ctor: $-(@t [%$ value=@t])
30−++ unit-like-ctor: $-(@t pair-null)
31−++ wrong-payload: cast mold and expression type do not unify
32−/tests/golden/types-literal-constructor-nouns/source.jibb:21:21: cast mold has type $-(@p [~ value=@t])
33−++ wrong-payload ^- $-(@p null-head) |=%$
34− ^
35−/tests/golden/types-literal-constructor-nouns/source.jibb:21:38: expression
36−++ wrong-payload ^- $-(@p null-head) |=%$
37− ^
38−++ missing-tag: cast mold and expression type do not unify
39−/tests/golden/types-literal-constructor-nouns/source.jibb:22:19: cast mold has type $-(@t [~ value=@t])
40−++ missing-tag ^- $-(@t null-head) |=%missing
41− ^
42−/tests/golden/types-literal-constructor-nouns/source.jibb:22:36: expression
43−++ missing-tag ^- $-(@t null-head) |=%missing
44− ^
45−++ pending: tag needs context in partial inference
tests/golden/types-loobean-singleton-source/about.txtdeleted−2
@@ -1,2 +0,0 @@
1−source: literal equality uses runtime nouns while typed aura constraints remain directional.
2−tests: Loobean singleton molds and equal-noun terms, wrong singleton, ordinary loobean widening to ? and @, invalid widening to typed auras, and constructor matching a loobean-headed case. This is a partial inference report.
tests/golden/types-loobean-singleton-source/source.jibbdeleted−22
@@ -1,22 +0,0 @@
1−+$ yes %.y
2−+$ no %.n
3−+$ flag-headed [%.y value=@t]
4−++ yes-flag ^- yes %.y
5−++ yes-term ^- yes %$
6−++ wrong-flag ^- yes %.n
7−++ normal-flag ^- ? %.y
8−++ normal-any ^- @ %.y
9−++ wrong-tas ^- @tas %.y
10−++ wrong-ta ^- @ta %.y
11−++ wrong-ud ^- @ud %.y
12−++ named-value ^- yes %.y
13−++ named-as-flag ^- ? named-value
14−++ named-as-any ^- @ named-value
15−++ named-as-tas ^- @tas named-value
16−++ named-as-ta ^- @ta named-value
17−++ named-as-ud ^- @ud named-value
18−++ loobean-constructor ^- $-(@t flag-headed) |=%$
19−++ literal-f ^- @f %.y
20−++ flag-f |= b=? ^- @f b
21−++ named-f ^- @f named-value
22−++ explicit-tag ^- @tas (^- %$ %.y)
tests/golden/types-loobean-singleton-source/tokens.txtdeleted−143
@@ -1,143 +0,0 @@
1−1:1 glyph +$
2−1:4 name yes
3−1:8 lit %.y
4−2:1 NEWLINE
5−2:1 glyph +$
6−2:4 name no
7−2:7 lit %.n
8−3:1 NEWLINE
9−3:1 glyph +$
10−3:4 name flag-headed
11−3:16 glyph [
12−3:17 tight lit %.y
13−3:21 name value
14−3:26 tight glyph =
15−3:27 tight aura @t
16−3:29 tight glyph ]
17−4:1 NEWLINE
18−4:1 glyph ++
19−4:4 name yes-flag
20−4:13 glyph ^-
21−4:16 name yes
22−4:20 lit %.y
23−5:1 NEWLINE
24−5:1 glyph ++
25−5:4 name yes-term
26−5:13 glyph ^-
27−5:16 name yes
28−5:20 lit %$
29−6:1 NEWLINE
30−6:1 glyph ++
31−6:4 name wrong-flag
32−6:15 glyph ^-
33−6:18 name yes
34−6:22 lit %.n
35−7:1 NEWLINE
36−7:1 glyph ++
37−7:4 name normal-flag
38−7:16 glyph ^-
39−7:19 glyph ?
40−7:21 lit %.y
41−8:1 NEWLINE
42−8:1 glyph ++
43−8:4 name normal-any
44−8:15 glyph ^-
45−8:18 aura @
46−8:20 lit %.y
47−9:1 NEWLINE
48−9:1 glyph ++
49−9:4 name wrong-tas
50−9:14 glyph ^-
51−9:17 aura @tas
52−9:22 lit %.y
53−10:1 NEWLINE
54−10:1 glyph ++
55−10:4 name wrong-ta
56−10:13 glyph ^-
57−10:16 aura @ta
58−10:20 lit %.y
59−11:1 NEWLINE
60−11:1 glyph ++
61−11:4 name wrong-ud
62−11:13 glyph ^-
63−11:16 aura @ud
64−11:20 lit %.y
65−12:1 NEWLINE
66−12:1 glyph ++
67−12:4 name named-value
68−12:16 glyph ^-
69−12:19 name yes
70−12:23 lit %.y
71−13:1 NEWLINE
72−13:1 glyph ++
73−13:4 name named-as-flag
74−13:18 glyph ^-
75−13:21 glyph ?
76−13:23 name named-value
77−14:1 NEWLINE
78−14:1 glyph ++
79−14:4 name named-as-any
80−14:17 glyph ^-
81−14:20 aura @
82−14:22 name named-value
83−15:1 NEWLINE
84−15:1 glyph ++
85−15:4 name named-as-tas
86−15:17 glyph ^-
87−15:20 aura @tas
88−15:25 name named-value
89−16:1 NEWLINE
90−16:1 glyph ++
91−16:4 name named-as-ta
92−16:16 glyph ^-
93−16:19 aura @ta
94−16:23 name named-value
95−17:1 NEWLINE
96−17:1 glyph ++
97−17:4 name named-as-ud
98−17:16 glyph ^-
99−17:19 aura @ud
100−17:23 name named-value
101−18:1 NEWLINE
102−18:1 glyph ++
103−18:4 name loobean-constructor
104−18:24 glyph ^-
105−18:27 glyph $-(
106−18:30 tight aura @t
107−18:33 name flag-headed
108−18:44 tight glyph )
109−18:46 glyph |=
110−18:48 tight lit %$
111−19:1 NEWLINE
112−19:1 glyph ++
113−19:4 name literal-f
114−19:14 glyph ^-
115−19:17 aura @f
116−19:20 lit %.y
117−20:1 NEWLINE
118−20:1 glyph ++
119−20:4 name flag-f
120−20:11 glyph |=
121−20:14 name b
122−20:15 tight glyph =
123−20:16 tight glyph ?
124−20:18 glyph ^-
125−20:21 aura @f
126−20:24 name b
127−21:1 NEWLINE
128−21:1 glyph ++
129−21:4 name named-f
130−21:12 glyph ^-
131−21:15 aura @f
132−21:18 name named-value
133−22:1 NEWLINE
134−22:1 glyph ++
135−22:4 name explicit-tag
136−22:17 glyph ^-
137−22:20 aura @tas
138−22:25 glyph (
139−22:26 tight glyph ^-
140−22:29 lit %$
141−22:32 lit %.y
142−22:35 tight glyph )
143−22:36 NEWLINE
tests/golden/types-loobean-singleton-source/tree.txtdeleted−52
@@ -1,52 +0,0 @@
1−(module
2− (mold 1:1 yes (const 1:8 %.y))
3− (mold 2:1 no (const 2:7 %.n))
4− (mold 3:1 flag-headed
5− (cell 3:16
6− (const 3:17 %.y)
7− (face 3:21 value (aura 3:27 @t))))
8− (value 4:1 yes-flag
9− (cast 4:13 (ref 4:16 yes) (lit 4:20 %.y)))
10− (value 5:1 yes-term
11− (cast 5:13 (ref 5:16 yes) (lit 5:20 %$)))
12− (value 6:1 wrong-flag
13− (cast 6:15 (ref 6:18 yes) (lit 6:22 %.n)))
14− (value 7:1 normal-flag
15− (cast 7:16 (flag 7:19) (lit 7:21 %.y)))
16− (value 8:1 normal-any
17− (cast 8:15 (aura 8:18 @) (lit 8:20 %.y)))
18− (value 9:1 wrong-tas
19− (cast 9:14 (aura 9:17 @tas) (lit 9:22 %.y)))
20− (value 10:1 wrong-ta
21− (cast 10:13 (aura 10:16 @ta) (lit 10:20 %.y)))
22− (value 11:1 wrong-ud
23− (cast 11:13 (aura 11:16 @ud) (lit 11:20 %.y)))
24− (value 12:1 named-value
25− (cast 12:16 (ref 12:19 yes) (lit 12:23 %.y)))
26− (value 13:1 named-as-flag
27− (cast 13:18 (flag 13:21) (wing 13:23 named-value)))
28− (value 14:1 named-as-any
29− (cast 14:17 (aura 14:20 @) (wing 14:22 named-value)))
30− (value 15:1 named-as-tas
31− (cast 15:17 (aura 15:20 @tas) (wing 15:25 named-value)))
32− (value 16:1 named-as-ta
33− (cast 16:16 (aura 16:19 @ta) (wing 16:23 named-value)))
34− (value 17:1 named-as-ud
35− (cast 17:16 (aura 17:19 @ud) (wing 17:23 named-value)))
36− (value 18:1 loobean-constructor
37− (cast 18:24
38− (fn 18:27 (aura 18:30 @t) (ref 18:33 flag-headed))
39− (ctor 18:46 %$)))
40− (value 19:1 literal-f
41− (cast 19:14 (aura 19:17 @f) (lit 19:20 %.y)))
42− (value 20:1 flag-f
43− (gate 20:11
44− (face 20:14 b (flag 20:16))
45− (cast 20:18 (aura 20:21 @f) (wing 20:24 b))))
46− (value 21:1 named-f
47− (cast 21:12 (aura 21:15 @f) (wing 21:18 named-value)))
48− (value 22:1 explicit-tag
49− (cast 22:17
50− (aura 22:20 @tas)
51− (group 22:25
52− (cast 22:26 (const 22:29 %$) (lit 22:32 %.y))))))
tests/golden/types-loobean-singleton-source/types.txtdeleted−65
@@ -1,65 +0,0 @@
1−partial inference; module not checked
2−+$ yes: not checked
3−+$ no: not checked
4−+$ flag-headed: not checked
5−++ yes-flag: %.y
6−++ yes-term: %.y
7−++ wrong-flag: cast mold and expression type do not unify
8−/tests/golden/types-loobean-singleton-source/source.jibb:6:18: cast mold has type %.y
9−++ wrong-flag ^- yes %.n
10− ^
11−/tests/golden/types-loobean-singleton-source/source.jibb:6:22: expression has type %.n
12−++ wrong-flag ^- yes %.n
13− ^
14−++ normal-flag: ?
15−++ normal-any: @
16−++ wrong-tas: cast mold and expression type do not unify
17−/tests/golden/types-loobean-singleton-source/source.jibb:9:17: cast mold has type @tas
18−++ wrong-tas ^- @tas %.y
19− ^
20−/tests/golden/types-loobean-singleton-source/source.jibb:9:22: expression has type ?
21−++ wrong-tas ^- @tas %.y
22− ^
23−++ wrong-ta: cast mold and expression type do not unify
24−/tests/golden/types-loobean-singleton-source/source.jibb:10:16: cast mold has type @ta
25−++ wrong-ta ^- @ta %.y
26− ^
27−/tests/golden/types-loobean-singleton-source/source.jibb:10:20: expression has type ?
28−++ wrong-ta ^- @ta %.y
29− ^
30−++ wrong-ud: cast mold and expression type do not unify
31−/tests/golden/types-loobean-singleton-source/source.jibb:11:16: cast mold has type @ud
32−++ wrong-ud ^- @ud %.y
33− ^
34−/tests/golden/types-loobean-singleton-source/source.jibb:11:20: expression has type ?
35−++ wrong-ud ^- @ud %.y
36− ^
37−++ named-value: %.y
38−++ named-as-flag: ?
39−++ named-as-any: @
40−++ named-as-tas: cast mold and expression type do not unify
41−/tests/golden/types-loobean-singleton-source/source.jibb:15:20: cast mold has type @tas
42−++ named-as-tas ^- @tas named-value
43− ^
44−/tests/golden/types-loobean-singleton-source/source.jibb:15:25: expression has type %.y
45−++ named-as-tas ^- @tas named-value
46− ^
47−++ named-as-ta: cast mold and expression type do not unify
48−/tests/golden/types-loobean-singleton-source/source.jibb:16:19: cast mold has type @ta
49−++ named-as-ta ^- @ta named-value
50− ^
51−/tests/golden/types-loobean-singleton-source/source.jibb:16:23: expression has type %.y
52−++ named-as-ta ^- @ta named-value
53− ^
54−++ named-as-ud: cast mold and expression type do not unify
55−/tests/golden/types-loobean-singleton-source/source.jibb:17:19: cast mold has type @ud
56−++ named-as-ud ^- @ud named-value
57− ^
58−/tests/golden/types-loobean-singleton-source/source.jibb:17:23: expression has type %.y
59−++ named-as-ud ^- @ud named-value
60− ^
61−++ loobean-constructor: $-(@t [%.y value=@t])
62−++ literal-f: cast constraint is not supported by partial inference
63−++ flag-f: cast constraint is not supported by partial inference
64−++ named-f: cast constraint is not supported by partial inference
65−++ explicit-tag: @tas
tests/golden/types-loobean-union-context/about.txtdeleted−2
@@ -1,2 +0,0 @@
1−source: literal singleton cases compare by runtime noun.
2−tests: Null, term-zero and loobean singleton contexts across direct unions; unequal values, overlapping singleton cases, unknown targets and pending constraints.
tests/golden/types-loobean-union-context/source.jibbdeleted−28
@@ -1,28 +0,0 @@
1−+$ maybe
2− ~
3− [~ value=@t]
4−+$ term-zero
5− %$
6− [%some value=@t]
7−+$ flag-zero
8− %.y
9− [%some value=@t]
10−+$ repeated
11− ~
12− %.y
13−+$ number-one
14− %.n
15− [%some value=@t]
16−++ as-null ^- maybe %.y
17−++ bad-null ^- maybe %.n
18−++ null-as-term ^- term-zero ~
19−++ flag-as-term ^- term-zero %.y
20−++ term-as-flag ^- flag-zero %$
21−++ null-as-flag ^- flag-zero ~
22−++ yes-as-flag ^- flag-zero %.y
23−++ no-as-one ^- number-one %.n
24−++ no-as-zero ^- flag-zero %.n
25−++ pending
26− ~& %unrelated
27− ^- maybe %.y
28−++ unknown |= x=A ^- A %.y
tests/golden/types-loobean-union-context/tokens.txtdeleted−136
@@ -1,136 +0,0 @@
1−1:1 glyph +$
2−1:4 name maybe
3−2:3 INDENT
4−2:3 lit ~
5−3:3 NEWLINE
6−3:3 glyph [
7−3:4 tight lit ~
8−3:6 name value
9−3:11 tight glyph =
10−3:12 tight aura @t
11−3:14 tight glyph ]
12−4:1 DEDENT
13−4:1 NEWLINE
14−4:1 glyph +$
15−4:4 name term-zero
16−5:3 INDENT
17−5:3 lit %$
18−6:3 NEWLINE
19−6:3 glyph [
20−6:4 tight lit %some
21−6:10 name value
22−6:15 tight glyph =
23−6:16 tight aura @t
24−6:18 tight glyph ]
25−7:1 DEDENT
26−7:1 NEWLINE
27−7:1 glyph +$
28−7:4 name flag-zero
29−8:3 INDENT
30−8:3 lit %.y
31−9:3 NEWLINE
32−9:3 glyph [
33−9:4 tight lit %some
34−9:10 name value
35−9:15 tight glyph =
36−9:16 tight aura @t
37−9:18 tight glyph ]
38−10:1 DEDENT
39−10:1 NEWLINE
40−10:1 glyph +$
41−10:4 name repeated
42−11:3 INDENT
43−11:3 lit ~
44−12:3 NEWLINE
45−12:3 lit %.y
46−13:1 DEDENT
47−13:1 NEWLINE
48−13:1 glyph +$
49−13:4 name number-one
50−14:3 INDENT
51−14:3 lit %.n
52−15:3 NEWLINE
53−15:3 glyph [
54−15:4 tight lit %some
55−15:10 name value
56−15:15 tight glyph =
57−15:16 tight aura @t
58−15:18 tight glyph ]
59−16:1 DEDENT
60−16:1 NEWLINE
61−16:1 glyph ++
62−16:4 name as-null
63−16:12 glyph ^-
64−16:15 name maybe
65−16:21 lit %.y
66−17:1 NEWLINE
67−17:1 glyph ++
68−17:4 name bad-null
69−17:13 glyph ^-
70−17:16 name maybe
71−17:22 lit %.n
72−18:1 NEWLINE
73−18:1 glyph ++
74−18:4 name null-as-term
75−18:17 glyph ^-
76−18:20 name term-zero
77−18:30 lit ~
78−19:1 NEWLINE
79−19:1 glyph ++
80−19:4 name flag-as-term
81−19:17 glyph ^-
82−19:20 name term-zero
83−19:30 lit %.y
84−20:1 NEWLINE
85−20:1 glyph ++
86−20:4 name term-as-flag
87−20:17 glyph ^-
88−20:20 name flag-zero
89−20:30 lit %$
90−21:1 NEWLINE
91−21:1 glyph ++
92−21:4 name null-as-flag
93−21:17 glyph ^-
94−21:20 name flag-zero
95−21:30 lit ~
96−22:1 NEWLINE
97−22:1 glyph ++
98−22:4 name yes-as-flag
99−22:16 glyph ^-
100−22:19 name flag-zero
101−22:29 lit %.y
102−23:1 NEWLINE
103−23:1 glyph ++
104−23:4 name no-as-one
105−23:14 glyph ^-
106−23:17 name number-one
107−23:28 lit %.n
108−24:1 NEWLINE
109−24:1 glyph ++
110−24:4 name no-as-zero
111−24:15 glyph ^-
112−24:18 name flag-zero
113−24:28 lit %.n
114−25:1 NEWLINE
115−25:1 glyph ++
116−25:4 name pending
117−26:3 INDENT
118−26:3 glyph ~&
119−26:6 lit %unrelated
120−27:5 INDENT
121−27:5 glyph ^-
122−27:8 name maybe
123−27:14 lit %.y
124−28:1 DEDENT
125−28:1 DEDENT
126−28:1 NEWLINE
127−28:1 glyph ++
128−28:4 name unknown
129−28:12 glyph |=
130−28:15 name x
131−28:16 tight glyph =
132−28:17 tight tvar A
133−28:19 glyph ^-
134−28:22 tvar A
135−28:24 lit %.y
136−28:27 NEWLINE
tests/golden/types-loobean-union-context/tree.txtdeleted−55
@@ -1,55 +0,0 @@
1−(module
2− (mold 1:1 maybe
3− (union 2:3
4− (const 2:3 ~)
5− (cell 3:3
6− (const 3:4 ~)
7− (face 3:6 value (aura 3:12 @t)))))
8− (mold 4:1 term-zero
9− (union 5:3
10− (const 5:3 %$)
11− (cell 6:3
12− (const 6:4 %some)
13− (face 6:10 value (aura 6:16 @t)))))
14− (mold 7:1 flag-zero
15− (union 8:3
16− (const 8:3 %.y)
17− (cell 9:3
18− (const 9:4 %some)
19− (face 9:10 value (aura 9:16 @t)))))
20− (mold 10:1 repeated
21− (union 11:3 (const 11:3 ~) (const 12:3 %.y)))
22− (mold 13:1 number-one
23− (union 14:3
24− (const 14:3 %.n)
25− (cell 15:3
26− (const 15:4 %some)
27− (face 15:10 value (aura 15:16 @t)))))
28− (value 16:1 as-null
29− (cast 16:12 (ref 16:15 maybe) (lit 16:21 %.y)))
30− (value 17:1 bad-null
31− (cast 17:13 (ref 17:16 maybe) (lit 17:22 %.n)))
32− (value 18:1 null-as-term
33− (cast 18:17 (ref 18:20 term-zero) (lit 18:30 ~)))
34− (value 19:1 flag-as-term
35− (cast 19:17 (ref 19:20 term-zero) (lit 19:30 %.y)))
36− (value 20:1 term-as-flag
37− (cast 20:17 (ref 20:20 flag-zero) (lit 20:30 %$)))
38− (value 21:1 null-as-flag
39− (cast 21:17 (ref 21:20 flag-zero) (lit 21:30 ~)))
40− (value 22:1 yes-as-flag
41− (cast 22:16 (ref 22:19 flag-zero) (lit 22:29 %.y)))
42− (value 23:1 no-as-one
43− (cast 23:14 (ref 23:17 number-one) (lit 23:28 %.n)))
44− (value 24:1 no-as-zero
45− (cast 24:15 (ref 24:18 flag-zero) (lit 24:28 %.n)))
46− (value 25:1 pending
47− (body 26:3
48− (trace 26:3
49− (lit 26:6 %unrelated)
50− (body 27:5
51− (cast 27:5 (ref 27:8 maybe) (lit 27:14 %.y))))))
52− (value 28:1 unknown
53− (gate 28:12
54− (face 28:15 x (tvar 28:17 A))
55− (cast 28:19 (tvar 28:22 A) (lit 28:24 %.y)))))
tests/golden/types-loobean-union-context/types.txtdeleted−35
@@ -1,35 +0,0 @@
1−partial inference; module not checked
2−+$ maybe: cases proven disjoint; mold not checked
3−+$ term-zero: cases proven disjoint; mold not checked
4−+$ flag-zero: cases proven disjoint; mold not checked
5−+$ repeated: overlapping cases; mold not checked
6−/tests/golden/types-loobean-union-context/source.jibb:11:3: first union case
7− ~
8− ^
9−/tests/golden/types-loobean-union-context/source.jibb:12:3: overlapping case
10− %.y
11− ^
12−+$ number-one: cases proven disjoint; mold not checked
13−++ as-null: maybe
14−++ bad-null: cast mold and expression type do not unify
15−/tests/golden/types-loobean-union-context/source.jibb:17:16: cast mold
16−++ bad-null ^- maybe %.n
17− ^
18−/tests/golden/types-loobean-union-context/source.jibb:17:22: expression has type ?
19−++ bad-null ^- maybe %.n
20− ^
21−++ null-as-term: term-zero
22−++ flag-as-term: term-zero
23−++ term-as-flag: flag-zero
24−++ null-as-flag: flag-zero
25−++ yes-as-flag: flag-zero
26−++ no-as-one: number-one
27−++ no-as-zero: cast mold and expression type do not unify
28−/tests/golden/types-loobean-union-context/source.jibb:24:18: cast mold
29−++ no-as-zero ^- flag-zero %.n
30− ^
31−/tests/golden/types-loobean-union-context/source.jibb:24:28: expression has type ?
32−++ no-as-zero ^- flag-zero %.n
33− ^
34−++ pending: tag needs context in partial inference
35−++ unknown: explicit capital constraints are not supported by partial inference
tests/golden/types-nested-noun-context/about.txtdeleted−4
@@ -1,4 +0,0 @@
1−source: Grammar, Tag resolution: "It works for cases whose head is a literal with the same noun as the tag, regardless of how that literal is written"; `|=%$` also constructs a case headed by `%.y` or `~`.
2−tests: Null, loobean-zero and term-zero input/head combinations with nested generic payloads; missing, mismatched, ambiguous and unknown contexts remain conservative.
3−expect: parses
4−expect-types: a partial inference report
tests/golden/types-nested-noun-context/source.jibbdeleted−35
@@ -1,35 +0,0 @@
1−+$ msg
2− %ready
3− %idle
4−+$ inner |$ [A]
5− [%one item=A]
6− [%two item=A]
7−+$ null-out |$ [A]
8− [~ item=(inner A)]
9− [%other value=@ud]
10−+$ flag-out |$ [A]
11− [%.y item=(inner A)]
12− [%other value=@ud]
13−+$ term-out |$ [A]
14− [%$ item=(inner A)]
15− [%other value=@ud]
16−+$ competitors |$ [A]
17− [~ item=(inner A)]
18− [%.y value=@p]
19−++ inner |= x=A ^- (inner A) [%one x]
20−++ null-null ^- (null-out msg) [~ (inner %ready)]
21−++ flag-null ^- (null-out msg) [%.y (inner %ready)]
22−++ term-null ^- (null-out msg) [%$ (inner %ready)]
23−++ null-flag ^- (flag-out msg) [~ (inner %ready)]
24−++ flag-flag ^- (flag-out msg) [%.y (inner %ready)]
25−++ term-flag ^- (flag-out msg) [%$ (inner %ready)]
26−++ null-term ^- (term-out msg) [~ (inner %ready)]
27−++ flag-term ^- (term-out msg) [%.y (inner %ready)]
28−++ term-term ^- (term-out msg) [%$ (inner %ready)]
29−++ wrong-inner ^- (null-out msg) [%$ (inner %missing)]
30−++ wrong-payload ^- (flag-out @t) [~ (inner ~zod)]
31−++ pending
32− ~& %orphan
33− ^- (term-out msg) [%.y (inner %ready)]
34−++ unknown-target |= x=A ^- A [~ (inner %ready)]
35−++ ambiguous ^- (competitors msg) [~ (inner %ready)]
tests/golden/types-nested-noun-context/tokens.txtdeleted−363
@@ -1,363 +0,0 @@
1−1:1 glyph +$
2−1:4 name msg
3−2:3 INDENT
4−2:3 lit %ready
5−3:3 NEWLINE
6−3:3 lit %idle
7−4:1 DEDENT
8−4:1 NEWLINE
9−4:1 glyph +$
10−4:4 name inner
11−4:10 glyph |$
12−4:13 glyph [
13−4:14 tight tvar A
14−4:15 tight glyph ]
15−5:3 INDENT
16−5:3 glyph [
17−5:4 tight lit %one
18−5:9 name item
19−5:13 tight glyph =
20−5:14 tight tvar A
21−5:15 tight glyph ]
22−6:3 NEWLINE
23−6:3 glyph [
24−6:4 tight lit %two
25−6:9 name item
26−6:13 tight glyph =
27−6:14 tight tvar A
28−6:15 tight glyph ]
29−7:1 DEDENT
30−7:1 NEWLINE
31−7:1 glyph +$
32−7:4 name null-out
33−7:13 glyph |$
34−7:16 glyph [
35−7:17 tight tvar A
36−7:18 tight glyph ]
37−8:3 INDENT
38−8:3 glyph [
39−8:4 tight lit ~
40−8:6 name item
41−8:10 tight glyph =
42−8:11 tight glyph (
43−8:12 tight name inner
44−8:18 tvar A
45−8:19 tight glyph )
46−8:20 tight glyph ]
47−9:3 NEWLINE
48−9:3 glyph [
49−9:4 tight lit %other
50−9:11 name value
51−9:16 tight glyph =
52−9:17 tight aura @ud
53−9:20 tight glyph ]
54−10:1 DEDENT
55−10:1 NEWLINE
56−10:1 glyph +$
57−10:4 name flag-out
58−10:13 glyph |$
59−10:16 glyph [
60−10:17 tight tvar A
61−10:18 tight glyph ]
62−11:3 INDENT
63−11:3 glyph [
64−11:4 tight lit %.y
65−11:8 name item
66−11:12 tight glyph =
67−11:13 tight glyph (
68−11:14 tight name inner
69−11:20 tvar A
70−11:21 tight glyph )
71−11:22 tight glyph ]
72−12:3 NEWLINE
73−12:3 glyph [
74−12:4 tight lit %other
75−12:11 name value
76−12:16 tight glyph =
77−12:17 tight aura @ud
78−12:20 tight glyph ]
79−13:1 DEDENT
80−13:1 NEWLINE
81−13:1 glyph +$
82−13:4 name term-out
83−13:13 glyph |$
84−13:16 glyph [
85−13:17 tight tvar A
86−13:18 tight glyph ]
87−14:3 INDENT
88−14:3 glyph [
89−14:4 tight lit %$
90−14:7 name item
91−14:11 tight glyph =
92−14:12 tight glyph (
93−14:13 tight name inner
94−14:19 tvar A
95−14:20 tight glyph )
96−14:21 tight glyph ]
97−15:3 NEWLINE
98−15:3 glyph [
99−15:4 tight lit %other
100−15:11 name value
101−15:16 tight glyph =
102−15:17 tight aura @ud
103−15:20 tight glyph ]
104−16:1 DEDENT
105−16:1 NEWLINE
106−16:1 glyph +$
107−16:4 name competitors
108−16:16 glyph |$
109−16:19 glyph [
110−16:20 tight tvar A
111−16:21 tight glyph ]
112−17:3 INDENT
113−17:3 glyph [
114−17:4 tight lit ~
115−17:6 name item
116−17:10 tight glyph =
117−17:11 tight glyph (
118−17:12 tight name inner
119−17:18 tvar A
120−17:19 tight glyph )
121−17:20 tight glyph ]
122−18:3 NEWLINE
123−18:3 glyph [
124−18:4 tight lit %.y
125−18:8 name value
126−18:13 tight glyph =
127−18:14 tight aura @p
128−18:16 tight glyph ]
129−19:1 DEDENT
130−19:1 NEWLINE
131−19:1 glyph ++
132−19:4 name inner
133−19:10 glyph |=
134−19:13 name x
135−19:14 tight glyph =
136−19:15 tight tvar A
137−19:17 glyph ^-
138−19:20 glyph (
139−19:21 tight name inner
140−19:27 tvar A
141−19:28 tight glyph )
142−19:30 glyph [
143−19:31 tight lit %one
144−19:36 name x
145−19:37 tight glyph ]
146−20:1 NEWLINE
147−20:1 glyph ++
148−20:4 name null-null
149−20:14 glyph ^-
150−20:17 glyph (
151−20:18 tight name null-out
152−20:27 name msg
153−20:30 tight glyph )
154−20:32 glyph [
155−20:33 tight lit ~
156−20:35 glyph (
157−20:36 tight name inner
158−20:42 lit %ready
159−20:48 tight glyph )
160−20:49 tight glyph ]
161−21:1 NEWLINE
162−21:1 glyph ++
163−21:4 name flag-null
164−21:14 glyph ^-
165−21:17 glyph (
166−21:18 tight name null-out
167−21:27 name msg
168−21:30 tight glyph )
169−21:32 glyph [
170−21:33 tight lit %.y
171−21:37 glyph (
172−21:38 tight name inner
173−21:44 lit %ready
174−21:50 tight glyph )
175−21:51 tight glyph ]
176−22:1 NEWLINE
177−22:1 glyph ++
178−22:4 name term-null
179−22:14 glyph ^-
180−22:17 glyph (
181−22:18 tight name null-out
182−22:27 name msg
183−22:30 tight glyph )
184−22:32 glyph [
185−22:33 tight lit %$
186−22:36 glyph (
187−22:37 tight name inner
188−22:43 lit %ready
189−22:49 tight glyph )
190−22:50 tight glyph ]
191−23:1 NEWLINE
192−23:1 glyph ++
193−23:4 name null-flag
194−23:14 glyph ^-
195−23:17 glyph (
196−23:18 tight name flag-out
197−23:27 name msg
198−23:30 tight glyph )
199−23:32 glyph [
200−23:33 tight lit ~
201−23:35 glyph (
202−23:36 tight name inner
203−23:42 lit %ready
204−23:48 tight glyph )
205−23:49 tight glyph ]
206−24:1 NEWLINE
207−24:1 glyph ++
208−24:4 name flag-flag
209−24:14 glyph ^-
210−24:17 glyph (
211−24:18 tight name flag-out
212−24:27 name msg
213−24:30 tight glyph )
214−24:32 glyph [
215−24:33 tight lit %.y
216−24:37 glyph (
217−24:38 tight name inner
218−24:44 lit %ready
219−24:50 tight glyph )
220−24:51 tight glyph ]
221−25:1 NEWLINE
222−25:1 glyph ++
223−25:4 name term-flag
224−25:14 glyph ^-
225−25:17 glyph (
226−25:18 tight name flag-out
227−25:27 name msg
228−25:30 tight glyph )
229−25:32 glyph [
230−25:33 tight lit %$
231−25:36 glyph (
232−25:37 tight name inner
233−25:43 lit %ready
234−25:49 tight glyph )
235−25:50 tight glyph ]
236−26:1 NEWLINE
237−26:1 glyph ++
238−26:4 name null-term
239−26:14 glyph ^-
240−26:17 glyph (
241−26:18 tight name term-out
242−26:27 name msg
243−26:30 tight glyph )
244−26:32 glyph [
245−26:33 tight lit ~
246−26:35 glyph (
247−26:36 tight name inner
248−26:42 lit %ready
249−26:48 tight glyph )
250−26:49 tight glyph ]
251−27:1 NEWLINE
252−27:1 glyph ++
253−27:4 name flag-term
254−27:14 glyph ^-
255−27:17 glyph (
256−27:18 tight name term-out
257−27:27 name msg
258−27:30 tight glyph )
259−27:32 glyph [
260−27:33 tight lit %.y
261−27:37 glyph (
262−27:38 tight name inner
263−27:44 lit %ready
264−27:50 tight glyph )
265−27:51 tight glyph ]
266−28:1 NEWLINE
267−28:1 glyph ++
268−28:4 name term-term
269−28:14 glyph ^-
270−28:17 glyph (
271−28:18 tight name term-out
272−28:27 name msg
273−28:30 tight glyph )
274−28:32 glyph [
275−28:33 tight lit %$
276−28:36 glyph (
277−28:37 tight name inner
278−28:43 lit %ready
279−28:49 tight glyph )
280−28:50 tight glyph ]
281−29:1 NEWLINE
282−29:1 glyph ++
283−29:4 name wrong-inner
284−29:16 glyph ^-
285−29:19 glyph (
286−29:20 tight name null-out
287−29:29 name msg
288−29:32 tight glyph )
289−29:34 glyph [
290−29:35 tight lit %$
291−29:38 glyph (
292−29:39 tight name inner
293−29:45 lit %missing
294−29:53 tight glyph )
295−29:54 tight glyph ]
296−30:1 NEWLINE
297−30:1 glyph ++
298−30:4 name wrong-payload
299−30:18 glyph ^-
300−30:21 glyph (
301−30:22 tight name flag-out
302−30:31 aura @t
303−30:33 tight glyph )
304−30:35 glyph [
305−30:36 tight lit ~
306−30:38 glyph (
307−30:39 tight name inner
308−30:45 lit ~zod
309−30:49 tight glyph )
310−30:50 tight glyph ]
311−31:1 NEWLINE
312−31:1 glyph ++
313−31:4 name pending
314−32:3 INDENT
315−32:3 glyph ~&
316−32:6 lit %orphan
317−33:5 INDENT
318−33:5 glyph ^-
319−33:8 glyph (
320−33:9 tight name term-out
321−33:18 name msg
322−33:21 tight glyph )
323−33:23 glyph [
324−33:24 tight lit %.y
325−33:28 glyph (
326−33:29 tight name inner
327−33:35 lit %ready
328−33:41 tight glyph )
329−33:42 tight glyph ]
330−34:1 DEDENT
331−34:1 DEDENT
332−34:1 NEWLINE
333−34:1 glyph ++
334−34:4 name unknown-target
335−34:19 glyph |=
336−34:22 name x
337−34:23 tight glyph =
338−34:24 tight tvar A
339−34:26 glyph ^-
340−34:29 tvar A
341−34:31 glyph [
342−34:32 tight lit ~
343−34:34 glyph (
344−34:35 tight name inner
345−34:41 lit %ready
346−34:47 tight glyph )
347−34:48 tight glyph ]
348−35:1 NEWLINE
349−35:1 glyph ++
350−35:4 name ambiguous
351−35:14 glyph ^-
352−35:17 glyph (
353−35:18 tight name competitors
354−35:30 name msg
355−35:33 tight glyph )
356−35:35 glyph [
357−35:36 tight lit ~
358−35:38 glyph (
359−35:39 tight name inner
360−35:45 lit %ready
361−35:51 tight glyph )
362−35:52 tight glyph ]
363−35:53 NEWLINE
tests/golden/types-nested-noun-context/tree.txtdeleted−162
@@ -1,162 +0,0 @@
1−(module
2− (mold 1:1 msg
3− (union 2:3 (const 2:3 %ready) (const 3:3 %idle)))
4− (mold 4:1 inner
5− (generic 4:10 A
6− (union 5:3
7− (cell 5:3
8− (const 5:4 %one)
9− (face 5:9 item (tvar 5:14 A)))
10− (cell 6:3
11− (const 6:4 %two)
12− (face 6:9 item (tvar 6:14 A))))))
13− (mold 7:1 null-out
14− (generic 7:13 A
15− (union 8:3
16− (cell 8:3
17− (const 8:4 ~)
18− (face 8:6 item
19− (apply 8:11 inner (tvar 8:18 A))))
20− (cell 9:3
21− (const 9:4 %other)
22− (face 9:11 value (aura 9:17 @ud))))))
23− (mold 10:1 flag-out
24− (generic 10:13 A
25− (union 11:3
26− (cell 11:3
27− (const 11:4 %.y)
28− (face 11:8 item
29− (apply 11:13 inner (tvar 11:20 A))))
30− (cell 12:3
31− (const 12:4 %other)
32− (face 12:11 value (aura 12:17 @ud))))))
33− (mold 13:1 term-out
34− (generic 13:13 A
35− (union 14:3
36− (cell 14:3
37− (const 14:4 %$)
38− (face 14:7 item
39− (apply 14:12 inner (tvar 14:19 A))))
40− (cell 15:3
41− (const 15:4 %other)
42− (face 15:11 value (aura 15:17 @ud))))))
43− (mold 16:1 competitors
44− (generic 16:16 A
45− (union 17:3
46− (cell 17:3
47− (const 17:4 ~)
48− (face 17:6 item
49− (apply 17:11 inner (tvar 17:18 A))))
50− (cell 18:3
51− (const 18:4 %.y)
52− (face 18:8 value (aura 18:14 @p))))))
53− (value 19:1 inner
54− (gate 19:10
55− (face 19:13 x (tvar 19:15 A))
56− (cast 19:17
57− (apply 19:20 inner (tvar 19:27 A))
58− (tuple 19:30 (lit 19:31 %one) (wing 19:36 x)))))
59− (value 20:1 null-null
60− (cast 20:14
61− (apply 20:17 null-out (ref 20:27 msg))
62− (tuple 20:32
63− (lit 20:33 ~)
64− (group 20:35
65− (call 20:36 (wing 20:36 inner) (lit 20:42 %ready))))))
66− (value 21:1 flag-null
67− (cast 21:14
68− (apply 21:17 null-out (ref 21:27 msg))
69− (tuple 21:32
70− (lit 21:33 %.y)
71− (group 21:37
72− (call 21:38 (wing 21:38 inner) (lit 21:44 %ready))))))
73− (value 22:1 term-null
74− (cast 22:14
75− (apply 22:17 null-out (ref 22:27 msg))
76− (tuple 22:32
77− (lit 22:33 %$)
78− (group 22:36
79− (call 22:37 (wing 22:37 inner) (lit 22:43 %ready))))))
80− (value 23:1 null-flag
81− (cast 23:14
82− (apply 23:17 flag-out (ref 23:27 msg))
83− (tuple 23:32
84− (lit 23:33 ~)
85− (group 23:35
86− (call 23:36 (wing 23:36 inner) (lit 23:42 %ready))))))
87− (value 24:1 flag-flag
88− (cast 24:14
89− (apply 24:17 flag-out (ref 24:27 msg))
90− (tuple 24:32
91− (lit 24:33 %.y)
92− (group 24:37
93− (call 24:38 (wing 24:38 inner) (lit 24:44 %ready))))))
94− (value 25:1 term-flag
95− (cast 25:14
96− (apply 25:17 flag-out (ref 25:27 msg))
97− (tuple 25:32
98− (lit 25:33 %$)
99− (group 25:36
100− (call 25:37 (wing 25:37 inner) (lit 25:43 %ready))))))
101− (value 26:1 null-term
102− (cast 26:14
103− (apply 26:17 term-out (ref 26:27 msg))
104− (tuple 26:32
105− (lit 26:33 ~)
106− (group 26:35
107− (call 26:36 (wing 26:36 inner) (lit 26:42 %ready))))))
108− (value 27:1 flag-term
109− (cast 27:14
110− (apply 27:17 term-out (ref 27:27 msg))
111− (tuple 27:32
112− (lit 27:33 %.y)
113− (group 27:37
114− (call 27:38 (wing 27:38 inner) (lit 27:44 %ready))))))
115− (value 28:1 term-term
116− (cast 28:14
117− (apply 28:17 term-out (ref 28:27 msg))
118− (tuple 28:32
119− (lit 28:33 %$)
120− (group 28:36
121− (call 28:37 (wing 28:37 inner) (lit 28:43 %ready))))))
122− (value 29:1 wrong-inner
123− (cast 29:16
124− (apply 29:19 null-out (ref 29:29 msg))
125− (tuple 29:34
126− (lit 29:35 %$)
127− (group 29:38
128− (call 29:39 (wing 29:39 inner) (lit 29:45 %missing))))))
129− (value 30:1 wrong-payload
130− (cast 30:18
131− (apply 30:21 flag-out (aura 30:31 @t))
132− (tuple 30:35
133− (lit 30:36 ~)
134− (group 30:38
135− (call 30:39 (wing 30:39 inner) (lit 30:45 ~zod))))))
136− (value 31:1 pending
137− (body 32:3
138− (trace 32:3
139− (lit 32:6 %orphan)
140− (body 33:5
141− (cast 33:5
142− (apply 33:8 term-out (ref 33:18 msg))
143− (tuple 33:23
144− (lit 33:24 %.y)
145− (group 33:28
146− (call 33:29 (wing 33:29 inner) (lit 33:35 %ready)))))))))
147− (value 34:1 unknown-target
148− (gate 34:19
149− (face 34:22 x (tvar 34:24 A))
150− (cast 34:26
151− (tvar 34:29 A)
152− (tuple 34:31
153− (lit 34:32 ~)
154− (group 34:34
155− (call 34:35 (wing 34:35 inner) (lit 34:41 %ready)))))))
156− (value 35:1 ambiguous
157− (cast 35:14
158− (apply 35:17 competitors (ref 35:30 msg))
159− (tuple 35:35
160− (lit 35:36 ~)
161− (group 35:38
162− (call 35:39 (wing 35:39 inner) (lit 35:45 %ready)))))))
tests/golden/types-nested-noun-context/types.txtdeleted−34
@@ -1,34 +0,0 @@
1−partial inference; module not checked
2−+$ msg: cases proven disjoint; mold not checked
3−+$ inner: cases proven disjoint; mold not checked
4−+$ null-out: cases proven disjoint; mold not checked
5−+$ flag-out: cases proven disjoint; mold not checked
6−+$ term-out: cases proven disjoint; mold not checked
7−+$ competitors: case disjointness unresolved; mold not checked
8−++ inner: $-(A (inner A))
9−++ null-null: (null-out msg)
10−++ flag-null: (null-out msg)
11−++ term-null: (null-out msg)
12−++ null-flag: (flag-out msg)
13−++ flag-flag: (flag-out msg)
14−++ term-flag: (flag-out msg)
15−++ null-term: (term-out msg)
16−++ flag-term: (term-out msg)
17−++ term-term: (term-out msg)
18−++ wrong-inner: msg has no case `%missing`
19−/tests/golden/types-nested-noun-context/source.jibb:29:39: expected union
20−++ wrong-inner ^- (null-out msg) [%$ (inner %missing)]
21− ^
22−/tests/golden/types-nested-noun-context/source.jibb:29:45: tag
23−++ wrong-inner ^- (null-out msg) [%$ (inner %missing)]
24− ^
25−++ wrong-payload: call's sample and argument types do not unify
26−/tests/golden/types-nested-noun-context/source.jibb:30:39: called gate
27−++ wrong-payload ^- (flag-out @t) [~ (inner ~zod)]
28− ^
29−/tests/golden/types-nested-noun-context/source.jibb:30:45: argument has type @p
30−++ wrong-payload ^- (flag-out @t) [~ (inner ~zod)]
31− ^
32−++ pending: tag needs context in partial inference
33−++ unknown-target: explicit capital constraints are not supported by partial inference
34−++ ambiguous: cast mold is not supported by partial inference
tests/golden/types-nested-shallow-preserve/about.txtdeleted−4
@@ -1,4 +0,0 @@
1−source: Grammar, Literals by context: "Number and cell literals resolve like tags: each waits for its context"; Literals: `gap+%s2` is `[%gap %s2]`.
2−tests: Previously supported nested pair and direct-cell contexts stay inferred through lists and calls; calls, groups, casts and constructors preserve errors and pending constraints. Unknown targets fail closed.
3−expect: parses
4−expect-types: a partial inference report
tests/golden/types-nested-shallow-preserve/modules.txtdeleted−1
@@ -1 +0,0 @@
1−# Use the source-backed prelude.
tests/golden/types-nested-shallow-preserve/source.jibbdeleted−30
@@ -1,30 +0,0 @@
1−+$ extent
2− [%fill n=@ud]
3− %shrink
4−+$ attribute
5− [%width extent]
6− [%gap @tas]
7−++ number-id |= x=@ud x
8−++ plain ^- attribute width+[%fill 1]
9−++ direct ^- attribute [%width [%fill 1]]
10−++ list ^- (list attribute) ~[width+[%fill 1]]
11−++ accept |= value=attribute value
12−++ call (accept width+[%fill 1])
13−++ simple-call ^- attribute width+[%fill (number-id 1)]
14−++ grouped-call ^- attribute width+[%fill ((number-id 1))]
15−++ cast-call ^- attribute width+[%fill (^- @ud (number-id 1))]
16−++ nested-call ^- attribute width+[%fill (number-id (number-id 1))]
17−++ bad-tag ^- attribute width+[%missing 1]
18−++ bad-number ^- attribute width+[%fill "bad"]
19−++ pending
20− ~& %unrelated
21− ^- attribute width+[%fill (number-id 1)]
22−++ singleton ^- attribute width+%shrink
23−+$ event
24− [%got value=@t]
25− %idle
26−+$ envelope
27− [%handler callback=$-(@t event)]
28− [%empty value=@ud]
29−++ constructor ^- envelope [%handler |=%got]
30−++ unknown-target |= x=A ^- A width+[%fill (number-id 1)]
tests/golden/types-nested-shallow-preserve/tokens.txtdeleted−271
@@ -1,271 +0,0 @@
1−1:1 glyph +$
2−1:4 name extent
3−2:3 INDENT
4−2:3 glyph [
5−2:4 tight lit %fill
6−2:10 name n
7−2:11 tight glyph =
8−2:12 tight aura @ud
9−2:15 tight glyph ]
10−3:3 NEWLINE
11−3:3 lit %shrink
12−4:1 DEDENT
13−4:1 NEWLINE
14−4:1 glyph +$
15−4:4 name attribute
16−5:3 INDENT
17−5:3 glyph [
18−5:4 tight lit %width
19−5:11 name extent
20−5:17 tight glyph ]
21−6:3 NEWLINE
22−6:3 glyph [
23−6:4 tight lit %gap
24−6:9 aura @tas
25−6:13 tight glyph ]
26−7:1 DEDENT
27−7:1 NEWLINE
28−7:1 glyph ++
29−7:4 name number-id
30−7:14 glyph |=
31−7:17 name x
32−7:18 tight glyph =
33−7:19 tight aura @ud
34−7:23 name x
35−8:1 NEWLINE
36−8:1 glyph ++
37−8:4 name plain
38−8:10 glyph ^-
39−8:13 name attribute
40−8:23 name width
41−8:28 tight glyph +
42−8:29 tight glyph [
43−8:30 tight lit %fill
44−8:36 lit 1
45−8:37 tight glyph ]
46−9:1 NEWLINE
47−9:1 glyph ++
48−9:4 name direct
49−9:11 glyph ^-
50−9:14 name attribute
51−9:24 glyph [
52−9:25 tight lit %width
53−9:32 glyph [
54−9:33 tight lit %fill
55−9:39 lit 1
56−9:40 tight glyph ]
57−9:41 tight glyph ]
58−10:1 NEWLINE
59−10:1 glyph ++
60−10:4 name list
61−10:9 glyph ^-
62−10:12 glyph (
63−10:13 tight name list
64−10:18 name attribute
65−10:27 tight glyph )
66−10:29 glyph ~[
67−10:31 tight name width
68−10:36 tight glyph +
69−10:37 tight glyph [
70−10:38 tight lit %fill
71−10:44 lit 1
72−10:45 tight glyph ]
73−10:46 tight glyph ]
74−11:1 NEWLINE
75−11:1 glyph ++
76−11:4 name accept
77−11:11 glyph |=
78−11:14 name value
79−11:19 tight glyph =
80−11:20 tight name attribute
81−11:30 name value
82−12:1 NEWLINE
83−12:1 glyph ++
84−12:4 name call
85−12:9 glyph (
86−12:10 tight name accept
87−12:17 name width
88−12:22 tight glyph +
89−12:23 tight glyph [
90−12:24 tight lit %fill
91−12:30 lit 1
92−12:31 tight glyph ]
93−12:32 tight glyph )
94−13:1 NEWLINE
95−13:1 glyph ++
96−13:4 name simple-call
97−13:16 glyph ^-
98−13:19 name attribute
99−13:29 name width
100−13:34 tight glyph +
101−13:35 tight glyph [
102−13:36 tight lit %fill
103−13:42 glyph (
104−13:43 tight name number-id
105−13:53 lit 1
106−13:54 tight glyph )
107−13:55 tight glyph ]
108−14:1 NEWLINE
109−14:1 glyph ++
110−14:4 name grouped-call
111−14:17 glyph ^-
112−14:20 name attribute
113−14:30 name width
114−14:35 tight glyph +
115−14:36 tight glyph [
116−14:37 tight lit %fill
117−14:43 glyph (
118−14:44 tight glyph (
119−14:45 tight name number-id
120−14:55 lit 1
121−14:56 tight glyph )
122−14:57 tight glyph )
123−14:58 tight glyph ]
124−15:1 NEWLINE
125−15:1 glyph ++
126−15:4 name cast-call
127−15:14 glyph ^-
128−15:17 name attribute
129−15:27 name width
130−15:32 tight glyph +
131−15:33 tight glyph [
132−15:34 tight lit %fill
133−15:40 glyph (
134−15:41 tight glyph ^-
135−15:44 aura @ud
136−15:48 glyph (
137−15:49 tight name number-id
138−15:59 lit 1
139−15:60 tight glyph )
140−15:61 tight glyph )
141−15:62 tight glyph ]
142−16:1 NEWLINE
143−16:1 glyph ++
144−16:4 name nested-call
145−16:16 glyph ^-
146−16:19 name attribute
147−16:29 name width
148−16:34 tight glyph +
149−16:35 tight glyph [
150−16:36 tight lit %fill
151−16:42 glyph (
152−16:43 tight name number-id
153−16:53 glyph (
154−16:54 tight name number-id
155−16:64 lit 1
156−16:65 tight glyph )
157−16:66 tight glyph )
158−16:67 tight glyph ]
159−17:1 NEWLINE
160−17:1 glyph ++
161−17:4 name bad-tag
162−17:12 glyph ^-
163−17:15 name attribute
164−17:25 name width
165−17:30 tight glyph +
166−17:31 tight glyph [
167−17:32 tight lit %missing
168−17:41 lit 1
169−17:42 tight glyph ]
170−18:1 NEWLINE
171−18:1 glyph ++
172−18:4 name bad-number
173−18:15 glyph ^-
174−18:18 name attribute
175−18:28 name width
176−18:33 tight glyph +
177−18:34 tight glyph [
178−18:35 tight lit %fill
179−18:41 str "bad"
180−18:46 tight glyph ]
181−19:1 NEWLINE
182−19:1 glyph ++
183−19:4 name pending
184−20:3 INDENT
185−20:3 glyph ~&
186−20:6 lit %unrelated
187−21:5 INDENT
188−21:5 glyph ^-
189−21:8 name attribute
190−21:18 name width
191−21:23 tight glyph +
192−21:24 tight glyph [
193−21:25 tight lit %fill
194−21:31 glyph (
195−21:32 tight name number-id
196−21:42 lit 1
197−21:43 tight glyph )
198−21:44 tight glyph ]
199−22:1 DEDENT
200−22:1 DEDENT
201−22:1 NEWLINE
202−22:1 glyph ++
203−22:4 name singleton
204−22:14 glyph ^-
205−22:17 name attribute
206−22:27 name width
207−22:32 tight glyph +
208−22:33 tight lit %shrink
209−23:1 NEWLINE
210−23:1 glyph +$
211−23:4 name event
212−24:3 INDENT
213−24:3 glyph [
214−24:4 tight lit %got
215−24:9 name value
216−24:14 tight glyph =
217−24:15 tight aura @t
218−24:17 tight glyph ]
219−25:3 NEWLINE
220−25:3 lit %idle
221−26:1 DEDENT
222−26:1 NEWLINE
223−26:1 glyph +$
224−26:4 name envelope
225−27:3 INDENT
226−27:3 glyph [
227−27:4 tight lit %handler
228−27:13 name callback
229−27:21 tight glyph =
230−27:22 tight glyph $-(
231−27:25 tight aura @t
232−27:28 name event
233−27:33 tight glyph )
234−27:34 tight glyph ]
235−28:3 NEWLINE
236−28:3 glyph [
237−28:4 tight lit %empty
238−28:11 name value
239−28:16 tight glyph =
240−28:17 tight aura @ud
241−28:20 tight glyph ]
242−29:1 DEDENT
243−29:1 NEWLINE
244−29:1 glyph ++
245−29:4 name constructor
246−29:16 glyph ^-
247−29:19 name envelope
248−29:28 glyph [
249−29:29 tight lit %handler
250−29:38 glyph |=
251−29:40 tight lit %got
252−29:44 tight glyph ]
253−30:1 NEWLINE
254−30:1 glyph ++
255−30:4 name unknown-target
256−30:19 glyph |=
257−30:22 name x
258−30:23 tight glyph =
259−30:24 tight tvar A
260−30:26 glyph ^-
261−30:29 tvar A
262−30:31 name width
263−30:36 tight glyph +
264−30:37 tight glyph [
265−30:38 tight lit %fill
266−30:44 glyph (
267−30:45 tight name number-id
268−30:55 lit 1
269−30:56 tight glyph )
270−30:57 tight glyph ]
271−30:58 NEWLINE
tests/golden/types-nested-shallow-preserve/tree.txtdeleted−136
@@ -1,136 +0,0 @@
1−(module
2− (mold 1:1 extent
3− (union 2:3
4− (cell 2:3
5− (const 2:4 %fill)
6− (face 2:10 n (aura 2:12 @ud)))
7− (const 3:3 %shrink)))
8− (mold 4:1 attribute
9− (union 5:3
10− (cell 5:3 (const 5:4 %width) (ref 5:11 extent))
11− (cell 6:3 (const 6:4 %gap) (aura 6:9 @tas))))
12− (value 7:1 number-id
13− (gate 7:14
14− (face 7:17 x (aura 7:19 @ud))
15− (wing 7:23 x)))
16− (value 8:1 plain
17− (cast 8:10
18− (ref 8:13 attribute)
19− (pair 8:23 width
20− (tuple 8:29 (lit 8:30 %fill) (lit 8:36 1)))))
21− (value 9:1 direct
22− (cast 9:11
23− (ref 9:14 attribute)
24− (tuple 9:24
25− (lit 9:25 %width)
26− (tuple 9:32 (lit 9:33 %fill) (lit 9:39 1)))))
27− (value 10:1 list
28− (cast 10:9
29− (apply 10:12 list (ref 10:18 attribute))
30− (list 10:29
31− (pair 10:31 width
32− (tuple 10:37 (lit 10:38 %fill) (lit 10:44 1))))))
33− (value 11:1 accept
34− (gate 11:11
35− (face 11:14 value (ref 11:20 attribute))
36− (wing 11:30 value)))
37− (value 12:1 call
38− (group 12:9
39− (call 12:10
40− (wing 12:10 accept)
41− (pair 12:17 width
42− (tuple 12:23 (lit 12:24 %fill) (lit 12:30 1))))))
43− (value 13:1 simple-call
44− (cast 13:16
45− (ref 13:19 attribute)
46− (pair 13:29 width
47− (tuple 13:35
48− (lit 13:36 %fill)
49− (group 13:42
50− (call 13:43 (wing 13:43 number-id) (lit 13:53 1)))))))
51− (value 14:1 grouped-call
52− (cast 14:17
53− (ref 14:20 attribute)
54− (pair 14:30 width
55− (tuple 14:36
56− (lit 14:37 %fill)
57− (group 14:43
58− (group 14:44
59− (call 14:45 (wing 14:45 number-id) (lit 14:55 1))))))))
60− (value 15:1 cast-call
61− (cast 15:14
62− (ref 15:17 attribute)
63− (pair 15:27 width
64− (tuple 15:33
65− (lit 15:34 %fill)
66− (group 15:40
67− (cast 15:41
68− (aura 15:44 @ud)
69− (group 15:48
70− (call 15:49 (wing 15:49 number-id) (lit 15:59 1)))))))))
71− (value 16:1 nested-call
72− (cast 16:16
73− (ref 16:19 attribute)
74− (pair 16:29 width
75− (tuple 16:35
76− (lit 16:36 %fill)
77− (group 16:42
78− (call 16:43
79− (wing 16:43 number-id)
80− (group 16:53
81− (call 16:54 (wing 16:54 number-id) (lit 16:64 1)))))))))
82− (value 17:1 bad-tag
83− (cast 17:12
84− (ref 17:15 attribute)
85− (pair 17:25 width
86− (tuple 17:31 (lit 17:32 %missing) (lit 17:41 1)))))
87− (value 18:1 bad-number
88− (cast 18:15
89− (ref 18:18 attribute)
90− (pair 18:28 width
91− (tuple 18:34 (lit 18:35 %fill) (str 18:41 "bad")))))
92− (value 19:1 pending
93− (body 20:3
94− (trace 20:3
95− (lit 20:6 %unrelated)
96− (body 21:5
97− (cast 21:5
98− (ref 21:8 attribute)
99− (pair 21:18 width
100− (tuple 21:24
101− (lit 21:25 %fill)
102− (group 21:31
103− (call 21:32 (wing 21:32 number-id) (lit 21:42 1))))))))))
104− (value 22:1 singleton
105− (cast 22:14
106− (ref 22:17 attribute)
107− (pair 22:27 width (lit 22:33 %shrink))))
108− (mold 23:1 event
109− (union 24:3
110− (cell 24:3
111− (const 24:4 %got)
112− (face 24:9 value (aura 24:15 @t)))
113− (const 25:3 %idle)))
114− (mold 26:1 envelope
115− (union 27:3
116− (cell 27:3
117− (const 27:4 %handler)
118− (face 27:13 callback
119− (fn 27:22 (aura 27:25 @t) (ref 27:28 event))))
120− (cell 28:3
121− (const 28:4 %empty)
122− (face 28:11 value (aura 28:17 @ud)))))
123− (value 29:1 constructor
124− (cast 29:16
125− (ref 29:19 envelope)
126− (tuple 29:28 (lit 29:29 %handler) (ctor 29:38 %got))))
127− (value 30:1 unknown-target
128− (gate 30:19
129− (face 30:22 x (tvar 30:24 A))
130− (cast 30:26
131− (tvar 30:29 A)
132− (pair 30:31 width
133− (tuple 30:37
134− (lit 30:38 %fill)
135− (group 30:44
136− (call 30:45 (wing 30:45 number-id) (lit 30:55 1)))))))))
tests/golden/types-nested-shallow-preserve/types.txtdeleted−33
@@ -1,33 +0,0 @@
1−partial inference; module not checked
2−+$ extent: cases proven disjoint; mold not checked
3−+$ attribute: cases proven disjoint; mold not checked
4−++ number-id: $-(@ud @ud)
5−++ plain: attribute
6−++ direct: attribute
7−++ list: (list attribute)
8−++ accept: $-(attribute attribute)
9−++ call: attribute
10−++ simple-call: attribute
11−++ grouped-call: attribute
12−++ cast-call: attribute
13−++ nested-call: attribute
14−++ bad-tag: cast mold and expression type do not unify
15−/tests/golden/types-nested-shallow-preserve/source.jibb:17:15: cast mold
16−++ bad-tag ^- attribute width+[%missing 1]
17− ^
18−/tests/golden/types-nested-shallow-preserve/source.jibb:17:25: expression
19−++ bad-tag ^- attribute width+[%missing 1]
20− ^
21−++ bad-number: cast mold and expression type do not unify
22−/tests/golden/types-nested-shallow-preserve/source.jibb:18:18: cast mold
23−++ bad-number ^- attribute width+[%fill "bad"]
24− ^
25−/tests/golden/types-nested-shallow-preserve/source.jibb:18:28: expression
26−++ bad-number ^- attribute width+[%fill "bad"]
27− ^
28−++ pending: tag needs context in partial inference
29−++ singleton: attribute
30−+$ event: cases proven disjoint; mold not checked
31−+$ envelope: cases proven disjoint; mold not checked
32−++ constructor: envelope
33−++ unknown-target: explicit capital constraints are not supported by partial inference
tests/golden/types-nested-union-context/about.txtdeleted−4
@@ -1,4 +0,0 @@
1−source: Grammar, Literals by context: "Number and cell literals resolve like tags: each waits for its context"; Molds: "Tags take their union from context".
2−tests: Nested named-union expressions, invalid and unknown contexts, shared and independent generic variables, unresolved tags and nulls. Unproven case coverage remains unsupported. This is a partial inference report.
3−expect: parses
4−expect-types: a partial inference report
tests/golden/types-nested-union-context/source.jibbdeleted−59
@@ -1,59 +0,0 @@
1−+$ msg
2− %go
3− %stay
4−+$ alt
5− %go
6− %stay
7−+$ payload |$ [A]
8− [%value item=A]
9− %empty
10−+$ box |$ [A]
11− [%wrap item=(payload A)]
12− %none
13−+$ reverse |$ [A B]
14− [%left item=A]
15− [%right item=B]
16−++ lift |= x=A ^- (payload A) [%value x]
17−++ direct ^- (payload msg) (lift %go)
18−++ nested ^- (box msg) [%wrap (lift %go)]
19−++ nested-alias |= p=(payload msg) ^- (box msg) [%wrap p]
20−++ nested-typed ^- (box msg) [%wrap (lift (^- msg %go))]
21−++ nested-cord ^- (box @t) [%wrap (lift "hi")]
22−++ nested-ship ^- (box @p) [%wrap (lift ~zod)]
23−++ independent |= [t=@t p=@p]
24− [(^- (box @t) [%wrap (lift t)]) (^- (box @p) [%wrap (lift p)])]
25−++ wrong-payload ^- (box @t) [%wrap (lift ~zod)]
26−++ wrong-tag ^- (box msg) [%wrap (lift %absent)]
27−++ wrong-origin |= x=alt ^- (box msg) [%wrap (lift x)]
28−++ generic |= x=A ^- (box A) [%wrap (lift x)]
29−++ repeated |= x=A ^- [a=(box A) b=(box A)] [a=[%wrap (lift x)] b=[%wrap (lift x)]]
30−++ unrelated-pending
31− ~& %orphan
32− ^- (box msg) [%wrap (lift %go)]
33−++ pending-null
34− ~& ~
35− ^- (box msg) [%wrap (lift %go)]
36−++ discarded-constructor
37− ~& |=%orphan
38− ^- (box msg) [%wrap (lift %go)]
39−++ unknown-output [%wrap (lift %go)]
40−++ unknown-target |= x=A ^- A [%wrap (lift %go)]
41−++ outer-callback |= [p=(payload A) fn=$-((payload A) B)] (fn p)
42−++ ctor-context ^- (box @t) (outer-callback (lift "hi") |=%wrap)
43−++ other-case ^- (box @t) %none
44−+$ full-payload |$ [A]
45− [%value item=A]
46− [%skip code=@ud]
47−+$ full-box |$ [A]
48− [%wrap item=(full-payload A)]
49− [%other code=@ud]
50−++ make-full |= x=A ^- (full-payload A) [%value x]
51−++ full-valid ^- (full-box msg) [%wrap (make-full %go)]
52−++ full-cord ^- (full-box @t) [%wrap (make-full "hi")]
53−++ full-ship ^- (full-box @p) [%wrap (make-full ~zod)]
54−++ full-generic |= x=A ^- (full-box A) [%wrap (make-full x)]
55−++ full-wrong ^- (full-box @t) [%wrap (make-full ~zod)]
56−++ full-missing ^- (full-box msg) [%wrap (make-full %missing)]
57−++ full-pending
58− ~& %orphan
59− ^- (full-box msg) [%wrap (make-full %go)]
tests/golden/types-nested-union-context/tokens.txtdeleted−660
@@ -1,660 +0,0 @@
1−1:1 glyph +$
2−1:4 name msg
3−2:3 INDENT
4−2:3 lit %go
5−3:3 NEWLINE
6−3:3 lit %stay
7−4:1 DEDENT
8−4:1 NEWLINE
9−4:1 glyph +$
10−4:4 name alt
11−5:3 INDENT
12−5:3 lit %go
13−6:3 NEWLINE
14−6:3 lit %stay
15−7:1 DEDENT
16−7:1 NEWLINE
17−7:1 glyph +$
18−7:4 name payload
19−7:12 glyph |$
20−7:15 glyph [
21−7:16 tight tvar A
22−7:17 tight glyph ]
23−8:3 INDENT
24−8:3 glyph [
25−8:4 tight lit %value
26−8:11 name item
27−8:15 tight glyph =
28−8:16 tight tvar A
29−8:17 tight glyph ]
30−9:3 NEWLINE
31−9:3 lit %empty
32−10:1 DEDENT
33−10:1 NEWLINE
34−10:1 glyph +$
35−10:4 name box
36−10:8 glyph |$
37−10:11 glyph [
38−10:12 tight tvar A
39−10:13 tight glyph ]
40−11:3 INDENT
41−11:3 glyph [
42−11:4 tight lit %wrap
43−11:10 name item
44−11:14 tight glyph =
45−11:15 tight glyph (
46−11:16 tight name payload
47−11:24 tvar A
48−11:25 tight glyph )
49−11:26 tight glyph ]
50−12:3 NEWLINE
51−12:3 lit %none
52−13:1 DEDENT
53−13:1 NEWLINE
54−13:1 glyph +$
55−13:4 name reverse
56−13:12 glyph |$
57−13:15 glyph [
58−13:16 tight tvar A
59−13:18 tvar B
60−13:19 tight glyph ]
61−14:3 INDENT
62−14:3 glyph [
63−14:4 tight lit %left
64−14:10 name item
65−14:14 tight glyph =
66−14:15 tight tvar A
67−14:16 tight glyph ]
68−15:3 NEWLINE
69−15:3 glyph [
70−15:4 tight lit %right
71−15:11 name item
72−15:15 tight glyph =
73−15:16 tight tvar B
74−15:17 tight glyph ]
75−16:1 DEDENT
76−16:1 NEWLINE
77−16:1 glyph ++
78−16:4 name lift
79−16:9 glyph |=
80−16:12 name x
81−16:13 tight glyph =
82−16:14 tight tvar A
83−16:16 glyph ^-
84−16:19 glyph (
85−16:20 tight name payload
86−16:28 tvar A
87−16:29 tight glyph )
88−16:31 glyph [
89−16:32 tight lit %value
90−16:39 name x
91−16:40 tight glyph ]
92−17:1 NEWLINE
93−17:1 glyph ++
94−17:4 name direct
95−17:11 glyph ^-
96−17:14 glyph (
97−17:15 tight name payload
98−17:23 name msg
99−17:26 tight glyph )
100−17:28 glyph (
101−17:29 tight name lift
102−17:34 lit %go
103−17:37 tight glyph )
104−18:1 NEWLINE
105−18:1 glyph ++
106−18:4 name nested
107−18:11 glyph ^-
108−18:14 glyph (
109−18:15 tight name box
110−18:19 name msg
111−18:22 tight glyph )
112−18:24 glyph [
113−18:25 tight lit %wrap
114−18:31 glyph (
115−18:32 tight name lift
116−18:37 lit %go
117−18:40 tight glyph )
118−18:41 tight glyph ]
119−19:1 NEWLINE
120−19:1 glyph ++
121−19:4 name nested-alias
122−19:17 glyph |=
123−19:20 name p
124−19:21 tight glyph =
125−19:22 tight glyph (
126−19:23 tight name payload
127−19:31 name msg
128−19:34 tight glyph )
129−19:36 glyph ^-
130−19:39 glyph (
131−19:40 tight name box
132−19:44 name msg
133−19:47 tight glyph )
134−19:49 glyph [
135−19:50 tight lit %wrap
136−19:56 name p
137−19:57 tight glyph ]
138−20:1 NEWLINE
139−20:1 glyph ++
140−20:4 name nested-typed
141−20:17 glyph ^-
142−20:20 glyph (
143−20:21 tight name box
144−20:25 name msg
145−20:28 tight glyph )
146−20:30 glyph [
147−20:31 tight lit %wrap
148−20:37 glyph (
149−20:38 tight name lift
150−20:43 glyph (
151−20:44 tight glyph ^-
152−20:47 name msg
153−20:51 lit %go
154−20:54 tight glyph )
155−20:55 tight glyph )
156−20:56 tight glyph ]
157−21:1 NEWLINE
158−21:1 glyph ++
159−21:4 name nested-cord
160−21:16 glyph ^-
161−21:19 glyph (
162−21:20 tight name box
163−21:24 aura @t
164−21:26 tight glyph )
165−21:28 glyph [
166−21:29 tight lit %wrap
167−21:35 glyph (
168−21:36 tight name lift
169−21:41 str "hi"
170−21:45 tight glyph )
171−21:46 tight glyph ]
172−22:1 NEWLINE
173−22:1 glyph ++
174−22:4 name nested-ship
175−22:16 glyph ^-
176−22:19 glyph (
177−22:20 tight name box
178−22:24 aura @p
179−22:26 tight glyph )
180−22:28 glyph [
181−22:29 tight lit %wrap
182−22:35 glyph (
183−22:36 tight name lift
184−22:41 lit ~zod
185−22:45 tight glyph )
186−22:46 tight glyph ]
187−23:1 NEWLINE
188−23:1 glyph ++
189−23:4 name independent
190−23:16 glyph |=
191−23:19 glyph [
192−23:20 tight name t
193−23:21 tight glyph =
194−23:22 tight aura @t
195−23:25 name p
196−23:26 tight glyph =
197−23:27 tight aura @p
198−23:29 tight glyph ]
199−24:3 INDENT
200−24:3 glyph [
201−24:4 tight glyph (
202−24:5 tight glyph ^-
203−24:8 glyph (
204−24:9 tight name box
205−24:13 aura @t
206−24:15 tight glyph )
207−24:17 glyph [
208−24:18 tight lit %wrap
209−24:24 glyph (
210−24:25 tight name lift
211−24:30 name t
212−24:31 tight glyph )
213−24:32 tight glyph ]
214−24:33 tight glyph )
215−24:35 glyph (
216−24:36 tight glyph ^-
217−24:39 glyph (
218−24:40 tight name box
219−24:44 aura @p
220−24:46 tight glyph )
221−24:48 glyph [
222−24:49 tight lit %wrap
223−24:55 glyph (
224−24:56 tight name lift
225−24:61 name p
226−24:62 tight glyph )
227−24:63 tight glyph ]
228−24:64 tight glyph )
229−24:65 tight glyph ]
230−25:1 DEDENT
231−25:1 NEWLINE
232−25:1 glyph ++
233−25:4 name wrong-payload
234−25:18 glyph ^-
235−25:21 glyph (
236−25:22 tight name box
237−25:26 aura @t
238−25:28 tight glyph )
239−25:30 glyph [
240−25:31 tight lit %wrap
241−25:37 glyph (
242−25:38 tight name lift
243−25:43 lit ~zod
244−25:47 tight glyph )
245−25:48 tight glyph ]
246−26:1 NEWLINE
247−26:1 glyph ++
248−26:4 name wrong-tag
249−26:14 glyph ^-
250−26:17 glyph (
251−26:18 tight name box
252−26:22 name msg
253−26:25 tight glyph )
254−26:27 glyph [
255−26:28 tight lit %wrap
256−26:34 glyph (
257−26:35 tight name lift
258−26:40 lit %absent
259−26:47 tight glyph )
260−26:48 tight glyph ]
261−27:1 NEWLINE
262−27:1 glyph ++
263−27:4 name wrong-origin
264−27:17 glyph |=
265−27:20 name x
266−27:21 tight glyph =
267−27:22 tight name alt
268−27:26 glyph ^-
269−27:29 glyph (
270−27:30 tight name box
271−27:34 name msg
272−27:37 tight glyph )
273−27:39 glyph [
274−27:40 tight lit %wrap
275−27:46 glyph (
276−27:47 tight name lift
277−27:52 name x
278−27:53 tight glyph )
279−27:54 tight glyph ]
280−28:1 NEWLINE
281−28:1 glyph ++
282−28:4 name generic
283−28:12 glyph |=
284−28:15 name x
285−28:16 tight glyph =
286−28:17 tight tvar A
287−28:19 glyph ^-
288−28:22 glyph (
289−28:23 tight name box
290−28:27 tvar A
291−28:28 tight glyph )
292−28:30 glyph [
293−28:31 tight lit %wrap
294−28:37 glyph (
295−28:38 tight name lift
296−28:43 name x
297−28:44 tight glyph )
298−28:45 tight glyph ]
299−29:1 NEWLINE
300−29:1 glyph ++
301−29:4 name repeated
302−29:13 glyph |=
303−29:16 name x
304−29:17 tight glyph =
305−29:18 tight tvar A
306−29:20 glyph ^-
307−29:23 glyph [
308−29:24 tight name a
309−29:25 tight glyph =
310−29:26 tight glyph (
311−29:27 tight name box
312−29:31 tvar A
313−29:32 tight glyph )
314−29:34 name b
315−29:35 tight glyph =
316−29:36 tight glyph (
317−29:37 tight name box
318−29:41 tvar A
319−29:42 tight glyph )
320−29:43 tight glyph ]
321−29:45 glyph [
322−29:46 tight name a
323−29:47 tight glyph =
324−29:48 tight glyph [
325−29:49 tight lit %wrap
326−29:55 glyph (
327−29:56 tight name lift
328−29:61 name x
329−29:62 tight glyph )
330−29:63 tight glyph ]
331−29:65 name b
332−29:66 tight glyph =
333−29:67 tight glyph [
334−29:68 tight lit %wrap
335−29:74 glyph (
336−29:75 tight name lift
337−29:80 name x
338−29:81 tight glyph )
339−29:82 tight glyph ]
340−29:83 tight glyph ]
341−30:1 NEWLINE
342−30:1 glyph ++
343−30:4 name unrelated-pending
344−31:3 INDENT
345−31:3 glyph ~&
346−31:6 lit %orphan
347−32:5 INDENT
348−32:5 glyph ^-
349−32:8 glyph (
350−32:9 tight name box
351−32:13 name msg
352−32:16 tight glyph )
353−32:18 glyph [
354−32:19 tight lit %wrap
355−32:25 glyph (
356−32:26 tight name lift
357−32:31 lit %go
358−32:34 tight glyph )
359−32:35 tight glyph ]
360−33:1 DEDENT
361−33:1 DEDENT
362−33:1 NEWLINE
363−33:1 glyph ++
364−33:4 name pending-null
365−34:3 INDENT
366−34:3 glyph ~&
367−34:6 lit ~
368−35:5 INDENT
369−35:5 glyph ^-
370−35:8 glyph (
371−35:9 tight name box
372−35:13 name msg
373−35:16 tight glyph )
374−35:18 glyph [
375−35:19 tight lit %wrap
376−35:25 glyph (
377−35:26 tight name lift
378−35:31 lit %go
379−35:34 tight glyph )
380−35:35 tight glyph ]
381−36:1 DEDENT
382−36:1 DEDENT
383−36:1 NEWLINE
384−36:1 glyph ++
385−36:4 name discarded-constructor
386−37:3 INDENT
387−37:3 glyph ~&
388−37:6 glyph |=
389−37:8 tight lit %orphan
390−38:5 INDENT
391−38:5 glyph ^-
392−38:8 glyph (
393−38:9 tight name box
394−38:13 name msg
395−38:16 tight glyph )
396−38:18 glyph [
397−38:19 tight lit %wrap
398−38:25 glyph (
399−38:26 tight name lift
400−38:31 lit %go
401−38:34 tight glyph )
402−38:35 tight glyph ]
403−39:1 DEDENT
404−39:1 DEDENT
405−39:1 NEWLINE
406−39:1 glyph ++
407−39:4 name unknown-output
408−39:19 glyph [
409−39:20 tight lit %wrap
410−39:26 glyph (
411−39:27 tight name lift
412−39:32 lit %go
413−39:35 tight glyph )
414−39:36 tight glyph ]
415−40:1 NEWLINE
416−40:1 glyph ++
417−40:4 name unknown-target
418−40:19 glyph |=
419−40:22 name x
420−40:23 tight glyph =
421−40:24 tight tvar A
422−40:26 glyph ^-
423−40:29 tvar A
424−40:31 glyph [
425−40:32 tight lit %wrap
426−40:38 glyph (
427−40:39 tight name lift
428−40:44 lit %go
429−40:47 tight glyph )
430−40:48 tight glyph ]
431−41:1 NEWLINE
432−41:1 glyph ++
433−41:4 name outer-callback
434−41:19 glyph |=
435−41:22 glyph [
436−41:23 tight name p
437−41:24 tight glyph =
438−41:25 tight glyph (
439−41:26 tight name payload
440−41:34 tvar A
441−41:35 tight glyph )
442−41:37 name fn
443−41:39 tight glyph =
444−41:40 tight glyph $-(
445−41:43 tight glyph (
446−41:44 tight name payload
447−41:52 tvar A
448−41:53 tight glyph )
449−41:55 tvar B
450−41:56 tight glyph )
451−41:57 tight glyph ]
452−41:59 glyph (
453−41:60 tight name fn
454−41:63 name p
455−41:64 tight glyph )
456−42:1 NEWLINE
457−42:1 glyph ++
458−42:4 name ctor-context
459−42:17 glyph ^-
460−42:20 glyph (
461−42:21 tight name box
462−42:25 aura @t
463−42:27 tight glyph )
464−42:29 glyph (
465−42:30 tight name outer-callback
466−42:45 glyph (
467−42:46 tight name lift
468−42:51 str "hi"
469−42:55 tight glyph )
470−42:57 glyph |=
471−42:59 tight lit %wrap
472−42:64 tight glyph )
473−43:1 NEWLINE
474−43:1 glyph ++
475−43:4 name other-case
476−43:15 glyph ^-
477−43:18 glyph (
478−43:19 tight name box
479−43:23 aura @t
480−43:25 tight glyph )
481−43:27 lit %none
482−44:1 NEWLINE
483−44:1 glyph +$
484−44:4 name full-payload
485−44:17 glyph |$
486−44:20 glyph [
487−44:21 tight tvar A
488−44:22 tight glyph ]
489−45:3 INDENT
490−45:3 glyph [
491−45:4 tight lit %value
492−45:11 name item
493−45:15 tight glyph =
494−45:16 tight tvar A
495−45:17 tight glyph ]
496−46:3 NEWLINE
497−46:3 glyph [
498−46:4 tight lit %skip
499−46:10 name code
500−46:14 tight glyph =
501−46:15 tight aura @ud
502−46:18 tight glyph ]
503−47:1 DEDENT
504−47:1 NEWLINE
505−47:1 glyph +$
506−47:4 name full-box
507−47:13 glyph |$
508−47:16 glyph [
509−47:17 tight tvar A
510−47:18 tight glyph ]
511−48:3 INDENT
512−48:3 glyph [
513−48:4 tight lit %wrap
514−48:10 name item
515−48:14 tight glyph =
516−48:15 tight glyph (
517−48:16 tight name full-payload
518−48:29 tvar A
519−48:30 tight glyph )
520−48:31 tight glyph ]
521−49:3 NEWLINE
522−49:3 glyph [
523−49:4 tight lit %other
524−49:11 name code
525−49:15 tight glyph =
526−49:16 tight aura @ud
527−49:19 tight glyph ]
528−50:1 DEDENT
529−50:1 NEWLINE
530−50:1 glyph ++
531−50:4 name make-full
532−50:14 glyph |=
533−50:17 name x
534−50:18 tight glyph =
535−50:19 tight tvar A
536−50:21 glyph ^-
537−50:24 glyph (
538−50:25 tight name full-payload
539−50:38 tvar A
540−50:39 tight glyph )
541−50:41 glyph [
542−50:42 tight lit %value
543−50:49 name x
544−50:50 tight glyph ]
545−51:1 NEWLINE
546−51:1 glyph ++
547−51:4 name full-valid
548−51:15 glyph ^-
549−51:18 glyph (
550−51:19 tight name full-box
551−51:28 name msg
552−51:31 tight glyph )
553−51:33 glyph [
554−51:34 tight lit %wrap
555−51:40 glyph (
556−51:41 tight name make-full
557−51:51 lit %go
558−51:54 tight glyph )
559−51:55 tight glyph ]
560−52:1 NEWLINE
561−52:1 glyph ++
562−52:4 name full-cord
563−52:14 glyph ^-
564−52:17 glyph (
565−52:18 tight name full-box
566−52:27 aura @t
567−52:29 tight glyph )
568−52:31 glyph [
569−52:32 tight lit %wrap
570−52:38 glyph (
571−52:39 tight name make-full
572−52:49 str "hi"
573−52:53 tight glyph )
574−52:54 tight glyph ]
575−53:1 NEWLINE
576−53:1 glyph ++
577−53:4 name full-ship
578−53:14 glyph ^-
579−53:17 glyph (
580−53:18 tight name full-box
581−53:27 aura @p
582−53:29 tight glyph )
583−53:31 glyph [
584−53:32 tight lit %wrap
585−53:38 glyph (
586−53:39 tight name make-full
587−53:49 lit ~zod
588−53:53 tight glyph )
589−53:54 tight glyph ]
590−54:1 NEWLINE
591−54:1 glyph ++
592−54:4 name full-generic
593−54:17 glyph |=
594−54:20 name x
595−54:21 tight glyph =
596−54:22 tight tvar A
597−54:24 glyph ^-
598−54:27 glyph (
599−54:28 tight name full-box
600−54:37 tvar A
601−54:38 tight glyph )
602−54:40 glyph [
603−54:41 tight lit %wrap
604−54:47 glyph (
605−54:48 tight name make-full
606−54:58 name x
607−54:59 tight glyph )
608−54:60 tight glyph ]
609−55:1 NEWLINE
610−55:1 glyph ++
611−55:4 name full-wrong
612−55:15 glyph ^-
613−55:18 glyph (
614−55:19 tight name full-box
615−55:28 aura @t
616−55:30 tight glyph )
617−55:32 glyph [
618−55:33 tight lit %wrap
619−55:39 glyph (
620−55:40 tight name make-full
621−55:50 lit ~zod
622−55:54 tight glyph )
623−55:55 tight glyph ]
624−56:1 NEWLINE
625−56:1 glyph ++
626−56:4 name full-missing
627−56:17 glyph ^-
628−56:20 glyph (
629−56:21 tight name full-box
630−56:30 name msg
631−56:33 tight glyph )
632−56:35 glyph [
633−56:36 tight lit %wrap
634−56:42 glyph (
635−56:43 tight name make-full
636−56:53 lit %missing
637−56:61 tight glyph )
638−56:62 tight glyph ]
639−57:1 NEWLINE
640−57:1 glyph ++
641−57:4 name full-pending
642−58:3 INDENT
643−58:3 glyph ~&
644−58:6 lit %orphan
645−59:5 INDENT
646−59:5 glyph ^-
647−59:8 glyph (
648−59:9 tight name full-box
649−59:18 name msg
650−59:21 tight glyph )
651−59:23 glyph [
652−59:24 tight lit %wrap
653−59:30 glyph (
654−59:31 tight name make-full
655−59:41 lit %go
656−59:44 tight glyph )
657−59:45 tight glyph ]
658−59:46 DEDENT
659−59:46 DEDENT
660−59:46 NEWLINE
tests/golden/types-nested-union-context/tree.txtdeleted−302
@@ -1,302 +0,0 @@
1−(module
2− (mold 1:1 msg
3− (union 2:3 (const 2:3 %go) (const 3:3 %stay)))
4− (mold 4:1 alt
5− (union 5:3 (const 5:3 %go) (const 6:3 %stay)))
6− (mold 7:1 payload
7− (generic 7:12 A
8− (union 8:3
9− (cell 8:3
10− (const 8:4 %value)
11− (face 8:11 item (tvar 8:16 A)))
12− (const 9:3 %empty))))
13− (mold 10:1 box
14− (generic 10:8 A
15− (union 11:3
16− (cell 11:3
17− (const 11:4 %wrap)
18− (face 11:10 item
19− (apply 11:15 payload (tvar 11:24 A))))
20− (const 12:3 %none))))
21− (mold 13:1 reverse
22− (generic 13:12 A B
23− (union 14:3
24− (cell 14:3
25− (const 14:4 %left)
26− (face 14:10 item (tvar 14:15 A)))
27− (cell 15:3
28− (const 15:4 %right)
29− (face 15:11 item (tvar 15:16 B))))))
30− (value 16:1 lift
31− (gate 16:9
32− (face 16:12 x (tvar 16:14 A))
33− (cast 16:16
34− (apply 16:19 payload (tvar 16:28 A))
35− (tuple 16:31 (lit 16:32 %value) (wing 16:39 x)))))
36− (value 17:1 direct
37− (cast 17:11
38− (apply 17:14 payload (ref 17:23 msg))
39− (group 17:28
40− (call 17:29 (wing 17:29 lift) (lit 17:34 %go)))))
41− (value 18:1 nested
42− (cast 18:11
43− (apply 18:14 box (ref 18:19 msg))
44− (tuple 18:24
45− (lit 18:25 %wrap)
46− (group 18:31
47− (call 18:32 (wing 18:32 lift) (lit 18:37 %go))))))
48− (value 19:1 nested-alias
49− (gate 19:17
50− (face 19:20 p
51− (apply 19:22 payload (ref 19:31 msg)))
52− (cast 19:36
53− (apply 19:39 box (ref 19:44 msg))
54− (tuple 19:49 (lit 19:50 %wrap) (wing 19:56 p)))))
55− (value 20:1 nested-typed
56− (cast 20:17
57− (apply 20:20 box (ref 20:25 msg))
58− (tuple 20:30
59− (lit 20:31 %wrap)
60− (group 20:37
61− (call 20:38
62− (wing 20:38 lift)
63− (group 20:43
64− (cast 20:44 (ref 20:47 msg) (lit 20:51 %go))))))))
65− (value 21:1 nested-cord
66− (cast 21:16
67− (apply 21:19 box (aura 21:24 @t))
68− (tuple 21:28
69− (lit 21:29 %wrap)
70− (group 21:35
71− (call 21:36 (wing 21:36 lift) (str 21:41 "hi"))))))
72− (value 22:1 nested-ship
73− (cast 22:16
74− (apply 22:19 box (aura 22:24 @p))
75− (tuple 22:28
76− (lit 22:29 %wrap)
77− (group 22:35
78− (call 22:36 (wing 22:36 lift) (lit 22:41 ~zod))))))
79− (value 23:1 independent
80− (gate 23:16
81− (cell 23:19
82− (face 23:20 t (aura 23:22 @t))
83− (face 23:25 p (aura 23:27 @p)))
84− (body 24:3
85− (tuple 24:3
86− (group 24:4
87− (cast 24:5
88− (apply 24:8 box (aura 24:13 @t))
89− (tuple 24:17
90− (lit 24:18 %wrap)
91− (group 24:24
92− (call 24:25 (wing 24:25 lift) (wing 24:30 t))))))
93− (group 24:35
94− (cast 24:36
95− (apply 24:39 box (aura 24:44 @p))
96− (tuple 24:48
97− (lit 24:49 %wrap)
98− (group 24:55
99− (call 24:56 (wing 24:56 lift) (wing 24:61 p))))))))))
100− (value 25:1 wrong-payload
101− (cast 25:18
102− (apply 25:21 box (aura 25:26 @t))
103− (tuple 25:30
104− (lit 25:31 %wrap)
105− (group 25:37
106− (call 25:38 (wing 25:38 lift) (lit 25:43 ~zod))))))
107− (value 26:1 wrong-tag
108− (cast 26:14
109− (apply 26:17 box (ref 26:22 msg))
110− (tuple 26:27
111− (lit 26:28 %wrap)
112− (group 26:34
113− (call 26:35 (wing 26:35 lift) (lit 26:40 %absent))))))
114− (value 27:1 wrong-origin
115− (gate 27:17
116− (face 27:20 x (ref 27:22 alt))
117− (cast 27:26
118− (apply 27:29 box (ref 27:34 msg))
119− (tuple 27:39
120− (lit 27:40 %wrap)
121− (group 27:46
122− (call 27:47 (wing 27:47 lift) (wing 27:52 x)))))))
123− (value 28:1 generic
124− (gate 28:12
125− (face 28:15 x (tvar 28:17 A))
126− (cast 28:19
127− (apply 28:22 box (tvar 28:27 A))
128− (tuple 28:30
129− (lit 28:31 %wrap)
130− (group 28:37
131− (call 28:38 (wing 28:38 lift) (wing 28:43 x)))))))
132− (value 29:1 repeated
133− (gate 29:13
134− (face 29:16 x (tvar 29:18 A))
135− (cast 29:20
136− (cell 29:23
137− (face 29:24 a
138− (apply 29:26 box (tvar 29:31 A)))
139− (face 29:34 b
140− (apply 29:36 box (tvar 29:41 A))))
141− (tuple 29:45
142− (face 29:46 a
143− (tuple 29:48
144− (lit 29:49 %wrap)
145− (group 29:55
146− (call 29:56 (wing 29:56 lift) (wing 29:61 x)))))
147− (face 29:65 b
148− (tuple 29:67
149− (lit 29:68 %wrap)
150− (group 29:74
151− (call 29:75 (wing 29:75 lift) (wing 29:80 x)))))))))
152− (value 30:1 unrelated-pending
153− (body 31:3
154− (trace 31:3
155− (lit 31:6 %orphan)
156− (body 32:5
157− (cast 32:5
158− (apply 32:8 box (ref 32:13 msg))
159− (tuple 32:18
160− (lit 32:19 %wrap)
161− (group 32:25
162− (call 32:26 (wing 32:26 lift) (lit 32:31 %go)))))))))
163− (value 33:1 pending-null
164− (body 34:3
165− (trace 34:3
166− (lit 34:6 ~)
167− (body 35:5
168− (cast 35:5
169− (apply 35:8 box (ref 35:13 msg))
170− (tuple 35:18
171− (lit 35:19 %wrap)
172− (group 35:25
173− (call 35:26 (wing 35:26 lift) (lit 35:31 %go)))))))))
174− (value 36:1 discarded-constructor
175− (body 37:3
176− (trace 37:3
177− (ctor 37:6 %orphan)
178− (body 38:5
179− (cast 38:5
180− (apply 38:8 box (ref 38:13 msg))
181− (tuple 38:18
182− (lit 38:19 %wrap)
183− (group 38:25
184− (call 38:26 (wing 38:26 lift) (lit 38:31 %go)))))))))
185− (value 39:1 unknown-output
186− (tuple 39:19
187− (lit 39:20 %wrap)
188− (group 39:26
189− (call 39:27 (wing 39:27 lift) (lit 39:32 %go)))))
190− (value 40:1 unknown-target
191− (gate 40:19
192− (face 40:22 x (tvar 40:24 A))
193− (cast 40:26
194− (tvar 40:29 A)
195− (tuple 40:31
196− (lit 40:32 %wrap)
197− (group 40:38
198− (call 40:39 (wing 40:39 lift) (lit 40:44 %go)))))))
199− (value 41:1 outer-callback
200− (gate 41:19
201− (cell 41:22
202− (face 41:23 p
203− (apply 41:25 payload (tvar 41:34 A)))
204− (face 41:37 fn
205− (fn 41:40
206− (apply 41:43 payload (tvar 41:52 A))
207− (tvar 41:55 B))))
208− (group 41:59
209− (call 41:60 (wing 41:60 fn) (wing 41:63 p)))))
210− (value 42:1 ctor-context
211− (cast 42:17
212− (apply 42:20 box (aura 42:25 @t))
213− (group 42:29
214− (call 42:30
215− (wing 42:30 outer-callback)
216− (group 42:45
217− (call 42:46 (wing 42:46 lift) (str 42:51 "hi")))
218− (ctor 42:57 %wrap)))))
219− (value 43:1 other-case
220− (cast 43:15
221− (apply 43:18 box (aura 43:23 @t))
222− (lit 43:27 %none)))
223− (mold 44:1 full-payload
224− (generic 44:17 A
225− (union 45:3
226− (cell 45:3
227− (const 45:4 %value)
228− (face 45:11 item (tvar 45:16 A)))
229− (cell 46:3
230− (const 46:4 %skip)
231− (face 46:10 code (aura 46:15 @ud))))))
232− (mold 47:1 full-box
233− (generic 47:13 A
234− (union 48:3
235− (cell 48:3
236− (const 48:4 %wrap)
237− (face 48:10 item
238− (apply 48:15 full-payload (tvar 48:29 A))))
239− (cell 49:3
240− (const 49:4 %other)
241− (face 49:11 code (aura 49:16 @ud))))))
242− (value 50:1 make-full
243− (gate 50:14
244− (face 50:17 x (tvar 50:19 A))
245− (cast 50:21
246− (apply 50:24 full-payload (tvar 50:38 A))
247− (tuple 50:41 (lit 50:42 %value) (wing 50:49 x)))))
248− (value 51:1 full-valid
249− (cast 51:15
250− (apply 51:18 full-box (ref 51:28 msg))
251− (tuple 51:33
252− (lit 51:34 %wrap)
253− (group 51:40
254− (call 51:41 (wing 51:41 make-full) (lit 51:51 %go))))))
255− (value 52:1 full-cord
256− (cast 52:14
257− (apply 52:17 full-box (aura 52:27 @t))
258− (tuple 52:31
259− (lit 52:32 %wrap)
260− (group 52:38
261− (call 52:39 (wing 52:39 make-full) (str 52:49 "hi"))))))
262− (value 53:1 full-ship
263− (cast 53:14
264− (apply 53:17 full-box (aura 53:27 @p))
265− (tuple 53:31
266− (lit 53:32 %wrap)
267− (group 53:38
268− (call 53:39 (wing 53:39 make-full) (lit 53:49 ~zod))))))
269− (value 54:1 full-generic
270− (gate 54:17
271− (face 54:20 x (tvar 54:22 A))
272− (cast 54:24
273− (apply 54:27 full-box (tvar 54:37 A))
274− (tuple 54:40
275− (lit 54:41 %wrap)
276− (group 54:47
277− (call 54:48 (wing 54:48 make-full) (wing 54:58 x)))))))
278− (value 55:1 full-wrong
279− (cast 55:15
280− (apply 55:18 full-box (aura 55:28 @t))
281− (tuple 55:32
282− (lit 55:33 %wrap)
283− (group 55:39
284− (call 55:40 (wing 55:40 make-full) (lit 55:50 ~zod))))))
285− (value 56:1 full-missing
286− (cast 56:17
287− (apply 56:20 full-box (ref 56:30 msg))
288− (tuple 56:35
289− (lit 56:36 %wrap)
290− (group 56:42
291− (call 56:43 (wing 56:43 make-full) (lit 56:53 %missing))))))
292− (value 57:1 full-pending
293− (body 58:3
294− (trace 58:3
295− (lit 58:6 %orphan)
296− (body 59:5
297− (cast 59:5
298− (apply 59:8 full-box (ref 59:18 msg))
299− (tuple 59:23
300− (lit 59:24 %wrap)
301− (group 59:30
302− (call 59:31 (wing 59:31 make-full) (lit 59:41 %go))))))))))
tests/golden/types-nested-union-context/types.txtdeleted−49
@@ -1,49 +0,0 @@
1−partial inference; module not checked
2−+$ msg: cases proven disjoint; mold not checked
3−+$ alt: cases proven disjoint; mold not checked
4−+$ payload: cases proven disjoint; mold not checked
5−+$ box: cases proven disjoint; mold not checked
6−+$ reverse: cases proven disjoint; mold not checked
7−++ lift: $-(A (payload A))
8−++ direct: (payload msg)
9−++ nested: cast constraint is not supported by partial inference
10−++ nested-alias: cast constraint is not supported by partial inference
11−++ nested-typed: cast constraint is not supported by partial inference
12−++ nested-cord: cast constraint is not supported by partial inference
13−++ nested-ship: cast constraint is not supported by partial inference
14−++ independent: cast constraint is not supported by partial inference
15−++ wrong-payload: cast constraint is not supported by partial inference
16−++ wrong-tag: cast constraint is not supported by partial inference
17−++ wrong-origin: cast constraint is not supported by partial inference
18−++ generic: cast constraint is not supported by partial inference
19−++ repeated: cast constraint is not supported by partial inference
20−++ unrelated-pending: cast constraint is not supported by partial inference
21−++ pending-null: cast constraint is not supported by partial inference
22−++ discarded-constructor: cast constraint is not supported by partial inference
23−++ unknown-output: tag needs context in partial inference
24−++ unknown-target: explicit capital constraints are not supported by partial inference
25−++ outer-callback: $-([p=(payload A) fn=$-((payload A) B)] B)
26−++ ctor-context: (box @t)
27−++ other-case: (box @t)
28−+$ full-payload: cases proven disjoint; mold not checked
29−+$ full-box: cases proven disjoint; mold not checked
30−++ make-full: $-(A (full-payload A))
31−++ full-valid: (full-box msg)
32−++ full-cord: (full-box @t)
33−++ full-ship: (full-box @p)
34−++ full-generic: $-(A (full-box A))
35−++ full-wrong: call's sample and argument types do not unify
36−/tests/golden/types-nested-union-context/source.jibb:55:40: called gate
37−++ full-wrong ^- (full-box @t) [%wrap (make-full ~zod)]
38− ^
39−/tests/golden/types-nested-union-context/source.jibb:55:50: argument has type @p
40−++ full-wrong ^- (full-box @t) [%wrap (make-full ~zod)]
41− ^
42−++ full-missing: msg has no case `%missing`
43−/tests/golden/types-nested-union-context/source.jibb:56:43: expected union
44−++ full-missing ^- (full-box msg) [%wrap (make-full %missing)]
45− ^
46−/tests/golden/types-nested-union-context/source.jibb:56:53: tag
47−++ full-missing ^- (full-box msg) [%wrap (make-full %missing)]
48− ^
49−++ full-pending: tag needs context in partial inference
tests/golden/types-null-context/about.txt+1−1
@@ -1,4 +1,4 @@
11source: Grammar, Tag resolution: "A tag literal or `~` gets a fresh type variable and a pending constraint"; `|=%typed` "works for cases tagged at their head".
2−tests: Contextual null and a null-headed cell fit their respective cases. Null- and term-headed zero cases both accept a `%$` constructor because their literal heads are equal nouns.
2+tests: Contextual null and a null-headed cell fit their respective cases. A null-headed case is not a `%$` constructor; a term-headed `%$` case is.
33expect: parses
44expect-types: a partial inference report
tests/golden/types-null-context/source.jibb+1−1
@@ -4,5 +4,5 @@
44+$ dollar [%$ value=@t]
55++ empty ^- maybe ~
66++ present ^- maybe [~ "hi"]
7−++ null-constructor ^- $-(@t maybe) |=%$
7+++ bad-constructor ^- $-(@t maybe) |=%$
88++ dollar-constructor ^- $-(@t dollar) |=%$
tests/golden/types-null-context/tokens.txt+8−8
@@ -36,14 +36,14 @@
36366:28 tight glyph ]
37377:1 NEWLINE
38387:1 glyph ++
39−7:4 name null-constructor
40−7:21 glyph ^-
41−7:24 glyph $-(
42−7:27 tight aura @t
43−7:30 name maybe
44−7:35 tight glyph )
45−7:37 glyph |=
46−7:39 tight lit %$
39+7:4 name bad-constructor
40+7:20 glyph ^-
41+7:23 glyph $-(
42+7:26 tight aura @t
43+7:29 name maybe
44+7:34 tight glyph )
45+7:36 glyph |=
46+7:38 tight lit %$
47478:1 NEWLINE
48488:1 glyph ++
49498:4 name dollar-constructor
tests/golden/types-null-context/tree.txt+4−4
@@ -15,10 +15,10 @@
1515 (cast 6:12
1616 (ref 6:15 maybe)
1717 (tuple 6:21 (lit 6:22 ~) (str 6:24 "hi"))))
18− (value 7:1 null-constructor
19− (cast 7:21
20− (fn 7:24 (aura 7:27 @t) (ref 7:30 maybe))
21− (ctor 7:37 %$)))
18+ (value 7:1 bad-constructor
19+ (cast 7:20
20+ (fn 7:23 (aura 7:26 @t) (ref 7:29 maybe))
21+ (ctor 7:36 %$)))
2222 (value 8:1 dollar-constructor
2323 (cast 8:23
2424 (fn 8:26 (aura 8:29 @t) (ref 8:32 dollar))
tests/golden/types-null-context/types.txt+7−1
@@ -3,5 +3,11 @@ partial inference; module not checked
33+$ dollar: not checked
44++ empty: maybe
55++ present: maybe
6−++ null-constructor: $-(@t maybe)
6+++ bad-constructor: cast mold and expression type do not unify
7+/tests/golden/types-null-context/source.jibb:7:23: cast mold
8+++ bad-constructor ^- $-(@t maybe) |=%$
9+ ^
10+/tests/golden/types-null-context/source.jibb:7:36: expression
11+++ bad-constructor ^- $-(@t maybe) |=%$
12+ ^
713++ dollar-constructor: $-(@t [%$ value=@t])
tests/golden/types-pair-context/source.jibb+14−14
@@ -3,30 +3,30 @@
33 %s1
44 %s2
55 %s3
6−+$ extent
6++$ length
77 [%fill n=@ud]
88 %shrink
9−+$ attribute
9++$ attr
1010 [%gap spacing]
1111 [%pad spacing]
12− [%width extent]
13−+$ other-attribute
12+ [%width length]
13++$ other-attr
1414 [%gap spacing]
1515 [%pad spacing]
16− [%width extent]
17−++ one ^- attribute gap+%s2
18−++ equiv ^- attribute [%gap %s2]
19−++ attributes ^- (list attribute) ~[gap+%s2 pad+%s3 width+[%fill 1]]
16+ [%width length]
17+++ one ^- attr gap+%s2
18+++ equiv ^- attr [%gap %s2]
19+++ attrs ^- (list attr) ~[gap+%s2 pad+%s3 width+[%fill 1]]
2020++ gap-structural ^- [@tas @tas] gap+%s2
21−++ nested ^- attribute width+[%fill 1]
22−++ mismatch ^- attribute gap+%shrink
23−++ missing ^- attribute width+[%oops 1]
21+++ nested ^- attr width+[%fill 1]
22+++ mismatch ^- attr gap+%shrink
23+++ missing ^- attr width+[%oops 1]
2424++ pending gap+%s2
25−++ cross-origin ^- attribute ^- other-attribute gap+%s2
25+++ cross-origin ^- attr ^- other-attr gap+%s2
2626++ noun-pair ^- [* *] gap+%s2
2727++ atom-pair ^- [@ta @tas] gap+%s2
2828++ wrong-head ^- [@ud @tas] gap+%s2
29−++ wrong-number ^- attribute width+[%fill "hi"]
29+++ wrong-number ^- attr width+[%fill "hi"]
3030++ unrelated
3131 ~& %dangling
32− ^- attribute gap+%s2
32+ ^- attr gap+%s2
tests/golden/types-pair-context/tokens.txt+71−71
@@ -11,7 +11,7 @@
11116:1 DEDENT
12126:1 NEWLINE
13136:1 glyph +$
14−6:4 name extent
14+6:4 name length
15157:3 INDENT
16167:3 glyph [
17177:4 tight lit %fill
@@ -24,7 +24,7 @@
24249:1 DEDENT
25259:1 NEWLINE
26269:1 glyph +$
27−9:4 name attribute
27+9:4 name attr
282810:3 INDENT
292910:3 glyph [
303010:4 tight lit %gap
@@ -38,12 +38,12 @@
383812:3 NEWLINE
393912:3 glyph [
404012:4 tight lit %width
41−12:11 name extent
41+12:11 name length
424212:17 tight glyph ]
434313:1 DEDENT
444413:1 NEWLINE
454513:1 glyph +$
46−13:4 name other-attribute
46+13:4 name other-attr
474714:3 INDENT
484814:3 glyph [
494914:4 tight lit %gap
@@ -57,48 +57,48 @@
575716:3 NEWLINE
585816:3 glyph [
595916:4 tight lit %width
60−16:11 name extent
60+16:11 name length
616116:17 tight glyph ]
626217:1 DEDENT
636317:1 NEWLINE
646417:1 glyph ++
656517:4 name one
666617:8 glyph ^-
67−17:11 name attribute
68−17:21 name gap
69−17:24 tight glyph +
70−17:25 tight lit %s2
67+17:11 name attr
68+17:16 name gap
69+17:19 tight glyph +
70+17:20 tight lit %s2
717118:1 NEWLINE
727218:1 glyph ++
737318:4 name equiv
747418:10 glyph ^-
75−18:13 name attribute
76−18:23 glyph [
77−18:24 tight lit %gap
78−18:29 lit %s2
79−18:32 tight glyph ]
75+18:13 name attr
76+18:18 glyph [
77+18:19 tight lit %gap
78+18:24 lit %s2
79+18:27 tight glyph ]
808019:1 NEWLINE
818119:1 glyph ++
82−19:4 name attributes
83−19:15 glyph ^-
84−19:18 glyph (
85−19:19 tight name list
86−19:24 name attribute
87−19:33 tight glyph )
88−19:35 glyph ~[
89−19:37 tight name gap
90−19:40 tight glyph +
91−19:41 tight lit %s2
92−19:45 name pad
82+19:4 name attrs
83+19:10 glyph ^-
84+19:13 glyph (
85+19:14 tight name list
86+19:19 name attr
87+19:23 tight glyph )
88+19:25 glyph ~[
89+19:27 tight name gap
90+19:30 tight glyph +
91+19:31 tight lit %s2
92+19:35 name pad
93+19:38 tight glyph +
94+19:39 tight lit %s3
95+19:43 name width
939619:48 tight glyph +
94−19:49 tight lit %s3
95−19:53 name width
96−19:58 tight glyph +
97−19:59 tight glyph [
98−19:60 tight lit %fill
99−19:66 lit 1
100−19:67 tight glyph ]
101−19:68 tight glyph ]
97+19:49 tight glyph [
98+19:50 tight lit %fill
99+19:56 lit 1
100+19:57 tight glyph ]
101+19:58 tight glyph ]
10210220:1 NEWLINE
10310320:1 glyph ++
10410420:4 name gap-structural
@@ -114,32 +114,32 @@
11411421:1 glyph ++
11511521:4 name nested
11611621:11 glyph ^-
117−21:14 name attribute
118−21:24 name width
119−21:29 tight glyph +
120−21:30 tight glyph [
121−21:31 tight lit %fill
122−21:37 lit 1
123−21:38 tight glyph ]
117+21:14 name attr
118+21:19 name width
119+21:24 tight glyph +
120+21:25 tight glyph [
121+21:26 tight lit %fill
122+21:32 lit 1
123+21:33 tight glyph ]
12412422:1 NEWLINE
12512522:1 glyph ++
12612622:4 name mismatch
12712722:13 glyph ^-
128−22:16 name attribute
129−22:26 name gap
130−22:29 tight glyph +
131−22:30 tight lit %shrink
128+22:16 name attr
129+22:21 name gap
130+22:24 tight glyph +
131+22:25 tight lit %shrink
13213223:1 NEWLINE
13313323:1 glyph ++
13413423:4 name missing
13513523:12 glyph ^-
136−23:15 name attribute
137−23:25 name width
138−23:30 tight glyph +
139−23:31 tight glyph [
140−23:32 tight lit %oops
141−23:38 lit 1
142−23:39 tight glyph ]
136+23:15 name attr
137+23:20 name width
138+23:25 tight glyph +
139+23:26 tight glyph [
140+23:27 tight lit %oops
141+23:33 lit 1
142+23:34 tight glyph ]
14314324:1 NEWLINE
14414424:1 glyph ++
14514524:4 name pending
@@ -150,12 +150,12 @@
15015025:1 glyph ++
15115125:4 name cross-origin
15215225:17 glyph ^-
153−25:20 name attribute
154−25:30 glyph ^-
155−25:33 name other-attribute
156−25:49 name gap
157−25:52 tight glyph +
158−25:53 tight lit %s2
153+25:20 name attr
154+25:25 glyph ^-
155+25:28 name other-attr
156+25:39 name gap
157+25:42 tight glyph +
158+25:43 tight lit %s2
15915926:1 NEWLINE
16016026:1 glyph ++
16116126:4 name noun-pair
@@ -193,13 +193,13 @@
19319329:1 glyph ++
19419429:4 name wrong-number
19519529:17 glyph ^-
196−29:20 name attribute
197−29:30 name width
198−29:35 tight glyph +
199−29:36 tight glyph [
200−29:37 tight lit %fill
201−29:43 str "hi"
202−29:47 tight glyph ]
196+29:20 name attr
197+29:25 name width
198+29:30 tight glyph +
199+29:31 tight glyph [
200+29:32 tight lit %fill
201+29:38 str "hi"
202+29:42 tight glyph ]
20320330:1 NEWLINE
20420430:1 glyph ++
20520530:4 name unrelated
@@ -208,10 +208,10 @@
20820831:6 lit %dangling
20920932:5 INDENT
21021032:5 glyph ^-
211−32:8 name attribute
212−32:18 name gap
213−32:21 tight glyph +
214−32:22 tight lit %s2
215−32:25 DEDENT
216−32:25 DEDENT
217−32:25 NEWLINE
211+32:8 name attr
212+32:13 name gap
213+32:16 tight glyph +
214+32:17 tight lit %s2
215+32:20 DEDENT
216+32:20 DEDENT
217+32:20 NEWLINE
tests/golden/types-pair-context/tree.txt+34−34
@@ -1,64 +1,64 @@
11(module
22 (mold 1:1 spacing
33 (union 2:3 (const 2:3 %s0) (const 3:3 %s1) (const 4:3 %s2) (const 5:3 %s3)))
4− (mold 6:1 extent
4+ (mold 6:1 length
55 (union 7:3
66 (cell 7:3
77 (const 7:4 %fill)
88 (face 7:10 n (aura 7:12 @ud)))
99 (const 8:3 %shrink)))
10− (mold 9:1 attribute
10+ (mold 9:1 attr
1111 (union 10:3
1212 (cell 10:3 (const 10:4 %gap) (ref 10:9 spacing))
1313 (cell 11:3 (const 11:4 %pad) (ref 11:9 spacing))
14− (cell 12:3 (const 12:4 %width) (ref 12:11 extent))))
15− (mold 13:1 other-attribute
14+ (cell 12:3 (const 12:4 %width) (ref 12:11 length))))
15+ (mold 13:1 other-attr
1616 (union 14:3
1717 (cell 14:3 (const 14:4 %gap) (ref 14:9 spacing))
1818 (cell 15:3 (const 15:4 %pad) (ref 15:9 spacing))
19− (cell 16:3 (const 16:4 %width) (ref 16:11 extent))))
19+ (cell 16:3 (const 16:4 %width) (ref 16:11 length))))
2020 (value 17:1 one
2121 (cast 17:8
22− (ref 17:11 attribute)
23− (pair 17:21 gap (lit 17:25 %s2))))
22+ (ref 17:11 attr)
23+ (pair 17:16 gap (lit 17:20 %s2))))
2424 (value 18:1 equiv
2525 (cast 18:10
26− (ref 18:13 attribute)
27− (tuple 18:23 (lit 18:24 %gap) (lit 18:29 %s2))))
28− (value 19:1 attributes
29− (cast 19:15
30− (apply 19:18 list (ref 19:24 attribute))
31− (list 19:35
32− (pair 19:37 gap (lit 19:41 %s2))
33− (pair 19:45 pad (lit 19:49 %s3))
34− (pair 19:53 width
35− (tuple 19:59 (lit 19:60 %fill) (lit 19:66 1))))))
26+ (ref 18:13 attr)
27+ (tuple 18:18 (lit 18:19 %gap) (lit 18:24 %s2))))
28+ (value 19:1 attrs
29+ (cast 19:10
30+ (apply 19:13 list (ref 19:19 attr))
31+ (list 19:25
32+ (pair 19:27 gap (lit 19:31 %s2))
33+ (pair 19:35 pad (lit 19:39 %s3))
34+ (pair 19:43 width
35+ (tuple 19:49 (lit 19:50 %fill) (lit 19:56 1))))))
3636 (value 20:1 gap-structural
3737 (cast 20:19
3838 (cell 20:22 (aura 20:23 @tas) (aura 20:28 @tas))
3939 (pair 20:34 gap (lit 20:38 %s2))))
4040 (value 21:1 nested
4141 (cast 21:11
42− (ref 21:14 attribute)
43− (pair 21:24 width
44− (tuple 21:30 (lit 21:31 %fill) (lit 21:37 1)))))
42+ (ref 21:14 attr)
43+ (pair 21:19 width
44+ (tuple 21:25 (lit 21:26 %fill) (lit 21:32 1)))))
4545 (value 22:1 mismatch
4646 (cast 22:13
47− (ref 22:16 attribute)
48− (pair 22:26 gap (lit 22:30 %shrink))))
47+ (ref 22:16 attr)
48+ (pair 22:21 gap (lit 22:25 %shrink))))
4949 (value 23:1 missing
5050 (cast 23:12
51− (ref 23:15 attribute)
52− (pair 23:25 width
53− (tuple 23:31 (lit 23:32 %oops) (lit 23:38 1)))))
51+ (ref 23:15 attr)
52+ (pair 23:20 width
53+ (tuple 23:26 (lit 23:27 %oops) (lit 23:33 1)))))
5454 (value 24:1 pending
5555 (pair 24:12 gap (lit 24:16 %s2)))
5656 (value 25:1 cross-origin
5757 (cast 25:17
58− (ref 25:20 attribute)
59− (cast 25:30
60− (ref 25:33 other-attribute)
61− (pair 25:49 gap (lit 25:53 %s2)))))
58+ (ref 25:20 attr)
59+ (cast 25:25
60+ (ref 25:28 other-attr)
61+ (pair 25:39 gap (lit 25:43 %s2)))))
6262 (value 26:1 noun-pair
6363 (cast 26:14
6464 (cell 26:17 (noun 26:18) (noun 26:20))
@@ -73,14 +73,14 @@
7373 (pair 28:29 gap (lit 28:33 %s2))))
7474 (value 29:1 wrong-number
7575 (cast 29:17
76− (ref 29:20 attribute)
77− (pair 29:30 width
78− (tuple 29:36 (lit 29:37 %fill) (str 29:43 "hi")))))
76+ (ref 29:20 attr)
77+ (pair 29:25 width
78+ (tuple 29:31 (lit 29:32 %fill) (str 29:38 "hi")))))
7979 (value 30:1 unrelated
8080 (body 31:3
8181 (trace 31:3
8282 (lit 31:6 %dangling)
8383 (body 32:5
8484 (cast 32:5
85− (ref 32:8 attribute)
86− (pair 32:18 gap (lit 32:22 %s2))))))))
85+ (ref 32:8 attr)
86+ (pair 32:13 gap (lit 32:17 %s2))))))))
tests/golden/types-pair-context/types.txt+19−19
@@ -1,27 +1,27 @@
11partial inference; module not checked
22+$ spacing: cases proven disjoint; mold not checked
3−+$ extent: cases proven disjoint; mold not checked
4−+$ attribute: cases proven disjoint; mold not checked
5−+$ other-attribute: cases proven disjoint; mold not checked
6−++ one: attribute
7−++ equiv: attribute
8−++ attributes: (list attribute)
3++$ length: cases proven disjoint; mold not checked
4++$ attr: cases proven disjoint; mold not checked
5++$ other-attr: cases proven disjoint; mold not checked
6+++ one: attr
7+++ equiv: attr
8+++ attrs: (list attr)
99++ gap-structural: [@tas @tas]
10−++ nested: attribute
10+++ nested: attr
1111++ mismatch: cast mold and expression type do not unify
1212/tests/golden/types-pair-context/source.jibb:22:16: cast mold
13−++ mismatch ^- attribute gap+%shrink
13+++ mismatch ^- attr gap+%shrink
1414 ^
15−/tests/golden/types-pair-context/source.jibb:22:26: expression
16−++ mismatch ^- attribute gap+%shrink
17− ^
15+/tests/golden/types-pair-context/source.jibb:22:21: expression
16+++ mismatch ^- attr gap+%shrink
17+ ^
1818++ missing: cast mold and expression type do not unify
1919/tests/golden/types-pair-context/source.jibb:23:15: cast mold
20−++ missing ^- attribute width+[%oops 1]
20+++ missing ^- attr width+[%oops 1]
2121 ^
22−/tests/golden/types-pair-context/source.jibb:23:25: expression
23−++ missing ^- attribute width+[%oops 1]
24− ^
22+/tests/golden/types-pair-context/source.jibb:23:20: expression
23+++ missing ^- attr width+[%oops 1]
24+ ^
2525++ pending: tag needs context in partial inference
2626++ cross-origin: cast constraint is not supported by partial inference
2727++ noun-pair: [* *]
@@ -35,9 +35,9 @@ partial inference; module not checked
3535 ^
3636++ wrong-number: cast mold and expression type do not unify
3737/tests/golden/types-pair-context/source.jibb:29:20: cast mold
38−++ wrong-number ^- attribute width+[%fill "hi"]
38+++ wrong-number ^- attr width+[%fill "hi"]
3939 ^
40−/tests/golden/types-pair-context/source.jibb:29:30: expression
41−++ wrong-number ^- attribute width+[%fill "hi"]
42− ^
40+/tests/golden/types-pair-context/source.jibb:29:25: expression
41+++ wrong-number ^- attr width+[%fill "hi"]
42+ ^
4343++ unrelated: tag needs context in partial inference
tests/golden/types-partial-aura-family/source.jibb+1−1
@@ -1,7 +1,7 @@
11++ decimal |= x=@ud ^- @u x
22++ hex ^- @u 0x1f
33++ base32 |= x=@uv ^- @u x
4−++ text-value |= x=@tD ^- @t x
4+++ text |= x=@tD ^- @t x
55++ narrow |= x=@t ^- @tD x
66++ siblings |= x=@ux ^- @ud x
77++ dup |= p=[A A] p
tests/golden/types-partial-aura-family/tokens.txt+8−8
@@ -25,14 +25,14 @@
25253:26 name x
26264:1 NEWLINE
27274:1 glyph ++
28−4:4 name text-value
29−4:15 glyph |=
30−4:18 name x
31−4:19 tight glyph =
32−4:20 tight aura @tD
33−4:24 glyph ^-
34−4:27 aura @t
35−4:30 name x
28+4:4 name text
29+4:9 glyph |=
30+4:12 name x
31+4:13 tight glyph =
32+4:14 tight aura @tD
33+4:18 glyph ^-
34+4:21 aura @t
35+4:24 name x
36365:1 NEWLINE
37375:1 glyph ++
38385:4 name narrow
tests/golden/types-partial-aura-family/tree.txt+4−4
@@ -9,10 +9,10 @@
99 (gate 3:11
1010 (face 3:14 x (aura 3:16 @uv))
1111 (cast 3:20 (aura 3:23 @u) (wing 3:26 x))))
12− (value 4:1 text-value
13− (gate 4:15
14− (face 4:18 x (aura 4:20 @tD))
15− (cast 4:24 (aura 4:27 @t) (wing 4:30 x))))
12+ (value 4:1 text
13+ (gate 4:9
14+ (face 4:12 x (aura 4:14 @tD))
15+ (cast 4:18 (aura 4:21 @t) (wing 4:24 x))))
1616 (value 5:1 narrow
1717 (gate 5:11
1818 (face 5:14 x (aura 5:16 @t))
tests/golden/types-partial-aura-family/types.txt+1−1
@@ -2,7 +2,7 @@ partial inference; module not checked
22++ decimal: $-(@ud @u)
33++ hex: @u
44++ base32: $-(@uv @u)
5−++ text-value: $-(@tD @t)
5+++ text: $-(@tD @t)
66++ narrow: cast mold and expression type do not unify
77/tests/golden/types-partial-aura-family/source.jibb:5:22: cast mold has type @tD
88++ narrow |= x=@t ^- @tD x
tests/golden/types-partial-locals/source.jibb+2−2
@@ -32,9 +32,9 @@
3232++ local-mold |= x
3333 +$ item @t
3434 x
35−++ wrap-value |= y |=(z y)
35+++ wrap |= y |=(z y)
3636++ through-global |= x
37− ++ local (wrap-value x)
37+ ++ local (wrap x)
3838 ~& ^- @t (local ~zod)
3939 ^- @p (local "hi")
4040++ nested-shadow |= x
tests/golden/types-partial-locals/tokens.txt+10−10
@@ -180,13 +180,13 @@
18018035:1 DEDENT
18118135:1 NEWLINE
18218235:1 glyph ++
183−35:4 name wrap-value
184−35:15 glyph |=
185−35:18 name y
186−35:20 glyph |=(
187−35:23 tight name z
188−35:25 name y
189−35:26 tight glyph )
183+35:4 name wrap
184+35:9 glyph |=
185+35:12 name y
186+35:14 glyph |=(
187+35:17 tight name z
188+35:19 name y
189+35:20 tight glyph )
19019036:1 NEWLINE
19119136:1 glyph ++
19219236:4 name through-global
@@ -196,9 +196,9 @@
19619637:3 glyph ++
19719737:6 name local
19819837:12 glyph (
199−37:13 tight name wrap-value
200−37:24 name x
201−37:25 tight glyph )
199+37:13 tight name wrap
200+37:18 name x
201+37:19 tight glyph )
20220238:3 NEWLINE
20320338:3 glyph ~&
20420438:6 glyph ^-
tests/golden/types-partial-locals/tree.txt+5−5
@@ -88,17 +88,17 @@
8888 (body 33:3
8989 (mold 33:3 item (aura 33:11 @t))
9090 (wing 34:3 x))))
91− (value 35:1 wrap-value
92− (gate 35:15
93− (bind 35:18 y)
94− (gate-wide 35:20 (bind 35:23 z) (wing 35:25 y))))
91+ (value 35:1 wrap
92+ (gate 35:9
93+ (bind 35:12 y)
94+ (gate-wide 35:14 (bind 35:17 z) (wing 35:19 y))))
9595 (value 36:1 through-global
9696 (gate 36:19
9797 (bind 36:22 x)
9898 (body 37:3
9999 (value 37:3 local
100100 (group 37:12
101− (call 37:13 (wing 37:13 wrap-value) (wing 37:24 x))))
101+ (call 37:13 (wing 37:13 wrap) (wing 37:18 x))))
102102 (trace 38:3
103103 (cast 38:6
104104 (aura 38:9 @t)
tests/golden/types-partial-locals/types.txt+1−1
@@ -21,7 +21,7 @@ partial inference; module not checked
2121 ^
2222++ unused-bad: local definitions need unsupported inference
2323++ local-mold: $-(A A)
24−++ wrap-value: $-(A $-(B A))
24+++ wrap: $-(A $-(B A))
2525++ through-global: cast mold and expression type do not unify
2626/tests/golden/types-partial-locals/source.jibb:39:8: cast mold has type @p
2727 ^- @p (local "hi")
tests/golden/types-partial-union-nested-nouns/about.txtdeleted−4
@@ -1,4 +0,0 @@
1−source: docs/spec/grammar.md, Molds, Unions: "Cases must differ as nouns"; "a cell with an empty position at any depth is itself empty".
2−tests: Nested zero literals compare by noun across spelling, while distinct nested constants are disjoint. An empty field below an unknown gate makes the whole cell empty; without that field, gate inhabitation is unknown. A fully inhabited cell overlaps the noun mold. This reports pairwise partial mold analysis, not checked molds.
3−expect: parses
4−expect-types: a partial inference report
tests/golden/types-partial-union-nested-nouns/source.jibbdeleted−18
@@ -1,18 +0,0 @@
1−+$ nested-zero
2− [%tag [%$ @t]]
3− [%tag [~ @t]]
4−+$ nested-flag-zero
5− [%tag [%.y @t]]
6− [%tag [%$ @t]]
7−+$ nested-distinct
8− [%tag [%a @t]]
9− [%tag [%b @t]]
10−+$ empty-beneath-unknown
11− *
12− [%tag [$-(@t @t) !!]]
13−+$ unknown-inhabitation
14− *
15− [%tag [$-(@t @t) @t]]
16−+$ known-inhabitation
17− *
18− [%tag [@t @p]]
tests/golden/types-partial-union-nested-nouns/tokens.txtdeleted−108
@@ -1,108 +0,0 @@
1−1:1 glyph +$
2−1:4 name nested-zero
3−2:3 INDENT
4−2:3 glyph [
5−2:4 tight lit %tag
6−2:9 glyph [
7−2:10 tight lit %$
8−2:13 aura @t
9−2:15 tight glyph ]
10−2:16 tight glyph ]
11−3:3 NEWLINE
12−3:3 glyph [
13−3:4 tight lit %tag
14−3:9 glyph [
15−3:10 tight lit ~
16−3:12 aura @t
17−3:14 tight glyph ]
18−3:15 tight glyph ]
19−4:1 DEDENT
20−4:1 NEWLINE
21−4:1 glyph +$
22−4:4 name nested-flag-zero
23−5:3 INDENT
24−5:3 glyph [
25−5:4 tight lit %tag
26−5:9 glyph [
27−5:10 tight lit %.y
28−5:14 aura @t
29−5:16 tight glyph ]
30−5:17 tight glyph ]
31−6:3 NEWLINE
32−6:3 glyph [
33−6:4 tight lit %tag
34−6:9 glyph [
35−6:10 tight lit %$
36−6:13 aura @t
37−6:15 tight glyph ]
38−6:16 tight glyph ]
39−7:1 DEDENT
40−7:1 NEWLINE
41−7:1 glyph +$
42−7:4 name nested-distinct
43−8:3 INDENT
44−8:3 glyph [
45−8:4 tight lit %tag
46−8:9 glyph [
47−8:10 tight lit %a
48−8:13 aura @t
49−8:15 tight glyph ]
50−8:16 tight glyph ]
51−9:3 NEWLINE
52−9:3 glyph [
53−9:4 tight lit %tag
54−9:9 glyph [
55−9:10 tight lit %b
56−9:13 aura @t
57−9:15 tight glyph ]
58−9:16 tight glyph ]
59−10:1 DEDENT
60−10:1 NEWLINE
61−10:1 glyph +$
62−10:4 name empty-beneath-unknown
63−11:3 INDENT
64−11:3 glyph *
65−12:3 NEWLINE
66−12:3 glyph [
67−12:4 tight lit %tag
68−12:9 glyph [
69−12:10 tight glyph $-(
70−12:13 tight aura @t
71−12:16 aura @t
72−12:18 tight glyph )
73−12:20 glyph !!
74−12:22 tight glyph ]
75−12:23 tight glyph ]
76−13:1 DEDENT
77−13:1 NEWLINE
78−13:1 glyph +$
79−13:4 name unknown-inhabitation
80−14:3 INDENT
81−14:3 glyph *
82−15:3 NEWLINE
83−15:3 glyph [
84−15:4 tight lit %tag
85−15:9 glyph [
86−15:10 tight glyph $-(
87−15:13 tight aura @t
88−15:16 aura @t
89−15:18 tight glyph )
90−15:20 aura @t
91−15:22 tight glyph ]
92−15:23 tight glyph ]
93−16:1 DEDENT
94−16:1 NEWLINE
95−16:1 glyph +$
96−16:4 name known-inhabitation
97−17:3 INDENT
98−17:3 glyph *
99−18:3 NEWLINE
100−18:3 glyph [
101−18:4 tight lit %tag
102−18:9 glyph [
103−18:10 tight aura @t
104−18:13 aura @p
105−18:15 tight glyph ]
106−18:16 tight glyph ]
107−18:17 DEDENT
108−18:17 NEWLINE
tests/golden/types-partial-union-nested-nouns/tree.txtdeleted−47
@@ -1,47 +0,0 @@
1−(module
2− (mold 1:1 nested-zero
3− (union 2:3
4− (cell 2:3
5− (const 2:4 %tag)
6− (cell 2:9 (const 2:10 %$) (aura 2:13 @t)))
7− (cell 3:3
8− (const 3:4 %tag)
9− (cell 3:9 (const 3:10 ~) (aura 3:12 @t)))))
10− (mold 4:1 nested-flag-zero
11− (union 5:3
12− (cell 5:3
13− (const 5:4 %tag)
14− (cell 5:9 (const 5:10 %.y) (aura 5:14 @t)))
15− (cell 6:3
16− (const 6:4 %tag)
17− (cell 6:9 (const 6:10 %$) (aura 6:13 @t)))))
18− (mold 7:1 nested-distinct
19− (union 8:3
20− (cell 8:3
21− (const 8:4 %tag)
22− (cell 8:9 (const 8:10 %a) (aura 8:13 @t)))
23− (cell 9:3
24− (const 9:4 %tag)
25− (cell 9:9 (const 9:10 %b) (aura 9:13 @t)))))
26− (mold 10:1 empty-beneath-unknown
27− (union 11:3
28− (noun 11:3)
29− (cell 12:3
30− (const 12:4 %tag)
31− (cell 12:9
32− (fn 12:10 (aura 12:13 @t) (aura 12:16 @t))
33− (void 12:20)))))
34− (mold 13:1 unknown-inhabitation
35− (union 14:3
36− (noun 14:3)
37− (cell 15:3
38− (const 15:4 %tag)
39− (cell 15:9
40− (fn 15:10 (aura 15:13 @t) (aura 15:16 @t))
41− (aura 15:20 @t)))))
42− (mold 16:1 known-inhabitation
43− (union 17:3
44− (noun 17:3)
45− (cell 18:3
46− (const 18:4 %tag)
47− (cell 18:9 (aura 18:10 @t) (aura 18:13 @p))))))
tests/golden/types-partial-union-nested-nouns/types.txtdeleted−25
@@ -1,25 +0,0 @@
1−partial inference; module not checked
2−+$ nested-zero: overlapping cases; mold not checked
3−/tests/golden/types-partial-union-nested-nouns/source.jibb:2:3: first union case
4− [%tag [%$ @t]]
5− ^
6−/tests/golden/types-partial-union-nested-nouns/source.jibb:3:3: overlapping case
7− [%tag [~ @t]]
8− ^
9−+$ nested-flag-zero: overlapping cases; mold not checked
10−/tests/golden/types-partial-union-nested-nouns/source.jibb:5:3: first union case
11− [%tag [%.y @t]]
12− ^
13−/tests/golden/types-partial-union-nested-nouns/source.jibb:6:3: overlapping case
14− [%tag [%$ @t]]
15− ^
16−+$ nested-distinct: cases proven disjoint; mold not checked
17−+$ empty-beneath-unknown: cases proven disjoint; mold not checked
18−+$ unknown-inhabitation: case disjointness unresolved; mold not checked
19−+$ known-inhabitation: overlapping cases; mold not checked
20−/tests/golden/types-partial-union-nested-nouns/source.jibb:17:3: first union case
21− *
22− ^
23−/tests/golden/types-partial-union-nested-nouns/source.jibb:18:3: overlapping case
24− [%tag [@t @p]]
25− ^
tests/golden/types-prelude-arithmetic/about.txt+1−1
@@ -1,4 +1,4 @@
11source: docs/spec/grammar.md, Molds, Atoms: "Arithmetic rejects loobean operands: `?` contains only 0 and 1, while an arithmetic result need not."
2−tests: The source-backed add, dec and gth wrappers preserve numeric auras, constrained generic types, and independent comparison behavior. Loobean operands are rejected by add and dec; the source-backed lent infers list lengths. Primitive lowering, jet recognition and execution remain unfinished. The module report is partial.
2+tests: The source-backed add, dec and gth wrappers preserve numeric auras, constrained generic types, and independent comparison behavior. Loobean operands are rejected by add and dec; lent remains unavailable. Primitive lowering, jet recognition and execution remain unfinished. The module report is partial.
33expect: parses
44expect-types: a partial inference report
tests/golden/types-prelude-arithmetic/source.jibb+1−1
@@ -15,7 +15,7 @@
1515++ add-hex (add 0x1 0x2)
1616++ reject-bool-dec (dec %.n)
1717++ dec-hex (dec 0x2)
18−++ list-length (lent ~["a"])
18+++ unavailable-length (lent ~["a"])
1919++ captured |= x=? (add x x)
2020++ captured-local |= x=?
2121 ++ local |= y=? (add x y)
tests/golden/types-prelude-arithmetic/tokens.txt+7−7
@@ -142,13 +142,13 @@
14214217:20 tight glyph )
14314318:1 NEWLINE
14414418:1 glyph ++
145−18:4 name list-length
146−18:16 glyph (
147−18:17 tight name lent
148−18:22 glyph ~[
149−18:24 tight str "a"
150−18:27 tight glyph ]
151−18:28 tight glyph )
145+18:4 name unavailable-length
146+18:23 glyph (
147+18:24 tight name lent
148+18:29 glyph ~[
149+18:31 tight str "a"
150+18:34 tight glyph ]
151+18:35 tight glyph )
15215219:1 NEWLINE
15315319:1 glyph ++
15415419:4 name captured
tests/golden/types-prelude-arithmetic/tree.txt+5−5
@@ -57,11 +57,11 @@
5757 (value 17:1 dec-hex
5858 (group 17:12
5959 (call 17:13 (wing 17:13 dec) (lit 17:17 0x2))))
60− (value 18:1 list-length
61− (group 18:16
62− (call 18:17
63− (wing 18:17 lent)
64− (list 18:22 (str 18:24 "a")))))
60+ (value 18:1 unavailable-length
61+ (group 18:23
62+ (call 18:24
63+ (wing 18:24 lent)
64+ (list 18:29 (str 18:31 "a")))))
6565 (value 19:1 captured
6666 (gate 19:13
6767 (face 19:16 x (flag 19:18))
tests/golden/types-prelude-arithmetic/types.txt+1−1
@@ -38,7 +38,7 @@ partial inference; module not checked
3838++ reject-bool-dec (dec %.n)
3939 ^
4040++ dec-hex: @ux
41−++ list-length: @ud
41+++ unavailable-length: name is not available to partial inference
4242++ captured: call's sample and argument types do not unify
4343/tests/golden/types-prelude-arithmetic/source.jibb:19:21: called gate has type $-([A A] A) where A is an atom other than ?
4444++ captured |= x=? (add x x)
tests/golden/types-prelude-ask/source.jibb+1−1
@@ -40,7 +40,7 @@
4040++ ordinary-path ^- path ~[~.items]
4141++ ask-from-ordinary (agent ordinary-path |=(v=[mark=@tas state=(unit *) fact=*] [state=0 message="ok"]))
4242++ ask-from-qath (agent %/items |=(v=[mark=@tas state=(unit *) fact=*] [state=0 message="ok"]))
43−++ store-ask |= rec=$-([state=(unit *) fact=*] [state=* message=@t])
43+++ store |= rec=$-([state=(unit *) fact=*] [state=* message=@t])
4444 ^- (ask @t) [%store module="/ui/store/cart" name=%state receive=rec]
4545++ wrong-store |= rec=$-([state=(unit *) fact=*] [state=* message=@p])
4646 ^- (ask @t) [%store module="/ui/store/cart" name=%state receive=rec]
tests/golden/types-prelude-ask/tokens.txt+25−25
@@ -639,31 +639,31 @@
63963942:95 tight glyph )
64064043:1 NEWLINE
64164143:1 glyph ++
642−43:4 name store-ask
643−43:14 glyph |=
644−43:17 name rec
645−43:20 tight glyph =
646−43:21 tight glyph $-(
647−43:24 tight glyph [
648−43:25 tight name state
649−43:30 tight glyph =
650−43:31 tight glyph (
651−43:32 tight name unit
652−43:37 glyph *
653−43:38 tight glyph )
654−43:40 name fact
655−43:44 tight glyph =
656−43:45 tight glyph *
657−43:46 tight glyph ]
658−43:48 glyph [
659−43:49 tight name state
660−43:54 tight glyph =
661−43:55 tight glyph *
662−43:57 name message
663−43:64 tight glyph =
664−43:65 tight aura @t
665−43:67 tight glyph ]
666−43:68 tight glyph )
642+43:4 name store
643+43:10 glyph |=
644+43:13 name rec
645+43:16 tight glyph =
646+43:17 tight glyph $-(
647+43:20 tight glyph [
648+43:21 tight name state
649+43:26 tight glyph =
650+43:27 tight glyph (
651+43:28 tight name unit
652+43:33 glyph *
653+43:34 tight glyph )
654+43:36 name fact
655+43:40 tight glyph =
656+43:41 tight glyph *
657+43:42 tight glyph ]
658+43:44 glyph [
659+43:45 tight name state
660+43:50 tight glyph =
661+43:51 tight glyph *
662+43:53 name message
663+43:60 tight glyph =
664+43:61 tight aura @t
665+43:63 tight glyph ]
666+43:64 tight glyph )
66766744:3 INDENT
66866844:3 glyph ^-
66966944:6 glyph (
tests/golden/types-prelude-ask/tree.txt+11−11
@@ -266,17 +266,17 @@
266266 (tuple 42:72
267267 (face 42:73 state (lit 42:79 0))
268268 (face 42:81 message (str 42:89 "ok")))))))
269− (value 43:1 store-ask
270− (gate 43:14
271− (face 43:17 rec
272− (fn 43:21
273− (cell 43:24
274− (face 43:25 state
275− (apply 43:31 unit (noun 43:37)))
276− (face 43:40 fact (noun 43:45)))
277− (cell 43:48
278− (face 43:49 state (noun 43:55))
279− (face 43:57 message (aura 43:65 @t)))))
269+ (value 43:1 store
270+ (gate 43:10
271+ (face 43:13 rec
272+ (fn 43:17
273+ (cell 43:20
274+ (face 43:21 state
275+ (apply 43:27 unit (noun 43:33)))
276+ (face 43:36 fact (noun 43:41)))
277+ (cell 43:44
278+ (face 43:45 state (noun 43:51))
279+ (face 43:53 message (aura 43:61 @t)))))
280280 (body 44:3
281281 (cast 44:3
282282 (apply 44:6 ask (aura 44:11 @t))
tests/golden/types-prelude-ask/types.txt+1−1
@@ -35,7 +35,7 @@ partial inference; module not checked
3535++ ordinary-path: (list @ta)
3636++ ask-from-ordinary: call constraint is not supported by partial inference
3737++ ask-from-qath: call constraint is not supported by partial inference
38−++ store-ask: $-($-([state=(unit *) fact=*] [state=* message=@t]) (ask @t))
38+++ store: $-($-([state=(unit *) fact=*] [state=* message=@t]) (ask @t))
3939++ wrong-store: cast constraint is not supported by partial inference
4040++ incomplete: missing union case [%store [module=@t [name=@tas receive=$-([state=(unit *) fact=*] [state=* message=@t])]]]
4141++ complete: $-((ask @t) @t)
tests/golden/types-prelude-bond/source.jibb+1−1
@@ -1,6 +1,6 @@
11++ choose (bond |=(~ "default"))
22++ missing (choose ~)
33++ present (choose `"found")
4−++ wrap-value |= fallback=$-(~ A) (bond fallback)
4+++ wrap |= fallback=$-(~ A) (bond fallback)
55++ choose-ship (bond |=(~ ~zod))
66++ present-ship (choose-ship `~zod)
tests/golden/types-prelude-bond/tokens.txt+12−12
@@ -24,18 +24,18 @@
24243:28 tight glyph )
25254:1 NEWLINE
26264:1 glyph ++
27−4:4 name wrap-value
28−4:15 glyph |=
29−4:18 name fallback
30−4:26 tight glyph =
31−4:27 tight glyph $-(
32−4:30 tight lit ~
33−4:32 tvar A
34−4:33 tight glyph )
35−4:35 glyph (
36−4:36 tight name bond
37−4:41 name fallback
38−4:49 tight glyph )
27+4:4 name wrap
28+4:9 glyph |=
29+4:12 name fallback
30+4:20 tight glyph =
31+4:21 tight glyph $-(
32+4:24 tight lit ~
33+4:26 tvar A
34+4:27 tight glyph )
35+4:29 glyph (
36+4:30 tight name bond
37+4:35 name fallback
38+4:43 tight glyph )
39395:1 NEWLINE
40405:1 glyph ++
41415:4 name choose-ship
tests/golden/types-prelude-bond/tree.txt+6−6
@@ -12,12 +12,12 @@
1212 (call 3:13
1313 (wing 3:13 choose)
1414 (unit 3:20 (str 3:21 "found")))))
15− (value 4:1 wrap-value
16− (gate 4:15
17− (face 4:18 fallback
18− (fn 4:27 (const 4:30 ~) (tvar 4:32 A)))
19− (group 4:35
20− (call 4:36 (wing 4:36 bond) (wing 4:41 fallback)))))
15+ (value 4:1 wrap
16+ (gate 4:9
17+ (face 4:12 fallback
18+ (fn 4:21 (const 4:24 ~) (tvar 4:26 A)))
19+ (group 4:29
20+ (call 4:30 (wing 4:30 bond) (wing 4:35 fallback)))))
2121 (value 5:1 choose-ship
2222 (group 5:16
2323 (call 5:17
tests/golden/types-prelude-bond/types.txt+1−1
@@ -2,6 +2,6 @@ partial inference; module not checked
22++ choose: $-((unit @t) @t)
33++ missing: @t
44++ present: @t
5−++ wrap-value: $-($-(~ A) $-((unit A) A))
5+++ wrap: $-($-(~ A) $-((unit A) A))
66++ choose-ship: $-((unit @p) @p)
77++ present-ship: @p
tests/golden/types-prelude-cmd/about.txt+1−1
@@ -1,4 +1,4 @@
11source: Overview, Effects: `cmd` is a generic union with `%poke`, `%go`, `%wait`, `%now` and `%who` cases; a poke carries a reply over `(unit @t)`.
2−tests: The doc-exact source-backed prelude mold and its five cases infer, retain independently instantiated message types, and work in list context. Incorrect URL, message, callback result, list item and cross-instantiation types report mismatches; an unsupported callback sample fails closed. The full module remains unchecked.
2+tests: The doc-exact source-backed prelude mold and its five cases infer, retain independently instantiated message types, and work in list context. Incorrect URL, message, callback result and list item types report mismatches; an unsupported callback sample or cross-instantiation fails closed. The full module remains unchecked.
33expect: parses
44expect-types: a partial inference report
tests/golden/types-prelude-cmd/source.jibb+4−4
@@ -8,9 +8,9 @@
88++ wait ^- (cmd @t) [%wait ~s30 "done"]
99++ who ^- (cmd @t) [%who |=(p=@p "done")]
1010++ wrong-message ^- (cmd @t) [%wait ~s30 ~zod]
11−++ wrap-value |= x=A ^- (cmd A) [%wait ~s30 x]
12−++ wrap-value-text (wrap-value "hello")
13−++ wrap-value-ship (wrap-value ~zod)
11+++ wrap |= x=A ^- (cmd A) [%wait ~s30 x]
12+++ wrap-text (wrap "hello")
13+++ wrap-ship (wrap ~zod)
1414++ wrong-reply ^- (cmd @t) [%who |=(p=@p ~zod)]
1515++ commands ^- (list (cmd @t)) ~[[%go "/home"] [%wait ~s30 "done"]]
1616++ commands-bad ^- (list (cmd @t)) ~[[%go "/home"] [%wait ~s30 ~zod]]
@@ -18,4 +18,4 @@
1818 ^- (cmd @t) [%poke p |=(r=@p "done")]
1919++ wrong-case ^- (cmd @t) %oops
2020++ use-text |= x=(cmd @t) x
21−++ cross (use-text (wrap-value ~zod))
21+++ cross (use-text (wrap ~zod))
tests/golden/types-prelude-cmd/tokens.txt+30−30
@@ -138,35 +138,35 @@
13813810:46 tight glyph ]
13913911:1 NEWLINE
14014011:1 glyph ++
141−11:4 name wrap-value
142−11:15 glyph |=
143−11:18 name x
144−11:19 tight glyph =
145−11:20 tight tvar A
146−11:22 glyph ^-
147−11:25 glyph (
148−11:26 tight name cmd
149−11:30 tvar A
150−11:31 tight glyph )
151−11:33 glyph [
152−11:34 tight lit %wait
153−11:40 lit ~s30
154−11:45 name x
155−11:46 tight glyph ]
141+11:4 name wrap
142+11:9 glyph |=
143+11:12 name x
144+11:13 tight glyph =
145+11:14 tight tvar A
146+11:16 glyph ^-
147+11:19 glyph (
148+11:20 tight name cmd
149+11:24 tvar A
150+11:25 tight glyph )
151+11:27 glyph [
152+11:28 tight lit %wait
153+11:34 lit ~s30
154+11:39 name x
155+11:40 tight glyph ]
15615612:1 NEWLINE
15715712:1 glyph ++
158−12:4 name wrap-value-text
159−12:20 glyph (
160−12:21 tight name wrap-value
161−12:32 str "hello"
162−12:39 tight glyph )
158+12:4 name wrap-text
159+12:14 glyph (
160+12:15 tight name wrap
161+12:20 str "hello"
162+12:27 tight glyph )
16316313:1 NEWLINE
16416413:1 glyph ++
165−13:4 name wrap-value-ship
166−13:20 glyph (
167−13:21 tight name wrap-value
168−13:32 lit ~zod
169−13:36 tight glyph )
165+13:4 name wrap-ship
166+13:14 glyph (
167+13:15 tight name wrap
168+13:20 lit ~zod
169+13:24 tight glyph )
17017014:1 NEWLINE
17117114:1 glyph ++
17217214:4 name wrong-reply
@@ -278,8 +278,8 @@
27827821:10 glyph (
27927921:11 tight name use-text
28028021:20 glyph (
281−21:21 tight name wrap-value
282−21:32 lit ~zod
283−21:36 tight glyph )
284−21:37 tight glyph )
285−21:38 NEWLINE
281+21:21 tight name wrap
282+21:26 lit ~zod
283+21:30 tight glyph )
284+21:31 tight glyph )
285+21:32 NEWLINE
tests/golden/types-prelude-cmd/tree.txt+13−13
@@ -59,18 +59,18 @@
5959 (cast 10:18
6060 (apply 10:21 cmd (aura 10:26 @t))
6161 (tuple 10:30 (lit 10:31 %wait) (lit 10:37 ~s30) (lit 10:42 ~zod))))
62− (value 11:1 wrap-value
63− (gate 11:15
64− (face 11:18 x (tvar 11:20 A))
65− (cast 11:22
66− (apply 11:25 cmd (tvar 11:30 A))
67− (tuple 11:33 (lit 11:34 %wait) (lit 11:40 ~s30) (wing 11:45 x)))))
68− (value 12:1 wrap-value-text
69− (group 12:20
70− (call 12:21 (wing 12:21 wrap-value) (str 12:32 "hello"))))
71− (value 13:1 wrap-value-ship
72− (group 13:20
73− (call 13:21 (wing 13:21 wrap-value) (lit 13:32 ~zod))))
62+ (value 11:1 wrap
63+ (gate 11:9
64+ (face 11:12 x (tvar 11:14 A))
65+ (cast 11:16
66+ (apply 11:19 cmd (tvar 11:24 A))
67+ (tuple 11:27 (lit 11:28 %wait) (lit 11:34 ~s30) (wing 11:39 x)))))
68+ (value 12:1 wrap-text
69+ (group 12:14
70+ (call 12:15 (wing 12:15 wrap) (str 12:20 "hello"))))
71+ (value 13:1 wrap-ship
72+ (group 13:14
73+ (call 13:15 (wing 13:15 wrap) (lit 13:20 ~zod))))
7474 (value 14:1 wrong-reply
7575 (cast 14:16
7676 (apply 14:19 cmd (aura 14:24 @t))
@@ -119,4 +119,4 @@
119119 (call 21:11
120120 (wing 21:11 use-text)
121121 (group 21:20
122− (call 21:21 (wing 21:21 wrap-value) (lit 21:32 ~zod)))))))
122+ (call 21:21 (wing 21:21 wrap) (lit 21:26 ~zod)))))))
tests/golden/types-prelude-cmd/types.txt+4−10
@@ -20,9 +20,9 @@ partial inference; module not checked
2020/tests/golden/types-prelude-cmd/source.jibb:10:30: expression
2121++ wrong-message ^- (cmd @t) [%wait ~s30 ~zod]
2222 ^
23−++ wrap-value: $-(A (cmd A))
24−++ wrap-value-text: (cmd @t)
25−++ wrap-value-ship: (cmd @p)
23+++ wrap: $-(A (cmd A))
24+++ wrap-text: (cmd @t)
25+++ wrap-ship: (cmd @p)
2626++ wrong-reply: cast mold and expression type do not unify
2727/tests/golden/types-prelude-cmd/source.jibb:14:19: cast mold
2828++ wrong-reply ^- (cmd @t) [%who |=(p=@p ~zod)]
@@ -47,10 +47,4 @@ partial inference; module not checked
4747++ wrong-case ^- (cmd @t) %oops
4848 ^
4949++ use-text: $-((cmd @t) (cmd @t))
50−++ cross: call's sample and argument types do not unify
51−/tests/golden/types-prelude-cmd/source.jibb:21:21: called gate
52−++ cross (use-text (wrap-value ~zod))
53− ^
54−/tests/golden/types-prelude-cmd/source.jibb:21:32: argument has type @p
55−++ cross (use-text (wrap-value ~zod))
56− ^
50+++ cross: call constraint is not supported by partial inference
tests/golden/types-prelude-comparison/about.txtdeleted−4
@@ -1,4 +0,0 @@
1−source: docs/spec/grammar.md, Molds, Atoms: "Comparison may take loobeans and returns `?`." The prelude inventory includes `lth`, `gte`, and `lte`.
2−tests: Source-backed comparisons infer for less, greater and equal ordered operands, both loobean orders, a shared generic atom type and matching hex auras. Distinct explicit auras fail closed. The report is partial; backend lowering, execution and jet recognition remain unverified.
3−expect: parses
4−expect-types: a partial inference report
tests/golden/types-prelude-comparison/modules.txtdeleted−1
@@ -1 +0,0 @@
1−# no module fixtures
tests/golden/types-prelude-comparison/source.jibbdeleted−18
@@ -1,18 +0,0 @@
1−++ less (lth 1 2)
2−++ greater (lth 2 1)
3−++ equal (lth 1 1)
4−++ gte-less (gte 1 2)
5−++ gte-greater (gte 2 1)
6−++ gte-equal (gte 1 1)
7−++ lte-less (lte 1 2)
8−++ lte-greater (lte 2 1)
9−++ lte-equal (lte 1 1)
10−++ flags-forward (gte %.y %.n)
11−++ flags-reverse (lte %.n %.y)
12−++ flags-equal (lth %.y %.y)
13−++ hex (lth 0x1 0x2)
14−++ generic-lth |= [a=A b=A] (lth a b)
15−++ generic-gte |= [a=A b=A] (gte a b)
16−++ generic-lte |= [a=A b=A] (lte a b)
17−++ bad-aura (lth 0x1 (^- @ud 1))
18−++ bad-kind (gte ~zod "text")
tests/golden/types-prelude-comparison/tokens.txtdeleted−175
@@ -1,175 +0,0 @@
1−1:1 glyph ++
2−1:4 name less
3−1:9 glyph (
4−1:10 tight name lth
5−1:14 lit 1
6−1:16 lit 2
7−1:17 tight glyph )
8−2:1 NEWLINE
9−2:1 glyph ++
10−2:4 name greater
11−2:12 glyph (
12−2:13 tight name lth
13−2:17 lit 2
14−2:19 lit 1
15−2:20 tight glyph )
16−3:1 NEWLINE
17−3:1 glyph ++
18−3:4 name equal
19−3:10 glyph (
20−3:11 tight name lth
21−3:15 lit 1
22−3:17 lit 1
23−3:18 tight glyph )
24−4:1 NEWLINE
25−4:1 glyph ++
26−4:4 name gte-less
27−4:13 glyph (
28−4:14 tight name gte
29−4:18 lit 1
30−4:20 lit 2
31−4:21 tight glyph )
32−5:1 NEWLINE
33−5:1 glyph ++
34−5:4 name gte-greater
35−5:16 glyph (
36−5:17 tight name gte
37−5:21 lit 2
38−5:23 lit 1
39−5:24 tight glyph )
40−6:1 NEWLINE
41−6:1 glyph ++
42−6:4 name gte-equal
43−6:14 glyph (
44−6:15 tight name gte
45−6:19 lit 1
46−6:21 lit 1
47−6:22 tight glyph )
48−7:1 NEWLINE
49−7:1 glyph ++
50−7:4 name lte-less
51−7:13 glyph (
52−7:14 tight name lte
53−7:18 lit 1
54−7:20 lit 2
55−7:21 tight glyph )
56−8:1 NEWLINE
57−8:1 glyph ++
58−8:4 name lte-greater
59−8:16 glyph (
60−8:17 tight name lte
61−8:21 lit 2
62−8:23 lit 1
63−8:24 tight glyph )
64−9:1 NEWLINE
65−9:1 glyph ++
66−9:4 name lte-equal
67−9:14 glyph (
68−9:15 tight name lte
69−9:19 lit 1
70−9:21 lit 1
71−9:22 tight glyph )
72−10:1 NEWLINE
73−10:1 glyph ++
74−10:4 name flags-forward
75−10:18 glyph (
76−10:19 tight name gte
77−10:23 lit %.y
78−10:27 lit %.n
79−10:30 tight glyph )
80−11:1 NEWLINE
81−11:1 glyph ++
82−11:4 name flags-reverse
83−11:18 glyph (
84−11:19 tight name lte
85−11:23 lit %.n
86−11:27 lit %.y
87−11:30 tight glyph )
88−12:1 NEWLINE
89−12:1 glyph ++
90−12:4 name flags-equal
91−12:16 glyph (
92−12:17 tight name lth
93−12:21 lit %.y
94−12:25 lit %.y
95−12:28 tight glyph )
96−13:1 NEWLINE
97−13:1 glyph ++
98−13:4 name hex
99−13:8 glyph (
100−13:9 tight name lth
101−13:13 lit 0x1
102−13:17 lit 0x2
103−13:20 tight glyph )
104−14:1 NEWLINE
105−14:1 glyph ++
106−14:4 name generic-lth
107−14:16 glyph |=
108−14:19 glyph [
109−14:20 tight name a
110−14:21 tight glyph =
111−14:22 tight tvar A
112−14:24 name b
113−14:25 tight glyph =
114−14:26 tight tvar A
115−14:27 tight glyph ]
116−14:29 glyph (
117−14:30 tight name lth
118−14:34 name a
119−14:36 name b
120−14:37 tight glyph )
121−15:1 NEWLINE
122−15:1 glyph ++
123−15:4 name generic-gte
124−15:16 glyph |=
125−15:19 glyph [
126−15:20 tight name a
127−15:21 tight glyph =
128−15:22 tight tvar A
129−15:24 name b
130−15:25 tight glyph =
131−15:26 tight tvar A
132−15:27 tight glyph ]
133−15:29 glyph (
134−15:30 tight name gte
135−15:34 name a
136−15:36 name b
137−15:37 tight glyph )
138−16:1 NEWLINE
139−16:1 glyph ++
140−16:4 name generic-lte
141−16:16 glyph |=
142−16:19 glyph [
143−16:20 tight name a
144−16:21 tight glyph =
145−16:22 tight tvar A
146−16:24 name b
147−16:25 tight glyph =
148−16:26 tight tvar A
149−16:27 tight glyph ]
150−16:29 glyph (
151−16:30 tight name lte
152−16:34 name a
153−16:36 name b
154−16:37 tight glyph )
155−17:1 NEWLINE
156−17:1 glyph ++
157−17:4 name bad-aura
158−17:13 glyph (
159−17:14 tight name lth
160−17:18 lit 0x1
161−17:22 glyph (
162−17:23 tight glyph ^-
163−17:26 aura @ud
164−17:30 lit 1
165−17:31 tight glyph )
166−17:32 tight glyph )
167−18:1 NEWLINE
168−18:1 glyph ++
169−18:4 name bad-kind
170−18:13 glyph (
171−18:14 tight name gte
172−18:18 lit ~zod
173−18:23 str "text"
174−18:29 tight glyph )
175−18:30 NEWLINE
tests/golden/types-prelude-comparison/tree.txtdeleted−71
@@ -1,71 +0,0 @@
1−(module
2− (value 1:1 less
3− (group 1:9
4− (call 1:10 (wing 1:10 lth) (lit 1:14 1) (lit 1:16 2))))
5− (value 2:1 greater
6− (group 2:12
7− (call 2:13 (wing 2:13 lth) (lit 2:17 2) (lit 2:19 1))))
8− (value 3:1 equal
9− (group 3:10
10− (call 3:11 (wing 3:11 lth) (lit 3:15 1) (lit 3:17 1))))
11− (value 4:1 gte-less
12− (group 4:13
13− (call 4:14 (wing 4:14 gte) (lit 4:18 1) (lit 4:20 2))))
14− (value 5:1 gte-greater
15− (group 5:16
16− (call 5:17 (wing 5:17 gte) (lit 5:21 2) (lit 5:23 1))))
17− (value 6:1 gte-equal
18− (group 6:14
19− (call 6:15 (wing 6:15 gte) (lit 6:19 1) (lit 6:21 1))))
20− (value 7:1 lte-less
21− (group 7:13
22− (call 7:14 (wing 7:14 lte) (lit 7:18 1) (lit 7:20 2))))
23− (value 8:1 lte-greater
24− (group 8:16
25− (call 8:17 (wing 8:17 lte) (lit 8:21 2) (lit 8:23 1))))
26− (value 9:1 lte-equal
27− (group 9:14
28− (call 9:15 (wing 9:15 lte) (lit 9:19 1) (lit 9:21 1))))
29− (value 10:1 flags-forward
30− (group 10:18
31− (call 10:19 (wing 10:19 gte) (lit 10:23 %.y) (lit 10:27 %.n))))
32− (value 11:1 flags-reverse
33− (group 11:18
34− (call 11:19 (wing 11:19 lte) (lit 11:23 %.n) (lit 11:27 %.y))))
35− (value 12:1 flags-equal
36− (group 12:16
37− (call 12:17 (wing 12:17 lth) (lit 12:21 %.y) (lit 12:25 %.y))))
38− (value 13:1 hex
39− (group 13:8
40− (call 13:9 (wing 13:9 lth) (lit 13:13 0x1) (lit 13:17 0x2))))
41− (value 14:1 generic-lth
42− (gate 14:16
43− (cell 14:19
44− (face 14:20 a (tvar 14:22 A))
45− (face 14:24 b (tvar 14:26 A)))
46− (group 14:29
47− (call 14:30 (wing 14:30 lth) (wing 14:34 a) (wing 14:36 b)))))
48− (value 15:1 generic-gte
49− (gate 15:16
50− (cell 15:19
51− (face 15:20 a (tvar 15:22 A))
52− (face 15:24 b (tvar 15:26 A)))
53− (group 15:29
54− (call 15:30 (wing 15:30 gte) (wing 15:34 a) (wing 15:36 b)))))
55− (value 16:1 generic-lte
56− (gate 16:16
57− (cell 16:19
58− (face 16:20 a (tvar 16:22 A))
59− (face 16:24 b (tvar 16:26 A)))
60− (group 16:29
61− (call 16:30 (wing 16:30 lte) (wing 16:34 a) (wing 16:36 b)))))
62− (value 17:1 bad-aura
63− (group 17:13
64− (call 17:14
65− (wing 17:14 lth)
66− (lit 17:18 0x1)
67− (group 17:22
68− (cast 17:23 (aura 17:26 @ud) (lit 17:30 1))))))
69− (value 18:1 bad-kind
70− (group 18:13
71− (call 18:14 (wing 18:14 gte) (lit 18:18 ~zod) (str 18:23 "text")))))
tests/golden/types-prelude-comparison/types.txtdeleted−31
@@ -1,31 +0,0 @@
1−partial inference; module not checked
2−++ less: ?
3−++ greater: ?
4−++ equal: ?
5−++ gte-less: ?
6−++ gte-greater: ?
7−++ gte-equal: ?
8−++ lte-less: ?
9−++ lte-greater: ?
10−++ lte-equal: ?
11−++ flags-forward: ?
12−++ flags-reverse: ?
13−++ flags-equal: ?
14−++ hex: ?
15−++ generic-lth: $-([a=A b=A] ?) where A is an atom
16−++ generic-gte: $-([a=A b=A] ?) where A is an atom
17−++ generic-lte: $-([a=A b=A] ?) where A is an atom
18−++ bad-aura: call's sample and argument types do not unify
19−/tests/golden/types-prelude-comparison/source.jibb:17:14: called gate has type $-([A A] ?) where A is an atom
20−++ bad-aura (lth 0x1 (^- @ud 1))
21− ^
22−/tests/golden/types-prelude-comparison/source.jibb:17:18: argument has type [@ux @ud]
23−++ bad-aura (lth 0x1 (^- @ud 1))
24− ^
25−++ bad-kind: call's sample and argument types do not unify
26−/tests/golden/types-prelude-comparison/source.jibb:18:14: called gate has type $-([A A] ?) where A is an atom
27−++ bad-kind (gte ~zod "text")
28− ^
29−/tests/golden/types-prelude-comparison/source.jibb:18:18: argument has type [@p @t]
30−++ bad-kind (gte ~zod "text")
31− ^
tests/golden/types-prelude-lead-late/about.txtdeleted−4
@@ -1,4 +0,0 @@
1−source: docs/spec/overview.md, Prelude: "Hoon's standard library regrouped, written in Jibb"; Function helpers include section 2n.
2−tests: Source-backed curried lead and late infer independent argument types, reverse output positions correctly, and preserve generic gates as ordinary values. Explicit context accepts a null unit; an uncontextualized null remains unsupported and an incompatible annotated result reports its sites. This is a partial inference report; Jibb lowering, execution and jet recognition remain unverified.
3−expect: parses
4−expect-types: a partial inference report
tests/golden/types-prelude-lead-late/modules.txtdeleted−1
@@ -1 +0,0 @@
1−# no module fixtures
tests/golden/types-prelude-lead-late/source.jibbdeleted−10
@@ -1,10 +0,0 @@
1−++ text-ship ((lead "hi") ~zod)
2−++ ship-text ((late "hi") ~zod)
3−++ first-fn (lead "hi")
4−++ generic-lead |= [x=A y=B] ((lead x) y)
5−++ generic-late |= [x=A y=B] ((late x) y)
6−++ generic-gate |= [f=$-(A B) x=C] ((lead f) x)
7−++ reversed-gate |= [f=$-(A B) x=C] ((late f) x)
8−++ null-lead ((lead (^- (unit @t) ~)) "tail")
9−++ unresolved ((lead ~) "tail")
10−++ bad ^- [@p @t] ((lead "hi") ~zod)
tests/golden/types-prelude-lead-late/tokens.txtdeleted−151
@@ -1,151 +0,0 @@
1−1:1 glyph ++
2−1:4 name text-ship
3−1:14 glyph (
4−1:15 tight glyph (
5−1:16 tight name lead
6−1:21 str "hi"
7−1:25 tight glyph )
8−1:27 lit ~zod
9−1:31 tight glyph )
10−2:1 NEWLINE
11−2:1 glyph ++
12−2:4 name ship-text
13−2:14 glyph (
14−2:15 tight glyph (
15−2:16 tight name late
16−2:21 str "hi"
17−2:25 tight glyph )
18−2:27 lit ~zod
19−2:31 tight glyph )
20−3:1 NEWLINE
21−3:1 glyph ++
22−3:4 name first-fn
23−3:13 glyph (
24−3:14 tight name lead
25−3:19 str "hi"
26−3:23 tight glyph )
27−4:1 NEWLINE
28−4:1 glyph ++
29−4:4 name generic-lead
30−4:17 glyph |=
31−4:20 glyph [
32−4:21 tight name x
33−4:22 tight glyph =
34−4:23 tight tvar A
35−4:25 name y
36−4:26 tight glyph =
37−4:27 tight tvar B
38−4:28 tight glyph ]
39−4:30 glyph (
40−4:31 tight glyph (
41−4:32 tight name lead
42−4:37 name x
43−4:38 tight glyph )
44−4:40 name y
45−4:41 tight glyph )
46−5:1 NEWLINE
47−5:1 glyph ++
48−5:4 name generic-late
49−5:17 glyph |=
50−5:20 glyph [
51−5:21 tight name x
52−5:22 tight glyph =
53−5:23 tight tvar A
54−5:25 name y
55−5:26 tight glyph =
56−5:27 tight tvar B
57−5:28 tight glyph ]
58−5:30 glyph (
59−5:31 tight glyph (
60−5:32 tight name late
61−5:37 name x
62−5:38 tight glyph )
63−5:40 name y
64−5:41 tight glyph )
65−6:1 NEWLINE
66−6:1 glyph ++
67−6:4 name generic-gate
68−6:17 glyph |=
69−6:20 glyph [
70−6:21 tight name f
71−6:22 tight glyph =
72−6:23 tight glyph $-(
73−6:26 tight tvar A
74−6:28 tvar B
75−6:29 tight glyph )
76−6:31 name x
77−6:32 tight glyph =
78−6:33 tight tvar C
79−6:34 tight glyph ]
80−6:36 glyph (
81−6:37 tight glyph (
82−6:38 tight name lead
83−6:43 name f
84−6:44 tight glyph )
85−6:46 name x
86−6:47 tight glyph )
87−7:1 NEWLINE
88−7:1 glyph ++
89−7:4 name reversed-gate
90−7:18 glyph |=
91−7:21 glyph [
92−7:22 tight name f
93−7:23 tight glyph =
94−7:24 tight glyph $-(
95−7:27 tight tvar A
96−7:29 tvar B
97−7:30 tight glyph )
98−7:32 name x
99−7:33 tight glyph =
100−7:34 tight tvar C
101−7:35 tight glyph ]
102−7:37 glyph (
103−7:38 tight glyph (
104−7:39 tight name late
105−7:44 name f
106−7:45 tight glyph )
107−7:47 name x
108−7:48 tight glyph )
109−8:1 NEWLINE
110−8:1 glyph ++
111−8:4 name null-lead
112−8:14 glyph (
113−8:15 tight glyph (
114−8:16 tight name lead
115−8:21 glyph (
116−8:22 tight glyph ^-
117−8:25 glyph (
118−8:26 tight name unit
119−8:31 aura @t
120−8:33 tight glyph )
121−8:35 lit ~
122−8:36 tight glyph )
123−8:37 tight glyph )
124−8:39 str "tail"
125−8:45 tight glyph )
126−9:1 NEWLINE
127−9:1 glyph ++
128−9:4 name unresolved
129−9:15 glyph (
130−9:16 tight glyph (
131−9:17 tight name lead
132−9:22 lit ~
133−9:23 tight glyph )
134−9:25 str "tail"
135−9:31 tight glyph )
136−10:1 NEWLINE
137−10:1 glyph ++
138−10:4 name bad
139−10:8 glyph ^-
140−10:11 glyph [
141−10:12 tight aura @p
142−10:15 aura @t
143−10:17 tight glyph ]
144−10:19 glyph (
145−10:20 tight glyph (
146−10:21 tight name lead
147−10:26 str "hi"
148−10:30 tight glyph )
149−10:32 lit ~zod
150−10:36 tight glyph )
151−10:37 NEWLINE
tests/golden/types-prelude-lead-late/tree.txtdeleted−83
@@ -1,83 +0,0 @@
1−(module
2− (value 1:1 text-ship
3− (group 1:14
4− (call 1:15
5− (group 1:15
6− (call 1:16 (wing 1:16 lead) (str 1:21 "hi")))
7− (lit 1:27 ~zod))))
8− (value 2:1 ship-text
9− (group 2:14
10− (call 2:15
11− (group 2:15
12− (call 2:16 (wing 2:16 late) (str 2:21 "hi")))
13− (lit 2:27 ~zod))))
14− (value 3:1 first-fn
15− (group 3:13
16− (call 3:14 (wing 3:14 lead) (str 3:19 "hi"))))
17− (value 4:1 generic-lead
18− (gate 4:17
19− (cell 4:20
20− (face 4:21 x (tvar 4:23 A))
21− (face 4:25 y (tvar 4:27 B)))
22− (group 4:30
23− (call 4:31
24− (group 4:31
25− (call 4:32 (wing 4:32 lead) (wing 4:37 x)))
26− (wing 4:40 y)))))
27− (value 5:1 generic-late
28− (gate 5:17
29− (cell 5:20
30− (face 5:21 x (tvar 5:23 A))
31− (face 5:25 y (tvar 5:27 B)))
32− (group 5:30
33− (call 5:31
34− (group 5:31
35− (call 5:32 (wing 5:32 late) (wing 5:37 x)))
36− (wing 5:40 y)))))
37− (value 6:1 generic-gate
38− (gate 6:17
39− (cell 6:20
40− (face 6:21 f
41− (fn 6:23 (tvar 6:26 A) (tvar 6:28 B)))
42− (face 6:31 x (tvar 6:33 C)))
43− (group 6:36
44− (call 6:37
45− (group 6:37
46− (call 6:38 (wing 6:38 lead) (wing 6:43 f)))
47− (wing 6:46 x)))))
48− (value 7:1 reversed-gate
49− (gate 7:18
50− (cell 7:21
51− (face 7:22 f
52− (fn 7:24 (tvar 7:27 A) (tvar 7:29 B)))
53− (face 7:32 x (tvar 7:34 C)))
54− (group 7:37
55− (call 7:38
56− (group 7:38
57− (call 7:39 (wing 7:39 late) (wing 7:44 f)))
58− (wing 7:47 x)))))
59− (value 8:1 null-lead
60− (group 8:14
61− (call 8:15
62− (group 8:15
63− (call 8:16
64− (wing 8:16 lead)
65− (group 8:21
66− (cast 8:22
67− (apply 8:25 unit (aura 8:31 @t))
68− (lit 8:35 ~)))))
69− (str 8:39 "tail"))))
70− (value 9:1 unresolved
71− (group 9:15
72− (call 9:16
73− (group 9:16
74− (call 9:17 (wing 9:17 lead) (lit 9:22 ~)))
75− (str 9:25 "tail"))))
76− (value 10:1 bad
77− (cast 10:8
78− (cell 10:11 (aura 10:12 @p) (aura 10:15 @t))
79− (group 10:19
80− (call 10:20
81− (group 10:20
82− (call 10:21 (wing 10:21 lead) (str 10:26 "hi")))
83− (lit 10:32 ~zod))))))
tests/golden/types-prelude-lead-late/types.txtdeleted−17
@@ -1,17 +0,0 @@
1−partial inference; module not checked
2−++ text-ship: [@t @p]
3−++ ship-text: [@p @t]
4−++ first-fn: $-(A [@t A])
5−++ generic-lead: $-([x=A y=B] [A B])
6−++ generic-late: $-([x=A y=B] [B A])
7−++ generic-gate: $-([f=$-(A B) x=C] [$-(A B) C])
8−++ reversed-gate: $-([f=$-(A B) x=C] [C $-(A B)])
9−++ null-lead: [(unit @t) @t]
10−++ unresolved: `~` needs context in partial inference
11−++ bad: cast mold and expression type do not unify
12−/tests/golden/types-prelude-lead-late/source.jibb:10:11: cast mold has type [@p @t]
13−++ bad ^- [@p @t] ((lead "hi") ~zod)
14− ^
15−/tests/golden/types-prelude-lead-late/source.jibb:10:19: expression has type [@t @p]
16−++ bad ^- [@p @t] ((lead "hi") ~zod)
17− ^
tests/golden/types-prelude-lent/about.txtdeleted−4
@@ -1,4 +0,0 @@
1−source: docs/spec/overview.md, The prelude: "Lists | 2b | turn, weld, snag, lent, sort, skim"
2−tests: Source-backed lent checks empty and cons lists, values of different element types including gates, and an independently generic list argument; a non-list fails with both sites. The source implements length by recursion and addition. This checks partial inference only; lowering, execution and jet recognition remain unfinished.
3−expect: parses
4−expect-types: a partial inference report
tests/golden/types-prelude-lent/modules.txtdeleted−1
@@ -1 +0,0 @@
1−# no module fixtures
tests/golden/types-prelude-lent/source.jibbdeleted−8
@@ -1,8 +0,0 @@
1−++ empty (lent ~)
2−++ singleton (lent ~["a"])
3−++ cons (lent ["a" ~])
4−++ numbers (lent ~[1 2])
5−++ ships (lent ~[~zod ~nec])
6−++ gate-list (lent ~[same])
7−++ generic |= xs=(list A) (lent xs)
8−++ bad (lent "not a list")
tests/golden/types-prelude-lent/tokens.txtdeleted−76
@@ -1,76 +0,0 @@
1−1:1 glyph ++
2−1:4 name empty
3−1:10 glyph (
4−1:11 tight name lent
5−1:16 lit ~
6−1:17 tight glyph )
7−2:1 NEWLINE
8−2:1 glyph ++
9−2:4 name singleton
10−2:14 glyph (
11−2:15 tight name lent
12−2:20 glyph ~[
13−2:22 tight str "a"
14−2:25 tight glyph ]
15−2:26 tight glyph )
16−3:1 NEWLINE
17−3:1 glyph ++
18−3:4 name cons
19−3:9 glyph (
20−3:10 tight name lent
21−3:15 glyph [
22−3:16 tight str "a"
23−3:20 lit ~
24−3:21 tight glyph ]
25−3:22 tight glyph )
26−4:1 NEWLINE
27−4:1 glyph ++
28−4:4 name numbers
29−4:12 glyph (
30−4:13 tight name lent
31−4:18 glyph ~[
32−4:20 tight lit 1
33−4:22 lit 2
34−4:23 tight glyph ]
35−4:24 tight glyph )
36−5:1 NEWLINE
37−5:1 glyph ++
38−5:4 name ships
39−5:10 glyph (
40−5:11 tight name lent
41−5:16 glyph ~[
42−5:18 tight lit ~zod
43−5:23 lit ~nec
44−5:27 tight glyph ]
45−5:28 tight glyph )
46−6:1 NEWLINE
47−6:1 glyph ++
48−6:4 name gate-list
49−6:14 glyph (
50−6:15 tight name lent
51−6:20 glyph ~[
52−6:22 tight name same
53−6:26 tight glyph ]
54−6:27 tight glyph )
55−7:1 NEWLINE
56−7:1 glyph ++
57−7:4 name generic
58−7:12 glyph |=
59−7:15 name xs
60−7:17 tight glyph =
61−7:18 tight glyph (
62−7:19 tight name list
63−7:24 tvar A
64−7:25 tight glyph )
65−7:27 glyph (
66−7:28 tight name lent
67−7:33 name xs
68−7:35 tight glyph )
69−8:1 NEWLINE
70−8:1 glyph ++
71−8:4 name bad
72−8:8 glyph (
73−8:9 tight name lent
74−8:14 str "not a list"
75−8:26 tight glyph )
76−8:27 NEWLINE
tests/golden/types-prelude-lent/tree.txtdeleted−38
@@ -1,38 +0,0 @@
1−(module
2− (value 1:1 empty
3− (group 1:10
4− (call 1:11 (wing 1:11 lent) (lit 1:16 ~))))
5− (value 2:1 singleton
6− (group 2:14
7− (call 2:15
8− (wing 2:15 lent)
9− (list 2:20 (str 2:22 "a")))))
10− (value 3:1 cons
11− (group 3:9
12− (call 3:10
13− (wing 3:10 lent)
14− (tuple 3:15 (str 3:16 "a") (lit 3:20 ~)))))
15− (value 4:1 numbers
16− (group 4:12
17− (call 4:13
18− (wing 4:13 lent)
19− (list 4:18 (lit 4:20 1) (lit 4:22 2)))))
20− (value 5:1 ships
21− (group 5:10
22− (call 5:11
23− (wing 5:11 lent)
24− (list 5:16 (lit 5:18 ~zod) (lit 5:23 ~nec)))))
25− (value 6:1 gate-list
26− (group 6:14
27− (call 6:15
28− (wing 6:15 lent)
29− (list 6:20 (wing 6:22 same)))))
30− (value 7:1 generic
31− (gate 7:12
32− (face 7:15 xs
33− (apply 7:18 list (tvar 7:24 A)))
34− (group 7:27
35− (call 7:28 (wing 7:28 lent) (wing 7:33 xs)))))
36− (value 8:1 bad
37− (group 8:8
38− (call 8:9 (wing 8:9 lent) (str 8:14 "not a list")))))
tests/golden/types-prelude-lent/types.txtdeleted−15
@@ -1,15 +0,0 @@
1−partial inference; module not checked
2−++ empty: @ud
3−++ singleton: @ud
4−++ cons: @ud
5−++ numbers: @ud
6−++ ships: @ud
7−++ gate-list: @ud
8−++ generic: $-((list A) @ud)
9−++ bad: call's sample and argument types do not unify
10−/tests/golden/types-prelude-lent/source.jibb:8:9: called gate has type $-((list A) @ud)
11−++ bad (lent "not a list")
12− ^
13−/tests/golden/types-prelude-lent/source.jibb:8:14: argument has type @t
14−++ bad (lent "not a list")
15− ^
tests/golden/types-prelude-list-alias/source.jibb+1−1
@@ -2,6 +2,6 @@
22++ path-id |= x=path x
33++ tape-id |= x=tape x
44++ spot-id |= x=spot x
5−++ text-value |= x=(bag @t) x
5+++ text |= x=(bag @t) x
66++ ship |= x=(bag @p) x
77++ wrong ^- (bag @t) ~[~zod]
tests/golden/types-prelude-list-alias/tokens.txt+9−9
@@ -34,15 +34,15 @@
34344:22 name x
35355:1 NEWLINE
36365:1 glyph ++
37−5:4 name text-value
38−5:15 glyph |=
39−5:18 name x
40−5:19 tight glyph =
41−5:20 tight glyph (
42−5:21 tight name bag
43−5:25 aura @t
44−5:27 tight glyph )
45−5:29 name x
37+5:4 name text
38+5:9 glyph |=
39+5:12 name x
40+5:13 tight glyph =
41+5:14 tight glyph (
42+5:15 tight name bag
43+5:19 aura @t
44+5:21 tight glyph )
45+5:23 name x
46466:1 NEWLINE
47476:1 glyph ++
48486:4 name ship
tests/golden/types-prelude-list-alias/tree.txt+5−5
@@ -14,11 +14,11 @@
1414 (gate 4:12
1515 (face 4:15 x (ref 4:17 spot))
1616 (wing 4:22 x)))
17− (value 5:1 text-value
18− (gate 5:15
19− (face 5:18 x
20− (apply 5:20 bag (aura 5:25 @t)))
21− (wing 5:29 x)))
17+ (value 5:1 text
18+ (gate 5:9
19+ (face 5:12 x
20+ (apply 5:14 bag (aura 5:19 @t)))
21+ (wing 5:23 x)))
2222 (value 6:1 ship
2323 (gate 6:9
2424 (face 6:12 x
tests/golden/types-prelude-list-alias/types.txt+1−1
@@ -3,7 +3,7 @@ partial inference; module not checked
33++ path-id: $-((list @ta) (list @ta))
44++ tape-id: $-((list @tD) (list @tD))
55++ spot-id: $-([p=(list @ta) q=[p=[p=@ q=@] q=[p=@ q=@]]] [p=(list @ta) q=[p=[p=@ q=@] q=[p=@ q=@]]])
6−++ text-value: $-((list @t) (list @t))
6+++ text: $-((list @t) (list @t))
77++ ship: $-((list @p) (list @p))
88++ wrong: list item does not fit its expected type
99/tests/golden/types-prelude-list-alias/source.jibb:7:13: expected item has type @t
tests/golden/types-prelude-sub-nested/about.txtdeleted−4
@@ -1,4 +0,0 @@
1−source: Overview, Effects: `+$ sub |$ [M]` includes `[%watch a=(ask M)]`; "A request such as `(todos.todo |=%got)` comes from a declared path or a store's `state`."
2−tests: Source-backed `(sub msg)` context reaches nested `pure`, including independent and generic uses, missing tags, mismatched payloads, distinct origins and pending constraints. This is a partial inference report and does not prove a value is watchable or executable.
3−expect: parses
4−expect-types: a partial inference report
tests/golden/types-prelude-sub-nested/modules.txtdeleted−1
@@ -1 +0,0 @@
1−# Use the source-backed prelude.
tests/golden/types-prelude-sub-nested/source.jibbdeleted−20
@@ -1,20 +0,0 @@
1−+$ msg
2− %idle
3− %busy
4−+$ other
5− %idle
6− %busy
7−++ direct ^- (ask msg) (pure %idle)
8−++ watch ^- (sub msg) [%watch (pure %idle)]
9−++ watch-typed ^- (sub msg) [%watch (pure (^- msg %idle))]
10−++ watch-cord ^- (sub @t) [%watch (pure "hi")]
11−++ watch-ship ^- (sub @p) [%watch (pure ~zod)]
12−++ wrong ^- (sub @t) [%watch (pure ~zod)]
13−++ missing ^- (sub msg) [%watch (pure %missing)]
14−++ alien |= x=other ^- (sub msg) [%watch (pure x)]
15−++ generic |= x=A ^- (sub A) [%watch (pure x)]
16−++ pending
17− ~& %orphan
18− ^- (sub msg) [%watch (pure %idle)]
19−++ unknown |= x=A [%watch (pure x)]
20−++ unknown-target |= x=A ^- A [%watch (pure %idle)]
tests/golden/types-prelude-sub-nested/tokens.txtdeleted−211
@@ -1,211 +0,0 @@
1−1:1 glyph +$
2−1:4 name msg
3−2:3 INDENT
4−2:3 lit %idle
5−3:3 NEWLINE
6−3:3 lit %busy
7−4:1 DEDENT
8−4:1 NEWLINE
9−4:1 glyph +$
10−4:4 name other
11−5:3 INDENT
12−5:3 lit %idle
13−6:3 NEWLINE
14−6:3 lit %busy
15−7:1 DEDENT
16−7:1 NEWLINE
17−7:1 glyph ++
18−7:4 name direct
19−7:11 glyph ^-
20−7:14 glyph (
21−7:15 tight name ask
22−7:19 name msg
23−7:22 tight glyph )
24−7:24 glyph (
25−7:25 tight name pure
26−7:30 lit %idle
27−7:35 tight glyph )
28−8:1 NEWLINE
29−8:1 glyph ++
30−8:4 name watch
31−8:10 glyph ^-
32−8:13 glyph (
33−8:14 tight name sub
34−8:18 name msg
35−8:21 tight glyph )
36−8:23 glyph [
37−8:24 tight lit %watch
38−8:31 glyph (
39−8:32 tight name pure
40−8:37 lit %idle
41−8:42 tight glyph )
42−8:43 tight glyph ]
43−9:1 NEWLINE
44−9:1 glyph ++
45−9:4 name watch-typed
46−9:16 glyph ^-
47−9:19 glyph (
48−9:20 tight name sub
49−9:24 name msg
50−9:27 tight glyph )
51−9:29 glyph [
52−9:30 tight lit %watch
53−9:37 glyph (
54−9:38 tight name pure
55−9:43 glyph (
56−9:44 tight glyph ^-
57−9:47 name msg
58−9:51 lit %idle
59−9:56 tight glyph )
60−9:57 tight glyph )
61−9:58 tight glyph ]
62−10:1 NEWLINE
63−10:1 glyph ++
64−10:4 name watch-cord
65−10:15 glyph ^-
66−10:18 glyph (
67−10:19 tight name sub
68−10:23 aura @t
69−10:25 tight glyph )
70−10:27 glyph [
71−10:28 tight lit %watch
72−10:35 glyph (
73−10:36 tight name pure
74−10:41 str "hi"
75−10:45 tight glyph )
76−10:46 tight glyph ]
77−11:1 NEWLINE
78−11:1 glyph ++
79−11:4 name watch-ship
80−11:15 glyph ^-
81−11:18 glyph (
82−11:19 tight name sub
83−11:23 aura @p
84−11:25 tight glyph )
85−11:27 glyph [
86−11:28 tight lit %watch
87−11:35 glyph (
88−11:36 tight name pure
89−11:41 lit ~zod
90−11:45 tight glyph )
91−11:46 tight glyph ]
92−12:1 NEWLINE
93−12:1 glyph ++
94−12:4 name wrong
95−12:10 glyph ^-
96−12:13 glyph (
97−12:14 tight name sub
98−12:18 aura @t
99−12:20 tight glyph )
100−12:22 glyph [
101−12:23 tight lit %watch
102−12:30 glyph (
103−12:31 tight name pure
104−12:36 lit ~zod
105−12:40 tight glyph )
106−12:41 tight glyph ]
107−13:1 NEWLINE
108−13:1 glyph ++
109−13:4 name missing
110−13:12 glyph ^-
111−13:15 glyph (
112−13:16 tight name sub
113−13:20 name msg
114−13:23 tight glyph )
115−13:25 glyph [
116−13:26 tight lit %watch
117−13:33 glyph (
118−13:34 tight name pure
119−13:39 lit %missing
120−13:47 tight glyph )
121−13:48 tight glyph ]
122−14:1 NEWLINE
123−14:1 glyph ++
124−14:4 name alien
125−14:10 glyph |=
126−14:13 name x
127−14:14 tight glyph =
128−14:15 tight name other
129−14:21 glyph ^-
130−14:24 glyph (
131−14:25 tight name sub
132−14:29 name msg
133−14:32 tight glyph )
134−14:34 glyph [
135−14:35 tight lit %watch
136−14:42 glyph (
137−14:43 tight name pure
138−14:48 name x
139−14:49 tight glyph )
140−14:50 tight glyph ]
141−15:1 NEWLINE
142−15:1 glyph ++
143−15:4 name generic
144−15:12 glyph |=
145−15:15 name x
146−15:16 tight glyph =
147−15:17 tight tvar A
148−15:19 glyph ^-
149−15:22 glyph (
150−15:23 tight name sub
151−15:27 tvar A
152−15:28 tight glyph )
153−15:30 glyph [
154−15:31 tight lit %watch
155−15:38 glyph (
156−15:39 tight name pure
157−15:44 name x
158−15:45 tight glyph )
159−15:46 tight glyph ]
160−16:1 NEWLINE
161−16:1 glyph ++
162−16:4 name pending
163−17:3 INDENT
164−17:3 glyph ~&
165−17:6 lit %orphan
166−18:5 INDENT
167−18:5 glyph ^-
168−18:8 glyph (
169−18:9 tight name sub
170−18:13 name msg
171−18:16 tight glyph )
172−18:18 glyph [
173−18:19 tight lit %watch
174−18:26 glyph (
175−18:27 tight name pure
176−18:32 lit %idle
177−18:37 tight glyph )
178−18:38 tight glyph ]
179−19:1 DEDENT
180−19:1 DEDENT
181−19:1 NEWLINE
182−19:1 glyph ++
183−19:4 name unknown
184−19:12 glyph |=
185−19:15 name x
186−19:16 tight glyph =
187−19:17 tight tvar A
188−19:19 glyph [
189−19:20 tight lit %watch
190−19:27 glyph (
191−19:28 tight name pure
192−19:33 name x
193−19:34 tight glyph )
194−19:35 tight glyph ]
195−20:1 NEWLINE
196−20:1 glyph ++
197−20:4 name unknown-target
198−20:19 glyph |=
199−20:22 name x
200−20:23 tight glyph =
201−20:24 tight tvar A
202−20:26 glyph ^-
203−20:29 tvar A
204−20:31 glyph [
205−20:32 tight lit %watch
206−20:39 glyph (
207−20:40 tight name pure
208−20:45 lit %idle
209−20:50 tight glyph )
210−20:51 tight glyph ]
211−20:52 NEWLINE
tests/golden/types-prelude-sub-nested/tree.txtdeleted−100
@@ -1,100 +0,0 @@
1−(module
2− (mold 1:1 msg
3− (union 2:3 (const 2:3 %idle) (const 3:3 %busy)))
4− (mold 4:1 other
5− (union 5:3 (const 5:3 %idle) (const 6:3 %busy)))
6− (value 7:1 direct
7− (cast 7:11
8− (apply 7:14 ask (ref 7:19 msg))
9− (group 7:24
10− (call 7:25 (wing 7:25 pure) (lit 7:30 %idle)))))
11− (value 8:1 watch
12− (cast 8:10
13− (apply 8:13 sub (ref 8:18 msg))
14− (tuple 8:23
15− (lit 8:24 %watch)
16− (group 8:31
17− (call 8:32 (wing 8:32 pure) (lit 8:37 %idle))))))
18− (value 9:1 watch-typed
19− (cast 9:16
20− (apply 9:19 sub (ref 9:24 msg))
21− (tuple 9:29
22− (lit 9:30 %watch)
23− (group 9:37
24− (call 9:38
25− (wing 9:38 pure)
26− (group 9:43
27− (cast 9:44 (ref 9:47 msg) (lit 9:51 %idle))))))))
28− (value 10:1 watch-cord
29− (cast 10:15
30− (apply 10:18 sub (aura 10:23 @t))
31− (tuple 10:27
32− (lit 10:28 %watch)
33− (group 10:35
34− (call 10:36 (wing 10:36 pure) (str 10:41 "hi"))))))
35− (value 11:1 watch-ship
36− (cast 11:15
37− (apply 11:18 sub (aura 11:23 @p))
38− (tuple 11:27
39− (lit 11:28 %watch)
40− (group 11:35
41− (call 11:36 (wing 11:36 pure) (lit 11:41 ~zod))))))
42− (value 12:1 wrong
43− (cast 12:10
44− (apply 12:13 sub (aura 12:18 @t))
45− (tuple 12:22
46− (lit 12:23 %watch)
47− (group 12:30
48− (call 12:31 (wing 12:31 pure) (lit 12:36 ~zod))))))
49− (value 13:1 missing
50− (cast 13:12
51− (apply 13:15 sub (ref 13:20 msg))
52− (tuple 13:25
53− (lit 13:26 %watch)
54− (group 13:33
55− (call 13:34 (wing 13:34 pure) (lit 13:39 %missing))))))
56− (value 14:1 alien
57− (gate 14:10
58− (face 14:13 x (ref 14:15 other))
59− (cast 14:21
60− (apply 14:24 sub (ref 14:29 msg))
61− (tuple 14:34
62− (lit 14:35 %watch)
63− (group 14:42
64− (call 14:43 (wing 14:43 pure) (wing 14:48 x)))))))
65− (value 15:1 generic
66− (gate 15:12
67− (face 15:15 x (tvar 15:17 A))
68− (cast 15:19
69− (apply 15:22 sub (tvar 15:27 A))
70− (tuple 15:30
71− (lit 15:31 %watch)
72− (group 15:38
73− (call 15:39 (wing 15:39 pure) (wing 15:44 x)))))))
74− (value 16:1 pending
75− (body 17:3
76− (trace 17:3
77− (lit 17:6 %orphan)
78− (body 18:5
79− (cast 18:5
80− (apply 18:8 sub (ref 18:13 msg))
81− (tuple 18:18
82− (lit 18:19 %watch)
83− (group 18:26
84− (call 18:27 (wing 18:27 pure) (lit 18:32 %idle)))))))))
85− (value 19:1 unknown
86− (gate 19:12
87− (face 19:15 x (tvar 19:17 A))
88− (tuple 19:19
89− (lit 19:20 %watch)
90− (group 19:27
91− (call 19:28 (wing 19:28 pure) (wing 19:33 x))))))
92− (value 20:1 unknown-target
93− (gate 20:19
94− (face 20:22 x (tvar 20:24 A))
95− (cast 20:26
96− (tvar 20:29 A)
97− (tuple 20:31
98− (lit 20:32 %watch)
99− (group 20:39
100− (call 20:40 (wing 20:40 pure) (lit 20:45 %idle))))))))
tests/golden/types-prelude-sub-nested/types.txtdeleted−27
@@ -1,27 +0,0 @@
1−partial inference; module not checked
2−+$ msg: cases proven disjoint; mold not checked
3−+$ other: cases proven disjoint; mold not checked
4−++ direct: (ask msg)
5−++ watch: (sub msg)
6−++ watch-typed: (sub msg)
7−++ watch-cord: (sub @t)
8−++ watch-ship: (sub @p)
9−++ wrong: call's sample and argument types do not unify
10−/tests/golden/types-prelude-sub-nested/source.jibb:12:31: called gate
11−++ wrong ^- (sub @t) [%watch (pure ~zod)]
12− ^
13−/tests/golden/types-prelude-sub-nested/source.jibb:12:36: argument has type @p
14−++ wrong ^- (sub @t) [%watch (pure ~zod)]
15− ^
16−++ missing: msg has no case `%missing`
17−/tests/golden/types-prelude-sub-nested/source.jibb:13:34: expected union
18−++ missing ^- (sub msg) [%watch (pure %missing)]
19− ^
20−/tests/golden/types-prelude-sub-nested/source.jibb:13:39: tag
21−++ missing ^- (sub msg) [%watch (pure %missing)]
22− ^
23−++ alien: call constraint is not supported by partial inference
24−++ generic: $-(A (sub A))
25−++ pending: tag needs context in partial inference
26−++ unknown: tag needs context in partial inference
27−++ unknown-target: explicit capital constraints are not supported by partial inference
tests/golden/types-prelude-sub/about.txtdeleted−4
@@ -1,4 +0,0 @@
1−source: docs/spec/overview.md, Effects, the exact source-backed generic sub declaration.
2−tests: Watch, timer and URL construction and matching; public ask identity on a watch binder; independent message types, incorrect callbacks and pending constraints. This partial inference report is not island watchability proof or a runtime claim.
3−expect: parses
4−expect-types: a partial inference report
tests/golden/types-prelude-sub/modules.txtdeleted−1
@@ -1 +0,0 @@
1−# Use the source-backed prelude.
tests/golden/types-prelude-sub/source.jibbdeleted−37
@@ -1,37 +0,0 @@
1−+$ msg
2− [%got value=@t]
3− %done
4−++ watch-value |= a=(ask msg) ^- (sub msg) [%watch a]
5−++ watch-cord |= a=(ask @t) ^- (sub @t) [%watch a]
6−++ wrong-watch |= a=(ask @p) ^- (sub @t) [%watch a]
7−++ periodic ^- (sub @t) [%every gap=~s1 reply=|=(date=@da "tick")]
8−++ route ^- (sub @t) [%url reply=|=(p=path "path")]
9−++ wrong-reply ^- (sub @t) [%every gap=~s1 reply=|=(date=@p "bad")]
10−++ incomplete |= s=(sub msg)
11− ?- s
12− [%watch ask] %done
13− [%every gap reply] %done
14−++ complete |= s=(sub msg)
15− ?- s
16− [%watch ask] %done
17− [%every gap reply] %done
18− [%url reply] %done
19−
20−+$ my-msg
21− [%got value=@t]
22− %idle
23−++ take-watch |= s=(sub my-msg)
24− ^- (ask my-msg)
25− ?- s
26− [%watch a] a
27− [%every gap reply] !!
28− [%url reply] !!
29−++ watch-pure ^- (sub my-msg) [%watch (pure %idle)]
30−++ watch-generic |= a=(ask A) ^- (sub A) [%watch a]
31−++ independent-text |= a=(ask @t) ^- (sub @t) [%watch a]
32−++ independent-ship |= a=(ask @p) ^- (sub @p) [%watch a]
33−++ wrong-watch-generic |= a=(ask @p) ^- (sub @t) [%watch a]
34−
35−++ pure-direct ^- (ask my-msg) (pure %idle)
36−++ pure-typed ^- (ask my-msg) (pure (^- my-msg %idle))
37−++ pure-wrong ^- (ask my-msg) (pure %absent)
tests/golden/types-prelude-sub/tokens.txtdeleted−380
@@ -1,380 +0,0 @@
1−1:1 glyph +$
2−1:4 name msg
3−2:3 INDENT
4−2:3 glyph [
5−2:4 tight lit %got
6−2:9 name value
7−2:14 tight glyph =
8−2:15 tight aura @t
9−2:17 tight glyph ]
10−3:3 NEWLINE
11−3:3 lit %done
12−4:1 DEDENT
13−4:1 NEWLINE
14−4:1 glyph ++
15−4:4 name watch-value
16−4:16 glyph |=
17−4:19 name a
18−4:20 tight glyph =
19−4:21 tight glyph (
20−4:22 tight name ask
21−4:26 name msg
22−4:29 tight glyph )
23−4:31 glyph ^-
24−4:34 glyph (
25−4:35 tight name sub
26−4:39 name msg
27−4:42 tight glyph )
28−4:44 glyph [
29−4:45 tight lit %watch
30−4:52 name a
31−4:53 tight glyph ]
32−5:1 NEWLINE
33−5:1 glyph ++
34−5:4 name watch-cord
35−5:15 glyph |=
36−5:18 name a
37−5:19 tight glyph =
38−5:20 tight glyph (
39−5:21 tight name ask
40−5:25 aura @t
41−5:27 tight glyph )
42−5:29 glyph ^-
43−5:32 glyph (
44−5:33 tight name sub
45−5:37 aura @t
46−5:39 tight glyph )
47−5:41 glyph [
48−5:42 tight lit %watch
49−5:49 name a
50−5:50 tight glyph ]
51−6:1 NEWLINE
52−6:1 glyph ++
53−6:4 name wrong-watch
54−6:16 glyph |=
55−6:19 name a
56−6:20 tight glyph =
57−6:21 tight glyph (
58−6:22 tight name ask
59−6:26 aura @p
60−6:28 tight glyph )
61−6:30 glyph ^-
62−6:33 glyph (
63−6:34 tight name sub
64−6:38 aura @t
65−6:40 tight glyph )
66−6:42 glyph [
67−6:43 tight lit %watch
68−6:50 name a
69−6:51 tight glyph ]
70−7:1 NEWLINE
71−7:1 glyph ++
72−7:4 name periodic
73−7:13 glyph ^-
74−7:16 glyph (
75−7:17 tight name sub
76−7:21 aura @t
77−7:23 tight glyph )
78−7:25 glyph [
79−7:26 tight lit %every
80−7:33 name gap
81−7:36 tight glyph =
82−7:37 tight lit ~s1
83−7:41 name reply
84−7:46 tight glyph =
85−7:47 tight glyph |=(
86−7:50 tight name date
87−7:54 tight glyph =
88−7:55 tight aura @da
89−7:59 str "tick"
90−7:65 tight glyph )
91−7:66 tight glyph ]
92−8:1 NEWLINE
93−8:1 glyph ++
94−8:4 name route
95−8:10 glyph ^-
96−8:13 glyph (
97−8:14 tight name sub
98−8:18 aura @t
99−8:20 tight glyph )
100−8:22 glyph [
101−8:23 tight lit %url
102−8:28 name reply
103−8:33 tight glyph =
104−8:34 tight glyph |=(
105−8:37 tight name p
106−8:38 tight glyph =
107−8:39 tight name path
108−8:44 str "path"
109−8:50 tight glyph )
110−8:51 tight glyph ]
111−9:1 NEWLINE
112−9:1 glyph ++
113−9:4 name wrong-reply
114−9:16 glyph ^-
115−9:19 glyph (
116−9:20 tight name sub
117−9:24 aura @t
118−9:26 tight glyph )
119−9:28 glyph [
120−9:29 tight lit %every
121−9:36 name gap
122−9:39 tight glyph =
123−9:40 tight lit ~s1
124−9:44 name reply
125−9:49 tight glyph =
126−9:50 tight glyph |=(
127−9:53 tight name date
128−9:57 tight glyph =
129−9:58 tight aura @p
130−9:61 str "bad"
131−9:66 tight glyph )
132−9:67 tight glyph ]
133−10:1 NEWLINE
134−10:1 glyph ++
135−10:4 name incomplete
136−10:15 glyph |=
137−10:18 name s
138−10:19 tight glyph =
139−10:20 tight glyph (
140−10:21 tight name sub
141−10:25 name msg
142−10:28 tight glyph )
143−11:3 INDENT
144−11:3 glyph ?-
145−11:6 name s
146−12:5 INDENT
147−12:5 glyph [
148−12:6 tight lit %watch
149−12:13 name ask
150−12:16 tight glyph ]
151−12:18 lit %done
152−13:5 NEWLINE
153−13:5 glyph [
154−13:6 tight lit %every
155−13:13 name gap
156−13:17 name reply
157−13:22 tight glyph ]
158−13:24 lit %done
159−14:1 DEDENT
160−14:1 DEDENT
161−14:1 NEWLINE
162−14:1 glyph ++
163−14:4 name complete
164−14:13 glyph |=
165−14:16 name s
166−14:17 tight glyph =
167−14:18 tight glyph (
168−14:19 tight name sub
169−14:23 name msg
170−14:26 tight glyph )
171−15:3 INDENT
172−15:3 glyph ?-
173−15:6 name s
174−16:5 INDENT
175−16:5 glyph [
176−16:6 tight lit %watch
177−16:13 name ask
178−16:16 tight glyph ]
179−16:18 lit %done
180−17:5 NEWLINE
181−17:5 glyph [
182−17:6 tight lit %every
183−17:13 name gap
184−17:17 name reply
185−17:22 tight glyph ]
186−17:24 lit %done
187−18:5 NEWLINE
188−18:5 glyph [
189−18:6 tight lit %url
190−18:11 name reply
191−18:16 tight glyph ]
192−18:18 lit %done
193−20:1 DEDENT
194−20:1 DEDENT
195−20:1 NEWLINE
196−20:1 glyph +$
197−20:4 name my-msg
198−21:3 INDENT
199−21:3 glyph [
200−21:4 tight lit %got
201−21:9 name value
202−21:14 tight glyph =
203−21:15 tight aura @t
204−21:17 tight glyph ]
205−22:3 NEWLINE
206−22:3 lit %idle
207−23:1 DEDENT
208−23:1 NEWLINE
209−23:1 glyph ++
210−23:4 name take-watch
211−23:15 glyph |=
212−23:18 name s
213−23:19 tight glyph =
214−23:20 tight glyph (
215−23:21 tight name sub
216−23:25 name my-msg
217−23:31 tight glyph )
218−24:3 INDENT
219−24:3 glyph ^-
220−24:6 glyph (
221−24:7 tight name ask
222−24:11 name my-msg
223−24:17 tight glyph )
224−25:5 INDENT
225−25:5 glyph ?-
226−25:8 name s
227−26:7 INDENT
228−26:7 glyph [
229−26:8 tight lit %watch
230−26:15 name a
231−26:16 tight glyph ]
232−26:18 name a
233−27:7 NEWLINE
234−27:7 glyph [
235−27:8 tight lit %every
236−27:15 name gap
237−27:19 name reply
238−27:24 tight glyph ]
239−27:26 glyph !!
240−28:7 NEWLINE
241−28:7 glyph [
242−28:8 tight lit %url
243−28:13 name reply
244−28:18 tight glyph ]
245−28:20 glyph !!
246−29:1 DEDENT
247−29:1 DEDENT
248−29:1 DEDENT
249−29:1 NEWLINE
250−29:1 glyph ++
251−29:4 name watch-pure
252−29:15 glyph ^-
253−29:18 glyph (
254−29:19 tight name sub
255−29:23 name my-msg
256−29:29 tight glyph )
257−29:31 glyph [
258−29:32 tight lit %watch
259−29:39 glyph (
260−29:40 tight name pure
261−29:45 lit %idle
262−29:50 tight glyph )
263−29:51 tight glyph ]
264−30:1 NEWLINE
265−30:1 glyph ++
266−30:4 name watch-generic
267−30:18 glyph |=
268−30:21 name a
269−30:22 tight glyph =
270−30:23 tight glyph (
271−30:24 tight name ask
272−30:28 tvar A
273−30:29 tight glyph )
274−30:31 glyph ^-
275−30:34 glyph (
276−30:35 tight name sub
277−30:39 tvar A
278−30:40 tight glyph )
279−30:42 glyph [
280−30:43 tight lit %watch
281−30:50 name a
282−30:51 tight glyph ]
283−31:1 NEWLINE
284−31:1 glyph ++
285−31:4 name independent-text
286−31:21 glyph |=
287−31:24 name a
288−31:25 tight glyph =
289−31:26 tight glyph (
290−31:27 tight name ask
291−31:31 aura @t
292−31:33 tight glyph )
293−31:35 glyph ^-
294−31:38 glyph (
295−31:39 tight name sub
296−31:43 aura @t
297−31:45 tight glyph )
298−31:47 glyph [
299−31:48 tight lit %watch
300−31:55 name a
301−31:56 tight glyph ]
302−32:1 NEWLINE
303−32:1 glyph ++
304−32:4 name independent-ship
305−32:21 glyph |=
306−32:24 name a
307−32:25 tight glyph =
308−32:26 tight glyph (
309−32:27 tight name ask
310−32:31 aura @p
311−32:33 tight glyph )
312−32:35 glyph ^-
313−32:38 glyph (
314−32:39 tight name sub
315−32:43 aura @p
316−32:45 tight glyph )
317−32:47 glyph [
318−32:48 tight lit %watch
319−32:55 name a
320−32:56 tight glyph ]
321−33:1 NEWLINE
322−33:1 glyph ++
323−33:4 name wrong-watch-generic
324−33:24 glyph |=
325−33:27 name a
326−33:28 tight glyph =
327−33:29 tight glyph (
328−33:30 tight name ask
329−33:34 aura @p
330−33:36 tight glyph )
331−33:38 glyph ^-
332−33:41 glyph (
333−33:42 tight name sub
334−33:46 aura @t
335−33:48 tight glyph )
336−33:50 glyph [
337−33:51 tight lit %watch
338−33:58 name a
339−33:59 tight glyph ]
340−35:1 NEWLINE
341−35:1 glyph ++
342−35:4 name pure-direct
343−35:16 glyph ^-
344−35:19 glyph (
345−35:20 tight name ask
346−35:24 name my-msg
347−35:30 tight glyph )
348−35:32 glyph (
349−35:33 tight name pure
350−35:38 lit %idle
351−35:43 tight glyph )
352−36:1 NEWLINE
353−36:1 glyph ++
354−36:4 name pure-typed
355−36:15 glyph ^-
356−36:18 glyph (
357−36:19 tight name ask
358−36:23 name my-msg
359−36:29 tight glyph )
360−36:31 glyph (
361−36:32 tight name pure
362−36:37 glyph (
363−36:38 tight glyph ^-
364−36:41 name my-msg
365−36:48 lit %idle
366−36:53 tight glyph )
367−36:54 tight glyph )
368−37:1 NEWLINE
369−37:1 glyph ++
370−37:4 name pure-wrong
371−37:15 glyph ^-
372−37:18 glyph (
373−37:19 tight name ask
374−37:23 name my-msg
375−37:29 tight glyph )
376−37:31 glyph (
377−37:32 tight name pure
378−37:37 lit %absent
379−37:44 tight glyph )
380−37:45 NEWLINE
tests/golden/types-prelude-sub/tree.txtdeleted−164
@@ -1,164 +0,0 @@
1−(module
2− (mold 1:1 msg
3− (union 2:3
4− (cell 2:3
5− (const 2:4 %got)
6− (face 2:9 value (aura 2:15 @t)))
7− (const 3:3 %done)))
8− (value 4:1 watch-value
9− (gate 4:16
10− (face 4:19 a
11− (apply 4:21 ask (ref 4:26 msg)))
12− (cast 4:31
13− (apply 4:34 sub (ref 4:39 msg))
14− (tuple 4:44 (lit 4:45 %watch) (wing 4:52 a)))))
15− (value 5:1 watch-cord
16− (gate 5:15
17− (face 5:18 a
18− (apply 5:20 ask (aura 5:25 @t)))
19− (cast 5:29
20− (apply 5:32 sub (aura 5:37 @t))
21− (tuple 5:41 (lit 5:42 %watch) (wing 5:49 a)))))
22− (value 6:1 wrong-watch
23− (gate 6:16
24− (face 6:19 a
25− (apply 6:21 ask (aura 6:26 @p)))
26− (cast 6:30
27− (apply 6:33 sub (aura 6:38 @t))
28− (tuple 6:42 (lit 6:43 %watch) (wing 6:50 a)))))
29− (value 7:1 periodic
30− (cast 7:13
31− (apply 7:16 sub (aura 7:21 @t))
32− (tuple 7:25
33− (lit 7:26 %every)
34− (face 7:33 gap (lit 7:37 ~s1))
35− (face 7:41 reply
36− (gate-wide 7:47
37− (face 7:50 date (aura 7:55 @da))
38− (str 7:59 "tick"))))))
39− (value 8:1 route
40− (cast 8:10
41− (apply 8:13 sub (aura 8:18 @t))
42− (tuple 8:22
43− (lit 8:23 %url)
44− (face 8:28 reply
45− (gate-wide 8:34
46− (face 8:37 p (ref 8:39 path))
47− (str 8:44 "path"))))))
48− (value 9:1 wrong-reply
49− (cast 9:16
50− (apply 9:19 sub (aura 9:24 @t))
51− (tuple 9:28
52− (lit 9:29 %every)
53− (face 9:36 gap (lit 9:40 ~s1))
54− (face 9:44 reply
55− (gate-wide 9:50
56− (face 9:53 date (aura 9:58 @p))
57− (str 9:61 "bad"))))))
58− (value 10:1 incomplete
59− (gate 10:15
60− (face 10:18 s
61− (apply 10:20 sub (ref 10:25 msg)))
62− (body 11:3
63− (branch 11:3
64− (wing 11:6 s)
65− (arm 12:5
66− (cell 12:5 (lit 12:6 %watch) (bind 12:13 ask))
67− (lit 12:18 %done))
68− (arm 13:5
69− (cell 13:5 (lit 13:6 %every) (bind 13:13 gap) (bind 13:17 reply))
70− (lit 13:24 %done))))))
71− (value 14:1 complete
72− (gate 14:13
73− (face 14:16 s
74− (apply 14:18 sub (ref 14:23 msg)))
75− (body 15:3
76− (branch 15:3
77− (wing 15:6 s)
78− (arm 16:5
79− (cell 16:5 (lit 16:6 %watch) (bind 16:13 ask))
80− (lit 16:18 %done))
81− (arm 17:5
82− (cell 17:5 (lit 17:6 %every) (bind 17:13 gap) (bind 17:17 reply))
83− (lit 17:24 %done))
84− (arm 18:5
85− (cell 18:5 (lit 18:6 %url) (bind 18:11 reply))
86− (lit 18:18 %done))))))
87− (mold 20:1 my-msg
88− (union 21:3
89− (cell 21:3
90− (const 21:4 %got)
91− (face 21:9 value (aura 21:15 @t)))
92− (const 22:3 %idle)))
93− (value 23:1 take-watch
94− (gate 23:15
95− (face 23:18 s
96− (apply 23:20 sub (ref 23:25 my-msg)))
97− (body 24:3
98− (cast 24:3
99− (apply 24:6 ask (ref 24:11 my-msg))
100− (body 25:5
101− (branch 25:5
102− (wing 25:8 s)
103− (arm 26:7
104− (cell 26:7 (lit 26:8 %watch) (bind 26:15 a))
105− (wing 26:18 a))
106− (arm 27:7
107− (cell 27:7 (lit 27:8 %every) (bind 27:15 gap) (bind 27:19 reply))
108− (crash 27:26))
109− (arm 28:7
110− (cell 28:7 (lit 28:8 %url) (bind 28:13 reply))
111− (crash 28:20))))))))
112− (value 29:1 watch-pure
113− (cast 29:15
114− (apply 29:18 sub (ref 29:23 my-msg))
115− (tuple 29:31
116− (lit 29:32 %watch)
117− (group 29:39
118− (call 29:40 (wing 29:40 pure) (lit 29:45 %idle))))))
119− (value 30:1 watch-generic
120− (gate 30:18
121− (face 30:21 a
122− (apply 30:23 ask (tvar 30:28 A)))
123− (cast 30:31
124− (apply 30:34 sub (tvar 30:39 A))
125− (tuple 30:42 (lit 30:43 %watch) (wing 30:50 a)))))
126− (value 31:1 independent-text
127− (gate 31:21
128− (face 31:24 a
129− (apply 31:26 ask (aura 31:31 @t)))
130− (cast 31:35
131− (apply 31:38 sub (aura 31:43 @t))
132− (tuple 31:47 (lit 31:48 %watch) (wing 31:55 a)))))
133− (value 32:1 independent-ship
134− (gate 32:21
135− (face 32:24 a
136− (apply 32:26 ask (aura 32:31 @p)))
137− (cast 32:35
138− (apply 32:38 sub (aura 32:43 @p))
139− (tuple 32:47 (lit 32:48 %watch) (wing 32:55 a)))))
140− (value 33:1 wrong-watch-generic
141− (gate 33:24
142− (face 33:27 a
143− (apply 33:29 ask (aura 33:34 @p)))
144− (cast 33:38
145− (apply 33:41 sub (aura 33:46 @t))
146− (tuple 33:50 (lit 33:51 %watch) (wing 33:58 a)))))
147− (value 35:1 pure-direct
148− (cast 35:16
149− (apply 35:19 ask (ref 35:24 my-msg))
150− (group 35:32
151− (call 35:33 (wing 35:33 pure) (lit 35:38 %idle)))))
152− (value 36:1 pure-typed
153− (cast 36:15
154− (apply 36:18 ask (ref 36:23 my-msg))
155− (group 36:31
156− (call 36:32
157− (wing 36:32 pure)
158− (group 36:37
159− (cast 36:38 (ref 36:41 my-msg) (lit 36:48 %idle)))))))
160− (value 37:1 pure-wrong
161− (cast 37:15
162− (apply 37:18 ask (ref 37:23 my-msg))
163− (group 37:31
164− (call 37:32 (wing 37:32 pure) (lit 37:37 %absent))))))
tests/golden/types-prelude-sub/types.txtdeleted−32
@@ -1,32 +0,0 @@
1−partial inference; module not checked
2−+$ msg: cases proven disjoint; mold not checked
3−++ watch-value: $-((ask msg) (sub msg))
4−++ watch-cord: $-((ask @t) (sub @t))
5−++ wrong-watch: cast constraint is not supported by partial inference
6−++ periodic: (sub @t)
7−++ route: (sub @t)
8−++ wrong-reply: cast mold and expression type do not unify
9−/tests/golden/types-prelude-sub/source.jibb:9:19: cast mold
10−++ wrong-reply ^- (sub @t) [%every gap=~s1 reply=|=(date=@p "bad")]
11− ^
12−/tests/golden/types-prelude-sub/source.jibb:9:28: expression
13−++ wrong-reply ^- (sub @t) [%every gap=~s1 reply=|=(date=@p "bad")]
14− ^
15−++ incomplete: union branch result matching needs unsupported inference
16−++ complete: union branch result matching needs unsupported inference
17−+$ my-msg: cases proven disjoint; mold not checked
18−++ take-watch: $-((sub my-msg) (ask my-msg))
19−++ watch-pure: (sub my-msg)
20−++ watch-generic: $-((ask A) (sub A))
21−++ independent-text: $-((ask @t) (sub @t))
22−++ independent-ship: $-((ask @p) (sub @p))
23−++ wrong-watch-generic: cast constraint is not supported by partial inference
24−++ pure-direct: (ask my-msg)
25−++ pure-typed: (ask my-msg)
26−++ pure-wrong: my-msg has no case `%absent`
27−/tests/golden/types-prelude-sub/source.jibb:37:32: expected union
28−++ pure-wrong ^- (ask my-msg) (pure %absent)
29− ^
30−/tests/golden/types-prelude-sub/source.jibb:37:37: tag
31−++ pure-wrong ^- (ask my-msg) (pure %absent)
32− ^
tests/golden/types-prelude-succ/about.txtdeleted−4
@@ -1,4 +0,0 @@
1−source: Overview, Prelude: “Hoon's standard library regrouped, written in Jibb”; Decisions, Loobean arithmetic: “Arithmetic rejects loobean operands”.
2−tests: The source-backed successor preserves a shared atom aura, accepts decimal and hexadecimal atoms, infers a generic arithmetic constraint and rejects a loobean. This is a partial inference report; Jibb execution and jet recognition remain unverified.
3−expect: parses
4−expect-types: a partial inference report
tests/golden/types-prelude-succ/modules.txtdeleted−1
@@ -1 +0,0 @@
1−# no module fixtures
tests/golden/types-prelude-succ/source.jibbdeleted−4
@@ -1,4 +0,0 @@
1−++ n (succ 1)
2−++ hx (succ 0x1f)
3−++ generic |= x=A (succ x)
4−++ bad (succ %.y)
tests/golden/types-prelude-succ/tokens.txtdeleted−32
@@ -1,32 +0,0 @@
1−1:1 glyph ++
2−1:4 name n
3−1:6 glyph (
4−1:7 tight name succ
5−1:12 lit 1
6−1:13 tight glyph )
7−2:1 NEWLINE
8−2:1 glyph ++
9−2:4 name hx
10−2:7 glyph (
11−2:8 tight name succ
12−2:13 lit 0x1f
13−2:17 tight glyph )
14−3:1 NEWLINE
15−3:1 glyph ++
16−3:4 name generic
17−3:12 glyph |=
18−3:15 name x
19−3:16 tight glyph =
20−3:17 tight tvar A
21−3:19 glyph (
22−3:20 tight name succ
23−3:25 name x
24−3:26 tight glyph )
25−4:1 NEWLINE
26−4:1 glyph ++
27−4:4 name bad
28−4:8 glyph (
29−4:9 tight name succ
30−4:14 lit %.y
31−4:17 tight glyph )
32−4:18 NEWLINE
tests/golden/types-prelude-succ/tree.txtdeleted−15
@@ -1,15 +0,0 @@
1−(module
2− (value 1:1 n
3− (group 1:6
4− (call 1:7 (wing 1:7 succ) (lit 1:12 1))))
5− (value 2:1 hx
6− (group 2:7
7− (call 2:8 (wing 2:8 succ) (lit 2:13 0x1f))))
8− (value 3:1 generic
9− (gate 3:12
10− (face 3:15 x (tvar 3:17 A))
11− (group 3:19
12− (call 3:20 (wing 3:20 succ) (wing 3:25 x)))))
13− (value 4:1 bad
14− (group 4:8
15− (call 4:9 (wing 4:9 succ) (lit 4:14 %.y)))))
tests/golden/types-prelude-succ/types.txtdeleted−11
@@ -1,11 +0,0 @@
1−partial inference; module not checked
2−++ n: @ud
3−++ hx: @ux
4−++ generic: $-(A A) where A is an atom other than ?
5−++ bad: call's sample and argument types do not unify
6−/tests/golden/types-prelude-succ/source.jibb:4:9: called gate has type $-(A A) where A is an atom other than ?
7−++ bad (succ %.y)
8− ^
9−/tests/golden/types-prelude-succ/source.jibb:4:14: argument has type ?
10−++ bad (succ %.y)
11− ^
tests/golden/types-prelude-text/about.txtdeleted−4
@@ -1,4 +0,0 @@
1−source: docs/spec/overview.md, Prelude: "Text ... crip, trip, cass, cuss, trim, tufa, tuba"; the target ship's Hoon 135 definitions give trip and tuba their tape and UTF-32 types.
2−tests: Source-backed trip and tuba wrappers preserve cord, tape and UTF-32 list types through composition and generic list length. Empty input infers; non-cord and non-tape arguments fail. Primitive lowering and execution remain unfinished. The module report is partial.
3−expect: parses
4−expect-types: a partial inference report
tests/golden/types-prelude-text/modules.txtdeleted−1
@@ -1 +0,0 @@
1−# no module fixtures
tests/golden/types-prelude-text/source.jibbdeleted−8
@@ -1,8 +0,0 @@
1−++ to-tape (trip "abc")
2−++ to-codepoints (tuba (trip "abc"))
3−++ empty-codepoints (tuba ~)
4−++ count-codepoints |= value=@t
5− (lent (tuba (trip value)))
6−++ bad-trip (trip ~zod)
7−++ bad-tuba (tuba "abc")
8−++ bad-tuba-items (tuba ~[~zod])
tests/golden/types-prelude-text/tokens.txtdeleted−66
@@ -1,66 +0,0 @@
1−1:1 glyph ++
2−1:4 name to-tape
3−1:12 glyph (
4−1:13 tight name trip
5−1:18 str "abc"
6−1:23 tight glyph )
7−2:1 NEWLINE
8−2:1 glyph ++
9−2:4 name to-codepoints
10−2:18 glyph (
11−2:19 tight name tuba
12−2:24 glyph (
13−2:25 tight name trip
14−2:30 str "abc"
15−2:35 tight glyph )
16−2:36 tight glyph )
17−3:1 NEWLINE
18−3:1 glyph ++
19−3:4 name empty-codepoints
20−3:21 glyph (
21−3:22 tight name tuba
22−3:27 lit ~
23−3:28 tight glyph )
24−4:1 NEWLINE
25−4:1 glyph ++
26−4:4 name count-codepoints
27−4:21 glyph |=
28−4:24 name value
29−4:29 tight glyph =
30−4:30 tight aura @t
31−5:3 INDENT
32−5:3 glyph (
33−5:4 tight name lent
34−5:9 glyph (
35−5:10 tight name tuba
36−5:15 glyph (
37−5:16 tight name trip
38−5:21 name value
39−5:26 tight glyph )
40−5:27 tight glyph )
41−5:28 tight glyph )
42−6:1 DEDENT
43−6:1 NEWLINE
44−6:1 glyph ++
45−6:4 name bad-trip
46−6:13 glyph (
47−6:14 tight name trip
48−6:19 lit ~zod
49−6:23 tight glyph )
50−7:1 NEWLINE
51−7:1 glyph ++
52−7:4 name bad-tuba
53−7:13 glyph (
54−7:14 tight name tuba
55−7:19 str "abc"
56−7:24 tight glyph )
57−8:1 NEWLINE
58−8:1 glyph ++
59−8:4 name bad-tuba-items
60−8:19 glyph (
61−8:20 tight name tuba
62−8:25 glyph ~[
63−8:27 tight lit ~zod
64−8:31 tight glyph ]
65−8:32 tight glyph )
66−8:33 NEWLINE
tests/golden/types-prelude-text/tree.txtdeleted−36
@@ -1,36 +0,0 @@
1−(module
2− (value 1:1 to-tape
3− (group 1:12
4− (call 1:13 (wing 1:13 trip) (str 1:18 "abc"))))
5− (value 2:1 to-codepoints
6− (group 2:18
7− (call 2:19
8− (wing 2:19 tuba)
9− (group 2:24
10− (call 2:25 (wing 2:25 trip) (str 2:30 "abc"))))))
11− (value 3:1 empty-codepoints
12− (group 3:21
13− (call 3:22 (wing 3:22 tuba) (lit 3:27 ~))))
14− (value 4:1 count-codepoints
15− (gate 4:21
16− (face 4:24 value (aura 4:30 @t))
17− (body 5:3
18− (group 5:3
19− (call 5:4
20− (wing 5:4 lent)
21− (group 5:9
22− (call 5:10
23− (wing 5:10 tuba)
24− (group 5:15
25− (call 5:16 (wing 5:16 trip) (wing 5:21 value))))))))))
26− (value 6:1 bad-trip
27− (group 6:13
28− (call 6:14 (wing 6:14 trip) (lit 6:19 ~zod))))
29− (value 7:1 bad-tuba
30− (group 7:13
31− (call 7:14 (wing 7:14 tuba) (str 7:19 "abc"))))
32− (value 8:1 bad-tuba-items
33− (group 8:19
34− (call 8:20
35− (wing 8:20 tuba)
36− (list 8:25 (lit 8:27 ~zod))))))
tests/golden/types-prelude-text/types.txtdeleted−26
@@ -1,26 +0,0 @@
1−partial inference; module not checked
2−++ to-tape: (list @tD)
3−++ to-codepoints: (list @c)
4−++ empty-codepoints: (list @c)
5−++ count-codepoints: $-(@t @ud)
6−++ bad-trip: call's sample and argument types do not unify
7−/tests/golden/types-prelude-text/source.jibb:6:14: called gate has type $-(@t (list @tD))
8−++ bad-trip (trip ~zod)
9− ^
10−/tests/golden/types-prelude-text/source.jibb:6:19: argument has type @p
11−++ bad-trip (trip ~zod)
12− ^
13−++ bad-tuba: call's sample and argument types do not unify
14−/tests/golden/types-prelude-text/source.jibb:7:14: called gate has type $-((list @tD) (list @c))
15−++ bad-tuba (tuba "abc")
16− ^
17−/tests/golden/types-prelude-text/source.jibb:7:19: argument has type @t
18−++ bad-tuba (tuba "abc")
19− ^
20−++ bad-tuba-items: list item does not fit its expected type
21−/tests/golden/types-prelude-text/source.jibb:8:20: expected item has type @tD
22−++ bad-tuba-items (tuba ~[~zod])
23− ^
24−/tests/golden/types-prelude-text/source.jibb:8:27: list item has type @p
25−++ bad-tuba-items (tuba ~[~zod])
26− ^
tests/golden/types-prelude-ui/about.txtdeleted−4
@@ -1,4 +0,0 @@
1−source: docs/spec/overview.md, Prelude, The Elm architecture on Urbit, and Layout and styling.
2−tests: Exact source-backed UI/program/page constructor schemes; static and message-bearing composition; concrete islands and pages; invalid attributes, malformed keyed/table inputs, child-message mismatch, mismatched island data, and ordinary inference of a concrete raw element constructor. Nested element payloads are erased only in the nonrecursive runtime mold, not in public constructor signatures.
3−expect: parses
4−expect-types: supported declarations infer exact types and invalid compositions report errors; the child-message mismatch fails closed as an unsupported constraint. No raw-constructor encapsulation, duplicate-attribute check, rendering, navigation, storage, or execution is claimed.
tests/golden/types-prelude-ui/modules.txtdeleted−1
@@ -1 +0,0 @@
1−# no module fixtures
tests/golden/types-prelude-ui/source.jibbdeleted−78
@@ -1,78 +0,0 @@
1−+$ msg
2− %save
3− %toggle
4− [%edited value=@t]
5−+$ model [count=@ud]
6−
7−++ row-scheme row
8−++ column-scheme column
9−++ wrap-scheme wrap
10−++ stack-scheme stack
11−++ el-scheme el
12−++ para-scheme para
13−++ text-scheme text
14−++ heading-scheme heading
15−++ each-scheme each
16−++ table-scheme table
17−++ image-scheme image
18−++ image-unsafe-scheme image-unsafe
19−++ link-scheme link
20−++ link-unsafe-scheme link-unsafe
21−++ button-scheme button
22−++ toggle-scheme toggle
23−++ field-scheme field
24−++ form-scheme form
25−++ island-scheme island
26−++ program-scheme program
27−++ page-scheme page
28−
29−++ static-text ^- (element !!) (text "hello")
30−++ raw-text ^- (element !!) (row ~ ~[[%text "raw"]])
31−++ static-ui ^- (element !!)
32− column ~[pad+%s1 gap+%s2 width+[%fill 1] align+%center role+%body tone+%muted] ~[
33− text "one"
34− para ~[(text "two")]
35− heading 2 "heading"
36−++ static-media ^- (element !!)
37− stack ~[width+[%chars 20]] ~[
38− image %/images/logo.png "Logo"
39− link %/home "Home"
40−++ unsafe-media ^- (element !!)
41− wrap ~[width+%shrink role+%caption tone+%accent] ~[
42− image-unsafe [url="https://example.com/a.png" width=20 height=10] "Remote"
43− link-unsafe "/elsewhere" "Elsewhere"
44−++ save-message ^- msg %save
45−++ toggle-message ^- msg %toggle
46−++ save-button ^- (element msg) (button "Save" save-message)
47−++ enabled-toggle ^- (element msg) (toggle %.y "Enabled" toggle-message)
48−++ edit-message |= value=@t ^- msg [%edited value]
49−++ name-field ^- (element msg) (field "Name" "value" edit-message)
50−++ controls ^- (element msg)
51− (form save-message ~[save-button enabled-toggle name-field])
52−++ keyed |= items=(list [key=@t el=(element msg)])
53− ^- (element msg) (each items)
54−++ tabular |= rows=(list [key=@ud cells=(list (element msg))])
55− ^- (element msg)
56− (table ~[[header="Name" width=[%fill 1] align=%start]] rows)
57−
58−++ bad-pad ^- (element !!) (row ~[pad+%s4] ~)
59−++ bad-width ^- (element !!) (row ~[width+[%chars "wide"]] ~)
60−++ malformed-each ^- (element msg) (each ~[[key="row" kid=(text "child")]])
61−++ malformed-table ^- (element msg)
62− (table ~[[header="Name" width=%shrink]] ~)
63−++ ship-control ^- (element @p) (button "Ship" ~zod)
64−++ text-row |= kids=(list (element @t)) ^- (element @t) (row ~ kids)
65−++ bad-child (text-row ~[ship-control])
66−
67−++ init |= input=@t ^- model [count=0]
68−++ update |= [message=msg state=model]
69− ^- [model (list (cmd msg))] [state ~]
70−++ view |= state=model ^- (element msg) (controls)
71−++ subs |= state=model ^- (list (sub msg)) ~
72−++ concrete-program ^- (program @t model msg) (program init update view subs)
73−++ embedded ^- (element !!) (island concrete-program "seed")
74−++ mismatched-island-data ^- (element !!) (island concrete-program ~zod)
75−
76−++ load |= route=@t ^- (ask model) (pure [count=0])
77−++ page-view |= data=model ^- (element !!) (text "page")
78−++ static-page ^- (page @t model) (page load page-view)
tests/golden/types-prelude-ui/tokens.txtdeleted−728
@@ -1,728 +0,0 @@
1−1:1 glyph +$
2−1:4 name msg
3−2:3 INDENT
4−2:3 lit %save
5−3:3 NEWLINE
6−3:3 lit %toggle
7−4:3 NEWLINE
8−4:3 glyph [
9−4:4 tight lit %edited
10−4:12 name value
11−4:17 tight glyph =
12−4:18 tight aura @t
13−4:20 tight glyph ]
14−5:1 DEDENT
15−5:1 NEWLINE
16−5:1 glyph +$
17−5:4 name model
18−5:10 glyph [
19−5:11 tight name count
20−5:16 tight glyph =
21−5:17 tight aura @ud
22−5:20 tight glyph ]
23−7:1 NEWLINE
24−7:1 glyph ++
25−7:4 name row-scheme
26−7:15 name row
27−8:1 NEWLINE
28−8:1 glyph ++
29−8:4 name column-scheme
30−8:18 name column
31−9:1 NEWLINE
32−9:1 glyph ++
33−9:4 name wrap-scheme
34−9:16 name wrap
35−10:1 NEWLINE
36−10:1 glyph ++
37−10:4 name stack-scheme
38−10:17 name stack
39−11:1 NEWLINE
40−11:1 glyph ++
41−11:4 name el-scheme
42−11:14 name el
43−12:1 NEWLINE
44−12:1 glyph ++
45−12:4 name para-scheme
46−12:16 name para
47−13:1 NEWLINE
48−13:1 glyph ++
49−13:4 name text-scheme
50−13:16 name text
51−14:1 NEWLINE
52−14:1 glyph ++
53−14:4 name heading-scheme
54−14:19 name heading
55−15:1 NEWLINE
56−15:1 glyph ++
57−15:4 name each-scheme
58−15:16 name each
59−16:1 NEWLINE
60−16:1 glyph ++
61−16:4 name table-scheme
62−16:17 name table
63−17:1 NEWLINE
64−17:1 glyph ++
65−17:4 name image-scheme
66−17:17 name image
67−18:1 NEWLINE
68−18:1 glyph ++
69−18:4 name image-unsafe-scheme
70−18:24 name image-unsafe
71−19:1 NEWLINE
72−19:1 glyph ++
73−19:4 name link-scheme
74−19:16 name link
75−20:1 NEWLINE
76−20:1 glyph ++
77−20:4 name link-unsafe-scheme
78−20:23 name link-unsafe
79−21:1 NEWLINE
80−21:1 glyph ++
81−21:4 name button-scheme
82−21:18 name button
83−22:1 NEWLINE
84−22:1 glyph ++
85−22:4 name toggle-scheme
86−22:18 name toggle
87−23:1 NEWLINE
88−23:1 glyph ++
89−23:4 name field-scheme
90−23:17 name field
91−24:1 NEWLINE
92−24:1 glyph ++
93−24:4 name form-scheme
94−24:16 name form
95−25:1 NEWLINE
96−25:1 glyph ++
97−25:4 name island-scheme
98−25:18 name island
99−26:1 NEWLINE
100−26:1 glyph ++
101−26:4 name program-scheme
102−26:19 name program
103−27:1 NEWLINE
104−27:1 glyph ++
105−27:4 name page-scheme
106−27:16 name page
107−29:1 NEWLINE
108−29:1 glyph ++
109−29:4 name static-text
110−29:16 glyph ^-
111−29:19 glyph (
112−29:20 tight name element
113−29:28 glyph !!
114−29:30 tight glyph )
115−29:32 glyph (
116−29:33 tight name text
117−29:38 str "hello"
118−29:45 tight glyph )
119−30:1 NEWLINE
120−30:1 glyph ++
121−30:4 name raw-text
122−30:13 glyph ^-
123−30:16 glyph (
124−30:17 tight name element
125−30:25 glyph !!
126−30:27 tight glyph )
127−30:29 glyph (
128−30:30 tight name row
129−30:34 lit ~
130−30:36 glyph ~[
131−30:38 tight glyph [
132−30:39 tight lit %text
133−30:45 str "raw"
134−30:50 tight glyph ]
135−30:51 tight glyph ]
136−30:52 tight glyph )
137−31:1 NEWLINE
138−31:1 glyph ++
139−31:4 name static-ui
140−31:14 glyph ^-
141−31:17 glyph (
142−31:18 tight name element
143−31:26 glyph !!
144−31:28 tight glyph )
145−32:3 INDENT
146−32:3 name column
147−32:10 glyph ~[
148−32:12 tight name pad
149−32:15 tight glyph +
150−32:16 tight lit %s1
151−32:20 name gap
152−32:23 tight glyph +
153−32:24 tight lit %s2
154−32:28 name width
155−32:33 tight glyph +
156−32:34 tight glyph [
157−32:35 tight lit %fill
158−32:41 lit 1
159−32:42 tight glyph ]
160−32:44 name align
161−32:49 tight glyph +
162−32:50 tight lit %center
163−32:58 name role
164−32:62 tight glyph +
165−32:63 tight lit %body
166−32:69 name tone
167−32:73 tight glyph +
168−32:74 tight lit %muted
169−32:80 tight glyph ]
170−32:82 glyph ~[
171−33:5 INDENT
172−33:5 name text
173−33:10 str "one"
174−34:5 NEWLINE
175−34:5 name para
176−34:10 glyph ~[
177−34:12 tight glyph (
178−34:13 tight name text
179−34:18 str "two"
180−34:23 tight glyph )
181−34:24 tight glyph ]
182−35:5 NEWLINE
183−35:5 name heading
184−35:13 lit 2
185−35:15 str "heading"
186−36:1 DEDENT
187−36:1 DEDENT
188−36:1 NEWLINE
189−36:1 glyph ++
190−36:4 name static-media
191−36:17 glyph ^-
192−36:20 glyph (
193−36:21 tight name element
194−36:29 glyph !!
195−36:31 tight glyph )
196−37:3 INDENT
197−37:3 name stack
198−37:9 glyph ~[
199−37:11 tight name width
200−37:16 tight glyph +
201−37:17 tight glyph [
202−37:18 tight lit %chars
203−37:25 lit 20
204−37:27 tight glyph ]
205−37:28 tight glyph ]
206−37:30 glyph ~[
207−38:5 INDENT
208−38:5 name image
209−38:11 glyph %/
210−38:13 tight knot images
211−38:19 tight glyph /
212−38:20 tight knot logo.png
213−38:29 str "Logo"
214−39:5 NEWLINE
215−39:5 name link
216−39:10 glyph %/
217−39:12 tight knot home
218−39:17 str "Home"
219−40:1 DEDENT
220−40:1 DEDENT
221−40:1 NEWLINE
222−40:1 glyph ++
223−40:4 name unsafe-media
224−40:17 glyph ^-
225−40:20 glyph (
226−40:21 tight name element
227−40:29 glyph !!
228−40:31 tight glyph )
229−41:3 INDENT
230−41:3 name wrap
231−41:8 glyph ~[
232−41:10 tight name width
233−41:15 tight glyph +
234−41:16 tight lit %shrink
235−41:24 name role
236−41:28 tight glyph +
237−41:29 tight lit %caption
238−41:38 name tone
239−41:42 tight glyph +
240−41:43 tight lit %accent
241−41:50 tight glyph ]
242−41:52 glyph ~[
243−42:5 INDENT
244−42:5 name image-unsafe
245−42:18 glyph [
246−42:19 tight name url
247−42:22 tight glyph =
248−42:23 tight str "https://example.com/a.png"
249−42:51 name width
250−42:56 tight glyph =
251−42:57 tight lit 20
252−42:60 name height
253−42:66 tight glyph =
254−42:67 tight lit 10
255−42:69 tight glyph ]
256−42:71 str "Remote"
257−43:5 NEWLINE
258−43:5 name link-unsafe
259−43:17 str "/elsewhere"
260−43:30 str "Elsewhere"
261−44:1 DEDENT
262−44:1 DEDENT
263−44:1 NEWLINE
264−44:1 glyph ++
265−44:4 name save-message
266−44:17 glyph ^-
267−44:20 name msg
268−44:24 lit %save
269−45:1 NEWLINE
270−45:1 glyph ++
271−45:4 name toggle-message
272−45:19 glyph ^-
273−45:22 name msg
274−45:26 lit %toggle
275−46:1 NEWLINE
276−46:1 glyph ++
277−46:4 name save-button
278−46:16 glyph ^-
279−46:19 glyph (
280−46:20 tight name element
281−46:28 name msg
282−46:31 tight glyph )
283−46:33 glyph (
284−46:34 tight name button
285−46:41 str "Save"
286−46:48 name save-message
287−46:60 tight glyph )
288−47:1 NEWLINE
289−47:1 glyph ++
290−47:4 name enabled-toggle
291−47:19 glyph ^-
292−47:22 glyph (
293−47:23 tight name element
294−47:31 name msg
295−47:34 tight glyph )
296−47:36 glyph (
297−47:37 tight name toggle
298−47:44 lit %.y
299−47:48 str "Enabled"
300−47:58 name toggle-message
301−47:72 tight glyph )
302−48:1 NEWLINE
303−48:1 glyph ++
304−48:4 name edit-message
305−48:17 glyph |=
306−48:20 name value
307−48:25 tight glyph =
308−48:26 tight aura @t
309−48:29 glyph ^-
310−48:32 name msg
311−48:36 glyph [
312−48:37 tight lit %edited
313−48:45 name value
314−48:50 tight glyph ]
315−49:1 NEWLINE
316−49:1 glyph ++
317−49:4 name name-field
318−49:15 glyph ^-
319−49:18 glyph (
320−49:19 tight name element
321−49:27 name msg
322−49:30 tight glyph )
323−49:32 glyph (
324−49:33 tight name field
325−49:39 str "Name"
326−49:46 str "value"
327−49:54 name edit-message
328−49:66 tight glyph )
329−50:1 NEWLINE
330−50:1 glyph ++
331−50:4 name controls
332−50:13 glyph ^-
333−50:16 glyph (
334−50:17 tight name element
335−50:25 name msg
336−50:28 tight glyph )
337−51:3 INDENT
338−51:3 glyph (
339−51:4 tight name form
340−51:9 name save-message
341−51:22 glyph ~[
342−51:24 tight name save-button
343−51:36 name enabled-toggle
344−51:51 name name-field
345−51:61 tight glyph ]
346−51:62 tight glyph )
347−52:1 DEDENT
348−52:1 NEWLINE
349−52:1 glyph ++
350−52:4 name keyed
351−52:10 glyph |=
352−52:13 name items
353−52:18 tight glyph =
354−52:19 tight glyph (
355−52:20 tight name list
356−52:25 glyph [
357−52:26 tight name key
358−52:29 tight glyph =
359−52:30 tight aura @t
360−52:33 name el
361−52:35 tight glyph =
362−52:36 tight glyph (
363−52:37 tight name element
364−52:45 name msg
365−52:48 tight glyph )
366−52:49 tight glyph ]
367−52:50 tight glyph )
368−53:3 INDENT
369−53:3 glyph ^-
370−53:6 glyph (
371−53:7 tight name element
372−53:15 name msg
373−53:18 tight glyph )
374−53:20 glyph (
375−53:21 tight name each
376−53:26 name items
377−53:31 tight glyph )
378−54:1 DEDENT
379−54:1 NEWLINE
380−54:1 glyph ++
381−54:4 name tabular
382−54:12 glyph |=
383−54:15 name rows
384−54:19 tight glyph =
385−54:20 tight glyph (
386−54:21 tight name list
387−54:26 glyph [
388−54:27 tight name key
389−54:30 tight glyph =
390−54:31 tight aura @ud
391−54:35 name cells
392−54:40 tight glyph =
393−54:41 tight glyph (
394−54:42 tight name list
395−54:47 glyph (
396−54:48 tight name element
397−54:56 name msg
398−54:59 tight glyph )
399−54:60 tight glyph )
400−54:61 tight glyph ]
401−54:62 tight glyph )
402−55:3 INDENT
403−55:3 glyph ^-
404−55:6 glyph (
405−55:7 tight name element
406−55:15 name msg
407−55:18 tight glyph )
408−56:5 INDENT
409−56:5 glyph (
410−56:6 tight name table
411−56:12 glyph ~[
412−56:14 tight glyph [
413−56:15 tight name header
414−56:21 tight glyph =
415−56:22 tight str "Name"
416−56:29 name width
417−56:34 tight glyph =
418−56:35 tight glyph [
419−56:36 tight lit %fill
420−56:42 lit 1
421−56:43 tight glyph ]
422−56:45 name align
423−56:50 tight glyph =
424−56:51 tight lit %start
425−56:57 tight glyph ]
426−56:58 tight glyph ]
427−56:60 name rows
428−56:64 tight glyph )
429−58:1 DEDENT
430−58:1 DEDENT
431−58:1 NEWLINE
432−58:1 glyph ++
433−58:4 name bad-pad
434−58:12 glyph ^-
435−58:15 glyph (
436−58:16 tight name element
437−58:24 glyph !!
438−58:26 tight glyph )
439−58:28 glyph (
440−58:29 tight name row
441−58:33 glyph ~[
442−58:35 tight name pad
443−58:38 tight glyph +
444−58:39 tight lit %s4
445−58:42 tight glyph ]
446−58:44 lit ~
447−58:45 tight glyph )
448−59:1 NEWLINE
449−59:1 glyph ++
450−59:4 name bad-width
451−59:14 glyph ^-
452−59:17 glyph (
453−59:18 tight name element
454−59:26 glyph !!
455−59:28 tight glyph )
456−59:30 glyph (
457−59:31 tight name row
458−59:35 glyph ~[
459−59:37 tight name width
460−59:42 tight glyph +
461−59:43 tight glyph [
462−59:44 tight lit %chars
463−59:51 str "wide"
464−59:57 tight glyph ]
465−59:58 tight glyph ]
466−59:60 lit ~
467−59:61 tight glyph )
468−60:1 NEWLINE
469−60:1 glyph ++
470−60:4 name malformed-each
471−60:19 glyph ^-
472−60:22 glyph (
473−60:23 tight name element
474−60:31 name msg
475−60:34 tight glyph )
476−60:36 glyph (
477−60:37 tight name each
478−60:42 glyph ~[
479−60:44 tight glyph [
480−60:45 tight name key
481−60:48 tight glyph =
482−60:49 tight str "row"
483−60:55 name kid
484−60:58 tight glyph =
485−60:59 tight glyph (
486−60:60 tight name text
487−60:65 str "child"
488−60:72 tight glyph )
489−60:73 tight glyph ]
490−60:74 tight glyph ]
491−60:75 tight glyph )
492−61:1 NEWLINE
493−61:1 glyph ++
494−61:4 name malformed-table
495−61:20 glyph ^-
496−61:23 glyph (
497−61:24 tight name element
498−61:32 name msg
499−61:35 tight glyph )
500−62:3 INDENT
501−62:3 glyph (
502−62:4 tight name table
503−62:10 glyph ~[
504−62:12 tight glyph [
505−62:13 tight name header
506−62:19 tight glyph =
507−62:20 tight str "Name"
508−62:27 name width
509−62:32 tight glyph =
510−62:33 tight lit %shrink
511−62:40 tight glyph ]
512−62:41 tight glyph ]
513−62:43 lit ~
514−62:44 tight glyph )
515−63:1 DEDENT
516−63:1 NEWLINE
517−63:1 glyph ++
518−63:4 name ship-control
519−63:17 glyph ^-
520−63:20 glyph (
521−63:21 tight name element
522−63:29 aura @p
523−63:31 tight glyph )
524−63:33 glyph (
525−63:34 tight name button
526−63:41 str "Ship"
527−63:48 lit ~zod
528−63:52 tight glyph )
529−64:1 NEWLINE
530−64:1 glyph ++
531−64:4 name text-row
532−64:13 glyph |=
533−64:16 name kids
534−64:20 tight glyph =
535−64:21 tight glyph (
536−64:22 tight name list
537−64:27 glyph (
538−64:28 tight name element
539−64:36 aura @t
540−64:38 tight glyph )
541−64:39 tight glyph )
542−64:41 glyph ^-
543−64:44 glyph (
544−64:45 tight name element
545−64:53 aura @t
546−64:55 tight glyph )
547−64:57 glyph (
548−64:58 tight name row
549−64:62 lit ~
550−64:64 name kids
551−64:68 tight glyph )
552−65:1 NEWLINE
553−65:1 glyph ++
554−65:4 name bad-child
555−65:14 glyph (
556−65:15 tight name text-row
557−65:24 glyph ~[
558−65:26 tight name ship-control
559−65:38 tight glyph ]
560−65:39 tight glyph )
561−67:1 NEWLINE
562−67:1 glyph ++
563−67:4 name init
564−67:9 glyph |=
565−67:12 name input
566−67:17 tight glyph =
567−67:18 tight aura @t
568−67:21 glyph ^-
569−67:24 name model
570−67:30 glyph [
571−67:31 tight name count
572−67:36 tight glyph =
573−67:37 tight lit 0
574−67:38 tight glyph ]
575−68:1 NEWLINE
576−68:1 glyph ++
577−68:4 name update
578−68:11 glyph |=
579−68:14 glyph [
580−68:15 tight name message
581−68:22 tight glyph =
582−68:23 tight name msg
583−68:27 name state
584−68:32 tight glyph =
585−68:33 tight name model
586−68:38 tight glyph ]
587−69:3 INDENT
588−69:3 glyph ^-
589−69:6 glyph [
590−69:7 tight name model
591−69:13 glyph (
592−69:14 tight name list
593−69:19 glyph (
594−69:20 tight name cmd
595−69:24 name msg
596−69:27 tight glyph )
597−69:28 tight glyph )
598−69:29 tight glyph ]
599−69:31 glyph [
600−69:32 tight name state
601−69:38 lit ~
602−69:39 tight glyph ]
603−70:1 DEDENT
604−70:1 NEWLINE
605−70:1 glyph ++
606−70:4 name view
607−70:9 glyph |=
608−70:12 name state
609−70:17 tight glyph =
610−70:18 tight name model
611−70:24 glyph ^-
612−70:27 glyph (
613−70:28 tight name element
614−70:36 name msg
615−70:39 tight glyph )
616−70:41 glyph (
617−70:42 tight name controls
618−70:50 tight glyph )
619−71:1 NEWLINE
620−71:1 glyph ++
621−71:4 name subs
622−71:9 glyph |=
623−71:12 name state
624−71:17 tight glyph =
625−71:18 tight name model
626−71:24 glyph ^-
627−71:27 glyph (
628−71:28 tight name list
629−71:33 glyph (
630−71:34 tight name sub
631−71:38 name msg
632−71:41 tight glyph )
633−71:42 tight glyph )
634−71:44 lit ~
635−72:1 NEWLINE
636−72:1 glyph ++
637−72:4 name concrete-program
638−72:21 glyph ^-
639−72:24 glyph (
640−72:25 tight name program
641−72:33 aura @t
642−72:36 name model
643−72:42 name msg
644−72:45 tight glyph )
645−72:47 glyph (
646−72:48 tight name program
647−72:56 name init
648−72:61 name update
649−72:68 name view
650−72:73 name subs
651−72:77 tight glyph )
652−73:1 NEWLINE
653−73:1 glyph ++
654−73:4 name embedded
655−73:13 glyph ^-
656−73:16 glyph (
657−73:17 tight name element
658−73:25 glyph !!
659−73:27 tight glyph )
660−73:29 glyph (
661−73:30 tight name island
662−73:37 name concrete-program
663−73:54 str "seed"
664−73:60 tight glyph )
665−74:1 NEWLINE
666−74:1 glyph ++
667−74:4 name mismatched-island-data
668−74:27 glyph ^-
669−74:30 glyph (
670−74:31 tight name element
671−74:39 glyph !!
672−74:41 tight glyph )
673−74:43 glyph (
674−74:44 tight name island
675−74:51 name concrete-program
676−74:68 lit ~zod
677−74:72 tight glyph )
678−76:1 NEWLINE
679−76:1 glyph ++
680−76:4 name load
681−76:9 glyph |=
682−76:12 name route
683−76:17 tight glyph =
684−76:18 tight aura @t
685−76:21 glyph ^-
686−76:24 glyph (
687−76:25 tight name ask
688−76:29 name model
689−76:34 tight glyph )
690−76:36 glyph (
691−76:37 tight name pure
692−76:42 glyph [
693−76:43 tight name count
694−76:48 tight glyph =
695−76:49 tight lit 0
696−76:50 tight glyph ]
697−76:51 tight glyph )
698−77:1 NEWLINE
699−77:1 glyph ++
700−77:4 name page-view
701−77:14 glyph |=
702−77:17 name data
703−77:21 tight glyph =
704−77:22 tight name model
705−77:28 glyph ^-
706−77:31 glyph (
707−77:32 tight name element
708−77:40 glyph !!
709−77:42 tight glyph )
710−77:44 glyph (
711−77:45 tight name text
712−77:50 str "page"
713−77:56 tight glyph )
714−78:1 NEWLINE
715−78:1 glyph ++
716−78:4 name static-page
717−78:16 glyph ^-
718−78:19 glyph (
719−78:20 tight name page
720−78:25 aura @t
721−78:28 name model
722−78:33 tight glyph )
723−78:35 glyph (
724−78:36 tight name page
725−78:41 name load
726−78:46 name page-view
727−78:55 tight glyph )
728−78:56 NEWLINE
tests/golden/types-prelude-ui/tree.txtdeleted−300
@@ -1,300 +0,0 @@
1−(module
2− (mold 1:1 msg
3− (union 2:3
4− (const 2:3 %save)
5− (const 3:3 %toggle)
6− (cell 4:3
7− (const 4:4 %edited)
8− (face 4:12 value (aura 4:18 @t)))))
9− (mold 5:1 model
10− (cell 5:10
11− (face 5:11 count (aura 5:17 @ud))))
12− (value 7:1 row-scheme (wing 7:15 row))
13− (value 8:1 column-scheme (wing 8:18 column))
14− (value 9:1 wrap-scheme (wing 9:16 wrap))
15− (value 10:1 stack-scheme (wing 10:17 stack))
16− (value 11:1 el-scheme (wing 11:14 el))
17− (value 12:1 para-scheme (wing 12:16 para))
18− (value 13:1 text-scheme (wing 13:16 text))
19− (value 14:1 heading-scheme (wing 14:19 heading))
20− (value 15:1 each-scheme (wing 15:16 each))
21− (value 16:1 table-scheme (wing 16:17 table))
22− (value 17:1 image-scheme (wing 17:17 image))
23− (value 18:1 image-unsafe-scheme (wing 18:24 image-unsafe))
24− (value 19:1 link-scheme (wing 19:16 link))
25− (value 20:1 link-unsafe-scheme (wing 20:23 link-unsafe))
26− (value 21:1 button-scheme (wing 21:18 button))
27− (value 22:1 toggle-scheme (wing 22:18 toggle))
28− (value 23:1 field-scheme (wing 23:17 field))
29− (value 24:1 form-scheme (wing 24:16 form))
30− (value 25:1 island-scheme (wing 25:18 island))
31− (value 26:1 program-scheme (wing 26:19 program))
32− (value 27:1 page-scheme (wing 27:16 page))
33− (value 29:1 static-text
34− (cast 29:16
35− (apply 29:19 element (void 29:28))
36− (group 29:32
37− (call 29:33 (wing 29:33 text) (str 29:38 "hello")))))
38− (value 30:1 raw-text
39− (cast 30:13
40− (apply 30:16 element (void 30:25))
41− (group 30:29
42− (call 30:30
43− (wing 30:30 row)
44− (lit 30:34 ~)
45− (list 30:36
46− (tuple 30:38 (lit 30:39 %text) (str 30:45 "raw")))))))
47− (value 31:1 static-ui
48− (cast 31:14
49− (apply 31:17 element (void 31:26))
50− (body 32:3
51− (call 32:3
52− (wing 32:3 column)
53− (list 32:10
54− (pair 32:12 pad (lit 32:16 %s1))
55− (pair 32:20 gap (lit 32:24 %s2))
56− (pair 32:28 width
57− (tuple 32:34 (lit 32:35 %fill) (lit 32:41 1)))
58− (pair 32:44 align (lit 32:50 %center))
59− (pair 32:58 role (lit 32:63 %body))
60− (pair 32:69 tone (lit 32:74 %muted)))
61− (list 32:82
62− (call 33:5 (wing 33:5 text) (str 33:10 "one"))
63− (call 34:5
64− (wing 34:5 para)
65− (list 34:10
66− (group 34:12
67− (call 34:13 (wing 34:13 text) (str 34:18 "two")))))
68− (call 35:5 (wing 35:5 heading) (lit 35:13 2) (str 35:15 "heading")))))))
69− (value 36:1 static-media
70− (cast 36:17
71− (apply 36:20 element (void 36:29))
72− (body 37:3
73− (call 37:3
74− (wing 37:3 stack)
75− (list 37:9
76− (pair 37:11 width
77− (tuple 37:17 (lit 37:18 %chars) (lit 37:25 20))))
78− (list 37:30
79− (call 38:5 (wing 38:5 image) (qath 38:11 images logo.png) (str 38:29 "Logo"))
80− (call 39:5 (wing 39:5 link) (qath 39:10 home) (str 39:17 "Home")))))))
81− (value 40:1 unsafe-media
82− (cast 40:17
83− (apply 40:20 element (void 40:29))
84− (body 41:3
85− (call 41:3
86− (wing 41:3 wrap)
87− (list 41:8
88− (pair 41:10 width (lit 41:16 %shrink))
89− (pair 41:24 role (lit 41:29 %caption))
90− (pair 41:38 tone (lit 41:43 %accent)))
91− (list 41:52
92− (call 42:5
93− (wing 42:5 image-unsafe)
94− (tuple 42:18
95− (face 42:19 url (str 42:23 "https://example.com/a.png"))
96− (face 42:51 width (lit 42:57 20))
97− (face 42:60 height (lit 42:67 10)))
98− (str 42:71 "Remote"))
99− (call 43:5 (wing 43:5 link-unsafe) (str 43:17 "/elsewhere") (str 43:30 "Elsewhere")))))))
100− (value 44:1 save-message
101− (cast 44:17 (ref 44:20 msg) (lit 44:24 %save)))
102− (value 45:1 toggle-message
103− (cast 45:19 (ref 45:22 msg) (lit 45:26 %toggle)))
104− (value 46:1 save-button
105− (cast 46:16
106− (apply 46:19 element (ref 46:28 msg))
107− (group 46:33
108− (call 46:34 (wing 46:34 button) (str 46:41 "Save") (wing 46:48 save-message)))))
109− (value 47:1 enabled-toggle
110− (cast 47:19
111− (apply 47:22 element (ref 47:31 msg))
112− (group 47:36
113− (call 47:37 (wing 47:37 toggle) (lit 47:44 %.y) (str 47:48 "Enabled") (wing 47:58 toggle-message)))))
114− (value 48:1 edit-message
115− (gate 48:17
116− (face 48:20 value (aura 48:26 @t))
117− (cast 48:29
118− (ref 48:32 msg)
119− (tuple 48:36 (lit 48:37 %edited) (wing 48:45 value)))))
120− (value 49:1 name-field
121− (cast 49:15
122− (apply 49:18 element (ref 49:27 msg))
123− (group 49:32
124− (call 49:33 (wing 49:33 field) (str 49:39 "Name") (str 49:46 "value") (wing 49:54 edit-message)))))
125− (value 50:1 controls
126− (cast 50:13
127− (apply 50:16 element (ref 50:25 msg))
128− (body 51:3
129− (group 51:3
130− (call 51:4
131− (wing 51:4 form)
132− (wing 51:9 save-message)
133− (list 51:22 (wing 51:24 save-button) (wing 51:36 enabled-toggle) (wing 51:51 name-field)))))))
134− (value 52:1 keyed
135− (gate 52:10
136− (face 52:13 items
137− (apply 52:19 list
138− (cell 52:25
139− (face 52:26 key (aura 52:30 @t))
140− (face 52:33 el
141− (apply 52:36 element (ref 52:45 msg))))))
142− (body 53:3
143− (cast 53:3
144− (apply 53:6 element (ref 53:15 msg))
145− (group 53:20
146− (call 53:21 (wing 53:21 each) (wing 53:26 items)))))))
147− (value 54:1 tabular
148− (gate 54:12
149− (face 54:15 rows
150− (apply 54:20 list
151− (cell 54:26
152− (face 54:27 key (aura 54:31 @ud))
153− (face 54:35 cells
154− (apply 54:41 list
155− (apply 54:47 element (ref 54:56 msg)))))))
156− (body 55:3
157− (cast 55:3
158− (apply 55:6 element (ref 55:15 msg))
159− (body 56:5
160− (group 56:5
161− (call 56:6
162− (wing 56:6 table)
163− (list 56:12
164− (tuple 56:14
165− (face 56:15 header (str 56:22 "Name"))
166− (face 56:29 width
167− (tuple 56:35 (lit 56:36 %fill) (lit 56:42 1)))
168− (face 56:45 align (lit 56:51 %start))))
169− (wing 56:60 rows))))))))
170− (value 58:1 bad-pad
171− (cast 58:12
172− (apply 58:15 element (void 58:24))
173− (group 58:28
174− (call 58:29
175− (wing 58:29 row)
176− (list 58:33
177− (pair 58:35 pad (lit 58:39 %s4)))
178− (lit 58:44 ~)))))
179− (value 59:1 bad-width
180− (cast 59:14
181− (apply 59:17 element (void 59:26))
182− (group 59:30
183− (call 59:31
184− (wing 59:31 row)
185− (list 59:35
186− (pair 59:37 width
187− (tuple 59:43 (lit 59:44 %chars) (str 59:51 "wide"))))
188− (lit 59:60 ~)))))
189− (value 60:1 malformed-each
190− (cast 60:19
191− (apply 60:22 element (ref 60:31 msg))
192− (group 60:36
193− (call 60:37
194− (wing 60:37 each)
195− (list 60:42
196− (tuple 60:44
197− (face 60:45 key (str 60:49 "row"))
198− (face 60:55 kid
199− (group 60:59
200− (call 60:60 (wing 60:60 text) (str 60:65 "child"))))))))))
201− (value 61:1 malformed-table
202− (cast 61:20
203− (apply 61:23 element (ref 61:32 msg))
204− (body 62:3
205− (group 62:3
206− (call 62:4
207− (wing 62:4 table)
208− (list 62:10
209− (tuple 62:12
210− (face 62:13 header (str 62:20 "Name"))
211− (face 62:27 width (lit 62:33 %shrink))))
212− (lit 62:43 ~))))))
213− (value 63:1 ship-control
214− (cast 63:17
215− (apply 63:20 element (aura 63:29 @p))
216− (group 63:33
217− (call 63:34 (wing 63:34 button) (str 63:41 "Ship") (lit 63:48 ~zod)))))
218− (value 64:1 text-row
219− (gate 64:13
220− (face 64:16 kids
221− (apply 64:21 list
222− (apply 64:27 element (aura 64:36 @t))))
223− (cast 64:41
224− (apply 64:44 element (aura 64:53 @t))
225− (group 64:57
226− (call 64:58 (wing 64:58 row) (lit 64:62 ~) (wing 64:64 kids))))))
227− (value 65:1 bad-child
228− (group 65:14
229− (call 65:15
230− (wing 65:15 text-row)
231− (list 65:24 (wing 65:26 ship-control)))))
232− (value 67:1 init
233− (gate 67:9
234− (face 67:12 input (aura 67:18 @t))
235− (cast 67:21
236− (ref 67:24 model)
237− (tuple 67:30
238− (face 67:31 count (lit 67:37 0))))))
239− (value 68:1 update
240− (gate 68:11
241− (cell 68:14
242− (face 68:15 message (ref 68:23 msg))
243− (face 68:27 state (ref 68:33 model)))
244− (body 69:3
245− (cast 69:3
246− (cell 69:6
247− (ref 69:7 model)
248− (apply 69:13 list
249− (apply 69:19 cmd (ref 69:24 msg))))
250− (tuple 69:31 (wing 69:32 state) (lit 69:38 ~))))))
251− (value 70:1 view
252− (gate 70:9
253− (face 70:12 state (ref 70:18 model))
254− (cast 70:24
255− (apply 70:27 element (ref 70:36 msg))
256− (group 70:41 (wing 70:42 controls)))))
257− (value 71:1 subs
258− (gate 71:9
259− (face 71:12 state (ref 71:18 model))
260− (cast 71:24
261− (apply 71:27 list
262− (apply 71:33 sub (ref 71:38 msg)))
263− (lit 71:44 ~))))
264− (value 72:1 concrete-program
265− (cast 72:21
266− (apply 72:24 program (aura 72:33 @t) (ref 72:36 model) (ref 72:42 msg))
267− (group 72:47
268− (call 72:48 (wing 72:48 program) (wing 72:56 init) (wing 72:61 update) (wing 72:68 view) (wing 72:73 subs)))))
269− (value 73:1 embedded
270− (cast 73:13
271− (apply 73:16 element (void 73:25))
272− (group 73:29
273− (call 73:30 (wing 73:30 island) (wing 73:37 concrete-program) (str 73:54 "seed")))))
274− (value 74:1 mismatched-island-data
275− (cast 74:27
276− (apply 74:30 element (void 74:39))
277− (group 74:43
278− (call 74:44 (wing 74:44 island) (wing 74:51 concrete-program) (lit 74:68 ~zod)))))
279− (value 76:1 load
280− (gate 76:9
281− (face 76:12 route (aura 76:18 @t))
282− (cast 76:21
283− (apply 76:24 ask (ref 76:29 model))
284− (group 76:36
285− (call 76:37
286− (wing 76:37 pure)
287− (tuple 76:42
288− (face 76:43 count (lit 76:49 0))))))))
289− (value 77:1 page-view
290− (gate 77:14
291− (face 77:17 data (ref 77:22 model))
292− (cast 77:28
293− (apply 77:31 element (void 77:40))
294− (group 77:44
295− (call 77:45 (wing 77:45 text) (str 77:50 "page"))))))
296− (value 78:1 static-page
297− (cast 78:16
298− (apply 78:19 page (aura 78:25 @t) (ref 78:28 model))
299− (group 78:35
300− (call 78:36 (wing 78:36 page) (wing 78:41 load) (wing 78:46 page-view))))))
tests/golden/types-prelude-ui/types.txtdeleted−85
@@ -1,85 +0,0 @@
1−partial inference; module not checked
2−+$ msg: cases proven disjoint; mold not checked
3−+$ model: not checked
4−++ row-scheme: $-([attrs=(list attr) kids=(list (element A))] (element A))
5−++ column-scheme: $-([attrs=(list attr) kids=(list (element A))] (element A))
6−++ wrap-scheme: $-([attrs=(list attr) kids=(list (element A))] (element A))
7−++ stack-scheme: $-([attrs=(list attr) kids=(list (element A))] (element A))
8−++ el-scheme: $-([attrs=(list attr) kid=(element A)] (element A))
9−++ para-scheme: $-((list (element A)) (element A))
10−++ text-scheme: $-(@t (element A))
11−++ heading-scheme: $-([level=@ud words=@t] (element A))
12−++ each-scheme: $-((list [key=A el=(element B)]) (element B))
13−++ table-scheme: $-([columns=(list [header=@t [width=length align=align]]) rows=(list [key=A cells=(list (element B))])] (element B))
14−++ image-scheme: $-([source=qath description=@t] (element A))
15−++ image-unsafe-scheme: $-([source=[url=@t [width=@ud height=@ud]] description=@t] (element A))
16−++ link-scheme: $-([target=qath label=@t] (element A))
17−++ link-unsafe-scheme: $-([target=@t label=@t] (element A))
18−++ button-scheme: $-([label=@t message=A] (element A))
19−++ toggle-scheme: $-([on=? [label=@t message=A]] (element A))
20−++ field-scheme: $-([label=@t [value=@t reply=$-(@t A)]] (element A))
21−++ form-scheme: $-([message=A kids=(list (element A))] (element A))
22−++ island-scheme: $-([p=[init=$-(A B) [update=$-([C B] [B (list (cmd C))]) [view=$-(B (element C)) subs=$-(B (list (sub C)))]]] data=A] (element !!))
23−++ program-scheme: $-([init=$-(A B) [update=$-([C B] [B (list (cmd C))]) [view=$-(B (element C)) subs=$-(B (list (sub C)))]]] [init=$-(A B) [update=$-([C B] [B (list (cmd C))]) [view=$-(B (element C)) subs=$-(B (list (sub C)))]]])
24−++ page-scheme: $-([load=$-(A (ask B)) view=$-(B (element !!))] [load=$-(A (ask B)) view=$-(B (element !!))])
25−++ static-text: (element !!)
26−++ raw-text: (element !!)
27−++ static-ui: (element !!)
28−++ static-media: (element !!)
29−++ unsafe-media: (element !!)
30−++ save-message: msg
31−++ toggle-message: msg
32−++ save-button: (element msg)
33−++ enabled-toggle: (element msg)
34−++ edit-message: $-(@t msg)
35−++ name-field: (element msg)
36−++ controls: (element msg)
37−++ keyed: $-((list [key=@t el=(element msg)]) (element msg))
38−++ tabular: $-((list [key=@ud cells=(list (element msg))]) (element msg))
39−++ bad-pad: list item does not fit its expected type
40−/tests/golden/types-prelude-ui/source.jibb:58:29: expected item
41−++ bad-pad ^- (element !!) (row ~[pad+%s4] ~)
42− ^
43−/tests/golden/types-prelude-ui/source.jibb:58:35: list item
44−++ bad-pad ^- (element !!) (row ~[pad+%s4] ~)
45− ^
46−++ bad-width: list item does not fit its expected type
47−/tests/golden/types-prelude-ui/source.jibb:59:31: expected item
48−++ bad-width ^- (element !!) (row ~[width+[%chars "wide"]] ~)
49− ^
50−/tests/golden/types-prelude-ui/source.jibb:59:37: list item
51−++ bad-width ^- (element !!) (row ~[width+[%chars "wide"]] ~)
52− ^
53−++ malformed-each: list item does not fit its expected type
54−/tests/golden/types-prelude-ui/source.jibb:60:37: expected item
55−++ malformed-each ^- (element msg) (each ~[[key="row" kid=(text "child")]])
56− ^
57−/tests/golden/types-prelude-ui/source.jibb:60:44: list item
58−++ malformed-each ^- (element msg) (each ~[[key="row" kid=(text "child")]])
59− ^
60−++ malformed-table: list item does not fit its expected type
61−/tests/golden/types-prelude-ui/source.jibb:62:4: expected item
62− (table ~[[header="Name" width=%shrink]] ~)
63− ^
64−/tests/golden/types-prelude-ui/source.jibb:62:12: list item
65− (table ~[[header="Name" width=%shrink]] ~)
66− ^
67−++ ship-control: (element @p)
68−++ text-row: $-((list (element @t)) (element @t))
69−++ bad-child: list item constraint is not supported by partial inference
70−++ init: $-(@t [count=@ud])
71−++ update: $-([message=msg state=[count=@ud]] [count=@ud (list (cmd msg))])
72−++ view: $-([count=@ud] (element msg))
73−++ subs: $-([count=@ud] (list (sub msg)))
74−++ concrete-program: [init=$-(@t [count=@ud]) [update=$-([msg count=@ud] [count=@ud (list (cmd msg))]) [view=$-([count=@ud] (element msg)) subs=$-([count=@ud] (list (sub msg)))]]]
75−++ embedded: (element !!)
76−++ mismatched-island-data: call's sample and argument types do not unify
77−/tests/golden/types-prelude-ui/source.jibb:74:44: called gate
78−++ mismatched-island-data ^- (element !!) (island concrete-program ~zod)
79− ^
80−/tests/golden/types-prelude-ui/source.jibb:74:51: argument
81−++ mismatched-island-data ^- (element !!) (island concrete-program ~zod)
82− ^
83−++ load: $-(@t (ask [count=@ud]))
84−++ page-view: $-([count=@ud] (element !!))
85−++ static-page: [load=$-(@t (ask.internal [count=@ud])) view=$-([count=@ud] (element !!))]
tests/golden/types-prelude-zing/about.txtdeleted−4
@@ -1,4 +0,0 @@
1−source: docs/spec/overview.md, Prelude: "Hoon's standard library regrouped, written in Jibb"; the Lists row includes section 2b.
2−tests: Source-backed zing infers empty and nested text lists, ship elements, independently generic element types and gate elements, and reports both sites for a non-list. The Jibb type is homogeneous (list (list A)) to (list A); Hoon's raw heterogeneous noun-list behavior is outside this type. This checks partial inference only; backend execution and jet recognition remain unverified.
3−expect: parses
4−expect-types: a partial inference report
tests/golden/types-prelude-zing/modules.txtdeleted−1
@@ -1 +0,0 @@
1−# no module fixtures
tests/golden/types-prelude-zing/source.jibbdeleted−6
@@ -1,6 +0,0 @@
1−++ empty (zing (^- (list (list @t)) ~))
2−++ nested (zing ~[~["a" "b"] ~[] ~["c"]])
3−++ ships (zing ~[~[~zod] ~[~nec]])
4−++ generic |= xss=(list (list A)) (zing xss)
5−++ gates |= xss=(list (list $-(A B))) (zing xss)
6−++ bad (zing "not a list of lists")
tests/golden/types-prelude-zing/tokens.txtdeleted−92
@@ -1,92 +0,0 @@
1−1:1 glyph ++
2−1:4 name empty
3−1:10 glyph (
4−1:11 tight name zing
5−1:16 glyph (
6−1:17 tight glyph ^-
7−1:20 glyph (
8−1:21 tight name list
9−1:26 glyph (
10−1:27 tight name list
11−1:32 aura @t
12−1:34 tight glyph )
13−1:35 tight glyph )
14−1:37 lit ~
15−1:38 tight glyph )
16−1:39 tight glyph )
17−2:1 NEWLINE
18−2:1 glyph ++
19−2:4 name nested
20−2:11 glyph (
21−2:12 tight name zing
22−2:17 glyph ~[
23−2:19 tight glyph ~[
24−2:21 tight str "a"
25−2:25 str "b"
26−2:28 tight glyph ]
27−2:30 glyph ~[
28−2:32 tight glyph ]
29−2:34 glyph ~[
30−2:36 tight str "c"
31−2:39 tight glyph ]
32−2:40 tight glyph ]
33−2:41 tight glyph )
34−3:1 NEWLINE
35−3:1 glyph ++
36−3:4 name ships
37−3:10 glyph (
38−3:11 tight name zing
39−3:16 glyph ~[
40−3:18 tight glyph ~[
41−3:20 tight lit ~zod
42−3:24 tight glyph ]
43−3:26 glyph ~[
44−3:28 tight lit ~nec
45−3:32 tight glyph ]
46−3:33 tight glyph ]
47−3:34 tight glyph )
48−4:1 NEWLINE
49−4:1 glyph ++
50−4:4 name generic
51−4:12 glyph |=
52−4:15 name xss
53−4:18 tight glyph =
54−4:19 tight glyph (
55−4:20 tight name list
56−4:25 glyph (
57−4:26 tight name list
58−4:31 tvar A
59−4:32 tight glyph )
60−4:33 tight glyph )
61−4:35 glyph (
62−4:36 tight name zing
63−4:41 name xss
64−4:44 tight glyph )
65−5:1 NEWLINE
66−5:1 glyph ++
67−5:4 name gates
68−5:10 glyph |=
69−5:13 name xss
70−5:16 tight glyph =
71−5:17 tight glyph (
72−5:18 tight name list
73−5:23 glyph (
74−5:24 tight name list
75−5:29 glyph $-(
76−5:32 tight tvar A
77−5:34 tvar B
78−5:35 tight glyph )
79−5:36 tight glyph )
80−5:37 tight glyph )
81−5:39 glyph (
82−5:40 tight name zing
83−5:45 name xss
84−5:48 tight glyph )
85−6:1 NEWLINE
86−6:1 glyph ++
87−6:4 name bad
88−6:8 glyph (
89−6:9 tight name zing
90−6:14 str "not a list of lists"
91−6:35 tight glyph )
92−6:36 NEWLINE
tests/golden/types-prelude-zing/tree.txtdeleted−43
@@ -1,43 +0,0 @@
1−(module
2− (value 1:1 empty
3− (group 1:10
4− (call 1:11
5− (wing 1:11 zing)
6− (group 1:16
7− (cast 1:17
8− (apply 1:20 list
9− (apply 1:26 list (aura 1:32 @t)))
10− (lit 1:37 ~))))))
11− (value 2:1 nested
12− (group 2:11
13− (call 2:12
14− (wing 2:12 zing)
15− (list 2:17
16− (list 2:19 (str 2:21 "a") (str 2:25 "b"))
17− (list 2:30)
18− (list 2:34 (str 2:36 "c"))))))
19− (value 3:1 ships
20− (group 3:10
21− (call 3:11
22− (wing 3:11 zing)
23− (list 3:16
24− (list 3:18 (lit 3:20 ~zod))
25− (list 3:26 (lit 3:28 ~nec))))))
26− (value 4:1 generic
27− (gate 4:12
28− (face 4:15 xss
29− (apply 4:19 list
30− (apply 4:25 list (tvar 4:31 A))))
31− (group 4:35
32− (call 4:36 (wing 4:36 zing) (wing 4:41 xss)))))
33− (value 5:1 gates
34− (gate 5:10
35− (face 5:13 xss
36− (apply 5:17 list
37− (apply 5:23 list
38− (fn 5:29 (tvar 5:32 A) (tvar 5:34 B)))))
39− (group 5:39
40− (call 5:40 (wing 5:40 zing) (wing 5:45 xss)))))
41− (value 6:1 bad
42− (group 6:8
43− (call 6:9 (wing 6:9 zing) (str 6:14 "not a list of lists")))))
tests/golden/types-prelude-zing/types.txtdeleted−13
@@ -1,13 +0,0 @@
1−partial inference; module not checked
2−++ empty: (list @t)
3−++ nested: (list @t)
4−++ ships: (list @p)
5−++ generic: $-((list (list A)) (list A))
6−++ gates: $-((list (list $-(A B))) (list $-(A B)))
7−++ bad: call's sample and argument types do not unify
8−/tests/golden/types-prelude-zing/source.jibb:6:9: called gate has type $-((list (list A)) (list A))
9−++ bad (zing "not a list of lists")
10− ^
11−/tests/golden/types-prelude-zing/source.jibb:6:14: argument has type @t
12−++ bad (zing "not a list of lists")
13− ^
tests/golden/types-recursion-scc-import/source.jibb+1−1
@@ -1,3 +1,3 @@
11/= lib /ui/lib
2−++ text-value ^- @t (left.lib "hello")
2+++ text ^- @t (left.lib "hello")
33++ ship ^- @p (right.lib "hello")
tests/golden/types-recursion-scc-import/tokens.txt+7−7
@@ -6,13 +6,13 @@
661:12 tight knot lib
772:1 NEWLINE
882:1 glyph ++
9−2:4 name text-value
10−2:15 glyph ^-
11−2:18 aura @t
12−2:21 glyph (
13−2:22 tight wing left.lib
14−2:31 str "hello"
15−2:38 tight glyph )
9+2:4 name text
10+2:9 glyph ^-
11+2:12 aura @t
12+2:15 glyph (
13+2:16 tight wing left.lib
14+2:25 str "hello"
15+2:32 tight glyph )
16163:1 NEWLINE
17173:1 glyph ++
18183:4 name ship
tests/golden/types-recursion-scc-import/tree.txt+5−5
@@ -1,10 +1,10 @@
11(module
22 (jibb 1:1 lib /ui/lib)
3− (value 2:1 text-value
4− (cast 2:15
5− (aura 2:18 @t)
6− (group 2:21
7− (call 2:22 (wing 2:22 left.lib) (str 2:31 "hello")))))
3+ (value 2:1 text
4+ (cast 2:9
5+ (aura 2:12 @t)
6+ (group 2:15
7+ (call 2:16 (wing 2:16 left.lib) (str 2:25 "hello")))))
88 (value 3:1 ship
99 (cast 3:9
1010 (aura 3:12 @p)
tests/golden/types-recursion-scc-import/types.txt+1−1
@@ -1,3 +1,3 @@
11partial inference; module not checked
2−++ text-value: @t
2+++ text: @t
33++ ship: @p
tests/golden/types-request-normal/about.txtdeleted−4
@@ -1,4 +0,0 @@
1−source: docs/spec/overview.md, Agent APIs: "A path case is a request name, a path and a type. A plain mold is full state"; Effects: "its reply always gets full state."
2−tests: A real mark and one plain API path infer imported request calls at independent cord, ship and generic reply types; wrong callbacks, non-gates, extra arguments and pending constraints remain failures or unsupported. This partial report neither checks watchability nor implements request lowering or runtime validation.
3−expect: parses
4−expect-types: partial inference; module not checked
tests/golden/types-request-normal/mar/full.txtdeleted−5
@@ -1,5 +0,0 @@
1−|_ a=@t
2−++ grab |% ++ noun @t --
3−++ grow |% ++ noun a --
4−++ grad %noun
5−--
tests/golden/types-request-normal/marks.txtdeleted−1
@@ -1 +0,0 @@
1−full
tests/golden/types-request-normal/module-trees.txtdeleted−5
@@ -1,5 +0,0 @@
1−/ui/api/demo.jibb
2−(module
3− (mark 1:1 %full)
4− (mold 2:1 paths
5− (cell 2:10 (const 2:11 %plain) (path 2:18 /plain) (ref 2:25 full))))
tests/golden/types-request-normal/modules.txtdeleted−1
@@ -1 +0,0 @@
1−/ui/api/demo.jibb
tests/golden/types-request-normal/modules/ui/api/demo.jibbdeleted−2
@@ -1,2 +0,0 @@
1−/% %full
2−+$ paths [%plain /plain full]
tests/golden/types-request-normal/source.jibbdeleted−9
@@ -1,9 +0,0 @@
1−/= api /ui/api/demo
2−++ cord (plain.api |=(x=@t "ok"))
3−++ ship (plain.api |=(x=@t ~zod))
4−++ generic |= convert=$-(@t A) (plain.api convert)
5−++ wrong-callback (plain.api |=(x=@p "wrong"))
6−++ wrong-value (plain.api "wrong")
7−++ extra (plain.api |=(x=@t "ok") "extra")
8−++ pending ~& %pending
9− (plain.api |=(x=@t "ok"))
tests/golden/types-request-normal/tokens.txtdeleted−95
@@ -1,95 +0,0 @@
1−1:1 glyph /=
2−1:4 name api
3−1:8 glyph /
4−1:9 tight knot ui
5−1:11 tight glyph /
6−1:12 tight knot api
7−1:15 tight glyph /
8−1:16 tight knot demo
9−2:1 NEWLINE
10−2:1 glyph ++
11−2:4 name cord
12−2:9 glyph (
13−2:10 tight wing plain.api
14−2:20 glyph |=(
15−2:23 tight name x
16−2:24 tight glyph =
17−2:25 tight aura @t
18−2:28 str "ok"
19−2:32 tight glyph )
20−2:33 tight glyph )
21−3:1 NEWLINE
22−3:1 glyph ++
23−3:4 name ship
24−3:9 glyph (
25−3:10 tight wing plain.api
26−3:20 glyph |=(
27−3:23 tight name x
28−3:24 tight glyph =
29−3:25 tight aura @t
30−3:28 lit ~zod
31−3:32 tight glyph )
32−3:33 tight glyph )
33−4:1 NEWLINE
34−4:1 glyph ++
35−4:4 name generic
36−4:12 glyph |=
37−4:15 name convert
38−4:22 tight glyph =
39−4:23 tight glyph $-(
40−4:26 tight aura @t
41−4:29 tvar A
42−4:30 tight glyph )
43−4:32 glyph (
44−4:33 tight wing plain.api
45−4:43 name convert
46−4:50 tight glyph )
47−5:1 NEWLINE
48−5:1 glyph ++
49−5:4 name wrong-callback
50−5:19 glyph (
51−5:20 tight wing plain.api
52−5:30 glyph |=(
53−5:33 tight name x
54−5:34 tight glyph =
55−5:35 tight aura @p
56−5:38 str "wrong"
57−5:45 tight glyph )
58−5:46 tight glyph )
59−6:1 NEWLINE
60−6:1 glyph ++
61−6:4 name wrong-value
62−6:16 glyph (
63−6:17 tight wing plain.api
64−6:27 str "wrong"
65−6:34 tight glyph )
66−7:1 NEWLINE
67−7:1 glyph ++
68−7:4 name extra
69−7:10 glyph (
70−7:11 tight wing plain.api
71−7:21 glyph |=(
72−7:24 tight name x
73−7:25 tight glyph =
74−7:26 tight aura @t
75−7:29 str "ok"
76−7:33 tight glyph )
77−7:35 str "extra"
78−7:42 tight glyph )
79−8:1 NEWLINE
80−8:1 glyph ++
81−8:4 name pending
82−8:12 glyph ~&
83−8:15 lit %pending
84−9:3 INDENT
85−9:3 glyph (
86−9:4 tight wing plain.api
87−9:14 glyph |=(
88−9:17 tight name x
89−9:18 tight glyph =
90−9:19 tight aura @t
91−9:22 str "ok"
92−9:26 tight glyph )
93−9:27 tight glyph )
94−9:28 DEDENT
95−9:28 NEWLINE
tests/golden/types-request-normal/tree.txtdeleted−50
@@ -1,50 +0,0 @@
1−(module
2− (jibb 1:1 api /ui/api/demo)
3− (value 2:1 cord
4− (group 2:9
5− (call 2:10
6− (wing 2:10 plain.api)
7− (gate-wide 2:20
8− (face 2:23 x (aura 2:25 @t))
9− (str 2:28 "ok")))))
10− (value 3:1 ship
11− (group 3:9
12− (call 3:10
13− (wing 3:10 plain.api)
14− (gate-wide 3:20
15− (face 3:23 x (aura 3:25 @t))
16− (lit 3:28 ~zod)))))
17− (value 4:1 generic
18− (gate 4:12
19− (face 4:15 convert
20− (fn 4:23 (aura 4:26 @t) (tvar 4:29 A)))
21− (group 4:32
22− (call 4:33 (wing 4:33 plain.api) (wing 4:43 convert)))))
23− (value 5:1 wrong-callback
24− (group 5:19
25− (call 5:20
26− (wing 5:20 plain.api)
27− (gate-wide 5:30
28− (face 5:33 x (aura 5:35 @p))
29− (str 5:38 "wrong")))))
30− (value 6:1 wrong-value
31− (group 6:16
32− (call 6:17 (wing 6:17 plain.api) (str 6:27 "wrong"))))
33− (value 7:1 extra
34− (group 7:10
35− (call 7:11
36− (wing 7:11 plain.api)
37− (gate-wide 7:21
38− (face 7:24 x (aura 7:26 @t))
39− (str 7:29 "ok"))
40− (str 7:35 "extra"))))
41− (value 8:1 pending
42− (trace 8:12
43− (lit 8:15 %pending)
44− (body 9:3
45− (group 9:3
46− (call 9:4
47− (wing 9:4 plain.api)
48− (gate-wide 9:14
49− (face 9:17 x (aura 9:19 @t))
50− (str 9:22 "ok"))))))))
tests/golden/types-request-normal/types.txtdeleted−26
@@ -1,26 +0,0 @@
1−partial inference; module not checked
2−++ cord: (ask @t)
3−++ ship: (ask @p)
4−++ generic: $-($-(@t A) (ask A))
5−++ wrong-callback: call's sample and argument types do not unify
6−/tests/golden/types-request-normal/source.jibb:5:20: called gate
7−++ wrong-callback (plain.api |=(x=@p "wrong"))
8− ^
9−/tests/golden/types-request-normal/source.jibb:5:30: argument has type $-(@p @t)
10−++ wrong-callback (plain.api |=(x=@p "wrong"))
11− ^
12−++ wrong-value: call's sample and argument types do not unify
13−/tests/golden/types-request-normal/source.jibb:6:17: called gate
14−++ wrong-value (plain.api "wrong")
15− ^
16−/tests/golden/types-request-normal/source.jibb:6:27: argument has type @t
17−++ wrong-value (plain.api "wrong")
18− ^
19−++ extra: call's sample and argument types do not unify
20−/tests/golden/types-request-normal/source.jibb:7:11: called gate
21−++ extra (plain.api |=(x=@t "ok") "extra")
22− ^
23−/tests/golden/types-request-normal/source.jibb:7:21: argument has type [$-(@t @t) @t]
24−++ extra (plain.api |=(x=@t "ok") "extra")
25− ^
26−++ pending: tag needs context in partial inference
tests/golden/types-union-finite-context/source.jibb+1−1
@@ -35,7 +35,7 @@
3535 * %stay
3636++ binder |= x=input ^- ?
3737 ?- x
38− [%p flag words] flag
38+ [%p flag text] flag
3939 %other %.n
4040++ unresolved |= x=input ^- (list @t)
4141 ~& %pending
tests/golden/types-union-finite-context/tokens.txt+3−3
@@ -244,9 +244,9 @@
24424438:5 glyph [
24524538:6 tight lit %p
24624638:9 name flag
247−38:14 name words
248−38:19 tight glyph ]
249−38:21 name flag
247+38:14 name text
248+38:18 tight glyph ]
249+38:20 name flag
25025039:5 NEWLINE
25125139:5 lit %other
25225239:12 lit %.n
tests/golden/types-union-finite-context/tree.txt+2−2
@@ -111,8 +111,8 @@
111111 (branch 37:3
112112 (wing 37:6 x)
113113 (arm 38:5
114− (cell 38:5 (lit 38:6 %p) (bind 38:9 flag) (bind 38:14 words))
115− (wing 38:21 flag))
114+ (cell 38:5 (lit 38:6 %p) (bind 38:9 flag) (bind 38:14 text))
115+ (wing 38:20 flag))
116116 (arm 39:5 (lit 39:5 %other) (lit 39:12 %.n)))))))
117117 (value 40:1 unresolved
118118 (gate 40:15
tests/golden/types-union-finite-limit/about.txt+1−1
@@ -1,4 +1,4 @@
11source: Grammar, Patterns: "Every case needs an arm or a catch-all"; Molds: the empty mold `!!` has no values.
2−tests: Whole-case matching remains available without expanding many booleans. Partial matching succeeds below the implementation's 64-alternative limit and fails closed above it; a proven empty case is excluded from coverage, allowing the only inhabited case to be matched.
2+tests: Whole-case matching remains available without expanding many booleans. Partial matching succeeds below the implementation's 64-alternative limit and fails closed above it; empty union cases remain unsupported rather than falsely checked.
33expect: parses
44expect-types: a partial inference report
tests/golden/types-union-finite-limit/types.txt+1−1
@@ -7,4 +7,4 @@ partial inference; module not checked
77+$ over: cases proven disjoint; mold not checked
88++ capped: union pattern expansion needs unsupported inference
99+$ empty-msg: cases proven disjoint; mold not checked
10−++ one: $-(empty-msg @t)
10+++ one: sample mold is not supported by partial inference
tests/golden/types-union-nonwing-subject/source.jibb+13−13
@@ -8,24 +8,24 @@
88++ passthrough |= x=input x
99++ grouped |= x=input ^- (list @t)
1010 ?- (x)
11− [%item flag words] ~[words]
11+ [%item flag text] ~[text]
1212 %none ~
1313++ call |= x=input ^- (list @t)
1414 ?- (local-id x)
15− [%item flag words] ~[words]
15+ [%item flag text] ~[text]
1616 %none ~
1717++ nested |= x=input ^- result
1818 ?- (local-id (passthrough x))
19− [%item flag words] %good
19+ [%item flag text] %good
2020 %none %empty
2121++ finite |= x=input ^- (list @t)
2222 ?- (local-id x)
23− [%item %.y words] ~[words]
24− [%item %.n words] ~[]
23+ [%item %.y text] ~[text]
24+ [%item %.n text] ~[]
2525 %none ~
2626++ wrong |= x=input ^- result
2727 ?- (local-id x)
28− [%item flag words] %missing
28+ [%item flag text] %missing
2929 %none %empty
3030++ missing |= x=input ^- (list @t)
3131 ?- (local-id x)
@@ -34,7 +34,7 @@
3434 ?- (local-id x)
3535 %none ~
3636 %none ~
37− [%item flag words] ~[words]
37+ [%item flag text] ~[text]
3838++ shadow |= x=input ^- result
3939 ?- (local-id x)
4040 [%item flag same] %good
@@ -42,19 +42,19 @@
4242++ pending |= x=input ^- result
4343 ~& %dangling
4444 ?- (local-id x)
45− [%item flag words] %good
45+ [%item flag text] %good
4646 %none %empty
4747++ unknown |= x ^- (list @t)
4848 ?- (local-id x)
49− [%item flag words] ~[words]
49+ [%item flag text] ~[text]
5050 %none ~
5151++ nonunion |= x=@t ^- (list @t)
5252 ?- (local-id x)
53− [%item flag words] ~[words]
53+ [%item flag text] ~[text]
5454 %none ~
5555++ explicit |= [x=input y=A] ^- (list A)
5656 ?- (local-id x)
57− [%item flag words] ~["text"]
57+ [%item flag text] ~["text"]
5858 %none ~
5959+$ payload |$ [A]
6060 [%present value=A]
@@ -65,12 +65,12 @@
6565 %none ~
6666++ bad-subject |= x=input ^- result
6767 ?- (passthrough "wrong")
68− [%item flag words] %missing
68+ [%item flag text] %missing
6969 %none %empty
7070++ first-of |= [a b] a
7171++ pending-subject |= x=input ^- result
7272 ?- (first-of x %dangling)
73− [%item flag words] %good
73+ [%item flag text] %good
7474 %none %empty
7575++ duplicate-flag-subject |= x=@t ^- (list @t)
7676 ?- (passthrough x)
tests/golden/types-union-nonwing-subject/tokens.txt+54−54
@@ -56,11 +56,11 @@
565611:5 glyph [
575711:6 tight lit %item
585811:12 name flag
59−11:17 name words
60−11:22 tight glyph ]
61−11:24 glyph ~[
62−11:26 tight name words
63−11:31 tight glyph ]
59+11:17 name text
60+11:21 tight glyph ]
61+11:23 glyph ~[
62+11:25 tight name text
63+11:29 tight glyph ]
646412:5 NEWLINE
656512:5 lit %none
666612:11 lit ~
@@ -88,11 +88,11 @@
888815:5 glyph [
898915:6 tight lit %item
909015:12 name flag
91−15:17 name words
92−15:22 tight glyph ]
93−15:24 glyph ~[
94−15:26 tight name words
95−15:31 tight glyph ]
91+15:17 name text
92+15:21 tight glyph ]
93+15:23 glyph ~[
94+15:25 tight name text
95+15:29 tight glyph ]
969616:5 NEWLINE
979716:5 lit %none
989816:11 lit ~
@@ -120,9 +120,9 @@
12012019:5 glyph [
12112119:6 tight lit %item
12212219:12 name flag
123−19:17 name words
124−19:22 tight glyph ]
125−19:24 lit %good
123+19:17 name text
124+19:21 tight glyph ]
125+19:23 lit %good
12612620:5 NEWLINE
12712720:5 lit %none
12812820:11 lit %empty
@@ -150,19 +150,19 @@
15015023:5 glyph [
15115123:6 tight lit %item
15215223:12 lit %.y
153−23:16 name words
154−23:21 tight glyph ]
155−23:23 glyph ~[
156−23:25 tight name words
157−23:30 tight glyph ]
153+23:16 name text
154+23:20 tight glyph ]
155+23:22 glyph ~[
156+23:24 tight name text
157+23:28 tight glyph ]
15815824:5 NEWLINE
15915924:5 glyph [
16016024:6 tight lit %item
16116124:12 lit %.n
162−24:16 name words
163−24:21 tight glyph ]
164−24:23 glyph ~[
165−24:25 tight glyph ]
162+24:16 name text
163+24:20 tight glyph ]
164+24:22 glyph ~[
165+24:24 tight glyph ]
16616625:5 NEWLINE
16716725:5 lit %none
16816825:11 lit ~
@@ -187,9 +187,9 @@
18718728:5 glyph [
18818828:6 tight lit %item
18918928:12 name flag
190−28:17 name words
191−28:22 tight glyph ]
192−28:24 lit %missing
190+28:17 name text
191+28:21 tight glyph ]
192+28:23 lit %missing
19319329:5 NEWLINE
19419429:5 lit %none
19519529:11 lit %empty
@@ -246,11 +246,11 @@
24624637:5 glyph [
24724737:6 tight lit %item
24824837:12 name flag
249−37:17 name words
250−37:22 tight glyph ]
251−37:24 glyph ~[
252−37:26 tight name words
253−37:31 tight glyph ]
249+37:17 name text
250+37:21 tight glyph ]
251+37:23 glyph ~[
252+37:25 tight name text
253+37:29 tight glyph ]
25425438:1 DEDENT
25525538:1 DEDENT
25625638:1 NEWLINE
@@ -302,9 +302,9 @@
30230245:7 glyph [
30330345:8 tight lit %item
30430445:14 name flag
305−45:19 name words
306−45:24 tight glyph ]
307−45:26 lit %good
305+45:19 name text
306+45:23 tight glyph ]
307+45:25 lit %good
30830846:7 NEWLINE
30930946:7 lit %none
31031046:13 lit %empty
@@ -331,11 +331,11 @@
33133149:5 glyph [
33233249:6 tight lit %item
33333349:12 name flag
334−49:17 name words
335−49:22 tight glyph ]
336−49:24 glyph ~[
337−49:26 tight name words
338−49:31 tight glyph ]
334+49:17 name text
335+49:21 tight glyph ]
336+49:23 glyph ~[
337+49:25 tight name text
338+49:29 tight glyph ]
33933950:5 NEWLINE
34034050:5 lit %none
34134150:11 lit ~
@@ -363,11 +363,11 @@
36336353:5 glyph [
36436453:6 tight lit %item
36536553:12 name flag
366−53:17 name words
367−53:22 tight glyph ]
368−53:24 glyph ~[
369−53:26 tight name words
370−53:31 tight glyph ]
366+53:17 name text
367+53:21 tight glyph ]
368+53:23 glyph ~[
369+53:25 tight name text
370+53:29 tight glyph ]
37137154:5 NEWLINE
37237254:5 lit %none
37337354:11 lit ~
@@ -400,11 +400,11 @@
40040057:5 glyph [
40140157:6 tight lit %item
40240257:12 name flag
403−57:17 name words
404−57:22 tight glyph ]
405−57:24 glyph ~[
406−57:26 tight str "text"
407−57:32 tight glyph ]
403+57:17 name text
404+57:21 tight glyph ]
405+57:23 glyph ~[
406+57:25 tight str "text"
407+57:31 tight glyph ]
40840858:5 NEWLINE
40940958:5 lit %none
41041058:11 lit ~
@@ -486,9 +486,9 @@
48648668:5 glyph [
48748768:6 tight lit %item
48848868:12 name flag
489−68:17 name words
490−68:22 tight glyph ]
491−68:24 lit %missing
489+68:17 name text
490+68:21 tight glyph ]
491+68:23 lit %missing
49249269:5 NEWLINE
49349369:5 lit %none
49449469:11 lit %empty
@@ -523,9 +523,9 @@
52352373:5 glyph [
52452473:6 tight lit %item
52552573:12 name flag
526−73:17 name words
527−73:22 tight glyph ]
528−73:24 lit %good
526+73:17 name text
527+73:21 tight glyph ]
528+73:23 lit %good
52952974:5 NEWLINE
53053074:5 lit %none
53153174:11 lit %empty
tests/golden/types-union-nonwing-subject/tree.txt+26−26
@@ -23,8 +23,8 @@
2323 (branch 10:3
2424 (group 10:6 (wing 10:7 x))
2525 (arm 11:5
26− (cell 11:5 (lit 11:6 %item) (bind 11:12 flag) (bind 11:17 words))
27− (list 11:24 (wing 11:26 words)))
26+ (cell 11:5 (lit 11:6 %item) (bind 11:12 flag) (bind 11:17 text))
27+ (list 11:23 (wing 11:25 text)))
2828 (arm 12:5 (lit 12:5 %none) (lit 12:11 ~)))))))
2929 (value 13:1 call
3030 (gate 13:9
@@ -36,8 +36,8 @@
3636 (group 14:6
3737 (call 14:7 (wing 14:7 local-id) (wing 14:16 x)))
3838 (arm 15:5
39− (cell 15:5 (lit 15:6 %item) (bind 15:12 flag) (bind 15:17 words))
40− (list 15:24 (wing 15:26 words)))
39+ (cell 15:5 (lit 15:6 %item) (bind 15:12 flag) (bind 15:17 text))
40+ (list 15:23 (wing 15:25 text)))
4141 (arm 16:5 (lit 16:5 %none) (lit 16:11 ~)))))))
4242 (value 17:1 nested
4343 (gate 17:11
@@ -52,8 +52,8 @@
5252 (group 18:16
5353 (call 18:17 (wing 18:17 passthrough) (wing 18:29 x)))))
5454 (arm 19:5
55− (cell 19:5 (lit 19:6 %item) (bind 19:12 flag) (bind 19:17 words))
56− (lit 19:24 %good))
55+ (cell 19:5 (lit 19:6 %item) (bind 19:12 flag) (bind 19:17 text))
56+ (lit 19:23 %good))
5757 (arm 20:5 (lit 20:5 %none) (lit 20:11 %empty)))))))
5858 (value 21:1 finite
5959 (gate 21:11
@@ -65,11 +65,11 @@
6565 (group 22:6
6666 (call 22:7 (wing 22:7 local-id) (wing 22:16 x)))
6767 (arm 23:5
68− (cell 23:5 (lit 23:6 %item) (lit 23:12 %.y) (bind 23:16 words))
69− (list 23:23 (wing 23:25 words)))
68+ (cell 23:5 (lit 23:6 %item) (lit 23:12 %.y) (bind 23:16 text))
69+ (list 23:22 (wing 23:24 text)))
7070 (arm 24:5
71− (cell 24:5 (lit 24:6 %item) (lit 24:12 %.n) (bind 24:16 words))
72− (list 24:23))
71+ (cell 24:5 (lit 24:6 %item) (lit 24:12 %.n) (bind 24:16 text))
72+ (list 24:22))
7373 (arm 25:5 (lit 25:5 %none) (lit 25:11 ~)))))))
7474 (value 26:1 wrong
7575 (gate 26:10
@@ -81,8 +81,8 @@
8181 (group 27:6
8282 (call 27:7 (wing 27:7 local-id) (wing 27:16 x)))
8383 (arm 28:5
84− (cell 28:5 (lit 28:6 %item) (bind 28:12 flag) (bind 28:17 words))
85− (lit 28:24 %missing))
84+ (cell 28:5 (lit 28:6 %item) (bind 28:12 flag) (bind 28:17 text))
85+ (lit 28:23 %missing))
8686 (arm 29:5 (lit 29:5 %none) (lit 29:11 %empty)))))))
8787 (value 30:1 missing
8888 (gate 30:12
@@ -106,8 +106,8 @@
106106 (arm 35:5 (lit 35:5 %none) (lit 35:11 ~))
107107 (arm 36:5 (lit 36:5 %none) (lit 36:11 ~))
108108 (arm 37:5
109− (cell 37:5 (lit 37:6 %item) (bind 37:12 flag) (bind 37:17 words))
110− (list 37:24 (wing 37:26 words))))))))
109+ (cell 37:5 (lit 37:6 %item) (bind 37:12 flag) (bind 37:17 text))
110+ (list 37:23 (wing 37:25 text))))))))
111111 (value 38:1 shadow
112112 (gate 38:11
113113 (face 38:14 x (ref 38:16 input))
@@ -134,8 +134,8 @@
134134 (group 44:8
135135 (call 44:9 (wing 44:9 local-id) (wing 44:18 x)))
136136 (arm 45:7
137− (cell 45:7 (lit 45:8 %item) (bind 45:14 flag) (bind 45:19 words))
138− (lit 45:26 %good))
137+ (cell 45:7 (lit 45:8 %item) (bind 45:14 flag) (bind 45:19 text))
138+ (lit 45:25 %good))
139139 (arm 46:7 (lit 46:7 %none) (lit 46:13 %empty)))))))))
140140 (value 47:1 unknown
141141 (gate 47:12
@@ -147,8 +147,8 @@
147147 (group 48:6
148148 (call 48:7 (wing 48:7 local-id) (wing 48:16 x)))
149149 (arm 49:5
150− (cell 49:5 (lit 49:6 %item) (bind 49:12 flag) (bind 49:17 words))
151− (list 49:24 (wing 49:26 words)))
150+ (cell 49:5 (lit 49:6 %item) (bind 49:12 flag) (bind 49:17 text))
151+ (list 49:23 (wing 49:25 text)))
152152 (arm 50:5 (lit 50:5 %none) (lit 50:11 ~)))))))
153153 (value 51:1 nonunion
154154 (gate 51:13
@@ -160,8 +160,8 @@
160160 (group 52:6
161161 (call 52:7 (wing 52:7 local-id) (wing 52:16 x)))
162162 (arm 53:5
163− (cell 53:5 (lit 53:6 %item) (bind 53:12 flag) (bind 53:17 words))
164− (list 53:24 (wing 53:26 words)))
163+ (cell 53:5 (lit 53:6 %item) (bind 53:12 flag) (bind 53:17 text))
164+ (list 53:23 (wing 53:25 text)))
165165 (arm 54:5 (lit 54:5 %none) (lit 54:11 ~)))))))
166166 (value 55:1 explicit
167167 (gate 55:13
@@ -175,8 +175,8 @@
175175 (group 56:6
176176 (call 56:7 (wing 56:7 local-id) (wing 56:16 x)))
177177 (arm 57:5
178− (cell 57:5 (lit 57:6 %item) (bind 57:12 flag) (bind 57:17 words))
179− (list 57:24 (str 57:26 "text")))
178+ (cell 57:5 (lit 57:6 %item) (bind 57:12 flag) (bind 57:17 text))
179+ (list 57:23 (str 57:25 "text")))
180180 (arm 58:5 (lit 58:5 %none) (lit 58:11 ~)))))))
181181 (mold 59:1 payload
182182 (generic 59:12 A
@@ -211,8 +211,8 @@
211211 (group 67:6
212212 (call 67:7 (wing 67:7 passthrough) (str 67:19 "wrong")))
213213 (arm 68:5
214− (cell 68:5 (lit 68:6 %item) (bind 68:12 flag) (bind 68:17 words))
215− (lit 68:24 %missing))
214+ (cell 68:5 (lit 68:6 %item) (bind 68:12 flag) (bind 68:17 text))
215+ (lit 68:23 %missing))
216216 (arm 69:5 (lit 69:5 %none) (lit 69:11 %empty)))))))
217217 (value 70:1 first-of
218218 (gate 70:13
@@ -228,8 +228,8 @@
228228 (group 72:6
229229 (call 72:7 (wing 72:7 first-of) (wing 72:16 x) (lit 72:18 %dangling)))
230230 (arm 73:5
231− (cell 73:5 (lit 73:6 %item) (bind 73:12 flag) (bind 73:17 words))
232− (lit 73:24 %good))
231+ (cell 73:5 (lit 73:6 %item) (bind 73:12 flag) (bind 73:17 text))
232+ (lit 73:23 %good))
233233 (arm 74:5 (lit 74:5 %none) (lit 74:11 %empty)))))))
234234 (value 75:1 duplicate-flag-subject
235235 (gate 75:27
tests/golden/types-union-nonwing-subject/types.txt+3−3
@@ -11,9 +11,9 @@ partial inference; module not checked
1111/tests/golden/types-union-nonwing-subject/source.jibb:26:24: expected union
1212++ wrong |= x=input ^- result
1313 ^
14−/tests/golden/types-union-nonwing-subject/source.jibb:28:24: tag
15− [%item flag words] %missing
16− ^
14+/tests/golden/types-union-nonwing-subject/source.jibb:28:23: tag
15+ [%item flag text] %missing
16+ ^
1717++ missing: missing union case [%item [flag=? text=@t]]
1818++ dead: branch arm is covered by earlier arms
1919/tests/golden/types-union-nonwing-subject/source.jibb:36:5: covered arm
tests/golden/types-union-runtime-equality/about.txtdeleted−3
@@ -1,3 +0,0 @@
1−source: Grammar, Molds: union cases differ as nouns; `?` is the two loobean atoms, and `!!` is empty.
2−tests: Nested equal zero nouns with different auras overlap; a loobean case contains `%.n`; ancestor and descendant atom auras overlap. An empty nested field makes a case disjoint. Different outer tags remain disjoint even when their nested zero nouns are equal.
3−expect-types: partial mold analysis with both sites of definite overlaps; `keep` infers for the distinct-tag mold. The report does not establish that the other molds or the module are checked.
tests/golden/types-union-runtime-equality/source.jibbdeleted−16
@@ -1,16 +0,0 @@
1−+$ mixed-zero
2− [%tag [%.y @t]]
3− [%tag [%$ @p]]
4−+$ flag-one
5− [%tag ?]
6− [%tag %.n]
7−+$ aura-family
8− [%tag @ta]
9− [%tag @t]
10−+$ empty-field
11− [%tag [!! @t]]
12− [%tag [* @p]]
13−+$ distinct-tags
14− [%left [%.y @t]]
15− [%right [%$ @p]]
16−++ keep |= x=distinct-tags x
tests/golden/types-union-runtime-equality/tokens.txtdeleted−96
@@ -1,96 +0,0 @@
1−1:1 glyph +$
2−1:4 name mixed-zero
3−2:3 INDENT
4−2:3 glyph [
5−2:4 tight lit %tag
6−2:9 glyph [
7−2:10 tight lit %.y
8−2:14 aura @t
9−2:16 tight glyph ]
10−2:17 tight glyph ]
11−3:3 NEWLINE
12−3:3 glyph [
13−3:4 tight lit %tag
14−3:9 glyph [
15−3:10 tight lit %$
16−3:13 aura @p
17−3:15 tight glyph ]
18−3:16 tight glyph ]
19−4:1 DEDENT
20−4:1 NEWLINE
21−4:1 glyph +$
22−4:4 name flag-one
23−5:3 INDENT
24−5:3 glyph [
25−5:4 tight lit %tag
26−5:9 glyph ?
27−5:10 tight glyph ]
28−6:3 NEWLINE
29−6:3 glyph [
30−6:4 tight lit %tag
31−6:9 lit %.n
32−6:12 tight glyph ]
33−7:1 DEDENT
34−7:1 NEWLINE
35−7:1 glyph +$
36−7:4 name aura-family
37−8:3 INDENT
38−8:3 glyph [
39−8:4 tight lit %tag
40−8:9 aura @ta
41−8:12 tight glyph ]
42−9:3 NEWLINE
43−9:3 glyph [
44−9:4 tight lit %tag
45−9:9 aura @t
46−9:11 tight glyph ]
47−10:1 DEDENT
48−10:1 NEWLINE
49−10:1 glyph +$
50−10:4 name empty-field
51−11:3 INDENT
52−11:3 glyph [
53−11:4 tight lit %tag
54−11:9 glyph [
55−11:10 tight glyph !!
56−11:13 aura @t
57−11:15 tight glyph ]
58−11:16 tight glyph ]
59−12:3 NEWLINE
60−12:3 glyph [
61−12:4 tight lit %tag
62−12:9 glyph [
63−12:10 tight glyph *
64−12:12 aura @p
65−12:14 tight glyph ]
66−12:15 tight glyph ]
67−13:1 DEDENT
68−13:1 NEWLINE
69−13:1 glyph +$
70−13:4 name distinct-tags
71−14:3 INDENT
72−14:3 glyph [
73−14:4 tight lit %left
74−14:10 glyph [
75−14:11 tight lit %.y
76−14:15 aura @t
77−14:17 tight glyph ]
78−14:18 tight glyph ]
79−15:3 NEWLINE
80−15:3 glyph [
81−15:4 tight lit %right
82−15:11 glyph [
83−15:12 tight lit %$
84−15:15 aura @p
85−15:17 tight glyph ]
86−15:18 tight glyph ]
87−16:1 DEDENT
88−16:1 NEWLINE
89−16:1 glyph ++
90−16:4 name keep
91−16:9 glyph |=
92−16:12 name x
93−16:13 tight glyph =
94−16:14 tight name distinct-tags
95−16:28 name x
96−16:29 NEWLINE
tests/golden/types-union-runtime-equality/tree.txtdeleted−37
@@ -1,37 +0,0 @@
1−(module
2− (mold 1:1 mixed-zero
3− (union 2:3
4− (cell 2:3
5− (const 2:4 %tag)
6− (cell 2:9 (const 2:10 %.y) (aura 2:14 @t)))
7− (cell 3:3
8− (const 3:4 %tag)
9− (cell 3:9 (const 3:10 %$) (aura 3:13 @p)))))
10− (mold 4:1 flag-one
11− (union 5:3
12− (cell 5:3 (const 5:4 %tag) (flag 5:9))
13− (cell 6:3 (const 6:4 %tag) (const 6:9 %.n))))
14− (mold 7:1 aura-family
15− (union 8:3
16− (cell 8:3 (const 8:4 %tag) (aura 8:9 @ta))
17− (cell 9:3 (const 9:4 %tag) (aura 9:9 @t))))
18− (mold 10:1 empty-field
19− (union 11:3
20− (cell 11:3
21− (const 11:4 %tag)
22− (cell 11:9 (void 11:10) (aura 11:13 @t)))
23− (cell 12:3
24− (const 12:4 %tag)
25− (cell 12:9 (noun 12:10) (aura 12:12 @p)))))
26− (mold 13:1 distinct-tags
27− (union 14:3
28− (cell 14:3
29− (const 14:4 %left)
30− (cell 14:10 (const 14:11 %.y) (aura 14:15 @t)))
31− (cell 15:3
32− (const 15:4 %right)
33− (cell 15:11 (const 15:12 %$) (aura 15:15 @p)))))
34− (value 16:1 keep
35− (gate 16:9
36− (face 16:12 x (ref 16:14 distinct-tags))
37− (wing 16:28 x))))
tests/golden/types-union-runtime-equality/types.txtdeleted−25
@@ -1,25 +0,0 @@
1−partial inference; module not checked
2−+$ mixed-zero: overlapping cases; mold not checked
3−/tests/golden/types-union-runtime-equality/source.jibb:2:3: first union case
4− [%tag [%.y @t]]
5− ^
6−/tests/golden/types-union-runtime-equality/source.jibb:3:3: overlapping case
7− [%tag [%$ @p]]
8− ^
9−+$ flag-one: overlapping cases; mold not checked
10−/tests/golden/types-union-runtime-equality/source.jibb:5:3: first union case
11− [%tag ?]
12− ^
13−/tests/golden/types-union-runtime-equality/source.jibb:6:3: overlapping case
14− [%tag %.n]
15− ^
16−+$ aura-family: overlapping cases; mold not checked
17−/tests/golden/types-union-runtime-equality/source.jibb:8:3: first union case
18− [%tag @ta]
19− ^
20−/tests/golden/types-union-runtime-equality/source.jibb:9:3: overlapping case
21− [%tag @t]
22− ^
23−+$ empty-field: cases proven disjoint; mold not checked
24−+$ distinct-tags: cases proven disjoint; mold not checked
25−++ keep: $-(distinct-tags distinct-tags)
tests/golden/types-union-source-alias/about.txtdeleted−4
@@ -1,4 +0,0 @@
1−source: Grammar, Unions: "Cases must differ as nouns"; Grammar, Generic molds.
2−tests: A one-hop local generic alias with a literal head is proven disjoint from a different head, including with outer generic parameters. Same-head and equal-noun zero spellings with overlapping payloads report both case sites; this partial report does not claim the full module is checked.
3−expect: parses
4−expect-types: a partial inference report
tests/golden/types-union-source-alias/source.jibbdeleted−18
@@ -1,18 +0,0 @@
1−+$ tagged |$ [A] [%wrapped A]
2−+$ choice
3− (tagged @t)
4− [%other @p]
5−++ id |= x=choice x
6−+$ poly |$ [A B]
7− (tagged A)
8− [%second B]
9−++ typed |= x=(poly @t @p) x
10−+$ same
11− (tagged @t)
12− [%wrapped @p]
13−++ collide |= x=same x
14−+$ zero |$ [A] [%.y A]
15−+$ same-zero
16− (zero @t)
17− [%$ @p]
18−++ collide-zero |= x=same-zero x
tests/golden/types-union-source-alias/tokens.txtdeleted−119
@@ -1,119 +0,0 @@
1−1:1 glyph +$
2−1:4 name tagged
3−1:11 glyph |$
4−1:14 glyph [
5−1:15 tight tvar A
6−1:16 tight glyph ]
7−1:18 glyph [
8−1:19 tight lit %wrapped
9−1:28 tvar A
10−1:29 tight glyph ]
11−2:1 NEWLINE
12−2:1 glyph +$
13−2:4 name choice
14−3:3 INDENT
15−3:3 glyph (
16−3:4 tight name tagged
17−3:11 aura @t
18−3:13 tight glyph )
19−4:3 NEWLINE
20−4:3 glyph [
21−4:4 tight lit %other
22−4:11 aura @p
23−4:13 tight glyph ]
24−5:1 DEDENT
25−5:1 NEWLINE
26−5:1 glyph ++
27−5:4 name id
28−5:7 glyph |=
29−5:10 name x
30−5:11 tight glyph =
31−5:12 tight name choice
32−5:19 name x
33−6:1 NEWLINE
34−6:1 glyph +$
35−6:4 name poly
36−6:9 glyph |$
37−6:12 glyph [
38−6:13 tight tvar A
39−6:15 tvar B
40−6:16 tight glyph ]
41−7:3 INDENT
42−7:3 glyph (
43−7:4 tight name tagged
44−7:11 tvar A
45−7:12 tight glyph )
46−8:3 NEWLINE
47−8:3 glyph [
48−8:4 tight lit %second
49−8:12 tvar B
50−8:13 tight glyph ]
51−9:1 DEDENT
52−9:1 NEWLINE
53−9:1 glyph ++
54−9:4 name typed
55−9:10 glyph |=
56−9:13 name x
57−9:14 tight glyph =
58−9:15 tight glyph (
59−9:16 tight name poly
60−9:21 aura @t
61−9:24 aura @p
62−9:26 tight glyph )
63−9:28 name x
64−10:1 NEWLINE
65−10:1 glyph +$
66−10:4 name same
67−11:3 INDENT
68−11:3 glyph (
69−11:4 tight name tagged
70−11:11 aura @t
71−11:13 tight glyph )
72−12:3 NEWLINE
73−12:3 glyph [
74−12:4 tight lit %wrapped
75−12:13 aura @p
76−12:15 tight glyph ]
77−13:1 DEDENT
78−13:1 NEWLINE
79−13:1 glyph ++
80−13:4 name collide
81−13:12 glyph |=
82−13:15 name x
83−13:16 tight glyph =
84−13:17 tight name same
85−13:22 name x
86−14:1 NEWLINE
87−14:1 glyph +$
88−14:4 name zero
89−14:9 glyph |$
90−14:12 glyph [
91−14:13 tight tvar A
92−14:14 tight glyph ]
93−14:16 glyph [
94−14:17 tight lit %.y
95−14:21 tvar A
96−14:22 tight glyph ]
97−15:1 NEWLINE
98−15:1 glyph +$
99−15:4 name same-zero
100−16:3 INDENT
101−16:3 glyph (
102−16:4 tight name zero
103−16:9 aura @t
104−16:11 tight glyph )
105−17:3 NEWLINE
106−17:3 glyph [
107−17:4 tight lit %$
108−17:7 aura @p
109−17:9 tight glyph ]
110−18:1 DEDENT
111−18:1 NEWLINE
112−18:1 glyph ++
113−18:4 name collide-zero
114−18:17 glyph |=
115−18:20 name x
116−18:21 tight glyph =
117−18:22 tight name same-zero
118−18:32 name x
119−18:33 NEWLINE
tests/golden/types-union-source-alias/tree.txtdeleted−41
@@ -1,41 +0,0 @@
1−(module
2− (mold 1:1 tagged
3− (generic 1:11 A
4− (cell 1:18 (const 1:19 %wrapped) (tvar 1:28 A))))
5− (mold 2:1 choice
6− (union 3:3
7− (apply 3:3 tagged (aura 3:11 @t))
8− (cell 4:3 (const 4:4 %other) (aura 4:11 @p))))
9− (value 5:1 id
10− (gate 5:7
11− (face 5:10 x (ref 5:12 choice))
12− (wing 5:19 x)))
13− (mold 6:1 poly
14− (generic 6:9 A B
15− (union 7:3
16− (apply 7:3 tagged (tvar 7:11 A))
17− (cell 8:3 (const 8:4 %second) (tvar 8:12 B)))))
18− (value 9:1 typed
19− (gate 9:10
20− (face 9:13 x
21− (apply 9:15 poly (aura 9:21 @t) (aura 9:24 @p)))
22− (wing 9:28 x)))
23− (mold 10:1 same
24− (union 11:3
25− (apply 11:3 tagged (aura 11:11 @t))
26− (cell 12:3 (const 12:4 %wrapped) (aura 12:13 @p))))
27− (value 13:1 collide
28− (gate 13:12
29− (face 13:15 x (ref 13:17 same))
30− (wing 13:22 x)))
31− (mold 14:1 zero
32− (generic 14:9 A
33− (cell 14:16 (const 14:17 %.y) (tvar 14:21 A))))
34− (mold 15:1 same-zero
35− (union 16:3
36− (apply 16:3 zero (aura 16:9 @t))
37− (cell 17:3 (const 17:4 %$) (aura 17:7 @p))))
38− (value 18:1 collide-zero
39− (gate 18:17
40− (face 18:20 x (ref 18:22 same-zero))
41− (wing 18:32 x))))
tests/golden/types-union-source-alias/types.txtdeleted−23
@@ -1,23 +0,0 @@
1−partial inference; module not checked
2−+$ tagged: not checked
3−+$ choice: cases proven disjoint; mold not checked
4−++ id: $-(choice choice)
5−+$ poly: cases proven disjoint; mold not checked
6−++ typed: $-((poly @t @p) (poly @t @p))
7−+$ same: overlapping cases; mold not checked
8−/tests/golden/types-union-source-alias/source.jibb:11:3: first union case
9− (tagged @t)
10− ^
11−/tests/golden/types-union-source-alias/source.jibb:12:3: overlapping case
12− [%wrapped @p]
13− ^
14−++ collide: sample mold is not supported by partial inference
15−+$ zero: not checked
16−+$ same-zero: overlapping cases; mold not checked
17−/tests/golden/types-union-source-alias/source.jibb:16:3: first union case
18− (zero @t)
19− ^
20−/tests/golden/types-union-source-alias/source.jibb:17:3: overlapping case
21− [%$ @p]
22− ^
23−++ collide-zero: sample mold is not supported by partial inference
tests/golden/types-unit-context/source.jibb+3−3
@@ -16,8 +16,8 @@
1616++ accept |= x=(unit msg) x
1717++ call (accept `%stay)
1818++ bad-call (accept `%bad)
19−++ field-value ^- record [`%go ~[`"hi"]]
20−++ field-value-bad ^- record [`%bad ~[`"hi"]]
19+++ field ^- record [`%go ~[`"hi"]]
20+++ field-bad ^- record [`%bad ~[`"hi"]]
2121++ mimic-mismatch ^- (mimic @t) `"hi"
2222++ without-context `%go
2323++ pending
@@ -31,7 +31,7 @@
3131+$ alt
3232 %go
3333 %stay
34−++ field-value-wrong-payload ^- record [`%go ~[`~zod]]
34+++ field-wrong-payload ^- record [`%go ~[`~zod]]
3535++ wrong-name ^- record [wrong=`%go xs=~[`"hi"]]
3636++ wrong-union |= x=alt ^- record [`x ~[`"hi"]]
3737++ no-field-context |= x=A ^- [a=A] [wrong=x]
tests/golden/types-unit-context/tokens.txt+33−33
@@ -169,30 +169,30 @@
16916918:26 tight glyph )
17017019:1 NEWLINE
17117119:1 glyph ++
172−19:4 name field-value
173−19:16 glyph ^-
174−19:19 name record
175−19:26 glyph [
176−19:27 tight glyph `
177−19:28 tight lit %go
178−19:32 glyph ~[
179−19:34 tight glyph `
180−19:35 tight str "hi"
181−19:39 tight glyph ]
182−19:40 tight glyph ]
172+19:4 name field
173+19:10 glyph ^-
174+19:13 name record
175+19:20 glyph [
176+19:21 tight glyph `
177+19:22 tight lit %go
178+19:26 glyph ~[
179+19:28 tight glyph `
180+19:29 tight str "hi"
181+19:33 tight glyph ]
182+19:34 tight glyph ]
18318320:1 NEWLINE
18418420:1 glyph ++
185−20:4 name field-value-bad
186−20:20 glyph ^-
187−20:23 name record
188−20:30 glyph [
189−20:31 tight glyph `
190−20:32 tight lit %bad
191−20:37 glyph ~[
192−20:39 tight glyph `
193−20:40 tight str "hi"
194−20:44 tight glyph ]
195−20:45 tight glyph ]
185+20:4 name field-bad
186+20:14 glyph ^-
187+20:17 name record
188+20:24 glyph [
189+20:25 tight glyph `
190+20:26 tight lit %bad
191+20:31 glyph ~[
192+20:33 tight glyph `
193+20:34 tight str "hi"
194+20:38 tight glyph ]
195+20:39 tight glyph ]
19619621:1 NEWLINE
19719721:1 glyph ++
19819821:4 name mimic-mismatch
@@ -278,17 +278,17 @@
27827834:1 DEDENT
27927934:1 NEWLINE
28028034:1 glyph ++
281−34:4 name field-value-wrong-payload
282−34:30 glyph ^-
283−34:33 name record
284−34:40 glyph [
285−34:41 tight glyph `
286−34:42 tight lit %go
287−34:46 glyph ~[
288−34:48 tight glyph `
289−34:49 tight lit ~zod
290−34:53 tight glyph ]
291−34:54 tight glyph ]
281+34:4 name field-wrong-payload
282+34:24 glyph ^-
283+34:27 name record
284+34:34 glyph [
285+34:35 tight glyph `
286+34:36 tight lit %go
287+34:40 glyph ~[
288+34:42 tight glyph `
289+34:43 tight lit ~zod
290+34:47 tight glyph ]
291+34:48 tight glyph ]
29229235:1 NEWLINE
29329335:1 glyph ++
29429435:4 name wrong-name
tests/golden/types-unit-context/tree.txt+21−21
@@ -70,20 +70,20 @@
7070 (call 18:14
7171 (wing 18:14 accept)
7272 (unit 18:21 (lit 18:22 %bad)))))
73− (value 19:1 field-value
74− (cast 19:16
75− (ref 19:19 record)
76− (tuple 19:26
77− (unit 19:27 (lit 19:28 %go))
78− (list 19:32
79− (unit 19:34 (str 19:35 "hi"))))))
80− (value 20:1 field-value-bad
81− (cast 20:20
82− (ref 20:23 record)
83− (tuple 20:30
84− (unit 20:31 (lit 20:32 %bad))
85− (list 20:37
86− (unit 20:39 (str 20:40 "hi"))))))
73+ (value 19:1 field
74+ (cast 19:10
75+ (ref 19:13 record)
76+ (tuple 19:20
77+ (unit 19:21 (lit 19:22 %go))
78+ (list 19:26
79+ (unit 19:28 (str 19:29 "hi"))))))
80+ (value 20:1 field-bad
81+ (cast 20:14
82+ (ref 20:17 record)
83+ (tuple 20:24
84+ (unit 20:25 (lit 20:26 %bad))
85+ (list 20:31
86+ (unit 20:33 (str 20:34 "hi"))))))
8787 (value 21:1 mimic-mismatch
8888 (cast 21:19
8989 (apply 21:22 mimic (aura 21:29 @t))
@@ -120,13 +120,13 @@
120120 (unit 30:29 (str 30:30 "hi")))))
121121 (mold 31:1 alt
122122 (union 32:3 (const 32:3 %go) (const 33:3 %stay)))
123− (value 34:1 field-value-wrong-payload
124− (cast 34:30
125− (ref 34:33 record)
126− (tuple 34:40
127− (unit 34:41 (lit 34:42 %go))
128− (list 34:46
129− (unit 34:48 (lit 34:49 ~zod))))))
123+ (value 34:1 field-wrong-payload
124+ (cast 34:24
125+ (ref 34:27 record)
126+ (tuple 34:34
127+ (unit 34:35 (lit 34:36 %go))
128+ (list 34:40
129+ (unit 34:42 (lit 34:43 ~zod))))))
130130 (value 35:1 wrong-name
131131 (cast 35:15
132132 (ref 35:18 record)
tests/golden/types-unit-context/types.txt+15−15
@@ -43,14 +43,14 @@ partial inference; module not checked
4343/tests/golden/types-unit-context/source.jibb:18:22: tag
4444++ bad-call (accept `%bad)
4545 ^
46−++ field-value: [u=(unit msg) xs=(list (unit @t))]
47−++ field-value-bad: msg has no case `%bad`
48−/tests/golden/types-unit-context/source.jibb:20:23: expected union
49−++ field-value-bad ^- record [`%bad ~[`"hi"]]
50− ^
51−/tests/golden/types-unit-context/source.jibb:20:32: tag
52−++ field-value-bad ^- record [`%bad ~[`"hi"]]
53− ^
46+++ field: [u=(unit msg) xs=(list (unit @t))]
47+++ field-bad: msg has no case `%bad`
48+/tests/golden/types-unit-context/source.jibb:20:17: expected union
49+++ field-bad ^- record [`%bad ~[`"hi"]]
50+ ^
51+/tests/golden/types-unit-context/source.jibb:20:26: tag
52+++ field-bad ^- record [`%bad ~[`"hi"]]
53+ ^
5454++ mimic-mismatch: cast constraint is not supported by partial inference
5555++ without-context: tag needs context in partial inference
5656++ pending: tag needs context in partial inference
@@ -58,13 +58,13 @@ partial inference; module not checked
5858++ preserve: $-(A (unit A))
5959++ force: explicit capital constraints are not supported by partial inference
6060+$ alt: cases proven disjoint; mold not checked
61−++ field-value-wrong-payload: unit payload does not fit its expected type
62−/tests/golden/types-unit-context/source.jibb:34:33: expected unit payload has type @t
63−++ field-value-wrong-payload ^- record [`%go ~[`~zod]]
64− ^
65−/tests/golden/types-unit-context/source.jibb:34:49: payload has type @p
66−++ field-value-wrong-payload ^- record [`%go ~[`~zod]]
67− ^
61+++ field-wrong-payload: unit payload does not fit its expected type
62+/tests/golden/types-unit-context/source.jibb:34:27: expected unit payload has type @t
63+++ field-wrong-payload ^- record [`%go ~[`~zod]]
64+ ^
65+/tests/golden/types-unit-context/source.jibb:34:43: payload has type @p
66+++ field-wrong-payload ^- record [`%go ~[`~zod]]
67+ ^
6868++ wrong-name: cast mold and expression type do not unify
6969/tests/golden/types-unit-context/source.jibb:35:18: cast mold
7070++ wrong-name ^- record [wrong=`%go xs=~[`"hi"]]
tests/importer/about.txt+1−3
@@ -9,9 +9,7 @@ explicit union argument when the exact call wrapper and collection provenance
99are validated and all union cases are static and pairwise disjoint. Cases
1010cover overlap, collapsed branches, multiple or nested unions, dependent
1111branches, forged subject, sample and tail wrappers, and a shadowed
12−collection. `explicit-unknown` has distinct outer tags and a local `word` alias
13−for `@t`, so its source cases can be proved disjoint. `explicit-wut-overlap` and `explicit-collapsed`
14−now have positive overlap witnesses from the original source cases. Tagged source cases exercise bare null payloads, overlapping tags and hidden
12+collection. Tagged source cases exercise bare null payloads, overlapping tags and hidden
1513invalid dependencies, named payload dependencies, valid and collapsed enums,
1614direct and transitively aliased overlaps, nested collections, shadowed jar and
1715jug dependencies, Ford-name collisions, zuse local-name precedence and the
tests/importer/tree.txt+3−3
@@ -74,11 +74,11 @@ explicit-graph: error: Hoon union disjointness could not be verified
7474explicit-graph-unsupported: error: signed and float auras cannot be imported
7575explicit-wut-safe: (union [ok @ud] [err @t])
7676explicit-percent-overlap: error: Hoon union disjointness could not be verified
77−explicit-wut-overlap: error: Hoon union cases overlap
78−explicit-collapsed: error: Hoon union cases overlap
77+explicit-wut-overlap: error: Hoon union disjointness could not be verified
78+explicit-collapsed: error: Hoon union disjointness could not be verified
7979explicit-subsumed: error: Hoon union disjointness could not be verified
8080explicit-three: (union [a @ud] [b @t] [c @p])
81−explicit-unknown: (union [x @t] [y @t])
81+explicit-unknown: error: a Hoon union needs a source-level disjointness check
8282explicit-nested: error: Hoon union disjointness could not be verified
8383collection-union-wrapper: valid; forged subject, sample and tail rejected
8484collection-union-list: (list (union [x @ud] [y @t]))
tests/lib/jibb-bridge.hoon+2−5
@@ -136,9 +136,6 @@
136136 [%fixture %raw-rec [%& [%ref %fixture %chain]]]
137137 [%fixture %bad-arity [%& [%apply %list ~[[%atom %t ~] [%atom %ud ~]]]]]
138138 [%fixture %bad-argument [%& [%apply %list ~[[%fork ~[[%atom %tas [~ %a]] [%atom %tas [~ %a]]]]]]]]
139− [%fixture %mixed-zero (read-named-diagnostic:jibb-import %fixture %mixed-zero cor)]
140− [%fixture %separate-tags (read %separate-tags)]
141− [%fixture %separate-terms (read %separate-terms)]
142139 [%fixture %nested-choice (read %nested-choice)]
143140 [%fixture %collapsed (read %collapsed)]
144141 [%fixture %dollar (read %dollar)]
@@ -153,7 +150,7 @@
153150 [%fixture %duplicate [%& [%atom %ud ~]]]
154151 [%missing %title [%& [%atom %t ~]]]
155152 ==
156− =/ report=@t (golden-types-with-reader-diagnostics:jibb /test/jibb src external ~)
153+ =/ report=@t (golden-types-imports:jibb /test/jibb src external)
157154 =/ dep=@t (crip "/- fixture\0a++ chain-id |= x=chain.fixture x\0a")
158155 =/ root=@t (crip "/= helper /ui/helper\0a++ use chain-id.helper\0a")
159156 =/ prelude=@t (crip "++ prelude-id |= x x\0a")
@@ -164,5 +161,5 @@
164161 (crip "/- fixture\0a++ canonical ^- (unit @t) `\"hi\"\0a++ lookalike ^- zero-lookalike.fixture `\"hi\"\0a")
165162 =/ unit-report=@t
166163 (golden-types-with-prelude:jibb /ui/unit-client/jibb unit-client external ~ ~ unit-prelude)
167− (cat 3 report (cat 3 (crip "\0areader-collapsed: {(show-result:jibb-import (read %collapsed))}\0areader-mixed-zero: {(show-result:jibb-import (read %mixed-zero))}\0areader-separate-tags: {(show-result:jibb-import (read %separate-tags))}\0areader-separate-terms: {(show-result:jibb-import (read %separate-terms))}\0a") (cat 3 hidden (cat 3 '\0a' (cat 3 unit-report (cat 3 '\0a' (cat 3 noun-synthetic (cat 3 '\0a' (cat 3 recursive-list-synthetic (cat 3 '\0a' named-recursive-synthetic))))))))))
164+ (cat 3 report (cat 3 (crip "\0areader-collapsed: {(show-result:jibb-import (read %collapsed))}\0a") (cat 3 hidden (cat 3 '\0a' (cat 3 unit-report (cat 3 '\0a' (cat 3 noun-synthetic (cat 3 '\0a' (cat 3 recursive-list-synthetic (cat 3 '\0a' named-recursive-synthetic))))))))))
168165--
tests/lib/jibb-cell-branch.hoondeleted−53
@@ -1,53 +0,0 @@
1−:: Bounded closed-cell branch context; no runtime or island claim.
2−/+ jibb
3−/* public %jibb /lib/jibb/prelude/jibb
4−/* internal %jibb /lib/jibb/internal/jibb
5−/* good %txt /tests/type-cell-branch/good/txt
6−/* bad %txt /tests/type-cell-branch/bad/txt
7−|%
8−++ text
9− |= lines=wain
10− ^- @t
11− (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
12−++ test-cell-branch
13− ^- tang
14− ?~ good ~[leaf+"cell branch good source missing"]
15− ?~ bad ~[leaf+"cell branch bad source missing"]
16− =/ prep=(unit iprelude:jibb) (prepare-prelude-with-internal:jibb public internal)
17− ?~ prep ~[leaf+"cell branch prelude unavailable"]
18− =/ a (parse:jibb /tests/branch/jibb (text good))
19− =/ b (parse:jibb /tests/branch/jibb (text bad))
20− ?: |(?=(%| -.a) ?=(%| -.b)) ~[leaf+"cell branch source parse failed"]
21− =/ ad=(list def:jibb) defs.p.a
22− =/ bd=(list def:jibb) defs.p.b
23− ?. &(?=([* ~] ad) ?=([* ~] bd) ?=(%value -.i.ad) ?=(%value -.i.bd))
24− ~[leaf+"cell branch declarations unavailable"]
25− =/ unit-scheme=(unit ischeme:jibb) (find-jibb-mold:jibb %unit iface.u.prep)
26− ?~ unit-scheme ~[leaf+"cell branch unit unavailable"]
27− =/ computed=(unit itype:jibb) (template-apply:jibb u.unit-scheme ~[[%atom %t]])
28− ?~ computed ~[leaf+"cell branch unit instantiation failed"]
29− =/ expected=itype:jibb [%cell [%atom %t] u.computed]
30− =/ env=ienv:jibb ~[[%flag [[%flag ~] ~]]]
31− =/ state=istate:jibb *istate:jibb
32− =. state state(prelude `iface.u.prep, jrec-fuel 256)
33− =/ original=iresult:jibb (infer-fragment:jibb val.i.bd env state)
34− =/ failed=iresult:jibb (infer-closed-cell-branch:jibb val.i.bd expected env state (span-of:jibb val.i.bd))
35− =/ success=iresult:jibb (infer-closed-cell-branch:jibb val.i.ad expected env state (span-of:jibb val.i.ad))
36− =/ hidden=isub:jibb ~[[55 [%face %x [%atom %t]]]]
37− ?. (closed-cell-branch-eligible:jibb val.i.bd expected ~) ~[leaf+"negative branch is not eligible"]
38− ?. ?=(%| -.original) ~[leaf+"original negative branch unexpectedly inferred"]
39− ?. =(original failed) ~[leaf+"failed retry changed the original result"]
40− ?. ?=(%& -.success) ~[leaf+"valid closed branch did not infer"]
41− ?: (closed-cell-branch-eligible:jibb val.i.ad expected hidden) ~[leaf+"structural substitution accepted"]
42− =/ atom=expr:jibb *expr:jibb
43− =/ nodes=(list expr:jibb) (reap 512 atom)
44− ?. (closed-cell-retry-safe:jibb nodes 512) ~[leaf+"exact source budget rejected"]
45− ?: (closed-cell-retry-safe:jibb [atom nodes] 512) ~[leaf+"source budget exceeded"]
46− =/ binding=ibinding:jibb [55 [%atom %t]]
47− =/ subs=isub:jibb (reap 512 binding)
48− ?. (closed-cell-sub-safe:jibb subs 512) ~[leaf+"exact substitution budget rejected"]
49− ?: (closed-cell-sub-safe:jibb [binding subs] 512) ~[leaf+"substitution budget exceeded"]
50− =/ nested=expr:jibb [%branch *span:jibb atom ~]
51− ?: (closed-cell-retry-safe:jibb ~[nested] 512) ~[leaf+"recursive retry was not excluded"]
52− ~
53−--
tests/lib/jibb-closed-gate-guards.hoondeleted−60
@@ -1,60 +0,0 @@
1−:: Closed-gate sample labels must not erase nested faces or uncertain origins.
2−/+ jibb
3−|%
4−++ closed-gate-guard-errors
5− ^- (list tape)
6− =/ t=itype:jibb [%atom %t]
7− =/ p=itype:jibb [%atom %p]
8− =/ n=itype:jibb [%atom %ud]
9− =/ tag=itype:jibb [%const [%term %tas %delta '%delta']]
10− =/ payload=itype:jibb [%cell tag n]
11− =/ bare=itype:jibb [%cell payload t]
12− =/ named=itype:jibb [%cell [%face %diff payload] [%face %state t]]
13− =/ differently-named=itype:jibb [%cell [%face %other payload] [%face %state t]]
14− =/ face-one=itype:jibb [%face %first t]
15− =/ face-two=itype:jibb [%face %second t]
16− =/ inner-one=itype:jibb [%cell face-one n]
17− =/ inner-two=itype:jibb [%cell face-two n]
18− =/ nested-a=itype:jibb [%cell [%face %diff inner-one] [%face %state t]]
19− =/ nested-b=itype:jibb [%cell inner-two t]
20− =/ tail-a=itype:jibb [%cell payload [%face %rest [%cell t n]]]
21− =/ tail-b=itype:jibb [%cell payload [%cell t n]]
22− =/ samples-mismatch=itype:jibb [%cell payload p]
23− =/ cases=(list [label=@t actual=itype:jibb expected=itype:jibb sub=isub:jibb want=?])
24− :~ ['named fold to bare' [%fn named t] [%fn bare t] ~ &]
25− ['same named gate' [%fn named t] [%fn named t] ~ &]
26− ['different slot names' [%fn named t] [%fn differently-named t] ~ |]
27− ['different nested names' [%fn nested-a t] [%fn nested-b t] ~ |]
28− ['faced tail versus cell' [%fn tail-a t] [%fn tail-b t] ~ |]
29− ['different result face' [%fn bare face-one] [%fn bare face-two] ~ |]
30− ['faced result versus bare' [%fn bare face-one] [%fn bare t] ~ |]
31− ['wrong sample aura' [%fn named t] [%fn samples-mismatch t] ~ |]
32− ['wrong result aura' [%fn named p] [%fn bare t] ~ |]
33− ['open sample' [%fn [%var 0] t] [%fn bare t] ~ &]
34− ['variable-bound sample' [%fn [%var 0] t] [%fn bare t] ~[[0 named]] |]
35− ['variable-bound actual function' [%var 0] [%fn bare t] ~[[0 [%fn named t]]] |]
36− ['variable-bound expected function' [%fn bare t] [%var 0] ~[[0 [%fn named t]]] |]
37− ==
38− =/ outcomes=(list @t)
39− %+ turn cases
40− |= c=[label=@t actual=itype:jibb expected=itype:jibb sub=isub:jibb want=?]
41− =/ fit=ifit:jibb (itype-fit:jibb actual.c expected.c sub.c 1)
42− ?: =(want.c ?=(%ok -.fit)) ''
43− (cat 3 label.c ': unexpected fit')
44− =/ bad=(list @t) (skim outcomes |=(s=@t !=(s '')))
45− =/ build
46− |= depth=@ud
47− ^- [a=itype:jibb b=itype:jibb]
48− =/ a=itype:jibb [%face %inside t]
49− =/ b=itype:jibb t
50− |-
51− ?: =(depth 0) [a b]
52− $(depth (dec depth), a [%fn [%cell a t] t], b [%fn [%cell b t] t])
53− =/ deep (build 12)
54− =/ deep-fit=ifit:jibb (itype-fit:jibb a.deep b.deep ~ 0)
55− =? bad !?=(%unknown -.deep-fit) ['nested gate face uncertainty changed' bad]
56− (turn bad trip)
57−++ test-closed-gate-guards
58− ^- tang
59− (turn closed-gate-guard-errors |=(reason=tape leaf+reason))
60−--
tests/lib/jibb-constructor-fit-guards.hoondeleted−128
@@ -1,128 +0,0 @@
1−:: Constructor cases distinguish proven absence from unknown cases.
2−/+ jibb
3−|%
4−++ constructor-base-errors
5− ^- (list tape)
6− =/ tag=lit:jibb [%term %tas %got '%got']
7− =/ t=itype:jibb [%atom %t]
8− =/ p=itype:jibb [%atom %p]
9− =/ good=itype:jibb [%cell [%const tag] t]
10− =/ bad-payload=itype:jibb [%cell [%const tag] p]
11− =/ wrong=itype:jibb [%cell [%const [%term %tas %other '%other']] t]
12− =/ tests=(list [name=@t cases=(list itype:jibb) sub=isub:jibb expected=?(%ok %bad %unknown)])
13− :~ ['known matching' ~[good] ~ %ok]
14− ['known missing' ~[wrong] ~ %bad]
15− ['mismatched payload' ~[bad-payload] ~ %bad]
16− ['explicit noun' ~[[%noun ~]] ~ %bad]
17− ['unbound case' ~[[%var 0]] ~ %unknown]
18− ['bound case remains uncertain' ~[[%var 0]] ~[[0 good]] %unknown]
19− ['unknown case alongside match' ~[good [%var 0]] ~ %unknown]
20− ['unbound head' ~[[%cell [%var 0] t]] ~ %unknown]
21− ['bound head remains uncertain' ~[[%cell [%var 0] t]] ~[[0 [%const tag]]] %unknown]
22− ['faced unknown case' ~[[%face %part good]] ~ %unknown]
23− ['known atom face at head' ~[[%cell [%face %text t] [%const tag]]] ~ %bad]
24− ['nested face at head' ~[[%cell [%face %outer [%face %inner t]] [%const tag]]] ~ %unknown]
25− ==
26− =/ failures=(list @t)
27− %+ turn tests
28− |= test=[name=@t cases=(list itype:jibb) sub=isub:jibb expected=?(%ok %bad %unknown)]
29− =/ got=ifit:jibb (itype-fit-ctor-cases:jibb tag t cases.test sub.test 1)
30− ?: =(expected.test -.got) ''
31− (cat 3 name.test ': unexpected status')
32− :: Null and other zero-valued literals have different source forms.
33− =/ zero-tag=lit:jibb [%term %tas 0 '%$']
34− =/ null-head=itype:jibb [%cell [%const [%null %n 0 '~']] t]
35− =/ flag-head=itype:jibb [%cell [%const [%loobean %f 0 '%.y']] t]
36− =/ term-head=itype:jibb [%cell [%const zero-tag] t]
37− =/ variable-head=itype:jibb [%cell [%var 0] t]
38− =/ zero-tests=(list [name=@t cases=(list itype:jibb) sub=isub:jibb expected=?(%ok %bad %unknown)])
39− :~ ['null head' ~[null-head] ~ %ok]
40− ['loobean zero head' ~[flag-head] ~ %ok]
41− ['matching term zero head' ~[term-head] ~ %ok]
42− ['unknown zero head' ~[variable-head] ~ %unknown]
43− ['bound unknown zero head' ~[variable-head] ~[[0 [%const zero-tag]]] %unknown]
44− ['unknown competitor' ~[null-head variable-head] ~ %unknown]
45− ['loobean competitor' ~[term-head flag-head] ~ %unknown]
46− ==
47− =/ zero-failures=(list @t)
48− %+ turn zero-tests
49− |= test=[name=@t cases=(list itype:jibb) sub=isub:jibb expected=?(%ok %bad %unknown)]
50− =/ got=ifit:jibb (itype-fit-ctor-cases:jibb zero-tag t cases.test sub.test 1)
51− ?: =(expected.test -.got) ''
52− (cat 3 name.test ': unexpected status')
53− =/ failures (skim (weld failures zero-failures) |=(x=@t !=(x '')))
54− (turn failures trip)
55−++ payload-candidates-errors
56− ^- (list tape)
57− =/ tag=lit:jibb [%term %tas %one '%one']
58− =/ c=itype:jibb [%atom %t]
59− =/ p=itype:jibb [%atom %p]
60− =/ ud=itype:jibb [%atom %ud]
61− =/ good=itype:jibb [%cell [%const tag] c]
62− =/ other=itype:jibb [%cell [%const tag] p]
63− =/ unknown=itype:jibb [%cell [%const tag] [%var 0]]
64− =/ tests=(list [label=@t sample=itype:jibb cases=(list itype:jibb) want=?(%ok %bad %unknown)])
65− :~ ['one fit' c ~[other good] %ok]
66− ['one fit reversed' c ~[good other] %ok]
67− ['second fit' p ~[good other] %ok]
68− ['none fit' ud ~[good other] %bad]
69− ['two fit' c ~[good good] %unknown]
70− ['unknown rival' c ~[good unknown] %unknown]
71− ['unknown rival first' c ~[unknown good] %unknown]
72− ==
73− =/ errors=(list @t)
74− %+ turn tests
75− |= test=[label=@t sample=itype:jibb cases=(list itype:jibb) want=?(%ok %bad %unknown)]
76− =/ got=ifit:jibb (itype-fit-ctor-cases:jibb tag sample.test cases.test ~ 1)
77− ?: =(want.test -.got) ''
78− (cat 3 label.test ': unexpected status')
79− =/ errors (skim errors |=(x=@t !=(x '')))
80− (turn errors trip)
81−++ flag-fit-errors
82− ^- (list tape)
83− =/ flag=itype:jibb [%flag ~]
84− =/ f=itype:jibb [%atom %f]
85− =/ yes=itype:jibb [%const [%loobean %f 0 '%.y']]
86− =/ tests=(list [label=@t actual=itype:jibb expected=itype:jibb sub=isub:jibb want=?(%ok %bad %unknown)])
87− :~ ['flag to f' flag f ~ %unknown]
88− ['bound flag to f' [%var 0] f ~[[0 flag]] %unknown]
89− ['flag to bound f' flag [%var 0] ~[[0 f]] %unknown]
90− ['singleton to f' yes f ~ %unknown]
91− ['singleton to any' yes [%any-atom ~] ~ %ok]
92− ['singleton to flag' yes flag ~ %ok]
93− ['singleton to tas' yes [%atom %tas] ~ %bad]
94− ==
95− =/ errors=(list @t)
96− %+ turn tests
97− |= test=[label=@t actual=itype:jibb expected=itype:jibb sub=isub:jibb want=?(%ok %bad %unknown)]
98− =/ got=ifit:jibb (itype-fit:jibb actual.test expected.test sub.test 1)
99− ?: =(want.test -.got) ''
100− (cat 3 label.test ': unexpected status')
101− =/ errors (skim errors |=(x=@t !=(x '')))
102− (turn errors trip)
103−++ singleton-union-errors
104− ^- (list tape)
105− =/ nil=itype:jibb [%const [%null %n 0 '~']]
106− =/ yes=itype:jibb [%const [%loobean %f 0 '%.y']]
107− =/ cell=itype:jibb [%cell nil [%atom %t]]
108− =/ tests=(list [name=@t typ=itype:jibb expect=?])
109− :~ ['literal and cell' [%union ~[nil cell] ~ ~ ~] &]
110− ['duplicate same-noun literals' [%union ~[nil yes] ~ ~ ~] |]
111− ['variable competitor' [%union ~[nil [%var 0]] ~ ~ ~] |]
112− ['faced competitor' [%union ~[nil [%face %other cell]] ~ ~ ~] |]
113− ['collection competitor' [%union ~[nil [%collection %list ~[[%atom %t]]]] ~ ~ ~] |]
114− ['variable root' [%var 0] |]
115− ==
116− =/ errs=(list @t)
117− %+ turn tests
118− |= test=[name=@t typ=itype:jibb expect=?]
119− ?: =(expect.test (explicit-singleton-in-union:jibb typ.test 0)) ''
120− (cat 3 name.test ': incorrect singleton proof')
121− (turn (skim errs |=(x=@t !=(x ''))) trip)
122−++ constructor-fit-guard-errors
123− ^- (list tape)
124− (weld constructor-base-errors (weld payload-candidates-errors (weld flag-fit-errors singleton-union-errors)))
125−++ test-constructor-fit-guards
126− ^- tang
127− (turn constructor-fit-guard-errors |=(reason=tape leaf+reason))
128−--
tests/lib/jibb-deferred-context.hoondeleted−83
@@ -1,83 +0,0 @@
1−/+ jibb
2−/* rich %txt /tests/type-deferred-context/rich/txt
3−/* plain %txt /tests/type-deferred-context/plain/txt
4−/* simple %txt /tests/type-deferred-context/simple/txt
5−/* missing %txt /tests/type-deferred-context/missing/txt
6−/* wrong %txt /tests/type-deferred-context/wrong/txt
7−/* duplicate %txt /tests/type-deferred-context/duplicate/txt
8−/* dangling %txt /tests/type-deferred-context/dangling/txt
9−/* collision-early %txt /tests/type-deferred-context/collision-early/txt
10−/* collision-late %txt /tests/type-deferred-context/collision-late/txt
11−/* expected %txt /tests/type-deferred-context/report/txt
12−|%
13−++ text
14− |= lines=wain
15− ^- @t
16− (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
17−++ test-context
18− ^- tang
19− =/ at=path /ui/context/jibb
20− =/ good=(list wain) ~[rich plain simple]
21− =/ bad=(list wain) ~[missing wrong duplicate dangling collision-early collision-late]
22− ?. (levy (weld good bad) |=(src=wain ?=(^ src))) ~[leaf+"source missing"]
23− =/ source=@t (text rich)
24− =/ parsed (parse:jibb at source)
25− ?: ?=(%| -.parsed) ~[leaf+"positive source does not parse"]
26− =/ result=jfile-result:jibb (infer-jibb-file:jibb at source ~ ~ ~ ~[at] ~ ~ ~ ~)
27− ?: ?=(%| -.result) ~[leaf+"positive library did not publish"]
28− =/ values=ienv:jibb values.iface.p.result
29− =/ built=(unit ischeme:jibb) (ienv-lookup:jibb %built values)
30− ?~ built ~[leaf+"built missing"]
31− ?~ vars.u.built ~[leaf+"principal polymorphism lost"]
32− ?^ t.vars.u.built ~[leaf+"unexpected additional quantifiers"]
33− =/ built-type=itype:jibb typ.u.built
34− ?. ?=(%fn -.built-type) ~[leaf+"built is not a gate"]
35− ?. ?=(%var -.sample.built-type) ~[leaf+"built sample is not generic"]
36− ?. =(sample.built-type product.built-type) ~[leaf+"built input and result differ"]
37− ?. =(id.sample.built-type i.vars.u.built) ~[leaf+"built quantified identity differs"]
38− =/ reveal=(unit ischeme:jibb) (ienv-lookup:jibb %reveal values)
39− =/ reveal-ship=(unit ischeme:jibb) (ienv-lookup:jibb %reveal-ship values)
40− ?~ reveal ~[leaf+"text result missing"]
41− ?~ reveal-ship ~[leaf+"ship result missing"]
42− ?. ?=([%atom %t] typ.u.reveal) ~[leaf+"text result changed"]
43− ?. ?=([%atom %p] typ.u.reveal-ship) ~[leaf+"ship result changed"]
44− =/ report=@t (golden-types-with-marks:jibb at source ~ ~)
45− ?. =((to-wain:format (cat 3 report '\0a')) expected) ~[leaf+"report differs from committed types"]
46− =/ rest-good=(list wain) ~[plain simple]
47− =/ checked=?
48− %+ levy rest-good
49− |= src=wain
50− =/ source=@t (text src)
51− =/ parsed (parse:jibb at source)
52− ?: ?=(%| -.parsed) |
53− =/ result=jfile-result:jibb (infer-jibb-file:jibb at source ~ ~ ~ ~[at] ~ ~ ~ ~)
54− ?=(%& -.result)
55− ?. checked ~[leaf+"simple positive declined or did not parse"]
56− =. checked
57− %+ levy bad
58− |= src=wain
59− =/ source=@t (text src)
60− =/ parsed (parse:jibb at source)
61− ?: ?=(%| -.parsed) |
62− =/ result=jfile-result:jibb (infer-jibb-file:jibb at source ~ ~ ~ ~[at] ~ ~ ~ ~)
63− ?=(%| -.result)
64− ?. checked ~[leaf+"negative source published or did not parse"]
65− =/ literal=lit:jibb [%term %tas %none '%none']
66− =/ actual=itype:jibb [%tag 10 literal |]
67− =/ st=istate:jibb *istate:jibb
68− =. st st(next 20)
69− ?^ (dg-stage:jibb ~ ~ ~ st ~ 65) ~[leaf+"oversized retry fuel accepted"]
70− ?^ (dg-stage:jibb defs.p.parsed ~ ~ st ~ 0) ~[leaf+"source beyond retry fuel accepted"]
71− =/ atom=itype:jibb [%const literal]
72− =/ faced=itype:jibb [%face %named atom]
73− =/ union=itype:jibb [%union ~[atom [%cell [%const [%term %tas %some '%some']] [%face %value [%atom %t]]]] ~ ~ ~]
74− =/ faced-case=itype:jibb [%union ~[faced] ~ ~ ~]
75− =/ fit
76− |= target=itype:jibb
77− ^- ?
78− =/ edge=dgo:jibb [actual target *span:jibb *span:jibb]
79− ?=(^ (dg-replay-edges:jibb ~[edge] st 64))
80− ?. &((fit atom) (fit union)) ~[leaf+"plain literal replay declined"]
81− ?: |((fit faced) (fit faced-case)) ~[leaf+"faced literal replay accepted"]
82− ~
83−--
tests/lib/jibb-deferred-prepared.hoondeleted−114
@@ -1,114 +0,0 @@
1−:: Prepared-prelude initializer recovery remains a partial report only.
2−/+ jibb
3−/* prelude %jibb /lib/jibb/prelude/jibb
4−/* internal %jibb /lib/jibb/internal/jibb
5−/* good %txt /tests/type-deferred-prepared/good/txt
6−/* tuple-only %txt /tests/type-deferred-prepared/tuple-only/txt
7−/* wrong-unit %txt /tests/type-deferred-prepared/wrong-unit/txt
8−/* wrong-draft %txt /tests/type-deferred-prepared/wrong-draft/txt
9−/* unrelated-tag %txt /tests/type-deferred-prepared/unrelated-tag/txt
10−/* mold-collision %txt /tests/type-deferred-prepared/mold-collision/txt
11−/* no-final-cast %txt /tests/type-deferred-prepared/no-final-cast/txt
12−/* no-prelude %txt /tests/type-deferred-prepared/no-prelude/txt
13−/* main-source %txt /tests/type-deferred-prepared/main/txt
14−/* imported %txt /tests/type-deferred-prepared/imported/txt
15−/* expected %txt /tests/type-deferred-prepared/expected/txt
16−/* expected-control %txt /tests/type-deferred-prepared/expected-control/txt
17−/* expected-tuple-only %txt /tests/type-deferred-prepared/expected-tuple-only/txt
18−|%
19−++ text
20− |= lines=wain
21− ^- @t
22− (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
23−++ check-prepared
24− |= [where=path source=wain valid=?]
25− ^- tang
26− ?~ source ~[leaf+"source fixture missing"]
27− =/ src=@t (text source)
28− =/ parsed (parse:jibb where src)
29− ?: ?=(%| -.parsed) ~[leaf+"source does not parse"]
30− =/ prepared=(unit iprelude:jibb) (prepare-prelude-with-internal:jibb prelude internal)
31− ?~ prepared ~[leaf+"prelude unavailable"]
32− =/ recovered=? ?=(^ (dg-root-prepared:jibb where src u.prepared))
33− ?. =(valid recovered) ~[leaf+"prepared initializer transaction result changed"]
34− ~
35−++ check-no-prelude
36− ^- tang
37− =/ at=path /ui/prepared/jibb
38− =/ src=@t (text no-prelude)
39− ?: ?=(^ (dg-root-source:jibb at src))
40− ~[leaf+"no-prelude source transaction recovered tuple initializer"]
41− =/ legacy=jfile-result:jibb
42− (infer-jibb-file:jibb at src ~ ~ ~ ~[at] ~ ~ ~ ~)
43− ?: ?=(%& -.legacy) ~[leaf+"no-prelude resolver published recovered tuple initializer"]
44− ~
45−++ check-ordinary
46− ^- tang
47− =/ prepared=(unit iprelude:jibb) (prepare-prelude-with-internal:jibb prelude internal)
48− ?~ prepared ~[leaf+"prelude unavailable"]
49− =/ at=path /ui/prepared/jibb
50− =/ ordinary=jfile-result:jibb
51− (infer-jibb-file:jibb at (text good) ~ ~ ~ ~[at] values.u.prepared molds.u.prepared ~ `iface.u.prepared)
52− ?: ?=(%& -.ordinary) ~[leaf+"ordinary full-module path published recovered initializer"]
53− ~
54−++ check-report
55− |= [source=wain wanted=wain]
56− ^- tang
57− ?~ source ~[leaf+"report source fixture missing"]
58− ?~ wanted ~[leaf+"expected report fixture missing"]
59− =/ prepared=(unit iprelude:jibb) (prepare-prelude-with-internal:jibb prelude internal)
60− ?~ prepared ~[leaf+"prelude unavailable"]
61− =/ report=@t (golden-types-with-prepared-prelude:jibb /ui/prepared/jibb (text source) ~ ~ ~ prepared)
62− =/ report-lines=wain (to-wain:format (cat 3 report '\0a'))
63− ?~ report-lines ~[leaf+"prepared report is empty"]
64− ?. =('partial inference; module not checked' i.report-lines)
65− ~[leaf+"partial disclaimer changed"]
66− ?. =(report-lines wanted) ~[leaf+"prepared report differs from exact recovered types"]
67− ~
68−++ check-prepared-binding
69− ^- tang
70− =/ prepared=(unit iprelude:jibb) (prepare-prelude-with-internal:jibb prelude internal)
71− ?~ prepared ~[leaf+"prelude unavailable"]
72− =/ at=path /ui/prepared/jibb
73− =/ src=@t (text good)
74− =/ pre=(unit ifile:jibb) `iface.u.prepared
75− =/ report
76− |= [vals=(list term) ms=(list term) p=(unit ifile:jibb) prep=(unit iprelude:jibb)]
77− ^- @t
78− (golden-types-in-context-core:jibb at src ~ ~ ~ vals ms p prep)
79− =/ vals=(list term) values.u.prepared
80− =/ ms=(list term) molds.u.prepared
81− ?: =((report vals ms pre prepared) (report vals ms pre ~))
82− ~[leaf+"exact prepared binding did not recover the initializer"]
83− ?. =((report ~ ms pre prepared) (report ~ ms pre ~))
84− ~[leaf+"mismatched value inventory reached prepared recovery"]
85− ?. =((report vals ~ pre prepared) (report vals ~ pre ~))
86− ~[leaf+"mismatched mold inventory reached prepared recovery"]
87− ?. =((report vals ms ~ prepared) (report vals ms ~ ~))
88− ~[leaf+"mismatched prelude interface reached prepared recovery"]
89− ~
90−++ test-prepared
91− ^- tang
92− =/ at=path /ui/prepared/jibb
93− =/ checks=(list tang)
94− :~ (check-prepared at good &)
95− (check-prepared at tuple-only &)
96− (check-prepared at no-prelude &)
97− (check-prepared at wrong-unit |)
98− (check-prepared at wrong-draft |)
99− (check-prepared at unrelated-tag |)
100− (check-prepared at mold-collision |)
101− (check-prepared at no-final-cast |)
102− (check-prepared at main-source |)
103− (check-prepared at imported |)
104− (check-prepared /ui/api/prepared/jibb good |)
105− (check-prepared /ui/stores/prepared/jibb good |)
106− check-no-prelude
107− check-ordinary
108− check-prepared-binding
109− (check-report good expected)
110− (check-report tuple-only expected-tuple-only)
111− (check-report no-final-cast expected-control)
112− ==
113− (zing checks)
114−--
tests/lib/jibb-deferred-resolver.hoondeleted−113
@@ -1,113 +0,0 @@
1−:: Source-level normal resolver and report integration; no island claim.
2−/+ jibb
3−/* good %txt /tests/type-deferred-resolver/good/txt
4−/* conflict %txt /tests/type-deferred-resolver/conflict/txt
5−/* missing %txt /tests/type-deferred-resolver/missing/txt
6−/* hole %txt /tests/type-deferred-resolver/hole/txt
7−/* duplicate %txt /tests/type-deferred-resolver/duplicate/txt
8−/* face %txt /tests/type-deferred-resolver/face/txt
9−/* store %txt /tests/type-deferred-resolver/store/txt
10−/* stability-early %txt /tests/type-deferred-resolver/stability-early/txt
11−/* stability-late %txt /tests/type-deferred-resolver/stability-late/txt
12−/* stability-simple-early %txt /tests/type-deferred-resolver/stability-simple-early/txt
13−/* stability-simple-late %txt /tests/type-deferred-resolver/stability-simple-late/txt
14−/* stability-output-early %txt /tests/type-deferred-resolver/stability-output-early/txt
15−/* stability-output-late %txt /tests/type-deferred-resolver/stability-output-late/txt
16−/* stability-slot-early %txt /tests/type-deferred-resolver/stability-slot-early/txt
17−/* stability-slot-late %txt /tests/type-deferred-resolver/stability-slot-late/txt
18−/* public %jibb /lib/jibb/prelude/jibb
19−/* internal %jibb /lib/jibb/internal/jibb
20−/* expected %txt /tests/type-deferred-resolver/expected/txt
21−|%
22−++ text
23− |= lines=wain
24− ^- @t
25− (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
26−++ case-no-fallback
27− |= [source=@t public=@t internal=@t]
28− ^- @t
29− =/ prep=(unit iprelude:jibb) (prepare-prelude-with-internal:jibb public internal)
30− ?~ prep 'BAD prelude'
31− =/ plain=(each module:jibb error:jibb) (parse:jibb /ui/test/jibb source)
32− ?: ?=(%| -.plain) 'BAD source parse:jibb'
33− ?. (module-scope-valid:jibb p.plain values.u.prep molds.u.prep) 'BAD prelude scope'
34− =/ prelude-result=jfile-result:jibb (infer-jibb-file:jibb /ui/test/jibb source ~ ~ ~ ~[/ui/test/jibb] values.u.prep molds.u.prep ~ `iface.u.prep)
35− ?: ?=(%& -.prelude-result) 'BAD prepared prelude fallback'
36− =/ imported-source=@t (cat 3 '/= dep /ui/dep\0a' source)
37− =/ dependencies=jbundle:jibb ~[[/ui/dep/jibb '++ value 1']]
38− =/ parsed=(each module:jibb error:jibb) (parse:jibb /ui/test/jibb imported-source)
39− ?: ?=(%| -.parsed) 'BAD import source parse:jibb'
40− =/ deps=jimports-result:jibb (resolve-jibb-imports:jibb imports.p.parsed ~ ~ dependencies ~[/ui/test/jibb] ~ ~ ~ ~)
41− ?: ?=(%| -.deps) 'BAD dependency resolution'
42− =/ imported-result=jfile-result:jibb (infer-jibb-file:jibb /ui/test/jibb imported-source ~ ~ dependencies ~[/ui/test/jibb] ~ ~ ~ ~)
43− ?: ?=(%& -.imported-result) 'BAD imported fallback'
44− 'prelude and import fallback declined'
45−++ resolver-report
46− |= [good=@t conflict=@t missing=@t hole=@t duplicate=@t face=@t store=@t public=@t internal=@t]
47− ^- @t
48− =/ lines=(list @t)
49− =/ at=path /ui/obligation/jibb
50− =/ expect-reject
51− |= [label=@t source=@t]
52− ^- @t
53− =/ parsed (parse:jibb at source)
54− ?: ?=(%| -.parsed) (crip "BAD-{(trip label)}-parse")
55− =/ got=jfile-result:jibb (infer-jibb-file:jibb at source ~ ~ ~ ~[at] ~ ~ ~ ~)
56− ?:(?=(%| -.got) (crip "{(trip label)} rejected without interface") (crip "BAD-{(trip label)}-published"))
57− =/ result=jfile-result:jibb (infer-jibb-file:jibb at good ~ ~ ~ ~[at] ~ ~ ~ ~)
58− ?: ?=(%| -.result) ~[(crip "BAD-valid: {(trip p.result)}")]
59− =/ iface=ifile:jibb iface.p.result
60− =/ built=(unit ischeme:jibb) (ienv-lookup:jibb %built values.iface)
61− ?~ built ~['BAD-missing-built']
62− =/ text=(unit ischeme:jibb) (ienv-lookup:jibb %reveal values.iface)
63− =/ ship=(unit ischeme:jibb) (ienv-lookup:jibb %reveal-ship values.iface)
64− ?~ text ~['BAD-missing-text']
65− ?~ ship ~['BAD-missing-ship']
66− =/ report=@t (golden-types-with-marks:jibb at good ~ ~)
67− =/ store-at=path /ui/stores/test/jibb
68− =/ store-parsed (parse:jibb store-at store)
69− ?: ?=(%| -.store-parsed) ~['BAD-store-parse']
70− =/ store-result=jfile-result:jibb (infer-jibb-file:jibb store-at store ~ ~ ~ ~[store-at] ~ ~ ~ ~)
71− =/ shown=itype:jibb (canonical-itype:jibb typ.u.built vars.u.built)
72− :~ ?:(?=(^ vars.u.built) 'interface retains independent polymorphism' 'BAD-principal')
73− ?:(?=([%atom %t] typ.u.text) 'text use inferred' 'BAD-text')
74− ?:(?=([%atom %p] typ.u.ship) 'ship use inferred' 'BAD-ship')
75− (crip "stored built: {(show-itype:jibb shown ~)}")
76− report
77− (expect-reject 'conflict' conflict)
78− (expect-reject 'missing' missing)
79− (expect-reject 'hole' hole)
80− (expect-reject 'duplicate' duplicate)
81− (expect-reject 'face' face)
82− ?:(?=(%| -.store-result) 'store declined without interface' 'BAD-store-published')
83− 'conflict report:'
84− (golden-types-with-marks:jibb at conflict ~ ~)
85− 'store report:'
86− (golden-types-with-marks:jibb store-at store ~ ~)
87− ==
88− =. lines (snoc lines (case-no-fallback good public internal))
89− (of-wain:format lines)
90−++ test-deferred-resolver
91− ^- tang
92− =/ result=@t (resolver-report (text good) (text conflict) (text missing) (text hole) (text duplicate) (text face) (text store) public internal)
93− ?. =((to-wain:format (cat 3 result '\0a')) expected) ~[leaf+"deferred resolver report differs"]
94− =/ closed=itype:jibb [%cell [%face %foo [%atom %t]] [%atom %t]]
95− =/ open=itype:jibb [%cell [%face %foo [%var 500]] [%atom %t]]
96− =/ tag=itype:jibb [%tag 501 *lit:jibb |]
97− ?. (dg-stable-call-fit:jibb closed closed [%atom %t] ~ &) ~[leaf+"closed positional fit declined"]
98− ?: (dg-stable-call-fit:jibb open open [%atom %t] ~ &) ~[leaf+"open positional face accepted"]
99− ?: (dg-stable-call-fit:jibb closed closed tag ~ &) ~[leaf+"pending positional result accepted"]
100− ?. (dg-stable-call-fit:jibb open open [%atom %t] ~ |) ~[leaf+"equal single argument declined"]
101− =/ samples=(list wain)
102− ~[stability-early stability-late stability-simple-early stability-simple-late stability-output-early stability-output-late stability-slot-early stability-slot-late]
103− |-
104− ?~ samples ~
105− ?~ i.samples ~[leaf+"deferred stability source missing"]
106− =/ at=path /ui/stability/jibb
107− =/ src=@t (text i.samples)
108− =/ parsed (parse:jibb at src)
109− ?: ?=(%| -.parsed) ~[leaf+"deferred stability source does not parse"]
110− =/ result=jfile-result:jibb (infer-jibb-file:jibb at src ~ ~ ~ ~[at] ~ ~ ~ ~)
111− ?: ?=(%& -.result) ~[leaf+"unstable deferred fit published an interface"]
112− $(samples t.samples)
113−--
tests/lib/jibb-deferred.hoondeleted−244
@@ -1,244 +0,0 @@
1−:: Partial source-owned deferred type transaction; not module or island validation.
2−/+ jibb
3−/* nested-src %txt /tests/type-deferred/nested-src/txt
4−/* principal-src %txt /tests/type-deferred/principal-src/txt
5−/* missing-src %txt /tests/type-deferred/missing-src/txt
6−/* conflict-src %txt /tests/type-deferred/conflict-src/txt
7−/* duplicate-src %txt /tests/type-deferred/duplicate-src/txt
8−/* hole-src %txt /tests/type-deferred/hole-src/txt
9−/* local-src %txt /tests/type-deferred/local-src/txt
10−/* mutual-src %txt /tests/type-deferred/mutual-src/txt
11−/* mold-hole-src %txt /tests/type-deferred/mold-hole-src/txt
12−/* face-good-src %txt /tests/type-deferred/face-good-src/txt
13−/* face-bad-src %txt /tests/type-deferred/face-bad-src/txt
14−/* expected %txt /tests/type-deferred/expected/txt
15−|%
16−++ text
17− |= lines=wain
18− ^- @t
19− (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
20−++ case-nested
21− |= source=@t
22− ^- (list @t)
23− =/ result=(unit dgcommit:jibb) (checked-source /ui/obligation/jibb source)
24− ?~ result ~['BAD-nested-transaction']
25− =/ nested=(unit ischeme:jibb) (ienv-lookup:jibb %nested env.u.result)
26− =/ alias=(unit ischeme:jibb) (ienv-lookup:jibb %alias env.u.result)
27− =/ main=(unit ischeme:jibb) (ienv-lookup:jibb %main env.u.result)
28− ?~ nested ~['BAD-nested']
29− ?~ alias ~['BAD-alias']
30− ?~ main ~['BAD-main']
31− :~ ?:(=(typ.u.nested typ.u.alias) 'nested lexical gate and alias agree' 'BAD-alias-type')
32− ?:(=(typ.u.nested typ.u.main) 'later source context closes nested constructor' 'BAD-main-type')
33− ?:(!(pending-tags:jibb tags.state.u.result sub.state.u.result) 'nested obligation discharged' 'BAD-pending')
34− ==
35−++ case-principal
36− |= source=@t
37− ^- (list @t)
38− =/ result=(unit dgcommit:jibb) (checked-source /ui/obligation/jibb source)
39− ?~ result ~['BAD-root-transaction']
40− =/ built=(unit ischeme:jibb) (ienv-lookup:jibb %built env.u.result)
41− =/ text=(unit ischeme:jibb) (ienv-lookup:jibb %reveal env.u.result)
42− =/ ship=(unit ischeme:jibb) (ienv-lookup:jibb %reveal-ship env.u.result)
43− ?~ built ~['BAD-built']
44− ?~ text ~['BAD-text']
45− ?~ ship ~['BAD-ship']
46− :~ ?:(?=(^ vars.u.built) 'independent built result stays polymorphic' 'BAD-principal')
47− ?:(?=([%atom %t] typ.u.text) 'text use inferred' 'BAD-text-type')
48− ?:(?=([%atom %p] typ.u.ship) 'ship use inferred independently' 'BAD-ship-type')
49− ==
50−++ case-negative
51− |= [missing=@t conflict=@t duplicate=@t hole=@t]
52− ^- (list @t)
53− :~ ?:(?=(~ (checked-source /ui/obligation/jibb missing)) 'missing constructor leaves no result' 'BAD-missing')
54− ?:(?=(~ (checked-source /ui/obligation/jibb conflict)) 'conflicting context leaves no result' 'BAD-conflict')
55− ?:(?=(~ (checked-source /ui/obligation/jibb duplicate)) 'duplicate source binding declined' 'BAD-duplicate')
56− ?:(?=(~ (checked-source /ui/obligation/jibb hole)) 'definition hole does not escape' 'BAD-hole')
57− ==
58−++ case-groups
59− |= [local=@t mutual=@t]
60− ^- (list @t)
61− :~ ?:(?=(~ (checked-source /ui/obligation/jibb local)) 'local deferred definition declined' 'BAD-local')
62− ?:(?=(~ (checked-source /ui/obligation/jibb mutual)) 'recursive deferred group declined' 'BAD-group')
63− ==
64−++ case-mold-hole
65− |= hole=@t
66− ^- (list @t)
67− :~ ?:(?=(~ (checked-source /ui/a/jibb hole)) 'unused mold hole declined' 'unused mold hole committed')
68− ==
69−++ case-fresh
70− ^- (list @t)
71− =/ env=ienv:jibb ~[[%x [[%fn [%var 1.000.007] [%var 1.000.007]] ~[1.000.007 2.000.001]]]]
72− =/ scanned=(unit dgscan:jibb) (dg-all-env-ids:jibb env 200 ~)
73− =/ small=(unit dgscan:jibb) (dg-all-env-ids:jibb env 1 ~)
74− ?~ scanned ~['BAD-scan']
75− :~ ?:(=(2.000.002 (dg-next-id:jibb ids.u.scanned 0)) 'fresh ID exceeds raw and quantified IDs' 'BAD-fresh')
76− ?:(?=(~ small) 'fresh ID scan respects budget' 'BAD-fuel')
77− ==
78−++ case-safety
79− ^- (list @t)
80− =/ actual=itype:jibb [%cell [%atom %ud] [%cell [%face %wrong [%atom %t]] [%atom %p]]]
81− =/ expected=itype:jibb [%cell [%atom %ud] [%var 0]]
82− =/ correct=itype:jibb [%cell [%face %right [%atom %t]] [%atom %p]]
83− =/ bound=isub:jibb ~[[0 correct]]
84− =/ with-binding=ifit:jibb (itype-fit:jibb actual expected bound 1)
85− =/ dropped=ifit:jibb (itype-fit:jibb actual expected ~ 1)
86− =/ open-edges=(list dgo:jibb) ~[[[%var 20] [%var 21] *span:jibb *span:jibb]]
87− =/ st=istate:jibb *istate:jibb
88− =. st st(next 2.000.002)
89− =/ partial=(unit istate:jibb) (dg-replay-edges:jibb open-edges st 64)
90− ?~ partial ~['BAD-partial-replay']
91− =/ still-open=(unit dgscan:jibb) (dg-obligations:jibb open-edges sub.u.partial 100 ~)
92− ?~ still-open ~['BAD-open-scan']
93− =/ tag-literal=lit:jibb [%term %tas %got '%got']
94− =/ target=itype:jibb [%fn [%atom %t] [%union ~[[%cell [%const tag-literal] [%face %value [%atom %t]]]] ~ ~ ~]]
95− =/ edge=dgo:jibb [[%tag 10 tag-literal &] target *span:jibb *span:jibb]
96− =/ complete=(unit istate:jibb) (dg-replay-edges:jibb ~[edge] st 64)
97− ?~ complete ~['BAD-complete-replay']
98− =/ closed=(unit dgscan:jibb) (dg-obligations:jibb ~[edge] sub.u.complete 100 ~)
99− ?~ closed ~['BAD-closed-scan']
100− =/ repeated=(unit istate:jibb) (dg-replay-edges:jibb ~[edge] u.complete 64)
101− ?~ repeated ~['BAD-final-replay']
102− =/ open-env=ienv:jibb ~[[%x [[%var 55] ~]]]
103− =/ raw-atom=itype:jibb [%var 900]
104− =/ atom-sub=isub:jibb ~[[900 [%avar 901]]]
105− =/ normalized-atom=itype:jibb (itype-normalize:jibb raw-atom atom-sub)
106− =/ capture-state=istate:jibb st(sub ~[[500 [%var 42]]])
107− =/ capture-env=ienv:jibb ~[[%polymorphic [[%fn [%var 42] [%var 500]] ~[42]]]]
108− =/ capture-check=(unit ischeme:jibb) (dg-generalize:jibb [%fn [%var 42] [%var 43]] capture-env ~ ~ ~ capture-state 300)
109− ?~ capture-check ~['BAD-capture-scan']
110− =/ explicit-capture=(unit ischeme:jibb) (dg-generalize:jibb [%fn [%var 80] [%var 81]] ~ ~ ~ ~[80] st 300)
111− ?~ explicit-capture ~['BAD-explicit-capture-scan']
112− =/ tag-lit=lit:jibb [%term %tas %watch '%watch']
113− =/ bound-tag-state=istate:jibb st(sub ~[[720 [%var 721]]])
114− =/ tag-check=(unit ischeme:jibb) (dg-generalize:jibb [%fn [%var 721] [%var 722]] ~ ~ ~[[720 tag-lit]] ~ bound-tag-state 300)
115− ?~ tag-check ~['BAD-tag-scan']
116− =/ cycle=(list dgo:jibb) ~[[[%var 710] [%var 711] *span:jibb *span:jibb] [[%var 711] [%var 712] *span:jibb *span:jibb] [[%var 712] [%var 710] *span:jibb *span:jibb]]
117− =/ cyc=(unit ischeme:jibb) (dg-generalize:jibb [%fn [%var 710] [%fn [%var 712] [%var 713]]] ~ cycle ~ ~ st 300)
118− ?~ cyc ~['BAD-cycle-scan']
119− :~ ?:(!?=(%ok -.with-binding) 'original structural binding rejects wrong face' 'BAD-wrong-face')
120− ?:(?=(%ok -.dropped) 'dropping binding would accept wrong face' 'BAD-counterexample')
121− ?:(?=(^ ids.u.still-open) 'unresolved edge remains open after fit' 'BAD-open-edge')
122− ?:(?=(~ ids.u.closed) 'closed constructor edge has no free IDs' 'BAD-closed-edge')
123− ?:(&(=(sub.u.repeated sub.u.complete) =(next.u.repeated next.u.complete)) 'final replay is unchanged' 'BAD-final-state')
124− ?:(?=(~ (dg-close-env:jibb open-env ~ 100)) 'open interface stays unpublished' 'BAD-open-interface')
125− ?:(!(unsupported-atom-vars:jibb raw-atom ~ ~ atom-sub) 'raw bound variable hides atom constraint' 'BAD-raw-atom')
126− ?:((unsupported-atom-vars:jibb normalized-atom ~ ~ atom-sub) 'normalized unsupported atom constraint rejected' 'BAD-normalized-atom')
127− ?:(=(vars.u.capture-check ~[43]) 'scheme-local quantifier cannot hide captured ID' 'BAD-capture')
128− ?:(=(vars.u.explicit-capture ~[81]) 'captured outer variable remains monomorphic' 'BAD-explicit-capture')
129− ?:(=(vars.u.tag-check ~[722]) 'pending tag binding keeps reachable variable monomorphic' 'BAD-tag-binding')
130− ?:(=(vars.u.cyc ~[713]) 'recursive obligation component stays monomorphic' 'BAD-cycle')
131− ==
132−++ case-face-source
133− |= [good-src=@t bad-src=@t]
134− ^- (list @t)
135− =/ good=(unit dgcommit:jibb) (checked-source /ui/test/jibb good-src)
136− =/ bad=(unit dgcommit:jibb) (checked-source /ui/test/jibb bad-src)
137− :~ ?:(?=(^ good) 'faced callback source accepted' 'BAD-faced-source')
138− ?:(?=(~ bad) 'wrong nested callback face rejected' 'BAD-wrong-face-source')
139− ==
140−++ case-face-replay
141− ^- (list @t)
142− =/ tag=lit:jibb [%term %tas %got '%got']
143− =/ cases=(list itype:jibb) ~[[%cell [%const tag] [%face %value [%atom %t]]]]
144− =/ callback=itype:jibb [%fn [%face %value [%atom %t]] [%union cases ~ ~ ~]]
145− =/ edge=dgo:jibb [[%tag 10 tag &] callback *span:jibb *span:jibb]
146− =/ st=istate:jibb *istate:jibb
147− =. st st(next 20)
148− =/ solved=(unit istate:jibb) (dg-replay-edges:jibb ~[edge] st 64)
149− ?~ solved ~['BAD-faced-replay']
150− =/ after-left=itype:jibb (itype-walk:jibb left.edge sub.u.solved)
151− =/ after-right=itype:jibb (itype-walk:jibb right.edge sub.u.solved)
152− =/ record-output=itype:jibb [%cell [%face %answer [%atom %t]] [%atom %p]]
153− =/ wrong=itype:jibb [%fn [%face %different [%atom %t]] [%union cases ~ ~ ~]]
154− =/ hostile=istate:jibb st(sub ~[[10 wrong]])
155− =/ rejected=(unit istate:jibb) (dg-replay-edges:jibb ~[edge] hostile 64)
156− :~ ?:(=(after-left after-right) 'constructor resolves to exact callback' 'BAD-not-exact')
157− ?:((itype-has-face:jibb left.edge sub.u.solved) 'callback retains its face' 'BAD-face-lost')
158− ?:(!(itype-face-asym:jibb left.edge right.edge sub.u.solved) 'post-fit face asymmetry is absent' 'BAD-face-asymmetry')
159− ?:((itype-output-may-be-cell:jibb record-output sub.u.solved) 'record output stays cell-capable' 'BAD-output')
160− ?:(?=(~ rejected) 'prebound incompatible callback is rejected' 'BAD-incompatible')
161− ==
162−++ checked-source
163− |= [at=path source=@t]
164− ^- (unit dgcommit:jibb)
165− =/ detail=dgparse:jibb (dg-root-detail:jibb at source)
166− ?> parsed.detail
167− result.detail
168−++ case-grec-scan
169− ^- (list @t)
170− =/ tree=itype:jibb [%grec /ui/test/jibb %tree ~ *shape:jibb ~[[%var 7]]]
171− =/ bounded=(unit dgscan:jibb) (dg-scan:jibb ~[tree] ~ 256 ~)
172− =/ env=ienv:jibb ~[[%t [tree ~[7]]]]
173− =/ all=(unit dgscan:jibb) (dg-all-env-ids:jibb env 256 ~)
174− :~ ?:(?=(~ bounded) 'grec constraint scan declines' 'BAD-grec-scan')
175− ?:(?=(~ all) 'grec fresh-id scan declines' 'BAD-grec-freshness')
176− ==
177−++ case-default-behavior
178− ^- @t
179− =/ parsed (parse:jibb /ui/test/jibb '++ example (send |=%got)')
180− ?: ?=(%| -.parsed) 'BAD parse'
181− ?~ defs.p.parsed 'BAD missing definition'
182− =/ d=def:jibb i.defs.p.parsed
183− ?. ?=(%value -.d) 'BAD not value'
184− =/ callback=itype:jibb [%fn [%atom %t] [%var 100]]
185− =/ head=itype:jibb [%fn callback callback]
186− =/ env=ienv:jibb ~[[%send [head ~[100]]]]
187− =/ state=istate:jibb *istate:jibb
188− =/ ordinary=iresult:jibb (infer-fragment:jibb val.d env state)
189− ?: ?=(%& -.ordinary) 'BAD default deferred inference accepted'
190− =/ enabled=iresult:jibb (infer-fragment:jibb val.d env state(defer `~))
191− ?: ?=(%| -.enabled) 'BAD explicit capability failed'
192− ?~ obligations.state.p.enabled 'BAD missing obligation'
193− 'default inference declines; explicit capability creates obligation'
194−++ case-screen-bounds
195− ^- @t
196− =/ parsed (parse:jibb /ui/test/jibb '++ example (send |=%got)\0a++ other 1\0a')
197− ?: ?=(%| -.parsed) 'BAD parse'
198− =/ ds=(list def:jibb) defs.p.parsed
199− ?. ?=([* [* ~]] ds) 'BAD definitions'
200− =/ good=def:jibb i.ds
201− =/ other=def:jibb i.t.ds
202− ?. &(?=(%value -.good) ?=(%value -.other)) 'BAD value types'
203− =/ raw=expr:jibb val.good
204− ?. ?=(%group -.raw) 'BAD group'
205− =/ call=expr:jibb inner.raw
206− ?. ?=(%call -.call) 'BAD call'
207− =/ wrap
208− |= [n=@ud e=expr:jibb]
209− ^- expr:jibb
210− |-
211− ?~ n e
212− $(n (dec n), e [%group (span-of:jibb e) e])
213− =/ w63=expr:jibb (wrap 63 call)
214− =/ w64=expr:jibb (wrap 64 call)
215− ?. (dg-direct-source:jibb w63 64) 'BAD 63 wrappers rejected'
216− ?: (dg-direct-source:jibb w64 64) 'BAD 64 wrappers accepted'
217− =/ exact=(list def:jibb) (weld (reap 63 other) ~[good])
218− =/ over=(list def:jibb) [other exact]
219− ?. (dg-source-candidate:jibb exact 64) 'BAD exact definitions rejected'
220− ?: (dg-source-candidate:jibb over 64) 'BAD excessive definitions accepted'
221− =/ unsupported=expr:jibb [%trace (span-of:jibb call) call call]
222− ?: (dg-direct-source:jibb unsupported 64) 'BAD unsupported wrapper accepted'
223− 'candidate screen boundaries passed'
224−++ deferred-report
225− |= [nested-src=@t principal-src=@t missing-src=@t conflict-src=@t duplicate-src=@t hole-src=@t local-src=@t mutual-src=@t mold-hole-src=@t face-good-src=@t face-bad-src=@t]
226− ^- @t
227− =/ lines=(list @t) (case-nested nested-src)
228− =. lines (weld lines (case-principal principal-src))
229− =. lines (weld lines (case-negative missing-src conflict-src duplicate-src hole-src))
230− =. lines (weld lines (case-groups local-src mutual-src))
231− =. lines (weld lines (case-mold-hole mold-hole-src))
232− =. lines (weld lines case-fresh)
233− =. lines (weld lines case-safety)
234− =. lines (weld lines (case-face-source face-good-src face-bad-src))
235− =. lines (weld lines case-face-replay)
236− =. lines (weld lines case-grec-scan)
237− =. lines (weld lines ~[case-default-behavior case-screen-bounds])
238− (of-wain:format lines)
239−++ test-deferred
240− ^- tang
241− =/ result=@t (deferred-report (text nested-src) (text principal-src) (text missing-src) (text conflict-src) (text duplicate-src) (text hole-src) (text local-src) (text mutual-src) (text mold-hole-src) (text face-good-src) (text face-bad-src))
242− ?. =((to-wain:format (cat 3 result '\0a')) expected) ~[leaf+"deferred partial transaction report differs"]
243− ~
244−--
tests/lib/jibb-direct-gate-guards.hoondeleted−172
@@ -1,172 +0,0 @@
1−:: Direct layout evidence must retain provenance and final face constraints.
2−/+ jibb
3−|%
4−++ direct-evidence-errors
5− ^- (list tape)
6− =/ pre=@t '++ apply |= [f=$-([A B] B) n=@t] f\0a'
7− =/ dupe=@t '++ apply |= [f=$-([A B] B) n=@t] f\0a++ apply |= [f=$-([A B] B) n=@t] f\0a'
8− =/ root=@t '++ target |= [a=@t b=@p] b\0a++ main (apply target "x")\0a'
9− =/ parsed (parse:jibb /tests/test/jibb root)
10− ?> ?=(%& -.parsed)
11− =/ ds=(list def:jibb) defs.p.parsed
12− ?> ?=(^ ds)
13− ?> ?=(^ t.ds)
14− ?> ?=(%value -.i.t.ds)
15− =/ expr=expr:jibb val.i.t.ds
16− =? expr ?=(%group -.expr) inner.expr
17− =/ txt=itype:jibb [%atom %t]
18− =/ ship=itype:jibb [%atom %p]
19− =/ target=itype:jibb [%fn [%cell [%face %a txt] [%face %b ship]] ship]
20− =/ expected-fn=itype:jibb [%fn [%cell [%var 0] [%var 1]] [%var 1]]
21− =/ expected-sample=itype:jibb [%cell [%face %f expected-fn] [%face %n txt]]
22− =/ actual=itype:jibb [%cell target txt]
23− =/ scheme=ischeme:jibb [[%fn expected-sample expected-fn] ~[0 1]]
24− =/ changed=ischeme:jibb [[%fn expected-sample ship] ~[0 1]]
25− =/ iface=ifile:jibb [~[[%apply scheme]] ~ /lib/jibb/prelude/jibb ~ ~ ~ `pre ~]
26− =/ stale=ifile:jibb iface(values ~[[%apply changed]])
27− =/ dup=ifile:jibb iface(source `dupe)
28− =/ env=ienv:jibb ~[[%target [target ~]]]
29− =/ registry=(map term def:jibb) (direct-checked-gates:jibb ds env)
30− =/ evidence=(unit igate-prelude-evidence:jibb) (direct-prelude-evidence:jibb ds `iface)
31− ?> ?=(^ evidence)
32− =/ st=istate:jibb *istate:jibb
33− =. st st(globals ~[%apply %target %main], prelude `iface, gate-defs registry, head-evidence evidence, next 10)
34− =/ good=(unit ifit:jibb) (direct-gate-call-fit:jibb expr actual expected-sample env st)
35− =/ bad=(unit ifit:jibb) (direct-gate-call-fit:jibb expr actual expected-sample env st(prelude `stale))
36− =/ dupe-evidence=(unit igate-prelude-evidence:jibb) (direct-prelude-evidence:jibb ds `dup)
37− =/ head=(unit def:jibb) (~(get by gates.u.evidence) %apply)
38− ?> ?=(^ head)
39− =/ head-sample=(unit sample:jibb) (direct-gate-sample:jibb u.head)
40− ?> ?=(^ head-sample)
41− ?> ?=(%cell -.u.head-sample)
42− ?> ?=(%call -.expr)
43− =/ pos=ifit:jibb (direct-positional-fit:jibb args.expr items.u.head-sample actual expected-sample env st ~ 10)
44− =/ checks=(list @t)
45− :~
46− ?:(?=(%ok -.pos) 'positional-fit-ok' 'BAD-positional-fit')
47− ?:(?=(^ good) 'original-evidence-usable' 'BAD-original-evidence')
48− ?: &(?=(~ bad) =(source.iface source.stale) =(at.iface at.stale) !=(values.iface values.stale))
49− 'changed-value-scheme-rejected'
50− 'BAD-stale-evidence'
51− ?:(?=(~ dupe-evidence) 'duplicate-source-rejected' 'BAD-duplicate-source')
52− ==
53−
54− ?: =(checks ~['positional-fit-ok' 'original-evidence-usable' 'changed-value-scheme-rejected' 'duplicate-source-rejected']) ~
55− ~["direct-evidence-errors direct gate guard failed"]
56−++ late-face-errors
57− ^- (list tape)
58− =/ pre=@t '++ apply |= [first=[foo=A] second=A f=$-([C D] D)] f\0a'
59− =/ dupe=@t '++ apply |= [f=$-([A B] B) n=@t] f\0a++ apply |= [f=$-([A B] B) n=@t] f\0a'
60− =/ root=@t '++ target |= [a=@t b=@p] b\0a++ main (apply x y target)\0a'
61− =/ parsed (parse:jibb /tests/test/jibb root)
62− ?> ?=(%& -.parsed)
63− =/ ds=(list def:jibb) defs.p.parsed
64− ?> ?=(^ ds)
65− ?> ?=(^ t.ds)
66− ?> ?=(%value -.i.t.ds)
67− =/ expr=expr:jibb val.i.t.ds
68− =? expr ?=(%group -.expr) inner.expr
69− =/ txt=itype:jibb [%atom %t]
70− =/ ship=itype:jibb [%atom %p]
71− =/ target=itype:jibb [%fn [%cell [%face %a txt] [%face %b ship]] ship]
72− =/ expected-fn=itype:jibb [%fn [%cell [%var 1] [%var 2]] [%var 2]]
73− =/ expected-sample=itype:jibb [%cell [%face %first [%face %foo [%var 0]]] [%cell [%face %second [%var 0]] [%face %f expected-fn]]]
74− =/ actual=itype:jibb [%cell [%var 0] [%cell txt target]]
75− =/ scheme=ischeme:jibb [[%fn expected-sample expected-fn] ~[0 1]]
76− =/ changed=ischeme:jibb [[%fn expected-sample ship] ~[0 1]]
77− =/ iface=ifile:jibb [~[[%apply scheme]] ~ /lib/jibb/prelude/jibb ~ ~ ~ `pre ~]
78− =/ stale=ifile:jibb iface(values ~[[%apply changed]])
79− =/ dup=ifile:jibb iface(source `dupe)
80− =/ env=ienv:jibb ~[[%target [target ~]]]
81− =/ registry=(map term def:jibb) (direct-checked-gates:jibb ds env)
82− =/ evidence=(unit igate-prelude-evidence:jibb) (direct-prelude-evidence:jibb ds `iface)
83− ?> ?=(^ evidence)
84− =/ st=istate:jibb *istate:jibb
85− =. st st(globals ~[%apply %target %main], prelude `iface, gate-defs registry, head-evidence evidence, next 10)
86− =/ good=(unit ifit:jibb) (direct-gate-call-fit:jibb expr actual expected-sample env st)
87− =/ bad=(unit ifit:jibb) (direct-gate-call-fit:jibb expr actual expected-sample env st(prelude `stale))
88− =/ dupe-evidence=(unit igate-prelude-evidence:jibb) (direct-prelude-evidence:jibb ds `dup)
89− =/ head=(unit def:jibb) (~(get by gates.u.evidence) %apply)
90− ?> ?=(^ head)
91− =/ head-sample=(unit sample:jibb) (direct-gate-sample:jibb u.head)
92− ?> ?=(^ head-sample)
93− ?> ?=(%cell -.u.head-sample)
94− ?> ?=(%call -.expr)
95− =/ pos=ifit:jibb (direct-positional-fit:jibb args.expr items.u.head-sample actual expected-sample env st ~ 10)
96− =/ checks=(list @t)
97− :~
98− ?: ?=(%ok -.pos)
99− ?:((itype-positional-slot-face-asym:jibb [%var 0] [%face %foo [%var 0]] sub.pos) 'LATE-FACE-ASYMMETRY' 'no-late-asymmetry')
100− 'no-positional-fit'
101− ?:(?=(%ok -.pos) 'positional-fit-ok' 'BAD-positional-fit')
102− ?:(?=(^ good) 'original-evidence-usable' 'late-face-rejected')
103− ?: &(?=(~ bad) =(source.iface source.stale) =(at.iface at.stale) !=(values.iface values.stale))
104− 'changed-value-scheme-rejected'
105− 'BAD-stale-evidence'
106− ?:(?=(~ dupe-evidence) 'duplicate-source-rejected' 'BAD-duplicate-source')
107− ==
108−
109− ?: =(checks ~['LATE-FACE-ASYMMETRY' 'positional-fit-ok' 'late-face-rejected' 'changed-value-scheme-rejected' 'duplicate-source-rejected']) ~
110− ~["late-face-errors direct gate guard failed"]
111−++ symmetric-face-errors
112− ^- (list tape)
113− =/ pre=@t '++ apply |= [first=[foo=A] second=A f=$-([C D] D)] f\0a'
114− =/ dupe=@t '++ apply |= [f=$-([A B] B) n=@t] f\0a++ apply |= [f=$-([A B] B) n=@t] f\0a'
115− =/ root=@t '++ target |= [a=@t b=@p] b\0a++ main (apply x y target)\0a'
116− =/ parsed (parse:jibb /tests/test/jibb root)
117− ?> ?=(%& -.parsed)
118− =/ ds=(list def:jibb) defs.p.parsed
119− ?> ?=(^ ds)
120− ?> ?=(^ t.ds)
121− ?> ?=(%value -.i.t.ds)
122− =/ expr=expr:jibb val.i.t.ds
123− =? expr ?=(%group -.expr) inner.expr
124− =/ txt=itype:jibb [%atom %t]
125− =/ ship=itype:jibb [%atom %p]
126− =/ target=itype:jibb [%fn [%cell [%face %a txt] [%face %b ship]] ship]
127− =/ expected-fn=itype:jibb [%fn [%cell [%var 1] [%var 2]] [%var 2]]
128− =/ expected-sample=itype:jibb [%cell [%face %first [%face %foo [%var 0]]] [%cell [%face %second [%var 0]] [%face %f expected-fn]]]
129− =/ actual=itype:jibb [%cell [%face %foo [%var 0]] [%cell txt target]]
130− =/ scheme=ischeme:jibb [[%fn expected-sample expected-fn] ~[0 1]]
131− =/ changed=ischeme:jibb [[%fn expected-sample ship] ~[0 1]]
132− =/ iface=ifile:jibb [~[[%apply scheme]] ~ /lib/jibb/prelude/jibb ~ ~ ~ `pre ~]
133− =/ stale=ifile:jibb iface(values ~[[%apply changed]])
134− =/ dup=ifile:jibb iface(source `dupe)
135− =/ env=ienv:jibb ~[[%target [target ~]]]
136− =/ registry=(map term def:jibb) (direct-checked-gates:jibb ds env)
137− =/ evidence=(unit igate-prelude-evidence:jibb) (direct-prelude-evidence:jibb ds `iface)
138− ?> ?=(^ evidence)
139− =/ st=istate:jibb *istate:jibb
140− =. st st(globals ~[%apply %target %main], prelude `iface, gate-defs registry, head-evidence evidence, next 10)
141− =/ good=(unit ifit:jibb) (direct-gate-call-fit:jibb expr actual expected-sample env st)
142− =/ bad=(unit ifit:jibb) (direct-gate-call-fit:jibb expr actual expected-sample env st(prelude `stale))
143− =/ dupe-evidence=(unit igate-prelude-evidence:jibb) (direct-prelude-evidence:jibb ds `dup)
144− =/ head=(unit def:jibb) (~(get by gates.u.evidence) %apply)
145− ?> ?=(^ head)
146− =/ head-sample=(unit sample:jibb) (direct-gate-sample:jibb u.head)
147− ?> ?=(^ head-sample)
148− ?> ?=(%cell -.u.head-sample)
149− ?> ?=(%call -.expr)
150− =/ pos=ifit:jibb (direct-positional-fit:jibb args.expr items.u.head-sample actual expected-sample env st ~ 10)
151− =/ checks=(list @t)
152− :~
153− ?: ?=(%ok -.pos)
154− ?:((itype-positional-slot-face-asym:jibb [%face %foo [%var 0]] [%face %foo [%var 0]] sub.pos) 'LATE-FACE-ASYMMETRY' 'symmetric-after-later-binding')
155− 'no-positional-fit'
156− ?:(?=(%ok -.pos) 'positional-fit-ok' 'BAD-positional-fit')
157− ?:(?=(^ good) 'original-evidence-usable' 'BAD-original-evidence')
158− ?: &(?=(~ bad) =(source.iface source.stale) =(at.iface at.stale) !=(values.iface values.stale))
159− 'changed-value-scheme-rejected'
160− 'BAD-stale-evidence'
161− ?:(?=(~ dupe-evidence) 'duplicate-source-rejected' 'BAD-duplicate-source')
162− ==
163−
164− ?: =(checks ~['symmetric-after-later-binding' 'positional-fit-ok' 'original-evidence-usable' 'changed-value-scheme-rejected' 'duplicate-source-rejected']) ~
165− ~["symmetric-face-errors direct gate guard failed"]
166−++ direct-gate-guard-errors
167− ^- (list tape)
168− (weld direct-evidence-errors (weld late-face-errors symmetric-face-errors))
169−++ test-direct-gate-guards
170− ^- tang
171− (turn direct-gate-guard-errors |=(reason=tape leaf+reason))
172−--
tests/lib/jibb-direct-gate-source.hoondeleted−46
@@ -1,46 +0,0 @@
1−:: Exercise direct-source gate layouts through a synthetic program scaffold.
2−/+ jibb
3−/* real-prelude %jibb /lib/jibb/prelude/jibb
4−/* real-internal %jibb /lib/jibb/internal/jibb
5−/* source %txt /tests/type-direct-gate/source/txt
6−/* expected %txt /tests/type-direct-gate/expected/txt
7−|%
8−++ text
9− |= lines=wain
10− ^- @t
11− (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
12−++ direct-gate-prepared
13− |= [prelude=@t internal=@t]
14− ^- (unit iprelude:jibb)
15− :: Program and element come from the real prelude; only layout helpers are synthetic.
16− =/ extra=@t '\0a++ choose-layout |= [f=$-([A B] C) value=[A B]] (f value)\0a++ higher |= [f=$-([@t [x=@t y=@p]] @t) marker=?] f\0a++ higher-generic |= [f=$-([@t X] X) state=X] state\0a'
17− (prepare-prelude-with-internal:jibb (cat 3 prelude extra) internal)
18−++ direct-gate-source-output
19− |= [src=@t prepared=(unit iprelude:jibb)]
20− ^- @t
21− (golden-types-with-prepared-prelude:jibb /tests/sub/client/jibb src ~ ~ ~ prepared)
22−++ direct-gate-projection-errors
23− |= prepared=(unit iprelude:jibb)
24− ^- (list tape)
25− ?~ prepared ~["synthetic prelude did not prepare"]
26− =/ src=@t '+$ message\0a %start\0a %stop\0a+$ record [count=@ud label=@t]\0a++ init-record |= input=@t ^- record [count=0 label=input]\0a++ view-record |= state=record ^- (element message) (text "view")\0a++ subs-record |= state=record ^- (list (sub message)) ~\0a++ update-proj-good |= [msg=message state=record]\0a ^- [record (list (cmd message))]\0a [(proj [count=0 label="projected" extra=%.y]) ~]\0a++ program-projection (program init-record update-proj-good view-record subs-record)\0a'
27− =/ out=jfile-result:jibb (infer-jibb-file:jibb /tests/direct/client/jibb src ~ ~ ~ ~[/tests/direct/client/jibb] values.u.prepared molds.u.prepared ~ `iface.u.prepared)
28− ?: ?=(%| -.out) ~["projection-bearing module did not infer"]
29− =/ defs=(list iwidth-definition:jibb) (skim elaborations.iface.p.out |=(d=iwidth-definition:jibb =(%update-proj-good name.d)))
30− ?~ defs ~["projection-bearing update lost its elaboration"]
31− ?~ projections.i.defs ~["projection action is missing"]
32− ?: !=(1 (lent projections.i.defs)) ~["unexpected projection action count"]
33− ?. =(steps.i.projections.i.defs ~[[%count 2] [%label 6]]) ~["projection axes changed"]
34− ~
35−++ test-direct-gate-source
36− ^- tang
37− ?~ source ~[leaf+"direct gate source is missing"]
38− ?~ expected ~[leaf+"direct gate expected output is missing"]
39− =/ prepared=(unit iprelude:jibb) (direct-gate-prepared real-prelude real-internal)
40− =/ errors=(list tape) (direct-gate-projection-errors prepared)
41− ?^ errors (turn errors |=(reason=tape leaf+reason))
42− =/ got=@t (direct-gate-source-output (text source) prepared)
43− ?. =((to-wain:format (cat 3 got '\0a')) expected)
44− ~[leaf+"direct gate source output differs from its golden"]
45− ~
46−--
tests/lib/jibb-empty.hoondeleted−174
@@ -1,174 +0,0 @@
1−:: Source-backed empty-mold checks; no backend/runtime claim.
2−/+ jibb
3−/* real-prelude %jibb /lib/jibb/prelude/jibb
4−/* real-internal %jibb /lib/jibb/internal/jibb
5−/* good %txt /tests/type-empty/good/txt
6−/* overlap %txt /tests/type-empty/overlap/txt
7−/* dead %txt /tests/type-empty/dead/txt
8−/* missing %txt /tests/type-empty/missing/txt
9−/* standard-good %txt /tests/type-empty/standard-good/txt
10−/* list-dead %txt /tests/type-empty/list-dead/txt
11−/* unit-dead %txt /tests/type-empty/unit-dead/txt
12−/* late-cap %txt /tests/type-empty/late-cap/txt
13−/* list-live %txt /tests/type-empty/list-live/txt
14−/* list-open %txt /tests/type-empty/list-open/txt
15−/* face-source %txt /tests/type-empty/face-source/txt
16−/* expected %txt /tests/type-empty/expected/txt
17−|%
18−++ text
19− |= lines=wain
20− ^- @t
21− (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
22−++ line
23− |= [label=@t ok=?]
24− ^- @t
25− (crip "{(trip label)}: {?:(ok "ok" "BAD")}")
26−++ face-retained
27− |= [source=@t prelude=ifile:jibb]
28− ^- ?
29− =/ parsed=(each module:jibb error:jibb) (parse:jibb /tests/empty/jibb source)
30− ?: ?=(%| -.parsed) |
31− =/ ds=(list def:jibb) defs.p.parsed
32− ?. ?=([* ~] ds) |
33− =/ d=def:jibb i.ds
34− ?. ?=(%value -.d) |
35− =/ typ=itype:jibb [%collection %list ~[[%empty ~]]]
36− =/ env=ienv:jibb ~[[%xs [typ ~]]]
37− =/ state=istate:jibb *istate:jibb
38− =. state state(prelude `prelude, jrec-fuel 256)
39− =/ expected=itype:jibb [%cell [%atom %t] [%atom %t]]
40− =/ result=(unit iresult:jibb)
41− (empty-list-null-branch:jibb val.d env state `[expected (span-of:jibb val.d)])
42− ?~ result |
43− ?: ?=(%| -.u.result) |
44− (itype-has-face:jibb typ.p.u.result sub.state.p.u.result)
45−++ empty-output
46− |= [pre=@t internal=@t good=@t overlap=@t dead=@t missing=@t standard-good=@t list-dead=@t unit-dead=@t late-cap=@t list-live=@t list-open=@t face-source=@t]
47− ^- @t
48− =/ prep=(unit iprelude:jibb) (prepare-prelude-with-internal:jibb pre internal)
49− ?~ prep 'BAD prelude preparation'
50− =/ f=path /tests/empty/jibb
51− =/ valid=jfile-result:jibb (infer-jibb-file:jibb f good ~ ~ ~ ~[f] ~ ~ ~ ~)
52− ?: ?=(%| -.valid) 'BAD checked empty source'
53− =/ never=(unit ischeme:jibb) (find-jibb-mold:jibb %never iface.p.valid)
54− ?~ never 'BAD never export'
55− =/ select=(unit ischeme:jibb) (ienv-lookup:jibb %select values.iface.p.valid)
56− ?~ select 'BAD select export'
57− =/ split=(unit ischeme:jibb) (find-jibb-mold:jibb %split iface.p.valid)
58− ?~ split 'BAD split export'
59− ?. ?=(%fn -.typ.u.select) 'BAD select gate'
60− =/ selected=itype:jibb sample.typ.u.select
61− =? selected ?=(%face -.selected) body.selected
62− =/ parsed-overlap=(each module:jibb error:jibb) (parse:jibb f overlap)
63− =/ parsed-dead=(each module:jibb error:jibb) (parse:jibb f dead)
64− =/ parsed-missing=(each module:jibb error:jibb) (parse:jibb f missing)
65− =/ parsed-list=(each module:jibb error:jibb) (parse:jibb f list-dead)
66− =/ parsed-unit=(each module:jibb error:jibb) (parse:jibb f unit-dead)
67− =/ invalid=jfile-result:jibb (infer-jibb-file:jibb f overlap ~ ~ ~ ~[f] ~ ~ ~ ~)
68− =/ dead-result=jfile-result:jibb (infer-jibb-file:jibb f dead ~ ~ ~ ~[f] ~ ~ ~ ~)
69− =/ missing-result=jfile-result:jibb (infer-jibb-file:jibb f missing ~ ~ ~ ~[f] ~ ~ ~ ~)
70− =/ standard=jfile-result:jibb (infer-jibb-file:jibb f standard-good ~ ~ ~ ~[f] values.u.prep molds.u.prep ~ `iface.u.prep)
71− =/ only=(unit ischeme:jibb)
72− ?- -.standard
73− %& (ienv-lookup:jibb %list-only values.iface.p.standard)
74− %| ~
75− ==
76− =/ only-context=(unit ischeme:jibb)
77− ?- -.standard
78− %& (ienv-lookup:jibb %list-only-context values.iface.p.standard)
79− %| ~
80− ==
81− =/ only-good=?
82− ?~ only |
83− ?. ?=(%fn -.typ.u.only) |
84− =/ sample=itype:jibb sample.typ.u.only
85− =? sample ?=(%face -.sample) body.sample
86− &(=(sample [%collection %list ~[[%empty ~]]]) =(product.typ.u.only [%atom %t]))
87− =/ parsed-live=(each module:jibb error:jibb) (parse:jibb f list-live)
88− =/ parsed-open=(each module:jibb error:jibb) (parse:jibb f list-open)
89− =/ live-result=jfile-result:jibb (infer-jibb-file:jibb f list-live ~ ~ ~ ~[f] values.u.prep molds.u.prep ~ `iface.u.prep)
90− =/ open-result=jfile-result:jibb (infer-jibb-file:jibb f list-open ~ ~ ~ ~[f] values.u.prep molds.u.prep ~ `iface.u.prep)
91− =/ bad-list=jfile-result:jibb (infer-jibb-file:jibb f list-dead ~ ~ ~ ~[f] values.u.prep molds.u.prep ~ `iface.u.prep)
92− =/ bad-unit=jfile-result:jibb (infer-jibb-file:jibb f unit-dead ~ ~ ~ ~[f] values.u.prep molds.u.prep ~ `iface.u.prep)
93− =/ atom=itype:jibb [%atom %t]
94− =/ void=itype:jibb [%empty ~]
95− =/ fn=itype:jibb [%fn atom atom]
96− =/ impossible=itype:jibb [%cell fn [%face %field void]]
97− =/ singleton=itype:jibb [%collection %list ~[void]]
98− =/ proof=(unit [empty=? left=@ud]) (itype-empty-proof:jibb impossible ~ 4)
99− =/ list-proof=(unit [empty=? left=@ud]) (itype-empty-proof:jibb singleton ~ 4)
100− =/ fn-proof=(unit [empty=? left=@ud]) (itype-empty-proof:jibb [%fn void void] ~ 4)
101− =/ unknown=(unit [empty=? left=@ud]) (itype-empty-proof:jibb [%var 23] ~ 4)
102− =/ too-short=(unit [empty=? left=@ud]) (itype-empty-proof:jibb [%face %field void] ~ 1)
103− =/ enough=(unit [empty=? left=@ud]) (itype-empty-proof:jibb [%face %field void] ~ 2)
104− =/ empty-fit=ifit:jibb (itype-fit:jibb void atom ~ 17)
105− =/ nested-fit=ifit:jibb (itype-fit:jibb impossible atom ~ 17)
106− =/ atom-fit=ifit:jibb (itype-fit:jibb atom void ~ 17)
107− =/ cap=icaps:jibb ~[['A' 23 *span:jibb]]
108− =/ open-live=(unit [result=?(%yes %no %unknown) left=@ud]) (itype-inhabited-proof:jibb [%var 23] ~ ~ 4)
109− =/ capital-live=(unit [result=?(%yes %no %unknown) left=@ud]) (itype-inhabited-proof:jibb [%var 23] ~ cap 4)
110− =/ bound-empty=(unit [result=?(%yes %no %unknown) left=@ud]) (itype-inhabited-proof:jibb [%var 23] ~[[23 void]] cap 4)
111− =/ opaque=itype:jibb [%recursive %opaque %mold ~]
112− =/ opaque-live=(unit [result=?(%yes %no %unknown) left=@ud]) (itype-inhabited-proof:jibb opaque ~ ~ 4)
113− =/ rejected-cases=(unit (list itype:jibb)) (itype-live-cases:jibb ~[opaque] ~ ~ 4)
114− =/ no-gates=igate-free:jibb (gate-free-type:jibb impossible 8 ~)
115− =/ list-gates=igate-free:jibb (gate-free-type:jibb singleton 8 ~)
116− =/ checks=(list [label=@t ok=?])
117− :~ ['empty mold exported' =([%empty ~] typ.u.never)]
118− ['live union selector preserves type' &(=(typ.u.split selected) =([%atom %t] product.typ.u.select))]
119− ['overlap parses and is rejected' &(?=(%& -.parsed-overlap) ?=(%| -.invalid))]
120− ['dead empty case parses and is rejected' &(?=(%& -.parsed-dead) ?=(%| -.dead-result))]
121− ['missing live case parses and is rejected' &(?=(%& -.parsed-missing) ?=(%| -.missing-result))]
122− ['standard list and unit identities checked' ?=(%& -.standard)]
123− ['single null list gate keeps its exact sample and result' only-good]
124− ['contextual single null list gate checks' ?=(^ only-context)]
125− ['contextual single null list arm retains faces' (face-retained face-source iface.u.prep)]
126− ['one null arm on inhabited list declines' &(?=(%& -.parsed-live) ?=(%| -.live-result))]
127− ['one null arm on generic list declines' &(?=(%& -.parsed-open) ?=(%| -.open-result))]
128− ['empty list nonempty arm parses and is rejected' &(?=(%& -.parsed-list) ?=(%| -.bad-list))]
129− ['empty unit present arm parses and is rejected' &(?=(%& -.parsed-unit) ?=(%| -.bad-unit))]
130− ['nested empty proof' ?:(?=(~ proof) | empty.u.proof)]
131− ['list of empty is inhabited' ?:(?=(~ list-proof) | !empty.u.list-proof)]
132− ['gate returning empty is not empty' ?:(?=(~ fn-proof) | !empty.u.fn-proof)]
133− ['unbound type not proved empty' ?:(?=(~ unknown) | !empty.u.unknown)]
134− ['unbound inference type reachability unknown' ?:(?=(~ open-live) | =(%unknown result.u.open-live))]
135− ['written capital can have a value' ?:(?=(~ capital-live) | =(%yes result.u.capital-live))]
136− ['bound empty capital is unreachable' ?:(?=(~ bound-empty) | =(%no result.u.bound-empty))]
137− ['opaque recursion reachability unknown' ?:(?=(~ opaque-live) | =(%unknown result.u.opaque-live))]
138− ['opaque union case declines coverage proof' ?=(~ rejected-cases)]
139− ['one proof node exhausted' ?=(~ too-short)]
140− ['two proof nodes succeed' ?:(?=(~ enough) | &(empty.u.enough =(0 left.u.enough)))]
141− ['empty fits a concrete type' ?=(%ok -.empty-fit)]
142− ['empty cell fits a concrete type' ?=(%ok -.nested-fit)]
143− ['inhabited atom does not fit empty' ?=(%bad -.atom-fit)]
144− ['empty gate-bearing cell is gate-free' &(=(%yes verdict.no-gates) !inhabited.no-gates)]
145− ['list of empty is gate-free and inhabited' &(=(%yes verdict.list-gates) inhabited.list-gates)]
146− ==
147− =/ report=@t (golden-types-in-context:jibb f good ~ ~ ~ ~ ~ ~)
148− =/ overlap-report=@t (golden-types-in-context:jibb f overlap ~ ~ ~ ~ ~ ~)
149− =/ dead-report=@t (golden-types-in-context:jibb f dead ~ ~ ~ ~ ~ ~)
150− =/ missing-report=@t (golden-types-in-context:jibb f missing ~ ~ ~ ~ ~ ~)
151− =/ list-report=@t (golden-types-with-prepared-prelude:jibb f list-dead ~ ~ ~ prep)
152− =/ unit-report=@t (golden-types-with-prepared-prelude:jibb f unit-dead ~ ~ ~ prep)
153− =/ late-report=@t (golden-types-with-prepared-prelude:jibb f late-cap ~ ~ ~ prep)
154− (rap 3 ~[(of-wain:format (turn checks line)) '\0a' report '\0a' overlap-report '\0a' dead-report '\0a' missing-report '\0a' list-report '\0a' unit-report '\0a' late-report])
155−++ test-empty
156− ^- tang
157− ?~ good ~[leaf+"empty source missing"]
158− ?~ overlap ~[leaf+"overlap source missing"]
159− ?~ dead ~[leaf+"dead case source missing"]
160− ?~ missing ~[leaf+"missing case source missing"]
161− ?~ standard-good ~[leaf+"standard type source missing"]
162− ?~ list-dead ~[leaf+"empty list source missing"]
163− ?~ unit-dead ~[leaf+"empty unit source missing"]
164− ?~ late-cap ~[leaf+"late capital source missing"]
165− ?~ list-live ~[leaf+"inhabited list source missing"]
166− ?~ list-open ~[leaf+"generic list source missing"]
167− ?~ face-source ~[leaf+"face source missing"]
168− ?~ expected ~[leaf+"expected output missing"]
169− =/ actual=@t
170− (empty-output real-prelude real-internal (text good) (text overlap) (text dead) (text missing) (text standard-good) (text list-dead) (text unit-dead) (text late-cap) (text list-live) (text list-open) (text face-source))
171− ?. =((to-wain:format (cat 3 actual '\0a')) expected)
172− ~[leaf+"empty mold output differs from expected"]
173− ~
174−--
tests/lib/jibb-full-overlap-basic.hoondeleted−143
@@ -1,143 +0,0 @@
1−:: Source-bound full-module overlap diagnostics.
2−/+ jibb
3−/* same %txt /tests/type-full-overlap/same/txt
4−/* zero %txt /tests/type-full-overlap/zero/txt
5−/* unsupported %txt /tests/type-full-overlap/unsupported/txt
6−/* precedence %txt /tests/type-full-overlap/precedence/txt
7−/* duplicate %txt /tests/type-full-overlap/duplicate/txt
8−/* invalid %txt /tests/type-full-overlap/invalid/txt
9−/* distinct %txt /tests/type-full-overlap/distinct/txt
10−/* parent %txt /tests/type-full-overlap/parent/txt
11−/* child %txt /tests/type-full-overlap/child/txt
12−/* generic %txt /tests/type-full-overlap/generic/txt
13−/* duplicate-generic %txt /tests/type-full-overlap/duplicate-generic/txt
14−/* expected %txt /tests/type-full-overlap/expected-basic/txt
15−|%
16−+$ overlap-evidence [file=path source=@t name=term cases=upair:jibb]
17−+$ detailed-result
18− (each [iface=ifile:jibb cache=jcache:jibb] [message=@t overlap=(unit overlap-evidence)])
19−++ source-pair
20− |= [file=path source=@t name=term]
21− ^- (unit upair:jibb)
22− =/ parsed (parse:jibb file source)
23− ?: ?=(%| -.parsed) ~
24− =/ molds=imolds:jibb (collect-simple-molds:jibb defs.p.parsed)
25− =/ found=(unit shape:jibb) (find-simple-mold:jibb name molds)
26− ?~ found ~
27− =/ sh=shape:jibb u.found
28− =? sh ?=(%generic -.sh) body.sh
29− ?. ?=(%union -.sh) ~
30− ?~ cases.sh ~
31− ?~ t.cases.sh ~
32− `[at.i.cases.sh at.i.t.cases.sh %overlap]
33−++ source-witness
34− |= [file=path source=@t name=term]
35− ^- ?
36− =/ parsed (parse:jibb file source)
37− ?: ?=(%| -.parsed) |
38− =/ molds=imolds:jibb (collect-simple-molds:jibb defs.p.parsed)
39− =/ found=(unit shape:jibb) (find-simple-mold:jibb name molds)
40− ?~ found |
41− =/ sh=shape:jibb u.found
42− =? sh ?=(%generic -.sh) body.sh
43− ?. ?=(%union -.sh) |
44− ?=(^ (union-source-overlap:jibb cases.sh molds 256))
45−++ detailed
46− |= [file=path source=@t modules=jbundle:jibb]
47− ^- detailed-result
48− (infer-jibb-file-detailed:jibb file source ~ ~ modules ~[file] ~ ~ ~ ~)
49−++ expected-overlap
50− |= [file=path source=@t name=term]
51− ^- ?
52− =/ expected=(unit upair:jibb) (source-pair file source name)
53− ?~ expected |
54− =/ result=detailed-result (detailed file source ~)
55− ?: ?=(%& -.result) |
56− ?~ overlap.p.result |
57− =/ ev=overlap-evidence u.overlap.p.result
58− ?& !=(0 message.p.result)
59− =(file.ev file)
60− =(source.ev source)
61− =(name.ev name)
62− =(cases.ev u.expected)
63− =(%overlap relation.cases.ev)
64− =(3 line.beg.first.cases.ev)
65− =(3 col.beg.first.cases.ev)
66− =(4 line.beg.second.cases.ev)
67− =(3 col.beg.second.cases.ev)
68− ==
69−++ plain-failure
70− |= [file=path source=@t]
71− ^- ?
72− =/ parsed (parse:jibb file source)
73− ?: ?=(%| -.parsed) |
74− =/ result=detailed-result (detailed file source ~)
75− ?: ?=(%& -.result) |
76− &(!=(0 message.p.result) ?=(~ overlap.p.result))
77−++ run
78− |= [same=@t zero=@t unsupported=@t precedence=@t duplicate=@t invalid=@t distinct=@t parent=@t child=@t generic=@t duplicate-generic=@t]
79− ^- (list [@t ?])
80− =/ root=path /ui/root/jibb
81− =/ names256=(list @t) (turn (gulf 0 255) |=(n=@ud (scot %ud n)))
82− =/ names257=(list @t) (turn (gulf 0 256) |=(n=@ud (scot %ud n)))
83− =/ child-file=path /ui/child/jibb
84− =/ good-parsed (parse:jibb root distinct)
85− =/ good-result=detailed-result (detailed root distinct ~)
86− =/ bad-parsed (parse:jibb root invalid)
87− =/ bad-result=detailed-result (detailed root invalid ~)
88− =/ invalid-clean=?
89− ?: ?=(%& -.bad-parsed) |
90− ?: ?=(%& -.bad-result) |
91− &(!=(0 message.p.bad-result) ?=(~ overlap.p.bad-result))
92− =/ legacy=jfile-result:jibb (infer-jibb-file:jibb root same ~ ~ ~ ~[root] ~ ~ ~ ~)
93− =/ legacy-excerpts=?
94− ?: ?=(%& -.legacy) |
95− =/ lines=wain (to-wain:format p.legacy)
96− &((lien lines |=(line=@t =(line '/ui/root.jibb:3:3: first union case'))) (lien lines |=(line=@t =(line '/ui/root.jibb:4:3: overlapping case'))))
97− =/ imported=detailed-result (detailed root parent ~[[child-file child]])
98− =/ child-pair=(unit upair:jibb) (source-pair child-file child %child-bad)
99− =/ import-valid=?
100− ?: ?=(%& -.imported) |
101− ?: =(0 message.p.imported) |
102− ?~ overlap.p.imported |
103− ?~ child-pair |
104− =/ ev=overlap-evidence u.overlap.p.imported
105− ?& =(file.ev child-file)
106− =(source.ev child)
107− =(name.ev %child-bad)
108− =(cases.ev u.child-pair)
109− ==
110− :~ ['256 generic parameters accepted by scan' (module-mold-params-valid:jibb names256 *(set @t) 256)]
111− ['257 generic parameters exhaust scan' !(module-mold-params-valid:jibb names257 *(set @t) 256)]
112− ['duplicate generic parameters fail scan' !(module-mold-params-valid:jibb ~['A' 'A'] *(set @t) 256)]
113− ['same head has source-bound overlap' (expected-overlap root same %bad)]
114− ['zero spelling has source-bound overlap' (expected-overlap root zero %bad)]
115− ['generic wrapper has source-bound overlap' (expected-overlap root generic %bad)]
116− ['duplicate generic parameters remain unstructured' (plain-failure root duplicate-generic)]
117− ['unsupported remains unstructured' (plain-failure root unsupported)]
118− ['later overlap exists in precedence source' (source-witness root precedence %bad)]
119− ['earlier unsupported mold takes precedence' (plain-failure root precedence)]
120− ['duplicate source parsed but rejects without overlap' (plain-failure root duplicate)]
121− ['invalid source rejects without overlap' invalid-clean]
122− ['distinct alias source parses and checks' &(?=(%& -.good-parsed) ?=(%& -.good-result))]
123− ['parent itself has different positive overlap' (source-witness root parent %parent-bad)]
124− ['legacy full-module error contains both excerpts' legacy-excerpts]
125− ['import overlap retains exact child source' import-valid]
126− ==
127−++ text
128− |= lines=wain
129− ^- @t
130− (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
131−++ output
132− |= [same=@t zero=@t unsupported=@t precedence=@t duplicate=@t invalid=@t distinct=@t parent=@t child=@t generic=@t duplicate-generic=@t]
133− ^- @t
134− =/ result=(list [@t ?]) (run same zero unsupported precedence duplicate invalid distinct parent child generic duplicate-generic)
135− (of-wain:format (turn result |=(entry=[@t ?] (crip "{(trip -.entry)}: {?:(+.entry "ok" "BAD")}"))))
136−++ test-full-overlap-basic
137− ^- tang
138− ?~ expected ~[leaf+"expected output missing"]
139− =/ actual=@t (output (text same) (text zero) (text unsupported) (text precedence) (text duplicate) (text invalid) (text distinct) (text parent) (text child) (text generic) (text duplicate-generic))
140− ?. =((to-wain:format (cat 3 actual '\0a')) expected)
141− ~[leaf+"full-module overlap output differs"]
142− ~
143−--
tests/lib/jibb-full-overlap-graph.hoondeleted−126
@@ -1,126 +0,0 @@
1−:: Source-bound full-module overlap diagnostics.
2−/+ jibb
3−/* parent %txt /tests/type-full-overlap/parent/txt
4−/* child %txt /tests/type-full-overlap/child/txt
5−/* distinct %txt /tests/type-full-overlap/distinct/txt
6−/* expected %txt /tests/type-full-overlap/expected-graph/txt
7−|%
8−+$ overlap-evidence [file=path source=@t name=term cases=upair:jibb]
9−+$ detailed-result
10− (each [iface=ifile:jibb cache=jcache:jibb] [message=@t overlap=(unit overlap-evidence)])
11−++ detailed
12− |= [file=path source=@t modules=jbundle:jibb]
13− ^- detailed-result
14− (infer-jibb-file-detailed:jibb file source ~ ~ modules ~[file] ~ ~ ~ ~)
15−++ source-pair
16− |= [file=path source=@t]
17− ^- (unit upair:jibb)
18− =/ parsed (parse:jibb file source)
19− ?: ?=(%| -.parsed) ~
20− =/ molds=imolds:jibb (collect-simple-molds:jibb defs.p.parsed)
21− =/ found=(unit shape:jibb) (find-simple-mold:jibb %child-bad molds)
22− ?~ found ~
23− ?. ?=(%union -.u.found) ~
24− ?~ cases.u.found ~
25− ?~ t.cases.u.found ~
26− `[at.i.cases.u.found at.i.t.cases.u.found %overlap]
27−++ failure-message
28− |= [r=detailed-result expected-message=@t]
29− ^- ?
30− ?: ?=(%& -.r) |
31− &(=(message.p.r expected-message) ?=(~ overlap.p.r))
32−++ run
33− |= [parent=@t child=@t distinct=@t]
34− ^- (list [@t ?])
35− =/ root=path /ui/root/jibb
36− =/ child-file=path /ui/child/jibb
37− =/ good-parsed (parse:jibb child-file distinct)
38− =/ parent-parsed (parse:jibb root parent)
39− =/ child-parsed (parse:jibb child-file child)
40− ?: ?=(%| -.good-parsed) ~[['BAD valid child parse' |]]
41− ?: ?=(%| -.parent-parsed) ~[['BAD parent parse' |]]
42− ?: ?=(%| -.child-parsed) ~[['BAD child parse' |]]
43− =/ child-pair=(unit upair:jibb) (source-pair child-file child)
44− ?~ child-pair ~[['BAD child pair' |]]
45− =/ old=detailed-result (detailed child-file distinct ~)
46− =/ cache-controls=[rebuilt=? stale=? source-bound=?]
47− ?: ?=(%| -.old) [| | |]
48− =/ previous=ifile:jibb iface.p.old
49− =/ source-bound=?
50− ?~ source.previous |
51− ?~ graph.previous |
52− ?& =(at.previous child-file)
53− =(u.source.previous distinct)
54− (request-graph-reusable:jibb previous distinct ~ ~ ~ ~ ~ ~ ~)
55− !(request-graph-reusable:jibb previous child ~ ~ ~ ~ ~ ~ ~)
56− ==
57− =/ detached=ifile:jibb previous(graph ~)
58− =/ rebuilt=detailed-result
59− (infer-jibb-file-detailed:jibb root parent ~ ~ ~[[child-file child]] ~[root] ~ ~ ~[[child-file detached]] ~)
60− =/ stale=detailed-result
61− (infer-jibb-file-detailed:jibb root parent ~ ~ ~[[child-file child]] ~[root] ~ ~ ~[[child-file previous]] ~)
62− =/ rebuilt-ok=?
63− ?: ?=(%& -.rebuilt) |
64− ?~ overlap.p.rebuilt |
65− ?& =(file.u.overlap.p.rebuilt child-file)
66− =(source.u.overlap.p.rebuilt child)
67− =(name.u.overlap.p.rebuilt %child-bad)
68− =(cases.u.overlap.p.rebuilt u.child-pair)
69− ==
70− =/ stale-ok=?
71− ?: ?=(%& -.stale) |
72− &(=(message.p.stale 'cached module evidence needs unsupported inference') ?=(~ overlap.p.stale))
73− [rebuilt-ok stale-ok source-bound]
74− =/ middle=@t (of-wain:format ~['/= leaf /ui/leaf' '+$ okay @t'])
75− =/ leaf-file=path /ui/leaf/jibb
76− =/ middle-parsed (parse:jibb child-file middle)
77− =/ transitive=detailed-result
78− (infer-jibb-file-detailed:jibb root parent ~ ~ ~[[child-file middle] [leaf-file child]] ~[root] ~ ~ ~ ~)
79− =/ transitive-ok=?
80− ?: ?=(%| -.middle-parsed) |
81− ?: ?=(%& -.transitive) |
82− ?~ overlap.p.transitive |
83− ?& =(file.u.overlap.p.transitive leaf-file)
84− =(source.u.overlap.p.transitive child)
85− =(name.u.overlap.p.transitive %child-bad)
86− =(cases.u.overlap.p.transitive u.child-pair)
87− ==
88− =/ clean-failure
89− |= r=detailed-result
90− ^- ?
91− ?: ?=(%& -.r) |
92− &(!=(0 message.p.r) ?=(~ overlap.p.r))
93− =/ private-src=@t (of-wain:format ~['/= secret /lib/jibb/internal' '+$ good @t'])
94− =/ cycle-src=@t (of-wain:format ~['/= mine /ui/root' '+$ good @t'])
95− =/ private-parsed (parse:jibb root private-src)
96− =/ cycle-parsed (parse:jibb root cycle-src)
97− =/ private-result=detailed-result (detailed root private-src ~)
98− =/ cycle-result=detailed-result (detailed root cycle-src ~)
99− =/ duplicate-result=detailed-result (detailed root parent ~[[child-file child] [child-file child]])
100− =/ missing-result=detailed-result (detailed root parent ~)
101− :~ ['detached cache rebuild preserves child evidence' rebuilt.cache-controls]
102− ['mismatched graph cache declines without evidence' stale.cache-controls]
103− ['verified cache source binding' source-bound.cache-controls]
104− ['private import declines before source proof' &(?=(%& -.private-parsed) (failure-message private-result 'the prelude internal module is private'))]
105− ['active cycle declines before source proof' &(?=(%& -.cycle-parsed) (failure-message cycle-result (crip "import cycle at {(spud root)}")))]
106− ['duplicate child sources decline without evidence' (clean-failure duplicate-result)]
107− ['missing child source declines without evidence' (clean-failure missing-result)]
108− ['transitive import retains leaf source' transitive-ok]
109− ==
110−++ text
111− |= lines=wain
112− ^- @t
113− (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
114−++ output
115− |= [parent=@t child=@t distinct=@t]
116− ^- @t
117− =/ result=(list [@t ?]) (run parent child distinct)
118− (of-wain:format (turn result |=(entry=[@t ?] (crip "{(trip -.entry)}: {?:(+.entry "ok" "BAD")}"))))
119−++ test-full-overlap-graph
120− ^- tang
121− ?~ expected ~[leaf+"expected output missing"]
122− =/ actual=@t (output (text parent) (text child) (text distinct))
123− ?. =((to-wain:format (cat 3 actual '\0a')) expected)
124− ~[leaf+"full-module overlap output differs"]
125− ~
126−--
tests/lib/jibb-gate-free-guards.hoondeleted−79
@@ -1,79 +0,0 @@
1−:: Budgeted gate-free verdicts require a witness and an inhabited sibling.
2−/+ jibb
3−|%
4−++ gate-free-guard-errors
5− ^- (list tape)
6− =/ atom=itype:jibb [%atom %t]
7− =/ flag=itype:jibb [%flag ~]
8− =/ noun=itype:jibb [%noun ~]
9− =/ var=itype:jibb [%var 0]
10− =/ gate=itype:jibb [%fn atom atom]
11− =/ item=itype:jibb [%cell [%face %id [%atom %ud]] [%cell [%face %done flag] [%face %text atom]]]
12− =/ model=itype:jibb [%cell [%face %todos [%collection %list ~[item]]] [%cell [%face %draft atom] [%face %error [%union ~[[%const [%null %n 0 '~']] [%cell [%const [%null %n 0 '~']] [%face %u atom]]] ~ ~ ~]]]]
13− =/ with-callback=itype:jibb [%cell [%face %data atom] [%face %callback gate]]
14− =/ ask-like=itype:jibb [%union ~[[%cell [%const [%term %tas %pure '%pure']] [%face %value atom]] [%cell [%const [%term %tas %agent '%agent']] [%face %receive gate]]] ~ ~ ~]
15− =/ sub-like=itype:jibb [%union ~[[%cell [%const [%term %tas %watch '%watch']] [%face %request ask-like]] [%cell [%const [%term %tas %every '%every']] [%face %reply gate]]] ~ ~ ~]
16− =/ controls=(list [name=@t typ=itype:jibb fuel=@ud want=?(%yes %no %unknown)])
17− :~ ['atom' atom 8 %yes]
18− ['flag' flag 8 %yes]
19− ['atom variable' [%avar 0] 8 %yes]
20− ['open variable' var 8 %unknown]
21− ['noun' noun 8 %unknown]
22− ['raw gate' gate 8 %no]
23− ['data item' item 30 %yes]
24− ['todo model' model 100 %yes]
25− ['callback field' with-callback 30 %no]
26− ['ask receiver' ask-like 100 %no]
27− ['subscription receiver' sub-like 100 %no]
28− ['list of data items' [%collection %list ~[item]] 40 %yes]
29− ['list of gates' [%collection %list ~[gate]] 20 %no]
30− ['other collection' [%collection %map ~[atom atom]] 20 %unknown]
31− ['open list member' [%collection %list ~[var]] 20 %unknown]
32− ['known-inhabited noun after gate' [%cell gate noun] 30 %no]
33− ['known-inhabited noun before gate' [%cell noun gate] 30 %no]
34− ['unknown sibling after gate' [%cell gate var] 30 %unknown]
35− ['unknown sibling before gate' [%cell var gate] 30 %unknown]
36− ['nested unknown sibling' [%cell [%face %callback gate] [%face %other var]] 30 %unknown]
37− ['unknown union and gate union' [%union ~[var gate] ~ ~ ~] 30 %no]
38− ['empty union' [%union ~ ~ ~ ~] 30 %unknown]
39− ['validated jrec qath' [%jrec /lib/jibb/internal/jibb %qath ~ %i %ta %t] 30 %yes]
40− ['jrec gate sibling' [%cell gate [%jrec /lib/jibb/internal/jibb %qath ~ %i %ta %t]] 30 %no]
41− ['jrec list member' [%collection %list ~[[%jrec /lib/jibb/internal/jibb %qath ~ %i %ta %t]]] 30 %yes]
42− ['nominal recursion' [%recursive %sur %node ~] 30 %unknown]
43− ['unknown sibling budget' [%cell gate var] 2 %unknown]
44− ['known sibling budget' [%cell gate atom] 2 %unknown]
45− ['zero budget' atom 0 %unknown]
46− ['one atom budget' atom 1 %yes]
47− ['cell needs 3 visits' [%cell atom flag] 2 %unknown]
48− ['cell exact 3 visits' [%cell atom flag] 3 %yes]
49− ==
50− =/ errors=(list @t)
51− %+ turn controls
52− |= c=[name=@t typ=itype:jibb fuel=@ud want=?(%yes %no %unknown)]
53− =/ result=igate-free:jibb (gate-free-type:jibb typ.c fuel.c ~)
54− ?: =(want.c verdict.result) ''
55− (cat 3 name.c ': wrong verdict')
56− =/ a=igate-free:jibb (gate-free-type:jibb with-callback 30 ~)
57− =? errors !=(path.a `~[[%tail ~] [%field %callback]]) ['callback path incorrect' errors]
58− =/ b=igate-free:jibb (gate-free-type:jibb [%collection %list ~[gate]] 20 ~)
59− =? errors !=(path.b `~[[%item ~]]) ['list path incorrect' errors]
60− =/ c=igate-free:jibb (gate-free-type:jibb model 100 ~)
61− =? errors ?=(^ path.c) ['gate-free result carries witness path' errors]
62− :: The explicit budget is shared across the entire normalized type.
63− =/ deep
64− |= depth=@ud
65− ^- itype:jibb
66− =/ out=itype:jibb [%atom %t]
67− |-
68− ?: =(0 depth) out
69− $(depth (dec depth), out [%face %nested out])
70− =/ fits=igate-free:jibb (gate-free-type:jibb (deep 255) 256 ~)
71− =/ exceeds=igate-free:jibb (gate-free-type:jibb (deep 256) 256 ~)
72− =? errors !=(%yes verdict.fits) ['256 node budget rejected exact fit' errors]
73− =? errors !=(%unknown verdict.exceeds) ['257 node budget did not fail closed' errors]
74− =/ errors (skim errors |=(x=@t !=(x '')))
75− (turn errors trip)
76−++ test-gate-free-guards
77− ^- tang
78− (turn gate-free-guard-errors |=(reason=tape leaf+reason))
79−--
tests/lib/jibb-gate-free-source.hoondeleted−95
@@ -1,95 +0,0 @@
1−:: Source-backed mold analysis of the actual todo model; not island checking.
2−/+ jibb, jibb-import
3−/* prelude %jibb /lib/jibb/prelude/jibb
4−/* internal %jibb /lib/jibb/internal/jibb
5−/* sur %txt /tests/type-api-paths/todo-sur/txt
6−/* action %txt /tests/type-api-paths/todo-action/txt
7−/* todos %txt /tests/type-api-paths/todos/txt
8−/* update %txt /tests/type-api-paths/todo-update/txt
9−/* item %txt /tests/type-api-paths/todo-item/txt
10−/* api %txt /tests/type-api-paths/api/txt
11−/* source %txt /tests/type-gate-free/todo/txt
12−/* gate-source %txt /tests/type-gate-free/todo-gate/txt
13−/* noun-source %txt /tests/type-gate-free/todo-noun/txt
14−/* expected %txt /tests/type-gate-free/expected/txt
15−|%
16−++ text
17− |= lines=wain
18− ^- @t
19− (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
20−++ gate-free-source-report
21− |= [public=@t private=@t sur-text=@t action-text=@t todos-text=@t update-text=@t item-text=@t api-text=@t source-text=@t gate-text=@t noun-text=@t]
22− ^- @t
23− =/ prepared=(unit iprelude:jibb) (prepare-prelude-with-internal:jibb public private)
24− ?~ prepared 'prelude unavailable'
25− =/ todo=type -:(ride -:!>(..zuse) sur-text)
26− =/ subject=type [%cell [%face %todo todo] -:!>(..zuse)]
27− =/ ma=* (read-mark:jibb-import %todo-action -:(ride subject action-text))
28− =/ mt=* (read-mark:jibb-import %todos -:(ride subject todos-text))
29− =/ mu=* (read-mark:jibb-import %todo-update -:(ride subject update-text))
30− =/ mi=* (read-mark:jibb-import %todo-item -:(ride subject item-text))
31− =/ marks=imark-externals:jibb ~[[%todo-action ma] [%todos mt] [%todo-update mu] [%todo-item mi]]
32− =/ item-input=* (read-named:jibb-import %todo %item todo)
33− =/ inputs=iexternals:jibb ~[[%todo %item item-input]]
34− =/ modules=jbundle:jibb ~[[/ui/api/todo/jibb api-text]]
35− =/ at=path /ui/todo-list/jibb
36− =/ model (gate-free-mold-source:jibb at source-text %model inputs marks modules prepared 256)
37− ?: ?=(%| -.model) 'todo model unavailable'
38− ?. =(%yes verdict.result.p.model) 'todo model not proven gate-free'
39− ?. &(=(at.p.model at) =(source.p.model source-text) =(name.p.model %model) =(prepared.p.model u.prepared) =(externals.p.model inputs) =(marks.p.model marks) =(modules.p.model modules)) 'source evidence changed'
40− ?~ dependencies.p.model 'resolved dependency evidence missing'
41− ?. ?=(%cell -.typ.mold.p.model) 'selected model scheme missing'
42− ?. &(=(256 requested.p.model) =(256 budget.p.model)) 'requested budget not retained'
43− =/ callback (gate-free-mold-source:jibb at gate-text %model inputs marks modules prepared 256)
44− ?: ?=(%| -.callback) 'callback model unavailable'
45− ?. =(%no verdict.result.p.callback) 'callback was not found'
46− ?~ path.result.p.callback 'callback path missing'
47− ?. (lien u.path.result.p.callback |=(part=igf-segment:jibb ?=([%field %callback] part))) 'callback field not in witness'
48− =/ noun (gate-free-mold-source:jibb at noun-text %model inputs marks modules prepared 256)
49− ?: ?=(%| -.noun) 'noun model unavailable'
50− ?. =(%unknown verdict.result.p.noun) 'noun model not unknown'
51− =/ tiny=@t '+$ sample @t\0a'
52− =/ low (gate-free-mold-source:jibb /tests/tiny/jibb tiny %sample ~ ~ ~ prepared 0)
53− ?: ?=(%| -.low) 'zero fuel unavailable'
54− ?. &(=(%unknown verdict.result.p.low) =(0 budget.p.low)) 'zero fuel not unknown'
55− =/ capped (gate-free-mold-source:jibb /tests/tiny/jibb tiny %sample ~ ~ ~ prepared 999)
56− ?: ?=(%| -.capped) 'large fuel unavailable'
57− ?. &(=(999 requested.p.capped) =(256 budget.p.capped) =(%yes verdict.result.p.capped) =(255 left.result.p.capped)) 'fuel cap incorrect'
58− =/ matched (gate-free-mold-source:jibb /tests/tiny/jibb tiny %sample ~ ~ ~[[/tests/tiny/jibb tiny]] prepared 256)
59− ?: ?=(%| -.matched) 'matching root source rejected'
60− =/ unused-sur=@t '/- unused\0a+$ sample @t\0a'
61− =/ unused (gate-free-mold-source:jibb /tests/tiny/jibb unused-sur %sample ~ ~ ~ prepared 256)
62− ?: ?=(%| -.unused) 'unused sur source unexpectedly required'
63− =/ cycle-source=@t '/= child /tests/child\0a+$ sample @t\0a'
64− =/ child-source=@t '/= root /tests/tiny\0a+$ child @t\0a'
65− =/ cycle (gate-free-mold-source:jibb /tests/tiny/jibb cycle-source %sample ~ ~ ~[[/tests/child/jibb child-source]] prepared 256)
66− ?. ?=(%| -.cycle) 'root import cycle accepted'
67− =/ unprepared (gate-free-mold-source:jibb /tests/tiny/jibb tiny %sample ~ ~ ~ ~ 256)
68− ?. ?=(%| -.unprepared) 'missing prelude accepted'
69− =/ cases=(list [name=@t path=path src=@t mold=term external=iexternals:jibb mark=imark-externals:jibb bundle=jbundle:jibb])
70− :~ ['missing mold' at source-text %missing inputs marks modules]
71− ['missing API' at source-text %model inputs marks ~]
72− ['missing mark' at source-text %model inputs (skim marks |=(m=[mark=term result=*] !=(%todo-update mark.m))) modules]
73− ['root mismatch' at source-text %model inputs marks [[at gate-text] modules]]
74− ['duplicate root' at source-text %model inputs marks [[at source-text] [at source-text] modules]]
75− ['duplicate field' at (cat 3 source-text '\0a+$ duplicate [x=@t x=@p]\0a') %model inputs marks modules]
76− ['invalid syntax' at '++ incomplete |=' %model inputs marks modules]
77− ['private root' /lib/jibb/internal/jibb source-text %model inputs marks modules]
78− ['API root' /ui/api/todo/jibb source-text %model inputs marks modules]
79− ['store root poke' /ui/stores/cart/jibb '+$ poke @t\0a' %poke ~ ~ ~]
80− ==
81− =/ errors=(list @t)
82− %+ turn cases
83− |= c=[name=@t path=path src=@t mold=term external=iexternals:jibb mark=imark-externals:jibb bundle=jbundle:jibb]
84− =/ got (gate-free-mold-source:jibb path.c src.c mold.c external.c mark.c bundle.c prepared 256)
85− ?: ?=(%| -.got) ''
86− (cat 3 name.c ': unexpectedly succeeded')
87− =/ errors (skim errors |=(x=@t !=(x '')))
88− ?^ errors (of-wain:format errors)
89− 'todo model: gate-free\0acallback model: gate at callback\0anoun model: unknown\0azero fuel: unknown\0aoversized fuel: capped\0ainvalid inputs: rejected\0asource evidence: retained\0amatching root and unused sur: accepted\0aroot import cycle: rejected'
90−++ test-gate-free-source
91− ^- tang
92− =/ actual (gate-free-source-report prelude internal (text sur) (text action) (text todos) (text update) (text item) (text api) (text source) (text gate-source) (text noun-source))
93− ?. =((to-wain:format (cat 3 actual '\0a')) expected) ~[leaf+"gate-free mold report differs from expected"]
94− ~
95−--
tests/lib/jibb-generic-construction.hoondeleted−141
@@ -1,141 +0,0 @@
1−:: Source-proven generic tree construction; not a backend/runtime test.
2−/+ jibb
3−/* real-prelude %jibb /lib/jibb/prelude/jibb
4−/* real-internal %jibb /lib/jibb/internal/jibb
5−/* tree %txt /tests/type-generic-construction/tree/txt
6−/* alias %txt /tests/type-generic-construction/alias/txt
7−/* client %txt /tests/type-generic-construction/client/txt
8−/* alias-client %txt /tests/type-generic-construction/alias-client/txt
9−/* tree-no-event %txt /tests/type-generic-construction/tree-no-event/txt
10−/* no-event-client %txt /tests/type-generic-construction/no-event-client/txt
11−/* owner-positive %txt /tests/type-generic-construction/owner-positive/txt
12−/* owner-negative %txt /tests/type-generic-construction/owner-negative/txt
13−/* sibling-values %txt /tests/type-generic-construction/sibling-values/txt
14−/* expected %txt /tests/type-generic-construction/expected/txt
15−|%
16−++ text
17− |= lines=wain
18− ^- @t
19− (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
20−++ line
21− |= [label=@t ok=?]
22− ^- @t
23− (crip "{(trip label)}: {?:(ok "ok" "BAD")}")
24−++ construction-output
25− |= [pre=@t internal=@t tree=@t alias=@t client=@t alias-client=@t tree-no-event=@t no-event-client=@t owner-positive=@t owner-negative=@t sibling-values=@t]
26− ^- @t
27− =/ prep=(unit iprelude:jibb) (prepare-prelude-with-internal:jibb pre internal)
28− ?~ prep 'BAD prelude preparation'
29− :: Complete owner is checked by the real source interface, not this unit state.
30− =/ owner=jfile-result:jibb
31− (infer-jibb-file:jibb /ui/tree/jibb owner-positive ~ ~ ~ ~[/ui/tree/jibb] values.u.prep molds.u.prep ~ `iface.u.prep)
32− ?: ?=(%| -.owner) 'BAD valid owner'
33− =/ bad-owner=jfile-result:jibb
34− (infer-jibb-file:jibb /ui/tree/jibb owner-negative ~ ~ ~ ~[/ui/tree/jibb] values.u.prep molds.u.prep ~ `iface.u.prep)
35− =/ bad-parse=(each module:jibb error:jibb) (parse:jibb /ui/tree/jibb owner-negative)
36− =/ mold=(unit ischeme:jibb) (find-jibb-mold:jibb %node-tree iface.p.owner)
37− ?~ mold 'BAD owner mold'
38− ?. ?=(%grec -.typ.u.mold) 'BAD nominal owner'
39− =/ generic=itype:jibb typ.u.mold(args ~[[%var 42]])
40− =/ target=itype:jibb typ.u.mold(args ~[[%atom %t]])
41− ?> ?=(%grec -.generic)
42− ?> ?=(%grec -.target)
43− =/ owner-leaf=(unit ischeme:jibb) (ienv-lookup:jibb %made-leaf values.iface.p.owner)
44− =/ owner-node=(unit ischeme:jibb) (ienv-lookup:jibb %made-node values.iface.p.owner)
45− =/ leaf-ok=? ?~(owner-leaf | &(?=(~ vars.u.owner-leaf) =(target typ.u.owner-leaf)))
46− =/ node-ok=? ?~(owner-node | &(?=(~ vars.u.owner-node) =(target typ.u.owner-node)))
47− =/ foreign=itype:jibb target(at /ui/foreign/jibb)
48− =/ view=(unit [view=itype:jibb left=@ud]) (grec-unfold-view:jibb generic 2)
49− ?~ view 'BAD generic view'
50− =/ target-view=(unit [view=itype:jibb left=@ud]) (grec-unfold-view:jibb target 2)
51− ?~ target-view 'BAD target view'
52− =/ expected-leaf=itype:jibb [%cell [%const [%term %tas %text '%text']] [%face %value [%atom %t]]]
53− =/ expected-node=itype:jibb [%cell [%const [%term %tas %node '%node']] [%cell [%face %event [%fn [%atom %t] [%var 42]]] [%face %children [%collection %list ~[generic]]]]]
54− =/ expected-view=itype:jibb [%union ~[expected-leaf expected-node] ~ ~ ~]
55− =/ wrong-view=(unit [view=itype:jibb left=@ud]) (grec-unfold-view:jibb foreign 2)
56− =/ malformed=shape:jibb *shape:jibb
57− =/ parsed=(each module:jibb error:jibb) (parse:jibb /tests/tree/values/jibb sibling-values)
58− ?: ?=(%| -.parsed) 'BAD values parse'
59− =/ ds=(list def:jibb) defs.p.parsed
60− ?. ?=([* [* [* [* ~]]]] ds) 'BAD values count'
61− =/ a=def:jibb i.ds
62− =/ b=def:jibb i.t.ds
63− =/ c=def:jibb i.t.t.ds
64− =/ d=def:jibb i.t.t.t.ds
65− ?. &(?=(%value -.a) ?=(%value -.b) ?=(%value -.c) ?=(%value -.d)) 'BAD value declarations'
66− =/ env=ienv:jibb ~[[%text-event [[%fn [%atom %t] [%atom %t]] ~]]]
67− =/ tag=ipending:jibb [100 [%term %tas %unrelated '%unrelated']]
68− =/ projection=iwprojection:jibb *iwprojection:jibb
69− =/ st=istate:jibb *istate:jibb
70− =. st st(next 201, prelude `iface.u.prep, tags ~[tag], holes ~[[99 (span-of:jibb val.a)]], projections ~[projection])
71− =/ r0=iresult:jibb (infer-call-context-arg:jibb val.a target env st(jrec-fuel 0) (span-of:jibb val.a))
72− =/ r1=iresult:jibb (infer-call-context-arg:jibb val.a target env st(jrec-fuel 1) (span-of:jibb val.a))
73− =/ rnode=iresult:jibb (infer-call-context-arg:jibb val.b target env st(jrec-fuel 1) (span-of:jibb val.b))
74− =/ short=iresult:jibb (infer-call-context-arg:jibb val.c target env st(jrec-fuel 1) (span-of:jibb val.c))
75− =/ nested=iresult:jibb (infer-call-context-arg:jibb val.c target env st(jrec-fuel 2) (span-of:jibb val.c))
76− =/ sibling-short=iresult:jibb (infer-call-context-arg:jibb val.d target env st(jrec-fuel 2) (span-of:jibb val.d))
77− =/ siblings=iresult:jibb (infer-call-context-arg:jibb val.d target env st(jrec-fuel 3) (span-of:jibb val.d))
78− =/ retry=iresult:jibb (infer-call-context-arg:jibb val.a target env st(jrec-fuel 1) (span-of:jibb val.a))
79− =/ failed-retry=iresult:jibb (infer-call-context-arg:jibb val.a target env st(jrec-fuel 0) (span-of:jibb val.a))
80− =/ rvar=iresult:jibb (infer-call-context-arg:jibb val.b generic env st(jrec-fuel 1) (span-of:jibb val.b))
81− =/ hidden=istate:jibb st(sub ~[[200 target]], jrec-fuel 2)
82− =/ rhidden=iresult:jibb (infer-call-context-arg:jibb val.a [%var 200] env hidden (span-of:jibb val.a))
83− =/ hidden-safe=?
84− ?: ?=(%| -.rhidden) &
85− =/ fit=ifit:jibb (itype-fit:jibb typ.p.rhidden [%var 200] sub.state.p.rhidden next.state.p.rhidden)
86− ?=(%unknown -.fit)
87− =/ exact=isub:jibb (turn (gulf 1 4.096) |=(n=@ud [(add 1.000 n) [%atom %t]]))
88− =/ over=isub:jibb [[9.999 [%atom %t]] exact]
89− =/ face-exact=isub:jibb (turn (gulf 1 4.095) |=(n=@ud [(add 1.000 n) [%atom %t]]))
90− =/ checks=(list [label=@t ok=?])
91− :~ ['complete owner' ?=(%& -.owner)]
92− ['owner exports constructed nominal values' &(leaf-ok node-ok)]
93− ['invalid owner declined' &(?=(%& -.bad-parse) ?=(%| -.bad-owner))]
94− ['view spends one step' =(1 left.u.view)]
95− ['view retains argument and child identity' =(expected-view view.u.view)]
96− ['zero view fuel declined' ?=(~ (grec-unfold-view:jibb generic 0))]
97− ['malformed proof declined' ?=(~ (grec-unfold-view:jibb generic(proof malformed) 2))]
98− ['foreign recursive tail retained' ?:(?=(~ wrong-view) | !=(view.u.wrong-view view.u.target-view))]
99− ['zero inference fuel declined' ?=(%| -.r0)]
100− ['one-step leaf retains nominal identity' ?:(?=(%& -.r1) &(=(target typ.p.r1) =(0 jrec-fuel.state.p.r1)) |)]
101− ['one-step node succeeds' ?:(?=(%& -.rnode) &(=(target typ.p.rnode) =(0 jrec-fuel.state.p.rnode)) |)]
102− ['nested one-step declined' ?=(%| -.short)]
103− ['nested two-step succeeds' ?:(?=(%& -.nested) &(=(target typ.p.nested) =(0 jrec-fuel.state.p.nested)) |)]
104− ['siblings share fuel' &(?=(%| -.sibling-short) ?:(?=(%& -.siblings) =(0 jrec-fuel.state.p.siblings) |))]
105− ['same-state retry agrees' =(r1 retry)]
106− ['failed retry agrees' =(r0 failed-retry)]
107− ['argument binding retains source identity' ?:(?=(%& -.rvar) =(target (itype-normalize:jibb typ.p.rvar sub.state.p.rvar)) |)]
108− ['pending tag retained' ?:(?=(%& -.r1) (lien tags.state.p.r1 |=(entry=ipending:jibb =(entry tag))) |)]
109− ['pending hole retained' ?:(?=(%& -.r1) =(holes.st holes.state.p.r1) |)]
110− ['projection evidence retained' ?:(?=(%& -.r1) =(projections.st projections.state.p.r1) |)]
111− ['hidden variable declined' hidden-safe]
112− ['scan exact limit' (grec-direct-context:jibb target exact)]
113− ['scan over limit declined' !(grec-direct-context:jibb target over)]
114− ['faced scan exact limit' (grec-direct-context:jibb [%face %field target] face-exact)]
115− ['faced scan over limit declined' !(grec-direct-context:jibb [%face %field target] exact)]
116− ['structural substitution declined' !(grec-direct-context:jibb target ~[[9 [%cell [%atom %t] [%atom %t]]]])]
117− ==
118− =/ modules=jbundle:jibb ~[[/ui/tree/jibb tree] [/ui/tree-two/jibb tree] [/ui/tree-alias/jibb alias]]
119− =/ small=jbundle:jibb ~[[/ui/tree/jibb tree-no-event] [/ui/tree-two/jibb tree-no-event]]
120− =/ report=@t (golden-types-with-prepared-prelude:jibb /tests/tree/client/jibb client ~ ~ modules prep)
121− =/ aliases=@t (golden-types-with-prepared-prelude:jibb /tests/tree/alias-client/jibb alias-client ~ ~ modules prep)
122− =/ no-event=@t (golden-types-with-prepared-prelude:jibb /tests/tree/no-event-client/jibb no-event-client ~ ~ small prep)
123− (cat 3 (of-wain:format (turn checks line)) (cat 3 '\0a' (cat 3 report (cat 3 '\0a' (cat 3 aliases (cat 3 '\0a' no-event))))))
124−++ test-generic-construction
125− ^- tang
126− ?~ tree ~[leaf+"tree source missing"]
127− ?~ alias ~[leaf+"alias source missing"]
128− ?~ client ~[leaf+"client source missing"]
129− ?~ alias-client ~[leaf+"alias client missing"]
130− ?~ tree-no-event ~[leaf+"tree without event missing"]
131− ?~ no-event-client ~[leaf+"no-event client missing"]
132− ?~ owner-positive ~[leaf+"owner source missing"]
133− ?~ owner-negative ~[leaf+"invalid owner source missing"]
134− ?~ sibling-values ~[leaf+"sibling source missing"]
135− ?~ expected ~[leaf+"expected output missing"]
136− =/ actual=@t
137− (construction-output real-prelude real-internal (text tree) (text alias) (text client) (text alias-client) (text tree-no-event) (text no-event-client) (text owner-positive) (text owner-negative) (text sibling-values))
138− ?. =((to-wain:format (cat 3 actual '\0a')) expected)
139− ~[leaf+"generic construction output differs from expected"]
140− ~
141−--
tests/lib/jibb-generic-pattern.hoondeleted−165
@@ -1,165 +0,0 @@
1−:: Source-proven generic recursive patterns; no backend/runtime claim.
2−/+ jibb
3−/* real-prelude %jibb /lib/jibb/prelude/jibb
4−/* real-internal %jibb /lib/jibb/internal/jibb
5−/* tree %txt /tests/type-generic-construction/tree/txt
6−/* alias %txt /tests/type-generic-construction/alias/txt
7−/* tree-no-event %txt /tests/type-generic-construction/tree-no-event/txt
8−/* client %txt /tests/type-generic-pattern/client/txt
9−/* no-event %txt /tests/type-generic-pattern/no-event/txt
10−/* values %txt /tests/type-generic-pattern/values/txt
11−/* poly-values %txt /tests/type-generic-pattern/poly-values/txt
12−/* owner %txt /tests/type-generic-pattern/owner/txt
13−/* owner-bad %txt /tests/type-generic-pattern/owner-bad/txt
14−/* expected %txt /tests/type-generic-pattern/expected/txt
15−|%
16−++ text
17− |= lines=wain
18− ^- @t
19− (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
20−++ line
21− |= [label=@t ok=?]
22− ^- @t
23− (crip "{(trip label)}: {?:(ok "ok" "BAD")}")
24−++ pattern-output
25− |= [pre=@t internal=@t tree=@t alias=@t tree-no-event=@t client=@t no-event=@t values=@t poly-values=@t owner=@t owner-bad=@t]
26− ^- @t
27− =/ prep=(unit iprelude:jibb) (prepare-prelude-with-internal:jibb pre internal)
28− ?~ prep 'BAD prelude preparation'
29− =/ checked=jfile-result:jibb
30− (infer-jibb-file:jibb /ui/tree/jibb owner ~ ~ ~ ~[/ui/tree/jibb] values.u.prep molds.u.prep ~ `iface.u.prep)
31− ?: ?=(%| -.checked) 'BAD valid owner'
32− =/ bad-parse=(each module:jibb error:jibb) (parse:jibb /ui/tree/jibb owner-bad)
33− =/ bad=jfile-result:jibb
34− (infer-jibb-file:jibb /ui/tree/jibb owner-bad ~ ~ ~ ~[/ui/tree/jibb] values.u.prep molds.u.prep ~ `iface.u.prep)
35− =/ mold=(unit ischeme:jibb) (find-jibb-mold:jibb %node-tree iface.p.checked)
36− ?~ mold 'BAD owner mold'
37− ?. ?=(%grec -.typ.u.mold) 'BAD nominal owner'
38− =/ target=itype:jibb typ.u.mold(args ~[[%atom %t]])
39− =/ generic=itype:jibb typ.u.mold(args ~[[%var 42]])
40− ?> ?=(%grec -.target)
41− ?> ?=(%grec -.generic)
42− =/ desc=(unit ischeme:jibb) (ienv-lookup:jibb %describe values.iface.p.checked)
43− =/ children=(unit ischeme:jibb) (ienv-lookup:jibb %children values.iface.p.checked)
44− =/ rebuild=(unit ischeme:jibb) (ienv-lookup:jibb %rebuild values.iface.p.checked)
45− ?~ desc 'BAD owner describe missing'
46− ?~ children 'BAD owner children missing'
47− ?~ rebuild 'BAD owner rebuild missing'
48− ?. &(?=(%fn -.typ.u.desc) ?=(%fn -.typ.u.children) ?=(%fn -.typ.u.rebuild)) 'BAD owner gate types'
49− ?. ?=([@ ~] vars.u.children) 'BAD owner children quantification'
50− =/ desc-sample=itype:jibb sample.typ.u.desc
51− =/ children-sample=itype:jibb sample.typ.u.children
52− =/ rebuild-sample=itype:jibb sample.typ.u.rebuild
53− =? desc-sample ?=(%face -.desc-sample) body.desc-sample
54− =? children-sample ?=(%face -.children-sample) body.children-sample
55− =? rebuild-sample ?=(%face -.rebuild-sample) body.rebuild-sample
56− =/ quantified=itype:jibb typ.u.mold(args ~[[%var i.vars.u.children]])
57− =/ parsed=(each module:jibb error:jibb) (parse:jibb /tests/tree/values/jibb values)
58− ?: ?=(%| -.parsed) 'BAD values parse'
59− =/ ds=(list def:jibb) defs.p.parsed
60− ?. ?=([* [* [* [* [* ~]]]]] ds) 'BAD value count'
61− =/ a=def:jibb i.ds
62− =/ b=def:jibb i.t.ds
63− ?. &(?=(%value -.a) ?=(%value -.b)) 'BAD value declarations'
64− =/ c=def:jibb i.t.t.ds
65− =/ d=def:jibb i.t.t.t.ds
66− =/ e=def:jibb i.t.t.t.t.ds
67− ?. &(?=(%value -.c) ?=(%value -.d) ?=(%value -.e)) 'BAD extra value declarations'
68− ?. &(?=(%branch -.val.c) ?=(%branch -.val.d) ?=(%branch -.val.e)) 'BAD extra branches'
69− ?. ?=([* *] arms.val.c) 'BAD fallback arms'
70− =/ sample-arm=arm:jibb i.arms.val.c
71− =/ parsed-poly=(each module:jibb error:jibb) (parse:jibb /tests/tree/poly/jibb poly-values)
72− ?: ?=(%| -.parsed-poly) 'BAD polymorphic values parse'
73− =/ ps=(list def:jibb) defs.p.parsed-poly
74− ?. ?=([* ~] ps) 'BAD polymorphic value count'
75− =/ p=def:jibb i.ps
76− ?. ?=(%value -.p) 'BAD polymorphic value'
77− ?. ?=(%branch -.val.p) 'BAD polymorphic branch'
78− =/ env=ienv:jibb ~[[%x [target ~]]]
79− =/ poly=ienv:jibb ~[[%x [generic ~[42]]]]
80− =/ tag=ipending:jibb [100 [%term %tas %unrelated '%unrelated']]
81− =/ projection=iwprojection:jibb *iwprojection:jibb
82− =/ st=istate:jibb *istate:jibb
83− =. st st(next 201, prelude `iface.u.prep, tags ~[tag], holes ~[[99 (span-of:jibb val.a)]], projections ~[projection])
84− =/ zero=iresult:jibb (infer-fragment:jibb val.a env st(jrec-fuel 0))
85− =/ one=iresult:jibb (infer-fragment:jibb val.a env st(jrec-fuel 1))
86− =/ short=iresult:jibb (infer-fragment:jibb val.b env st(jrec-fuel 1))
87− =/ nested=iresult:jibb (infer-fragment:jibb val.b env st(jrec-fuel 2))
88− =/ retry=iresult:jibb (infer-fragment:jibb val.a env st(jrec-fuel 1))
89− =/ hidden=ienv:jibb ~[[%x [[%var 200] ~]]]
90− =/ hidden-result=iresult:jibb (infer-fragment:jibb val.a hidden st(sub ~[[200 target]], jrec-fuel 2))
91− =/ first=(unit iresult:jibb) (grec-single-wing-subject:jibb subject.val.p poly st(jrec-fuel 4))
92− =/ second=(unit iresult:jibb) (grec-single-wing-subject:jibb subject.val.p poly st(next 202, jrec-fuel 4))
93− ?~ first 'BAD first scheme lookup'
94− ?~ second 'BAD second scheme lookup'
95− ?. &(?=(%& -.u.first) ?=(%& -.u.second)) 'BAD scheme inference'
96− =/ ft=itype:jibb typ.p.u.first
97− =/ stype=itype:jibb typ.p.u.second
98− ?. &(?=(%grec -.ft) ?=(%grec -.stype)) 'BAD scheme nominal identity'
99− ?. &(?=([* ~] args.ft) ?=([* ~] args.stype)) 'BAD scheme argument count'
100− =/ pmissing=iresult:jibb (infer-fragment:jibb val.p poly st(jrec-fuel 4))
101− =/ view=(unit [view=itype:jibb left=@ud]) (grec-unfold-view:jibb target 1)
102− ?~ view 'BAD recursive view'
103− =/ many=(list arm:jibb)
104− =/ n=@ud 128
105− =/ out=(list arm:jibb) ~
106− |-
107− ?: =(0 n) out
108− $(n (dec n), out [sample-arm out])
109− =/ in-view=iresult:jibb [%& target st(jrec-fuel 1)]
110− =/ exact=expr:jibb val.c(arms many)
111− =/ over=expr:jibb val.c(arms [sample-arm many])
112− =/ rexact=iresult:jibb (grec-match-view:jibb exact in-view)
113− =/ rover=iresult:jibb (grec-match-view:jibb over in-view)
114− =/ hidden-view=iresult:jibb [%& [%var 200] st(sub ~[[200 target]], jrec-fuel 1)]
115− =/ rhidden-view=iresult:jibb (grec-match-view:jibb exact hidden-view)
116− =/ fallback=iresult:jibb (infer-fragment:jibb val.c env st(jrec-fuel 1))
117− =/ checks=(list [label=@t ok=?])
118− :~ ['owner describe has nominal sample and text result' &(=(target desc-sample) =([%atom %t] product.typ.u.desc))]
119− ['owner rebuild preserves nominal identity' &(=(target rebuild-sample) =(target product.typ.u.rebuild))]
120− ['owner children preserves quantified recursive identity' &(=(quantified children-sample) =([%collection %list ~[quantified]] product.typ.u.children))]
121− ['invalid owner parses and is rejected' &(?=(%& -.bad-parse) ?=(%| -.bad))]
122− ['zero fuel declined' ?=(%| -.zero)]
123− ['one-step match' ?:(?=(%& -.one) &(=([%atom %t] typ.p.one) =(0 jrec-fuel.state.p.one)) |)]
124− ['nested match requires two steps' &(?=(%| -.short) ?:(?=(%& -.nested) =(0 jrec-fuel.state.p.nested) |))]
125− ['same-state retry agrees' =(one retry)]
126− ['pending tag retained' ?:(?=(%& -.one) (lien tags.state.p.one |=(entry=ipending:jibb =(entry tag))) |)]
127− ['pending hole retained' ?:(?=(%& -.one) =(holes.st holes.state.p.one) |)]
128− ['projection evidence retained' ?:(?=(%& -.one) =(projections.st projections.state.p.one) |)]
129− ['raw bound variable declined' ?=(%| -.hidden-result)]
130− ['polymorphic scheme gets fresh identities' &(=([%var 201] i.args.ft) =([%var 202] i.args.stype) =(at.ft at.stype) =(name.ft name.stype) =(proof.ft proof.stype))]
131− ['polymorphic missing arm declined' ?=(%| -.pmissing)]
132− ['catch-all eligible' (grec-patterns-eligible:jibb arms.val.c view.u.view 128)]
133− ['whole binder stays unsupported' !(grec-patterns-eligible:jibb arms.val.d view.u.view 128)]
134− ['whole structural tail stays unsupported' !(grec-patterns-eligible:jibb arms.val.e view.u.view 128)]
135− ['128 arms eligible' (grec-patterns-eligible:jibb many view.u.view 128)]
136− ['129 arms declined' !(grec-patterns-eligible:jibb [sample-arm many] view.u.view 128)]
137− ['zero arm budget declined' !(grec-patterns-eligible:jibb ~[sample-arm] view.u.view 0)]
138− ['128-arm view consumes one step' ?:(?=(%& -.rexact) &(?=(%union -.typ.p.rexact) =(0 jrec-fuel.state.p.rexact)) |)]
139− ['129-arm view rolls back' =(in-view rover)]
140− ['hidden view stays nominally unknown' =(hidden-view rhidden-view)]
141− ['catch-all keeps fuel and pending state' ?:(?=(%& -.fallback) &(=(0 jrec-fuel.state.p.fallback) =(holes.st holes.state.p.fallback) =(projections.st projections.state.p.fallback) (lien tags.state.p.fallback |=(entry=ipending:jibb =(entry tag)))) |)]
142− ==
143− =/ modules=jbundle:jibb ~[[/ui/tree/jibb tree] [/ui/tree-two/jibb tree] [/ui/tree-alias/jibb alias]]
144− =/ small=jbundle:jibb ~[[/ui/tree/jibb tree-no-event]]
145− =/ report=@t (golden-types-with-prepared-prelude:jibb /tests/tree/client/jibb client ~ ~ modules prep)
146− =/ noreport=@t (golden-types-with-prepared-prelude:jibb /tests/tree/no-event/jibb no-event ~ ~ small prep)
147− (cat 3 (of-wain:format (turn checks line)) (cat 3 '\0a' (cat 3 report (cat 3 '\0a' noreport))))
148−++ test-generic-pattern
149− ^- tang
150− ?~ tree ~[leaf+"tree source missing"]
151− ?~ alias ~[leaf+"alias source missing"]
152− ?~ tree-no-event ~[leaf+"tree without event missing"]
153− ?~ client ~[leaf+"client source missing"]
154− ?~ no-event ~[leaf+"no-event client missing"]
155− ?~ values ~[leaf+"values source missing"]
156− ?~ poly-values ~[leaf+"polymorphic values source missing"]
157− ?~ owner ~[leaf+"owner source missing"]
158− ?~ owner-bad ~[leaf+"invalid owner source missing"]
159− ?~ expected ~[leaf+"expected output missing"]
160− =/ actual=@t
161− (pattern-output real-prelude real-internal (text tree) (text alias) (text tree-no-event) (text client) (text no-event) (text values) (text poly-values) (text owner) (text owner-bad))
162− ?. =((to-wain:format (cat 3 actual '\0a')) expected)
163− ~[leaf+"generic pattern output differs from expected"]
164− ~
165−--
tests/lib/jibb-generic-recursion.hoondeleted−170
@@ -1,170 +0,0 @@
1−:: Source-backed recursive identities; this is not the runtime UI element model.
2−/+ jibb
3−/* real-prelude %jibb /lib/jibb/prelude/jibb
4−/* real-internal %jibb /lib/jibb/internal/jibb
5−/* tree %txt /tests/type-generic-recursion/tree/txt
6−/* changed %txt /tests/type-generic-recursion/tree-changed/txt
7−/* alias %txt /tests/type-generic-recursion/alias/txt
8−/* client %txt /tests/type-generic-recursion/client/txt
9−/* bad-mold %txt /tests/type-generic-recursion/bad-mold/txt
10−/* bad-constructor %txt /tests/type-generic-recursion/bad-constructor/txt
11−/* bad-parameter %txt /tests/type-generic-recursion/bad-parameter/txt
12−/* local-shadow %txt /tests/type-generic-recursion/local-shadow/txt
13−/* local-distinct %txt /tests/type-generic-recursion/local-distinct/txt
14−/* local-only %txt /tests/type-generic-recursion/local-only/txt
15−/* list-shadow %txt /tests/type-generic-recursion/list-shadow/txt
16−/* chain %txt /tests/type-generic-recursion/chain/txt
17−/* bad-match %txt /tests/type-generic-recursion/bad-match/txt
18−/* expected %txt /tests/type-generic-recursion/expected/txt
19−|%
20−++ text
21− |= lines=wain
22− ^- @t
23− (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
24−++ altered-list-source
25− |= pre=@t
26− ^- (unit @t)
27− =/ lines=wain (to-wain:format pre)
28− =/ old=@t ' [i=A t=(list A)]'
29− =/ matches=(list @t) (skim lines |=(line=@t =(line old)))
30− ?. =(1 (lent matches)) ~
31− =/ changed=wain (turn lines |=(line=@t ?:(=(line old) ' [i=@t t=(list A)]' line)))
32− `(text changed)
33−++ result-line
34− |= [label=@t ok=?]
35− ^- @t
36− (crip "{(trip label)}: {?:(ok "ok" "BAD")}")
37−++ generic-output
38− |= [pre=@t internal=@t tree=@t changed=@t alias=@t client=@t invalid=(list [label=@t src=@t]) shadow=@t chain=@t]
39− ^- @t
40− =/ prep=(unit iprelude:jibb) (prepare-prelude-with-internal:jibb pre internal)
41− ?~ prep 'BAD prelude preparation'
42− =/ module=jfile-result:jibb
43− (infer-jibb-file:jibb /ui/tree/jibb tree ~ ~ ~ ~[/ui/tree/jibb] values.u.prep molds.u.prep ~ `iface.u.prep)
44− ?: ?=(%| -.module) (cat 3 'BAD recursive module: ' p.module)
45− =/ scheme=(unit ischeme:jibb) (find-jibb-mold:jibb %node-tree iface.p.module)
46− ?~ scheme 'BAD missing recursive mold'
47− ?. ?=(%grec -.typ.u.scheme) 'BAD missing recursive identity'
48− =/ typ=itype:jibb typ.u.scheme
49− ?> ?=(%grec -.typ)
50− =/ t=itype:jibb typ(args ~[[%atom %t]])
51− ?> ?=(%grec -.t)
52− =/ p=itype:jibb typ(args ~[[%atom %p]])
53− =/ variable=itype:jibb typ(args ~[[%var 91]])
54− =/ other=itype:jibb t(at /ui/other/jibb)
55− =/ numeric=itype:jibb [%cell t [%nvar 99]]
56− =/ chain-parsed=(each module:jibb error:jibb) (parse:jibb /ui/tree/jibb chain)
57− ?: ?=(%| -.chain-parsed) 'BAD chain source parse'
58− =/ chain-molds=imolds:jibb (collect-simple-molds:jibb defs.p.chain-parsed)
59− =/ chain-shape=(unit shape:jibb) (find-simple-mold:jibb %chain chain-molds)
60− ?~ chain-shape 'BAD chain source mold'
61− =/ no-index=istate:jibb *istate:jibb
62− =. no-index no-index(at /ui/tree/jibb, molds chain-molds, top-molds ~[%chain], prelude `iface.u.prep)
63− =/ checks=(list [label=@t ok=?])
64− :~ ['source module complete' ?=([%& *] module)]
65− ['generic mold quantified' =(1 (lent vars.u.scheme))]
66− ['distinct arguments decline' ?=(~ (itype-unify:jibb t p ~))]
67− ['distinct origins decline' ?=(~ (itype-unify:jibb t other ~))]
68− ['occurs check' ?=(~ (itype-unify:jibb [%var 91] variable ~))]
69− ['cell construction stays opaque' =(%unknown -:(itype-fit:jibb [%cell [%atom %tas] [%atom %t]] t ~ 0))]
70− ['noun construction stays opaque' =(%unknown -:(itype-fit:jibb [%noun ~] t ~ 0))]
71− ['unindexed recursion declined' ?=(~ (simple-source-generic-recursive:jibb %chain u.chain-shape ~[[%atom %t]] no-index))]
72− ['alteration rejects missing line' ?=(~ (altered-list-source 'absent'))]
73− ['alteration rejects repeated line' ?=(~ (altered-list-source (text ~[' [i=A t=(list A)]' ' [i=A t=(list A)]'])))]
74− ['gate freedom unknown' =(%unknown verdict:(gate-free-type:jibb t 64 ~))]
75− ['gate defaulting conservative' &((itype-has-gate:jibb t) =(numeric (default-decimals:jibb numeric)))]
76− ==
77− =/ invalid-lines=(list @t)
78− %+ turn invalid
79− |= c=[label=@t src=@t]
80− =/ parsed=(each module:jibb error:jibb) (parse:jibb /ui/tree/jibb src.c)
81− =/ r=jfile-result:jibb
82− (infer-jibb-file:jibb /ui/tree/jibb src.c ~ ~ ~ ~[/ui/tree/jibb] values.u.prep molds.u.prep ~ `iface.u.prep)
83− (result-line label.c &(?=(%& -.parsed) ?=(%| -.r)))
84− =/ shadow-result=jfile-result:jibb
85− (infer-jibb-file:jibb /ui/tree/jibb shadow ~ ~ ~ ~[/ui/tree/jibb] values.u.prep ~ ~ `iface.u.prep)
86− =/ altered-source=(unit @t) (altered-list-source pre)
87− ?~ altered-source 'BAD canonical list source was missing or repeated'
88− =/ altered=@t u.altered-source
89− =/ altered-prep=(unit iprelude:jibb) (prepare-prelude-with-internal:jibb altered internal)
90− =/ altered-result=jfile-result:jibb
91− ?~ altered-prep [%| 'altered prelude unavailable']
92− (infer-jibb-file:jibb /ui/tree/jibb tree ~ ~ ~ ~[/ui/tree/jibb] values.u.altered-prep molds.u.altered-prep ~ `iface.u.altered-prep)
93− =/ parsed=(each module:jibb error:jibb) (parse:jibb /tests/tree/client/jibb client)
94− ?: ?=(%| -.parsed) 'BAD client parse'
95− =/ modules=jbundle:jibb ~[[/ui/tree/jibb tree] [/ui/tree-two/jibb tree] [/ui/tree-alias/jibb alias]]
96− =/ first=jimports-result:jibb
97− (resolve-jibb-imports:jibb imports.p.parsed ~ ~ modules ~[/tests/tree/client/jibb] values.u.prep molds.u.prep ~ `iface.u.prep)
98− ?: ?=(%| -.first) 'BAD import resolution'
99− =/ reuse=jimports-result:jibb
100− (resolve-jibb-imports:jibb imports.p.parsed ~ ~ modules ~[/tests/tree/client/jibb] values.u.prep molds.u.prep cache.p.first `iface.u.prep)
101− =/ changed-modules=jbundle:jibb ~[[/ui/tree/jibb changed] [/ui/tree-two/jibb tree] [/ui/tree-alias/jibb alias]]
102− =/ stale=jimports-result:jibb
103− (resolve-jibb-imports:jibb imports.p.parsed ~ ~ changed-modules ~[/tests/tree/client/jibb] values.u.prep molds.u.prep cache.p.first `iface.u.prep)
104− =/ fresh=jimports-result:jibb
105− (resolve-jibb-imports:jibb imports.p.parsed ~ ~ changed-modules ~[/tests/tree/client/jibb] values.u.prep molds.u.prep ~ `iface.u.prep)
106− =/ duplicate-modules=jbundle:jibb [[/ui/tree/jibb tree] modules]
107− =/ duplicate=jimports-result:jibb
108− (resolve-jibb-imports:jibb imports.p.parsed ~ ~ duplicate-modules ~[/tests/tree/client/jibb] values.u.prep molds.u.prep cache.p.first `iface.u.prep)
109− =/ cycle=jimports-result:jibb
110− (resolve-jibb-imports:jibb imports.p.parsed ~ ~ modules ~[/ui/tree/jibb] values.u.prep molds.u.prep cache.p.first `iface.u.prep)
111− =/ prelude-other=ifile:jibb iface.u.prep(source ~)
112− =/ mismatch=jimports-result:jibb
113− (resolve-jibb-imports:jibb imports.p.parsed ~ ~ modules ~[/tests/tree/client/jibb] values.u.prep molds.u.prep cache.p.first `prelude-other)
114− =/ old=(unit ifile:jibb) (find-jibb-interface:jibb %first resolved.p.first)
115− =/ new=(unit ifile:jibb) ?:(?=(%& -.fresh) (find-jibb-interface:jibb %first resolved.p.fresh) ~)
116− =/ shape-changed=?
117− ?~ old |
118− ?~ new |
119− =/ a=(unit ischeme:jibb) (find-jibb-mold:jibb %node-tree u.old)
120− =/ b=(unit ischeme:jibb) (find-jibb-mold:jibb %node-tree u.new)
121− ?~ a |
122− ?~ b |
123− ?. &(?=(%grec -.typ.u.a) ?=(%grec -.typ.u.b)) |
124− !=(proof.typ.u.a proof.typ.u.b)
125− =/ reuse-ok=? ?:(?=(%| -.reuse) | =(resolved.p.first resolved.p.reuse))
126− =/ shadow-parsed=(each module:jibb error:jibb) (parse:jibb /ui/tree/jibb shadow)
127− =/ altered-parsed=(each module:jibb error:jibb) (parse:jibb /lib/jibb/prelude/jibb altered)
128− =/ more=(list [label=@t ok=?])
129− :~ ['unreserved local list shadow declined' &(?=(%& -.shadow-parsed) ?=(%| -.shadow-result))]
130− ['altered prelude list declined' &(?=(%& -.altered-parsed) ?=(%| -.altered-result))]
131− ['cached source reuse' reuse-ok]
132− ['changed source invalidates cache' ?=(%| -.stale)]
133− ['changed source fresh proof' &(?=(%& -.fresh) shape-changed)]
134− ['duplicate source declined' ?=(%| -.duplicate)]
135− ['active import cycle declined' ?=(%| -.cycle)]
136− ['changed prelude invalidates cache' ?=(%| -.mismatch)]
137− ==
138− =/ lines=(list @t) (weld (turn checks result-line) (weld invalid-lines (turn more result-line)))
139− =/ report=@t (golden-types-with-prepared-prelude:jibb /tests/tree/client/jibb client ~ ~ modules prep)
140− (cat 3 (of-wain:format lines) (cat 3 '\0a' report))
141−++ test-generic-recursion
142− ^- tang
143− ?~ tree ~[leaf+"recursive source is missing"]
144− ?~ changed ~[leaf+"changed recursive source is missing"]
145− ?~ alias ~[leaf+"recursive alias is missing"]
146− ?~ client ~[leaf+"recursive client is missing"]
147− ?~ bad-mold ~[leaf+"invalid mold fixture is missing"]
148− ?~ bad-constructor ~[leaf+"constructor fixture is missing"]
149− ?~ bad-match ~[leaf+"match fixture is missing"]
150− ?~ bad-parameter ~[leaf+"parameter fixture is missing"]
151− ?~ local-shadow ~[leaf+"local shadow fixture is missing"]
152− ?~ local-distinct ~[leaf+"distinct local shadow fixture is missing"]
153− ?~ local-only ~[leaf+"local recursion fixture is missing"]
154− ?~ list-shadow ~[leaf+"list shadow fixture is missing"]
155− ?~ chain ~[leaf+"unindexed chain fixture is missing"]
156− ?~ expected ~[leaf+"recursive expected output is missing"]
157− =/ invalid=(list [label=@t src=@t])
158− :~ ['unused mold hole declined' (text bad-mold)]
159− ['invalid constructor declined' (text bad-constructor)]
160− ['invalid matching declined' (text bad-match)]
161− ['nonuniform recursion declined' (text bad-parameter)]
162− ['identical local shadow declined' (text local-shadow)]
163− ['different local shadow declined' (text local-distinct)]
164− ['local recursion declined' (text local-only)]
165− ==
166− =/ actual=@t (generic-output real-prelude real-internal (text tree) (text changed) (text alias) (text client) invalid (text list-shadow) (text chain))
167− ?. =((to-wain:format (cat 3 actual '\0a')) expected)
168− ~[leaf+"generic recursion output differs from expected"]
169− ~
170−--
tests/lib/jibb-import-overlap.hoondeleted−80
@@ -1,80 +0,0 @@
1−/+ jibb, jibb-import
2−/* sur %txt /tests/type-import-overlap/sur/txt
3−/* source %txt /tests/type-import-overlap/source/txt
4−/* expected %txt /tests/type-import-overlap/expected/txt
5−|%
6−++ text
7− |= lines=wain
8− ^- @t
9− (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
10−++ test-import-overlap
11− ^- tang
12− ?~ sur ~[leaf+"overlap fixture source is missing"]
13− ?~ source ~[leaf+"overlap fixture client is missing"]
14− ?~ expected ~[leaf+"overlap fixture expected output is missing"]
15− =/ got (overlap-output (text sur) (text source))
16− ?. =((to-wain:format (cat 3 got '\0a')) expected)
17− ~[leaf+"overlap output differs from expected"]
18− ~
19−++ bounded-screen-status
20−^- @t
21−?. ?=(~ (bounded-no-spec-unions:jibb-import [1 2] 2)) 'three-node noun exceeded limit'
22−=/ exact (bounded-no-spec-unions:jibb-import [1 2] 3)
23−?. =(exact `0) 'three-node exact budget failed'
24−?. ?=(~ (bounded-no-spec-unions:jibb-import [[[[1 2] 3] 4] 5] 8)) 'deep noun exceeded limit'
25−?. =((bounded-no-spec-unions:jibb-import [[[[1 2] 3] 4] 5] 9) `0) 'deep exact budget failed'
26−?. ?=(~ (bounded-no-spec-unions:jibb-import [1 2 3 4 5] 8)) 'wide noun exceeded limit'
27−?. =((bounded-no-spec-unions:jibb-import [1 2 3 4 5] 9) `0) 'wide exact budget failed'
28−?. ?=(~ (bounded-no-spec-unions:jibb-import [%bcwt [[1 2] [[3 4] 0]]] 100)) 'nested $? accepted'
29−?. ?=(~ (bounded-no-spec-unions:jibb-import [%bccn [[1 2] [[3 4] 0]]] 100)) 'nested $% accepted'
30−?. ?=(~ (bounded-no-spec-unions:jibb-import [%bckt [1 2] [3 4]] 100)) 'nested $^ accepted'
31−=/ very-deep=*
32− =/ n=@ud 1.000
33− =/ node=* 0
34− |-
35− ?: =(n 0) node
36− $(n (dec n), node [node n])
37−?. =((bounded-no-spec-unions:jibb-import very-deep 2.001) `0) 'deep 2,001-node exact budget failed'
38−?. ?=(~ (bounded-no-spec-unions:jibb-import very-deep 2.000)) 'deep 2,001-node limit exceeded'
39−=/ xs=(list spec)
40− (turn (gulf 1 128) |=(n=@ud `spec`[%bccl ~[[%leaf %tas n] [%base [%atom %t]]]]))
41−?~ xs 'generated source cases missing'
42−=/ first=(unit @ud) (bounded-no-spec-unions:jibb-import i.xs 1.000)
43−?~ first 'simple source case unavailable'
44−=/ total=@ud (mul 128 (sub 1.000 u.first))
45−=/ at=(unit (list tagged-case:jibb-import)) (tagged-bounded-cases:jibb-import xs ~ total 128)
46−?~ at '128 exact cases rejected'
47−?. =((lent u.at) 128) 'a source case was omitted'
48−?. ?=(~ (tagged-bounded-cases:jibb-import xs ~ (dec total) 128)) 'source node limit exceeded'
49−=/ over=(list spec) (weld xs ~[`spec`[%bccl ~[[%leaf %tas 129] [%base [%atom %t]]]]])
50−?. ?=(~ (tagged-bounded-cases:jibb-import over ~ 100.000 128)) '129 cases exceeded limit'
51−=/ nested=spec [%bccl ~[[%leaf %tas %x] [%bcwt ~[[%leaf %tas %a] [%leaf %tas %b]]]]]
52−?. ?=(~ (tagged-bounded-cases:jibb-import ~[nested] ~ 1.000 128)) 'nested union case accepted'
53−=/ unknown=spec [%base [%atom %t]]
54−?. ?=(~ (tagged-bounded-cases:jibb-import ~[unknown] ~ 1.000 128)) 'non-tagged source accepted'
55−'bounded source screen controls passed'
56−
57−++ overlap-output
58− |= [sur-text=@t src=@t]
59− ^- @t
60− =/ cor=type -:(ride -:!>(..zuse) sur-text)
61− =/ names=(list term)
62− ~[%mixed-zero %nonzero %unequal-singletons %swapped %separate-tags %separate-terms %different-value %different-tail %unknown-middle %unsupported-gate %dollar-percent %identical %cross-zero %boolean-tail %empty-tail]
63− =/ cases=wall
64− %+ turn names
65− |= n=term
66− "{(trip n)}: {(show-import-diagnostic:jibb-import (read-named-diagnostic:jibb-import %fixture n cor))}"
67− =/ other=type (~(play ut cor) (ream '*separate-tags'))
68− =/ provenance=wall
69− :~ "mismatched-selected: {(show-result:jibb-import (read-mold-in:jibb-import %fixture %mixed-zero other cor))}"
70− "missing: {(show-result:jibb-import (read-named:jibb-import %fixture %missing cor))}"
71− "bare-zuse: {(show-result:jibb-import (read-named:jibb-import %fixture %mixed-zero -:!>(..zuse)))}"
72− ==
73− =/ external=(list [module=term name=term result=*])
74− :~ [%fixture %mixed-zero (read-named-diagnostic:jibb-import %fixture %mixed-zero cor)]
75− [%fixture %separate-tags (read-named-diagnostic:jibb-import %fixture %separate-tags cor)]
76− [%fixture %unknown-middle (read-named-diagnostic:jibb-import %fixture %unknown-middle cor)]
77− ==
78− =/ report=@t (golden-types-with-reader-diagnostics:jibb /ui/test/jibb src external ~)
79− (cat 3 (of-wain:format (turn (weld cases (weld ~[(trip bounded-screen-status)] provenance)) |=(line=tape (crip line)))) (cat 3 '\0a' report))
80−--
tests/lib/jibb-import-structural.hoondeleted−82
@@ -1,82 +0,0 @@
1−/+ jibb, jibb-import
2−/* sur %txt /tests/type-import-structural/sur/txt
3−/* source %txt /tests/type-import-structural/source/txt
4−/* expected %txt /tests/type-import-structural/expected/txt
5−|%
6−++ text
7− |= lines=wain
8− ^- @t
9− (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
10−++ test-import-structural
11− ^- tang
12− ?~ sur ~[leaf+"structural overlap /sur is missing"]
13− ?~ source ~[leaf+"structural overlap client is missing"]
14− ?~ expected ~[leaf+"structural overlap expected is missing"]
15− =/ got (structural-output (text sur) (text source))
16− ?. =((to-wain:format (cat 3 got '\0a')) expected)
17− ~[leaf+"structural overlap output differs from expected"]
18− ~
19−++ structural-output
20− |= [sur-text=@t src=@t]
21− ^- @t
22− =/ cor=type -:(ride -:!>(..zuse) sur-text)
23− =/ names=(list term)
24− ~[%same-alias %separate-alias %deep-match %deep-distinct %tail-distinct %later-overlap %many-safe %open-atoms %different-aura]
25− =/ cases=wall
26− %+ turn names
27− |= n=term
28− "{(trip n)}: {(show-import-diagnostic:jibb-import (read-named-diagnostic:jibb-import %fixture n cor))}"
29− =/ ext=(list [module=term name=term result=*])
30− :~ [%fixture %deep-match (read-named-diagnostic:jibb-import %fixture %deep-match cor)]
31− [%fixture %separate-alias (read-named-diagnostic:jibb-import %fixture %separate-alias cor)]
32− [%fixture %different-aura (read-named-diagnostic:jibb-import %fixture %different-aura cor)]
33− [%fixture %later-overlap (read-named-diagnostic:jibb-import %fixture %later-overlap cor)]
34− ==
35− =/ report=@t (golden-types-with-reader-diagnostics:jibb /ui/structural/jibb src ext ~)
36− =/ zero=imported:jibb-import [%atom %tas `0]
37− =/ one=imported:jibb-import [%atom %tas `1]
38− =/ two=imported:jibb-import [%atom %tas `2]
39− =/ txt=imported:jibb-import [%atom %t ~]
40− =/ ship=imported:jibb-import [%atom %p ~]
41− =/ flag=imported:jibb-import [%atom %f ~]
42− =/ opaque=imported:jibb-import [%ref %m %x]
43− =/ named=imported:jibb-import [%named %m %x zero]
44− =/ arm (local-arm-source:jibb-import cor %later-overlap)
45− ?~ arm !!
46− =/ shape (local-mold-spec:jibb-import u.arm %later-overlap)
47− ?~ shape !!
48− =/ body (tagged-default-union:jibb-import u.shape 4)
49− ?~ body !!
50− ?> ?=([%bcwt *] u.body)
51− =/ specs=(list spec) p.u.body
52− ?~ specs !!
53− =/ checks=(list [label=@t ok=?])
54− :~ ['same literal' ?=([~ [%.y *]] (overlap-pair:jibb-import zero zero 20))]
55− ['different literals' ?=([~ [%.n *]] (overlap-pair:jibb-import one two 20))]
56− ['named expands' ?=([~ [%.y *]] (overlap-pair:jibb-import named zero 20))]
57− ['opaque declines' ?=([~ [%.n *]] (overlap-pair:jibb-import opaque opaque 20))]
58− ['opaque versus noun' ?=([~ [%.n *]] (overlap-pair:jibb-import opaque [%noun ~] 20))]
59− ['unknown aura' ?=([~ [%.n *]] (overlap-pair:jibb-import ship txt 20))]
60− ['open admits zero' ?=([~ [%.y *]] (overlap-pair:jibb-import flag zero 20))]
61− ['different tail' ?=([~ [%.n *]] (overlap-pair:jibb-import [%cell zero one] [%cell zero two] 20))]
62− ['nested face' ?=([~ [%.y *]] (overlap-pair:jibb-import [%face %a [%cell named one]] [%face %b [%cell zero one]] 20))]
63− ['fork later case' ?=([~ [%.y *]] (overlap-pair:jibb-import [%fork ~[one zero]] zero 20))]
64− ['empty fuel' ?=(~ (overlap-pair:jibb-import zero zero 0))]
65− ['cell needs both' ?=(~ (overlap-pair:jibb-import [%cell zero one] [%cell zero one] 2))]
66− ['later pair' ?=([~ [%.y *]] (overlap-case-pairs:jibb-import ~[one two zero zero] 100))]
67− ['pair fuel' ?=(~ (overlap-case-pairs:jibb-import ~[one two zero zero] 2))]
68− ['void' ?=([~ [%.n *]] (overlap-pair:jibb-import [%void ~] [%noun ~] 20))]
69− ['void position' ?=([~ [%.n *]] (overlap-pair:jibb-import [%cell zero [%void ~]] [%cell zero [%noun ~]] 20))]
70− ['opaque apply' ?=([~ [%.n *]] (overlap-pair:jibb-import [%apply %list ~[txt]] [%noun ~] 20))]
71− ['source node fuel' ?=(~ (overlap-source-cases:jibb-import specs 1 128))]
72− ['source case cap' ?=(~ (overlap-source-cases:jibb-import specs 4.096 3))]
73− ['wrong projected head' !(overlap-projections-match:jibb-import ~[[%a i.specs]] ~[[%cell [%atom %tas `%b] txt]])]
74− ['wrong case count' !(overlap-projections-match:jibb-import ~[[%a i.specs]] ~)]
75− ==
76− =/ results=wall
77− %+ turn checks
78− |= c=[label=@t ok=?]
79− "{(trip label.c)}: {?:(ok.c "ok" "BAD")}"
80− =/ lines=(list @t) (turn (weld cases results) |=(line=tape (crip line)))
81− (cat 3 (of-wain:format lines) (cat 3 '\0a' report))
82−--
tests/lib/jibb-list-alias-guards.hoon+1−1
@@ -4,7 +4,7 @@
44|%
55++ list-alias-output
66 ^- @t
7− =/ src=@t (crip "++ text-value |= x=(alias @t) x\0a++ ship |= x=(alias @p) x\0a++ wrong ^- (alias @t) ~[~zod]\0a++ shadow |= x=(list @t)\0a +$ list @t\0a x\0a")
7+ =/ src=@t (crip "++ text |= x=(alias @t) x\0a++ ship |= x=(alias @p) x\0a++ wrong ^- (alias @t) ~[~zod]\0a++ shadow |= x=(list @t)\0a +$ list @t\0a x\0a")
88 =/ canonical=@t (crip "+$ list |$ [A]\0a ~\0a [i=A t=(list A)]\0a+$ bag |$ [A] (list A)\0a+$ alias |$ [A] (bag A)\0a")
99 =/ altered=@t (crip "+$ list |$ [A] [A A]\0a+$ bag |$ [A] (list A)\0a+$ alias |$ [A] (bag A)\0a")
1010 =/ omitted=@t (crip "+$ bag |$ [A] (list A)\0a+$ alias |$ [A] (bag A)\0a")
tests/lib/jibb-nested-union-guards.hoondeleted−67
@@ -1,67 +0,0 @@
1−:: Nested tagged-case context requires a direct union and unique explicit case.
2−/+ jibb
3−|%
4−++ nested-union-base-errors
5− ^- (list tape)
6− =/ a=itype:jibb [%cell [%const [%term %tas %a '%a']] [%atom %t]]
7− =/ b=itype:jibb [%cell [%const [%term %tas %b '%b']] [%atom %p]]
8− =/ union=itype:jibb [%union ~[a b] ~ ~ ~]
9− =/ variable=itype:jibb [%var 0]
10− =/ bound=isub:jibb ~[[0 union]]
11− =/ failures=(list tape) ~
12− =? failures !(contextual-direct-union:jibb union)
13− ["direct union not recognized" failures]
14− =? failures !(contextual-direct-union:jibb [%face %item union])
15− ["explicit faced union not recognized" failures]
16− =? failures (contextual-direct-union:jibb variable)
17− ["variable-bound root treated as direct union" failures]
18− =/ tests=(list [label=@t target=itype:jibb tag=@ sub=isub:jibb expect=?])
19− :~ ['unique tag' union %a ~ &]
20− ['missing tag' union %missing ~ |]
21− ['null-headed zero' [%union ~[[%cell [%const [%null %n 0 '~']] [%atom %t]] b] ~ ~ ~] 0 ~ &]
22− ['loobean-headed zero' [%union ~[[%cell [%const [%loobean %f 0 '%.y']] [%atom %t]] b] ~ ~ ~] 0 ~ &]
23− ['term-headed zero' [%union ~[[%cell [%const [%term %tas 0 '%$']] [%atom %t]] b] ~ ~ ~] 0 ~ &]
24− ['equal zero heads' [%union ~[[%cell [%const [%null %n 0 '~']] [%atom %t]] [%cell [%const [%loobean %f 0 '%.y']] [%atom %p]]] ~ ~ ~] 0 ~ |]
25− ['variable root' variable %a bound |]
26− ['bare term competitor' [%union ~[a [%const [%term %tas %b '%b']]] ~ ~ ~] %a ~ |]
27− ['null competitor' [%union ~[a [%const [%null %n 0 '~']]] ~ ~ ~] %a ~ |]
28− ['variable competitor' [%union ~[a variable] ~ ~ ~] %a bound |]
29− ['variable head' [%union ~[a [%cell variable [%atom %t]]] ~ ~ ~] %a bound |]
30− ['duplicate tag' [%union ~[a a] ~ ~ ~] %a ~ |]
31− ['duplicate other head' [%union ~[a b [%cell [%const [%term %tas %b '%b']] [%atom %t]]] ~ ~ ~] %a ~ |]
32− ['faced competitor' [%union ~[a [%face %x b]] ~ ~ ~] %a ~ |]
33− ==
34− =/ errs=(list @t)
35− %+ turn tests
36− |= test=[label=@t target=itype:jibb tag=@ sub=isub:jibb expect=?]
37− =/ found=(unit itype:jibb) (contextual-tagged-case:jibb target.test tag.test sub.test)
38− ?: =(expect.test ?=(^ found)) ''
39− (cat 3 label.test ': incorrect case selection')
40− (weld (turn (skim errs |=(x=@t !=(x ''))) trip) failures)
41−++ nested-union-substitution-errors
42− ^- (list tape)
43− =/ tests=(list [name=@t sub=isub:jibb want=?])
44− :~ ['empty' ~ &]
45− ['atom' ~[[0 [%atom %t]]] &]
46− ['variable chain to atom' ~[[0 [%var 1]] [1 [%atom %t]]] &]
47− ['cell' ~[[0 [%cell [%atom %t] [%atom %p]]]] |]
48− ['face' ~[[0 [%face %x [%atom %t]]]] |]
49− ['gate' ~[[0 [%fn [%atom %t] [%atom %t]]]] |]
50− ['union' ~[[0 [%union ~[[%const [%term %tas %x '%x']]] ~ ~ ~]]] |]
51− ['collection' ~[[0 [%collection %list ~[[%atom %t]]]]] |]
52− ['variable chain to union' ~[[0 [%var 1]] [1 [%union ~[[%const [%term %tas %x '%x']]] ~ ~ ~]]] |]
53− ==
54− =/ errors=(list @t)
55− %+ turn tests
56− |= test=[name=@t sub=isub:jibb want=?]
57− ?: =(want.test (contextual-simple-sub:jibb sub.test)) ''
58− (cat 3 name.test ': incorrect provenance')
59− =/ errors (skim errors |=(x=@t !=(x '')))
60− (turn errors trip)
61−++ nested-union-guard-errors
62− ^- (list tape)
63− (weld nested-union-base-errors nested-union-substitution-errors)
64−++ test-nested-union-guards
65− ^- tang
66− (turn nested-union-guard-errors |=(reason=tape leaf+reason))
67−--
tests/lib/jibb-page-main.hoondeleted−168
@@ -1,168 +0,0 @@
1−:: Static and direct data-page kind checks, without rendering or execution.
2−/+ jibb, jibb-import
3−/* prelude %jibb /lib/jibb/prelude/jibb
4−/* internal %jibb /lib/jibb/internal/jibb
5−/* sur %txt /tests/type-api-paths/todo-sur/txt
6−/* action %txt /tests/type-api-paths/todo-action/txt
7−/* todos %txt /tests/type-api-paths/todos/txt
8−/* update %txt /tests/type-api-paths/todo-update/txt
9−/* item %txt /tests/type-api-paths/todo-item/txt
10−/* todo-api %txt /tests/type-page-main/todo-api/txt
11−/* todo-island %txt /tests/type-page-main/todo-island/txt
12−/* blog-sur %txt /tests/type-page-main/blog-sur/txt
13−/* posts %txt /tests/type-page-main/posts-mark/txt
14−/* blog-api %txt /tests/type-page-main/blog-api/txt
15−/* card %txt /tests/type-page-main/card/txt
16−/* about %txt /tests/type-page-main/static/txt
17−/* blog-index %txt /tests/type-page-main/blog-index/txt
18−/* index %txt /tests/type-page-main/index/txt
19−/* ctor-page %txt /tests/type-page-main/ctor-page/txt
20−/* wrong-static %txt /tests/type-page-main/wrong-static/txt
21−/* arbitrary-main %txt /tests/type-page-main/arbitrary-main/txt
22−/* page-alias %txt /tests/type-page-main/page-alias/txt
23−/* indirect-load %txt /tests/type-page-main/indirect-load/txt
24−/* pure-load %txt /tests/type-page-main/pure-load/txt
25−/* hand-built-load %txt /tests/type-page-main/hand-built-load/txt
26−/* typed-load %txt /tests/type-page-main/typed-load/txt
27−/* diff-load %txt /tests/type-page-main/diff-load/txt
28−|%
29−++ text
30− |= lines=wain
31− ^- @t
32− (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
33−::
34−++ page-main-detailed
35− |= [at=path src=@t externals=iexternals:jibb marks=imark-externals:jibb modules=jbundle:jibb prepared=iprelude:jibb]
36− ^- jfile-detailed-result:jibb
37− (infer-jibb-file-detailed:jibb at src externals marks modules ~[at] values.prepared molds.prepared ~ `iface.prepared)
38−::
39−++ page-main-reader-inputs
40− |= [sur=@t action=@t todos=@t update=@t item=@t blog-sur=@t posts=@t]
41− ^- [marks=imark-externals:jibb externals=iexternals:jibb]
42− =/ todo=type -:(ride -:!>(..zuse) sur)
43− =/ todo-subject=type [%cell [%face %todo todo] -:!>(..zuse)]
44− =/ ma=* (read-mark:jibb-import %todo-action -:(ride todo-subject action))
45− =/ mt=* (read-mark:jibb-import %todos -:(ride todo-subject todos))
46− =/ mu=* (read-mark:jibb-import %todo-update -:(ride todo-subject update))
47− =/ mi=* (read-mark:jibb-import %todo-item -:(ride todo-subject item))
48− =/ blog=type -:(ride -:!>(..zuse) blog-sur)
49− =/ blog-subject=type [%cell [%face %blog blog] -:!>(..zuse)]
50− =/ mp=* (read-mark:jibb-import %posts -:(ride blog-subject posts))
51− =/ item-input=* (read-named:jibb-import %todo %item todo)
52− =/ post-input=* (read-named:jibb-import %blog %post blog)
53− :_ ~[[%todo %item item-input] [%blog %post post-input]]
54− ~[[%todo-action ma] [%todos mt] [%todo-update mu] [%todo-item mi] [%posts mp]]
55−::
56−++ page-main-positive
57− |= [label=tape at=path src=@t expected=@t consumer-at=path consumer=@t face=term externals=iexternals:jibb marks=imark-externals:jibb modules=jbundle:jibb prepared=iprelude:jibb]
58− ^- (list tape)
59− =/ detailed=jfile-detailed-result:jibb
60− (page-main-detailed at src externals marks modules prepared)
61− ?: ?=(%| -.detailed)
62− ~[(weld label (weld ": rejected: " (trip message.p.detailed)))]
63− =/ checked=ifile:jibb iface.p.detailed
64− ?~ graph.checked ~[(weld label ": request graph is missing")]
65− =/ main=(unit ischeme:jibb) (ienv-lookup:jibb %main values.checked)
66− ?~ main ~[(weld label ": main is missing")]
67− ?. &(?=(~ vars.u.main) ?=(~ (itype-vars:jibb typ.u.main)))
68− ~[(weld label ": main is not closed")]
69− =/ actual=@t (crip (show-itype:jibb typ.u.main ~))
70− ?. =(actual expected)
71− ~[(weld label (weld ": main type was " (trip actual)))]
72− =/ imported=jfile-detailed-result:jibb
73− (page-main-detailed consumer-at consumer externals marks modules prepared)
74− ?: ?=(%| -.imported)
75− ~[(weld label (weld ": downstream import rejected: " (trip message.p.imported)))]
76− =/ use=(unit ischeme:jibb) (ienv-lookup:jibb %imported values.iface.p.imported)
77− ?~ use ~[(weld label ": downstream main is missing")]
78− =/ expected-import=itype:jibb
79− (itype-in-import:jibb typ.u.main checked face `iface.prepared)
80− ?. &(?=(~ vars.u.use) =(typ.u.use expected-import))
81− ~[(weld label ": downstream main type differs")]
82− ~
83−::
84−++ page-main-negative
85− |= [label=@t at=path src=@t externals=iexternals:jibb marks=imark-externals:jibb modules=jbundle:jibb prepared=iprelude:jibb]
86− ^- (list tape)
87− =/ bad=jfile-detailed-result:jibb
88− (page-main-detailed at src externals marks modules prepared)
89− ?: ?=(%& -.bad) ~[(weld (trip label) ": accepted")]
90− ~
91−::
92−++ page-main-errors
93− |= [public=@t private=@t sur=@t action=@t todos=@t update=@t item=@t todo-api=@t todo-island=@t blog-sur=@t posts=@t blog-api=@t card=@t about=@t blog-index=@t index=@t ctor-page=@t negatives=(list [label=@t src=@t])]
94− ^- (list tape)
95− =/ prepared=(unit iprelude:jibb)
96− (prepare-prelude-with-internal:jibb public private)
97− ?~ prepared ~["page prelude did not prepare"]
98− =/ inputs=[marks=imark-externals:jibb externals=iexternals:jibb]
99− (page-main-reader-inputs sur action todos update item blog-sur posts)
100− =/ modules=jbundle:jibb
101− :~ [/ui/api/todo/jibb todo-api]
102− [/ui/todo-list/jibb todo-island]
103− [/ui/api/blog/jibb blog-api]
104− [/ui/components/card/jibb card]
105− [/ui/about/jibb about]
106− [/ui/blog/index/jibb blog-index]
107− [/ui/index/jibb index]
108− [/tests/page-main/ctor/jibb ctor-page]
109− ==
110− =/ about-consumer=@t '/= about-page /ui/about\0a++ imported main.about-page\0a'
111− =/ blog-consumer=@t '/= blog-page /ui/blog/index\0a++ imported main.blog-page\0a'
112− =/ index-consumer=@t '/= index-page /ui/index\0a++ imported main.index-page\0a'
113− =/ ctor-consumer=@t '/= ctor-page /tests/page-main/ctor\0a++ imported main.ctor-page\0a'
114− =/ positives=(list (list tape))
115− :~ (page-main-positive "about" /ui/about/jibb about '(element !!)' /tests/page-main/about-consumer/jibb about-consumer %about-page externals.inputs marks.inputs modules u.prepared)
116− (page-main-positive "blog index" /ui/blog/index/jibb blog-index '[load=$-(~ (ask (list [title=@t slug=@ta]))) view=$-((list [title=@t slug=@ta]) (element !!))]' /tests/page-main/blog-consumer/jibb blog-consumer %blog-page externals.inputs marks.inputs modules u.prepared)
117− (page-main-positive "index" /ui/index/jibb index '[load=$-(~ (ask (list [id=@ud [done=? text=@t]]))) view=$-((list [id=@ud [done=? text=@t]]) (element !!))]' /tests/page-main/index-consumer/jibb index-consumer %index-page externals.inputs marks.inputs modules u.prepared)
118− (page-main-positive "constructor reply" /tests/page-main/ctor/jibb ctor-page '[load=$-(~ (ask [%got todos=(list [id=@ud [done=? text=@t]])])) view=$-([%got todos=(list [id=@ud [done=? text=@t]])] (element !!))]' /tests/page-main/ctor-consumer/jibb ctor-consumer %ctor-page externals.inputs marks.inputs modules u.prepared)
119− ==
120− =/ failures=(list tape) (zing positives)
121− ?^ failures failures
122− =/ at=path /ui/index/jibb
123− =/ checked-result=jfile-detailed-result:jibb
124− (page-main-detailed at index externals.inputs marks.inputs modules u.prepared)
125− ?: ?=(%| -.checked-result) ~["index disappeared before evidence controls"]
126− =/ checked=ifile:jibb iface.p.checked-result
127− ?~ graph.checked ~["index graph disappeared before evidence controls"]
128− =/ parsed (parse:jibb at index)
129− ?: ?=(%| -.parsed) ~["index source no longer parses"]
130− =/ main=(unit def:jibb) (program-main-def:jibb defs.p.parsed)
131− ?~ main ~["index main definition is missing"]
132− =/ parts=(unit [load=term view=term]) (page-main-parts:jibb u.main)
133− ?~ parts ~["index page parts are missing"]
134− =/ others=(list irequest-evidence:jibb)
135− (skim requests.u.graph.checked |=(r=irequest-evidence:jibb !&(=(api-at.r /ui/api/todo/jibb) =(%todos name.r))))
136− =/ missing=irequest-graph:jibb u.graph.checked(requests others)
137− =/ resolved=ijimports:jibb
138− =/ found=(unit ifile:jibb)
139− =/ api=jfile-detailed-result:jibb
140− (page-main-detailed /ui/api/todo/jibb todo-api externals.inputs marks.inputs modules u.prepared)
141− ?: ?=(%| -.api) ~
142− `iface.p.api
143− ?~ found ~
144− ~[[%todo u.found]]
145− ?. ?=([* ~] resolved) ~["todo API evidence control did not check"]
146− ?: (page-main-closed:jibb u.parts defs.p.parsed values.checked `iface.u.prepared resolved missing)
147− ~["unknown request evidence passed data-page checking"]
148− =/ store=(list tape)
149− (page-main-negative 'store path' /ui/stores/about/jibb about externals.inputs marks.inputs modules u.prepared)
150− ?^ store store
151− (zing (turn negatives |=(c=[label=@t src=@t] (page-main-negative label.c /ui/index/jibb src.c externals.inputs marks.inputs modules u.prepared))))
152−::
153−++ test-page-main
154− ^- tang
155− =/ negatives=(list [label=@t src=@t])
156− :~ ['wrong static message' (text wrong-static)]
157− ['arbitrary main' (text arbitrary-main)]
158− ['page alias' (text page-alias)]
159− ['indirect load' (text indirect-load)]
160− ['pure load' (text pure-load)]
161− ['hand-built load' (text hand-built-load)]
162− ['typed load' (text typed-load)]
163− ['diff load' (text diff-load)]
164− ==
165− =/ failures=(list tape)
166− (page-main-errors prelude internal (text sur) (text action) (text todos) (text update) (text item) (text todo-api) (text todo-island) (text blog-sur) (text posts) (text blog-api) (text card) (text about) (text blog-index) (text index) (text ctor-page) negatives)
167− (turn failures |=(reason=tape leaf+reason))
168−--
tests/lib/jibb-program-init.hoondeleted−134
@@ -1,134 +0,0 @@
1−:: Transactional direct-program initializer context, without UI execution.
2−/+ jibb
3−/* prelude %jibb /lib/jibb/prelude/jibb
4−/* internal %jibb /lib/jibb/internal/jibb
5−/* initializer %txt /tests/type-program-main/initializer/txt
6−/* initializer-consumer %txt /tests/type-program-main/initializer-consumer/txt
7−/* initializer-unfaced %txt /tests/type-program-main/initializer-unfaced/txt
8−/* initializer-error %txt /tests/type-program-main/initializer-error/txt
9−/* initializer-earlier %txt /tests/type-program-main/initializer-earlier/txt
10−/* initializer-model %txt /tests/type-program-main/initializer-model/txt
11−/* initializer-message %txt /tests/type-program-main/initializer-message/txt
12−/* initializer-generic %txt /tests/type-program-main/initializer-generic/txt
13−/* initializer-missing %txt /tests/type-program-main/initializer-missing/txt
14−/* initializer-tag %txt /tests/type-program-main/initializer-tag/txt
15−/* initializer-no-main %txt /tests/type-program-main/initializer-no-main/txt
16−/* initializer-subs %txt /tests/type-program-main/initializer-subs/txt
17−|%
18−++ text
19− |= lines=wain
20− ^- @t
21− (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
22−::
23−++ program-init-prepared
24− |= [public=@t private=@t]
25− ^- (unit iprelude:jibb)
26− (prepare-prelude-with-internal:jibb public private)
27−::
28−++ program-init-detailed
29− |= [at=path src=@t modules=jbundle:jibb prepared=iprelude:jibb]
30− ^- jfile-detailed-result:jibb
31− (infer-jibb-file-detailed:jibb at src ~ ~ modules ~[at] values.prepared molds.prepared ~ `iface.prepared)
32−::
33−++ program-init-legacy
34− |= [at=path src=@t modules=jbundle:jibb prepared=iprelude:jibb]
35− ^- jfile-result:jibb
36− (infer-jibb-file:jibb at src ~ ~ modules ~[at] values.prepared molds.prepared ~ `iface.prepared)
37−::
38−++ program-init-positive
39− |= [at=path src=@t downstream=(unit @t) prepared=iprelude:jibb]
40− ^- (list tape)
41− =/ detailed=jfile-detailed-result:jibb (program-init-detailed at src ~ prepared)
42− ?: ?=(%| -.detailed) ~["contextual direct program init was rejected"]
43− =/ checked=ifile:jibb iface.p.detailed
44− =/ legacy=jfile-result:jibb (program-init-legacy at src ~ prepared)
45− ?: ?=(%| -.legacy) ~["legacy adapter rejected contextual init"]
46− ?. =(values.checked values.iface.p.legacy) ~["contextual structured and legacy values differ"]
47− =/ init=(unit ischeme:jibb) (ienv-lookup:jibb %init values.checked)
48− =/ main=(unit ischeme:jibb) (ienv-lookup:jibb %main values.checked)
49− ?~ init ~["contextual init interface is missing"]
50− ?~ main ~["contextual main interface is missing"]
51− ?. ?=(~ vars.u.init) ~["contextual init interface is not closed"]
52− =/ expected=tape "$-((list @t) [xs=(list @t) [draft=@t error=(unit @t)]])"
53− ?. =((show-itype:jibb typ.u.init ~) expected) ~["contextual init interface type differs"]
54− ?. ?=(~ vars.u.main) ~["contextual main interface is not closed"]
55− =/ fields=(list itype:jibb) (record-fields-named:jibb %init typ.u.main ~)
56− ?. =(fields ~[typ.u.init]) ~["contextual main initializer field differs"]
57− ?~ source.checked ~["contextual program source evidence is missing"]
58− ?. =(u.source.checked src) ~["contextual program source evidence differs"]
59− ?~ graph.checked ~["contextual program request graph is missing"]
60− ?~ downstream ~
61− =/ consumer-at=path /tests/program-main/initializer-consumer/jibb
62− =/ imported=jfile-detailed-result:jibb
63− (program-init-detailed consumer-at u.downstream ~[[at src]] prepared)
64− ?: ?=(%| -.imported) ~[(weld "downstream contextual initializer import was rejected: " (trip message.p.imported))]
65− =/ use=(unit ischeme:jibb) (ienv-lookup:jibb %imported values.iface.p.imported)
66− ?~ use ~["downstream contextual initializer is missing"]
67− ?. =((show-itype:jibb typ.u.use ~) expected) ~["downstream contextual initializer type differs"]
68− ?. =(u.use u.init) ~["downstream contextual initializer scheme differs"]
69− ~
70−::
71−++ program-init-negative
72− |= [label=@t at=path src=@t boundary=@t prepared=iprelude:jibb]
73− ^- (list tape)
74− =/ detailed=jfile-detailed-result:jibb (program-init-detailed at src ~ prepared)
75− ?: ?=(%& -.detailed) ~[(weld (trip label) ": structured check accepted")]
76− ?. ?=(~ overlap.p.detailed) ~[(weld (trip label) ": unexpected overlap evidence")]
77− ?. =(message.p.detailed boundary) ~[(weld (trip label) ": rejected at the wrong boundary")]
78− =/ legacy=jfile-result:jibb (program-init-legacy at src ~ prepared)
79− ?: ?=(%& -.legacy) ~[(weld (trip label) ": legacy check accepted")]
80− ?. =(p.legacy boundary) ~[(weld (trip label) ": legacy boundary differs")]
81− ~
82−::
83−++ program-init-negative-cases
84− |= [cases=(list [label=@t at=path src=@t boundary=@t]) prepared=iprelude:jibb]
85− ^- (list tape)
86− ?~ cases ~
87− %+ weld
88− (program-init-negative label.i.cases at.i.cases src.i.cases boundary.i.cases prepared)
89− $(cases t.cases)
90−::
91−++ program-init-errors
92− |= [public=@t private=@t island=@t downstream=@t unfaced=@t negatives=(list @t)]
93− ^- (list tape)
94− =/ prepared=(unit iprelude:jibb) (program-init-prepared public private)
95− ?~ prepared ~["synthetic program prelude did not prepare for contextual init"]
96− =/ at=path /tests/program-main/initializer/jibb
97− =/ positives=(list tape)
98− %+ weld
99− (program-init-positive at island `downstream u.prepared)
100− (program-init-positive /tests/program-main/initializer-unfaced/jibb unfaced ~ u.prepared)
101− ?. =(9 (lent negatives)) ~["contextual negative fixture count differs"]
102− =/ definitions=@t (crip "module definitions need unsupported inference: {(spud at)}")
103− =/ cases=(list [label=@t at=path src=@t boundary=@t])
104− :~ ['incompatible error field' at (snag 0 negatives) definitions]
105− ['earlier tuple mismatch' at (snag 1 negatives) definitions]
106− ['inconsistent model' at (snag 2 negatives) definitions]
107− ['inconsistent message' at (snag 3 negatives) definitions]
108− ['missing/generic data sample' at (snag 4 negatives) definitions]
109− ['missing initializer' at (snag 5 negatives) definitions]
110− ['unrelated pending tag' at (snag 6 negatives) definitions]
111− ['non-main same source' at (snag 7 negatives) definitions]
112− ['init and subs unresolved' at (snag 8 negatives) definitions]
113− :- 'API path'
114− [/ui/api/program-main/jibb island 'module kind needs unsupported inference: /ui/api/program-main/jibb']
115− :- 'store path'
116− [/ui/stores/program-main/jibb island 'module kind needs unsupported inference: /ui/stores/program-main/jibb']
117− ==
118− (weld positives (program-init-negative-cases cases u.prepared))
119−::
120−++ test-program-init
121− ^- tang
122− =/ negatives=(list @t)
123− :~ (text initializer-error)
124− (text initializer-earlier)
125− (text initializer-model)
126− (text initializer-message)
127− (text initializer-generic)
128− (text initializer-missing)
129− (text initializer-tag)
130− (text initializer-no-main)
131− (text initializer-subs)
132− ==
133− (turn (program-init-errors prelude internal (text initializer) (text initializer-consumer) (text initializer-unfaced) negatives) |=(reason=tape leaf+reason))
134−--
tests/lib/jibb-program-main.hoondeleted−141
@@ -1,141 +0,0 @@
1−:: Narrow closed program-main checking, without execution or watchability claims.
2−/+ jibb
3−/* prelude %jibb /lib/jibb/prelude/jibb
4−/* internal %jibb /lib/jibb/internal/jibb
5−/* source %txt /tests/type-program-main/source/txt
6−/* consumer %txt /tests/type-program-main/consumer/txt
7−/* gate-model %txt /tests/type-program-main/gate-model/txt
8−/* gate-data %txt /tests/type-program-main/gate-data/txt
9−/* nonempty-subs %txt /tests/type-program-main/nonempty-subs/txt
10−/* mismatched-model %txt /tests/type-program-main/mismatched-model/txt
11−/* arbitrary-main %txt /tests/type-program-main/arbitrary-main/txt
12−/* alias-main %txt /tests/type-program-main/alias-main/txt
13−/* open-message %txt /tests/type-program-main/open-message/txt
14−|%
15−++ text
16− |= lines=wain
17− ^- @t
18− (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
19−::
20−++ program-prepared
21− |= [public=@t private=@t]
22− ^- (unit iprelude:jibb)
23− (prepare-prelude-with-internal:jibb public private)
24−::
25−++ program-main-detailed
26− |= [at=path src=@t modules=jbundle:jibb prepared=iprelude:jibb]
27− ^- jfile-detailed-result:jibb
28− (infer-jibb-file-detailed:jibb at src ~ ~ modules ~[at] values.prepared molds.prepared ~ `iface.prepared)
29−::
30−++ program-main-legacy
31− |= [at=path src=@t modules=jbundle:jibb prepared=iprelude:jibb]
32− ^- jfile-result:jibb
33− (infer-jibb-file:jibb at src ~ ~ modules ~[at] values.prepared molds.prepared ~ `iface.prepared)
34−::
35−++ program-main-negative-errors
36− |= [label=@t at=path src=@t prepared=iprelude:jibb]
37− ^- (list tape)
38− =/ detailed=jfile-detailed-result:jibb (program-main-detailed at src ~ prepared)
39− ?: ?=(%& -.detailed) ~[(weld (trip label) ": structured check accepted")]
40− ?. ?=(~ overlap.p.detailed) ~[(weld (trip label) ": unexpected overlap evidence")]
41− =/ legacy=jfile-result:jibb (program-main-legacy at src ~ prepared)
42− ?: ?=(%& -.legacy) ~[(weld (trip label) ": legacy check accepted")]
43− ?. =(p.legacy message.p.detailed) ~[(weld (trip label) ": adapter messages differ")]
44− ~
45−::
46−++ program-main-errors
47− |= [public=@t private=@t island=@t downstream=@t negatives=(list @t)]
48− ^- (list tape)
49− =/ prepared=(unit iprelude:jibb)
50− (program-prepared public private)
51− ?~ prepared ~["synthetic program prelude did not prepare"]
52− =/ at=path /tests/program-main/island/jibb
53− =/ detailed=jfile-detailed-result:jibb (program-main-detailed at island ~ u.prepared)
54− ?: ?=(%| -.detailed) ~["direct closed program main was rejected"]
55− =/ checked=ifile:jibb iface.p.detailed
56− ?~ graph.checked ~["program request graph evidence is missing"]
57− =/ legacy=jfile-result:jibb (program-main-legacy at island ~ u.prepared)
58− ?: ?=(%| -.legacy) ~["legacy adapter rejected a closed program main"]
59− ?. =(values.checked values.iface.p.legacy) ~["structured and legacy interface values differ"]
60− =/ init=(unit ischeme:jibb) (ienv-lookup:jibb %init values.checked)
61− =/ update=(unit ischeme:jibb) (ienv-lookup:jibb %update values.checked)
62− =/ view=(unit ischeme:jibb) (ienv-lookup:jibb %view values.checked)
63− =/ subs=(unit ischeme:jibb) (ienv-lookup:jibb %subs values.checked)
64− =/ main=(unit ischeme:jibb) (ienv-lookup:jibb %main values.checked)
65− ?~ init ~["init interface is missing"]
66− ?~ update ~["update interface is missing"]
67− ?~ view ~["view interface is missing"]
68− ?~ subs ~["subs interface is missing"]
69− ?~ main ~["main interface is missing"]
70− =/ parsed (parse:jibb at island)
71− ?: ?=(%| -.parsed) ~["program source no longer parses"]
72− =/ main-def=(unit def:jibb) (program-main-def:jibb defs.p.parsed)
73− ?~ main-def ~["program main definition is missing"]
74− =/ parts (program-main-parts:jibb u.main-def)
75− ?~ parts ~["program main parts are missing"]
76− ?: (program-main-closed:jibb u.parts defs.p.parsed values.checked ~ ~ u.graph.checked)
77− ~["program kind was accepted without its source-backed prelude"]
78− =/ program-scheme=(unit ischeme:jibb) (ienv-lookup:jibb %program values.iface.u.prepared)
79− ?~ program-scheme ~["synthetic program scheme is missing"]
80− ?. ?=(%fn -.typ.u.program-scheme) ~["synthetic program value is not a gate"]
81− =/ broken-values=ienv:jibb
82− (skim values.iface.u.prepared |=(entry=[name=term scheme=ischeme:jibb] !=(%program name.entry)))
83− =/ broken=ifile:jibb
84− iface.u.prepared(values [[%program [[%fn sample.typ.u.program-scheme [%atom %ud]] vars.u.program-scheme]] broken-values])
85− =/ malformed=jfile-detailed-result:jibb
86− (infer-jibb-file-detailed:jibb at island ~ ~ ~ ~[at] values.u.prepared molds.u.prepared ~ `broken)
87− ?: ?=(%& -.malformed) ~["program result was not checked against the program mold"]
88− =/ kind-error=@t (crip "module kind needs unsupported inference: {(spud at)}")
89− ?. =(message.p.malformed kind-error) ~["malformed program failed before the kind check"]
90− =/ open=jfile-detailed-result:jibb
91− (program-main-detailed at (snag 6 negatives) ~ u.prepared)
92− ?: ?=(%& -.open) ~["open program message was accepted"]
93− =/ other-values=ienv:jibb
94− (skim values.checked |=(entry=[name=term scheme=ischeme:jibb] !=(%main name.entry)))
95− =/ open-values=ienv:jibb [[%main u.main(vars ~[0])] other-values]
96− ?: (program-main-closed:jibb u.parts defs.p.parsed open-values `iface.u.prepared ~ u.graph.checked)
97− ~["generic main scheme passed the closure check"]
98− =/ model=itype:jibb [%face %count [%atom %ud]]
99− ?. =(u.init [[%fn [%atom %t] model] ~]) ~["init interface type differs"]
100− ?. ?=(~ vars.u.main) ~["main interface is not closed"]
101− =/ init-fields=(list itype:jibb) (record-fields-named:jibb %init typ.u.main ~)
102− =/ update-fields=(list itype:jibb) (record-fields-named:jibb %update typ.u.main ~)
103− =/ view-fields=(list itype:jibb) (record-fields-named:jibb %view typ.u.main ~)
104− =/ subs-fields=(list itype:jibb) (record-fields-named:jibb %subs typ.u.main ~)
105− ?. =(init-fields ~[typ.u.init]) ~["main initializer field differs"]
106− ?. &(=(1 (lent update-fields)) =(1 (lent view-fields)) =(1 (lent subs-fields)))
107− ~["main component fields differ"]
108− ?~ source.checked ~["program source evidence is missing"]
109− ?. =(u.source.checked island) ~["program source evidence differs"]
110− =/ consumer-at=path /tests/program-main/consumer/jibb
111− =/ imported=jfile-detailed-result:jibb
112− (program-main-detailed consumer-at downstream ~[[at island]] u.prepared)
113− ?: ?=(%| -.imported) ~[(weld "ordinary downstream program import was rejected: " (trip message.p.imported))]
114− =/ use=(unit ischeme:jibb) (ienv-lookup:jibb %imported values.iface.p.imported)
115− ?~ use ~["downstream imported initializer is missing"]
116− ?. =(u.use u.init) ~["downstream imported initializer type differs"]
117− ?. =(7 (lent negatives)) ~["focused negative fixture count differs"]
118− =/ cases=(list [label=@t at=path src=@t])
119− :~ ['gate in model' at (snag 0 negatives)]
120− ['gate in data' at (snag 1 negatives)]
121− ['nonempty subs' at (snag 2 negatives)]
122− ['mismatched model' at (snag 3 negatives)]
123− ['arbitrary main' at (snag 4 negatives)]
124− ['store path' /ui/stores/program-main/jibb island]
125− ['program alias' at (snag 5 negatives)]
126− ==
127− (zing (turn cases |=(c=[label=@t at=path src=@t] (program-main-negative-errors label.c at.c src.c u.prepared))))
128−::
129−++ test-program-main
130− ^- tang
131− =/ negatives=(list @t)
132− :~ (text gate-model)
133− (text gate-data)
134− (text nonempty-subs)
135− (text mismatched-model)
136− (text arbitrary-main)
137− (text alias-main)
138− (text open-message)
139− ==
140− (turn (program-main-errors prelude internal (text source) (text consumer) negatives) |=(reason=tape leaf+reason))
141−--
tests/lib/jibb-program-update.hoondeleted−139

This diff is too big to show here.

tests/lib/jibb-program-watch.hoondeleted−209

This diff is too big to show here.

tests/lib/jibb-request-guards.hoondeleted−149

This diff is too big to show here.

tests/lib/jibb-store.hoondeleted−261

This diff is too big to show here.

tests/lib/jibb-sub-guards.hoondeleted−37

This diff is too big to show here.

tests/lib/jibb-theme.hoondeleted−86

This diff is too big to show here.

tests/lib/jibb-todo-api.hoondeleted−85

This diff is too big to show here.

tests/lib/jibb-todo-full.hoondeleted−157

This diff is too big to show here.

tests/lib/jibb-todo-partial.hoondeleted−58

This diff is too big to show here.

tests/lib/jibb-union-alias-overlap.hoondeleted−107

This diff is too big to show here.

tests/lib/jibb-union-source.hoondeleted−152

This diff is too big to show here.

tests/lib/jibb.hoon+1223−1364

This diff is too big to show here.

tests/type-cell-branch/about.txtdeleted−2

This diff is too big to show here.

tests/type-cell-branch/bad.txtdeleted−3

This diff is too big to show here.

tests/type-cell-branch/good.txtdeleted−3

This diff is too big to show here.

tests/type-deferred-context/about.txtdeleted−3

This diff is too big to show here.

tests/type-deferred-context/collision-early.txtdeleted−27

This diff is too big to show here.

tests/type-deferred-context/collision-late.txtdeleted−28

This diff is too big to show here.

tests/type-deferred-context/dangling.txtdeleted−16

This diff is too big to show here.

tests/type-deferred-context/duplicate.txtdeleted−14

This diff is too big to show here.

tests/type-deferred-context/missing.txtdeleted−14

This diff is too big to show here.

tests/type-deferred-context/plain.txtdeleted−11

This diff is too big to show here.

tests/type-deferred-context/report.txtdeleted−15

This diff is too big to show here.

tests/type-deferred-context/rich.txtdeleted−27

This diff is too big to show here.

tests/type-deferred-context/simple.txtdeleted−10

This diff is too big to show here.

tests/type-deferred-context/wrong.txtdeleted−14

This diff is too big to show here.

tests/type-deferred-prepared/expected-control.txtdeleted−7

This diff is too big to show here.

tests/type-deferred-prepared/expected-tuple-only.txtdeleted−4

This diff is too big to show here.

tests/type-deferred-prepared/expected.txtdeleted−8

This diff is too big to show here.

tests/type-deferred-prepared/good.txtdeleted−9

This diff is too big to show here.

tests/type-deferred-prepared/imported.txtdeleted−11

This diff is too big to show here.

tests/type-deferred-prepared/main.txtdeleted−10

This diff is too big to show here.

tests/type-deferred-prepared/mold-collision.txtdeleted−9

This diff is too big to show here.

tests/type-deferred-prepared/no-final-cast.txtdeleted−8

This diff is too big to show here.

tests/type-deferred-prepared/no-prelude.txtdeleted−9

This diff is too big to show here.

tests/type-deferred-prepared/tuple-only.txtdeleted−3

This diff is too big to show here.

tests/type-deferred-prepared/unrelated-tag.txtdeleted−11

This diff is too big to show here.

tests/type-deferred-prepared/wrong-draft.txtdeleted−9

This diff is too big to show here.

tests/type-deferred-prepared/wrong-unit.txtdeleted−9

This diff is too big to show here.

tests/type-deferred-resolver/about.txtdeleted−5

This diff is too big to show here.

tests/type-deferred-resolver/conflict.txtdeleted−12

This diff is too big to show here.

tests/type-deferred-resolver/duplicate.txtdeleted−12

This diff is too big to show here.

tests/type-deferred-resolver/expected.txtdeleted−42

This diff is too big to show here.

tests/type-deferred-resolver/face.txtdeleted−6

This diff is too big to show here.

tests/type-deferred-resolver/good.txtdeleted−11

This diff is too big to show here.

tests/type-deferred-resolver/hole.txtdeleted−12

This diff is too big to show here.

tests/type-deferred-resolver/missing.txtdeleted−10

This diff is too big to show here.

tests/type-deferred-resolver/stability-early.txtdeleted−6

This diff is too big to show here.

tests/type-deferred-resolver/stability-late.txtdeleted−6

This diff is too big to show here.

tests/type-deferred-resolver/stability-output-early.txtdeleted−9

This diff is too big to show here.

tests/type-deferred-resolver/stability-output-late.txtdeleted−9

This diff is too big to show here.

tests/type-deferred-resolver/stability-simple-early.txtdeleted−6

This diff is too big to show here.

tests/type-deferred-resolver/stability-simple-late.txtdeleted−6

This diff is too big to show here.

tests/type-deferred-resolver/stability-slot-early.txtdeleted−9

This diff is too big to show here.

tests/type-deferred-resolver/stability-slot-late.txtdeleted−9

This diff is too big to show here.

tests/type-deferred-resolver/store.txtdeleted−12

This diff is too big to show here.

tests/type-deferred/about.txtdeleted−3

This diff is too big to show here.

tests/type-deferred/conflict-src.txtdeleted−12

This diff is too big to show here.

tests/type-deferred/duplicate-src.txtdeleted−12

This diff is too big to show here.

tests/type-deferred/expected.txtdeleted−38

This diff is too big to show here.

tests/type-deferred/face-bad-src.txtdeleted−6

This diff is too big to show here.

tests/type-deferred/face-good-src.txtdeleted−6

This diff is too big to show here.

tests/type-deferred/hole-src.txtdeleted−12

This diff is too big to show here.

tests/type-deferred/local-src.txtdeleted−8

This diff is too big to show here.

tests/type-deferred/missing-src.txtdeleted−10

This diff is too big to show here.

tests/type-deferred/mold-hole-src.txtdeleted−12

This diff is too big to show here.

tests/type-deferred/mutual-src.txtdeleted−7

This diff is too big to show here.

tests/type-deferred/nested-src.txtdeleted−7

This diff is too big to show here.

tests/type-deferred/principal-src.txtdeleted−11

This diff is too big to show here.

tests/type-direct-gate/about.txtdeleted−4

This diff is too big to show here.

tests/type-direct-gate/expected.txtdeleted−86

This diff is too big to show here.

tests/type-direct-gate/source.txtdeleted−96

This diff is too big to show here.

tests/type-empty/about.txtdeleted−3

This diff is too big to show here.

tests/type-empty/dead.txtdeleted−7

This diff is too big to show here.

tests/type-empty/expected.txtdeleted−59

This diff is too big to show here.

tests/type-empty/face-source.txtdeleted−2

This diff is too big to show here.

tests/type-empty/good.txtdeleted−11

This diff is too big to show here.

tests/type-empty/late-cap.txtdeleted−16

This diff is too big to show here.

tests/type-empty/list-dead.txtdeleted−4

This diff is too big to show here.

tests/type-empty/list-live.txtdeleted−3

This diff is too big to show here.

tests/type-empty/list-open.txtdeleted−3

This diff is too big to show here.

tests/type-empty/missing.txtdeleted−6

This diff is too big to show here.

tests/type-empty/overlap.txtdeleted−3

This diff is too big to show here.

tests/type-empty/standard-good.txtdeleted−11

This diff is too big to show here.

tests/type-empty/unit-dead.txtdeleted−4

This diff is too big to show here.

tests/type-full-overlap/about.txtdeleted−3

This diff is too big to show here.

tests/type-full-overlap/child.txtdeleted−4

This diff is too big to show here.

tests/type-full-overlap/distinct.txtdeleted−5

This diff is too big to show here.

tests/type-full-overlap/duplicate-generic.txtdeleted−4

This diff is too big to show here.

tests/type-full-overlap/duplicate.txtdeleted−5

This diff is too big to show here.

tests/type-full-overlap/expected-basic.txtdeleted−16

This diff is too big to show here.

tests/type-full-overlap/expected-graph.txtdeleted−8

This diff is too big to show here.

tests/type-full-overlap/generic.txtdeleted−4

This diff is too big to show here.

tests/type-full-overlap/invalid.txtdeleted−4

This diff is too big to show here.

tests/type-full-overlap/parent.txtdeleted−5

This diff is too big to show here.

tests/type-full-overlap/precedence.txtdeleted−5

This diff is too big to show here.

tests/type-full-overlap/same.txtdeleted−4

This diff is too big to show here.

tests/type-full-overlap/unsupported.txtdeleted−4

This diff is too big to show here.

tests/type-full-overlap/zero.txtdeleted−4

This diff is too big to show here.

tests/type-gate-free/about.txtdeleted−1

This diff is too big to show here.

tests/type-gate-free/expected.txtdeleted−9

This diff is too big to show here.

tests/type-gate-free/todo-gate.txtdeleted−40

This diff is too big to show here.

tests/type-gate-free/todo-noun.txtdeleted−40

This diff is too big to show here.

tests/type-gate-free/todo.txtdeleted−40

This diff is too big to show here.

tests/type-generic-construction/about.txtdeleted−9

This diff is too big to show here.

tests/type-generic-construction/alias-client.txtdeleted−12

This diff is too big to show here.

tests/type-generic-construction/alias.txtdeleted−3

This diff is too big to show here.

tests/type-generic-construction/client.txtdeleted−24

This diff is too big to show here.

tests/type-generic-construction/expected.txtdeleted−65

This diff is too big to show here.

tests/type-generic-construction/no-event-client.txtdeleted−8

This diff is too big to show here.

tests/type-generic-construction/owner-negative.txtdeleted−10

This diff is too big to show here.

tests/type-generic-construction/owner-positive.txtdeleted−9

This diff is too big to show here.

tests/type-generic-construction/sibling-values.txtdeleted−4

This diff is too big to show here.

tests/type-generic-construction/tree-no-event.txtdeleted−4

This diff is too big to show here.

tests/type-generic-construction/tree.txtdeleted−6

This diff is too big to show here.

tests/type-generic-pattern/about.txtdeleted−10

This diff is too big to show here.

tests/type-generic-pattern/client.txtdeleted−166

This diff is too big to show here.

tests/type-generic-pattern/expected.txtdeleted−91

This diff is too big to show here.

tests/type-generic-pattern/no-event.txtdeleted−17

This diff is too big to show here.

tests/type-generic-pattern/owner-bad.txtdeleted−22

This diff is too big to show here.

tests/type-generic-pattern/owner.txtdeleted−18

This diff is too big to show here.

tests/type-generic-pattern/poly-values.txtdeleted−2

This diff is too big to show here.

tests/type-generic-pattern/values.txtdeleted−18

This diff is too big to show here.

tests/type-generic-recursion/about.txtdeleted−14

This diff is too big to show here.

tests/type-generic-recursion/alias.txtdeleted−3

This diff is too big to show here.

tests/type-generic-recursion/bad-constructor.txtdeleted−8

This diff is too big to show here.

tests/type-generic-recursion/bad-match.txtdeleted−10

This diff is too big to show here.

tests/type-generic-recursion/bad-mold.txtdeleted−8

This diff is too big to show here.

tests/type-generic-recursion/bad-parameter.txtdeleted−6

This diff is too big to show here.

tests/type-generic-recursion/chain.txtdeleted−3

This diff is too big to show here.

tests/type-generic-recursion/client.txtdeleted−11

This diff is too big to show here.

tests/type-generic-recursion/expected.txtdeleted−35

This diff is too big to show here.

tests/type-generic-recursion/list-shadow.txtdeleted−4

This diff is too big to show here.

tests/type-generic-recursion/local-distinct.txtdeleted−11

This diff is too big to show here.

tests/type-generic-recursion/local-only.txtdeleted−11

This diff is too big to show here.

tests/type-generic-recursion/local-shadow.txtdeleted−11

This diff is too big to show here.

tests/type-generic-recursion/tree-changed.txtdeleted−6

This diff is too big to show here.

tests/type-generic-recursion/tree.txtdeleted−6

This diff is too big to show here.

tests/type-import-overlap/about.txtdeleted−24

This diff is too big to show here.

tests/type-import-overlap/expected.txtdeleted−26

This diff is too big to show here.

tests/type-import-overlap/source.txtdeleted−4

This diff is too big to show here.

tests/type-import-overlap/sur.txtdeleted−17

This diff is too big to show here.

tests/type-import-structural/about.txtdeleted−14

This diff is too big to show here.

tests/type-import-structural/expected.txtdeleted−41

This diff is too big to show here.

tests/type-import-structural/source.txtdeleted−5

This diff is too big to show here.

tests/type-import-structural/sur.txtdeleted−12

This diff is too big to show here.

tests/type-import/about.txt+2−10

This diff is too big to show here.

tests/type-import/expected.txt+1−10

This diff is too big to show here.

tests/type-import/source.txt−5

This diff is too big to show here.

tests/type-import/sur.txt−3

This diff is too big to show here.

tests/type-list-alias/expected.txt+4−4

This diff is too big to show here.

tests/type-page-main/about.txtdeleted−3

This diff is too big to show here.

tests/type-page-main/arbitrary-main.txtdeleted−1

This diff is too big to show here.

tests/type-page-main/blog-api.txtdeleted−5

This diff is too big to show here.

tests/type-page-main/blog-index.txtdeleted−9

This diff is too big to show here.

tests/type-page-main/blog-sur.txtdeleted−6

This diff is too big to show here.

tests/type-page-main/card.txtdeleted−5

This diff is too big to show here.

tests/type-page-main/ctor-page.txtdeleted−10

This diff is too big to show here.

tests/type-page-main/diff-load.txtdeleted−11

This diff is too big to show here.

tests/type-page-main/hand-built-load.txtdeleted−14

This diff is too big to show here.

tests/type-page-main/index.txtdeleted−10

This diff is too big to show here.

tests/type-page-main/indirect-load.txtdeleted−11

This diff is too big to show here.

tests/type-page-main/page-alias.txtdeleted−11

This diff is too big to show here.

tests/type-page-main/posts-mark.txtdeleted−6

This diff is too big to show here.

tests/type-page-main/pure-load.txtdeleted−10

This diff is too big to show here.

tests/type-page-main/static.txtdeleted−7

This diff is too big to show here.

tests/type-page-main/todo-api.txtdeleted−13

This diff is too big to show here.

tests/type-page-main/todo-island.txtdeleted−40

This diff is too big to show here.

tests/type-page-main/typed-load.txtdeleted−8

This diff is too big to show here.

tests/type-page-main/wrong-static.txtdeleted−1

This diff is too big to show here.

tests/type-program-main/about.txtdeleted−1

This diff is too big to show here.

tests/type-program-main/alias-main.txtdeleted−11

This diff is too big to show here.

tests/type-program-main/arbitrary-main.txtdeleted−10

This diff is too big to show here.

tests/type-program-main/consumer.txtdeleted−2

This diff is too big to show here.

tests/type-program-main/gate-data.txtdeleted−10

This diff is too big to show here.

tests/type-program-main/gate-model.txtdeleted−11

This diff is too big to show here.

tests/type-program-main/initializer-consumer.txtdeleted−2

This diff is too big to show here.

tests/type-program-main/initializer-earlier.txtdeleted−10

This diff is too big to show here.

tests/type-program-main/initializer-error.txtdeleted−10

This diff is too big to show here.

tests/type-program-main/initializer-generic.txtdeleted−10

This diff is too big to show here.

tests/type-program-main/initializer-message.txtdeleted−13

This diff is too big to show here.

tests/type-program-main/initializer-missing.txtdeleted−9

This diff is too big to show here.

tests/type-program-main/initializer-model.txtdeleted−11

This diff is too big to show here.

tests/type-program-main/initializer-no-main.txtdeleted−10

This diff is too big to show here.

tests/type-program-main/initializer-subs.txtdeleted−10

This diff is too big to show here.

tests/type-program-main/initializer-tag.txtdeleted−13

This diff is too big to show here.

tests/type-program-main/initializer-unfaced.txtdeleted−10

This diff is too big to show here.

tests/type-program-main/initializer.txtdeleted−12

This diff is too big to show here.

tests/type-program-main/mismatched-model.txtdeleted−10

This diff is too big to show here.

tests/type-program-main/nonempty-subs.txtdeleted−12

This diff is too big to show here.

tests/type-program-main/open-message.txtdeleted−7

This diff is too big to show here.

tests/type-program-main/source.txtdeleted−12

This diff is too big to show here.

tests/type-program-update/consumer.txtdeleted−2

This diff is too big to show here.

tests/type-program-update/malformed-sample.txtdeleted−9

This diff is too big to show here.

tests/type-program-update/missing-list.txtdeleted−15

This diff is too big to show here.

tests/type-program-update/non-main.txtdeleted−14

This diff is too big to show here.

tests/type-program-update/source.txtdeleted−15

This diff is too big to show here.

tests/type-program-update/three-slot-sample.txtdeleted−9

This diff is too big to show here.

tests/type-program-update/unrelated-tag.txtdeleted−16

This diff is too big to show here.

tests/type-program-update/wrong-message.txtdeleted−10

This diff is too big to show here.

tests/type-program-update/wrong-model.txtdeleted−12

This diff is too big to show here.

tests/type-program-update/wrong-result.txtdeleted−12

This diff is too big to show here.

tests/type-program-watch/about.txtdeleted−1

This diff is too big to show here.

tests/type-store/basket.txtdeleted−32

This diff is too big to show here.

tests/type-store/cart.txtdeleted−13

This diff is too big to show here.

tests/type-theme/dark-absent.txtdeleted−8

This diff is too big to show here.

tests/type-theme/missing-field.txtdeleted−7

This diff is too big to show here.

tests/type-theme/source.txtdeleted−8

This diff is too big to show here.

tests/type-theme/wrong-dark.txtdeleted−8

This diff is too big to show here.

tests/type-theme/wrong-font.txtdeleted−8

This diff is too big to show here.

tests/type-theme/wrong-nested-aura.txtdeleted−8

This diff is too big to show here.

tests/type-todo-api/about.txtdeleted−1

This diff is too big to show here.

tests/type-todo-api/expected.txtdeleted−17

This diff is too big to show here.

tests/type-todo-api/negative-expected.txtdeleted−26

This diff is too big to show here.

tests/type-todo-api/negative.txtdeleted−12

This diff is too big to show here.

tests/type-todo-api/source.txtdeleted−21

This diff is too big to show here.

tests/type-todo-api/unsupported.txtdeleted−13

This diff is too big to show here.

tests/type-todo-full/about.txtdeleted−3

This diff is too big to show here.

tests/type-todo-full/alias.txtdeleted−42

This diff is too big to show here.

tests/type-todo-full/ambiguous-mapper.txtdeleted−41

This diff is too big to show here.

tests/type-todo-full/expected.txtdeleted−2

This diff is too big to show here.

tests/type-todo-full/non-gate-view.txtdeleted−33

This diff is too big to show here.

tests/type-todo-full/open-key.txtdeleted−40

This diff is too big to show here.

tests/type-todo-full/wrong-message.txtdeleted−40

This diff is too big to show here.

tests/type-todo-full/wrong-model.txtdeleted−40

This diff is too big to show here.

tests/type-todo-full/wrong-result.txtdeleted−40

This diff is too big to show here.

tests/type-todo-full/wrong-watch.txtdeleted−40

This diff is too big to show here.

tests/type-todo-partial/about.txtdeleted−4

This diff is too big to show here.

tests/type-todo-partial/expected.txtdeleted−17

This diff is too big to show here.

tests/type-union-alias-overlap/duplicate.txtdeleted−5

This diff is too big to show here.

tests/type-union-alias-overlap/expected.txtdeleted−25

This diff is too big to show here.

tests/type-union-alias-overlap/flag-source.txtdeleted−7

This diff is too big to show here.

tests/type-union-alias-overlap/multi.txtdeleted−5

This diff is too big to show here.

tests/type-union-alias-overlap/negative.txtdeleted−16

This diff is too big to show here.

tests/type-union-alias-overlap/nonzero.txtdeleted−4

This diff is too big to show here.

tests/type-union-alias-overlap/opaque.txtdeleted−4

This diff is too big to show here.

tests/type-union-alias-overlap/positive.txtdeleted−8

This diff is too big to show here.

tests/type-union-alias-overlap/qualified.txtdeleted−5

This diff is too big to show here.

tests/type-union-alias-overlap/wrong.txtdeleted−5

This diff is too big to show here.

tests/type-union-source/direct-source.txtdeleted−3

This diff is too big to show here.

tests/type-union-source/duplicate-params.txtdeleted−4

This diff is too big to show here.

tests/type-union-source/duplicate.txtdeleted−5

This diff is too big to show here.

tests/type-union-source/expected.txtdeleted−36

This diff is too big to show here.

tests/type-union-source/free-source.txtdeleted−4

This diff is too big to show here.

tests/type-union-source/good.txtdeleted−9

This diff is too big to show here.

tests/type-union-source/hidden-ref.txtdeleted−5

This diff is too big to show here.

tests/type-union-source/late-source.txtdeleted−4

This diff is too big to show here.

tests/type-union-source/mixed-source.txtdeleted−8

This diff is too big to show here.

tests/type-union-source/nested.txtdeleted−4

This diff is too big to show here.

tests/type-union-source/qualified.txtdeleted−4

This diff is too big to show here.

tests/type-union-source/same.txtdeleted−5

This diff is too big to show here.

tests/type-union-source/shadow-source.txtdeleted−7

This diff is too big to show here.

tests/type-union-source/wide-source.txtdeleted−4

This diff is too big to show here.

tests/type-union-source/wrong.txtdeleted−5

This diff is too big to show here.

tests/type-union-source/zero.txtdeleted−5

This diff is too big to show here.

tools/testdata/lead-late-hoon-reference.hoondeleted−24

This diff is too big to show here.

tools/testdata/ship-selftest+1−136

This diff is too big to show here.

tools/testdata/succ-hoon-reference.hoondeleted−9

This diff is too big to show here.

tools/testdata/zing-hoon-reference.hoondeleted−17

This diff is too big to show here.

tools/type-cell-branch-testdeleted−43

This diff is too big to show here.

tools/type-closed-gate-guards-testdeleted−29

This diff is too big to show here.

tools/type-constructor-fit-guards-testdeleted−29

This diff is too big to show here.

tools/type-deferred-context-testdeleted−31

This diff is too big to show here.

tools/type-deferred-prepared-testdeleted−49

This diff is too big to show here.

tools/type-deferred-resolver-testdeleted−33

This diff is too big to show here.

tools/type-deferred-testdeleted−32

This diff is too big to show here.

tools/type-direct-gate-testdeleted−64

This diff is too big to show here.

tools/type-empty-testdeleted−55

This diff is too big to show here.

tools/type-full-overlap-testdeleted−49

This diff is too big to show here.

tools/type-gate-free-guards-testdeleted−29

This diff is too big to show here.

tools/type-gate-free-source-testdeleted−50

This diff is too big to show here.

tools/type-generic-construction-testdeleted−49

This diff is too big to show here.

tools/type-generic-pattern-testdeleted−52

This diff is too big to show here.

tools/type-generic-recursion-testdeleted−61

This diff is too big to show here.

tools/type-import-overlap-testdeleted−33

This diff is too big to show here.

tools/type-import-structural-testdeleted−36

This diff is too big to show here.

tools/type-nested-union-guards-testdeleted−29

This diff is too big to show here.

tools/type-page-main-testdeleted−86

This diff is too big to show here.

tools/type-program-init-testdeleted−49

This diff is too big to show here.

tools/type-program-main-testdeleted−46

This diff is too big to show here.

tools/type-program-update-testdeleted−46

This diff is too big to show here.

tools/type-program-watch-testdeleted−48

This diff is too big to show here.

tools/type-request-guards-testdeleted−31

This diff is too big to show here.

tools/type-store-testdeleted−41

This diff is too big to show here.

tools/type-sub-guards-testdeleted−31

This diff is too big to show here.

tools/type-theme-testdeleted−44

This diff is too big to show here.

tools/type-todo-api-testdeleted−62

This diff is too big to show here.

tools/type-todo-full-testdeleted−98

This diff is too big to show here.

tools/type-todo-partial-testdeleted−55

This diff is too big to show here.

tools/type-union-alias-overlap-testdeleted−52

This diff is too big to show here.

tools/type-union-source-testdeleted−55

This diff is too big to show here.