on master help sign in
docs/compiler.md+34−6
since splitsnapshots
unifiedsplit
@@ -56,13 +56,13 @@ The core is split into chapters, `+| %name`, in this order:
56| `%span-check` | `+check-spans`, which `+golden` runs on every tree, and `+check-spans-test` |
56| `%span-check` | `+check-spans`, which `+golden` runs on every tree, and `+check-spans-test` |
57| `%type-inference` | The initial inference fragment and its unification helpers; not yet a module type checker |
57| `%type-inference` | The initial inference fragment and its unification helpers; not yet a module type checker |
58
58
59−The inference fragment supports fixed auras, unrestricted `@`, one-way widening into it and toward aura-family ancestors, generic variables and gates, faced and unfaced cells, cell sample binders, known record field reads, a cell pattern of two or more binders, a complete two-arm loobean branch, a complete two-arm unit-shaped branch, closed local mold aliases and acyclic forward value references. For a supported single syntactic top-level recursive gate, the checker infers the sample first and uses that exact sample, including its field faces, in a monomorphic self placeholder. The completed body must unify with the placeholder before the gate is generalized; incompatible recursive arguments can report the call and argument sites. Uses of generalized top-level definitions instantiate their schemes independently. For a complete loobean branch with one direct self-call arm, the checker can infer the other arm independently and use its closed, fully resolved type to seed the recursive result; it then checks the whole body. Open or pending base types do not seed the result, and other branch shapes still depend on the existing partial inference. A supported single local recursive gate also uses a monomorphic self reference while its body is checked, then generalizes variables free of its enclosing environment; captured variables remain shared. Acyclic local value definitions can refer forward. The checker collects written capitals per `++` before inference, excluding nested definitions: a capital used in an enclosing definition is shared with its locals, even when written later, while a capital introduced only in a local definition is generalized there. Sibling locals can introduce independent capitals with the same spelling; generic mold parameters keep their own scope. Top-level groups of syntactic gates are inferred together with monomorphic placeholders and shared substitutions, then generalized only after the whole group checks; downstream uses and library interfaces instantiate those schemes independently. A dependency graph identifies groups with two iterative depth-first passes; its conservative local-reference edges can reject otherwise valid programs. Supported local mutually recursive gate groups also use shared monomorphic placeholders and generalize only after the group checks, preserving captured outer variables. Some proven non-gate value cycles are diagnosed; other mixed gate/value cycles, polymorphic recursion, unresolved literal constraints and unresolved branch joins remain unsupported. Acyclic simple local mold aliases can also refer forward, and are scoped to the body, not its gate's sample. Nonrecursive generic aliases of supported molds can be applied at exact arity, including locally and through library interfaces; their parameters are lexical. Closed, provably disjoint nonrecursive unions and tagged single-case molds support contextual term values, `~` and `|=%tag` constructors. A null-headed cell can match a union case but does not supply a `|=%$` constructor; unresolved tags and nulls remain pending, with distinct partial-inference diagnostics. Nonrecursive top-level generic union molds with provably disjoint cases also support contextual tags and constructors at exact arity; their arguments are retained through generalization and supported library interfaces. Nonrecursive generic aliases can reorder, repeat or omit parameters while preserving a supported union’s origin, including through local scopes and library interfaces. A generic union declared directly inside a body and recursive molds remain unsupported. A directly known named union can instantiate an unconstrained generic gate sample while retaining its origin, generic arguments and faces. Unnamed, pending-tag, recursive, unknown-atom and variable-bound union origins remain unsupported. A value with type variable `A` can fit a field whose type is that same `A`, including in generic union payloads and nested or repeated record fields. A differing-variable face constraint remains unsupported. When inference forces two distinct explicitly written capitals equal, it reports both source sites; forcing a capital to a concrete type remains unsupported in this fragment. It can infer and generalize atom constraints arising from explicit capitals or bare sample binders, preserve those constraints through aliases, instantiate them independently, and print multiple constraints. Unresolved decimal variables default to `@ud` for inferred types without gates; defaulting inside gate types and other constraint cases remain incomplete. It does not yet check a module, complete imports, general patterns, general deferred constraints, recursive molds, dependency cycles or most errors with both conflicting excerpts. Definite cast and call mismatches, incompatible branches and overlapping union cases report both sites and excerpts. Concrete branch results can join at an explicitly present parent aura or `@`. Some known tuple and record positions acquire matching faces; other variable-dependent face merges, general branch tag context and ambiguous call-result propagation remain unsupported; function compatibility involving nested `@` and variable-dependent joins remain unsupported except for equal types. For a single recursive gate outside a group, the reporting path repeats inference rather than instantiating its generalized interface inside its own body; a group report uses its stored schemes. This adds work, and the current dependency pass can take quadratic time on long forward chains; the milestone's speed target remains unverified. A separate conservative pass reports unions whose cases are provably disjoint or overlapping and leaves other cases unresolved; it does not claim the mold is checked. Unsupported forms are reported as such, and the partial output says the module has not been checked.
59+The inference fragment supports fixed auras, unrestricted `@`, one-way widening into it and toward aura-family ancestors, generic variables and gates, faced and unfaced cells, cell sample binders, known record field reads, a cell pattern of two or more binders, a complete two-arm loobean branch, a complete two-arm unit-shaped branch, closed local mold aliases and acyclic forward value references. For a supported single syntactic top-level recursive gate, the checker infers the sample first and uses that exact sample, including its field faces, in a monomorphic self placeholder. The completed body must unify with the placeholder before the gate is generalized; incompatible recursive arguments can report the call and argument sites. Uses of generalized top-level definitions instantiate their schemes independently. For a complete loobean branch with one direct self-call arm, the checker can infer the other arm independently and use its closed, fully resolved type to seed the recursive result; it then checks the whole body. Open or pending base types do not seed the result, and other branch shapes still depend on the existing partial inference. A supported single local recursive gate also uses a monomorphic self reference while its body is checked, then generalizes variables free of its enclosing environment; captured variables remain shared. Acyclic local value definitions can refer forward. The checker collects written capitals per `++` before inference, excluding nested definitions: a capital used in an enclosing definition is shared with its locals, even when written later, while a capital introduced only in a local definition is generalized there. Sibling locals can introduce independent capitals with the same spelling; generic mold parameters keep their own scope. Top-level groups of syntactic gates are inferred together with monomorphic placeholders and shared substitutions, then generalized only after the whole group checks; downstream uses and library interfaces instantiate those schemes independently. A dependency graph identifies groups with two iterative depth-first passes; its conservative local-reference edges can reject otherwise valid programs. Supported local mutually recursive gate groups also use shared monomorphic placeholders and generalize only after the group checks, preserving captured outer variables. Some proven non-gate value cycles are diagnosed; other mixed gate/value cycles, polymorphic recursion, unresolved literal constraints and unresolved branch joins remain unsupported. Acyclic simple local mold aliases can also refer forward, and are scoped to the body, not its gate's sample. Nonrecursive generic aliases of supported molds can be applied at exact arity, including locally and through library interfaces; their parameters are lexical. Closed, provably disjoint nonrecursive unions and tagged single-case molds support contextual term values, `~` and `|=%tag` constructors. Literal heads compare by their runtime noun, so `|=%$` can construct an explicit null-, loobean-zero- or term-zero-headed case. Equal heads with distinct payloads can be selected when exactly one payload fit is proven; unknown or ambiguous alternatives remain unsupported. Unresolved tags and nulls remain pending, with distinct partial-inference diagnostics. Nonrecursive top-level generic union molds with provably disjoint cases also support contextual tags and constructors at exact arity; their arguments are retained through generalization and supported library interfaces. Nonrecursive generic aliases can reorder, repeat or omit parameters while preserving a supported union’s origin, including through local scopes and library interfaces. A generic union declared directly inside a body and recursive molds remain unsupported. A directly known named union can instantiate an unconstrained generic gate sample while retaining its origin, generic arguments and faces. Unnamed, pending-tag, recursive, unknown-atom and variable-bound union origins remain unsupported. A value with type variable `A` can fit a field whose type is that same `A`, including in generic union payloads and nested or repeated record fields. A differing-variable face constraint remains unsupported. When inference forces two distinct explicitly written capitals equal, it reports both source sites; forcing a capital to a concrete type remains unsupported in this fragment. It can infer and generalize atom constraints arising from explicit capitals or bare sample binders, preserve those constraints through aliases, instantiate them independently, and print multiple constraints. Unresolved decimal variables default to `@ud` for inferred types without gates; defaulting inside gate types and other constraint cases remain incomplete. It does not yet check a module, complete imports, general patterns, general deferred constraints, recursive molds, dependency cycles or most errors with both conflicting excerpts. Definite cast and call mismatches, incompatible branches and overlapping union cases report both sites and excerpts. Concrete branch results can join at an explicitly present parent aura or `@`. Some known tuple and record positions acquire matching faces; other variable-dependent face merges, general branch tag context and ambiguous call-result propagation remain unsupported; function compatibility involving nested `@` and variable-dependent joins remain unsupported except for equal types. For a single recursive gate outside a group, the reporting path repeats inference rather than instantiating its generalized interface inside its own body; a group report uses its stored schemes. This adds work, and the current dependency pass can take quadratic time on long forward chains; the milestone's speed target remains unverified. A separate conservative pass reports unions whose cases are provably disjoint or overlapping and leaves other cases unresolved; it does not claim the mold is checked. Unsupported forms are reported as such, and the partial output says the module has not been checked.
60
60
61A single-arm cell pattern can bind two or more positions, with its last binder capturing the remaining tail. Duplicate and shadowed names are rejected. A definite non-cell spine fails; an intermediate union or collection that might contain a cell remains unsupported. For a known non-union cell, a separate one-arm rule also accepts structured patterns, including nested literal and wildcard positions, when the existing coverage proof establishes the whole pattern. It binds payloads with their original types and checks result context; unknown, partially covered, union or recursive spines stay unsupported.
61A single-arm cell pattern can bind two or more positions, with its last binder capturing the remaining tail. Duplicate and shadowed names are rejected. A definite non-cell spine fails; an intermediate union or collection that might contain a cell remains unsupported. For a known non-union cell, a separate one-arm rule also accepts structured patterns, including nested literal and wildcard positions, when the existing coverage proof establishes the whole pattern. It binds payloads with their original types and checks result context; unknown, partially covered, union or recursive spines stay unsupported.
62
62
63String 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.
63String interpolation infers its pieces in order and preserves substitutions and pending constraints. A piece with a known atom aura, unrestricted `@`, or a tape `(list @tD)` is accepted; an isolated decimal literal takes its normal `@ud` default. A known cell reports that it needs a printer, and an explicitly generic atom asks for an aura at its use site. Loobeans, term singletons, non-tape collections, open types and a type fixed only later remain unsupported in this fragment.
64
64
65−The Hoon bridge translates imported `*` as the any-noun type, directly or within supported nonrecursive cells. The reader may still decline a disjoint tagged union with a noun payload, and recursive imports containing `*` remain unsupported. It accepts an exact fork of the two loobean singletons as `?`, and each singleton separately as `%.y` or `%.n`, including inside supported faced cells. Contextual literals specialize against a loobean singleton. Open `%f`, other values, and other forks containing loobean singletons remain unsupported; recursive Hoon molds containing flags can also fail closed.
65+The Hoon bridge translates imported `*` as the any-noun type, directly or within supported nonrecursive cells. The reader may still decline a disjoint tagged union with a noun payload, and recursive imports containing `*` remain unsupported. It accepts an exact fork of the two loobean singletons as `?`, and each singleton separately as `%.y` or `%.n`, including inside supported faced cells. Contextual loobean literals specialize against a matching singleton by noun, including a proven singleton in a direct union; named loobean singletons do not silently widen to a distinct aura. Open `%f`, other values, and other forks containing loobean singletons remain unsupported; recursive Hoon molds containing flags can also fail closed.
66
66
67A bare tag that provably matches no case of a known union reports the union and tag sites. This covers casts, single-argument calls, contextual unit payloads, list items and supported branch arms, including unnamed imported unions. For syntactic tuples, ordered fit replay can identify a missing tag in a nested position; an earlier mismatch or uncertainty stops the replay instead of guessing. Existing tags whose shape or payload does not fit retain the ordinary mismatch; unresolved tags stay pending.
67A bare tag that provably matches no case of a known union reports the union and tag sites. This covers casts, single-argument calls, contextual unit payloads, list items and supported branch arms, including unnamed imported unions. For syntactic tuples, ordered fit replay can identify a missing tag in a nested position; an earlier mismatch or uncertainty stops the replay instead of guessing. Existing tags whose shape or payload does not fit retain the ordinary mismatch; unresolved tags stay pending.
68
68
@@ -80,23 +80,41 @@ A backtick constructs a unit when the supplied prelude has the validated standar
80
80
81A known union of `~` and a null-headed cell can be matched by `~` and `[~ value]` arms in either order. The payload binder is checked for shadowing. Unknown subjects, missing or duplicate arms, and unresolved branch results remain unsupported; this fragment infers the prelude’s `fall` and `need` signatures.
81A known union of `~` and a null-headed cell can be matched by `~` and `[~ value]` arms in either order. The payload binder is checked for shadowing. Unknown subjects, missing or duplicate arms, and unresolved branch results remain unsupported; this fragment infers the prelude’s `fall` and `need` signatures.
82
82
83−A known closed union with two or more arms can be matched when each arm provably covers or excludes each remaining case. The checker first tries whole cases; when a pattern splits a case, it can expand known `?` positions into their two noun values, up to 64 alternatives across the union. Binders retain the original case type, and one arm may bind several refinements of that case. It reports missing alternatives and arms already covered, checks tags by noun value, and supports imported and generic union cases. Other partial patterns, expansions above the limit, binders spanning distinct cases, differing arm result types and some complex two-arm subjects remain unsupported. When a cast or known call sample supplies a result type, a known union subject accessed by a wing can propagate that context through whole-case arms and supported finite loobean refinements, including nested cell and list positions. Other partial-pattern context and non-wing subjects remain unsupported. The Grammar’s `step` block infers in this fragment, but its module is not yet checked.
83+A known closed union with two or more arms can be matched when each arm provably covers or excludes each remaining case. The checker first tries whole cases; when a pattern splits a case, it can expand known `?` positions into their two noun values, up to 64 alternatives across the union. Binders retain the original case type, and one arm may bind several refinements of that case. It reports missing alternatives and arms already covered, checks tags by noun value, and supports imported and generic union cases. Other partial patterns, expansions above the limit, binders spanning distinct cases, differing arm result types and some complex two-arm subjects remain unsupported. When a cast or known call sample supplies a result type, a known union subject accessed by a wing, a grouped wing or a supported shallow call can propagate that context through whole-case arms and supported finite loobean refinements, including nested cell and list positions. Other partial-pattern contexts and subject forms remain unsupported. The Grammar’s `step` block infers in this fragment, but its module is not yet checked.
84
84
85A known closed union can also provide context to each arm of a complete loobean or unit-shaped branch in a cast or a call with a known union sample. Nested branches and transparent groups work; a mismatch reports the expected union and the offending arm. General patterns and context through bodies with local definitions remain unsupported, and unrelated unresolved tags stay pending.
85A known closed union can also provide context to each arm of a complete loobean or unit-shaped branch in a cast or a call with a known union sample. Nested branches and transparent groups work; a mismatch reports the expected union and the offending arm. General patterns and context through bodies with local definitions remain unsupported, and unrelated unresolved tags stay pending.
86
86
87−The separate `jibb-dev/lib/jibb-import.hoon` is an unfinished reader for selected Hoon type graphs. It handles named recursion, nested map, set, queue, list, unit, jar and jug arguments, direct ordered maps, and direct `$^` unions whose source branches can be proved disjoint. It also recognizes a direct ordered-map call with two simple named mold operands, as in Tlon `notes.log`, after validating provenance and operand source; revisiting the same map hold fails closed. It also reads ordered map fields in records when the map arguments are syntactically fixed atom molds and other fields are fixed atom molds or standard collections of static atom molds. Collection names must not be shadowed. The reader can also import a mark door sample, removing its outer sample face and validating its build subject. For a mark whose sample is exactly a named arm of its single Ford-imported `/sur` core, it can recover a source-proved nonrecursive union, including source-location wrappers around fields; recursive or unverified fallback results remain unsupported. The reader checks explicit Hoon `$%`, `$?` and `$^` unions against the Grammar’s disjointness rule, as @iko confirmed on 2026-10-30. For an explicit `$%` with distinct literal head tags, it can also prove restricted local named payload dependencies, including bare `~` fields, re-evaluate and validate each source branch, and recover the union before Hoon collapses it. The real Tlon `notes.u-note` exercises its `[%deleted ~]` case. A bounded fallback also recovers one level of local named tagged unions inside such a union, including Tlon `notes.u-notebook` and `notes.u-notes`; deeper, recursive or unproven cases stay unsupported. The nested source proof has a 256-visit semantic-node budget, and source-location wrapper peeling is limited to four per node; Hoon evaluation and source scans are not metered. It rejects recursive or computed dependencies, inherited same-name collisions, unsupported nested unions and proofs exceeding a shared 4,096-node budget. It re-evaluates statically recognizable source branches before Hoon can collapse them, checks materialized fork cases, and rejects shapes it cannot prove disjoint. Static records may also have verified standard-collection and `path` siblings. One direct explicit union argument in a standard list, set, map or unit is accepted when its call wrapper and collection provenance are verified and its static cases are pairwise disjoint. A synthetic regression checks that forged wrapper subjects, samples and tails are rejected. Other collection-union forms, nested ordered maps, general source-level disjointness and complete integration with the checker remain unfinished. `+golden-types-imports` can consume fixed-aura atoms, valid term singletons, Hoon's `%n` zero singleton as Jibb `~`, nested faced or unfaced cells, unions of supported, pairwise-disjoint cases, and opaque standard collections with supported arguments from caller-supplied reader results for declared `/-` imports; `+golden-types-with-marks` accepts the same shapes for declared marks. The caller must pass unchanged results from the source-aware reader: the bridge validates the supplied graph but cannot detect source cases Hoon collapsed before that graph was built. The opaque collection types retain their names and arguments for identity, unification and printing. The validated standard prelude `list` mold shares the imported list representation; other Jibb-written collection molds and most prelude collection operations remain unsupported. Other forms remain unsupported. Its disjointness proof is conservative and can reject a valid union it cannot prove disjoint. Collection recognition requires the originating `/sur` core. The reader validates direct zuse subjects and Ford subjects consisting of faced imported cores and a validated tail, checking imported cores transitively; it rejects shadowed names, inconsistent core subjects and other subject shapes. For a recursive reference, the reader matches the exact Hoon hold against named arms in validated cores, including transitive Ford imports; it rejects missing, unlabelled or ambiguous origins. Its fixtures include three real Tlon files; `tools/importer-test` compares the internal projection under eval, and the ship test compares the same golden output. `tools/type-import-test` and `tools/type-mark-test` compare bridge reports under eval and on the ship. `tools/type-tlon-test` and its ship counterpart exercise four real Tlon presence unions and a field read through the source-aware reader and partial checker. `tools/clay-fixtures` also passes Clay-built `/sur` molds and mark samples through the Clay-built importer and partial checker.
87+The separate `jibb-dev/lib/jibb-import.hoon` is an unfinished reader for selected Hoon type graphs. It handles named recursion, nested map, set, queue, list, unit, jar and jug arguments, direct ordered maps, and direct `$^` unions whose source branches can be proved disjoint. It also recognizes a direct ordered-map call with two simple named mold operands, as in Tlon `notes.log`, after validating provenance and operand source; revisiting the same map hold fails closed. It also reads ordered map fields in records when the map arguments are syntactically fixed atom molds and other fields are fixed atom molds or standard collections of static atom molds. Collection names must not be shadowed. The reader can also import a mark door sample, removing its outer sample face and validating its build subject. For a mark whose sample is exactly a named arm of its single Ford-imported `/sur` core, it can recover a source-proved nonrecursive union, including source-location wrappers around fields; recursive or unverified fallback results remain unsupported. The reader checks explicit Hoon `$%`, `$?` and `$^` unions against the Grammar’s disjointness rule, as @iko confirmed on 2026-10-30. For an explicit `$%` with distinct literal head tags, it can also prove restricted local named payload dependencies, including bare `~` fields, re-evaluate and validate each source branch, and recover the union before Hoon collapses it. The real Tlon `notes.u-note` exercises its `[%deleted ~]` case. A bounded fallback also recovers one level of local named tagged unions inside such a union, including Tlon `notes.u-notebook` and `notes.u-notes`. Source-proved tagged unions can also be wrapped in Hoon `$~` defaults, including a downstream union using Tlon `epic.saga`; the selected source and projected branches still undergo the same provenance and disjointness checks. The tagged-source helper peels up to four consecutive default wrappers, while default wrappers encountered inside dependency proofs consume the existing semantic-node budget. A source-proved nested self-recursive union retains its named owner, including Tlon `notes.import-node`; deeper, mutually recursive or unproven cases stay unsupported. The nested source proof has a 256-visit semantic-node budget, and source-location wrapper peeling is limited to four per node; Hoon evaluation and source scans are not metered. It rejects recursive or computed dependencies, inherited same-name collisions, unsupported nested unions and proofs exceeding a shared 4,096-node budget. It re-evaluates statically recognizable source branches before Hoon can collapse them, checks materialized fork cases, and rejects shapes it cannot prove disjoint. Static records may also have verified standard-collection and `path` siblings. One direct explicit union argument in a standard list, set, map or unit is accepted when its call wrapper and collection provenance are verified and its static cases are pairwise disjoint. A synthetic regression checks that forged wrapper subjects, samples and tails are rejected. Other collection-union forms, nested ordered maps, general source-level disjointness and complete integration with the checker remain unfinished. `+golden-types-imports` can consume fixed-aura atoms, valid term singletons, Hoon's `%n` zero singleton as Jibb `~`, nested faced or unfaced cells, unions of supported, pairwise-disjoint cases, and opaque standard collections with supported arguments from caller-supplied reader results for declared `/-` imports; `+golden-types-with-marks` accepts the same shapes for declared marks. The caller must pass unchanged results from the source-aware reader: the bridge validates the supplied graph but cannot detect source cases Hoon collapsed before that graph was built. The opaque collection types retain their names and arguments for identity, unification and printing. The validated standard prelude `list` mold shares the imported list representation; other Jibb-written collection molds and most prelude collection operations remain unsupported. Other forms remain unsupported. Its disjointness proof is conservative and can reject a valid union it cannot prove disjoint. Collection recognition requires the originating `/sur` core. The reader validates direct zuse subjects and Ford subjects consisting of faced imported cores and a validated tail, checking imported cores transitively; it rejects shadowed names, inconsistent core subjects and other subject shapes. For a recursive reference, the reader matches the exact Hoon hold against named arms in validated cores, including transitive Ford imports; it rejects missing, unlabelled or ambiguous origins. Its fixtures include three real Tlon files; `tools/importer-test` compares the internal projection under eval, and the ship test compares the same golden output. `tools/type-import-test` and `tools/type-mark-test` compare bridge reports under eval and on the ship. `tools/type-tlon-test` and its ship counterpart exercise four real Tlon presence unions and a field read through the source-aware reader and partial checker. `tools/clay-fixtures` also passes Clay-built `/sur` molds and mark samples through the Clay-built importer and partial checker.
88
88
89Self-recursive `/sur` molds can cross the bridge as opaque module-and-name identities when their supported source-aware graph passes validation, including one-argument lists containing same-origin recursive references. The real Tlon `notes.import-node` reaches this bridge; it does not unfold or construct the recursive type. Aliases, foreign references, recursive marks, unfolding, construction and field access remain unsupported; the partial printer declines recursive names that are not in scope.
89Self-recursive `/sur` molds can cross the bridge as opaque module-and-name identities when their supported source-aware graph passes validation, including one-argument lists containing same-origin recursive references. The real Tlon `notes.import-node` reaches this bridge; it does not unfold or construct the recursive type. Aliases, foreign references, recursive marks, unfolding, construction and field access remain unsupported; the partial printer declines recursive names that are not in scope.
90
90
91+The partial checker also recognizes a source-proven Jibb recursive mold consisting of `~` and one faced cell with a fixed-aura head and direct self tail. Its identity includes the defining path and name. It unfolds this shape for supported null and cell construction and for a two-arm null/cell match; static application-path literals use the verified public `qath` alias. The internal prelude defines `qath` as a transparent knot sequence and the public prelude re-exports it. Each inference attempt has 256 unfolding and static-segment steps; parsing and separate retries are not bounded by that limit. Dynamic application-path segments, broader patterns and other recursive shapes remain unsupported. Route and static-file existence checks remain milestone 4.
92+
91Callers that have a `/sur` core and a name can use `+read-named`: it checks for a locally declared arm before asking Hoon to evaluate the mold, and reports evaluation failures with the final Hoon trace line. `+read-mold-in` remains available when the caller already has the selected type. The opt-in `+read-named-diagnostic` and `+read-mark-diagnostic` preserve successful graphs and distinguish definite `%invalid` aura and core evidence emitted directly by the reader from `%unsupported` failures. Other failures, including unverified union disjointness and vase recognition based only on a name, remain unsupported. These entry points revalidate and re-walk failed types; the opt-in `+golden-types-with-reader-diagnostics` accepts unchanged structured reader results and reports definite aura or core errors at their imported mold use sites, when the import and supplied input are unique. Ordered replay covers direct and nested cell samples, record and function casts, and non-generic same-module aliases; it stops at an unsupported prefix, cycle or shadowing failure. Union molds, generic applications, transitive modules and unsupported reader outcomes still report generic limitations. Replay repeats inference and may add work; this entry point remains partial. Existing checker entry points continue treating failed imports as unsupported. It also fails closed on repeated field faces along an imported record spine, including recursive roots; the diagnostic remains generic. Hoon type graphs can erase unfaced nested-cell boundaries, so the check may conservatively reject a valid source with equal names in distinct erased scopes. Faced nested records and union alternatives keep separate scopes.
93Callers that have a `/sur` core and a name can use `+read-named`: it checks for a locally declared arm before asking Hoon to evaluate the mold, and reports evaluation failures with the final Hoon trace line. `+read-mold-in` remains available when the caller already has the selected type. The opt-in `+read-named-diagnostic` and `+read-mark-diagnostic` preserve successful graphs and distinguish definite `%invalid` aura and core evidence emitted directly by the reader from `%unsupported` failures. Other failures, including unverified union disjointness and vase recognition based only on a name, remain unsupported. These entry points revalidate and re-walk failed types; the opt-in `+golden-types-with-reader-diagnostics` accepts unchanged structured reader results and reports definite aura or core errors at their imported mold use sites, when the import and supplied input are unique. Ordered replay covers direct and nested cell samples, record and function casts, and non-generic same-module aliases; it stops at an unsupported prefix, cycle or shadowing failure. Union molds, generic applications, transitive modules and unsupported reader outcomes still report generic limitations. Replay repeats inference and may add work; this entry point remains partial. Existing checker entry points continue treating failed imports as unsupported. It also fails closed on repeated field faces along an imported record spine, including recursive roots; the diagnostic remains generic. Hoon type graphs can erase unfaced nested-cell boundaries, so the check may conservatively reject a valid source with equal names in distinct erased scopes. Faced nested records and union alternatives keep separate scopes.
92
94
93The partial report can diagnose certain non-gate value dependency cycles, including cycles through gates. It requires an explicit atom or loobean result cast and a syntactically proven dependency group with unshadowed simple samples; it identifies the value and a dependency site. Untyped results, branches, nested definitions, qualified wings and complex samples remain unsupported. The proof constructs an additional dependency graph. One 24-case recursive/generic eval run took 19.7 s with it and 18.6 s before it, including startup; these single runs do not isolate the graph cost.
95The partial report can diagnose certain non-gate value dependency cycles, including cycles through gates. It requires an explicit atom or loobean result cast and a syntactically proven dependency group with unshadowed simple samples; it identifies the value and a dependency site. Untyped results, branches, nested definitions, qualified wings and complex samples remain unsupported. The proof constructs an additional dependency graph. One 24-case recursive/generic eval run took 19.7 s with it and 18.6 s before it, including startup; these single runs do not isolate the graph cost.
94
96
95The source-backed `+api-path-analysis-source` is a separate partial analysis, not an API check: it resolves reachable Jibb imports and declared mark graphs and returns path and scry segments, full and diff mark identities and their types. It also checks derived-name collisions. Full and diff payloads must be direct declared mark names; typed scry parameters must be a same-name, same-aura subset of the watch parameters, and unknown or duplicate segment binders fail closed. It creates no request gates. The caller must pass a trusted prepared prelude and unchanged source-aware reader results.
97The source-backed `+api-path-analysis-source` is a separate partial analysis, not an API check: it resolves reachable Jibb imports and declared mark graphs and returns path and scry segments, full and diff mark identities and their types. It also checks derived-name collisions. Full and diff payloads must be direct declared mark names; typed scry parameters must be a same-name, same-aura subset of the watch parameters, and unknown or duplicate segment binders fail closed. It creates no request gates. The caller must pass a trusted prepared prelude and unchanged source-aware reader results.
96
98
99+`+api-path-evidence-source` retains that analysis with the API source, complete prepared prelude (including reserved names), supplied reader results and resolved Jibb dependency cache. `+api-path-watchability` classifies a unique declaration as watchable or not watchable, or reports unknown when evidence is absent or ambiguous. The artifact and reader results are trusted host inputs; the host must bind them to the source versions used later. This is declaration evidence, not proof about an arbitrary request value, a checked API module, a runtime validator or an island watch.
100+
101+For a unique supported declaration, `+api-request-parts` retains that evidence with the typed path parameters in source order, the full-state reply sample, and a fold type when there is one diff mark. The fold takes the tagged diff and previous full state and returns full state. Missing or ambiguous evidence, unsupported parameter auras and multiple-diff folds fail closed. These are components for a future request gate; they do not yet fix its argument order, construct a request, or prove watchability of a value.
102+
103+`+api-support-analysis-source` additionally infers supported ordinary API molds and values, resolves every declared mark, and retains their source, dependency and path evidence. Unsupported helpers or marks fail closed. An unused `/-` core is not independently validated, ordinary definitions that need derived gates remain unsupported, and this result is not a checked API interface or an exported request.
104+
105+The ordinary import resolver can infer derived request-gate types for multiple supported API paths. A case may take one typed path parameter before its reply gate, or one diff fold after the reply; a case with both, multiple parameters or diffs, or a separate scry path remains unsupported. Each reply maps the full mark type to a fresh `M` and the request result is `(ask M)`. Checked ordinary API values and molds, declared mark molds and a supported poke constructor are exported too. Every selected `/sur` core must have a directly used, successfully read mold; unselected core bindings are not independently validated, and Jibb module imports remain unsupported in this API fragment. The unchanged todo API fits this fragment.
106+
107+A call whose direct result is a known named generic union can receive a matching same-origin, same-arity result context before its arguments are inferred. This retains the ordered generic arguments and existing capital checks; pending tags, recursive or variable-bound origins and unrestricted atom cases remain conservative. Constructor fitting reports unsupported when an unresolved or opaque case could contain the requested tagged head. It keeps definite missing-case errors for proven nonmatching cases, including an explicitly atom-only faced head. The real todo callback `|=%got` can infer when an `(ask msg)` result context fixes its message union; the uncontextualized call remains unsupported.
108+
109+A two-item tuple with an explicit term, null or loobean head can receive payload context from a known union when every alternative is a literal-headed cell and its head noun is unique. The payload must be a direct wing-headed call, optionally grouped, with literal, wing or constructor arguments. The checker first retains the original inference if it already fits; otherwise it tries the contextual path once and fits the selected case and enclosing union. It declines this path if any substitution has a structural root, because a caller may have walked away variable provenance. Duplicate heads, opaque competitors and other shapes also stay conservative. The guard scans the substitution for each eligible tuple and may perform one extra shallow inference; it does not guarantee globally linear work. This lets an explicitly typed todo subscription body infer; it does not check an island or prove request watchability.
110+
111+`+gate-free-type` is a separate three-way proof over normalized checker types: it reports a gate-free result, a gate-bearing witness with its field path, or unknown. It tracks conservative inhabitance before reporting a gate in a cell, spends one shared node budget, and treats opaque recursion, open variables, unknown collection forms and `*` conservatively. Source-proven `qath` and the recognized list/unit representations have dedicated proofs. `+gate-free-mold-source` parses and resolves one named mold with a fresh active-root graph, retaining the complete prepared prelude, source bundle, trusted reader inputs, dependency cache and inferred mold. It caps classification at 256 nodes; parsing, import resolution and type inference are not covered by that cap. The host must canonicalize paths and bind trusted sources and reader results to their versions. API, store and private roots decline; other definitions and unused imported Hoon bindings are not fully checked. This is mold analysis, not a module, kind, island, watchability or runtime check, and it does not infer general gate-free constraints.
112+
113+Each case's canonical API identity and source-derived schema travel across imports in a nonrecursive graph certificate containing the exact source bundle, prelude, reserved scope and trusted reader results. Cached interfaces must match those inputs and cannot hide an active ancestor; unknown legacy entries are rebuilt from their unique supplied source. Request-bearing closures are limited to 256 paths and requests. Closed gate samples can also fit when an unnamed input slot corresponds to a named one, provided products are identical and nested value faces and ambiguous cell tails remain intact. This is type inference only: request lowering, runtime schema validation and value watchability proofs are not implemented.
114+
97`+golden-types-with-prelude` accepts case-local Jibb module sources alongside `/sur` and mark results and the vendored prelude source. It resolves reachable ordinary library modules in dependency order, caching completed interfaces per invocation and exporting supported closed value schemes, direct generic unions, and simple or nonrecursive generic mold aliases whose bodies the fragment supports. It detects missing sources and cycles and rejects a dependency if its interface cannot be inferred by the fragment. Qualified wings can also read nested fields of an imported value, instantiating that value’s scheme independently at each use; missing, ambiguous and non-record fields remain unsupported.
115`+golden-types-with-prelude` accepts case-local Jibb module sources alongside `/sur` and mark results and the vendored prelude source. It resolves reachable ordinary library modules in dependency order, caching completed interfaces per invocation and exporting supported closed value schemes, direct generic unions, and simple or nonrecursive generic mold aliases whose bodies the fragment supports. It detects missing sources and cycles and rejects a dependency if its interface cannot be inferred by the fragment. Qualified wings can also read nested fields of an imported value, instantiating that value’s scheme independently at each use; missing, ambiguous and non-record fields remain unsupported.
98
116
99−The supplied prelude is parsed into a **partial interface**: all names actually declared in the source are reserved, while only the molds and values this fragment can infer are available. These include the validated standard `list` mold, `unit`, the doc-exact generic `cmd` union, `same`, `fall`, `need`, `lure`, `weld`, `snoc`, `turn`, `flop`, `rear`, `drop`, `skim`, `skip`, `murn`, `join`, `snip`, `levy`, `lien`, `cork`, `corl`, `cury` and `curr`; unsupported entries remain unavailable. The validated `list` is injected while the prelude’s gates are inferred; `weld` and `turn` use ordinary explicit result casts. An absent or altered `list` is not injected, and an altered declaration cannot leak through a direct or transitive mold alias. List-dependent prelude mold aliases remain unsupported because their templates are prepared before this injection. A named prelude union keeps the fixed `/lib/jibb/prelude/jibb` origin in every module, and its name remains unqualified when a library exports a type containing it. The prelude inventory is incomplete, so reserving the names in this source does not establish complete shadowing coverage. The source-backed internal prelude defines `poke`, which the public prelude re-exports as an ordinary transparent type. A dedicated trusted internal-prelude preparation path also supplies an atom-constrained private comparison scheme for a Jibb-written `gth` wrapper. Ordinary module resolution rejects that primitive path even if a caller supplies a spoofed root or bundle. The low-level prepared interface is still trusted host input; the host must select the vendored sources and canonicalize paths. Primitive execution and shape-based jet recognition are not implemented. Addition, decrement and length remain unavailable until arithmetic constraints distinguish their results from loobeans. The partial checker resolves its supported source shape, preserves its public name, and rejects ordinary imports of the private internal path. An imported API with one mark and a matching direct `+$ poke` declaration can export a derived constructor and retain agent/mark metadata when the source representation has the supported agent case. Other API shapes, complete private module checking, root API and kind checking, stores, `ask`, `pure`, lowering and runtime effects remain unfinished. A possible store or root API declaring `+$ poke` reports that kind or scope needs unsupported inference; definite duplicate declarations and unrelated shadowing still report conflicts. Prepared interfaces and caches are trusted caller inputs; the future host and linker must ensure the private source validated during preparation is the same version used to lower derived constructors. A `*` payload may contain gates, so the fragment treats it conservatively; full gate-free checks are unfinished. The shared module-scope fixture compares the prepared and source-taking paths against the real prelude and a two-module golden under eval and on the ship.
117+The supplied prelude is parsed into a **partial interface**: all names actually declared in the source are reserved, while only the molds and values this fragment can infer are available. These include the validated standard `list` mold, `unit`, the doc-exact generic `cmd` union, `same`, `fall`, `need`, `bond`, `lure`, `weld`, `snoc`, `turn`, `flop`, `rear`, `drop`, `skim`, `skip`, `murn`, `join`, `snip`, `levy`, `lien`, `cork`, `corl`, `cury` and `curr`; unsupported entries remain unavailable. The validated `list` is injected while the prelude’s gates are inferred; `weld` and `turn` use ordinary explicit result casts. An absent or altered `list` is not injected, and an altered declaration cannot leak through a direct or transitive mold alias. The same validated template is available when prelude mold aliases are prepared, so supported direct and transitive aliases can use it. A named prelude union keeps the fixed `/lib/jibb/prelude/jibb` origin in every module, and its name remains unqualified when a library exports a type containing it. The prelude inventory is incomplete, so reserving the names in this source does not establish complete shadowing coverage. The source-backed internal prelude defines `poke`, which the public prelude re-exports as an ordinary transparent type. A dedicated trusted internal-prelude preparation path also supplies private comparison and arithmetic schemes for the Jibb-written `gth`, `add` and `dec` wrappers. Ordinary module resolution rejects that primitive path even if a caller supplies a spoofed root or bundle. The low-level prepared interface is still trusted host input; the host must select the vendored sources and canonicalize paths. Primitive execution and shape-based jet recognition are not implemented. The source-backed `add` and `dec` wrappers use private arithmetic interfaces whose shared atom variable excludes loobeans; the partial checker preserves that constraint through supported inference and prints `where A is an atom other than ?`. Length and primitive execution remain unavailable. The partial checker resolves its supported source shape, preserves its public name, and rejects ordinary imports of the private internal path. An imported API with one mark and a matching direct `+$ poke` declaration can export a derived constructor and retain agent/mark metadata when the source representation has the supported agent case. Other API shapes, complete private module checking, root API and kind checking, stores, complete `ask` and `pure` checking, lowering and runtime effects remain unfinished. A possible store or root API declaring `+$ poke` reports that kind or scope needs unsupported inference; definite duplicate declarations and unrelated shadowing still report conflicts. Prepared interfaces and caches are trusted caller inputs; the future host and linker must ensure the private source validated during preparation is the same version used to lower derived constructors. A `*` payload may contain gates, so the fragment treats it conservatively; full gate-free checks are unfinished. The shared module-scope fixture compares the prepared and source-taking paths against the real prelude and a two-module golden under eval and on the ship.
100
118
101`+prepare-prelude` derives the interface and declared-name inventory from the trusted vendored source. Hosts can reuse its result with `+golden-types-with-prepared-prelude`; they must pass the unchanged result of preparation, not an independently constructed value. Empty, malformed and duplicate-name prelude sources fail closed. The source-taking `+prepare-prelude` and `+golden-types-with-prelude` do not supply the internal module; their `-and-internal` or `-with-internal` variants accept its source for the supported private import. API files, modules with `main`, unsupported definitions and many other features remain outside this subset. The older `+golden-types-with-modules` entry point fails closed for imports because it has no prelude scope. None of these partial reports claims the module has been checked.
119`+prepare-prelude` derives the interface and declared-name inventory from the trusted vendored source. Hosts can reuse its result with `+golden-types-with-prepared-prelude`; they must pass the unchanged result of preparation, not an independently constructed value. Empty, malformed and duplicate-name prelude sources fail closed. The source-taking `+prepare-prelude` and `+golden-types-with-prelude` do not supply the internal module; their `-and-internal` or `-with-internal` variants accept its source for the supported private import. API files, modules with `main`, unsupported definitions and many other features remain outside this subset. The older `+golden-types-with-modules` entry point fails closed for imports because it has no prelude scope. None of these partial reports claims the module has been checked.
102
120
@@ -109,16 +127,26 @@ And the design notes:
109| 3. The parser | Why recursive descent (the grammar is LL(2) after the layout pass), the EBNF rule by rule with the node each gives, what the EBNF leaves out and how it's filled in, spacing, and where each error points, with its message |
127| 3. The parser | Why recursive descent (the grammar is LL(2) after the layout pass), the EBNF rule by rule with the node each gives, what the EBNF leaves out and how it's filled in, spacing, and where each error points, with its message |
110| 4. Printed formats | The token, tree and error formats the golden files hold |
128| 4. Printed formats | The token, tree and error formats the golden files hold |
111
129
130+Source-backed `like` maps the product of an existing `(like A)` result while retaining its position and remaining input. The partial checker infers supported positional calls by peeling only known sample-slot faces, retaining faces belonging to values; ambiguous variable-bound spines and nested face loss remain unsupported. Backend execution remains outstanding.
131+
132+The internal prelude defines transparent `(ask M)` cases for pure, agent and store requests; the public prelude re-exports it and defines `pure` in Jibb. Preparation supplies the private module with `list.core` and `unit.core` only from validated canonical public templates. If a template is unavailable, an isolated check validates the private molds, but only molds independently inferred against the actual available templates enter the interface. The partial checker infers supported constructors and exhaustive matches; absent versus present-zero state remains distinguishable. Agent and store receiver fields carry raw nouns and cannot prove schema validity or watchability. The public prelude also defines the documented `sub` union in Jibb; supported watch payloads retain the public `(ask M)` type. A `sub` value is not itself proof that its request is watchable. Generated decoders, source-bound runtime validation, request lowering, other derived request shapes and island watch checks remain unfinished. Public prelude preparation is partial: consumers must verify that `ask` was actually exported with its source origin.
133+
134+Public identity aliases of private generic unions retain their public name when the origin, arity and argument order match exactly, including through imported values. Fixed, reordered, repeated and phantom generic aliases remain unsupported where a safe public name cannot be recovered; a fixed nongeneric alias is not printed as though it accepted type arguments.
135+
136+The partial checker reserves `proj` in module, local, sample, pattern and import bindings, including bindings inside unsupported source; a field, tag or path segment may still have that spelling. With a known expected record type, it checks selected explicit `(proj record)` calls over closed, uniquely faced records, preserving the source expression, its type, the result type and field axes in the checked interface. Imported and private-prelude dependencies retain the source needed to lower those plans. The checker does not yet lower or execute them. It supports selecting one or more fields in their original order; a single selected field keeps its face and uses one source axis. Reordered fields, unknown or open record spines, some nested contexts and recursive groups with projections remain unsupported. A directional fit of a wider faced record fails closed instead of inserting a projection, including within supported list, unit and record positions. To limit repeated work, record-spine proofs are reused along the same closed spine and stop at 1,024 fields; field boundaries and the special handling of positional calls reset the appropriate proof. Prepared interfaces and their source remain trusted host inputs.
137+
112## The tree
138## The tree
113
139
114Every node is `[%tag at=span …]`, so `+span-of` finds its span in one place; the few that aren't say so in the `%tree` chapter. The kinds of node:
140Every node is `[%tag at=span …]`, so `+span-of` finds its span in one place; the few that aren't say so in the `%tree` chapter. The kinds of node:
115
141
116- **Module**: imports (`%sur` for `/-`, `%mark` for `/%`, `%jibb` for `/=`), then definitions (`%mold` for `+$`, `%value` for `++`).
142- **Module**: imports (`%sur` for `/-`, `%mark` for `/%`, `%jibb` for `/=`), then definitions (`%mold` for `+$`, `%value` for `++`).
117- **Expressions** (`expr`): `%lit`, `%str`, `%path`, `%qath`, `%wing`, `%change`, `%pair`, `%unit`, `%group`, `%list`, `%tuple`, `%gate-wide`, `%ctor`, `%call`, `%gate`, `%cast`, `%trace`, `%branch`, `%crash`, and `%body` for an indented body, with its local definitions if it has any.
143- **Expressions** (`expr`): `%lit`, `%str`, `%path`, `%qath`, `%wing`, `%change`, `%pair`, `%unit`, `%group`, `%list`, `%tuple`, `%gate-wide`, `%ctor`, `%call`, `%gate`, `%cast`, `%trace`, `%branch`, `%crash`, and `%body` for an indented body, with its local definitions if it has any.
118−- **Molds as written** (`shape`): `%aura`, `%noun`, `%void`, `%flag`, `%const`, `%ref`, `%tvar`, `%path`, `%apply`, `%cell`, `%union`, `%fn`, `%generic`. A `%union` spans its first through last case and has no lead token; a single case is its own mold. `%generic` spans from the `|$` after a `+$` name through its body.
144+- **Molds as written** (`shape`): `%aura`, `%hole`, `%noun`, `%void`, `%flag`, `%const`, `%ref`, `%tvar`, `%path`, `%apply`, `%cell`, `%union`, `%fn`, `%generic`. A `%hole` retains the span of `_`; an inferred typed path segment retains that span separately from its enclosing segment. A `%union` spans its first through last case and has no lead token; a single case is its own mold. `%generic` spans from the `|$` after a `+$` name through its body.
119- **Samples, fields and patterns**: a sample is `%bind`, `%face`, `%pun`, `%cell` or `%bare`, since a bare name binds anywhere in a sample; a pattern is `%lit`, `%str`, `%any`, `%bind` or `%cell`.
145- **Samples, fields and patterns**: a sample is `%bind`, `%face`, `%pun`, `%cell` or `%bare`, since a bare name binds anywhere in a sample; a pattern is `%lit`, `%str`, `%any`, `%bind` or `%cell`.
120- **Literals** (`lit`) keep the form they matched, their aura and value, and their text as written, which the printers show.
146- **Literals** (`lit`) keep the form they matched, their aura and value, and their text as written, which the printers show.
121
147
148+The parser accepts type holes. The partial checker records each ordinary hole with its span and validates the obligations created in a value or local definition before generalization. A solved concrete type or an explicitly written in-scope capital resolves a hole; a later use cannot repair it. Independent decimal holes may default to `@ud` when the surrounding inferred type is gate-free; variables reachable from the environment or written capitals are protected from premature defaulting. Structural named-mold holes are diagnosed at their source, while complex named molds, inferred path segments, recursive groups with holes and unresolved constraints remain unsupported. Partial prelude and API interfaces cannot silently export unchecked holes. A separate syntax-tree pass reports duplicate names within a written record at both field sites, including in unused definitions; nested and separate records have independent scopes.
149+
122The tree keeps everything the checker needs to report an error at the code as written: open and closed brackets give the same node, but every node keeps its span.
150The tree keeps everything the checker needs to report an error at the code as written: open and closed brackets give the same node, but every node keeps its span.
123
151
124## Positions and errors
152## Positions and errors
docs/development.md+37−2
@@ -60,13 +60,30 @@ git clone https://github.com/urbit/tools /root/src/tools
60| --- | --- |
60| --- | --- |
61| `tools/golden` | Runs the golden cases under `urbit eval`: every case, or those matching `--case`; `--update` rewrites the expected outputs; `--show` prints them |
61| `tools/golden` | Runs the golden cases under `urbit eval`: every case, or those matching `--case`; `--update` rewrites the expected outputs; `--show` prints them |
62| `tools/importer-test` | Compares the partial Hoon importer's diagnostic trees and errors with `tests/importer/tree.txt` under `urbit eval` |
62| `tools/importer-test` | Compares the partial Hoon importer's diagnostic trees and errors with `tests/importer/tree.txt` under `urbit eval` |
63+| `tools/type-import-default-test` | Compares default-wrapped union source proofs and adversarial cases under eval; the same golden runs on the ship |
63| `tools/type-import-test` | Composes the Hoon importer with the partial checker and compares `tests/type-import/expected.txt` under eval |
64| `tools/type-import-test` | Composes the Hoon importer with the partial checker and compares `tests/type-import/expected.txt` under eval |
64| `tools/type-tlon-test` | Runs the real Tlon presence source through the importer and partial checker, comparing `tests/type-tlon/expected.txt` under eval |
65| `tools/type-tlon-test` | Runs the real Tlon presence source through the importer and partial checker, comparing `tests/type-tlon/expected.txt` under eval |
65| `tools/type-import-diagnostic-test` | Compares the structured reader diagnostic bridge report under eval |
66| `tools/type-import-diagnostic-test` | Compares the structured reader diagnostic bridge report under eval |
66| `tools/type-mark-test` | Checks the partial checker’s mark import boundary against `tests/type-mark/expected.txt` under eval |
67| `tools/type-mark-test` | Checks the partial checker’s mark import boundary against `tests/type-mark/expected.txt` under eval |
67| `tools/type-poke-test` | Checks source-backed prelude and poke-only API reports against `tests/type-poke/expected.txt` under eval |
68| `tools/type-poke-test` | Checks source-backed prelude and poke-only API reports against `tests/type-poke/expected.txt` under eval |
68| `tools/type-api-paths-test` | Checks partial API path analysis with real todo mark samples against `tests/type-api-paths/expected.txt` under eval |
69| `tools/type-api-paths-test` | Checks partial API path analysis with real todo mark samples against `tests/type-api-paths/expected.txt` under eval |
69−| `tools/type-api-paths-test` | Compares partial API path analysis, including real todo marks, with its golden report under eval |
70+| `tools/type-api-evidence-test` | Runs source, scope, reader-result and declaration-watchability evidence guards under eval and on the ship |
71+| `tools/type-hole-guards-test` | Runs the shared hole-defaulting and API interface guards under eval; the same checks run on the ship |
72+| `tools/type-list-alias-test` | Runs the shared prelude list-alias and provenance guards under eval and on the ship |
73+| `tools/type-generic-alias-test` | Runs public/private generic union alias and provenance guards under eval and on the ship |
74+| `tools/type-positional-face-guards-test` | Runs positional-call and nested-face guards under eval and on the ship |
75+| `tools/type-qath-guards-test` | Runs source-provenance, recursive unfolding and face guards under eval and on the ship |
76+| `tools/type-todo-api-test` | Exercises the actual todo API through the real Hoon readers and partial checker |
77+| `tools/type-closed-gate-guards-test` | Checks closed gate sample labels and face uncertainty under eval and on the ship |
78+| `tools/type-constructor-fit-guards-test` | Checks constructor-case uncertainty and known mismatches under eval and on the ship |
79+| `tools/type-nested-union-guards-test` | Checks nested tagged-union case selection and uncertainty under eval and on the ship |
80+| `tools/type-gate-free-guards-test` | Checks bounded gate-free verdicts, inhabitation and witness paths under eval and on the ship |
81+| `tools/type-gate-free-source-test` | Checks source-backed todo mold analysis through the real readers under eval and on the ship |
82+| `tools/type-sub-guards-test` | Checks source-backed subscription mold dependencies under eval and on the ship |
83+| `tools/type-ask-guards-test` | Runs ask origin and canonical list/unit bootstrap guards under eval and on the ship |
84+| `tools/type-request-guards-test` | Runs request evidence, source consistency and cache provenance guards under eval and on the ship |
85+| `tools/type-proj-guards-test` | Runs projection evidence, name-scope and dependency guards under eval and on the ship |
86+| `tools/type-arithmetic-guards-test` | Runs restricted atom-variable, unification and projection guards under eval and on the ship |
70| `tools/type-module-scope-test` | Checks the partial module checker’s prelude boundary and duplicate-source rejection against `tests/type-module-scope/expected.txt` under eval |
87| `tools/type-module-scope-test` | Checks the partial module checker’s prelude boundary and duplicate-source rejection against `tests/type-module-scope/expected.txt` under eval |
71| `tools/clay-fixtures` | Syncs `my-app`, builds its example `/sur` files and marks through Clay, checks selected mold and mark projections and the partial checker, and records Ford and mark subject shapes on the fake ship |
88| `tools/clay-fixtures` | Syncs `my-app`, builds its example `/sur` files and marks through Clay, checks selected mold and mark projections and the partial checker, and records Ford and mark subject shapes on the fake ship |
72| `tools/hoon` | Evaluates Hoon with the library in scope, as `tools/hoon '(golden /a/b/jibb (crip "++ main view"))'`; `--cord name=file` binds a file's text, `-f` reads the expression from a file |
89| `tools/hoon` | Evaluates Hoon with the library in scope, as `tools/hoon '(golden /a/b/jibb (crip "++ main view"))'`; `--cord name=file` binds a file's text, `-f` reads the expression from a file |
@@ -83,15 +100,33 @@ git clone https://github.com/urbit/tools /root/src/tools
83```
100```
84tools/golden # all cases pass
101tools/golden # all cases pass
85tools/importer-test # Hoon importer fixture projections match
102tools/importer-test # Hoon importer fixture projections match
103+tools/type-import-default-test # default-wrapped source proofs match
86tools/type-import-test # importer/checker bridge golden report matches
104tools/type-import-test # importer/checker bridge golden report matches
87tools/type-tlon-test # real Tlon importer/checker report matches
105tools/type-tlon-test # real Tlon importer/checker report matches
88tools/type-import-diagnostic-test # direct structured reader diagnostics match
106tools/type-import-diagnostic-test # direct structured reader diagnostics match
89tools/type-mark-test # mark/checker bridge golden report matches
107tools/type-mark-test # mark/checker bridge golden report matches
90tools/type-poke-test # source-backed poke/API bridge report matches
108tools/type-poke-test # source-backed poke/API bridge report matches
91tools/type-api-paths-test # partial API path analysis report matches
109tools/type-api-paths-test # partial API path analysis report matches
92−tools/type-api-paths-test # partial API path analysis report matches
110+tools/type-api-evidence-test # API declaration evidence guards pass
111+tools/type-hole-guards-test # hole defaulting and API guards pass
112+tools/type-list-alias-test # prelude list-alias guards pass
113+tools/type-generic-alias-test # generic union alias guards pass
114+tools/type-positional-face-guards-test # positional sample face guards pass
115+tools/type-qath-guards-test # qath source and unfolding guards pass
116+tools/type-todo-api-test # real todo API partial inference and reader guards pass
117+tools/type-closed-gate-guards-test # closed gate fit guards pass
118+tools/type-constructor-fit-guards-test # constructor fit guards pass
119+tools/type-nested-union-guards-test # nested union selector guards pass
120+tools/type-gate-free-guards-test # bounded gate-free classifier guards pass
121+tools/type-gate-free-source-test # real todo mold analysis and source guards pass
122+tools/type-sub-guards-test # subscription source guards pass
123+tools/type-ask-guards-test # ask source and bootstrap guards pass
124+tools/type-request-guards-test # request evidence and cache guards pass
125+tools/type-proj-guards-test # projection evidence and scope guards pass
126+tools/type-arithmetic-guards-test # arithmetic constraint guards pass
93tools/type-module-scope-test # module/prelude scope golden report matches
127tools/type-module-scope-test # module/prelude scope golden report matches
94tools/hoon check-spans-test # prints <<>>
128tools/hoon check-spans-test # prints <<>>
129+tools/hoon itype-unify-test # type-unification controls pass
95tools/testdata/selftest # 22 checks, 0 failed
130tools/testdata/selftest # 22 checks, 0 failed
96tools/doc-blocks docs/spec # every jibb block has its case
131tools/doc-blocks docs/spec # every jibb block has its case
97tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
132tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
docs/open-questions.md+18−6
@@ -18,7 +18,7 @@ On 2026-10-30, @iko adopted gate-free `eq` arguments and map and set keys, treat
18
18
19## Questions milestone 2 raises
19## Questions milestone 2 raises
20
20
21−Found while writing [prompts/milestone-2.md](prompts/milestone-2.md), checking it against the doc's examples, and building the checker. The numbering is retained so existing references stay valid. Questions 3, 18, 25, 26, 27 and 28 remain open; the other questions are settled.
21+Found while writing [prompts/milestone-2.md](prompts/milestone-2.md), checking it against the doc's examples, and building the checker. The numbering is retained so existing references stay valid. Question 3 remains open; the field-order detail in question 32 is being clarified. The other questions are settled.
22
22
231. **Settled: how the prelude identifies jetted functions.** On 2026-10-30, @iko said the prelude functions have working Jibb implementations, and the compiler recognizes their shapes and uses the Hoon versions so jets can fire.
231. **Settled: how the prelude identifies jetted functions.** On 2026-10-30, @iko said the prelude functions have working Jibb implementations, and the compiler recognizes their shapes and uses the Hoon versions so jets can fire.
242. **Settled: how the prelude keeps helpers private.** On 2026-10-30, @iko chose a separate internal prelude module imported by the prelude, without exposing the imported helpers.
242. **Settled: how the prelude keeps helpers private.** On 2026-10-30, @iko chose a separate internal prelude module imported by the prelude, without exposing the imported helpers.
@@ -37,7 +37,7 @@ Found while writing [prompts/milestone-2.md](prompts/milestone-2.md), checking i
3715. **Settled: unrestricted atoms and shared auras.** On 2026-10-30, @iko said `@` means any atom, independently at each occurrence, so Hoon `dime` and `pint` keep their bare-`@` fields. A specific atom such as `@ud` fits where `@` is expected; an `@` value needs a check to fit `@ud`. Shared atom types use one capital, with the atom constraint inferred from its body, as for `add` taking `[A A]` and returning `A`.
3715. **Settled: unrestricted atoms and shared auras.** On 2026-10-30, @iko said `@` means any atom, independently at each occurrence, so Hoon `dime` and `pint` keep their bare-`@` fields. A specific atom such as `@ud` fits where `@` is expected; an `@` value needs a check to fit `@ud`. Shared atom types use one capital, with the atom constraint inferred from its body, as for `add` taking `[A A]` and returning `A`.
3816. **Settled: loobeans in union disjointness.** On 2026-10-30, @iko said `?` counts as its two atoms, `%.y` and `%.n`: it is disjoint from any cell and overlaps the constants 0 and 1.
3816. **Settled: loobeans in union disjointness.** On 2026-10-30, @iko said `?` counts as its two atoms, `%.y` and `%.n`: it is disjoint from any cell and overlaps the constants 0 and 1.
3917. **Settled: empty cases in union disjointness.** On 2026-10-30, @iko said `!!` is disjoint from every case. A cell containing an empty position at any depth is itself empty and is also disjoint from every case.
3917. **Settled: empty cases in union disjointness.** On 2026-10-30, @iko said `!!` is disjoint from every case. A cell containing an empty position at any depth is itself empty and is also disjoint from every case.
40−18. **The two uses of Hoon `like`.** Hoon `+like` is a wet mold builder, but the gate it returns is callable and applies its supplied gate to the product. In a verified Hoon 135 example, applying `(like f)` to `[[1 2] [7 8 ~]]` produces an edge whose product is `8` when `f` is identity and `42` when `f` returns `42`; the resulting nail is the original input. Jibb molds are types, not callable values. The prelude now declares a generic `(like A)` mold and a `wonk` extractor; both parse, but their full type and backend validation remain outstanding. Should it also expose a value gate under `like`? If so, should the value preserve Hoon's input shape and behavior, or instead map the product of an already constructed edge? @iko is reviewing these alternatives; the exact public signature is not yet decided.
40+18. **Settled: the value gate `like`.** On 2026-10-31, @iko chose a gate `(like convert result)` that maps the product of an existing `(like A)` result with `convert=$-(A B)`, yielding `(like B)` while preserving its position and remaining input. An absent result stays absent. The `(like A)` mold remains available in the separate mold namespace. Hoon's wet `+like` instead builds a gate that constructs a result from an input noun; the chosen Jibb value gate is an adaptation of that behavior.
4119. **Settled: Hoon aura families and `step.hoon`.** On 2026-10-30, @iko chose `step.hoon` for Hoon 1c `step`, avoiding a clash with the Grammar example's `step`, and chose one-way widening across Hoon aura families: for example, `@ud` and `@ux` fit `@u`, and `@tD` fits `@t`. The reverse needs a check. The `step.hoon` group representation is not implemented yet.
4119. **Settled: Hoon aura families and `step.hoon`.** On 2026-10-30, @iko chose `step.hoon` for Hoon 1c `step`, avoiding a clash with the Grammar example's `step`, and chose one-way widening across Hoon aura families: for example, `@ud` and `@ux` fit `@u`, and `@tD` fits `@t`. The reverse needs a check. The `step.hoon` group representation is not implemented yet.
4220. **Settled: the type of `clap`.** On 2026-10-30, @iko chose one shared value type for both units and the combining gate. If either unit is absent, `clap` returns the other; if both are present, it applies the gate to their values and wraps the result.
4220. **Settled: the type of `clap`.** On 2026-10-30, @iko chose one shared value type for both units and the combining gate. If either unit is absent, `clap` returns the other; if both are present, it applies the gate to their values and wraps the result.
4321. **Settled: duplicate faces in imported Hoon records.** On 2026-10-30, @iko chose to reject an imported Hoon record with duplicate field names where its type is used. Hoon permits `[a=@ud a=@t]` and picks the first `a`; Jibb rejects it.
4321. **Settled: duplicate faces in imported Hoon records.** On 2026-10-30, @iko chose to reject an imported Hoon record with duplicate field names where its type is used. Hoon permits `[a=@ud a=@t]` and picks the first `a`; Jibb rejects it.
@@ -46,13 +46,25 @@ Found while writing [prompts/milestone-2.md](prompts/milestone-2.md), checking i
46
46
4724. **Settled: how the internal prelude provides `poke`.** On 2026-10-31, @iko chose to define `poke` in the source-backed private internal prelude module and re-export it through the public prelude as an ordinary transparent type. Ordinary modules can construct and inspect its values. This settles `poke`; it does not decide the representation of `ask` or `qath`.
4724. **Settled: how the internal prelude provides `poke`.** On 2026-10-31, @iko chose to define `poke` in the source-backed private internal prelude module and re-export it through the public prelude as an ordinary transparent type. Ordinary modules can construct and inspect its values. This settles `poke`; it does not decide the representation of `ask` or `qath`.
48
48
49−25. **How the prelude provides `ask` and `qath`.** The spec calls both opaque, but Jibb has no syntax for a sealed type export. Following the decision for `poke`, @iko has been asked whether these should also be ordinary transparent types defined in the internal prelude, or whether they should retain opacity through a compiler mechanism. Their representations remain undecided.
49+25. **Settled: how the prelude provides `ask` and `qath`.** On 2026-10-31, @iko chose ordinary transparent types defined in the internal prelude and re-exported normally, as for `poke`. Callers may construct and inspect their values.
50
50
51−26. **The `step` example's `at` binder.** The Grammar's `describe` pattern `[t %sent at]` binds `at`, but the agreed prelude inventory includes Hoon's `at` from section 4b, and names may not shadow the prelude. The current incomplete prelude omits `at`, so its partial inference does not reveal this conflict. @iko has been asked whether to rename the binder, rename the prelude gate, or change the shadowing rule.
51+26. **Settled: the `step` example's `at` binder.** On 2026-10-31, @iko chose to rename the `describe` pattern binder to `sent-at`, keeping Hoon's `at` in the prelude and the no-shadowing rule.
52
52
53−27. **Duplicate fields in a Jibb-written record.** The Grammar rejects duplicate field names in imported Hoon records, but does not say what `+$ item [name=@t name=@ud]` means when written in Jibb. @iko has been asked whether to reject it or permit it and select the first field. A provisional bounded validation experiment declines the shape while this is open.
53+27. **Settled: duplicate fields in a Jibb-written record.** On 2026-10-31, @iko chose to reject duplicate field names, as for imported Hoon records.
54
54
55−28. **Arithmetic on loobeans.** The Grammar says `add` takes and returns one atom-constrained type, and `?` contains only 0 and 1. Instantiating that type as `?` would let `(add %.n %.n)` produce 2 outside the claimed result mold. @iko has been asked whether arithmetic rejects loobean inputs or instead widens its result. The partial checker does not export `add` or `dec` while this is unresolved; comparison can safely accept loobeans because it returns `?` independently of its operand type.
55+28. **Settled: arithmetic on loobeans.** On 2026-10-31, @iko chose to reject loobean operands for arithmetic. Comparison may still accept loobeans and returns `?`. The checker needs to retain this constraint through inference, generalization and instantiation before it exports `add` or `dec`.
56+
57+29. **Settled: printing the arithmetic atom constraint.** On 2026-10-31, @iko chose `where A is an atom other than ?` for a generic arithmetic type whose atom variable excludes loobeans.
58+
59+30. **Settled: a hole inferred as a generic variable.** On 2026-10-31, @iko said a hole resolved to an explicitly written type variable counts as inferred: in `++ id |= x=A ^- _ x`, the result hole is `A`. Named molds must determine their own holes without constraints from later uses; an unconstrained hole is an error.
60+
61+31. **Settled: uses of a value with a hole.** On 2026-10-31, @iko said a value definition must determine its own holes; another definition's use cannot fix an otherwise unresolved hole. For example, `++ id |= x=_ x` remains an error even if a later definition calls `id` with a cord.
62+
63+32. **Partly settled: type-directed record projection.** On 2026-10-31, @iko chose an explicit `(proj record)` whose expected result type selects the fields. There is no automatic projection, and `proj` is reserved against definitions and imports. The result contains exactly the fields of its expected type. Whether the result may reorder fields from the source remains open.
64+
65+33. **Settled: watching a request with unknown provenance.** On 2026-10-31, @iko said an island may watch a request only if the checker proves it watchable at compile time. An unknown request, including one built or passed through a gate without sufficient evidence, is rejected rather than deferred to a runtime check.
66+
67+34. **Settled: constructors and equal noun literals.** On 2026-10-31, @iko said expressions with the same runtime representation count as equal, and cases that cannot be distinguished at runtime are rejected at compile time. Thus `|=%$` matches a case headed by `%$`, `%.y` or `~`: each is the noun 0. Cases with equal heads and overlapping payloads cannot coexist in a union.
56
68
57## Grammar questions never put to the doc's author
69## Grammar questions never put to the doc's author
58
70
docs/prelude-inventory.md+7−7
@@ -4,9 +4,9 @@ This is a working inventory, not a completed prelude interface. It lists top-lev
4
4
5The source is the fake ship's `%base` `/sys/hoon.hoon` (Hoon version 135), read through Clay with `tools/ship scry /cx/=base=/sys/hoon/hoon --raw`. SHA-256: `ef538ced0877230f02ff86f9fb7a0abc6833bb1cf0e8675742b4d6ce478fcc92`. It differs in bytes from [upstream Hoon at the inspected commit](https://github.com/urbit/urbit/blob/5a187fededc4582a34fcd6055c67bb63e0917b94/pkg/arvo/sys/hoon.hoon); verify against the actual target ship when updating this inventory.
5The source is the fake ship's `%base` `/sys/hoon.hoon` (Hoon version 135), read through Clay with `tools/ship scry /cx/=base=/sys/hoon/hoon --raw`. SHA-256: `ef538ced0877230f02ff86f9fb7a0abc6833bb1cf0e8675742b4d6ce478fcc92`. It differs in bytes from [upstream Hoon at the inspected commit](https://github.com/urbit/urbit/blob/5a187fededc4582a34fcd6055c67bb63e0917b94/pkg/arvo/sys/hoon.hoon); verify against the actual target ship when updating this inventory.
6
6
7−The vendored prelude defines `poke` in its private internal module and re-exports it as a transparent type. The partial checker resolves its supported source shape and a narrow imported API constructor; complete checking of the private body, other API shapes, effect lowering and runtime execution remain unfinished. `ask` and `qath` are not yet defined there.
7+The vendored prelude defines `poke` in its private internal module and re-exports it as a transparent type. The partial checker resolves its supported source shape and a narrow imported API constructor; complete checking of the private body, other API shapes, effect lowering and runtime execution remain unfinished. `qath` is defined there as a transparent recursive knot sequence and re-exported by the public prelude; the partial checker supports its named identity, selected construction and matching, and static application-path literals. The internal prelude also defines a transparent generic `ask` with pure, agent and store cases; the public prelude re-exports it and defines `pure`. Supported source construction and matching infer, while derived requests, source-schema validation and execution remain unfinished.
8
8
9−The prelude also declares the generic `cmd` mold exactly as in Overview, Effects. The partial checker infers its five cases and independent message types in the supported examples; complete module checking and backend validation remain outstanding. The related `sub` declaration awaits the `ask` representation decision.
9+The prelude also declares the generic `cmd` mold exactly as in Overview, Effects. The partial checker infers its five cases and independent message types in the supported examples; complete module checking and backend validation remain outstanding. The related `sub` declaration awaits checking and the remaining request support.
10
10
11Hoon `+$` arms are marked **mold** below; `++` arms can be gates, doors or mold generators, and need individual inspection. Jibb's loobean `not` and Hoon's bitwise `not.bit` are distinct. Parser helpers outside 3g are excluded from the intended prelude except the specifically listed `slav` and `slaw`; the raw candidates below still need to be classified.
11Hoon `+$` arms are marked **mold** below; `++` arms can be gates, doors or mold generators, and need individual inspection. Jibb's loobean `not` and Hoon's bitwise `not.bit` are distinct. Parser helpers outside 3g are excluded from the intended prelude except the specifically listed `slav` and `slaw`; the raw candidates below still need to be classified.
12
12
@@ -14,7 +14,7 @@ Hoon `+$` arms are marked **mold** below; `++` arms can be gates, doors or mold
14
14
15`add`, `dec`, `div`, `dvr`, `gte`, `gth`, `lte`, `lth`, `max`, `min`, `mod`, `mul`, `sub`.
15`add`, `dec`, `div`, `dvr`, `gte`, `gth`, `lte`, `lth`, `max`, `min`, `mod`, `mul`, `sub`.
16
16
17−The source-backed `gth` gate calls a compiler-supplied private comparison interface. The partial checker accepts supported equal-aura atom arguments, including loobeans, and returns `?`; lowering, jet recognition and execution remain unfinished. `add` and `dec` are not yet exposed: treating every atom-constrained type as closed under arithmetic would incorrectly infer loobean results for operations that can produce other atoms.
17+The source-backed `gth` gate calls a compiler-supplied private comparison interface. The partial checker accepts supported equal-aura atom arguments, including loobeans, and returns `?`; lowering, jet recognition and execution remain unfinished. The public `add` and `dec` gates are written in Jibb over private primitive interfaces. The partial checker infers a shared atom type that excludes loobeans, including through supported generic calls. Primitive execution and jet recognition remain unfinished.
18
18
19## 1c
19## 1c
20
20
@@ -26,13 +26,13 @@ The source-backed `gth` gate calls a compiler-supplied private comparison interf
26
26
27`biff`, `bind`, `bond`, `both`, `clap`, `clef`, `drop`, `fall`, `flit`, `hunt`, `lift`, `mate`, `need`, `some`.
27`biff`, `bind`, `bond`, `both`, `clap`, `clef`, `drop`, `fall`, `flit`, `hunt`, `lift`, `mate`, `need`, `some`.
28
28
29−The following is an audit of the Hoon 135 bodies, not a completed Jibb interface. The partial checker infers `fall`, `need`, `some`, `bind`, `biff`, `both`, `clap`, `clef`, `drop` and `flit`; the remaining written implementations have been parsed, but complete checker validation remains outstanding. Backend validation remains outstanding for all of them.
29+The following is an audit of the Hoon 135 bodies, not a completed Jibb interface. The partial checker infers `fall`, `need`, `some`, `bind`, `biff`, `bond`, `both`, `clap`, `clef`, `drop` and `flit`; the remaining written implementations have been parsed, but complete checker validation remains outstanding. Backend validation remains outstanding for all of them.
30
30
31| Name | Hoon behavior | Jibb status |
31| Name | Hoon behavior | Jibb status |
32| --- | --- | --- |
32| --- | --- | --- |
33| `biff` | Applies a gate returning a unit to a present value; absent stays absent. | Written |
33| `biff` | Applies a gate returning a unit to a present value; absent stays absent. | Written |
34| `bind` | Applies a gate to a present value and wraps the result; absent stays absent. | Written |
34| `bind` | Applies a gate to a present value and wraps the result; absent stays absent. | Written |
35−| `bond` | Calls a fallback trap for an absent unit, otherwise returns its value. | Missing |
35+| `bond` | Calls a fallback trap for an absent unit, otherwise returns its value. | Written and inferred as a curried gate; backend validation remains outstanding |
36| `both` | Returns a unit of both values when both units are present. | Written |
36| `both` | Returns a unit of both values when both units are present. | Written |
37| `clap` | Returns the present unit if only one is present; combines both values with a gate if both are present. | Written with one shared type for both units and the combining gate, as @iko chose |
37| `clap` | Returns the present unit if only one is present; combines both values with a gate if both are present. | Written with one shared type for both units and the combining gate, as @iko chose |
38| `clef` | Applies a gate returning a unit when both inputs are present; otherwise returns an absent unit. | Written |
38| `clef` | Applies a gate returning a unit when both inputs are present; otherwise returns an absent unit. | Written |
@@ -123,7 +123,7 @@ Hoon 135's `3g` section has exactly 12 exports: ten `+$` molds (`coin`, `dime`,
123| `dime` | `[p=@ta q=@]` in Hoon. The `q` field accepts any atom, as does Jibb `@` after @iko's decision in question 15. |
123| `dime` | `[p=@ta q=@]` in Hoon. The `q` field accepts any atom, as does Jibb `@` after @iko's decision in question 15. |
124| `edge` | `[p=hair q=(unit [p=* q=nail])]`: a parsing position and either no result or a result and remaining input. |
124| `edge` | `[p=hair q=(unit [p=* q=nail])]`: a parsing position and either no result or a result and remaining input. |
125| `hair` | `[p=@ud q=@ud]`: a parsing position. |
125| `hair` | `[p=@ud q=@ud]`: a parsing position. |
126−| `like` | A wet mold builder parameterized by a gate `a=$-(* *)`; its generated gate takes a noun, builds an `edge`-shaped result, and applies `a` to the product on success. The prelude declares the generic mold `+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]`. A callable Jibb value form remains open in question 18. |
126+| `like` | A wet mold builder parameterized by a gate `a=$-(* *)`; its generated gate takes a noun, builds an `edge`-shaped result, and applies `a` to the product on success. The prelude declares the generic mold `+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]`. The Jibb value gate maps the product of an existing result and preserves its position and remaining input; the partial checker infers supported calls, while backend validation remains outstanding. |
127| `nail` | `[p=hair q=tape]`: parsing input. |
127| `nail` | `[p=hair q=tape]`: parsing input. |
128| `pint` | `[p=[p=@ q=@] q=[p=@ q=@]]` in Hoon. The four positions accept atoms independently; Jibb `@` now has the same meaning. |
128| `pint` | `[p=[p=@ q=@] q=[p=@ q=@]]` in Hoon. The four positions accept atoms independently; Jibb `@` now has the same meaning. |
129| `rule` | A gate mold `$-(nail edge)`; Hoon constructs its sample and product from the `nail` and `edge` molds. |
129| `rule` | A gate mold `$-(nail edge)`; Hoon constructs its sample and product from the `nail` and `edge` molds. |
@@ -152,7 +152,7 @@ The following shapes can be written as Jibb declarations once their referenced p
152 [%2 p=(list tank)]
152 [%2 p=(list tank)]
153```
153```
154
154
155−The compiler-result `tone.hoon` has the three cases listed above; the qualified name is a prelude group member, not a `+$` identifier containing a dot. Question 15 in [open-questions.md](open-questions.md) records @iko's decision that `@` is an unrestricted atom, resolving the `dime` and `pint` mismatch. The callable value form of `like` remains unresolved. The new `like` mold and `wonk` gate parse, but full type and backend validation remain outstanding.
155+The compiler-result `tone.hoon` has the three cases listed above; the qualified name is a prelude group member, not a `+$` identifier containing a dot. Question 15 in [open-questions.md](open-questions.md) records @iko's decision that `@` is an unrestricted atom, resolving the `dime` and `pint` mismatch. The source-backed value form of `like` maps an existing result's product. Supported calls infer in the partial checker; complete checking and backend validation for `like` and `wonk` remain outstanding.
156
156
157## 4a
157## 4a
158
158
docs/prompts/milestone-2.md+9−7
@@ -49,7 +49,7 @@ And from the plan's Risks:
49
49
50## First steps
50## First steps
51
51
52−1. **Specify the prelude inventory.** The checker needs the prelude's complete exported inventory and signatures; include all names from the listed Hoon library sections except explicitly excluded groups, as `docs/open-questions.md` question 3 records. The prelude imports private helpers and low-level primitives from a separate internal module without exposing them; its public foundational gates are implemented in Jibb on those primitives. The source-backed internal module defines `poke`; the public prelude re-exports it as an ordinary transparent type that modules can construct and inspect, as question 24 records. This decision does not specify the representation of `ask` or `qath`.
52+1. **Specify the prelude inventory.** The checker needs the prelude's complete exported inventory and signatures; include all names from the listed Hoon library sections except explicitly excluded groups, as `docs/open-questions.md` question 3 records. The prelude imports private helpers and low-level primitives from a separate internal module without exposing them; its public foundational gates are implemented in Jibb on those primitives. The source-backed internal module defines `poke`, `ask` and `qath`; the public prelude re-exports them as ordinary transparent types that modules can construct and inspect, as questions 24 and 25 record. Their current representations and partial checker support are described in `docs/compiler.md`.
53
53
54 The plan's three core-language rules were adopted: gate-free `eq` arguments and map and set keys, with gates opaque for union matching; jetted prelude functions taking gates; and rejection of a non-gate value that depends on itself even through a gate.
54 The plan's three core-language rules were adopted: gate-free `eq` arguments and map and set keys, with gates opaque for union matching; jetted prelude functions taking gates; and rejection of a non-gate value that depends on itself even through a gate.
552. **Start the importer early**, as the plan's Risks ask: first on a small `/sur` file, then on Tlon's. "Suggested design" below has a way in.
552. **Start the importer early**, as the plan's Risks ask: first on a small `/sur` file, then on Tlon's. "Suggested design" below has a way in.
@@ -59,8 +59,9 @@ And from the plan's Risks:
59The rules are scattered across the tabs. This is a map of them, not a replacement: read each in place, and where this summary and the doc differ, the doc is right.
59The rules are scattered across the tabs. This is a map of them, not a replacement: read each in place, and where this summary and the doc differ, the doc is right.
60
60
61**Types and inference** (Grammar: Molds, Modules, Runes, Expressions; Decisions: Inference, Type variables, Sample names, Inline gates)
61**Types and inference** (Grammar: Molds, Modules, Runes, Expressions; Decisions: Inference, Type variables, Sample names, Inline gates)
62−- Hindley–Milner with aura variables: "every expression has a principal type, and there is no general subtyping". A specific atom fits `@`, a specific noun fits `*`, and a more specific aura fits an ancestor in its Hoon aura family, each only in that direction; the reverse needs a check.
62+- Hindley–Milner with aura variables: "every expression has a principal type, and there is no general subtyping". A specific atom fits `@`, a specific noun fits `*`, and a more specific aura fits an ancestor in its Hoon aura family, each only in that direction; the reverse needs a check. Explicit `proj` is a type-directed operation.
63- `@` means any atom, independently at each occurrence. A specific atom such as `@ud` fits where `@` is expected; an `@` value needs a check to fit `@ud`. `@ud` and `@ux` also fit `@u`, and `@tD` fits `@t`, following Hoon aura families; the reverse needs a check. Distinct specific auras remain distinct. `add` takes `[A A]` and returns `A`, with an atom constraint inferred for the shared type variable.
63- `@` means any atom, independently at each occurrence. A specific atom such as `@ud` fits where `@` is expected; an `@` value needs a check to fit `@ud`. `@ud` and `@ux` also fit `@u`, and `@tD` fits `@t`, following Hoon aura families; the reverse needs a check. Distinct specific auras remain distinct. `add` takes `[A A]` and returns `A`, with an atom constraint inferred for the shared type variable.
64+- The reserved, explicit `(proj record)` selects fields according to its expected result type. The checker records the projection and lowering evaluates the source once and builds that layout. A direct call does not insert a projection, and a module cannot define or import another `proj`.
64- Faces are part of record types: `[a=@ b=@]` and `[x=@ y=@]` don't unify. An unnamed position can unify with a faced one and take its face, so `[0 0]` fits `[x=@ud y=@ud]`. A single-item cell `[a]` is `a`; an empty `[]` is an error.
65- Faces are part of record types: `[a=@ b=@]` and `[x=@ y=@]` don't unify. An unnamed position can unify with a faced one and take its face, so `[0 0]` fits `[x=@ud y=@ud]`. A single-item cell `[a]` is `a`; an empty `[]` is an error.
65- Type variables are capitals, "generalized per `++`". A capital in a local `++` shares the enclosing `++`'s variable of that name if the enclosing `++` also uses it; otherwise the local `++` introduces and generalizes its own variable. For example, `++ inner |= y=A y` shares `A` with an enclosing gate whose sample is `x=A`, but generalizes its own `A` if the enclosing `++` does not use `A`. A different type takes a different capital. A body cannot force two distinct capitals to be equal; use the same capital where a type is shared. "A type variable used where an atom is required gains an atom constraint", so `++ clamp |= [lo=A hi=A n=A]`, calling `gth` and `max`, works on any one aura; "It can become nothing more specific: a body that makes `A` a `@ud` or a list is an error." Names "may refer to each other in any order", so infer `++` definitions in dependency order, a group of mutually recursive ones together.
66- Type variables are capitals, "generalized per `++`". A capital in a local `++` shares the enclosing `++`'s variable of that name if the enclosing `++` also uses it; otherwise the local `++` introduces and generalizes its own variable. For example, `++ inner |= y=A y` shares `A` with an enclosing gate whose sample is `x=A`, but generalizes its own `A` if the enclosing `++` does not use `A`. A different type takes a different capital. A body cannot force two distinct capitals to be equal; use the same capital where a type is shared. "A type variable used where an atom is required gains an atom constraint", so `++ clamp |= [lo=A hi=A n=A]`, calling `gth` and `max`, works on any one aura; "It can become nothing more specific: a body that makes `A` a `@ud` or a list is an error." Names "may refer to each other in any order", so infer `++` definitions in dependency order, a group of mutually recursive ones together.
66- The checker infers a gate-free constraint for `eq` arguments and map and set keys and retains it when a type variable is generalized. The requirement applies recursively to nested values; union-case matching treats gates as opaque. Print a gate-free constraint as `$-([A A] ?) where A contains no gates` and an atom constraint as `$-([A A] A) where A is an atom`; separate multiple clauses with commas, as `where A is an atom, B contains no gates`.
67- The checker infers a gate-free constraint for `eq` arguments and map and set keys and retains it when a type variable is generalized. The requirement applies recursively to nested values; union-case matching treats gates as opaque. Print a gate-free constraint as `$-([A A] ?) where A contains no gates` and an atom constraint as `$-([A A] A) where A is an atom`; separate multiple clauses with commas, as `where A is an atom, B contains no gates`.
@@ -68,12 +69,13 @@ The rules are scattered across the tabs. This is a map of them, not a replacemen
68- A sample's mold may be left out: every bare name in a sample binds, at any depth, as in `|=(p title.p)` "when the call fixes the type", `|= [a=@ b]` and `|=(m ~)`.
69- A sample's mold may be left out: every bare name in a sample binds, at any depth, as in `|=(p title.p)` "when the call fixes the type", `|= [a=@ b]` and `|=(m ~)`.
69- Generic molds: `+$ result |$ [V E]` with cases below, applied as `(result V E)`; `|$` goes right after a `+$`'s name, and the prelude's `cmd` and `sub` use `|$ [M]`.
70- Generic molds: `+$ result |$ [V E]` with cases below, applied as `(result V E)`; `|$` goes right after a `+$`'s name, and the prelude's `cmd` and `sub` use `|$ [M]`.
70- `!!` is the empty mold, and as an expression it has any type. `*` is the noun type, not a type variable; generic positions such as the keys in `each` and `table` use a capital. A value of a more specific noun type can be used where `*` is expected.
71- `!!` is the empty mold, and as an expression it has any type. `*` is the noun type, not a type variable; generic positions such as the keys in `each` and `table` use a capital. A value of a more specific noun type can be used where `*` is expected.
72+- `_` is an inferable hole wherever a mold can appear, including an inferred path-segment aura. A hole resolved to an explicitly named generic variable is resolved; an unconstrained hole is an error. A named mold or value definition must determine its own holes without constraints from later uses.
71−- `poke` is transparent and re-exported from the source-backed internal prelude. `ask` and `qath` are opaque, built only by derived gates, `pure` and application-path literals.
73+- `poke`, `ask` and `qath` are transparent types defined in the internal prelude and re-exported normally. Derived gates and `pure` also construct requests; application-path literals have type `qath`.
72- The Literals table gives every other literal its type: `0x1f` a `@ux`, ships `@p`, dates `@da`, durations `@dr`, `~.knot` a `@ta`, strings `@t`, `` `x `` a `(unit A)`, `~[…]` a `(list A)`, `gap+%s2` the pair `[%gap %s2]`, `/posts/~zod` a `path`, `%/blog` a `qath`.
74- The Literals table gives every other literal its type: `0x1f` a `@ux`, ships `@p`, dates `@da`, durations `@dr`, `~.knot` a `@ta`, strings `@t`, `` `x `` a `(unit A)`, `~[…]` a `(list A)`, `gap+%s2` the pair `[%gap %s2]`, `/posts/~zod` a `path`, `%/blog` a `qath`.
73
75
74**Tags, `~`, numbers and cells wait for their context** (Grammar: Tag resolution, Literals by context)
76**Tags, `~`, numbers and cells wait for their context** (Grammar: Tag resolution, Literals by context)
75- A tag or `~` gets a fresh variable and a pending constraint, checked once unification fixes the variable: against a union's cases, by shape and shared tag positions, or as a constant atom for `@tas`, `@ta`, `@` or `*`. A literal that matches nothing is "an error naming the union, such as "msg has no case %submitt"".
77- A tag or `~` gets a fresh variable and a pending constraint, checked once unification fixes the variable: against a union's cases, by shape and shared tag positions, or as a constant atom for `@tas`, `@ta`, `@` or `*`. A literal that matches nothing is "an error naming the union, such as "msg has no case %submitt"".
76−- `|=%typed` is a case's constructor: "against `$-(@t M)` it is `|=(t [%typed t])`, requiring `M` to have a case `[%typed @t]`. It works for cases tagged at their head; a bare tag is always a value."
78+- `|=%typed` is a case's constructor: "against `$-(@t M)` it is `|=(t [%typed t])`, requiring `M` to have a case `[%typed @t]`. A literal case head matches by noun value, so `|=%$` also matches `%.y` and `~` heads; a bare tag is always a value."
77- A variable constrained by tag resolution, and any it mentions, doesn't generalize; it stays open until something in the module fixes it. An island's `main` fixes its messages. A tag constraint still open when the module is checked is an error asking for a `^-`; the checker never guesses. Gate-free constraints are retained when generalized.
79- A variable constrained by tag resolution, and any it mentions, doesn't generalize; it stays open until something in the module fixes it. An island's `main` fixes its messages. A tag constraint still open when the module is checked is an error asking for a `^-`; the checker never guesses. Gate-free constraints are retained when generalized.
78- "Wing access, changes and `?-` on a type not yet known wait the same way." A change with no items, `m()`, is an error; the parser still accepts it. Patterns don't wait: they're checked against the subject's type.
80- "Wing access, changes and `?-` on a type not yet known wait the same way." A change with no items, `m()`, is an error; the parser still accepts it. Patterns don't wait: they're checked against the subject's type.
79- Number and cell literals each "takes a default when its `++` is checked": a number `@ud`, a cell a tuple. But "A number takes `@ud` only if nothing fixes its aura and its `++` isn't generic over it", so `++ inc |= n=A (add n 1)` stays generic: unlike a tag's, a number's variable doesn't stop its `++` from generalizing. A cell can also become a record or, where a list is expected, a cons.
81- Number and cell literals each "takes a default when its `++` is checked": a number `@ud`, a cell a tuple. But "A number takes `@ud` only if nothing fixes its aura and its `++` isn't generic over it", so `++ inc |= n=A (add n 1)` stays generic: unlike a tag's, a number's variable doesn't stop its `++` from generalizing. A cell can also become a record or, where a list is expected, a cons.
@@ -107,19 +109,19 @@ The rules are scattered across the tabs. This is a map of them, not a replacemen
107- "Island data and models can't hold gates; the checker names the field."
109- "Island data and models can't hold gates; the checker names the field."
108
110
109**API files, stores and derived gates** (overview: Agent APIs, Effects; Grammar: Modules)
111**API files, stores and derived gates** (overview: Agent APIs, Effects; Grammar: Modules)
110−- `/ui/api/<agent>.jibb` declares `+$ poke` and `+$ paths`; "`poke` and `paths` are declarations, not molds." "A path case is a request name, a path and a type", and "A case can name another scry path, as in `[%changes /updates (facts todos todo-update) scry=/todos]`, used only by pages." An island watching a request whose case has `scry=` has a type error.
112+- `/ui/api/<agent>.jibb` declares `+$ poke` and `+$ paths`; "`poke` and `paths` are declarations, not molds." "A path case is a request name, a path and a type", and "A case can name another scry path, as in `[%changes /updates (facts todos todo-update) scry=/todos]`, used only by pages." An island may watch a request only when the checker proves it is watchable; a separate `scry=` path or unknown watchability is a type error.
111- Each poke type gives a constructor, as `todo-action.todo`, and each path case a request, as `(todos.todo |=%got)`. A path with typed segments takes them too: the overview's `(post.api slug same)` suggests they come first. A `(facts full diff …)` case's request also takes a fold, as `$-([[%todo-update todo-update] todos] todos)`.
113- Each poke type gives a constructor, as `todo-action.todo`, and each path case a request, as `(todos.todo |=%got)`. A path with typed segments takes them too: the overview's `(post.api slug same)` suggests they come first. A `(facts full diff …)` case's request also takes a fold, as `$-([[%todo-update todo-update] todos] todos)`.
112- A store's `+$ poke` is a declaration, not a mold. A store exports a constructor per poke type and a `state` request. Clashing derived names are errors, including clashes with an import face. The checker must account for the fact that the type of `main` determines whether a module is a store.
114- A store's `+$ poke` is a declaration, not a mold. A store exports a constructor per poke type and a `state` request. Clashing derived names are errors, including clashes with an import face. The checker must account for the fact that the type of `main` determines whether a module is a store.
113
115
114**The prelude** (overview: Prelude, Layout and styling, Links and URLs, Effects)
116**The prelude** (overview: Prelude, Layout and styling, Links and URLs, Effects)
115- Hoon's standard library regrouped, "written in Jibb and vendored as `/lib/jibb/prelude`", plus `eq`, `not`, `page`, `program`, `store`, `pure`, `island`, the layout elements and molds, `attr`, `theme`, and `cmd` and `sub` as the overview's Effects block writes them.
117- Hoon's standard library regrouped, "written in Jibb and vendored as `/lib/jibb/prelude`", plus `eq`, `not`, `page`, `program`, `store`, `pure`, `island`, the layout elements and molds, `attr`, `theme`, and `cmd` and `sub` as the overview's Effects block writes them.
116−- Signatures change where the Prelude table says: `clap` takes two units of one value type and a combining gate over that type; maps and sets are plain gates over Hoon's trees, as `(get.by m k)`; folds take a start, as `(roll xs init f)`, `rep.by` and `rep.in`; ordered maps go through lull's `on`, as `(get.on lte m k)`.
118+- Signatures change where the Prelude table says: `clap` takes two units of one value type and a combining gate over that type; the value gate `(like convert result)` maps the product of a `(like A)` to a `(like B)`, preserving position and remaining input; maps and sets are plain gates over Hoon's trees, as `(get.by m k)`; folds take a start, as `(roll xs init f)`, `rep.by` and `rep.in`; ordered maps go through lull's `on`, as `(get.on lte m k)`.
117- Left out: signed and float gates, parser helpers outside 3g other than the explicitly listed `slav` and `slaw`, and the table's "The rest" (1b, 2p, 3d, 3f, 4c, 4n, 4o, 5a–5f); "`jam`, `cue` and `fein` run inside the runtime".
119- Left out: signed and float gates, parser helpers outside 3g other than the explicitly listed `slav` and `slaw`, and the table's "The rest" (1b, 2p, 3d, 3f, 4c, 4n, 4o, 5a–5f); "`jam`, `cue` and `fein` run inside the runtime".
118- Write the prelude in Jibb, enough to give every name its type. Foundational gates use private low-level primitives from the internal prelude module. Jetted functions have working Jibb implementations; the compiler recognizes their shapes and uses the Hoon versions so jets can fire. They may take gates as arguments; the Nock backend comes in milestone 3.
120- Write the prelude in Jibb, enough to give every name its type. Foundational gates use private low-level primitives from the internal prelude module. Jetted functions have working Jibb implementations; the compiler recognizes their shapes and uses the Hoon versions so jets can fire. They may take gates as arguments; the Nock backend comes in milestone 3.
119- Element signatures are in the Layout and styling table. Paths and unchecked cords have separate declarations, with `link-unsafe`, `image-unsafe` and `go-unsafe` for the unchecked forms. Both navigation declarations produce `[%go url=@t]`; `go` converts its application path to a cord including the app's base path. "The same attribute twice in a literal list is an error."
121- Element signatures are in the Layout and styling table. Paths and unchecked cords have separate declarations, with `link-unsafe`, `image-unsafe` and `go-unsafe` for the unchecked forms. Both navigation declarations produce `[%go url=@t]`; `go` converts its application path to a cord including the app's base path. "The same attribute twice in a literal list is an error."
120
122
121**Errors**
123**Errors**
122−- Each one the Grammar tab describes needs a golden case with its message. A start on the list: an aura mismatch; mismatched faces; "msg has no case %submitt"; an unresolved tag, as the Grammar's `add-button` ("nothing fixes the union of %add"); an open constraint at the end of a module; a `|=%tag` whose union has no such case tagged at its head; a union whose cases overlap; a missing `?-` case, named; an arm that earlier arms cover; a value that refers to itself; a shadowed name, including a prelude or imported one; a cell in `{…}` with no printer; an atom of a generic aura in `{…}` or a path's `(…)`; a capital that a body makes a `@ud` or a list; `~[text "hi"]`, where the checker suggests `~[(text "hi")]`; clashing derived names; an import cycle; from an import, a signed or float aura, a core, gate or vase, or a `$%`, `$?` or `$^` whose cases don't differ as nouns, or a record with duplicate field names, each where used; a `(facts …)` outside an API file's `paths`; a gate in island data or a model, naming the field; a repeated attribute in a literal list. Read the Grammar tab, and the other tabs' mentions of "error" and "the checker", and make the list complete.
124+- Each one the Grammar tab describes needs a golden case with its message. A start on the list: an aura mismatch; mismatched faces; "msg has no case %submitt"; an unresolved tag, as the Grammar's `add-button` ("nothing fixes the union of %add"); an open constraint at the end of a module; a `|=%tag` whose union has no case with an equal literal head; a union whose cases overlap; a missing `?-` case, named; an arm that earlier arms cover; a value that refers to itself; a shadowed name, including a prelude or imported one; a cell in `{…}` with no printer; an atom of a generic aura in `{…}` or a path's `(…)`; a capital that a body makes a `@ud` or a list; `~[text "hi"]`, where the checker suggests `~[(text "hi")]`; clashing derived names; an import cycle; from an import, a signed or float aura, a core, gate or vase, or a `$%`, `$?` or `$^` whose cases don't differ as nouns, or a record with duplicate field names, each where used; a `(facts …)` outside an API file's `paths`; a gate in island data or a model, naming the field; a repeated attribute in a literal list. Read the Grammar tab, and the other tabs' mentions of "error" and "the checker", and make the list complete.
123- For a `+$` whose cases overlap or do not fit, suggest that a record or tuple leaves its `[` open on the `+$` line. `+$ pt` above `@t` and `[@ud @ud]` is a valid union.
125- For a `+$` whose cases overlap or do not fit, suggest that a record or tuple leaves its `[` open on the `+$` line. `+$ pt` above `@t` and `[@ud @ud]` is a valid union.
124- "Each error names both conflicting sites, with excerpts." Today's `error` is `[file line col msg]`, a start only; spans keep each node's end so that a type error can underline both sites.
126- "Each error names both conflicting sites, with excerpts." Today's `error` is `[file line col msg]`, a start only; spans keep each node's end so that a type error can underline both sites.
125- Messages name things in the doc's words and quote the code they're about in backticks, as milestone 1's do. Their wording is fixed by the golden tests once written.
127- Messages name things in the doc's words and quote the code they're about in backticks, as milestone 1's do. Their wording is fixed by the golden tests once written.
docs/spec/core-language.md+2−1
@@ -71,7 +71,7 @@ axis = digit { digit } ; (* at least 1 *)
71
71
72## Lowering from Jibb
72## Lowering from Jibb
73
73
74−Types, faces and casts leave nothing behind; everything else lowers by these rules.
74+Types, faces and casts leave nothing behind. Everything else lowers by these rules.
75
75
76| Jibb | Core language |
76| Jibb | Core language |
77| --- | --- |
77| --- | --- |
@@ -82,6 +82,7 @@ Types, faces and casts leave nothing behind; everything else lowers by these rul
82| `gap+%s2` | `(cons %gap %s2)` |
82| `gap+%s2` | `(cons %gap %s2)` |
83| `/posts/~zod`, `%/blog/(slug)` | A list of knots, typed segments printed by their aura's native; the runtime adds the base path to an application path |
83| `/posts/~zod`, `%/blog/(slug)` | A list of knots, typed segments printed by their aura's native; the runtime adds the base path to an application path |
84| `title.p`, `space.theme.theme` | `slot` at the field's axis, nested for longer wings |
84| `title.p`, `space.theme.theme` | `slot` at the field's axis, nested for longer wings |
85+| `(proj record)` | Apply a `lam` to the source once; its body constructs the expected record from the required fields using `slot` and `cons`, discarding extra fields |
85| `card.card`, an import | The qualified name `components/card:card` |
86| `card.card`, an import | The qualified name `components/card:card` |
86| `m(draft=t error=~)` | One `edit` per item, in order: `(edit 7 (edit 6 m t) ~)` |
87| `m(draft=t error=~)` | One `edit` per item, in order: `(edit 7 (edit 6 m t) ~)` |
87| `f a b c` | `(app f (cons a (cons b c)))`: the arguments are the sample |
88| `f a b c` | `(app f (cons a (cons b c)))`: the arguments are the sample |
docs/spec/decisions.md+9−4
@@ -24,19 +24,21 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
24| Several open brackets | The deeper lines go to the last bracket, or the last rune's body, left open on a line, and the brackets before it close with it: `(column ~ ~[` needs no `)` | Decided 2026-10-30 |
24| Several open brackets | The deeper lines go to the last bracket, or the last rune's body, left open on a line, and the brackets before it close with it: `(column ~ ~[` needs no `)` | Decided 2026-10-30 |
25| Jibb code blocks | Labelled `jibb` in this doc; each is a golden test | Decided 2026-10-30 |
25| Jibb code blocks | Labelled `jibb` in this doc; each is a golden test | Decided 2026-10-30 |
26| Definitions | `++` for values, `+$` for molds; no `=/` | Decided |
26| Definitions | `++` for values, `+$` for molds; no `=/` | Decided |
27−| Unions | No `$?`: a `+$` with its cases on the lines below is a union, so every union written in Jibb has a name; one case is just that mold; a mold that isn't a union counts as a union of one case for tags and `\|=%tag`; a generic's `\|$` comes right after the `+$`'s name; tags anywhere; cases differ as nouns, with `?` treated as the two atoms `%.y` and `%.n`, disjoint from cells and overlapping constants 0 and 1, and `!!` or any cell with an empty position disjoint from every case; a tag literal or `~` waits for its union, and an unresolved one is an error | Decided 2026-10-30 |
27+| Unions | No `$?`: a `+$` with its cases on the lines below is a union, so every union written in Jibb has a name; one case is just that mold; a mold that isn't a union counts as a union of one case for tags and `\|=%tag`; a generic's `\|$` comes right after the `+$`'s name; tags anywhere; constructor heads and case disjointness compare literal noun values regardless of spelling, so `%$`, `%.y` and `~` are equal and overlapping cases are errors; cases differ as nouns, with `?` treated as the two atoms `%.y` and `%.n`, disjoint from cells and overlapping constants 0 and 1, and `!!` or any cell with an empty position disjoint from every case; a tag literal or `~` waits for its union, and an unresolved one is an error | Decided 2026-10-31 |
28| Printed unnamed unions | Print the cases separated by spaces, as `%approve %deny`; this is print-only, not Jibb syntax | Decided 2026-10-30 |
28| Printed unnamed unions | Print the cases separated by spaces, as `%approve %deny`; this is print-only, not Jibb syntax | Decided 2026-10-30 |
29−| Printed type constraints | Print an atom constraint as `$-([A A] A) where A is an atom` and a gate-free constraint as `$-([A A] ?) where A contains no gates`; separate multiple clauses with commas, as `where A is an atom, B contains no gates` | Decided 2026-10-30 |
29+| Printed type constraints | Print an atom constraint as `$-([A A] A) where A is an atom`, an arithmetic atom constraint as `where A is an atom other than ?`, and a gate-free constraint as `$-([A A] ?) where A contains no gates`; separate multiple clauses with commas, as `where A is an atom, B contains no gates` | Decided 2026-10-31 |
30| Branching | `?-` only, loobeans included; exhaustive, with explicit catch-alls; covered arms are errors; failures say `!!` | Decided 2026-10-29 |
30| Branching | `?-` only, loobeans included; exhaustive, with explicit catch-alls; covered arms are errors; failures say `!!` | Decided 2026-10-29 |
31| Equality and negation | The gates `eq` and `not`, with Hoon's bitwise `not` exposed as `not.bit`; `eq`'s arguments and map and set keys contain no gates, even nested; the checker infers and generalizes that constraint; union matching never inspects a gate to distinguish cases | Decided 2026-10-30 |
31| Equality and negation | The gates `eq` and `not`, with Hoon's bitwise `not` exposed as `not.bit`; `eq`'s arguments and map and set keys contain no gates, even nested; the checker infers and generalizes that constraint; union matching never inspects a gate to distinguish cases | Decided 2026-10-30 |
32| Special rules | No built-ins; type-directed rules are welcome, each listed in the Grammar tab | Decided 2026-10-29 |
32| Special rules | No built-ins; type-directed rules are welcome, each listed in the Grammar tab | Decided 2026-10-29 |
33| Inference | Hindley–Milner with aura variables; `@` is any atom, a specific atom fits `@` and a more specific aura fits an ancestor in its Hoon aura family, but each reverse needs a check, and repeated atom-constrained capitals give the same type; a number takes `@ud` only where its `++` isn't generic over its aura; distinct specific auras remain distinct; faces are part of record types, and an unnamed position can take a face but two different faces don't unify; principal types | Decided 2026-10-30 |
33| Inference | Hindley–Milner with aura variables; `@` is any atom, a specific atom fits `@` and a more specific aura fits an ancestor in its Hoon aura family, but each reverse needs a check, and repeated atom-constrained capitals give the same type; a number takes `@ud` only where its `++` isn't generic over its aura; distinct specific auras remain distinct; faces are part of record types, and an unnamed position can take a face but two different faces don't unify; principal types | Decided 2026-10-30 |
34−| Effects | The library unions `cmd` and `sub`; `poke` is a transparent type, and requests are opaque, from derived gates and `pure`; islands read agents only by watching; replies get full state, and diffs take a fold; timers carry the time; `%who` gives the owner's `@p`; nacks reach replies as text | Decided 2026-10-31 |
34+| Effects | The library unions `cmd` and `sub`; `poke`, `ask` and `qath` are transparent types defined in the internal prelude and re-exported normally; derived gates and `pure` also construct requests; islands read agents only by watching; replies get full state, and diffs take a fold; timers carry the time; `%who` gives the owner's `@p`; nacks reach replies as text | Decided 2026-10-31 |
35| Poke representation | The source-backed private internal prelude module defines `poke`, and the public prelude re-exports it as an ordinary transparent type. Ordinary modules can construct and inspect its values | Decided 2026-10-31 |
35| Poke representation | The source-backed private internal prelude module defines `poke`, and the public prelude re-exports it as an ordinary transparent type. Ordinary modules can construct and inspect its values | Decided 2026-10-31 |
36−| Agent APIs | `/ui/api/<agent>.jibb` with `+$ poke` and `+$ paths`, over the agent's mark types; a case is a name, a path and a type, with `(facts full diff …)` for diffs, told apart by mark; an optional scry path, for pages; an island watching such a request has a type error; typed segments by aura | Decided 2026-10-30 |
36+| Agent APIs | `/ui/api/<agent>.jibb` with `+$ poke` and `+$ paths`, over the agent's mark types; a case is a name, a path and a type, with `(facts full diff …)` for diffs, told apart by mark; an optional scry path, for pages; an island may watch a request only when the checker proves it is watchable, so a separate scry path or unknown watchability is an error; typed segments by aura | Decided 2026-10-31 |
37| Mark names | Any name: `/%` names types after marks, and constructors poke with their type's mark; no alias marks | Decided 2026-10-26 |
37| Mark names | Any name: `/%` names types after marks, and constructors poke with their type's mark; no alias marks | Decided 2026-10-26 |
38| Derived gates | API files and stores give a constructor per poke type and a checked request per path or store state; clashing names are errors, including a derived name that clashes with an import face | Decided 2026-10-30 |
38| Derived gates | API files and stores give a constructor per poke type and a checked request per path or store state; clashing names are errors, including a derived name that clashes with an import face | Decided 2026-10-30 |
39| Hoon types | A fixed translation table; `map`, `set`, `qeu`, `jar`, `jug` by name; `mop` as `(mop K V)`, read with `on`; imported `$%`, `$?` and `$^` cases must differ as nouns, and records with duplicate field names are errors where used; unused molds skipped | Decided 2026-10-30 |
39| Hoon types | A fixed translation table; `map`, `set`, `qeu`, `jar`, `jug` by name; `mop` as `(mop K V)`, read with `on`; imported `$%`, `$?` and `$^` cases must differ as nouns, and records with duplicate field names are errors where used; unused molds skipped | Decided 2026-10-30 |
40+| Record fields | Duplicate field names in a Jibb-written record are an error, as they are in an imported Hoon record | Decided 2026-10-31 |
41+| Record projection | The explicit type-directed operation `proj` takes a record and uses its expected result type to select its fields; no projection is inserted automatically. `proj` is reserved and cannot be defined or imported under that name. The result has exactly the fields declared by its type | Decided 2026-10-31 |
40| Layout | Indentation; juxtaposed calls; a bracket open at line end takes one item per line, with no closer | Decided |
42| Layout | Indentation; juxtaposed calls; a bracket open at line end takes one item per line, with no closer | Decided |
41| Elements | Ordinary gates; containers take attribute lists; `stack` switches at `wide`; `el` adds attributes and wins; headings 1 to 6; `form` sends on Enter, the innermost when nested; `image` from an application path, sized from the file, or a sized URL; no focus control for now | Decided 2026-10-29 |
43| Elements | Ordinary gates; containers take attribute lists; `stack` switches at `wide`; `el` adds attributes and wins; headings 1 to 6; `form` sends on Enter, the innermost when nested; `image` from an application path, sized from the file, or a sized URL; no focus control for now | Decided 2026-10-29 |
42| Long calls | One argument per line inside parentheses | Decided |
44| Long calls | One argument per line inside parentheses | Decided |
@@ -44,6 +46,7 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
44| Empty mold | `!!`, with no values; the expression has any type; pages are `(element !!)`, which keeps islands out of islands | Decided 2026-10-29 |
46| Empty mold | `!!`, with no values; the expression has any type; pages are `(element !!)`, which keeps islands out of islands | Decided 2026-10-29 |
45| Noun mold | `*` is the noun type, not a type variable; use a capital for a generic type; a value of a more specific noun type can be used where `*` is expected | Decided 2026-10-30 |
47| Noun mold | `*` is the noun type, not a type variable; use a capital for a generic type; a value of a more specific noun type can be used where `*` is expected | Decided 2026-10-30 |
46| Type variables | Capitals, generalized per `++`; a capital in a local `++` shares the enclosing `++`'s variable of that name if the enclosing `++` also uses it; otherwise it is introduced and generalized locally; a different type takes a different capital; a body cannot force distinct capitals to be equal, so a shared type uses the same capital; one used where an atom is required gains an inferred atom constraint, and cannot be fixed to a more specific type in its body | Decided 2026-10-30 |
48| Type variables | Capitals, generalized per `++`; a capital in a local `++` shares the enclosing `++`'s variable of that name if the enclosing `++` also uses it; otherwise it is introduced and generalized locally; a different type takes a different capital; a body cannot force distinct capitals to be equal, so a shared type uses the same capital; one used where an atom is required gains an inferred atom constraint, and cannot be fixed to a more specific type in its body | Decided 2026-10-30 |
49+| Partial type annotations | `_` may appear wherever a mold may appear and marks that part of the type for inference; a hole inferred as a named type variable is resolved; an unconstrained hole is an error, and a named mold or value definition must determine its own holes without constraints from later uses | Decided 2026-10-31 |
47| Loobean mold | `?`, switched with `?-` | Decided 2026-10-26 |
50| Loobean mold | `?`, switched with `?-` | Decided 2026-10-26 |
48| Defaults | None | Decided |
51| Defaults | None | Decided |
49| Modules | Records, not cores | Decided |
52| Modules | Records, not cores | Decided |
@@ -52,6 +55,7 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
52| Binding patterns | In `?-` arms; the last position binds the rest | Decided 2026-10-29 |
55| Binding patterns | In `?-` arms; the last position binds the rest | Decided 2026-10-29 |
53| Text | Strings are written only as `"…"` and are always cords; tapes come from `trip`; `{…}` prints by aura, a bare `@` as `@ud`, and an atom whose aura its `++` is generic over is an error; `print-date` prints Urbit-style to the minute in the theme's zone, from jibb-dev's zone table; numbers keep Hoon's form | Decided 2026-10-30 |
56| Text | Strings are written only as `"…"` and are always cords; tapes come from `trip`; `{…}` prints by aura, a bare `@` as `@ud`, and an atom whose aura its `++` is generic over is an error; `print-date` prints Urbit-style to the minute in the theme's zone, from jibb-dev's zone table; numbers keep Hoon's form | Decided 2026-10-30 |
54| Auras | Specific auras stay distinct; `@` is any atom, a more specific aura fits an ancestor in its Hoon aura family one way, with the reverse requiring a check, and shared atom-constrained type variables preserve the same aura | Decided 2026-10-30 |
57| Auras | Specific auras stay distinct; `@` is any atom, a more specific aura fits an ancestor in its Hoon aura family one way, with the reverse requiring a check, and shared atom-constrained type variables preserve the same aura | Decided 2026-10-30 |
58+| Loobean arithmetic | Arithmetic rejects loobean operands; comparison may accept them and returns `?` | Decided 2026-10-31 |
55| Crashes | As in Hoon; an island keeps its model and shows the standard notice; a failing page, or one rendering a control outside an island, gets Jibb's error page; no render limit, so an endless render stalls the ship | Decided 2026-10-29 |
59| Crashes | As in Hoon; an island keeps its model and shows the standard notice; a failing page, or one rendering a control outside an island, gets Jibb's error page; no render limit, so an endless render stalls the ship | Decided 2026-10-29 |
56| Refinement types | None | Decided |
60| Refinement types | None | Decided |
57| Imports | `/-`, `/%` (a mark's type, with no face) and `/=`; no `/+`; cycles are errors | Decided 2026-10-29 |
61| Imports | `/-`, `/%` (a mark's type, with no face) and `/=`; no `/+`; cycles are errors | Decided 2026-10-29 |
@@ -78,6 +82,7 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
78| Links | All text escaped; in-app links are application paths, as `%/blog/(slug)`, with no query or fragment, checked at compile time against routes and static files; paths and unchecked `https`, `mailto` and `tel` URLs and root-relative cords such as `"/apps/groups"` have separate declarations; `link-unsafe`, `image-unsafe` and `go-unsafe` are the unchecked forms; both navigation declarations produce `[%go url=@t]`, with `go` converting the path to a cord including the app's base path; other cords render as text; a CSP on every page | Decided 2026-10-30 |
82| Links | All text escaped; in-app links are application paths, as `%/blog/(slug)`, with no query or fragment, checked at compile time against routes and static files; paths and unchecked `https`, `mailto` and `tel` URLs and root-relative cords such as `"/apps/groups"` have separate declarations; `link-unsafe`, `image-unsafe` and `go-unsafe` are the unchecked forms; both navigation declarations produce `[%go url=@t]`, with `go` converting the path to a cord including the app's base path; other cords render as text; a CSP on every page | Decided 2026-10-30 |
79| Data layer | Hoon's nouns: units, treaps, loobeans | Decided |
83| Data layer | Hoon's nouns: units, treaps, loobeans | Decided |
80| Prelude | Hoon's standard library regrouped: all names from the listed sections except explicitly excluded groups, including all of 3g, with Hoon's `tone` exposed as `tone.hoon` and Hoon's 1c `step` as `step.hoon`; arithmetic over aura variables, units, lists, maps, sets, queues, ordered maps, function helpers, text, atom printing, a zoned date printer, time and data molds; folds take a start; jetted functions have working Jibb implementations, whose shapes the compiler recognizes to use the Hoon versions, and may take gates; private helpers and low-level primitives live in a separate internal module imported without exposing them, with public foundational gates implemented in Jibb on those primitives; `clap` takes two units of the same type and a combining gate over that type; no signed or float gates, or parser gates outside 3g except `slav` and `slaw`; signed or float auras are errors | Decided 2026-10-30 |
84| Prelude | Hoon's standard library regrouped: all names from the listed sections except explicitly excluded groups, including all of 3g, with Hoon's `tone` exposed as `tone.hoon` and Hoon's 1c `step` as `step.hoon`; arithmetic over aura variables, units, lists, maps, sets, queues, ordered maps, function helpers, text, atom printing, a zoned date printer, time and data molds; folds take a start; jetted functions have working Jibb implementations, whose shapes the compiler recognizes to use the Hoon versions, and may take gates; private helpers and low-level primitives live in a separate internal module imported without exposing them, with public foundational gates implemented in Jibb on those primitives; `clap` takes two units of the same type and a combining gate over that type; no signed or float gates, or parser gates outside 3g except `slav` and `slaw`; signed or float auras are errors | Decided 2026-10-30 |
85+| `like` | The `(like A)` mold remains available; the value gate `like` maps the product of an existing `(like A)` with a gate `$-(A B)`, preserving the position and remaining input, and returns `(like B)` | Decided 2026-10-31 |
81| Wire format | Noun channels; Jibb's own noun codec in the browser | Decided 2026-10-29 |
86| Wire format | Noun channels; Jibb's own noun codec in the browser | Decided 2026-10-29 |
82| Hosting | One thin host agent on `%jibb` binds, caches and serves every Jibb desk; each desk vendors jibb-dev, names its base path in docket's `site+`, and builds and renders with its own copy through fixed entry points; install `%jibb` first; app agents stay plain Hoon; pokes only from the ship | Decided 2026-10-29 |
87| Hosting | One thin host agent on `%jibb` binds, caches and serves every Jibb desk; each desk vendors jibb-dev, names its base path in docket's `site+`, and builds and renders with its own copy through fixed entry points; install `%jibb` first; app agents stay plain Hoon; pokes only from the ship | Decided 2026-10-29 |
83| Private pages | Served by the host per request and never cached; non-owners go to the login page | Decided 2026-10-29 |
88| Private pages | Served by the host per request and never cached; non-owners go to the login page | Decided 2026-10-29 |
docs/spec/grammar.md+13−12
@@ -91,7 +91,7 @@ Imports come first:
91/= card /ui/components/card :: a Jibb module
91/= card /ui/components/card :: a Jibb module
92```
92```
93
93
94−An imported Hoon record with duplicate field names is an error where used; imported union cases must differ as nouns. `/%` names a type after its mark, so it takes no face, and any mark name works; Hoon's `/%` binds the mark's core instead. Derived constructors such as `todo-action.todo` supply the agent and mark, so code never writes one. API modules re-export their `/%` types, not `/-` faces or `/=` modules. Import cycles are errors.
94+An imported Hoon record with duplicate field names is an error where used; imported union cases must differ as nouns. `/%` names a type after its mark, so it takes no face, and any mark name works; Hoon's `/%` binds the mark's core instead. Derived constructors such as `todo-action.todo` supply the agent and mark, so callers need not write those details. API modules re-export their `/%` types, not `/-` faces or `/=` modules. Import cycles are errors.
95
95
96## Modules
96## Modules
97
97
@@ -102,7 +102,7 @@ A file is a module: imports, then definitions.
102- Molds and values have separate namespaces, told apart by position: `todo-action.todo` is a mold and its constructor, `todos.todo` a mold and a request.
102- Molds and values have separate namespaces, told apart by position: `todo-action.todo` is a mold and its constructor, `todos.todo` a mold and a request.
103- `main`'s type decides the kind: `(element !!)` a page; `(page R D)` a page with data, from parameters `R` to data `D`; `(program D X M)` an island, with data, model and messages; `(store S)` a store with state `S`. They're built by `(page load view)`, `(program init update view subs)` and `(store init update)`. A module without `main` is a library.
103- `main`'s type decides the kind: `(element !!)` a page; `(page R D)` a page with data, from parameters `R` to data `D`; `(program D X M)` an island, with data, model and messages; `(store S)` a store with state `S`. They're built by `(page load view)`, `(program init update view subs)` and `(store init update)`. A module without `main` is a library.
104- Everything is exported and read through the import's face, as `card.card`. The prelude keeps private helpers in a separate internal module; it imports them without exposing them.
104- Everything is exported and read through the import's face, as `card.card`. The prelude keeps private helpers in a separate internal module; it imports them without exposing them.
105−- An API module, `/ui/api/<agent>.jibb`, also exports derived gates: a constructor per `poke` type, adding the agent and mark, and a request per `paths` case, taking a reply over full state, plus a fold for `(facts full diff …)`. An island that watches a request whose case has a separate `scry=` path has a type error. A store's `+$ poke` is a declaration, not a mold; a store exports a constructor per `poke` type and a `state` request. Clashing derived names are errors, including a derived name that clashes with an import face.
105+- An API module, `/ui/api/<agent>.jibb`, also exports derived gates: a constructor per `poke` type, adding the agent and mark, and a request per `paths` case, taking a reply over full state, plus a fold for `(facts full diff …)`. An island may watch a request only when the checker proves it is watchable. A request whose case has a separate `scry=` path, or whose watchability cannot be proved, is a type error. A store's `+$ poke` is a declaration, not a mold; a store exports a constructor per `poke` type and a `state` request. Clashing derived names are errors, including a derived name that clashes with an import face.
106
106
107Names the host reads, by file:
107Names the host reads, by file:
108
108
@@ -118,29 +118,30 @@ Every other name is free.
118
118
119## Molds
119## Molds
120
120
121−A mold is only a type: never called on a noun, and with no default. Types are inferred, Hindley–Milner with aura variables: every expression has a principal type, and there is no general subtyping. These one-way widenings are allowed: a value of a specific atom type fits `@`, a value of a specific noun type fits `*`, and a more specific aura fits an ancestor in its Hoon aura family; the reverse of each widening needs a check.
121+A mold is only a type: never called on a noun, and with no default. Types are inferred, Hindley–Milner with aura variables: every expression has a principal type, and there is no general subtyping. These one-way widenings are allowed: a value of a specific atom type fits `@`, a value of a specific noun type fits `*`, and a more specific aura fits an ancestor in its Hoon aura family; the reverse of each widening needs a check. Records can also be projected explicitly, as described below.
122
122
123+- **Partial annotations**: `_` may appear wherever a mold may appear. It marks a part of the type for the checker to infer, so a type annotation can specify only the parts it needs to. A hole inferred to be a named type variable is resolved: in `++ id |= x=A ^- _ x`, the result hole is `A`. An unconstrained hole is an error. A named mold or value definition must determine its own holes: `+$ box [item=_]` and `++ id |= x=_ x` do not determine their holes, and later uses cannot fix them.
123−- **Atoms**: `@` is any atom, regardless of aura; auras such as `@ud`, `@t`, `@p` and `@da` are specific atom types. An `@ud` value fits where `@` is expected, but an `@` value needs a check to fit `@ud`. A more specific aura also fits an ancestor in its Hoon aura family: `@ud` and `@ux` fit `@u`, and `@tD` fits `@t`. The reverse needs a check. Distinct specific auras remain distinct; sharing an ancestor does not make them unify. Each bare `@` independently accepts any atom: it is not an aura variable. Atoms that must share a type take one capital, as `[lo=A hi=A]`, with the atom constraint inferred from the body. `add` takes `[A A]` and returns `A`, with `A` constrained to atoms, so `(add n 1)` with `n=@ud` is a `@ud`. `?` is a loobean.
124+- **Atoms**: `@` is any atom, regardless of aura; auras such as `@ud`, `@t`, `@p` and `@da` are specific atom types. An `@ud` value fits where `@` is expected, but an `@` value needs a check to fit `@ud`. A more specific aura also fits an ancestor in its Hoon aura family: `@ud` and `@ux` fit `@u`, and `@tD` fits `@t`. The reverse needs a check. Distinct specific auras remain distinct; sharing an ancestor does not make them unify. Each bare `@` independently accepts any atom: it is not an aura variable. Atoms that must share a type take one capital, as `[lo=A hi=A]`, with the atom constraint inferred from the body. `add` takes `[A A]` and returns `A`, with `A` constrained to atoms, so `(add n 1)` with `n=@ud` is a `@ud`. Arithmetic rejects loobean operands: `?` contains only 0 and 1, while an arithmetic result need not. Comparison may take loobeans and returns `?`.
124- **Constants**: `%add`, `~` and the loobeans have one value each.
125- **Constants**: `%add`, `~` and the loobeans have one value each.
125−- **Records and tuples**: `[text=@t done=?]`, `[@t ?]`. An empty `[]` is an error. Faces are part of the type, so `[a=@ b=@]` and `[x=@ y=@]` don't unify. An unnamed position can unify with a faced position and take its face, so `[0 0]` fits `[x=@ud y=@ud]`; two different faces don't unify. A record too long for one line can leave its `[` open, with one field per deeper line, as an expression's bracket does.
126+- **Records and tuples**: `[text=@t done=?]`, `[@t ?]`. An empty `[]` is an error. Duplicate field names in a record are an error. Faces are part of the type, so `[a=@ b=@]` and `[x=@ y=@]` don't unify. An unnamed position can unify with a faced position and take its face, so `[0 0]` fits `[x=@ud y=@ud]`; two different faces don't unify. The explicit type-directed operation `(proj record)` selects fields from its argument according to the expected result type: `^- [x=@ud y=@ud] (proj wider)`, or `(f (proj wider))` when `f` expects that record. The source is evaluated once, and the result contains exactly the fields in the expected layout. No projection is inserted for a direct call. `proj` is reserved: a module cannot define or import another name `proj`. A record too long for one line can leave its `[` open, with one field per deeper line, as an expression's bracket does.
126- **Unions**: a `+$` with several cases below it. Every union written in Jibb has a name, so one used in a field, a sample, a cast, a gate's mold or an argument gets its own `+$`; only imports bring in unions without one. Tags take their union from context, as Tag resolution describes. Cases must differ as nouns: inhabited cases must differ at some position of their right-nested cells, where one is an atom and the other a cell, or both are different constants. `*`, type variables and molds that can be either, such as `(list A)`, can overlap atoms and cells. `?` counts as the two atoms `%.y` and `%.n`: it is disjoint from cells and overlaps the constants 0 and 1. The empty mold `!!` is disjoint from every case; a cell with an empty position at any depth is itself empty and is also disjoint from every case. A union whose cases don't all differ is rejected.
127- **Unions**: a `+$` with several cases below it. Every union written in Jibb has a name, so one used in a field, a sample, a cast, a gate's mold or an argument gets its own `+$`; only imports bring in unions without one. Tags take their union from context, as Tag resolution describes. Cases must differ as nouns: inhabited cases must differ at some position of their right-nested cells, where one is an atom and the other a cell, or both are different constants. `*`, type variables and molds that can be either, such as `(list A)`, can overlap atoms and cells. `?` counts as the two atoms `%.y` and `%.n`: it is disjoint from cells and overlaps the constants 0 and 1. The empty mold `!!` is disjoint from every case; a cell with an empty position at any depth is itself empty and is also disjoint from every case. A union whose cases don't all differ is rejected.
127- **Containers**: `(list A)`, `(unit A)`, `(set A)`, `(map K V)`, `(mop K V)`, `(qeu A)`, `(jar K V)`, `(jug K V)`.
128- **Containers**: `(list A)`, `(unit A)`, `(set A)`, `(map K V)`, `(mop K V)`, `(qeu A)`, `(jar K V)`, `(jug K V)`.
128- **Gates**: `$-(A B)`. Type variables are capitals, generalized per `++`. A capital in a local `++` shares the enclosing `++`'s variable of the same name if the enclosing `++` also uses it; otherwise the local `++` introduces and generalizes its own variable. For example, `++ inner |= y=A y` uses the enclosing `A` when its enclosing gate has a sample `x=A`; if the enclosing `++` does not use `A`, `inner` generalizes its own `A`. Use another capital for a different type. A body can't force two distinct capitals to be equal; use the same capital wherever a type must be shared. A type variable used where an atom is required gains an atom constraint, so `++ clamp |= [lo=A hi=A n=A]`, whose body calls `gth` and `max`, works on any one aura. It can become nothing more specific: a body that makes `A` a `@ud` or a list is an error.
129- **Gates**: `$-(A B)`. Type variables are capitals, generalized per `++`. A capital in a local `++` shares the enclosing `++`'s variable of the same name if the enclosing `++` also uses it; otherwise the local `++` introduces and generalizes its own variable. For example, `++ inner |= y=A y` uses the enclosing `A` when its enclosing gate has a sample `x=A`; if the enclosing `++` does not use `A`, `inner` generalizes its own `A`. Use another capital for a different type. A body can't force two distinct capitals to be equal; use the same capital wherever a type must be shared. A type variable used where an atom is required gains an atom constraint, so `++ clamp |= [lo=A hi=A n=A]`, whose body calls `gth` and `max`, works on any one aura. It can become nothing more specific: a body that makes `A` a `@ud` or a list is an error.
129−- **Paths**: `/todos` is constant, `/` empty, and `/todo/[id=@ud]` typed by aura. `%/blog/(slug)` is an `qath`, checked against routes and static files.
130+- **Paths**: `/todos` is constant, `/` empty, and `/todo/[id=@ud]` typed by aura. A typed segment may use `_` for an inferred aura; it still must resolve to an aura that the path rules can print and parse. `%/blog/(slug)` is an `qath`, checked against routes and static files.
130- **Generic molds**: `+$ result |$ [V E]` with cases below; `|$` goes only right after a `+$`'s name.
131- **Generic molds**: `+$ result |$ [V E]` with cases below; `|$` goes only right after a `+$`'s name.
131- **Noun**: `*`, not a type variable; use a capital for a generic type. A value already known to have a more specific noun type, such as `@ud`, can be used where `*` is expected. **Empty**: `!!`.
132- **Noun**: `*`, not a type variable; use a capital for a generic type. A value already known to have a more specific noun type, such as `@ud`, can be used where `*` is expected. **Empty**: `!!`.
132- **Pokes**: `poke` is defined in the source-backed private internal prelude module and re-exported by the public prelude as an ordinary transparent type. Ordinary modules can construct and inspect its values.
133- **Pokes**: `poke` is defined in the source-backed private internal prelude module and re-exported by the public prelude as an ordinary transparent type. Ordinary modules can construct and inspect its values.
133−- **Opaque**: `ask` and `qath`, built only by derived gates, `pure` and application-path literals. `(facts full diff …)` appears only in an API file's `paths`.
134+- **Effect and application-path types**: `poke`, `ask` and `qath` are transparent types, defined in the internal prelude and re-exported normally; callers can construct and inspect their values. Derived gates and `pure` also construct requests, and application-path literals have type `qath`. `(facts full diff …)` appears only in an API file's `paths`.
134- **Identity**: recursive molds go by name and module.
135- **Identity**: recursive molds go by name and module.
135
136
136−`eq`'s arguments and map and set keys must contain no gates, even nested inside another value. The checker infers this gate-free constraint on type variables and retains it when generalizing a `++`, so a generic helper that calls `eq` stays generic over gate-free types. Printed types show the constraint as `$-([A A] ?) where A contains no gates`. An inferred atom constraint prints as `$-([A A] A) where A is an atom`. Multiple clauses are comma-separated, as `where A is an atom, B contains no gates`. Union-case matching treats gates as opaque and never inspects a gate to distinguish cases.
137+`eq`'s arguments and map and set keys must contain no gates, even nested inside another value. The checker infers this gate-free constraint on type variables and retains it when generalizing a `++`, so a generic helper that calls `eq` stays generic over gate-free types. Printed types show the constraint as `$-([A A] ?) where A contains no gates`. An inferred atom constraint prints as `$-([A A] A) where A is an atom`; an arithmetic atom constraint that excludes loobeans prints as `where A is an atom other than ?`. Multiple clauses are comma-separated, as `where A is an atom, B contains no gates`. Union-case matching treats gates as opaque and never inspects a gate to distinguish cases.
137
138
138## Tag resolution
139## Tag resolution
139
140
140A tag literal or `~` gets a fresh type variable and a pending constraint: the variable must become a union with a matching case, or an atom type the term fits. A mold that isn't a union counts as a union of one case, for tags and for `|=%tag`: `[%go "x"]` fits `+$ go [%go url=@t]`, and `|=%typed` works against `$-(@t M)` when `M` is `[%typed text=@t]`. Once unification fixes the variable, each constraint is checked against the union's cases or, for `@tas`, `@ta`, `@` or `*`, makes the tag that constant atom. A literal that matches nothing is an error naming the union, such as "msg has no case %submitt".
141A tag literal or `~` gets a fresh type variable and a pending constraint: the variable must become a union with a matching case, or an atom type the term fits. A mold that isn't a union counts as a union of one case, for tags and for `|=%tag`: `[%go "x"]` fits `+$ go [%go url=@t]`, and `|=%typed` works against `$-(@t M)` when `M` is `[%typed text=@t]`. Once unification fixes the variable, each constraint is checked against the union's cases or, for `@tas`, `@ta`, `@` or `*`, makes the tag that constant atom. A literal that matches nothing is an error naming the union, such as "msg has no case %submitt".
141
142
142- A constraint records the literal's shape, such as `[@t %draft]`, and matches cases by shape and shared tag positions; a literal in a field position is checked against that field.
143- A constraint records the literal's shape, such as `[@t %draft]`, and matches cases by shape and shared tag positions; a literal in a field position is checked against that field.
143−- `|=%typed` is a case's constructor: against `$-(@t M)` it is `|=(t [%typed t])`, requiring `M` to have a case `[%typed @t]`. It works for cases tagged at their head; a bare tag is always a value.
144+- `|=%typed` is a case's constructor: against `$-(@t M)` it is `|=(t [%typed t])`, requiring `M` to have a case `[%typed @t]`. It works for cases whose head is a literal with the same noun as the tag, regardless of how that literal is written: `|=%$` also constructs a case headed by `%.y` or `~`, since each is the noun 0. A bare tag is always a value.
144- A variable constrained by tag resolution, and any it mentions, doesn't generalize; it stays open until something in the module fixes it. An island's `main` fixes its messages, so islands resolve their own tags. The inferred gate-free constraint is retained when a type variable is generalized.
145- A variable constrained by tag resolution, and any it mentions, doesn't generalize; it stays open until something in the module fixes it. An island's `main` fixes its messages, so islands resolve their own tags. The inferred gate-free constraint is retained when a type variable is generalized.
145- A constraint still open when its module is checked is an error asking for a `^-`; the checker never guesses. Library helpers can cast, as in `^- (list attr)`.
146- A constraint still open when its module is checked is an error asking for a `^-`; the checker never guesses. Library helpers can cast, as in `^- (list attr)`.
146- Wing access, changes and `?-` on a type not yet known wait the same way.
147- Wing access, changes and `?-` on a type not yet known wait the same way.
@@ -211,7 +212,7 @@ Tags can sit anywhere in a case, and a case can carry several:
211 [%move %left n] "left {n}"
212 [%move %left n] "left {n}"
212 [%move %right n] "right {n}"
213 [%move %right n] "right {n}"
213 [t %draft] t
214 [t %draft] t
214− [t %sent at] t
215+ [t %sent sent-at] t
215 %stop "stop"
216 %stop "stop"
216```
217```
217
218
@@ -261,7 +262,7 @@ rune = "|=" field ( expr | body )
261 | "?-" expr INDENT arm { NEWLINE arm } DEDENT ;
262 | "?-" expr INDENT arm { NEWLINE arm } DEDENT ;
262arm = pattern ( expr | body ) ; (* every case covered; see Patterns *)
263arm = pattern ( expr | body ) ; (* every case covered; see Patterns *)
263
264
264−mold = aura | "*" | "!!" | "?" | "~" | term | loobean | ref | typevar
265+mold = aura | "_" | "*" | "!!" | "?" | "~" | term | loobean | ref | typevar
265 | pathmold
266 | pathmold
266 | "(" ref mold { mold } ")" | "(" ref { mold } mlines
267 | "(" ref mold { mold } ")" | "(" ref { mold } mlines
267 | "[" field { field } "]" | "[" { field } flines
268 | "[" field { field } "]" | "[" { field } flines
@@ -270,7 +271,7 @@ field = [ name "=" ] mold | "=" name ; (* =msg is msg=msg *)
270mlines = INDENT mold { NEWLINE mold } DEDENT ; (* a mold's ( left open *)
271mlines = INDENT mold { NEWLINE mold } DEDENT ; (* a mold's ( left open *)
271flines = INDENT field { NEWLINE field } DEDENT ; (* a mold's [ left open *)
272flines = INDENT field { NEWLINE field } DEDENT ; (* a mold's [ left open *)
272pathmold = "/" [ segment { "/" segment } ] ;
273pathmold = "/" [ segment { "/" segment } ] ;
273−segment = knot | "[" name "=" aura "]" ;
274+segment = knot | "[" name "=" ( aura | "_" ) "]" ;
274
275
275pattern = term | number | string | ship | loobean | "~" | "*" | name
276pattern = term | number | string | ship | loobean | "~" | "*" | name
276 | "[" pattern { pattern } "]" ;
277 | "[" pattern { pattern } "]" ;
docs/spec/overview.md+4−2
@@ -97,6 +97,8 @@ Hoon's standard library regrouped, written in Jibb and vendored as `/lib/jibb/pr
97| Parsers | [4d](https://docs.urbit.org/hoon/stdlib/4d)–[4i](https://docs.urbit.org/hoon/stdlib/4i), parser helpers in 4j and 4l | Left out, except the explicitly listed `slav` and `slaw` |
97| Parsers | [4d](https://docs.urbit.org/hoon/stdlib/4d)–[4i](https://docs.urbit.org/hoon/stdlib/4i), parser helpers in 4j and 4l | Left out, except the explicitly listed `slav` and `slaw` |
98| The rest | [1b](https://docs.urbit.org/hoon/stdlib/1b), [2p](https://docs.urbit.org/hoon/stdlib/2p), [3d](https://docs.urbit.org/hoon/stdlib/3d), [3f](https://docs.urbit.org/hoon/stdlib/3f), [4c](https://docs.urbit.org/hoon/stdlib/4c), [4n](https://docs.urbit.org/hoon/stdlib/4n), [4o](https://docs.urbit.org/hoon/stdlib/4o), [5a](https://docs.urbit.org/hoon/stdlib/5a)–[5f](https://docs.urbit.org/hoon/stdlib/5f) | Left out; `jam`, `cue` and `fein` run inside the runtime |
98| The rest | [1b](https://docs.urbit.org/hoon/stdlib/1b), [2p](https://docs.urbit.org/hoon/stdlib/2p), [3d](https://docs.urbit.org/hoon/stdlib/3d), [3f](https://docs.urbit.org/hoon/stdlib/3f), [4c](https://docs.urbit.org/hoon/stdlib/4c), [4n](https://docs.urbit.org/hoon/stdlib/4n), [4o](https://docs.urbit.org/hoon/stdlib/4o), [5a](https://docs.urbit.org/hoon/stdlib/5a)–[5f](https://docs.urbit.org/hoon/stdlib/5f) | Left out; `jam`, `cue` and `fein` run inside the runtime |
99
99
100+The prelude's `(like A)` mold describes a result with a product of type `A`. Its value gate `(like convert result)` maps a present product with `convert=$-(A B)` and returns `(like B)`, preserving the position and remaining input; an absent result stays absent.
101+
100Maps are Hoon's trees on both sides, so equal maps are equal nouns. Requests check incoming maps and sets with `apt`.
102Maps are Hoon's trees on both sides, so equal maps are equal nouns. Requests check incoming maps and sets with `apt`.
101
103
102## The Elm architecture on Urbit
104## The Elm architecture on Urbit
@@ -150,9 +152,9 @@ Loads and renders run in Nock.
150 [%url reply=$-(path M)]
152 [%url reply=$-(path M)]
151```
153```
152
154
153−- `poke` is a transparent type; `ask` is opaque, built only by derived gates and `pure`. A derived poke constructor such as `(todo-action.todo [%add draft.m])` checks its value and supplies the agent and mark, so one island can poke several agents. The agent's mark rechecks on the ship; a nack's `tang` reaches the reply as text. Store constructors poke the store in the browser.
155+- `poke`, `ask` and `qath` are transparent types defined in the internal prelude and re-exported normally. Derived gates and `pure` also construct requests. A derived poke constructor such as `(todo-action.todo [%add draft.m])` checks its value and supplies the agent and mark, so one island can poke several agents. The agent's mark rechecks on the ship; a nack's `tang` reaches the reply as text. Store constructors poke the store in the browser.
154- A request such as `(todos.todo |=%got)` comes from a declared path or a store's `state`; its reply always gets full state. A path with diffs also takes a fold, `(changes.todo |=%got apply)`, which the runtime applies first. Facts are checked; a bad one crashes the reply, which counts as a crashed `update`.
156- A request such as `(todos.todo |=%got)` comes from a declared path or a store's `state`; its reply always gets full state. A path with diffs also takes a fold, `(changes.todo |=%got apply)`, which the runtime applies first. Facts are checked; a bad one crashes the reply, which counts as a crashed `update`.
155−- Islands read agents only by watching. A watch's first fact must be full state, so watching a request whose path case has a separate `scry=` path is a type error in an island. The runtime acks facts, rewatches after a kick or a dropped connection and reseeds from the first fact; a refused watch shows the crash notice.
157+- Islands read agents only by watching. A watch's first fact must be full state, so watching a request whose path case has a separate `scry=` path is a type error in an island. The checker must prove a request is watchable; unknown watchability is also a type error. The runtime acks facts, rewatches after a kick or a dropped connection and reseeds from the first fact; a refused watch shows the crash notice.
156- Watches match by agent and path, timers by gap, and the newest reply is always used. After each `update`, `subs` is diffed to start and stop watches and timers. `%now` and `%every` give the time, `%who` the owner's `@p` from `/~/name`; `%wait` is a one-shot delay.
158- Watches match by agent and path, timers by gap, and the newest reply is always used. After each `update`, `subs` is diffed to start and stop watches and timers. `%now` and `%every` give the time, `%who` the owner's `@p` from `/~/name`; `%wait` is a one-shot delay.
157
159
158Inputs send a message per `input` event, and one per IME composition, so validation runs as you type; only commands reach the ship. After every event, controls reset to the latest view, so a toggle whose poke fails unchecks. A field's text is rewritten only when it differs, which keeps the caret. Fields are read-only until their island starts.
160Inputs send a message per `input` event, and one per IME composition, so validation runs as you type; only commands reach the ship. After every event, controls reset to the latest view, so a toggle whose poke fails unchecks. A field's text is rewritten only when it differs, which keeps the caret. Fields are read-only until their island starts.
docs/status.md+57−7
@@ -19,9 +19,31 @@ On 2026-10-30, @iko decided that Jibb drops `$?`, so a `+$` takes a union's case
19
19
20## Milestone 2: in progress
20## Milestone 2: in progress
21
21
22−The repository spec records the subsequent type-system and prelude decisions; those changes also need synchronization to the Claude document. An initial inference fragment and a standalone Hoon type reader are being tested. The fragment explicitly reports that it does not check a module; partial bridges pass Hoon `*` in supported nonrecursive molds, selected Hoon atoms, term singletons, the null singleton, the two loobean singletons and their exact fork, nested faced or unfaced cells, supported disjoint unions and opaque standard collections from `/sur` molds and marks into inference. Collections retain their names and supported arguments for printing and unification; nested supported union arguments are retained too. The bridge trusts unchanged results from the source-aware reader; a materialized type graph alone cannot reveal cases Hoon already collapsed. The source-validated standard prelude `list` mold shares this representation with imported lists; other Jibb-written collection molds and most prelude collection operations remain unsupported; malformed names and arities fail closed. Selected self-recursive `/sur` molds, including Tlon `notes.import-node` with list-wrapped self references, cross as opaque module-and-name identities; aliases, foreign references, recursive marks, unfolding and construction remain unsupported. The reader handles mark samples, including a source-proved nonrecursive union from a single Ford-imported `/sur` core, recursive molds whose origins can be verified through Ford imports, nested collections, direct ordered maps, including source-validated named operands such as Tlon `notes.log`, certain ordered-map fields, direct `$^` unions whose cases can be proved disjoint, and one verified explicit union argument in a list, set, map or unit. Tagged `$%` cases can additionally use restricted local named payload molds, bare `~` fields and one level of local named tagged unions, as in real Tlon `notes`, with bounded source proof; unsupported or ambiguous dependencies fail closed. Ambiguous recursive origins fail closed; recognizable explicit unions are checked from source before Hoon can collapse their cases, as @iko confirmed for imported `$%`, `$?` and `$^`, while other nested unions, nested ordered maps, general union disjointness and complete import integration remain unfinished. Opt-in structured reader APIs preserve successful graphs and distinguish definite unsupported-aura and core evidence from failures the reader cannot prove; unverified union disjointness and name-only vase recognition remain unsupported. They revalidate and re-walk failed types. An opt-in partial checker entry point consumes unchanged reader results and reports definite aura or core errors at imported mold use sites when their inputs are unique. Ordered replay covers nested cell samples, record and function casts, and non-generic same-module aliases; unsupported prefixes, cycles and shadowing stop it. Union molds, generic applications, transitive modules and unsupported reader outcomes remain generic. Replay repeats inference and may add work. The partial checker resolves a subset of ordinary library imports in dependency order using supplied Jibb sources and a source-derived partial prelude interface, caches completed interfaces per run, detects missing sources and cycles, and resolves nested fields of imported values with independent scheme instantiation. The source-backed internal prelude defines `poke` and the public prelude re-exports it as a transparent type. A dedicated trusted preparation path supplies a private comparison scheme to the Jibb-written `gth` wrapper; ordinary imports cannot access them. Primitive execution and jet recognition are unfinished, and addition, decrement and length remain unavailable until arithmetic constraints distinguish their results from loobeans. The partial checker resolves its supported source shape and rejects ordinary imports of the private path. An imported API with one mark and a matching direct `+$ poke` declaration can export a constructor and retain agent/mark metadata when the representation has the supported agent case. A separate partial analysis resolves supported API path declarations and their full and diff mark types, including the todo paths; it does not create requests or check an API module. Complete private module checking, other API shapes, request gates, root API and kind checking, stores, `ask`, `pure`, lowering and runtime effects remain unfinished. A possible store or root API with `+$ poke` reports unsupported kind or scope, while definite duplicates and unrelated shadowing still report conflicts. The prelude includes the doc-exact generic `cmd` union; the prelude inventory is incomplete. The inference fragment supports unrestricted `@`, selected one-way widenings including aura-family ancestors, generalized atom constraints arising from explicit capitals or bare sample binders, acyclic local value definitions with captures, selected single self-recursive top-level and local gates, simple and nonrecursive generic mold aliases, selected faced record casts and field reads, and contextual tags, `~` and constructors for closed disjoint unions, including direct nonrecursive generic unions and propagation through complete loobean and unit-shaped branches in casts and known union-sample calls, including nested branches. Known loobean result context also propagates through supported complete branches and binder-only cell arms; binder-only arms over union subjects remain unsupported. A directly known named union can instantiate an unconstrained generic gate sample with its origin, generic arguments and faces preserved; unnamed, pending, recursive and variable-bound cases remain unsupported. A known gate with an unresolved result variable can receive a known enclosing result type before its arguments are inferred; unknown calls and unresolved targets remain conservative. Multi-argument calls form a right-nested sample, retain known faces and shared type variables, and can use known sample positions to contextualize list and union arguments. A definite mismatch points to the failing argument when the fragment can establish it, otherwise to the combined sample; unsupported contextual forms still fail closed. For a supported recursive gate, the checker infers the sample first and uses its exact type, including field faces, for one monomorphic self reference. It generalizes after the body is checked; subsequent uses instantiate it independently. Incompatible recursive arguments can report the gate and argument sites. For a complete loobean branch with one direct self-call arm, a separately inferred closed base type can seed the recursive result before the whole body is checked. Open or pending base types do not seed it; other branch shapes remain subject to the fragment’s existing limits. A supported single local recursive gate also uses a monomorphic self reference and generalizes variables free of the enclosing environment after checking its body; captured variables remain shared. The checker collects written capitals per `++` before inference, excluding nested definitions: a capital used in an enclosing definition is shared with its locals even when written later, while a capital introduced only in a local definition is generalized there. Sibling locals can introduce independent capitals with the same spelling; generic mold parameters keep their own scope. Top-level groups of syntactic gates are inferred together with monomorphic placeholders and shared substitutions, then generalized only after the whole group checks; downstream uses and library interfaces instantiate those schemes independently. A dependency graph identifies groups with two iterative depth-first passes; its conservative local-reference edges can reject otherwise valid programs. Supported local mutually recursive gate groups also use shared monomorphic placeholders and generalize only after the group checks, preserving captured outer variables. A bounded dependency proof reports certain non-gate cycles through values and gates when an explicit atom or loobean result cast and simple unshadowed expressions establish the cycle. Other mixed gate/value cycles, polymorphic recursion, unresolved literal constraints and unresolved branch joins remain unsupported. Reporting repeats inference for a single recursive gate outside a group; grouped reports use the stored schemes. Its performance cost remains unmeasured. A single-arm cell pattern accepts two or more binders, the last capturing the remaining tail; duplicate and shadowed binders are rejected. A structured single-arm pattern also works for a known non-union cell when coverage is proven, including nested literal and wildcard positions. Intermediate union or collection tails, nested patterns, wildcards and faced records remain unsupported. String interpolation accepts known atom auras, unrestricted `@`, tapes and isolated decimal literals; a known cell asks for a printer, and an explicitly generic atom asks for an aura. Loobeans, term singletons, non-tape collections, open types and a type fixed only later remain unsupported. A known closed union with two or more arms supports patterns that provably cover or exclude each remaining case, including payload binders, imported and generic cases, and binder-free catch-alls. Partial boolean patterns can split known `?` positions into their two noun values, up to 64 alternatives across the union; binders retain their original case type. Missing alternatives and covered arms are reported. Other partial patterns, expansions above the limit, binders spanning distinct cases, differing arm result types and some complex two-arm subjects remain unsupported. A cast or known call sample can supply result context through whole-case arms and supported finite loobean refinements for a known union accessed by a wing, including nested cell and list positions; other partial-pattern context and non-wing subjects remain unsupported. The Grammar’s `step` block infers in this fragment, but its module is not yet checked. A bare tag proved absent from a known union reports the union and tag sites in casts, single-argument calls, unit payloads, list items and supported branch arms; imported unnamed unions print their cases. Ordered fit replay can identify a missing tag nested in a syntactic tuple, stopping at an earlier mismatch or uncertainty. Known faced records support uniquely named field changes, including nested wings, with field context passed to replacements and the original record type retained. Missing fields, empty changes and definite mismatches report sites; the expected-type site is the edit because the original field declaration location is not retained. Unknown or partly unfaced spines, ambiguous fields and repeated edits remain unsupported. A known record cast supplies field context to its tuple or record initializer, including nested list and union fields; mismatch diagnostics use the cast mold because the original field declaration location is not retained. Isolated cart-style `init` and `update` expressions infer, while the complete cart-store fails closed because its kind and declaration scope remain unchecked. Uncontextualized list literals infer a fresh element type, including empty and nested lists, with independently generalized uses. Unresolved item tags and uncertain widening remain unsupported. Backtick unit construction uses the validated standard prelude unit template, infers its payload without losing pending constraints, and makes the prelude’s `some` available. Ordinary result annotations also let its `bind`, `biff`, `both`, `clap`, `clef` and `flit` infer. A known unit in a cast, call, list item or record field supplies context to its payload, including nested units and lists; mismatches identify the payload and context. Unrelated union identities, some variable-dependent fits, and missing or altered prelude unit templates remain unsupported. Contextual null-headed cells fit their cases, but do not supply a `|=%$` constructor; unresolved nulls remain pending and are reported separately from tags. A known union of `~` and a null-headed cell supports a complete `~` / `[~ value]` branch in either order, including shadow checks; unknown subjects, missing or duplicate arms, and unresolved branch results remain unsupported. This fragment infers the prelude’s `fall` and `need` signatures. With the validated prelude list and a known cast or gate sample, empty, nonempty and nested list literals infer their element types, including contextual union tags; a mismatched element names both sites. In that context `~` and zero-valued terms fit an empty list, and two-item unfaced cells form cons lists, including nested cons and imported-list contexts; invalid heads or tails name both sites. A known gate sample also supplies context to matching positions in a single tuple or record argument, including nested cells; zero literals can fit list positions. A bound zero constant remains unsupported rather than a definite mismatch, and an unknown callee does not supply context. Faced or longer cells and a missing or altered prelude list fail closed. A known list result also supplies context through complete loobean, unit-shaped and list-shaped branches, including recursive and nested branches. For a known standard list with a supported element type, a complete `~` / `[item rest]` branch infers the element and tail types in either arm order and checks binders for shadowing. Unknown subjects, unsupported element types and other or incomplete list patterns remain unsupported. A value with type variable `A` can fit a field whose type is that same `A`, including in generic union payloads and nested or repeated record fields. Other variable-dependent face merges remain unsupported. Forced equality of distinct written capitals now reports both source sites, following @iko’s decision; forcing one to a concrete type remains unsupported. Imported record spines with repeated faces fail closed where used, but only with a generic unsupported diagnostic. Hoon may erase unfaced nested-cell boundaries, so the check can conservatively reject valid names in distinct erased scopes. Supported closed unions print using an in-scope name or imported alias; an unnamed nongeneric union prints its cases, parenthesized when nested. The latter is print-only. Generic union types retain all arguments in their printed name; if that name is unavailable, the partial printer reports the limitation. Different import faces for the same origin remain compatible; compatibility across distinct union origins and some generic-argument comparisons remain unsupported. Nonrecursive generic aliases can reorder, repeat or omit parameters while retaining a union’s origin, including through local scopes and library interfaces. A generic union declared directly inside a body remains unsupported, as do differing-variable face constraints in a union payload. A transitive generic union whose name is unavailable is reported as unsupported instead of hiding its arguments. Unfixed decimal literals default to `@ud` in gate-free inferred types; recursive molds, general branch tag context, other constraint cases and defaulting inside gate types still need work. Collection recognition checks the originating core and fails closed on shadows or unsupported Ford subject shapes; a wrapper regression also rejects forged subjects, samples and tails. Its golden fixtures include three real Tlon files. A Clay test passes a Ford-built nested union through the reader into partial inference. The partial prelude includes `murn`, `join`, `snip`, `rear` and the newly agreed shared-type `clap`, parsed but still awaiting checker and backend validation, and [prelude-inventory.md](prelude-inventory.md) is a source audit, not the complete inventory or signatures. The milestone remains unfinished.
22+The parser accepts `_` in mold positions and typed path segments, retaining each hole’s span. The partial checker tracks ordinary annotation holes through inference and requires each value or local definition to resolve its own holes before generalization. A hole can resolve to a concrete type or an explicitly written in-scope type variable; later uses cannot fix an unresolved definition. Independent decimal holes can default, but captured variables are not defaulted prematurely. Structural named molds with an unresolved hole report its site. Complex mold forms, inferred path segments, mutual recursive groups and other unsupported constraints still fail closed, and the fragment does not claim the module is checked. A syntax-tree pass rejects duplicate field names within each written record and reports both sites. The repository spec now records that `ask` and `qath` are transparent; complete request checking remains outstanding.
23
23
24−The shared prelude interface reserves every name present in the supplied vendored source and makes only supported inferred entries available, including `list`, `unit`, `same`, `fall`, `need`, `lure`, `weld`, `snoc` and `turn`. The validated standard `list` mold is injected when the prelude’s own gates are inferred; `weld` and `turn` have ordinary explicit result casts. An absent or altered `list` is not injected, and an altered declaration cannot leak through direct or transitive mold aliases. List-dependent prelude mold aliases remain unsupported because their templates are prepared before injection. Unsupported entries such as most list helpers remain reserved but unavailable; backend validation of the helpers remains outstanding. All callers use the same prelude origin, so a library can export a type containing unqualified `(unit A)` to another module. Preparation rejects empty, malformed, conflicting or import-bearing source; the prepared value is trusted and must come unchanged from `+prepare-prelude`. The module-scope fixture compares the prepared and source-taking paths against the real prelude and a two-module golden under eval and on the ship. The source and checker remain incomplete, so this does not establish complete shadowing coverage or a checked module.
24+On 2026-10-31, @iko chose explicit, result-directed `(proj record)` to construct a record with exactly the expected fields, and reserved `proj` against definitions and imports. The partial checker handles selected explicit calls with known, closed record types, records field-selection evidence for later lowering, and reserves the name across source bindings. Reordered fields, some nested contexts and several open or recursive cases remain unsupported; lowering and execution are not implemented yet. The field-order question remains open.
25+
26+The internal prelude also defines `qath` as a transparent recursive knot sequence, re-exported by the public prelude. The partial checker recognizes its source identity, supports selected null/cell construction and matching, and types static application-path literals. Other recursive shapes, broader patterns and dynamic application-path segments remain unsupported. A 256-step limit applies per inference attempt, not to parsing or retries; checking routes and static files remains milestone 4.
27+
28+The internal prelude defines a transparent generic `ask` with pure, agent and store cases, re-exported alongside the Jibb-written `pure` gate. The partial checker infers supported constructors and exhaustive matches. Agent and store receivers operate on raw nouns; their fields do not prove schema validity or watchability. The public prelude now defines the documented source-backed `sub` union; supported `%watch` payloads retain the public `(ask M)` type. Constructing a `sub` does not prove that its request is watchable. Request lowering, checked decoding, runtime validation and island watch checking remain unimplemented.
29+
30+Known same-origin generic-union result context can now constrain a call before its arguments are inferred. An unresolved or opaque constructor target stays unsupported rather than producing a definite mismatch; proven missing tags still report errors. A todo request with explicit `(ask msg)` context can infer `|=%got`; its uncontextualized form remains unsupported. A two-item literal-headed tuple can receive payload context from a known union of uniquely headed literal cells when its payload is a shallow wing-headed call with literal, wing or constructor arguments. Existing inference takes precedence when it fits; otherwise the checker tries the contextual path once. It conservatively declines that path when any substitution has a structural root, as well as for duplicate or opaque competitors. The guard scans substitutions per eligible tuple and may add one shallow inference; no global linear-time bound is claimed. This allows an explicitly typed todo subscription body to infer, but does not check the island or prove request watchability.
31+
32+A separate source-backed analysis can prove one named mold gate-free, report a definite gate with a field path, or return unknown. It retains the prepared prelude, source bundle, reader results and resolved imports; the actual todo model proves gate-free, while a callback field reports its path and `*` remains unknown. Its classifier is capped at 256 nodes, not the surrounding parse and import work. API, store and private roots are unsupported, and the artifact does not check a module or island, infer generalized constraints, or prove watchability.
33+
34+The API path analyzer can retain its source, complete prepared prelude, reader results and resolved dependencies as evidence, and classify a unique declaration as watchable, not watchable or unknown. It does not yet prove the provenance of request values or check island subscriptions. Prepared artifacts and reader results remain trusted host inputs.
35+
36+For a unique supported path declaration, the request-parts analysis derives ordered typed path parameters, a full-state reply sample and a fold type for one diff mark. Multiple diffs and unsupported or ambiguous evidence fail closed. By itself it does not create request gates or establish watchability of values.
37+
38+A separate supporting-definition analysis infers supported ordinary API molds and values and resolves all declared marks, retaining their source and dependency evidence. It fails closed on unsupported helpers or marks; unused `/-` cores are not independently validated, and definitions depending on derived gates remain unsupported. This does not check or export the whole API.
39+
40+Ordinary imports can infer derived request-gate types for multiple supported API paths. A case may take one typed segment before the reply or one diff fold after it; the unchanged todo API's plain, typed and diff requests infer, including a named closed fold. Checked ordinary API definitions, mark molds and a supported poke constructor are exported. Each `/sur` core must have a directly used, successfully read mold; unselected bindings are not independently validated. Jibb module imports, scry paths, multiple parameters or diffs and a parameter together with a fold remain unsupported. Source-qualified request evidence and exact trusted graph inputs survive transitive imports and cached interfaces, while stale or ambiguous evidence fails closed. This is a type-only interface: request execution, schema validation and proof that a request value is watchable remain unimplemented. In one loaded-machine run, the real-todo eval took 195.83 s wall and 67.83 s user CPU; the prior prototype took 111.81 s wall and 64.60 s user. Both include Hoon compilation and reader setup and overlapped other work, so they are not isolated checker benchmarks.
41+
42+The Hoon reader's tagged-union source proof also handles `$~` default wrappers. A shared eval and ship golden exercises the unmodified Tlon `epic.saga` mold as a named payload in a labeled downstream extension, alongside overlap, recursive, shadow and malformed-wrapper controls. The tagged-source helper peels at most four consecutive defaults; defaults inside dependency proofs spend the existing semantic-node budget. Other unverified nested unions and dependencies remain unsupported.
43+
44+The repository spec records the subsequent type-system and prelude decisions, including the chosen `like` result-mapping gate; those changes also need synchronization to the Claude document. An initial inference fragment and a standalone Hoon type reader are being tested. The fragment explicitly reports that it does not check a module; partial bridges pass Hoon `*` in supported nonrecursive molds, selected Hoon atoms, term singletons, the null singleton, the two loobean singletons and their exact fork, nested faced or unfaced cells, supported disjoint unions and opaque standard collections from `/sur` molds and marks into inference. Collections retain their names and supported arguments for printing and unification; nested supported union arguments are retained too. The bridge trusts unchanged results from the source-aware reader; a materialized type graph alone cannot reveal cases Hoon already collapsed. The source-validated standard prelude `list` mold shares this representation with imported lists; other Jibb-written collection molds and most prelude collection operations remain unsupported; malformed names and arities fail closed. Selected self-recursive `/sur` molds, including Tlon `notes.import-node` with list-wrapped self references, cross as opaque module-and-name identities; aliases, foreign references, recursive marks, unfolding and construction remain unsupported. The reader handles mark samples, including a source-proved nonrecursive union from a single Ford-imported `/sur` core, recursive molds whose origins can be verified through Ford imports, nested collections, direct ordered maps, including source-validated named operands such as Tlon `notes.log`, certain ordered-map fields, direct `$^` unions whose cases can be proved disjoint, and one verified explicit union argument in a list, set, map or unit. Tagged `$%` cases can additionally use restricted local named payload molds, bare `~` fields and one level of local named tagged unions, as in real Tlon `notes`, with bounded source proof; unsupported or ambiguous dependencies fail closed. Ambiguous recursive origins fail closed; recognizable explicit unions are checked from source before Hoon can collapse their cases, as @iko confirmed for imported `$%`, `$?` and `$^`, while other nested unions, nested ordered maps, general union disjointness and complete import integration remain unfinished. Opt-in structured reader APIs preserve successful graphs and distinguish definite unsupported-aura and core evidence from failures the reader cannot prove; unverified union disjointness and name-only vase recognition remain unsupported. They revalidate and re-walk failed types. An opt-in partial checker entry point consumes unchanged reader results and reports definite aura or core errors at imported mold use sites when their inputs are unique. Ordered replay covers nested cell samples, record and function casts, and non-generic same-module aliases; unsupported prefixes, cycles and shadowing stop it. Union molds, generic applications, transitive modules and unsupported reader outcomes remain generic. Replay repeats inference and may add work. The partial checker resolves a subset of ordinary library imports in dependency order using supplied Jibb sources and a source-derived partial prelude interface, caches completed interfaces per run, detects missing sources and cycles, and resolves nested fields of imported values with independent scheme instantiation. The source-backed internal prelude defines `poke` and the public prelude re-exports it as a transparent type. A dedicated trusted preparation path supplies private comparison and arithmetic schemes to the Jibb-written `gth`, `add` and `dec` wrappers; ordinary imports cannot access them. The public `add` and `dec` wrappers use private arithmetic interfaces; supported inference preserves the shared atom constraint that excludes loobeans. Primitive execution, jet recognition and length remain unfinished. The partial checker resolves its supported source shape and rejects ordinary imports of the private path. An imported API with one mark and a matching direct `+$ poke` declaration can export a constructor and retain agent/mark metadata when the representation has the supported agent case. A separate partial analysis resolves supported API path declarations and their full and diff mark types, including the todo paths; it does not by itself create requests or check an API module. Ordinary imports additionally infer the supported multi-path request-gate types described above. Complete private module checking, other API shapes, request lowering, root API and kind checking, stores, complete `ask` and `pure` checking and runtime effects remain unfinished. A possible store or root API with `+$ poke` reports unsupported kind or scope, while definite duplicates and unrelated shadowing still report conflicts. The prelude includes the doc-exact generic `cmd` union; the prelude inventory is incomplete. The inference fragment supports unrestricted `@`, selected one-way widenings including aura-family ancestors, generalized atom constraints arising from explicit capitals or bare sample binders, acyclic local value definitions with captures, selected single self-recursive top-level and local gates, simple and nonrecursive generic mold aliases, selected faced record casts and field reads, and contextual tags, `~` and constructors for closed disjoint unions, including direct nonrecursive generic unions and propagation through complete loobean and unit-shaped branches in casts and known union-sample calls, including nested branches. Known loobean result context also propagates through supported complete branches and binder-only cell arms; binder-only arms over union subjects remain unsupported. A directly known named union can instantiate an unconstrained generic gate sample with its origin, generic arguments and faces preserved; unnamed, pending, recursive and variable-bound cases remain unsupported. A known gate with an unresolved result variable can receive a known enclosing result type before its arguments are inferred; unknown calls and unresolved targets remain conservative. Multi-argument calls form a right-nested sample, retain known faces and shared type variables, and can use known sample positions to contextualize list and union arguments. A definite mismatch points to the failing argument when the fragment can establish it, otherwise to the combined sample; unsupported contextual forms still fail closed. For a supported recursive gate, the checker infers the sample first and uses its exact type, including field faces, for one monomorphic self reference. It generalizes after the body is checked; subsequent uses instantiate it independently. Incompatible recursive arguments can report the gate and argument sites. For a complete loobean branch with one direct self-call arm, a separately inferred closed base type can seed the recursive result before the whole body is checked. Open or pending base types do not seed it; other branch shapes remain subject to the fragment’s existing limits. A supported single local recursive gate also uses a monomorphic self reference and generalizes variables free of the enclosing environment after checking its body; captured variables remain shared. The checker collects written capitals per `++` before inference, excluding nested definitions: a capital used in an enclosing definition is shared with its locals even when written later, while a capital introduced only in a local definition is generalized there. Sibling locals can introduce independent capitals with the same spelling; generic mold parameters keep their own scope. Top-level groups of syntactic gates are inferred together with monomorphic placeholders and shared substitutions, then generalized only after the whole group checks; downstream uses and library interfaces instantiate those schemes independently. A dependency graph identifies groups with two iterative depth-first passes; its conservative local-reference edges can reject otherwise valid programs. Supported local mutually recursive gate groups also use shared monomorphic placeholders and generalize only after the group checks, preserving captured outer variables. A bounded dependency proof reports certain non-gate cycles through values and gates when an explicit atom or loobean result cast and simple unshadowed expressions establish the cycle. Other mixed gate/value cycles, polymorphic recursion, unresolved literal constraints and unresolved branch joins remain unsupported. Reporting repeats inference for a single recursive gate outside a group; grouped reports use the stored schemes. Its performance cost remains unmeasured. A single-arm cell pattern accepts two or more binders, the last capturing the remaining tail; duplicate and shadowed binders are rejected. A structured single-arm pattern also works for a known non-union cell when coverage is proven, including nested literal and wildcard positions. Intermediate union or collection tails, nested patterns, wildcards and faced records remain unsupported. String interpolation accepts known atom auras, unrestricted `@`, tapes and isolated decimal literals; a known cell asks for a printer, and an explicitly generic atom asks for an aura. Loobeans, term singletons, non-tape collections, open types and a type fixed only later remain unsupported. A known closed union with two or more arms supports patterns that provably cover or exclude each remaining case, including payload binders, imported and generic cases, and binder-free catch-alls. Partial boolean patterns can split known `?` positions into their two noun values, up to 64 alternatives across the union; binders retain their original case type. Missing alternatives and covered arms are reported. Other partial patterns, expansions above the limit, binders spanning distinct cases, differing arm result types and some complex two-arm subjects remain unsupported. A cast or known call sample can supply result context through whole-case arms and supported finite loobean refinements for a known union accessed by a wing, a grouped wing or a supported shallow call, including nested cell and list positions; other partial-pattern contexts and subject forms remain unsupported. The Grammar’s `step` block infers in this fragment, but its module is not yet checked. A bare tag proved absent from a known union reports the union and tag sites in casts, single-argument calls, unit payloads, list items and supported branch arms; imported unnamed unions print their cases. Ordered fit replay can identify a missing tag nested in a syntactic tuple, stopping at an earlier mismatch or uncertainty. Known faced records support uniquely named field changes, including nested wings, with field context passed to replacements and the original record type retained. Missing fields, empty changes and definite mismatches report sites; the expected-type site is the edit because the original field declaration location is not retained. Unknown or partly unfaced spines, ambiguous fields and repeated edits remain unsupported. A known record cast supplies field context to its tuple or record initializer, including nested list and union fields; mismatch diagnostics use the cast mold because the original field declaration location is not retained. Isolated cart-style `init` and `update` expressions infer, while the complete cart-store fails closed because its kind and declaration scope remain unchecked. Uncontextualized list literals infer a fresh element type, including empty and nested lists, with independently generalized uses. Unresolved item tags and uncertain widening remain unsupported. Backtick unit construction uses the validated standard prelude unit template, infers its payload without losing pending constraints, and makes the prelude’s `some` available. Ordinary result annotations also let its `bind`, `biff`, `both`, `clap`, `clef` and `flit` infer. A known unit in a cast, call, list item or record field supplies context to its payload, including nested units and lists; mismatches identify the payload and context. Unrelated union identities, some variable-dependent fits, and missing or altered prelude unit templates remain unsupported. Literal singleton heads compare by runtime noun, so `|=%$` also matches explicit null- and loobean-zero-headed cases. When equal heads have disjoint payloads, the constructor selects a uniquely proven compatible payload; unknown and ambiguous candidates remain unsupported. Unresolved nulls remain pending and are reported separately from tags. A known union of `~` and a null-headed cell supports a complete `~` / `[~ value]` branch in either order, including shadow checks; unknown subjects, missing or duplicate arms, and unresolved branch results remain unsupported. This fragment infers the prelude’s `fall` and `need` signatures. With the validated prelude list and a known cast or gate sample, empty, nonempty and nested list literals infer their element types, including contextual union tags; a mismatched element names both sites. In that context `~` and zero-valued terms fit an empty list, and two-item unfaced cells form cons lists, including nested cons and imported-list contexts; invalid heads or tails name both sites. A known gate sample also supplies context to matching positions in a single tuple or record argument, including nested cells; zero literals can fit list positions. A bound zero constant remains unsupported rather than a definite mismatch, and an unknown callee does not supply context. Faced or longer cells and a missing or altered prelude list fail closed. A known list result also supplies context through complete loobean, unit-shaped and list-shaped branches, including recursive and nested branches. For a known standard list with a supported element type, a complete `~` / `[item rest]` branch infers the element and tail types in either arm order and checks binders for shadowing. Unknown subjects, unsupported element types and other or incomplete list patterns remain unsupported. A value with type variable `A` can fit a field whose type is that same `A`, including in generic union payloads and nested or repeated record fields. Other variable-dependent face merges remain unsupported. Forced equality of distinct written capitals now reports both source sites, following @iko’s decision; forcing one to a concrete type remains unsupported. Imported record spines with repeated faces fail closed where used, but only with a generic unsupported diagnostic. Hoon may erase unfaced nested-cell boundaries, so the check can conservatively reject valid names in distinct erased scopes. Supported closed unions print using an in-scope name or imported alias; an unnamed nongeneric union prints its cases, parenthesized when nested. The latter is print-only. Generic union types retain all arguments in their printed name; if that name is unavailable, the partial printer reports the limitation. Different import faces for the same origin remain compatible; compatibility across distinct union origins and some generic-argument comparisons remain unsupported. Nonrecursive generic aliases can reorder, repeat or omit parameters while retaining a union’s origin, including through local scopes and library interfaces. A generic union declared directly inside a body remains unsupported, as do differing-variable face constraints in a union payload. A transitive generic union whose name is unavailable is reported as unsupported instead of hiding its arguments. Unfixed decimal literals default to `@ud` in gate-free inferred types; recursive molds, general branch tag context, other constraint cases and defaulting inside gate types still need work. Collection recognition checks the originating core and fails closed on shadows or unsupported Ford subject shapes; a wrapper regression also rejects forged subjects, samples and tails. Its golden fixtures include three real Tlon files. A Clay test passes a Ford-built nested union through the reader into partial inference. The partial prelude includes `murn`, `join`, `snip`, `rear` and the agreed shared-type `clap`; supported calls infer, while backend validation remains outstanding, and [prelude-inventory.md](prelude-inventory.md) is a source audit, not the complete inventory or signatures. The milestone remains unfinished.
45+
46+The shared prelude interface reserves every name present in the supplied vendored source and makes only supported inferred entries available, including `list`, `unit`, `same`, `fall`, `need`, `bond`, `lure`, `weld`, `snoc` and `turn`. The validated standard `list` mold is injected when the prelude’s own gates are inferred; `weld` and `turn` have ordinary explicit result casts. An absent or altered `list` is not injected, and an altered declaration cannot leak through direct or transitive mold aliases. The same validated template is available when prelude mold aliases are prepared, so supported direct and transitive aliases can use it. Unsupported entries such as most list helpers remain reserved but unavailable; backend validation of the helpers remains outstanding. All callers use the same prelude origin, so a library can export a type containing unqualified `(unit A)` to another module. The source-only `+prepare-prelude` rejects empty, malformed, conflicting or import-bearing source; `+prepare-prelude-with-internal` also accepts the supported private internal import. Prepared values are trusted and must come unchanged from the matching preparation arm. When canonical public list or unit templates are missing or altered, independently inferred private molds remain available, while molds that depend on those templates do not. The module-scope fixture compares the prepared and source-taking paths against the real prelude and a two-module golden under eval and on the ship. The source and checker remain incomplete, so this does not establish complete shadowing coverage or a checked module.
25
47
26## Milestone 1: parser and mark
48## Milestone 1: parser and mark
27
49
@@ -39,8 +61,8 @@ What the plan asks for, and where it is:
39
61
40Besides the plan's list:
62Besides the plan's list:
41
63
42−- 574 golden cases: 358 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.
64+- 649 golden cases: 429 that parse and 220 that fail, each failure at a stated line and column. One failing case has an unclear expectation (corpus question 3). The newer type-output cases exercise only the partial inference fragment. Each case's `about.txt` quotes the doc's words it tests.
43−- The 574-case corpus passed under `urbit eval` in 77.9 s. The fake ship passed all 583 tests, including the importer, importer/checker and mark/checker bridges, module scope and unification checks, with 43.4 s for sync and 54.7 s for tests. The importer golden compares 214 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.
65+- The 649-case corpus passed under `urbit eval` in 91.6 s while other checks were running. The fake ship passed all 678 tests, including the importer, importer/checker and mark/checker bridges, module scope, unification, hole, qath, ask, default-wrapper importer, projection, arithmetic, generic-alias, positional-face, API-evidence, request, closed-gate, todo API, constructor, sub, nested-union and gate-free guards, with 66.8 s for sync and 81.8 s for tests. The importer golden compares 221 projections; `tools/clay-fixtures` builds the example Hoon fixtures through Clay, checks a recursive Ford import's origin, and passes Clay-built types through the Clay-built importer and partial checker.
44- `tools/testdata/selftest` (22 checks), `tools/testdata/ship-selftest` and `tools/testdata/clay-fixtures-selftest` test the tools themselves; the last checks temporary Clay fixture cleanup and signal handling without a ship.
66- `tools/testdata/selftest` (22 checks), `tools/testdata/ship-selftest` and `tools/testdata/clay-fixtures-selftest` test the tools themselves; the last checks temporary Clay fixture cleanup and signal handling without a ship.
45- 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.
67- 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.
46- 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).
68- 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).
@@ -117,27 +139,55 @@ Besides the plan's list:
117| 413b12b | 2026-10-31 | Propagate known result context into generic calls and batch ship deletions |
139| 413b12b | 2026-10-31 | Propagate known result context into generic calls and batch ship deletions |
118| c690076 | 2026-10-31 | Propagate loobean context, infer predicate helpers, and import named ordered-map operands |
140| c690076 | 2026-10-31 | Propagate loobean context, infer predicate helpers, and import named ordered-map operands |
119| 0bf6178 | 2026-10-31 | Bridge recursive Tlon lists and prepare a private comparison interface |
141| 0bf6178 | 2026-10-31 | Bridge recursive Tlon lists and prepare a private comparison interface |
120−| This change | 2026-10-31 | Pass known named unions through polymorphic gates |
142+| 4e472b5 | 2026-10-31 | Pass known named unions through polymorphic gates |
143+| e3e184f | 2026-10-31 | Parse type holes, reject duplicate written record fields, and extend partial union inference and imports |
144+| 80e221a | 2026-10-31 | Infer supported annotation holes and prelude list aliases |
145+| ba1fec4 | 2026-10-31 | Add the curried `bond` prelude gate |
146+| 0ea700d | 2026-10-31 | Infer a source-defined recursive `qath` subset and record the explicit `proj` decision |
147+| 75f5952 | 2026-10-31 | Check a subset of explicit `proj` calls and retain their lowering evidence |
148+| cf17925 | 2026-10-31 | Infer supported single-field projections |
149+| 1a891e2 | 2026-10-31 | Infer source-backed addition and decrement without loobean operands; record the watchability decision |
150+| 81af5fd | 2026-10-31 | Preserve public names of identity-generic union aliases and record the `like` decision |
151+| 640a442 | 2026-10-31 | Add the source-backed `like` result mapper and infer supported positional calls |
152+| 445a0a1 | 2026-10-31 | Retain source-backed API path evidence and classify declarations |
153+| f69493d | 2026-10-31 | Derive supported request components from API declarations |
154+| f0f6954 | 2026-10-31 | Analyze supported API helper definitions and declared marks |
155+| 3f55af7 | 2026-10-31 | Define source-backed transparent ask and pure |
156+| ae1ec26 | 2026-10-31 | Prove selected default-wrapped Hoon unions from source |
157+| dde791c | 2026-10-31 | Infer a source-backed request-gate type through ordinary imports |
158+| a1c5f35 | 2026-10-31 | Infer supported multi-path requests and named closed folds |
159+| 911ca0c | 2026-10-31 | Propagate union context, define subscriptions and match literal nouns |
160+| 72acdb3 | 2026-10-31 | Infer selected nested union payloads from context |
161+| This change | 2026-10-31 | Analyze gate-free source molds with field witnesses |
121
162
122## Checking it
163## Checking it
123
164
124On a machine set up as [development.md](development.md) says:
165On a machine set up as [development.md](development.md) says:
125
166
126```
167```
127−tools/golden # 574 cases under urbit eval
168+tools/golden # 649 cases under urbit eval
128tools/importer-test # the Hoon importer fixture projection
169tools/importer-test # the Hoon importer fixture projection
170+tools/type-import-default-test # default-wrapped source proof golden
129tools/type-import-test # the importer/checker bridge fixture
171tools/type-import-test # the importer/checker bridge fixture
130tools/type-tlon-test # the real Tlon reader/checker fixture
172tools/type-tlon-test # the real Tlon reader/checker fixture
131tools/type-mark-test # the mark/checker bridge fixture
173tools/type-mark-test # the mark/checker bridge fixture
132tools/type-poke-test # the source-backed poke/API fixture
174tools/type-poke-test # the source-backed poke/API fixture
175+tools/type-api-evidence-test # API declaration evidence guards
133tools/type-api-paths-test # partial API path metadata fixture
176tools/type-api-paths-test # partial API path metadata fixture
177+tools/type-hole-guards-test # hole defaulting and API interface guards
178+tools/type-list-alias-test # prelude list-alias guards
179+tools/type-generic-alias-test # generic union alias guards
180+tools/type-positional-face-guards-test # positional sample face guards
181+tools/type-qath-guards-test # qath source and unfolding guards
182+tools/type-ask-guards-test # ask source and bootstrap guards
183+tools/type-proj-guards-test # projection evidence and scope guards
134tools/type-module-scope-test # module and prelude scope fixture
184tools/type-module-scope-test # module and prelude scope fixture
135tools/hoon check-spans-test # prints <<>> when the span checker works
185tools/hoon check-spans-test # prints <<>> when the span checker works
136tools/testdata/selftest # the tools themselves
186tools/testdata/selftest # the tools themselves
137tools/doc-blocks docs/spec # the doc's examples are golden cases
187tools/doc-blocks docs/spec # the doc's examples are golden cases
138tools/ship start
188tools/ship start
139tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
189tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
140−tools/ship test # the same 574 cases as -test arms on the ship
190+tools/ship test # the same 649 cases as -test arms on the ship
141tools/testdata/ship-selftest
191tools/testdata/ship-selftest
142tools/testdata/clay-fixtures-selftest # scratch fixture cleanup without a ship
192tools/testdata/clay-fixtures-selftest # scratch fixture cleanup without a ship
143tools/ship check-commit # |commit stores .jibb files
193tools/ship check-commit # |commit stores .jibb files
jibb-dev/lib/jibb-import.hoon+63−10
@@ -8,7 +8,8 @@
8:: Hoon's %hold nodes retain the generator's Hoon and its bound arguments.
8:: Hoon's %hold nodes retain the generator's Hoon and its bound arguments.
9:: Comparing that Hoon to the standard generators identifies collections
9:: Comparing that Hoon to the standard generators identifies collections
10:: before they expand into trees. Recursive holds are tracked by identity;
10:: before they expand into trees. Recursive holds are tracked by identity;
11−:: a repeated named hold becomes a module-qualified reference.
11+:: a repeated named hold becomes a module-qualified reference. A proven
12+:: nested self-recursive tagged union retains its own named boundary.
12::
13::
13:: A direct $^ is read from its original branches and accepted only when
14:: A direct $^ is read from its original branches and accepted only when
14:: their imported shapes prove disjoint. A single nested $^ in a
15:: their imported shapes prove disjoint. A single nested $^ in a
@@ -38,6 +39,7 @@
38 [%cell head=imported tail=imported]
39 [%cell head=imported tail=imported]
39 [%face name=term body=imported]
40 [%face name=term body=imported]
40 [%fork cases=(list imported)]
41 [%fork cases=(list imported)]
42+ [%named module=term name=term body=imported]
41 [%apply name=term args=(list imported)]
43 [%apply name=term args=(list imported)]
42 [%ref module=term name=term]
44 [%ref module=term name=term]
43 [%bad reason=@t]
45 [%bad reason=@t]
@@ -149,16 +151,27 @@
149 ?: =(left 0) ~
151 ?: =(left 0) ~
150 $(raw u.wrapper, left (dec left))
152 $(raw u.wrapper, left (dec left))
151::
153::
154+:: A bounded $~ source wrapper changes the default, not the mold.
155+:: Each annotation chain and default chain is separately bounded.
156+++ tagged-default-union
157+ |= [body=spec left=@ud]
158+ ^- (unit spec)
159+ =/ plain=(unit *) (source-unwrap body 4)
160+ ?~ plain ~
161+ =. body ;;(spec u.plain)
162+ ?. ?=([%bcsg *] body) `body
163+ ?: =(left 0) ~
164+ $(body q.body, left (dec left))
165+::
152++ tagged-source-code
166++ tagged-source-code
153 |= [code=hoon name=term]
167 |= [code=hoon name=term]
154 ^- (unit (list tagged-case))
168 ^- (unit (list tagged-case))
155 =/ found=(unit spec) (local-mold-spec code name)
169 =/ found=(unit spec) (local-mold-spec code name)
156 ?~ found ~
170 ?~ found ~
157− =/ plain=(unit *) (source-unwrap u.found 4)
171+ =/ body=(unit spec) (tagged-default-union u.found 4)
158− ?~ plain ~
172+ ?~ body ~
159− =/ body=spec ;;(spec u.plain)
160− ?. ?=([%bccn *] body) ~
173+ ?. ?=([%bccn *] u.body) ~
161− =/ cases=(list spec) p.body
174+ =/ cases=(list spec) p.u.body
162 ?~ cases ~
175 ?~ cases ~
163 ?~ t.cases ~
176 ?~ t.cases ~
164 (tagged-cases cases ~)
177 (tagged-cases cases ~)
@@ -213,12 +226,19 @@
213++ safe-source-name-mode
226++ safe-source-name-mode
214 |= [name=term cor=type seen=(list term) fuel=@ud allow-nested=?]
227 |= [name=term cor=type seen=(list term) fuel=@ud allow-nested=?]
215 ^- (unit @ud)
228 ^- (unit @ud)
216− :: A direct revisit of the selected root is a recursive reference.
229+ :: Permit a direct root revisit or one proven nested self-revisit.
217− :: Other cycles and inherited same-name bindings remain unavailable.
230+ :: Mutual cycles and inherited same-name bindings remain unavailable.
218 ?: (lien seen |=(x=term =(name x)))
231 ?: (lien seen |=(x=term =(name x)))
219− ?. =(seen ~[name]) ~
220 ?. ?=([%core *] cor) ~
232 ?. ?=([%core *] cor) ~
221 ?. (scope-safe p.cor name) ~
233 ?. (scope-safe p.cor name) ~
234+ ?: =(seen ~[name]) `fuel
235+ ?. allow-nested ~
236+ ?. ?=([* [* ~]] seen) ~
237+ ?. =(i.seen name) ~
238+ =/ selected=(unit hoon) (local-arm-source cor name)
239+ ?~ selected ~
240+ =/ cases=(unit (list tagged-case)) (tagged-source-code u.selected name)
241+ ?~ cases ~
222 `fuel
242 `fuel
223 =/ arm=(unit hoon) (local-arm-source cor name)
243 =/ arm=(unit hoon) (local-arm-source cor name)
224 ?~ arm
244 ?~ arm
@@ -241,6 +261,7 @@
241 ?+ shape ~
261 ?+ shape ~
242 [%base *] ?:(|(?=([%atom *] p.shape) =(%flag p.shape) =(%null p.shape)) `fuel ~)
262 [%base *] ?:(|(?=([%atom *] p.shape) =(%flag p.shape) =(%null p.shape)) `fuel ~)
243 [%leaf *] `fuel
263 [%leaf *] `fuel
264+ [%bcsg *] $(shape q.shape)
244 [%bcts *] ?@ p.shape $(shape q.shape)
265 [%bcts *] ?@ p.shape $(shape q.shape)
245 ~
266 ~
246 [%bccl *] (safe-source-specs-mode p.shape cor seen fuel allow-nested)
267 [%bccl *] (safe-source-specs-mode p.shape cor seen fuel allow-nested)
@@ -383,6 +404,7 @@
383 ^- ?
404 ^- ?
384 ?- node
405 ?- node
385 [%ref *] &
406 [%ref *] &
407+ [%named *] $(node body.node)
386 [%face *] $(node body.node)
408 [%face *] $(node body.node)
387 [%cell *] |($(node head.node) $(node tail.node))
409 [%cell *] |($(node head.node) $(node tail.node))
388 [%fork *] (lien cases.node |=(child=imported (mark-has-ref child)))
410 [%fork *] (lien cases.node |=(child=imported (mark-has-ref child)))
@@ -901,6 +923,8 @@
901 ^- ?
923 ^- ?
902 ?: ?=([%face *] a) $(a body.a)
924 ?: ?=([%face *] a) $(a body.a)
903 ?: ?=([%face *] b) $(b body.b)
925 ?: ?=([%face *] b) $(b body.b)
926+ ?: ?=([%named *] a) $(a body.a)
927+ ?: ?=([%named *] b) $(b body.b)
904 ?: ?=([%fork *] a)
928 ?: ?=([%fork *] a)
905 (levy cases.a |=(item=imported (disjoint item b)))
929 (levy cases.a |=(item=imported (disjoint item b)))
906 ?: ?=([%fork *] b)
930 ?: ?=([%fork *] b)
@@ -1301,6 +1325,20 @@
1301 ?. ?=([%& [%fork *]] u.p.attempt) ~
1325 ?. ?=([%& [%fork *]] u.p.attempt) ~
1302 `p.u.p.attempt
1326 `p.u.p.attempt
1303::
1327::
1328+:: Keep the proven owner boundary when a nested union refers to itself.
1329+++ contains-named-ref
1330+ |= [node=imported module=term name=term]
1331+ ^- ?
1332+ ?- node
1333+ [%ref *] &(=(module module.node) =(name name.node))
1334+ [%named *] |
1335+ [%face *] $(node body.node)
1336+ [%cell *] |($(node head.node) $(node tail.node))
1337+ [%fork *] (lien cases.node |=(child=imported (contains-named-ref child module name)))
1338+ [%apply *] (lien args.node |=(child=imported (contains-named-ref child module name)))
1339+ * |
1340+ ==
1341+::
1304++ walk
1342++ walk
1305 |= [module=term typ=type sig=signatures seen=visiting context=(unit type)]
1343 |= [module=term typ=type sig=signatures seen=visiting context=(unit type)]
1306 ^- imported
1344 ^- imported
@@ -1332,7 +1370,12 @@
1332 ?~ origin [%bad 'a recursive Hoon mold needs unambiguous source provenance']
1370 ?~ origin [%bad 'a recursive Hoon mold needs unambiguous source provenance']
1333 [%ref u.origin u.u.prior]
1371 [%ref u.origin u.u.prior]
1334 =/ nested=(unit imported) (nested-tagged-union module typ context)
1372 =/ nested=(unit imported) (nested-tagged-union module typ context)
1335− ?^ nested u.nested
1373+ ?^ nested
1374+ ?: ?=(~ seen) u.nested
1375+ =/ name=(unit term) (hold-name q.typ)
1376+ ?~ name u.nested
1377+ ?. (contains-named-ref u.nested module u.name) u.nested
1378+ [%named module u.name u.nested]
1336 ?: &(?=([%tsls [%note * *] *] q.typ) |((has-spec-cell-union q.typ) (has-spec-general-union q.typ)))
1379 ?: &(?=([%tsls [%note * *] *] q.typ) |((has-spec-cell-union q.typ) (has-spec-general-union q.typ)))
1337 =/ nm (hold-name q.typ)
1380 =/ nm (hold-name q.typ)
1338 (collection-union typ module sig [[typ nm] seen] context)
1381 (collection-union typ module sig [[typ nm] seen] context)
@@ -1454,6 +1497,7 @@
1454 [%bad *] [~ reason.out]
1497 [%bad *] [~ reason.out]
1455 [%invalid *] [~ reason.out]
1498 [%invalid *] [~ reason.out]
1456 [%face *] $(out body.out)
1499 [%face *] $(out body.out)
1500+ [%named *] $(out body.out)
1457 [%cell *]
1501 [%cell *]
1458 =/ err $(out head.out)
1502 =/ err $(out head.out)
1459 ?~ err $(out tail.out)
1503 ?~ err $(out tail.out)
@@ -1481,6 +1525,7 @@
1481 [%bad *] `[%unsupported reason.out]
1525 [%bad *] `[%unsupported reason.out]
1482 [%invalid *] `[%invalid code.out reason.out]
1526 [%invalid *] `[%invalid code.out reason.out]
1483 [%face *] $(out body.out)
1527 [%face *] $(out body.out)
1528+ [%named *] $(out body.out)
1484 [%cell *]
1529 [%cell *]
1485 =/ first $(out head.out)
1530 =/ first $(out head.out)
1486 ?~ first $(out tail.out)
1531 ?~ first $(out tail.out)
@@ -1633,6 +1678,7 @@
1633 [%cell *] "[{(show-import head.out)} {(show-import tail.out)}]"
1678 [%cell *] "[{(show-import head.out)} {(show-import tail.out)}]"
1634 [%face *] "{(trip name.out)}={(show-import body.out)}"
1679 [%face *] "{(trip name.out)}={(show-import body.out)}"
1635 [%fork *] "(union {(show-imports cases.out)})"
1680 [%fork *] "(union {(show-imports cases.out)})"
1681+ [%named *] "(named {(trip name.out)}.{(trip module.out)} {(show-import body.out)})"
1636 [%apply *] "({(trip name.out)} {(show-imports args.out)})"
1682 [%apply *] "({(trip name.out)} {(show-imports args.out)})"
1637 [%ref *] "{(trip name.out)}.{(trip module.out)}"
1683 [%ref *] "{(trip name.out)}.{(trip module.out)}"
1638 [%bad *] "error: {(trip reason.out)}"
1684 [%bad *] "error: {(trip reason.out)}"
@@ -2033,6 +2079,13 @@
2033 (crip "tag-nest-hidden: {(show-result (sample %tag-nest-hidden))}")
2079 (crip "tag-nest-hidden: {(show-result (sample %tag-nest-hidden))}")
2034 (crip "tag-nest-overlap: {(show-result (sample %tag-nest-overlap))}")
2080 (crip "tag-nest-overlap: {(show-result (sample %tag-nest-overlap))}")
2035 (crip "tag-nest-recursive: {(show-result (sample %tag-nest-recursive-outer))}")
2081 (crip "tag-nest-recursive: {(show-result (sample %tag-nest-recursive-outer))}")
2082+ (crip "tag-nest-rec-list: {(show-result (sample %tag-nest-rec-list-outer))}")
2083+ (crip "tag-nest-rec-repeat: {(show-result (sample %tag-nest-rec-repeat))}")
2084+ (crip "tag-nest-rec-duplicate: {(show-result (sample %tag-nest-rec-bad-outer))}")
2085+ (crip "tag-nest-rec-hidden: {(show-result (sample %tag-nest-rec-hidden-outer))}")
2086+ (crip "tag-nest-rec-mutual: {(show-result (sample %tag-nest-rec-mutual-outer))}")
2087+ (crip "tag-nest-rec-outer-overlap: {(show-result (sample %tag-nest-rec-outer-overlap))}")
2088+ (crip "tag-nest-rec-owner: {?:(&((contains-named-ref [%ref %small %tag-self] %small %tag-self) !(contains-named-ref [%named %small %other [%ref %small %tag-self]] %small %tag-self)) "yes" "wrong")}")
2036 (crip "tag-nest-many: {(show-result (sample %tag-nest-many))}")
2089 (crip "tag-nest-many: {(show-result (sample %tag-nest-many))}")
2037 (crip "tag-nest-shadow: {(show-result (read-named %shadow-static %tag-nest-shadow xc))}")
2090 (crip "tag-nest-shadow: {(show-result (read-named %shadow-static %tag-nest-shadow xc))}")
2038 (crip "tag-nest-wrong-hold: {?~((nested-tagged-union %small (~(play ut other) (ream '*chain')) `sc) "unsupported" "BAD")}")
2091 (crip "tag-nest-wrong-hold: {?~((nested-tagged-union %small (~(play ut other) (ream '*chain')) `sc) "unsupported" "BAD")}")
jibb-dev/lib/jibb.hoon+2265−141
@@ -874,7 +874,7 @@
874 %'~[' %'|=(' %'$-(' :: openers
874 %'~[' %'|=(' %'$-(' :: openers
875 %'%/' %'/' :: paths
875 %'%/' %'/' :: paths
876 %'+' %'`' %'=' :: pair, unit, face
876 %'+' %'`' %'=' :: pair, unit, face
877− %'*' %'?' :: noun, loobean mold
877+ %'*' %'?' %'_' :: noun, loobean, type hole
878 %'++' %'+$' %'|=' %'|$' :: runes
878 %'++' %'+$' %'|=' %'|$' :: runes
879 %'^-' %'~&' %'?-' %'!!' :: runes
879 %'^-' %'~&' %'?-' %'!!' :: runes
880 %'/-' %'/%' %'/=' :: imports
880 %'/-' %'/%' %'/=' :: imports
@@ -1016,6 +1016,7 @@
1016 [%const at=span =lit] :: ~ %add %.y
1016 [%const at=span =lit] :: ~ %add %.y
1017 [%ref at=span names=(list term)] :: state item.todo
1017 [%ref at=span names=(list term)] :: state item.todo
1018 [%tvar at=span name=@t] :: M
1018 [%tvar at=span name=@t] :: M
1019+ [%hole at=span ~] :: _
1019 [%path at=span segs=(list pseg)] :: / /todos /todo/[id=@ud]
1020 [%path at=span segs=(list pseg)] :: / /todos /todo/[id=@ud]
1020 [%apply at=span ref=(list term) args=(list shape)] :: (list @t)
1021 [%apply at=span ref=(list term) args=(list shape)] :: (list @t)
1021 [%cell at=span fields=(list field)] :: [text=@t done=?]
1022 [%cell at=span fields=(list field)] :: [text=@t done=?]
@@ -1024,9 +1025,9 @@
1024 [%generic at=span vars=(list @t) body=shape] :: +$ name |$ [M] …
1025 [%generic at=span vars=(list @t) body=shape] :: +$ name |$ [M] …
1025 ==
1026 ==
1026::
1027::
1027−:: +pseg: a path mold's segment, a knot or [name=aura]
1028+:: +pseg: a path mold's segment, a knot, [name=aura], or [name=_]
1028::
1029::
1029−+$ pseg $%([%knot p=@ta] [%typed at=span name=term aura=@ta])
1030++$ pseg $%([%knot p=@ta] [%typed at=span name=term aura=@ta] [%inferred at=span name=term hole-at=span])
1030::
1031::
1031+| %api
1032+| %api
1032::
1033::
@@ -1295,6 +1296,7 @@
1295 (emit 1 %'=')
1296 (emit 1 %'=')
1296 ?: =('`' a) (emit 1 %'`')
1297 ?: =('`' a) (emit 1 %'`')
1297 ?: =('*' a) (emit 1 %'*')
1298 ?: =('*' a) (emit 1 %'*')
1299+ ?: =('_' a) (emit 1 %'_')
1298 ?: =('~' a)
1300 ?: =('~' a)
1299 ?: =('[' b) (emit 2 %'~[')
1301 ?: =('[' b) (emit 2 %'~[')
1300 ?: =('&' b) (emit 2 %'~&')
1302 ?: =('&' b) (emit 2 %'~&')
@@ -1670,14 +1672,14 @@
1670:: What may begin each place the parser reads (section 3, Errors):
1672:: What may begin each place the parser reads (section 3, Errors):
1671:: an expression a-z 0-9 " ( [ ~ % / ` | ^ ? !
1673:: an expression a-z 0-9 " ( [ ~ % / ` | ^ ? !
1672:: an operand a-z 0-9 " ( [ ~ % / ` | !
1674:: an operand a-z 0-9 " ( [ ~ % / ` | !
1673−:: a mold a-z A-Z @ * ! ? ~ % / ( [ $
1675+:: a mold a-z A-Z @ * ! ? ~ % / ( [ $ _
1674:: a pattern a-z 0-9 " ~ % * [
1676:: a pattern a-z 0-9 " ~ % * [
1675:: and what may go tight after an operand: . ( + = after a name, a
1677:: and what may go tight after an operand: . ( + = after a name, a
1676:: closer ) ] }, or the : of a comment
1678:: closer ) ] }, or the : of a comment
1677::
1679::
1678++ expr-mask 0x57ff.ffff.4800.0000.83ff.8126.0000.0000
1680++ expr-mask 0x57ff.ffff.4800.0000.83ff.8126.0000.0000
1679++ operand-mask 0x57ff.ffff.0800.0000.03ff.8126.0000.0000
1681++ operand-mask 0x57ff.ffff.0800.0000.03ff.8126.0000.0000
1680−++ mold-mask 0x47ff.fffe.0fff.ffff.8000.8532.0000.0000
1682+++ mold-mask 0x47ff.fffe.8fff.ffff.8000.8532.0000.0000
1681++ bar-mask 0x1000.0000.0000.0000.0000.0000.0000.0000
1683++ bar-mask 0x1000.0000.0000.0000.0000.0000.0000.0000
1682++ pattern-mask 0x47ff.fffe.0800.0000.03ff.0424.0000.0000
1684++ pattern-mask 0x47ff.fffe.0800.0000.03ff.0424.0000.0000
1683++ after-mask 0x2000.0000.2000.0000.2400.4b00.0000.0000
1685++ after-mask 0x2000.0000.2000.0000.2400.4b00.0000.0000
@@ -2107,6 +2109,7 @@
2107 ?- -.s
2109 ?- -.s
2108 %knot (weld "/" (trip p.s))
2110 %knot (weld "/" (trip p.s))
2109 %typed "/[{(trip name.s)}=@{(trip aura.s)}]"
2111 %typed "/[{(trip name.s)}=@{(trip aura.s)}]"
2112+ %inferred "/[{(trip name.s)}=_]"
2110 ==
2113 ==
2111::
2114::
2112++ show-tvars
2115++ show-tvars
@@ -2318,6 +2321,7 @@
2318 %const (nod "const" at.s (show-lit lit.s) ~)
2321 %const (nod "const" at.s (show-lit lit.s) ~)
2319 %ref (nod "ref" at.s (show-names names.s) ~)
2322 %ref (nod "ref" at.s (show-names names.s) ~)
2320 %tvar (nod "tvar" at.s (trip name.s) ~)
2323 %tvar (nod "tvar" at.s (trip name.s) ~)
2324+ %hole (nod "hole" at.s "" ~)
2321 %path (nod "path" at.s (show-psegs segs.s) ~)
2325 %path (nod "path" at.s (show-psegs segs.s) ~)
2322 %apply (nod "apply" at.s (show-names ref.s) (turn args.s sexp-shape))
2326 %apply (nod "apply" at.s (show-names ref.s) (turn args.s sexp-shape))
2323 %cell (nod "cell" at.s "" (turn fields.s sexp-field))
2327 %cell (nod "cell" at.s "" (turn fields.s sexp-field))
@@ -3842,6 +3846,7 @@
3842 %'*' [%& [%noun at.t ~] t.ts]
3846 %'*' [%& [%noun at.t ~] t.ts]
3843 %'!!' [%& [%void at.t ~] t.ts]
3847 %'!!' [%& [%void at.t ~] t.ts]
3844 %'?' [%& [%flag at.t ~] t.ts]
3848 %'?' [%& [%flag at.t ~] t.ts]
3849+ %'_' [%& [%hole at.t ~] t.ts]
3845 [%name *] [%& [%ref at.t ~[p.lex.t]] t.ts]
3850 [%name *] [%& [%ref at.t ~[p.lex.t]] t.ts]
3846 [%wing *] [%& [%ref at.t p.lex.t] t.ts]
3851 [%wing *] [%& [%ref at.t p.lex.t] t.ts]
3847 [%tvar *] [%& [%tvar at.t p.lex.t] t.ts]
3852 [%tvar *] [%& [%tvar at.t p.lex.t] t.ts]
@@ -4058,7 +4063,7 @@
4058 ?: &(?=(^ nex) tight.i.nex) (bad nex "a path segment")
4063 ?: &(?=(^ nex) tight.i.nex) (bad nex "a path segment")
4059 (bad-space i.after nex "a path segment")
4064 (bad-space i.after nex "a path segment")
4060 ::
4065 ::
4061− :: +read-pseg: a path mold's segment, a knot or [name=aura] with no
4066+ :: +read-pseg: a path mold's knot, [name=aura], or [name=_] with no
4062 :: spaces, and where it ends
4067 :: spaces, and where it ends
4063 ::
4068 ::
4064 ++ read-pseg
4069 ++ read-pseg
@@ -4075,13 +4080,16 @@
4075 ?: |(?=(~ r2) !tight.i.r2) (bad-space i.r1 r2 "`=`")
4080 ?: |(?=(~ r2) !tight.i.r2) (bad-space i.r1 r2 "`=`")
4076 ?. ?=([[* * %'='] *] r2) (bad-in r2 "`=`" tis-mask)
4081 ?. ?=([[* * %'='] *] r2) (bad-in r2 "`=`" tis-mask)
4077 =/ r3=(list token) t.r2
4082 =/ r3=(list token) t.r2
4078− ?: |(?=(~ r3) !tight.i.r3) (bad-space i.r2 r3 "an aura")
4083+ ?: |(?=(~ r3) !tight.i.r3) (bad-space i.r2 r3 "an aura or type hole")
4079− ?. ?=([[* * [%aura *]] *] r3) (bad-in r3 "an aura" pat-mask)
4084+ ?. ?=([[* * ?([%aura *] %'_')] *] r3) (bad-in r3 "an aura or type hole" (con pat-mask (bex 95)))
4080 =/ r4=(list token) t.r3
4085 =/ r4=(list token) t.r3
4081 ?: |(?=(~ r4) !tight.i.r4) (bad-space i.r3 r4 "`]`")
4086 ?: |(?=(~ r4) !tight.i.r4) (bad-space i.r3 r4 "`]`")
4082 ?. ?=([[* * %']'] *] r4) (bad-in r4 "`]`" ser-mask)
4087 ?. ?=([[* * %']'] *] r4) (bad-in r4 "`]`" ser-mask)
4083 =/ at=span [beg.at.op end.at.i.r4]
4088 =/ at=span [beg.at.op end.at.i.r4]
4089+ =/ seg=pseg
4090+ ?: ?=(%'_' lex.i.r3) [%inferred at p.lex.i.r1 at.i.r3]
4084− [%& [[%typed at p.lex.i.r1 p.lex.i.r3] end.at.i.r4] t.r4]
4091+ [%typed at p.lex.i.r1 p.lex.i.r3]
4092+ [%& [seg end.at.i.r4] t.r4]
4085 --
4093 --
4086::
4094::
4087+| %span-check
4095+| %span-check
@@ -4465,6 +4473,7 @@
4465 %const [%const at.s ~[%lit] %one ~]
4473 %const [%const at.s ~[%lit] %one ~]
4466 %ref [%ref at.s ~[%name %wing] %one ~]
4474 %ref [%ref at.s ~[%name %wing] %one ~]
4467 %tvar [%tvar at.s ~[%tvar] %one ~]
4475 %tvar [%tvar at.s ~[%tvar] %one ~]
4476+ %hole [%hole at.s ~[%'_'] %one ~]
4468 %apply [%apply at.s ~[%'('] %shut (turn args.s outline-shape)]
4477 %apply [%apply at.s ~[%'('] %shut (turn args.s outline-shape)]
4469 %cell [%cell at.s ~[%'['] %shut (turn fields.s outline-sample)]
4478 %cell [%cell at.s ~[%'['] %shut (turn fields.s outline-sample)]
4470 ::
4479 ::
@@ -4473,8 +4482,11 @@
4473 %+ murn segs.s
4482 %+ murn segs.s
4474 |= g=pseg
4483 |= g=pseg
4475 ^- (unit outline)
4484 ^- (unit outline)
4485+ ?- -.g
4486+ %knot ~
4476− ?. ?=(%typed -.g) ~
4487+ %typed `[%typed at.g ~[%'['] %shut ~]
4477− `[%typed at.g ~[%'['] %shut ~]
4488+ %inferred `[%typed at.g ~[%'['] %shut ~[[%hole hole-at.g ~[%'_'] %one ~]]]
4489+ ==
4478 [%path at.s ~[%'/'] %run ks]
4490 [%path at.s ~[%'/'] %run ks]
4479 ::
4491 ::
4480 %union
4492 %union
@@ -4534,6 +4546,8 @@
4534 [%path [1 9] [1 9] [1 21]]
4546 [%path [1 9] [1 9] [1 21]]
4535 [%face [1 7] [1 7] [1 21]]
4547 [%face [1 7] [1 7] [1 21]]
4536 ==
4548 ==
4549+ :: an inferred path aura's hole spanning its = as well
4550+ ['+$ x /a/[id=_]' ~[[%hole [1 13] [1 12] [1 14]]]]
4537 :: an import's path cut short
4551 :: an import's path cut short
4538 ['/= c /ui/c' ~[[%jibb [1 1] [1 1] [1 11]]]]
4552 ['/= c /ui/c' ~[[%jibb [1 1] [1 1] [1 11]]]]
4539 :: brackets that close with the deeper lines, cut at their line's
4553 :: brackets that close with the deeper lines, cut at their line's
@@ -4600,11 +4614,53 @@
4600:: from their display name. Generic cases must be disjoint for all arguments.
4614:: from their display name. Generic cases must be disjoint for all arguments.
4601:: Unnamed union printing is informational; it is not Jibb syntax.
4615:: Unnamed union printing is informational; it is not Jibb syntax.
4602::
4616::
4617+:: `proj` is a reserved, type-directed operation, not an ordinary gate.
4618+:: The supported fragment selects uniquely faced fields from a known record
4619+:: in source order (reordering is a doc question). It records the original
4620+:: call, source and target types, and source axes with its definition;
4621+:: A single selected field keeps its face and uses one source axis.
4622+:: Checked module interfaces retain that evidence and their source, including
4623+:: the private prelude dependency. A later lowerer must replace the call by
4624+:: an inline gate applied to the operand once; no lowering is implemented yet.
4625+:: Ordinary fits never insert a projection. Unknown or variable-origin record
4626+:: spines, nested projected fields and projections in
4627+:: recursive groups remain unsupported. Directional fits bound faced-spine
4628+:: proofs to fewer than 1,024 cells; the projection planner has a separate
4629+:: 4,096-step bound. These are inference limits, not language limits.
4630+::
4631+:: Supported API imports derive request-gate types atomically for multiple
4632+:: paths, including one typed segment or one diff fold per case. Their checked
4633+:: ordinary definitions, mark molds and supported poke constructor are also
4634+:: exported. A selected /sur mold is checked through its trusted reader result;
4635+:: unused cores and other bindings are not independently validated. APIs
4636+:: with /= imports, separate scry paths, multiple parameters or diffs, or a
4637+:: parameter together with a fold remain unsupported. The unchanged todo API
4638+:: fits this fragment, including named closed fold gates.
4639+::
4640+:: Each case's source-derived schema and canonical API identity travel in a
4641+:: dependency closure bound to the exact supplied bundle, prelude, scope and
4642+:: trusted reader results. Unknown cached entries are rebuilt. Request-bearing
4643+:: closures are limited to 256 source paths and requests. This is type
4644+:: inference only: no request lowering, runtime schema validator or proof that
4645+:: an arbitrary ask value is watchable is supplied.
4646+::
4647+:: A closed gate sample may omit one outer face from a known input slot when
4648+:: its product is identical. Distinct written names, nested value faces,
4649+:: ambiguous cell tails and raw-variable-origin fits retain their prior rules.
4650+::
4651+:: In one synthetic eval of a 48-module deep and 48-module wide request-free
4652+:: graph, baseline versus certificate inference took 21.53 s versus 23.10 s
4653+:: elapsed (21.10 s versus 22.34 s CPU), including startup. The deep cache's
4654+:: jam grew from 2,402 to 4,209 bytes (+1,807 bytes). These single-run figures
4655+:: are not production memory or performance benchmarks.
4656+::
4603+$ itype
4657+$ itype
4604 $~ [%var 0]
4658 $~ [%var 0]
4605 $% [%var id=@ud]
4659 $% [%var id=@ud]
4606 [%avar id=@ud]
4660 [%avar id=@ud]
4661+ [%rvar id=@ud]
4607 [%nvar id=@ud]
4662 [%nvar id=@ud]
4663+ [%rnvar id=@ud]
4608 [%atom aura=@ta]
4664 [%atom aura=@ta]
4609 [%any-atom ~]
4665 [%any-atom ~]
4610 [%flag ~]
4666 [%flag ~]
@@ -4613,6 +4669,7 @@
4613 [%const literal=lit]
4669 [%const literal=lit]
4614 [%collection name=term args=(list itype)]
4670 [%collection name=term args=(list itype)]
4615 [%recursive module=term name=term label=(unit @t)]
4671 [%recursive module=term name=term label=(unit @t)]
4672+ [%jrec at=path name=term label=(unit @t) head=term aura=@ta tail=term]
4616 [%union cases=(list itype) origin=(unit [at=path name=term]) label=(unit @t) args=(list itype)]
4673 [%union cases=(list itype) origin=(unit [at=path name=term]) label=(unit @t) args=(list itype)]
4617 [%face name=term body=itype]
4674 [%face name=term body=itype]
4618 [%fn sample=itype product=itype]
4675 [%fn sample=itype product=itype]
@@ -4636,18 +4693,32 @@
4636 %var
4693 %var
4637 =/ found=(unit itype) (itype-lookup id.t sub)
4694 =/ found=(unit itype) (itype-lookup id.t sub)
4638 ?~ found t
4695 ?~ found t
4696+ ?: &(|(?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4639 $(t u.found)
4697 $(t u.found)
4640 %avar
4698 %avar
4641 =/ found=(unit itype) (itype-lookup id.t sub)
4699 =/ found=(unit itype) (itype-lookup id.t sub)
4642 ?~ found t
4700 ?~ found t
4701+ ?: &(|(?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4702+ $(t u.found)
4703+ %rvar
4704+ =/ found=(unit itype) (itype-lookup id.t sub)
4705+ ?~ found t
4706+ ?: &(|(?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4643 $(t u.found)
4707 $(t u.found)
4644 %nvar
4708 %nvar
4645 =/ found=(unit itype) (itype-lookup id.t sub)
4709 =/ found=(unit itype) (itype-lookup id.t sub)
4646 ?~ found t
4710 ?~ found t
4711+ ?: &(|(?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4712+ $(t u.found)
4713+ %rnvar
4714+ =/ found=(unit itype) (itype-lookup id.t sub)
4715+ ?~ found t
4716+ ?: &(|(?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4647 $(t u.found)
4717 $(t u.found)
4648 %tag
4718 %tag
4649 =/ found=(unit itype) (itype-lookup id.t sub)
4719 =/ found=(unit itype) (itype-lookup id.t sub)
4650 ?~ found t
4720 ?~ found t
4721+ ?: &(|(?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4651 $(t u.found)
4722 $(t u.found)
4652 ==
4723 ==
4653::
4724::
@@ -4658,7 +4729,9 @@
4658 ?- -.t
4729 ?- -.t
4659 %var =(n id.t)
4730 %var =(n id.t)
4660 %avar =(n id.t)
4731 %avar =(n id.t)
4732+ %rvar =(n id.t)
4661 %nvar =(n id.t)
4733 %nvar =(n id.t)
4734+ %rnvar =(n id.t)
4662 %atom |
4735 %atom |
4663 %any-atom |
4736 %any-atom |
4664 %flag |
4737 %flag |
@@ -4667,6 +4740,7 @@
4667 %const |
4740 %const |
4668 %union |((lien cases.t |=(c=itype (itype-occurs n c sub))) (lien args.t |=(c=itype (itype-occurs n c sub))))
4741 %union |((lien cases.t |=(c=itype (itype-occurs n c sub))) (lien args.t |=(c=itype (itype-occurs n c sub))))
4669 %recursive |
4742 %recursive |
4743+ %jrec |
4670 %collection (lien args.t |=(c=itype (itype-occurs n c sub)))
4744 %collection (lien args.t |=(c=itype (itype-occurs n c sub)))
4671 %face $(t body.t)
4745 %face $(t body.t)
4672 %fn |($(t sample.t) $(t product.t))
4746 %fn |($(t sample.t) $(t product.t))
@@ -4685,6 +4759,8 @@
4685 =. a (itype-walk a sub)
4759 =. a (itype-walk a sub)
4686 =. b (itype-walk b sub)
4760 =. b (itype-walk b sub)
4687 ?: =(a b) `sub
4761 ?: =(a b) `sub
4762+ ?: &(?=(%jrec -.a) ?=(%jrec -.b))
4763+ ?:(&(=(at.a at.b) =(name.a name.b) =(head.a head.b) =(aura.a aura.b) =(tail.a tail.b)) `sub ~)
4688 ?: &(?=(%recursive -.a) ?=(%recursive -.b))
4764 ?: &(?=(%recursive -.a) ?=(%recursive -.b))
4689 ?:(&(=(module.a module.b) =(name.a name.b)) `sub ~)
4765 ?:(&(=(module.a module.b) =(name.a name.b)) `sub ~)
4690 ?: &(?=(%union -.a) ?=(%union -.b))
4766 ?: &(?=(%union -.a) ?=(%union -.b))
@@ -4701,6 +4777,32 @@
4701 ?: ?=(%var -.b)
4777 ?: ?=(%var -.b)
4702 ?: (itype-occurs id.b a sub) ~
4778 ?: (itype-occurs id.b a sub) ~
4703 `[[id.b a] sub]
4779 `[[id.b a] sub]
4780+ :: Arithmetic's aura variable excludes loobeans; decimal literals
4781+ :: remain defaultable until a later constraint makes them concrete.
4782+ ?: &(?=(%nvar -.a) ?=(%rvar -.b))
4783+ `[[id.b [%rnvar id.a]] [id.a [%rnvar id.a]] sub]
4784+ ?: &(?=(%rvar -.a) ?=(%nvar -.b))
4785+ `[[id.a [%rnvar id.b]] [id.b [%rnvar id.b]] sub]
4786+ ?: &(?=(%rnvar -.a) ?=(%rvar -.b)) `[[id.b a] sub]
4787+ ?: &(?=(%rvar -.a) ?=(%rnvar -.b)) `[[id.a b] sub]
4788+ ?: &(?=(%rnvar -.a) ?=(%nvar -.b)) `[[id.b a] sub]
4789+ ?: &(?=(%nvar -.a) ?=(%rnvar -.b)) `[[id.a b] sub]
4790+ ?: &(?=(%rnvar -.a) ?=(%avar -.b)) `[[id.b a] sub]
4791+ ?: &(?=(%avar -.a) ?=(%rnvar -.b)) `[[id.a b] sub]
4792+ ?: ?=(%rnvar -.a)
4793+ ?. |(?=(%rnvar -.b) ?=(%atom -.b)) ~
4794+ `[[id.a b] sub]
4795+ ?: ?=(%rnvar -.b)
4796+ ?. ?=(%atom -.a) ~
4797+ `[[id.b a] sub]
4798+ ?: &(?=(%avar -.a) ?=(%rvar -.b)) `[[id.a b] sub]
4799+ ?: &(?=(%rvar -.a) ?=(%avar -.b)) `[[id.b a] sub]
4800+ ?: ?=(%rvar -.a)
4801+ ?. |(?=(%rvar -.b) ?=(%atom -.b)) ~
4802+ `[[id.a b] sub]
4803+ ?: ?=(%rvar -.b)
4804+ ?. ?=(%atom -.a) ~
4805+ `[[id.b a] sub]
4704 :: The narrower decimal constraint survives a match with an atom
4806 :: The narrower decimal constraint survives a match with an atom
4705 :: variable; decimal syntax alone does not make it a loobean.
4807 :: variable; decimal syntax alone does not make it a loobean.
4706 ?: &(?=(%nvar -.a) ?=(%avar -.b)) `[[id.b a] sub]
4808 ?: &(?=(%nvar -.a) ?=(%avar -.b)) `[[id.b a] sub]
@@ -4755,7 +4857,9 @@
4755 ?- -.t
4857 ?- -.t
4756 %var |
4858 %var |
4757 %avar |
4859 %avar |
4860+ %rvar |
4758 %nvar |
4861 %nvar |
4862+ %rnvar |
4759 %atom |
4863 %atom |
4760 %any-atom &
4864 %any-atom &
4761 %flag |
4865 %flag |
@@ -4764,6 +4868,7 @@
4764 %const |
4868 %const |
4765 %union |((lien cases.t |=(c=itype (itype-has-any-atom c sub))) (lien args.t |=(c=itype (itype-has-any-atom c sub))))
4869 %union |((lien cases.t |=(c=itype (itype-has-any-atom c sub))) (lien args.t |=(c=itype (itype-has-any-atom c sub))))
4766 %recursive |
4870 %recursive |
4871+ %jrec |
4767 %collection (lien args.t |=(c=itype (itype-has-any-atom c sub)))
4872 %collection (lien args.t |=(c=itype (itype-has-any-atom c sub)))
4768 %face $(t body.t)
4873 %face $(t body.t)
4769 %fn |($(t sample.t) $(t product.t))
4874 %fn |($(t sample.t) $(t product.t))
@@ -4826,7 +4931,9 @@
4826 ?- -.typ
4931 ?- -.typ
4827 %var |
4932 %var |
4828 %avar |
4933 %avar |
4934+ %rvar |
4829 %nvar |
4935 %nvar |
4936+ %rnvar |
4830 %atom &
4937 %atom &
4831 %any-atom &
4938 %any-atom &
4832 %flag &
4939 %flag &
@@ -4835,6 +4942,7 @@
4835 %const &
4942 %const &
4836 %union |((lien cases.typ |=(c=itype (itype-has-fixed-atom c))) (lien args.typ |=(c=itype (itype-has-fixed-atom c))))
4943 %union |((lien cases.typ |=(c=itype (itype-has-fixed-atom c))) (lien args.typ |=(c=itype (itype-has-fixed-atom c))))
4837 %recursive |
4944 %recursive |
4945+ %jrec |
4838 %collection (lien args.typ |=(c=itype (itype-has-fixed-atom c)))
4946 %collection (lien args.typ |=(c=itype (itype-has-fixed-atom c)))
4839 %face $(typ body.typ)
4947 %face $(typ body.typ)
4840 %fn |($(typ sample.typ) $(typ product.typ))
4948 %fn |($(typ sample.typ) $(typ product.typ))
@@ -4870,6 +4978,42 @@
4870 * |
4978 * |
4871 ==
4979 ==
4872::
4980::
4981+:: Closed function samples may omit a slot face, but a known name must
4982+:: match another known name. Keep nested value faces and require exact
4983+:: invariant compatibility; a faced tail against a cell is ambiguous.
4984+++ itype-closed-slot-match
4985+ |= [a=itype b=itype]
4986+ ^- ?
4987+ ?: &(?=(%face -.a) ?=(%face -.b))
4988+ ?. =(name.a name.b) |
4989+ ?=(^ (itype-unify body.a body.b ~))
4990+ ?: ?=(%face -.a) ?=(^ (itype-unify body.a b ~))
4991+ ?: ?=(%face -.b) ?=(^ (itype-unify a body.b ~))
4992+ ?=(^ (itype-unify a b ~))
4993+++ itype-closed-sample-match
4994+ |= [a=itype b=itype fuel=@ud]
4995+ ^- ?
4996+ ?: =(0 fuel) |
4997+ ?. &(?=(%cell -.a) ?=(%cell -.b)) |
4998+ ?. (itype-closed-slot-match hed.a hed.b) |
4999+ =/ x=itype tal.a
5000+ =/ y=itype tal.b
5001+ ?: &(?=(%cell -.x) ?=(%cell -.y))
5002+ ?=(^ (itype-unify x y ~))
5003+ ?: |(&(?=(%face -.x) ?=(%cell -.y)) &(?=(%cell -.x) ?=(%face -.y))) |
5004+ (itype-closed-slot-match x y)
5005+++ itype-closed-gates-match
5006+ |= [a=itype b=itype]
5007+ ^- ?
5008+ ?. &(?=(%fn -.a) ?=(%fn -.b)) |
5009+ ?. &(?=(%cell -.sample.a) ?=(%cell -.sample.b)) |
5010+ ?. =(product.a product.b) |
5011+ ?^ (itype-vars a) |
5012+ ?^ (itype-vars b) |
5013+ ?: |((itype-has-tag a) (itype-has-tag b)) |
5014+ ?. (itype-closed-sample-match sample.a sample.b 1.024) |
5015+ ?=(^ (itype-unify product.a product.b ~))
5016+::
4873++ itype-face-asym-collection-args
5017++ itype-face-asym-collection-args
4874 |= [as=(list itype) bs=(list itype) sub=isub]
5018 |= [as=(list itype) bs=(list itype) sub=isub]
4875 ^- ?
5019 ^- ?
@@ -4887,8 +5031,8 @@
4887 ?. =(name.a name.b) |
5031 ?. =(name.a name.b) |
4888 (itype-face-asym-collection-args args.a args.b sub)
5032 (itype-face-asym-collection-args args.a args.b sub)
4889 ?: &(?=(%face -.a) ?=(%face -.b)) $(a body.a, b body.b)
5033 ?: &(?=(%face -.a) ?=(%face -.b)) $(a body.a, b body.b)
4890− ?: ?=(%face -.a) !|(?=(%var -.b) ?=(%avar -.b) ?=(%nvar -.b))
5034+ ?: ?=(%face -.a) !|(?=(%var -.b) ?=(%avar -.b) ?=(%rvar -.b) |(?=(%nvar -.b) ?=(%rnvar -.b)))
4891− ?: ?=(%face -.b) !|(?=(%var -.a) ?=(%avar -.a) ?=(%nvar -.a))
5035+ ?: ?=(%face -.b) !|(?=(%var -.a) ?=(%avar -.a) ?=(%rvar -.a) |(?=(%nvar -.a) ?=(%rnvar -.a)))
4892 ?: &(?=(%cell -.a) ?=(%cell -.b)) |($(a hed.a, b hed.b) $(a tal.a, b tal.b))
5036 ?: &(?=(%cell -.a) ?=(%cell -.b)) |($(a hed.a, b hed.b) $(a tal.a, b tal.b))
4893 ?: &(?=(%fn -.a) ?=(%fn -.b)) |($(a sample.a, b sample.b) $(a product.a, b product.b))
5037 ?: &(?=(%fn -.a) ?=(%fn -.b)) |($(a sample.a, b sample.b) $(a product.a, b product.b))
4894 |
5038 |
@@ -4911,6 +5055,30 @@
4911 [%cell $(actual hed.actual, expected hed.expected) $(actual tal.actual, expected tal.expected)]
5055 [%cell $(actual hed.actual, expected hed.expected) $(actual tal.actual, expected tal.expected)]
4912 expected
5056 expected
4913::
5057::
5058+:: Positional call arguments do not write the sample's enclosing field
5059+:: labels. Ignore one raw sample-slot face per written argument while
5060+:: checking value faces as usual. An unknown or variable-bound cell spine
5061+:: cannot justify this distinction, so keep the existing conservative guard.
5062+++ itype-positional-slot-face-asym
5063+ |= [actual=itype expected=itype sub=isub]
5064+ ^- ?
5065+ ?: &(?=(%fn -.actual) ?=(%fn -.expected) (itype-closed-gates-match actual expected)) |
5066+ (itype-face-asym actual expected sub)
5067+::
5068+++ itype-positional-face-asym
5069+ |= [args=(list expr) actual=itype expected=itype sub=isub]
5070+ ^- ?
5071+ ?~ args &
5072+ ?~ t.args
5073+ =/ slot=itype expected
5074+ =? slot ?=(%face -.slot) body.slot
5075+ (itype-positional-slot-face-asym actual slot sub)
5076+ ?. &(?=(%cell -.actual) ?=(%cell -.expected)) &
5077+ =/ slot=itype hed.expected
5078+ =? slot ?=(%face -.slot) body.slot
5079+ ?: (itype-positional-slot-face-asym hed.actual slot sub) &
5080+ $(args t.args, actual tal.actual, expected tal.expected)
5081+::
4914++ itype-output-may-be-cell
5082++ itype-output-may-be-cell
4915 |= [t=itype sub=isub]
5083 |= [t=itype sub=isub]
4916 ^- ?
5084 ^- ?
@@ -4920,6 +5088,7 @@
4920 %cell &
5088 %cell &
4921 %union &
5089 %union &
4922 %recursive &
5090 %recursive &
5091+ %jrec &
4923 %noun &
5092 %noun &
4924 %collection &
5093 %collection &
4925 %face $(t body.t)
5094 %face $(t body.t)
@@ -4992,6 +5161,7 @@
4992 ^- ?
5161 ^- ?
4993 ?- -.t
5162 ?- -.t
4994 %recursive &
5163 %recursive &
5164+ %jrec &
4995 %collection (lien args.t |=(c=itype (itype-has-recursive c)))
5165 %collection (lien args.t |=(c=itype (itype-has-recursive c)))
4996 %union (lien (weld args.t cases.t) |=(c=itype (itype-has-recursive c)))
5166 %union (lien (weld args.t cases.t) |=(c=itype (itype-has-recursive c)))
4997 %face $(t body.t)
5167 %face $(t body.t)
@@ -5005,6 +5175,7 @@
5005 ^- ?
5175 ^- ?
5006 ?- -.t
5176 ?- -.t
5007 %recursive ?=(~ label.t)
5177 %recursive ?=(~ label.t)
5178+ %jrec ?=(~ label.t)
5008 %collection (lien args.t |=(c=itype (itype-has-hidden-recursive c)))
5179 %collection (lien args.t |=(c=itype (itype-has-hidden-recursive c)))
5009 %union (lien (weld args.t cases.t) |=(c=itype (itype-has-hidden-recursive c)))
5180 %union (lien (weld args.t cases.t) |=(c=itype (itype-has-hidden-recursive c)))
5010 %face $(t body.t)
5181 %face $(t body.t)
@@ -5032,36 +5203,77 @@
5032 $(cases t.cases, good `trial)
5203 $(cases t.cases, good `trial)
5033 ==
5204 ==
5034::
5205::
5035−:: A constructor needs a case with its tag at the head and a payload
5206+:: A constructor needs a case whose head has the same literal noun as its
5036−:: compatible with the expected gate sample. Other case forms do not
5207+:: tag. An unresolved or opaque case may reveal one later, so it cannot
5037−:: identify a constructor.
5208+:: prove a mismatch or a unique match. A broad atom mold is not a case.
5038::
5209::
5039++ itype-fit-ctor-cases
5210++ itype-fit-ctor-cases
5040 |= [tag=lit sample=itype cases=(list itype) sub=isub next=@ud]
5211 |= [tag=lit sample=itype cases=(list itype) sub=isub next=@ud]
5041 ^- ifit
5212 ^- ifit
5042 =/ found=(unit ifit) ~
5213 =/ found=(unit ifit) ~
5214+ =/ pending=? |
5043 |-
5215 |-
5216+ ?~ cases
5217+ ?: pending [%unknown ~]
5044− ?~ cases ?~(found [%bad ~] u.found)
5218+ ?~ found [%bad ~]
5219+ u.found
5220+ =/ raw=itype i.cases
5221+ ?: ?=(%var -.raw)
5222+ $(cases t.cases, pending &)
5045− =/ c=itype (itype-walk i.cases sub)
5223+ =/ c=itype (itype-walk raw sub)
5224+ ?: ?=(?(%var %tag %recursive %jrec %union %face) -.c)
5225+ $(cases t.cases, pending &)
5046 ?. ?=(%cell -.c) $(cases t.cases)
5226 ?. ?=(%cell -.c) $(cases t.cases)
5047− =/ head=itype (itype-walk hed.c sub)
5227+ =/ raw-head=itype hed.c
5228+ ?: ?=(%var -.raw-head)
5229+ $(cases t.cases, pending &)
5230+ =/ head=itype (itype-walk raw-head sub)
5231+ :: A single faced, explicitly atom-only head cannot be the tag case.
5232+ :: Do not follow variables or peel nested faces for this negative proof.
5233+ ?: ?=(%face -.head)
5234+ ?: ?=(?(%atom %any-atom %flag %avar %rvar %nvar %rnvar) -.body.head)
5235+ $(cases t.cases)
5236+ $(cases t.cases, pending &)
5237+ ?: ?=(?(%var %tag %recursive %jrec %union) -.head)
5238+ $(cases t.cases, pending &)
5048 ?. ?=(%const -.head) $(cases t.cases)
5239 ?. ?=(%const -.head) $(cases t.cases)
5049− ?. =(%term form.literal.head) $(cases t.cases)
5050 ?. =(val.literal.head val.tag) $(cases t.cases)
5240 ?. =(val.literal.head val.tag) $(cases t.cases)
5051− ?^ found [%unknown ~]
5241+ :: Equal heads can have disjoint payloads. Test each from the original
5242+ :: substitution; a unique success is usable only with no unknown rival.
5052 =/ trial=ifit (itype-fit sample tal.c sub next)
5243 =/ trial=ifit (itype-fit sample tal.c sub next)
5244+ ?- -.trial
5245+ %bad $(cases t.cases)
5246+ %unknown $(cases t.cases, pending &)
5247+ %ok
5248+ ?^ found [%unknown ~]
5053− $(cases t.cases, found `trial)
5249+ $(cases t.cases, found `trial)
5250+ ==
5054::
5251::
5055++ itype-fit
5252++ itype-fit
5056 |= [actual=itype expected=itype sub=isub next=@ud]
5253 |= [actual=itype expected=itype sub=isub next=@ud]
5057 ^- ifit
5254 ^- ifit
5255+ (itype-fit-inner actual expected sub next | |)
5256+++ itype-fit-inner
5257+ |= [actual=itype expected=itype sub=isub next=@ud skip-width=? spine-proof=?]
5258+ ^- ifit
5259+ ?: &(!skip-width ?=(%cell -.actual) ?=(%cell -.expected) |((width-spine-exhausted actual 1.024) (width-spine-exhausted expected 1.024)))
5260+ [%unknown ~]
5261+ =/ known=(unit [source=iwfields target=iwfields])
5262+ ?: skip-width ~
5263+ (width-known-shape actual expected sub)
5264+ =/ too-wide=? ?~(known | (gth (lent order.source.u.known) (lent order.target.u.known)))
5265+ ?: too-wide [%unknown ~]
5266+ =/ spine-checked=? |(spine-proof ?=(^ known))
5058 =/ uncertain=?
5267 =/ uncertain=?
5059− |(?=(%var -.actual) ?=(%avar -.actual) ?=(%nvar -.actual) ?=(%var -.expected) ?=(%avar -.expected) ?=(%nvar -.expected))
5268+ |(?=(%var -.actual) ?=(%avar -.actual) ?=(%rvar -.actual) |(?=(%nvar -.actual) ?=(%rnvar -.actual)) ?=(%var -.expected) ?=(%avar -.expected) ?=(%rvar -.expected) |(?=(%nvar -.expected) ?=(%rnvar -.expected)))
5060 =/ actual-open=?
5269 =/ actual-open=?
5061− |(?=(%var -.actual) ?=(%avar -.actual) ?=(%nvar -.actual))
5270+ |(?=(%var -.actual) ?=(%avar -.actual) ?=(%rvar -.actual) |(?=(%nvar -.actual) ?=(%rnvar -.actual)))
5062 =. actual (itype-walk actual sub)
5271 =. actual (itype-walk actual sub)
5063 =. expected (itype-walk expected sub)
5272 =. expected (itype-walk expected sub)
5064 ?: =(actual expected) [%ok sub next]
5273 ?: =(actual expected) [%ok sub next]
5274+ :: The relation of the source loobean mold to explicit @f is not yet
5275+ :: established. Keep it unsupported rather than asserting a mismatch.
5276+ ?: &(?=(%flag -.actual) ?=(%atom -.expected) =(%f aura.expected)) [%unknown ~]
5065 :: Any value can be used where a noun is expected. An unresolved
5277 :: Any value can be used where a noun is expected. An unresolved
5066 :: bare tag is fixed as a constant; a constructor still needs a gate.
5278 :: bare tag is fixed as a constant; a constructor still needs a gate.
5067 ?: ?=(%noun -.expected)
5279 ?: ?=(%noun -.expected)
@@ -5071,6 +5283,11 @@
5071 [%ok sub next]
5283 [%ok sub next]
5072 :: An arbitrary noun is not known to fit a narrower type.
5284 :: An arbitrary noun is not known to fit a narrower type.
5073 ?: &(?=(%noun -.actual) !?=(%var -.expected)) [%unknown ~]
5285 ?: &(?=(%noun -.actual) !?=(%var -.expected)) [%unknown ~]
5286+ ?: &(!uncertain ?=(%jrec -.actual) ?=(%face -.expected)) $(expected body.expected)
5287+ ?: &(!uncertain ?=(%face -.actual) ?=(%jrec -.expected)) $(actual body.actual)
5288+ ?: &(?=(%jrec -.actual) ?=(%jrec -.expected))
5289+ ?:(&(=(at.actual at.expected) =(name.actual name.expected) =(head.actual head.expected) =(aura.actual aura.expected) =(tail.actual tail.expected)) [%ok sub next] [%bad ~])
5290+ ?: &(|(?=(%jrec -.actual) ?=(%jrec -.expected)) !|(?=(%var -.actual) ?=(%var -.expected))) [%unknown ~]
5074 ?: &(?=(%recursive -.actual) ?=(%recursive -.expected))
5291 ?: &(?=(%recursive -.actual) ?=(%recursive -.expected))
5075 ?:(&(=(module.actual module.expected) =(name.actual name.expected)) [%ok sub next] [%bad ~])
5292 ?:(&(=(module.actual module.expected) =(name.actual name.expected)) [%ok sub next] [%bad ~])
5076 ?: &(|(?=(%recursive -.actual) ?=(%recursive -.expected)) !|(?=(%var -.actual) ?=(%var -.expected))) [%unknown ~]
5293 ?: &(|(?=(%recursive -.actual) ?=(%recursive -.expected)) !|(?=(%var -.actual) ?=(%var -.expected))) [%unknown ~]
@@ -5096,7 +5313,7 @@
5096 ?: &(!uncertain ?=(%union -.actual) ?=(%face -.expected))
5313 ?: &(!uncertain ?=(%union -.actual) ?=(%face -.expected))
5097 $(expected body.expected)
5314 $(expected body.expected)
5098 ?: ?=(%union -.actual) [%unknown ~]
5315 ?: ?=(%union -.actual) [%unknown ~]
5099− ?: &(?=(%union -.expected) |(?=(%avar -.actual) ?=(%nvar -.actual))) [%unknown ~]
5316+ ?: &(?=(%union -.expected) |(?=(%avar -.actual) ?=(%rvar -.actual) |(?=(%nvar -.actual) ?=(%rnvar -.actual)))) [%unknown ~]
5100 ?: &(?=(%union -.expected) !?=(%var -.actual))
5317 ?: &(?=(%union -.expected) !?=(%var -.actual))
5101 (itype-fit-cases actual cases.expected sub next)
5318 (itype-fit-cases actual cases.expected sub next)
5102 ?: ?=(%tag -.actual)
5319 ?: ?=(%tag -.actual)
@@ -5104,7 +5321,7 @@
5104 =/ u=(unit isub) (itype-unify actual expected sub)
5321 =/ u=(unit isub) (itype-unify actual expected sub)
5105 ?~ u [%bad ~]
5322 ?~ u [%bad ~]
5106 [%ok u.u next]
5323 [%ok u.u next]
5107− ?: |(?=(%avar -.expected) ?=(%nvar -.expected)) [%unknown ~]
5324+ ?: |(?=(%avar -.expected) ?=(%rvar -.expected) |(?=(%nvar -.expected) ?=(%rnvar -.expected))) [%unknown ~]
5108 ?: ?=(%face -.expected) $(expected body.expected)
5325 ?: ?=(%face -.expected) $(expected body.expected)
5109 ?: constructor.actual
5326 ?: constructor.actual
5110 ?. ?=(%fn -.expected) [%bad ~]
5327 ?. ?=(%fn -.expected) [%bad ~]
@@ -5132,13 +5349,17 @@
5132 =/ u=(unit isub) (itype-unify actual expected sub)
5349 =/ u=(unit isub) (itype-unify actual expected sub)
5133 ?~ u [%bad ~]
5350 ?~ u [%bad ~]
5134 [%ok u.u next]
5351 [%ok u.u next]
5135− ?: |(?=(%avar -.expected) ?=(%nvar -.expected)) [%unknown ~]
5352+ ?: |(?=(%avar -.expected) ?=(%rvar -.expected) |(?=(%nvar -.expected) ?=(%rnvar -.expected))) [%unknown ~]
5136 ?: ?=(%face -.expected) $(expected body.expected)
5353 ?: ?=(%face -.expected) $(expected body.expected)
5137 ?: &(?=(%collection -.expected) =(%list name.expected) =(0 val.literal.actual))
5354 ?: &(?=(%collection -.expected) =(%list name.expected) =(0 val.literal.actual))
5138 [%unknown ~]
5355 [%unknown ~]
5139 ?: ?=(%const -.expected)
5356 ?: ?=(%const -.expected)
5140 ?:(=(val.literal.actual val.literal.expected) [%ok sub next] [%bad ~])
5357 ?:(=(val.literal.actual val.literal.expected) [%ok sub next] [%bad ~])
5141 ?: ?=(%atom -.expected)
5358 ?: ?=(%atom -.expected)
5359+ :: A loobean singleton must not silently widen into another aura.
5360+ ?: =(%loobean form.literal.actual)
5361+ ?: =(%f aura.expected) [%unknown ~]
5362+ [%bad ~]
5142 ?: |(=(%tas aura.expected) =(%ta aura.expected)) [%ok sub next]
5363 ?: |(=(%tas aura.expected) =(%ta aura.expected)) [%ok sub next]
5143 [%bad ~]
5364 [%bad ~]
5144 ?: ?=(%flag -.expected)
5365 ?: ?=(%flag -.expected)
@@ -5146,8 +5367,14 @@
5146 ?: ?=(%any-atom -.expected) [%ok sub next]
5367 ?: ?=(%any-atom -.expected) [%ok sub next]
5147 [%bad ~]
5368 [%bad ~]
5148 ?: &(uncertain (itype-face-asym actual expected sub)) [%unknown ~]
5369 ?: &(uncertain (itype-face-asym actual expected sub)) [%unknown ~]
5370+ :: A known face labels the same noun. Peel it before applying the
5371+ :: directional unrestricted-atom rule, preserving raw-variable guards.
5372+ ?: &(!uncertain ?=(%any-atom -.actual) ?=(%face -.expected))
5373+ $(expected body.expected, skip-width |, spine-proof |)
5374+ ?: &(!uncertain ?=(%any-atom -.expected) ?=(%face -.actual))
5375+ $(actual body.actual, skip-width |, spine-proof |)
5149 ?: ?=(%any-atom -.expected)
5376 ?: ?=(%any-atom -.expected)
5150− ?: |(?=(%atom -.actual) ?=(%avar -.actual) ?=(%nvar -.actual) ?=(%flag -.actual)) [%ok sub next]
5377+ ?: |(?=(%atom -.actual) ?=(%avar -.actual) ?=(%rvar -.actual) |(?=(%nvar -.actual) ?=(%rnvar -.actual)) ?=(%flag -.actual)) [%ok sub next]
5151 ?: ?=(%var -.actual)
5378 ?: ?=(%var -.actual)
5152 =/ unified=(unit isub) (itype-unify actual [%avar next] sub)
5379 =/ unified=(unit isub) (itype-unify actual [%avar next] sub)
5153 ?~ unified [%bad ~]
5380 ?~ unified [%bad ~]
@@ -5158,16 +5385,16 @@
5158 =/ unified=(unit isub) (itype-unify actual expected sub)
5385 =/ unified=(unit isub) (itype-unify actual expected sub)
5159 ?~ unified [%bad ~]
5386 ?~ unified [%bad ~]
5160 [%ok u.unified next]
5387 [%ok u.unified next]
5161− ?: |(?=(%avar -.expected) ?=(%nvar -.expected)) [%unknown ~]
5388+ ?: |(?=(%avar -.expected) ?=(%rvar -.expected) |(?=(%nvar -.expected) ?=(%rnvar -.expected))) [%unknown ~]
5162 [%bad ~]
5389 [%bad ~]
5163 ?: &(?=(%atom -.actual) ?=(%atom -.expected))
5390 ?: &(?=(%atom -.actual) ?=(%atom -.expected))
5164 ?: (aura-prefix aura.expected aura.actual) [%ok sub next]
5391 ?: (aura-prefix aura.expected aura.actual) [%ok sub next]
5165 ?: &((aura-prefix aura.actual aura.expected) uncertain) [%unknown ~]
5392 ?: &((aura-prefix aura.actual aura.expected) uncertain) [%unknown ~]
5166 [%bad ~]
5393 [%bad ~]
5167 ?: &(?=(%cell -.actual) ?=(%cell -.expected))
5394 ?: &(?=(%cell -.actual) ?=(%cell -.expected))
5168− =/ first=ifit $(actual hed.actual, expected hed.expected)
5395+ =/ first=ifit $(actual hed.actual, expected hed.expected, skip-width |, spine-proof |)
5169 ?. ?=(%ok -.first) first
5396 ?. ?=(%ok -.first) first
5170− $(actual tal.actual, expected tal.expected, sub sub.first, next next.first)
5397+ $(actual tal.actual, expected tal.expected, sub sub.first, next next.first, skip-width spine-checked, spine-proof spine-checked)
5171 :: A field may add a face to an occurrence of the very same type
5398 :: A field may add a face to an occurrence of the very same type
5172 :: variable. Binding that variable to a face around itself would fail
5399 :: variable. Binding that variable to a face around itself would fail
5173 :: the occurs check, but its underlying type has already matched.
5400 :: the occurs check, but its underlying type has already matched.
@@ -5189,9 +5416,10 @@
5189 [%ok u.unified next]
5416 [%ok u.unified next]
5190 ?: &(?=(%face -.actual) ?=(%face -.expected))
5417 ?: &(?=(%face -.actual) ?=(%face -.expected))
5191 ?. =(name.actual name.expected) [%bad ~]
5418 ?. =(name.actual name.expected) [%bad ~]
5192− $(actual body.actual, expected body.expected)
5419+ $(actual body.actual, expected body.expected, skip-width |, spine-proof |)
5193− ?: ?=(%face -.actual) $(actual body.actual)
5420+ ?: ?=(%face -.actual) $(actual body.actual, skip-width |, spine-proof |)
5194− ?: ?=(%face -.expected) $(expected body.expected)
5421+ ?: ?=(%face -.expected) $(expected body.expected, skip-width |, spine-proof |)
5422+ ?: &(!uncertain (itype-closed-gates-match actual expected)) [%ok sub next]
5195 ?: (itype-face-asym actual expected sub) [%unknown ~]
5423 ?: (itype-face-asym actual expected sub) [%unknown ~]
5196 ?: |((itype-has-any-atom actual sub) (itype-has-any-atom expected sub))
5424 ?: |((itype-has-any-atom actual sub) (itype-has-any-atom expected sub))
5197 [%unknown ~]
5425 [%unknown ~]
@@ -5268,7 +5496,17 @@
5268+$ ienv (list [name=term scheme=ischeme])
5496+$ ienv (list [name=term scheme=ischeme])
5269+$ imold-types (list [name=term template=ischeme])
5497+$ imold-types (list [name=term template=ischeme])
5270+$ iderived [name=term agent=term mark=term]
5498+$ iderived [name=term agent=term mark=term]
5499++$ iwidth-definition [name=term original=expr typ=itype sub=isub projections=(list iwprojection)]
5500++$ iwidth-dependency [at=path source=(unit @t) definitions=(list iwidth-definition)]
5501+:: Nonrecursive request evidence is compiler-owned metadata, not a property
5502+:: of an arbitrary ask value. Reader graphs and source inputs are trusted.
5503++$ irequest-evidence
5504+ [api-at=path name=term path=iapi-path-typed api-source=@t public-source=@t internal-source=@t prelude-values=(list term) prelude-molds=(list term) externals=iexternals marks=imark-externals]
5505+:: A unit distinguishes a verified empty closure from a detached legacy file.
5506+:: The opaque prelude is an exact trusted input, not a recursive interface mold.
5507++$ irequest-graph
5508+ [paths=(set path) requests=(list irequest-evidence) bundle-input=* prelude-input=* prelude-values=(list term) prelude-molds=(list term) externals=iexternals marks=imark-externals]
5271−+$ ifile [values=ienv molds=imold-types at=path derived=(list iderived)]
5509++$ ifile [values=ienv molds=imold-types at=path derived=(list iderived) elaborations=(list iwidth-definition) dependencies=(list iwidth-dependency) source=(unit @t) graph=(unit irequest-graph)]
5272+$ ijimports (list [face=term interface=ifile])
5510+$ ijimports (list [face=term interface=ifile])
5273+$ icap [name=@t id=@ud at=span]
5511+$ icap [name=@t id=@ud at=span]
5274+$ icaps (list icap)
5512+$ icaps (list icap)
@@ -5278,7 +5516,165 @@
5278:: This core has no Ford dependencies; unrecognized payloads fail closed.
5516:: This core has no Ford dependencies; unrecognized payloads fail closed.
5279+$ iexternals (list [module=term name=term result=*])
5517+$ iexternals (list [module=term name=term result=*])
5280+$ imark-externals (list [mark=term result=*])
5518+$ imark-externals (list [mark=term result=*])
5519+:: Hole obligations survive discarded expressions until their owning
5520+:: definition has inferred; their source spans support unresolved reports.
5521++$ ihole [id=@ud at=span]
5522+:: Recursive-mold unfolding spends fuel in the threaded inference state.
5523+:: Retries can restart from an earlier state, so this bounds an attempt,
5524+:: not all parsing or module-checking work.
5525+:: Experimental: only closed, uniquely faced records have known axes.
5526++$ iwfield [name=term axis=@ud typ=itype]
5527++$ iwfields [order=(list iwfield) index=(map term iwfield)]
5528++$ iwstep [name=term axis=@ud]
5529++$ iwidth-result [steps=(list iwstep) sub=isub next=@ud]
5530++$ iwprojection [at=span original=expr source=itype target=itype steps=(list iwstep)]
5531+++ width-scan
5532+ |= [typ=itype sub=isub axis=@ud fuel=@ud]
5533+ ^- (unit iwfields)
5534+ =/ order=(list iwfield) ~
5535+ =/ index=(map term iwfield) *(map term iwfield)
5536+ |-
5537+ ?: =(0 fuel) ~
5538+ ?: |(?=(%var -.typ) ?=(%avar -.typ) ?=(%rvar -.typ) ?=(%nvar -.typ) ?=(%rnvar -.typ)) ~
5539+ ?: ?=(%face -.typ)
5540+ =/ entry=iwfield [name.typ axis body.typ]
5541+ ?: ?=(^ (~(get by index) name.entry)) ~
5542+ `[(flop [entry order]) (~(put by index) name.entry entry)]
5543+ ?. ?=(%cell -.typ) ~
5544+ =/ head=itype hed.typ
5545+ ?: |(?=(%var -.head) ?=(%avar -.head) ?=(%rvar -.head) ?=(%nvar -.head) ?=(%rnvar -.head)) ~
5546+ ?. ?=(%face -.head) ~
5547+ =/ entry=iwfield [name.head (mul 2 axis) body.head]
5548+ ?: ?=(^ (~(get by index) name.entry)) ~
5549+ $(typ tal.typ, axis +((mul 2 axis)), fuel (dec fuel), order [entry order], index (~(put by index) name.entry entry))
5550+++ width-in-order
5551+ |= [source=(list iwfield) target=(list iwfield)]
5552+ ^- ?
5553+ ?~ target &
5554+ ?~ source |
5555+ ?: =(name.i.source name.i.target) $(source t.source, target t.target)
5556+ $(source t.source)
5557+++ width-fit-fields
5558+ |= [source=(map term iwfield) target=(list iwfield) sub=isub next=@ud]
5559+ ^- (unit iwidth-result)
5560+ ?~ target `[~ sub next]
5561+ =/ found=(unit iwfield) (~(get by source) name.i.target)
5562+ ?~ found ~
5563+ =/ fit=ifit (itype-fit typ.u.found typ.i.target sub next)
5564+ ?. ?=(%ok -.fit) ~
5565+ =/ rest=(unit iwidth-result) $(target t.target, sub sub.fit, next next.fit)
5566+ ?~ rest ~
5567+ `[[[name.i.target axis.u.found] steps.u.rest] sub.u.rest next.u.rest]
5568+++ width-spine-exhausted
5569+ |= [t=itype fuel=@ud]
5570+ ^- ?
5571+ ?: =(0 fuel) &
5572+ ?. ?=(%cell -.t) |
5573+ ?. ?=(%face -.hed.t) |
5574+ $(t tal.t, fuel (dec fuel))
5575+++ width-known-shape
5576+ |= [actual=itype expected=itype sub=isub]
5577+ ^- (unit [source=iwfields target=iwfields])
5578+ ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
5579+ =/ source=(unit iwfields) (width-scan actual sub 1 1.024)
5580+ =/ target=(unit iwfields) (width-scan expected sub 1 1.024)
5581+ ?~ source ~
5582+ ?~ target ~
5583+ `[u.source u.target]
5584+::
5585+++ width-shape
5586+ |= [actual=itype expected=itype sub=isub]
5587+ ^- (unit [source=iwfields target=iwfields])
5588+ ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
5589+ =/ source=(unit iwfields) (width-scan actual sub 1 4.096)
5590+ =/ target=(unit iwfields) (width-scan expected sub 1 4.096)
5591+ ?~ source ~
5592+ ?~ target ~
5593+ ?. (gth (lent order.u.source) (lent order.u.target)) ~
5594+ `[u.source u.target]
5595+++ width-proj-shape
5596+ |= [actual=itype expected=itype sub=isub]
5597+ ^- (unit [source=iwfields target=iwfields])
5598+ ?. &(|(?=(%cell -.actual) ?=(%face -.actual)) |(?=(%cell -.expected) ?=(%face -.expected))) ~
5599+ =/ source=(unit iwfields) (width-scan actual sub 1 4.096)
5600+ =/ target=(unit iwfields) (width-scan expected sub 1 4.096)
5601+ ?~ source ~
5602+ ?~ target ~
5603+ ?: (lth (lent order.u.source) (lent order.u.target)) ~
5604+ `[u.source u.target]
5605+::
5606+++ width-project
5607+ |= [shape=[source=iwfields target=iwfields] sub=isub next=@ud]
5608+ ^- (unit iwidth-result)
5609+ ?. (width-in-order order.source.shape order.target.shape) ~
5610+ (width-fit-fields index.source.shape order.target.shape sub next)
5611+::
5612+:: Provisional, globally budgeted gate-free proof. %no includes a
5613+:: gate-bearing witness; an uninhabited sibling could invalidate it.
5614+:: Input types must be resolved and normalized under valid substitutions,
5615+:: from trusted source-backed interfaces and reader results. Collection
5616+:: list/unit names rely on their existing identity invariant; this arm
5617+:: does not validate fabricated internal types.
5618++$ igf-segment
5619+ $% [%field name=term]
5620+ [%head ~]
5621+ [%tail ~]
5622+ [%item ~]
5623+ [%case index=@ud]
5624+ ==
5625++$ igate-free [verdict=?(%yes %no %unknown) inhabited=? left=@ud path=(unit (list igf-segment))]
5626+++ gate-free-types
5627+ |= [types=(list itype) fuel=@ud path=(list igf-segment) index=@ud]
5628+ ^- igate-free
5629+ ?~ types [%yes | fuel ~]
5630+ ?: =(0 fuel) [%unknown | 0 ~]
5631+ =/ first=igate-free (gate-free-type i.types fuel [[%case index] path])
5632+ ?: =(%no verdict.first) first
5633+ =/ rest=igate-free $(types t.types, fuel left.first, index +(index))
5634+ ?: =(%no verdict.rest) rest
5635+ =/ inhabited=? |(inhabited.first inhabited.rest)
5636+ ?: |(=(%unknown verdict.first) =(%unknown verdict.rest)) [%unknown inhabited left.rest ~]
5637+ [%yes inhabited left.rest ~]
5638+++ gate-free-type
5639+ |= [typ=itype fuel=@ud path=(list igf-segment)]
5640+ ^- igate-free
5641+ ?: =(0 fuel) [%unknown | 0 ~]
5642+ =. fuel (dec fuel)
5643+ ?- -.typ
5644+ %fn [%no & fuel `(flop path)]
5645+ %atom [%yes & fuel ~]
5646+ %any-atom [%yes & fuel ~]
5647+ %flag [%yes & fuel ~]
5648+ %const [%yes & fuel ~]
5649+ %face $(typ body.typ, path [[%field name.typ] path])
5650+ %cell
5651+ =/ head=igate-free $(typ hed.typ, path [[%head ~] path])
5652+ =/ tail=igate-free $(typ tal.typ, fuel left.head, path [[%tail ~] path])
5653+ =/ inhabited=? &(inhabited.head inhabited.tail)
5654+ ?: &(=(%no verdict.head) inhabited.tail) head(left left.tail)
5655+ ?: &(=(%no verdict.tail) inhabited.head) tail
5656+ ?: |(!=(%yes verdict.head) !=(%yes verdict.tail)) [%unknown inhabited left.tail ~]
5657+ [%yes inhabited left.tail ~]
5658+ %collection
5659+ ?. |(=(%list name.typ) =(%unit name.typ)) [%unknown | fuel ~]
5660+ ?. ?=([* ~] args.typ) [%unknown | fuel ~]
5661+ =/ item=igate-free $(typ i.args.typ, path [[%item ~] path])
5662+ item(inhabited &)
5663+ %union
5664+ ?~ cases.typ [%unknown | fuel ~]
5665+ (gate-free-types cases.typ fuel path 0)
5666+ %noun [%unknown & fuel ~]
5667+ %var [%unknown | fuel ~]
5668+ %avar [%yes & fuel ~]
5669+ %rvar [%yes & fuel ~]
5670+ %nvar [%yes & fuel ~]
5671+ %rnvar [%yes & fuel ~]
5672+ %tag [%unknown | fuel ~]
5673+ %recursive [%unknown | fuel ~]
5674+ %jrec [%yes & fuel ~]
5675+ ==
5676+::
5281−+$ istate [next=@ud sub=isub caps=icaps binders=(list @ud) molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) params=iparams active=(list term) tags=(list ipending) in-mold=? at=path top-molds=(list term) prelude=(unit ifile)]
5677++$ istate [next=@ud sub=isub caps=icaps binders=(list @ud) molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) params=iparams active=(list term) tags=(list ipending) in-mold=? at=path top-molds=(list term) prelude=(unit ifile) holes=(list ihole) jrec-fuel=@ud projections=(list iwprojection)]
5282+$ idiag [msg=tape sites=(list [at=span note=tape])]
5678+$ idiag [msg=tape sites=(list [at=span note=tape])]
5283+$ iresult (each [typ=itype state=istate] idiag)
5679+$ iresult (each [typ=itype state=istate] idiag)
5284+$ isample-result (each [typ=itype env=ienv state=istate] tape)
5680+$ isample-result (each [typ=itype env=ienv state=istate] tape)
@@ -5323,6 +5719,7 @@
5323 %fn &
5719 %fn &
5324 %cell |($(t hed.t) $(t tal.t))
5720 %cell |($(t hed.t) $(t tal.t))
5325 %recursive |
5721 %recursive |
5722+ %jrec |
5326 %collection (lien args.t |=(c=itype (itype-has-gate c)))
5723 %collection (lien args.t |=(c=itype (itype-has-gate c)))
5327 %face $(t body.t)
5724 %face $(t body.t)
5328 %union (lien cases.t |=(c=itype (itype-has-gate c)))
5725 %union (lien cases.t |=(c=itype (itype-has-gate c)))
@@ -5330,7 +5727,9 @@
5330 %const |
5727 %const |
5331 %var |
5728 %var |
5332 %avar |
5729 %avar |
5730+ %rvar |
5333 %nvar |
5731 %nvar |
5732+ %rnvar |
5334 %atom |
5733 %atom |
5335 %any-atom |
5734 %any-atom |
5336 %flag |
5735 %flag |
@@ -5343,19 +5742,120 @@
5343 ?: (itype-has-gate t) t
5742 ?: (itype-has-gate t) t
5344 ?- -.t
5743 ?- -.t
5345 %nvar [%atom %ud]
5744 %nvar [%atom %ud]
5745+ %rnvar [%atom %ud]
5346 %collection [%collection name.t (turn args.t |=(c=itype (default-decimals c)))]
5746 %collection [%collection name.t (turn args.t |=(c=itype (default-decimals c)))]
5347 %face [%face name.t $(t body.t)]
5747 %face [%face name.t $(t body.t)]
5348 %cell [%cell $(t hed.t) $(t tal.t)]
5748 %cell [%cell $(t hed.t) $(t tal.t)]
5349 * t
5749 * t
5350 ==
5750 ==
5351::
5751::
5752+:: A hole is solved only by a fully determined type or a written
5753+:: in-scope type variable. Ordinary fresh variables are not evidence.
5754+:: Compare representatives after substitution, since unification can
5755+:: orient a written capital toward the hole rather than the reverse.
5756+++ hole-variable-id
5757+ |= t=itype
5758+ ^- (unit @ud)
5759+ ?- -.t
5760+ %var `id.t
5761+ %avar `id.t
5762+ %rvar `id.t
5763+ %nvar `id.t
5764+ %rnvar `id.t
5765+ %tag `id.t
5766+ * ~
5767+ ==
5768+++ hole-same-variable
5769+ |= [a=itype b=itype]
5770+ ^- ?
5771+ =/ x=(unit @ud) (hole-variable-id a)
5772+ ?~ x |
5773+ =/ y=(unit @ud) (hole-variable-id b)
5774+ ?~ y |
5775+ =(u.x u.y)
5776+++ hole-known
5777+ |= [t=itype state=istate]
5778+ ^- ?
5779+ =. t (itype-walk t sub.state)
5780+ ?- -.t
5781+ ?(%var %avar %rvar %nvar %rnvar)
5782+ ?: (lien caps.state |=(c=icap (hole-same-variable t (itype-walk [%var id.c] sub.state)))) &
5783+ (lien params.state |=(p=[name=@t typ=itype] (hole-same-variable t (itype-walk typ.p sub.state))))
5784+ %tag |
5785+ %any-atom &
5786+ %union &((levy cases.t |=(c=itype (hole-known c state))) (levy args.t |=(c=itype (hole-known c state))))
5787+ %collection (levy args.t |=(c=itype (hole-known c state)))
5788+ %face $(t body.t)
5789+ %fn &($(t sample.t) $(t product.t))
5790+ %cell &($(t hed.t) $(t tal.t))
5791+ * &
5792+ ==
5793+++ promote-restricted-numbers
5794+ |= [state=istate env=ienv]
5795+ ^- istate
5796+ =/ ids=(list @ud) (turn caps.state |=(c=icap id.c))
5797+ =/ free=(list @ud) (free-env-vars env sub.state)
5798+ |-
5799+ ?~ ids state
5800+ =/ t=itype (itype-walk [%var i.ids] sub.state)
5801+ ?: &(?=(%rnvar -.t) !(lien free |=(n=@ud =(n +.t))))
5802+ $(ids t.ids, state state(sub [[+.t [%rvar +.t]] sub.state]))
5803+ $(ids t.ids)
5804+::
5805+++ default-hole-numbers
5806+ |= [all=(list ihole) prior=(list ihole) state=istate env=ienv permit=?]
5807+ ^- istate
5808+ :: Do not default a named capital or a variable captured from env.
5809+ ?. permit state
5810+ ?: =(all prior) state
5811+ ?~ all state
5812+ =/ t=itype (itype-walk [%var id.i.all] sub.state)
5813+ =/ free=(list @ud) (free-env-vars env sub.state)
5814+ =? state &(?=(?(%nvar %rnvar) -.t) !(hole-known t state) !(lien free |=(id=@ud =(id id.t))))
5815+ state(sub [[id.t [%atom %ud]] sub.state])
5816+ $(all t.all)
5817+::
5818+:: Only obligations created inside this definition belong to it.
5819+++ holes-created
5820+ |= [all=(list ihole) prior=(list ihole)]
5821+ ^- (list ihole)
5822+ ?: =(all prior) ~
5823+ ?~ all ~
5824+ [i.all $(all t.all)]
5825+++ hole-uncertain
5826+ |= [t=itype state=istate]
5827+ ^- ?
5828+ =. t (itype-walk t sub.state)
5829+ ?- -.t
5830+ ?(%tag %nvar %rnvar %avar %rvar) !(hole-known t state)
5831+ %union |((lien cases.t |=(c=itype (hole-uncertain c state))) (lien args.t |=(c=itype (hole-uncertain c state))))
5832+ %collection (lien args.t |=(c=itype (hole-uncertain c state)))
5833+ %face $(t body.t)
5834+ %fn |($(t sample.t) $(t product.t))
5835+ %cell |($(t hed.t) $(t tal.t))
5836+ * |
5837+ ==
5838+::
5839+++ unresolved-hole
5840+ |= [all=(list ihole) prior=(list ihole) state=istate]
5841+ ^- (unit idiag)
5842+ =/ work=(list ihole) (flop (holes-created all prior))
5843+ |-
5844+ ?~ work ~
5845+ ?: (hole-known [%var id.i.work] state) $(work t.work)
5846+ ?: (hole-uncertain [%var id.i.work] state)
5847+ `["type hole needs unsupported inference" ~[[at.i.work "type hole"]]]
5848+ `["type hole needs a determined type" ~[[at.i.work "unresolved type hole"]]]
5849+::
5352++ itype-vars
5850++ itype-vars
5353 |= t=itype
5851 |= t=itype
5354 ^- (list @ud)
5852 ^- (list @ud)
5355 ?- -.t
5853 ?- -.t
5356 %var ~[id.t]
5854 %var ~[id.t]
5357 %avar ~[id.t]
5855 %avar ~[id.t]
5856+ %rvar ~[id.t]
5358 %nvar ~[id.t]
5857 %nvar ~[id.t]
5858+ %rnvar ~[id.t]
5359 %atom ~
5859 %atom ~
5360 %any-atom ~
5860 %any-atom ~
5361 %flag ~
5861 %flag ~
@@ -5364,6 +5864,7 @@
5364 %const ~
5864 %const ~
5365 %union (zing (turn (weld args.t cases.t) |=(c=itype (itype-vars c))))
5865 %union (zing (turn (weld args.t cases.t) |=(c=itype (itype-vars c))))
5366 %recursive ~
5866 %recursive ~
5867+ %jrec ~
5367 %collection (zing (turn args.t |=(c=itype (itype-vars c))))
5868 %collection (zing (turn args.t |=(c=itype (itype-vars c))))
5368 %face $(t body.t)
5869 %face $(t body.t)
5369 %fn (weld $(t sample.t) $(t product.t))
5870 %fn (weld $(t sample.t) $(t product.t))
@@ -5391,10 +5892,18 @@
5391 =/ found=(unit itype) (itype-lookup id.t ren)
5892 =/ found=(unit itype) (itype-lookup id.t ren)
5392 ?~ found t
5893 ?~ found t
5393 u.found
5894 u.found
5895+ %rvar
5896+ =/ found=(unit itype) (itype-lookup id.t ren)
5897+ ?~ found t
5898+ u.found
5394 %nvar
5899 %nvar
5395 =/ found=(unit itype) (itype-lookup id.t ren)
5900 =/ found=(unit itype) (itype-lookup id.t ren)
5396 ?~ found t
5901 ?~ found t
5397 u.found
5902 u.found
5903+ %rnvar
5904+ =/ found=(unit itype) (itype-lookup id.t ren)
5905+ ?~ found t
5906+ u.found
5398 %atom t
5907 %atom t
5399 %any-atom t
5908 %any-atom t
5400 %flag t
5909 %flag t
@@ -5403,6 +5912,7 @@
5403 %const t
5912 %const t
5404 %union [%union (turn cases.t |=(c=itype (itype-rename c ren))) origin.t label.t (turn args.t |=(c=itype (itype-rename c ren)))]
5913 %union [%union (turn cases.t |=(c=itype (itype-rename c ren))) origin.t label.t (turn args.t |=(c=itype (itype-rename c ren)))]
5405 %recursive t
5914 %recursive t
5915+ %jrec t
5406 %collection [%collection name.t (turn args.t |=(c=itype (itype-rename c ren)))]
5916 %collection [%collection name.t (turn args.t |=(c=itype (itype-rename c ren)))]
5407 %face [%face name.t $(t body.t)]
5917 %face [%face name.t $(t body.t)]
5408 %fn [%fn $(t sample.t) $(t product.t)]
5918 %fn [%fn $(t sample.t) $(t product.t)]
@@ -5418,7 +5928,9 @@
5418 ?- -.t
5928 ?- -.t
5419 %var |
5929 %var |
5420 %avar =(n id.t)
5930 %avar =(n id.t)
5931+ %rvar =(n id.t)
5421 %nvar =(n id.t)
5932 %nvar =(n id.t)
5933+ %rnvar =(n id.t)
5422 %atom |
5934 %atom |
5423 %any-atom |
5935 %any-atom |
5424 %flag |
5936 %flag |
@@ -5427,11 +5939,35 @@
5427 %const |
5939 %const |
5428 %union |((lien cases.t |=(c=itype (itype-var-is-atom n c))) (lien args.t |=(c=itype (itype-var-is-atom n c))))
5940 %union |((lien cases.t |=(c=itype (itype-var-is-atom n c))) (lien args.t |=(c=itype (itype-var-is-atom n c))))
5429 %recursive |
5941 %recursive |
5942+ %jrec |
5430 %collection (lien args.t |=(c=itype (itype-var-is-atom n c)))
5943 %collection (lien args.t |=(c=itype (itype-var-is-atom n c)))
5431 %face $(t body.t)
5944 %face $(t body.t)
5432 %fn |($(t sample.t) $(t product.t))
5945 %fn |($(t sample.t) $(t product.t))
5433 %cell |($(t hed.t) $(t tal.t))
5946 %cell |($(t hed.t) $(t tal.t))
5434 ==
5947 ==
5948+++ itype-var-is-restricted
5949+ |= [n=@ud t=itype]
5950+ ^- ?
5951+ ?- -.t
5952+ %var |
5953+ %avar |
5954+ %rvar =(n id.t)
5955+ %nvar |
5956+ %rnvar |
5957+ %atom |
5958+ %any-atom |
5959+ %flag |
5960+ %noun |
5961+ %tag |
5962+ %const |
5963+ %union |((lien cases.t |=(c=itype (itype-var-is-restricted n c))) (lien args.t |=(c=itype (itype-var-is-restricted n c))))
5964+ %recursive |
5965+ %jrec |
5966+ %collection (lien args.t |=(c=itype (itype-var-is-restricted n c)))
5967+ %face $(t body.t)
5968+ %fn |($(t sample.t) $(t product.t))
5969+ %cell |($(t hed.t) $(t tal.t))
5970+ ==
5435::
5971::
5436:: Canonical numbering makes printed variables independent of the order
5972:: Canonical numbering makes printed variables independent of the order
5437:: the unifier happened to allocate intermediates.
5973:: the unifier happened to allocate intermediates.
@@ -5443,7 +5979,7 @@
5443 =/ n=@ud 0
5979 =/ n=@ud 0
5444 |-
5980 |-
5445 ?~ vars (itype-rename t ren)
5981 ?~ vars (itype-rename t ren)
5446− =/ replacement=itype ?:((itype-var-is-atom i.vars t) [%avar n] [%var n])
5982+ =/ replacement=itype ?:((itype-var-is-restricted i.vars t) [%rvar n] ?:((itype-var-is-atom i.vars t) [%avar n] [%var n]))
5447 $(vars t.vars, ren [[i.vars replacement] ren], n +(n))
5983 $(vars t.vars, ren [[i.vars replacement] ren], n +(n))
5448::
5984::
5449++ instantiate-scheme
5985++ instantiate-scheme
@@ -5454,11 +5990,11 @@
5454 |-
5990 |-
5455 ?~ vars [(itype-rename typ.scheme ren) state]
5991 ?~ vars [(itype-rename typ.scheme ren) state]
5456 =/ replacement=itype
5992 =/ replacement=itype
5457− ?:((itype-var-is-atom i.vars typ.scheme) [%avar next.state] [%var next.state])
5993+ ?:((itype-var-is-restricted i.vars typ.scheme) [%rvar next.state] ?:((itype-var-is-atom i.vars typ.scheme) [%avar next.state] [%var next.state]))
5458 :: A generalized atom variable is a valid origin for re-generalizing
5994 :: A generalized atom variable is a valid origin for re-generalizing
5459 :: an alias, just as a sample binder is.
5995 :: an alias, just as a sample binder is.
5460 =/ st=istate state(next +(next.state))
5996 =/ st=istate state(next +(next.state))
5461− =? binders.st ?=(%avar -.replacement) [next.state binders.state]
5997+ =? binders.st |(?=(%avar -.replacement) ?=(%rvar -.replacement)) [next.state binders.state]
5462 $(vars t.vars, ren [[i.vars replacement] ren], state st)
5998 $(vars t.vars, ren [[i.vars replacement] ren], state st)
5463::
5999::
5464++ icap-lookup
6000++ icap-lookup
@@ -5588,6 +6124,10 @@
5588 %cell ?:(?=([%cell * *] node) (imported-record-faces-valid node ~) |)
6124 %cell ?:(?=([%cell * *] node) (imported-record-faces-valid node ~) |)
5589 %fork (imported-faces-valid-list +.node)
6125 %fork (imported-faces-valid-list +.node)
5590 %apply ?:(?=([%apply @ *] node) (imported-faces-valid-list +>.node) |)
6126 %apply ?:(?=([%apply @ *] node) (imported-faces-valid-list +>.node) |)
6127+ %named
6128+ ?. ?=([%named @ @ *] node) |
6129+ =/ n=[%named module=@ name=@ body=*] ;;([%named module=@ name=@ body=*] node)
6130+ (imported-faces-valid body.n)
5591 ==
6131 ==
5592::
6132::
5593++ imported-faces-valid-list
6133++ imported-faces-valid-list
@@ -5641,6 +6181,15 @@
5641 =/ aura=@ta (@ta +<.node)
6181 =/ aura=@ta (@ta +<.node)
5642 ?. |(?=(?(%u %ud %ux %uv %t %ta %tas %p %da %dr) aura) =('tD' aura)) ~
6182 ?. |(?=(?(%u %ud %ux %uv %t %ta %tas %p %da %dr) aura) =('tD' aura)) ~
5643 `[%atom aura]
6183 `[%atom aura]
6184+ %named
6185+ ?. ?=([%named @ @ *] node) ~
6186+ =/ n=[%named module=@ name=@ body=*] ;;([%named module=@ name=@ body=*] node)
6187+ ?. &((jibb-face-name module.n) (jibb-face-name name.n)) ~
6188+ ?. ?=([%fork *] body.n) ~
6189+ =/ proof=(unit irec-pattern) (rec-pattern body.n (@tas module.n) (@tas name.n))
6190+ ?~ proof ~
6191+ ?. has.u.proof ~
6192+ `[%recursive (@tas module.n) (@tas name.n) `(crip "{(trip name.n)}.{(trip module.n)}")]
5644 %apply
6193 %apply
5645 ?. ?=([%apply @ *] node) ~
6194 ?. ?=([%apply @ *] node) ~
5646 =/ name=term (@tas +<.node)
6195 =/ name=term (@tas +<.node)
@@ -5806,21 +6355,44 @@
5806 ?:(=(`origin origin.typ.template) `name.i.molds $(molds t.molds))
6355 ?:(=(`origin origin.typ.template) `name.i.molds $(molds t.molds))
5807 $(molds t.molds)
6356 $(molds t.molds)
5808::
6357::
5809−:: A public non-generic alias names exactly its origin and arguments.
6358+:: A prelude union alias is a display name, not a new union identity. An
5810−:: Reusing only an origin could print a different generic instantiation.
6359+:: identity-generic alias can carry the origin's arguments only when the
6360+:: origin, arity and ordered parameters match. Swapped, repeated, fixed
6361+:: or phantom parameters cannot be printed that way and remain unsupported
6362+:: when their only available name is private. A nongeneric alias of a
6363+:: generic instantiation cannot be printed with the origin's arguments.
6364+++ identity-union-parameters
6365+ |= [vars=(list @ud) args=(list itype)]
6366+ ^- ?
6367+ ?~ vars ?=(~ args)
6368+ ?~ args |
6369+ ?. =([%var i.vars] i.args) |
6370+ $(vars t.vars, args t.args)
5811++ prelude-union-alias
6371++ prelude-union-alias
5812 |= [origin=[at=path name=term] args=(list itype) molds=imold-types]
6372 |= [origin=[at=path name=term] args=(list itype) molds=imold-types]
5813 ^- (unit term)
6373 ^- (unit term)
5814− ?^ args ~
5815 ?~ molds ~
6374 ?~ molds ~
5816 =/ template=ischeme template.i.molds
6375 =/ template=ischeme template.i.molds
5817− ?: &(?=(~ vars.template) ?=(%union -.typ.template))
6376+ ?. ?=(%union -.typ.template) $(molds t.molds)
6377+ ?. =(`origin origin.typ.template) $(molds t.molds)
6378+ ?~ vars.template
6379+ ?^ args $(molds t.molds)
5818− ?:(&(=(`origin origin.typ.template) =(args args.typ.template)) `name.i.molds $(molds t.molds))
6380+ ?:(=(args args.typ.template) `name.i.molds $(molds t.molds))
6381+ ?: &((identity-union-parameters vars.template args.typ.template) =((lent vars.template) (lent args)))
6382+ `name.i.molds
5819 $(molds t.molds)
6383 $(molds t.molds)
5820::
6384::
5821:: Names exported by the directly imported module are visible through its
6385:: Names exported by the directly imported module are visible through its
5822:: face; a matching prelude alias is also visible without a qualifier.
6386:: face; a matching prelude alias is also visible without a qualifier.
5823::
6387::
6388+++ jrec-alias
6389+ |= [origin=path name=term molds=imold-types]
6390+ ^- (unit term)
6391+ ?~ molds ~
6392+ =/ template=ischeme template.i.molds
6393+ ?: &(?=(~ vars.template) ?=(%jrec -.typ.template) =(at.typ.template origin) =(name.typ.template name)) `name.i.molds
6394+ $(molds t.molds)
6395+::
5824++ itype-in-import
6396++ itype-in-import
5825 |= [t=itype iface=ifile face=term prelude=(unit ifile)]
6397 |= [t=itype iface=ifile face=term prelude=(unit ifile)]
5826 ^- itype
6398 ^- itype
@@ -5840,6 +6412,12 @@
5840 `(crip "{(trip u.alias)}.{(trip face)}")
6412 `(crip "{(trip u.alias)}.{(trip face)}")
5841 [%union (turn cases.t |=(c=itype (itype-in-import c iface face prelude))) origin.t label (turn args.t |=(c=itype (itype-in-import c iface face prelude)))]
6413 [%union (turn cases.t |=(c=itype (itype-in-import c iface face prelude))) origin.t label (turn args.t |=(c=itype (itype-in-import c iface face prelude)))]
5842 %recursive [%recursive module.t name.t ~]
6414 %recursive [%recursive module.t name.t ~]
6415+ %jrec
6416+ =/ public=(unit term) ?~(prelude ~ (jrec-alias at.t name.t molds.u.prelude))
6417+ ?^ public t(label `u.public)
6418+ =/ alias=(unit term) (jrec-alias at.t name.t molds.iface)
6419+ ?~ alias t(label ~)
6420+ t(label `(crip "{(trip u.alias)}.{(trip face)}"))
5843 %collection [%collection name.t (turn args.t |=(c=itype (itype-in-import c iface face prelude)))]
6421 %collection [%collection name.t (turn args.t |=(c=itype (itype-in-import c iface face prelude)))]
5844 %face [%face name.t $(t body.t)]
6422 %face [%face name.t $(t body.t)]
5845 %fn [%fn $(t sample.t) $(t product.t)]
6423 %fn [%fn $(t sample.t) $(t product.t)]
@@ -5913,9 +6491,46 @@
5913 =/ rest=[params=iparams vars=(list @ud) next=@ud] $(names t.names, next +(next))
6491 =/ rest=[params=iparams vars=(list @ud) next=@ud] $(names t.names, next +(next))
5914 [[[i.names [%var next]] params.rest] [next vars.rest] next.rest]
6492 [[[i.names [%var next]] params.rest] [next vars.rest] next.rest]
5915::
6493::
6494+:: Recognize a unique top-level source mold with exactly a null case and a
6495+:: faced atom-headed cell whose faced tail names that same mold. Its Jibb
6496+:: path and name provide nominal identity. Other recursive shapes fail closed;
6497+:: construction and matching expose the proven shape one layer at a time.
6498+++ simple-source-recursive
6499+ |= [name=term sh=shape state=istate]
6500+ ^- (unit itype)
6501+ ?. (lien top-molds.state |=(n=term =(n name))) ~
6502+ =/ original=(unit shape) (find-simple-mold name molds.state)
6503+ ?~ original ~
6504+ ?. =(u.original sh) ~
6505+ ?. ?=(%union -.sh) ~
6506+ =/ cs=(list shape) cases.sh
6507+ ?~ cs ~
6508+ ?~ t.cs ~
6509+ ?^ t.t.cs ~
6510+ ?. ?=(%const -.i.cs) ~
6511+ ?. =(%null form.lit.i.cs) ~
6512+ ?. ?=(%cell -.i.t.cs) ~
6513+ =/ fs=(list field) fields.i.t.cs
6514+ ?~ fs ~
6515+ ?~ t.fs ~
6516+ ?^ t.t.fs ~
6517+ ?. ?=(%face -.i.fs) ~
6518+ ?. ?=(%aura -.shape.i.fs) ~
6519+ ?. !=(0 aura.shape.i.fs) ~
6520+ ?. ?=(%face -.i.t.fs) ~
6521+ ?. !=(name.i.fs name.i.t.fs) ~
6522+ =/ tail=shape shape.i.t.fs
6523+ ?. ?=(%ref -.tail) ~
6524+ ?. =(names.tail ~[name]) ~
6525+ `[%jrec at.state name `name name.i.fs aura.shape.i.fs name.i.t.fs]
6526+::
5916++ infer-mold-template
6527++ infer-mold-template
5917 |= [sh=shape state=istate]
6528 |= [sh=shape state=istate]
5918 ^- (unit [template=ischeme state=istate])
6529 ^- (unit [template=ischeme state=istate])
6530+ =/ direct=(unit itype)
6531+ ?. ?=([@ ~] active.state) ~
6532+ (simple-source-recursive i.active.state sh state)
6533+ ?^ direct `[[u.direct ~] state]
5919 ?: ?=(%generic -.sh)
6534 ?: ?=(%generic -.sh)
5920 ?~ vars.sh ~
6535 ?~ vars.sh ~
5921 ?. (distinct-params vars.sh) ~
6536 ?. (distinct-params vars.sh) ~
@@ -5923,17 +6538,19 @@
5923 =/ out=(unit [typ=itype state=istate])
6538 =/ out=(unit [typ=itype state=istate])
5924 (infer-simple-shape body.sh state(next next.fresh, params params.fresh, in-mold &))
6539 (infer-simple-shape body.sh state(next next.fresh, params params.fresh, in-mold &))
5925 ?~ out ~
6540 ?~ out ~
6541+ ?^ (unresolved-hole holes.state.u.out holes.state state.u.out) ~
5926 ?: &(?=(%union -.typ.u.out) !?=(%union -.body.sh) ?=(~ origin.typ.u.out)) ~
6542 ?: &(?=(%union -.typ.u.out) !?=(%union -.body.sh) ?=(~ origin.typ.u.out)) ~
5927 =? typ.u.out &(?=(%union -.typ.u.out) ?=(%union -.body.sh))
6543 =? typ.u.out &(?=(%union -.typ.u.out) ?=(%union -.body.sh))
5928 typ.u.out(args (turn vars.fresh |=(n=@ud `itype`[%var n])))
6544 typ.u.out(args (turn vars.fresh |=(n=@ud `itype`[%var n])))
5929 =/ used=(list @ud) (itype-vars typ.u.out)
6545 =/ used=(list @ud) (itype-vars typ.u.out)
5930 ?. (levy used |=(n=@ud (lien vars.fresh |=(p=@ud =(p n))))) ~
6546 ?. (levy used |=(n=@ud (lien vars.fresh |=(p=@ud =(p n))))) ~
5931− `[[typ.u.out vars.fresh] state.u.out(params params.state, in-mold in-mold.state)]
6547+ `[[typ.u.out vars.fresh] state.u.out(params params.state, in-mold in-mold.state, holes holes.state)]
5932 =/ out=(unit [typ=itype state=istate])
6548 =/ out=(unit [typ=itype state=istate])
5933 (infer-simple-shape sh state(params ~, in-mold &))
6549 (infer-simple-shape sh state(params ~, in-mold &))
5934 ?~ out ~
6550 ?~ out ~
6551+ ?^ (unresolved-hole holes.state.u.out holes.state state.u.out) ~
5935 ?: ?=(^ (itype-vars typ.u.out)) ~
6552 ?: ?=(^ (itype-vars typ.u.out)) ~
5936− `[[typ.u.out ~] state.u.out(params params.state, in-mold in-mold.state)]
6553+ `[[typ.u.out ~] state.u.out(params params.state, in-mold in-mold.state, holes holes.state)]
5937::
6554::
5938:: A direct imported reference may carry definite reader evidence. Only
6555:: A direct imported reference may carry definite reader evidence. Only
5939:: uniquely supplied, declared inputs are used; unsupported data stay generic.
6556:: uniquely supplied, declared inputs are used; unsupported data stay generic.
@@ -6036,13 +6653,15 @@
6036 |= [sh=shape state=istate]
6653 |= [sh=shape state=istate]
6037 ^- (unit [typ=itype state=istate])
6654 ^- (unit [typ=itype state=istate])
6038 ?- -.sh
6655 ?- -.sh
6656+ %hole `[[%var next.state] state(next +(next.state), holes [[next.state at.sh] holes.state])]
6039 %aura
6657 %aura
6040 ?: =(0 aura.sh) `[[%any-atom ~] state]
6658 ?: =(0 aura.sh) `[[%any-atom ~] state]
6041 `[[%atom aura.sh] state]
6659 `[[%atom aura.sh] state]
6042 %flag `[[%flag ~] state]
6660 %flag `[[%flag ~] state]
6043 %noun `[[%noun ~] state]
6661 %noun `[[%noun ~] state]
6044 %const
6662 %const
6045− ?. |(=(%term form.lit.sh) =(%null form.lit.sh)) ~
6663+ ?. |(=(%term form.lit.sh) =(%null form.lit.sh) =(%loobean form.lit.sh)) ~
6664+ ?: &(=(%loobean form.lit.sh) !|(=(0 val.lit.sh) =(1 val.lit.sh))) ~
6046 `[[%const lit.sh] state]
6665 `[[%const lit.sh] state]
6047 %union
6666 %union
6048 =/ pairs=(list upair) (union-pairs cases.sh molds.state)
6667 =/ pairs=(list upair) (union-pairs cases.sh molds.state)
@@ -6086,10 +6705,13 @@
6086 ?~ prelude-entry ~
6705 ?~ prelude-entry ~
6087 ?^ vars.u.prelude-entry ~
6706 ?^ vars.u.prelude-entry ~
6088 `[typ.u.prelude-entry state]
6707 `[typ.u.prelude-entry state]
6708+ =/ direct=(unit itype) (simple-source-recursive n u.found state)
6709+ ?^ direct `[u.direct state]
6089 =/ out=(unit [typ=itype state=istate])
6710 =/ out=(unit [typ=itype state=istate])
6090 $(sh u.found, state state(active [n active.state], in-mold &, params ~))
6711 $(sh u.found, state state(active [n active.state], in-mold &, params ~))
6091 ?~ out ~
6712 ?~ out ~
6713+ ?^ (unresolved-hole holes.state.u.out holes.state state.u.out) ~
6092− `[(label-direct-union typ.u.out u.found n state) state.u.out(active active.state, in-mold in-mold.state, params params.state)]
6714+ `[(label-direct-union typ.u.out u.found n state) state.u.out(active active.state, in-mold in-mold.state, params params.state, holes holes.state)]
6093 %apply
6715 %apply
6094 ?~ ref.sh ~
6716 ?~ ref.sh ~
6095 =/ args=(unit [types=(list itype) state=istate]) (infer-shape-args args.sh state)
6717 =/ args=(unit [types=(list itype) state=istate]) (infer-shape-args args.sh state)
@@ -6123,11 +6745,12 @@
6123 =/ out=(unit [typ=itype state=istate])
6745 =/ out=(unit [typ=itype state=istate])
6124 $(sh body.u.found, state state.u.args(active [n active.state.u.args], in-mold &, params u.params))
6746 $(sh body.u.found, state state.u.args(active [n active.state.u.args], in-mold &, params u.params))
6125 ?~ out ~
6747 ?~ out ~
6748+ ?^ (unresolved-hole holes.state.u.out holes.state.u.args state.u.out) ~
6126 ?: &(?=(%union -.typ.u.out) !?=(%union -.body.u.found) ?=(~ origin.typ.u.out)) ~
6749 ?: &(?=(%union -.typ.u.out) !?=(%union -.body.u.found) ?=(~ origin.typ.u.out)) ~
6127 ?: &(?=(%union -.typ.u.out) ?=(%union -.body.u.found) !(lien top-molds.state.u.args |=(x=term =(x n)))) ~
6750 ?: &(?=(%union -.typ.u.out) ?=(%union -.body.u.found) !(lien top-molds.state.u.args |=(x=term =(x n)))) ~
6128 =? typ.u.out &(?=(%union -.typ.u.out) ?=(%union -.body.u.found))
6751 =? typ.u.out &(?=(%union -.typ.u.out) ?=(%union -.body.u.found))
6129 (label-direct-union typ.u.out(args types.u.args) u.found n state.u.args)
6752 (label-direct-union typ.u.out(args types.u.args) u.found n state.u.args)
6130− `[typ.u.out state.u.out(active active.state.u.args, in-mold in-mold.state.u.args, params params.state.u.args)]
6753+ `[typ.u.out state.u.out(active active.state.u.args, in-mold in-mold.state.u.args, params params.state.u.args, holes holes.state.u.args)]
6131 %tvar
6754 %tvar
6132 =/ param=(unit itype) (iparam-lookup name.sh params.state)
6755 =/ param=(unit itype) (iparam-lookup name.sh params.state)
6133 ?^ param `[u.param state]
6756 ?^ param `[u.param state]
@@ -6167,12 +6790,12 @@
6167 ^- isample-result
6790 ^- isample-result
6168 ?- -.s
6791 ?- -.s
6169 %bind
6792 %bind
6170− ?: |(?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
6793+ ?: |(=(name.s %proj) ?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
6171 [%| "sample shadows a name"]
6794 [%| "sample shadows a name"]
6172 =/ t=itype [%var next.state]
6795 =/ t=itype [%var next.state]
6173 [%& t [[name.s [t ~]] env] state(next +(next.state), binders [next.state binders.state])]
6796 [%& t [[name.s [t ~]] env] state(next +(next.state), binders [next.state binders.state])]
6174 %face
6797 %face
6175− ?: |(?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
6798+ ?: |(=(name.s %proj) ?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
6176 [%| "sample shadows a name"]
6799 [%| "sample shadows a name"]
6177 =/ t=(unit [typ=itype state=istate]) (infer-simple-shape shape.s state)
6800 =/ t=(unit [typ=itype state=istate]) (infer-simple-shape shape.s state)
6178 ?~ t [%| "sample mold is not supported by partial inference"]
6801 ?~ t [%| "sample mold is not supported by partial inference"]
@@ -6240,6 +6863,7 @@
6240 |-
6863 |-
6241 ?~ ds &
6864 ?~ ds &
6242 ?: ?=(%mold -.i.ds) $(ds t.ds)
6865 ?: ?=(%mold -.i.ds) $(ds t.ds)
6866+ ?: =(name.i.ds %proj) |
6243 ?. (unique-value-name name.i.ds names) |
6867 ?. (unique-value-name name.i.ds names) |
6244 ?: ?=(^ (ienv-lookup name.i.ds env)) |
6868 ?: ?=(^ (ienv-lookup name.i.ds env)) |
6245 ?: (lien globals.state |=(n=term =(n name.i.ds))) |
6869 ?: (lien globals.state |=(n=term =(n name.i.ds))) |
@@ -6263,6 +6887,7 @@
6263 |-
6887 |-
6264 ?~ locals &
6888 ?~ locals &
6265 =/ n=term name.i.locals
6889 =/ n=term name.i.locals
6890+ ?: =(n %proj) |
6266 ?. (unique-value-name n names) |
6891 ?. (unique-value-name n names) |
6267 ?: (lien molds.state |=(m=[name=term body=shape] =(n name.m))) |
6892 ?: (lien molds.state |=(m=[name=term body=shape] =(n name.m))) |
6268 ?: (lien marks.state |=(m=term =(n m))) |
6893 ?: (lien marks.state |=(m=term =(n m))) |
@@ -6442,6 +7067,10 @@
6442 =/ retried=? ?=(%| -.inferred)
7067 =/ retried=? ?=(%| -.inferred)
6443 =? inferred retried (infer-recursive-gate d env local-state)
7068 =? inferred retried (infer-recursive-gate d env local-state)
6444 ?: ?=(%| -.inferred) $(ds t.ds, remaining [d remaining])
7069 ?: ?=(%| -.inferred) $(ds t.ds, remaining [d remaining])
7070+ =. state.p.inferred (promote-restricted-numbers state.p.inferred env)
7071+ =. state.p.inferred (default-hole-numbers holes.state.p.inferred holes.state state.p.inferred env !(itype-has-gate (itype-normalize typ.p.inferred sub.state.p.inferred)))
7072+ =/ hole=(unit idiag) (unresolved-hole holes.state.p.inferred holes.state state.p.inferred)
7073+ ?^ hole [%| u.hole]
6445 =/ merged=(unit [first=icap second=icap])
7074 =/ merged=(unit [first=icap second=icap])
6446 (merged-capitals caps.state.p.inferred sub.state.p.inferred)
7075 (merged-capitals caps.state.p.inferred sub.state.p.inferred)
6447 ?^ merged
7076 ?^ merged
@@ -6457,7 +7086,7 @@
6457 (weld (free-env-vars env sub.state.p.inferred) (free-cap-vars caps.state sub.state.p.inferred))
7086 (weld (free-env-vars env sub.state.p.inferred) (free-cap-vars caps.state sub.state.p.inferred))
6458 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
7087 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
6459 =. vars (skim vars |=(n=@ud !(lien free |=(f=@ud =(f n)))))
7088 =. vars (skim vars |=(n=@ud !(lien free |=(f=@ud =(f n)))))
6460− $(ds t.ds, env [[name.d [typ vars]] env], state state.p.inferred(caps caps.state), progressed &)
7089+ $(ds t.ds, env [[name.d [typ vars]] env], state state.p.inferred(caps caps.state, holes holes.state), progressed &)
6461::
7090::
6462:: Try complete cyclic local groups after individual definitions stall.
7091:: Try complete cyclic local groups after individual definitions stall.
6463:: Components with non-gates or unresolved constraints stay unavailable.
7092:: Components with non-gates or unresolved constraints stay unavailable.
@@ -6776,7 +7405,7 @@
6776 [%| ["list branch pattern is not supported by partial inference" ~]]
7405 [%| ["list branch pattern is not supported by partial inference" ~]]
6777 =/ binder=(unit [head=term tail=term]) ?:(first-empty second-name first-name)
7406 =/ binder=(unit [head=term tail=term]) ?:(first-empty second-name first-name)
6778 ?~ binder [%| ["list branch pattern is not supported by partial inference" ~]]
7407 ?~ binder [%| ["list branch pattern is not supported by partial inference" ~]]
6779− ?: |(=(head.u.binder tail.u.binder) ?=(^ (ienv-lookup head.u.binder env)) ?=(^ (ienv-lookup tail.u.binder env)) (lien globals.state |=(n=term |(=(n head.u.binder) =(n tail.u.binder)))))
7408+ ?: |(=(head.u.binder %proj) =(tail.u.binder %proj) =(head.u.binder tail.u.binder) ?=(^ (ienv-lookup head.u.binder env)) ?=(^ (ienv-lookup tail.u.binder env)) (lien globals.state |=(n=term |(=(n head.u.binder) =(n tail.u.binder)))))
6780 [%| ["pattern binder shadows a name" ~]]
7409 [%| ["pattern binder shadows a name" ~]]
6781 =/ extended=ienv [[head.u.binder [i.args.typ ~]] [tail.u.binder [typ ~]] env]
7410 =/ extended=ienv [[head.u.binder [i.args.typ ~]] [tail.u.binder [typ ~]] env]
6782 =/ left=iresult
7411 =/ left=iresult
@@ -6813,7 +7442,7 @@
6813 [%| ["unit branch pattern is not supported by partial inference" ~]]
7442 [%| ["unit branch pattern is not supported by partial inference" ~]]
6814 =/ binder=(unit term) ?:(first-empty second-name first-name)
7443 =/ binder=(unit term) ?:(first-empty second-name first-name)
6815 ?~ binder [%| ["unit branch pattern is not supported by partial inference" ~]]
7444 ?~ binder [%| ["unit branch pattern is not supported by partial inference" ~]]
6816− ?: |(?=(^ (ienv-lookup u.binder env)) (lien globals.state |=(n=term =(n u.binder))))
7445+ ?: |(=(u.binder %proj) ?=(^ (ienv-lookup u.binder env)) (lien globals.state |=(n=term =(n u.binder))))
6817 [%| ["pattern binder shadows a name" ~]]
7446 [%| ["pattern binder shadows a name" ~]]
6818 =/ payload=(unit itype) (unit-union-payload typ)
7447 =/ payload=(unit itype) (unit-union-payload typ)
6819 ?~ payload [%| ["unit branch subject is not supported by partial inference" ~]]
7448 ?~ payload [%| ["unit branch subject is not supported by partial inference" ~]]
@@ -6845,12 +7474,14 @@
6845 =/ t=itype (itype-normalize typ.p.item sub.state.p.item)
7474 =/ t=itype (itype-normalize typ.p.item sub.state.p.item)
6846 ?: |(?=(%atom -.t) ?=(%any-atom -.t))
7475 ?: |(?=(%atom -.t) ?=(%any-atom -.t))
6847 $(ps t.ps, state state.p.item)
7476 $(ps t.ps, state state.p.item)
6848− ?: &(?=(%nvar -.t) ?=(%lit -.p.i.ps) =(%number form.lit.p.i.ps))
7477+ ?: &(|(?=(%nvar -.t) ?=(%rnvar -.t)) ?=(%lit -.p.i.ps) =(%number form.lit.p.i.ps))
6849 $(ps t.ps, state state.p.item)
7478 $(ps t.ps, state state.p.item)
6850 ?: &(?=(%collection -.t) =(%list name.t) =(~[[%atom 'tD']] args.t))
7479 ?: &(?=(%collection -.t) =(%list name.t) =(~[[%atom 'tD']] args.t))
6851 $(ps t.ps, state state.p.item)
7480 $(ps t.ps, state state.p.item)
6852 ?: &(?=(%avar -.t) (atom-var-from-cap id.t caps.state.p.item sub.state.p.item))
7481 ?: &(?=(%avar -.t) (atom-var-from-cap id.t caps.state.p.item sub.state.p.item))
6853 [%| ["a generic atom in interpolation needs an aura" ~[[(span-of p.i.ps) "atom with a generic aura"]]]]
7482 [%| ["a generic atom in interpolation needs an aura" ~[[(span-of p.i.ps) "atom with a generic aura"]]]]
7483+ ?: &(?=(%rvar -.t) (atom-var-from-cap id.t caps.state.p.item sub.state.p.item))
7484+ [%| ["a generic atom in interpolation needs an aura" ~[[(span-of p.i.ps) "atom with a generic aura"]]]]
6854 ?: ?=(%cell -.t)
7485 ?: ?=(%cell -.t)
6855 [%| ["a cell in interpolation needs a printer" ~[[(span-of p.i.ps) "cell without a printer"]]]]
7486 [%| ["a cell in interpolation needs a printer" ~[[(span-of p.i.ps) "cell without a printer"]]]]
6856 [%| ["interpolation type needs unsupported inference" ~]]
7487 [%| ["interpolation type needs unsupported inference" ~]]
@@ -6913,7 +7544,7 @@
6913 ^- (unit ienv)
7544 ^- (unit ienv)
6914 =. t ?:(?=(%face -.t) body.t t)
7545 =. t ?:(?=(%face -.t) body.t t)
6915 ?: ?=(%bind -.p)
7546 ?: ?=(%bind -.p)
6916− ?: |(?=(^ (ienv-lookup name.p env)) (lien globals |=(n=term =(n name.p)))) ~
7547+ ?: |(=(name.p %proj) ?=(^ (ienv-lookup name.p env)) (lien globals |=(n=term =(n name.p)))) ~
6917 `[[name.p [t ~]] env]
7548 `[[name.p [t ~]] env]
6918 ?: ?=(%cell -.p) (union-pattern-bind-items items.p t env globals)
7549 ?: ?=(%cell -.p) (union-pattern-bind-items items.p t env globals)
6919 `env
7550 `env
@@ -6961,10 +7592,9 @@
6961 $(xs t.xs, out (weld out rows), origin +(origin))
7592 $(xs t.xs, out (weld out rows), origin +(origin))
6962::
7593::
6963++ infer-known-union-whole
7594++ infer-known-union-whole
6964− |= [e=expr env=ienv state=istate]
7595+ |= [e=expr env=ienv subject=iresult]
6965 ^- (unit iresult)
7596 ^- (unit iresult)
6966 ?> ?=(%branch -.e)
7597 ?> ?=(%branch -.e)
6967− =/ subject=iresult (infer-fragment subject.e env state)
6968 ?: ?=(%| -.subject) `subject
7598 ?: ?=(%| -.subject) `subject
6969 =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7599 =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
6970 ?. ?=(%union -.typ) `[%| ["branch is not supported by partial inference" ~]]
7600 ?. ?=(%union -.typ) `[%| ["branch is not supported by partial inference" ~]]
@@ -6999,10 +7629,9 @@
6999 $(arms t.arms, remaining (skim remaining |=(c=itype !=(%full (union-pattern pat.a c)))), st state.p.body, answer `result)
7629 $(arms t.arms, remaining (skim remaining |=(c=itype !=(%full (union-pattern pat.a c)))), st state.p.body, answer `result)
7000::
7630::
7001++ infer-known-union-context-whole
7631++ infer-known-union-context-whole
7002− |= [e=expr expected=itype env=ienv state=istate context=span]
7632+ |= [e=expr expected=itype env=ienv subject=iresult context=span]
7003 ^- (unit iresult)
7633 ^- (unit iresult)
7004 ?> ?=(%branch -.e)
7634 ?> ?=(%branch -.e)
7005− =/ subject=iresult (infer-fragment subject.e env state)
7006 ?: ?=(%| -.subject) `subject
7635 ?: ?=(%| -.subject) `subject
7007 =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7636 =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7008 ?. ?=(%union -.typ) `[%| ["branch is not supported by partial inference" ~]]
7637 ?. ?=(%union -.typ) `[%| ["branch is not supported by partial inference" ~]]
@@ -7044,10 +7673,9 @@
7044 $(arms t.arms, remaining (skim remaining |=(c=itype !=(%full (union-pattern pat.a c)))), st state.p.body(sub sub.fit, next next.fit), answer `expected)
7673 $(arms t.arms, remaining (skim remaining |=(c=itype !=(%full (union-pattern pat.a c)))), st state.p.body(sub sub.fit, next next.fit), answer `expected)
7045::
7674::
7046++ infer-known-union-finite
7675++ infer-known-union-finite
7047− |= [e=expr env=ienv state=istate expected=(unit [typ=itype context=span])]
7676+ |= [e=expr env=ienv subject=iresult expected=(unit [typ=itype context=span])]
7048 ^- iresult
7677 ^- iresult
7049 ?> ?=(%branch -.e)
7678 ?> ?=(%branch -.e)
7050− =/ subject=iresult (infer-fragment subject.e env state)
7051 ?: ?=(%| -.subject) subject
7679 ?: ?=(%| -.subject) subject
7052 =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7680 =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7053 ?. ?=(%union -.typ) [%| ["branch is not supported by partial inference" ~]]
7681 ?. ?=(%union -.typ) [%| ["branch is not supported by partial inference" ~]]
@@ -7142,29 +7770,108 @@
7142 [%| ["single-case branch result needs context in partial inference" ~]]
7770 [%| ["single-case branch result needs context in partial inference" ~]]
7143 [%& typ.u.expected state.p.body(sub sub.fit, next next.fit)]
7771 [%& typ.u.expected state.p.body(sub sub.fit, next next.fit)]
7144::
7772::
7773+:: This view is used only by pattern analysis, never exported or bound as
7774+:: the subject. Only null plus a two-binder/wildcard cell is supported; its
7775+:: tail keeps the original recursive type. Other patterns fail closed.
7776+++ jrec-match-view
7777+ |= [e=expr subject=iresult]
7778+ ^- iresult
7779+ ?: ?=(%| -.subject) subject
7780+ ?. ?=(%branch -.e) subject
7781+ =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7782+ ?. ?=(%jrec -.typ) subject
7783+ ?~ arms.e subject
7784+ ?~ t.arms.e subject
7785+ ?^ t.t.arms.e subject
7786+ =/ x=pattern pat.i.arms.e
7787+ =/ y=pattern pat.i.t.arms.e
7788+ =/ empty=? &(?=(%lit -.x) =(%null form.lit.x))
7789+ =/ full=pattern ?:(empty y x)
7790+ ?. |(empty &(?=(%lit -.y) =(%null form.lit.y))) subject
7791+ ?. ?=(%cell -.full) subject
7792+ ?~ items.full subject
7793+ ?~ t.items.full subject
7794+ ?^ t.t.items.full subject
7795+ ?. |(?=(%bind -.i.items.full) ?=(%any -.i.items.full)) subject
7796+ ?. |(?=(%bind -.i.t.items.full) ?=(%any -.i.t.items.full)) subject
7797+ ?: =(0 jrec-fuel.state.p.subject)
7798+ [%| ["recursive mold unfolding needs unsupported inference" ~]]
7799+ =/ nil=itype [%const [%null %n 0 '~']]
7800+ =/ cell=itype [%cell [%face head.typ [%atom aura.typ]] [%face tail.typ typ]]
7801+ [%& [%union ~[nil cell] ~ ~ ~] state.p.subject(jrec-fuel (dec jrec-fuel.state.p.subject))]
7802+::
7803+++ infer-known-union-branch-subject
7804+ |= [e=expr env=ienv subject=iresult]
7805+ ^- iresult
7806+ =. subject (jrec-match-view e subject)
7807+ =/ whole=(unit iresult) (infer-known-union-whole e env subject)
7808+ ?~ whole (infer-known-union-finite e env subject ~)
7809+ u.whole
7810+::
7145++ infer-known-union-branch
7811++ infer-known-union-branch
7146 |= [e=expr env=ienv state=istate]
7812 |= [e=expr env=ienv state=istate]
7147 ^- iresult
7813 ^- iresult
7148− =/ whole=(unit iresult) (infer-known-union-whole e env state)
7814+ ?> ?=(%branch -.e)
7149− ?~ whole (infer-known-union-finite e env state ~)
7815+ (infer-known-union-branch-subject e env (infer-fragment subject.e env state))
7150− u.whole
7151::
7816::
7152−++ infer-known-union-context
7817+++ infer-known-union-context-subject
7153− |= [e=expr expected=itype env=ienv state=istate context=span]
7818+ |= [e=expr expected=itype env=ienv subject=iresult context=span]
7154 ^- iresult
7819 ^- iresult
7820+ =. subject (jrec-match-view e subject)
7155− =/ whole=(unit iresult) (infer-known-union-context-whole e expected env state context)
7821+ =/ whole=(unit iresult) (infer-known-union-context-whole e expected env subject context)
7156− ?~ whole (infer-known-union-finite e env state `[expected context])
7822+ ?~ whole (infer-known-union-finite e env subject `[expected context])
7157 u.whole
7823 u.whole
7158::
7824::
7825+:: Limit speculative subject inference to wings and shallow calls;
7826+:: grouping is peeled linearly and cannot introduce a nested branch.
7827+++ simple-union-subject-arg
7828+ |= e=expr
7829+ ^- ?
7830+ ?- -.e
7831+ %wing &
7832+ %lit &
7833+ %str !(lien pieces.e |=(p=piece ?=(%expr -.p)))
7834+ * |
7835+ ==
7836+::
7837+++ safe-union-subject
7838+ |= e=expr
7839+ ^- ?
7840+ ?: ?=(%group -.e) $(e inner.e)
7841+ ?: ?=(%wing -.e) &
7842+ ?. ?=(%call -.e) |
7843+ ?. ?=(%wing -.head.e) |
7844+ (levy args.e simple-union-subject-arg)
7845+::
7846+++ duplicate-loobean-arms
7847+ |= e=expr
7848+ ^- ?
7849+ ?. ?=(%branch -.e) |
7850+ ?~ arms.e |
7851+ ?~ t.arms.e |
7852+ ?^ t.t.arms.e |
7853+ =/ x=pattern pat.i.arms.e
7854+ =/ y=pattern pat.i.t.arms.e
7855+ ?. &(?=(%lit -.x) ?=(%lit -.y)) |
7856+ ?. &(=(%loobean form.lit.x) =(%loobean form.lit.y)) |
7857+ =(val.lit.x val.lit.y)
7858+::
7859+++ union-subject-call
7860+ |= e=expr
7861+ ^- ?
7862+ ?: ?=(%group -.e) $(e inner.e)
7863+ ?=(%call -.e)
7864+::
7159++ known-union-subject
7865++ known-union-subject
7160 |= [e=expr env=ienv state=istate]
7866 |= [e=expr env=ienv state=istate]
7161− ^- (unit itype)
7867+ ^- (unit iresult)
7162− ?. ?=(%wing -.e) ~
7868+ ?. (safe-union-subject e) ~
7163 =/ subject=iresult (infer-fragment e env state)
7869 =/ subject=iresult (infer-fragment e env state)
7164− ?: ?=(%| -.subject) ~
7870+ ?: ?=(%| -.subject) ?:((union-subject-call e) `subject ~)
7165 =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7871 =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7166− ?. ?=(%union -.typ) ~
7872+ ?. |(?=(%union -.typ) ?=(%jrec -.typ)) ~
7167− `typ
7873+ `subject
7874+::
7168::
7875::
7169:: Infer changes only against a fully known record spine. Retain the
7876:: Infer changes only against a fully known record spine. Retain the
7170:: target type; unknown spines and repeated edits remain unsupported.
7877:: target type; unknown spines and repeated edits remain unsupported.
@@ -7271,7 +7978,7 @@
7271 |= [e=expr actual=itype expected=itype sub=isub next=@ud context=span]
7978 |= [e=expr actual=itype expected=itype sub=isub next=@ud context=span]
7272 ^- (unit idiag)
7979 ^- (unit idiag)
7273 =/ original=[left=itype right=itype] [actual expected]
7980 =/ original=[left=itype right=itype] [actual expected]
7274− ?: |(?=(%var -.left.original) ?=(%avar -.left.original) ?=(%nvar -.left.original) ?=(%var -.right.original) ?=(%avar -.right.original) ?=(%nvar -.right.original)) ~
7981+ ?: |(?=(%var -.left.original) ?=(%avar -.left.original) ?=(%rvar -.left.original) |(?=(%nvar -.left.original) ?=(%rnvar -.left.original)) ?=(%var -.right.original) ?=(%avar -.right.original) ?=(%rvar -.right.original) |(?=(%nvar -.right.original) ?=(%rnvar -.right.original))) ~
7275 =/ fit=ifit (itype-fit actual expected sub next)
7982 =/ fit=ifit (itype-fit actual expected sub next)
7276 ?. ?=(%bad -.fit) ~
7983 ?. ?=(%bad -.fit) ~
7277 =. actual (itype-walk actual sub)
7984 =. actual (itype-walk actual sub)
@@ -7292,7 +7999,7 @@
7292 ?~ items ~
7999 ?~ items ~
7293 ?~ t.items (nested-missing-tag val.i.items actual expected sub next context)
8000 ?~ t.items (nested-missing-tag val.i.items actual expected sub next context)
7294 =/ original=[left=itype right=itype] [actual expected]
8001 =/ original=[left=itype right=itype] [actual expected]
7295− ?: |(?=(%var -.left.original) ?=(%avar -.left.original) ?=(%nvar -.left.original) ?=(%var -.right.original) ?=(%avar -.right.original) ?=(%nvar -.right.original)) ~
8002+ ?: |(?=(%var -.left.original) ?=(%avar -.left.original) ?=(%rvar -.left.original) |(?=(%nvar -.left.original) ?=(%rnvar -.left.original)) ?=(%var -.right.original) ?=(%avar -.right.original) ?=(%rvar -.right.original) |(?=(%nvar -.right.original) ?=(%rnvar -.right.original))) ~
7296 =. actual (itype-walk actual sub)
8003 =. actual (itype-walk actual sub)
7297 =. expected (itype-walk expected sub)
8004 =. expected (itype-walk expected sub)
7298 ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
8005 ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
@@ -7312,6 +8019,15 @@
7312 =/ head=expr [%lit at.e [%term %tas tag.e (crip ['%' (trip tag.e)])]]
8019 =/ head=expr [%lit at.e [%term %tas tag.e (crip ['%' (trip tag.e)])]]
7313 [%tuple at.e ~[[at.e ~ head] [(span-of val.e) ~ val.e]]]
8020 [%tuple at.e ~[[at.e ~ head] [(span-of val.e) ~ val.e]]]
7314::
8021::
8022+:: A segment costs one shared step; dynamic segments are not handled yet.
8023+++ qath-static-fuel
8024+ |= [segs=(list qseg) fuel=@ud]
8025+ ^- (unit @ud)
8026+ ?~ segs `fuel
8027+ ?: =(0 fuel) ~
8028+ ?. ?=(%knot -.i.segs) ~
8029+ $(segs t.segs, fuel (dec fuel))
8030+::
7315++ infer-fragment
8031++ infer-fragment
7316 |= [e=expr env=ienv state=istate]
8032 |= [e=expr env=ienv state=istate]
7317 ^- iresult
8033 ^- iresult
@@ -7354,6 +8070,21 @@
7354 ?: ?=(%| -.result) result
8070 ?: ?=(%| -.result) result
7355 [%& [%collection %list ~[element]] state.p.result]
8071 [%& [%collection %list ~[element]] state.p.result]
7356 %str (infer-string-pieces pieces.e env state)
8072 %str (infer-string-pieces pieces.e env state)
8073+ %qath
8074+ ?~ prelude.state [%| ["application path needs the standard prelude in partial inference" ~]]
8075+ ?. =(at.u.prelude.state /lib/jibb/prelude/jibb)
8076+ [%| ["application path needs the standard prelude in partial inference" ~]]
8077+ =/ standard=(unit ischeme) (find-jibb-mold %qath u.prelude.state)
8078+ ?~ standard [%| ["application path needs the standard prelude in partial inference" ~]]
8079+ ?. ?=(~ vars.u.standard) [%| ["application path mold needs unsupported inference" ~]]
8080+ =/ typ=itype typ.u.standard
8081+ ?. ?=(%jrec -.typ) [%| ["application path mold needs unsupported inference" ~]]
8082+ ?. &(=(at.typ /lib/jibb/internal/jibb) =(%qath name.typ) =(%i head.typ) =(%ta aura.typ) =(%t tail.typ))
8083+ [%| ["application path mold needs unsupported inference" ~]]
8084+ ?: =(0 jrec-fuel.state) [%| ["recursive mold unfolding needs unsupported inference" ~]]
8085+ =/ remain=(unit @ud) (qath-static-fuel segs.e (dec jrec-fuel.state))
8086+ ?~ remain [%| ["application path segments need unsupported inference" ~]]
8087+ [%& typ state(jrec-fuel u.remain)]
7357 %wing
8088 %wing
7358 ?~ names.e [%| ["empty wing" ~]]
8089 ?~ names.e [%| ["empty wing" ~]]
7359 ?^ t.names.e
8090 ?^ t.names.e
@@ -7396,6 +8127,9 @@
7396 [%| ["local molds shadow a name" ~]]
8127 [%| ["local molds shadow a name" ~]]
7397 =/ local-state=istate
8128 =/ local-state=istate
7398 state(globals (weld local-names globals.state), molds (weld local-molds molds.state))
8129 state(globals (weld local-names globals.state), molds (weld local-molds molds.state))
8130+ =/ mold-hole=(unit span) (simple-local-mold-hole defs.e)
8131+ ?^ mold-hole
8132+ [%| ["type hole needs a determined type" ~[[u.mold-hole "unresolved type hole"]]]]
7399 ?. (local-molds-supported local-molds local-state)
8133 ?. (local-molds-supported local-molds local-state)
7400 [%| ["local molds need unsupported inference" ~]]
8134 [%| ["local molds need unsupported inference" ~]]
7401 =/ values=(list def) (local-value-defs defs.e)
8135 =/ values=(list def) (local-value-defs defs.e)
@@ -7410,9 +8144,10 @@
7410 ?: (single-structured-pattern e) (infer-single-case-branch e env state ~)
8144 ?: (single-structured-pattern e) (infer-single-case-branch e env state ~)
7411 (infer-cell-branch e env state ~)
8145 (infer-cell-branch e env state ~)
7412 ?^ t.t.arms.e (infer-known-union-branch e env state)
8146 ?^ t.t.arms.e (infer-known-union-branch e env state)
7413− =/ known=(unit itype) (known-union-subject subject.e env state)
8147+ =/ known=(unit iresult) (known-union-subject subject.e env state)
8148+ ?: &(?=(^ known) ?=(%| -.u.known) !(duplicate-loobean-arms e)) u.known
7414− ?: &(?=(^ known) ?=(~ (unit-union-payload u.known)))
8149+ ?: &(?=(^ known) ?=(%& -.u.known) ?=(~ (unit-union-payload (itype-normalize typ.p.u.known sub.state.p.u.known))))
7415− (infer-known-union-branch e env state)
8150+ (infer-known-union-branch-subject e env u.known)
7416 =/ x=arm i.arms.e
8151 =/ x=arm i.arms.e
7417 =/ y=arm i.t.arms.e
8152 =/ y=arm i.t.arms.e
7418 ?: |((unit-empty-pattern pat.x) (unit-empty-pattern pat.y))
8153 ?: |((unit-empty-pattern pat.x) (unit-empty-pattern pat.y))
@@ -7421,7 +8156,7 @@
7421 ?. ?=(%lit -.pat.y) (infer-known-union-branch e env state)
8156 ?. ?=(%lit -.pat.y) (infer-known-union-branch e env state)
7422 ?. &(=(%loobean form.lit.pat.x) =(%loobean form.lit.pat.y))
8157 ?. &(=(%loobean form.lit.pat.x) =(%loobean form.lit.pat.y))
7423 (infer-known-union-branch e env state)
8158 (infer-known-union-branch e env state)
7424− ?^ known (infer-known-union-branch e env state)
8159+ ?: &(?=(^ known) ?=(%& -.u.known)) (infer-known-union-branch-subject e env u.known)
7425 ?: =(val.lit.pat.x val.lit.pat.y)
8160 ?: =(val.lit.pat.x val.lit.pat.y)
7426 [%| ["branch does not cover both loobeans" ~]]
8161 [%| ["branch does not cover both loobeans" ~]]
7427 =/ subject=iresult $(e subject.e)
8162 =/ subject=iresult $(e subject.e)
@@ -7462,6 +8197,9 @@
7462 =/ value=iresult
8197 =/ value=iresult
7463 (infer-call-context-arg val.e typ.u.target env state.u.target at.shape.e)
8198 (infer-call-context-arg val.e typ.u.target env state.u.target at.shape.e)
7464 ?: ?=(%| -.value) value
8199 ?: ?=(%| -.value) value
8200+ =/ shape=(unit [source=iwfields target=iwfields])
8201+ (width-shape typ.p.value typ.u.target sub.state.p.value)
8202+ ?^ shape [%| ["record width constraint needs unsupported inference" ~]]
7465 =/ fit=ifit (itype-fit typ.p.value typ.u.target sub.state.p.value next.state.p.value)
8203 =/ fit=ifit (itype-fit typ.p.value typ.u.target sub.state.p.value next.state.p.value)
7466 ?: ?=(%unknown -.fit) [%| ["cast constraint is not supported by partial inference" ~]]
8204 ?: ?=(%unknown -.fit) [%| ["cast constraint is not supported by partial inference" ~]]
7467 ?: ?=(%bad -.fit)
8205 ?: ?=(%bad -.fit)
@@ -7493,6 +8231,8 @@
7493 [%& [%fn typ.p.sam typ.p.body] state.p.body]
8231 [%& [%fn typ.p.sam typ.p.body] state.p.body]
7494 %call
8232 %call
7495 ?~ args.e [%| ["call has no argument" ~]]
8233 ?~ args.e [%| ["call has no argument" ~]]
8234+ ?: (explicit-proj-call e env state)
8235+ [%| ["proj needs an expected record type" ~]]
7496 (infer-call-with-head e env state (infer-fragment head.e env state))
8236 (infer-call-with-head e env state (infer-fragment head.e env state))
7497 * [%| ["expression is not supported by partial inference" ~]]
8237 * [%| ["expression is not supported by partial inference" ~]]
7498 ==
8238 ==
@@ -7503,6 +8243,20 @@
7503::
8243::
7504:: Check a call using the head already inferred in this state. Keeping
8244:: Check a call using the head already inferred in this state. Keeping
7505:: this shared avoids evaluating or instantiating a contextual head twice.
8245:: this shared avoids evaluating or instantiating a contextual head twice.
8246+++ width-has-projections
8247+ |= ps=(list iwprojection)
8248+ ^- ?
8249+ ?~ ps |
8250+ &
8251+::
8252++$ iwidth-elaboration [original=expr typ=itype sub=isub projections=(list iwprojection)]
8253+++ infer-width-elaboration
8254+ |= [e=expr env=ienv state=istate]
8255+ ^- (each iwidth-elaboration idiag)
8256+ =/ out=iresult (infer-fragment e env state)
8257+ ?: ?=(%| -.out) [%| p.out]
8258+ [%& [e typ.p.out sub.state.p.out (flop projections.state.p.out)]]
8259+::
7506++ infer-call-with-head
8260++ infer-call-with-head
7507 |= [e=expr env=ienv state=istate head=iresult]
8261 |= [e=expr env=ienv state=istate head=iresult]
7508 ^- iresult
8262 ^- iresult
@@ -7522,7 +8276,13 @@
7522 =/ st=istate state.p.arg
8276 =/ st=istate state.p.arg
7523 =/ ht=itype (itype-walk typ.p.head sub.st)
8277 =/ ht=itype (itype-walk typ.p.head sub.st)
7524 ?: ?=(%fn -.ht)
8278 ?: ?=(%fn -.ht)
8279+ =/ shape=(unit [source=iwfields target=iwfields])
8280+ ?^ t.args.e ~
8281+ (width-shape typ.p.arg sample.ht sub.st)
8282+ ?^ shape [%| ["record width constraint needs unsupported inference" ~]]
8283+ =/ fit=ifit
8284+ ?^ t.args.e (itype-fit-inner typ.p.arg sample.ht sub.st next.st & |)
7525− =/ fit=ifit (itype-fit typ.p.arg sample.ht sub.st next.st)
8285+ (itype-fit typ.p.arg sample.ht sub.st next.st)
7526 ?: ?=(%unknown -.fit) [%| ["call constraint is not supported by partial inference" ~]]
8286 ?: ?=(%unknown -.fit) [%| ["call constraint is not supported by partial inference" ~]]
7527 ?: ?=(%bad -.fit)
8287 ?: ?=(%bad -.fit)
7528 ?~ t.args.e
8288 ?~ t.args.e
@@ -7538,7 +8298,10 @@
7538 =/ arg-at=span ?~(bad whole-args at.u.bad)
8298 =/ arg-at=span ?~(bad whole-args at.u.bad)
7539 =/ arg-type=itype ?~(bad typ.p.arg typ.u.bad)
8299 =/ arg-type=itype ?~(bad typ.p.arg typ.u.bad)
7540 [%| ["call's sample and argument types do not unify" ~[[(span-of head.e) (site-type-note "called gate" ht sub.st)] [arg-at (site-type-note "argument" arg-type sub.st)]]]]
8300 [%| ["call's sample and argument types do not unify" ~[[(span-of head.e) (site-type-note "called gate" ht sub.st)] [arg-at (site-type-note "argument" arg-type sub.st)]]]]
8301+ =/ face-asym=?
8302+ ?^ t.args.e (itype-positional-face-asym args.e typ.p.arg sample.ht sub.fit)
8303+ (itype-face-asym typ.p.arg sample.ht sub.fit)
7541− ?: &((itype-has-face typ.p.arg sub.fit) (itype-face-asym typ.p.arg sample.ht sub.fit) (itype-output-may-be-cell product.ht sub.fit))
8304+ ?: &((itype-has-face typ.p.arg sub.fit) face-asym (itype-output-may-be-cell product.ht sub.fit))
7542 [%| ["call result face propagation is not supported by partial inference" ~]]
8305 [%| ["call result face propagation is not supported by partial inference" ~]]
7543 [%& product.ht st(sub sub.fit, next next.fit)]
8306 [%& product.ht st(sub sub.fit, next next.fit)]
7544 =/ result=itype [%var next.st]
8307 =/ result=itype [%var next.st]
@@ -7552,7 +8315,7 @@
7552 ^- (unit [at=span typ=itype])
8315 ^- (unit [at=span typ=itype])
7553 ?~ args ~
8316 ?~ args ~
7554 =/ original=[left=itype right=itype] [actual expected]
8317 =/ original=[left=itype right=itype] [actual expected]
7555− ?: |(?=(%var -.left.original) ?=(%avar -.left.original) ?=(%nvar -.left.original) ?=(%var -.right.original) ?=(%avar -.right.original) ?=(%nvar -.right.original)) ~
8318+ ?: |(?=(%var -.left.original) ?=(%avar -.left.original) ?=(%rvar -.left.original) |(?=(%nvar -.left.original) ?=(%rnvar -.left.original)) ?=(%var -.right.original) ?=(%avar -.right.original) ?=(%rvar -.right.original) |(?=(%nvar -.right.original) ?=(%rnvar -.right.original))) ~
7556 =. actual (itype-walk actual sub)
8319 =. actual (itype-walk actual sub)
7557 =. expected (itype-walk expected sub)
8320 =. expected (itype-walk expected sub)
7558 ?: &(?=(%face -.expected) !?=(%face -.actual))
8321 ?: &(?=(%face -.expected) !?=(%face -.actual))
@@ -7602,9 +8365,10 @@
7602 [%| ["unit payload does not fit its expected type" ~[[context (site-type-note "expected unit payload" payload sub.state.p.value)] [(span-of val.e) (site-type-note "payload" typ.p.value sub.state.p.value)]]]]
8365 [%| ["unit payload does not fit its expected type" ~[[context (site-type-note "expected unit payload" payload sub.state.p.value)] [(span-of val.e) (site-type-note "payload" typ.p.value sub.state.p.value)]]]]
7603 [%& expected state.p.value(sub sub.fit, next next.fit)]
8366 [%& expected state.p.value(sub sub.fit, next next.fit)]
7604::
8367::
7605−:: A known gate whose result is still an inference variable can receive
7606−:: an enclosing target before its argument is inferred. Other products
8368+:: A known gate may receive an enclosing target before its argument is
8369+:: inferred when its result is open or a direct, matching named generic
8370+:: union. Opaque, recursive, tag-constrained and variable-bound union
7607−:: and unresolved calls use the existing directional path unchanged.
8371+:: results keep the existing directional path.
7608++ infer-contextual-call
8372++ infer-contextual-call
7609 |= [e=expr expected=itype env=ienv state=istate]
8373 |= [e=expr expected=itype env=ienv state=istate]
7610 ^- iresult
8374 ^- iresult
@@ -7615,13 +8379,181 @@
7615 =/ ht=itype (itype-walk typ.p.head sub.state.p.head)
8379 =/ ht=itype (itype-walk typ.p.head sub.state.p.head)
7616 ?. ?=(%fn -.ht) (infer-call-with-head e env state head)
8380 ?. ?=(%fn -.ht) (infer-call-with-head e env state head)
7617 =/ result=itype (itype-walk product.ht sub.state.p.head)
8381 =/ result=itype (itype-walk product.ht sub.state.p.head)
8382+ =/ eligible=?
8383+ ?: ?=(%var -.result) &
8384+ :: A direct known generic union may receive the same nominal result
8385+ :: context before its arguments are checked. Variable-bound origins,
8386+ :: pending tags, recursive identities and unknown atoms stay open.
8387+ ?. &(?=(%union -.product.ht) ?=(%union -.result) ?=(%union -.expected)) |
8388+ ?~ origin.result |
8389+ ?. =(origin.result origin.expected) |
8390+ ?~ args.result |
8391+ ?. =((lent args.result) (lent args.expected)) |
8392+ ?: |((itype-has-tag (itype-normalize result sub.state.p.head)) (itype-has-tag (itype-normalize expected sub.state.p.head))) |
8393+ ?: |((itype-has-recursive (itype-normalize result sub.state.p.head)) (itype-has-recursive (itype-normalize expected sub.state.p.head))) |
8394+ ?: |((itype-has-any-atom result sub.state.p.head) (itype-has-any-atom expected sub.state.p.head)) |
8395+ &
7618− ?. ?=(%var -.result) (infer-call-with-head e env state head)
8396+ ?. eligible (infer-call-with-head e env state head)
7619− ?: |(?=(%var -.expected) ?=(%avar -.expected) ?=(%nvar -.expected) (itype-has-tag (itype-normalize expected sub.state.p.head)))
8397+ ?: |(?=(%var -.expected) ?=(%avar -.expected) ?=(%rvar -.expected) |(?=(%nvar -.expected) ?=(%rnvar -.expected)) (itype-has-tag (itype-normalize expected sub.state.p.head)))
7620 (infer-call-with-head e env state head)
8398 (infer-call-with-head e env state head)
7621 =/ sub=(unit isub) (itype-unify result expected sub.state.p.head)
8399 =/ sub=(unit isub) (itype-unify result expected sub.state.p.head)
7622 ?~ sub (infer-call-with-head e env state head)
8400 ?~ sub (infer-call-with-head e env state head)
7623 (infer-call-with-head e env state [%& typ.p.head state.p.head(sub u.sub)])
8401 (infer-call-with-head e env state [%& typ.p.head state.p.head(sub u.sub)])
7624::
8402::
8403+:: An eligible fully faced literal receives context by name, in source order.
8404+++ width-literal-fields
8405+ |= [items=(list item) axis=@ud fuel=@ud]
8406+ ^- (unit iwfields)
8407+ =/ order=(list iwfield) ~
8408+ =/ index=(map term iwfield) *(map term iwfield)
8409+ |-
8410+ ?~ items ~
8411+ ?: =(0 fuel) ~
8412+ ?~ face.i.items ~
8413+ =/ at-axis=@ud ?~(t.items axis (mul 2 axis))
8414+ =/ entry=iwfield [u.face.i.items at-axis [%noun ~]]
8415+ ?: ?=(^ (~(get by index) name.entry)) ~
8416+ =. index (~(put by index) name.entry entry)
8417+ =. order [entry order]
8418+ ?~ t.items `[(flop order) index]
8419+ $(items t.items, axis +((mul 2 axis)), fuel (dec fuel))
8420+++ width-infer-items
8421+ |= [items=(list item) expected=(map term iwfield) env=ienv state=istate context=span]
8422+ ^- iresult
8423+ ?~ items [%| ["empty record is not supported" ~]]
8424+ ?~ face.i.items [%| ["record face needs unsupported inference" ~]]
8425+ =/ field=(unit iwfield) (~(get by expected) u.face.i.items)
8426+ =/ head=iresult
8427+ ?~ field (infer-fragment val.i.items env state)
8428+ (infer-call-context-arg val.i.items typ.u.field env state context)
8429+ ?: ?=(%| -.head) head
8430+ =/ typ=itype [%face u.face.i.items typ.p.head]
8431+ ?~ t.items [%& typ state.p.head]
8432+ =/ tail=iresult $(items t.items, state state.p.head)
8433+ ?: ?=(%| -.tail) tail
8434+ [%& [%cell typ typ.p.tail] state.p.tail]
8435+++ width-infer-literal
8436+ |= [e=expr expected=itype env=ienv state=istate context=span]
8437+ ^- (unit iresult)
8438+ ?. ?=(%tuple -.e) ~
8439+ ?. |(?=(%cell -.expected) ?=(%face -.expected)) ~
8440+ =/ source=(unit iwfields) (width-literal-fields items.e 1 4.096)
8441+ =/ target=(unit iwfields) (width-scan expected sub.state 1 4.096)
8442+ ?~ source ~
8443+ ?~ target ~
8444+ ?: (lth (lent order.u.source) (lent order.u.target)) ~
8445+ ?. (width-in-order order.u.source order.u.target)
8446+ `(infer-simple-items items.e env state)
8447+ `(width-infer-items items.e index.u.target env state context)
8448+::
8449+:: Experimental intrinsic recognition; real bindings retain normal calls.
8450+++ explicit-proj-call
8451+ |= [e=expr env=ienv state=istate]
8452+ ^- ?
8453+ ?. ?=(%call -.e) |
8454+ ?. ?=([* ~] args.e) |
8455+ ?. ?=(%wing -.head.e) |
8456+ ?. =(names.head.e ~[%proj]) |
8457+ ?: ?=(^ (ienv-lookup %proj env)) |
8458+ ?: (lien globals.state |=(n=term =(n %proj))) |
8459+ ?~ prelude.state &
8460+ ?:(?=(^ (ienv-lookup %proj values.u.prelude.state)) | &)
8461+++ infer-proj-source
8462+ |= [e=expr expected=itype env=ienv state=istate context=span]
8463+ ^- iresult
8464+ ?: ?=(%group -.e) $(e inner.e)
8465+ =/ literal=(unit iresult) (width-infer-literal e expected env state context)
8466+ ?^ literal u.literal
8467+ (infer-fragment e env state)
8468+++ infer-proj-context
8469+ |= [e=expr expected=itype env=ienv state=istate context=span]
8470+ ^- iresult
8471+ ?> ?=(%call -.e)
8472+ ?~ args.e [%| ["proj needs one record" ~]]
8473+ ?. |(?=(%cell -.expected) ?=(%face -.expected)) [%| ["proj needs an expected record type" ~]]
8474+ =/ value=iresult (infer-proj-source i.args.e expected env state context)
8475+ ?: ?=(%| -.value) value
8476+ =/ shape=(unit [source=iwfields target=iwfields])
8477+ (width-proj-shape typ.p.value expected sub.state.p.value)
8478+ ?~ shape [%| ["proj needs a known record containing its expected fields" ~]]
8479+ =/ project=(unit iwidth-result) (width-project u.shape sub.state.p.value next.state.p.value)
8480+ ?~ project [%| ["proj constraint needs unsupported inference" ~]]
8481+ =/ st=istate state.p.value(sub sub.u.project, next next.u.project)
8482+ [%& expected st(projections [[at.e e typ.p.value expected steps.u.project] projections.st])]
8483+::
8484+:: A known literal singleton in a direct union can contextualize a
8485+:: loobean literal of the same noun. Only explicit singleton and cell
8486+:: competitors are considered; opaque or variable cases stay unknown.
8487+++ explicit-singleton-in-union
8488+ |= [t=itype noun=@]
8489+ ^- ?
8490+ ?. ?=(%union -.t) |
8491+ =/ cases=(list itype) cases.t
8492+ =/ found=? |
8493+ |-
8494+ ?~ cases found
8495+ =/ c=itype i.cases
8496+ ?: ?=(%cell -.c) $(cases t.cases)
8497+ ?. ?=(%const -.c) |
8498+ ?: =(noun val.literal.c)
8499+ ?: found |
8500+ $(cases t.cases, found &)
8501+ $(cases t.cases)
8502+::
8503+:: Select a written literal-headed case only when every competing case is
8504+:: also an explicit singleton-headed cell and exactly one matches. Opaque,
8505+:: variable-bound and differently shaped cases keep inference unchanged.
8506+:: This first slice supplies context to a directly called payload. Plain
8507+:: literal data and other expressions retain their existing inference path.
8508+++ contextual-atomic-arguments
8509+ |= args=(list expr)
8510+ ^- ?
8511+ ?~ args &
8512+ ?. ?=(?(%lit %wing %ctor) -.i.args) |
8513+ $(args t.args)
8514+++ contextual-direct-payload-call
8515+ |= e=expr
8516+ ^- ?
8517+ ?: ?=(%group -.e) $(e inner.e)
8518+ ?. ?=(%call -.e) |
8519+ ?. ?=(%wing -.head.e) |
8520+ ?~ args.e |
8521+ (contextual-atomic-arguments args.e)
8522+::
8523+:: A walked variable may have concealed a union inside a substituted
8524+:: structure before this arm was called. Decline in that case rather than
8525+:: deriving provenance from the already-walked type.
8526+++ contextual-simple-sub
8527+ |= sub=isub
8528+ ^- ?
8529+ ?~ sub &
8530+ ?: ?=(?(%cell %face %fn %union %collection) -.val.i.sub) |
8531+ $(sub t.sub)
8532+::
8533+++ contextual-direct-union
8534+ |= target=itype
8535+ ^- ?
8536+ ?: ?=(%face -.target) $(target body.target)
8537+ ?=(%union -.target)
8538+++ contextual-tagged-case
8539+ |= [target=itype tag=@ sub=isub]
8540+ ^- (unit itype)
8541+ ?. ?=(%union -.target) ~
8542+ =/ remaining=(list itype) cases.target
8543+ =/ found=(unit itype) ~
8544+ =/ seen=(set @) *(set @)
8545+ |-
8546+ ?~ remaining found
8547+ =/ c=itype i.remaining
8548+ ?. ?=(%cell -.c) ~
8549+ =/ head=itype hed.c
8550+ ?. ?=(%const -.head) ~
8551+ ?: (~(has in:..zuse seen) val.literal.head) ~
8552+ =. seen (~(put in:..zuse seen) val.literal.head)
8553+ ?: =(tag val.literal.head)
8554+ $(remaining t.remaining, found `c)
8555+ $(remaining t.remaining)
8556+::
7625++ infer-call-context-arg
8557++ infer-call-context-arg
7626 |= [e=expr expected=itype env=ienv state=istate context=span]
8558 |= [e=expr expected=itype env=ienv state=istate context=span]
7627 ^- iresult
8559 ^- iresult
@@ -7635,25 +8567,43 @@
7635 =/ target=itype (itype-walk expected sub.state)
8567 =/ target=itype (itype-walk expected sub.state)
7636 |-
8568 |-
7637 ?: ?=(%face -.target) $(target (itype-walk body.target sub.state))
8569 ?: ?=(%face -.target) $(target (itype-walk body.target sub.state))
8570+ ?: (explicit-proj-call e env state)
8571+ (infer-proj-context e expected env state context)
8572+ :: Only the source-proven one-layer cell is exposed. Each recursive
8573+ :: descent consumes one written tuple; named values use ordinary fit.
8574+ ?: &(?=(%jrec -.target) ?=(%lit -.e) =(%null form.lit.e))
8575+ ?: =(0 jrec-fuel.state) [%| ["recursive mold unfolding needs unsupported inference" ~]]
8576+ [%& target state(jrec-fuel (dec jrec-fuel.state))]
8577+ ?: &(?=(%jrec -.target) ?=(%tuple -.e))
8578+ ?: =(0 jrec-fuel.state) [%| ["recursive mold unfolding needs unsupported inference" ~]]
8579+ =. state state(jrec-fuel (dec jrec-fuel.state))
8580+ =/ shape=itype
8581+ [%cell [%face head.target [%atom aura.target]] [%face tail.target target]]
8582+ =/ value=iresult (infer-call-context-items items.e shape env state context)
8583+ ?: ?=(%| -.value) value
8584+ =/ fit=ifit (itype-fit typ.p.value shape sub.state.p.value next.state.p.value)
8585+ ?: ?=(%unknown -.fit) [%| ["recursive mold cell constraint needs unsupported inference" ~]]
8586+ ?: ?=(%bad -.fit) [%| ["recursive mold cell does not fit its source shape" ~]]
8587+ [%& target state.p.value(sub sub.fit, next next.fit)]
7638 ?: ?=(%call -.e) (infer-contextual-call e target env state)
8588 ?: ?=(%call -.e) (infer-contextual-call e target env state)
7639 ?: (single-structured-pattern e)
8589 ?: (single-structured-pattern e)
7640 (infer-single-case-branch e env state `[target context])
8590 (infer-single-case-branch e env state `[target context])
7641 ?: (cell-binder-pattern e)
8591 ?: (cell-binder-pattern e)
7642 (infer-cell-branch e env state `[target context])
8592 (infer-cell-branch e env state `[target context])
7643− :: In a loobean-singleton context retain the written loobean noun;
8593+ :: In an explicit singleton context retain the written loobean noun;
7644− :: the usual final fit decides whether that value is permitted.
8594+ :: the ordinary singleton fit compares its noun, not its spelling.
7645 =/ singleton=(unit itype)
8595 =/ singleton=(unit itype)
7646 ?. ?=(%lit -.e) ~
8596 ?. ?=(%lit -.e) ~
7647 ?. =(%loobean form.lit.e) ~
8597 ?. =(%loobean form.lit.e) ~
7648− ?. ?=(%const -.target) ~
8598+ ?. |(?=(%const -.target) &(?=(%union -.expected) (explicit-singleton-in-union expected val.lit.e))) ~
7649− ?. =(%loobean form.literal.target) ~
7650 `[%const lit.e]
8599 `[%const lit.e]
7651 ?^ singleton [%& u.singleton state]
8600 ?^ singleton [%& u.singleton state]
7652− =/ known=(unit itype)
8601+ =/ known=(unit iresult)
7653 ?: ?=(%branch -.e) (known-union-subject subject.e env state)
8602 ?: ?=(%branch -.e) (known-union-subject subject.e env state)
7654 ~
8603 ~
8604+ ?: &(?=(^ known) ?=(%| -.u.known) !(duplicate-loobean-arms e)) u.known
7655− ?: &(?=(^ known) ?=(~ (unit-union-payload u.known)))
8605+ ?: &(?=(^ known) ?=(%& -.u.known) ?=(~ (unit-union-payload (itype-normalize typ.p.u.known sub.state.p.u.known))))
7656− (infer-known-union-context e target env state context)
8606+ (infer-known-union-context-subject e target env u.known context)
7657 ?: &(?=(%union -.target) ?=(%unit -.e))
8607 ?: &(?=(%union -.target) ?=(%unit -.e))
7658 (infer-unit-context e target env state context)
8608 (infer-unit-context e target env state context)
7659 ?: &(?=(%flag -.target) (context-union-branch e))
8609 ?: &(?=(%flag -.target) (context-union-branch e))
@@ -7664,17 +8614,53 @@
7664 (infer-union-context e target env state context)
8614 (infer-union-context e target env state context)
7665 ?: &(?=(%collection -.target) =(%list name.target) (context-list-expression e))
8615 ?: &(?=(%collection -.target) =(%list name.target) (context-list-expression e))
7666 (infer-list-context e target env state context)
8616 (infer-list-context e target env state context)
8617+ :: A literal-headed tuple can receive the unique case's payload
8618+ :: context. The ordinary final fit still checks the complete union.
8619+ =/ selected=(unit itype)
8620+ ?. &((contextual-simple-sub sub.state) (contextual-direct-union expected) ?=(%union -.target) ?=(%tuple -.e) ?=(^ items.e)) ~
8621+ ?~ t.items.e ~
8622+ ?^ t.t.items.e ~
8623+ ?. (contextual-direct-payload-call val.i.t.items.e) ~
8624+ =/ first=item i.items.e
8625+ ?. &(?=(~ face.first) ?=(%lit -.val.first) |(=(%term form.lit.val.first) =(%null form.lit.val.first) =(%loobean form.lit.val.first))) ~
8626+ (contextual-tagged-case target val.lit.val.first sub.state)
8627+ ?^ selected
8628+ ?> ?=(%tuple -.e)
8629+ :: On this bounded shallow-call shape, preserve any inference that
8630+ :: already fits before trying the new contextual path. Neither pass
8631+ :: can recursively select a nested tuple from the atomic arguments.
8632+ =/ ordinary=(unit iresult)
8633+ =/ initial=iresult (infer-fragment e env state)
8634+ ?: ?=(%| -.initial) ~
8635+ =/ fit=ifit (itype-fit typ.p.initial target sub.state.p.initial next.state.p.initial)
8636+ ?. ?=(%ok -.fit) ~
8637+ `initial
8638+ ?^ ordinary u.ordinary
8639+ =/ value=iresult (infer-call-context-items items.e u.selected env state context)
8640+ ?: ?=(%| -.value) value
8641+ =/ fit=ifit (itype-fit typ.p.value u.selected sub.state.p.value next.state.p.value)
8642+ ?: ?=(%unknown -.fit) [%| ["tagged case needs unsupported inference" ~]]
8643+ ?: ?=(%bad -.fit) [%| ["tagged case does not fit its expected type" ~[[context "expected union case"] [(span-of e) "value"]]]]
8644+ [%& typ.p.value state.p.value(sub sub.fit, next next.fit)]
7667 ?: &(?=(%cell -.target) ?=(%tuple -.e))
8645 ?: &(?=(%cell -.target) ?=(%tuple -.e))
7668 (infer-call-context-items items.e target env state context)
8646 (infer-call-context-items items.e target env state context)
7669 (infer-fragment e env state)
8647 (infer-fragment e env state)
7670::
8648::
7671:: Preserve each written face; the final complete sample fit checks faces.
8649:: Preserve each written face; the final complete sample fit checks faces.
8650+:: A tuple or positional field face belongs to the enclosing sample,
8651+:: not to the expression at that position. A second face, if present,
8652+:: is part of the value's own expected type.
8653+++ projection-field-target
8654+ |= expected=itype
8655+ ^- itype
8656+ ?:(?=(%face -.expected) body.expected expected)
8657+::
7672++ infer-call-context-items
8658++ infer-call-context-items
7673 |= [items=(list item) expected=itype env=ienv state=istate context=span]
8659 |= [items=(list item) expected=itype env=ienv state=istate context=span]
7674 ^- iresult
8660 ^- iresult
7675 ?~ items [%| ["empty cell is not supported by partial inference" ~]]
8661 ?~ items [%| ["empty cell is not supported by partial inference" ~]]
7676 ?~ t.items
8662 ?~ t.items
7677− =/ last=iresult (infer-call-context-arg val.i.items expected env state context)
8663+ =/ last=iresult (infer-call-context-arg val.i.items (projection-field-target expected) env state context)
7678 ?: ?=(%| -.last) last
8664 ?: ?=(%| -.last) last
7679 =/ typ=itype typ.p.last
8665 =/ typ=itype typ.p.last
7680 =. typ ?~(face.i.items typ [%face u.face.i.items typ])
8666 =. typ ?~(face.i.items typ [%face u.face.i.items typ])
@@ -7683,7 +8669,7 @@
7683 |-
8669 |-
7684 ?: ?=(%face -.target) $(target (itype-walk body.target sub.state))
8670 ?: ?=(%face -.target) $(target (itype-walk body.target sub.state))
7685 ?. ?=(%cell -.target) (infer-simple-items items env state)
8671 ?. ?=(%cell -.target) (infer-simple-items items env state)
7686− =/ head=iresult (infer-call-context-arg val.i.items hed.target env state context)
8672+ =/ head=iresult (infer-call-context-arg val.i.items (projection-field-target hed.target) env state context)
7687 ?: ?=(%| -.head) head
8673 ?: ?=(%| -.head) head
7688 =/ typ=itype typ.p.head
8674 =/ typ=itype typ.p.head
7689 =. typ ?~(face.i.items typ [%face u.face.i.items typ])
8675 =. typ ?~(face.i.items typ [%face u.face.i.items typ])
@@ -7695,13 +8681,13 @@
7695 |= [args=(list expr) expected=itype env=ienv state=istate context=span]
8681 |= [args=(list expr) expected=itype env=ienv state=istate context=span]
7696 ^- iresult
8682 ^- iresult
7697 ?~ args [%| ["call has no argument" ~]]
8683 ?~ args [%| ["call has no argument" ~]]
7698− ?~ t.args (infer-call-context-arg i.args expected env state context)
8684+ ?~ t.args (infer-call-context-arg i.args (projection-field-target expected) env state context)
7699 =/ target=itype (itype-walk expected sub.state)
8685 =/ target=itype (itype-walk expected sub.state)
7700 |-
8686 |-
7701 ?: ?=(%face -.target) $(target (itype-walk body.target sub.state))
8687 ?: ?=(%face -.target) $(target (itype-walk body.target sub.state))
7702 ?. ?=(%cell -.target)
8688 ?. ?=(%cell -.target)
7703 (infer-simple-items (turn args |=(a=expr [(span-of a) ~ a])) env state)
8689 (infer-simple-items (turn args |=(a=expr [(span-of a) ~ a])) env state)
7704− =/ head=iresult (infer-call-context-arg i.args hed.target env state context)
8690+ =/ head=iresult (infer-call-context-arg i.args (projection-field-target hed.target) env state context)
7705 ?: ?=(%| -.head) head
8691 ?: ?=(%| -.head) head
7706 =/ tail=iresult (infer-call-context-args t.args tal.target env state.p.head context)
8692 =/ tail=iresult (infer-call-context-args t.args tal.target env state.p.head context)
7707 ?: ?=(%| -.tail) tail
8693 ?: ?=(%| -.tail) tail
@@ -7733,7 +8719,7 @@
7733 ?~ pats [%& ~]
8719 ?~ pats [%& ~]
7734 ?. ?=(%bind -.i.pats) [%| 'branch pattern is not supported by partial inference']
8720 ?. ?=(%bind -.i.pats) [%| 'branch pattern is not supported by partial inference']
7735 =/ name=term name.i.pats
8721 =/ name=term name.i.pats
7736− ?: |(?=(^ (ienv-lookup name env)) (lien globals |=(n=term =(n name))) (lien seen |=(n=term =(n name))))
8722+ ?: |(=(name %proj) ?=(^ (ienv-lookup name env)) (lien globals |=(n=term =(n name))) (lien seen |=(n=term =(n name))))
7737 [%| 'pattern shadows a name']
8723 [%| 'pattern shadows a name']
7738 =/ rest=(each (list term) @t) $(pats t.pats, seen [name seen])
8724 =/ rest=(each (list term) @t) $(pats t.pats, seen [name seen])
7739 ?: ?=(%| -.rest) rest
8725 ?: ?=(%| -.rest) rest
@@ -7758,7 +8744,7 @@
7758 ?~ t.names |
8744 ?~ t.names |
7759 =. typ (itype-walk typ sub)
8745 =. typ (itype-walk typ sub)
7760 ?: ?=(%cell -.typ) $(typ tal.typ, names t.names)
8746 ?: ?=(%cell -.typ) $(typ tal.typ, names t.names)
7761− |(?=(%union -.typ) ?=(%collection -.typ) ?=(%recursive -.typ) ?=(%noun -.typ) ?=(%fn -.typ) ?=(%tag -.typ))
8747+ |(?=(%union -.typ) ?=(%collection -.typ) ?=(%recursive -.typ) ?=(%jrec -.typ) ?=(%noun -.typ) ?=(%fn -.typ) ?=(%tag -.typ))
7762::
8748::
7763++ cell-binder-pattern
8749++ cell-binder-pattern
7764 |= e=expr
8750 |= e=expr
@@ -7816,9 +8802,15 @@
7816 %avar
8802 %avar
7817 ?: (lth id.t 26) [(add 65 id.t) ~]
8803 ?: (lth id.t 26) [(add 65 id.t) ~]
7818 "T{<id.t>}"
8804 "T{<id.t>}"
8805+ %rvar
8806+ ?: (lth id.t 26) [(add 65 id.t) ~]
8807+ "T{<id.t>}"
7819 %nvar
8808 %nvar
7820 ?: (lth id.t 26) [(add 65 id.t) ~]
8809 ?: (lth id.t 26) [(add 65 id.t) ~]
7821 "T{<id.t>}"
8810 "T{<id.t>}"
8811+ %rnvar
8812+ ?: (lth id.t 26) [(add 65 id.t) ~]
8813+ "T{<id.t>}"
7822 %atom "@{(trip aura.t)}"
8814 %atom "@{(trip aura.t)}"
7823 %any-atom "@"
8815 %any-atom "@"
7824 %flag "?"
8816 %flag "?"
@@ -7830,6 +8822,7 @@
7830 ?~ args.t (trip u.label.t)
8822 ?~ args.t (trip u.label.t)
7831 "({(trip u.label.t)} {(show-itype-cases args.t sub)})"
8823 "({(trip u.label.t)} {(show-itype-cases args.t sub)})"
7832 %recursive ?~(label.t "recursive mold" (trip u.label.t))
8824 %recursive ?~(label.t "recursive mold" (trip u.label.t))
8825+ %jrec ?~(label.t "recursive mold" (trip u.label.t))
7833 %collection "({(trip name.t)} {(show-itype-cases args.t sub)})"
8826 %collection "({(trip name.t)} {(show-itype-cases args.t sub)})"
7834 %face "[{(trip name.t)}={(show-itype-context body.t sub)}]"
8827 %face "[{(trip name.t)}={(show-itype-context body.t sub)}]"
7835 %fn "$-({(show-itype-context sample.t sub)} {(show-itype-context product.t sub)})"
8828 %fn "$-({(show-itype-context sample.t sub)} {(show-itype-context product.t sub)})"
@@ -7865,8 +8858,10 @@
7865 ^- ?
8858 ^- ?
7866 ?- -.typ
8859 ?- -.typ
7867 %nvar &
8860 %nvar &
8861+ %rnvar &
7868 %var |
8862 %var |
7869 %avar |
8863 %avar |
8864+ %rvar |
7870 %atom |
8865 %atom |
7871 %any-atom |
8866 %any-atom |
7872 %flag |
8867 %flag |
@@ -7875,6 +8870,7 @@
7875 %const |
8870 %const |
7876 %union |((lien cases.typ |=(c=itype (itype-has-nvar c))) (lien args.typ |=(c=itype (itype-has-nvar c))))
8871 %union |((lien cases.typ |=(c=itype (itype-has-nvar c))) (lien args.typ |=(c=itype (itype-has-nvar c))))
7877 %recursive |
8872 %recursive |
8873+ %jrec |
7878 %collection (lien args.typ |=(c=itype (itype-has-nvar c)))
8874 %collection (lien args.typ |=(c=itype (itype-has-nvar c)))
7879 %face $(typ body.typ)
8875 %face $(typ body.typ)
7880 %fn |($(typ sample.typ) $(typ product.typ))
8876 %fn |($(typ sample.typ) $(typ product.typ))
@@ -7885,7 +8881,7 @@
7885 |= [label=tape typ=itype sub=isub]
8881 |= [label=tape typ=itype sub=isub]
7886 ^- tape
8882 ^- tape
7887 =/ normalized=itype (itype-normalize typ sub)
8883 =/ normalized=itype (itype-normalize typ sub)
7888− ?: |(?=(%var -.normalized) ?=(%avar -.normalized) (itype-has-nvar normalized) (itype-has-tag normalized) (itype-has-union normalized)) label
8884+ ?: |(?=(%var -.normalized) ?=(%avar -.normalized) ?=(%rvar -.normalized) (itype-has-nvar normalized) (itype-has-tag normalized) (itype-has-union normalized)) label
7889 ?: (itype-has-hidden-recursive normalized) label
8885 ?: (itype-has-hidden-recursive normalized) label
7890 =/ vars=(list @ud) (unique-type-vars (itype-vars normalized))
8886 =/ vars=(list @ud) (unique-type-vars (itype-vars normalized))
7891 ?: (gth (lent vars) 26) label
8887 ?: (gth (lent vars) 26) label
@@ -7907,6 +8903,7 @@
7907 ?+ -.resolved ~
8903 ?+ -.resolved ~
7908 %var `id.resolved
8904 %var `id.resolved
7909 %avar `id.resolved
8905 %avar `id.resolved
8906+ %rvar `id.resolved
7910 ==
8907 ==
7911 ?~ ident $(caps t.caps)
8908 ?~ ident $(caps t.caps)
7912 ?: =(n u.ident) &
8909 ?: =(n u.ident) &
@@ -7921,6 +8918,7 @@
7921 ?+ -.resolved ~
8918 ?+ -.resolved ~
7922 %var `id.resolved
8919 %var `id.resolved
7923 %avar `id.resolved
8920 %avar `id.resolved
8921+ %rvar `id.resolved
7924 ==
8922 ==
7925 ?~ ident $(caps t.caps)
8923 ?~ ident $(caps t.caps)
7926 ?: =(n u.ident) `i.caps
8924 ?: =(n u.ident) `i.caps
@@ -7935,6 +8933,7 @@
7935 ?+ -.resolved ~
8933 ?+ -.resolved ~
7936 %var `id.resolved
8934 %var `id.resolved
7937 %avar `id.resolved
8935 %avar `id.resolved
8936+ %rvar `id.resolved
7938 ==
8937 ==
7939 ?~ ident $(caps t.caps)
8938 ?~ ident $(caps t.caps)
7940 =/ found=(unit icap) (cap-with-id u.ident t.caps sub)
8939 =/ found=(unit icap) (cap-with-id u.ident t.caps sub)
@@ -7950,6 +8949,7 @@
7950 ?+ -.resolved ~
8949 ?+ -.resolved ~
7951 %var `id.resolved
8950 %var `id.resolved
7952 %avar `id.resolved
8951 %avar `id.resolved
8952+ %rvar `id.resolved
7953 ==
8953 ==
7954 ?~ ident &
8954 ?~ ident &
7955 ?: (cap-id-in u.ident t.caps sub) &
8955 ?: (cap-id-in u.ident t.caps sub) &
@@ -7964,8 +8964,8 @@
7964 ^- ?
8964 ^- ?
7965 ?~ caps |
8965 ?~ caps |
7966 =/ resolved=itype (itype-walk [%var id.i.caps] sub)
8966 =/ resolved=itype (itype-walk [%var id.i.caps] sub)
7967− ?: ?=(%avar -.resolved)
8967+ ?: |(?=(%avar -.resolved) ?=(%rvar -.resolved))
7968− ?: =(n id.resolved) &
8968+ ?: =(n +.resolved) &
7969 $(caps t.caps)
8969 $(caps t.caps)
7970 $(caps t.caps)
8970 $(caps t.caps)
7971::
8971::
@@ -7975,7 +8975,9 @@
7975 ?- -.t
8975 ?- -.t
7976 %var |
8976 %var |
7977 %avar =(n id.t)
8977 %avar =(n id.t)
8978+ %rvar =(n id.t)
7978 %nvar |
8979 %nvar |
8980+ %rnvar |
7979 %atom |
8981 %atom |
7980 %any-atom |
8982 %any-atom |
7981 %flag |
8983 %flag |
@@ -7984,6 +8986,7 @@
7984 %const |
8986 %const |
7985 %union |((lien cases.t |=(c=itype (has-atom-var n c))) (lien args.t |=(c=itype (has-atom-var n c))))
8987 %union |((lien cases.t |=(c=itype (has-atom-var n c))) (lien args.t |=(c=itype (has-atom-var n c))))
7986 %recursive |
8988 %recursive |
8989+ %jrec |
7987 %collection (lien args.t |=(c=itype (has-atom-var n c)))
8990 %collection (lien args.t |=(c=itype (has-atom-var n c)))
7988 %face $(t body.t)
8991 %face $(t body.t)
7989 %fn |($(t sample.t) $(t product.t))
8992 %fn |($(t sample.t) $(t product.t))
@@ -8023,6 +9026,10 @@
8023 =/ out=tape ""
9026 =/ out=tape ""
8024 |-
9027 |-
8025 ?~ vars out
9028 ?~ vars out
9029+ ?: (itype-var-is-restricted i.vars t)
9030+ =/ sep=tape ?:(printed ", " " where ")
9031+ =/ clause=tape "{sep}{(show-itype [%rvar i.vars] ~)} is an atom other than ?"
9032+ $(vars t.vars, printed &, out (weld out clause))
8026 ?: (itype-var-is-atom i.vars t)
9033 ?: (itype-var-is-atom i.vars t)
8027 =/ sep=tape ?:(printed ", " " where ")
9034 =/ sep=tape ?:(printed ", " " where ")
8028 =/ clause=tape "{sep}{(show-itype [%avar i.vars] ~)} is an atom"
9035 =/ clause=tape "{sep}{(show-itype [%avar i.vars] ~)} is an atom"
@@ -8332,6 +9339,7 @@
8332 ?: (constrained-capitals caps.entry sub.state)
9339 ?: (constrained-capitals caps.entry sub.state)
8333 [%| ["explicit capital constraints are not supported by partial inference" ~]]
9340 [%| ["explicit capital constraints are not supported by partial inference" ~]]
8334 =/ typ=itype (itype-normalize typ.entry sub.state)
9341 =/ typ=itype (itype-normalize typ.entry sub.state)
9342+ ?: (itype-has-nvar typ) [%| ["recursive group needs unsupported inference" ~]]
8335 ?: |((itype-has-tag typ) (itype-has-hidden-generic typ) (itype-has-hidden-recursive typ) (unsupported-atom-vars typ caps.entry binders.state sub.state))
9343 ?: |((itype-has-tag typ) (itype-has-hidden-generic typ) (itype-has-hidden-recursive typ) (unsupported-atom-vars typ caps.entry binders.state sub.state))
8336 [%| ["recursive group needs unsupported inference" ~]]
9344 [%| ["recursive group needs unsupported inference" ~]]
8337 =/ free=(list @ud) (weld (free-env-vars env sub.state) (free-cap-vars caps.outer sub.state))
9345 =/ free=(list @ud) (weld (free-env-vars env sub.state) (free-cap-vars caps.outer sub.state))
@@ -8356,35 +9364,64 @@
8356 =/ seeds=ienv (group-seed-env entries.p.seeded ~)
9364 =/ seeds=ienv (group-seed-env entries.p.seeded ~)
8357 =/ body=igate-seeds (infer-gate-group-bodies entries.p.seeded seeds state.p.seeded)
9365 =/ body=igate-seeds (infer-gate-group-bodies entries.p.seeded seeds state.p.seeded)
8358 ?: ?=(%| -.body) body
9366 ?: ?=(%| -.body) body
9367+ :: Per-member ownership through mutual recursion is not implemented.
9368+ ?: !=(projections.state.p.body projections.state)
9369+ [%| ["record projection in recursive groups needs unsupported inference" ~]]
9370+ ?: !=(holes.state.p.body holes.state)
9371+ [%| ["holes in recursive groups need unsupported inference" ~]]
8359 ?: (pending-tags tags.state.p.body sub.state.p.body)
9372 ?: (pending-tags tags.state.p.body sub.state.p.body)
8360 [%| ["recursive group has unresolved literal constraints" ~]]
9373 [%| ["recursive group has unresolved literal constraints" ~]]
8361 =/ schemes=(each ienv idiag) (group-schemes entries.p.body env state state.p.body)
9374 =/ schemes=(each ienv idiag) (group-schemes entries.p.body env state state.p.body)
8362 ?: ?=(%| -.schemes) schemes
9375 ?: ?=(%| -.schemes) schemes
8363 [%& [(weld p.schemes env) state.p.body(globals globals.state)]]
9376 [%& [(weld p.schemes env) state.p.body(globals globals.state)]]
8364::
9377::
9378+++ width-finalize
9379+ |= [ps=(list iwprojection) sub=isub visible=(list @ud)]
9380+ ^- (unit (list iwprojection))
9381+ ?~ ps `~
9382+ ?: (lien t.ps |=(p=iwprojection =(at.p at.i.ps))) ~
9383+ =/ src=itype (default-decimals (itype-normalize source.i.ps sub))
9384+ =/ dst=itype (default-decimals (itype-normalize target.i.ps sub))
9385+ ?: |((itype-has-nvar src) (itype-has-nvar dst) (itype-has-tag src) (itype-has-tag dst)) ~
9386+ =/ vars=(list @ud) (weld (itype-vars src) (itype-vars dst))
9387+ ?. (levy vars |=(n=@ud (lien visible |=(v=@ud =(n v))))) ~
9388+ =/ rest=(unit (list iwprojection)) $(ps t.ps)
9389+ ?~ rest ~
9390+ =/ entry=iwprojection i.ps
9391+ =. entry entry(source src, target dst)
9392+ `[entry u.rest]
9393+::
8365++ add-supported-defs
9394++ add-supported-defs
8366− |= [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)]
9395+ |= [ds=(list def) env=ienv molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) at=path prelude=(unit ifile) artifacts=(list iwidth-definition)]
8367− ^- ienv
9396+ ^- [env=ienv artifacts=(list iwidth-definition)]
8368− ?~ ds env
9397+ ?~ ds [env artifacts]
8369 =/ d=def i.ds
9398 =/ d=def i.ds
8370 ?: ?=(%mold -.d) $(ds t.ds)
9399 ?: ?=(%mold -.d) $(ds t.ds)
8371 ?. (unique-value-name name.d globals) $(ds t.ds)
9400 ?. (unique-value-name name.d globals) $(ds t.ds)
8372 ?^ (ienv-lookup name.d env) $(ds t.ds)
9401 ?^ (ienv-lookup name.d env) $(ds t.ds)
8373 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
9402 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
8374− =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude]
9403+ =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude ~ 256 ~]
8375 =. initial (reserve-def-caps val.d initial)
9404 =. initial (reserve-def-caps val.d initial)
8376 =/ result=iresult (infer-fragment val.d env initial)
9405 =/ result=iresult (infer-fragment val.d env initial)
8377 =? result ?=(%| -.result) (infer-recursive-gate d env initial)
9406 =? result ?=(%| -.result) (infer-recursive-gate d env initial)
8378 ?: ?=(%| -.result) $(ds t.ds)
9407 ?: ?=(%| -.result) $(ds t.ds)
9408+ =. state.p.result (promote-restricted-numbers state.p.result env)
9409+ =. state.p.result (default-hole-numbers holes.state.p.result holes.initial state.p.result env !(itype-has-gate (itype-normalize typ.p.result sub.state.p.result)))
9410+ ?^ (unresolved-hole holes.state.p.result holes.initial state.p.result) $(ds t.ds)
8379 ?: (constrained-capitals caps.state.p.result sub.state.p.result) $(ds t.ds)
9411 ?: (constrained-capitals caps.state.p.result sub.state.p.result) $(ds t.ds)
8380 =/ typ=itype (default-decimals (itype-normalize typ.p.result sub.state.p.result))
9412 =/ typ=itype (default-decimals (itype-normalize typ.p.result sub.state.p.result))
8381 ?: |((pending-tags tags.state.p.result sub.state.p.result) (itype-has-tag typ)) $(ds t.ds)
9413 ?: |((pending-tags tags.state.p.result sub.state.p.result) (itype-has-tag typ)) $(ds t.ds)
8382 ?: (unsupported-atom-vars typ caps.state.p.result binders.state.p.result sub.state.p.result) $(ds t.ds)
9414 ?: (unsupported-atom-vars typ caps.state.p.result binders.state.p.result sub.state.p.result) $(ds t.ds)
8383 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
9415 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
8384 ?: (gth (lent vars) 26) $(ds t.ds)
9416 ?: (gth (lent vars) 26) $(ds t.ds)
9417+ =/ finalized=(unit (list iwprojection))
9418+ (width-finalize projections.state.p.result sub.state.p.result vars)
9419+ ?~ finalized $(ds t.ds)
9420+ =? artifacts ?=(^ u.finalized)
9421+ [[name.d val.d typ sub.state.p.result (flop u.finalized)] artifacts]
8385 $(ds t.ds, env [[name.d [typ vars]] env])
9422 $(ds t.ds, env [[name.d [typ vars]] env])
8386::
9423::
8387−+$ iresolved [env=ienv grouped=(list term)]
9424++$ iresolved [env=ienv grouped=(list term) artifacts=(list iwidth-definition)]
8388+$ iadj (map term (list term))
9425+$ iadj (map term (list term))
8389+$ ivisited (map term ?)
9426+$ ivisited (map term ?)
8390+$ iwork (list [name=term done=?])
9427+$ iwork (list [name=term done=?])
@@ -8478,9 +9515,9 @@
8478 (lien (graph-edges i.component graph) |=(x=term =(x i.component)))
9515 (lien (graph-edges i.component graph) |=(x=term =(x i.component)))
8479::
9516::
8480++ add-groups
9517++ add-groups
8481− |= [ds=(list def) components=icomponents graph=iadj env=ienv grouped=(list term) state=istate]
9518+ |= [ds=(list def) components=icomponents graph=iadj env=ienv grouped=(list term) artifacts=(list iwidth-definition) state=istate]
8482 ^- iresolved
9519 ^- iresolved
8483− ?~ components [env grouped]
9520+ ?~ components [env grouped artifacts]
8484 =/ component=(list term) i.components
9521 =/ component=(list term) i.components
8485 ?. (graph-cycle component graph) $(components t.components)
9522 ?. (graph-cycle component graph) $(components t.components)
8486 ?: (lien component |=(n=term ?=(^ (ienv-lookup n env)))) $(components t.components)
9523 ?: (lien component |=(n=term ?=(^ (ienv-lookup n env)))) $(components t.components)
@@ -8499,17 +9536,19 @@
8499 ^- iresolved
9536 ^- iresolved
8500 =/ env=ienv ~
9537 =/ env=ienv ~
8501 =/ grouped=(list term) ~
9538 =/ grouped=(list term) ~
9539+ =/ artifacts=(list iwidth-definition) ~
8502 =/ names=(list term) (global-value-names ds)
9540 =/ names=(list term) (global-value-names ds)
8503 =/ nameset=ivisited (graph-nameset names ~)
9541 =/ nameset=ivisited (graph-nameset names ~)
8504 =/ graph=iadj (graph-make-forward ds nameset ~)
9542 =/ graph=iadj (graph-make-forward ds nameset ~)
8505 =/ components=icomponents (graph-components ds names)
9543 =/ components=icomponents (graph-components ds names)
8506 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
9544 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
8507 |-
9545 |-
9546+ =/ next=[env=ienv artifacts=(list iwidth-definition)]
8508− =/ next=ienv (add-supported-defs ds env molds globals externals surs mark-externals marks jimports reserved-molds at prelude)
9547+ (add-supported-defs ds env molds globals externals surs mark-externals marks jimports reserved-molds at prelude artifacts)
8509− =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude]
9548+ =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude ~ 256 ~]
8510− =/ out=iresolved (add-groups ds components graph next grouped initial)
9549+ =/ out=iresolved (add-groups ds components graph env.next grouped artifacts.next initial)
8511 ?: =(env env.out) out
9550 ?: =(env env.out) out
8512− $(env env.out, grouped grouped.out)
9551+ $(env env.out, grouped grouped.out, artifacts artifacts.out)
8513::
9552::
8514++ resolve-supported-defs
9553++ resolve-supported-defs
8515 |= [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)]
9554 |= [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)]
@@ -8768,11 +9807,142 @@
8768 [at.first at.second (union-relate a (project-union-mold second molds ~))]
9807 [at.first at.second (union-relate a (project-union-mold second molds ~))]
8769 (weld pairs $(cases t.cases))
9808 (weld pairs $(cases t.cases))
8770::
9809::
9810+:: A closed structural mold supplies no equation to determine a hole.
9811+:: Applications, references, unbound capitals and unions are unproved.
9812+++ simple-mold-hole
9813+ |= sh=shape
9814+ ^- (unit (unit span))
9815+ ?: ?=(%generic -.sh)
9816+ ?~ vars.sh ~
9817+ ?. (distinct-params vars.sh) ~
9818+ (simple-mold-hole-in body.sh vars.sh)
9819+ (simple-mold-hole-in sh ~)
9820+++ simple-mold-hole-in
9821+ |= [sh=shape vars=(list @t)]
9822+ ^- (unit (unit span))
9823+ ?- -.sh
9824+ %hole ``at.sh
9825+ ?(%aura %noun %void %flag %const) `~
9826+ %tvar ?:((lien vars |=(v=@t =(v name.sh))) `~ ~)
9827+ %cell (simple-mold-field-holes fields.sh vars)
9828+ %fn
9829+ =/ a=(unit (unit span)) $(sh sample.sh)
9830+ ?~ a ~
9831+ =/ b=(unit (unit span)) $(sh product.sh)
9832+ ?~ b ~
9833+ `?~(u.a u.b u.a)
9834+ %generic ~
9835+ * ~
9836+ ==
9837+++ simple-mold-field-holes
9838+ |= [fields=(list field) vars=(list @t)]
9839+ ^- (unit (unit span))
9840+ ?~ fields `~
9841+ =/ f=field i.fields
9842+ =/ first=(unit (unit span))
9843+ ?- -.f
9844+ %face (simple-mold-hole-in shape.f vars)
9845+ %bare (simple-mold-hole-in shape.f vars)
9846+ %pun ~
9847+ ==
9848+ ?~ first ~
9849+ =/ rest=(unit (unit span)) $(fields t.fields)
9850+ ?~ rest ~
9851+ `?~(u.first u.rest u.first)
9852+++ simple-local-mold-hole
9853+ |= defs=(list def)
9854+ ^- (unit span)
9855+ ?~ defs ~
9856+ ?. ?=(%mold -.i.defs) $(defs t.defs)
9857+ =/ found=(unit (unit span)) (simple-mold-hole shape.i.defs)
9858+ ?~ found $(defs t.defs)
9859+ ?^ u.found u.found
9860+ $(defs t.defs)
9861+::
9862+:: A partial prelude may omit unsupported declarations, but may not
9863+:: publish an interface while a named mold's hole remains unchecked.
9864+++ shape-has-hole
9865+ |= sh=shape
9866+ ^- ?
9867+ ?- -.sh
9868+ %hole &
9869+ %path (lien segs.sh |=(s=pseg ?=(%inferred -.s)))
9870+ %apply (lien args.sh shape-has-hole)
9871+ %union (lien cases.sh shape-has-hole)
9872+ %cell (lien fields.sh field-has-hole)
9873+ %fn |($(sh sample.sh) $(sh product.sh))
9874+ %generic $(sh body.sh)
9875+ * |
9876+ ==
9877+++ field-has-hole
9878+ |= f=field
9879+ ^- ?
9880+ ?- -.f
9881+ %face (shape-has-hole shape.f)
9882+ %bare (shape-has-hole shape.f)
9883+ %pun |
9884+ ==
9885+++ named-mold-has-hole
9886+ |= ds=(list def)
9887+ ^- ?
9888+ ?~ ds |
9889+ ?: &(?=(%mold -.i.ds) (shape-has-hole shape.i.ds)) &
9890+ $(ds t.ds)
9891+::
9892+++ sample-has-hole
9893+ |= sam=sample
9894+ ^- ?
9895+ ?- -.sam
9896+ %face (shape-has-hole shape.sam)
9897+ %bare (shape-has-hole shape.sam)
9898+ %cell (lien items.sam sample-has-hole)
9899+ * |
9900+ ==
9901+++ def-has-hole
9902+ |= d=def
9903+ ^- ?
9904+ ?- -.d
9905+ %mold (shape-has-hole shape.d)
9906+ %value (expr-has-hole val.d)
9907+ ==
9908+++ expr-has-hole
9909+ |= e=expr
9910+ ^- ?
9911+ ?- -.e
9912+ %str (lien pieces.e |=(p=piece ?:(?=(%expr -.p) (expr-has-hole p.p) |)))
9913+ %qath (lien segs.e |=(p=qseg ?:(?=(%expr -.p) (expr-has-hole p.p) |)))
9914+ %change (lien edits.e |=(p=edit (expr-has-hole val.p)))
9915+ %pair $(e val.e)
9916+ %unit $(e val.e)
9917+ %group $(e inner.e)
9918+ %list (lien items.e expr-has-hole)
9919+ %tuple (lien items.e |=(i=item (expr-has-hole val.i)))
9920+ ?(%gate %gate-wide) |((sample-has-hole sample.e) $(e body.e))
9921+ %cast |((shape-has-hole shape.e) $(e val.e))
9922+ %call |($(e head.e) (lien args.e expr-has-hole))
9923+ %trace |($(e val.e) $(e then.e))
9924+ %branch |($(e subject.e) (lien arms.e |=(a=arm (expr-has-hole val.a))))
9925+ %body |((lien defs.e def-has-hole) $(e final.e))
9926+ * |
9927+ ==
9928+++ hole-values-present
9929+ |= [ds=(list def) env=ienv]
9930+ ^- ?
9931+ ?~ ds &
9932+ ?. ?=(%value -.i.ds) $(ds t.ds)
9933+ ?: (expr-has-hole val.i.ds)
9934+ ?. ?=(^ (ienv-lookup name.i.ds env)) |
9935+ $(ds t.ds)
9936+ $(ds t.ds)
8771++ show-partial-mold
9937++ show-partial-mold
8772 |= [file=path src=@t d=def molds=imolds]
9938 |= [file=path src=@t d=def molds=imolds]
8773 ^- @t
9939 ^- @t
8774 ?> ?=(%mold -.d)
9940 ?> ?=(%mold -.d)
8775 =/ sh=shape shape.d
9941 =/ sh=shape shape.d
9942+ =/ hole=(unit (unit span)) (simple-mold-hole sh)
9943+ ?: &(?=(^ hole) ?=(^ u.hole))
9944+ =/ text=@t (show-error src [file line.beg.u.u.hole col.beg.u.u.hole "unresolved type hole"])
9945+ (of-wain:format ~[(crip "+$ {(trip name.d)}: type hole needs a determined type") text])
8776 =? sh ?=(%generic -.sh) body.sh
9946 =? sh ?=(%generic -.sh) body.sh
8777 ?. ?=(%union -.sh) (crip "+$ {(trip name.d)}: not checked")
9947 ?. ?=(%union -.sh) (crip "+$ {(trip name.d)}: not checked")
8778 =/ pairs=(list upair) (union-pairs cases.sh molds)
9948 =/ pairs=(list upair) (union-pairs cases.sh molds)
@@ -8799,6 +9969,21 @@
8799 (show-error src [file line.beg.at.site col.beg.at.site note.site])
9969 (show-error src [file line.beg.at.site col.beg.at.site note.site])
8800 (of-wain:format [summary excerpts])
9970 (of-wain:format [summary excerpts])
8801::
9971::
9972+:: Both written field sites are shown in the source that declares them.
9973+++ show-duplicate-fields
9974+ |= [file=path src=@t diagnostic=idiag]
9975+ ^- @t
9976+ =/ excerpts=(list @t)
9977+ %+ turn sites.diagnostic
9978+ |= site=[at=span note=tape]
9979+ (show-error src [file line.beg.at.site col.beg.at.site note.site])
9980+ (of-wain:format [(crip msg.diagnostic) excerpts])
9981+::
9982+++ duplicate-fields-report
9983+ |= [file=path src=@t diagnostic=idiag]
9984+ ^- @t
9985+ (of-wain:format ~['partial inference; module not checked' (show-duplicate-fields file src diagnostic)])
9986+::
8802:: +golden-types: a partial report; it does not claim the module checks
9987:: +golden-types: a partial report; it does not claim the module checks
8803::
9988::
8804++ golden-types
9989++ golden-types
@@ -8828,6 +10013,180 @@
8828+$ jfile-result (each [iface=ifile cache=jcache] @t)
10013+$ jfile-result (each [iface=ifile cache=jcache] @t)
8829+$ jimports-result (each [resolved=ijimports cache=jcache] @t)
10014+$ jimports-result (each [resolved=ijimports cache=jcache] @t)
8830::
10015::
10016+:: Written record fields each have their own lexical record scope.
10017++$ written-fields (map term span)
10018+++ duplicate-written-field
10019+ |= [name=term at=span seen=written-fields]
10020+ ^- (unit idiag)
10021+ =/ prior=(unit span) (~(get by seen) name)
10022+ ?~ prior ~
10023+ `["record field `{(trip name)}` is repeated" ~[[u.prior "first field"] [at "repeated field"]]]
10024+++ duplicate-shapes
10025+ |= xs=(list shape)
10026+ ^- (unit idiag)
10027+ ?~ xs ~
10028+ =/ first (duplicate-shape i.xs)
10029+ ?^ first first
10030+ $(xs t.xs)
10031+++ duplicate-fields
10032+ |= [fields=(list field) seen=written-fields]
10033+ ^- (unit idiag)
10034+ ?~ fields ~
10035+ =/ f=field i.fields
10036+ =/ n=(unit term)
10037+ ?- -.f
10038+ %face `name.f
10039+ %pun `name.f
10040+ %bare ~
10041+ ==
10042+ =/ dup=(unit idiag) ?~(n ~ (duplicate-written-field u.n at.f seen))
10043+ ?^ dup dup
10044+ =/ inner=(unit idiag)
10045+ ?- -.f
10046+ %face (duplicate-shape shape.f)
10047+ %pun ~
10048+ %bare (duplicate-shape shape.f)
10049+ ==
10050+ ?^ inner inner
10051+ $(fields t.fields, seen ?~(n seen (~(put by seen) u.n at.f)))
10052+++ duplicate-shape
10053+ |= s=shape
10054+ ^- (unit idiag)
10055+ ?- -.s
10056+ %cell (duplicate-fields fields.s ~)
10057+ %apply (duplicate-shapes args.s)
10058+ %union (duplicate-shapes cases.s)
10059+ %fn
10060+ =/ left (duplicate-shape sample.s)
10061+ ?^ left left
10062+ (duplicate-shape product.s)
10063+ %generic (duplicate-shape body.s)
10064+ * ~
10065+ ==
10066+++ duplicate-samples
10067+ |= [items=(list sample) seen=written-fields]
10068+ ^- (unit idiag)
10069+ ?~ items ~
10070+ =/ a=sample i.items
10071+ =/ n=(unit term)
10072+ ?- -.a
10073+ %bind `name.a
10074+ %face `name.a
10075+ %pun `name.a
10076+ * ~
10077+ ==
10078+ =/ dup=(unit idiag) ?~(n ~ (duplicate-written-field u.n at.a seen))
10079+ ?^ dup dup
10080+ =/ inner (duplicate-sample a)
10081+ ?^ inner inner
10082+ $(items t.items, seen ?~(n seen (~(put by seen) u.n at.a)))
10083+++ duplicate-sample
10084+ |= s=sample
10085+ ^- (unit idiag)
10086+ ?- -.s
10087+ %cell (duplicate-samples items.s ~)
10088+ %face (duplicate-shape shape.s)
10089+ %bare (duplicate-shape shape.s)
10090+ * ~
10091+ ==
10092+++ duplicate-exprs
10093+ |= xs=(list expr)
10094+ ^- (unit idiag)
10095+ ?~ xs ~
10096+ =/ first (duplicate-expr i.xs)
10097+ ?^ first first
10098+ $(xs t.xs)
10099+++ duplicate-items
10100+ |= [items=(list item) seen=written-fields]
10101+ ^- (unit idiag)
10102+ ?~ items ~
10103+ =/ a=item i.items
10104+ =/ dup=(unit idiag) ?~(face.a ~ (duplicate-written-field u.face.a at.a seen))
10105+ ?^ dup dup
10106+ =/ inner (duplicate-expr val.a)
10107+ ?^ inner inner
10108+ $(items t.items, seen ?~(face.a seen (~(put by seen) u.face.a at.a)))
10109+++ duplicate-pieces
10110+ |= pieces=(list piece)
10111+ ^- (unit idiag)
10112+ ?~ pieces ~
10113+ =/ first=(unit idiag) ?:(?=(%expr -.i.pieces) (duplicate-expr p.i.pieces) ~)
10114+ ?^ first first
10115+ $(pieces t.pieces)
10116+++ duplicate-qsegs
10117+ |= segs=(list qseg)
10118+ ^- (unit idiag)
10119+ ?~ segs ~
10120+ =/ first=(unit idiag) ?:(?=(%expr -.i.segs) (duplicate-expr p.i.segs) ~)
10121+ ?^ first first
10122+ $(segs t.segs)
10123+++ duplicate-edits
10124+ |= edits=(list edit)
10125+ ^- (unit idiag)
10126+ ?~ edits ~
10127+ =/ first (duplicate-expr val.i.edits)
10128+ ?^ first first
10129+ $(edits t.edits)
10130+++ duplicate-arms
10131+ |= arms=(list arm)
10132+ ^- (unit idiag)
10133+ ?~ arms ~
10134+ =/ first (duplicate-expr val.i.arms)
10135+ ?^ first first
10136+ $(arms t.arms)
10137+++ duplicate-defs
10138+ |= defs=(list def)
10139+ ^- (unit idiag)
10140+ ?~ defs ~
10141+ =/ first=(unit idiag)
10142+ ?- -.i.defs
10143+ %mold (duplicate-shape shape.i.defs)
10144+ %value (duplicate-expr val.i.defs)
10145+ ==
10146+ ?^ first first
10147+ $(defs t.defs)
10148+++ duplicate-expr
10149+ |= e=expr
10150+ ^- (unit idiag)
10151+ ?- -.e
10152+ %str (duplicate-pieces pieces.e)
10153+ %qath (duplicate-qsegs segs.e)
10154+ %change (duplicate-edits edits.e)
10155+ %pair (duplicate-expr val.e)
10156+ %unit (duplicate-expr val.e)
10157+ %group (duplicate-expr inner.e)
10158+ %list (duplicate-exprs items.e)
10159+ %tuple (duplicate-items items.e ~)
10160+ %gate-wide
10161+ =/ first (duplicate-sample sample.e)
10162+ ?^ first first
10163+ (duplicate-expr body.e)
10164+ %gate
10165+ =/ first (duplicate-sample sample.e)
10166+ ?^ first first
10167+ (duplicate-expr body.e)
10168+ %cast
10169+ =/ first (duplicate-shape shape.e)
10170+ ?^ first first
10171+ (duplicate-expr val.e)
10172+ %call
10173+ =/ first (duplicate-expr head.e)
10174+ ?^ first first
10175+ (duplicate-exprs args.e)
10176+ %trace
10177+ =/ first (duplicate-expr val.e)
10178+ ?^ first first
10179+ (duplicate-expr then.e)
10180+ %branch
10181+ =/ first (duplicate-expr subject.e)
10182+ ?^ first first
10183+ (duplicate-arms arms.e)
10184+ %body
10185+ =/ first (duplicate-defs defs.e)
10186+ ?^ first first
10187+ (duplicate-expr final.e)
10188+ * ~
10189+ ==
8831++ import-binding-names
10190++ import-binding-names
8832 |= imports=(list import)
10191 |= imports=(list import)
8833 ^- (list term)
10192 ^- (list term)
@@ -8840,6 +10199,60 @@
8840 ==
10199 ==
8841 [n $(imports t.imports)]
10200 [n $(imports t.imports)]
8842::
10201::
10202+++ reserved-proj-sample
10203+ |= sam=sample
10204+ ^- ?
10205+ ?- -.sam
10206+ %bind =(name.sam %proj)
10207+ %face =(name.sam %proj)
10208+ %pun =(name.sam %proj)
10209+ %cell (lien items.sam reserved-proj-sample)
10210+ * |
10211+ ==
10212+++ reserved-proj-pattern
10213+ |= p=pattern
10214+ ^- ?
10215+ ?- -.p
10216+ %bind =(name.p %proj)
10217+ %cell (lien items.p reserved-proj-pattern)
10218+ * |
10219+ ==
10220+++ reserved-proj-def
10221+ |= d=def
10222+ ^- ?
10223+ ?: =(name.d %proj) &
10224+ ?: ?=(%value -.d) (reserved-proj-expr val.d)
10225+ |
10226+++ reserved-proj-expr
10227+ |= e=expr
10228+ ^- ?
10229+ ?- -.e
10230+ %str (lien pieces.e |=(p=piece ?:(?=(%expr -.p) (reserved-proj-expr p.p) |)))
10231+ %qath (lien segs.e |=(p=qseg ?:(?=(%expr -.p) (reserved-proj-expr p.p) |)))
10232+ %change (lien edits.e |=(p=edit (reserved-proj-expr val.p)))
10233+ %pair $(e val.e)
10234+ %unit $(e val.e)
10235+ %group $(e inner.e)
10236+ %list (lien items.e reserved-proj-expr)
10237+ %tuple (lien items.e |=(i=item (reserved-proj-expr val.i)))
10238+ ?(%gate %gate-wide) |((reserved-proj-sample sample.e) $(e body.e))
10239+ %cast $(e val.e)
10240+ %call |($(e head.e) (lien args.e reserved-proj-expr))
10241+ %trace |($(e val.e) $(e then.e))
10242+ %branch |($(e subject.e) (lien arms.e |=(a=arm |((reserved-proj-pattern pat.a) (reserved-proj-expr val.a)))))
10243+ %body |((lien defs.e reserved-proj-def) $(e final.e))
10244+ * |
10245+ ==
10246+::
10247+++ module-has-reserved-proj
10248+ |= mod=module
10249+ ^- ?
10250+ =/ imported=(list term) (import-binding-names imports.mod)
10251+ =/ vals=(list term) (global-value-names defs.mod)
10252+ =/ molds=imolds (collect-simple-molds defs.mod)
10253+ =/ mold-names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
10254+ |((lien (weld imported (weld vals mold-names)) |=(n=term =(n %proj))) (lien defs.mod reserved-proj-def))
10255+::
8843++ module-scope-valid
10256++ module-scope-valid
8844 |= [mod=module prelude-values=(list term) prelude-molds=(list term)]
10257 |= [mod=module prelude-values=(list term) prelude-molds=(list term)]
8845 ^- ?
10258 ^- ?
@@ -8847,6 +10260,7 @@
8847 =/ vals=(list term) (global-value-names defs.mod)
10260 =/ vals=(list term) (global-value-names defs.mod)
8848 =/ molds=imolds (collect-simple-molds defs.mod)
10261 =/ molds=imolds (collect-simple-molds defs.mod)
8849 =/ mold-names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
10262 =/ mold-names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
10263+ ?: (module-has-reserved-proj mod) |
8850 ?. %+ levy imported
10264 ?. %+ levy imported
8851 |= n=term
10265 |= n=term
8852 &((unique-value-name n imported) !(lien vals |=(v=term =(n v))) !(lien mold-names |=(m=term =(n m))) !(lien prelude-values |=(v=term =(n v))) !(lien prelude-molds |=(m=term =(n m))))
10266 &((unique-value-name n imported) !(lien vals |=(v=term =(n v))) !(lien mold-names |=(m=term =(n m))) !(lien prelude-values |=(v=term =(n v))) !(lien prelude-molds |=(m=term =(n m))))
@@ -8928,10 +10342,14 @@
8928 =(var name.i.args.tail)
10342 =(var name.i.args.tail)
8929::
10343::
8930++ prelude-label
10344++ prelude-label
8931− |= [typ=itype name=term]
10345+ |= [typ=itype name=term vars=(list @ud)]
8932 ^- itype
10346 ^- itype
10347+ ?: ?=(%jrec -.typ) typ(label `name)
8933 ?. ?=(%union -.typ) typ
10348 ?. ?=(%union -.typ) typ
10349+ ?. (identity-union-parameters vars args.typ)
10350+ ?~ origin.typ typ
10351+ ?: =(at.u.origin.typ /lib/jibb/internal/jibb) typ(label ~)
8934− ?^ args.typ typ
10352+ typ
8935 typ(label `name)
10353 typ(label `name)
8936::
10354::
8937++ partial-prelude-molds
10355++ partial-prelude-molds
@@ -8946,7 +10364,7 @@
8946 (infer-mold-template body.m state(active [name.m active.state], in-mold &))
10364 (infer-mold-template body.m state(active [name.m active.state], in-mold &))
8947 ?~ out $(molds t.molds)
10365 ?~ out $(molds t.molds)
8948 =. typ.template.u.out (label-direct-union typ.template.u.out body.m name.m state)
10366 =. typ.template.u.out (label-direct-union typ.template.u.out body.m name.m state)
8949− =. typ.template.u.out (prelude-label typ.template.u.out name.m)
10367+ =. typ.template.u.out (prelude-label typ.template.u.out name.m vars.template.u.out)
8950 [[name.m template.u.out] $(molds t.molds)]
10368 [[name.m template.u.out] $(molds t.molds)]
8951::
10369::
8952:: A compiler-owned interface available only to the dedicated
10370:: A compiler-owned interface available only to the dedicated
@@ -8955,16 +10373,20 @@
8955 ^- ifile
10373 ^- ifile
8956 =/ a=itype [%avar 0]
10374 =/ a=itype [%avar 0]
8957 =/ pair=itype [%cell a a]
10375 =/ pair=itype [%cell a a]
10376+ =/ b=itype [%rvar 0]
10377+ =/ plus=ischeme [[%fn [%cell b b] b] ~[0]]
10378+ =/ minus=ischeme [[%fn b b] ~[0]]
8958 =/ greater=ischeme [[%fn pair [%flag ~]] ~[0]]
10379 =/ greater=ischeme [[%fn pair [%flag ~]] ~[0]]
8959− [~[[%raw-gth greater]] ~ /lib/jibb/primitives/jibb ~]
10380+ [~[[%raw-add plus] [%raw-dec minus] [%raw-gth greater]] ~ /lib/jibb/primitives/jibb ~ ~ ~ ~ ~]
8960::
10381::
8961++ infer-private-internal
10382++ infer-private-internal
8962− |= src=@t
10383+ |= [src=@t public-source=@t]
8963 ^- (unit ifile)
10384 ^- (unit ifile)
8964 =/ at=path /lib/jibb/internal/jibb
10385 =/ at=path /lib/jibb/internal/jibb
8965 =/ parsed (parse at src)
10386 =/ parsed (parse at src)
8966 ?: ?=(%| -.parsed) ~
10387 ?: ?=(%| -.parsed) ~
8967 =/ mod=module p.parsed
10388 =/ mod=module p.parsed
10389+ ?^ (duplicate-defs defs.mod) ~
8968 ?~ imports.mod
10390 ?~ imports.mod
8969 =/ built=jfile-result (infer-jibb-file at src ~ ~ ~ ~[at] ~ ~ ~ ~)
10391 =/ built=jfile-result (infer-jibb-file at src ~ ~ ~ ~[at] ~ ~ ~ ~)
8970 ?: ?=(%| -.built) ~
10392 ?: ?=(%| -.built) ~
@@ -8976,15 +10398,65 @@
8976 ?: (lien vals |=(n=term =(n %main))) ~
10398 ?: (lien vals |=(n=term =(n %main))) ~
8977 =/ molds=imolds (collect-simple-molds defs.mod)
10399 =/ molds=imolds (collect-simple-molds defs.mod)
8978 =/ globals=(list term) (weld (import-binding-names imports.mod) vals)
10400 =/ globals=(list term) (weld (import-binding-names imports.mod) vals)
10401+ :: The private source can use the public list and unit molds before the
10402+ :: prelude is otherwise prepared. Re-read the trusted public source here
10403+ :: and admit only its validated canonical templates; do not accept schemes
10404+ :: supplied independently by the caller.
10405+ =/ public=(each module error) (parse /lib/jibb/prelude/jibb public-source)
10406+ ?: ?=(%| -.public) ~
10407+ ?^ (duplicate-defs defs.p.public) ~
10408+ ?. (module-scope-valid p.public ~ ~) ~
10409+ =/ source-molds=imolds (collect-simple-molds defs.p.public)
10410+ =/ written-list=(unit shape) (find-simple-mold %list source-molds)
10411+ =/ source-list=(unit ischeme)
10412+ ?~ written-list ~
10413+ ?. (standard-prelude-list u.written-list) ~
10414+ `[[%collection %list ~[[%var 0]]] ~[0]]
10415+ :: Derive the public unit template from its actual source, then compare
10416+ :: the complete nominal template before making it available privately.
10417+ =/ unit-decl=(unit shape) (find-simple-mold %unit source-molds)
10418+ =/ source-unit=(unit ischeme)
10419+ ?~ unit-decl ~
10420+ =/ unit-molds=imolds ~[[%unit u.unit-decl]]
10421+ =/ unit-state=istate [0 ~ ~ ~ unit-molds ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | /lib/jibb/prelude/jibb ~[%unit] ~ ~ 256 ~]
10422+ =/ unit-types=imold-types (partial-prelude-molds unit-molds unit-state)
10423+ =/ unit-iface=ifile [~ unit-types /lib/jibb/prelude/jibb ~ ~ ~ ~ ~]
10424+ =/ found=(unit ischeme) (find-jibb-mold %unit unit-iface)
10425+ ?~ found ~
10426+ ?. (standard-unit-template u.found /lib/jibb/prelude/jibb) ~
10427+ found
10428+ =/ primitive=ifile private-primitive-interface
10429+ =? primitive ?=(^ source-list)
10430+ primitive(molds [[%list u.source-list] molds.primitive])
10431+ =? primitive ?=(^ source-unit)
10432+ primitive(molds [[%unit u.source-unit] molds.primitive])
8979− =/ js=ijimports ~[[face.i.imports.mod private-primitive-interface]]
10433+ =/ js=ijimports ~[[face.i.imports.mod primitive]]
8980 =/ reserved=(list term) ~[face.i.imports.mod]
10434 =/ reserved=(list term) ~[face.i.imports.mod]
8981 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
10435 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
8982− =/ state=istate [0 ~ ~ ~ molds globals ~ ~ ~ ~ js reserved ~ ~ ~ | at top ~]
10436+ =/ state=istate [0 ~ ~ ~ molds globals ~ ~ ~ ~ js reserved ~ ~ ~ | at top ~ ~ 256 ~]
8983 =/ mts=(each imold-types @t) (module-mold-types molds state)
10437 =/ mts=(each imold-types @t) (module-mold-types molds state)
8984− ?: ?=(%| -.mts) ~
10438+ =/ usable=(unit imold-types)
10439+ ?: ?=(%& -.mts) `p.mts
10440+ :: Missing public templates may make an unrelated internal mold
10441+ :: unavailable. Validate all molds once with isolated canonical
10442+ :: templates before admitting only those inferred using the actual
10443+ :: source-backed templates. The proof interface is never exported.
10444+ ?. |(?=(~ source-list) ?=(~ source-unit)) ~
10445+ =/ nil=itype [%const [%null %n 0 '~']]
10446+ =/ canonical-unit=ischeme
10447+ [[%union ~[nil [%cell nil [%face %u [%var 0]]]] `[/lib/jibb/prelude/jibb %unit] `%unit ~[[%var 0]]] ~[0]]
10448+ =/ canonical-list=ischeme [[%collection %list ~[[%var 0]]] ~[0]]
10449+ =/ proof-primitive=ifile private-primitive-interface
10450+ =. molds.proof-primitive ~[[%list canonical-list] [%unit canonical-unit]]
10451+ =/ proof-imports=ijimports ~[[face.i.imports.mod proof-primitive]]
10452+ =/ proof=(each imold-types @t) (module-mold-types molds state(jimports proof-imports))
10453+ ?: ?=(%| -.proof) ~
10454+ `(partial-prelude-molds molds state)
10455+ ?~ usable ~
8985− =/ env=ienv (resolve-supported-defs defs.mod molds globals ~ ~ ~ ~ js reserved at ~)
10456+ =/ resolution=iresolved (resolve-groups defs.mod molds globals ~ ~ ~ ~ js reserved at ~)
10457+ =/ env=ienv env.resolution
8986 ?. (module-values-complete defs.mod env) ~
10458 ?. (module-values-complete defs.mod env) ~
8987− `[env p.mts at ~]
10459+ `[env u.usable at ~ artifacts.resolution ~ `src ~]
8988::
10460::
8989++ partial-prelude-interface-with-internal
10461++ partial-prelude-interface-with-internal
8990 |= [src=@t internal-source=(unit @t)]
10462 |= [src=@t internal-source=(unit @t)]
@@ -8993,12 +10465,14 @@
8993 =/ at=path /lib/jibb/prelude/jibb
10465 =/ at=path /lib/jibb/prelude/jibb
8994 =/ parsed (parse at src)
10466 =/ parsed (parse at src)
8995 ?: ?=(%| -.parsed) ~
10467 ?: ?=(%| -.parsed) ~
10468+ ?: (named-mold-has-hole defs.p.parsed) ~
10469+ ?^ (duplicate-defs defs.p.parsed) ~
8996 =/ private=(unit ijimports)
10470 =/ private=(unit ijimports)
8997 ?~ imports.p.parsed `~
10471 ?~ imports.p.parsed `~
8998 ?. ?=([[%jibb *] ~] imports.p.parsed) ~
10472 ?. ?=([[%jibb *] ~] imports.p.parsed) ~
8999 ?. =(path.i.imports.p.parsed /lib/jibb/internal) ~
10473 ?. =(path.i.imports.p.parsed /lib/jibb/internal) ~
9000 ?~ internal-source ~
10474 ?~ internal-source ~
9001− =/ built=(unit ifile) (infer-private-internal u.internal-source)
10475+ =/ built=(unit ifile) (infer-private-internal u.internal-source src)
9002 ?~ built ~
10476 ?~ built ~
9003 `~[[face.i.imports.p.parsed u.built]]
10477 `~[[face.i.imports.p.parsed u.built]]
9004 ?~ private ~
10478 ?~ private ~
@@ -9015,9 +10489,16 @@
9015 =? env-molds declared
10489 =? env-molds declared
9016 (skim molds |=(m=[name=term body=shape] !=(%list name.m)))
10490 (skim molds |=(m=[name=term body=shape] !=(%list name.m)))
9017 =/ reserved=(list term) ?:(declared ~[%list] ~)
10491 =/ reserved=(list term) ?:(declared ~[%list] ~)
9018− =/ state=istate [0 ~ ~ ~ env-molds globals ~ ~ ~ ~ u.private reserved ~ ~ ~ | at names ~]
10492+ =/ state=istate [0 ~ ~ ~ env-molds globals ~ ~ ~ ~ u.private reserved ~ ~ ~ | at names ~ ~ 256 ~]
10493+ :: Other prelude molds may use list only after its source has passed
10494+ :: the standard-list check. The raw declaration remains removed.
10495+ =/ declared-list=(unit shape) (find-simple-mold %list molds)
10496+ =/ mold-prelude=(unit ifile)
10497+ ?~ declared-list ~
10498+ ?. (standard-prelude-list u.declared-list) ~
10499+ `[~ ~[[%list [[%collection %list ~[[%var 0]]] ~[0]]]] at ~ ~ ~ ~ ~]
9019− =/ mt=imold-types (partial-prelude-molds molds state)
10500+ =/ mt=imold-types (partial-prelude-molds molds state(prelude mold-prelude))
9020− =/ partial=ifile [~ mt at ~]
10501+ =/ partial=ifile [~ mt at ~ ~ ~ ~ ~]
9021 :: An explicitly qualified re-export must resolve. Other unsupported
10502 :: An explicitly qualified re-export must resolve. Other unsupported
9022 :: prelude declarations remain reserved but absent from the interface.
10503 :: prelude declarations remain reserved but absent from the interface.
9023 =/ required=imolds
10504 =/ required=imolds
@@ -9028,8 +10509,13 @@
9028 ?~ names.sh |
10509 ?~ names.sh |
9029 ?=(^ t.names.sh)
10510 ?=(^ t.names.sh)
9030 ?. (levy required |=(m=[name=term body=shape] ?=(^ (find-jibb-mold name.m partial)))) ~
10511 ?. (levy required |=(m=[name=term body=shape] ?=(^ (find-jibb-mold name.m partial)))) ~
9031− =/ env=ienv (resolve-supported-defs ds env-molds globals ~ ~ ~ ~ u.private reserved at `partial)
10512+ =/ resolution=iresolved (resolve-groups ds env-molds globals ~ ~ ~ ~ u.private reserved at `partial)
9032− `[env mt at ~]
10513+ =/ env=ienv env.resolution
10514+ ?. (hole-values-present ds env) ~
10515+ =/ deps=(list iwidth-dependency)
10516+ ?~ u.private ~
10517+ ~[[at.interface.i.u.private source.interface.i.u.private elaborations.interface.i.u.private]]
10518+ `[env mt at ~ artifacts.resolution deps `src ~]
9033::
10519::
9034++ partial-prelude-interface
10520++ partial-prelude-interface
9035 |= src=@t
10521 |= src=@t
@@ -9080,6 +10566,66 @@
9080 ?: =(at at.i.cache) `iface.i.cache
10566 ?: =(at at.i.cache) `iface.i.cache
9081 $(cache t.cache)
10567 $(cache t.cache)
9082::
10568::
10569+:: These certificates retain the complete checked source closure. The
10570+:: trusted host must supply the identical prepared prelude and reader nouns.
10571+:: Exact bundle equality binds all source paths and versions; the set
10572+:: retains transitive paths for active-cycle checks. Request-bearing graphs
10573+:: alone have a size limit; incompatible diamond evidence fails closed.
10574+++ request-graph-requests-add
10575+ |= [pending=(list irequest-evidence) acc=(list irequest-evidence) fuel=@ud]
10576+ ^- (unit (list irequest-evidence))
10577+ ?~ pending `acc
10578+ ?: =(0 fuel) ~
10579+ =/ hit=(list irequest-evidence)
10580+ (skim acc |=(x=irequest-evidence &(=(api-at.x api-at.i.pending) =(name.x name.i.pending))))
10581+ ?^ hit
10582+ ?. ?=([* ~] hit) ~
10583+ ?. =(i.hit i.pending) ~
10584+ $(pending t.pending, fuel (dec fuel))
10585+ $(pending t.pending, acc [i.pending acc], fuel (dec fuel))
10586+++ request-graph-inputs-match
10587+ |= [g=irequest-graph externals=iexternals marks=imark-externals modules=jbundle values=(list term) molds=(list term) prelude=(unit ifile)]
10588+ ^- ?
10589+ ?& =(bundle-input.g modules)
10590+ =(prelude-input.g prelude)
10591+ =(prelude-values.g values)
10592+ =(prelude-molds.g molds)
10593+ =(externals.g externals)
10594+ =(marks.g marks)
10595+ ==
10596+++ request-graph-merge
10597+ |= [imports=ijimports g=irequest-graph fuel=@ud]
10598+ ^- (unit irequest-graph)
10599+ ?~ imports `g
10600+ ?: =(0 fuel) ~
10601+ =/ child=ifile interface.i.imports
10602+ ?~ graph.child ~
10603+ =/ cg=irequest-graph u.graph.child
10604+ ?. ?& =(bundle-input.g bundle-input.cg)
10605+ =(prelude-input.g prelude-input.cg)
10606+ =(prelude-values.g prelude-values.cg)
10607+ =(prelude-molds.g prelude-molds.cg)
10608+ =(externals.g externals.cg)
10609+ =(marks.g marks.cg)
10610+ ==
10611+ ~
10612+ =/ merged=(set path) (~(uni in:..zuse paths.g) paths.cg)
10613+ =/ rs=(unit (list irequest-evidence))
10614+ (request-graph-requests-add requests.cg requests.g (add 1 (lent requests.cg)))
10615+ ?~ rs ~
10616+ ?: &(?=(^ u.rs) |((gth (lent ~(tap in:..zuse merged)) 256) (gth (lent u.rs) 256))) ~
10617+ $(imports t.imports, g g(paths merged, requests u.rs), fuel (dec fuel))
10618+++ request-graph-reusable
10619+ |= [f=ifile src=@t externals=iexternals marks=imark-externals modules=jbundle active=(list path) values=(list term) molds=(list term) prelude=(unit ifile)]
10620+ ^- ?
10621+ ?~ source.f |
10622+ ?. =(u.source.f src) |
10623+ ?~ graph.f |
10624+ =/ g=irequest-graph u.graph.f
10625+ ?. (request-graph-inputs-match g externals marks modules values molds prelude) |
10626+ ?. (~(has in:..zuse paths.g) at.f) |
10627+ !(lien active |=(p=path (~(has in:..zuse paths.g) p)))
10628+::
9083++ resolve-jibb-imports
10629++ resolve-jibb-imports
9084 |= [imports=(list import) externals=iexternals mark-externals=imark-externals modules=jbundle active=(list path) prelude-values=(list term) prelude-molds=(list term) cache=jcache prelude=(unit ifile)]
10630 |= [imports=(list import) externals=iexternals mark-externals=imark-externals modules=jbundle active=(list path) prelude-values=(list term) prelude-molds=(list term) cache=jcache prelude=(unit ifile)]
9085 ^- jimports-result
10631 ^- jimports-result
@@ -9097,7 +10643,16 @@
9097 ?^ t.found [%| (crip "duplicate module sources: {(spud at)}")]
10643 ?^ t.found [%| (crip "duplicate module sources: {(spud at)}")]
9098 =/ cached=(unit ifile) (find-jibb-cache at cache)
10644 =/ cached=(unit ifile) (find-jibb-cache at cache)
9099 =/ iface=jfile-result
10645 =/ iface=jfile-result
10646+ ?^ cached
10647+ ?. =(at.u.cached at) [%| 'cached module identity needs unsupported inference']
10648+ ?~ graph.u.cached
10649+ :: A detached legacy interface has unknown evidence. Rebuild it
10650+ :: against the current graph, without retaining any stale entry.
10651+ =/ clean=jcache (skim cache |=(x=[at=path iface=ifile] !=(at.x at)))
10652+ (infer-jibb-file at source.i.found externals mark-externals modules [at active] prelude-values prelude-molds clean prelude)
10653+ ?. (request-graph-reusable u.cached source.i.found externals mark-externals modules active prelude-values prelude-molds prelude)
10654+ [%| 'cached module evidence needs unsupported inference']
9100− ?^ cached [%& [u.cached cache]]
10655+ [%& [u.cached cache]]
9101 (infer-jibb-file at source.i.found externals mark-externals modules [at active] prelude-values prelude-molds cache prelude)
10656 (infer-jibb-file at source.i.found externals mark-externals modules [at active] prelude-values prelude-molds cache prelude)
9102 ?: ?=(%| -.iface) [%| p.iface]
10657 ?: ?=(%| -.iface) [%| p.iface]
9103 =/ rest=jimports-result $(imports t.imports, cache cache.p.iface)
10658 =/ rest=jimports-result $(imports t.imports, cache cache.p.iface)
@@ -9148,7 +10703,7 @@
9148 ?~ segments `~
10703 ?~ segments `~
9149 ?: ?=(%knot -.i.segments) $(segments t.segments)
10704 ?: ?=(%knot -.i.segments) $(segments t.segments)
9150 =/ seg=pseg i.segments
10705 =/ seg=pseg i.segments
9151− ?> ?=(%typed -.seg)
10706+ ?. ?=(%typed -.seg) ~
9152 ?: =(0 aura.seg) ~
10707 ?: =(0 aura.seg) ~
9153 ?: (lien seen |=(n=term =(n name.seg))) ~
10708 ?: (lien seen |=(n=term =(n name.seg))) ~
9154 =/ rest=(unit (list iapi-parameter)) $(segments t.segments, seen [name.seg seen])
10709 =/ rest=(unit (list iapi-parameter)) $(segments t.segments, seen [name.seg seen])
@@ -9234,6 +10789,7 @@
9234 ^- ?
10789 ^- ?
9235 =/ path-names=(list term) (turn paths |=(p=iapi-path name.p))
10790 =/ path-names=(list term) (turn paths |=(p=iapi-path name.p))
9236 =/ derived=(list term) (weld path-names poke-names)
10791 =/ derived=(list term) (weld path-names poke-names)
10792+ ?: (lien derived |=(n=term =(n %proj))) |
9237 =/ outer=(list term) (weld prelude-values (weld (global-value-names defs.mod) (api-import-faces imports.mod)))
10793 =/ outer=(list term) (weld prelude-values (weld (global-value-names defs.mod) (api-import-faces imports.mod)))
9238 (levy derived |=(n=term &((unique-value-name n derived) !(lien outer |=(x=term =(n x))))))
10794 (levy derived |=(n=term &((unique-value-name n derived) !(lien outer |=(x=term =(n x))))))
9239::
10795::
@@ -9279,6 +10835,8 @@
9279++ api-path-analysis
10835++ api-path-analysis
9280 |= [mod=module externals=imark-externals prelude-values=(list term) prelude-molds=(list term)]
10836 |= [mod=module externals=imark-externals prelude-values=(list term) prelude-molds=(list term)]
9281 ^- (unit (list iapi-path-typed))
10837 ^- (unit (list iapi-path-typed))
10838+ ?: (lien defs.mod def-has-hole) ~
10839+ ?^ (duplicate-defs defs.mod) ~
9282 =/ ds=(list def) defs.mod
10840 =/ ds=(list def) defs.mod
9283 =/ declarations=(list def)
10841 =/ declarations=(list def)
9284 (skim ds |=(d=def &(?=(%mold -.d) =(%paths name.d))))
10842 (skim ds |=(d=def &(?=(%mold -.d) =(%paths name.d))))
@@ -9306,9 +10864,11 @@
9306 |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle prepared=(unit iprelude)]
10864 |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle prepared=(unit iprelude)]
9307 ^- (each (list iapi-path-typed) @t)
10865 ^- (each (list iapi-path-typed) @t)
9308 ?. ?=([%ui %api @ %jibb ~] file) [%| 'API path analysis requires /ui/api/<agent>.jibb']
10866 ?. ?=([%ui %api @ %jibb ~] file) [%| 'API path analysis requires /ui/api/<agent>.jibb']
9309− ?~ prepared [%| 'API path analysis needs the prepared prelude']
9310 =/ parsed (parse file src)
10867 =/ parsed (parse file src)
9311 ?: ?=(%| -.parsed) [%| 'API path source does not parse']
10868 ?: ?=(%| -.parsed) [%| 'API path source does not parse']
10869+ =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
10870+ ?^ duplicate [%| (show-duplicate-fields file src u.duplicate)]
10871+ ?~ prepared [%| 'API path analysis needs the prepared prelude']
9312 =/ prelude=(unit ifile) `iface.u.prepared
10872 =/ prelude=(unit ifile) `iface.u.prepared
9313 =/ deps=jimports-result
10873 =/ deps=jimports-result
9314 (resolve-jibb-imports imports.p.parsed externals marks modules ~[file] values.u.prepared molds.u.prepared ~ prelude)
10874 (resolve-jibb-imports imports.p.parsed externals marks modules ~[file] values.u.prepared molds.u.prepared ~ prelude)
@@ -9318,6 +10878,346 @@
9318 ?~ paths [%| 'API path declaration needs unsupported analysis']
10878 ?~ paths [%| 'API path declaration needs unsupported analysis']
9319 [%& u.paths]
10879 [%& u.paths]
9320::
10880::
10881+:: Analysis evidence retains the API source, the prepared interface, the
10882+:: caller's reader results and the resolved Jibb dependency cache alongside
10883+:: the typed path declarations. Reader results and prepared interfaces are
10884+:: trusted inputs: this does not verify their underlying Hoon source/version,
10885+:: create requests or check the provenance of arbitrary values.
10886++$ iapi-path-evidence
10887+ [at=path source=@t prepared=iprelude externals=iexternals marks=imark-externals dependencies=jcache paths=(list iapi-path-typed)]
10888+++ api-path-evidence-source
10889+ |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle prepared=(unit iprelude)]
10890+ ^- (each iapi-path-evidence @t)
10891+ ?. ?=([%ui %api @ %jibb ~] file) [%| 'API path evidence requires /ui/api/<agent>.jibb']
10892+ =/ parsed (parse file src)
10893+ ?: ?=(%| -.parsed) [%| 'API path evidence source does not parse']
10894+ =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
10895+ ?^ duplicate [%| (show-duplicate-fields file src u.duplicate)]
10896+ ?~ prepared [%| 'API path evidence needs the prepared prelude']
10897+ =/ public=ifile iface.u.prepared
10898+ =/ deps=jimports-result
10899+ (resolve-jibb-imports imports.p.parsed externals marks modules ~[file] values.u.prepared molds.u.prepared ~ `public)
10900+ ?: ?=(%| -.deps) [%| p.deps]
10901+ =/ paths=(unit (list iapi-path-typed))
10902+ (api-path-analysis p.parsed marks values.u.prepared molds.u.prepared)
10903+ ?~ paths [%| 'API path declaration needs unsupported analysis']
10904+ [%& [file src u.prepared externals marks cache.p.deps u.paths]]
10905+:: Graph-aware variant preserves the caller active stack and cache.
10906+++ api-path-evidence-graph
10907+ |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle active=(list path) cache=jcache prepared=(unit iprelude)]
10908+ ^- (each iapi-path-evidence @t)
10909+ ?~ active [%| 'API analysis needs an active graph']
10910+ ?. =(i.active file) [%| 'API analysis active graph does not start at the source']
10911+ ?: (lien t.active |=(p=path =(p file))) [%| 'API analysis active graph contains a cycle']
10912+ ?. ?=([%ui %api @ %jibb ~] file) [%| 'API path evidence requires /ui/api/<agent>.jibb']
10913+ =/ parsed (parse file src)
10914+ ?: ?=(%| -.parsed) [%| 'API path evidence source does not parse']
10915+ =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
10916+ ?^ duplicate [%| (show-duplicate-fields file src u.duplicate)]
10917+ ?~ prepared [%| 'API path evidence needs the prepared prelude']
10918+ =/ public=ifile iface.u.prepared
10919+ =/ deps=jimports-result
10920+ (resolve-jibb-imports imports.p.parsed externals marks modules active values.u.prepared molds.u.prepared cache `public)
10921+ ?: ?=(%| -.deps) [%| p.deps]
10922+ =/ paths=(unit (list iapi-path-typed))
10923+ (api-path-analysis p.parsed marks values.u.prepared molds.u.prepared)
10924+ ?~ paths [%| 'API path declaration needs unsupported analysis']
10925+ [%& [file src u.prepared externals marks cache.p.deps u.paths]]
10926+::
10927+:: This query classifies a unique path declaration only. Missing evidence
10928+:: or a nonunique name is unknown; it proves nothing about an ask value.
10929+:: Like prepared interfaces, the supplied evidence is a trusted host input.
10930+++ api-path-watchability
10931+ |= [evidence=(unit iapi-path-evidence) case-name=term]
10932+ ^- ?(%watchable %not-watchable %unknown)
10933+ ?~ evidence %unknown
10934+ =/ found=(list iapi-path-typed)
10935+ (skim paths.u.evidence |=(p=iapi-path-typed =(name.path.p case-name)))
10936+ ?. ?=([* ~] found) %unknown
10937+ ?~ scry.path.i.found %watchable
10938+ %not-watchable
10939+::
10940+:: These are declaration-derived request components, not a callable gate,
10941+:: an ask value, or proof of a value's provenance. Keep the exact trusted
10942+:: source/reader evidence until a later checked interface and lowerer can
10943+:: attach it to a generated request. No argument ordering is claimed here.
10944++$ iapi-request-parameter [name=term typ=itype at=span]
10945++$ iapi-request-parts
10946+ [evidence=iapi-path-evidence path=iapi-path-typed parameters=(list iapi-request-parameter) reply-sample=itype fold=(unit itype) watchability=?(%watchable %not-watchable)]
10947+++ api-request-parameter-types
10948+ |= params=(list iapi-parameter)
10949+ ^- (unit (list iapi-request-parameter))
10950+ ?~ params `~
10951+ =/ aura=@ta aura.i.params
10952+ ?. |(?=(?(%u %ud %ux %uv %t %ta %tas %p %da %dr) aura) =('tD' aura)) ~
10953+ =/ rest=(unit (list iapi-request-parameter)) $(params t.params)
10954+ ?~ rest ~
10955+ `[[name.i.params [%atom aura] at.i.params] u.rest]
10956+::
10957+:: A single diff's fold consumes the tagged diff and the previous full value.
10958+:: Multiple-diff unions need a checked union representation and remain open.
10959+++ api-request-fold-type
10960+ |= p=iapi-path-typed
10961+ ^- (unit (unit itype))
10962+ ?~ diffs.p `~
10963+ ?^ t.diffs.p ~
10964+ =/ d=iapi-mark-type i.diffs.p
10965+ =/ literal=lit [%term %tas name.d (crip ['%' (trip name.d)])]
10966+ =/ sample=itype [%cell [%cell [%const literal] typ.d] full.p]
10967+ ``[%fn sample full.p]
10968+::
10969+++ api-request-parts
10970+ |= [evidence=(unit iapi-path-evidence) case-name=term]
10971+ ^- (unit iapi-request-parts)
10972+ ?~ evidence ~
10973+ =/ found=(list iapi-path-typed)
10974+ (skim paths.u.evidence |=(p=iapi-path-typed =(name.path.p case-name)))
10975+ ?. ?=([* ~] found) ~
10976+ =/ p=iapi-path-typed i.found
10977+ =/ raw=(unit (list iapi-parameter)) (api-path-parameters segments.path.p ~)
10978+ ?~ raw ~
10979+ =/ params=(unit (list iapi-request-parameter)) (api-request-parameter-types u.raw)
10980+ ?~ params ~
10981+ =/ fold=(unit (unit itype)) (api-request-fold-type p)
10982+ ?~ fold ~
10983+ =/ watch=?(%watchable %not-watchable) ?~(scry.path.p %watchable %not-watchable)
10984+ `[u.evidence p u.params full.p u.fold watch]
10985+::
10986+:: Check ordinary API molds and values plus every declared mark type using
10987+:: the same trusted source, prepared prelude and reader inputs as path
10988+:: evidence. Keep elaborations with those inputs for a later interface.
10989+:: This is partial analysis: an unused /- core is not independently checked,
10990+:: definitions needing derived values remain unsupported, and no complete
10991+:: API, request or constructor is exported or given runtime behavior.
10992++$ iapi-support-evidence
10993+ [paths=iapi-path-evidence values=ienv molds=imold-types marks=(list iapi-mark-type) elaborations=(list iwidth-definition)]
10994+++ api-support-analysis-source
10995+ |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle prepared=(unit iprelude)]
10996+ ^- (each iapi-support-evidence @t)
10997+ =/ path-result (api-path-evidence-source file src externals marks modules prepared)
10998+ ?: ?=(%| -.path-result) [%| p.path-result]
10999+ =/ evidence=iapi-path-evidence p.path-result
11000+ =/ parsed (parse file src)
11001+ ?: ?=(%| -.parsed) [%| 'API source does not parse']
11002+ =/ mod=module p.parsed
11003+ =/ ordinary=(list def)
11004+ (skim defs.mod |=(d=def !&(?=(%mold -.d) |(=(%paths name.d) =(%poke name.d)))))
11005+ =/ prep=iprelude prepared.evidence
11006+ ?. (module-scope-valid mod(defs ordinary) values.prep molds.prep) [%| 'API ordinary scope needs unsupported inference']
11007+ =/ vals=(list term) (global-value-names ordinary)
11008+ ?: (lien vals |=(n=term =(n %main))) [%| 'API module kind needs unsupported inference']
11009+ =/ declared=(list term) (collect-mark-imports imports.mod)
11010+ =/ mark-types=(unit (list iapi-mark-type)) (api-diff-types declared marks declared)
11011+ ?~ mark-types [%| 'API declared marks need unsupported inference']
11012+ =/ prelude=(unit ifile) `iface.prep
11013+ =/ deps=jimports-result
11014+ (resolve-jibb-imports imports.mod externals marks modules ~[file] values.prep molds.prep dependencies.evidence prelude)
11015+ ?: ?=(%| -.deps) [%| p.deps]
11016+ =/ molds=imolds (collect-simple-molds ordinary)
11017+ =/ globals=(list term) (weld values.prep (weld (import-binding-names imports.mod) vals))
11018+ =/ surs=(list term) (collect-sur-imports imports.mod)
11019+ =/ reserved=(list term) (weld molds.prep (turn resolved.p.deps |=(j=[face=term interface=ifile] face.j)))
11020+ =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
11021+ =/ state=istate [0 ~ ~ ~ molds globals externals surs marks declared resolved.p.deps reserved ~ ~ ~ | file top prelude ~ 256 ~]
11022+ =/ mts=(each imold-types @t) (module-mold-types molds state)
11023+ ?: ?=(%| -.mts) [%| p.mts]
11024+ =/ resolution=iresolved (resolve-groups ordinary molds globals externals surs marks declared resolved.p.deps reserved file prelude)
11025+ ?. (module-values-complete ordinary env.resolution) [%| 'API ordinary definitions need unsupported inference']
11026+ [%& [evidence env.resolution p.mts u.mark-types artifacts.resolution]]
11027+:: Preserve the same graph context through supporting definitions.
11028+++ api-support-analysis-graph
11029+ |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle active=(list path) cache=jcache prepared=(unit iprelude)]
11030+ ^- (each iapi-support-evidence @t)
11031+ =/ path-result (api-path-evidence-graph file src externals marks modules active cache prepared)
11032+ ?: ?=(%| -.path-result) [%| p.path-result]
11033+ =/ evidence=iapi-path-evidence p.path-result
11034+ =/ parsed (parse file src)
11035+ ?: ?=(%| -.parsed) [%| 'API source does not parse']
11036+ =/ mod=module p.parsed
11037+ =/ ordinary=(list def)
11038+ (skim defs.mod |=(d=def !&(?=(%mold -.d) |(=(%paths name.d) =(%poke name.d)))))
11039+ =/ prep=iprelude prepared.evidence
11040+ ?. (module-scope-valid mod(defs ordinary) values.prep molds.prep) [%| 'API ordinary scope needs unsupported inference']
11041+ =/ vals=(list term) (global-value-names ordinary)
11042+ ?: (lien vals |=(n=term =(n %main))) [%| 'API module kind needs unsupported inference']
11043+ =/ declared=(list term) (collect-mark-imports imports.mod)
11044+ =/ mark-types=(unit (list iapi-mark-type)) (api-diff-types declared marks declared)
11045+ ?~ mark-types [%| 'API declared marks need unsupported inference']
11046+ =/ prelude=(unit ifile) `iface.prep
11047+ =/ deps=jimports-result
11048+ (resolve-jibb-imports imports.mod externals marks modules active values.prep molds.prep dependencies.evidence prelude)
11049+ ?: ?=(%| -.deps) [%| p.deps]
11050+ =/ molds=imolds (collect-simple-molds ordinary)
11051+ =/ globals=(list term) (weld values.prep (weld (import-binding-names imports.mod) vals))
11052+ =/ surs=(list term) (collect-sur-imports imports.mod)
11053+ =/ reserved=(list term) (weld molds.prep (turn resolved.p.deps |=(j=[face=term interface=ifile] face.j)))
11054+ =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
11055+ =/ state=istate [0 ~ ~ ~ molds globals externals surs marks declared resolved.p.deps reserved ~ ~ ~ | file top prelude ~ 256 ~]
11056+ =/ mts=(each imold-types @t) (module-mold-types molds state)
11057+ ?: ?=(%| -.mts) [%| p.mts]
11058+ =/ resolution=iresolved (resolve-groups ordinary molds globals externals surs marks declared resolved.p.deps reserved file prelude)
11059+ ?. (module-values-complete ordinary env.resolution) [%| 'API ordinary definitions need unsupported inference']
11060+ [%& [evidence env.resolution p.mts u.mark-types artifacts.resolution]]
11061+::
11062+:: Type-analysis artifact for one plain request. The resolver may publish
11063+:: its interface only together with trusted source and reader evidence.
11064+:: No lowering or runtime validator exists.
11065+:: Value watchability remains unproved even for a watchable declaration.
11066++$ ione-request-interface
11067+ [support=iapi-support-evidence parts=iapi-request-parts iface=ifile]
11068+++ request-compatible-ask
11069+ |= prelude=iprelude
11070+ ^- (unit ischeme)
11071+ =/ public=ifile iface.prelude
11072+ ?. =(at.public /lib/jibb/prelude/jibb) ~
11073+ =/ ask=(unit ischeme) (find-jibb-mold %ask public)
11074+ ?~ ask ~
11075+ ?. ?=([@ ~] vars.u.ask) ~
11076+ ?. ?=(%union -.typ.u.ask) ~
11077+ ?. =(origin.typ.u.ask `[/lib/jibb/internal/jibb %ask]) ~
11078+ ?. (identity-union-parameters vars.u.ask args.typ.u.ask) ~
11079+ =/ m=@ud i.vars.u.ask
11080+ ?: (itype-var-is-atom m typ.u.ask) ~
11081+ ?. (levy (itype-vars typ.u.ask) |=(n=@ud =(n m))) ~
11082+ ?: (itype-has-tag typ.u.ask) ~
11083+ =/ private=(list iwidth-dependency)
11084+ (skim dependencies.public |=(d=iwidth-dependency =(at.d /lib/jibb/internal/jibb)))
11085+ ?. ?=([* ~] private) ~
11086+ ?~ source.i.private ~
11087+ =/ path=(unit ischeme) (find-jibb-mold %path public)
11088+ ?~ path ~
11089+ ?^ vars.u.path ~
11090+ =/ path-type=itype [%collection %list ~[[%atom %ta]]]
11091+ ?. =(typ.u.path path-type) ~
11092+ =/ unit-template=(unit ischeme) (find-jibb-mold %unit public)
11093+ ?~ unit-template ~
11094+ ?. (standard-unit-template u.unit-template /lib/jibb/prelude/jibb) ~
11095+ =/ state-unit=(unit itype) (template-apply u.unit-template ~[[%noun ~]])
11096+ ?~ state-unit ~
11097+ =/ path-unit=(unit itype) (template-apply u.unit-template ~[path-type])
11098+ ?~ path-unit ~
11099+ =/ output=itype [%cell [%face %state [%noun ~]] [%face %message [%var m]]]
11100+ =/ agent-input=itype [%cell [%face %mark [%atom %tas]] [%cell [%face %state u.state-unit] [%face %fact [%noun ~]]]]
11101+ =/ store-input=itype [%cell [%face %state u.state-unit] [%face %fact [%noun ~]]]
11102+ =/ pure-case=itype [%cell [%const [%term %tas %pure '%pure']] [%face %value [%var m]]]
11103+ =/ agent-case=itype
11104+ [%cell [%const [%term %tas %agent '%agent']] [%cell [%face %api [%atom %t]] [%cell [%face %case [%atom %tas]] [%cell [%face %agent [%atom %tas]] [%cell [%face %path path-type] [%cell [%face %scry u.path-unit] [%face %receive [%fn agent-input output]]]]]]]]
11105+ =/ store-case=itype
11106+ [%cell [%const [%term %tas %store '%store']] [%cell [%face %module [%atom %t]] [%cell [%face %name [%atom %tas]] [%face %receive [%fn store-input output]]]]]
11107+ ?. =(cases.typ.u.ask ~[pure-case agent-case store-case]) ~
11108+ ask
11109+::
11110+:: The first supported standalone API has exactly one mark import and one
11111+:: plain path declaration, with no other definitions or imports. No partial
11112+:: success is published when source, schema, or a required mold is unknown.
11113+++ one-request-interface-source
11114+ |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle prepared=(unit iprelude)]
11115+ ^- (each ione-request-interface @t)
11116+ =/ out (api-support-analysis-source file src externals marks modules prepared)
11117+ ?: ?=(%| -.out) [%| p.out]
11118+ =/ support=iapi-support-evidence p.out
11119+ =/ ev=iapi-path-evidence paths.support
11120+ =/ parsed (parse file src)
11121+ ?: ?=(%| -.parsed) [%| 'request source does not parse']
11122+ =/ mod=module p.parsed
11123+ ?. ?=(?([[%mark *] ~] [[%mark *] [%mark *] ~]) imports.mod) [%| 'request imports need unsupported inference']
11124+ ?. ?=([[%mold *] ~] defs.mod) [%| 'request definitions need unsupported inference']
11125+ ?. =(%paths name.i.defs.mod) [%| 'request declaration needs unsupported inference']
11126+ ?. ?=([* ~] paths.ev) [%| 'request count needs unsupported inference']
11127+ =/ p=iapi-path-typed i.paths.ev
11128+ =/ parts=(unit iapi-request-parts) (api-request-parts `ev name.path.p)
11129+ ?~ parts [%| 'request components need unsupported inference']
11130+ ?. ?=(?(~ [* ~]) parameters.u.parts) [%| 'request parameters need unsupported inference']
11131+ ?: &(?=(^ fold.u.parts) ?=(^ parameters.u.parts)) [%| 'request parameter and fold need unsupported inference']
11132+ ?^ scry.path.p [%| 'request scry needs unsupported inference']
11133+ =/ valid-marks=?
11134+ ?~ fold.u.parts ?=([* ~] marks.support)
11135+ ?=([* [* ~]] marks.support)
11136+ ?. valid-marks [%| 'request marks need unsupported inference']
11137+ =/ fold-open=?
11138+ ?~ fold.u.parts |
11139+ |(?=(^ (itype-vars u.fold.u.parts)) (itype-has-tag u.fold.u.parts))
11140+ ?: fold-open [%| 'request fold needs unsupported inference']
11141+ ?^ (itype-vars reply-sample.u.parts) [%| 'request payload needs unsupported inference']
11142+ ?: (itype-has-tag reply-sample.u.parts) [%| 'request payload needs unsupported inference']
11143+ =/ ask=(unit ischeme) (request-compatible-ask prepared.ev)
11144+ ?~ ask [%| 'request ask needs unsupported inference']
11145+ =/ result=(unit itype) (template-apply u.ask ~[[%var 0]])
11146+ ?~ result [%| 'request ask needs unsupported inference']
11147+ =/ callback=itype [%fn reply-sample.u.parts [%var 0]]
11148+ =/ sample=itype
11149+ ?^ fold.u.parts [%cell callback u.fold.u.parts]
11150+ ?~ parameters.u.parts callback
11151+ [%cell typ.i.parameters.u.parts callback]
11152+ =/ scheme=ischeme [[%fn sample u.result] ~[0]]
11153+ =/ exports=imold-types
11154+ (turn marks.support |=(m=iapi-mark-type [name.m [typ.m ~]]))
11155+ =/ prelude=iprelude prepared.ev
11156+ =/ public=ifile iface.prelude
11157+ ?~ source.public [%| 'request prelude source needs unsupported inference']
11158+ =/ private=(list iwidth-dependency)
11159+ (skim dependencies.public |=(d=iwidth-dependency =(at.d /lib/jibb/internal/jibb)))
11160+ ?. ?=([* ~] private) [%| 'request internal source needs unsupported inference']
11161+ ?~ source.i.private [%| 'request internal source needs unsupported inference']
11162+ =/ req=irequest-evidence
11163+ [file name.path.p p src u.source.public u.source.i.private values.prelude molds.prelude externals marks]
11164+ =/ interface=ifile [~[[name.path.p scheme]] exports file ~ ~ ~ `src `[(silt `(list path)`~[file]) ~[req] modules `public values.prelude molds.prelude externals marks]]
11165+ [%& [support u.parts interface]]
11166+:: Graph-aware request artifact; resolver use remains type-only.
11167+++ one-request-interface-graph
11168+ |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle active=(list path) cache=jcache prepared=(unit iprelude)]
11169+ ^- (each ione-request-interface @t)
11170+ =/ out (api-support-analysis-graph file src externals marks modules active cache prepared)
11171+ ?: ?=(%| -.out) [%| p.out]
11172+ =/ support=iapi-support-evidence p.out
11173+ =/ ev=iapi-path-evidence paths.support
11174+ =/ parsed (parse file src)
11175+ ?: ?=(%| -.parsed) [%| 'request source does not parse']
11176+ =/ mod=module p.parsed
11177+ ?. ?=(?([[%mark *] ~] [[%mark *] [%mark *] ~]) imports.mod) [%| 'request imports need unsupported inference']
11178+ ?. ?=([[%mold *] ~] defs.mod) [%| 'request definitions need unsupported inference']
11179+ ?. =(%paths name.i.defs.mod) [%| 'request declaration needs unsupported inference']
11180+ ?. ?=([* ~] paths.ev) [%| 'request count needs unsupported inference']
11181+ =/ p=iapi-path-typed i.paths.ev
11182+ =/ parts=(unit iapi-request-parts) (api-request-parts `ev name.path.p)
11183+ ?~ parts [%| 'request components need unsupported inference']
11184+ ?. ?=(?(~ [* ~]) parameters.u.parts) [%| 'request parameters need unsupported inference']
11185+ ?: &(?=(^ fold.u.parts) ?=(^ parameters.u.parts)) [%| 'request parameter and fold need unsupported inference']
11186+ ?^ scry.path.p [%| 'request scry needs unsupported inference']
11187+ =/ valid-marks=?
11188+ ?~ fold.u.parts ?=([* ~] marks.support)
11189+ ?=([* [* ~]] marks.support)
11190+ ?. valid-marks [%| 'request marks need unsupported inference']
11191+ =/ fold-open=?
11192+ ?~ fold.u.parts |
11193+ |(?=(^ (itype-vars u.fold.u.parts)) (itype-has-tag u.fold.u.parts))
11194+ ?: fold-open [%| 'request fold needs unsupported inference']
11195+ ?^ (itype-vars reply-sample.u.parts) [%| 'request payload needs unsupported inference']
11196+ ?: (itype-has-tag reply-sample.u.parts) [%| 'request payload needs unsupported inference']
11197+ =/ ask=(unit ischeme) (request-compatible-ask prepared.ev)
11198+ ?~ ask [%| 'request ask needs unsupported inference']
11199+ =/ result=(unit itype) (template-apply u.ask ~[[%var 0]])
11200+ ?~ result [%| 'request ask needs unsupported inference']
11201+ =/ callback=itype [%fn reply-sample.u.parts [%var 0]]
11202+ =/ sample=itype
11203+ ?^ fold.u.parts [%cell callback u.fold.u.parts]
11204+ ?~ parameters.u.parts callback
11205+ [%cell typ.i.parameters.u.parts callback]
11206+ =/ scheme=ischeme [[%fn sample u.result] ~[0]]
11207+ =/ exports=imold-types
11208+ (turn marks.support |=(m=iapi-mark-type [name.m [typ.m ~]]))
11209+ =/ prelude=iprelude prepared.ev
11210+ =/ public=ifile iface.prelude
11211+ ?~ source.public [%| 'request prelude source needs unsupported inference']
11212+ =/ private=(list iwidth-dependency)
11213+ (skim dependencies.public |=(d=iwidth-dependency =(at.d /lib/jibb/internal/jibb)))
11214+ ?. ?=([* ~] private) [%| 'request internal source needs unsupported inference']
11215+ ?~ source.i.private [%| 'request internal source needs unsupported inference']
11216+ =/ req=irequest-evidence
11217+ [file name.path.p p src u.source.public u.source.i.private values.prelude molds.prelude externals marks]
11218+ =/ interface=ifile [~[[name.path.p scheme]] exports file ~ ~ ~ `src `[(silt `(list path)`~[file]) ~[req] modules `public values.prelude molds.prelude externals marks]]
11219+ [%& [support u.parts interface]]
11220+::
9321++ api-mark-exports
11221++ api-mark-exports
9322 |= [marks=(list term) all=(list term) externals=imark-externals]
11222 |= [marks=(list term) all=(list term) externals=imark-externals]
9323 ^- imold-types
11223 ^- imold-types
@@ -9331,7 +11231,9 @@
9331++ api-poke-interface
11231++ api-poke-interface
9332 |= [at=path mod=module mark-externals=imark-externals prelude-values=(list term) prelude-molds=(list term) prelude=(unit ifile)]
11232 |= [at=path mod=module mark-externals=imark-externals prelude-values=(list term) prelude-molds=(list term) prelude=(unit ifile)]
9333 ^- (unit ifile)
11233 ^- (unit ifile)
11234+ ?: (lien defs.mod def-has-hole) ~
9334 ?. ?=([%ui %api @ %jibb ~] at) ~
11235 ?. ?=([%ui %api @ %jibb ~] at) ~
11236+ ?^ (duplicate-defs defs.mod) ~
9335 ?~ prelude ~
11237 ?~ prelude ~
9336 ?. =(at.u.prelude /lib/jibb/prelude/jibb) ~
11238 ?. =(at.u.prelude /lib/jibb/prelude/jibb) ~
9337 =/ poke=(unit ischeme) (find-jibb-mold %poke u.prelude)
11239 =/ poke=(unit ischeme) (find-jibb-mold %poke u.prelude)
@@ -9359,7 +11261,133 @@
9359 =/ mark=(unit itype) (find-imported-mark n mark-externals marks)
11261 =/ mark=(unit itype) (find-imported-mark n mark-externals marks)
9360 ?~ mark ~
11262 ?~ mark ~
9361 =/ sc=ischeme [[%fn u.mark typ.u.poke] ~]
11263 =/ sc=ischeme [[%fn u.mark typ.u.poke] ~]
9362− `[~[[n sc]] (api-mark-exports marks marks mark-externals) at ~[[n i.t.t.at n]]]
11264+ `[~[[n sc]] (api-mark-exports marks marks mark-externals) at ~[[n i.t.t.at n]] ~ ~ ~ ~]
11265+::
11266+:: Source-proven ordinary helpers validate each selected /sur dependency.
11267+:: Unused or less direct cores remain unsupported by this first interface.
11268+++ api-sur-covered
11269+ |= [surs=(list term) defs=(list def) externals=iexternals all=(list term)]
11270+ ^- ?
11271+ ?~ surs &
11272+ =/ found=(list def)
11273+ %+ skim defs
11274+ |= d=def
11275+ ?. ?=(%mold -.d) |
11276+ ?. ?=(%ref -.shape.d) |
11277+ ?. ?=([@ [@ ~]] names.shape.d) |
11278+ =(i.t.names.shape.d i.surs)
11279+ ?~ found |
11280+ =/ selected=def i.found
11281+ ?. ?=(%mold -.selected) |
11282+ =/ sh=shape shape.selected
11283+ ?. ?=(%ref -.sh) |
11284+ ?. ?=([@ [@ ~]] names.sh) |
11285+ =/ checked=(unit itype) (find-imported-mold i.surs i.names.sh externals all)
11286+ ?~ checked |
11287+ $(surs t.surs)
11288+::
11289++$ imulti-request-gates [values=ienv requests=(list irequest-evidence)]
11290+++ api-request-gates
11291+ |= [paths=(list iapi-path-typed) ev=iapi-path-evidence ask=ischeme file=path src=@t public=@t internal=@t externals=iexternals marks=imark-externals fuel=@ud]
11292+ ^- (unit imulti-request-gates)
11293+ ?~ paths `[~ ~]
11294+ ?: =(0 fuel) ~
11295+ =/ p=iapi-path-typed i.paths
11296+ =/ parts=(unit iapi-request-parts) (api-request-parts `ev name.path.p)
11297+ ?~ parts ~
11298+ ?. ?=(?(~ [* ~]) parameters.u.parts) ~
11299+ ?: &(?=(^ fold.u.parts) ?=(^ parameters.u.parts)) ~
11300+ ?^ scry.path.p ~
11301+ ?^ (itype-vars reply-sample.u.parts) ~
11302+ ?: (itype-has-tag reply-sample.u.parts) ~
11303+ =/ open-fold=?
11304+ ?~ fold.u.parts |
11305+ |(?=(^ (itype-vars u.fold.u.parts)) (itype-has-tag u.fold.u.parts))
11306+ ?: open-fold ~
11307+ =/ result=(unit itype) (template-apply ask ~[[%var 0]])
11308+ ?~ result ~
11309+ =/ callback=itype [%fn reply-sample.u.parts [%var 0]]
11310+ =/ sample=itype
11311+ ?^ fold.u.parts [%cell callback u.fold.u.parts]
11312+ ?~ parameters.u.parts callback
11313+ [%cell typ.i.parameters.u.parts callback]
11314+ =/ scheme=ischeme [[%fn sample u.result] ~[0]]
11315+ =/ prep=iprelude prepared.ev
11316+ =/ req=irequest-evidence
11317+ [file name.path.p p src public internal values.prep molds.prep externals marks]
11318+ =/ rest=(unit imulti-request-gates)
11319+ $(paths t.paths, fuel (dec fuel))
11320+ ?~ rest ~
11321+ `[[[name.path.p scheme] values.u.rest] [req requests.u.rest]]
11322+::
11323+++ api-poke-from-checked
11324+ |= [file=path mod=module marks=imark-externals values=(list term) molds=(list term) prelude=(unit ifile)]
11325+ ^- (unit [values=ienv derived=(list iderived)])
11326+ =/ pokes=(list def)
11327+ (skim defs.mod |=(d=def &(?=(%mold -.d) =(%poke name.d))))
11328+ ?~ pokes `[~ ~]
11329+ ?. ?=([* ~] pokes) ~
11330+ =/ declared=(list term) (collect-mark-imports imports.mod)
11331+ =/ ns=(unit (list term)) (api-poke-mark-names pokes declared)
11332+ ?~ ns ~
11333+ ?. ?=([@ ~] u.ns) ~
11334+ =/ matching=(list import)
11335+ %+ skim imports.mod
11336+ |= i=import
11337+ ?. ?=(%mark -.i) |
11338+ =(mark.i i.u.ns)
11339+ ?. ?=([* ~] matching) ~
11340+ =/ checked=(unit ifile)
11341+ (api-poke-interface file mod(defs pokes, imports matching) marks values molds prelude)
11342+ ?~ checked ~
11343+ `[values.u.checked derived.u.checked]
11344+::
11345+:: The partial interface is published atomically: all paths, ordinary
11346+:: source definitions, declared marks and the poke must check. Unselected
11347+:: /sur bindings, runtime validation and value watchability remain unproved.
11348+++ multi-request-interface-graph
11349+ |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle active=(list path) cache=jcache prepared=(unit iprelude)]
11350+ ^- (each [iface=ifile cache=jcache] @t)
11351+ =/ out (api-support-analysis-graph file src externals marks modules active cache prepared)
11352+ ?: ?=(%| -.out) [%| p.out]
11353+ =/ support=iapi-support-evidence p.out
11354+ =/ ev=iapi-path-evidence paths.support
11355+ =/ parsed (parse file src)
11356+ ?: ?=(%| -.parsed) [%| 'request source does not parse']
11357+ =/ mod=module p.parsed
11358+ ?. (levy imports.mod |=(i=import ?=(?(%mark %sur) -.i)))
11359+ [%| 'request imports need unsupported inference']
11360+ =/ surs=(list term) (collect-sur-imports imports.mod)
11361+ ?. (api-sur-covered surs defs.mod externals surs)
11362+ [%| 'API source dependency needs unsupported inference']
11363+ ?~ paths.ev [%| 'request count needs unsupported inference']
11364+ =/ ask=(unit ischeme) (request-compatible-ask prepared.ev)
11365+ ?~ ask [%| 'request ask needs unsupported inference']
11366+ =/ prep=iprelude prepared.ev
11367+ =/ public=ifile iface.prep
11368+ ?~ source.public [%| 'request prelude source needs unsupported inference']
11369+ =/ private=(list iwidth-dependency)
11370+ (skim dependencies.public |=(d=iwidth-dependency =(at.d /lib/jibb/internal/jibb)))
11371+ ?. ?=([* ~] private) [%| 'request internal source needs unsupported inference']
11372+ ?~ source.i.private [%| 'request internal source needs unsupported inference']
11373+ =/ gates=(unit imulti-request-gates)
11374+ (api-request-gates paths.ev ev u.ask file src u.source.public u.source.i.private externals marks 256)
11375+ ?~ gates [%| 'request paths need unsupported inference']
11376+ =/ poke=(unit [values=ienv derived=(list iderived)])
11377+ (api-poke-from-checked file mod marks values.prep molds.prep `public)
11378+ ?~ poke [%| 'API poke needs unsupported inference']
11379+ =/ mark-molds=imold-types
11380+ (turn marks.support |=(m=iapi-mark-type [name.m [typ.m ~]]))
11381+ =/ exports=imold-types (weld mark-molds molds.support)
11382+ =/ names=(list term) (turn exports |=(m=[name=term template=ischeme] name.m))
11383+ ?. (levy names |=(n=term (unique-value-name n names)))
11384+ [%| 'API exported molds need unsupported inference']
11385+ =/ env=ienv (weld values.u.gates (weld values.u.poke values.support))
11386+ =/ graph=irequest-graph
11387+ [(silt `(list path)`~[file]) requests.u.gates modules `public values.prep molds.prep externals marks]
11388+ =/ iface=ifile
11389+ [env exports file derived.u.poke elaborations.support ~ `src `graph]
11390+ [%& [iface dependencies.ev]]
9363::
11391::
9364++ infer-jibb-file
11392++ infer-jibb-file
9365 |= [at=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle active=(list path) prelude-values=(list term) prelude-molds=(list term) cache=jcache prelude=(unit ifile)]
11393 |= [at=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle active=(list path) prelude-values=(list term) prelude-molds=(list term) cache=jcache prelude=(unit ifile)]
@@ -9367,10 +11395,30 @@
9367 =/ parsed (parse at src)
11395 =/ parsed (parse at src)
9368 ?: ?=(%| -.parsed) [%| (crip "module source does not parse: {(spud at)}")]
11396 ?: ?=(%| -.parsed) [%| (crip "module source does not parse: {(spud at)}")]
9369 =/ mod=module p.parsed
11397 =/ mod=module p.parsed
11398+ =/ duplicate=(unit idiag) (duplicate-defs defs.mod)
11399+ ?^ duplicate [%| (show-duplicate-fields at src u.duplicate)]
9370 ?: ?=([%ui %api *] at)
11400 ?: ?=([%ui %api *] at)
9371 =/ iface=(unit ifile) (api-poke-interface at mod mark-externals prelude-values prelude-molds prelude)
11401 =/ iface=(unit ifile) (api-poke-interface at mod mark-externals prelude-values prelude-molds prelude)
11402+ ?^ iface
11403+ =/ checked=ifile u.iface(source `src, graph `[(silt `(list path)`~[at]) ~ modules prelude prelude-values prelude-molds externals mark-externals])
11404+ [%& [checked [[at checked] cache]]]
9372− ?~ iface [%| (crip "API module needs unsupported inference: {(spud at)}")]
11405+ ?~ prelude [%| (crip "API module needs unsupported inference: {(spud at)}")]
9373− [%& [u.iface [[at u.iface] cache]]]
11406+ =/ prepared=iprelude [u.prelude prelude-values prelude-molds]
11407+ =/ narrow=?
11408+ ?. ?=([[%mark *] ~] imports.mod) |
11409+ ?. ?=([[%mold *] ~] defs.mod) |
11410+ ?. =(%paths name.i.defs.mod) |
11411+ !?=(%union -.shape.i.defs.mod)
11412+ ?: narrow
11413+ =/ request=(each ione-request-interface @t)
11414+ (one-request-interface-graph at src externals mark-externals modules active cache `prepared)
11415+ ?: ?=(%| -.request) [%| (crip "API module needs unsupported inference: {(spud at)}")]
11416+ =/ checked=ifile iface.p.request
11417+ [%& [checked [[at checked] dependencies.paths.support.p.request]]]
11418+ =/ multi=(each [iface=ifile cache=jcache] @t)
11419+ (multi-request-interface-graph at src externals mark-externals modules active cache `prepared)
11420+ ?: ?=(%| -.multi) [%| (crip "API module needs unsupported inference: {(spud at)}")]
11421+ [%& [iface.p.multi [[at iface.p.multi] cache.p.multi]]]
9374 ?. (module-scope-valid mod prelude-values prelude-molds)
11422 ?. (module-scope-valid mod prelude-values prelude-molds)
9375 ?: (pending-declared-poke at mod prelude-values prelude-molds)
11423 ?: (pending-declared-poke at mod prelude-values prelude-molds)
9376 [%| (crip "module kind or scope needs unsupported inference: {(spud at)}")]
11424 [%| (crip "module kind or scope needs unsupported inference: {(spud at)}")]
@@ -9386,13 +11434,72 @@
9386 =/ marks=(list term) (collect-mark-imports imports.mod)
11434 =/ marks=(list term) (collect-mark-imports imports.mod)
9387 =/ reserved=(list term) (weld prelude-molds (turn resolved.p.js |=(j=[face=term interface=ifile] face.j)))
11435 =/ reserved=(list term) (weld prelude-molds (turn resolved.p.js |=(j=[face=term interface=ifile] face.j)))
9388 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
11436 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
9389− =/ state=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks resolved.p.js reserved ~ ~ ~ | at top prelude]
11437+ =/ state=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks resolved.p.js reserved ~ ~ ~ | at top prelude ~ 256 ~]
9390 =/ mts=(each imold-types @t) (module-mold-types molds state)
11438 =/ mts=(each imold-types @t) (module-mold-types molds state)
9391 ?: ?=(%| -.mts) [%| (crip "{(trip p.mts)}: {(spud at)}")]
11439 ?: ?=(%| -.mts) [%| (crip "{(trip p.mts)}: {(spud at)}")]
9392− =/ env=ienv (resolve-supported-defs defs.mod molds globals externals surs mark-externals marks resolved.p.js reserved at prelude)
11440+ =/ resolution=iresolved (resolve-groups defs.mod molds globals externals surs mark-externals marks resolved.p.js reserved at prelude)
11441+ =/ env=ienv env.resolution
9393 ?. (module-values-complete defs.mod env)
11442 ?. (module-values-complete defs.mod env)
9394 [%| (crip "module definitions need unsupported inference: {(spud at)}")]
11443 [%| (crip "module definitions need unsupported inference: {(spud at)}")]
9395− [%& [[env p.mts at ~] [[at [env p.mts at ~]] cache.p.js]]]
11444+ =/ initial=irequest-graph [(silt `(list path)`~[at]) ~ modules prelude prelude-values prelude-molds externals mark-externals]
11445+ =/ graph=(unit irequest-graph) (request-graph-merge resolved.p.js initial (add 1 (lent resolved.p.js)))
11446+ ?~ graph [%| 'module request evidence needs unsupported inference']
11447+ =/ iface=ifile [env p.mts at ~ artifacts.resolution ~ `src graph]
11448+ [%& [iface [[at iface] cache.p.js]]]
11449+::
11450+:: A source-bound analysis of one named mold, not a module, island,
11451+:: request, watchability or runtime check. The host owns the trusted
11452+:: prepared prelude, canonical paths and reader/source version identities.
11453+:: The 256-node cap covers only classification, not source/graph work.
11454++$ igate-free-mold
11455+ [at=path source=@t name=term prepared=iprelude externals=iexternals marks=imark-externals modules=jbundle dependencies=jcache mold=ischeme requested=@ud budget=@ud result=igate-free]
11456+++ gate-free-mold-source
11457+ |= [file=path src=@t name=term externals=iexternals marks=imark-externals modules=jbundle prepared=(unit iprelude) fuel=@ud]
11458+ ^- (each igate-free-mold @t)
11459+ ?~ file [%| 'mold analysis needs a path ending in jibb']
11460+ ?. =(%jibb (rear file)) [%| 'mold analysis needs a path ending in jibb']
11461+ ?: |(=(file /lib/jibb/internal/jibb) =(file /lib/jibb/primitives/jibb))
11462+ [%| 'the prelude internal modules are private']
11463+ ?: ?=([%ui %api *] file) [%| 'API declarations need unsupported mold analysis']
11464+ ?: ?=([%ui %stores *] file) [%| 'store declarations need unsupported mold analysis']
11465+ =/ entries=jbundle (skim modules |=(m=jsource =(file at.m)))
11466+ ?: (gth (lent entries) 1) [%| 'duplicate root module sources']
11467+ =/ wrong-root=? ?~(entries | !=(source.i.entries src))
11468+ ?: wrong-root [%| 'root module source does not match bundle']
11469+ =/ parsed (parse file src)
11470+ ?: ?=(%| -.parsed) [%| 'mold source does not parse']
11471+ =/ mod=module p.parsed
11472+ =/ duplicate=(unit idiag) (duplicate-defs defs.mod)
11473+ ?^ duplicate [%| (show-duplicate-fields file src u.duplicate)]
11474+ ?~ prepared [%| 'mold analysis needs the prepared prelude']
11475+ ?. (module-scope-valid mod values.u.prepared molds.u.prepared)
11476+ [%| 'mold source has conflicting or unsupported scope']
11477+ =/ selected=(list def)
11478+ (skim defs.mod |=(d=def &(?=(%mold -.d) =(name.d name))))
11479+ ?~ selected [%| 'selected mold is not declared']
11480+ ?^ t.selected [%| 'selected mold is not unique']
11481+ ?> ?=(%mold -.i.selected)
11482+ =/ public=ifile iface.u.prepared
11483+ =/ js=jimports-result
11484+ (resolve-jibb-imports imports.mod externals marks modules ~[file] values.u.prepared molds.u.prepared ~ `public)
11485+ ?: ?=(%| -.js) [%| p.js]
11486+ =/ ms=imolds (collect-simple-molds defs.mod)
11487+ =/ vals=(list term) (global-value-names defs.mod)
11488+ =/ globals=(list term) (weld values.u.prepared (weld (import-binding-names imports.mod) vals))
11489+ =/ surs=(list term) (collect-sur-imports imports.mod)
11490+ =/ declared=(list term) (collect-mark-imports imports.mod)
11491+ =/ reserved=(list term) (weld molds.u.prepared (turn resolved.p.js |=(j=[face=term interface=ifile] face.j)))
11492+ =/ top=(list term) (turn ms |=(m=[name=term body=shape] name.m))
11493+ =/ state=istate [0 ~ ~ ~ ms globals externals surs marks declared resolved.p.js reserved ~ ~ ~ | file top `public ~ 256 ~]
11494+ =/ inferred=(unit [template=ischeme state=istate])
11495+ (infer-mold-template shape.i.selected state(active ~[name], in-mold &))
11496+ ?~ inferred [%| 'selected mold needs unsupported inference']
11497+ =/ template=ischeme template.u.inferred
11498+ =. typ.template (label-direct-union typ.template shape.i.selected name state)
11499+ =. typ.template (itype-normalize typ.template sub.state.u.inferred)
11500+ =/ cap=@ud (min fuel 256)
11501+ =/ analysis=igate-free (gate-free-type typ.template cap ~)
11502+ [%& [file src name u.prepared externals marks modules cache.p.js template fuel cap analysis]]
9396::
11503::
9397:: +golden-types-with-modules fails closed for imports without prelude
11504:: +golden-types-with-modules fails closed for imports without prelude
9398:: scope. +golden-types-with-prelude resolves supported library graphs;
11505:: scope. +golden-types-with-prelude resolves supported library graphs;
@@ -9403,6 +11510,8 @@
9403 ^- @t
11510 ^- @t
9404 =/ parsed (parse file src)
11511 =/ parsed (parse file src)
9405 ?: ?=(%| -.parsed) (show-error src p.parsed)
11512 ?: ?=(%| -.parsed) (show-error src p.parsed)
11513+ =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
11514+ ?^ duplicate (duplicate-fields-report file src u.duplicate)
9406 ?: (lien imports.p.parsed |=(i=import ?=(%jibb -.i)))
11515 ?: (lien imports.p.parsed |=(i=import ?=(%jibb -.i)))
9407 'partial inference; module not checked\0aprelude source missing; module import inference unsupported'
11516 'partial inference; module not checked\0aprelude source missing; module import inference unsupported'
9408 (golden-types-with-marks file src externals mark-externals)
11517 (golden-types-with-marks file src externals mark-externals)
@@ -9417,6 +11526,8 @@
9417 ^- @t
11526 ^- @t
9418 =/ parsed (parse file src)
11527 =/ parsed (parse file src)
9419 ?: ?=(%| -.parsed) (show-error src p.parsed)
11528 ?: ?=(%| -.parsed) (show-error src p.parsed)
11529+ =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
11530+ ?^ duplicate (duplicate-fields-report file src u.duplicate)
9420 ?: =(0 prelude-source) 'partial inference; module not checked\0aprelude source missing; module import inference unsupported'
11531 ?: =(0 prelude-source) 'partial inference; module not checked\0aprelude source missing; module import inference unsupported'
9421 =/ prelude (parse /lib/jibb/prelude/jibb prelude-source)
11532 =/ prelude (parse /lib/jibb/prelude/jibb prelude-source)
9422 ?: ?=(%| -.prelude) 'partial inference; module not checked\0aprelude source does not parse; module import inference unsupported'
11533 ?: ?=(%| -.prelude) 'partial inference; module not checked\0aprelude source does not parse; module import inference unsupported'
@@ -9435,6 +11546,8 @@
9435 ^- @t
11546 ^- @t
9436 =/ parsed (parse file src)
11547 =/ parsed (parse file src)
9437 ?: ?=(%| -.parsed) (show-error src p.parsed)
11548 ?: ?=(%| -.parsed) (show-error src p.parsed)
11549+ =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
11550+ ?^ duplicate (duplicate-fields-report file src u.duplicate)
9438 ?~ prepared 'partial inference; module not checked\0aprelude interface is not supported'
11551 ?~ prepared 'partial inference; module not checked\0aprelude interface is not supported'
9439 =/ prelude-values=(list term) values.u.prepared
11552 =/ prelude-values=(list term) values.u.prepared
9440 =/ prelude-molds=(list term) molds.u.prepared
11553 =/ prelude-molds=(list term) molds.u.prepared
@@ -9482,6 +11595,10 @@
9482 =. reserved-molds (weld reserved-molds (turn jimports |=(j=[face=term interface=ifile] face.j)))
11595 =. reserved-molds (weld reserved-molds (turn jimports |=(j=[face=term interface=ifile] face.j)))
9483 =/ parsed (parse file src)
11596 =/ parsed (parse file src)
9484 ?: ?=(%| -.parsed) (show-error src p.parsed)
11597 ?: ?=(%| -.parsed) (show-error src p.parsed)
11598+ =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
11599+ ?^ duplicate (duplicate-fields-report file src u.duplicate)
11600+ ?: (module-has-reserved-proj p.parsed)
11601+ 'module has reserved proj name'
9485 =/ ds=(list def) defs.p.parsed
11602 =/ ds=(list def) defs.p.parsed
9486 =/ molds=imolds (collect-simple-molds ds)
11603 =/ molds=imolds (collect-simple-molds ds)
9487 =/ globals=(list term) (weld prelude-values (weld (turn jimports |=(j=[face=term interface=ifile] face.j)) (global-value-names ds)))
11604 =/ globals=(list term) (weld prelude-values (weld (turn jimports |=(j=[face=term interface=ifile] face.j)) (global-value-names ds)))
@@ -9509,7 +11626,7 @@
9509 =/ line=@t (crip "++ {(trip name.d)}: {(show-itype typ ~)}{(show-atom-constraint typ)}")
11626 =/ line=@t (crip "++ {(trip name.d)}: {(show-itype typ ~)}{(show-atom-constraint typ)}")
9510 $(ds t.ds, lines [line lines])
11627 $(ds t.ds, lines [line lines])
9511 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
11628 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
9512− =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | file top prelude]
11629+ =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | file top prelude ~ 256 ~]
9513 =. initial (reserve-def-caps val.d initial)
11630 =. initial (reserve-def-caps val.d initial)
9514 =/ result=iresult
11631 =/ result=iresult
9515 ?: |(?=(%gate -.val.d) ?=(%gate-wide -.val.d))
11632 ?: |(?=(%gate -.val.d) ?=(%gate-wide -.val.d))
@@ -9517,6 +11634,11 @@
9517 (infer-fragment val.d env initial)
11634 (infer-fragment val.d env initial)
9518 ?: ?=(%| -.result)
11635 ?: ?=(%| -.result)
9519 $(ds t.ds, lines [(show-inference-diagnostic file src name.d p.result) lines])
11636 $(ds t.ds, lines [(show-inference-diagnostic file src name.d p.result) lines])
11637+ =. state.p.result (promote-restricted-numbers state.p.result env)
11638+ =. state.p.result (default-hole-numbers holes.state.p.result holes.initial state.p.result env !(itype-has-gate (itype-normalize typ.p.result sub.state.p.result)))
11639+ =/ hole=(unit idiag) (unresolved-hole holes.state.p.result holes.initial state.p.result)
11640+ ?^ hole
11641+ $(ds t.ds, lines [(show-inference-diagnostic file src name.d u.hole) lines])
9520 =/ merged=(unit [first=icap second=icap])
11642 =/ merged=(unit [first=icap second=icap])
9521 (merged-capitals caps.state.p.result sub.state.p.result)
11643 (merged-capitals caps.state.p.result sub.state.p.result)
9522 ?^ merged
11644 ?^ merged
@@ -9539,6 +11661,8 @@
9539 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
11661 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
9540 ?: (gth (lent vars) 26)
11662 ?: (gth (lent vars) 26)
9541 $(ds t.ds, lines [(crip "++ {(trip name.d)}: too many variables for partial printer") lines])
11663 $(ds t.ds, lines [(crip "++ {(trip name.d)}: too many variables for partial printer") lines])
11664+ ?~ (width-finalize projections.state.p.result sub.state.p.result vars)
11665+ $(ds t.ds, lines [(crip "++ {(trip name.d)}: record projection elaboration needs unsupported inference") lines])
9542 =/ printable=itype (canonical-itype typ vars)
11666 =/ printable=itype (canonical-itype typ vars)
9543 =/ line=@t (crip "++ {(trip name.d)}: {(show-itype printable ~)}{(show-atom-constraint printable)}")
11667 =/ line=@t (crip "++ {(trip name.d)}: {(show-itype printable ~)}{(show-atom-constraint printable)}")
9544 $(ds t.ds, lines [line lines])
11668 $(ds t.ds, lines [line lines])
jibb-dev/lib/jibb/internal.jibb+20
@@ -9,3 +9,23 @@
9
9
10:: The compiler supplies this private interface; execution is not yet implemented.
10:: The compiler supplies this private interface; execution is not yet implemented.
11++ gth-atom |= args=[A A] (raw-gth.core args)
11++ gth-atom |= args=[A A] (raw-gth.core args)
12+
13+:: Application paths are knot sequences.
14++$ qath
15+ ~
16+ [i=@ta t=qath]
17+
18+:: Private compiler primitive wrappers; execution is a later milestone.
19+++ add-atom |= args=[A A] (raw-add.core args)
20+++ dec-atom |= atom=A (raw-dec.core atom)
21+
22+:: Transparent request data. Identity and path fields are writable and do not
23+:: prove a schema or watchability. A future executor must bind them to checked
24+:: source evidence and validate facts and state; generated receivers must
25+:: decode before calling typed replies or folds. Runtime validation, watch
26+:: provenance and effect execution are not implemented.
27++$ agent-path (list.core @ta)
28++$ ask |$ [M]
29+ [%pure value=M]
30+ [%agent api=@t case=@tas agent=@tas path=agent-path scry=(unit.core agent-path) receive=$-([mark=@tas state=(unit.core *) fact=*] [state=* message=M])]
31+ [%store module=@t name=@tas receive=$-([state=(unit.core *) fact=*] [state=* message=M])]
jibb-dev/lib/jibb/prelude.jibb+26
@@ -1,5 +1,6 @@
1/= internal /lib/jibb/internal
1/= internal /lib/jibb/internal
2+$ poke poke.internal
2+$ poke poke.internal
3++$ qath qath.internal
3
4
4:: Initial prelude functions. The rest of the inventory is still to come.
5:: Initial prelude functions. The rest of the inventory is still to come.
5
6
@@ -100,6 +101,14 @@
100
101
101+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]
102+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]
102
103
104+++ like |= [f=$-(A B) result=(like A)]
105+ ++ mapped
106+ ^- (unit [p=B q=nail])
107+ ?- q.result
108+ ~ ~
109+ [~ value] `[p=(f p.value) q=q.value]
110+ ^- (like B) [p=p.result q=mapped]
111+
103++ wonk |= veq=(like A)
112++ wonk |= veq=(like A)
104 ?- q.veq
113 ?- q.veq
105 ~ !!
114 ~ !!
@@ -149,6 +158,12 @@
149 ~ ~
158 ~ ~
150 [~ value] [value ~]
159 [~ value] [value ~]
151
160
161+++ bond |= fallback=$-(~ A)
162+ |= maybe=(unit A)
163+ ?- maybe
164+ ~ (fallback ~)
165+ [~ value] value
166+
152++ bind |= args=[(unit A) $-(A B)]
167++ bind |= args=[(unit A) $-(A B)]
153 ?- args
168 ?- args
154 [maybe f] ^- (unit B)
169 [maybe f] ^- (unit B)
@@ -317,3 +332,14 @@
317 [%who reply=$-(@p M)]
332 [%who reply=$-(@p M)]
318
333
319++ gth |= args=[A A] (gth-atom.internal args)
334++ gth |= args=[A A] (gth-atom.internal args)
335+++ add |= args=[A A] (add-atom.internal args)
336+++ dec |= atom=A (dec-atom.internal atom)
337+
338++$ ask |$ [M] (ask.internal M)
339+++ pure |= x=M ^- (ask M) [%pure x]
340+
341+:: This mold describes the value; island watchability needs separate proof.
342++$ sub |$ [M]
343+ [%watch a=(ask M)]
344+ [%every gap=@dr reply=$-(@da M)]
345+ [%url reply=$-(path M)]
tests/clay-fixtures/tlon-mop-expected.txt+1−1
@@ -1 +1 @@
1−[%.y %.y]
1+[%.y %.y %.y]
tests/clay-fixtures/tlon-mop.txt+7−1
@@ -6,9 +6,15 @@
6=/ read-gate=vase (slap reader (ream 'read-named'))
6=/ read-gate=vase (slap reader (ream 'read-named'))
7=/ result=vase (slym read-gate [%notes %log -.src])
7=/ result=vase (slym read-gate [%notes %log -.src])
8=/ recursive=vase (slym read-gate [%notes %import-node -.src])
8=/ recursive=vase (slym read-gate [%notes %import-node -.src])
9+=/ nested=vase (slym read-gate [%notes %a-notebook -.src])
9=/ contains-ref
10=/ contains-ref
10 |= node=*
11 |= node=*
11 ?: =(node [%ref %notes %import-node]) &
12 ?: =(node [%ref %notes %import-node]) &
12 ?@ node |
13 ?@ node |
13 |($(node -.node) $(node +.node))
14 |($(node -.node) $(node +.node))
15+=/ contains-named
16+ |= node=*
17+ ?: ?=([%named %notes %import-node [%fork *]] node) (contains-ref node)
18+ ?@ node |
19+ |($(node -.node) $(node +.node))
14−(pure:m !>([?=([%& [%apply %mop [[%atom %da ~] [%fork *] ~]]] +.result) &(?=([%& [%fork *]] +.recursive) (contains-ref +.recursive))]))
20+(pure:m !>([?=([%& [%apply %mop [[%atom %da ~] [%fork *] ~]]] +.result) &(?=([%& [%fork *]] +.recursive) (contains-ref +.recursive)) &(?=([%& [%fork *]] +.nested) (contains-named +.nested))]))
tests/golden/doc-grammar-04-step/source.jibb+1−1
@@ -10,5 +10,5 @@
10 [%move %left n] "left {n}"
10 [%move %left n] "left {n}"
11 [%move %right n] "right {n}"
11 [%move %right n] "right {n}"
12 [t %draft] t
12 [t %draft] t
13− [t %sent at] t
13+ [t %sent sent-at] t
14 %stop "stop"
14 %stop "stop"
tests/golden/doc-grammar-04-step/tokens.txt+2−2
@@ -74,8 +74,8 @@
7413:5 glyph [
7413:5 glyph [
7513:6 tight name t
7513:6 tight name t
7613:8 lit %sent
7613:8 lit %sent
77−13:14 name at
77+13:14 name sent-at
78−13:16 tight glyph ]
78+13:21 tight glyph ]
7913:23 name t
7913:23 name t
8014:5 NEWLINE
8014:5 NEWLINE
8114:5 lit %stop
8114:5 lit %stop
tests/golden/doc-grammar-04-step/tree.txt+1−1
@@ -33,6 +33,6 @@
33 (cell 12:5 (bind 12:6 t) (lit 12:8 %draft))
33 (cell 12:5 (bind 12:6 t) (lit 12:8 %draft))
34 (wing 12:23 t))
34 (wing 12:23 t))
35 (arm 13:5
35 (arm 13:5
36− (cell 13:5 (bind 13:6 t) (lit 13:8 %sent) (bind 13:14 at))
36+ (cell 13:5 (bind 13:6 t) (lit 13:8 %sent) (bind 13:14 sent-at))
37 (wing 13:23 t))
37 (wing 13:23 t))
38 (arm 14:5 (lit 14:5 %stop) (str 14:23 "stop")))))))
38 (arm 14:5 (lit 14:5 %stop) (str 14:23 "stop")))))))
tests/golden/inline-mold-opaque/about.txt+2−2
@@ -1,3 +1,3 @@
1−source: Grammar tab, Molds: "Opaque: `poke`, `ask` and `qath`, built only by derived gates, `pure` and application-path literals."
1+source: Grammar tab, Molds: "`poke`, `ask` and `qath` are transparent types, defined in the internal prelude and re-exported normally; callers can construct and inspect their values."
2−tests: the opaque molds by name
2+tests: the effect and application-path types by name
3expect: parses
3expect: parses
tests/golden/parser-hole-parameter-rejected/about.txtnew file+3
@@ -0,0 +1,3 @@
1+source: Grammar, Types and molds: `_` is an inferred type hole.
2+tests: An anonymous hole is not a named generic parameter.
3+expect: error at 1:12
tests/golden/parser-hole-parameter-rejected/source.jibbnew file+1
@@ -0,0 +1 @@
1++$ bad |$ [_] @t
tests/golden/parser-hole-parameter-rejected/tokens.txtnew file+8
@@ -0,0 +1,8 @@
1+1:1 glyph +$
2+1:4 name bad
3+1:8 glyph |$
4+1:11 glyph [
5+1:12 tight glyph _
6+1:13 tight glyph ]
7+1:15 aura @t
8+1:17 NEWLINE
tests/golden/parser-hole-parameter-rejected/tree.txtnew file+3
@@ -0,0 +1,3 @@
1+/tests/golden/parser-hole-parameter-rejected/source.jibb:1:12: expected a type variable, found `_`
2++$ bad |$ [_] @t
3+ ^
tests/golden/parser-hole-path-space/about.txtnew file+3
@@ -0,0 +1,3 @@
1+source: Grammar, Types and molds: `_` is an inferred type hole.
2+tests: A path-segment type hole must remain tight after the field's `=`.
3+expect: error at 1:14
tests/golden/parser-hole-path-space/source.jibbnew file+1
@@ -0,0 +1 @@
1++$ path /[id= _]
tests/golden/parser-hole-path-space/tokens.txtnew file+9
@@ -0,0 +1,9 @@
1+1:1 glyph +$
2+1:4 name path
3+1:9 glyph /
4+1:10 tight glyph [
5+1:11 tight name id
6+1:13 tight glyph =
7+1:15 glyph _
8+1:16 tight glyph ]
9+1:17 NEWLINE
tests/golden/parser-hole-path-space/tree.txtnew file+3
@@ -0,0 +1,3 @@
1+/tests/golden/parser-hole-path-space/source.jibb:1:14: expected an aura or type hole right after `=`, found a space
2++$ path /[id= _]
3+ ^
tests/golden/parser-hole-path/about.txtnew file+3
@@ -0,0 +1,3 @@
1+source: Grammar, Types and molds: `_` is an inferred type hole.
2+tests: Underscores in `/_` and `%/_` remain literal path knots, while `[id=_]` is a typed-segment hole.
3+expect: parses
tests/golden/parser-hole-path/source.jibbnew file+4
@@ -0,0 +1,4 @@
1++$ root /_
2++$ child /item/_x
3+++ show %/_
4++$ inferred /items/[id=_]
tests/golden/parser-hole-path/tokens.txtnew file+28
@@ -0,0 +1,28 @@
1+1:1 glyph +$
2+1:4 name root
3+1:9 glyph /
4+1:10 tight knot _
5+2:1 NEWLINE
6+2:1 glyph +$
7+2:4 name child
8+2:10 glyph /
9+2:11 tight knot item
10+2:15 tight glyph /
11+2:16 tight knot _x
12+3:1 NEWLINE
13+3:1 glyph ++
14+3:4 name show
15+3:9 glyph %/
16+3:11 tight knot _
17+4:1 NEWLINE
18+4:1 glyph +$
19+4:4 name inferred
20+4:13 glyph /
21+4:14 tight knot items
22+4:19 tight glyph /
23+4:20 tight glyph [
24+4:21 tight name id
25+4:23 tight glyph =
26+4:24 tight glyph _
27+4:25 tight glyph ]
28+4:26 NEWLINE
tests/golden/parser-hole-path/tree.txtnew file+5
@@ -0,0 +1,5 @@
1+(module
2+ (mold 1:1 root (path 1:9 /_))
3+ (mold 2:1 child (path 2:10 /item/_x))
4+ (value 3:1 show (qath 3:9 _))
5+ (mold 4:1 inferred (path 4:13 /items/[id=_])))
tests/golden/parser-hole-pattern-rejected/about.txtnew file+3
@@ -0,0 +1,3 @@
1+source: Grammar, Types and molds: `_` is an inferred type hole.
2+tests: A type hole is not a branch-pattern wildcard.
3+expect: error at 3:5
tests/golden/parser-hole-pattern-rejected/source.jibbnew file+3
@@ -0,0 +1,3 @@
1+++ bad |= x=@t
2+ ?- x
3+ _ "no"
tests/golden/parser-hole-pattern-rejected/tokens.txtnew file+15
@@ -0,0 +1,15 @@
1+1:1 glyph ++
2+1:4 name bad
3+1:8 glyph |=
4+1:11 name x
5+1:12 tight glyph =
6+1:13 tight aura @t
7+2:3 INDENT
8+2:3 glyph ?-
9+2:6 name x
10+3:5 INDENT
11+3:5 glyph _
12+3:7 str "no"
13+3:11 DEDENT
14+3:11 DEDENT
15+3:11 NEWLINE
tests/golden/parser-hole-pattern-rejected/tree.txtnew file+3
@@ -0,0 +1,3 @@
1+/tests/golden/parser-hole-pattern-rejected/source.jibb:3:5: expected a pattern, found `_`
2+ _ "no"
3+ ^
tests/golden/parser-hole-shapes/about.txtnew file+3
@@ -0,0 +1,3 @@
1+source: Grammar, Types and molds: `_` is an inferred type hole.
2+tests: Holes in samples, casts, nested records, gate molds and generic mold arguments have their own source spans.
3+expect: parses
tests/golden/parser-hole-shapes/source.jibbnew file+11
@@ -0,0 +1,11 @@
1++$ unused _
2++$ nested [a=_ b=$-(_ (list _))]
3++$ alias |$ [A] (pair A _)
4+++ identity |= x=_ x
5+++ inferred ^- _ "hello"
6+++ cast-nested |= x=[$-(_ _) (list _)] ^- [first=_ second=_] [x x]
7+++ bare-sample |= _ "hello"
8+++ cell-sample |= [a=_ b=_] [a b]
9+++ local |= x=@t
10+ ++ inside |= y=_ ^- _ y
11+ (inside x)
tests/golden/parser-hole-shapes/tokens.txtnew file+121
@@ -0,0 +1,121 @@
1+1:1 glyph +$
2+1:4 name unused
3+1:11 glyph _
4+2:1 NEWLINE
5+2:1 glyph +$
6+2:4 name nested
7+2:11 glyph [
8+2:12 tight name a
9+2:13 tight glyph =
10+2:14 tight glyph _
11+2:16 name b
12+2:17 tight glyph =
13+2:18 tight glyph $-(
14+2:21 tight glyph _
15+2:23 glyph (
16+2:24 tight name list
17+2:29 glyph _
18+2:30 tight glyph )
19+2:31 tight glyph )
20+2:32 tight glyph ]
21+3:1 NEWLINE
22+3:1 glyph +$
23+3:4 name alias
24+3:10 glyph |$
25+3:13 glyph [
26+3:14 tight tvar A
27+3:15 tight glyph ]
28+3:17 glyph (
29+3:18 tight name pair
30+3:23 tvar A
31+3:25 glyph _
32+3:26 tight glyph )
33+4:1 NEWLINE
34+4:1 glyph ++
35+4:4 name identity
36+4:13 glyph |=
37+4:16 name x
38+4:17 tight glyph =
39+4:18 tight glyph _
40+4:20 name x
41+5:1 NEWLINE
42+5:1 glyph ++
43+5:4 name inferred
44+5:13 glyph ^-
45+5:16 glyph _
46+5:18 str "hello"
47+6:1 NEWLINE
48+6:1 glyph ++
49+6:4 name cast-nested
50+6:16 glyph |=
51+6:19 name x
52+6:20 tight glyph =
53+6:21 tight glyph [
54+6:22 tight glyph $-(
55+6:25 tight glyph _
56+6:27 glyph _
57+6:28 tight glyph )
58+6:30 glyph (
59+6:31 tight name list
60+6:36 glyph _
61+6:37 tight glyph )
62+6:38 tight glyph ]
63+6:40 glyph ^-
64+6:43 glyph [
65+6:44 tight name first
66+6:49 tight glyph =
67+6:50 tight glyph _
68+6:52 name second
69+6:58 tight glyph =
70+6:59 tight glyph _
71+6:60 tight glyph ]
72+6:62 glyph [
73+6:63 tight name x
74+6:65 name x
75+6:66 tight glyph ]
76+7:1 NEWLINE
77+7:1 glyph ++
78+7:4 name bare-sample
79+7:16 glyph |=
80+7:19 glyph _
81+7:21 str "hello"
82+8:1 NEWLINE
83+8:1 glyph ++
84+8:4 name cell-sample
85+8:16 glyph |=
86+8:19 glyph [
87+8:20 tight name a
88+8:21 tight glyph =
89+8:22 tight glyph _
90+8:24 name b
91+8:25 tight glyph =
92+8:26 tight glyph _
93+8:27 tight glyph ]
94+8:29 glyph [
95+8:30 tight name a
96+8:32 name b
97+8:33 tight glyph ]
98+9:1 NEWLINE
99+9:1 glyph ++
100+9:4 name local
101+9:10 glyph |=
102+9:13 name x
103+9:14 tight glyph =
104+9:15 tight aura @t
105+10:3 INDENT
106+10:3 glyph ++
107+10:6 name inside
108+10:13 glyph |=
109+10:16 name y
110+10:17 tight glyph =
111+10:18 tight glyph _
112+10:20 glyph ^-
113+10:23 glyph _
114+10:25 name y
115+11:3 NEWLINE
116+11:3 glyph (
117+11:4 tight name inside
118+11:11 name x
119+11:12 tight glyph )
120+11:13 DEDENT
121+11:13 NEWLINE
tests/golden/parser-hole-shapes/tree.txtnew file+47
@@ -0,0 +1,47 @@
1+(module
2+ (mold 1:1 unused (hole 1:11))
3+ (mold 2:1 nested
4+ (cell 2:11
5+ (face 2:12 a (hole 2:14))
6+ (face 2:16 b
7+ (fn 2:18
8+ (hole 2:21)
9+ (apply 2:23 list (hole 2:29))))))
10+ (mold 3:1 alias
11+ (generic 3:10 A
12+ (apply 3:17 pair (tvar 3:23 A) (hole 3:25))))
13+ (value 4:1 identity
14+ (gate 4:13
15+ (face 4:16 x (hole 4:18))
16+ (wing 4:20 x)))
17+ (value 5:1 inferred
18+ (cast 5:13 (hole 5:16) (str 5:18 "hello")))
19+ (value 6:1 cast-nested
20+ (gate 6:16
21+ (face 6:19 x
22+ (cell 6:21
23+ (fn 6:22 (hole 6:25) (hole 6:27))
24+ (apply 6:30 list (hole 6:36))))
25+ (cast 6:40
26+ (cell 6:43
27+ (face 6:44 first (hole 6:50))
28+ (face 6:52 second (hole 6:59)))
29+ (tuple 6:62 (wing 6:63 x) (wing 6:65 x)))))
30+ (value 7:1 bare-sample
31+ (gate 7:16 (hole 7:19) (str 7:21 "hello")))
32+ (value 8:1 cell-sample
33+ (gate 8:16
34+ (cell 8:19
35+ (face 8:20 a (hole 8:22))
36+ (face 8:24 b (hole 8:26)))
37+ (tuple 8:29 (wing 8:30 a) (wing 8:32 b))))
38+ (value 9:1 local
39+ (gate 9:10
40+ (face 9:13 x (aura 9:15 @t))
41+ (body 10:3
42+ (value 10:3 inside
43+ (gate 10:13
44+ (face 10:16 y (hole 10:18))
45+ (cast 10:20 (hole 10:23) (wing 10:25 y))))
46+ (group 11:3
47+ (call 11:4 (wing 11:4 inside) (wing 11:11 x)))))))
tests/golden/parser-hole-value-rejected/about.txtnew file+3
@@ -0,0 +1,3 @@
1+source: Grammar, Types and molds: `_` is an inferred type hole.
2+tests: A type hole is not a value expression.
3+expect: error at 1:8
tests/golden/parser-hole-value-rejected/source.jibbnew file+1
@@ -0,0 +1 @@
1+++ bad _
tests/golden/parser-hole-value-rejected/tokens.txtnew file+4
@@ -0,0 +1,4 @@
1+1:1 glyph ++
2+1:4 name bad
3+1:8 glyph _
4+1:9 NEWLINE
tests/golden/parser-hole-value-rejected/tree.txtnew file+3
@@ -0,0 +1,3 @@
1+/tests/golden/parser-hole-value-rejected/source.jibb:1:8: expected an expression, found `_`
2+++ bad _
3+ ^
tests/golden/prelude-1c-structural/source.jibb+8
@@ -96,6 +96,14 @@
96
96
97+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]
97+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]
98
98
99+++ like |= [f=$-(A B) result=(like A)]
100+ ++ mapped
101+ ^- (unit [p=B q=nail])
102+ ?- q.result
103+ ~ ~
104+ [~ value] `[p=(f p.value) q=q.value]
105+ ^- (like B) [p=p.result q=mapped]
106+
99++ wonk |= veq=(like A)
107++ wonk |= veq=(like A)
100 ?- q.veq
108 ?- q.veq
101 ~ !!
109 ~ !!
tests/golden/prelude-1c-structural/tokens.txt+199−124
@@ -588,144 +588,219 @@
58897:45 tight glyph ]
58897:45 tight glyph ]
58999:1 NEWLINE
58999:1 NEWLINE
59099:1 glyph ++
59099:1 glyph ++
591−99:4 name wonk
591+99:4 name like
59299:9 glyph |=
59299:9 glyph |=
593−99:12 name veq
593+99:12 glyph [
594+99:13 tight name f
595+99:14 tight glyph =
594−99:15 tight glyph =
596+99:15 tight glyph $-(
595−99:16 tight glyph (
597+99:18 tight tvar A
596−99:17 tight name like
598+99:20 tvar B
597−99:22 tvar A
599+99:21 tight glyph )
598−99:23 tight glyph )
600+99:23 name result
601+99:29 tight glyph =
602+99:30 tight glyph (
603+99:31 tight name like
604+99:36 tvar A
605+99:37 tight glyph )
606+99:38 tight glyph ]
599100:3 INDENT
607100:3 INDENT
600−100:3 glyph ?-
608+100:3 glyph ++
601−100:6 wing q.veq
609+100:6 name mapped
602101:5 INDENT
610101:5 INDENT
603−101:5 lit ~
611+101:5 glyph ^-
604−101:7 glyph !!
612+101:8 glyph (
605−102:5 NEWLINE
613+101:9 tight name unit
606−102:5 glyph [
614+101:14 glyph [
607−102:6 tight lit ~
615+101:15 tight name p
608−102:8 name product
609−102:15 tight glyph ]
616+101:16 tight glyph =
610−102:17 wing p.product
617+101:17 tight tvar B
611−104:1 DEDENT
618+101:19 name q
612−104:1 DEDENT
613−104:1 NEWLINE
614−104:1 glyph +$
615−104:4 name lone
616−104:9 glyph |$
617−104:12 glyph [
619+101:20 tight glyph =
618−104:13 tight tvar A
620+101:21 tight name nail
619−104:14 tight glyph ]
621+101:25 tight glyph ]
620−104:16 glyph [
622+101:26 tight glyph )
621−104:17 tight name p
623+102:7 INDENT
622−104:18 tight glyph =
624+102:7 glyph ?-
623−104:19 tight tvar A
625+102:10 wing q.result
624−104:20 tight glyph ]
626+103:9 INDENT
625−106:1 NEWLINE
627+103:9 lit ~
626−106:1 glyph +$
628+103:11 lit ~
627−106:4 name lest
629+104:9 NEWLINE
628−106:9 glyph |$
629−106:12 glyph [
630+104:9 glyph [
630−106:13 tight tvar A
631+104:10 tight lit ~
631−106:14 tight glyph ]
632+104:12 name value
632−106:16 glyph [
633−106:17 tight name i
633+104:17 tight glyph ]
634−106:18 tight glyph =
634+104:19 glyph `
635−106:19 tight tvar A
635+104:20 tight glyph [
636−106:21 name t
636+104:21 tight name p
637−106:22 tight glyph =
637+104:22 tight glyph =
638−106:23 tight glyph (
638+104:23 tight glyph (
639−106:24 tight name list
639+104:24 tight name f
640−106:29 tvar A
640+104:26 wing p.value
641+104:33 tight glyph )
642+104:35 name q
643+104:36 tight glyph =
644+104:37 tight wing q.value
645+104:44 tight glyph ]
646+105:3 DEDENT
647+105:3 DEDENT
648+105:3 DEDENT
649+105:3 NEWLINE
650+105:3 glyph ^-
651+105:6 glyph (
652+105:7 tight name like
653+105:12 tvar B
654+105:13 tight glyph )
655+105:15 glyph [
656+105:16 tight name p
657+105:17 tight glyph =
658+105:18 tight wing p.result
659+105:27 name q
660+105:28 tight glyph =
661+105:29 tight name mapped
641−106:30 tight glyph )
662+105:35 tight glyph ]
642−106:31 tight glyph ]
663+107:1 DEDENT
643−108:1 NEWLINE
664+107:1 NEWLINE
644−108:1 glyph +$
665+107:1 glyph ++
645−108:4 name pole
666+107:4 name wonk
646−108:9 glyph |$
667+107:9 glyph |=
668+107:12 name veq
669+107:15 tight glyph =
647−108:12 glyph [
670+107:16 tight glyph (
671+107:17 tight name like
648−108:13 tight tvar A
672+107:22 tvar A
649−108:14 tight glyph ]
673+107:23 tight glyph )
650−109:3 INDENT
674+108:3 INDENT
651−109:3 lit ~
675+108:3 glyph ?-
652−110:3 NEWLINE
676+108:6 wing q.veq
677+109:5 INDENT
678+109:5 lit ~
653−110:3 glyph [
679+109:7 glyph !!
654−110:4 tight tvar A
680+110:5 NEWLINE
655−110:6 glyph (
681+110:5 glyph [
656−110:7 tight name pole
682+110:6 tight lit ~
657−110:12 tvar A
683+110:8 name product
658−110:13 tight glyph )
684+110:15 tight glyph ]
659−110:14 tight glyph ]
685+110:17 wing p.product
686+112:1 DEDENT
660112:1 DEDENT
687112:1 DEDENT
661112:1 NEWLINE
688112:1 NEWLINE
662112:1 glyph +$
689112:1 glyph +$
663−112:4 name quip
690+112:4 name lone
664112:9 glyph |$
691112:9 glyph |$
665112:12 glyph [
692112:12 glyph [
666112:13 tight tvar A
693112:13 tight tvar A
667−112:15 tvar B
694+112:14 tight glyph ]
668−112:16 tight glyph ]
669−112:18 glyph [
695+112:16 glyph [
670−112:19 tight glyph (
671−112:20 tight name list
696+112:17 tight name p
697+112:18 tight glyph =
672−112:25 tvar A
698+112:19 tight tvar A
673−112:26 tight glyph )
674−112:28 tvar B
675−112:29 tight glyph ]
699+112:20 tight glyph ]
676114:1 NEWLINE
700114:1 NEWLINE
677114:1 glyph +$
701114:1 glyph +$
678−114:4 name tree
702+114:4 name lest
679114:9 glyph |$
703114:9 glyph |$
680114:12 glyph [
704114:12 glyph [
681114:13 tight tvar A
705114:13 tight tvar A
682114:14 tight glyph ]
706114:14 tight glyph ]
683−115:3 INDENT
684−115:3 lit ~
685−116:3 NEWLINE
686−116:3 glyph [
707+114:16 glyph [
687−116:4 tight name n
688−116:5 tight glyph =
689−116:6 tight tvar A
690−116:8 name l
691−116:9 tight glyph =
692−116:10 tight glyph (
693−116:11 tight name tree
694−116:16 tvar A
695−116:17 tight glyph )
708+114:17 tight name i
696−116:19 name r
709+114:18 tight glyph =
697−116:20 tight glyph =
710+114:19 tight tvar A
698−116:21 tight glyph (
711+114:21 name t
699−116:22 tight name tree
712+114:22 tight glyph =
713+114:23 tight glyph (
714+114:24 tight name list
715+114:29 tvar A
716+114:30 tight glyph )
717+114:31 tight glyph ]
718+116:1 NEWLINE
719+116:1 glyph +$
720+116:4 name pole
721+116:9 glyph |$
722+116:12 glyph [
700−116:27 tvar A
723+116:13 tight tvar A
724+116:14 tight glyph ]
725+117:3 INDENT
726+117:3 lit ~
727+118:3 NEWLINE
728+118:3 glyph [
729+118:4 tight tvar A
730+118:6 glyph (
731+118:7 tight name pole
732+118:12 tvar A
701−116:28 tight glyph )
733+118:13 tight glyph )
702−116:29 tight glyph ]
734+118:14 tight glyph ]
703−118:1 DEDENT
735+120:1 DEDENT
704−118:1 NEWLINE
736+120:1 NEWLINE
705−118:1 glyph +$
737+120:1 glyph +$
706−118:4 name each
738+120:4 name quip
707−118:9 glyph |$
739+120:9 glyph |$
708−118:12 glyph [
740+120:12 glyph [
709−118:13 tight tvar A
741+120:13 tight tvar A
710−118:15 tvar B
742+120:15 tvar B
711−118:16 tight glyph ]
743+120:16 tight glyph ]
712−119:3 INDENT
713−119:3 glyph [
744+120:18 glyph [
714−119:4 tight lit %|
715−119:7 name p
716−119:8 tight glyph =
745+120:19 tight glyph (
717−119:9 tight tvar B
746+120:20 tight name list
718−119:10 tight glyph ]
747+120:25 tvar A
719−120:3 NEWLINE
720−120:3 glyph [
721−120:4 tight lit %&
722−120:7 name p
723−120:8 tight glyph =
748+120:26 tight glyph )
724−120:9 tight tvar A
749+120:28 tvar B
725−120:10 tight glyph ]
750+120:29 tight glyph ]
726−122:1 DEDENT
727122:1 NEWLINE
751122:1 NEWLINE
728122:1 glyph +$
752122:1 glyph +$
729−122:4 name bloq
753+122:4 name tree
754+122:9 glyph |$
755+122:12 glyph [
756+122:13 tight tvar A
757+122:14 tight glyph ]
758+123:3 INDENT
759+123:3 lit ~
760+124:3 NEWLINE
761+124:3 glyph [
762+124:4 tight name n
763+124:5 tight glyph =
764+124:6 tight tvar A
765+124:8 name l
766+124:9 tight glyph =
767+124:10 tight glyph (
768+124:11 tight name tree
769+124:16 tvar A
770+124:17 tight glyph )
771+124:19 name r
772+124:20 tight glyph =
773+124:21 tight glyph (
774+124:22 tight name tree
775+124:27 tvar A
776+124:28 tight glyph )
777+124:29 tight glyph ]
778+126:1 DEDENT
779+126:1 NEWLINE
780+126:1 glyph +$
781+126:4 name each
782+126:9 glyph |$
783+126:12 glyph [
784+126:13 tight tvar A
785+126:15 tvar B
786+126:16 tight glyph ]
787+127:3 INDENT
788+127:3 glyph [
789+127:4 tight lit %|
790+127:7 name p
791+127:8 tight glyph =
792+127:9 tight tvar B
793+127:10 tight glyph ]
794+128:3 NEWLINE
795+128:3 glyph [
796+128:4 tight lit %&
797+128:7 name p
798+128:8 tight glyph =
799+128:9 tight tvar A
800+128:10 tight glyph ]
801+130:1 DEDENT
802+130:1 NEWLINE
803+130:1 glyph +$
804+130:4 name bloq
730−122:9 aura @
805+130:9 aura @
731−122:10 NEWLINE
806+130:10 NEWLINE
tests/golden/prelude-1c-structural/tree.txt+82−50
@@ -235,56 +235,88 @@
235 (cell 97:32
235 (cell 97:32
236 (face 97:33 p (tvar 97:35 A))
236 (face 97:33 p (tvar 97:35 A))
237 (face 97:37 q (ref 97:39 nail))))))))
237 (face 97:37 q (ref 97:39 nail))))))))
238− (value 99:1 wonk
238+ (value 99:1 like
239 (gate 99:9
239 (gate 99:9
240− (face 99:12 veq
240+ (cell 99:12
241+ (face 99:13 f
242+ (fn 99:15 (tvar 99:18 A) (tvar 99:20 B)))
243+ (face 99:23 result
241− (apply 99:16 like (tvar 99:22 A)))
244+ (apply 99:30 like (tvar 99:36 A))))
242 (body 100:3
245 (body 100:3
243− (branch 100:3
246+ (value 100:3 mapped
244− (wing 100:6 q.veq)
247+ (body 101:5
245− (arm 101:5 (lit 101:5 ~) (crash 101:7))
248+ (cast 101:5
246− (arm 102:5
249+ (apply 101:8 unit
247− (cell 102:5 (lit 102:6 ~) (bind 102:8 product))
250+ (cell 101:14
248− (wing 102:17 p.product))))))
251+ (face 101:15 p (tvar 101:17 B))
249− (mold 104:1 lone
252+ (face 101:19 q (ref 101:21 nail))))
250− (generic 104:9 A
253+ (body 102:7
251− (cell 104:16
254+ (branch 102:7
252− (face 104:17 p (tvar 104:19 A)))))
255+ (wing 102:10 q.result)
253− (mold 106:1 lest
256+ (arm 103:9 (lit 103:9 ~) (lit 103:11 ~))
254− (generic 106:9 A
257+ (arm 104:9
255− (cell 106:16
258+ (cell 104:9 (lit 104:10 ~) (bind 104:12 value))
256− (face 106:17 i (tvar 106:19 A))
259+ (unit 104:19
260+ (tuple 104:20
257− (face 106:21 t
261+ (face 104:21 p
258− (apply 106:23 list (tvar 106:29 A))))))
262+ (group 104:23
259− (mold 108:1 pole
263+ (call 104:24 (wing 104:24 f) (wing 104:26 p.value))))
260− (generic 108:9 A
264+ (face 104:35 q (wing 104:37 q.value))))))))))
261− (union 109:3
265+ (cast 105:3
262− (const 109:3 ~)
263− (cell 110:3
264− (tvar 110:4 A)
265− (apply 110:6 pole (tvar 110:12 A))))))
266+ (apply 105:6 like (tvar 105:12 B))
266− (mold 112:1 quip
267+ (tuple 105:15
267− (generic 112:9 A B
268+ (face 105:16 p (wing 105:18 p.result))
268− (cell 112:18
269+ (face 105:27 q (wing 105:29 mapped)))))))
270+ (value 107:1 wonk
271+ (gate 107:9
272+ (face 107:12 veq
269− (apply 112:19 list (tvar 112:25 A))
273+ (apply 107:16 like (tvar 107:22 A)))
274+ (body 108:3
275+ (branch 108:3
276+ (wing 108:6 q.veq)
277+ (arm 109:5 (lit 109:5 ~) (crash 109:7))
278+ (arm 110:5
279+ (cell 110:5 (lit 110:6 ~) (bind 110:8 product))
280+ (wing 110:17 p.product))))))
281+ (mold 112:1 lone
282+ (generic 112:9 A
283+ (cell 112:16
270− (tvar 112:28 B))))
284+ (face 112:17 p (tvar 112:19 A)))))
271− (mold 114:1 tree
285+ (mold 114:1 lest
272 (generic 114:9 A
286 (generic 114:9 A
287+ (cell 114:16
288+ (face 114:17 i (tvar 114:19 A))
289+ (face 114:21 t
290+ (apply 114:23 list (tvar 114:29 A))))))
291+ (mold 116:1 pole
292+ (generic 116:9 A
293+ (union 117:3
294+ (const 117:3 ~)
295+ (cell 118:3
296+ (tvar 118:4 A)
297+ (apply 118:6 pole (tvar 118:12 A))))))
298+ (mold 120:1 quip
299+ (generic 120:9 A B
300+ (cell 120:18
301+ (apply 120:19 list (tvar 120:25 A))
302+ (tvar 120:28 B))))
303+ (mold 122:1 tree
304+ (generic 122:9 A
273− (union 115:3
305+ (union 123:3
274− (const 115:3 ~)
306+ (const 123:3 ~)
275− (cell 116:3
307+ (cell 124:3
276− (face 116:4 n (tvar 116:6 A))
308+ (face 124:4 n (tvar 124:6 A))
277− (face 116:8 l
309+ (face 124:8 l
278− (apply 116:10 tree (tvar 116:16 A)))
310+ (apply 124:10 tree (tvar 124:16 A)))
279− (face 116:19 r
311+ (face 124:19 r
280− (apply 116:21 tree (tvar 116:27 A)))))))
312+ (apply 124:21 tree (tvar 124:27 A)))))))
281− (mold 118:1 each
313+ (mold 126:1 each
282− (generic 118:9 A B
314+ (generic 126:9 A B
283− (union 119:3
315+ (union 127:3
284− (cell 119:3
316+ (cell 127:3
285− (const 119:4 %|)
317+ (const 127:4 %|)
286− (face 119:7 p (tvar 119:9 B)))
318+ (face 127:7 p (tvar 127:9 B)))
287− (cell 120:3
319+ (cell 128:3
288− (const 120:4 %&)
320+ (const 128:4 %&)
289− (face 120:7 p (tvar 120:9 A))))))
321+ (face 128:7 p (tvar 128:9 A))))))
290− (mold 122:1 bloq (aura 122:9 @)))
322+ (mold 130:1 bloq (aura 130:9 @)))
tests/golden/prelude-1c-structural/types.txt+1
@@ -27,6 +27,7 @@ partial inference; module not checked
27+$ spot: not checked
27+$ spot: not checked
28+$ toon: cases proven disjoint; mold not checked
28+$ toon: cases proven disjoint; mold not checked
29+$ like: not checked
29+$ like: not checked
30+++ like: sample mold is not supported by partial inference
30++ wonk: sample mold is not supported by partial inference
31++ wonk: sample mold is not supported by partial inference
31+$ lone: not checked
32+$ lone: not checked
32+$ lest: not checked
33+$ lest: not checked
tests/golden/prelude-3g-like/about.txt+3−3
@@ -1,4 +1,4 @@
1−source: Overview, Prelude: "The exported inventory includes all names from the Hoon library sections listed below, excluding the groups explicitly left out"; Hoon 3g includes `like` and `wonk`.
1+source: Overview, Prelude: Hoon 3g includes `like` and `wonk`; the value `like` maps an existing result.
2−tests: The prelude's `like` generic edge mold and `wonk` extractor; the callable value form of `like` is a separate, unresolved question. The source contains the prelude definitions through `like` and `wonk`.
2+tests: The source includes the generic `like` mold, its mapping gate and `wonk`.
3expect: parses
3expect: parses
4−expect-types: a partial inference report, not a checked module; generic molds and the `wonk` body are not fully checked yet
4+expect-types: a partial inference report, not a checked module
tests/golden/prelude-3g-like/source.jibb+8
@@ -96,6 +96,14 @@
96
96
97+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]
97+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]
98
98
99+++ like |= [f=$-(A B) result=(like A)]
100+ ++ mapped
101+ ^- (unit [p=B q=nail])
102+ ?- q.result
103+ ~ ~
104+ [~ value] `[p=(f p.value) q=q.value]
105+ ^- (like B) [p=p.result q=mapped]
106+
99++ wonk |= veq=(like A)
107++ wonk |= veq=(like A)
100 ?- q.veq
108 ?- q.veq
101 ~ !!
109 ~ !!
tests/golden/prelude-3g-like/tokens.txt+95−20
@@ -588,26 +588,101 @@
58897:45 tight glyph ]
58897:45 tight glyph ]
58999:1 NEWLINE
58999:1 NEWLINE
59099:1 glyph ++
59099:1 glyph ++
591−99:4 name wonk
591+99:4 name like
59299:9 glyph |=
59299:9 glyph |=
593−99:12 name veq
593+99:12 glyph [
594+99:13 tight name f
595+99:14 tight glyph =
594−99:15 tight glyph =
596+99:15 tight glyph $-(
595−99:16 tight glyph (
597+99:18 tight tvar A
596−99:17 tight name like
598+99:20 tvar B
597−99:22 tvar A
599+99:21 tight glyph )
598−99:23 tight glyph )
600+99:23 name result
601+99:29 tight glyph =
602+99:30 tight glyph (
603+99:31 tight name like
604+99:36 tvar A
605+99:37 tight glyph )
606+99:38 tight glyph ]
599100:3 INDENT
607100:3 INDENT
600−100:3 glyph ?-
608+100:3 glyph ++
601−100:6 wing q.veq
609+100:6 name mapped
602101:5 INDENT
610101:5 INDENT
603−101:5 lit ~
611+101:5 glyph ^-
612+101:8 glyph (
613+101:9 tight name unit
614+101:14 glyph [
615+101:15 tight name p
616+101:16 tight glyph =
617+101:17 tight tvar B
618+101:19 name q
619+101:20 tight glyph =
620+101:21 tight name nail
621+101:25 tight glyph ]
622+101:26 tight glyph )
623+102:7 INDENT
624+102:7 glyph ?-
625+102:10 wing q.result
626+103:9 INDENT
627+103:9 lit ~
628+103:11 lit ~
629+104:9 NEWLINE
630+104:9 glyph [
631+104:10 tight lit ~
632+104:12 name value
633+104:17 tight glyph ]
634+104:19 glyph `
635+104:20 tight glyph [
636+104:21 tight name p
637+104:22 tight glyph =
638+104:23 tight glyph (
639+104:24 tight name f
640+104:26 wing p.value
641+104:33 tight glyph )
642+104:35 name q
643+104:36 tight glyph =
644+104:37 tight wing q.value
645+104:44 tight glyph ]
646+105:3 DEDENT
647+105:3 DEDENT
648+105:3 DEDENT
649+105:3 NEWLINE
650+105:3 glyph ^-
651+105:6 glyph (
652+105:7 tight name like
653+105:12 tvar B
654+105:13 tight glyph )
655+105:15 glyph [
656+105:16 tight name p
657+105:17 tight glyph =
658+105:18 tight wing p.result
659+105:27 name q
660+105:28 tight glyph =
661+105:29 tight name mapped
662+105:35 tight glyph ]
663+107:1 DEDENT
664+107:1 NEWLINE
665+107:1 glyph ++
666+107:4 name wonk
667+107:9 glyph |=
668+107:12 name veq
669+107:15 tight glyph =
670+107:16 tight glyph (
671+107:17 tight name like
672+107:22 tvar A
673+107:23 tight glyph )
674+108:3 INDENT
675+108:3 glyph ?-
676+108:6 wing q.veq
677+109:5 INDENT
678+109:5 lit ~
604−101:7 glyph !!
679+109:7 glyph !!
605−102:5 NEWLINE
680+110:5 NEWLINE
606−102:5 glyph [
681+110:5 glyph [
607−102:6 tight lit ~
682+110:6 tight lit ~
608−102:8 name product
683+110:8 name product
609−102:15 tight glyph ]
684+110:15 tight glyph ]
610−102:17 wing p.product
685+110:17 wing p.product
611−102:26 DEDENT
686+110:26 DEDENT
612−102:26 DEDENT
687+110:26 DEDENT
613−102:26 NEWLINE
688+110:26 NEWLINE
tests/golden/prelude-3g-like/tree.txt+41−9
@@ -235,14 +235,46 @@
235 (cell 97:32
235 (cell 97:32
236 (face 97:33 p (tvar 97:35 A))
236 (face 97:33 p (tvar 97:35 A))
237 (face 97:37 q (ref 97:39 nail))))))))
237 (face 97:37 q (ref 97:39 nail))))))))
238− (value 99:1 wonk
238+ (value 99:1 like
239 (gate 99:9
239 (gate 99:9
240− (face 99:12 veq
240+ (cell 99:12
241+ (face 99:13 f
242+ (fn 99:15 (tvar 99:18 A) (tvar 99:20 B)))
243+ (face 99:23 result
241− (apply 99:16 like (tvar 99:22 A)))
244+ (apply 99:30 like (tvar 99:36 A))))
242 (body 100:3
245 (body 100:3
243− (branch 100:3
246+ (value 100:3 mapped
247+ (body 101:5
248+ (cast 101:5
249+ (apply 101:8 unit
250+ (cell 101:14
251+ (face 101:15 p (tvar 101:17 B))
252+ (face 101:19 q (ref 101:21 nail))))
253+ (body 102:7
254+ (branch 102:7
255+ (wing 102:10 q.result)
256+ (arm 103:9 (lit 103:9 ~) (lit 103:11 ~))
257+ (arm 104:9
258+ (cell 104:9 (lit 104:10 ~) (bind 104:12 value))
259+ (unit 104:19
260+ (tuple 104:20
261+ (face 104:21 p
262+ (group 104:23
263+ (call 104:24 (wing 104:24 f) (wing 104:26 p.value))))
264+ (face 104:35 q (wing 104:37 q.value))))))))))
265+ (cast 105:3
266+ (apply 105:6 like (tvar 105:12 B))
267+ (tuple 105:15
268+ (face 105:16 p (wing 105:18 p.result))
269+ (face 105:27 q (wing 105:29 mapped)))))))
270+ (value 107:1 wonk
271+ (gate 107:9
272+ (face 107:12 veq
273+ (apply 107:16 like (tvar 107:22 A)))
274+ (body 108:3
275+ (branch 108:3
244− (wing 100:6 q.veq)
276+ (wing 108:6 q.veq)
245− (arm 101:5 (lit 101:5 ~) (crash 101:7))
277+ (arm 109:5 (lit 109:5 ~) (crash 109:7))
246− (arm 102:5
278+ (arm 110:5
247− (cell 102:5 (lit 102:6 ~) (bind 102:8 product))
279+ (cell 110:5 (lit 110:6 ~) (bind 110:8 product))
248− (wing 102:17 p.product)))))))
280+ (wing 110:17 p.product)))))))
tests/golden/prelude-3g-like/types.txt+1
@@ -27,4 +27,5 @@ partial inference; module not checked
27+$ spot: not checked
27+$ spot: not checked
28+$ toon: cases proven disjoint; mold not checked
28+$ toon: cases proven disjoint; mold not checked
29+$ like: not checked
29+$ like: not checked
30+++ like: sample mold is not supported by partial inference
30++ wonk: sample mold is not supported by partial inference
31++ wonk: sample mold is not supported by partial inference
tests/golden/prelude-list-helpers/source.jibb+8
@@ -96,6 +96,14 @@
96
96
97+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]
97+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]
98
98
99+++ like |= [f=$-(A B) result=(like A)]
100+ ++ mapped
101+ ^- (unit [p=B q=nail])
102+ ?- q.result
103+ ~ ~
104+ [~ value] `[p=(f p.value) q=q.value]
105+ ^- (like B) [p=p.result q=mapped]
106+
99++ wonk |= veq=(like A)
107++ wonk |= veq=(like A)
100 ?- q.veq
108 ?- q.veq
101 ~ !!
109 ~ !!
tests/golden/prelude-list-helpers/tokens.txt+319−244
@@ -588,266 +588,341 @@
58897:45 tight glyph ]
58897:45 tight glyph ]
58999:1 NEWLINE
58999:1 NEWLINE
59099:1 glyph ++
59099:1 glyph ++
591−99:4 name wonk
591+99:4 name like
59299:9 glyph |=
59299:9 glyph |=
593−99:12 name veq
593+99:12 glyph [
594+99:13 tight name f
595+99:14 tight glyph =
594−99:15 tight glyph =
596+99:15 tight glyph $-(
595−99:16 tight glyph (
597+99:18 tight tvar A
596−99:17 tight name like
598+99:20 tvar B
597−99:22 tvar A
599+99:21 tight glyph )
598−99:23 tight glyph )
600+99:23 name result
601+99:29 tight glyph =
602+99:30 tight glyph (
603+99:31 tight name like
604+99:36 tvar A
605+99:37 tight glyph )
606+99:38 tight glyph ]
599100:3 INDENT
607100:3 INDENT
600−100:3 glyph ?-
608+100:3 glyph ++
601−100:6 wing q.veq
609+100:6 name mapped
602101:5 INDENT
610101:5 INDENT
603−101:5 lit ~
611+101:5 glyph ^-
604−101:7 glyph !!
612+101:8 glyph (
605−102:5 NEWLINE
613+101:9 tight name unit
606−102:5 glyph [
614+101:14 glyph [
607−102:6 tight lit ~
615+101:15 tight name p
608−102:8 name product
609−102:15 tight glyph ]
616+101:16 tight glyph =
610−102:17 wing p.product
617+101:17 tight tvar B
611−104:1 DEDENT
618+101:19 name q
612−104:1 DEDENT
613−104:1 NEWLINE
614−104:1 glyph +$
615−104:4 name lone
616−104:9 glyph |$
617−104:12 glyph [
619+101:20 tight glyph =
618−104:13 tight tvar A
620+101:21 tight name nail
619−104:14 tight glyph ]
621+101:25 tight glyph ]
620−104:16 glyph [
622+101:26 tight glyph )
621−104:17 tight name p
623+102:7 INDENT
622−104:18 tight glyph =
624+102:7 glyph ?-
623−104:19 tight tvar A
625+102:10 wing q.result
624−104:20 tight glyph ]
626+103:9 INDENT
625−106:1 NEWLINE
627+103:9 lit ~
626−106:1 glyph +$
628+103:11 lit ~
627−106:4 name lest
629+104:9 NEWLINE
628−106:9 glyph |$
629−106:12 glyph [
630+104:9 glyph [
630−106:13 tight tvar A
631+104:10 tight lit ~
631−106:14 tight glyph ]
632+104:12 name value
632−106:16 glyph [
633−106:17 tight name i
633+104:17 tight glyph ]
634−106:18 tight glyph =
634+104:19 glyph `
635−106:19 tight tvar A
635+104:20 tight glyph [
636−106:21 name t
636+104:21 tight name p
637−106:22 tight glyph =
637+104:22 tight glyph =
638−106:23 tight glyph (
638+104:23 tight glyph (
639−106:24 tight name list
639+104:24 tight name f
640−106:29 tvar A
640+104:26 wing p.value
641+104:33 tight glyph )
642+104:35 name q
643+104:36 tight glyph =
644+104:37 tight wing q.value
645+104:44 tight glyph ]
646+105:3 DEDENT
647+105:3 DEDENT
648+105:3 DEDENT
649+105:3 NEWLINE
650+105:3 glyph ^-
651+105:6 glyph (
652+105:7 tight name like
653+105:12 tvar B
654+105:13 tight glyph )
655+105:15 glyph [
656+105:16 tight name p
657+105:17 tight glyph =
658+105:18 tight wing p.result
659+105:27 name q
660+105:28 tight glyph =
661+105:29 tight name mapped
641−106:30 tight glyph )
662+105:35 tight glyph ]
642−106:31 tight glyph ]
663+107:1 DEDENT
643−108:1 NEWLINE
664+107:1 NEWLINE
644−108:1 glyph +$
665+107:1 glyph ++
645−108:4 name pole
666+107:4 name wonk
646−108:9 glyph |$
667+107:9 glyph |=
668+107:12 name veq
669+107:15 tight glyph =
647−108:12 glyph [
670+107:16 tight glyph (
671+107:17 tight name like
648−108:13 tight tvar A
672+107:22 tvar A
649−108:14 tight glyph ]
673+107:23 tight glyph )
650−109:3 INDENT
674+108:3 INDENT
651−109:3 lit ~
675+108:3 glyph ?-
652−110:3 NEWLINE
676+108:6 wing q.veq
677+109:5 INDENT
678+109:5 lit ~
653−110:3 glyph [
679+109:7 glyph !!
654−110:4 tight tvar A
680+110:5 NEWLINE
655−110:6 glyph (
681+110:5 glyph [
656−110:7 tight name pole
682+110:6 tight lit ~
657−110:12 tvar A
683+110:8 name product
658−110:13 tight glyph )
684+110:15 tight glyph ]
659−110:14 tight glyph ]
685+110:17 wing p.product
686+112:1 DEDENT
660112:1 DEDENT
687112:1 DEDENT
661112:1 NEWLINE
688112:1 NEWLINE
662112:1 glyph +$
689112:1 glyph +$
663−112:4 name quip
690+112:4 name lone
664112:9 glyph |$
691112:9 glyph |$
665112:12 glyph [
692112:12 glyph [
666112:13 tight tvar A
693112:13 tight tvar A
667−112:15 tvar B
694+112:14 tight glyph ]
668−112:16 tight glyph ]
669−112:18 glyph [
695+112:16 glyph [
670−112:19 tight glyph (
671−112:20 tight name list
696+112:17 tight name p
697+112:18 tight glyph =
672−112:25 tvar A
698+112:19 tight tvar A
673−112:26 tight glyph )
674−112:28 tvar B
675−112:29 tight glyph ]
699+112:20 tight glyph ]
676114:1 NEWLINE
700114:1 NEWLINE
677114:1 glyph +$
701114:1 glyph +$
678−114:4 name tree
702+114:4 name lest
679114:9 glyph |$
703114:9 glyph |$
680114:12 glyph [
704114:12 glyph [
681114:13 tight tvar A
705114:13 tight tvar A
682114:14 tight glyph ]
706114:14 tight glyph ]
683−115:3 INDENT
684−115:3 lit ~
685−116:3 NEWLINE
686−116:3 glyph [
707+114:16 glyph [
687−116:4 tight name n
688−116:5 tight glyph =
689−116:6 tight tvar A
690−116:8 name l
691−116:9 tight glyph =
692−116:10 tight glyph (
693−116:11 tight name tree
694−116:16 tvar A
695−116:17 tight glyph )
708+114:17 tight name i
696−116:19 name r
709+114:18 tight glyph =
697−116:20 tight glyph =
710+114:19 tight tvar A
698−116:21 tight glyph (
711+114:21 name t
699−116:22 tight name tree
712+114:22 tight glyph =
713+114:23 tight glyph (
714+114:24 tight name list
715+114:29 tvar A
716+114:30 tight glyph )
717+114:31 tight glyph ]
718+116:1 NEWLINE
719+116:1 glyph +$
720+116:4 name pole
721+116:9 glyph |$
722+116:12 glyph [
700−116:27 tvar A
723+116:13 tight tvar A
724+116:14 tight glyph ]
725+117:3 INDENT
726+117:3 lit ~
727+118:3 NEWLINE
728+118:3 glyph [
729+118:4 tight tvar A
730+118:6 glyph (
731+118:7 tight name pole
732+118:12 tvar A
701−116:28 tight glyph )
733+118:13 tight glyph )
702−116:29 tight glyph ]
734+118:14 tight glyph ]
703−118:1 DEDENT
735+120:1 DEDENT
704−118:1 NEWLINE
736+120:1 NEWLINE
705−118:1 glyph +$
737+120:1 glyph +$
706−118:4 name each
738+120:4 name quip
707−118:9 glyph |$
739+120:9 glyph |$
708−118:12 glyph [
740+120:12 glyph [
709−118:13 tight tvar A
741+120:13 tight tvar A
710−118:15 tvar B
742+120:15 tvar B
711−118:16 tight glyph ]
743+120:16 tight glyph ]
712−119:3 INDENT
713−119:3 glyph [
744+120:18 glyph [
714−119:4 tight lit %|
715−119:7 name p
716−119:8 tight glyph =
745+120:19 tight glyph (
717−119:9 tight tvar B
746+120:20 tight name list
718−119:10 tight glyph ]
747+120:25 tvar A
719−120:3 NEWLINE
720−120:3 glyph [
721−120:4 tight lit %&
722−120:7 name p
723−120:8 tight glyph =
748+120:26 tight glyph )
724−120:9 tight tvar A
749+120:28 tvar B
725−120:10 tight glyph ]
750+120:29 tight glyph ]
726−122:1 DEDENT
727122:1 NEWLINE
751122:1 NEWLINE
728122:1 glyph +$
752122:1 glyph +$
729−122:4 name bloq
753+122:4 name tree
730−122:9 aura @
754+122:9 glyph |$
755+122:12 glyph [
756+122:13 tight tvar A
757+122:14 tight glyph ]
758+123:3 INDENT
759+123:3 lit ~
731−124:1 NEWLINE
760+124:3 NEWLINE
732−124:1 glyph ++
761+124:3 glyph [
733−124:4 name some
762+124:4 tight name n
763+124:5 tight glyph =
764+124:6 tight tvar A
765+124:8 name l
766+124:9 tight glyph =
734−124:9 glyph |=
767+124:10 tight glyph (
735−124:12 name item
768+124:11 tight name tree
736−124:16 tight glyph =
769+124:16 tvar A
737−124:17 tight tvar A
770+124:17 tight glyph )
738−124:19 glyph `
771+124:19 name r
739−124:20 tight name item
772+124:20 tight glyph =
773+124:21 tight glyph (
774+124:22 tight name tree
775+124:27 tvar A
776+124:28 tight glyph )
777+124:29 tight glyph ]
778+126:1 DEDENT
740126:1 NEWLINE
779126:1 NEWLINE
741−126:1 glyph ++
780+126:1 glyph +$
742−126:4 name lure
781+126:4 name each
743−126:9 glyph |=
782+126:9 glyph |$
744−126:12 name item
783+126:12 glyph [
745−126:16 tight glyph =
746−126:17 tight tvar A
784+126:13 tight tvar A
785+126:15 tvar B
786+126:16 tight glyph ]
747127:3 INDENT
787127:3 INDENT
748−127:3 glyph ^-
788+127:3 glyph [
789+127:4 tight lit %|
790+127:7 name p
791+127:8 tight glyph =
792+127:9 tight tvar B
793+127:10 tight glyph ]
794+128:3 NEWLINE
795+128:3 glyph [
796+128:4 tight lit %&
797+128:7 name p
798+128:8 tight glyph =
799+128:9 tight tvar A
800+128:10 tight glyph ]
801+130:1 DEDENT
802+130:1 NEWLINE
803+130:1 glyph +$
804+130:4 name bloq
805+130:9 aura @
806+132:1 NEWLINE
807+132:1 glyph ++
808+132:4 name some
809+132:9 glyph |=
810+132:12 name item
811+132:16 tight glyph =
812+132:17 tight tvar A
813+132:19 glyph `
814+132:20 tight name item
815+134:1 NEWLINE
816+134:1 glyph ++
817+134:4 name lure
818+134:9 glyph |=
819+134:12 name item
820+134:16 tight glyph =
821+134:17 tight tvar A
822+135:3 INDENT
823+135:3 glyph ^-
749−127:6 glyph (
824+135:6 glyph (
750−127:7 tight name list
825+135:7 tight name list
751−127:12 tvar A
826+135:12 tvar A
752−127:13 tight glyph )
827+135:13 tight glyph )
753−127:15 glyph [
828+135:15 glyph [
754−127:16 tight name item
829+135:16 tight name item
755−127:21 lit ~
830+135:21 lit ~
756−127:22 tight glyph ]
831+135:22 tight glyph ]
757−129:1 DEDENT
832+137:1 DEDENT
758−129:1 NEWLINE
833+137:1 NEWLINE
759−129:1 glyph ++
834+137:1 glyph ++
760−129:4 name snoc
835+137:4 name snoc
761−129:9 glyph |=
836+137:9 glyph |=
762−129:12 name args
837+137:12 name args
763−129:16 tight glyph =
838+137:16 tight glyph =
764−129:17 tight glyph [
839+137:17 tight glyph [
765−129:18 tight glyph (
840+137:18 tight glyph (
766−129:19 tight name list
841+137:19 tight name list
767−129:24 tvar A
842+137:24 tvar A
768−129:25 tight glyph )
843+137:25 tight glyph )
769−129:27 tvar A
844+137:27 tvar A
770−129:28 tight glyph ]
845+137:28 tight glyph ]
771−130:3 INDENT
846+138:3 INDENT
772−130:3 glyph ?-
847+138:3 glyph ?-
773−130:6 name args
848+138:6 name args
774−131:5 INDENT
849+139:5 INDENT
775−131:5 glyph [
850+139:5 glyph [
776−131:6 tight name xs
851+139:6 tight name xs
777−131:9 name item
852+139:9 name item
778−131:13 tight glyph ]
853+139:13 tight glyph ]
779−131:15 glyph (
854+139:15 glyph (
780−131:16 tight name weld
855+139:16 tight name weld
781−131:21 name xs
856+139:21 name xs
782−131:24 glyph [
857+139:24 glyph [
783−131:25 tight name item
858+139:25 tight name item
784−131:30 lit ~
859+139:30 lit ~
785−131:31 tight glyph ]
860+139:31 tight glyph ]
786−131:32 tight glyph )
861+139:32 tight glyph )
787−133:1 DEDENT
862+141:1 DEDENT
788−133:1 DEDENT
863+141:1 DEDENT
789−133:1 NEWLINE
864+141:1 NEWLINE
790−133:1 glyph ++
865+141:1 glyph ++
791−133:4 name flop
866+141:4 name flop
792−133:9 glyph |=
867+141:9 glyph |=
793−133:12 name xs
868+141:12 name xs
794−133:14 tight glyph =
869+141:14 tight glyph =
795−133:15 tight glyph (
870+141:15 tight glyph (
796−133:16 tight name list
871+141:16 tight name list
797−133:21 tvar A
872+141:21 tvar A
798−133:22 tight glyph )
873+141:22 tight glyph )
799−134:3 INDENT
874+142:3 INDENT
800−134:3 glyph ++
875+142:3 glyph ++
801−134:6 name reverse-into
876+142:6 name reverse-into
802−134:19 glyph |=
877+142:19 glyph |=
803−134:22 name args
878+142:22 name args
804−134:26 tight glyph =
879+142:26 tight glyph =
805−134:27 tight glyph [
880+142:27 tight glyph [
806−134:28 tight glyph (
881+142:28 tight glyph (
807−134:29 tight name list
882+142:29 tight name list
808−134:34 tvar A
883+142:34 tvar A
809−134:35 tight glyph )
884+142:35 tight glyph )
810−134:37 glyph (
885+142:37 glyph (
811−134:38 tight name list
886+142:38 tight name list
812−134:43 tvar A
887+142:43 tvar A
813−134:44 tight glyph )
888+142:44 tight glyph )
814−134:45 tight glyph ]
889+142:45 tight glyph ]
815−135:5 INDENT
890+143:5 INDENT
816−135:5 glyph ?-
891+143:5 glyph ?-
817−135:8 name args
892+143:8 name args
818−136:7 INDENT
893+144:7 INDENT
819−136:7 glyph [
894+144:7 glyph [
820−136:8 tight name rest
895+144:8 tight name rest
821−136:13 name acc
896+144:13 name acc
822−136:16 tight glyph ]
897+144:16 tight glyph ]
823−137:9 INDENT
898+145:9 INDENT
824−137:9 glyph ?-
899+145:9 glyph ?-
825−137:12 name rest
900+145:12 name rest
826−138:11 INDENT
901+146:11 INDENT
827−138:11 lit ~
902+146:11 lit ~
828−138:13 name acc
903+146:13 name acc
829−139:11 NEWLINE
904+147:11 NEWLINE
830−139:11 glyph [
905+147:11 glyph [
831−139:12 tight name item
906+147:12 tight name item
832−139:17 name more
907+147:17 name more
833−139:21 tight glyph ]
908+147:21 tight glyph ]
834−139:23 glyph (
909+147:23 glyph (
835−139:24 tight name reverse-into
910+147:24 tight name reverse-into
836−139:37 name more
911+147:37 name more
837−139:42 glyph [
912+147:42 glyph [
838−139:43 tight name item
913+147:43 tight name item
839−139:48 name acc
914+147:48 name acc
840−139:51 tight glyph ]
915+147:51 tight glyph ]
841−139:52 tight glyph )
916+147:52 tight glyph )
842−140:3 DEDENT
917+148:3 DEDENT
843−140:3 DEDENT
918+148:3 DEDENT
844−140:3 DEDENT
919+148:3 DEDENT
845−140:3 DEDENT
920+148:3 DEDENT
846−140:3 NEWLINE
921+148:3 NEWLINE
847−140:3 glyph (
922+148:3 glyph (
848−140:4 tight name reverse-into
923+148:4 tight name reverse-into
849−140:17 name xs
924+148:17 name xs
850−140:20 lit ~
925+148:20 lit ~
851−140:21 tight glyph )
926+148:21 tight glyph )
852−140:22 DEDENT
927+148:22 DEDENT
853−140:22 NEWLINE
928+148:22 NEWLINE
tests/golden/prelude-list-helpers/tree.txt+138−106
@@ -235,112 +235,144 @@
235 (cell 97:32
235 (cell 97:32
236 (face 97:33 p (tvar 97:35 A))
236 (face 97:33 p (tvar 97:35 A))
237 (face 97:37 q (ref 97:39 nail))))))))
237 (face 97:37 q (ref 97:39 nail))))))))
238− (value 99:1 wonk
238+ (value 99:1 like
239 (gate 99:9
239 (gate 99:9
240− (face 99:12 veq
240+ (cell 99:12
241+ (face 99:13 f
242+ (fn 99:15 (tvar 99:18 A) (tvar 99:20 B)))
243+ (face 99:23 result
241− (apply 99:16 like (tvar 99:22 A)))
244+ (apply 99:30 like (tvar 99:36 A))))
242 (body 100:3
245 (body 100:3
243− (branch 100:3
246+ (value 100:3 mapped
244− (wing 100:6 q.veq)
247+ (body 101:5
245− (arm 101:5 (lit 101:5 ~) (crash 101:7))
248+ (cast 101:5
246− (arm 102:5
249+ (apply 101:8 unit
247− (cell 102:5 (lit 102:6 ~) (bind 102:8 product))
250+ (cell 101:14
248− (wing 102:17 p.product))))))
251+ (face 101:15 p (tvar 101:17 B))
249− (mold 104:1 lone
252+ (face 101:19 q (ref 101:21 nail))))
250− (generic 104:9 A
253+ (body 102:7
251− (cell 104:16
254+ (branch 102:7
252− (face 104:17 p (tvar 104:19 A)))))
255+ (wing 102:10 q.result)
253− (mold 106:1 lest
256+ (arm 103:9 (lit 103:9 ~) (lit 103:11 ~))
254− (generic 106:9 A
257+ (arm 104:9
255− (cell 106:16
258+ (cell 104:9 (lit 104:10 ~) (bind 104:12 value))
256− (face 106:17 i (tvar 106:19 A))
259+ (unit 104:19
260+ (tuple 104:20
257− (face 106:21 t
261+ (face 104:21 p
258− (apply 106:23 list (tvar 106:29 A))))))
262+ (group 104:23
259− (mold 108:1 pole
263+ (call 104:24 (wing 104:24 f) (wing 104:26 p.value))))
260− (generic 108:9 A
264+ (face 104:35 q (wing 104:37 q.value))))))))))
261− (union 109:3
265+ (cast 105:3
262− (const 109:3 ~)
263− (cell 110:3
264− (tvar 110:4 A)
265− (apply 110:6 pole (tvar 110:12 A))))))
266+ (apply 105:6 like (tvar 105:12 B))
266− (mold 112:1 quip
267+ (tuple 105:15
267− (generic 112:9 A B
268+ (face 105:16 p (wing 105:18 p.result))
268− (cell 112:18
269+ (face 105:27 q (wing 105:29 mapped)))))))
270+ (value 107:1 wonk
271+ (gate 107:9
272+ (face 107:12 veq
269− (apply 112:19 list (tvar 112:25 A))
273+ (apply 107:16 like (tvar 107:22 A)))
274+ (body 108:3
275+ (branch 108:3
276+ (wing 108:6 q.veq)
277+ (arm 109:5 (lit 109:5 ~) (crash 109:7))
278+ (arm 110:5
279+ (cell 110:5 (lit 110:6 ~) (bind 110:8 product))
280+ (wing 110:17 p.product))))))
281+ (mold 112:1 lone
282+ (generic 112:9 A
283+ (cell 112:16
270− (tvar 112:28 B))))
284+ (face 112:17 p (tvar 112:19 A)))))
271− (mold 114:1 tree
285+ (mold 114:1 lest
272 (generic 114:9 A
286 (generic 114:9 A
287+ (cell 114:16
288+ (face 114:17 i (tvar 114:19 A))
289+ (face 114:21 t
290+ (apply 114:23 list (tvar 114:29 A))))))
291+ (mold 116:1 pole
292+ (generic 116:9 A
293+ (union 117:3
294+ (const 117:3 ~)
295+ (cell 118:3
296+ (tvar 118:4 A)
297+ (apply 118:6 pole (tvar 118:12 A))))))
298+ (mold 120:1 quip
299+ (generic 120:9 A B
300+ (cell 120:18
301+ (apply 120:19 list (tvar 120:25 A))
302+ (tvar 120:28 B))))
303+ (mold 122:1 tree
304+ (generic 122:9 A
273− (union 115:3
305+ (union 123:3
274− (const 115:3 ~)
306+ (const 123:3 ~)
275− (cell 116:3
307+ (cell 124:3
276− (face 116:4 n (tvar 116:6 A))
308+ (face 124:4 n (tvar 124:6 A))
277− (face 116:8 l
309+ (face 124:8 l
278− (apply 116:10 tree (tvar 116:16 A)))
310+ (apply 124:10 tree (tvar 124:16 A)))
279− (face 116:19 r
311+ (face 124:19 r
280− (apply 116:21 tree (tvar 116:27 A)))))))
312+ (apply 124:21 tree (tvar 124:27 A)))))))
281− (mold 118:1 each
313+ (mold 126:1 each
282− (generic 118:9 A B
314+ (generic 126:9 A B
283− (union 119:3
315+ (union 127:3
284− (cell 119:3
316+ (cell 127:3
285− (const 119:4 %|)
317+ (const 127:4 %|)
286− (face 119:7 p (tvar 119:9 B)))
318+ (face 127:7 p (tvar 127:9 B)))
287− (cell 120:3
319+ (cell 128:3
288− (const 120:4 %&)
320+ (const 128:4 %&)
289− (face 120:7 p (tvar 120:9 A))))))
321+ (face 128:7 p (tvar 128:9 A))))))
290− (mold 122:1 bloq (aura 122:9 @))
322+ (mold 130:1 bloq (aura 130:9 @))
291− (value 124:1 some
323+ (value 132:1 some
292− (gate 124:9
324+ (gate 132:9
293− (face 124:12 item (tvar 124:17 A))
325+ (face 132:12 item (tvar 132:17 A))
294− (unit 124:19 (wing 124:20 item))))
326+ (unit 132:19 (wing 132:20 item))))
295− (value 126:1 lure
327+ (value 134:1 lure
296− (gate 126:9
328+ (gate 134:9
297− (face 126:12 item (tvar 126:17 A))
329+ (face 134:12 item (tvar 134:17 A))
298− (body 127:3
330+ (body 135:3
299− (cast 127:3
331+ (cast 135:3
300− (apply 127:6 list (tvar 127:12 A))
332+ (apply 135:6 list (tvar 135:12 A))
301− (tuple 127:15 (wing 127:16 item) (lit 127:21 ~))))))
333+ (tuple 135:15 (wing 135:16 item) (lit 135:21 ~))))))
302− (value 129:1 snoc
334+ (value 137:1 snoc
303− (gate 129:9
335+ (gate 137:9
304− (face 129:12 args
336+ (face 137:12 args
305− (cell 129:17
337+ (cell 137:17
306− (apply 129:18 list (tvar 129:24 A))
338+ (apply 137:18 list (tvar 137:24 A))
307− (tvar 129:27 A)))
339+ (tvar 137:27 A)))
308− (body 130:3
340+ (body 138:3
309− (branch 130:3
341+ (branch 138:3
310− (wing 130:6 args)
342+ (wing 138:6 args)
311− (arm 131:5
343+ (arm 139:5
312− (cell 131:5 (bind 131:6 xs) (bind 131:9 item))
344+ (cell 139:5 (bind 139:6 xs) (bind 139:9 item))
313− (group 131:15
345+ (group 139:15
314− (call 131:16
346+ (call 139:16
315− (wing 131:16 weld)
347+ (wing 139:16 weld)
316− (wing 131:21 xs)
348+ (wing 139:21 xs)
317− (tuple 131:24 (wing 131:25 item) (lit 131:30 ~)))))))))
349+ (tuple 139:24 (wing 139:25 item) (lit 139:30 ~)))))))))
318− (value 133:1 flop
350+ (value 141:1 flop
319− (gate 133:9
351+ (gate 141:9
320− (face 133:12 xs
352+ (face 141:12 xs
321− (apply 133:15 list (tvar 133:21 A)))
353+ (apply 141:15 list (tvar 141:21 A)))
322− (body 134:3
354+ (body 142:3
323− (value 134:3 reverse-into
355+ (value 142:3 reverse-into
324− (gate 134:19
356+ (gate 142:19
325− (face 134:22 args
357+ (face 142:22 args
326− (cell 134:27
358+ (cell 142:27
327− (apply 134:28 list (tvar 134:34 A))
359+ (apply 142:28 list (tvar 142:34 A))
328− (apply 134:37 list (tvar 134:43 A))))
360+ (apply 142:37 list (tvar 142:43 A))))
329− (body 135:5
361+ (body 143:5
330− (branch 135:5
362+ (branch 143:5
331− (wing 135:8 args)
363+ (wing 143:8 args)
332− (arm 136:7
364+ (arm 144:7
333− (cell 136:7 (bind 136:8 rest) (bind 136:13 acc))
365+ (cell 144:7 (bind 144:8 rest) (bind 144:13 acc))
334− (body 137:9
366+ (body 145:9
335− (branch 137:9
367+ (branch 145:9
336− (wing 137:12 rest)
368+ (wing 145:12 rest)
337− (arm 138:11 (lit 138:11 ~) (wing 138:13 acc))
369+ (arm 146:11 (lit 146:11 ~) (wing 146:13 acc))
338− (arm 139:11
370+ (arm 147:11
339− (cell 139:11 (bind 139:12 item) (bind 139:17 more))
371+ (cell 147:11 (bind 147:12 item) (bind 147:17 more))
340− (group 139:23
372+ (group 147:23
341− (call 139:24
373+ (call 147:24
342− (wing 139:24 reverse-into)
374+ (wing 147:24 reverse-into)
343− (wing 139:37 more)
375+ (wing 147:37 more)
344− (tuple 139:42 (wing 139:43 item) (wing 139:48 acc))))))))))))
376+ (tuple 147:42 (wing 147:43 item) (wing 147:48 acc))))))))))))
345− (group 140:3
377+ (group 148:3
346− (call 140:4 (wing 140:4 reverse-into) (wing 140:17 xs) (lit 140:20 ~)))))))
378+ (call 148:4 (wing 148:4 reverse-into) (wing 148:17 xs) (lit 148:20 ~)))))))
tests/golden/prelude-list-helpers/types.txt+1
@@ -27,6 +27,7 @@ partial inference; module not checked
27+$ spot: not checked
27+$ spot: not checked
28+$ toon: cases proven disjoint; mold not checked
28+$ toon: cases proven disjoint; mold not checked
29+$ like: not checked
29+$ like: not checked
30+++ like: sample mold is not supported by partial inference
30++ wonk: sample mold is not supported by partial inference
31++ wonk: sample mold is not supported by partial inference
31+$ lone: not checked
32+$ lone: not checked
32+$ lest: not checked
33+$ lest: not checked
tests/golden/prelude-unit-list-transforms/about.txt+1−1
@@ -1,4 +1,4 @@
1source: Overview, Prelude: "The exported inventory includes all names from the Hoon library sections listed below, excluding the groups explicitly left out"; Hoon 2a includes `drop`, `bind`, `biff`, `flit`, `both`, `clap` and `clef`, and 2b includes `join`, `murn`, `rear`, `snip`, `skim`, `skip`, `levy`, `lien`, `roll` and `reel`. Folds take an explicit start.
1source: Overview, Prelude: "The exported inventory includes all names from the Hoon library sections listed below, excluding the groups explicitly left out"; Hoon 2a includes `drop`, `bind`, `biff`, `flit`, `both`, `clap` and `clef`, and 2b includes `join`, `murn`, `rear`, `snip`, `skim`, `skip`, `levy`, `lien`, `roll` and `reel`. Folds take an explicit start.
2−tests: The complete current prelude parses, including unit-to-list conversion, unit mapping and flat mapping, a curried unit-producing filter, three ways to combine units, including `clap` with one shared value type, complementary list filters, present-product mapping, joining, last-item operations, all/any predicates, and left and right folds. The filters retain the order of their selected items.
2+tests: The complete current prelude parses, including unit-to-list conversion, unit mapping and flat mapping, a curried unit-producing filter, three ways to combine units, including `clap` with one shared value type, complementary list filters, present-product mapping, joining, last-item operations, all/any predicates, and left and right folds. The filters retain the order of their selected items. It also includes the source-backed `ask` re-export and `pure` gate.
3expect: parses
3expect: parses
4expect-types: a partial inference report, not a checked module; unit and list gate typing is not complete
4expect-types: a partial inference report, not a checked module; unit and list gate typing is not complete
tests/golden/prelude-unit-list-transforms/source.jibb+20
@@ -1,5 +1,6 @@
1/= internal /lib/jibb/internal
1/= internal /lib/jibb/internal
2+$ poke poke.internal
2+$ poke poke.internal
3++$ qath qath.internal
3
4
4:: Initial prelude functions. The rest of the inventory is still to come.
5:: Initial prelude functions. The rest of the inventory is still to come.
5
6
@@ -100,6 +101,14 @@
100
101
101+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]
102+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]
102
103
104+++ like |= [f=$-(A B) result=(like A)]
105+ ++ mapped
106+ ^- (unit [p=B q=nail])
107+ ?- q.result
108+ ~ ~
109+ [~ value] `[p=(f p.value) q=q.value]
110+ ^- (like B) [p=p.result q=mapped]
111+
103++ wonk |= veq=(like A)
112++ wonk |= veq=(like A)
104 ?- q.veq
113 ?- q.veq
105 ~ !!
114 ~ !!
@@ -149,6 +158,12 @@
149 ~ ~
158 ~ ~
150 [~ value] [value ~]
159 [~ value] [value ~]
151
160
161+++ bond |= fallback=$-(~ A)
162+ |= maybe=(unit A)
163+ ?- maybe
164+ ~ (fallback ~)
165+ [~ value] value
166+
152++ bind |= args=[(unit A) $-(A B)]
167++ bind |= args=[(unit A) $-(A B)]
153 ?- args
168 ?- args
154 [maybe f] ^- (unit B)
169 [maybe f] ^- (unit B)
@@ -317,3 +332,8 @@
317 [%who reply=$-(@p M)]
332 [%who reply=$-(@p M)]
318
333
319++ gth |= args=[A A] (gth-atom.internal args)
334++ gth |= args=[A A] (gth-atom.internal args)
335+++ add |= args=[A A] (add-atom.internal args)
336+++ dec |= atom=A (dec-atom.internal atom)
337+
338++$ ask |$ [M] (ask.internal M)
339+++ pure |= x=M ^- (ask M) [%pure x]
tests/golden/prelude-unit-list-transforms/tokens.txt+2175−2008
@@ -10,2058 +10,2225 @@
102:1 glyph +$
102:1 glyph +$
112:4 name poke
112:4 name poke
122:9 wing poke.internal
122:9 wing poke.internal
13−6:1 NEWLINE
13+3:1 NEWLINE
14−6:1 glyph ++
14+3:1 glyph +$
15+3:4 name qath
16+3:9 wing qath.internal
17+7:1 NEWLINE
18+7:1 glyph ++
15−6:4 name same
19+7:4 name same
16−6:9 glyph |=
20+7:9 glyph |=
17−6:12 name x
21+7:12 name x
18−6:13 tight glyph =
22+7:13 tight glyph =
19−6:14 tight tvar A
23+7:14 tight tvar A
20−6:16 name x
24+7:16 name x
21−8:1 NEWLINE
25+9:1 NEWLINE
22−8:1 glyph ++
26+9:1 glyph ++
23−8:4 name head
27+9:4 name head
24−8:9 glyph |=
28+9:9 glyph |=
25−8:12 name p
29+9:12 name p
26−8:13 tight glyph =
30+9:13 tight glyph =
27−8:14 tight glyph [
31+9:14 tight glyph [
28−8:15 tight tvar A
32+9:15 tight tvar A
29−8:17 tvar B
33+9:17 tvar B
30−8:18 tight glyph ]
34+9:18 tight glyph ]
31−9:3 INDENT
35+10:3 INDENT
32−9:3 glyph ?-
36+10:3 glyph ?-
33−9:6 name p
37+10:6 name p
34−10:5 INDENT
38+11:5 INDENT
35−10:5 glyph [
39+11:5 glyph [
36−10:6 tight name a
40+11:6 tight name a
37−10:8 name b
41+11:8 name b
38−10:9 tight glyph ]
42+11:9 tight glyph ]
39−10:11 name a
43+11:11 name a
40−12:1 DEDENT
44+13:1 DEDENT
41−12:1 DEDENT
45+13:1 DEDENT
42−12:1 NEWLINE
46+13:1 NEWLINE
43−12:1 glyph ++
47+13:1 glyph ++
44−12:4 name tail
48+13:4 name tail
45−12:9 glyph |=
49+13:9 glyph |=
46−12:12 name p
50+13:12 name p
47−12:13 tight glyph =
51+13:13 tight glyph =
48−12:14 tight glyph [
52+13:14 tight glyph [
49−12:15 tight tvar A
53+13:15 tight tvar A
50−12:17 tvar B
54+13:17 tvar B
51−12:18 tight glyph ]
55+13:18 tight glyph ]
52−13:3 INDENT
56+14:3 INDENT
53−13:3 glyph ?-
57+14:3 glyph ?-
54−13:6 name p
58+14:6 name p
55−14:5 INDENT
59+15:5 INDENT
56−14:5 glyph [
60+15:5 glyph [
57−14:6 tight name a
61+15:6 tight name a
58−14:8 name b
62+15:8 name b
59−14:9 tight glyph ]
63+15:9 tight glyph ]
60−14:11 name b
64+15:11 name b
61−16:1 DEDENT
65+17:1 DEDENT
62−16:1 DEDENT
66+17:1 DEDENT
63−16:1 NEWLINE
67+17:1 NEWLINE
64−16:1 glyph ++
68+17:1 glyph ++
65−16:4 name not
69+17:4 name not
66−16:8 glyph |=
70+17:8 glyph |=
67−16:11 name b
71+17:11 name b
68−16:12 tight glyph =
72+17:12 tight glyph =
69−16:13 tight glyph ?
73+17:13 tight glyph ?
70−17:3 INDENT
74+18:3 INDENT
71−17:3 glyph ?-
75+18:3 glyph ?-
72−17:6 name b
76+18:6 name b
73−18:5 INDENT
77+19:5 INDENT
74−18:5 lit %.y
78+19:5 lit %.y
75−18:9 lit %.n
79+19:9 lit %.n
76−19:5 NEWLINE
80+20:5 NEWLINE
77−19:5 lit %.n
81+20:5 lit %.n
78−19:9 lit %.y
82+20:9 lit %.y
79−21:1 DEDENT
83+22:1 DEDENT
80−21:1 DEDENT
84+22:1 DEDENT
81−21:1 NEWLINE
85+22:1 NEWLINE
82−21:1 glyph +$
86+22:1 glyph +$
83−21:4 name list
87+22:4 name list
84−21:9 glyph |$
88+22:9 glyph |$
85−21:12 glyph [
89+22:12 glyph [
86−21:13 tight tvar A
90+22:13 tight tvar A
87−21:14 tight glyph ]
91+22:14 tight glyph ]
88−22:3 INDENT
92+23:3 INDENT
89−22:3 lit ~
93+23:3 lit ~
90−23:3 NEWLINE
94+24:3 NEWLINE
91−23:3 glyph [
95+24:3 glyph [
92−23:4 tight name i
96+24:4 tight name i
93−23:5 tight glyph =
97+24:5 tight glyph =
94−23:6 tight tvar A
98+24:6 tight tvar A
95−23:8 name t
99+24:8 name t
96−23:9 tight glyph =
100+24:9 tight glyph =
97−23:10 tight glyph (
101+24:10 tight glyph (
98−23:11 tight name list
102+24:11 tight name list
99−23:16 tvar A
103+24:16 tvar A
100−23:17 tight glyph )
104+24:17 tight glyph )
101−23:18 tight glyph ]
105+24:18 tight glyph ]
102−25:1 DEDENT
106+26:1 DEDENT
103−25:1 NEWLINE
107+26:1 NEWLINE
104−25:1 glyph +$
108+26:1 glyph +$
105−25:4 name unit
109+26:4 name unit
106−25:9 glyph |$
110+26:9 glyph |$
107−25:12 glyph [
111+26:12 glyph [
108−25:13 tight tvar A
112+26:13 tight tvar A
109−25:14 tight glyph ]
113+26:14 tight glyph ]
110−26:3 INDENT
114+27:3 INDENT
111−26:3 lit ~
115+27:3 lit ~
112−27:3 NEWLINE
116+28:3 NEWLINE
113−27:3 glyph [
117+28:3 glyph [
114−27:4 tight lit ~
118+28:4 tight lit ~
115−27:6 name u
119+28:6 name u
116−27:7 tight glyph =
120+28:7 tight glyph =
117−27:8 tight tvar A
121+28:8 tight tvar A
118−27:9 tight glyph ]
122+28:9 tight glyph ]
119−29:1 DEDENT
123+30:1 DEDENT
120−29:1 NEWLINE
124+30:1 NEWLINE
121−29:1 glyph ++
125+30:1 glyph ++
122−29:4 name fall
126+30:4 name fall
123−29:9 glyph |=
127+30:9 glyph |=
124−29:12 name args
128+30:12 name args
125−29:16 tight glyph =
129+30:16 tight glyph =
126−29:17 tight glyph [
130+30:17 tight glyph [
127−29:18 tight glyph (
131+30:18 tight glyph (
128−29:19 tight name unit
132+30:19 tight name unit
129−29:24 tvar A
133+30:24 tvar A
130−29:25 tight glyph )
134+30:25 tight glyph )
131−29:27 tvar A
135+30:27 tvar A
132−29:28 tight glyph ]
136+30:28 tight glyph ]
133−30:3 INDENT
137+31:3 INDENT
134−30:3 glyph ?-
138+31:3 glyph ?-
135−30:6 name args
139+31:6 name args
136−31:5 INDENT
140+32:5 INDENT
137−31:5 glyph [
141+32:5 glyph [
138−31:6 tight name maybe
142+32:6 tight name maybe
139−31:12 name fallback
143+32:12 name fallback
140−31:20 tight glyph ]
144+32:20 tight glyph ]
141−32:7 INDENT
145+33:7 INDENT
142−32:7 glyph ?-
146+33:7 glyph ?-
143−32:10 name maybe
147+33:10 name maybe
144−33:9 INDENT
148+34:9 INDENT
145−33:9 lit ~
149+34:9 lit ~
146−33:11 name fallback
150+34:11 name fallback
147−34:9 NEWLINE
151+35:9 NEWLINE
148−34:9 glyph [
152+35:9 glyph [
149−34:10 tight lit ~
153+35:10 tight lit ~
150−34:12 name value
154+35:12 name value
151−34:17 tight glyph ]
155+35:17 tight glyph ]
152−34:19 name value
156+35:19 name value
153−36:1 DEDENT
157+37:1 DEDENT
154−36:1 DEDENT
158+37:1 DEDENT
155−36:1 DEDENT
159+37:1 DEDENT
156−36:1 DEDENT
160+37:1 DEDENT
157−36:1 NEWLINE
161+37:1 NEWLINE
158−36:1 glyph ++
162+37:1 glyph ++
159−36:4 name need
163+37:4 name need
160−36:9 glyph |=
164+37:9 glyph |=
161−36:12 name maybe
165+37:12 name maybe
162−36:17 tight glyph =
166+37:17 tight glyph =
163−36:18 tight glyph (
167+37:18 tight glyph (
164−36:19 tight name unit
168+37:19 tight name unit
165−36:24 tvar A
169+37:24 tvar A
166−36:25 tight glyph )
170+37:25 tight glyph )
167−37:3 INDENT
171+38:3 INDENT
168−37:3 glyph ?-
172+38:3 glyph ?-
169−37:6 name maybe
173+38:6 name maybe
170−38:5 INDENT
174+39:5 INDENT
171−38:5 lit ~
175+39:5 lit ~
172−38:7 glyph !!
176+39:7 glyph !!
173−39:5 NEWLINE
177+40:5 NEWLINE
174−39:5 glyph [
178+40:5 glyph [
175−39:6 tight lit ~
179+40:6 tight lit ~
176−39:8 name value
180+40:8 name value
177−39:13 tight glyph ]
181+40:13 tight glyph ]
178−39:15 name value
182+40:15 name value
179−41:1 DEDENT
183+42:1 DEDENT
180−41:1 DEDENT
184+42:1 DEDENT
181−41:1 NEWLINE
185+42:1 NEWLINE
182−41:1 glyph ++
186+42:1 glyph ++
183−41:4 name weld
187+42:4 name weld
184−41:9 glyph |=
188+42:9 glyph |=
185−41:12 name args
189+42:12 name args
186−41:16 tight glyph =
190+42:16 tight glyph =
187−41:17 tight glyph [
191+42:17 tight glyph [
188−41:18 tight glyph (
192+42:18 tight glyph (
189−41:19 tight name list
193+42:19 tight name list
190−41:24 tvar A
194+42:24 tvar A
191−41:25 tight glyph )
195+42:25 tight glyph )
192−41:27 glyph (
196+42:27 glyph (
193−41:28 tight name list
197+42:28 tight name list
194−41:33 tvar A
198+42:33 tvar A
195−41:34 tight glyph )
199+42:34 tight glyph )
196−41:35 tight glyph ]
200+42:35 tight glyph ]
197−42:3 INDENT
201+43:3 INDENT
198−42:3 glyph ?-
202+43:3 glyph ?-
199−42:6 name args
203+43:6 name args
200−43:5 INDENT
204+44:5 INDENT
201−43:5 glyph [
205+44:5 glyph [
202−43:6 tight name xs
206+44:6 tight name xs
203−43:9 name ys
207+44:9 name ys
204−43:11 tight glyph ]
208+44:11 tight glyph ]
205−44:7 INDENT
209+45:7 INDENT
206−44:7 glyph ^-
210+45:7 glyph ^-
207−44:10 glyph (
211+45:10 glyph (
208−44:11 tight name list
212+45:11 tight name list
209−44:16 tvar A
213+45:16 tvar A
210−44:17 tight glyph )
214+45:17 tight glyph )
211−45:9 INDENT
215+46:9 INDENT
212−45:9 glyph ?-
216+46:9 glyph ?-
213−45:12 name xs
217+46:12 name xs
214−46:11 INDENT
218+47:11 INDENT
215−46:11 lit ~
219+47:11 lit ~
216−46:13 name ys
220+47:13 name ys
217−47:11 NEWLINE
221+48:11 NEWLINE
218−47:11 glyph [
222+48:11 glyph [
219−47:12 tight name item
223+48:12 tight name item
220−47:17 name rest
224+48:17 name rest
221−47:21 tight glyph ]
225+48:21 tight glyph ]
222−47:23 glyph [
226+48:23 glyph [
223−47:24 tight name item
227+48:24 tight name item
224−47:29 glyph (
228+48:29 glyph (
225−47:30 tight name weld
229+48:30 tight name weld
226−47:35 name rest
230+48:35 name rest
227−47:40 name ys
231+48:40 name ys
228−47:42 tight glyph )
232+48:42 tight glyph )
229−47:43 tight glyph ]
233+48:43 tight glyph ]
230−49:1 DEDENT
234+50:1 DEDENT
231−49:1 DEDENT
235+50:1 DEDENT
232−49:1 DEDENT
236+50:1 DEDENT
233−49:1 DEDENT
237+50:1 DEDENT
234−49:1 DEDENT
238+50:1 DEDENT
235−49:1 NEWLINE
239+50:1 NEWLINE
236−49:1 glyph ++
240+50:1 glyph ++
237−49:4 name turn
241+50:4 name turn
238−49:9 glyph |=
242+50:9 glyph |=
239−49:12 name args
243+50:12 name args
240−49:16 tight glyph =
244+50:16 tight glyph =
241−49:17 tight glyph [
245+50:17 tight glyph [
242−49:18 tight glyph (
246+50:18 tight glyph (
243−49:19 tight name list
247+50:19 tight name list
244−49:24 tvar A
248+50:24 tvar A
245−49:25 tight glyph )
249+50:25 tight glyph )
246−49:27 glyph $-(
250+50:27 glyph $-(
247−49:30 tight tvar A
251+50:30 tight tvar A
248−49:32 tvar B
252+50:32 tvar B
249−49:33 tight glyph )
253+50:33 tight glyph )
250−49:34 tight glyph ]
254+50:34 tight glyph ]
251−50:3 INDENT
255+51:3 INDENT
252−50:3 glyph ?-
256+51:3 glyph ?-
253−50:6 name args
257+51:6 name args
254−51:5 INDENT
258+52:5 INDENT
255−51:5 glyph [
259+52:5 glyph [
256−51:6 tight name xs
260+52:6 tight name xs
257−51:9 name f
261+52:9 name f
258−51:10 tight glyph ]
262+52:10 tight glyph ]
259−52:7 INDENT
263+53:7 INDENT
260−52:7 glyph ^-
264+53:7 glyph ^-
261−52:10 glyph (
265+53:10 glyph (
262−52:11 tight name list
266+53:11 tight name list
263−52:16 tvar B
267+53:16 tvar B
264−52:17 tight glyph )
268+53:17 tight glyph )
265−53:9 INDENT
269+54:9 INDENT
266−53:9 glyph ?-
270+54:9 glyph ?-
267−53:12 name xs
271+54:12 name xs
268−54:11 INDENT
272+55:11 INDENT
269−54:11 lit ~
273+55:11 lit ~
270−54:13 lit ~
274+55:13 lit ~
271−55:11 NEWLINE
275+56:11 NEWLINE
272−55:11 glyph [
276+56:11 glyph [
273−55:12 tight name item
277+56:12 tight name item
274−55:17 name rest
278+56:17 name rest
275−55:21 tight glyph ]
279+56:21 tight glyph ]
276−55:23 glyph [
280+56:23 glyph [
277−55:24 tight glyph (
281+56:24 tight glyph (
278−55:25 tight name f
282+56:25 tight name f
279−55:27 name item
283+56:27 name item
280−55:31 tight glyph )
284+56:31 tight glyph )
281−55:33 glyph (
285+56:33 glyph (
282−55:34 tight name turn
286+56:34 tight name turn
283−55:39 name rest
287+56:39 name rest
284−55:44 name f
288+56:44 name f
285−55:45 tight glyph )
289+56:45 tight glyph )
286−55:46 tight glyph ]
290+56:46 tight glyph ]
287−57:1 DEDENT
291+58:1 DEDENT
288−57:1 DEDENT
292+58:1 DEDENT
289−57:1 DEDENT
293+58:1 DEDENT
290−57:1 DEDENT
294+58:1 DEDENT
291−57:1 DEDENT
295+58:1 DEDENT
292−57:1 NEWLINE
296+58:1 NEWLINE
293−57:1 glyph +$
297+58:1 glyph +$
294−57:4 name dime
298+58:4 name dime
295−57:9 glyph [
299+58:9 glyph [
296−57:10 tight name p
300+58:10 tight name p
297−57:11 tight glyph =
301+58:11 tight glyph =
298−57:12 tight aura @ta
302+58:12 tight aura @ta
299−57:16 name q
303+58:16 name q
300−57:17 tight glyph =
304+58:17 tight glyph =
301−57:18 tight aura @
305+58:18 tight aura @
302−57:19 tight glyph ]
306+58:19 tight glyph ]
303−59:1 NEWLINE
307+60:1 NEWLINE
304−59:1 glyph +$
308+60:1 glyph +$
305−59:4 name hair
309+60:4 name hair
306−59:9 glyph [
310+60:9 glyph [
307−59:10 tight name p
311+60:10 tight name p
308−59:11 tight glyph =
312+60:11 tight glyph =
309−59:12 tight aura @ud
313+60:12 tight aura @ud
310−59:16 name q
314+60:16 name q
311−59:17 tight glyph =
315+60:17 tight glyph =
312−59:18 tight aura @ud
316+60:18 tight aura @ud
313−59:21 tight glyph ]
317+60:21 tight glyph ]
314−61:1 NEWLINE
318+62:1 NEWLINE
315−61:1 glyph +$
319+62:1 glyph +$
316−61:4 name pint
320+62:4 name pint
317−61:9 glyph [
321+62:9 glyph [
318−61:10 tight name p
322+62:10 tight name p
319−61:11 tight glyph =
323+62:11 tight glyph =
320−61:12 tight glyph [
324+62:12 tight glyph [
321−61:13 tight name p
325+62:13 tight name p
322−61:14 tight glyph =
326+62:14 tight glyph =
323−61:15 tight aura @
327+62:15 tight aura @
324−61:17 name q
328+62:17 name q
325−61:18 tight glyph =
329+62:18 tight glyph =
326−61:19 tight aura @
330+62:19 tight aura @
327−61:20 tight glyph ]
331+62:20 tight glyph ]
328−61:22 name q
332+62:22 name q
329−61:23 tight glyph =
333+62:23 tight glyph =
330−61:24 tight glyph [
334+62:24 tight glyph [
331−61:25 tight name p
335+62:25 tight name p
332−61:26 tight glyph =
336+62:26 tight glyph =
333−61:27 tight aura @
337+62:27 tight aura @
334−61:29 name q
338+62:29 name q
335−61:30 tight glyph =
339+62:30 tight glyph =
336−61:31 tight aura @
340+62:31 tight aura @
337−61:32 tight glyph ]
341+62:32 tight glyph ]
338−61:33 tight glyph ]
342+62:33 tight glyph ]
339−63:1 NEWLINE
343+64:1 NEWLINE
340−63:1 glyph +$
344+64:1 glyph +$
341−63:4 name coin
345+64:4 name coin
342−64:3 INDENT
346+65:3 INDENT
343−64:3 glyph [
344−64:4 tight lit %$
345−64:7 name p
346−64:8 tight glyph =
347−64:9 tight name dime
348−64:13 tight glyph ]
349−65:3 NEWLINE
35065:3 glyph [
34765:3 glyph [
351−65:4 tight lit %blob
348+65:4 tight lit %$
352−65:10 name p
349+65:7 name p
353−65:11 tight glyph =
350+65:8 tight glyph =
354−65:12 tight glyph *
351+65:9 tight name dime
35565:13 tight glyph ]
35265:13 tight glyph ]
35666:3 NEWLINE
35366:3 NEWLINE
35766:3 glyph [
35466:3 glyph [
358−66:4 tight lit %many
355+66:4 tight lit %blob
35966:10 name p
35666:10 name p
36066:11 tight glyph =
35766:11 tight glyph =
361−66:12 tight glyph (
358+66:12 tight glyph *
362−66:13 tight name list
359+66:13 tight glyph ]
360+67:3 NEWLINE
361+67:3 glyph [
362+67:4 tight lit %many
363+67:10 name p
364+67:11 tight glyph =
365+67:12 tight glyph (
366+67:13 tight name list
363−66:18 name coin
367+67:18 name coin
364−66:22 tight glyph )
368+67:22 tight glyph )
365−66:23 tight glyph ]
369+67:23 tight glyph ]
366−68:1 DEDENT
370+69:1 DEDENT
367−68:1 NEWLINE
371+69:1 NEWLINE
368−68:1 glyph +$
372+69:1 glyph +$
369−68:4 name pair
373+69:4 name pair
370−68:9 glyph |$
374+69:9 glyph |$
371−68:12 glyph [
375+69:12 glyph [
372−68:13 tight tvar A
376+69:13 tight tvar A
373−68:15 tvar B
377+69:15 tvar B
374−68:16 tight glyph ]
378+69:16 tight glyph ]
375−68:18 glyph [
379+69:18 glyph [
376−68:19 tight name p
380+69:19 tight name p
377−68:20 tight glyph =
381+69:20 tight glyph =
378−68:21 tight tvar A
382+69:21 tight tvar A
379−68:23 name q
383+69:23 name q
380−68:24 tight glyph =
384+69:24 tight glyph =
381−68:25 tight tvar B
385+69:25 tight tvar B
382−68:26 tight glyph ]
386+69:26 tight glyph ]
383−70:1 NEWLINE
387+71:1 NEWLINE
384−70:1 glyph +$
388+71:1 glyph +$
385−70:4 name trel
389+71:4 name trel
386−70:9 glyph |$
390+71:9 glyph |$
387−70:12 glyph [
391+71:12 glyph [
388−70:13 tight tvar A
392+71:13 tight tvar A
389−70:15 tvar B
393+71:15 tvar B
390−70:17 tvar C
394+71:17 tvar C
391−70:18 tight glyph ]
395+71:18 tight glyph ]
392−70:20 glyph [
396+71:20 glyph [
393−70:21 tight name p
397+71:21 tight name p
394−70:22 tight glyph =
398+71:22 tight glyph =
395−70:23 tight tvar A
399+71:23 tight tvar A
396−70:25 name q
400+71:25 name q
397−70:26 tight glyph =
401+71:26 tight glyph =
398−70:27 tight tvar B
402+71:27 tight tvar B
399−70:29 name r
403+71:29 name r
400−70:30 tight glyph =
404+71:30 tight glyph =
401−70:31 tight tvar C
405+71:31 tight tvar C
402−70:32 tight glyph ]
406+71:32 tight glyph ]
403−72:1 NEWLINE
407+73:1 NEWLINE
404−72:1 glyph +$
408+73:1 glyph +$
405−72:4 name qual
409+73:4 name qual
406−72:9 glyph |$
410+73:9 glyph |$
407−72:12 glyph [
411+73:12 glyph [
408−72:13 tight tvar A
412+73:13 tight tvar A
409−72:15 tvar B
413+73:15 tvar B
410−72:17 tvar C
414+73:17 tvar C
411−72:19 tvar D
415+73:19 tvar D
412−72:20 tight glyph ]
416+73:20 tight glyph ]
413−72:22 glyph [
417+73:22 glyph [
414−72:23 tight name p
418+73:23 tight name p
415−72:24 tight glyph =
419+73:24 tight glyph =
416−72:25 tight tvar A
420+73:25 tight tvar A
417−72:27 name q
421+73:27 name q
418−72:28 tight glyph =
422+73:28 tight glyph =
419−72:29 tight tvar B
423+73:29 tight tvar B
420−72:31 name r
424+73:31 name r
421−72:32 tight glyph =
425+73:32 tight glyph =
422−72:33 tight tvar C
426+73:33 tight tvar C
423−72:35 name s
427+73:35 name s
424−72:36 tight glyph =
428+73:36 tight glyph =
425−72:37 tight tvar D
429+73:37 tight tvar D
426−72:38 tight glyph ]
430+73:38 tight glyph ]
427−74:1 NEWLINE
431+75:1 NEWLINE
428−74:1 glyph +$
432+75:1 glyph +$
429−74:4 name cord
433+75:4 name cord
430−74:9 aura @t
434+75:9 aura @t
431−76:1 NEWLINE
435+77:1 NEWLINE
432−76:1 glyph +$
436+77:1 glyph +$
433−76:4 name knot
437+77:4 name knot
434−76:9 aura @ta
438+77:9 aura @ta
435−78:1 NEWLINE
439+79:1 NEWLINE
436−78:1 glyph +$
440+79:1 glyph +$
437−78:4 name tape
441+79:4 name tape
438−78:9 glyph (
442+79:9 glyph (
439−78:10 tight name list
443+79:10 tight name list
440−78:15 aura @tD
444+79:15 aura @tD
441−78:18 tight glyph )
445+79:18 tight glyph )
442−80:1 NEWLINE
446+81:1 NEWLINE
443−80:1 glyph +$
447+81:1 glyph +$
444−80:4 name path
448+81:4 name path
445−80:9 glyph (
449+81:9 glyph (
446−80:10 tight name list
450+81:10 tight name list
447−80:15 name knot
451+81:15 name knot
448−80:19 tight glyph )
452+81:19 tight glyph )
449−82:1 NEWLINE
453+83:1 NEWLINE
450−82:1 glyph +$
454+83:1 glyph +$
451−82:4 name tank
455+83:4 name tank
452−83:3 INDENT
456+84:3 INDENT
453−83:3 name cord
454−84:3 NEWLINE
455−84:3 glyph [
456−84:4 tight lit %leaf
457−84:10 name p
457+84:3 name cord
458−84:11 tight glyph =
459−84:12 tight name tape
460−84:16 tight glyph ]
46185:3 NEWLINE
45885:3 NEWLINE
46285:3 glyph [
45985:3 glyph [
463−85:4 tight lit %palm
460+85:4 tight lit %leaf
46485:10 name p
46185:10 name p
46585:11 tight glyph =
46285:11 tight glyph =
466−85:12 tight glyph (
463+85:12 tight name tape
467−85:13 tight name qual
468−85:18 name tape
469−85:23 name tape
470−85:28 name tape
471−85:33 name tape
472−85:37 tight glyph )
473−85:39 name q
474−85:40 tight glyph =
475−85:41 tight glyph (
476−85:42 tight name list
477−85:47 name tank
478−85:51 tight glyph )
479−85:52 tight glyph ]
464+85:16 tight glyph ]
48086:3 NEWLINE
46586:3 NEWLINE
48186:3 glyph [
46686:3 glyph [
482−86:4 tight lit %rose
467+86:4 tight lit %palm
48386:10 name p
46886:10 name p
48486:11 tight glyph =
46986:11 tight glyph =
48586:12 tight glyph (
47086:12 tight glyph (
486−86:13 tight name trel
471+86:13 tight name qual
48786:18 name tape
47286:18 name tape
48886:23 name tape
47386:23 name tape
48986:28 name tape
47486:28 name tape
475+86:33 name tape
490−86:32 tight glyph )
476+86:37 tight glyph )
477+86:39 name q
478+86:40 tight glyph =
479+86:41 tight glyph (
480+86:42 tight name list
481+86:47 name tank
482+86:51 tight glyph )
483+86:52 tight glyph ]
484+87:3 NEWLINE
485+87:3 glyph [
486+87:4 tight lit %rose
487+87:10 name p
488+87:11 tight glyph =
489+87:12 tight glyph (
490+87:13 tight name trel
491+87:18 name tape
492+87:23 name tape
493+87:28 name tape
494+87:32 tight glyph )
491−86:34 name q
495+87:34 name q
492−86:35 tight glyph =
496+87:35 tight glyph =
493−86:36 tight glyph (
497+87:36 tight glyph (
494−86:37 tight name list
498+87:37 tight name list
495−86:42 name tank
499+87:42 name tank
496−86:46 tight glyph )
500+87:46 tight glyph )
497−86:47 tight glyph ]
501+87:47 tight glyph ]
498−88:1 DEDENT
502+89:1 DEDENT
499−88:1 NEWLINE
503+89:1 NEWLINE
500−88:1 glyph +$
504+89:1 glyph +$
501−88:4 name nail
505+89:4 name nail
502−88:9 glyph [
506+89:9 glyph [
503−88:10 tight name p
507+89:10 tight name p
504−88:11 tight glyph =
508+89:11 tight glyph =
505−88:12 tight name hair
509+89:12 tight name hair
506−88:17 name q
510+89:17 name q
507−88:18 tight glyph =
511+89:18 tight glyph =
508−88:19 tight name tape
512+89:19 tight name tape
509−88:23 tight glyph ]
513+89:23 tight glyph ]
510−90:1 NEWLINE
514+91:1 NEWLINE
511−90:1 glyph +$
515+91:1 glyph +$
512−90:4 name edge
516+91:4 name edge
513−90:9 glyph [
517+91:9 glyph [
514−90:10 tight name p
518+91:10 tight name p
515−90:11 tight glyph =
519+91:11 tight glyph =
516−90:12 tight name hair
520+91:12 tight name hair
517−90:17 name q
521+91:17 name q
518−90:18 tight glyph =
522+91:18 tight glyph =
519−90:19 tight glyph (
523+91:19 tight glyph (
520−90:20 tight name unit
524+91:20 tight name unit
521−90:25 glyph [
525+91:25 glyph [
522−90:26 tight name p
526+91:26 tight name p
523−90:27 tight glyph =
527+91:27 tight glyph =
524−90:28 tight glyph *
528+91:28 tight glyph *
525−90:30 name q
529+91:30 name q
526−90:31 tight glyph =
530+91:31 tight glyph =
527−90:32 tight name nail
531+91:32 tight name nail
528−90:36 tight glyph ]
532+91:36 tight glyph ]
529−90:37 tight glyph )
533+91:37 tight glyph )
530−90:38 tight glyph ]
534+91:38 tight glyph ]
531−92:1 NEWLINE
535+93:1 NEWLINE
532−92:1 glyph +$
536+93:1 glyph +$
533−92:4 name rule
537+93:4 name rule
534−92:9 glyph $-(
538+93:9 glyph $-(
535−92:12 tight name nail
539+93:12 tight name nail
536−92:17 name edge
540+93:17 name edge
537−92:21 tight glyph )
541+93:21 tight glyph )
538−94:1 NEWLINE
542+95:1 NEWLINE
539−94:1 glyph +$
543+95:1 glyph +$
540−94:4 name spot
544+95:4 name spot
541−94:9 glyph [
545+95:9 glyph [
542−94:10 tight name p
546+95:10 tight name p
543−94:11 tight glyph =
547+95:11 tight glyph =
544−94:12 tight name path
548+95:12 tight name path
545−94:17 name q
549+95:17 name q
546−94:18 tight glyph =
550+95:18 tight glyph =
547−94:19 tight name pint
551+95:19 tight name pint
548−94:23 tight glyph ]
552+95:23 tight glyph ]
549−96:1 NEWLINE
553+97:1 NEWLINE
550−96:1 glyph +$
554+97:1 glyph +$
551−96:4 name toon
555+97:4 name toon
552−97:3 INDENT
556+98:3 INDENT
553−97:3 glyph [
554−97:4 tight lit %0
555−97:7 name p
556−97:8 tight glyph =
557−97:9 tight glyph *
558−97:10 tight glyph ]
559−98:3 NEWLINE
56098:3 glyph [
55798:3 glyph [
561−98:4 tight lit %1
558+98:4 tight lit %0
56298:7 name p
55998:7 name p
56398:8 tight glyph =
56098:8 tight glyph =
56498:9 tight glyph *
56198:9 tight glyph *
56598:10 tight glyph ]
56298:10 tight glyph ]
56699:3 NEWLINE
56399:3 NEWLINE
56799:3 glyph [
56499:3 glyph [
568−99:4 tight lit %2
565+99:4 tight lit %1
56999:7 name p
56699:7 name p
57099:8 tight glyph =
56799:8 tight glyph =
571−99:9 tight glyph (
568+99:9 tight glyph *
572−99:10 tight name list
569+99:10 tight glyph ]
570+100:3 NEWLINE
571+100:3 glyph [
572+100:4 tight lit %2
573+100:7 name p
574+100:8 tight glyph =
575+100:9 tight glyph (
576+100:10 tight name list
573−99:15 name tank
577+100:15 name tank
574−99:19 tight glyph )
578+100:19 tight glyph )
575−99:20 tight glyph ]
579+100:20 tight glyph ]
576−101:1 DEDENT
580+102:1 DEDENT
577−101:1 NEWLINE
581+102:1 NEWLINE
578−101:1 glyph +$
582+102:1 glyph +$
579−101:4 name like
583+102:4 name like
580−101:9 glyph |$
584+102:9 glyph |$
581−101:12 glyph [
585+102:12 glyph [
582−101:13 tight tvar A
586+102:13 tight tvar A
583−101:14 tight glyph ]
587+102:14 tight glyph ]
584−101:16 glyph [
588+102:16 glyph [
585−101:17 tight name p
589+102:17 tight name p
586−101:18 tight glyph =
590+102:18 tight glyph =
587−101:19 tight name hair
591+102:19 tight name hair
588−101:24 name q
592+102:24 name q
589−101:25 tight glyph =
593+102:25 tight glyph =
590−101:26 tight glyph (
594+102:26 tight glyph (
591−101:27 tight name unit
595+102:27 tight name unit
592−101:32 glyph [
596+102:32 glyph [
593−101:33 tight name p
597+102:33 tight name p
594−101:34 tight glyph =
598+102:34 tight glyph =
595−101:35 tight tvar A
599+102:35 tight tvar A
596−101:37 name q
600+102:37 name q
597−101:38 tight glyph =
601+102:38 tight glyph =
598−101:39 tight name nail
602+102:39 tight name nail
599−101:43 tight glyph ]
603+102:43 tight glyph ]
600−101:44 tight glyph )
604+102:44 tight glyph )
601−101:45 tight glyph ]
605+102:45 tight glyph ]
602−103:1 NEWLINE
606+104:1 NEWLINE
603−103:1 glyph ++
607+104:1 glyph ++
604−103:4 name wonk
608+104:4 name like
605−103:9 glyph |=
609+104:9 glyph |=
606−103:12 name veq
607−103:15 tight glyph =
610+104:12 glyph [
608−103:16 tight glyph (
609−103:17 tight name like
611+104:13 tight name f
610−103:22 tvar A
611−103:23 tight glyph )
612+104:14 tight glyph =
612−104:3 INDENT
613−104:3 glyph ?-
614−104:6 wing q.veq
615−105:5 INDENT
616−105:5 lit ~
617−105:7 glyph !!
618−106:5 NEWLINE
619−106:5 glyph [
620−106:6 tight lit ~
621−106:8 name product
622−106:15 tight glyph ]
613+104:15 tight glyph $-(
623−106:17 wing p.product
624−108:1 DEDENT
625−108:1 DEDENT
626−108:1 NEWLINE
627−108:1 glyph +$
628−108:4 name lone
629−108:9 glyph |$
630−108:12 glyph [
631−108:13 tight tvar A
632−108:14 tight glyph ]
633−108:16 glyph [
634−108:17 tight name p
635−108:18 tight glyph =
614+104:18 tight tvar A
636−108:19 tight tvar A
615+104:20 tvar B
637−108:20 tight glyph ]
638−110:1 NEWLINE
639−110:1 glyph +$
640−110:4 name lest
641−110:9 glyph |$
642−110:12 glyph [
643−110:13 tight tvar A
644−110:14 tight glyph ]
616+104:21 tight glyph )
645−110:16 glyph [
617+104:23 name result
646−110:17 tight name i
647−110:18 tight glyph =
618+104:29 tight glyph =
648−110:19 tight tvar A
649−110:21 name t
650−110:22 tight glyph =
651−110:23 tight glyph (
652−110:24 tight name list
653−110:29 tvar A
654−110:30 tight glyph )
619+104:30 tight glyph (
655−110:31 tight glyph ]
620+104:31 tight name like
621+104:36 tvar A
622+104:37 tight glyph )
623+104:38 tight glyph ]
624+105:3 INDENT
625+105:3 glyph ++
626+105:6 name mapped
627+106:5 INDENT
628+106:5 glyph ^-
629+106:8 glyph (
630+106:9 tight name unit
631+106:14 glyph [
632+106:15 tight name p
633+106:16 tight glyph =
634+106:17 tight tvar B
635+106:19 name q
636+106:20 tight glyph =
637+106:21 tight name nail
638+106:25 tight glyph ]
639+106:26 tight glyph )
640+107:7 INDENT
641+107:7 glyph ?-
642+107:10 wing q.result
643+108:9 INDENT
644+108:9 lit ~
645+108:11 lit ~
646+109:9 NEWLINE
647+109:9 glyph [
648+109:10 tight lit ~
649+109:12 name value
650+109:17 tight glyph ]
651+109:19 glyph `
652+109:20 tight glyph [
653+109:21 tight name p
654+109:22 tight glyph =
655+109:23 tight glyph (
656+109:24 tight name f
657+109:26 wing p.value
658+109:33 tight glyph )
659+109:35 name q
660+109:36 tight glyph =
661+109:37 tight wing q.value
662+109:44 tight glyph ]
663+110:3 DEDENT
664+110:3 DEDENT
665+110:3 DEDENT
666+110:3 NEWLINE
667+110:3 glyph ^-
668+110:6 glyph (
669+110:7 tight name like
670+110:12 tvar B
671+110:13 tight glyph )
672+110:15 glyph [
673+110:16 tight name p
674+110:17 tight glyph =
675+110:18 tight wing p.result
676+110:27 name q
677+110:28 tight glyph =
678+110:29 tight name mapped
679+110:35 tight glyph ]
680+112:1 DEDENT
656112:1 NEWLINE
681112:1 NEWLINE
657−112:1 glyph +$
682+112:1 glyph ++
658−112:4 name pole
683+112:4 name wonk
659−112:9 glyph |$
684+112:9 glyph |=
660−112:12 glyph [
685+112:12 name veq
686+112:15 tight glyph =
687+112:16 tight glyph (
661−112:13 tight tvar A
688+112:17 tight name like
689+112:22 tvar A
662−112:14 tight glyph ]
690+112:23 tight glyph )
663113:3 INDENT
691113:3 INDENT
664−113:3 lit ~
692+113:3 glyph ?-
665−114:3 NEWLINE
693+113:6 wing q.veq
666−114:3 glyph [
694+114:5 INDENT
667−114:4 tight tvar A
695+114:5 lit ~
668−114:6 glyph (
669−114:7 tight name pole
670−114:12 tvar A
671−114:13 tight glyph )
696+114:7 glyph !!
672−114:14 tight glyph ]
673−116:1 DEDENT
674−116:1 NEWLINE
697+115:5 NEWLINE
675−116:1 glyph +$
676−116:4 name quip
677−116:9 glyph |$
678−116:12 glyph [
679−116:13 tight tvar A
680−116:15 tvar B
681−116:16 tight glyph ]
682−116:18 glyph [
698+115:5 glyph [
683−116:19 tight glyph (
699+115:6 tight lit ~
684−116:20 tight name list
685−116:25 tvar A
686−116:26 tight glyph )
687−116:28 tvar B
688−116:29 tight glyph ]
689−118:1 NEWLINE
690−118:1 glyph +$
691−118:4 name tree
692−118:9 glyph |$
693−118:12 glyph [
694−118:13 tight tvar A
695−118:14 tight glyph ]
696−119:3 INDENT
697−119:3 lit ~
698−120:3 NEWLINE
699−120:3 glyph [
700−120:4 tight name n
701−120:5 tight glyph =
702−120:6 tight tvar A
703−120:8 name l
700+115:8 name product
701+115:15 tight glyph ]
702+115:17 wing p.product
703+117:1 DEDENT
704+117:1 DEDENT
705+117:1 NEWLINE
706+117:1 glyph +$
707+117:4 name lone
708+117:9 glyph |$
709+117:12 glyph [
710+117:13 tight tvar A
711+117:14 tight glyph ]
712+117:16 glyph [
713+117:17 tight name p
704−120:9 tight glyph =
714+117:18 tight glyph =
705−120:10 tight glyph (
715+117:19 tight tvar A
706−120:11 tight name tree
716+117:20 tight glyph ]
717+119:1 NEWLINE
718+119:1 glyph +$
719+119:4 name lest
720+119:9 glyph |$
721+119:12 glyph [
707−120:16 tvar A
722+119:13 tight tvar A
708−120:17 tight glyph )
723+119:14 tight glyph ]
709−120:19 name r
724+119:16 glyph [
725+119:17 tight name i
710−120:20 tight glyph =
726+119:18 tight glyph =
711−120:21 tight glyph (
727+119:19 tight tvar A
728+119:21 name t
712−120:22 tight name tree
729+119:22 tight glyph =
730+119:23 tight glyph (
731+119:24 tight name list
713−120:27 tvar A
732+119:29 tvar A
714−120:28 tight glyph )
733+119:30 tight glyph )
715−120:29 tight glyph ]
734+119:31 tight glyph ]
716−122:1 DEDENT
717−122:1 NEWLINE
735+121:1 NEWLINE
718−122:1 glyph +$
736+121:1 glyph +$
719−122:4 name each
737+121:4 name pole
720−122:9 glyph |$
738+121:9 glyph |$
721−122:12 glyph [
739+121:12 glyph [
722−122:13 tight tvar A
740+121:13 tight tvar A
723−122:15 tvar B
741+121:14 tight glyph ]
724−122:16 tight glyph ]
742+122:3 INDENT
725−123:3 INDENT
743+122:3 lit ~
744+123:3 NEWLINE
726123:3 glyph [
745123:3 glyph [
727−123:4 tight lit %|
746+123:4 tight tvar A
747+123:6 glyph (
748+123:7 tight name pole
749+123:12 tvar A
750+123:13 tight glyph )
751+123:14 tight glyph ]
752+125:1 DEDENT
753+125:1 NEWLINE
754+125:1 glyph +$
755+125:4 name quip
756+125:9 glyph |$
757+125:12 glyph [
758+125:13 tight tvar A
759+125:15 tvar B
760+125:16 tight glyph ]
761+125:18 glyph [
762+125:19 tight glyph (
763+125:20 tight name list
764+125:25 tvar A
765+125:26 tight glyph )
766+125:28 tvar B
767+125:29 tight glyph ]
768+127:1 NEWLINE
769+127:1 glyph +$
770+127:4 name tree
771+127:9 glyph |$
772+127:12 glyph [
773+127:13 tight tvar A
774+127:14 tight glyph ]
775+128:3 INDENT
776+128:3 lit ~
777+129:3 NEWLINE
778+129:3 glyph [
779+129:4 tight name n
780+129:5 tight glyph =
781+129:6 tight tvar A
782+129:8 name l
783+129:9 tight glyph =
784+129:10 tight glyph (
785+129:11 tight name tree
786+129:16 tvar A
787+129:17 tight glyph )
788+129:19 name r
789+129:20 tight glyph =
790+129:21 tight glyph (
791+129:22 tight name tree
792+129:27 tvar A
793+129:28 tight glyph )
794+129:29 tight glyph ]
795+131:1 DEDENT
796+131:1 NEWLINE
797+131:1 glyph +$
798+131:4 name each
799+131:9 glyph |$
800+131:12 glyph [
801+131:13 tight tvar A
802+131:15 tvar B
803+131:16 tight glyph ]
804+132:3 INDENT
805+132:3 glyph [
806+132:4 tight lit %|
728−123:7 name p
807+132:7 name p
729−123:8 tight glyph =
808+132:8 tight glyph =
730−123:9 tight tvar B
809+132:9 tight tvar B
731−123:10 tight glyph ]
810+132:10 tight glyph ]
732−124:3 NEWLINE
811+133:3 NEWLINE
733−124:3 glyph [
812+133:3 glyph [
734−124:4 tight lit %&
813+133:4 tight lit %&
735−124:7 name p
814+133:7 name p
736−124:8 tight glyph =
815+133:8 tight glyph =
737−124:9 tight tvar A
816+133:9 tight tvar A
738−124:10 tight glyph ]
817+133:10 tight glyph ]
739−126:1 DEDENT
818+135:1 DEDENT
740−126:1 NEWLINE
819+135:1 NEWLINE
741−126:1 glyph +$
820+135:1 glyph +$
742−126:4 name bloq
821+135:4 name bloq
743−126:9 aura @
822+135:9 aura @
744−128:1 NEWLINE
745−128:1 glyph ++
746−128:4 name some
747−128:9 glyph |=
748−128:12 name item
749−128:16 tight glyph =
750−128:17 tight tvar A
751−128:19 glyph `
752−128:20 tight name item
753−130:1 NEWLINE
754−130:1 glyph ++
755−130:4 name lure
756−130:9 glyph |=
757−130:12 name item
758−130:16 tight glyph =
759−130:17 tight tvar A
760−131:3 INDENT
761−131:3 glyph ^-
762−131:6 glyph (
763−131:7 tight name list
764−131:12 tvar A
765−131:13 tight glyph )
766−131:15 glyph [
767−131:16 tight name item
768−131:21 lit ~
769−131:22 tight glyph ]
770−133:1 DEDENT
771−133:1 NEWLINE
772−133:1 glyph ++
773−133:4 name snoc
774−133:9 glyph |=
775−133:12 name args
776−133:16 tight glyph =
777−133:17 tight glyph [
778−133:18 tight glyph (
779−133:19 tight name list
780−133:24 tvar A
781−133:25 tight glyph )
782−133:27 tvar A
783−133:28 tight glyph ]
784−134:3 INDENT
785−134:3 glyph ?-
786−134:6 name args
787−135:5 INDENT
788−135:5 glyph [
789−135:6 tight name xs
790−135:9 name item
791−135:13 tight glyph ]
792−135:15 glyph (
793−135:16 tight name weld
794−135:21 name xs
795−135:24 glyph [
796−135:25 tight name item
797−135:30 lit ~
798−135:31 tight glyph ]
799−135:32 tight glyph )
800−137:1 DEDENT
801−137:1 DEDENT
802137:1 NEWLINE
823137:1 NEWLINE
803137:1 glyph ++
824137:1 glyph ++
804−137:4 name flop
825+137:4 name some
805137:9 glyph |=
826137:9 glyph |=
806−137:12 name xs
827+137:12 name item
807−137:14 tight glyph =
828+137:16 tight glyph =
808−137:15 tight glyph (
829+137:17 tight tvar A
830+137:19 glyph `
831+137:20 tight name item
832+139:1 NEWLINE
833+139:1 glyph ++
834+139:4 name lure
835+139:9 glyph |=
836+139:12 name item
837+139:16 tight glyph =
838+139:17 tight tvar A
839+140:3 INDENT
840+140:3 glyph ^-
841+140:6 glyph (
809−137:16 tight name list
842+140:7 tight name list
810−137:21 tvar A
843+140:12 tvar A
844+140:13 tight glyph )
845+140:15 glyph [
846+140:16 tight name item
847+140:21 lit ~
811−137:22 tight glyph )
848+140:22 tight glyph ]
812−138:3 INDENT
849+142:1 DEDENT
850+142:1 NEWLINE
813−138:3 glyph ++
851+142:1 glyph ++
814−138:6 name reverse-into
852+142:4 name snoc
815−138:19 glyph |=
853+142:9 glyph |=
816−138:22 name args
854+142:12 name args
817−138:26 tight glyph =
855+142:16 tight glyph =
818−138:27 tight glyph [
856+142:17 tight glyph [
857+142:18 tight glyph (
858+142:19 tight name list
859+142:24 tvar A
860+142:25 tight glyph )
861+142:27 tvar A
819−138:28 tight glyph (
862+142:28 tight glyph ]
820−138:29 tight name list
821−138:34 tvar A
822−138:35 tight glyph )
823−138:37 glyph (
824−138:38 tight name list
825−138:43 tvar A
826−138:44 tight glyph )
827−138:45 tight glyph ]
828−139:5 INDENT
863+143:3 INDENT
829−139:5 glyph ?-
864+143:3 glyph ?-
830−139:8 name args
865+143:6 name args
831−140:7 INDENT
866+144:5 INDENT
832−140:7 glyph [
867+144:5 glyph [
833−140:8 tight name rest
868+144:6 tight name xs
834−140:13 name acc
869+144:9 name item
835−140:16 tight glyph ]
870+144:13 tight glyph ]
836−141:9 INDENT
837−141:9 glyph ?-
838−141:12 name rest
839−142:11 INDENT
840−142:11 lit ~
841−142:13 name acc
842−143:11 NEWLINE
843−143:11 glyph [
844−143:12 tight name item
845−143:17 name more
846−143:21 tight glyph ]
847−143:23 glyph (
871+144:15 glyph (
848−143:24 tight name reverse-into
872+144:16 tight name weld
849−143:37 name more
873+144:21 name xs
850−143:42 glyph [
874+144:24 glyph [
851−143:43 tight name item
875+144:25 tight name item
852−143:48 name acc
876+144:30 lit ~
853−143:51 tight glyph ]
877+144:31 tight glyph ]
854−143:52 tight glyph )
878+144:32 tight glyph )
855−144:3 DEDENT
856−144:3 DEDENT
857−144:3 DEDENT
858−144:3 DEDENT
879+146:1 DEDENT
859−144:3 NEWLINE
860−144:3 glyph (
861−144:4 tight name reverse-into
862−144:17 name xs
863−144:20 lit ~
864−144:21 tight glyph )
865146:1 DEDENT
880146:1 DEDENT
866146:1 NEWLINE
881146:1 NEWLINE
867146:1 glyph ++
882146:1 glyph ++
868−146:4 name drop
883+146:4 name flop
869146:9 glyph |=
884146:9 glyph |=
870−146:12 name maybe
885+146:12 name xs
871−146:17 tight glyph =
886+146:14 tight glyph =
872−146:18 tight glyph (
887+146:15 tight glyph (
873−146:19 tight name unit
888+146:16 tight name list
874−146:24 tvar A
889+146:21 tvar A
875−146:25 tight glyph )
890+146:22 tight glyph )
876147:3 INDENT
891147:3 INDENT
877−147:3 glyph ^-
892+147:3 glyph ++
893+147:6 name reverse-into
894+147:19 glyph |=
895+147:22 name args
896+147:26 tight glyph =
897+147:27 tight glyph [
898+147:28 tight glyph (
899+147:29 tight name list
900+147:34 tvar A
878−147:6 glyph (
901+147:35 tight glyph )
902+147:37 glyph (
879−147:7 tight name list
903+147:38 tight name list
880−147:12 tvar A
904+147:43 tvar A
881−147:13 tight glyph )
905+147:44 tight glyph )
906+147:45 tight glyph ]
882148:5 INDENT
907148:5 INDENT
883148:5 glyph ?-
908148:5 glyph ?-
884−148:8 name maybe
909+148:8 name args
885149:7 INDENT
910149:7 INDENT
886−149:7 lit ~
911+149:7 glyph [
887−149:9 lit ~
912+149:8 tight name rest
888−150:7 NEWLINE
913+149:13 name acc
889−150:7 glyph [
914+149:16 tight glyph ]
890−150:8 tight lit ~
915+150:9 INDENT
891−150:10 name value
916+150:9 glyph ?-
892−150:15 tight glyph ]
917+150:12 name rest
893−150:17 glyph [
918+151:11 INDENT
894−150:18 tight name value
919+151:11 lit ~
895−150:24 lit ~
920+151:13 name acc
896−150:25 tight glyph ]
921+152:11 NEWLINE
897−152:1 DEDENT
922+152:11 glyph [
898−152:1 DEDENT
923+152:12 tight name item
899−152:1 DEDENT
924+152:17 name more
900−152:1 NEWLINE
925+152:21 tight glyph ]
901−152:1 glyph ++
926+152:23 glyph (
902−152:4 name bind
927+152:24 tight name reverse-into
903−152:9 glyph |=
928+152:37 name more
904−152:12 name args
929+152:42 glyph [
905−152:16 tight glyph =
930+152:43 tight name item
906−152:17 tight glyph [
931+152:48 name acc
907−152:18 tight glyph (
932+152:51 tight glyph ]
908−152:19 tight name unit
933+152:52 tight glyph )
909−152:24 tvar A
934+153:3 DEDENT
910−152:25 tight glyph )
935+153:3 DEDENT
911−152:27 glyph $-(
936+153:3 DEDENT
912−152:30 tight tvar A
937+153:3 DEDENT
913−152:32 tvar B
938+153:3 NEWLINE
914−152:33 tight glyph )
939+153:3 glyph (
915−152:34 tight glyph ]
940+153:4 tight name reverse-into
916−153:3 INDENT
941+153:17 name xs
917−153:3 glyph ?-
942+153:20 lit ~
918−153:6 name args
943+153:21 tight glyph )
919−154:5 INDENT
944+155:1 DEDENT
920−154:5 glyph [
945+155:1 NEWLINE
921−154:6 tight name maybe
946+155:1 glyph ++
922−154:12 name f
947+155:4 name drop
923−154:13 tight glyph ]
948+155:9 glyph |=
924−154:15 glyph ^-
949+155:12 name maybe
925−154:18 glyph (
950+155:17 tight glyph =
926−154:19 tight name unit
951+155:18 tight glyph (
927−154:24 tvar B
952+155:19 tight name unit
928−154:25 tight glyph )
953+155:24 tvar A
929−155:7 INDENT
954+155:25 tight glyph )
930−155:7 glyph ?-
955+156:3 INDENT
931−155:10 name maybe
956+156:3 glyph ^-
932−156:9 INDENT
957+156:6 glyph (
933−156:9 lit ~
958+156:7 tight name list
934−156:11 lit ~
959+156:12 tvar A
935−157:9 NEWLINE
960+156:13 tight glyph )
936−157:9 glyph [
961+157:5 INDENT
937−157:10 tight lit ~
962+157:5 glyph ?-
938−157:12 name value
963+157:8 name maybe
939−157:17 tight glyph ]
964+158:7 INDENT
940−157:19 glyph `
965+158:7 lit ~
941−157:20 tight glyph (
966+158:9 lit ~
942−157:21 tight name f
967+159:7 NEWLINE
943−157:23 name value
968+159:7 glyph [
944−157:28 tight glyph )
969+159:8 tight lit ~
945−159:1 DEDENT
970+159:10 name value
946−159:1 DEDENT
971+159:15 tight glyph ]
947−159:1 DEDENT
972+159:17 glyph [
948−159:1 DEDENT
973+159:18 tight name value
949−159:1 NEWLINE
974+159:24 lit ~
950−159:1 glyph ++
975+159:25 tight glyph ]
951−159:4 name biff
976+161:1 DEDENT
952−159:9 glyph |=
977+161:1 DEDENT
953−159:12 name args
978+161:1 DEDENT
954−159:16 tight glyph =
979+161:1 NEWLINE
955−159:17 tight glyph [
980+161:1 glyph ++
956−159:18 tight glyph (
981+161:4 name bond
957−159:19 tight name unit
982+161:9 glyph |=
958−159:24 tvar A
983+161:12 name fallback
959−159:25 tight glyph )
984+161:20 tight glyph =
960−159:27 glyph $-(
985+161:21 tight glyph $-(
961−159:30 tight tvar A
986+161:24 tight lit ~
962−159:32 glyph (
987+161:26 tvar A
963−159:33 tight name unit
988+161:27 tight glyph )
964−159:38 tvar B
989+162:3 INDENT
965−159:39 tight glyph )
990+162:3 glyph |=
966−159:40 tight glyph )
991+162:6 name maybe
967−159:41 tight glyph ]
992+162:11 tight glyph =
968−160:3 INDENT
993+162:12 tight glyph (
969−160:3 glyph ?-
994+162:13 tight name unit
970−160:6 name args
995+162:18 tvar A
971−161:5 INDENT
996+162:19 tight glyph )
972−161:5 glyph [
997+163:5 INDENT
973−161:6 tight name maybe
998+163:5 glyph ?-
974−161:12 name f
999+163:8 name maybe
975−161:13 tight glyph ]
1000+164:7 INDENT
976−161:15 glyph ^-
1001+164:7 lit ~
977−161:18 glyph (
1002+164:9 glyph (
978−161:19 tight name unit
1003+164:10 tight name fallback
979−161:24 tvar B
1004+164:19 lit ~
980−161:25 tight glyph )
1005+164:20 tight glyph )
981−162:7 INDENT
1006+165:7 NEWLINE
982−162:7 glyph ?-
1007+165:7 glyph [
983−162:10 name maybe
1008+165:8 tight lit ~
984−163:9 INDENT
1009+165:10 name value
985−163:9 lit ~
1010+165:15 tight glyph ]
986−163:11 lit ~
1011+165:17 name value
987−164:9 NEWLINE
1012+167:1 DEDENT
988−164:9 glyph [
1013+167:1 DEDENT
989−164:10 tight lit ~
1014+167:1 DEDENT
990−164:12 name value
1015+167:1 NEWLINE
991−164:17 tight glyph ]
1016+167:1 glyph ++
992−164:19 glyph (
1017+167:4 name bind
993−164:20 tight name f
1018+167:9 glyph |=
994−164:22 name value
1019+167:12 name args
995−164:27 tight glyph )
1020+167:16 tight glyph =
996−166:1 DEDENT
1021+167:17 tight glyph [
997−166:1 DEDENT
1022+167:18 tight glyph (
998−166:1 DEDENT
1023+167:19 tight name unit
999−166:1 DEDENT
1024+167:24 tvar A
1000−166:1 NEWLINE
1025+167:25 tight glyph )
1001−166:1 glyph ++
1026+167:27 glyph $-(
1002−166:4 name both
1027+167:30 tight tvar A
1003−166:9 glyph |=
1028+167:32 tvar B
1004−166:12 name args
1029+167:33 tight glyph )
1005−166:16 tight glyph =
1030+167:34 tight glyph ]
1006−166:17 tight glyph [
1031+168:3 INDENT
1007−166:18 tight glyph (
1032+168:3 glyph ?-
1008−166:19 tight name unit
1033+168:6 name args
1009−166:24 tvar A
1034+169:5 INDENT
1010−166:25 tight glyph )
1035+169:5 glyph [
1011−166:27 glyph (
1036+169:6 tight name maybe
1012−166:28 tight name unit
1037+169:12 name f
1013−166:33 tvar B
1038+169:13 tight glyph ]
1014−166:34 tight glyph )
1039+169:15 glyph ^-
1015−166:35 tight glyph ]
1040+169:18 glyph (
1016−167:3 INDENT
1041+169:19 tight name unit
1017−167:3 glyph ?-
1042+169:24 tvar B
1018−167:6 name args
1043+169:25 tight glyph )
1019−168:5 INDENT
1044+170:7 INDENT
1020−168:5 glyph [
1045+170:7 glyph ?-
1021−168:6 tight name first
1046+170:10 name maybe
1022−168:12 name second
1047+171:9 INDENT
1023−168:18 tight glyph ]
1048+171:9 lit ~
1024−168:20 glyph ^-
1049+171:11 lit ~
1025−168:23 glyph (
1050+172:9 NEWLINE
1026−168:24 tight name unit
1051+172:9 glyph [
1027−168:29 glyph [
1052+172:10 tight lit ~
1028−168:30 tight tvar A
1053+172:12 name value
1029−168:32 tvar B
1054+172:17 tight glyph ]
1030−168:33 tight glyph ]
1055+172:19 glyph `
1031−168:34 tight glyph )
1056+172:20 tight glyph (
1032−169:7 INDENT
1057+172:21 tight name f
1033−169:7 glyph ?-
1058+172:23 name value
1034−169:10 name first
1059+172:28 tight glyph )
1035−170:9 INDENT
1060+174:1 DEDENT
1036−170:9 lit ~
1061+174:1 DEDENT
1037−170:11 lit ~
1062+174:1 DEDENT
1038−171:9 NEWLINE
1063+174:1 DEDENT
1039−171:9 glyph [
1064+174:1 NEWLINE
1040−171:10 tight lit ~
1065+174:1 glyph ++
1041−171:12 name a
1066+174:4 name biff
1042−171:13 tight glyph ]
1067+174:9 glyph |=
1043−172:11 INDENT
1068+174:12 name args
1044−172:11 glyph ?-
1069+174:16 tight glyph =
1045−172:14 name second
1070+174:17 tight glyph [
1046−173:13 INDENT
1071+174:18 tight glyph (
1047−173:13 lit ~
1072+174:19 tight name unit
1048−173:15 lit ~
1073+174:24 tvar A
1049−174:13 NEWLINE
1074+174:25 tight glyph )
1050−174:13 glyph [
1075+174:27 glyph $-(
1051−174:14 tight lit ~
1076+174:30 tight tvar A
1052−174:16 name b
1077+174:32 glyph (
1053−174:17 tight glyph ]
1078+174:33 tight name unit
1054−174:19 glyph `
1079+174:38 tvar B
1055−174:20 tight glyph [
1080+174:39 tight glyph )
1056−174:21 tight name a
1081+174:40 tight glyph )
1057−174:23 name b
1082+174:41 tight glyph ]
1058−174:24 tight glyph ]
1083+175:3 INDENT
1059−176:1 DEDENT
1084+175:3 glyph ?-
1060−176:1 DEDENT
1085+175:6 name args
1061−176:1 DEDENT
1086+176:5 INDENT
1062−176:1 DEDENT
1087+176:5 glyph [
1063−176:1 DEDENT
1088+176:6 tight name maybe
1064−176:1 DEDENT
1089+176:12 name f
1065−176:1 NEWLINE
1090+176:13 tight glyph ]
1066−176:1 glyph ++
1091+176:15 glyph ^-
1067−176:4 name clap
1092+176:18 glyph (
1068−176:9 glyph |=
1069−176:12 name args
1070−176:16 tight glyph =
1071−176:17 tight glyph [
1072−176:18 tight glyph (
1073176:19 tight name unit
1093176:19 tight name unit
1074−176:24 tvar A
1094+176:24 tvar B
1075176:25 tight glyph )
1095176:25 tight glyph )
1076−176:27 glyph (
1096+177:7 INDENT
1077−176:28 tight name unit
1097+177:7 glyph ?-
1078−176:33 tvar A
1098+177:10 name maybe
1079−176:34 tight glyph )
1099+178:9 INDENT
1080−176:36 glyph $-(
1100+178:9 lit ~
1081−176:39 tight glyph [
1101+178:11 lit ~
1082−176:40 tight tvar A
1102+179:9 NEWLINE
1083−176:42 tvar A
1103+179:9 glyph [
1084−176:43 tight glyph ]
1104+179:10 tight lit ~
1085−176:45 tvar A
1105+179:12 name value
1086−176:46 tight glyph )
1106+179:17 tight glyph ]
1087−176:47 tight glyph ]
1107+179:19 glyph (
1088−177:3 INDENT
1108+179:20 tight name f
1089−177:3 glyph ?-
1109+179:22 name value
1090−177:6 name args
1110+179:27 tight glyph )
1091−178:5 INDENT
1111+181:1 DEDENT
1092−178:5 glyph [
1112+181:1 DEDENT
1093−178:6 tight name first
1113+181:1 DEDENT
1094−178:12 name second
1114+181:1 DEDENT
1095−178:19 name combine
1115+181:1 NEWLINE
1096−178:26 tight glyph ]
1116+181:1 glyph ++
1097−178:28 glyph ^-
1117+181:4 name both
1098−178:31 glyph (
1118+181:9 glyph |=
1099−178:32 tight name unit
1119+181:12 name args
1100−178:37 tvar A
1120+181:16 tight glyph =
1101−178:38 tight glyph )
1121+181:17 tight glyph [
1102−179:7 INDENT
1122+181:18 tight glyph (
1103−179:7 glyph ?-
1123+181:19 tight name unit
1104−179:10 name first
1124+181:24 tvar A
1105−180:9 INDENT
1125+181:25 tight glyph )
1106−180:9 lit ~
1126+181:27 glyph (
1107−180:11 name second
1127+181:28 tight name unit
1108−181:9 NEWLINE
1128+181:33 tvar B
1109−181:9 glyph [
1129+181:34 tight glyph )
1110−181:10 tight lit ~
1130+181:35 tight glyph ]
1111−181:12 name a
1131+182:3 INDENT
1112−181:13 tight glyph ]
1132+182:3 glyph ?-
1113−182:11 INDENT
1133+182:6 name args
1114−182:11 glyph ?-
1134+183:5 INDENT
1115−182:14 name second
1135+183:5 glyph [
1116−183:13 INDENT
1136+183:6 tight name first
1117−183:13 lit ~
1137+183:12 name second
1118−183:15 name first
1138+183:18 tight glyph ]
1119−184:13 NEWLINE
1139+183:20 glyph ^-
1120−184:13 glyph [
1140+183:23 glyph (
1121−184:14 tight lit ~
1141+183:24 tight name unit
1122−184:16 name b
1142+183:29 glyph [
1123−184:17 tight glyph ]
1143+183:30 tight tvar A
1124−184:19 glyph `
1144+183:32 tvar B
1125−184:20 tight glyph (
1145+183:33 tight glyph ]
1126−184:21 tight name combine
1146+183:34 tight glyph )
1127−184:29 name a
1147+184:7 INDENT
1128−184:31 name b
1148+184:7 glyph ?-
1129−184:32 tight glyph )
1149+184:10 name first
1130−186:1 DEDENT
1150+185:9 INDENT
1131−186:1 DEDENT
1151+185:9 lit ~
1132−186:1 DEDENT
1152+185:11 lit ~
1133−186:1 DEDENT
1153+186:9 NEWLINE
1134−186:1 DEDENT
1154+186:9 glyph [
1135−186:1 DEDENT
1155+186:10 tight lit ~
1136−186:1 NEWLINE
1156+186:12 name a
1137−186:1 glyph ++
1157+186:13 tight glyph ]
1138−186:4 name clef
1158+187:11 INDENT
1139−186:9 glyph |=
1159+187:11 glyph ?-
1140−186:12 name args
1160+187:14 name second
1141−186:16 tight glyph =
1161+188:13 INDENT
1142−186:17 tight glyph [
1162+188:13 lit ~
1143−186:18 tight glyph (
1163+188:15 lit ~
1144−186:19 tight name unit
1164+189:13 NEWLINE
1145−186:24 tvar A
1165+189:13 glyph [
1146−186:25 tight glyph )
1166+189:14 tight lit ~
1147−186:27 glyph (
1167+189:16 name b
1148−186:28 tight name unit
1168+189:17 tight glyph ]
1149−186:33 tvar B
1169+189:19 glyph `
1150−186:34 tight glyph )
1170+189:20 tight glyph [
1151−186:36 glyph $-(
1171+189:21 tight name a
1152−186:39 tight glyph [
1172+189:23 name b
1153−186:40 tight tvar A
1173+189:24 tight glyph ]
1154−186:42 tvar B
1174+191:1 DEDENT
1155−186:43 tight glyph ]
1175+191:1 DEDENT
1156−186:45 glyph (
1176+191:1 DEDENT
1157−186:46 tight name unit
1177+191:1 DEDENT
1158−186:51 tvar C
1178+191:1 DEDENT
1159−186:52 tight glyph )
1179+191:1 DEDENT
1160−186:53 tight glyph )
1180+191:1 NEWLINE
1161−186:54 tight glyph ]
1181+191:1 glyph ++
1162−187:3 INDENT
1182+191:4 name clap
1163−187:3 glyph ?-
1183+191:9 glyph |=
1164−187:6 name args
1184+191:12 name args
1165−188:5 INDENT
1185+191:16 tight glyph =
1166−188:5 glyph [
1186+191:17 tight glyph [
1167−188:6 tight name first
1187+191:18 tight glyph (
1168−188:12 name second
1188+191:19 tight name unit
1169−188:19 name combine
1189+191:24 tvar A
1170−188:26 tight glyph ]
1190+191:25 tight glyph )
1171−188:28 glyph ^-
1191+191:27 glyph (
1172−188:31 glyph (
1192+191:28 tight name unit
1173−188:32 tight name unit
1193+191:33 tvar A
1174−188:37 tvar C
1194+191:34 tight glyph )
1175−188:38 tight glyph )
1195+191:36 glyph $-(
1176−189:7 INDENT
1196+191:39 tight glyph [
1177−189:7 glyph ?-
1197+191:40 tight tvar A
1178−189:10 name first
1198+191:42 tvar A
1179−190:9 INDENT
1199+191:43 tight glyph ]
1180−190:9 lit ~
1200+191:45 tvar A
1181−190:11 lit ~
1201+191:46 tight glyph )
1182−191:9 NEWLINE
1202+191:47 tight glyph ]
1183−191:9 glyph [
1203+192:3 INDENT
1184−191:10 tight lit ~
1204+192:3 glyph ?-
1185−191:12 name a
1205+192:6 name args
1186−191:13 tight glyph ]
1206+193:5 INDENT
1187−192:11 INDENT
1207+193:5 glyph [
1188−192:11 glyph ?-
1208+193:6 tight name first
1189−192:14 name second
1209+193:12 name second
1190−193:13 INDENT
1210+193:19 name combine
1191−193:13 lit ~
1211+193:26 tight glyph ]
1192−193:15 lit ~
1212+193:28 glyph ^-
1193−194:13 NEWLINE
1213+193:31 glyph (
1194−194:13 glyph [
1214+193:32 tight name unit
1195−194:14 tight lit ~
1215+193:37 tvar A
1196−194:16 name b
1216+193:38 tight glyph )
1197−194:17 tight glyph ]
1217+194:7 INDENT
1198−194:19 glyph (
1218+194:7 glyph ?-
1199−194:20 tight name combine
1219+194:10 name first
1200−194:28 name a
1220+195:9 INDENT
1201−194:30 name b
1221+195:9 lit ~
1202−194:31 tight glyph )
1222+195:11 name second
1203−196:1 DEDENT
1223+196:9 NEWLINE
1204−196:1 DEDENT
1224+196:9 glyph [
1205−196:1 DEDENT
1225+196:10 tight lit ~
1206−196:1 DEDENT
1226+196:12 name a
1207−196:1 DEDENT
1227+196:13 tight glyph ]
1208−196:1 DEDENT
1228+197:11 INDENT
1209−196:1 NEWLINE
1229+197:11 glyph ?-
1210−196:1 glyph ++
1230+197:14 name second
1211−196:4 name skim
1231+198:13 INDENT
1212−196:9 glyph |=
1232+198:13 lit ~
1213−196:12 name args
1233+198:15 name first
1214−196:16 tight glyph =
1234+199:13 NEWLINE
1215−196:17 tight glyph [
1235+199:13 glyph [
1216−196:18 tight glyph (
1236+199:14 tight lit ~
1217−196:19 tight name list
1237+199:16 name b
1218−196:24 tvar A
1238+199:17 tight glyph ]
1219−196:25 tight glyph )
1239+199:19 glyph `
1220−196:27 glyph $-(
1240+199:20 tight glyph (
1221−196:30 tight tvar A
1241+199:21 tight name combine
1222−196:32 glyph ?
1242+199:29 name a
1223−196:33 tight glyph )
1243+199:31 name b
1224−196:34 tight glyph ]
1244+199:32 tight glyph )
1225−197:3 INDENT
1245+201:1 DEDENT
1226−197:3 glyph ?-
1246+201:1 DEDENT
1227−197:6 name args
1247+201:1 DEDENT
1228−198:5 INDENT
1248+201:1 DEDENT
1229−198:5 glyph [
1249+201:1 DEDENT
1230−198:6 tight name xs
1250+201:1 DEDENT
1231−198:9 name predicate
1251+201:1 NEWLINE
1232−198:18 tight glyph ]
1252+201:1 glyph ++
1233−198:20 glyph ^-
1253+201:4 name clef
1234−198:23 glyph (
1254+201:9 glyph |=
1235−198:24 tight name list
1255+201:12 name args
1236−198:29 tvar A
1256+201:16 tight glyph =
1237−198:30 tight glyph )
1257+201:17 tight glyph [
1238−199:9 INDENT
1258+201:18 tight glyph (
1239−199:9 glyph ?-
1259+201:19 tight name unit
1240−199:12 name xs
1260+201:24 tvar A
1241−200:11 INDENT
1261+201:25 tight glyph )
1242−200:11 lit ~
1262+201:27 glyph (
1243−200:13 lit ~
1263+201:28 tight name unit
1244−201:11 NEWLINE
1264+201:33 tvar B
1245−201:11 glyph [
1265+201:34 tight glyph )
1246−201:12 tight name item
1266+201:36 glyph $-(
1247−201:17 name rest
1267+201:39 tight glyph [
1248−201:21 tight glyph ]
1268+201:40 tight tvar A
1249−202:13 INDENT
1269+201:42 tvar B
1250−202:13 glyph ?-
1270+201:43 tight glyph ]
1251−202:16 glyph (
1271+201:45 glyph (
1252−202:17 tight name predicate
1272+201:46 tight name unit
1253−202:27 name item
1273+201:51 tvar C
1254−202:31 tight glyph )
1274+201:52 tight glyph )
1255−203:15 INDENT
1275+201:53 tight glyph )
1256−203:15 lit %.y
1276+201:54 tight glyph ]
1257−203:19 glyph [
1277+202:3 INDENT
1258−203:20 tight name item
1278+202:3 glyph ?-
1259−203:25 glyph (
1279+202:6 name args
1260−203:26 tight name skim
1280+203:5 INDENT
1261−203:31 name rest
1281+203:5 glyph [
1262−203:36 name predicate
1282+203:6 tight name first
1263−203:45 tight glyph )
1283+203:12 name second
1264−203:46 tight glyph ]
1284+203:19 name combine
1265−204:15 NEWLINE
1285+203:26 tight glyph ]
1266−204:15 lit %.n
1286+203:28 glyph ^-
1267−204:19 glyph (
1287+203:31 glyph (
1268−204:20 tight name skim
1288+203:32 tight name unit
1269−204:25 name rest
1289+203:37 tvar C
1270−204:30 name predicate
1290+203:38 tight glyph )
1271−204:39 tight glyph )
1291+204:7 INDENT
1272−206:1 DEDENT
1292+204:7 glyph ?-
1273−206:1 DEDENT
1293+204:10 name first
1274−206:1 DEDENT
1294+205:9 INDENT
1275−206:1 DEDENT
1295+205:9 lit ~
1276−206:1 DEDENT
1296+205:11 lit ~
1277−206:1 DEDENT
1297+206:9 NEWLINE
1278−206:1 NEWLINE
1298+206:9 glyph [
1279−206:1 glyph ++
1299+206:10 tight lit ~
1280−206:4 name skip
1300+206:12 name a
1281−206:9 glyph |=
1301+206:13 tight glyph ]
1282−206:12 name args
1302+207:11 INDENT
1283−206:16 tight glyph =
1303+207:11 glyph ?-
1284−206:17 tight glyph [
1304+207:14 name second
1285−206:18 tight glyph (
1305+208:13 INDENT
1286−206:19 tight name list
1306+208:13 lit ~
1287−206:24 tvar A
1307+208:15 lit ~
1288−206:25 tight glyph )
1308+209:13 NEWLINE
1289−206:27 glyph $-(
1309+209:13 glyph [
1290−206:30 tight tvar A
1310+209:14 tight lit ~
1291−206:32 glyph ?
1311+209:16 name b
1292−206:33 tight glyph )
1312+209:17 tight glyph ]
1293−206:34 tight glyph ]
1313+209:19 glyph (
1294−207:3 INDENT
1314+209:20 tight name combine
1295−207:3 glyph ?-
1315+209:28 name a
1296−207:6 name args
1316+209:30 name b
1297−208:5 INDENT
1317+209:31 tight glyph )
1298−208:5 glyph [
1318+211:1 DEDENT
1299−208:6 tight name xs
1319+211:1 DEDENT
1300−208:9 name predicate
1320+211:1 DEDENT
1301−208:18 tight glyph ]
1321+211:1 DEDENT
1302−208:20 glyph ^-
1322+211:1 DEDENT
1303−208:23 glyph (
1323+211:1 DEDENT
1304−208:24 tight name list
1324+211:1 NEWLINE
1305−208:29 tvar A
1325+211:1 glyph ++
1306−208:30 tight glyph )
1326+211:4 name skim
1307−209:9 INDENT
1327+211:9 glyph |=
1308−209:9 glyph ?-
1328+211:12 name args
1309−209:12 name xs
1329+211:16 tight glyph =
1310−210:11 INDENT
1330+211:17 tight glyph [
1311−210:11 lit ~
1331+211:18 tight glyph (
1312−210:13 lit ~
1332+211:19 tight name list
1313−211:11 NEWLINE
1333+211:24 tvar A
1314−211:11 glyph [
1334+211:25 tight glyph )
1315−211:12 tight name item
1335+211:27 glyph $-(
1316−211:17 name rest
1336+211:30 tight tvar A
1317−211:21 tight glyph ]
1337+211:32 glyph ?
1318−212:13 INDENT
1338+211:33 tight glyph )
1319−212:13 glyph ?-
1339+211:34 tight glyph ]
1320−212:16 glyph (
1340+212:3 INDENT
1321−212:17 tight name predicate
1341+212:3 glyph ?-
1322−212:27 name item
1342+212:6 name args
1323−212:31 tight glyph )
1343+213:5 INDENT
1324−213:15 INDENT
1344+213:5 glyph [
1325−213:15 lit %.y
1345+213:6 tight name xs
1326−213:19 glyph (
1346+213:9 name predicate
1327−213:20 tight name skip
1347+213:18 tight glyph ]
1328−213:25 name rest
1348+213:20 glyph ^-
1329−213:30 name predicate
1349+213:23 glyph (
1330−213:39 tight glyph )
1350+213:24 tight name list
1331−214:15 NEWLINE
1351+213:29 tvar A
1332−214:15 lit %.n
1352+213:30 tight glyph )
1333−214:19 glyph [
1353+214:9 INDENT
1334−214:20 tight name item
1354+214:9 glyph ?-
1335−214:25 glyph (
1355+214:12 name xs
1336−214:26 tight name skip
1356+215:11 INDENT
1337−214:31 name rest
1357+215:11 lit ~
1338−214:36 name predicate
1358+215:13 lit ~
1339−214:45 tight glyph )
1359+216:11 NEWLINE
1340−214:46 tight glyph ]
1360+216:11 glyph [
1341−216:1 DEDENT
1361+216:12 tight name item
1342−216:1 DEDENT
1362+216:17 name rest
1343−216:1 DEDENT
1363+216:21 tight glyph ]
1344−216:1 DEDENT
1364+217:13 INDENT
1345−216:1 DEDENT
1365+217:13 glyph ?-
1346−216:1 DEDENT
1366+217:16 glyph (
1347−216:1 NEWLINE
1367+217:17 tight name predicate
1348−216:1 glyph ++
1368+217:27 name item
1349−216:4 name levy
1369+217:31 tight glyph )
1350−216:9 glyph |=
1370+218:15 INDENT
1351−216:12 name args
1371+218:15 lit %.y
1352−216:16 tight glyph =
1372+218:19 glyph [
1353−216:17 tight glyph [
1373+218:20 tight name item
1354−216:18 tight glyph (
1374+218:25 glyph (
1355−216:19 tight name list
1375+218:26 tight name skim
1356−216:24 tvar A
1376+218:31 name rest
1357−216:25 tight glyph )
1377+218:36 name predicate
1358−216:27 glyph $-(
1378+218:45 tight glyph )
1359−216:30 tight tvar A
1379+218:46 tight glyph ]
1360−216:32 glyph ?
1380+219:15 NEWLINE
1361−216:33 tight glyph )
1381+219:15 lit %.n
1362−216:34 tight glyph ]
1382+219:19 glyph (
1363−217:3 INDENT
1383+219:20 tight name skim
1364−217:3 glyph ^-
1384+219:25 name rest
1365−217:6 glyph ?
1385+219:30 name predicate
1366−218:5 INDENT
1386+219:39 tight glyph )
1367−218:5 glyph ?-
1387+221:1 DEDENT
1368−218:8 name args
1388+221:1 DEDENT
1369−219:7 INDENT
1389+221:1 DEDENT
1370−219:7 glyph [
1390+221:1 DEDENT
1371−219:8 tight name xs
1391+221:1 DEDENT
1372−219:11 name predicate
1392+221:1 DEDENT
1373−219:20 tight glyph ]
1393+221:1 NEWLINE
1374−220:9 INDENT
1394+221:1 glyph ++
1375−220:9 glyph ?-
1395+221:4 name skip
1376−220:12 name xs
1396+221:9 glyph |=
1377−221:11 INDENT
1397+221:12 name args
1378−221:11 lit ~
1398+221:16 tight glyph =
1379−221:13 lit %.y
1399+221:17 tight glyph [
1380−222:11 NEWLINE
1400+221:18 tight glyph (
1381−222:11 glyph [
1401+221:19 tight name list
1382−222:12 tight name item
1402+221:24 tvar A
1383−222:17 name rest
1403+221:25 tight glyph )
1384−222:21 tight glyph ]
1404+221:27 glyph $-(
1385−223:13 INDENT
1405+221:30 tight tvar A
1386−223:13 glyph ?-
1406+221:32 glyph ?
1387−223:16 glyph (
1407+221:33 tight glyph )
1388−223:17 tight name predicate
1408+221:34 tight glyph ]
1389−223:27 name item
1409+222:3 INDENT
1390−223:31 tight glyph )
1410+222:3 glyph ?-
1391−224:15 INDENT
1411+222:6 name args
1392−224:15 lit %.y
1412+223:5 INDENT
1393−224:19 glyph (
1413+223:5 glyph [
1394−224:20 tight name levy
1414+223:6 tight name xs
1395−224:25 name rest
1415+223:9 name predicate
1396−224:30 name predicate
1416+223:18 tight glyph ]
1397−224:39 tight glyph )
1417+223:20 glyph ^-
1398−225:15 NEWLINE
1418+223:23 glyph (
1399−225:15 lit %.n
1419+223:24 tight name list
1400−225:19 lit %.n
1420+223:29 tvar A
1401−227:1 DEDENT
1421+223:30 tight glyph )
1402−227:1 DEDENT
1422+224:9 INDENT
1403−227:1 DEDENT
1423+224:9 glyph ?-
1404−227:1 DEDENT
1424+224:12 name xs
1405−227:1 DEDENT
1425+225:11 INDENT
1406−227:1 DEDENT
1426+225:11 lit ~
1407−227:1 DEDENT
1427+225:13 lit ~
1408−227:1 NEWLINE
1428+226:11 NEWLINE
1409−227:1 glyph ++
1429+226:11 glyph [
1410−227:4 name lien
1430+226:12 tight name item
1411−227:9 glyph |=
1431+226:17 name rest
1412−227:12 name args
1432+226:21 tight glyph ]
1413−227:16 tight glyph =
1433+227:13 INDENT
1414−227:17 tight glyph [
1434+227:13 glyph ?-
1415−227:18 tight glyph (
1435+227:16 glyph (
1416−227:19 tight name list
1436+227:17 tight name predicate
1417−227:24 tvar A
1437+227:27 name item
1418−227:25 tight glyph )
1438+227:31 tight glyph )
1419−227:27 glyph $-(
1439+228:15 INDENT
1420−227:30 tight tvar A
1440+228:15 lit %.y
1421−227:32 glyph ?
1441+228:19 glyph (
1422−227:33 tight glyph )
1442+228:20 tight name skip
1423−227:34 tight glyph ]
1443+228:25 name rest
1424−228:3 INDENT
1444+228:30 name predicate
1425−228:3 glyph ^-
1445+228:39 tight glyph )
1426−228:6 glyph ?
1446+229:15 NEWLINE
1427−229:5 INDENT
1447+229:15 lit %.n
1428−229:5 glyph ?-
1448+229:19 glyph [
1429−229:8 name args
1449+229:20 tight name item
1430−230:7 INDENT
1450+229:25 glyph (
1431−230:7 glyph [
1451+229:26 tight name skip
1432−230:8 tight name xs
1452+229:31 name rest
1433−230:11 name predicate
1453+229:36 name predicate
1434−230:20 tight glyph ]
1454+229:45 tight glyph )
1435−231:9 INDENT
1455+229:46 tight glyph ]
1436−231:9 glyph ?-
1456+231:1 DEDENT
1437−231:12 name xs
1457+231:1 DEDENT
1438−232:11 INDENT
1458+231:1 DEDENT
1439−232:11 lit ~
1459+231:1 DEDENT
1440−232:13 lit %.n
1460+231:1 DEDENT
1441−233:11 NEWLINE
1461+231:1 DEDENT
1442−233:11 glyph [
1462+231:1 NEWLINE
1443−233:12 tight name item
1463+231:1 glyph ++
1444−233:17 name rest
1464+231:4 name levy
1445−233:21 tight glyph ]
1465+231:9 glyph |=
1446−234:13 INDENT
1466+231:12 name args
1447−234:13 glyph ?-
1467+231:16 tight glyph =
1448−234:16 glyph (
1468+231:17 tight glyph [
1449−234:17 tight name predicate
1469+231:18 tight glyph (
1450−234:27 name item
1470+231:19 tight name list
1451−234:31 tight glyph )
1471+231:24 tvar A
1452−235:15 INDENT
1472+231:25 tight glyph )
1453−235:15 lit %.y
1473+231:27 glyph $-(
1454−235:19 lit %.y
1474+231:30 tight tvar A
1455−236:15 NEWLINE
1475+231:32 glyph ?
1456−236:15 lit %.n
1476+231:33 tight glyph )
1457−236:19 glyph (
1477+231:34 tight glyph ]
1458−236:20 tight name lien
1478+232:3 INDENT
1459−236:25 name rest
1479+232:3 glyph ^-
1460−236:30 name predicate
1480+232:6 glyph ?
1461−236:39 tight glyph )
1481+233:5 INDENT
1462−238:1 DEDENT
1482+233:5 glyph ?-
1463−238:1 DEDENT
1483+233:8 name args
1464−238:1 DEDENT
1484+234:7 INDENT
1465−238:1 DEDENT
1485+234:7 glyph [
1466−238:1 DEDENT
1486+234:8 tight name xs
1467−238:1 DEDENT
1487+234:11 name predicate
1468−238:1 DEDENT
1488+234:20 tight glyph ]
1469−238:1 NEWLINE
1489+235:9 INDENT
1470−238:1 glyph ++
1490+235:9 glyph ?-
1471−238:4 name roll
1491+235:12 name xs
1472−238:9 glyph |=
1492+236:11 INDENT
1473−238:12 name args
1493+236:11 lit ~
1474−238:16 tight glyph =
1494+236:13 lit %.y
1475−238:17 tight glyph [
1495+237:11 NEWLINE
1476−238:18 tight glyph (
1496+237:11 glyph [
1477−238:19 tight name list
1497+237:12 tight name item
1478−238:24 tvar A
1498+237:17 name rest
1479−238:25 tight glyph )
1499+237:21 tight glyph ]
1480−238:27 tvar B
1500+238:13 INDENT
1481−238:29 glyph $-(
1501+238:13 glyph ?-
1482−238:32 tight glyph [
1502+238:16 glyph (
1483−238:33 tight tvar A
1503+238:17 tight name predicate
1484−238:35 tvar B
1504+238:27 name item
1485−238:36 tight glyph ]
1505+238:31 tight glyph )
1486−238:38 tvar B
1506+239:15 INDENT
1487−238:39 tight glyph )
1507+239:15 lit %.y
1488−238:40 tight glyph ]
1508+239:19 glyph (
1489−239:3 INDENT
1509+239:20 tight name levy
1490−239:3 glyph ?-
1510+239:25 name rest
1491−239:6 name args
1511+239:30 name predicate
1492−240:5 INDENT
1512+239:39 tight glyph )
1493−240:5 glyph [
1513+240:15 NEWLINE
1494−240:6 tight name xs
1514+240:15 lit %.n
1495−240:9 name start
1515+240:19 lit %.n
1496−240:15 name combine
1516+242:1 DEDENT
1497−240:22 tight glyph ]
1517+242:1 DEDENT
1498−241:7 INDENT
1518+242:1 DEDENT
1499−241:7 glyph ?-
1519+242:1 DEDENT
1500−241:10 name xs
1520+242:1 DEDENT
1501−242:9 INDENT
1521+242:1 DEDENT
1502−242:9 lit ~
1522+242:1 DEDENT
1503−242:11 name start
1523+242:1 NEWLINE
1504−243:9 NEWLINE
1524+242:1 glyph ++
1505−243:9 glyph [
1525+242:4 name lien
1506−243:10 tight name item
1526+242:9 glyph |=
1507−243:15 name rest
1527+242:12 name args
1508−243:19 tight glyph ]
1528+242:16 tight glyph =
1509−243:21 glyph (
1529+242:17 tight glyph [
1510−243:22 tight name roll
1530+242:18 tight glyph (
1511−243:27 name rest
1531+242:19 tight name list
1512−243:32 glyph (
1532+242:24 tvar A
1513−243:33 tight name combine
1533+242:25 tight glyph )
1514−243:41 name item
1534+242:27 glyph $-(
1515−243:46 name start
1535+242:30 tight tvar A
1516−243:51 tight glyph )
1536+242:32 glyph ?
1517−243:53 name combine
1537+242:33 tight glyph )
1518−243:60 tight glyph )
1538+242:34 tight glyph ]
1519−245:1 DEDENT
1539+243:3 INDENT
1520−245:1 DEDENT
1540+243:3 glyph ^-
1521−245:1 DEDENT
1541+243:6 glyph ?
1522−245:1 DEDENT
1542+244:5 INDENT
1523−245:1 NEWLINE
1543+244:5 glyph ?-
1524−245:1 glyph ++
1544+244:8 name args
1525−245:4 name reel
1545+245:7 INDENT
1526−245:9 glyph |=
1546+245:7 glyph [
1527−245:12 name args
1547+245:8 tight name xs
1528−245:16 tight glyph =
1548+245:11 name predicate
1529−245:17 tight glyph [
1549+245:20 tight glyph ]
1530−245:18 tight glyph (
1550+246:9 INDENT
1531−245:19 tight name list
1551+246:9 glyph ?-
1532−245:24 tvar A
1552+246:12 name xs
1533−245:25 tight glyph )
1553+247:11 INDENT
1534−245:27 tvar B
1554+247:11 lit ~
1535−245:29 glyph $-(
1555+247:13 lit %.n
1536−245:32 tight glyph [
1556+248:11 NEWLINE
1537−245:33 tight tvar A
1557+248:11 glyph [
1538−245:35 tvar B
1558+248:12 tight name item
1539−245:36 tight glyph ]
1559+248:17 name rest
1540−245:38 tvar B
1560+248:21 tight glyph ]
1541−245:39 tight glyph )
1561+249:13 INDENT
1542−245:40 tight glyph ]
1562+249:13 glyph ?-
1543−246:3 INDENT
1563+249:16 glyph (
1544−246:3 glyph ?-
1564+249:17 tight name predicate
1545−246:6 name args
1565+249:27 name item
1546−247:5 INDENT
1566+249:31 tight glyph )
1547−247:5 glyph [
1567+250:15 INDENT
1548−247:6 tight name xs
1568+250:15 lit %.y
1549−247:9 name start
1569+250:19 lit %.y
1550−247:15 name combine
1570+251:15 NEWLINE
1551−247:22 tight glyph ]
1571+251:15 lit %.n
1552−248:7 INDENT
1572+251:19 glyph (
1553−248:7 glyph ?-
1573+251:20 tight name lien
1554−248:10 name xs
1574+251:25 name rest
1555−249:9 INDENT
1575+251:30 name predicate
1556−249:9 lit ~
1576+251:39 tight glyph )
1557−249:11 name start
1577+253:1 DEDENT
1558−250:9 NEWLINE
1578+253:1 DEDENT
1559−250:9 glyph [
1579+253:1 DEDENT
1560−250:10 tight name item
1580+253:1 DEDENT
1561−250:15 name rest
1581+253:1 DEDENT
1562−250:19 tight glyph ]
1582+253:1 DEDENT
1563−250:21 glyph (
1583+253:1 DEDENT
1564−250:22 tight name combine
1584+253:1 NEWLINE
1565−250:30 name item
1585+253:1 glyph ++
1566−250:35 glyph (
1586+253:4 name roll
1567−250:36 tight name reel
1587+253:9 glyph |=
1568−250:41 name rest
1588+253:12 name args
1569−250:46 name start
1589+253:16 tight glyph =
1570−250:52 name combine
1590+253:17 tight glyph [
1571−250:59 tight glyph )
1591+253:18 tight glyph (
1572−250:60 tight glyph )
1592+253:19 tight name list
1573−252:1 DEDENT
1593+253:24 tvar A
1574−252:1 DEDENT
1594+253:25 tight glyph )
1575−252:1 DEDENT
1595+253:27 tvar B
1576−252:1 DEDENT
1596+253:29 glyph $-(
1577−252:1 NEWLINE
1597+253:32 tight glyph [
1578−252:1 glyph ++
1598+253:33 tight tvar A
1579−252:4 name flit
1599+253:35 tvar B
1580−252:9 glyph |=
1600+253:36 tight glyph ]
1581−252:12 name predicate
1601+253:38 tvar B
1582−252:21 tight glyph =
1602+253:39 tight glyph )
1583−252:22 tight glyph $-(
1603+253:40 tight glyph ]
1584−252:25 tight tvar A
1604+254:3 INDENT
1585−252:27 glyph ?
1605+254:3 glyph ?-
1586−252:28 tight glyph )
1606+254:6 name args
1587−253:3 INDENT
1607+255:5 INDENT
1588−253:3 glyph |=
1608+255:5 glyph [
1589−253:6 name value
1609+255:6 tight name xs
1590−253:11 tight glyph =
1610+255:9 name start
1591−253:12 tight tvar A
1611+255:15 name combine
1592−254:5 INDENT
1612+255:22 tight glyph ]
1593−254:5 glyph ^-
1613+256:7 INDENT
1594−254:8 glyph (
1614+256:7 glyph ?-
1595−254:9 tight name unit
1615+256:10 name xs
1596−254:14 tvar A
1616+257:9 INDENT
1597−254:15 tight glyph )
1617+257:9 lit ~
1598−255:7 INDENT
1618+257:11 name start
1599−255:7 glyph ?-
1619+258:9 NEWLINE
1600−255:10 glyph (
1620+258:9 glyph [
1601−255:11 tight name predicate
1621+258:10 tight name item
1602−255:21 name value
1622+258:15 name rest
1603−255:26 tight glyph )
1623+258:19 tight glyph ]
1604−256:9 INDENT
1624+258:21 glyph (
1605−256:9 lit %.y
1625+258:22 tight name roll
1606−256:13 glyph `
1626+258:27 name rest
1607−256:14 tight name value
1627+258:32 glyph (
1608−257:9 NEWLINE
1628+258:33 tight name combine
1609−257:9 lit %.n
1629+258:41 name item
1610−257:13 lit ~
1630+258:46 name start
1611−259:1 DEDENT
1631+258:51 tight glyph )
1612−259:1 DEDENT
1632+258:53 name combine
1613−259:1 DEDENT
1633+258:60 tight glyph )
1614−259:1 DEDENT
1634+260:1 DEDENT
1615−259:1 NEWLINE
1635+260:1 DEDENT
1616−259:1 glyph ++
1636+260:1 DEDENT
1617−259:4 name murn
1637+260:1 DEDENT
1618−259:9 glyph |=
1638+260:1 NEWLINE
1619−259:12 name args
1639+260:1 glyph ++
1620−259:16 tight glyph =
1640+260:4 name reel
1621−259:17 tight glyph [
1641+260:9 glyph |=
1622−259:18 tight glyph (
1642+260:12 name args
1623−259:19 tight name list
1643+260:16 tight glyph =
1624−259:24 tvar A
1644+260:17 tight glyph [
1625−259:25 tight glyph )
1645+260:18 tight glyph (
1626−259:27 glyph $-(
1646+260:19 tight name list
1627−259:30 tight tvar A
1647+260:24 tvar A
1628−259:32 glyph (
1648+260:25 tight glyph )
1629−259:33 tight name unit
1649+260:27 tvar B
1630−259:38 tvar B
1650+260:29 glyph $-(
1631−259:39 tight glyph )
1651+260:32 tight glyph [
1632−259:40 tight glyph )
1652+260:33 tight tvar A
1633−259:41 tight glyph ]
1653+260:35 tvar B
1634−260:3 INDENT
1654+260:36 tight glyph ]
1635−260:3 glyph ?-
1655+260:38 tvar B
1636−260:6 name args
1656+260:39 tight glyph )
1637−261:5 INDENT
1657+260:40 tight glyph ]
1638−261:5 glyph [
1658+261:3 INDENT
1639−261:6 tight name xs
1659+261:3 glyph ?-
1640−261:9 name f
1660+261:6 name args
1641−261:10 tight glyph ]
1661+262:5 INDENT
1642−261:12 glyph ^-
1662+262:5 glyph [
1643−261:15 glyph (
1663+262:6 tight name xs
1644−261:16 tight name list
1664+262:9 name start
1645−261:21 tvar B
1665+262:15 name combine
1646−261:22 tight glyph )
1666+262:22 tight glyph ]
1647−262:9 INDENT
1667+263:7 INDENT
1648−262:9 glyph ?-
1668+263:7 glyph ?-
1649−262:12 name xs
1669+263:10 name xs
1650−263:11 INDENT
1670+264:9 INDENT
1651−263:11 lit ~
1671+264:9 lit ~
1652−263:13 lit ~
1672+264:11 name start
1653−264:11 NEWLINE
1673+265:9 NEWLINE
1654−264:11 glyph [
1674+265:9 glyph [
1655−264:12 tight name item
1675+265:10 tight name item
1656−264:17 name rest
1676+265:15 name rest
1657−264:21 tight glyph ]
1677+265:19 tight glyph ]
1658−265:13 INDENT
1678+265:21 glyph (
1659−265:13 glyph ?-
1679+265:22 tight name combine
1660−265:16 glyph (
1680+265:30 name item
1661−265:17 tight name f
1681+265:35 glyph (
1662−265:19 name item
1682+265:36 tight name reel
1663−265:23 tight glyph )
1683+265:41 name rest
1664−266:15 INDENT
1684+265:46 name start
1665−266:15 lit ~
1685+265:52 name combine
1666−266:17 glyph (
1686+265:59 tight glyph )
1667−266:18 tight name murn
1687+265:60 tight glyph )
1668−266:23 name rest
1688+267:1 DEDENT
1669−266:28 name f
1689+267:1 DEDENT
1670−266:29 tight glyph )
1690+267:1 DEDENT
1671−267:15 NEWLINE
1691+267:1 DEDENT
1672−267:15 glyph [
1692+267:1 NEWLINE
1673−267:16 tight lit ~
1693+267:1 glyph ++
1674−267:18 name value
1694+267:4 name flit
1675−267:23 tight glyph ]
1695+267:9 glyph |=
1676−267:25 glyph [
1696+267:12 name predicate
1677−267:26 tight name value
1697+267:21 tight glyph =
1678−267:32 glyph (
1698+267:22 tight glyph $-(
1679−267:33 tight name murn
1699+267:25 tight tvar A
1680−267:38 name rest
1700+267:27 glyph ?
1681−267:43 name f
1701+267:28 tight glyph )
1682−267:44 tight glyph )
1702+268:3 INDENT
1683−267:45 tight glyph ]
1703+268:3 glyph |=
1684−269:1 DEDENT
1704+268:6 name value
1685−269:1 DEDENT
1705+268:11 tight glyph =
1686−269:1 DEDENT
1706+268:12 tight tvar A
1687−269:1 DEDENT
1707+269:5 INDENT
1688−269:1 DEDENT
1708+269:5 glyph ^-
1689−269:1 DEDENT
1709+269:8 glyph (
1690−269:1 NEWLINE
1710+269:9 tight name unit
1691−269:1 glyph ++
1711+269:14 tvar A
1692−269:4 name join
1712+269:15 tight glyph )
1693−269:9 glyph |=
1713+270:7 INDENT
1694−269:12 name args
1714+270:7 glyph ?-
1695−269:16 tight glyph =
1715+270:10 glyph (
1696−269:17 tight glyph [
1716+270:11 tight name predicate
1697−269:18 tight tvar A
1717+270:21 name value
1698−269:20 glyph (
1718+270:26 tight glyph )
1699−269:21 tight name list
1719+271:9 INDENT
1700−269:26 tvar A
1720+271:9 lit %.y
1701−269:27 tight glyph )
1721+271:13 glyph `
1702−269:28 tight glyph ]
1722+271:14 tight name value
1703−270:3 INDENT
1723+272:9 NEWLINE
1704−270:3 glyph ?-
1724+272:9 lit %.n
1705−270:6 name args
1725+272:13 lit ~
1706−271:5 INDENT
1726+274:1 DEDENT
1707−271:5 glyph [
1727+274:1 DEDENT
1708−271:6 tight name separator
1728+274:1 DEDENT
1709−271:16 name xs
1729+274:1 DEDENT
1710−271:18 tight glyph ]
1730+274:1 NEWLINE
1711−271:20 glyph ^-
1731+274:1 glyph ++
1712−271:23 glyph (
1732+274:4 name murn
1713−271:24 tight name list
1733+274:9 glyph |=
1714−271:29 tvar A
1734+274:12 name args
1715−271:30 tight glyph )
1735+274:16 tight glyph =
1716−272:9 INDENT
1736+274:17 tight glyph [
1717−272:9 glyph ?-
1737+274:18 tight glyph (
1718−272:12 name xs
1738+274:19 tight name list
1719−273:11 INDENT
1739+274:24 tvar A
1720−273:11 lit ~
1740+274:25 tight glyph )
1721−273:13 lit ~
1741+274:27 glyph $-(
1722−274:11 NEWLINE
1742+274:30 tight tvar A
1723−274:11 glyph [
1743+274:32 glyph (
1724−274:12 tight name item
1744+274:33 tight name unit
1725−274:17 name rest
1745+274:38 tvar B
1726−274:21 tight glyph ]
1746+274:39 tight glyph )
1727−275:13 INDENT
1747+274:40 tight glyph )
1728−275:13 glyph ?-
1748+274:41 tight glyph ]
1729−275:16 name rest
1749+275:3 INDENT
1730−276:15 INDENT
1750+275:3 glyph ?-
1731−276:15 lit ~
1751+275:6 name args
1732−276:17 glyph [
1752+276:5 INDENT
1733−276:18 tight name item
1753+276:5 glyph [
1734−276:23 lit ~
1754+276:6 tight name xs
1735−276:24 tight glyph ]
1755+276:9 name f
1736−277:15 NEWLINE
1756+276:10 tight glyph ]
1737−277:15 glyph [
1757+276:12 glyph ^-
1738−277:16 tight name next
1758+276:15 glyph (
1739−277:21 name more
1759+276:16 tight name list
1740−277:25 tight glyph ]
1760+276:21 tvar B
1741−277:27 glyph [
1761+276:22 tight glyph )
1742−277:28 tight name item
1762+277:9 INDENT
1743−277:33 glyph [
1763+277:9 glyph ?-
1744−277:34 tight name separator
1764+277:12 name xs
1745−277:44 glyph (
1765+278:11 INDENT
1746−277:45 tight name join
1766+278:11 lit ~
1747−277:50 name separator
1767+278:13 lit ~
1748−277:60 name rest
1768+279:11 NEWLINE
1749−277:64 tight glyph )
1769+279:11 glyph [
1750−277:65 tight glyph ]
1770+279:12 tight name item
1751−277:66 tight glyph ]
1771+279:17 name rest
1752−279:1 DEDENT
1772+279:21 tight glyph ]
1753−279:1 DEDENT
1773+280:13 INDENT
1754−279:1 DEDENT
1774+280:13 glyph ?-
1755−279:1 DEDENT
1775+280:16 glyph (
1756−279:1 DEDENT
1776+280:17 tight name f
1757−279:1 DEDENT
1777+280:19 name item
1758−279:1 NEWLINE
1778+280:23 tight glyph )
1759−279:1 glyph ++
1779+281:15 INDENT
1760−279:4 name snip
1780+281:15 lit ~
1761−279:9 glyph |=
1781+281:17 glyph (
1762−279:12 name xs
1782+281:18 tight name murn
1763−279:14 tight glyph =
1783+281:23 name rest
1764−279:15 tight glyph (
1784+281:28 name f
1765−279:16 tight name list
1785+281:29 tight glyph )
1766−279:21 tvar A
1786+282:15 NEWLINE
1767−279:22 tight glyph )
1787+282:15 glyph [
1768−280:3 INDENT
1788+282:16 tight lit ~
1769−280:3 glyph ^-
1789+282:18 name value
1770−280:6 glyph (
1790+282:23 tight glyph ]
1771−280:7 tight name list
1791+282:25 glyph [
1772−280:12 tvar A
1792+282:26 tight name value
1773−280:13 tight glyph )
1793+282:32 glyph (
1774−281:5 INDENT
1794+282:33 tight name murn
1775−281:5 glyph ?-
1795+282:38 name rest
1776−281:8 name xs
1796+282:43 name f
1777−282:7 INDENT
1797+282:44 tight glyph )
1778−282:7 lit ~
1798+282:45 tight glyph ]
1779−282:9 lit ~
1799+284:1 DEDENT
1780−283:7 NEWLINE
1800+284:1 DEDENT
1781−283:7 glyph [
1801+284:1 DEDENT
1782−283:8 tight name item
1802+284:1 DEDENT
1783−283:13 name rest
1803+284:1 DEDENT
1784−283:17 tight glyph ]
1804+284:1 DEDENT
1785−284:9 INDENT
1805+284:1 NEWLINE
1786−284:9 glyph ?-
1806+284:1 glyph ++
1787−284:12 name rest
1807+284:4 name join
1788−285:11 INDENT
1808+284:9 glyph |=
1789−285:11 lit ~
1809+284:12 name args
1790−285:13 lit ~
1810+284:16 tight glyph =
1791−286:11 NEWLINE
1811+284:17 tight glyph [
1792−286:11 glyph [
1812+284:18 tight tvar A
1793−286:12 tight name next
1813+284:20 glyph (
1794−286:17 name more
1814+284:21 tight name list
1795−286:21 tight glyph ]
1815+284:26 tvar A
1796−286:23 glyph [
1816+284:27 tight glyph )
1797−286:24 tight name item
1817+284:28 tight glyph ]
1798−286:29 glyph (
1818+285:3 INDENT
1799−286:30 tight name snip
1819+285:3 glyph ?-
1800−286:35 name rest
1820+285:6 name args
1801−286:39 tight glyph )
1821+286:5 INDENT
1802−286:40 tight glyph ]
1822+286:5 glyph [
1803−288:1 DEDENT
1823+286:6 tight name separator
1804−288:1 DEDENT
1824+286:16 name xs
1805−288:1 DEDENT
1825+286:18 tight glyph ]
1806−288:1 DEDENT
1826+286:20 glyph ^-
1807−288:1 DEDENT
1827+286:23 glyph (
1808−288:1 NEWLINE
1828+286:24 tight name list
1809−288:1 glyph ++
1829+286:29 tvar A
1810−288:4 name rear
1830+286:30 tight glyph )
1811−288:9 glyph |=
1831+287:9 INDENT
1812−288:12 name xs
1832+287:9 glyph ?-
1813−288:14 tight glyph =
1833+287:12 name xs
1814−288:15 tight glyph (
1834+288:11 INDENT
1815−288:16 tight name list
1835+288:11 lit ~
1816−288:21 tvar A
1836+288:13 lit ~
1817−288:22 tight glyph )
1837+289:11 NEWLINE
1818−289:3 INDENT
1838+289:11 glyph [
1819−289:3 glyph ?-
1839+289:12 tight name item
1820−289:6 name xs
1840+289:17 name rest
1821−290:5 INDENT
1841+289:21 tight glyph ]
1822−290:5 lit ~
1842+290:13 INDENT
1823−290:7 glyph !!
1843+290:13 glyph ?-
1824−291:5 NEWLINE
1844+290:16 name rest
1825−291:5 glyph [
1845+291:15 INDENT
1826−291:6 tight name item
1846+291:15 lit ~
1827−291:11 name rest
1847+291:17 glyph [
1828−291:15 tight glyph ]
1848+291:18 tight name item
1829−292:7 INDENT
1849+291:23 lit ~
1830−292:7 glyph ?-
1850+291:24 tight glyph ]
1831−292:10 name rest
1851+292:15 NEWLINE
1832−293:9 INDENT
1852+292:15 glyph [
1833−293:9 lit ~
1853+292:16 tight name next
1834−293:11 name item
1854+292:21 name more
1835−294:9 NEWLINE
1855+292:25 tight glyph ]
1836−294:9 glyph [
1856+292:27 glyph [
1837−294:10 tight name next
1857+292:28 tight name item
1838−294:15 name more
1858+292:33 glyph [
1839−294:19 tight glyph ]
1859+292:34 tight name separator
1840−294:21 glyph (
1860+292:44 glyph (
1841−294:22 tight name rear
1861+292:45 tight name join
1842−294:27 name rest
1862+292:50 name separator
1843−294:31 tight glyph )
1863+292:60 name rest
1844−296:1 DEDENT
1864+292:64 tight glyph )
1845−296:1 DEDENT
1865+292:65 tight glyph ]
1846−296:1 DEDENT
1866+292:66 tight glyph ]
1847−296:1 DEDENT
1867+294:1 DEDENT
1848−296:1 NEWLINE
1868+294:1 DEDENT
1849−296:1 glyph ++
1869+294:1 DEDENT
1850−296:4 name cork
1870+294:1 DEDENT
1851−296:9 glyph |=
1871+294:1 DEDENT
1852−296:12 name gates
1872+294:1 DEDENT
1853−296:17 tight glyph =
1873+294:1 NEWLINE
1854−296:18 tight glyph [
1874+294:1 glyph ++
1855−296:19 tight glyph $-(
1875+294:4 name snip
1856−296:22 tight tvar A
1876+294:9 glyph |=
1857−296:24 tvar B
1877+294:12 name xs
1858−296:25 tight glyph )
1878+294:14 tight glyph =
1859−296:27 glyph $-(
1879+294:15 tight glyph (
1860−296:30 tight tvar B
1880+294:16 tight name list
1861−296:32 tvar C
1881+294:21 tvar A
1862−296:33 tight glyph )
1882+294:22 tight glyph )
1863−296:34 tight glyph ]
1883+295:3 INDENT
1864−297:3 INDENT
1884+295:3 glyph ^-
1865−297:3 glyph ?-
1885+295:6 glyph (
1866−297:6 name gates
1886+295:7 tight name list
1867−298:5 INDENT
1887+295:12 tvar A
1868−298:5 glyph [
1888+295:13 tight glyph )
1869−298:6 tight name f
1889+296:5 INDENT
1870−298:8 name g
1890+296:5 glyph ?-
1871−298:9 tight glyph ]
1891+296:8 name xs
1872−298:11 glyph |=
1892+297:7 INDENT
1873−298:14 name x
1893+297:7 lit ~
1874−298:15 tight glyph =
1894+297:9 lit ~
1875−298:16 tight tvar A
1895+298:7 NEWLINE
1876−298:18 glyph (
1896+298:7 glyph [
1877−298:19 tight name g
1897+298:8 tight name item
1878−298:21 glyph (
1898+298:13 name rest
1879−298:22 tight name f
1899+298:17 tight glyph ]
1880−298:24 name x
1900+299:9 INDENT
1881−298:25 tight glyph )
1901+299:9 glyph ?-
1882−298:26 tight glyph )
1902+299:12 name rest
1883−300:1 DEDENT
1903+300:11 INDENT
1884−300:1 DEDENT
1904+300:11 lit ~
1885−300:1 NEWLINE
1905+300:13 lit ~
1886−300:1 glyph ++
1906+301:11 NEWLINE
1887−300:4 name corl
1907+301:11 glyph [
1888−300:9 glyph |=
1908+301:12 tight name next
1889−300:12 name gates
1909+301:17 name more
1890−300:17 tight glyph =
1910+301:21 tight glyph ]
1891−300:18 tight glyph [
1911+301:23 glyph [
1892−300:19 tight glyph $-(
1912+301:24 tight name item
1893−300:22 tight tvar B
1913+301:29 glyph (
1894−300:24 tvar C
1914+301:30 tight name snip
1895−300:25 tight glyph )
1915+301:35 name rest
1896−300:27 glyph $-(
1916+301:39 tight glyph )
1897−300:30 tight tvar A
1917+301:40 tight glyph ]
1898−300:32 tvar B
1918+303:1 DEDENT
1899−300:33 tight glyph )
1919+303:1 DEDENT
1900−300:34 tight glyph ]
1920+303:1 DEDENT
1901−301:3 INDENT
1921+303:1 DEDENT
1902−301:3 glyph ?-
1922+303:1 DEDENT
1903−301:6 name gates
1923+303:1 NEWLINE
1904−302:5 INDENT
1924+303:1 glyph ++
1905−302:5 glyph [
1925+303:4 name rear
1906−302:6 tight name f
1926+303:9 glyph |=
1907−302:8 name g
1927+303:12 name xs
1908−302:9 tight glyph ]
1928+303:14 tight glyph =
1909−302:11 glyph |=
1929+303:15 tight glyph (
1910−302:14 name x
1930+303:16 tight name list
1911−302:15 tight glyph =
1931+303:21 tvar A
1912−302:16 tight tvar A
1932+303:22 tight glyph )
1913−302:18 glyph (
1933+304:3 INDENT
1914−302:19 tight name f
1934+304:3 glyph ?-
1915−302:21 glyph (
1935+304:6 name xs
1916−302:22 tight name g
1936+305:5 INDENT
1917−302:24 name x
1937+305:5 lit ~
1918−302:25 tight glyph )
1938+305:7 glyph !!
1919−302:26 tight glyph )
1939+306:5 NEWLINE
1920−304:1 DEDENT
1921−304:1 DEDENT
1922−304:1 NEWLINE
1923−304:1 glyph ++
1924−304:4 name cury
1925−304:9 glyph |=
1926−304:12 name args
1927−304:16 tight glyph =
1928−304:17 tight glyph [
1929−304:18 tight glyph $-(
1930−304:21 tight glyph [
1931−304:22 tight tvar A
1932−304:24 tvar B
1933−304:25 tight glyph ]
1934−304:27 tvar C
1935−304:28 tight glyph )
1936−304:30 tvar A
1937−304:31 tight glyph ]
1938−305:3 INDENT
1939−305:3 glyph ?-
1940−305:6 name args
1941−306:5 INDENT
1942306:5 glyph [
1940306:5 glyph [
1943−306:6 tight name f
1941+306:6 tight name item
1944−306:8 name a
1942+306:11 name rest
1945−306:9 tight glyph ]
1943+306:15 tight glyph ]
1946−306:11 glyph |=
1944+307:7 INDENT
1947−306:14 name b
1945+307:7 glyph ?-
1948−306:15 tight glyph =
1946+307:10 name rest
1949−306:16 tight tvar B
1947+308:9 INDENT
1950−306:18 glyph (
1948+308:9 lit ~
1951−306:19 tight name f
1949+308:11 name item
1952−306:21 name a
1950+309:9 NEWLINE
1953−306:23 name b
1951+309:9 glyph [
1954−306:24 tight glyph )
1952+309:10 tight name next
1955−308:1 DEDENT
1953+309:15 name more
1956−308:1 DEDENT
1954+309:19 tight glyph ]
1957−308:1 NEWLINE
1955+309:21 glyph (
1958−308:1 glyph ++
1956+309:22 tight name rear
1959−308:4 name curr
1957+309:27 name rest
1960−308:9 glyph |=
1958+309:31 tight glyph )
1961−308:12 name args
1959+311:1 DEDENT
1962−308:16 tight glyph =
1960+311:1 DEDENT
1963−308:17 tight glyph [
1961+311:1 DEDENT
1964−308:18 tight glyph $-(
1962+311:1 DEDENT
1965−308:21 tight glyph [
1963+311:1 NEWLINE
1966−308:22 tight tvar A
1964+311:1 glyph ++
1967−308:24 tvar B
1965+311:4 name cork
1968−308:25 tight glyph ]
1966+311:9 glyph |=
1969−308:27 tvar C
1967+311:12 name gates
1970−308:28 tight glyph )
1968+311:17 tight glyph =
1971−308:30 tvar B
1969+311:18 tight glyph [
1972−308:31 tight glyph ]
1970+311:19 tight glyph $-(
1973−309:3 INDENT
1971+311:22 tight tvar A
1974−309:3 glyph ?-
1972+311:24 tvar B
1975−309:6 name args
1973+311:25 tight glyph )
1976−310:5 INDENT
1974+311:27 glyph $-(
1977−310:5 glyph [
1975+311:30 tight tvar B
1978−310:6 tight name f
1976+311:32 tvar C
1979−310:8 name b
1977+311:33 tight glyph )
1980−310:9 tight glyph ]
1978+311:34 tight glyph ]
1981−310:11 glyph |=
1979+312:3 INDENT
1982−310:14 name a
1980+312:3 glyph ?-
1983−310:15 tight glyph =
1981+312:6 name gates
1984−310:16 tight tvar A
1982+313:5 INDENT
1985−310:18 glyph (
1983+313:5 glyph [
1986−310:19 tight name f
1984+313:6 tight name f
1987−310:21 name a
1985+313:8 name g
1988−310:23 name b
1986+313:9 tight glyph ]
1989−310:24 tight glyph )
1987+313:11 glyph |=
1990−312:1 DEDENT
1988+313:14 name x
1991−312:1 DEDENT
1989+313:15 tight glyph =
1992−312:1 NEWLINE
1990+313:16 tight tvar A
1993−312:1 glyph +$
1991+313:18 glyph (
1994−312:4 name cmd
1992+313:19 tight name g
1995−312:8 glyph |$
1993+313:21 glyph (
1996−312:11 glyph [
1994+313:22 tight name f
1997−312:12 tight tvar M
1995+313:24 name x
1998−312:13 tight glyph ]
1996+313:25 tight glyph )
1999−313:3 INDENT
1997+313:26 tight glyph )
2000−313:3 glyph [
1998+315:1 DEDENT
2001−313:4 tight lit %poke
1999+315:1 DEDENT
2002−313:10 name p
2000+315:1 NEWLINE
2003−313:11 tight glyph =
2001+315:1 glyph ++
2004−313:12 tight name poke
2002+315:4 name corl
2005−313:17 name reply
2003+315:9 glyph |=
2006−313:22 tight glyph =
2004+315:12 name gates
2007−313:23 tight glyph $-(
2005+315:17 tight glyph =
2008−313:26 tight glyph (
2006+315:18 tight glyph [
2009−313:27 tight name unit
2007+315:19 tight glyph $-(
2010−313:32 aura @t
2008+315:22 tight tvar B
2011−313:34 tight glyph )
2009+315:24 tvar C
2012−313:36 tvar M
2010+315:25 tight glyph )
2013−313:37 tight glyph )
2011+315:27 glyph $-(
2014−313:38 tight glyph ]
2012+315:30 tight tvar A
2015−314:3 NEWLINE
2013+315:32 tvar B
2016−314:3 glyph [
2014+315:33 tight glyph )
2017−314:4 tight lit %go
2015+315:34 tight glyph ]
2018−314:8 name url
2016+316:3 INDENT
2019−314:11 tight glyph =
2017+316:3 glyph ?-
2020−314:12 tight aura @t
2018+316:6 name gates
2021−314:14 tight glyph ]
2019+317:5 INDENT
2022−315:3 NEWLINE
2020+317:5 glyph [
2023−315:3 glyph [
2021+317:6 tight name f
2024−315:4 tight lit %wait
2022+317:8 name g
2025−315:10 name gap
2023+317:9 tight glyph ]
2026−315:13 tight glyph =
2024+317:11 glyph |=
2027−315:14 tight aura @dr
2025+317:14 name x
2028−315:18 name msg
2026+317:15 tight glyph =
2029−315:21 tight glyph =
2027+317:16 tight tvar A
2030−315:22 tight tvar M
2028+317:18 glyph (
2031−315:23 tight glyph ]
2029+317:19 tight name f
2032−316:3 NEWLINE
2030+317:21 glyph (
2033−316:3 glyph [
2031+317:22 tight name g
2034−316:4 tight lit %now
2032+317:24 name x
2035−316:9 name reply
2033+317:25 tight glyph )
2036−316:14 tight glyph =
2034+317:26 tight glyph )
2037−316:15 tight glyph $-(
2035+319:1 DEDENT
2038−316:18 tight aura @da
2039−316:22 tvar M
2040−316:23 tight glyph )
2041−316:24 tight glyph ]
2042−317:3 NEWLINE
2043−317:3 glyph [
2044−317:4 tight lit %who
2045−317:9 name reply
2046−317:14 tight glyph =
2047−317:15 tight glyph $-(
2048−317:18 tight aura @p
2049−317:21 tvar M
2050−317:22 tight glyph )
2051−317:23 tight glyph ]
2052319:1 DEDENT
2036319:1 DEDENT
2053319:1 NEWLINE
2037319:1 NEWLINE
2054319:1 glyph ++
2038319:1 glyph ++
2055−319:4 name gth
2039+319:4 name cury
2056−319:8 glyph |=
2040+319:9 glyph |=
2057−319:11 name args
2041+319:12 name args
2058−319:15 tight glyph =
2042+319:16 tight glyph =
2059−319:16 tight glyph [
2043+319:17 tight glyph [
2060−319:17 tight tvar A
2044+319:18 tight glyph $-(
2061−319:19 tvar A
2045+319:21 tight glyph [
2062−319:20 tight glyph ]
2046+319:22 tight tvar A
2063−319:22 glyph (
2047+319:24 tvar B
2064−319:23 tight wing gth-atom.internal
2048+319:25 tight glyph ]
2065−319:41 name args
2049+319:27 tvar C
2066−319:45 tight glyph )
2050+319:28 tight glyph )
2067−319:46 NEWLINE
2051+319:30 tvar A
2052+319:31 tight glyph ]
2053+320:3 INDENT
2054+320:3 glyph ?-
2055+320:6 name args
2056+321:5 INDENT
2057+321:5 glyph [
2058+321:6 tight name f
2059+321:8 name a
2060+321:9 tight glyph ]
2061+321:11 glyph |=
2062+321:14 name b
2063+321:15 tight glyph =
2064+321:16 tight tvar B
2065+321:18 glyph (
2066+321:19 tight name f
2067+321:21 name a
2068+321:23 name b
2069+321:24 tight glyph )
2070+323:1 DEDENT
2071+323:1 DEDENT
2072+323:1 NEWLINE
2073+323:1 glyph ++
2074+323:4 name curr
2075+323:9 glyph |=
2076+323:12 name args
2077+323:16 tight glyph =
2078+323:17 tight glyph [
2079+323:18 tight glyph $-(
2080+323:21 tight glyph [
2081+323:22 tight tvar A
2082+323:24 tvar B
2083+323:25 tight glyph ]
2084+323:27 tvar C
2085+323:28 tight glyph )
2086+323:30 tvar B
2087+323:31 tight glyph ]
2088+324:3 INDENT
2089+324:3 glyph ?-
2090+324:6 name args
2091+325:5 INDENT
2092+325:5 glyph [
2093+325:6 tight name f
2094+325:8 name b
2095+325:9 tight glyph ]
2096+325:11 glyph |=
2097+325:14 name a
2098+325:15 tight glyph =
2099+325:16 tight tvar A
2100+325:18 glyph (
2101+325:19 tight name f
2102+325:21 name a
2103+325:23 name b
2104+325:24 tight glyph )
2105+327:1 DEDENT
2106+327:1 DEDENT
2107+327:1 NEWLINE
2108+327:1 glyph +$
2109+327:4 name cmd
2110+327:8 glyph |$
2111+327:11 glyph [
2112+327:12 tight tvar M
2113+327:13 tight glyph ]
2114+328:3 INDENT
2115+328:3 glyph [
2116+328:4 tight lit %poke
2117+328:10 name p
2118+328:11 tight glyph =
2119+328:12 tight name poke
2120+328:17 name reply
2121+328:22 tight glyph =
2122+328:23 tight glyph $-(
2123+328:26 tight glyph (
2124+328:27 tight name unit
2125+328:32 aura @t
2126+328:34 tight glyph )
2127+328:36 tvar M
2128+328:37 tight glyph )
2129+328:38 tight glyph ]
2130+329:3 NEWLINE
2131+329:3 glyph [
2132+329:4 tight lit %go
2133+329:8 name url
2134+329:11 tight glyph =
2135+329:12 tight aura @t
2136+329:14 tight glyph ]
2137+330:3 NEWLINE
2138+330:3 glyph [
2139+330:4 tight lit %wait
2140+330:10 name gap
2141+330:13 tight glyph =
2142+330:14 tight aura @dr
2143+330:18 name msg
2144+330:21 tight glyph =
2145+330:22 tight tvar M
2146+330:23 tight glyph ]
2147+331:3 NEWLINE
2148+331:3 glyph [
2149+331:4 tight lit %now
2150+331:9 name reply
2151+331:14 tight glyph =
2152+331:15 tight glyph $-(
2153+331:18 tight aura @da
2154+331:22 tvar M
2155+331:23 tight glyph )
2156+331:24 tight glyph ]
2157+332:3 NEWLINE
2158+332:3 glyph [
2159+332:4 tight lit %who
2160+332:9 name reply
2161+332:14 tight glyph =
2162+332:15 tight glyph $-(
2163+332:18 tight aura @p
2164+332:21 tvar M
2165+332:22 tight glyph )
2166+332:23 tight glyph ]
2167+334:1 DEDENT
2168+334:1 NEWLINE
2169+334:1 glyph ++
2170+334:4 name gth
2171+334:8 glyph |=
2172+334:11 name args
2173+334:15 tight glyph =
2174+334:16 tight glyph [
2175+334:17 tight tvar A
2176+334:19 tvar A
2177+334:20 tight glyph ]
2178+334:22 glyph (
2179+334:23 tight wing gth-atom.internal
2180+334:41 name args
2181+334:45 tight glyph )
2182+335:1 NEWLINE
2183+335:1 glyph ++
2184+335:4 name add
2185+335:8 glyph |=
2186+335:11 name args
2187+335:15 tight glyph =
2188+335:16 tight glyph [
2189+335:17 tight tvar A
2190+335:19 tvar A
2191+335:20 tight glyph ]
2192+335:22 glyph (
2193+335:23 tight wing add-atom.internal
2194+335:41 name args
2195+335:45 tight glyph )
2196+336:1 NEWLINE
2197+336:1 glyph ++
2198+336:4 name dec
2199+336:8 glyph |=
2200+336:11 name atom
2201+336:15 tight glyph =
2202+336:16 tight tvar A
2203+336:18 glyph (
2204+336:19 tight wing dec-atom.internal
2205+336:37 name atom
2206+336:41 tight glyph )
2207+338:1 NEWLINE
2208+338:1 glyph +$
2209+338:4 name ask
2210+338:8 glyph |$
2211+338:11 glyph [
2212+338:12 tight tvar M
2213+338:13 tight glyph ]
2214+338:15 glyph (
2215+338:16 tight wing ask.internal
2216+338:29 tvar M
2217+338:30 tight glyph )
2218+339:1 NEWLINE
2219+339:1 glyph ++
2220+339:4 name pure
2221+339:9 glyph |=
2222+339:12 name x
2223+339:13 tight glyph =
2224+339:14 tight tvar M
2225+339:16 glyph ^-
2226+339:19 glyph (
2227+339:20 tight name ask
2228+339:24 tvar M
2229+339:25 tight glyph )
2230+339:27 glyph [
2231+339:28 tight lit %pure
2232+339:34 name x
2233+339:35 tight glyph ]
2234+339:36 NEWLINE
tests/golden/prelude-unit-list-transforms/tree.txt+956−885
@@ -1,901 +1,972 @@
1(module
1(module
2 (jibb 1:1 internal /lib/jibb/internal)
2 (jibb 1:1 internal /lib/jibb/internal)
3 (mold 2:1 poke (ref 2:9 poke.internal))
3 (mold 2:1 poke (ref 2:9 poke.internal))
4− (value 6:1 same
4+ (mold 3:1 qath (ref 3:9 qath.internal))
5− (gate 6:9
5+ (value 7:1 same
6− (face 6:12 x (tvar 6:14 A))
6+ (gate 7:9
7− (wing 6:16 x)))
7+ (face 7:12 x (tvar 7:14 A))
8− (value 8:1 head
8+ (wing 7:16 x)))
9− (gate 8:9
9+ (value 9:1 head
10− (face 8:12 p
10+ (gate 9:9
11− (cell 8:14 (tvar 8:15 A) (tvar 8:17 B)))
11+ (face 9:12 p
12− (body 9:3
12+ (cell 9:14 (tvar 9:15 A) (tvar 9:17 B)))
13− (branch 9:3
13+ (body 10:3
14− (wing 9:6 p)
14+ (branch 10:3
15− (arm 10:5
15+ (wing 10:6 p)
16− (cell 10:5 (bind 10:6 a) (bind 10:8 b))
16+ (arm 11:5
17− (wing 10:11 a))))))
17+ (cell 11:5 (bind 11:6 a) (bind 11:8 b))
18− (value 12:1 tail
18+ (wing 11:11 a))))))
19− (gate 12:9
19+ (value 13:1 tail
20− (face 12:12 p
20+ (gate 13:9
21− (cell 12:14 (tvar 12:15 A) (tvar 12:17 B)))
21+ (face 13:12 p
22− (body 13:3
22+ (cell 13:14 (tvar 13:15 A) (tvar 13:17 B)))
23− (branch 13:3
23+ (body 14:3
24− (wing 13:6 p)
24+ (branch 14:3
25− (arm 14:5
25+ (wing 14:6 p)
26− (cell 14:5 (bind 14:6 a) (bind 14:8 b))
26+ (arm 15:5
27− (wing 14:11 b))))))
27+ (cell 15:5 (bind 15:6 a) (bind 15:8 b))
28− (value 16:1 not
28+ (wing 15:11 b))))))
29− (gate 16:8
29+ (value 17:1 not
30− (face 16:11 b (flag 16:13))
30+ (gate 17:8
31− (body 17:3
31+ (face 17:11 b (flag 17:13))
32− (branch 17:3
32+ (body 18:3
33− (wing 17:6 b)
33+ (branch 18:3
34− (arm 18:5 (lit 18:5 %.y) (lit 18:9 %.n))
34+ (wing 18:6 b)
35− (arm 19:5 (lit 19:5 %.n) (lit 19:9 %.y))))))
35+ (arm 19:5 (lit 19:5 %.y) (lit 19:9 %.n))
36− (mold 21:1 list
36+ (arm 20:5 (lit 20:5 %.n) (lit 20:9 %.y))))))
37− (generic 21:9 A
37+ (mold 22:1 list
38− (union 22:3
38+ (generic 22:9 A
39− (const 22:3 ~)
39+ (union 23:3
40− (cell 23:3
40+ (const 23:3 ~)
41− (face 23:4 i (tvar 23:6 A))
41+ (cell 24:3
42− (face 23:8 t
42+ (face 24:4 i (tvar 24:6 A))
43− (apply 23:10 list (tvar 23:16 A)))))))
43+ (face 24:8 t
44− (mold 25:1 unit
44+ (apply 24:10 list (tvar 24:16 A)))))))
45− (generic 25:9 A
45+ (mold 26:1 unit
46− (union 26:3
46+ (generic 26:9 A
47− (const 26:3 ~)
47+ (union 27:3
48− (cell 27:3
48+ (const 27:3 ~)
49− (const 27:4 ~)
49+ (cell 28:3
50− (face 27:6 u (tvar 27:8 A))))))
50+ (const 28:4 ~)
51− (value 29:1 fall
51+ (face 28:6 u (tvar 28:8 A))))))
52− (gate 29:9
52+ (value 30:1 fall
53− (face 29:12 args
53+ (gate 30:9
54− (cell 29:17
54+ (face 30:12 args
55− (apply 29:18 unit (tvar 29:24 A))
55+ (cell 30:17
56− (tvar 29:27 A)))
56+ (apply 30:18 unit (tvar 30:24 A))
57− (body 30:3
57+ (tvar 30:27 A)))
58− (branch 30:3
58+ (body 31:3
59− (wing 30:6 args)
59+ (branch 31:3
60− (arm 31:5
60+ (wing 31:6 args)
61− (cell 31:5 (bind 31:6 maybe) (bind 31:12 fallback))
61+ (arm 32:5
62− (body 32:7
62+ (cell 32:5 (bind 32:6 maybe) (bind 32:12 fallback))
63− (branch 32:7
63+ (body 33:7
64− (wing 32:10 maybe)
64+ (branch 33:7
65− (arm 33:9 (lit 33:9 ~) (wing 33:11 fallback))
65+ (wing 33:10 maybe)
66− (arm 34:9
66+ (arm 34:9 (lit 34:9 ~) (wing 34:11 fallback))
67− (cell 34:9 (lit 34:10 ~) (bind 34:12 value))
67+ (arm 35:9
68− (wing 34:19 value)))))))))
68+ (cell 35:9 (lit 35:10 ~) (bind 35:12 value))
69− (value 36:1 need
69+ (wing 35:19 value)))))))))
70− (gate 36:9
70+ (value 37:1 need
71− (face 36:12 maybe
71+ (gate 37:9
72− (apply 36:18 unit (tvar 36:24 A)))
72+ (face 37:12 maybe
73− (body 37:3
73+ (apply 37:18 unit (tvar 37:24 A)))
74− (branch 37:3
74+ (body 38:3
75− (wing 37:6 maybe)
75+ (branch 38:3
76− (arm 38:5 (lit 38:5 ~) (crash 38:7))
76+ (wing 38:6 maybe)
77− (arm 39:5
77+ (arm 39:5 (lit 39:5 ~) (crash 39:7))
78− (cell 39:5 (lit 39:6 ~) (bind 39:8 value))
78+ (arm 40:5
79− (wing 39:15 value))))))
79+ (cell 40:5 (lit 40:6 ~) (bind 40:8 value))
80− (value 41:1 weld
80+ (wing 40:15 value))))))
81− (gate 41:9
81+ (value 42:1 weld
82− (face 41:12 args
82+ (gate 42:9
83− (cell 41:17
83+ (face 42:12 args
84− (apply 41:18 list (tvar 41:24 A))
84+ (cell 42:17
85− (apply 41:27 list (tvar 41:33 A))))
85+ (apply 42:18 list (tvar 42:24 A))
86− (body 42:3
86+ (apply 42:27 list (tvar 42:33 A))))
87− (branch 42:3
87+ (body 43:3
88− (wing 42:6 args)
88+ (branch 43:3
89− (arm 43:5
89+ (wing 43:6 args)
90− (cell 43:5 (bind 43:6 xs) (bind 43:9 ys))
90+ (arm 44:5
91− (body 44:7
91+ (cell 44:5 (bind 44:6 xs) (bind 44:9 ys))
92− (cast 44:7
92+ (body 45:7
93− (apply 44:10 list (tvar 44:16 A))
93+ (cast 45:7
94− (body 45:9
94+ (apply 45:10 list (tvar 45:16 A))
95− (branch 45:9
95+ (body 46:9
96− (wing 45:12 xs)
96+ (branch 46:9
97− (arm 46:11 (lit 46:11 ~) (wing 46:13 ys))
97+ (wing 46:12 xs)
98− (arm 47:11
98+ (arm 47:11 (lit 47:11 ~) (wing 47:13 ys))
99− (cell 47:11 (bind 47:12 item) (bind 47:17 rest))
99+ (arm 48:11
100− (tuple 47:23
100+ (cell 48:11 (bind 48:12 item) (bind 48:17 rest))
101− (wing 47:24 item)
101+ (tuple 48:23
102− (group 47:29
102+ (wing 48:24 item)
103− (call 47:30 (wing 47:30 weld) (wing 47:35 rest) (wing 47:40 ys))))))))))))))
103+ (group 48:29
104− (value 49:1 turn
104+ (call 48:30 (wing 48:30 weld) (wing 48:35 rest) (wing 48:40 ys))))))))))))))
105− (gate 49:9
105+ (value 50:1 turn
106− (face 49:12 args
106+ (gate 50:9
107− (cell 49:17
107+ (face 50:12 args
108− (apply 49:18 list (tvar 49:24 A))
108+ (cell 50:17
109− (fn 49:27 (tvar 49:30 A) (tvar 49:32 B))))
109+ (apply 50:18 list (tvar 50:24 A))
110− (body 50:3
110+ (fn 50:27 (tvar 50:30 A) (tvar 50:32 B))))
111− (branch 50:3
111+ (body 51:3
112− (wing 50:6 args)
112+ (branch 51:3
113− (arm 51:5
113+ (wing 51:6 args)
114− (cell 51:5 (bind 51:6 xs) (bind 51:9 f))
114+ (arm 52:5
115− (body 52:7
115+ (cell 52:5 (bind 52:6 xs) (bind 52:9 f))
116− (cast 52:7
116+ (body 53:7
117− (apply 52:10 list (tvar 52:16 B))
117+ (cast 53:7
118− (body 53:9
118+ (apply 53:10 list (tvar 53:16 B))
119− (branch 53:9
119+ (body 54:9
120− (wing 53:12 xs)
120+ (branch 54:9
121− (arm 54:11 (lit 54:11 ~) (lit 54:13 ~))
121+ (wing 54:12 xs)
122− (arm 55:11
122+ (arm 55:11 (lit 55:11 ~) (lit 55:13 ~))
123− (cell 55:11 (bind 55:12 item) (bind 55:17 rest))
123+ (arm 56:11
124− (tuple 55:23
124+ (cell 56:11 (bind 56:12 item) (bind 56:17 rest))
125− (group 55:24
125+ (tuple 56:23
126− (call 55:25 (wing 55:25 f) (wing 55:27 item)))
126+ (group 56:24
127− (group 55:33
127+ (call 56:25 (wing 56:25 f) (wing 56:27 item)))
128− (call 55:34 (wing 55:34 turn) (wing 55:39 rest) (wing 55:44 f))))))))))))))
128+ (group 56:33
129− (mold 57:1 dime
129+ (call 56:34 (wing 56:34 turn) (wing 56:39 rest) (wing 56:44 f))))))))))))))
130− (cell 57:9
130+ (mold 58:1 dime
131− (face 57:10 p (aura 57:12 @ta))
131+ (cell 58:9
132− (face 57:16 q (aura 57:18 @))))
132+ (face 58:10 p (aura 58:12 @ta))
133− (mold 59:1 hair
133+ (face 58:16 q (aura 58:18 @))))
134− (cell 59:9
134+ (mold 60:1 hair
135− (face 59:10 p (aura 59:12 @ud))
135+ (cell 60:9
136− (face 59:16 q (aura 59:18 @ud))))
136+ (face 60:10 p (aura 60:12 @ud))
137− (mold 61:1 pint
137+ (face 60:16 q (aura 60:18 @ud))))
138− (cell 61:9
138+ (mold 62:1 pint
139− (face 61:10 p
139+ (cell 62:9
140− (cell 61:12
140+ (face 62:10 p
141− (face 61:13 p (aura 61:15 @))
141+ (cell 62:12
142− (face 61:17 q (aura 61:19 @))))
142+ (face 62:13 p (aura 62:15 @))
143− (face 61:22 q
143+ (face 62:17 q (aura 62:19 @))))
144− (cell 61:24
144+ (face 62:22 q
145− (face 61:25 p (aura 61:27 @))
145+ (cell 62:24
146− (face 61:29 q (aura 61:31 @))))))
146+ (face 62:25 p (aura 62:27 @))
147− (mold 63:1 coin
147+ (face 62:29 q (aura 62:31 @))))))
148− (union 64:3
148+ (mold 64:1 coin
149− (cell 64:3
149+ (union 65:3
150− (const 64:4 %$)
151− (face 64:7 p (ref 64:9 dime)))
152 (cell 65:3
150 (cell 65:3
153− (const 65:4 %blob)
151+ (const 65:4 %$)
154− (face 65:10 p (noun 65:12)))
152+ (face 65:7 p (ref 65:9 dime)))
155 (cell 66:3
153 (cell 66:3
156− (const 66:4 %many)
154+ (const 66:4 %blob)
157− (face 66:10 p
155+ (face 66:10 p (noun 66:12)))
158− (apply 66:12 list (ref 66:18 coin))))))
156+ (cell 67:3
159− (mold 68:1 pair
157+ (const 67:4 %many)
160− (generic 68:9 A B
158+ (face 67:10 p
161− (cell 68:18
159+ (apply 67:12 list (ref 67:18 coin))))))
162− (face 68:19 p (tvar 68:21 A))
160+ (mold 69:1 pair
163− (face 68:23 q (tvar 68:25 B)))))
161+ (generic 69:9 A B
164− (mold 70:1 trel
162+ (cell 69:18
165− (generic 70:9 A B C
163+ (face 69:19 p (tvar 69:21 A))
166− (cell 70:20
164+ (face 69:23 q (tvar 69:25 B)))))
167− (face 70:21 p (tvar 70:23 A))
165+ (mold 71:1 trel
168− (face 70:25 q (tvar 70:27 B))
166+ (generic 71:9 A B C
169− (face 70:29 r (tvar 70:31 C)))))
167+ (cell 71:20
170− (mold 72:1 qual
168+ (face 71:21 p (tvar 71:23 A))
171− (generic 72:9 A B C D
169+ (face 71:25 q (tvar 71:27 B))
172− (cell 72:22
170+ (face 71:29 r (tvar 71:31 C)))))
173− (face 72:23 p (tvar 72:25 A))
171+ (mold 73:1 qual
174− (face 72:27 q (tvar 72:29 B))
172+ (generic 73:9 A B C D
175− (face 72:31 r (tvar 72:33 C))
173+ (cell 73:22
176− (face 72:35 s (tvar 72:37 D)))))
174+ (face 73:23 p (tvar 73:25 A))
177− (mold 74:1 cord (aura 74:9 @t))
175+ (face 73:27 q (tvar 73:29 B))
178− (mold 76:1 knot (aura 76:9 @ta))
176+ (face 73:31 r (tvar 73:33 C))
179− (mold 78:1 tape
177+ (face 73:35 s (tvar 73:37 D)))))
180− (apply 78:9 list (aura 78:15 @tD)))
178+ (mold 75:1 cord (aura 75:9 @t))
181− (mold 80:1 path
179+ (mold 77:1 knot (aura 77:9 @ta))
182− (apply 80:9 list (ref 80:15 knot)))
180+ (mold 79:1 tape
183− (mold 82:1 tank
181+ (apply 79:9 list (aura 79:15 @tD)))
184− (union 83:3
182+ (mold 81:1 path
185− (ref 83:3 cord)
183+ (apply 81:9 list (ref 81:15 knot)))
186− (cell 84:3
184+ (mold 83:1 tank
187− (const 84:4 %leaf)
185+ (union 84:3
188− (face 84:10 p (ref 84:12 tape)))
186+ (ref 84:3 cord)
189 (cell 85:3
187 (cell 85:3
190− (const 85:4 %palm)
188+ (const 85:4 %leaf)
191− (face 85:10 p
189+ (face 85:10 p (ref 85:12 tape)))
192− (apply 85:12 qual (ref 85:18 tape) (ref 85:23 tape) (ref 85:28 tape) (ref 85:33 tape)))
193− (face 85:39 q
194− (apply 85:41 list (ref 85:47 tank))))
195 (cell 86:3
190 (cell 86:3
196− (const 86:4 %rose)
191+ (const 86:4 %palm)
197 (face 86:10 p
192 (face 86:10 p
198− (apply 86:12 trel (ref 86:18 tape) (ref 86:23 tape) (ref 86:28 tape)))
193+ (apply 86:12 qual (ref 86:18 tape) (ref 86:23 tape) (ref 86:28 tape) (ref 86:33 tape)))
199− (face 86:34 q
194+ (face 86:39 q
200− (apply 86:36 list (ref 86:42 tank))))))
195+ (apply 86:41 list (ref 86:47 tank))))
201− (mold 88:1 nail
196+ (cell 87:3
202− (cell 88:9
197+ (const 87:4 %rose)
203− (face 88:10 p (ref 88:12 hair))
198+ (face 87:10 p
204− (face 88:17 q (ref 88:19 tape))))
199+ (apply 87:12 trel (ref 87:18 tape) (ref 87:23 tape) (ref 87:28 tape)))
205− (mold 90:1 edge
200+ (face 87:34 q
206− (cell 90:9
201+ (apply 87:36 list (ref 87:42 tank))))))
207− (face 90:10 p (ref 90:12 hair))
202+ (mold 89:1 nail
208− (face 90:17 q
203+ (cell 89:9
209− (apply 90:19 unit
204+ (face 89:10 p (ref 89:12 hair))
210− (cell 90:25
205+ (face 89:17 q (ref 89:19 tape))))
211− (face 90:26 p (noun 90:28))
206+ (mold 91:1 edge
212− (face 90:30 q (ref 90:32 nail)))))))
207+ (cell 91:9
213− (mold 92:1 rule
208+ (face 91:10 p (ref 91:12 hair))
214− (fn 92:9 (ref 92:12 nail) (ref 92:17 edge)))
209+ (face 91:17 q
215− (mold 94:1 spot
210+ (apply 91:19 unit
216− (cell 94:9
211+ (cell 91:25
217− (face 94:10 p (ref 94:12 path))
212+ (face 91:26 p (noun 91:28))
218− (face 94:17 q (ref 94:19 pint))))
213+ (face 91:30 q (ref 91:32 nail)))))))
219− (mold 96:1 toon
214+ (mold 93:1 rule
220− (union 97:3
215+ (fn 93:9 (ref 93:12 nail) (ref 93:17 edge)))
221− (cell 97:3
216+ (mold 95:1 spot
222− (const 97:4 %0)
217+ (cell 95:9
223− (face 97:7 p (noun 97:9)))
218+ (face 95:10 p (ref 95:12 path))
219+ (face 95:17 q (ref 95:19 pint))))
220+ (mold 97:1 toon
221+ (union 98:3
224 (cell 98:3
222 (cell 98:3
225− (const 98:4 %1)
223+ (const 98:4 %0)
226 (face 98:7 p (noun 98:9)))
224 (face 98:7 p (noun 98:9)))
227 (cell 99:3
225 (cell 99:3
228− (const 99:4 %2)
226+ (const 99:4 %1)
229− (face 99:7 p
227+ (face 99:7 p (noun 99:9)))
230− (apply 99:9 list (ref 99:15 tank))))))
228+ (cell 100:3
231− (mold 101:1 like
229+ (const 100:4 %2)
232− (generic 101:9 A
230+ (face 100:7 p
233− (cell 101:16
231+ (apply 100:9 list (ref 100:15 tank))))))
234− (face 101:17 p (ref 101:19 hair))
232+ (mold 102:1 like
235− (face 101:24 q
233+ (generic 102:9 A
236− (apply 101:26 unit
234+ (cell 102:16
237− (cell 101:32
235+ (face 102:17 p (ref 102:19 hair))
238− (face 101:33 p (tvar 101:35 A))
236+ (face 102:24 q
239− (face 101:37 q (ref 101:39 nail))))))))
237+ (apply 102:26 unit
240− (value 103:1 wonk
238+ (cell 102:32
241− (gate 103:9
239+ (face 102:33 p (tvar 102:35 A))
242− (face 103:12 veq
240+ (face 102:37 q (ref 102:39 nail))))))))
243− (apply 103:16 like (tvar 103:22 A)))
241+ (value 104:1 like
244− (body 104:3
242+ (gate 104:9
245− (branch 104:3
243+ (cell 104:12
246− (wing 104:6 q.veq)
244+ (face 104:13 f
247− (arm 105:5 (lit 105:5 ~) (crash 105:7))
245+ (fn 104:15 (tvar 104:18 A) (tvar 104:20 B)))
248− (arm 106:5
246+ (face 104:23 result
249− (cell 106:5 (lit 106:6 ~) (bind 106:8 product))
247+ (apply 104:30 like (tvar 104:36 A))))
250− (wing 106:17 p.product))))))
248+ (body 105:3
251− (mold 108:1 lone
249+ (value 105:3 mapped
252− (generic 108:9 A
250+ (body 106:5
253− (cell 108:16
251+ (cast 106:5
254− (face 108:17 p (tvar 108:19 A)))))
252+ (apply 106:8 unit
255− (mold 110:1 lest
253+ (cell 106:14
256− (generic 110:9 A
254+ (face 106:15 p (tvar 106:17 B))
257− (cell 110:16
255+ (face 106:19 q (ref 106:21 nail))))
258− (face 110:17 i (tvar 110:19 A))
256+ (body 107:7
259− (face 110:21 t
257+ (branch 107:7
260− (apply 110:23 list (tvar 110:29 A))))))
258+ (wing 107:10 q.result)
261− (mold 112:1 pole
259+ (arm 108:9 (lit 108:9 ~) (lit 108:11 ~))
262− (generic 112:9 A
260+ (arm 109:9
263− (union 113:3
261+ (cell 109:9 (lit 109:10 ~) (bind 109:12 value))
264− (const 113:3 ~)
262+ (unit 109:19
265− (cell 114:3
263+ (tuple 109:20
266− (tvar 114:4 A)
264+ (face 109:21 p
267− (apply 114:6 pole (tvar 114:12 A))))))
265+ (group 109:23
268− (mold 116:1 quip
266+ (call 109:24 (wing 109:24 f) (wing 109:26 p.value))))
269− (generic 116:9 A B
267+ (face 109:35 q (wing 109:37 q.value))))))))))
270− (cell 116:18
268+ (cast 110:3
271− (apply 116:19 list (tvar 116:25 A))
269+ (apply 110:6 like (tvar 110:12 B))
272− (tvar 116:28 B))))
270+ (tuple 110:15
273− (mold 118:1 tree
271+ (face 110:16 p (wing 110:18 p.result))
274− (generic 118:9 A
272+ (face 110:27 q (wing 110:29 mapped)))))))
275− (union 119:3
273+ (value 112:1 wonk
276− (const 119:3 ~)
274+ (gate 112:9
277− (cell 120:3
275+ (face 112:12 veq
278− (face 120:4 n (tvar 120:6 A))
276+ (apply 112:16 like (tvar 112:22 A)))
279− (face 120:8 l
277+ (body 113:3
280− (apply 120:10 tree (tvar 120:16 A)))
278+ (branch 113:3
281− (face 120:19 r
279+ (wing 113:6 q.veq)
282− (apply 120:21 tree (tvar 120:27 A)))))))
280+ (arm 114:5 (lit 114:5 ~) (crash 114:7))
283− (mold 122:1 each
281+ (arm 115:5
284− (generic 122:9 A B
282+ (cell 115:5 (lit 115:6 ~) (bind 115:8 product))
285− (union 123:3
283+ (wing 115:17 p.product))))))
284+ (mold 117:1 lone
285+ (generic 117:9 A
286+ (cell 117:16
287+ (face 117:17 p (tvar 117:19 A)))))
288+ (mold 119:1 lest
289+ (generic 119:9 A
290+ (cell 119:16
291+ (face 119:17 i (tvar 119:19 A))
292+ (face 119:21 t
293+ (apply 119:23 list (tvar 119:29 A))))))
294+ (mold 121:1 pole
295+ (generic 121:9 A
296+ (union 122:3
297+ (const 122:3 ~)
286 (cell 123:3
298 (cell 123:3
287− (const 123:4 %|)
299+ (tvar 123:4 A)
288− (face 123:7 p (tvar 123:9 B)))
300+ (apply 123:6 pole (tvar 123:12 A))))))
289− (cell 124:3
301+ (mold 125:1 quip
290− (const 124:4 %&)
302+ (generic 125:9 A B
291− (face 124:7 p (tvar 124:9 A))))))
303+ (cell 125:18
292− (mold 126:1 bloq (aura 126:9 @))
304+ (apply 125:19 list (tvar 125:25 A))
293− (value 128:1 some
305+ (tvar 125:28 B))))
294− (gate 128:9
306+ (mold 127:1 tree
295− (face 128:12 item (tvar 128:17 A))
307+ (generic 127:9 A
296− (unit 128:19 (wing 128:20 item))))
308+ (union 128:3
297− (value 130:1 lure
309+ (const 128:3 ~)
298− (gate 130:9
310+ (cell 129:3
299− (face 130:12 item (tvar 130:17 A))
311+ (face 129:4 n (tvar 129:6 A))
300− (body 131:3
312+ (face 129:8 l
301− (cast 131:3
313+ (apply 129:10 tree (tvar 129:16 A)))
302− (apply 131:6 list (tvar 131:12 A))
314+ (face 129:19 r
303− (tuple 131:15 (wing 131:16 item) (lit 131:21 ~))))))
315+ (apply 129:21 tree (tvar 129:27 A)))))))
304− (value 133:1 snoc
316+ (mold 131:1 each
305− (gate 133:9
317+ (generic 131:9 A B
306− (face 133:12 args
318+ (union 132:3
307− (cell 133:17
319+ (cell 132:3
308− (apply 133:18 list (tvar 133:24 A))
320+ (const 132:4 %|)
309− (tvar 133:27 A)))
321+ (face 132:7 p (tvar 132:9 B)))
310− (body 134:3
322+ (cell 133:3
311− (branch 134:3
323+ (const 133:4 %&)
312− (wing 134:6 args)
324+ (face 133:7 p (tvar 133:9 A))))))
313− (arm 135:5
325+ (mold 135:1 bloq (aura 135:9 @))
314− (cell 135:5 (bind 135:6 xs) (bind 135:9 item))
326+ (value 137:1 some
315− (group 135:15
316− (call 135:16
317− (wing 135:16 weld)
318− (wing 135:21 xs)
319− (tuple 135:24 (wing 135:25 item) (lit 135:30 ~)))))))))
320− (value 137:1 flop
321 (gate 137:9
327 (gate 137:9
322− (face 137:12 xs
328+ (face 137:12 item (tvar 137:17 A))
323− (apply 137:15 list (tvar 137:21 A)))
329+ (unit 137:19 (wing 137:20 item))))
324− (body 138:3
330+ (value 139:1 lure
325− (value 138:3 reverse-into
331+ (gate 139:9
326− (gate 138:19
332+ (face 139:12 item (tvar 139:17 A))
327− (face 138:22 args
333+ (body 140:3
328− (cell 138:27
334+ (cast 140:3
329− (apply 138:28 list (tvar 138:34 A))
335+ (apply 140:6 list (tvar 140:12 A))
330− (apply 138:37 list (tvar 138:43 A))))
336+ (tuple 140:15 (wing 140:16 item) (lit 140:21 ~))))))
331− (body 139:5
337+ (value 142:1 snoc
332− (branch 139:5
338+ (gate 142:9
333− (wing 139:8 args)
339+ (face 142:12 args
334− (arm 140:7
340+ (cell 142:17
335− (cell 140:7 (bind 140:8 rest) (bind 140:13 acc))
341+ (apply 142:18 list (tvar 142:24 A))
336− (body 141:9
342+ (tvar 142:27 A)))
337− (branch 141:9
343+ (body 143:3
338− (wing 141:12 rest)
344+ (branch 143:3
339− (arm 142:11 (lit 142:11 ~) (wing 142:13 acc))
345+ (wing 143:6 args)
340− (arm 143:11
346+ (arm 144:5
341− (cell 143:11 (bind 143:12 item) (bind 143:17 more))
347+ (cell 144:5 (bind 144:6 xs) (bind 144:9 item))
342− (group 143:23
348+ (group 144:15
343− (call 143:24
349+ (call 144:16
344− (wing 143:24 reverse-into)
350+ (wing 144:16 weld)
345− (wing 143:37 more)
351+ (wing 144:21 xs)
346− (tuple 143:42 (wing 143:43 item) (wing 143:48 acc))))))))))))
352+ (tuple 144:24 (wing 144:25 item) (lit 144:30 ~)))))))))
347− (group 144:3
353+ (value 146:1 flop
348− (call 144:4 (wing 144:4 reverse-into) (wing 144:17 xs) (lit 144:20 ~))))))
349− (value 146:1 drop
350 (gate 146:9
354 (gate 146:9
351− (face 146:12 maybe
355+ (face 146:12 xs
352− (apply 146:18 unit (tvar 146:24 A)))
356+ (apply 146:15 list (tvar 146:21 A)))
353 (body 147:3
357 (body 147:3
354− (cast 147:3
358+ (value 147:3 reverse-into
355− (apply 147:6 list (tvar 147:12 A))
359+ (gate 147:19
356− (body 148:5
360+ (face 147:22 args
357− (branch 148:5
361+ (cell 147:27
358− (wing 148:8 maybe)
362+ (apply 147:28 list (tvar 147:34 A))
359− (arm 149:7 (lit 149:7 ~) (lit 149:9 ~))
363+ (apply 147:37 list (tvar 147:43 A))))
360− (arm 150:7
364+ (body 148:5
361− (cell 150:7 (lit 150:8 ~) (bind 150:10 value))
365+ (branch 148:5
362− (tuple 150:17 (wing 150:18 value) (lit 150:24 ~)))))))))
366+ (wing 148:8 args)
363− (value 152:1 bind
367+ (arm 149:7
364− (gate 152:9
368+ (cell 149:7 (bind 149:8 rest) (bind 149:13 acc))
365− (face 152:12 args
369+ (body 150:9
366− (cell 152:17
370+ (branch 150:9
367− (apply 152:18 unit (tvar 152:24 A))
371+ (wing 150:12 rest)
368− (fn 152:27 (tvar 152:30 A) (tvar 152:32 B))))
372+ (arm 151:11 (lit 151:11 ~) (wing 151:13 acc))
369− (body 153:3
373+ (arm 152:11
370− (branch 153:3
374+ (cell 152:11 (bind 152:12 item) (bind 152:17 more))
371− (wing 153:6 args)
375+ (group 152:23
372− (arm 154:5
376+ (call 152:24
373− (cell 154:5 (bind 154:6 maybe) (bind 154:12 f))
377+ (wing 152:24 reverse-into)
374− (cast 154:15
378+ (wing 152:37 more)
375− (apply 154:18 unit (tvar 154:24 B))
379+ (tuple 152:42 (wing 152:43 item) (wing 152:48 acc))))))))))))
376− (body 155:7
380+ (group 153:3
377− (branch 155:7
381+ (call 153:4 (wing 153:4 reverse-into) (wing 153:17 xs) (lit 153:20 ~))))))
378− (wing 155:10 maybe)
382+ (value 155:1 drop
379− (arm 156:9 (lit 156:9 ~) (lit 156:11 ~))
383+ (gate 155:9
380− (arm 157:9
384+ (face 155:12 maybe
381− (cell 157:9 (lit 157:10 ~) (bind 157:12 value))
385+ (apply 155:18 unit (tvar 155:24 A)))
382− (unit 157:19
386+ (body 156:3
383− (group 157:20
387+ (cast 156:3
384− (call 157:21 (wing 157:21 f) (wing 157:23 value)))))))))))))
388+ (apply 156:6 list (tvar 156:12 A))
385− (value 159:1 biff
389+ (body 157:5
386− (gate 159:9
390+ (branch 157:5
387− (face 159:12 args
391+ (wing 157:8 maybe)
388− (cell 159:17
392+ (arm 158:7 (lit 158:7 ~) (lit 158:9 ~))
389− (apply 159:18 unit (tvar 159:24 A))
393+ (arm 159:7
390− (fn 159:27
394+ (cell 159:7 (lit 159:8 ~) (bind 159:10 value))
391− (tvar 159:30 A)
395+ (tuple 159:17 (wing 159:18 value) (lit 159:24 ~)))))))))
392− (apply 159:32 unit (tvar 159:38 B)))))
396+ (value 161:1 bond
393− (body 160:3
397+ (gate 161:9
394− (branch 160:3
398+ (face 161:12 fallback
395− (wing 160:6 args)
399+ (fn 161:21 (const 161:24 ~) (tvar 161:26 A)))
396− (arm 161:5
400+ (body 162:3
397− (cell 161:5 (bind 161:6 maybe) (bind 161:12 f))
401+ (gate 162:3
398− (cast 161:15
402+ (face 162:6 maybe
399− (apply 161:18 unit (tvar 161:24 B))
403+ (apply 162:12 unit (tvar 162:18 A)))
400− (body 162:7
404+ (body 163:5
401− (branch 162:7
405+ (branch 163:5
402− (wing 162:10 maybe)
406+ (wing 163:8 maybe)
403− (arm 163:9 (lit 163:9 ~) (lit 163:11 ~))
407+ (arm 164:7
404− (arm 164:9
408+ (lit 164:7 ~)
405− (cell 164:9 (lit 164:10 ~) (bind 164:12 value))
409+ (group 164:9
406− (group 164:19
410+ (call 164:10 (wing 164:10 fallback) (lit 164:19 ~))))
407− (call 164:20 (wing 164:20 f) (wing 164:22 value))))))))))))
411+ (arm 165:7
408− (value 166:1 both
412+ (cell 165:7 (lit 165:8 ~) (bind 165:10 value))
409− (gate 166:9
413+ (wing 165:17 value))))))))
410− (face 166:12 args
414+ (value 167:1 bind
411− (cell 166:17
415+ (gate 167:9
412− (apply 166:18 unit (tvar 166:24 A))
416+ (face 167:12 args
413− (apply 166:27 unit (tvar 166:33 B))))
417+ (cell 167:17
414− (body 167:3
418+ (apply 167:18 unit (tvar 167:24 A))
415− (branch 167:3
419+ (fn 167:27 (tvar 167:30 A) (tvar 167:32 B))))
416− (wing 167:6 args)
420+ (body 168:3
417− (arm 168:5
421+ (branch 168:3
418− (cell 168:5 (bind 168:6 first) (bind 168:12 second))
422+ (wing 168:6 args)
419− (cast 168:20
423+ (arm 169:5
420− (apply 168:23 unit
424+ (cell 169:5 (bind 169:6 maybe) (bind 169:12 f))
421− (cell 168:29 (tvar 168:30 A) (tvar 168:32 B)))
425+ (cast 169:15
422− (body 169:7
426+ (apply 169:18 unit (tvar 169:24 B))
423− (branch 169:7
427+ (body 170:7
424− (wing 169:10 first)
428+ (branch 170:7
425− (arm 170:9 (lit 170:9 ~) (lit 170:11 ~))
429+ (wing 170:10 maybe)
426− (arm 171:9
430+ (arm 171:9 (lit 171:9 ~) (lit 171:11 ~))
427− (cell 171:9 (lit 171:10 ~) (bind 171:12 a))
431+ (arm 172:9
428− (body 172:11
432+ (cell 172:9 (lit 172:10 ~) (bind 172:12 value))
429− (branch 172:11
433+ (unit 172:19
430− (wing 172:14 second)
434+ (group 172:20
431− (arm 173:13 (lit 173:13 ~) (lit 173:15 ~))
435+ (call 172:21 (wing 172:21 f) (wing 172:23 value)))))))))))))
432− (arm 174:13
436+ (value 174:1 biff
433− (cell 174:13 (lit 174:14 ~) (bind 174:16 b))
437+ (gate 174:9
434− (unit 174:19
438+ (face 174:12 args
435− (tuple 174:20 (wing 174:21 a) (wing 174:23 b)))))))))))))))
439+ (cell 174:17
436− (value 176:1 clap
440+ (apply 174:18 unit (tvar 174:24 A))
437− (gate 176:9
441+ (fn 174:27
438− (face 176:12 args
442+ (tvar 174:30 A)
439− (cell 176:17
443+ (apply 174:32 unit (tvar 174:38 B)))))
440− (apply 176:18 unit (tvar 176:24 A))
444+ (body 175:3
441− (apply 176:27 unit (tvar 176:33 A))
445+ (branch 175:3
442− (fn 176:36
446+ (wing 175:6 args)
443− (cell 176:39 (tvar 176:40 A) (tvar 176:42 A))
447+ (arm 176:5
444− (tvar 176:45 A))))
448+ (cell 176:5 (bind 176:6 maybe) (bind 176:12 f))
445− (body 177:3
449+ (cast 176:15
446− (branch 177:3
450+ (apply 176:18 unit (tvar 176:24 B))
447− (wing 177:6 args)
451+ (body 177:7
448− (arm 178:5
452+ (branch 177:7
449− (cell 178:5 (bind 178:6 first) (bind 178:12 second) (bind 178:19 combine))
453+ (wing 177:10 maybe)
450− (cast 178:28
454+ (arm 178:9 (lit 178:9 ~) (lit 178:11 ~))
451− (apply 178:31 unit (tvar 178:37 A))
455+ (arm 179:9
452− (body 179:7
456+ (cell 179:9 (lit 179:10 ~) (bind 179:12 value))
453− (branch 179:7
457+ (group 179:19
454− (wing 179:10 first)
458+ (call 179:20 (wing 179:20 f) (wing 179:22 value))))))))))))
455− (arm 180:9 (lit 180:9 ~) (wing 180:11 second))
459+ (value 181:1 both
456− (arm 181:9
460+ (gate 181:9
457− (cell 181:9 (lit 181:10 ~) (bind 181:12 a))
461+ (face 181:12 args
458− (body 182:11
462+ (cell 181:17
459− (branch 182:11
463+ (apply 181:18 unit (tvar 181:24 A))
460− (wing 182:14 second)
464+ (apply 181:27 unit (tvar 181:33 B))))
461− (arm 183:13 (lit 183:13 ~) (wing 183:15 first))
465+ (body 182:3
462− (arm 184:13
466+ (branch 182:3
463− (cell 184:13 (lit 184:14 ~) (bind 184:16 b))
467+ (wing 182:6 args)
464− (unit 184:19
468+ (arm 183:5
465− (group 184:20
469+ (cell 183:5 (bind 183:6 first) (bind 183:12 second))
466− (call 184:21 (wing 184:21 combine) (wing 184:29 a) (wing 184:31 b))))))))))))))))
470+ (cast 183:20
467− (value 186:1 clef
471+ (apply 183:23 unit
468− (gate 186:9
472+ (cell 183:29 (tvar 183:30 A) (tvar 183:32 B)))
469− (face 186:12 args
473+ (body 184:7
470− (cell 186:17
474+ (branch 184:7
471− (apply 186:18 unit (tvar 186:24 A))
475+ (wing 184:10 first)
472− (apply 186:27 unit (tvar 186:33 B))
476+ (arm 185:9 (lit 185:9 ~) (lit 185:11 ~))
473− (fn 186:36
477+ (arm 186:9
474− (cell 186:39 (tvar 186:40 A) (tvar 186:42 B))
478+ (cell 186:9 (lit 186:10 ~) (bind 186:12 a))
475− (apply 186:45 unit (tvar 186:51 C)))))
479+ (body 187:11
476− (body 187:3
480+ (branch 187:11
477− (branch 187:3
481+ (wing 187:14 second)
478− (wing 187:6 args)
482+ (arm 188:13 (lit 188:13 ~) (lit 188:15 ~))
479− (arm 188:5
483+ (arm 189:13
480− (cell 188:5 (bind 188:6 first) (bind 188:12 second) (bind 188:19 combine))
484+ (cell 189:13 (lit 189:14 ~) (bind 189:16 b))
481− (cast 188:28
485+ (unit 189:19
482− (apply 188:31 unit (tvar 188:37 C))
486+ (tuple 189:20 (wing 189:21 a) (wing 189:23 b)))))))))))))))
483− (body 189:7
487+ (value 191:1 clap
484− (branch 189:7
488+ (gate 191:9
485− (wing 189:10 first)
489+ (face 191:12 args
486− (arm 190:9 (lit 190:9 ~) (lit 190:11 ~))
490+ (cell 191:17
487− (arm 191:9
491+ (apply 191:18 unit (tvar 191:24 A))
488− (cell 191:9 (lit 191:10 ~) (bind 191:12 a))
492+ (apply 191:27 unit (tvar 191:33 A))
489− (body 192:11
493+ (fn 191:36
490− (branch 192:11
494+ (cell 191:39 (tvar 191:40 A) (tvar 191:42 A))
491− (wing 192:14 second)
495+ (tvar 191:45 A))))
492− (arm 193:13 (lit 193:13 ~) (lit 193:15 ~))
496+ (body 192:3
493− (arm 194:13
497+ (branch 192:3
494− (cell 194:13 (lit 194:14 ~) (bind 194:16 b))
498+ (wing 192:6 args)
495− (group 194:19
499+ (arm 193:5
496− (call 194:20 (wing 194:20 combine) (wing 194:28 a) (wing 194:30 b)))))))))))))))
500+ (cell 193:5 (bind 193:6 first) (bind 193:12 second) (bind 193:19 combine))
497− (value 196:1 skim
501+ (cast 193:28
498− (gate 196:9
502+ (apply 193:31 unit (tvar 193:37 A))
499− (face 196:12 args
503+ (body 194:7
500− (cell 196:17
504+ (branch 194:7
501− (apply 196:18 list (tvar 196:24 A))
505+ (wing 194:10 first)
502− (fn 196:27 (tvar 196:30 A) (flag 196:32))))
506+ (arm 195:9 (lit 195:9 ~) (wing 195:11 second))
503− (body 197:3
507+ (arm 196:9
504− (branch 197:3
508+ (cell 196:9 (lit 196:10 ~) (bind 196:12 a))
505− (wing 197:6 args)
509+ (body 197:11
506− (arm 198:5
510+ (branch 197:11
507− (cell 198:5 (bind 198:6 xs) (bind 198:9 predicate))
511+ (wing 197:14 second)
508− (cast 198:20
512+ (arm 198:13 (lit 198:13 ~) (wing 198:15 first))
509− (apply 198:23 list (tvar 198:29 A))
513+ (arm 199:13
510− (body 199:9
514+ (cell 199:13 (lit 199:14 ~) (bind 199:16 b))
511− (branch 199:9
515+ (unit 199:19
512− (wing 199:12 xs)
516+ (group 199:20
513− (arm 200:11 (lit 200:11 ~) (lit 200:13 ~))
517+ (call 199:21 (wing 199:21 combine) (wing 199:29 a) (wing 199:31 b))))))))))))))))
514− (arm 201:11
518+ (value 201:1 clef
515− (cell 201:11 (bind 201:12 item) (bind 201:17 rest))
519+ (gate 201:9
516− (body 202:13
520+ (face 201:12 args
517− (branch 202:13
521+ (cell 201:17
518− (group 202:16
522+ (apply 201:18 unit (tvar 201:24 A))
519− (call 202:17 (wing 202:17 predicate) (wing 202:27 item)))
523+ (apply 201:27 unit (tvar 201:33 B))
520− (arm 203:15
524+ (fn 201:36
521− (lit 203:15 %.y)
525+ (cell 201:39 (tvar 201:40 A) (tvar 201:42 B))
522− (tuple 203:19
526+ (apply 201:45 unit (tvar 201:51 C)))))
523− (wing 203:20 item)
527+ (body 202:3
524− (group 203:25
528+ (branch 202:3
525− (call 203:26 (wing 203:26 skim) (wing 203:31 rest) (wing 203:36 predicate)))))
529+ (wing 202:6 args)
526− (arm 204:15
530+ (arm 203:5
527− (lit 204:15 %.n)
531+ (cell 203:5 (bind 203:6 first) (bind 203:12 second) (bind 203:19 combine))
528− (group 204:19
532+ (cast 203:28
529− (call 204:20 (wing 204:20 skim) (wing 204:25 rest) (wing 204:30 predicate)))))))))))))))
533+ (apply 203:31 unit (tvar 203:37 C))
530− (value 206:1 skip
534+ (body 204:7
531− (gate 206:9
535+ (branch 204:7
532− (face 206:12 args
536+ (wing 204:10 first)
533− (cell 206:17
537+ (arm 205:9 (lit 205:9 ~) (lit 205:11 ~))
534− (apply 206:18 list (tvar 206:24 A))
538+ (arm 206:9
535− (fn 206:27 (tvar 206:30 A) (flag 206:32))))
539+ (cell 206:9 (lit 206:10 ~) (bind 206:12 a))
536− (body 207:3
540+ (body 207:11
537− (branch 207:3
541+ (branch 207:11
538− (wing 207:6 args)
542+ (wing 207:14 second)
539− (arm 208:5
543+ (arm 208:13 (lit 208:13 ~) (lit 208:15 ~))
540− (cell 208:5 (bind 208:6 xs) (bind 208:9 predicate))
544+ (arm 209:13
541− (cast 208:20
545+ (cell 209:13 (lit 209:14 ~) (bind 209:16 b))
542− (apply 208:23 list (tvar 208:29 A))
546+ (group 209:19
543− (body 209:9
547+ (call 209:20 (wing 209:20 combine) (wing 209:28 a) (wing 209:30 b)))))))))))))))
544− (branch 209:9
548+ (value 211:1 skim
545− (wing 209:12 xs)
549+ (gate 211:9
546− (arm 210:11 (lit 210:11 ~) (lit 210:13 ~))
550+ (face 211:12 args
547− (arm 211:11
551+ (cell 211:17
548− (cell 211:11 (bind 211:12 item) (bind 211:17 rest))
552+ (apply 211:18 list (tvar 211:24 A))
549− (body 212:13
553+ (fn 211:27 (tvar 211:30 A) (flag 211:32))))
550− (branch 212:13
554+ (body 212:3
551− (group 212:16
555+ (branch 212:3
552− (call 212:17 (wing 212:17 predicate) (wing 212:27 item)))
556+ (wing 212:6 args)
553− (arm 213:15
557+ (arm 213:5
554− (lit 213:15 %.y)
558+ (cell 213:5 (bind 213:6 xs) (bind 213:9 predicate))
555− (group 213:19
559+ (cast 213:20
556− (call 213:20 (wing 213:20 skip) (wing 213:25 rest) (wing 213:30 predicate))))
560+ (apply 213:23 list (tvar 213:29 A))
557− (arm 214:15
561+ (body 214:9
558− (lit 214:15 %.n)
562+ (branch 214:9
559− (tuple 214:19
563+ (wing 214:12 xs)
560− (wing 214:20 item)
564+ (arm 215:11 (lit 215:11 ~) (lit 215:13 ~))
561− (group 214:25
565+ (arm 216:11
562− (call 214:26 (wing 214:26 skip) (wing 214:31 rest) (wing 214:36 predicate))))))))))))))))
566+ (cell 216:11 (bind 216:12 item) (bind 216:17 rest))
563− (value 216:1 levy
567+ (body 217:13
564− (gate 216:9
568+ (branch 217:13
565− (face 216:12 args
569+ (group 217:16
566− (cell 216:17
570+ (call 217:17 (wing 217:17 predicate) (wing 217:27 item)))
567− (apply 216:18 list (tvar 216:24 A))
571+ (arm 218:15
568− (fn 216:27 (tvar 216:30 A) (flag 216:32))))
572+ (lit 218:15 %.y)
569− (body 217:3
573+ (tuple 218:19
570− (cast 217:3
574+ (wing 218:20 item)
571− (flag 217:6)
575+ (group 218:25
572− (body 218:5
576+ (call 218:26 (wing 218:26 skim) (wing 218:31 rest) (wing 218:36 predicate)))))
573− (branch 218:5
577+ (arm 219:15
574− (wing 218:8 args)
578+ (lit 219:15 %.n)
575− (arm 219:7
579+ (group 219:19
576− (cell 219:7 (bind 219:8 xs) (bind 219:11 predicate))
580+ (call 219:20 (wing 219:20 skim) (wing 219:25 rest) (wing 219:30 predicate)))))))))))))))
577− (body 220:9
581+ (value 221:1 skip
578− (branch 220:9
582+ (gate 221:9
579− (wing 220:12 xs)
583+ (face 221:12 args
580− (arm 221:11 (lit 221:11 ~) (lit 221:13 %.y))
584+ (cell 221:17
581− (arm 222:11
585+ (apply 221:18 list (tvar 221:24 A))
582− (cell 222:11 (bind 222:12 item) (bind 222:17 rest))
586+ (fn 221:27 (tvar 221:30 A) (flag 221:32))))
583− (body 223:13
587+ (body 222:3
584− (branch 223:13
588+ (branch 222:3
585− (group 223:16
589+ (wing 222:6 args)
586− (call 223:17 (wing 223:17 predicate) (wing 223:27 item)))
590+ (arm 223:5
587− (arm 224:15
591+ (cell 223:5 (bind 223:6 xs) (bind 223:9 predicate))
588− (lit 224:15 %.y)
592+ (cast 223:20
589− (group 224:19
593+ (apply 223:23 list (tvar 223:29 A))
590− (call 224:20 (wing 224:20 levy) (wing 224:25 rest) (wing 224:30 predicate))))
594+ (body 224:9
591− (arm 225:15 (lit 225:15 %.n) (lit 225:19 %.n))))))))))))))
595+ (branch 224:9
592− (value 227:1 lien
596+ (wing 224:12 xs)
593− (gate 227:9
597+ (arm 225:11 (lit 225:11 ~) (lit 225:13 ~))
594− (face 227:12 args
598+ (arm 226:11
595− (cell 227:17
599+ (cell 226:11 (bind 226:12 item) (bind 226:17 rest))
596− (apply 227:18 list (tvar 227:24 A))
600+ (body 227:13
597− (fn 227:27 (tvar 227:30 A) (flag 227:32))))
601+ (branch 227:13
598− (body 228:3
602+ (group 227:16
599− (cast 228:3
603+ (call 227:17 (wing 227:17 predicate) (wing 227:27 item)))
600− (flag 228:6)
604+ (arm 228:15
601− (body 229:5
605+ (lit 228:15 %.y)
602− (branch 229:5
606+ (group 228:19
603− (wing 229:8 args)
607+ (call 228:20 (wing 228:20 skip) (wing 228:25 rest) (wing 228:30 predicate))))
604− (arm 230:7
608+ (arm 229:15
605− (cell 230:7 (bind 230:8 xs) (bind 230:11 predicate))
609+ (lit 229:15 %.n)
606− (body 231:9
610+ (tuple 229:19
607− (branch 231:9
611+ (wing 229:20 item)
608− (wing 231:12 xs)
612+ (group 229:25
609− (arm 232:11 (lit 232:11 ~) (lit 232:13 %.n))
613+ (call 229:26 (wing 229:26 skip) (wing 229:31 rest) (wing 229:36 predicate))))))))))))))))
610− (arm 233:11
614+ (value 231:1 levy
611− (cell 233:11 (bind 233:12 item) (bind 233:17 rest))
615+ (gate 231:9
612− (body 234:13
616+ (face 231:12 args
613− (branch 234:13
617+ (cell 231:17
614− (group 234:16
618+ (apply 231:18 list (tvar 231:24 A))
615− (call 234:17 (wing 234:17 predicate) (wing 234:27 item)))
619+ (fn 231:27 (tvar 231:30 A) (flag 231:32))))
616− (arm 235:15 (lit 235:15 %.y) (lit 235:19 %.y))
620+ (body 232:3
617− (arm 236:15
621+ (cast 232:3
618− (lit 236:15 %.n)
622+ (flag 232:6)
619− (group 236:19
623+ (body 233:5
620− (call 236:20 (wing 236:20 lien) (wing 236:25 rest) (wing 236:30 predicate))))))))))))))))
624+ (branch 233:5
621− (value 238:1 roll
625+ (wing 233:8 args)
622− (gate 238:9
626+ (arm 234:7
623− (face 238:12 args
627+ (cell 234:7 (bind 234:8 xs) (bind 234:11 predicate))
624− (cell 238:17
628+ (body 235:9
625− (apply 238:18 list (tvar 238:24 A))
629+ (branch 235:9
626− (tvar 238:27 B)
630+ (wing 235:12 xs)
627− (fn 238:29
631+ (arm 236:11 (lit 236:11 ~) (lit 236:13 %.y))
628− (cell 238:32 (tvar 238:33 A) (tvar 238:35 B))
632+ (arm 237:11
629− (tvar 238:38 B))))
633+ (cell 237:11 (bind 237:12 item) (bind 237:17 rest))
630− (body 239:3
634+ (body 238:13
631− (branch 239:3
635+ (branch 238:13
632− (wing 239:6 args)
636+ (group 238:16
633− (arm 240:5
637+ (call 238:17 (wing 238:17 predicate) (wing 238:27 item)))
634− (cell 240:5 (bind 240:6 xs) (bind 240:9 start) (bind 240:15 combine))
638+ (arm 239:15
635− (body 241:7
639+ (lit 239:15 %.y)
636− (branch 241:7
640+ (group 239:19
637− (wing 241:10 xs)
641+ (call 239:20 (wing 239:20 levy) (wing 239:25 rest) (wing 239:30 predicate))))
638− (arm 242:9 (lit 242:9 ~) (wing 242:11 start))
642+ (arm 240:15 (lit 240:15 %.n) (lit 240:19 %.n))))))))))))))
639− (arm 243:9
643+ (value 242:1 lien
640− (cell 243:9 (bind 243:10 item) (bind 243:15 rest))
644+ (gate 242:9
641− (group 243:21
645+ (face 242:12 args
642− (call 243:22
646+ (cell 242:17
643− (wing 243:22 roll)
647+ (apply 242:18 list (tvar 242:24 A))
644− (wing 243:27 rest)
648+ (fn 242:27 (tvar 242:30 A) (flag 242:32))))
645− (group 243:32
649+ (body 243:3
646− (call 243:33 (wing 243:33 combine) (wing 243:41 item) (wing 243:46 start)))
650+ (cast 243:3
647− (wing 243:53 combine)))))))))))
651+ (flag 243:6)
648− (value 245:1 reel
652+ (body 244:5
649− (gate 245:9
653+ (branch 244:5
650− (face 245:12 args
654+ (wing 244:8 args)
651− (cell 245:17
655+ (arm 245:7
652− (apply 245:18 list (tvar 245:24 A))
656+ (cell 245:7 (bind 245:8 xs) (bind 245:11 predicate))
653− (tvar 245:27 B)
657+ (body 246:9
654− (fn 245:29
658+ (branch 246:9
655− (cell 245:32 (tvar 245:33 A) (tvar 245:35 B))
659+ (wing 246:12 xs)
656− (tvar 245:38 B))))
660+ (arm 247:11 (lit 247:11 ~) (lit 247:13 %.n))
657− (body 246:3
661+ (arm 248:11
658− (branch 246:3
662+ (cell 248:11 (bind 248:12 item) (bind 248:17 rest))
659− (wing 246:6 args)
663+ (body 249:13
660− (arm 247:5
664+ (branch 249:13
661− (cell 247:5 (bind 247:6 xs) (bind 247:9 start) (bind 247:15 combine))
665+ (group 249:16
662− (body 248:7
666+ (call 249:17 (wing 249:17 predicate) (wing 249:27 item)))
663− (branch 248:7
667+ (arm 250:15 (lit 250:15 %.y) (lit 250:19 %.y))
664− (wing 248:10 xs)
668+ (arm 251:15
665− (arm 249:9 (lit 249:9 ~) (wing 249:11 start))
669+ (lit 251:15 %.n)
666− (arm 250:9
670+ (group 251:19
667− (cell 250:9 (bind 250:10 item) (bind 250:15 rest))
671+ (call 251:20 (wing 251:20 lien) (wing 251:25 rest) (wing 251:30 predicate))))))))))))))))
668− (group 250:21
672+ (value 253:1 roll
669− (call 250:22
673+ (gate 253:9
670− (wing 250:22 combine)
674+ (face 253:12 args
671− (wing 250:30 item)
675+ (cell 253:17
672− (group 250:35
676+ (apply 253:18 list (tvar 253:24 A))
673− (call 250:36 (wing 250:36 reel) (wing 250:41 rest) (wing 250:46 start) (wing 250:52 combine)))))))))))))
677+ (tvar 253:27 B)
674− (value 252:1 flit
678+ (fn 253:29
675− (gate 252:9
679+ (cell 253:32 (tvar 253:33 A) (tvar 253:35 B))
676− (face 252:12 predicate
680+ (tvar 253:38 B))))
677− (fn 252:22 (tvar 252:25 A) (flag 252:27)))
681+ (body 254:3
678− (body 253:3
682+ (branch 254:3
679− (gate 253:3
683+ (wing 254:6 args)
680− (face 253:6 value (tvar 253:12 A))
684+ (arm 255:5
681− (body 254:5
685+ (cell 255:5 (bind 255:6 xs) (bind 255:9 start) (bind 255:15 combine))
682− (cast 254:5
686+ (body 256:7
683− (apply 254:8 unit (tvar 254:14 A))
687+ (branch 256:7
684− (body 255:7
688+ (wing 256:10 xs)
685− (branch 255:7
689+ (arm 257:9 (lit 257:9 ~) (wing 257:11 start))
686− (group 255:10
690+ (arm 258:9
687− (call 255:11 (wing 255:11 predicate) (wing 255:21 value)))
691+ (cell 258:9 (bind 258:10 item) (bind 258:15 rest))
688− (arm 256:9
692+ (group 258:21
689− (lit 256:9 %.y)
693+ (call 258:22
690− (unit 256:13 (wing 256:14 value)))
694+ (wing 258:22 roll)
691− (arm 257:9 (lit 257:9 %.n) (lit 257:13 ~))))))))))
695+ (wing 258:27 rest)
692− (value 259:1 murn
696+ (group 258:32
693− (gate 259:9
697+ (call 258:33 (wing 258:33 combine) (wing 258:41 item) (wing 258:46 start)))
694− (face 259:12 args
698+ (wing 258:53 combine)))))))))))
695− (cell 259:17
699+ (value 260:1 reel
696− (apply 259:18 list (tvar 259:24 A))
700+ (gate 260:9
697− (fn 259:27
701+ (face 260:12 args
698− (tvar 259:30 A)
702+ (cell 260:17
699− (apply 259:32 unit (tvar 259:38 B)))))
703+ (apply 260:18 list (tvar 260:24 A))
700− (body 260:3
704+ (tvar 260:27 B)
701− (branch 260:3
705+ (fn 260:29
702− (wing 260:6 args)
706+ (cell 260:32 (tvar 260:33 A) (tvar 260:35 B))
703− (arm 261:5
707+ (tvar 260:38 B))))
704− (cell 261:5 (bind 261:6 xs) (bind 261:9 f))
708+ (body 261:3
705− (cast 261:12
709+ (branch 261:3
706− (apply 261:15 list (tvar 261:21 B))
710+ (wing 261:6 args)
707− (body 262:9
711+ (arm 262:5
708− (branch 262:9
712+ (cell 262:5 (bind 262:6 xs) (bind 262:9 start) (bind 262:15 combine))
709− (wing 262:12 xs)
713+ (body 263:7
710− (arm 263:11 (lit 263:11 ~) (lit 263:13 ~))
714+ (branch 263:7
711− (arm 264:11
715+ (wing 263:10 xs)
712− (cell 264:11 (bind 264:12 item) (bind 264:17 rest))
716+ (arm 264:9 (lit 264:9 ~) (wing 264:11 start))
713− (body 265:13
717+ (arm 265:9
714− (branch 265:13
718+ (cell 265:9 (bind 265:10 item) (bind 265:15 rest))
715− (group 265:16
719+ (group 265:21
716− (call 265:17 (wing 265:17 f) (wing 265:19 item)))
720+ (call 265:22
717− (arm 266:15
721+ (wing 265:22 combine)
718− (lit 266:15 ~)
722+ (wing 265:30 item)
719− (group 266:17
723+ (group 265:35
720− (call 266:18 (wing 266:18 murn) (wing 266:23 rest) (wing 266:28 f))))
724+ (call 265:36 (wing 265:36 reel) (wing 265:41 rest) (wing 265:46 start) (wing 265:52 combine)))))))))))))
721− (arm 267:15
725+ (value 267:1 flit
722− (cell 267:15 (lit 267:16 ~) (bind 267:18 value))
726+ (gate 267:9
723− (tuple 267:25
727+ (face 267:12 predicate
724− (wing 267:26 value)
728+ (fn 267:22 (tvar 267:25 A) (flag 267:27)))
725− (group 267:32
729+ (body 268:3
726− (call 267:33 (wing 267:33 murn) (wing 267:38 rest) (wing 267:43 f))))))))))))))))
730+ (gate 268:3
727− (value 269:1 join
731+ (face 268:6 value (tvar 268:12 A))
728− (gate 269:9
732+ (body 269:5
729− (face 269:12 args
733+ (cast 269:5
730− (cell 269:17
734+ (apply 269:8 unit (tvar 269:14 A))
731− (tvar 269:18 A)
735+ (body 270:7
732− (apply 269:20 list (tvar 269:26 A))))
736+ (branch 270:7
733− (body 270:3
737+ (group 270:10
734− (branch 270:3
738+ (call 270:11 (wing 270:11 predicate) (wing 270:21 value)))
735− (wing 270:6 args)
739+ (arm 271:9
736− (arm 271:5
740+ (lit 271:9 %.y)
737− (cell 271:5 (bind 271:6 separator) (bind 271:16 xs))
741+ (unit 271:13 (wing 271:14 value)))
738− (cast 271:20
742+ (arm 272:9 (lit 272:9 %.n) (lit 272:13 ~))))))))))
739− (apply 271:23 list (tvar 271:29 A))
743+ (value 274:1 murn
740− (body 272:9
744+ (gate 274:9
741− (branch 272:9
745+ (face 274:12 args
742− (wing 272:12 xs)
746+ (cell 274:17
743− (arm 273:11 (lit 273:11 ~) (lit 273:13 ~))
747+ (apply 274:18 list (tvar 274:24 A))
744− (arm 274:11
748+ (fn 274:27
745− (cell 274:11 (bind 274:12 item) (bind 274:17 rest))
749+ (tvar 274:30 A)
746− (body 275:13
750+ (apply 274:32 unit (tvar 274:38 B)))))
747− (branch 275:13
751+ (body 275:3
748− (wing 275:16 rest)
752+ (branch 275:3
749− (arm 276:15
753+ (wing 275:6 args)
750− (lit 276:15 ~)
754+ (arm 276:5
751− (tuple 276:17 (wing 276:18 item) (lit 276:23 ~)))
755+ (cell 276:5 (bind 276:6 xs) (bind 276:9 f))
752− (arm 277:15
756+ (cast 276:12
753− (cell 277:15 (bind 277:16 next) (bind 277:21 more))
757+ (apply 276:15 list (tvar 276:21 B))
754− (tuple 277:27
758+ (body 277:9
755− (wing 277:28 item)
759+ (branch 277:9
756− (tuple 277:33
760+ (wing 277:12 xs)
757− (wing 277:34 separator)
761+ (arm 278:11 (lit 278:11 ~) (lit 278:13 ~))
758− (group 277:44
762+ (arm 279:11
759− (call 277:45 (wing 277:45 join) (wing 277:50 separator) (wing 277:60 rest)))))))))))))))))
763+ (cell 279:11 (bind 279:12 item) (bind 279:17 rest))
760− (value 279:1 snip
764+ (body 280:13
761− (gate 279:9
765+ (branch 280:13
762− (face 279:12 xs
766+ (group 280:16
763− (apply 279:15 list (tvar 279:21 A)))
767+ (call 280:17 (wing 280:17 f) (wing 280:19 item)))
764− (body 280:3
768+ (arm 281:15
765− (cast 280:3
769+ (lit 281:15 ~)
766− (apply 280:6 list (tvar 280:12 A))
770+ (group 281:17
767− (body 281:5
771+ (call 281:18 (wing 281:18 murn) (wing 281:23 rest) (wing 281:28 f))))
768− (branch 281:5
772+ (arm 282:15
769− (wing 281:8 xs)
773+ (cell 282:15 (lit 282:16 ~) (bind 282:18 value))
770− (arm 282:7 (lit 282:7 ~) (lit 282:9 ~))
774+ (tuple 282:25
771− (arm 283:7
775+ (wing 282:26 value)
772− (cell 283:7 (bind 283:8 item) (bind 283:13 rest))
776+ (group 282:32
773− (body 284:9
777+ (call 282:33 (wing 282:33 murn) (wing 282:38 rest) (wing 282:43 f))))))))))))))))
774− (branch 284:9
778+ (value 284:1 join
775− (wing 284:12 rest)
779+ (gate 284:9
776− (arm 285:11 (lit 285:11 ~) (lit 285:13 ~))
780+ (face 284:12 args
777− (arm 286:11
781+ (cell 284:17
778− (cell 286:11 (bind 286:12 next) (bind 286:17 more))
782+ (tvar 284:18 A)
779− (tuple 286:23
783+ (apply 284:20 list (tvar 284:26 A))))
780− (wing 286:24 item)
784+ (body 285:3
781− (group 286:29
785+ (branch 285:3
782− (call 286:30 (wing 286:30 snip) (wing 286:35 rest))))))))))))))
786+ (wing 285:6 args)
783− (value 288:1 rear
787+ (arm 286:5
784− (gate 288:9
788+ (cell 286:5 (bind 286:6 separator) (bind 286:16 xs))
785− (face 288:12 xs
789+ (cast 286:20
786− (apply 288:15 list (tvar 288:21 A)))
790+ (apply 286:23 list (tvar 286:29 A))
787− (body 289:3
791+ (body 287:9
788− (branch 289:3
792+ (branch 287:9
789− (wing 289:6 xs)
793+ (wing 287:12 xs)
790− (arm 290:5 (lit 290:5 ~) (crash 290:7))
794+ (arm 288:11 (lit 288:11 ~) (lit 288:13 ~))
791− (arm 291:5
795+ (arm 289:11
792− (cell 291:5 (bind 291:6 item) (bind 291:11 rest))
796+ (cell 289:11 (bind 289:12 item) (bind 289:17 rest))
793− (body 292:7
797+ (body 290:13
794− (branch 292:7
798+ (branch 290:13
795− (wing 292:10 rest)
799+ (wing 290:16 rest)
796− (arm 293:9 (lit 293:9 ~) (wing 293:11 item))
800+ (arm 291:15
797− (arm 294:9
801+ (lit 291:15 ~)
798− (cell 294:9 (bind 294:10 next) (bind 294:15 more))
802+ (tuple 291:17 (wing 291:18 item) (lit 291:23 ~)))
799− (group 294:21
803+ (arm 292:15
800− (call 294:22 (wing 294:22 rear) (wing 294:27 rest)))))))))))
804+ (cell 292:15 (bind 292:16 next) (bind 292:21 more))
801− (value 296:1 cork
805+ (tuple 292:27
802− (gate 296:9
806+ (wing 292:28 item)
803− (face 296:12 gates
807+ (tuple 292:33
804− (cell 296:18
808+ (wing 292:34 separator)
805− (fn 296:19 (tvar 296:22 A) (tvar 296:24 B))
809+ (group 292:44
806− (fn 296:27 (tvar 296:30 B) (tvar 296:32 C))))
810+ (call 292:45 (wing 292:45 join) (wing 292:50 separator) (wing 292:60 rest)))))))))))))))))
807− (body 297:3
811+ (value 294:1 snip
808− (branch 297:3
812+ (gate 294:9
809− (wing 297:6 gates)
813+ (face 294:12 xs
810− (arm 298:5
814+ (apply 294:15 list (tvar 294:21 A)))
811− (cell 298:5 (bind 298:6 f) (bind 298:8 g))
815+ (body 295:3
812− (gate 298:11
816+ (cast 295:3
813− (face 298:14 x (tvar 298:16 A))
817+ (apply 295:6 list (tvar 295:12 A))
814− (group 298:18
818+ (body 296:5
815− (call 298:19
819+ (branch 296:5
816− (wing 298:19 g)
820+ (wing 296:8 xs)
817− (group 298:21
821+ (arm 297:7 (lit 297:7 ~) (lit 297:9 ~))
818− (call 298:22 (wing 298:22 f) (wing 298:24 x)))))))))))
822+ (arm 298:7
819− (value 300:1 corl
823+ (cell 298:7 (bind 298:8 item) (bind 298:13 rest))
820− (gate 300:9
824+ (body 299:9
821− (face 300:12 gates
825+ (branch 299:9
822− (cell 300:18
826+ (wing 299:12 rest)
823− (fn 300:19 (tvar 300:22 B) (tvar 300:24 C))
827+ (arm 300:11 (lit 300:11 ~) (lit 300:13 ~))
824− (fn 300:27 (tvar 300:30 A) (tvar 300:32 B))))
828+ (arm 301:11
825− (body 301:3
829+ (cell 301:11 (bind 301:12 next) (bind 301:17 more))
826− (branch 301:3
830+ (tuple 301:23
827− (wing 301:6 gates)
831+ (wing 301:24 item)
828− (arm 302:5
832+ (group 301:29
829− (cell 302:5 (bind 302:6 f) (bind 302:8 g))
833+ (call 301:30 (wing 301:30 snip) (wing 301:35 rest))))))))))))))
830− (gate 302:11
834+ (value 303:1 rear
831− (face 302:14 x (tvar 302:16 A))
835+ (gate 303:9
832− (group 302:18
836+ (face 303:12 xs
833− (call 302:19
837+ (apply 303:15 list (tvar 303:21 A)))
834− (wing 302:19 f)
838+ (body 304:3
835− (group 302:21
839+ (branch 304:3
836− (call 302:22 (wing 302:22 g) (wing 302:24 x)))))))))))
840+ (wing 304:6 xs)
837− (value 304:1 cury
841+ (arm 305:5 (lit 305:5 ~) (crash 305:7))
838− (gate 304:9
839− (face 304:12 args
840− (cell 304:17
841− (fn 304:18
842− (cell 304:21 (tvar 304:22 A) (tvar 304:24 B))
843− (tvar 304:27 C))
844− (tvar 304:30 A)))
845− (body 305:3
846− (branch 305:3
847− (wing 305:6 args)
848 (arm 306:5
842 (arm 306:5
849− (cell 306:5 (bind 306:6 f) (bind 306:8 a))
843+ (cell 306:5 (bind 306:6 item) (bind 306:11 rest))
850− (gate 306:11
844+ (body 307:7
851− (face 306:14 b (tvar 306:16 B))
845+ (branch 307:7
852− (group 306:18
846+ (wing 307:10 rest)
853− (call 306:19 (wing 306:19 f) (wing 306:21 a) (wing 306:23 b)))))))))
847+ (arm 308:9 (lit 308:9 ~) (wing 308:11 item))
854− (value 308:1 curr
848+ (arm 309:9
855− (gate 308:9
849+ (cell 309:9 (bind 309:10 next) (bind 309:15 more))
856− (face 308:12 args
850+ (group 309:21
857− (cell 308:17
851+ (call 309:22 (wing 309:22 rear) (wing 309:27 rest)))))))))))
858− (fn 308:18
852+ (value 311:1 cork
859− (cell 308:21 (tvar 308:22 A) (tvar 308:24 B))
853+ (gate 311:9
860− (tvar 308:27 C))
854+ (face 311:12 gates
861− (tvar 308:30 B)))
855+ (cell 311:18
862− (body 309:3
856+ (fn 311:19 (tvar 311:22 A) (tvar 311:24 B))
863− (branch 309:3
857+ (fn 311:27 (tvar 311:30 B) (tvar 311:32 C))))
864− (wing 309:6 args)
858+ (body 312:3
865− (arm 310:5
859+ (branch 312:3
866− (cell 310:5 (bind 310:6 f) (bind 310:8 b))
860+ (wing 312:6 gates)
867− (gate 310:11
861+ (arm 313:5
868− (face 310:14 a (tvar 310:16 A))
862+ (cell 313:5 (bind 313:6 f) (bind 313:8 g))
869− (group 310:18
863+ (gate 313:11
870− (call 310:19 (wing 310:19 f) (wing 310:21 a) (wing 310:23 b)))))))))
864+ (face 313:14 x (tvar 313:16 A))
871− (mold 312:1 cmd
865+ (group 313:18
872− (generic 312:8 M
866+ (call 313:19
873− (union 313:3
867+ (wing 313:19 g)
874− (cell 313:3
868+ (group 313:21
875− (const 313:4 %poke)
869+ (call 313:22 (wing 313:22 f) (wing 313:24 x)))))))))))
876− (face 313:10 p (ref 313:12 poke))
870+ (value 315:1 corl
877− (face 313:17 reply
871+ (gate 315:9
878− (fn 313:23
872+ (face 315:12 gates
879− (apply 313:26 unit (aura 313:32 @t))
873+ (cell 315:18
880− (tvar 313:36 M))))
874+ (fn 315:19 (tvar 315:22 B) (tvar 315:24 C))
881− (cell 314:3
875+ (fn 315:27 (tvar 315:30 A) (tvar 315:32 B))))
882− (const 314:4 %go)
876+ (body 316:3
883− (face 314:8 url (aura 314:12 @t)))
877+ (branch 316:3
884− (cell 315:3
878+ (wing 316:6 gates)
885− (const 315:4 %wait)
879+ (arm 317:5
886− (face 315:10 gap (aura 315:14 @dr))
880+ (cell 317:5 (bind 317:6 f) (bind 317:8 g))
887− (face 315:18 msg (tvar 315:22 M)))
881+ (gate 317:11
888− (cell 316:3
882+ (face 317:14 x (tvar 317:16 A))
889− (const 316:4 %now)
883+ (group 317:18
890− (face 316:9 reply
884+ (call 317:19
891− (fn 316:15 (aura 316:18 @da) (tvar 316:22 M))))
885+ (wing 317:19 f)
892− (cell 317:3
886+ (group 317:21
893− (const 317:4 %who)
887+ (call 317:22 (wing 317:22 g) (wing 317:24 x)))))))))))
894− (face 317:9 reply
888+ (value 319:1 cury
895− (fn 317:15 (aura 317:18 @p) (tvar 317:21 M)))))))
889+ (gate 319:9
896− (value 319:1 gth
890+ (face 319:12 args
897− (gate 319:8
891+ (cell 319:17
898− (face 319:11 args
892+ (fn 319:18
899− (cell 319:16 (tvar 319:17 A) (tvar 319:19 A)))
893+ (cell 319:21 (tvar 319:22 A) (tvar 319:24 B))
900− (group 319:22
894+ (tvar 319:27 C))
901− (call 319:23 (wing 319:23 gth-atom.internal) (wing 319:41 args))))))
895+ (tvar 319:30 A)))
896+ (body 320:3
897+ (branch 320:3
898+ (wing 320:6 args)
899+ (arm 321:5
900+ (cell 321:5 (bind 321:6 f) (bind 321:8 a))
901+ (gate 321:11
902+ (face 321:14 b (tvar 321:16 B))
903+ (group 321:18
904+ (call 321:19 (wing 321:19 f) (wing 321:21 a) (wing 321:23 b)))))))))
905+ (value 323:1 curr
906+ (gate 323:9
907+ (face 323:12 args
908+ (cell 323:17
909+ (fn 323:18
910+ (cell 323:21 (tvar 323:22 A) (tvar 323:24 B))
911+ (tvar 323:27 C))
912+ (tvar 323:30 B)))
913+ (body 324:3
914+ (branch 324:3
915+ (wing 324:6 args)
916+ (arm 325:5
917+ (cell 325:5 (bind 325:6 f) (bind 325:8 b))
918+ (gate 325:11
919+ (face 325:14 a (tvar 325:16 A))
920+ (group 325:18
921+ (call 325:19 (wing 325:19 f) (wing 325:21 a) (wing 325:23 b)))))))))
922+ (mold 327:1 cmd
923+ (generic 327:8 M
924+ (union 328:3
925+ (cell 328:3
926+ (const 328:4 %poke)
927+ (face 328:10 p (ref 328:12 poke))
928+ (face 328:17 reply
929+ (fn 328:23
930+ (apply 328:26 unit (aura 328:32 @t))
931+ (tvar 328:36 M))))
932+ (cell 329:3
933+ (const 329:4 %go)
934+ (face 329:8 url (aura 329:12 @t)))
935+ (cell 330:3
936+ (const 330:4 %wait)
937+ (face 330:10 gap (aura 330:14 @dr))
938+ (face 330:18 msg (tvar 330:22 M)))
939+ (cell 331:3
940+ (const 331:4 %now)
941+ (face 331:9 reply
942+ (fn 331:15 (aura 331:18 @da) (tvar 331:22 M))))
943+ (cell 332:3
944+ (const 332:4 %who)
945+ (face 332:9 reply
946+ (fn 332:15 (aura 332:18 @p) (tvar 332:21 M)))))))
947+ (value 334:1 gth
948+ (gate 334:8
949+ (face 334:11 args
950+ (cell 334:16 (tvar 334:17 A) (tvar 334:19 A)))
951+ (group 334:22
952+ (call 334:23 (wing 334:23 gth-atom.internal) (wing 334:41 args)))))
953+ (value 335:1 add
954+ (gate 335:8
955+ (face 335:11 args
956+ (cell 335:16 (tvar 335:17 A) (tvar 335:19 A)))
957+ (group 335:22
958+ (call 335:23 (wing 335:23 add-atom.internal) (wing 335:41 args)))))
959+ (value 336:1 dec
960+ (gate 336:8
961+ (face 336:11 atom (tvar 336:16 A))
962+ (group 336:18
963+ (call 336:19 (wing 336:19 dec-atom.internal) (wing 336:37 atom)))))
964+ (mold 338:1 ask
965+ (generic 338:8 M
966+ (apply 338:15 ask.internal (tvar 338:29 M))))
967+ (value 339:1 pure
968+ (gate 339:9
969+ (face 339:12 x (tvar 339:14 M))
970+ (cast 339:16
971+ (apply 339:19 ask (tvar 339:24 M))
972+ (tuple 339:27 (lit 339:28 %pure) (wing 339:34 x))))))
tests/golden/prelude-unit-list-transforms/types.txt+7
@@ -1,5 +1,6 @@
1partial inference; module not checked
1partial inference; module not checked
2+$ poke: not checked
2+$ poke: not checked
3++$ qath: not checked
3++ same: $-(A A)
4++ same: $-(A A)
4++ head: $-([A B] A)
5++ head: $-([A B] A)
5++ tail: $-([A B] B)
6++ tail: $-([A B] B)
@@ -28,6 +29,7 @@ partial inference; module not checked
28+$ spot: not checked
29+$ spot: not checked
29+$ toon: cases proven disjoint; mold not checked
30+$ toon: cases proven disjoint; mold not checked
30+$ like: not checked
31+$ like: not checked
32+++ like: sample mold is not supported by partial inference
31++ wonk: sample mold is not supported by partial inference
33++ wonk: sample mold is not supported by partial inference
32+$ lone: not checked
34+$ lone: not checked
33+$ lest: not checked
35+$ lest: not checked
@@ -41,6 +43,7 @@ partial inference; module not checked
41++ snoc: sample mold is not supported by partial inference
43++ snoc: sample mold is not supported by partial inference
42++ flop: sample mold is not supported by partial inference
44++ flop: sample mold is not supported by partial inference
43++ drop: cast mold is not supported by partial inference
45++ drop: cast mold is not supported by partial inference
46+++ bond: $-($-(~ A) $-((unit A) A))
44++ bind: unit construction needs the standard prelude in partial inference
47++ bind: unit construction needs the standard prelude in partial inference
45++ biff: $-([(unit A) $-(A (unit B))] (unit B))
48++ biff: $-([(unit A) $-(A (unit B))] (unit B))
46++ both: unit construction needs the standard prelude in partial inference
49++ both: unit construction needs the standard prelude in partial inference
@@ -63,3 +66,7 @@ partial inference; module not checked
63++ curr: $-([$-([A B] C) B] $-(A C))
66++ curr: $-([$-([A B] C) B] $-(A C))
64+$ cmd: cases proven disjoint; mold not checked
67+$ cmd: cases proven disjoint; mold not checked
65++ gth: field access is not supported by partial inference
68++ gth: field access is not supported by partial inference
69+++ add: field access is not supported by partial inference
70+++ dec: field access is not supported by partial inference
71++$ ask: not checked
72+++ pure: cast mold is not supported by partial inference
tests/golden/types-arithmetic-combined/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: docs/spec/grammar.md, Molds, Atoms: "Arithmetic rejects loobean operands: `?` contains only 0 and 1, while an arithmetic result need not."
2+tests: Both inc operand orders retain non-loobean restrictions through aliases, concrete and generic holes, numeric defaulting, pending tags and @/? boundary checks.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-arithmetic-combined/modules.txtnew file+1
@@ -0,0 +1 @@
1+# Opt in to the actual source-backed prelude.
tests/golden/types-arithmetic-combined/source.jibbnew file+56
@@ -0,0 +1,56 @@
1+++ inc |= n=A (add n 1)
2+++ inc-reverse |= n=A (add 1 n)
3+++ inc-decimal ^- @ud (inc 2)
4+++ inc-hex ^- @ux (inc 0x2)
5+++ reverse-decimal ^- @ud (inc-reverse 2)
6+++ reverse-hex ^- @ux (inc-reverse 0x2)
7+++ default (add 1 2)
8+++ decrease-decimal ^- @ud (dec 2)
9+++ decrease-hex ^- @ux (dec 0x2)
10+++ bool-add (add %.n %.n)
11+++ bool-dec (dec %.n)
12+++ bool-reverse (add 1 %.y)
13+++ bool-inc (inc %.y)
14+++ bool-gate |= x=? (inc x)
15+++ bool-result ^- ? (add 1 1)
16+++ compare-bool (gth %.n %.y)
17+++ mixed (add ~zod "hi")
18+++ cells (add [1 2] [3 4])
19+++ distinct |= [a=A b=B] (add a b)
20+++ shared |= [a=A b=A] (add a b)
21+++ capture |= n=A
22+ ++ inner |= x=A (add n 1)
23+ (inner n)
24+++ nested |= n=A |= x=A (add n 1)
25+++ unrelated
26+ ~& %dangling
27+ (add 1 2)
28+++ identity |= x=A x
29+++ identity-bool (identity %.y)
30+++ alias-inc inc
31+++ alias-decimal ^- @ud (alias-inc 2)
32+++ alias-hex ^- @ux (alias-inc 0x2)
33+++ alias-bool (alias-inc %.y)
34+++ explicit-loobean-result |= n=A ^- ? (add n 1)
35+++ any-then-bool |= [x=@ b=?] (add x b)
36+++ bool-then-any |= [b=? x=@] (add b x)
37+++ any-dec |= x=@ (dec x)
38+++ any-plus-number |= x=@ (add x 1)
39+++ number-plus-any |= x=@ (add 1 x)
40+++ any-self |= x=@ (add x x)
41+++ hole-concrete |= n=_ ^- @ud (add n 1)
42+++ hole-written |= n=A ^- _ (add n 1)
43+++ hole-unresolved |= n=_ (add n 1)
44+++ standalone (add 1 2)
45+++ discarded-number
46+ ~& 2
47+ (add 1 2)
48+++ numeric-capture |= x
49+ ++ inner (add x 1)
50+ ^- @ux x
51+++ numeric-capture-reversed |= x
52+ ++ inner (add 1 x)
53+ ^- @ux x
54+++ bound-later |= x=A
55+ ++ inner (add x 1)
56+ x
tests/golden/types-arithmetic-combined/tokens.txtnew file+511
@@ -0,0 +1,511 @@
1+1:1 glyph ++
2+1:4 name inc
3+1:8 glyph |=
4+1:11 name n
5+1:12 tight glyph =
6+1:13 tight tvar A
7+1:15 glyph (
8+1:16 tight name add
9+1:20 name n
10+1:22 lit 1
11+1:23 tight glyph )
12+2:1 NEWLINE
13+2:1 glyph ++
14+2:4 name inc-reverse
15+2:16 glyph |=
16+2:19 name n
17+2:20 tight glyph =
18+2:21 tight tvar A
19+2:23 glyph (
20+2:24 tight name add
21+2:28 lit 1
22+2:30 name n
23+2:31 tight glyph )
24+3:1 NEWLINE
25+3:1 glyph ++
26+3:4 name inc-decimal
27+3:16 glyph ^-
28+3:19 aura @ud
29+3:23 glyph (
30+3:24 tight name inc
31+3:28 lit 2
32+3:29 tight glyph )
33+4:1 NEWLINE
34+4:1 glyph ++
35+4:4 name inc-hex
36+4:12 glyph ^-
37+4:15 aura @ux
38+4:19 glyph (
39+4:20 tight name inc
40+4:24 lit 0x2
41+4:27 tight glyph )
42+5:1 NEWLINE
43+5:1 glyph ++
44+5:4 name reverse-decimal
45+5:20 glyph ^-
46+5:23 aura @ud
47+5:27 glyph (
48+5:28 tight name inc-reverse
49+5:40 lit 2
50+5:41 tight glyph )
51+6:1 NEWLINE
52+6:1 glyph ++
53+6:4 name reverse-hex
54+6:16 glyph ^-
55+6:19 aura @ux
56+6:23 glyph (
57+6:24 tight name inc-reverse
58+6:36 lit 0x2
59+6:39 tight glyph )
60+7:1 NEWLINE
61+7:1 glyph ++
62+7:4 name default
63+7:12 glyph (
64+7:13 tight name add
65+7:17 lit 1
66+7:19 lit 2
67+7:20 tight glyph )
68+8:1 NEWLINE
69+8:1 glyph ++
70+8:4 name decrease-decimal
71+8:21 glyph ^-
72+8:24 aura @ud
73+8:28 glyph (
74+8:29 tight name dec
75+8:33 lit 2
76+8:34 tight glyph )
77+9:1 NEWLINE
78+9:1 glyph ++
79+9:4 name decrease-hex
80+9:17 glyph ^-
81+9:20 aura @ux
82+9:24 glyph (
83+9:25 tight name dec
84+9:29 lit 0x2
85+9:32 tight glyph )
86+10:1 NEWLINE
87+10:1 glyph ++
88+10:4 name bool-add
89+10:13 glyph (
90+10:14 tight name add
91+10:18 lit %.n
92+10:22 lit %.n
93+10:25 tight glyph )
94+11:1 NEWLINE
95+11:1 glyph ++
96+11:4 name bool-dec
97+11:13 glyph (
98+11:14 tight name dec
99+11:18 lit %.n
100+11:21 tight glyph )
101+12:1 NEWLINE
102+12:1 glyph ++
103+12:4 name bool-reverse
104+12:17 glyph (
105+12:18 tight name add
106+12:22 lit 1
107+12:24 lit %.y
108+12:27 tight glyph )
109+13:1 NEWLINE
110+13:1 glyph ++
111+13:4 name bool-inc
112+13:13 glyph (
113+13:14 tight name inc
114+13:18 lit %.y
115+13:21 tight glyph )
116+14:1 NEWLINE
117+14:1 glyph ++
118+14:4 name bool-gate
119+14:14 glyph |=
120+14:17 name x
121+14:18 tight glyph =
122+14:19 tight glyph ?
123+14:21 glyph (
124+14:22 tight name inc
125+14:26 name x
126+14:27 tight glyph )
127+15:1 NEWLINE
128+15:1 glyph ++
129+15:4 name bool-result
130+15:16 glyph ^-
131+15:19 glyph ?
132+15:21 glyph (
133+15:22 tight name add
134+15:26 lit 1
135+15:28 lit 1
136+15:29 tight glyph )
137+16:1 NEWLINE
138+16:1 glyph ++
139+16:4 name compare-bool
140+16:17 glyph (
141+16:18 tight name gth
142+16:22 lit %.n
143+16:26 lit %.y
144+16:29 tight glyph )
145+17:1 NEWLINE
146+17:1 glyph ++
147+17:4 name mixed
148+17:10 glyph (
149+17:11 tight name add
150+17:15 lit ~zod
151+17:20 str "hi"
152+17:24 tight glyph )
153+18:1 NEWLINE
154+18:1 glyph ++
155+18:4 name cells
156+18:10 glyph (
157+18:11 tight name add
158+18:15 glyph [
159+18:16 tight lit 1
160+18:18 lit 2
161+18:19 tight glyph ]
162+18:21 glyph [
163+18:22 tight lit 3
164+18:24 lit 4
165+18:25 tight glyph ]
166+18:26 tight glyph )
167+19:1 NEWLINE
168+19:1 glyph ++
169+19:4 name distinct
170+19:13 glyph |=
171+19:16 glyph [
172+19:17 tight name a
173+19:18 tight glyph =
174+19:19 tight tvar A
175+19:21 name b
176+19:22 tight glyph =
177+19:23 tight tvar B
178+19:24 tight glyph ]
179+19:26 glyph (
180+19:27 tight name add
181+19:31 name a
182+19:33 name b
183+19:34 tight glyph )
184+20:1 NEWLINE
185+20:1 glyph ++
186+20:4 name shared
187+20:11 glyph |=
188+20:14 glyph [
189+20:15 tight name a
190+20:16 tight glyph =
191+20:17 tight tvar A
192+20:19 name b
193+20:20 tight glyph =
194+20:21 tight tvar A
195+20:22 tight glyph ]
196+20:24 glyph (
197+20:25 tight name add
198+20:29 name a
199+20:31 name b
200+20:32 tight glyph )
201+21:1 NEWLINE
202+21:1 glyph ++
203+21:4 name capture
204+21:12 glyph |=
205+21:15 name n
206+21:16 tight glyph =
207+21:17 tight tvar A
208+22:3 INDENT
209+22:3 glyph ++
210+22:6 name inner
211+22:12 glyph |=
212+22:15 name x
213+22:16 tight glyph =
214+22:17 tight tvar A
215+22:19 glyph (
216+22:20 tight name add
217+22:24 name n
218+22:26 lit 1
219+22:27 tight glyph )
220+23:3 NEWLINE
221+23:3 glyph (
222+23:4 tight name inner
223+23:10 name n
224+23:11 tight glyph )
225+24:1 DEDENT
226+24:1 NEWLINE
227+24:1 glyph ++
228+24:4 name nested
229+24:11 glyph |=
230+24:14 name n
231+24:15 tight glyph =
232+24:16 tight tvar A
233+24:18 glyph |=
234+24:21 name x
235+24:22 tight glyph =
236+24:23 tight tvar A
237+24:25 glyph (
238+24:26 tight name add
239+24:30 name n
240+24:32 lit 1
241+24:33 tight glyph )
242+25:1 NEWLINE
243+25:1 glyph ++
244+25:4 name unrelated
245+26:3 INDENT
246+26:3 glyph ~&
247+26:6 lit %dangling
248+27:5 INDENT
249+27:5 glyph (
250+27:6 tight name add
251+27:10 lit 1
252+27:12 lit 2
253+27:13 tight glyph )
254+28:1 DEDENT
255+28:1 DEDENT
256+28:1 NEWLINE
257+28:1 glyph ++
258+28:4 name identity
259+28:13 glyph |=
260+28:16 name x
261+28:17 tight glyph =
262+28:18 tight tvar A
263+28:20 name x
264+29:1 NEWLINE
265+29:1 glyph ++
266+29:4 name identity-bool
267+29:18 glyph (
268+29:19 tight name identity
269+29:28 lit %.y
270+29:31 tight glyph )
271+30:1 NEWLINE
272+30:1 glyph ++
273+30:4 name alias-inc
274+30:14 name inc
275+31:1 NEWLINE
276+31:1 glyph ++
277+31:4 name alias-decimal
278+31:18 glyph ^-
279+31:21 aura @ud
280+31:25 glyph (
281+31:26 tight name alias-inc
282+31:36 lit 2
283+31:37 tight glyph )
284+32:1 NEWLINE
285+32:1 glyph ++
286+32:4 name alias-hex
287+32:14 glyph ^-
288+32:17 aura @ux
289+32:21 glyph (
290+32:22 tight name alias-inc
291+32:32 lit 0x2
292+32:35 tight glyph )
293+33:1 NEWLINE
294+33:1 glyph ++
295+33:4 name alias-bool
296+33:15 glyph (
297+33:16 tight name alias-inc
298+33:26 lit %.y
299+33:29 tight glyph )
300+34:1 NEWLINE
301+34:1 glyph ++
302+34:4 name explicit-loobean-result
303+34:28 glyph |=
304+34:31 name n
305+34:32 tight glyph =
306+34:33 tight tvar A
307+34:35 glyph ^-
308+34:38 glyph ?
309+34:40 glyph (
310+34:41 tight name add
311+34:45 name n
312+34:47 lit 1
313+34:48 tight glyph )
314+35:1 NEWLINE
315+35:1 glyph ++
316+35:4 name any-then-bool
317+35:18 glyph |=
318+35:21 glyph [
319+35:22 tight name x
320+35:23 tight glyph =
321+35:24 tight aura @
322+35:26 name b
323+35:27 tight glyph =
324+35:28 tight glyph ?
325+35:29 tight glyph ]
326+35:31 glyph (
327+35:32 tight name add
328+35:36 name x
329+35:38 name b
330+35:39 tight glyph )
331+36:1 NEWLINE
332+36:1 glyph ++
333+36:4 name bool-then-any
334+36:18 glyph |=
335+36:21 glyph [
336+36:22 tight name b
337+36:23 tight glyph =
338+36:24 tight glyph ?
339+36:26 name x
340+36:27 tight glyph =
341+36:28 tight aura @
342+36:29 tight glyph ]
343+36:31 glyph (
344+36:32 tight name add
345+36:36 name b
346+36:38 name x
347+36:39 tight glyph )
348+37:1 NEWLINE
349+37:1 glyph ++
350+37:4 name any-dec
351+37:12 glyph |=
352+37:15 name x
353+37:16 tight glyph =
354+37:17 tight aura @
355+37:19 glyph (
356+37:20 tight name dec
357+37:24 name x
358+37:25 tight glyph )
359+38:1 NEWLINE
360+38:1 glyph ++
361+38:4 name any-plus-number
362+38:20 glyph |=
363+38:23 name x
364+38:24 tight glyph =
365+38:25 tight aura @
366+38:27 glyph (
367+38:28 tight name add
368+38:32 name x
369+38:34 lit 1
370+38:35 tight glyph )
371+39:1 NEWLINE
372+39:1 glyph ++
373+39:4 name number-plus-any
374+39:20 glyph |=
375+39:23 name x
376+39:24 tight glyph =
377+39:25 tight aura @
378+39:27 glyph (
379+39:28 tight name add
380+39:32 lit 1
381+39:34 name x
382+39:35 tight glyph )
383+40:1 NEWLINE
384+40:1 glyph ++
385+40:4 name any-self
386+40:13 glyph |=
387+40:16 name x
388+40:17 tight glyph =
389+40:18 tight aura @
390+40:20 glyph (
391+40:21 tight name add
392+40:25 name x
393+40:27 name x
394+40:28 tight glyph )
395+41:1 NEWLINE
396+41:1 glyph ++
397+41:4 name hole-concrete
398+41:18 glyph |=
399+41:21 name n
400+41:22 tight glyph =
401+41:23 tight glyph _
402+41:25 glyph ^-
403+41:28 aura @ud
404+41:32 glyph (
405+41:33 tight name add
406+41:37 name n
407+41:39 lit 1
408+41:40 tight glyph )
409+42:1 NEWLINE
410+42:1 glyph ++
411+42:4 name hole-written
412+42:17 glyph |=
413+42:20 name n
414+42:21 tight glyph =
415+42:22 tight tvar A
416+42:24 glyph ^-
417+42:27 glyph _
418+42:29 glyph (
419+42:30 tight name add
420+42:34 name n
421+42:36 lit 1
422+42:37 tight glyph )
423+43:1 NEWLINE
424+43:1 glyph ++
425+43:4 name hole-unresolved
426+43:20 glyph |=
427+43:23 name n
428+43:24 tight glyph =
429+43:25 tight glyph _
430+43:27 glyph (
431+43:28 tight name add
432+43:32 name n
433+43:34 lit 1
434+43:35 tight glyph )
435+44:1 NEWLINE
436+44:1 glyph ++
437+44:4 name standalone
438+44:15 glyph (
439+44:16 tight name add
440+44:20 lit 1
441+44:22 lit 2
442+44:23 tight glyph )
443+45:1 NEWLINE
444+45:1 glyph ++
445+45:4 name discarded-number
446+46:3 INDENT
447+46:3 glyph ~&
448+46:6 lit 2
449+47:5 INDENT
450+47:5 glyph (
451+47:6 tight name add
452+47:10 lit 1
453+47:12 lit 2
454+47:13 tight glyph )
455+48:1 DEDENT
456+48:1 DEDENT
457+48:1 NEWLINE
458+48:1 glyph ++
459+48:4 name numeric-capture
460+48:20 glyph |=
461+48:23 name x
462+49:3 INDENT
463+49:3 glyph ++
464+49:6 name inner
465+49:12 glyph (
466+49:13 tight name add
467+49:17 name x
468+49:19 lit 1
469+49:20 tight glyph )
470+50:3 NEWLINE
471+50:3 glyph ^-
472+50:6 aura @ux
473+50:10 name x
474+51:1 DEDENT
475+51:1 NEWLINE
476+51:1 glyph ++
477+51:4 name numeric-capture-reversed
478+51:29 glyph |=
479+51:32 name x
480+52:3 INDENT
481+52:3 glyph ++
482+52:6 name inner
483+52:12 glyph (
484+52:13 tight name add
485+52:17 lit 1
486+52:19 name x
487+52:20 tight glyph )
488+53:3 NEWLINE
489+53:3 glyph ^-
490+53:6 aura @ux
491+53:10 name x
492+54:1 DEDENT
493+54:1 NEWLINE
494+54:1 glyph ++
495+54:4 name bound-later
496+54:16 glyph |=
497+54:19 name x
498+54:20 tight glyph =
499+54:21 tight tvar A
500+55:3 INDENT
501+55:3 glyph ++
502+55:6 name inner
503+55:12 glyph (
504+55:13 tight name add
505+55:17 name x
506+55:19 lit 1
507+55:20 tight glyph )
508+56:3 NEWLINE
509+56:3 name x
510+56:4 DEDENT
511+56:4 NEWLINE
tests/golden/types-arithmetic-combined/tree.txtnew file+232
@@ -0,0 +1,232 @@
1+(module
2+ (value 1:1 inc
3+ (gate 1:8
4+ (face 1:11 n (tvar 1:13 A))
5+ (group 1:15
6+ (call 1:16 (wing 1:16 add) (wing 1:20 n) (lit 1:22 1)))))
7+ (value 2:1 inc-reverse
8+ (gate 2:16
9+ (face 2:19 n (tvar 2:21 A))
10+ (group 2:23
11+ (call 2:24 (wing 2:24 add) (lit 2:28 1) (wing 2:30 n)))))
12+ (value 3:1 inc-decimal
13+ (cast 3:16
14+ (aura 3:19 @ud)
15+ (group 3:23
16+ (call 3:24 (wing 3:24 inc) (lit 3:28 2)))))
17+ (value 4:1 inc-hex
18+ (cast 4:12
19+ (aura 4:15 @ux)
20+ (group 4:19
21+ (call 4:20 (wing 4:20 inc) (lit 4:24 0x2)))))
22+ (value 5:1 reverse-decimal
23+ (cast 5:20
24+ (aura 5:23 @ud)
25+ (group 5:27
26+ (call 5:28 (wing 5:28 inc-reverse) (lit 5:40 2)))))
27+ (value 6:1 reverse-hex
28+ (cast 6:16
29+ (aura 6:19 @ux)
30+ (group 6:23
31+ (call 6:24 (wing 6:24 inc-reverse) (lit 6:36 0x2)))))
32+ (value 7:1 default
33+ (group 7:12
34+ (call 7:13 (wing 7:13 add) (lit 7:17 1) (lit 7:19 2))))
35+ (value 8:1 decrease-decimal
36+ (cast 8:21
37+ (aura 8:24 @ud)
38+ (group 8:28
39+ (call 8:29 (wing 8:29 dec) (lit 8:33 2)))))
40+ (value 9:1 decrease-hex
41+ (cast 9:17
42+ (aura 9:20 @ux)
43+ (group 9:24
44+ (call 9:25 (wing 9:25 dec) (lit 9:29 0x2)))))
45+ (value 10:1 bool-add
46+ (group 10:13
47+ (call 10:14 (wing 10:14 add) (lit 10:18 %.n) (lit 10:22 %.n))))
48+ (value 11:1 bool-dec
49+ (group 11:13
50+ (call 11:14 (wing 11:14 dec) (lit 11:18 %.n))))
51+ (value 12:1 bool-reverse
52+ (group 12:17
53+ (call 12:18 (wing 12:18 add) (lit 12:22 1) (lit 12:24 %.y))))
54+ (value 13:1 bool-inc
55+ (group 13:13
56+ (call 13:14 (wing 13:14 inc) (lit 13:18 %.y))))
57+ (value 14:1 bool-gate
58+ (gate 14:14
59+ (face 14:17 x (flag 14:19))
60+ (group 14:21
61+ (call 14:22 (wing 14:22 inc) (wing 14:26 x)))))
62+ (value 15:1 bool-result
63+ (cast 15:16
64+ (flag 15:19)
65+ (group 15:21
66+ (call 15:22 (wing 15:22 add) (lit 15:26 1) (lit 15:28 1)))))
67+ (value 16:1 compare-bool
68+ (group 16:17
69+ (call 16:18 (wing 16:18 gth) (lit 16:22 %.n) (lit 16:26 %.y))))
70+ (value 17:1 mixed
71+ (group 17:10
72+ (call 17:11 (wing 17:11 add) (lit 17:15 ~zod) (str 17:20 "hi"))))
73+ (value 18:1 cells
74+ (group 18:10
75+ (call 18:11
76+ (wing 18:11 add)
77+ (tuple 18:15 (lit 18:16 1) (lit 18:18 2))
78+ (tuple 18:21 (lit 18:22 3) (lit 18:24 4)))))
79+ (value 19:1 distinct
80+ (gate 19:13
81+ (cell 19:16
82+ (face 19:17 a (tvar 19:19 A))
83+ (face 19:21 b (tvar 19:23 B)))
84+ (group 19:26
85+ (call 19:27 (wing 19:27 add) (wing 19:31 a) (wing 19:33 b)))))
86+ (value 20:1 shared
87+ (gate 20:11
88+ (cell 20:14
89+ (face 20:15 a (tvar 20:17 A))
90+ (face 20:19 b (tvar 20:21 A)))
91+ (group 20:24
92+ (call 20:25 (wing 20:25 add) (wing 20:29 a) (wing 20:31 b)))))
93+ (value 21:1 capture
94+ (gate 21:12
95+ (face 21:15 n (tvar 21:17 A))
96+ (body 22:3
97+ (value 22:3 inner
98+ (gate 22:12
99+ (face 22:15 x (tvar 22:17 A))
100+ (group 22:19
101+ (call 22:20 (wing 22:20 add) (wing 22:24 n) (lit 22:26 1)))))
102+ (group 23:3
103+ (call 23:4 (wing 23:4 inner) (wing 23:10 n))))))
104+ (value 24:1 nested
105+ (gate 24:11
106+ (face 24:14 n (tvar 24:16 A))
107+ (gate 24:18
108+ (face 24:21 x (tvar 24:23 A))
109+ (group 24:25
110+ (call 24:26 (wing 24:26 add) (wing 24:30 n) (lit 24:32 1))))))
111+ (value 25:1 unrelated
112+ (body 26:3
113+ (trace 26:3
114+ (lit 26:6 %dangling)
115+ (body 27:5
116+ (group 27:5
117+ (call 27:6 (wing 27:6 add) (lit 27:10 1) (lit 27:12 2)))))))
118+ (value 28:1 identity
119+ (gate 28:13
120+ (face 28:16 x (tvar 28:18 A))
121+ (wing 28:20 x)))
122+ (value 29:1 identity-bool
123+ (group 29:18
124+ (call 29:19 (wing 29:19 identity) (lit 29:28 %.y))))
125+ (value 30:1 alias-inc (wing 30:14 inc))
126+ (value 31:1 alias-decimal
127+ (cast 31:18
128+ (aura 31:21 @ud)
129+ (group 31:25
130+ (call 31:26 (wing 31:26 alias-inc) (lit 31:36 2)))))
131+ (value 32:1 alias-hex
132+ (cast 32:14
133+ (aura 32:17 @ux)
134+ (group 32:21
135+ (call 32:22 (wing 32:22 alias-inc) (lit 32:32 0x2)))))
136+ (value 33:1 alias-bool
137+ (group 33:15
138+ (call 33:16 (wing 33:16 alias-inc) (lit 33:26 %.y))))
139+ (value 34:1 explicit-loobean-result
140+ (gate 34:28
141+ (face 34:31 n (tvar 34:33 A))
142+ (cast 34:35
143+ (flag 34:38)
144+ (group 34:40
145+ (call 34:41 (wing 34:41 add) (wing 34:45 n) (lit 34:47 1))))))
146+ (value 35:1 any-then-bool
147+ (gate 35:18
148+ (cell 35:21
149+ (face 35:22 x (aura 35:24 @))
150+ (face 35:26 b (flag 35:28)))
151+ (group 35:31
152+ (call 35:32 (wing 35:32 add) (wing 35:36 x) (wing 35:38 b)))))
153+ (value 36:1 bool-then-any
154+ (gate 36:18
155+ (cell 36:21
156+ (face 36:22 b (flag 36:24))
157+ (face 36:26 x (aura 36:28 @)))
158+ (group 36:31
159+ (call 36:32 (wing 36:32 add) (wing 36:36 b) (wing 36:38 x)))))
160+ (value 37:1 any-dec
161+ (gate 37:12
162+ (face 37:15 x (aura 37:17 @))
163+ (group 37:19
164+ (call 37:20 (wing 37:20 dec) (wing 37:24 x)))))
165+ (value 38:1 any-plus-number
166+ (gate 38:20
167+ (face 38:23 x (aura 38:25 @))
168+ (group 38:27
169+ (call 38:28 (wing 38:28 add) (wing 38:32 x) (lit 38:34 1)))))
170+ (value 39:1 number-plus-any
171+ (gate 39:20
172+ (face 39:23 x (aura 39:25 @))
173+ (group 39:27
174+ (call 39:28 (wing 39:28 add) (lit 39:32 1) (wing 39:34 x)))))
175+ (value 40:1 any-self
176+ (gate 40:13
177+ (face 40:16 x (aura 40:18 @))
178+ (group 40:20
179+ (call 40:21 (wing 40:21 add) (wing 40:25 x) (wing 40:27 x)))))
180+ (value 41:1 hole-concrete
181+ (gate 41:18
182+ (face 41:21 n (hole 41:23))
183+ (cast 41:25
184+ (aura 41:28 @ud)
185+ (group 41:32
186+ (call 41:33 (wing 41:33 add) (wing 41:37 n) (lit 41:39 1))))))
187+ (value 42:1 hole-written
188+ (gate 42:17
189+ (face 42:20 n (tvar 42:22 A))
190+ (cast 42:24
191+ (hole 42:27)
192+ (group 42:29
193+ (call 42:30 (wing 42:30 add) (wing 42:34 n) (lit 42:36 1))))))
194+ (value 43:1 hole-unresolved
195+ (gate 43:20
196+ (face 43:23 n (hole 43:25))
197+ (group 43:27
198+ (call 43:28 (wing 43:28 add) (wing 43:32 n) (lit 43:34 1)))))
199+ (value 44:1 standalone
200+ (group 44:15
201+ (call 44:16 (wing 44:16 add) (lit 44:20 1) (lit 44:22 2))))
202+ (value 45:1 discarded-number
203+ (body 46:3
204+ (trace 46:3
205+ (lit 46:6 2)
206+ (body 47:5
207+ (group 47:5
208+ (call 47:6 (wing 47:6 add) (lit 47:10 1) (lit 47:12 2)))))))
209+ (value 48:1 numeric-capture
210+ (gate 48:20
211+ (bind 48:23 x)
212+ (body 49:3
213+ (value 49:3 inner
214+ (group 49:12
215+ (call 49:13 (wing 49:13 add) (wing 49:17 x) (lit 49:19 1))))
216+ (cast 50:3 (aura 50:6 @ux) (wing 50:10 x)))))
217+ (value 51:1 numeric-capture-reversed
218+ (gate 51:29
219+ (bind 51:32 x)
220+ (body 52:3
221+ (value 52:3 inner
222+ (group 52:12
223+ (call 52:13 (wing 52:13 add) (lit 52:17 1) (wing 52:19 x))))
224+ (cast 53:3 (aura 53:6 @ux) (wing 53:10 x)))))
225+ (value 54:1 bound-later
226+ (gate 54:16
227+ (face 54:19 x (tvar 54:21 A))
228+ (body 55:3
229+ (value 55:3 inner
230+ (group 55:12
231+ (call 55:13 (wing 55:13 add) (wing 55:17 x) (lit 55:19 1))))
232+ (wing 56:3 x)))))
tests/golden/types-arithmetic-combined/types.txtnew file+120
@@ -0,0 +1,120 @@
1+partial inference; module not checked
2+++ inc: $-(A A) where A is an atom other than ?
3+++ inc-reverse: $-(A A) where A is an atom other than ?
4+++ inc-decimal: @ud
5+++ inc-hex: @ux
6+++ reverse-decimal: @ud
7+++ reverse-hex: @ux
8+++ default: @ud
9+++ decrease-decimal: @ud
10+++ decrease-hex: @ux
11+++ bool-add: call's sample and argument types do not unify
12+/tests/golden/types-arithmetic-combined/source.jibb:10:14: called gate has type $-([A A] A) where A is an atom other than ?
13+++ bool-add (add %.n %.n)
14+ ^
15+/tests/golden/types-arithmetic-combined/source.jibb:10:18: argument has type ?
16+++ bool-add (add %.n %.n)
17+ ^
18+++ bool-dec: call's sample and argument types do not unify
19+/tests/golden/types-arithmetic-combined/source.jibb:11:14: called gate has type $-(A A) where A is an atom other than ?
20+++ bool-dec (dec %.n)
21+ ^
22+/tests/golden/types-arithmetic-combined/source.jibb:11:18: argument has type ?
23+++ bool-dec (dec %.n)
24+ ^
25+++ bool-reverse: call's sample and argument types do not unify
26+/tests/golden/types-arithmetic-combined/source.jibb:12:18: called gate has type $-([A A] A) where A is an atom other than ?
27+++ bool-reverse (add 1 %.y)
28+ ^
29+/tests/golden/types-arithmetic-combined/source.jibb:12:22: argument
30+++ bool-reverse (add 1 %.y)
31+ ^
32+++ bool-inc: call's sample and argument types do not unify
33+/tests/golden/types-arithmetic-combined/source.jibb:13:14: called gate has type $-(A A) where A is an atom other than ?
34+++ bool-inc (inc %.y)
35+ ^
36+/tests/golden/types-arithmetic-combined/source.jibb:13:18: argument has type ?
37+++ bool-inc (inc %.y)
38+ ^
39+++ bool-gate: call's sample and argument types do not unify
40+/tests/golden/types-arithmetic-combined/source.jibb:14:22: called gate has type $-(A A) where A is an atom other than ?
41+++ bool-gate |= x=? (inc x)
42+ ^
43+/tests/golden/types-arithmetic-combined/source.jibb:14:26: argument has type ?
44+++ bool-gate |= x=? (inc x)
45+ ^
46+++ bool-result: cast mold and expression type do not unify
47+/tests/golden/types-arithmetic-combined/source.jibb:15:19: cast mold has type ?
48+++ bool-result ^- ? (add 1 1)
49+ ^
50+/tests/golden/types-arithmetic-combined/source.jibb:15:21: expression
51+++ bool-result ^- ? (add 1 1)
52+ ^
53+++ compare-bool: ?
54+++ mixed: call's sample and argument types do not unify
55+/tests/golden/types-arithmetic-combined/source.jibb:17:11: called gate has type $-([A A] A) where A is an atom other than ?
56+++ mixed (add ~zod "hi")
57+ ^
58+/tests/golden/types-arithmetic-combined/source.jibb:17:15: argument has type [@p @t]
59+++ mixed (add ~zod "hi")
60+ ^
61+++ cells: call's sample and argument types do not unify
62+/tests/golden/types-arithmetic-combined/source.jibb:18:11: called gate has type $-([A A] A) where A is an atom other than ?
63+++ cells (add [1 2] [3 4])
64+ ^
65+/tests/golden/types-arithmetic-combined/source.jibb:18:15: argument
66+++ cells (add [1 2] [3 4])
67+ ^
68+++ distinct: distinct type variables `A` and `B` must not be forced equal; use the same capital for a shared type
69+/tests/golden/types-arithmetic-combined/source.jibb:19:19: first type variable
70+++ distinct |= [a=A b=B] (add a b)
71+ ^
72+/tests/golden/types-arithmetic-combined/source.jibb:19:23: second type variable
73+++ distinct |= [a=A b=B] (add a b)
74+ ^
75+++ shared: $-([a=A b=A] A) where A is an atom other than ?
76+++ capture: explicit capital constraints are not supported by partial inference
77+++ nested: $-(A $-(A A)) where A is an atom other than ?
78+++ unrelated: tag needs context in partial inference
79+++ identity: $-(A A)
80+++ identity-bool: ?
81+++ alias-inc: $-(A A) where A is an atom other than ?
82+++ alias-decimal: @ud
83+++ alias-hex: @ux
84+++ alias-bool: call's sample and argument types do not unify
85+/tests/golden/types-arithmetic-combined/source.jibb:33:16: called gate has type $-(A A) where A is an atom other than ?
86+++ alias-bool (alias-inc %.y)
87+ ^
88+/tests/golden/types-arithmetic-combined/source.jibb:33:26: argument has type ?
89+++ alias-bool (alias-inc %.y)
90+ ^
91+++ explicit-loobean-result: cast mold and expression type do not unify
92+/tests/golden/types-arithmetic-combined/source.jibb:34:38: cast mold has type ?
93+++ explicit-loobean-result |= n=A ^- ? (add n 1)
94+ ^
95+/tests/golden/types-arithmetic-combined/source.jibb:34:40: expression
96+++ explicit-loobean-result |= n=A ^- ? (add n 1)
97+ ^
98+++ any-then-bool: call constraint is not supported by partial inference
99+++ bool-then-any: call's sample and argument types do not unify
100+/tests/golden/types-arithmetic-combined/source.jibb:36:32: called gate has type $-([A A] A) where A is an atom other than ?
101+++ bool-then-any |= [b=? x=@] (add b x)
102+ ^
103+/tests/golden/types-arithmetic-combined/source.jibb:36:36: argument has type ?
104+++ bool-then-any |= [b=? x=@] (add b x)
105+ ^
106+++ any-dec: call constraint is not supported by partial inference
107+++ any-plus-number: call constraint is not supported by partial inference
108+++ number-plus-any: call constraint is not supported by partial inference
109+++ any-self: call constraint is not supported by partial inference
110+++ hole-concrete: $-(@ud @ud)
111+++ hole-written: $-(A A) where A is an atom other than ?
112+++ hole-unresolved: type hole needs unsupported inference
113+/tests/golden/types-arithmetic-combined/source.jibb:43:25: type hole
114+++ hole-unresolved |= n=_ (add n 1)
115+ ^
116+++ standalone: @ud
117+++ discarded-number: @ud
118+++ numeric-capture: local definitions need unsupported inference
119+++ numeric-capture-reversed: local definitions need unsupported inference
120+++ bound-later: explicit capital constraints are not supported by partial inference
tests/golden/types-arithmetic-generic/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: docs/spec/grammar.md, Molds, Atoms: "Arithmetic rejects loobean operands: `?` contains only 0 and 1, while an arithmetic result need not."
2+tests: Generic add and dec, aliases and captured variables retain the restriction; ordinary identity and comparison still accept loobeans.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-arithmetic-generic/modules.txtnew file+1
@@ -0,0 +1 @@
1+# Opt in to the actual source-backed prelude.
tests/golden/types-arithmetic-generic/source.jibbnew file+21
@@ -0,0 +1,21 @@
1+++ sum |= [a=A b=A] (add a b)
2+++ decreasing |= x=A (dec x)
3+++ forward sum
4+++ text-aura ^- @t (sum "a" "b")
5+++ ship-aura ^- @p (sum ~zod ~nec)
6+++ decimal ^- @ud (sum 1 2)
7+++ hex ^- @ux (sum 0x1 0x2)
8+++ decrease-dec ^- @ud (decreasing 2)
9+++ decrease-hex ^- @ux (decreasing 0x2)
10+++ bad-sum (sum %.y %.n)
11+++ bad-dec (decreasing %.y)
12+++ bad-alias (forward %.y %.n)
13+++ compare (gth %.y %.n)
14+++ identity |= x=A x
15+++ accept-bool (identity %.y)
16+++ capture |= x=A
17+ ++ nested |= y=A (add x y)
18+ (nested x)
19+++ mixed |= [x=@ b=?] (sum x b)
20+++ opposite |= [b=? x=@] (sum b x)
21+++ any-dec |= x=@ (decreasing x)
tests/golden/types-arithmetic-generic/tokens.txtnew file+206
@@ -0,0 +1,206 @@
1+1:1 glyph ++
2+1:4 name sum
3+1:8 glyph |=
4+1:11 glyph [
5+1:12 tight name a
6+1:13 tight glyph =
7+1:14 tight tvar A
8+1:16 name b
9+1:17 tight glyph =
10+1:18 tight tvar A
11+1:19 tight glyph ]
12+1:21 glyph (
13+1:22 tight name add
14+1:26 name a
15+1:28 name b
16+1:29 tight glyph )
17+2:1 NEWLINE
18+2:1 glyph ++
19+2:4 name decreasing
20+2:15 glyph |=
21+2:18 name x
22+2:19 tight glyph =
23+2:20 tight tvar A
24+2:22 glyph (
25+2:23 tight name dec
26+2:27 name x
27+2:28 tight glyph )
28+3:1 NEWLINE
29+3:1 glyph ++
30+3:4 name forward
31+3:12 name sum
32+4:1 NEWLINE
33+4:1 glyph ++
34+4:4 name text-aura
35+4:14 glyph ^-
36+4:17 aura @t
37+4:20 glyph (
38+4:21 tight name sum
39+4:25 str "a"
40+4:29 str "b"
41+4:32 tight glyph )
42+5:1 NEWLINE
43+5:1 glyph ++
44+5:4 name ship-aura
45+5:14 glyph ^-
46+5:17 aura @p
47+5:20 glyph (
48+5:21 tight name sum
49+5:25 lit ~zod
50+5:30 lit ~nec
51+5:34 tight glyph )
52+6:1 NEWLINE
53+6:1 glyph ++
54+6:4 name decimal
55+6:12 glyph ^-
56+6:15 aura @ud
57+6:19 glyph (
58+6:20 tight name sum
59+6:24 lit 1
60+6:26 lit 2
61+6:27 tight glyph )
62+7:1 NEWLINE
63+7:1 glyph ++
64+7:4 name hex
65+7:8 glyph ^-
66+7:11 aura @ux
67+7:15 glyph (
68+7:16 tight name sum
69+7:20 lit 0x1
70+7:24 lit 0x2
71+7:27 tight glyph )
72+8:1 NEWLINE
73+8:1 glyph ++
74+8:4 name decrease-dec
75+8:17 glyph ^-
76+8:20 aura @ud
77+8:24 glyph (
78+8:25 tight name decreasing
79+8:36 lit 2
80+8:37 tight glyph )
81+9:1 NEWLINE
82+9:1 glyph ++
83+9:4 name decrease-hex
84+9:17 glyph ^-
85+9:20 aura @ux
86+9:24 glyph (
87+9:25 tight name decreasing
88+9:36 lit 0x2
89+9:39 tight glyph )
90+10:1 NEWLINE
91+10:1 glyph ++
92+10:4 name bad-sum
93+10:12 glyph (
94+10:13 tight name sum
95+10:17 lit %.y
96+10:21 lit %.n
97+10:24 tight glyph )
98+11:1 NEWLINE
99+11:1 glyph ++
100+11:4 name bad-dec
101+11:12 glyph (
102+11:13 tight name decreasing
103+11:24 lit %.y
104+11:27 tight glyph )
105+12:1 NEWLINE
106+12:1 glyph ++
107+12:4 name bad-alias
108+12:14 glyph (
109+12:15 tight name forward
110+12:23 lit %.y
111+12:27 lit %.n
112+12:30 tight glyph )
113+13:1 NEWLINE
114+13:1 glyph ++
115+13:4 name compare
116+13:12 glyph (
117+13:13 tight name gth
118+13:17 lit %.y
119+13:21 lit %.n
120+13:24 tight glyph )
121+14:1 NEWLINE
122+14:1 glyph ++
123+14:4 name identity
124+14:13 glyph |=
125+14:16 name x
126+14:17 tight glyph =
127+14:18 tight tvar A
128+14:20 name x
129+15:1 NEWLINE
130+15:1 glyph ++
131+15:4 name accept-bool
132+15:16 glyph (
133+15:17 tight name identity
134+15:26 lit %.y
135+15:29 tight glyph )
136+16:1 NEWLINE
137+16:1 glyph ++
138+16:4 name capture
139+16:12 glyph |=
140+16:15 name x
141+16:16 tight glyph =
142+16:17 tight tvar A
143+17:3 INDENT
144+17:3 glyph ++
145+17:6 name nested
146+17:13 glyph |=
147+17:16 name y
148+17:17 tight glyph =
149+17:18 tight tvar A
150+17:20 glyph (
151+17:21 tight name add
152+17:25 name x
153+17:27 name y
154+17:28 tight glyph )
155+18:3 NEWLINE
156+18:3 glyph (
157+18:4 tight name nested
158+18:11 name x
159+18:12 tight glyph )
160+19:1 DEDENT
161+19:1 NEWLINE
162+19:1 glyph ++
163+19:4 name mixed
164+19:10 glyph |=
165+19:13 glyph [
166+19:14 tight name x
167+19:15 tight glyph =
168+19:16 tight aura @
169+19:18 name b
170+19:19 tight glyph =
171+19:20 tight glyph ?
172+19:21 tight glyph ]
173+19:23 glyph (
174+19:24 tight name sum
175+19:28 name x
176+19:30 name b
177+19:31 tight glyph )
178+20:1 NEWLINE
179+20:1 glyph ++
180+20:4 name opposite
181+20:13 glyph |=
182+20:16 glyph [
183+20:17 tight name b
184+20:18 tight glyph =
185+20:19 tight glyph ?
186+20:21 name x
187+20:22 tight glyph =
188+20:23 tight aura @
189+20:24 tight glyph ]
190+20:26 glyph (
191+20:27 tight name sum
192+20:31 name b
193+20:33 name x
194+20:34 tight glyph )
195+21:1 NEWLINE
196+21:1 glyph ++
197+21:4 name any-dec
198+21:12 glyph |=
199+21:15 name x
200+21:16 tight glyph =
201+21:17 tight aura @
202+21:19 glyph (
203+21:20 tight name decreasing
204+21:31 name x
205+21:32 tight glyph )
206+21:33 NEWLINE
tests/golden/types-arithmetic-generic/tree.txtnew file+93
@@ -0,0 +1,93 @@
1+(module
2+ (value 1:1 sum
3+ (gate 1:8
4+ (cell 1:11
5+ (face 1:12 a (tvar 1:14 A))
6+ (face 1:16 b (tvar 1:18 A)))
7+ (group 1:21
8+ (call 1:22 (wing 1:22 add) (wing 1:26 a) (wing 1:28 b)))))
9+ (value 2:1 decreasing
10+ (gate 2:15
11+ (face 2:18 x (tvar 2:20 A))
12+ (group 2:22
13+ (call 2:23 (wing 2:23 dec) (wing 2:27 x)))))
14+ (value 3:1 forward (wing 3:12 sum))
15+ (value 4:1 text-aura
16+ (cast 4:14
17+ (aura 4:17 @t)
18+ (group 4:20
19+ (call 4:21 (wing 4:21 sum) (str 4:25 "a") (str 4:29 "b")))))
20+ (value 5:1 ship-aura
21+ (cast 5:14
22+ (aura 5:17 @p)
23+ (group 5:20
24+ (call 5:21 (wing 5:21 sum) (lit 5:25 ~zod) (lit 5:30 ~nec)))))
25+ (value 6:1 decimal
26+ (cast 6:12
27+ (aura 6:15 @ud)
28+ (group 6:19
29+ (call 6:20 (wing 6:20 sum) (lit 6:24 1) (lit 6:26 2)))))
30+ (value 7:1 hex
31+ (cast 7:8
32+ (aura 7:11 @ux)
33+ (group 7:15
34+ (call 7:16 (wing 7:16 sum) (lit 7:20 0x1) (lit 7:24 0x2)))))
35+ (value 8:1 decrease-dec
36+ (cast 8:17
37+ (aura 8:20 @ud)
38+ (group 8:24
39+ (call 8:25 (wing 8:25 decreasing) (lit 8:36 2)))))
40+ (value 9:1 decrease-hex
41+ (cast 9:17
42+ (aura 9:20 @ux)
43+ (group 9:24
44+ (call 9:25 (wing 9:25 decreasing) (lit 9:36 0x2)))))
45+ (value 10:1 bad-sum
46+ (group 10:12
47+ (call 10:13 (wing 10:13 sum) (lit 10:17 %.y) (lit 10:21 %.n))))
48+ (value 11:1 bad-dec
49+ (group 11:12
50+ (call 11:13 (wing 11:13 decreasing) (lit 11:24 %.y))))
51+ (value 12:1 bad-alias
52+ (group 12:14
53+ (call 12:15 (wing 12:15 forward) (lit 12:23 %.y) (lit 12:27 %.n))))
54+ (value 13:1 compare
55+ (group 13:12
56+ (call 13:13 (wing 13:13 gth) (lit 13:17 %.y) (lit 13:21 %.n))))
57+ (value 14:1 identity
58+ (gate 14:13
59+ (face 14:16 x (tvar 14:18 A))
60+ (wing 14:20 x)))
61+ (value 15:1 accept-bool
62+ (group 15:16
63+ (call 15:17 (wing 15:17 identity) (lit 15:26 %.y))))
64+ (value 16:1 capture
65+ (gate 16:12
66+ (face 16:15 x (tvar 16:17 A))
67+ (body 17:3
68+ (value 17:3 nested
69+ (gate 17:13
70+ (face 17:16 y (tvar 17:18 A))
71+ (group 17:20
72+ (call 17:21 (wing 17:21 add) (wing 17:25 x) (wing 17:27 y)))))
73+ (group 18:3
74+ (call 18:4 (wing 18:4 nested) (wing 18:11 x))))))
75+ (value 19:1 mixed
76+ (gate 19:10
77+ (cell 19:13
78+ (face 19:14 x (aura 19:16 @))
79+ (face 19:18 b (flag 19:20)))
80+ (group 19:23
81+ (call 19:24 (wing 19:24 sum) (wing 19:28 x) (wing 19:30 b)))))
82+ (value 20:1 opposite
83+ (gate 20:13
84+ (cell 20:16
85+ (face 20:17 b (flag 20:19))
86+ (face 20:21 x (aura 20:23 @)))
87+ (group 20:26
88+ (call 20:27 (wing 20:27 sum) (wing 20:31 b) (wing 20:33 x)))))
89+ (value 21:1 any-dec
90+ (gate 21:12
91+ (face 21:15 x (aura 21:17 @))
92+ (group 21:19
93+ (call 21:20 (wing 21:20 decreasing) (wing 21:31 x))))))
tests/golden/types-arithmetic-generic/types.txtnew file+44
@@ -0,0 +1,44 @@
1+partial inference; module not checked
2+++ sum: $-([a=A b=A] A) where A is an atom other than ?
3+++ decreasing: $-(A A) where A is an atom other than ?
4+++ forward: $-([a=A b=A] A) where A is an atom other than ?
5+++ text-aura: @t
6+++ ship-aura: @p
7+++ decimal: @ud
8+++ hex: @ux
9+++ decrease-dec: @ud
10+++ decrease-hex: @ux
11+++ bad-sum: call's sample and argument types do not unify
12+/tests/golden/types-arithmetic-generic/source.jibb:10:13: called gate has type $-([a=A b=A] A) where A is an atom other than ?
13+++ bad-sum (sum %.y %.n)
14+ ^
15+/tests/golden/types-arithmetic-generic/source.jibb:10:17: argument has type ?
16+++ bad-sum (sum %.y %.n)
17+ ^
18+++ bad-dec: call's sample and argument types do not unify
19+/tests/golden/types-arithmetic-generic/source.jibb:11:13: called gate has type $-(A A) where A is an atom other than ?
20+++ bad-dec (decreasing %.y)
21+ ^
22+/tests/golden/types-arithmetic-generic/source.jibb:11:24: argument has type ?
23+++ bad-dec (decreasing %.y)
24+ ^
25+++ bad-alias: call's sample and argument types do not unify
26+/tests/golden/types-arithmetic-generic/source.jibb:12:15: called gate has type $-([a=A b=A] A) where A is an atom other than ?
27+++ bad-alias (forward %.y %.n)
28+ ^
29+/tests/golden/types-arithmetic-generic/source.jibb:12:23: argument has type ?
30+++ bad-alias (forward %.y %.n)
31+ ^
32+++ compare: ?
33+++ identity: $-(A A)
34+++ accept-bool: ?
35+++ capture: $-(A A) where A is an atom other than ?
36+++ mixed: call constraint is not supported by partial inference
37+++ opposite: call's sample and argument types do not unify
38+/tests/golden/types-arithmetic-generic/source.jibb:20:27: called gate has type $-([a=A b=A] A) where A is an atom other than ?
39+++ opposite |= [b=? x=@] (sum b x)
40+ ^
41+/tests/golden/types-arithmetic-generic/source.jibb:20:31: argument has type ?
42+++ opposite |= [b=? x=@] (sum b x)
43+ ^
44+++ any-dec: call constraint is not supported by partial inference
tests/golden/types-arithmetic-module/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: docs/spec/grammar.md, Molds, Atoms: "Arithmetic rejects loobean operands: `?` contains only 0 and 1, while an arithmetic result need not."
2+tests: Imported generic arithmetic and aliases preserve restrictions under independent instantiation and reject loobeans; broad @ stays unsupported.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-arithmetic-module/module-trees.txtnew file+26
@@ -0,0 +1,26 @@
1+/ui/math.jibb
2+(module
3+ (value 1:1 sum
4+ (gate 1:8
5+ (cell 1:11
6+ (face 1:12 a (tvar 1:14 A))
7+ (face 1:16 b (tvar 1:18 A)))
8+ (group 1:21
9+ (call 1:22 (wing 1:22 add) (wing 1:26 a) (wing 1:28 b)))))
10+ (value 2:1 down
11+ (gate 2:9
12+ (face 2:12 x (tvar 2:14 A))
13+ (group 2:16
14+ (call 2:17 (wing 2:17 dec) (wing 2:21 x)))))
15+ (value 3:1 alias (wing 3:10 sum))
16+ (value 4:1 inc
17+ (gate 4:8
18+ (face 4:11 n (tvar 4:13 A))
19+ (group 4:15
20+ (call 4:16 (wing 4:16 add) (wing 4:20 n) (lit 4:22 1)))))
21+ (value 5:1 inc-reverse
22+ (gate 5:16
23+ (face 5:19 n (tvar 5:21 A))
24+ (group 5:23
25+ (call 5:24 (wing 5:24 add) (lit 5:28 1) (wing 5:30 n)))))
26+ (value 6:1 alias-inc (wing 6:14 inc)))
tests/golden/types-arithmetic-module/modules.txtnew file+1
@@ -0,0 +1 @@
1+/ui/math.jibb
tests/golden/types-arithmetic-module/modules/ui/math.jibbnew file+6
@@ -0,0 +1,6 @@
1+++ sum |= [a=A b=A] (add a b)
2+++ down |= x=A (dec x)
3+++ alias sum
4+++ inc |= n=A (add n 1)
5+++ inc-reverse |= n=A (add 1 n)
6+++ alias-inc inc
tests/golden/types-arithmetic-module/source.jibbnew file+16
@@ -0,0 +1,16 @@
1+/= math /ui/math
2+++ decimal ^- @ud (sum.math 1 2)
3+++ hex ^- @ux (sum.math 0x1 0x2)
4+++ text ^- @t (alias.math "a" "b")
5+++ ship ^- @p (down.math ~zod)
6+++ reject-bool (sum.math %.y %.n)
7+++ reject-down (down.math %.y)
8+++ reject-alias (alias.math %.n %.y)
9+++ reject-any |= x=@ (down.math x)
10+++ nested |= x=A
11+ ++ local |= y=A (sum.math x y)
12+ (local x)
13+++ inc-decimal ^- @ud (inc.math 2)
14+++ inc-hex ^- @ux (inc-reverse.math 0x2)
15+++ inc-bool (inc.math %.y)
16+++ alias-bool (alias-inc.math %.n)
tests/golden/types-arithmetic-module/tokens.txtnew file+137
@@ -0,0 +1,137 @@
1+1:1 glyph /=
2+1:4 name math
3+1:9 glyph /
4+1:10 tight knot ui
5+1:12 tight glyph /
6+1:13 tight knot math
7+2:1 NEWLINE
8+2:1 glyph ++
9+2:4 name decimal
10+2:12 glyph ^-
11+2:15 aura @ud
12+2:19 glyph (
13+2:20 tight wing sum.math
14+2:29 lit 1
15+2:31 lit 2
16+2:32 tight glyph )
17+3:1 NEWLINE
18+3:1 glyph ++
19+3:4 name hex
20+3:8 glyph ^-
21+3:11 aura @ux
22+3:15 glyph (
23+3:16 tight wing sum.math
24+3:25 lit 0x1
25+3:29 lit 0x2
26+3:32 tight glyph )
27+4:1 NEWLINE
28+4:1 glyph ++
29+4:4 name text
30+4:9 glyph ^-
31+4:12 aura @t
32+4:15 glyph (
33+4:16 tight wing alias.math
34+4:27 str "a"
35+4:31 str "b"
36+4:34 tight glyph )
37+5:1 NEWLINE
38+5:1 glyph ++
39+5:4 name ship
40+5:9 glyph ^-
41+5:12 aura @p
42+5:15 glyph (
43+5:16 tight wing down.math
44+5:26 lit ~zod
45+5:30 tight glyph )
46+6:1 NEWLINE
47+6:1 glyph ++
48+6:4 name reject-bool
49+6:16 glyph (
50+6:17 tight wing sum.math
51+6:26 lit %.y
52+6:30 lit %.n
53+6:33 tight glyph )
54+7:1 NEWLINE
55+7:1 glyph ++
56+7:4 name reject-down
57+7:16 glyph (
58+7:17 tight wing down.math
59+7:27 lit %.y
60+7:30 tight glyph )
61+8:1 NEWLINE
62+8:1 glyph ++
63+8:4 name reject-alias
64+8:17 glyph (
65+8:18 tight wing alias.math
66+8:29 lit %.n
67+8:33 lit %.y
68+8:36 tight glyph )
69+9:1 NEWLINE
70+9:1 glyph ++
71+9:4 name reject-any
72+9:15 glyph |=
73+9:18 name x
74+9:19 tight glyph =
75+9:20 tight aura @
76+9:22 glyph (
77+9:23 tight wing down.math
78+9:33 name x
79+9:34 tight glyph )
80+10:1 NEWLINE
81+10:1 glyph ++
82+10:4 name nested
83+10:11 glyph |=
84+10:14 name x
85+10:15 tight glyph =
86+10:16 tight tvar A
87+11:3 INDENT
88+11:3 glyph ++
89+11:6 name local
90+11:12 glyph |=
91+11:15 name y
92+11:16 tight glyph =
93+11:17 tight tvar A
94+11:19 glyph (
95+11:20 tight wing sum.math
96+11:29 name x
97+11:31 name y
98+11:32 tight glyph )
99+12:3 NEWLINE
100+12:3 glyph (
101+12:4 tight name local
102+12:10 name x
103+12:11 tight glyph )
104+13:1 DEDENT
105+13:1 NEWLINE
106+13:1 glyph ++
107+13:4 name inc-decimal
108+13:16 glyph ^-
109+13:19 aura @ud
110+13:23 glyph (
111+13:24 tight wing inc.math
112+13:33 lit 2
113+13:34 tight glyph )
114+14:1 NEWLINE
115+14:1 glyph ++
116+14:4 name inc-hex
117+14:12 glyph ^-
118+14:15 aura @ux
119+14:19 glyph (
120+14:20 tight wing inc-reverse.math
121+14:37 lit 0x2
122+14:40 tight glyph )
123+15:1 NEWLINE
124+15:1 glyph ++
125+15:4 name inc-bool
126+15:13 glyph (
127+15:14 tight wing inc.math
128+15:23 lit %.y
129+15:26 tight glyph )
130+16:1 NEWLINE
131+16:1 glyph ++
132+16:4 name alias-bool
133+16:15 glyph (
134+16:16 tight wing alias-inc.math
135+16:31 lit %.n
136+16:34 tight glyph )
137+16:35 NEWLINE
tests/golden/types-arithmetic-module/tree.txtnew file+63
@@ -0,0 +1,63 @@
1+(module
2+ (jibb 1:1 math /ui/math)
3+ (value 2:1 decimal
4+ (cast 2:12
5+ (aura 2:15 @ud)
6+ (group 2:19
7+ (call 2:20 (wing 2:20 sum.math) (lit 2:29 1) (lit 2:31 2)))))
8+ (value 3:1 hex
9+ (cast 3:8
10+ (aura 3:11 @ux)
11+ (group 3:15
12+ (call 3:16 (wing 3:16 sum.math) (lit 3:25 0x1) (lit 3:29 0x2)))))
13+ (value 4:1 text
14+ (cast 4:9
15+ (aura 4:12 @t)
16+ (group 4:15
17+ (call 4:16 (wing 4:16 alias.math) (str 4:27 "a") (str 4:31 "b")))))
18+ (value 5:1 ship
19+ (cast 5:9
20+ (aura 5:12 @p)
21+ (group 5:15
22+ (call 5:16 (wing 5:16 down.math) (lit 5:26 ~zod)))))
23+ (value 6:1 reject-bool
24+ (group 6:16
25+ (call 6:17 (wing 6:17 sum.math) (lit 6:26 %.y) (lit 6:30 %.n))))
26+ (value 7:1 reject-down
27+ (group 7:16
28+ (call 7:17 (wing 7:17 down.math) (lit 7:27 %.y))))
29+ (value 8:1 reject-alias
30+ (group 8:17
31+ (call 8:18 (wing 8:18 alias.math) (lit 8:29 %.n) (lit 8:33 %.y))))
32+ (value 9:1 reject-any
33+ (gate 9:15
34+ (face 9:18 x (aura 9:20 @))
35+ (group 9:22
36+ (call 9:23 (wing 9:23 down.math) (wing 9:33 x)))))
37+ (value 10:1 nested
38+ (gate 10:11
39+ (face 10:14 x (tvar 10:16 A))
40+ (body 11:3
41+ (value 11:3 local
42+ (gate 11:12
43+ (face 11:15 y (tvar 11:17 A))
44+ (group 11:19
45+ (call 11:20 (wing 11:20 sum.math) (wing 11:29 x) (wing 11:31 y)))))
46+ (group 12:3
47+ (call 12:4 (wing 12:4 local) (wing 12:10 x))))))
48+ (value 13:1 inc-decimal
49+ (cast 13:16
50+ (aura 13:19 @ud)
51+ (group 13:23
52+ (call 13:24 (wing 13:24 inc.math) (lit 13:33 2)))))
53+ (value 14:1 inc-hex
54+ (cast 14:12
55+ (aura 14:15 @ux)
56+ (group 14:19
57+ (call 14:20 (wing 14:20 inc-reverse.math) (lit 14:37 0x2)))))
58+ (value 15:1 inc-bool
59+ (group 15:13
60+ (call 15:14 (wing 15:14 inc.math) (lit 15:23 %.y))))
61+ (value 16:1 alias-bool
62+ (group 16:15
63+ (call 16:16 (wing 16:16 alias-inc.math) (lit 16:31 %.n)))))
tests/golden/types-arithmetic-module/types.txtnew file+44
@@ -0,0 +1,44 @@
1+partial inference; module not checked
2+++ decimal: @ud
3+++ hex: @ux
4+++ text: @t
5+++ ship: @p
6+++ reject-bool: call's sample and argument types do not unify
7+/tests/golden/types-arithmetic-module/source.jibb:6:17: called gate has type $-([a=A b=A] A) where A is an atom other than ?
8+++ reject-bool (sum.math %.y %.n)
9+ ^
10+/tests/golden/types-arithmetic-module/source.jibb:6:26: argument has type ?
11+++ reject-bool (sum.math %.y %.n)
12+ ^
13+++ reject-down: call's sample and argument types do not unify
14+/tests/golden/types-arithmetic-module/source.jibb:7:17: called gate has type $-(A A) where A is an atom other than ?
15+++ reject-down (down.math %.y)
16+ ^
17+/tests/golden/types-arithmetic-module/source.jibb:7:27: argument has type ?
18+++ reject-down (down.math %.y)
19+ ^
20+++ reject-alias: call's sample and argument types do not unify
21+/tests/golden/types-arithmetic-module/source.jibb:8:18: called gate has type $-([a=A b=A] A) where A is an atom other than ?
22+++ reject-alias (alias.math %.n %.y)
23+ ^
24+/tests/golden/types-arithmetic-module/source.jibb:8:29: argument has type ?
25+++ reject-alias (alias.math %.n %.y)
26+ ^
27+++ reject-any: call constraint is not supported by partial inference
28+++ nested: local definitions need unsupported inference
29+++ inc-decimal: @ud
30+++ inc-hex: @ux
31+++ inc-bool: call's sample and argument types do not unify
32+/tests/golden/types-arithmetic-module/source.jibb:15:14: called gate has type $-(A A) where A is an atom other than ?
33+++ inc-bool (inc.math %.y)
34+ ^
35+/tests/golden/types-arithmetic-module/source.jibb:15:23: argument has type ?
36+++ inc-bool (inc.math %.y)
37+ ^
38+++ alias-bool: call's sample and argument types do not unify
39+/tests/golden/types-arithmetic-module/source.jibb:16:16: called gate has type $-(A A) where A is an atom other than ?
40+++ alias-bool (alias-inc.math %.n)
41+ ^
42+/tests/golden/types-arithmetic-module/source.jibb:16:31: argument has type ?
43+++ alias-bool (alias-inc.math %.n)
44+ ^
tests/golden/types-arithmetic-proj-qath/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: docs/spec/grammar.md, Molds, Atoms: "Arithmetic rejects loobean operands: `?` contains only 0 and 1, while an arithmetic result need not."
2+tests: Arithmetic retains non-loobean constraints through wider and single-field projected records and qath values; incompatible auras, loobean operands, and scalar binder faces do not silently infer.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-arithmetic-proj-qath/modules.txtnew file+1
@@ -0,0 +1 @@
1+# Opt in to the actual source-backed prelude.
tests/golden/types-arithmetic-proj-qath/source.jibbnew file+18
@@ -0,0 +1,18 @@
1+++ project-increment |= r=[a=A b=@t c=@ud]
2+ ^- [a=A b=@t] (proj [a=(add a.r 1) b=b.r c=c.r])
3+++ good ^- [a=@ux b=@t] (project-increment [a=0x7 b="x" c=0])
4+++ flag (project-increment [a=%.y b="x" c=0])
5+++ mixed (add ~zod "x")
6+++ path-and-number [path=%/foo number=(add 1 2)]
7+++ path-value |= p=qath [path=p number=(add 1 2)]
8+++ with-path |= r=[a=A b=qath c=@ud]
9+ ^- [a=A b=qath] (proj [a=(dec a.r) b=b.r c=c.r])
10+++ wrong-width ^- [a=@ud b=@t] [a=(add 1 2) b="x" c=0]
11+++ select-one |= r=[a=A b=@t]
12+ ^- [a=A] (proj [a=(add a.r 1) b=b.r])
13+++ select-one-ux ^- [a=@ux] (select-one [a=0x7 b="x"])
14+++ select-one-bool (select-one [a=%.y b="x"])
15+++ scalar |= x=@t x
16+++ no-binder-field (scalar (proj [x="ok" y=~zod]))
17+++ select-one-nested |= r=[a=A b=@t]
18+ ^- [outer=[a=A] marker=@ud] [outer=(proj [a=(add a.r 1) b=b.r]) marker=0]
tests/golden/types-arithmetic-proj-qath/tokens.txtnew file+351
@@ -0,0 +1,351 @@
1+1:1 glyph ++
2+1:4 name project-increment
3+1:22 glyph |=
4+1:25 name r
5+1:26 tight glyph =
6+1:27 tight glyph [
7+1:28 tight name a
8+1:29 tight glyph =
9+1:30 tight tvar A
10+1:32 name b
11+1:33 tight glyph =
12+1:34 tight aura @t
13+1:37 name c
14+1:38 tight glyph =
15+1:39 tight aura @ud
16+1:42 tight glyph ]
17+2:3 INDENT
18+2:3 glyph ^-
19+2:6 glyph [
20+2:7 tight name a
21+2:8 tight glyph =
22+2:9 tight tvar A
23+2:11 name b
24+2:12 tight glyph =
25+2:13 tight aura @t
26+2:15 tight glyph ]
27+2:17 glyph (
28+2:18 tight name proj
29+2:23 glyph [
30+2:24 tight name a
31+2:25 tight glyph =
32+2:26 tight glyph (
33+2:27 tight name add
34+2:31 wing a.r
35+2:35 lit 1
36+2:36 tight glyph )
37+2:38 name b
38+2:39 tight glyph =
39+2:40 tight wing b.r
40+2:44 name c
41+2:45 tight glyph =
42+2:46 tight wing c.r
43+2:49 tight glyph ]
44+2:50 tight glyph )
45+3:1 DEDENT
46+3:1 NEWLINE
47+3:1 glyph ++
48+3:4 name good
49+3:9 glyph ^-
50+3:12 glyph [
51+3:13 tight name a
52+3:14 tight glyph =
53+3:15 tight aura @ux
54+3:19 name b
55+3:20 tight glyph =
56+3:21 tight aura @t
57+3:23 tight glyph ]
58+3:25 glyph (
59+3:26 tight name project-increment
60+3:44 glyph [
61+3:45 tight name a
62+3:46 tight glyph =
63+3:47 tight lit 0x7
64+3:51 name b
65+3:52 tight glyph =
66+3:53 tight str "x"
67+3:57 name c
68+3:58 tight glyph =
69+3:59 tight lit 0
70+3:60 tight glyph ]
71+3:61 tight glyph )
72+4:1 NEWLINE
73+4:1 glyph ++
74+4:4 name flag
75+4:9 glyph (
76+4:10 tight name project-increment
77+4:28 glyph [
78+4:29 tight name a
79+4:30 tight glyph =
80+4:31 tight lit %.y
81+4:35 name b
82+4:36 tight glyph =
83+4:37 tight str "x"
84+4:41 name c
85+4:42 tight glyph =
86+4:43 tight lit 0
87+4:44 tight glyph ]
88+4:45 tight glyph )
89+5:1 NEWLINE
90+5:1 glyph ++
91+5:4 name mixed
92+5:10 glyph (
93+5:11 tight name add
94+5:15 lit ~zod
95+5:20 str "x"
96+5:23 tight glyph )
97+6:1 NEWLINE
98+6:1 glyph ++
99+6:4 name path-and-number
100+6:20 glyph [
101+6:21 tight name path
102+6:25 tight glyph =
103+6:26 tight glyph %/
104+6:28 tight knot foo
105+6:32 name number
106+6:38 tight glyph =
107+6:39 tight glyph (
108+6:40 tight name add
109+6:44 lit 1
110+6:46 lit 2
111+6:47 tight glyph )
112+6:48 tight glyph ]
113+7:1 NEWLINE
114+7:1 glyph ++
115+7:4 name path-value
116+7:15 glyph |=
117+7:18 name p
118+7:19 tight glyph =
119+7:20 tight name qath
120+7:25 glyph [
121+7:26 tight name path
122+7:30 tight glyph =
123+7:31 tight name p
124+7:33 name number
125+7:39 tight glyph =
126+7:40 tight glyph (
127+7:41 tight name add
128+7:45 lit 1
129+7:47 lit 2
130+7:48 tight glyph )
131+7:49 tight glyph ]
132+8:1 NEWLINE
133+8:1 glyph ++
134+8:4 name with-path
135+8:14 glyph |=
136+8:17 name r
137+8:18 tight glyph =
138+8:19 tight glyph [
139+8:20 tight name a
140+8:21 tight glyph =
141+8:22 tight tvar A
142+8:24 name b
143+8:25 tight glyph =
144+8:26 tight name qath
145+8:31 name c
146+8:32 tight glyph =
147+8:33 tight aura @ud
148+8:36 tight glyph ]
149+9:3 INDENT
150+9:3 glyph ^-
151+9:6 glyph [
152+9:7 tight name a
153+9:8 tight glyph =
154+9:9 tight tvar A
155+9:11 name b
156+9:12 tight glyph =
157+9:13 tight name qath
158+9:17 tight glyph ]
159+9:19 glyph (
160+9:20 tight name proj
161+9:25 glyph [
162+9:26 tight name a
163+9:27 tight glyph =
164+9:28 tight glyph (
165+9:29 tight name dec
166+9:33 wing a.r
167+9:36 tight glyph )
168+9:38 name b
169+9:39 tight glyph =
170+9:40 tight wing b.r
171+9:44 name c
172+9:45 tight glyph =
173+9:46 tight wing c.r
174+9:49 tight glyph ]
175+9:50 tight glyph )
176+10:1 DEDENT
177+10:1 NEWLINE
178+10:1 glyph ++
179+10:4 name wrong-width
180+10:16 glyph ^-
181+10:19 glyph [
182+10:20 tight name a
183+10:21 tight glyph =
184+10:22 tight aura @ud
185+10:26 name b
186+10:27 tight glyph =
187+10:28 tight aura @t
188+10:30 tight glyph ]
189+10:32 glyph [
190+10:33 tight name a
191+10:34 tight glyph =
192+10:35 tight glyph (
193+10:36 tight name add
194+10:40 lit 1
195+10:42 lit 2
196+10:43 tight glyph )
197+10:45 name b
198+10:46 tight glyph =
199+10:47 tight str "x"
200+10:51 name c
201+10:52 tight glyph =
202+10:53 tight lit 0
203+10:54 tight glyph ]
204+11:1 NEWLINE
205+11:1 glyph ++
206+11:4 name select-one
207+11:15 glyph |=
208+11:18 name r
209+11:19 tight glyph =
210+11:20 tight glyph [
211+11:21 tight name a
212+11:22 tight glyph =
213+11:23 tight tvar A
214+11:25 name b
215+11:26 tight glyph =
216+11:27 tight aura @t
217+11:29 tight glyph ]
218+12:3 INDENT
219+12:3 glyph ^-
220+12:6 glyph [
221+12:7 tight name a
222+12:8 tight glyph =
223+12:9 tight tvar A
224+12:10 tight glyph ]
225+12:12 glyph (
226+12:13 tight name proj
227+12:18 glyph [
228+12:19 tight name a
229+12:20 tight glyph =
230+12:21 tight glyph (
231+12:22 tight name add
232+12:26 wing a.r
233+12:30 lit 1
234+12:31 tight glyph )
235+12:33 name b
236+12:34 tight glyph =
237+12:35 tight wing b.r
238+12:38 tight glyph ]
239+12:39 tight glyph )
240+13:1 DEDENT
241+13:1 NEWLINE
242+13:1 glyph ++
243+13:4 name select-one-ux
244+13:18 glyph ^-
245+13:21 glyph [
246+13:22 tight name a
247+13:23 tight glyph =
248+13:24 tight aura @ux
249+13:27 tight glyph ]
250+13:29 glyph (
251+13:30 tight name select-one
252+13:41 glyph [
253+13:42 tight name a
254+13:43 tight glyph =
255+13:44 tight lit 0x7
256+13:48 name b
257+13:49 tight glyph =
258+13:50 tight str "x"
259+13:53 tight glyph ]
260+13:54 tight glyph )
261+14:1 NEWLINE
262+14:1 glyph ++
263+14:4 name select-one-bool
264+14:20 glyph (
265+14:21 tight name select-one
266+14:32 glyph [
267+14:33 tight name a
268+14:34 tight glyph =
269+14:35 tight lit %.y
270+14:39 name b
271+14:40 tight glyph =
272+14:41 tight str "x"
273+14:44 tight glyph ]
274+14:45 tight glyph )
275+15:1 NEWLINE
276+15:1 glyph ++
277+15:4 name scalar
278+15:11 glyph |=
279+15:14 name x
280+15:15 tight glyph =
281+15:16 tight aura @t
282+15:19 name x
283+16:1 NEWLINE
284+16:1 glyph ++
285+16:4 name no-binder-field
286+16:20 glyph (
287+16:21 tight name scalar
288+16:28 glyph (
289+16:29 tight name proj
290+16:34 glyph [
291+16:35 tight name x
292+16:36 tight glyph =
293+16:37 tight str "ok"
294+16:42 name y
295+16:43 tight glyph =
296+16:44 tight lit ~zod
297+16:48 tight glyph ]
298+16:49 tight glyph )
299+16:50 tight glyph )
300+17:1 NEWLINE
301+17:1 glyph ++
302+17:4 name select-one-nested
303+17:22 glyph |=
304+17:25 name r
305+17:26 tight glyph =
306+17:27 tight glyph [
307+17:28 tight name a
308+17:29 tight glyph =
309+17:30 tight tvar A
310+17:32 name b
311+17:33 tight glyph =
312+17:34 tight aura @t
313+17:36 tight glyph ]
314+18:3 INDENT
315+18:3 glyph ^-
316+18:6 glyph [
317+18:7 tight name outer
318+18:12 tight glyph =
319+18:13 tight glyph [
320+18:14 tight name a
321+18:15 tight glyph =
322+18:16 tight tvar A
323+18:17 tight glyph ]
324+18:19 name marker
325+18:25 tight glyph =
326+18:26 tight aura @ud
327+18:29 tight glyph ]
328+18:31 glyph [
329+18:32 tight name outer
330+18:37 tight glyph =
331+18:38 tight glyph (
332+18:39 tight name proj
333+18:44 glyph [
334+18:45 tight name a
335+18:46 tight glyph =
336+18:47 tight glyph (
337+18:48 tight name add
338+18:52 wing a.r
339+18:56 lit 1
340+18:57 tight glyph )
341+18:59 name b
342+18:60 tight glyph =
343+18:61 tight wing b.r
344+18:64 tight glyph ]
345+18:65 tight glyph )
346+18:67 name marker
347+18:73 tight glyph =
348+18:74 tight lit 0
349+18:75 tight glyph ]
350+18:76 DEDENT
351+18:76 NEWLINE
tests/golden/types-arithmetic-proj-qath/tree.txtnew file+164
@@ -0,0 +1,164 @@
1+(module
2+ (value 1:1 project-increment
3+ (gate 1:22
4+ (face 1:25 r
5+ (cell 1:27
6+ (face 1:28 a (tvar 1:30 A))
7+ (face 1:32 b (aura 1:34 @t))
8+ (face 1:37 c (aura 1:39 @ud))))
9+ (body 2:3
10+ (cast 2:3
11+ (cell 2:6
12+ (face 2:7 a (tvar 2:9 A))
13+ (face 2:11 b (aura 2:13 @t)))
14+ (group 2:17
15+ (call 2:18
16+ (wing 2:18 proj)
17+ (tuple 2:23
18+ (face 2:24 a
19+ (group 2:26
20+ (call 2:27 (wing 2:27 add) (wing 2:31 a.r) (lit 2:35 1))))
21+ (face 2:38 b (wing 2:40 b.r))
22+ (face 2:44 c (wing 2:46 c.r)))))))))
23+ (value 3:1 good
24+ (cast 3:9
25+ (cell 3:12
26+ (face 3:13 a (aura 3:15 @ux))
27+ (face 3:19 b (aura 3:21 @t)))
28+ (group 3:25
29+ (call 3:26
30+ (wing 3:26 project-increment)
31+ (tuple 3:44
32+ (face 3:45 a (lit 3:47 0x7))
33+ (face 3:51 b (str 3:53 "x"))
34+ (face 3:57 c (lit 3:59 0)))))))
35+ (value 4:1 flag
36+ (group 4:9
37+ (call 4:10
38+ (wing 4:10 project-increment)
39+ (tuple 4:28
40+ (face 4:29 a (lit 4:31 %.y))
41+ (face 4:35 b (str 4:37 "x"))
42+ (face 4:41 c (lit 4:43 0))))))
43+ (value 5:1 mixed
44+ (group 5:10
45+ (call 5:11 (wing 5:11 add) (lit 5:15 ~zod) (str 5:20 "x"))))
46+ (value 6:1 path-and-number
47+ (tuple 6:20
48+ (face 6:21 path (qath 6:26 foo))
49+ (face 6:32 number
50+ (group 6:39
51+ (call 6:40 (wing 6:40 add) (lit 6:44 1) (lit 6:46 2))))))
52+ (value 7:1 path-value
53+ (gate 7:15
54+ (face 7:18 p (ref 7:20 qath))
55+ (tuple 7:25
56+ (face 7:26 path (wing 7:31 p))
57+ (face 7:33 number
58+ (group 7:40
59+ (call 7:41 (wing 7:41 add) (lit 7:45 1) (lit 7:47 2)))))))
60+ (value 8:1 with-path
61+ (gate 8:14
62+ (face 8:17 r
63+ (cell 8:19
64+ (face 8:20 a (tvar 8:22 A))
65+ (face 8:24 b (ref 8:26 qath))
66+ (face 8:31 c (aura 8:33 @ud))))
67+ (body 9:3
68+ (cast 9:3
69+ (cell 9:6
70+ (face 9:7 a (tvar 9:9 A))
71+ (face 9:11 b (ref 9:13 qath)))
72+ (group 9:19
73+ (call 9:20
74+ (wing 9:20 proj)
75+ (tuple 9:25
76+ (face 9:26 a
77+ (group 9:28
78+ (call 9:29 (wing 9:29 dec) (wing 9:33 a.r))))
79+ (face 9:38 b (wing 9:40 b.r))
80+ (face 9:44 c (wing 9:46 c.r)))))))))
81+ (value 10:1 wrong-width
82+ (cast 10:16
83+ (cell 10:19
84+ (face 10:20 a (aura 10:22 @ud))
85+ (face 10:26 b (aura 10:28 @t)))
86+ (tuple 10:32
87+ (face 10:33 a
88+ (group 10:35
89+ (call 10:36 (wing 10:36 add) (lit 10:40 1) (lit 10:42 2))))
90+ (face 10:45 b (str 10:47 "x"))
91+ (face 10:51 c (lit 10:53 0)))))
92+ (value 11:1 select-one
93+ (gate 11:15
94+ (face 11:18 r
95+ (cell 11:20
96+ (face 11:21 a (tvar 11:23 A))
97+ (face 11:25 b (aura 11:27 @t))))
98+ (body 12:3
99+ (cast 12:3
100+ (cell 12:6
101+ (face 12:7 a (tvar 12:9 A)))
102+ (group 12:12
103+ (call 12:13
104+ (wing 12:13 proj)
105+ (tuple 12:18
106+ (face 12:19 a
107+ (group 12:21
108+ (call 12:22 (wing 12:22 add) (wing 12:26 a.r) (lit 12:30 1))))
109+ (face 12:33 b (wing 12:35 b.r)))))))))
110+ (value 13:1 select-one-ux
111+ (cast 13:18
112+ (cell 13:21
113+ (face 13:22 a (aura 13:24 @ux)))
114+ (group 13:29
115+ (call 13:30
116+ (wing 13:30 select-one)
117+ (tuple 13:41
118+ (face 13:42 a (lit 13:44 0x7))
119+ (face 13:48 b (str 13:50 "x")))))))
120+ (value 14:1 select-one-bool
121+ (group 14:20
122+ (call 14:21
123+ (wing 14:21 select-one)
124+ (tuple 14:32
125+ (face 14:33 a (lit 14:35 %.y))
126+ (face 14:39 b (str 14:41 "x"))))))
127+ (value 15:1 scalar
128+ (gate 15:11
129+ (face 15:14 x (aura 15:16 @t))
130+ (wing 15:19 x)))
131+ (value 16:1 no-binder-field
132+ (group 16:20
133+ (call 16:21
134+ (wing 16:21 scalar)
135+ (group 16:28
136+ (call 16:29
137+ (wing 16:29 proj)
138+ (tuple 16:34
139+ (face 16:35 x (str 16:37 "ok"))
140+ (face 16:42 y (lit 16:44 ~zod))))))))
141+ (value 17:1 select-one-nested
142+ (gate 17:22
143+ (face 17:25 r
144+ (cell 17:27
145+ (face 17:28 a (tvar 17:30 A))
146+ (face 17:32 b (aura 17:34 @t))))
147+ (body 18:3
148+ (cast 18:3
149+ (cell 18:6
150+ (face 18:7 outer
151+ (cell 18:13
152+ (face 18:14 a (tvar 18:16 A))))
153+ (face 18:19 marker (aura 18:26 @ud)))
154+ (tuple 18:31
155+ (face 18:32 outer
156+ (group 18:38
157+ (call 18:39
158+ (wing 18:39 proj)
159+ (tuple 18:44
160+ (face 18:45 a
161+ (group 18:47
162+ (call 18:48 (wing 18:48 add) (wing 18:52 a.r) (lit 18:56 1))))
163+ (face 18:59 b (wing 18:61 b.r))))))
164+ (face 18:67 marker (lit 18:74 0))))))))
tests/golden/types-arithmetic-proj-qath/types.txtnew file+33
@@ -0,0 +1,33 @@
1+partial inference; module not checked
2+++ project-increment: $-([a=A [b=@t c=@ud]] [a=A b=@t]) where A is an atom other than ?
3+++ good: [a=@ux b=@t]
4+++ flag: call's sample and argument types do not unify
5+/tests/golden/types-arithmetic-proj-qath/source.jibb:4:10: called gate has type $-([a=A [b=@t c=@ud]] [a=A b=@t]) where A is an atom other than ?
6+++ flag (project-increment [a=%.y b="x" c=0])
7+ ^
8+/tests/golden/types-arithmetic-proj-qath/source.jibb:4:28: argument
9+++ flag (project-increment [a=%.y b="x" c=0])
10+ ^
11+++ mixed: call's sample and argument types do not unify
12+/tests/golden/types-arithmetic-proj-qath/source.jibb:5:11: called gate has type $-([A A] A) where A is an atom other than ?
13+++ mixed (add ~zod "x")
14+ ^
15+/tests/golden/types-arithmetic-proj-qath/source.jibb:5:15: argument has type [@p @t]
16+++ mixed (add ~zod "x")
17+ ^
18+++ path-and-number: [path=qath number=@ud]
19+++ path-value: unresolved aura-variable inference
20+++ with-path: $-([a=A [b=qath c=@ud]] [a=A b=qath]) where A is an atom other than ?
21+++ wrong-width: record width constraint needs unsupported inference
22+++ select-one: $-([a=A b=@t] [a=A]) where A is an atom other than ?
23+++ select-one-ux: [a=@ux]
24+++ select-one-bool: call's sample and argument types do not unify
25+/tests/golden/types-arithmetic-proj-qath/source.jibb:14:21: called gate has type $-([a=A b=@t] [a=A]) where A is an atom other than ?
26+++ select-one-bool (select-one [a=%.y b="x"])
27+ ^
28+/tests/golden/types-arithmetic-proj-qath/source.jibb:14:32: argument has type [a=? b=@t]
29+++ select-one-bool (select-one [a=%.y b="x"])
30+ ^
31+++ scalar: $-(@t @t)
32+++ no-binder-field: proj needs an expected record type
33+++ select-one-nested: $-([a=A b=@t] [outer=[a=A] marker=@ud]) where A is an atom other than ?
tests/golden/types-arithmetic-scopes/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: docs/spec/grammar.md, Molds, Atoms: "Arithmetic rejects loobean operands: `?` contains only 0 and 1, while an arithmetic result need not."
2+tests: Independent aura instantiation, shared and distinct capitals, nested/local captures, pending literals and direct/mutual recursion preserve the constraint or fail closed.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-arithmetic-scopes/modules.txtnew file+1
@@ -0,0 +1 @@
1+# Opt in to the actual source-backed prelude.
tests/golden/types-arithmetic-scopes/source.jibbnew file+22
@@ -0,0 +1,22 @@
1+++ inc |= n=A (add n 1)
2+++ inc-r |= n=A (add 1 n)
3+++ text-case ^- @t (inc "x")
4+++ ship-case ^- @p (inc ~zod)
5+++ shared-case |= [a=A b=A] (add a b)
6+++ distinct |= [a=A b=B] (add a b)
7+++ nested |= n=A |= x=A (add n 1)
8+++ local-fresh |= outer=@t
9+ ++ inner |= n=A (add n 1)
10+ [(inner "a") (inner ~zod)]
11+++ local-capture |= outer=A
12+ ++ inner |= n=A (add outer 1)
13+ (inner outer)
14+++ trace-tag
15+ ~& %dangling
16+ (add 1 2)
17+++ trace-number
18+ ~& 4
19+ (add 1 2)
20+++ recurse |= n=A (add n (recurse n))
21+++ mutual-a |= n=A (add n (mutual-b n))
22+++ mutual-b |= n=A (add n (mutual-a n))
tests/golden/types-arithmetic-scopes/tokens.txtnew file+221
@@ -0,0 +1,221 @@
1+1:1 glyph ++
2+1:4 name inc
3+1:8 glyph |=
4+1:11 name n
5+1:12 tight glyph =
6+1:13 tight tvar A
7+1:15 glyph (
8+1:16 tight name add
9+1:20 name n
10+1:22 lit 1
11+1:23 tight glyph )
12+2:1 NEWLINE
13+2:1 glyph ++
14+2:4 name inc-r
15+2:10 glyph |=
16+2:13 name n
17+2:14 tight glyph =
18+2:15 tight tvar A
19+2:17 glyph (
20+2:18 tight name add
21+2:22 lit 1
22+2:24 name n
23+2:25 tight glyph )
24+3:1 NEWLINE
25+3:1 glyph ++
26+3:4 name text-case
27+3:14 glyph ^-
28+3:17 aura @t
29+3:20 glyph (
30+3:21 tight name inc
31+3:25 str "x"
32+3:28 tight glyph )
33+4:1 NEWLINE
34+4:1 glyph ++
35+4:4 name ship-case
36+4:14 glyph ^-
37+4:17 aura @p
38+4:20 glyph (
39+4:21 tight name inc
40+4:25 lit ~zod
41+4:29 tight glyph )
42+5:1 NEWLINE
43+5:1 glyph ++
44+5:4 name shared-case
45+5:16 glyph |=
46+5:19 glyph [
47+5:20 tight name a
48+5:21 tight glyph =
49+5:22 tight tvar A
50+5:24 name b
51+5:25 tight glyph =
52+5:26 tight tvar A
53+5:27 tight glyph ]
54+5:29 glyph (
55+5:30 tight name add
56+5:34 name a
57+5:36 name b
58+5:37 tight glyph )
59+6:1 NEWLINE
60+6:1 glyph ++
61+6:4 name distinct
62+6:13 glyph |=
63+6:16 glyph [
64+6:17 tight name a
65+6:18 tight glyph =
66+6:19 tight tvar A
67+6:21 name b
68+6:22 tight glyph =
69+6:23 tight tvar B
70+6:24 tight glyph ]
71+6:26 glyph (
72+6:27 tight name add
73+6:31 name a
74+6:33 name b
75+6:34 tight glyph )
76+7:1 NEWLINE
77+7:1 glyph ++
78+7:4 name nested
79+7:11 glyph |=
80+7:14 name n
81+7:15 tight glyph =
82+7:16 tight tvar A
83+7:18 glyph |=
84+7:21 name x
85+7:22 tight glyph =
86+7:23 tight tvar A
87+7:25 glyph (
88+7:26 tight name add
89+7:30 name n
90+7:32 lit 1
91+7:33 tight glyph )
92+8:1 NEWLINE
93+8:1 glyph ++
94+8:4 name local-fresh
95+8:16 glyph |=
96+8:19 name outer
97+8:24 tight glyph =
98+8:25 tight aura @t
99+9:3 INDENT
100+9:3 glyph ++
101+9:6 name inner
102+9:12 glyph |=
103+9:15 name n
104+9:16 tight glyph =
105+9:17 tight tvar A
106+9:19 glyph (
107+9:20 tight name add
108+9:24 name n
109+9:26 lit 1
110+9:27 tight glyph )
111+10:3 NEWLINE
112+10:3 glyph [
113+10:4 tight glyph (
114+10:5 tight name inner
115+10:11 str "a"
116+10:14 tight glyph )
117+10:16 glyph (
118+10:17 tight name inner
119+10:23 lit ~zod
120+10:27 tight glyph )
121+10:28 tight glyph ]
122+11:1 DEDENT
123+11:1 NEWLINE
124+11:1 glyph ++
125+11:4 name local-capture
126+11:18 glyph |=
127+11:21 name outer
128+11:26 tight glyph =
129+11:27 tight tvar A
130+12:3 INDENT
131+12:3 glyph ++
132+12:6 name inner
133+12:12 glyph |=
134+12:15 name n
135+12:16 tight glyph =
136+12:17 tight tvar A
137+12:19 glyph (
138+12:20 tight name add
139+12:24 name outer
140+12:30 lit 1
141+12:31 tight glyph )
142+13:3 NEWLINE
143+13:3 glyph (
144+13:4 tight name inner
145+13:10 name outer
146+13:15 tight glyph )
147+14:1 DEDENT
148+14:1 NEWLINE
149+14:1 glyph ++
150+14:4 name trace-tag
151+15:3 INDENT
152+15:3 glyph ~&
153+15:6 lit %dangling
154+16:5 INDENT
155+16:5 glyph (
156+16:6 tight name add
157+16:10 lit 1
158+16:12 lit 2
159+16:13 tight glyph )
160+17:1 DEDENT
161+17:1 DEDENT
162+17:1 NEWLINE
163+17:1 glyph ++
164+17:4 name trace-number
165+18:3 INDENT
166+18:3 glyph ~&
167+18:6 lit 4
168+19:5 INDENT
169+19:5 glyph (
170+19:6 tight name add
171+19:10 lit 1
172+19:12 lit 2
173+19:13 tight glyph )
174+20:1 DEDENT
175+20:1 DEDENT
176+20:1 NEWLINE
177+20:1 glyph ++
178+20:4 name recurse
179+20:12 glyph |=
180+20:15 name n
181+20:16 tight glyph =
182+20:17 tight tvar A
183+20:19 glyph (
184+20:20 tight name add
185+20:24 name n
186+20:26 glyph (
187+20:27 tight name recurse
188+20:35 name n
189+20:36 tight glyph )
190+20:37 tight glyph )
191+21:1 NEWLINE
192+21:1 glyph ++
193+21:4 name mutual-a
194+21:13 glyph |=
195+21:16 name n
196+21:17 tight glyph =
197+21:18 tight tvar A
198+21:20 glyph (
199+21:21 tight name add
200+21:25 name n
201+21:27 glyph (
202+21:28 tight name mutual-b
203+21:37 name n
204+21:38 tight glyph )
205+21:39 tight glyph )
206+22:1 NEWLINE
207+22:1 glyph ++
208+22:4 name mutual-b
209+22:13 glyph |=
210+22:16 name n
211+22:17 tight glyph =
212+22:18 tight tvar A
213+22:20 glyph (
214+22:21 tight name add
215+22:25 name n
216+22:27 glyph (
217+22:28 tight name mutual-a
218+22:37 name n
219+22:38 tight glyph )
220+22:39 tight glyph )
221+22:40 NEWLINE
tests/golden/types-arithmetic-scopes/tree.txtnew file+108
@@ -0,0 +1,108 @@
1+(module
2+ (value 1:1 inc
3+ (gate 1:8
4+ (face 1:11 n (tvar 1:13 A))
5+ (group 1:15
6+ (call 1:16 (wing 1:16 add) (wing 1:20 n) (lit 1:22 1)))))
7+ (value 2:1 inc-r
8+ (gate 2:10
9+ (face 2:13 n (tvar 2:15 A))
10+ (group 2:17
11+ (call 2:18 (wing 2:18 add) (lit 2:22 1) (wing 2:24 n)))))
12+ (value 3:1 text-case
13+ (cast 3:14
14+ (aura 3:17 @t)
15+ (group 3:20
16+ (call 3:21 (wing 3:21 inc) (str 3:25 "x")))))
17+ (value 4:1 ship-case
18+ (cast 4:14
19+ (aura 4:17 @p)
20+ (group 4:20
21+ (call 4:21 (wing 4:21 inc) (lit 4:25 ~zod)))))
22+ (value 5:1 shared-case
23+ (gate 5:16
24+ (cell 5:19
25+ (face 5:20 a (tvar 5:22 A))
26+ (face 5:24 b (tvar 5:26 A)))
27+ (group 5:29
28+ (call 5:30 (wing 5:30 add) (wing 5:34 a) (wing 5:36 b)))))
29+ (value 6:1 distinct
30+ (gate 6:13
31+ (cell 6:16
32+ (face 6:17 a (tvar 6:19 A))
33+ (face 6:21 b (tvar 6:23 B)))
34+ (group 6:26
35+ (call 6:27 (wing 6:27 add) (wing 6:31 a) (wing 6:33 b)))))
36+ (value 7:1 nested
37+ (gate 7:11
38+ (face 7:14 n (tvar 7:16 A))
39+ (gate 7:18
40+ (face 7:21 x (tvar 7:23 A))
41+ (group 7:25
42+ (call 7:26 (wing 7:26 add) (wing 7:30 n) (lit 7:32 1))))))
43+ (value 8:1 local-fresh
44+ (gate 8:16
45+ (face 8:19 outer (aura 8:25 @t))
46+ (body 9:3
47+ (value 9:3 inner
48+ (gate 9:12
49+ (face 9:15 n (tvar 9:17 A))
50+ (group 9:19
51+ (call 9:20 (wing 9:20 add) (wing 9:24 n) (lit 9:26 1)))))
52+ (tuple 10:3
53+ (group 10:4
54+ (call 10:5 (wing 10:5 inner) (str 10:11 "a")))
55+ (group 10:16
56+ (call 10:17 (wing 10:17 inner) (lit 10:23 ~zod)))))))
57+ (value 11:1 local-capture
58+ (gate 11:18
59+ (face 11:21 outer (tvar 11:27 A))
60+ (body 12:3
61+ (value 12:3 inner
62+ (gate 12:12
63+ (face 12:15 n (tvar 12:17 A))
64+ (group 12:19
65+ (call 12:20 (wing 12:20 add) (wing 12:24 outer) (lit 12:30 1)))))
66+ (group 13:3
67+ (call 13:4 (wing 13:4 inner) (wing 13:10 outer))))))
68+ (value 14:1 trace-tag
69+ (body 15:3
70+ (trace 15:3
71+ (lit 15:6 %dangling)
72+ (body 16:5
73+ (group 16:5
74+ (call 16:6 (wing 16:6 add) (lit 16:10 1) (lit 16:12 2)))))))
75+ (value 17:1 trace-number
76+ (body 18:3
77+ (trace 18:3
78+ (lit 18:6 4)
79+ (body 19:5
80+ (group 19:5
81+ (call 19:6 (wing 19:6 add) (lit 19:10 1) (lit 19:12 2)))))))
82+ (value 20:1 recurse
83+ (gate 20:12
84+ (face 20:15 n (tvar 20:17 A))
85+ (group 20:19
86+ (call 20:20
87+ (wing 20:20 add)
88+ (wing 20:24 n)
89+ (group 20:26
90+ (call 20:27 (wing 20:27 recurse) (wing 20:35 n)))))))
91+ (value 21:1 mutual-a
92+ (gate 21:13
93+ (face 21:16 n (tvar 21:18 A))
94+ (group 21:20
95+ (call 21:21
96+ (wing 21:21 add)
97+ (wing 21:25 n)
98+ (group 21:27
99+ (call 21:28 (wing 21:28 mutual-b) (wing 21:37 n)))))))
100+ (value 22:1 mutual-b
101+ (gate 22:13
102+ (face 22:16 n (tvar 22:18 A))
103+ (group 22:20
104+ (call 22:21
105+ (wing 22:21 add)
106+ (wing 22:25 n)
107+ (group 22:27
108+ (call 22:28 (wing 22:28 mutual-a) (wing 22:37 n))))))))
tests/golden/types-arithmetic-scopes/types.txtnew file+21
@@ -0,0 +1,21 @@
1+partial inference; module not checked
2+++ inc: $-(A A) where A is an atom other than ?
3+++ inc-r: $-(A A) where A is an atom other than ?
4+++ text-case: @t
5+++ ship-case: @p
6+++ shared-case: $-([a=A b=A] A) where A is an atom other than ?
7+++ distinct: distinct type variables `A` and `B` must not be forced equal; use the same capital for a shared type
8+/tests/golden/types-arithmetic-scopes/source.jibb:6:19: first type variable
9+++ distinct |= [a=A b=B] (add a b)
10+ ^
11+/tests/golden/types-arithmetic-scopes/source.jibb:6:23: second type variable
12+++ distinct |= [a=A b=B] (add a b)
13+ ^
14+++ nested: $-(A $-(A A)) where A is an atom other than ?
15+++ local-fresh: $-(@t [@t @p])
16+++ local-capture: explicit capital constraints are not supported by partial inference
17+++ trace-tag: tag needs context in partial inference
18+++ trace-number: @ud
19+++ recurse: $-(A A) where A is an atom other than ?
20+++ mutual-a: $-(A A) where A is an atom other than ?
21+++ mutual-b: $-(A A) where A is an atom other than ?
tests/golden/types-constructor-context/about.txtnew file+1
@@ -0,0 +1 @@
1+Constructor callback results require a known contextual union. This case checks unknown, matching, missing and wrong payload cases, aliases, written capitals and pending obligations.
tests/golden/types-constructor-context/source.jibbnew file+37
@@ -0,0 +1,37 @@
1++$ msg
2+ [%got value=@t]
3+ %other
4++$ alias msg
5++$ wrong-payload
6+ [%got value=@p]
7+ %other
8++$ missing
9+ [%different value=@t]
10+ %other
11++$ maybe |$ [A]
12+ [%got value=A]
13+ %other
14+++ call |= callback=$-(@t M) (callback "payload")
15+++ call-ship |= callback=$-(@p M) (callback ~zod)
16+++ unknown (call |=%got)
17+++ later-context ^- msg (call |=%got)
18+++ named-alias ^- alias (call |=%got)
19+++ wrong-context ^- wrong-payload (call |=%got)
20+++ missing-case ^- missing (call |=%got)
21+++ generic-context ^- (maybe @t) (call |=%got)
22+++ generic-wrong ^- (maybe @p) (call |=%got)
23+++ generic-right-ship ^- (maybe @p) (call-ship |=%got)
24+++ named-capital |= value=A
25+ ^- (maybe A)
26+ (|=(callback=$-(A M) (callback value)) |=%got)
27+++ discarded-pending
28+ ~& %unrelated
29+ ^- msg (call |=%got)
30+++ discarded-constructor
31+ ~& |=%missing
32+ ^- msg (call |=%got)
33+++ existing-no-context ^- $-(@t msg) |=%got
34+++ wrong-existing ^- $-(@p msg) |=%got
35+++ later-use ^- msg unknown
36+++ noun-context ^- * (call |=%got)
37+++ other-known-origin ^- (ask @t) (call |=%got)
tests/golden/types-constructor-context/tokens.txtnew file+289
@@ -0,0 +1,289 @@
1+1:1 glyph +$
2+1:4 name msg
3+2:3 INDENT
4+2:3 glyph [
5+2:4 tight lit %got
6+2:9 name value
7+2:14 tight glyph =
8+2:15 tight aura @t
9+2:17 tight glyph ]
10+3:3 NEWLINE
11+3:3 lit %other
12+4:1 DEDENT
13+4:1 NEWLINE
14+4:1 glyph +$
15+4:4 name alias
16+4:10 name msg
17+5:1 NEWLINE
18+5:1 glyph +$
19+5:4 name wrong-payload
20+6:3 INDENT
21+6:3 glyph [
22+6:4 tight lit %got
23+6:9 name value
24+6:14 tight glyph =
25+6:15 tight aura @p
26+6:17 tight glyph ]
27+7:3 NEWLINE
28+7:3 lit %other
29+8:1 DEDENT
30+8:1 NEWLINE
31+8:1 glyph +$
32+8:4 name missing
33+9:3 INDENT
34+9:3 glyph [
35+9:4 tight lit %different
36+9:15 name value
37+9:20 tight glyph =
38+9:21 tight aura @t
39+9:23 tight glyph ]
40+10:3 NEWLINE
41+10:3 lit %other
42+11:1 DEDENT
43+11:1 NEWLINE
44+11:1 glyph +$
45+11:4 name maybe
46+11:10 glyph |$
47+11:13 glyph [
48+11:14 tight tvar A
49+11:15 tight glyph ]
50+12:3 INDENT
51+12:3 glyph [
52+12:4 tight lit %got
53+12:9 name value
54+12:14 tight glyph =
55+12:15 tight tvar A
56+12:16 tight glyph ]
57+13:3 NEWLINE
58+13:3 lit %other
59+14:1 DEDENT
60+14:1 NEWLINE
61+14:1 glyph ++
62+14:4 name call
63+14:9 glyph |=
64+14:12 name callback
65+14:20 tight glyph =
66+14:21 tight glyph $-(
67+14:24 tight aura @t
68+14:27 tvar M
69+14:28 tight glyph )
70+14:30 glyph (
71+14:31 tight name callback
72+14:40 str "payload"
73+14:49 tight glyph )
74+15:1 NEWLINE
75+15:1 glyph ++
76+15:4 name call-ship
77+15:14 glyph |=
78+15:17 name callback
79+15:25 tight glyph =
80+15:26 tight glyph $-(
81+15:29 tight aura @p
82+15:32 tvar M
83+15:33 tight glyph )
84+15:35 glyph (
85+15:36 tight name callback
86+15:45 lit ~zod
87+15:49 tight glyph )
88+16:1 NEWLINE
89+16:1 glyph ++
90+16:4 name unknown
91+16:12 glyph (
92+16:13 tight name call
93+16:18 glyph |=
94+16:20 tight lit %got
95+16:24 tight glyph )
96+17:1 NEWLINE
97+17:1 glyph ++
98+17:4 name later-context
99+17:18 glyph ^-
100+17:21 name msg
101+17:25 glyph (
102+17:26 tight name call
103+17:31 glyph |=
104+17:33 tight lit %got
105+17:37 tight glyph )
106+18:1 NEWLINE
107+18:1 glyph ++
108+18:4 name named-alias
109+18:16 glyph ^-
110+18:19 name alias
111+18:25 glyph (
112+18:26 tight name call
113+18:31 glyph |=
114+18:33 tight lit %got
115+18:37 tight glyph )
116+19:1 NEWLINE
117+19:1 glyph ++
118+19:4 name wrong-context
119+19:18 glyph ^-
120+19:21 name wrong-payload
121+19:35 glyph (
122+19:36 tight name call
123+19:41 glyph |=
124+19:43 tight lit %got
125+19:47 tight glyph )
126+20:1 NEWLINE
127+20:1 glyph ++
128+20:4 name missing-case
129+20:17 glyph ^-
130+20:20 name missing
131+20:28 glyph (
132+20:29 tight name call
133+20:34 glyph |=
134+20:36 tight lit %got
135+20:40 tight glyph )
136+21:1 NEWLINE
137+21:1 glyph ++
138+21:4 name generic-context
139+21:20 glyph ^-
140+21:23 glyph (
141+21:24 tight name maybe
142+21:30 aura @t
143+21:32 tight glyph )
144+21:34 glyph (
145+21:35 tight name call
146+21:40 glyph |=
147+21:42 tight lit %got
148+21:46 tight glyph )
149+22:1 NEWLINE
150+22:1 glyph ++
151+22:4 name generic-wrong
152+22:18 glyph ^-
153+22:21 glyph (
154+22:22 tight name maybe
155+22:28 aura @p
156+22:30 tight glyph )
157+22:32 glyph (
158+22:33 tight name call
159+22:38 glyph |=
160+22:40 tight lit %got
161+22:44 tight glyph )
162+23:1 NEWLINE
163+23:1 glyph ++
164+23:4 name generic-right-ship
165+23:23 glyph ^-
166+23:26 glyph (
167+23:27 tight name maybe
168+23:33 aura @p
169+23:35 tight glyph )
170+23:37 glyph (
171+23:38 tight name call-ship
172+23:48 glyph |=
173+23:50 tight lit %got
174+23:54 tight glyph )
175+24:1 NEWLINE
176+24:1 glyph ++
177+24:4 name named-capital
178+24:18 glyph |=
179+24:21 name value
180+24:26 tight glyph =
181+24:27 tight tvar A
182+25:3 INDENT
183+25:3 glyph ^-
184+25:6 glyph (
185+25:7 tight name maybe
186+25:13 tvar A
187+25:14 tight glyph )
188+26:5 INDENT
189+26:5 glyph (
190+26:6 tight glyph |=(
191+26:9 tight name callback
192+26:17 tight glyph =
193+26:18 tight glyph $-(
194+26:21 tight tvar A
195+26:23 tvar M
196+26:24 tight glyph )
197+26:26 glyph (
198+26:27 tight name callback
199+26:36 name value
200+26:41 tight glyph )
201+26:42 tight glyph )
202+26:44 glyph |=
203+26:46 tight lit %got
204+26:50 tight glyph )
205+27:1 DEDENT
206+27:1 DEDENT
207+27:1 NEWLINE
208+27:1 glyph ++
209+27:4 name discarded-pending
210+28:3 INDENT
211+28:3 glyph ~&
212+28:6 lit %unrelated
213+29:5 INDENT
214+29:5 glyph ^-
215+29:8 name msg
216+29:12 glyph (
217+29:13 tight name call
218+29:18 glyph |=
219+29:20 tight lit %got
220+29:24 tight glyph )
221+30:1 DEDENT
222+30:1 DEDENT
223+30:1 NEWLINE
224+30:1 glyph ++
225+30:4 name discarded-constructor
226+31:3 INDENT
227+31:3 glyph ~&
228+31:6 glyph |=
229+31:8 tight lit %missing
230+32:5 INDENT
231+32:5 glyph ^-
232+32:8 name msg
233+32:12 glyph (
234+32:13 tight name call
235+32:18 glyph |=
236+32:20 tight lit %got
237+32:24 tight glyph )
238+33:1 DEDENT
239+33:1 DEDENT
240+33:1 NEWLINE
241+33:1 glyph ++
242+33:4 name existing-no-context
243+33:24 glyph ^-
244+33:27 glyph $-(
245+33:30 tight aura @t
246+33:33 name msg
247+33:36 tight glyph )
248+33:38 glyph |=
249+33:40 tight lit %got
250+34:1 NEWLINE
251+34:1 glyph ++
252+34:4 name wrong-existing
253+34:19 glyph ^-
254+34:22 glyph $-(
255+34:25 tight aura @p
256+34:28 name msg
257+34:31 tight glyph )
258+34:33 glyph |=
259+34:35 tight lit %got
260+35:1 NEWLINE
261+35:1 glyph ++
262+35:4 name later-use
263+35:14 glyph ^-
264+35:17 name msg
265+35:21 name unknown
266+36:1 NEWLINE
267+36:1 glyph ++
268+36:4 name noun-context
269+36:17 glyph ^-
270+36:20 glyph *
271+36:22 glyph (
272+36:23 tight name call
273+36:28 glyph |=
274+36:30 tight lit %got
275+36:34 tight glyph )
276+37:1 NEWLINE
277+37:1 glyph ++
278+37:4 name other-known-origin
279+37:23 glyph ^-
280+37:26 glyph (
281+37:27 tight name ask
282+37:31 aura @t
283+37:33 tight glyph )
284+37:35 glyph (
285+37:36 tight name call
286+37:41 glyph |=
287+37:43 tight lit %got
288+37:47 tight glyph )
289+37:48 NEWLINE
tests/golden/types-constructor-context/tree.txtnew file+130
@@ -0,0 +1,130 @@
1+(module
2+ (mold 1:1 msg
3+ (union 2:3
4+ (cell 2:3
5+ (const 2:4 %got)
6+ (face 2:9 value (aura 2:15 @t)))
7+ (const 3:3 %other)))
8+ (mold 4:1 alias (ref 4:10 msg))
9+ (mold 5:1 wrong-payload
10+ (union 6:3
11+ (cell 6:3
12+ (const 6:4 %got)
13+ (face 6:9 value (aura 6:15 @p)))
14+ (const 7:3 %other)))
15+ (mold 8:1 missing
16+ (union 9:3
17+ (cell 9:3
18+ (const 9:4 %different)
19+ (face 9:15 value (aura 9:21 @t)))
20+ (const 10:3 %other)))
21+ (mold 11:1 maybe
22+ (generic 11:10 A
23+ (union 12:3
24+ (cell 12:3
25+ (const 12:4 %got)
26+ (face 12:9 value (tvar 12:15 A)))
27+ (const 13:3 %other))))
28+ (value 14:1 call
29+ (gate 14:9
30+ (face 14:12 callback
31+ (fn 14:21 (aura 14:24 @t) (tvar 14:27 M)))
32+ (group 14:30
33+ (call 14:31 (wing 14:31 callback) (str 14:40 "payload")))))
34+ (value 15:1 call-ship
35+ (gate 15:14
36+ (face 15:17 callback
37+ (fn 15:26 (aura 15:29 @p) (tvar 15:32 M)))
38+ (group 15:35
39+ (call 15:36 (wing 15:36 callback) (lit 15:45 ~zod)))))
40+ (value 16:1 unknown
41+ (group 16:12
42+ (call 16:13 (wing 16:13 call) (ctor 16:18 %got))))
43+ (value 17:1 later-context
44+ (cast 17:18
45+ (ref 17:21 msg)
46+ (group 17:25
47+ (call 17:26 (wing 17:26 call) (ctor 17:31 %got)))))
48+ (value 18:1 named-alias
49+ (cast 18:16
50+ (ref 18:19 alias)
51+ (group 18:25
52+ (call 18:26 (wing 18:26 call) (ctor 18:31 %got)))))
53+ (value 19:1 wrong-context
54+ (cast 19:18
55+ (ref 19:21 wrong-payload)
56+ (group 19:35
57+ (call 19:36 (wing 19:36 call) (ctor 19:41 %got)))))
58+ (value 20:1 missing-case
59+ (cast 20:17
60+ (ref 20:20 missing)
61+ (group 20:28
62+ (call 20:29 (wing 20:29 call) (ctor 20:34 %got)))))
63+ (value 21:1 generic-context
64+ (cast 21:20
65+ (apply 21:23 maybe (aura 21:30 @t))
66+ (group 21:34
67+ (call 21:35 (wing 21:35 call) (ctor 21:40 %got)))))
68+ (value 22:1 generic-wrong
69+ (cast 22:18
70+ (apply 22:21 maybe (aura 22:28 @p))
71+ (group 22:32
72+ (call 22:33 (wing 22:33 call) (ctor 22:38 %got)))))
73+ (value 23:1 generic-right-ship
74+ (cast 23:23
75+ (apply 23:26 maybe (aura 23:33 @p))
76+ (group 23:37
77+ (call 23:38 (wing 23:38 call-ship) (ctor 23:48 %got)))))
78+ (value 24:1 named-capital
79+ (gate 24:18
80+ (face 24:21 value (tvar 24:27 A))
81+ (body 25:3
82+ (cast 25:3
83+ (apply 25:6 maybe (tvar 25:13 A))
84+ (body 26:5
85+ (group 26:5
86+ (call 26:6
87+ (gate-wide 26:6
88+ (face 26:9 callback
89+ (fn 26:18 (tvar 26:21 A) (tvar 26:23 M)))
90+ (group 26:26
91+ (call 26:27 (wing 26:27 callback) (wing 26:36 value))))
92+ (ctor 26:44 %got))))))))
93+ (value 27:1 discarded-pending
94+ (body 28:3
95+ (trace 28:3
96+ (lit 28:6 %unrelated)
97+ (body 29:5
98+ (cast 29:5
99+ (ref 29:8 msg)
100+ (group 29:12
101+ (call 29:13 (wing 29:13 call) (ctor 29:18 %got))))))))
102+ (value 30:1 discarded-constructor
103+ (body 31:3
104+ (trace 31:3
105+ (ctor 31:6 %missing)
106+ (body 32:5
107+ (cast 32:5
108+ (ref 32:8 msg)
109+ (group 32:12
110+ (call 32:13 (wing 32:13 call) (ctor 32:18 %got))))))))
111+ (value 33:1 existing-no-context
112+ (cast 33:24
113+ (fn 33:27 (aura 33:30 @t) (ref 33:33 msg))
114+ (ctor 33:38 %got)))
115+ (value 34:1 wrong-existing
116+ (cast 34:19
117+ (fn 34:22 (aura 34:25 @p) (ref 34:28 msg))
118+ (ctor 34:33 %got)))
119+ (value 35:1 later-use
120+ (cast 35:14 (ref 35:17 msg) (wing 35:21 unknown)))
121+ (value 36:1 noun-context
122+ (cast 36:17
123+ (noun 36:20)
124+ (group 36:22
125+ (call 36:23 (wing 36:23 call) (ctor 36:28 %got)))))
126+ (value 37:1 other-known-origin
127+ (cast 37:23
128+ (apply 37:26 ask (aura 37:31 @t))
129+ (group 37:35
130+ (call 37:36 (wing 37:36 call) (ctor 37:41 %got))))))
tests/golden/types-constructor-context/types.txtnew file+54
@@ -0,0 +1,54 @@
1+partial inference; module not checked
2++$ msg: cases proven disjoint; mold not checked
3++$ alias: not checked
4++$ wrong-payload: cases proven disjoint; mold not checked
5++$ missing: cases proven disjoint; mold not checked
6++$ maybe: cases proven disjoint; mold not checked
7+++ call: $-($-(@t A) A)
8+++ call-ship: $-($-(@p A) A)
9+++ unknown: call constraint is not supported by partial inference
10+++ later-context: msg
11+++ named-alias: msg
12+++ wrong-context: call's sample and argument types do not unify
13+/tests/golden/types-constructor-context/source.jibb:19:36: called gate
14+++ wrong-context ^- wrong-payload (call |=%got)
15+ ^
16+/tests/golden/types-constructor-context/source.jibb:19:41: argument
17+++ wrong-context ^- wrong-payload (call |=%got)
18+ ^
19+++ missing-case: call's sample and argument types do not unify
20+/tests/golden/types-constructor-context/source.jibb:20:29: called gate
21+++ missing-case ^- missing (call |=%got)
22+ ^
23+/tests/golden/types-constructor-context/source.jibb:20:34: argument
24+++ missing-case ^- missing (call |=%got)
25+ ^
26+++ generic-context: (maybe @t)
27+++ generic-wrong: call's sample and argument types do not unify
28+/tests/golden/types-constructor-context/source.jibb:22:33: called gate
29+++ generic-wrong ^- (maybe @p) (call |=%got)
30+ ^
31+/tests/golden/types-constructor-context/source.jibb:22:38: argument
32+++ generic-wrong ^- (maybe @p) (call |=%got)
33+ ^
34+++ generic-right-ship: (maybe @p)
35+++ named-capital: explicit capital constraints are not supported by partial inference
36+++ discarded-pending: tag needs context in partial inference
37+++ discarded-constructor: tag needs context in partial inference
38+++ existing-no-context: $-(@t msg)
39+++ wrong-existing: cast mold and expression type do not unify
40+/tests/golden/types-constructor-context/source.jibb:34:22: cast mold
41+++ wrong-existing ^- $-(@p msg) |=%got
42+ ^
43+/tests/golden/types-constructor-context/source.jibb:34:33: expression
44+++ wrong-existing ^- $-(@p msg) |=%got
45+ ^
46+++ later-use: name is not available to partial inference
47+++ noun-context: call's sample and argument types do not unify
48+/tests/golden/types-constructor-context/source.jibb:36:23: called gate has type $-($-(@t *) *)
49+++ noun-context ^- * (call |=%got)
50+ ^
51+/tests/golden/types-constructor-context/source.jibb:36:28: argument
52+++ noun-context ^- * (call |=%got)
53+ ^
54+++ other-known-origin: cast mold is not supported by partial inference
tests/golden/types-equal-head-disjoint/about.txtnew file+2
@@ -0,0 +1,2 @@
1+source: equal literal heads may have disjoint payloads and are compared by noun.
2+tests: Singleton payloads %alpha and %beta select distinct same-head cases; @t and @p cases overlap at zero. Incompatible samples and unrelated pending literals fail closed.
tests/golden/types-equal-head-disjoint/source.jibbnew file+25
@@ -0,0 +1,25 @@
1++$ split
2+ [%one value=@t]
3+ [%one value=@p]
4++$ split-zero
5+ [~ value=@t]
6+ [%.y value=@p]
7++$ nullable
8+ ~
9+ [~ value=@t]
10+++ cord ^- $-(@t split) |=%one
11+++ ship ^- $-(@p split) |=%one
12+++ neither ^- $-(@ud split) |=%one
13+++ zero-cord ^- $-(@t split-zero) |=%$
14+++ zero-ship ^- $-(@p split-zero) |=%$
15+++ zero-neither ^- $-(@ud split-zero) |=%$
16+++ contextual ^- $-(@t nullable) |=%$
17+++ pending
18+ ~& %orphan
19+ ^- $-(@t split) |=%one
20++$ exact
21+ [%same %alpha]
22+ [%same %beta]
23+++ first ^- $-(%alpha exact) |=%same
24+++ second ^- $-(%beta exact) |=%same
25+++ no-case ^- $-(%other exact) |=%same
tests/golden/types-equal-head-disjoint/tokens.txtnew file+179
@@ -0,0 +1,179 @@
1+1:1 glyph +$
2+1:4 name split
3+2:3 INDENT
4+2:3 glyph [
5+2:4 tight lit %one
6+2:9 name value
7+2:14 tight glyph =
8+2:15 tight aura @t
9+2:17 tight glyph ]
10+3:3 NEWLINE
11+3:3 glyph [
12+3:4 tight lit %one
13+3:9 name value
14+3:14 tight glyph =
15+3:15 tight aura @p
16+3:17 tight glyph ]
17+4:1 DEDENT
18+4:1 NEWLINE
19+4:1 glyph +$
20+4:4 name split-zero
21+5:3 INDENT
22+5:3 glyph [
23+5:4 tight lit ~
24+5:6 name value
25+5:11 tight glyph =
26+5:12 tight aura @t
27+5:14 tight glyph ]
28+6:3 NEWLINE
29+6:3 glyph [
30+6:4 tight lit %.y
31+6:8 name value
32+6:13 tight glyph =
33+6:14 tight aura @p
34+6:16 tight glyph ]
35+7:1 DEDENT
36+7:1 NEWLINE
37+7:1 glyph +$
38+7:4 name nullable
39+8:3 INDENT
40+8:3 lit ~
41+9:3 NEWLINE
42+9:3 glyph [
43+9:4 tight lit ~
44+9:6 name value
45+9:11 tight glyph =
46+9:12 tight aura @t
47+9:14 tight glyph ]
48+10:1 DEDENT
49+10:1 NEWLINE
50+10:1 glyph ++
51+10:4 name cord
52+10:9 glyph ^-
53+10:12 glyph $-(
54+10:15 tight aura @t
55+10:18 name split
56+10:23 tight glyph )
57+10:25 glyph |=
58+10:27 tight lit %one
59+11:1 NEWLINE
60+11:1 glyph ++
61+11:4 name ship
62+11:9 glyph ^-
63+11:12 glyph $-(
64+11:15 tight aura @p
65+11:18 name split
66+11:23 tight glyph )
67+11:25 glyph |=
68+11:27 tight lit %one
69+12:1 NEWLINE
70+12:1 glyph ++
71+12:4 name neither
72+12:12 glyph ^-
73+12:15 glyph $-(
74+12:18 tight aura @ud
75+12:22 name split
76+12:27 tight glyph )
77+12:29 glyph |=
78+12:31 tight lit %one
79+13:1 NEWLINE
80+13:1 glyph ++
81+13:4 name zero-cord
82+13:14 glyph ^-
83+13:17 glyph $-(
84+13:20 tight aura @t
85+13:23 name split-zero
86+13:33 tight glyph )
87+13:35 glyph |=
88+13:37 tight lit %$
89+14:1 NEWLINE
90+14:1 glyph ++
91+14:4 name zero-ship
92+14:14 glyph ^-
93+14:17 glyph $-(
94+14:20 tight aura @p
95+14:23 name split-zero
96+14:33 tight glyph )
97+14:35 glyph |=
98+14:37 tight lit %$
99+15:1 NEWLINE
100+15:1 glyph ++
101+15:4 name zero-neither
102+15:17 glyph ^-
103+15:20 glyph $-(
104+15:23 tight aura @ud
105+15:27 name split-zero
106+15:37 tight glyph )
107+15:39 glyph |=
108+15:41 tight lit %$
109+16:1 NEWLINE
110+16:1 glyph ++
111+16:4 name contextual
112+16:15 glyph ^-
113+16:18 glyph $-(
114+16:21 tight aura @t
115+16:24 name nullable
116+16:32 tight glyph )
117+16:34 glyph |=
118+16:36 tight lit %$
119+17:1 NEWLINE
120+17:1 glyph ++
121+17:4 name pending
122+18:3 INDENT
123+18:3 glyph ~&
124+18:6 lit %orphan
125+19:5 INDENT
126+19:5 glyph ^-
127+19:8 glyph $-(
128+19:11 tight aura @t
129+19:14 name split
130+19:19 tight glyph )
131+19:21 glyph |=
132+19:23 tight lit %one
133+20:1 DEDENT
134+20:1 DEDENT
135+20:1 NEWLINE
136+20:1 glyph +$
137+20:4 name exact
138+21:3 INDENT
139+21:3 glyph [
140+21:4 tight lit %same
141+21:10 lit %alpha
142+21:16 tight glyph ]
143+22:3 NEWLINE
144+22:3 glyph [
145+22:4 tight lit %same
146+22:10 lit %beta
147+22:15 tight glyph ]
148+23:1 DEDENT
149+23:1 NEWLINE
150+23:1 glyph ++
151+23:4 name first
152+23:10 glyph ^-
153+23:13 glyph $-(
154+23:16 tight lit %alpha
155+23:23 name exact
156+23:28 tight glyph )
157+23:30 glyph |=
158+23:32 tight lit %same
159+24:1 NEWLINE
160+24:1 glyph ++
161+24:4 name second
162+24:11 glyph ^-
163+24:14 glyph $-(
164+24:17 tight lit %beta
165+24:23 name exact
166+24:28 tight glyph )
167+24:30 glyph |=
168+24:32 tight lit %same
169+25:1 NEWLINE
170+25:1 glyph ++
171+25:4 name no-case
172+25:12 glyph ^-
173+25:15 glyph $-(
174+25:18 tight lit %other
175+25:25 name exact
176+25:30 tight glyph )
177+25:32 glyph |=
178+25:34 tight lit %same
179+25:39 NEWLINE
tests/golden/types-equal-head-disjoint/tree.txtnew file+75
@@ -0,0 +1,75 @@
1+(module
2+ (mold 1:1 split
3+ (union 2:3
4+ (cell 2:3
5+ (const 2:4 %one)
6+ (face 2:9 value (aura 2:15 @t)))
7+ (cell 3:3
8+ (const 3:4 %one)
9+ (face 3:9 value (aura 3:15 @p)))))
10+ (mold 4:1 split-zero
11+ (union 5:3
12+ (cell 5:3
13+ (const 5:4 ~)
14+ (face 5:6 value (aura 5:12 @t)))
15+ (cell 6:3
16+ (const 6:4 %.y)
17+ (face 6:8 value (aura 6:14 @p)))))
18+ (mold 7:1 nullable
19+ (union 8:3
20+ (const 8:3 ~)
21+ (cell 9:3
22+ (const 9:4 ~)
23+ (face 9:6 value (aura 9:12 @t)))))
24+ (value 10:1 cord
25+ (cast 10:9
26+ (fn 10:12 (aura 10:15 @t) (ref 10:18 split))
27+ (ctor 10:25 %one)))
28+ (value 11:1 ship
29+ (cast 11:9
30+ (fn 11:12 (aura 11:15 @p) (ref 11:18 split))
31+ (ctor 11:25 %one)))
32+ (value 12:1 neither
33+ (cast 12:12
34+ (fn 12:15 (aura 12:18 @ud) (ref 12:22 split))
35+ (ctor 12:29 %one)))
36+ (value 13:1 zero-cord
37+ (cast 13:14
38+ (fn 13:17 (aura 13:20 @t) (ref 13:23 split-zero))
39+ (ctor 13:35 %$)))
40+ (value 14:1 zero-ship
41+ (cast 14:14
42+ (fn 14:17 (aura 14:20 @p) (ref 14:23 split-zero))
43+ (ctor 14:35 %$)))
44+ (value 15:1 zero-neither
45+ (cast 15:17
46+ (fn 15:20 (aura 15:23 @ud) (ref 15:27 split-zero))
47+ (ctor 15:39 %$)))
48+ (value 16:1 contextual
49+ (cast 16:15
50+ (fn 16:18 (aura 16:21 @t) (ref 16:24 nullable))
51+ (ctor 16:34 %$)))
52+ (value 17:1 pending
53+ (body 18:3
54+ (trace 18:3
55+ (lit 18:6 %orphan)
56+ (body 19:5
57+ (cast 19:5
58+ (fn 19:8 (aura 19:11 @t) (ref 19:14 split))
59+ (ctor 19:21 %one))))))
60+ (mold 20:1 exact
61+ (union 21:3
62+ (cell 21:3 (const 21:4 %same) (const 21:10 %alpha))
63+ (cell 22:3 (const 22:4 %same) (const 22:10 %beta))))
64+ (value 23:1 first
65+ (cast 23:10
66+ (fn 23:13 (const 23:16 %alpha) (ref 23:23 exact))
67+ (ctor 23:30 %same)))
68+ (value 24:1 second
69+ (cast 24:11
70+ (fn 24:14 (const 24:17 %beta) (ref 24:23 exact))
71+ (ctor 24:30 %same)))
72+ (value 25:1 no-case
73+ (cast 25:12
74+ (fn 25:15 (const 25:18 %other) (ref 25:25 exact))
75+ (ctor 25:32 %same))))
tests/golden/types-equal-head-disjoint/types.txtnew file+34
@@ -0,0 +1,34 @@
1+partial inference; module not checked
2++$ split: overlapping cases; mold not checked
3+/tests/golden/types-equal-head-disjoint/source.jibb:2:3: first union case
4+ [%one value=@t]
5+ ^
6+/tests/golden/types-equal-head-disjoint/source.jibb:3:3: overlapping case
7+ [%one value=@p]
8+ ^
9++$ split-zero: overlapping cases; mold not checked
10+/tests/golden/types-equal-head-disjoint/source.jibb:5:3: first union case
11+ [~ value=@t]
12+ ^
13+/tests/golden/types-equal-head-disjoint/source.jibb:6:3: overlapping case
14+ [%.y value=@p]
15+ ^
16++$ nullable: cases proven disjoint; mold not checked
17+++ cord: cast mold is not supported by partial inference
18+++ ship: cast mold is not supported by partial inference
19+++ neither: cast mold is not supported by partial inference
20+++ zero-cord: cast mold is not supported by partial inference
21+++ zero-ship: cast mold is not supported by partial inference
22+++ zero-neither: cast mold is not supported by partial inference
23+++ contextual: $-(@t nullable)
24+++ pending: cast mold is not supported by partial inference
25++$ exact: cases proven disjoint; mold not checked
26+++ first: $-(%alpha exact)
27+++ second: $-(%beta exact)
28+++ no-case: cast mold and expression type do not unify
29+/tests/golden/types-equal-head-disjoint/source.jibb:25:15: cast mold
30+++ no-case ^- $-(%other exact) |=%same
31+ ^
32+/tests/golden/types-equal-head-disjoint/source.jibb:25:32: expression
33+++ no-case ^- $-(%other exact) |=%same
34+ ^
tests/golden/types-generic-result-context/about.txtnew file+1
@@ -0,0 +1 @@
1+Context can reach a directly known generic union result, including reordered and repeated aliases, distinct nominal arguments, independent uses, pending tags and a missing case. These are partial inference reports.
tests/golden/types-generic-result-context/source.jibbnew file+24
@@ -0,0 +1,24 @@
1++$ msg
2+ %idle
3+ %busy
4++$ other
5+ %idle
6+ %busy
7++$ choice |$ [A B]
8+ [%one value=A]
9+ [%two value=B]
10++$ swap |$ [A B] (choice B A)
11++$ repeated |$ [A] (choice A A)
12++$ phantom |$ [A B] (choice A @p)
13+++ wrap |= x=A ^- (choice A @p) [%one x]
14+++ wrap-repeat |= x=A ^- (repeated A) [%one x]
15+++ use-msg ^- (choice msg @p) (wrap %idle)
16+++ use-alias ^- (swap @p msg) (wrap %idle)
17+++ use-repeated ^- (repeated msg) (wrap-repeat %idle)
18+++ use-distinct ^- (choice other @p) (wrap %idle)
19+++ independent |= [m=msg n=other]
20+ [(^- (choice msg @p) (wrap m)) (^- (choice other @p) (wrap n))]
21+++ pending
22+ ~& %orphan
23+ ^- (choice msg @p) (wrap %idle)
24+++ wrong-case ^- (choice msg @p) (wrap %absent)
tests/golden/types-generic-result-context/tokens.txtnew file+233
@@ -0,0 +1,233 @@
1+1:1 glyph +$
2+1:4 name msg
3+2:3 INDENT
4+2:3 lit %idle
5+3:3 NEWLINE
6+3:3 lit %busy
7+4:1 DEDENT
8+4:1 NEWLINE
9+4:1 glyph +$
10+4:4 name other
11+5:3 INDENT
12+5:3 lit %idle
13+6:3 NEWLINE
14+6:3 lit %busy
15+7:1 DEDENT
16+7:1 NEWLINE
17+7:1 glyph +$
18+7:4 name choice
19+7:11 glyph |$
20+7:14 glyph [
21+7:15 tight tvar A
22+7:17 tvar B
23+7:18 tight glyph ]
24+8:3 INDENT
25+8:3 glyph [
26+8:4 tight lit %one
27+8:9 name value
28+8:14 tight glyph =
29+8:15 tight tvar A
30+8:16 tight glyph ]
31+9:3 NEWLINE
32+9:3 glyph [
33+9:4 tight lit %two
34+9:9 name value
35+9:14 tight glyph =
36+9:15 tight tvar B
37+9:16 tight glyph ]
38+10:1 DEDENT
39+10:1 NEWLINE
40+10:1 glyph +$
41+10:4 name swap
42+10:9 glyph |$
43+10:12 glyph [
44+10:13 tight tvar A
45+10:15 tvar B
46+10:16 tight glyph ]
47+10:18 glyph (
48+10:19 tight name choice
49+10:26 tvar B
50+10:28 tvar A
51+10:29 tight glyph )
52+11:1 NEWLINE
53+11:1 glyph +$
54+11:4 name repeated
55+11:13 glyph |$
56+11:16 glyph [
57+11:17 tight tvar A
58+11:18 tight glyph ]
59+11:20 glyph (
60+11:21 tight name choice
61+11:28 tvar A
62+11:30 tvar A
63+11:31 tight glyph )
64+12:1 NEWLINE
65+12:1 glyph +$
66+12:4 name phantom
67+12:12 glyph |$
68+12:15 glyph [
69+12:16 tight tvar A
70+12:18 tvar B
71+12:19 tight glyph ]
72+12:21 glyph (
73+12:22 tight name choice
74+12:29 tvar A
75+12:31 aura @p
76+12:33 tight glyph )
77+13:1 NEWLINE
78+13:1 glyph ++
79+13:4 name wrap
80+13:9 glyph |=
81+13:12 name x
82+13:13 tight glyph =
83+13:14 tight tvar A
84+13:16 glyph ^-
85+13:19 glyph (
86+13:20 tight name choice
87+13:27 tvar A
88+13:29 aura @p
89+13:31 tight glyph )
90+13:33 glyph [
91+13:34 tight lit %one
92+13:39 name x
93+13:40 tight glyph ]
94+14:1 NEWLINE
95+14:1 glyph ++
96+14:4 name wrap-repeat
97+14:16 glyph |=
98+14:19 name x
99+14:20 tight glyph =
100+14:21 tight tvar A
101+14:23 glyph ^-
102+14:26 glyph (
103+14:27 tight name repeated
104+14:36 tvar A
105+14:37 tight glyph )
106+14:39 glyph [
107+14:40 tight lit %one
108+14:45 name x
109+14:46 tight glyph ]
110+15:1 NEWLINE
111+15:1 glyph ++
112+15:4 name use-msg
113+15:12 glyph ^-
114+15:15 glyph (
115+15:16 tight name choice
116+15:23 name msg
117+15:27 aura @p
118+15:29 tight glyph )
119+15:31 glyph (
120+15:32 tight name wrap
121+15:37 lit %idle
122+15:42 tight glyph )
123+16:1 NEWLINE
124+16:1 glyph ++
125+16:4 name use-alias
126+16:14 glyph ^-
127+16:17 glyph (
128+16:18 tight name swap
129+16:23 aura @p
130+16:26 name msg
131+16:29 tight glyph )
132+16:31 glyph (
133+16:32 tight name wrap
134+16:37 lit %idle
135+16:42 tight glyph )
136+17:1 NEWLINE
137+17:1 glyph ++
138+17:4 name use-repeated
139+17:17 glyph ^-
140+17:20 glyph (
141+17:21 tight name repeated
142+17:30 name msg
143+17:33 tight glyph )
144+17:35 glyph (
145+17:36 tight name wrap-repeat
146+17:48 lit %idle
147+17:53 tight glyph )
148+18:1 NEWLINE
149+18:1 glyph ++
150+18:4 name use-distinct
151+18:17 glyph ^-
152+18:20 glyph (
153+18:21 tight name choice
154+18:28 name other
155+18:34 aura @p
156+18:36 tight glyph )
157+18:38 glyph (
158+18:39 tight name wrap
159+18:44 lit %idle
160+18:49 tight glyph )
161+19:1 NEWLINE
162+19:1 glyph ++
163+19:4 name independent
164+19:16 glyph |=
165+19:19 glyph [
166+19:20 tight name m
167+19:21 tight glyph =
168+19:22 tight name msg
169+19:26 name n
170+19:27 tight glyph =
171+19:28 tight name other
172+19:33 tight glyph ]
173+20:3 INDENT
174+20:3 glyph [
175+20:4 tight glyph (
176+20:5 tight glyph ^-
177+20:8 glyph (
178+20:9 tight name choice
179+20:16 name msg
180+20:20 aura @p
181+20:22 tight glyph )
182+20:24 glyph (
183+20:25 tight name wrap
184+20:30 name m
185+20:31 tight glyph )
186+20:32 tight glyph )
187+20:34 glyph (
188+20:35 tight glyph ^-
189+20:38 glyph (
190+20:39 tight name choice
191+20:46 name other
192+20:52 aura @p
193+20:54 tight glyph )
194+20:56 glyph (
195+20:57 tight name wrap
196+20:62 name n
197+20:63 tight glyph )
198+20:64 tight glyph )
199+20:65 tight glyph ]
200+21:1 DEDENT
201+21:1 NEWLINE
202+21:1 glyph ++
203+21:4 name pending
204+22:3 INDENT
205+22:3 glyph ~&
206+22:6 lit %orphan
207+23:5 INDENT
208+23:5 glyph ^-
209+23:8 glyph (
210+23:9 tight name choice
211+23:16 name msg
212+23:20 aura @p
213+23:22 tight glyph )
214+23:24 glyph (
215+23:25 tight name wrap
216+23:30 lit %idle
217+23:35 tight glyph )
218+24:1 DEDENT
219+24:1 DEDENT
220+24:1 NEWLINE
221+24:1 glyph ++
222+24:4 name wrong-case
223+24:15 glyph ^-
224+24:18 glyph (
225+24:19 tight name choice
226+24:26 name msg
227+24:30 aura @p
228+24:32 tight glyph )
229+24:34 glyph (
230+24:35 tight name wrap
231+24:40 lit %absent
232+24:47 tight glyph )
233+24:48 NEWLINE
tests/golden/types-generic-result-context/tree.txtnew file+86
@@ -0,0 +1,86 @@
1+(module
2+ (mold 1:1 msg
3+ (union 2:3 (const 2:3 %idle) (const 3:3 %busy)))
4+ (mold 4:1 other
5+ (union 5:3 (const 5:3 %idle) (const 6:3 %busy)))
6+ (mold 7:1 choice
7+ (generic 7:11 A B
8+ (union 8:3
9+ (cell 8:3
10+ (const 8:4 %one)
11+ (face 8:9 value (tvar 8:15 A)))
12+ (cell 9:3
13+ (const 9:4 %two)
14+ (face 9:9 value (tvar 9:15 B))))))
15+ (mold 10:1 swap
16+ (generic 10:9 A B
17+ (apply 10:18 choice (tvar 10:26 B) (tvar 10:28 A))))
18+ (mold 11:1 repeated
19+ (generic 11:13 A
20+ (apply 11:20 choice (tvar 11:28 A) (tvar 11:30 A))))
21+ (mold 12:1 phantom
22+ (generic 12:12 A B
23+ (apply 12:21 choice (tvar 12:29 A) (aura 12:31 @p))))
24+ (value 13:1 wrap
25+ (gate 13:9
26+ (face 13:12 x (tvar 13:14 A))
27+ (cast 13:16
28+ (apply 13:19 choice (tvar 13:27 A) (aura 13:29 @p))
29+ (tuple 13:33 (lit 13:34 %one) (wing 13:39 x)))))
30+ (value 14:1 wrap-repeat
31+ (gate 14:16
32+ (face 14:19 x (tvar 14:21 A))
33+ (cast 14:23
34+ (apply 14:26 repeated (tvar 14:36 A))
35+ (tuple 14:39 (lit 14:40 %one) (wing 14:45 x)))))
36+ (value 15:1 use-msg
37+ (cast 15:12
38+ (apply 15:15 choice (ref 15:23 msg) (aura 15:27 @p))
39+ (group 15:31
40+ (call 15:32 (wing 15:32 wrap) (lit 15:37 %idle)))))
41+ (value 16:1 use-alias
42+ (cast 16:14
43+ (apply 16:17 swap (aura 16:23 @p) (ref 16:26 msg))
44+ (group 16:31
45+ (call 16:32 (wing 16:32 wrap) (lit 16:37 %idle)))))
46+ (value 17:1 use-repeated
47+ (cast 17:17
48+ (apply 17:20 repeated (ref 17:30 msg))
49+ (group 17:35
50+ (call 17:36 (wing 17:36 wrap-repeat) (lit 17:48 %idle)))))
51+ (value 18:1 use-distinct
52+ (cast 18:17
53+ (apply 18:20 choice (ref 18:28 other) (aura 18:34 @p))
54+ (group 18:38
55+ (call 18:39 (wing 18:39 wrap) (lit 18:44 %idle)))))
56+ (value 19:1 independent
57+ (gate 19:16
58+ (cell 19:19
59+ (face 19:20 m (ref 19:22 msg))
60+ (face 19:26 n (ref 19:28 other)))
61+ (body 20:3
62+ (tuple 20:3
63+ (group 20:4
64+ (cast 20:5
65+ (apply 20:8 choice (ref 20:16 msg) (aura 20:20 @p))
66+ (group 20:24
67+ (call 20:25 (wing 20:25 wrap) (wing 20:30 m)))))
68+ (group 20:34
69+ (cast 20:35
70+ (apply 20:38 choice (ref 20:46 other) (aura 20:52 @p))
71+ (group 20:56
72+ (call 20:57 (wing 20:57 wrap) (wing 20:62 n)))))))))
73+ (value 21:1 pending
74+ (body 22:3
75+ (trace 22:3
76+ (lit 22:6 %orphan)
77+ (body 23:5
78+ (cast 23:5
79+ (apply 23:8 choice (ref 23:16 msg) (aura 23:20 @p))
80+ (group 23:24
81+ (call 23:25 (wing 23:25 wrap) (lit 23:30 %idle))))))))
82+ (value 24:1 wrong-case
83+ (cast 24:15
84+ (apply 24:18 choice (ref 24:26 msg) (aura 24:30 @p))
85+ (group 24:34
86+ (call 24:35 (wing 24:35 wrap) (lit 24:40 %absent))))))
tests/golden/types-generic-result-context/types.txtnew file+22
@@ -0,0 +1,22 @@
1+partial inference; module not checked
2++$ msg: cases proven disjoint; mold not checked
3++$ other: cases proven disjoint; mold not checked
4++$ choice: cases proven disjoint; mold not checked
5++$ swap: not checked
6++$ repeated: not checked
7++$ phantom: not checked
8+++ wrap: $-(A (choice A @p))
9+++ wrap-repeat: $-(A (choice A A))
10+++ use-msg: (choice msg @p)
11+++ use-alias: (choice msg @p)
12+++ use-repeated: (choice msg msg)
13+++ use-distinct: (choice other @p)
14+++ independent: $-([m=msg n=other] [(choice msg @p) (choice other @p)])
15+++ pending: tag needs context in partial inference
16+++ wrong-case: msg has no case `%absent`
17+/tests/golden/types-generic-result-context/source.jibb:24:35: expected union
18+++ wrong-case ^- (choice msg @p) (wrap %absent)
19+ ^
20+/tests/golden/types-generic-result-context/source.jibb:24:40: tag
21+++ wrong-case ^- (choice msg @p) (wrap %absent)
22+ ^
tests/golden/types-hole-concrete/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Types and molds: a definition must determine its own type holes.
2+tests: Independent holes fixed to concrete results and samples, decimal defaulting, atom widening and a pending tag.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-hole-concrete/source.jibbnew file+6
@@ -0,0 +1,6 @@
1+++ cast ^- _ "hello"
2+++ sample |= x=_ ^- @t x
3+++ separate |= x=[_ _] ^- [@t @p] x
4+++ decimal ^- _ 1
5+++ atom |= x=@ ^- _ x
6+++ unresolved-tag ^- _ %foo
tests/golden/types-hole-concrete/tokens.txtnew file+54
@@ -0,0 +1,54 @@
1+1:1 glyph ++
2+1:4 name cast
3+1:9 glyph ^-
4+1:12 glyph _
5+1:14 str "hello"
6+2:1 NEWLINE
7+2:1 glyph ++
8+2:4 name sample
9+2:11 glyph |=
10+2:14 name x
11+2:15 tight glyph =
12+2:16 tight glyph _
13+2:18 glyph ^-
14+2:21 aura @t
15+2:24 name x
16+3:1 NEWLINE
17+3:1 glyph ++
18+3:4 name separate
19+3:13 glyph |=
20+3:16 name x
21+3:17 tight glyph =
22+3:18 tight glyph [
23+3:19 tight glyph _
24+3:21 glyph _
25+3:22 tight glyph ]
26+3:24 glyph ^-
27+3:27 glyph [
28+3:28 tight aura @t
29+3:31 aura @p
30+3:33 tight glyph ]
31+3:35 name x
32+4:1 NEWLINE
33+4:1 glyph ++
34+4:4 name decimal
35+4:12 glyph ^-
36+4:15 glyph _
37+4:17 lit 1
38+5:1 NEWLINE
39+5:1 glyph ++
40+5:4 name atom
41+5:9 glyph |=
42+5:12 name x
43+5:13 tight glyph =
44+5:14 tight aura @
45+5:16 glyph ^-
46+5:19 glyph _
47+5:21 name x
48+6:1 NEWLINE
49+6:1 glyph ++
50+6:4 name unresolved-tag
51+6:19 glyph ^-
52+6:22 glyph _
53+6:24 lit %foo
54+6:28 NEWLINE
tests/golden/types-hole-concrete/tree.txtnew file+22
@@ -0,0 +1,22 @@
1+(module
2+ (value 1:1 cast
3+ (cast 1:9 (hole 1:12) (str 1:14 "hello")))
4+ (value 2:1 sample
5+ (gate 2:11
6+ (face 2:14 x (hole 2:16))
7+ (cast 2:18 (aura 2:21 @t) (wing 2:24 x))))
8+ (value 3:1 separate
9+ (gate 3:13
10+ (face 3:16 x
11+ (cell 3:18 (hole 3:19) (hole 3:21)))
12+ (cast 3:24
13+ (cell 3:27 (aura 3:28 @t) (aura 3:31 @p))
14+ (wing 3:35 x))))
15+ (value 4:1 decimal
16+ (cast 4:12 (hole 4:15) (lit 4:17 1)))
17+ (value 5:1 atom
18+ (gate 5:9
19+ (face 5:12 x (aura 5:14 @))
20+ (cast 5:16 (hole 5:19) (wing 5:21 x))))
21+ (value 6:1 unresolved-tag
22+ (cast 6:19 (hole 6:22) (lit 6:24 %foo))))
tests/golden/types-hole-concrete/types.txtnew file+10
@@ -0,0 +1,10 @@
1+partial inference; module not checked
2+++ cast: @t
3+++ sample: $-(@t @t)
4+++ separate: $-([@t @p] [@t @p])
5+++ decimal: @ud
6+++ atom: $-(@ @)
7+++ unresolved-tag: type hole needs unsupported inference
8+/tests/golden/types-hole-concrete/source.jibb:6:22: type hole
9+++ unresolved-tag ^- _ %foo
10+ ^
tests/golden/types-hole-generic-mold/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Types and molds: named molds must determine their own holes.
2+tests: A declared generic parameter does not determine a separate hole in the same record, and later application cannot repair it.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-hole-generic-mold/source.jibbnew file+2
@@ -0,0 +1,2 @@
1++$ generic |$ [A] [left=A right=_]
2+++ later |= x=(generic @t) x
tests/golden/types-hole-generic-mold/tokens.txtnew file+26
@@ -0,0 +1,26 @@
1+1:1 glyph +$
2+1:4 name generic
3+1:12 glyph |$
4+1:15 glyph [
5+1:16 tight tvar A
6+1:17 tight glyph ]
7+1:19 glyph [
8+1:20 tight name left
9+1:24 tight glyph =
10+1:25 tight tvar A
11+1:27 name right
12+1:32 tight glyph =
13+1:33 tight glyph _
14+1:34 tight glyph ]
15+2:1 NEWLINE
16+2:1 glyph ++
17+2:4 name later
18+2:10 glyph |=
19+2:13 name x
20+2:14 tight glyph =
21+2:15 tight glyph (
22+2:16 tight name generic
23+2:24 aura @t
24+2:26 tight glyph )
25+2:28 name x
26+2:29 NEWLINE
tests/golden/types-hole-generic-mold/tree.txtnew file+11
@@ -0,0 +1,11 @@
1+(module
2+ (mold 1:1 generic
3+ (generic 1:12 A
4+ (cell 1:19
5+ (face 1:20 left (tvar 1:25 A))
6+ (face 1:27 right (hole 1:33)))))
7+ (value 2:1 later
8+ (gate 2:10
9+ (face 2:13 x
10+ (apply 2:15 generic (aura 2:24 @t)))
11+ (wing 2:28 x))))
tests/golden/types-hole-generic-mold/types.txtnew file+6
@@ -0,0 +1,6 @@
1+partial inference; module not checked
2++$ generic: type hole needs a determined type
3+/tests/golden/types-hole-generic-mold/source.jibb:1:33: unresolved type hole
4++$ generic |$ [A] [left=A right=_]
5+ ^
6+++ later: sample mold is not supported by partial inference
tests/golden/types-hole-local-boundary/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Types and molds: a definition must determine its own type holes.
2+tests: Local definition boundaries, unused locals, a locally solved hole, and recursive groups.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-hole-local-boundary/source.jibbnew file+16
@@ -0,0 +1,16 @@
1+++ later
2+ ++ id |= x=_ x
3+ (id "hello")
4+++ ignored |= x=@t
5+ ++ id |= y=_ y
6+ x
7+++ resolved
8+ ++ id |= x=_ ^- @t x
9+ (id "hello")
10+++ self |= x=_ (self x)
11+++ mutual
12+ ++ left |= x=_ (right x)
13+ ++ right |= x=_ (left x)
14+ (left "hello")
15+++ grouped-a |= x=_ (grouped-b x)
16+++ grouped-b |= x=@t (grouped-a x)
tests/golden/types-hole-local-boundary/tokens.txtnew file+118
@@ -0,0 +1,118 @@
1+1:1 glyph ++
2+1:4 name later
3+2:3 INDENT
4+2:3 glyph ++
5+2:6 name id
6+2:9 glyph |=
7+2:12 name x
8+2:13 tight glyph =
9+2:14 tight glyph _
10+2:16 name x
11+3:3 NEWLINE
12+3:3 glyph (
13+3:4 tight name id
14+3:7 str "hello"
15+3:14 tight glyph )
16+4:1 DEDENT
17+4:1 NEWLINE
18+4:1 glyph ++
19+4:4 name ignored
20+4:12 glyph |=
21+4:15 name x
22+4:16 tight glyph =
23+4:17 tight aura @t
24+5:3 INDENT
25+5:3 glyph ++
26+5:6 name id
27+5:9 glyph |=
28+5:12 name y
29+5:13 tight glyph =
30+5:14 tight glyph _
31+5:16 name y
32+6:3 NEWLINE
33+6:3 name x
34+7:1 DEDENT
35+7:1 NEWLINE
36+7:1 glyph ++
37+7:4 name resolved
38+8:3 INDENT
39+8:3 glyph ++
40+8:6 name id
41+8:9 glyph |=
42+8:12 name x
43+8:13 tight glyph =
44+8:14 tight glyph _
45+8:16 glyph ^-
46+8:19 aura @t
47+8:22 name x
48+9:3 NEWLINE
49+9:3 glyph (
50+9:4 tight name id
51+9:7 str "hello"
52+9:14 tight glyph )
53+10:1 DEDENT
54+10:1 NEWLINE
55+10:1 glyph ++
56+10:4 name self
57+10:9 glyph |=
58+10:12 name x
59+10:13 tight glyph =
60+10:14 tight glyph _
61+10:16 glyph (
62+10:17 tight name self
63+10:22 name x
64+10:23 tight glyph )
65+11:1 NEWLINE
66+11:1 glyph ++
67+11:4 name mutual
68+12:3 INDENT
69+12:3 glyph ++
70+12:6 name left
71+12:11 glyph |=
72+12:14 name x
73+12:15 tight glyph =
74+12:16 tight glyph _
75+12:18 glyph (
76+12:19 tight name right
77+12:25 name x
78+12:26 tight glyph )
79+13:3 NEWLINE
80+13:3 glyph ++
81+13:6 name right
82+13:12 glyph |=
83+13:15 name x
84+13:16 tight glyph =
85+13:17 tight glyph _
86+13:19 glyph (
87+13:20 tight name left
88+13:25 name x
89+13:26 tight glyph )
90+14:3 NEWLINE
91+14:3 glyph (
92+14:4 tight name left
93+14:9 str "hello"
94+14:16 tight glyph )
95+15:1 DEDENT
96+15:1 NEWLINE
97+15:1 glyph ++
98+15:4 name grouped-a
99+15:14 glyph |=
100+15:17 name x
101+15:18 tight glyph =
102+15:19 tight glyph _
103+15:21 glyph (
104+15:22 tight name grouped-b
105+15:32 name x
106+15:33 tight glyph )
107+16:1 NEWLINE
108+16:1 glyph ++
109+16:4 name grouped-b
110+16:14 glyph |=
111+16:17 name x
112+16:18 tight glyph =
113+16:19 tight aura @t
114+16:22 glyph (
115+16:23 tight name grouped-a
116+16:33 name x
117+16:34 tight glyph )
118+16:35 NEWLINE
tests/golden/types-hole-local-boundary/tree.txtnew file+55
@@ -0,0 +1,55 @@
1+(module
2+ (value 1:1 later
3+ (body 2:3
4+ (value 2:3 id
5+ (gate 2:9
6+ (face 2:12 x (hole 2:14))
7+ (wing 2:16 x)))
8+ (group 3:3
9+ (call 3:4 (wing 3:4 id) (str 3:7 "hello")))))
10+ (value 4:1 ignored
11+ (gate 4:12
12+ (face 4:15 x (aura 4:17 @t))
13+ (body 5:3
14+ (value 5:3 id
15+ (gate 5:9
16+ (face 5:12 y (hole 5:14))
17+ (wing 5:16 y)))
18+ (wing 6:3 x))))
19+ (value 7:1 resolved
20+ (body 8:3
21+ (value 8:3 id
22+ (gate 8:9
23+ (face 8:12 x (hole 8:14))
24+ (cast 8:16 (aura 8:19 @t) (wing 8:22 x))))
25+ (group 9:3
26+ (call 9:4 (wing 9:4 id) (str 9:7 "hello")))))
27+ (value 10:1 self
28+ (gate 10:9
29+ (face 10:12 x (hole 10:14))
30+ (group 10:16
31+ (call 10:17 (wing 10:17 self) (wing 10:22 x)))))
32+ (value 11:1 mutual
33+ (body 12:3
34+ (value 12:3 left
35+ (gate 12:11
36+ (face 12:14 x (hole 12:16))
37+ (group 12:18
38+ (call 12:19 (wing 12:19 right) (wing 12:25 x)))))
39+ (value 13:3 right
40+ (gate 13:12
41+ (face 13:15 x (hole 13:17))
42+ (group 13:19
43+ (call 13:20 (wing 13:20 left) (wing 13:25 x)))))
44+ (group 14:3
45+ (call 14:4 (wing 14:4 left) (str 14:9 "hello")))))
46+ (value 15:1 grouped-a
47+ (gate 15:14
48+ (face 15:17 x (hole 15:19))
49+ (group 15:21
50+ (call 15:22 (wing 15:22 grouped-b) (wing 15:32 x)))))
51+ (value 16:1 grouped-b
52+ (gate 16:14
53+ (face 16:17 x (aura 16:19 @t))
54+ (group 16:22
55+ (call 16:23 (wing 16:23 grouped-a) (wing 16:33 x))))))
tests/golden/types-hole-local-boundary/types.txtnew file+17
@@ -0,0 +1,17 @@
1+partial inference; module not checked
2+++ later: type hole needs a determined type
3+/tests/golden/types-hole-local-boundary/source.jibb:2:14: unresolved type hole
4+ ++ id |= x=_ x
5+ ^
6+++ ignored: type hole needs a determined type
7+/tests/golden/types-hole-local-boundary/source.jibb:5:14: unresolved type hole
8+ ++ id |= y=_ y
9+ ^
10+++ resolved: @t
11+++ self: type hole needs a determined type
12+/tests/golden/types-hole-local-boundary/source.jibb:10:14: unresolved type hole
13+++ self |= x=_ (self x)
14+ ^
15+++ mutual: local definitions need unsupported inference
16+++ grouped-a: name is not available to partial inference
17+++ grouped-b: name is not available to partial inference
tests/golden/types-hole-module-boundary/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Types and molds: a definition must determine its own type holes.
2+tests: A module export cannot generalize an unresolved hole that the importing call later fixes.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-hole-module-boundary/module-trees.txtnew file+6
@@ -0,0 +1,6 @@
1+/ui/lib.jibb
2+(module
3+ (value 1:1 id
4+ (gate 1:7
5+ (face 1:10 x (hole 1:12))
6+ (wing 1:14 x))))
tests/golden/types-module-field-ambiguous/modules.txt → tests/golden/types-hole-module-boundary/modules.txtrenamed

The content is the same.

tests/golden/types-hole-module-boundary/modules/ui/lib.jibbnew file+1
@@ -0,0 +1 @@
1+++ id |= x=_ x
tests/golden/types-hole-module-boundary/source.jibbnew file+2
@@ -0,0 +1,2 @@
1+/= lib /ui/lib
2+++ use (id.lib "hello")
tests/golden/types-hole-module-boundary/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 use
10+2:8 glyph (
11+2:9 tight wing id.lib
12+2:16 str "hello"
13+2:23 tight glyph )
14+2:24 NEWLINE
tests/golden/types-hole-module-boundary/tree.txtnew file+5
@@ -0,0 +1,5 @@
1+(module
2+ (jibb 1:1 lib /ui/lib)
3+ (value 2:1 use
4+ (group 2:8
5+ (call 2:9 (wing 2:9 id.lib) (str 2:16 "hello")))))
tests/golden/types-hole-module-boundary/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-hole-named-complex/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Types and molds: a definition must determine its own type holes.
2+tests: An applied named mold containing a hole must not be repaired by its use; partial analysis may fail closed.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-hole-named-complex/source.jibbnew file+2
@@ -0,0 +1,2 @@
1++$ applied (list _)
2+++ later |= x=applied ^- (list @t) x
tests/golden/types-hole-named-complex/tokens.txtnew file+20
@@ -0,0 +1,20 @@
1+1:1 glyph +$
2+1:4 name applied
3+1:12 glyph (
4+1:13 tight name list
5+1:18 glyph _
6+1:19 tight glyph )
7+2:1 NEWLINE
8+2:1 glyph ++
9+2:4 name later
10+2:10 glyph |=
11+2:13 name x
12+2:14 tight glyph =
13+2:15 tight name applied
14+2:23 glyph ^-
15+2:26 glyph (
16+2:27 tight name list
17+2:32 aura @t
18+2:34 tight glyph )
19+2:36 name x
20+2:37 NEWLINE
tests/golden/types-hole-named-complex/tree.txtnew file+9
@@ -0,0 +1,9 @@
1+(module
2+ (mold 1:1 applied
3+ (apply 1:12 list (hole 1:18)))
4+ (value 2:1 later
5+ (gate 2:10
6+ (face 2:13 x (ref 2:15 applied))
7+ (cast 2:23
8+ (apply 2:26 list (aura 2:32 @t))
9+ (wing 2:36 x)))))
tests/golden/types-hole-named-complex/types.txtnew file+3
@@ -0,0 +1,3 @@
1+partial inference; module not checked
2++$ applied: not checked
3+++ later: sample mold is not supported by partial inference
tests/golden/types-hole-numeric-capture/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Types and molds: a definition must determine its own type holes.
2+tests: Decimal defaults and ordering when a hole shares a written or captured variable, plus discarded pending expressions.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-hole-numeric-capture/source.jibbnew file+19
@@ -0,0 +1,19 @@
1+++ same |= [a=A b=A] a
2+++ independent ^- _ 1
3+++ first |= x=A ^- _ (same x 1)
4+++ second |= x=A ^- _ (same 1 x)
5+++ capture |= x
6+ ++ local ^- _ (same x 1)
7+ ^- @ux x
8+++ local-independent |= x=@t
9+ ++ local ^- _ 1
10+ x
11+++ unresolved-tag
12+ ~& %orphan
13+ ^- _ 1
14+++ discarded-number
15+ ~& 1
16+ ^- _ "hello"
17+++ captured-second |= x
18+ ++ local ^- _ (same 1 x)
19+ ^- @ux x
tests/golden/types-hole-numeric-capture/tokens.txtnew file+127
@@ -0,0 +1,127 @@
1+1:1 glyph ++
2+1:4 name same
3+1:9 glyph |=
4+1:12 glyph [
5+1:13 tight name a
6+1:14 tight glyph =
7+1:15 tight tvar A
8+1:17 name b
9+1:18 tight glyph =
10+1:19 tight tvar A
11+1:20 tight glyph ]
12+1:22 name a
13+2:1 NEWLINE
14+2:1 glyph ++
15+2:4 name independent
16+2:16 glyph ^-
17+2:19 glyph _
18+2:21 lit 1
19+3:1 NEWLINE
20+3:1 glyph ++
21+3:4 name first
22+3:10 glyph |=
23+3:13 name x
24+3:14 tight glyph =
25+3:15 tight tvar A
26+3:17 glyph ^-
27+3:20 glyph _
28+3:22 glyph (
29+3:23 tight name same
30+3:28 name x
31+3:30 lit 1
32+3:31 tight glyph )
33+4:1 NEWLINE
34+4:1 glyph ++
35+4:4 name second
36+4:11 glyph |=
37+4:14 name x
38+4:15 tight glyph =
39+4:16 tight tvar A
40+4:18 glyph ^-
41+4:21 glyph _
42+4:23 glyph (
43+4:24 tight name same
44+4:29 lit 1
45+4:31 name x
46+4:32 tight glyph )
47+5:1 NEWLINE
48+5:1 glyph ++
49+5:4 name capture
50+5:12 glyph |=
51+5:15 name x
52+6:3 INDENT
53+6:3 glyph ++
54+6:6 name local
55+6:12 glyph ^-
56+6:15 glyph _
57+6:17 glyph (
58+6:18 tight name same
59+6:23 name x
60+6:25 lit 1
61+6:26 tight glyph )
62+7:3 NEWLINE
63+7:3 glyph ^-
64+7:6 aura @ux
65+7:10 name x
66+8:1 DEDENT
67+8:1 NEWLINE
68+8:1 glyph ++
69+8:4 name local-independent
70+8:22 glyph |=
71+8:25 name x
72+8:26 tight glyph =
73+8:27 tight aura @t
74+9:3 INDENT
75+9:3 glyph ++
76+9:6 name local
77+9:12 glyph ^-
78+9:15 glyph _
79+9:17 lit 1
80+10:3 NEWLINE
81+10:3 name x
82+11:1 DEDENT
83+11:1 NEWLINE
84+11:1 glyph ++
85+11:4 name unresolved-tag
86+12:3 INDENT
87+12:3 glyph ~&
88+12:6 lit %orphan
89+13:5 INDENT
90+13:5 glyph ^-
91+13:8 glyph _
92+13:10 lit 1
93+14:1 DEDENT
94+14:1 DEDENT
95+14:1 NEWLINE
96+14:1 glyph ++
97+14:4 name discarded-number
98+15:3 INDENT
99+15:3 glyph ~&
100+15:6 lit 1
101+16:5 INDENT
102+16:5 glyph ^-
103+16:8 glyph _
104+16:10 str "hello"
105+17:1 DEDENT
106+17:1 DEDENT
107+17:1 NEWLINE
108+17:1 glyph ++
109+17:4 name captured-second
110+17:20 glyph |=
111+17:23 name x
112+18:3 INDENT
113+18:3 glyph ++
114+18:6 name local
115+18:12 glyph ^-
116+18:15 glyph _
117+18:17 glyph (
118+18:18 tight name same
119+18:23 lit 1
120+18:25 name x
121+18:26 tight glyph )
122+19:3 NEWLINE
123+19:3 glyph ^-
124+19:6 aura @ux
125+19:10 name x
126+19:11 DEDENT
127+19:11 NEWLINE
tests/golden/types-hole-numeric-capture/tree.txtnew file+62
@@ -0,0 +1,62 @@
1+(module
2+ (value 1:1 same
3+ (gate 1:9
4+ (cell 1:12
5+ (face 1:13 a (tvar 1:15 A))
6+ (face 1:17 b (tvar 1:19 A)))
7+ (wing 1:22 a)))
8+ (value 2:1 independent
9+ (cast 2:16 (hole 2:19) (lit 2:21 1)))
10+ (value 3:1 first
11+ (gate 3:10
12+ (face 3:13 x (tvar 3:15 A))
13+ (cast 3:17
14+ (hole 3:20)
15+ (group 3:22
16+ (call 3:23 (wing 3:23 same) (wing 3:28 x) (lit 3:30 1))))))
17+ (value 4:1 second
18+ (gate 4:11
19+ (face 4:14 x (tvar 4:16 A))
20+ (cast 4:18
21+ (hole 4:21)
22+ (group 4:23
23+ (call 4:24 (wing 4:24 same) (lit 4:29 1) (wing 4:31 x))))))
24+ (value 5:1 capture
25+ (gate 5:12
26+ (bind 5:15 x)
27+ (body 6:3
28+ (value 6:3 local
29+ (cast 6:12
30+ (hole 6:15)
31+ (group 6:17
32+ (call 6:18 (wing 6:18 same) (wing 6:23 x) (lit 6:25 1)))))
33+ (cast 7:3 (aura 7:6 @ux) (wing 7:10 x)))))
34+ (value 8:1 local-independent
35+ (gate 8:22
36+ (face 8:25 x (aura 8:27 @t))
37+ (body 9:3
38+ (value 9:3 local
39+ (cast 9:12 (hole 9:15) (lit 9:17 1)))
40+ (wing 10:3 x))))
41+ (value 11:1 unresolved-tag
42+ (body 12:3
43+ (trace 12:3
44+ (lit 12:6 %orphan)
45+ (body 13:5
46+ (cast 13:5 (hole 13:8) (lit 13:10 1))))))
47+ (value 14:1 discarded-number
48+ (body 15:3
49+ (trace 15:3
50+ (lit 15:6 1)
51+ (body 16:5
52+ (cast 16:5 (hole 16:8) (str 16:10 "hello"))))))
53+ (value 17:1 captured-second
54+ (gate 17:20
55+ (bind 17:23 x)
56+ (body 18:3
57+ (value 18:3 local
58+ (cast 18:12
59+ (hole 18:15)
60+ (group 18:17
61+ (call 18:18 (wing 18:18 same) (lit 18:23 1) (wing 18:25 x)))))
62+ (cast 19:3 (aura 19:6 @ux) (wing 19:10 x))))))
tests/golden/types-hole-numeric-capture/types.txtnew file+10
@@ -0,0 +1,10 @@
1+partial inference; module not checked
2+++ same: $-([a=A b=A] A)
3+++ independent: @ud
4+++ first: call constraint is not supported by partial inference
5+++ second: call constraint is not supported by partial inference
6+++ capture: local definitions need unsupported inference
7+++ local-independent: $-(@t @t)
8+++ unresolved-tag: tag needs context in partial inference
9+++ discarded-number: @t
10+++ captured-second: local definitions need unsupported inference
tests/golden/types-hole-unbound-mold/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Types and molds: named molds must determine their own holes.
2+tests: An unbound capital prevents a definite structural-hole error until the invalid mold is otherwise understood.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-hole-unbound-mold/source.jibbnew file+2
@@ -0,0 +1,2 @@
1++$ invalid [left=A right=_]
2+++ later |= x=invalid x
tests/golden/types-hole-unbound-mold/tokens.txtnew file+19
@@ -0,0 +1,19 @@
1+1:1 glyph +$
2+1:4 name invalid
3+1:12 glyph [
4+1:13 tight name left
5+1:17 tight glyph =
6+1:18 tight tvar A
7+1:20 name right
8+1:25 tight glyph =
9+1:26 tight glyph _
10+1:27 tight glyph ]
11+2:1 NEWLINE
12+2:1 glyph ++
13+2:4 name later
14+2:10 glyph |=
15+2:13 name x
16+2:14 tight glyph =
17+2:15 tight name invalid
18+2:23 name x
19+2:24 NEWLINE
tests/golden/types-hole-unbound-mold/tree.txtnew file+9
@@ -0,0 +1,9 @@
1+(module
2+ (mold 1:1 invalid
3+ (cell 1:12
4+ (face 1:13 left (tvar 1:18 A))
5+ (face 1:20 right (hole 1:26))))
6+ (value 2:1 later
7+ (gate 2:10
8+ (face 2:13 x (ref 2:15 invalid))
9+ (wing 2:23 x))))
tests/golden/types-hole-unbound-mold/types.txtnew file+3
@@ -0,0 +1,3 @@
1+partial inference; module not checked
2++$ invalid: not checked
3+++ later: sample mold is not supported by partial inference
tests/golden/types-hole-unsupported/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Types and molds: a value definition must determine its own type holes.
2+tests: An unconstrained sample hole reports its source site, while a cast hole can resolve to @t from its expression.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-hole-unsupported/source.jibbnew file+2
@@ -0,0 +1,2 @@
1+++ identity |= x=_ x
2+++ cast ^- _ "hello"
tests/golden/types-hole-unsupported/tokens.txtnew file+14
@@ -0,0 +1,14 @@
1+1:1 glyph ++
2+1:4 name identity
3+1:13 glyph |=
4+1:16 name x
5+1:17 tight glyph =
6+1:18 tight glyph _
7+1:20 name x
8+2:1 NEWLINE
9+2:1 glyph ++
10+2:4 name cast
11+2:9 glyph ^-
12+2:12 glyph _
13+2:14 str "hello"
14+2:21 NEWLINE
tests/golden/types-hole-unsupported/tree.txtnew file+7
@@ -0,0 +1,7 @@
1+(module
2+ (value 1:1 identity
3+ (gate 1:13
4+ (face 1:16 x (hole 1:18))
5+ (wing 1:20 x)))
6+ (value 2:1 cast
7+ (cast 2:9 (hole 2:12) (str 2:14 "hello"))))
tests/golden/types-hole-unsupported/types.txtnew file+6
@@ -0,0 +1,6 @@
1+partial inference; module not checked
2+++ identity: type hole needs a determined type
3+/tests/golden/types-hole-unsupported/source.jibb:1:18: unresolved type hole
4+++ identity |= x=_ x
5+ ^
6+++ cast: @t
tests/golden/types-hole-user-generic/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Types and molds: a definition must determine its own type holes.
2+tests: The user’s `A` example and independent instantiations; one independent unresolved sample must not disappear.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-hole-user-generic/source.jibbnew file+6
@@ -0,0 +1,6 @@
1+++ id |= x=A ^- _ x
2+++ use-text (id "hello")
3+++ use-ship (id ~zod)
4+++ record |= x=A ^- [value=_] [value=x]
5+++ same |= [a=A b=_] ^- A b
6+++ distinct |= x=A |= y=_ ^- _ x
tests/golden/types-hole-user-generic/tokens.txtnew file+71
@@ -0,0 +1,71 @@
1+1:1 glyph ++
2+1:4 name id
3+1:7 glyph |=
4+1:10 name x
5+1:11 tight glyph =
6+1:12 tight tvar A
7+1:14 glyph ^-
8+1:17 glyph _
9+1:19 name x
10+2:1 NEWLINE
11+2:1 glyph ++
12+2:4 name use-text
13+2:13 glyph (
14+2:14 tight name id
15+2:17 str "hello"
16+2:24 tight glyph )
17+3:1 NEWLINE
18+3:1 glyph ++
19+3:4 name use-ship
20+3:13 glyph (
21+3:14 tight name id
22+3:17 lit ~zod
23+3:21 tight glyph )
24+4:1 NEWLINE
25+4:1 glyph ++
26+4:4 name record
27+4:11 glyph |=
28+4:14 name x
29+4:15 tight glyph =
30+4:16 tight tvar A
31+4:18 glyph ^-
32+4:21 glyph [
33+4:22 tight name value
34+4:27 tight glyph =
35+4:28 tight glyph _
36+4:29 tight glyph ]
37+4:31 glyph [
38+4:32 tight name value
39+4:37 tight glyph =
40+4:38 tight name x
41+4:39 tight glyph ]
42+5:1 NEWLINE
43+5:1 glyph ++
44+5:4 name same
45+5:9 glyph |=
46+5:12 glyph [
47+5:13 tight name a
48+5:14 tight glyph =
49+5:15 tight tvar A
50+5:17 name b
51+5:18 tight glyph =
52+5:19 tight glyph _
53+5:20 tight glyph ]
54+5:22 glyph ^-
55+5:25 tvar A
56+5:27 name b
57+6:1 NEWLINE
58+6:1 glyph ++
59+6:4 name distinct
60+6:13 glyph |=
61+6:16 name x
62+6:17 tight glyph =
63+6:18 tight tvar A
64+6:20 glyph |=
65+6:23 name y
66+6:24 tight glyph =
67+6:25 tight glyph _
68+6:27 glyph ^-
69+6:30 glyph _
70+6:32 name x
71+6:33 NEWLINE
tests/golden/types-hole-user-generic/tree.txtnew file+31
@@ -0,0 +1,31 @@
1+(module
2+ (value 1:1 id
3+ (gate 1:7
4+ (face 1:10 x (tvar 1:12 A))
5+ (cast 1:14 (hole 1:17) (wing 1:19 x))))
6+ (value 2:1 use-text
7+ (group 2:13
8+ (call 2:14 (wing 2:14 id) (str 2:17 "hello"))))
9+ (value 3:1 use-ship
10+ (group 3:13
11+ (call 3:14 (wing 3:14 id) (lit 3:17 ~zod))))
12+ (value 4:1 record
13+ (gate 4:11
14+ (face 4:14 x (tvar 4:16 A))
15+ (cast 4:18
16+ (cell 4:21
17+ (face 4:22 value (hole 4:28)))
18+ (tuple 4:31
19+ (face 4:32 value (wing 4:38 x))))))
20+ (value 5:1 same
21+ (gate 5:9
22+ (cell 5:12
23+ (face 5:13 a (tvar 5:15 A))
24+ (face 5:17 b (hole 5:19)))
25+ (cast 5:22 (tvar 5:25 A) (wing 5:27 b))))
26+ (value 6:1 distinct
27+ (gate 6:13
28+ (face 6:16 x (tvar 6:18 A))
29+ (gate 6:20
30+ (face 6:23 y (hole 6:25))
31+ (cast 6:27 (hole 6:30) (wing 6:32 x))))))
tests/golden/types-hole-user-generic/types.txtnew file+10
@@ -0,0 +1,10 @@
1+partial inference; module not checked
2+++ id: $-(A A)
3+++ use-text: @t
4+++ use-ship: @p
5+++ record: $-(A [value=A])
6+++ same: $-([a=A b=A] A)
7+++ distinct: type hole needs a determined type
8+/tests/golden/types-hole-user-generic/source.jibb:6:25: unresolved type hole
9+++ distinct |= x=A |= y=_ ^- _ x
10+ ^
tests/golden/types-hole-user-named/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Types and molds: a definition must determine its own type holes.
2+tests: The user’s `[item=_]` named mold remains unresolved even if a later use supplies @t.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-hole-user-named/source.jibbnew file+2
@@ -0,0 +1,2 @@
1++$ box [item=_]
2+++ later |= x=box ^- [item=@t] x
tests/golden/types-hole-user-named/tokens.txtnew file+22
@@ -0,0 +1,22 @@
1+1:1 glyph +$
2+1:4 name box
3+1:8 glyph [
4+1:9 tight name item
5+1:13 tight glyph =
6+1:14 tight glyph _
7+1:15 tight glyph ]
8+2:1 NEWLINE
9+2:1 glyph ++
10+2:4 name later
11+2:10 glyph |=
12+2:13 name x
13+2:14 tight glyph =
14+2:15 tight name box
15+2:19 glyph ^-
16+2:22 glyph [
17+2:23 tight name item
18+2:27 tight glyph =
19+2:28 tight aura @t
20+2:30 tight glyph ]
21+2:32 name x
22+2:33 NEWLINE
tests/golden/types-hole-user-named/tree.txtnew file+11
@@ -0,0 +1,11 @@
1+(module
2+ (mold 1:1 box
3+ (cell 1:8
4+ (face 1:9 item (hole 1:14))))
5+ (value 2:1 later
6+ (gate 2:10
7+ (face 2:13 x (ref 2:15 box))
8+ (cast 2:19
9+ (cell 2:22
10+ (face 2:23 item (aura 2:28 @t)))
11+ (wing 2:32 x)))))
tests/golden/types-hole-user-named/types.txtnew file+6
@@ -0,0 +1,6 @@
1+partial inference; module not checked
2++$ box: type hole needs a determined type
3+/tests/golden/types-hole-user-named/source.jibb:1:14: unresolved type hole
4++$ box [item=_]
5+ ^
6+++ later: sample mold is not supported by partial inference
tests/golden/types-hole-user-value/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Types and molds: a definition must determine its own type holes.
2+tests: An identity with an unconstrained hole stays invalid even when a later definition calls it with a cord.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-hole-user-value/source.jibbnew file+3
@@ -0,0 +1,3 @@
1+++ id |= x=_ x
2+++ later (id "hello")
3+++ independent ^- _ "resolved"
tests/golden/types-hole-user-value/tokens.txtnew file+21
@@ -0,0 +1,21 @@
1+1:1 glyph ++
2+1:4 name id
3+1:7 glyph |=
4+1:10 name x
5+1:11 tight glyph =
6+1:12 tight glyph _
7+1:14 name x
8+2:1 NEWLINE
9+2:1 glyph ++
10+2:4 name later
11+2:10 glyph (
12+2:11 tight name id
13+2:14 str "hello"
14+2:21 tight glyph )
15+3:1 NEWLINE
16+3:1 glyph ++
17+3:4 name independent
18+3:16 glyph ^-
19+3:19 glyph _
20+3:21 str "resolved"
21+3:31 NEWLINE
tests/golden/types-hole-user-value/tree.txtnew file+10
@@ -0,0 +1,10 @@
1+(module
2+ (value 1:1 id
3+ (gate 1:7
4+ (face 1:10 x (hole 1:12))
5+ (wing 1:14 x)))
6+ (value 2:1 later
7+ (group 2:10
8+ (call 2:11 (wing 2:11 id) (str 2:14 "hello"))))
9+ (value 3:1 independent
10+ (cast 3:16 (hole 3:19) (str 3:21 "resolved"))))
tests/golden/types-hole-user-value/types.txtnew file+7
@@ -0,0 +1,7 @@
1+partial inference; module not checked
2+++ id: type hole needs a determined type
3+/tests/golden/types-hole-user-value/source.jibb:1:12: unresolved type hole
4+++ id |= x=_ x
5+ ^
6+++ later: name is not available to partial inference
7+++ independent: @t
tests/golden/types-import-tlon-notes/about.txt+1−1
@@ -1,4 +1,4 @@
1source: Overview, Importing Hoon types: Hoon `$%` imports as a union if its cases differ as nouns; unused molds are skipped. Grammar, Literals: `~` is null.
1source: Overview, Importing Hoon types: Hoon `$%` imports as a union if its cases differ as nouns; unused molds are skipped. Grammar, Literals: `~` is null.
2−tests: The unmodified Tlon `desk/sur/notes.hoon` at tloncorp/tlon-apps commit 38f9328f4580000a37a7fdc3ab820fcd65069487 (MIT license in `tests/importer/tlon-license.txt`) has tagged unions with null cases. The real update and action molds reach partial inference. A notebook update and its enclosing record contain one source-proved named union dependency; The `log` ordered map is accepted through its named mold operand, The recursive `import-node` reaches an identity gate as an opaque nominal type; unsupported sibling molds remain unchecked.
2+tests: The unmodified Tlon `desk/sur/notes.hoon` at tloncorp/tlon-apps commit 38f9328f4580000a37a7fdc3ab820fcd65069487 (MIT license in `tests/importer/tlon-license.txt`) has tagged unions with null cases. The real update and action molds reach partial inference. A notebook update and its enclosing record contain one source-proved named union dependency. The `log` ordered map is accepted through its named mold operand. The recursive `import-node` reaches an identity gate as an opaque nominal type; a notebook action preserves that same nested recursive owner. Unsupported sibling molds remain unchecked.
3expect: parses
3expect: parses
4expect-types: a partial inference report
4expect-types: a partial inference report
tests/golden/types-import-tlon-notes/imports.txt+1
@@ -4,3 +4,4 @@ notes u-notebook
4notes u-notes
4notes u-notes
5notes log
5notes log
6notes import-node
6notes import-node
7+notes a-notebook
tests/golden/types-import-tlon-notes/source.jibb+1
@@ -5,3 +5,4 @@
5++ notes-update |= x=u-notes.notes x
5++ notes-update |= x=u-notes.notes x
6++ log-identity |= x=log.notes x
6++ log-identity |= x=log.notes x
7++ import-node-id |= x=import-node.notes x
7++ import-node-id |= x=import-node.notes x
8+++ notebook-action-identity |= x=a-notebook.notes x
tests/golden/types-import-tlon-notes/tokens.txt+9−1
@@ -48,4 +48,12 @@
487:23 tight glyph =
487:23 tight glyph =
497:24 tight wing import-node.notes
497:24 tight wing import-node.notes
507:42 name x
507:42 name x
51−7:43 NEWLINE
51+8:1 NEWLINE
52+8:1 glyph ++
53+8:4 name notebook-action-identity
54+8:29 glyph |=
55+8:32 name x
56+8:33 tight glyph =
57+8:34 tight wing a-notebook.notes
58+8:51 name x
59+8:52 NEWLINE
tests/golden/types-import-tlon-notes/tree.txt+5−1
@@ -23,4 +23,8 @@
23 (value 7:1 import-node-id
23 (value 7:1 import-node-id
24 (gate 7:19
24 (gate 7:19
25 (face 7:22 x (ref 7:24 import-node.notes))
25 (face 7:22 x (ref 7:24 import-node.notes))
26− (wing 7:42 x))))
26+ (wing 7:42 x)))
27+ (value 8:1 notebook-action-identity
28+ (gate 8:29
29+ (face 8:32 x (ref 8:34 a-notebook.notes))
30+ (wing 8:51 x))))
tests/golden/types-import-tlon-notes/types.txt+1
@@ -5,3 +5,4 @@ partial inference; module not checked
5++ notes-update: $-([flag=[ship=@p name=@tas] u-notebook=([%note [id=@ud u-note=([%updated note=[id=@ud [notebook-id=@ud [folder-id=@ud [title=@t [slug=(unit @t) [body-md=@t [created-by=@p [created-at=@da [updated-by=@p [updated-at=@da revision=@ud]]]]]]]]]]] [%created note=[id=@ud [notebook-id=@ud [folder-id=@ud [title=@t [slug=(unit @t) [body-md=@t [created-by=@p [created-at=@da [updated-by=@p [updated-at=@da revision=@ud]]]]]]]]]]] [%deleted ~] [%published html=@t] [%unpublished ~] [%history-archived note-revision=[rev=@ud [at=@da [author=@p [title=@t body-md=@t]]]]])]] [%folder [id=@ud u-folder=([%updated folder=[id=@ud [notebook-id=@ud [name=@t [parent-folder-id=(unit @ud) [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]]]]] [%created folder=[id=@ud [notebook-id=@ud [name=@t [parent-folder-id=(unit @ud) [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]]]]] [%deleted ~])]] [%updated notebook=[id=@ud [title=@t [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]]] [%created [notebook=[id=@ud [title=@t [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]] visibility=(%public %private)]] [%deleted ~] [%visibility visibility=(%public %private)] [%member-left who=@p] [%member-joined [who=@p role=(%owner %viewer %editor)]] [%invite-removed ~] [%invite-received [from=@p title=@t]])] [flag=[ship=@p name=@tas] u-notebook=([%note [id=@ud u-note=([%updated note=[id=@ud [notebook-id=@ud [folder-id=@ud [title=@t [slug=(unit @t) [body-md=@t [created-by=@p [created-at=@da [updated-by=@p [updated-at=@da revision=@ud]]]]]]]]]]] [%created note=[id=@ud [notebook-id=@ud [folder-id=@ud [title=@t [slug=(unit @t) [body-md=@t [created-by=@p [created-at=@da [updated-by=@p [updated-at=@da revision=@ud]]]]]]]]]]] [%deleted ~] [%published html=@t] [%unpublished ~] [%history-archived note-revision=[rev=@ud [at=@da [author=@p [title=@t body-md=@t]]]]])]] [%folder [id=@ud u-folder=([%updated folder=[id=@ud [notebook-id=@ud [name=@t [parent-folder-id=(unit @ud) [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]]]]] [%created folder=[id=@ud [notebook-id=@ud [name=@t [parent-folder-id=(unit @ud) [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]]]]] [%deleted ~])]] [%updated notebook=[id=@ud [title=@t [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]]] [%created [notebook=[id=@ud [title=@t [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]] visibility=(%public %private)]] [%deleted ~] [%visibility visibility=(%public %private)] [%member-left who=@p] [%member-joined [who=@p role=(%owner %viewer %editor)]] [%invite-removed ~] [%invite-received [from=@p title=@t]])])
5++ notes-update: $-([flag=[ship=@p name=@tas] u-notebook=([%note [id=@ud u-note=([%updated note=[id=@ud [notebook-id=@ud [folder-id=@ud [title=@t [slug=(unit @t) [body-md=@t [created-by=@p [created-at=@da [updated-by=@p [updated-at=@da revision=@ud]]]]]]]]]]] [%created note=[id=@ud [notebook-id=@ud [folder-id=@ud [title=@t [slug=(unit @t) [body-md=@t [created-by=@p [created-at=@da [updated-by=@p [updated-at=@da revision=@ud]]]]]]]]]]] [%deleted ~] [%published html=@t] [%unpublished ~] [%history-archived note-revision=[rev=@ud [at=@da [author=@p [title=@t body-md=@t]]]]])]] [%folder [id=@ud u-folder=([%updated folder=[id=@ud [notebook-id=@ud [name=@t [parent-folder-id=(unit @ud) [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]]]]] [%created folder=[id=@ud [notebook-id=@ud [name=@t [parent-folder-id=(unit @ud) [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]]]]] [%deleted ~])]] [%updated notebook=[id=@ud [title=@t [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]]] [%created [notebook=[id=@ud [title=@t [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]] visibility=(%public %private)]] [%deleted ~] [%visibility visibility=(%public %private)] [%member-left who=@p] [%member-joined [who=@p role=(%owner %viewer %editor)]] [%invite-removed ~] [%invite-received [from=@p title=@t]])] [flag=[ship=@p name=@tas] u-notebook=([%note [id=@ud u-note=([%updated note=[id=@ud [notebook-id=@ud [folder-id=@ud [title=@t [slug=(unit @t) [body-md=@t [created-by=@p [created-at=@da [updated-by=@p [updated-at=@da revision=@ud]]]]]]]]]]] [%created note=[id=@ud [notebook-id=@ud [folder-id=@ud [title=@t [slug=(unit @t) [body-md=@t [created-by=@p [created-at=@da [updated-by=@p [updated-at=@da revision=@ud]]]]]]]]]]] [%deleted ~] [%published html=@t] [%unpublished ~] [%history-archived note-revision=[rev=@ud [at=@da [author=@p [title=@t body-md=@t]]]]])]] [%folder [id=@ud u-folder=([%updated folder=[id=@ud [notebook-id=@ud [name=@t [parent-folder-id=(unit @ud) [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]]]]] [%created folder=[id=@ud [notebook-id=@ud [name=@t [parent-folder-id=(unit @ud) [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]]]]] [%deleted ~])]] [%updated notebook=[id=@ud [title=@t [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]]] [%created [notebook=[id=@ud [title=@t [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]] visibility=(%public %private)]] [%deleted ~] [%visibility visibility=(%public %private)] [%member-left who=@p] [%member-joined [who=@p role=(%owner %viewer %editor)]] [%invite-removed ~] [%invite-received [from=@p title=@t]])])
6++ log-identity: $-((mop @da ([%note [id=@ud u-note=([%updated note=[id=@ud [notebook-id=@ud [folder-id=@ud [title=@t [slug=(unit @t) [body-md=@t [created-by=@p [created-at=@da [updated-by=@p [updated-at=@da revision=@ud]]]]]]]]]]] [%created note=[id=@ud [notebook-id=@ud [folder-id=@ud [title=@t [slug=(unit @t) [body-md=@t [created-by=@p [created-at=@da [updated-by=@p [updated-at=@da revision=@ud]]]]]]]]]]] [%deleted ~] [%published html=@t] [%unpublished ~] [%history-archived note-revision=[rev=@ud [at=@da [author=@p [title=@t body-md=@t]]]]])]] [%folder [id=@ud u-folder=([%updated folder=[id=@ud [notebook-id=@ud [name=@t [parent-folder-id=(unit @ud) [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]]]]] [%created folder=[id=@ud [notebook-id=@ud [name=@t [parent-folder-id=(unit @ud) [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]]]]] [%deleted ~])]] [%updated notebook=[id=@ud [title=@t [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]]] [%created [notebook=[id=@ud [title=@t [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]] visibility=(%public %private)]] [%deleted ~] [%visibility visibility=(%public %private)] [%member-left who=@p] [%member-joined [who=@p role=(%owner %viewer %editor)]] [%invite-removed ~] [%invite-received [from=@p title=@t]])) (mop @da ([%note [id=@ud u-note=([%updated note=[id=@ud [notebook-id=@ud [folder-id=@ud [title=@t [slug=(unit @t) [body-md=@t [created-by=@p [created-at=@da [updated-by=@p [updated-at=@da revision=@ud]]]]]]]]]]] [%created note=[id=@ud [notebook-id=@ud [folder-id=@ud [title=@t [slug=(unit @t) [body-md=@t [created-by=@p [created-at=@da [updated-by=@p [updated-at=@da revision=@ud]]]]]]]]]]] [%deleted ~] [%published html=@t] [%unpublished ~] [%history-archived note-revision=[rev=@ud [at=@da [author=@p [title=@t body-md=@t]]]]])]] [%folder [id=@ud u-folder=([%updated folder=[id=@ud [notebook-id=@ud [name=@t [parent-folder-id=(unit @ud) [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]]]]] [%created folder=[id=@ud [notebook-id=@ud [name=@t [parent-folder-id=(unit @ud) [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]]]]] [%deleted ~])]] [%updated notebook=[id=@ud [title=@t [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]]] [%created [notebook=[id=@ud [title=@t [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]] visibility=(%public %private)]] [%deleted ~] [%visibility visibility=(%public %private)] [%member-left who=@p] [%member-joined [who=@p role=(%owner %viewer %editor)]] [%invite-removed ~] [%invite-received [from=@p title=@t]])))
6++ log-identity: $-((mop @da ([%note [id=@ud u-note=([%updated note=[id=@ud [notebook-id=@ud [folder-id=@ud [title=@t [slug=(unit @t) [body-md=@t [created-by=@p [created-at=@da [updated-by=@p [updated-at=@da revision=@ud]]]]]]]]]]] [%created note=[id=@ud [notebook-id=@ud [folder-id=@ud [title=@t [slug=(unit @t) [body-md=@t [created-by=@p [created-at=@da [updated-by=@p [updated-at=@da revision=@ud]]]]]]]]]]] [%deleted ~] [%published html=@t] [%unpublished ~] [%history-archived note-revision=[rev=@ud [at=@da [author=@p [title=@t body-md=@t]]]]])]] [%folder [id=@ud u-folder=([%updated folder=[id=@ud [notebook-id=@ud [name=@t [parent-folder-id=(unit @ud) [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]]]]] [%created folder=[id=@ud [notebook-id=@ud [name=@t [parent-folder-id=(unit @ud) [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]]]]] [%deleted ~])]] [%updated notebook=[id=@ud [title=@t [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]]] [%created [notebook=[id=@ud [title=@t [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]] visibility=(%public %private)]] [%deleted ~] [%visibility visibility=(%public %private)] [%member-left who=@p] [%member-joined [who=@p role=(%owner %viewer %editor)]] [%invite-removed ~] [%invite-received [from=@p title=@t]])) (mop @da ([%note [id=@ud u-note=([%updated note=[id=@ud [notebook-id=@ud [folder-id=@ud [title=@t [slug=(unit @t) [body-md=@t [created-by=@p [created-at=@da [updated-by=@p [updated-at=@da revision=@ud]]]]]]]]]]] [%created note=[id=@ud [notebook-id=@ud [folder-id=@ud [title=@t [slug=(unit @t) [body-md=@t [created-by=@p [created-at=@da [updated-by=@p [updated-at=@da revision=@ud]]]]]]]]]]] [%deleted ~] [%published html=@t] [%unpublished ~] [%history-archived note-revision=[rev=@ud [at=@da [author=@p [title=@t body-md=@t]]]]])]] [%folder [id=@ud u-folder=([%updated folder=[id=@ud [notebook-id=@ud [name=@t [parent-folder-id=(unit @ud) [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]]]]] [%created folder=[id=@ud [notebook-id=@ud [name=@t [parent-folder-id=(unit @ud) [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]]]]] [%deleted ~])]] [%updated notebook=[id=@ud [title=@t [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]]] [%created [notebook=[id=@ud [title=@t [created-by=@p [created-at=@da [updated-at=@da updated-by=@p]]]]] visibility=(%public %private)]] [%deleted ~] [%visibility visibility=(%public %private)] [%member-left who=@p] [%member-joined [who=@p role=(%owner %viewer %editor)]] [%invite-removed ~] [%invite-received [from=@p title=@t]])))
7++ import-node-id: $-(import-node.notes import-node.notes)
7++ import-node-id: $-(import-node.notes import-node.notes)
8+++ notebook-action-identity: $-(([%note [id=@ud a-note=([%move folder=@ud] [%rename title=@t] [%update [body=@t expected-revision=@ud]] [%delete ~] [%modify [title=(unit @t) folder=(unit @ud)]] [%restore rev=@ud] [%publish html=@t] [%unpublish ~])]] [%rename title=@t] [%delete ~] [%invite who=@p] [%folder [id=@ud a-folder=([%move new-parent=@ud] [%rename name=@t] [%update [name=(unit @t) parent=(unit @ud)]] [%delete recursive=?])]] [%visibility visibility=(%public %private)] [%create-note [folder=@ud [title=@t body=@t]]] [%batch-import [folder=@ud notes=(list [title=@t body=@t])]] [%create-folder [parent=@ud name=@t]] [%batch-import-tree [parent=@ud tree=(list import-node.notes)]]) ([%note [id=@ud a-note=([%move folder=@ud] [%rename title=@t] [%update [body=@t expected-revision=@ud]] [%delete ~] [%modify [title=(unit @t) folder=(unit @ud)]] [%restore rev=@ud] [%publish html=@t] [%unpublish ~])]] [%rename title=@t] [%delete ~] [%invite who=@p] [%folder [id=@ud a-folder=([%move new-parent=@ud] [%rename name=@t] [%update [name=(unit @t) parent=(unit @ud)]] [%delete recursive=?])]] [%visibility visibility=(%public %private)] [%create-note [folder=@ud [title=@t body=@t]]] [%batch-import [folder=@ud notes=(list [title=@t body=@t])]] [%create-folder [parent=@ud name=@t]] [%batch-import-tree [parent=@ud tree=(list import-node.notes)]]))
tests/golden/types-literal-constructor-nouns/about.txtnew file+2
@@ -0,0 +1,2 @@
1+source: equality of literal molds is based on their runtime nouns.
2+tests: The `%$` constructor matches null-, loobean-zero- and term-zero-headed cells. Overlapping same-noun cases are rejected. Wrong payload, absent tags and unrelated pending constraints remain checked. This is a partial inference report.
tests/golden/types-literal-constructor-nouns/source.jibbnew file+25
@@ -0,0 +1,25 @@
1++$ null-head [~ value=@t]
2++$ flag-head [%.y value=@t]
3++$ dollar-head [%$ value=@t]
4++$ pair-null
5+ ~
6+ [~ value=@t]
7++$ overlap-null
8+ [~ value=@t]
9+ [%$ value=@t]
10++$ overlap-flag
11+ [%.y value=@t]
12+ [%$ value=@t]
13++$ overlap-three
14+ [~ value=@t]
15+ [%.y value=@t]
16+ [%$ value=@t]
17+++ null-ctor ^- $-(@t null-head) |=%$
18+++ flag-ctor ^- $-(@t flag-head) |=%$
19+++ dollar-ctor ^- $-(@t dollar-head) |=%$
20+++ unit-like-ctor ^- $-(@t pair-null) |=%$
21+++ wrong-payload ^- $-(@p null-head) |=%$
22+++ missing-tag ^- $-(@t null-head) |=%missing
23+++ pending
24+ ~& %unrelated
25+ ^- $-(@t null-head) |=%$
tests/golden/types-literal-constructor-nouns/tokens.txtnew file+177
@@ -0,0 +1,177 @@
1+1:1 glyph +$
2+1:4 name null-head
3+1:14 glyph [
4+1:15 tight lit ~
5+1:17 name value
6+1:22 tight glyph =
7+1:23 tight aura @t
8+1:25 tight glyph ]
9+2:1 NEWLINE
10+2:1 glyph +$
11+2:4 name flag-head
12+2:14 glyph [
13+2:15 tight lit %.y
14+2:19 name value
15+2:24 tight glyph =
16+2:25 tight aura @t
17+2:27 tight glyph ]
18+3:1 NEWLINE
19+3:1 glyph +$
20+3:4 name dollar-head
21+3:16 glyph [
22+3:17 tight lit %$
23+3:20 name value
24+3:25 tight glyph =
25+3:26 tight aura @t
26+3:28 tight glyph ]
27+4:1 NEWLINE
28+4:1 glyph +$
29+4:4 name pair-null
30+5:3 INDENT
31+5:3 lit ~
32+6:3 NEWLINE
33+6:3 glyph [
34+6:4 tight lit ~
35+6:6 name value
36+6:11 tight glyph =
37+6:12 tight aura @t
38+6:14 tight glyph ]
39+7:1 DEDENT
40+7:1 NEWLINE
41+7:1 glyph +$
42+7:4 name overlap-null
43+8:3 INDENT
44+8:3 glyph [
45+8:4 tight lit ~
46+8:6 name value
47+8:11 tight glyph =
48+8:12 tight aura @t
49+8:14 tight glyph ]
50+9:3 NEWLINE
51+9:3 glyph [
52+9:4 tight lit %$
53+9:7 name value
54+9:12 tight glyph =
55+9:13 tight aura @t
56+9:15 tight glyph ]
57+10:1 DEDENT
58+10:1 NEWLINE
59+10:1 glyph +$
60+10:4 name overlap-flag
61+11:3 INDENT
62+11:3 glyph [
63+11:4 tight lit %.y
64+11:8 name value
65+11:13 tight glyph =
66+11:14 tight aura @t
67+11:16 tight glyph ]
68+12:3 NEWLINE
69+12:3 glyph [
70+12:4 tight lit %$
71+12:7 name value
72+12:12 tight glyph =
73+12:13 tight aura @t
74+12:15 tight glyph ]
75+13:1 DEDENT
76+13:1 NEWLINE
77+13:1 glyph +$
78+13:4 name overlap-three
79+14:3 INDENT
80+14:3 glyph [
81+14:4 tight lit ~
82+14:6 name value
83+14:11 tight glyph =
84+14:12 tight aura @t
85+14:14 tight glyph ]
86+15:3 NEWLINE
87+15:3 glyph [
88+15:4 tight lit %.y
89+15:8 name value
90+15:13 tight glyph =
91+15:14 tight aura @t
92+15:16 tight glyph ]
93+16:3 NEWLINE
94+16:3 glyph [
95+16:4 tight lit %$
96+16:7 name value
97+16:12 tight glyph =
98+16:13 tight aura @t
99+16:15 tight glyph ]
100+17:1 DEDENT
101+17:1 NEWLINE
102+17:1 glyph ++
103+17:4 name null-ctor
104+17:14 glyph ^-
105+17:17 glyph $-(
106+17:20 tight aura @t
107+17:23 name null-head
108+17:32 tight glyph )
109+17:34 glyph |=
110+17:36 tight lit %$
111+18:1 NEWLINE
112+18:1 glyph ++
113+18:4 name flag-ctor
114+18:14 glyph ^-
115+18:17 glyph $-(
116+18:20 tight aura @t
117+18:23 name flag-head
118+18:32 tight glyph )
119+18:34 glyph |=
120+18:36 tight lit %$
121+19:1 NEWLINE
122+19:1 glyph ++
123+19:4 name dollar-ctor
124+19:16 glyph ^-
125+19:19 glyph $-(
126+19:22 tight aura @t
127+19:25 name dollar-head
128+19:36 tight glyph )
129+19:38 glyph |=
130+19:40 tight lit %$
131+20:1 NEWLINE
132+20:1 glyph ++
133+20:4 name unit-like-ctor
134+20:19 glyph ^-
135+20:22 glyph $-(
136+20:25 tight aura @t
137+20:28 name pair-null
138+20:37 tight glyph )
139+20:39 glyph |=
140+20:41 tight lit %$
141+21:1 NEWLINE
142+21:1 glyph ++
143+21:4 name wrong-payload
144+21:18 glyph ^-
145+21:21 glyph $-(
146+21:24 tight aura @p
147+21:27 name null-head
148+21:36 tight glyph )
149+21:38 glyph |=
150+21:40 tight lit %$
151+22:1 NEWLINE
152+22:1 glyph ++
153+22:4 name missing-tag
154+22:16 glyph ^-
155+22:19 glyph $-(
156+22:22 tight aura @t
157+22:25 name null-head
158+22:34 tight glyph )
159+22:36 glyph |=
160+22:38 tight lit %missing
161+23:1 NEWLINE
162+23:1 glyph ++
163+23:4 name pending
164+24:3 INDENT
165+24:3 glyph ~&
166+24:6 lit %unrelated
167+25:5 INDENT
168+25:5 glyph ^-
169+25:8 glyph $-(
170+25:11 tight aura @t
171+25:14 name null-head
172+25:23 tight glyph )
173+25:25 glyph |=
174+25:27 tight lit %$
175+25:29 DEDENT
176+25:29 DEDENT
177+25:29 NEWLINE
tests/golden/types-literal-constructor-nouns/tree.txtnew file+78
@@ -0,0 +1,78 @@
1+(module
2+ (mold 1:1 null-head
3+ (cell 1:14
4+ (const 1:15 ~)
5+ (face 1:17 value (aura 1:23 @t))))
6+ (mold 2:1 flag-head
7+ (cell 2:14
8+ (const 2:15 %.y)
9+ (face 2:19 value (aura 2:25 @t))))
10+ (mold 3:1 dollar-head
11+ (cell 3:16
12+ (const 3:17 %$)
13+ (face 3:20 value (aura 3:26 @t))))
14+ (mold 4:1 pair-null
15+ (union 5:3
16+ (const 5:3 ~)
17+ (cell 6:3
18+ (const 6:4 ~)
19+ (face 6:6 value (aura 6:12 @t)))))
20+ (mold 7:1 overlap-null
21+ (union 8:3
22+ (cell 8:3
23+ (const 8:4 ~)
24+ (face 8:6 value (aura 8:12 @t)))
25+ (cell 9:3
26+ (const 9:4 %$)
27+ (face 9:7 value (aura 9:13 @t)))))
28+ (mold 10:1 overlap-flag
29+ (union 11:3
30+ (cell 11:3
31+ (const 11:4 %.y)
32+ (face 11:8 value (aura 11:14 @t)))
33+ (cell 12:3
34+ (const 12:4 %$)
35+ (face 12:7 value (aura 12:13 @t)))))
36+ (mold 13:1 overlap-three
37+ (union 14:3
38+ (cell 14:3
39+ (const 14:4 ~)
40+ (face 14:6 value (aura 14:12 @t)))
41+ (cell 15:3
42+ (const 15:4 %.y)
43+ (face 15:8 value (aura 15:14 @t)))
44+ (cell 16:3
45+ (const 16:4 %$)
46+ (face 16:7 value (aura 16:13 @t)))))
47+ (value 17:1 null-ctor
48+ (cast 17:14
49+ (fn 17:17 (aura 17:20 @t) (ref 17:23 null-head))
50+ (ctor 17:34 %$)))
51+ (value 18:1 flag-ctor
52+ (cast 18:14
53+ (fn 18:17 (aura 18:20 @t) (ref 18:23 flag-head))
54+ (ctor 18:34 %$)))
55+ (value 19:1 dollar-ctor
56+ (cast 19:16
57+ (fn 19:19 (aura 19:22 @t) (ref 19:25 dollar-head))
58+ (ctor 19:38 %$)))
59+ (value 20:1 unit-like-ctor
60+ (cast 20:19
61+ (fn 20:22 (aura 20:25 @t) (ref 20:28 pair-null))
62+ (ctor 20:39 %$)))
63+ (value 21:1 wrong-payload
64+ (cast 21:18
65+ (fn 21:21 (aura 21:24 @p) (ref 21:27 null-head))
66+ (ctor 21:38 %$)))
67+ (value 22:1 missing-tag
68+ (cast 22:16
69+ (fn 22:19 (aura 22:22 @t) (ref 22:25 null-head))
70+ (ctor 22:36 %missing)))
71+ (value 23:1 pending
72+ (body 24:3
73+ (trace 24:3
74+ (lit 24:6 %unrelated)
75+ (body 25:5
76+ (cast 25:5
77+ (fn 25:8 (aura 25:11 @t) (ref 25:14 null-head))
78+ (ctor 25:25 %$)))))))
tests/golden/types-literal-constructor-nouns/types.txtnew file+45
@@ -0,0 +1,45 @@
1+partial inference; module not checked
2++$ null-head: not checked
3++$ flag-head: not checked
4++$ dollar-head: not checked
5++$ pair-null: cases proven disjoint; mold not checked
6++$ overlap-null: overlapping cases; mold not checked
7+/tests/golden/types-literal-constructor-nouns/source.jibb:8:3: first union case
8+ [~ value=@t]
9+ ^
10+/tests/golden/types-literal-constructor-nouns/source.jibb:9:3: overlapping case
11+ [%$ value=@t]
12+ ^
13++$ overlap-flag: overlapping cases; mold not checked
14+/tests/golden/types-literal-constructor-nouns/source.jibb:11:3: first union case
15+ [%.y value=@t]
16+ ^
17+/tests/golden/types-literal-constructor-nouns/source.jibb:12:3: overlapping case
18+ [%$ value=@t]
19+ ^
20++$ overlap-three: overlapping cases; mold not checked
21+/tests/golden/types-literal-constructor-nouns/source.jibb:14:3: first union case
22+ [~ value=@t]
23+ ^
24+/tests/golden/types-literal-constructor-nouns/source.jibb:15:3: overlapping case
25+ [%.y value=@t]
26+ ^
27+++ null-ctor: $-(@t [~ value=@t])
28+++ flag-ctor: $-(@t [%.y value=@t])
29+++ dollar-ctor: $-(@t [%$ value=@t])
30+++ unit-like-ctor: $-(@t pair-null)
31+++ wrong-payload: cast mold and expression type do not unify
32+/tests/golden/types-literal-constructor-nouns/source.jibb:21:21: cast mold has type $-(@p [~ value=@t])
33+++ wrong-payload ^- $-(@p null-head) |=%$
34+ ^
35+/tests/golden/types-literal-constructor-nouns/source.jibb:21:38: expression
36+++ wrong-payload ^- $-(@p null-head) |=%$
37+ ^
38+++ missing-tag: cast mold and expression type do not unify
39+/tests/golden/types-literal-constructor-nouns/source.jibb:22:19: cast mold has type $-(@t [~ value=@t])
40+++ missing-tag ^- $-(@t null-head) |=%missing
41+ ^
42+/tests/golden/types-literal-constructor-nouns/source.jibb:22:36: expression
43+++ missing-tag ^- $-(@t null-head) |=%missing
44+ ^
45+++ pending: tag needs context in partial inference
tests/golden/types-loobean-singleton-source/about.txtnew file+2
@@ -0,0 +1,2 @@
1+source: literal equality uses runtime nouns while typed aura constraints remain directional.
2+tests: Loobean singleton molds and equal-noun terms, wrong singleton, ordinary loobean widening to ? and @, invalid widening to typed auras, and constructor matching a loobean-headed case. This is a partial inference report.
tests/golden/types-loobean-singleton-source/source.jibbnew file+22
@@ -0,0 +1,22 @@
1++$ yes %.y
2++$ no %.n
3++$ flag-headed [%.y value=@t]
4+++ yes-flag ^- yes %.y
5+++ yes-term ^- yes %$
6+++ wrong-flag ^- yes %.n
7+++ normal-flag ^- ? %.y
8+++ normal-any ^- @ %.y
9+++ wrong-tas ^- @tas %.y
10+++ wrong-ta ^- @ta %.y
11+++ wrong-ud ^- @ud %.y
12+++ named-value ^- yes %.y
13+++ named-as-flag ^- ? named-value
14+++ named-as-any ^- @ named-value
15+++ named-as-tas ^- @tas named-value
16+++ named-as-ta ^- @ta named-value
17+++ named-as-ud ^- @ud named-value
18+++ loobean-constructor ^- $-(@t flag-headed) |=%$
19+++ literal-f ^- @f %.y
20+++ flag-f |= b=? ^- @f b
21+++ named-f ^- @f named-value
22+++ explicit-tag ^- @tas (^- %$ %.y)
tests/golden/types-loobean-singleton-source/tokens.txtnew file+143
@@ -0,0 +1,143 @@
1+1:1 glyph +$
2+1:4 name yes
3+1:8 lit %.y
4+2:1 NEWLINE
5+2:1 glyph +$
6+2:4 name no
7+2:7 lit %.n
8+3:1 NEWLINE
9+3:1 glyph +$
10+3:4 name flag-headed
11+3:16 glyph [
12+3:17 tight lit %.y
13+3:21 name value
14+3:26 tight glyph =
15+3:27 tight aura @t
16+3:29 tight glyph ]
17+4:1 NEWLINE
18+4:1 glyph ++
19+4:4 name yes-flag
20+4:13 glyph ^-
21+4:16 name yes
22+4:20 lit %.y
23+5:1 NEWLINE
24+5:1 glyph ++
25+5:4 name yes-term
26+5:13 glyph ^-
27+5:16 name yes
28+5:20 lit %$
29+6:1 NEWLINE
30+6:1 glyph ++
31+6:4 name wrong-flag
32+6:15 glyph ^-
33+6:18 name yes
34+6:22 lit %.n
35+7:1 NEWLINE
36+7:1 glyph ++
37+7:4 name normal-flag
38+7:16 glyph ^-
39+7:19 glyph ?
40+7:21 lit %.y
41+8:1 NEWLINE
42+8:1 glyph ++
43+8:4 name normal-any
44+8:15 glyph ^-
45+8:18 aura @
46+8:20 lit %.y
47+9:1 NEWLINE
48+9:1 glyph ++
49+9:4 name wrong-tas
50+9:14 glyph ^-
51+9:17 aura @tas
52+9:22 lit %.y
53+10:1 NEWLINE
54+10:1 glyph ++
55+10:4 name wrong-ta
56+10:13 glyph ^-
57+10:16 aura @ta
58+10:20 lit %.y
59+11:1 NEWLINE
60+11:1 glyph ++
61+11:4 name wrong-ud
62+11:13 glyph ^-
63+11:16 aura @ud
64+11:20 lit %.y
65+12:1 NEWLINE
66+12:1 glyph ++
67+12:4 name named-value
68+12:16 glyph ^-
69+12:19 name yes
70+12:23 lit %.y
71+13:1 NEWLINE
72+13:1 glyph ++
73+13:4 name named-as-flag
74+13:18 glyph ^-
75+13:21 glyph ?
76+13:23 name named-value
77+14:1 NEWLINE
78+14:1 glyph ++
79+14:4 name named-as-any
80+14:17 glyph ^-
81+14:20 aura @
82+14:22 name named-value
83+15:1 NEWLINE
84+15:1 glyph ++
85+15:4 name named-as-tas
86+15:17 glyph ^-
87+15:20 aura @tas
88+15:25 name named-value
89+16:1 NEWLINE
90+16:1 glyph ++
91+16:4 name named-as-ta
92+16:16 glyph ^-
93+16:19 aura @ta
94+16:23 name named-value
95+17:1 NEWLINE
96+17:1 glyph ++
97+17:4 name named-as-ud
98+17:16 glyph ^-
99+17:19 aura @ud
100+17:23 name named-value
101+18:1 NEWLINE
102+18:1 glyph ++
103+18:4 name loobean-constructor
104+18:24 glyph ^-
105+18:27 glyph $-(
106+18:30 tight aura @t
107+18:33 name flag-headed
108+18:44 tight glyph )
109+18:46 glyph |=
110+18:48 tight lit %$
111+19:1 NEWLINE
112+19:1 glyph ++
113+19:4 name literal-f
114+19:14 glyph ^-
115+19:17 aura @f
116+19:20 lit %.y
117+20:1 NEWLINE
118+20:1 glyph ++
119+20:4 name flag-f
120+20:11 glyph |=
121+20:14 name b
122+20:15 tight glyph =
123+20:16 tight glyph ?
124+20:18 glyph ^-
125+20:21 aura @f
126+20:24 name b
127+21:1 NEWLINE
128+21:1 glyph ++
129+21:4 name named-f
130+21:12 glyph ^-
131+21:15 aura @f
132+21:18 name named-value
133+22:1 NEWLINE
134+22:1 glyph ++
135+22:4 name explicit-tag
136+22:17 glyph ^-
137+22:20 aura @tas
138+22:25 glyph (
139+22:26 tight glyph ^-
140+22:29 lit %$
141+22:32 lit %.y
142+22:35 tight glyph )
143+22:36 NEWLINE
tests/golden/types-loobean-singleton-source/tree.txtnew file+52
@@ -0,0 +1,52 @@
1+(module
2+ (mold 1:1 yes (const 1:8 %.y))
3+ (mold 2:1 no (const 2:7 %.n))
4+ (mold 3:1 flag-headed
5+ (cell 3:16
6+ (const 3:17 %.y)
7+ (face 3:21 value (aura 3:27 @t))))
8+ (value 4:1 yes-flag
9+ (cast 4:13 (ref 4:16 yes) (lit 4:20 %.y)))
10+ (value 5:1 yes-term
11+ (cast 5:13 (ref 5:16 yes) (lit 5:20 %$)))
12+ (value 6:1 wrong-flag
13+ (cast 6:15 (ref 6:18 yes) (lit 6:22 %.n)))
14+ (value 7:1 normal-flag
15+ (cast 7:16 (flag 7:19) (lit 7:21 %.y)))
16+ (value 8:1 normal-any
17+ (cast 8:15 (aura 8:18 @) (lit 8:20 %.y)))
18+ (value 9:1 wrong-tas
19+ (cast 9:14 (aura 9:17 @tas) (lit 9:22 %.y)))
20+ (value 10:1 wrong-ta
21+ (cast 10:13 (aura 10:16 @ta) (lit 10:20 %.y)))
22+ (value 11:1 wrong-ud
23+ (cast 11:13 (aura 11:16 @ud) (lit 11:20 %.y)))
24+ (value 12:1 named-value
25+ (cast 12:16 (ref 12:19 yes) (lit 12:23 %.y)))
26+ (value 13:1 named-as-flag
27+ (cast 13:18 (flag 13:21) (wing 13:23 named-value)))
28+ (value 14:1 named-as-any
29+ (cast 14:17 (aura 14:20 @) (wing 14:22 named-value)))
30+ (value 15:1 named-as-tas
31+ (cast 15:17 (aura 15:20 @tas) (wing 15:25 named-value)))
32+ (value 16:1 named-as-ta
33+ (cast 16:16 (aura 16:19 @ta) (wing 16:23 named-value)))
34+ (value 17:1 named-as-ud
35+ (cast 17:16 (aura 17:19 @ud) (wing 17:23 named-value)))
36+ (value 18:1 loobean-constructor
37+ (cast 18:24
38+ (fn 18:27 (aura 18:30 @t) (ref 18:33 flag-headed))
39+ (ctor 18:46 %$)))
40+ (value 19:1 literal-f
41+ (cast 19:14 (aura 19:17 @f) (lit 19:20 %.y)))
42+ (value 20:1 flag-f
43+ (gate 20:11
44+ (face 20:14 b (flag 20:16))
45+ (cast 20:18 (aura 20:21 @f) (wing 20:24 b))))
46+ (value 21:1 named-f
47+ (cast 21:12 (aura 21:15 @f) (wing 21:18 named-value)))
48+ (value 22:1 explicit-tag
49+ (cast 22:17
50+ (aura 22:20 @tas)
51+ (group 22:25
52+ (cast 22:26 (const 22:29 %$) (lit 22:32 %.y))))))
tests/golden/types-loobean-singleton-source/types.txtnew file+65
@@ -0,0 +1,65 @@
1+partial inference; module not checked
2++$ yes: not checked
3++$ no: not checked
4++$ flag-headed: not checked
5+++ yes-flag: %.y
6+++ yes-term: %.y
7+++ wrong-flag: cast mold and expression type do not unify
8+/tests/golden/types-loobean-singleton-source/source.jibb:6:18: cast mold has type %.y
9+++ wrong-flag ^- yes %.n
10+ ^
11+/tests/golden/types-loobean-singleton-source/source.jibb:6:22: expression has type %.n
12+++ wrong-flag ^- yes %.n
13+ ^
14+++ normal-flag: ?
15+++ normal-any: @
16+++ wrong-tas: cast mold and expression type do not unify
17+/tests/golden/types-loobean-singleton-source/source.jibb:9:17: cast mold has type @tas
18+++ wrong-tas ^- @tas %.y
19+ ^
20+/tests/golden/types-loobean-singleton-source/source.jibb:9:22: expression has type ?
21+++ wrong-tas ^- @tas %.y
22+ ^
23+++ wrong-ta: cast mold and expression type do not unify
24+/tests/golden/types-loobean-singleton-source/source.jibb:10:16: cast mold has type @ta
25+++ wrong-ta ^- @ta %.y
26+ ^
27+/tests/golden/types-loobean-singleton-source/source.jibb:10:20: expression has type ?
28+++ wrong-ta ^- @ta %.y
29+ ^
30+++ wrong-ud: cast mold and expression type do not unify
31+/tests/golden/types-loobean-singleton-source/source.jibb:11:16: cast mold has type @ud
32+++ wrong-ud ^- @ud %.y
33+ ^
34+/tests/golden/types-loobean-singleton-source/source.jibb:11:20: expression has type ?
35+++ wrong-ud ^- @ud %.y
36+ ^
37+++ named-value: %.y
38+++ named-as-flag: ?
39+++ named-as-any: @
40+++ named-as-tas: cast mold and expression type do not unify
41+/tests/golden/types-loobean-singleton-source/source.jibb:15:20: cast mold has type @tas
42+++ named-as-tas ^- @tas named-value
43+ ^
44+/tests/golden/types-loobean-singleton-source/source.jibb:15:25: expression has type %.y
45+++ named-as-tas ^- @tas named-value
46+ ^
47+++ named-as-ta: cast mold and expression type do not unify
48+/tests/golden/types-loobean-singleton-source/source.jibb:16:19: cast mold has type @ta
49+++ named-as-ta ^- @ta named-value
50+ ^
51+/tests/golden/types-loobean-singleton-source/source.jibb:16:23: expression has type %.y
52+++ named-as-ta ^- @ta named-value
53+ ^
54+++ named-as-ud: cast mold and expression type do not unify
55+/tests/golden/types-loobean-singleton-source/source.jibb:17:19: cast mold has type @ud
56+++ named-as-ud ^- @ud named-value
57+ ^
58+/tests/golden/types-loobean-singleton-source/source.jibb:17:23: expression has type %.y
59+++ named-as-ud ^- @ud named-value
60+ ^
61+++ loobean-constructor: $-(@t [%.y value=@t])
62+++ literal-f: cast constraint is not supported by partial inference
63+++ flag-f: cast constraint is not supported by partial inference
64+++ named-f: cast constraint is not supported by partial inference
65+++ explicit-tag: @tas
tests/golden/types-loobean-union-context/about.txtnew file+2
@@ -0,0 +1,2 @@
1+source: literal singleton cases compare by runtime noun.
2+tests: Null, term-zero and loobean singleton contexts across direct unions; unequal values, overlapping singleton cases, unknown targets and pending constraints.
tests/golden/types-loobean-union-context/source.jibbnew file+28
@@ -0,0 +1,28 @@
1++$ maybe
2+ ~
3+ [~ value=@t]
4++$ term-zero
5+ %$
6+ [%some value=@t]
7++$ flag-zero
8+ %.y
9+ [%some value=@t]
10++$ repeated
11+ ~
12+ %.y
13++$ number-one
14+ %.n
15+ [%some value=@t]
16+++ as-null ^- maybe %.y
17+++ bad-null ^- maybe %.n
18+++ null-as-term ^- term-zero ~
19+++ flag-as-term ^- term-zero %.y
20+++ term-as-flag ^- flag-zero %$
21+++ null-as-flag ^- flag-zero ~
22+++ yes-as-flag ^- flag-zero %.y
23+++ no-as-one ^- number-one %.n
24+++ no-as-zero ^- flag-zero %.n
25+++ pending
26+ ~& %unrelated
27+ ^- maybe %.y
28+++ unknown |= x=A ^- A %.y
tests/golden/types-loobean-union-context/tokens.txtnew file+136
@@ -0,0 +1,136 @@
1+1:1 glyph +$
2+1:4 name maybe
3+2:3 INDENT
4+2:3 lit ~
5+3:3 NEWLINE
6+3:3 glyph [
7+3:4 tight lit ~
8+3:6 name value
9+3:11 tight glyph =
10+3:12 tight aura @t
11+3:14 tight glyph ]
12+4:1 DEDENT
13+4:1 NEWLINE
14+4:1 glyph +$
15+4:4 name term-zero
16+5:3 INDENT
17+5:3 lit %$
18+6:3 NEWLINE
19+6:3 glyph [
20+6:4 tight lit %some
21+6:10 name value
22+6:15 tight glyph =
23+6:16 tight aura @t
24+6:18 tight glyph ]
25+7:1 DEDENT
26+7:1 NEWLINE
27+7:1 glyph +$
28+7:4 name flag-zero
29+8:3 INDENT
30+8:3 lit %.y
31+9:3 NEWLINE
32+9:3 glyph [
33+9:4 tight lit %some
34+9:10 name value
35+9:15 tight glyph =
36+9:16 tight aura @t
37+9:18 tight glyph ]
38+10:1 DEDENT
39+10:1 NEWLINE
40+10:1 glyph +$
41+10:4 name repeated
42+11:3 INDENT
43+11:3 lit ~
44+12:3 NEWLINE
45+12:3 lit %.y
46+13:1 DEDENT
47+13:1 NEWLINE
48+13:1 glyph +$
49+13:4 name number-one
50+14:3 INDENT
51+14:3 lit %.n
52+15:3 NEWLINE
53+15:3 glyph [
54+15:4 tight lit %some
55+15:10 name value
56+15:15 tight glyph =
57+15:16 tight aura @t
58+15:18 tight glyph ]
59+16:1 DEDENT
60+16:1 NEWLINE
61+16:1 glyph ++
62+16:4 name as-null
63+16:12 glyph ^-
64+16:15 name maybe
65+16:21 lit %.y
66+17:1 NEWLINE
67+17:1 glyph ++
68+17:4 name bad-null
69+17:13 glyph ^-
70+17:16 name maybe
71+17:22 lit %.n
72+18:1 NEWLINE
73+18:1 glyph ++
74+18:4 name null-as-term
75+18:17 glyph ^-
76+18:20 name term-zero
77+18:30 lit ~
78+19:1 NEWLINE
79+19:1 glyph ++
80+19:4 name flag-as-term
81+19:17 glyph ^-
82+19:20 name term-zero
83+19:30 lit %.y
84+20:1 NEWLINE
85+20:1 glyph ++
86+20:4 name term-as-flag
87+20:17 glyph ^-
88+20:20 name flag-zero
89+20:30 lit %$
90+21:1 NEWLINE
91+21:1 glyph ++
92+21:4 name null-as-flag
93+21:17 glyph ^-
94+21:20 name flag-zero
95+21:30 lit ~
96+22:1 NEWLINE
97+22:1 glyph ++
98+22:4 name yes-as-flag
99+22:16 glyph ^-
100+22:19 name flag-zero
101+22:29 lit %.y
102+23:1 NEWLINE
103+23:1 glyph ++
104+23:4 name no-as-one
105+23:14 glyph ^-
106+23:17 name number-one
107+23:28 lit %.n
108+24:1 NEWLINE
109+24:1 glyph ++
110+24:4 name no-as-zero
111+24:15 glyph ^-
112+24:18 name flag-zero
113+24:28 lit %.n
114+25:1 NEWLINE
115+25:1 glyph ++
116+25:4 name pending
117+26:3 INDENT
118+26:3 glyph ~&
119+26:6 lit %unrelated
120+27:5 INDENT
121+27:5 glyph ^-
122+27:8 name maybe
123+27:14 lit %.y
124+28:1 DEDENT
125+28:1 DEDENT
126+28:1 NEWLINE
127+28:1 glyph ++
128+28:4 name unknown
129+28:12 glyph |=
130+28:15 name x
131+28:16 tight glyph =
132+28:17 tight tvar A
133+28:19 glyph ^-
134+28:22 tvar A
135+28:24 lit %.y
136+28:27 NEWLINE
tests/golden/types-loobean-union-context/tree.txtnew file+55
@@ -0,0 +1,55 @@
1+(module
2+ (mold 1:1 maybe
3+ (union 2:3
4+ (const 2:3 ~)
5+ (cell 3:3
6+ (const 3:4 ~)
7+ (face 3:6 value (aura 3:12 @t)))))
8+ (mold 4:1 term-zero
9+ (union 5:3
10+ (const 5:3 %$)
11+ (cell 6:3
12+ (const 6:4 %some)
13+ (face 6:10 value (aura 6:16 @t)))))
14+ (mold 7:1 flag-zero
15+ (union 8:3
16+ (const 8:3 %.y)
17+ (cell 9:3
18+ (const 9:4 %some)
19+ (face 9:10 value (aura 9:16 @t)))))
20+ (mold 10:1 repeated
21+ (union 11:3 (const 11:3 ~) (const 12:3 %.y)))
22+ (mold 13:1 number-one
23+ (union 14:3
24+ (const 14:3 %.n)
25+ (cell 15:3
26+ (const 15:4 %some)
27+ (face 15:10 value (aura 15:16 @t)))))
28+ (value 16:1 as-null
29+ (cast 16:12 (ref 16:15 maybe) (lit 16:21 %.y)))
30+ (value 17:1 bad-null
31+ (cast 17:13 (ref 17:16 maybe) (lit 17:22 %.n)))
32+ (value 18:1 null-as-term
33+ (cast 18:17 (ref 18:20 term-zero) (lit 18:30 ~)))
34+ (value 19:1 flag-as-term
35+ (cast 19:17 (ref 19:20 term-zero) (lit 19:30 %.y)))
36+ (value 20:1 term-as-flag
37+ (cast 20:17 (ref 20:20 flag-zero) (lit 20:30 %$)))
38+ (value 21:1 null-as-flag
39+ (cast 21:17 (ref 21:20 flag-zero) (lit 21:30 ~)))
40+ (value 22:1 yes-as-flag
41+ (cast 22:16 (ref 22:19 flag-zero) (lit 22:29 %.y)))
42+ (value 23:1 no-as-one
43+ (cast 23:14 (ref 23:17 number-one) (lit 23:28 %.n)))
44+ (value 24:1 no-as-zero
45+ (cast 24:15 (ref 24:18 flag-zero) (lit 24:28 %.n)))
46+ (value 25:1 pending
47+ (body 26:3
48+ (trace 26:3
49+ (lit 26:6 %unrelated)
50+ (body 27:5
51+ (cast 27:5 (ref 27:8 maybe) (lit 27:14 %.y))))))
52+ (value 28:1 unknown
53+ (gate 28:12
54+ (face 28:15 x (tvar 28:17 A))
55+ (cast 28:19 (tvar 28:22 A) (lit 28:24 %.y)))))
tests/golden/types-loobean-union-context/types.txtnew file+35
@@ -0,0 +1,35 @@
1+partial inference; module not checked
2++$ maybe: cases proven disjoint; mold not checked
3++$ term-zero: cases proven disjoint; mold not checked
4++$ flag-zero: cases proven disjoint; mold not checked
5++$ repeated: overlapping cases; mold not checked
6+/tests/golden/types-loobean-union-context/source.jibb:11:3: first union case
7+ ~
8+ ^
9+/tests/golden/types-loobean-union-context/source.jibb:12:3: overlapping case
10+ %.y
11+ ^
12++$ number-one: cases proven disjoint; mold not checked
13+++ as-null: maybe
14+++ bad-null: cast mold and expression type do not unify
15+/tests/golden/types-loobean-union-context/source.jibb:17:16: cast mold
16+++ bad-null ^- maybe %.n
17+ ^
18+/tests/golden/types-loobean-union-context/source.jibb:17:22: expression has type ?
19+++ bad-null ^- maybe %.n
20+ ^
21+++ null-as-term: term-zero
22+++ flag-as-term: term-zero
23+++ term-as-flag: flag-zero
24+++ null-as-flag: flag-zero
25+++ yes-as-flag: flag-zero
26+++ no-as-one: number-one
27+++ no-as-zero: cast mold and expression type do not unify
28+/tests/golden/types-loobean-union-context/source.jibb:24:18: cast mold
29+++ no-as-zero ^- flag-zero %.n
30+ ^
31+/tests/golden/types-loobean-union-context/source.jibb:24:28: expression has type ?
32+++ no-as-zero ^- flag-zero %.n
33+ ^
34+++ pending: tag needs context in partial inference
35+++ unknown: explicit capital constraints are not supported by partial inference
tests/golden/types-module-field-ambiguous/about.txtdeleted−4
@@ -1,4 +0,0 @@
1−source: Grammar, Expressions and Imports: a wing selects a named field, and a module import gives access through its face.
2−tests: An imported record with two same-named fields does not allow an arbitrary choice; ambiguous selection stays unsupported.
3−expect: parses
4−expect-types: a partial inference report
tests/golden/types-module-field-ambiguous/types.txtdeleted−2
@@ -1,2 +0,0 @@
1−partial inference; module not checked
2−++ value: field name is ambiguous in partial inference
tests/golden/types-module-field-duplicate/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Types and molds; Imports: record fields are distinct within each record scope.
2+tests: A reachable imported module with duplicate record-expression faces is rejected at both source sites.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-module-field-ambiguous/module-trees.txt → tests/golden/types-module-field-duplicate/module-trees.txtrenamed

The content is the same.

tests/golden/types-module-field-duplicate/modules.txtnew file+1
@@ -0,0 +1 @@
1+/ui/lib.jibb
tests/golden/types-module-field-ambiguous/modules/ui/lib.jibb → tests/golden/types-module-field-duplicate/modules/ui/lib.jibbrenamed

The content is the same.

tests/golden/types-module-field-ambiguous/source.jibb → tests/golden/types-module-field-duplicate/source.jibbrenamed

The content is the same.

tests/golden/types-module-field-ambiguous/tokens.txt → tests/golden/types-module-field-duplicate/tokens.txtrenamed

The content is the same.

tests/golden/types-module-field-ambiguous/tree.txt → tests/golden/types-module-field-duplicate/tree.txtrenamed

The content is the same.

tests/golden/types-module-field-duplicate/types.txtnew file+8
@@ -0,0 +1,8 @@
1+partial inference; module not checked
2+record field `x` is repeated
3+/ui/lib.jibb:1:15: first field
4+++ ambiguous [x="hi" x=~zod]
5+ ^
6+/ui/lib.jibb:1:22: repeated field
7+++ ambiguous [x="hi" x=~zod]
8+ ^
tests/golden/types-nested-noun-context/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Tag resolution: "It works for cases whose head is a literal with the same noun as the tag, regardless of how that literal is written"; `|=%$` also constructs a case headed by `%.y` or `~`.
2+tests: Null, loobean-zero and term-zero input/head combinations with nested generic payloads; missing, mismatched, ambiguous and unknown contexts remain conservative.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-nested-noun-context/source.jibbnew file+35
@@ -0,0 +1,35 @@
1++$ msg
2+ %ready
3+ %idle
4++$ inner |$ [A]
5+ [%one item=A]
6+ [%two item=A]
7++$ null-out |$ [A]
8+ [~ item=(inner A)]
9+ [%other value=@ud]
10++$ flag-out |$ [A]
11+ [%.y item=(inner A)]
12+ [%other value=@ud]
13++$ term-out |$ [A]
14+ [%$ item=(inner A)]
15+ [%other value=@ud]
16++$ competitors |$ [A]
17+ [~ item=(inner A)]
18+ [%.y value=@p]
19+++ inner |= x=A ^- (inner A) [%one x]
20+++ null-null ^- (null-out msg) [~ (inner %ready)]
21+++ flag-null ^- (null-out msg) [%.y (inner %ready)]
22+++ term-null ^- (null-out msg) [%$ (inner %ready)]
23+++ null-flag ^- (flag-out msg) [~ (inner %ready)]
24+++ flag-flag ^- (flag-out msg) [%.y (inner %ready)]
25+++ term-flag ^- (flag-out msg) [%$ (inner %ready)]
26+++ null-term ^- (term-out msg) [~ (inner %ready)]
27+++ flag-term ^- (term-out msg) [%.y (inner %ready)]
28+++ term-term ^- (term-out msg) [%$ (inner %ready)]
29+++ wrong-inner ^- (null-out msg) [%$ (inner %missing)]
30+++ wrong-payload ^- (flag-out @t) [~ (inner ~zod)]
31+++ pending
32+ ~& %orphan
33+ ^- (term-out msg) [%.y (inner %ready)]
34+++ unknown-target |= x=A ^- A [~ (inner %ready)]
35+++ ambiguous ^- (competitors msg) [~ (inner %ready)]
tests/golden/types-nested-noun-context/tokens.txtnew file+363
@@ -0,0 +1,363 @@
1+1:1 glyph +$
2+1:4 name msg
3+2:3 INDENT
4+2:3 lit %ready
5+3:3 NEWLINE
6+3:3 lit %idle
7+4:1 DEDENT
8+4:1 NEWLINE
9+4:1 glyph +$
10+4:4 name inner
11+4:10 glyph |$
12+4:13 glyph [
13+4:14 tight tvar A
14+4:15 tight glyph ]
15+5:3 INDENT
16+5:3 glyph [
17+5:4 tight lit %one
18+5:9 name item
19+5:13 tight glyph =
20+5:14 tight tvar A
21+5:15 tight glyph ]
22+6:3 NEWLINE
23+6:3 glyph [
24+6:4 tight lit %two
25+6:9 name item
26+6:13 tight glyph =
27+6:14 tight tvar A
28+6:15 tight glyph ]
29+7:1 DEDENT
30+7:1 NEWLINE
31+7:1 glyph +$
32+7:4 name null-out
33+7:13 glyph |$
34+7:16 glyph [
35+7:17 tight tvar A
36+7:18 tight glyph ]
37+8:3 INDENT
38+8:3 glyph [
39+8:4 tight lit ~
40+8:6 name item
41+8:10 tight glyph =
42+8:11 tight glyph (
43+8:12 tight name inner
44+8:18 tvar A
45+8:19 tight glyph )
46+8:20 tight glyph ]
47+9:3 NEWLINE
48+9:3 glyph [
49+9:4 tight lit %other
50+9:11 name value
51+9:16 tight glyph =
52+9:17 tight aura @ud
53+9:20 tight glyph ]
54+10:1 DEDENT
55+10:1 NEWLINE
56+10:1 glyph +$
57+10:4 name flag-out
58+10:13 glyph |$
59+10:16 glyph [
60+10:17 tight tvar A
61+10:18 tight glyph ]
62+11:3 INDENT
63+11:3 glyph [
64+11:4 tight lit %.y
65+11:8 name item
66+11:12 tight glyph =
67+11:13 tight glyph (
68+11:14 tight name inner
69+11:20 tvar A
70+11:21 tight glyph )
71+11:22 tight glyph ]
72+12:3 NEWLINE
73+12:3 glyph [
74+12:4 tight lit %other
75+12:11 name value
76+12:16 tight glyph =
77+12:17 tight aura @ud
78+12:20 tight glyph ]
79+13:1 DEDENT
80+13:1 NEWLINE
81+13:1 glyph +$
82+13:4 name term-out
83+13:13 glyph |$
84+13:16 glyph [
85+13:17 tight tvar A
86+13:18 tight glyph ]
87+14:3 INDENT
88+14:3 glyph [
89+14:4 tight lit %$
90+14:7 name item
91+14:11 tight glyph =
92+14:12 tight glyph (
93+14:13 tight name inner
94+14:19 tvar A
95+14:20 tight glyph )
96+14:21 tight glyph ]
97+15:3 NEWLINE
98+15:3 glyph [
99+15:4 tight lit %other
100+15:11 name value
101+15:16 tight glyph =
102+15:17 tight aura @ud
103+15:20 tight glyph ]
104+16:1 DEDENT
105+16:1 NEWLINE
106+16:1 glyph +$
107+16:4 name competitors
108+16:16 glyph |$
109+16:19 glyph [
110+16:20 tight tvar A
111+16:21 tight glyph ]
112+17:3 INDENT
113+17:3 glyph [
114+17:4 tight lit ~
115+17:6 name item
116+17:10 tight glyph =
117+17:11 tight glyph (
118+17:12 tight name inner
119+17:18 tvar A
120+17:19 tight glyph )
121+17:20 tight glyph ]
122+18:3 NEWLINE
123+18:3 glyph [
124+18:4 tight lit %.y
125+18:8 name value
126+18:13 tight glyph =
127+18:14 tight aura @p
128+18:16 tight glyph ]
129+19:1 DEDENT
130+19:1 NEWLINE
131+19:1 glyph ++
132+19:4 name inner
133+19:10 glyph |=
134+19:13 name x
135+19:14 tight glyph =
136+19:15 tight tvar A
137+19:17 glyph ^-
138+19:20 glyph (
139+19:21 tight name inner
140+19:27 tvar A
141+19:28 tight glyph )
142+19:30 glyph [
143+19:31 tight lit %one
144+19:36 name x
145+19:37 tight glyph ]
146+20:1 NEWLINE
147+20:1 glyph ++
148+20:4 name null-null
149+20:14 glyph ^-
150+20:17 glyph (
151+20:18 tight name null-out
152+20:27 name msg
153+20:30 tight glyph )
154+20:32 glyph [
155+20:33 tight lit ~
156+20:35 glyph (
157+20:36 tight name inner
158+20:42 lit %ready
159+20:48 tight glyph )
160+20:49 tight glyph ]
161+21:1 NEWLINE
162+21:1 glyph ++
163+21:4 name flag-null
164+21:14 glyph ^-
165+21:17 glyph (
166+21:18 tight name null-out
167+21:27 name msg
168+21:30 tight glyph )
169+21:32 glyph [
170+21:33 tight lit %.y
171+21:37 glyph (
172+21:38 tight name inner
173+21:44 lit %ready
174+21:50 tight glyph )
175+21:51 tight glyph ]
176+22:1 NEWLINE
177+22:1 glyph ++
178+22:4 name term-null
179+22:14 glyph ^-
180+22:17 glyph (
181+22:18 tight name null-out
182+22:27 name msg
183+22:30 tight glyph )
184+22:32 glyph [
185+22:33 tight lit %$
186+22:36 glyph (
187+22:37 tight name inner
188+22:43 lit %ready
189+22:49 tight glyph )
190+22:50 tight glyph ]
191+23:1 NEWLINE
192+23:1 glyph ++
193+23:4 name null-flag
194+23:14 glyph ^-
195+23:17 glyph (
196+23:18 tight name flag-out
197+23:27 name msg
198+23:30 tight glyph )
199+23:32 glyph [
200+23:33 tight lit ~
201+23:35 glyph (
202+23:36 tight name inner
203+23:42 lit %ready
204+23:48 tight glyph )
205+23:49 tight glyph ]
206+24:1 NEWLINE
207+24:1 glyph ++
208+24:4 name flag-flag
209+24:14 glyph ^-
210+24:17 glyph (
211+24:18 tight name flag-out
212+24:27 name msg
213+24:30 tight glyph )
214+24:32 glyph [
215+24:33 tight lit %.y
216+24:37 glyph (
217+24:38 tight name inner
218+24:44 lit %ready
219+24:50 tight glyph )
220+24:51 tight glyph ]
221+25:1 NEWLINE
222+25:1 glyph ++
223+25:4 name term-flag
224+25:14 glyph ^-
225+25:17 glyph (
226+25:18 tight name flag-out
227+25:27 name msg
228+25:30 tight glyph )
229+25:32 glyph [
230+25:33 tight lit %$
231+25:36 glyph (
232+25:37 tight name inner
233+25:43 lit %ready
234+25:49 tight glyph )
235+25:50 tight glyph ]
236+26:1 NEWLINE
237+26:1 glyph ++
238+26:4 name null-term
239+26:14 glyph ^-
240+26:17 glyph (
241+26:18 tight name term-out
242+26:27 name msg
243+26:30 tight glyph )
244+26:32 glyph [
245+26:33 tight lit ~
246+26:35 glyph (
247+26:36 tight name inner
248+26:42 lit %ready
249+26:48 tight glyph )
250+26:49 tight glyph ]
251+27:1 NEWLINE
252+27:1 glyph ++
253+27:4 name flag-term
254+27:14 glyph ^-
255+27:17 glyph (
256+27:18 tight name term-out
257+27:27 name msg
258+27:30 tight glyph )
259+27:32 glyph [
260+27:33 tight lit %.y
261+27:37 glyph (
262+27:38 tight name inner
263+27:44 lit %ready
264+27:50 tight glyph )
265+27:51 tight glyph ]
266+28:1 NEWLINE
267+28:1 glyph ++
268+28:4 name term-term
269+28:14 glyph ^-
270+28:17 glyph (
271+28:18 tight name term-out
272+28:27 name msg
273+28:30 tight glyph )
274+28:32 glyph [
275+28:33 tight lit %$
276+28:36 glyph (
277+28:37 tight name inner
278+28:43 lit %ready
279+28:49 tight glyph )
280+28:50 tight glyph ]
281+29:1 NEWLINE
282+29:1 glyph ++
283+29:4 name wrong-inner
284+29:16 glyph ^-
285+29:19 glyph (
286+29:20 tight name null-out
287+29:29 name msg
288+29:32 tight glyph )
289+29:34 glyph [
290+29:35 tight lit %$
291+29:38 glyph (
292+29:39 tight name inner
293+29:45 lit %missing
294+29:53 tight glyph )
295+29:54 tight glyph ]
296+30:1 NEWLINE
297+30:1 glyph ++
298+30:4 name wrong-payload
299+30:18 glyph ^-
300+30:21 glyph (
301+30:22 tight name flag-out
302+30:31 aura @t
303+30:33 tight glyph )
304+30:35 glyph [
305+30:36 tight lit ~
306+30:38 glyph (
307+30:39 tight name inner
308+30:45 lit ~zod
309+30:49 tight glyph )
310+30:50 tight glyph ]
311+31:1 NEWLINE
312+31:1 glyph ++
313+31:4 name pending
314+32:3 INDENT
315+32:3 glyph ~&
316+32:6 lit %orphan
317+33:5 INDENT
318+33:5 glyph ^-
319+33:8 glyph (
320+33:9 tight name term-out
321+33:18 name msg
322+33:21 tight glyph )
323+33:23 glyph [
324+33:24 tight lit %.y
325+33:28 glyph (
326+33:29 tight name inner
327+33:35 lit %ready
328+33:41 tight glyph )
329+33:42 tight glyph ]
330+34:1 DEDENT
331+34:1 DEDENT
332+34:1 NEWLINE
333+34:1 glyph ++
334+34:4 name unknown-target
335+34:19 glyph |=
336+34:22 name x
337+34:23 tight glyph =
338+34:24 tight tvar A
339+34:26 glyph ^-
340+34:29 tvar A
341+34:31 glyph [
342+34:32 tight lit ~
343+34:34 glyph (
344+34:35 tight name inner
345+34:41 lit %ready
346+34:47 tight glyph )
347+34:48 tight glyph ]
348+35:1 NEWLINE
349+35:1 glyph ++
350+35:4 name ambiguous
351+35:14 glyph ^-
352+35:17 glyph (
353+35:18 tight name competitors
354+35:30 name msg
355+35:33 tight glyph )
356+35:35 glyph [
357+35:36 tight lit ~
358+35:38 glyph (
359+35:39 tight name inner
360+35:45 lit %ready
361+35:51 tight glyph )
362+35:52 tight glyph ]
363+35:53 NEWLINE
tests/golden/types-nested-noun-context/tree.txtnew file+162
@@ -0,0 +1,162 @@
1+(module
2+ (mold 1:1 msg
3+ (union 2:3 (const 2:3 %ready) (const 3:3 %idle)))
4+ (mold 4:1 inner
5+ (generic 4:10 A
6+ (union 5:3
7+ (cell 5:3
8+ (const 5:4 %one)
9+ (face 5:9 item (tvar 5:14 A)))
10+ (cell 6:3
11+ (const 6:4 %two)
12+ (face 6:9 item (tvar 6:14 A))))))
13+ (mold 7:1 null-out
14+ (generic 7:13 A
15+ (union 8:3
16+ (cell 8:3
17+ (const 8:4 ~)
18+ (face 8:6 item
19+ (apply 8:11 inner (tvar 8:18 A))))
20+ (cell 9:3
21+ (const 9:4 %other)
22+ (face 9:11 value (aura 9:17 @ud))))))
23+ (mold 10:1 flag-out
24+ (generic 10:13 A
25+ (union 11:3
26+ (cell 11:3
27+ (const 11:4 %.y)
28+ (face 11:8 item
29+ (apply 11:13 inner (tvar 11:20 A))))
30+ (cell 12:3
31+ (const 12:4 %other)
32+ (face 12:11 value (aura 12:17 @ud))))))
33+ (mold 13:1 term-out
34+ (generic 13:13 A
35+ (union 14:3
36+ (cell 14:3
37+ (const 14:4 %$)
38+ (face 14:7 item
39+ (apply 14:12 inner (tvar 14:19 A))))
40+ (cell 15:3
41+ (const 15:4 %other)
42+ (face 15:11 value (aura 15:17 @ud))))))
43+ (mold 16:1 competitors
44+ (generic 16:16 A
45+ (union 17:3
46+ (cell 17:3
47+ (const 17:4 ~)
48+ (face 17:6 item
49+ (apply 17:11 inner (tvar 17:18 A))))
50+ (cell 18:3
51+ (const 18:4 %.y)
52+ (face 18:8 value (aura 18:14 @p))))))
53+ (value 19:1 inner
54+ (gate 19:10
55+ (face 19:13 x (tvar 19:15 A))
56+ (cast 19:17
57+ (apply 19:20 inner (tvar 19:27 A))
58+ (tuple 19:30 (lit 19:31 %one) (wing 19:36 x)))))
59+ (value 20:1 null-null
60+ (cast 20:14
61+ (apply 20:17 null-out (ref 20:27 msg))
62+ (tuple 20:32
63+ (lit 20:33 ~)
64+ (group 20:35
65+ (call 20:36 (wing 20:36 inner) (lit 20:42 %ready))))))
66+ (value 21:1 flag-null
67+ (cast 21:14
68+ (apply 21:17 null-out (ref 21:27 msg))
69+ (tuple 21:32
70+ (lit 21:33 %.y)
71+ (group 21:37
72+ (call 21:38 (wing 21:38 inner) (lit 21:44 %ready))))))
73+ (value 22:1 term-null
74+ (cast 22:14
75+ (apply 22:17 null-out (ref 22:27 msg))
76+ (tuple 22:32
77+ (lit 22:33 %$)
78+ (group 22:36
79+ (call 22:37 (wing 22:37 inner) (lit 22:43 %ready))))))
80+ (value 23:1 null-flag
81+ (cast 23:14
82+ (apply 23:17 flag-out (ref 23:27 msg))
83+ (tuple 23:32
84+ (lit 23:33 ~)
85+ (group 23:35
86+ (call 23:36 (wing 23:36 inner) (lit 23:42 %ready))))))
87+ (value 24:1 flag-flag
88+ (cast 24:14
89+ (apply 24:17 flag-out (ref 24:27 msg))
90+ (tuple 24:32
91+ (lit 24:33 %.y)
92+ (group 24:37
93+ (call 24:38 (wing 24:38 inner) (lit 24:44 %ready))))))
94+ (value 25:1 term-flag
95+ (cast 25:14
96+ (apply 25:17 flag-out (ref 25:27 msg))
97+ (tuple 25:32
98+ (lit 25:33 %$)
99+ (group 25:36
100+ (call 25:37 (wing 25:37 inner) (lit 25:43 %ready))))))
101+ (value 26:1 null-term
102+ (cast 26:14
103+ (apply 26:17 term-out (ref 26:27 msg))
104+ (tuple 26:32
105+ (lit 26:33 ~)
106+ (group 26:35
107+ (call 26:36 (wing 26:36 inner) (lit 26:42 %ready))))))
108+ (value 27:1 flag-term
109+ (cast 27:14
110+ (apply 27:17 term-out (ref 27:27 msg))
111+ (tuple 27:32
112+ (lit 27:33 %.y)
113+ (group 27:37
114+ (call 27:38 (wing 27:38 inner) (lit 27:44 %ready))))))
115+ (value 28:1 term-term
116+ (cast 28:14
117+ (apply 28:17 term-out (ref 28:27 msg))
118+ (tuple 28:32
119+ (lit 28:33 %$)
120+ (group 28:36
121+ (call 28:37 (wing 28:37 inner) (lit 28:43 %ready))))))
122+ (value 29:1 wrong-inner
123+ (cast 29:16
124+ (apply 29:19 null-out (ref 29:29 msg))
125+ (tuple 29:34
126+ (lit 29:35 %$)
127+ (group 29:38
128+ (call 29:39 (wing 29:39 inner) (lit 29:45 %missing))))))
129+ (value 30:1 wrong-payload
130+ (cast 30:18
131+ (apply 30:21 flag-out (aura 30:31 @t))
132+ (tuple 30:35
133+ (lit 30:36 ~)
134+ (group 30:38
135+ (call 30:39 (wing 30:39 inner) (lit 30:45 ~zod))))))
136+ (value 31:1 pending
137+ (body 32:3
138+ (trace 32:3
139+ (lit 32:6 %orphan)
140+ (body 33:5
141+ (cast 33:5
142+ (apply 33:8 term-out (ref 33:18 msg))
143+ (tuple 33:23
144+ (lit 33:24 %.y)
145+ (group 33:28
146+ (call 33:29 (wing 33:29 inner) (lit 33:35 %ready)))))))))
147+ (value 34:1 unknown-target
148+ (gate 34:19
149+ (face 34:22 x (tvar 34:24 A))
150+ (cast 34:26
151+ (tvar 34:29 A)
152+ (tuple 34:31
153+ (lit 34:32 ~)
154+ (group 34:34
155+ (call 34:35 (wing 34:35 inner) (lit 34:41 %ready)))))))
156+ (value 35:1 ambiguous
157+ (cast 35:14
158+ (apply 35:17 competitors (ref 35:30 msg))
159+ (tuple 35:35
160+ (lit 35:36 ~)
161+ (group 35:38
162+ (call 35:39 (wing 35:39 inner) (lit 35:45 %ready)))))))
tests/golden/types-nested-noun-context/types.txtnew file+34
@@ -0,0 +1,34 @@
1+partial inference; module not checked
2++$ msg: cases proven disjoint; mold not checked
3++$ inner: cases proven disjoint; mold not checked
4++$ null-out: cases proven disjoint; mold not checked
5++$ flag-out: cases proven disjoint; mold not checked
6++$ term-out: cases proven disjoint; mold not checked
7++$ competitors: case disjointness unresolved; mold not checked
8+++ inner: $-(A (inner A))
9+++ null-null: (null-out msg)
10+++ flag-null: (null-out msg)
11+++ term-null: (null-out msg)
12+++ null-flag: (flag-out msg)
13+++ flag-flag: (flag-out msg)
14+++ term-flag: (flag-out msg)
15+++ null-term: (term-out msg)
16+++ flag-term: (term-out msg)
17+++ term-term: (term-out msg)
18+++ wrong-inner: msg has no case `%missing`
19+/tests/golden/types-nested-noun-context/source.jibb:29:39: expected union
20+++ wrong-inner ^- (null-out msg) [%$ (inner %missing)]
21+ ^
22+/tests/golden/types-nested-noun-context/source.jibb:29:45: tag
23+++ wrong-inner ^- (null-out msg) [%$ (inner %missing)]
24+ ^
25+++ wrong-payload: call's sample and argument types do not unify
26+/tests/golden/types-nested-noun-context/source.jibb:30:39: called gate
27+++ wrong-payload ^- (flag-out @t) [~ (inner ~zod)]
28+ ^
29+/tests/golden/types-nested-noun-context/source.jibb:30:45: argument has type @p
30+++ wrong-payload ^- (flag-out @t) [~ (inner ~zod)]
31+ ^
32+++ pending: tag needs context in partial inference
33+++ unknown-target: explicit capital constraints are not supported by partial inference
34+++ ambiguous: cast mold is not supported by partial inference
tests/golden/types-nested-shallow-preserve/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Literals by context: "Number and cell literals resolve like tags: each waits for its context"; Literals: `gap+%s2` is `[%gap %s2]`.
2+tests: Previously supported nested pair and direct-cell contexts stay inferred through lists and calls; calls, groups, casts and constructors preserve errors and pending constraints. Unknown targets fail closed.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-nested-shallow-preserve/modules.txtnew file+1
@@ -0,0 +1 @@
1+# Use the source-backed prelude.
tests/golden/types-nested-shallow-preserve/source.jibbnew file+30
@@ -0,0 +1,30 @@
1++$ length
2+ [%fill n=@ud]
3+ %shrink
4++$ attr
5+ [%width length]
6+ [%gap @tas]
7+++ number-id |= x=@ud x
8+++ plain ^- attr width+[%fill 1]
9+++ direct ^- attr [%width [%fill 1]]
10+++ list ^- (list attr) ~[width+[%fill 1]]
11+++ accept |= value=attr value
12+++ call (accept width+[%fill 1])
13+++ simple-call ^- attr width+[%fill (number-id 1)]
14+++ grouped-call ^- attr width+[%fill ((number-id 1))]
15+++ cast-call ^- attr width+[%fill (^- @ud (number-id 1))]
16+++ nested-call ^- attr width+[%fill (number-id (number-id 1))]
17+++ bad-tag ^- attr width+[%missing 1]
18+++ bad-number ^- attr width+[%fill "bad"]
19+++ pending
20+ ~& %unrelated
21+ ^- attr width+[%fill (number-id 1)]
22+++ singleton ^- attr width+%shrink
23++$ event
24+ [%got value=@t]
25+ %idle
26++$ envelope
27+ [%handler callback=$-(@t event)]
28+ [%empty value=@ud]
29+++ constructor ^- envelope [%handler |=%got]
30+++ unknown-target |= x=A ^- A width+[%fill (number-id 1)]
tests/golden/types-nested-shallow-preserve/tokens.txtnew file+271
@@ -0,0 +1,271 @@
1+1:1 glyph +$
2+1:4 name length
3+2:3 INDENT
4+2:3 glyph [
5+2:4 tight lit %fill
6+2:10 name n
7+2:11 tight glyph =
8+2:12 tight aura @ud
9+2:15 tight glyph ]
10+3:3 NEWLINE
11+3:3 lit %shrink
12+4:1 DEDENT
13+4:1 NEWLINE
14+4:1 glyph +$
15+4:4 name attr
16+5:3 INDENT
17+5:3 glyph [
18+5:4 tight lit %width
19+5:11 name length
20+5:17 tight glyph ]
21+6:3 NEWLINE
22+6:3 glyph [
23+6:4 tight lit %gap
24+6:9 aura @tas
25+6:13 tight glyph ]
26+7:1 DEDENT
27+7:1 NEWLINE
28+7:1 glyph ++
29+7:4 name number-id
30+7:14 glyph |=
31+7:17 name x
32+7:18 tight glyph =
33+7:19 tight aura @ud
34+7:23 name x
35+8:1 NEWLINE
36+8:1 glyph ++
37+8:4 name plain
38+8:10 glyph ^-
39+8:13 name attr
40+8:18 name width
41+8:23 tight glyph +
42+8:24 tight glyph [
43+8:25 tight lit %fill
44+8:31 lit 1
45+8:32 tight glyph ]
46+9:1 NEWLINE
47+9:1 glyph ++
48+9:4 name direct
49+9:11 glyph ^-
50+9:14 name attr
51+9:19 glyph [
52+9:20 tight lit %width
53+9:27 glyph [
54+9:28 tight lit %fill
55+9:34 lit 1
56+9:35 tight glyph ]
57+9:36 tight glyph ]
58+10:1 NEWLINE
59+10:1 glyph ++
60+10:4 name list
61+10:9 glyph ^-
62+10:12 glyph (
63+10:13 tight name list
64+10:18 name attr
65+10:22 tight glyph )
66+10:24 glyph ~[
67+10:26 tight name width
68+10:31 tight glyph +
69+10:32 tight glyph [
70+10:33 tight lit %fill
71+10:39 lit 1
72+10:40 tight glyph ]
73+10:41 tight glyph ]
74+11:1 NEWLINE
75+11:1 glyph ++
76+11:4 name accept
77+11:11 glyph |=
78+11:14 name value
79+11:19 tight glyph =
80+11:20 tight name attr
81+11:25 name value
82+12:1 NEWLINE
83+12:1 glyph ++
84+12:4 name call
85+12:9 glyph (
86+12:10 tight name accept
87+12:17 name width
88+12:22 tight glyph +
89+12:23 tight glyph [
90+12:24 tight lit %fill
91+12:30 lit 1
92+12:31 tight glyph ]
93+12:32 tight glyph )
94+13:1 NEWLINE
95+13:1 glyph ++
96+13:4 name simple-call
97+13:16 glyph ^-
98+13:19 name attr
99+13:24 name width
100+13:29 tight glyph +
101+13:30 tight glyph [
102+13:31 tight lit %fill
103+13:37 glyph (
104+13:38 tight name number-id
105+13:48 lit 1
106+13:49 tight glyph )
107+13:50 tight glyph ]
108+14:1 NEWLINE
109+14:1 glyph ++
110+14:4 name grouped-call
111+14:17 glyph ^-
112+14:20 name attr
113+14:25 name width
114+14:30 tight glyph +
115+14:31 tight glyph [
116+14:32 tight lit %fill
117+14:38 glyph (
118+14:39 tight glyph (
119+14:40 tight name number-id
120+14:50 lit 1
121+14:51 tight glyph )
122+14:52 tight glyph )
123+14:53 tight glyph ]
124+15:1 NEWLINE
125+15:1 glyph ++
126+15:4 name cast-call
127+15:14 glyph ^-
128+15:17 name attr
129+15:22 name width
130+15:27 tight glyph +
131+15:28 tight glyph [
132+15:29 tight lit %fill
133+15:35 glyph (
134+15:36 tight glyph ^-
135+15:39 aura @ud
136+15:43 glyph (
137+15:44 tight name number-id
138+15:54 lit 1
139+15:55 tight glyph )
140+15:56 tight glyph )
141+15:57 tight glyph ]
142+16:1 NEWLINE
143+16:1 glyph ++
144+16:4 name nested-call
145+16:16 glyph ^-
146+16:19 name attr
147+16:24 name width
148+16:29 tight glyph +
149+16:30 tight glyph [
150+16:31 tight lit %fill
151+16:37 glyph (
152+16:38 tight name number-id
153+16:48 glyph (
154+16:49 tight name number-id
155+16:59 lit 1
156+16:60 tight glyph )
157+16:61 tight glyph )
158+16:62 tight glyph ]
159+17:1 NEWLINE
160+17:1 glyph ++
161+17:4 name bad-tag
162+17:12 glyph ^-
163+17:15 name attr
164+17:20 name width
165+17:25 tight glyph +
166+17:26 tight glyph [
167+17:27 tight lit %missing
168+17:36 lit 1
169+17:37 tight glyph ]
170+18:1 NEWLINE
171+18:1 glyph ++
172+18:4 name bad-number
173+18:15 glyph ^-
174+18:18 name attr
175+18:23 name width
176+18:28 tight glyph +
177+18:29 tight glyph [
178+18:30 tight lit %fill
179+18:36 str "bad"
180+18:41 tight glyph ]
181+19:1 NEWLINE
182+19:1 glyph ++
183+19:4 name pending
184+20:3 INDENT
185+20:3 glyph ~&
186+20:6 lit %unrelated
187+21:5 INDENT
188+21:5 glyph ^-
189+21:8 name attr
190+21:13 name width
191+21:18 tight glyph +
192+21:19 tight glyph [
193+21:20 tight lit %fill
194+21:26 glyph (
195+21:27 tight name number-id
196+21:37 lit 1
197+21:38 tight glyph )
198+21:39 tight glyph ]
199+22:1 DEDENT
200+22:1 DEDENT
201+22:1 NEWLINE
202+22:1 glyph ++
203+22:4 name singleton
204+22:14 glyph ^-
205+22:17 name attr
206+22:22 name width
207+22:27 tight glyph +
208+22:28 tight lit %shrink
209+23:1 NEWLINE
210+23:1 glyph +$
211+23:4 name event
212+24:3 INDENT
213+24:3 glyph [
214+24:4 tight lit %got
215+24:9 name value
216+24:14 tight glyph =
217+24:15 tight aura @t
218+24:17 tight glyph ]
219+25:3 NEWLINE
220+25:3 lit %idle
221+26:1 DEDENT
222+26:1 NEWLINE
223+26:1 glyph +$
224+26:4 name envelope
225+27:3 INDENT
226+27:3 glyph [
227+27:4 tight lit %handler
228+27:13 name callback
229+27:21 tight glyph =
230+27:22 tight glyph $-(
231+27:25 tight aura @t
232+27:28 name event
233+27:33 tight glyph )
234+27:34 tight glyph ]
235+28:3 NEWLINE
236+28:3 glyph [
237+28:4 tight lit %empty
238+28:11 name value
239+28:16 tight glyph =
240+28:17 tight aura @ud
241+28:20 tight glyph ]
242+29:1 DEDENT
243+29:1 NEWLINE
244+29:1 glyph ++
245+29:4 name constructor
246+29:16 glyph ^-
247+29:19 name envelope
248+29:28 glyph [
249+29:29 tight lit %handler
250+29:38 glyph |=
251+29:40 tight lit %got
252+29:44 tight glyph ]
253+30:1 NEWLINE
254+30:1 glyph ++
255+30:4 name unknown-target
256+30:19 glyph |=
257+30:22 name x
258+30:23 tight glyph =
259+30:24 tight tvar A
260+30:26 glyph ^-
261+30:29 tvar A
262+30:31 name width
263+30:36 tight glyph +
264+30:37 tight glyph [
265+30:38 tight lit %fill
266+30:44 glyph (
267+30:45 tight name number-id
268+30:55 lit 1
269+30:56 tight glyph )
270+30:57 tight glyph ]
271+30:58 NEWLINE
tests/golden/types-nested-shallow-preserve/tree.txtnew file+136
@@ -0,0 +1,136 @@
1+(module
2+ (mold 1:1 length
3+ (union 2:3
4+ (cell 2:3
5+ (const 2:4 %fill)
6+ (face 2:10 n (aura 2:12 @ud)))
7+ (const 3:3 %shrink)))
8+ (mold 4:1 attr
9+ (union 5:3
10+ (cell 5:3 (const 5:4 %width) (ref 5:11 length))
11+ (cell 6:3 (const 6:4 %gap) (aura 6:9 @tas))))
12+ (value 7:1 number-id
13+ (gate 7:14
14+ (face 7:17 x (aura 7:19 @ud))
15+ (wing 7:23 x)))
16+ (value 8:1 plain
17+ (cast 8:10
18+ (ref 8:13 attr)
19+ (pair 8:18 width
20+ (tuple 8:24 (lit 8:25 %fill) (lit 8:31 1)))))
21+ (value 9:1 direct
22+ (cast 9:11
23+ (ref 9:14 attr)
24+ (tuple 9:19
25+ (lit 9:20 %width)
26+ (tuple 9:27 (lit 9:28 %fill) (lit 9:34 1)))))
27+ (value 10:1 list
28+ (cast 10:9
29+ (apply 10:12 list (ref 10:18 attr))
30+ (list 10:24
31+ (pair 10:26 width
32+ (tuple 10:32 (lit 10:33 %fill) (lit 10:39 1))))))
33+ (value 11:1 accept
34+ (gate 11:11
35+ (face 11:14 value (ref 11:20 attr))
36+ (wing 11:25 value)))
37+ (value 12:1 call
38+ (group 12:9
39+ (call 12:10
40+ (wing 12:10 accept)
41+ (pair 12:17 width
42+ (tuple 12:23 (lit 12:24 %fill) (lit 12:30 1))))))
43+ (value 13:1 simple-call
44+ (cast 13:16
45+ (ref 13:19 attr)
46+ (pair 13:24 width
47+ (tuple 13:30
48+ (lit 13:31 %fill)
49+ (group 13:37
50+ (call 13:38 (wing 13:38 number-id) (lit 13:48 1)))))))
51+ (value 14:1 grouped-call
52+ (cast 14:17
53+ (ref 14:20 attr)
54+ (pair 14:25 width
55+ (tuple 14:31
56+ (lit 14:32 %fill)
57+ (group 14:38
58+ (group 14:39
59+ (call 14:40 (wing 14:40 number-id) (lit 14:50 1))))))))
60+ (value 15:1 cast-call
61+ (cast 15:14
62+ (ref 15:17 attr)
63+ (pair 15:22 width
64+ (tuple 15:28
65+ (lit 15:29 %fill)
66+ (group 15:35
67+ (cast 15:36
68+ (aura 15:39 @ud)
69+ (group 15:43
70+ (call 15:44 (wing 15:44 number-id) (lit 15:54 1)))))))))
71+ (value 16:1 nested-call
72+ (cast 16:16
73+ (ref 16:19 attr)
74+ (pair 16:24 width
75+ (tuple 16:30
76+ (lit 16:31 %fill)
77+ (group 16:37
78+ (call 16:38
79+ (wing 16:38 number-id)
80+ (group 16:48
81+ (call 16:49 (wing 16:49 number-id) (lit 16:59 1)))))))))
82+ (value 17:1 bad-tag
83+ (cast 17:12
84+ (ref 17:15 attr)
85+ (pair 17:20 width
86+ (tuple 17:26 (lit 17:27 %missing) (lit 17:36 1)))))
87+ (value 18:1 bad-number
88+ (cast 18:15
89+ (ref 18:18 attr)
90+ (pair 18:23 width
91+ (tuple 18:29 (lit 18:30 %fill) (str 18:36 "bad")))))
92+ (value 19:1 pending
93+ (body 20:3
94+ (trace 20:3
95+ (lit 20:6 %unrelated)
96+ (body 21:5
97+ (cast 21:5
98+ (ref 21:8 attr)
99+ (pair 21:13 width
100+ (tuple 21:19
101+ (lit 21:20 %fill)
102+ (group 21:26
103+ (call 21:27 (wing 21:27 number-id) (lit 21:37 1))))))))))
104+ (value 22:1 singleton
105+ (cast 22:14
106+ (ref 22:17 attr)
107+ (pair 22:22 width (lit 22:28 %shrink))))
108+ (mold 23:1 event
109+ (union 24:3
110+ (cell 24:3
111+ (const 24:4 %got)
112+ (face 24:9 value (aura 24:15 @t)))
113+ (const 25:3 %idle)))
114+ (mold 26:1 envelope
115+ (union 27:3
116+ (cell 27:3
117+ (const 27:4 %handler)
118+ (face 27:13 callback
119+ (fn 27:22 (aura 27:25 @t) (ref 27:28 event))))
120+ (cell 28:3
121+ (const 28:4 %empty)
122+ (face 28:11 value (aura 28:17 @ud)))))
123+ (value 29:1 constructor
124+ (cast 29:16
125+ (ref 29:19 envelope)
126+ (tuple 29:28 (lit 29:29 %handler) (ctor 29:38 %got))))
127+ (value 30:1 unknown-target
128+ (gate 30:19
129+ (face 30:22 x (tvar 30:24 A))
130+ (cast 30:26
131+ (tvar 30:29 A)
132+ (pair 30:31 width
133+ (tuple 30:37
134+ (lit 30:38 %fill)
135+ (group 30:44
136+ (call 30:45 (wing 30:45 number-id) (lit 30:55 1)))))))))
tests/golden/types-nested-shallow-preserve/types.txtnew file+33
@@ -0,0 +1,33 @@
1+partial inference; module not checked
2++$ length: cases proven disjoint; mold not checked
3++$ attr: cases proven disjoint; mold not checked
4+++ number-id: $-(@ud @ud)
5+++ plain: attr
6+++ direct: attr
7+++ list: (list attr)
8+++ accept: $-(attr attr)
9+++ call: attr
10+++ simple-call: attr
11+++ grouped-call: attr
12+++ cast-call: attr
13+++ nested-call: attr
14+++ bad-tag: cast mold and expression type do not unify
15+/tests/golden/types-nested-shallow-preserve/source.jibb:17:15: cast mold
16+++ bad-tag ^- attr width+[%missing 1]
17+ ^
18+/tests/golden/types-nested-shallow-preserve/source.jibb:17:20: expression
19+++ bad-tag ^- attr width+[%missing 1]
20+ ^
21+++ bad-number: cast mold and expression type do not unify
22+/tests/golden/types-nested-shallow-preserve/source.jibb:18:18: cast mold
23+++ bad-number ^- attr width+[%fill "bad"]
24+ ^
25+/tests/golden/types-nested-shallow-preserve/source.jibb:18:23: expression
26+++ bad-number ^- attr width+[%fill "bad"]
27+ ^
28+++ pending: tag needs context in partial inference
29+++ singleton: attr
30++$ event: cases proven disjoint; mold not checked
31++$ envelope: cases proven disjoint; mold not checked
32+++ constructor: envelope
33+++ unknown-target: explicit capital constraints are not supported by partial inference
tests/golden/types-nested-union-context/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Literals by context: "Number and cell literals resolve like tags: each waits for its context"; Molds: "Tags take their union from context".
2+tests: Nested named-union expressions, invalid and unknown contexts, shared and independent generic variables, unresolved tags and nulls. Unproven case coverage remains unsupported. This is a partial inference report.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-nested-union-context/source.jibbnew file+59
@@ -0,0 +1,59 @@
1++$ msg
2+ %go
3+ %stay
4++$ alt
5+ %go
6+ %stay
7++$ payload |$ [A]
8+ [%value item=A]
9+ %empty
10++$ box |$ [A]
11+ [%wrap item=(payload A)]
12+ %none
13++$ reverse |$ [A B]
14+ [%left item=A]
15+ [%right item=B]
16+++ lift |= x=A ^- (payload A) [%value x]
17+++ direct ^- (payload msg) (lift %go)
18+++ nested ^- (box msg) [%wrap (lift %go)]
19+++ nested-alias |= p=(payload msg) ^- (box msg) [%wrap p]
20+++ nested-typed ^- (box msg) [%wrap (lift (^- msg %go))]
21+++ nested-cord ^- (box @t) [%wrap (lift "hi")]
22+++ nested-ship ^- (box @p) [%wrap (lift ~zod)]
23+++ independent |= [t=@t p=@p]
24+ [(^- (box @t) [%wrap (lift t)]) (^- (box @p) [%wrap (lift p)])]
25+++ wrong-payload ^- (box @t) [%wrap (lift ~zod)]
26+++ wrong-tag ^- (box msg) [%wrap (lift %absent)]
27+++ wrong-origin |= x=alt ^- (box msg) [%wrap (lift x)]
28+++ generic |= x=A ^- (box A) [%wrap (lift x)]
29+++ repeated |= x=A ^- [a=(box A) b=(box A)] [a=[%wrap (lift x)] b=[%wrap (lift x)]]
30+++ unrelated-pending
31+ ~& %orphan
32+ ^- (box msg) [%wrap (lift %go)]
33+++ pending-null
34+ ~& ~
35+ ^- (box msg) [%wrap (lift %go)]
36+++ discarded-constructor
37+ ~& |=%orphan
38+ ^- (box msg) [%wrap (lift %go)]
39+++ unknown-output [%wrap (lift %go)]
40+++ unknown-target |= x=A ^- A [%wrap (lift %go)]
41+++ outer-callback |= [p=(payload A) fn=$-((payload A) B)] (fn p)
42+++ ctor-context ^- (box @t) (outer-callback (lift "hi") |=%wrap)
43+++ other-case ^- (box @t) %none
44++$ full-payload |$ [A]
45+ [%value item=A]
46+ [%skip code=@ud]
47++$ full-box |$ [A]
48+ [%wrap item=(full-payload A)]
49+ [%other code=@ud]
50+++ make-full |= x=A ^- (full-payload A) [%value x]
51+++ full-valid ^- (full-box msg) [%wrap (make-full %go)]
52+++ full-cord ^- (full-box @t) [%wrap (make-full "hi")]
53+++ full-ship ^- (full-box @p) [%wrap (make-full ~zod)]
54+++ full-generic |= x=A ^- (full-box A) [%wrap (make-full x)]
55+++ full-wrong ^- (full-box @t) [%wrap (make-full ~zod)]
56+++ full-missing ^- (full-box msg) [%wrap (make-full %missing)]
57+++ full-pending
58+ ~& %orphan
59+ ^- (full-box msg) [%wrap (make-full %go)]
tests/golden/types-nested-union-context/tokens.txtnew file+660
@@ -0,0 +1,660 @@
1+1:1 glyph +$
2+1:4 name msg
3+2:3 INDENT
4+2:3 lit %go
5+3:3 NEWLINE
6+3:3 lit %stay
7+4:1 DEDENT
8+4:1 NEWLINE
9+4:1 glyph +$
10+4:4 name alt
11+5:3 INDENT
12+5:3 lit %go
13+6:3 NEWLINE
14+6:3 lit %stay
15+7:1 DEDENT
16+7:1 NEWLINE
17+7:1 glyph +$
18+7:4 name payload
19+7:12 glyph |$
20+7:15 glyph [
21+7:16 tight tvar A
22+7:17 tight glyph ]
23+8:3 INDENT
24+8:3 glyph [
25+8:4 tight lit %value
26+8:11 name item
27+8:15 tight glyph =
28+8:16 tight tvar A
29+8:17 tight glyph ]
30+9:3 NEWLINE
31+9:3 lit %empty
32+10:1 DEDENT
33+10:1 NEWLINE
34+10:1 glyph +$
35+10:4 name box
36+10:8 glyph |$
37+10:11 glyph [
38+10:12 tight tvar A
39+10:13 tight glyph ]
40+11:3 INDENT
41+11:3 glyph [
42+11:4 tight lit %wrap
43+11:10 name item
44+11:14 tight glyph =
45+11:15 tight glyph (
46+11:16 tight name payload
47+11:24 tvar A
48+11:25 tight glyph )
49+11:26 tight glyph ]
50+12:3 NEWLINE
51+12:3 lit %none
52+13:1 DEDENT
53+13:1 NEWLINE
54+13:1 glyph +$
55+13:4 name reverse
56+13:12 glyph |$
57+13:15 glyph [
58+13:16 tight tvar A
59+13:18 tvar B
60+13:19 tight glyph ]
61+14:3 INDENT
62+14:3 glyph [
63+14:4 tight lit %left
64+14:10 name item
65+14:14 tight glyph =
66+14:15 tight tvar A
67+14:16 tight glyph ]
68+15:3 NEWLINE
69+15:3 glyph [
70+15:4 tight lit %right
71+15:11 name item
72+15:15 tight glyph =
73+15:16 tight tvar B
74+15:17 tight glyph ]
75+16:1 DEDENT
76+16:1 NEWLINE
77+16:1 glyph ++
78+16:4 name lift
79+16:9 glyph |=
80+16:12 name x
81+16:13 tight glyph =
82+16:14 tight tvar A
83+16:16 glyph ^-
84+16:19 glyph (
85+16:20 tight name payload
86+16:28 tvar A
87+16:29 tight glyph )
88+16:31 glyph [
89+16:32 tight lit %value
90+16:39 name x
91+16:40 tight glyph ]
92+17:1 NEWLINE
93+17:1 glyph ++
94+17:4 name direct
95+17:11 glyph ^-
96+17:14 glyph (
97+17:15 tight name payload
98+17:23 name msg
99+17:26 tight glyph )
100+17:28 glyph (
101+17:29 tight name lift
102+17:34 lit %go
103+17:37 tight glyph )
104+18:1 NEWLINE
105+18:1 glyph ++
106+18:4 name nested
107+18:11 glyph ^-
108+18:14 glyph (
109+18:15 tight name box
110+18:19 name msg
111+18:22 tight glyph )
112+18:24 glyph [
113+18:25 tight lit %wrap
114+18:31 glyph (
115+18:32 tight name lift
116+18:37 lit %go
117+18:40 tight glyph )
118+18:41 tight glyph ]
119+19:1 NEWLINE
120+19:1 glyph ++
121+19:4 name nested-alias
122+19:17 glyph |=
123+19:20 name p
124+19:21 tight glyph =
125+19:22 tight glyph (
126+19:23 tight name payload
127+19:31 name msg
128+19:34 tight glyph )
129+19:36 glyph ^-
130+19:39 glyph (
131+19:40 tight name box
132+19:44 name msg
133+19:47 tight glyph )
134+19:49 glyph [
135+19:50 tight lit %wrap
136+19:56 name p
137+19:57 tight glyph ]
138+20:1 NEWLINE
139+20:1 glyph ++
140+20:4 name nested-typed
141+20:17 glyph ^-
142+20:20 glyph (
143+20:21 tight name box
144+20:25 name msg
145+20:28 tight glyph )
146+20:30 glyph [
147+20:31 tight lit %wrap
148+20:37 glyph (
149+20:38 tight name lift
150+20:43 glyph (
151+20:44 tight glyph ^-
152+20:47 name msg
153+20:51 lit %go
154+20:54 tight glyph )
155+20:55 tight glyph )
156+20:56 tight glyph ]
157+21:1 NEWLINE
158+21:1 glyph ++
159+21:4 name nested-cord
160+21:16 glyph ^-
161+21:19 glyph (
162+21:20 tight name box
163+21:24 aura @t
164+21:26 tight glyph )
165+21:28 glyph [
166+21:29 tight lit %wrap
167+21:35 glyph (
168+21:36 tight name lift
169+21:41 str "hi"
170+21:45 tight glyph )
171+21:46 tight glyph ]
172+22:1 NEWLINE
173+22:1 glyph ++
174+22:4 name nested-ship
175+22:16 glyph ^-
176+22:19 glyph (
177+22:20 tight name box
178+22:24 aura @p
179+22:26 tight glyph )
180+22:28 glyph [
181+22:29 tight lit %wrap
182+22:35 glyph (
183+22:36 tight name lift
184+22:41 lit ~zod
185+22:45 tight glyph )
186+22:46 tight glyph ]
187+23:1 NEWLINE
188+23:1 glyph ++
189+23:4 name independent
190+23:16 glyph |=
191+23:19 glyph [
192+23:20 tight name t
193+23:21 tight glyph =
194+23:22 tight aura @t
195+23:25 name p
196+23:26 tight glyph =
197+23:27 tight aura @p
198+23:29 tight glyph ]
199+24:3 INDENT
200+24:3 glyph [
201+24:4 tight glyph (
202+24:5 tight glyph ^-
203+24:8 glyph (
204+24:9 tight name box
205+24:13 aura @t
206+24:15 tight glyph )
207+24:17 glyph [
208+24:18 tight lit %wrap
209+24:24 glyph (
210+24:25 tight name lift
211+24:30 name t
212+24:31 tight glyph )
213+24:32 tight glyph ]
214+24:33 tight glyph )
215+24:35 glyph (
216+24:36 tight glyph ^-
217+24:39 glyph (
218+24:40 tight name box
219+24:44 aura @p
220+24:46 tight glyph )
221+24:48 glyph [
222+24:49 tight lit %wrap
223+24:55 glyph (
224+24:56 tight name lift
225+24:61 name p
226+24:62 tight glyph )
227+24:63 tight glyph ]
228+24:64 tight glyph )
229+24:65 tight glyph ]
230+25:1 DEDENT
231+25:1 NEWLINE
232+25:1 glyph ++
233+25:4 name wrong-payload
234+25:18 glyph ^-
235+25:21 glyph (
236+25:22 tight name box
237+25:26 aura @t
238+25:28 tight glyph )
239+25:30 glyph [
240+25:31 tight lit %wrap
241+25:37 glyph (
242+25:38 tight name lift
243+25:43 lit ~zod
244+25:47 tight glyph )
245+25:48 tight glyph ]
246+26:1 NEWLINE
247+26:1 glyph ++
248+26:4 name wrong-tag
249+26:14 glyph ^-
250+26:17 glyph (
251+26:18 tight name box
252+26:22 name msg
253+26:25 tight glyph )
254+26:27 glyph [
255+26:28 tight lit %wrap
256+26:34 glyph (
257+26:35 tight name lift
258+26:40 lit %absent
259+26:47 tight glyph )
260+26:48 tight glyph ]
261+27:1 NEWLINE
262+27:1 glyph ++
263+27:4 name wrong-origin
264+27:17 glyph |=
265+27:20 name x
266+27:21 tight glyph =
267+27:22 tight name alt
268+27:26 glyph ^-
269+27:29 glyph (
270+27:30 tight name box
271+27:34 name msg
272+27:37 tight glyph )
273+27:39 glyph [
274+27:40 tight lit %wrap
275+27:46 glyph (
276+27:47 tight name lift
277+27:52 name x
278+27:53 tight glyph )
279+27:54 tight glyph ]
280+28:1 NEWLINE
281+28:1 glyph ++
282+28:4 name generic
283+28:12 glyph |=
284+28:15 name x
285+28:16 tight glyph =
286+28:17 tight tvar A
287+28:19 glyph ^-
288+28:22 glyph (
289+28:23 tight name box
290+28:27 tvar A
291+28:28 tight glyph )
292+28:30 glyph [
293+28:31 tight lit %wrap
294+28:37 glyph (
295+28:38 tight name lift
296+28:43 name x
297+28:44 tight glyph )
298+28:45 tight glyph ]
299+29:1 NEWLINE
300+29:1 glyph ++
301+29:4 name repeated
302+29:13 glyph |=
303+29:16 name x
304+29:17 tight glyph =
305+29:18 tight tvar A
306+29:20 glyph ^-
307+29:23 glyph [
308+29:24 tight name a
309+29:25 tight glyph =
310+29:26 tight glyph (
311+29:27 tight name box
312+29:31 tvar A
313+29:32 tight glyph )
314+29:34 name b
315+29:35 tight glyph =
316+29:36 tight glyph (
317+29:37 tight name box
318+29:41 tvar A
319+29:42 tight glyph )
320+29:43 tight glyph ]
321+29:45 glyph [
322+29:46 tight name a
323+29:47 tight glyph =
324+29:48 tight glyph [
325+29:49 tight lit %wrap
326+29:55 glyph (
327+29:56 tight name lift
328+29:61 name x
329+29:62 tight glyph )
330+29:63 tight glyph ]
331+29:65 name b
332+29:66 tight glyph =
333+29:67 tight glyph [
334+29:68 tight lit %wrap
335+29:74 glyph (
336+29:75 tight name lift
337+29:80 name x
338+29:81 tight glyph )
339+29:82 tight glyph ]
340+29:83 tight glyph ]
341+30:1 NEWLINE
342+30:1 glyph ++
343+30:4 name unrelated-pending
344+31:3 INDENT
345+31:3 glyph ~&
346+31:6 lit %orphan
347+32:5 INDENT
348+32:5 glyph ^-
349+32:8 glyph (
350+32:9 tight name box
351+32:13 name msg
352+32:16 tight glyph )
353+32:18 glyph [
354+32:19 tight lit %wrap
355+32:25 glyph (
356+32:26 tight name lift
357+32:31 lit %go
358+32:34 tight glyph )
359+32:35 tight glyph ]
360+33:1 DEDENT
361+33:1 DEDENT
362+33:1 NEWLINE
363+33:1 glyph ++
364+33:4 name pending-null
365+34:3 INDENT
366+34:3 glyph ~&
367+34:6 lit ~
368+35:5 INDENT
369+35:5 glyph ^-
370+35:8 glyph (
371+35:9 tight name box
372+35:13 name msg
373+35:16 tight glyph )
374+35:18 glyph [
375+35:19 tight lit %wrap
376+35:25 glyph (
377+35:26 tight name lift
378+35:31 lit %go
379+35:34 tight glyph )
380+35:35 tight glyph ]
381+36:1 DEDENT
382+36:1 DEDENT
383+36:1 NEWLINE
384+36:1 glyph ++
385+36:4 name discarded-constructor
386+37:3 INDENT
387+37:3 glyph ~&
388+37:6 glyph |=
389+37:8 tight lit %orphan
390+38:5 INDENT
391+38:5 glyph ^-
392+38:8 glyph (
393+38:9 tight name box
394+38:13 name msg
395+38:16 tight glyph )
396+38:18 glyph [
397+38:19 tight lit %wrap
398+38:25 glyph (
399+38:26 tight name lift
400+38:31 lit %go
401+38:34 tight glyph )
402+38:35 tight glyph ]
403+39:1 DEDENT
404+39:1 DEDENT
405+39:1 NEWLINE
406+39:1 glyph ++
407+39:4 name unknown-output
408+39:19 glyph [
409+39:20 tight lit %wrap
410+39:26 glyph (
411+39:27 tight name lift
412+39:32 lit %go
413+39:35 tight glyph )
414+39:36 tight glyph ]
415+40:1 NEWLINE
416+40:1 glyph ++
417+40:4 name unknown-target
418+40:19 glyph |=
419+40:22 name x
420+40:23 tight glyph =
421+40:24 tight tvar A
422+40:26 glyph ^-
423+40:29 tvar A
424+40:31 glyph [
425+40:32 tight lit %wrap
426+40:38 glyph (
427+40:39 tight name lift
428+40:44 lit %go
429+40:47 tight glyph )
430+40:48 tight glyph ]
431+41:1 NEWLINE
432+41:1 glyph ++
433+41:4 name outer-callback
434+41:19 glyph |=
435+41:22 glyph [
436+41:23 tight name p
437+41:24 tight glyph =
438+41:25 tight glyph (
439+41:26 tight name payload
440+41:34 tvar A
441+41:35 tight glyph )
442+41:37 name fn
443+41:39 tight glyph =
444+41:40 tight glyph $-(
445+41:43 tight glyph (
446+41:44 tight name payload
447+41:52 tvar A
448+41:53 tight glyph )
449+41:55 tvar B
450+41:56 tight glyph )
451+41:57 tight glyph ]
452+41:59 glyph (
453+41:60 tight name fn
454+41:63 name p
455+41:64 tight glyph )
456+42:1 NEWLINE
457+42:1 glyph ++
458+42:4 name ctor-context
459+42:17 glyph ^-
460+42:20 glyph (
461+42:21 tight name box
462+42:25 aura @t
463+42:27 tight glyph )
464+42:29 glyph (
465+42:30 tight name outer-callback
466+42:45 glyph (
467+42:46 tight name lift
468+42:51 str "hi"
469+42:55 tight glyph )
470+42:57 glyph |=
471+42:59 tight lit %wrap
472+42:64 tight glyph )
473+43:1 NEWLINE
474+43:1 glyph ++
475+43:4 name other-case
476+43:15 glyph ^-
477+43:18 glyph (
478+43:19 tight name box
479+43:23 aura @t
480+43:25 tight glyph )
481+43:27 lit %none
482+44:1 NEWLINE
483+44:1 glyph +$
484+44:4 name full-payload
485+44:17 glyph |$
486+44:20 glyph [
487+44:21 tight tvar A
488+44:22 tight glyph ]
489+45:3 INDENT
490+45:3 glyph [
491+45:4 tight lit %value
492+45:11 name item
493+45:15 tight glyph =
494+45:16 tight tvar A
495+45:17 tight glyph ]
496+46:3 NEWLINE
497+46:3 glyph [
498+46:4 tight lit %skip
499+46:10 name code
500+46:14 tight glyph =
501+46:15 tight aura @ud
502+46:18 tight glyph ]
503+47:1 DEDENT
504+47:1 NEWLINE
505+47:1 glyph +$
506+47:4 name full-box
507+47:13 glyph |$
508+47:16 glyph [
509+47:17 tight tvar A
510+47:18 tight glyph ]
511+48:3 INDENT
512+48:3 glyph [
513+48:4 tight lit %wrap
514+48:10 name item
515+48:14 tight glyph =
516+48:15 tight glyph (
517+48:16 tight name full-payload
518+48:29 tvar A
519+48:30 tight glyph )
520+48:31 tight glyph ]
521+49:3 NEWLINE
522+49:3 glyph [
523+49:4 tight lit %other
524+49:11 name code
525+49:15 tight glyph =
526+49:16 tight aura @ud
527+49:19 tight glyph ]
528+50:1 DEDENT
529+50:1 NEWLINE
530+50:1 glyph ++
531+50:4 name make-full
532+50:14 glyph |=
533+50:17 name x
534+50:18 tight glyph =
535+50:19 tight tvar A
536+50:21 glyph ^-
537+50:24 glyph (
538+50:25 tight name full-payload
539+50:38 tvar A
540+50:39 tight glyph )
541+50:41 glyph [
542+50:42 tight lit %value
543+50:49 name x
544+50:50 tight glyph ]
545+51:1 NEWLINE
546+51:1 glyph ++
547+51:4 name full-valid
548+51:15 glyph ^-
549+51:18 glyph (
550+51:19 tight name full-box
551+51:28 name msg
552+51:31 tight glyph )
553+51:33 glyph [
554+51:34 tight lit %wrap
555+51:40 glyph (
556+51:41 tight name make-full
557+51:51 lit %go
558+51:54 tight glyph )
559+51:55 tight glyph ]
560+52:1 NEWLINE
561+52:1 glyph ++
562+52:4 name full-cord
563+52:14 glyph ^-
564+52:17 glyph (
565+52:18 tight name full-box
566+52:27 aura @t
567+52:29 tight glyph )
568+52:31 glyph [
569+52:32 tight lit %wrap
570+52:38 glyph (
571+52:39 tight name make-full
572+52:49 str "hi"
573+52:53 tight glyph )
574+52:54 tight glyph ]
575+53:1 NEWLINE
576+53:1 glyph ++
577+53:4 name full-ship
578+53:14 glyph ^-
579+53:17 glyph (
580+53:18 tight name full-box
581+53:27 aura @p
582+53:29 tight glyph )
583+53:31 glyph [
584+53:32 tight lit %wrap
585+53:38 glyph (
586+53:39 tight name make-full
587+53:49 lit ~zod
588+53:53 tight glyph )
589+53:54 tight glyph ]
590+54:1 NEWLINE
591+54:1 glyph ++
592+54:4 name full-generic
593+54:17 glyph |=
594+54:20 name x
595+54:21 tight glyph =
596+54:22 tight tvar A
597+54:24 glyph ^-
598+54:27 glyph (
599+54:28 tight name full-box
600+54:37 tvar A
601+54:38 tight glyph )
602+54:40 glyph [
603+54:41 tight lit %wrap
604+54:47 glyph (
605+54:48 tight name make-full
606+54:58 name x
607+54:59 tight glyph )
608+54:60 tight glyph ]
609+55:1 NEWLINE
610+55:1 glyph ++
611+55:4 name full-wrong
612+55:15 glyph ^-
613+55:18 glyph (
614+55:19 tight name full-box
615+55:28 aura @t
616+55:30 tight glyph )
617+55:32 glyph [
618+55:33 tight lit %wrap
619+55:39 glyph (
620+55:40 tight name make-full
621+55:50 lit ~zod
622+55:54 tight glyph )
623+55:55 tight glyph ]
624+56:1 NEWLINE
625+56:1 glyph ++
626+56:4 name full-missing
627+56:17 glyph ^-
628+56:20 glyph (
629+56:21 tight name full-box
630+56:30 name msg
631+56:33 tight glyph )
632+56:35 glyph [
633+56:36 tight lit %wrap
634+56:42 glyph (
635+56:43 tight name make-full
636+56:53 lit %missing
637+56:61 tight glyph )
638+56:62 tight glyph ]
639+57:1 NEWLINE
640+57:1 glyph ++
641+57:4 name full-pending
642+58:3 INDENT
643+58:3 glyph ~&
644+58:6 lit %orphan
645+59:5 INDENT
646+59:5 glyph ^-
647+59:8 glyph (
648+59:9 tight name full-box
649+59:18 name msg
650+59:21 tight glyph )
651+59:23 glyph [
652+59:24 tight lit %wrap
653+59:30 glyph (
654+59:31 tight name make-full
655+59:41 lit %go
656+59:44 tight glyph )
657+59:45 tight glyph ]
658+59:46 DEDENT
659+59:46 DEDENT
660+59:46 NEWLINE
tests/golden/types-nested-union-context/tree.txtnew file+302

This diff is too big to show here.

tests/golden/types-nested-union-context/types.txtnew file+49

This diff is too big to show here.

tests/golden/types-null-context/about.txt+1−1

This diff is too big to show here.

tests/golden/types-null-context/source.jibb+1−1

This diff is too big to show here.

tests/golden/types-null-context/tokens.txt+8−8

This diff is too big to show here.

tests/golden/types-null-context/tree.txt+4−4

This diff is too big to show here.

tests/golden/types-null-context/types.txt+1−7

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-positional-faces/source.jibbnew file+25

This diff is too big to show here.

tests/golden/types-positional-faces/tokens.txtnew file+394

This diff is too big to show here.

tests/golden/types-positional-faces/tree.txtnew file+197

This diff is too big to show here.

tests/golden/types-positional-faces/types.txtnew file+42

This diff is too big to show here.

tests/golden/types-prelude-arithmetic/about.txt+2−2

This diff is too big to show here.

tests/golden/types-prelude-arithmetic/source.jibb+5−5

This diff is too big to show here.

tests/golden/types-prelude-arithmetic/tokens.txt+19−19

This diff is too big to show here.

tests/golden/types-prelude-arithmetic/tree.txt+11−11

This diff is too big to show here.

tests/golden/types-prelude-arithmetic/types.txt+25−7

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-prelude-ask/source.jibbnew file+55

This diff is too big to show here.

tests/golden/types-prelude-ask/tokens.txtnew file+804

This diff is too big to show here.

tests/golden/types-prelude-ask/tree.txtnew file+335

This diff is too big to show here.

tests/golden/types-prelude-ask/types.txtnew file+41

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-prelude-cmd/types.txt+7−1

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-prelude-generic-alias/module-trees.txtnew file+10

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-prelude-generic-alias/modules/ui/alias-helper.jibbnew file+2

This diff is too big to show here.

tests/golden/types-prelude-generic-alias/source.jibbnew file+13

This diff is too big to show here.

tests/golden/types-prelude-generic-alias/tokens.txtnew file+146

This diff is too big to show here.

tests/golden/types-prelude-generic-alias/tree.txtnew file+51

This diff is too big to show here.

tests/golden/types-prelude-generic-alias/types.txtnew file+13

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-prelude-like/source.jibbnew file+22

This diff is too big to show here.

tests/golden/types-prelude-like/tokens.txtnew file+320

This diff is too big to show here.

tests/golden/types-prelude-like/tree.txtnew file+163

This diff is too big to show here.

tests/golden/types-prelude-like/types.txtnew file+18

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-prelude-sub-nested/source.jibbnew file+20

This diff is too big to show here.

tests/golden/types-prelude-sub-nested/tokens.txtnew file+211

This diff is too big to show here.

tests/golden/types-prelude-sub-nested/tree.txtnew file+100

This diff is too big to show here.

tests/golden/types-prelude-sub-nested/types.txtnew file+27

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-prelude-sub/source.jibbnew file+37

This diff is too big to show here.

tests/golden/types-prelude-sub/tokens.txtnew file+380

This diff is too big to show here.

tests/golden/types-prelude-sub/tree.txtnew file+164

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-record-change-generic/about.txt+1−1

This diff is too big to show here.

tests/golden/types-record-change-generic/source.jibb−2

This diff is too big to show here.

tests/golden/types-record-change-generic/tokens.txt+1−25

This diff is too big to show here.

tests/golden/types-record-change-generic/tree.txt+1−10

This diff is too big to show here.

tests/golden/types-record-change-generic/types.txt−2

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-request-normal/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-request-normal/mar/full.txtnew file+5

This diff is too big to show here.

tests/golden/types-request-normal/marks.txtnew file+1

This diff is too big to show here.

tests/golden/types-request-normal/module-trees.txtnew file+5

This diff is too big to show here.

tests/golden/types-request-normal/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-request-normal/modules/ui/api/demo.jibbnew file+2

This diff is too big to show here.

tests/golden/types-request-normal/source.jibbnew file+9

This diff is too big to show here.

tests/golden/types-request-normal/tokens.txtnew file+95

This diff is too big to show here.

tests/golden/types-request-normal/tree.txtnew file+50

This diff is too big to show here.

tests/golden/types-request-normal/types.txtnew file+26

This diff is too big to show here.

tests/golden/types-tuple-context-nested/about.txt+1−1

This diff is too big to show here.

tests/golden/types-tuple-context-nested/types.txt+1−7

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-union-pattern-result-controls/about.txt+1−1

This diff is too big to show here.

tests/golden/types-union-pattern-result-controls/types.txt+1−1

This diff is too big to show here.

tests/golden/types-union-patterns/about.txt+1−1

This diff is too big to show here.

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

This diff is too big to show here.

tests/importer/about.txt+5

This diff is too big to show here.

tests/importer/small.txt+10

This diff is too big to show here.

tests/importer/tree.txt+9−2

This diff is too big to show here.

tests/lib/jibb-api-evidence.hoonnew file+258

This diff is too big to show here.

tests/lib/jibb-arithmetic-guards.hoonnew file+58

This diff is too big to show here.

tests/lib/jibb-ask-guards.hoonnew file+63

This diff is too big to show here.

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

This diff is too big to show here.

tests/lib/jibb-closed-gate-guards.hoonnew file+60

This diff is too big to show here.

tests/lib/jibb-constructor-fit-guards.hoonnew file+128

This diff is too big to show here.

tests/lib/jibb-gate-free-guards.hoonnew file+79

This diff is too big to show here.

tests/lib/jibb-gate-free-source.hoonnew file+95

This diff is too big to show here.

tests/lib/jibb-generic-alias.hoonnew file+48

This diff is too big to show here.

tests/lib/jibb-hole-guards.hoonnew file+77

This diff is too big to show here.

tests/lib/jibb-import-default.hoonnew file+50

This diff is too big to show here.

tests/lib/jibb-list-alias-guards.hoonnew file+27

This diff is too big to show here.

tests/lib/jibb-nested-union-guards.hoonnew file+67

This diff is too big to show here.

tests/lib/jibb-positional-face-guards.hoonnew file+38

This diff is too big to show here.

tests/lib/jibb-proj-guards.hoonnew file+124

This diff is too big to show here.

tests/lib/jibb-qath-fuel.hoonnew file+52

This diff is too big to show here.

tests/lib/jibb-qath-source.hoonnew file+66

This diff is too big to show here.

tests/lib/jibb-request-guards.hoonnew file+149

This diff is too big to show here.

tests/lib/jibb-sub-guards.hoonnew file+37

This diff is too big to show here.

tests/lib/jibb-todo-api.hoonnew file+85

This diff is too big to show here.

tests/lib/jibb.hoon+1458−991

This diff is too big to show here.

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

This diff is too big to show here.

tests/type-api-evidence/expected.txtnew file+1

This diff is too big to show here.

tests/type-gate-free/about.txtnew file+1

This diff is too big to show here.

tests/type-gate-free/expected.txtnew file+9

This diff is too big to show here.

tests/type-gate-free/todo-gate.txtnew file+40

This diff is too big to show here.

tests/type-gate-free/todo-noun.txtnew file+40

This diff is too big to show here.

tests/type-gate-free/todo.txtnew file+40

This diff is too big to show here.

tests/type-import-default/about.txtnew file+1

This diff is too big to show here.

tests/type-import-default/controls.txtnew file+16

This diff is too big to show here.

tests/type-import-default/expected.txtnew file+9

This diff is too big to show here.

tests/type-import-default/parent.txtnew file+3

This diff is too big to show here.

tests/type-import-default/tlon.txtnew file+18

This diff is too big to show here.

tests/type-import-diagnostic/nested.txt+1−1

This diff is too big to show here.

tests/type-import/expected.txt+10

This diff is too big to show here.

tests/type-list-alias/expected.txtnew file+36

This diff is too big to show here.

tests/type-todo-api/about.txtnew file+1

This diff is too big to show here.

tests/type-todo-api/expected.txtnew file+17

This diff is too big to show here.

tests/type-todo-api/negative-expected.txtnew file+26

This diff is too big to show here.

tests/type-todo-api/negative.txtnew file+12

This diff is too big to show here.

tests/type-todo-api/source.txtnew file+21

This diff is too big to show here.

tests/type-todo-api/unsupported.txtnew file+13

This diff is too big to show here.

tools/importer-test+1−1

This diff is too big to show here.

tools/testdata/ship-selftest+15−1

This diff is too big to show here.

tools/type-api-evidence-testnew file+40

This diff is too big to show here.

tools/type-arithmetic-guards-testnew file+28

This diff is too big to show here.

tools/type-ask-guards-testnew file+31

This diff is too big to show here.

tools/type-closed-gate-guards-testnew file+29

This diff is too big to show here.

tools/type-constructor-fit-guards-testnew file+29

This diff is too big to show here.

tools/type-gate-free-guards-testnew file+29

This diff is too big to show here.

tools/type-gate-free-source-testnew file+50

This diff is too big to show here.

tools/type-generic-alias-testnew file+28

This diff is too big to show here.

tools/type-hole-guards-testnew file+32

This diff is too big to show here.

tools/type-import-default-testnew file+38

This diff is too big to show here.

tools/type-list-alias-testnew file+33

This diff is too big to show here.

tools/type-nested-union-guards-testnew file+29

This diff is too big to show here.

tools/type-positional-face-guards-testnew file+29

This diff is too big to show here.

tools/type-proj-guards-testnew file+32

This diff is too big to show here.

tools/type-qath-guards-testnew file+31

This diff is too big to show here.

tools/type-request-guards-testnew file+31

This diff is too big to show here.

tools/type-sub-guards-testnew file+31

This diff is too big to show here.

tools/type-todo-api-testnew file+62

This diff is too big to show here.