on master help sign in
README.md+1−1
since splitsnapshots
unifiedsplit
@@ -42,7 +42,7 @@ tools/hoon '(golden /a/b/jibb (crip "++ main view"))'
42tools/hoon --raw --cord src=tests/golden/foo/source.jibb 'tree:(golden /a/b/jibb src)'
42tools/hoon --raw --cord src=tests/golden/foo/source.jibb 'tree:(golden /a/b/jibb src)'
43```
43```
44
44
45−`tools/testdata/selftest` tests both tools against a stub library, and `tools/doc-blocks` against Markdown it writes. `tools/importer-test` compares the partial Hoon importer's fixture projections against their golden file. `tools/type-import-test` and `tools/type-mark-test` check the importer/checker bridges under eval; the ship suite runs the same fixtures.
45+`tools/testdata/selftest` tests both tools against a stub library, and `tools/doc-blocks` against Markdown it writes. `tools/importer-test` compares the partial Hoon importer's fixture projections against their golden file. `tools/type-import-test`, `tools/type-tlon-test`, `tools/type-mark-test`, `tools/type-poke-test` and `tools/type-api-paths-test` check importer/checker, prelude and partial API path analysis boundaries under eval; the ship suite runs the same fixtures.
46
46
47### The doc's examples
47### The doc's examples
48
48
docs/compiler.md+37−9
@@ -56,27 +56,51 @@ 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 two-binder cell pattern, a complete two-arm loobean branch, a complete two-arm unit-shaped branch, closed local mold aliases and acyclic forward value references. It instantiates generalized top-level definitions when they are used. Acyclic local value definitions can refer forward and generalize variables that are free of their enclosing environment; captured variables and explicit capitals remain shared. Acyclic simple local mold aliases can also refer forward, and are scoped to the body, not its gate's sample. Nonrecursive generic aliases of supported molds can be applied at exact arity, including locally and through library interfaces; their parameters are lexical. Closed, provably disjoint nonrecursive unions and tagged single-case molds support contextual term values, `~` and `|=%tag` constructors. A null-headed cell can match a union case but does not supply a `|=%$` constructor; unresolved tags and nulls remain pending, with distinct partial-inference diagnostics. Nonrecursive top-level generic union molds with provably disjoint cases also support contextual tags and constructors at exact arity; their arguments are retained through generalization and supported library interfaces. Nonrecursive generic aliases can reorder, repeat or omit parameters while preserving a supported union’s origin, including through local scopes and library interfaces. A generic union declared directly inside a body remains unsupported, as do recursive local groups and recursive molds. A value with type variable `A` can fit a field whose type is that same `A`, including in generic union payloads and nested or repeated record fields. A differing-variable face constraint remains unsupported. It can infer and generalize atom constraints arising from explicit capitals or bare sample binders, preserve those constraints through aliases, instantiate them independently, and print multiple constraints. Unresolved decimal variables default to `@ud` for inferred types without gates; defaulting inside gate types and other constraint cases remain incomplete. It does not yet check a module, complete imports, general patterns, general deferred constraints, recursive molds, dependency cycles or most errors with both conflicting excerpts. Definite cast and call mismatches, incompatible branches and overlapping union cases report both sites and excerpts. Concrete branch results can join at an explicitly present parent aura or `@`. Some known tuple and record positions acquire matching faces; other variable-dependent face merges, general branch tag context and ambiguous call-result propagation remain unsupported; function compatibility involving nested `@` and variable-dependent joins remain unsupported except for equal types. The current dependency pass can take quadratic time on long forward chains; the milestone's speed target remains unverified. A separate conservative pass reports unions whose cases are provably disjoint or overlapping and leaves other cases unresolved; it does not claim the mold is checked. Unsupported forms are reported as such, and the partial output says the module has not been checked.
59+The inference fragment supports fixed auras, unrestricted `@`, one-way widening into it and toward aura-family ancestors, generic variables and gates, faced and unfaced cells, cell sample binders, known record field reads, a cell pattern of two or more binders, a complete two-arm loobean branch, a complete two-arm unit-shaped branch, closed local mold aliases and acyclic forward value references. For a supported single syntactic top-level recursive gate, the checker infers the sample first and uses that exact sample, including its field faces, in a monomorphic self placeholder. The completed body must unify with the placeholder before the gate is generalized; incompatible recursive arguments can report the call and argument sites. Uses of generalized top-level definitions instantiate their schemes independently. For a complete loobean branch with one direct self-call arm, the checker can infer the other arm independently and use its closed, fully resolved type to seed the recursive result; it then checks the whole body. Open or pending base types do not seed the result, and other branch shapes still depend on the existing partial inference. A supported single local recursive gate also uses a monomorphic self reference while its body is checked, then generalizes variables free of its enclosing environment; captured variables remain shared. Acyclic local value definitions can refer forward. The checker collects written capitals per `++` before inference, excluding nested definitions: a capital used in an enclosing definition is shared with its locals, even when written later, while a capital introduced only in a local definition is generalized there. Sibling locals can introduce independent capitals with the same spelling; generic mold parameters keep their own scope. Top-level groups of syntactic gates are inferred together with monomorphic placeholders and shared substitutions, then generalized only after the whole group checks; downstream uses and library interfaces instantiate those schemes independently. A dependency graph identifies groups with two iterative depth-first passes; its conservative local-reference edges can reject otherwise valid programs. Supported local mutually recursive gate groups also use shared monomorphic placeholders and generalize only after the group checks, preserving captured outer variables. Some proven non-gate value cycles are diagnosed; other mixed gate/value cycles, polymorphic recursion, unresolved literal constraints and unresolved branch joins remain unsupported. Acyclic simple local mold aliases can also refer forward, and are scoped to the body, not its gate's sample. Nonrecursive generic aliases of supported molds can be applied at exact arity, including locally and through library interfaces; their parameters are lexical. Closed, provably disjoint nonrecursive unions and tagged single-case molds support contextual term values, `~` and `|=%tag` constructors. A null-headed cell can match a union case but does not supply a `|=%$` constructor; unresolved tags and nulls remain pending, with distinct partial-inference diagnostics. Nonrecursive top-level generic union molds with provably disjoint cases also support contextual tags and constructors at exact arity; their arguments are retained through generalization and supported library interfaces. Nonrecursive generic aliases can reorder, repeat or omit parameters while preserving a supported union’s origin, including through local scopes and library interfaces. A generic union declared directly inside a body and recursive molds remain unsupported. A directly known named union can instantiate an unconstrained generic gate sample while retaining its origin, generic arguments and faces. Unnamed, pending-tag, recursive, unknown-atom and variable-bound union origins remain unsupported. A value with type variable `A` can fit a field whose type is that same `A`, including in generic union payloads and nested or repeated record fields. A differing-variable face constraint remains unsupported. When inference forces two distinct explicitly written capitals equal, it reports both source sites; forcing a capital to a concrete type remains unsupported in this fragment. It can infer and generalize atom constraints arising from explicit capitals or bare sample binders, preserve those constraints through aliases, instantiate them independently, and print multiple constraints. Unresolved decimal variables default to `@ud` for inferred types without gates; defaulting inside gate types and other constraint cases remain incomplete. It does not yet check a module, complete imports, general patterns, general deferred constraints, recursive molds, dependency cycles or most errors with both conflicting excerpts. Definite cast and call mismatches, incompatible branches and overlapping union cases report both sites and excerpts. Concrete branch results can join at an explicitly present parent aura or `@`. Some known tuple and record positions acquire matching faces; other variable-dependent face merges, general branch tag context and ambiguous call-result propagation remain unsupported; function compatibility involving nested `@` and variable-dependent joins remain unsupported except for equal types. For a single recursive gate outside a group, the reporting path repeats inference rather than instantiating its generalized interface inside its own body; a group report uses its stored schemes. This adds work, and the current dependency pass can take quadratic time on long forward chains; the milestone's speed target remains unverified. A separate conservative pass reports unions whose cases are provably disjoint or overlapping and leaves other cases unresolved; it does not claim the mold is checked. Unsupported forms are reported as such, and the partial output says the module has not been checked.
60+
61+A single-arm cell pattern can bind two or more positions, with its last binder capturing the remaining tail. Duplicate and shadowed names are rejected. A definite non-cell spine fails; an intermediate union or collection that might contain a cell remains unsupported. 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+
63+String interpolation infers its pieces in order and preserves substitutions and pending constraints. A piece with a known atom aura, unrestricted `@`, or a tape `(list @tD)` is accepted; an isolated decimal literal takes its normal `@ud` default. A known cell reports that it needs a printer, and an explicitly generic atom asks for an aura at its use site. Loobeans, term singletons, non-tape collections, open types and a type fixed only later remain unsupported in this fragment.
64+
65+The Hoon bridge translates imported `*` as the any-noun type, directly or within supported nonrecursive cells. The reader may still decline a disjoint tagged union with a noun payload, and recursive imports containing `*` remain unsupported. It accepts an exact fork of the two loobean singletons as `?`, and each singleton separately as `%.y` or `%.n`, including inside supported faced cells. Contextual literals specialize against a loobean singleton. Open `%f`, other values, and other forks containing loobean singletons remain unsupported; recursive Hoon molds containing flags can also fail closed.
66+
67+A bare tag that provably matches no case of a known union reports the union and tag sites. This covers casts, single-argument calls, contextual unit payloads, list items and supported branch arms, including unnamed imported unions. For syntactic tuples, ordered fit replay can identify a missing tag in a nested position; an earlier mismatch or uncertainty stops the replay instead of guessing. Existing tags whose shape or payload does not fit retain the ordinary mismatch; unresolved tags stay pending.
68+
69+A change can replace uniquely named fields on a fully known, faced record spine, including through a nested wing. Replacements receive the field type as context, substitutions and pending constraints are retained, and the resulting type remains the original record. Missing fields, empty changes and definite replacement mismatches report sites; the expected-type site is the edit, since the original field declaration location is not retained. Unknown or partly unfaced spines, ambiguous fields and repeated edits remain unsupported. A cast to a known record also supplies field context to a tuple or record initializer, including nested list and union fields. The expected-type site is the cast mold; the original field declaration location is not retained. Isolated cart-style `init` and `update` expressions infer in this fragment. The complete cart-store source fails closed because store kind and declaration scope are not yet checked.
60
70
61For supported closed unions, the type printer keeps the union’s origin separate from its displayed name. It prints an in-scope name such as `msg` or `msg.lib`, including in records and gates; an accessible imported nongeneric alias may name a transitive union. A nongeneric body-local union that escapes its scope, or an origin without an accessible name, prints its cases separated by spaces, parenthesized when nested. That case-list form is print-only. A supported generic union prints its name and all arguments, including unused arguments; when its name is unavailable, the partial printer reports that limitation instead of dropping its arguments. Two faces for the same imported origin remain compatible; compatibility between distinct union origins, including in gate types, remains unsupported. Some comparisons of generic union arguments also remain unsupported rather than deciding equality or mismatch. The Hoon bridge also translates some imported unnamed unions into this representation; unsupported cases remain errors.
71For supported closed unions, the type printer keeps the union’s origin separate from its displayed name. It prints an in-scope name such as `msg` or `msg.lib`, including in records and gates; an accessible imported nongeneric alias may name a transitive union. A nongeneric body-local union that escapes its scope, or an origin without an accessible name, prints its cases separated by spaces, parenthesized when nested. That case-list form is print-only. A supported generic union prints its name and all arguments, including unused arguments; when its name is unavailable, the partial printer reports that limitation instead of dropping its arguments. Two faces for the same imported origin remain compatible; compatibility between distinct union origins, including in gate types, remains unsupported. Some comparisons of generic union arguments also remain unsupported rather than deciding equality or mismatch. The Hoon bridge also translates some imported unnamed unions into this representation; unsupported cases remain errors.
62
72
73+Multi-argument calls form one right-nested sample: `f a b c` supplies `[a [b c]]`, with the last argument able to be a cell itself. The fragment fits the complete sample, preserving known faces and shared variables. Known sample positions can provide list or union context to arguments; unknown sample shapes use ordinary inference and some contextual forms remain unsupported. For a definite mismatch, the diagnostic points to a specific argument when it can establish which one failed; otherwise it reports the combined sample.
74+
63−A list literal can be inferred when a cast or known gate sample supplies a list type and the supplied prelude has the validated standard list definition. Empty, nonempty and nested literals work, including contextual union tags in elements; mismatched elements report the item and expected type. Imported Hoon lists share this representation. Without a known context or the validated prelude list, the partial checker fails closed; general list construction remains unfinished. For a known standard list with a supported element type, it also infers a complete two-arm branch using `~` and `[item rest]`, in either order. The binders have the element and list types and cannot shadow or duplicate names. Unknown subjects, unsupported element types, other patterns and incomplete arms remain unsupported.
75+A list literal can be inferred when a cast or known gate sample supplies a list type and the supplied prelude has the validated standard list definition. Empty, nonempty and nested literals work, including contextual union tags in elements; mismatched elements report the item and expected type. Imported Hoon lists share this representation. Under the same known context, `~` and zero-valued term literals fit an empty list, and a two-item unfaced cell `[head tail]` is a cons; cons cells and list literals can be nested. Mismatched heads or tails report both sites. A known list result also supplies context through complete loobean, unit-shaped and list-shaped branches, including recursive and nested branches. Known loobean result context can propagate through supported complete branches and binder-only cell arms, with a final directional fit; a binder-only arm over a union subject remains unsupported. A known gate with an unresolved result variable can also receive an enclosing result type before its argument is inferred, for example allowing `^- (list @t) (id ~)`; unknown callees and unresolved targets retain the conservative path. A known gate sample supplies context to corresponding positions of a single tuple or record argument, including nested cells; a zero literal can therefore fit a list position. A bound zero constant still remains unsupported rather than a definite mismatch, and an unknown callee does not supply context. Uncontextualized list literals also infer with a fresh element variable, including empty and nested lists; the resulting variable can generalize. Unresolved item tags and uncertain widening remain unsupported. Faced or longer cons cells, and a missing or altered prelude list remain unsupported. For a known standard list with a supported element type, it also infers a complete two-arm branch using `~` and `[item rest]`, in either order. The binders have the element and list types and cannot shadow or duplicate names. Unknown subjects, unsupported element types, other patterns and incomplete arms remain unsupported.
76+
77+A term-headed pair such as `gap+%s2` follows the same contextual inference as `[%gap %s2]`; its synthetic head uses the pair’s span in diagnostics.
78+
79+A backtick constructs a unit when the supplied prelude has the validated standard `unit` template. Its payload is inferred normally, retaining pending literals and generic variables; nested units work and the prelude’s `some` becomes available. With ordinary result annotations, its `bind`, `biff`, `both`, `clap`, `clef` and `flit` also infer. A known unit in a cast, call, list item or record field supplies its payload context, including nested units and lists; definite mismatches identify the payload and context. Unrelated union identities, some variable-dependent fits, and missing or altered prelude templates remain unsupported.
64
80
65A 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.
66
82
83+A known closed union with two or more arms can be matched when each arm provably covers or excludes each remaining case. The checker first tries whole cases; when a pattern splits a case, it can expand known `?` positions into their two noun values, up to 64 alternatives across the union. Binders retain the original case type, and one arm may bind several refinements of that case. It reports missing alternatives and arms already covered, checks tags by noun value, and supports imported and generic union cases. Other partial patterns, expansions above the limit, binders spanning distinct cases, differing arm result types and some complex two-arm subjects remain unsupported. When a cast or known call sample supplies a result type, a known union subject accessed by a wing, a grouped wing or a supported shallow call can propagate that context through whole-case arms and supported finite loobean refinements, including nested cell and list positions. Other partial-pattern contexts and subject forms remain unsupported. The Grammar’s `step` block infers in this fragment, but its module is not yet checked.
84+
67A 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.
68
86
69−The separate `jibb-dev/lib/jibb-import.hoon` is an unfinished reader for selected Hoon type graphs. It handles named recursion, nested map, set, queue, list, unit, jar and jug arguments, direct ordered maps, and direct `$^` unions whose source branches can be proved disjoint. It also reads ordered map fields in records when the map arguments are syntactically fixed atom molds and other fields are fixed atom molds or standard collections of static atom molds. Collection names must not be shadowed. The reader can also import a mark door sample, removing its outer sample face and validating its build subject. The reader checks explicit Hoon `$%`, `$?` and `$^` unions against the Grammar’s disjointness rule (doc question 22). It re-evaluates statically recognizable source branches before Hoon can collapse them, checks materialized fork cases, and rejects shapes it cannot prove disjoint. Static records may also have verified standard-collection and `path` siblings. One direct explicit union argument in a standard list, set, map or unit is accepted when its call wrapper and collection provenance are verified and its static cases are pairwise disjoint. A synthetic regression checks that forged wrapper subjects, samples and tails are rejected. Other collection-union forms, nested ordered maps, general source-level disjointness and complete integration with the checker remain unfinished. `+golden-types-imports` can consume fixed-aura atoms, valid term singletons, nested faced or unfaced cells, unions of supported, pairwise-disjoint cases, and opaque standard collections with supported arguments from caller-supplied reader results for declared `/-` imports; `+golden-types-with-marks` accepts the same shapes for declared marks. The caller must pass unchanged results from the source-aware reader: the bridge validates the supplied graph but cannot detect source cases Hoon collapsed before that graph was built. The opaque collection types retain their names and arguments for identity, unification and printing. The validated standard prelude `list` mold shares the imported list representation; other Jibb-written collection molds and prelude collection operations are not yet connected. Other forms remain unsupported. Its disjointness proof is conservative and can reject a valid union it cannot prove disjoint. Collection recognition requires the originating `/sur` core. The reader validates direct zuse subjects and Ford subjects consisting of faced imported cores and a validated tail, checking imported cores transitively; it rejects shadowed names, inconsistent core subjects and other subject shapes. For a recursive reference, the reader matches the exact Hoon hold against named arms in validated cores, including transitive Ford imports; it rejects missing, unlabelled or ambiguous origins. Its fixtures include three real Tlon files; `tools/importer-test` compares the internal projection under eval, and the ship test compares the same golden output. `tools/type-import-test` and `tools/type-mark-test` compare bridge reports under eval and on the ship. `tools/clay-fixtures` also passes Clay-built `/sur` molds and mark samples through the Clay-built importer and partial checker.
87+The separate `jibb-dev/lib/jibb-import.hoon` is an unfinished reader for selected Hoon type graphs. It handles named recursion, nested map, set, queue, list, unit, jar and jug arguments, direct ordered maps, and direct `$^` unions whose source branches can be proved disjoint. It also recognizes a direct ordered-map call with two simple named mold operands, as in Tlon `notes.log`, after validating provenance and operand source; revisiting the same map hold fails closed. It also reads ordered map fields in records when the map arguments are syntactically fixed atom molds and other fields are fixed atom molds or standard collections of static atom molds. Collection names must not be shadowed. The reader can also import a mark door sample, removing its outer sample face and validating its build subject. For a mark whose sample is exactly a named arm of its single Ford-imported `/sur` core, it can recover a source-proved nonrecursive union, including source-location wrappers around fields; recursive or unverified fallback results remain unsupported. The reader checks explicit Hoon `$%`, `$?` and `$^` unions against the Grammar’s disjointness rule, as @iko confirmed on 2026-10-30. For an explicit `$%` with distinct literal head tags, it can also prove restricted local named payload dependencies, including bare `~` fields, re-evaluate and validate each source branch, and recover the union before Hoon collapses it. The real Tlon `notes.u-note` exercises its `[%deleted ~]` case. A bounded fallback also recovers one level of local named tagged unions inside such a union, including Tlon `notes.u-notebook` and `notes.u-notes`. A source-proved nested self-recursive union retains its named owner, including Tlon `notes.import-node`; deeper, mutually recursive or unproven cases stay unsupported. The nested source proof has a 256-visit semantic-node budget, and source-location wrapper peeling is limited to four per node; Hoon evaluation and source scans are not metered. It rejects recursive or computed dependencies, inherited same-name collisions, unsupported nested unions and proofs exceeding a shared 4,096-node budget. It re-evaluates statically recognizable source branches before Hoon can collapse them, checks materialized fork cases, and rejects shapes it cannot prove disjoint. Static records may also have verified standard-collection and `path` siblings. One direct explicit union argument in a standard list, set, map or unit is accepted when its call wrapper and collection provenance are verified and its static cases are pairwise disjoint. A synthetic regression checks that forged wrapper subjects, samples and tails are rejected. Other collection-union forms, nested ordered maps, general source-level disjointness and complete integration with the checker remain unfinished. `+golden-types-imports` can consume fixed-aura atoms, valid term singletons, Hoon's `%n` zero singleton as Jibb `~`, nested faced or unfaced cells, unions of supported, pairwise-disjoint cases, and opaque standard collections with supported arguments from caller-supplied reader results for declared `/-` imports; `+golden-types-with-marks` accepts the same shapes for declared marks. The caller must pass unchanged results from the source-aware reader: the bridge validates the supplied graph but cannot detect source cases Hoon collapsed before that graph was built. The opaque collection types retain their names and arguments for identity, unification and printing. The validated standard prelude `list` mold shares the imported list representation; other Jibb-written collection molds and most prelude collection operations remain unsupported. Other forms remain unsupported. Its disjointness proof is conservative and can reject a valid union it cannot prove disjoint. Collection recognition requires the originating `/sur` core. The reader validates direct zuse subjects and Ford subjects consisting of faced imported cores and a validated tail, checking imported cores transitively; it rejects shadowed names, inconsistent core subjects and other subject shapes. For a recursive reference, the reader matches the exact Hoon hold against named arms in validated cores, including transitive Ford imports; it rejects missing, unlabelled or ambiguous origins. Its fixtures include three real Tlon files; `tools/importer-test` compares the internal projection under eval, and the ship test compares the same golden output. `tools/type-import-test` and `tools/type-mark-test` compare bridge reports under eval and on the ship. `tools/type-tlon-test` and its ship counterpart exercise four real Tlon presence unions and a field read through the source-aware reader and partial checker. `tools/clay-fixtures` also passes Clay-built `/sur` molds and mark samples through the Clay-built importer and partial checker.
88+
89+Self-recursive `/sur` molds can cross the bridge as opaque module-and-name identities when their supported source-aware graph passes validation, including one-argument lists containing same-origin recursive references. The real Tlon `notes.import-node` reaches this bridge; it does not unfold or construct the recursive type. Aliases, foreign references, recursive marks, unfolding, construction and field access remain unsupported; the partial printer declines recursive names that are not in scope.
90+
91+The partial checker also recognizes a source-proven Jibb recursive mold consisting of `~` and one faced cell with a fixed-aura head and direct self tail. Its identity includes the defining path and name. It unfolds this shape for supported null and cell construction and for a two-arm null/cell match; static application-path literals use the verified public `qath` alias. The internal prelude defines `qath` as a transparent knot sequence and the public prelude re-exports it. Each inference attempt has 256 unfolding and static-segment steps; parsing and separate retries are not bounded by that limit. Dynamic application-path segments, broader patterns and other recursive shapes remain unsupported. Route and static-file existence checks remain milestone 4.
70
92
71−Self-recursive `/sur` molds can cross the bridge as opaque module-and-name identities when their supported source-aware graph passes validation. Aliases, foreign references, recursive marks, unfolding, construction and field access remain unsupported; the partial printer declines recursive names that are not in scope.
93+Callers that have a `/sur` core and a name can use `+read-named`: it checks for a locally declared arm before asking Hoon to evaluate the mold, and reports evaluation failures with the final Hoon trace line. `+read-mold-in` remains available when the caller already has the selected type. The opt-in `+read-named-diagnostic` and `+read-mark-diagnostic` preserve successful graphs and distinguish definite `%invalid` aura and core evidence emitted directly by the reader from `%unsupported` failures. Other failures, including unverified union disjointness and vase recognition based only on a name, remain unsupported. These entry points revalidate and re-walk failed types; the opt-in `+golden-types-with-reader-diagnostics` accepts unchanged structured reader results and reports definite aura or core errors at their imported mold use sites, when the import and supplied input are unique. Ordered replay covers direct and nested cell samples, record and function casts, and non-generic same-module aliases; it stops at an unsupported prefix, cycle or shadowing failure. Union molds, generic applications, transitive modules and unsupported reader outcomes still report generic limitations. Replay repeats inference and may add work; this entry point remains partial. Existing checker entry points continue treating failed imports as unsupported. It also fails closed on repeated field faces along an imported record spine, including recursive roots; the diagnostic remains generic. Hoon type graphs can erase unfaced nested-cell boundaries, so the check may conservatively reject a valid source with equal names in distinct erased scopes. Faced nested records and union alternatives keep separate scopes.
72
94
73−Callers that have a `/sur` core and a name can use `+read-named`: it checks for a locally declared arm before asking Hoon to evaluate the mold, and reports evaluation failures with the final Hoon trace line. `+read-mold-in` remains available when the caller already has the selected type. The checker currently treats a failed import as unsupported rather than rendering the importer's error.
95+The partial report can diagnose certain non-gate value dependency cycles, including cycles through gates. It requires an explicit atom or loobean result cast and a syntactically proven dependency group with unshadowed simple samples; it identifies the value and a dependency site. Untyped results, branches, nested definitions, qualified wings and complex samples remain unsupported. The proof constructs an additional dependency graph. One 24-case recursive/generic eval run took 19.7 s with it and 18.6 s before it, including startup; these single runs do not isolate the graph cost.
74
96
75−`+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.
97+The source-backed `+api-path-analysis-source` is a separate partial analysis, not an API check: it resolves reachable Jibb imports and declared mark graphs and returns path and scry segments, full and diff mark identities and their types. It also checks derived-name collisions. Full and diff payloads must be direct declared mark names; typed scry parameters must be a same-name, same-aura subset of the watch parameters, and unknown or duplicate segment binders fail closed. It creates no request gates. The caller must pass a trusted prepared prelude and unchanged source-aware reader results.
76
98
77−The supplied prelude is parsed into a **partial interface**: all names actually declared in the source are reserved, while only the molds and values this fragment can infer are available. These include the validated standard `list` mold, `unit`, `same`, `fall` and `need`; unsupported entries, such as most list helpers, remain unavailable. A named prelude union keeps the fixed `/lib/jibb/prelude/jibb` origin in every module, and its name remains unqualified when a library exports a type containing it. The prelude inventory is incomplete, so reserving the names in this source does not establish complete shadowing coverage. Prelude imports, including the planned private internal module, are not supported by preparation. The shared module-scope fixture compares the prepared and source-taking paths against the real prelude and a two-module golden under eval and on the ship.
99+`+golden-types-with-prelude` accepts case-local Jibb module sources alongside `/sur` and mark results and the vendored prelude source. It resolves reachable ordinary library modules in dependency order, caching completed interfaces per invocation and exporting supported closed value schemes, direct generic unions, and simple or nonrecursive generic mold aliases whose bodies the fragment supports. It detects missing sources and cycles and rejects a dependency if its interface cannot be inferred by the fragment. Qualified wings can also read nested fields of an imported value, instantiating that value’s scheme independently at each use; missing, ambiguous and non-record fields remain unsupported.
78
100
101+The supplied prelude is parsed into a **partial interface**: all names actually declared in the source are reserved, while only the molds and values this fragment can infer are available. These include the validated standard `list` mold, `unit`, the doc-exact generic `cmd` union, `same`, `fall`, `need`, `bond`, `lure`, `weld`, `snoc`, `turn`, `flop`, `rear`, `drop`, `skim`, `skip`, `murn`, `join`, `snip`, `levy`, `lien`, `cork`, `corl`, `cury` and `curr`; unsupported entries remain unavailable. The validated `list` is injected while the prelude’s gates are inferred; `weld` and `turn` use ordinary explicit result casts. An absent or altered `list` is not injected, and an altered declaration cannot leak through a direct or transitive mold alias. The same validated template is available when prelude mold aliases are prepared, so supported direct and transitive aliases can use it. A named prelude union keeps the fixed `/lib/jibb/prelude/jibb` origin in every module, and its name remains unqualified when a library exports a type containing it. The prelude inventory is incomplete, so reserving the names in this source does not establish complete shadowing coverage. The source-backed internal prelude defines `poke`, which the public prelude re-exports as an ordinary transparent type. A dedicated trusted internal-prelude preparation path also supplies an atom-constrained private comparison scheme for a Jibb-written `gth` wrapper. Ordinary module resolution rejects that primitive path even if a caller supplies a spoofed root or bundle. The low-level prepared interface is still trusted host input; the host must select the vendored sources and canonicalize paths. Primitive execution and shape-based jet recognition are not implemented. Addition, decrement and length remain unavailable until arithmetic constraints distinguish their results from loobeans. The partial checker resolves its supported source shape, preserves its public name, and rejects ordinary imports of the private internal path. An imported API with one mark and a matching direct `+$ poke` declaration can export a derived constructor and retain agent/mark metadata when the source representation has the supported agent case. Other API shapes, complete private module checking, root API and kind checking, stores, `ask`, `pure`, lowering and runtime effects remain unfinished. A possible store or root API declaring `+$ poke` reports that kind or scope needs unsupported inference; definite duplicate declarations and unrelated shadowing still report conflicts. Prepared interfaces and caches are trusted caller inputs; the future host and linker must ensure the private source validated during preparation is the same version used to lower derived constructors. A `*` payload may contain gates, so the fragment treats it conservatively; full gate-free checks are unfinished. The shared module-scope fixture compares the prepared and source-taking paths against the real prelude and a two-module golden under eval and on the ship.
102+
79−`+prepare-prelude` derives the interface and declared-name inventory from the trusted vendored source. Hosts can reuse its result with `+golden-types-with-prepared-prelude`; they must pass the unchanged result of preparation, not an independently constructed value. Empty, malformed, duplicate-name or import-bearing prelude sources fail closed. `+golden-types-with-prelude` remains the source-taking wrapper. API files, modules with `main`, unsupported definitions and many other features remain outside this subset. The older `+golden-types-with-modules` entry point fails closed for imports because it has no prelude scope. None of these partial reports claims the module has been checked.
103+`+prepare-prelude` derives the interface and declared-name inventory from the trusted vendored source. Hosts can reuse its result with `+golden-types-with-prepared-prelude`; they must pass the unchanged result of preparation, not an independently constructed value. Empty, malformed and duplicate-name prelude sources fail closed. The source-taking `+prepare-prelude` and `+golden-types-with-prelude` do not supply the internal module; their `-and-internal` or `-with-internal` variants accept its source for the supported private import. API files, modules with `main`, unsupported definitions and many other features remain outside this subset. The older `+golden-types-with-modules` entry point fails closed for imports because it has no prelude scope. None of these partial reports claims the module has been checked.
80
104
81And the design notes:
105And the design notes:
82
106
@@ -87,16 +111,20 @@ And the design notes:
87| 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 |
111| 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 |
88| 4. Printed formats | The token, tree and error formats the golden files hold |
112| 4. Printed formats | The token, tree and error formats the golden files hold |
89
113
114+The partial checker reserves `proj` in module, local, sample, pattern and import bindings, including bindings inside unsupported source; a field, tag or path segment may still have that spelling. With a known expected record type, it checks selected explicit `(proj record)` calls over closed, uniquely faced records, preserving the source expression, its type, the result type and field axes in the checked interface. Imported and private-prelude dependencies retain the source needed to lower those plans. The checker does not yet lower or execute them. It supports selecting one or more fields in their original order; a single selected field keeps its face and uses one source axis. Reordered fields, unknown or open record spines, some nested contexts and recursive groups with projections remain unsupported. A directional fit of a wider faced record fails closed instead of inserting a projection, including within supported list, unit and record positions. To limit repeated work, record-spine proofs are reused along the same closed spine and stop at 1,024 fields; field boundaries and the special handling of positional calls reset the appropriate proof. Prepared interfaces and their source remain trusted host inputs.
115+
90## The tree
116## The tree
91
117
92Every 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:
118Every 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:
93
119
94- **Module**: imports (`%sur` for `/-`, `%mark` for `/%`, `%jibb` for `/=`), then definitions (`%mold` for `+$`, `%value` for `++`).
120- **Module**: imports (`%sur` for `/-`, `%mark` for `/%`, `%jibb` for `/=`), then definitions (`%mold` for `+$`, `%value` for `++`).
95- **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.
121- **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.
96−- **Molds as written** (`shape`): `%aura`, `%noun`, `%void`, `%flag`, `%const`, `%ref`, `%tvar`, `%path`, `%apply`, `%cell`, `%union`, `%fn`, `%generic`. A `%union` spans its first through last case and has no lead token; a single case is its own mold. `%generic` spans from the `|$` after a `+$` name through its body.
122+- **Molds as written** (`shape`): `%aura`, `%hole`, `%noun`, `%void`, `%flag`, `%const`, `%ref`, `%tvar`, `%path`, `%apply`, `%cell`, `%union`, `%fn`, `%generic`. A `%hole` retains the span of `_`; an inferred typed path segment retains that span separately from its enclosing segment. A `%union` spans its first through last case and has no lead token; a single case is its own mold. `%generic` spans from the `|$` after a `+$` name through its body.
97- **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`.
123- **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`.
98- **Literals** (`lit`) keep the form they matched, their aura and value, and their text as written, which the printers show.
124- **Literals** (`lit`) keep the form they matched, their aura and value, and their text as written, which the printers show.
99
125
126+The parser accepts type holes. The partial checker records each ordinary hole with its span and validates the obligations created in a value or local definition before generalization. A solved concrete type or an explicitly written in-scope capital resolves a hole; a later use cannot repair it. Independent decimal holes may default to `@ud` when the surrounding inferred type is gate-free; variables reachable from the environment or written capitals are protected from premature defaulting. Structural named-mold holes are diagnosed at their source, while complex named molds, inferred path segments, recursive groups with holes and unresolved constraints remain unsupported. Partial prelude and API interfaces cannot silently export unchecked holes. A separate syntax-tree pass reports duplicate names within a written record at both field sites, including in unused definitions; nested and separate records have independent scopes.
127+
100The 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.
128The 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.
101
129
102## Positions and errors
130## Positions and errors
docs/development.md+22−3
@@ -61,7 +61,15 @@ git clone https://github.com/urbit/tools /root/src/tools
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-test` | Composes the Hoon importer with the partial checker and compares `tests/type-import/expected.txt` under eval |
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-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 |
64| `tools/type-mark-test` | Checks the partial checker’s mark import boundary against `tests/type-mark/expected.txt` 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-poke-test` | Checks source-backed prelude and poke-only API reports against `tests/type-poke/expected.txt` under eval |
68+| `tools/type-api-paths-test` | Checks partial API path analysis with real todo mark samples against `tests/type-api-paths/expected.txt` under eval |
69+| `tools/type-hole-guards-test` | Runs the shared hole-defaulting and API interface guards under eval; the same checks run on the ship |
70+| `tools/type-list-alias-test` | Runs the shared prelude list-alias and provenance guards under eval and on the ship |
71+| `tools/type-qath-guards-test` | Runs source-provenance, recursive unfolding and face guards under eval and on the ship |
72+| `tools/type-proj-guards-test` | Runs projection evidence, name-scope and dependency guards under eval and on the ship |
65| `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 |
73| `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 |
66| `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 |
74| `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 |
67| `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 |
75| `tools/hoon` | Evaluates Hoon with the library in scope, as `tools/hoon '(golden /a/b/jibb (crip "++ main view"))'`; `--cord name=file` binds a file's text, `-f` reads the expression from a file |
@@ -69,6 +77,7 @@ git clone https://github.com/urbit/tools /root/src/tools
69| `tools/ship` | Runs the fake ship: `start`, `stop`, `status`, `log`, `sync <desk>`, `test`, `gen-tests`, `check-commit`, `scry`, `hoon`, `run`, `poke`, `commit`, `mount`, `unmount` |
77| `tools/ship` | Runs the fake ship: `start`, `stop`, `status`, `log`, `sync <desk>`, `test`, `gen-tests`, `check-commit`, `scry`, `hoon`, `run`, `poke`, `commit`, `mount`, `unmount` |
70| `tools/testdata/selftest` | Tests `tools/golden` and `tools/hoon` against a stub library, and `tools/doc-blocks` against Markdown it writes |
78| `tools/testdata/selftest` | Tests `tools/golden` and `tools/hoon` against a stub library, and `tools/doc-blocks` against Markdown it writes |
71| `tools/testdata/ship-selftest` | Tests `tools/ship`'s test generator and runner against a stub library on the ship |
79| `tools/testdata/ship-selftest` | Tests `tools/ship`'s test generator and runner against a stub library on the ship |
80+| `tools/testdata/clay-fixtures-selftest` | Tests temporary Clay fixture cleanup and signal handling without a ship |
72
81
73`tools/golden` starts `urbit eval` once and builds the library, which takes about 8 s, then runs every case under `mule`, so a crash fails only its own case.
82`tools/golden` starts `urbit eval` once and builds the library, which takes about 8 s, then runs every case under `mule`, so a crash fails only its own case.
74
83
@@ -78,19 +87,29 @@ git clone https://github.com/urbit/tools /root/src/tools
78tools/golden # all cases pass
87tools/golden # all cases pass
79tools/importer-test # Hoon importer fixture projections match
88tools/importer-test # Hoon importer fixture projections match
80tools/type-import-test # importer/checker bridge golden report matches
89tools/type-import-test # importer/checker bridge golden report matches
90+tools/type-tlon-test # real Tlon importer/checker report matches
91+tools/type-import-diagnostic-test # direct structured reader diagnostics match
81tools/type-mark-test # mark/checker bridge golden report matches
92tools/type-mark-test # mark/checker bridge golden report matches
93+tools/type-poke-test # source-backed poke/API bridge report matches
94+tools/type-api-paths-test # partial API path analysis report matches
95+tools/type-hole-guards-test # hole defaulting and API guards pass
96+tools/type-list-alias-test # prelude list-alias guards pass
97+tools/type-qath-guards-test # qath source and unfolding guards pass
98+tools/type-proj-guards-test # projection evidence and scope guards pass
82tools/type-module-scope-test # module/prelude scope golden report matches
99tools/type-module-scope-test # module/prelude scope golden report matches
83tools/hoon check-spans-test # prints <<>>
100tools/hoon check-spans-test # prints <<>>
101+tools/hoon itype-unify-test # type-unification controls pass
84tools/testdata/selftest # 22 checks, 0 failed
102tools/testdata/selftest # 22 checks, 0 failed
85tools/doc-blocks docs/spec # every jibb block has its case
103tools/doc-blocks docs/spec # every jibb block has its case
86tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
104tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
87tools/ship test # the cases pass as -test arms on the ship
105tools/ship test # the cases pass as -test arms on the ship
88tools/testdata/ship-selftest # when tools/ship changed
106tools/testdata/ship-selftest # when tools/ship changed
107+tools/testdata/clay-fixtures-selftest # scratch fixture cleanup without a ship
89tools/ship check-commit # when the mark or the desks changed
108tools/ship check-commit # when the mark or the desks changed
90−tools/clay-fixtures # when the my-app Hoon fixtures or importer changed
109+tools/clay-fixtures # builds example fixtures and real Tlon notes through Clay
91```
110```
92
111
93−`tools/ship test` regenerates `tests/lib/jibb.hoon` and syncs the `jibb-dev` desk before it runs, so commit the regenerated file. A run with `--stub`, `--lib`, or a custom `--golden` isolates its generated golden tests from the repository's other test programs; run the default command afterward to restore and test those programs. It also runs the independent `tests/lib/jibb-import.hoon` test against the same importer fixtures and expected diagnostic projection as `tools/importer-test`. The projection is an internal tree, not the Jibb type printer. `tests/lib/jibb-bridge.hoon` also runs the importer/checker bridge fixture on the ship; `tools/type-import-test` runs the same report under eval. The mark bridge has its own `tests/lib/jibb-mark-bridge.hoon` ship test and `tools/type-mark-test` eval test; both compare the same fixture report. `tests/lib/jibb-module-scope.hoon` and `tools/type-module-scope-test` compare the prelude scope report on the ship and under eval.
112+`tools/ship test` regenerates `tests/lib/jibb.hoon` and syncs the `jibb-dev` desk before it runs, so commit the regenerated file. Sync preflights and splits large deletion lists into bounded click requests, waiting for each Clay revision; a failure stops later batches. The ship self-test exercises this when switching from the full desk to a smaller fixture desk. A run with `--stub`, `--lib`, or a custom `--golden` isolates its generated golden tests from the repository's other test programs; run the default command afterward to restore and test those programs. It also runs the independent `tests/lib/jibb-import.hoon` test against the same importer fixtures and expected diagnostic projection as `tools/importer-test`. The projection is an internal tree, not the Jibb type printer. `tests/lib/jibb-bridge.hoon` also runs the importer/checker bridge fixture on the ship; `tools/type-import-test` runs the same report under eval. `tests/lib/jibb-tlon-bridge.hoon` and `tools/type-tlon-test` run the real Tlon presence reader/checker fixture on both. The structured reader diagnostics have their own `tests/lib/jibb-import-diagnostic.hoon` ship test and `tools/type-import-diagnostic-test` eval test. The mark bridge has its own `tests/lib/jibb-mark-bridge.hoon` ship test and `tools/type-mark-test` eval test; both compare the same fixture report. `tests/lib/jibb-poke-bridge.hoon` and `tools/type-poke-test` share the source-backed prelude and poke-only API fixture. `tests/lib/jibb-api-paths.hoon` and `tools/type-api-paths-test` share partial path analysis over the real todo marks; this does not generate request interfaces. `tests/lib/jibb-module-scope.hoon` and `tools/type-module-scope-test` compare the prelude scope report on the ship and under eval.
94
113
95## Golden cases
114## Golden cases
96
115
@@ -104,7 +123,7 @@ A case is a folder `tests/golden/<name>/` holding:
104- optionally, `imports.txt` selects Hoon `/sur` molds, one `module mold` pair per line. Each module's source goes in `sur/<module>.txt` and is compiled against zuse by both runners. `marks.txt` selects marks, one name per line, with source in `mar/<name>.txt`; both kinds may be supplied together. The reader results go to the partial checker, and a type output is required. Both runners reconstruct fixture text from `%txt` lines and identify the fixture if its compilation crashes; a crash fails the case without discarding its successful parse output. These fixtures currently handle only sources without Ford imports.
123- optionally, `imports.txt` selects Hoon `/sur` molds, one `module mold` pair per line. Each module's source goes in `sur/<module>.txt` and is compiled against zuse by both runners. `marks.txt` selects marks, one name per line, with source in `mar/<name>.txt`; both kinds may be supplied together. The reader results go to the partial checker, and a type output is required. Both runners reconstruct fixture text from `%txt` lines and identify the fixture if its compilation crashes; a crash fails the case without discarding its successful parse output. These fixtures currently handle only sources without Ford imports.
105- optionally, `modules.txt` lists logical `/ui/.../*.jibb` paths, one per line. The corresponding sources live below the case's `modules/ui/` directory. Both runners parse each source at its logical path and compare the combined `module-trees.txt`; `--update` writes that output. A case with type output also supplies these sources and the vendored prelude to the partial module checker. The file opts in even when it lists no sources; use a comment such as `# no module fixtures` for an empty bundle, since zero-byte `%txt` fixtures do not sync reliably on the ship. Blank lines and comment lines are ignored. Cases without `modules.txt` keep their existing no-prelude type interface.
124- optionally, `modules.txt` lists logical `/ui/.../*.jibb` paths, one per line. The corresponding sources live below the case's `modules/ui/` directory. Both runners parse each source at its logical path and compare the combined `module-trees.txt`; `--update` writes that output. A case with type output also supplies these sources and the vendored prelude to the partial module checker. The file opts in even when it lists no sources; use a comment such as `# no module fixtures` for an empty bundle, since zero-byte `%txt` fixtures do not sync reliably on the ship. Blank lines and comment lines are ignored. Cases without `modules.txt` keep their existing no-prelude type interface.
106
125
107−The runners prepare the trusted vendored prelude once for their generated test core and share its partial interface. Preparation reserves all names present in that source and supplies the molds and values the fragment can infer; an unsupported declaration remains reserved but unavailable. The source and the checker are incomplete, so the output still says the module has not been checked and does not claim complete shadowing coverage. `+golden-types-with-prelude` accepts source directly; callers using `+golden-types-with-prepared-prelude` must pass the unchanged result of `+prepare-prelude`. Missing, malformed or conflicting source fails closed, and prelude imports are not supported yet.
126+The runners prepare the trusted vendored public and internal prelude sources once for their generated test core and share the partial interface. Preparation reserves all names present in the public source and supplies the molds and values the fragment can infer; an unsupported declaration remains reserved but unavailable. The source and checker are incomplete, so the output still says the module has not been checked and does not claim complete shadowing coverage. `+golden-types-with-prelude-and-internal` accepts both sources directly; callers using `+golden-types-with-prepared-prelude` pass the unchanged result of `+prepare-prelude-with-internal`. The older source-only entry points remain available for preludes without imports. Missing or malformed sources fail closed.
108
127
109A zero-byte mark fixture currently fails ship synchronization validation after commit. Use a newline-only fixture to test an empty Hoon source on the ship.
128A zero-byte mark fixture currently fails ship synchronization validation after commit. Use a newline-only fixture to test an empty Hoon source on the ship.
110
129
docs/open-questions.md+26−6
@@ -18,12 +18,12 @@ 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, 20, 21, 22 and 23 remain open; the other questions are settled.
21+Found while writing [prompts/milestone-2.md](prompts/milestone-2.md), checking it against the doc's examples, and building the checker. The numbering is retained so existing references stay valid. Questions 3, 18 and 33 remain open; the field-order detail in question 32 is being clarified. The other questions are settled.
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.
253. **The prelude's inventory.** On 2026-10-30, @iko chose to include all names from the listed Hoon library sections, excluding groups the spec explicitly leaves out. All of 3g is included; its Hoon `tone` is exposed as `tone.hoon`, distinct from the styling type. Hoon 1c `step` is exposed as `step.hoon`, leaving the Grammar example's `step` name available. On 2026-10-30, @iko also approved `%$` as a term literal and pattern, so Jibb can write the `%$` case of Hoon `coin`. For parsing sections 4j and 4l, only the explicitly listed `slav` and `slaw` are included; other parser helpers are left out. Jibb's `not` negates a loobean, and Hoon's bitwise `not` is exposed as `not.bit`. @iko also agreed to specifying the complete exported inventory in the doc, building its types and gates needed by the examples in milestone 2, and doing native implementations in milestone 3. Prelude unions such as spaces, roles and tones need names that other modules cannot shadow. The actual inventory and signatures still need to be specified.
253. **The prelude's inventory.** On 2026-10-30, @iko chose to include all names from the listed Hoon library sections, excluding groups the spec explicitly leaves out. All of 3g is included; its Hoon `tone` is exposed as `tone.hoon`, distinct from the styling type. Hoon 1c `step` is exposed as `step.hoon`, leaving the Grammar example's `step` name available. On 2026-10-30, @iko also approved `%$` as a term literal and pattern, so Jibb can write the `%$` case of Hoon `coin`. For parsing sections 4j and 4l, only the explicitly listed `slav` and `slaw` are included; other parser helpers are left out. Jibb's `not` negates a loobean, and Hoon's bitwise `not` is exposed as `not.bit`. @iko also agreed to specifying the complete exported inventory in the doc, building its types and gates needed by the examples in milestone 2, and doing native implementations in milestone 3. Prelude unions such as spaces, roles and tones need names that other modules cannot shadow. The actual inventory and signatures still need to be specified.
26−4. **Settled: a capital in a local `++`.** On 2026-10-30, @iko said it shares the enclosing `++`'s variable of that name; a different type uses a different capital. The Grammar and Decisions record this alongside the earlier aura rules.
26+4. **Settled: a capital in a local `++`.** On 2026-10-30, @iko said it shares the enclosing `++`'s variable of that name if the enclosing `++` also uses it; otherwise the local `++` introduces and generalizes its own variable. For example, `++ inner |= y=A y` shares `A` with an enclosing gate whose sample is `x=A`, but generalizes its own `A` if the enclosing `++` does not use `A`. A different type uses a different capital. The Grammar and Decisions record this alongside the earlier aura rules.
275. **Settled: cells of no items or one.** On 2026-10-30, @iko said a single-item cell is the value and `[]` is an error. The theme's `dark=[tones=[…]]`, a record of one field, must still check.
275. **Settled: cells of no items or one.** On 2026-10-30, @iko said a single-item cell is the value and `[]` is an error. The theme's `dark=[tones=[…]]`, a record of one field, must still check.
286. **Settled: a change with no items.** On 2026-10-30, @iko said `m()` is an error. The parser still accepts it; the checker needs to reject it and add a golden case.
286. **Settled: a change with no items.** On 2026-10-30, @iko said `m()` is an error. The parser still accepts it; the checker needs to reject it and add a golden case.
297. **Settled: the doc's blocks that aren't whole modules.** On 2026-10-30, @iko agreed to check each in its intended context: the `cmd` and `sub` definitions as prelude source, the Core language tab's `update` inside the todo island, and the Grammar's imports example against fixture files.
297. **Settled: the doc's blocks that aren't whole modules.** On 2026-10-30, @iko agreed to check each in its intended context: the `cmd` and `sub` definitions as prelude source, the Core language tab's `update` inside the todo island, and the Grammar's imports example against fixture files.
@@ -39,10 +39,30 @@ Found while writing [prompts/milestone-2.md](prompts/milestone-2.md), checking i
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.
4018. **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.
4018. **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.
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.
42−20. **The type of Hoon `clap`.** Hoon allows its two input units and combining gate's result to have different types. If only one unit is present it returns that unit; when both are present it returns the combining gate's result. Jibb branches normally need a common type, while every union written in Jibb has a name. Should the Jibb gate require a shared type, infer an unnamed union of the possible values, or wait for a different typing design? Asked @iko on 2026-10-30. `clap` is not implemented while this is open.
42+20. **Settled: the type of `clap`.** On 2026-10-30, @iko chose one shared value type for both units and the combining gate. If either unit is absent, `clap` returns the other; if both are present, it applies the gate to their values and wraps the result.
43−21. **Duplicate faces in imported Hoon records.** Hoon permits `[a=@ud a=@t]`, and its lookup picks the first `a`. Should Jibb reject the imported type where it is used, use the first field, or permit the type but reject access to the ambiguous field? Asked @iko on 2026-10-30. The inference fragment currently permits the type but declines ambiguous field access (doc question).
43+21. **Settled: duplicate faces in imported Hoon records.** On 2026-10-30, @iko chose to reject an imported Hoon record with duplicate field names where its type is used. Hoon permits `[a=@ud a=@t]` and picks the first `a`; Jibb rejects it.
44−22. **Overlapping imported `$%` and `$?` cases.** The Grammar says a union whose cases don't all differ as nouns is rejected, while the import table explicitly mentions that condition only for `$^`; its `$%` and `$?` row says they become a union. Does the general disjointness rule reject imported `$%` and `$?` cases such as `[%x @ud]` and `[%x @t]` where the type is used? Asked @iko on 2026-10-30. The general rule is the provisional reading (doc question); the importer rejects recognizable overlaps and fails closed when it cannot verify them.
44+22. **Settled: overlapping imported `$%` and `$?` cases.** On 2026-10-30, @iko confirmed that the general union disjointness rule rejects imported `$%` and `$?` cases that overlap as nouns where the type is used, as it does for `$^`. The importer rejects recognizable overlaps and fails closed when it cannot verify them.
45−23. **Converging explicit capitals.** May a body constrain two separately written capitals to the same type? For `++ repeated |= x=(choice A A) x`, should `++ f |= x=(choice A B) (repeated x)` infer `$-((choice A A) (choice A A))`, or reject it because `A` and `B` are distinct? The same issue arises when casting `(phantom A)` to `(phantom B)` and across local captures. Asked @iko on 2026-10-30. Pending an answer, partial inference declines to merge distinct explicitly written capitals (doc question).
45+23. **Settled: converging explicit capitals.** On 2026-10-30, @iko chose that a body cannot force two separately written capitals to be equal. For `++ repeated |= x=(choice A A) x`, `++ f |= x=(choice A B) (repeated x)` is an error; use `A` in both positions when the type must be shared. This also applies across local captures and within generic mold applications.
46+
47+24. **Settled: how the internal prelude provides `poke`.** On 2026-10-31, @iko chose to define `poke` in the source-backed private internal prelude module and re-export it through the public prelude as an ordinary transparent type. Ordinary modules can construct and inspect its values. This settles `poke`; it does not decide the representation of `ask` or `qath`.
48+
49+25. **Settled: how the prelude provides `ask` and `qath`.** On 2026-10-31, @iko chose ordinary transparent types defined in the internal prelude and re-exported normally, as for `poke`. Callers may construct and inspect their values.
50+
51+26. **Settled: the `step` example's `at` binder.** On 2026-10-31, @iko chose to rename the `describe` pattern binder to `sent-at`, keeping Hoon's `at` in the prelude and the no-shadowing rule.
52+
53+27. **Settled: duplicate fields in a Jibb-written record.** On 2026-10-31, @iko chose to reject duplicate field names, as for imported Hoon records.
54+
55+28. **Settled: arithmetic on loobeans.** On 2026-10-31, @iko chose to reject loobean operands for arithmetic. Comparison may still accept loobeans and returns `?`. The checker needs to retain this constraint through inference, generalization and instantiation before it exports `add` or `dec`.
56+
57+29. **Settled: printing the arithmetic atom constraint.** On 2026-10-31, @iko chose `where A is an atom other than ?` for a generic arithmetic type whose atom variable excludes loobeans.
58+
59+30. **Settled: a hole inferred as a generic variable.** On 2026-10-31, @iko said a hole resolved to an explicitly written type variable counts as inferred: in `++ id |= x=A ^- _ x`, the result hole is `A`. Named molds must determine their own holes without constraints from later uses; an unconstrained hole is an error.
60+
61+31. **Settled: uses of a value with a hole.** On 2026-10-31, @iko said a value definition must determine its own holes; another definition's use cannot fix an otherwise unresolved hole. For example, `++ id |= x=_ x` remains an error even if a later definition calls `id` with a cord.
62+
63+32. **Partly settled: type-directed record projection.** On 2026-10-31, @iko chose an explicit `(proj record)` whose expected result type selects the fields. There is no automatic projection, and `proj` is reserved against definitions and imports. The result contains exactly the fields of its expected type. Whether the result may reorder fields from the source remains open.
64+
65+33. **Watching a request with unknown provenance.** An island cannot watch an API case that needs a separate scry path, but `ask` is transparent and a request can be constructed, selected or passed through a gate. If the checker cannot prove whether a request is watchable, must it reject the watch, or can a runtime check decide? Asked @iko on 2026-10-31; proposed: require proof at compile time, so the stated island restriction holds before execution.
46
66
47## Grammar questions never put to the doc's author
67## Grammar questions never put to the doc's author
48
68
docs/prelude-inventory.md+15−7
@@ -4,12 +4,18 @@ 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. `qath` is defined there as a transparent recursive knot sequence and re-exported by the public prelude; the partial checker supports its named identity, selected construction and matching, and static application-path literals. `ask` is not yet defined there.
8+
9+The prelude also declares the generic `cmd` mold exactly as in Overview, Effects. The partial checker infers its five cases and independent message types in the supported examples; complete module checking and backend validation remain outstanding. The related `sub` declaration awaits the source representation and checking of `ask`.
10+
7Hoon `+$` 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.
8
12
9## 1a
13## 1a
10
14
11`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`.
12
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.
18+
13## 1c
19## 1c
14
20
15`bite` (mold), `bloq` (mold), `each`, `gate` (mold), `list`, `lone`, `lest`, `mold` (mold), `pair`, `pole`, `qual`, `quip`, `step`, `trap`, `tree`, `trel`, `unit`.
21`bite` (mold), `bloq` (mold), `each`, `gate` (mold), `list`, `lone`, `lest`, `mold` (mold), `pair`, `pole`, `qual`, `quip`, `step`, `trap`, `tree`, `trel`, `unit`.
@@ -20,30 +26,30 @@ Hoon `+$` arms are marked **mold** below; `++` arms can be gates, doors or mold
20
26
21`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`.
22
28
23−The following is an audit of the Hoon 135 bodies, not a completed Jibb interface. The current Jibb implementations have only been parsed; the checker and backend do not yet validate or run them.
29+The following is an audit of the Hoon 135 bodies, not a completed Jibb interface. The partial checker infers `fall`, `need`, `some`, `bind`, `biff`, `bond`, `both`, `clap`, `clef`, `drop` and `flit`; the remaining written implementations have been parsed, but complete checker validation remains outstanding. Backend validation remains outstanding for all of them.
24
30
25| Name | Hoon behavior | Jibb status |
31| Name | Hoon behavior | Jibb status |
26| --- | --- | --- |
32| --- | --- | --- |
27| `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 |
28| `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 |
29−| `bond` | Calls a fallback trap for an absent unit, otherwise returns its value. | Missing |
35+| `bond` | Calls a fallback trap for an absent unit, otherwise returns its value. | Written and inferred as a curried gate; backend validation remains outstanding |
30| `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 |
31−| `clap` | Returns the present unit if only one is present; combines both values with a gate if both are present. | Missing; Hoon permits different input and output types |
37+| `clap` | Returns the present unit if only one is present; combines both values with a gate if both are present. | Written with one shared type for both units and the combining gate, as @iko chose |
32| `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 |
33−| `drop` | Converts an absent unit to an empty list and a present unit to a singleton. | Written |
39+| `drop` | Converts an absent unit to an empty list and a present unit to a singleton. | Written; inferred by the partial checker |
34−| `fall` | Returns the value of a present unit or the supplied fallback. | Written |
40+| `fall` | Returns the value of a present unit or the supplied fallback. | Written; inferred by the partial checker |
35| `flit` | Returns a gate that wraps a value only if it satisfies the predicate. | Written |
41| `flit` | Returns a gate that wraps a value only if it satisfies the predicate. | Written |
36| `hunt` | Returns the only present unit or chooses between two present values with an ordering gate. | Missing |
42| `hunt` | Returns the only present unit or chooses between two present values with an ordering gate. | Missing |
37| `lift` | Takes a mold and a unit, then applies the mold to a present value as `bind` does. | Missing; Jibb molds are not callable values |
43| `lift` | Takes a mold and a unit, then applies the mold to a present value as `bind` does. | Missing; Jibb molds are not callable values |
38| `mate` | Returns the present unit if only one is present; when both are present it returns one if their values are equal and crashes otherwise. | Missing |
44| `mate` | Returns the present unit if only one is present; when both are present it returns one if their values are equal and crashes otherwise. | Missing |
39−| `need` | Extracts a present value and crashes on an absent unit. | Written |
45+| `need` | Extracts a present value and crashes on an absent unit. | Written; inferred by the partial checker |
40| `some` | Wraps a value in a present unit. | Written |
46| `some` | Wraps a value in a present unit. | Written |
41
47
42## 2b
48## 2b
43
49
44`snoc`, `lure`, `fand`, `find`, `flop`, `gulf`, `homo`, `join`, `bake`, `lent`, `levy`, `lien`, `limo`, `murn`, `oust`, `reap`, `rear`, `reel`, `roll`, `scag`, `skid`, `skim`, `skip`, `slag`, `snag`, `snip`, `sort`, `spin`, `spun`, `swag`, `turn`, `weld`, `snap`, `into`, `welp`, `zing`.
50`snoc`, `lure`, `fand`, `find`, `flop`, `gulf`, `homo`, `join`, `bake`, `lent`, `levy`, `lien`, `limo`, `murn`, `oust`, `reap`, `rear`, `reel`, `roll`, `scag`, `skid`, `skim`, `skip`, `slag`, `snag`, `snip`, `sort`, `spin`, `spun`, `swag`, `turn`, `weld`, `snap`, `into`, `welp`, `zing`.
45
51
46−The current prelude writes `snoc`, `lure`, `flop`, `join`, `levy`, `lien`, `murn`, `rear`, `reel`, `roll`, `skim`, `skip`, `snip`, `turn` and `weld`. `murn` keeps the present products of its gate in order; `join` inserts a separator between items; `snip` drops the last item, and `rear` returns it or crashes on an empty list. The folds take an explicit initial value as the Prelude table specifies. These implementations still need checker and backend validation.
52+The current prelude writes `snoc`, `lure`, `flop`, `join`, `levy`, `lien`, `murn`, `rear`, `reel`, `roll`, `skim`, `skip`, `snip`, `turn` and `weld`. `murn` keeps the present products of its gate in order; `join` inserts a separator between items; `snip` drops the last item, and `rear` returns it or crashes on an empty list. The folds take an explicit initial value as the Prelude table specifies. The partial checker infers `snoc`, `lure`, `weld`, `turn`, `flop`, `rear`, `skim`, `skip`, `murn`, `join`, `snip`, `levy` and `lien` using the validated prelude `list` mold; other list helpers remain limited by that fragment. The result casts on `drop`, `skim`, `skip`, `murn`, `join`, `snip`, `levy` and `lien` state their existing result types without changing their bodies. Backend validation remains outstanding for all of them.
47
53
48## 2c
54## 2c
49
55
@@ -93,6 +99,8 @@ The current prelude writes `snoc`, `lure`, `flop`, `join`, `levy`, `lien`, `murn
93
99
94`aftr`, `cork`, `corl`, `cury`, `curr`, `fore`, `head`, `same`, `succ`, `tail`, `test`, `lead`, `late`.
100`aftr`, `cork`, `corl`, `cury`, `curr`, `fore`, `head`, `same`, `succ`, `tail`, `test`, `lead`, `late`.
95
101
102+The source-backed `cork` and `corl` compose gates forward and backward, respectively; `cury` and `curr` bind the first and second item of an unfaced pair. The partial checker infers their polymorphic types. Their runtime implementations remain to be validated by a backend.
103+
96## 2o
104## 2o
97
105
98`jar`, `jug`, `map`, `qeu`, `set`.
106`jar`, `jug`, `map`, `qeu`, `set`.
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.
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`.
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,16 +59,18 @@ 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; a different type takes a different capital. "A type variable used where an atom is required gains an atom constraint", so `++ clamp |= [lo=A hi=A n=A]`, calling `gth` and `max`, works on any one aura; "It can become nothing more specific: a body that makes `A` a `@ud` or a list is an error." Names "may refer to each other in any order", so infer `++` definitions in dependency order, a group of mutually recursive ones together.
66+- Type variables are capitals, "generalized per `++`". A capital in a local `++` shares the enclosing `++`'s variable of that name if the enclosing `++` also uses it; otherwise the local `++` introduces and generalizes its own variable. For example, `++ inner |= y=A y` shares `A` with an enclosing gate whose sample is `x=A`, but generalizes its own `A` if the enclosing `++` does not use `A`. A different type takes a different capital. A body cannot force two distinct capitals to be equal; use the same capital where a type is shared. "A type variable used where an atom is required gains an atom constraint", so `++ clamp |= [lo=A hi=A n=A]`, calling `gth` and `max`, works on any one aura; "It can become nothing more specific: a body that makes `A` a `@ud` or a list is an error." Names "may refer to each other in any order", so infer `++` definitions in dependency order, a group of mutually recursive ones together.
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`.
67- Gates may call themselves and their siblings; a non-gate value that depends on itself, even through a gate, is an error. Molds may be recursive, and "recursive molds go by name and module".
68- Gates may call themselves and their siblings; a non-gate value that depends on itself, even through a gate, is an error. Molds may be recursive, and "recursive molds go by name and module".
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`, `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)
@@ -98,7 +100,7 @@ The rules are scattered across the tabs. This is a map of them, not a replacemen
98- `main`'s type decides a module's kind: `(element !!)` a page, `(page R D)` a page with data, `(program D X M)` an island, `(store S)` a store; no `main`, a library.
100- `main`'s type decides a module's kind: `(element !!)` a page, `(page R D)` a page with data, `(program D X M)` an island, `(store S)` a store; no `main`, a library.
99
101
100**Importing Hoon types** (overview: Importing Hoon types; Decisions: Hoon types)
102**Importing Hoon types** (overview: Importing Hoon types; Decisions: Hoon types)
101−- The table: `$%` and `$?` become a union; `$@` a union with an atom case; `$^` a union if its cases differ as nouns, else an error where used; `$~` dropped; `map`, `set`, `qeu`, `jar`, `jug` the same, by name; `mop` as `(mop K V)`, read with `on`; other `$|` their base type; `%0`, `%&` and `%|` tags; recursive molds recursive, matched by name; cores, gates, vases, signed and float auras an error where used.
103+- The table: `$%`, `$?` and `$^` become unions only if their cases differ as nouns, else an error where used; `$@` a union with an atom case; `$~` dropped; `map`, `set`, `qeu`, `jar`, `jug` the same, by name; `mop` as `(mop K V)`, read with `on`; other `$|` their base type; `%0`, `%&` and `%|` tags; recursive molds recursive, matched by name; imported records with duplicate field names, cores, gates, vases, signed and float auras are errors where used.
102- "Unused molds are skipped, so unsupported constructs elsewhere in a `/sur` file are fine." A field's unnamed union imports too, although Jibb cannot write one.
104- "Unused molds are skipped, so unsupported constructs elsewhere in a `/sur` file are fine." A field's unnamed union imports too, although Jibb cannot write one.
103
105
104**Islands, pages and stores** (overview: The Elm architecture on Urbit; Grammar: Modules and the store example)
106**Islands, pages and stores** (overview: The Elm architecture on Urbit; Grammar: Modules and the store example)
@@ -113,13 +115,13 @@ The rules are scattered across the tabs. This is a map of them, not a replacemen
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: maps and sets are plain gates over Hoon's trees, as `(get.by m k)`; folds take a start, as `(roll xs init f)`, `rep.by` and `rep.in`; ordered maps go through lull's `on`, as `(get.on lte m k)`.
118+- Signatures change where the Prelude table says: `clap` takes two units of one value type and a combining gate over that type; maps and sets are plain gates over Hoon's trees, as `(get.by m k)`; folds take a start, as `(roll xs init f)`, `rep.by` and `rep.in`; ordered maps go through lull's `on`, as `(get.on lte m k)`.
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 `$^` whose cases don't differ as nouns, each where used; a `(facts …)` outside an API file's `paths`; a gate in island data or a model, naming the field; a repeated attribute in a literal list. Read the Grammar tab, and the other tabs' mentions of "error" and "the checker", and make the list complete.
124+- Each one the Grammar tab describes needs a golden case with its message. A start on the list: an aura mismatch; mismatched faces; "msg has no case %submitt"; an unresolved tag, as the Grammar's `add-button` ("nothing fixes the union of %add"); an open constraint at the end of a module; a `|=%tag` whose union has no such case tagged at its head; a union whose cases overlap; a missing `?-` case, named; an arm that earlier arms cover; a value that refers to itself; a shadowed name, including a prelude or imported one; a cell in `{…}` with no printer; an atom of a generic aura in `{…}` or a path's `(…)`; a capital that a body makes a `@ud` or a list; `~[text "hi"]`, where the checker suggests `~[(text "hi")]`; clashing derived names; an import cycle; from an import, a signed or float aura, a core, gate or vase, or a `$%`, `$?` or `$^` whose cases don't differ as nouns, or a record with duplicate field names, each where used; a `(facts …)` outside an API file's `paths`; a gate in island data or a model, naming the field; a repeated attribute in a literal list. Read the Grammar tab, and the other tabs' mentions of "error" and "the checker", and make the list complete.
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+11−6
@@ -26,23 +26,27 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
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; 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 |
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`; pokes and requests are opaque, from derived gates and `pure`; islands read agents only by watching; replies get full state, and diffs take a fold; timers carry the time; `%who` gives the owner's `@p`; nacks reach replies as text | Decided 2026-10-29 |
34+| Effects | The library unions `cmd` and `sub`; `poke`, `ask` and `qath` are transparent types defined in the internal prelude and re-exported normally; derived gates and `pure` also construct requests; islands read agents only by watching; replies get full state, and diffs take a fold; timers carry the time; `%who` gives the owner's `@p`; nacks reach replies as text | Decided 2026-10-31 |
35+| Poke representation | The source-backed private internal prelude module defines `poke`, and the public prelude re-exports it as an ordinary transparent type. Ordinary modules can construct and inspect its values | Decided 2026-10-31 |
35| 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 watching such a request has a type error; typed segments by aura | Decided 2026-10-30 |
36| 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 |
37| 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 |
38−| Hoon types | A fixed translation table; `map`, `set`, `qeu`, `jar`, `jug` by name; `mop` as `(mop K V)`, read with `on`; unused molds skipped | Decided 2026-10-29 |
39+| Hoon types | A fixed translation table; `map`, `set`, `qeu`, `jar`, `jug` by name; `mop` as `(mop K V)`, read with `on`; imported `$%`, `$?` and `$^` cases must differ as nouns, and records with duplicate field names are errors where used; unused molds skipped | Decided 2026-10-30 |
40+| Record fields | Duplicate field names in a Jibb-written record are an error, as they are in an imported Hoon record | Decided 2026-10-31 |
41+| Record projection | The explicit type-directed operation `proj` takes a record and uses its expected result type to select its fields; no projection is inserted automatically. `proj` is reserved and cannot be defined or imported under that name. The result has exactly the fields declared by its type | Decided 2026-10-31 |
39| 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 |
40| 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 |
41| Long calls | One argument per line inside parentheses | Decided |
44| Long calls | One argument per line inside parentheses | Decided |
42| Inline gates | Hoon's wide form; the mold may be inferred; a bare sample name binds; `\|=%got` is a case's constructor, typed by the gate expected; a bare tag is always a value | Decided 2026-10-29 |
45| Inline gates | Hoon's wide form; the mold may be inferred; a bare sample name binds; `\|=%got` is a case's constructor, typed by the gate expected; a bare tag is always a value | Decided 2026-10-29 |
43| 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 |
44| 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 |
45−| Type variables | Capitals, generalized per `++`; a capital in a local `++` shares the enclosing `++`'s variable of that name, and a different type takes a different capital; one used where an atom is required gains an inferred atom constraint, and cannot be fixed to a more specific type in its body | Decided 2026-10-30 |
48+| Type variables | Capitals, generalized per `++`; a capital in a local `++` shares the enclosing `++`'s variable of that name if the enclosing `++` also uses it; otherwise it is introduced and generalized locally; a different type takes a different capital; a body cannot force distinct capitals to be equal, so a shared type uses the same capital; one used where an atom is required gains an inferred atom constraint, and cannot be fixed to a more specific type in its body | Decided 2026-10-30 |
49+| Partial type annotations | `_` may appear wherever a mold may appear and marks that part of the type for inference; a hole inferred as a named type variable is resolved; an unconstrained hole is an error, and a named mold or value definition must determine its own holes without constraints from later uses | Decided 2026-10-31 |
46| Loobean mold | `?`, switched with `?-` | Decided 2026-10-26 |
50| Loobean mold | `?`, switched with `?-` | Decided 2026-10-26 |
47| Defaults | None | Decided |
51| Defaults | None | Decided |
48| Modules | Records, not cores | Decided |
52| Modules | Records, not cores | Decided |
@@ -51,6 +55,7 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
51| 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 |
52| 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 |
53| 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 |
54| 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 |
55| Refinement types | None | Decided |
60| Refinement types | None | Decided |
56| 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 |
@@ -67,7 +72,7 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
67| Inputs | A message per input event, none mid-composition; controls reset to the latest view after every event; fields read-only until the island starts | Decided 2026-10-29 |
72| Inputs | A message per input event, none mid-composition; controls reset to the latest view after every event; fields read-only until the island starts | Decided 2026-10-29 |
68| Transactions | None; one poke per command | Decided |
73| Transactions | None; one poke per command | Decided |
69| Reloads | Restart from the model the page is served with | Decided 2026-10-29 |
74| Reloads | Restart from the model the page is served with | Decided 2026-10-29 |
70−| Shared state | Stores: browser agents written like API files, with `state`, `+$ poke` and `(store init update)`; the store's `+$ poke` is a declaration, not a mold; poked and watched through derived gates; one per page | Decided 2026-10-30 |
75+| Shared state | Stores: browser agents written like API files, with `state`, `+$ poke` and `(store init update)`; the store's `+$ poke` is a declaration, not a mold; derived gates provide poke constructors and state requests; one per page | Decided 2026-10-31 |
71| Subscriptions | By agent and path, shared per page; the first fact is full state, so no paths that need a scry path | Decided 2026-10-29 |
76| Subscriptions | By agent and path, shared per page; the first fact is full state, so no paths that need a scry path | Decided 2026-10-29 |
72| Apps | One island under a catch-all route, given the path by `pure`; `%url` delivers the path on every change; in-section links act as `go`; focus moves to the first heading | Decided 2026-10-29 |
77| Apps | One island under a catch-all route, given the path by `pure`; `%url` delivers the path on every change; in-section links act as `go`; focus moves to the first heading | Decided 2026-10-29 |
73| Layout vocabulary | Jibb's elements and theme tokens; the stylesheet comes from the theme alone; chars and fill are inline; `[%fill n]` below 1 counts as 1 | Decided 2026-10-29 |
78| Layout vocabulary | Jibb's elements and theme tokens; the stylesheet comes from the theme alone; chars and fill are inline; `[%fill n]` below 1 counts as 1 | Decided 2026-10-29 |
@@ -76,7 +81,7 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
76| Dark mode | Hand-written dark tones under `dark`, used when the reader prefers dark | Decided 2026-10-27 |
81| Dark mode | Hand-written dark tones under `dark`, used when the reader prefers dark | Decided 2026-10-27 |
77| 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 |
78| Data layer | Hoon's nouns: units, treaps, loobeans | Decided |
83| Data layer | Hoon's nouns: units, treaps, loobeans | Decided |
79−| Prelude | Hoon's standard library regrouped: all names from the listed sections except explicitly excluded groups, including all of 3g, with Hoon's `tone` exposed as `tone.hoon` and Hoon's 1c `step` as `step.hoon`; arithmetic over aura variables, units, lists, maps, sets, queues, ordered maps, function helpers, text, atom printing, a zoned date printer, time and data molds; folds take a start; jetted functions have working Jibb implementations, whose shapes the compiler recognizes to use the Hoon versions, and may take gates; private helpers and low-level primitives live in a separate internal module imported without exposing them, with public foundational gates implemented in Jibb on those primitives; no signed or float gates, or parser gates outside 3g except `slav` and `slaw`; signed or float auras are errors | Decided 2026-10-30 |
84+| Prelude | Hoon's standard library regrouped: all names from the listed sections except explicitly excluded groups, including all of 3g, with Hoon's `tone` exposed as `tone.hoon` and Hoon's 1c `step` as `step.hoon`; arithmetic over aura variables, units, lists, maps, sets, queues, ordered maps, function helpers, text, atom printing, a zoned date printer, time and data molds; folds take a start; jetted functions have working Jibb implementations, whose shapes the compiler recognizes to use the Hoon versions, and may take gates; private helpers and low-level primitives live in a separate internal module imported without exposing them, with public foundational gates implemented in Jibb on those primitives; `clap` takes two units of the same type and a combining gate over that type; no signed or float gates, or parser gates outside 3g except `slav` and `slaw`; signed or float auras are errors | Decided 2026-10-30 |
80| Wire format | Noun channels; Jibb's own noun codec in the browser | Decided 2026-10-29 |
85| Wire format | Noun channels; Jibb's own noun codec in the browser | Decided 2026-10-29 |
81| 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 |
86| 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 |
82| Private pages | Served by the host per request and never cached; non-owners go to the login page | Decided 2026-10-29 |
87| Private pages | Served by the host per request and never cached; non-owners go to the login page | Decided 2026-10-29 |
docs/spec/grammar.md+14−12
@@ -91,7 +91,7 @@ Imports come first:
91/= card /ui/components/card :: a Jibb module
91/= card /ui/components/card :: a Jibb module
92```
92```
93
93
94−`/%` names a type after its mark, so it takes no face, and any mark name works; Hoon's `/%` binds the mark's core instead. Derived constructors such as `todo-action.todo` supply the agent and mark, so code never writes one. API modules re-export their `/%` types, not `/-` faces or `/=` modules. Import cycles are errors.
94+An imported Hoon record with duplicate field names is an error where used; imported union cases must differ as nouns. `/%` names a type after its mark, so it takes no face, and any mark name works; Hoon's `/%` binds the mark's core instead. Derived constructors such as `todo-action.todo` supply the agent and mark, so callers need not write those details. API modules re-export their `/%` types, not `/-` faces or `/=` modules. Import cycles are errors.
95
95
96## Modules
96## Modules
97
97
@@ -118,21 +118,23 @@ 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; use another capital for a different type. A type variable used where an atom is required gains an atom constraint, so `++ clamp |= [lo=A hi=A n=A]`, whose body calls `gth` and `max`, works on any one aura. It can become nothing more specific: a body that makes `A` a `@ud` or a list is an error.
129+- **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−- **Opaque**: `poke`, `ask` and `qath`, built only by derived gates, `pure` and application-path literals. `(facts full diff …)` appears only in an API file's `paths`.
133+- **Pokes**: `poke` is defined in the source-backed private internal prelude module and re-exported by the public prelude as an ordinary transparent type. Ordinary modules can construct and inspect its values.
134+- **Effect and application-path types**: `poke`, `ask` and `qath` are transparent types, defined in the internal prelude and re-exported normally; callers can construct and inspect their values. Derived gates and `pure` also construct requests, and application-path literals have type `qath`. `(facts full diff …)` appears only in an API file's `paths`.
133- **Identity**: recursive molds go by name and module.
135- **Identity**: recursive molds go by name and module.
134
136
135−`eq`'s arguments and map and set keys must contain no gates, even nested inside another value. The checker infers this gate-free constraint on type variables and retains it when generalizing a `++`, so a generic helper that calls `eq` stays generic over gate-free types. Printed types show the constraint as `$-([A A] ?) where A contains no gates`. An inferred atom constraint prints as `$-([A A] A) where A is an atom`. Multiple clauses are comma-separated, as `where A is an atom, B contains no gates`. Union-case matching treats gates as opaque and never inspects a gate to distinguish cases.
137+`eq`'s arguments and map and set keys must contain no gates, even nested inside another value. The checker infers this gate-free constraint on type variables and retains it when generalizing a `++`, so a generic helper that calls `eq` stays generic over gate-free types. Printed types show the constraint as `$-([A A] ?) where A contains no gates`. An inferred atom constraint prints as `$-([A A] A) where A is an atom`; an arithmetic atom constraint that excludes loobeans prints as `where A is an atom other than ?`. Multiple clauses are comma-separated, as `where A is an atom, B contains no gates`. Union-case matching treats gates as opaque and never inspects a gate to distinguish cases.
136
138
137## Tag resolution
139## Tag resolution
138
140
@@ -210,7 +212,7 @@ Tags can sit anywhere in a case, and a case can carry several:
210 [%move %left n] "left {n}"
212 [%move %left n] "left {n}"
211 [%move %right n] "right {n}"
213 [%move %right n] "right {n}"
212 [t %draft] t
214 [t %draft] t
213− [t %sent at] t
215+ [t %sent sent-at] t
214 %stop "stop"
216 %stop "stop"
215```
217```
216
218
@@ -260,7 +262,7 @@ rune = "|=" field ( expr | body )
260 | "?-" expr INDENT arm { NEWLINE arm } DEDENT ;
262 | "?-" expr INDENT arm { NEWLINE arm } DEDENT ;
261arm = pattern ( expr | body ) ; (* every case covered; see Patterns *)
263arm = pattern ( expr | body ) ; (* every case covered; see Patterns *)
262
264
263−mold = aura | "*" | "!!" | "?" | "~" | term | loobean | ref | typevar
265+mold = aura | "_" | "*" | "!!" | "?" | "~" | term | loobean | ref | typevar
264 | pathmold
266 | pathmold
265 | "(" ref mold { mold } ")" | "(" ref { mold } mlines
267 | "(" ref mold { mold } ")" | "(" ref { mold } mlines
266 | "[" field { field } "]" | "[" { field } flines
268 | "[" field { field } "]" | "[" { field } flines
@@ -269,7 +271,7 @@ field = [ name "=" ] mold | "=" name ; (* =msg is msg=msg *)
269mlines = INDENT mold { NEWLINE mold } DEDENT ; (* a mold's ( left open *)
271mlines = INDENT mold { NEWLINE mold } DEDENT ; (* a mold's ( left open *)
270flines = INDENT field { NEWLINE field } DEDENT ; (* a mold's [ left open *)
272flines = INDENT field { NEWLINE field } DEDENT ; (* a mold's [ left open *)
271pathmold = "/" [ segment { "/" segment } ] ;
273pathmold = "/" [ segment { "/" segment } ] ;
272−segment = knot | "[" name "=" aura "]" ;
274+segment = knot | "[" name "=" ( aura | "_" ) "]" ;
273
275
274pattern = term | number | string | ship | loobean | "~" | "*" | name
276pattern = term | number | string | ship | loobean | "~" | "*" | name
275 | "[" pattern { pattern } "]" ;
277 | "[" pattern { pattern } "]" ;
@@ -339,4 +341,4 @@ knot = { lower | digit | "-" | "." | "~" | "_" } ;
339 button "Add" %add
341 button "Add" %add
340```
342```
341
343
342−A store is written like an API file: `state`, `+$ poke` and `(store init update)`. Islands poke it with derived constructors and watch it with `(state.cart |=%got)`, whose first fact is the current state and each later fact the next. It runs in the browser, shared by the page's islands.
344+A store is written like an API file: `state`, `+$ poke` and `(store init update)`. Islands can poke it with derived constructors and watch it with `(state.cart |=%got)`, whose first fact is the current state and each later fact the next. It runs in the browser, shared by the page's islands.
docs/spec/overview.md+5−5
@@ -63,7 +63,7 @@ Hoon's runes and literals in an indentation layout, over Hoon's nouns and molds,
63
63
64| Hoon | Jibb |
64| Hoon | Jibb |
65| --- | --- |
65| --- | --- |
66−| `$%`, `$?` | A union |
66+| `$%`, `$?` | A union if its cases differ as nouns, else an error where used |
67| `$@` | A union with an atom case |
67| `$@` | A union with an atom case |
68| `$^` | A union if its cases differ as nouns, else an error where used |
68| `$^` | A union if its cases differ as nouns, else an error where used |
69| `$~` | Dropped |
69| `$~` | Dropped |
@@ -72,18 +72,18 @@ Hoon's runes and literals in an indentation layout, over Hoon's nouns and molds,
72| Other `$\|` | Its base type |
72| Other `$\|` | Its base type |
73| `%0`, `%&`, `%\|` | Tags |
73| `%0`, `%&`, `%\|` | Tags |
74| Recursive molds, such as `json` | Recursive, matched by name |
74| Recursive molds, such as `json` | Recursive, matched by name |
75−| Cores, gates, vases, signed and float auras | An error where used |
75+| Records with duplicate field names; cores, gates, vases, signed and float auras | An error where used |
76
76
77Unused molds are skipped, so unsupported constructs elsewhere in a `/sur` file are fine. A union without a name, as a field's `?(%approve %deny)`, imports too, though Jibb can't write one. Messages and printed types show its cases separated by spaces, as `%approve %deny`; this notation is print-only.
77Unused molds are skipped, so unsupported constructs elsewhere in a `/sur` file are fine. A union without a name, as a field's `?(%approve %deny)`, imports too, though Jibb can't write one. Messages and printed types show its cases separated by spaces, as `%approve %deny`; this notation is print-only.
78
78
79## Prelude
79## Prelude
80
80
81−Hoon's standard library regrouped, written in Jibb and vendored as `/lib/jibb/prelude`; an island's bundle carries only what it uses. The exported inventory includes all names from the Hoon library sections listed below, excluding the groups explicitly left out. Jetted prelude functions have working Jibb implementations; the compiler recognizes their shapes and uses the Hoon versions so jets can fire. They may take gates as arguments (Core language). Private helpers and low-level primitives live in a separate internal prelude module, imported without exposing them; foundational public gates are implemented in Jibb on top of those primitives. The prelude also holds `eq`, `not`, `page`, `program`, `store`, `pure`, `island`, and the layout elements and molds.
81+Hoon's standard library regrouped, written in Jibb and vendored as `/lib/jibb/prelude`; an island's bundle carries only what it uses. The exported inventory includes all names from the Hoon library sections listed below, excluding the groups explicitly left out. Jetted prelude functions have working Jibb implementations; the compiler recognizes their shapes and uses the Hoon versions so jets can fire. They may take gates as arguments (Core language). Private helpers and low-level primitives live in a separate internal prelude module, imported without exposing them; foundational public gates are implemented in Jibb on top of those primitives. This source-backed internal module defines `poke`; the public prelude re-exports it as an ordinary transparent type, so ordinary modules can construct and inspect its values. The prelude also holds `eq`, `not`, `page`, `program`, `store`, `pure`, `island`, and the layout elements and molds.
82
82
83| Group | Hoon | Jibb |
83| Group | Hoon | Jibb |
84| --- | --- | --- |
84| --- | --- | --- |
85| Arithmetic | [1a](https://docs.urbit.org/hoon/stdlib/1a), [2g](https://docs.urbit.org/hoon/stdlib/2g) | Jibb gates over shared atom-constrained type variables, using private low-level primitives: `add`, `sub`, `div`, `mod`, `gth`, `max`, `pow` |
85| Arithmetic | [1a](https://docs.urbit.org/hoon/stdlib/1a), [2g](https://docs.urbit.org/hoon/stdlib/2g) | Jibb gates over shared atom-constrained type variables, using private low-level primitives: `add`, `sub`, `div`, `mod`, `gth`, `max`, `pow` |
86−| Units | [2a](https://docs.urbit.org/hoon/stdlib/2a) | `fall`, `need`, `bind`, `biff` |
86+| Units | [2a](https://docs.urbit.org/hoon/stdlib/2a) | `fall`, `need`, `bind`, `biff`, `clap`; `clap` takes two units of the same type and a gate combining two values of that type into one of that type |
87| Lists | [2b](https://docs.urbit.org/hoon/stdlib/2b) | `turn`, `weld`, `snag`, `lent`, `sort`, `skim`; `(roll xs init f)` takes a start |
87| Lists | [2b](https://docs.urbit.org/hoon/stdlib/2b) | `turn`, `weld`, `snag`, `lent`, `sort`, `skim`; `(roll xs init f)` takes a start |
88| Maps, sets, queues | [2h](https://docs.urbit.org/hoon/stdlib/2h)–[2m](https://docs.urbit.org/hoon/stdlib/2m), [2o](https://docs.urbit.org/hoon/stdlib/2o) | Plain gates over Hoon's trees, such as `(get.by m k)`; `rep.by` and `rep.in` take a start; ordered maps through lull's `on`, as `(get.on lte m k)` |
88| Maps, sets, queues | [2h](https://docs.urbit.org/hoon/stdlib/2h)–[2m](https://docs.urbit.org/hoon/stdlib/2m), [2o](https://docs.urbit.org/hoon/stdlib/2o) | Plain gates over Hoon's trees, such as `(get.by m k)`; `rep.by` and `rep.in` take a start; ordered maps through lull's `on`, as `(get.on lte m k)` |
89| Function helpers | [2n](https://docs.urbit.org/hoon/stdlib/2n) | `same`, `head`, `tail`, `cork`, `cury` |
89| Function helpers | [2n](https://docs.urbit.org/hoon/stdlib/2n) | `same`, `head`, `tail`, `cork`, `cury` |
@@ -150,7 +150,7 @@ Loads and renders run in Nock.
150 [%url reply=$-(path M)]
150 [%url reply=$-(path M)]
151```
151```
152
152
153−- `poke` and `ask` are opaque, built only by derived gates and `pure`. A constructor such as `(todo-action.todo [%add draft.m])` checks its value and supplies the agent and mark, so one island can poke several agents. The agent's mark rechecks on the ship; a nack's `tang` reaches the reply as text. Store constructors poke the store in the browser.
153+- `poke`, `ask` and `qath` are transparent types defined in the internal prelude and re-exported normally. Derived gates and `pure` also construct requests. A derived poke constructor such as `(todo-action.todo [%add draft.m])` checks its value and supplies the agent and mark, so one island can poke several agents. The agent's mark rechecks on the ship; a nack's `tang` reaches the reply as text. Store constructors poke the store in the browser.
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`.
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`.
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.
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.
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.
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.
docs/status.md+65−9
@@ -1,6 +1,6 @@
1# Status
1# Status
2
2
3−As of 2026-10-30. The plan is [spec/implementation-plan.md](spec/implementation-plan.md); each milestone ends with its checks passing on a fake ship.
3+As of 2026-10-31. The plan is [spec/implementation-plan.md](spec/implementation-plan.md); each milestone ends with its checks passing on a fake ship.
4
4
5| # | Milestone | Status |
5| # | Milestone | Status |
6| --- | --- | --- |
6| --- | --- | --- |
@@ -19,9 +19,15 @@ 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 selected Hoon atoms, term singletons, nested faced or unfaced cells, supported disjoint unions and opaque standard collections from `/sur` molds and marks into inference. Collections retain their names and supported arguments for printing and unification; nested supported union arguments are retained too. The bridge trusts unchanged results from the source-aware reader; a materialized type graph alone cannot reveal cases Hoon already collapsed. The source-validated standard prelude `list` mold shares this representation with imported lists; other Jibb-written collection molds and prelude collection operations are not yet connected; malformed names and arities fail closed. Selected self-recursive `/sur` molds cross as opaque module-and-name identities; aliases, foreign references, recursive marks, unfolding and construction remain unsupported. The reader handles mark samples, recursive molds whose origins can be verified through Ford imports, nested collections, direct ordered maps, certain ordered-map fields, direct `$^` unions whose cases can be proved disjoint, and one verified explicit union argument in a list, set, map or unit. Ambiguous recursive origins fail closed; recognizable explicit unions are checked from source before Hoon can collapse their cases (doc question 22), while other nested unions, nested ordered maps, general union disjointness and complete import integration remain unfinished. The partial checker resolves a subset of ordinary library imports in dependency order using supplied Jibb sources and a source-derived partial prelude interface, caches completed interfaces per run, and detects missing sources and cycles. It does not yet check API or kind semantics, and the prelude inventory is incomplete. The inference fragment supports unrestricted `@`, selected one-way widenings including aura-family ancestors, generalized atom constraints arising from explicit capitals or bare sample binders, acyclic local value definitions with captures, 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. 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. For a known standard list with a supported element type, a complete `~` / `[item rest]` branch infers the element and tail types in either arm order and checks binders for shadowing. Uncontextualized list literals, general list construction, unknown subjects, unsupported element types and other or incomplete list patterns remain unsupported. A value with type variable `A` can fit a field whose type is that same `A`, including in generic union payloads and nested or repeated record fields. Other variable-dependent face merges remain unsupported. Supported closed unions print using an in-scope name or imported alias; an unnamed nongeneric union prints its cases, parenthesized when nested. The latter is print-only. Generic union types retain all arguments in their printed name; if that name is unavailable, the partial printer reports the limitation. Different import faces for the same origin remain compatible; compatibility across distinct union origins and some generic-argument comparisons remain unsupported. Nonrecursive generic aliases can reorder, repeat or omit parameters while retaining a union’s origin, including through local scopes and library interfaces. A generic union declared directly inside a body remains unsupported, as do differing-variable face constraints in a union payload. A transitive generic union whose name is unavailable is reported as unsupported instead of hiding its arguments. Unfixed decimal literals default to `@ud` in gate-free inferred types; recursive local groups and molds, general branch tag context, other constraint cases and defaulting inside gate types still need work. Collection recognition checks the originating core and fails closed on shadows or unsupported Ford subject shapes; a wrapper regression also rejects forged subjects, samples and tails. Its golden fixtures include three real Tlon files. A Clay test passes a Ford-built nested union through the reader into partial inference. The partial prelude includes `murn`, `join`, `snip` and `rear`, 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; `ask` 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` and `need`. Unsupported entries such as most list helpers remain reserved but unavailable. 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. `ask` is still unfinished.
27+
28+The repository spec records the subsequent type-system and prelude decisions; those changes also need synchronization to the Claude document. An initial inference fragment and a standalone Hoon type reader are being tested. The fragment explicitly reports that it does not check a module; partial bridges pass Hoon `*` in supported nonrecursive molds, selected Hoon atoms, term singletons, the null singleton, the two loobean singletons and their exact fork, nested faced or unfaced cells, supported disjoint unions and opaque standard collections from `/sur` molds and marks into inference. Collections retain their names and supported arguments for printing and unification; nested supported union arguments are retained too. The bridge trusts unchanged results from the source-aware reader; a materialized type graph alone cannot reveal cases Hoon already collapsed. The source-validated standard prelude `list` mold shares this representation with imported lists; other Jibb-written collection molds and most prelude collection operations remain unsupported; malformed names and arities fail closed. Selected self-recursive `/sur` molds, including Tlon `notes.import-node` with list-wrapped self references, cross as opaque module-and-name identities; aliases, foreign references, recursive marks, unfolding and construction remain unsupported. The reader handles mark samples, including a source-proved nonrecursive union from a single Ford-imported `/sur` core, recursive molds whose origins can be verified through Ford imports, nested collections, direct ordered maps, including source-validated named operands such as Tlon `notes.log`, certain ordered-map fields, direct `$^` unions whose cases can be proved disjoint, and one verified explicit union argument in a list, set, map or unit. Tagged `$%` cases can additionally use restricted local named payload molds, bare `~` fields and one level of local named tagged unions, as in real Tlon `notes`, with bounded source proof; unsupported or ambiguous dependencies fail closed. Ambiguous recursive origins fail closed; recognizable explicit unions are checked from source before Hoon can collapse their cases, as @iko confirmed for imported `$%`, `$?` and `$^`, while other nested unions, nested ordered maps, general union disjointness and complete import integration remain unfinished. Opt-in structured reader APIs preserve successful graphs and distinguish definite unsupported-aura and core evidence from failures the reader cannot prove; unverified union disjointness and name-only vase recognition remain unsupported. They revalidate and re-walk failed types. An opt-in partial checker entry point consumes unchanged reader results and reports definite aura or core errors at imported mold use sites when their inputs are unique. Ordered replay covers nested cell samples, record and function casts, and non-generic same-module aliases; unsupported prefixes, cycles and shadowing stop it. Union molds, generic applications, transitive modules and unsupported reader outcomes remain generic. Replay repeats inference and may add work. The partial checker resolves a subset of ordinary library imports in dependency order using supplied Jibb sources and a source-derived partial prelude interface, caches completed interfaces per run, detects missing sources and cycles, and resolves nested fields of imported values with independent scheme instantiation. The source-backed internal prelude defines `poke` and the public prelude re-exports it as a transparent type. A dedicated trusted preparation path supplies a private comparison scheme to the Jibb-written `gth` wrapper; ordinary imports cannot access them. Primitive execution and jet recognition are unfinished, and addition, decrement and length remain unavailable until arithmetic constraints distinguish their results from loobeans. The partial checker resolves its supported source shape and rejects ordinary imports of the private path. An imported API with one mark and a matching direct `+$ poke` declaration can export a constructor and retain agent/mark metadata when the representation has the supported agent case. A separate partial analysis resolves supported API path declarations and their full and diff mark types, including the todo paths; it does not create requests or check an API module. Complete private module checking, other API shapes, request gates, root API and kind checking, stores, `ask`, `pure`, lowering and runtime effects remain unfinished. A possible store or root API with `+$ poke` reports unsupported kind or scope, while definite duplicates and unrelated shadowing still report conflicts. The prelude includes the doc-exact generic `cmd` union; the prelude inventory is incomplete. The inference fragment supports unrestricted `@`, selected one-way widenings including aura-family ancestors, generalized atom constraints arising from explicit capitals or bare sample binders, acyclic local value definitions with captures, selected single self-recursive top-level and local gates, simple and nonrecursive generic mold aliases, selected faced record casts and field reads, and contextual tags, `~` and constructors for closed disjoint unions, including direct nonrecursive generic unions and propagation through complete loobean and unit-shaped branches in casts and known union-sample calls, including nested branches. Known loobean result context also propagates through supported complete branches and binder-only cell arms; binder-only arms over union subjects remain unsupported. A directly known named union can instantiate an unconstrained generic gate sample with its origin, generic arguments and faces preserved; unnamed, pending, recursive and variable-bound cases remain unsupported. A known gate with an unresolved result variable can receive a known enclosing result type before its arguments are inferred; unknown calls and unresolved targets remain conservative. Multi-argument calls form a right-nested sample, retain known faces and shared type variables, and can use known sample positions to contextualize list and union arguments. A definite mismatch points to the failing argument when the fragment can establish it, otherwise to the combined sample; unsupported contextual forms still fail closed. For a supported recursive gate, the checker infers the sample first and uses its exact type, including field faces, for one monomorphic self reference. It generalizes after the body is checked; subsequent uses instantiate it independently. Incompatible recursive arguments can report the gate and argument sites. For a complete loobean branch with one direct self-call arm, a separately inferred closed base type can seed the recursive result before the whole body is checked. Open or pending base types do not seed it; other branch shapes remain subject to the fragment’s existing limits. A supported single local recursive gate also uses a monomorphic self reference and generalizes variables free of the enclosing environment after checking its body; captured variables remain shared. The checker collects written capitals per `++` before inference, excluding nested definitions: a capital used in an enclosing definition is shared with its locals even when written later, while a capital introduced only in a local definition is generalized there. Sibling locals can introduce independent capitals with the same spelling; generic mold parameters keep their own scope. Top-level groups of syntactic gates are inferred together with monomorphic placeholders and shared substitutions, then generalized only after the whole group checks; downstream uses and library interfaces instantiate those schemes independently. A dependency graph identifies groups with two iterative depth-first passes; its conservative local-reference edges can reject otherwise valid programs. Supported local mutually recursive gate groups also use shared monomorphic placeholders and generalize only after the group checks, preserving captured outer variables. A bounded dependency proof reports certain non-gate cycles through values and gates when an explicit atom or loobean result cast and simple unshadowed expressions establish the cycle. Other mixed gate/value cycles, polymorphic recursion, unresolved literal constraints and unresolved branch joins remain unsupported. Reporting repeats inference for a single recursive gate outside a group; grouped reports use the stored schemes. Its performance cost remains unmeasured. A single-arm cell pattern accepts two or more binders, the last capturing the remaining tail; duplicate and shadowed binders are rejected. A structured single-arm pattern also works for a known non-union cell when coverage is proven, including nested literal and wildcard positions. Intermediate union or collection tails, nested patterns, wildcards and faced records remain unsupported. String interpolation accepts known atom auras, unrestricted `@`, tapes and isolated decimal literals; a known cell asks for a printer, and an explicitly generic atom asks for an aura. Loobeans, term singletons, non-tape collections, open types and a type fixed only later remain unsupported. A known closed union with two or more arms supports patterns that provably cover or exclude each remaining case, including payload binders, imported and generic cases, and binder-free catch-alls. Partial boolean patterns can split known `?` positions into their two noun values, up to 64 alternatives across the union; binders retain their original case type. Missing alternatives and covered arms are reported. Other partial patterns, expansions above the limit, binders spanning distinct cases, differing arm result types and some complex two-arm subjects remain unsupported. A cast or known call sample can supply result context through whole-case arms and supported finite loobean refinements for a known union accessed by a wing, a grouped wing or a supported shallow call, including nested cell and list positions; other partial-pattern contexts and subject forms remain unsupported. The Grammar’s `step` block infers in this fragment, but its module is not yet checked. A bare tag proved absent from a known union reports the union and tag sites in casts, single-argument calls, unit payloads, list items and supported branch arms; imported unnamed unions print their cases. Ordered fit replay can identify a missing tag nested in a syntactic tuple, stopping at an earlier mismatch or uncertainty. Known faced records support uniquely named field changes, including nested wings, with field context passed to replacements and the original record type retained. Missing fields, empty changes and definite mismatches report sites; the expected-type site is the edit because the original field declaration location is not retained. Unknown or partly unfaced spines, ambiguous fields and repeated edits remain unsupported. A known record cast supplies field context to its tuple or record initializer, including nested list and union fields; mismatch diagnostics use the cast mold because the original field declaration location is not retained. Isolated cart-style `init` and `update` expressions infer, while the complete cart-store fails closed because its kind and declaration scope remain unchecked. Uncontextualized list literals infer a fresh element type, including empty and nested lists, with independently generalized uses. Unresolved item tags and uncertain widening remain unsupported. Backtick unit construction uses the validated standard prelude unit template, infers its payload without losing pending constraints, and makes the prelude’s `some` available. Ordinary result annotations also let its `bind`, `biff`, `both`, `clap`, `clef` and `flit` infer. A known unit in a cast, call, list item or record field supplies context to its payload, including nested units and lists; mismatches identify the payload and context. Unrelated union identities, some variable-dependent fits, and missing or altered prelude unit templates remain unsupported. Contextual null-headed cells fit their cases, but do not supply a `|=%$` constructor; unresolved nulls remain pending and are reported separately from tags. A known union of `~` and a null-headed cell supports a complete `~` / `[~ value]` branch in either order, including shadow checks; unknown subjects, missing or duplicate arms, and unresolved branch results remain unsupported. This fragment infers the prelude’s `fall` and `need` signatures. With the validated prelude list and a known cast or gate sample, empty, nonempty and nested list literals infer their element types, including contextual union tags; a mismatched element names both sites. In that context `~` and zero-valued terms fit an empty list, and two-item unfaced cells form cons lists, including nested cons and imported-list contexts; invalid heads or tails name both sites. A known gate sample also supplies context to matching positions in a single tuple or record argument, including nested cells; zero literals can fit list positions. A bound zero constant remains unsupported rather than a definite mismatch, and an unknown callee does not supply context. Faced or longer cells and a missing or altered prelude list fail closed. A known list result also supplies context through complete loobean, unit-shaped and list-shaped branches, including recursive and nested branches. For a known standard list with a supported element type, a complete `~` / `[item rest]` branch infers the element and tail types in either arm order and checks binders for shadowing. Unknown subjects, unsupported element types and other or incomplete list patterns remain unsupported. A value with type variable `A` can fit a field whose type is that same `A`, including in generic union payloads and nested or repeated record fields. Other variable-dependent face merges remain unsupported. Forced equality of distinct written capitals now reports both source sites, following @iko’s decision; forcing one to a concrete type remains unsupported. Imported record spines with repeated faces fail closed where used, but only with a generic unsupported diagnostic. Hoon may erase unfaced nested-cell boundaries, so the check can conservatively reject valid names in distinct erased scopes. Supported closed unions print using an in-scope name or imported alias; an unnamed nongeneric union prints its cases, parenthesized when nested. The latter is print-only. Generic union types retain all arguments in their printed name; if that name is unavailable, the partial printer reports the limitation. Different import faces for the same origin remain compatible; compatibility across distinct union origins and some generic-argument comparisons remain unsupported. Nonrecursive generic aliases can reorder, repeat or omit parameters while retaining a union’s origin, including through local scopes and library interfaces. A generic union declared directly inside a body remains unsupported, as do differing-variable face constraints in a union payload. A transitive generic union whose name is unavailable is reported as unsupported instead of hiding its arguments. Unfixed decimal literals default to `@ud` in gate-free inferred types; recursive molds, general branch tag context, other constraint cases and defaulting inside gate types still need work. Collection recognition checks the originating core and fails closed on shadows or unsupported Ford subject shapes; a wrapper regression also rejects forged subjects, samples and tails. Its golden fixtures include three real Tlon files. A Clay test passes a Ford-built nested union through the reader into partial inference. The partial prelude includes `murn`, `join`, `snip`, `rear` and the newly agreed shared-type `clap`, parsed but still awaiting checker and backend validation, and [prelude-inventory.md](prelude-inventory.md) is a source audit, not the complete inventory or signatures. The milestone remains unfinished.
29+
30+The shared prelude interface reserves every name present in the supplied vendored source and makes only supported inferred entries available, including `list`, `unit`, `same`, `fall`, `need`, `bond`, `lure`, `weld`, `snoc` and `turn`. The validated standard `list` mold is injected when the prelude’s own gates are inferred; `weld` and `turn` have ordinary explicit result casts. An absent or altered `list` is not injected, and an altered declaration cannot leak through direct or transitive mold aliases. The same validated template is available when prelude mold aliases are prepared, so supported direct and transitive aliases can use it. Unsupported entries such as most list helpers remain reserved but unavailable; backend validation of the helpers remains outstanding. All callers use the same prelude origin, so a library can export a type containing unqualified `(unit A)` to another module. Preparation rejects empty, malformed, conflicting or import-bearing source; the prepared value is trusted and must come unchanged from `+prepare-prelude`. The module-scope fixture compares the prepared and source-taking paths against the real prelude and a two-module golden under eval and on the ship. The source and checker remain incomplete, so this does not establish complete shadowing coverage or a checked module.
25
31
26## Milestone 1: parser and mark
32## Milestone 1: parser and mark
27
33
@@ -39,9 +45,9 @@ What the plan asks for, and where it is:
39
45
40Besides the plan's list:
46Besides the plan's list:
41
47
42−- 501 golden cases: 285 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.
48+- 628 golden cases: 408 that parse and 220 that fail, each failure at a stated line and column. One failing case has an unclear expectation (corpus question 3). The newer type-output cases exercise only the partial inference fragment. Each case's `about.txt` quotes the doc's words it tests.
43−- The 501-case corpus passed under `urbit eval` in 58.3 s. The fake ship passed all 506 tests, including the importer, importer/checker and mark/checker bridges, module scope and unification checks, with 27.5 s for sync and 32.5 s for tests. The importer golden compares 141 projections; `tools/clay-fixtures` builds the example Hoon fixtures through Clay, checks a recursive Ford import's origin, and passes Clay-built types through the Clay-built importer and partial checker.
49+- The 628-case corpus passed under `urbit eval` in 82.9 s while other checks were running. The fake ship passed all 642 tests, including the importer, importer/checker and mark/checker bridges, module scope, unification, hole, qath and projection guards, with 57.8 s for sync and 66.3 s for tests. The importer golden compares 221 projections; `tools/clay-fixtures` builds the example Hoon fixtures through Clay, checks a recursive Ford import's origin, and passes Clay-built types through the Clay-built importer and partial checker.
44−- `tools/testdata/selftest` (22 checks) and `tools/testdata/ship-selftest` test the tools themselves.
50+- `tools/testdata/selftest` (22 checks), `tools/testdata/ship-selftest` and `tools/testdata/clay-fixtures-selftest` test the tools themselves; the last checks temporary Clay fixture cleanup and signal handling without a ship.
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.
51- 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).
52- 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).
47
53
@@ -81,25 +87,75 @@ Besides the plan's list:
81| 743dfd8 | 2026-10-30 | Propagate union context through unit-shaped branches |
87| 743dfd8 | 2026-10-30 | Propagate union context through unit-shaped branches |
82| 3f90fa8 | 2026-10-30 | Share a partial prelude interface across module inference |
88| 3f90fa8 | 2026-10-30 | Share a partial prelude interface across module inference |
83| 29bd39f | 2026-10-30 | Infer contextual list literals and validate prelude parity |
89| 29bd39f | 2026-10-30 | Infer contextual list literals and validate prelude parity |
84−| This change | 2026-10-30 | Infer complete list-shaped branches |
90+| a2a6ef5 | 2026-10-30 | Infer complete list-shaped branches |
91+| 671fe72 | 2026-10-30 | Infer contextual list nulls and cons cells |
92+| 7e69436 | 2026-10-30 | Infer selected self-recursive gates |
93+| 9ab52e8 | 2026-10-30 | Infer recursive branches with closed base types |
94+| d782b45 | 2026-10-30 | Propagate list context and apply settled type decisions |
95+| c7082e0 | 2026-10-30 | Infer multi-argument calls |
96+| 918acbd | 2026-10-30 | Infer recursive gates from their samples first |
97+| 1470d18 | 2026-10-30 | Infer selected prelude list helpers |
98+| 10cbf9c | 2026-10-30 | Infer selected local recursive gates and distinguish reader diagnostics |
99+| 45afb13 | 2026-10-30 | Infer local capital scopes and report direct reader diagnostics |
100+| 054e651 | 2026-10-30 | Report nested reader diagnostics |
101+| 98c19cd | 2026-10-30 | Infer known-aura string interpolation |
102+| ddba633 | 2026-10-30 | Infer top-level mutually recursive gates |
103+| 9f1517e | 2026-10-30 | Infer whole-case union patterns and prelude `turn` |
104+| 9dd35c8 | 2026-10-31 | Match finite boolean refinements of union cases |
105+| 54852d4 | 2026-10-31 | Contextualize tuple calls and infer known record changes |
106+| 0bc5113 | 2026-10-31 | Contextualize record initializers and infer unit construction |
107+| 264a436 | 2026-10-31 | Contextualize unit payloads in casts, calls and nested values |
108+| a140383 | 2026-10-31 | Report missing union tags and infer prelude unit helpers |
109+| d69cc52 | 2026-10-31 | Infer longer cell binder patterns and prelude unit helpers |
110+| ae35005 | 2026-10-31 | Import source-verified tagged Hoon unions |
111+| c8f894a | 2026-10-31 | Report nested missing tags and contextualize union branch results |
112+| ef2ea71 | 2026-10-31 | Import Hoon null singleton cases |
113+| 67f900e | 2026-10-31 | Infer local mutual gates and uncontextualized lists |
114+| 7ff15f1 | 2026-10-31 | Contextualize finite union patterns and record the initial poke decision |
115+| c790a9f | 2026-10-31 | Expose transparent `poke` from the internal prelude |
116+| ef4772a | 2026-10-31 | Bridge imported loobeans and loobean singletons |
117+| ad46655 | 2026-10-31 | Bridge selected imported any-noun molds |
118+| beada10 | 2026-10-31 | Import source-proved Ford mark unions, analyze API paths and infer list helpers |
119+| e28f7be | 2026-10-31 | Diagnose proven non-gate cycles and import Tlon null-payload union cases |
120+| fd2f288 | 2026-10-31 | Infer qualified fields of imported values |
121+| ed9291e | 2026-10-31 | Infer term-headed pairs and function helpers, and import nested named unions |
122+| ad0265e | 2026-10-31 | Infer proven single-case patterns and the prelude command union |
123+| 413b12b | 2026-10-31 | Propagate known result context into generic calls and batch ship deletions |
124+| c690076 | 2026-10-31 | Propagate loobean context, infer predicate helpers, and import named ordered-map operands |
125+| 0bf6178 | 2026-10-31 | Bridge recursive Tlon lists and prepare a private comparison interface |
126+| 4e472b5 | 2026-10-31 | Pass known named unions through polymorphic gates |
127+| e3e184f | 2026-10-31 | Parse type holes, reject duplicate written record fields, and extend partial union inference and imports |
128+| 80e221a | 2026-10-31 | Infer supported annotation holes and prelude list aliases |
129+| ba1fec4 | 2026-10-31 | Add the curried `bond` prelude gate |
130+| 0ea700d | 2026-10-31 | Infer a source-defined recursive `qath` subset and record the explicit `proj` decision |
131+| 75f5952 | 2026-10-31 | Check a subset of explicit `proj` calls and retain their lowering evidence |
132+| This change | 2026-10-31 | Infer supported single-field projections |
85
133
86## Checking it
134## Checking it
87
135
88On a machine set up as [development.md](development.md) says:
136On a machine set up as [development.md](development.md) says:
89
137
90```
138```
91−tools/golden # 501 cases under urbit eval
139+tools/golden # 628 cases under urbit eval
92tools/importer-test # the Hoon importer fixture projection
140tools/importer-test # the Hoon importer fixture projection
93tools/type-import-test # the importer/checker bridge fixture
141tools/type-import-test # the importer/checker bridge fixture
142+tools/type-tlon-test # the real Tlon reader/checker fixture
94tools/type-mark-test # the mark/checker bridge fixture
143tools/type-mark-test # the mark/checker bridge fixture
144+tools/type-poke-test # the source-backed poke/API fixture
145+tools/type-api-paths-test # partial API path metadata fixture
146+tools/type-hole-guards-test # hole defaulting and API interface guards
147+tools/type-list-alias-test # prelude list-alias guards
148+tools/type-qath-guards-test # qath source and unfolding guards
149+tools/type-proj-guards-test # projection evidence and scope guards
95tools/type-module-scope-test # module and prelude scope fixture
150tools/type-module-scope-test # module and prelude scope fixture
96tools/hoon check-spans-test # prints <<>> when the span checker works
151tools/hoon check-spans-test # prints <<>> when the span checker works
97tools/testdata/selftest # the tools themselves
152tools/testdata/selftest # the tools themselves
98tools/doc-blocks docs/spec # the doc's examples are golden cases
153tools/doc-blocks docs/spec # the doc's examples are golden cases
99tools/ship start
154tools/ship start
100tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
155tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
101−tools/ship test # the same 501 cases as -test arms on the ship
156+tools/ship test # the same 628 cases as -test arms on the ship
102tools/testdata/ship-selftest
157tools/testdata/ship-selftest
158+tools/testdata/clay-fixtures-selftest # scratch fixture cleanup without a ship
103tools/ship check-commit # |commit stores .jibb files
159tools/ship check-commit # |commit stores .jibb files
104tools/clay-fixtures # example /sur files and marks build through Clay
160tools/clay-fixtures # example /sur files and marks build through Clay
105```
161```
jibb-dev/lib/jibb-import.hoon+707−32
@@ -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
@@ -24,9 +25,10 @@
24:: the other fields are fixed atoms or collections of static atoms;
25:: the other fields are fixed atoms or collections of static atoms;
25:: other source shapes fail closed.
26:: other source shapes fail closed.
26::
27::
27−:: The checker has a small bridge for successful unfaced atom and cell
28+:: The partial checker bridges supported nouns, atoms, cells, faces,
28−:: results; it rejects other importer shapes. Failures return %|; no
29+:: proven forks and collections, and keeps proven recursive roots nominal.
30+:: Unsupported shapes fail closed. Reader failures return %|; no partial
29−:: partial tree is returned as success.
31+:: tree is returned as success.
30::
32::
31|%
33|%
32+$ imported
34+$ imported
@@ -37,9 +39,16 @@
37 [%cell head=imported tail=imported]
39 [%cell head=imported tail=imported]
38 [%face name=term body=imported]
40 [%face name=term body=imported]
39 [%fork cases=(list imported)]
41 [%fork cases=(list imported)]
42+ [%named module=term name=term body=imported]
40 [%apply name=term args=(list imported)]
43 [%apply name=term args=(list imported)]
41 [%ref module=term name=term]
44 [%ref module=term name=term]
42 [%bad reason=@t]
45 [%bad reason=@t]
46+ [%invalid code=?(%aura %core) reason=@t]
47+ ==
48++$ import-diagnostic
49+ $% [%ok value=imported]
50+ [%invalid code=?(%aura %core) message=@t]
51+ [%unsupported message=@t]
43 ==
52 ==
44+$ signatures (list [name=term code=hoon])
53+$ signatures (list [name=term code=hoon])
45+$ visiting (list [typ=type name=(unit term)])
54+$ visiting (list [typ=type name=(unit term)])
@@ -70,6 +79,262 @@
70 ^- (each imported @t)
79 ^- (each imported @t)
71 (read-with module name typ ~)
80 (read-with module name typ ~)
72::
81::
82+:: When Hoon's expanded type has lost source cases, inspect the exact
83+:: selected local arm. Restrict this fallback to distinct literal head tags
84+:: and proven-safe dependencies, then verify each projected branch again.
85++$ tagged-case [tag=@ branch=spec]
86+:: Clay and eval expose different versions of the spec union. Inspect help
87+:: and source-location wrappers as nouns before checking their contained spec.
88+++ source-gist-tail
89+ |= raw=*
90+ ^- (unit *)
91+ ?: ?=([%gist [%help *] *] raw) `+.+.raw
92+ ?: ?=([%dbug * *] raw) `+.+.raw
93+ ~
94+::
95+:: Bound metadata work separately from semantic source-node visits.
96+++ source-unwrap
97+ |= [raw=* left=@ud]
98+ ^- (unit *)
99+ =/ wrapper=(unit *) (source-gist-tail raw)
100+ ?~ wrapper `raw
101+ ?: =(left 0) ~
102+ $(raw u.wrapper, left (dec left))
103+::
104+++ tagged-term
105+ |= leaf=spec
106+ ^- (unit @)
107+ =/ plain=(unit *) (source-unwrap leaf 4)
108+ ?~ plain ~
109+ ?. ?=([%leaf %tas @] u.plain) ~
110+ `+.+.u.plain
111+::
112+++ tagged-head
113+ |= branch=spec
114+ ^- (unit @)
115+ =/ plain=(unit *) (source-unwrap branch 4)
116+ ?~ plain ~
117+ =. branch ;;(spec u.plain)
118+ ?+ branch ~
119+ [%bccl *]
120+ ?~ t.p.branch ~
121+ (tagged-term i.p.branch)
122+ ==
123+::
124+++ tagged-cases
125+ |= [cases=(list spec) tags=(list @)]
126+ ^- (unit (list tagged-case))
127+ ?~ cases `~
128+ ?: |((has-spec-cell-union i.cases) (has-spec-general-union i.cases)) ~
129+ =/ tag=(unit @) (tagged-head i.cases)
130+ ?~ tag ~
131+ ?: (lien tags |=(x=@ =(x u.tag))) ~
132+ =/ rest $(cases t.cases, tags [u.tag tags])
133+ ?~ rest ~
134+ `[[u.tag i.cases] u.rest]
135+::
136+:: Benign source annotations have different typed representations on
137+:: Clay and under eval. Inspect the wrapper as a noun, and validate the
138+:: contained Hoon before examining an arm.
139+++ source-note-tail
140+ |= raw=*
141+ ^- (unit *)
142+ ?: ?=([%note [%help *] *] raw) `+.+.raw
143+ ?: ?=([%dbug * *] raw) `+.+.raw
144+ ~
145+::
146+++ source-note-unwrap
147+ |= [raw=* left=@ud]
148+ ^- (unit *)
149+ =/ wrapper=(unit *) (source-note-tail raw)
150+ ?~ wrapper `raw
151+ ?: =(left 0) ~
152+ $(raw u.wrapper, left (dec left))
153+::
154+++ tagged-source-code
155+ |= [code=hoon name=term]
156+ ^- (unit (list tagged-case))
157+ =/ found=(unit spec) (local-mold-spec code name)
158+ ?~ found ~
159+ =/ plain=(unit *) (source-unwrap u.found 4)
160+ ?~ plain ~
161+ =/ body=spec ;;(spec u.plain)
162+ ?. ?=([%bccn *] body) ~
163+ =/ cases=(list spec) p.body
164+ ?~ cases ~
165+ ?~ t.cases ~
166+ (tagged-cases cases ~)
167+::
168+:: Source proof for dependencies of an explicitly tagged union. Only
169+:: simple local molds, standard collections and distinct term enums are
170+:: accepted; computed molds, nested cell unions and cycles fail closed.
171+:: One shared fuel budget bounds repeated visits through acyclic aliases;
172+:: exhaustion or an inherited same-name arm leaves the result unsupported.
173+++ local-arm-source
174+ |= [cor=type name=term]
175+ ^- (unit hoon)
176+ ?. ?=([%core *] cor) ~
177+ =/ chapters=(map term tome) q.r.q.cor
178+ =/ all=(list [term tome]) ~(tap by chapters)
179+ ?: (lien all |=(e=[term tome] &(!=(-.e %$) (chapter-unsafe +.e name)))) ~
180+ =/ chapter=(unit tome) (~(get by chapters) %$)
181+ ?~ chapter ~
182+ (chapter-source u.chapter name)
183+::
184+++ local-mold-spec
185+ |= [code=hoon name=term]
186+ ^- (unit spec)
187+ =/ plain=(unit *) (source-note-unwrap code 4)
188+ ?~ plain ~
189+ =. code ;;(hoon u.plain)
190+ ?+ code ~
191+ [%ktcl *]
192+ ?. ?=([%name * *] p.code) ~
193+ ?. =(name p.p.code) ~
194+ `q.p.code
195+ ==
196+::
197+++ safe-source-enum
198+ |= [cases=(list spec) seen=(list @) fuel=@ud]
199+ ^- (unit @ud)
200+ ?~ cases `fuel
201+ ?: =(fuel 0) ~
202+ =/ tag=(unit @) (tagged-term i.cases)
203+ ?~ tag ~
204+ ?: (lien seen |=(n=@ =(n u.tag))) ~
205+ $(cases t.cases, seen [u.tag seen], fuel (dec fuel))
206+::
207+++ safe-source-specs-mode
208+ |= [xs=(list spec) cor=type seen=(list term) fuel=@ud allow-nested=?]
209+ ^- (unit @ud)
210+ ?~ xs `fuel
211+ =/ left=(unit @ud) (safe-source-spec-mode i.xs cor seen fuel allow-nested)
212+ ?~ left ~
213+ $(xs t.xs, fuel u.left)
214+::
215+++ safe-source-name-mode
216+ |= [name=term cor=type seen=(list term) fuel=@ud allow-nested=?]
217+ ^- (unit @ud)
218+ :: Permit a direct root revisit or one proven nested self-revisit.
219+ :: Mutual cycles and inherited same-name bindings remain unavailable.
220+ ?: (lien seen |=(x=term =(name x)))
221+ ?. ?=([%core *] cor) ~
222+ ?. (scope-safe p.cor name) ~
223+ ?: =(seen ~[name]) `fuel
224+ ?. allow-nested ~
225+ ?. ?=([* [* ~]] seen) ~
226+ ?. =(i.seen name) ~
227+ =/ selected=(unit hoon) (local-arm-source cor name)
228+ ?~ selected ~
229+ =/ cases=(unit (list tagged-case)) (tagged-source-code u.selected name)
230+ ?~ cases ~
231+ `fuel
232+ =/ arm=(unit hoon) (local-arm-source cor name)
233+ ?~ arm
234+ ?. &(|(=(name %ship) =(name %path)) (scope-safe cor name)) ~
235+ `fuel
236+ ?. ?=([%core *] cor) ~
237+ ?. (scope-safe p.cor name) ~
238+ =/ body=(unit spec) (local-mold-spec u.arm name)
239+ ?~ body ~
240+ (safe-source-spec-mode u.body cor [name seen] fuel allow-nested)
241+::
242+++ safe-source-spec-mode
243+ |= [shape=spec cor=type seen=(list term) fuel=@ud allow-nested=?]
244+ ^- (unit @ud)
245+ =/ plain=(unit *) (source-unwrap shape 4)
246+ ?~ plain ~
247+ =. shape ;;(spec u.plain)
248+ ?: =(fuel 0) ~
249+ =. fuel (dec fuel)
250+ ?+ shape ~
251+ [%base *] ?:(|(?=([%atom *] p.shape) =(%flag p.shape) =(%null p.shape)) `fuel ~)
252+ [%leaf *] `fuel
253+ [%bcts *] ?@ p.shape $(shape q.shape)
254+ ~
255+ [%bccl *] (safe-source-specs-mode p.shape cor seen fuel allow-nested)
256+ [%bccn *]
257+ :: A source proof may cross one named union dependency. Deeper
258+ :: named unions stay unsupported to bound recursive reprojection.
259+ ?. allow-nested ~
260+ ?. ?=([* [* ~]] seen) ~
261+ =/ cases=(unit (list tagged-case)) (tagged-cases p.shape ~)
262+ ?~ cases ~
263+ ?~ u.cases ~
264+ ?~ t.u.cases ~
265+ (safe-source-tagged-fuel-mode u.cases cor seen fuel allow-nested)
266+ [%bcwt *] (safe-source-enum p.shape ~ fuel)
267+ [%like *]
268+ ?. ?=([@ ~] p.shape) ~
269+ ?. ?=(~ q.shape) ~
270+ (safe-source-name-mode i.p.shape cor seen fuel allow-nested)
271+ [%make *]
272+ =/ wing=(unit term) (source-single-wing p.shape)
273+ ?~ wing ~
274+ =/ n=term u.wing
275+ ?. (lien `(list term)`~[%map %set %qeu %list %unit %jar %jug] |=(x=term =(x n))) ~
276+ ?. (scope-safe cor n) ~
277+ (safe-source-specs-mode q.shape cor seen fuel allow-nested)
278+ ==
279+::
280+++ safe-source-tagged-fuel-mode
281+ |= [cases=(list tagged-case) cor=type seen=(list term) fuel=@ud allow-nested=?]
282+ ^- (unit @ud)
283+ ?~ cases `fuel
284+ =/ left=(unit @ud) (safe-source-spec-mode branch.i.cases cor seen fuel allow-nested)
285+ ?~ left ~
286+ $(cases t.cases, fuel u.left)
287+::
288+++ safe-source-name
289+ |= [name=term cor=type seen=(list term) fuel=@ud]
290+ ^- (unit @ud)
291+ (safe-source-name-mode name cor seen fuel &)
292+::
293+++ safe-source-tagged
294+ |= [cases=(list tagged-case) cor=type seen=(list term) fuel=@ud]
295+ ^- ?
296+ ?=(^ (safe-source-tagged-fuel-mode cases cor seen fuel &))
297+::
298+++ tagged-union-fallback
299+ |= [module=term name=term cor=type]
300+ ^- (unit (each imported @t))
301+ ?. ?=([%core *] cor) ~
302+ =/ chapters=(map term tome) q.r.q.cor
303+ =/ other=(list [term tome]) ~(tap by chapters)
304+ ?: (lien other |=(e=[term tome] &(!=(-.e %$) (chapter-unsafe +.e name)))) ~
305+ =/ chapter=(unit tome) (~(get by chapters) %$)
306+ ?~ chapter ~
307+ =/ selected=(unit hoon) (chapter-source u.chapter name)
308+ ?~ selected ~
309+ =/ cases (tagged-source-code u.selected name)
310+ ?~ cases ~
311+ :: Preserve the original budget when no nested union recovery is needed.
312+ =/ plain=? ?=(^ (safe-source-tagged-fuel-mode u.cases cor ~[name] 4.096 |))
313+ ?. |(plain (safe-source-tagged u.cases cor ~[name] 256)) ~
314+ =/ tried=(each (list type) tang)
315+ (mule |.((turn u.cases |=(c=tagged-case (~(play ut cor) [%kttr branch.c])))))
316+ ?. ?=([%& *] tried) ~
317+ :: Record the selected hold before projecting branches so an exact
318+ :: recursive revisit can retain its independently verified origin.
319+ =/ selected-type=(each type tang)
320+ (mule |.((~(play ut cor) (ream (cat 3 '*' name)))))
321+ ?. ?=([%& *] selected-type) ~
322+ =/ projected=(each (list imported) tang)
323+ (mule |.((turn p.tried |=(t=type (walk module t catalog ~[[p.selected-type [~ name]]] `cor)))))
324+ ?. ?=([%& *] projected) ~
325+ ?^ (first-bads p.projected) ~
326+ ?. (all-disjoint p.projected) ~
327+ =/ xs=(list tagged-case) u.cases
328+ =/ ys=(list imported) p.projected
329+ |-
330+ ?~ xs
331+ ?^ ys ~
332+ `[%& [%fork (sort p.projected |=(pair=[imported imported] (dor -.pair +.pair)))]]
333+ ?~ ys ~
334+ ?. ?=([%cell [%atom %tas [~ @]] *] i.ys) ~
335+ ?. =(tag.i.xs u.value.head.i.ys) ~
336+ $(xs t.xs, ys t.ys)
337+::
73:: +read-mold-in: accept the /sur core as provenance. The core must be
338:: +read-mold-in: accept the /sur core as provenance. The core must be
74:: built against zuse or validated Ford imports, and its selected arm
339:: built against zuse or validated Ford imports, and its selected arm
75:: must be this type. Unknown subject shapes fail closed.
340:: must be this type. Unknown subject shapes fail closed.
@@ -85,8 +350,12 @@
85 ?. =(typ (~(play ut cor) (ream (cat 3 '*' name))))
350 ?. =(typ (~(play ut cor) (ream (cat 3 '*' name))))
86 [%| 'Hoon module provenance does not match the selected mold']
351 [%| 'Hoon module provenance does not match the selected mold']
87 =/ result (read-with module name typ [~ cor])
352 =/ result (read-with module name typ [~ cor])
88− ?. ?=([%& *] result) result
353+ ?: ?=([%& *] result) result
354+ =/ fallback=(each (unit (each imported @t)) tang)
355+ (mule |.((tagged-union-fallback module name cor)))
356+ ?: ?=(%| -.fallback) result
89− result
357+ ?~ p.fallback result
358+ u.p.fallback
90::
359::
91:: +read-named is the source-aware entry point for callers that have
360:: +read-named is the source-aware entry point for callers that have
92:: not selected a Hoon type yet. Check the core and the local arm
361:: not selected a Hoon type yet. Check the core and the local arm
@@ -115,6 +384,41 @@
115:: A mark door's payload is [sample build-subject]. Its outer sample
384:: A mark door's payload is [sample build-subject]. Its outer sample
116:: face names the door sample, not the imported mark type. Collection
385:: face names the door sample, not the imported mark type. Collection
117:: lookup for the sample happened against the pre-door build subject.
386:: lookup for the sample happened against the pre-door build subject.
387+:: Fallback for a mark whose sample is exactly one arm of its only
388+:: Ford-imported /sur core. Source validation remains in read-mold-in.
389+:: Recursive results need a separate mark-origin/interface design.
390+++ mark-has-ref
391+ |= node=imported
392+ ^- ?
393+ ?- node
394+ [%ref *] &
395+ [%named *] $(node body.node)
396+ [%face *] $(node body.node)
397+ [%cell *] |($(node head.node) $(node tail.node))
398+ [%fork *] (lien cases.node |=(child=imported (mark-has-ref child)))
399+ [%apply *] (lien args.node |=(child=imported (mark-has-ref child)))
400+ * |
401+ ==
402+::
403+++ mark-union-fallback
404+ |= [raw=type context=type]
405+ ^- (unit (each imported @t))
406+ ?. ?=([%cell [%face @ [%core *]] *] context) ~
407+ ?. =(q.context -:!>(..zuse)) ~
408+ =/ alias=term p.p.context
409+ =/ core=type q.p.context
410+ ?. ?=([%hold *] raw) ~
411+ =/ name=(unit term) (hold-name q.raw)
412+ ?~ name ~
413+ =/ selected=(each type tang)
414+ (mule |.((~(play ut core) (ream (cat 3 '*' u.name)))))
415+ ?. ?=([%& *] selected) ~
416+ ?. =(p.selected raw) ~
417+ =/ result=(each imported @t) (read-mold-in alias u.name raw core)
418+ ?. ?=([%& [%fork *]] result) ~
419+ ?: (mark-has-ref p.result) ~
420+ `result
421+::
118++ read-mark
422++ read-mark
119 |= [name=term cor=type]
423 |= [name=term cor=type]
120 ^- (each imported @t)
424 ^- (each imported @t)
@@ -125,8 +429,48 @@
125 =/ sample=type p.p.cor
429 =/ sample=type p.p.cor
126 =/ raw=type ?:(?=([%face *] sample) q.sample sample)
430 =/ raw=type ?:(?=([%face *] sample) q.sample sample)
127 =/ result (read-with name name raw [~ q.p.cor])
431 =/ result (read-with name name raw [~ q.p.cor])
128− ?. ?=([%& *] result) result
432+ ?: ?=([%& *] result) result
129− result
433+ =/ fallback=(each (unit (each imported @t)) tang)
434+ (mule |.((mark-union-fallback raw q.p.cor)))
435+ ?: ?=(%| -.fallback) result
436+ ?~ p.fallback result
437+ u.p.fallback
438+::
439+++ read-named-diagnostic
440+ |= [module=term name=term cor=type]
441+ ^- import-diagnostic
442+ =/ result=(each imported @t) (read-named module name cor)
443+ ?: ?=(%& -.result) [%ok p.result]
444+ ?. ?=([%core *] cor) [%unsupported p.result]
445+ ?: =(cor -:!>(..zuse)) [%unsupported p.result]
446+ ?. (scope-safe cor %$) [%unsupported p.result]
447+ =/ chapters=(map term tome) q.r.q.cor
448+ ?. (lien ~(tap by chapters) |=(entry=[term tome] =((chapter-has +.entry name) [~ &])))
449+ [%unsupported p.result]
450+ =/ selected=(each type tang) (mule |.((~(play ut cor) (ream (cat 3 '*' name)))))
451+ ?. ?=(%& -.selected) [%unsupported p.result]
452+ =/ again=(each imported tang) (mule |.((walk module p.selected catalog ~ [~ cor])))
453+ ?. ?=(%& -.again) [%unsupported p.result]
454+ =/ evidence=(unit import-diagnostic) (first-invalid p.again)
455+ ?~ evidence [%unsupported p.result]
456+ u.evidence
457+::
458+++ read-mark-diagnostic
459+ |= [name=term cor=type]
460+ ^- import-diagnostic
461+ =/ result=(each imported @t) (read-mark name cor)
462+ ?: ?=(%& -.result) [%ok p.result]
463+ ?. ?=([%core *] cor) [%unsupported p.result]
464+ ?. ?=([%cell *] p.cor) [%unsupported p.result]
465+ ?. =(p.cor q.q.cor) [%unsupported p.result]
466+ ?. (scope-safe q.p.cor %$) [%unsupported p.result]
467+ =/ sample=type p.p.cor
468+ =/ raw=type ?:(?=([%face *] sample) q.sample sample)
469+ =/ again=(each imported tang) (mule |.((walk name raw catalog ~ [~ q.p.cor])))
470+ ?. ?=(%& -.again) [%unsupported p.result]
471+ =/ evidence=(unit import-diagnostic) (first-invalid p.again)
472+ ?~ evidence [%unsupported p.result]
473+ u.evidence
130::
474::
131++ read-with
475++ read-with
132 |= [module=term name=term typ=type context=(unit type)]
476 |= [module=term name=term typ=type context=(unit type)]
@@ -386,9 +730,8 @@
386 ?: ?=([%bckt ^ ^] h) &
730 ?: ?=([%bckt ^ ^] h) &
387 |($(h -.h) $(h +.h))
731 |($(h -.h) $(h +.h))
388::
732::
389−:: (doc question 22) The Grammar's disjointness rule is applied to
733+:: The Grammar's disjointness rule applies to imported $% and $? too;
390−:: imported $% and $? too. The import table singles out $^, so @iko
734+:: @iko confirmed the rule for imported unions on 2026-10-30.
391−:: has been asked whether that general rule also covers those unions.
392++ has-spec-general-union
735++ has-spec-general-union
393 |= h=*
736 |= h=*
394 ^- ?
737 ^- ?
@@ -546,8 +889,8 @@
546 ?. |(=(p.h [%dtwt [%$ (mul 2 axis)]]) (fits-union-at p.h axis))
889 ?. |(=(p.h [%dtwt [%$ (mul 2 axis)]]) (fits-union-at p.h axis))
547 [%| 'a Hoon union needs a source-level disjointness check']
890 [%| 'a Hoon union needs a source-level disjointness check']
548 ?. (disjoint a b)
891 ?. (disjoint a b)
549− ?: ?=([%fits *] p.h) [%| 'a Hoon union has overlapping cases']
892+ ?: ?=([%fits *] p.h) [%| 'Hoon union disjointness could not be verified']
550− [%| 'a Hoon $^ union has overlapping cases']
893+ [%| 'Hoon $^ union disjointness could not be verified']
551 [%& [%fork (sort (weld (union-cases a) (union-cases b)) |=(pair=[imported imported] (dor -.pair +.pair)))]]
894 [%& [%fork (sort (weld (union-cases a) (union-cases b)) |=(pair=[imported imported] (dor -.pair +.pair)))]]
552 ==
895 ==
553++ union-cases
896++ union-cases
@@ -568,6 +911,8 @@
568 ^- ?
911 ^- ?
569 ?: ?=([%face *] a) $(a body.a)
912 ?: ?=([%face *] a) $(a body.a)
570 ?: ?=([%face *] b) $(b body.b)
913 ?: ?=([%face *] b) $(b body.b)
914+ ?: ?=([%named *] a) $(a body.a)
915+ ?: ?=([%named *] b) $(b body.b)
571 ?: ?=([%fork *] a)
916 ?: ?=([%fork *] a)
572 (levy cases.a |=(item=imported (disjoint item b)))
917 (levy cases.a |=(item=imported (disjoint item b)))
573 ?: ?=([%fork *] b)
918 ?: ?=([%fork *] b)
@@ -622,6 +967,32 @@
622 ?. (arm-map-valid +.chapter) ~
967 ?. (arm-map-valid +.chapter) ~
623 [~ (arm-map-has +.chapter target)]
968 [~ (arm-map-has +.chapter target)]
624::
969::
970+:: Return a unique source arm from either validated tome wrapper. Walk
971+:: the noun map rather than relying on fields that differ on Clay.
972+++ arm-map-sources
973+ |= [m=* target=term]
974+ ^- (list hoon)
975+ ?@ m ~
976+ =/ kv=* -.m
977+ =/ children=* +.m
978+ =/ found=(list hoon) ?:(=(-.kv target) ~[;;(hoon +.kv)] ~)
979+ (weld found (weld $(m -.children) $(m +.children)))
980+::
981+++ chapter-source
982+ |= [chapter=* target=term]
983+ ^- (unit hoon)
984+ ?: (arm-map-valid chapter) (unique-arm-source chapter target)
985+ ?@ chapter ~
986+ ?. (arm-map-valid +.chapter) ~
987+ (unique-arm-source +.chapter target)
988+::
989+++ unique-arm-source
990+ |= [arms=* target=term]
991+ ^- (unit hoon)
992+ =/ sources=(list hoon) (arm-map-sources arms target)
993+ ?. ?=([* ~] sources) ~
994+ `i.sources
995+::
625++ chapter-unsafe
996++ chapter-unsafe
626 |= [chapter=* target=term]
997 |= [chapter=* target=term]
627 ^- ?
998 ^- ?
@@ -664,17 +1035,46 @@
664 ?@ src |
1035 ?@ src |
665 |($(src -.src) $(src +.src))
1036 |($(src -.src) $(src +.src))
666::
1037::
1038+:: Clay can wrap each call component in source-location metadata.
1039+:: Peel only those wrappers; malformed casts are trapped by +mop-specs.
1040+++ mop-source-code
1041+ |= code=hoon
1042+ ^- hoon
1043+ =/ plain=(unit *) (source-unwrap code 4)
1044+ ?~ plain !!
1045+ ;;(hoon u.plain)
1046+::
1047+++ source-single-wing
1048+ |= raw=*
1049+ ^- (unit term)
1050+ =/ plain=(unit *) (source-unwrap raw 4)
1051+ ?~ plain ~
1052+ ?. ?=([%wing [@ ~]] u.plain) ~
1053+ `;;(term -.+.u.plain)
1054+::
667++ mop-specs-raw
1055++ mop-specs-raw
668 |= body=hoon
1056 |= body=hoon
669 ^- (unit [key=spec value=spec])
1057 ^- (unit [key=spec value=spec])
1058+ =. body (mop-source-code body)
670 ?. ?=([%cncl *] body) ~
1059 ?. ?=([%cncl *] body) ~
671 ?. ?=([%tsgr *] p.body) ~
1060 ?. ?=([%tsgr *] p.body) ~
672− =/ b=hoon q.p.body
1061+ =/ b=hoon (mop-source-code q.p.body)
673 ?. ?=([%cncl *] b) ~
1062 ?. ?=([%cncl *] b) ~
1063+ =/ call=hoon (mop-source-code p.b)
674− ?. ?=([%cncl *] p.b) ~
1064+ ?. ?=([%cncl *] call) ~
675− ?. ?=([%wing *] p.p.b) ~
1065+ =/ w=(unit term) (source-single-wing p.call)
676− ?. =(p.p.p.b ~[%mop]) ~
1066+ ?~ w ~
1067+ ?. =(u.w %mop) ~
1068+ =/ raw=* q.call
1069+ =/ wings=(unit [key=spec value=spec])
1070+ ?. ?=([* [* ~]] raw) ~
1071+ =/ a=(unit term) (source-single-wing -.raw)
1072+ =/ b=(unit term) (source-single-wing -.+.raw)
1073+ ?~ a ~
1074+ ?~ b ~
1075+ [~ [[%like ~[u.a] ~] [%like ~[u.b] ~]]]
1076+ ?^ wings wings
677− =/ specs=(list spec) ;;((list spec) q.p.b)
1077+ =/ specs=(list spec) ;;((list spec) raw)
678 ?. ?=([* [* ~]] specs) ~
1078 ?. ?=([* [* ~]] specs) ~
679 [~ [i.specs i.t.specs]]
1079 [~ [i.specs i.t.specs]]
680::
1080::
@@ -871,7 +1271,7 @@
871 =/ err (first-bads cases)
1271 =/ err (first-bads cases)
872 ?^ err [%bad u.err]
1272 ?^ err [%bad u.err]
873 ?. (all-disjoint cases)
1273 ?. (all-disjoint cases)
874− [%bad ?:(is-cell 'a Hoon $^ union has overlapping cases' 'a Hoon union has overlapping cases')]
1274+ [%bad ?:(is-cell 'Hoon $^ union disjointness could not be verified' 'Hoon union disjointness could not be verified')]
875 =/ rewritten=hoon original(q.p body(q.q.p args.u.split))
1275 =/ rewritten=hoon original(q.p body(q.q.p args.u.split))
876 =/ attempt=(each type tang) (mule |.((~(play ut p.typ) rewritten)))
1276 =/ attempt=(each type tang) (mule |.((~(play ut p.typ) rewritten)))
877 ?. ?=([%& *] attempt) [%bad unsupported]
1277 ?. ?=([%& *] attempt) [%bad unsupported]
@@ -884,6 +1284,49 @@
884 ?~ args [%bad unsupported]
1284 ?~ args [%bad unsupported]
885 [%apply name.out u.args]
1285 [%apply name.out u.args]
886::
1286::
1287+:: A nested named tagged union may be recovered only if its hold is
1288+:: exactly the selected arm of this core. Provenance and all original
1289+:: source cases are checked by the same fallback as a top-level arm.
1290+++ nested-tagged-union
1291+ |= [module=term typ=type context=(unit type)]
1292+ ^- (unit imported)
1293+ ?~ context ~
1294+ ?. ?=([%core *] u.context) ~
1295+ ?. ?=([%hold *] typ) ~
1296+ =/ n=(unit term) (hold-name q.typ)
1297+ ?~ n ~
1298+ :: The outer proof has a shared budget. Bound each nested re-proof as
1299+ :: well, so rebuilding a shared source DAG cannot grow without limit.
1300+ =/ source=(unit hoon) (local-arm-source u.context u.n)
1301+ ?~ source ~
1302+ =/ cases=(unit (list tagged-case)) (tagged-source-code u.source u.n)
1303+ ?~ cases ~
1304+ ?. (safe-source-tagged u.cases u.context ~[u.n] 256) ~
1305+ =/ selected=(each type tang)
1306+ (mule |.((~(play ut u.context) (ream (cat 3 '*' u.n)))))
1307+ ?. ?=([%& *] selected) ~
1308+ ?. =(p.selected typ) ~
1309+ =/ attempt=(each (unit (each imported @t)) tang)
1310+ (mule |.((tagged-union-fallback module u.n u.context)))
1311+ ?. ?=([%& *] attempt) ~
1312+ ?~ p.attempt ~
1313+ ?. ?=([%& [%fork *]] u.p.attempt) ~
1314+ `p.u.p.attempt
1315+::
1316+:: Keep the proven owner boundary when a nested union refers to itself.
1317+++ contains-named-ref
1318+ |= [node=imported module=term name=term]
1319+ ^- ?
1320+ ?- node
1321+ [%ref *] &(=(module module.node) =(name name.node))
1322+ [%named *] |
1323+ [%face *] $(node body.node)
1324+ [%cell *] |($(node head.node) $(node tail.node))
1325+ [%fork *] (lien cases.node |=(child=imported (contains-named-ref child module name)))
1326+ [%apply *] (lien args.node |=(child=imported (contains-named-ref child module name)))
1327+ * |
1328+ ==
1329+::
887++ walk
1330++ walk
888 |= [module=term typ=type sig=signatures seen=visiting context=(unit type)]
1331 |= [module=term typ=type sig=signatures seen=visiting context=(unit type)]
889 ^- imported
1332 ^- imported
@@ -892,10 +1335,10 @@
892 %void [%void ~]
1335 %void [%void ~]
893 [%atom *]
1336 [%atom *]
894 ?: |(=('s' (cut 3 [0 1] p.typ)) =('r' (cut 3 [0 1] p.typ)))
1337 ?: |(=('s' (cut 3 [0 1] p.typ)) =('r' (cut 3 [0 1] p.typ)))
895− [%bad 'signed and float auras cannot be imported']
1338+ [%invalid %aura 'signed and float auras cannot be imported']
896 [%atom p.typ q.typ]
1339 [%atom p.typ q.typ]
897 [%cell *] [%cell $(typ p.typ) $(typ q.typ)]
1340 [%cell *] [%cell $(typ p.typ) $(typ q.typ)]
898− [%core *] [%bad 'cores and gates cannot be imported']
1341+ [%core *] [%invalid %core 'cores and gates cannot be imported']
899 [%face *]
1342 [%face *]
900 ?@ p.typ [%face p.typ $(typ q.typ)]
1343 ?@ p.typ [%face p.typ $(typ q.typ)]
901 [%bad 'a complex Hoon face needs translation']
1344 [%bad 'a complex Hoon face needs translation']
@@ -904,10 +1347,23 @@
904 (turn ~(tap in:..zuse p.typ) |=(t=type ^$(typ t)))
1347 (turn ~(tap in:..zuse p.typ) |=(t=type ^$(typ t)))
905 =/ err (first-bads cases)
1348 =/ err (first-bads cases)
906 ?^ err [%bad u.err]
1349 ?^ err [%bad u.err]
907− ?. (all-disjoint cases) [%bad 'a Hoon union has overlapping cases']
1350+ ?. (all-disjoint cases) [%bad 'Hoon union disjointness could not be verified']
908 [%fork (sort cases |=(pair=[imported imported] (dor -.pair +.pair)))]
1351 [%fork (sort cases |=(pair=[imported imported] (dor -.pair +.pair)))]
909 [%hint *] $(typ q.typ)
1352 [%hint *] $(typ q.typ)
910 [%hold *]
1353 [%hold *]
1354+ =/ prior=(unit (unit term)) (find-seen typ seen)
1355+ ?^ prior
1356+ ?~ u.prior [%bad 'an anonymous recursive Hoon mold cannot be named']
1357+ =/ origin (ref-origin module u.u.prior typ context)
1358+ ?~ origin [%bad 'a recursive Hoon mold needs unambiguous source provenance']
1359+ [%ref u.origin u.u.prior]
1360+ =/ nested=(unit imported) (nested-tagged-union module typ context)
1361+ ?^ nested
1362+ ?: ?=(~ seen) u.nested
1363+ =/ name=(unit term) (hold-name q.typ)
1364+ ?~ name u.nested
1365+ ?. (contains-named-ref u.nested module u.name) u.nested
1366+ [%named module u.name u.nested]
911 ?: &(?=([%tsls [%note * *] *] q.typ) |((has-spec-cell-union q.typ) (has-spec-general-union q.typ)))
1367 ?: &(?=([%tsls [%note * *] *] q.typ) |((has-spec-cell-union q.typ) (has-spec-general-union q.typ)))
912 =/ nm (hold-name q.typ)
1368 =/ nm (hold-name q.typ)
913 (collection-union typ module sig [[typ nm] seen] context)
1369 (collection-union typ module sig [[typ nm] seen] context)
@@ -924,14 +1380,8 @@
924 =/ second=type (~(play ut p.typ) (ream '*value'))
1380 =/ second=type (~(play ut p.typ) (ream '*value'))
925 [%apply name ~[first-import $(typ second)]]
1381 [%apply name ~[first-import $(typ second)]]
926 [%apply name ~[first-import]]
1382 [%apply name ~[first-import]]
927− =/ prior=(unit (unit term)) (find-seen typ seen)
928− ?^ prior
929− ?~ u.prior [%bad 'an anonymous recursive Hoon mold cannot be named']
930− =/ origin (ref-origin module u.u.prior typ context)
931− ?~ origin [%bad 'a recursive Hoon mold needs unambiguous source provenance']
932− [%ref u.origin u.u.prior]
933 =/ nm (hold-name q.typ)
1383 =/ nm (hold-name q.typ)
934− ?: =(nm [~ %vase]) [%bad 'vases cannot be imported']
1384+ ?: =(nm [~ %vase]) [%bad 'a Hoon type named vase needs source provenance']
935 ?: &((source-uses q.typ %jar) !(alias-safe context %jar))
1385 ?: &((source-uses q.typ %jar) !(alias-safe context %jar))
936 [%bad 'Hoon collection provenance is unavailable or shadowed']
1386 [%bad 'Hoon collection provenance is unavailable or shadowed']
937 ?: &((source-uses q.typ %jug) !(alias-safe context %jug))
1387 ?: &((source-uses q.typ %jug) !(alias-safe context %jug))
@@ -940,7 +1390,8 @@
940 [%bad 'Hoon collection provenance is unavailable or shadowed']
1390 [%bad 'Hoon collection provenance is unavailable or shadowed']
941 =/ mop (mop-arguments typ)
1391 =/ mop (mop-arguments typ)
942 ?^ mop
1392 ?^ mop
1393+ :: An exact revisit fails closed without guessing a name.
943− [%apply %mop ~[$(typ key.u.mop) $(typ value.u.mop)]]
1394+ [%apply %mop ~[$(typ key.u.mop, seen [[typ ~] seen]) $(typ value.u.mop, seen [[typ ~] seen])]]
944 ?: (source-uses q.typ %mop)
1395 ?: (source-uses q.typ %mop)
945 =/ checked-names=(list term) ~[%map %set %qeu %list %unit]
1396 =/ checked-names=(list term) ~[%map %set %qeu %list %unit]
946 ?: (lien checked-names |=(n=term &((source-uses q.typ n) !(alias-safe context n))))
1397 ?: (lien checked-names |=(n=term &((source-uses q.typ n) !(alias-safe context n))))
@@ -975,7 +1426,7 @@
975 ?^ err [%bad u.err]
1426 ?^ err [%bad u.err]
976 ?: (disjoint first second)
1427 ?: (disjoint first second)
977 [%fork (sort ~[first second] |=(pair=[imported imported] (dor -.pair +.pair)))]
1428 [%fork (sort ~[first second] |=(pair=[imported imported] (dor -.pair +.pair)))]
978− [%bad 'a Hoon $^ union has overlapping cases']
1429+ [%bad 'Hoon $^ union disjointness could not be verified']
979 ?: |((has-cell-union q.typ) (has-fits-union q.typ))
1430 ?: |((has-cell-union q.typ) (has-fits-union q.typ))
980 =/ cannot=@t
1431 =/ cannot=@t
981 ?: (has-fits-union q.typ) 'a Hoon union needs a source-level disjointness check'
1432 ?: (has-fits-union q.typ) 'a Hoon union needs a source-level disjointness check'
@@ -1032,7 +1483,9 @@
1032 [%atom *] ~
1483 [%atom *] ~
1033 [%ref *] ~
1484 [%ref *] ~
1034 [%bad *] [~ reason.out]
1485 [%bad *] [~ reason.out]
1486+ [%invalid *] [~ reason.out]
1035 [%face *] $(out body.out)
1487 [%face *] $(out body.out)
1488+ [%named *] $(out body.out)
1036 [%cell *]
1489 [%cell *]
1037 =/ err $(out head.out)
1490 =/ err $(out head.out)
1038 ?~ err $(out tail.out)
1491 ?~ err $(out tail.out)
@@ -1048,6 +1501,35 @@
1048 =/ err (first-bad i.xs)
1501 =/ err (first-bad i.xs)
1049 ?~ err $(xs t.xs)
1502 ?~ err $(xs t.xs)
1050 err
1503 err
1504+::
1505+++ first-invalid
1506+ |= out=imported
1507+ ^- (unit import-diagnostic)
1508+ ?- out
1509+ [%noun *] ~
1510+ [%void *] ~
1511+ [%atom *] ~
1512+ [%ref *] ~
1513+ [%bad *] `[%unsupported reason.out]
1514+ [%invalid *] `[%invalid code.out reason.out]
1515+ [%face *] $(out body.out)
1516+ [%named *] $(out body.out)
1517+ [%cell *]
1518+ =/ first $(out head.out)
1519+ ?~ first $(out tail.out)
1520+ first
1521+ [%fork *] (first-invalids cases.out)
1522+ [%apply *] (first-invalids args.out)
1523+ ==
1524+::
1525+++ first-invalids
1526+ |= xs=(list imported)
1527+ ^- (unit import-diagnostic)
1528+ ?~ xs ~
1529+ =/ first (first-invalid i.xs)
1530+ ?~ first $(xs t.xs)
1531+ first
1532+::
1051:: +fixture-test: shared golden expectations for eval and the ship.
1533:: +fixture-test: shared golden expectations for eval and the ship.
1052:: A synthetic hold whose first $^ branch cannot be evaluated. It tests
1534:: A synthetic hold whose first $^ branch cannot be evaluated. It tests
1053:: that a failed branch probe is reported rather than crashing the host.
1535:: that a failed branch probe is reported rather than crashing the host.
@@ -1143,7 +1625,7 @@
1143 [%fork ~[[%cell [%face %x [%atom %ud ~]] [%face %y [%atom %ud ~]]] [%atom %ud ~]]]
1625 [%fork ~[[%cell [%face %x [%atom %ud ~]] [%face %y [%atom %ud ~]]] [%atom %ud ~]]]
1144 =/ errors ?: =((sample %valid-cell) [%& expect-valid]) errors
1626 =/ errors ?: =((sample %valid-cell) [%& expect-valid]) errors
1145 ['disjoint cell union' errors]
1627 ['disjoint cell union' errors]
1146− =/ errors ?: =((sample %invalid-cell) [%| 'a Hoon $^ union has overlapping cases']) errors
1628+ =/ errors ?: =((sample %invalid-cell) [%| 'Hoon $^ union disjointness could not be verified']) errors
1147 ['overlapping cell union is rejected' errors]
1629 ['overlapping cell union is rejected' errors]
1148 =/ errors ?: =((shad %mn) [%| 'Hoon collection provenance is unavailable or shadowed']) errors
1630 =/ errors ?: =((shad %mn) [%| 'Hoon collection provenance is unavailable or shadowed']) errors
1149 ['local mop shadow in a field is rejected' errors]
1631 ['local mop shadow in a field is rejected' errors]
@@ -1184,9 +1666,11 @@
1184 [%cell *] "[{(show-import head.out)} {(show-import tail.out)}]"
1666 [%cell *] "[{(show-import head.out)} {(show-import tail.out)}]"
1185 [%face *] "{(trip name.out)}={(show-import body.out)}"
1667 [%face *] "{(trip name.out)}={(show-import body.out)}"
1186 [%fork *] "(union {(show-imports cases.out)})"
1668 [%fork *] "(union {(show-imports cases.out)})"
1669+ [%named *] "(named {(trip name.out)}.{(trip module.out)} {(show-import body.out)})"
1187 [%apply *] "({(trip name.out)} {(show-imports args.out)})"
1670 [%apply *] "({(trip name.out)} {(show-imports args.out)})"
1188 [%ref *] "{(trip name.out)}.{(trip module.out)}"
1671 [%ref *] "{(trip name.out)}.{(trip module.out)}"
1189 [%bad *] "error: {(trip reason.out)}"
1672 [%bad *] "error: {(trip reason.out)}"
1673+ [%invalid *] "error: {(trip reason.out)}"
1190 ==
1674 ==
1191::
1675::
1192++ show-imports
1676++ show-imports
@@ -1204,6 +1688,15 @@
1204 [%| *] "error: {(trip p.result)}"
1688 [%| *] "error: {(trip p.result)}"
1205 ==
1689 ==
1206::
1690::
1691+++ show-import-diagnostic
1692+ |= result=import-diagnostic
1693+ ^- tape
1694+ ?- result
1695+ [%ok *] (show-import value.result)
1696+ [%invalid *] "invalid/{(trip code.result)}: {(trip message.result)}"
1697+ [%unsupported *] "unsupported: {(trip message.result)}"
1698+ ==
1699+::
1207:: Clay includes debug spans around source nodes. Reproduce that
1700:: Clay includes debug spans around source nodes. Reproduce that
1208:: shape without Clay so the same regression runs under eval and -test.
1701:: shape without Clay so the same regression runs under eval and -test.
1209++ decorate-union-source
1702++ decorate-union-source
@@ -1227,6 +1720,67 @@
1227 =/ source=hoon original(q.p (decorate-union-source q.p.original))
1720 =/ source=hoon original(q.p (decorate-union-source q.p.original))
1228 (read-mold %small name typ(q source))
1721 (read-mold %small name typ(q source))
1229::
1722::
1723+:: Test debug metadata at the spec boundary without assuming that the
1724+:: eval version of Hoon's spec mold itself includes Clay's %dbug tag.
1725+++ debug-spec-fixture
1726+ ^- tape
1727+ =/ location=* [/tests/importer/synthetic/hoon [[1 1] [1 2]]]
1728+ =/ wrapped=* [%dbug location [%leaf %tas %x]]
1729+ =/ got=(unit *) (source-gist-tail wrapped)
1730+ ?~ got "debug wrapper missing"
1731+ =/ leaf=(each spec tang) (mule |.(;;(spec u.got)))
1732+ ?. ?=([%& [%leaf %tas %x]] leaf) "debug leaf not recovered"
1733+ =/ branch=spec [%bccl ~[p.leaf [%base [%atom %t]]]]
1734+ ?^ (tagged-cases ~[branch branch] ~) "duplicate tags accepted"
1735+ =/ broken=(unit *) (source-gist-tail [%dbug location 42])
1736+ ?~ broken "debug wrapper missing"
1737+ =/ invalid=(each spec tang) (mule |.(;;(spec u.broken)))
1738+ ?: ?=(%& -.invalid) "malformed spec accepted"
1739+ "valid wrapper; duplicate and malformed rejected"
1740+::
1741+:: The same named-operand call with Clay-style source-location wrappers.
1742+++ debug-mop-fixture
1743+ |= cor=type
1744+ ^- tape
1745+ =/ typ=type (~(play ut cor) (ream '*mop-wing-valid'))
1746+ ?> ?=([%hold *] typ)
1747+ =/ original=hoon q.typ
1748+ ?> ?=([%tsls [%note * *] *] original)
1749+ =/ body=hoon q.p.original
1750+ ?> ?=([%cncl *] body)
1751+ ?> ?=([%tsgr *] p.body)
1752+ =/ b=hoon q.p.body
1753+ ?> ?=([%cncl *] b)
1754+ =/ call=hoon p.b
1755+ ?> ?=([%cncl *] call)
1756+ ?> ?=([* [* ~]] q.call)
1757+ =/ at=spot [/tests/importer/synthetic/hoon [[1 1] [1 2]]]
1758+ =/ inner=hoon call(p [%dbug at p.call], q ~[[%dbug at i.q.call] [%dbug at i.t.q.call]])
1759+ =/ outer=hoon body(p p.body(q b(p [%dbug at inner])))
1760+ =/ mixed=hoon body(p p.body(q b(p inner)))
1761+ =/ multi=hoon body(p p.body(q b(p call(p [%dbug at [%wing ~[%one %two]]]))))
1762+ =/ plain=(unit [key=spec value=spec]) (mop-specs body)
1763+ ?~ plain "unwrapped mop not recognized"
1764+ ?. =((mop-specs [%dbug at outer]) plain) "wrapped mop not recognized"
1765+ ?. =((mop-specs mixed) plain) "mixed mop not recognized"
1766+ ?^ (mop-specs multi) "multi-segment callee accepted"
1767+ ?^ (mop-specs [%dbug at [%sand %ud 42]]) "malformed call accepted"
1768+ ?^ (source-single-wing [%dbug at 42]) "malformed wing accepted"
1769+ ?^ (source-single-wing [%dbug at [%wing ~[%one %two]]]) "multi-segment operand accepted"
1770+ =/ four=* [%dbug at [%dbug at [%dbug at [%dbug at [%wing ~[%mop]]]]]]
1771+ =/ five=* [%dbug at four]
1772+ ?~ (source-single-wing four) "four wrappers rejected"
1773+ ?^ (source-single-wing five) "wrapper limit exceeded"
1774+ ?~ (source-note-unwrap four 4) "four note wrappers rejected"
1775+ ?^ (source-note-unwrap five 4) "note wrapper limit exceeded"
1776+ =/ selected=(unit hoon) (local-arm-source cor %tag-valid)
1777+ ?~ selected "selected union not found"
1778+ =/ arm-four=hoon [%dbug at [%dbug at [%dbug at [%dbug at u.selected]]]]
1779+ =/ arm-five=hoon [%dbug at arm-four]
1780+ ?~ (tagged-source-code arm-four %tag-valid) "four wrapped selected arms rejected"
1781+ ?^ (tagged-source-code arm-five %tag-valid) "selected arm wrapper limit exceeded"
1782+ "wrapped and mixed calls accepted; malformed, multi-segment and excessive wrappers rejected"
1783+::
1230:: Synthetic nodes test each part of the direct collection-call proof.
1784:: Synthetic nodes test each part of the direct collection-call proof.
1231++ collection-wrapper-fixture
1785++ collection-wrapper-fixture
1232 ^- tape
1786 ^- tape
@@ -1272,6 +1826,23 @@
1272 =/ mark-rec-core=type -:(ride fp mark-rec)
1826 =/ mark-rec-core=type -:(ride fp mark-rec)
1273 =/ mark-gate-core=type -:(ride -:!>(..zuse) mark-gate)
1827 =/ mark-gate-core=type -:(ride -:!>(..zuse) mark-gate)
1274 =/ mark-basic-core=type -:(ride -:!>(..zuse) mark-basic)
1828 =/ mark-basic-core=type -:(ride -:!>(..zuse) mark-basic)
1829+ =/ make-mark
1830+ |= [field=@t scope=type]
1831+ ^- type
1832+ -:(ride scope (crip "|_ a={(trip field)}\0a++ grab |% ++ noun a --\0a++ grow |% ++ noun a --\0a++ grad %noun\0a--\0a"))
1833+ =/ mark-union-core=type (make-mark 'mark-flag-valid:small' fp)
1834+ =/ mark-overlap-core=type (make-mark 'mark-flag-overlap:small' fp)
1835+ =/ mark-hidden-core=type (make-mark 'mark-flag-hidden:small' fp)
1836+ =/ mark-signed-core=type (make-mark 'signed:small' fp)
1837+ =/ mark-callable-core=type (make-mark 'gate-test:small' fp)
1838+ =/ extra-subject=type [%cell [%face %other other] fp]
1839+ =/ mark-extra-core=type (make-mark 'mark-flag-valid:small' extra-subject)
1840+ =/ other-hold=type (~(play ut other) (ream '*chain'))
1841+ =/ recursive-hold=type (~(play ut sc) (ream '*chain'))
1842+ =/ fake-vase=type -:(ride -:!>(..zuse) '|%\0a+$ vase @ud\0a--\0a')
1843+ =/ spoof=(unit import-diagnostic)
1844+ (first-invalid [%bad 'signed and float auras cannot be imported'])
1845+ ?> ?=(^ spoof)
1275 =/ mark-shadow-core=type -:(ride sp mark-basic)
1846 =/ mark-shadow-core=type -:(ride sp mark-basic)
1276 =/ tshp=type [%cell [%face %intermediate shc] -:!>(..zuse)]
1847 =/ tshp=type [%cell [%face %intermediate shc] -:!>(..zuse)]
1277 =/ tshc=type -:(ride tshp only-list)
1848 =/ tshc=type -:(ride tshp only-list)
@@ -1282,6 +1853,30 @@
1282 =/ distinct=type -:(ride distinct-parent origin-first)
1853 =/ distinct=type -:(ride distinct-parent origin-first)
1283 =/ trans-amb-parent=type [%cell [%face %intermediate fc] [%cell [%face %second sc] -:!>(..zuse)]]
1854 =/ trans-amb-parent=type [%cell [%face %intermediate fc] [%cell [%face %second sc] -:!>(..zuse)]]
1284 =/ trans-amb=type -:(ride trans-amb-parent origin-trans)
1855 =/ trans-amb=type -:(ride trans-amb-parent origin-trans)
1856+ =/ tag-child=@t
1857+ '|%\0a+$ tag-invalid-cell @t\0a+$ choice $%([%ok a=tag-invalid-cell] [%err a=@ud])\0a--\0a'
1858+ =/ tag-collision=type -:(ride [%cell [%face %base sc] -:!>(..zuse)] tag-child)
1859+ =/ tag-clean=type -:(ride [%cell [%face %base other] -:!>(..zuse)] tag-child)
1860+ =/ tag-zuse=@t
1861+ '|%\0a+$ ship @t\0a+$ path @ud\0a+$ choice $%([%ok who=ship] [%err where=path])\0a--\0a'
1862+ =/ tag-zuse-core=type -:(ride -:!>(..zuse) tag-zuse)
1863+ =/ nest-parent-src=@t
1864+ '|%\0a+$ tag-nest-inner $%([%foreign @t] [%foreign @t])\0a--\0a'
1865+ =/ nest-parent=type -:(ride -:!>(..zuse) nest-parent-src)
1866+ =/ nest-child-src=@t
1867+ '|%\0a+$ tag-nest-inner $%([%left @t] [%right @ud])\0a+$ tag-nest-middle $%([%one x=tag-nest-inner] [%two ~])\0a--\0a'
1868+ =/ nest-collision=type -:(ride [%cell [%face %base nest-parent] -:!>(..zuse)] nest-child-src)
1869+ =/ self-parent=type
1870+ -:(ride -:!>(..zuse) '|%\0a+$ tag-self ?(%same %same)\0a--\0a')
1871+ =/ self-child=@t
1872+ '|%\0a+$ tag-self $%([%branch children=(list tag-self)] [%leaf value=@t])\0a--\0a'
1873+ =/ self-collision=type -:(ride [%cell [%face %tag-self self-parent] -:!>(..zuse)] self-child)
1874+ =/ self-other=type
1875+ -:(ride -:!>(..zuse) '|%\0a+$ tag-self $%([%branch children=(list tag-self)] [%leaf value=@ud])\0a--\0a')
1876+ =/ mop-ford-parent=type
1877+ -:(ride -:!>(..zuse) '|%\0a+$ value ?(%same %same)\0a--\0a')
1878+ =/ mop-ford-child=type
1879+ -:(ride [%cell [%face %value mop-ford-parent] -:!>(..zuse)] '|%\0a+$ key @ud\0a+$ value @t\0a+$ mm ((mop key value) lte)\0a--\0a')
1285 =/ sample
1880 =/ sample
1286 |= name=term
1881 |= name=term
1287 (read-mold-in %small name (~(play ut sc) (ream (cat 3 '*' name))) sc)
1882 (read-mold-in %small name (~(play ut sc) (ream (cat 3 '*' name))) sc)
@@ -1319,6 +1914,15 @@
1319 (crip "nested-static-mop: {(show-result (sample %nested-static-mop))}")
1914 (crip "nested-static-mop: {(show-result (sample %nested-static-mop))}")
1320 (crip "collection-siblings: {(show-result (sample %collection-siblings))}")
1915 (crip "collection-siblings: {(show-result (sample %collection-siblings))}")
1321 (crip "dynamic-sibling-mop: {(show-result (sample %dynamic-sibling-mop))}")
1916 (crip "dynamic-sibling-mop: {(show-result (sample %dynamic-sibling-mop))}")
1917+ (crip "mark-flag-source: {(show-result (read-named %small %mark-flag-valid sc))}")
1918+ (crip "mark-flag-union: {(show-result (read-mark %flag-union mark-union-core))}")
1919+ (crip "mark-flag-overlap: {(show-result (read-mark %flag-overlap mark-overlap-core))}")
1920+ (crip "mark-flag-hidden: {(show-result (read-mark %flag-hidden mark-hidden-core))}")
1921+ (crip "mark-flag-signed: {(show-result (read-mark %flag-signed mark-signed-core))}")
1922+ (crip "mark-flag-callable: {(show-result (read-mark %flag-callable mark-callable-core))}")
1923+ (crip "mark-flag-extra: {(show-result (read-mark %flag-extra mark-extra-core))}")
1924+ (crip "mark-flag-other-hold: {?~((mark-union-fallback other-hold fp) "unsupported" "BAD")}")
1925+ (crip "mark-flag-recursive-fallback: {?~((mark-union-fallback recursive-hold fp) "unsupported" "BAD")}")
1322 (crip "mark-record: {(show-result (read-mark %todo-item mark-core))}")
1926 (crip "mark-record: {(show-result (read-mark %todo-item mark-core))}")
1323 (crip "mark-recursive: {(show-result (read-mark %recursive mark-rec-core))}")
1927 (crip "mark-recursive: {(show-result (read-mark %recursive mark-rec-core))}")
1324 (crip "mark-gate: {(show-result (read-mark %bad mark-gate-core))}")
1928 (crip "mark-gate: {(show-result (read-mark %bad mark-gate-core))}")
@@ -1343,11 +1947,22 @@
1343 (crip "shadow-list-mop: {(show-result (read-mold-in %shadow-static %bad (~(play ut xc) (ream '*bad')) xc))}")
1947 (crip "shadow-list-mop: {(show-result (read-mold-in %shadow-static %bad (~(play ut xc) (ream '*bad')) xc))}")
1344 (crip "named-mop: {(show-result (sample %named-mop))}")
1948 (crip "named-mop: {(show-result (sample %named-mop))}")
1345 (crip "mop-list: {(show-result (sample %mop-list))}")
1949 (crip "mop-list: {(show-result (sample %mop-list))}")
1950+ (crip "mop-wing-valid: {(show-result (sample %mop-wing-valid))}")
1951+ (crip "mop-wing-invalid-key: {(show-result (sample %mop-wing-invalid-key))}")
1952+ (crip "mop-wing-invalid-key-alias: {(show-result (sample %mop-wing-invalid-key-alias))}")
1953+ (crip "mop-wing-invalid-value: {(show-result (sample %mop-wing-invalid-value))}")
1954+ (crip "mop-wing-invalid-value-alias: {(show-result (sample %mop-wing-invalid-value-alias))}")
1955+ (crip "mop-wing-rec-key: {(show-result (sample %mop-wing-rec-key))}")
1956+ (crip "mop-wing-rec-value: {(show-result (sample %mop-wing-rec-value))}")
1957+ (crip "mop-wing-shadow: {(show-result (read-named %shadow %mmw hc))}")
1958+ (crip "mop-wing-ford-collision: {(show-result (read-named %child %mm mop-ford-child))}")
1959+ (crip "mop-wing-debug: {(debug-mop-fixture sc)}")
1346 (crip "signed: {(show-result (sample %signed))}")
1960 (crip "signed: {(show-result (sample %signed))}")
1347 (crip "float: {(show-result (sample %float))}")
1961 (crip "float: {(show-result (sample %float))}")
1348 (crip "gate: {(show-result (sample %gate-test))}")
1962 (crip "gate: {(show-result (sample %gate-test))}")
1349 (crip "vase: {(show-result vase)}")
1963 (crip "vase: {(show-result vase)}")
1350 (crip "failed-branch: {(show-result (read-mold %external %bad bad-branch-fixture))}")
1964 (crip "failed-branch: {(show-result (read-mold %external %bad bad-branch-fixture))}")
1965+ (crip "debug-spec: {debug-spec-fixture}")
1351 (crip "debug-union: {(show-result (debug-union-fixture sc %action))}")
1966 (crip "debug-union: {(show-result (debug-union-fixture sc %action))}")
1352 (crip "debug-union-overlap: {(show-result (debug-union-fixture sc %explicit-wut-overlap))}")
1967 (crip "debug-union-overlap: {(show-result (debug-union-fixture sc %explicit-wut-overlap))}")
1353 (crip "debug-nested-cell: {(show-result (debug-union-fixture sc %nested-valid-cell))}")
1968 (crip "debug-nested-cell: {(show-result (debug-union-fixture sc %nested-valid-cell))}")
@@ -1431,9 +2046,69 @@
1431 (crip "named-missing: {(show-result (read-named %small %missing sc))}")
2046 (crip "named-missing: {(show-result (read-named %small %missing sc))}")
1432 (crip "named-invalid-core: {(show-result (read-named %small %items [%atom %ud ~]))}")
2047 (crip "named-invalid-core: {(show-result (read-named %small %items [%atom %ud ~]))}")
1433 (crip "named-ford-recursive: {(show-result (read-named %ford %recursive fc))}")
2048 (crip "named-ford-recursive: {(show-result (read-named %ford %recursive fc))}")
2049+ (crip "diagnostic-items: {(show-import-diagnostic (read-named-diagnostic %small %items sc))}")
2050+ (crip "diagnostic-signed: {(show-import-diagnostic (read-named-diagnostic %small %signed sc))}")
2051+ (crip "diagnostic-float: {(show-import-diagnostic (read-named-diagnostic %small %float sc))}")
2052+ (crip "diagnostic-overlap: {(show-import-diagnostic (read-named-diagnostic %small %explicit-percent-overlap sc))}")
2053+ (crip "diagnostic-unproved: {(show-import-diagnostic (read-named-diagnostic %small %list-nested-invalid-cell sc))}")
2054+ (crip "diagnostic-mark-gate: {(show-import-diagnostic (read-mark-diagnostic %bad mark-gate-core))}")
2055+ (crip "diagnostic-shadow-vase: {(show-import-diagnostic (read-named-diagnostic %fake %vase fake-vase))}")
2056+ (crip "diagnostic-spoof: {(show-import-diagnostic u.spoof)}")
1434 (crip "missing-arm: {(show-result (read-mold-in %small %missing [%atom %ud ~] sc))}")
2057 (crip "missing-arm: {(show-result (read-mold-in %small %missing [%atom %ud ~] sc))}")
1435 (crip "wrong-provenance: {(show-result (read-mold-in %small %action (~(play ut sc) (ream '*items')) sc))}")
2058 (crip "wrong-provenance: {(show-result (read-mold-in %small %action (~(play ut sc) (ream '*items')) sc))}")
1436 (crip "unverified-subject: {(show-result (read-mold-in %std %jar (~(play ut -:!>(..zuse)) (ream '*(jar @ud @t)')) -:!>(..zuse)))}")
2059 (crip "unverified-subject: {(show-result (read-mold-in %std %jar (~(play ut -:!>(..zuse)) (ream '*(jar @ud @t)')) -:!>(..zuse)))}")
2060+ (crip "tag-ford-collision: {(show-result (read-named %child %choice tag-collision))}")
2061+ (crip "tag-ford-clean: {(show-result (read-named %child %choice tag-clean))}")
2062+ (crip "tag-zuse-local: {(show-result (read-named %child %choice tag-zuse-core))}")
2063+ (crip "tag-nest-inner: {(show-result (sample %tag-nest-inner))}")
2064+ (crip "tag-nest-middle: {(show-result (sample %tag-nest-middle))}")
2065+ (crip "tag-nest-diamond: {(show-result (sample %tag-nest-diamond))}")
2066+ (crip "tag-nest-deep: {(show-result (sample %tag-nest-deep))}")
2067+ (crip "tag-nest-hidden: {(show-result (sample %tag-nest-hidden))}")
2068+ (crip "tag-nest-overlap: {(show-result (sample %tag-nest-overlap))}")
2069+ (crip "tag-nest-recursive: {(show-result (sample %tag-nest-recursive-outer))}")
2070+ (crip "tag-nest-rec-list: {(show-result (sample %tag-nest-rec-list-outer))}")
2071+ (crip "tag-nest-rec-repeat: {(show-result (sample %tag-nest-rec-repeat))}")
2072+ (crip "tag-nest-rec-duplicate: {(show-result (sample %tag-nest-rec-bad-outer))}")
2073+ (crip "tag-nest-rec-hidden: {(show-result (sample %tag-nest-rec-hidden-outer))}")
2074+ (crip "tag-nest-rec-mutual: {(show-result (sample %tag-nest-rec-mutual-outer))}")
2075+ (crip "tag-nest-rec-outer-overlap: {(show-result (sample %tag-nest-rec-outer-overlap))}")
2076+ (crip "tag-nest-rec-owner: {?:(&((contains-named-ref [%ref %small %tag-self] %small %tag-self) !(contains-named-ref [%named %small %other [%ref %small %tag-self]] %small %tag-self)) "yes" "wrong")}")
2077+ (crip "tag-nest-many: {(show-result (sample %tag-nest-many))}")
2078+ (crip "tag-nest-shadow: {(show-result (read-named %shadow-static %tag-nest-shadow xc))}")
2079+ (crip "tag-nest-wrong-hold: {?~((nested-tagged-union %small (~(play ut other) (ream '*chain')) `sc) "unsupported" "BAD")}")
2080+ (crip "tag-nest-ford-collision: {(show-result (read-named %outer %tag-nest-middle nest-collision))}")
2081+ (crip "tag-self: {(show-result (sample %tag-self))}")
2082+ (crip "tag-self-tail: {(show-result (sample %tag-self-tail))}")
2083+ (crip "tag-self-duplicate: {(show-result (sample %tag-self-duplicate))}")
2084+ (crip "tag-self-hidden: {(show-result (sample %tag-self-hidden))}")
2085+ (crip "tag-self-indirect: {(show-result (sample %tag-self-indirect))}")
2086+ (crip "tag-mutual-a: {(show-result (sample %tag-mutual-a))}")
2087+ (crip "tag-mutual-b: {(show-result (sample %tag-mutual-b))}")
2088+ (crip "tag-self-pair: {(show-result (sample %tag-self-pair))}")
2089+ (crip "tag-self-ford-collision: {(show-result (read-named %child %tag-self self-collision))}")
2090+ (crip "tag-self-wrong-core: {(show-result (read-mold-in %other %tag-self (~(play ut sc) (ream '*tag-self')) self-other))}")
2091+ (crip "tag-flat-large: {?:(&(?=(~ (safe-source-name-mode %tag-fuel-7 sc ~ 256 |)) ?=(^ (safe-source-name-mode %tag-fuel-7 sc ~ 4.096 |)) ?=([%& *] (sample %tag-flat-large))) "supported above 256" "BAD")}")
2092+ (crip "tag-null-good: {(show-result (sample %tag-null-good))}")
2093+ (crip "tag-null-duplicate: {(show-result (sample %tag-null-duplicate))}")
2094+ (crip "tag-null-hidden: {(show-result (sample %tag-null-hidden))}")
2095+ (crip "tag-valid: {(show-result (sample %tag-valid))}")
2096+ (crip "tag-duplicate: {(show-result (sample %tag-duplicate))}")
2097+ (crip "tag-collapsed: {(show-result (sample %tag-collapsed))}")
2098+ (crip "tag-invalid-direct: {(show-result (sample %tag-invalid-direct))}")
2099+ (crip "tag-invalid-alias: {(show-result (sample %tag-invalid-alias))}")
2100+ (crip "tag-invalid-list: {(show-result (sample %tag-invalid-list))}")
2101+ (crip "tag-enum-good: {(show-result (sample %tag-enum-good))}")
2102+ (crip "tag-enum-bad: {(show-result (sample %tag-enum-bad))}")
2103+ (crip "tag-nested-good: {(show-result (sample %tag-nested-good))}")
2104+ (crip "tag-shadow-jar: {(show-result (read-named %shadow-static %tag-shadow-jar xc))}")
2105+ (crip "tag-shadow-jug: {(show-result (read-named %shadow-static %tag-shadow-jug xc))}")
2106+ (crip "tag-fuel-small: {?:(?=(^ (safe-source-name %tag-fuel-2 sc ~ 64)) "yes" "no")}")
2107+ (crip "tag-fuel-large: {?:(?=(~ (safe-source-name %tag-fuel-11 sc ~ 64)) "rejected" "wrong")}")
2108+ (crip "presence-action-1: {(show-result (present %action-1))}")
2109+ (crip "presence-command-1: {(show-result (present %command-1))}")
2110+ (crip "presence-update-1: {(show-result (present %update-1))}")
2111+ (crip "presence-response-1: {(show-result (present %response-1))}")
1437 (crip "presence-topic: {(show-result (present %topic))}")
2112 (crip "presence-topic: {(show-result (present %topic))}")
1438 (crip "presence-timing: {(show-result (present %timing))}")
2113 (crip "presence-timing: {(show-result (present %timing))}")
1439 (crip "presence-places: {(show-result (present %places))}")
2114 (crip "presence-places: {(show-result (present %places))}")
jibb-dev/lib/jibb.hoon+3411−161
@@ -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,6 +4614,20 @@
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, implicit narrowing inside selected fields, and projections in
4627+:: recursive groups remain unsupported. Directional fits bound faced-spine
4628+:: proofs to fewer than 1,024 cells; the projection planner has a separate
4629+:: 4,096-step bound. These are inference limits, not language limits.
4630+::
4603+$ itype
4631+$ itype
4604 $~ [%var 0]
4632 $~ [%var 0]
4605 $% [%var id=@ud]
4633 $% [%var id=@ud]
@@ -4608,10 +4636,12 @@
4608 [%atom aura=@ta]
4636 [%atom aura=@ta]
4609 [%any-atom ~]
4637 [%any-atom ~]
4610 [%flag ~]
4638 [%flag ~]
4639+ [%noun ~]
4611 [%tag id=@ud literal=lit constructor=?]
4640 [%tag id=@ud literal=lit constructor=?]
4612 [%const literal=lit]
4641 [%const literal=lit]
4613 [%collection name=term args=(list itype)]
4642 [%collection name=term args=(list itype)]
4614 [%recursive module=term name=term label=(unit @t)]
4643 [%recursive module=term name=term label=(unit @t)]
4644+ [%jrec at=path name=term label=(unit @t) head=term aura=@ta tail=term]
4615 [%union cases=(list itype) origin=(unit [at=path name=term]) label=(unit @t) args=(list itype)]
4645 [%union cases=(list itype) origin=(unit [at=path name=term]) label=(unit @t) args=(list itype)]
4616 [%face name=term body=itype]
4646 [%face name=term body=itype]
4617 [%fn sample=itype product=itype]
4647 [%fn sample=itype product=itype]
@@ -4661,10 +4691,12 @@
4661 %atom |
4691 %atom |
4662 %any-atom |
4692 %any-atom |
4663 %flag |
4693 %flag |
4694+ %noun |
4664 %tag =(n id.t)
4695 %tag =(n id.t)
4665 %const |
4696 %const |
4666 %union |((lien cases.t |=(c=itype (itype-occurs n c sub))) (lien args.t |=(c=itype (itype-occurs n c sub))))
4697 %union |((lien cases.t |=(c=itype (itype-occurs n c sub))) (lien args.t |=(c=itype (itype-occurs n c sub))))
4667 %recursive |
4698 %recursive |
4699+ %jrec |
4668 %collection (lien args.t |=(c=itype (itype-occurs n c sub)))
4700 %collection (lien args.t |=(c=itype (itype-occurs n c sub)))
4669 %face $(t body.t)
4701 %face $(t body.t)
4670 %fn |($(t sample.t) $(t product.t))
4702 %fn |($(t sample.t) $(t product.t))
@@ -4683,6 +4715,8 @@
4683 =. a (itype-walk a sub)
4715 =. a (itype-walk a sub)
4684 =. b (itype-walk b sub)
4716 =. b (itype-walk b sub)
4685 ?: =(a b) `sub
4717 ?: =(a b) `sub
4718+ ?: &(?=(%jrec -.a) ?=(%jrec -.b))
4719+ ?:(&(=(at.a at.b) =(name.a name.b) =(head.a head.b) =(aura.a aura.b) =(tail.a tail.b)) `sub ~)
4686 ?: &(?=(%recursive -.a) ?=(%recursive -.b))
4720 ?: &(?=(%recursive -.a) ?=(%recursive -.b))
4687 ?:(&(=(module.a module.b) =(name.a name.b)) `sub ~)
4721 ?:(&(=(module.a module.b) =(name.a name.b)) `sub ~)
4688 ?: &(?=(%union -.a) ?=(%union -.b))
4722 ?: &(?=(%union -.a) ?=(%union -.b))
@@ -4757,10 +4791,12 @@
4757 %atom |
4791 %atom |
4758 %any-atom &
4792 %any-atom &
4759 %flag |
4793 %flag |
4794+ %noun |
4760 %tag |
4795 %tag |
4761 %const |
4796 %const |
4762 %union |((lien cases.t |=(c=itype (itype-has-any-atom c sub))) (lien args.t |=(c=itype (itype-has-any-atom c sub))))
4797 %union |((lien cases.t |=(c=itype (itype-has-any-atom c sub))) (lien args.t |=(c=itype (itype-has-any-atom c sub))))
4763 %recursive |
4798 %recursive |
4799+ %jrec |
4764 %collection (lien args.t |=(c=itype (itype-has-any-atom c sub)))
4800 %collection (lien args.t |=(c=itype (itype-has-any-atom c sub)))
4765 %face $(t body.t)
4801 %face $(t body.t)
4766 %fn |($(t sample.t) $(t product.t))
4802 %fn |($(t sample.t) $(t product.t))
@@ -4827,10 +4863,12 @@
4827 %atom &
4863 %atom &
4828 %any-atom &
4864 %any-atom &
4829 %flag &
4865 %flag &
4866+ %noun |
4830 %tag &
4867 %tag &
4831 %const &
4868 %const &
4832 %union |((lien cases.typ |=(c=itype (itype-has-fixed-atom c))) (lien args.typ |=(c=itype (itype-has-fixed-atom c))))
4869 %union |((lien cases.typ |=(c=itype (itype-has-fixed-atom c))) (lien args.typ |=(c=itype (itype-has-fixed-atom c))))
4833 %recursive |
4870 %recursive |
4871+ %jrec |
4834 %collection (lien args.typ |=(c=itype (itype-has-fixed-atom c)))
4872 %collection (lien args.typ |=(c=itype (itype-has-fixed-atom c)))
4835 %face $(typ body.typ)
4873 %face $(typ body.typ)
4836 %fn |($(typ sample.typ) $(typ product.typ))
4874 %fn |($(typ sample.typ) $(typ product.typ))
@@ -4916,6 +4954,8 @@
4916 %cell &
4954 %cell &
4917 %union &
4955 %union &
4918 %recursive &
4956 %recursive &
4957+ %jrec &
4958+ %noun &
4919 %collection &
4959 %collection &
4920 %face $(t body.t)
4960 %face $(t body.t)
4921 %fn |($(t sample.t) $(t product.t))
4961 %fn |($(t sample.t) $(t product.t))
@@ -4987,6 +5027,7 @@
4987 ^- ?
5027 ^- ?
4988 ?- -.t
5028 ?- -.t
4989 %recursive &
5029 %recursive &
5030+ %jrec &
4990 %collection (lien args.t |=(c=itype (itype-has-recursive c)))
5031 %collection (lien args.t |=(c=itype (itype-has-recursive c)))
4991 %union (lien (weld args.t cases.t) |=(c=itype (itype-has-recursive c)))
5032 %union (lien (weld args.t cases.t) |=(c=itype (itype-has-recursive c)))
4992 %face $(t body.t)
5033 %face $(t body.t)
@@ -5000,6 +5041,7 @@
5000 ^- ?
5041 ^- ?
5001 ?- -.t
5042 ?- -.t
5002 %recursive ?=(~ label.t)
5043 %recursive ?=(~ label.t)
5044+ %jrec ?=(~ label.t)
5003 %collection (lien args.t |=(c=itype (itype-has-hidden-recursive c)))
5045 %collection (lien args.t |=(c=itype (itype-has-hidden-recursive c)))
5004 %union (lien (weld args.t cases.t) |=(c=itype (itype-has-hidden-recursive c)))
5046 %union (lien (weld args.t cases.t) |=(c=itype (itype-has-hidden-recursive c)))
5005 %face $(t body.t)
5047 %face $(t body.t)
@@ -5050,11 +5092,39 @@
5050++ itype-fit
5092++ itype-fit
5051 |= [actual=itype expected=itype sub=isub next=@ud]
5093 |= [actual=itype expected=itype sub=isub next=@ud]
5052 ^- ifit
5094 ^- ifit
5095+ (itype-fit-inner actual expected sub next | |)
5096+++ itype-fit-inner
5097+ |= [actual=itype expected=itype sub=isub next=@ud skip-width=? spine-proof=?]
5098+ ^- ifit
5099+ ?: &(!skip-width ?=(%cell -.actual) ?=(%cell -.expected) |((width-spine-exhausted actual 1.024) (width-spine-exhausted expected 1.024)))
5100+ [%unknown ~]
5101+ =/ known=(unit [source=iwfields target=iwfields])
5102+ ?: skip-width ~
5103+ (width-known-shape actual expected sub)
5104+ =/ too-wide=? ?~(known | (gth (lent order.source.u.known) (lent order.target.u.known)))
5105+ ?: too-wide [%unknown ~]
5106+ =/ spine-checked=? |(spine-proof ?=(^ known))
5053 =/ uncertain=?
5107 =/ uncertain=?
5054 |(?=(%var -.actual) ?=(%avar -.actual) ?=(%nvar -.actual) ?=(%var -.expected) ?=(%avar -.expected) ?=(%nvar -.expected))
5108 |(?=(%var -.actual) ?=(%avar -.actual) ?=(%nvar -.actual) ?=(%var -.expected) ?=(%avar -.expected) ?=(%nvar -.expected))
5109+ =/ actual-open=?
5110+ |(?=(%var -.actual) ?=(%avar -.actual) ?=(%nvar -.actual))
5055 =. actual (itype-walk actual sub)
5111 =. actual (itype-walk actual sub)
5056 =. expected (itype-walk expected sub)
5112 =. expected (itype-walk expected sub)
5057 ?: =(actual expected) [%ok sub next]
5113 ?: =(actual expected) [%ok sub next]
5114+ :: Any value can be used where a noun is expected. An unresolved
5115+ :: bare tag is fixed as a constant; a constructor still needs a gate.
5116+ ?: ?=(%noun -.expected)
5117+ ?: ?=(%tag -.actual)
5118+ ?: constructor.actual [%unknown ~]
5119+ [%ok [[id.actual expected] sub] next]
5120+ [%ok sub next]
5121+ :: An arbitrary noun is not known to fit a narrower type.
5122+ ?: &(?=(%noun -.actual) !?=(%var -.expected)) [%unknown ~]
5123+ ?: &(!uncertain ?=(%jrec -.actual) ?=(%face -.expected)) $(expected body.expected)
5124+ ?: &(!uncertain ?=(%face -.actual) ?=(%jrec -.expected)) $(actual body.actual)
5125+ ?: &(?=(%jrec -.actual) ?=(%jrec -.expected))
5126+ ?:(&(=(at.actual at.expected) =(name.actual name.expected) =(head.actual head.expected) =(aura.actual aura.expected) =(tail.actual tail.expected)) [%ok sub next] [%bad ~])
5127+ ?: &(|(?=(%jrec -.actual) ?=(%jrec -.expected)) !|(?=(%var -.actual) ?=(%var -.expected))) [%unknown ~]
5058 ?: &(?=(%recursive -.actual) ?=(%recursive -.expected))
5128 ?: &(?=(%recursive -.actual) ?=(%recursive -.expected))
5059 ?:(&(=(module.actual module.expected) =(name.actual name.expected)) [%ok sub next] [%bad ~])
5129 ?:(&(=(module.actual module.expected) =(name.actual name.expected)) [%ok sub next] [%bad ~])
5060 ?: &(|(?=(%recursive -.actual) ?=(%recursive -.expected)) !|(?=(%var -.actual) ?=(%var -.expected))) [%unknown ~]
5130 ?: &(|(?=(%recursive -.actual) ?=(%recursive -.expected)) !|(?=(%var -.actual) ?=(%var -.expected))) [%unknown ~]
@@ -5066,6 +5136,19 @@
5066 =/ unified=(unit isub) (itype-unify-args args.actual args.expected sub)
5136 =/ unified=(unit isub) (itype-unify-args args.actual args.expected sub)
5067 ?^ unified [%ok u.unified next]
5137 ?^ unified [%ok u.unified next]
5068 [%unknown ~]
5138 [%unknown ~]
5139+ :: A known union can instantiate an unconstrained sample directly;
5140+ :: preserve unknown results for variable-bound union origins.
5141+ ?: &(!actual-open ?=(%union -.actual) ?=(%var -.expected))
5142+ ?~ origin.actual [%unknown ~]
5143+ =/ normalized=itype (itype-normalize actual sub)
5144+ ?: |((itype-has-tag normalized) (itype-has-recursive normalized) (itype-has-any-atom actual sub)) [%unknown ~]
5145+ =/ unified=(unit isub) (itype-unify actual expected sub)
5146+ ?~ unified [%unknown ~]
5147+ [%ok u.unified next]
5148+ :: A concrete union value in a tuple may acquire the expected field's
5149+ :: face. A variable-bound union still needs face propagation support.
5150+ ?: &(!uncertain ?=(%union -.actual) ?=(%face -.expected))
5151+ $(expected body.expected)
5069 ?: ?=(%union -.actual) [%unknown ~]
5152 ?: ?=(%union -.actual) [%unknown ~]
5070 ?: &(?=(%union -.expected) |(?=(%avar -.actual) ?=(%nvar -.actual))) [%unknown ~]
5153 ?: &(?=(%union -.expected) |(?=(%avar -.actual) ?=(%nvar -.actual))) [%unknown ~]
5071 ?: &(?=(%union -.expected) !?=(%var -.actual))
5154 ?: &(?=(%union -.expected) !?=(%var -.actual))
@@ -5084,6 +5167,10 @@
5084 =/ trial=ifit (itype-fit-ctor-cases literal.actual sample.expected cases sub next)
5167 =/ trial=ifit (itype-fit-ctor-cases literal.actual sample.expected cases sub next)
5085 ?. ?=(%ok -.trial) trial
5168 ?. ?=(%ok -.trial) trial
5086 [%ok [[id.actual expected] sub.trial] next.trial]
5169 [%ok [[id.actual expected] sub.trial] next.trial]
5170+ :: Zero may be the empty list. A nested cell fit lacks the context
5171+ :: needed to resolve it here, so do not report a definite mismatch.
5172+ ?: &(?=(%collection -.expected) =(%list name.expected) =(0 val.literal.actual))
5173+ [%unknown ~]
5087 ?: ?=(%const -.expected)
5174 ?: ?=(%const -.expected)
5088 ?:(=(val.literal.actual val.literal.expected) [%ok [[id.actual expected] sub] next] [%bad ~])
5175 ?:(=(val.literal.actual val.literal.expected) [%ok [[id.actual expected] sub] next] [%bad ~])
5089 ?: ?=(%atom -.expected)
5176 ?: ?=(%atom -.expected)
@@ -5101,6 +5188,8 @@
5101 [%ok u.u next]
5188 [%ok u.u next]
5102 ?: |(?=(%avar -.expected) ?=(%nvar -.expected)) [%unknown ~]
5189 ?: |(?=(%avar -.expected) ?=(%nvar -.expected)) [%unknown ~]
5103 ?: ?=(%face -.expected) $(expected body.expected)
5190 ?: ?=(%face -.expected) $(expected body.expected)
5191+ ?: &(?=(%collection -.expected) =(%list name.expected) =(0 val.literal.actual))
5192+ [%unknown ~]
5104 ?: ?=(%const -.expected)
5193 ?: ?=(%const -.expected)
5105 ?:(=(val.literal.actual val.literal.expected) [%ok sub next] [%bad ~])
5194 ?:(=(val.literal.actual val.literal.expected) [%ok sub next] [%bad ~])
5106 ?: ?=(%atom -.expected)
5195 ?: ?=(%atom -.expected)
@@ -5130,9 +5219,9 @@
5130 ?: &((aura-prefix aura.actual aura.expected) uncertain) [%unknown ~]
5219 ?: &((aura-prefix aura.actual aura.expected) uncertain) [%unknown ~]
5131 [%bad ~]
5220 [%bad ~]
5132 ?: &(?=(%cell -.actual) ?=(%cell -.expected))
5221 ?: &(?=(%cell -.actual) ?=(%cell -.expected))
5133− =/ first=ifit $(actual hed.actual, expected hed.expected)
5222+ =/ first=ifit $(actual hed.actual, expected hed.expected, skip-width |, spine-proof |)
5134 ?. ?=(%ok -.first) first
5223 ?. ?=(%ok -.first) first
5135− $(actual tal.actual, expected tal.expected, sub sub.first, next next.first)
5224+ $(actual tal.actual, expected tal.expected, sub sub.first, next next.first, skip-width spine-checked, spine-proof spine-checked)
5136 :: A field may add a face to an occurrence of the very same type
5225 :: A field may add a face to an occurrence of the very same type
5137 :: variable. Binding that variable to a face around itself would fail
5226 :: variable. Binding that variable to a face around itself would fail
5138 :: the occurs check, but its underlying type has already matched.
5227 :: the occurs check, but its underlying type has already matched.
@@ -5154,9 +5243,9 @@
5154 [%ok u.unified next]
5243 [%ok u.unified next]
5155 ?: &(?=(%face -.actual) ?=(%face -.expected))
5244 ?: &(?=(%face -.actual) ?=(%face -.expected))
5156 ?. =(name.actual name.expected) [%bad ~]
5245 ?. =(name.actual name.expected) [%bad ~]
5157− $(actual body.actual, expected body.expected)
5246+ $(actual body.actual, expected body.expected, skip-width |, spine-proof |)
5158− ?: ?=(%face -.actual) $(actual body.actual)
5247+ ?: ?=(%face -.actual) $(actual body.actual, skip-width |, spine-proof |)
5159− ?: ?=(%face -.expected) $(expected body.expected)
5248+ ?: ?=(%face -.expected) $(expected body.expected, skip-width |, spine-proof |)
5160 ?: (itype-face-asym actual expected sub) [%unknown ~]
5249 ?: (itype-face-asym actual expected sub) [%unknown ~]
5161 ?: |((itype-has-any-atom actual sub) (itype-has-any-atom expected sub))
5250 ?: |((itype-has-any-atom actual sub) (itype-has-any-atom expected sub))
5162 [%unknown ~]
5251 [%unknown ~]
@@ -5226,22 +5315,119 @@
5226 problems
5315 problems
5227::
5316::
5228:: The expression inference below is deliberately a fragment: bindings,
5317:: The expression inference below is deliberately a fragment: bindings,
5229−:: simple gates, unary calls, fixed-aura literals, and plain strings. The
5318+:: simple gates, calls, fixed-aura literals, and some interpolated strings. The
5230:: result for unsupported syntax is a diagnostic, never a checked module.
5319:: result for unsupported syntax is a diagnostic, never a checked module.
5231::
5320::
5232+$ ischeme [typ=itype vars=(list @ud)]
5321+$ ischeme [typ=itype vars=(list @ud)]
5233+$ ienv (list [name=term scheme=ischeme])
5322+$ ienv (list [name=term scheme=ischeme])
5234+$ imold-types (list [name=term template=ischeme])
5323+$ imold-types (list [name=term template=ischeme])
5324++$ iderived [name=term agent=term mark=term]
5325++$ iwidth-definition [name=term original=expr typ=itype sub=isub projections=(list iwprojection)]
5326++$ iwidth-dependency [at=path source=(unit @t) definitions=(list iwidth-definition)]
5235−+$ ifile [values=ienv molds=imold-types at=path]
5327++$ ifile [values=ienv molds=imold-types at=path derived=(list iderived) elaborations=(list iwidth-definition) dependencies=(list iwidth-dependency) source=(unit @t)]
5236+$ ijimports (list [face=term interface=ifile])
5328+$ ijimports (list [face=term interface=ifile])
5237−+$ icaps (list [name=@t id=@ud])
5329++$ icap [name=@t id=@ud at=span]
5330++$ icaps (list icap)
5238+$ iparams (list [name=@t typ=itype])
5331+$ iparams (list [name=@t typ=itype])
5239+$ imolds (list [name=term body=shape])
5332+$ imolds (list [name=term body=shape])
5240:: A caller supplies the exact noun returned by +read-mold:jibb-import.
5333:: A caller supplies the exact noun returned by +read-mold:jibb-import.
5241:: This core has no Ford dependencies; unrecognized payloads fail closed.
5334:: This core has no Ford dependencies; unrecognized payloads fail closed.
5242+$ iexternals (list [module=term name=term result=*])
5335+$ iexternals (list [module=term name=term result=*])
5243+$ imark-externals (list [mark=term result=*])
5336+$ imark-externals (list [mark=term result=*])
5337+:: Hole obligations survive discarded expressions until their owning
5338+:: definition has inferred; their source spans support unresolved reports.
5339++$ ihole [id=@ud at=span]
5340+:: Recursive-mold unfolding spends fuel in the threaded inference state.
5341+:: Retries can restart from an earlier state, so this bounds an attempt,
5342+:: not all parsing or module-checking work.
5343+:: Experimental: only closed, uniquely faced records have known axes.
5344++$ iwfield [name=term axis=@ud typ=itype]
5345++$ iwfields [order=(list iwfield) index=(map term iwfield)]
5346++$ iwstep [name=term axis=@ud]
5347++$ iwidth-result [steps=(list iwstep) sub=isub next=@ud]
5348++$ iwprojection [at=span original=expr source=itype target=itype steps=(list iwstep)]
5349+++ width-scan
5350+ |= [typ=itype sub=isub axis=@ud fuel=@ud]
5351+ ^- (unit iwfields)
5352+ =/ order=(list iwfield) ~
5353+ =/ index=(map term iwfield) *(map term iwfield)
5354+ |-
5355+ ?: =(0 fuel) ~
5356+ ?: |(?=(%var -.typ) ?=(%avar -.typ) ?=(%nvar -.typ)) ~
5357+ ?: ?=(%face -.typ)
5358+ =/ entry=iwfield [name.typ axis body.typ]
5359+ ?: ?=(^ (~(get by index) name.entry)) ~
5360+ `[(flop [entry order]) (~(put by index) name.entry entry)]
5361+ ?. ?=(%cell -.typ) ~
5362+ =/ head=itype hed.typ
5363+ ?: |(?=(%var -.head) ?=(%avar -.head) ?=(%nvar -.head)) ~
5364+ ?. ?=(%face -.head) ~
5365+ =/ entry=iwfield [name.head (mul 2 axis) body.head]
5366+ ?: ?=(^ (~(get by index) name.entry)) ~
5367+ $(typ tal.typ, axis +((mul 2 axis)), fuel (dec fuel), order [entry order], index (~(put by index) name.entry entry))
5368+++ width-in-order
5369+ |= [source=(list iwfield) target=(list iwfield)]
5370+ ^- ?
5371+ ?~ target &
5372+ ?~ source |
5373+ ?: =(name.i.source name.i.target) $(source t.source, target t.target)
5374+ $(source t.source)
5375+++ width-fit-fields
5376+ |= [source=(map term iwfield) target=(list iwfield) sub=isub next=@ud]
5377+ ^- (unit iwidth-result)
5378+ ?~ target `[~ sub next]
5379+ =/ found=(unit iwfield) (~(get by source) name.i.target)
5380+ ?~ found ~
5381+ =/ fit=ifit (itype-fit typ.u.found typ.i.target sub next)
5382+ ?. ?=(%ok -.fit) ~
5383+ =/ rest=(unit iwidth-result) $(target t.target, sub sub.fit, next next.fit)
5384+ ?~ rest ~
5385+ `[[[name.i.target axis.u.found] steps.u.rest] sub.u.rest next.u.rest]
5386+++ width-spine-exhausted
5387+ |= [t=itype fuel=@ud]
5388+ ^- ?
5389+ ?: =(0 fuel) &
5390+ ?. ?=(%cell -.t) |
5391+ ?. ?=(%face -.hed.t) |
5392+ $(t tal.t, fuel (dec fuel))
5393+++ width-known-shape
5394+ |= [actual=itype expected=itype sub=isub]
5395+ ^- (unit [source=iwfields target=iwfields])
5396+ ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
5397+ =/ source=(unit iwfields) (width-scan actual sub 1 1.024)
5398+ =/ target=(unit iwfields) (width-scan expected sub 1 1.024)
5399+ ?~ source ~
5400+ ?~ target ~
5401+ `[u.source u.target]
5402+::
5403+++ width-shape
5404+ |= [actual=itype expected=itype sub=isub]
5405+ ^- (unit [source=iwfields target=iwfields])
5406+ ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
5407+ =/ source=(unit iwfields) (width-scan actual sub 1 4.096)
5408+ =/ target=(unit iwfields) (width-scan expected sub 1 4.096)
5409+ ?~ source ~
5410+ ?~ target ~
5411+ ?. (gth (lent order.u.source) (lent order.u.target)) ~
5412+ `[u.source u.target]
5413+++ width-proj-shape
5414+ |= [actual=itype expected=itype sub=isub]
5415+ ^- (unit [source=iwfields target=iwfields])
5416+ ?. &(|(?=(%cell -.actual) ?=(%face -.actual)) |(?=(%cell -.expected) ?=(%face -.expected))) ~
5417+ =/ source=(unit iwfields) (width-scan actual sub 1 4.096)
5418+ =/ target=(unit iwfields) (width-scan expected sub 1 4.096)
5419+ ?~ source ~
5420+ ?~ target ~
5421+ ?: (lth (lent order.u.source) (lent order.u.target)) ~
5422+ `[u.source u.target]
5423+::
5424+++ width-project
5425+ |= [shape=[source=iwfields target=iwfields] sub=isub next=@ud]
5426+ ^- (unit iwidth-result)
5427+ ?. (width-in-order order.source.shape order.target.shape) ~
5428+ (width-fit-fields index.source.shape order.target.shape sub next)
5429+::
5244−+$ 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)]
5430++$ istate [next=@ud sub=isub caps=icaps binders=(list @ud) molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) params=iparams active=(list term) tags=(list ipending) in-mold=? at=path top-molds=(list term) prelude=(unit ifile) holes=(list ihole) jrec-fuel=@ud projections=(list iwprojection)]
5245+$ idiag [msg=tape sites=(list [at=span note=tape])]
5431+$ idiag [msg=tape sites=(list [at=span note=tape])]
5246+$ iresult (each [typ=itype state=istate] idiag)
5432+$ iresult (each [typ=itype state=istate] idiag)
5247+$ isample-result (each [typ=itype env=ienv state=istate] tape)
5433+$ isample-result (each [typ=itype env=ienv state=istate] tape)
@@ -5277,6 +5463,8 @@
5277:: generalize an aura from its sample, which requires constraint analysis
5463:: generalize an aura from its sample, which requires constraint analysis
5278:: beyond this fragment; leave those cases unresolved.
5464:: beyond this fragment; leave those cases unresolved.
5279::
5465::
5466+:: This helper only controls decimal defaulting in visible types. A noun
5467+:: may contain gates and is not proof of a gate-free value.
5280++ itype-has-gate
5468++ itype-has-gate
5281 |= t=itype
5469 |= t=itype
5282 ^- ?
5470 ^- ?
@@ -5284,6 +5472,7 @@
5284 %fn &
5472 %fn &
5285 %cell |($(t hed.t) $(t tal.t))
5473 %cell |($(t hed.t) $(t tal.t))
5286 %recursive |
5474 %recursive |
5475+ %jrec |
5287 %collection (lien args.t |=(c=itype (itype-has-gate c)))
5476 %collection (lien args.t |=(c=itype (itype-has-gate c)))
5288 %face $(t body.t)
5477 %face $(t body.t)
5289 %union (lien cases.t |=(c=itype (itype-has-gate c)))
5478 %union (lien cases.t |=(c=itype (itype-has-gate c)))
@@ -5295,6 +5484,7 @@
5295 %atom |
5484 %atom |
5296 %any-atom |
5485 %any-atom |
5297 %flag |
5486 %flag |
5487+ %noun |
5298 ==
5488 ==
5299::
5489::
5300++ default-decimals
5490++ default-decimals
@@ -5309,6 +5499,90 @@
5309 * t
5499 * t
5310 ==
5500 ==
5311::
5501::
5502+:: A hole is solved only by a fully determined type or a written
5503+:: in-scope type variable. Ordinary fresh variables are not evidence.
5504+:: Compare representatives after substitution, since unification can
5505+:: orient a written capital toward the hole rather than the reverse.
5506+++ hole-variable-id
5507+ |= t=itype
5508+ ^- (unit @ud)
5509+ ?- -.t
5510+ %var `id.t
5511+ %avar `id.t
5512+ %nvar `id.t
5513+ %tag `id.t
5514+ * ~
5515+ ==
5516+++ hole-same-variable
5517+ |= [a=itype b=itype]
5518+ ^- ?
5519+ =/ x=(unit @ud) (hole-variable-id a)
5520+ ?~ x |
5521+ =/ y=(unit @ud) (hole-variable-id b)
5522+ ?~ y |
5523+ =(u.x u.y)
5524+++ hole-known
5525+ |= [t=itype state=istate]
5526+ ^- ?
5527+ =. t (itype-walk t sub.state)
5528+ ?- -.t
5529+ ?(%var %avar %nvar)
5530+ ?: (lien caps.state |=(c=icap (hole-same-variable t (itype-walk [%var id.c] sub.state)))) &
5531+ (lien params.state |=(p=[name=@t typ=itype] (hole-same-variable t (itype-walk typ.p sub.state))))
5532+ %tag |
5533+ %any-atom &
5534+ %union &((levy cases.t |=(c=itype (hole-known c state))) (levy args.t |=(c=itype (hole-known c state))))
5535+ %collection (levy args.t |=(c=itype (hole-known c state)))
5536+ %face $(t body.t)
5537+ %fn &($(t sample.t) $(t product.t))
5538+ %cell &($(t hed.t) $(t tal.t))
5539+ * &
5540+ ==
5541+++ default-hole-numbers
5542+ |= [all=(list ihole) prior=(list ihole) state=istate env=ienv permit=?]
5543+ ^- istate
5544+ :: Do not default a named capital or a variable captured from env.
5545+ ?. permit state
5546+ ?: =(all prior) state
5547+ ?~ all state
5548+ =/ t=itype (itype-walk [%var id.i.all] sub.state)
5549+ =/ free=(list @ud) (free-env-vars env sub.state)
5550+ =? state &(?=(%nvar -.t) !(hole-known t state) !(lien free |=(id=@ud =(id id.t))))
5551+ state(sub [[id.t [%atom %ud]] sub.state])
5552+ $(all t.all)
5553+::
5554+:: Only obligations created inside this definition belong to it.
5555+++ holes-created
5556+ |= [all=(list ihole) prior=(list ihole)]
5557+ ^- (list ihole)
5558+ ?: =(all prior) ~
5559+ ?~ all ~
5560+ [i.all $(all t.all)]
5561+++ hole-uncertain
5562+ |= [t=itype state=istate]
5563+ ^- ?
5564+ =. t (itype-walk t sub.state)
5565+ ?- -.t
5566+ ?(%tag %nvar %avar) !(hole-known t state)
5567+ %union |((lien cases.t |=(c=itype (hole-uncertain c state))) (lien args.t |=(c=itype (hole-uncertain c state))))
5568+ %collection (lien args.t |=(c=itype (hole-uncertain c state)))
5569+ %face $(t body.t)
5570+ %fn |($(t sample.t) $(t product.t))
5571+ %cell |($(t hed.t) $(t tal.t))
5572+ * |
5573+ ==
5574+::
5575+++ unresolved-hole
5576+ |= [all=(list ihole) prior=(list ihole) state=istate]
5577+ ^- (unit idiag)
5578+ =/ work=(list ihole) (flop (holes-created all prior))
5579+ |-
5580+ ?~ work ~
5581+ ?: (hole-known [%var id.i.work] state) $(work t.work)
5582+ ?: (hole-uncertain [%var id.i.work] state)
5583+ `["type hole needs unsupported inference" ~[[at.i.work "type hole"]]]
5584+ `["type hole needs a determined type" ~[[at.i.work "unresolved type hole"]]]
5585+::
5312++ itype-vars
5586++ itype-vars
5313 |= t=itype
5587 |= t=itype
5314 ^- (list @ud)
5588 ^- (list @ud)
@@ -5319,10 +5593,12 @@
5319 %atom ~
5593 %atom ~
5320 %any-atom ~
5594 %any-atom ~
5321 %flag ~
5595 %flag ~
5596+ %noun ~
5322 %tag ~
5597 %tag ~
5323 %const ~
5598 %const ~
5324 %union (zing (turn (weld args.t cases.t) |=(c=itype (itype-vars c))))
5599 %union (zing (turn (weld args.t cases.t) |=(c=itype (itype-vars c))))
5325 %recursive ~
5600 %recursive ~
5601+ %jrec ~
5326 %collection (zing (turn args.t |=(c=itype (itype-vars c))))
5602 %collection (zing (turn args.t |=(c=itype (itype-vars c))))
5327 %face $(t body.t)
5603 %face $(t body.t)
5328 %fn (weld $(t sample.t) $(t product.t))
5604 %fn (weld $(t sample.t) $(t product.t))
@@ -5357,10 +5633,12 @@
5357 %atom t
5633 %atom t
5358 %any-atom t
5634 %any-atom t
5359 %flag t
5635 %flag t
5636+ %noun t
5360 %tag t
5637 %tag t
5361 %const t
5638 %const t
5362 %union [%union (turn cases.t |=(c=itype (itype-rename c ren))) origin.t label.t (turn args.t |=(c=itype (itype-rename c ren)))]
5639 %union [%union (turn cases.t |=(c=itype (itype-rename c ren))) origin.t label.t (turn args.t |=(c=itype (itype-rename c ren)))]
5363 %recursive t
5640 %recursive t
5641+ %jrec t
5364 %collection [%collection name.t (turn args.t |=(c=itype (itype-rename c ren)))]
5642 %collection [%collection name.t (turn args.t |=(c=itype (itype-rename c ren)))]
5365 %face [%face name.t $(t body.t)]
5643 %face [%face name.t $(t body.t)]
5366 %fn [%fn $(t sample.t) $(t product.t)]
5644 %fn [%fn $(t sample.t) $(t product.t)]
@@ -5380,10 +5658,12 @@
5380 %atom |
5658 %atom |
5381 %any-atom |
5659 %any-atom |
5382 %flag |
5660 %flag |
5661+ %noun |
5383 %tag |
5662 %tag |
5384 %const |
5663 %const |
5385 %union |((lien cases.t |=(c=itype (itype-var-is-atom n c))) (lien args.t |=(c=itype (itype-var-is-atom n c))))
5664 %union |((lien cases.t |=(c=itype (itype-var-is-atom n c))) (lien args.t |=(c=itype (itype-var-is-atom n c))))
5386 %recursive |
5665 %recursive |
5666+ %jrec |
5387 %collection (lien args.t |=(c=itype (itype-var-is-atom n c)))
5667 %collection (lien args.t |=(c=itype (itype-var-is-atom n c)))
5388 %face $(t body.t)
5668 %face $(t body.t)
5389 %fn |($(t sample.t) $(t product.t))
5669 %fn |($(t sample.t) $(t product.t))
@@ -5486,6 +5766,11 @@
5486 ?. ?=([%ref @ @] node) ~
5766 ?. ?=([%ref @ @] node) ~
5487 ?. &(=(module +<.node) =(name +>.node)) ~
5767 ?. &(=(module +<.node) =(name +>.node)) ~
5488 `[[%unknown ~] &]
5768 `[[%unknown ~] &]
5769+ %apply
5770+ ?. ?=([%apply %list [* ~]] node) ~
5771+ =/ item $(node -.+>.node)
5772+ ?~ item ~
5773+ `[[%or ~[[%atom `0] [%cell pat.u.item [%unknown ~]]]] has.u.item]
5489 %face
5774 %face
5490 ?. ?=([%face @ *] node) ~
5775 ?. ?=([%face @ *] node) ~
5491 ?. (jibb-face-name +<.node) ~
5776 ?. (jibb-face-name +<.node) ~
@@ -5524,12 +5809,70 @@
5524 $(pats t.pats)
5809 $(pats t.pats)
5525::
5810::
5526::
5811::
5812+::
5813+:: Repeated faces along an imported record spine fail closed. Hoon's type
5814+:: graph can erase unfaced nested-cell boundaries, so that alone does not
5815+:: prove the original source repeated a name within one record. A faced
5816+:: body and each union alternative have separate scopes. Check recursive
5817+:: roots before making them opaque; unused molds are never inspected.
5818+::
5819+++ imported-faces-valid
5820+ |= node=*
5821+ ^- ?
5822+ ?@ node &
5823+ ?+ -.node &
5824+ %face ?:(?=([%face @ *] node) $(node +>.node) |)
5825+ %cell ?:(?=([%cell * *] node) (imported-record-faces-valid node ~) |)
5826+ %fork (imported-faces-valid-list +.node)
5827+ %apply ?:(?=([%apply @ *] node) (imported-faces-valid-list +>.node) |)
5828+ %named
5829+ ?. ?=([%named @ @ *] node) |
5830+ =/ n=[%named module=@ name=@ body=*] ;;([%named module=@ name=@ body=*] node)
5831+ (imported-faces-valid body.n)
5832+ ==
5833+::
5834+++ imported-faces-valid-list
5835+ |= nodes=*
5836+ ^- ?
5837+ ?@ nodes =(nodes 0)
5838+ ?. (imported-faces-valid -.nodes) |
5839+ $(nodes +.nodes)
5840+::
5841+++ imported-record-faces-valid
5842+ |= [node=* names=(list @)]
5843+ ^- ?
5844+ ?: ?=([%cell * *] node)
5845+ =/ head=* +<.node
5846+ =/ rest=* +>.node
5847+ ?: ?=([%face @ *] head)
5848+ ?: (lien names |=(n=@ =(n +<.head))) |
5849+ ?. (imported-faces-valid +>.head) |
5850+ $(node rest, names [+<.head names])
5851+ ?. (imported-faces-valid head) |
5852+ $(node rest)
5853+ ?: ?=([%face @ *] node)
5854+ ?: (lien names |=(n=@ =(n +<.node))) |
5855+ (imported-faces-valid +>.node)
5856+ (imported-faces-valid node)
5857+::
5527++ import-to-itype
5858++ import-to-itype
5528 |= node=*
5859 |= node=*
5529 ^- (unit itype)
5860 ^- (unit itype)
5530 ?@ node ~
5861 ?@ node ~
5531 ?+ -.node ~
5862 ?+ -.node ~
5863+ %noun ?:(=(node [%noun ~]) `[%noun ~] ~)
5532 %atom
5864 %atom
5865+ :: A Hoon loobean singleton is one of the two Jibb loobeans.
5866+ ?: ?=([%atom %f [~ @]] node)
5867+ =/ value=@ +>+.node
5868+ ?. |(=(value 0) =(value 1)) ~
5869+ =/ printed=@t ?:(=(value 0) '%.y' '%.n')
5870+ `[%const [%loobean %f value printed]]
5871+ :: Hoon's null singleton is the same noun as Jibb's `~` mold.
5872+ :: Other non-term singleton atoms remain unsupported here.
5873+ ?: ?=([%atom %n [~ @]] node)
5874+ ?. =(0 +>+.node) ~
5875+ `[%const [%null %n 0 '~']]
5533 ?: ?=([%atom %tas [~ @]] node)
5876 ?: ?=([%atom %tas [~ @]] node)
5534 =/ value=@ +>+.node
5877 =/ value=@ +>+.node
5535 ?. |(=(value 0) (jibb-face-name value)) ~
5878 ?. |(=(value 0) (jibb-face-name value)) ~
@@ -5539,6 +5882,15 @@
5539 =/ aura=@ta (@ta +<.node)
5882 =/ aura=@ta (@ta +<.node)
5540 ?. |(?=(?(%u %ud %ux %uv %t %ta %tas %p %da %dr) aura) =('tD' aura)) ~
5883 ?. |(?=(?(%u %ud %ux %uv %t %ta %tas %p %da %dr) aura) =('tD' aura)) ~
5541 `[%atom aura]
5884 `[%atom aura]
5885+ %named
5886+ ?. ?=([%named @ @ *] node) ~
5887+ =/ n=[%named module=@ name=@ body=*] ;;([%named module=@ name=@ body=*] node)
5888+ ?. &((jibb-face-name module.n) (jibb-face-name name.n)) ~
5889+ ?. ?=([%fork *] body.n) ~
5890+ =/ proof=(unit irec-pattern) (rec-pattern body.n (@tas module.n) (@tas name.n))
5891+ ?~ proof ~
5892+ ?. has.u.proof ~
5893+ `[%recursive (@tas module.n) (@tas name.n) `(crip "{(trip name.n)}.{(trip module.n)}")]
5542 %apply
5894 %apply
5543 ?. ?=([%apply @ *] node) ~
5895 ?. ?=([%apply @ *] node) ~
5544 =/ name=term (@tas +<.node)
5896 =/ name=term (@tas +<.node)
@@ -5552,10 +5904,15 @@
5552 ?. =(arity (lent u.args)) ~
5904 ?. =(arity (lent u.args)) ~
5553 `[%collection name u.args]
5905 `[%collection name u.args]
5554 %fork
5906 %fork
5907+ :: Hoon's ordinary ? mold is the fork of its two %f singletons.
5908+ =/ raw=* +.node
5909+ ?: |(=(raw ~[[%atom %f `0] [%atom %f `1]]) =(raw ~[[%atom %f `1] [%atom %f `0]]))
5910+ `[%flag ~]
5555− =/ cases=(unit (list itype)) (import-to-itypes +.node)
5911+ =/ cases=(unit (list itype)) (import-to-itypes raw)
5556 ?~ cases ~
5912 ?~ cases ~
5557 ?~ u.cases ~
5913 ?~ u.cases ~
5558 ?~ t.u.cases ~
5914 ?~ t.u.cases ~
5915+ ?: (import-has-loobean-singleton u.cases) ~
5559 ?. (import-cases-disjoint u.cases) ~
5916 ?. (import-cases-disjoint u.cases) ~
5560 `[%union u.cases ~ ~ ~]
5917 `[%union u.cases ~ ~ ~]
5561 %face
5918 %face
@@ -5574,6 +5931,20 @@
5574 `[%cell u.left u.right]
5931 `[%cell u.left u.right]
5575 ==
5932 ==
5576::
5933::
5934+++ import-direct-loobean
5935+ |= t=itype
5936+ ^- ?
5937+ ?: ?=(%face -.t) $(t body.t)
5938+ ?: ?=(%union -.t) (import-has-loobean-singleton cases.t)
5939+ ?=([%const [%loobean *]] t)
5940+::
5941+++ import-has-loobean-singleton
5942+ |= cases=(list itype)
5943+ ^- ?
5944+ ?~ cases |
5945+ ?: (import-direct-loobean i.cases) &
5946+ $(cases t.cases)
5947+::
5577++ import-to-itypes
5948++ import-to-itypes
5578 |= nodes=*
5949 |= nodes=*
5579 ^- (unit (list itype))
5950 ^- (unit (list itype))
@@ -5588,7 +5959,9 @@
5588 |= typ=itype
5959 |= typ=itype
5589 ^- upat
5960 ^- upat
5590 ?- -.typ
5961 ?- -.typ
5962+ %noun [%all ~]
5591 %atom [%atom ~]
5963 %atom [%atom ~]
5964+ %flag [%or ~[[%atom `0] [%atom `1]]]
5592 %const [%atom `val.literal.typ]
5965 %const [%atom `val.literal.typ]
5593 %face $(typ body.typ)
5966 %face $(typ body.typ)
5594 %cell [%cell $(typ hed.typ) $(typ tal.typ)]
5967 %cell [%cell $(typ hed.typ) $(typ tal.typ)]
@@ -5616,6 +5989,7 @@
5616 ?@ result ~
5989 ?@ result ~
5617 ?. ?=(%& -.result) ~
5990 ?. ?=(%& -.result) ~
5618 =/ node=* +.result
5991 =/ node=* +.result
5992+ ?. (imported-faces-valid node) ~
5619 ?@ node (import-to-itype node)
5993 ?@ node (import-to-itype node)
5620 ?: ?=(%ref -.node) (import-to-itype node)
5994 ?: ?=(%ref -.node) (import-to-itype node)
5621 =/ pattern=(unit irec-pattern) (rec-pattern node module name)
5995 =/ pattern=(unit irec-pattern) (rec-pattern node module name)
@@ -5651,6 +6025,7 @@
5651 =/ result=* result.i.found
6025 =/ result=* result.i.found
5652 ?@ result ~
6026 ?@ result ~
5653 ?. ?=(%& -.result) ~
6027 ?. ?=(%& -.result) ~
6028+ ?. (imported-faces-valid +.result) ~
5654 (import-to-itype +.result)
6029 (import-to-itype +.result)
5655::
6030::
5656++ find-jibb-interface
6031++ find-jibb-interface
@@ -5681,25 +6056,55 @@
5681 ?:(=(`origin origin.typ.template) `name.i.molds $(molds t.molds))
6056 ?:(=(`origin origin.typ.template) `name.i.molds $(molds t.molds))
5682 $(molds t.molds)
6057 $(molds t.molds)
5683::
6058::
6059+:: A public non-generic alias names exactly its origin and arguments.
6060+:: Reusing only an origin could print a different generic instantiation.
6061+++ prelude-union-alias
6062+ |= [origin=[at=path name=term] args=(list itype) molds=imold-types]
6063+ ^- (unit term)
6064+ ?^ args ~
6065+ ?~ molds ~
6066+ =/ template=ischeme template.i.molds
6067+ ?: &(?=(~ vars.template) ?=(%union -.typ.template))
6068+ ?:(&(=(`origin origin.typ.template) =(args args.typ.template)) `name.i.molds $(molds t.molds))
6069+ $(molds t.molds)
6070+::
5684−:: Only names exported by this directly imported module are visible through
6071+:: Names exported by the directly imported module are visible through its
5685−:: its face. Other origins retain identity but print as unnamed unions.
6072+:: face; a matching prelude alias is also visible without a qualifier.
6073+::
6074+++ jrec-alias
6075+ |= [origin=path name=term molds=imold-types]
6076+ ^- (unit term)
6077+ ?~ molds ~
6078+ =/ template=ischeme template.i.molds
6079+ ?: &(?=(~ vars.template) ?=(%jrec -.typ.template) =(at.typ.template origin) =(name.typ.template name)) `name.i.molds
6080+ $(molds t.molds)
5686::
6081::
5687++ itype-in-import
6082++ itype-in-import
5688− |= [t=itype iface=ifile face=term]
6083+ |= [t=itype iface=ifile face=term prelude=(unit ifile)]
5689 ^- itype
6084 ^- itype
5690 ?- -.t
6085 ?- -.t
5691 %union
6086 %union
5692 =/ label=(unit @t)
6087 =/ label=(unit @t)
5693 ?~ origin.t ~
6088 ?~ origin.t ~
5694 ?: =(at.u.origin.t /lib/jibb/prelude/jibb) `name.u.origin.t
6089 ?: =(at.u.origin.t /lib/jibb/prelude/jibb) `name.u.origin.t
6090+ =/ public=(unit term)
6091+ ?~ prelude ~
6092+ (prelude-union-alias u.origin.t args.t molds.u.prelude)
6093+ ?^ public `u.public
5695 =/ alias=(unit term) ~
6094 =/ alias=(unit term) ~
5696 =? alias &(=(at.u.origin.t at.iface) ?=(^ (find-jibb-mold name.u.origin.t iface))) `name.u.origin.t
6095 =? alias &(=(at.u.origin.t at.iface) ?=(^ (find-jibb-mold name.u.origin.t iface))) `name.u.origin.t
5697 =? alias ?=(~ alias) (imported-union-alias u.origin.t molds.iface)
6096 =? alias ?=(~ alias) (imported-union-alias u.origin.t molds.iface)
5698 ?~ alias ~
6097 ?~ alias ~
5699 `(crip "{(trip u.alias)}.{(trip face)}")
6098 `(crip "{(trip u.alias)}.{(trip face)}")
5700− [%union (turn cases.t |=(c=itype (itype-in-import c iface face))) origin.t label (turn args.t |=(c=itype (itype-in-import c iface face)))]
6099+ [%union (turn cases.t |=(c=itype (itype-in-import c iface face prelude))) origin.t label (turn args.t |=(c=itype (itype-in-import c iface face prelude)))]
5701 %recursive [%recursive module.t name.t ~]
6100 %recursive [%recursive module.t name.t ~]
6101+ %jrec
6102+ =/ public=(unit term) ?~(prelude ~ (jrec-alias at.t name.t molds.u.prelude))
6103+ ?^ public t(label `u.public)
6104+ =/ alias=(unit term) (jrec-alias at.t name.t molds.iface)
6105+ ?~ alias t(label ~)
6106+ t(label `(crip "{(trip u.alias)}.{(trip face)}"))
5702− %collection [%collection name.t (turn args.t |=(c=itype (itype-in-import c iface face)))]
6107+ %collection [%collection name.t (turn args.t |=(c=itype (itype-in-import c iface face prelude)))]
5703 %face [%face name.t $(t body.t)]
6108 %face [%face name.t $(t body.t)]
5704 %fn [%fn $(t sample.t) $(t product.t)]
6109 %fn [%fn $(t sample.t) $(t product.t)]
5705 %cell [%cell $(t hed.t) $(t tal.t)]
6110 %cell [%cell $(t hed.t) $(t tal.t)]
@@ -5772,9 +6177,46 @@
5772 =/ rest=[params=iparams vars=(list @ud) next=@ud] $(names t.names, next +(next))
6177 =/ rest=[params=iparams vars=(list @ud) next=@ud] $(names t.names, next +(next))
5773 [[[i.names [%var next]] params.rest] [next vars.rest] next.rest]
6178 [[[i.names [%var next]] params.rest] [next vars.rest] next.rest]
5774::
6179::
6180+:: Recognize a unique top-level source mold with exactly a null case and a
6181+:: faced atom-headed cell whose faced tail names that same mold. Its Jibb
6182+:: path and name provide nominal identity. Other recursive shapes fail closed;
6183+:: construction and matching expose the proven shape one layer at a time.
6184+++ simple-source-recursive
6185+ |= [name=term sh=shape state=istate]
6186+ ^- (unit itype)
6187+ ?. (lien top-molds.state |=(n=term =(n name))) ~
6188+ =/ original=(unit shape) (find-simple-mold name molds.state)
6189+ ?~ original ~
6190+ ?. =(u.original sh) ~
6191+ ?. ?=(%union -.sh) ~
6192+ =/ cs=(list shape) cases.sh
6193+ ?~ cs ~
6194+ ?~ t.cs ~
6195+ ?^ t.t.cs ~
6196+ ?. ?=(%const -.i.cs) ~
6197+ ?. =(%null form.lit.i.cs) ~
6198+ ?. ?=(%cell -.i.t.cs) ~
6199+ =/ fs=(list field) fields.i.t.cs
6200+ ?~ fs ~
6201+ ?~ t.fs ~
6202+ ?^ t.t.fs ~
6203+ ?. ?=(%face -.i.fs) ~
6204+ ?. ?=(%aura -.shape.i.fs) ~
6205+ ?. !=(0 aura.shape.i.fs) ~
6206+ ?. ?=(%face -.i.t.fs) ~
6207+ ?. !=(name.i.fs name.i.t.fs) ~
6208+ =/ tail=shape shape.i.t.fs
6209+ ?. ?=(%ref -.tail) ~
6210+ ?. =(names.tail ~[name]) ~
6211+ `[%jrec at.state name `name name.i.fs aura.shape.i.fs name.i.t.fs]
6212+::
5775++ infer-mold-template
6213++ infer-mold-template
5776 |= [sh=shape state=istate]
6214 |= [sh=shape state=istate]
5777 ^- (unit [template=ischeme state=istate])
6215 ^- (unit [template=ischeme state=istate])
6216+ =/ direct=(unit itype)
6217+ ?. ?=([@ ~] active.state) ~
6218+ (simple-source-recursive i.active.state sh state)
6219+ ?^ direct `[[u.direct ~] state]
5778 ?: ?=(%generic -.sh)
6220 ?: ?=(%generic -.sh)
5779 ?~ vars.sh ~
6221 ?~ vars.sh ~
5780 ?. (distinct-params vars.sh) ~
6222 ?. (distinct-params vars.sh) ~
@@ -5782,26 +6224,127 @@
5782 =/ out=(unit [typ=itype state=istate])
6224 =/ out=(unit [typ=itype state=istate])
5783 (infer-simple-shape body.sh state(next next.fresh, params params.fresh, in-mold &))
6225 (infer-simple-shape body.sh state(next next.fresh, params params.fresh, in-mold &))
5784 ?~ out ~
6226 ?~ out ~
6227+ ?^ (unresolved-hole holes.state.u.out holes.state state.u.out) ~
5785 ?: &(?=(%union -.typ.u.out) !?=(%union -.body.sh) ?=(~ origin.typ.u.out)) ~
6228 ?: &(?=(%union -.typ.u.out) !?=(%union -.body.sh) ?=(~ origin.typ.u.out)) ~
5786 =? typ.u.out &(?=(%union -.typ.u.out) ?=(%union -.body.sh))
6229 =? typ.u.out &(?=(%union -.typ.u.out) ?=(%union -.body.sh))
5787 typ.u.out(args (turn vars.fresh |=(n=@ud `itype`[%var n])))
6230 typ.u.out(args (turn vars.fresh |=(n=@ud `itype`[%var n])))
5788 =/ used=(list @ud) (itype-vars typ.u.out)
6231 =/ used=(list @ud) (itype-vars typ.u.out)
5789 ?. (levy used |=(n=@ud (lien vars.fresh |=(p=@ud =(p n))))) ~
6232 ?. (levy used |=(n=@ud (lien vars.fresh |=(p=@ud =(p n))))) ~
5790− `[[typ.u.out vars.fresh] state.u.out(params params.state, in-mold in-mold.state)]
6233+ `[[typ.u.out vars.fresh] state.u.out(params params.state, in-mold in-mold.state, holes holes.state)]
5791 =/ out=(unit [typ=itype state=istate])
6234 =/ out=(unit [typ=itype state=istate])
5792 (infer-simple-shape sh state(params ~, in-mold &))
6235 (infer-simple-shape sh state(params ~, in-mold &))
5793 ?~ out ~
6236 ?~ out ~
6237+ ?^ (unresolved-hole holes.state.u.out holes.state state.u.out) ~
5794 ?: ?=(^ (itype-vars typ.u.out)) ~
6238 ?: ?=(^ (itype-vars typ.u.out)) ~
5795− `[[typ.u.out ~] state.u.out(params params.state, in-mold in-mold.state)]
6239+ `[[typ.u.out ~] state.u.out(params params.state, in-mold in-mold.state, holes holes.state)]
6240+::
6241+:: A direct imported reference may carry definite reader evidence. Only
6242+:: uniquely supplied, declared inputs are used; unsupported data stay generic.
6243+++ direct-import-invalid
6244+ |= [sh=shape state=istate]
6245+ ^- (unit idiag)
6246+ ?. ?=(%ref -.sh) ~
6247+ ?~ names.sh ~
6248+ =/ n=term i.names.sh
6249+ =/ raw=*
6250+ ?~ t.names.sh
6251+ ?. (unique-value-name n marks.state) ~
6252+ ?: (lien surs.state |=(x=term =(x n))) ~
6253+ ?: ?=(^ (find-jibb-interface n jimports.state)) ~
6254+ ?: (lien globals.state |=(x=term =(x n))) ~
6255+ ?: (lien reserved-molds.state |=(x=term =(x n))) ~
6256+ ?: (lien molds.state |=(m=[name=term body=shape] =(n name.m))) ~
6257+ =/ found=imark-externals (skim mark-externals.state |=(e=[mark=term result=*] =(mark.e n)))
6258+ ?~ found ~
6259+ ?^ t.found ~
6260+ result.i.found
6261+ ?^ t.t.names.sh ~
6262+ =/ mod=term i.t.names.sh
6263+ ?: ?=(^ (find-jibb-interface mod jimports.state)) ~
6264+ ?. (unique-value-name mod surs.state) ~
6265+ ?: (lien marks.state |=(x=term =(x mod))) ~
6266+ ?: (lien globals.state |=(x=term =(x mod))) ~
6267+ ?: (lien reserved-molds.state |=(x=term =(x mod))) ~
6268+ ?: (lien molds.state |=(m=[name=term body=shape] =(mod name.m))) ~
6269+ =/ found=iexternals (skim externals.state |=(e=[module=term name=term result=*] &(=(module.e mod) =(name.e n))))
6270+ ?~ found ~
6271+ ?^ t.found ~
6272+ result.i.found
6273+ ?. ?=([%invalid ?(%aura %core) @] raw) ~
6274+ `["{(trip +>.raw)}" ~[[at.sh "invalid imported mold"]]]
6275+::
6276+:: Replay only the shape branches whose evaluation order we can prove.
6277+:: Successful prefixes must be checked before descending to a failure.
6278+++ nested-import-invalid
6279+ |= [sh=shape state=istate]
6280+ ^- (unit idiag)
6281+ ?: ?=(^ (infer-simple-shape sh state)) ~
6282+ ?- -.sh
6283+ %ref
6284+ =/ direct=(unit idiag) (direct-import-invalid sh state)
6285+ ?^ direct direct
6286+ ?~ names.sh ~
6287+ ?^ t.names.sh ~
6288+ =/ n=term i.names.sh
6289+ ?: (lien marks.state |=(x=term =(x n))) ~
6290+ ?: (lien active.state |=(x=term =(x n))) ~
6291+ =/ found=(unit shape) (find-simple-mold n molds.state)
6292+ ?~ found ~
6293+ $(sh u.found, state state(active [n active.state], in-mold &, params ~))
6294+ %fn
6295+ =/ first=(unit [typ=itype state=istate]) (infer-simple-shape sample.sh state)
6296+ ?~ first $(sh sample.sh)
6297+ $(sh product.sh, state state.u.first)
6298+ %cell (nested-field-invalid fields.sh state)
6299+ * ~
6300+ ==
6301+::
6302+++ nested-field-invalid
6303+ |= [fields=(list field) state=istate]
6304+ ^- (unit idiag)
6305+ ?~ fields ~
6306+ =/ sh=shape
6307+ ?- -.i.fields
6308+ %bare shape.i.fields
6309+ %face shape.i.fields
6310+ %pun [%ref at.i.fields ~[name.i.fields]]
6311+ ==
6312+ =/ out=(unit [typ=itype state=istate]) (infer-simple-shape sh state)
6313+ ?~ out (nested-import-invalid sh state)
6314+ $(fields t.fields, state state.u.out)
6315+::
6316+++ sample-import-invalid
6317+ |= [s=sample env=ienv state=istate]
6318+ ^- (unit idiag)
6319+ =/ result=isample-result (infer-sample s env state)
6320+ ?: ?=(%& -.result) ~
6321+ ?. =(p.result "sample mold is not supported by partial inference") ~
6322+ ?- s
6323+ [%face *] (nested-import-invalid shape.s state)
6324+ [%bare *] (nested-import-invalid shape.s state)
6325+ [%pun *] (nested-import-invalid [%ref at.s ~[name.s]] state)
6326+ [%cell *] (nested-samples-invalid items.s env state)
6327+ * ~
6328+ ==
6329+::
6330+++ nested-samples-invalid
6331+ |= [items=(list sample) env=ienv state=istate]
6332+ ^- (unit idiag)
6333+ ?~ items ~
6334+ =/ head=isample-result (infer-sample i.items env state)
6335+ ?: ?=(%| -.head) (sample-import-invalid i.items env state)
6336+ $(items t.items, env env.p.head, state state.p.head)
5796::
6337::
5797++ infer-simple-shape
6338++ infer-simple-shape
5798 |= [sh=shape state=istate]
6339 |= [sh=shape state=istate]
5799 ^- (unit [typ=itype state=istate])
6340 ^- (unit [typ=itype state=istate])
5800 ?- -.sh
6341 ?- -.sh
6342+ %hole `[[%var next.state] state(next +(next.state), holes [[next.state at.sh] holes.state])]
5801 %aura
6343 %aura
5802 ?: =(0 aura.sh) `[[%any-atom ~] state]
6344 ?: =(0 aura.sh) `[[%any-atom ~] state]
5803 `[[%atom aura.sh] state]
6345 `[[%atom aura.sh] state]
5804 %flag `[[%flag ~] state]
6346 %flag `[[%flag ~] state]
6347+ %noun `[[%noun ~] state]
5805 %const
6348 %const
5806 ?. |(=(%term form.lit.sh) =(%null form.lit.sh)) ~
6349 ?. |(=(%term form.lit.sh) =(%null form.lit.sh)) ~
5807 `[[%const lit.sh] state]
6350 `[[%const lit.sh] state]
@@ -5828,7 +6371,7 @@
5828 =/ found=(unit ischeme) (find-jibb-mold n u.iface)
6371 =/ found=(unit ischeme) (find-jibb-mold n u.iface)
5829 ?~ found ~
6372 ?~ found ~
5830 ?^ vars.u.found ~
6373 ?^ vars.u.found ~
5831− `[(itype-in-import typ.u.found u.iface i.t.names.sh) state]
6374+ `[(itype-in-import typ.u.found u.iface i.t.names.sh prelude.state) state]
5832 =/ found=(unit itype)
6375 =/ found=(unit itype)
5833 (find-imported-mold i.t.names.sh n externals.state surs.state)
6376 (find-imported-mold i.t.names.sh n externals.state surs.state)
5834 ?~ found ~
6377 ?~ found ~
@@ -5847,10 +6390,13 @@
5847 ?~ prelude-entry ~
6390 ?~ prelude-entry ~
5848 ?^ vars.u.prelude-entry ~
6391 ?^ vars.u.prelude-entry ~
5849 `[typ.u.prelude-entry state]
6392 `[typ.u.prelude-entry state]
6393+ =/ direct=(unit itype) (simple-source-recursive n u.found state)
6394+ ?^ direct `[u.direct state]
5850 =/ out=(unit [typ=itype state=istate])
6395 =/ out=(unit [typ=itype state=istate])
5851 $(sh u.found, state state(active [n active.state], in-mold &, params ~))
6396 $(sh u.found, state state(active [n active.state], in-mold &, params ~))
5852 ?~ out ~
6397 ?~ out ~
6398+ ?^ (unresolved-hole holes.state.u.out holes.state state.u.out) ~
5853− `[(label-direct-union typ.u.out u.found n state) state.u.out(active active.state, in-mold in-mold.state, params params.state)]
6399+ `[(label-direct-union typ.u.out u.found n state) state.u.out(active active.state, in-mold in-mold.state, params params.state, holes holes.state)]
5854 %apply
6400 %apply
5855 ?~ ref.sh ~
6401 ?~ ref.sh ~
5856 =/ args=(unit [types=(list itype) state=istate]) (infer-shape-args args.sh state)
6402 =/ args=(unit [types=(list itype) state=istate]) (infer-shape-args args.sh state)
@@ -5865,7 +6411,7 @@
5865 ?~ vars.u.template ~
6411 ?~ vars.u.template ~
5866 =/ applied=(unit itype) (template-apply u.template types.u.args)
6412 =/ applied=(unit itype) (template-apply u.template types.u.args)
5867 ?~ applied ~
6413 ?~ applied ~
5868− `[(itype-in-import u.applied u.iface i.t.ref.sh) state.u.args]
6414+ `[(itype-in-import u.applied u.iface i.t.ref.sh prelude.state.u.args) state.u.args]
5869 ?: (lien active.state.u.args |=(x=term =(x n))) ~
6415 ?: (lien active.state.u.args |=(x=term =(x n))) ~
5870 =/ found=(unit shape) (find-simple-mold n molds.state.u.args)
6416 =/ found=(unit shape) (find-simple-mold n molds.state.u.args)
5871 ?~ found
6417 ?~ found
@@ -5884,18 +6430,19 @@
5884 =/ out=(unit [typ=itype state=istate])
6430 =/ out=(unit [typ=itype state=istate])
5885 $(sh body.u.found, state state.u.args(active [n active.state.u.args], in-mold &, params u.params))
6431 $(sh body.u.found, state state.u.args(active [n active.state.u.args], in-mold &, params u.params))
5886 ?~ out ~
6432 ?~ out ~
6433+ ?^ (unresolved-hole holes.state.u.out holes.state.u.args state.u.out) ~
5887 ?: &(?=(%union -.typ.u.out) !?=(%union -.body.u.found) ?=(~ origin.typ.u.out)) ~
6434 ?: &(?=(%union -.typ.u.out) !?=(%union -.body.u.found) ?=(~ origin.typ.u.out)) ~
5888 ?: &(?=(%union -.typ.u.out) ?=(%union -.body.u.found) !(lien top-molds.state.u.args |=(x=term =(x n)))) ~
6435 ?: &(?=(%union -.typ.u.out) ?=(%union -.body.u.found) !(lien top-molds.state.u.args |=(x=term =(x n)))) ~
5889 =? typ.u.out &(?=(%union -.typ.u.out) ?=(%union -.body.u.found))
6436 =? typ.u.out &(?=(%union -.typ.u.out) ?=(%union -.body.u.found))
5890 (label-direct-union typ.u.out(args types.u.args) u.found n state.u.args)
6437 (label-direct-union typ.u.out(args types.u.args) u.found n state.u.args)
5891− `[typ.u.out state.u.out(active active.state.u.args, in-mold in-mold.state.u.args, params params.state.u.args)]
6438+ `[typ.u.out state.u.out(active active.state.u.args, in-mold in-mold.state.u.args, params params.state.u.args, holes holes.state.u.args)]
5892 %tvar
6439 %tvar
5893 =/ param=(unit itype) (iparam-lookup name.sh params.state)
6440 =/ param=(unit itype) (iparam-lookup name.sh params.state)
5894 ?^ param `[u.param state]
6441 ?^ param `[u.param state]
5895 ?: in-mold.state ~
6442 ?: in-mold.state ~
5896 =/ n=(unit @ud) (icap-lookup name.sh caps.state)
6443 =/ n=(unit @ud) (icap-lookup name.sh caps.state)
5897 ?^ n `[[%var u.n] state]
6444 ?^ n `[[%var u.n] state]
5898− `[[%var next.state] state(next +(next.state), caps [[name.sh next.state] caps.state])]
6445+ `[[%var next.state] state(next +(next.state), caps [[name.sh next.state at.sh] caps.state])]
5899 * ~
6446 * ~
5900 ==
6447 ==
5901::
6448::
@@ -5928,12 +6475,12 @@
5928 ^- isample-result
6475 ^- isample-result
5929 ?- -.s
6476 ?- -.s
5930 %bind
6477 %bind
5931− ?: |(?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
6478+ ?: |(=(name.s %proj) ?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
5932 [%| "sample shadows a name"]
6479 [%| "sample shadows a name"]
5933 =/ t=itype [%var next.state]
6480 =/ t=itype [%var next.state]
5934 [%& t [[name.s [t ~]] env] state(next +(next.state), binders [next.state binders.state])]
6481 [%& t [[name.s [t ~]] env] state(next +(next.state), binders [next.state binders.state])]
5935 %face
6482 %face
5936− ?: |(?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
6483+ ?: |(=(name.s %proj) ?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
5937 [%| "sample shadows a name"]
6484 [%| "sample shadows a name"]
5938 =/ t=(unit [typ=itype state=istate]) (infer-simple-shape shape.s state)
6485 =/ t=(unit [typ=itype state=istate]) (infer-simple-shape shape.s state)
5939 ?~ t [%| "sample mold is not supported by partial inference"]
6486 ?~ t [%| "sample mold is not supported by partial inference"]
@@ -5971,8 +6518,8 @@
5971 [%& [%cell ht typ.p.tail] env.p.tail state.p.tail]
6518 [%& [%cell ht typ.p.tail] env.p.tail state.p.tail]
5972::
6519::
5973:: Local definitions generalize only variables outside their enclosing
6520:: Local definitions generalize only variables outside their enclosing
5974−:: environment and explicit-capital scope. Unresolved groups stay
6521+:: environment and explicit-capital scope. Recursive gate groups use
5975−:: unsupported: this fragment does not infer recursive definitions.
6522+:: monomorphic placeholders while their bodies are checked.
5976::
6523::
5977+$ ilocal-result (each [env=ienv state=istate] idiag)
6524+$ ilocal-result (each [env=ienv state=istate] idiag)
5978++ free-env-vars
6525++ free-env-vars
@@ -6001,6 +6548,7 @@
6001 |-
6548 |-
6002 ?~ ds &
6549 ?~ ds &
6003 ?: ?=(%mold -.i.ds) $(ds t.ds)
6550 ?: ?=(%mold -.i.ds) $(ds t.ds)
6551+ ?: =(name.i.ds %proj) |
6004 ?. (unique-value-name name.i.ds names) |
6552 ?. (unique-value-name name.i.ds names) |
6005 ?: ?=(^ (ienv-lookup name.i.ds env)) |
6553 ?: ?=(^ (ienv-lookup name.i.ds env)) |
6006 ?: (lien globals.state |=(n=term =(n name.i.ds))) |
6554 ?: (lien globals.state |=(n=term =(n name.i.ds))) |
@@ -6024,6 +6572,7 @@
6024 |-
6572 |-
6025 ?~ locals &
6573 ?~ locals &
6026 =/ n=term name.i.locals
6574 =/ n=term name.i.locals
6575+ ?: =(n %proj) |
6027 ?. (unique-value-name n names) |
6576 ?. (unique-value-name n names) |
6028 ?: (lien molds.state |=(m=[name=term body=shape] =(n name.m))) |
6577 ?: (lien molds.state |=(m=[name=term body=shape] =(n name.m))) |
6029 ?: (lien marks.state |=(m=term =(n m))) |
6578 ?: (lien marks.state |=(m=term =(n m))) |
@@ -6041,6 +6590,145 @@
6041 ?~ inferred |
6590 ?~ inferred |
6042 $(locals t.locals)
6591 $(locals t.locals)
6043::
6592::
6593+:: Gather written capitals belonging to one ++. Nested local definitions
6594+:: establish their own scopes; inline gates remain in the enclosing scope.
6595++$ icap-site [name=@t at=span]
6596+++ scope-shape
6597+ |= s=shape
6598+ ^- (list icap-site)
6599+ ?- -.s
6600+ %tvar ~[[name.s at.s]]
6601+ %apply (zing (turn args.s scope-shape))
6602+ %cell (zing (turn fields.s scope-field))
6603+ %union (zing (turn cases.s scope-shape))
6604+ %fn (weld (scope-shape sample.s) (scope-shape product.s))
6605+ %generic
6606+ =/ inside=(list icap-site) (scope-shape body.s)
6607+ (skim inside |=(site=icap-site !(lien vars.s |=(v=@t =(v name.site)))))
6608+ * ~
6609+ ==
6610+::
6611+++ scope-field
6612+ |= f=field
6613+ ^- (list icap-site)
6614+ ?- -.f
6615+ %face (scope-shape shape.f)
6616+ %bare (scope-shape shape.f)
6617+ %pun ~
6618+ ==
6619+::
6620+++ scope-sample
6621+ |= s=sample
6622+ ^- (list icap-site)
6623+ ?- -.s
6624+ %face (scope-shape shape.s)
6625+ %bare (scope-shape shape.s)
6626+ %cell (zing (turn items.s scope-sample))
6627+ * ~
6628+ ==
6629+::
6630+++ scope-pieces
6631+ |= ps=(list piece)
6632+ ^- (list icap-site)
6633+ ?~ ps ~
6634+ =/ first=(list icap-site)
6635+ ?- -.i.ps
6636+ %expr (scope-expr p.i.ps)
6637+ %text ~
6638+ ==
6639+ (weld first $(ps t.ps))
6640+::
6641+++ scope-qsegs
6642+ |= ps=(list qseg)
6643+ ^- (list icap-site)
6644+ ?~ ps ~
6645+ =/ first=(list icap-site)
6646+ ?- -.i.ps
6647+ %expr (scope-expr p.i.ps)
6648+ %knot ~
6649+ ==
6650+ (weld first $(ps t.ps))
6651+::
6652+++ scope-edits
6653+ |= xs=(list edit)
6654+ ^- (list icap-site)
6655+ ?~ xs ~
6656+ =/ first=(list icap-site) (scope-expr val.i.xs)
6657+ (weld first $(xs t.xs))
6658+::
6659+++ scope-items
6660+ |= xs=(list item)
6661+ ^- (list icap-site)
6662+ ?~ xs ~
6663+ =/ first=(list icap-site) (scope-expr val.i.xs)
6664+ (weld first $(xs t.xs))
6665+::
6666+++ scope-arms
6667+ |= xs=(list arm)
6668+ ^- (list icap-site)
6669+ ?~ xs ~
6670+ =/ first=(list icap-site) (scope-expr val.i.xs)
6671+ (weld first $(xs t.xs))
6672+::
6673+++ scope-exprs
6674+ |= xs=(list expr)
6675+ ^- (list icap-site)
6676+ ?~ xs ~
6677+ =/ first=(list icap-site) (scope-expr i.xs)
6678+ (weld first $(xs t.xs))
6679+::
6680+++ scope-expr
6681+ |= e=expr
6682+ ^- (list icap-site)
6683+ ?- -.e
6684+ %str (scope-pieces pieces.e)
6685+ %qath (scope-qsegs segs.e)
6686+ %change (scope-edits edits.e)
6687+ %pair (scope-expr val.e)
6688+ %unit (scope-expr val.e)
6689+ %group (scope-expr inner.e)
6690+ %list (scope-exprs items.e)
6691+ %tuple (scope-items items.e)
6692+ %gate
6693+ =/ first=(list icap-site) (scope-sample sample.e)
6694+ =/ last=(list icap-site) (scope-expr body.e)
6695+ (weld first last)
6696+ %gate-wide
6697+ =/ first=(list icap-site) (scope-sample sample.e)
6698+ =/ last=(list icap-site) (scope-expr body.e)
6699+ (weld first last)
6700+ %call
6701+ =/ first=(list icap-site) (scope-expr head.e)
6702+ =/ last=(list icap-site) (scope-exprs args.e)
6703+ (weld first last)
6704+ %cast
6705+ =/ first=(list icap-site) (scope-shape shape.e)
6706+ =/ last=(list icap-site) (scope-expr val.e)
6707+ (weld first last)
6708+ %trace
6709+ =/ first=(list icap-site) (scope-expr val.e)
6710+ =/ last=(list icap-site) (scope-expr then.e)
6711+ (weld first last)
6712+ %branch
6713+ =/ first=(list icap-site) (scope-expr subject.e)
6714+ =/ last=(list icap-site) (scope-arms arms.e)
6715+ (weld first last)
6716+ %body (scope-expr final.e)
6717+ * ~
6718+ ==
6719+::
6720+++ reserve-cap-sites
6721+ |= [sites=(list icap-site) state=istate]
6722+ ^- istate
6723+ ?~ sites state
6724+ ?: ?=(^ (icap-lookup name.i.sites caps.state)) $(sites t.sites)
6725+ $(sites t.sites, state state(next +(next.state), caps [[name.i.sites next.state at.i.sites] caps.state]))
6726+::
6727+++ reserve-def-caps
6728+ |= [e=expr state=istate]
6729+ ^- istate
6730+ (reserve-cap-sites (scope-expr e) state)
6731+::
6044++ infer-local-defs
6732++ infer-local-defs
6045 |= [ds=(list def) env=ienv state=istate]
6733 |= [ds=(list def) env=ienv state=istate]
6046 ^- ilocal-result
6734 ^- ilocal-result
@@ -6049,26 +6737,65 @@
6049 |-
6737 |-
6050 ?~ ds
6738 ?~ ds
6051 ?~ remaining [%& env state]
6739 ?~ remaining [%& env state]
6740+ ?. progressed
6741+ =/ pending=(list def) (flop remaining)
6742+ =/ groups=icomponents (graph-components pending (global-value-names pending))
6743+ =/ grouped=(unit [rest=(list def) env=ienv state=istate])
6744+ (try-local-group pending groups env state)
6052− ?. progressed [%| ["local definitions need unsupported inference" ~]]
6745+ ?~ grouped [%| ["local definitions need unsupported inference" ~]]
6746+ $(ds rest.u.grouped, remaining ~, env env.u.grouped, state state.u.grouped, progressed |)
6053 $(ds (flop remaining), remaining ~, progressed |)
6747 $(ds (flop remaining), remaining ~, progressed |)
6054 =/ d=def i.ds
6748 =/ d=def i.ds
6055 ?> ?=(%value -.d)
6749 ?> ?=(%value -.d)
6750+ =/ local-state=istate (reserve-def-caps val.d state)
6056− =/ inferred=iresult (infer-fragment val.d env state)
6751+ =/ inferred=iresult (infer-fragment val.d env local-state)
6752+ =/ retried=? ?=(%| -.inferred)
6753+ =? inferred retried (infer-recursive-gate d env local-state)
6057 ?: ?=(%| -.inferred) $(ds t.ds, remaining [d remaining])
6754 ?: ?=(%| -.inferred) $(ds t.ds, remaining [d remaining])
6755+ =. state.p.inferred (default-hole-numbers holes.state.p.inferred holes.state state.p.inferred env !(itype-has-gate (itype-normalize typ.p.inferred sub.state.p.inferred)))
6756+ =/ hole=(unit idiag) (unresolved-hole holes.state.p.inferred holes.state state.p.inferred)
6757+ ?^ hole [%| u.hole]
6758+ =/ merged=(unit [first=icap second=icap])
6759+ (merged-capitals caps.state.p.inferred sub.state.p.inferred)
6760+ ?^ merged
6761+ [%| ["distinct type variables `{(trip name.first.u.merged)}` and `{(trip name.second.u.merged)}` must not be forced equal; use the same capital for a shared type" ~[[at.first.u.merged "first type variable"] [at.second.u.merged "second type variable"]]]]
6762+ ?: (constrained-capitals caps.state.p.inferred sub.state.p.inferred)
6763+ [%| ["explicit capital constraints are not supported by partial inference" ~]]
6058 =/ typ=itype (itype-normalize typ.p.inferred sub.state.p.inferred)
6764 =/ typ=itype (itype-normalize typ.p.inferred sub.state.p.inferred)
6059 ?: |((pending-tags tags.state.p.inferred sub.state.p.inferred) (itype-has-tag typ))
6765 ?: |((pending-tags tags.state.p.inferred sub.state.p.inferred) (itype-has-tag typ))
6060 $(ds t.ds, remaining [d remaining])
6766 $(ds t.ds, remaining [d remaining])
6061 ?: (unsupported-atom-vars typ caps.state.p.inferred binders.state.p.inferred sub.state.p.inferred)
6767 ?: (unsupported-atom-vars typ caps.state.p.inferred binders.state.p.inferred sub.state.p.inferred)
6062 $(ds t.ds, remaining [d remaining])
6768 $(ds t.ds, remaining [d remaining])
6063 =/ free=(list @ud)
6769 =/ free=(list @ud)
6064− (weld (free-env-vars env sub.state.p.inferred) (free-cap-vars caps.state.p.inferred sub.state.p.inferred))
6770+ (weld (free-env-vars env sub.state.p.inferred) (free-cap-vars caps.state sub.state.p.inferred))
6065 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
6771 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
6066 =. vars (skim vars |=(n=@ud !(lien free |=(f=@ud =(f n)))))
6772 =. vars (skim vars |=(n=@ud !(lien free |=(f=@ud =(f n)))))
6067− $(ds t.ds, env [[name.d [typ vars]] env], state state.p.inferred, progressed &)
6773+ $(ds t.ds, env [[name.d [typ vars]] env], state state.p.inferred(caps caps.state, holes holes.state), progressed &)
6774+::
6775+:: Try complete cyclic local groups after individual definitions stall.
6776+:: Components with non-gates or unresolved constraints stay unavailable.
6777+::
6778+++ try-local-group
6779+ |= [ds=(list def) groups=icomponents env=ienv state=istate]
6780+ ^- (unit [rest=(list def) env=ienv state=istate])
6781+ ?~ groups ~
6782+ =/ names=(list term) i.groups
6783+ ?. (gth (lent names) 1) $(groups t.groups)
6784+ =/ members=(list def)
6785+ (skim ds |=(d=def &(?=(%value -.d) (lien names |=(n=term =(n name.d))))))
6786+ ?. =((lent members) (lent names)) $(groups t.groups)
6787+ =/ result=ilocal-result (infer-gate-group members env state)
6788+ ?: ?=(%| -.result) $(groups t.groups)
6789+ =/ rest=(list def)
6790+ (skim ds |=(d=def !(lien names |=(n=term =(n name.d)))))
6791+ =/ more=(unit [rest=(list def) env=ienv state=istate])
6792+ $(ds rest, groups t.groups, env env.p.result, state state.p.result)
6793+ ?^ more more
6794+ `[rest env.p.result state.p.result]
6068::
6795::
6069:: Read only fields of a known record. Unresolved field constraints and
6796:: Read only fields of a known record. Unresolved field constraints and
6070−:: ambiguous repeated faces are outside this fragment (doc question:
6797+:: ambiguous repeated faces are outside this fragment. Imported record
6071−:: whether duplicate imported Hoon faces are valid or select a field).
6798+:: spines with repeated names are unavailable when used.
6072::
6799::
6073++ record-fields-named
6800++ record-fields-named
6074 |= [name=term t=itype sub=isub]
6801 |= [name=term t=itype sub=isub]
@@ -6087,21 +6814,33 @@
6087 ^- iresult
6814 ^- iresult
6088 =/ reverse=(list term) (flop names)
6815 =/ reverse=(list term) (flop names)
6089 ?~ reverse [%| ["empty wing" ~]]
6816 ?~ reverse [%| ["empty wing" ~]]
6090− =/ scheme=(unit ischeme) (ienv-lookup i.reverse env)
6817+ =/ iface=(unit ifile) (find-jibb-interface i.reverse jimports.state)
6091− ?~ scheme [%| ["field access is not supported by partial inference" ~]]
6092− =/ inst=[typ=itype state=istate] (instantiate-scheme u.scheme state)
6093 =/ fields=(list term) t.reverse
6818 =/ fields=(list term) t.reverse
6819+ ?~ fields [%| ["field access is not supported by partial inference" ~]]
6820+ =/ scheme=(unit ischeme)
6821+ ?~ iface
6822+ (ienv-lookup i.reverse env)
6823+ (ienv-lookup i.fields values.u.iface)
6824+ ?~ scheme
6825+ ?^ iface [%| ["module member is not available to partial inference" ~]]
6826+ [%| ["field access is not supported by partial inference" ~]]
6827+ =/ inst=[typ=itype state=istate]
6828+ ?~ iface (instantiate-scheme u.scheme state)
6829+ =/ imported=ischeme u.scheme
6830+ =. typ.imported (itype-in-import typ.imported u.iface i.reverse prelude.state)
6831+ (instantiate-scheme imported state)
6832+ =/ remaining=(list term) ?~(iface fields t.fields)
6094 =/ typ=itype typ.inst
6833 =/ typ=itype typ.inst
6095 |-
6834 |-
6096− ?~ fields [%& typ state.inst]
6835+ ?~ remaining [%& typ state.inst]
6097− =/ found=(list itype) (record-fields-named i.fields typ sub.state.inst)
6836+ =/ found=(list itype) (record-fields-named i.remaining typ sub.state.inst)
6098 ?~ found [%| ["field is not available to partial inference" ~]]
6837 ?~ found [%| ["field is not available to partial inference" ~]]
6099 ?^ t.found [%| ["field name is ambiguous in partial inference" ~]]
6838 ?^ t.found [%| ["field name is ambiguous in partial inference" ~]]
6100− $(fields t.fields, typ i.found)
6839+ $(remaining t.remaining, typ i.found)
6101::
6840::
6102−:: Propagate a known union through supported loobean and unit branches. Empty bodies
6841+:: Propagate a known union or list through supported loobean, unit and list
6103−:: and groups are transparent; bodies with definitions keep their normal
6842+:: branches. Empty bodies and groups are transparent; bodies with definitions
6104−:: scoping and wait for general bidirectional inference.
6843+:: keep their normal scoping and wait for general bidirectional inference.
6105::
6844::
6106++ context-union-branch
6845++ context-union-branch
6107 |= e=expr
6846 |= e=expr
@@ -6118,6 +6857,8 @@
6118 ^- iresult
6857 ^- iresult
6119 ?: ?=(%group -.e) $(e inner.e)
6858 ?: ?=(%group -.e) $(e inner.e)
6120 ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
6859 ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
6860+ ?: &(?=(%collection -.expected) =(%list name.expected) (context-list-expression e))
6861+ (infer-list-context e expected env state context)
6121 ?: ?=(%branch -.e)
6862 ?: ?=(%branch -.e)
6122 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
6863 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
6123 ?~ t.arms.e [%| ["branch pattern is not supported by partial inference" ~]]
6864 ?~ t.arms.e [%| ["branch pattern is not supported by partial inference" ~]]
@@ -6134,6 +6875,9 @@
6134 [%| ["branch does not cover both loobeans" ~]]
6875 [%| ["branch does not cover both loobeans" ~]]
6135 =/ subject=iresult (infer-fragment subject.e env state)
6876 =/ subject=iresult (infer-fragment subject.e env state)
6136 ?: ?=(%| -.subject) subject
6877 ?: ?=(%| -.subject) subject
6878+ =/ subject-type=itype (itype-normalize typ.p.subject sub.state.p.subject)
6879+ ?: ?=(%union -.subject-type)
6880+ [%| ["contextual union-pattern branch is not supported by partial inference" ~]]
6137 =/ su=(unit isub) (itype-unify typ.p.subject [%flag ~] sub.state.p.subject)
6881 =/ su=(unit isub) (itype-unify typ.p.subject [%flag ~] sub.state.p.subject)
6138 ?~ su [%| ["loobean branch subject does not unify with ?" ~]]
6882 ?~ su [%| ["loobean branch subject does not unify with ?" ~]]
6139 =/ left=iresult $(e val.x, state state.p.subject(sub u.su))
6883 =/ left=iresult $(e val.x, state state.p.subject(sub u.su))
@@ -6145,20 +6889,33 @@
6145 ?: ?=(%| -.value) value
6889 ?: ?=(%| -.value) value
6146 =/ fit=ifit (itype-fit typ.p.value expected sub.state.p.value next.state.p.value)
6890 =/ fit=ifit (itype-fit typ.p.value expected sub.state.p.value next.state.p.value)
6147 ?: ?=(%unknown -.fit)
6891 ?: ?=(%unknown -.fit)
6892+ ?: &(?=(%collection -.expected) =(%list name.expected))
6893+ [%| ["branch list constraint is not supported by partial inference" ~]]
6894+ ?: ?=(%flag -.expected) [%| ["branch loobean constraint is not supported by partial inference" ~]]
6148 [%| ["branch union constraint is not supported by partial inference" ~]]
6895 [%| ["branch union constraint is not supported by partial inference" ~]]
6149 ?: ?=(%bad -.fit)
6896 ?: ?=(%bad -.fit)
6897+ =/ missing=(unit idiag) (missing-union-tag e expected sub.state.p.value context)
6898+ ?^ missing [%| u.missing]
6899+ =/ nested=(unit idiag) (nested-missing-tag e typ.p.value expected sub.state.p.value next.state.p.value context)
6900+ ?^ nested [%| u.nested]
6901+ ?: &(?=(%collection -.expected) =(%list name.expected))
6902+ [%| ["branch arm does not fit its expected list" ~[[context "expected list"] [(span-of e) "branch arm"]]]]
6903+ ?: ?=(%flag -.expected)
6904+ [%| ["branch arm does not fit its expected loobean" ~[[context "expected loobean"] [(span-of e) "branch arm"]]]]
6150 [%| ["branch arm does not fit its expected union" ~[[context "expected union"] [(span-of e) "branch arm"]]]]
6905 [%| ["branch arm does not fit its expected union" ~[[context "expected union"] [(span-of e) "branch arm"]]]]
6151 [%& expected state.p.value(sub sub.fit, next next.fit)]
6906 [%& expected state.p.value(sub sub.fit, next next.fit)]
6152::
6907::
6153−:: A list literal needs a known list target and the validated prelude list.
6908+:: A list expression needs a known list target and the validated prelude list.
6909+:: Literal items and unfaced two-item cons cells receive that target one by
6154−:: Its items receive that target one by one; pending constraints elsewhere
6910+:: one; pending constraints elsewhere stay in the threaded state.
6155−:: stay in the threaded state. Other list syntax remains unsupported.
6156::
6911::
6157−++ context-list-literal
6912+++ context-list-expression
6158 |= e=expr
6913 |= e=expr
6159 ^- ?
6914 ^- ?
6160 ?- -.e
6915 ?- -.e
6161 %list &
6916 %list &
6917+ %tuple &
6918+ %lit |(=(%null form.lit.e) &(=(%term form.lit.e) =(0 val.lit.e)))
6162 %group $(e inner.e)
6919 %group $(e inner.e)
6163 %body ?~(defs.e $(e final.e) |)
6920 %body ?~(defs.e $(e final.e) |)
6164 * |
6921 * |
@@ -6169,7 +6926,6 @@
6169 ^- iresult
6926 ^- iresult
6170 ?: ?=(%group -.e) $(e inner.e)
6927 ?: ?=(%group -.e) $(e inner.e)
6171 ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
6928 ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
6172− ?> ?=(%list -.e)
6173 ?~ prelude.state [%| ["list literal needs the standard prelude in partial inference" ~]]
6929 ?~ prelude.state [%| ["list literal needs the standard prelude in partial inference" ~]]
6174 ?. =(at.u.prelude.state /lib/jibb/prelude/jibb)
6930 ?. =(at.u.prelude.state /lib/jibb/prelude/jibb)
6175 [%| ["list literal needs the standard prelude in partial inference" ~]]
6931 [%| ["list literal needs the standard prelude in partial inference" ~]]
@@ -6182,25 +6938,65 @@
6182 ?. =(%list name.target) [%| ["list context is not supported by partial inference" ~]]
6938 ?. =(%list name.target) [%| ["list context is not supported by partial inference" ~]]
6183 ?~ args.target [%| ["list context is not supported by partial inference" ~]]
6939 ?~ args.target [%| ["list context is not supported by partial inference" ~]]
6184 ?^ t.args.target [%| ["list context is not supported by partial inference" ~]]
6940 ?^ t.args.target [%| ["list context is not supported by partial inference" ~]]
6941+ ?: ?=(%lit -.e)
6942+ ?. |(=(%null form.lit.e) &(=(%term form.lit.e) =(0 val.lit.e)))
6943+ [%| ["list expression is not supported by partial inference" ~]]
6944+ [%& target state]
6945+ ?: ?=(%list -.e)
6185− =/ result=iresult (infer-list-items items.e i.args.target env state context)
6946+ =/ result=iresult (infer-list-items items.e i.args.target env state context)
6186− ?: ?=(%| -.result) result
6947+ ?: ?=(%| -.result) result
6187− [%& target state.p.result]
6948+ [%& target state.p.result]
6949+ ?. ?=(%tuple -.e) [%| ["list expression is not supported by partial inference" ~]]
6950+ ?~ items.e [%| ["cons shape is not supported by partial inference" ~]]
6951+ ?~ t.items.e [%| ["cons shape is not supported by partial inference" ~]]
6952+ ?^ t.t.items.e [%| ["cons shape is not supported by partial inference" ~]]
6953+ ?^ face.i.items.e [%| ["faced cons is not supported by partial inference" ~]]
6954+ ?^ face.i.t.items.e [%| ["faced cons is not supported by partial inference" ~]]
6955+ =/ head=iresult (infer-list-items ~[val.i.items.e] i.args.target env state context)
6956+ ?: ?=(%| -.head) head
6957+ =/ target=itype (itype-walk target sub.state.p.head)
6958+ =/ tail=iresult
6959+ ?: (context-list-expression val.i.t.items.e)
6960+ (infer-list-context val.i.t.items.e target env state.p.head context)
6961+ (infer-fragment val.i.t.items.e env state.p.head)
6962+ ?: ?=(%| -.tail) tail
6963+ =/ fit=ifit (itype-fit typ.p.tail target sub.state.p.tail next.state.p.tail)
6964+ ?: ?=(%unknown -.fit) [%| ["list tail constraint is not supported by partial inference" ~]]
6965+ ?: ?=(%bad -.fit)
6966+ [%| ["list tail does not fit its expected type" ~[[context (site-type-note "expected list" target sub.state.p.tail)] [(span-of val.i.t.items.e) (site-type-note "list tail" typ.p.tail sub.state.p.tail)]]]]
6967+ [%& target state.p.tail(sub sub.fit, next next.fit)]
6968+::
6969+++ infer-open-list-items
6970+ |= [items=(list expr) expected=itype env=ienv state=istate context=span]
6971+ ^- iresult
6972+ ?~ items [%& expected state]
6973+ =/ target=itype (itype-walk expected sub.state)
6974+ =/ value=iresult (infer-call-context-arg i.items target env state context)
6975+ ?: ?=(%| -.value) value
6976+ =/ fit=ifit (itype-fit typ.p.value target sub.state.p.value next.state.p.value)
6977+ ?: ?=(%unknown -.fit) [%| ["list item constraint is not supported by partial inference" ~]]
6978+ ?: ?=(%bad -.fit)
6979+ ?: |((itype-family-related typ.p.value target sub.state.p.value) (itype-has-any-atom typ.p.value sub.state.p.value) (itype-has-any-atom target sub.state.p.value))
6980+ [%| ["list item widening is not supported by partial inference" ~]]
6981+ [%| ["list items do not have compatible types" ~[[context (site-type-note "expected item" target sub.state.p.value)] [(span-of i.items) (site-type-note "list item" typ.p.value sub.state.p.value)]]]]
6982+ ?: (itype-has-tag (itype-normalize expected sub.fit))
6983+ [%| ["list item needs context in partial inference" ~]]
6984+ $(items t.items, state state.p.value(sub sub.fit, next next.fit))
6188::
6985::
6189++ infer-list-items
6986++ infer-list-items
6190 |= [items=(list expr) expected=itype env=ienv state=istate context=span]
6987 |= [items=(list expr) expected=itype env=ienv state=istate context=span]
6191 ^- iresult
6988 ^- iresult
6192 ?~ items [%& expected state]
6989 ?~ items [%& expected state]
6193 =/ target=itype (itype-walk expected sub.state)
6990 =/ target=itype (itype-walk expected sub.state)
6194− =/ value=iresult
6195− ?: &(?=(%union -.target) (context-union-branch i.items))
6196− (infer-union-context i.items target env state context)
6197− ?: &(?=(%collection -.target) =(%list name.target) (context-list-literal i.items))
6198− (infer-list-context i.items target env state context)
6991+ =/ value=iresult (infer-call-context-arg i.items target env state context)
6199− (infer-fragment i.items env state)
6200 ?: ?=(%| -.value) value
6992 ?: ?=(%| -.value) value
6201 =/ fit=ifit (itype-fit typ.p.value target sub.state.p.value next.state.p.value)
6993 =/ fit=ifit (itype-fit typ.p.value target sub.state.p.value next.state.p.value)
6202 ?: ?=(%unknown -.fit) [%| ["list item constraint is not supported by partial inference" ~]]
6994 ?: ?=(%unknown -.fit) [%| ["list item constraint is not supported by partial inference" ~]]
6203 ?: ?=(%bad -.fit)
6995 ?: ?=(%bad -.fit)
6996+ =/ missing=(unit idiag) (missing-union-tag i.items target sub.state.p.value context)
6997+ ?^ missing [%| u.missing]
6998+ =/ nested=(unit idiag) (nested-missing-tag i.items typ.p.value target sub.state.p.value next.state.p.value context)
6999+ ?^ nested [%| u.nested]
6204 [%| ["list item does not fit its expected type" ~[[context (site-type-note "expected item" target sub.state.p.value)] [(span-of i.items) (site-type-note "list item" typ.p.value sub.state.p.value)]]]]
7000 [%| ["list item does not fit its expected type" ~[[context (site-type-note "expected item" target sub.state.p.value)] [(span-of i.items) (site-type-note "list item" typ.p.value sub.state.p.value)]]]]
6205 $(items t.items, state state.p.value(sub sub.fit, next next.fit))
7001 $(items t.items, state state.p.value(sub sub.fit, next next.fit))
6206::
7002::
@@ -6293,7 +7089,7 @@
6293 [%| ["list branch pattern is not supported by partial inference" ~]]
7089 [%| ["list branch pattern is not supported by partial inference" ~]]
6294 =/ binder=(unit [head=term tail=term]) ?:(first-empty second-name first-name)
7090 =/ binder=(unit [head=term tail=term]) ?:(first-empty second-name first-name)
6295 ?~ binder [%| ["list branch pattern is not supported by partial inference" ~]]
7091 ?~ binder [%| ["list branch pattern is not supported by partial inference" ~]]
6296− ?: |(=(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)))))
7092+ ?: |(=(head.u.binder %proj) =(tail.u.binder %proj) =(head.u.binder tail.u.binder) ?=(^ (ienv-lookup head.u.binder env)) ?=(^ (ienv-lookup tail.u.binder env)) (lien globals.state |=(n=term |(=(n head.u.binder) =(n tail.u.binder)))))
6297 [%| ["pattern binder shadows a name" ~]]
7093 [%| ["pattern binder shadows a name" ~]]
6298 =/ extended=ienv [[head.u.binder [i.args.typ ~]] [tail.u.binder [typ ~]] env]
7094 =/ extended=ienv [[head.u.binder [i.args.typ ~]] [tail.u.binder [typ ~]] env]
6299 =/ left=iresult
7095 =/ left=iresult
@@ -6330,7 +7126,7 @@
6330 [%| ["unit branch pattern is not supported by partial inference" ~]]
7126 [%| ["unit branch pattern is not supported by partial inference" ~]]
6331 =/ binder=(unit term) ?:(first-empty second-name first-name)
7127 =/ binder=(unit term) ?:(first-empty second-name first-name)
6332 ?~ binder [%| ["unit branch pattern is not supported by partial inference" ~]]
7128 ?~ binder [%| ["unit branch pattern is not supported by partial inference" ~]]
6333− ?: |(?=(^ (ienv-lookup u.binder env)) (lien globals.state |=(n=term =(n u.binder))))
7129+ ?: |(=(u.binder %proj) ?=(^ (ienv-lookup u.binder env)) (lien globals.state |=(n=term =(n u.binder))))
6334 [%| ["pattern binder shadows a name" ~]]
7130 [%| ["pattern binder shadows a name" ~]]
6335 =/ payload=(unit itype) (unit-union-payload typ)
7131 =/ payload=(unit itype) (unit-union-payload typ)
6336 ?~ payload [%| ["unit branch subject is not supported by partial inference" ~]]
7132 ?~ payload [%| ["unit branch subject is not supported by partial inference" ~]]
@@ -6348,10 +7144,577 @@
6348 ?~ joined [%| ["unit branch results need unsupported inference" ~]]
7144 ?~ joined [%| ["unit branch results need unsupported inference" ~]]
6349 [%& typ.p.left state.p.right(sub u.joined)]
7145 [%& typ.p.left state.p.right(sub u.joined)]
6350::
7146::
7147+:: Infer pieces in order, retaining their substitutions and pending tags.
7148+:: A bare decimal literal has no outside type constraint, so it takes its
7149+:: normal @ud default here. Other open numeric and aura variables wait for
7150+:: deferred constraints, which this fragment does not implement yet.
7151+++ infer-string-pieces
7152+ |= [ps=(list piece) env=ienv state=istate]
7153+ ^- iresult
7154+ ?~ ps [%& [%atom %t] state]
7155+ ?: ?=(%text -.i.ps) $(ps t.ps)
7156+ =/ item=iresult (infer-fragment p.i.ps env state)
7157+ ?: ?=(%| -.item) item
7158+ =/ t=itype (itype-normalize typ.p.item sub.state.p.item)
7159+ ?: |(?=(%atom -.t) ?=(%any-atom -.t))
7160+ $(ps t.ps, state state.p.item)
7161+ ?: &(?=(%nvar -.t) ?=(%lit -.p.i.ps) =(%number form.lit.p.i.ps))
7162+ $(ps t.ps, state state.p.item)
7163+ ?: &(?=(%collection -.t) =(%list name.t) =(~[[%atom 'tD']] args.t))
7164+ $(ps t.ps, state state.p.item)
7165+ ?: &(?=(%avar -.t) (atom-var-from-cap id.t caps.state.p.item sub.state.p.item))
7166+ [%| ["a generic atom in interpolation needs an aura" ~[[(span-of p.i.ps) "atom with a generic aura"]]]]
7167+ ?: ?=(%cell -.t)
7168+ [%| ["a cell in interpolation needs a printer" ~[[(span-of p.i.ps) "cell without a printer"]]]]
7169+ [%| ["interpolation type needs unsupported inference" ~]]
7170+::
7171+:: Whole-case coverage for a known union. When a pattern may cover only
7172+:: part of a case, finite loobean refinements are tried below; other
7173+:: partial coverage stays unsupported until the general pattern matrix.
7174++$ imatch ?(%full %none %unknown)
7175+++ union-pattern-items
7176+ |= [ps=(list pattern) t=itype]
7177+ ^- imatch
7178+ ?~ ps %unknown
7179+ ?~ t.ps (union-pattern i.ps t)
7180+ =. t ?:(?=(%face -.t) body.t t)
7181+ ?. ?=(%cell -.t)
7182+ ?: |(?=(%atom -.t) ?=(%any-atom -.t) ?=(%flag -.t) ?=(%const -.t)) %none
7183+ %unknown
7184+ =/ a=imatch (union-pattern i.ps hed.t)
7185+ =/ b=imatch $(ps t.ps, t tal.t)
7186+ ?: |(=(%none a) =(%none b)) %none
7187+ ?:(&(=(%full a) =(%full b)) %full %unknown)
7188+::
7189+++ union-pattern
7190+ |= [p=pattern t=itype]
7191+ ^- imatch
7192+ =. t ?:(?=(%face -.t) body.t t)
7193+ ?- -.p
7194+ %any %full
7195+ %bind %full
7196+ %lit
7197+ ?: ?=(%const -.t) ?:(=(val.literal.t val.lit.p) %full %none)
7198+ ?: ?=(%cell -.t) %none
7199+ ?: ?=(%flag -.t)
7200+ ?:(|(=(0 val.lit.p) =(1 val.lit.p)) %unknown %none)
7201+ %unknown
7202+ %str ?:(?=(%cell -.t) %none %unknown)
7203+ %cell (union-pattern-items items.p t)
7204+ ==
7205+::
7206+++ union-pattern-has-bind
7207+ |= p=pattern
7208+ ^- ?
7209+ ?: ?=(%bind -.p) &
7210+ ?. ?=(%cell -.p) |
7211+ (lien items.p union-pattern-has-bind)
7212+::
7213+++ union-pattern-bind-items
7214+ |= [ps=(list pattern) t=itype env=ienv globals=(list term)]
7215+ ^- (unit ienv)
7216+ ?~ ps ~
7217+ ?~ t.ps (union-pattern-bind i.ps t env globals)
7218+ =. t ?:(?=(%face -.t) body.t t)
7219+ ?. ?=(%cell -.t) ~
7220+ =/ first=(unit ienv) (union-pattern-bind i.ps hed.t env globals)
7221+ ?~ first ~
7222+ $(ps t.ps, t tal.t, env u.first)
7223+::
7224+++ union-pattern-bind
7225+ |= [p=pattern t=itype env=ienv globals=(list term)]
7226+ ^- (unit ienv)
7227+ =. t ?:(?=(%face -.t) body.t t)
7228+ ?: ?=(%bind -.p)
7229+ ?: |(=(name.p %proj) ?=(^ (ienv-lookup name.p env)) (lien globals |=(n=term =(n name.p)))) ~
7230+ `[[name.p [t ~]] env]
7231+ ?: ?=(%cell -.p) (union-pattern-bind-items items.p t env globals)
7232+ `env
7233+::
7234+:: Split loobean fields into finite refinements for partial patterns.
7235+:: Keep original cases for binder types and preserve whole-case matching
7236+:: before trying refinements. Cap products at 64; unknown, empty or opaque
7237+:: shapes stay unsupported rather than implying complete pattern checking.
7238++$ ifinite [origin=@ud base=itype part=itype]
7239+++ finite-product
7240+ |= [hs=(list itype) ts=(list itype) out=(list itype)]
7241+ ^- (list itype)
7242+ ?~ hs out
7243+ =/ rows=(list itype) (turn ts |=(t=itype [%cell i.hs t]))
7244+ $(hs t.hs, out (weld rows out))
7245+::
7246+++ finite-type
7247+ |= t=itype
7248+ ^- (unit (list itype))
7249+ ?- -.t
7250+ %flag
7251+ `~[[%const [%loobean %f 0 '%.y']] [%const [%loobean %f 1 '%.n']]]
7252+ %face
7253+ =/ body=(unit (list itype)) $(t body.t)
7254+ ?~ body ~
7255+ `(turn u.body |=(x=itype [%face name.t x]))
7256+ %cell
7257+ =/ hed=(unit (list itype)) $(t hed.t)
7258+ ?~ hed ~
7259+ =/ tal=(unit (list itype)) $(t tal.t)
7260+ ?~ tal ~
7261+ ?: (gth (mul (lent u.hed) (lent u.tal)) 64) ~
7262+ `(finite-product u.hed u.tal ~)
7263+ * `~[t]
7264+ ==
7265+::
7266+++ finite-cases
7267+ |= [xs=(list itype) out=(list ifinite) origin=@ud]
7268+ ^- (unit (list ifinite))
7269+ ?~ xs `out
7270+ =/ parts=(unit (list itype)) (finite-type i.xs)
7271+ ?~ parts ~
7272+ ?: (gth (add (lent out) (lent u.parts)) 64) ~
7273+ =/ rows=(list ifinite) (turn u.parts |=(t=itype [origin i.xs t]))
7274+ $(xs t.xs, out (weld out rows), origin +(origin))
7275+::
7276+++ infer-known-union-whole
7277+ |= [e=expr env=ienv subject=iresult]
7278+ ^- (unit iresult)
7279+ ?> ?=(%branch -.e)
7280+ ?: ?=(%| -.subject) `subject
7281+ =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7282+ ?. ?=(%union -.typ) `[%| ["branch is not supported by partial inference" ~]]
7283+ =/ cases=(list itype) cases.typ
7284+ =/ remaining=(list itype) cases
7285+ =/ arms=(list arm) arms.e
7286+ =/ st=istate state.p.subject
7287+ =/ answer=(unit itype) ~
7288+ |-
7289+ ?~ arms
7290+ ?^ remaining
7291+ `[%| ["missing union case {(show-itype i.remaining sub.st)}" ~]]
7292+ ?~ answer `[%| ["empty union branch is not supported by partial inference" ~]]
7293+ `[%& u.answer st]
7294+ =/ a=arm i.arms
7295+ ?: (lien remaining |=(c=itype =(%unknown (union-pattern pat.a c))))
7296+ ~
7297+ =/ matching=(list itype) (skim remaining |=(c=itype =(%full (union-pattern pat.a c))))
7298+ ?~ matching
7299+ ?: (lien cases |=(c=itype =(%full (union-pattern pat.a c))))
7300+ `[%| ["branch arm is covered by earlier arms" ~[[at.pat.a "covered arm"]]]]
7301+ `[%| ["union pattern is not supported by partial inference" ~]]
7302+ ?: &(?=(^ t.matching) (union-pattern-has-bind pat.a))
7303+ `[%| ["a union pattern binding several cases is not supported by partial inference" ~]]
7304+ =/ bound=(unit ienv) (union-pattern-bind pat.a i.matching env globals.st)
7305+ ?~ bound `[%| ["pattern binder shadows a name" ~]]
7306+ =/ body=iresult (infer-fragment val.a u.bound st)
7307+ ?: ?=(%| -.body) `body
7308+ =/ result=itype (itype-normalize typ.p.body sub.state.p.body)
7309+ =/ mismatch=? ?~(answer | !=((itype-normalize u.answer sub.state.p.body) result))
7310+ ?: mismatch `[%| ["union branch result matching needs unsupported inference" ~]]
7311+ $(arms t.arms, remaining (skim remaining |=(c=itype !=(%full (union-pattern pat.a c)))), st state.p.body, answer `result)
7312+::
7313+++ infer-known-union-context-whole
7314+ |= [e=expr expected=itype env=ienv subject=iresult context=span]
7315+ ^- (unit iresult)
7316+ ?> ?=(%branch -.e)
7317+ ?: ?=(%| -.subject) `subject
7318+ =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7319+ ?. ?=(%union -.typ) `[%| ["branch is not supported by partial inference" ~]]
7320+ =/ cases=(list itype) cases.typ
7321+ =/ remaining=(list itype) cases
7322+ =/ arms=(list arm) arms.e
7323+ =/ st=istate state.p.subject
7324+ =/ answer=(unit itype) ~
7325+ |-
7326+ ?~ arms
7327+ ?^ remaining
7328+ `[%| ["missing union case {(show-itype i.remaining sub.st)}" ~]]
7329+ ?~ answer `[%| ["empty union branch is not supported by partial inference" ~]]
7330+ `[%& expected st]
7331+ =/ a=arm i.arms
7332+ ?: (lien remaining |=(c=itype =(%unknown (union-pattern pat.a c))))
7333+ ~
7334+ =/ matching=(list itype) (skim remaining |=(c=itype =(%full (union-pattern pat.a c))))
7335+ ?~ matching
7336+ ?: (lien cases |=(c=itype =(%full (union-pattern pat.a c))))
7337+ `[%| ["branch arm is covered by earlier arms" ~[[at.pat.a "covered arm"]]]]
7338+ `[%| ["union pattern is not supported by partial inference" ~]]
7339+ ?: &(?=(^ t.matching) (union-pattern-has-bind pat.a))
7340+ `[%| ["a union pattern binding several cases is not supported by partial inference" ~]]
7341+ =/ bound=(unit ienv) (union-pattern-bind pat.a i.matching env globals.st)
7342+ ?~ bound `[%| ["pattern binder shadows a name" ~]]
7343+ =/ body=iresult (infer-call-context-arg val.a expected u.bound st context)
7344+ ?: ?=(%| -.body) `body
7345+ =/ fit=ifit (itype-fit typ.p.body expected sub.state.p.body next.state.p.body)
7346+ ?: ?=(%unknown -.fit) `[%| ["union branch result constraint is not supported by partial inference" ~]]
7347+ ?: ?=(%bad -.fit)
7348+ =/ missing=(unit idiag) (missing-union-tag val.a expected sub.state.p.body context)
7349+ ?^ missing `[%| u.missing]
7350+ =/ nested=(unit idiag) (nested-missing-tag val.a typ.p.body expected sub.state.p.body next.state.p.body context)
7351+ ?^ nested `[%| u.nested]
7352+ `[%| ["union branch arm does not fit its expected type" ~[[context "expected type"] [(span-of val.a) "branch arm"]]]]
7353+ ?: (itype-has-tag (itype-normalize expected sub.fit))
7354+ `[%| ["union branch result needs context in partial inference" ~]]
7355+ $(arms t.arms, remaining (skim remaining |=(c=itype !=(%full (union-pattern pat.a c)))), st state.p.body(sub sub.fit, next next.fit), answer `expected)
7356+::
7357+++ infer-known-union-finite
7358+ |= [e=expr env=ienv subject=iresult expected=(unit [typ=itype context=span])]
7359+ ^- iresult
7360+ ?> ?=(%branch -.e)
7361+ ?: ?=(%| -.subject) subject
7362+ =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7363+ ?. ?=(%union -.typ) [%| ["branch is not supported by partial inference" ~]]
7364+ =/ expanded=(unit (list ifinite)) (finite-cases cases.typ ~ 0)
7365+ ?~ expanded [%| ["union pattern expansion needs unsupported inference" ~]]
7366+ =/ cases=(list ifinite) u.expanded
7367+ =/ remaining=(list ifinite) cases
7368+ =/ arms=(list arm) arms.e
7369+ =/ st=istate state.p.subject
7370+ =/ answer=(unit itype) ~
7371+ |-
7372+ ?~ arms
7373+ ?^ remaining
7374+ [%| ["missing union case {(show-itype part.i.remaining sub.st)}" ~]]
7375+ ?~ answer [%| ["empty union branch is not supported by partial inference" ~]]
7376+ ?~ expected [%& u.answer st]
7377+ [%& typ.u.expected st]
7378+ =/ a=arm i.arms
7379+ ?: (lien remaining |=(c=ifinite =(%unknown (union-pattern pat.a part.c))))
7380+ [%| ["partial union pattern is not supported by partial inference" ~]]
7381+ =/ matching=(list ifinite) (skim remaining |=(c=ifinite =(%full (union-pattern pat.a part.c))))
7382+ ?~ matching
7383+ ?: (lien cases |=(c=ifinite =(%full (union-pattern pat.a part.c))))
7384+ [%| ["branch arm is covered by earlier arms" ~[[at.pat.a "covered arm"]]]]
7385+ [%| ["union pattern is not supported by partial inference" ~]]
7386+ ?: &((union-pattern-has-bind pat.a) (lien t.matching |=(c=ifinite !=(origin.c origin.i.matching))))
7387+ [%| ["a union pattern binding several cases is not supported by partial inference" ~]]
7388+ =/ bound=(unit ienv) (union-pattern-bind pat.a base.i.matching env globals.st)
7389+ ?~ bound [%| ["pattern binder shadows a name" ~]]
7390+ =/ body=iresult
7391+ ?~ expected (infer-fragment val.a u.bound st)
7392+ (infer-call-context-arg val.a typ.u.expected u.bound st context.u.expected)
7393+ ?: ?=(%| -.body) body
7394+ ?^ expected
7395+ =/ fit=ifit (itype-fit typ.p.body typ.u.expected sub.state.p.body next.state.p.body)
7396+ ?: ?=(%unknown -.fit) [%| ["union branch result constraint is not supported by partial inference" ~]]
7397+ ?: ?=(%bad -.fit)
7398+ =/ missing=(unit idiag) (missing-union-tag val.a typ.u.expected sub.state.p.body context.u.expected)
7399+ ?^ missing [%| u.missing]
7400+ =/ nested=(unit idiag) (nested-missing-tag val.a typ.p.body typ.u.expected sub.state.p.body next.state.p.body context.u.expected)
7401+ ?^ nested [%| u.nested]
7402+ [%| ["union branch arm does not fit its expected type" ~[[context.u.expected "expected type"] [(span-of val.a) "branch arm"]]]]
7403+ ?: (itype-has-tag (itype-normalize typ.u.expected sub.fit))
7404+ [%| ["union branch result needs context in partial inference" ~]]
7405+ $(arms t.arms, remaining (skim remaining |=(c=ifinite !=(%full (union-pattern pat.a part.c)))), st state.p.body(sub sub.fit, next next.fit), answer `typ.u.expected)
7406+ =/ result=itype (itype-normalize typ.p.body sub.state.p.body)
7407+ =/ mismatch=? ?~(answer | !=((itype-normalize u.answer sub.state.p.body) result))
7408+ ?: mismatch [%| ["union branch result matching needs unsupported inference" ~]]
7409+ $(arms t.arms, remaining (skim remaining |=(c=ifinite !=(%full (union-pattern pat.a part.c)))), st state.p.body, answer `result)
7410+::
7411+:: Prove a one-arm record pattern covers a known, non-union subject.
7412+:: Variable or partial matches stay unsupported; binding uses the same
7413+:: scope and original payload types as the existing union matcher.
7414+++ single-structured-pattern
7415+ |= e=expr
7416+ ^- ?
7417+ ?. ?=(%branch -.e) |
7418+ ?~ arms.e |
7419+ ?^ t.arms.e |
7420+ =/ p=pattern pat.i.arms.e
7421+ ?. ?=(%cell -.p) |
7422+ !(levy items.p |=(x=pattern ?=(%bind -.x)))
7423+::
7424+++ infer-single-case-branch
7425+ |= [e=expr env=ienv state=istate expected=(unit [typ=itype context=span])]
7426+ ^- iresult
7427+ ?> (single-structured-pattern e)
7428+ ?> ?=(%branch -.e)
7429+ ?> ?=(^ arms.e)
7430+ =/ a=arm i.arms.e
7431+ =/ subject=iresult (infer-fragment subject.e env state)
7432+ ?: ?=(%| -.subject) subject
7433+ =/ st=istate state.p.subject
7434+ =/ typ=itype (itype-normalize typ.p.subject sub.st)
7435+ ?: ?=(%union -.typ) [%| ["single-case pattern needs unsupported inference" ~]]
7436+ ?. =(%full (union-pattern pat.a typ))
7437+ [%| ["single-case pattern needs unsupported inference" ~]]
7438+ =/ bound=(unit ienv) (union-pattern-bind pat.a typ env globals.st)
7439+ ?~ bound [%| ["pattern binder shadows a name" ~]]
7440+ ?~ expected (infer-fragment val.a u.bound st)
7441+ =/ body=iresult (infer-call-context-arg val.a typ.u.expected u.bound st context.u.expected)
7442+ ?: ?=(%| -.body) body
7443+ =/ fit=ifit (itype-fit typ.p.body typ.u.expected sub.state.p.body next.state.p.body)
7444+ ?: ?=(%unknown -.fit) [%| ["single-case branch result constraint is not supported by partial inference" ~]]
7445+ ?: ?=(%bad -.fit)
7446+ =/ missing=(unit idiag) (missing-union-tag val.a typ.u.expected sub.state.p.body context.u.expected)
7447+ ?^ missing [%| u.missing]
7448+ =/ nested=(unit idiag) (nested-missing-tag val.a typ.p.body typ.u.expected sub.state.p.body next.state.p.body context.u.expected)
7449+ ?^ nested [%| u.nested]
7450+ [%| ["single-case branch arm does not fit its expected type" ~[[context.u.expected "expected type"] [(span-of val.a) "branch arm"]]]]
7451+ ?: (itype-has-tag (itype-normalize typ.u.expected sub.fit))
7452+ [%| ["single-case branch result needs context in partial inference" ~]]
7453+ [%& typ.u.expected state.p.body(sub sub.fit, next next.fit)]
7454+::
7455+:: This view is used only by pattern analysis, never exported or bound as
7456+:: the subject. Only null plus a two-binder/wildcard cell is supported; its
7457+:: tail keeps the original recursive type. Other patterns fail closed.
7458+++ jrec-match-view
7459+ |= [e=expr subject=iresult]
7460+ ^- iresult
7461+ ?: ?=(%| -.subject) subject
7462+ ?. ?=(%branch -.e) subject
7463+ =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7464+ ?. ?=(%jrec -.typ) subject
7465+ ?~ arms.e subject
7466+ ?~ t.arms.e subject
7467+ ?^ t.t.arms.e subject
7468+ =/ x=pattern pat.i.arms.e
7469+ =/ y=pattern pat.i.t.arms.e
7470+ =/ empty=? &(?=(%lit -.x) =(%null form.lit.x))
7471+ =/ full=pattern ?:(empty y x)
7472+ ?. |(empty &(?=(%lit -.y) =(%null form.lit.y))) subject
7473+ ?. ?=(%cell -.full) subject
7474+ ?~ items.full subject
7475+ ?~ t.items.full subject
7476+ ?^ t.t.items.full subject
7477+ ?. |(?=(%bind -.i.items.full) ?=(%any -.i.items.full)) subject
7478+ ?. |(?=(%bind -.i.t.items.full) ?=(%any -.i.t.items.full)) subject
7479+ ?: =(0 jrec-fuel.state.p.subject)
7480+ [%| ["recursive mold unfolding needs unsupported inference" ~]]
7481+ =/ nil=itype [%const [%null %n 0 '~']]
7482+ =/ cell=itype [%cell [%face head.typ [%atom aura.typ]] [%face tail.typ typ]]
7483+ [%& [%union ~[nil cell] ~ ~ ~] state.p.subject(jrec-fuel (dec jrec-fuel.state.p.subject))]
7484+::
7485+++ infer-known-union-branch-subject
7486+ |= [e=expr env=ienv subject=iresult]
7487+ ^- iresult
7488+ =. subject (jrec-match-view e subject)
7489+ =/ whole=(unit iresult) (infer-known-union-whole e env subject)
7490+ ?~ whole (infer-known-union-finite e env subject ~)
7491+ u.whole
7492+::
7493+++ infer-known-union-branch
7494+ |= [e=expr env=ienv state=istate]
7495+ ^- iresult
7496+ ?> ?=(%branch -.e)
7497+ (infer-known-union-branch-subject e env (infer-fragment subject.e env state))
7498+::
7499+++ infer-known-union-context-subject
7500+ |= [e=expr expected=itype env=ienv subject=iresult context=span]
7501+ ^- iresult
7502+ =. subject (jrec-match-view e subject)
7503+ =/ whole=(unit iresult) (infer-known-union-context-whole e expected env subject context)
7504+ ?~ whole (infer-known-union-finite e env subject `[expected context])
7505+ u.whole
7506+::
7507+:: Limit speculative subject inference to wings and shallow calls;
7508+:: grouping is peeled linearly and cannot introduce a nested branch.
7509+++ simple-union-subject-arg
7510+ |= e=expr
7511+ ^- ?
7512+ ?- -.e
7513+ %wing &
7514+ %lit &
7515+ %str !(lien pieces.e |=(p=piece ?=(%expr -.p)))
7516+ * |
7517+ ==
7518+::
7519+++ safe-union-subject
7520+ |= e=expr
7521+ ^- ?
7522+ ?: ?=(%group -.e) $(e inner.e)
7523+ ?: ?=(%wing -.e) &
7524+ ?. ?=(%call -.e) |
7525+ ?. ?=(%wing -.head.e) |
7526+ (levy args.e simple-union-subject-arg)
7527+::
7528+++ duplicate-loobean-arms
7529+ |= e=expr
7530+ ^- ?
7531+ ?. ?=(%branch -.e) |
7532+ ?~ arms.e |
7533+ ?~ t.arms.e |
7534+ ?^ t.t.arms.e |
7535+ =/ x=pattern pat.i.arms.e
7536+ =/ y=pattern pat.i.t.arms.e
7537+ ?. &(?=(%lit -.x) ?=(%lit -.y)) |
7538+ ?. &(=(%loobean form.lit.x) =(%loobean form.lit.y)) |
7539+ =(val.lit.x val.lit.y)
7540+::
7541+++ union-subject-call
7542+ |= e=expr
7543+ ^- ?
7544+ ?: ?=(%group -.e) $(e inner.e)
7545+ ?=(%call -.e)
7546+::
7547+++ known-union-subject
7548+ |= [e=expr env=ienv state=istate]
7549+ ^- (unit iresult)
7550+ ?. (safe-union-subject e) ~
7551+ =/ subject=iresult (infer-fragment e env state)
7552+ ?: ?=(%| -.subject) ?:((union-subject-call e) `subject ~)
7553+ =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7554+ ?. |(?=(%union -.typ) ?=(%jrec -.typ)) ~
7555+ `subject
7556+::
7557+::
7558+:: Infer changes only against a fully known record spine. Retain the
7559+:: target type; unknown spines and repeated edits remain unsupported.
7560+++ change-spine-known
7561+ |= [t=itype sub=isub]
7562+ ^- ?
7563+ =. t (itype-walk t sub)
7564+ ?: ?=(%face -.t) &
7565+ ?. ?=(%cell -.t) |
7566+ =/ first=itype (itype-walk hed.t sub)
7567+ ?. ?=(%face -.first) |
7568+ $(t tal.t)
7569+::
7570+++ infer-change-edits
7571+ |= [edits=(list edit) target=itype env=ienv state=istate seen=(list term)]
7572+ ^- iresult
7573+ ?~ edits [%& target state]
7574+ =/ entry=edit i.edits
7575+ ?: (lien seen |=(name=term =(name name.entry)))
7576+ [%| ["repeated change fields are not supported by partial inference" ~]]
7577+ ?. (change-spine-known target sub.state)
7578+ [%| ["change target needs a known record in partial inference" ~]]
7579+ =/ found=(list itype) (record-fields-named name.entry target sub.state)
7580+ ?~ found
7581+ [%| ["record has no field `{(trip name.entry)}`" ~[[at.entry "unknown field"]]]]
7582+ ?^ t.found [%| ["change field is ambiguous in partial inference" ~]]
7583+ =/ expected=itype i.found
7584+ =/ value=iresult (infer-call-context-arg val.entry expected env state at.entry)
7585+ ?: ?=(%| -.value) value
7586+ =/ fit=ifit (itype-fit typ.p.value expected sub.state.p.value next.state.p.value)
7587+ ?: ?=(%unknown -.fit) [%| ["change field constraint is not supported by partial inference" ~]]
7588+ ?: ?=(%bad -.fit)
7589+ [%| ["change field and replacement do not unify" ~[[at.entry (site-type-note "expected replacement" expected sub.state.p.value)] [(span-of val.entry) (site-type-note "replacement" typ.p.value sub.state.p.value)]]]]
7590+ $(edits t.edits, state state.p.value(sub sub.fit, next next.fit), seen [name.entry seen])
7591+::
7592+:: Backtick constructs the canonical prelude unit, after checking its
7593+:: prepared template has the standard null and [~ u=A] cases.
7594+++ standard-unit-template
7595+ |= [template=ischeme at=path]
7596+ ^- ?
7597+ ?. =(at /lib/jibb/prelude/jibb) |
7598+ ?~ vars.template |
7599+ ?^ t.vars.template |
7600+ =/ v=@ud i.vars.template
7601+ =/ nil=itype [%const [%null %n 0 '~']]
7602+ =/ expected=itype
7603+ [%union ~[nil [%cell nil [%face %u [%var v]]]] `[at %unit] `%unit ~[[%var v]]]
7604+ =(typ.template expected)
7605+::
7606+:: A named missing-case diagnostic needs more than a failed fit: a case
7607+:: with that tag but the wrong payload is not a missing case. Unknown
7608+:: shapes and atom types that accept terms keep the proof conservative.
7609++$ itag-presence ?(%yes %no %maybe)
7610+++ tag-presence-cases
7611+ |= [cases=(list itype) value=@ sub=isub]
7612+ ^- itag-presence
7613+ ?~ cases %no
7614+ =/ first=itag-presence (tag-presence i.cases value sub)
7615+ ?: =(%yes first) %yes
7616+ =/ rest=itag-presence $(cases t.cases)
7617+ ?: =(%yes rest) %yes
7618+ ?: |(=(%maybe first) =(%maybe rest)) %maybe
7619+ %no
7620+::
7621+++ tag-presence
7622+ |= [t=itype value=@ sub=isub]
7623+ ^- itag-presence
7624+ =. t (itype-walk t sub)
7625+ ?- -.t
7626+ %const ?:(=(value val.literal.t) %yes %no)
7627+ %flag ?:(|(=(value 0) =(value 1)) %yes %no)
7628+ %atom ?:(|(=(%tas aura.t) =(%ta aura.t)) %maybe %no)
7629+ %face $(t body.t)
7630+ %cell
7631+ =/ first=itag-presence $(t hed.t)
7632+ ?: =(%yes first) %yes
7633+ =/ rest=itag-presence $(t tal.t)
7634+ ?: =(%yes rest) %yes
7635+ ?: |(=(%maybe first) =(%maybe rest)) %maybe
7636+ %no
7637+ %union (tag-presence-cases cases.t value sub)
7638+ * %maybe
7639+ ==
7640+::
7641+++ missing-union-tag
7642+ |= [e=expr expected=itype sub=isub context=span]
7643+ ^- (unit idiag)
7644+ ?. ?=(%lit -.e) ~
7645+ ?. =(%term form.lit.e) ~
7646+ =. expected (itype-walk expected sub)
7647+ |-
7648+ ?: ?=(%face -.expected) $(expected (itype-walk body.expected sub))
7649+ ?. ?=(%union -.expected) ~
7650+ ?. =(%no (tag-presence-cases cases.expected val.lit.e sub)) ~
7651+ =/ label=tape
7652+ ?~ label.expected "union {(show-itype expected sub)}"
7653+ (show-itype expected sub)
7654+ `["{label} has no case `{(trip txt.lit.e)}`" ~[[context "expected union"] [(span-of e) "tag"]]]
7655+::
7656+:: Locate a missing tag inside a syntactic tuple only by replaying the
7657+:: directional fit in source order. Uncertain or earlier failures stop
7658+:: the walk, preserving the generic diagnostic rather than guessing.
7659+++ nested-missing-tag
7660+ |= [e=expr actual=itype expected=itype sub=isub next=@ud context=span]
7661+ ^- (unit idiag)
7662+ =/ original=[left=itype right=itype] [actual expected]
7663+ ?: |(?=(%var -.left.original) ?=(%avar -.left.original) ?=(%nvar -.left.original) ?=(%var -.right.original) ?=(%avar -.right.original) ?=(%nvar -.right.original)) ~
7664+ =/ fit=ifit (itype-fit actual expected sub next)
7665+ ?. ?=(%bad -.fit) ~
7666+ =. actual (itype-walk actual sub)
7667+ =. expected (itype-walk expected sub)
7668+ ?: &(?=(%face -.actual) ?=(%face -.expected))
7669+ ?. =(name.actual name.expected) ~
7670+ $(actual body.actual, expected body.expected)
7671+ ?: ?=(%face -.actual) $(actual body.actual)
7672+ ?: ?=(%face -.expected) $(expected body.expected)
7673+ =/ direct=(unit idiag) (missing-union-tag e expected sub context)
7674+ ?^ direct direct
7675+ ?. ?=(%tuple -.e) ~
7676+ (nested-missing-items items.e actual expected sub next context)
7677+::
7678+++ nested-missing-items
7679+ |= [items=(list item) actual=itype expected=itype sub=isub next=@ud context=span]
7680+ ^- (unit idiag)
7681+ ?~ items ~
7682+ ?~ t.items (nested-missing-tag val.i.items actual expected sub next context)
7683+ =/ original=[left=itype right=itype] [actual expected]
7684+ ?: |(?=(%var -.left.original) ?=(%avar -.left.original) ?=(%nvar -.left.original) ?=(%var -.right.original) ?=(%avar -.right.original) ?=(%nvar -.right.original)) ~
7685+ =. actual (itype-walk actual sub)
7686+ =. expected (itype-walk expected sub)
7687+ ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
7688+ =/ first=ifit (itype-fit hed.actual hed.expected sub next)
7689+ ?: ?=(%bad -.first)
7690+ (nested-missing-tag val.i.items hed.actual hed.expected sub next context)
7691+ ?. ?=(%ok -.first) ~
7692+ $(items t.items, actual tal.actual, expected tal.expected, sub sub.first, next next.first)
7693+::
7694+:: A term-headed pair is the same noun as a two-item cell. Preserve the
7695+:: whole pair span for the synthetic head and the value's own span for
7696+:: the payload; unresolved term constraints follow ordinary cell inference.
7697+++ pair-as-cell
7698+ |= e=expr
7699+ ^- expr
7700+ ?> ?=(%pair -.e)
7701+ =/ head=expr [%lit at.e [%term %tas tag.e (crip ['%' (trip tag.e)])]]
7702+ [%tuple at.e ~[[at.e ~ head] [(span-of val.e) ~ val.e]]]
7703+::
7704+:: A segment costs one shared step; dynamic segments are not handled yet.
7705+++ qath-static-fuel
7706+ |= [segs=(list qseg) fuel=@ud]
7707+ ^- (unit @ud)
7708+ ?~ segs `fuel
7709+ ?: =(0 fuel) ~
7710+ ?. ?=(%knot -.i.segs) ~
7711+ $(segs t.segs, fuel (dec fuel))
7712+::
6351++ infer-fragment
7713++ infer-fragment
6352 |= [e=expr env=ienv state=istate]
7714 |= [e=expr env=ienv state=istate]
6353 ^- iresult
7715 ^- iresult
6354 ?- -.e
7716 ?- -.e
7717+ %pair $(e (pair-as-cell e))
6355 %lit
7718 %lit
6356 ?- form.lit.e
7719 ?- form.lit.e
6357 %number ?: =(%ud aura.lit.e)
7720 %number ?: =(%ud aura.lit.e)
@@ -6365,10 +7728,45 @@
6365 %term [%& [%tag next.state lit.e |] state(next +(next.state), tags [[next.state lit.e] tags.state])]
7728 %term [%& [%tag next.state lit.e |] state(next +(next.state), tags [[next.state lit.e] tags.state])]
6366 %null [%& [%tag next.state lit.e |] state(next +(next.state), tags [[next.state lit.e] tags.state])]
7729 %null [%& [%tag next.state lit.e |] state(next +(next.state), tags [[next.state lit.e] tags.state])]
6367 ==
7730 ==
6368− %str
7731+ %unit
6369− =/ interpolated=? (lien pieces.e |=(p=piece ?=(%expr -.p)))
7732+ ?~ prelude.state [%| ["unit construction needs the standard prelude in partial inference" ~]]
7733+ =/ standard=(unit ischeme) (find-jibb-mold %unit u.prelude.state)
7734+ ?~ standard [%| ["unit construction needs the standard prelude in partial inference" ~]]
7735+ ?. (standard-unit-template u.standard at.u.prelude.state)
7736+ [%| ["unit construction needs the standard prelude in partial inference" ~]]
7737+ =/ value=iresult $(e val.e)
7738+ ?: ?=(%| -.value) value
7739+ =/ result=(unit itype) (template-apply u.standard ~[typ.p.value])
6370− ?: interpolated [%| ["interpolation is not supported by partial inference" ~]]
7740+ ?~ result [%| ["unit construction is not supported by partial inference" ~]]
6371− [%& [%atom %t] state]
7741+ [%& u.result state.p.value]
7742+ %list
7743+ ?~ prelude.state [%| ["list literal needs the standard prelude in partial inference" ~]]
7744+ ?. =(at.u.prelude.state /lib/jibb/prelude/jibb)
7745+ [%| ["list literal needs the standard prelude in partial inference" ~]]
7746+ =/ standard=(unit ischeme) (find-jibb-mold %list u.prelude.state)
7747+ ?~ standard [%| ["list literal needs the standard prelude in partial inference" ~]]
7748+ ?. =(u.standard [[%collection %list ~[[%var 0]]] ~[0]])
7749+ [%| ["list literal needs the standard prelude in partial inference" ~]]
7750+ =/ element=itype [%var next.state]
7751+ =/ result=iresult (infer-open-list-items items.e element env state(next +(next.state)) at.e)
7752+ ?: ?=(%| -.result) result
7753+ [%& [%collection %list ~[element]] state.p.result]
7754+ %str (infer-string-pieces pieces.e env state)
7755+ %qath
7756+ ?~ prelude.state [%| ["application path needs the standard prelude in partial inference" ~]]
7757+ ?. =(at.u.prelude.state /lib/jibb/prelude/jibb)
7758+ [%| ["application path needs the standard prelude in partial inference" ~]]
7759+ =/ standard=(unit ischeme) (find-jibb-mold %qath u.prelude.state)
7760+ ?~ standard [%| ["application path needs the standard prelude in partial inference" ~]]
7761+ ?. ?=(~ vars.u.standard) [%| ["application path mold needs unsupported inference" ~]]
7762+ =/ typ=itype typ.u.standard
7763+ ?. ?=(%jrec -.typ) [%| ["application path mold needs unsupported inference" ~]]
7764+ ?. &(=(at.typ /lib/jibb/internal/jibb) =(%qath name.typ) =(%i head.typ) =(%ta aura.typ) =(%t tail.typ))
7765+ [%| ["application path mold needs unsupported inference" ~]]
7766+ ?: =(0 jrec-fuel.state) [%| ["recursive mold unfolding needs unsupported inference" ~]]
7767+ =/ remain=(unit @ud) (qath-static-fuel segs.e (dec jrec-fuel.state))
7768+ ?~ remain [%| ["application path segments need unsupported inference" ~]]
7769+ [%& typ state(jrec-fuel u.remain)]
6372 %wing
7770 %wing
6373 ?~ names.e [%| ["empty wing" ~]]
7771 ?~ names.e [%| ["empty wing" ~]]
6374 ?^ t.names.e
7772 ?^ t.names.e
@@ -6377,7 +7775,7 @@
6377 ?~ iface (infer-field-wing names.e env state)
7775 ?~ iface (infer-field-wing names.e env state)
6378 =/ member=(unit ischeme) (ienv-lookup i.names.e values.u.iface)
7776 =/ member=(unit ischeme) (ienv-lookup i.names.e values.u.iface)
6379 ?~ member [%| ["module member is not available to partial inference" ~]]
7777 ?~ member [%| ["module member is not available to partial inference" ~]]
6380− =. typ.u.member (itype-in-import typ.u.member u.iface i.t.names.e)
7778+ =. typ.u.member (itype-in-import typ.u.member u.iface i.t.names.e prelude.state)
6381 =/ instance=[typ=itype state=istate] (instantiate-scheme u.member state)
7779 =/ instance=[typ=itype state=istate] (instantiate-scheme u.member state)
6382 [%& typ.instance state.instance]
7780 [%& typ.instance state.instance]
6383 =/ scheme=(unit ischeme) (ienv-lookup i.names.e env)
7781 =/ scheme=(unit ischeme) (ienv-lookup i.names.e env)
@@ -6390,6 +7788,11 @@
6390 =/ instance=[typ=itype state=istate] (instantiate-scheme u.scheme state)
7788 =/ instance=[typ=itype state=istate] (instantiate-scheme u.scheme state)
6391 [%& typ.instance state.instance]
7789 [%& typ.instance state.instance]
6392 %group $(e inner.e)
7790 %group $(e inner.e)
7791+ %change
7792+ ?~ edits.e [%| ["a change takes at least one field" ~[[at.e "empty change"]]]]
7793+ =/ target=iresult $(e [%wing at.e target.e])
7794+ ?: ?=(%| -.target) target
7795+ (infer-change-edits edits.e typ.p.target env state.p.target ~)
6393 %ctor [%& [%tag next.state tag.e &] state(next +(next.state), tags [[next.state tag.e] tags.state])]
7796 %ctor [%& [%tag next.state tag.e &] state(next +(next.state), tags [[next.state tag.e] tags.state])]
6394 %trace
7797 %trace
6395 =/ traced=iresult $(e val.e)
7798 =/ traced=iresult $(e val.e)
@@ -6406,6 +7809,9 @@
6406 [%| ["local molds shadow a name" ~]]
7809 [%| ["local molds shadow a name" ~]]
6407 =/ local-state=istate
7810 =/ local-state=istate
6408 state(globals (weld local-names globals.state), molds (weld local-molds molds.state))
7811 state(globals (weld local-names globals.state), molds (weld local-molds molds.state))
7812+ =/ mold-hole=(unit span) (simple-local-mold-hole defs.e)
7813+ ?^ mold-hole
7814+ [%| ["type hole needs a determined type" ~[[u.mold-hole "unresolved type hole"]]]]
6409 ?. (local-molds-supported local-molds local-state)
7815 ?. (local-molds-supported local-molds local-state)
6410 [%| ["local molds need unsupported inference" ~]]
7816 [%| ["local molds need unsupported inference" ~]]
6411 =/ values=(list def) (local-value-defs defs.e)
7817 =/ values=(list def) (local-value-defs defs.e)
@@ -6416,20 +7822,30 @@
6416 [%& typ.p.result state.p.result(globals globals.state, molds molds.state)]
7822 [%& typ.p.result state.p.result(globals globals.state, molds molds.state)]
6417 %branch
7823 %branch
6418 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
7824 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
7825+ ?~ t.arms.e
7826+ ?: (single-structured-pattern e) (infer-single-case-branch e env state ~)
6419− ?~ t.arms.e (infer-cell-branch e env state)
7827+ (infer-cell-branch e env state ~)
6420− ?^ t.t.arms.e [%| ["branch is not supported by partial inference" ~]]
7828+ ?^ t.t.arms.e (infer-known-union-branch e env state)
7829+ =/ known=(unit iresult) (known-union-subject subject.e env state)
7830+ ?: &(?=(^ known) ?=(%| -.u.known) !(duplicate-loobean-arms e)) u.known
7831+ ?: &(?=(^ known) ?=(%& -.u.known) ?=(~ (unit-union-payload (itype-normalize typ.p.u.known sub.state.p.u.known))))
7832+ (infer-known-union-branch-subject e env u.known)
6421 =/ x=arm i.arms.e
7833 =/ x=arm i.arms.e
6422 =/ y=arm i.t.arms.e
7834 =/ y=arm i.t.arms.e
6423 ?: |((unit-empty-pattern pat.x) (unit-empty-pattern pat.y))
7835 ?: |((unit-empty-pattern pat.x) (unit-empty-pattern pat.y))
6424 (infer-unit-branch e env state ~)
7836 (infer-unit-branch e env state ~)
6425− ?. ?=(%lit -.pat.x) [%| ["branch pattern is not supported by partial inference" ~]]
7837+ ?. ?=(%lit -.pat.x) (infer-known-union-branch e env state)
6426− ?. ?=(%lit -.pat.y) [%| ["branch pattern is not supported by partial inference" ~]]
7838+ ?. ?=(%lit -.pat.y) (infer-known-union-branch e env state)
6427 ?. &(=(%loobean form.lit.pat.x) =(%loobean form.lit.pat.y))
7839 ?. &(=(%loobean form.lit.pat.x) =(%loobean form.lit.pat.y))
6428− [%| ["branch pattern is not supported by partial inference" ~]]
7840+ (infer-known-union-branch e env state)
7841+ ?: &(?=(^ known) ?=(%& -.u.known)) (infer-known-union-branch-subject e env u.known)
6429 ?: =(val.lit.pat.x val.lit.pat.y)
7842 ?: =(val.lit.pat.x val.lit.pat.y)
6430 [%| ["branch does not cover both loobeans" ~]]
7843 [%| ["branch does not cover both loobeans" ~]]
6431 =/ subject=iresult $(e subject.e)
7844 =/ subject=iresult $(e subject.e)
6432 ?: ?=(%| -.subject) subject
7845 ?: ?=(%| -.subject) subject
7846+ =/ subject-type=itype (itype-normalize typ.p.subject sub.state.p.subject)
7847+ ?: ?=(%union -.subject-type)
7848+ [%| ["union-pattern branch subject is not supported by partial inference" ~]]
6433 =/ su=(unit isub) (itype-unify typ.p.subject [%flag ~] sub.state.p.subject)
7849 =/ su=(unit isub) (itype-unify typ.p.subject [%flag ~] sub.state.p.subject)
6434 ?~ su [%| ["loobean branch subject does not unify with ?" ~]]
7850 ?~ su [%| ["loobean branch subject does not unify with ?" ~]]
6435 =/ left=iresult $(e val.x, state state.p.subject(sub u.su))
7851 =/ left=iresult $(e val.x, state state.p.subject(sub u.su))
@@ -6456,69 +7872,396 @@
6456 [%& typ.p.left state.p.right(sub u.joined)]
7872 [%& typ.p.left state.p.right(sub u.joined)]
6457 %cast
7873 %cast
6458 =/ target=(unit [typ=itype state=istate]) (infer-simple-shape shape.e state)
7874 =/ target=(unit [typ=itype state=istate]) (infer-simple-shape shape.e state)
7875+ ?~ target
7876+ =/ diag=(unit idiag) (nested-import-invalid shape.e state)
7877+ ?^ diag [%| u.diag]
6459− ?~ target [%| ["cast mold is not supported by partial inference" ~]]
7878+ [%| ["cast mold is not supported by partial inference" ~]]
6460 =/ value=iresult
7879 =/ value=iresult
6461− ?: &(?=(%union -.typ.u.target) (context-union-branch val.e))
6462− (infer-union-context val.e typ.u.target env state.u.target at.shape.e)
6463− ?: &(?=(%collection -.typ.u.target) =(%list name.typ.u.target) (context-list-literal val.e))
6464− (infer-list-context val.e typ.u.target env state.u.target at.shape.e)
7880+ (infer-call-context-arg val.e typ.u.target env state.u.target at.shape.e)
6465− $(e val.e, state state.u.target)
6466 ?: ?=(%| -.value) value
7881 ?: ?=(%| -.value) value
7882+ =/ shape=(unit [source=iwfields target=iwfields])
7883+ (width-shape typ.p.value typ.u.target sub.state.p.value)
7884+ ?^ shape [%| ["record width constraint needs unsupported inference" ~]]
6467 =/ fit=ifit (itype-fit typ.p.value typ.u.target sub.state.p.value next.state.p.value)
7885 =/ fit=ifit (itype-fit typ.p.value typ.u.target sub.state.p.value next.state.p.value)
6468 ?: ?=(%unknown -.fit) [%| ["cast constraint is not supported by partial inference" ~]]
7886 ?: ?=(%unknown -.fit) [%| ["cast constraint is not supported by partial inference" ~]]
6469 ?: ?=(%bad -.fit)
7887 ?: ?=(%bad -.fit)
7888+ =/ missing=(unit idiag) (missing-union-tag val.e typ.u.target sub.state.p.value at.shape.e)
7889+ ?^ missing [%| u.missing]
7890+ =/ nested=(unit idiag) (nested-missing-tag val.e typ.p.value typ.u.target sub.state.p.value next.state.p.value at.shape.e)
7891+ ?^ nested [%| u.nested]
6470 [%| ["cast mold and expression type do not unify" ~[[at.shape.e (site-type-note "cast mold" typ.u.target sub.state.p.value)] [(span-of val.e) (site-type-note "expression" typ.p.value sub.state.p.value)]]]]
7892 [%| ["cast mold and expression type do not unify" ~[[at.shape.e (site-type-note "cast mold" typ.u.target sub.state.p.value)] [(span-of val.e) (site-type-note "expression" typ.p.value sub.state.p.value)]]]]
6471 =/ merged=itype (itype-merge-faces typ.p.value typ.u.target sub.fit)
7893 =/ merged=itype (itype-merge-faces typ.p.value typ.u.target sub.fit)
6472 [%& merged state.p.value(sub sub.fit, next next.fit)]
7894 [%& merged state.p.value(sub sub.fit, next next.fit)]
6473 %crash [%& [%var next.state] state(next +(next.state))]
7895 %crash [%& [%var next.state] state(next +(next.state))]
6474 %gate
7896 %gate
6475 =/ sam=isample-result (infer-sample sample.e env state)
7897 =/ sam=isample-result (infer-sample sample.e env state)
7898+ ?: ?=(%| -.sam)
7899+ =/ diag=(unit idiag) (sample-import-invalid sample.e env state)
7900+ ?: &(=(p.sam "sample mold is not supported by partial inference") ?=(^ diag)) [%| u.diag]
6476− ?: ?=(%| -.sam) [%| [p.sam ~]]
7901+ [%| [p.sam ~]]
6477 =/ body=iresult $(e body.e, env env.p.sam, state state.p.sam)
7902 =/ body=iresult $(e body.e, env env.p.sam, state state.p.sam)
6478 ?: ?=(%| -.body) body
7903 ?: ?=(%| -.body) body
6479 [%& [%fn typ.p.sam typ.p.body] state.p.body]
7904 [%& [%fn typ.p.sam typ.p.body] state.p.body]
6480 %gate-wide
7905 %gate-wide
6481 =/ sam=isample-result (infer-sample sample.e env state)
7906 =/ sam=isample-result (infer-sample sample.e env state)
7907+ ?: ?=(%| -.sam)
7908+ =/ diag=(unit idiag) (sample-import-invalid sample.e env state)
7909+ ?: &(=(p.sam "sample mold is not supported by partial inference") ?=(^ diag)) [%| u.diag]
6482− ?: ?=(%| -.sam) [%| [p.sam ~]]
7910+ [%| [p.sam ~]]
6483 =/ body=iresult $(e body.e, env env.p.sam, state state.p.sam)
7911 =/ body=iresult $(e body.e, env env.p.sam, state state.p.sam)
6484 ?: ?=(%| -.body) body
7912 ?: ?=(%| -.body) body
6485 [%& [%fn typ.p.sam typ.p.body] state.p.body]
7913 [%& [%fn typ.p.sam typ.p.body] state.p.body]
6486 %call
7914 %call
6487 ?~ args.e [%| ["call has no argument" ~]]
7915 ?~ args.e [%| ["call has no argument" ~]]
6488− ?^ t.args.e [%| ["multiple arguments are not supported by partial inference" ~]]
7916+ ?: (explicit-proj-call e env state)
6489− =/ head=iresult $(e head.e)
7917+ [%| ["proj needs an expected record type" ~]]
6490− ?: ?=(%| -.head) head
7918+ (infer-call-with-head e env state (infer-fragment head.e env state))
6491− =/ head-type=itype (itype-walk typ.p.head sub.state.p.head)
6492− =/ arg=iresult
6493− ?: &(?=(%fn -.head-type) ?=(%union -.sample.head-type) (context-union-branch i.args.e))
6494− (infer-union-context i.args.e sample.head-type env state.p.head (span-of head.e))
6495− ?: &(?=(%fn -.head-type) ?=(%collection -.sample.head-type) =(%list name.sample.head-type) (context-list-literal i.args.e))
6496− (infer-list-context i.args.e sample.head-type env state.p.head (span-of head.e))
6497− $(e i.args.e, state state.p.head)
6498− ?: ?=(%| -.arg) arg
6499− =/ st=istate state.p.arg
6500− =/ ht=itype (itype-walk typ.p.head sub.st)
6501− ?: ?=(%fn -.ht)
6502− =/ fit=ifit (itype-fit typ.p.arg sample.ht sub.st next.st)
6503− ?: ?=(%unknown -.fit) [%| ["call constraint is not supported by partial inference" ~]]
6504− ?: ?=(%bad -.fit)
6505− [%| ["call's sample and argument types do not unify" ~[[(span-of head.e) (site-type-note "called gate" ht sub.st)] [(span-of i.args.e) (site-type-note "argument" typ.p.arg sub.st)]]]]
6506− ?: &((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))
6507− [%| ["call result face propagation is not supported by partial inference" ~]]
6508− [%& product.ht st(sub sub.fit, next next.fit)]
6509− =/ result=itype [%var next.st]
6510− =/ uni=(unit isub) (itype-unify ht [%fn typ.p.arg result] sub.st)
6511− ?~ uni
6512− [%| ["call's sample and argument types do not unify" ~[[(span-of head.e) (site-type-note "called gate" ht sub.st)] [(span-of i.args.e) (site-type-note "argument" typ.p.arg sub.st)]]]]
6513− [%& result st(next +(next.st), sub u.uni)]
6514 * [%| ["expression is not supported by partial inference" ~]]
7919 * [%| ["expression is not supported by partial inference" ~]]
6515 ==
7920 ==
6516::
7921::
6517−:: Tuple and record expressions preserve their explicitly written faces.
7922+:: Locate a definite failing argument after the complete sample fit has
7923+:: failed. If an intermediate fit is uncertain, retain the whole argument
7924+:: span rather than assigning blame to a particular argument.
6518::
7925::
6519−++ infer-simple-items
7926+:: Check a call using the head already inferred in this state. Keeping
6520− |= [items=(list item) env=ienv state=istate]
7927+:: this shared avoids evaluating or instantiating a contextual head twice.
6521− ^- iresult
7928+++ width-has-projections
7929+ |= ps=(list iwprojection)
7930+ ^- ?
7931+ ?~ ps |
7932+ &
7933+::
7934++$ iwidth-elaboration [original=expr typ=itype sub=isub projections=(list iwprojection)]
7935+++ infer-width-elaboration
7936+ |= [e=expr env=ienv state=istate]
7937+ ^- (each iwidth-elaboration idiag)
7938+ =/ out=iresult (infer-fragment e env state)
7939+ ?: ?=(%| -.out) [%| p.out]
7940+ [%& [e typ.p.out sub.state.p.out (flop projections.state.p.out)]]
7941+::
7942+++ infer-call-with-head
7943+ |= [e=expr env=ienv state=istate head=iresult]
7944+ ^- iresult
7945+ ?> ?=(%call -.e)
7946+ ?~ args.e [%| ["call has no argument" ~]]
7947+ ?: ?=(%| -.head) head
7948+ =/ head-type=itype (itype-walk typ.p.head sub.state.p.head)
7949+ =/ arg=iresult
7950+ ?^ t.args.e
7951+ ?: ?=(%fn -.head-type)
7952+ (infer-call-context-args args.e sample.head-type env state.p.head (span-of head.e))
7953+ (infer-simple-items (turn args.e |=(a=expr [(span-of a) ~ a])) env state.p.head)
7954+ ?: ?=(%fn -.head-type)
7955+ (infer-call-context-arg i.args.e sample.head-type env state.p.head (span-of head.e))
7956+ (infer-fragment i.args.e env state.p.head)
7957+ ?: ?=(%| -.arg) arg
7958+ =/ st=istate state.p.arg
7959+ =/ ht=itype (itype-walk typ.p.head sub.st)
7960+ ?: ?=(%fn -.ht)
7961+ =/ shape=(unit [source=iwfields target=iwfields])
7962+ ?^ t.args.e ~
7963+ (width-shape typ.p.arg sample.ht sub.st)
7964+ ?^ shape [%| ["record width constraint needs unsupported inference" ~]]
7965+ =/ fit=ifit
7966+ ?^ t.args.e (itype-fit-inner typ.p.arg sample.ht sub.st next.st & |)
7967+ (itype-fit typ.p.arg sample.ht sub.st next.st)
7968+ ?: ?=(%unknown -.fit) [%| ["call constraint is not supported by partial inference" ~]]
7969+ ?: ?=(%bad -.fit)
7970+ ?~ t.args.e
7971+ =/ missing=(unit idiag) (missing-union-tag i.args.e sample.ht sub.st (span-of head.e))
7972+ ?^ missing [%| u.missing]
7973+ =/ nested=(unit idiag) (nested-missing-tag i.args.e typ.p.arg sample.ht sub.st next.st (span-of head.e))
7974+ ?^ nested [%| u.nested]
7975+ [%| ["call's sample and argument types do not unify" ~[[(span-of head.e) (site-type-note "called gate" ht sub.st)] [(span-of i.args.e) (site-type-note "argument" typ.p.arg sub.st)]]]]
7976+ =/ bad=(unit [at=span typ=itype])
7977+ (call-error-site args.e typ.p.arg sample.ht sub.st next.st)
7978+ =/ whole-args=span
7979+ [beg:(span-of i.args.e) end:(span-of (rear args.e))]
7980+ =/ arg-at=span ?~(bad whole-args at.u.bad)
7981+ =/ arg-type=itype ?~(bad typ.p.arg typ.u.bad)
7982+ [%| ["call's sample and argument types do not unify" ~[[(span-of head.e) (site-type-note "called gate" ht sub.st)] [arg-at (site-type-note "argument" arg-type sub.st)]]]]
7983+ ?: &((itype-has-face typ.p.arg sub.fit) (itype-face-asym typ.p.arg sample.ht sub.fit) (itype-output-may-be-cell product.ht sub.fit))
7984+ [%| ["call result face propagation is not supported by partial inference" ~]]
7985+ [%& product.ht st(sub sub.fit, next next.fit)]
7986+ =/ result=itype [%var next.st]
7987+ =/ uni=(unit isub) (itype-unify ht [%fn typ.p.arg result] sub.st)
7988+ ?~ uni
7989+ [%| ["call's sample and argument types do not unify" ~[[(span-of head.e) (site-type-note "called gate" ht sub.st)] [(span-of i.args.e) (site-type-note "argument" typ.p.arg sub.st)]]]]
7990+ [%& result st(next +(next.st), sub u.uni)]
7991+::
7992+++ call-error-site
7993+ |= [args=(list expr) actual=itype expected=itype sub=isub next=@ud]
7994+ ^- (unit [at=span typ=itype])
7995+ ?~ args ~
7996+ =/ original=[left=itype right=itype] [actual expected]
7997+ ?: |(?=(%var -.left.original) ?=(%avar -.left.original) ?=(%nvar -.left.original) ?=(%var -.right.original) ?=(%avar -.right.original) ?=(%nvar -.right.original)) ~
7998+ =. actual (itype-walk actual sub)
7999+ =. expected (itype-walk expected sub)
8000+ ?: &(?=(%face -.expected) !?=(%face -.actual))
8001+ $(expected body.expected)
8002+ ?~ t.args
8003+ =/ fit=ifit (itype-fit actual expected sub next)
8004+ ?. ?=(%bad -.fit) ~
8005+ `[(span-of i.args) (itype-normalize actual sub)]
8006+ ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
8007+ =/ first=ifit (itype-fit hed.actual hed.expected sub next)
8008+ ?: ?=(%bad -.first) `[(span-of i.args) (itype-normalize hed.actual sub)]
8009+ ?: ?=(%unknown -.first) ~
8010+ $(args t.args, actual tal.actual, expected tal.expected, sub sub.first, next next.first)
8011+::
8012+:: Context can help a call argument or cast value while the final fit
8013+:: checks the complete right-nested type, including any written faces.
8014+::
8015+:: Context can resolve the payload of a canonical prelude unit, but an
8016+:: unrelated union with a similar noun shape is not the same mold.
8017+++ infer-unit-context
8018+ |= [e=expr expected=itype env=ienv state=istate context=span]
8019+ ^- iresult
8020+ ?> ?=(%unit -.e)
8021+ ?> ?=(%union -.expected)
8022+ ?~ prelude.state (infer-fragment e env state)
8023+ =/ standard=(unit ischeme) (find-jibb-mold %unit u.prelude.state)
8024+ ?~ standard (infer-fragment e env state)
8025+ ?. (standard-unit-template u.standard at.u.prelude.state) (infer-fragment e env state)
8026+ ?. =(origin.expected `[at.u.prelude.state %unit]) (infer-fragment e env state)
8027+ ?~ args.expected (infer-fragment e env state)
8028+ ?^ t.args.expected (infer-fragment e env state)
8029+ =/ payload=itype i.args.expected
8030+ =/ canonical=(unit itype) (template-apply u.standard ~[payload])
8031+ ?~ canonical (infer-fragment e env state)
8032+ ?> ?=(%union -.u.canonical)
8033+ ?. =((itype-normalize expected(label ~) sub.state) (itype-normalize u.canonical(label ~) sub.state))
8034+ (infer-fragment e env state)
8035+ =/ value=iresult (infer-call-context-arg val.e payload env state context)
8036+ ?: ?=(%| -.value) value
8037+ =/ fit=ifit (itype-fit typ.p.value payload sub.state.p.value next.state.p.value)
8038+ ?: ?=(%unknown -.fit) [%| ["unit payload constraint is not supported by partial inference" ~]]
8039+ ?: ?=(%bad -.fit)
8040+ =/ missing=(unit idiag) (missing-union-tag val.e payload sub.state.p.value context)
8041+ ?^ missing [%| u.missing]
8042+ =/ nested=(unit idiag) (nested-missing-tag val.e typ.p.value payload sub.state.p.value next.state.p.value context)
8043+ ?^ nested [%| u.nested]
8044+ [%| ["unit payload does not fit its expected type" ~[[context (site-type-note "expected unit payload" payload sub.state.p.value)] [(span-of val.e) (site-type-note "payload" typ.p.value sub.state.p.value)]]]]
8045+ [%& expected state.p.value(sub sub.fit, next next.fit)]
8046+::
8047+:: A known gate whose result is still an inference variable can receive
8048+:: an enclosing target before its argument is inferred. Other products
8049+:: and unresolved calls use the existing directional path unchanged.
8050+++ infer-contextual-call
8051+ |= [e=expr expected=itype env=ienv state=istate]
8052+ ^- iresult
8053+ ?> ?=(%call -.e)
8054+ ?~ args.e [%| ["call has no argument" ~]]
8055+ =/ head=iresult (infer-fragment head.e env state)
8056+ ?: ?=(%| -.head) head
8057+ =/ ht=itype (itype-walk typ.p.head sub.state.p.head)
8058+ ?. ?=(%fn -.ht) (infer-call-with-head e env state head)
8059+ =/ result=itype (itype-walk product.ht sub.state.p.head)
8060+ ?. ?=(%var -.result) (infer-call-with-head e env state head)
8061+ ?: |(?=(%var -.expected) ?=(%avar -.expected) ?=(%nvar -.expected) (itype-has-tag (itype-normalize expected sub.state.p.head)))
8062+ (infer-call-with-head e env state head)
8063+ =/ sub=(unit isub) (itype-unify result expected sub.state.p.head)
8064+ ?~ sub (infer-call-with-head e env state head)
8065+ (infer-call-with-head e env state [%& typ.p.head state.p.head(sub u.sub)])
8066+::
8067+:: An eligible fully faced literal receives context by name, in source order.
8068+++ width-literal-fields
8069+ |= [items=(list item) axis=@ud fuel=@ud]
8070+ ^- (unit iwfields)
8071+ =/ order=(list iwfield) ~
8072+ =/ index=(map term iwfield) *(map term iwfield)
8073+ |-
8074+ ?~ items ~
8075+ ?: =(0 fuel) ~
8076+ ?~ face.i.items ~
8077+ =/ at-axis=@ud ?~(t.items axis (mul 2 axis))
8078+ =/ entry=iwfield [u.face.i.items at-axis [%noun ~]]
8079+ ?: ?=(^ (~(get by index) name.entry)) ~
8080+ =. index (~(put by index) name.entry entry)
8081+ =. order [entry order]
8082+ ?~ t.items `[(flop order) index]
8083+ $(items t.items, axis +((mul 2 axis)), fuel (dec fuel))
8084+++ width-infer-items
8085+ |= [items=(list item) expected=(map term iwfield) env=ienv state=istate context=span]
8086+ ^- iresult
8087+ ?~ items [%| ["empty record is not supported" ~]]
8088+ ?~ face.i.items [%| ["record face needs unsupported inference" ~]]
8089+ =/ field=(unit iwfield) (~(get by expected) u.face.i.items)
8090+ =/ head=iresult
8091+ ?~ field (infer-fragment val.i.items env state)
8092+ (infer-call-context-arg val.i.items typ.u.field env state context)
8093+ ?: ?=(%| -.head) head
8094+ =/ typ=itype [%face u.face.i.items typ.p.head]
8095+ ?~ t.items [%& typ state.p.head]
8096+ =/ tail=iresult $(items t.items, state state.p.head)
8097+ ?: ?=(%| -.tail) tail
8098+ [%& [%cell typ typ.p.tail] state.p.tail]
8099+++ width-infer-literal
8100+ |= [e=expr expected=itype env=ienv state=istate context=span]
8101+ ^- (unit iresult)
8102+ ?. ?=(%tuple -.e) ~
8103+ ?. |(?=(%cell -.expected) ?=(%face -.expected)) ~
8104+ =/ source=(unit iwfields) (width-literal-fields items.e 1 4.096)
8105+ =/ target=(unit iwfields) (width-scan expected sub.state 1 4.096)
8106+ ?~ source ~
8107+ ?~ target ~
8108+ ?: (lth (lent order.u.source) (lent order.u.target)) ~
8109+ ?. (width-in-order order.u.source order.u.target)
8110+ `(infer-simple-items items.e env state)
8111+ `(width-infer-items items.e index.u.target env state context)
8112+::
8113+:: Recognize only the reserved unqualified, one-argument operation.
8114+++ explicit-proj-call
8115+ |= [e=expr env=ienv state=istate]
8116+ ^- ?
8117+ ?. ?=(%call -.e) |
8118+ ?. ?=([* ~] args.e) |
8119+ ?. ?=(%wing -.head.e) |
8120+ ?. =(names.head.e ~[%proj]) |
8121+ ?: ?=(^ (ienv-lookup %proj env)) |
8122+ ?: (lien globals.state |=(n=term =(n %proj))) |
8123+ ?~ prelude.state &
8124+ ?:(?=(^ (ienv-lookup %proj values.u.prelude.state)) | &)
8125+++ infer-proj-source
8126+ |= [e=expr expected=itype env=ienv state=istate context=span]
8127+ ^- iresult
8128+ ?: ?=(%group -.e) $(e inner.e)
8129+ =/ literal=(unit iresult) (width-infer-literal e expected env state context)
8130+ ?^ literal u.literal
8131+ (infer-fragment e env state)
8132+++ infer-proj-context
8133+ |= [e=expr expected=itype env=ienv state=istate context=span]
8134+ ^- iresult
8135+ ?> ?=(%call -.e)
8136+ ?~ args.e [%| ["proj needs one record" ~]]
8137+ ?. |(?=(%cell -.expected) ?=(%face -.expected)) [%| ["proj needs an expected record type" ~]]
8138+ =/ value=iresult (infer-proj-source i.args.e expected env state context)
8139+ ?: ?=(%| -.value) value
8140+ =/ shape=(unit [source=iwfields target=iwfields])
8141+ (width-proj-shape typ.p.value expected sub.state.p.value)
8142+ ?~ shape [%| ["proj needs a known record containing its expected fields" ~]]
8143+ =/ project=(unit iwidth-result) (width-project u.shape sub.state.p.value next.state.p.value)
8144+ ?~ project [%| ["proj constraint needs unsupported inference" ~]]
8145+ =/ st=istate state.p.value(sub sub.u.project, next next.u.project)
8146+ [%& expected st(projections [[at.e e typ.p.value expected steps.u.project] projections.st])]
8147+::
8148+++ infer-call-context-arg
8149+ |= [e=expr expected=itype env=ienv state=istate context=span]
8150+ ^- iresult
8151+ ?: ?=(%pair -.e) $(e (pair-as-cell e))
8152+ ?: ?=(%group -.e) $(e inner.e)
8153+ ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
8154+ ?: ?=(%trace -.e)
8155+ =/ traced=iresult (infer-fragment val.e env state)
8156+ ?: ?=(%| -.traced) traced
8157+ $(e then.e, state state.p.traced)
8158+ =/ target=itype (itype-walk expected sub.state)
8159+ |-
8160+ ?: ?=(%face -.target) $(target (itype-walk body.target sub.state))
8161+ ?: (explicit-proj-call e env state)
8162+ (infer-proj-context e expected env state context)
8163+ :: Only the source-proven one-layer cell is exposed. Each recursive
8164+ :: descent consumes one written tuple; named values use ordinary fit.
8165+ ?: &(?=(%jrec -.target) ?=(%lit -.e) =(%null form.lit.e))
8166+ ?: =(0 jrec-fuel.state) [%| ["recursive mold unfolding needs unsupported inference" ~]]
8167+ [%& target state(jrec-fuel (dec jrec-fuel.state))]
8168+ ?: &(?=(%jrec -.target) ?=(%tuple -.e))
8169+ ?: =(0 jrec-fuel.state) [%| ["recursive mold unfolding needs unsupported inference" ~]]
8170+ =. state state(jrec-fuel (dec jrec-fuel.state))
8171+ =/ shape=itype
8172+ [%cell [%face head.target [%atom aura.target]] [%face tail.target target]]
8173+ =/ value=iresult (infer-call-context-items items.e shape env state context)
8174+ ?: ?=(%| -.value) value
8175+ =/ fit=ifit (itype-fit typ.p.value shape sub.state.p.value next.state.p.value)
8176+ ?: ?=(%unknown -.fit) [%| ["recursive mold cell constraint needs unsupported inference" ~]]
8177+ ?: ?=(%bad -.fit) [%| ["recursive mold cell does not fit its source shape" ~]]
8178+ [%& target state.p.value(sub sub.fit, next next.fit)]
8179+ ?: ?=(%call -.e) (infer-contextual-call e target env state)
8180+ ?: (single-structured-pattern e)
8181+ (infer-single-case-branch e env state `[target context])
8182+ ?: (cell-binder-pattern e)
8183+ (infer-cell-branch e env state `[target context])
8184+ :: In a loobean-singleton context retain the written loobean noun;
8185+ :: the usual final fit decides whether that value is permitted.
8186+ =/ singleton=(unit itype)
8187+ ?. ?=(%lit -.e) ~
8188+ ?. =(%loobean form.lit.e) ~
8189+ ?. ?=(%const -.target) ~
8190+ ?. =(%loobean form.literal.target) ~
8191+ `[%const lit.e]
8192+ ?^ singleton [%& u.singleton state]
8193+ =/ known=(unit iresult)
8194+ ?: ?=(%branch -.e) (known-union-subject subject.e env state)
8195+ ~
8196+ ?: &(?=(^ known) ?=(%| -.u.known) !(duplicate-loobean-arms e)) u.known
8197+ ?: &(?=(^ known) ?=(%& -.u.known) ?=(~ (unit-union-payload (itype-normalize typ.p.u.known sub.state.p.u.known))))
8198+ (infer-known-union-context-subject e target env u.known context)
8199+ ?: &(?=(%union -.target) ?=(%unit -.e))
8200+ (infer-unit-context e target env state context)
8201+ ?: &(?=(%flag -.target) (context-union-branch e))
8202+ (infer-union-context e target env state context)
8203+ ?: &(?=(%union -.target) (context-union-branch e))
8204+ (infer-union-context e target env state context)
8205+ ?: &(?=(%collection -.target) =(%list name.target) (context-union-branch e))
8206+ (infer-union-context e target env state context)
8207+ ?: &(?=(%collection -.target) =(%list name.target) (context-list-expression e))
8208+ (infer-list-context e target env state context)
8209+ ?: &(?=(%cell -.target) ?=(%tuple -.e))
8210+ (infer-call-context-items items.e target env state context)
8211+ (infer-fragment e env state)
8212+::
8213+:: Preserve each written face; the final complete sample fit checks faces.
8214+:: A tuple or positional field face belongs to the enclosing sample,
8215+:: not to the expression at that position. A second face, if present,
8216+:: is part of the value's own expected type.
8217+++ projection-field-target
8218+ |= expected=itype
8219+ ^- itype
8220+ ?:(?=(%face -.expected) body.expected expected)
8221+::
8222+++ infer-call-context-items
8223+ |= [items=(list item) expected=itype env=ienv state=istate context=span]
8224+ ^- iresult
8225+ ?~ items [%| ["empty cell is not supported by partial inference" ~]]
8226+ ?~ t.items
8227+ =/ last=iresult (infer-call-context-arg val.i.items (projection-field-target expected) env state context)
8228+ ?: ?=(%| -.last) last
8229+ =/ typ=itype typ.p.last
8230+ =. typ ?~(face.i.items typ [%face u.face.i.items typ])
8231+ [%& typ state.p.last]
8232+ =/ target=itype (itype-walk expected sub.state)
8233+ |-
8234+ ?: ?=(%face -.target) $(target (itype-walk body.target sub.state))
8235+ ?. ?=(%cell -.target) (infer-simple-items items env state)
8236+ =/ head=iresult (infer-call-context-arg val.i.items (projection-field-target hed.target) env state context)
8237+ ?: ?=(%| -.head) head
8238+ =/ typ=itype typ.p.head
8239+ =. typ ?~(face.i.items typ [%face u.face.i.items typ])
8240+ =/ tail=iresult (infer-call-context-items t.items tal.target env state.p.head context)
8241+ ?: ?=(%| -.tail) tail
8242+ [%& [%cell typ typ.p.tail] state.p.tail]
8243+::
8244+++ infer-call-context-args
8245+ |= [args=(list expr) expected=itype env=ienv state=istate context=span]
8246+ ^- iresult
8247+ ?~ args [%| ["call has no argument" ~]]
8248+ ?~ t.args (infer-call-context-arg i.args (projection-field-target expected) env state context)
8249+ =/ target=itype (itype-walk expected sub.state)
8250+ |-
8251+ ?: ?=(%face -.target) $(target (itype-walk body.target sub.state))
8252+ ?. ?=(%cell -.target)
8253+ (infer-simple-items (turn args |=(a=expr [(span-of a) ~ a])) env state)
8254+ =/ head=iresult (infer-call-context-arg i.args (projection-field-target hed.target) env state context)
8255+ ?: ?=(%| -.head) head
8256+ =/ tail=iresult (infer-call-context-args t.args tal.target env state.p.head context)
8257+ ?: ?=(%| -.tail) tail
8258+ [%& [%cell typ.p.head typ.p.tail] state.p.tail]
8259+::
8260+:: Tuple and record expressions preserve their explicitly written faces.
8261+::
8262+++ infer-simple-items
8263+ |= [items=(list item) env=ienv state=istate]
8264+ ^- iresult
6522 ?~ items [%| ["empty cell is not supported by partial inference" ~]]
8265 ?~ items [%| ["empty cell is not supported by partial inference" ~]]
6523 =/ head=iresult (infer-fragment val.i.items env state)
8266 =/ head=iresult (infer-fragment val.i.items env state)
6524 ?: ?=(%| -.head) head
8267 ?: ?=(%| -.head) head
@@ -6529,11 +8272,55 @@
6529 ?: ?=(%| -.tail) tail
8272 ?: ?=(%| -.tail) tail
6530 [%& [%cell ht typ.p.tail] state.p.tail]
8273 [%& [%cell ht typ.p.tail] state.p.tail]
6531::
8274::
6532−:: A single two-binder cell pattern covers every value of a cell type.
8275+:: A single all-binder cell pattern covers a known cell spine; the final
6533−:: No other pattern matrix is implemented here.
8276+:: binder captures the remaining noun. Other pattern matrices stay partial.
8277+::
8278+:: Validate binders before reading the subject, preserving shadow-error
8279+:: precedence. The last binder receives the entire remaining tail.
8280+++ cell-pattern-names
8281+ |= [pats=(list pattern) env=ienv globals=(list term) seen=(list term)]
8282+ ^- (each (list term) @t)
8283+ ?~ pats [%& ~]
8284+ ?. ?=(%bind -.i.pats) [%| 'branch pattern is not supported by partial inference']
8285+ =/ name=term name.i.pats
8286+ ?: |(=(name %proj) ?=(^ (ienv-lookup name env)) (lien globals |=(n=term =(n name))) (lien seen |=(n=term =(n name))))
8287+ [%| 'pattern shadows a name']
8288+ =/ rest=(each (list term) @t) $(pats t.pats, seen [name seen])
8289+ ?: ?=(%| -.rest) rest
8290+ [%& [name p.rest]]
8291+::
8292+++ cell-pattern-types
8293+ |= [names=(list term) env=ienv next=@ud]
8294+ ^- [typ=itype env=ienv next=@ud]
8295+ ?~ names !!
8296+ =/ head=itype [%var next]
8297+ =/ scope=ienv [[i.names [head ~]] env]
8298+ ?~ t.names [head scope +(next)]
8299+ =/ tail=[typ=itype env=ienv next=@ud] $(names t.names, env scope, next +(next))
8300+ [[%cell head typ.tail] env.tail next.tail]
8301+::
8302+:: At every position that must be a cell, opaque or sum types may still
8303+:: contain cells. Do not report a definite mismatch without unfolding them.
8304+++ cell-pattern-spine-unknown
8305+ |= [typ=itype names=(list term) sub=isub]
8306+ ^- ?
8307+ ?~ names |
8308+ ?~ t.names |
8309+ =. typ (itype-walk typ sub)
8310+ ?: ?=(%cell -.typ) $(typ tal.typ, names t.names)
8311+ |(?=(%union -.typ) ?=(%collection -.typ) ?=(%recursive -.typ) ?=(%jrec -.typ) ?=(%noun -.typ) ?=(%fn -.typ) ?=(%tag -.typ))
8312+::
8313+++ cell-binder-pattern
8314+ |= e=expr
8315+ ^- ?
8316+ ?. ?=(%branch -.e) |
8317+ ?~ arms.e |
8318+ ?^ t.arms.e |
8319+ ?. ?=(%cell -.pat.i.arms.e) |
8320+ !(single-structured-pattern e)
6534::
8321::
6535++ infer-cell-branch
8322++ infer-cell-branch
6536− |= [e=expr env=ienv state=istate]
8323+ |= [e=expr env=ienv state=istate expected=(unit [typ=itype context=span])]
6537 ^- iresult
8324 ^- iresult
6538 ?> ?=(%branch -.e)
8325 ?> ?=(%branch -.e)
6539 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
8326 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
@@ -6542,25 +8329,31 @@
6542 =/ pats=(list pattern) items.pat.arm
8329 =/ pats=(list pattern) items.pat.arm
6543 ?~ pats [%| ["branch pattern is not supported by partial inference" ~]]
8330 ?~ pats [%| ["branch pattern is not supported by partial inference" ~]]
6544 ?~ t.pats [%| ["branch pattern is not supported by partial inference" ~]]
8331 ?~ t.pats [%| ["branch pattern is not supported by partial inference" ~]]
6545− ?^ t.t.pats [%| ["branch pattern is not supported by partial inference" ~]]
8332+ =/ names=(each (list term) @t) (cell-pattern-names pats env globals.state ~)
6546− ?. ?=(%bind -.i.pats) [%| ["branch pattern is not supported by partial inference" ~]]
8333+ ?: ?=(%| -.names) [%| [(trip p.names) ~]]
6547− ?. ?=(%bind -.i.t.pats) [%| ["branch pattern is not supported by partial inference" ~]]
6548− =/ one=term name.i.pats
6549− =/ two=term name.i.t.pats
6550− ?: |(=(one two) ?=(^ (ienv-lookup one env)) ?=(^ (ienv-lookup two env)) (lien globals.state |=(x=term |(=(x one) =(x two)))))
6551− [%| ["pattern shadows a name" ~]]
6552 =/ subject=iresult (infer-fragment subject.e env state)
8334 =/ subject=iresult (infer-fragment subject.e env state)
6553 ?: ?=(%| -.subject) subject
8335 ?: ?=(%| -.subject) subject
6554 =/ st=istate state.p.subject
8336 =/ st=istate state.p.subject
6555− ?: (itype-has-recursive (itype-normalize typ.p.subject sub.st))
8337+ =/ subject-type=itype (itype-normalize typ.p.subject sub.st)
8338+ ?: (itype-has-recursive subject-type)
6556 [%| ["recursive pattern is not supported by partial inference" ~]]
8339 [%| ["recursive pattern is not supported by partial inference" ~]]
6557 ?: (itype-has-face typ.p.subject sub.st)
8340 ?: (itype-has-face typ.p.subject sub.st)
6558 [%| ["record patterns are not supported by partial inference" ~]]
8341 [%| ["record patterns are not supported by partial inference" ~]]
6559− =/ head=itype [%var next.st]
8342+ ?: (cell-pattern-spine-unknown subject-type p.names sub.st)
6560− =/ tail=itype [%var +(next.st)]
8343+ [%| ["cell pattern subject is not supported by partial inference" ~]]
8344+ =/ binders=[typ=itype env=ienv next=@ud] (cell-pattern-types p.names env next.st)
6561− =/ sub=(unit isub) (itype-unify typ.p.subject [%cell head tail] sub.st)
8345+ =/ sub=(unit isub) (itype-unify typ.p.subject typ.binders sub.st)
6562 ?~ sub [%| ["cell pattern does not match the subject type" ~]]
8346 ?~ sub [%| ["cell pattern does not match the subject type" ~]]
6563− (infer-fragment val.arm [[one [head ~]] [two [tail ~]] env] st(next (add 2 next.st), sub u.sub))
8347+ =. st st(next next.binders, sub u.sub)
8348+ ?~ expected (infer-fragment val.arm env.binders st)
8349+ =/ body=iresult (infer-call-context-arg val.arm typ.u.expected env.binders st context.u.expected)
8350+ ?: ?=(%| -.body) body
8351+ =/ fit=ifit (itype-fit typ.p.body typ.u.expected sub.state.p.body next.state.p.body)
8352+ ?: ?=(%unknown -.fit) [%| ["cell branch result constraint is not supported by partial inference" ~]]
8353+ ?: ?=(%bad -.fit) [%| ["cell branch arm does not fit its expected type" ~[[context.u.expected "expected type"] [(span-of val.arm) "branch arm"]]]]
8354+ ?: (itype-has-tag (itype-normalize typ.u.expected sub.fit))
8355+ [%| ["cell branch result needs context in partial inference" ~]]
8356+ [%& typ.u.expected state.p.body(sub sub.fit, next next.fit)]
6564::
8357::
6565++ show-itype
8358++ show-itype
6566 |= [t=itype sub=isub]
8359 |= [t=itype sub=isub]
@@ -6579,6 +8372,7 @@
6579 %atom "@{(trip aura.t)}"
8372 %atom "@{(trip aura.t)}"
6580 %any-atom "@"
8373 %any-atom "@"
6581 %flag "?"
8374 %flag "?"
8375+ %noun "*"
6582 %tag (trip txt.literal.t)
8376 %tag (trip txt.literal.t)
6583 %const (trip txt.literal.t)
8377 %const (trip txt.literal.t)
6584 %union
8378 %union
@@ -6586,6 +8380,7 @@
6586 ?~ args.t (trip u.label.t)
8380 ?~ args.t (trip u.label.t)
6587 "({(trip u.label.t)} {(show-itype-cases args.t sub)})"
8381 "({(trip u.label.t)} {(show-itype-cases args.t sub)})"
6588 %recursive ?~(label.t "recursive mold" (trip u.label.t))
8382 %recursive ?~(label.t "recursive mold" (trip u.label.t))
8383+ %jrec ?~(label.t "recursive mold" (trip u.label.t))
6589 %collection "({(trip name.t)} {(show-itype-cases args.t sub)})"
8384 %collection "({(trip name.t)} {(show-itype-cases args.t sub)})"
6590 %face "[{(trip name.t)}={(show-itype-context body.t sub)}]"
8385 %face "[{(trip name.t)}={(show-itype-context body.t sub)}]"
6591 %fn "$-({(show-itype-context sample.t sub)} {(show-itype-context product.t sub)})"
8386 %fn "$-({(show-itype-context sample.t sub)} {(show-itype-context product.t sub)})"
@@ -6626,10 +8421,12 @@
6626 %atom |
8421 %atom |
6627 %any-atom |
8422 %any-atom |
6628 %flag |
8423 %flag |
8424+ %noun |
6629 %tag |
8425 %tag |
6630 %const |
8426 %const |
6631 %union |((lien cases.typ |=(c=itype (itype-has-nvar c))) (lien args.typ |=(c=itype (itype-has-nvar c))))
8427 %union |((lien cases.typ |=(c=itype (itype-has-nvar c))) (lien args.typ |=(c=itype (itype-has-nvar c))))
6632 %recursive |
8428 %recursive |
8429+ %jrec |
6633 %collection (lien args.typ |=(c=itype (itype-has-nvar c)))
8430 %collection (lien args.typ |=(c=itype (itype-has-nvar c)))
6634 %face $(typ body.typ)
8431 %face $(typ body.typ)
6635 %fn |($(typ sample.typ) $(typ product.typ))
8432 %fn |($(typ sample.typ) $(typ product.typ))
@@ -6650,8 +8447,8 @@
6650:: A capital in a written mold is generalized with its enclosing ++.
8447:: A capital in a written mold is generalized with its enclosing ++.
6651:: Atom constraints may remain generic; until full rigidity checking
8448:: Atom constraints may remain generic; until full rigidity checking
6652:: is implemented, do not report a type if one became more specific.
8449:: is implemented, do not report a type if one became more specific.
6653−:: Whether distinct written capitals may become equal is a doc question;
8450+:: Distinct written capitals cannot be forced equal; use the same
6654−:: the partial checker leaves such inference unsupported for now.
8451+:: capital where a type must be shared (Decisions 2026-10-30).
6655::
8452::
6656++ cap-id-in
8453++ cap-id-in
6657 |= [n=@ud caps=icaps sub=isub]
8454 |= [n=@ud caps=icaps sub=isub]
@@ -6667,6 +8464,35 @@
6667 ?: =(n u.ident) &
8464 ?: =(n u.ident) &
6668 $(caps t.caps)
8465 $(caps t.caps)
6669::
8466::
8467+++ cap-with-id
8468+ |= [n=@ud caps=icaps sub=isub]
8469+ ^- (unit icap)
8470+ ?~ caps ~
8471+ =/ resolved=itype (itype-walk [%var id.i.caps] sub)
8472+ =/ ident=(unit @ud)
8473+ ?+ -.resolved ~
8474+ %var `id.resolved
8475+ %avar `id.resolved
8476+ ==
8477+ ?~ ident $(caps t.caps)
8478+ ?: =(n u.ident) `i.caps
8479+ $(caps t.caps)
8480+::
8481+++ merged-capitals
8482+ |= [caps=icaps sub=isub]
8483+ ^- (unit [first=icap second=icap])
8484+ ?~ caps ~
8485+ =/ resolved=itype (itype-walk [%var id.i.caps] sub)
8486+ =/ ident=(unit @ud)
8487+ ?+ -.resolved ~
8488+ %var `id.resolved
8489+ %avar `id.resolved
8490+ ==
8491+ ?~ ident $(caps t.caps)
8492+ =/ found=(unit icap) (cap-with-id u.ident t.caps sub)
8493+ ?^ found `[u.found i.caps]
8494+ $(caps t.caps)
8495+::
6670++ constrained-capitals
8496++ constrained-capitals
6671 |= [caps=icaps sub=isub]
8497 |= [caps=icaps sub=isub]
6672 ^- ?
8498 ^- ?
@@ -6705,10 +8531,12 @@
6705 %atom |
8531 %atom |
6706 %any-atom |
8532 %any-atom |
6707 %flag |
8533 %flag |
8534+ %noun |
6708 %tag |
8535 %tag |
6709 %const |
8536 %const |
6710 %union |((lien cases.t |=(c=itype (has-atom-var n c))) (lien args.t |=(c=itype (has-atom-var n c))))
8537 %union |((lien cases.t |=(c=itype (has-atom-var n c))) (lien args.t |=(c=itype (has-atom-var n c))))
6711 %recursive |
8538 %recursive |
8539+ %jrec |
6712 %collection (lien args.t |=(c=itype (has-atom-var n c)))
8540 %collection (lien args.t |=(c=itype (has-atom-var n c)))
6713 %face $(t body.t)
8541 %face $(t body.t)
6714 %fn |($(t sample.t) $(t product.t))
8542 %fn |($(t sample.t) $(t product.t))
@@ -6756,9 +8584,9 @@
6756::
8584::
6757:: Build the supported part of the value environment in dependency order.
8585:: Build the supported part of the value environment in dependency order.
6758:: Each pass adds successful definitions. Forward references become
8586:: Each pass adds successful definitions. Forward references become
6759−:: available on a later pass; recursive groups and unsupported syntax do
8587+:: available on a later pass; unsupported syntax does not enter the
6760−:: not enter the environment. Generalized definitions are closed, so a
8588+:: environment. Generalized definitions are closed, so a use instantiates
6761−:: use instantiates its variables afresh.
8589+:: its variables afresh.
6762::
8590::
6763++ global-value-names
8591++ global-value-names
6764 |= ds=(list def)
8592 |= ds=(list def)
@@ -6776,33 +8604,617 @@
6776 ?~ t.hits &
8604 ?~ t.hits &
6777 |
8605 |
6778::
8606::
6779−++ add-supported-defs
8607+:: A top-level gate may refer to itself through one monomorphic placeholder.
6780− |= [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)]
8608+:: Its declared sample is inferred first and preserves its field faces.
8609+:: Unify the completed body with that placeholder before generalization;
8610+:: reporting repeats the same check instead of instantiating the gate's
8611+:: generalized interface inside its own body. Mutual groups stay unsupported.
8612+::
8613+++ direct-self-call
8614+ |= [e=expr name=term]
8615+ ^- ?
8616+ ?: ?=(%group -.e) $(e inner.e)
8617+ ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
8618+ ?. ?=(%call -.e) |
8619+ ?. ?=(%wing -.head.e) |
8620+ =(names.head.e ~[name])
8621+::
8622+++ branch-base-arm
8623+ |= [e=expr name=term]
8624+ ^- (unit expr)
8625+ ?: ?=(%group -.e) $(e inner.e)
8626+ ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
8627+ ?. ?=(%branch -.e) ~
8628+ ?~ arms.e ~
8629+ ?~ t.arms.e ~
8630+ ?^ t.t.arms.e ~
8631+ =/ x=arm i.arms.e
8632+ =/ y=arm i.t.arms.e
8633+ ?. &(?=(%lit -.pat.x) ?=(%lit -.pat.y)) ~
8634+ ?. &(=(%loobean form.lit.pat.x) =(%loobean form.lit.pat.y)) ~
8635+ ?: =(val.lit.pat.x val.lit.pat.y) ~
8636+ =/ first=? (direct-self-call val.x name)
8637+ =/ second=? (direct-self-call val.y name)
8638+ ?: =(first second) ~
8639+ `?:(first val.y val.x)
8640+::
8641+:: Infer the base arm independently, with the self binding removed. Only
8642+:: a closed type whose constraints resolved can seed the recursive result.
8643+:: The regular body inference then checks both arms with shared state.
8644+::
8645+++ recursive-branch-seed
8646+ |= [d=def env=ienv state=istate]
8647+ ^- (unit itype)
8648+ ?. ?=(%value -.d) ~
8649+ ?. |(?=(%gate -.val.d) ?=(%gate-wide -.val.d)) ~
8650+ =/ gate=expr val.d
8651+ =/ body=expr
8652+ ?- -.gate
8653+ %gate body.gate
8654+ %gate-wide body.gate
8655+ * !!
8656+ ==
8657+ =/ base=(unit expr) (branch-base-arm body name.d)
8658+ ?~ base ~
8659+ =/ outer=ienv (skim env |=(entry=[name=term scheme=ischeme] !=(name.entry name.d)))
8660+ =/ sam=isample-result
8661+ ?- -.gate
8662+ %gate (infer-sample sample.gate outer state)
8663+ %gate-wide (infer-sample sample.gate outer state)
8664+ * !!
8665+ ==
8666+ ?: ?=(%| -.sam) ~
8667+ =/ inferred=iresult (infer-fragment u.base env.p.sam state.p.sam)
8668+ ?: ?=(%| -.inferred) ~
8669+ ?: (pending-tags tags.state.p.inferred sub.state.p.inferred) ~
8670+ ?: (constrained-capitals caps.state.p.inferred sub.state.p.inferred) ~
8671+ =/ typ=itype (itype-normalize typ.p.inferred sub.state.p.inferred)
8672+ ?: ?=(^ (itype-vars typ)) ~
8673+ ?: (itype-has-tag typ) ~
8674+ `typ
8675+::
8676+++ infer-recursive-gate
8677+ |= [d=def env=ienv state=istate]
8678+ ^- iresult
8679+ ?. ?=(%value -.d) [%| ["recursive definition is not a gate" ~]]
8680+ ?. |(?=(%gate -.val.d) ?=(%gate-wide -.val.d))
8681+ [%| ["recursive definition is not a gate" ~]]
8682+ =/ result=(unit itype) (recursive-branch-seed d env state)
8683+ =/ gate=expr val.d
8684+ =/ sam=isample-result
8685+ ?- -.gate
8686+ %gate (infer-sample sample.gate env state)
8687+ %gate-wide (infer-sample sample.gate env state)
8688+ * !!
8689+ ==
8690+ ?: ?=(%| -.sam)
8691+ =/ diag=(unit idiag)
8692+ ?- -.gate
8693+ %gate (sample-import-invalid sample.gate env state)
8694+ %gate-wide (sample-import-invalid sample.gate env state)
8695+ * ~
8696+ ==
8697+ ?: &(=(p.sam "sample mold is not supported by partial inference") ?=(^ diag)) [%| u.diag]
8698+ [%| [p.sam ~]]
8699+ =/ id=@ud next.state.p.sam
8700+ =/ product=itype ?~(result [%var id] u.result)
8701+ =/ st=istate state.p.sam(next +(id))
8702+ =/ seed=itype [%fn typ.p.sam product]
8703+ =/ seeded=ienv [[name.d [seed ~]] env.p.sam]
8704+ =/ body=expr
8705+ ?- -.gate
8706+ %gate body.gate
8707+ %gate-wide body.gate
8708+ * !!
8709+ ==
8710+ =/ out=iresult (infer-fragment body seeded st)
8711+ ?: ?=(%| -.out) out
8712+ =/ uni=(unit isub) (itype-unify product typ.p.out sub.state.p.out)
8713+ ?~ uni [%| ["recursive gate constraint is not supported by partial inference" ~]]
8714+ [%& [%fn typ.p.sam typ.p.out] state.p.out(sub u.uni)]
8715+::
8716+++ dependency-root
8717+ |= names=(list term)
8718+ ^- (list term)
8719+ ?~ names ~
8720+ ~[(rear names)]
8721+::
8722+++ dependency-exprs
8723+ |= xs=(list expr)
8724+ ^- (list term)
8725+ ?~ xs ~
8726+ =/ first=(list term) (dependency-expr i.xs)
8727+ (weld first $(xs t.xs))
8728+::
8729+++ dependency-pieces
8730+ |= xs=(list piece)
8731+ ^- (list term)
8732+ ?~ xs ~
8733+ =/ first=(list term)
8734+ ?- -.i.xs
8735+ %expr (dependency-expr p.i.xs)
8736+ %text ~
8737+ ==
8738+ (weld first $(xs t.xs))
8739+::
8740+++ dependency-qsegs
8741+ |= xs=(list qseg)
8742+ ^- (list term)
8743+ ?~ xs ~
8744+ =/ first=(list term)
8745+ ?- -.i.xs
8746+ %expr (dependency-expr p.i.xs)
8747+ %knot ~
8748+ ==
8749+ (weld first $(xs t.xs))
8750+::
8751+++ dependency-items
8752+ |= xs=(list item)
8753+ ^- (list term)
8754+ ?~ xs ~
8755+ =/ first=(list term) (dependency-expr val.i.xs)
8756+ (weld first $(xs t.xs))
8757+::
8758+++ dependency-edits
8759+ |= xs=(list edit)
8760+ ^- (list term)
8761+ ?~ xs ~
8762+ =/ first=(list term) (dependency-expr val.i.xs)
8763+ (weld first $(xs t.xs))
8764+::
8765+++ dependency-arms
8766+ |= xs=(list arm)
8767+ ^- (list term)
8768+ ?~ xs ~
8769+ =/ first=(list term) (dependency-expr val.i.xs)
8770+ (weld first $(xs t.xs))
8771+::
8772+++ dependency-defs
8773+ |= xs=(list def)
8774+ ^- (list term)
8775+ ?~ xs ~
8776+ =/ first=(list term)
8777+ ?: ?=(%value -.i.xs) (dependency-expr val.i.xs)
8778+ ~
8779+ (weld first $(xs t.xs))
8780+::
8781+++ dependency-expr
8782+ |= e=expr
8783+ ^- (list term)
8784+ ?- -.e
8785+ %str (dependency-pieces pieces.e)
8786+ %qath (dependency-qsegs segs.e)
8787+ %wing (dependency-root names.e)
8788+ %change
8789+ =/ first=(list term) (dependency-root target.e)
8790+ =/ last=(list term) (dependency-edits edits.e)
8791+ (weld first last)
8792+ %pair (dependency-expr val.e)
8793+ %unit (dependency-expr val.e)
8794+ %group (dependency-expr inner.e)
8795+ %list (dependency-exprs items.e)
8796+ %tuple (dependency-items items.e)
8797+ %gate (dependency-expr body.e)
8798+ %gate-wide (dependency-expr body.e)
8799+ %call
8800+ =/ first=(list term) (dependency-expr head.e)
8801+ =/ last=(list term) (dependency-exprs args.e)
8802+ (weld first last)
8803+ %cast (dependency-expr val.e)
8804+ %trace
8805+ =/ first=(list term) (dependency-expr val.e)
8806+ =/ last=(list term) (dependency-expr then.e)
8807+ (weld first last)
8808+ %branch
8809+ =/ first=(list term) (dependency-expr subject.e)
8810+ =/ last=(list term) (dependency-arms arms.e)
8811+ (weld first last)
8812+ %body
8813+ =/ first=(list term) (dependency-defs defs.e)
8814+ =/ last=(list term) (dependency-expr final.e)
8815+ (weld first last)
8816+ * ~
8817+ ==
8818+::
8819+:: Infer a cyclic component with one monomorphic seed per gate. All members
8820+:: must succeed before any scheme is available; pending constraints and
8821+:: unresolved branch joins remain partial.
8822++$ igate-entry [name=term typ=itype body=expr env=ienv caps=icaps]
8823++$ igate-seeds (each [entries=(list igate-entry) state=istate] idiag)
8824+++ seed-gate-group
8825+ |= [ds=(list def) env=ienv state=istate]
8826+ ^- igate-seeds
8827+ ?~ ds [%& [~ state]]
8828+ =/ d=def i.ds
8829+ ?. ?=(%value -.d) [%| ["recursive group contains a non-gate" ~]]
8830+ =/ gate=expr val.d
8831+ ?. |(?=(%gate -.gate) ?=(%gate-wide -.gate))
8832+ [%| ["recursive group contains a non-gate" ~]]
8833+ =/ initial=istate (reserve-def-caps gate state)
8834+ =/ sam=isample-result
8835+ ?- -.gate
8836+ %gate (infer-sample sample.gate env initial)
8837+ %gate-wide (infer-sample sample.gate env initial)
8838+ * !!
8839+ ==
8840+ ?: ?=(%| -.sam) [%| [p.sam ~]]
8841+ =/ body=expr
8842+ ?- -.gate
8843+ %gate body.gate
8844+ %gate-wide body.gate
8845+ * !!
8846+ ==
8847+ =/ seed=itype [%fn typ.p.sam [%var next.state.p.sam]]
8848+ =/ entry=igate-entry [name.d seed body env.p.sam caps.state.p.sam]
8849+ =/ after=istate state.p.sam(next +(next.state.p.sam), caps caps.state)
8850+ =/ rest=igate-seeds $(ds t.ds, state after)
8851+ ?: ?=(%| -.rest) rest
8852+ [%& [[entry entries.p.rest] state.p.rest]]
8853+::
8854+++ group-seed-env
8855+ |= [entries=(list igate-entry) env=ienv]
6781 ^- ienv
8856 ^- ienv
6782− ?~ ds env
8857+ ?~ entries env
8858+ [[name.i.entries [typ.i.entries ~]] $(entries t.entries)]
8859+::
8860+++ infer-gate-group-bodies
8861+ |= [entries=(list igate-entry) seeds=ienv state=istate]
8862+ ^- igate-seeds
8863+ ?~ entries [%& [~ state]]
8864+ =/ entry=igate-entry i.entries
8865+ ?> ?=(%fn -.typ.entry)
8866+ =/ scope=ienv (weld seeds env.entry)
8867+ =/ out=iresult (infer-fragment body.entry scope state(caps caps.entry))
8868+ ?: ?=(%| -.out) out
8869+ =/ uni=(unit isub) (itype-unify product.typ.entry typ.p.out sub.state.p.out)
8870+ ?~ uni [%| ["recursive group constraint is not supported by partial inference" ~]]
8871+ =. caps.entry caps.state.p.out
8872+ =/ after=istate state.p.out(sub u.uni, caps caps.state)
8873+ =/ rest=igate-seeds $(entries t.entries, state after)
8874+ ?: ?=(%| -.rest) rest
8875+ [%& [[entry entries.p.rest] state.p.rest]]
8876+::
8877+++ group-schemes
8878+ |= [entries=(list igate-entry) env=ienv outer=istate state=istate]
8879+ ^- (each ienv idiag)
8880+ ?~ entries [%& ~]
8881+ =/ entry=igate-entry i.entries
8882+ =/ merged=(unit [first=icap second=icap]) (merged-capitals caps.entry sub.state)
8883+ ?^ merged
8884+ [%| ["distinct type variables must not be forced equal" ~[[at.first.u.merged "first type variable"] [at.second.u.merged "second type variable"]]]]
8885+ ?: (constrained-capitals caps.entry sub.state)
8886+ [%| ["explicit capital constraints are not supported by partial inference" ~]]
8887+ =/ typ=itype (itype-normalize typ.entry sub.state)
8888+ ?: |((itype-has-tag typ) (itype-has-hidden-generic typ) (itype-has-hidden-recursive typ) (unsupported-atom-vars typ caps.entry binders.state sub.state))
8889+ [%| ["recursive group needs unsupported inference" ~]]
8890+ =/ free=(list @ud) (weld (free-env-vars env sub.state) (free-cap-vars caps.outer sub.state))
8891+ =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
8892+ =. vars (skim vars |=(n=@ud !(lien free |=(f=@ud =(f n)))))
8893+ ?: (gth (lent vars) 26) [%| ["recursive group needs too many type variables" ~]]
8894+ =/ rest=(each ienv idiag) $(entries t.entries)
8895+ ?: ?=(%| -.rest) rest
8896+ [%& [[name.entry [typ vars]] p.rest]]
8897+::
8898+++ infer-gate-group
8899+ |= [ds=(list def) env=ienv state=istate]
8900+ ^- ilocal-result
8901+ =/ names=(list term) (global-value-names ds)
8902+ ?. (levy names |=(n=term (unique-value-name n names)))
8903+ [%| ["recursive group contains duplicate names" ~]]
8904+ ?: (lien names |=(n=term ?=(^ (ienv-lookup n env))))
8905+ [%| ["recursive group shadows a name" ~]]
8906+ =/ scoped=istate state(globals (weld names globals.state))
8907+ =/ seeded=igate-seeds (seed-gate-group ds env scoped)
8908+ ?: ?=(%| -.seeded) seeded
8909+ =/ seeds=ienv (group-seed-env entries.p.seeded ~)
8910+ =/ body=igate-seeds (infer-gate-group-bodies entries.p.seeded seeds state.p.seeded)
8911+ ?: ?=(%| -.body) body
8912+ :: Per-member ownership through mutual recursion is not implemented.
8913+ ?: !=(projections.state.p.body projections.state)
8914+ [%| ["record projection in recursive groups needs unsupported inference" ~]]
8915+ ?: !=(holes.state.p.body holes.state)
8916+ [%| ["holes in recursive groups need unsupported inference" ~]]
8917+ ?: (pending-tags tags.state.p.body sub.state.p.body)
8918+ [%| ["recursive group has unresolved literal constraints" ~]]
8919+ =/ schemes=(each ienv idiag) (group-schemes entries.p.body env state state.p.body)
8920+ ?: ?=(%| -.schemes) schemes
8921+ [%& [(weld p.schemes env) state.p.body(globals globals.state)]]
8922+::
8923+++ width-finalize
8924+ |= [ps=(list iwprojection) sub=isub visible=(list @ud)]
8925+ ^- (unit (list iwprojection))
8926+ ?~ ps `~
8927+ ?: (lien t.ps |=(p=iwprojection =(at.p at.i.ps))) ~
8928+ =/ src=itype (default-decimals (itype-normalize source.i.ps sub))
8929+ =/ dst=itype (default-decimals (itype-normalize target.i.ps sub))
8930+ ?: |((itype-has-nvar src) (itype-has-nvar dst) (itype-has-tag src) (itype-has-tag dst)) ~
8931+ =/ vars=(list @ud) (weld (itype-vars src) (itype-vars dst))
8932+ ?. (levy vars |=(n=@ud (lien visible |=(v=@ud =(n v))))) ~
8933+ =/ rest=(unit (list iwprojection)) $(ps t.ps)
8934+ ?~ rest ~
8935+ =/ entry=iwprojection i.ps
8936+ =. entry entry(source src, target dst)
8937+ `[entry u.rest]
8938+::
8939+++ add-supported-defs
8940+ |= [ds=(list def) env=ienv molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) at=path prelude=(unit ifile) artifacts=(list iwidth-definition)]
8941+ ^- [env=ienv artifacts=(list iwidth-definition)]
8942+ ?~ ds [env artifacts]
6783 =/ d=def i.ds
8943 =/ d=def i.ds
6784 ?: ?=(%mold -.d) $(ds t.ds)
8944 ?: ?=(%mold -.d) $(ds t.ds)
6785 ?. (unique-value-name name.d globals) $(ds t.ds)
8945 ?. (unique-value-name name.d globals) $(ds t.ds)
6786 ?^ (ienv-lookup name.d env) $(ds t.ds)
8946 ?^ (ienv-lookup name.d env) $(ds t.ds)
6787 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
8947 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
6788− =/ result=iresult (infer-fragment val.d env [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude])
8948+ =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude ~ 256 ~]
8949+ =. initial (reserve-def-caps val.d initial)
8950+ =/ result=iresult (infer-fragment val.d env initial)
8951+ =? result ?=(%| -.result) (infer-recursive-gate d env initial)
6789 ?: ?=(%| -.result) $(ds t.ds)
8952 ?: ?=(%| -.result) $(ds t.ds)
8953+ =. state.p.result (default-hole-numbers holes.state.p.result holes.initial state.p.result env !(itype-has-gate (itype-normalize typ.p.result sub.state.p.result)))
8954+ ?^ (unresolved-hole holes.state.p.result holes.initial state.p.result) $(ds t.ds)
6790 ?: (constrained-capitals caps.state.p.result sub.state.p.result) $(ds t.ds)
8955 ?: (constrained-capitals caps.state.p.result sub.state.p.result) $(ds t.ds)
6791 =/ typ=itype (default-decimals (itype-normalize typ.p.result sub.state.p.result))
8956 =/ typ=itype (default-decimals (itype-normalize typ.p.result sub.state.p.result))
6792 ?: |((pending-tags tags.state.p.result sub.state.p.result) (itype-has-tag typ)) $(ds t.ds)
8957 ?: |((pending-tags tags.state.p.result sub.state.p.result) (itype-has-tag typ)) $(ds t.ds)
6793 ?: (unsupported-atom-vars typ caps.state.p.result binders.state.p.result sub.state.p.result) $(ds t.ds)
8958 ?: (unsupported-atom-vars typ caps.state.p.result binders.state.p.result sub.state.p.result) $(ds t.ds)
6794 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
8959 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
6795 ?: (gth (lent vars) 26) $(ds t.ds)
8960 ?: (gth (lent vars) 26) $(ds t.ds)
8961+ =/ finalized=(unit (list iwprojection))
8962+ (width-finalize projections.state.p.result sub.state.p.result vars)
8963+ ?~ finalized $(ds t.ds)
8964+ =? artifacts ?=(^ u.finalized)
8965+ [[name.d val.d typ sub.state.p.result (flop u.finalized)] artifacts]
6796 $(ds t.ds, env [[name.d [typ vars]] env])
8966 $(ds t.ds, env [[name.d [typ vars]] env])
6797::
8967::
8968++$ iresolved [env=ienv grouped=(list term) artifacts=(list iwidth-definition)]
8969++$ iadj (map term (list term))
8970++$ ivisited (map term ?)
8971++$ iwork (list [name=term done=?])
8972++$ iwresult [seen=ivisited order=(list term)]
8973++$ icresult [seen=ivisited component=(list term)]
8974++$ icomponents (list (list term))
8975+++ graph-nameset
8976+ |= [names=(list term) seen=ivisited]
8977+ ^- ivisited
8978+ ?~ names seen
8979+ $(names t.names, seen (~(put by seen) i.names &))
8980+::
8981+++ graph-edges
8982+ |= [name=term graph=iadj]
8983+ ^- (list term)
8984+ =/ found=(unit (list term)) (~(get by graph) name)
8985+ ?~ found ~
8986+ u.found
8987+::
8988+++ graph-make-forward
8989+ |= [ds=(list def) names=ivisited graph=iadj]
8990+ ^- iadj
8991+ ?~ ds graph
8992+ ?. ?=(%value -.i.ds) $(ds t.ds)
8993+ =/ deps=(list term) (dependency-expr val.i.ds)
8994+ =. deps (skim deps |=(n=term ?=(^ (~(get by names) n))))
8995+ $(ds t.ds, graph (~(put by graph) name.i.ds deps))
8996+::
8997+++ graph-add-reverse
8998+ |= [name=term edges=(list term) reverse=iadj]
8999+ ^- iadj
9000+ ?~ edges reverse
9001+ =/ prior=(list term) (graph-edges i.edges reverse)
9002+ $(edges t.edges, reverse (~(put by reverse) i.edges [name prior]))
9003+::
9004+++ graph-reverse
9005+ |= [names=(list term) graph=iadj reverse=iadj]
9006+ ^- iadj
9007+ ?~ names reverse
9008+ =. reverse (graph-add-reverse i.names (graph-edges i.names graph) reverse)
9009+ $(names t.names)
9010+::
9011+++ graph-order
9012+ |= [todo=iwork seen=ivisited order=(list term) graph=iadj]
9013+ ^- iwresult
9014+ ?~ todo [seen order]
9015+ =/ event=[name=term done=?] i.todo
9016+ ?: done.event $(todo t.todo, order [name.event order])
9017+ ?: ?=(^ (~(get by seen) name.event)) $(todo t.todo)
9018+ =. seen (~(put by seen) name.event &)
9019+ =/ children=iwork (turn (graph-edges name.event graph) |=(n=term [n |]))
9020+ $(todo (weld children [[name.event &] t.todo]))
9021+::
9022+++ graph-collect
9023+ |= [todo=(list term) seen=ivisited component=(list term) graph=iadj]
9024+ ^- icresult
9025+ ?~ todo [seen component]
9026+ ?: ?=(^ (~(get by seen) i.todo)) $(todo t.todo)
9027+ =. seen (~(put by seen) i.todo &)
9028+ $(todo (weld (graph-edges i.todo graph) t.todo), component [i.todo component])
9029+::
9030+++ graph-collect-all
9031+ |= [order=(list term) seen=ivisited graph=iadj comps=icomponents]
9032+ ^- icomponents
9033+ ?~ order comps
9034+ ?: ?=(^ (~(get by seen) i.order)) $(order t.order)
9035+ =/ found=icresult (graph-collect ~[i.order] seen ~ graph)
9036+ $(order t.order, seen seen.found, comps [component.found comps])
9037+::
9038+:: Two depth-first passes find components before group inference. Maps
9039+:: preserve the graph identity; duplicate global names fail closed.
9040+++ graph-components
9041+ |= [ds=(list def) names=(list term)]
9042+ ^- icomponents
9043+ =/ nameset=ivisited ~
9044+ =/ pending=(list term) names
9045+ |-
9046+ ?^ pending
9047+ ?: ?=(^ (~(get by nameset) i.pending)) ~
9048+ $(pending t.pending, nameset (~(put by nameset) i.pending &))
9049+ =/ graph=iadj (graph-make-forward ds nameset ~)
9050+ =/ reverse=iadj (graph-reverse names graph ~)
9051+ =/ order=iwresult (graph-order (turn names |=(n=term [n |])) ~ ~ graph)
9052+ (graph-collect-all order.order ~ reverse ~)
9053+::
9054+++ graph-cycle
9055+ |= [component=(list term) graph=iadj]
9056+ ^- ?
9057+ ?~ component |
9058+ ?^ t.component &
9059+ (lien (graph-edges i.component graph) |=(x=term =(x i.component)))
9060+::
9061+++ add-groups
9062+ |= [ds=(list def) components=icomponents graph=iadj env=ienv grouped=(list term) artifacts=(list iwidth-definition) state=istate]
9063+ ^- iresolved
9064+ ?~ components [env grouped artifacts]
9065+ =/ component=(list term) i.components
9066+ ?. (graph-cycle component graph) $(components t.components)
9067+ ?: (lien component |=(n=term ?=(^ (ienv-lookup n env)))) $(components t.components)
9068+ =/ members=(list def)
9069+ %+ skim ds
9070+ |= d=def
9071+ &(?=(%value -.d) (lien component |=(n=term =(n name.d))))
9072+ ?. =((lent members) (lent component)) $(components t.components)
9073+ ?. (levy component |=(n=term (unique-value-name n globals.state))) $(components t.components)
9074+ =/ result=ilocal-result (infer-gate-group members env state)
9075+ ?: ?=(%| -.result) $(components t.components)
9076+ $(components t.components, env env.p.result, grouped (weld component grouped))
9077+::
9078+++ resolve-groups
9079+ |= [ds=(list def) molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) at=path prelude=(unit ifile)]
9080+ ^- iresolved
9081+ =/ env=ienv ~
9082+ =/ grouped=(list term) ~
9083+ =/ artifacts=(list iwidth-definition) ~
9084+ =/ names=(list term) (global-value-names ds)
9085+ =/ nameset=ivisited (graph-nameset names ~)
9086+ =/ graph=iadj (graph-make-forward ds nameset ~)
9087+ =/ components=icomponents (graph-components ds names)
9088+ =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
9089+ |-
9090+ =/ next=[env=ienv artifacts=(list iwidth-definition)]
9091+ (add-supported-defs ds env molds globals externals surs mark-externals marks jimports reserved-molds at prelude artifacts)
9092+ =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude ~ 256 ~]
9093+ =/ out=iresolved (add-groups ds components graph env.next grouped artifacts.next initial)
9094+ ?: =(env env.out) out
9095+ $(env env.out, grouped grouped.out, artifacts artifacts.out)
9096+::
6798++ resolve-supported-defs
9097++ resolve-supported-defs
6799 |= [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)]
9098 |= [ds=(list def) molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) at=path prelude=(unit ifile)]
6800 ^- ienv
9099 ^- ienv
6801− =/ env=ienv ~
9100+ env:(resolve-groups ds molds globals externals surs mark-externals marks jimports reserved-molds at prelude)
9101+::
9102+:: A diagnostic-only proof for a narrow syntactic value cycle. Every
9103+:: edge is an unqualified wing in a supported expression, and samples
9104+:: may not shadow global bindings. Unknown forms yield no conclusion.
9105++$ icyclesite [name=term at=span]
9106++$ icycle [name=term first=span next=span]
9107+++ cycle-sites-list
9108+ |= [xs=(list expr) globals=(list term) locals=(list term)]
9109+ ^- (unit (list icyclesite))
9110+ ?~ xs `~
9111+ =/ first=(unit (list icyclesite)) (cycle-sites i.xs globals locals)
9112+ ?~ first ~
9113+ =/ tail=(unit (list icyclesite)) $(xs t.xs)
9114+ ?~ tail ~
9115+ `(weld u.first u.tail)
9116+::
9117+++ cycle-sample-name
9118+ |= [sam=sample globals=(list term) locals=(list term)]
9119+ ^- (unit (unit term))
9120+ ?- -.sam
9121+ %bind
9122+ ?: (lien (weld globals locals) |=(n=term =(n name.sam))) ~
9123+ ``name.sam
9124+ %face
9125+ ?: (lien (weld globals locals) |=(n=term =(n name.sam))) ~
9126+ ``name.sam
9127+ %bare `~
9128+ * ~
9129+ ==
9130+::
9131+++ cycle-sites
9132+ |= [e=expr globals=(list term) locals=(list term)]
9133+ ^- (unit (list icyclesite))
9134+ ?- -.e
9135+ %wing
9136+ ?. ?=([@ ~] names.e) ~
9137+ `~[[i.names.e at.e]]
9138+ %lit `~
9139+ %str
9140+ ?: (lien pieces.e |=(p=piece ?=(%expr -.p))) ~
9141+ `~
9142+ %group $(e inner.e)
9143+ %body ?~(defs.e $(e final.e) ~)
9144+ %cast $(e val.e)
9145+ %gate
9146+ =/ binder=(unit (unit term)) (cycle-sample-name sample.e globals locals)
9147+ ?~ binder ~
9148+ =/ nested=(list term) ?~(u.binder locals [u.u.binder locals])
9149+ $(e body.e, locals nested)
9150+ %gate-wide
9151+ =/ binder=(unit (unit term)) (cycle-sample-name sample.e globals locals)
9152+ ?~ binder ~
9153+ =/ nested=(list term) ?~(u.binder locals [u.u.binder locals])
9154+ $(e body.e, locals nested)
9155+ %call
9156+ =/ first=(unit (list icyclesite)) $(e head.e)
9157+ ?~ first ~
9158+ =/ tail=(unit (list icyclesite)) (cycle-sites-list args.e globals locals)
9159+ ?~ tail ~
9160+ `(weld u.first u.tail)
9161+ * ~
9162+ ==
9163+::
9164+++ cycle-definitely-atom
9165+ |= e=expr
9166+ ^- ?
9167+ ?: ?=(%group -.e) $(e inner.e)
9168+ ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
9169+ ?. ?=(%cast -.e) |
9170+ |(?=(%aura -.shape.e) ?=(%flag -.shape.e))
9171+::
9172+++ cycle-proof-group
9173+ |= [members=(list def) globals=(list term)]
9174+ ^- ?
9175+ ?~ members &
9176+ ?. ?=(%value -.i.members) |
9177+ ?. (unique-value-name name.i.members globals) |
9178+ ?. ?=(^ (cycle-sites val.i.members globals ~)) |
9179+ $(members t.members)
9180+::
9181+++ cycle-find-site
9182+ |= [sites=(list icyclesite) component=(list term)]
9183+ ^- (unit span)
9184+ ?~ sites ~
9185+ ?: (lien component |=(n=term =(n name.i.sites))) `at.i.sites
9186+ $(sites t.sites)
9187+::
9188+++ cycle-group-errors
9189+ |= [members=(list def) component=(list term) globals=(list term)]
9190+ ^- (list icycle)
9191+ ?~ members ~
9192+ =/ d=def i.members
9193+ ?> ?=(%value -.d)
9194+ =/ tail=(list icycle) $(members t.members)
9195+ ?. (cycle-definitely-atom val.d) tail
9196+ =/ sites=(unit (list icyclesite)) (cycle-sites val.d globals ~)
9197+ ?~ sites tail
9198+ =/ found=(unit span) (cycle-find-site u.sites component)
9199+ ?~ found tail
9200+ [[name.d at.d u.found] tail]
9201+::
9202+++ definite-value-cycles
9203+ |= [ds=(list def) globals=(list term)]
9204+ ^- (list icycle)
9205+ =/ names=(list term) (global-value-names ds)
9206+ =/ graph=iadj (graph-make-forward ds (graph-nameset names ~) ~)
9207+ =/ components=icomponents (graph-components ds names)
9208+ =/ out=(list icycle) ~
6802 |-
9209 |-
6803− =/ next=ienv (add-supported-defs ds env molds globals externals surs mark-externals marks jimports reserved-molds at prelude)
9210+ ?~ components out
6804− ?: =(next env) env
9211+ =/ component=(list term) i.components
6805− $(env next)
9212+ ?. (graph-cycle component graph) $(components t.components)
9213+ =/ members=(list def)
9214+ (skim ds |=(d=def &(?=(%value -.d) (lien component |=(n=term =(n name.d))))))
9215+ ?. =((lent members) (lent component)) $(components t.components)
9216+ ?. (cycle-proof-group members globals) $(components t.components)
9217+ $(components t.components, out (weld (cycle-group-errors members component globals) out))
6806::
9218::
6807+| %union-analysis
9219+| %union-analysis
6808::
9220::
@@ -6939,11 +9351,142 @@
6939 [at.first at.second (union-relate a (project-union-mold second molds ~))]
9351 [at.first at.second (union-relate a (project-union-mold second molds ~))]
6940 (weld pairs $(cases t.cases))
9352 (weld pairs $(cases t.cases))
6941::
9353::
9354+:: A closed structural mold supplies no equation to determine a hole.
9355+:: Applications, references, unbound capitals and unions are unproved.
9356+++ simple-mold-hole
9357+ |= sh=shape
9358+ ^- (unit (unit span))
9359+ ?: ?=(%generic -.sh)
9360+ ?~ vars.sh ~
9361+ ?. (distinct-params vars.sh) ~
9362+ (simple-mold-hole-in body.sh vars.sh)
9363+ (simple-mold-hole-in sh ~)
9364+++ simple-mold-hole-in
9365+ |= [sh=shape vars=(list @t)]
9366+ ^- (unit (unit span))
9367+ ?- -.sh
9368+ %hole ``at.sh
9369+ ?(%aura %noun %void %flag %const) `~
9370+ %tvar ?:((lien vars |=(v=@t =(v name.sh))) `~ ~)
9371+ %cell (simple-mold-field-holes fields.sh vars)
9372+ %fn
9373+ =/ a=(unit (unit span)) $(sh sample.sh)
9374+ ?~ a ~
9375+ =/ b=(unit (unit span)) $(sh product.sh)
9376+ ?~ b ~
9377+ `?~(u.a u.b u.a)
9378+ %generic ~
9379+ * ~
9380+ ==
9381+++ simple-mold-field-holes
9382+ |= [fields=(list field) vars=(list @t)]
9383+ ^- (unit (unit span))
9384+ ?~ fields `~
9385+ =/ f=field i.fields
9386+ =/ first=(unit (unit span))
9387+ ?- -.f
9388+ %face (simple-mold-hole-in shape.f vars)
9389+ %bare (simple-mold-hole-in shape.f vars)
9390+ %pun ~
9391+ ==
9392+ ?~ first ~
9393+ =/ rest=(unit (unit span)) $(fields t.fields)
9394+ ?~ rest ~
9395+ `?~(u.first u.rest u.first)
9396+++ simple-local-mold-hole
9397+ |= defs=(list def)
9398+ ^- (unit span)
9399+ ?~ defs ~
9400+ ?. ?=(%mold -.i.defs) $(defs t.defs)
9401+ =/ found=(unit (unit span)) (simple-mold-hole shape.i.defs)
9402+ ?~ found $(defs t.defs)
9403+ ?^ u.found u.found
9404+ $(defs t.defs)
9405+::
9406+:: A partial prelude may omit unsupported declarations, but may not
9407+:: publish an interface while a named mold's hole remains unchecked.
9408+++ shape-has-hole
9409+ |= sh=shape
9410+ ^- ?
9411+ ?- -.sh
9412+ %hole &
9413+ %path (lien segs.sh |=(s=pseg ?=(%inferred -.s)))
9414+ %apply (lien args.sh shape-has-hole)
9415+ %union (lien cases.sh shape-has-hole)
9416+ %cell (lien fields.sh field-has-hole)
9417+ %fn |($(sh sample.sh) $(sh product.sh))
9418+ %generic $(sh body.sh)
9419+ * |
9420+ ==
9421+++ field-has-hole
9422+ |= f=field
9423+ ^- ?
9424+ ?- -.f
9425+ %face (shape-has-hole shape.f)
9426+ %bare (shape-has-hole shape.f)
9427+ %pun |
9428+ ==
9429+++ named-mold-has-hole
9430+ |= ds=(list def)
9431+ ^- ?
9432+ ?~ ds |
9433+ ?: &(?=(%mold -.i.ds) (shape-has-hole shape.i.ds)) &
9434+ $(ds t.ds)
9435+::
9436+++ sample-has-hole
9437+ |= sam=sample
9438+ ^- ?
9439+ ?- -.sam
9440+ %face (shape-has-hole shape.sam)
9441+ %bare (shape-has-hole shape.sam)
9442+ %cell (lien items.sam sample-has-hole)
9443+ * |
9444+ ==
9445+++ def-has-hole
9446+ |= d=def
9447+ ^- ?
9448+ ?- -.d
9449+ %mold (shape-has-hole shape.d)
9450+ %value (expr-has-hole val.d)
9451+ ==
9452+++ expr-has-hole
9453+ |= e=expr
9454+ ^- ?
9455+ ?- -.e
9456+ %str (lien pieces.e |=(p=piece ?:(?=(%expr -.p) (expr-has-hole p.p) |)))
9457+ %qath (lien segs.e |=(p=qseg ?:(?=(%expr -.p) (expr-has-hole p.p) |)))
9458+ %change (lien edits.e |=(p=edit (expr-has-hole val.p)))
9459+ %pair $(e val.e)
9460+ %unit $(e val.e)
9461+ %group $(e inner.e)
9462+ %list (lien items.e expr-has-hole)
9463+ %tuple (lien items.e |=(i=item (expr-has-hole val.i)))
9464+ ?(%gate %gate-wide) |((sample-has-hole sample.e) $(e body.e))
9465+ %cast |((shape-has-hole shape.e) $(e val.e))
9466+ %call |($(e head.e) (lien args.e expr-has-hole))
9467+ %trace |($(e val.e) $(e then.e))
9468+ %branch |($(e subject.e) (lien arms.e |=(a=arm (expr-has-hole val.a))))
9469+ %body |((lien defs.e def-has-hole) $(e final.e))
9470+ * |
9471+ ==
9472+++ hole-values-present
9473+ |= [ds=(list def) env=ienv]
9474+ ^- ?
9475+ ?~ ds &
9476+ ?. ?=(%value -.i.ds) $(ds t.ds)
9477+ ?: (expr-has-hole val.i.ds)
9478+ ?. ?=(^ (ienv-lookup name.i.ds env)) |
9479+ $(ds t.ds)
9480+ $(ds t.ds)
6942++ show-partial-mold
9481++ show-partial-mold
6943 |= [file=path src=@t d=def molds=imolds]
9482 |= [file=path src=@t d=def molds=imolds]
6944 ^- @t
9483 ^- @t
6945 ?> ?=(%mold -.d)
9484 ?> ?=(%mold -.d)
6946 =/ sh=shape shape.d
9485 =/ sh=shape shape.d
9486+ =/ hole=(unit (unit span)) (simple-mold-hole sh)
9487+ ?: &(?=(^ hole) ?=(^ u.hole))
9488+ =/ text=@t (show-error src [file line.beg.u.u.hole col.beg.u.u.hole "unresolved type hole"])
9489+ (of-wain:format ~[(crip "+$ {(trip name.d)}: type hole needs a determined type") text])
6947 =? sh ?=(%generic -.sh) body.sh
9490 =? sh ?=(%generic -.sh) body.sh
6948 ?. ?=(%union -.sh) (crip "+$ {(trip name.d)}: not checked")
9491 ?. ?=(%union -.sh) (crip "+$ {(trip name.d)}: not checked")
6949 =/ pairs=(list upair) (union-pairs cases.sh molds)
9492 =/ pairs=(list upair) (union-pairs cases.sh molds)
@@ -6970,6 +9513,21 @@
6970 (show-error src [file line.beg.at.site col.beg.at.site note.site])
9513 (show-error src [file line.beg.at.site col.beg.at.site note.site])
6971 (of-wain:format [summary excerpts])
9514 (of-wain:format [summary excerpts])
6972::
9515::
9516+:: Both written field sites are shown in the source that declares them.
9517+++ show-duplicate-fields
9518+ |= [file=path src=@t diagnostic=idiag]
9519+ ^- @t
9520+ =/ excerpts=(list @t)
9521+ %+ turn sites.diagnostic
9522+ |= site=[at=span note=tape]
9523+ (show-error src [file line.beg.at.site col.beg.at.site note.site])
9524+ (of-wain:format [(crip msg.diagnostic) excerpts])
9525+::
9526+++ duplicate-fields-report
9527+ |= [file=path src=@t diagnostic=idiag]
9528+ ^- @t
9529+ (of-wain:format ~['partial inference; module not checked' (show-duplicate-fields file src diagnostic)])
9530+::
6973:: +golden-types: a partial report; it does not claim the module checks
9531:: +golden-types: a partial report; it does not claim the module checks
6974::
9532::
6975++ golden-types
9533++ golden-types
@@ -6999,6 +9557,180 @@
6999+$ jfile-result (each [iface=ifile cache=jcache] @t)
9557+$ jfile-result (each [iface=ifile cache=jcache] @t)
7000+$ jimports-result (each [resolved=ijimports cache=jcache] @t)
9558+$ jimports-result (each [resolved=ijimports cache=jcache] @t)
7001::
9559::
9560+:: Written record fields each have their own lexical record scope.
9561++$ written-fields (map term span)
9562+++ duplicate-written-field
9563+ |= [name=term at=span seen=written-fields]
9564+ ^- (unit idiag)
9565+ =/ prior=(unit span) (~(get by seen) name)
9566+ ?~ prior ~
9567+ `["record field `{(trip name)}` is repeated" ~[[u.prior "first field"] [at "repeated field"]]]
9568+++ duplicate-shapes
9569+ |= xs=(list shape)
9570+ ^- (unit idiag)
9571+ ?~ xs ~
9572+ =/ first (duplicate-shape i.xs)
9573+ ?^ first first
9574+ $(xs t.xs)
9575+++ duplicate-fields
9576+ |= [fields=(list field) seen=written-fields]
9577+ ^- (unit idiag)
9578+ ?~ fields ~
9579+ =/ f=field i.fields
9580+ =/ n=(unit term)
9581+ ?- -.f
9582+ %face `name.f
9583+ %pun `name.f
9584+ %bare ~
9585+ ==
9586+ =/ dup=(unit idiag) ?~(n ~ (duplicate-written-field u.n at.f seen))
9587+ ?^ dup dup
9588+ =/ inner=(unit idiag)
9589+ ?- -.f
9590+ %face (duplicate-shape shape.f)
9591+ %pun ~
9592+ %bare (duplicate-shape shape.f)
9593+ ==
9594+ ?^ inner inner
9595+ $(fields t.fields, seen ?~(n seen (~(put by seen) u.n at.f)))
9596+++ duplicate-shape
9597+ |= s=shape
9598+ ^- (unit idiag)
9599+ ?- -.s
9600+ %cell (duplicate-fields fields.s ~)
9601+ %apply (duplicate-shapes args.s)
9602+ %union (duplicate-shapes cases.s)
9603+ %fn
9604+ =/ left (duplicate-shape sample.s)
9605+ ?^ left left
9606+ (duplicate-shape product.s)
9607+ %generic (duplicate-shape body.s)
9608+ * ~
9609+ ==
9610+++ duplicate-samples
9611+ |= [items=(list sample) seen=written-fields]
9612+ ^- (unit idiag)
9613+ ?~ items ~
9614+ =/ a=sample i.items
9615+ =/ n=(unit term)
9616+ ?- -.a
9617+ %bind `name.a
9618+ %face `name.a
9619+ %pun `name.a
9620+ * ~
9621+ ==
9622+ =/ dup=(unit idiag) ?~(n ~ (duplicate-written-field u.n at.a seen))
9623+ ?^ dup dup
9624+ =/ inner (duplicate-sample a)
9625+ ?^ inner inner
9626+ $(items t.items, seen ?~(n seen (~(put by seen) u.n at.a)))
9627+++ duplicate-sample
9628+ |= s=sample
9629+ ^- (unit idiag)
9630+ ?- -.s
9631+ %cell (duplicate-samples items.s ~)
9632+ %face (duplicate-shape shape.s)
9633+ %bare (duplicate-shape shape.s)
9634+ * ~
9635+ ==
9636+++ duplicate-exprs
9637+ |= xs=(list expr)
9638+ ^- (unit idiag)
9639+ ?~ xs ~
9640+ =/ first (duplicate-expr i.xs)
9641+ ?^ first first
9642+ $(xs t.xs)
9643+++ duplicate-items
9644+ |= [items=(list item) seen=written-fields]
9645+ ^- (unit idiag)
9646+ ?~ items ~
9647+ =/ a=item i.items
9648+ =/ dup=(unit idiag) ?~(face.a ~ (duplicate-written-field u.face.a at.a seen))
9649+ ?^ dup dup
9650+ =/ inner (duplicate-expr val.a)
9651+ ?^ inner inner
9652+ $(items t.items, seen ?~(face.a seen (~(put by seen) u.face.a at.a)))
9653+++ duplicate-pieces
9654+ |= pieces=(list piece)
9655+ ^- (unit idiag)
9656+ ?~ pieces ~
9657+ =/ first=(unit idiag) ?:(?=(%expr -.i.pieces) (duplicate-expr p.i.pieces) ~)
9658+ ?^ first first
9659+ $(pieces t.pieces)
9660+++ duplicate-qsegs
9661+ |= segs=(list qseg)
9662+ ^- (unit idiag)
9663+ ?~ segs ~
9664+ =/ first=(unit idiag) ?:(?=(%expr -.i.segs) (duplicate-expr p.i.segs) ~)
9665+ ?^ first first
9666+ $(segs t.segs)
9667+++ duplicate-edits
9668+ |= edits=(list edit)
9669+ ^- (unit idiag)
9670+ ?~ edits ~
9671+ =/ first (duplicate-expr val.i.edits)
9672+ ?^ first first
9673+ $(edits t.edits)
9674+++ duplicate-arms
9675+ |= arms=(list arm)
9676+ ^- (unit idiag)
9677+ ?~ arms ~
9678+ =/ first (duplicate-expr val.i.arms)
9679+ ?^ first first
9680+ $(arms t.arms)
9681+++ duplicate-defs
9682+ |= defs=(list def)
9683+ ^- (unit idiag)
9684+ ?~ defs ~
9685+ =/ first=(unit idiag)
9686+ ?- -.i.defs
9687+ %mold (duplicate-shape shape.i.defs)
9688+ %value (duplicate-expr val.i.defs)
9689+ ==
9690+ ?^ first first
9691+ $(defs t.defs)
9692+++ duplicate-expr
9693+ |= e=expr
9694+ ^- (unit idiag)
9695+ ?- -.e
9696+ %str (duplicate-pieces pieces.e)
9697+ %qath (duplicate-qsegs segs.e)
9698+ %change (duplicate-edits edits.e)
9699+ %pair (duplicate-expr val.e)
9700+ %unit (duplicate-expr val.e)
9701+ %group (duplicate-expr inner.e)
9702+ %list (duplicate-exprs items.e)
9703+ %tuple (duplicate-items items.e ~)
9704+ %gate-wide
9705+ =/ first (duplicate-sample sample.e)
9706+ ?^ first first
9707+ (duplicate-expr body.e)
9708+ %gate
9709+ =/ first (duplicate-sample sample.e)
9710+ ?^ first first
9711+ (duplicate-expr body.e)
9712+ %cast
9713+ =/ first (duplicate-shape shape.e)
9714+ ?^ first first
9715+ (duplicate-expr val.e)
9716+ %call
9717+ =/ first (duplicate-expr head.e)
9718+ ?^ first first
9719+ (duplicate-exprs args.e)
9720+ %trace
9721+ =/ first (duplicate-expr val.e)
9722+ ?^ first first
9723+ (duplicate-expr then.e)
9724+ %branch
9725+ =/ first (duplicate-expr subject.e)
9726+ ?^ first first
9727+ (duplicate-arms arms.e)
9728+ %body
9729+ =/ first (duplicate-defs defs.e)
9730+ ?^ first first
9731+ (duplicate-expr final.e)
9732+ * ~
9733+ ==
7002++ import-binding-names
9734++ import-binding-names
7003 |= imports=(list import)
9735 |= imports=(list import)
7004 ^- (list term)
9736 ^- (list term)
@@ -7011,6 +9743,60 @@
7011 ==
9743 ==
7012 [n $(imports t.imports)]
9744 [n $(imports t.imports)]
7013::
9745::
9746+++ reserved-proj-sample
9747+ |= sam=sample
9748+ ^- ?
9749+ ?- -.sam
9750+ %bind =(name.sam %proj)
9751+ %face =(name.sam %proj)
9752+ %pun =(name.sam %proj)
9753+ %cell (lien items.sam reserved-proj-sample)
9754+ * |
9755+ ==
9756+++ reserved-proj-pattern
9757+ |= p=pattern
9758+ ^- ?
9759+ ?- -.p
9760+ %bind =(name.p %proj)
9761+ %cell (lien items.p reserved-proj-pattern)
9762+ * |
9763+ ==
9764+++ reserved-proj-def
9765+ |= d=def
9766+ ^- ?
9767+ ?: =(name.d %proj) &
9768+ ?: ?=(%value -.d) (reserved-proj-expr val.d)
9769+ |
9770+++ reserved-proj-expr
9771+ |= e=expr
9772+ ^- ?
9773+ ?- -.e
9774+ %str (lien pieces.e |=(p=piece ?:(?=(%expr -.p) (reserved-proj-expr p.p) |)))
9775+ %qath (lien segs.e |=(p=qseg ?:(?=(%expr -.p) (reserved-proj-expr p.p) |)))
9776+ %change (lien edits.e |=(p=edit (reserved-proj-expr val.p)))
9777+ %pair $(e val.e)
9778+ %unit $(e val.e)
9779+ %group $(e inner.e)
9780+ %list (lien items.e reserved-proj-expr)
9781+ %tuple (lien items.e |=(i=item (reserved-proj-expr val.i)))
9782+ ?(%gate %gate-wide) |((reserved-proj-sample sample.e) $(e body.e))
9783+ %cast $(e val.e)
9784+ %call |($(e head.e) (lien args.e reserved-proj-expr))
9785+ %trace |($(e val.e) $(e then.e))
9786+ %branch |($(e subject.e) (lien arms.e |=(a=arm |((reserved-proj-pattern pat.a) (reserved-proj-expr val.a)))))
9787+ %body |((lien defs.e reserved-proj-def) $(e final.e))
9788+ * |
9789+ ==
9790+::
9791+++ module-has-reserved-proj
9792+ |= mod=module
9793+ ^- ?
9794+ =/ imported=(list term) (import-binding-names imports.mod)
9795+ =/ vals=(list term) (global-value-names defs.mod)
9796+ =/ molds=imolds (collect-simple-molds defs.mod)
9797+ =/ mold-names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
9798+ |((lien (weld imported (weld vals mold-names)) |=(n=term =(n %proj))) (lien defs.mod reserved-proj-def))
9799+::
7014++ module-scope-valid
9800++ module-scope-valid
7015 |= [mod=module prelude-values=(list term) prelude-molds=(list term)]
9801 |= [mod=module prelude-values=(list term) prelude-molds=(list term)]
7016 ^- ?
9802 ^- ?
@@ -7018,6 +9804,7 @@
7018 =/ vals=(list term) (global-value-names defs.mod)
9804 =/ vals=(list term) (global-value-names defs.mod)
7019 =/ molds=imolds (collect-simple-molds defs.mod)
9805 =/ molds=imolds (collect-simple-molds defs.mod)
7020 =/ mold-names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
9806 =/ mold-names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
9807+ ?: (module-has-reserved-proj mod) |
7021 ?. %+ levy imported
9808 ?. %+ levy imported
7022 |= n=term
9809 |= n=term
7023 &((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))))
9810 &((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))))
@@ -7025,6 +9812,22 @@
7025 ?. (levy vals |=(n=term &((unique-value-name n vals) !(lien prelude-values |=(v=term =(n v)))))) |
9812 ?. (levy vals |=(n=term &((unique-value-name n vals) !(lien prelude-values |=(v=term =(n v)))))) |
7026 (levy mold-names |=(n=term &((unique-value-name n mold-names) !(lien prelude-molds |=(m=term =(n m))))))
9813 (levy mold-names |=(n=term &((unique-value-name n mold-names) !(lien prelude-molds |=(m=term =(n m))))))
7027::
9814::
9815+:: In an API file or before main's kind is known, a lone `+$ poke`
9816+:: may be a declaration rather than a mold that shadows the prelude. Do not call
9817+:: that one collision definite, and do not hide unrelated scope errors.
9818+++ pending-declared-poke
9819+ |= [at=path mod=module prelude-values=(list term) prelude-molds=(list term)]
9820+ ^- ?
9821+ ?. (lien prelude-molds |=(n=term =(%poke n))) |
9822+ ?. |(?=([%ui %api @ %jibb ~] at) (lien defs.mod |=(d=def &(?=(%value -.d) =(%main name.d))))) |
9823+ =/ pokes=(list def)
9824+ (skim defs.mod |=(d=def &(?=(%mold -.d) =(%poke name.d))))
9825+ ?~ pokes |
9826+ ?^ t.pokes |
9827+ =/ remaining=(list def)
9828+ (skim defs.mod |=(d=def !&(?=(%mold -.d) =(%poke name.d))))
9829+ (module-scope-valid mod(defs remaining) prelude-values prelude-molds)
9830+::
7028++ module-mold-types
9831++ module-mold-types
7029 |= [molds=imolds state=istate]
9832 |= [molds=imolds state=istate]
7030 ^- (each imold-types @t)
9833 ^- (each imold-types @t)
@@ -7040,9 +9843,9 @@
7040::
9843::
7041:: Prepare a provisional interface from the trusted vendored source.
9844:: Prepare a provisional interface from the trusted vendored source.
7042:: Every declared name remains reserved, but only molds and values this
9845:: Every declared name remains reserved, but only molds and values this
7043−:: fragment can infer are usable. Unsupported bodies are not validated,
9846+:: fragment can infer are usable. Unsupported bodies are not validated.
7044−:: and imports into the prelude are not supported yet. The fixed origin
9847+:: An optional internal source supplies the prelude's one supported import;
7045−:: gives its named unions the same identity in every importing module.
9848+:: clients cannot import that path directly. Named unions retain their origin.
7046::
9849::
7047:: Recognize only the complete standard prelude list shape. Its recursive
9850:: Recognize only the complete standard prelude list shape. Its recursive
7048:: tail uses the same parameter and the unqualified list name. The reader
9851:: tail uses the same parameter and the unqualified list name. The reader
@@ -7082,6 +9885,14 @@
7082 ?. ?=(%tvar -.i.args.tail) |
9885 ?. ?=(%tvar -.i.args.tail) |
7083 =(var name.i.args.tail)
9886 =(var name.i.args.tail)
7084::
9887::
9888+++ prelude-label
9889+ |= [typ=itype name=term]
9890+ ^- itype
9891+ ?: ?=(%jrec -.typ) typ(label `name)
9892+ ?. ?=(%union -.typ) typ
9893+ ?^ args.typ typ
9894+ typ(label `name)
9895+::
7085++ partial-prelude-molds
9896++ partial-prelude-molds
7086 |= [molds=imolds state=istate]
9897 |= [molds=imolds state=istate]
7087 ^- imold-types
9898 ^- imold-types
@@ -7094,26 +9905,111 @@
7094 (infer-mold-template body.m state(active [name.m active.state], in-mold &))
9905 (infer-mold-template body.m state(active [name.m active.state], in-mold &))
7095 ?~ out $(molds t.molds)
9906 ?~ out $(molds t.molds)
7096 =. typ.template.u.out (label-direct-union typ.template.u.out body.m name.m state)
9907 =. typ.template.u.out (label-direct-union typ.template.u.out body.m name.m state)
9908+ =. typ.template.u.out (prelude-label typ.template.u.out name.m)
7097 [[name.m template.u.out] $(molds t.molds)]
9909 [[name.m template.u.out] $(molds t.molds)]
7098::
9910::
7099−++ partial-prelude-interface
9911+:: A compiler-owned interface available only to the dedicated
9912+:: internal-prelude preparation path, never the ordinary module resolver.
9913+++ private-primitive-interface
9914+ ^- ifile
9915+ =/ a=itype [%avar 0]
9916+ =/ pair=itype [%cell a a]
9917+ =/ greater=ischeme [[%fn pair [%flag ~]] ~[0]]
9918+ [~[[%raw-gth greater]] ~ /lib/jibb/primitives/jibb ~ ~ ~ ~]
9919+::
9920+++ infer-private-internal
7100 |= src=@t
9921 |= src=@t
7101 ^- (unit ifile)
9922 ^- (unit ifile)
9923+ =/ at=path /lib/jibb/internal/jibb
9924+ =/ parsed (parse at src)
9925+ ?: ?=(%| -.parsed) ~
9926+ =/ mod=module p.parsed
9927+ ?^ (duplicate-defs defs.mod) ~
9928+ ?~ imports.mod
9929+ =/ built=jfile-result (infer-jibb-file at src ~ ~ ~ ~[at] ~ ~ ~ ~)
9930+ ?: ?=(%| -.built) ~
9931+ `iface.p.built
9932+ ?. ?=([[%jibb *] ~] imports.mod) ~
9933+ ?. =(path.i.imports.mod /lib/jibb/primitives) ~
9934+ ?. (module-scope-valid mod ~ ~) ~
9935+ =/ vals=(list term) (global-value-names defs.mod)
9936+ ?: (lien vals |=(n=term =(n %main))) ~
9937+ =/ molds=imolds (collect-simple-molds defs.mod)
9938+ =/ globals=(list term) (weld (import-binding-names imports.mod) vals)
9939+ =/ js=ijimports ~[[face.i.imports.mod private-primitive-interface]]
9940+ =/ reserved=(list term) ~[face.i.imports.mod]
9941+ =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
9942+ =/ state=istate [0 ~ ~ ~ molds globals ~ ~ ~ ~ js reserved ~ ~ ~ | at top ~ ~ 256 ~]
9943+ =/ mts=(each imold-types @t) (module-mold-types molds state)
9944+ ?: ?=(%| -.mts) ~
9945+ =/ resolution=iresolved (resolve-groups defs.mod molds globals ~ ~ ~ ~ js reserved at ~)
9946+ =/ env=ienv env.resolution
9947+ ?. (module-values-complete defs.mod env) ~
9948+ `[env p.mts at ~ artifacts.resolution ~ `src]
9949+::
9950+++ partial-prelude-interface-with-internal
9951+ |= [src=@t internal-source=(unit @t)]
9952+ ^- (unit ifile)
7102 ?: =(0 src) ~
9953 ?: =(0 src) ~
7103 =/ at=path /lib/jibb/prelude/jibb
9954 =/ at=path /lib/jibb/prelude/jibb
7104 =/ parsed (parse at src)
9955 =/ parsed (parse at src)
7105 ?: ?=(%| -.parsed) ~
9956 ?: ?=(%| -.parsed) ~
9957+ ?: (named-mold-has-hole defs.p.parsed) ~
9958+ ?^ (duplicate-defs defs.p.parsed) ~
9959+ =/ private=(unit ijimports)
9960+ ?~ imports.p.parsed `~
9961+ ?. ?=([[%jibb *] ~] imports.p.parsed) ~
9962+ ?. =(path.i.imports.p.parsed /lib/jibb/internal) ~
9963+ ?~ internal-source ~
9964+ =/ built=(unit ifile) (infer-private-internal u.internal-source)
9965+ ?~ built ~
7106− ?^ imports.p.parsed ~
9966+ `~[[face.i.imports.p.parsed u.built]]
9967+ ?~ private ~
7107 ?~ defs.p.parsed ~
9968 ?~ defs.p.parsed ~
7108 ?. (module-scope-valid p.parsed ~ ~) ~
9969 ?. (module-scope-valid p.parsed ~ ~) ~
7109 =/ ds=(list def) defs.p.parsed
9970 =/ ds=(list def) defs.p.parsed
7110 =/ molds=imolds (collect-simple-molds ds)
9971 =/ molds=imolds (collect-simple-molds ds)
7111 =/ names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
9972 =/ names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
7112− =/ globals=(list term) (global-value-names ds)
9973+ =/ globals=(list term) (weld (import-binding-names imports.p.parsed) (global-value-names ds))
9974+ :: Remove raw list before inferring any template, so an altered list
9975+ :: cannot leak through an alias. Its name remains reserved either way.
9976+ =/ declared=? (lien names |=(name=term =(%list name)))
9977+ =/ env-molds=imolds molds
9978+ =? env-molds declared
9979+ (skim molds |=(m=[name=term body=shape] !=(%list name.m)))
9980+ =/ reserved=(list term) ?:(declared ~[%list] ~)
7113− =/ state=istate [0 ~ ~ ~ molds globals ~ ~ ~ ~ ~ ~ ~ ~ ~ | at names ~]
9981+ =/ state=istate [0 ~ ~ ~ env-molds globals ~ ~ ~ ~ u.private reserved ~ ~ ~ | at names ~ ~ 256 ~]
9982+ :: Other prelude molds may use list only after its source has passed
9983+ :: the standard-list check. The raw declaration remains removed.
9984+ =/ declared-list=(unit shape) (find-simple-mold %list molds)
9985+ =/ mold-prelude=(unit ifile)
9986+ ?~ declared-list ~
9987+ ?. (standard-prelude-list u.declared-list) ~
9988+ `[~ ~[[%list [[%collection %list ~[[%var 0]]] ~[0]]]] at ~ ~ ~ ~]
7114− =/ mt=imold-types (partial-prelude-molds molds state)
9989+ =/ mt=imold-types (partial-prelude-molds molds state(prelude mold-prelude))
7115− =/ env=ienv (resolve-supported-defs ds molds globals ~ ~ ~ ~ ~ ~ at ~)
9990+ =/ partial=ifile [~ mt at ~ ~ ~ ~]
7116− `[env mt at]
9991+ :: An explicitly qualified re-export must resolve. Other unsupported
9992+ :: prelude declarations remain reserved but absent from the interface.
9993+ =/ required=imolds
9994+ %+ skim molds
9995+ |= m=[name=term body=shape]
9996+ =/ sh=shape body.m
9997+ ?. ?=(%ref -.sh) |
9998+ ?~ names.sh |
9999+ ?=(^ t.names.sh)
10000+ ?. (levy required |=(m=[name=term body=shape] ?=(^ (find-jibb-mold name.m partial)))) ~
10001+ =/ resolution=iresolved (resolve-groups ds env-molds globals ~ ~ ~ ~ u.private reserved at `partial)
10002+ =/ env=ienv env.resolution
10003+ ?. (hole-values-present ds env) ~
10004+ =/ deps=(list iwidth-dependency)
10005+ ?~ u.private ~
10006+ ~[[at.interface.i.u.private source.interface.i.u.private elaborations.interface.i.u.private]]
10007+ `[env mt at ~ artifacts.resolution deps `src]
10008+::
10009+++ partial-prelude-interface
10010+ |= src=@t
10011+ ^- (unit ifile)
10012+ (partial-prelude-interface-with-internal src ~)
7117::
10013::
7118+$ iprelude [iface=ifile values=(list term) molds=(list term)]
10014+$ iprelude [iface=ifile values=(list term) molds=(list term)]
7119::
10015::
@@ -7128,6 +10024,17 @@
7128 =/ ms=(list term) (turn (collect-simple-molds defs.p.parsed) |=(m=[name=term body=shape] name.m))
10024 =/ ms=(list term) (turn (collect-simple-molds defs.p.parsed) |=(m=[name=term body=shape] name.m))
7129 `[u.iface vals ms]
10025 `[u.iface vals ms]
7130::
10026::
10027+++ prepare-prelude-with-internal
10028+ |= [src=@t internal-source=@t]
10029+ ^- (unit iprelude)
10030+ =/ iface=(unit ifile) (partial-prelude-interface-with-internal src `internal-source)
10031+ ?~ iface ~
10032+ =/ parsed (parse /lib/jibb/prelude/jibb src)
10033+ ?: ?=(%| -.parsed) ~
10034+ =/ vals=(list term) (global-value-names defs.p.parsed)
10035+ =/ ms=(list term) (turn (collect-simple-molds defs.p.parsed) |=(m=[name=term body=shape] name.m))
10036+ `[u.iface vals ms]
10037+::
7131++ module-values-complete
10038++ module-values-complete
7132 |= [ds=(list def) env=ienv]
10039 |= [ds=(list def) env=ienv]
7133 ^- ?
10040 ^- ?
@@ -7154,6 +10061,10 @@
7154 ?~ imports [%& [~ cache]]
10061 ?~ imports [%& [~ cache]]
7155 ?. ?=(%jibb -.i.imports) $(imports t.imports)
10062 ?. ?=(%jibb -.i.imports) $(imports t.imports)
7156 =/ at=path (weld path.i.imports `path`~[%jibb])
10063 =/ at=path (weld path.i.imports `path`~[%jibb])
10064+ ?: =(at /lib/jibb/internal/jibb)
10065+ [%| 'the prelude internal module is private']
10066+ ?: =(at /lib/jibb/primitives/jibb)
10067+ [%| 'the prelude primitive interface is private']
7157 ?: (lien active |=(p=path =(p at)))
10068 ?: (lien active |=(p=path =(p at)))
7158 [%| (crip "import cycle at {(spud at)}")]
10069 [%| (crip "import cycle at {(spud at)}")]
7159 =/ found=jbundle (skim modules |=(m=jsource =(at at.m)))
10070 =/ found=jbundle (skim modules |=(m=jsource =(at at.m)))
@@ -7168,14 +10079,287 @@
7168 ?: ?=(%| -.rest) rest
10079 ?: ?=(%| -.rest) rest
7169 [%& [[[face.i.imports iface.p.iface] resolved.p.rest] cache.p.rest]]
10080 [%& [[[face.i.imports iface.p.iface] resolved.p.rest] cache.p.rest]]
7170::
10081::
10082+:: Provisional declaration extraction only; this does not derive asks,
10083+:: validate imported types, or claim that an API module has checked.
10084++$ iapi-path [at=span name=term segments=(list pseg) full=term diffs=(list term) scry=(unit (list pseg))]
10085+++ api-path-mark
10086+ |= [sh=shape marks=(list term)]
10087+ ^- (unit term)
10088+ ?. ?=(%ref -.sh) ~
10089+ ?. ?=([@ ~] names.sh) ~
10090+ ?. (unique-value-name i.names.sh marks) ~
10091+ `i.names.sh
10092+::
10093+++ api-path-diffs
10094+ |= [shapes=(list shape) marks=(list term) used=(list term)]
10095+ ^- (unit (list term))
10096+ ?~ shapes `~
10097+ =/ n=(unit term) (api-path-mark i.shapes marks)
10098+ ?~ n ~
10099+ ?: (lien used |=(x=term =(x u.n))) ~
10100+ =/ rest=(unit (list term)) $(shapes t.shapes, used [u.n used])
10101+ ?~ rest ~
10102+ `[u.n u.rest]
10103+::
10104+++ api-path-payload
10105+ |= [sh=shape marks=(list term)]
10106+ ^- (unit [full=term diffs=(list term)])
10107+ =/ direct=(unit term) (api-path-mark sh marks)
10108+ ?^ direct `[u.direct ~]
10109+ ?. ?=(%apply -.sh) ~
10110+ ?. =(~[%facts] ref.sh) ~
10111+ ?~ args.sh ~
10112+ ?~ t.args.sh ~
10113+ =/ full=(unit term) (api-path-mark i.args.sh marks)
10114+ ?~ full ~
10115+ =/ diffs=(unit (list term)) (api-path-diffs t.args.sh marks ~[u.full])
10116+ ?~ diffs ~
10117+ `[u.full u.diffs]
10118+::
10119++$ iapi-parameter [name=term aura=@ta at=span]
10120+++ api-path-parameters
10121+ |= [segments=(list pseg) seen=(list term)]
10122+ ^- (unit (list iapi-parameter))
10123+ ?~ segments `~
10124+ ?: ?=(%knot -.i.segments) $(segments t.segments)
10125+ =/ seg=pseg i.segments
10126+ ?. ?=(%typed -.seg) ~
10127+ ?: =(0 aura.seg) ~
10128+ ?: (lien seen |=(n=term =(n name.seg))) ~
10129+ =/ rest=(unit (list iapi-parameter)) $(segments t.segments, seen [name.seg seen])
10130+ ?~ rest ~
10131+ `[[name.seg aura.seg at.seg] u.rest]
10132+::
10133+++ api-scry-parameters-compatible
10134+ |= [scry=(list iapi-parameter) watch=(list iapi-parameter)]
10135+ ^- ?
10136+ ?~ scry &
10137+ ?. (lien watch |=(p=iapi-parameter &(=(name.p name.i.scry) =(aura.p aura.i.scry)))) |
10138+ $(scry t.scry)
10139+::
10140+++ api-path-one
10141+ |= [sh=shape marks=(list term)]
10142+ ^- (unit iapi-path)
10143+ ?. ?=(%cell -.sh) ~
10144+ =/ fs=(list field) fields.sh
10145+ ?~ fs ~
10146+ ?~ t.fs ~
10147+ ?~ t.t.fs ~
10148+ ?: (gth (lent fs) 4) ~
10149+ ?. ?=(%bare -.i.fs) ~
10150+ =/ tag=shape shape.i.fs
10151+ ?. ?=(%const -.tag) ~
10152+ ?. =(%term form.lit.tag) ~
10153+ =/ name=term val.lit.tag
10154+ ?. (jibb-face-name name) ~
10155+ ?. ?=(%bare -.i.t.fs) ~
10156+ =/ path-shape=shape shape.i.t.fs
10157+ ?. ?=(%path -.path-shape) ~
10158+ ?. ?=(%bare -.i.t.t.fs) ~
10159+ =/ payload=(unit [full=term diffs=(list term)]) (api-path-payload shape.i.t.t.fs marks)
10160+ ?~ payload ~
10161+ =/ scry=(unit (unit (list pseg)))
10162+ ?~ t.t.t.fs `~
10163+ =/ entry=field i.t.t.t.fs
10164+ ?. ?=(%face -.entry) ~
10165+ ?. =(%scry name.entry) ~
10166+ ?. ?=(%path -.shape.entry) ~
10167+ ``segs.shape.entry
10168+ ?~ scry ~
10169+ =/ params=(unit (list iapi-parameter)) (api-path-parameters segs.path-shape ~)
10170+ ?~ params ~
10171+ ?^ u.scry
10172+ =/ scry-params=(unit (list iapi-parameter)) (api-path-parameters u.u.scry ~)
10173+ ?~ scry-params ~
10174+ ?. (api-scry-parameters-compatible u.scry-params u.params) ~
10175+ `[at.sh name segs.path-shape full.u.payload diffs.u.payload u.scry]
10176+ `[at.sh name segs.path-shape full.u.payload diffs.u.payload u.scry]
10177+::
10178+++ api-path-many
10179+ |= [shapes=(list shape) marks=(list term) seen=(list term)]
10180+ ^- (unit (list iapi-path))
10181+ ?~ shapes `~
10182+ =/ one=(unit iapi-path) (api-path-one i.shapes marks)
10183+ ?~ one ~
10184+ ?: (lien seen |=(n=term =(n name.u.one))) ~
10185+ =/ rest=(unit (list iapi-path)) $(shapes t.shapes, seen [name.u.one seen])
10186+ ?~ rest ~
10187+ `[u.one u.rest]
10188+::
10189+++ api-path-declaration
10190+ |= [sh=shape marks=(list term)]
10191+ ^- (unit (list iapi-path))
10192+ ?: ?=(%union -.sh) (api-path-many cases.sh marks ~)
10193+ (api-path-many ~[sh] marks ~)
10194+::
10195+:: Derived gates share the value namespace. /% marks name molds; /- and
10196+:: /= also introduce faces that cannot be shadowed by a derived value.
10197+++ api-import-faces
10198+ |= imports=(list import)
10199+ ^- (list term)
10200+ ?~ imports ~
10201+ ?- -.i.imports
10202+ %mark $(imports t.imports)
10203+ %sur [name.i.imports $(imports t.imports)]
10204+ %jibb [face.i.imports $(imports t.imports)]
10205+ ==
10206+::
10207+++ api-derived-names-valid
10208+ |= [paths=(list iapi-path) poke-names=(list term) mod=module prelude-values=(list term)]
10209+ ^- ?
10210+ =/ path-names=(list term) (turn paths |=(p=iapi-path name.p))
10211+ =/ derived=(list term) (weld path-names poke-names)
10212+ ?: (lien derived |=(n=term =(n %proj))) |
10213+ =/ outer=(list term) (weld prelude-values (weld (global-value-names defs.mod) (api-import-faces imports.mod)))
10214+ (levy derived |=(n=term &((unique-value-name n derived) !(lien outer |=(x=term =(n x))))))
10215+::
10216+:: Analysis only. Successful external entries must be unchanged results
10217+:: produced for the declared marks; no request interface is produced.
10218++$ iapi-mark-type [name=term typ=itype]
10219++$ iapi-path-typed [path=iapi-path full=itype diffs=(list iapi-mark-type)]
10220+++ api-diff-types
10221+ |= [names=(list term) externals=imark-externals declared=(list term)]
10222+ ^- (unit (list iapi-mark-type))
10223+ ?~ names `~
10224+ =/ typ=(unit itype) (find-imported-mark i.names externals declared)
10225+ ?~ typ ~
10226+ =/ tail=(unit (list iapi-mark-type)) $(names t.names)
10227+ ?~ tail ~
10228+ `[[i.names u.typ] u.tail]
10229+::
10230+++ api-path-types
10231+ |= [paths=(list iapi-path) externals=imark-externals declared=(list term)]
10232+ ^- (unit (list iapi-path-typed))
10233+ ?~ paths `~
10234+ =/ full=(unit itype) (find-imported-mark full.i.paths externals declared)
10235+ ?~ full ~
10236+ =/ diffs=(unit (list iapi-mark-type)) (api-diff-types diffs.i.paths externals declared)
10237+ ?~ diffs ~
10238+ =/ tail=(unit (list iapi-path-typed)) $(paths t.paths)
10239+ ?~ tail ~
10240+ `[[i.paths u.full u.diffs] u.tail]
10241+::
10242+++ api-poke-mark-names
10243+ |= [pokes=(list def) declared=(list term)]
10244+ ^- (unit (list term))
10245+ ?~ pokes `~
10246+ ?^ t.pokes ~
10247+ =/ d=def i.pokes
10248+ ?. ?=(%mold -.d) ~
10249+ =/ sh=shape shape.d
10250+ ?: ?=(%union -.sh) (api-path-diffs cases.sh declared ~)
10251+ =/ name=(unit term) (api-path-mark sh declared)
10252+ ?~ name ~
10253+ `~[u.name]
10254+::
10255+++ api-path-analysis
10256+ |= [mod=module externals=imark-externals prelude-values=(list term) prelude-molds=(list term)]
10257+ ^- (unit (list iapi-path-typed))
10258+ ?: (lien defs.mod def-has-hole) ~
10259+ ?^ (duplicate-defs defs.mod) ~
10260+ =/ ds=(list def) defs.mod
10261+ =/ declarations=(list def)
10262+ (skim ds |=(d=def &(?=(%mold -.d) =(%paths name.d))))
10263+ ?. ?=([* ~] declarations) ~
10264+ =/ pokes=(list def)
10265+ (skim ds |=(d=def &(?=(%mold -.d) =(%poke name.d))))
10266+ ?: (gth (lent pokes) 1) ~
10267+ =/ ordinary=(list def)
10268+ (skim ds |=(d=def !&(?=(%mold -.d) |(=(%paths name.d) =(%poke name.d)))))
10269+ ?. (module-scope-valid mod(defs ordinary) prelude-values prelude-molds) ~
10270+ =/ declared=(list term) (collect-mark-imports imports.mod)
10271+ =/ poke-names=(unit (list term)) (api-poke-mark-names pokes declared)
10272+ ?~ poke-names ~
10273+ =/ decl=def i.declarations
10274+ ?> ?=(%mold -.decl)
10275+ =/ paths=(unit (list iapi-path)) (api-path-declaration shape.decl declared)
10276+ ?~ paths ~
10277+ ?. (api-derived-names-valid u.paths u.poke-names mod prelude-values) ~
10278+ (api-path-types u.paths externals declared)
10279+::
10280+:: Source/graph entry for path analysis only. The returned paths retain
10281+:: reader-derived mark types and import resolution has checked reachable
10282+:: Jibb dependencies. This is not an API interface or a module check.
10283+++ api-path-analysis-source
10284+ |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle prepared=(unit iprelude)]
10285+ ^- (each (list iapi-path-typed) @t)
10286+ ?. ?=([%ui %api @ %jibb ~] file) [%| 'API path analysis requires /ui/api/<agent>.jibb']
10287+ =/ parsed (parse file src)
10288+ ?: ?=(%| -.parsed) [%| 'API path source does not parse']
10289+ =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
10290+ ?^ duplicate [%| (show-duplicate-fields file src u.duplicate)]
10291+ ?~ prepared [%| 'API path analysis needs the prepared prelude']
10292+ =/ prelude=(unit ifile) `iface.u.prepared
10293+ =/ deps=jimports-result
10294+ (resolve-jibb-imports imports.p.parsed externals marks modules ~[file] values.u.prepared molds.u.prepared ~ prelude)
10295+ ?: ?=(%| -.deps) [%| p.deps]
10296+ =/ paths=(unit (list iapi-path-typed))
10297+ (api-path-analysis p.parsed marks values.u.prepared molds.u.prepared)
10298+ ?~ paths [%| 'API path declaration needs unsupported analysis']
10299+ [%& u.paths]
10300+::
10301+++ api-mark-exports
10302+ |= [marks=(list term) all=(list term) externals=imark-externals]
10303+ ^- imold-types
10304+ ?~ marks ~
10305+ =/ t=(unit itype) (find-imported-mark i.marks externals all)
10306+ ?~ t $(marks t.marks)
10307+ [[i.marks [u.t ~]] $(marks t.marks)]
10308+::
10309+:: Experimental direct poke-only API. Unsupported API declarations fail
10310+:: as a whole; supplied mark reader results retain their existing boundary.
10311+++ api-poke-interface
10312+ |= [at=path mod=module mark-externals=imark-externals prelude-values=(list term) prelude-molds=(list term) prelude=(unit ifile)]
10313+ ^- (unit ifile)
10314+ ?: (lien defs.mod def-has-hole) ~
10315+ ?. ?=([%ui %api @ %jibb ~] at) ~
10316+ ?^ (duplicate-defs defs.mod) ~
10317+ ?~ prelude ~
10318+ ?. =(at.u.prelude /lib/jibb/prelude/jibb) ~
10319+ =/ poke=(unit ischeme) (find-jibb-mold %poke u.prelude)
10320+ ?~ poke ~
10321+ ?. ?=(%union -.typ.u.poke) ~
10322+ ?^ vars.u.poke ~
10323+ =/ compatible=?
10324+ %+ lien cases.typ.u.poke
10325+ |= c=itype
10326+ ?=([%cell [%const [%term %tas %agent *]] [%cell [%face %agent [%atom %tas]] [%cell [%face %mark [%atom %tas]] [%face %payload [%noun ~]]]]] c)
10327+ ?. compatible ~
10328+ ?. (module-scope-valid mod(defs ~) prelude-values prelude-molds) ~
10329+ ?. (levy imports.mod |=(i=import ?=(%mark -.i))) ~
10330+ =/ marks=(list term) (collect-mark-imports imports.mod)
10331+ ?. ?=([@ ~] marks) ~
10332+ =/ ds=(list def) defs.mod
10333+ ?. ?=([[%mold *] ~] ds) ~
10334+ ?. =(%poke name.i.ds) ~
10335+ =/ sh=shape shape.i.ds
10336+ ?. ?=([%ref *] sh) ~
10337+ ?. ?=([@ ~] names.sh) ~
10338+ =/ n=term i.names.sh
10339+ ?. (unique-value-name n marks) ~
10340+ ?: |((lien prelude-values |=(x=term =(n x))) (lien prelude-molds |=(x=term =(n x)))) ~
10341+ =/ mark=(unit itype) (find-imported-mark n mark-externals marks)
10342+ ?~ mark ~
10343+ =/ sc=ischeme [[%fn u.mark typ.u.poke] ~]
10344+ `[~[[n sc]] (api-mark-exports marks marks mark-externals) at ~[[n i.t.t.at n]] ~ ~ ~]
10345+::
7171++ infer-jibb-file
10346++ infer-jibb-file
7172 |= [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)]
10347 |= [at=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle active=(list path) prelude-values=(list term) prelude-molds=(list term) cache=jcache prelude=(unit ifile)]
7173 ^- jfile-result
10348 ^- jfile-result
7174− ?: ?=([%ui %api *] at) [%| (crip "API module needs unsupported inference: {(spud at)}")]
7175 =/ parsed (parse at src)
10349 =/ parsed (parse at src)
7176 ?: ?=(%| -.parsed) [%| (crip "module source does not parse: {(spud at)}")]
10350 ?: ?=(%| -.parsed) [%| (crip "module source does not parse: {(spud at)}")]
7177 =/ mod=module p.parsed
10351 =/ mod=module p.parsed
10352+ =/ duplicate=(unit idiag) (duplicate-defs defs.mod)
10353+ ?^ duplicate [%| (show-duplicate-fields at src u.duplicate)]
10354+ ?: ?=([%ui %api *] at)
10355+ =/ iface=(unit ifile) (api-poke-interface at mod mark-externals prelude-values prelude-molds prelude)
10356+ ?~ iface [%| (crip "API module needs unsupported inference: {(spud at)}")]
10357+ =/ checked=ifile u.iface(source `src)
10358+ [%& [checked [[at checked] cache]]]
7178− ?. (module-scope-valid mod prelude-values prelude-molds) [%| (crip "module has conflicting names: {(spud at)}")]
10359+ ?. (module-scope-valid mod prelude-values prelude-molds)
10360+ ?: (pending-declared-poke at mod prelude-values prelude-molds)
10361+ [%| (crip "module kind or scope needs unsupported inference: {(spud at)}")]
10362+ [%| (crip "module has conflicting names: {(spud at)}")]
7179 =/ vals=(list term) (global-value-names defs.mod)
10363 =/ vals=(list term) (global-value-names defs.mod)
7180 ?: (lien vals |=(n=term =(n %main)))
10364 ?: (lien vals |=(n=term =(n %main)))
7181 [%| (crip "module kind needs unsupported inference: {(spud at)}")]
10365 [%| (crip "module kind needs unsupported inference: {(spud at)}")]
@@ -7187,13 +10371,15 @@
7187 =/ marks=(list term) (collect-mark-imports imports.mod)
10371 =/ marks=(list term) (collect-mark-imports imports.mod)
7188 =/ reserved=(list term) (weld prelude-molds (turn resolved.p.js |=(j=[face=term interface=ifile] face.j)))
10372 =/ reserved=(list term) (weld prelude-molds (turn resolved.p.js |=(j=[face=term interface=ifile] face.j)))
7189 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
10373 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
7190− =/ state=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks resolved.p.js reserved ~ ~ ~ | at top prelude]
10374+ =/ state=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks resolved.p.js reserved ~ ~ ~ | at top prelude ~ 256 ~]
7191 =/ mts=(each imold-types @t) (module-mold-types molds state)
10375 =/ mts=(each imold-types @t) (module-mold-types molds state)
7192 ?: ?=(%| -.mts) [%| (crip "{(trip p.mts)}: {(spud at)}")]
10376 ?: ?=(%| -.mts) [%| (crip "{(trip p.mts)}: {(spud at)}")]
7193− =/ env=ienv (resolve-supported-defs defs.mod molds globals externals surs mark-externals marks resolved.p.js reserved at prelude)
10377+ =/ resolution=iresolved (resolve-groups defs.mod molds globals externals surs mark-externals marks resolved.p.js reserved at prelude)
10378+ =/ env=ienv env.resolution
7194 ?. (module-values-complete defs.mod env)
10379 ?. (module-values-complete defs.mod env)
7195 [%| (crip "module definitions need unsupported inference: {(spud at)}")]
10380 [%| (crip "module definitions need unsupported inference: {(spud at)}")]
10381+ =/ iface=ifile [env p.mts at ~ artifacts.resolution ~ `src]
7196− [%& [[env p.mts at] [[at [env p.mts at]] cache.p.js]]]
10382+ [%& [iface [[at iface] cache.p.js]]]
7197::
10383::
7198:: +golden-types-with-modules fails closed for imports without prelude
10384:: +golden-types-with-modules fails closed for imports without prelude
7199:: scope. +golden-types-with-prelude resolves supported library graphs;
10385:: scope. +golden-types-with-prelude resolves supported library graphs;
@@ -7204,6 +10390,8 @@
7204 ^- @t
10390 ^- @t
7205 =/ parsed (parse file src)
10391 =/ parsed (parse file src)
7206 ?: ?=(%| -.parsed) (show-error src p.parsed)
10392 ?: ?=(%| -.parsed) (show-error src p.parsed)
10393+ =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
10394+ ?^ duplicate (duplicate-fields-report file src u.duplicate)
7207 ?: (lien imports.p.parsed |=(i=import ?=(%jibb -.i)))
10395 ?: (lien imports.p.parsed |=(i=import ?=(%jibb -.i)))
7208 'partial inference; module not checked\0aprelude source missing; module import inference unsupported'
10396 'partial inference; module not checked\0aprelude source missing; module import inference unsupported'
7209 (golden-types-with-marks file src externals mark-externals)
10397 (golden-types-with-marks file src externals mark-externals)
@@ -7218,6 +10406,8 @@
7218 ^- @t
10406 ^- @t
7219 =/ parsed (parse file src)
10407 =/ parsed (parse file src)
7220 ?: ?=(%| -.parsed) (show-error src p.parsed)
10408 ?: ?=(%| -.parsed) (show-error src p.parsed)
10409+ =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
10410+ ?^ duplicate (duplicate-fields-report file src u.duplicate)
7221 ?: =(0 prelude-source) 'partial inference; module not checked\0aprelude source missing; module import inference unsupported'
10411 ?: =(0 prelude-source) 'partial inference; module not checked\0aprelude source missing; module import inference unsupported'
7222 =/ prelude (parse /lib/jibb/prelude/jibb prelude-source)
10412 =/ prelude (parse /lib/jibb/prelude/jibb prelude-source)
7223 ?: ?=(%| -.prelude) 'partial inference; module not checked\0aprelude source does not parse; module import inference unsupported'
10413 ?: ?=(%| -.prelude) 'partial inference; module not checked\0aprelude source does not parse; module import inference unsupported'
@@ -7225,16 +10415,26 @@
7225 ?~ prepared 'partial inference; module not checked\0aprelude interface is not supported'
10415 ?~ prepared 'partial inference; module not checked\0aprelude interface is not supported'
7226 (golden-types-with-prepared-prelude file src externals mark-externals modules prepared)
10416 (golden-types-with-prepared-prelude file src externals mark-externals modules prepared)
7227::
10417::
10418+++ golden-types-with-prelude-and-internal
10419+ |= [file=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle prelude-source=@t internal-source=@t]
10420+ ^- @t
10421+ =/ prepared=(unit iprelude) (prepare-prelude-with-internal prelude-source internal-source)
10422+ (golden-types-with-prepared-prelude file src externals mark-externals modules prepared)
10423+::
7228++ golden-types-with-prepared-prelude
10424++ golden-types-with-prepared-prelude
7229 |= [file=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle prepared=(unit iprelude)]
10425 |= [file=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle prepared=(unit iprelude)]
7230 ^- @t
10426 ^- @t
7231 =/ parsed (parse file src)
10427 =/ parsed (parse file src)
7232 ?: ?=(%| -.parsed) (show-error src p.parsed)
10428 ?: ?=(%| -.parsed) (show-error src p.parsed)
10429+ =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
10430+ ?^ duplicate (duplicate-fields-report file src u.duplicate)
7233 ?~ prepared 'partial inference; module not checked\0aprelude interface is not supported'
10431 ?~ prepared 'partial inference; module not checked\0aprelude interface is not supported'
7234 =/ prelude-values=(list term) values.u.prepared
10432 =/ prelude-values=(list term) values.u.prepared
7235 =/ prelude-molds=(list term) molds.u.prepared
10433 =/ prelude-molds=(list term) molds.u.prepared
7236 =/ iface=(unit ifile) `iface.u.prepared
10434 =/ iface=(unit ifile) `iface.u.prepared
7237 ?. (module-scope-valid p.parsed prelude-values prelude-molds)
10435 ?. (module-scope-valid p.parsed prelude-values prelude-molds)
10436+ ?: (pending-declared-poke file p.parsed prelude-values prelude-molds)
10437+ 'partial inference; module not checked\0amodule kind or scope needs unsupported inference'
7238 'partial inference; module not checked\0amodule has conflicting names'
10438 'partial inference; module not checked\0amodule has conflicting names'
7239 =/ js=jimports-result
10439 =/ js=jimports-result
7240 (resolve-jibb-imports imports.p.parsed externals mark-externals modules ~[file] prelude-values prelude-molds ~ iface)
10440 (resolve-jibb-imports imports.p.parsed externals mark-externals modules ~[file] prelude-values prelude-molds ~ iface)
@@ -7247,6 +10447,23 @@
7247:: entries, as [mark result] with the result from +read-mark:jibb-import.
10447:: entries, as [mark result] with the result from +read-mark:jibb-import.
7248:: Unknown, duplicated, failed and undeclared entries never resolve a mold.
10448:: Unknown, duplicated, failed and undeclared entries never resolve a mold.
7249::
10449::
10450+:: Callers pass unchanged structured reader results; graph validation
10451+:: remains in the existing bridge, and failures stay available lazily.
10452+++ reader-result-for-checker
10453+ |= result=*
10454+ ^- *
10455+ ?: ?=([%ok *] result) [%& +.result]
10456+ result
10457+::
10458+++ golden-types-with-reader-diagnostics
10459+ |= [file=path src=@t externals=iexternals mark-externals=imark-externals]
10460+ ^- @t
10461+ =/ ex=iexternals
10462+ (turn externals |=(e=[module=term name=term result=*] [module.e name.e (reader-result-for-checker result.e)]))
10463+ =/ mx=imark-externals
10464+ (turn mark-externals |=(e=[mark=term result=*] [mark.e (reader-result-for-checker result.e)]))
10465+ (golden-types-with-marks file src ex mx)
10466+::
7250++ golden-types-with-marks
10467++ golden-types-with-marks
7251 |= [file=path src=@t externals=iexternals mark-externals=imark-externals]
10468 |= [file=path src=@t externals=iexternals mark-externals=imark-externals]
7252 ^- @t
10469 ^- @t
@@ -7258,12 +10475,18 @@
7258 =. reserved-molds (weld reserved-molds (turn jimports |=(j=[face=term interface=ifile] face.j)))
10475 =. reserved-molds (weld reserved-molds (turn jimports |=(j=[face=term interface=ifile] face.j)))
7259 =/ parsed (parse file src)
10476 =/ parsed (parse file src)
7260 ?: ?=(%| -.parsed) (show-error src p.parsed)
10477 ?: ?=(%| -.parsed) (show-error src p.parsed)
10478+ =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
10479+ ?^ duplicate (duplicate-fields-report file src u.duplicate)
10480+ ?: (module-has-reserved-proj p.parsed)
10481+ 'module has reserved proj name'
7261 =/ ds=(list def) defs.p.parsed
10482 =/ ds=(list def) defs.p.parsed
7262 =/ molds=imolds (collect-simple-molds ds)
10483 =/ molds=imolds (collect-simple-molds ds)
7263 =/ globals=(list term) (weld prelude-values (weld (turn jimports |=(j=[face=term interface=ifile] face.j)) (global-value-names ds)))
10484 =/ globals=(list term) (weld prelude-values (weld (turn jimports |=(j=[face=term interface=ifile] face.j)) (global-value-names ds)))
7264 =/ surs=(list term) (collect-sur-imports imports.p.parsed)
10485 =/ surs=(list term) (collect-sur-imports imports.p.parsed)
7265 =/ marks=(list term) (collect-mark-imports imports.p.parsed)
10486 =/ marks=(list term) (collect-mark-imports imports.p.parsed)
7266− =/ env=ienv (resolve-supported-defs ds molds globals externals surs mark-externals marks jimports reserved-molds file prelude)
10487+ =/ resolution=iresolved (resolve-groups ds molds globals externals surs mark-externals marks jimports reserved-molds file prelude)
10488+ =/ cycles=(list icycle) (definite-value-cycles ds globals)
10489+ =/ env=ienv env.resolution
7267 =/ lines=(list @t) ~
10490 =/ lines=(list @t) ~
7268 |-
10491 |-
7269 ?~ ds (of-wain:format ['partial inference; module not checked' (flop lines)])
10492 ?~ ds (of-wain:format ['partial inference; module not checked' (flop lines)])
@@ -7272,10 +10495,35 @@
7272 $(ds t.ds, lines [(show-partial-mold file src d molds) lines])
10495 $(ds t.ds, lines [(show-partial-mold file src d molds) lines])
7273 ?. (unique-value-name name.d globals)
10496 ?. (unique-value-name name.d globals)
7274 $(ds t.ds, lines [(crip "++ {(trip name.d)}: name already in scope") lines])
10497 $(ds t.ds, lines [(crip "++ {(trip name.d)}: name already in scope") lines])
10498+ =/ cycle=(list icycle) (skim cycles |=(c=icycle =(name.c name.d)))
10499+ ?^ cycle
10500+ =/ diag=idiag ["non-gate value depends on itself through a cycle" ~[[first.i.cycle "value in cycle"] [next.i.cycle "dependency in cycle"]]]
10501+ $(ds t.ds, lines [(show-inference-diagnostic file src name.d diag) lines])
10502+ ?: (lien grouped.resolution |=(n=term =(n name.d)))
10503+ =/ found=(unit ischeme) (ienv-lookup name.d env)
10504+ ?~ found $(ds t.ds, lines [(crip "++ {(trip name.d)}: recursive group unavailable") lines])
10505+ =/ typ=itype (canonical-itype typ.u.found vars.u.found)
10506+ =/ line=@t (crip "++ {(trip name.d)}: {(show-itype typ ~)}{(show-atom-constraint typ)}")
10507+ $(ds t.ds, lines [line lines])
7275 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
10508 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
7276− =/ result=iresult (infer-fragment val.d env [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | file top prelude])
10509+ =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | file top prelude ~ 256 ~]
10510+ =. initial (reserve-def-caps val.d initial)
10511+ =/ result=iresult
10512+ ?: |(?=(%gate -.val.d) ?=(%gate-wide -.val.d))
10513+ (infer-recursive-gate d env initial)
10514+ (infer-fragment val.d env initial)
7277 ?: ?=(%| -.result)
10515 ?: ?=(%| -.result)
7278 $(ds t.ds, lines [(show-inference-diagnostic file src name.d p.result) lines])
10516 $(ds t.ds, lines [(show-inference-diagnostic file src name.d p.result) lines])
10517+ =. state.p.result (default-hole-numbers holes.state.p.result holes.initial state.p.result env !(itype-has-gate (itype-normalize typ.p.result sub.state.p.result)))
10518+ =/ hole=(unit idiag) (unresolved-hole holes.state.p.result holes.initial state.p.result)
10519+ ?^ hole
10520+ $(ds t.ds, lines [(show-inference-diagnostic file src name.d u.hole) lines])
10521+ =/ merged=(unit [first=icap second=icap])
10522+ (merged-capitals caps.state.p.result sub.state.p.result)
10523+ ?^ merged
10524+ =/ diag=idiag
10525+ ["distinct type variables `{(trip name.first.u.merged)}` and `{(trip name.second.u.merged)}` must not be forced equal; use the same capital for a shared type" ~[[at.first.u.merged "first type variable"] [at.second.u.merged "second type variable"]]]
10526+ $(ds t.ds, lines [(show-inference-diagnostic file src name.d diag) lines])
7279 ?: (constrained-capitals caps.state.p.result sub.state.p.result)
10527 ?: (constrained-capitals caps.state.p.result sub.state.p.result)
7280 $(ds t.ds, lines [(crip "++ {(trip name.d)}: explicit capital constraints are not supported by partial inference") lines])
10528 $(ds t.ds, lines [(crip "++ {(trip name.d)}: explicit capital constraints are not supported by partial inference") lines])
7281 =/ typ=itype (default-decimals (itype-normalize typ.p.result sub.state.p.result))
10529 =/ typ=itype (default-decimals (itype-normalize typ.p.result sub.state.p.result))
@@ -7292,6 +10540,8 @@
7292 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
10540 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
7293 ?: (gth (lent vars) 26)
10541 ?: (gth (lent vars) 26)
7294 $(ds t.ds, lines [(crip "++ {(trip name.d)}: too many variables for partial printer") lines])
10542 $(ds t.ds, lines [(crip "++ {(trip name.d)}: too many variables for partial printer") lines])
10543+ ?~ (width-finalize projections.state.p.result sub.state.p.result vars)
10544+ $(ds t.ds, lines [(crip "++ {(trip name.d)}: record projection elaboration needs unsupported inference") lines])
7295 =/ printable=itype (canonical-itype typ vars)
10545 =/ printable=itype (canonical-itype typ vars)
7296 =/ line=@t (crip "++ {(trip name.d)}: {(show-itype printable ~)}{(show-atom-constraint printable)}")
10546 =/ line=@t (crip "++ {(trip name.d)}: {(show-itype printable ~)}{(show-atom-constraint printable)}")
7297 $(ds t.ds, lines [line lines])
10547 $(ds t.ds, lines [line lines])
jibb-dev/lib/jibb/internal.jibbnew file+16
@@ -0,0 +1,16 @@
1+/= core /lib/jibb/primitives
2+
3+:: Representation for agent and in-process store pokes.
4+:: The prelude re-exports this mold; effect lowering and the runtime must
5+:: agree on these cells when effect execution is implemented.
6++$ poke
7+ [%agent agent=@tas mark=@tas payload=*]
8+ [%store module=@t action=@tas payload=*]
9+
10+:: The compiler supplies this private interface; execution is not yet implemented.
11+++ gth-atom |= args=[A A] (raw-gth.core args)
12+
13+:: Application paths are knot sequences.
14++$ qath
15+ ~
16+ [i=@ta t=qath]
jibb-dev/lib/jibb/prelude.jibb+119−66
@@ -1,4 +1,9 @@
1+/= internal /lib/jibb/internal
2++$ poke poke.internal
3++$ qath qath.internal
4+
1:: 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.
6+
2++ same |= x=A x
7++ same |= x=A x
3
8
4++ head |= p=[A B]
9++ head |= p=[A B]
@@ -37,16 +42,18 @@
37++ weld |= args=[(list A) (list A)]
42++ weld |= args=[(list A) (list A)]
38 ?- args
43 ?- args
39 [xs ys]
44 [xs ys]
45+ ^- (list A)
40− ?- xs
46+ ?- xs
41− ~ ys
47+ ~ ys
42− [item rest] [item (weld rest ys)]
48+ [item rest] [item (weld rest ys)]
43
49
44++ turn |= args=[(list A) $-(A B)]
50++ turn |= args=[(list A) $-(A B)]
45 ?- args
51 ?- args
46 [xs f]
52 [xs f]
53+ ^- (list B)
47− ?- xs
54+ ?- xs
48− ~ ~
55+ ~ ~
49− [item rest] [(f item) (turn rest f)]
56+ [item rest] [(f item) (turn rest f)]
50
57
51+$ dime [p=@ta q=@]
58+$ dime [p=@ta q=@]
52
59
@@ -138,27 +145,34 @@
138 (reverse-into xs ~)
145 (reverse-into xs ~)
139
146
140++ drop |= maybe=(unit A)
147++ drop |= maybe=(unit A)
148+ ^- (list A)
141− ?- maybe
149+ ?- maybe
142− ~ ~
150+ ~ ~
143− [~ value] [value ~]
151+ [~ value] [value ~]
152+
153+++ bond |= fallback=$-(~ A)
154+ |= maybe=(unit A)
155+ ?- maybe
156+ ~ (fallback ~)
157+ [~ value] value
144
158
145++ bind |= args=[(unit A) $-(A B)]
159++ bind |= args=[(unit A) $-(A B)]
146 ?- args
160 ?- args
147− [maybe f]
161+ [maybe f] ^- (unit B)
148 ?- maybe
162 ?- maybe
149 ~ ~
163 ~ ~
150 [~ value] `(f value)
164 [~ value] `(f value)
151
165
152++ biff |= args=[(unit A) $-(A (unit B))]
166++ biff |= args=[(unit A) $-(A (unit B))]
153 ?- args
167 ?- args
154− [maybe f]
168+ [maybe f] ^- (unit B)
155 ?- maybe
169 ?- maybe
156 ~ ~
170 ~ ~
157 [~ value] (f value)
171 [~ value] (f value)
158
172
159++ both |= args=[(unit A) (unit B)]
173++ both |= args=[(unit A) (unit B)]
160 ?- args
174 ?- args
161− [first second]
175+ [first second] ^- (unit [A B])
162 ?- first
176 ?- first
163 ~ ~
177 ~ ~
164 [~ a]
178 [~ a]
@@ -166,9 +180,19 @@
166 ~ ~
180 ~ ~
167 [~ b] `[a b]
181 [~ b] `[a b]
168
182
183+++ clap |= args=[(unit A) (unit A) $-([A A] A)]
184+ ?- args
185+ [first second combine] ^- (unit A)
186+ ?- first
187+ ~ second
188+ [~ a]
189+ ?- second
190+ ~ first
191+ [~ b] `(combine a b)
192+
169++ clef |= args=[(unit A) (unit B) $-([A B] (unit C))]
193++ clef |= args=[(unit A) (unit B) $-([A B] (unit C))]
170 ?- args
194 ?- args
171− [first second combine]
195+ [first second combine] ^- (unit C)
172 ?- first
196 ?- first
173 ~ ~
197 ~ ~
174 [~ a]
198 [~ a]
@@ -178,43 +202,45 @@
178
202
179++ skim |= args=[(list A) $-(A ?)]
203++ skim |= args=[(list A) $-(A ?)]
180 ?- args
204 ?- args
181− [xs predicate]
205+ [xs predicate] ^- (list A)
182− ?- xs
206+ ?- xs
183− ~ ~
207+ ~ ~
184− [item rest]
208+ [item rest]
185− ?- (predicate item)
209+ ?- (predicate item)
186− %.y [item (skim rest predicate)]
210+ %.y [item (skim rest predicate)]
187− %.n (skim rest predicate)
211+ %.n (skim rest predicate)
188
212
189++ skip |= args=[(list A) $-(A ?)]
213++ skip |= args=[(list A) $-(A ?)]
190 ?- args
214 ?- args
191− [xs predicate]
215+ [xs predicate] ^- (list A)
192− ?- xs
216+ ?- xs
193− ~ ~
217+ ~ ~
194− [item rest]
218+ [item rest]
195− ?- (predicate item)
219+ ?- (predicate item)
196− %.y (skip rest predicate)
220+ %.y (skip rest predicate)
197− %.n [item (skip rest predicate)]
221+ %.n [item (skip rest predicate)]
198
222
199++ levy |= args=[(list A) $-(A ?)]
223++ levy |= args=[(list A) $-(A ?)]
224+ ^- ?
200− ?- args
225+ ?- args
201− [xs predicate]
226+ [xs predicate]
202− ?- xs
227+ ?- xs
203− ~ %.y
228+ ~ %.y
204− [item rest]
229+ [item rest]
205− ?- (predicate item)
230+ ?- (predicate item)
206− %.y (levy rest predicate)
231+ %.y (levy rest predicate)
207− %.n %.n
232+ %.n %.n
208
233
209++ lien |= args=[(list A) $-(A ?)]
234++ lien |= args=[(list A) $-(A ?)]
235+ ^- ?
210− ?- args
236+ ?- args
211− [xs predicate]
237+ [xs predicate]
212− ?- xs
238+ ?- xs
213− ~ %.n
239+ ~ %.n
214− [item rest]
240+ [item rest]
215− ?- (predicate item)
241+ ?- (predicate item)
216− %.y %.y
242+ %.y %.y
217− %.n (lien rest predicate)
243+ %.n (lien rest predicate)
218
244
219++ roll |= args=[(list A) B $-([A B] B)]
245++ roll |= args=[(list A) B $-([A B] B)]
220 ?- args
246 ?- args
@@ -232,37 +258,39 @@
232
258
233++ flit |= predicate=$-(A ?)
259++ flit |= predicate=$-(A ?)
234 |= value=A
260 |= value=A
261+ ^- (unit A)
235− ?- (predicate value)
262+ ?- (predicate value)
236− %.y `value
263+ %.y `value
237− %.n ~
264+ %.n ~
238
265
239++ murn |= args=[(list A) $-(A (unit B))]
266++ murn |= args=[(list A) $-(A (unit B))]
240 ?- args
267 ?- args
241− [xs f]
268+ [xs f] ^- (list B)
242− ?- xs
269+ ?- xs
243− ~ ~
270+ ~ ~
244− [item rest]
271+ [item rest]
245− ?- (f item)
272+ ?- (f item)
246− ~ (murn rest f)
273+ ~ (murn rest f)
247− [~ value] [value (murn rest f)]
274+ [~ value] [value (murn rest f)]
248
275
249++ join |= args=[A (list A)]
276++ join |= args=[A (list A)]
250 ?- args
277 ?- args
251− [separator xs]
278+ [separator xs] ^- (list A)
252− ?- xs
279+ ?- xs
253− ~ ~
280+ ~ ~
254− [item rest]
281+ [item rest]
255− ?- rest
282+ ?- rest
256− ~ [item ~]
283+ ~ [item ~]
257− [next more] [item [separator (join separator rest)]]
284+ [next more] [item [separator (join separator rest)]]
258
285
259++ snip |= xs=(list A)
286++ snip |= xs=(list A)
287+ ^- (list A)
260− ?- xs
288+ ?- xs
261− ~ ~
289+ ~ ~
262− [item rest]
290+ [item rest]
263− ?- rest
291+ ?- rest
264− ~ ~
292+ ~ ~
265− [next more] [item (snip rest)]
293+ [next more] [item (snip rest)]
266
294
267++ rear |= xs=(list A)
295++ rear |= xs=(list A)
268 ?- xs
296 ?- xs
@@ -271,3 +299,28 @@
271 ?- rest
299 ?- rest
272 ~ item
300 ~ item
273 [next more] (rear rest)
301 [next more] (rear rest)
302+
303+++ cork |= gates=[$-(A B) $-(B C)]
304+ ?- gates
305+ [f g] |= x=A (g (f x))
306+
307+++ corl |= gates=[$-(B C) $-(A B)]
308+ ?- gates
309+ [f g] |= x=A (f (g x))
310+
311+++ cury |= args=[$-([A B] C) A]
312+ ?- args
313+ [f a] |= b=B (f a b)
314+
315+++ curr |= args=[$-([A B] C) B]
316+ ?- args
317+ [f b] |= a=A (f a b)
318+
319++$ cmd |$ [M]
320+ [%poke p=poke reply=$-((unit @t) M)]
321+ [%go url=@t]
322+ [%wait gap=@dr msg=M]
323+ [%now reply=$-(@da M)]
324+ [%who reply=$-(@p M)]
325+
326+++ gth |= args=[A A] (gth-atom.internal args)
tests/clay-fixtures/mark-update-import-expected.txtnew file+1
@@ -0,0 +1 @@
1+"(union [added item=[id=@ud [done=(union @f:0 @f:1) text=@t]]] [toggled id=@ud])"
tests/clay-fixtures/mark-update-import.txtnew file+9
@@ -0,0 +1,9 @@
1+=/ m (strand ,vase)
2+;< =bowl:spider bind:m get-bowl
3+=/ now=@da now.bowl
4+=/ mark=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/mar/todo-update/hoon)
5+=/ reader=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/lib/jibb-import/hoon)
6+=/ read-gate=vase (slap reader (ream 'read-mark'))
7+=/ got=vase (slym read-gate [%todo-update -.mark])
8+=/ show-gate=vase (slap reader (ream 'show-result'))
9+(pure:m (slym show-gate +.got))
tests/clay-fixtures/tlon-mop-expected.txtnew file+1
@@ -0,0 +1 @@
1+[%.y %.y %.y]
tests/clay-fixtures/tlon-mop.txtnew file+20
@@ -0,0 +1,20 @@
1+=/ m (strand ,vase)
2+;< =bowl:spider bind:m get-bowl
3+=/ now=@da now.bowl
4+=/ src=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/sur/mop-tlon-probe/hoon)
5+=/ reader=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/lib/jibb-import/hoon)
6+=/ read-gate=vase (slap reader (ream 'read-named'))
7+=/ result=vase (slym read-gate [%notes %log -.src])
8+=/ recursive=vase (slym read-gate [%notes %import-node -.src])
9+=/ nested=vase (slym read-gate [%notes %a-notebook -.src])
10+=/ contains-ref
11+ |= node=*
12+ ?: =(node [%ref %notes %import-node]) &
13+ ?@ node |
14+ |($(node -.node) $(node +.node))
15+=/ contains-named
16+ |= node=*
17+ ?: ?=([%named %notes %import-node [%fork *]] node) (contains-ref node)
18+ ?@ node |
19+ |($(node -.node) $(node +.node))
20+(pure:m !>([?=([%& [%apply %mop [[%atom %da ~] [%fork *] ~]]] +.result) &(?=([%& [%fork *]] +.recursive) (contains-ref +.recursive)) &(?=([%& [%fork *]] +.nested) (contains-named +.nested))]))
tests/golden/doc-grammar-04-step/about.txt+1
@@ -1,3 +1,4 @@
1source: Grammar tab, section "Patterns", code block 4 of the tab
1source: Grammar tab, section "Patterns", code block 4 of the tab
2tests: a union `+$ step` with one case per deeper line: cells with tags at the head, in the middle and at the end, faced fields, and a bare term; a blank line between definitions; a `?-` whose arms are cell patterns mixing tags and binding names, and a bare term, with their expressions aligned by extra spaces; interpolated strings and a name as arm expressions
2tests: a union `+$ step` with one case per deeper line: cells with tags at the head, in the middle and at the end, faced fields, and a bare term; a blank line between definitions; a `?-` whose arms are cell patterns mixing tags and binding names, and a bare term, with their expressions aligned by extra spaces; interpolated strings and a name as arm expressions
3expect: parses
3expect: parses
4+expect-types: a partial inference report
tests/golden/doc-grammar-04-step/modules.txtnew file+1
@@ -0,0 +1 @@
1+# no module fixtures
tests/golden/doc-grammar-04-step/source.jibb+1−1
@@ -10,5 +10,5 @@
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/doc-grammar-04-step/types.txtnew file+3
@@ -0,0 +1,3 @@
1+partial inference; module not checked
2++$ step: cases proven disjoint; mold not checked
3+++ describe: $-(step @t)
tests/golden/doc-grammar-06-cart-store/about.txt+1
@@ -1,3 +1,4 @@
1source: Grammar tab, section "Example: a store and an island", code block 6 of the tab (block 5 is the EBNF)
1source: Grammar tab, section "Example: a store and an island", code block 6 of the tab (block 5 is the EBNF)
2tests: a store module: a record mold with a mold application and the loobean mold `?`; a union with its cases below; a mold that is a name; a blank line; `++ main (store init update)`; a cast with its mold and expression on one line, `^- state [~ %.n]`; a gate with a cell sample; `?-` arms whose expressions are changes, `s(items=[item items.s])` and `s(open=(not open.s))`
2tests: a store module: a record mold with a mold application and the loobean mold `?`; a union with its cases below; a mold that is a name; a blank line; `++ main (store init update)`; a cast with its mold and expression on one line, `^- state [~ %.n]`; a gate with a cell sample; `?-` arms whose expressions are changes, `s(items=[item items.s])` and `s(open=(not open.s))`
3expect: parses
3expect: parses
4+expect-types: a partial inference report; store kind and declaration scope remain unresolved
tests/golden/doc-grammar-06-cart-store/modules.txtnew file+1
@@ -0,0 +1 @@
1+# no module fixtures
tests/golden/doc-grammar-06-cart-store/types.txtnew file+2
@@ -0,0 +1,2 @@
1+partial inference; module not checked
2+module kind or scope needs unsupported inference
tests/golden/inline-mold-opaque/about.txt+2−2
@@ -1,3 +1,3 @@
1−source: Grammar tab, Molds: "Opaque: `poke`, `ask` and `qath`, built only by derived gates, `pure` and application-path literals."
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−6
@@ -37,16 +37,18 @@
37++ weld |= args=[(list A) (list A)]
37++ weld |= args=[(list A) (list A)]
38 ?- args
38 ?- args
39 [xs ys]
39 [xs ys]
40+ ^- (list A)
40− ?- xs
41+ ?- xs
41− ~ ys
42+ ~ ys
42− [item rest] [item (weld rest ys)]
43+ [item rest] [item (weld rest ys)]
43
44
44++ turn |= args=[(list A) $-(A B)]
45++ turn |= args=[(list A) $-(A B)]
45 ?- args
46 ?- args
46 [xs f]
47 [xs f]
48+ ^- (list B)
47− ?- xs
49+ ?- xs
48− ~ ~
50+ ~ ~
49− [item rest] [(f item) (turn rest f)]
51+ [item rest] [(f item) (turn rest f)]
50
52
51+$ dime [p=@ta q=@]
53+$ dime [p=@ta q=@]
52
54
tests/golden/prelude-1c-structural/tokens.txt+454−440
@@ -190,528 +190,542 @@
19039:9 name ys
19039:9 name ys
19139:11 tight glyph ]
19139:11 tight glyph ]
19240:7 INDENT
19240:7 INDENT
193−40:7 glyph ?-
193+40:7 glyph ^-
194−40:10 name xs
194+40:10 glyph (
195+40:11 tight name list
196+40:16 tvar A
197+40:17 tight glyph )
19541:9 INDENT
19841:9 INDENT
196−41:9 lit ~
199+41:9 glyph ?-
200+41:12 name xs
201+42:11 INDENT
202+42:11 lit ~
197−41:11 name ys
203+42:13 name ys
198−42:9 NEWLINE
204+43:11 NEWLINE
199−42:9 glyph [
205+43:11 glyph [
200−42:10 tight name item
206+43:12 tight name item
201−42:15 name rest
207+43:17 name rest
202−42:19 tight glyph ]
208+43:21 tight glyph ]
203−42:21 glyph [
209+43:23 glyph [
204−42:22 tight name item
210+43:24 tight name item
205−42:27 glyph (
211+43:29 glyph (
206−42:28 tight name weld
212+43:30 tight name weld
207−42:33 name rest
213+43:35 name rest
208−42:38 name ys
214+43:40 name ys
209−42:40 tight glyph )
215+43:42 tight glyph )
210−42:41 tight glyph ]
216+43:43 tight glyph ]
217+45:1 DEDENT
211−44:1 DEDENT
218+45:1 DEDENT
212−44:1 DEDENT
219+45:1 DEDENT
213−44:1 DEDENT
220+45:1 DEDENT
214−44:1 DEDENT
221+45:1 DEDENT
215−44:1 NEWLINE
222+45:1 NEWLINE
216−44:1 glyph ++
223+45:1 glyph ++
217−44:4 name turn
224+45:4 name turn
218−44:9 glyph |=
225+45:9 glyph |=
219−44:12 name args
226+45:12 name args
220−44:16 tight glyph =
227+45:16 tight glyph =
221−44:17 tight glyph [
228+45:17 tight glyph [
222−44:18 tight glyph (
229+45:18 tight glyph (
223−44:19 tight name list
230+45:19 tight name list
224−44:24 tvar A
231+45:24 tvar A
225−44:25 tight glyph )
232+45:25 tight glyph )
226−44:27 glyph $-(
233+45:27 glyph $-(
227−44:30 tight tvar A
234+45:30 tight tvar A
228−44:32 tvar B
235+45:32 tvar B
229−44:33 tight glyph )
236+45:33 tight glyph )
230−44:34 tight glyph ]
237+45:34 tight glyph ]
231−45:3 INDENT
238+46:3 INDENT
232−45:3 glyph ?-
239+46:3 glyph ?-
233−45:6 name args
240+46:6 name args
234−46:5 INDENT
241+47:5 INDENT
235−46:5 glyph [
242+47:5 glyph [
236−46:6 tight name xs
243+47:6 tight name xs
237−46:9 name f
244+47:9 name f
238−46:10 tight glyph ]
245+47:10 tight glyph ]
239−47:7 INDENT
246+48:7 INDENT
240−47:7 glyph ?-
247+48:7 glyph ^-
241−47:10 name xs
248+48:10 glyph (
249+48:11 tight name list
250+48:16 tvar B
251+48:17 tight glyph )
242−48:9 INDENT
252+49:9 INDENT
253+49:9 glyph ?-
254+49:12 name xs
255+50:11 INDENT
243−48:9 lit ~
256+50:11 lit ~
244−48:11 lit ~
257+50:13 lit ~
245−49:9 NEWLINE
258+51:11 NEWLINE
246−49:9 glyph [
259+51:11 glyph [
247−49:10 tight name item
260+51:12 tight name item
248−49:15 name rest
261+51:17 name rest
249−49:19 tight glyph ]
262+51:21 tight glyph ]
250−49:21 glyph [
263+51:23 glyph [
251−49:22 tight glyph (
264+51:24 tight glyph (
252−49:23 tight name f
265+51:25 tight name f
253−49:25 name item
266+51:27 name item
254−49:29 tight glyph )
255−49:31 glyph (
267+51:31 tight glyph )
268+51:33 glyph (
256−49:32 tight name turn
269+51:34 tight name turn
257−49:37 name rest
270+51:39 name rest
258−49:42 name f
271+51:44 name f
259−49:43 tight glyph )
272+51:45 tight glyph )
260−49:44 tight glyph ]
273+51:46 tight glyph ]
261−51:1 DEDENT
274+53:1 DEDENT
262−51:1 DEDENT
275+53:1 DEDENT
263−51:1 DEDENT
276+53:1 DEDENT
264−51:1 DEDENT
277+53:1 DEDENT
265−51:1 NEWLINE
278+53:1 DEDENT
266−51:1 glyph +$
267−51:4 name dime
268−51:9 glyph [
269−51:10 tight name p
270−51:11 tight glyph =
271−51:12 tight aura @ta
272−51:16 name q
273−51:17 tight glyph =
274−51:18 tight aura @
275−51:19 tight glyph ]
27653:1 NEWLINE
27953:1 NEWLINE
27753:1 glyph +$
28053:1 glyph +$
278−53:4 name hair
281+53:4 name dime
27953:9 glyph [
28253:9 glyph [
28053:10 tight name p
28353:10 tight name p
28153:11 tight glyph =
28453:11 tight glyph =
282−53:12 tight aura @ud
285+53:12 tight aura @ta
28353:16 name q
28653:16 name q
28453:17 tight glyph =
28753:17 tight glyph =
285−53:18 tight aura @ud
288+53:18 tight aura @
286−53:21 tight glyph ]
289+53:19 tight glyph ]
28755:1 NEWLINE
29055:1 NEWLINE
28855:1 glyph +$
29155:1 glyph +$
289−55:4 name pint
292+55:4 name hair
29055:9 glyph [
29355:9 glyph [
29155:10 tight name p
29455:10 tight name p
29255:11 tight glyph =
29555:11 tight glyph =
293−55:12 tight glyph [
296+55:12 tight aura @ud
294−55:13 tight name p
297+55:16 name q
295−55:14 tight glyph =
298+55:17 tight glyph =
296−55:15 tight aura @
297−55:17 name q
298−55:18 tight glyph =
299+55:18 tight aura @ud
299−55:19 tight aura @
300−55:20 tight glyph ]
301−55:22 name q
302−55:23 tight glyph =
303−55:24 tight glyph [
304−55:25 tight name p
305−55:26 tight glyph =
306−55:27 tight aura @
307−55:29 name q
308−55:30 tight glyph =
309−55:31 tight aura @
310−55:32 tight glyph ]
311−55:33 tight glyph ]
300+55:21 tight glyph ]
31257:1 NEWLINE
30157:1 NEWLINE
31357:1 glyph +$
30257:1 glyph +$
314−57:4 name coin
303+57:4 name pint
315−58:3 INDENT
316−58:3 glyph [
317−58:4 tight lit %$
318−58:7 name p
319−58:8 tight glyph =
320−58:9 tight name dime
321−58:13 tight glyph ]
304+57:9 glyph [
322−59:3 NEWLINE
323−59:3 glyph [
324−59:4 tight lit %blob
325−59:10 name p
305+57:10 tight name p
326−59:11 tight glyph =
306+57:11 tight glyph =
327−59:12 tight glyph *
307+57:12 tight glyph [
328−59:13 tight glyph ]
308+57:13 tight name p
329−60:3 NEWLINE
309+57:14 tight glyph =
310+57:15 tight aura @
311+57:17 name q
312+57:18 tight glyph =
313+57:19 tight aura @
314+57:20 tight glyph ]
315+57:22 name q
316+57:23 tight glyph =
317+57:24 tight glyph [
318+57:25 tight name p
319+57:26 tight glyph =
320+57:27 tight aura @
321+57:29 name q
322+57:30 tight glyph =
323+57:31 tight aura @
324+57:32 tight glyph ]
325+57:33 tight glyph ]
326+59:1 NEWLINE
327+59:1 glyph +$
328+59:4 name coin
329+60:3 INDENT
33060:3 glyph [
33060:3 glyph [
331−60:4 tight lit %many
331+60:4 tight lit %$
332+60:7 name p
333+60:8 tight glyph =
334+60:9 tight name dime
335+60:13 tight glyph ]
336+61:3 NEWLINE
337+61:3 glyph [
338+61:4 tight lit %blob
339+61:10 name p
340+61:11 tight glyph =
341+61:12 tight glyph *
342+61:13 tight glyph ]
343+62:3 NEWLINE
344+62:3 glyph [
345+62:4 tight lit %many
332−60:10 name p
346+62:10 name p
333−60:11 tight glyph =
347+62:11 tight glyph =
334−60:12 tight glyph (
348+62:12 tight glyph (
335−60:13 tight name list
349+62:13 tight name list
336−60:18 name coin
350+62:18 name coin
337−60:22 tight glyph )
351+62:22 tight glyph )
338−60:23 tight glyph ]
352+62:23 tight glyph ]
339−62:1 DEDENT
353+64:1 DEDENT
340−62:1 NEWLINE
341−62:1 glyph +$
342−62:4 name pair
343−62:9 glyph |$
344−62:12 glyph [
345−62:13 tight tvar A
346−62:15 tvar B
347−62:16 tight glyph ]
348−62:18 glyph [
349−62:19 tight name p
350−62:20 tight glyph =
351−62:21 tight tvar A
352−62:23 name q
353−62:24 tight glyph =
354−62:25 tight tvar B
355−62:26 tight glyph ]
35664:1 NEWLINE
35464:1 NEWLINE
35764:1 glyph +$
35564:1 glyph +$
358−64:4 name trel
356+64:4 name pair
35964:9 glyph |$
35764:9 glyph |$
36064:12 glyph [
35864:12 glyph [
36164:13 tight tvar A
35964:13 tight tvar A
36264:15 tvar B
36064:15 tvar B
363−64:17 tvar C
361+64:16 tight glyph ]
364−64:18 tight glyph ]
365−64:20 glyph [
362+64:18 glyph [
366−64:21 tight name p
363+64:19 tight name p
367−64:22 tight glyph =
364+64:20 tight glyph =
368−64:23 tight tvar A
365+64:21 tight tvar A
369−64:25 name q
366+64:23 name q
370−64:26 tight glyph =
367+64:24 tight glyph =
371−64:27 tight tvar B
368+64:25 tight tvar B
372−64:29 name r
373−64:30 tight glyph =
374−64:31 tight tvar C
375−64:32 tight glyph ]
369+64:26 tight glyph ]
37666:1 NEWLINE
37066:1 NEWLINE
37766:1 glyph +$
37166:1 glyph +$
378−66:4 name qual
372+66:4 name trel
37966:9 glyph |$
37366:9 glyph |$
38066:12 glyph [
37466:12 glyph [
38166:13 tight tvar A
37566:13 tight tvar A
38266:15 tvar B
37666:15 tvar B
38366:17 tvar C
37766:17 tvar C
384−66:19 tvar D
378+66:18 tight glyph ]
385−66:20 tight glyph ]
386−66:22 glyph [
379+66:20 glyph [
380+66:21 tight name p
381+66:22 tight glyph =
387−66:23 tight name p
382+66:23 tight tvar A
388−66:24 tight glyph =
389−66:25 tight tvar A
390−66:27 name q
383+66:25 name q
391−66:28 tight glyph =
384+66:26 tight glyph =
392−66:29 tight tvar B
385+66:27 tight tvar B
393−66:31 name r
386+66:29 name r
394−66:32 tight glyph =
387+66:30 tight glyph =
395−66:33 tight tvar C
388+66:31 tight tvar C
396−66:35 name s
397−66:36 tight glyph =
398−66:37 tight tvar D
399−66:38 tight glyph ]
389+66:32 tight glyph ]
40068:1 NEWLINE
39068:1 NEWLINE
40168:1 glyph +$
39168:1 glyph +$
402−68:4 name cord
392+68:4 name qual
403−68:9 aura @t
393+68:9 glyph |$
394+68:12 glyph [
395+68:13 tight tvar A
396+68:15 tvar B
397+68:17 tvar C
398+68:19 tvar D
399+68:20 tight glyph ]
400+68:22 glyph [
401+68:23 tight name p
402+68:24 tight glyph =
403+68:25 tight tvar A
404+68:27 name q
405+68:28 tight glyph =
406+68:29 tight tvar B
407+68:31 name r
408+68:32 tight glyph =
409+68:33 tight tvar C
410+68:35 name s
411+68:36 tight glyph =
412+68:37 tight tvar D
413+68:38 tight glyph ]
40470:1 NEWLINE
41470:1 NEWLINE
40570:1 glyph +$
41570:1 glyph +$
406−70:4 name knot
416+70:4 name cord
407−70:9 aura @ta
417+70:9 aura @t
40872:1 NEWLINE
41872:1 NEWLINE
40972:1 glyph +$
41972:1 glyph +$
410−72:4 name tape
420+72:4 name knot
411−72:9 glyph (
412−72:10 tight name list
413−72:15 aura @tD
421+72:9 aura @ta
414−72:18 tight glyph )
41574:1 NEWLINE
42274:1 NEWLINE
41674:1 glyph +$
42374:1 glyph +$
417−74:4 name path
424+74:4 name tape
41874:9 glyph (
42574:9 glyph (
41974:10 tight name list
42674:10 tight name list
420−74:15 name knot
427+74:15 aura @tD
421−74:19 tight glyph )
428+74:18 tight glyph )
42276:1 NEWLINE
42976:1 NEWLINE
42376:1 glyph +$
43076:1 glyph +$
424−76:4 name tank
431+76:4 name path
432+76:9 glyph (
433+76:10 tight name list
434+76:15 name knot
435+76:19 tight glyph )
436+78:1 NEWLINE
437+78:1 glyph +$
438+78:4 name tank
425−77:3 INDENT
439+79:3 INDENT
426−77:3 name cord
440+79:3 name cord
427−78:3 NEWLINE
428−78:3 glyph [
429−78:4 tight lit %leaf
430−78:10 name p
431−78:11 tight glyph =
432−78:12 tight name tape
433−78:16 tight glyph ]
434−79:3 NEWLINE
435−79:3 glyph [
436−79:4 tight lit %palm
437−79:10 name p
438−79:11 tight glyph =
439−79:12 tight glyph (
440−79:13 tight name qual
441−79:18 name tape
442−79:23 name tape
443−79:28 name tape
444−79:33 name tape
445−79:37 tight glyph )
446−79:39 name q
447−79:40 tight glyph =
448−79:41 tight glyph (
449−79:42 tight name list
450−79:47 name tank
451−79:51 tight glyph )
452−79:52 tight glyph ]
45380:3 NEWLINE
44180:3 NEWLINE
45480:3 glyph [
44280:3 glyph [
455−80:4 tight lit %rose
443+80:4 tight lit %leaf
45680:10 name p
44480:10 name p
45780:11 tight glyph =
44580:11 tight glyph =
458−80:12 tight glyph (
446+80:12 tight name tape
447+80:16 tight glyph ]
448+81:3 NEWLINE
449+81:3 glyph [
450+81:4 tight lit %palm
451+81:10 name p
452+81:11 tight glyph =
453+81:12 tight glyph (
459−80:13 tight name trel
454+81:13 tight name qual
460−80:18 name tape
455+81:18 name tape
461−80:23 name tape
456+81:23 name tape
462−80:28 name tape
457+81:28 name tape
458+81:33 name tape
463−80:32 tight glyph )
459+81:37 tight glyph )
464−80:34 name q
460+81:39 name q
465−80:35 tight glyph =
461+81:40 tight glyph =
466−80:36 tight glyph (
462+81:41 tight glyph (
467−80:37 tight name list
463+81:42 tight name list
468−80:42 name tank
464+81:47 name tank
469−80:46 tight glyph )
470−80:47 tight glyph ]
465+81:51 tight glyph )
471−82:1 DEDENT
466+81:52 tight glyph ]
472−82:1 NEWLINE
467+82:3 NEWLINE
473−82:1 glyph +$
468+82:3 glyph [
474−82:4 name nail
469+82:4 tight lit %rose
475−82:9 glyph [
476−82:10 tight name p
470+82:10 name p
47782:11 tight glyph =
47182:11 tight glyph =
478−82:12 tight name hair
472+82:12 tight glyph (
473+82:13 tight name trel
474+82:18 name tape
475+82:23 name tape
476+82:28 name tape
477+82:32 tight glyph )
479−82:17 name q
478+82:34 name q
480−82:18 tight glyph =
479+82:35 tight glyph =
481−82:19 tight name tape
480+82:36 tight glyph (
481+82:37 tight name list
482+82:42 name tank
483+82:46 tight glyph )
482−82:23 tight glyph ]
484+82:47 tight glyph ]
485+84:1 DEDENT
48384:1 NEWLINE
48684:1 NEWLINE
48484:1 glyph +$
48784:1 glyph +$
485−84:4 name edge
488+84:4 name nail
48684:9 glyph [
48984:9 glyph [
48784:10 tight name p
49084:10 tight name p
48884:11 tight glyph =
49184:11 tight glyph =
48984:12 tight name hair
49284:12 tight name hair
49084:17 name q
49384:17 name q
49184:18 tight glyph =
49484:18 tight glyph =
492−84:19 tight glyph (
495+84:19 tight name tape
493−84:20 tight name unit
494−84:25 glyph [
495−84:26 tight name p
496−84:27 tight glyph =
497−84:28 tight glyph *
498−84:30 name q
499−84:31 tight glyph =
500−84:32 tight name nail
501−84:36 tight glyph ]
502−84:37 tight glyph )
503−84:38 tight glyph ]
496+84:23 tight glyph ]
50486:1 NEWLINE
49786:1 NEWLINE
50586:1 glyph +$
49886:1 glyph +$
506−86:4 name rule
499+86:4 name edge
507−86:9 glyph $-(
500+86:9 glyph [
501+86:10 tight name p
502+86:11 tight glyph =
503+86:12 tight name hair
504+86:17 name q
505+86:18 tight glyph =
506+86:19 tight glyph (
507+86:20 tight name unit
508+86:25 glyph [
509+86:26 tight name p
510+86:27 tight glyph =
511+86:28 tight glyph *
512+86:30 name q
513+86:31 tight glyph =
508−86:12 tight name nail
514+86:32 tight name nail
509−86:17 name edge
515+86:36 tight glyph ]
510−86:21 tight glyph )
516+86:37 tight glyph )
517+86:38 tight glyph ]
51188:1 NEWLINE
51888:1 NEWLINE
51288:1 glyph +$
51988:1 glyph +$
513−88:4 name spot
520+88:4 name rule
514−88:9 glyph [
521+88:9 glyph $-(
515−88:10 tight name p
516−88:11 tight glyph =
517−88:12 tight name path
522+88:12 tight name nail
518−88:17 name q
523+88:17 name edge
519−88:18 tight glyph =
524+88:21 tight glyph )
520−88:19 tight name pint
521−88:23 tight glyph ]
52290:1 NEWLINE
52590:1 NEWLINE
52390:1 glyph +$
52690:1 glyph +$
524−90:4 name toon
527+90:4 name spot
528+90:9 glyph [
529+90:10 tight name p
530+90:11 tight glyph =
531+90:12 tight name path
532+90:17 name q
533+90:18 tight glyph =
534+90:19 tight name pint
535+90:23 tight glyph ]
536+92:1 NEWLINE
537+92:1 glyph +$
538+92:4 name toon
525−91:3 INDENT
539+93:3 INDENT
526−91:3 glyph [
527−91:4 tight lit %0
528−91:7 name p
529−91:8 tight glyph =
530−91:9 tight glyph *
531−91:10 tight glyph ]
532−92:3 NEWLINE
533−92:3 glyph [
534−92:4 tight lit %1
535−92:7 name p
536−92:8 tight glyph =
537−92:9 tight glyph *
538−92:10 tight glyph ]
539−93:3 NEWLINE
54093:3 glyph [
54093:3 glyph [
541−93:4 tight lit %2
541+93:4 tight lit %0
54293:7 name p
54293:7 name p
54393:8 tight glyph =
54393:8 tight glyph =
544−93:9 tight glyph (
544+93:9 tight glyph *
545+93:10 tight glyph ]
546+94:3 NEWLINE
547+94:3 glyph [
548+94:4 tight lit %1
549+94:7 name p
550+94:8 tight glyph =
551+94:9 tight glyph *
552+94:10 tight glyph ]
553+95:3 NEWLINE
554+95:3 glyph [
555+95:4 tight lit %2
556+95:7 name p
557+95:8 tight glyph =
558+95:9 tight glyph (
545−93:10 tight name list
559+95:10 tight name list
546−93:15 name tank
560+95:15 name tank
547−93:19 tight glyph )
561+95:19 tight glyph )
548−93:20 tight glyph ]
562+95:20 tight glyph ]
549−95:1 DEDENT
563+97:1 DEDENT
550−95:1 NEWLINE
551−95:1 glyph +$
552−95:4 name like
553−95:9 glyph |$
554−95:12 glyph [
555−95:13 tight tvar A
556−95:14 tight glyph ]
557−95:16 glyph [
558−95:17 tight name p
559−95:18 tight glyph =
560−95:19 tight name hair
561−95:24 name q
562−95:25 tight glyph =
563−95:26 tight glyph (
564−95:27 tight name unit
565−95:32 glyph [
566−95:33 tight name p
567−95:34 tight glyph =
568−95:35 tight tvar A
569−95:37 name q
570−95:38 tight glyph =
571−95:39 tight name nail
572−95:43 tight glyph ]
573−95:44 tight glyph )
574−95:45 tight glyph ]
57597:1 NEWLINE
56497:1 NEWLINE
576−97:1 glyph ++
565+97:1 glyph +$
566+97:4 name like
567+97:9 glyph |$
568+97:12 glyph [
569+97:13 tight tvar A
570+97:14 tight glyph ]
571+97:16 glyph [
572+97:17 tight name p
573+97:18 tight glyph =
574+97:19 tight name hair
575+97:24 name q
576+97:25 tight glyph =
577+97:26 tight glyph (
578+97:27 tight name unit
579+97:32 glyph [
580+97:33 tight name p
581+97:34 tight glyph =
582+97:35 tight tvar A
583+97:37 name q
584+97:38 tight glyph =
585+97:39 tight name nail
586+97:43 tight glyph ]
587+97:44 tight glyph )
588+97:45 tight glyph ]
589+99:1 NEWLINE
590+99:1 glyph ++
577−97:4 name wonk
591+99:4 name wonk
578−97:9 glyph |=
592+99:9 glyph |=
579−97:12 name veq
593+99:12 name veq
580−97:15 tight glyph =
594+99:15 tight glyph =
581−97:16 tight glyph (
595+99:16 tight glyph (
582−97:17 tight name like
596+99:17 tight name like
583−97:22 tvar A
597+99:22 tvar A
584−97:23 tight glyph )
598+99:23 tight glyph )
585−98:3 INDENT
599+100:3 INDENT
586−98:3 glyph ?-
600+100:3 glyph ?-
587−98:6 wing q.veq
601+100:6 wing q.veq
588−99:5 INDENT
602+101:5 INDENT
589−99:5 lit ~
603+101:5 lit ~
590−99:7 glyph !!
604+101:7 glyph !!
591−100:5 NEWLINE
605+102:5 NEWLINE
592−100:5 glyph [
606+102:5 glyph [
593−100:6 tight lit ~
607+102:6 tight lit ~
594−100:8 name product
608+102:8 name product
595−100:15 tight glyph ]
609+102:15 tight glyph ]
596−100:17 wing p.product
610+102:17 wing p.product
597−102:1 DEDENT
611+104:1 DEDENT
598−102:1 DEDENT
612+104:1 DEDENT
599−102:1 NEWLINE
600−102:1 glyph +$
601−102:4 name lone
602−102:9 glyph |$
603−102:12 glyph [
604−102:13 tight tvar A
605−102:14 tight glyph ]
606−102:16 glyph [
607−102:17 tight name p
608−102:18 tight glyph =
609−102:19 tight tvar A
610−102:20 tight glyph ]
611104:1 NEWLINE
613104:1 NEWLINE
612104:1 glyph +$
614104:1 glyph +$
613−104:4 name lest
615+104:4 name lone
614104:9 glyph |$
616104:9 glyph |$
615104:12 glyph [
617104:12 glyph [
616104:13 tight tvar A
618104:13 tight tvar A
617104:14 tight glyph ]
619104:14 tight glyph ]
618104:16 glyph [
620104:16 glyph [
619−104:17 tight name i
621+104:17 tight name p
620104:18 tight glyph =
622104:18 tight glyph =
621104:19 tight tvar A
623104:19 tight tvar A
622−104:21 name t
623−104:22 tight glyph =
624−104:23 tight glyph (
625−104:24 tight name list
626−104:29 tvar A
627−104:30 tight glyph )
628−104:31 tight glyph ]
624+104:20 tight glyph ]
629106:1 NEWLINE
625106:1 NEWLINE
630106:1 glyph +$
626106:1 glyph +$
631−106:4 name pole
627+106:4 name lest
632106:9 glyph |$
628106:9 glyph |$
633106:12 glyph [
629106:12 glyph [
634106:13 tight tvar A
630106:13 tight tvar A
635106:14 tight glyph ]
631106:14 tight glyph ]
636−107:3 INDENT
632+106:16 glyph [
637−107:3 lit ~
633+106:17 tight name i
634+106:18 tight glyph =
635+106:19 tight tvar A
636+106:21 name t
637+106:22 tight glyph =
638+106:23 tight glyph (
639+106:24 tight name list
640+106:29 tvar A
641+106:30 tight glyph )
642+106:31 tight glyph ]
638−108:3 NEWLINE
643+108:1 NEWLINE
639−108:3 glyph [
644+108:1 glyph +$
640−108:4 tight tvar A
641−108:6 glyph (
642−108:7 tight name pole
645+108:4 name pole
643−108:12 tvar A
646+108:9 glyph |$
647+108:12 glyph [
644−108:13 tight glyph )
648+108:13 tight tvar A
645108:14 tight glyph ]
649108:14 tight glyph ]
646−110:1 DEDENT
650+109:3 INDENT
651+109:3 lit ~
647−110:1 NEWLINE
652+110:3 NEWLINE
648−110:1 glyph +$
653+110:3 glyph [
649−110:4 name quip
654+110:4 tight tvar A
650−110:9 glyph |$
655+110:6 glyph (
656+110:7 tight name pole
651−110:12 glyph [
657+110:12 tvar A
652−110:13 tight tvar A
658+110:13 tight glyph )
653−110:15 tvar B
654−110:16 tight glyph ]
655−110:18 glyph [
656−110:19 tight glyph (
657−110:20 tight name list
658−110:25 tvar A
659−110:26 tight glyph )
660−110:28 tvar B
661−110:29 tight glyph ]
659+110:14 tight glyph ]
660+112:1 DEDENT
662112:1 NEWLINE
661112:1 NEWLINE
663112:1 glyph +$
662112:1 glyph +$
664−112:4 name tree
663+112:4 name quip
665112:9 glyph |$
664112:9 glyph |$
666112:12 glyph [
665112:12 glyph [
667112:13 tight tvar A
666112:13 tight tvar A
667+112:15 tvar B
668+112:16 tight glyph ]
669+112:18 glyph [
670+112:19 tight glyph (
671+112:20 tight name list
672+112:25 tvar A
673+112:26 tight glyph )
674+112:28 tvar B
675+112:29 tight glyph ]
676+114:1 NEWLINE
677+114:1 glyph +$
678+114:4 name tree
679+114:9 glyph |$
680+114:12 glyph [
681+114:13 tight tvar A
668−112:14 tight glyph ]
682+114:14 tight glyph ]
669−113:3 INDENT
683+115:3 INDENT
670−113:3 lit ~
684+115:3 lit ~
671−114:3 NEWLINE
685+116:3 NEWLINE
672−114:3 glyph [
686+116:3 glyph [
673−114:4 tight name n
687+116:4 tight name n
674−114:5 tight glyph =
688+116:5 tight glyph =
675−114:6 tight tvar A
689+116:6 tight tvar A
676−114:8 name l
690+116:8 name l
677−114:9 tight glyph =
691+116:9 tight glyph =
678−114:10 tight glyph (
692+116:10 tight glyph (
679−114:11 tight name tree
693+116:11 tight name tree
680−114:16 tvar A
694+116:16 tvar A
681−114:17 tight glyph )
695+116:17 tight glyph )
682−114:19 name r
696+116:19 name r
683−114:20 tight glyph =
697+116:20 tight glyph =
684−114:21 tight glyph (
698+116:21 tight glyph (
685−114:22 tight name tree
699+116:22 tight name tree
686−114:27 tvar A
700+116:27 tvar A
687−114:28 tight glyph )
701+116:28 tight glyph )
688−114:29 tight glyph ]
702+116:29 tight glyph ]
689−116:1 DEDENT
703+118:1 DEDENT
690−116:1 NEWLINE
704+118:1 NEWLINE
691−116:1 glyph +$
705+118:1 glyph +$
692−116:4 name each
706+118:4 name each
693−116:9 glyph |$
707+118:9 glyph |$
694−116:12 glyph [
708+118:12 glyph [
695−116:13 tight tvar A
709+118:13 tight tvar A
696−116:15 tvar B
710+118:15 tvar B
697−116:16 tight glyph ]
711+118:16 tight glyph ]
698−117:3 INDENT
712+119:3 INDENT
699−117:3 glyph [
713+119:3 glyph [
700−117:4 tight lit %|
714+119:4 tight lit %|
701−117:7 name p
715+119:7 name p
702−117:8 tight glyph =
716+119:8 tight glyph =
703−117:9 tight tvar B
717+119:9 tight tvar B
704−117:10 tight glyph ]
718+119:10 tight glyph ]
705−118:3 NEWLINE
719+120:3 NEWLINE
706−118:3 glyph [
720+120:3 glyph [
707−118:4 tight lit %&
721+120:4 tight lit %&
708−118:7 name p
722+120:7 name p
709−118:8 tight glyph =
723+120:8 tight glyph =
710−118:9 tight tvar A
724+120:9 tight tvar A
711−118:10 tight glyph ]
725+120:10 tight glyph ]
712−120:1 DEDENT
726+122:1 DEDENT
713−120:1 NEWLINE
727+122:1 NEWLINE
714−120:1 glyph +$
728+122:1 glyph +$
715−120:4 name bloq
729+122:4 name bloq
716−120:9 aura @
730+122:9 aura @
717−120:10 NEWLINE
731+122:10 NEWLINE
tests/golden/prelude-1c-structural/tree.txt+191−185
@@ -87,198 +87,204 @@
87 (arm 39:5
87 (arm 39:5
88 (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
88 (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
89 (body 40:7
89 (body 40:7
90− (branch 40:7
90+ (cast 40:7
91− (wing 40:10 xs)
91+ (apply 40:10 list (tvar 40:16 A))
92− (arm 41:9 (lit 41:9 ~) (wing 41:11 ys))
92+ (body 41:9
93+ (branch 41:9
94+ (wing 41:12 xs)
95+ (arm 42:11 (lit 42:11 ~) (wing 42:13 ys))
93− (arm 42:9
96+ (arm 43:11
94− (cell 42:9 (bind 42:10 item) (bind 42:15 rest))
97+ (cell 43:11 (bind 43:12 item) (bind 43:17 rest))
95− (tuple 42:21
98+ (tuple 43:23
96− (wing 42:22 item)
99+ (wing 43:24 item)
97− (group 42:27
100+ (group 43:29
98− (call 42:28 (wing 42:28 weld) (wing 42:33 rest) (wing 42:38 ys))))))))))))
101+ (call 43:30 (wing 43:30 weld) (wing 43:35 rest) (wing 43:40 ys))))))))))))))
99− (value 44:1 turn
102+ (value 45:1 turn
100− (gate 44:9
103+ (gate 45:9
101− (face 44:12 args
104+ (face 45:12 args
102− (cell 44:17
105+ (cell 45:17
103− (apply 44:18 list (tvar 44:24 A))
106+ (apply 45:18 list (tvar 45:24 A))
104− (fn 44:27 (tvar 44:30 A) (tvar 44:32 B))))
107+ (fn 45:27 (tvar 45:30 A) (tvar 45:32 B))))
105− (body 45:3
108+ (body 46:3
106− (branch 45:3
109+ (branch 46:3
107− (wing 45:6 args)
110+ (wing 46:6 args)
108− (arm 46:5
111+ (arm 47:5
109− (cell 46:5 (bind 46:6 xs) (bind 46:9 f))
112+ (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
110− (body 47:7
113+ (body 48:7
111− (branch 47:7
114+ (cast 48:7
115+ (apply 48:10 list (tvar 48:16 B))
116+ (body 49:9
117+ (branch 49:9
112− (wing 47:10 xs)
118+ (wing 49:12 xs)
113− (arm 48:9 (lit 48:9 ~) (lit 48:11 ~))
119+ (arm 50:11 (lit 50:11 ~) (lit 50:13 ~))
114− (arm 49:9
120+ (arm 51:11
115− (cell 49:9 (bind 49:10 item) (bind 49:15 rest))
121+ (cell 51:11 (bind 51:12 item) (bind 51:17 rest))
116− (tuple 49:21
122+ (tuple 51:23
117− (group 49:22
123+ (group 51:24
118− (call 49:23 (wing 49:23 f) (wing 49:25 item)))
124+ (call 51:25 (wing 51:25 f) (wing 51:27 item)))
119− (group 49:31
125+ (group 51:33
120− (call 49:32 (wing 49:32 turn) (wing 49:37 rest) (wing 49:42 f))))))))))))
126+ (call 51:34 (wing 51:34 turn) (wing 51:39 rest) (wing 51:44 f))))))))))))))
121− (mold 51:1 dime
127+ (mold 53:1 dime
122− (cell 51:9
123− (face 51:10 p (aura 51:12 @ta))
124− (face 51:16 q (aura 51:18 @))))
125− (mold 53:1 hair
126 (cell 53:9
128 (cell 53:9
127− (face 53:10 p (aura 53:12 @ud))
129+ (face 53:10 p (aura 53:12 @ta))
128− (face 53:16 q (aura 53:18 @ud))))
130+ (face 53:16 q (aura 53:18 @))))
129− (mold 55:1 pint
131+ (mold 55:1 hair
130 (cell 55:9
132 (cell 55:9
131− (face 55:10 p
133+ (face 55:10 p (aura 55:12 @ud))
134+ (face 55:16 q (aura 55:18 @ud))))
135+ (mold 57:1 pint
136+ (cell 57:9
137+ (face 57:10 p
132− (cell 55:12
138+ (cell 57:12
133− (face 55:13 p (aura 55:15 @))
139+ (face 57:13 p (aura 57:15 @))
134− (face 55:17 q (aura 55:19 @))))
140+ (face 57:17 q (aura 57:19 @))))
135− (face 55:22 q
141+ (face 57:22 q
136− (cell 55:24
142+ (cell 57:24
137− (face 55:25 p (aura 55:27 @))
143+ (face 57:25 p (aura 57:27 @))
138− (face 55:29 q (aura 55:31 @))))))
144+ (face 57:29 q (aura 57:31 @))))))
139− (mold 57:1 coin
145+ (mold 59:1 coin
140− (union 58:3
146+ (union 60:3
141− (cell 58:3
142− (const 58:4 %$)
143− (face 58:7 p (ref 58:9 dime)))
144− (cell 59:3
145− (const 59:4 %blob)
146− (face 59:10 p (noun 59:12)))
147 (cell 60:3
147 (cell 60:3
148− (const 60:4 %many)
148+ (const 60:4 %$)
149+ (face 60:7 p (ref 60:9 dime)))
150+ (cell 61:3
151+ (const 61:4 %blob)
152+ (face 61:10 p (noun 61:12)))
153+ (cell 62:3
154+ (const 62:4 %many)
149− (face 60:10 p
155+ (face 62:10 p
150− (apply 60:12 list (ref 60:18 coin))))))
156+ (apply 62:12 list (ref 62:18 coin))))))
151− (mold 62:1 pair
157+ (mold 64:1 pair
152− (generic 62:9 A B
158+ (generic 64:9 A B
153− (cell 62:18
159+ (cell 64:18
154− (face 62:19 p (tvar 62:21 A))
160+ (face 64:19 p (tvar 64:21 A))
155− (face 62:23 q (tvar 62:25 B)))))
161+ (face 64:23 q (tvar 64:25 B)))))
156− (mold 64:1 trel
162+ (mold 66:1 trel
157− (generic 64:9 A B C
163+ (generic 66:9 A B C
158− (cell 64:20
164+ (cell 66:20
159− (face 64:21 p (tvar 64:23 A))
165+ (face 66:21 p (tvar 66:23 A))
160− (face 64:25 q (tvar 64:27 B))
166+ (face 66:25 q (tvar 66:27 B))
161− (face 64:29 r (tvar 64:31 C)))))
167+ (face 66:29 r (tvar 66:31 C)))))
162− (mold 66:1 qual
168+ (mold 68:1 qual
163− (generic 66:9 A B C D
169+ (generic 68:9 A B C D
164− (cell 66:22
170+ (cell 68:22
165− (face 66:23 p (tvar 66:25 A))
171+ (face 68:23 p (tvar 68:25 A))
166− (face 66:27 q (tvar 66:29 B))
172+ (face 68:27 q (tvar 68:29 B))
167− (face 66:31 r (tvar 66:33 C))
173+ (face 68:31 r (tvar 68:33 C))
168− (face 66:35 s (tvar 66:37 D)))))
174+ (face 68:35 s (tvar 68:37 D)))))
169− (mold 68:1 cord (aura 68:9 @t))
175+ (mold 70:1 cord (aura 70:9 @t))
170− (mold 70:1 knot (aura 70:9 @ta))
176+ (mold 72:1 knot (aura 72:9 @ta))
171− (mold 72:1 tape
177+ (mold 74:1 tape
172− (apply 72:9 list (aura 72:15 @tD)))
178+ (apply 74:9 list (aura 74:15 @tD)))
173− (mold 74:1 path
179+ (mold 76:1 path
174− (apply 74:9 list (ref 74:15 knot)))
180+ (apply 76:9 list (ref 76:15 knot)))
175− (mold 76:1 tank
181+ (mold 78:1 tank
176− (union 77:3
182+ (union 79:3
177− (ref 77:3 cord)
183+ (ref 79:3 cord)
178− (cell 78:3
179− (const 78:4 %leaf)
180− (face 78:10 p (ref 78:12 tape)))
181− (cell 79:3
182− (const 79:4 %palm)
183− (face 79:10 p
184− (apply 79:12 qual (ref 79:18 tape) (ref 79:23 tape) (ref 79:28 tape) (ref 79:33 tape)))
185− (face 79:39 q
186− (apply 79:41 list (ref 79:47 tank))))
187 (cell 80:3
184 (cell 80:3
188− (const 80:4 %rose)
185+ (const 80:4 %leaf)
186+ (face 80:10 p (ref 80:12 tape)))
187+ (cell 81:3
188+ (const 81:4 %palm)
189+ (face 81:10 p
190+ (apply 81:12 qual (ref 81:18 tape) (ref 81:23 tape) (ref 81:28 tape) (ref 81:33 tape)))
191+ (face 81:39 q
192+ (apply 81:41 list (ref 81:47 tank))))
193+ (cell 82:3
194+ (const 82:4 %rose)
189− (face 80:10 p
195+ (face 82:10 p
190− (apply 80:12 trel (ref 80:18 tape) (ref 80:23 tape) (ref 80:28 tape)))
196+ (apply 82:12 trel (ref 82:18 tape) (ref 82:23 tape) (ref 82:28 tape)))
191− (face 80:34 q
197+ (face 82:34 q
192− (apply 80:36 list (ref 80:42 tank))))))
198+ (apply 82:36 list (ref 82:42 tank))))))
193− (mold 82:1 nail
199+ (mold 84:1 nail
194− (cell 82:9
195− (face 82:10 p (ref 82:12 hair))
196− (face 82:17 q (ref 82:19 tape))))
197− (mold 84:1 edge
198 (cell 84:9
200 (cell 84:9
199 (face 84:10 p (ref 84:12 hair))
201 (face 84:10 p (ref 84:12 hair))
200− (face 84:17 q
202+ (face 84:17 q (ref 84:19 tape))))
203+ (mold 86:1 edge
204+ (cell 86:9
205+ (face 86:10 p (ref 86:12 hair))
206+ (face 86:17 q
201− (apply 84:19 unit
207+ (apply 86:19 unit
202− (cell 84:25
208+ (cell 86:25
203− (face 84:26 p (noun 84:28))
209+ (face 86:26 p (noun 86:28))
204− (face 84:30 q (ref 84:32 nail)))))))
210+ (face 86:30 q (ref 86:32 nail)))))))
205− (mold 86:1 rule
211+ (mold 88:1 rule
206− (fn 86:9 (ref 86:12 nail) (ref 86:17 edge)))
212+ (fn 88:9 (ref 88:12 nail) (ref 88:17 edge)))
207− (mold 88:1 spot
213+ (mold 90:1 spot
208− (cell 88:9
214+ (cell 90:9
209− (face 88:10 p (ref 88:12 path))
215+ (face 90:10 p (ref 90:12 path))
210− (face 88:17 q (ref 88:19 pint))))
216+ (face 90:17 q (ref 90:19 pint))))
211− (mold 90:1 toon
217+ (mold 92:1 toon
212− (union 91:3
218+ (union 93:3
213− (cell 91:3
214− (const 91:4 %0)
215− (face 91:7 p (noun 91:9)))
216− (cell 92:3
217− (const 92:4 %1)
218− (face 92:7 p (noun 92:9)))
219 (cell 93:3
219 (cell 93:3
220− (const 93:4 %2)
220+ (const 93:4 %0)
221+ (face 93:7 p (noun 93:9)))
222+ (cell 94:3
223+ (const 94:4 %1)
224+ (face 94:7 p (noun 94:9)))
225+ (cell 95:3
226+ (const 95:4 %2)
221− (face 93:7 p
227+ (face 95:7 p
222− (apply 93:9 list (ref 93:15 tank))))))
228+ (apply 95:9 list (ref 95:15 tank))))))
223− (mold 95:1 like
229+ (mold 97:1 like
224− (generic 95:9 A
230+ (generic 97:9 A
225− (cell 95:16
231+ (cell 97:16
226− (face 95:17 p (ref 95:19 hair))
232+ (face 97:17 p (ref 97:19 hair))
227− (face 95:24 q
233+ (face 97:24 q
228− (apply 95:26 unit
234+ (apply 97:26 unit
229− (cell 95:32
235+ (cell 97:32
230− (face 95:33 p (tvar 95:35 A))
236+ (face 97:33 p (tvar 97:35 A))
231− (face 95:37 q (ref 95:39 nail))))))))
237+ (face 97:37 q (ref 97:39 nail))))))))
232− (value 97:1 wonk
238+ (value 99:1 wonk
233− (gate 97:9
239+ (gate 99:9
234− (face 97:12 veq
240+ (face 99:12 veq
235− (apply 97:16 like (tvar 97:22 A)))
241+ (apply 99:16 like (tvar 99:22 A)))
236− (body 98:3
242+ (body 100:3
237− (branch 98:3
243+ (branch 100:3
238− (wing 98:6 q.veq)
244+ (wing 100:6 q.veq)
239− (arm 99:5 (lit 99:5 ~) (crash 99:7))
245+ (arm 101:5 (lit 101:5 ~) (crash 101:7))
240− (arm 100:5
246+ (arm 102:5
241− (cell 100:5 (lit 100:6 ~) (bind 100:8 product))
247+ (cell 102:5 (lit 102:6 ~) (bind 102:8 product))
242− (wing 100:17 p.product))))))
248+ (wing 102:17 p.product))))))
243− (mold 102:1 lone
249+ (mold 104:1 lone
244− (generic 102:9 A
245− (cell 102:16
246− (face 102:17 p (tvar 102:19 A)))))
247− (mold 104:1 lest
248 (generic 104:9 A
250 (generic 104:9 A
249 (cell 104:16
251 (cell 104:16
250− (face 104:17 i (tvar 104:19 A))
252+ (face 104:17 p (tvar 104:19 A)))))
251− (face 104:21 t
252− (apply 104:23 list (tvar 104:29 A))))))
253− (mold 106:1 pole
253+ (mold 106:1 lest
254 (generic 106:9 A
254 (generic 106:9 A
255+ (cell 106:16
256+ (face 106:17 i (tvar 106:19 A))
257+ (face 106:21 t
258+ (apply 106:23 list (tvar 106:29 A))))))
259+ (mold 108:1 pole
260+ (generic 108:9 A
255− (union 107:3
261+ (union 109:3
256− (const 107:3 ~)
262+ (const 109:3 ~)
257− (cell 108:3
263+ (cell 110:3
258− (tvar 108:4 A)
264+ (tvar 110:4 A)
259− (apply 108:6 pole (tvar 108:12 A))))))
265+ (apply 110:6 pole (tvar 110:12 A))))))
260− (mold 110:1 quip
266+ (mold 112:1 quip
261− (generic 110:9 A B
267+ (generic 112:9 A B
262− (cell 110:18
268+ (cell 112:18
263− (apply 110:19 list (tvar 110:25 A))
269+ (apply 112:19 list (tvar 112:25 A))
264− (tvar 110:28 B))))
270+ (tvar 112:28 B))))
265− (mold 112:1 tree
271+ (mold 114:1 tree
266− (generic 112:9 A
272+ (generic 114:9 A
267− (union 113:3
273+ (union 115:3
268− (const 113:3 ~)
274+ (const 115:3 ~)
269− (cell 114:3
275+ (cell 116:3
270− (face 114:4 n (tvar 114:6 A))
276+ (face 116:4 n (tvar 116:6 A))
271− (face 114:8 l
277+ (face 116:8 l
272− (apply 114:10 tree (tvar 114:16 A)))
278+ (apply 116:10 tree (tvar 116:16 A)))
273− (face 114:19 r
279+ (face 116:19 r
274− (apply 114:21 tree (tvar 114:27 A)))))))
280+ (apply 116:21 tree (tvar 116:27 A)))))))
275− (mold 116:1 each
281+ (mold 118:1 each
276− (generic 116:9 A B
282+ (generic 118:9 A B
277− (union 117:3
283+ (union 119:3
278− (cell 117:3
284+ (cell 119:3
279− (const 117:4 %|)
285+ (const 119:4 %|)
280− (face 117:7 p (tvar 117:9 B)))
286+ (face 119:7 p (tvar 119:9 B)))
281− (cell 118:3
287+ (cell 120:3
282− (const 118:4 %&)
288+ (const 120:4 %&)
283− (face 118:7 p (tvar 118:9 A))))))
289+ (face 120:7 p (tvar 120:9 A))))))
284− (mold 120:1 bloq (aura 120:9 @)))
290+ (mold 122:1 bloq (aura 122:9 @)))
tests/golden/prelude-3g-basic/source.jibb+8−6
@@ -37,16 +37,18 @@
37++ weld |= args=[(list A) (list A)]
37++ weld |= args=[(list A) (list A)]
38 ?- args
38 ?- args
39 [xs ys]
39 [xs ys]
40+ ^- (list A)
40− ?- xs
41+ ?- xs
41− ~ ys
42+ ~ ys
42− [item rest] [item (weld rest ys)]
43+ [item rest] [item (weld rest ys)]
43
44
44++ turn |= args=[(list A) $-(A B)]
45++ turn |= args=[(list A) $-(A B)]
45 ?- args
46 ?- args
46 [xs f]
47 [xs f]
48+ ^- (list B)
47− ?- xs
49+ ?- xs
48− ~ ~
50+ ~ ~
49− [item rest] [(f item) (turn rest f)]
51+ [item rest] [(f item) (turn rest f)]
50
52
51+$ dime [p=@ta q=@]
53+$ dime [p=@ta q=@]
52
54
tests/golden/prelude-3g-basic/tokens.txt+146−132
@@ -190,151 +190,165 @@
19039:9 name ys
19039:9 name ys
19139:11 tight glyph ]
19139:11 tight glyph ]
19240:7 INDENT
19240:7 INDENT
193−40:7 glyph ?-
193+40:7 glyph ^-
194−40:10 name xs
194+40:10 glyph (
195+40:11 tight name list
196+40:16 tvar A
197+40:17 tight glyph )
19541:9 INDENT
19841:9 INDENT
196−41:9 lit ~
199+41:9 glyph ?-
200+41:12 name xs
201+42:11 INDENT
202+42:11 lit ~
197−41:11 name ys
203+42:13 name ys
198−42:9 NEWLINE
204+43:11 NEWLINE
199−42:9 glyph [
205+43:11 glyph [
200−42:10 tight name item
206+43:12 tight name item
201−42:15 name rest
207+43:17 name rest
202−42:19 tight glyph ]
208+43:21 tight glyph ]
203−42:21 glyph [
209+43:23 glyph [
204−42:22 tight name item
210+43:24 tight name item
205−42:27 glyph (
211+43:29 glyph (
206−42:28 tight name weld
212+43:30 tight name weld
207−42:33 name rest
213+43:35 name rest
208−42:38 name ys
214+43:40 name ys
209−42:40 tight glyph )
215+43:42 tight glyph )
210−42:41 tight glyph ]
216+43:43 tight glyph ]
217+45:1 DEDENT
211−44:1 DEDENT
218+45:1 DEDENT
212−44:1 DEDENT
219+45:1 DEDENT
213−44:1 DEDENT
220+45:1 DEDENT
214−44:1 DEDENT
221+45:1 DEDENT
215−44:1 NEWLINE
222+45:1 NEWLINE
216−44:1 glyph ++
223+45:1 glyph ++
217−44:4 name turn
224+45:4 name turn
218−44:9 glyph |=
225+45:9 glyph |=
219−44:12 name args
226+45:12 name args
220−44:16 tight glyph =
227+45:16 tight glyph =
221−44:17 tight glyph [
228+45:17 tight glyph [
222−44:18 tight glyph (
229+45:18 tight glyph (
223−44:19 tight name list
230+45:19 tight name list
224−44:24 tvar A
231+45:24 tvar A
225−44:25 tight glyph )
232+45:25 tight glyph )
226−44:27 glyph $-(
233+45:27 glyph $-(
227−44:30 tight tvar A
234+45:30 tight tvar A
228−44:32 tvar B
235+45:32 tvar B
229−44:33 tight glyph )
236+45:33 tight glyph )
230−44:34 tight glyph ]
237+45:34 tight glyph ]
231−45:3 INDENT
238+46:3 INDENT
232−45:3 glyph ?-
239+46:3 glyph ?-
233−45:6 name args
240+46:6 name args
234−46:5 INDENT
241+47:5 INDENT
235−46:5 glyph [
242+47:5 glyph [
236−46:6 tight name xs
243+47:6 tight name xs
237−46:9 name f
244+47:9 name f
238−46:10 tight glyph ]
245+47:10 tight glyph ]
239−47:7 INDENT
246+48:7 INDENT
240−47:7 glyph ?-
247+48:7 glyph ^-
241−47:10 name xs
248+48:10 glyph (
249+48:11 tight name list
250+48:16 tvar B
251+48:17 tight glyph )
242−48:9 INDENT
252+49:9 INDENT
253+49:9 glyph ?-
254+49:12 name xs
255+50:11 INDENT
243−48:9 lit ~
256+50:11 lit ~
244−48:11 lit ~
257+50:13 lit ~
245−49:9 NEWLINE
258+51:11 NEWLINE
246−49:9 glyph [
259+51:11 glyph [
247−49:10 tight name item
260+51:12 tight name item
248−49:15 name rest
261+51:17 name rest
249−49:19 tight glyph ]
262+51:21 tight glyph ]
250−49:21 glyph [
263+51:23 glyph [
251−49:22 tight glyph (
264+51:24 tight glyph (
252−49:23 tight name f
265+51:25 tight name f
253−49:25 name item
266+51:27 name item
254−49:29 tight glyph )
255−49:31 glyph (
267+51:31 tight glyph )
268+51:33 glyph (
256−49:32 tight name turn
269+51:34 tight name turn
257−49:37 name rest
270+51:39 name rest
258−49:42 name f
271+51:44 name f
259−49:43 tight glyph )
272+51:45 tight glyph )
260−49:44 tight glyph ]
273+51:46 tight glyph ]
261−51:1 DEDENT
274+53:1 DEDENT
262−51:1 DEDENT
275+53:1 DEDENT
263−51:1 DEDENT
276+53:1 DEDENT
264−51:1 DEDENT
277+53:1 DEDENT
265−51:1 NEWLINE
278+53:1 DEDENT
266−51:1 glyph +$
267−51:4 name dime
268−51:9 glyph [
269−51:10 tight name p
270−51:11 tight glyph =
271−51:12 tight aura @ta
272−51:16 name q
273−51:17 tight glyph =
274−51:18 tight aura @
275−51:19 tight glyph ]
27653:1 NEWLINE
27953:1 NEWLINE
27753:1 glyph +$
28053:1 glyph +$
278−53:4 name hair
281+53:4 name dime
27953:9 glyph [
28253:9 glyph [
28053:10 tight name p
28353:10 tight name p
28153:11 tight glyph =
28453:11 tight glyph =
282−53:12 tight aura @ud
285+53:12 tight aura @ta
28353:16 name q
28653:16 name q
28453:17 tight glyph =
28753:17 tight glyph =
285−53:18 tight aura @ud
288+53:18 tight aura @
286−53:21 tight glyph ]
289+53:19 tight glyph ]
28755:1 NEWLINE
29055:1 NEWLINE
28855:1 glyph +$
29155:1 glyph +$
289−55:4 name pint
292+55:4 name hair
29055:9 glyph [
29355:9 glyph [
29155:10 tight name p
29455:10 tight name p
29255:11 tight glyph =
29555:11 tight glyph =
293−55:12 tight glyph [
296+55:12 tight aura @ud
294−55:13 tight name p
297+55:16 name q
295−55:14 tight glyph =
298+55:17 tight glyph =
296−55:15 tight aura @
297−55:17 name q
298−55:18 tight glyph =
299+55:18 tight aura @ud
299−55:19 tight aura @
300−55:20 tight glyph ]
301−55:22 name q
302−55:23 tight glyph =
303−55:24 tight glyph [
304−55:25 tight name p
305−55:26 tight glyph =
306−55:27 tight aura @
307−55:29 name q
308−55:30 tight glyph =
309−55:31 tight aura @
310−55:32 tight glyph ]
311−55:33 tight glyph ]
300+55:21 tight glyph ]
31257:1 NEWLINE
30157:1 NEWLINE
31357:1 glyph +$
30257:1 glyph +$
314−57:4 name coin
303+57:4 name pint
315−58:3 INDENT
316−58:3 glyph [
317−58:4 tight lit %$
318−58:7 name p
319−58:8 tight glyph =
320−58:9 tight name dime
321−58:13 tight glyph ]
304+57:9 glyph [
322−59:3 NEWLINE
323−59:3 glyph [
324−59:4 tight lit %blob
325−59:10 name p
305+57:10 tight name p
326−59:11 tight glyph =
306+57:11 tight glyph =
327−59:12 tight glyph *
307+57:12 tight glyph [
328−59:13 tight glyph ]
308+57:13 tight name p
329−60:3 NEWLINE
309+57:14 tight glyph =
310+57:15 tight aura @
311+57:17 name q
312+57:18 tight glyph =
313+57:19 tight aura @
314+57:20 tight glyph ]
315+57:22 name q
316+57:23 tight glyph =
317+57:24 tight glyph [
318+57:25 tight name p
319+57:26 tight glyph =
320+57:27 tight aura @
321+57:29 name q
322+57:30 tight glyph =
323+57:31 tight aura @
324+57:32 tight glyph ]
325+57:33 tight glyph ]
326+59:1 NEWLINE
327+59:1 glyph +$
328+59:4 name coin
329+60:3 INDENT
33060:3 glyph [
33060:3 glyph [
331−60:4 tight lit %many
331+60:4 tight lit %$
332+60:7 name p
333+60:8 tight glyph =
334+60:9 tight name dime
335+60:13 tight glyph ]
336+61:3 NEWLINE
337+61:3 glyph [
338+61:4 tight lit %blob
339+61:10 name p
340+61:11 tight glyph =
341+61:12 tight glyph *
342+61:13 tight glyph ]
343+62:3 NEWLINE
344+62:3 glyph [
345+62:4 tight lit %many
332−60:10 name p
346+62:10 name p
333−60:11 tight glyph =
347+62:11 tight glyph =
334−60:12 tight glyph (
348+62:12 tight glyph (
335−60:13 tight name list
349+62:13 tight name list
336−60:18 name coin
350+62:18 name coin
337−60:22 tight glyph )
351+62:22 tight glyph )
338−60:23 tight glyph ]
352+62:23 tight glyph ]
339−60:24 DEDENT
353+62:24 DEDENT
340−60:24 NEWLINE
354+62:24 NEWLINE
tests/golden/prelude-3g-basic/tree.txt+64−58
@@ -87,64 +87,70 @@
87 (arm 39:5
87 (arm 39:5
88 (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
88 (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
89 (body 40:7
89 (body 40:7
90− (branch 40:7
90+ (cast 40:7
91− (wing 40:10 xs)
91+ (apply 40:10 list (tvar 40:16 A))
92− (arm 41:9 (lit 41:9 ~) (wing 41:11 ys))
92+ (body 41:9
93+ (branch 41:9
94+ (wing 41:12 xs)
95+ (arm 42:11 (lit 42:11 ~) (wing 42:13 ys))
93− (arm 42:9
96+ (arm 43:11
94− (cell 42:9 (bind 42:10 item) (bind 42:15 rest))
97+ (cell 43:11 (bind 43:12 item) (bind 43:17 rest))
95− (tuple 42:21
98+ (tuple 43:23
96− (wing 42:22 item)
99+ (wing 43:24 item)
97− (group 42:27
100+ (group 43:29
98− (call 42:28 (wing 42:28 weld) (wing 42:33 rest) (wing 42:38 ys))))))))))))
101+ (call 43:30 (wing 43:30 weld) (wing 43:35 rest) (wing 43:40 ys))))))))))))))
99− (value 44:1 turn
102+ (value 45:1 turn
100− (gate 44:9
103+ (gate 45:9
101− (face 44:12 args
104+ (face 45:12 args
102− (cell 44:17
105+ (cell 45:17
103− (apply 44:18 list (tvar 44:24 A))
106+ (apply 45:18 list (tvar 45:24 A))
104− (fn 44:27 (tvar 44:30 A) (tvar 44:32 B))))
107+ (fn 45:27 (tvar 45:30 A) (tvar 45:32 B))))
105− (body 45:3
108+ (body 46:3
106− (branch 45:3
109+ (branch 46:3
107− (wing 45:6 args)
110+ (wing 46:6 args)
108− (arm 46:5
111+ (arm 47:5
109− (cell 46:5 (bind 46:6 xs) (bind 46:9 f))
112+ (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
110− (body 47:7
113+ (body 48:7
111− (branch 47:7
114+ (cast 48:7
115+ (apply 48:10 list (tvar 48:16 B))
116+ (body 49:9
117+ (branch 49:9
112− (wing 47:10 xs)
118+ (wing 49:12 xs)
113− (arm 48:9 (lit 48:9 ~) (lit 48:11 ~))
119+ (arm 50:11 (lit 50:11 ~) (lit 50:13 ~))
114− (arm 49:9
120+ (arm 51:11
115− (cell 49:9 (bind 49:10 item) (bind 49:15 rest))
121+ (cell 51:11 (bind 51:12 item) (bind 51:17 rest))
116− (tuple 49:21
122+ (tuple 51:23
117− (group 49:22
123+ (group 51:24
118− (call 49:23 (wing 49:23 f) (wing 49:25 item)))
124+ (call 51:25 (wing 51:25 f) (wing 51:27 item)))
119− (group 49:31
125+ (group 51:33
120− (call 49:32 (wing 49:32 turn) (wing 49:37 rest) (wing 49:42 f))))))))))))
126+ (call 51:34 (wing 51:34 turn) (wing 51:39 rest) (wing 51:44 f))))))))))))))
121− (mold 51:1 dime
127+ (mold 53:1 dime
122− (cell 51:9
123− (face 51:10 p (aura 51:12 @ta))
124− (face 51:16 q (aura 51:18 @))))
125− (mold 53:1 hair
126 (cell 53:9
128 (cell 53:9
127− (face 53:10 p (aura 53:12 @ud))
129+ (face 53:10 p (aura 53:12 @ta))
128− (face 53:16 q (aura 53:18 @ud))))
130+ (face 53:16 q (aura 53:18 @))))
129− (mold 55:1 pint
131+ (mold 55:1 hair
130 (cell 55:9
132 (cell 55:9
131− (face 55:10 p
133+ (face 55:10 p (aura 55:12 @ud))
134+ (face 55:16 q (aura 55:18 @ud))))
135+ (mold 57:1 pint
136+ (cell 57:9
137+ (face 57:10 p
132− (cell 55:12
138+ (cell 57:12
133− (face 55:13 p (aura 55:15 @))
139+ (face 57:13 p (aura 57:15 @))
134− (face 55:17 q (aura 55:19 @))))
140+ (face 57:17 q (aura 57:19 @))))
135− (face 55:22 q
141+ (face 57:22 q
136− (cell 55:24
142+ (cell 57:24
137− (face 55:25 p (aura 55:27 @))
143+ (face 57:25 p (aura 57:27 @))
138− (face 55:29 q (aura 55:31 @))))))
144+ (face 57:29 q (aura 57:31 @))))))
139− (mold 57:1 coin
145+ (mold 59:1 coin
140− (union 58:3
146+ (union 60:3
141− (cell 58:3
142− (const 58:4 %$)
143− (face 58:7 p (ref 58:9 dime)))
144− (cell 59:3
145− (const 59:4 %blob)
146− (face 59:10 p (noun 59:12)))
147 (cell 60:3
147 (cell 60:3
148− (const 60:4 %many)
148+ (const 60:4 %$)
149+ (face 60:7 p (ref 60:9 dime)))
150+ (cell 61:3
151+ (const 61:4 %blob)
152+ (face 61:10 p (noun 61:12)))
153+ (cell 62:3
154+ (const 62:4 %many)
149− (face 60:10 p
155+ (face 62:10 p
150− (apply 60:12 list (ref 60:18 coin)))))))
156+ (apply 62:12 list (ref 62:18 coin)))))))
tests/golden/prelude-3g-like/source.jibb+8−6
@@ -37,16 +37,18 @@
37++ weld |= args=[(list A) (list A)]
37++ weld |= args=[(list A) (list A)]
38 ?- args
38 ?- args
39 [xs ys]
39 [xs ys]
40+ ^- (list A)
40− ?- xs
41+ ?- xs
41− ~ ys
42+ ~ ys
42− [item rest] [item (weld rest ys)]
43+ [item rest] [item (weld rest ys)]
43
44
44++ turn |= args=[(list A) $-(A B)]
45++ turn |= args=[(list A) $-(A B)]
45 ?- args
46 ?- args
46 [xs f]
47 [xs f]
48+ ^- (list B)
47− ?- xs
49+ ?- xs
48− ~ ~
50+ ~ ~
49− [item rest] [(f item) (turn rest f)]
51+ [item rest] [(f item) (turn rest f)]
50
52
51+$ dime [p=@ta q=@]
53+$ dime [p=@ta q=@]
52
54
tests/golden/prelude-3g-like/tokens.txt+357−343
@@ -190,410 +190,424 @@
19039:9 name ys
19039:9 name ys
19139:11 tight glyph ]
19139:11 tight glyph ]
19240:7 INDENT
19240:7 INDENT
193−40:7 glyph ?-
193+40:7 glyph ^-
194−40:10 name xs
194+40:10 glyph (
195+40:11 tight name list
196+40:16 tvar A
197+40:17 tight glyph )
19541:9 INDENT
19841:9 INDENT
196−41:9 lit ~
199+41:9 glyph ?-
200+41:12 name xs
201+42:11 INDENT
202+42:11 lit ~
197−41:11 name ys
203+42:13 name ys
198−42:9 NEWLINE
204+43:11 NEWLINE
199−42:9 glyph [
205+43:11 glyph [
200−42:10 tight name item
206+43:12 tight name item
201−42:15 name rest
207+43:17 name rest
202−42:19 tight glyph ]
208+43:21 tight glyph ]
203−42:21 glyph [
209+43:23 glyph [
204−42:22 tight name item
210+43:24 tight name item
205−42:27 glyph (
211+43:29 glyph (
206−42:28 tight name weld
212+43:30 tight name weld
207−42:33 name rest
213+43:35 name rest
208−42:38 name ys
214+43:40 name ys
209−42:40 tight glyph )
215+43:42 tight glyph )
210−42:41 tight glyph ]
216+43:43 tight glyph ]
217+45:1 DEDENT
211−44:1 DEDENT
218+45:1 DEDENT
212−44:1 DEDENT
219+45:1 DEDENT
213−44:1 DEDENT
220+45:1 DEDENT
214−44:1 DEDENT
221+45:1 DEDENT
215−44:1 NEWLINE
222+45:1 NEWLINE
216−44:1 glyph ++
223+45:1 glyph ++
217−44:4 name turn
224+45:4 name turn
218−44:9 glyph |=
225+45:9 glyph |=
219−44:12 name args
226+45:12 name args
220−44:16 tight glyph =
227+45:16 tight glyph =
221−44:17 tight glyph [
228+45:17 tight glyph [
222−44:18 tight glyph (
229+45:18 tight glyph (
223−44:19 tight name list
230+45:19 tight name list
224−44:24 tvar A
231+45:24 tvar A
225−44:25 tight glyph )
232+45:25 tight glyph )
226−44:27 glyph $-(
233+45:27 glyph $-(
227−44:30 tight tvar A
234+45:30 tight tvar A
228−44:32 tvar B
235+45:32 tvar B
229−44:33 tight glyph )
236+45:33 tight glyph )
230−44:34 tight glyph ]
237+45:34 tight glyph ]
231−45:3 INDENT
238+46:3 INDENT
232−45:3 glyph ?-
239+46:3 glyph ?-
233−45:6 name args
240+46:6 name args
234−46:5 INDENT
241+47:5 INDENT
235−46:5 glyph [
242+47:5 glyph [
236−46:6 tight name xs
243+47:6 tight name xs
237−46:9 name f
244+47:9 name f
238−46:10 tight glyph ]
245+47:10 tight glyph ]
239−47:7 INDENT
246+48:7 INDENT
240−47:7 glyph ?-
247+48:7 glyph ^-
241−47:10 name xs
248+48:10 glyph (
249+48:11 tight name list
250+48:16 tvar B
251+48:17 tight glyph )
242−48:9 INDENT
252+49:9 INDENT
253+49:9 glyph ?-
254+49:12 name xs
255+50:11 INDENT
243−48:9 lit ~
256+50:11 lit ~
244−48:11 lit ~
257+50:13 lit ~
245−49:9 NEWLINE
258+51:11 NEWLINE
246−49:9 glyph [
259+51:11 glyph [
247−49:10 tight name item
260+51:12 tight name item
248−49:15 name rest
261+51:17 name rest
249−49:19 tight glyph ]
262+51:21 tight glyph ]
250−49:21 glyph [
263+51:23 glyph [
251−49:22 tight glyph (
264+51:24 tight glyph (
252−49:23 tight name f
265+51:25 tight name f
253−49:25 name item
266+51:27 name item
254−49:29 tight glyph )
255−49:31 glyph (
267+51:31 tight glyph )
268+51:33 glyph (
256−49:32 tight name turn
269+51:34 tight name turn
257−49:37 name rest
270+51:39 name rest
258−49:42 name f
271+51:44 name f
259−49:43 tight glyph )
272+51:45 tight glyph )
260−49:44 tight glyph ]
273+51:46 tight glyph ]
261−51:1 DEDENT
274+53:1 DEDENT
262−51:1 DEDENT
275+53:1 DEDENT
263−51:1 DEDENT
276+53:1 DEDENT
264−51:1 DEDENT
277+53:1 DEDENT
265−51:1 NEWLINE
278+53:1 DEDENT
266−51:1 glyph +$
267−51:4 name dime
268−51:9 glyph [
269−51:10 tight name p
270−51:11 tight glyph =
271−51:12 tight aura @ta
272−51:16 name q
273−51:17 tight glyph =
274−51:18 tight aura @
275−51:19 tight glyph ]
27653:1 NEWLINE
27953:1 NEWLINE
27753:1 glyph +$
28053:1 glyph +$
278−53:4 name hair
281+53:4 name dime
27953:9 glyph [
28253:9 glyph [
28053:10 tight name p
28353:10 tight name p
28153:11 tight glyph =
28453:11 tight glyph =
282−53:12 tight aura @ud
285+53:12 tight aura @ta
28353:16 name q
28653:16 name q
28453:17 tight glyph =
28753:17 tight glyph =
285−53:18 tight aura @ud
288+53:18 tight aura @
286−53:21 tight glyph ]
289+53:19 tight glyph ]
28755:1 NEWLINE
29055:1 NEWLINE
28855:1 glyph +$
29155:1 glyph +$
289−55:4 name pint
292+55:4 name hair
29055:9 glyph [
29355:9 glyph [
29155:10 tight name p
29455:10 tight name p
29255:11 tight glyph =
29555:11 tight glyph =
293−55:12 tight glyph [
296+55:12 tight aura @ud
294−55:13 tight name p
297+55:16 name q
295−55:14 tight glyph =
298+55:17 tight glyph =
296−55:15 tight aura @
297−55:17 name q
298−55:18 tight glyph =
299+55:18 tight aura @ud
299−55:19 tight aura @
300−55:20 tight glyph ]
301−55:22 name q
302−55:23 tight glyph =
303−55:24 tight glyph [
304−55:25 tight name p
305−55:26 tight glyph =
306−55:27 tight aura @
307−55:29 name q
308−55:30 tight glyph =
309−55:31 tight aura @
310−55:32 tight glyph ]
311−55:33 tight glyph ]
300+55:21 tight glyph ]
31257:1 NEWLINE
30157:1 NEWLINE
31357:1 glyph +$
30257:1 glyph +$
314−57:4 name coin
303+57:4 name pint
315−58:3 INDENT
316−58:3 glyph [
317−58:4 tight lit %$
318−58:7 name p
319−58:8 tight glyph =
320−58:9 tight name dime
321−58:13 tight glyph ]
304+57:9 glyph [
322−59:3 NEWLINE
323−59:3 glyph [
324−59:4 tight lit %blob
325−59:10 name p
305+57:10 tight name p
326−59:11 tight glyph =
306+57:11 tight glyph =
327−59:12 tight glyph *
307+57:12 tight glyph [
328−59:13 tight glyph ]
308+57:13 tight name p
329−60:3 NEWLINE
309+57:14 tight glyph =
310+57:15 tight aura @
311+57:17 name q
312+57:18 tight glyph =
313+57:19 tight aura @
314+57:20 tight glyph ]
315+57:22 name q
316+57:23 tight glyph =
317+57:24 tight glyph [
318+57:25 tight name p
319+57:26 tight glyph =
320+57:27 tight aura @
321+57:29 name q
322+57:30 tight glyph =
323+57:31 tight aura @
324+57:32 tight glyph ]
325+57:33 tight glyph ]
326+59:1 NEWLINE
327+59:1 glyph +$
328+59:4 name coin
329+60:3 INDENT
33060:3 glyph [
33060:3 glyph [
331−60:4 tight lit %many
331+60:4 tight lit %$
332+60:7 name p
333+60:8 tight glyph =
334+60:9 tight name dime
335+60:13 tight glyph ]
336+61:3 NEWLINE
337+61:3 glyph [
338+61:4 tight lit %blob
339+61:10 name p
340+61:11 tight glyph =
341+61:12 tight glyph *
342+61:13 tight glyph ]
343+62:3 NEWLINE
344+62:3 glyph [
345+62:4 tight lit %many
332−60:10 name p
346+62:10 name p
333−60:11 tight glyph =
347+62:11 tight glyph =
334−60:12 tight glyph (
348+62:12 tight glyph (
335−60:13 tight name list
349+62:13 tight name list
336−60:18 name coin
350+62:18 name coin
337−60:22 tight glyph )
351+62:22 tight glyph )
338−60:23 tight glyph ]
352+62:23 tight glyph ]
339−62:1 DEDENT
353+64:1 DEDENT
340−62:1 NEWLINE
341−62:1 glyph +$
342−62:4 name pair
343−62:9 glyph |$
344−62:12 glyph [
345−62:13 tight tvar A
346−62:15 tvar B
347−62:16 tight glyph ]
348−62:18 glyph [
349−62:19 tight name p
350−62:20 tight glyph =
351−62:21 tight tvar A
352−62:23 name q
353−62:24 tight glyph =
354−62:25 tight tvar B
355−62:26 tight glyph ]
35664:1 NEWLINE
35464:1 NEWLINE
35764:1 glyph +$
35564:1 glyph +$
358−64:4 name trel
356+64:4 name pair
35964:9 glyph |$
35764:9 glyph |$
36064:12 glyph [
35864:12 glyph [
36164:13 tight tvar A
35964:13 tight tvar A
36264:15 tvar B
36064:15 tvar B
363−64:17 tvar C
361+64:16 tight glyph ]
364−64:18 tight glyph ]
365−64:20 glyph [
362+64:18 glyph [
366−64:21 tight name p
363+64:19 tight name p
367−64:22 tight glyph =
364+64:20 tight glyph =
368−64:23 tight tvar A
365+64:21 tight tvar A
369−64:25 name q
366+64:23 name q
370−64:26 tight glyph =
367+64:24 tight glyph =
371−64:27 tight tvar B
368+64:25 tight tvar B
372−64:29 name r
373−64:30 tight glyph =
374−64:31 tight tvar C
375−64:32 tight glyph ]
369+64:26 tight glyph ]
37666:1 NEWLINE
37066:1 NEWLINE
37766:1 glyph +$
37166:1 glyph +$
378−66:4 name qual
372+66:4 name trel
37966:9 glyph |$
37366:9 glyph |$
38066:12 glyph [
37466:12 glyph [
38166:13 tight tvar A
37566:13 tight tvar A
38266:15 tvar B
37666:15 tvar B
38366:17 tvar C
37766:17 tvar C
384−66:19 tvar D
378+66:18 tight glyph ]
385−66:20 tight glyph ]
386−66:22 glyph [
379+66:20 glyph [
380+66:21 tight name p
381+66:22 tight glyph =
387−66:23 tight name p
382+66:23 tight tvar A
388−66:24 tight glyph =
389−66:25 tight tvar A
390−66:27 name q
383+66:25 name q
391−66:28 tight glyph =
384+66:26 tight glyph =
392−66:29 tight tvar B
385+66:27 tight tvar B
393−66:31 name r
386+66:29 name r
394−66:32 tight glyph =
387+66:30 tight glyph =
395−66:33 tight tvar C
388+66:31 tight tvar C
396−66:35 name s
397−66:36 tight glyph =
398−66:37 tight tvar D
399−66:38 tight glyph ]
389+66:32 tight glyph ]
40068:1 NEWLINE
39068:1 NEWLINE
40168:1 glyph +$
39168:1 glyph +$
402−68:4 name cord
392+68:4 name qual
403−68:9 aura @t
393+68:9 glyph |$
394+68:12 glyph [
395+68:13 tight tvar A
396+68:15 tvar B
397+68:17 tvar C
398+68:19 tvar D
399+68:20 tight glyph ]
400+68:22 glyph [
401+68:23 tight name p
402+68:24 tight glyph =
403+68:25 tight tvar A
404+68:27 name q
405+68:28 tight glyph =
406+68:29 tight tvar B
407+68:31 name r
408+68:32 tight glyph =
409+68:33 tight tvar C
410+68:35 name s
411+68:36 tight glyph =
412+68:37 tight tvar D
413+68:38 tight glyph ]
40470:1 NEWLINE
41470:1 NEWLINE
40570:1 glyph +$
41570:1 glyph +$
406−70:4 name knot
416+70:4 name cord
407−70:9 aura @ta
417+70:9 aura @t
40872:1 NEWLINE
41872:1 NEWLINE
40972:1 glyph +$
41972:1 glyph +$
410−72:4 name tape
420+72:4 name knot
411−72:9 glyph (
412−72:10 tight name list
413−72:15 aura @tD
421+72:9 aura @ta
414−72:18 tight glyph )
41574:1 NEWLINE
42274:1 NEWLINE
41674:1 glyph +$
42374:1 glyph +$
417−74:4 name path
424+74:4 name tape
41874:9 glyph (
42574:9 glyph (
41974:10 tight name list
42674:10 tight name list
420−74:15 name knot
427+74:15 aura @tD
421−74:19 tight glyph )
428+74:18 tight glyph )
42276:1 NEWLINE
42976:1 NEWLINE
42376:1 glyph +$
43076:1 glyph +$
424−76:4 name tank
431+76:4 name path
432+76:9 glyph (
433+76:10 tight name list
434+76:15 name knot
435+76:19 tight glyph )
436+78:1 NEWLINE
437+78:1 glyph +$
438+78:4 name tank
425−77:3 INDENT
439+79:3 INDENT
426−77:3 name cord
440+79:3 name cord
427−78:3 NEWLINE
428−78:3 glyph [
429−78:4 tight lit %leaf
430−78:10 name p
431−78:11 tight glyph =
432−78:12 tight name tape
433−78:16 tight glyph ]
434−79:3 NEWLINE
435−79:3 glyph [
436−79:4 tight lit %palm
437−79:10 name p
438−79:11 tight glyph =
439−79:12 tight glyph (
440−79:13 tight name qual
441−79:18 name tape
442−79:23 name tape
443−79:28 name tape
444−79:33 name tape
445−79:37 tight glyph )
446−79:39 name q
447−79:40 tight glyph =
448−79:41 tight glyph (
449−79:42 tight name list
450−79:47 name tank
451−79:51 tight glyph )
452−79:52 tight glyph ]
45380:3 NEWLINE
44180:3 NEWLINE
45480:3 glyph [
44280:3 glyph [
455−80:4 tight lit %rose
443+80:4 tight lit %leaf
45680:10 name p
44480:10 name p
45780:11 tight glyph =
44580:11 tight glyph =
458−80:12 tight glyph (
446+80:12 tight name tape
447+80:16 tight glyph ]
448+81:3 NEWLINE
449+81:3 glyph [
450+81:4 tight lit %palm
451+81:10 name p
452+81:11 tight glyph =
453+81:12 tight glyph (
459−80:13 tight name trel
454+81:13 tight name qual
460−80:18 name tape
455+81:18 name tape
461−80:23 name tape
456+81:23 name tape
462−80:28 name tape
457+81:28 name tape
458+81:33 name tape
463−80:32 tight glyph )
459+81:37 tight glyph )
464−80:34 name q
460+81:39 name q
465−80:35 tight glyph =
461+81:40 tight glyph =
466−80:36 tight glyph (
462+81:41 tight glyph (
467−80:37 tight name list
463+81:42 tight name list
468−80:42 name tank
464+81:47 name tank
469−80:46 tight glyph )
470−80:47 tight glyph ]
465+81:51 tight glyph )
471−82:1 DEDENT
466+81:52 tight glyph ]
472−82:1 NEWLINE
467+82:3 NEWLINE
473−82:1 glyph +$
468+82:3 glyph [
474−82:4 name nail
469+82:4 tight lit %rose
475−82:9 glyph [
476−82:10 tight name p
470+82:10 name p
47782:11 tight glyph =
47182:11 tight glyph =
478−82:12 tight name hair
472+82:12 tight glyph (
473+82:13 tight name trel
474+82:18 name tape
475+82:23 name tape
476+82:28 name tape
477+82:32 tight glyph )
479−82:17 name q
478+82:34 name q
480−82:18 tight glyph =
479+82:35 tight glyph =
481−82:19 tight name tape
480+82:36 tight glyph (
481+82:37 tight name list
482+82:42 name tank
483+82:46 tight glyph )
482−82:23 tight glyph ]
484+82:47 tight glyph ]
485+84:1 DEDENT
48384:1 NEWLINE
48684:1 NEWLINE
48484:1 glyph +$
48784:1 glyph +$
485−84:4 name edge
488+84:4 name nail
48684:9 glyph [
48984:9 glyph [
48784:10 tight name p
49084:10 tight name p
48884:11 tight glyph =
49184:11 tight glyph =
48984:12 tight name hair
49284:12 tight name hair
49084:17 name q
49384:17 name q
49184:18 tight glyph =
49484:18 tight glyph =
492−84:19 tight glyph (
495+84:19 tight name tape
493−84:20 tight name unit
494−84:25 glyph [
495−84:26 tight name p
496−84:27 tight glyph =
497−84:28 tight glyph *
498−84:30 name q
499−84:31 tight glyph =
500−84:32 tight name nail
501−84:36 tight glyph ]
502−84:37 tight glyph )
503−84:38 tight glyph ]
496+84:23 tight glyph ]
50486:1 NEWLINE
49786:1 NEWLINE
50586:1 glyph +$
49886:1 glyph +$
506−86:4 name rule
499+86:4 name edge
507−86:9 glyph $-(
500+86:9 glyph [
501+86:10 tight name p
502+86:11 tight glyph =
503+86:12 tight name hair
504+86:17 name q
505+86:18 tight glyph =
506+86:19 tight glyph (
507+86:20 tight name unit
508+86:25 glyph [
509+86:26 tight name p
510+86:27 tight glyph =
511+86:28 tight glyph *
512+86:30 name q
513+86:31 tight glyph =
508−86:12 tight name nail
514+86:32 tight name nail
509−86:17 name edge
515+86:36 tight glyph ]
510−86:21 tight glyph )
516+86:37 tight glyph )
517+86:38 tight glyph ]
51188:1 NEWLINE
51888:1 NEWLINE
51288:1 glyph +$
51988:1 glyph +$
513−88:4 name spot
520+88:4 name rule
514−88:9 glyph [
521+88:9 glyph $-(
515−88:10 tight name p
516−88:11 tight glyph =
517−88:12 tight name path
522+88:12 tight name nail
518−88:17 name q
523+88:17 name edge
519−88:18 tight glyph =
524+88:21 tight glyph )
520−88:19 tight name pint
521−88:23 tight glyph ]
52290:1 NEWLINE
52590:1 NEWLINE
52390:1 glyph +$
52690:1 glyph +$
524−90:4 name toon
527+90:4 name spot
528+90:9 glyph [
529+90:10 tight name p
530+90:11 tight glyph =
531+90:12 tight name path
532+90:17 name q
533+90:18 tight glyph =
534+90:19 tight name pint
535+90:23 tight glyph ]
536+92:1 NEWLINE
537+92:1 glyph +$
538+92:4 name toon
525−91:3 INDENT
539+93:3 INDENT
526−91:3 glyph [
527−91:4 tight lit %0
528−91:7 name p
529−91:8 tight glyph =
530−91:9 tight glyph *
531−91:10 tight glyph ]
532−92:3 NEWLINE
533−92:3 glyph [
534−92:4 tight lit %1
535−92:7 name p
536−92:8 tight glyph =
537−92:9 tight glyph *
538−92:10 tight glyph ]
539−93:3 NEWLINE
54093:3 glyph [
54093:3 glyph [
541−93:4 tight lit %2
541+93:4 tight lit %0
54293:7 name p
54293:7 name p
54393:8 tight glyph =
54393:8 tight glyph =
544−93:9 tight glyph (
544+93:9 tight glyph *
545+93:10 tight glyph ]
546+94:3 NEWLINE
547+94:3 glyph [
548+94:4 tight lit %1
549+94:7 name p
550+94:8 tight glyph =
551+94:9 tight glyph *
552+94:10 tight glyph ]
553+95:3 NEWLINE
554+95:3 glyph [
555+95:4 tight lit %2
556+95:7 name p
557+95:8 tight glyph =
558+95:9 tight glyph (
545−93:10 tight name list
559+95:10 tight name list
546−93:15 name tank
560+95:15 name tank
547−93:19 tight glyph )
561+95:19 tight glyph )
548−93:20 tight glyph ]
562+95:20 tight glyph ]
549−95:1 DEDENT
563+97:1 DEDENT
550−95:1 NEWLINE
551−95:1 glyph +$
552−95:4 name like
553−95:9 glyph |$
554−95:12 glyph [
555−95:13 tight tvar A
556−95:14 tight glyph ]
557−95:16 glyph [
558−95:17 tight name p
559−95:18 tight glyph =
560−95:19 tight name hair
561−95:24 name q
562−95:25 tight glyph =
563−95:26 tight glyph (
564−95:27 tight name unit
565−95:32 glyph [
566−95:33 tight name p
567−95:34 tight glyph =
568−95:35 tight tvar A
569−95:37 name q
570−95:38 tight glyph =
571−95:39 tight name nail
572−95:43 tight glyph ]
573−95:44 tight glyph )
574−95:45 tight glyph ]
57597:1 NEWLINE
56497:1 NEWLINE
576−97:1 glyph ++
565+97:1 glyph +$
566+97:4 name like
567+97:9 glyph |$
568+97:12 glyph [
569+97:13 tight tvar A
570+97:14 tight glyph ]
571+97:16 glyph [
572+97:17 tight name p
573+97:18 tight glyph =
574+97:19 tight name hair
575+97:24 name q
576+97:25 tight glyph =
577+97:26 tight glyph (
578+97:27 tight name unit
579+97:32 glyph [
580+97:33 tight name p
581+97:34 tight glyph =
582+97:35 tight tvar A
583+97:37 name q
584+97:38 tight glyph =
585+97:39 tight name nail
586+97:43 tight glyph ]
587+97:44 tight glyph )
588+97:45 tight glyph ]
589+99:1 NEWLINE
590+99:1 glyph ++
577−97:4 name wonk
591+99:4 name wonk
578−97:9 glyph |=
592+99:9 glyph |=
579−97:12 name veq
593+99:12 name veq
580−97:15 tight glyph =
594+99:15 tight glyph =
581−97:16 tight glyph (
595+99:16 tight glyph (
582−97:17 tight name like
596+99:17 tight name like
583−97:22 tvar A
597+99:22 tvar A
584−97:23 tight glyph )
598+99:23 tight glyph )
585−98:3 INDENT
599+100:3 INDENT
586−98:3 glyph ?-
600+100:3 glyph ?-
587−98:6 wing q.veq
601+100:6 wing q.veq
588−99:5 INDENT
602+101:5 INDENT
589−99:5 lit ~
603+101:5 lit ~
590−99:7 glyph !!
604+101:7 glyph !!
591−100:5 NEWLINE
605+102:5 NEWLINE
592−100:5 glyph [
606+102:5 glyph [
593−100:6 tight lit ~
607+102:6 tight lit ~
594−100:8 name product
608+102:8 name product
595−100:15 tight glyph ]
609+102:15 tight glyph ]
596−100:17 wing p.product
610+102:17 wing p.product
597−100:26 DEDENT
611+102:26 DEDENT
598−100:26 DEDENT
612+102:26 DEDENT
599−100:26 NEWLINE
613+102:26 NEWLINE
tests/golden/prelude-3g-like/tree.txt+152−146
@@ -87,156 +87,162 @@
87 (arm 39:5
87 (arm 39:5
88 (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
88 (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
89 (body 40:7
89 (body 40:7
90− (branch 40:7
90+ (cast 40:7
91− (wing 40:10 xs)
91+ (apply 40:10 list (tvar 40:16 A))
92− (arm 41:9 (lit 41:9 ~) (wing 41:11 ys))
92+ (body 41:9
93+ (branch 41:9
94+ (wing 41:12 xs)
95+ (arm 42:11 (lit 42:11 ~) (wing 42:13 ys))
93− (arm 42:9
96+ (arm 43:11
94− (cell 42:9 (bind 42:10 item) (bind 42:15 rest))
97+ (cell 43:11 (bind 43:12 item) (bind 43:17 rest))
95− (tuple 42:21
98+ (tuple 43:23
96− (wing 42:22 item)
99+ (wing 43:24 item)
97− (group 42:27
100+ (group 43:29
98− (call 42:28 (wing 42:28 weld) (wing 42:33 rest) (wing 42:38 ys))))))))))))
101+ (call 43:30 (wing 43:30 weld) (wing 43:35 rest) (wing 43:40 ys))))))))))))))
99− (value 44:1 turn
102+ (value 45:1 turn
100− (gate 44:9
103+ (gate 45:9
101− (face 44:12 args
104+ (face 45:12 args
102− (cell 44:17
105+ (cell 45:17
103− (apply 44:18 list (tvar 44:24 A))
106+ (apply 45:18 list (tvar 45:24 A))
104− (fn 44:27 (tvar 44:30 A) (tvar 44:32 B))))
107+ (fn 45:27 (tvar 45:30 A) (tvar 45:32 B))))
105− (body 45:3
108+ (body 46:3
106− (branch 45:3
109+ (branch 46:3
107− (wing 45:6 args)
110+ (wing 46:6 args)
108− (arm 46:5
111+ (arm 47:5
109− (cell 46:5 (bind 46:6 xs) (bind 46:9 f))
112+ (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
110− (body 47:7
113+ (body 48:7
111− (branch 47:7
114+ (cast 48:7
115+ (apply 48:10 list (tvar 48:16 B))
116+ (body 49:9
117+ (branch 49:9
112− (wing 47:10 xs)
118+ (wing 49:12 xs)
113− (arm 48:9 (lit 48:9 ~) (lit 48:11 ~))
119+ (arm 50:11 (lit 50:11 ~) (lit 50:13 ~))
114− (arm 49:9
120+ (arm 51:11
115− (cell 49:9 (bind 49:10 item) (bind 49:15 rest))
121+ (cell 51:11 (bind 51:12 item) (bind 51:17 rest))
116− (tuple 49:21
122+ (tuple 51:23
117− (group 49:22
123+ (group 51:24
118− (call 49:23 (wing 49:23 f) (wing 49:25 item)))
124+ (call 51:25 (wing 51:25 f) (wing 51:27 item)))
119− (group 49:31
125+ (group 51:33
120− (call 49:32 (wing 49:32 turn) (wing 49:37 rest) (wing 49:42 f))))))))))))
126+ (call 51:34 (wing 51:34 turn) (wing 51:39 rest) (wing 51:44 f))))))))))))))
121− (mold 51:1 dime
127+ (mold 53:1 dime
122− (cell 51:9
123− (face 51:10 p (aura 51:12 @ta))
124− (face 51:16 q (aura 51:18 @))))
125− (mold 53:1 hair
126 (cell 53:9
128 (cell 53:9
127− (face 53:10 p (aura 53:12 @ud))
129+ (face 53:10 p (aura 53:12 @ta))
128− (face 53:16 q (aura 53:18 @ud))))
130+ (face 53:16 q (aura 53:18 @))))
129− (mold 55:1 pint
131+ (mold 55:1 hair
130 (cell 55:9
132 (cell 55:9
131− (face 55:10 p
133+ (face 55:10 p (aura 55:12 @ud))
134+ (face 55:16 q (aura 55:18 @ud))))
135+ (mold 57:1 pint
136+ (cell 57:9
137+ (face 57:10 p
132− (cell 55:12
138+ (cell 57:12
133− (face 55:13 p (aura 55:15 @))
139+ (face 57:13 p (aura 57:15 @))
134− (face 55:17 q (aura 55:19 @))))
140+ (face 57:17 q (aura 57:19 @))))
135− (face 55:22 q
141+ (face 57:22 q
136− (cell 55:24
142+ (cell 57:24
137− (face 55:25 p (aura 55:27 @))
143+ (face 57:25 p (aura 57:27 @))
138− (face 55:29 q (aura 55:31 @))))))
144+ (face 57:29 q (aura 57:31 @))))))
139− (mold 57:1 coin
145+ (mold 59:1 coin
140− (union 58:3
146+ (union 60:3
141− (cell 58:3
142− (const 58:4 %$)
143− (face 58:7 p (ref 58:9 dime)))
144− (cell 59:3
145− (const 59:4 %blob)
146− (face 59:10 p (noun 59:12)))
147 (cell 60:3
147 (cell 60:3
148− (const 60:4 %many)
148+ (const 60:4 %$)
149+ (face 60:7 p (ref 60:9 dime)))
150+ (cell 61:3
151+ (const 61:4 %blob)
152+ (face 61:10 p (noun 61:12)))
153+ (cell 62:3
154+ (const 62:4 %many)
149− (face 60:10 p
155+ (face 62:10 p
150− (apply 60:12 list (ref 60:18 coin))))))
156+ (apply 62:12 list (ref 62:18 coin))))))
151− (mold 62:1 pair
157+ (mold 64:1 pair
152− (generic 62:9 A B
158+ (generic 64:9 A B
153− (cell 62:18
159+ (cell 64:18
154− (face 62:19 p (tvar 62:21 A))
160+ (face 64:19 p (tvar 64:21 A))
155− (face 62:23 q (tvar 62:25 B)))))
161+ (face 64:23 q (tvar 64:25 B)))))
156− (mold 64:1 trel
162+ (mold 66:1 trel
157− (generic 64:9 A B C
163+ (generic 66:9 A B C
158− (cell 64:20
164+ (cell 66:20
159− (face 64:21 p (tvar 64:23 A))
165+ (face 66:21 p (tvar 66:23 A))
160− (face 64:25 q (tvar 64:27 B))
166+ (face 66:25 q (tvar 66:27 B))
161− (face 64:29 r (tvar 64:31 C)))))
167+ (face 66:29 r (tvar 66:31 C)))))
162− (mold 66:1 qual
168+ (mold 68:1 qual
163− (generic 66:9 A B C D
169+ (generic 68:9 A B C D
164− (cell 66:22
170+ (cell 68:22
165− (face 66:23 p (tvar 66:25 A))
171+ (face 68:23 p (tvar 68:25 A))
166− (face 66:27 q (tvar 66:29 B))
172+ (face 68:27 q (tvar 68:29 B))
167− (face 66:31 r (tvar 66:33 C))
173+ (face 68:31 r (tvar 68:33 C))
168− (face 66:35 s (tvar 66:37 D)))))
174+ (face 68:35 s (tvar 68:37 D)))))
169− (mold 68:1 cord (aura 68:9 @t))
175+ (mold 70:1 cord (aura 70:9 @t))
170− (mold 70:1 knot (aura 70:9 @ta))
176+ (mold 72:1 knot (aura 72:9 @ta))
171− (mold 72:1 tape
177+ (mold 74:1 tape
172− (apply 72:9 list (aura 72:15 @tD)))
178+ (apply 74:9 list (aura 74:15 @tD)))
173− (mold 74:1 path
179+ (mold 76:1 path
174− (apply 74:9 list (ref 74:15 knot)))
180+ (apply 76:9 list (ref 76:15 knot)))
175− (mold 76:1 tank
181+ (mold 78:1 tank
176− (union 77:3
182+ (union 79:3
177− (ref 77:3 cord)
183+ (ref 79:3 cord)
178− (cell 78:3
179− (const 78:4 %leaf)
180− (face 78:10 p (ref 78:12 tape)))
181− (cell 79:3
182− (const 79:4 %palm)
183− (face 79:10 p
184− (apply 79:12 qual (ref 79:18 tape) (ref 79:23 tape) (ref 79:28 tape) (ref 79:33 tape)))
185− (face 79:39 q
186− (apply 79:41 list (ref 79:47 tank))))
187 (cell 80:3
184 (cell 80:3
188− (const 80:4 %rose)
185+ (const 80:4 %leaf)
186+ (face 80:10 p (ref 80:12 tape)))
187+ (cell 81:3
188+ (const 81:4 %palm)
189+ (face 81:10 p
190+ (apply 81:12 qual (ref 81:18 tape) (ref 81:23 tape) (ref 81:28 tape) (ref 81:33 tape)))
191+ (face 81:39 q
192+ (apply 81:41 list (ref 81:47 tank))))
193+ (cell 82:3
194+ (const 82:4 %rose)
189− (face 80:10 p
195+ (face 82:10 p
190− (apply 80:12 trel (ref 80:18 tape) (ref 80:23 tape) (ref 80:28 tape)))
196+ (apply 82:12 trel (ref 82:18 tape) (ref 82:23 tape) (ref 82:28 tape)))
191− (face 80:34 q
197+ (face 82:34 q
192− (apply 80:36 list (ref 80:42 tank))))))
198+ (apply 82:36 list (ref 82:42 tank))))))
193− (mold 82:1 nail
199+ (mold 84:1 nail
194− (cell 82:9
195− (face 82:10 p (ref 82:12 hair))
196− (face 82:17 q (ref 82:19 tape))))
197− (mold 84:1 edge
198 (cell 84:9
200 (cell 84:9
199 (face 84:10 p (ref 84:12 hair))
201 (face 84:10 p (ref 84:12 hair))
200− (face 84:17 q
202+ (face 84:17 q (ref 84:19 tape))))
203+ (mold 86:1 edge
204+ (cell 86:9
205+ (face 86:10 p (ref 86:12 hair))
206+ (face 86:17 q
201− (apply 84:19 unit
207+ (apply 86:19 unit
202− (cell 84:25
208+ (cell 86:25
203− (face 84:26 p (noun 84:28))
209+ (face 86:26 p (noun 86:28))
204− (face 84:30 q (ref 84:32 nail)))))))
210+ (face 86:30 q (ref 86:32 nail)))))))
205− (mold 86:1 rule
211+ (mold 88:1 rule
206− (fn 86:9 (ref 86:12 nail) (ref 86:17 edge)))
212+ (fn 88:9 (ref 88:12 nail) (ref 88:17 edge)))
207− (mold 88:1 spot
213+ (mold 90:1 spot
208− (cell 88:9
214+ (cell 90:9
209− (face 88:10 p (ref 88:12 path))
215+ (face 90:10 p (ref 90:12 path))
210− (face 88:17 q (ref 88:19 pint))))
216+ (face 90:17 q (ref 90:19 pint))))
211− (mold 90:1 toon
217+ (mold 92:1 toon
212− (union 91:3
218+ (union 93:3
213− (cell 91:3
214− (const 91:4 %0)
215− (face 91:7 p (noun 91:9)))
216− (cell 92:3
217− (const 92:4 %1)
218− (face 92:7 p (noun 92:9)))
219 (cell 93:3
219 (cell 93:3
220− (const 93:4 %2)
220+ (const 93:4 %0)
221+ (face 93:7 p (noun 93:9)))
222+ (cell 94:3
223+ (const 94:4 %1)
224+ (face 94:7 p (noun 94:9)))
225+ (cell 95:3
226+ (const 95:4 %2)
221− (face 93:7 p
227+ (face 95:7 p
222− (apply 93:9 list (ref 93:15 tank))))))
228+ (apply 95:9 list (ref 95:15 tank))))))
223− (mold 95:1 like
229+ (mold 97:1 like
224− (generic 95:9 A
230+ (generic 97:9 A
225− (cell 95:16
231+ (cell 97:16
226− (face 95:17 p (ref 95:19 hair))
232+ (face 97:17 p (ref 97:19 hair))
227− (face 95:24 q
233+ (face 97:24 q
228− (apply 95:26 unit
234+ (apply 97:26 unit
229− (cell 95:32
235+ (cell 97:32
230− (face 95:33 p (tvar 95:35 A))
236+ (face 97:33 p (tvar 97:35 A))
231− (face 95:37 q (ref 95:39 nail))))))))
237+ (face 97:37 q (ref 97:39 nail))))))))
232− (value 97:1 wonk
238+ (value 99:1 wonk
233− (gate 97:9
239+ (gate 99:9
234− (face 97:12 veq
240+ (face 99:12 veq
235− (apply 97:16 like (tvar 97:22 A)))
241+ (apply 99:16 like (tvar 99:22 A)))
236− (body 98:3
242+ (body 100:3
237− (branch 98:3
243+ (branch 100:3
238− (wing 98:6 q.veq)
244+ (wing 100:6 q.veq)
239− (arm 99:5 (lit 99:5 ~) (crash 99:7))
245+ (arm 101:5 (lit 101:5 ~) (crash 101:7))
240− (arm 100:5
246+ (arm 102:5
241− (cell 100:5 (lit 100:6 ~) (bind 100:8 product))
247+ (cell 102:5 (lit 102:6 ~) (bind 102:8 product))
242− (wing 100:17 p.product)))))))
248+ (wing 102:17 p.product)))))))
tests/golden/prelude-3g-structural/source.jibb+8−6
@@ -37,16 +37,18 @@
37++ weld |= args=[(list A) (list A)]
37++ weld |= args=[(list A) (list A)]
38 ?- args
38 ?- args
39 [xs ys]
39 [xs ys]
40+ ^- (list A)
40− ?- xs
41+ ?- xs
41− ~ ys
42+ ~ ys
42− [item rest] [item (weld rest ys)]
43+ [item rest] [item (weld rest ys)]
43
44
44++ turn |= args=[(list A) $-(A B)]
45++ turn |= args=[(list A) $-(A B)]
45 ?- args
46 ?- args
46 [xs f]
47 [xs f]
48+ ^- (list B)
47− ?- xs
49+ ?- xs
48− ~ ~
50+ ~ ~
49− [item rest] [(f item) (turn rest f)]
51+ [item rest] [(f item) (turn rest f)]
50
52
51+$ dime [p=@ta q=@]
53+$ dime [p=@ta q=@]
52
54
tests/golden/prelude-3g-structural/tokens.txt+309−295
@@ -190,361 +190,375 @@
19039:9 name ys
19039:9 name ys
19139:11 tight glyph ]
19139:11 tight glyph ]
19240:7 INDENT
19240:7 INDENT
193−40:7 glyph ?-
193+40:7 glyph ^-
194−40:10 name xs
194+40:10 glyph (
195+40:11 tight name list
196+40:16 tvar A
197+40:17 tight glyph )
19541:9 INDENT
19841:9 INDENT
196−41:9 lit ~
199+41:9 glyph ?-
200+41:12 name xs
201+42:11 INDENT
202+42:11 lit ~
197−41:11 name ys
203+42:13 name ys
198−42:9 NEWLINE
204+43:11 NEWLINE
199−42:9 glyph [
205+43:11 glyph [
200−42:10 tight name item
206+43:12 tight name item
201−42:15 name rest
207+43:17 name rest
202−42:19 tight glyph ]
208+43:21 tight glyph ]
203−42:21 glyph [
209+43:23 glyph [
204−42:22 tight name item
210+43:24 tight name item
205−42:27 glyph (
211+43:29 glyph (
206−42:28 tight name weld
212+43:30 tight name weld
207−42:33 name rest
213+43:35 name rest
208−42:38 name ys
214+43:40 name ys
209−42:40 tight glyph )
215+43:42 tight glyph )
210−42:41 tight glyph ]
216+43:43 tight glyph ]
217+45:1 DEDENT
211−44:1 DEDENT
218+45:1 DEDENT
212−44:1 DEDENT
219+45:1 DEDENT
213−44:1 DEDENT
220+45:1 DEDENT
214−44:1 DEDENT
221+45:1 DEDENT
215−44:1 NEWLINE
222+45:1 NEWLINE
216−44:1 glyph ++
223+45:1 glyph ++
217−44:4 name turn
224+45:4 name turn
218−44:9 glyph |=
225+45:9 glyph |=
219−44:12 name args
226+45:12 name args
220−44:16 tight glyph =
227+45:16 tight glyph =
221−44:17 tight glyph [
228+45:17 tight glyph [
222−44:18 tight glyph (
229+45:18 tight glyph (
223−44:19 tight name list
230+45:19 tight name list
224−44:24 tvar A
231+45:24 tvar A
225−44:25 tight glyph )
232+45:25 tight glyph )
226−44:27 glyph $-(
233+45:27 glyph $-(
227−44:30 tight tvar A
234+45:30 tight tvar A
228−44:32 tvar B
235+45:32 tvar B
229−44:33 tight glyph )
236+45:33 tight glyph )
230−44:34 tight glyph ]
237+45:34 tight glyph ]
231−45:3 INDENT
238+46:3 INDENT
232−45:3 glyph ?-
239+46:3 glyph ?-
233−45:6 name args
240+46:6 name args
234−46:5 INDENT
241+47:5 INDENT
235−46:5 glyph [
242+47:5 glyph [
236−46:6 tight name xs
243+47:6 tight name xs
237−46:9 name f
244+47:9 name f
238−46:10 tight glyph ]
245+47:10 tight glyph ]
239−47:7 INDENT
246+48:7 INDENT
240−47:7 glyph ?-
247+48:7 glyph ^-
241−47:10 name xs
248+48:10 glyph (
249+48:11 tight name list
250+48:16 tvar B
251+48:17 tight glyph )
242−48:9 INDENT
252+49:9 INDENT
253+49:9 glyph ?-
254+49:12 name xs
255+50:11 INDENT
243−48:9 lit ~
256+50:11 lit ~
244−48:11 lit ~
257+50:13 lit ~
245−49:9 NEWLINE
258+51:11 NEWLINE
246−49:9 glyph [
259+51:11 glyph [
247−49:10 tight name item
260+51:12 tight name item
248−49:15 name rest
261+51:17 name rest
249−49:19 tight glyph ]
262+51:21 tight glyph ]
250−49:21 glyph [
263+51:23 glyph [
251−49:22 tight glyph (
264+51:24 tight glyph (
252−49:23 tight name f
265+51:25 tight name f
253−49:25 name item
266+51:27 name item
254−49:29 tight glyph )
255−49:31 glyph (
267+51:31 tight glyph )
268+51:33 glyph (
256−49:32 tight name turn
269+51:34 tight name turn
257−49:37 name rest
270+51:39 name rest
258−49:42 name f
271+51:44 name f
259−49:43 tight glyph )
272+51:45 tight glyph )
260−49:44 tight glyph ]
273+51:46 tight glyph ]
261−51:1 DEDENT
274+53:1 DEDENT
262−51:1 DEDENT
275+53:1 DEDENT
263−51:1 DEDENT
276+53:1 DEDENT
264−51:1 DEDENT
277+53:1 DEDENT
265−51:1 NEWLINE
278+53:1 DEDENT
266−51:1 glyph +$
267−51:4 name dime
268−51:9 glyph [
269−51:10 tight name p
270−51:11 tight glyph =
271−51:12 tight aura @ta
272−51:16 name q
273−51:17 tight glyph =
274−51:18 tight aura @
275−51:19 tight glyph ]
27653:1 NEWLINE
27953:1 NEWLINE
27753:1 glyph +$
28053:1 glyph +$
278−53:4 name hair
281+53:4 name dime
27953:9 glyph [
28253:9 glyph [
28053:10 tight name p
28353:10 tight name p
28153:11 tight glyph =
28453:11 tight glyph =
282−53:12 tight aura @ud
285+53:12 tight aura @ta
28353:16 name q
28653:16 name q
28453:17 tight glyph =
28753:17 tight glyph =
285−53:18 tight aura @ud
288+53:18 tight aura @
286−53:21 tight glyph ]
289+53:19 tight glyph ]
28755:1 NEWLINE
29055:1 NEWLINE
28855:1 glyph +$
29155:1 glyph +$
289−55:4 name pint
292+55:4 name hair
29055:9 glyph [
29355:9 glyph [
29155:10 tight name p
29455:10 tight name p
29255:11 tight glyph =
29555:11 tight glyph =
293−55:12 tight glyph [
296+55:12 tight aura @ud
294−55:13 tight name p
297+55:16 name q
295−55:14 tight glyph =
298+55:17 tight glyph =
296−55:15 tight aura @
297−55:17 name q
298−55:18 tight glyph =
299+55:18 tight aura @ud
299−55:19 tight aura @
300−55:20 tight glyph ]
301−55:22 name q
302−55:23 tight glyph =
303−55:24 tight glyph [
304−55:25 tight name p
305−55:26 tight glyph =
306−55:27 tight aura @
307−55:29 name q
308−55:30 tight glyph =
309−55:31 tight aura @
310−55:32 tight glyph ]
311−55:33 tight glyph ]
300+55:21 tight glyph ]
31257:1 NEWLINE
30157:1 NEWLINE
31357:1 glyph +$
30257:1 glyph +$
314−57:4 name coin
303+57:4 name pint
315−58:3 INDENT
316−58:3 glyph [
317−58:4 tight lit %$
318−58:7 name p
319−58:8 tight glyph =
320−58:9 tight name dime
321−58:13 tight glyph ]
304+57:9 glyph [
322−59:3 NEWLINE
323−59:3 glyph [
324−59:4 tight lit %blob
325−59:10 name p
305+57:10 tight name p
326−59:11 tight glyph =
306+57:11 tight glyph =
327−59:12 tight glyph *
307+57:12 tight glyph [
328−59:13 tight glyph ]
308+57:13 tight name p
329−60:3 NEWLINE
309+57:14 tight glyph =
310+57:15 tight aura @
311+57:17 name q
312+57:18 tight glyph =
313+57:19 tight aura @
314+57:20 tight glyph ]
315+57:22 name q
316+57:23 tight glyph =
317+57:24 tight glyph [
318+57:25 tight name p
319+57:26 tight glyph =
320+57:27 tight aura @
321+57:29 name q
322+57:30 tight glyph =
323+57:31 tight aura @
324+57:32 tight glyph ]
325+57:33 tight glyph ]
326+59:1 NEWLINE
327+59:1 glyph +$
328+59:4 name coin
329+60:3 INDENT
33060:3 glyph [
33060:3 glyph [
331−60:4 tight lit %many
331+60:4 tight lit %$
332+60:7 name p
333+60:8 tight glyph =
334+60:9 tight name dime
335+60:13 tight glyph ]
336+61:3 NEWLINE
337+61:3 glyph [
338+61:4 tight lit %blob
339+61:10 name p
340+61:11 tight glyph =
341+61:12 tight glyph *
342+61:13 tight glyph ]
343+62:3 NEWLINE
344+62:3 glyph [
345+62:4 tight lit %many
332−60:10 name p
346+62:10 name p
333−60:11 tight glyph =
347+62:11 tight glyph =
334−60:12 tight glyph (
348+62:12 tight glyph (
335−60:13 tight name list
349+62:13 tight name list
336−60:18 name coin
350+62:18 name coin
337−60:22 tight glyph )
351+62:22 tight glyph )
338−60:23 tight glyph ]
352+62:23 tight glyph ]
339−62:1 DEDENT
353+64:1 DEDENT
340−62:1 NEWLINE
341−62:1 glyph +$
342−62:4 name pair
343−62:9 glyph |$
344−62:12 glyph [
345−62:13 tight tvar A
346−62:15 tvar B
347−62:16 tight glyph ]
348−62:18 glyph [
349−62:19 tight name p
350−62:20 tight glyph =
351−62:21 tight tvar A
352−62:23 name q
353−62:24 tight glyph =
354−62:25 tight tvar B
355−62:26 tight glyph ]
35664:1 NEWLINE
35464:1 NEWLINE
35764:1 glyph +$
35564:1 glyph +$
358−64:4 name trel
356+64:4 name pair
35964:9 glyph |$
35764:9 glyph |$
36064:12 glyph [
35864:12 glyph [
36164:13 tight tvar A
35964:13 tight tvar A
36264:15 tvar B
36064:15 tvar B
363−64:17 tvar C
361+64:16 tight glyph ]
364−64:18 tight glyph ]
365−64:20 glyph [
362+64:18 glyph [
366−64:21 tight name p
363+64:19 tight name p
367−64:22 tight glyph =
364+64:20 tight glyph =
368−64:23 tight tvar A
365+64:21 tight tvar A
369−64:25 name q
366+64:23 name q
370−64:26 tight glyph =
367+64:24 tight glyph =
371−64:27 tight tvar B
368+64:25 tight tvar B
372−64:29 name r
373−64:30 tight glyph =
374−64:31 tight tvar C
375−64:32 tight glyph ]
369+64:26 tight glyph ]
37666:1 NEWLINE
37066:1 NEWLINE
37766:1 glyph +$
37166:1 glyph +$
378−66:4 name qual
372+66:4 name trel
37966:9 glyph |$
37366:9 glyph |$
38066:12 glyph [
37466:12 glyph [
38166:13 tight tvar A
37566:13 tight tvar A
38266:15 tvar B
37666:15 tvar B
38366:17 tvar C
37766:17 tvar C
384−66:19 tvar D
378+66:18 tight glyph ]
385−66:20 tight glyph ]
386−66:22 glyph [
379+66:20 glyph [
380+66:21 tight name p
381+66:22 tight glyph =
387−66:23 tight name p
382+66:23 tight tvar A
388−66:24 tight glyph =
389−66:25 tight tvar A
390−66:27 name q
383+66:25 name q
391−66:28 tight glyph =
384+66:26 tight glyph =
392−66:29 tight tvar B
385+66:27 tight tvar B
393−66:31 name r
386+66:29 name r
394−66:32 tight glyph =
387+66:30 tight glyph =
395−66:33 tight tvar C
388+66:31 tight tvar C
396−66:35 name s
397−66:36 tight glyph =
398−66:37 tight tvar D
399−66:38 tight glyph ]
389+66:32 tight glyph ]
40068:1 NEWLINE
39068:1 NEWLINE
40168:1 glyph +$
39168:1 glyph +$
402−68:4 name cord
392+68:4 name qual
403−68:9 aura @t
393+68:9 glyph |$
394+68:12 glyph [
395+68:13 tight tvar A
396+68:15 tvar B
397+68:17 tvar C
398+68:19 tvar D
399+68:20 tight glyph ]
400+68:22 glyph [
401+68:23 tight name p
402+68:24 tight glyph =
403+68:25 tight tvar A
404+68:27 name q
405+68:28 tight glyph =
406+68:29 tight tvar B
407+68:31 name r
408+68:32 tight glyph =
409+68:33 tight tvar C
410+68:35 name s
411+68:36 tight glyph =
412+68:37 tight tvar D
413+68:38 tight glyph ]
40470:1 NEWLINE
41470:1 NEWLINE
40570:1 glyph +$
41570:1 glyph +$
406−70:4 name knot
416+70:4 name cord
407−70:9 aura @ta
417+70:9 aura @t
40872:1 NEWLINE
41872:1 NEWLINE
40972:1 glyph +$
41972:1 glyph +$
410−72:4 name tape
420+72:4 name knot
411−72:9 glyph (
412−72:10 tight name list
413−72:15 aura @tD
421+72:9 aura @ta
414−72:18 tight glyph )
41574:1 NEWLINE
42274:1 NEWLINE
41674:1 glyph +$
42374:1 glyph +$
417−74:4 name path
424+74:4 name tape
41874:9 glyph (
42574:9 glyph (
41974:10 tight name list
42674:10 tight name list
420−74:15 name knot
427+74:15 aura @tD
421−74:19 tight glyph )
428+74:18 tight glyph )
42276:1 NEWLINE
42976:1 NEWLINE
42376:1 glyph +$
43076:1 glyph +$
424−76:4 name tank
431+76:4 name path
432+76:9 glyph (
433+76:10 tight name list
434+76:15 name knot
435+76:19 tight glyph )
436+78:1 NEWLINE
437+78:1 glyph +$
438+78:4 name tank
425−77:3 INDENT
439+79:3 INDENT
426−77:3 name cord
440+79:3 name cord
427−78:3 NEWLINE
428−78:3 glyph [
429−78:4 tight lit %leaf
430−78:10 name p
431−78:11 tight glyph =
432−78:12 tight name tape
433−78:16 tight glyph ]
434−79:3 NEWLINE
435−79:3 glyph [
436−79:4 tight lit %palm
437−79:10 name p
438−79:11 tight glyph =
439−79:12 tight glyph (
440−79:13 tight name qual
441−79:18 name tape
442−79:23 name tape
443−79:28 name tape
444−79:33 name tape
445−79:37 tight glyph )
446−79:39 name q
447−79:40 tight glyph =
448−79:41 tight glyph (
449−79:42 tight name list
450−79:47 name tank
451−79:51 tight glyph )
452−79:52 tight glyph ]
45380:3 NEWLINE
44180:3 NEWLINE
45480:3 glyph [
44280:3 glyph [
455−80:4 tight lit %rose
443+80:4 tight lit %leaf
45680:10 name p
44480:10 name p
45780:11 tight glyph =
44580:11 tight glyph =
458−80:12 tight glyph (
446+80:12 tight name tape
447+80:16 tight glyph ]
448+81:3 NEWLINE
449+81:3 glyph [
450+81:4 tight lit %palm
451+81:10 name p
452+81:11 tight glyph =
453+81:12 tight glyph (
459−80:13 tight name trel
454+81:13 tight name qual
460−80:18 name tape
455+81:18 name tape
461−80:23 name tape
456+81:23 name tape
462−80:28 name tape
457+81:28 name tape
458+81:33 name tape
463−80:32 tight glyph )
459+81:37 tight glyph )
464−80:34 name q
460+81:39 name q
465−80:35 tight glyph =
461+81:40 tight glyph =
466−80:36 tight glyph (
462+81:41 tight glyph (
467−80:37 tight name list
463+81:42 tight name list
468−80:42 name tank
464+81:47 name tank
469−80:46 tight glyph )
470−80:47 tight glyph ]
465+81:51 tight glyph )
471−82:1 DEDENT
466+81:52 tight glyph ]
472−82:1 NEWLINE
467+82:3 NEWLINE
473−82:1 glyph +$
468+82:3 glyph [
474−82:4 name nail
469+82:4 tight lit %rose
475−82:9 glyph [
476−82:10 tight name p
470+82:10 name p
47782:11 tight glyph =
47182:11 tight glyph =
478−82:12 tight name hair
472+82:12 tight glyph (
473+82:13 tight name trel
474+82:18 name tape
475+82:23 name tape
476+82:28 name tape
477+82:32 tight glyph )
479−82:17 name q
478+82:34 name q
480−82:18 tight glyph =
479+82:35 tight glyph =
481−82:19 tight name tape
480+82:36 tight glyph (
481+82:37 tight name list
482+82:42 name tank
483+82:46 tight glyph )
482−82:23 tight glyph ]
484+82:47 tight glyph ]
485+84:1 DEDENT
48384:1 NEWLINE
48684:1 NEWLINE
48484:1 glyph +$
48784:1 glyph +$
485−84:4 name edge
488+84:4 name nail
48684:9 glyph [
48984:9 glyph [
48784:10 tight name p
49084:10 tight name p
48884:11 tight glyph =
49184:11 tight glyph =
48984:12 tight name hair
49284:12 tight name hair
49084:17 name q
49384:17 name q
49184:18 tight glyph =
49484:18 tight glyph =
492−84:19 tight glyph (
495+84:19 tight name tape
493−84:20 tight name unit
494−84:25 glyph [
495−84:26 tight name p
496−84:27 tight glyph =
497−84:28 tight glyph *
498−84:30 name q
499−84:31 tight glyph =
500−84:32 tight name nail
501−84:36 tight glyph ]
502−84:37 tight glyph )
503−84:38 tight glyph ]
496+84:23 tight glyph ]
50486:1 NEWLINE
49786:1 NEWLINE
50586:1 glyph +$
49886:1 glyph +$
506−86:4 name rule
499+86:4 name edge
507−86:9 glyph $-(
500+86:9 glyph [
501+86:10 tight name p
502+86:11 tight glyph =
503+86:12 tight name hair
504+86:17 name q
505+86:18 tight glyph =
506+86:19 tight glyph (
507+86:20 tight name unit
508+86:25 glyph [
509+86:26 tight name p
510+86:27 tight glyph =
511+86:28 tight glyph *
512+86:30 name q
513+86:31 tight glyph =
508−86:12 tight name nail
514+86:32 tight name nail
509−86:17 name edge
515+86:36 tight glyph ]
510−86:21 tight glyph )
516+86:37 tight glyph )
517+86:38 tight glyph ]
51188:1 NEWLINE
51888:1 NEWLINE
51288:1 glyph +$
51988:1 glyph +$
513−88:4 name spot
520+88:4 name rule
514−88:9 glyph [
521+88:9 glyph $-(
515−88:10 tight name p
516−88:11 tight glyph =
517−88:12 tight name path
522+88:12 tight name nail
518−88:17 name q
523+88:17 name edge
519−88:18 tight glyph =
524+88:21 tight glyph )
520−88:19 tight name pint
521−88:23 tight glyph ]
52290:1 NEWLINE
52590:1 NEWLINE
52390:1 glyph +$
52690:1 glyph +$
524−90:4 name toon
527+90:4 name spot
528+90:9 glyph [
529+90:10 tight name p
530+90:11 tight glyph =
531+90:12 tight name path
532+90:17 name q
533+90:18 tight glyph =
534+90:19 tight name pint
535+90:23 tight glyph ]
536+92:1 NEWLINE
537+92:1 glyph +$
538+92:4 name toon
525−91:3 INDENT
539+93:3 INDENT
526−91:3 glyph [
527−91:4 tight lit %0
528−91:7 name p
529−91:8 tight glyph =
530−91:9 tight glyph *
531−91:10 tight glyph ]
532−92:3 NEWLINE
533−92:3 glyph [
534−92:4 tight lit %1
535−92:7 name p
536−92:8 tight glyph =
537−92:9 tight glyph *
538−92:10 tight glyph ]
539−93:3 NEWLINE
54093:3 glyph [
54093:3 glyph [
541−93:4 tight lit %2
541+93:4 tight lit %0
54293:7 name p
54293:7 name p
54393:8 tight glyph =
54393:8 tight glyph =
544−93:9 tight glyph (
544+93:9 tight glyph *
545+93:10 tight glyph ]
546+94:3 NEWLINE
547+94:3 glyph [
548+94:4 tight lit %1
549+94:7 name p
550+94:8 tight glyph =
551+94:9 tight glyph *
552+94:10 tight glyph ]
553+95:3 NEWLINE
554+95:3 glyph [
555+95:4 tight lit %2
556+95:7 name p
557+95:8 tight glyph =
558+95:9 tight glyph (
545−93:10 tight name list
559+95:10 tight name list
546−93:15 name tank
560+95:15 name tank
547−93:19 tight glyph )
561+95:19 tight glyph )
548−93:20 tight glyph ]
562+95:20 tight glyph ]
549−93:21 DEDENT
563+95:21 DEDENT
550−93:21 NEWLINE
564+95:21 NEWLINE
tests/golden/prelude-3g-structural/tree.txt+132−126
@@ -87,136 +87,142 @@
87 (arm 39:5
87 (arm 39:5
88 (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
88 (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
89 (body 40:7
89 (body 40:7
90− (branch 40:7
90+ (cast 40:7
91− (wing 40:10 xs)
91+ (apply 40:10 list (tvar 40:16 A))
92− (arm 41:9 (lit 41:9 ~) (wing 41:11 ys))
92+ (body 41:9
93+ (branch 41:9
94+ (wing 41:12 xs)
95+ (arm 42:11 (lit 42:11 ~) (wing 42:13 ys))
93− (arm 42:9
96+ (arm 43:11
94− (cell 42:9 (bind 42:10 item) (bind 42:15 rest))
97+ (cell 43:11 (bind 43:12 item) (bind 43:17 rest))
95− (tuple 42:21
98+ (tuple 43:23
96− (wing 42:22 item)
99+ (wing 43:24 item)
97− (group 42:27
100+ (group 43:29
98− (call 42:28 (wing 42:28 weld) (wing 42:33 rest) (wing 42:38 ys))))))))))))
101+ (call 43:30 (wing 43:30 weld) (wing 43:35 rest) (wing 43:40 ys))))))))))))))
99− (value 44:1 turn
102+ (value 45:1 turn
100− (gate 44:9
103+ (gate 45:9
101− (face 44:12 args
104+ (face 45:12 args
102− (cell 44:17
105+ (cell 45:17
103− (apply 44:18 list (tvar 44:24 A))
106+ (apply 45:18 list (tvar 45:24 A))
104− (fn 44:27 (tvar 44:30 A) (tvar 44:32 B))))
107+ (fn 45:27 (tvar 45:30 A) (tvar 45:32 B))))
105− (body 45:3
108+ (body 46:3
106− (branch 45:3
109+ (branch 46:3
107− (wing 45:6 args)
110+ (wing 46:6 args)
108− (arm 46:5
111+ (arm 47:5
109− (cell 46:5 (bind 46:6 xs) (bind 46:9 f))
112+ (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
110− (body 47:7
113+ (body 48:7
111− (branch 47:7
114+ (cast 48:7
115+ (apply 48:10 list (tvar 48:16 B))
116+ (body 49:9
117+ (branch 49:9
112− (wing 47:10 xs)
118+ (wing 49:12 xs)
113− (arm 48:9 (lit 48:9 ~) (lit 48:11 ~))
119+ (arm 50:11 (lit 50:11 ~) (lit 50:13 ~))
114− (arm 49:9
120+ (arm 51:11
115− (cell 49:9 (bind 49:10 item) (bind 49:15 rest))
121+ (cell 51:11 (bind 51:12 item) (bind 51:17 rest))
116− (tuple 49:21
122+ (tuple 51:23
117− (group 49:22
123+ (group 51:24
118− (call 49:23 (wing 49:23 f) (wing 49:25 item)))
124+ (call 51:25 (wing 51:25 f) (wing 51:27 item)))
119− (group 49:31
125+ (group 51:33
120− (call 49:32 (wing 49:32 turn) (wing 49:37 rest) (wing 49:42 f))))))))))))
126+ (call 51:34 (wing 51:34 turn) (wing 51:39 rest) (wing 51:44 f))))))))))))))
121− (mold 51:1 dime
127+ (mold 53:1 dime
122− (cell 51:9
123− (face 51:10 p (aura 51:12 @ta))
124− (face 51:16 q (aura 51:18 @))))
125− (mold 53:1 hair
126 (cell 53:9
128 (cell 53:9
127− (face 53:10 p (aura 53:12 @ud))
129+ (face 53:10 p (aura 53:12 @ta))
128− (face 53:16 q (aura 53:18 @ud))))
130+ (face 53:16 q (aura 53:18 @))))
129− (mold 55:1 pint
131+ (mold 55:1 hair
130 (cell 55:9
132 (cell 55:9
131− (face 55:10 p
133+ (face 55:10 p (aura 55:12 @ud))
134+ (face 55:16 q (aura 55:18 @ud))))
135+ (mold 57:1 pint
136+ (cell 57:9
137+ (face 57:10 p
132− (cell 55:12
138+ (cell 57:12
133− (face 55:13 p (aura 55:15 @))
139+ (face 57:13 p (aura 57:15 @))
134− (face 55:17 q (aura 55:19 @))))
140+ (face 57:17 q (aura 57:19 @))))
135− (face 55:22 q
141+ (face 57:22 q
136− (cell 55:24
142+ (cell 57:24
137− (face 55:25 p (aura 55:27 @))
143+ (face 57:25 p (aura 57:27 @))
138− (face 55:29 q (aura 55:31 @))))))
144+ (face 57:29 q (aura 57:31 @))))))
139− (mold 57:1 coin
145+ (mold 59:1 coin
140− (union 58:3
146+ (union 60:3
141− (cell 58:3
142− (const 58:4 %$)
143− (face 58:7 p (ref 58:9 dime)))
144− (cell 59:3
145− (const 59:4 %blob)
146− (face 59:10 p (noun 59:12)))
147 (cell 60:3
147 (cell 60:3
148− (const 60:4 %many)
148+ (const 60:4 %$)
149+ (face 60:7 p (ref 60:9 dime)))
150+ (cell 61:3
151+ (const 61:4 %blob)
152+ (face 61:10 p (noun 61:12)))
153+ (cell 62:3
154+ (const 62:4 %many)
149− (face 60:10 p
155+ (face 62:10 p
150− (apply 60:12 list (ref 60:18 coin))))))
156+ (apply 62:12 list (ref 62:18 coin))))))
151− (mold 62:1 pair
157+ (mold 64:1 pair
152− (generic 62:9 A B
158+ (generic 64:9 A B
153− (cell 62:18
159+ (cell 64:18
154− (face 62:19 p (tvar 62:21 A))
160+ (face 64:19 p (tvar 64:21 A))
155− (face 62:23 q (tvar 62:25 B)))))
161+ (face 64:23 q (tvar 64:25 B)))))
156− (mold 64:1 trel
162+ (mold 66:1 trel
157− (generic 64:9 A B C
163+ (generic 66:9 A B C
158− (cell 64:20
164+ (cell 66:20
159− (face 64:21 p (tvar 64:23 A))
165+ (face 66:21 p (tvar 66:23 A))
160− (face 64:25 q (tvar 64:27 B))
166+ (face 66:25 q (tvar 66:27 B))
161− (face 64:29 r (tvar 64:31 C)))))
167+ (face 66:29 r (tvar 66:31 C)))))
162− (mold 66:1 qual
168+ (mold 68:1 qual
163− (generic 66:9 A B C D
169+ (generic 68:9 A B C D
164− (cell 66:22
170+ (cell 68:22
165− (face 66:23 p (tvar 66:25 A))
171+ (face 68:23 p (tvar 68:25 A))
166− (face 66:27 q (tvar 66:29 B))
172+ (face 68:27 q (tvar 68:29 B))
167− (face 66:31 r (tvar 66:33 C))
173+ (face 68:31 r (tvar 68:33 C))
168− (face 66:35 s (tvar 66:37 D)))))
174+ (face 68:35 s (tvar 68:37 D)))))
169− (mold 68:1 cord (aura 68:9 @t))
175+ (mold 70:1 cord (aura 70:9 @t))
170− (mold 70:1 knot (aura 70:9 @ta))
176+ (mold 72:1 knot (aura 72:9 @ta))
171− (mold 72:1 tape
177+ (mold 74:1 tape
172− (apply 72:9 list (aura 72:15 @tD)))
178+ (apply 74:9 list (aura 74:15 @tD)))
173− (mold 74:1 path
179+ (mold 76:1 path
174− (apply 74:9 list (ref 74:15 knot)))
180+ (apply 76:9 list (ref 76:15 knot)))
175− (mold 76:1 tank
181+ (mold 78:1 tank
176− (union 77:3
182+ (union 79:3
177− (ref 77:3 cord)
183+ (ref 79:3 cord)
178− (cell 78:3
179− (const 78:4 %leaf)
180− (face 78:10 p (ref 78:12 tape)))
181− (cell 79:3
182− (const 79:4 %palm)
183− (face 79:10 p
184− (apply 79:12 qual (ref 79:18 tape) (ref 79:23 tape) (ref 79:28 tape) (ref 79:33 tape)))
185− (face 79:39 q
186− (apply 79:41 list (ref 79:47 tank))))
187 (cell 80:3
184 (cell 80:3
188− (const 80:4 %rose)
185+ (const 80:4 %leaf)
186+ (face 80:10 p (ref 80:12 tape)))
187+ (cell 81:3
188+ (const 81:4 %palm)
189+ (face 81:10 p
190+ (apply 81:12 qual (ref 81:18 tape) (ref 81:23 tape) (ref 81:28 tape) (ref 81:33 tape)))
191+ (face 81:39 q
192+ (apply 81:41 list (ref 81:47 tank))))
193+ (cell 82:3
194+ (const 82:4 %rose)
189− (face 80:10 p
195+ (face 82:10 p
190− (apply 80:12 trel (ref 80:18 tape) (ref 80:23 tape) (ref 80:28 tape)))
196+ (apply 82:12 trel (ref 82:18 tape) (ref 82:23 tape) (ref 82:28 tape)))
191− (face 80:34 q
197+ (face 82:34 q
192− (apply 80:36 list (ref 80:42 tank))))))
198+ (apply 82:36 list (ref 82:42 tank))))))
193− (mold 82:1 nail
199+ (mold 84:1 nail
194− (cell 82:9
195− (face 82:10 p (ref 82:12 hair))
196− (face 82:17 q (ref 82:19 tape))))
197− (mold 84:1 edge
198 (cell 84:9
200 (cell 84:9
199 (face 84:10 p (ref 84:12 hair))
201 (face 84:10 p (ref 84:12 hair))
200− (face 84:17 q
202+ (face 84:17 q (ref 84:19 tape))))
203+ (mold 86:1 edge
204+ (cell 86:9
205+ (face 86:10 p (ref 86:12 hair))
206+ (face 86:17 q
201− (apply 84:19 unit
207+ (apply 86:19 unit
202− (cell 84:25
208+ (cell 86:25
203− (face 84:26 p (noun 84:28))
209+ (face 86:26 p (noun 86:28))
204− (face 84:30 q (ref 84:32 nail)))))))
210+ (face 86:30 q (ref 86:32 nail)))))))
205− (mold 86:1 rule
211+ (mold 88:1 rule
206− (fn 86:9 (ref 86:12 nail) (ref 86:17 edge)))
212+ (fn 88:9 (ref 88:12 nail) (ref 88:17 edge)))
207− (mold 88:1 spot
213+ (mold 90:1 spot
208− (cell 88:9
214+ (cell 90:9
209− (face 88:10 p (ref 88:12 path))
215+ (face 90:10 p (ref 90:12 path))
210− (face 88:17 q (ref 88:19 pint))))
216+ (face 90:17 q (ref 90:19 pint))))
211− (mold 90:1 toon
217+ (mold 92:1 toon
212− (union 91:3
218+ (union 93:3
213− (cell 91:3
214− (const 91:4 %0)
215− (face 91:7 p (noun 91:9)))
216− (cell 92:3
217− (const 92:4 %1)
218− (face 92:7 p (noun 92:9)))
219 (cell 93:3
219 (cell 93:3
220− (const 93:4 %2)
220+ (const 93:4 %0)
221+ (face 93:7 p (noun 93:9)))
222+ (cell 94:3
223+ (const 94:4 %1)
224+ (face 94:7 p (noun 94:9)))
225+ (cell 95:3
226+ (const 95:4 %2)
221− (face 93:7 p
227+ (face 95:7 p
222− (apply 93:9 list (ref 93:15 tank)))))))
228+ (apply 95:9 list (ref 95:15 tank)))))))
tests/golden/prelude-list-helpers/source.jibb+8−6
@@ -37,16 +37,18 @@
37++ weld |= args=[(list A) (list A)]
37++ weld |= args=[(list A) (list A)]
38 ?- args
38 ?- args
39 [xs ys]
39 [xs ys]
40+ ^- (list A)
40− ?- xs
41+ ?- xs
41− ~ ys
42+ ~ ys
42− [item rest] [item (weld rest ys)]
43+ [item rest] [item (weld rest ys)]
43
44
44++ turn |= args=[(list A) $-(A B)]
45++ turn |= args=[(list A) $-(A B)]
45 ?- args
46 ?- args
46 [xs f]
47 [xs f]
48+ ^- (list B)
47− ?- xs
49+ ?- xs
48− ~ ~
50+ ~ ~
49− [item rest] [(f item) (turn rest f)]
51+ [item rest] [(f item) (turn rest f)]
50
52
51+$ dime [p=@ta q=@]
53+$ dime [p=@ta q=@]
52
54
tests/golden/prelude-list-helpers/tokens.txt+568−554
@@ -190,650 +190,664 @@
19039:9 name ys
19039:9 name ys
19139:11 tight glyph ]
19139:11 tight glyph ]
19240:7 INDENT
19240:7 INDENT
193−40:7 glyph ?-
193+40:7 glyph ^-
194−40:10 name xs
194+40:10 glyph (
195+40:11 tight name list
196+40:16 tvar A
197+40:17 tight glyph )
19541:9 INDENT
19841:9 INDENT
196−41:9 lit ~
199+41:9 glyph ?-
200+41:12 name xs
201+42:11 INDENT
202+42:11 lit ~
197−41:11 name ys
203+42:13 name ys
198−42:9 NEWLINE
204+43:11 NEWLINE
199−42:9 glyph [
205+43:11 glyph [
200−42:10 tight name item
206+43:12 tight name item
201−42:15 name rest
207+43:17 name rest
202−42:19 tight glyph ]
208+43:21 tight glyph ]
203−42:21 glyph [
209+43:23 glyph [
204−42:22 tight name item
210+43:24 tight name item
205−42:27 glyph (
211+43:29 glyph (
206−42:28 tight name weld
212+43:30 tight name weld
207−42:33 name rest
213+43:35 name rest
208−42:38 name ys
214+43:40 name ys
209−42:40 tight glyph )
215+43:42 tight glyph )
210−42:41 tight glyph ]
216+43:43 tight glyph ]
217+45:1 DEDENT
211−44:1 DEDENT
218+45:1 DEDENT
212−44:1 DEDENT
219+45:1 DEDENT
213−44:1 DEDENT
220+45:1 DEDENT
214−44:1 DEDENT
221+45:1 DEDENT
215−44:1 NEWLINE
222+45:1 NEWLINE
216−44:1 glyph ++
223+45:1 glyph ++
217−44:4 name turn
224+45:4 name turn
218−44:9 glyph |=
225+45:9 glyph |=
219−44:12 name args
226+45:12 name args
220−44:16 tight glyph =
227+45:16 tight glyph =
221−44:17 tight glyph [
228+45:17 tight glyph [
222−44:18 tight glyph (
229+45:18 tight glyph (
223−44:19 tight name list
230+45:19 tight name list
224−44:24 tvar A
231+45:24 tvar A
225−44:25 tight glyph )
232+45:25 tight glyph )
226−44:27 glyph $-(
233+45:27 glyph $-(
227−44:30 tight tvar A
234+45:30 tight tvar A
228−44:32 tvar B
235+45:32 tvar B
229−44:33 tight glyph )
236+45:33 tight glyph )
230−44:34 tight glyph ]
237+45:34 tight glyph ]
231−45:3 INDENT
238+46:3 INDENT
232−45:3 glyph ?-
239+46:3 glyph ?-
233−45:6 name args
240+46:6 name args
234−46:5 INDENT
241+47:5 INDENT
235−46:5 glyph [
242+47:5 glyph [
236−46:6 tight name xs
243+47:6 tight name xs
237−46:9 name f
244+47:9 name f
238−46:10 tight glyph ]
245+47:10 tight glyph ]
239−47:7 INDENT
246+48:7 INDENT
240−47:7 glyph ?-
247+48:7 glyph ^-
241−47:10 name xs
248+48:10 glyph (
249+48:11 tight name list
250+48:16 tvar B
251+48:17 tight glyph )
242−48:9 INDENT
252+49:9 INDENT
253+49:9 glyph ?-
254+49:12 name xs
255+50:11 INDENT
243−48:9 lit ~
256+50:11 lit ~
244−48:11 lit ~
257+50:13 lit ~
245−49:9 NEWLINE
258+51:11 NEWLINE
246−49:9 glyph [
259+51:11 glyph [
247−49:10 tight name item
260+51:12 tight name item
248−49:15 name rest
261+51:17 name rest
249−49:19 tight glyph ]
262+51:21 tight glyph ]
250−49:21 glyph [
263+51:23 glyph [
251−49:22 tight glyph (
264+51:24 tight glyph (
252−49:23 tight name f
265+51:25 tight name f
253−49:25 name item
266+51:27 name item
254−49:29 tight glyph )
255−49:31 glyph (
267+51:31 tight glyph )
268+51:33 glyph (
256−49:32 tight name turn
269+51:34 tight name turn
257−49:37 name rest
270+51:39 name rest
258−49:42 name f
271+51:44 name f
259−49:43 tight glyph )
272+51:45 tight glyph )
260−49:44 tight glyph ]
273+51:46 tight glyph ]
261−51:1 DEDENT
274+53:1 DEDENT
262−51:1 DEDENT
275+53:1 DEDENT
263−51:1 DEDENT
276+53:1 DEDENT
264−51:1 DEDENT
277+53:1 DEDENT
265−51:1 NEWLINE
278+53:1 DEDENT
266−51:1 glyph +$
267−51:4 name dime
268−51:9 glyph [
269−51:10 tight name p
270−51:11 tight glyph =
271−51:12 tight aura @ta
272−51:16 name q
273−51:17 tight glyph =
274−51:18 tight aura @
275−51:19 tight glyph ]
27653:1 NEWLINE
27953:1 NEWLINE
27753:1 glyph +$
28053:1 glyph +$
278−53:4 name hair
281+53:4 name dime
27953:9 glyph [
28253:9 glyph [
28053:10 tight name p
28353:10 tight name p
28153:11 tight glyph =
28453:11 tight glyph =
282−53:12 tight aura @ud
285+53:12 tight aura @ta
28353:16 name q
28653:16 name q
28453:17 tight glyph =
28753:17 tight glyph =
285−53:18 tight aura @ud
288+53:18 tight aura @
286−53:21 tight glyph ]
289+53:19 tight glyph ]
28755:1 NEWLINE
29055:1 NEWLINE
28855:1 glyph +$
29155:1 glyph +$
289−55:4 name pint
292+55:4 name hair
29055:9 glyph [
29355:9 glyph [
29155:10 tight name p
29455:10 tight name p
29255:11 tight glyph =
29555:11 tight glyph =
293−55:12 tight glyph [
296+55:12 tight aura @ud
294−55:13 tight name p
297+55:16 name q
295−55:14 tight glyph =
298+55:17 tight glyph =
296−55:15 tight aura @
297−55:17 name q
298−55:18 tight glyph =
299+55:18 tight aura @ud
299−55:19 tight aura @
300−55:20 tight glyph ]
301−55:22 name q
302−55:23 tight glyph =
303−55:24 tight glyph [
304−55:25 tight name p
305−55:26 tight glyph =
306−55:27 tight aura @
307−55:29 name q
308−55:30 tight glyph =
309−55:31 tight aura @
310−55:32 tight glyph ]
311−55:33 tight glyph ]
300+55:21 tight glyph ]
31257:1 NEWLINE
30157:1 NEWLINE
31357:1 glyph +$
30257:1 glyph +$
314−57:4 name coin
303+57:4 name pint
315−58:3 INDENT
316−58:3 glyph [
317−58:4 tight lit %$
318−58:7 name p
319−58:8 tight glyph =
320−58:9 tight name dime
321−58:13 tight glyph ]
304+57:9 glyph [
322−59:3 NEWLINE
323−59:3 glyph [
324−59:4 tight lit %blob
325−59:10 name p
305+57:10 tight name p
326−59:11 tight glyph =
306+57:11 tight glyph =
327−59:12 tight glyph *
307+57:12 tight glyph [
328−59:13 tight glyph ]
308+57:13 tight name p
329−60:3 NEWLINE
309+57:14 tight glyph =
310+57:15 tight aura @
311+57:17 name q
312+57:18 tight glyph =
313+57:19 tight aura @
314+57:20 tight glyph ]
315+57:22 name q
316+57:23 tight glyph =
317+57:24 tight glyph [
318+57:25 tight name p
319+57:26 tight glyph =
320+57:27 tight aura @
321+57:29 name q
322+57:30 tight glyph =
323+57:31 tight aura @
324+57:32 tight glyph ]
325+57:33 tight glyph ]
326+59:1 NEWLINE
327+59:1 glyph +$
328+59:4 name coin
329+60:3 INDENT
33060:3 glyph [
33060:3 glyph [
331−60:4 tight lit %many
331+60:4 tight lit %$
332+60:7 name p
333+60:8 tight glyph =
334+60:9 tight name dime
335+60:13 tight glyph ]
336+61:3 NEWLINE
337+61:3 glyph [
338+61:4 tight lit %blob
339+61:10 name p
340+61:11 tight glyph =
341+61:12 tight glyph *
342+61:13 tight glyph ]
343+62:3 NEWLINE
344+62:3 glyph [
345+62:4 tight lit %many
332−60:10 name p
346+62:10 name p
333−60:11 tight glyph =
347+62:11 tight glyph =
334−60:12 tight glyph (
348+62:12 tight glyph (
335−60:13 tight name list
349+62:13 tight name list
336−60:18 name coin
350+62:18 name coin
337−60:22 tight glyph )
351+62:22 tight glyph )
338−60:23 tight glyph ]
352+62:23 tight glyph ]
339−62:1 DEDENT
353+64:1 DEDENT
340−62:1 NEWLINE
341−62:1 glyph +$
342−62:4 name pair
343−62:9 glyph |$
344−62:12 glyph [
345−62:13 tight tvar A
346−62:15 tvar B
347−62:16 tight glyph ]
348−62:18 glyph [
349−62:19 tight name p
350−62:20 tight glyph =
351−62:21 tight tvar A
352−62:23 name q
353−62:24 tight glyph =
354−62:25 tight tvar B
355−62:26 tight glyph ]
35664:1 NEWLINE
35464:1 NEWLINE
35764:1 glyph +$
35564:1 glyph +$
358−64:4 name trel
356+64:4 name pair
35964:9 glyph |$
35764:9 glyph |$
36064:12 glyph [
35864:12 glyph [
36164:13 tight tvar A
35964:13 tight tvar A
36264:15 tvar B
36064:15 tvar B
363−64:17 tvar C
361+64:16 tight glyph ]
364−64:18 tight glyph ]
365−64:20 glyph [
362+64:18 glyph [
366−64:21 tight name p
363+64:19 tight name p
367−64:22 tight glyph =
364+64:20 tight glyph =
368−64:23 tight tvar A
365+64:21 tight tvar A
369−64:25 name q
366+64:23 name q
370−64:26 tight glyph =
367+64:24 tight glyph =
371−64:27 tight tvar B
368+64:25 tight tvar B
372−64:29 name r
373−64:30 tight glyph =
374−64:31 tight tvar C
375−64:32 tight glyph ]
369+64:26 tight glyph ]
37666:1 NEWLINE
37066:1 NEWLINE
37766:1 glyph +$
37166:1 glyph +$
378−66:4 name qual
372+66:4 name trel
37966:9 glyph |$
37366:9 glyph |$
38066:12 glyph [
37466:12 glyph [
38166:13 tight tvar A
37566:13 tight tvar A
38266:15 tvar B
37666:15 tvar B
38366:17 tvar C
37766:17 tvar C
384−66:19 tvar D
378+66:18 tight glyph ]
385−66:20 tight glyph ]
386−66:22 glyph [
379+66:20 glyph [
380+66:21 tight name p
381+66:22 tight glyph =
387−66:23 tight name p
382+66:23 tight tvar A
388−66:24 tight glyph =
389−66:25 tight tvar A
390−66:27 name q
383+66:25 name q
391−66:28 tight glyph =
384+66:26 tight glyph =
392−66:29 tight tvar B
385+66:27 tight tvar B
393−66:31 name r
386+66:29 name r
394−66:32 tight glyph =
387+66:30 tight glyph =
395−66:33 tight tvar C
388+66:31 tight tvar C
396−66:35 name s
397−66:36 tight glyph =
398−66:37 tight tvar D
399−66:38 tight glyph ]
389+66:32 tight glyph ]
40068:1 NEWLINE
39068:1 NEWLINE
40168:1 glyph +$
39168:1 glyph +$
402−68:4 name cord
392+68:4 name qual
403−68:9 aura @t
393+68:9 glyph |$
394+68:12 glyph [
395+68:13 tight tvar A
396+68:15 tvar B
397+68:17 tvar C
398+68:19 tvar D
399+68:20 tight glyph ]
400+68:22 glyph [
401+68:23 tight name p
402+68:24 tight glyph =
403+68:25 tight tvar A
404+68:27 name q
405+68:28 tight glyph =
406+68:29 tight tvar B
407+68:31 name r
408+68:32 tight glyph =
409+68:33 tight tvar C
410+68:35 name s
411+68:36 tight glyph =
412+68:37 tight tvar D
413+68:38 tight glyph ]
40470:1 NEWLINE
41470:1 NEWLINE
40570:1 glyph +$
41570:1 glyph +$
406−70:4 name knot
416+70:4 name cord
407−70:9 aura @ta
417+70:9 aura @t
40872:1 NEWLINE
41872:1 NEWLINE
40972:1 glyph +$
41972:1 glyph +$
410−72:4 name tape
420+72:4 name knot
411−72:9 glyph (
412−72:10 tight name list
413−72:15 aura @tD
421+72:9 aura @ta
414−72:18 tight glyph )
41574:1 NEWLINE
42274:1 NEWLINE
41674:1 glyph +$
42374:1 glyph +$
417−74:4 name path
424+74:4 name tape
41874:9 glyph (
42574:9 glyph (
41974:10 tight name list
42674:10 tight name list
420−74:15 name knot
427+74:15 aura @tD
421−74:19 tight glyph )
428+74:18 tight glyph )
42276:1 NEWLINE
42976:1 NEWLINE
42376:1 glyph +$
43076:1 glyph +$
424−76:4 name tank
431+76:4 name path
432+76:9 glyph (
433+76:10 tight name list
434+76:15 name knot
435+76:19 tight glyph )
436+78:1 NEWLINE
437+78:1 glyph +$
438+78:4 name tank
425−77:3 INDENT
439+79:3 INDENT
426−77:3 name cord
440+79:3 name cord
427−78:3 NEWLINE
428−78:3 glyph [
429−78:4 tight lit %leaf
430−78:10 name p
431−78:11 tight glyph =
432−78:12 tight name tape
433−78:16 tight glyph ]
434−79:3 NEWLINE
435−79:3 glyph [
436−79:4 tight lit %palm
437−79:10 name p
438−79:11 tight glyph =
439−79:12 tight glyph (
440−79:13 tight name qual
441−79:18 name tape
442−79:23 name tape
443−79:28 name tape
444−79:33 name tape
445−79:37 tight glyph )
446−79:39 name q
447−79:40 tight glyph =
448−79:41 tight glyph (
449−79:42 tight name list
450−79:47 name tank
451−79:51 tight glyph )
452−79:52 tight glyph ]
45380:3 NEWLINE
44180:3 NEWLINE
45480:3 glyph [
44280:3 glyph [
455−80:4 tight lit %rose
443+80:4 tight lit %leaf
45680:10 name p
44480:10 name p
45780:11 tight glyph =
44580:11 tight glyph =
458−80:12 tight glyph (
446+80:12 tight name tape
447+80:16 tight glyph ]
448+81:3 NEWLINE
449+81:3 glyph [
450+81:4 tight lit %palm
451+81:10 name p
452+81:11 tight glyph =
453+81:12 tight glyph (
459−80:13 tight name trel
454+81:13 tight name qual
460−80:18 name tape
455+81:18 name tape
461−80:23 name tape
456+81:23 name tape
462−80:28 name tape
457+81:28 name tape
458+81:33 name tape
463−80:32 tight glyph )
459+81:37 tight glyph )
464−80:34 name q
460+81:39 name q
465−80:35 tight glyph =
461+81:40 tight glyph =
466−80:36 tight glyph (
462+81:41 tight glyph (
467−80:37 tight name list
463+81:42 tight name list
468−80:42 name tank
464+81:47 name tank
469−80:46 tight glyph )
470−80:47 tight glyph ]
465+81:51 tight glyph )
471−82:1 DEDENT
466+81:52 tight glyph ]
472−82:1 NEWLINE
467+82:3 NEWLINE
473−82:1 glyph +$
468+82:3 glyph [
474−82:4 name nail
469+82:4 tight lit %rose
475−82:9 glyph [
476−82:10 tight name p
470+82:10 name p
47782:11 tight glyph =
47182:11 tight glyph =
478−82:12 tight name hair
472+82:12 tight glyph (
473+82:13 tight name trel
474+82:18 name tape
475+82:23 name tape
476+82:28 name tape
477+82:32 tight glyph )
479−82:17 name q
478+82:34 name q
480−82:18 tight glyph =
479+82:35 tight glyph =
481−82:19 tight name tape
480+82:36 tight glyph (
481+82:37 tight name list
482+82:42 name tank
483+82:46 tight glyph )
482−82:23 tight glyph ]
484+82:47 tight glyph ]
485+84:1 DEDENT
48384:1 NEWLINE
48684:1 NEWLINE
48484:1 glyph +$
48784:1 glyph +$
485−84:4 name edge
488+84:4 name nail
48684:9 glyph [
48984:9 glyph [
48784:10 tight name p
49084:10 tight name p
48884:11 tight glyph =
49184:11 tight glyph =
48984:12 tight name hair
49284:12 tight name hair
49084:17 name q
49384:17 name q
49184:18 tight glyph =
49484:18 tight glyph =
492−84:19 tight glyph (
495+84:19 tight name tape
493−84:20 tight name unit
494−84:25 glyph [
495−84:26 tight name p
496−84:27 tight glyph =
497−84:28 tight glyph *
498−84:30 name q
499−84:31 tight glyph =
500−84:32 tight name nail
501−84:36 tight glyph ]
502−84:37 tight glyph )
503−84:38 tight glyph ]
496+84:23 tight glyph ]
50486:1 NEWLINE
49786:1 NEWLINE
50586:1 glyph +$
49886:1 glyph +$
506−86:4 name rule
499+86:4 name edge
507−86:9 glyph $-(
500+86:9 glyph [
501+86:10 tight name p
502+86:11 tight glyph =
503+86:12 tight name hair
504+86:17 name q
505+86:18 tight glyph =
506+86:19 tight glyph (
507+86:20 tight name unit
508+86:25 glyph [
509+86:26 tight name p
510+86:27 tight glyph =
511+86:28 tight glyph *
512+86:30 name q
513+86:31 tight glyph =
508−86:12 tight name nail
514+86:32 tight name nail
509−86:17 name edge
515+86:36 tight glyph ]
510−86:21 tight glyph )
516+86:37 tight glyph )
517+86:38 tight glyph ]
51188:1 NEWLINE
51888:1 NEWLINE
51288:1 glyph +$
51988:1 glyph +$
513−88:4 name spot
520+88:4 name rule
514−88:9 glyph [
521+88:9 glyph $-(
515−88:10 tight name p
516−88:11 tight glyph =
517−88:12 tight name path
522+88:12 tight name nail
518−88:17 name q
523+88:17 name edge
519−88:18 tight glyph =
524+88:21 tight glyph )
520−88:19 tight name pint
521−88:23 tight glyph ]
52290:1 NEWLINE
52590:1 NEWLINE
52390:1 glyph +$
52690:1 glyph +$
524−90:4 name toon
527+90:4 name spot
528+90:9 glyph [
529+90:10 tight name p
530+90:11 tight glyph =
531+90:12 tight name path
532+90:17 name q
533+90:18 tight glyph =
534+90:19 tight name pint
535+90:23 tight glyph ]
536+92:1 NEWLINE
537+92:1 glyph +$
538+92:4 name toon
525−91:3 INDENT
539+93:3 INDENT
526−91:3 glyph [
527−91:4 tight lit %0
528−91:7 name p
529−91:8 tight glyph =
530−91:9 tight glyph *
531−91:10 tight glyph ]
532−92:3 NEWLINE
533−92:3 glyph [
534−92:4 tight lit %1
535−92:7 name p
536−92:8 tight glyph =
537−92:9 tight glyph *
538−92:10 tight glyph ]
539−93:3 NEWLINE
54093:3 glyph [
54093:3 glyph [
541−93:4 tight lit %2
541+93:4 tight lit %0
54293:7 name p
54293:7 name p
54393:8 tight glyph =
54393:8 tight glyph =
544−93:9 tight glyph (
544+93:9 tight glyph *
545+93:10 tight glyph ]
546+94:3 NEWLINE
547+94:3 glyph [
548+94:4 tight lit %1
549+94:7 name p
550+94:8 tight glyph =
551+94:9 tight glyph *
552+94:10 tight glyph ]
553+95:3 NEWLINE
554+95:3 glyph [
555+95:4 tight lit %2
556+95:7 name p
557+95:8 tight glyph =
558+95:9 tight glyph (
545−93:10 tight name list
559+95:10 tight name list
546−93:15 name tank
560+95:15 name tank
547−93:19 tight glyph )
561+95:19 tight glyph )
548−93:20 tight glyph ]
562+95:20 tight glyph ]
549−95:1 DEDENT
563+97:1 DEDENT
550−95:1 NEWLINE
551−95:1 glyph +$
552−95:4 name like
553−95:9 glyph |$
554−95:12 glyph [
555−95:13 tight tvar A
556−95:14 tight glyph ]
557−95:16 glyph [
558−95:17 tight name p
559−95:18 tight glyph =
560−95:19 tight name hair
561−95:24 name q
562−95:25 tight glyph =
563−95:26 tight glyph (
564−95:27 tight name unit
565−95:32 glyph [
566−95:33 tight name p
567−95:34 tight glyph =
568−95:35 tight tvar A
569−95:37 name q
570−95:38 tight glyph =
571−95:39 tight name nail
572−95:43 tight glyph ]
573−95:44 tight glyph )
574−95:45 tight glyph ]
57597:1 NEWLINE
56497:1 NEWLINE
576−97:1 glyph ++
565+97:1 glyph +$
566+97:4 name like
567+97:9 glyph |$
568+97:12 glyph [
569+97:13 tight tvar A
570+97:14 tight glyph ]
571+97:16 glyph [
572+97:17 tight name p
573+97:18 tight glyph =
574+97:19 tight name hair
575+97:24 name q
576+97:25 tight glyph =
577+97:26 tight glyph (
578+97:27 tight name unit
579+97:32 glyph [
580+97:33 tight name p
581+97:34 tight glyph =
582+97:35 tight tvar A
583+97:37 name q
584+97:38 tight glyph =
585+97:39 tight name nail
586+97:43 tight glyph ]
587+97:44 tight glyph )
588+97:45 tight glyph ]
589+99:1 NEWLINE
590+99:1 glyph ++
577−97:4 name wonk
591+99:4 name wonk
578−97:9 glyph |=
592+99:9 glyph |=
579−97:12 name veq
593+99:12 name veq
580−97:15 tight glyph =
594+99:15 tight glyph =
581−97:16 tight glyph (
595+99:16 tight glyph (
582−97:17 tight name like
596+99:17 tight name like
583−97:22 tvar A
597+99:22 tvar A
584−97:23 tight glyph )
598+99:23 tight glyph )
585−98:3 INDENT
599+100:3 INDENT
586−98:3 glyph ?-
600+100:3 glyph ?-
587−98:6 wing q.veq
601+100:6 wing q.veq
588−99:5 INDENT
602+101:5 INDENT
589−99:5 lit ~
603+101:5 lit ~
590−99:7 glyph !!
604+101:7 glyph !!
591−100:5 NEWLINE
605+102:5 NEWLINE
592−100:5 glyph [
606+102:5 glyph [
593−100:6 tight lit ~
607+102:6 tight lit ~
594−100:8 name product
608+102:8 name product
595−100:15 tight glyph ]
609+102:15 tight glyph ]
596−100:17 wing p.product
610+102:17 wing p.product
597−102:1 DEDENT
611+104:1 DEDENT
598−102:1 DEDENT
612+104:1 DEDENT
599−102:1 NEWLINE
600−102:1 glyph +$
601−102:4 name lone
602−102:9 glyph |$
603−102:12 glyph [
604−102:13 tight tvar A
605−102:14 tight glyph ]
606−102:16 glyph [
607−102:17 tight name p
608−102:18 tight glyph =
609−102:19 tight tvar A
610−102:20 tight glyph ]
611104:1 NEWLINE
613104:1 NEWLINE
612104:1 glyph +$
614104:1 glyph +$
613−104:4 name lest
615+104:4 name lone
614104:9 glyph |$
616104:9 glyph |$
615104:12 glyph [
617104:12 glyph [
616104:13 tight tvar A
618104:13 tight tvar A
617104:14 tight glyph ]
619104:14 tight glyph ]
618104:16 glyph [
620104:16 glyph [
619−104:17 tight name i
621+104:17 tight name p
620104:18 tight glyph =
622104:18 tight glyph =
621104:19 tight tvar A
623104:19 tight tvar A
622−104:21 name t
623−104:22 tight glyph =
624−104:23 tight glyph (
625−104:24 tight name list
626−104:29 tvar A
627−104:30 tight glyph )
628−104:31 tight glyph ]
624+104:20 tight glyph ]
629106:1 NEWLINE
625106:1 NEWLINE
630106:1 glyph +$
626106:1 glyph +$
631−106:4 name pole
627+106:4 name lest
632106:9 glyph |$
628106:9 glyph |$
633106:12 glyph [
629106:12 glyph [
634106:13 tight tvar A
630106:13 tight tvar A
635106:14 tight glyph ]
631106:14 tight glyph ]
636−107:3 INDENT
632+106:16 glyph [
637−107:3 lit ~
633+106:17 tight name i
634+106:18 tight glyph =
635+106:19 tight tvar A
636+106:21 name t
637+106:22 tight glyph =
638+106:23 tight glyph (
639+106:24 tight name list
640+106:29 tvar A
641+106:30 tight glyph )
642+106:31 tight glyph ]
638−108:3 NEWLINE
643+108:1 NEWLINE
639−108:3 glyph [
644+108:1 glyph +$
640−108:4 tight tvar A
641−108:6 glyph (
642−108:7 tight name pole
645+108:4 name pole
643−108:12 tvar A
646+108:9 glyph |$
647+108:12 glyph [
644−108:13 tight glyph )
648+108:13 tight tvar A
645108:14 tight glyph ]
649108:14 tight glyph ]
646−110:1 DEDENT
650+109:3 INDENT
651+109:3 lit ~
647−110:1 NEWLINE
652+110:3 NEWLINE
648−110:1 glyph +$
653+110:3 glyph [
649−110:4 name quip
654+110:4 tight tvar A
650−110:9 glyph |$
655+110:6 glyph (
656+110:7 tight name pole
651−110:12 glyph [
657+110:12 tvar A
652−110:13 tight tvar A
658+110:13 tight glyph )
653−110:15 tvar B
654−110:16 tight glyph ]
655−110:18 glyph [
656−110:19 tight glyph (
657−110:20 tight name list
658−110:25 tvar A
659−110:26 tight glyph )
660−110:28 tvar B
661−110:29 tight glyph ]
659+110:14 tight glyph ]
660+112:1 DEDENT
662112:1 NEWLINE
661112:1 NEWLINE
663112:1 glyph +$
662112:1 glyph +$
664−112:4 name tree
663+112:4 name quip
665112:9 glyph |$
664112:9 glyph |$
666112:12 glyph [
665112:12 glyph [
667112:13 tight tvar A
666112:13 tight tvar A
667+112:15 tvar B
668+112:16 tight glyph ]
669+112:18 glyph [
670+112:19 tight glyph (
671+112:20 tight name list
672+112:25 tvar A
673+112:26 tight glyph )
674+112:28 tvar B
675+112:29 tight glyph ]
676+114:1 NEWLINE
677+114:1 glyph +$
678+114:4 name tree
679+114:9 glyph |$
680+114:12 glyph [
681+114:13 tight tvar A
668−112:14 tight glyph ]
682+114:14 tight glyph ]
669−113:3 INDENT
683+115:3 INDENT
670−113:3 lit ~
684+115:3 lit ~
671−114:3 NEWLINE
685+116:3 NEWLINE
672−114:3 glyph [
686+116:3 glyph [
673−114:4 tight name n
687+116:4 tight name n
674−114:5 tight glyph =
688+116:5 tight glyph =
675−114:6 tight tvar A
689+116:6 tight tvar A
676−114:8 name l
690+116:8 name l
677−114:9 tight glyph =
691+116:9 tight glyph =
678−114:10 tight glyph (
692+116:10 tight glyph (
679−114:11 tight name tree
693+116:11 tight name tree
680−114:16 tvar A
694+116:16 tvar A
681−114:17 tight glyph )
695+116:17 tight glyph )
682−114:19 name r
696+116:19 name r
683−114:20 tight glyph =
697+116:20 tight glyph =
684−114:21 tight glyph (
698+116:21 tight glyph (
685−114:22 tight name tree
699+116:22 tight name tree
686−114:27 tvar A
700+116:27 tvar A
687−114:28 tight glyph )
701+116:28 tight glyph )
688−114:29 tight glyph ]
702+116:29 tight glyph ]
689−116:1 DEDENT
703+118:1 DEDENT
690−116:1 NEWLINE
704+118:1 NEWLINE
691−116:1 glyph +$
705+118:1 glyph +$
692−116:4 name each
706+118:4 name each
693−116:9 glyph |$
707+118:9 glyph |$
694−116:12 glyph [
708+118:12 glyph [
695−116:13 tight tvar A
709+118:13 tight tvar A
696−116:15 tvar B
710+118:15 tvar B
697−116:16 tight glyph ]
711+118:16 tight glyph ]
698−117:3 INDENT
712+119:3 INDENT
699−117:3 glyph [
713+119:3 glyph [
700−117:4 tight lit %|
714+119:4 tight lit %|
701−117:7 name p
715+119:7 name p
702−117:8 tight glyph =
716+119:8 tight glyph =
703−117:9 tight tvar B
717+119:9 tight tvar B
704−117:10 tight glyph ]
718+119:10 tight glyph ]
705−118:3 NEWLINE
719+120:3 NEWLINE
706−118:3 glyph [
720+120:3 glyph [
707−118:4 tight lit %&
721+120:4 tight lit %&
708−118:7 name p
722+120:7 name p
709−118:8 tight glyph =
723+120:8 tight glyph =
710−118:9 tight tvar A
724+120:9 tight tvar A
711−118:10 tight glyph ]
725+120:10 tight glyph ]
712−120:1 DEDENT
726+122:1 DEDENT
713−120:1 NEWLINE
714−120:1 glyph +$
715−120:4 name bloq
716−120:9 aura @
717122:1 NEWLINE
727122:1 NEWLINE
718−122:1 glyph ++
728+122:1 glyph +$
719−122:4 name some
729+122:4 name bloq
720−122:9 glyph |=
730+122:9 aura @
721−122:12 name item
722−122:16 tight glyph =
723−122:17 tight tvar A
724−122:19 glyph `
725−122:20 tight name item
726124:1 NEWLINE
731124:1 NEWLINE
727124:1 glyph ++
732124:1 glyph ++
728−124:4 name lure
733+124:4 name some
729124:9 glyph |=
734124:9 glyph |=
730124:12 name item
735124:12 name item
731124:16 tight glyph =
736124:16 tight glyph =
732124:17 tight tvar A
737124:17 tight tvar A
738+124:19 glyph `
739+124:20 tight name item
740+126:1 NEWLINE
741+126:1 glyph ++
742+126:4 name lure
743+126:9 glyph |=
744+126:12 name item
745+126:16 tight glyph =
746+126:17 tight tvar A
733−125:3 INDENT
747+127:3 INDENT
734−125:3 glyph ^-
748+127:3 glyph ^-
735−125:6 glyph (
749+127:6 glyph (
736−125:7 tight name list
750+127:7 tight name list
737−125:12 tvar A
751+127:12 tvar A
738−125:13 tight glyph )
752+127:13 tight glyph )
739−125:15 glyph [
753+127:15 glyph [
740−125:16 tight name item
754+127:16 tight name item
741−125:21 lit ~
755+127:21 lit ~
742−125:22 tight glyph ]
756+127:22 tight glyph ]
743−127:1 DEDENT
757+129:1 DEDENT
744−127:1 NEWLINE
758+129:1 NEWLINE
745−127:1 glyph ++
759+129:1 glyph ++
746−127:4 name snoc
760+129:4 name snoc
747−127:9 glyph |=
761+129:9 glyph |=
748−127:12 name args
762+129:12 name args
749−127:16 tight glyph =
763+129:16 tight glyph =
750−127:17 tight glyph [
764+129:17 tight glyph [
751−127:18 tight glyph (
765+129:18 tight glyph (
752−127:19 tight name list
766+129:19 tight name list
753−127:24 tvar A
767+129:24 tvar A
754−127:25 tight glyph )
768+129:25 tight glyph )
755−127:27 tvar A
769+129:27 tvar A
756−127:28 tight glyph ]
770+129:28 tight glyph ]
757−128:3 INDENT
771+130:3 INDENT
758−128:3 glyph ?-
772+130:3 glyph ?-
759−128:6 name args
773+130:6 name args
760−129:5 INDENT
774+131:5 INDENT
761−129:5 glyph [
775+131:5 glyph [
762−129:6 tight name xs
776+131:6 tight name xs
763−129:9 name item
777+131:9 name item
764−129:13 tight glyph ]
778+131:13 tight glyph ]
765−129:15 glyph (
779+131:15 glyph (
766−129:16 tight name weld
780+131:16 tight name weld
767−129:21 name xs
781+131:21 name xs
768−129:24 glyph [
782+131:24 glyph [
769−129:25 tight name item
783+131:25 tight name item
770−129:30 lit ~
784+131:30 lit ~
771−129:31 tight glyph ]
785+131:31 tight glyph ]
772−129:32 tight glyph )
786+131:32 tight glyph )
773−131:1 DEDENT
787+133:1 DEDENT
774−131:1 DEDENT
788+133:1 DEDENT
775−131:1 NEWLINE
789+133:1 NEWLINE
776−131:1 glyph ++
790+133:1 glyph ++
777−131:4 name flop
791+133:4 name flop
778−131:9 glyph |=
792+133:9 glyph |=
779−131:12 name xs
793+133:12 name xs
780−131:14 tight glyph =
794+133:14 tight glyph =
781−131:15 tight glyph (
795+133:15 tight glyph (
782−131:16 tight name list
796+133:16 tight name list
783−131:21 tvar A
797+133:21 tvar A
784−131:22 tight glyph )
798+133:22 tight glyph )
785−132:3 INDENT
799+134:3 INDENT
786−132:3 glyph ++
800+134:3 glyph ++
787−132:6 name reverse-into
801+134:6 name reverse-into
788−132:19 glyph |=
802+134:19 glyph |=
789−132:22 name args
803+134:22 name args
790−132:26 tight glyph =
804+134:26 tight glyph =
791−132:27 tight glyph [
805+134:27 tight glyph [
792−132:28 tight glyph (
806+134:28 tight glyph (
793−132:29 tight name list
807+134:29 tight name list
794−132:34 tvar A
808+134:34 tvar A
795−132:35 tight glyph )
809+134:35 tight glyph )
796−132:37 glyph (
810+134:37 glyph (
797−132:38 tight name list
811+134:38 tight name list
798−132:43 tvar A
812+134:43 tvar A
799−132:44 tight glyph )
813+134:44 tight glyph )
800−132:45 tight glyph ]
814+134:45 tight glyph ]
801−133:5 INDENT
815+135:5 INDENT
802−133:5 glyph ?-
816+135:5 glyph ?-
803−133:8 name args
817+135:8 name args
804−134:7 INDENT
818+136:7 INDENT
805−134:7 glyph [
819+136:7 glyph [
806−134:8 tight name rest
820+136:8 tight name rest
807−134:13 name acc
808−134:16 tight glyph ]
809−135:9 INDENT
810−135:9 glyph ?-
811−135:12 name rest
812−136:11 INDENT
813−136:11 lit ~
814136:13 name acc
821136:13 name acc
822+136:16 tight glyph ]
823+137:9 INDENT
824+137:9 glyph ?-
825+137:12 name rest
826+138:11 INDENT
827+138:11 lit ~
828+138:13 name acc
815−137:11 NEWLINE
829+139:11 NEWLINE
816−137:11 glyph [
830+139:11 glyph [
817−137:12 tight name item
831+139:12 tight name item
818−137:17 name more
832+139:17 name more
819−137:21 tight glyph ]
833+139:21 tight glyph ]
820−137:23 glyph (
834+139:23 glyph (
821−137:24 tight name reverse-into
835+139:24 tight name reverse-into
822−137:37 name more
836+139:37 name more
823−137:42 glyph [
837+139:42 glyph [
824−137:43 tight name item
838+139:43 tight name item
825−137:48 name acc
839+139:48 name acc
826−137:51 tight glyph ]
840+139:51 tight glyph ]
827−137:52 tight glyph )
841+139:52 tight glyph )
828−138:3 DEDENT
842+140:3 DEDENT
829−138:3 DEDENT
843+140:3 DEDENT
830−138:3 DEDENT
844+140:3 DEDENT
831−138:3 DEDENT
845+140:3 DEDENT
832−138:3 NEWLINE
846+140:3 NEWLINE
833−138:3 glyph (
847+140:3 glyph (
834−138:4 tight name reverse-into
848+140:4 tight name reverse-into
835−138:17 name xs
849+140:17 name xs
836−138:20 lit ~
850+140:20 lit ~
837−138:21 tight glyph )
851+140:21 tight glyph )
838−138:22 DEDENT
852+140:22 DEDENT
839−138:22 NEWLINE
853+140:22 NEWLINE
tests/golden/prelude-list-helpers/tree.txt+245−239
@@ -87,254 +87,260 @@
87 (arm 39:5
87 (arm 39:5
88 (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
88 (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
89 (body 40:7
89 (body 40:7
90− (branch 40:7
90+ (cast 40:7
91− (wing 40:10 xs)
91+ (apply 40:10 list (tvar 40:16 A))
92− (arm 41:9 (lit 41:9 ~) (wing 41:11 ys))
92+ (body 41:9
93+ (branch 41:9
94+ (wing 41:12 xs)
95+ (arm 42:11 (lit 42:11 ~) (wing 42:13 ys))
93− (arm 42:9
96+ (arm 43:11
94− (cell 42:9 (bind 42:10 item) (bind 42:15 rest))
97+ (cell 43:11 (bind 43:12 item) (bind 43:17 rest))
95− (tuple 42:21
98+ (tuple 43:23
96− (wing 42:22 item)
99+ (wing 43:24 item)
97− (group 42:27
100+ (group 43:29
98− (call 42:28 (wing 42:28 weld) (wing 42:33 rest) (wing 42:38 ys))))))))))))
101+ (call 43:30 (wing 43:30 weld) (wing 43:35 rest) (wing 43:40 ys))))))))))))))
99− (value 44:1 turn
102+ (value 45:1 turn
100− (gate 44:9
103+ (gate 45:9
101− (face 44:12 args
104+ (face 45:12 args
102− (cell 44:17
105+ (cell 45:17
103− (apply 44:18 list (tvar 44:24 A))
106+ (apply 45:18 list (tvar 45:24 A))
104− (fn 44:27 (tvar 44:30 A) (tvar 44:32 B))))
107+ (fn 45:27 (tvar 45:30 A) (tvar 45:32 B))))
105− (body 45:3
108+ (body 46:3
106− (branch 45:3
109+ (branch 46:3
107− (wing 45:6 args)
110+ (wing 46:6 args)
108− (arm 46:5
111+ (arm 47:5
109− (cell 46:5 (bind 46:6 xs) (bind 46:9 f))
112+ (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
110− (body 47:7
113+ (body 48:7
111− (branch 47:7
114+ (cast 48:7
115+ (apply 48:10 list (tvar 48:16 B))
116+ (body 49:9
117+ (branch 49:9
112− (wing 47:10 xs)
118+ (wing 49:12 xs)
113− (arm 48:9 (lit 48:9 ~) (lit 48:11 ~))
119+ (arm 50:11 (lit 50:11 ~) (lit 50:13 ~))
114− (arm 49:9
120+ (arm 51:11
115− (cell 49:9 (bind 49:10 item) (bind 49:15 rest))
121+ (cell 51:11 (bind 51:12 item) (bind 51:17 rest))
116− (tuple 49:21
122+ (tuple 51:23
117− (group 49:22
123+ (group 51:24
118− (call 49:23 (wing 49:23 f) (wing 49:25 item)))
124+ (call 51:25 (wing 51:25 f) (wing 51:27 item)))
119− (group 49:31
125+ (group 51:33
120− (call 49:32 (wing 49:32 turn) (wing 49:37 rest) (wing 49:42 f))))))))))))
126+ (call 51:34 (wing 51:34 turn) (wing 51:39 rest) (wing 51:44 f))))))))))))))
121− (mold 51:1 dime
127+ (mold 53:1 dime
122− (cell 51:9
123− (face 51:10 p (aura 51:12 @ta))
124− (face 51:16 q (aura 51:18 @))))
125− (mold 53:1 hair
126 (cell 53:9
128 (cell 53:9
127− (face 53:10 p (aura 53:12 @ud))
129+ (face 53:10 p (aura 53:12 @ta))
128− (face 53:16 q (aura 53:18 @ud))))
130+ (face 53:16 q (aura 53:18 @))))
129− (mold 55:1 pint
131+ (mold 55:1 hair
130 (cell 55:9
132 (cell 55:9
131− (face 55:10 p
133+ (face 55:10 p (aura 55:12 @ud))
134+ (face 55:16 q (aura 55:18 @ud))))
135+ (mold 57:1 pint
136+ (cell 57:9
137+ (face 57:10 p
132− (cell 55:12
138+ (cell 57:12
133− (face 55:13 p (aura 55:15 @))
139+ (face 57:13 p (aura 57:15 @))
134− (face 55:17 q (aura 55:19 @))))
140+ (face 57:17 q (aura 57:19 @))))
135− (face 55:22 q
141+ (face 57:22 q
136− (cell 55:24
142+ (cell 57:24
137− (face 55:25 p (aura 55:27 @))
143+ (face 57:25 p (aura 57:27 @))
138− (face 55:29 q (aura 55:31 @))))))
144+ (face 57:29 q (aura 57:31 @))))))
139− (mold 57:1 coin
145+ (mold 59:1 coin
140− (union 58:3
146+ (union 60:3
141− (cell 58:3
142− (const 58:4 %$)
143− (face 58:7 p (ref 58:9 dime)))
144− (cell 59:3
145− (const 59:4 %blob)
146− (face 59:10 p (noun 59:12)))
147 (cell 60:3
147 (cell 60:3
148− (const 60:4 %many)
148+ (const 60:4 %$)
149+ (face 60:7 p (ref 60:9 dime)))
150+ (cell 61:3
151+ (const 61:4 %blob)
152+ (face 61:10 p (noun 61:12)))
153+ (cell 62:3
154+ (const 62:4 %many)
149− (face 60:10 p
155+ (face 62:10 p
150− (apply 60:12 list (ref 60:18 coin))))))
156+ (apply 62:12 list (ref 62:18 coin))))))
151− (mold 62:1 pair
157+ (mold 64:1 pair
152− (generic 62:9 A B
158+ (generic 64:9 A B
153− (cell 62:18
159+ (cell 64:18
154− (face 62:19 p (tvar 62:21 A))
160+ (face 64:19 p (tvar 64:21 A))
155− (face 62:23 q (tvar 62:25 B)))))
161+ (face 64:23 q (tvar 64:25 B)))))
156− (mold 64:1 trel
162+ (mold 66:1 trel
157− (generic 64:9 A B C
163+ (generic 66:9 A B C
158− (cell 64:20
164+ (cell 66:20
159− (face 64:21 p (tvar 64:23 A))
165+ (face 66:21 p (tvar 66:23 A))
160− (face 64:25 q (tvar 64:27 B))
166+ (face 66:25 q (tvar 66:27 B))
161− (face 64:29 r (tvar 64:31 C)))))
167+ (face 66:29 r (tvar 66:31 C)))))
162− (mold 66:1 qual
168+ (mold 68:1 qual
163− (generic 66:9 A B C D
169+ (generic 68:9 A B C D
164− (cell 66:22
170+ (cell 68:22
165− (face 66:23 p (tvar 66:25 A))
171+ (face 68:23 p (tvar 68:25 A))
166− (face 66:27 q (tvar 66:29 B))
172+ (face 68:27 q (tvar 68:29 B))
167− (face 66:31 r (tvar 66:33 C))
173+ (face 68:31 r (tvar 68:33 C))
168− (face 66:35 s (tvar 66:37 D)))))
174+ (face 68:35 s (tvar 68:37 D)))))
169− (mold 68:1 cord (aura 68:9 @t))
175+ (mold 70:1 cord (aura 70:9 @t))
170− (mold 70:1 knot (aura 70:9 @ta))
176+ (mold 72:1 knot (aura 72:9 @ta))
171− (mold 72:1 tape
177+ (mold 74:1 tape
172− (apply 72:9 list (aura 72:15 @tD)))
178+ (apply 74:9 list (aura 74:15 @tD)))
173− (mold 74:1 path
179+ (mold 76:1 path
174− (apply 74:9 list (ref 74:15 knot)))
180+ (apply 76:9 list (ref 76:15 knot)))
175− (mold 76:1 tank
181+ (mold 78:1 tank
176− (union 77:3
182+ (union 79:3
177− (ref 77:3 cord)
183+ (ref 79:3 cord)
178− (cell 78:3
179− (const 78:4 %leaf)
180− (face 78:10 p (ref 78:12 tape)))
181− (cell 79:3
182− (const 79:4 %palm)
183− (face 79:10 p
184− (apply 79:12 qual (ref 79:18 tape) (ref 79:23 tape) (ref 79:28 tape) (ref 79:33 tape)))
185− (face 79:39 q
186− (apply 79:41 list (ref 79:47 tank))))
187 (cell 80:3
184 (cell 80:3
188− (const 80:4 %rose)
185+ (const 80:4 %leaf)
186+ (face 80:10 p (ref 80:12 tape)))
187+ (cell 81:3
188+ (const 81:4 %palm)
189+ (face 81:10 p
190+ (apply 81:12 qual (ref 81:18 tape) (ref 81:23 tape) (ref 81:28 tape) (ref 81:33 tape)))
191+ (face 81:39 q
192+ (apply 81:41 list (ref 81:47 tank))))
193+ (cell 82:3
194+ (const 82:4 %rose)
189− (face 80:10 p
195+ (face 82:10 p
190− (apply 80:12 trel (ref 80:18 tape) (ref 80:23 tape) (ref 80:28 tape)))
196+ (apply 82:12 trel (ref 82:18 tape) (ref 82:23 tape) (ref 82:28 tape)))
191− (face 80:34 q
197+ (face 82:34 q
192− (apply 80:36 list (ref 80:42 tank))))))
198+ (apply 82:36 list (ref 82:42 tank))))))
193− (mold 82:1 nail
199+ (mold 84:1 nail
194− (cell 82:9
195− (face 82:10 p (ref 82:12 hair))
196− (face 82:17 q (ref 82:19 tape))))
197− (mold 84:1 edge
198 (cell 84:9
200 (cell 84:9
199 (face 84:10 p (ref 84:12 hair))
201 (face 84:10 p (ref 84:12 hair))
200− (face 84:17 q
202+ (face 84:17 q (ref 84:19 tape))))
203+ (mold 86:1 edge
204+ (cell 86:9
205+ (face 86:10 p (ref 86:12 hair))
206+ (face 86:17 q
201− (apply 84:19 unit
207+ (apply 86:19 unit
202− (cell 84:25
208+ (cell 86:25
203− (face 84:26 p (noun 84:28))
209+ (face 86:26 p (noun 86:28))
204− (face 84:30 q (ref 84:32 nail)))))))
210+ (face 86:30 q (ref 86:32 nail)))))))
205− (mold 86:1 rule
211+ (mold 88:1 rule
206− (fn 86:9 (ref 86:12 nail) (ref 86:17 edge)))
212+ (fn 88:9 (ref 88:12 nail) (ref 88:17 edge)))
207− (mold 88:1 spot
213+ (mold 90:1 spot
208− (cell 88:9
214+ (cell 90:9
209− (face 88:10 p (ref 88:12 path))
215+ (face 90:10 p (ref 90:12 path))
210− (face 88:17 q (ref 88:19 pint))))
216+ (face 90:17 q (ref 90:19 pint))))
211− (mold 90:1 toon
217+ (mold 92:1 toon
212− (union 91:3
218+ (union 93:3
213− (cell 91:3
214− (const 91:4 %0)
215− (face 91:7 p (noun 91:9)))
216− (cell 92:3
217− (const 92:4 %1)
218− (face 92:7 p (noun 92:9)))
219 (cell 93:3
219 (cell 93:3
220− (const 93:4 %2)
220+ (const 93:4 %0)
221+ (face 93:7 p (noun 93:9)))
222+ (cell 94:3
223+ (const 94:4 %1)
224+ (face 94:7 p (noun 94:9)))
225+ (cell 95:3
226+ (const 95:4 %2)
221− (face 93:7 p
227+ (face 95:7 p
222− (apply 93:9 list (ref 93:15 tank))))))
228+ (apply 95:9 list (ref 95:15 tank))))))
223− (mold 95:1 like
229+ (mold 97:1 like
224− (generic 95:9 A
230+ (generic 97:9 A
225− (cell 95:16
231+ (cell 97:16
226− (face 95:17 p (ref 95:19 hair))
232+ (face 97:17 p (ref 97:19 hair))
227− (face 95:24 q
233+ (face 97:24 q
228− (apply 95:26 unit
234+ (apply 97:26 unit
229− (cell 95:32
235+ (cell 97:32
230− (face 95:33 p (tvar 95:35 A))
236+ (face 97:33 p (tvar 97:35 A))
231− (face 95:37 q (ref 95:39 nail))))))))
237+ (face 97:37 q (ref 97:39 nail))))))))
232− (value 97:1 wonk
238+ (value 99:1 wonk
233− (gate 97:9
239+ (gate 99:9
234− (face 97:12 veq
240+ (face 99:12 veq
235− (apply 97:16 like (tvar 97:22 A)))
241+ (apply 99:16 like (tvar 99:22 A)))
236− (body 98:3
242+ (body 100:3
237− (branch 98:3
243+ (branch 100:3
238− (wing 98:6 q.veq)
244+ (wing 100:6 q.veq)
239− (arm 99:5 (lit 99:5 ~) (crash 99:7))
245+ (arm 101:5 (lit 101:5 ~) (crash 101:7))
240− (arm 100:5
246+ (arm 102:5
241− (cell 100:5 (lit 100:6 ~) (bind 100:8 product))
247+ (cell 102:5 (lit 102:6 ~) (bind 102:8 product))
242− (wing 100:17 p.product))))))
248+ (wing 102:17 p.product))))))
243− (mold 102:1 lone
249+ (mold 104:1 lone
244− (generic 102:9 A
245− (cell 102:16
246− (face 102:17 p (tvar 102:19 A)))))
247− (mold 104:1 lest
248 (generic 104:9 A
250 (generic 104:9 A
249 (cell 104:16
251 (cell 104:16
250− (face 104:17 i (tvar 104:19 A))
252+ (face 104:17 p (tvar 104:19 A)))))
251− (face 104:21 t
252− (apply 104:23 list (tvar 104:29 A))))))
253− (mold 106:1 pole
253+ (mold 106:1 lest
254 (generic 106:9 A
254 (generic 106:9 A
255+ (cell 106:16
256+ (face 106:17 i (tvar 106:19 A))
257+ (face 106:21 t
258+ (apply 106:23 list (tvar 106:29 A))))))
259+ (mold 108:1 pole
260+ (generic 108:9 A
255− (union 107:3
261+ (union 109:3
256− (const 107:3 ~)
262+ (const 109:3 ~)
257− (cell 108:3
263+ (cell 110:3
258− (tvar 108:4 A)
264+ (tvar 110:4 A)
259− (apply 108:6 pole (tvar 108:12 A))))))
265+ (apply 110:6 pole (tvar 110:12 A))))))
260− (mold 110:1 quip
266+ (mold 112:1 quip
261− (generic 110:9 A B
267+ (generic 112:9 A B
262− (cell 110:18
268+ (cell 112:18
263− (apply 110:19 list (tvar 110:25 A))
269+ (apply 112:19 list (tvar 112:25 A))
264− (tvar 110:28 B))))
270+ (tvar 112:28 B))))
265− (mold 112:1 tree
271+ (mold 114:1 tree
266− (generic 112:9 A
272+ (generic 114:9 A
267− (union 113:3
273+ (union 115:3
268− (const 113:3 ~)
274+ (const 115:3 ~)
269− (cell 114:3
275+ (cell 116:3
270− (face 114:4 n (tvar 114:6 A))
276+ (face 116:4 n (tvar 116:6 A))
271− (face 114:8 l
277+ (face 116:8 l
272− (apply 114:10 tree (tvar 114:16 A)))
278+ (apply 116:10 tree (tvar 116:16 A)))
273− (face 114:19 r
279+ (face 116:19 r
274− (apply 114:21 tree (tvar 114:27 A)))))))
280+ (apply 116:21 tree (tvar 116:27 A)))))))
275− (mold 116:1 each
281+ (mold 118:1 each
276− (generic 116:9 A B
282+ (generic 118:9 A B
277− (union 117:3
283+ (union 119:3
278− (cell 117:3
284+ (cell 119:3
279− (const 117:4 %|)
285+ (const 119:4 %|)
280− (face 117:7 p (tvar 117:9 B)))
286+ (face 119:7 p (tvar 119:9 B)))
281− (cell 118:3
287+ (cell 120:3
282− (const 118:4 %&)
288+ (const 120:4 %&)
283− (face 118:7 p (tvar 118:9 A))))))
289+ (face 120:7 p (tvar 120:9 A))))))
284− (mold 120:1 bloq (aura 120:9 @))
290+ (mold 122:1 bloq (aura 122:9 @))
285− (value 122:1 some
291+ (value 124:1 some
286− (gate 122:9
287− (face 122:12 item (tvar 122:17 A))
288− (unit 122:19 (wing 122:20 item))))
289− (value 124:1 lure
290 (gate 124:9
292 (gate 124:9
291 (face 124:12 item (tvar 124:17 A))
293 (face 124:12 item (tvar 124:17 A))
294+ (unit 124:19 (wing 124:20 item))))
295+ (value 126:1 lure
296+ (gate 126:9
297+ (face 126:12 item (tvar 126:17 A))
292− (body 125:3
298+ (body 127:3
293− (cast 125:3
299+ (cast 127:3
294− (apply 125:6 list (tvar 125:12 A))
300+ (apply 127:6 list (tvar 127:12 A))
295− (tuple 125:15 (wing 125:16 item) (lit 125:21 ~))))))
301+ (tuple 127:15 (wing 127:16 item) (lit 127:21 ~))))))
296− (value 127:1 snoc
302+ (value 129:1 snoc
297− (gate 127:9
303+ (gate 129:9
298− (face 127:12 args
304+ (face 129:12 args
299− (cell 127:17
305+ (cell 129:17
300− (apply 127:18 list (tvar 127:24 A))
306+ (apply 129:18 list (tvar 129:24 A))
301− (tvar 127:27 A)))
307+ (tvar 129:27 A)))
302− (body 128:3
308+ (body 130:3
303− (branch 128:3
309+ (branch 130:3
304− (wing 128:6 args)
310+ (wing 130:6 args)
305− (arm 129:5
311+ (arm 131:5
306− (cell 129:5 (bind 129:6 xs) (bind 129:9 item))
312+ (cell 131:5 (bind 131:6 xs) (bind 131:9 item))
307− (group 129:15
313+ (group 131:15
308− (call 129:16
314+ (call 131:16
309− (wing 129:16 weld)
315+ (wing 131:16 weld)
310− (wing 129:21 xs)
316+ (wing 131:21 xs)
311− (tuple 129:24 (wing 129:25 item) (lit 129:30 ~)))))))))
317+ (tuple 131:24 (wing 131:25 item) (lit 131:30 ~)))))))))
312− (value 131:1 flop
318+ (value 133:1 flop
313− (gate 131:9
319+ (gate 133:9
314− (face 131:12 xs
320+ (face 133:12 xs
315− (apply 131:15 list (tvar 131:21 A)))
321+ (apply 133:15 list (tvar 133:21 A)))
316− (body 132:3
322+ (body 134:3
317− (value 132:3 reverse-into
323+ (value 134:3 reverse-into
318− (gate 132:19
324+ (gate 134:19
319− (face 132:22 args
325+ (face 134:22 args
320− (cell 132:27
326+ (cell 134:27
321− (apply 132:28 list (tvar 132:34 A))
327+ (apply 134:28 list (tvar 134:34 A))
322− (apply 132:37 list (tvar 132:43 A))))
328+ (apply 134:37 list (tvar 134:43 A))))
323− (body 133:5
329+ (body 135:5
324− (branch 133:5
330+ (branch 135:5
325− (wing 133:8 args)
331+ (wing 135:8 args)
326− (arm 134:7
332+ (arm 136:7
327− (cell 134:7 (bind 134:8 rest) (bind 134:13 acc))
333+ (cell 136:7 (bind 136:8 rest) (bind 136:13 acc))
328− (body 135:9
334+ (body 137:9
329− (branch 135:9
335+ (branch 137:9
330− (wing 135:12 rest)
336+ (wing 137:12 rest)
331− (arm 136:11 (lit 136:11 ~) (wing 136:13 acc))
337+ (arm 138:11 (lit 138:11 ~) (wing 138:13 acc))
332− (arm 137:11
338+ (arm 139:11
333− (cell 137:11 (bind 137:12 item) (bind 137:17 more))
339+ (cell 139:11 (bind 139:12 item) (bind 139:17 more))
334− (group 137:23
340+ (group 139:23
335− (call 137:24
341+ (call 139:24
336− (wing 137:24 reverse-into)
342+ (wing 139:24 reverse-into)
337− (wing 137:37 more)
343+ (wing 139:37 more)
338− (tuple 137:42 (wing 137:43 item) (wing 137:48 acc))))))))))))
344+ (tuple 139:42 (wing 139:43 item) (wing 139:48 acc))))))))))))
339− (group 138:3
345+ (group 140:3
340− (call 138:4 (wing 138:4 reverse-into) (wing 138:17 xs) (lit 138:20 ~)))))))
346+ (call 140:4 (wing 140:4 reverse-into) (wing 140:17 xs) (lit 140:20 ~)))))))
tests/golden/prelude-list-helpers/types.txt+1−1
@@ -35,7 +35,7 @@ partial inference; module not checked
35+$ tree: cases proven disjoint; mold not checked
35+$ tree: cases proven disjoint; mold not checked
36+$ each: cases proven disjoint; mold not checked
36+$ each: cases proven disjoint; mold not checked
37+$ bloq: not checked
37+$ bloq: not checked
38−++ some: expression is not supported by partial inference
38+++ some: unit construction needs the standard prelude in partial inference
39++ lure: cast mold is not supported by partial inference
39++ lure: cast mold is not supported by partial inference
40++ snoc: sample mold is not supported by partial inference
40++ snoc: sample mold is not supported by partial inference
41++ flop: sample mold is not supported by partial inference
41++ flop: sample mold is not supported by partial inference
tests/golden/prelude-list-unit/source.jibb+8−6
@@ -37,13 +37,15 @@
37++ weld |= args=[(list A) (list A)]
37++ weld |= args=[(list A) (list A)]
38 ?- args
38 ?- args
39 [xs ys]
39 [xs ys]
40+ ^- (list A)
40− ?- xs
41+ ?- xs
41− ~ ys
42+ ~ ys
42− [item rest] [item (weld rest ys)]
43+ [item rest] [item (weld rest ys)]
43
44
44++ turn |= args=[(list A) $-(A B)]
45++ turn |= args=[(list A) $-(A B)]
45 ?- args
46 ?- args
46 [xs f]
47 [xs f]
48+ ^- (list B)
47− ?- xs
49+ ?- xs
48− ~ ~
50+ ~ ~
49− [item rest] [(f item) (turn rest f)]
51+ [item rest] [(f item) (turn rest f)]
tests/golden/prelude-list-unit/tokens.txt+86−72
@@ -190,76 +190,90 @@
19039:9 name ys
19039:9 name ys
19139:11 tight glyph ]
19139:11 tight glyph ]
19240:7 INDENT
19240:7 INDENT
193−40:7 glyph ?-
193+40:7 glyph ^-
194−40:10 name xs
194+40:10 glyph (
195+40:11 tight name list
196+40:16 tvar A
197+40:17 tight glyph )
19541:9 INDENT
19841:9 INDENT
196−41:9 lit ~
199+41:9 glyph ?-
200+41:12 name xs
201+42:11 INDENT
202+42:11 lit ~
197−41:11 name ys
203+42:13 name ys
198−42:9 NEWLINE
204+43:11 NEWLINE
199−42:9 glyph [
205+43:11 glyph [
200−42:10 tight name item
206+43:12 tight name item
201−42:15 name rest
207+43:17 name rest
202−42:19 tight glyph ]
208+43:21 tight glyph ]
203−42:21 glyph [
209+43:23 glyph [
204−42:22 tight name item
210+43:24 tight name item
205−42:27 glyph (
211+43:29 glyph (
206−42:28 tight name weld
212+43:30 tight name weld
207−42:33 name rest
213+43:35 name rest
208−42:38 name ys
214+43:40 name ys
209−42:40 tight glyph )
215+43:42 tight glyph )
210−42:41 tight glyph ]
216+43:43 tight glyph ]
217+45:1 DEDENT
211−44:1 DEDENT
218+45:1 DEDENT
212−44:1 DEDENT
219+45:1 DEDENT
213−44:1 DEDENT
220+45:1 DEDENT
214−44:1 DEDENT
221+45:1 DEDENT
215−44:1 NEWLINE
222+45:1 NEWLINE
216−44:1 glyph ++
223+45:1 glyph ++
217−44:4 name turn
224+45:4 name turn
218−44:9 glyph |=
225+45:9 glyph |=
219−44:12 name args
226+45:12 name args
220−44:16 tight glyph =
227+45:16 tight glyph =
221−44:17 tight glyph [
228+45:17 tight glyph [
222−44:18 tight glyph (
229+45:18 tight glyph (
223−44:19 tight name list
230+45:19 tight name list
224−44:24 tvar A
231+45:24 tvar A
225−44:25 tight glyph )
232+45:25 tight glyph )
226−44:27 glyph $-(
233+45:27 glyph $-(
227−44:30 tight tvar A
234+45:30 tight tvar A
228−44:32 tvar B
235+45:32 tvar B
229−44:33 tight glyph )
236+45:33 tight glyph )
230−44:34 tight glyph ]
237+45:34 tight glyph ]
231−45:3 INDENT
238+46:3 INDENT
232−45:3 glyph ?-
239+46:3 glyph ?-
233−45:6 name args
240+46:6 name args
234−46:5 INDENT
241+47:5 INDENT
235−46:5 glyph [
242+47:5 glyph [
236−46:6 tight name xs
243+47:6 tight name xs
237−46:9 name f
244+47:9 name f
238−46:10 tight glyph ]
245+47:10 tight glyph ]
239−47:7 INDENT
246+48:7 INDENT
240−47:7 glyph ?-
247+48:7 glyph ^-
241−47:10 name xs
248+48:10 glyph (
249+48:11 tight name list
250+48:16 tvar B
251+48:17 tight glyph )
242−48:9 INDENT
252+49:9 INDENT
253+49:9 glyph ?-
254+49:12 name xs
255+50:11 INDENT
243−48:9 lit ~
256+50:11 lit ~
244−48:11 lit ~
257+50:13 lit ~
245−49:9 NEWLINE
258+51:11 NEWLINE
246−49:9 glyph [
259+51:11 glyph [
247−49:10 tight name item
260+51:12 tight name item
248−49:15 name rest
261+51:17 name rest
249−49:19 tight glyph ]
262+51:21 tight glyph ]
250−49:21 glyph [
263+51:23 glyph [
251−49:22 tight glyph (
264+51:24 tight glyph (
252−49:23 tight name f
265+51:25 tight name f
253−49:25 name item
266+51:27 name item
254−49:29 tight glyph )
267+51:31 tight glyph )
255−49:31 glyph (
268+51:33 glyph (
256−49:32 tight name turn
269+51:34 tight name turn
257−49:37 name rest
270+51:39 name rest
258−49:42 name f
271+51:44 name f
259−49:43 tight glyph )
272+51:45 tight glyph )
260−49:44 tight glyph ]
273+51:46 tight glyph ]
274+51:47 DEDENT
261−49:45 DEDENT
275+51:47 DEDENT
262−49:45 DEDENT
276+51:47 DEDENT
263−49:45 DEDENT
277+51:47 DEDENT
264−49:45 DEDENT
278+51:47 DEDENT
265−49:45 NEWLINE
279+51:47 NEWLINE
tests/golden/prelude-list-unit/tree.txt+37−31
@@ -87,34 +87,40 @@
87 (arm 39:5
87 (arm 39:5
88 (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
88 (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
89 (body 40:7
89 (body 40:7
90− (branch 40:7
90+ (cast 40:7
91− (wing 40:10 xs)
91+ (apply 40:10 list (tvar 40:16 A))
92− (arm 41:9 (lit 41:9 ~) (wing 41:11 ys))
92+ (body 41:9
93+ (branch 41:9
94+ (wing 41:12 xs)
95+ (arm 42:11 (lit 42:11 ~) (wing 42:13 ys))
93− (arm 42:9
96+ (arm 43:11
94− (cell 42:9 (bind 42:10 item) (bind 42:15 rest))
97+ (cell 43:11 (bind 43:12 item) (bind 43:17 rest))
95− (tuple 42:21
98+ (tuple 43:23
96− (wing 42:22 item)
99+ (wing 43:24 item)
97− (group 42:27
100+ (group 43:29
98− (call 42:28 (wing 42:28 weld) (wing 42:33 rest) (wing 42:38 ys))))))))))))
101+ (call 43:30 (wing 43:30 weld) (wing 43:35 rest) (wing 43:40 ys))))))))))))))
99− (value 44:1 turn
102+ (value 45:1 turn
100− (gate 44:9
103+ (gate 45:9
101− (face 44:12 args
104+ (face 45:12 args
102− (cell 44:17
105+ (cell 45:17
103− (apply 44:18 list (tvar 44:24 A))
106+ (apply 45:18 list (tvar 45:24 A))
104− (fn 44:27 (tvar 44:30 A) (tvar 44:32 B))))
107+ (fn 45:27 (tvar 45:30 A) (tvar 45:32 B))))
105− (body 45:3
108+ (body 46:3
106− (branch 45:3
109+ (branch 46:3
107− (wing 45:6 args)
110+ (wing 46:6 args)
108− (arm 46:5
111+ (arm 47:5
109− (cell 46:5 (bind 46:6 xs) (bind 46:9 f))
112+ (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
110− (body 47:7
113+ (body 48:7
111− (branch 47:7
114+ (cast 48:7
112− (wing 47:10 xs)
115+ (apply 48:10 list (tvar 48:16 B))
116+ (body 49:9
117+ (branch 49:9
118+ (wing 49:12 xs)
113− (arm 48:9 (lit 48:9 ~) (lit 48:11 ~))
119+ (arm 50:11 (lit 50:11 ~) (lit 50:13 ~))
114− (arm 49:9
120+ (arm 51:11
115− (cell 49:9 (bind 49:10 item) (bind 49:15 rest))
121+ (cell 51:11 (bind 51:12 item) (bind 51:17 rest))
116− (tuple 49:21
122+ (tuple 51:23
117− (group 49:22
123+ (group 51:24
118− (call 49:23 (wing 49:23 f) (wing 49:25 item)))
124+ (call 51:25 (wing 51:25 f) (wing 51:27 item)))
119− (group 49:31
125+ (group 51:33
120− (call 49:32 (wing 49:32 turn) (wing 49:37 rest) (wing 49:42 f)))))))))))))
126+ (call 51:34 (wing 51:34 turn) (wing 51:39 rest) (wing 51:44 f)))))))))))))))
tests/golden/prelude-unit-list-transforms/about.txt+2−2
@@ -1,4 +1,4 @@
1−source: Overview, Prelude: "The exported inventory includes all names from the Hoon library sections listed below, excluding the groups explicitly left out"; Hoon 2a includes `drop`, `bind`, `biff`, `flit`, `both` and `clef`, and 2b includes `join`, `murn`, `rear`, `snip`, `skim`, `skip`, `levy`, `lien`, `roll` and `reel`. Folds take an explicit start.
1+source: Overview, Prelude: "The exported inventory includes all names from the Hoon library sections listed below, excluding the groups explicitly left out"; Hoon 2a includes `drop`, `bind`, `biff`, `flit`, `both`, `clap` and `clef`, and 2b includes `join`, `murn`, `rear`, `snip`, `skim`, `skip`, `levy`, `lien`, `roll` and `reel`. Folds take an explicit start.
2−tests: The complete current prelude parses, including unit-to-list conversion, unit mapping and flat mapping, a curried unit-producing filter, two ways to combine units, 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.
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+112−66
@@ -1,4 +1,8 @@
1+/= internal /lib/jibb/internal
2++$ poke poke.internal
3+
1:: Initial prelude functions. The rest of the inventory is still to come.
4:: Initial prelude functions. The rest of the inventory is still to come.
5+
2++ same |= x=A x
6++ same |= x=A x
3
7
4++ head |= p=[A B]
8++ head |= p=[A B]
@@ -37,16 +41,18 @@
37++ weld |= args=[(list A) (list A)]
41++ weld |= args=[(list A) (list A)]
38 ?- args
42 ?- args
39 [xs ys]
43 [xs ys]
44+ ^- (list A)
40− ?- xs
45+ ?- xs
41− ~ ys
46+ ~ ys
42− [item rest] [item (weld rest ys)]
47+ [item rest] [item (weld rest ys)]
43
48
44++ turn |= args=[(list A) $-(A B)]
49++ turn |= args=[(list A) $-(A B)]
45 ?- args
50 ?- args
46 [xs f]
51 [xs f]
52+ ^- (list B)
47− ?- xs
53+ ?- xs
48− ~ ~
54+ ~ ~
49− [item rest] [(f item) (turn rest f)]
55+ [item rest] [(f item) (turn rest f)]
50
56
51+$ dime [p=@ta q=@]
57+$ dime [p=@ta q=@]
52
58
@@ -138,27 +144,28 @@
138 (reverse-into xs ~)
144 (reverse-into xs ~)
139
145
140++ drop |= maybe=(unit A)
146++ drop |= maybe=(unit A)
147+ ^- (list A)
141− ?- maybe
148+ ?- maybe
142− ~ ~
149+ ~ ~
143− [~ value] [value ~]
150+ [~ value] [value ~]
144
151
145++ bind |= args=[(unit A) $-(A B)]
152++ bind |= args=[(unit A) $-(A B)]
146 ?- args
153 ?- args
147− [maybe f]
154+ [maybe f] ^- (unit B)
148 ?- maybe
155 ?- maybe
149 ~ ~
156 ~ ~
150 [~ value] `(f value)
157 [~ value] `(f value)
151
158
152++ biff |= args=[(unit A) $-(A (unit B))]
159++ biff |= args=[(unit A) $-(A (unit B))]
153 ?- args
160 ?- args
154− [maybe f]
161+ [maybe f] ^- (unit B)
155 ?- maybe
162 ?- maybe
156 ~ ~
163 ~ ~
157 [~ value] (f value)
164 [~ value] (f value)
158
165
159++ both |= args=[(unit A) (unit B)]
166++ both |= args=[(unit A) (unit B)]
160 ?- args
167 ?- args
161− [first second]
168+ [first second] ^- (unit [A B])
162 ?- first
169 ?- first
163 ~ ~
170 ~ ~
164 [~ a]
171 [~ a]
@@ -166,9 +173,19 @@
166 ~ ~
173 ~ ~
167 [~ b] `[a b]
174 [~ b] `[a b]
168
175
176+++ clap |= args=[(unit A) (unit A) $-([A A] A)]
177+ ?- args
178+ [first second combine] ^- (unit A)
179+ ?- first
180+ ~ second
181+ [~ a]
182+ ?- second
183+ ~ first
184+ [~ b] `(combine a b)
185+
169++ clef |= args=[(unit A) (unit B) $-([A B] (unit C))]
186++ clef |= args=[(unit A) (unit B) $-([A B] (unit C))]
170 ?- args
187 ?- args
171− [first second combine]
188+ [first second combine] ^- (unit C)
172 ?- first
189 ?- first
173 ~ ~
190 ~ ~
174 [~ a]
191 [~ a]
@@ -178,43 +195,45 @@
178
195
179++ skim |= args=[(list A) $-(A ?)]
196++ skim |= args=[(list A) $-(A ?)]
180 ?- args
197 ?- args
181− [xs predicate]
198+ [xs predicate] ^- (list A)
182− ?- xs
199+ ?- xs
183− ~ ~
200+ ~ ~
184− [item rest]
201+ [item rest]
185− ?- (predicate item)
202+ ?- (predicate item)
186− %.y [item (skim rest predicate)]
203+ %.y [item (skim rest predicate)]
187− %.n (skim rest predicate)
204+ %.n (skim rest predicate)
188
205
189++ skip |= args=[(list A) $-(A ?)]
206++ skip |= args=[(list A) $-(A ?)]
190 ?- args
207 ?- args
191− [xs predicate]
208+ [xs predicate] ^- (list A)
192− ?- xs
209+ ?- xs
193− ~ ~
210+ ~ ~
194− [item rest]
211+ [item rest]
195− ?- (predicate item)
212+ ?- (predicate item)
196− %.y (skip rest predicate)
213+ %.y (skip rest predicate)
197− %.n [item (skip rest predicate)]
214+ %.n [item (skip rest predicate)]
198
215
199++ levy |= args=[(list A) $-(A ?)]
216++ levy |= args=[(list A) $-(A ?)]
217+ ^- ?
200− ?- args
218+ ?- args
201− [xs predicate]
219+ [xs predicate]
202− ?- xs
220+ ?- xs
203− ~ %.y
221+ ~ %.y
204− [item rest]
222+ [item rest]
205− ?- (predicate item)
223+ ?- (predicate item)
206− %.y (levy rest predicate)
224+ %.y (levy rest predicate)
207− %.n %.n
225+ %.n %.n
208
226
209++ lien |= args=[(list A) $-(A ?)]
227++ lien |= args=[(list A) $-(A ?)]
228+ ^- ?
210− ?- args
229+ ?- args
211− [xs predicate]
230+ [xs predicate]
212− ?- xs
231+ ?- xs
213− ~ %.n
232+ ~ %.n
214− [item rest]
233+ [item rest]
215− ?- (predicate item)
234+ ?- (predicate item)
216− %.y %.y
235+ %.y %.y
217− %.n (lien rest predicate)
236+ %.n (lien rest predicate)
218
237
219++ roll |= args=[(list A) B $-([A B] B)]
238++ roll |= args=[(list A) B $-([A B] B)]
220 ?- args
239 ?- args
@@ -232,37 +251,39 @@
232
251
233++ flit |= predicate=$-(A ?)
252++ flit |= predicate=$-(A ?)
234 |= value=A
253 |= value=A
254+ ^- (unit A)
235− ?- (predicate value)
255+ ?- (predicate value)
236− %.y `value
256+ %.y `value
237− %.n ~
257+ %.n ~
238
258
239++ murn |= args=[(list A) $-(A (unit B))]
259++ murn |= args=[(list A) $-(A (unit B))]
240 ?- args
260 ?- args
241− [xs f]
261+ [xs f] ^- (list B)
242− ?- xs
262+ ?- xs
243− ~ ~
263+ ~ ~
244− [item rest]
264+ [item rest]
245− ?- (f item)
265+ ?- (f item)
246− ~ (murn rest f)
266+ ~ (murn rest f)
247− [~ value] [value (murn rest f)]
267+ [~ value] [value (murn rest f)]
248
268
249++ join |= args=[A (list A)]
269++ join |= args=[A (list A)]
250 ?- args
270 ?- args
251− [separator xs]
271+ [separator xs] ^- (list A)
252− ?- xs
272+ ?- xs
253− ~ ~
273+ ~ ~
254− [item rest]
274+ [item rest]
255− ?- rest
275+ ?- rest
256− ~ [item ~]
276+ ~ [item ~]
257− [next more] [item [separator (join separator rest)]]
277+ [next more] [item [separator (join separator rest)]]
258
278
259++ snip |= xs=(list A)
279++ snip |= xs=(list A)
280+ ^- (list A)
260− ?- xs
281+ ?- xs
261− ~ ~
282+ ~ ~
262− [item rest]
283+ [item rest]
263− ?- rest
284+ ?- rest
264− ~ ~
285+ ~ ~
265− [next more] [item (snip rest)]
286+ [next more] [item (snip rest)]
266
287
267++ rear |= xs=(list A)
288++ rear |= xs=(list A)
268 ?- xs
289 ?- xs
@@ -271,3 +292,28 @@
271 ?- rest
292 ?- rest
272 ~ item
293 ~ item
273 [next more] (rear rest)
294 [next more] (rear rest)
295+
296+++ cork |= gates=[$-(A B) $-(B C)]
297+ ?- gates
298+ [f g] |= x=A (g (f x))
299+
300+++ corl |= gates=[$-(B C) $-(A B)]
301+ ?- gates
302+ [f g] |= x=A (f (g x))
303+
304+++ cury |= args=[$-([A B] C) A]
305+ ?- args
306+ [f a] |= b=B (f a b)
307+
308+++ curr |= args=[$-([A B] C) B]
309+ ?- args
310+ [f b] |= a=A (f a b)
311+
312++$ cmd |$ [M]
313+ [%poke p=poke reply=$-((unit @t) M)]
314+ [%go url=@t]
315+ [%wait gap=@dr msg=M]
316+ [%now reply=$-(@da M)]
317+ [%who reply=$-(@p M)]
318+
319+++ gth |= args=[A A] (gth-atom.internal args)
tests/golden/prelude-unit-list-transforms/tokens.txt+1904−1515
@@ -1,34 +1,26 @@
1+1:1 glyph /=
2+1:4 name internal
3+1:13 glyph /
4+1:14 tight knot lib
5+1:17 tight glyph /
6+1:18 tight knot jibb
7+1:22 tight glyph /
8+1:23 tight knot internal
9+2:1 NEWLINE
1−2:1 glyph ++
10+2:1 glyph +$
2−2:4 name same
11+2:4 name poke
12+2:9 wing poke.internal
13+6:1 NEWLINE
14+6:1 glyph ++
15+6:4 name same
3−2:9 glyph |=
16+6:9 glyph |=
4−2:12 name x
17+6:12 name x
5−2:13 tight glyph =
18+6:13 tight glyph =
6−2:14 tight tvar A
19+6:14 tight tvar A
7−2:16 name x
20+6:16 name x
8−4:1 NEWLINE
9−4:1 glyph ++
10−4:4 name head
11−4:9 glyph |=
12−4:12 name p
13−4:13 tight glyph =
14−4:14 tight glyph [
15−4:15 tight tvar A
16−4:17 tvar B
17−4:18 tight glyph ]
18−5:3 INDENT
19−5:3 glyph ?-
20−5:6 name p
21−6:5 INDENT
22−6:5 glyph [
23−6:6 tight name a
24−6:8 name b
25−6:9 tight glyph ]
26−6:11 name a
27−8:1 DEDENT
28−8:1 DEDENT
298:1 NEWLINE
218:1 NEWLINE
308:1 glyph ++
228:1 glyph ++
31−8:4 name tail
23+8:4 name head
328:9 glyph |=
248:9 glyph |=
338:12 name p
258:12 name p
348:13 tight glyph =
268:13 tight glyph =
@@ -44,52 +36,51 @@
4410:6 tight name a
3610:6 tight name a
4510:8 name b
3710:8 name b
4610:9 tight glyph ]
3810:9 tight glyph ]
47−10:11 name b
39+10:11 name a
4812:1 DEDENT
4012:1 DEDENT
4912:1 DEDENT
4112:1 DEDENT
5012:1 NEWLINE
4212:1 NEWLINE
5112:1 glyph ++
4312:1 glyph ++
52−12:4 name not
44+12:4 name tail
53−12:8 glyph |=
45+12:9 glyph |=
54−12:11 name b
46+12:12 name p
55−12:12 tight glyph =
47+12:13 tight glyph =
48+12:14 tight glyph [
49+12:15 tight tvar A
50+12:17 tvar B
56−12:13 tight glyph ?
51+12:18 tight glyph ]
5713:3 INDENT
5213:3 INDENT
5813:3 glyph ?-
5313:3 glyph ?-
59−13:6 name b
54+13:6 name p
6014:5 INDENT
5514:5 INDENT
61−14:5 lit %.y
56+14:5 glyph [
62−14:9 lit %.n
57+14:6 tight name a
63−15:5 NEWLINE
58+14:8 name b
64−15:5 lit %.n
59+14:9 tight glyph ]
65−15:9 lit %.y
60+14:11 name b
66−17:1 DEDENT
61+16:1 DEDENT
67−17:1 DEDENT
62+16:1 DEDENT
68−17:1 NEWLINE
63+16:1 NEWLINE
69−17:1 glyph +$
64+16:1 glyph ++
70−17:4 name list
65+16:4 name not
71−17:9 glyph |$
66+16:8 glyph |=
67+16:11 name b
72−17:12 glyph [
68+16:12 tight glyph =
73−17:13 tight tvar A
69+16:13 tight glyph ?
74−17:14 tight glyph ]
75−18:3 INDENT
70+17:3 INDENT
76−18:3 lit ~
77−19:3 NEWLINE
78−19:3 glyph [
71+17:3 glyph ?-
79−19:4 tight name i
72+17:6 name b
80−19:5 tight glyph =
73+18:5 INDENT
81−19:6 tight tvar A
74+18:5 lit %.y
82−19:8 name t
75+18:9 lit %.n
83−19:9 tight glyph =
76+19:5 NEWLINE
84−19:10 tight glyph (
77+19:5 lit %.n
85−19:11 tight name list
78+19:9 lit %.y
86−19:16 tvar A
79+21:1 DEDENT
87−19:17 tight glyph )
88−19:18 tight glyph ]
8921:1 DEDENT
8021:1 DEDENT
9021:1 NEWLINE
8121:1 NEWLINE
9121:1 glyph +$
8221:1 glyph +$
92−21:4 name unit
83+21:4 name list
9321:9 glyph |$
8421:9 glyph |$
9421:12 glyph [
8521:12 glyph [
9521:13 tight tvar A
8621:13 tight tvar A
@@ -98,570 +89,573 @@
9822:3 lit ~
8922:3 lit ~
9923:3 NEWLINE
9023:3 NEWLINE
10023:3 glyph [
9123:3 glyph [
101−23:4 tight lit ~
92+23:4 tight name i
102−23:6 name u
93+23:5 tight glyph =
103−23:7 tight glyph =
94+23:6 tight tvar A
104−23:8 tight tvar A
95+23:8 name t
105−23:9 tight glyph ]
96+23:9 tight glyph =
97+23:10 tight glyph (
98+23:11 tight name list
99+23:16 tvar A
100+23:17 tight glyph )
101+23:18 tight glyph ]
10625:1 DEDENT
10225:1 DEDENT
10725:1 NEWLINE
10325:1 NEWLINE
108−25:1 glyph ++
104+25:1 glyph +$
109−25:4 name fall
105+25:4 name unit
110−25:9 glyph |=
106+25:9 glyph |$
111−25:12 name args
112−25:16 tight glyph =
113−25:17 tight glyph [
107+25:12 glyph [
114−25:18 tight glyph (
115−25:19 tight name unit
116−25:24 tvar A
117−25:25 tight glyph )
118−25:27 tvar A
108+25:13 tight tvar A
119−25:28 tight glyph ]
109+25:14 tight glyph ]
12026:3 INDENT
11026:3 INDENT
111+26:3 lit ~
112+27:3 NEWLINE
113+27:3 glyph [
114+27:4 tight lit ~
115+27:6 name u
116+27:7 tight glyph =
117+27:8 tight tvar A
118+27:9 tight glyph ]
119+29:1 DEDENT
120+29:1 NEWLINE
121+29:1 glyph ++
122+29:4 name fall
123+29:9 glyph |=
124+29:12 name args
125+29:16 tight glyph =
126+29:17 tight glyph [
127+29:18 tight glyph (
128+29:19 tight name unit
129+29:24 tvar A
130+29:25 tight glyph )
131+29:27 tvar A
121−26:3 glyph ?-
132+29:28 tight glyph ]
133+30:3 INDENT
134+30:3 glyph ?-
122−26:6 name args
135+30:6 name args
123−27:5 INDENT
136+31:5 INDENT
124−27:5 glyph [
137+31:5 glyph [
125−27:6 tight name maybe
138+31:6 tight name maybe
126−27:12 name fallback
139+31:12 name fallback
127−27:20 tight glyph ]
140+31:20 tight glyph ]
128−28:7 INDENT
141+32:7 INDENT
129−28:7 glyph ?-
142+32:7 glyph ?-
130−28:10 name maybe
143+32:10 name maybe
131−29:9 INDENT
144+33:9 INDENT
132−29:9 lit ~
145+33:9 lit ~
133−29:11 name fallback
146+33:11 name fallback
134−30:9 NEWLINE
147+34:9 NEWLINE
135−30:9 glyph [
148+34:9 glyph [
136−30:10 tight lit ~
149+34:10 tight lit ~
137−30:12 name value
150+34:12 name value
138−30:17 tight glyph ]
151+34:17 tight glyph ]
139−30:19 name value
152+34:19 name value
140−32:1 DEDENT
153+36:1 DEDENT
141−32:1 DEDENT
154+36:1 DEDENT
142−32:1 DEDENT
155+36:1 DEDENT
143−32:1 DEDENT
156+36:1 DEDENT
144−32:1 NEWLINE
157+36:1 NEWLINE
145−32:1 glyph ++
158+36:1 glyph ++
146−32:4 name need
159+36:4 name need
147−32:9 glyph |=
160+36:9 glyph |=
148−32:12 name maybe
161+36:12 name maybe
149−32:17 tight glyph =
162+36:17 tight glyph =
150−32:18 tight glyph (
163+36:18 tight glyph (
151−32:19 tight name unit
164+36:19 tight name unit
152−32:24 tvar A
165+36:24 tvar A
153−32:25 tight glyph )
166+36:25 tight glyph )
154−33:3 INDENT
167+37:3 INDENT
155−33:3 glyph ?-
168+37:3 glyph ?-
156−33:6 name maybe
169+37:6 name maybe
157−34:5 INDENT
170+38:5 INDENT
158−34:5 lit ~
171+38:5 lit ~
159−34:7 glyph !!
172+38:7 glyph !!
160−35:5 NEWLINE
173+39:5 NEWLINE
161−35:5 glyph [
162−35:6 tight lit ~
163−35:8 name value
164−35:13 tight glyph ]
165−35:15 name value
166−37:1 DEDENT
167−37:1 DEDENT
168−37:1 NEWLINE
169−37:1 glyph ++
170−37:4 name weld
171−37:9 glyph |=
172−37:12 name args
173−37:16 tight glyph =
174−37:17 tight glyph [
175−37:18 tight glyph (
176−37:19 tight name list
177−37:24 tvar A
178−37:25 tight glyph )
179−37:27 glyph (
180−37:28 tight name list
181−37:33 tvar A
182−37:34 tight glyph )
183−37:35 tight glyph ]
184−38:3 INDENT
185−38:3 glyph ?-
186−38:6 name args
187−39:5 INDENT
18839:5 glyph [
17439:5 glyph [
189−39:6 tight name xs
175+39:6 tight lit ~
190−39:9 name ys
176+39:8 name value
191−39:11 tight glyph ]
177+39:13 tight glyph ]
192−40:7 INDENT
178+39:15 name value
193−40:7 glyph ?-
179+41:1 DEDENT
194−40:10 name xs
180+41:1 DEDENT
195−41:9 INDENT
181+41:1 NEWLINE
196−41:9 lit ~
182+41:1 glyph ++
197−41:11 name ys
183+41:4 name weld
198−42:9 NEWLINE
184+41:9 glyph |=
199−42:9 glyph [
185+41:12 name args
200−42:10 tight name item
186+41:16 tight glyph =
201−42:15 name rest
187+41:17 tight glyph [
202−42:19 tight glyph ]
188+41:18 tight glyph (
203−42:21 glyph [
189+41:19 tight name list
204−42:22 tight name item
190+41:24 tvar A
205−42:27 glyph (
191+41:25 tight glyph )
206−42:28 tight name weld
192+41:27 glyph (
207−42:33 name rest
193+41:28 tight name list
208−42:38 name ys
194+41:33 tvar A
209−42:40 tight glyph )
195+41:34 tight glyph )
210−42:41 tight glyph ]
196+41:35 tight glyph ]
211−44:1 DEDENT
197+42:3 INDENT
212−44:1 DEDENT
198+42:3 glyph ?-
213−44:1 DEDENT
199+42:6 name args
214−44:1 DEDENT
200+43:5 INDENT
215−44:1 NEWLINE
201+43:5 glyph [
216−44:1 glyph ++
202+43:6 tight name xs
217−44:4 name turn
203+43:9 name ys
218−44:9 glyph |=
204+43:11 tight glyph ]
219−44:12 name args
205+44:7 INDENT
220−44:16 tight glyph =
206+44:7 glyph ^-
221−44:17 tight glyph [
207+44:10 glyph (
222−44:18 tight glyph (
208+44:11 tight name list
223−44:19 tight name list
209+44:16 tvar A
224−44:24 tvar A
210+44:17 tight glyph )
225−44:25 tight glyph )
211+45:9 INDENT
226−44:27 glyph $-(
212+45:9 glyph ?-
227−44:30 tight tvar A
213+45:12 name xs
228−44:32 tvar B
214+46:11 INDENT
229−44:33 tight glyph )
215+46:11 lit ~
230−44:34 tight glyph ]
216+46:13 name ys
231−45:3 INDENT
217+47:11 NEWLINE
232−45:3 glyph ?-
218+47:11 glyph [
233−45:6 name args
219+47:12 tight name item
234−46:5 INDENT
220+47:17 name rest
235−46:5 glyph [
221+47:21 tight glyph ]
236−46:6 tight name xs
222+47:23 glyph [
237−46:9 name f
223+47:24 tight name item
238−46:10 tight glyph ]
224+47:29 glyph (
239−47:7 INDENT
225+47:30 tight name weld
240−47:7 glyph ?-
226+47:35 name rest
241−47:10 name xs
227+47:40 name ys
242−48:9 INDENT
228+47:42 tight glyph )
243−48:9 lit ~
229+47:43 tight glyph ]
244−48:11 lit ~
230+49:1 DEDENT
245−49:9 NEWLINE
231+49:1 DEDENT
246−49:9 glyph [
232+49:1 DEDENT
247−49:10 tight name item
233+49:1 DEDENT
248−49:15 name rest
234+49:1 DEDENT
249−49:19 tight glyph ]
235+49:1 NEWLINE
250−49:21 glyph [
236+49:1 glyph ++
251−49:22 tight glyph (
237+49:4 name turn
252−49:23 tight name f
238+49:9 glyph |=
253−49:25 name item
239+49:12 name args
254−49:29 tight glyph )
240+49:16 tight glyph =
255−49:31 glyph (
241+49:17 tight glyph [
256−49:32 tight name turn
242+49:18 tight glyph (
257−49:37 name rest
243+49:19 tight name list
258−49:42 name f
244+49:24 tvar A
259−49:43 tight glyph )
245+49:25 tight glyph )
260−49:44 tight glyph ]
246+49:27 glyph $-(
261−51:1 DEDENT
247+49:30 tight tvar A
262−51:1 DEDENT
248+49:32 tvar B
263−51:1 DEDENT
249+49:33 tight glyph )
264−51:1 DEDENT
250+49:34 tight glyph ]
265−51:1 NEWLINE
251+50:3 INDENT
266−51:1 glyph +$
252+50:3 glyph ?-
267−51:4 name dime
253+50:6 name args
268−51:9 glyph [
254+51:5 INDENT
269−51:10 tight name p
255+51:5 glyph [
270−51:11 tight glyph =
256+51:6 tight name xs
271−51:12 tight aura @ta
257+51:9 name f
272−51:16 name q
258+51:10 tight glyph ]
273−51:17 tight glyph =
259+52:7 INDENT
274−51:18 tight aura @
260+52:7 glyph ^-
275−51:19 tight glyph ]
261+52:10 glyph (
276−53:1 NEWLINE
262+52:11 tight name list
277−53:1 glyph +$
263+52:16 tvar B
278−53:4 name hair
264+52:17 tight glyph )
279−53:9 glyph [
265+53:9 INDENT
280−53:10 tight name p
266+53:9 glyph ?-
281−53:11 tight glyph =
267+53:12 name xs
282−53:12 tight aura @ud
268+54:11 INDENT
283−53:16 name q
269+54:11 lit ~
284−53:17 tight glyph =
270+54:13 lit ~
285−53:18 tight aura @ud
271+55:11 NEWLINE
286−53:21 tight glyph ]
272+55:11 glyph [
287−55:1 NEWLINE
273+55:12 tight name item
288−55:1 glyph +$
274+55:17 name rest
289−55:4 name pint
275+55:21 tight glyph ]
290−55:9 glyph [
276+55:23 glyph [
291−55:10 tight name p
277+55:24 tight glyph (
292−55:11 tight glyph =
278+55:25 tight name f
293−55:12 tight glyph [
279+55:27 name item
294−55:13 tight name p
280+55:31 tight glyph )
295−55:14 tight glyph =
281+55:33 glyph (
296−55:15 tight aura @
282+55:34 tight name turn
297−55:17 name q
283+55:39 name rest
298−55:18 tight glyph =
284+55:44 name f
299−55:19 tight aura @
285+55:45 tight glyph )
300−55:20 tight glyph ]
286+55:46 tight glyph ]
301−55:22 name q
287+57:1 DEDENT
302−55:23 tight glyph =
288+57:1 DEDENT
303−55:24 tight glyph [
289+57:1 DEDENT
304−55:25 tight name p
290+57:1 DEDENT
305−55:26 tight glyph =
291+57:1 DEDENT
306−55:27 tight aura @
307−55:29 name q
308−55:30 tight glyph =
309−55:31 tight aura @
310−55:32 tight glyph ]
311−55:33 tight glyph ]
31257:1 NEWLINE
29257:1 NEWLINE
31357:1 glyph +$
29357:1 glyph +$
314−57:4 name coin
294+57:4 name dime
315−58:3 INDENT
295+57:9 glyph [
316−58:3 glyph [
296+57:10 tight name p
317−58:4 tight lit %$
297+57:11 tight glyph =
318−58:7 name p
298+57:12 tight aura @ta
319−58:8 tight glyph =
299+57:16 name q
320−58:9 tight name dime
300+57:17 tight glyph =
321−58:13 tight glyph ]
301+57:18 tight aura @
322−59:3 NEWLINE
302+57:19 tight glyph ]
323−59:3 glyph [
303+59:1 NEWLINE
324−59:4 tight lit %blob
304+59:1 glyph +$
325−59:10 name p
305+59:4 name hair
306+59:9 glyph [
307+59:10 tight name p
32659:11 tight glyph =
30859:11 tight glyph =
327−59:12 tight glyph *
309+59:12 tight aura @ud
328−59:13 tight glyph ]
310+59:16 name q
329−60:3 NEWLINE
311+59:17 tight glyph =
330−60:3 glyph [
312+59:18 tight aura @ud
331−60:4 tight lit %many
313+59:21 tight glyph ]
332−60:10 name p
314+61:1 NEWLINE
333−60:11 tight glyph =
315+61:1 glyph +$
334−60:12 tight glyph (
316+61:4 name pint
335−60:13 tight name list
317+61:9 glyph [
336−60:18 name coin
318+61:10 tight name p
337−60:22 tight glyph )
319+61:11 tight glyph =
338−60:23 tight glyph ]
320+61:12 tight glyph [
339−62:1 DEDENT
321+61:13 tight name p
340−62:1 NEWLINE
322+61:14 tight glyph =
341−62:1 glyph +$
323+61:15 tight aura @
342−62:4 name pair
324+61:17 name q
343−62:9 glyph |$
325+61:18 tight glyph =
344−62:12 glyph [
326+61:19 tight aura @
345−62:13 tight tvar A
327+61:20 tight glyph ]
346−62:15 tvar B
328+61:22 name q
347−62:16 tight glyph ]
329+61:23 tight glyph =
348−62:18 glyph [
330+61:24 tight glyph [
349−62:19 tight name p
331+61:25 tight name p
350−62:20 tight glyph =
332+61:26 tight glyph =
351−62:21 tight tvar A
333+61:27 tight aura @
352−62:23 name q
334+61:29 name q
353−62:24 tight glyph =
335+61:30 tight glyph =
354−62:25 tight tvar B
336+61:31 tight aura @
355−62:26 tight glyph ]
337+61:32 tight glyph ]
356−64:1 NEWLINE
338+61:33 tight glyph ]
357−64:1 glyph +$
339+63:1 NEWLINE
358−64:4 name trel
340+63:1 glyph +$
359−64:9 glyph |$
341+63:4 name coin
360−64:12 glyph [
342+64:3 INDENT
361−64:13 tight tvar A
343+64:3 glyph [
362−64:15 tvar B
344+64:4 tight lit %$
363−64:17 tvar C
345+64:7 name p
364−64:18 tight glyph ]
346+64:8 tight glyph =
365−64:20 glyph [
347+64:9 tight name dime
366−64:21 tight name p
348+64:13 tight glyph ]
367−64:22 tight glyph =
349+65:3 NEWLINE
368−64:23 tight tvar A
350+65:3 glyph [
369−64:25 name q
351+65:4 tight lit %blob
370−64:26 tight glyph =
352+65:10 name p
371−64:27 tight tvar B
353+65:11 tight glyph =
372−64:29 name r
354+65:12 tight glyph *
373−64:30 tight glyph =
355+65:13 tight glyph ]
374−64:31 tight tvar C
356+66:3 NEWLINE
375−64:32 tight glyph ]
357+66:3 glyph [
376−66:1 NEWLINE
358+66:4 tight lit %many
377−66:1 glyph +$
359+66:10 name p
378−66:4 name qual
360+66:11 tight glyph =
379−66:9 glyph |$
361+66:12 tight glyph (
380−66:12 glyph [
362+66:13 tight name list
381−66:13 tight tvar A
363+66:18 name coin
382−66:15 tvar B
364+66:22 tight glyph )
383−66:17 tvar C
365+66:23 tight glyph ]
384−66:19 tvar D
366+68:1 DEDENT
385−66:20 tight glyph ]
386−66:22 glyph [
387−66:23 tight name p
388−66:24 tight glyph =
389−66:25 tight tvar A
390−66:27 name q
391−66:28 tight glyph =
392−66:29 tight tvar B
393−66:31 name r
394−66:32 tight glyph =
395−66:33 tight tvar C
396−66:35 name s
397−66:36 tight glyph =
398−66:37 tight tvar D
399−66:38 tight glyph ]
40068:1 NEWLINE
36768:1 NEWLINE
40168:1 glyph +$
36868:1 glyph +$
402−68:4 name cord
369+68:4 name pair
403−68:9 aura @t
370+68:9 glyph |$
371+68:12 glyph [
372+68:13 tight tvar A
373+68:15 tvar B
374+68:16 tight glyph ]
375+68:18 glyph [
376+68:19 tight name p
377+68:20 tight glyph =
378+68:21 tight tvar A
379+68:23 name q
380+68:24 tight glyph =
381+68:25 tight tvar B
382+68:26 tight glyph ]
40470:1 NEWLINE
38370:1 NEWLINE
40570:1 glyph +$
38470:1 glyph +$
406−70:4 name knot
385+70:4 name trel
407−70:9 aura @ta
386+70:9 glyph |$
387+70:12 glyph [
388+70:13 tight tvar A
389+70:15 tvar B
390+70:17 tvar C
391+70:18 tight glyph ]
392+70:20 glyph [
393+70:21 tight name p
394+70:22 tight glyph =
395+70:23 tight tvar A
396+70:25 name q
397+70:26 tight glyph =
398+70:27 tight tvar B
399+70:29 name r
400+70:30 tight glyph =
401+70:31 tight tvar C
402+70:32 tight glyph ]
40872:1 NEWLINE
40372:1 NEWLINE
40972:1 glyph +$
40472:1 glyph +$
410−72:4 name tape
405+72:4 name qual
411−72:9 glyph (
406+72:9 glyph |$
412−72:10 tight name list
407+72:12 glyph [
413−72:15 aura @tD
408+72:13 tight tvar A
414−72:18 tight glyph )
409+72:15 tvar B
410+72:17 tvar C
411+72:19 tvar D
412+72:20 tight glyph ]
413+72:22 glyph [
414+72:23 tight name p
415+72:24 tight glyph =
416+72:25 tight tvar A
417+72:27 name q
418+72:28 tight glyph =
419+72:29 tight tvar B
420+72:31 name r
421+72:32 tight glyph =
422+72:33 tight tvar C
423+72:35 name s
424+72:36 tight glyph =
425+72:37 tight tvar D
426+72:38 tight glyph ]
41574:1 NEWLINE
42774:1 NEWLINE
41674:1 glyph +$
42874:1 glyph +$
417−74:4 name path
429+74:4 name cord
418−74:9 glyph (
430+74:9 aura @t
419−74:10 tight name list
420−74:15 name knot
421−74:19 tight glyph )
42276:1 NEWLINE
43176:1 NEWLINE
42376:1 glyph +$
43276:1 glyph +$
424−76:4 name tank
433+76:4 name knot
425−77:3 INDENT
434+76:9 aura @ta
426−77:3 name cord
435+78:1 NEWLINE
427−78:3 NEWLINE
436+78:1 glyph +$
428−78:3 glyph [
437+78:4 name tape
429−78:4 tight lit %leaf
438+78:9 glyph (
430−78:10 name p
439+78:10 tight name list
431−78:11 tight glyph =
440+78:15 aura @tD
432−78:12 tight name tape
441+78:18 tight glyph )
433−78:16 tight glyph ]
442+80:1 NEWLINE
434−79:3 NEWLINE
443+80:1 glyph +$
435−79:3 glyph [
444+80:4 name path
436−79:4 tight lit %palm
445+80:9 glyph (
437−79:10 name p
446+80:10 tight name list
438−79:11 tight glyph =
447+80:15 name knot
439−79:12 tight glyph (
448+80:19 tight glyph )
440−79:13 tight name qual
441−79:18 name tape
442−79:23 name tape
443−79:28 name tape
444−79:33 name tape
445−79:37 tight glyph )
446−79:39 name q
447−79:40 tight glyph =
448−79:41 tight glyph (
449−79:42 tight name list
450−79:47 name tank
451−79:51 tight glyph )
452−79:52 tight glyph ]
453−80:3 NEWLINE
454−80:3 glyph [
455−80:4 tight lit %rose
456−80:10 name p
457−80:11 tight glyph =
458−80:12 tight glyph (
459−80:13 tight name trel
460−80:18 name tape
461−80:23 name tape
462−80:28 name tape
463−80:32 tight glyph )
464−80:34 name q
465−80:35 tight glyph =
466−80:36 tight glyph (
467−80:37 tight name list
468−80:42 name tank
469−80:46 tight glyph )
470−80:47 tight glyph ]
471−82:1 DEDENT
47282:1 NEWLINE
44982:1 NEWLINE
47382:1 glyph +$
45082:1 glyph +$
474−82:4 name nail
451+82:4 name tank
475−82:9 glyph [
452+83:3 INDENT
476−82:10 tight name p
453+83:3 name cord
477−82:11 tight glyph =
454+84:3 NEWLINE
478−82:12 tight name hair
455+84:3 glyph [
479−82:17 name q
456+84:4 tight lit %leaf
480−82:18 tight glyph =
457+84:10 name p
481−82:19 tight name tape
482−82:23 tight glyph ]
483−84:1 NEWLINE
484−84:1 glyph +$
485−84:4 name edge
486−84:9 glyph [
487−84:10 tight name p
48884:11 tight glyph =
45884:11 tight glyph =
489−84:12 tight name hair
459+84:12 tight name tape
490−84:17 name q
460+84:16 tight glyph ]
491−84:18 tight glyph =
461+85:3 NEWLINE
492−84:19 tight glyph (
462+85:3 glyph [
493−84:20 tight name unit
463+85:4 tight lit %palm
494−84:25 glyph [
464+85:10 name p
495−84:26 tight name p
465+85:11 tight glyph =
496−84:27 tight glyph =
466+85:12 tight glyph (
497−84:28 tight glyph *
467+85:13 tight name qual
498−84:30 name q
468+85:18 name tape
499−84:31 tight glyph =
469+85:23 name tape
500−84:32 tight name nail
470+85:28 name tape
501−84:36 tight glyph ]
471+85:33 name tape
502−84:37 tight glyph )
472+85:37 tight glyph )
503−84:38 tight glyph ]
473+85:39 name q
504−86:1 NEWLINE
474+85:40 tight glyph =
505−86:1 glyph +$
475+85:41 tight glyph (
506−86:4 name rule
476+85:42 tight name list
507−86:9 glyph $-(
477+85:47 name tank
508−86:12 tight name nail
478+85:51 tight glyph )
509−86:17 name edge
479+85:52 tight glyph ]
510−86:21 tight glyph )
480+86:3 NEWLINE
481+86:3 glyph [
482+86:4 tight lit %rose
483+86:10 name p
484+86:11 tight glyph =
485+86:12 tight glyph (
486+86:13 tight name trel
487+86:18 name tape
488+86:23 name tape
489+86:28 name tape
490+86:32 tight glyph )
491+86:34 name q
492+86:35 tight glyph =
493+86:36 tight glyph (
494+86:37 tight name list
495+86:42 name tank
496+86:46 tight glyph )
497+86:47 tight glyph ]
498+88:1 DEDENT
51188:1 NEWLINE
49988:1 NEWLINE
51288:1 glyph +$
50088:1 glyph +$
513−88:4 name spot
501+88:4 name nail
51488:9 glyph [
50288:9 glyph [
51588:10 tight name p
50388:10 tight name p
51688:11 tight glyph =
50488:11 tight glyph =
517−88:12 tight name path
505+88:12 tight name hair
51888:17 name q
50688:17 name q
51988:18 tight glyph =
50788:18 tight glyph =
520−88:19 tight name pint
508+88:19 tight name tape
52188:23 tight glyph ]
50988:23 tight glyph ]
52290:1 NEWLINE
51090:1 NEWLINE
52390:1 glyph +$
51190:1 glyph +$
524−90:4 name toon
512+90:4 name edge
525−91:3 INDENT
513+90:9 glyph [
526−91:3 glyph [
514+90:10 tight name p
527−91:4 tight lit %0
515+90:11 tight glyph =
528−91:7 name p
516+90:12 tight name hair
529−91:8 tight glyph =
517+90:17 name q
530−91:9 tight glyph *
518+90:18 tight glyph =
531−91:10 tight glyph ]
519+90:19 tight glyph (
532−92:3 NEWLINE
520+90:20 tight name unit
533−92:3 glyph [
521+90:25 glyph [
534−92:4 tight lit %1
522+90:26 tight name p
535−92:7 name p
523+90:27 tight glyph =
536−92:8 tight glyph =
524+90:28 tight glyph *
537−92:9 tight glyph *
525+90:30 name q
538−92:10 tight glyph ]
526+90:31 tight glyph =
539−93:3 NEWLINE
527+90:32 tight name nail
540−93:3 glyph [
528+90:36 tight glyph ]
541−93:4 tight lit %2
529+90:37 tight glyph )
542−93:7 name p
530+90:38 tight glyph ]
543−93:8 tight glyph =
531+92:1 NEWLINE
544−93:9 tight glyph (
532+92:1 glyph +$
545−93:10 tight name list
533+92:4 name rule
546−93:15 name tank
534+92:9 glyph $-(
547−93:19 tight glyph )
535+92:12 tight name nail
548−93:20 tight glyph ]
536+92:17 name edge
549−95:1 DEDENT
537+92:21 tight glyph )
550−95:1 NEWLINE
538+94:1 NEWLINE
551−95:1 glyph +$
539+94:1 glyph +$
552−95:4 name like
540+94:4 name spot
553−95:9 glyph |$
541+94:9 glyph [
554−95:12 glyph [
542+94:10 tight name p
555−95:13 tight tvar A
543+94:11 tight glyph =
556−95:14 tight glyph ]
544+94:12 tight name path
557−95:16 glyph [
545+94:17 name q
558−95:17 tight name p
546+94:18 tight glyph =
559−95:18 tight glyph =
547+94:19 tight name pint
560−95:19 tight name hair
548+94:23 tight glyph ]
561−95:24 name q
549+96:1 NEWLINE
562−95:25 tight glyph =
550+96:1 glyph +$
563−95:26 tight glyph (
551+96:4 name toon
564−95:27 tight name unit
552+97:3 INDENT
565−95:32 glyph [
553+97:3 glyph [
566−95:33 tight name p
554+97:4 tight lit %0
567−95:34 tight glyph =
555+97:7 name p
568−95:35 tight tvar A
556+97:8 tight glyph =
569−95:37 name q
557+97:9 tight glyph *
570−95:38 tight glyph =
558+97:10 tight glyph ]
571−95:39 tight name nail
559+98:3 NEWLINE
572−95:43 tight glyph ]
560+98:3 glyph [
573−95:44 tight glyph )
561+98:4 tight lit %1
574−95:45 tight glyph ]
562+98:7 name p
575−97:1 NEWLINE
563+98:8 tight glyph =
576−97:1 glyph ++
564+98:9 tight glyph *
577−97:4 name wonk
565+98:10 tight glyph ]
578−97:9 glyph |=
566+99:3 NEWLINE
579−97:12 name veq
567+99:3 glyph [
580−97:15 tight glyph =
568+99:4 tight lit %2
581−97:16 tight glyph (
569+99:7 name p
582−97:17 tight name like
570+99:8 tight glyph =
583−97:22 tvar A
571+99:9 tight glyph (
584−97:23 tight glyph )
572+99:10 tight name list
585−98:3 INDENT
573+99:15 name tank
586−98:3 glyph ?-
574+99:19 tight glyph )
587−98:6 wing q.veq
575+99:20 tight glyph ]
588−99:5 INDENT
576+101:1 DEDENT
589−99:5 lit ~
577+101:1 NEWLINE
590−99:7 glyph !!
578+101:1 glyph +$
591−100:5 NEWLINE
579+101:4 name like
592−100:5 glyph [
580+101:9 glyph |$
593−100:6 tight lit ~
581+101:12 glyph [
594−100:8 name product
582+101:13 tight tvar A
595−100:15 tight glyph ]
583+101:14 tight glyph ]
596−100:17 wing p.product
584+101:16 glyph [
597−102:1 DEDENT
585+101:17 tight name p
598−102:1 DEDENT
586+101:18 tight glyph =
599−102:1 NEWLINE
587+101:19 tight name hair
600−102:1 glyph +$
588+101:24 name q
601−102:4 name lone
589+101:25 tight glyph =
602−102:9 glyph |$
590+101:26 tight glyph (
603−102:12 glyph [
591+101:27 tight name unit
604−102:13 tight tvar A
592+101:32 glyph [
605−102:14 tight glyph ]
593+101:33 tight name p
606−102:16 glyph [
594+101:34 tight glyph =
607−102:17 tight name p
595+101:35 tight tvar A
608−102:18 tight glyph =
596+101:37 name q
609−102:19 tight tvar A
597+101:38 tight glyph =
610−102:20 tight glyph ]
598+101:39 tight name nail
611−104:1 NEWLINE
599+101:43 tight glyph ]
612−104:1 glyph +$
600+101:44 tight glyph )
613−104:4 name lest
601+101:45 tight glyph ]
614−104:9 glyph |$
602+103:1 NEWLINE
615−104:12 glyph [
603+103:1 glyph ++
616−104:13 tight tvar A
604+103:4 name wonk
617−104:14 tight glyph ]
605+103:9 glyph |=
618−104:16 glyph [
606+103:12 name veq
619−104:17 tight name i
607+103:15 tight glyph =
620−104:18 tight glyph =
608+103:16 tight glyph (
621−104:19 tight tvar A
609+103:17 tight name like
622−104:21 name t
610+103:22 tvar A
623−104:22 tight glyph =
611+103:23 tight glyph )
624−104:23 tight glyph (
612+104:3 INDENT
625−104:24 tight name list
613+104:3 glyph ?-
626−104:29 tvar A
614+104:6 wing q.veq
627−104:30 tight glyph )
615+105:5 INDENT
628−104:31 tight glyph ]
616+105:5 lit ~
629−106:1 NEWLINE
617+105:7 glyph !!
630−106:1 glyph +$
618+106:5 NEWLINE
631−106:4 name pole
619+106:5 glyph [
632−106:9 glyph |$
620+106:6 tight lit ~
633−106:12 glyph [
621+106:8 name product
634−106:13 tight tvar A
622+106:15 tight glyph ]
635−106:14 tight glyph ]
623+106:17 wing p.product
636−107:3 INDENT
624+108:1 DEDENT
637−107:3 lit ~
625+108:1 DEDENT
638−108:3 NEWLINE
626+108:1 NEWLINE
639−108:3 glyph [
627+108:1 glyph +$
640−108:4 tight tvar A
628+108:4 name lone
641−108:6 glyph (
629+108:9 glyph |$
642−108:7 tight name pole
630+108:12 glyph [
643−108:12 tvar A
631+108:13 tight tvar A
644−108:13 tight glyph )
645108:14 tight glyph ]
632108:14 tight glyph ]
646−110:1 DEDENT
633+108:16 glyph [
634+108:17 tight name p
635+108:18 tight glyph =
636+108:19 tight tvar A
637+108:20 tight glyph ]
647110:1 NEWLINE
638110:1 NEWLINE
648110:1 glyph +$
639110:1 glyph +$
649−110:4 name quip
640+110:4 name lest
650110:9 glyph |$
641110:9 glyph |$
651110:12 glyph [
642110:12 glyph [
652110:13 tight tvar A
643110:13 tight tvar A
653−110:15 tvar B
644+110:14 tight glyph ]
654−110:16 tight glyph ]
645+110:16 glyph [
655−110:18 glyph [
646+110:17 tight name i
656−110:19 tight glyph (
647+110:18 tight glyph =
657−110:20 tight name list
648+110:19 tight tvar A
658−110:25 tvar A
649+110:21 name t
659−110:26 tight glyph )
650+110:22 tight glyph =
660−110:28 tvar B
651+110:23 tight glyph (
661−110:29 tight glyph ]
652+110:24 tight name list
653+110:29 tvar A
654+110:30 tight glyph )
655+110:31 tight glyph ]
662112:1 NEWLINE
656112:1 NEWLINE
663112:1 glyph +$
657112:1 glyph +$
664−112:4 name tree
658+112:4 name pole
665112:9 glyph |$
659112:9 glyph |$
666112:12 glyph [
660112:12 glyph [
667112:13 tight tvar A
661112:13 tight tvar A
@@ -670,246 +664,242 @@
670113:3 lit ~
664113:3 lit ~
671114:3 NEWLINE
665114:3 NEWLINE
672114:3 glyph [
666114:3 glyph [
673−114:4 tight name n
667+114:4 tight tvar A
674−114:5 tight glyph =
668+114:6 glyph (
675−114:6 tight tvar A
669+114:7 tight name pole
676−114:8 name l
670+114:12 tvar A
677−114:9 tight glyph =
671+114:13 tight glyph )
678−114:10 tight glyph (
672+114:14 tight glyph ]
679−114:11 tight name tree
680−114:16 tvar A
681−114:17 tight glyph )
682−114:19 name r
683−114:20 tight glyph =
684−114:21 tight glyph (
685−114:22 tight name tree
686−114:27 tvar A
687−114:28 tight glyph )
688−114:29 tight glyph ]
689116:1 DEDENT
673116:1 DEDENT
690116:1 NEWLINE
674116:1 NEWLINE
691116:1 glyph +$
675116:1 glyph +$
692−116:4 name each
676+116:4 name quip
693116:9 glyph |$
677116:9 glyph |$
694116:12 glyph [
678116:12 glyph [
695116:13 tight tvar A
679116:13 tight tvar A
696116:15 tvar B
680116:15 tvar B
697116:16 tight glyph ]
681116:16 tight glyph ]
698−117:3 INDENT
682+116:18 glyph [
699−117:3 glyph [
683+116:19 tight glyph (
700−117:4 tight lit %|
684+116:20 tight name list
701−117:7 name p
685+116:25 tvar A
702−117:8 tight glyph =
686+116:26 tight glyph )
703−117:9 tight tvar B
687+116:28 tvar B
704−117:10 tight glyph ]
688+116:29 tight glyph ]
705−118:3 NEWLINE
689+118:1 NEWLINE
706−118:3 glyph [
690+118:1 glyph +$
707−118:4 tight lit %&
691+118:4 name tree
708−118:7 name p
692+118:9 glyph |$
709−118:8 tight glyph =
693+118:12 glyph [
710−118:9 tight tvar A
694+118:13 tight tvar A
711−118:10 tight glyph ]
695+118:14 tight glyph ]
712−120:1 DEDENT
696+119:3 INDENT
713−120:1 NEWLINE
697+119:3 lit ~
714−120:1 glyph +$
698+120:3 NEWLINE
715−120:4 name bloq
699+120:3 glyph [
716−120:9 aura @
700+120:4 tight name n
701+120:5 tight glyph =
702+120:6 tight tvar A
703+120:8 name l
704+120:9 tight glyph =
705+120:10 tight glyph (
706+120:11 tight name tree
707+120:16 tvar A
708+120:17 tight glyph )
709+120:19 name r
710+120:20 tight glyph =
711+120:21 tight glyph (
712+120:22 tight name tree
713+120:27 tvar A
714+120:28 tight glyph )
715+120:29 tight glyph ]
716+122:1 DEDENT
717122:1 NEWLINE
717122:1 NEWLINE
718−122:1 glyph ++
718+122:1 glyph +$
719−122:4 name some
719+122:4 name each
720−122:9 glyph |=
720+122:9 glyph |$
721−122:12 name item
721+122:12 glyph [
722−122:16 tight glyph =
722+122:13 tight tvar A
723−122:17 tight tvar A
723+122:15 tvar B
724−122:19 glyph `
724+122:16 tight glyph ]
725−122:20 tight name item
725+123:3 INDENT
726−124:1 NEWLINE
726+123:3 glyph [
727−124:1 glyph ++
727+123:4 tight lit %|
728−124:4 name lure
728+123:7 name p
729−124:9 glyph |=
729+123:8 tight glyph =
730−124:12 name item
730+123:9 tight tvar B
731−124:16 tight glyph =
731+123:10 tight glyph ]
732−124:17 tight tvar A
732+124:3 NEWLINE
733−125:3 INDENT
733+124:3 glyph [
734−125:3 glyph ^-
734+124:4 tight lit %&
735−125:6 glyph (
735+124:7 name p
736−125:7 tight name list
736+124:8 tight glyph =
737−125:12 tvar A
737+124:9 tight tvar A
738−125:13 tight glyph )
738+124:10 tight glyph ]
739−125:15 glyph [
739+126:1 DEDENT
740−125:16 tight name item
740+126:1 NEWLINE
741−125:21 lit ~
741+126:1 glyph +$
742−125:22 tight glyph ]
742+126:4 name bloq
743−127:1 DEDENT
743+126:9 aura @
744−127:1 NEWLINE
744+128:1 NEWLINE
745−127:1 glyph ++
745+128:1 glyph ++
746−127:4 name snoc
746+128:4 name some
747−127:9 glyph |=
747+128:9 glyph |=
748−127:12 name args
748+128:12 name item
749−127:16 tight glyph =
749+128:16 tight glyph =
750−127:17 tight glyph [
750+128:17 tight tvar A
751−127:18 tight glyph (
751+128:19 glyph `
752−127:19 tight name list
752+128:20 tight name item
753−127:24 tvar A
753+130:1 NEWLINE
754−127:25 tight glyph )
754+130:1 glyph ++
755−127:27 tvar A
755+130:4 name lure
756−127:28 tight glyph ]
756+130:9 glyph |=
757−128:3 INDENT
757+130:12 name item
758−128:3 glyph ?-
758+130:16 tight glyph =
759−128:6 name args
759+130:17 tight tvar A
760−129:5 INDENT
760+131:3 INDENT
761−129:5 glyph [
761+131:3 glyph ^-
762−129:6 tight name xs
762+131:6 glyph (
763−129:9 name item
763+131:7 tight name list
764−129:13 tight glyph ]
764+131:12 tvar A
765−129:15 glyph (
765+131:13 tight glyph )
766−129:16 tight name weld
766+131:15 glyph [
767−129:21 name xs
767+131:16 tight name item
768−129:24 glyph [
768+131:21 lit ~
769−129:25 tight name item
769+131:22 tight glyph ]
770−129:30 lit ~
770+133:1 DEDENT
771−129:31 tight glyph ]
771+133:1 NEWLINE
772−129:32 tight glyph )
772+133:1 glyph ++
773−131:1 DEDENT
773+133:4 name snoc
774−131:1 DEDENT
774+133:9 glyph |=
775−131:1 NEWLINE
775+133:12 name args
776−131:1 glyph ++
776+133:16 tight glyph =
777−131:4 name flop
777+133:17 tight glyph [
778−131:9 glyph |=
778+133:18 tight glyph (
779−131:12 name xs
779+133:19 tight name list
780−131:14 tight glyph =
780+133:24 tvar A
781−131:15 tight glyph (
781+133:25 tight glyph )
782−131:16 tight name list
782+133:27 tvar A
783−131:21 tvar A
783+133:28 tight glyph ]
784−131:22 tight glyph )
784+134:3 INDENT
785−132:3 INDENT
785+134:3 glyph ?-
786−132:3 glyph ++
786+134:6 name args
787−132:6 name reverse-into
787+135:5 INDENT
788−132:19 glyph |=
788+135:5 glyph [
789−132:22 name args
789+135:6 tight name xs
790−132:26 tight glyph =
790+135:9 name item
791−132:27 tight glyph [
791+135:13 tight glyph ]
792−132:28 tight glyph (
792+135:15 glyph (
793−132:29 tight name list
793+135:16 tight name weld
794−132:34 tvar A
794+135:21 name xs
795−132:35 tight glyph )
795+135:24 glyph [
796−132:37 glyph (
796+135:25 tight name item
797−132:38 tight name list
797+135:30 lit ~
798−132:43 tvar A
798+135:31 tight glyph ]
799−132:44 tight glyph )
799+135:32 tight glyph )
800−132:45 tight glyph ]
800+137:1 DEDENT
801−133:5 INDENT
801+137:1 DEDENT
802−133:5 glyph ?-
802+137:1 NEWLINE
803−133:8 name args
803+137:1 glyph ++
804−134:7 INDENT
804+137:4 name flop
805−134:7 glyph [
805+137:9 glyph |=
806−134:8 tight name rest
806+137:12 name xs
807−134:13 name acc
807+137:14 tight glyph =
808−134:16 tight glyph ]
808+137:15 tight glyph (
809−135:9 INDENT
809+137:16 tight name list
810−135:9 glyph ?-
810+137:21 tvar A
811−135:12 name rest
811+137:22 tight glyph )
812−136:11 INDENT
812+138:3 INDENT
813−136:11 lit ~
813+138:3 glyph ++
814−136:13 name acc
814+138:6 name reverse-into
815−137:11 NEWLINE
815+138:19 glyph |=
816−137:11 glyph [
816+138:22 name args
817−137:12 tight name item
817+138:26 tight glyph =
818−137:17 name more
818+138:27 tight glyph [
819−137:21 tight glyph ]
819+138:28 tight glyph (
820−137:23 glyph (
820+138:29 tight name list
821−137:24 tight name reverse-into
821+138:34 tvar A
822−137:37 name more
822+138:35 tight glyph )
823−137:42 glyph [
823+138:37 glyph (
824−137:43 tight name item
824+138:38 tight name list
825−137:48 name acc
825+138:43 tvar A
826−137:51 tight glyph ]
826+138:44 tight glyph )
827−137:52 tight glyph )
827+138:45 tight glyph ]
828−138:3 DEDENT
828+139:5 INDENT
829−138:3 DEDENT
829+139:5 glyph ?-
830−138:3 DEDENT
830+139:8 name args
831−138:3 DEDENT
831+140:7 INDENT
832−138:3 NEWLINE
832+140:7 glyph [
833−138:3 glyph (
833+140:8 tight name rest
834−138:4 tight name reverse-into
834+140:13 name acc
835−138:17 name xs
835+140:16 tight glyph ]
836−138:20 lit ~
836+141:9 INDENT
837−138:21 tight glyph )
837+141:9 glyph ?-
838−140:1 DEDENT
838+141:12 name rest
839−140:1 NEWLINE
839+142:11 INDENT
840−140:1 glyph ++
840+142:11 lit ~
841−140:4 name drop
841+142:13 name acc
842−140:9 glyph |=
842+143:11 NEWLINE
843−140:12 name maybe
843+143:11 glyph [
844−140:17 tight glyph =
844+143:12 tight name item
845−140:18 tight glyph (
845+143:17 name more
846−140:19 tight name unit
846+143:21 tight glyph ]
847−140:24 tvar A
847+143:23 glyph (
848−140:25 tight glyph )
848+143:24 tight name reverse-into
849−141:3 INDENT
849+143:37 name more
850−141:3 glyph ?-
850+143:42 glyph [
851−141:6 name maybe
851+143:43 tight name item
852−142:5 INDENT
852+143:48 name acc
853−142:5 lit ~
853+143:51 tight glyph ]
854−142:7 lit ~
854+143:52 tight glyph )
855−143:5 NEWLINE
855+144:3 DEDENT
856−143:5 glyph [
856+144:3 DEDENT
857−143:6 tight lit ~
857+144:3 DEDENT
858−143:8 name value
858+144:3 DEDENT
859−143:13 tight glyph ]
859+144:3 NEWLINE
860−143:15 glyph [
860+144:3 glyph (
861−143:16 tight name value
861+144:4 tight name reverse-into
862−143:22 lit ~
862+144:17 name xs
863−143:23 tight glyph ]
863+144:20 lit ~
864−145:1 DEDENT
864+144:21 tight glyph )
865−145:1 DEDENT
865+146:1 DEDENT
866−145:1 NEWLINE
866+146:1 NEWLINE
867−145:1 glyph ++
867+146:1 glyph ++
868−145:4 name bind
868+146:4 name drop
869−145:9 glyph |=
869+146:9 glyph |=
870−145:12 name args
870+146:12 name maybe
871−145:16 tight glyph =
871+146:17 tight glyph =
872−145:17 tight glyph [
872+146:18 tight glyph (
873−145:18 tight glyph (
873+146:19 tight name unit
874−145:19 tight name unit
874+146:24 tvar A
875−145:24 tvar A
875+146:25 tight glyph )
876−145:25 tight glyph )
876+147:3 INDENT
877−145:27 glyph $-(
877+147:3 glyph ^-
878−145:30 tight tvar A
878+147:6 glyph (
879−145:32 tvar B
879+147:7 tight name list
880−145:33 tight glyph )
880+147:12 tvar A
881−145:34 tight glyph ]
881+147:13 tight glyph )
882−146:3 INDENT
882+148:5 INDENT
883−146:3 glyph ?-
883+148:5 glyph ?-
884−146:6 name args
884+148:8 name maybe
885−147:5 INDENT
885+149:7 INDENT
886−147:5 glyph [
886+149:7 lit ~
887−147:6 tight name maybe
888−147:12 name f
889−147:13 tight glyph ]
890−148:7 INDENT
891−148:7 glyph ?-
892−148:10 name maybe
893−149:9 INDENT
894149:9 lit ~
887149:9 lit ~
895−149:11 lit ~
888+150:7 NEWLINE
896−150:9 NEWLINE
889+150:7 glyph [
897−150:9 glyph [
890+150:8 tight lit ~
898−150:10 tight lit ~
891+150:10 name value
899−150:12 name value
892+150:15 tight glyph ]
900−150:17 tight glyph ]
893+150:17 glyph [
901−150:19 glyph `
894+150:18 tight name value
902−150:20 tight glyph (
895+150:24 lit ~
903−150:21 tight name f
896+150:25 tight glyph ]
904−150:23 name value
905−150:28 tight glyph )
906−152:1 DEDENT
907152:1 DEDENT
897152:1 DEDENT
908152:1 DEDENT
898152:1 DEDENT
909152:1 DEDENT
899152:1 DEDENT
910152:1 NEWLINE
900152:1 NEWLINE
911152:1 glyph ++
901152:1 glyph ++
912−152:4 name biff
902+152:4 name bind
913152:9 glyph |=
903152:9 glyph |=
914152:12 name args
904152:12 name args
915152:16 tight glyph =
905152:16 tight glyph =
@@ -920,12 +910,9 @@
920152:25 tight glyph )
910152:25 tight glyph )
921152:27 glyph $-(
911152:27 glyph $-(
922152:30 tight tvar A
912152:30 tight tvar A
923−152:32 glyph (
913+152:32 tvar B
924−152:33 tight name unit
914+152:33 tight glyph )
925−152:38 tvar B
915+152:34 tight glyph ]
926−152:39 tight glyph )
927−152:40 tight glyph )
928−152:41 tight glyph ]
929153:3 INDENT
916153:3 INDENT
930153:3 glyph ?-
917153:3 glyph ?-
931153:6 name args
918153:6 name args
@@ -934,6 +921,11 @@
934154:6 tight name maybe
921154:6 tight name maybe
935154:12 name f
922154:12 name f
936154:13 tight glyph ]
923154:13 tight glyph ]
924+154:15 glyph ^-
925+154:18 glyph (
926+154:19 tight name unit
927+154:24 tvar B
928+154:25 tight glyph )
937155:7 INDENT
929155:7 INDENT
938155:7 glyph ?-
930155:7 glyph ?-
939155:10 name maybe
931155:10 name maybe
@@ -945,17 +937,18 @@
945157:10 tight lit ~
937157:10 tight lit ~
946157:12 name value
938157:12 name value
947157:17 tight glyph ]
939157:17 tight glyph ]
948−157:19 glyph (
940+157:19 glyph `
949−157:20 tight name f
941+157:20 tight glyph (
950−157:22 name value
942+157:21 tight name f
951−157:27 tight glyph )
943+157:23 name value
944+157:28 tight glyph )
952159:1 DEDENT
945159:1 DEDENT
953159:1 DEDENT
946159:1 DEDENT
954159:1 DEDENT
947159:1 DEDENT
955159:1 DEDENT
948159:1 DEDENT
956159:1 NEWLINE
949159:1 NEWLINE
957159:1 glyph ++
950159:1 glyph ++
958−159:4 name both
951+159:4 name biff
959159:9 glyph |=
952159:9 glyph |=
960159:12 name args
953159:12 name args
961159:16 tight glyph =
954159:16 tight glyph =
@@ -964,715 +957,1111 @@
964159:19 tight name unit
957159:19 tight name unit
965159:24 tvar A
958159:24 tvar A
966159:25 tight glyph )
959159:25 tight glyph )
967−159:27 glyph (
960+159:27 glyph $-(
968−159:28 tight name unit
961+159:30 tight tvar A
969−159:33 tvar B
962+159:32 glyph (
970−159:34 tight glyph )
963+159:33 tight name unit
971−159:35 tight glyph ]
964+159:38 tvar B
965+159:39 tight glyph )
966+159:40 tight glyph )
967+159:41 tight glyph ]
972160:3 INDENT
968160:3 INDENT
973160:3 glyph ?-
969160:3 glyph ?-
974160:6 name args
970160:6 name args
975161:5 INDENT
971161:5 INDENT
976161:5 glyph [
972161:5 glyph [
977−161:6 tight name first
973+161:6 tight name maybe
978−161:12 name second
974+161:12 name f
979−161:18 tight glyph ]
975+161:13 tight glyph ]
976+161:15 glyph ^-
977+161:18 glyph (
978+161:19 tight name unit
979+161:24 tvar B
980+161:25 tight glyph )
980162:7 INDENT
981162:7 INDENT
981162:7 glyph ?-
982162:7 glyph ?-
982−162:10 name first
983+162:10 name maybe
983163:9 INDENT
984163:9 INDENT
984163:9 lit ~
985163:9 lit ~
985163:11 lit ~
986163:11 lit ~
986164:9 NEWLINE
987164:9 NEWLINE
987164:9 glyph [
988164:9 glyph [
988164:10 tight lit ~
989164:10 tight lit ~
989−164:12 name a
990+164:12 name value
990−164:13 tight glyph ]
991+164:17 tight glyph ]
991−165:11 INDENT
992+164:19 glyph (
992−165:11 glyph ?-
993+164:20 tight name f
993−165:14 name second
994+164:22 name value
994−166:13 INDENT
995+164:27 tight glyph )
995−166:13 lit ~
996+166:1 DEDENT
996−166:15 lit ~
997+166:1 DEDENT
997−167:13 NEWLINE
998+166:1 DEDENT
998−167:13 glyph [
999+166:1 DEDENT
999−167:14 tight lit ~
1000+166:1 NEWLINE
1000−167:16 name b
1001+166:1 glyph ++
1001−167:17 tight glyph ]
1002+166:4 name both
1002−167:19 glyph `
1003+166:9 glyph |=
1003−167:20 tight glyph [
1004+166:12 name args
1004−167:21 tight name a
1005+166:16 tight glyph =
1005−167:23 name b
1006+166:17 tight glyph [
1006−167:24 tight glyph ]
1007+166:18 tight glyph (
1007−169:1 DEDENT
1008+166:19 tight name unit
1008−169:1 DEDENT
1009+166:24 tvar A
1009−169:1 DEDENT
1010+166:25 tight glyph )
1010−169:1 DEDENT
1011+166:27 glyph (
1011−169:1 DEDENT
1012+166:28 tight name unit
1012−169:1 DEDENT
1013+166:33 tvar B
1013−169:1 NEWLINE
1014+166:34 tight glyph )
1014−169:1 glyph ++
1015+166:35 tight glyph ]
1015−169:4 name clef
1016+167:3 INDENT
1016−169:9 glyph |=
1017+167:3 glyph ?-
1017−169:12 name args
1018+167:6 name args
1018−169:16 tight glyph =
1019+168:5 INDENT
1019−169:17 tight glyph [
1020+168:5 glyph [
1020−169:18 tight glyph (
1021+168:6 tight name first
1021−169:19 tight name unit
1022+168:12 name second
1022−169:24 tvar A
1023+168:18 tight glyph ]
1023−169:25 tight glyph )
1024+168:20 glyph ^-
1024−169:27 glyph (
1025+168:23 glyph (
1025−169:28 tight name unit
1026+168:24 tight name unit
1026−169:33 tvar B
1027+168:29 glyph [
1027−169:34 tight glyph )
1028+168:30 tight tvar A
1028−169:36 glyph $-(
1029+168:32 tvar B
1029−169:39 tight glyph [
1030+168:33 tight glyph ]
1030−169:40 tight tvar A
1031+168:34 tight glyph )
1031−169:42 tvar B
1032+169:7 INDENT
1032−169:43 tight glyph ]
1033+169:7 glyph ?-
1033−169:45 glyph (
1034+169:10 name first
1034−169:46 tight name unit
1035+170:9 INDENT
1035−169:51 tvar C
1036+170:9 lit ~
1036−169:52 tight glyph )
1037+170:11 lit ~
1037−169:53 tight glyph )
1038+171:9 NEWLINE
1038−169:54 tight glyph ]
1039+171:9 glyph [
1039−170:3 INDENT
1040+171:10 tight lit ~
1040−170:3 glyph ?-
1041+171:12 name a
1041−170:6 name args
1042+171:13 tight glyph ]
1042−171:5 INDENT
1043+172:11 INDENT
1043−171:5 glyph [
1044+172:11 glyph ?-
1044−171:6 tight name first
1045+172:14 name second
1045−171:12 name second
1046+173:13 INDENT
1046−171:19 name combine
1047+173:13 lit ~
1047−171:26 tight glyph ]
1048+173:15 lit ~
1048−172:7 INDENT
1049+174:13 NEWLINE
1049−172:7 glyph ?-
1050+174:13 glyph [
1050−172:10 name first
1051+174:14 tight lit ~
1051−173:9 INDENT
1052+174:16 name b
1052−173:9 lit ~
1053+174:17 tight glyph ]
1053−173:11 lit ~
1054+174:19 glyph `
1054−174:9 NEWLINE
1055+174:20 tight glyph [
1055−174:9 glyph [
1056+174:21 tight name a
1056−174:10 tight lit ~
1057+174:23 name b
1057−174:12 name a
1058+174:24 tight glyph ]
1058−174:13 tight glyph ]
1059+176:1 DEDENT
1059−175:11 INDENT
1060+176:1 DEDENT
1060−175:11 glyph ?-
1061+176:1 DEDENT
1061−175:14 name second
1062+176:1 DEDENT
1062−176:13 INDENT
1063+176:1 DEDENT
1063−176:13 lit ~
1064+176:1 DEDENT
1064−176:15 lit ~
1065+176:1 NEWLINE
1065−177:13 NEWLINE
1066+176:1 glyph ++
1066−177:13 glyph [
1067+176:4 name clap
1067−177:14 tight lit ~
1068+176:9 glyph |=
1068−177:16 name b
1069+176:12 name args
1069−177:17 tight glyph ]
1070+176:16 tight glyph =
1070−177:19 glyph (
1071+176:17 tight glyph [
1071−177:20 tight name combine
1072+176:18 tight glyph (
1072−177:28 name a
1073+176:19 tight name unit
1073−177:30 name b
1074+176:24 tvar A
1074−177:31 tight glyph )
1075+176:25 tight glyph )
1075−179:1 DEDENT
1076+176:27 glyph (
1076−179:1 DEDENT
1077+176:28 tight name unit
1077−179:1 DEDENT
1078+176:33 tvar A
1078−179:1 DEDENT
1079+176:34 tight glyph )
1079−179:1 DEDENT
1080+176:36 glyph $-(
1080−179:1 DEDENT
1081+176:39 tight glyph [
1081−179:1 NEWLINE
1082+176:40 tight tvar A
1082−179:1 glyph ++
1083+176:42 tvar A
1083−179:4 name skim
1084+176:43 tight glyph ]
1084−179:9 glyph |=
1085+176:45 tvar A
1085−179:12 name args
1086+176:46 tight glyph )
1086−179:16 tight glyph =
1087+176:47 tight glyph ]
1087−179:17 tight glyph [
1088+177:3 INDENT
1088−179:18 tight glyph (
1089+177:3 glyph ?-
1089−179:19 tight name list
1090+177:6 name args
1090−179:24 tvar A
1091+178:5 INDENT
1091−179:25 tight glyph )
1092+178:5 glyph [
1092−179:27 glyph $-(
1093+178:6 tight name first
1093−179:30 tight tvar A
1094+178:12 name second
1094−179:32 glyph ?
1095+178:19 name combine
1095−179:33 tight glyph )
1096+178:26 tight glyph ]
1096−179:34 tight glyph ]
1097+178:28 glyph ^-
1097−180:3 INDENT
1098+178:31 glyph (
1098−180:3 glyph ?-
1099+178:32 tight name unit
1099−180:6 name args
1100+178:37 tvar A
1100−181:5 INDENT
1101+178:38 tight glyph )
1101−181:5 glyph [
1102+179:7 INDENT
1102−181:6 tight name xs
1103+179:7 glyph ?-
1103−181:9 name predicate
1104+179:10 name first
1104−181:18 tight glyph ]
1105+180:9 INDENT
1105−182:7 INDENT
1106+180:9 lit ~
1106−182:7 glyph ?-
1107+180:11 name second
1107−182:10 name xs
1108+181:9 NEWLINE
1108−183:9 INDENT
1109+181:9 glyph [
1109−183:9 lit ~
1110+181:10 tight lit ~
1110−183:11 lit ~
1111+181:12 name a
1111−184:9 NEWLINE
1112+181:13 tight glyph ]
1112−184:9 glyph [
1113+182:11 INDENT
1113−184:10 tight name item
1114+182:11 glyph ?-
1114−184:15 name rest
1115+182:14 name second
1115−184:19 tight glyph ]
1116+183:13 INDENT
1116−185:11 INDENT
1117+183:13 lit ~
1117−185:11 glyph ?-
1118+183:15 name first
1118−185:14 glyph (
1119+184:13 NEWLINE
1119−185:15 tight name predicate
1120+184:13 glyph [
1120−185:25 name item
1121+184:14 tight lit ~
1121−185:29 tight glyph )
1122+184:16 name b
1122−186:13 INDENT
1123+184:17 tight glyph ]
1123−186:13 lit %.y
1124+184:19 glyph `
1124−186:17 glyph [
1125+184:20 tight glyph (
1125−186:18 tight name item
1126+184:21 tight name combine
1126−186:23 glyph (
1127+184:29 name a
1127−186:24 tight name skim
1128+184:31 name b
1128−186:29 name rest
1129+184:32 tight glyph )
1129−186:34 name predicate
1130+186:1 DEDENT
1130−186:43 tight glyph )
1131+186:1 DEDENT
1131−186:44 tight glyph ]
1132+186:1 DEDENT
1132−187:13 NEWLINE
1133+186:1 DEDENT
1133−187:13 lit %.n
1134+186:1 DEDENT
1134−187:17 glyph (
1135+186:1 DEDENT
1135−187:18 tight name skim
1136+186:1 NEWLINE
1136−187:23 name rest
1137+186:1 glyph ++
1137−187:28 name predicate
1138+186:4 name clef
1138−187:37 tight glyph )
1139+186:9 glyph |=
1139−189:1 DEDENT
1140+186:12 name args
1140−189:1 DEDENT
1141+186:16 tight glyph =
1141−189:1 DEDENT
1142+186:17 tight glyph [
1142−189:1 DEDENT
1143+186:18 tight glyph (
1143−189:1 DEDENT
1144+186:19 tight name unit
1144−189:1 DEDENT
1145+186:24 tvar A
1145−189:1 NEWLINE
1146+186:25 tight glyph )
1146−189:1 glyph ++
1147+186:27 glyph (
1147−189:4 name skip
1148+186:28 tight name unit
1148−189:9 glyph |=
1149+186:33 tvar B
1149−189:12 name args
1150+186:34 tight glyph )
1150−189:16 tight glyph =
1151+186:36 glyph $-(
1151−189:17 tight glyph [
1152+186:39 tight glyph [
1152−189:18 tight glyph (
1153+186:40 tight tvar A
1153−189:19 tight name list
1154+186:42 tvar B
1154−189:24 tvar A
1155+186:43 tight glyph ]
1155−189:25 tight glyph )
1156+186:45 glyph (
1156−189:27 glyph $-(
1157+186:46 tight name unit
1157−189:30 tight tvar A
1158+186:51 tvar C
1158−189:32 glyph ?
1159+186:52 tight glyph )
1159−189:33 tight glyph )
1160+186:53 tight glyph )
1160−189:34 tight glyph ]
1161+186:54 tight glyph ]
1161−190:3 INDENT
1162+187:3 INDENT
1162−190:3 glyph ?-
1163+187:3 glyph ?-
1163−190:6 name args
1164+187:6 name args
1164−191:5 INDENT
1165+188:5 INDENT
1165−191:5 glyph [
1166+188:5 glyph [
1166−191:6 tight name xs
1167+188:6 tight name first
1167−191:9 name predicate
1168+188:12 name second
1168−191:18 tight glyph ]
1169+188:19 name combine
1169−192:7 INDENT
1170+188:26 tight glyph ]
1170−192:7 glyph ?-
1171+188:28 glyph ^-
1171−192:10 name xs
1172+188:31 glyph (
1172−193:9 INDENT
1173+188:32 tight name unit
1173−193:9 lit ~
1174+188:37 tvar C
1174−193:11 lit ~
1175+188:38 tight glyph )
1175−194:9 NEWLINE
1176+189:7 INDENT
1176−194:9 glyph [
1177+189:7 glyph ?-
1177−194:10 tight name item
1178+189:10 name first
1178−194:15 name rest
1179+190:9 INDENT
1179−194:19 tight glyph ]
1180+190:9 lit ~
1180−195:11 INDENT
1181+190:11 lit ~
1181−195:11 glyph ?-
1182+191:9 NEWLINE
1182−195:14 glyph (
1183+191:9 glyph [
1183−195:15 tight name predicate
1184+191:10 tight lit ~
1184−195:25 name item
1185+191:12 name a
1185−195:29 tight glyph )
1186+191:13 tight glyph ]
1186−196:13 INDENT
1187+192:11 INDENT
1187−196:13 lit %.y
1188+192:11 glyph ?-
1188−196:17 glyph (
1189+192:14 name second
1189−196:18 tight name skip
1190+193:13 INDENT
1190−196:23 name rest
1191+193:13 lit ~
1191−196:28 name predicate
1192+193:15 lit ~
1192−196:37 tight glyph )
1193+194:13 NEWLINE
1193−197:13 NEWLINE
1194+194:13 glyph [
1194−197:13 lit %.n
1195+194:14 tight lit ~
1195−197:17 glyph [
1196+194:16 name b
1196−197:18 tight name item
1197+194:17 tight glyph ]
1197−197:23 glyph (
1198+194:19 glyph (
1198−197:24 tight name skip
1199+194:20 tight name combine
1199−197:29 name rest
1200+194:28 name a
1200−197:34 name predicate
1201+194:30 name b
1201−197:43 tight glyph )
1202+194:31 tight glyph )
1202−197:44 tight glyph ]
1203+196:1 DEDENT
1203−199:1 DEDENT
1204+196:1 DEDENT
1204−199:1 DEDENT
1205+196:1 DEDENT
1205−199:1 DEDENT
1206+196:1 DEDENT
1206−199:1 DEDENT
1207+196:1 DEDENT
1207−199:1 DEDENT
1208+196:1 DEDENT
1208−199:1 DEDENT
1209+196:1 NEWLINE
1209−199:1 NEWLINE
1210+196:1 glyph ++
1210−199:1 glyph ++
1211+196:4 name skim
1211−199:4 name levy
1212+196:9 glyph |=
1212−199:9 glyph |=
1213+196:12 name args
1213−199:12 name args
1214+196:16 tight glyph =
1214−199:16 tight glyph =
1215+196:17 tight glyph [
1215−199:17 tight glyph [
1216+196:18 tight glyph (
1216−199:18 tight glyph (
1217+196:19 tight name list
1217−199:19 tight name list
1218+196:24 tvar A
1218−199:24 tvar A
1219+196:25 tight glyph )
1219−199:25 tight glyph )
1220+196:27 glyph $-(
1220−199:27 glyph $-(
1221+196:30 tight tvar A
1221−199:30 tight tvar A
1222+196:32 glyph ?
1222−199:32 glyph ?
1223+196:33 tight glyph )
1223−199:33 tight glyph )
1224+196:34 tight glyph ]
1224−199:34 tight glyph ]
1225+197:3 INDENT
1225−200:3 INDENT
1226+197:3 glyph ?-
1226−200:3 glyph ?-
1227+197:6 name args
1227−200:6 name args
1228+198:5 INDENT
1228−201:5 INDENT
1229+198:5 glyph [
1229−201:5 glyph [
1230+198:6 tight name xs
1230−201:6 tight name xs
1231+198:9 name predicate
1231−201:9 name predicate
1232+198:18 tight glyph ]
1232−201:18 tight glyph ]
1233+198:20 glyph ^-
1233−202:7 INDENT
1234+198:23 glyph (
1234−202:7 glyph ?-
1235+198:24 tight name list
1235−202:10 name xs
1236+198:29 tvar A
1236−203:9 INDENT
1237+198:30 tight glyph )
1237−203:9 lit ~
1238+199:9 INDENT
1238−203:11 lit %.y
1239+199:9 glyph ?-
1239−204:9 NEWLINE
1240+199:12 name xs
1240−204:9 glyph [
1241+200:11 INDENT
1241−204:10 tight name item
1242+200:11 lit ~
1242−204:15 name rest
1243+200:13 lit ~
1243−204:19 tight glyph ]
1244+201:11 NEWLINE
1244−205:11 INDENT
1245+201:11 glyph [
1245−205:11 glyph ?-
1246+201:12 tight name item
1246−205:14 glyph (
1247+201:17 name rest
1247−205:15 tight name predicate
1248+201:21 tight glyph ]
1248−205:25 name item
1249+202:13 INDENT
1249−205:29 tight glyph )
1250+202:13 glyph ?-
1250−206:13 INDENT
1251+202:16 glyph (
1251−206:13 lit %.y
1252+202:17 tight name predicate
1252−206:17 glyph (
1253+202:27 name item
1253−206:18 tight name levy
1254+202:31 tight glyph )
1254−206:23 name rest
1255+203:15 INDENT
1255−206:28 name predicate
1256+203:15 lit %.y
1256−206:37 tight glyph )
1257+203:19 glyph [
1257−207:13 NEWLINE
1258+203:20 tight name item
1258−207:13 lit %.n
1259+203:25 glyph (
1259−207:17 lit %.n
1260+203:26 tight name skim
1260−209:1 DEDENT
1261+203:31 name rest
1261−209:1 DEDENT
1262+203:36 name predicate
1262−209:1 DEDENT
1263+203:45 tight glyph )
1263−209:1 DEDENT
1264+203:46 tight glyph ]
1264−209:1 DEDENT
1265+204:15 NEWLINE
1265−209:1 DEDENT
1266+204:15 lit %.n
1266−209:1 NEWLINE
1267+204:19 glyph (
1267−209:1 glyph ++
1268+204:20 tight name skim
1268−209:4 name lien
1269+204:25 name rest
1269−209:9 glyph |=
1270+204:30 name predicate
1270−209:12 name args
1271+204:39 tight glyph )
1271−209:16 tight glyph =
1272+206:1 DEDENT
1272−209:17 tight glyph [
1273+206:1 DEDENT
1273−209:18 tight glyph (
1274+206:1 DEDENT
1274−209:19 tight name list
1275+206:1 DEDENT
1275−209:24 tvar A
1276+206:1 DEDENT
1276−209:25 tight glyph )
1277+206:1 DEDENT
1277−209:27 glyph $-(
1278+206:1 NEWLINE
1278−209:30 tight tvar A
1279+206:1 glyph ++
1279−209:32 glyph ?
1280+206:4 name skip
1280−209:33 tight glyph )
1281+206:9 glyph |=
1281−209:34 tight glyph ]
1282+206:12 name args
1282−210:3 INDENT
1283+206:16 tight glyph =
1283−210:3 glyph ?-
1284+206:17 tight glyph [
1284−210:6 name args
1285+206:18 tight glyph (
1285−211:5 INDENT
1286+206:19 tight name list
1286−211:5 glyph [
1287+206:24 tvar A
1287−211:6 tight name xs
1288+206:25 tight glyph )
1288−211:9 name predicate
1289+206:27 glyph $-(
1289−211:18 tight glyph ]
1290+206:30 tight tvar A
1290−212:7 INDENT
1291+206:32 glyph ?
1291−212:7 glyph ?-
1292+206:33 tight glyph )
1292−212:10 name xs
1293+206:34 tight glyph ]
1293−213:9 INDENT
1294+207:3 INDENT
1294−213:9 lit ~
1295+207:3 glyph ?-
1295−213:11 lit %.n
1296+207:6 name args
1296−214:9 NEWLINE
1297+208:5 INDENT
1297−214:9 glyph [
1298+208:5 glyph [
1298−214:10 tight name item
1299+208:6 tight name xs
1299−214:15 name rest
1300+208:9 name predicate
1300−214:19 tight glyph ]
1301+208:18 tight glyph ]
1301−215:11 INDENT
1302+208:20 glyph ^-
1302−215:11 glyph ?-
1303+208:23 glyph (
1303−215:14 glyph (
1304+208:24 tight name list
1304−215:15 tight name predicate
1305+208:29 tvar A
1305−215:25 name item
1306+208:30 tight glyph )
1306−215:29 tight glyph )
1307+209:9 INDENT
1307−216:13 INDENT
1308+209:9 glyph ?-
1308−216:13 lit %.y
1309+209:12 name xs
1309−216:17 lit %.y
1310+210:11 INDENT
1310−217:13 NEWLINE
1311+210:11 lit ~
1311−217:13 lit %.n
1312+210:13 lit ~
1312−217:17 glyph (
1313+211:11 NEWLINE
1313−217:18 tight name lien
1314+211:11 glyph [
1314−217:23 name rest
1315+211:12 tight name item
1315−217:28 name predicate
1316+211:17 name rest
1316−217:37 tight glyph )
1317+211:21 tight glyph ]
1317−219:1 DEDENT
1318+212:13 INDENT
1318−219:1 DEDENT
1319+212:13 glyph ?-
1319−219:1 DEDENT
1320+212:16 glyph (
1320−219:1 DEDENT
1321+212:17 tight name predicate
1321−219:1 DEDENT
1322+212:27 name item
1322−219:1 DEDENT
1323+212:31 tight glyph )
1323−219:1 NEWLINE
1324+213:15 INDENT
1324−219:1 glyph ++
1325+213:15 lit %.y
1325−219:4 name roll
1326+213:19 glyph (
1326−219:9 glyph |=
1327+213:20 tight name skip
1327−219:12 name args
1328+213:25 name rest
1328−219:16 tight glyph =
1329+213:30 name predicate
1329−219:17 tight glyph [
1330+213:39 tight glyph )
1330−219:18 tight glyph (
1331+214:15 NEWLINE
1331−219:19 tight name list
1332+214:15 lit %.n
1332−219:24 tvar A
1333+214:19 glyph [
1333−219:25 tight glyph )
1334+214:20 tight name item
1334−219:27 tvar B
1335+214:25 glyph (
1335−219:29 glyph $-(
1336+214:26 tight name skip
1336−219:32 tight glyph [
1337+214:31 name rest
1337−219:33 tight tvar A
1338+214:36 name predicate
1338−219:35 tvar B
1339+214:45 tight glyph )
1339−219:36 tight glyph ]
1340+214:46 tight glyph ]
1340−219:38 tvar B
1341+216:1 DEDENT
1341−219:39 tight glyph )
1342+216:1 DEDENT
1342−219:40 tight glyph ]
1343+216:1 DEDENT
1343−220:3 INDENT
1344+216:1 DEDENT
1344−220:3 glyph ?-
1345+216:1 DEDENT
1345−220:6 name args
1346+216:1 DEDENT
1346−221:5 INDENT
1347+216:1 NEWLINE
1347−221:5 glyph [
1348+216:1 glyph ++
1348−221:6 tight name xs
1349+216:4 name levy
1349−221:9 name start
1350+216:9 glyph |=
1350−221:15 name combine
1351+216:12 name args
1351−221:22 tight glyph ]
1352+216:16 tight glyph =
1352−222:7 INDENT
1353+216:17 tight glyph [
1353−222:7 glyph ?-
1354+216:18 tight glyph (
1354−222:10 name xs
1355+216:19 tight name list
1355−223:9 INDENT
1356+216:24 tvar A
1356−223:9 lit ~
1357+216:25 tight glyph )
1357−223:11 name start
1358+216:27 glyph $-(
1358−224:9 NEWLINE
1359+216:30 tight tvar A
1359−224:9 glyph [
1360+216:32 glyph ?
1360−224:10 tight name item
1361+216:33 tight glyph )
1361−224:15 name rest
1362+216:34 tight glyph ]
1362−224:19 tight glyph ]
1363+217:3 INDENT
1363−224:21 glyph (
1364+217:3 glyph ^-
1364−224:22 tight name roll
1365+217:6 glyph ?
1365−224:27 name rest
1366+218:5 INDENT
1366−224:32 glyph (
1367+218:5 glyph ?-
1367−224:33 tight name combine
1368+218:8 name args
1368−224:41 name item
1369+219:7 INDENT
1369−224:46 name start
1370+219:7 glyph [
1370−224:51 tight glyph )
1371+219:8 tight name xs
1371−224:53 name combine
1372+219:11 name predicate
1372−224:60 tight glyph )
1373+219:20 tight glyph ]
1373−226:1 DEDENT
1374+220:9 INDENT
1374−226:1 DEDENT
1375+220:9 glyph ?-
1375−226:1 DEDENT
1376+220:12 name xs
1376−226:1 DEDENT
1377+221:11 INDENT
1377−226:1 NEWLINE
1378+221:11 lit ~
1378−226:1 glyph ++
1379+221:13 lit %.y
1379−226:4 name reel
1380+222:11 NEWLINE
1380−226:9 glyph |=
1381+222:11 glyph [
1381−226:12 name args
1382+222:12 tight name item
1382−226:16 tight glyph =
1383+222:17 name rest
1383−226:17 tight glyph [
1384+222:21 tight glyph ]
1384−226:18 tight glyph (
1385+223:13 INDENT
1385−226:19 tight name list
1386+223:13 glyph ?-
1386−226:24 tvar A
1387+223:16 glyph (
1387−226:25 tight glyph )
1388+223:17 tight name predicate
1388−226:27 tvar B
1389+223:27 name item
1389−226:29 glyph $-(
1390+223:31 tight glyph )
1390−226:32 tight glyph [
1391+224:15 INDENT
1391−226:33 tight tvar A
1392+224:15 lit %.y
1392−226:35 tvar B
1393+224:19 glyph (
1393−226:36 tight glyph ]
1394+224:20 tight name levy
1394−226:38 tvar B
1395+224:25 name rest
1395−226:39 tight glyph )
1396+224:30 name predicate
1396−226:40 tight glyph ]
1397+224:39 tight glyph )
1397−227:3 INDENT
1398+225:15 NEWLINE
1398−227:3 glyph ?-
1399+225:15 lit %.n
1399−227:6 name args
1400+225:19 lit %.n
1400−228:5 INDENT
1401+227:1 DEDENT
1401−228:5 glyph [
1402+227:1 DEDENT
1402−228:6 tight name xs
1403+227:1 DEDENT
1403−228:9 name start
1404+227:1 DEDENT
1404−228:15 name combine
1405+227:1 DEDENT
1405−228:22 tight glyph ]
1406+227:1 DEDENT
1406−229:7 INDENT
1407+227:1 DEDENT
1407−229:7 glyph ?-
1408+227:1 NEWLINE
1408−229:10 name xs
1409+227:1 glyph ++
1409−230:9 INDENT
1410+227:4 name lien
1410−230:9 lit ~
1411+227:9 glyph |=
1411−230:11 name start
1412+227:12 name args
1412−231:9 NEWLINE
1413+227:16 tight glyph =
1413−231:9 glyph [
1414+227:17 tight glyph [
1414−231:10 tight name item
1415+227:18 tight glyph (
1415−231:15 name rest
1416+227:19 tight name list
1416−231:19 tight glyph ]
1417+227:24 tvar A
1417−231:21 glyph (
1418+227:25 tight glyph )
1418−231:22 tight name combine
1419+227:27 glyph $-(
1419−231:30 name item
1420+227:30 tight tvar A
1420−231:35 glyph (
1421+227:32 glyph ?
1421−231:36 tight name reel
1422+227:33 tight glyph )
1422−231:41 name rest
1423+227:34 tight glyph ]
1423−231:46 name start
1424+228:3 INDENT
1424−231:52 name combine
1425+228:3 glyph ^-
1425−231:59 tight glyph )
1426+228:6 glyph ?
1426−231:60 tight glyph )
1427+229:5 INDENT
1427−233:1 DEDENT
1428+229:5 glyph ?-
1428−233:1 DEDENT
1429+229:8 name args
1429−233:1 DEDENT
1430+230:7 INDENT
1430−233:1 DEDENT
1431+230:7 glyph [
1431−233:1 NEWLINE
1432+230:8 tight name xs
1432−233:1 glyph ++
1433+230:11 name predicate
1433−233:4 name flit
1434+230:20 tight glyph ]
1434−233:9 glyph |=
1435+231:9 INDENT
1435−233:12 name predicate
1436+231:9 glyph ?-
1436−233:21 tight glyph =
1437+231:12 name xs
1437−233:22 tight glyph $-(
1438+232:11 INDENT
1438−233:25 tight tvar A
1439+232:11 lit ~
1439−233:27 glyph ?
1440+232:13 lit %.n
1440−233:28 tight glyph )
1441+233:11 NEWLINE
1441−234:3 INDENT
1442+233:11 glyph [
1442−234:3 glyph |=
1443+233:12 tight name item
1443−234:6 name value
1444+233:17 name rest
1444−234:11 tight glyph =
1445+233:21 tight glyph ]
1445−234:12 tight tvar A
1446+234:13 INDENT
1446−235:5 INDENT
1447+234:13 glyph ?-
1447−235:5 glyph ?-
1448+234:16 glyph (
1448−235:8 glyph (
1449+234:17 tight name predicate
1449−235:9 tight name predicate
1450+234:27 name item
1450−235:19 name value
1451+234:31 tight glyph )
1451−235:24 tight glyph )
1452+235:15 INDENT
1452−236:7 INDENT
1453+235:15 lit %.y
1453−236:7 lit %.y
1454+235:19 lit %.y
1454−236:11 glyph `
1455+236:15 NEWLINE
1455−236:12 tight name value
1456+236:15 lit %.n
1456−237:7 NEWLINE
1457+236:19 glyph (
1457−237:7 lit %.n
1458+236:20 tight name lien
1458−237:11 lit ~
1459+236:25 name rest
1459−239:1 DEDENT
1460+236:30 name predicate
1460−239:1 DEDENT
1461+236:39 tight glyph )
1461−239:1 DEDENT
1462+238:1 DEDENT
1462−239:1 NEWLINE
1463+238:1 DEDENT
1463−239:1 glyph ++
1464+238:1 DEDENT
1464−239:4 name murn
1465+238:1 DEDENT
1465−239:9 glyph |=
1466+238:1 DEDENT
1466−239:12 name args
1467+238:1 DEDENT
1467−239:16 tight glyph =
1468+238:1 DEDENT
1468−239:17 tight glyph [
1469+238:1 NEWLINE
1469−239:18 tight glyph (
1470+238:1 glyph ++
1470−239:19 tight name list
1471+238:4 name roll
1471−239:24 tvar A
1472+238:9 glyph |=
1472−239:25 tight glyph )
1473+238:12 name args
1473−239:27 glyph $-(
1474+238:16 tight glyph =
1474−239:30 tight tvar A
1475+238:17 tight glyph [
1475−239:32 glyph (
1476+238:18 tight glyph (
1476−239:33 tight name unit
1477+238:19 tight name list
1477−239:38 tvar B
1478+238:24 tvar A
1478−239:39 tight glyph )
1479+238:25 tight glyph )
1479−239:40 tight glyph )
1480+238:27 tvar B
1480−239:41 tight glyph ]
1481+238:29 glyph $-(
1481−240:3 INDENT
1482+238:32 tight glyph [
1482−240:3 glyph ?-
1483+238:33 tight tvar A
1483−240:6 name args
1484+238:35 tvar B
1484−241:5 INDENT
1485+238:36 tight glyph ]
1485−241:5 glyph [
1486+238:38 tvar B
1486−241:6 tight name xs
1487+238:39 tight glyph )
1487−241:9 name f
1488+238:40 tight glyph ]
1488−241:10 tight glyph ]
1489+239:3 INDENT
1489−242:7 INDENT
1490+239:3 glyph ?-
1490−242:7 glyph ?-
1491+239:6 name args
1491−242:10 name xs
1492+240:5 INDENT
1492−243:9 INDENT
1493+240:5 glyph [
1493−243:9 lit ~
1494+240:6 tight name xs
1494−243:11 lit ~
1495+240:9 name start
1495−244:9 NEWLINE
1496+240:15 name combine
1496−244:9 glyph [
1497+240:22 tight glyph ]
1497−244:10 tight name item
1498+241:7 INDENT
1498−244:15 name rest
1499+241:7 glyph ?-
1499−244:19 tight glyph ]
1500+241:10 name xs
1500−245:11 INDENT
1501+242:9 INDENT
1501−245:11 glyph ?-
1502+242:9 lit ~
1502−245:14 glyph (
1503+242:11 name start
1503−245:15 tight name f
1504+243:9 NEWLINE
1504−245:17 name item
1505+243:9 glyph [
1505−245:21 tight glyph )
1506+243:10 tight name item
1506−246:13 INDENT
1507+243:15 name rest
1507−246:13 lit ~
1508+243:19 tight glyph ]
1508−246:15 glyph (
1509+243:21 glyph (
1509−246:16 tight name murn
1510+243:22 tight name roll
1510−246:21 name rest
1511+243:27 name rest
1511−246:26 name f
1512+243:32 glyph (
1512−246:27 tight glyph )
1513+243:33 tight name combine
1513−247:13 NEWLINE
1514+243:41 name item
1514−247:13 glyph [
1515+243:46 name start
1515−247:14 tight lit ~
1516+243:51 tight glyph )
1516−247:16 name value
1517+243:53 name combine
1517−247:21 tight glyph ]
1518+243:60 tight glyph )
1518−247:23 glyph [
1519+245:1 DEDENT
1519−247:24 tight name value
1520+245:1 DEDENT
1520−247:30 glyph (
1521+245:1 DEDENT
1521−247:31 tight name murn
1522+245:1 DEDENT
1522−247:36 name rest
1523+245:1 NEWLINE
1523−247:41 name f
1524+245:1 glyph ++
1524−247:42 tight glyph )
1525+245:4 name reel
1525−247:43 tight glyph ]
1526+245:9 glyph |=
1526−249:1 DEDENT
1527+245:12 name args
1527−249:1 DEDENT
1528+245:16 tight glyph =
1528−249:1 DEDENT
1529+245:17 tight glyph [
1529−249:1 DEDENT
1530+245:18 tight glyph (
1530−249:1 DEDENT
1531+245:19 tight name list
1531−249:1 DEDENT
1532+245:24 tvar A
1532−249:1 NEWLINE
1533+245:25 tight glyph )
1533−249:1 glyph ++
1534+245:27 tvar B
1534−249:4 name join
1535+245:29 glyph $-(
1535−249:9 glyph |=
1536+245:32 tight glyph [
1536−249:12 name args
1537+245:33 tight tvar A
1537−249:16 tight glyph =
1538+245:35 tvar B
1538−249:17 tight glyph [
1539+245:36 tight glyph ]
1539−249:18 tight tvar A
1540+245:38 tvar B
1540−249:20 glyph (
1541+245:39 tight glyph )
1541−249:21 tight name list
1542+245:40 tight glyph ]
1542−249:26 tvar A
1543+246:3 INDENT
1543−249:27 tight glyph )
1544+246:3 glyph ?-
1544−249:28 tight glyph ]
1545+246:6 name args
1545−250:3 INDENT
1546+247:5 INDENT
1546−250:3 glyph ?-
1547+247:5 glyph [
1547−250:6 name args
1548+247:6 tight name xs
1548−251:5 INDENT
1549+247:9 name start
1549−251:5 glyph [
1550+247:15 name combine
1550−251:6 tight name separator
1551+247:22 tight glyph ]
1551−251:16 name xs
1552+248:7 INDENT
1552−251:18 tight glyph ]
1553+248:7 glyph ?-
1553−252:7 INDENT
1554+248:10 name xs
1554−252:7 glyph ?-
1555+249:9 INDENT
1555−252:10 name xs
1556+249:9 lit ~
1556−253:9 INDENT
1557+249:11 name start
1557−253:9 lit ~
1558+250:9 NEWLINE
1558−253:11 lit ~
1559+250:9 glyph [
1559−254:9 NEWLINE
1560+250:10 tight name item
1560−254:9 glyph [
1561+250:15 name rest
1561−254:10 tight name item
1562+250:19 tight glyph ]
1562−254:15 name rest
1563+250:21 glyph (
1563−254:19 tight glyph ]
1564+250:22 tight name combine
1564−255:11 INDENT
1565+250:30 name item
1565−255:11 glyph ?-
1566+250:35 glyph (
1566−255:14 name rest
1567+250:36 tight name reel
1567−256:13 INDENT
1568+250:41 name rest
1568−256:13 lit ~
1569+250:46 name start
1569−256:15 glyph [
1570+250:52 name combine
1570−256:16 tight name item
1571+250:59 tight glyph )
1571−256:21 lit ~
1572+250:60 tight glyph )
1572−256:22 tight glyph ]
1573+252:1 DEDENT
1573−257:13 NEWLINE
1574+252:1 DEDENT
1574−257:13 glyph [
1575+252:1 DEDENT
1575−257:14 tight name next
1576+252:1 DEDENT
1576−257:19 name more
1577+252:1 NEWLINE
1577−257:23 tight glyph ]
1578+252:1 glyph ++
1578−257:25 glyph [
1579+252:4 name flit
1579−257:26 tight name item
1580+252:9 glyph |=
1580−257:31 glyph [
1581+252:12 name predicate
1581−257:32 tight name separator
1582+252:21 tight glyph =
1582−257:42 glyph (
1583+252:22 tight glyph $-(
1583−257:43 tight name join
1584+252:25 tight tvar A
1584−257:48 name separator
1585+252:27 glyph ?
1585−257:58 name rest
1586+252:28 tight glyph )
1586−257:62 tight glyph )
1587+253:3 INDENT
1587−257:63 tight glyph ]
1588+253:3 glyph |=
1588−257:64 tight glyph ]
1589+253:6 name value
1589−259:1 DEDENT
1590+253:11 tight glyph =
1590−259:1 DEDENT
1591+253:12 tight tvar A
1592+254:5 INDENT
1593+254:5 glyph ^-
1594+254:8 glyph (
1595+254:9 tight name unit
1596+254:14 tvar A
1597+254:15 tight glyph )
1598+255:7 INDENT
1599+255:7 glyph ?-
1600+255:10 glyph (
1601+255:11 tight name predicate
1602+255:21 name value
1603+255:26 tight glyph )
1604+256:9 INDENT
1605+256:9 lit %.y
1606+256:13 glyph `
1607+256:14 tight name value
1608+257:9 NEWLINE
1609+257:9 lit %.n
1610+257:13 lit ~
1591259:1 DEDENT
1611259:1 DEDENT
1592259:1 DEDENT
1612259:1 DEDENT
1593259:1 DEDENT
1613259:1 DEDENT
1594259:1 DEDENT
1614259:1 DEDENT
1595259:1 NEWLINE
1615259:1 NEWLINE
1596259:1 glyph ++
1616259:1 glyph ++
1597−259:4 name snip
1617+259:4 name murn
1598259:9 glyph |=
1618259:9 glyph |=
1599−259:12 name xs
1619+259:12 name args
1600−259:14 tight glyph =
1620+259:16 tight glyph =
1601−259:15 tight glyph (
1621+259:17 tight glyph [
1602−259:16 tight name list
1622+259:18 tight glyph (
1603−259:21 tvar A
1623+259:19 tight name list
1604−259:22 tight glyph )
1624+259:24 tvar A
1625+259:25 tight glyph )
1626+259:27 glyph $-(
1627+259:30 tight tvar A
1628+259:32 glyph (
1629+259:33 tight name unit
1630+259:38 tvar B
1631+259:39 tight glyph )
1632+259:40 tight glyph )
1633+259:41 tight glyph ]
1605260:3 INDENT
1634260:3 INDENT
1606260:3 glyph ?-
1635260:3 glyph ?-
1607−260:6 name xs
1636+260:6 name args
1608261:5 INDENT
1637261:5 INDENT
1609−261:5 lit ~
1638+261:5 glyph [
1610−261:7 lit ~
1639+261:6 tight name xs
1611−262:5 NEWLINE
1640+261:9 name f
1612−262:5 glyph [
1641+261:10 tight glyph ]
1613−262:6 tight name item
1642+261:12 glyph ^-
1614−262:11 name rest
1643+261:15 glyph (
1615−262:15 tight glyph ]
1644+261:16 tight name list
1616−263:7 INDENT
1645+261:21 tvar B
1617−263:7 glyph ?-
1646+261:22 tight glyph )
1618−263:10 name rest
1647+262:9 INDENT
1619−264:9 INDENT
1648+262:9 glyph ?-
1620−264:9 lit ~
1649+262:12 name xs
1621−264:11 lit ~
1650+263:11 INDENT
1622−265:9 NEWLINE
1651+263:11 lit ~
1623−265:9 glyph [
1652+263:13 lit ~
1624−265:10 tight name next
1653+264:11 NEWLINE
1625−265:15 name more
1654+264:11 glyph [
1626−265:19 tight glyph ]
1655+264:12 tight name item
1627−265:21 glyph [
1656+264:17 name rest
1628−265:22 tight name item
1657+264:21 tight glyph ]
1629−265:27 glyph (
1658+265:13 INDENT
1630−265:28 tight name snip
1659+265:13 glyph ?-
1631−265:33 name rest
1660+265:16 glyph (
1632−265:37 tight glyph )
1661+265:17 tight name f
1633−265:38 tight glyph ]
1662+265:19 name item
1634−267:1 DEDENT
1663+265:23 tight glyph )
1635−267:1 DEDENT
1664+266:15 INDENT
1636−267:1 DEDENT
1665+266:15 lit ~
1637−267:1 DEDENT
1666+266:17 glyph (
1638−267:1 NEWLINE
1667+266:18 tight name murn
1639−267:1 glyph ++
1668+266:23 name rest
1640−267:4 name rear
1669+266:28 name f
1641−267:9 glyph |=
1670+266:29 tight glyph )
1642−267:12 name xs
1671+267:15 NEWLINE
1643−267:14 tight glyph =
1672+267:15 glyph [
1644−267:15 tight glyph (
1673+267:16 tight lit ~
1645−267:16 tight name list
1674+267:18 name value
1646−267:21 tvar A
1675+267:23 tight glyph ]
1647−267:22 tight glyph )
1676+267:25 glyph [
1648−268:3 INDENT
1677+267:26 tight name value
1649−268:3 glyph ?-
1678+267:32 glyph (
1650−268:6 name xs
1679+267:33 tight name murn
1651−269:5 INDENT
1680+267:38 name rest
1652−269:5 lit ~
1681+267:43 name f
1653−269:7 glyph !!
1682+267:44 tight glyph )
1654−270:5 NEWLINE
1683+267:45 tight glyph ]
1655−270:5 glyph [
1684+269:1 DEDENT
1656−270:6 tight name item
1685+269:1 DEDENT
1657−270:11 name rest
1686+269:1 DEDENT
1658−270:15 tight glyph ]
1687+269:1 DEDENT
1659−271:7 INDENT
1688+269:1 DEDENT
1660−271:7 glyph ?-
1689+269:1 DEDENT
1661−271:10 name rest
1690+269:1 NEWLINE
1691+269:1 glyph ++
1692+269:4 name join
1693+269:9 glyph |=
1694+269:12 name args
1695+269:16 tight glyph =
1696+269:17 tight glyph [
1697+269:18 tight tvar A
1698+269:20 glyph (
1699+269:21 tight name list
1700+269:26 tvar A
1701+269:27 tight glyph )
1702+269:28 tight glyph ]
1703+270:3 INDENT
1704+270:3 glyph ?-
1705+270:6 name args
1706+271:5 INDENT
1707+271:5 glyph [
1708+271:6 tight name separator
1709+271:16 name xs
1710+271:18 tight glyph ]
1711+271:20 glyph ^-
1712+271:23 glyph (
1713+271:24 tight name list
1714+271:29 tvar A
1715+271:30 tight glyph )
1662272:9 INDENT
1716272:9 INDENT
1663−272:9 lit ~
1717+272:9 glyph ?-
1664−272:11 name item
1718+272:12 name xs
1665−273:9 NEWLINE
1719+273:11 INDENT
1666−273:9 glyph [
1720+273:11 lit ~
1667−273:10 tight name next
1721+273:13 lit ~
1668−273:15 name more
1722+274:11 NEWLINE
1669−273:19 tight glyph ]
1723+274:11 glyph [
1670−273:21 glyph (
1724+274:12 tight name item
1671−273:22 tight name rear
1725+274:17 name rest
1672−273:27 name rest
1726+274:21 tight glyph ]
1673−273:31 tight glyph )
1727+275:13 INDENT
1674−273:32 DEDENT
1728+275:13 glyph ?-
1675−273:32 DEDENT
1729+275:16 name rest
1676−273:32 DEDENT
1730+276:15 INDENT
1677−273:32 DEDENT
1731+276:15 lit ~
1678−273:32 NEWLINE
1732+276:17 glyph [
1733+276:18 tight name item
1734+276:23 lit ~
1735+276:24 tight glyph ]
1736+277:15 NEWLINE
1737+277:15 glyph [
1738+277:16 tight name next
1739+277:21 name more
1740+277:25 tight glyph ]
1741+277:27 glyph [
1742+277:28 tight name item
1743+277:33 glyph [
1744+277:34 tight name separator
1745+277:44 glyph (
1746+277:45 tight name join
1747+277:50 name separator
1748+277:60 name rest
1749+277:64 tight glyph )
1750+277:65 tight glyph ]
1751+277:66 tight glyph ]
1752+279:1 DEDENT
1753+279:1 DEDENT
1754+279:1 DEDENT
1755+279:1 DEDENT
1756+279:1 DEDENT
1757+279:1 DEDENT
1758+279:1 NEWLINE
1759+279:1 glyph ++
1760+279:4 name snip
1761+279:9 glyph |=
1762+279:12 name xs
1763+279:14 tight glyph =
1764+279:15 tight glyph (
1765+279:16 tight name list
1766+279:21 tvar A
1767+279:22 tight glyph )
1768+280:3 INDENT
1769+280:3 glyph ^-
1770+280:6 glyph (
1771+280:7 tight name list
1772+280:12 tvar A
1773+280:13 tight glyph )
1774+281:5 INDENT
1775+281:5 glyph ?-
1776+281:8 name xs
1777+282:7 INDENT
1778+282:7 lit ~
1779+282:9 lit ~
1780+283:7 NEWLINE
1781+283:7 glyph [
1782+283:8 tight name item
1783+283:13 name rest
1784+283:17 tight glyph ]
1785+284:9 INDENT
1786+284:9 glyph ?-
1787+284:12 name rest
1788+285:11 INDENT
1789+285:11 lit ~
1790+285:13 lit ~
1791+286:11 NEWLINE
1792+286:11 glyph [
1793+286:12 tight name next
1794+286:17 name more
1795+286:21 tight glyph ]
1796+286:23 glyph [
1797+286:24 tight name item
1798+286:29 glyph (
1799+286:30 tight name snip
1800+286:35 name rest
1801+286:39 tight glyph )
1802+286:40 tight glyph ]
1803+288:1 DEDENT
1804+288:1 DEDENT
1805+288:1 DEDENT
1806+288:1 DEDENT
1807+288:1 DEDENT
1808+288:1 NEWLINE
1809+288:1 glyph ++
1810+288:4 name rear
1811+288:9 glyph |=
1812+288:12 name xs
1813+288:14 tight glyph =
1814+288:15 tight glyph (
1815+288:16 tight name list
1816+288:21 tvar A
1817+288:22 tight glyph )
1818+289:3 INDENT
1819+289:3 glyph ?-
1820+289:6 name xs
1821+290:5 INDENT
1822+290:5 lit ~
1823+290:7 glyph !!
1824+291:5 NEWLINE
1825+291:5 glyph [
1826+291:6 tight name item
1827+291:11 name rest
1828+291:15 tight glyph ]
1829+292:7 INDENT
1830+292:7 glyph ?-
1831+292:10 name rest
1832+293:9 INDENT
1833+293:9 lit ~
1834+293:11 name item
1835+294:9 NEWLINE
1836+294:9 glyph [
1837+294:10 tight name next
1838+294:15 name more
1839+294:19 tight glyph ]
1840+294:21 glyph (
1841+294:22 tight name rear
1842+294:27 name rest
1843+294:31 tight glyph )
1844+296:1 DEDENT
1845+296:1 DEDENT
1846+296:1 DEDENT
1847+296:1 DEDENT
1848+296:1 NEWLINE
1849+296:1 glyph ++
1850+296:4 name cork
1851+296:9 glyph |=
1852+296:12 name gates
1853+296:17 tight glyph =
1854+296:18 tight glyph [
1855+296:19 tight glyph $-(
1856+296:22 tight tvar A
1857+296:24 tvar B
1858+296:25 tight glyph )
1859+296:27 glyph $-(
1860+296:30 tight tvar B
1861+296:32 tvar C
1862+296:33 tight glyph )
1863+296:34 tight glyph ]
1864+297:3 INDENT
1865+297:3 glyph ?-
1866+297:6 name gates
1867+298:5 INDENT
1868+298:5 glyph [
1869+298:6 tight name f
1870+298:8 name g
1871+298:9 tight glyph ]
1872+298:11 glyph |=
1873+298:14 name x
1874+298:15 tight glyph =
1875+298:16 tight tvar A
1876+298:18 glyph (
1877+298:19 tight name g
1878+298:21 glyph (
1879+298:22 tight name f
1880+298:24 name x
1881+298:25 tight glyph )
1882+298:26 tight glyph )
1883+300:1 DEDENT
1884+300:1 DEDENT
1885+300:1 NEWLINE
1886+300:1 glyph ++
1887+300:4 name corl
1888+300:9 glyph |=
1889+300:12 name gates
1890+300:17 tight glyph =
1891+300:18 tight glyph [
1892+300:19 tight glyph $-(
1893+300:22 tight tvar B
1894+300:24 tvar C
1895+300:25 tight glyph )
1896+300:27 glyph $-(
1897+300:30 tight tvar A
1898+300:32 tvar B
1899+300:33 tight glyph )
1900+300:34 tight glyph ]
1901+301:3 INDENT
1902+301:3 glyph ?-
1903+301:6 name gates
1904+302:5 INDENT
1905+302:5 glyph [
1906+302:6 tight name f
1907+302:8 name g
1908+302:9 tight glyph ]
1909+302:11 glyph |=
1910+302:14 name x
1911+302:15 tight glyph =
1912+302:16 tight tvar A
1913+302:18 glyph (
1914+302:19 tight name f
1915+302:21 glyph (
1916+302:22 tight name g
1917+302:24 name x
1918+302:25 tight glyph )
1919+302:26 tight glyph )
1920+304:1 DEDENT
1921+304:1 DEDENT
1922+304:1 NEWLINE
1923+304:1 glyph ++
1924+304:4 name cury
1925+304:9 glyph |=
1926+304:12 name args
1927+304:16 tight glyph =
1928+304:17 tight glyph [
1929+304:18 tight glyph $-(
1930+304:21 tight glyph [
1931+304:22 tight tvar A
1932+304:24 tvar B
1933+304:25 tight glyph ]
1934+304:27 tvar C
1935+304:28 tight glyph )
1936+304:30 tvar A
1937+304:31 tight glyph ]
1938+305:3 INDENT
1939+305:3 glyph ?-
1940+305:6 name args
1941+306:5 INDENT
1942+306:5 glyph [
1943+306:6 tight name f
1944+306:8 name a
1945+306:9 tight glyph ]
1946+306:11 glyph |=
1947+306:14 name b
1948+306:15 tight glyph =
1949+306:16 tight tvar B
1950+306:18 glyph (
1951+306:19 tight name f
1952+306:21 name a
1953+306:23 name b
1954+306:24 tight glyph )
1955+308:1 DEDENT
1956+308:1 DEDENT
1957+308:1 NEWLINE
1958+308:1 glyph ++
1959+308:4 name curr
1960+308:9 glyph |=
1961+308:12 name args
1962+308:16 tight glyph =
1963+308:17 tight glyph [
1964+308:18 tight glyph $-(
1965+308:21 tight glyph [
1966+308:22 tight tvar A
1967+308:24 tvar B
1968+308:25 tight glyph ]
1969+308:27 tvar C
1970+308:28 tight glyph )
1971+308:30 tvar B
1972+308:31 tight glyph ]
1973+309:3 INDENT
1974+309:3 glyph ?-
1975+309:6 name args
1976+310:5 INDENT
1977+310:5 glyph [
1978+310:6 tight name f
1979+310:8 name b
1980+310:9 tight glyph ]
1981+310:11 glyph |=
1982+310:14 name a
1983+310:15 tight glyph =
1984+310:16 tight tvar A
1985+310:18 glyph (
1986+310:19 tight name f
1987+310:21 name a
1988+310:23 name b
1989+310:24 tight glyph )
1990+312:1 DEDENT
1991+312:1 DEDENT
1992+312:1 NEWLINE
1993+312:1 glyph +$
1994+312:4 name cmd
1995+312:8 glyph |$
1996+312:11 glyph [
1997+312:12 tight tvar M
1998+312:13 tight glyph ]
1999+313:3 INDENT
2000+313:3 glyph [
2001+313:4 tight lit %poke
2002+313:10 name p
2003+313:11 tight glyph =
2004+313:12 tight name poke
2005+313:17 name reply
2006+313:22 tight glyph =
2007+313:23 tight glyph $-(
2008+313:26 tight glyph (
2009+313:27 tight name unit
2010+313:32 aura @t
2011+313:34 tight glyph )
2012+313:36 tvar M
2013+313:37 tight glyph )
2014+313:38 tight glyph ]
2015+314:3 NEWLINE
2016+314:3 glyph [
2017+314:4 tight lit %go
2018+314:8 name url
2019+314:11 tight glyph =
2020+314:12 tight aura @t
2021+314:14 tight glyph ]
2022+315:3 NEWLINE
2023+315:3 glyph [
2024+315:4 tight lit %wait
2025+315:10 name gap
2026+315:13 tight glyph =
2027+315:14 tight aura @dr
2028+315:18 name msg
2029+315:21 tight glyph =
2030+315:22 tight tvar M
2031+315:23 tight glyph ]
2032+316:3 NEWLINE
2033+316:3 glyph [
2034+316:4 tight lit %now
2035+316:9 name reply
2036+316:14 tight glyph =
2037+316:15 tight glyph $-(
2038+316:18 tight aura @da
2039+316:22 tvar M
2040+316:23 tight glyph )
2041+316:24 tight glyph ]
2042+317:3 NEWLINE
2043+317:3 glyph [
2044+317:4 tight lit %who
2045+317:9 name reply
2046+317:14 tight glyph =
2047+317:15 tight glyph $-(
2048+317:18 tight aura @p
2049+317:21 tvar M
2050+317:22 tight glyph )
2051+317:23 tight glyph ]
2052+319:1 DEDENT
2053+319:1 NEWLINE
2054+319:1 glyph ++
2055+319:4 name gth
2056+319:8 glyph |=
2057+319:11 name args
2058+319:15 tight glyph =
2059+319:16 tight glyph [
2060+319:17 tight tvar A
2061+319:19 tvar A
2062+319:20 tight glyph ]
2063+319:22 glyph (
2064+319:23 tight wing gth-atom.internal
2065+319:41 name args
2066+319:45 tight glyph )
2067+319:46 NEWLINE
tests/golden/prelude-unit-list-transforms/tree.txt+859−687
@@ -1,19 +1,11 @@
1(module
1(module
2− (value 2:1 same
2+ (jibb 1:1 internal /lib/jibb/internal)
3− (gate 2:9
3+ (mold 2:1 poke (ref 2:9 poke.internal))
4− (face 2:12 x (tvar 2:14 A))
4+ (value 6:1 same
5− (wing 2:16 x)))
5+ (gate 6:9
6− (value 4:1 head
6+ (face 6:12 x (tvar 6:14 A))
7− (gate 4:9
7+ (wing 6:16 x)))
8− (face 4:12 p
8+ (value 8:1 head
9− (cell 4:14 (tvar 4:15 A) (tvar 4:17 B)))
10− (body 5:3
11− (branch 5:3
12− (wing 5:6 p)
13− (arm 6:5
14− (cell 6:5 (bind 6:6 a) (bind 6:8 b))
15− (wing 6:11 a))))))
16− (value 8:1 tail
17 (gate 8:9
9 (gate 8:9
18 (face 8:12 p
10 (face 8:12 p
19 (cell 8:14 (tvar 8:15 A) (tvar 8:17 B)))
11 (cell 8:14 (tvar 8:15 A) (tvar 8:17 B)))
@@ -22,708 +14,888 @@
22 (wing 9:6 p)
14 (wing 9:6 p)
23 (arm 10:5
15 (arm 10:5
24 (cell 10:5 (bind 10:6 a) (bind 10:8 b))
16 (cell 10:5 (bind 10:6 a) (bind 10:8 b))
25− (wing 10:11 b))))))
17+ (wing 10:11 a))))))
26− (value 12:1 not
18+ (value 12:1 tail
27− (gate 12:8
19+ (gate 12:9
28− (face 12:11 b (flag 12:13))
20+ (face 12:12 p
21+ (cell 12:14 (tvar 12:15 A) (tvar 12:17 B)))
29 (body 13:3
22 (body 13:3
30 (branch 13:3
23 (branch 13:3
31− (wing 13:6 b)
24+ (wing 13:6 p)
32− (arm 14:5 (lit 14:5 %.y) (lit 14:9 %.n))
25+ (arm 14:5
33− (arm 15:5 (lit 15:5 %.n) (lit 15:9 %.y))))))
26+ (cell 14:5 (bind 14:6 a) (bind 14:8 b))
34− (mold 17:1 list
27+ (wing 14:11 b))))))
35− (generic 17:9 A
28+ (value 16:1 not
36− (union 18:3
29+ (gate 16:8
37− (const 18:3 ~)
30+ (face 16:11 b (flag 16:13))
38− (cell 19:3
31+ (body 17:3
39− (face 19:4 i (tvar 19:6 A))
32+ (branch 17:3
40− (face 19:8 t
33+ (wing 17:6 b)
41− (apply 19:10 list (tvar 19:16 A)))))))
34+ (arm 18:5 (lit 18:5 %.y) (lit 18:9 %.n))
42− (mold 21:1 unit
35+ (arm 19:5 (lit 19:5 %.n) (lit 19:9 %.y))))))
36+ (mold 21:1 list
43 (generic 21:9 A
37 (generic 21:9 A
44 (union 22:3
38 (union 22:3
45 (const 22:3 ~)
39 (const 22:3 ~)
46 (cell 23:3
40 (cell 23:3
47− (const 23:4 ~)
41+ (face 23:4 i (tvar 23:6 A))
48− (face 23:6 u (tvar 23:8 A))))))
42+ (face 23:8 t
49− (value 25:1 fall
43+ (apply 23:10 list (tvar 23:16 A)))))))
50− (gate 25:9
44+ (mold 25:1 unit
51− (face 25:12 args
45+ (generic 25:9 A
52− (cell 25:17
46+ (union 26:3
53− (apply 25:18 unit (tvar 25:24 A))
47+ (const 26:3 ~)
54− (tvar 25:27 A)))
48+ (cell 27:3
55− (body 26:3
49+ (const 27:4 ~)
56− (branch 26:3
50+ (face 27:6 u (tvar 27:8 A))))))
57− (wing 26:6 args)
51+ (value 29:1 fall
58− (arm 27:5
52+ (gate 29:9
59− (cell 27:5 (bind 27:6 maybe) (bind 27:12 fallback))
53+ (face 29:12 args
60− (body 28:7
54+ (cell 29:17
61− (branch 28:7
55+ (apply 29:18 unit (tvar 29:24 A))
62− (wing 28:10 maybe)
56+ (tvar 29:27 A)))
63− (arm 29:9 (lit 29:9 ~) (wing 29:11 fallback))
57+ (body 30:3
64− (arm 30:9
58+ (branch 30:3
65− (cell 30:9 (lit 30:10 ~) (bind 30:12 value))
59+ (wing 30:6 args)
66− (wing 30:19 value)))))))))
60+ (arm 31:5
67− (value 32:1 need
61+ (cell 31:5 (bind 31:6 maybe) (bind 31:12 fallback))
68− (gate 32:9
62+ (body 32:7
69− (face 32:12 maybe
63+ (branch 32:7
70− (apply 32:18 unit (tvar 32:24 A)))
64+ (wing 32:10 maybe)
71− (body 33:3
65+ (arm 33:9 (lit 33:9 ~) (wing 33:11 fallback))
72− (branch 33:3
66+ (arm 34:9
73− (wing 33:6 maybe)
67+ (cell 34:9 (lit 34:10 ~) (bind 34:12 value))
74− (arm 34:5 (lit 34:5 ~) (crash 34:7))
68+ (wing 34:19 value)))))))))
75− (arm 35:5
69+ (value 36:1 need
76− (cell 35:5 (lit 35:6 ~) (bind 35:8 value))
70+ (gate 36:9
77− (wing 35:15 value))))))
71+ (face 36:12 maybe
78− (value 37:1 weld
72+ (apply 36:18 unit (tvar 36:24 A)))
79− (gate 37:9
73+ (body 37:3
80− (face 37:12 args
74+ (branch 37:3
81− (cell 37:17
75+ (wing 37:6 maybe)
82− (apply 37:18 list (tvar 37:24 A))
76+ (arm 38:5 (lit 38:5 ~) (crash 38:7))
83− (apply 37:27 list (tvar 37:33 A))))
84− (body 38:3
85− (branch 38:3
86− (wing 38:6 args)
87 (arm 39:5
77 (arm 39:5
88− (cell 39:5 (bind 39:6 xs) (bind 39:9 ys))
78+ (cell 39:5 (lit 39:6 ~) (bind 39:8 value))
89− (body 40:7
79+ (wing 39:15 value))))))
90− (branch 40:7
80+ (value 41:1 weld
91− (wing 40:10 xs)
81+ (gate 41:9
92− (arm 41:9 (lit 41:9 ~) (wing 41:11 ys))
82+ (face 41:12 args
93− (arm 42:9
83+ (cell 41:17
94− (cell 42:9 (bind 42:10 item) (bind 42:15 rest))
84+ (apply 41:18 list (tvar 41:24 A))
95− (tuple 42:21
85+ (apply 41:27 list (tvar 41:33 A))))
96− (wing 42:22 item)
86+ (body 42:3
97− (group 42:27
87+ (branch 42:3
98− (call 42:28 (wing 42:28 weld) (wing 42:33 rest) (wing 42:38 ys))))))))))))
88+ (wing 42:6 args)
99− (value 44:1 turn
89+ (arm 43:5
100− (gate 44:9
90+ (cell 43:5 (bind 43:6 xs) (bind 43:9 ys))
101− (face 44:12 args
91+ (body 44:7
102− (cell 44:17
92+ (cast 44:7
103− (apply 44:18 list (tvar 44:24 A))
93+ (apply 44:10 list (tvar 44:16 A))
104− (fn 44:27 (tvar 44:30 A) (tvar 44:32 B))))
94+ (body 45:9
105− (body 45:3
95+ (branch 45:9
106− (branch 45:3
96+ (wing 45:12 xs)
107− (wing 45:6 args)
97+ (arm 46:11 (lit 46:11 ~) (wing 46:13 ys))
108− (arm 46:5
98+ (arm 47:11
109− (cell 46:5 (bind 46:6 xs) (bind 46:9 f))
99+ (cell 47:11 (bind 47:12 item) (bind 47:17 rest))
110− (body 47:7
100+ (tuple 47:23
111− (branch 47:7
101+ (wing 47:24 item)
112− (wing 47:10 xs)
102+ (group 47:29
113− (arm 48:9 (lit 48:9 ~) (lit 48:11 ~))
103+ (call 47:30 (wing 47:30 weld) (wing 47:35 rest) (wing 47:40 ys))))))))))))))
114− (arm 49:9
104+ (value 49:1 turn
115− (cell 49:9 (bind 49:10 item) (bind 49:15 rest))
105+ (gate 49:9
116− (tuple 49:21
106+ (face 49:12 args
117− (group 49:22
107+ (cell 49:17
118− (call 49:23 (wing 49:23 f) (wing 49:25 item)))
108+ (apply 49:18 list (tvar 49:24 A))
119− (group 49:31
109+ (fn 49:27 (tvar 49:30 A) (tvar 49:32 B))))
120− (call 49:32 (wing 49:32 turn) (wing 49:37 rest) (wing 49:42 f))))))))))))
110+ (body 50:3
121− (mold 51:1 dime
111+ (branch 50:3
122− (cell 51:9
112+ (wing 50:6 args)
123− (face 51:10 p (aura 51:12 @ta))
113+ (arm 51:5
124− (face 51:16 q (aura 51:18 @))))
114+ (cell 51:5 (bind 51:6 xs) (bind 51:9 f))
125− (mold 53:1 hair
115+ (body 52:7
126− (cell 53:9
116+ (cast 52:7
127− (face 53:10 p (aura 53:12 @ud))
117+ (apply 52:10 list (tvar 52:16 B))
128− (face 53:16 q (aura 53:18 @ud))))
118+ (body 53:9
129− (mold 55:1 pint
119+ (branch 53:9
130− (cell 55:9
120+ (wing 53:12 xs)
131− (face 55:10 p
121+ (arm 54:11 (lit 54:11 ~) (lit 54:13 ~))
132− (cell 55:12
122+ (arm 55:11
133− (face 55:13 p (aura 55:15 @))
123+ (cell 55:11 (bind 55:12 item) (bind 55:17 rest))
134− (face 55:17 q (aura 55:19 @))))
124+ (tuple 55:23
135− (face 55:22 q
125+ (group 55:24
136− (cell 55:24
126+ (call 55:25 (wing 55:25 f) (wing 55:27 item)))
137− (face 55:25 p (aura 55:27 @))
127+ (group 55:33
138− (face 55:29 q (aura 55:31 @))))))
128+ (call 55:34 (wing 55:34 turn) (wing 55:39 rest) (wing 55:44 f))))))))))))))
139− (mold 57:1 coin
129+ (mold 57:1 dime
140− (union 58:3
130+ (cell 57:9
141− (cell 58:3
131+ (face 57:10 p (aura 57:12 @ta))
142− (const 58:4 %$)
132+ (face 57:16 q (aura 57:18 @))))
143− (face 58:7 p (ref 58:9 dime)))
133+ (mold 59:1 hair
144− (cell 59:3
134+ (cell 59:9
145− (const 59:4 %blob)
135+ (face 59:10 p (aura 59:12 @ud))
146− (face 59:10 p (noun 59:12)))
136+ (face 59:16 q (aura 59:18 @ud))))
147− (cell 60:3
137+ (mold 61:1 pint
148− (const 60:4 %many)
138+ (cell 61:9
149− (face 60:10 p
139+ (face 61:10 p
150− (apply 60:12 list (ref 60:18 coin))))))
140+ (cell 61:12
151− (mold 62:1 pair
141+ (face 61:13 p (aura 61:15 @))
152− (generic 62:9 A B
142+ (face 61:17 q (aura 61:19 @))))
153− (cell 62:18
143+ (face 61:22 q
154− (face 62:19 p (tvar 62:21 A))
144+ (cell 61:24
155− (face 62:23 q (tvar 62:25 B)))))
145+ (face 61:25 p (aura 61:27 @))
156− (mold 64:1 trel
146+ (face 61:29 q (aura 61:31 @))))))
157− (generic 64:9 A B C
147+ (mold 63:1 coin
158− (cell 64:20
148+ (union 64:3
159− (face 64:21 p (tvar 64:23 A))
149+ (cell 64:3
160− (face 64:25 q (tvar 64:27 B))
150+ (const 64:4 %$)
161− (face 64:29 r (tvar 64:31 C)))))
151+ (face 64:7 p (ref 64:9 dime)))
162− (mold 66:1 qual
152+ (cell 65:3
163− (generic 66:9 A B C D
153+ (const 65:4 %blob)
164− (cell 66:22
154+ (face 65:10 p (noun 65:12)))
165− (face 66:23 p (tvar 66:25 A))
155+ (cell 66:3
166− (face 66:27 q (tvar 66:29 B))
156+ (const 66:4 %many)
167− (face 66:31 r (tvar 66:33 C))
157+ (face 66:10 p
168− (face 66:35 s (tvar 66:37 D)))))
158+ (apply 66:12 list (ref 66:18 coin))))))
169− (mold 68:1 cord (aura 68:9 @t))
159+ (mold 68:1 pair
170− (mold 70:1 knot (aura 70:9 @ta))
160+ (generic 68:9 A B
171− (mold 72:1 tape
161+ (cell 68:18
172− (apply 72:9 list (aura 72:15 @tD)))
162+ (face 68:19 p (tvar 68:21 A))
173− (mold 74:1 path
163+ (face 68:23 q (tvar 68:25 B)))))
174− (apply 74:9 list (ref 74:15 knot)))
164+ (mold 70:1 trel
175− (mold 76:1 tank
165+ (generic 70:9 A B C
176− (union 77:3
166+ (cell 70:20
177− (ref 77:3 cord)
167+ (face 70:21 p (tvar 70:23 A))
178− (cell 78:3
168+ (face 70:25 q (tvar 70:27 B))
179− (const 78:4 %leaf)
169+ (face 70:29 r (tvar 70:31 C)))))
180− (face 78:10 p (ref 78:12 tape)))
170+ (mold 72:1 qual
181− (cell 79:3
171+ (generic 72:9 A B C D
182− (const 79:4 %palm)
172+ (cell 72:22
183− (face 79:10 p
173+ (face 72:23 p (tvar 72:25 A))
184− (apply 79:12 qual (ref 79:18 tape) (ref 79:23 tape) (ref 79:28 tape) (ref 79:33 tape)))
174+ (face 72:27 q (tvar 72:29 B))
185− (face 79:39 q
175+ (face 72:31 r (tvar 72:33 C))
186− (apply 79:41 list (ref 79:47 tank))))
176+ (face 72:35 s (tvar 72:37 D)))))
187− (cell 80:3
177+ (mold 74:1 cord (aura 74:9 @t))
188− (const 80:4 %rose)
178+ (mold 76:1 knot (aura 76:9 @ta))
189− (face 80:10 p
179+ (mold 78:1 tape
190− (apply 80:12 trel (ref 80:18 tape) (ref 80:23 tape) (ref 80:28 tape)))
180+ (apply 78:9 list (aura 78:15 @tD)))
191− (face 80:34 q
181+ (mold 80:1 path
192− (apply 80:36 list (ref 80:42 tank))))))
182+ (apply 80:9 list (ref 80:15 knot)))
193− (mold 82:1 nail
183+ (mold 82:1 tank
194− (cell 82:9
184+ (union 83:3
195− (face 82:10 p (ref 82:12 hair))
185+ (ref 83:3 cord)
196− (face 82:17 q (ref 82:19 tape))))
186+ (cell 84:3
197− (mold 84:1 edge
187+ (const 84:4 %leaf)
198− (cell 84:9
188+ (face 84:10 p (ref 84:12 tape)))
199− (face 84:10 p (ref 84:12 hair))
189+ (cell 85:3
200− (face 84:17 q
190+ (const 85:4 %palm)
201− (apply 84:19 unit
191+ (face 85:10 p
202− (cell 84:25
192+ (apply 85:12 qual (ref 85:18 tape) (ref 85:23 tape) (ref 85:28 tape) (ref 85:33 tape)))
203− (face 84:26 p (noun 84:28))
193+ (face 85:39 q
204− (face 84:30 q (ref 84:32 nail)))))))
194+ (apply 85:41 list (ref 85:47 tank))))
205− (mold 86:1 rule
195+ (cell 86:3
206− (fn 86:9 (ref 86:12 nail) (ref 86:17 edge)))
196+ (const 86:4 %rose)
207− (mold 88:1 spot
197+ (face 86:10 p
198+ (apply 86:12 trel (ref 86:18 tape) (ref 86:23 tape) (ref 86:28 tape)))
199+ (face 86:34 q
200+ (apply 86:36 list (ref 86:42 tank))))))
201+ (mold 88:1 nail
208 (cell 88:9
202 (cell 88:9
209− (face 88:10 p (ref 88:12 path))
203+ (face 88:10 p (ref 88:12 hair))
210− (face 88:17 q (ref 88:19 pint))))
204+ (face 88:17 q (ref 88:19 tape))))
211− (mold 90:1 toon
205+ (mold 90:1 edge
212− (union 91:3
206+ (cell 90:9
213− (cell 91:3
207+ (face 90:10 p (ref 90:12 hair))
214− (const 91:4 %0)
208+ (face 90:17 q
215− (face 91:7 p (noun 91:9)))
209+ (apply 90:19 unit
216− (cell 92:3
210+ (cell 90:25
217− (const 92:4 %1)
211+ (face 90:26 p (noun 90:28))
218− (face 92:7 p (noun 92:9)))
212+ (face 90:30 q (ref 90:32 nail)))))))
219− (cell 93:3
213+ (mold 92:1 rule
220− (const 93:4 %2)
214+ (fn 92:9 (ref 92:12 nail) (ref 92:17 edge)))
221− (face 93:7 p
215+ (mold 94:1 spot
222− (apply 93:9 list (ref 93:15 tank))))))
216+ (cell 94:9
223− (mold 95:1 like
217+ (face 94:10 p (ref 94:12 path))
224− (generic 95:9 A
218+ (face 94:17 q (ref 94:19 pint))))
225− (cell 95:16
219+ (mold 96:1 toon
226− (face 95:17 p (ref 95:19 hair))
220+ (union 97:3
227− (face 95:24 q
221+ (cell 97:3
228− (apply 95:26 unit
222+ (const 97:4 %0)
229− (cell 95:32
223+ (face 97:7 p (noun 97:9)))
230− (face 95:33 p (tvar 95:35 A))
224+ (cell 98:3
231− (face 95:37 q (ref 95:39 nail))))))))
225+ (const 98:4 %1)
232− (value 97:1 wonk
226+ (face 98:7 p (noun 98:9)))
233− (gate 97:9
227+ (cell 99:3
234− (face 97:12 veq
228+ (const 99:4 %2)
235− (apply 97:16 like (tvar 97:22 A)))
229+ (face 99:7 p
236− (body 98:3
230+ (apply 99:9 list (ref 99:15 tank))))))
237− (branch 98:3
231+ (mold 101:1 like
238− (wing 98:6 q.veq)
232+ (generic 101:9 A
239− (arm 99:5 (lit 99:5 ~) (crash 99:7))
233+ (cell 101:16
240− (arm 100:5
234+ (face 101:17 p (ref 101:19 hair))
241− (cell 100:5 (lit 100:6 ~) (bind 100:8 product))
235+ (face 101:24 q
242− (wing 100:17 p.product))))))
236+ (apply 101:26 unit
243− (mold 102:1 lone
237+ (cell 101:32
244− (generic 102:9 A
238+ (face 101:33 p (tvar 101:35 A))
245− (cell 102:16
239+ (face 101:37 q (ref 101:39 nail))))))))
246− (face 102:17 p (tvar 102:19 A)))))
240+ (value 103:1 wonk
247− (mold 104:1 lest
241+ (gate 103:9
248− (generic 104:9 A
242+ (face 103:12 veq
249− (cell 104:16
243+ (apply 103:16 like (tvar 103:22 A)))
250− (face 104:17 i (tvar 104:19 A))
244+ (body 104:3
251− (face 104:21 t
245+ (branch 104:3
252− (apply 104:23 list (tvar 104:29 A))))))
246+ (wing 104:6 q.veq)
253− (mold 106:1 pole
247+ (arm 105:5 (lit 105:5 ~) (crash 105:7))
254− (generic 106:9 A
248+ (arm 106:5
255− (union 107:3
249+ (cell 106:5 (lit 106:6 ~) (bind 106:8 product))
256− (const 107:3 ~)
250+ (wing 106:17 p.product))))))
257− (cell 108:3
251+ (mold 108:1 lone
258− (tvar 108:4 A)
252+ (generic 108:9 A
259− (apply 108:6 pole (tvar 108:12 A))))))
253+ (cell 108:16
260− (mold 110:1 quip
254+ (face 108:17 p (tvar 108:19 A)))))
261− (generic 110:9 A B
255+ (mold 110:1 lest
262− (cell 110:18
256+ (generic 110:9 A
263− (apply 110:19 list (tvar 110:25 A))
257+ (cell 110:16
264− (tvar 110:28 B))))
258+ (face 110:17 i (tvar 110:19 A))
265− (mold 112:1 tree
259+ (face 110:21 t
260+ (apply 110:23 list (tvar 110:29 A))))))
261+ (mold 112:1 pole
266 (generic 112:9 A
262 (generic 112:9 A
267 (union 113:3
263 (union 113:3
268 (const 113:3 ~)
264 (const 113:3 ~)
269 (cell 114:3
265 (cell 114:3
270− (face 114:4 n (tvar 114:6 A))
266+ (tvar 114:4 A)
271− (face 114:8 l
267+ (apply 114:6 pole (tvar 114:12 A))))))
272− (apply 114:10 tree (tvar 114:16 A)))
268+ (mold 116:1 quip
273− (face 114:19 r
274− (apply 114:21 tree (tvar 114:27 A)))))))
275− (mold 116:1 each
276 (generic 116:9 A B
269 (generic 116:9 A B
277− (union 117:3
270+ (cell 116:18
278− (cell 117:3
271+ (apply 116:19 list (tvar 116:25 A))
279− (const 117:4 %|)
272+ (tvar 116:28 B))))
280− (face 117:7 p (tvar 117:9 B)))
273+ (mold 118:1 tree
281− (cell 118:3
274+ (generic 118:9 A
282− (const 118:4 %&)
275+ (union 119:3
283− (face 118:7 p (tvar 118:9 A))))))
276+ (const 119:3 ~)
284− (mold 120:1 bloq (aura 120:9 @))
277+ (cell 120:3
285− (value 122:1 some
278+ (face 120:4 n (tvar 120:6 A))
286− (gate 122:9
279+ (face 120:8 l
287− (face 122:12 item (tvar 122:17 A))
280+ (apply 120:10 tree (tvar 120:16 A)))
288− (unit 122:19 (wing 122:20 item))))
281+ (face 120:19 r
289− (value 124:1 lure
282+ (apply 120:21 tree (tvar 120:27 A)))))))
290− (gate 124:9
283+ (mold 122:1 each
291− (face 124:12 item (tvar 124:17 A))
284+ (generic 122:9 A B
292− (body 125:3
285+ (union 123:3
293− (cast 125:3
286+ (cell 123:3
294− (apply 125:6 list (tvar 125:12 A))
287+ (const 123:4 %|)
295− (tuple 125:15 (wing 125:16 item) (lit 125:21 ~))))))
288+ (face 123:7 p (tvar 123:9 B)))
296− (value 127:1 snoc
289+ (cell 124:3
297− (gate 127:9
290+ (const 124:4 %&)
298− (face 127:12 args
291+ (face 124:7 p (tvar 124:9 A))))))
299− (cell 127:17
292+ (mold 126:1 bloq (aura 126:9 @))
300− (apply 127:18 list (tvar 127:24 A))
293+ (value 128:1 some
301− (tvar 127:27 A)))
294+ (gate 128:9
302− (body 128:3
295+ (face 128:12 item (tvar 128:17 A))
303− (branch 128:3
296+ (unit 128:19 (wing 128:20 item))))
304− (wing 128:6 args)
297+ (value 130:1 lure
305− (arm 129:5
298+ (gate 130:9
306− (cell 129:5 (bind 129:6 xs) (bind 129:9 item))
299+ (face 130:12 item (tvar 130:17 A))
307− (group 129:15
300+ (body 131:3
308− (call 129:16
301+ (cast 131:3
309− (wing 129:16 weld)
302+ (apply 131:6 list (tvar 131:12 A))
310− (wing 129:21 xs)
303+ (tuple 131:15 (wing 131:16 item) (lit 131:21 ~))))))
311− (tuple 129:24 (wing 129:25 item) (lit 129:30 ~)))))))))
304+ (value 133:1 snoc
312− (value 131:1 flop
305+ (gate 133:9
313− (gate 131:9
306+ (face 133:12 args
314− (face 131:12 xs
307+ (cell 133:17
315− (apply 131:15 list (tvar 131:21 A)))
308+ (apply 133:18 list (tvar 133:24 A))
316− (body 132:3
309+ (tvar 133:27 A)))
317− (value 132:3 reverse-into
310+ (body 134:3
318− (gate 132:19
311+ (branch 134:3
319− (face 132:22 args
312+ (wing 134:6 args)
320− (cell 132:27
313+ (arm 135:5
321− (apply 132:28 list (tvar 132:34 A))
314+ (cell 135:5 (bind 135:6 xs) (bind 135:9 item))
322− (apply 132:37 list (tvar 132:43 A))))
315+ (group 135:15
323− (body 133:5
316+ (call 135:16
324− (branch 133:5
317+ (wing 135:16 weld)
325− (wing 133:8 args)
318+ (wing 135:21 xs)
326− (arm 134:7
319+ (tuple 135:24 (wing 135:25 item) (lit 135:30 ~)))))))))
327− (cell 134:7 (bind 134:8 rest) (bind 134:13 acc))
320+ (value 137:1 flop
328− (body 135:9
321+ (gate 137:9
329− (branch 135:9
322+ (face 137:12 xs
330− (wing 135:12 rest)
323+ (apply 137:15 list (tvar 137:21 A)))
331− (arm 136:11 (lit 136:11 ~) (wing 136:13 acc))
324+ (body 138:3
332− (arm 137:11
325+ (value 138:3 reverse-into
333− (cell 137:11 (bind 137:12 item) (bind 137:17 more))
326+ (gate 138:19
334− (group 137:23
327+ (face 138:22 args
335− (call 137:24
328+ (cell 138:27
336− (wing 137:24 reverse-into)
329+ (apply 138:28 list (tvar 138:34 A))
337− (wing 137:37 more)
330+ (apply 138:37 list (tvar 138:43 A))))
338− (tuple 137:42 (wing 137:43 item) (wing 137:48 acc))))))))))))
331+ (body 139:5
339− (group 138:3
332+ (branch 139:5
340− (call 138:4 (wing 138:4 reverse-into) (wing 138:17 xs) (lit 138:20 ~))))))
333+ (wing 139:8 args)
341− (value 140:1 drop
334+ (arm 140:7
342− (gate 140:9
335+ (cell 140:7 (bind 140:8 rest) (bind 140:13 acc))
343− (face 140:12 maybe
336+ (body 141:9
344− (apply 140:18 unit (tvar 140:24 A)))
337+ (branch 141:9
345− (body 141:3
338+ (wing 141:12 rest)
346− (branch 141:3
339+ (arm 142:11 (lit 142:11 ~) (wing 142:13 acc))
347− (wing 141:6 maybe)
340+ (arm 143:11
348− (arm 142:5 (lit 142:5 ~) (lit 142:7 ~))
341+ (cell 143:11 (bind 143:12 item) (bind 143:17 more))
349− (arm 143:5
342+ (group 143:23
350− (cell 143:5 (lit 143:6 ~) (bind 143:8 value))
343+ (call 143:24
351− (tuple 143:15 (wing 143:16 value) (lit 143:22 ~)))))))
344+ (wing 143:24 reverse-into)
352− (value 145:1 bind
345+ (wing 143:37 more)
353− (gate 145:9
346+ (tuple 143:42 (wing 143:43 item) (wing 143:48 acc))))))))))))
354− (face 145:12 args
347+ (group 144:3
355− (cell 145:17
348+ (call 144:4 (wing 144:4 reverse-into) (wing 144:17 xs) (lit 144:20 ~))))))
356− (apply 145:18 unit (tvar 145:24 A))
349+ (value 146:1 drop
357− (fn 145:27 (tvar 145:30 A) (tvar 145:32 B))))
350+ (gate 146:9
358− (body 146:3
351+ (face 146:12 maybe
359− (branch 146:3
352+ (apply 146:18 unit (tvar 146:24 A)))
360− (wing 146:6 args)
353+ (body 147:3
361− (arm 147:5
354+ (cast 147:3
362− (cell 147:5 (bind 147:6 maybe) (bind 147:12 f))
355+ (apply 147:6 list (tvar 147:12 A))
363− (body 148:7
356+ (body 148:5
364− (branch 148:7
357+ (branch 148:5
365− (wing 148:10 maybe)
358+ (wing 148:8 maybe)
366− (arm 149:9 (lit 149:9 ~) (lit 149:11 ~))
359+ (arm 149:7 (lit 149:7 ~) (lit 149:9 ~))
367− (arm 150:9
360+ (arm 150:7
368− (cell 150:9 (lit 150:10 ~) (bind 150:12 value))
361+ (cell 150:7 (lit 150:8 ~) (bind 150:10 value))
369− (unit 150:19
362+ (tuple 150:17 (wing 150:18 value) (lit 150:24 ~)))))))))
370− (group 150:20
363+ (value 152:1 bind
371− (call 150:21 (wing 150:21 f) (wing 150:23 value))))))))))))
372− (value 152:1 biff
373 (gate 152:9
364 (gate 152:9
374 (face 152:12 args
365 (face 152:12 args
375 (cell 152:17
366 (cell 152:17
376 (apply 152:18 unit (tvar 152:24 A))
367 (apply 152:18 unit (tvar 152:24 A))
377− (fn 152:27
368+ (fn 152:27 (tvar 152:30 A) (tvar 152:32 B))))
378− (tvar 152:30 A)
379− (apply 152:32 unit (tvar 152:38 B)))))
380 (body 153:3
369 (body 153:3
381 (branch 153:3
370 (branch 153:3
382 (wing 153:6 args)
371 (wing 153:6 args)
383 (arm 154:5
372 (arm 154:5
384 (cell 154:5 (bind 154:6 maybe) (bind 154:12 f))
373 (cell 154:5 (bind 154:6 maybe) (bind 154:12 f))
385− (body 155:7
374+ (cast 154:15
386− (branch 155:7
375+ (apply 154:18 unit (tvar 154:24 B))
387− (wing 155:10 maybe)
376+ (body 155:7
388− (arm 156:9 (lit 156:9 ~) (lit 156:11 ~))
377+ (branch 155:7
389− (arm 157:9
378+ (wing 155:10 maybe)
390− (cell 157:9 (lit 157:10 ~) (bind 157:12 value))
379+ (arm 156:9 (lit 156:9 ~) (lit 156:11 ~))
391− (group 157:19
380+ (arm 157:9
392− (call 157:20 (wing 157:20 f) (wing 157:22 value)))))))))))
381+ (cell 157:9 (lit 157:10 ~) (bind 157:12 value))
393− (value 159:1 both
382+ (unit 157:19
383+ (group 157:20
384+ (call 157:21 (wing 157:21 f) (wing 157:23 value)))))))))))))
385+ (value 159:1 biff
394 (gate 159:9
386 (gate 159:9
395 (face 159:12 args
387 (face 159:12 args
396 (cell 159:17
388 (cell 159:17
397 (apply 159:18 unit (tvar 159:24 A))
389 (apply 159:18 unit (tvar 159:24 A))
398− (apply 159:27 unit (tvar 159:33 B))))
390+ (fn 159:27
391+ (tvar 159:30 A)
392+ (apply 159:32 unit (tvar 159:38 B)))))
399 (body 160:3
393 (body 160:3
400 (branch 160:3
394 (branch 160:3
401 (wing 160:6 args)
395 (wing 160:6 args)
402 (arm 161:5
396 (arm 161:5
403− (cell 161:5 (bind 161:6 first) (bind 161:12 second))
397+ (cell 161:5 (bind 161:6 maybe) (bind 161:12 f))
404− (body 162:7
398+ (cast 161:15
405− (branch 162:7
399+ (apply 161:18 unit (tvar 161:24 B))
406− (wing 162:10 first)
400+ (body 162:7
407− (arm 163:9 (lit 163:9 ~) (lit 163:11 ~))
401+ (branch 162:7
408− (arm 164:9
402+ (wing 162:10 maybe)
409− (cell 164:9 (lit 164:10 ~) (bind 164:12 a))
403+ (arm 163:9 (lit 163:9 ~) (lit 163:11 ~))
410− (body 165:11
404+ (arm 164:9
411− (branch 165:11
405+ (cell 164:9 (lit 164:10 ~) (bind 164:12 value))
412− (wing 165:14 second)
406+ (group 164:19
413− (arm 166:13 (lit 166:13 ~) (lit 166:15 ~))
407+ (call 164:20 (wing 164:20 f) (wing 164:22 value))))))))))))
414− (arm 167:13
408+ (value 166:1 both
415− (cell 167:13 (lit 167:14 ~) (bind 167:16 b))
409+ (gate 166:9
416− (unit 167:19
410+ (face 166:12 args
417− (tuple 167:20 (wing 167:21 a) (wing 167:23 b))))))))))))))
411+ (cell 166:17
418− (value 169:1 clef
412+ (apply 166:18 unit (tvar 166:24 A))
419− (gate 169:9
413+ (apply 166:27 unit (tvar 166:33 B))))
420− (face 169:12 args
414+ (body 167:3
421− (cell 169:17
415+ (branch 167:3
422− (apply 169:18 unit (tvar 169:24 A))
416+ (wing 167:6 args)
423− (apply 169:27 unit (tvar 169:33 B))
417+ (arm 168:5
424− (fn 169:36
418+ (cell 168:5 (bind 168:6 first) (bind 168:12 second))
425− (cell 169:39 (tvar 169:40 A) (tvar 169:42 B))
419+ (cast 168:20
426− (apply 169:45 unit (tvar 169:51 C)))))
420+ (apply 168:23 unit
427− (body 170:3
421+ (cell 168:29 (tvar 168:30 A) (tvar 168:32 B)))
428− (branch 170:3
422+ (body 169:7
429− (wing 170:6 args)
423+ (branch 169:7
430− (arm 171:5
424+ (wing 169:10 first)
431− (cell 171:5 (bind 171:6 first) (bind 171:12 second) (bind 171:19 combine))
425+ (arm 170:9 (lit 170:9 ~) (lit 170:11 ~))
432− (body 172:7
426+ (arm 171:9
433− (branch 172:7
427+ (cell 171:9 (lit 171:10 ~) (bind 171:12 a))
434− (wing 172:10 first)
428+ (body 172:11
435− (arm 173:9 (lit 173:9 ~) (lit 173:11 ~))
429+ (branch 172:11
436− (arm 174:9
430+ (wing 172:14 second)
437− (cell 174:9 (lit 174:10 ~) (bind 174:12 a))
431+ (arm 173:13 (lit 173:13 ~) (lit 173:15 ~))
438− (body 175:11
432+ (arm 174:13
439− (branch 175:11
433+ (cell 174:13 (lit 174:14 ~) (bind 174:16 b))
440− (wing 175:14 second)
434+ (unit 174:19
441− (arm 176:13 (lit 176:13 ~) (lit 176:15 ~))
435+ (tuple 174:20 (wing 174:21 a) (wing 174:23 b)))))))))))))))
442− (arm 177:13
436+ (value 176:1 clap
443− (cell 177:13 (lit 177:14 ~) (bind 177:16 b))
437+ (gate 176:9
444− (group 177:19
438+ (face 176:12 args
445− (call 177:20 (wing 177:20 combine) (wing 177:28 a) (wing 177:30 b))))))))))))))
439+ (cell 176:17
446− (value 179:1 skim
440+ (apply 176:18 unit (tvar 176:24 A))
447− (gate 179:9
441+ (apply 176:27 unit (tvar 176:33 A))
448− (face 179:12 args
442+ (fn 176:36
449− (cell 179:17
443+ (cell 176:39 (tvar 176:40 A) (tvar 176:42 A))
450− (apply 179:18 list (tvar 179:24 A))
444+ (tvar 176:45 A))))
451− (fn 179:27 (tvar 179:30 A) (flag 179:32))))
445+ (body 177:3
452− (body 180:3
446+ (branch 177:3
453− (branch 180:3
447+ (wing 177:6 args)
454− (wing 180:6 args)
448+ (arm 178:5
455− (arm 181:5
449+ (cell 178:5 (bind 178:6 first) (bind 178:12 second) (bind 178:19 combine))
456− (cell 181:5 (bind 181:6 xs) (bind 181:9 predicate))
450+ (cast 178:28
457− (body 182:7
451+ (apply 178:31 unit (tvar 178:37 A))
458− (branch 182:7
452+ (body 179:7
459− (wing 182:10 xs)
453+ (branch 179:7
460− (arm 183:9 (lit 183:9 ~) (lit 183:11 ~))
454+ (wing 179:10 first)
461− (arm 184:9
455+ (arm 180:9 (lit 180:9 ~) (wing 180:11 second))
462− (cell 184:9 (bind 184:10 item) (bind 184:15 rest))
456+ (arm 181:9
463− (body 185:11
457+ (cell 181:9 (lit 181:10 ~) (bind 181:12 a))
464− (branch 185:11
458+ (body 182:11
465− (group 185:14
459+ (branch 182:11
466− (call 185:15 (wing 185:15 predicate) (wing 185:25 item)))
460+ (wing 182:14 second)
467− (arm 186:13
461+ (arm 183:13 (lit 183:13 ~) (wing 183:15 first))
468− (lit 186:13 %.y)
462+ (arm 184:13
469− (tuple 186:17
463+ (cell 184:13 (lit 184:14 ~) (bind 184:16 b))
470− (wing 186:18 item)
464+ (unit 184:19
471− (group 186:23
465+ (group 184:20
472− (call 186:24 (wing 186:24 skim) (wing 186:29 rest) (wing 186:34 predicate)))))
466+ (call 184:21 (wing 184:21 combine) (wing 184:29 a) (wing 184:31 b))))))))))))))))
473− (arm 187:13
467+ (value 186:1 clef
474− (lit 187:13 %.n)
468+ (gate 186:9
475− (group 187:17
469+ (face 186:12 args
476− (call 187:18 (wing 187:18 skim) (wing 187:23 rest) (wing 187:28 predicate))))))))))))))
470+ (cell 186:17
477− (value 189:1 skip
471+ (apply 186:18 unit (tvar 186:24 A))
478− (gate 189:9
472+ (apply 186:27 unit (tvar 186:33 B))
479− (face 189:12 args
473+ (fn 186:36
480− (cell 189:17
474+ (cell 186:39 (tvar 186:40 A) (tvar 186:42 B))
481− (apply 189:18 list (tvar 189:24 A))
475+ (apply 186:45 unit (tvar 186:51 C)))))
482− (fn 189:27 (tvar 189:30 A) (flag 189:32))))
476+ (body 187:3
483− (body 190:3
477+ (branch 187:3
484− (branch 190:3
478+ (wing 187:6 args)
485− (wing 190:6 args)
479+ (arm 188:5
486− (arm 191:5
480+ (cell 188:5 (bind 188:6 first) (bind 188:12 second) (bind 188:19 combine))
487− (cell 191:5 (bind 191:6 xs) (bind 191:9 predicate))
481+ (cast 188:28
488− (body 192:7
482+ (apply 188:31 unit (tvar 188:37 C))
489− (branch 192:7
483+ (body 189:7
490− (wing 192:10 xs)
484+ (branch 189:7
491− (arm 193:9 (lit 193:9 ~) (lit 193:11 ~))
485+ (wing 189:10 first)
492− (arm 194:9
486+ (arm 190:9 (lit 190:9 ~) (lit 190:11 ~))
493− (cell 194:9 (bind 194:10 item) (bind 194:15 rest))
487+ (arm 191:9
494− (body 195:11
488+ (cell 191:9 (lit 191:10 ~) (bind 191:12 a))
495− (branch 195:11
489+ (body 192:11
496− (group 195:14
490+ (branch 192:11
497− (call 195:15 (wing 195:15 predicate) (wing 195:25 item)))
491+ (wing 192:14 second)
498− (arm 196:13
492+ (arm 193:13 (lit 193:13 ~) (lit 193:15 ~))
499− (lit 196:13 %.y)
493+ (arm 194:13
500− (group 196:17
494+ (cell 194:13 (lit 194:14 ~) (bind 194:16 b))
501− (call 196:18 (wing 196:18 skip) (wing 196:23 rest) (wing 196:28 predicate))))
495+ (group 194:19
502− (arm 197:13
496+ (call 194:20 (wing 194:20 combine) (wing 194:28 a) (wing 194:30 b)))))))))))))))
503− (lit 197:13 %.n)
497+ (value 196:1 skim
504− (tuple 197:17
498+ (gate 196:9
505− (wing 197:18 item)
499+ (face 196:12 args
506− (group 197:23
500+ (cell 196:17
507− (call 197:24 (wing 197:24 skip) (wing 197:29 rest) (wing 197:34 predicate)))))))))))))))
501+ (apply 196:18 list (tvar 196:24 A))
508− (value 199:1 levy
502+ (fn 196:27 (tvar 196:30 A) (flag 196:32))))
509− (gate 199:9
503+ (body 197:3
510− (face 199:12 args
504+ (branch 197:3
511− (cell 199:17
505+ (wing 197:6 args)
512− (apply 199:18 list (tvar 199:24 A))
506+ (arm 198:5
513− (fn 199:27 (tvar 199:30 A) (flag 199:32))))
507+ (cell 198:5 (bind 198:6 xs) (bind 198:9 predicate))
514− (body 200:3
508+ (cast 198:20
515− (branch 200:3
509+ (apply 198:23 list (tvar 198:29 A))
516− (wing 200:6 args)
510+ (body 199:9
517− (arm 201:5
511+ (branch 199:9
518− (cell 201:5 (bind 201:6 xs) (bind 201:9 predicate))
512+ (wing 199:12 xs)
519− (body 202:7
513+ (arm 200:11 (lit 200:11 ~) (lit 200:13 ~))
520− (branch 202:7
514+ (arm 201:11
521− (wing 202:10 xs)
515+ (cell 201:11 (bind 201:12 item) (bind 201:17 rest))
522− (arm 203:9 (lit 203:9 ~) (lit 203:11 %.y))
516+ (body 202:13
523− (arm 204:9
517+ (branch 202:13
524− (cell 204:9 (bind 204:10 item) (bind 204:15 rest))
518+ (group 202:16
525− (body 205:11
519+ (call 202:17 (wing 202:17 predicate) (wing 202:27 item)))
526− (branch 205:11
520+ (arm 203:15
527− (group 205:14
521+ (lit 203:15 %.y)
528− (call 205:15 (wing 205:15 predicate) (wing 205:25 item)))
522+ (tuple 203:19
529− (arm 206:13
523+ (wing 203:20 item)
530− (lit 206:13 %.y)
524+ (group 203:25
531− (group 206:17
525+ (call 203:26 (wing 203:26 skim) (wing 203:31 rest) (wing 203:36 predicate)))))
532− (call 206:18 (wing 206:18 levy) (wing 206:23 rest) (wing 206:28 predicate))))
526+ (arm 204:15
533− (arm 207:13 (lit 207:13 %.n) (lit 207:17 %.n))))))))))))
527+ (lit 204:15 %.n)
534− (value 209:1 lien
528+ (group 204:19
535− (gate 209:9
529+ (call 204:20 (wing 204:20 skim) (wing 204:25 rest) (wing 204:30 predicate)))))))))))))))
536− (face 209:12 args
530+ (value 206:1 skip
537− (cell 209:17
531+ (gate 206:9
538− (apply 209:18 list (tvar 209:24 A))
532+ (face 206:12 args
539− (fn 209:27 (tvar 209:30 A) (flag 209:32))))
533+ (cell 206:17
540− (body 210:3
534+ (apply 206:18 list (tvar 206:24 A))
541− (branch 210:3
535+ (fn 206:27 (tvar 206:30 A) (flag 206:32))))
542− (wing 210:6 args)
536+ (body 207:3
543− (arm 211:5
537+ (branch 207:3
544− (cell 211:5 (bind 211:6 xs) (bind 211:9 predicate))
538+ (wing 207:6 args)
545− (body 212:7
539+ (arm 208:5
546− (branch 212:7
540+ (cell 208:5 (bind 208:6 xs) (bind 208:9 predicate))
547− (wing 212:10 xs)
541+ (cast 208:20
548− (arm 213:9 (lit 213:9 ~) (lit 213:11 %.n))
542+ (apply 208:23 list (tvar 208:29 A))
549− (arm 214:9
543+ (body 209:9
550− (cell 214:9 (bind 214:10 item) (bind 214:15 rest))
544+ (branch 209:9
551− (body 215:11
545+ (wing 209:12 xs)
552− (branch 215:11
546+ (arm 210:11 (lit 210:11 ~) (lit 210:13 ~))
553− (group 215:14
547+ (arm 211:11
554− (call 215:15 (wing 215:15 predicate) (wing 215:25 item)))
548+ (cell 211:11 (bind 211:12 item) (bind 211:17 rest))
555− (arm 216:13 (lit 216:13 %.y) (lit 216:17 %.y))
549+ (body 212:13
556− (arm 217:13
550+ (branch 212:13
557− (lit 217:13 %.n)
551+ (group 212:16
558− (group 217:17
552+ (call 212:17 (wing 212:17 predicate) (wing 212:27 item)))
559− (call 217:18 (wing 217:18 lien) (wing 217:23 rest) (wing 217:28 predicate))))))))))))))
553+ (arm 213:15
560− (value 219:1 roll
554+ (lit 213:15 %.y)
561− (gate 219:9
555+ (group 213:19
562− (face 219:12 args
556+ (call 213:20 (wing 213:20 skip) (wing 213:25 rest) (wing 213:30 predicate))))
563− (cell 219:17
557+ (arm 214:15
564− (apply 219:18 list (tvar 219:24 A))
558+ (lit 214:15 %.n)
565− (tvar 219:27 B)
559+ (tuple 214:19
566− (fn 219:29
560+ (wing 214:20 item)
567− (cell 219:32 (tvar 219:33 A) (tvar 219:35 B))
561+ (group 214:25
568− (tvar 219:38 B))))
562+ (call 214:26 (wing 214:26 skip) (wing 214:31 rest) (wing 214:36 predicate))))))))))))))))
569− (body 220:3
563+ (value 216:1 levy
570− (branch 220:3
564+ (gate 216:9
571− (wing 220:6 args)
565+ (face 216:12 args
572− (arm 221:5
566+ (cell 216:17
573− (cell 221:5 (bind 221:6 xs) (bind 221:9 start) (bind 221:15 combine))
567+ (apply 216:18 list (tvar 216:24 A))
574− (body 222:7
568+ (fn 216:27 (tvar 216:30 A) (flag 216:32))))
575− (branch 222:7
569+ (body 217:3
576− (wing 222:10 xs)
570+ (cast 217:3
577− (arm 223:9 (lit 223:9 ~) (wing 223:11 start))
571+ (flag 217:6)
578− (arm 224:9
572+ (body 218:5
579− (cell 224:9 (bind 224:10 item) (bind 224:15 rest))
573+ (branch 218:5
580− (group 224:21
574+ (wing 218:8 args)
581− (call 224:22
575+ (arm 219:7
582− (wing 224:22 roll)
576+ (cell 219:7 (bind 219:8 xs) (bind 219:11 predicate))
583− (wing 224:27 rest)
577+ (body 220:9
584− (group 224:32
578+ (branch 220:9
585− (call 224:33 (wing 224:33 combine) (wing 224:41 item) (wing 224:46 start)))
579+ (wing 220:12 xs)
586− (wing 224:53 combine)))))))))))
580+ (arm 221:11 (lit 221:11 ~) (lit 221:13 %.y))
587− (value 226:1 reel
581+ (arm 222:11
588− (gate 226:9
582+ (cell 222:11 (bind 222:12 item) (bind 222:17 rest))
589− (face 226:12 args
583+ (body 223:13
590− (cell 226:17
584+ (branch 223:13
591− (apply 226:18 list (tvar 226:24 A))
585+ (group 223:16
592− (tvar 226:27 B)
586+ (call 223:17 (wing 223:17 predicate) (wing 223:27 item)))
593− (fn 226:29
587+ (arm 224:15
594− (cell 226:32 (tvar 226:33 A) (tvar 226:35 B))
588+ (lit 224:15 %.y)
595− (tvar 226:38 B))))
589+ (group 224:19
596− (body 227:3
590+ (call 224:20 (wing 224:20 levy) (wing 224:25 rest) (wing 224:30 predicate))))
597− (branch 227:3
591+ (arm 225:15 (lit 225:15 %.n) (lit 225:19 %.n))))))))))))))
598− (wing 227:6 args)
592+ (value 227:1 lien
599− (arm 228:5
593+ (gate 227:9
600− (cell 228:5 (bind 228:6 xs) (bind 228:9 start) (bind 228:15 combine))
594+ (face 227:12 args
601− (body 229:7
595+ (cell 227:17
602− (branch 229:7
596+ (apply 227:18 list (tvar 227:24 A))
603− (wing 229:10 xs)
597+ (fn 227:27 (tvar 227:30 A) (flag 227:32))))
604− (arm 230:9 (lit 230:9 ~) (wing 230:11 start))
598+ (body 228:3
605− (arm 231:9
599+ (cast 228:3
606− (cell 231:9 (bind 231:10 item) (bind 231:15 rest))
600+ (flag 228:6)
607− (group 231:21
601+ (body 229:5
608− (call 231:22
602+ (branch 229:5
609− (wing 231:22 combine)
603+ (wing 229:8 args)
610− (wing 231:30 item)
604+ (arm 230:7
611− (group 231:35
605+ (cell 230:7 (bind 230:8 xs) (bind 230:11 predicate))
612− (call 231:36 (wing 231:36 reel) (wing 231:41 rest) (wing 231:46 start) (wing 231:52 combine)))))))))))))
606+ (body 231:9
613− (value 233:1 flit
607+ (branch 231:9
614− (gate 233:9
608+ (wing 231:12 xs)
615− (face 233:12 predicate
609+ (arm 232:11 (lit 232:11 ~) (lit 232:13 %.n))
616− (fn 233:22 (tvar 233:25 A) (flag 233:27)))
610+ (arm 233:11
617− (body 234:3
611+ (cell 233:11 (bind 233:12 item) (bind 233:17 rest))
618− (gate 234:3
612+ (body 234:13
619− (face 234:6 value (tvar 234:12 A))
613+ (branch 234:13
620− (body 235:5
614+ (group 234:16
621− (branch 235:5
615+ (call 234:17 (wing 234:17 predicate) (wing 234:27 item)))
622− (group 235:8
616+ (arm 235:15 (lit 235:15 %.y) (lit 235:19 %.y))
623− (call 235:9 (wing 235:9 predicate) (wing 235:19 value)))
617+ (arm 236:15
624− (arm 236:7
618+ (lit 236:15 %.n)
625− (lit 236:7 %.y)
619+ (group 236:19
626− (unit 236:11 (wing 236:12 value)))
620+ (call 236:20 (wing 236:20 lien) (wing 236:25 rest) (wing 236:30 predicate))))))))))))))))
627− (arm 237:7 (lit 237:7 %.n) (lit 237:11 ~))))))))
621+ (value 238:1 roll
628− (value 239:1 murn
622+ (gate 238:9
629− (gate 239:9
623+ (face 238:12 args
630− (face 239:12 args
624+ (cell 238:17
631− (cell 239:17
625+ (apply 238:18 list (tvar 238:24 A))
632− (apply 239:18 list (tvar 239:24 A))
626+ (tvar 238:27 B)
633− (fn 239:27
627+ (fn 238:29
634− (tvar 239:30 A)
628+ (cell 238:32 (tvar 238:33 A) (tvar 238:35 B))
635− (apply 239:32 unit (tvar 239:38 B)))))
629+ (tvar 238:38 B))))
636− (body 240:3
630+ (body 239:3
637− (branch 240:3
631+ (branch 239:3
638− (wing 240:6 args)
632+ (wing 239:6 args)
639− (arm 241:5
633+ (arm 240:5
640− (cell 241:5 (bind 241:6 xs) (bind 241:9 f))
634+ (cell 240:5 (bind 240:6 xs) (bind 240:9 start) (bind 240:15 combine))
641− (body 242:7
635+ (body 241:7
642− (branch 242:7
636+ (branch 241:7
643− (wing 242:10 xs)
637+ (wing 241:10 xs)
644− (arm 243:9 (lit 243:9 ~) (lit 243:11 ~))
638+ (arm 242:9 (lit 242:9 ~) (wing 242:11 start))
645− (arm 244:9
639+ (arm 243:9
646− (cell 244:9 (bind 244:10 item) (bind 244:15 rest))
640+ (cell 243:9 (bind 243:10 item) (bind 243:15 rest))
647− (body 245:11
641+ (group 243:21
648− (branch 245:11
642+ (call 243:22
649− (group 245:14
643+ (wing 243:22 roll)
650− (call 245:15 (wing 245:15 f) (wing 245:17 item)))
644+ (wing 243:27 rest)
651− (arm 246:13
645+ (group 243:32
652− (lit 246:13 ~)
646+ (call 243:33 (wing 243:33 combine) (wing 243:41 item) (wing 243:46 start)))
653− (group 246:15
647+ (wing 243:53 combine)))))))))))
654− (call 246:16 (wing 246:16 murn) (wing 246:21 rest) (wing 246:26 f))))
648+ (value 245:1 reel
655− (arm 247:13
649+ (gate 245:9
656− (cell 247:13 (lit 247:14 ~) (bind 247:16 value))
650+ (face 245:12 args
657− (tuple 247:23
651+ (cell 245:17
658− (wing 247:24 value)
652+ (apply 245:18 list (tvar 245:24 A))
659− (group 247:30
653+ (tvar 245:27 B)
660− (call 247:31 (wing 247:31 murn) (wing 247:36 rest) (wing 247:41 f)))))))))))))))
654+ (fn 245:29
661− (value 249:1 join
655+ (cell 245:32 (tvar 245:33 A) (tvar 245:35 B))
662− (gate 249:9
656+ (tvar 245:38 B))))
663− (face 249:12 args
657+ (body 246:3
664− (cell 249:17
658+ (branch 246:3
665− (tvar 249:18 A)
659+ (wing 246:6 args)
666− (apply 249:20 list (tvar 249:26 A))))
660+ (arm 247:5
667− (body 250:3
661+ (cell 247:5 (bind 247:6 xs) (bind 247:9 start) (bind 247:15 combine))
668− (branch 250:3
662+ (body 248:7
669− (wing 250:6 args)
663+ (branch 248:7
670− (arm 251:5
664+ (wing 248:10 xs)
671− (cell 251:5 (bind 251:6 separator) (bind 251:16 xs))
665+ (arm 249:9 (lit 249:9 ~) (wing 249:11 start))
672− (body 252:7
666+ (arm 250:9
673− (branch 252:7
667+ (cell 250:9 (bind 250:10 item) (bind 250:15 rest))
674− (wing 252:10 xs)
668+ (group 250:21
675− (arm 253:9 (lit 253:9 ~) (lit 253:11 ~))
669+ (call 250:22
676− (arm 254:9
670+ (wing 250:22 combine)
677− (cell 254:9 (bind 254:10 item) (bind 254:15 rest))
671+ (wing 250:30 item)
678− (body 255:11
672+ (group 250:35
679− (branch 255:11
673+ (call 250:36 (wing 250:36 reel) (wing 250:41 rest) (wing 250:46 start) (wing 250:52 combine)))))))))))))
680− (wing 255:14 rest)
674+ (value 252:1 flit
681− (arm 256:13
675+ (gate 252:9
682− (lit 256:13 ~)
676+ (face 252:12 predicate
683− (tuple 256:15 (wing 256:16 item) (lit 256:21 ~)))
677+ (fn 252:22 (tvar 252:25 A) (flag 252:27)))
684− (arm 257:13
678+ (body 253:3
685− (cell 257:13 (bind 257:14 next) (bind 257:19 more))
679+ (gate 253:3
686− (tuple 257:25
680+ (face 253:6 value (tvar 253:12 A))
687− (wing 257:26 item)
681+ (body 254:5
688− (tuple 257:31
682+ (cast 254:5
689− (wing 257:32 separator)
683+ (apply 254:8 unit (tvar 254:14 A))
690− (group 257:42
684+ (body 255:7
691− (call 257:43 (wing 257:43 join) (wing 257:48 separator) (wing 257:58 rest))))))))))))))))
685+ (branch 255:7
692− (value 259:1 snip
686+ (group 255:10
687+ (call 255:11 (wing 255:11 predicate) (wing 255:21 value)))
688+ (arm 256:9
689+ (lit 256:9 %.y)
690+ (unit 256:13 (wing 256:14 value)))
691+ (arm 257:9 (lit 257:9 %.n) (lit 257:13 ~))))))))))
692+ (value 259:1 murn
693 (gate 259:9
693 (gate 259:9
694− (face 259:12 xs
694+ (face 259:12 args
695− (apply 259:15 list (tvar 259:21 A)))
695+ (cell 259:17
696+ (apply 259:18 list (tvar 259:24 A))
697+ (fn 259:27
698+ (tvar 259:30 A)
699+ (apply 259:32 unit (tvar 259:38 B)))))
696 (body 260:3
700 (body 260:3
697 (branch 260:3
701 (branch 260:3
698− (wing 260:6 xs)
702+ (wing 260:6 args)
699− (arm 261:5 (lit 261:5 ~) (lit 261:7 ~))
703+ (arm 261:5
700− (arm 262:5
704+ (cell 261:5 (bind 261:6 xs) (bind 261:9 f))
701− (cell 262:5 (bind 262:6 item) (bind 262:11 rest))
705+ (cast 261:12
702− (body 263:7
706+ (apply 261:15 list (tvar 261:21 B))
703− (branch 263:7
707+ (body 262:9
704− (wing 263:10 rest)
708+ (branch 262:9
705− (arm 264:9 (lit 264:9 ~) (lit 264:11 ~))
709+ (wing 262:12 xs)
706− (arm 265:9
710+ (arm 263:11 (lit 263:11 ~) (lit 263:13 ~))
707− (cell 265:9 (bind 265:10 next) (bind 265:15 more))
711+ (arm 264:11
708− (tuple 265:21
712+ (cell 264:11 (bind 264:12 item) (bind 264:17 rest))
709− (wing 265:22 item)
713+ (body 265:13
710− (group 265:27
714+ (branch 265:13
711− (call 265:28 (wing 265:28 snip) (wing 265:33 rest))))))))))))
715+ (group 265:16
712− (value 267:1 rear
716+ (call 265:17 (wing 265:17 f) (wing 265:19 item)))
713− (gate 267:9
717+ (arm 266:15
714− (face 267:12 xs
718+ (lit 266:15 ~)
715− (apply 267:15 list (tvar 267:21 A)))
719+ (group 266:17
716− (body 268:3
720+ (call 266:18 (wing 266:18 murn) (wing 266:23 rest) (wing 266:28 f))))
717− (branch 268:3
721+ (arm 267:15
718− (wing 268:6 xs)
722+ (cell 267:15 (lit 267:16 ~) (bind 267:18 value))
719− (arm 269:5 (lit 269:5 ~) (crash 269:7))
723+ (tuple 267:25
720− (arm 270:5
724+ (wing 267:26 value)
721− (cell 270:5 (bind 270:6 item) (bind 270:11 rest))
725+ (group 267:32
722− (body 271:7
726+ (call 267:33 (wing 267:33 murn) (wing 267:38 rest) (wing 267:43 f))))))))))))))))
723− (branch 271:7
727+ (value 269:1 join
724− (wing 271:10 rest)
728+ (gate 269:9
725− (arm 272:9 (lit 272:9 ~) (wing 272:11 item))
729+ (face 269:12 args
726− (arm 273:9
730+ (cell 269:17
727− (cell 273:9 (bind 273:10 next) (bind 273:15 more))
731+ (tvar 269:18 A)
728− (group 273:21
732+ (apply 269:20 list (tvar 269:26 A))))
729− (call 273:22 (wing 273:22 rear) (wing 273:27 rest))))))))))))
733+ (body 270:3
734+ (branch 270:3
735+ (wing 270:6 args)
736+ (arm 271:5
737+ (cell 271:5 (bind 271:6 separator) (bind 271:16 xs))
738+ (cast 271:20
739+ (apply 271:23 list (tvar 271:29 A))
740+ (body 272:9
741+ (branch 272:9
742+ (wing 272:12 xs)
743+ (arm 273:11 (lit 273:11 ~) (lit 273:13 ~))
744+ (arm 274:11
745+ (cell 274:11 (bind 274:12 item) (bind 274:17 rest))
746+ (body 275:13
747+ (branch 275:13
748+ (wing 275:16 rest)
749+ (arm 276:15
750+ (lit 276:15 ~)
751+ (tuple 276:17 (wing 276:18 item) (lit 276:23 ~)))
752+ (arm 277:15
753+ (cell 277:15 (bind 277:16 next) (bind 277:21 more))
754+ (tuple 277:27
755+ (wing 277:28 item)
756+ (tuple 277:33
757+ (wing 277:34 separator)
758+ (group 277:44
759+ (call 277:45 (wing 277:45 join) (wing 277:50 separator) (wing 277:60 rest)))))))))))))))))
760+ (value 279:1 snip
761+ (gate 279:9
762+ (face 279:12 xs
763+ (apply 279:15 list (tvar 279:21 A)))
764+ (body 280:3
765+ (cast 280:3
766+ (apply 280:6 list (tvar 280:12 A))
767+ (body 281:5
768+ (branch 281:5
769+ (wing 281:8 xs)
770+ (arm 282:7 (lit 282:7 ~) (lit 282:9 ~))
771+ (arm 283:7
772+ (cell 283:7 (bind 283:8 item) (bind 283:13 rest))
773+ (body 284:9
774+ (branch 284:9
775+ (wing 284:12 rest)
776+ (arm 285:11 (lit 285:11 ~) (lit 285:13 ~))
777+ (arm 286:11
778+ (cell 286:11 (bind 286:12 next) (bind 286:17 more))
779+ (tuple 286:23
780+ (wing 286:24 item)
781+ (group 286:29
782+ (call 286:30 (wing 286:30 snip) (wing 286:35 rest))))))))))))))
783+ (value 288:1 rear
784+ (gate 288:9
785+ (face 288:12 xs
786+ (apply 288:15 list (tvar 288:21 A)))
787+ (body 289:3
788+ (branch 289:3
789+ (wing 289:6 xs)
790+ (arm 290:5 (lit 290:5 ~) (crash 290:7))
791+ (arm 291:5
792+ (cell 291:5 (bind 291:6 item) (bind 291:11 rest))
793+ (body 292:7
794+ (branch 292:7
795+ (wing 292:10 rest)
796+ (arm 293:9 (lit 293:9 ~) (wing 293:11 item))
797+ (arm 294:9
798+ (cell 294:9 (bind 294:10 next) (bind 294:15 more))
799+ (group 294:21
800+ (call 294:22 (wing 294:22 rear) (wing 294:27 rest)))))))))))
801+ (value 296:1 cork
802+ (gate 296:9
803+ (face 296:12 gates
804+ (cell 296:18
805+ (fn 296:19 (tvar 296:22 A) (tvar 296:24 B))
806+ (fn 296:27 (tvar 296:30 B) (tvar 296:32 C))))
807+ (body 297:3
808+ (branch 297:3
809+ (wing 297:6 gates)
810+ (arm 298:5
811+ (cell 298:5 (bind 298:6 f) (bind 298:8 g))
812+ (gate 298:11
813+ (face 298:14 x (tvar 298:16 A))
814+ (group 298:18
815+ (call 298:19
816+ (wing 298:19 g)
817+ (group 298:21
818+ (call 298:22 (wing 298:22 f) (wing 298:24 x)))))))))))
819+ (value 300:1 corl
820+ (gate 300:9
821+ (face 300:12 gates
822+ (cell 300:18
823+ (fn 300:19 (tvar 300:22 B) (tvar 300:24 C))
824+ (fn 300:27 (tvar 300:30 A) (tvar 300:32 B))))
825+ (body 301:3
826+ (branch 301:3
827+ (wing 301:6 gates)
828+ (arm 302:5
829+ (cell 302:5 (bind 302:6 f) (bind 302:8 g))
830+ (gate 302:11
831+ (face 302:14 x (tvar 302:16 A))
832+ (group 302:18
833+ (call 302:19
834+ (wing 302:19 f)
835+ (group 302:21
836+ (call 302:22 (wing 302:22 g) (wing 302:24 x)))))))))))
837+ (value 304:1 cury
838+ (gate 304:9
839+ (face 304:12 args
840+ (cell 304:17
841+ (fn 304:18
842+ (cell 304:21 (tvar 304:22 A) (tvar 304:24 B))
843+ (tvar 304:27 C))
844+ (tvar 304:30 A)))
845+ (body 305:3
846+ (branch 305:3
847+ (wing 305:6 args)
848+ (arm 306:5
849+ (cell 306:5 (bind 306:6 f) (bind 306:8 a))
850+ (gate 306:11
851+ (face 306:14 b (tvar 306:16 B))
852+ (group 306:18
853+ (call 306:19 (wing 306:19 f) (wing 306:21 a) (wing 306:23 b)))))))))
854+ (value 308:1 curr
855+ (gate 308:9
856+ (face 308:12 args
857+ (cell 308:17
858+ (fn 308:18
859+ (cell 308:21 (tvar 308:22 A) (tvar 308:24 B))
860+ (tvar 308:27 C))
861+ (tvar 308:30 B)))
862+ (body 309:3
863+ (branch 309:3
864+ (wing 309:6 args)
865+ (arm 310:5
866+ (cell 310:5 (bind 310:6 f) (bind 310:8 b))
867+ (gate 310:11
868+ (face 310:14 a (tvar 310:16 A))
869+ (group 310:18
870+ (call 310:19 (wing 310:19 f) (wing 310:21 a) (wing 310:23 b)))))))))
871+ (mold 312:1 cmd
872+ (generic 312:8 M
873+ (union 313:3
874+ (cell 313:3
875+ (const 313:4 %poke)
876+ (face 313:10 p (ref 313:12 poke))
877+ (face 313:17 reply
878+ (fn 313:23
879+ (apply 313:26 unit (aura 313:32 @t))
880+ (tvar 313:36 M))))
881+ (cell 314:3
882+ (const 314:4 %go)
883+ (face 314:8 url (aura 314:12 @t)))
884+ (cell 315:3
885+ (const 315:4 %wait)
886+ (face 315:10 gap (aura 315:14 @dr))
887+ (face 315:18 msg (tvar 315:22 M)))
888+ (cell 316:3
889+ (const 316:4 %now)
890+ (face 316:9 reply
891+ (fn 316:15 (aura 316:18 @da) (tvar 316:22 M))))
892+ (cell 317:3
893+ (const 317:4 %who)
894+ (face 317:9 reply
895+ (fn 317:15 (aura 317:18 @p) (tvar 317:21 M)))))))
896+ (value 319:1 gth
897+ (gate 319:8
898+ (face 319:11 args
899+ (cell 319:16 (tvar 319:17 A) (tvar 319:19 A)))
900+ (group 319:22
901+ (call 319:23 (wing 319:23 gth-atom.internal) (wing 319:41 args))))))
tests/golden/prelude-unit-list-transforms/types.txt+15−7
@@ -1,4 +1,5 @@
1partial inference; module not checked
1partial inference; module not checked
2++$ poke: not checked
2++ same: $-(A A)
3++ same: $-(A A)
3++ head: $-([A B] A)
4++ head: $-([A B] A)
4++ tail: $-([A B] B)
5++ tail: $-([A B] B)
@@ -35,23 +36,30 @@ partial inference; module not checked
35+$ tree: cases proven disjoint; mold not checked
36+$ tree: cases proven disjoint; mold not checked
36+$ each: cases proven disjoint; mold not checked
37+$ each: cases proven disjoint; mold not checked
37+$ bloq: not checked
38+$ bloq: not checked
38−++ some: expression is not supported by partial inference
39+++ some: unit construction needs the standard prelude in partial inference
39++ lure: cast mold is not supported by partial inference
40++ lure: cast mold is not supported by partial inference
40++ snoc: sample mold is not supported by partial inference
41++ snoc: sample mold is not supported by partial inference
41++ flop: sample mold is not supported by partial inference
42++ flop: sample mold is not supported by partial inference
42−++ drop: unit branch results need unsupported inference
43+++ drop: cast mold is not supported by partial inference
43−++ bind: expression is not supported by partial inference
44+++ bind: unit construction needs the standard prelude in partial inference
44−++ biff: unit branch results need unsupported inference
45+++ biff: $-([(unit A) $-(A (unit B))] (unit B))
45−++ both: expression is not supported by partial inference
46+++ both: unit construction needs the standard prelude in partial inference
46−++ clef: branch pattern is not supported by partial inference
47+++ clap: unit construction needs the standard prelude in partial inference
48+++ clef: $-([(unit A) [(unit B) $-([A B] (unit C))]] (unit C))
47++ skim: sample mold is not supported by partial inference
49++ skim: sample mold is not supported by partial inference
48++ skip: sample mold is not supported by partial inference
50++ skip: sample mold is not supported by partial inference
49++ levy: sample mold is not supported by partial inference
51++ levy: sample mold is not supported by partial inference
50++ lien: sample mold is not supported by partial inference
52++ lien: sample mold is not supported by partial inference
51++ roll: sample mold is not supported by partial inference
53++ roll: sample mold is not supported by partial inference
52++ reel: sample mold is not supported by partial inference
54++ reel: sample mold is not supported by partial inference
53−++ flit: expression is not supported by partial inference
55+++ flit: unit construction needs the standard prelude in partial inference
54++ murn: sample mold is not supported by partial inference
56++ murn: sample mold is not supported by partial inference
55++ join: sample mold is not supported by partial inference
57++ join: sample mold is not supported by partial inference
56++ snip: sample mold is not supported by partial inference
58++ snip: sample mold is not supported by partial inference
57++ rear: sample mold is not supported by partial inference
59++ rear: sample mold is not supported by partial inference
60+++ cork: $-([$-(A B) $-(B C)] $-(A C))
61+++ corl: $-([$-(A B) $-(C A)] $-(C B))
62+++ cury: $-([$-([A B] C) A] $-(B C))
63+++ curr: $-([$-([A B] C) B] $-(A C))
64++$ cmd: cases proven disjoint; mold not checked
65+++ gth: field access is not supported by partial inference
tests/golden/types-capital-distinct/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Decisions, Type variables: "Capitals, generalized per `++`"; "a different type takes a different capital".
2+tests: Different explicitly written capitals cannot be forced equal via a call or cast; their source sites are reported. Repeated spelling, independent capitals and concrete-forcing controls retain their intended behavior.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-capital-distinct/source.jibbnew file+6
@@ -0,0 +1,6 @@
1+++ repeat |= p=[A A] p
2+++ same |= p=[A A] p
3+++ independent |= p=[A B] p
4+++ bad-call |= p=[A B] (repeat p)
5+++ bad-cast |= p=[A B] ^- [A A] p
6+++ concrete |= x=A ^- @t x
tests/golden/types-capital-distinct/tokens.txtnew file+73
@@ -0,0 +1,73 @@
1+1:1 glyph ++
2+1:4 name repeat
3+1:11 glyph |=
4+1:14 name p
5+1:15 tight glyph =
6+1:16 tight glyph [
7+1:17 tight tvar A
8+1:19 tvar A
9+1:20 tight glyph ]
10+1:22 name p
11+2:1 NEWLINE
12+2:1 glyph ++
13+2:4 name same
14+2:9 glyph |=
15+2:12 name p
16+2:13 tight glyph =
17+2:14 tight glyph [
18+2:15 tight tvar A
19+2:17 tvar A
20+2:18 tight glyph ]
21+2:20 name p
22+3:1 NEWLINE
23+3:1 glyph ++
24+3:4 name independent
25+3:16 glyph |=
26+3:19 name p
27+3:20 tight glyph =
28+3:21 tight glyph [
29+3:22 tight tvar A
30+3:24 tvar B
31+3:25 tight glyph ]
32+3:27 name p
33+4:1 NEWLINE
34+4:1 glyph ++
35+4:4 name bad-call
36+4:13 glyph |=
37+4:16 name p
38+4:17 tight glyph =
39+4:18 tight glyph [
40+4:19 tight tvar A
41+4:21 tvar B
42+4:22 tight glyph ]
43+4:24 glyph (
44+4:25 tight name repeat
45+4:32 name p
46+4:33 tight glyph )
47+5:1 NEWLINE
48+5:1 glyph ++
49+5:4 name bad-cast
50+5:13 glyph |=
51+5:16 name p
52+5:17 tight glyph =
53+5:18 tight glyph [
54+5:19 tight tvar A
55+5:21 tvar B
56+5:22 tight glyph ]
57+5:24 glyph ^-
58+5:27 glyph [
59+5:28 tight tvar A
60+5:30 tvar A
61+5:31 tight glyph ]
62+5:33 name p
63+6:1 NEWLINE
64+6:1 glyph ++
65+6:4 name concrete
66+6:13 glyph |=
67+6:16 name x
68+6:17 tight glyph =
69+6:18 tight tvar A
70+6:20 glyph ^-
71+6:23 aura @t
72+6:26 name x
73+6:27 NEWLINE
tests/golden/types-capital-distinct/tree.txtnew file+33
@@ -0,0 +1,33 @@
1+(module
2+ (value 1:1 repeat
3+ (gate 1:11
4+ (face 1:14 p
5+ (cell 1:16 (tvar 1:17 A) (tvar 1:19 A)))
6+ (wing 1:22 p)))
7+ (value 2:1 same
8+ (gate 2:9
9+ (face 2:12 p
10+ (cell 2:14 (tvar 2:15 A) (tvar 2:17 A)))
11+ (wing 2:20 p)))
12+ (value 3:1 independent
13+ (gate 3:16
14+ (face 3:19 p
15+ (cell 3:21 (tvar 3:22 A) (tvar 3:24 B)))
16+ (wing 3:27 p)))
17+ (value 4:1 bad-call
18+ (gate 4:13
19+ (face 4:16 p
20+ (cell 4:18 (tvar 4:19 A) (tvar 4:21 B)))
21+ (group 4:24
22+ (call 4:25 (wing 4:25 repeat) (wing 4:32 p)))))
23+ (value 5:1 bad-cast
24+ (gate 5:13
25+ (face 5:16 p
26+ (cell 5:18 (tvar 5:19 A) (tvar 5:21 B)))
27+ (cast 5:24
28+ (cell 5:27 (tvar 5:28 A) (tvar 5:30 A))
29+ (wing 5:33 p))))
30+ (value 6:1 concrete
31+ (gate 6:13
32+ (face 6:16 x (tvar 6:18 A))
33+ (cast 6:20 (aura 6:23 @t) (wing 6:26 x)))))
tests/golden/types-capital-distinct/types.txtnew file+19
@@ -0,0 +1,19 @@
1+partial inference; module not checked
2+++ repeat: $-([A A] [A A])
3+++ same: $-([A A] [A A])
4+++ independent: $-([A B] [A B])
5+++ bad-call: distinct type variables `A` and `B` must not be forced equal; use the same capital for a shared type
6+/tests/golden/types-capital-distinct/source.jibb:4:19: first type variable
7+++ bad-call |= p=[A B] (repeat p)
8+ ^
9+/tests/golden/types-capital-distinct/source.jibb:4:21: second type variable
10+++ bad-call |= p=[A B] (repeat p)
11+ ^
12+++ bad-cast: distinct type variables `A` and `B` must not be forced equal; use the same capital for a shared type
13+/tests/golden/types-capital-distinct/source.jibb:5:19: first type variable
14+++ bad-cast |= p=[A B] ^- [A A] p
15+ ^
16+/tests/golden/types-capital-distinct/source.jibb:5:21: second type variable
17+++ bad-cast |= p=[A B] ^- [A A] p
18+ ^
19+++ concrete: explicit capital constraints are not supported by partial inference
tests/golden/types-cell-pattern-many/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Patterns: a name binds anew and the last position of a cell pattern binds the rest; Modules: no name may shadow one already in scope.
2+tests: A complete single-arm cell pattern of binders follows the right-nested cell spine, preserving polymorphism and the final tail. Duplicate or shadowed binders and definite non-cell subjects fail; uncertain union/collection spines and other patterns stay unsupported.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-cell-pattern-many/modules.txtnew file+1
@@ -0,0 +1 @@
1+# Use the prepared prelude.
tests/golden/types-cell-pattern-many/source.jibbnew file+41
@@ -0,0 +1,41 @@
1+++ three |= args=[@t @p ?]
2+ ?- args
3+ [a b c] c
4+++ four |= args=[@t @p ? @ux]
5+ ?- args
6+ [a b c d] d
7+++ rest |= args=[@t @p [? @ux]]
8+ ?- args
9+ [a b c] c
10+++ infer |= x
11+ ?- x
12+ [a b c] [c b a]
13+++ duplicate |= args=[@t @p ?]
14+ ?- args
15+ [a b a] a
16+++ shadow |= args=[@t @p ?]
17+ ?- args
18+ [args b c] b
19+++ prelude-shadow |= args=[@t @p ?]
20+ ?- args
21+ [a not c] c
22+++ atom |= args=@t
23+ ?- args
24+ [a b c] a
25+++ too-many |= args=[@t @p]
26+ ?- args
27+ [a b c] a
28+++ record |= args=[a=@t b=@p c=?]
29+ ?- args
30+ [a b c] a
31+++ nested |= args=[@t [@p ?] @ux]
32+ ?- args
33+ [a [b c] d] d
34+++ wildcard |= args=[@t @p ?]
35+ ?- args
36+ [a * c] c
37+++ pending |= args=[@t @p ?]
38+ ?- args
39+ [a b c]
40+ ~& %unused
41+ c
tests/golden/types-cell-pattern-many/tokens.txtnew file+315
@@ -0,0 +1,315 @@
1+1:1 glyph ++
2+1:4 name three
3+1:10 glyph |=
4+1:13 name args
5+1:17 tight glyph =
6+1:18 tight glyph [
7+1:19 tight aura @t
8+1:22 aura @p
9+1:25 glyph ?
10+1:26 tight glyph ]
11+2:3 INDENT
12+2:3 glyph ?-
13+2:6 name args
14+3:5 INDENT
15+3:5 glyph [
16+3:6 tight name a
17+3:8 name b
18+3:10 name c
19+3:11 tight glyph ]
20+3:13 name c
21+4:1 DEDENT
22+4:1 DEDENT
23+4:1 NEWLINE
24+4:1 glyph ++
25+4:4 name four
26+4:9 glyph |=
27+4:12 name args
28+4:16 tight glyph =
29+4:17 tight glyph [
30+4:18 tight aura @t
31+4:21 aura @p
32+4:24 glyph ?
33+4:26 aura @ux
34+4:29 tight glyph ]
35+5:3 INDENT
36+5:3 glyph ?-
37+5:6 name args
38+6:5 INDENT
39+6:5 glyph [
40+6:6 tight name a
41+6:8 name b
42+6:10 name c
43+6:12 name d
44+6:13 tight glyph ]
45+6:15 name d
46+7:1 DEDENT
47+7:1 DEDENT
48+7:1 NEWLINE
49+7:1 glyph ++
50+7:4 name rest
51+7:9 glyph |=
52+7:12 name args
53+7:16 tight glyph =
54+7:17 tight glyph [
55+7:18 tight aura @t
56+7:21 aura @p
57+7:24 glyph [
58+7:25 tight glyph ?
59+7:27 aura @ux
60+7:30 tight glyph ]
61+7:31 tight glyph ]
62+8:3 INDENT
63+8:3 glyph ?-
64+8:6 name args
65+9:5 INDENT
66+9:5 glyph [
67+9:6 tight name a
68+9:8 name b
69+9:10 name c
70+9:11 tight glyph ]
71+9:13 name c
72+10:1 DEDENT
73+10:1 DEDENT
74+10:1 NEWLINE
75+10:1 glyph ++
76+10:4 name infer
77+10:10 glyph |=
78+10:13 name x
79+11:3 INDENT
80+11:3 glyph ?-
81+11:6 name x
82+12:5 INDENT
83+12:5 glyph [
84+12:6 tight name a
85+12:8 name b
86+12:10 name c
87+12:11 tight glyph ]
88+12:13 glyph [
89+12:14 tight name c
90+12:16 name b
91+12:18 name a
92+12:19 tight glyph ]
93+13:1 DEDENT
94+13:1 DEDENT
95+13:1 NEWLINE
96+13:1 glyph ++
97+13:4 name duplicate
98+13:14 glyph |=
99+13:17 name args
100+13:21 tight glyph =
101+13:22 tight glyph [
102+13:23 tight aura @t
103+13:26 aura @p
104+13:29 glyph ?
105+13:30 tight glyph ]
106+14:3 INDENT
107+14:3 glyph ?-
108+14:6 name args
109+15:5 INDENT
110+15:5 glyph [
111+15:6 tight name a
112+15:8 name b
113+15:10 name a
114+15:11 tight glyph ]
115+15:13 name a
116+16:1 DEDENT
117+16:1 DEDENT
118+16:1 NEWLINE
119+16:1 glyph ++
120+16:4 name shadow
121+16:11 glyph |=
122+16:14 name args
123+16:18 tight glyph =
124+16:19 tight glyph [
125+16:20 tight aura @t
126+16:23 aura @p
127+16:26 glyph ?
128+16:27 tight glyph ]
129+17:3 INDENT
130+17:3 glyph ?-
131+17:6 name args
132+18:5 INDENT
133+18:5 glyph [
134+18:6 tight name args
135+18:11 name b
136+18:13 name c
137+18:14 tight glyph ]
138+18:16 name b
139+19:1 DEDENT
140+19:1 DEDENT
141+19:1 NEWLINE
142+19:1 glyph ++
143+19:4 name prelude-shadow
144+19:19 glyph |=
145+19:22 name args
146+19:26 tight glyph =
147+19:27 tight glyph [
148+19:28 tight aura @t
149+19:31 aura @p
150+19:34 glyph ?
151+19:35 tight glyph ]
152+20:3 INDENT
153+20:3 glyph ?-
154+20:6 name args
155+21:5 INDENT
156+21:5 glyph [
157+21:6 tight name a
158+21:8 name not
159+21:12 name c
160+21:13 tight glyph ]
161+21:15 name c
162+22:1 DEDENT
163+22:1 DEDENT
164+22:1 NEWLINE
165+22:1 glyph ++
166+22:4 name atom
167+22:9 glyph |=
168+22:12 name args
169+22:16 tight glyph =
170+22:17 tight aura @t
171+23:3 INDENT
172+23:3 glyph ?-
173+23:6 name args
174+24:5 INDENT
175+24:5 glyph [
176+24:6 tight name a
177+24:8 name b
178+24:10 name c
179+24:11 tight glyph ]
180+24:13 name a
181+25:1 DEDENT
182+25:1 DEDENT
183+25:1 NEWLINE
184+25:1 glyph ++
185+25:4 name too-many
186+25:13 glyph |=
187+25:16 name args
188+25:20 tight glyph =
189+25:21 tight glyph [
190+25:22 tight aura @t
191+25:25 aura @p
192+25:27 tight glyph ]
193+26:3 INDENT
194+26:3 glyph ?-
195+26:6 name args
196+27:5 INDENT
197+27:5 glyph [
198+27:6 tight name a
199+27:8 name b
200+27:10 name c
201+27:11 tight glyph ]
202+27:13 name a
203+28:1 DEDENT
204+28:1 DEDENT
205+28:1 NEWLINE
206+28:1 glyph ++
207+28:4 name record
208+28:11 glyph |=
209+28:14 name args
210+28:18 tight glyph =
211+28:19 tight glyph [
212+28:20 tight name a
213+28:21 tight glyph =
214+28:22 tight aura @t
215+28:25 name b
216+28:26 tight glyph =
217+28:27 tight aura @p
218+28:30 name c
219+28:31 tight glyph =
220+28:32 tight glyph ?
221+28:33 tight glyph ]
222+29:3 INDENT
223+29:3 glyph ?-
224+29:6 name args
225+30:5 INDENT
226+30:5 glyph [
227+30:6 tight name a
228+30:8 name b
229+30:10 name c
230+30:11 tight glyph ]
231+30:13 name a
232+31:1 DEDENT
233+31:1 DEDENT
234+31:1 NEWLINE
235+31:1 glyph ++
236+31:4 name nested
237+31:11 glyph |=
238+31:14 name args
239+31:18 tight glyph =
240+31:19 tight glyph [
241+31:20 tight aura @t
242+31:23 glyph [
243+31:24 tight aura @p
244+31:27 glyph ?
245+31:28 tight glyph ]
246+31:30 aura @ux
247+31:33 tight glyph ]
248+32:3 INDENT
249+32:3 glyph ?-
250+32:6 name args
251+33:5 INDENT
252+33:5 glyph [
253+33:6 tight name a
254+33:8 glyph [
255+33:9 tight name b
256+33:11 name c
257+33:12 tight glyph ]
258+33:14 name d
259+33:15 tight glyph ]
260+33:17 name d
261+34:1 DEDENT
262+34:1 DEDENT
263+34:1 NEWLINE
264+34:1 glyph ++
265+34:4 name wildcard
266+34:13 glyph |=
267+34:16 name args
268+34:20 tight glyph =
269+34:21 tight glyph [
270+34:22 tight aura @t
271+34:25 aura @p
272+34:28 glyph ?
273+34:29 tight glyph ]
274+35:3 INDENT
275+35:3 glyph ?-
276+35:6 name args
277+36:5 INDENT
278+36:5 glyph [
279+36:6 tight name a
280+36:8 glyph *
281+36:10 name c
282+36:11 tight glyph ]
283+36:13 name c
284+37:1 DEDENT
285+37:1 DEDENT
286+37:1 NEWLINE
287+37:1 glyph ++
288+37:4 name pending
289+37:12 glyph |=
290+37:15 name args
291+37:19 tight glyph =
292+37:20 tight glyph [
293+37:21 tight aura @t
294+37:24 aura @p
295+37:27 glyph ?
296+37:28 tight glyph ]
297+38:3 INDENT
298+38:3 glyph ?-
299+38:6 name args
300+39:5 INDENT
301+39:5 glyph [
302+39:6 tight name a
303+39:8 name b
304+39:10 name c
305+39:11 tight glyph ]
306+40:7 INDENT
307+40:7 glyph ~&
308+40:10 lit %unused
309+41:9 INDENT
310+41:9 name c
311+41:10 DEDENT
312+41:10 DEDENT
313+41:10 DEDENT
314+41:10 DEDENT
315+41:10 NEWLINE
tests/golden/types-cell-pattern-many/tree.txtnew file+144
@@ -0,0 +1,144 @@
1+(module
2+ (value 1:1 three
3+ (gate 1:10
4+ (face 1:13 args
5+ (cell 1:18 (aura 1:19 @t) (aura 1:22 @p) (flag 1:25)))
6+ (body 2:3
7+ (branch 2:3
8+ (wing 2:6 args)
9+ (arm 3:5
10+ (cell 3:5 (bind 3:6 a) (bind 3:8 b) (bind 3:10 c))
11+ (wing 3:13 c))))))
12+ (value 4:1 four
13+ (gate 4:9
14+ (face 4:12 args
15+ (cell 4:17 (aura 4:18 @t) (aura 4:21 @p) (flag 4:24) (aura 4:26 @ux)))
16+ (body 5:3
17+ (branch 5:3
18+ (wing 5:6 args)
19+ (arm 6:5
20+ (cell 6:5 (bind 6:6 a) (bind 6:8 b) (bind 6:10 c) (bind 6:12 d))
21+ (wing 6:15 d))))))
22+ (value 7:1 rest
23+ (gate 7:9
24+ (face 7:12 args
25+ (cell 7:17
26+ (aura 7:18 @t)
27+ (aura 7:21 @p)
28+ (cell 7:24 (flag 7:25) (aura 7:27 @ux))))
29+ (body 8:3
30+ (branch 8:3
31+ (wing 8:6 args)
32+ (arm 9:5
33+ (cell 9:5 (bind 9:6 a) (bind 9:8 b) (bind 9:10 c))
34+ (wing 9:13 c))))))
35+ (value 10:1 infer
36+ (gate 10:10
37+ (bind 10:13 x)
38+ (body 11:3
39+ (branch 11:3
40+ (wing 11:6 x)
41+ (arm 12:5
42+ (cell 12:5 (bind 12:6 a) (bind 12:8 b) (bind 12:10 c))
43+ (tuple 12:13 (wing 12:14 c) (wing 12:16 b) (wing 12:18 a)))))))
44+ (value 13:1 duplicate
45+ (gate 13:14
46+ (face 13:17 args
47+ (cell 13:22 (aura 13:23 @t) (aura 13:26 @p) (flag 13:29)))
48+ (body 14:3
49+ (branch 14:3
50+ (wing 14:6 args)
51+ (arm 15:5
52+ (cell 15:5 (bind 15:6 a) (bind 15:8 b) (bind 15:10 a))
53+ (wing 15:13 a))))))
54+ (value 16:1 shadow
55+ (gate 16:11
56+ (face 16:14 args
57+ (cell 16:19 (aura 16:20 @t) (aura 16:23 @p) (flag 16:26)))
58+ (body 17:3
59+ (branch 17:3
60+ (wing 17:6 args)
61+ (arm 18:5
62+ (cell 18:5 (bind 18:6 args) (bind 18:11 b) (bind 18:13 c))
63+ (wing 18:16 b))))))
64+ (value 19:1 prelude-shadow
65+ (gate 19:19
66+ (face 19:22 args
67+ (cell 19:27 (aura 19:28 @t) (aura 19:31 @p) (flag 19:34)))
68+ (body 20:3
69+ (branch 20:3
70+ (wing 20:6 args)
71+ (arm 21:5
72+ (cell 21:5 (bind 21:6 a) (bind 21:8 not) (bind 21:12 c))
73+ (wing 21:15 c))))))
74+ (value 22:1 atom
75+ (gate 22:9
76+ (face 22:12 args (aura 22:17 @t))
77+ (body 23:3
78+ (branch 23:3
79+ (wing 23:6 args)
80+ (arm 24:5
81+ (cell 24:5 (bind 24:6 a) (bind 24:8 b) (bind 24:10 c))
82+ (wing 24:13 a))))))
83+ (value 25:1 too-many
84+ (gate 25:13
85+ (face 25:16 args
86+ (cell 25:21 (aura 25:22 @t) (aura 25:25 @p)))
87+ (body 26:3
88+ (branch 26:3
89+ (wing 26:6 args)
90+ (arm 27:5
91+ (cell 27:5 (bind 27:6 a) (bind 27:8 b) (bind 27:10 c))
92+ (wing 27:13 a))))))
93+ (value 28:1 record
94+ (gate 28:11
95+ (face 28:14 args
96+ (cell 28:19
97+ (face 28:20 a (aura 28:22 @t))
98+ (face 28:25 b (aura 28:27 @p))
99+ (face 28:30 c (flag 28:32))))
100+ (body 29:3
101+ (branch 29:3
102+ (wing 29:6 args)
103+ (arm 30:5
104+ (cell 30:5 (bind 30:6 a) (bind 30:8 b) (bind 30:10 c))
105+ (wing 30:13 a))))))
106+ (value 31:1 nested
107+ (gate 31:11
108+ (face 31:14 args
109+ (cell 31:19
110+ (aura 31:20 @t)
111+ (cell 31:23 (aura 31:24 @p) (flag 31:27))
112+ (aura 31:30 @ux)))
113+ (body 32:3
114+ (branch 32:3
115+ (wing 32:6 args)
116+ (arm 33:5
117+ (cell 33:5
118+ (bind 33:6 a)
119+ (cell 33:8 (bind 33:9 b) (bind 33:11 c))
120+ (bind 33:14 d))
121+ (wing 33:17 d))))))
122+ (value 34:1 wildcard
123+ (gate 34:13
124+ (face 34:16 args
125+ (cell 34:21 (aura 34:22 @t) (aura 34:25 @p) (flag 34:28)))
126+ (body 35:3
127+ (branch 35:3
128+ (wing 35:6 args)
129+ (arm 36:5
130+ (cell 36:5 (bind 36:6 a) (any 36:8) (bind 36:10 c))
131+ (wing 36:13 c))))))
132+ (value 37:1 pending
133+ (gate 37:12
134+ (face 37:15 args
135+ (cell 37:20 (aura 37:21 @t) (aura 37:24 @p) (flag 37:27)))
136+ (body 38:3
137+ (branch 38:3
138+ (wing 38:6 args)
139+ (arm 39:5
140+ (cell 39:5 (bind 39:6 a) (bind 39:8 b) (bind 39:10 c))
141+ (body 40:7
142+ (trace 40:7
143+ (lit 40:10 %unused)
144+ (body 41:9 (wing 41:9 c))))))))))
tests/golden/types-cell-pattern-many/types.txtnew file+14
@@ -0,0 +1,14 @@
1+partial inference; module not checked
2+++ three: $-([@t [@p ?]] ?)
3+++ four: $-([@t [@p [? @ux]]] @ux)
4+++ rest: $-([@t [@p [? @ux]]] [? @ux])
5+++ infer: $-([A [B C]] [C [B A]])
6+++ duplicate: pattern shadows a name
7+++ shadow: pattern shadows a name
8+++ prelude-shadow: pattern shadows a name
9+++ atom: cell pattern does not match the subject type
10+++ too-many: cell pattern does not match the subject type
11+++ record: record patterns are not supported by partial inference
12+++ nested: $-([@t [[@p ?] @ux]] @ux)
13+++ wildcard: $-([@t [@p ?]] ?)
14+++ pending: tag needs context in partial inference
tests/golden/types-cell-pattern-schemes/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Patterns: a name binds anew and the last position of a cell pattern binds the rest; Modules: no name may shadow one already in scope.
2+tests: A complete single-arm cell pattern of binders follows the right-nested cell spine, preserving polymorphism and the final tail. Duplicate or shadowed binders and definite non-cell subjects fail; uncertain union/collection spines and other patterns stay unsupported.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-cell-pattern-schemes/modules.txtnew file+1
@@ -0,0 +1 @@
1+# Use the prepared prelude.
tests/golden/types-cell-pattern-schemes/source.jibbnew file+23
@@ -0,0 +1,23 @@
1++$ union
2+ [%go @t @p]
3+ %stop
4+++ maybe-union |= x=union
5+ ?- x
6+ [a b c] a
7+++ maybe-list |= x=(list @t)
8+ ?- x
9+ [a b c] a
10+++ identity |= x
11+ ?- x
12+ [a b c] [a b c]
13+++ text (identity "hi" ~zod %.y)
14+++ ship (identity ~zod "hi" %.n)
15+++ shared |= x=[A A A]
16+ ?- x
17+ [a b c] [a b c]
18+++ wrong (shared "hi" ~zod "ok")
19+++ local-shadow |= outer=@t
20+ ++ local |= x=[@t @p ?]
21+ ?- x
22+ [a outer c] c
23+ (local ["x" ~zod %.n])
tests/golden/types-cell-pattern-schemes/tokens.txtnew file+168
@@ -0,0 +1,168 @@
1+1:1 glyph +$
2+1:4 name union
3+2:3 INDENT
4+2:3 glyph [
5+2:4 tight lit %go
6+2:8 aura @t
7+2:11 aura @p
8+2:13 tight glyph ]
9+3:3 NEWLINE
10+3:3 lit %stop
11+4:1 DEDENT
12+4:1 NEWLINE
13+4:1 glyph ++
14+4:4 name maybe-union
15+4:16 glyph |=
16+4:19 name x
17+4:20 tight glyph =
18+4:21 tight name union
19+5:3 INDENT
20+5:3 glyph ?-
21+5:6 name x
22+6:5 INDENT
23+6:5 glyph [
24+6:6 tight name a
25+6:8 name b
26+6:10 name c
27+6:11 tight glyph ]
28+6:13 name a
29+7:1 DEDENT
30+7:1 DEDENT
31+7:1 NEWLINE
32+7:1 glyph ++
33+7:4 name maybe-list
34+7:15 glyph |=
35+7:18 name x
36+7:19 tight glyph =
37+7:20 tight glyph (
38+7:21 tight name list
39+7:26 aura @t
40+7:28 tight glyph )
41+8:3 INDENT
42+8:3 glyph ?-
43+8:6 name x
44+9:5 INDENT
45+9:5 glyph [
46+9:6 tight name a
47+9:8 name b
48+9:10 name c
49+9:11 tight glyph ]
50+9:13 name a
51+10:1 DEDENT
52+10:1 DEDENT
53+10:1 NEWLINE
54+10:1 glyph ++
55+10:4 name identity
56+10:13 glyph |=
57+10:16 name x
58+11:3 INDENT
59+11:3 glyph ?-
60+11:6 name x
61+12:5 INDENT
62+12:5 glyph [
63+12:6 tight name a
64+12:8 name b
65+12:10 name c
66+12:11 tight glyph ]
67+12:13 glyph [
68+12:14 tight name a
69+12:16 name b
70+12:18 name c
71+12:19 tight glyph ]
72+13:1 DEDENT
73+13:1 DEDENT
74+13:1 NEWLINE
75+13:1 glyph ++
76+13:4 name text
77+13:9 glyph (
78+13:10 tight name identity
79+13:19 str "hi"
80+13:24 lit ~zod
81+13:29 lit %.y
82+13:32 tight glyph )
83+14:1 NEWLINE
84+14:1 glyph ++
85+14:4 name ship
86+14:9 glyph (
87+14:10 tight name identity
88+14:19 lit ~zod
89+14:24 str "hi"
90+14:29 lit %.n
91+14:32 tight glyph )
92+15:1 NEWLINE
93+15:1 glyph ++
94+15:4 name shared
95+15:11 glyph |=
96+15:14 name x
97+15:15 tight glyph =
98+15:16 tight glyph [
99+15:17 tight tvar A
100+15:19 tvar A
101+15:21 tvar A
102+15:22 tight glyph ]
103+16:3 INDENT
104+16:3 glyph ?-
105+16:6 name x
106+17:5 INDENT
107+17:5 glyph [
108+17:6 tight name a
109+17:8 name b
110+17:10 name c
111+17:11 tight glyph ]
112+17:13 glyph [
113+17:14 tight name a
114+17:16 name b
115+17:18 name c
116+17:19 tight glyph ]
117+18:1 DEDENT
118+18:1 DEDENT
119+18:1 NEWLINE
120+18:1 glyph ++
121+18:4 name wrong
122+18:10 glyph (
123+18:11 tight name shared
124+18:18 str "hi"
125+18:23 lit ~zod
126+18:28 str "ok"
127+18:32 tight glyph )
128+19:1 NEWLINE
129+19:1 glyph ++
130+19:4 name local-shadow
131+19:17 glyph |=
132+19:20 name outer
133+19:25 tight glyph =
134+19:26 tight aura @t
135+20:3 INDENT
136+20:3 glyph ++
137+20:6 name local
138+20:12 glyph |=
139+20:15 name x
140+20:16 tight glyph =
141+20:17 tight glyph [
142+20:18 tight aura @t
143+20:21 aura @p
144+20:24 glyph ?
145+20:25 tight glyph ]
146+21:5 INDENT
147+21:5 glyph ?-
148+21:8 name x
149+22:7 INDENT
150+22:7 glyph [
151+22:8 tight name a
152+22:10 name outer
153+22:16 name c
154+22:17 tight glyph ]
155+22:19 name c
156+23:3 DEDENT
157+23:3 DEDENT
158+23:3 NEWLINE
159+23:3 glyph (
160+23:4 tight name local
161+23:10 glyph [
162+23:11 tight str "x"
163+23:15 lit ~zod
164+23:20 lit %.n
165+23:23 tight glyph ]
166+23:24 tight glyph )
167+23:25 DEDENT
168+23:25 NEWLINE
tests/golden/types-cell-pattern-schemes/tree.txtnew file+70
@@ -0,0 +1,70 @@
1+(module
2+ (mold 1:1 union
3+ (union 2:3
4+ (cell 2:3 (const 2:4 %go) (aura 2:8 @t) (aura 2:11 @p))
5+ (const 3:3 %stop)))
6+ (value 4:1 maybe-union
7+ (gate 4:16
8+ (face 4:19 x (ref 4:21 union))
9+ (body 5:3
10+ (branch 5:3
11+ (wing 5:6 x)
12+ (arm 6:5
13+ (cell 6:5 (bind 6:6 a) (bind 6:8 b) (bind 6:10 c))
14+ (wing 6:13 a))))))
15+ (value 7:1 maybe-list
16+ (gate 7:15
17+ (face 7:18 x
18+ (apply 7:20 list (aura 7:26 @t)))
19+ (body 8:3
20+ (branch 8:3
21+ (wing 8:6 x)
22+ (arm 9:5
23+ (cell 9:5 (bind 9:6 a) (bind 9:8 b) (bind 9:10 c))
24+ (wing 9:13 a))))))
25+ (value 10:1 identity
26+ (gate 10:13
27+ (bind 10:16 x)
28+ (body 11:3
29+ (branch 11:3
30+ (wing 11:6 x)
31+ (arm 12:5
32+ (cell 12:5 (bind 12:6 a) (bind 12:8 b) (bind 12:10 c))
33+ (tuple 12:13 (wing 12:14 a) (wing 12:16 b) (wing 12:18 c)))))))
34+ (value 13:1 text
35+ (group 13:9
36+ (call 13:10 (wing 13:10 identity) (str 13:19 "hi") (lit 13:24 ~zod) (lit 13:29 %.y))))
37+ (value 14:1 ship
38+ (group 14:9
39+ (call 14:10 (wing 14:10 identity) (lit 14:19 ~zod) (str 14:24 "hi") (lit 14:29 %.n))))
40+ (value 15:1 shared
41+ (gate 15:11
42+ (face 15:14 x
43+ (cell 15:16 (tvar 15:17 A) (tvar 15:19 A) (tvar 15:21 A)))
44+ (body 16:3
45+ (branch 16:3
46+ (wing 16:6 x)
47+ (arm 17:5
48+ (cell 17:5 (bind 17:6 a) (bind 17:8 b) (bind 17:10 c))
49+ (tuple 17:13 (wing 17:14 a) (wing 17:16 b) (wing 17:18 c)))))))
50+ (value 18:1 wrong
51+ (group 18:10
52+ (call 18:11 (wing 18:11 shared) (str 18:18 "hi") (lit 18:23 ~zod) (str 18:28 "ok"))))
53+ (value 19:1 local-shadow
54+ (gate 19:17
55+ (face 19:20 outer (aura 19:26 @t))
56+ (body 20:3
57+ (value 20:3 local
58+ (gate 20:12
59+ (face 20:15 x
60+ (cell 20:17 (aura 20:18 @t) (aura 20:21 @p) (flag 20:24)))
61+ (body 21:5
62+ (branch 21:5
63+ (wing 21:8 x)
64+ (arm 22:7
65+ (cell 22:7 (bind 22:8 a) (bind 22:10 outer) (bind 22:16 c))
66+ (wing 22:19 c))))))
67+ (group 23:3
68+ (call 23:4
69+ (wing 23:4 local)
70+ (tuple 23:10 (str 23:11 "x") (lit 23:15 ~zod) (lit 23:20 %.n))))))))
tests/golden/types-cell-pattern-schemes/types.txtnew file+16
@@ -0,0 +1,16 @@
1+partial inference; module not checked
2++$ union: cases proven disjoint; mold not checked
3+++ maybe-union: cell pattern subject is not supported by partial inference
4+++ maybe-list: cell pattern subject is not supported by partial inference
5+++ identity: $-([A [B C]] [A [B C]])
6+++ text: [@t [@p ?]]
7+++ ship: [@p [@t ?]]
8+++ shared: $-([A [A A]] [A [A A]])
9+++ wrong: call's sample and argument types do not unify
10+/tests/golden/types-cell-pattern-schemes/source.jibb:18:11: called gate has type $-([A [A A]] [A [A A]])
11+++ wrong (shared "hi" ~zod "ok")
12+ ^
13+/tests/golden/types-cell-pattern-schemes/source.jibb:18:23: argument has type @p
14+++ wrong (shared "hi" ~zod "ok")
15+ ^
16+++ local-shadow: local definitions need unsupported inference
tests/golden/types-cell-pattern-tail/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, Patterns: a name binds anew and the last position of a cell pattern binds the rest; Modules: no name may shadow one already in scope.
2+tests: A complete single-arm cell pattern of binders follows the right-nested cell spine, preserving polymorphism and the final tail. Duplicate or shadowed binders and definite non-cell subjects fail; uncertain union/collection spines and other patterns stay unsupported.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-cell-pattern-tail/modules.txtnew file+1
@@ -0,0 +1 @@
1+# Use the prepared prelude.
tests/golden/types-cell-pattern-tail/source.jibbnew file+18
@@ -0,0 +1,18 @@
1+++ pair |= x=[@t (list @p)]
2+ ?- x
3+ [first rest] rest
4+++ split |= x=[@t (list @p)]
5+ ?- x
6+ [first second third] third
7++$ either
8+ [%go @p @t]
9+ %stop
10+++ pair-union |= x=[@t either]
11+ ?- x
12+ [first rest] rest
13+++ split-union |= x=[@t either]
14+ ?- x
15+ [first second third] third
16+++ malformed |= x=[@t @p]
17+ ?- x
18+ [first second third] third
tests/golden/types-cell-pattern-tail/tokens.txtnew file+126
@@ -0,0 +1,126 @@
1+1:1 glyph ++
2+1:4 name pair
3+1:9 glyph |=
4+1:12 name x
5+1:13 tight glyph =
6+1:14 tight glyph [
7+1:15 tight aura @t
8+1:18 glyph (
9+1:19 tight name list
10+1:24 aura @p
11+1:26 tight glyph )
12+1:27 tight glyph ]
13+2:3 INDENT
14+2:3 glyph ?-
15+2:6 name x
16+3:5 INDENT
17+3:5 glyph [
18+3:6 tight name first
19+3:12 name rest
20+3:16 tight glyph ]
21+3:18 name rest
22+4:1 DEDENT
23+4:1 DEDENT
24+4:1 NEWLINE
25+4:1 glyph ++
26+4:4 name split
27+4:10 glyph |=
28+4:13 name x
29+4:14 tight glyph =
30+4:15 tight glyph [
31+4:16 tight aura @t
32+4:19 glyph (
33+4:20 tight name list
34+4:25 aura @p
35+4:27 tight glyph )
36+4:28 tight glyph ]
37+5:3 INDENT
38+5:3 glyph ?-
39+5:6 name x
40+6:5 INDENT
41+6:5 glyph [
42+6:6 tight name first
43+6:12 name second
44+6:19 name third
45+6:24 tight glyph ]
46+6:26 name third
47+7:1 DEDENT
48+7:1 DEDENT
49+7:1 NEWLINE
50+7:1 glyph +$
51+7:4 name either
52+8:3 INDENT
53+8:3 glyph [
54+8:4 tight lit %go
55+8:8 aura @p
56+8:11 aura @t
57+8:13 tight glyph ]
58+9:3 NEWLINE
59+9:3 lit %stop
60+10:1 DEDENT
61+10:1 NEWLINE
62+10:1 glyph ++
63+10:4 name pair-union
64+10:15 glyph |=
65+10:18 name x
66+10:19 tight glyph =
67+10:20 tight glyph [
68+10:21 tight aura @t
69+10:24 name either
70+10:30 tight glyph ]
71+11:3 INDENT
72+11:3 glyph ?-
73+11:6 name x
74+12:5 INDENT
75+12:5 glyph [
76+12:6 tight name first
77+12:12 name rest
78+12:16 tight glyph ]
79+12:18 name rest
80+13:1 DEDENT
81+13:1 DEDENT
82+13:1 NEWLINE
83+13:1 glyph ++
84+13:4 name split-union
85+13:16 glyph |=
86+13:19 name x
87+13:20 tight glyph =
88+13:21 tight glyph [
89+13:22 tight aura @t
90+13:25 name either
91+13:31 tight glyph ]
92+14:3 INDENT
93+14:3 glyph ?-
94+14:6 name x
95+15:5 INDENT
96+15:5 glyph [
97+15:6 tight name first
98+15:12 name second
99+15:19 name third
100+15:24 tight glyph ]
101+15:26 name third
102+16:1 DEDENT
103+16:1 DEDENT
104+16:1 NEWLINE
105+16:1 glyph ++
106+16:4 name malformed
107+16:14 glyph |=
108+16:17 name x
109+16:18 tight glyph =
110+16:19 tight glyph [
111+16:20 tight aura @t
112+16:23 aura @p
113+16:25 tight glyph ]
114+17:3 INDENT
115+17:3 glyph ?-
116+17:6 name x
117+18:5 INDENT
118+18:5 glyph [
119+18:6 tight name first
120+18:12 name second
121+18:19 name third
122+18:24 tight glyph ]
123+18:26 name third
124+18:31 DEDENT
125+18:31 DEDENT
126+18:31 NEWLINE
tests/golden/types-cell-pattern-tail/tree.txtnew file+59
@@ -0,0 +1,59 @@
1+(module
2+ (value 1:1 pair
3+ (gate 1:9
4+ (face 1:12 x
5+ (cell 1:14
6+ (aura 1:15 @t)
7+ (apply 1:18 list (aura 1:24 @p))))
8+ (body 2:3
9+ (branch 2:3
10+ (wing 2:6 x)
11+ (arm 3:5
12+ (cell 3:5 (bind 3:6 first) (bind 3:12 rest))
13+ (wing 3:18 rest))))))
14+ (value 4:1 split
15+ (gate 4:10
16+ (face 4:13 x
17+ (cell 4:15
18+ (aura 4:16 @t)
19+ (apply 4:19 list (aura 4:25 @p))))
20+ (body 5:3
21+ (branch 5:3
22+ (wing 5:6 x)
23+ (arm 6:5
24+ (cell 6:5 (bind 6:6 first) (bind 6:12 second) (bind 6:19 third))
25+ (wing 6:26 third))))))
26+ (mold 7:1 either
27+ (union 8:3
28+ (cell 8:3 (const 8:4 %go) (aura 8:8 @p) (aura 8:11 @t))
29+ (const 9:3 %stop)))
30+ (value 10:1 pair-union
31+ (gate 10:15
32+ (face 10:18 x
33+ (cell 10:20 (aura 10:21 @t) (ref 10:24 either)))
34+ (body 11:3
35+ (branch 11:3
36+ (wing 11:6 x)
37+ (arm 12:5
38+ (cell 12:5 (bind 12:6 first) (bind 12:12 rest))
39+ (wing 12:18 rest))))))
40+ (value 13:1 split-union
41+ (gate 13:16
42+ (face 13:19 x
43+ (cell 13:21 (aura 13:22 @t) (ref 13:25 either)))
44+ (body 14:3
45+ (branch 14:3
46+ (wing 14:6 x)
47+ (arm 15:5
48+ (cell 15:5 (bind 15:6 first) (bind 15:12 second) (bind 15:19 third))
49+ (wing 15:26 third))))))
50+ (value 16:1 malformed
51+ (gate 16:14
52+ (face 16:17 x
53+ (cell 16:19 (aura 16:20 @t) (aura 16:23 @p)))
54+ (body 17:3
55+ (branch 17:3
56+ (wing 17:6 x)
57+ (arm 18:5
58+ (cell 18:5 (bind 18:6 first) (bind 18:12 second) (bind 18:19 third))
59+ (wing 18:26 third)))))))
tests/golden/types-cell-pattern-tail/types.txtnew file+7
@@ -0,0 +1,7 @@
1+partial inference; module not checked
2+++ pair: $-([@t (list @p)] (list @p))
3+++ split: cell pattern subject is not supported by partial inference
4++$ either: cases proven disjoint; mold not checked
5+++ pair-union: $-([@t either] either)
6+++ split-union: cell pattern subject is not supported by partial inference
7+++ malformed: cell pattern does not match the subject type
tests/golden/types-deferred-call-context/about.txtnew file+4
@@ -0,0 +1,4 @@
1+source: Grammar, literals by context and type variables: calls can receive expected result types while preserving shared type variables and pending constraints.
2+tests: A known identity-like gate receives list, null, unit, union and nested record contexts. Incorrect items, tags, auras and repeated arguments report errors; unrelated pending literals and explicit capital restrictions remain. Generic list and union results instantiate independently, captured variables retain their scope, and unsupported recursive inference fails closed. The module report remains partial.
3+expect: parses
4+expect-types: a partial inference report
tests/golden/types-deferred-call-context/modules.txtnew file+1
@@ -0,0 +1 @@
1+# no module fixtures
tests/golden/types-deferred-call-context/source.jibbnew file+56
@@ -0,0 +1,56 @@
1++$ msg
2+ %good
3+ %other
4+++ local-id |= x x
5+++ empty-list ^- (list @t) (local-id ~)
6+++ filled-list ^- (list @t) (local-id ~["hi"])
7+++ wrong-list ^- (list @t) (local-id ~[~zod])
8+++ unit-value ^- (unit msg) (local-id `%good)
9+++ union-value ^- msg (local-id %good)
10+++ union-bad ^- msg (local-id %wrong)
11+++ nested ^- (list (unit msg)) (local-id ~[`%good])
12+++ rec-value ^- [field=(list @t)] (local-id [field=~])
13+++ already |= x=@ud ^- @u (local-id x)
14+++ bad-aura |= x=@p ^- @t (local-id x)
15+++ capital |= x=A ^- A (local-id "text")
16+++ trace-tag ^- (list @t)
17+ ~& %dangling
18+ (local-id ~)
19+++ trace-null ^- (list @t)
20+ ~& ~
21+ (local-id ~)
22+++ unresolved (local-id %dangling)
23+++ no-context (local-id ~)
24+++ local-keep |= [a=A b=A] a
25+++ repeated-good ^- @t (local-keep "hi" "bye")
26+++ repeated-bad ^- @t (local-keep "hi" ~zod)
27+++ rec-good ^- [field=(list @t) flag=?] (local-id [field=~ flag=%.y])
28+++ rec-bad ^- [field=(list @t) flag=?] (local-id [field=~[~zod] flag=%.y])
29+++ wrap-identity |= x=A ^- A (local-id x)
30+++ wrap-forced |= x=A ^- @t (local-id x)
31+++ retain |= x=@t (local-id x)
32+++ result-later |= x ^- (list @t) (local-id x)
33+++ result-repeated ^- (list @t) (local-keep ~ ~)
34+++ result-repeated-bad ^- (list @t) (local-keep ~ ~[~zod])
35+++ recursive |= [flag=? value]
36+ ^- (list @t)
37+ ?- flag
38+ %.y (local-id value)
39+ %.n (recursive flag value)
40+++ captured |= sample
41+ ++ local |= ignored sample
42+ ^- (list @t) (local ~zod)
43+++ captured-bad |= sample
44+ ++ local |= ignored sample
45+ ~& ^- @t sample
46+ ^- @p (local ~zod)
47++$ choice |$ [A]
48+ [%one value=A]
49+ %none
50+++ param-list |= x=(list A) ^- (list A) (local-id ~)
51+++ param-list-text (param-list ~["hi"])
52+++ param-list-ship (param-list ~[~zod])
53+++ param-union |= x=A ^- (choice A) (local-id [%one x])
54+++ param-union-text (param-union "hi")
55+++ param-union-ship (param-union ~zod)
56+++ nested-tag-unknown (local-id [%one %dangling])
tests/golden/types-deferred-call-context/tokens.txtnew file+557
@@ -0,0 +1,557 @@
1+1:1 glyph +$
2+1:4 name msg
3+2:3 INDENT
4+2:3 lit %good
5+3:3 NEWLINE
6+3:3 lit %other
7+4:1 DEDENT
8+4:1 NEWLINE
9+4:1 glyph ++
10+4:4 name local-id
11+4:13 glyph |=
12+4:16 name x
13+4:18 name x
14+5:1 NEWLINE
15+5:1 glyph ++
16+5:4 name empty-list
17+5:15 glyph ^-
18+5:18 glyph (
19+5:19 tight name list
20+5:24 aura @t
21+5:26 tight glyph )
22+5:28 glyph (
23+5:29 tight name local-id
24+5:38 lit ~
25+5:39 tight glyph )
26+6:1 NEWLINE
27+6:1 glyph ++
28+6:4 name filled-list
29+6:16 glyph ^-
30+6:19 glyph (
31+6:20 tight name list
32+6:25 aura @t
33+6:27 tight glyph )
34+6:29 glyph (
35+6:30 tight name local-id
36+6:39 glyph ~[
37+6:41 tight str "hi"
38+6:45 tight glyph ]
39+6:46 tight glyph )
40+7:1 NEWLINE
41+7:1 glyph ++
42+7:4 name wrong-list
43+7:15 glyph ^-
44+7:18 glyph (
45+7:19 tight name list
46+7:24 aura @t
47+7:26 tight glyph )
48+7:28 glyph (
49+7:29 tight name local-id
50+7:38 glyph ~[
51+7:40 tight lit ~zod
52+7:44 tight glyph ]
53+7:45 tight glyph )
54+8:1 NEWLINE
55+8:1 glyph ++
56+8:4 name unit-value
57+8:15 glyph ^-
58+8:18 glyph (
59+8:19 tight name unit
60+8:24 name msg
61+8:27 tight glyph )
62+8:29 glyph (
63+8:30 tight name local-id
64+8:39 glyph `
65+8:40 tight lit %good
66+8:45 tight glyph )
67+9:1 NEWLINE
68+9:1 glyph ++
69+9:4 name union-value
70+9:16 glyph ^-
71+9:19 name msg
72+9:23 glyph (
73+9:24 tight name local-id
74+9:33 lit %good
75+9:38 tight glyph )
76+10:1 NEWLINE
77+10:1 glyph ++
78+10:4 name union-bad
79+10:14 glyph ^-
80+10:17 name msg
81+10:21 glyph (
82+10:22 tight name local-id
83+10:31 lit %wrong
84+10:37 tight glyph )
85+11:1 NEWLINE
86+11:1 glyph ++
87+11:4 name nested
88+11:11 glyph ^-
89+11:14 glyph (
90+11:15 tight name list
91+11:20 glyph (
92+11:21 tight name unit
93+11:26 name msg
94+11:29 tight glyph )
95+11:30 tight glyph )
96+11:32 glyph (
97+11:33 tight name local-id
98+11:42 glyph ~[
99+11:44 tight glyph `
100+11:45 tight lit %good
101+11:50 tight glyph ]
102+11:51 tight glyph )
103+12:1 NEWLINE
104+12:1 glyph ++
105+12:4 name rec-value
106+12:14 glyph ^-
107+12:17 glyph [
108+12:18 tight name field
109+12:23 tight glyph =
110+12:24 tight glyph (
111+12:25 tight name list
112+12:30 aura @t
113+12:32 tight glyph )
114+12:33 tight glyph ]
115+12:35 glyph (
116+12:36 tight name local-id
117+12:45 glyph [
118+12:46 tight name field
119+12:51 tight glyph =
120+12:52 tight lit ~
121+12:53 tight glyph ]
122+12:54 tight glyph )
123+13:1 NEWLINE
124+13:1 glyph ++
125+13:4 name already
126+13:12 glyph |=
127+13:15 name x
128+13:16 tight glyph =
129+13:17 tight aura @ud
130+13:21 glyph ^-
131+13:24 aura @u
132+13:27 glyph (
133+13:28 tight name local-id
134+13:37 name x
135+13:38 tight glyph )
136+14:1 NEWLINE
137+14:1 glyph ++
138+14:4 name bad-aura
139+14:13 glyph |=
140+14:16 name x
141+14:17 tight glyph =
142+14:18 tight aura @p
143+14:21 glyph ^-
144+14:24 aura @t
145+14:27 glyph (
146+14:28 tight name local-id
147+14:37 name x
148+14:38 tight glyph )
149+15:1 NEWLINE
150+15:1 glyph ++
151+15:4 name capital
152+15:12 glyph |=
153+15:15 name x
154+15:16 tight glyph =
155+15:17 tight tvar A
156+15:19 glyph ^-
157+15:22 tvar A
158+15:24 glyph (
159+15:25 tight name local-id
160+15:34 str "text"
161+15:40 tight glyph )
162+16:1 NEWLINE
163+16:1 glyph ++
164+16:4 name trace-tag
165+16:14 glyph ^-
166+16:17 glyph (
167+16:18 tight name list
168+16:23 aura @t
169+16:25 tight glyph )
170+17:3 INDENT
171+17:3 glyph ~&
172+17:6 lit %dangling
173+18:5 INDENT
174+18:5 glyph (
175+18:6 tight name local-id
176+18:15 lit ~
177+18:16 tight glyph )
178+19:1 DEDENT
179+19:1 DEDENT
180+19:1 NEWLINE
181+19:1 glyph ++
182+19:4 name trace-null
183+19:15 glyph ^-
184+19:18 glyph (
185+19:19 tight name list
186+19:24 aura @t
187+19:26 tight glyph )
188+20:3 INDENT
189+20:3 glyph ~&
190+20:6 lit ~
191+21:5 INDENT
192+21:5 glyph (
193+21:6 tight name local-id
194+21:15 lit ~
195+21:16 tight glyph )
196+22:1 DEDENT
197+22:1 DEDENT
198+22:1 NEWLINE
199+22:1 glyph ++
200+22:4 name unresolved
201+22:15 glyph (
202+22:16 tight name local-id
203+22:25 lit %dangling
204+22:34 tight glyph )
205+23:1 NEWLINE
206+23:1 glyph ++
207+23:4 name no-context
208+23:15 glyph (
209+23:16 tight name local-id
210+23:25 lit ~
211+23:26 tight glyph )
212+24:1 NEWLINE
213+24:1 glyph ++
214+24:4 name local-keep
215+24:15 glyph |=
216+24:18 glyph [
217+24:19 tight name a
218+24:20 tight glyph =
219+24:21 tight tvar A
220+24:23 name b
221+24:24 tight glyph =
222+24:25 tight tvar A
223+24:26 tight glyph ]
224+24:28 name a
225+25:1 NEWLINE
226+25:1 glyph ++
227+25:4 name repeated-good
228+25:18 glyph ^-
229+25:21 aura @t
230+25:24 glyph (
231+25:25 tight name local-keep
232+25:36 str "hi"
233+25:41 str "bye"
234+25:46 tight glyph )
235+26:1 NEWLINE
236+26:1 glyph ++
237+26:4 name repeated-bad
238+26:17 glyph ^-
239+26:20 aura @t
240+26:23 glyph (
241+26:24 tight name local-keep
242+26:35 str "hi"
243+26:40 lit ~zod
244+26:44 tight glyph )
245+27:1 NEWLINE
246+27:1 glyph ++
247+27:4 name rec-good
248+27:13 glyph ^-
249+27:16 glyph [
250+27:17 tight name field
251+27:22 tight glyph =
252+27:23 tight glyph (
253+27:24 tight name list
254+27:29 aura @t
255+27:31 tight glyph )
256+27:33 name flag
257+27:37 tight glyph =
258+27:38 tight glyph ?
259+27:39 tight glyph ]
260+27:41 glyph (
261+27:42 tight name local-id
262+27:51 glyph [
263+27:52 tight name field
264+27:57 tight glyph =
265+27:58 tight lit ~
266+27:60 name flag
267+27:64 tight glyph =
268+27:65 tight lit %.y
269+27:68 tight glyph ]
270+27:69 tight glyph )
271+28:1 NEWLINE
272+28:1 glyph ++
273+28:4 name rec-bad
274+28:12 glyph ^-
275+28:15 glyph [
276+28:16 tight name field
277+28:21 tight glyph =
278+28:22 tight glyph (
279+28:23 tight name list
280+28:28 aura @t
281+28:30 tight glyph )
282+28:32 name flag
283+28:36 tight glyph =
284+28:37 tight glyph ?
285+28:38 tight glyph ]
286+28:40 glyph (
287+28:41 tight name local-id
288+28:50 glyph [
289+28:51 tight name field
290+28:56 tight glyph =
291+28:57 tight glyph ~[
292+28:59 tight lit ~zod
293+28:63 tight glyph ]
294+28:65 name flag
295+28:69 tight glyph =
296+28:70 tight lit %.y
297+28:73 tight glyph ]
298+28:74 tight glyph )
299+29:1 NEWLINE
300+29:1 glyph ++
301+29:4 name wrap-identity
302+29:18 glyph |=
303+29:21 name x
304+29:22 tight glyph =
305+29:23 tight tvar A
306+29:25 glyph ^-
307+29:28 tvar A
308+29:30 glyph (
309+29:31 tight name local-id
310+29:40 name x
311+29:41 tight glyph )
312+30:1 NEWLINE
313+30:1 glyph ++
314+30:4 name wrap-forced
315+30:16 glyph |=
316+30:19 name x
317+30:20 tight glyph =
318+30:21 tight tvar A
319+30:23 glyph ^-
320+30:26 aura @t
321+30:29 glyph (
322+30:30 tight name local-id
323+30:39 name x
324+30:40 tight glyph )
325+31:1 NEWLINE
326+31:1 glyph ++
327+31:4 name retain
328+31:11 glyph |=
329+31:14 name x
330+31:15 tight glyph =
331+31:16 tight aura @t
332+31:19 glyph (
333+31:20 tight name local-id
334+31:29 name x
335+31:30 tight glyph )
336+32:1 NEWLINE
337+32:1 glyph ++
338+32:4 name result-later
339+32:17 glyph |=
340+32:20 name x
341+32:22 glyph ^-
342+32:25 glyph (
343+32:26 tight name list
344+32:31 aura @t
345+32:33 tight glyph )
346+32:35 glyph (
347+32:36 tight name local-id
348+32:45 name x
349+32:46 tight glyph )
350+33:1 NEWLINE
351+33:1 glyph ++
352+33:4 name result-repeated
353+33:20 glyph ^-
354+33:23 glyph (
355+33:24 tight name list
356+33:29 aura @t
357+33:31 tight glyph )
358+33:33 glyph (
359+33:34 tight name local-keep
360+33:45 lit ~
361+33:47 lit ~
362+33:48 tight glyph )
363+34:1 NEWLINE
364+34:1 glyph ++
365+34:4 name result-repeated-bad
366+34:24 glyph ^-
367+34:27 glyph (
368+34:28 tight name list
369+34:33 aura @t
370+34:35 tight glyph )
371+34:37 glyph (
372+34:38 tight name local-keep
373+34:49 lit ~
374+34:51 glyph ~[
375+34:53 tight lit ~zod
376+34:57 tight glyph ]
377+34:58 tight glyph )
378+35:1 NEWLINE
379+35:1 glyph ++
380+35:4 name recursive
381+35:14 glyph |=
382+35:17 glyph [
383+35:18 tight name flag
384+35:22 tight glyph =
385+35:23 tight glyph ?
386+35:25 name value
387+35:30 tight glyph ]
388+36:3 INDENT
389+36:3 glyph ^-
390+36:6 glyph (
391+36:7 tight name list
392+36:12 aura @t
393+36:14 tight glyph )
394+37:5 INDENT
395+37:5 glyph ?-
396+37:8 name flag
397+38:7 INDENT
398+38:7 lit %.y
399+38:11 glyph (
400+38:12 tight name local-id
401+38:21 name value
402+38:26 tight glyph )
403+39:7 NEWLINE
404+39:7 lit %.n
405+39:11 glyph (
406+39:12 tight name recursive
407+39:22 name flag
408+39:27 name value
409+39:32 tight glyph )
410+40:1 DEDENT
411+40:1 DEDENT
412+40:1 DEDENT
413+40:1 NEWLINE
414+40:1 glyph ++
415+40:4 name captured
416+40:13 glyph |=
417+40:16 name sample
418+41:3 INDENT
419+41:3 glyph ++
420+41:6 name local
421+41:12 glyph |=
422+41:15 name ignored
423+41:23 name sample
424+42:3 NEWLINE
425+42:3 glyph ^-
426+42:6 glyph (
427+42:7 tight name list
428+42:12 aura @t
429+42:14 tight glyph )
430+42:16 glyph (
431+42:17 tight name local
432+42:23 lit ~zod
433+42:27 tight glyph )
434+43:1 DEDENT
435+43:1 NEWLINE
436+43:1 glyph ++
437+43:4 name captured-bad
438+43:17 glyph |=
439+43:20 name sample
440+44:3 INDENT
441+44:3 glyph ++
442+44:6 name local
443+44:12 glyph |=
444+44:15 name ignored
445+44:23 name sample
446+45:3 NEWLINE
447+45:3 glyph ~&
448+45:6 glyph ^-
449+45:9 aura @t
450+45:12 name sample
451+46:5 INDENT
452+46:5 glyph ^-
453+46:8 aura @p
454+46:11 glyph (
455+46:12 tight name local
456+46:18 lit ~zod
457+46:22 tight glyph )
458+47:1 DEDENT
459+47:1 DEDENT
460+47:1 NEWLINE
461+47:1 glyph +$
462+47:4 name choice
463+47:11 glyph |$
464+47:14 glyph [
465+47:15 tight tvar A
466+47:16 tight glyph ]
467+48:3 INDENT
468+48:3 glyph [
469+48:4 tight lit %one
470+48:9 name value
471+48:14 tight glyph =
472+48:15 tight tvar A
473+48:16 tight glyph ]
474+49:3 NEWLINE
475+49:3 lit %none
476+50:1 DEDENT
477+50:1 NEWLINE
478+50:1 glyph ++
479+50:4 name param-list
480+50:15 glyph |=
481+50:18 name x
482+50:19 tight glyph =
483+50:20 tight glyph (
484+50:21 tight name list
485+50:26 tvar A
486+50:27 tight glyph )
487+50:29 glyph ^-
488+50:32 glyph (
489+50:33 tight name list
490+50:38 tvar A
491+50:39 tight glyph )
492+50:41 glyph (
493+50:42 tight name local-id
494+50:51 lit ~
495+50:52 tight glyph )
496+51:1 NEWLINE
497+51:1 glyph ++
498+51:4 name param-list-text
499+51:20 glyph (
500+51:21 tight name param-list
501+51:32 glyph ~[
502+51:34 tight str "hi"
503+51:38 tight glyph ]
504+51:39 tight glyph )
505+52:1 NEWLINE
506+52:1 glyph ++
507+52:4 name param-list-ship
508+52:20 glyph (
509+52:21 tight name param-list
510+52:32 glyph ~[
511+52:34 tight lit ~zod
512+52:38 tight glyph ]
513+52:39 tight glyph )
514+53:1 NEWLINE
515+53:1 glyph ++
516+53:4 name param-union
517+53:16 glyph |=
518+53:19 name x
519+53:20 tight glyph =
520+53:21 tight tvar A
521+53:23 glyph ^-
522+53:26 glyph (
523+53:27 tight name choice
524+53:34 tvar A
525+53:35 tight glyph )
526+53:37 glyph (
527+53:38 tight name local-id
528+53:47 glyph [
529+53:48 tight lit %one
530+53:53 name x
531+53:54 tight glyph ]
532+53:55 tight glyph )
533+54:1 NEWLINE
534+54:1 glyph ++
535+54:4 name param-union-text
536+54:21 glyph (
537+54:22 tight name param-union
538+54:34 str "hi"
539+54:38 tight glyph )
540+55:1 NEWLINE
541+55:1 glyph ++
542+55:4 name param-union-ship
543+55:21 glyph (
544+55:22 tight name param-union
545+55:34 lit ~zod
546+55:38 tight glyph )
547+56:1 NEWLINE
548+56:1 glyph ++
549+56:4 name nested-tag-unknown
550+56:23 glyph (
551+56:24 tight name local-id
552+56:33 glyph [
553+56:34 tight lit %one
554+56:39 lit %dangling
555+56:48 tight glyph ]
556+56:49 tight glyph )
557+56:50 NEWLINE
tests/golden/types-deferred-call-context/tree.txtnew file+272

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-generic-union-capitals/types.txt+28−4

This diff is too big to show here.

tests/golden/types-generic-union-errors/types.txt+3−3

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-list-imported/source.jibb+8

This diff is too big to show here.

tests/golden/types-list-imported/tokens.txt+52−1

This diff is too big to show here.

tests/golden/types-list-imported/tree.txt+25−1

This diff is too big to show here.

tests/golden/types-list-imported/types.txt+10

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-prelude-unit-helpers/tokens.txtnew file+209

This diff is too big to show here.

tests/golden/types-prelude-unit-helpers/tree.txtnew file+115

This diff is too big to show here.

tests/golden/types-prelude-unit-helpers/types.txtnew file+26

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-record-cast-context/source.jibbnew file+24

This diff is too big to show here.

tests/golden/types-record-cast-context/tokens.txtnew file+234

This diff is too big to show here.

tests/golden/types-record-cast-context/tree.txtnew file+105

This diff is too big to show here.

tests/golden/types-record-cast-context/types.txtnew file+49

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-string-interpolation/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-string-interpolation/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-string-interpolation/source.jibbnew file+28

This diff is too big to show here.

tests/golden/types-string-interpolation/tokens.txtnew file+259

This diff is too big to show here.

tests/golden/types-string-interpolation/tree.txtnew file+109

This diff is too big to show here.

tests/golden/types-string-interpolation/types.txtnew file+33

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-union-branch-context/types.txt+4−4

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-union-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-context/about.txtnew file+4

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-union-patterns-generic/tokens.txtnew file+255

This diff is too big to show here.

tests/golden/types-union-patterns-generic/tree.txtnew file+117

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-union-patterns-import/module-trees.txtnew file+8

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-union-patterns-import/modules/ui/lib.jibbnew file+3

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-union-patterns-import/tokens.txtnew file+28

This diff is too big to show here.

tests/golden/types-union-patterns-import/tree.txtnew file+12

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-union-patterns/tree.txtnew file+152

This diff is too big to show here.

tests/golden/types-union-patterns/types.txtnew file+25

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-union-polymorphic-identity/module-trees.txtnew file+16

This diff is too big to show here.

tests/golden/types-union-polymorphic-identity/modules.txtnew file+2

This diff is too big to show here.

tests/golden/types-union-polymorphic-identity/modules/ui/one.jibbnew file+4

This diff is too big to show here.

tests/golden/types-union-polymorphic-identity/modules/ui/two.jibbnew file+4

This diff is too big to show here.

tests/golden/types-union-polymorphic-identity/source.jibbnew file+33

This diff is too big to show here.

tests/golden/types-union-polymorphic-identity/tokens.txtnew file+368

This diff is too big to show here.

tests/golden/types-union-polymorphic-identity/tree.txtnew file+152

This diff is too big to show here.

tests/golden/types-union-polymorphic-identity/types.txtnew file+36

This diff is too big to show here.

tests/golden/types-union-tags/types.txt+3−3

This diff is too big to show here.

tests/golden/types-unit-construction/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-unit-construction/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-unit-construction/source.jibbnew file+29

This diff is too big to show here.

tests/golden/types-unit-construction/tokens.txtnew file+168

This diff is too big to show here.

tests/golden/types-unit-construction/tree.txtnew file+71

This diff is too big to show here.

tests/golden/types-unit-construction/types.txtnew file+32

This diff is too big to show here.

tests/golden/types-unit-context/about.txt+2−2

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-unit-context/source.jibb+44−68

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-value-cycle-shadow/about.txtnew file+4

This diff is too big to show here.

tests/golden/types-value-cycle-shadow/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-value-cycle-shadow/source.jibbnew file+6

This diff is too big to show here.

tests/golden/types-value-cycle-shadow/tokens.txtnew file+68

This diff is too big to show here.

tests/golden/types-value-cycle-shadow/tree.txtnew file+32

This diff is too big to show here.

tests/golden/types-value-cycle-shadow/types.txtnew file+7

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-value-cycle-unsupported/modules.txtnew file+1

This diff is too big to show here.

tests/golden/types-value-cycle-unsupported/source.jibbnew file+11

This diff is too big to show here.

tests/golden/types-value-cycle-unsupported/tokens.txtnew file+45

This diff is too big to show here.

tests/golden/types-value-cycle-unsupported/tree.txtnew file+17

This diff is too big to show here.

tests/golden/types-value-cycle-unsupported/types.txtnew file+8

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-value-cycles/source.jibbnew file+13

This diff is too big to show here.

tests/golden/types-value-cycles/tokens.txtnew file+87

This diff is too big to show here.

tests/golden/types-value-cycles/tree.txtnew file+39

This diff is too big to show here.

tests/golden/types-value-cycles/types.txtnew file+44

This diff is too big to show here.

tests/importer/about.txt+36−2

This diff is too big to show here.

tests/importer/shadow-static.txt+6

This diff is too big to show here.

tests/importer/shadow.txt+3

This diff is too big to show here.

tests/importer/small.txt+82

This diff is too big to show here.

tests/importer/tree.txt+99−19

This diff is too big to show here.

tests/lib/jibb-api-paths.hoonnew file+104

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/lib/jibb-import-diagnostic.hoonnew file+59

This diff is too big to show here.

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

This diff is too big to show here.

tests/lib/jibb-module-scope.hoon+69−4

This diff is too big to show here.

tests/lib/jibb-poke-bridge.hoonnew file+88

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/lib/jibb-tlon-bridge.hoonnew file+29

This diff is too big to show here.

tests/lib/jibb.hoon+1404−588

This diff is too big to show here.

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

This diff is too big to show here.

tests/type-api-paths/api.txtnew file+13

This diff is too big to show here.

tests/type-api-paths/expected.txtnew file+18

This diff is too big to show here.

tests/type-api-paths/missing-decl.txtnew file+12

This diff is too big to show here.

tests/type-api-paths/poke-clash.txtnew file+12

This diff is too big to show here.

tests/type-api-paths/scry-bad.txtnew file+13

This diff is too big to show here.

tests/type-api-paths/scry.txtnew file+13

This diff is too big to show here.

tests/type-api-paths/todo-action.txtnew file+6

This diff is too big to show here.

tests/type-api-paths/todo-item.txtnew file+6

This diff is too big to show here.

tests/type-api-paths/todo-sur.txtnew file+12

This diff is too big to show here.

tests/type-api-paths/todo-update.txtnew file+6

This diff is too big to show here.

tests/type-api-paths/todos.txtnew file+6

This diff is too big to show here.

tests/type-api-paths/value-clash.txtnew file+15

This diff is too big to show here.

tests/type-import-diagnostic/about.txtnew file+15

This diff is too big to show here.

tests/type-import-diagnostic/expected.txtnew file+112

This diff is too big to show here.

tests/type-import-diagnostic/mark.txtnew file+5

This diff is too big to show here.

tests/type-import-diagnostic/nested.txtnew file+11

This diff is too big to show here.

tests/type-import-diagnostic/source.txtnew file+13

This diff is too big to show here.

tests/type-import-diagnostic/sur.txtnew file+5

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/type-import/source.txt+21

This diff is too big to show here.

tests/type-import/sur.txt+3

This diff is too big to show here.

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

This diff is too big to show here.

tests/type-module-scope/about.txt+4−1

This diff is too big to show here.

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

This diff is too big to show here.

tests/type-poke/about.txtnew file+7

This diff is too big to show here.

tests/type-poke/alias.txtnew file+2

This diff is too big to show here.

tests/type-poke/api.txtnew file+2

This diff is too big to show here.

tests/type-poke/client.txtnew file+23

This diff is too big to show here.

tests/type-poke/direct.txtnew file+2

This diff is too big to show here.

tests/type-poke/expected.txtnew file+66

This diff is too big to show here.

tests/type-poke/exported.txtnew file+9

This diff is too big to show here.

tests/type-poke/fake.txtnew file+4

This diff is too big to show here.

tests/type-poke/impostor-client.txtnew file+2

This diff is too big to show here.

tests/type-poke/impostor.txtnew file+1

This diff is too big to show here.

tests/type-poke/inner.txtnew file+2

This diff is too big to show here.

tests/type-poke/mark.txtnew file+5

This diff is too big to show here.

tests/type-poke/public.txtnew file+2

This diff is too big to show here.

tests/type-poke/transitive.txtnew file+2

This diff is too big to show here.

tests/type-tlon/about.txtnew file+6

This diff is too big to show here.

tests/type-tlon/expected.txtnew file+6

This diff is too big to show here.

tests/type-tlon/source.txtnew file+6

This diff is too big to show here.

tools/clay-fixtures+56

This diff is too big to show here.

tools/golden+12−2

This diff is too big to show here.

tools/importer-test+1−1

This diff is too big to show here.

tools/ship+46−8

This diff is too big to show here.

tools/testdata/clay-fixtures-selftestnew file+109

This diff is too big to show here.

tools/testdata/selftest+10−10

This diff is too big to show here.

tools/testdata/ship-selftest+73−2

This diff is too big to show here.

tools/type-api-paths-testnew file+52

This diff is too big to show here.

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

This diff is too big to show here.

tools/type-import-diagnostic-testnew file+43

This diff is too big to show here.

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

This diff is too big to show here.

tools/type-module-scope-test+2−1

This diff is too big to show here.

tools/type-poke-testnew file+50

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tools/type-tlon-testnew file+39

This diff is too big to show here.