on master help sign in
Infer top-level mutually recursive gates
commitddba6330d4ec097dbbcedbaa1c86cccc6a4653fb authoriko <mail@iko.soy> dateFri 30 Oct 2026, 23:37 (1 day ago) parent98c19cd
52 files changed+1230−167
docs/compiler.md+1−1 docs/status.md+5−5 jibb-dev/lib/jibb.hoon+337−5 tests/golden/types-recursion-scc-failures/about.txt+4 tests/golden/types-recursion-scc-failures/modules.txt+1 tests/golden/types-recursion-scc-failures/source.jibb+11 tests/golden/types-recursion-scc-failures/tokens.txt+90 tests/golden/types-recursion-scc-failures/tree.txt+45 tests/golden/types-recursion-scc-failures/types.txt+10 tests/golden/types-recursion-scc-groups/about.txt+4 tests/golden/types-recursion-scc-groups/modules.txt+1 tests/golden/types-recursion-scc-groups/source.jibb+9 tests/golden/types-recursion-scc-groups/tokens.txt+91 tests/golden/types-recursion-scc-groups/tree.txt+42 tests/golden/types-recursion-scc-groups/types.txt+10 tests/golden/types-recursion-scc-import-bad/about.txt+4 tests/golden/types-recursion-scc-import-bad/module-trees.txt+16 tests/golden/types-recursion-scc-import-bad/modules.txt+1 tests/golden/types-recursion-scc-import-bad/modules/ui/lib.jibb+3 tests/golden/types-recursion-scc-import-bad/source.jibb+2 tests/golden/types-recursion-scc-import-bad/tokens.txt+14 tests/golden/types-recursion-scc-import-bad/tree.txt+5 tests/golden/types-recursion-scc-import-bad/types.txt+2 tests/golden/types-recursion-scc-import/about.txt+4 tests/golden/types-recursion-scc-import/module-trees.txt+12 tests/golden/types-recursion-scc-import/modules.txt+1 tests/golden/types-recursion-scc-import/modules/ui/lib.jibb+2 tests/golden/types-recursion-scc-import/source.jibb+3 tests/golden/types-recursion-scc-import/tokens.txt+25 tests/golden/types-recursion-scc-import/tree.txt+12 tests/golden/types-recursion-scc-import/types.txt+3 tests/golden/types-recursion-scc-local/about.txt+4 tests/golden/types-recursion-scc-local/modules.txt+1 tests/golden/types-recursion-scc-local/source.jibb+11 tests/golden/types-recursion-scc-local/tokens.txt+80 tests/golden/types-recursion-scc-local/tree.txt+39 tests/golden/types-recursion-scc-local/types.txt+4 tests/golden/types-recursion-scc-order/about.txt+4 tests/golden/types-recursion-scc-order/modules.txt+1 tests/golden/types-recursion-scc-order/source.jibb+4 tests/golden/types-recursion-scc-order/tokens.txt+33 tests/golden/types-recursion-scc-order/tree.txt+15 tests/golden/types-recursion-scc-order/types.txt+5 tests/golden/types-recursion-scc-shadow/about.txt+4 tests/golden/types-recursion-scc-shadow/modules.txt+1 tests/golden/types-recursion-scc-shadow/source.jibb+3 tests/golden/types-recursion-scc-shadow/tokens.txt+30 tests/golden/types-recursion-scc-shadow/tree.txt+15 tests/golden/types-recursion-scc-shadow/types.txt+4 tests/golden/types-recursive-gate/about.txt+1−1 tests/golden/types-recursive-gate/types.txt+2−2 tests/lib/jibb.hoon+199−153
docs/compiler.md+1−1
@@ -56,7 +56,7 @@ The core is split into chapters, `+| %name`, in this order:
5656| `%span-check` | `+check-spans`, which `+golden` runs on every tree, and `+check-spans-test` |
5757| `%type-inference` | The initial inference fragment and its unification helpers; not yet a module type checker |
5858
59−The inference fragment supports fixed auras, unrestricted `@`, one-way widening into it and toward aura-family ancestors, generic variables and gates, faced and unfaced cells, cell sample binders, known record field reads, a two-binder cell pattern, a complete two-arm loobean branch, a complete two-arm unit-shaped branch, closed local mold aliases and acyclic forward value references. For a supported single syntactic top-level recursive gate, the checker infers the sample first and uses that exact sample, including its field faces, in a monomorphic self placeholder. The completed body must unify with the placeholder before the gate is generalized; incompatible recursive arguments can report the call and argument sites. Uses of generalized top-level definitions instantiate their schemes independently. For a complete loobean branch with one direct self-call arm, the checker can infer the other arm independently and use its closed, fully resolved type to seed the recursive result; it then checks the whole body. Open or pending base types do not seed the result, and other branch shapes still depend on the existing partial inference. 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. Mutual recursive groups, polymorphic recursion and value cycles remain unsupported. Acyclic simple local mold aliases can also refer forward, and are scoped to the body, not its gate's sample. Nonrecursive generic aliases of supported molds can be applied at exact arity, including locally and through library interfaces; their parameters are lexical. Closed, provably disjoint nonrecursive unions and tagged single-case molds support contextual term values, `~` and `|=%tag` constructors. A null-headed cell can match a union case but does not supply a `|=%$` constructor; unresolved tags and nulls remain pending, with distinct partial-inference diagnostics. Nonrecursive top-level generic union molds with provably disjoint cases also support contextual tags and constructors at exact arity; their arguments are retained through generalization and supported library interfaces. Nonrecursive generic aliases can reorder, repeat or omit parameters while preserving a supported union’s origin, including through local scopes and library interfaces. A generic union declared directly inside a body remains unsupported, as do mutually recursive local groups and recursive molds. A value with type variable `A` can fit a field whose type is that same `A`, including in generic union payloads and nested or repeated record fields. A differing-variable face constraint remains unsupported. When inference forces two distinct explicitly written capitals equal, it reports both source sites; forcing a capital to a concrete type remains unsupported in this fragment. It can infer and generalize atom constraints arising from explicit capitals or bare sample binders, preserve those constraints through aliases, instantiate them independently, and print multiple constraints. Unresolved decimal variables default to `@ud` for inferred types without gates; defaulting inside gate types and other constraint cases remain incomplete. It does not yet check a module, complete imports, general patterns, general deferred constraints, recursive molds, dependency cycles or most errors with both conflicting excerpts. Definite cast and call mismatches, incompatible branches and overlapping union cases report both sites and excerpts. Concrete branch results can join at an explicitly present parent aura or `@`. Some known tuple and record positions acquire matching faces; other variable-dependent face merges, general branch tag context and ambiguous call-result propagation remain unsupported; function compatibility involving nested `@` and variable-dependent joins remain unsupported except for equal types. The reporting path repeats inference of a recursive gate rather than instantiating its generalized interface inside its own body. This adds work, and the current dependency pass can take quadratic time on long forward chains; the milestone's speed target remains unverified. A separate conservative pass reports unions whose cases are provably disjoint or overlapping and leaves other cases unresolved; it does not claim the mold is checked. Unsupported forms are reported as such, and the partial output says the module has not been checked.
59+The inference fragment supports fixed auras, unrestricted `@`, one-way widening into it and toward aura-family ancestors, generic variables and gates, faced and unfaced cells, cell sample binders, known record field reads, a two-binder cell pattern, a complete two-arm loobean branch, a complete two-arm unit-shaped branch, closed local mold aliases and acyclic forward value references. For a supported single syntactic top-level recursive gate, the checker infers the sample first and uses that exact sample, including its field faces, in a monomorphic self placeholder. The completed body must unify with the placeholder before the gate is generalized; incompatible recursive arguments can report the call and argument sites. Uses of generalized top-level definitions instantiate their schemes independently. For a complete loobean branch with one direct self-call arm, the checker can infer the other arm independently and use its closed, fully resolved type to seed the recursive result; it then checks the whole body. Open or pending base types do not seed the result, and other branch shapes still depend on the existing partial inference. 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. Local mutual groups, polymorphic recursion, value cycles, unresolved literal constraints and unresolved branch joins remain unsupported. Acyclic simple local mold aliases can also refer forward, and are scoped to the body, not its gate's sample. Nonrecursive generic aliases of supported molds can be applied at exact arity, including locally and through library interfaces; their parameters are lexical. Closed, provably disjoint nonrecursive unions and tagged single-case molds support contextual term values, `~` and `|=%tag` constructors. A null-headed cell can match a union case but does not supply a `|=%$` constructor; unresolved tags and nulls remain pending, with distinct partial-inference diagnostics. Nonrecursive top-level generic union molds with provably disjoint cases also support contextual tags and constructors at exact arity; their arguments are retained through generalization and supported library interfaces. Nonrecursive generic aliases can reorder, repeat or omit parameters while preserving a supported union’s origin, including through local scopes and library interfaces. A generic union declared directly inside a body remains unsupported, as do mutually recursive local groups and recursive molds. A value with type variable `A` can fit a field whose type is that same `A`, including in generic union payloads and nested or repeated record fields. A differing-variable face constraint remains unsupported. When inference forces two distinct explicitly written capitals equal, it reports both source sites; forcing a capital to a concrete type remains unsupported in this fragment. It can infer and generalize atom constraints arising from explicit capitals or bare sample binders, preserve those constraints through aliases, instantiate them independently, and print multiple constraints. Unresolved decimal variables default to `@ud` for inferred types without gates; defaulting inside gate types and other constraint cases remain incomplete. It does not yet check a module, complete imports, general patterns, general deferred constraints, recursive molds, dependency cycles or most errors with both conflicting excerpts. Definite cast and call mismatches, incompatible branches and overlapping union cases report both sites and excerpts. Concrete branch results can join at an explicitly present parent aura or `@`. Some known tuple and record positions acquire matching faces; other variable-dependent face merges, general branch tag context and ambiguous call-result propagation remain unsupported; function compatibility involving nested `@` and variable-dependent joins remain unsupported except for equal types. For a single recursive gate outside a group, the reporting path repeats inference rather than instantiating its generalized interface inside its own body; a group report uses its stored schemes. This adds work, and the current dependency pass can take quadratic time on long forward chains; the milestone's speed target remains unverified. A separate conservative pass reports unions whose cases are provably disjoint or overlapping and leaves other cases unresolved; it does not claim the mold is checked. Unsupported forms are reported as such, and the partial output says the module has not been checked.
6060
6161String 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.
6262
docs/status.md+5−5
@@ -19,7 +19,7 @@ On 2026-10-30, @iko decided that Jibb drops `$?`, so a `+$` takes a union's case
1919
2020## Milestone 2: in progress
2121
22−The repository spec records the subsequent type-system and prelude decisions; those changes also need synchronization to the Claude document. An initial inference fragment and a standalone Hoon type reader are being tested. The fragment explicitly reports that it does not check a module; partial bridges pass selected Hoon atoms, term singletons, nested faced or unfaced cells, supported disjoint unions and opaque standard collections from `/sur` molds and marks into inference. Collections retain their names and supported arguments for printing and unification; nested supported union arguments are retained too. The bridge trusts unchanged results from the source-aware reader; a materialized type graph alone cannot reveal cases Hoon already collapsed. The source-validated standard prelude `list` mold shares this representation with imported lists; other Jibb-written collection molds and most prelude collection operations remain unsupported; malformed names and arities fail closed. Selected self-recursive `/sur` molds cross as opaque module-and-name identities; aliases, foreign references, recursive marks, unfolding and construction remain unsupported. The reader handles mark samples, recursive molds whose origins can be verified through Ford imports, nested collections, direct ordered maps, certain ordered-map fields, direct `$^` unions whose cases can be proved disjoint, and one verified explicit union argument in a list, set, map or unit. Ambiguous recursive origins fail closed; recognizable explicit unions are checked from source before Hoon can collapse their cases, as @iko confirmed for imported `$%`, `$?` and `$^`, while other nested unions, nested ordered maps, general union disjointness and complete import integration remain unfinished. Opt-in structured reader APIs preserve successful graphs and distinguish definite unsupported-aura and core evidence from failures the reader cannot prove; unverified union disjointness and name-only vase recognition remain unsupported. They revalidate and re-walk failed types. An opt-in partial checker entry point consumes unchanged reader results and reports definite aura or core errors at imported mold use sites when their inputs are unique. Ordered replay covers nested cell samples, record and function casts, and non-generic same-module aliases; unsupported prefixes, cycles and shadowing stop it. Union molds, generic applications, transitive modules and unsupported reader outcomes remain generic. Replay repeats inference and may add work. The partial checker resolves a subset of ordinary library imports in dependency order using supplied Jibb sources and a source-derived partial prelude interface, caches completed interfaces per run, and detects missing sources and cycles. It does not yet check API or kind semantics, and the prelude inventory is incomplete. The inference fragment supports unrestricted `@`, selected one-way widenings including aura-family ancestors, generalized atom constraints arising from explicit capitals or bare sample binders, acyclic local value definitions with captures, selected single self-recursive top-level and local gates, simple and nonrecursive generic mold aliases, selected faced record casts and field reads, and contextual tags, `~` and constructors for closed disjoint unions, including direct nonrecursive generic unions and propagation through complete loobean and unit-shaped branches in casts and known union-sample calls, including nested branches. Multi-argument calls form a right-nested sample, retain known faces and shared type variables, and can use known sample positions to contextualize list and union arguments. A definite mismatch points to the failing argument when the fragment can establish it, otherwise to the combined sample; unsupported contextual forms still fail closed. For a supported recursive gate, the checker infers the sample first and uses its exact type, including field faces, for one monomorphic self reference. It generalizes after the body is checked; subsequent uses instantiate it independently. Incompatible recursive arguments can report the gate and argument sites. For a complete loobean branch with one direct self-call arm, a separately inferred closed base type can seed the recursive result before the whole body is checked. Open or pending base types do not seed it; other branch shapes remain subject to the fragment’s existing limits. A supported single local recursive gate also uses a monomorphic self reference and generalizes variables free of the enclosing environment after checking its body; captured variables remain shared. The checker collects written capitals per `++` before inference, excluding nested definitions: a capital used in an enclosing definition is shared with its locals even when written later, while a capital introduced only in a local definition is generalized there. Sibling locals can introduce independent capitals with the same spelling; generic mold parameters keep their own scope. Mutual groups, polymorphic recursion and value cycles remain unsupported. Reporting repeats inference for a recursive gate, so its performance cost remains unmeasured. 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. Contextual null-headed cells fit their cases, but do not supply a `|=%$` constructor; unresolved nulls remain pending and are reported separately from tags. A known union of `~` and a null-headed cell supports a complete `~` / `[~ value]` branch in either order, including shadow checks; unknown subjects, missing or duplicate arms, and unresolved branch results remain unsupported. This fragment infers the prelude’s `fall` and `need` signatures. With the validated prelude list and a known cast or gate sample, empty, nonempty and nested list literals infer their element types, including contextual union tags; a mismatched element names both sites. In that context `~` and zero-valued terms fit an empty list, and two-item unfaced cells form cons lists, including nested cons and imported-list contexts; invalid heads or tails name both sites. Faced or longer cells and a missing or altered prelude list fail closed. A known list result also supplies context through complete loobean, unit-shaped and list-shaped branches, including recursive and nested branches. For a known standard list with a supported element type, a complete `~` / `[item rest]` branch infers the element and tail types in either arm order and checks binders for shadowing. Uncontextualized list construction, unknown subjects, unsupported element types and other or incomplete list patterns remain unsupported. A value with type variable `A` can fit a field whose type is that same `A`, including in generic union payloads and nested or repeated record fields. Other variable-dependent face merges remain unsupported. Forced equality of distinct written capitals now reports both source sites, following @iko’s decision; forcing one to a concrete type remains unsupported. Imported record spines with repeated faces fail closed where used, but only with a generic unsupported diagnostic. Hoon may erase unfaced nested-cell boundaries, so the check can conservatively reject valid names in distinct erased scopes. Supported closed unions print using an in-scope name or imported alias; an unnamed nongeneric union prints its cases, parenthesized when nested. The latter is print-only. Generic union types retain all arguments in their printed name; if that name is unavailable, the partial printer reports the limitation. Different import faces for the same origin remain compatible; compatibility across distinct union origins and some generic-argument comparisons remain unsupported. Nonrecursive generic aliases can reorder, repeat or omit parameters while retaining a union’s origin, including through local scopes and library interfaces. A generic union declared directly inside a body remains unsupported, as do differing-variable face constraints in a union payload. A transitive generic union whose name is unavailable is reported as unsupported instead of hiding its arguments. Unfixed decimal literals default to `@ud` in gate-free inferred types; mutually recursive local groups and recursive molds, general branch tag context, other constraint cases and defaulting inside gate types still need work. Collection recognition checks the originating core and fails closed on shadows or unsupported Ford subject shapes; a wrapper regression also rejects forged subjects, samples and tails. Its golden fixtures include three real Tlon files. A Clay test passes a Ford-built nested union through the reader into partial inference. The partial prelude includes `murn`, `join`, `snip`, `rear` and the newly agreed shared-type `clap`, parsed but still awaiting checker and backend validation, and [prelude-inventory.md](prelude-inventory.md) is a source audit, not the complete inventory or signatures. The milestone remains unfinished.
22+The repository spec records the subsequent type-system and prelude decisions; those changes also need synchronization to the Claude document. An initial inference fragment and a standalone Hoon type reader are being tested. The fragment explicitly reports that it does not check a module; partial bridges pass selected Hoon atoms, term singletons, nested faced or unfaced cells, supported disjoint unions and opaque standard collections from `/sur` molds and marks into inference. Collections retain their names and supported arguments for printing and unification; nested supported union arguments are retained too. The bridge trusts unchanged results from the source-aware reader; a materialized type graph alone cannot reveal cases Hoon already collapsed. The source-validated standard prelude `list` mold shares this representation with imported lists; other Jibb-written collection molds and most prelude collection operations remain unsupported; malformed names and arities fail closed. Selected self-recursive `/sur` molds cross as opaque module-and-name identities; aliases, foreign references, recursive marks, unfolding and construction remain unsupported. The reader handles mark samples, recursive molds whose origins can be verified through Ford imports, nested collections, direct ordered maps, certain ordered-map fields, direct `$^` unions whose cases can be proved disjoint, and one verified explicit union argument in a list, set, map or unit. Ambiguous recursive origins fail closed; recognizable explicit unions are checked from source before Hoon can collapse their cases, as @iko confirmed for imported `$%`, `$?` and `$^`, while other nested unions, nested ordered maps, general union disjointness and complete import integration remain unfinished. Opt-in structured reader APIs preserve successful graphs and distinguish definite unsupported-aura and core evidence from failures the reader cannot prove; unverified union disjointness and name-only vase recognition remain unsupported. They revalidate and re-walk failed types. An opt-in partial checker entry point consumes unchanged reader results and reports definite aura or core errors at imported mold use sites when their inputs are unique. Ordered replay covers nested cell samples, record and function casts, and non-generic same-module aliases; unsupported prefixes, cycles and shadowing stop it. Union molds, generic applications, transitive modules and unsupported reader outcomes remain generic. Replay repeats inference and may add work. The partial checker resolves a subset of ordinary library imports in dependency order using supplied Jibb sources and a source-derived partial prelude interface, caches completed interfaces per run, and detects missing sources and cycles. It does not yet check API or kind semantics, and the prelude inventory is incomplete. The inference fragment supports unrestricted `@`, selected one-way widenings including aura-family ancestors, generalized atom constraints arising from explicit capitals or bare sample binders, acyclic local value definitions with captures, selected single self-recursive top-level and local gates, simple and nonrecursive generic mold aliases, selected faced record casts and field reads, and contextual tags, `~` and constructors for closed disjoint unions, including direct nonrecursive generic unions and propagation through complete loobean and unit-shaped branches in casts and known union-sample calls, including nested branches. Multi-argument calls form a right-nested sample, retain known faces and shared type variables, and can use known sample positions to contextualize list and union arguments. A definite mismatch points to the failing argument when the fragment can establish it, otherwise to the combined sample; unsupported contextual forms still fail closed. For a supported recursive gate, the checker infers the sample first and uses its exact type, including field faces, for one monomorphic self reference. It generalizes after the body is checked; subsequent uses instantiate it independently. Incompatible recursive arguments can report the gate and argument sites. For a complete loobean branch with one direct self-call arm, a separately inferred closed base type can seed the recursive result before the whole body is checked. Open or pending base types do not seed it; other branch shapes remain subject to the fragment’s existing limits. A supported single local recursive gate also uses a monomorphic self reference and generalizes variables free of the enclosing environment after checking its body; captured variables remain shared. The checker collects written capitals per `++` before inference, excluding nested definitions: a capital used in an enclosing definition is shared with its locals even when written later, while a capital introduced only in a local definition is generalized there. Sibling locals can introduce independent capitals with the same spelling; generic mold parameters keep their own scope. Top-level groups of syntactic gates are inferred together with monomorphic placeholders and shared substitutions, then generalized only after the whole group checks; downstream uses and library interfaces instantiate those schemes independently. A dependency graph identifies groups with two iterative depth-first passes; its conservative local-reference edges can reject otherwise valid programs. Local mutual groups, polymorphic recursion, value cycles, 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. 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. Contextual null-headed cells fit their cases, but do not supply a `|=%$` constructor; unresolved nulls remain pending and are reported separately from tags. A known union of `~` and a null-headed cell supports a complete `~` / `[~ value]` branch in either order, including shadow checks; unknown subjects, missing or duplicate arms, and unresolved branch results remain unsupported. This fragment infers the prelude’s `fall` and `need` signatures. With the validated prelude list and a known cast or gate sample, empty, nonempty and nested list literals infer their element types, including contextual union tags; a mismatched element names both sites. In that context `~` and zero-valued terms fit an empty list, and two-item unfaced cells form cons lists, including nested cons and imported-list contexts; invalid heads or tails name both sites. Faced or longer cells and a missing or altered prelude list fail closed. A known list result also supplies context through complete loobean, unit-shaped and list-shaped branches, including recursive and nested branches. For a known standard list with a supported element type, a complete `~` / `[item rest]` branch infers the element and tail types in either arm order and checks binders for shadowing. Uncontextualized list construction, unknown subjects, unsupported element types and other or incomplete list patterns remain unsupported. A value with type variable `A` can fit a field whose type is that same `A`, including in generic union payloads and nested or repeated record fields. Other variable-dependent face merges remain unsupported. Forced equality of distinct written capitals now reports both source sites, following @iko’s decision; forcing one to a concrete type remains unsupported. Imported record spines with repeated faces fail closed where used, but only with a generic unsupported diagnostic. Hoon may erase unfaced nested-cell boundaries, so the check can conservatively reject valid names in distinct erased scopes. Supported closed unions print using an in-scope name or imported alias; an unnamed nongeneric union prints its cases, parenthesized when nested. The latter is print-only. Generic union types retain all arguments in their printed name; if that name is unavailable, the partial printer reports the limitation. Different import faces for the same origin remain compatible; compatibility across distinct union origins and some generic-argument comparisons remain unsupported. Nonrecursive generic aliases can reorder, repeat or omit parameters while retaining a union’s origin, including through local scopes and library interfaces. A generic union declared directly inside a body remains unsupported, as do differing-variable face constraints in a union payload. A transitive generic union whose name is unavailable is reported as unsupported instead of hiding its arguments. Unfixed decimal literals default to `@ud` in gate-free inferred types; mutually recursive local groups and recursive molds, general branch tag context, other constraint cases and defaulting inside gate types still need work. Collection recognition checks the originating core and fails closed on shadows or unsupported Ford subject shapes; a wrapper regression also rejects forged subjects, samples and tails. Its golden fixtures include three real Tlon files. A Clay test passes a Ford-built nested union through the reader into partial inference. The partial prelude includes `murn`, `join`, `snip`, `rear` and the newly agreed shared-type `clap`, parsed but still awaiting checker and backend validation, and [prelude-inventory.md](prelude-inventory.md) is a source audit, not the complete inventory or signatures. The milestone remains unfinished.
2323
2424The shared prelude interface reserves every name present in the supplied vendored source and makes only supported inferred entries available, including `list`, `unit`, `same`, `fall`, `need`, `lure`, `weld` and `snoc`. The validated standard `list` mold is injected when the prelude’s own gates are inferred; `weld` has an ordinary explicit result cast. An absent or altered `list` is not injected, and an altered declaration cannot leak through direct or transitive mold aliases. List-dependent prelude mold aliases remain unsupported because their templates are prepared before injection. Unsupported entries such as most list helpers remain reserved but unavailable; backend validation of the helpers remains outstanding. All callers use the same prelude origin, so a library can export a type containing unqualified `(unit A)` to another module. Preparation rejects empty, malformed, conflicting or import-bearing source; the prepared value is trusted and must come unchanged from `+prepare-prelude`. The module-scope fixture compares the prepared and source-taking paths against the real prelude and a two-module golden under eval and on the ship. The source and checker remain incomplete, so this does not establish complete shadowing coverage or a checked module.
2525
@@ -39,8 +39,8 @@ What the plan asks for, and where it is:
3939
4040Besides the plan's list:
4141
42−- 515 golden cases: 299 that parse and 216 that fail, each failure at a stated line and column. One failing case has an unclear expectation (corpus question 3). The newer type-output cases exercise only the partial inference fragment. Each case's `about.txt` quotes the doc's words it tests.
43−- The 515-case corpus passed under `urbit eval` in 58.3 s. The fake ship passed all 521 tests, including the importer, importer/checker and mark/checker bridges, module scope and unification checks, with 32.6 s for sync and 37.9 s for tests. The importer golden compares 149 projections; `tools/clay-fixtures` builds the example Hoon fixtures through Clay, checks a recursive Ford import's origin, and passes Clay-built types through the Clay-built importer and partial checker.
42+- 522 golden cases: 306 that parse and 216 that fail, each failure at a stated line and column. One failing case has an unclear expectation (corpus question 3). The newer type-output cases exercise only the partial inference fragment. Each case's `about.txt` quotes the doc's words it tests.
43+- The 522-case corpus passed under `urbit eval` in 62.7 s. The fake ship passed all 528 tests, including the importer, importer/checker and mark/checker bridges, module scope and unification checks, with 31.4 s for sync and 37.8 s for tests. The importer golden compares 149 projections; `tools/clay-fixtures` builds the example Hoon fixtures through Clay, checks a recursive Ford import's origin, and passes Clay-built types through the Clay-built importer and partial checker.
4444- `tools/testdata/selftest` (22 checks) and `tools/testdata/ship-selftest` test the tools themselves.
4545- Two independent audits before 7c739b7, one of which compared the library with a reference parser written in Python from the doc over about 19,000 generated programs. Before ab797a9, a second Python parser, written from the decisions, agreed with the library on 8,000 generated programs and 900 hand-written probes.
4646- Speed: starting `urbit eval` and building the library takes about 8 s. After that, a 2,000-line module of 400 definitions parses in about a second. Loops over definitions, arms, lines and items grow no stack; nesting costs a few stack frames a level, and 100,000 nested brackets still parse (library section 3).
@@ -99,7 +99,7 @@ Besides the plan's list:
9999On a machine set up as [development.md](development.md) says:
100100
101101```
102−tools/golden # 515 cases under urbit eval
102+tools/golden # 522 cases under urbit eval
103103tools/importer-test # the Hoon importer fixture projection
104104tools/type-import-test # the importer/checker bridge fixture
105105tools/type-mark-test # the mark/checker bridge fixture
@@ -109,7 +109,7 @@ tools/testdata/selftest # the tools themselves
109109tools/doc-blocks docs/spec # the doc's examples are golden cases
110110tools/ship start
111111tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
112−tools/ship test # the same 515 cases as -test arms on the ship
112+tools/ship test # the same 522 cases as -test arms on the ship
113113tools/testdata/ship-selftest
114114tools/ship check-commit # |commit stores .jibb files
115115tools/clay-fixtures # example /sur files and marks build through Clay
jibb-dev/lib/jibb.hoon+337−5
@@ -7337,6 +7337,208 @@
73377337 ?~ uni [%| ["recursive gate constraint is not supported by partial inference" ~]]
73387338 [%& [%fn typ.p.sam typ.p.out] state.p.out(sub u.uni)]
73397339::
7340+++ dependency-root
7341+ |= names=(list term)
7342+ ^- (list term)
7343+ ?~ names ~
7344+ ~[(rear names)]
7345+::
7346+++ dependency-exprs
7347+ |= xs=(list expr)
7348+ ^- (list term)
7349+ ?~ xs ~
7350+ =/ first=(list term) (dependency-expr i.xs)
7351+ (weld first $(xs t.xs))
7352+::
7353+++ dependency-pieces
7354+ |= xs=(list piece)
7355+ ^- (list term)
7356+ ?~ xs ~
7357+ =/ first=(list term)
7358+ ?- -.i.xs
7359+ %expr (dependency-expr p.i.xs)
7360+ %text ~
7361+ ==
7362+ (weld first $(xs t.xs))
7363+::
7364+++ dependency-qsegs
7365+ |= xs=(list qseg)
7366+ ^- (list term)
7367+ ?~ xs ~
7368+ =/ first=(list term)
7369+ ?- -.i.xs
7370+ %expr (dependency-expr p.i.xs)
7371+ %knot ~
7372+ ==
7373+ (weld first $(xs t.xs))
7374+::
7375+++ dependency-items
7376+ |= xs=(list item)
7377+ ^- (list term)
7378+ ?~ xs ~
7379+ =/ first=(list term) (dependency-expr val.i.xs)
7380+ (weld first $(xs t.xs))
7381+::
7382+++ dependency-edits
7383+ |= xs=(list edit)
7384+ ^- (list term)
7385+ ?~ xs ~
7386+ =/ first=(list term) (dependency-expr val.i.xs)
7387+ (weld first $(xs t.xs))
7388+::
7389+++ dependency-arms
7390+ |= xs=(list arm)
7391+ ^- (list term)
7392+ ?~ xs ~
7393+ =/ first=(list term) (dependency-expr val.i.xs)
7394+ (weld first $(xs t.xs))
7395+::
7396+++ dependency-defs
7397+ |= xs=(list def)
7398+ ^- (list term)
7399+ ?~ xs ~
7400+ =/ first=(list term)
7401+ ?: ?=(%value -.i.xs) (dependency-expr val.i.xs)
7402+ ~
7403+ (weld first $(xs t.xs))
7404+::
7405+++ dependency-expr
7406+ |= e=expr
7407+ ^- (list term)
7408+ ?- -.e
7409+ %str (dependency-pieces pieces.e)
7410+ %qath (dependency-qsegs segs.e)
7411+ %wing (dependency-root names.e)
7412+ %change
7413+ =/ first=(list term) (dependency-root target.e)
7414+ =/ last=(list term) (dependency-edits edits.e)
7415+ (weld first last)
7416+ %pair (dependency-expr val.e)
7417+ %unit (dependency-expr val.e)
7418+ %group (dependency-expr inner.e)
7419+ %list (dependency-exprs items.e)
7420+ %tuple (dependency-items items.e)
7421+ %gate (dependency-expr body.e)
7422+ %gate-wide (dependency-expr body.e)
7423+ %call
7424+ =/ first=(list term) (dependency-expr head.e)
7425+ =/ last=(list term) (dependency-exprs args.e)
7426+ (weld first last)
7427+ %cast (dependency-expr val.e)
7428+ %trace
7429+ =/ first=(list term) (dependency-expr val.e)
7430+ =/ last=(list term) (dependency-expr then.e)
7431+ (weld first last)
7432+ %branch
7433+ =/ first=(list term) (dependency-expr subject.e)
7434+ =/ last=(list term) (dependency-arms arms.e)
7435+ (weld first last)
7436+ %body
7437+ =/ first=(list term) (dependency-defs defs.e)
7438+ =/ last=(list term) (dependency-expr final.e)
7439+ (weld first last)
7440+ * ~
7441+ ==
7442+::
7443+:: Infer a cyclic top-level component with one monomorphic seed per gate.
7444+:: All members must succeed before any scheme is available; local cyclic
7445+:: groups, pending constraints and unresolved branch joins remain partial.
7446++$ igate-entry [name=term typ=itype body=expr env=ienv caps=icaps]
7447++$ igate-seeds (each [entries=(list igate-entry) state=istate] idiag)
7448+++ seed-gate-group
7449+ |= [ds=(list def) env=ienv state=istate]
7450+ ^- igate-seeds
7451+ ?~ ds [%& [~ state]]
7452+ =/ d=def i.ds
7453+ ?. ?=(%value -.d) [%| ["recursive group contains a non-gate" ~]]
7454+ =/ gate=expr val.d
7455+ ?. |(?=(%gate -.gate) ?=(%gate-wide -.gate))
7456+ [%| ["recursive group contains a non-gate" ~]]
7457+ =/ initial=istate (reserve-def-caps gate state)
7458+ =/ sam=isample-result
7459+ ?- -.gate
7460+ %gate (infer-sample sample.gate env initial)
7461+ %gate-wide (infer-sample sample.gate env initial)
7462+ * !!
7463+ ==
7464+ ?: ?=(%| -.sam) [%| [p.sam ~]]
7465+ =/ body=expr
7466+ ?- -.gate
7467+ %gate body.gate
7468+ %gate-wide body.gate
7469+ * !!
7470+ ==
7471+ =/ seed=itype [%fn typ.p.sam [%var next.state.p.sam]]
7472+ =/ entry=igate-entry [name.d seed body env.p.sam caps.state.p.sam]
7473+ =/ after=istate state.p.sam(next +(next.state.p.sam), caps caps.state)
7474+ =/ rest=igate-seeds $(ds t.ds, state after)
7475+ ?: ?=(%| -.rest) rest
7476+ [%& [[entry entries.p.rest] state.p.rest]]
7477+::
7478+++ group-seed-env
7479+ |= [entries=(list igate-entry) env=ienv]
7480+ ^- ienv
7481+ ?~ entries env
7482+ [[name.i.entries [typ.i.entries ~]] $(entries t.entries)]
7483+::
7484+++ infer-gate-group-bodies
7485+ |= [entries=(list igate-entry) seeds=ienv state=istate]
7486+ ^- igate-seeds
7487+ ?~ entries [%& [~ state]]
7488+ =/ entry=igate-entry i.entries
7489+ ?> ?=(%fn -.typ.entry)
7490+ =/ scope=ienv (weld seeds env.entry)
7491+ =/ out=iresult (infer-fragment body.entry scope state(caps caps.entry))
7492+ ?: ?=(%| -.out) out
7493+ =/ uni=(unit isub) (itype-unify product.typ.entry typ.p.out sub.state.p.out)
7494+ ?~ uni [%| ["recursive group constraint is not supported by partial inference" ~]]
7495+ =. caps.entry caps.state.p.out
7496+ =/ after=istate state.p.out(sub u.uni, caps caps.state)
7497+ =/ rest=igate-seeds $(entries t.entries, state after)
7498+ ?: ?=(%| -.rest) rest
7499+ [%& [[entry entries.p.rest] state.p.rest]]
7500+::
7501+++ group-schemes
7502+ |= [entries=(list igate-entry) env=ienv outer=istate state=istate]
7503+ ^- (each ienv idiag)
7504+ ?~ entries [%& ~]
7505+ =/ entry=igate-entry i.entries
7506+ =/ merged=(unit [first=icap second=icap]) (merged-capitals caps.entry sub.state)
7507+ ?^ merged
7508+ [%| ["distinct type variables must not be forced equal" ~[[at.first.u.merged "first type variable"] [at.second.u.merged "second type variable"]]]]
7509+ ?: (constrained-capitals caps.entry sub.state)
7510+ [%| ["explicit capital constraints are not supported by partial inference" ~]]
7511+ =/ typ=itype (itype-normalize typ.entry sub.state)
7512+ ?: |((itype-has-tag typ) (itype-has-hidden-generic typ) (itype-has-hidden-recursive typ) (unsupported-atom-vars typ caps.entry binders.state sub.state))
7513+ [%| ["recursive group needs unsupported inference" ~]]
7514+ =/ free=(list @ud) (weld (free-env-vars env sub.state) (free-cap-vars caps.outer sub.state))
7515+ =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
7516+ =. vars (skim vars |=(n=@ud !(lien free |=(f=@ud =(f n)))))
7517+ ?: (gth (lent vars) 26) [%| ["recursive group needs too many type variables" ~]]
7518+ =/ rest=(each ienv idiag) $(entries t.entries)
7519+ ?: ?=(%| -.rest) rest
7520+ [%& [[name.entry [typ vars]] p.rest]]
7521+::
7522+++ infer-gate-group
7523+ |= [ds=(list def) env=ienv state=istate]
7524+ ^- ilocal-result
7525+ =/ names=(list term) (global-value-names ds)
7526+ ?. (levy names |=(n=term (unique-value-name n names)))
7527+ [%| ["recursive group contains duplicate names" ~]]
7528+ ?: (lien names |=(n=term ?=(^ (ienv-lookup n env))))
7529+ [%| ["recursive group shadows a name" ~]]
7530+ =/ scoped=istate state(globals (weld names globals.state))
7531+ =/ seeded=igate-seeds (seed-gate-group ds env scoped)
7532+ ?: ?=(%| -.seeded) seeded
7533+ =/ seeds=ienv (group-seed-env entries.p.seeded ~)
7534+ =/ body=igate-seeds (infer-gate-group-bodies entries.p.seeded seeds state.p.seeded)
7535+ ?: ?=(%| -.body) body
7536+ ?: (pending-tags tags.state.p.body sub.state.p.body)
7537+ [%| ["recursive group has unresolved literal constraints" ~]]
7538+ =/ schemes=(each ienv idiag) (group-schemes entries.p.body env state state.p.body)
7539+ ?: ?=(%| -.schemes) schemes
7540+ [%& [(weld p.schemes env) state.p.body(globals globals.state)]]
7541+::
73407542++ add-supported-defs
73417543 |= [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)]
73427544 ^- ienv
@@ -7359,14 +7561,137 @@
73597561 ?: (gth (lent vars) 26) $(ds t.ds)
73607562 $(ds t.ds, env [[name.d [typ vars]] env])
73617563::
7362−++ resolve-supported-defs
7564++$ iresolved [env=ienv grouped=(list term)]
7565++$ iadj (map term (list term))
7566++$ ivisited (map term ?)
7567++$ iwork (list [name=term done=?])
7568++$ iwresult [seen=ivisited order=(list term)]
7569++$ icresult [seen=ivisited component=(list term)]
7570++$ icomponents (list (list term))
7571+++ graph-nameset
7572+ |= [names=(list term) seen=ivisited]
7573+ ^- ivisited
7574+ ?~ names seen
7575+ $(names t.names, seen (~(put by seen) i.names &))
7576+::
7577+++ graph-edges
7578+ |= [name=term graph=iadj]
7579+ ^- (list term)
7580+ =/ found=(unit (list term)) (~(get by graph) name)
7581+ ?~ found ~
7582+ u.found
7583+::
7584+++ graph-make-forward
7585+ |= [ds=(list def) names=ivisited graph=iadj]
7586+ ^- iadj
7587+ ?~ ds graph
7588+ ?. ?=(%value -.i.ds) $(ds t.ds)
7589+ =/ deps=(list term) (dependency-expr val.i.ds)
7590+ =. deps (skim deps |=(n=term ?=(^ (~(get by names) n))))
7591+ $(ds t.ds, graph (~(put by graph) name.i.ds deps))
7592+::
7593+++ graph-add-reverse
7594+ |= [name=term edges=(list term) reverse=iadj]
7595+ ^- iadj
7596+ ?~ edges reverse
7597+ =/ prior=(list term) (graph-edges i.edges reverse)
7598+ $(edges t.edges, reverse (~(put by reverse) i.edges [name prior]))
7599+::
7600+++ graph-reverse
7601+ |= [names=(list term) graph=iadj reverse=iadj]
7602+ ^- iadj
7603+ ?~ names reverse
7604+ =. reverse (graph-add-reverse i.names (graph-edges i.names graph) reverse)
7605+ $(names t.names)
7606+::
7607+++ graph-order
7608+ |= [todo=iwork seen=ivisited order=(list term) graph=iadj]
7609+ ^- iwresult
7610+ ?~ todo [seen order]
7611+ =/ event=[name=term done=?] i.todo
7612+ ?: done.event $(todo t.todo, order [name.event order])
7613+ ?: ?=(^ (~(get by seen) name.event)) $(todo t.todo)
7614+ =. seen (~(put by seen) name.event &)
7615+ =/ children=iwork (turn (graph-edges name.event graph) |=(n=term [n |]))
7616+ $(todo (weld children [[name.event &] t.todo]))
7617+::
7618+++ graph-collect
7619+ |= [todo=(list term) seen=ivisited component=(list term) graph=iadj]
7620+ ^- icresult
7621+ ?~ todo [seen component]
7622+ ?: ?=(^ (~(get by seen) i.todo)) $(todo t.todo)
7623+ =. seen (~(put by seen) i.todo &)
7624+ $(todo (weld (graph-edges i.todo graph) t.todo), component [i.todo component])
7625+::
7626+++ graph-collect-all
7627+ |= [order=(list term) seen=ivisited graph=iadj comps=icomponents]
7628+ ^- icomponents
7629+ ?~ order comps
7630+ ?: ?=(^ (~(get by seen) i.order)) $(order t.order)
7631+ =/ found=icresult (graph-collect ~[i.order] seen ~ graph)
7632+ $(order t.order, seen seen.found, comps [component.found comps])
7633+::
7634+:: Two depth-first passes find components before group inference. Maps
7635+:: preserve the graph identity; duplicate global names fail closed.
7636+++ graph-components
7637+ |= [ds=(list def) names=(list term)]
7638+ ^- icomponents
7639+ =/ nameset=ivisited ~
7640+ =/ pending=(list term) names
7641+ |-
7642+ ?^ pending
7643+ ?: ?=(^ (~(get by nameset) i.pending)) ~
7644+ $(pending t.pending, nameset (~(put by nameset) i.pending &))
7645+ =/ graph=iadj (graph-make-forward ds nameset ~)
7646+ =/ reverse=iadj (graph-reverse names graph ~)
7647+ =/ order=iwresult (graph-order (turn names |=(n=term [n |])) ~ ~ graph)
7648+ (graph-collect-all order.order ~ reverse ~)
7649+::
7650+++ graph-cycle
7651+ |= [component=(list term) graph=iadj]
7652+ ^- ?
7653+ ?~ component |
7654+ ?^ t.component &
7655+ (lien (graph-edges i.component graph) |=(x=term =(x i.component)))
7656+::
7657+++ add-groups
7658+ |= [ds=(list def) components=icomponents graph=iadj env=ienv grouped=(list term) state=istate]
7659+ ^- iresolved
7660+ ?~ components [env grouped]
7661+ =/ component=(list term) i.components
7662+ ?. (graph-cycle component graph) $(components t.components)
7663+ ?: (lien component |=(n=term ?=(^ (ienv-lookup n env)))) $(components t.components)
7664+ =/ members=(list def)
7665+ %+ skim ds
7666+ |= d=def
7667+ &(?=(%value -.d) (lien component |=(n=term =(n name.d))))
7668+ ?. =((lent members) (lent component)) $(components t.components)
7669+ ?. (levy component |=(n=term (unique-value-name n globals.state))) $(components t.components)
7670+ =/ result=ilocal-result (infer-gate-group members env state)
7671+ ?: ?=(%| -.result) $(components t.components)
7672+ $(components t.components, env env.p.result, grouped (weld component grouped))
7673+::
7674+++ resolve-groups
73637675 |= [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)]
7364− ^- ienv
7676+ ^- iresolved
73657677 =/ env=ienv ~
7678+ =/ grouped=(list term) ~
7679+ =/ names=(list term) (global-value-names ds)
7680+ =/ nameset=ivisited (graph-nameset names ~)
7681+ =/ graph=iadj (graph-make-forward ds nameset ~)
7682+ =/ components=icomponents (graph-components ds names)
7683+ =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
73667684 |-
73677685 =/ next=ienv (add-supported-defs ds env molds globals externals surs mark-externals marks jimports reserved-molds at prelude)
7368− ?: =(next env) env
7369− $(env next)
7686+ =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude]
7687+ =/ out=iresolved (add-groups ds components graph next grouped initial)
7688+ ?: =(env env.out) out
7689+ $(env env.out, grouped grouped.out)
7690+::
7691+++ resolve-supported-defs
7692+ |= [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)]
7693+ ^- ienv
7694+ env:(resolve-groups ds molds globals externals surs mark-externals marks jimports reserved-molds at prelude)
73707695::
73717696+| %union-analysis
73727697::
@@ -7852,7 +8177,8 @@
78528177 =/ globals=(list term) (weld prelude-values (weld (turn jimports |=(j=[face=term interface=ifile] face.j)) (global-value-names ds)))
78538178 =/ surs=(list term) (collect-sur-imports imports.p.parsed)
78548179 =/ marks=(list term) (collect-mark-imports imports.p.parsed)
7855− =/ env=ienv (resolve-supported-defs ds molds globals externals surs mark-externals marks jimports reserved-molds file prelude)
8180+ =/ resolution=iresolved (resolve-groups ds molds globals externals surs mark-externals marks jimports reserved-molds file prelude)
8181+ =/ env=ienv env.resolution
78568182 =/ lines=(list @t) ~
78578183 |-
78588184 ?~ ds (of-wain:format ['partial inference; module not checked' (flop lines)])
@@ -7861,6 +8187,12 @@
78618187 $(ds t.ds, lines [(show-partial-mold file src d molds) lines])
78628188 ?. (unique-value-name name.d globals)
78638189 $(ds t.ds, lines [(crip "++ {(trip name.d)}: name already in scope") lines])
8190+ ?: (lien grouped.resolution |=(n=term =(n name.d)))
8191+ =/ found=(unit ischeme) (ienv-lookup name.d env)
8192+ ?~ found $(ds t.ds, lines [(crip "++ {(trip name.d)}: recursive group unavailable") lines])
8193+ =/ typ=itype (canonical-itype typ.u.found vars.u.found)
8194+ =/ line=@t (crip "++ {(trip name.d)}: {(show-itype typ ~)}{(show-atom-constraint typ)}")
8195+ $(ds t.ds, lines [line lines])
78648196 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
78658197 =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | file top prelude]
78668198 =. initial (reserve-def-caps val.d initial)
tests/golden/types-recursion-scc-failures/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Runes: "Gates may call themselves and their siblings; other values can't depend on themselves, even through a gate"; Modules: "Names may refer to each other in any order, and no name may shadow one already in scope, imports and the prelude included."
2+tests: Incompatible samples, an unresolved literal, a value in a cycle and an occurs-check cycle do not export inferred schemes to siblings or downstream definitions.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-recursion-scc-failures/modules.txtnew file+1
@@ -0,0 +1 @@
1+# no module fixtures
tests/golden/types-recursion-scc-failures/source.jibbnew file+11
@@ -0,0 +1,11 @@
1+++ bad-a |= x=@t (bad-b x)
2+++ bad-b |= y=@p (bad-a y)
3+++ outside (bad-a "hi")
4+++ poison-a |= x=@t (poison-b x)
5+++ poison-b |= x=@t
6+ ~& %orphan
7+ (poison-a x)
8+++ value-a value-b
9+++ value-b |= x=@t value-a
10+++ recursive-a |= x (recursive-b [x x])
11+++ recursive-b |= x (recursive-a x)
tests/golden/types-recursion-scc-failures/tokens.txtnew file+90
@@ -0,0 +1,90 @@
1+1:1 glyph ++
2+1:4 name bad-a
3+1:10 glyph |=
4+1:13 name x
5+1:14 tight glyph =
6+1:15 tight aura @t
7+1:18 glyph (
8+1:19 tight name bad-b
9+1:25 name x
10+1:26 tight glyph )
11+2:1 NEWLINE
12+2:1 glyph ++
13+2:4 name bad-b
14+2:10 glyph |=
15+2:13 name y
16+2:14 tight glyph =
17+2:15 tight aura @p
18+2:18 glyph (
19+2:19 tight name bad-a
20+2:25 name y
21+2:26 tight glyph )
22+3:1 NEWLINE
23+3:1 glyph ++
24+3:4 name outside
25+3:12 glyph (
26+3:13 tight name bad-a
27+3:19 str "hi"
28+3:23 tight glyph )
29+4:1 NEWLINE
30+4:1 glyph ++
31+4:4 name poison-a
32+4:13 glyph |=
33+4:16 name x
34+4:17 tight glyph =
35+4:18 tight aura @t
36+4:21 glyph (
37+4:22 tight name poison-b
38+4:31 name x
39+4:32 tight glyph )
40+5:1 NEWLINE
41+5:1 glyph ++
42+5:4 name poison-b
43+5:13 glyph |=
44+5:16 name x
45+5:17 tight glyph =
46+5:18 tight aura @t
47+6:3 INDENT
48+6:3 glyph ~&
49+6:6 lit %orphan
50+7:5 INDENT
51+7:5 glyph (
52+7:6 tight name poison-a
53+7:15 name x
54+7:16 tight glyph )
55+8:1 DEDENT
56+8:1 DEDENT
57+8:1 NEWLINE
58+8:1 glyph ++
59+8:4 name value-a
60+8:12 name value-b
61+9:1 NEWLINE
62+9:1 glyph ++
63+9:4 name value-b
64+9:12 glyph |=
65+9:15 name x
66+9:16 tight glyph =
67+9:17 tight aura @t
68+9:20 name value-a
69+10:1 NEWLINE
70+10:1 glyph ++
71+10:4 name recursive-a
72+10:16 glyph |=
73+10:19 name x
74+10:21 glyph (
75+10:22 tight name recursive-b
76+10:34 glyph [
77+10:35 tight name x
78+10:37 name x
79+10:38 tight glyph ]
80+10:39 tight glyph )
81+11:1 NEWLINE
82+11:1 glyph ++
83+11:4 name recursive-b
84+11:16 glyph |=
85+11:19 name x
86+11:21 glyph (
87+11:22 tight name recursive-a
88+11:34 name x
89+11:35 tight glyph )
90+11:36 NEWLINE
tests/golden/types-recursion-scc-failures/tree.txtnew file+45
@@ -0,0 +1,45 @@
1+(module
2+ (value 1:1 bad-a
3+ (gate 1:10
4+ (face 1:13 x (aura 1:15 @t))
5+ (group 1:18
6+ (call 1:19 (wing 1:19 bad-b) (wing 1:25 x)))))
7+ (value 2:1 bad-b
8+ (gate 2:10
9+ (face 2:13 y (aura 2:15 @p))
10+ (group 2:18
11+ (call 2:19 (wing 2:19 bad-a) (wing 2:25 y)))))
12+ (value 3:1 outside
13+ (group 3:12
14+ (call 3:13 (wing 3:13 bad-a) (str 3:19 "hi"))))
15+ (value 4:1 poison-a
16+ (gate 4:13
17+ (face 4:16 x (aura 4:18 @t))
18+ (group 4:21
19+ (call 4:22 (wing 4:22 poison-b) (wing 4:31 x)))))
20+ (value 5:1 poison-b
21+ (gate 5:13
22+ (face 5:16 x (aura 5:18 @t))
23+ (body 6:3
24+ (trace 6:3
25+ (lit 6:6 %orphan)
26+ (body 7:5
27+ (group 7:5
28+ (call 7:6 (wing 7:6 poison-a) (wing 7:15 x))))))))
29+ (value 8:1 value-a (wing 8:12 value-b))
30+ (value 9:1 value-b
31+ (gate 9:12
32+ (face 9:15 x (aura 9:17 @t))
33+ (wing 9:20 value-a)))
34+ (value 10:1 recursive-a
35+ (gate 10:16
36+ (bind 10:19 x)
37+ (group 10:21
38+ (call 10:22
39+ (wing 10:22 recursive-b)
40+ (tuple 10:34 (wing 10:35 x) (wing 10:37 x))))))
41+ (value 11:1 recursive-b
42+ (gate 11:16
43+ (bind 11:19 x)
44+ (group 11:21
45+ (call 11:22 (wing 11:22 recursive-a) (wing 11:34 x))))))
tests/golden/types-recursion-scc-failures/types.txtnew file+10
@@ -0,0 +1,10 @@
1+partial inference; module not checked
2+++ bad-a: name is not available to partial inference
3+++ bad-b: name is not available to partial inference
4+++ outside: name is not available to partial inference
5+++ poison-a: name is not available to partial inference
6+++ poison-b: name is not available to partial inference
7+++ value-a: name is not available to partial inference
8+++ value-b: name is not available to partial inference
9+++ recursive-a: name is not available to partial inference
10+++ recursive-b: name is not available to partial inference
tests/golden/types-recursion-scc-groups/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Runes: "Gates may call themselves and their siblings; other values can't depend on themselves, even through a gate"; Modules: "Names may refer to each other in any order, and no name may shadow one already in scope, imports and the prelude included."
2+tests: Two- and three-gate recursive groups are inferred together. Distinct capitals in different gates are independently scoped, and the resulting polymorphic scheme instantiates at text and ship call sites.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-recursion-scc-groups/modules.txtnew file+1
@@ -0,0 +1 @@
1+# no module fixtures
tests/golden/types-recursion-scc-groups/source.jibbnew file+9
@@ -0,0 +1,9 @@
1+++ left |= x=@t (right x)
2+++ right |= y=@t (left y)
3+++ third |= x=@p (fourth x)
4+++ fourth |= y=@p (fifth y)
5+++ fifth |= z=@p (third z)
6+++ poly-a |= x=A (poly-b x)
7+++ poly-b |= y=B (poly-a y)
8+++ call-text (poly-a "hi")
9+++ call-ship (poly-a ~zod)
tests/golden/types-recursion-scc-groups/tokens.txtnew file+91
@@ -0,0 +1,91 @@
1+1:1 glyph ++
2+1:4 name left
3+1:9 glyph |=
4+1:12 name x
5+1:13 tight glyph =
6+1:14 tight aura @t
7+1:17 glyph (
8+1:18 tight name right
9+1:24 name x
10+1:25 tight glyph )
11+2:1 NEWLINE
12+2:1 glyph ++
13+2:4 name right
14+2:10 glyph |=
15+2:13 name y
16+2:14 tight glyph =
17+2:15 tight aura @t
18+2:18 glyph (
19+2:19 tight name left
20+2:24 name y
21+2:25 tight glyph )
22+3:1 NEWLINE
23+3:1 glyph ++
24+3:4 name third
25+3:10 glyph |=
26+3:13 name x
27+3:14 tight glyph =
28+3:15 tight aura @p
29+3:18 glyph (
30+3:19 tight name fourth
31+3:26 name x
32+3:27 tight glyph )
33+4:1 NEWLINE
34+4:1 glyph ++
35+4:4 name fourth
36+4:11 glyph |=
37+4:14 name y
38+4:15 tight glyph =
39+4:16 tight aura @p
40+4:19 glyph (
41+4:20 tight name fifth
42+4:26 name y
43+4:27 tight glyph )
44+5:1 NEWLINE
45+5:1 glyph ++
46+5:4 name fifth
47+5:10 glyph |=
48+5:13 name z
49+5:14 tight glyph =
50+5:15 tight aura @p
51+5:18 glyph (
52+5:19 tight name third
53+5:25 name z
54+5:26 tight glyph )
55+6:1 NEWLINE
56+6:1 glyph ++
57+6:4 name poly-a
58+6:11 glyph |=
59+6:14 name x
60+6:15 tight glyph =
61+6:16 tight tvar A
62+6:18 glyph (
63+6:19 tight name poly-b
64+6:26 name x
65+6:27 tight glyph )
66+7:1 NEWLINE
67+7:1 glyph ++
68+7:4 name poly-b
69+7:11 glyph |=
70+7:14 name y
71+7:15 tight glyph =
72+7:16 tight tvar B
73+7:18 glyph (
74+7:19 tight name poly-a
75+7:26 name y
76+7:27 tight glyph )
77+8:1 NEWLINE
78+8:1 glyph ++
79+8:4 name call-text
80+8:14 glyph (
81+8:15 tight name poly-a
82+8:22 str "hi"
83+8:26 tight glyph )
84+9:1 NEWLINE
85+9:1 glyph ++
86+9:4 name call-ship
87+9:14 glyph (
88+9:15 tight name poly-a
89+9:22 lit ~zod
90+9:26 tight glyph )
91+9:27 NEWLINE
tests/golden/types-recursion-scc-groups/tree.txtnew file+42
@@ -0,0 +1,42 @@
1+(module
2+ (value 1:1 left
3+ (gate 1:9
4+ (face 1:12 x (aura 1:14 @t))
5+ (group 1:17
6+ (call 1:18 (wing 1:18 right) (wing 1:24 x)))))
7+ (value 2:1 right
8+ (gate 2:10
9+ (face 2:13 y (aura 2:15 @t))
10+ (group 2:18
11+ (call 2:19 (wing 2:19 left) (wing 2:24 y)))))
12+ (value 3:1 third
13+ (gate 3:10
14+ (face 3:13 x (aura 3:15 @p))
15+ (group 3:18
16+ (call 3:19 (wing 3:19 fourth) (wing 3:26 x)))))
17+ (value 4:1 fourth
18+ (gate 4:11
19+ (face 4:14 y (aura 4:16 @p))
20+ (group 4:19
21+ (call 4:20 (wing 4:20 fifth) (wing 4:26 y)))))
22+ (value 5:1 fifth
23+ (gate 5:10
24+ (face 5:13 z (aura 5:15 @p))
25+ (group 5:18
26+ (call 5:19 (wing 5:19 third) (wing 5:25 z)))))
27+ (value 6:1 poly-a
28+ (gate 6:11
29+ (face 6:14 x (tvar 6:16 A))
30+ (group 6:18
31+ (call 6:19 (wing 6:19 poly-b) (wing 6:26 x)))))
32+ (value 7:1 poly-b
33+ (gate 7:11
34+ (face 7:14 y (tvar 7:16 B))
35+ (group 7:18
36+ (call 7:19 (wing 7:19 poly-a) (wing 7:26 y)))))
37+ (value 8:1 call-text
38+ (group 8:14
39+ (call 8:15 (wing 8:15 poly-a) (str 8:22 "hi"))))
40+ (value 9:1 call-ship
41+ (group 9:14
42+ (call 9:15 (wing 9:15 poly-a) (lit 9:22 ~zod)))))
tests/golden/types-recursion-scc-groups/types.txtnew file+10
@@ -0,0 +1,10 @@
1+partial inference; module not checked
2+++ left: $-(@t A)
3+++ right: $-(@t A)
4+++ third: $-(@p A)
5+++ fourth: $-(@p A)
6+++ fifth: $-(@p A)
7+++ poly-a: $-(A B)
8+++ poly-b: $-(A B)
9+++ call-text: A
10+++ call-ship: A
tests/golden/types-recursion-scc-import-bad/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Runes: "Gates may call themselves and their siblings; other values can't depend on themselves, even through a gate"; Modules: "Names may refer to each other in any order, and no name may shadow one already in scope, imports and the prelude included."
2+tests: A library containing an incompatible mutual-recursion group does not export a partial interface, even if an independent member can be inferred.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-recursion-scc-import-bad/module-trees.txtnew file+16
@@ -0,0 +1,16 @@
1+/ui/lib.jibb
2+(module
3+ (value 1:1 left
4+ (gate 1:9
5+ (face 1:12 x (aura 1:14 @t))
6+ (group 1:17
7+ (call 1:18 (wing 1:18 right) (wing 1:24 x)))))
8+ (value 2:1 right
9+ (gate 2:10
10+ (face 2:13 y (aura 2:15 @p))
11+ (group 2:18
12+ (call 2:19 (wing 2:19 left) (wing 2:24 y)))))
13+ (value 3:1 safe
14+ (gate 3:9
15+ (face 3:12 x (aura 3:14 @t))
16+ (wing 3:17 x))))
tests/golden/types-recursion-scc-import-bad/modules.txtnew file+1
@@ -0,0 +1 @@
1+/ui/lib.jibb
tests/golden/types-recursion-scc-import-bad/modules/ui/lib.jibbnew file+3
@@ -0,0 +1,3 @@
1+++ left |= x=@t (right x)
2+++ right |= y=@p (left y)
3+++ safe |= x=@t x
tests/golden/types-recursion-scc-import-bad/source.jibbnew file+2
@@ -0,0 +1,2 @@
1+/= lib /ui/lib
2+++ safe (safe.lib "hello")
tests/golden/types-recursion-scc-import-bad/tokens.txtnew file+14
@@ -0,0 +1,14 @@
1+1:1 glyph /=
2+1:4 name lib
3+1:8 glyph /
4+1:9 tight knot ui
5+1:11 tight glyph /
6+1:12 tight knot lib
7+2:1 NEWLINE
8+2:1 glyph ++
9+2:4 name safe
10+2:9 glyph (
11+2:10 tight wing safe.lib
12+2:19 str "hello"
13+2:26 tight glyph )
14+2:27 NEWLINE
tests/golden/types-recursion-scc-import-bad/tree.txtnew file+5
@@ -0,0 +1,5 @@
1+(module
2+ (jibb 1:1 lib /ui/lib)
3+ (value 2:1 safe
4+ (group 2:9
5+ (call 2:10 (wing 2:10 safe.lib) (str 2:19 "hello")))))
tests/golden/types-recursion-scc-import-bad/types.txtnew file+2
@@ -0,0 +1,2 @@
1+partial inference; module not checked
2+module definitions need unsupported inference: /ui/lib/jibb
tests/golden/types-recursion-scc-import/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Runes: "Gates may call themselves and their siblings; other values can't depend on themselves, even through a gate"; Modules: "Names may refer to each other in any order, and no name may shadow one already in scope, imports and the prelude included."
2+tests: A library exports a mutual-recursive group and its polymorphic result can be instantiated independently at downstream text and ship sites.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-recursion-scc-import/module-trees.txtnew file+12
@@ -0,0 +1,12 @@
1+/ui/lib.jibb
2+(module
3+ (value 1:1 left
4+ (gate 1:9
5+ (face 1:12 x (aura 1:14 @t))
6+ (group 1:17
7+ (call 1:18 (wing 1:18 right) (wing 1:24 x)))))
8+ (value 2:1 right
9+ (gate 2:10
10+ (face 2:13 y (aura 2:15 @t))
11+ (group 2:18
12+ (call 2:19 (wing 2:19 left) (wing 2:24 y))))))
tests/golden/types-recursion-scc-import/modules.txtnew file+1
@@ -0,0 +1 @@
1+/ui/lib.jibb
tests/golden/types-recursion-scc-import/modules/ui/lib.jibbnew file+2
@@ -0,0 +1,2 @@
1+++ left |= x=@t (right x)
2+++ right |= y=@t (left y)
tests/golden/types-recursion-scc-import/source.jibbnew file+3
@@ -0,0 +1,3 @@
1+/= lib /ui/lib
2+++ text ^- @t (left.lib "hello")
3+++ ship ^- @p (right.lib "hello")
tests/golden/types-recursion-scc-import/tokens.txtnew file+25
@@ -0,0 +1,25 @@
1+1:1 glyph /=
2+1:4 name lib
3+1:8 glyph /
4+1:9 tight knot ui
5+1:11 tight glyph /
6+1:12 tight knot lib
7+2:1 NEWLINE
8+2:1 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 )
16+3:1 NEWLINE
17+3:1 glyph ++
18+3:4 name ship
19+3:9 glyph ^-
20+3:12 aura @p
21+3:15 glyph (
22+3:16 tight wing right.lib
23+3:26 str "hello"
24+3:33 tight glyph )
25+3:34 NEWLINE
tests/golden/types-recursion-scc-import/tree.txtnew file+12
@@ -0,0 +1,12 @@
1+(module
2+ (jibb 1:1 lib /ui/lib)
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")))))
8+ (value 3:1 ship
9+ (cast 3:9
10+ (aura 3:12 @p)
11+ (group 3:15
12+ (call 3:16 (wing 3:16 right.lib) (str 3:26 "hello"))))))
tests/golden/types-recursion-scc-import/types.txtnew file+3
@@ -0,0 +1,3 @@
1+partial inference; module not checked
2+++ text: @t
3+++ ship: @p
tests/golden/types-recursion-scc-local/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Runes: "Gates may call themselves and their siblings; other values can't depend on themselves, even through a gate"; Modules: "Names may refer to each other in any order, and no name may shadow one already in scope, imports and the prelude included."
2+tests: A mutually recursive local group remains unsupported. A top-level group can include an outer gate whose local helper refers to the other group member.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-recursion-scc-local/modules.txtnew file+1
@@ -0,0 +1 @@
1+# no module fixtures
tests/golden/types-recursion-scc-local/source.jibbnew file+11
@@ -0,0 +1,11 @@
1+++ outer |= x=@t
2+ ++ one |= flag=? (two flag)
3+ ++ two |= flag=?
4+ ?- flag
5+ %.y x
6+ %.n (one flag)
7+ (one %.y)
8+++ global-a |= x=@t
9+ ++ inner |= y=@t (global-b y)
10+ (inner x)
11+++ global-b |= x=@t (global-a x)
tests/golden/types-recursion-scc-local/tokens.txtnew file+80
@@ -0,0 +1,80 @@
1+1:1 glyph ++
2+1:4 name outer
3+1:10 glyph |=
4+1:13 name x
5+1:14 tight glyph =
6+1:15 tight aura @t
7+2:3 INDENT
8+2:3 glyph ++
9+2:6 name one
10+2:10 glyph |=
11+2:13 name flag
12+2:17 tight glyph =
13+2:18 tight glyph ?
14+2:20 glyph (
15+2:21 tight name two
16+2:25 name flag
17+2:29 tight glyph )
18+3:3 NEWLINE
19+3:3 glyph ++
20+3:6 name two
21+3:10 glyph |=
22+3:13 name flag
23+3:17 tight glyph =
24+3:18 tight glyph ?
25+4:5 INDENT
26+4:5 glyph ?-
27+4:8 name flag
28+5:7 INDENT
29+5:7 lit %.y
30+5:11 name x
31+6:7 NEWLINE
32+6:7 lit %.n
33+6:11 glyph (
34+6:12 tight name one
35+6:16 name flag
36+6:20 tight glyph )
37+7:3 DEDENT
38+7:3 DEDENT
39+7:3 NEWLINE
40+7:3 glyph (
41+7:4 tight name one
42+7:8 lit %.y
43+7:11 tight glyph )
44+8:1 DEDENT
45+8:1 NEWLINE
46+8:1 glyph ++
47+8:4 name global-a
48+8:13 glyph |=
49+8:16 name x
50+8:17 tight glyph =
51+8:18 tight aura @t
52+9:3 INDENT
53+9:3 glyph ++
54+9:6 name inner
55+9:12 glyph |=
56+9:15 name y
57+9:16 tight glyph =
58+9:17 tight aura @t
59+9:20 glyph (
60+9:21 tight name global-b
61+9:30 name y
62+9:31 tight glyph )
63+10:3 NEWLINE
64+10:3 glyph (
65+10:4 tight name inner
66+10:10 name x
67+10:11 tight glyph )
68+11:1 DEDENT
69+11:1 NEWLINE
70+11:1 glyph ++
71+11:4 name global-b
72+11:13 glyph |=
73+11:16 name x
74+11:17 tight glyph =
75+11:18 tight aura @t
76+11:21 glyph (
77+11:22 tight name global-a
78+11:31 name x
79+11:32 tight glyph )
80+11:33 NEWLINE
tests/golden/types-recursion-scc-local/tree.txtnew file+39
@@ -0,0 +1,39 @@
1+(module
2+ (value 1:1 outer
3+ (gate 1:10
4+ (face 1:13 x (aura 1:15 @t))
5+ (body 2:3
6+ (value 2:3 one
7+ (gate 2:10
8+ (face 2:13 flag (flag 2:18))
9+ (group 2:20
10+ (call 2:21 (wing 2:21 two) (wing 2:25 flag)))))
11+ (value 3:3 two
12+ (gate 3:10
13+ (face 3:13 flag (flag 3:18))
14+ (body 4:5
15+ (branch 4:5
16+ (wing 4:8 flag)
17+ (arm 5:7 (lit 5:7 %.y) (wing 5:11 x))
18+ (arm 6:7
19+ (lit 6:7 %.n)
20+ (group 6:11
21+ (call 6:12 (wing 6:12 one) (wing 6:16 flag))))))))
22+ (group 7:3
23+ (call 7:4 (wing 7:4 one) (lit 7:8 %.y))))))
24+ (value 8:1 global-a
25+ (gate 8:13
26+ (face 8:16 x (aura 8:18 @t))
27+ (body 9:3
28+ (value 9:3 inner
29+ (gate 9:12
30+ (face 9:15 y (aura 9:17 @t))
31+ (group 9:20
32+ (call 9:21 (wing 9:21 global-b) (wing 9:30 y)))))
33+ (group 10:3
34+ (call 10:4 (wing 10:4 inner) (wing 10:10 x))))))
35+ (value 11:1 global-b
36+ (gate 11:13
37+ (face 11:16 x (aura 11:18 @t))
38+ (group 11:21
39+ (call 11:22 (wing 11:22 global-a) (wing 11:31 x))))))
tests/golden/types-recursion-scc-local/types.txtnew file+4
@@ -0,0 +1,4 @@
1+partial inference; module not checked
2+++ outer: local definitions need unsupported inference
3+++ global-a: $-(@t A)
4+++ global-b: $-(@t A)
tests/golden/types-recursion-scc-order/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Runes: "Gates may call themselves and their siblings; other values can't depend on themselves, even through a gate"; Modules: "Names may refer to each other in any order, and no name may shadow one already in scope, imports and the prelude included."
2+tests: A downstream definition can precede both mutually recursive gates in source; independent definitions still infer.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-recursion-scc-order/modules.txtnew file+1
@@ -0,0 +1 @@
1+# no module fixtures
tests/golden/types-recursion-scc-order/source.jibbnew file+4
@@ -0,0 +1,4 @@
1+++ dependent (left "x")
2+++ right |= y=@t (left y)
3+++ independent "ok"
4+++ left |= x=@t (right x)
tests/golden/types-recursion-scc-order/tokens.txtnew file+33
@@ -0,0 +1,33 @@
1+1:1 glyph ++
2+1:4 name dependent
3+1:14 glyph (
4+1:15 tight name left
5+1:20 str "x"
6+1:23 tight glyph )
7+2:1 NEWLINE
8+2:1 glyph ++
9+2:4 name right
10+2:10 glyph |=
11+2:13 name y
12+2:14 tight glyph =
13+2:15 tight aura @t
14+2:18 glyph (
15+2:19 tight name left
16+2:24 name y
17+2:25 tight glyph )
18+3:1 NEWLINE
19+3:1 glyph ++
20+3:4 name independent
21+3:16 str "ok"
22+4:1 NEWLINE
23+4:1 glyph ++
24+4:4 name left
25+4:9 glyph |=
26+4:12 name x
27+4:13 tight glyph =
28+4:14 tight aura @t
29+4:17 glyph (
30+4:18 tight name right
31+4:24 name x
32+4:25 tight glyph )
33+4:26 NEWLINE
tests/golden/types-recursion-scc-order/tree.txtnew file+15
@@ -0,0 +1,15 @@
1+(module
2+ (value 1:1 dependent
3+ (group 1:14
4+ (call 1:15 (wing 1:15 left) (str 1:20 "x"))))
5+ (value 2:1 right
6+ (gate 2:10
7+ (face 2:13 y (aura 2:15 @t))
8+ (group 2:18
9+ (call 2:19 (wing 2:19 left) (wing 2:24 y)))))
10+ (value 3:1 independent (str 3:16 "ok"))
11+ (value 4:1 left
12+ (gate 4:9
13+ (face 4:12 x (aura 4:14 @t))
14+ (group 4:17
15+ (call 4:18 (wing 4:18 right) (wing 4:24 x))))))
tests/golden/types-recursion-scc-order/types.txtnew file+5
@@ -0,0 +1,5 @@
1+partial inference; module not checked
2+++ dependent: A
3+++ right: $-(@t A)
4+++ independent: @t
5+++ left: $-(@t A)
tests/golden/types-recursion-scc-shadow/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Runes: "Gates may call themselves and their siblings; other values can't depend on themselves, even through a gate"; Modules: "Names may refer to each other in any order, and no name may shadow one already in scope, imports and the prelude included."
2+tests: A sample may not shadow its sibling gate; this prevents the group from being exported, while an unrelated definition still infers.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-recursion-scc-shadow/modules.txtnew file+1
@@ -0,0 +1 @@
1+# no module fixtures
tests/golden/types-recursion-scc-shadow/source.jibbnew file+3
@@ -0,0 +1,3 @@
1+++ first |= second=@t (second second)
2+++ second |= x=@t (first x)
3+++ safe |= x=@t x
tests/golden/types-recursion-scc-shadow/tokens.txtnew file+30
@@ -0,0 +1,30 @@
1+1:1 glyph ++
2+1:4 name first
3+1:10 glyph |=
4+1:13 name second
5+1:19 tight glyph =
6+1:20 tight aura @t
7+1:23 glyph (
8+1:24 tight name second
9+1:31 name second
10+1:37 tight glyph )
11+2:1 NEWLINE
12+2:1 glyph ++
13+2:4 name second
14+2:11 glyph |=
15+2:14 name x
16+2:15 tight glyph =
17+2:16 tight aura @t
18+2:19 glyph (
19+2:20 tight name first
20+2:26 name x
21+2:27 tight glyph )
22+3:1 NEWLINE
23+3:1 glyph ++
24+3:4 name safe
25+3:9 glyph |=
26+3:12 name x
27+3:13 tight glyph =
28+3:14 tight aura @t
29+3:17 name x
30+3:18 NEWLINE
tests/golden/types-recursion-scc-shadow/tree.txtnew file+15
@@ -0,0 +1,15 @@
1+(module
2+ (value 1:1 first
3+ (gate 1:10
4+ (face 1:13 second (aura 1:20 @t))
5+ (group 1:23
6+ (call 1:24 (wing 1:24 second) (wing 1:31 second)))))
7+ (value 2:1 second
8+ (gate 2:11
9+ (face 2:14 x (aura 2:16 @t))
10+ (group 2:19
11+ (call 2:20 (wing 2:20 first) (wing 2:26 x)))))
12+ (value 3:1 safe
13+ (gate 3:9
14+ (face 3:12 x (aura 3:14 @t))
15+ (wing 3:17 x))))
tests/golden/types-recursion-scc-shadow/types.txtnew file+4
@@ -0,0 +1,4 @@
1+partial inference; module not checked
2+++ first: sample shadows a name
3+++ second: name is not available to partial inference
4+++ safe: $-(@t @t)
tests/golden/types-recursive-gate/about.txt+1−1
@@ -1,4 +1,4 @@
11source: Grammar, Modules: "Gates may call themselves and their siblings; other values can't depend on themselves, even through a gate"; Molds: "Type variables are capitals, generalized per `++`."
2−tests: A single recursive gate is inferred monomorphically during its body and generalized afterward. Value cycles, mutual recursion, changing recursive argument types, occurs checks and unresolved constraints fail closed.
2+tests: A single recursive gate and a top-level mutual gate group are inferred monomorphically during their bodies and generalized afterward. Value cycles, changing recursive argument types, occurs checks and unresolved constraints fail closed.
33expect: parses
44expect-types: a partial inference report
tests/golden/types-recursive-gate/types.txt+2−2
@@ -22,8 +22,8 @@ partial inference; module not checked
2222++ direct-value: name is not available to partial inference
2323++ gate-value: name is not available to partial inference
2424++ value-cycle: name is not available to partial inference
25−++ mutual-a: name is not available to partial inference
26−++ mutual-b: name is not available to partial inference
25+++ mutual-a: $-(A B)
26+++ mutual-b: $-(A B)
2727++ captured: $-(A A)
2828++ local-rec: $-(A B)
2929++ forced-trace: explicit capital constraints are not supported by partial inference
tests/lib/jibb.hoon+199−153
@@ -1700,131 +1700,163 @@
17001700/* tok-487 %txt /tests/golden/types-record-to-tuple/tokens/txt
17011701/* tre-487 %txt /tests/golden/types-record-to-tuple/tree/txt
17021702/* typ-487 %txt /tests/golden/types-record-to-tuple/types/txt
1703−/* src-488 %jibb /tests/golden/types-recursive-branch/source/jibb
1704−/* tok-488 %txt /tests/golden/types-recursive-branch/tokens/txt
1705−/* tre-488 %txt /tests/golden/types-recursive-branch/tree/txt
1706−/* typ-488 %txt /tests/golden/types-recursive-branch/types/txt
1707−/* src-489 %jibb /tests/golden/types-recursive-gate/source/jibb
1708−/* tok-489 %txt /tests/golden/types-recursive-gate/tokens/txt
1709−/* tre-489 %txt /tests/golden/types-recursive-gate/tree/txt
1710−/* typ-489 %txt /tests/golden/types-recursive-gate/types/txt
1711−/* src-490 %jibb /tests/golden/types-recursive-sample/source/jibb
1712−/* tok-490 %txt /tests/golden/types-recursive-sample/tokens/txt
1713−/* tre-490 %txt /tests/golden/types-recursive-sample/tree/txt
1714−/* typ-490 %txt /tests/golden/types-recursive-sample/types/txt
1715−/* src-491 %jibb /tests/golden/types-string-interpolation/source/jibb
1716−/* tok-491 %txt /tests/golden/types-string-interpolation/tokens/txt
1717−/* tre-491 %txt /tests/golden/types-string-interpolation/tree/txt
1718−/* typ-491 %txt /tests/golden/types-string-interpolation/types/txt
1719−/* src-492 %jibb /tests/golden/types-union-alias/source/jibb
1720−/* tok-492 %txt /tests/golden/types-union-alias/tokens/txt
1721−/* tre-492 %txt /tests/golden/types-union-alias/tree/txt
1722−/* typ-492 %txt /tests/golden/types-union-alias/types/txt
1723−/* src-493 %jibb /tests/golden/types-union-branch-context/source/jibb
1724−/* tok-493 %txt /tests/golden/types-union-branch-context/tokens/txt
1725−/* tre-493 %txt /tests/golden/types-union-branch-context/tree/txt
1726−/* typ-493 %txt /tests/golden/types-union-branch-context/types/txt
1727−/* src-494 %jibb /tests/golden/types-union-branch-pending/source/jibb
1728−/* tok-494 %txt /tests/golden/types-union-branch-pending/tokens/txt
1729−/* tre-494 %txt /tests/golden/types-union-branch-pending/tree/txt
1730−/* typ-494 %txt /tests/golden/types-union-branch-pending/types/txt
1731−/* src-495 %jibb /tests/golden/types-union-constructor-shape/source/jibb
1732−/* tok-495 %txt /tests/golden/types-union-constructor-shape/tokens/txt
1733−/* tre-495 %txt /tests/golden/types-union-constructor-shape/tree/txt
1734−/* typ-495 %txt /tests/golden/types-union-constructor-shape/types/txt
1735−/* src-496 %jibb /tests/golden/types-union-context-flow/source/jibb
1736−/* tok-496 %txt /tests/golden/types-union-context-flow/tokens/txt
1737−/* tre-496 %txt /tests/golden/types-union-context-flow/tree/txt
1738−/* typ-496 %txt /tests/golden/types-union-context-flow/types/txt
1739−/* src-497 %jibb /tests/golden/types-union-import/source/jibb
1740−/* tok-497 %txt /tests/golden/types-union-import/tokens/txt
1741−/* tre-497 %txt /tests/golden/types-union-import/tree/txt
1742−/* mod-497-1 %jibb /tests/golden/types-union-import/modules/ui/lib/jibb
1743−/* typ-497 %txt /tests/golden/types-union-import/types/txt
1744−/* mtre-497 %txt /tests/golden/types-union-import/module-trees/txt
1745−/* src-498 %jibb /tests/golden/types-union-local-pending/source/jibb
1746−/* tok-498 %txt /tests/golden/types-union-local-pending/tokens/txt
1747−/* tre-498 %txt /tests/golden/types-union-local-pending/tree/txt
1748−/* typ-498 %txt /tests/golden/types-union-local-pending/types/txt
1749−/* src-499 %jibb /tests/golden/types-union-overlap/source/jibb
1750−/* tok-499 %txt /tests/golden/types-union-overlap/tokens/txt
1751−/* tre-499 %txt /tests/golden/types-union-overlap/tree/txt
1752−/* typ-499 %txt /tests/golden/types-union-overlap/types/txt
1753−/* src-500 %jibb /tests/golden/types-union-overlap-nested/source/jibb
1754−/* tok-500 %txt /tests/golden/types-union-overlap-nested/tokens/txt
1755−/* tre-500 %txt /tests/golden/types-union-overlap-nested/tree/txt
1756−/* typ-500 %txt /tests/golden/types-union-overlap-nested/types/txt
1757−/* src-501 %jibb /tests/golden/types-union-phantom-generic/source/jibb
1758−/* tok-501 %txt /tests/golden/types-union-phantom-generic/tokens/txt
1759−/* tre-501 %txt /tests/golden/types-union-phantom-generic/tree/txt
1760−/* typ-501 %txt /tests/golden/types-union-phantom-generic/types/txt
1761−/* src-502 %jibb /tests/golden/types-union-print-cross-namespace/source/jibb
1762−/* tok-502 %txt /tests/golden/types-union-print-cross-namespace/tokens/txt
1763−/* tre-502 %txt /tests/golden/types-union-print-cross-namespace/tree/txt
1764−/* mod-502-1 %jibb /tests/golden/types-union-print-cross-namespace/modules/ui/lib/jibb
1765−/* typ-502 %txt /tests/golden/types-union-print-cross-namespace/types/txt
1766−/* mtre-502 %txt /tests/golden/types-union-print-cross-namespace/module-trees/txt
1767−/* src-503 %jibb /tests/golden/types-union-print-distinct/source/jibb
1768−/* tok-503 %txt /tests/golden/types-union-print-distinct/tokens/txt
1769−/* tre-503 %txt /tests/golden/types-union-print-distinct/tree/txt
1770−/* mod-503-1 %jibb /tests/golden/types-union-print-distinct/modules/ui/left/jibb
1771−/* mod-503-2 %jibb /tests/golden/types-union-print-distinct/modules/ui/right/jibb
1772−/* mod-503-3 %jibb /tests/golden/types-union-print-distinct/modules/ui/twin/jibb
1773−/* typ-503 %txt /tests/golden/types-union-print-distinct/types/txt
1774−/* mtre-503 %txt /tests/golden/types-union-print-distinct/module-trees/txt
1775−/* src-504 %jibb /tests/golden/types-union-print-escape/source/jibb
1776−/* tok-504 %txt /tests/golden/types-union-print-escape/tokens/txt
1777−/* tre-504 %txt /tests/golden/types-union-print-escape/tree/txt
1778−/* typ-504 %txt /tests/golden/types-union-print-escape/types/txt
1779−/* src-505 %jibb /tests/golden/types-union-print-local/source/jibb
1780−/* tok-505 %txt /tests/golden/types-union-print-local/tokens/txt
1781−/* tre-505 %txt /tests/golden/types-union-print-local/tree/txt
1782−/* typ-505 %txt /tests/golden/types-union-print-local/types/txt
1783−/* src-506 %jibb /tests/golden/types-union-print-nested/source/jibb
1784−/* tok-506 %txt /tests/golden/types-union-print-nested/tokens/txt
1785−/* tre-506 %txt /tests/golden/types-union-print-nested/tree/txt
1786−/* typ-506 %txt /tests/golden/types-union-print-nested/types/txt
1787−/* src-507 %jibb /tests/golden/types-union-print-same-origin/source/jibb
1788−/* tok-507 %txt /tests/golden/types-union-print-same-origin/tokens/txt
1789−/* tre-507 %txt /tests/golden/types-union-print-same-origin/tree/txt
1790−/* mod-507-1 %jibb /tests/golden/types-union-print-same-origin/modules/ui/shared/jibb
1791−/* typ-507 %txt /tests/golden/types-union-print-same-origin/types/txt
1792−/* mtre-507 %txt /tests/golden/types-union-print-same-origin/module-trees/txt
1793−/* src-508 %jibb /tests/golden/types-union-print-transitive/source/jibb
1794−/* tok-508 %txt /tests/golden/types-union-print-transitive/tokens/txt
1795−/* tre-508 %txt /tests/golden/types-union-print-transitive/tree/txt
1796−/* mod-508-1 %jibb /tests/golden/types-union-print-transitive/modules/ui/mid/jibb
1797−/* mod-508-2 %jibb /tests/golden/types-union-print-transitive/modules/ui/base/jibb
1798−/* typ-508 %txt /tests/golden/types-union-print-transitive/types/txt
1799−/* mtre-508 %txt /tests/golden/types-union-print-transitive/module-trees/txt
1800−/* src-509 %jibb /tests/golden/types-union-singleton/source/jibb
1801−/* tok-509 %txt /tests/golden/types-union-singleton/tokens/txt
1802−/* tre-509 %txt /tests/golden/types-union-singleton/tree/txt
1803−/* typ-509 %txt /tests/golden/types-union-singleton/types/txt
1804−/* src-510 %jibb /tests/golden/types-union-tag-atoms/source/jibb
1805−/* tok-510 %txt /tests/golden/types-union-tag-atoms/tokens/txt
1806−/* tre-510 %txt /tests/golden/types-union-tag-atoms/tree/txt
1807−/* typ-510 %txt /tests/golden/types-union-tag-atoms/types/txt
1808−/* src-511 %jibb /tests/golden/types-union-tags/source/jibb
1809−/* tok-511 %txt /tests/golden/types-union-tags/tokens/txt
1810−/* tre-511 %txt /tests/golden/types-union-tags/tree/txt
1811−/* typ-511 %txt /tests/golden/types-union-tags/types/txt
1812−/* src-512 %jibb /tests/golden/types-union-unresolved/source/jibb
1813−/* tok-512 %txt /tests/golden/types-union-unresolved/tokens/txt
1814−/* tre-512 %txt /tests/golden/types-union-unresolved/tree/txt
1815−/* typ-512 %txt /tests/golden/types-union-unresolved/types/txt
1816−/* src-513 %jibb /tests/golden/types-union-unresolved-flow/source/jibb
1817−/* tok-513 %txt /tests/golden/types-union-unresolved-flow/tokens/txt
1818−/* tre-513 %txt /tests/golden/types-union-unresolved-flow/tree/txt
1819−/* typ-513 %txt /tests/golden/types-union-unresolved-flow/types/txt
1820−/* src-514 %jibb /tests/golden/types-unit-context/source/jibb
1821−/* tok-514 %txt /tests/golden/types-unit-context/tokens/txt
1822−/* tre-514 %txt /tests/golden/types-unit-context/tree/txt
1823−/* typ-514 %txt /tests/golden/types-unit-context/types/txt
1824−/* src-515 %jibb /tests/golden/types-unit-patterns/source/jibb
1825−/* tok-515 %txt /tests/golden/types-unit-patterns/tokens/txt
1826−/* tre-515 %txt /tests/golden/types-unit-patterns/tree/txt
1827−/* typ-515 %txt /tests/golden/types-unit-patterns/types/txt
1703+/* src-488 %jibb /tests/golden/types-recursion-scc-failures/source/jibb
1704+/* tok-488 %txt /tests/golden/types-recursion-scc-failures/tokens/txt
1705+/* tre-488 %txt /tests/golden/types-recursion-scc-failures/tree/txt
1706+/* typ-488 %txt /tests/golden/types-recursion-scc-failures/types/txt
1707+/* src-489 %jibb /tests/golden/types-recursion-scc-groups/source/jibb
1708+/* tok-489 %txt /tests/golden/types-recursion-scc-groups/tokens/txt
1709+/* tre-489 %txt /tests/golden/types-recursion-scc-groups/tree/txt
1710+/* typ-489 %txt /tests/golden/types-recursion-scc-groups/types/txt
1711+/* src-490 %jibb /tests/golden/types-recursion-scc-import/source/jibb
1712+/* tok-490 %txt /tests/golden/types-recursion-scc-import/tokens/txt
1713+/* tre-490 %txt /tests/golden/types-recursion-scc-import/tree/txt
1714+/* mod-490-1 %jibb /tests/golden/types-recursion-scc-import/modules/ui/lib/jibb
1715+/* typ-490 %txt /tests/golden/types-recursion-scc-import/types/txt
1716+/* mtre-490 %txt /tests/golden/types-recursion-scc-import/module-trees/txt
1717+/* src-491 %jibb /tests/golden/types-recursion-scc-import-bad/source/jibb
1718+/* tok-491 %txt /tests/golden/types-recursion-scc-import-bad/tokens/txt
1719+/* tre-491 %txt /tests/golden/types-recursion-scc-import-bad/tree/txt
1720+/* mod-491-1 %jibb /tests/golden/types-recursion-scc-import-bad/modules/ui/lib/jibb
1721+/* typ-491 %txt /tests/golden/types-recursion-scc-import-bad/types/txt
1722+/* mtre-491 %txt /tests/golden/types-recursion-scc-import-bad/module-trees/txt
1723+/* src-492 %jibb /tests/golden/types-recursion-scc-local/source/jibb
1724+/* tok-492 %txt /tests/golden/types-recursion-scc-local/tokens/txt
1725+/* tre-492 %txt /tests/golden/types-recursion-scc-local/tree/txt
1726+/* typ-492 %txt /tests/golden/types-recursion-scc-local/types/txt
1727+/* src-493 %jibb /tests/golden/types-recursion-scc-order/source/jibb
1728+/* tok-493 %txt /tests/golden/types-recursion-scc-order/tokens/txt
1729+/* tre-493 %txt /tests/golden/types-recursion-scc-order/tree/txt
1730+/* typ-493 %txt /tests/golden/types-recursion-scc-order/types/txt
1731+/* src-494 %jibb /tests/golden/types-recursion-scc-shadow/source/jibb
1732+/* tok-494 %txt /tests/golden/types-recursion-scc-shadow/tokens/txt
1733+/* tre-494 %txt /tests/golden/types-recursion-scc-shadow/tree/txt
1734+/* typ-494 %txt /tests/golden/types-recursion-scc-shadow/types/txt
1735+/* src-495 %jibb /tests/golden/types-recursive-branch/source/jibb
1736+/* tok-495 %txt /tests/golden/types-recursive-branch/tokens/txt
1737+/* tre-495 %txt /tests/golden/types-recursive-branch/tree/txt
1738+/* typ-495 %txt /tests/golden/types-recursive-branch/types/txt
1739+/* src-496 %jibb /tests/golden/types-recursive-gate/source/jibb
1740+/* tok-496 %txt /tests/golden/types-recursive-gate/tokens/txt
1741+/* tre-496 %txt /tests/golden/types-recursive-gate/tree/txt
1742+/* typ-496 %txt /tests/golden/types-recursive-gate/types/txt
1743+/* src-497 %jibb /tests/golden/types-recursive-sample/source/jibb
1744+/* tok-497 %txt /tests/golden/types-recursive-sample/tokens/txt
1745+/* tre-497 %txt /tests/golden/types-recursive-sample/tree/txt
1746+/* typ-497 %txt /tests/golden/types-recursive-sample/types/txt
1747+/* src-498 %jibb /tests/golden/types-string-interpolation/source/jibb
1748+/* tok-498 %txt /tests/golden/types-string-interpolation/tokens/txt
1749+/* tre-498 %txt /tests/golden/types-string-interpolation/tree/txt
1750+/* typ-498 %txt /tests/golden/types-string-interpolation/types/txt
1751+/* src-499 %jibb /tests/golden/types-union-alias/source/jibb
1752+/* tok-499 %txt /tests/golden/types-union-alias/tokens/txt
1753+/* tre-499 %txt /tests/golden/types-union-alias/tree/txt
1754+/* typ-499 %txt /tests/golden/types-union-alias/types/txt
1755+/* src-500 %jibb /tests/golden/types-union-branch-context/source/jibb
1756+/* tok-500 %txt /tests/golden/types-union-branch-context/tokens/txt
1757+/* tre-500 %txt /tests/golden/types-union-branch-context/tree/txt
1758+/* typ-500 %txt /tests/golden/types-union-branch-context/types/txt
1759+/* src-501 %jibb /tests/golden/types-union-branch-pending/source/jibb
1760+/* tok-501 %txt /tests/golden/types-union-branch-pending/tokens/txt
1761+/* tre-501 %txt /tests/golden/types-union-branch-pending/tree/txt
1762+/* typ-501 %txt /tests/golden/types-union-branch-pending/types/txt
1763+/* src-502 %jibb /tests/golden/types-union-constructor-shape/source/jibb
1764+/* tok-502 %txt /tests/golden/types-union-constructor-shape/tokens/txt
1765+/* tre-502 %txt /tests/golden/types-union-constructor-shape/tree/txt
1766+/* typ-502 %txt /tests/golden/types-union-constructor-shape/types/txt
1767+/* src-503 %jibb /tests/golden/types-union-context-flow/source/jibb
1768+/* tok-503 %txt /tests/golden/types-union-context-flow/tokens/txt
1769+/* tre-503 %txt /tests/golden/types-union-context-flow/tree/txt
1770+/* typ-503 %txt /tests/golden/types-union-context-flow/types/txt
1771+/* src-504 %jibb /tests/golden/types-union-import/source/jibb
1772+/* tok-504 %txt /tests/golden/types-union-import/tokens/txt
1773+/* tre-504 %txt /tests/golden/types-union-import/tree/txt
1774+/* mod-504-1 %jibb /tests/golden/types-union-import/modules/ui/lib/jibb
1775+/* typ-504 %txt /tests/golden/types-union-import/types/txt
1776+/* mtre-504 %txt /tests/golden/types-union-import/module-trees/txt
1777+/* src-505 %jibb /tests/golden/types-union-local-pending/source/jibb
1778+/* tok-505 %txt /tests/golden/types-union-local-pending/tokens/txt
1779+/* tre-505 %txt /tests/golden/types-union-local-pending/tree/txt
1780+/* typ-505 %txt /tests/golden/types-union-local-pending/types/txt
1781+/* src-506 %jibb /tests/golden/types-union-overlap/source/jibb
1782+/* tok-506 %txt /tests/golden/types-union-overlap/tokens/txt
1783+/* tre-506 %txt /tests/golden/types-union-overlap/tree/txt
1784+/* typ-506 %txt /tests/golden/types-union-overlap/types/txt
1785+/* src-507 %jibb /tests/golden/types-union-overlap-nested/source/jibb
1786+/* tok-507 %txt /tests/golden/types-union-overlap-nested/tokens/txt
1787+/* tre-507 %txt /tests/golden/types-union-overlap-nested/tree/txt
1788+/* typ-507 %txt /tests/golden/types-union-overlap-nested/types/txt
1789+/* src-508 %jibb /tests/golden/types-union-phantom-generic/source/jibb
1790+/* tok-508 %txt /tests/golden/types-union-phantom-generic/tokens/txt
1791+/* tre-508 %txt /tests/golden/types-union-phantom-generic/tree/txt
1792+/* typ-508 %txt /tests/golden/types-union-phantom-generic/types/txt
1793+/* src-509 %jibb /tests/golden/types-union-print-cross-namespace/source/jibb
1794+/* tok-509 %txt /tests/golden/types-union-print-cross-namespace/tokens/txt
1795+/* tre-509 %txt /tests/golden/types-union-print-cross-namespace/tree/txt
1796+/* mod-509-1 %jibb /tests/golden/types-union-print-cross-namespace/modules/ui/lib/jibb
1797+/* typ-509 %txt /tests/golden/types-union-print-cross-namespace/types/txt
1798+/* mtre-509 %txt /tests/golden/types-union-print-cross-namespace/module-trees/txt
1799+/* src-510 %jibb /tests/golden/types-union-print-distinct/source/jibb
1800+/* tok-510 %txt /tests/golden/types-union-print-distinct/tokens/txt
1801+/* tre-510 %txt /tests/golden/types-union-print-distinct/tree/txt
1802+/* mod-510-1 %jibb /tests/golden/types-union-print-distinct/modules/ui/left/jibb
1803+/* mod-510-2 %jibb /tests/golden/types-union-print-distinct/modules/ui/right/jibb
1804+/* mod-510-3 %jibb /tests/golden/types-union-print-distinct/modules/ui/twin/jibb
1805+/* typ-510 %txt /tests/golden/types-union-print-distinct/types/txt
1806+/* mtre-510 %txt /tests/golden/types-union-print-distinct/module-trees/txt
1807+/* src-511 %jibb /tests/golden/types-union-print-escape/source/jibb
1808+/* tok-511 %txt /tests/golden/types-union-print-escape/tokens/txt
1809+/* tre-511 %txt /tests/golden/types-union-print-escape/tree/txt
1810+/* typ-511 %txt /tests/golden/types-union-print-escape/types/txt
1811+/* src-512 %jibb /tests/golden/types-union-print-local/source/jibb
1812+/* tok-512 %txt /tests/golden/types-union-print-local/tokens/txt
1813+/* tre-512 %txt /tests/golden/types-union-print-local/tree/txt
1814+/* typ-512 %txt /tests/golden/types-union-print-local/types/txt
1815+/* src-513 %jibb /tests/golden/types-union-print-nested/source/jibb
1816+/* tok-513 %txt /tests/golden/types-union-print-nested/tokens/txt
1817+/* tre-513 %txt /tests/golden/types-union-print-nested/tree/txt
1818+/* typ-513 %txt /tests/golden/types-union-print-nested/types/txt
1819+/* src-514 %jibb /tests/golden/types-union-print-same-origin/source/jibb
1820+/* tok-514 %txt /tests/golden/types-union-print-same-origin/tokens/txt
1821+/* tre-514 %txt /tests/golden/types-union-print-same-origin/tree/txt
1822+/* mod-514-1 %jibb /tests/golden/types-union-print-same-origin/modules/ui/shared/jibb
1823+/* typ-514 %txt /tests/golden/types-union-print-same-origin/types/txt
1824+/* mtre-514 %txt /tests/golden/types-union-print-same-origin/module-trees/txt
1825+/* src-515 %jibb /tests/golden/types-union-print-transitive/source/jibb
1826+/* tok-515 %txt /tests/golden/types-union-print-transitive/tokens/txt
1827+/* tre-515 %txt /tests/golden/types-union-print-transitive/tree/txt
1828+/* mod-515-1 %jibb /tests/golden/types-union-print-transitive/modules/ui/mid/jibb
1829+/* mod-515-2 %jibb /tests/golden/types-union-print-transitive/modules/ui/base/jibb
1830+/* typ-515 %txt /tests/golden/types-union-print-transitive/types/txt
1831+/* mtre-515 %txt /tests/golden/types-union-print-transitive/module-trees/txt
1832+/* src-516 %jibb /tests/golden/types-union-singleton/source/jibb
1833+/* tok-516 %txt /tests/golden/types-union-singleton/tokens/txt
1834+/* tre-516 %txt /tests/golden/types-union-singleton/tree/txt
1835+/* typ-516 %txt /tests/golden/types-union-singleton/types/txt
1836+/* src-517 %jibb /tests/golden/types-union-tag-atoms/source/jibb
1837+/* tok-517 %txt /tests/golden/types-union-tag-atoms/tokens/txt
1838+/* tre-517 %txt /tests/golden/types-union-tag-atoms/tree/txt
1839+/* typ-517 %txt /tests/golden/types-union-tag-atoms/types/txt
1840+/* src-518 %jibb /tests/golden/types-union-tags/source/jibb
1841+/* tok-518 %txt /tests/golden/types-union-tags/tokens/txt
1842+/* tre-518 %txt /tests/golden/types-union-tags/tree/txt
1843+/* typ-518 %txt /tests/golden/types-union-tags/types/txt
1844+/* src-519 %jibb /tests/golden/types-union-unresolved/source/jibb
1845+/* tok-519 %txt /tests/golden/types-union-unresolved/tokens/txt
1846+/* tre-519 %txt /tests/golden/types-union-unresolved/tree/txt
1847+/* typ-519 %txt /tests/golden/types-union-unresolved/types/txt
1848+/* src-520 %jibb /tests/golden/types-union-unresolved-flow/source/jibb
1849+/* tok-520 %txt /tests/golden/types-union-unresolved-flow/tokens/txt
1850+/* tre-520 %txt /tests/golden/types-union-unresolved-flow/tree/txt
1851+/* typ-520 %txt /tests/golden/types-union-unresolved-flow/types/txt
1852+/* src-521 %jibb /tests/golden/types-unit-context/source/jibb
1853+/* tok-521 %txt /tests/golden/types-unit-context/tokens/txt
1854+/* tre-521 %txt /tests/golden/types-unit-context/tree/txt
1855+/* typ-521 %txt /tests/golden/types-unit-context/types/txt
1856+/* src-522 %jibb /tests/golden/types-unit-patterns/source/jibb
1857+/* tok-522 %txt /tests/golden/types-unit-patterns/tokens/txt
1858+/* tre-522 %txt /tests/golden/types-unit-patterns/tree/txt
1859+/* typ-522 %txt /tests/golden/types-unit-patterns/types/txt
18281860=/ prepared-prelude (prepare-prelude:jibb prelude-source)
18291861|%
18301862:: one arm per case
@@ -2803,62 +2835,76 @@
28032835 (weld (check ~.types-record-nested src-486 `tok-486 `tre-486) (check-types ~.types-record-nested ~[%tests %golden ~.types-record-nested %source %jibb] src-486 `typ-486))
28042836++ test-types-record-to-tuple
28052837 (weld (check ~.types-record-to-tuple src-487 `tok-487 `tre-487) (check-types ~.types-record-to-tuple ~[%tests %golden ~.types-record-to-tuple %source %jibb] src-487 `typ-487))
2838+++ test-types-recursion-scc-failures
2839+ (weld (check ~.types-recursion-scc-failures src-488 `tok-488 `tre-488) (check-module-types ~.types-recursion-scc-failures ~[%tests %golden ~.types-recursion-scc-failures %source %jibb] src-488 `typ-488 ~ ~ ~))
2840+++ test-types-recursion-scc-groups
2841+ (weld (check ~.types-recursion-scc-groups src-489 `tok-489 `tre-489) (check-module-types ~.types-recursion-scc-groups ~[%tests %golden ~.types-recursion-scc-groups %source %jibb] src-489 `typ-489 ~ ~ ~))
2842+++ test-types-recursion-scc-import
2843+ (weld (weld (check ~.types-recursion-scc-import src-490 `tok-490 `tre-490) (check-module-types ~.types-recursion-scc-import ~[%tests %golden ~.types-recursion-scc-import %source %jibb] src-490 `typ-490 ~ ~ ~[['/ui/lib.jibb' ~[~.ui ~.lib ~.jibb] mod-490-1]])) (check-module-trees ~.types-recursion-scc-import `mtre-490 ~[['/ui/lib.jibb' ~[~.ui ~.lib ~.jibb] mod-490-1]]))
2844+++ test-types-recursion-scc-import-bad
2845+ (weld (weld (check ~.types-recursion-scc-import-bad src-491 `tok-491 `tre-491) (check-module-types ~.types-recursion-scc-import-bad ~[%tests %golden ~.types-recursion-scc-import-bad %source %jibb] src-491 `typ-491 ~ ~ ~[['/ui/lib.jibb' ~[~.ui ~.lib ~.jibb] mod-491-1]])) (check-module-trees ~.types-recursion-scc-import-bad `mtre-491 ~[['/ui/lib.jibb' ~[~.ui ~.lib ~.jibb] mod-491-1]]))
2846+++ test-types-recursion-scc-local
2847+ (weld (check ~.types-recursion-scc-local src-492 `tok-492 `tre-492) (check-module-types ~.types-recursion-scc-local ~[%tests %golden ~.types-recursion-scc-local %source %jibb] src-492 `typ-492 ~ ~ ~))
2848+++ test-types-recursion-scc-order
2849+ (weld (check ~.types-recursion-scc-order src-493 `tok-493 `tre-493) (check-module-types ~.types-recursion-scc-order ~[%tests %golden ~.types-recursion-scc-order %source %jibb] src-493 `typ-493 ~ ~ ~))
2850+++ test-types-recursion-scc-shadow
2851+ (weld (check ~.types-recursion-scc-shadow src-494 `tok-494 `tre-494) (check-module-types ~.types-recursion-scc-shadow ~[%tests %golden ~.types-recursion-scc-shadow %source %jibb] src-494 `typ-494 ~ ~ ~))
28062852++ test-types-recursive-branch
2807− (weld (check ~.types-recursive-branch src-488 `tok-488 `tre-488) (check-module-types ~.types-recursive-branch ~[%tests %golden ~.types-recursive-branch %source %jibb] src-488 `typ-488 ~ ~ ~))
2853+ (weld (check ~.types-recursive-branch src-495 `tok-495 `tre-495) (check-module-types ~.types-recursive-branch ~[%tests %golden ~.types-recursive-branch %source %jibb] src-495 `typ-495 ~ ~ ~))
28082854++ test-types-recursive-gate
2809− (weld (check ~.types-recursive-gate src-489 `tok-489 `tre-489) (check-types ~.types-recursive-gate ~[%tests %golden ~.types-recursive-gate %source %jibb] src-489 `typ-489))
2855+ (weld (check ~.types-recursive-gate src-496 `tok-496 `tre-496) (check-types ~.types-recursive-gate ~[%tests %golden ~.types-recursive-gate %source %jibb] src-496 `typ-496))
28102856++ test-types-recursive-sample
2811− (weld (check ~.types-recursive-sample src-490 `tok-490 `tre-490) (check-types ~.types-recursive-sample ~[%tests %golden ~.types-recursive-sample %source %jibb] src-490 `typ-490))
2857+ (weld (check ~.types-recursive-sample src-497 `tok-497 `tre-497) (check-types ~.types-recursive-sample ~[%tests %golden ~.types-recursive-sample %source %jibb] src-497 `typ-497))
28122858++ test-types-string-interpolation
2813− (weld (check ~.types-string-interpolation src-491 `tok-491 `tre-491) (check-module-types ~.types-string-interpolation ~[%tests %golden ~.types-string-interpolation %source %jibb] src-491 `typ-491 ~ ~ ~))
2859+ (weld (check ~.types-string-interpolation src-498 `tok-498 `tre-498) (check-module-types ~.types-string-interpolation ~[%tests %golden ~.types-string-interpolation %source %jibb] src-498 `typ-498 ~ ~ ~))
28142860++ test-types-union-alias
2815− (weld (check ~.types-union-alias src-492 `tok-492 `tre-492) (check-types ~.types-union-alias ~[%tests %golden ~.types-union-alias %source %jibb] src-492 `typ-492))
2861+ (weld (check ~.types-union-alias src-499 `tok-499 `tre-499) (check-types ~.types-union-alias ~[%tests %golden ~.types-union-alias %source %jibb] src-499 `typ-499))
28162862++ test-types-union-branch-context
2817− (weld (check ~.types-union-branch-context src-493 `tok-493 `tre-493) (check-types ~.types-union-branch-context ~[%tests %golden ~.types-union-branch-context %source %jibb] src-493 `typ-493))
2863+ (weld (check ~.types-union-branch-context src-500 `tok-500 `tre-500) (check-types ~.types-union-branch-context ~[%tests %golden ~.types-union-branch-context %source %jibb] src-500 `typ-500))
28182864++ test-types-union-branch-pending
2819− (weld (check ~.types-union-branch-pending src-494 `tok-494 `tre-494) (check-types ~.types-union-branch-pending ~[%tests %golden ~.types-union-branch-pending %source %jibb] src-494 `typ-494))
2865+ (weld (check ~.types-union-branch-pending src-501 `tok-501 `tre-501) (check-types ~.types-union-branch-pending ~[%tests %golden ~.types-union-branch-pending %source %jibb] src-501 `typ-501))
28202866++ test-types-union-constructor-shape
2821− (weld (check ~.types-union-constructor-shape src-495 `tok-495 `tre-495) (check-types ~.types-union-constructor-shape ~[%tests %golden ~.types-union-constructor-shape %source %jibb] src-495 `typ-495))
2867+ (weld (check ~.types-union-constructor-shape src-502 `tok-502 `tre-502) (check-types ~.types-union-constructor-shape ~[%tests %golden ~.types-union-constructor-shape %source %jibb] src-502 `typ-502))
28222868++ test-types-union-context-flow
2823− (weld (check ~.types-union-context-flow src-496 `tok-496 `tre-496) (check-types ~.types-union-context-flow ~[%tests %golden ~.types-union-context-flow %source %jibb] src-496 `typ-496))
2869+ (weld (check ~.types-union-context-flow src-503 `tok-503 `tre-503) (check-types ~.types-union-context-flow ~[%tests %golden ~.types-union-context-flow %source %jibb] src-503 `typ-503))
28242870++ test-types-union-import
2825− (weld (weld (check ~.types-union-import src-497 `tok-497 `tre-497) (check-module-types ~.types-union-import ~[%tests %golden ~.types-union-import %source %jibb] src-497 `typ-497 ~ ~ ~[['/ui/lib.jibb' ~[~.ui ~.lib ~.jibb] mod-497-1]])) (check-module-trees ~.types-union-import `mtre-497 ~[['/ui/lib.jibb' ~[~.ui ~.lib ~.jibb] mod-497-1]]))
2871+ (weld (weld (check ~.types-union-import src-504 `tok-504 `tre-504) (check-module-types ~.types-union-import ~[%tests %golden ~.types-union-import %source %jibb] src-504 `typ-504 ~ ~ ~[['/ui/lib.jibb' ~[~.ui ~.lib ~.jibb] mod-504-1]])) (check-module-trees ~.types-union-import `mtre-504 ~[['/ui/lib.jibb' ~[~.ui ~.lib ~.jibb] mod-504-1]]))
28262872++ test-types-union-local-pending
2827− (weld (check ~.types-union-local-pending src-498 `tok-498 `tre-498) (check-types ~.types-union-local-pending ~[%tests %golden ~.types-union-local-pending %source %jibb] src-498 `typ-498))
2873+ (weld (check ~.types-union-local-pending src-505 `tok-505 `tre-505) (check-types ~.types-union-local-pending ~[%tests %golden ~.types-union-local-pending %source %jibb] src-505 `typ-505))
28282874++ test-types-union-overlap
2829− (weld (check ~.types-union-overlap src-499 `tok-499 `tre-499) (check-types ~.types-union-overlap ~[%tests %golden ~.types-union-overlap %source %jibb] src-499 `typ-499))
2875+ (weld (check ~.types-union-overlap src-506 `tok-506 `tre-506) (check-types ~.types-union-overlap ~[%tests %golden ~.types-union-overlap %source %jibb] src-506 `typ-506))
28302876++ test-types-union-overlap-nested
2831− (weld (check ~.types-union-overlap-nested src-500 `tok-500 `tre-500) (check-types ~.types-union-overlap-nested ~[%tests %golden ~.types-union-overlap-nested %source %jibb] src-500 `typ-500))
2877+ (weld (check ~.types-union-overlap-nested src-507 `tok-507 `tre-507) (check-types ~.types-union-overlap-nested ~[%tests %golden ~.types-union-overlap-nested %source %jibb] src-507 `typ-507))
28322878++ test-types-union-phantom-generic
2833− (weld (check ~.types-union-phantom-generic src-501 `tok-501 `tre-501) (check-types ~.types-union-phantom-generic ~[%tests %golden ~.types-union-phantom-generic %source %jibb] src-501 `typ-501))
2879+ (weld (check ~.types-union-phantom-generic src-508 `tok-508 `tre-508) (check-types ~.types-union-phantom-generic ~[%tests %golden ~.types-union-phantom-generic %source %jibb] src-508 `typ-508))
28342880++ test-types-union-print-cross-namespace
2835− (weld (weld (check ~.types-union-print-cross-namespace src-502 `tok-502 `tre-502) (check-module-types ~.types-union-print-cross-namespace ~[%tests %golden ~.types-union-print-cross-namespace %source %jibb] src-502 `typ-502 ~ ~ ~[['/ui/lib.jibb' ~[~.ui ~.lib ~.jibb] mod-502-1]])) (check-module-trees ~.types-union-print-cross-namespace `mtre-502 ~[['/ui/lib.jibb' ~[~.ui ~.lib ~.jibb] mod-502-1]]))
2881+ (weld (weld (check ~.types-union-print-cross-namespace src-509 `tok-509 `tre-509) (check-module-types ~.types-union-print-cross-namespace ~[%tests %golden ~.types-union-print-cross-namespace %source %jibb] src-509 `typ-509 ~ ~ ~[['/ui/lib.jibb' ~[~.ui ~.lib ~.jibb] mod-509-1]])) (check-module-trees ~.types-union-print-cross-namespace `mtre-509 ~[['/ui/lib.jibb' ~[~.ui ~.lib ~.jibb] mod-509-1]]))
28362882++ test-types-union-print-distinct
2837− (weld (weld (check ~.types-union-print-distinct src-503 `tok-503 `tre-503) (check-module-types ~.types-union-print-distinct ~[%tests %golden ~.types-union-print-distinct %source %jibb] src-503 `typ-503 ~ ~ ~[['/ui/left.jibb' ~[~.ui ~.left ~.jibb] mod-503-1] ['/ui/right.jibb' ~[~.ui ~.right ~.jibb] mod-503-2] ['/ui/twin.jibb' ~[~.ui ~.twin ~.jibb] mod-503-3]])) (check-module-trees ~.types-union-print-distinct `mtre-503 ~[['/ui/left.jibb' ~[~.ui ~.left ~.jibb] mod-503-1] ['/ui/right.jibb' ~[~.ui ~.right ~.jibb] mod-503-2] ['/ui/twin.jibb' ~[~.ui ~.twin ~.jibb] mod-503-3]]))
2883+ (weld (weld (check ~.types-union-print-distinct src-510 `tok-510 `tre-510) (check-module-types ~.types-union-print-distinct ~[%tests %golden ~.types-union-print-distinct %source %jibb] src-510 `typ-510 ~ ~ ~[['/ui/left.jibb' ~[~.ui ~.left ~.jibb] mod-510-1] ['/ui/right.jibb' ~[~.ui ~.right ~.jibb] mod-510-2] ['/ui/twin.jibb' ~[~.ui ~.twin ~.jibb] mod-510-3]])) (check-module-trees ~.types-union-print-distinct `mtre-510 ~[['/ui/left.jibb' ~[~.ui ~.left ~.jibb] mod-510-1] ['/ui/right.jibb' ~[~.ui ~.right ~.jibb] mod-510-2] ['/ui/twin.jibb' ~[~.ui ~.twin ~.jibb] mod-510-3]]))
28382884++ test-types-union-print-escape
2839− (weld (check ~.types-union-print-escape src-504 `tok-504 `tre-504) (check-types ~.types-union-print-escape ~[%tests %golden ~.types-union-print-escape %source %jibb] src-504 `typ-504))
2885+ (weld (check ~.types-union-print-escape src-511 `tok-511 `tre-511) (check-types ~.types-union-print-escape ~[%tests %golden ~.types-union-print-escape %source %jibb] src-511 `typ-511))
28402886++ test-types-union-print-local
2841− (weld (check ~.types-union-print-local src-505 `tok-505 `tre-505) (check-types ~.types-union-print-local ~[%tests %golden ~.types-union-print-local %source %jibb] src-505 `typ-505))
2887+ (weld (check ~.types-union-print-local src-512 `tok-512 `tre-512) (check-types ~.types-union-print-local ~[%tests %golden ~.types-union-print-local %source %jibb] src-512 `typ-512))
28422888++ test-types-union-print-nested
2843− (weld (check ~.types-union-print-nested src-506 `tok-506 `tre-506) (check-types ~.types-union-print-nested ~[%tests %golden ~.types-union-print-nested %source %jibb] src-506 `typ-506))
2889+ (weld (check ~.types-union-print-nested src-513 `tok-513 `tre-513) (check-types ~.types-union-print-nested ~[%tests %golden ~.types-union-print-nested %source %jibb] src-513 `typ-513))
28442890++ test-types-union-print-same-origin
2845− (weld (weld (check ~.types-union-print-same-origin src-507 `tok-507 `tre-507) (check-module-types ~.types-union-print-same-origin ~[%tests %golden ~.types-union-print-same-origin %source %jibb] src-507 `typ-507 ~ ~ ~[['/ui/shared.jibb' ~[~.ui ~.shared ~.jibb] mod-507-1]])) (check-module-trees ~.types-union-print-same-origin `mtre-507 ~[['/ui/shared.jibb' ~[~.ui ~.shared ~.jibb] mod-507-1]]))
2891+ (weld (weld (check ~.types-union-print-same-origin src-514 `tok-514 `tre-514) (check-module-types ~.types-union-print-same-origin ~[%tests %golden ~.types-union-print-same-origin %source %jibb] src-514 `typ-514 ~ ~ ~[['/ui/shared.jibb' ~[~.ui ~.shared ~.jibb] mod-514-1]])) (check-module-trees ~.types-union-print-same-origin `mtre-514 ~[['/ui/shared.jibb' ~[~.ui ~.shared ~.jibb] mod-514-1]]))
28462892++ test-types-union-print-transitive
2847− (weld (weld (check ~.types-union-print-transitive src-508 `tok-508 `tre-508) (check-module-types ~.types-union-print-transitive ~[%tests %golden ~.types-union-print-transitive %source %jibb] src-508 `typ-508 ~ ~ ~[['/ui/mid.jibb' ~[~.ui ~.mid ~.jibb] mod-508-1] ['/ui/base.jibb' ~[~.ui ~.base ~.jibb] mod-508-2]])) (check-module-trees ~.types-union-print-transitive `mtre-508 ~[['/ui/mid.jibb' ~[~.ui ~.mid ~.jibb] mod-508-1] ['/ui/base.jibb' ~[~.ui ~.base ~.jibb] mod-508-2]]))
2893+ (weld (weld (check ~.types-union-print-transitive src-515 `tok-515 `tre-515) (check-module-types ~.types-union-print-transitive ~[%tests %golden ~.types-union-print-transitive %source %jibb] src-515 `typ-515 ~ ~ ~[['/ui/mid.jibb' ~[~.ui ~.mid ~.jibb] mod-515-1] ['/ui/base.jibb' ~[~.ui ~.base ~.jibb] mod-515-2]])) (check-module-trees ~.types-union-print-transitive `mtre-515 ~[['/ui/mid.jibb' ~[~.ui ~.mid ~.jibb] mod-515-1] ['/ui/base.jibb' ~[~.ui ~.base ~.jibb] mod-515-2]]))
28482894++ test-types-union-singleton
2849− (weld (check ~.types-union-singleton src-509 `tok-509 `tre-509) (check-types ~.types-union-singleton ~[%tests %golden ~.types-union-singleton %source %jibb] src-509 `typ-509))
2895+ (weld (check ~.types-union-singleton src-516 `tok-516 `tre-516) (check-types ~.types-union-singleton ~[%tests %golden ~.types-union-singleton %source %jibb] src-516 `typ-516))
28502896++ test-types-union-tag-atoms
2851− (weld (check ~.types-union-tag-atoms src-510 `tok-510 `tre-510) (check-types ~.types-union-tag-atoms ~[%tests %golden ~.types-union-tag-atoms %source %jibb] src-510 `typ-510))
2897+ (weld (check ~.types-union-tag-atoms src-517 `tok-517 `tre-517) (check-types ~.types-union-tag-atoms ~[%tests %golden ~.types-union-tag-atoms %source %jibb] src-517 `typ-517))
28522898++ test-types-union-tags
2853− (weld (check ~.types-union-tags src-511 `tok-511 `tre-511) (check-types ~.types-union-tags ~[%tests %golden ~.types-union-tags %source %jibb] src-511 `typ-511))
2899+ (weld (check ~.types-union-tags src-518 `tok-518 `tre-518) (check-types ~.types-union-tags ~[%tests %golden ~.types-union-tags %source %jibb] src-518 `typ-518))
28542900++ test-types-union-unresolved
2855− (weld (check ~.types-union-unresolved src-512 `tok-512 `tre-512) (check-types ~.types-union-unresolved ~[%tests %golden ~.types-union-unresolved %source %jibb] src-512 `typ-512))
2901+ (weld (check ~.types-union-unresolved src-519 `tok-519 `tre-519) (check-types ~.types-union-unresolved ~[%tests %golden ~.types-union-unresolved %source %jibb] src-519 `typ-519))
28562902++ test-types-union-unresolved-flow
2857− (weld (check ~.types-union-unresolved-flow src-513 `tok-513 `tre-513) (check-types ~.types-union-unresolved-flow ~[%tests %golden ~.types-union-unresolved-flow %source %jibb] src-513 `typ-513))
2903+ (weld (check ~.types-union-unresolved-flow src-520 `tok-520 `tre-520) (check-types ~.types-union-unresolved-flow ~[%tests %golden ~.types-union-unresolved-flow %source %jibb] src-520 `typ-520))
28582904++ test-types-unit-context
2859− (weld (check ~.types-unit-context src-514 `tok-514 `tre-514) (check-types ~.types-unit-context ~[%tests %golden ~.types-unit-context %source %jibb] src-514 `typ-514))
2905+ (weld (check ~.types-unit-context src-521 `tok-521 `tre-521) (check-types ~.types-unit-context ~[%tests %golden ~.types-unit-context %source %jibb] src-521 `typ-521))
28602906++ test-types-unit-patterns
2861− (weld (check ~.types-unit-patterns src-515 `tok-515 `tre-515) (check-types ~.types-unit-patterns ~[%tests %golden ~.types-unit-patterns %source %jibb] src-515 `typ-515))
2907+ (weld (check ~.types-unit-patterns src-522 `tok-522 `tre-522) (check-types ~.types-unit-patterns ~[%tests %golden ~.types-unit-patterns %source %jibb] src-522 `typ-522))
28622908::
28632909:: +check: run golden:jibb on a case and compare both outputs
28642910::